elanous 0.3.5 → 0.3.6

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 (678) hide show
  1. package/apps/pwa/out/404/index.html +1 -1
  2. package/apps/pwa/out/404.html +1 -1
  3. package/apps/pwa/out/_next/static/chunks/03e0d6dd.700c7936da5b58dc.js +1 -0
  4. package/apps/pwa/out/_next/static/chunks/{2845ea08.c590f5c7ddc06b98.js → 08c5076c.5caa59440568d9fd.js} +1 -1
  5. package/apps/pwa/out/_next/static/chunks/1133.3801860878ce88b3.js +90 -0
  6. package/apps/pwa/out/_next/static/chunks/122.8b918db079a217b3.js +1 -0
  7. package/apps/pwa/out/_next/static/chunks/1262.382ab717777b7876.js +1 -0
  8. package/apps/pwa/out/_next/static/chunks/1282.b1839574a7174818.js +1 -0
  9. package/apps/pwa/out/_next/static/chunks/1289.90573260d680c2c4.js +104 -0
  10. package/apps/pwa/out/_next/static/chunks/1292.a5ad38120c4f4c91.js +8 -0
  11. package/apps/pwa/out/_next/static/chunks/{7015-6abc8f1809ff071f.js → 13-a66d199eb241ebdd.js} +1 -1
  12. package/apps/pwa/out/_next/static/chunks/1407.738fdf1a0494400e.js +62 -0
  13. package/apps/pwa/out/_next/static/chunks/1544.b54c381a64374891.js +1 -0
  14. package/apps/pwa/out/_next/static/chunks/1626-e27033153bdeace1.js +1 -0
  15. package/apps/pwa/out/_next/static/chunks/1709-9d15a13770cf351e.js +1 -0
  16. package/apps/pwa/out/_next/static/chunks/174-48f4dbaadfd63cfe.js +1 -0
  17. package/apps/pwa/out/_next/static/chunks/1791.2d4dc98bb4477808.js +64 -0
  18. package/apps/pwa/out/_next/static/chunks/{7746.c8b9b75e18472c54.js → 1895.8083fc998e96e187.js} +1 -1
  19. package/apps/pwa/out/_next/static/chunks/20-e5b5cb74a2a5bb5d.js +1 -0
  20. package/apps/pwa/out/_next/static/chunks/{7250-70e47260b60cd47e.js → 2081-daa5ad7b1b89adff.js} +1 -1
  21. package/apps/pwa/out/_next/static/chunks/2097.0b609686216a65c5.js +1 -0
  22. package/apps/pwa/out/_next/static/chunks/2157-e5b53879e832dcaf.js +1 -0
  23. package/apps/pwa/out/_next/static/chunks/{9850.90badc8e9b213e5a.js → 2195.309f603cd694b342.js} +1 -1
  24. package/apps/pwa/out/_next/static/chunks/2264-db91ffbe7db2bec9.js +1 -0
  25. package/apps/pwa/out/_next/static/chunks/2514-c999158b591411cc.js +1 -0
  26. package/apps/pwa/out/_next/static/chunks/2534-57d4eb7a68b899ac.js +1 -0
  27. package/apps/pwa/out/_next/static/chunks/{5323.277ad337906fe70a.js → 2566.4bd6b4d466b415bf.js} +3 -3
  28. package/apps/pwa/out/_next/static/chunks/{1807-778f3031dc089a09.js → 2769-b57dccc1a2780bc9.js} +1 -1
  29. package/apps/pwa/out/_next/static/chunks/3145.a1fae3cb5ff3e38f.js +74 -0
  30. package/apps/pwa/out/_next/static/chunks/{2999.c462d95ab66dba3a.js → 3273.01f6a479510f3745.js} +1 -1
  31. package/apps/pwa/out/_next/static/chunks/332.dc6c432ef47a38bd.js +1 -0
  32. package/apps/pwa/out/_next/static/chunks/3334.22d96c812cd3499d.js +149 -0
  33. package/apps/pwa/out/_next/static/chunks/337.e243cda2c1de2d72.js +24 -0
  34. package/apps/pwa/out/_next/static/chunks/3399-2aa9d084ec2b4f91.js +1 -0
  35. package/apps/pwa/out/_next/static/chunks/{3483-f7f5f9a66e1780ad.js → 3425-79876b2e27c2bf21.js} +1 -1
  36. package/apps/pwa/out/_next/static/chunks/{7228.8cb7ac9d98e331d5.js → 3567.f123fed09c981929.js} +1 -1
  37. package/apps/pwa/out/_next/static/chunks/3578-1c7b5d1f3177154a.js +1 -0
  38. package/apps/pwa/out/_next/static/chunks/3652-baf6f94c7ab62f8b.js +1 -0
  39. package/apps/pwa/out/_next/static/chunks/3819-0819a0e58e075bc4.js +1 -0
  40. package/apps/pwa/out/_next/static/chunks/384.08e43ae443d798b7.js +1 -0
  41. package/apps/pwa/out/_next/static/chunks/{8389.af75612ea24ceba6.js → 392.88e4871679543f05.js} +2 -2
  42. package/apps/pwa/out/_next/static/chunks/3955.a29bd2ca82a3b139.js +23 -0
  43. package/apps/pwa/out/_next/static/chunks/3970.3b0b5d94ea0b60cc.js +2 -0
  44. package/apps/pwa/out/_next/static/chunks/4042.d51c4afd58eb3c9d.js +1 -0
  45. package/apps/pwa/out/_next/static/chunks/4053-4f494b4b77904727.js +1 -0
  46. package/apps/pwa/out/_next/static/chunks/{3176.fcf82fd6b3fcfff5.js → 4090.2ac256e4465ce23a.js} +1 -1
  47. package/apps/pwa/out/_next/static/chunks/4171-341d135bb272be82.js +1 -0
  48. package/apps/pwa/out/_next/static/chunks/4231.6c49fe66b025f465.js +1 -0
  49. package/apps/pwa/out/_next/static/chunks/4317-d2132e3be869b36b.js +1 -0
  50. package/apps/pwa/out/_next/static/chunks/436.bdfc3533c90ab95b.js +1 -0
  51. package/apps/pwa/out/_next/static/chunks/4406.1c70154db26f6ca3.js +1 -0
  52. package/apps/pwa/out/_next/static/chunks/4469-361edcba09e0eb1b.js +1 -0
  53. package/apps/pwa/out/_next/static/chunks/{9376.35941fbddcbfe1d4.js → 4513.35e176155fcac151.js} +1 -1
  54. package/apps/pwa/out/_next/static/chunks/4523.1de9ececca7bb35c.js +27 -0
  55. package/apps/pwa/out/_next/static/chunks/{5640.b32a01e556340532.js → 4743.202838e9e44d1890.js} +2 -2
  56. package/apps/pwa/out/_next/static/chunks/4762.cfb596785785a35d.js +79 -0
  57. package/apps/pwa/out/_next/static/chunks/4859.e5532ce5f6dfb5c9.js +32 -0
  58. package/apps/pwa/out/_next/static/chunks/5002-8af817fe59d06e9c.js +1 -0
  59. package/apps/pwa/out/_next/static/chunks/5015.9843edccbdec9dcc.js +94 -0
  60. package/apps/pwa/out/_next/static/chunks/5046-129cd38c01b0e1a6.js +1 -0
  61. package/apps/pwa/out/_next/static/chunks/5226.21335a67dbd6769b.js +226 -0
  62. package/apps/pwa/out/_next/static/chunks/{1911-bc30f2d39d2b318e.js → 5268-60a68ca7fc42517d.js} +3 -3
  63. package/apps/pwa/out/_next/static/chunks/{259.ff45e655e5e41a4d.js → 5366.ebeeaf7de80d3ca9.js} +16 -16
  64. package/apps/pwa/out/_next/static/chunks/{7056-c994bfc3e3701439.js → 5411-713ef15cc7235cf6.js} +1 -1
  65. package/apps/pwa/out/_next/static/chunks/5505-467d5b66c0f6604f.js +1 -0
  66. package/apps/pwa/out/_next/static/chunks/5665-700d710daec0a3a8.js +1 -0
  67. package/apps/pwa/out/_next/static/chunks/{abec6764.4a84c474be416fb7.js → 583d9398.977d3658a34faab6.js} +1 -1
  68. package/apps/pwa/out/_next/static/chunks/584.760ea6f9640a2330.js +1 -0
  69. package/apps/pwa/out/_next/static/chunks/5846-91344971864969a6.js +1 -0
  70. package/apps/pwa/out/_next/static/chunks/{8101.31728c5a01a6167b.js → 5902.99e8a94fe5a52f2d.js} +2 -2
  71. package/apps/pwa/out/_next/static/chunks/60-0bd459e227e19e2b.js +1 -0
  72. package/apps/pwa/out/_next/static/chunks/6039.6b54b0dbd98ce3d9.js +1 -0
  73. package/apps/pwa/out/_next/static/chunks/6048.7bbaec360ac24a83.js +36 -0
  74. package/apps/pwa/out/_next/static/chunks/6067-ee1f7f126eb7edba.js +1 -0
  75. package/apps/pwa/out/_next/static/chunks/6284.f8120f5daaea3e99.js +286 -0
  76. package/apps/pwa/out/_next/static/chunks/{4388.42598a55da8c47cf.js → 6299.ac4c5fb874605cb9.js} +1 -1
  77. package/apps/pwa/out/_next/static/chunks/6397.7ea605814f73c962.js +148 -0
  78. package/apps/pwa/out/_next/static/chunks/6459.ddf3a045461f0277.js +1 -0
  79. package/apps/pwa/out/_next/static/chunks/{1783.708de9a0182ac571.js → 6506.f32c4e8db47a4d04.js} +1 -1
  80. package/apps/pwa/out/_next/static/chunks/{7923.35fed012b66d1420.js → 6650.7c18ed630c8df5f6.js} +2 -2
  81. package/apps/pwa/out/_next/static/chunks/6672.dc8faf8315bed1ec.js +1 -0
  82. package/apps/pwa/out/_next/static/chunks/6720-9f2b574e2778c51e.js +1 -0
  83. package/apps/pwa/out/_next/static/chunks/6901.06042eea29545f49.js +1 -0
  84. package/apps/pwa/out/_next/static/chunks/6964-ddcc66e773813bb9.js +1 -0
  85. package/apps/pwa/out/_next/static/chunks/{2c8c2385.34ce9456dac99420.js → 70160b1f.e9b0c3183f852774.js} +1 -1
  86. package/apps/pwa/out/_next/static/chunks/726ffad1-541c403c50188556.js +1 -0
  87. package/apps/pwa/out/_next/static/chunks/7370.5e62aa60f70eab3a.js +287 -0
  88. package/apps/pwa/out/_next/static/chunks/7398.0f969552779fc929.js +1 -0
  89. package/apps/pwa/out/_next/static/chunks/7463-2d9010477f346643.js +1 -0
  90. package/apps/pwa/out/_next/static/chunks/{6433.e0006a1e924a2131.js → 7616.90f498934db729c5.js} +1 -1
  91. package/apps/pwa/out/_next/static/chunks/7636.a2019ded999e3313.js +93 -0
  92. package/apps/pwa/out/_next/static/chunks/7679.fff5f504d80d8efa.js +1 -0
  93. package/apps/pwa/out/_next/static/chunks/{6841.ed452e7d06f598ee.js → 7680.8a882f1e69f29d04.js} +1 -1
  94. package/apps/pwa/out/_next/static/chunks/780.fef3f7eab136cfb2.js +1 -0
  95. package/apps/pwa/out/_next/static/chunks/7913.111fcb6384514824.js +1 -0
  96. package/apps/pwa/out/_next/static/chunks/{c9c445f7.15a7d747f61c56e6.js → 79e58824.98894b54fea1ebeb.js} +1 -1
  97. package/apps/pwa/out/_next/static/chunks/8053-787355829bcce0fc.js +1 -0
  98. package/apps/pwa/out/_next/static/chunks/81.14ce7dd1f5f076b5.js +1 -0
  99. package/apps/pwa/out/_next/static/chunks/8155-e80f82cd593d37e0.js +1 -0
  100. package/apps/pwa/out/_next/static/chunks/8173.4cdfbe651f7b5b42.js +1 -0
  101. package/apps/pwa/out/_next/static/chunks/818-4680f45366d9d817.js +1 -0
  102. package/apps/pwa/out/_next/static/chunks/8289.e422989d7d3a3b3e.js +1 -0
  103. package/apps/pwa/out/_next/static/chunks/8330-65b8ffc4adafddda.js +1 -0
  104. package/apps/pwa/out/_next/static/chunks/8347-9d4560fee007a4a7.js +1 -0
  105. package/apps/pwa/out/_next/static/chunks/8634-fa442da5f7bf2646.js +1 -0
  106. package/apps/pwa/out/_next/static/chunks/8641.2e059c30fc167758.js +1 -0
  107. package/apps/pwa/out/_next/static/chunks/8702.b18812eda87d0d96.js +1 -0
  108. package/apps/pwa/out/_next/static/chunks/{4647.a6e02754d5dcf398.js → 8868.53e897d2e917ba66.js} +1 -1
  109. package/apps/pwa/out/_next/static/chunks/8991.ea9c4a7cd21e8ab0.js +1 -0
  110. package/apps/pwa/out/_next/static/chunks/{6c25ab46.9d19c4994d7f5495.js → 8d86c5fb.bb592b68be6b2dd1.js} +1 -1
  111. package/apps/pwa/out/_next/static/chunks/{6251.a547705e850c5149.js → 9041.fb24e17368fc7c0c.js} +1 -1
  112. package/apps/pwa/out/_next/static/chunks/9061-52f95217516a27ea.js +1 -0
  113. package/apps/pwa/out/_next/static/chunks/9147.5721390c3c3eb275.js +1 -0
  114. package/apps/pwa/out/_next/static/chunks/9288.92a602e56f3c3235.js +1 -0
  115. package/apps/pwa/out/_next/static/chunks/{8541.3a501dabd3140fd0.js → 9384.eca46b93339ff473.js} +1 -1
  116. package/apps/pwa/out/_next/static/chunks/9441-11ce6d0c0489a635.js +1 -0
  117. package/apps/pwa/out/_next/static/chunks/9633.e6c9740bd6532344.js +1 -0
  118. package/apps/pwa/out/_next/static/chunks/9750-52fc8ea133cbdd10.js +1 -0
  119. package/apps/pwa/out/_next/static/chunks/{9951-b903d4a257c01657.js → 9787-88bf04f4efec6a87.js} +1 -1
  120. package/apps/pwa/out/_next/static/chunks/9866.26519d8848018524.js +1 -0
  121. package/apps/pwa/out/_next/static/chunks/{7663.e4ea6f8c14df314c.js → 9932.53788b29e036cf7e.js} +1 -1
  122. package/apps/pwa/out/_next/static/chunks/{9052.0be41f794a5fb029.js → 9948.c9ce32e9de4d6112.js} +2 -2
  123. package/apps/pwa/out/_next/static/chunks/9eb16190.04c6ae4915f4a9a3.js +1 -0
  124. package/apps/pwa/out/_next/static/chunks/{01af03c4.71e22e1e1aca813e.js → ae5abe9f.937147329556d162.js} +1 -1
  125. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-47c27b54524c7fa5.js +1 -0
  126. package/apps/pwa/out/_next/static/chunks/app/approvals/page-9f612bc57ce11518.js +1 -0
  127. package/apps/pwa/out/_next/static/chunks/app/apps/page-8f42d3f8a3c479b2.js +1 -0
  128. package/apps/pwa/out/_next/static/chunks/app/board/page-fca38e9721b2e291.js +1 -0
  129. package/apps/pwa/out/_next/static/chunks/app/botlab/page-d76f695cc9aa66da.js +1 -0
  130. package/apps/pwa/out/_next/static/chunks/app/bots/page-6a4a92e785e30a96.js +1 -0
  131. package/apps/pwa/out/_next/static/chunks/app/ceo/page-489f91f71cc95c1f.js +1 -0
  132. package/apps/pwa/out/_next/static/chunks/app/chat/page-e26b02e36ed57ff7.js +1 -0
  133. package/apps/pwa/out/_next/static/chunks/app/consult/page-8b6d2222230d6681.js +1 -0
  134. package/apps/pwa/out/_next/static/chunks/app/control/{page-90bff14d4d1104a9.js → page-b6d3b8924598e180.js} +1 -1
  135. package/apps/pwa/out/_next/static/chunks/app/decisions/{page-bc7f2d53539f1599.js → page-99ae8ef441d501e1.js} +1 -1
  136. package/apps/pwa/out/_next/static/chunks/app/design-check/page-e267c49dabb08ed1.js +1 -0
  137. package/apps/pwa/out/_next/static/chunks/app/editor/page-7f93783cd38fd2b4.js +1 -0
  138. package/apps/pwa/out/_next/static/chunks/app/exec/page-ad71c7f877d1ade8.js +1 -0
  139. package/apps/pwa/out/_next/static/chunks/app/field/page-c46377fc61262679.js +1 -0
  140. package/apps/pwa/out/_next/static/chunks/app/healthz/route-47c27b54524c7fa5.js +1 -0
  141. package/apps/pwa/out/_next/static/chunks/app/inside/page-65d6902d87acd8ae.js +1 -0
  142. package/apps/pwa/out/_next/static/chunks/app/intake/page-07c809fa1f01af06.js +1 -0
  143. package/apps/pwa/out/_next/static/chunks/app/layout-f7f6914dfccec337.js +1 -0
  144. package/apps/pwa/out/_next/static/chunks/app/live/page-122697e5567e1ff3.js +1 -0
  145. package/apps/pwa/out/_next/static/chunks/app/live-run/page-49562e02f95095bc.js +1 -0
  146. package/apps/pwa/out/_next/static/chunks/app/loops/page-99ae848af2397c3d.js +1 -0
  147. package/apps/pwa/out/_next/static/chunks/app/market/page-46d8a6d324c0e2f1.js +1 -0
  148. package/apps/pwa/out/_next/static/chunks/app/morning/page-de6f870e5608e6de.js +1 -0
  149. package/apps/pwa/out/_next/static/chunks/app/not-found-ea2df30943a87c71.js +1 -0
  150. package/apps/pwa/out/_next/static/chunks/app/observatory/page-98b024890b62cf3b.js +1 -0
  151. package/apps/pwa/out/_next/static/chunks/app/ops/checklist/{page-5145d13713aa12ba.js → page-c8f0e20b66b28ffa.js} +1 -1
  152. package/apps/pwa/out/_next/static/chunks/app/ops/release/page-7c3611d8aad20b6b.js +1 -0
  153. package/apps/pwa/out/_next/static/chunks/app/ops/resources/page-e28c2e5e4b09d07b.js +1 -0
  154. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-4c00dd145567e03c.js +1 -0
  155. package/apps/pwa/out/_next/static/chunks/app/outputs/page-04897c35a1b0f31c.js +1 -0
  156. package/apps/pwa/out/_next/static/chunks/app/page-cd3b5f3ffdd042f8.js +1 -0
  157. package/apps/pwa/out/_next/static/chunks/app/reflection/page-481cefac3cfae8e2.js +1 -0
  158. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-5d4e9f1acd8a3e76.js +1 -0
  159. package/apps/pwa/out/_next/static/chunks/app/sessions/page-508eac8c609008c8.js +1 -0
  160. package/apps/pwa/out/_next/static/chunks/app/settings/devices/{page-7f03bb1e52c1a43d.js → page-2647b6064ec03f6d.js} +1 -1
  161. package/apps/pwa/out/_next/static/chunks/app/settings/page-06bd8804fb5461c0.js +1 -0
  162. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-7f170c47d678308f.js +1 -0
  163. package/apps/pwa/out/_next/static/chunks/app/setup/layout-47c27b54524c7fa5.js +1 -0
  164. package/apps/pwa/out/_next/static/chunks/app/setup/page-2775bd94657214dd.js +1 -0
  165. package/apps/pwa/out/_next/static/chunks/app/share/page-3d4c64344a7849d1.js +1 -0
  166. package/apps/pwa/out/_next/static/chunks/app/showroom/page-35ecc675ece7f1b1.js +1 -0
  167. package/apps/pwa/out/_next/static/chunks/app/tasks/{page-e29cc254c3ee0054.js → page-212690c5984d0bb5.js} +1 -1
  168. package/apps/pwa/out/_next/static/chunks/app/term/page-c3ce5e2d8719a62d.js +1 -0
  169. package/apps/pwa/out/_next/static/chunks/app/today/page-20e0f8fd07394b92.js +1 -0
  170. package/apps/pwa/out/_next/static/chunks/app/trace/page-2e41cba602b85777.js +1 -0
  171. package/apps/pwa/out/_next/static/chunks/app/vault/{page-e093c97ee87aca70.js → page-cdfaf3c619b41ee3.js} +1 -1
  172. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-3a0cad7feda4ba84.js +1 -0
  173. package/apps/pwa/out/_next/static/chunks/app/workflows/page-b548ef224f7a2c4e.js +1 -0
  174. package/apps/pwa/out/_next/static/chunks/app/workspace/page-840ebf9a8df1e608.js +1 -0
  175. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-9c92234d0c6fc211.js +1 -0
  176. package/apps/pwa/out/_next/static/chunks/{e5a2a050-4b51c1f86f5cc4bb.js → cefbab05-d77e78efac6f0805.js} +1 -1
  177. package/apps/pwa/out/_next/static/chunks/{d1dc888b.cc6ca4afda9a5ef8.js → d80a33eb.43d7188f45a1df0f.js} +1 -1
  178. package/apps/pwa/out/_next/static/chunks/framework-e606293b68d3c2a4.js +1 -0
  179. package/apps/pwa/out/_next/static/chunks/main-4ee3ac293afcb363.js +1 -0
  180. package/apps/pwa/out/_next/static/chunks/main-app-fa9105027513fb32.js +1 -0
  181. package/apps/pwa/out/_next/static/chunks/pages/_app-259505853c97c4e1.js +1 -0
  182. package/apps/pwa/out/_next/static/chunks/pages/_error-9189a5f75b31099d.js +1 -0
  183. package/apps/pwa/out/_next/static/chunks/webpack-24fcc4e4a45c4fbb.js +1 -0
  184. package/apps/pwa/out/_next/static/css/694b79ddfe810a75.css +1 -0
  185. package/apps/pwa/out/_next/static/myEvhO9EDn1k6MAMqnQJd/_buildManifest.js +1 -0
  186. package/apps/pwa/out/_next/static/myEvhO9EDn1k6MAMqnQJd/_ssgManifest.js +1 -0
  187. package/apps/pwa/out/approvals/index.html +1 -1
  188. package/apps/pwa/out/approvals/index.txt +23 -23
  189. package/apps/pwa/out/apps/index.html +1 -0
  190. package/apps/pwa/out/apps/index.txt +33 -0
  191. package/apps/pwa/out/board/index.html +1 -1
  192. package/apps/pwa/out/board/index.txt +23 -23
  193. package/apps/pwa/out/botlab/index.html +1 -1
  194. package/apps/pwa/out/botlab/index.txt +22 -22
  195. package/apps/pwa/out/bots/index.html +1 -1
  196. package/apps/pwa/out/bots/index.txt +22 -22
  197. package/apps/pwa/out/ceo/index.html +1 -1
  198. package/apps/pwa/out/ceo/index.txt +23 -23
  199. package/apps/pwa/out/chat/index.html +1 -1
  200. package/apps/pwa/out/chat/index.txt +22 -22
  201. package/apps/pwa/out/consult/index.html +1 -1
  202. package/apps/pwa/out/consult/index.txt +23 -23
  203. package/apps/pwa/out/control/index.html +1 -1
  204. package/apps/pwa/out/control/index.txt +23 -23
  205. package/apps/pwa/out/decisions/index.html +1 -1
  206. package/apps/pwa/out/decisions/index.txt +22 -22
  207. package/apps/pwa/out/design-check/index.html +1 -1
  208. package/apps/pwa/out/design-check/index.txt +23 -23
  209. package/apps/pwa/out/editor/index.html +1 -1
  210. package/apps/pwa/out/editor/index.txt +23 -23
  211. package/apps/pwa/out/exec/index.html +1 -1
  212. package/apps/pwa/out/exec/index.txt +23 -23
  213. package/apps/pwa/out/field/index.html +1 -1
  214. package/apps/pwa/out/field/index.txt +23 -23
  215. package/apps/pwa/out/healthz +1 -1
  216. package/apps/pwa/out/index.html +1 -1
  217. package/apps/pwa/out/index.txt +22 -22
  218. package/apps/pwa/out/inside/index.html +1 -1
  219. package/apps/pwa/out/inside/index.txt +22 -22
  220. package/apps/pwa/out/intake/index.html +1 -1
  221. package/apps/pwa/out/intake/index.txt +23 -23
  222. package/apps/pwa/out/live/index.html +1 -1
  223. package/apps/pwa/out/live/index.txt +23 -23
  224. package/apps/pwa/out/live-run/index.html +1 -1
  225. package/apps/pwa/out/live-run/index.txt +23 -23
  226. package/apps/pwa/out/loops/index.html +1 -1
  227. package/apps/pwa/out/loops/index.txt +22 -22
  228. package/apps/pwa/out/market/index.html +1 -1
  229. package/apps/pwa/out/market/index.txt +22 -22
  230. package/apps/pwa/out/morning/index.html +1 -1
  231. package/apps/pwa/out/morning/index.txt +23 -23
  232. package/apps/pwa/out/observatory/index.html +1 -1
  233. package/apps/pwa/out/observatory/index.txt +23 -23
  234. package/apps/pwa/out/ops/checklist/index.html +1 -1
  235. package/apps/pwa/out/ops/checklist/index.txt +22 -22
  236. package/apps/pwa/out/ops/release/index.html +1 -1
  237. package/apps/pwa/out/ops/release/index.txt +22 -22
  238. package/apps/pwa/out/ops/resources/index.html +1 -1
  239. package/apps/pwa/out/ops/resources/index.txt +22 -22
  240. package/apps/pwa/out/ops/seats/index.html +1 -1
  241. package/apps/pwa/out/ops/seats/index.txt +22 -22
  242. package/apps/pwa/out/outputs/index.html +1 -1
  243. package/apps/pwa/out/outputs/index.txt +22 -22
  244. package/apps/pwa/out/reflection/index.html +1 -1
  245. package/apps/pwa/out/reflection/index.txt +23 -23
  246. package/apps/pwa/out/scheduler/index.html +1 -1
  247. package/apps/pwa/out/scheduler/index.txt +23 -23
  248. package/apps/pwa/out/sessions/index.html +1 -1
  249. package/apps/pwa/out/sessions/index.txt +22 -22
  250. package/apps/pwa/out/settings/devices/index.html +1 -1
  251. package/apps/pwa/out/settings/devices/index.txt +23 -23
  252. package/apps/pwa/out/settings/index.html +1 -1
  253. package/apps/pwa/out/settings/index.txt +23 -23
  254. package/apps/pwa/out/setup/done/index.html +1 -1
  255. package/apps/pwa/out/setup/done/index.txt +23 -23
  256. package/apps/pwa/out/setup/index.html +1 -1
  257. package/apps/pwa/out/setup/index.txt +23 -23
  258. package/apps/pwa/out/share/index.html +1 -1
  259. package/apps/pwa/out/share/index.txt +23 -23
  260. package/apps/pwa/out/showroom/index.html +1 -1
  261. package/apps/pwa/out/showroom/index.txt +22 -22
  262. package/apps/pwa/out/tasks/index.html +1 -1
  263. package/apps/pwa/out/tasks/index.txt +23 -23
  264. package/apps/pwa/out/term/index.html +1 -1
  265. package/apps/pwa/out/term/index.txt +23 -23
  266. package/apps/pwa/out/today/index.html +1 -1
  267. package/apps/pwa/out/today/index.txt +23 -23
  268. package/apps/pwa/out/trace/index.html +1 -1
  269. package/apps/pwa/out/trace/index.txt +23 -23
  270. package/apps/pwa/out/vault/index.html +1 -1
  271. package/apps/pwa/out/vault/index.txt +23 -23
  272. package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
  273. package/apps/pwa/out/workflows/chat-ui/index.txt +23 -23
  274. package/apps/pwa/out/workflows/index.html +1 -1
  275. package/apps/pwa/out/workflows/index.txt +23 -23
  276. package/apps/pwa/out/workspace/index.html +1 -1
  277. package/apps/pwa/out/workspace/index.txt +23 -23
  278. package/apps/pwa/out/worktrees/index.html +1 -1
  279. package/apps/pwa/out/worktrees/index.txt +23 -23
  280. package/graphs/release/macrophage-subscriber.yaml +17 -0
  281. package/graphs/release/release-loop.yaml +17 -28
  282. package/package.json +2 -1
  283. package/scripts/ci-typecheck-changed.ts +1 -1
  284. package/scripts/cron-run.ts +1 -1
  285. package/scripts/docs/generate-cli-anatomy.ts +2 -3
  286. package/scripts/install.sh +5 -0
  287. package/scripts/isolation-hardcode-baseline.txt +1 -1
  288. package/scripts/land-enqueue.test.sh +18 -4
  289. package/scripts/mission-request-judge.ts +6 -0
  290. package/scripts/release-loop/adaptive-gate-heal-adapter.ts +105 -0
  291. package/scripts/release-loop/adaptive-gate-heal.ts +140 -0
  292. package/scripts/release-loop/gate-baseline.ts +14 -0
  293. package/scripts/release-loop/gate-bisect-sidecar.ts +122 -0
  294. package/scripts/release-loop/gate-bisect.ts +146 -0
  295. package/scripts/release-loop/gate-image-repair-node.ts +104 -0
  296. package/scripts/release-loop/gate-node-sim.ts +29 -6
  297. package/scripts/release-loop/gate-node.ts +498 -58
  298. package/scripts/release-loop/gate-repair-node.ts +166 -0
  299. package/scripts/release-loop/gate-reuse-identity.ts +38 -0
  300. package/scripts/release-loop/gate-shard-dispatch.ts +72 -8
  301. package/scripts/release-loop/gate-shard-receipts.ts +98 -24
  302. package/scripts/release-loop/gate-triage-node.ts +37 -5
  303. package/scripts/release-loop/node-verdict.ts +7 -1
  304. package/scripts/release-loop/pwa-scenarios-node.ts +7 -2
  305. package/scripts/release-loop/repair-pr-landed.ts +93 -0
  306. package/scripts/release-loop/resume-release.ts +35 -8
  307. package/scripts/release-loop/resume.ts +2 -2
  308. package/scripts/release-loop/unattended-release.ts +9 -1
  309. package/scripts/release-loop/version-node.ts +41 -6
  310. package/scripts/test-census/similar-search.ts +375 -0
  311. package/scripts/test-census-similar-search.ts +128 -0
  312. package/scripts/test-census.ts +388 -0
  313. package/scripts/test-deterministic.ts +1 -1
  314. package/src/acp/codex-app-server-client.ts +157 -20
  315. package/src/agent/nest-depth.ts +2 -2
  316. package/src/autopilot/gh-rest-fallback.ts +8 -4
  317. package/src/autopilot/lineage/timeline.ts +1 -1
  318. package/src/autopilot/mission-arc-preflight.ts +7 -2
  319. package/src/autopilot/mission-grounding-ladder.ts +17 -329
  320. package/src/autopilot/mission-history.ts +1 -1
  321. package/src/autopilot/mission-incident-context.ts +2 -1
  322. package/src/autopilot/mission-trace.ts +1 -1
  323. package/src/autopilot/state-paths.ts +2 -2
  324. package/src/briefing/brief-items.ts +1 -1
  325. package/src/chat/index.ts +2 -7
  326. package/src/cli/cred-cli.ts +144 -0
  327. package/src/cli/logs-cli.ts +1 -1
  328. package/src/cli/logs-timeline.ts +1 -1
  329. package/src/cli/machine-apply-from-capture.ts +122 -0
  330. package/src/cli/machine-capture.ts +356 -0
  331. package/src/cli/machine-cli.ts +12 -1
  332. package/src/cli/machine-membership.ts +350 -0
  333. package/src/cli/machine-setup-apply.ts +176 -0
  334. package/src/cli/machine-setup-plan.ts +373 -0
  335. package/src/cli/machine-wsl-setup.ts +211 -0
  336. package/src/cli/ops-cli.ts +2 -34
  337. package/src/cli/ops-status-remote.ts +2 -41
  338. package/src/cli/pr-cli.ts +19 -1
  339. package/src/cli/pr-land-drift-repair.ts +6 -4
  340. package/src/cli/pr-land-heavy-remote.ts +21 -1
  341. package/src/cli/pr-land-overlap-evidence.ts +68 -2
  342. package/src/cli/release-cli.ts +42 -16
  343. package/src/cli/secret-cli.test-helpers.ts +7 -0
  344. package/src/cli/secret-cli.ts +194 -99
  345. package/src/cli/self-update.ts +1 -1
  346. package/src/cli/sim-cli.ts +32 -0
  347. package/src/context-bus/external-events.ts +22 -9
  348. package/src/core-turn/child-liveness-heartbeat.ts +4 -2
  349. package/src/core-turn/run-core-turn.ts +5 -5
  350. package/src/dashboard/index.ts +34 -1292
  351. package/src/dashboard/input/chat-main-acp-dispatch.ts +0 -120
  352. package/src/dashboard/input/chat-main-interaction-opts.ts +0 -32
  353. package/src/dashboard/input/chat-main-plain-turn-runtime.ts +0 -14
  354. package/src/dashboard/input/chat-main-visibility.ts +0 -2
  355. package/src/dashboard/input/dashboard-plain-turn-stream.ts +7 -97
  356. package/src/dashboard/input/dashboard-priority-key-route.ts +0 -56
  357. package/src/dashboard/input/mouse-wiring.ts +1 -14
  358. package/src/dashboard/slash-runtime/dashboard-handlers.ts +8 -45
  359. package/src/debug/log.ts +11 -91
  360. package/src/debug/secret-redaction.ts +98 -0
  361. package/src/decisions/decision-ledger.ts +83 -9
  362. package/src/domains/cron-match.ts +2 -1
  363. package/src/domains/finance-tools.ts +1 -1
  364. package/src/domains/guardian-tick.ts +2 -1
  365. package/src/domains/knowledge.ts +10 -0
  366. package/src/domains/market-quote.ts +1 -1
  367. package/src/domains/morning-synthesis.ts +1 -1
  368. package/src/domains/schedule-health-report.ts +1 -1
  369. package/src/domains/schedule-runner.ts +1 -1
  370. package/src/domains/schedule-state.ts +2 -1
  371. package/src/domains/watch-default-scheduler.ts +1 -1
  372. package/src/graph-runner/graph-events.ts +202 -0
  373. package/src/graph-runner/graph-subscriptions.ts +112 -0
  374. package/src/graph-runner/in-process-registry.ts +6 -0
  375. package/src/graph-runner/runner.ts +964 -37
  376. package/src/harness/browser-verify.ts +1 -1
  377. package/src/harness/grounding/mission-grounding-ladder.ts +350 -0
  378. package/src/harness/harness-cli-command.ts +0 -52
  379. package/src/harness/launch-stamp.ts +2 -1
  380. package/src/hq/fence.ts +1 -1
  381. package/src/index.ts +0 -72
  382. package/src/input-core/audit-tail.ts +1 -1
  383. package/src/instance/test-write-guard.ts +3 -3
  384. package/src/instance-identity.ts +2 -2
  385. package/src/intake-plane/linear-secretary-runtime.ts +3 -2
  386. package/src/intake-plane/requirement-funnel.ts +1 -1
  387. package/src/keybindings.ts +2 -5
  388. package/src/llm/wire/harmony.ts +365 -0
  389. package/src/llm.ts +2 -372
  390. package/src/loops/checker.ts +1 -1
  391. package/src/loops/orchestrator/coordinator-shadow.ts +4 -1
  392. package/src/loops/registry.ts +1 -1
  393. package/src/maturity/feature-maturity.ts +4 -7
  394. package/src/mss/{identity.ts → identity-store.ts} +3 -46
  395. package/src/mss/log-enrich.ts +1 -1
  396. package/src/mss/logging/diagnostic-sink.ts +90 -0
  397. package/src/mss/logging/horizon-watch.ts +4 -4
  398. package/src/mss/logging/log-federation.ts +6 -5
  399. package/src/mss/logging/log-safety-net.ts +7 -7
  400. package/src/mss/logging/log-store.ts +16 -13
  401. package/src/mss/logging/sinks/otel-genai-sink.ts +2 -2
  402. package/src/mss/trace-context.ts +1 -1
  403. package/src/mss/ulid.ts +36 -0
  404. package/src/mss/uri/builder.ts +1 -1
  405. package/src/nexus/api/audio-stt.ts +15 -13
  406. package/src/nexus/api/autopilot-api.ts +1 -68
  407. package/src/nexus/api/channel-ask-op.ts +3 -38
  408. package/src/nexus/api/field-uploads.ts +73 -0
  409. package/src/nexus/api/http-server.ts +65 -80
  410. package/src/nexus/api/ingest-token.ts +2 -2
  411. package/src/nexus/api/mcp-widget-call-route.ts +21 -16
  412. package/src/nexus/api/telegram-trigger-bot.ts +3 -1
  413. package/src/nexus/apps/app-actions.ts +235 -0
  414. package/src/nexus/apps/app-auth.ts +187 -0
  415. package/src/nexus/apps/app-contract.ts +63 -6
  416. package/src/nexus/apps/app-db.ts +326 -0
  417. package/src/nexus/apps/app-host.ts +153 -7
  418. package/src/nexus/apps/app-lifecycle-ledger.ts +243 -0
  419. package/src/nexus/apps/app-storage-route.ts +127 -0
  420. package/src/nexus/apps/app-storage.ts +407 -0
  421. package/src/nexus/apps/app-upload.ts +49 -0
  422. package/src/nexus/config/secrets/app-secret-ledger.ts +241 -0
  423. package/src/nexus/config/secrets/file-backend.ts +195 -9
  424. package/src/nexus/config/secrets/index.ts +13 -1
  425. package/src/nexus/config/secrets/registry.ts +32 -4
  426. package/src/nexus/config/secrets/types.ts +8 -0
  427. package/src/nexus/index.ts +115 -14
  428. package/src/onboarding/web-first.ts +12 -7
  429. package/src/platform/host-id.ts +1 -1
  430. package/src/release-loop/gate-host-reservation.ts +5 -0
  431. package/src/release-loop/gate-shard-ledger.ts +85 -3
  432. package/src/release-loop/graph-event-adapters.ts +128 -0
  433. package/src/release-loop/light-rc.ts +4 -2
  434. package/src/release-loop/macrophage-heal-node.ts +84 -0
  435. package/src/release-loop/macrophage-heal.ts +167 -0
  436. package/src/release-loop/macrophage-safe-cleanup.ts +150 -0
  437. package/src/release-loop/rehearsal.ts +27 -6
  438. package/src/release-loop/stage-mail.ts +15 -10
  439. package/src/roles/machine-name.ts +1 -1
  440. package/src/roles/machine-profile.ts +21 -3
  441. package/src/runtime-identity.ts +46 -0
  442. package/src/self-dev/entrance-baseline.ts +0 -52
  443. package/src/self-implement/gate-remote.ts +8 -1
  444. package/src/self-implement/graph-yaml.ts +142 -6
  445. package/src/session/channel-op-reply-route.ts +12 -0
  446. package/src/session/search-index.ts +16 -4
  447. package/src/session/session-context.ts +3 -1
  448. package/src/setup/service-key-catalog.ts +6 -3
  449. package/src/sim-world-device-catalogs.json +633 -0
  450. package/src/skills/tools/schedule-wakeup.ts +2 -3
  451. package/src/status/bar.ts +0 -43
  452. package/src/storage/object-store.ts +18 -1
  453. package/src/storage/s3.ts +1 -1
  454. package/src/task-orchestrator/surfaces/pod-gate-deps.ts +17 -2
  455. package/src/task-orchestrator/surfaces/pod-lease.ts +6 -1
  456. package/src/task-orchestrator/surfaces/pod-pool.ts +64 -23
  457. package/src/telegram-commands.ts +43 -0
  458. package/src/telegram.ts +50 -7
  459. package/src/time/calendar.ts +70 -0
  460. package/src/time/clock.ts +21 -0
  461. package/src/time/format-core.ts +44 -0
  462. package/src/time/format.ts +7 -227
  463. package/src/time/time-zone.ts +95 -0
  464. package/src/tool-runtime/elanous-autopilot-launch-runtime.ts +1 -1
  465. package/src/tui/core/registry.ts +193 -0
  466. package/src/tui/entry.ts +98 -36
  467. package/src/tui-client/next-wakeup.ts +5 -0
  468. package/src/tui.ts +2 -2
  469. package/src/user-config.ts +1 -1
  470. package/src/user-intent/logger.ts +1 -1
  471. package/src/ux-sim/app-contract-secret-entropy.ts +164 -0
  472. package/src/ux-sim/fake-app-auth.ts +12 -11
  473. package/src/ux-sim/fake-app-db-world.ts +103 -0
  474. package/src/ux-sim/fake-app-storage.ts +1 -1
  475. package/src/ux-sim/fake-data-guard-boundary.ts +111 -0
  476. package/src/ux-sim/gate-roster-second-pool.ts +219 -0
  477. package/src/ux-sim/gate-shard-host-reroute.ts +14 -3
  478. package/src/ux-sim/install-consent-device.ts +8 -5
  479. package/src/ux-sim/mock-scenario-catalog.json +621 -30
  480. package/src/ux-sim/next-tui-seat-scenarios.ts +1 -1
  481. package/src/ux-sim/pod-reuse-shared-fake-boundary.ts +69 -0
  482. package/src/ux-sim/pod-reuse-world.ts +149 -0
  483. package/src/ux-sim/pr-land-drift-gate-device.ts +14 -0
  484. package/src/ux-sim/release-event-trace.ts +79 -0
  485. package/src/ux-sim/release-publish-devices.ts +43 -0
  486. package/src/ux-sim/release-sim-rig.ts +769 -89
  487. package/src/ux-sim/rla-event-response-scorecard.ts +275 -0
  488. package/src/ux-sim/warm-si-reuse-sim.ts +92 -23
  489. package/src/ux-sim/world-watch.ts +95 -0
  490. package/src/ux-sim/world.ts +90 -7
  491. package/src/version/packed-revision.json +1 -1
  492. package/src/voice/channel-adapters/discord-voice-channel-harness.ts +1 -1
  493. package/src/workflow-runtime/triggers/scheduler.ts +1 -1
  494. package/templates/event-landing-editorial/DESIGN.md +12 -0
  495. package/templates/next-app-translator/app/layout.tsx +15 -0
  496. package/templates/next-app-translator/app/page.tsx +16 -0
  497. package/templates/next-app-translator/app.yaml +67 -0
  498. package/templates/next-app-translator/next.config.ts +8 -0
  499. package/templates/next-app-translator/package.json +21 -0
  500. package/templates/next-app-voice-note/app.yaml +88 -0
  501. package/templates/next-app-voice-note/package.json +22 -0
  502. package/apps/pwa/out/_next/static/chunks/0e3e9261.84afa98360d3b889.js +0 -1
  503. package/apps/pwa/out/_next/static/chunks/1163.de587836684ae0e8.js +0 -74
  504. package/apps/pwa/out/_next/static/chunks/124-5c8fb000f2fef6fd.js +0 -1
  505. package/apps/pwa/out/_next/static/chunks/147.48bf376824f7df0a.js +0 -8
  506. package/apps/pwa/out/_next/static/chunks/1623-0cd4aabb94e3fc0d.js +0 -1
  507. package/apps/pwa/out/_next/static/chunks/1689-5ee3c3dd16ab8667.js +0 -1
  508. package/apps/pwa/out/_next/static/chunks/1968.4f77d6f940c26d94.js +0 -1
  509. package/apps/pwa/out/_next/static/chunks/1985.ab97a36d1b3a9458.js +0 -36
  510. package/apps/pwa/out/_next/static/chunks/2169.709268f6190a67e4.js +0 -1
  511. package/apps/pwa/out/_next/static/chunks/2215.90b2a595c9880580.js +0 -1
  512. package/apps/pwa/out/_next/static/chunks/2233.061c80f2a79abb24.js +0 -1
  513. package/apps/pwa/out/_next/static/chunks/2466.ff652b24ae9dee2a.js +0 -32
  514. package/apps/pwa/out/_next/static/chunks/2541-70d25b112ae1960d.js +0 -1
  515. package/apps/pwa/out/_next/static/chunks/2556-14a3c1858511d4b2.js +0 -1
  516. package/apps/pwa/out/_next/static/chunks/2592.cc0b9dc547aca123.js +0 -104
  517. package/apps/pwa/out/_next/static/chunks/2708-f51dd5bc56aed2a7.js +0 -1
  518. package/apps/pwa/out/_next/static/chunks/2856-d3c6d2706d6cc45e.js +0 -1
  519. package/apps/pwa/out/_next/static/chunks/2883-5b4aaa3950d416c2.js +0 -1
  520. package/apps/pwa/out/_next/static/chunks/3085.59001f746a9a2e8c.js +0 -1
  521. package/apps/pwa/out/_next/static/chunks/3162-94995e3e8f1524f3.js +0 -1
  522. package/apps/pwa/out/_next/static/chunks/3177-151f3b49f3b2d2ef.js +0 -1
  523. package/apps/pwa/out/_next/static/chunks/3196.4d0730f411899434.js +0 -1
  524. package/apps/pwa/out/_next/static/chunks/3235.7b9c3e9c55ea6d98.js +0 -1
  525. package/apps/pwa/out/_next/static/chunks/3414-037ce9f127904fe2.js +0 -1
  526. package/apps/pwa/out/_next/static/chunks/348.b77e8e6b6ed5230c.js +0 -1
  527. package/apps/pwa/out/_next/static/chunks/3501.d2b92806ac1d949e.js +0 -287
  528. package/apps/pwa/out/_next/static/chunks/3552.e6be7ac885976039.js +0 -1
  529. package/apps/pwa/out/_next/static/chunks/366-eb724714d15eb3f4.js +0 -1
  530. package/apps/pwa/out/_next/static/chunks/3700.422355522e15e182.js +0 -2
  531. package/apps/pwa/out/_next/static/chunks/3789.443ac3d6037b503c.js +0 -1
  532. package/apps/pwa/out/_next/static/chunks/4278.5624379f0c23ee3d.js +0 -1
  533. package/apps/pwa/out/_next/static/chunks/4365-9e2bea90e6243b8e.js +0 -1
  534. package/apps/pwa/out/_next/static/chunks/4530.3a14a074896302f2.js +0 -1
  535. package/apps/pwa/out/_next/static/chunks/4557-3b576c4706df592d.js +0 -1
  536. package/apps/pwa/out/_next/static/chunks/4793-a77c3acf9ffc4454.js +0 -1
  537. package/apps/pwa/out/_next/static/chunks/4806.d7a41078ec5f9e6f.js +0 -1
  538. package/apps/pwa/out/_next/static/chunks/4881.ad56fcbdcfb39a23.js +0 -1
  539. package/apps/pwa/out/_next/static/chunks/4983.cb812be748dd07e5.js +0 -1
  540. package/apps/pwa/out/_next/static/chunks/5054.cef07be26f74f202.js +0 -1
  541. package/apps/pwa/out/_next/static/chunks/5075.b30af8ae9aadc959.js +0 -226
  542. package/apps/pwa/out/_next/static/chunks/5464-5837a4fba34df983.js +0 -1
  543. package/apps/pwa/out/_next/static/chunks/5535-3d077c5296902ba6.js +0 -1
  544. package/apps/pwa/out/_next/static/chunks/5654.1b52dfa2ffb08352.js +0 -1
  545. package/apps/pwa/out/_next/static/chunks/6.aa2a99e9454c9a8d.js +0 -1
  546. package/apps/pwa/out/_next/static/chunks/6208.70eba139a9c68af3.js +0 -1
  547. package/apps/pwa/out/_next/static/chunks/6253.d4f0940b616f889d.js +0 -1
  548. package/apps/pwa/out/_next/static/chunks/6281-8492f70e843316fa.js +0 -1
  549. package/apps/pwa/out/_next/static/chunks/6289-3c8732cbeeeb62a2.js +0 -1
  550. package/apps/pwa/out/_next/static/chunks/6332-d5edcc5c35500524.js +0 -1
  551. package/apps/pwa/out/_next/static/chunks/6437.3cd4d04efb8ab871.js +0 -286
  552. package/apps/pwa/out/_next/static/chunks/6461-5584cf24a661817a.js +0 -1
  553. package/apps/pwa/out/_next/static/chunks/6618-9b8d9a46ede0c41e.js +0 -1
  554. package/apps/pwa/out/_next/static/chunks/6715-f1316dd169ff9f50.js +0 -1
  555. package/apps/pwa/out/_next/static/chunks/6735-e62669175cce8686.js +0 -1
  556. package/apps/pwa/out/_next/static/chunks/6937.0bdc3185f2ace9e4.js +0 -79
  557. package/apps/pwa/out/_next/static/chunks/712-4496b0c3ac3e4b75.js +0 -1
  558. package/apps/pwa/out/_next/static/chunks/7151.d2511e5f23155242.js +0 -1
  559. package/apps/pwa/out/_next/static/chunks/725.63b4017563b04379.js +0 -93
  560. package/apps/pwa/out/_next/static/chunks/7263-34fefd269746719c.js +0 -1
  561. package/apps/pwa/out/_next/static/chunks/77.b432098b663eb23e.js +0 -1
  562. package/apps/pwa/out/_next/static/chunks/770.f7b4481b25fe01c4.js +0 -148
  563. package/apps/pwa/out/_next/static/chunks/7959.4e02edd1fdf86b05.js +0 -1
  564. package/apps/pwa/out/_next/static/chunks/7974-b134a047264b1e55.js +0 -1
  565. package/apps/pwa/out/_next/static/chunks/8089-c13a0ed6973e7490.js +0 -1
  566. package/apps/pwa/out/_next/static/chunks/8231.297058c760d62aee.js +0 -1
  567. package/apps/pwa/out/_next/static/chunks/8427.085d79f7afbb3825.js +0 -149
  568. package/apps/pwa/out/_next/static/chunks/8473.20a465ef76441b50.js +0 -1
  569. package/apps/pwa/out/_next/static/chunks/8739-f0deba2b3e06427c.js +0 -1
  570. package/apps/pwa/out/_next/static/chunks/8818.02938c951b1000d1.js +0 -94
  571. package/apps/pwa/out/_next/static/chunks/8846.3103ace634243ee8.js +0 -64
  572. package/apps/pwa/out/_next/static/chunks/8847.72b1b3e33bcad95a.js +0 -1
  573. package/apps/pwa/out/_next/static/chunks/8883-30b5a763ec36eafa.js +0 -1
  574. package/apps/pwa/out/_next/static/chunks/9086.b691a72402d521d5.js +0 -27
  575. package/apps/pwa/out/_next/static/chunks/9133.0be4ebb6c50cd78a.js +0 -1
  576. package/apps/pwa/out/_next/static/chunks/916.3a04c642f0e5ff90.js +0 -1
  577. package/apps/pwa/out/_next/static/chunks/9240.1637f5e69335d06b.js +0 -62
  578. package/apps/pwa/out/_next/static/chunks/9298-cd7b117f1a5be480.js +0 -1
  579. package/apps/pwa/out/_next/static/chunks/9340-c2ac8651b03e94b2.js +0 -1
  580. package/apps/pwa/out/_next/static/chunks/9424.9062e8119fae997a.js +0 -24
  581. package/apps/pwa/out/_next/static/chunks/9486.8ef4e64969908842.js +0 -1
  582. package/apps/pwa/out/_next/static/chunks/9488.98d1b3c092da470a.js +0 -23
  583. package/apps/pwa/out/_next/static/chunks/9648-42f1d4648cfa7eb8.js +0 -1
  584. package/apps/pwa/out/_next/static/chunks/9781-946d591f1e66da8d.js +0 -1
  585. package/apps/pwa/out/_next/static/chunks/9844.72bbf73fd214af65.js +0 -90
  586. package/apps/pwa/out/_next/static/chunks/9868.027b845025f57183.js +0 -1
  587. package/apps/pwa/out/_next/static/chunks/9948-dbde92fff6625cad.js +0 -1
  588. package/apps/pwa/out/_next/static/chunks/9ccc18c7-87a6c1410d97d560.js +0 -1
  589. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-a76e282302331a47.js +0 -1
  590. package/apps/pwa/out/_next/static/chunks/app/approvals/page-9c79d56c52c3b39c.js +0 -1
  591. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-cd45c61031d63214.js +0 -1
  592. package/apps/pwa/out/_next/static/chunks/app/board/page-e133c057c3c62663.js +0 -1
  593. package/apps/pwa/out/_next/static/chunks/app/botlab/page-89ff7827ff5f449f.js +0 -1
  594. package/apps/pwa/out/_next/static/chunks/app/bots/page-0cd71686fa026045.js +0 -1
  595. package/apps/pwa/out/_next/static/chunks/app/ceo/page-a0b329a1295e9704.js +0 -1
  596. package/apps/pwa/out/_next/static/chunks/app/chat/page-f4b64283a86189e3.js +0 -1
  597. package/apps/pwa/out/_next/static/chunks/app/consult/page-c6567da3170d92b7.js +0 -1
  598. package/apps/pwa/out/_next/static/chunks/app/design-check/page-51dd1cfa869e3e9e.js +0 -1
  599. package/apps/pwa/out/_next/static/chunks/app/editor/page-734e98ce83fcb338.js +0 -1
  600. package/apps/pwa/out/_next/static/chunks/app/exec/page-0dbd78003825005e.js +0 -1
  601. package/apps/pwa/out/_next/static/chunks/app/field/page-d716d9e3eebe01c9.js +0 -1
  602. package/apps/pwa/out/_next/static/chunks/app/healthz/route-a76e282302331a47.js +0 -1
  603. package/apps/pwa/out/_next/static/chunks/app/inside/page-35ac985a392a23da.js +0 -1
  604. package/apps/pwa/out/_next/static/chunks/app/intake/page-8169a6d36aca9d00.js +0 -1
  605. package/apps/pwa/out/_next/static/chunks/app/layout-c07319ebc55c858f.js +0 -1
  606. package/apps/pwa/out/_next/static/chunks/app/live/page-e74b1236e3318957.js +0 -1
  607. package/apps/pwa/out/_next/static/chunks/app/live-run/page-f2d9e65f2fa34919.js +0 -1
  608. package/apps/pwa/out/_next/static/chunks/app/loops/page-e44e85553f3d1747.js +0 -1
  609. package/apps/pwa/out/_next/static/chunks/app/market/page-9786452dd87449f8.js +0 -1
  610. package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-c01f73b8ca382e89.js +0 -1
  611. package/apps/pwa/out/_next/static/chunks/app/morning/page-4ba4b24fc4aa2262.js +0 -1
  612. package/apps/pwa/out/_next/static/chunks/app/not-found-e4f1cff672c21cf5.js +0 -1
  613. package/apps/pwa/out/_next/static/chunks/app/observatory/page-7408295e90c5f3da.js +0 -1
  614. package/apps/pwa/out/_next/static/chunks/app/ops/release/page-4b40d62f2182addf.js +0 -1
  615. package/apps/pwa/out/_next/static/chunks/app/ops/resources/page-cbf974b1f9c988e2.js +0 -1
  616. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-e63ff6bd28f8c0c9.js +0 -1
  617. package/apps/pwa/out/_next/static/chunks/app/outputs/page-a9dd827a1ab83e4f.js +0 -1
  618. package/apps/pwa/out/_next/static/chunks/app/page-367850708c52c660.js +0 -1
  619. package/apps/pwa/out/_next/static/chunks/app/reflection/page-b1456fb9b51a4fd7.js +0 -1
  620. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-26867b3d37b1e7a8.js +0 -1
  621. package/apps/pwa/out/_next/static/chunks/app/sessions/page-82c9de5c8c37b051.js +0 -1
  622. package/apps/pwa/out/_next/static/chunks/app/settings/page-8b9f729cfc8ebc14.js +0 -1
  623. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-f2dec730b93abfab.js +0 -1
  624. package/apps/pwa/out/_next/static/chunks/app/setup/layout-a76e282302331a47.js +0 -1
  625. package/apps/pwa/out/_next/static/chunks/app/setup/page-fa6f33a05e473556.js +0 -1
  626. package/apps/pwa/out/_next/static/chunks/app/share/page-5e0e3113bfda415d.js +0 -1
  627. package/apps/pwa/out/_next/static/chunks/app/showroom/page-7864eff18ce702ba.js +0 -1
  628. package/apps/pwa/out/_next/static/chunks/app/term/page-cd2f7856a7dc4849.js +0 -1
  629. package/apps/pwa/out/_next/static/chunks/app/today/page-2de3d35eb5a86aae.js +0 -1
  630. package/apps/pwa/out/_next/static/chunks/app/trace/page-cdb70038ead4a184.js +0 -1
  631. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-fb97121241bc7cfc.js +0 -1
  632. package/apps/pwa/out/_next/static/chunks/app/workflows/page-3072b3b9e14ea04d.js +0 -1
  633. package/apps/pwa/out/_next/static/chunks/app/workspace/page-a976e10f6c3f82bd.js +0 -1
  634. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-dfbc7268ba631190.js +0 -1
  635. package/apps/pwa/out/_next/static/chunks/dc5145c8.9547e252e2e1d3d1.js +0 -1
  636. package/apps/pwa/out/_next/static/chunks/framework-5a93f9a572271e1c.js +0 -1
  637. package/apps/pwa/out/_next/static/chunks/main-1c2ba214755ef1d0.js +0 -1
  638. package/apps/pwa/out/_next/static/chunks/main-app-55b1247a78f22727.js +0 -1
  639. package/apps/pwa/out/_next/static/chunks/pages/_app-239264d5fa7469e1.js +0 -1
  640. package/apps/pwa/out/_next/static/chunks/pages/_error-8184168567215c6b.js +0 -1
  641. package/apps/pwa/out/_next/static/chunks/webpack-0144ea4a99833df5.js +0 -1
  642. package/apps/pwa/out/_next/static/css/32b8e1b8996dbf5e.css +0 -1
  643. package/apps/pwa/out/_next/static/iXeJzCRg0ENSSl_RTbGIN/_buildManifest.js +0 -1
  644. package/apps/pwa/out/_next/static/iXeJzCRg0ENSSl_RTbGIN/_ssgManifest.js +0 -1
  645. package/apps/pwa/out/autopilot/index.html +0 -1
  646. package/apps/pwa/out/autopilot/index.txt +0 -33
  647. package/apps/pwa/out/missions/placeholder/index.html +0 -1
  648. package/apps/pwa/out/missions/placeholder/index.txt +0 -30
  649. package/src/autopilot/build/build-status-label.ts +0 -19
  650. package/src/autopilot/mission-replay-decision.ts +0 -136
  651. package/src/cli/autopilot-cli.ts +0 -839
  652. package/src/cli/autopilot-run.ts +0 -176
  653. package/src/dashboard/auto-tts/auto-tts-controller.ts +0 -347
  654. package/src/dashboard/auto-tts/auto-tts-host-boot.ts +0 -162
  655. package/src/dashboard/auto-tts/pfc-voice-runtime.ts +0 -138
  656. package/src/dashboard/input/chat-main-submit-control.ts +0 -24
  657. package/src/dashboard/input/control-signal-consumers.ts +0 -46
  658. package/src/dashboard/input/dashboard-plain-turn-settle-sink.ts +0 -96
  659. package/src/dashboard/input/dictation-surface-allowlist.ts +0 -78
  660. package/src/dashboard/input/space-longpress-detector.ts +0 -311
  661. package/src/dashboard/input/voice-dictation.ts +0 -80
  662. package/src/dashboard/voice-chat/voice-chat-host-boot.ts +0 -418
  663. package/src/dashboard/voice-chat/voice-chat-mode-controller.ts +0 -148
  664. package/src/dashboard/voice-chat/voice-chat-pipeline.ts +0 -357
  665. package/src/dashboard/voice-host-boot.ts +0 -109
  666. package/src/dashboard/voice-input-host.ts +0 -540
  667. package/src/dashboard/voice-runtime.ts +0 -174
  668. package/src/domains/conatus-verify.ts +0 -466
  669. package/src/grounding/ensure-grounding.ts +0 -131
  670. package/src/input/turn-output-bundle.ts +0 -105
  671. package/src/intake-plane/ref-prefetch.ts +0 -110
  672. package/src/nexus/api/mission-showroom.ts +0 -182
  673. package/src/nexus/api/missions-emit.ts +0 -214
  674. package/src/nexus/api/missions.ts +0 -230
  675. package/src/seat-dispatch/seat-request-eligibility.ts +0 -19
  676. package/src/self-dev/external-call-zero.ts +0 -77
  677. package/src/self-implement/run-controls.ts +0 -74
  678. /package/src/{dashboard/auto-tts → voice/tts}/sentence-segmenter.ts +0 -0
@@ -396,8 +396,6 @@ import { resolveDashboardChatMainEntryPrelude } from './input/chat-main-entry-pr
396
396
  import { CHAT_MAIN_AUTO_ENTRY_KEY_NAME } from './input/entry-mode.js';
397
397
  import { resolveDashboardChatMainPostTurn } from './input/chat-main-post-turn.js';
398
398
  import { resolveDashboardChatMainSubmitIntent } from './input/chat-main-submit-route.js';
399
- import { maybeEmitDashboardSubmitQuickPass } from './input/chat-main-submit-control.js';
400
- import { attachDashboardQuickPassConsumers } from './input/control-signal-consumers.js';
401
399
  import { resolveDashboardChatMainSlashCommand } from './input/chat-main-slash-command.js';
402
400
  import { isClassicSigquitChord, registerClassicSigquitHandler } from './classic-sigquit.js';
403
401
  import { TuiChatPersonaSelection, tuiChatPersonaMessages } from './slash-runtime/chat-persona.js';
@@ -458,23 +456,8 @@ import {
458
456
  isChatMainInputForegroundActive,
459
457
  shouldAutoEnterChatMainInput,
460
458
  } from './input/chat-main-visibility.js';
461
- import { createDashboardVoiceRuntime } from './voice-runtime.js';
462
- import { setDaemonInputHost } from '../voice/daemon-input-host-singleton.js';
463
459
  import { defaultControlSignalBus } from '../input/control-signal.js';
464
460
  import { defaultControlSignalObserver } from '../input/control-signal-observer.js';
465
- import {
466
- bootDashboardVoiceHost,
467
- reportDashboardVoiceBootError,
468
- } from './voice-host-boot.js';
469
- import {
470
- bootDashboardAutoTts,
471
- } from './auto-tts/auto-tts-host-boot.js';
472
- import {
473
- bootDashboardVoiceChat,
474
- handleVoiceChatSlash,
475
- toggleVoiceChatRealtime,
476
- } from './voice-chat/voice-chat-host-boot.js';
477
- import { describeVoiceChatPhase } from './voice-chat/voice-chat-mode-controller.js';
478
461
  import { hasOverlayInputOwner } from './input/overlay-input.js';
479
462
  import { deriveInputOwnershipSnapshot } from './input/input-owner.js';
480
463
  import { createDashboardInputPrefixState } from './input/input-prefix-state.js';
@@ -798,7 +781,6 @@ import {
798
781
  getUserConfig, reloadUserConfig, saveUserConfig,
799
782
  rotateNextProvider, jumpToRotationEntry, rotationEntryLabel, applyRotationEntry,
800
783
  resolveAcpHopCapFromConfig, resolveTuiUnattended,
801
- VOICE_HARDCODED_DEFAULTS,
802
784
  } from '../user-config.js';
803
785
  import { streamLLM, anyProviderAvailable, getProviderForConfig, nextReasoningLevel, reasoningLevelLabel, effectiveReasoningLevel, modelSupportsReasoning, type LLMMessage, type LLMToolSpec } from '../llm.js';
804
786
  import { currentRouteDecision, formatRouteDecisionSummary } from '../llm/route-decision.js';
@@ -816,10 +798,6 @@ import { runNexusShow, type NexusShowResult } from '../cli/nexus-show.js';
816
798
  import {
817
799
  type GitSegmentState,
818
800
  } from '../status/bar.js';
819
- // PR-S1V.5 — voice month-to-date USD pill on the secondary status row.
820
- // The tracker is process-wide so the same singleton is read here and
821
- // updated by `voice-input-bridge.transcribe` (TUI path) + daemon REST
822
- // handler (PWA path).
823
801
  import { createDashboardMouseWiring } from './input/mouse-wiring.js';
824
802
  import { createMouseConversationPopupRuntime } from './input/mouse-conversation-popup-runtime.js';
825
803
  import { createMouseModalHitRuntime } from './input/mouse-modal-hit-runtime.js';
@@ -948,7 +926,6 @@ import {
948
926
  type CaretContextStore,
949
927
  } from './terminal/caret-context-store.js';
950
928
  import { createPfcMouseActionRuntime, type PfcMouseActionRuntime } from './terminal/pfc-mouse-action-runtime.js';
951
- import { createPfcVoiceRuntime, type PfcVoiceRuntime } from './auto-tts/pfc-voice-runtime.js';
952
929
  import { createPfcScreenshotAttacher, type PfcScreenshotAttacher } from '../conductor/pfc-screenshot-attachment.js';
953
930
  import { createStatusShellPostureRuntime } from './status-shell-posture-runtime.js';
954
931
  import { createTerminalHostFacade } from '../shell-runner/terminal-host-facade.js';
@@ -1501,23 +1478,6 @@ import { listSessionCards } from '../session/card.js';
1501
1478
  // on the manager singleton so production code shares one registry
1502
1479
  // instance across the dispatcher, the sidebar, and LLM tools.
1503
1480
  import { globalDualRoleManager, setAcpHopCapResolver } from '../acp/dual-role-manager.js';
1504
- // PR-S1V.4-wiring (sprint 21-Parallel-Voice · 2026-04-29) — voice input.
1505
- // Boot the STTProvider lazily (gated on OPENAI_API_KEY) and wire the
1506
- // voice-input host into the priority key route + status bar. PLAN
1507
- // canonical: PLAN-voice-wiring-s1v4w-2026-04-29.md.
1508
- import { globalAcpEventRouter } from '../acp/event-router.js';
1509
- import { createSTTProvider } from '../voice/stt-provider.js';
1510
- import {
1511
- createVoiceInputHost,
1512
- type VoiceInputHost,
1513
- } from './voice-input-host.js';
1514
- import {
1515
- createSpaceLongPressDetector,
1516
- isDictationHoldKey,
1517
- isPlainSpaceHoldKey,
1518
- type SpaceLongPressDetector,
1519
- } from './input/space-longpress-detector.js';
1520
- import { isAllowlistedDictationSurface } from './input/dictation-surface-allowlist.js';
1521
1481
  import { createDashboardExternalInputHost, stopTurnViaEscGate, updateDashboardExternalInputQueueNotice } from './input/external-input-host.js';
1522
1482
  import { registerTuiForceStopHandler } from '../capture/tui-self-report.js';
1523
1483
  import { createInlineAskUserQuestionResolver, resolveUnattendedInlineChoiceTimeoutMs, UNATTENDED_INLINE_CHOICE_TIMEOUT_MS } from '../ask-user-question/index.js';
@@ -3603,7 +3563,7 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
3603
3563
  const hud = createHud();
3604
3564
 
3605
3565
  // Reasoning HUD segment — provider-agnostic emoji + label that
3606
- // sits in the top transient HUD row (next to voice / streaming
3566
+ // sits in the top transient HUD row (next to streaming
3607
3567
  // indicators), NOT the bottom status bar. Capability-driven: pill
3608
3568
  // auto-shows for reasoning-capable models (gpt-5 family + claude-4
3609
3569
  // / 3.7) at the model's effective level. Models that don't support
@@ -3756,12 +3716,6 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
3756
3716
  layoutMode: conversationSnapshot.layoutMode,
3757
3717
  },
3758
3718
  mode: inputCoreActiveMode(), // A1 — ◆ mode pill (sync/control)
3759
- // experiment/voice-chat-realtime-rebind — voice / dictation /
3760
- // voice-chat indicators are unified into the HUD `voice-state`
3761
- // segment (see hud.setSegment calls in onIndicatorChange and
3762
- // dashboardVoiceChat.onPhaseChange). The status-bar pill is
3763
- // intentionally null so we don't render the same state twice.
3764
- voiceLabel: null,
3765
3719
  runningBuild: runningBuildStatus(),
3766
3720
  theme,
3767
3721
  });
@@ -3877,32 +3831,38 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
3877
3831
  const { getShellRegistry: pfcGetShellRegistry } = await import(
3878
3832
  '../shell-runner/registry.js'
3879
3833
  );
3880
- // V1 + X4 (Bundle 2) — late-bound voice + screenshot attachment.
3881
- // Both runtimes depend on resources (auto-tts controller +
3882
- // dispatchScreenshot import) that come up later in boot. The PFC
3883
- // feedback runtime forwards `onNotification` to these refs so V1
3884
- // / X4 attach without re-plumbing the T1 boot order.
3885
- const pfcVoiceRuntimeRef: { current: PfcVoiceRuntime | null } = { current: null };
3834
+ // X4 (Bundle 2) — late-bound screenshot attachment.
3886
3835
  const pfcScreenshotAttacherRef: { current: PfcScreenshotAttacher | null } = { current: null };
3836
+ // ── X4 (Bundle 2) — PFC auto-screenshot attachment ──
3837
+ // Screenshot capture is independent of dashboard voice support.
3838
+ // Opt-in via `ELANOUS_PFC_AUTO_SCREENSHOT=1`.
3839
+ if (process.env.ELANOUS_PFC_AUTO_SCREENSHOT === '1') {
3840
+ const { dispatchScreenshot: pfcDispatchScreenshot } = await import(
3841
+ '../capture/capture-tools.js'
3842
+ );
3843
+ pfcScreenshotAttacherRef.current = createPfcScreenshotAttacher({
3844
+ resolveScreenshotTarget: () => null,
3845
+ dispatchScreenshot: async (args) => {
3846
+ const out = await pfcDispatchScreenshot(args);
3847
+ return {
3848
+ ...(out.bodyBase64 !== undefined ? { bodyBase64: out.bodyBase64 } : {}),
3849
+ ...(out.bytes !== undefined ? { bytes: out.bytes } : {}),
3850
+ ...(out.note !== undefined ? { note: out.note } : {}),
3851
+ };
3852
+ },
3853
+ logDebug: (category, event, data) => debug.log(category, event, data),
3854
+ });
3855
+ }
3856
+ // Install the optional screenshot sink before the watcher subscribes,
3857
+ // so the first shell notification cannot race ahead of its setup.
3887
3858
  const pfcFeedbackRuntime = createDashboardPfcFeedbackRuntime({
3888
3859
  registry: pfcGetShellRegistry(),
3889
3860
  pushChatLine: (line) => { pushChatLine(C.muted(line)); },
3890
3861
  enabled: pfcReverseFeedbackEnabled,
3891
3862
  logDebug: (category, event, data) => debug.log(category, event, data),
3892
3863
  onNotification: (notification) => {
3893
- // X4 attaches first (async screenshot capture inside its own
3894
- // budget), then V1 fires voice on the augmented notification.
3895
3864
  const attacher = pfcScreenshotAttacherRef.current;
3896
- const voice = pfcVoiceRuntimeRef.current;
3897
- if (!attacher && !voice) return;
3898
- const finalize = (final: typeof notification): void => {
3899
- try { voice?.onNotification(final); } catch { /* isolate */ }
3900
- };
3901
- if (attacher) {
3902
- void attacher.attach(notification).then(finalize, () => finalize(notification));
3903
- } else {
3904
- finalize(notification);
3905
- }
3865
+ if (attacher) void attacher.attach(notification).catch(() => {});
3906
3866
  },
3907
3867
  });
3908
3868
  if (debug.enabled) {
@@ -5322,536 +5282,8 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
5322
5282
  draw: () => { draw(); },
5323
5283
  });
5324
5284
 
5325
- // ── PR-S1V.4-wiring · Voice input host (2026-04-29) ────────────────
5326
- //
5327
- // Lazy boot: only construct the STTProvider + host when the user has
5328
- // an OpenAI key set. Without one the host stays `null` and the
5329
- // priority-route deps below short-circuit so voice paths are entirely
5330
- // inactive (no kitty toggles, no key swallowing). Production users
5331
- // opt in by exporting OPENAI_API_KEY before launching elanous. Status
5332
- // bar segment also stays empty because `voiceIndicatorLabel` never
5333
- // transitions away from null.
5334
- //
5335
- // PLAN §4.5 — resolveSession is alias-normalized via BRAND_ALIASES so
5336
- // "claude" voice prefix matches a "claude-code" launch brand. Focused
5337
- // fallback uses (a) conversationPopupHost.snapshot().focusedSessionId
5338
- // and (c) the focused VW pane → findLiveSessionByPaneId chain. When
5339
- // both miss the resolveSession returns null and the bridge drops the
5340
- // transcript with reason='no-stream'.
5341
- //
5342
- // PLAN §4.5 — submitToSession is transport-aware: embodied PTY
5343
- // sessions go through `entry.session.send` with the reply.ts:150
5344
- // newline append pattern. ACP live sessions echo via
5345
- // `globalAcpEventRouter().noteUserSubmit` then `clientSessionSend`
5346
- // (matching the chat input submit pattern in vw-live-bridge.ts:325).
5347
- let voiceInputHost: VoiceInputHost | null = null;
5348
- let voiceIndicatorLabel: string | null = null;
5349
- let voiceUnsubscribeIndicator: (() => void) | null = null;
5350
- // PR-S1V.D4 (2026-04-29) — long-press Space dictation detector. Runs
5351
- // alongside the voice host but mutually exclusive (one sox subprocess
5352
- // at a time, enforced by `host.startDictation` returning false when
5353
- // voice mode is active). The detector reconstructs hold/release from
5354
- // the OS key-repeat stream so a long Space hold becomes dictation
5355
- // without depending on kitty `>3u` release events at idle. resolveSession
5356
- // / submitToSession / dictateTranscript live in `createDashboardVoiceRuntime`
5357
- // (extracted from this file in the dashboard refactor); the detector
5358
- // wires the host startDictation/stopDictation pair only.
5359
- let voiceLongPressDetector: SpaceLongPressDetector | null = null;
5360
- // TEMP DEBUG TRIAL (2026-04-29 · fix/voice-runtime-tdz-2) — toggle-mode
5361
- // dictation chord. Bypasses the long-press detector entirely for the
5362
- // trial chord (Ctrl+Shift+D). First press starts dictation, second
5363
- // press stops. Debounce ignores OS auto-repeat keystrokes from
5364
- // pile-up-toggling within ~300 ms. Plain Space (Branch 2) keeps the
5365
- // detector path so we can A/B compare both UX patterns in dogfood.
5366
- let lastDictationToggleAt = 0;
5367
- const DICTATION_TOGGLE_DEBOUNCE_MS = 300;
5368
- function toggleDictationFromChord(source: string, keyName: string | undefined): boolean {
5369
- if (!voiceInputHost) {
5370
- if (debug.enabled) debug.log('voice.toggle.skip', 'no-host', { source, keyName });
5371
- return false;
5372
- }
5373
- if (voiceInputHost.getState().kind !== 'idle') {
5374
- if (debug.enabled) {
5375
- debug.log('voice.toggle.skip', 'voice-mode-active', {
5376
- source, keyName, voiceState: voiceInputHost.getState().kind,
5377
- });
5378
- }
5379
- return false;
5380
- }
5381
- const nowMs = Date.now();
5382
- const sinceLast = nowMs - lastDictationToggleAt;
5383
- if (sinceLast < DICTATION_TOGGLE_DEBOUNCE_MS) {
5384
- if (debug.enabled) {
5385
- debug.log('voice.toggle.debounced', 'os-repeat', {
5386
- source, keyName, sinceLast, debounceMs: DICTATION_TOGGLE_DEBOUNCE_MS,
5387
- });
5388
- }
5389
- return false;
5390
- }
5391
- lastDictationToggleAt = nowMs;
5392
- const dictState = voiceInputHost.getDictationState();
5393
- if (dictState === 'idle') {
5394
- const ok = voiceInputHost.startDictation();
5395
- if (debug.enabled) debug.log('voice.toggle.start', source, { keyName, ok });
5396
- } else if (dictState === 'recording') {
5397
- void voiceInputHost.stopDictation();
5398
- if (debug.enabled) debug.log('voice.toggle.stop', source, { keyName, dictState });
5399
- } else {
5400
- if (debug.enabled) {
5401
- debug.log('voice.toggle.skip', 'processing', { source, keyName, dictState });
5402
- }
5403
- }
5404
- return true;
5405
- }
5406
- const voiceRuntime = createDashboardVoiceRuntime({
5407
- listLiveSessions: listLiveEmbodiedSessions,
5408
- findLiveSessionById,
5409
- findLiveSessionByPaneId,
5410
- getFocusedConversationSessionId: () => conversationPopupHost.snapshot().focusedSessionId,
5411
- getFocusedVirtualWindowPane: () => ({ vwId: null, paneId: null, paneKind: null }),
5412
- noteUserSubmit: (sessionId, text) => globalAcpEventRouter().noteUserSubmit(sessionId, text),
5413
- clientSessionSend: (opts) => globalDualRoleManager().clientSessionSend(opts),
5414
- getWorkingFocus: () => workingDir.focus,
5415
- getChatMainInputVisibilityState: () => chatMainInputVisibilityState(),
5416
- chatMainPromptLive: () => typeof promptCtl.insertAtCursor === 'function',
5417
- insertIntoChatMainPrompt: (text) => {
5418
- promptCtl.insertAtCursor?.(text);
5419
- },
5420
- appendInputPrefixInline: (text) => inputPrefixState.appendInline(text),
5421
- // Lazy wrappers — `applyFocusToInputTransition` is `const`-declared
5422
- // further down (~line 6896), so a shorthand reference here triggers
5423
- // a TDZ ReferenceError when `createDashboardVoiceRuntime` evaluates
5424
- // its deps object during boot. The arrow defers the name lookup
5425
- // until dictation actually runs — by that time the dashboard scope
5426
- // is fully initialized. `draw` is a `let` placeholder at line 2475
5427
- // that's later reassigned (~10665); the shorthand would otherwise
5428
- // capture the placeholder no-op so dictation-driven redraws never
5429
- // ran. Same lazy lookup fixes both.
5430
- applyFocusToInputTransition: (transition) => applyFocusToInputTransition(transition),
5431
- setPendingInputEntryModePlain: () => focusTransitionState.setPendingInputEntryMode('plain'),
5432
- draw: () => draw(),
5433
- });
5434
- // 2026-04-30 — expose dictateTranscript for the PWA voice
5435
- // `tui-bridge` dispatch mode. When the daemon and dashboard share a
5436
- // process (e.g. `elanous start --http-port`), users with
5437
- // `voice.pwa.dispatch: 'tui-bridge'` will see their phone transcripts
5438
- // injected into the focused dashboard input via this hook. The
5439
- // singleton stays unset in dashboard-less daemons (`elanous serve`),
5440
- // and the dispatcher short-circuits gracefully there.
5441
- setDaemonInputHost({
5442
- dictateTranscript: (text: string) => voiceRuntime.dictateTranscript(text),
5443
- });
5444
- // Phase 2 auto-TTS — config priority: user-config > env > default.
5445
- // Provider is created lazily on first sentence so a missing
5446
- // OPENAI_API_KEY (or absence of any TTS dep) doesn't crash the
5447
- // dashboard for users who never opt in.
5448
- const dashboardAutoTts = (() => {
5449
- const voiceCfg = getUserConfig().voice;
5450
- return bootDashboardAutoTts({
5451
- ...(voiceCfg.tts.provider ? { providerId: voiceCfg.tts.provider } : {}),
5452
- ...(typeof voiceCfg.tts.auto === 'boolean' ? { initiallyEnabled: voiceCfg.tts.auto } : {}),
5453
- ...(typeof voiceCfg.tts.maxSentenceChars === 'number'
5454
- ? { maxSentenceChars: voiceCfg.tts.maxSentenceChars }
5455
- : {}),
5456
- });
5457
- })();
5458
- // ── V1 (Bundle 2) — PFC voice TTS report ──
5459
- // Wires the PFC notification sink to the auto-tts controller. Opt-in
5460
- // via `ELANOUS_PFC_VOICE_REPORT=1` so first dogfood doesn't surprise.
5461
- pfcVoiceRuntimeRef.current = createPfcVoiceRuntime({
5462
- getController: () => dashboardAutoTts.controller,
5463
- initiallyEnabled: process.env.ELANOUS_PFC_VOICE_REPORT === '1',
5464
- logDebug: (category, event, data) => debug.log(category, event, data),
5465
- });
5466
- // ── X4 (Bundle 2) — PFC auto-Screenshot attachment ──
5467
- // Async PNG capture for screenshot-capable surfaces; result attached
5468
- // to the PfcReverseFeedbackNotification before downstream sinks
5469
- // (voice + future vision LLM proposers in Bundle 3 X7) consume it.
5470
- // Opt-in via `ELANOUS_PFC_AUTO_SCREENSHOT=1`.
5471
- if (process.env.ELANOUS_PFC_AUTO_SCREENSHOT === '1') {
5472
- const { dispatchScreenshot: pfcDispatchScreenshot } = await import(
5473
- '../capture/capture-tools.js'
5474
- );
5475
- pfcScreenshotAttacherRef.current = createPfcScreenshotAttacher({
5476
- resolveScreenshotTarget: () => null,
5477
- dispatchScreenshot: async (args) => {
5478
- const out = await pfcDispatchScreenshot(args);
5479
- return {
5480
- ...(out.bodyBase64 !== undefined ? { bodyBase64: out.bodyBase64 } : {}),
5481
- ...(out.bytes !== undefined ? { bytes: out.bytes } : {}),
5482
- ...(out.note !== undefined ? { note: out.note } : {}),
5483
- };
5484
- },
5485
- logDebug: (category, event, data) => debug.log(category, event, data),
5486
- });
5487
- }
5488
- if (debug.enabled) {
5489
- debug.log('pfc.bundle2.boot', 'ready', {
5490
- voiceReport: pfcVoiceRuntimeRef.current.isEnabled(),
5491
- autoScreenshot: pfcScreenshotAttacherRef.current !== null,
5492
- });
5493
- }
5494
5285
  const dashboardControlSignals = defaultControlSignalBus();
5495
- // Phase 4 voice-chat — late-bound submit closure. The actual
5496
- // dispatch helper (dispatchAcpSend) is defined inside the input
5497
- // loop, so we hold a mutable reference and bind it on every iter.
5498
- let voiceChatSubmitImpl: ((text: string) => void) | null = null;
5499
- // Voice-chat error display — three surfaces fire in concert:
5500
- // 1. HUD `voice-error` segment (3s banner) — distinct emoji + color
5501
- // so the user can tell at a glance the system is in error state,
5502
- // not normal idle/listening.
5503
- // 2. chatLines warning — permanent record (user can scroll back).
5504
- // 3. Toast popup (bottom-right transient, 5s) — separate surface
5505
- // so the user notices even if their attention isn't on the HUD.
5506
- // The `voice-error` segment uses 🔴 + "ERROR" prefix so it is
5507
- // unmistakably an error state (not the same accent ⚠ as the
5508
- // chord-toggle mutex warning, which is a softer "rejected" message).
5509
- let voiceErrorTimer: ReturnType<typeof setTimeout> | null = null;
5510
- const showVoiceError = (err: Error): void => {
5511
- const summary = err.message.length > 120
5512
- ? err.message.slice(0, 117) + '…'
5513
- : err.message;
5514
- // 1. chatLines — permanent record.
5515
- chatLines.push('');
5516
- chatLines.push(C.error(`🔴 [voice-chat ERROR] ${summary}`));
5517
- chatScrollOffset = -1;
5518
- // 2. HUD — error state distinct from any normal phase color.
5519
- setSegment(hud, 'voice-error', C.error(`🔴 voice ERROR · ${summary}`), 7);
5520
- if (voiceErrorTimer) clearTimeout(voiceErrorTimer);
5521
- voiceErrorTimer = setTimeout(() => {
5522
- clearSegment(hud, 'voice-error');
5523
- voiceErrorTimer = null;
5524
- requestDashboardRender();
5525
- }, 3000);
5526
- // 3. Toast popup — bottom-right, 5s. Separate group so it doesn't
5527
- // collide with regular toast notifications. Lines wrapped at ~52
5528
- // cells (toast max is 56). Long messages split across lines.
5529
- try {
5530
- const { cols: tc, rows: tr } = termSize();
5531
- const wrapAt = 52;
5532
- const lines: string[] = [];
5533
- let remaining = summary;
5534
- while (remaining.length > wrapAt) {
5535
- lines.push(remaining.slice(0, wrapAt));
5536
- remaining = remaining.slice(wrapAt);
5537
- }
5538
- if (remaining) lines.push(remaining);
5539
- lines.push('');
5540
- lines.push('ESC to dismiss');
5541
- showToast({
5542
- title: '🔴 voice-chat ERROR',
5543
- lines,
5544
- coordinator: display,
5545
- termCols: tc,
5546
- termRows: tr,
5547
- ttlMs: 5000,
5548
- group: 'voice-error',
5549
- });
5550
- } catch (showErr) {
5551
- if (debug.enabled)
5552
- debug.log('voice.chat.error', 'toast.exception', {
5553
- err: showErr instanceof Error ? showErr.message : String(showErr),
5554
- }, { level: 'error' });
5555
- }
5556
- requestDashboardRender();
5557
- };
5558
- attachDashboardQuickPassConsumers({
5559
- signalBus: dashboardControlSignals,
5560
- cancelOutput: () => dashboardAutoTts.hooks.cancel(),
5561
- onConsumed: ({ kind, urgency, surface }) => {
5562
- if (debug.enabled) {
5563
- debug.log('input.control', 'quick-pass.consume', {
5564
- signalKind: kind,
5565
- urgency,
5566
- surface,
5567
- });
5568
- }
5569
- },
5570
- onError: ({ kind }, err) => {
5571
- if (debug.enabled) {
5572
- debug.log('input.control', 'quick-pass.consume.error', {
5573
- signalKind: kind,
5574
- error: err instanceof Error ? err.message : String(err),
5575
- }, { level: 'error' });
5576
- }
5577
- },
5578
- });
5579
- function emitVoiceChatStopQuickPass(reason: 'esc' | 'alt-s' | 'barge-in'): void {
5580
- dashboardControlSignals.emit({
5581
- kind: 'voice-chat-stop',
5582
- urgency: 'quick-pass',
5583
- source: 'system',
5584
- mayPreempt: true,
5585
- scope: { surface: 'voice-chat', channel: 'dashboard' },
5586
- payload: {
5587
- reason,
5588
- phase: dashboardVoiceChat.controller.getPhase(),
5589
- },
5590
- });
5591
- }
5592
- // Voice user-config snapshot at boot. Each field is sparse —
5593
- // only present when the user explicitly set it in config.json.
5594
- // host-boot sees `undefined` and falls back to env (backward
5595
- // compat) → hardcoded default.
5596
- const voiceCfgAtBoot = getUserConfig().voice;
5597
- const dashboardVoiceChat = bootDashboardVoiceChat({
5598
- ...(voiceCfgAtBoot.stt.provider ? { providerId: voiceCfgAtBoot.stt.provider } : {}),
5599
- ...(voiceCfgAtBoot.vad.mode ? { vadMode: voiceCfgAtBoot.vad.mode } : {}),
5600
- ...(typeof voiceCfgAtBoot.chat.multiTurn === 'boolean'
5601
- ? { multiTurn: voiceCfgAtBoot.chat.multiTurn }
5602
- : {}),
5603
- ...((typeof voiceCfgAtBoot.vad.threshold === 'number'
5604
- || typeof voiceCfgAtBoot.vad.silenceMs === 'number'
5605
- || typeof voiceCfgAtBoot.vad.minSpeechMs === 'number')
5606
- ? {
5607
- vadOpts: {
5608
- ...(typeof voiceCfgAtBoot.vad.threshold === 'number'
5609
- ? { threshold: voiceCfgAtBoot.vad.threshold } : {}),
5610
- ...(typeof voiceCfgAtBoot.vad.silenceMs === 'number'
5611
- ? { silenceMs: voiceCfgAtBoot.vad.silenceMs } : {}),
5612
- ...(typeof voiceCfgAtBoot.vad.minSpeechMs === 'number'
5613
- ? { minSpeechMs: voiceCfgAtBoot.vad.minSpeechMs } : {}),
5614
- },
5615
- }
5616
- : {}),
5617
- submitTranscript: (text) => {
5618
- // 2026-04-30 — UX revision: route the transcript through D5
5619
- // PTT's `dictateTranscript` so the user SEES their words in
5620
- // the chat input, but DON'T auto-submit in single-turn mode.
5621
- // User feedback: "열심히 받아 적은 보이스 텍스트가 ctrl+l 다시
5622
- // 인풋 모드 들어가자 마자 클리어 되버렸어요." — the previous
5623
- // double-action (inject + submit) raced with the input pane's
5624
- // ESC handler and made the text disappear when the user tried
5625
- // to exit.
5626
- //
5627
- // Phase transition policy (post-2026-04-30 host-boot change):
5628
- // - single-turn OFF → dictate to the input buffer, then
5629
- // controller.exit so the user owns submit timing.
5630
- // - multi-turn ON → delegate to `voiceChatSubmitImpl`. That
5631
- // closure decides between (a) sticky-armed auto-submit
5632
- // (transition → speaking) vs (b) sticky-less plain
5633
- // auto-submit via the textInput host's external submit
5634
- // hook.
5635
- // - multi-turn OFF (single-turn default) → controller.exit
5636
- // so HUD clears; user reads transcript + presses Enter
5637
- // for a normal LLM turn.
5638
- if (dashboardVoiceChat.multiTurn && voiceChatSubmitImpl) {
5639
- voiceChatSubmitImpl(text);
5640
- return;
5641
- }
5642
- try { voiceRuntime.dictateTranscript(text); } catch { /* ignore */ }
5643
- // Single-turn (or multi-turn pre-init) — voice-chat ends here;
5644
- // the user owns submit timing via the chat input.
5645
- try { dashboardVoiceChat.controller.exit('user-cancel'); } catch { /* ignore */ }
5646
- },
5647
- onPartialTranscript: (text) => {
5648
- if (debug.enabled)
5649
- debug.log('voice.chat.partial', 'tick', { snip: text.slice(0, 60) });
5650
- },
5651
- onBargeIn: () => {
5652
- emitVoiceChatStopQuickPass('barge-in');
5653
- },
5654
- onError: showVoiceError,
5655
- onPhaseChange: (next, prev) => {
5656
- // experiment/voice-chat-realtime-rebind — phase indicator goes
5657
- // to the HUD status bar segment ONLY (NOT chatLines). The chat
5658
- // log shows just start + end events (pushed by the chord/ESC
5659
- // handlers) so it stays uncluttered; the HUD carries the
5660
- // moment-to-moment phase. Each phase has a distinct emoji +
5661
- // color in the HUD.
5662
- //
5663
- // inactive → segment cleared (no indicator)
5664
- // listening → 🎙 voice · 듣는 중 (accent · prominent)
5665
- // processing → 💭 voice · 생각 중 (info)
5666
- // speaking → 🗣 voice · 말하는 중 (success · green)
5667
- // stopping → ⏹ voice · 정리 (muted · fading)
5668
- //
5669
- // priority 6 puts it above the agent-activity segment (3) but
5670
- // below the copied/toast segments (10) so it never hides the
5671
- // higher-priority transient banners.
5672
- if (next === 'inactive') {
5673
- // Don't wipe a fresh dictation indicator if D5 voice mode is
5674
- // also active mid-transition (mutex normally prevents this,
5675
- // but the race window is real during exit cleanup).
5676
- if (voiceIndicatorLabel === null) {
5677
- clearSegment(hud, 'voice-state');
5678
- }
5679
- // 2026-04-30 — sync pipeline lifecycle with controller.
5680
- //
5681
- // Several controller.exit call sites (single-turn submitTranscript
5682
- // dictate-only, voiceChatSubmitImpl dictate-fallback, error
5683
- // recovery in onFinalTranscript catch) used to flip the
5684
- // controller to `inactive` WITHOUT calling pipeline.cancel().
5685
- // That left `pipeline.listening = true` + the STT WebSocket
5686
- // session + the sox capture subprocess alive as residue.
5687
- // Next `Alt+R` enter then hit pipeline.startListening's guard
5688
- // (`if (listening) return false`) and the toggle reported
5689
- // "voice-chat: failed to start listening — check audio device
5690
- // + STT provider" with no real cause.
5691
- //
5692
- // Rather than patch every exit call site, we hook the
5693
- // pipeline cleanup to the controller's terminal phase: the
5694
- // controller is the source of truth for "voice-chat is over",
5695
- // and pipeline.cancel() is idempotent (its own guard at
5696
- // line 264 returns early when nothing is live), so this
5697
- // wire is safe even when an explicit cancel already ran
5698
- // (handleEsc / toggleVoiceChatRealtime exit path).
5699
- try {
5700
- void dashboardVoiceChat.pipeline.cancel();
5701
- } catch (err) {
5702
- if (debug.enabled)
5703
- debug.log('voice.chat.error', 'inactive.pipeline.cancel.exception', {
5704
- err: err instanceof Error ? err.message : String(err),
5705
- }, { level: 'error' });
5706
- }
5707
- } else {
5708
- type Spec = { emoji: string; label: string; color: (s: string) => string };
5709
- const specs: Record<Exclude<typeof next, 'inactive'>, Spec> = {
5710
- listening: { emoji: '🎙', label: '듣는 중', color: C.accent },
5711
- processing: { emoji: '💭', label: '생각 중', color: C.info },
5712
- speaking: { emoji: '🗣', label: '말하는 중', color: C.success },
5713
- stopping: { emoji: '⏹', label: '정리', color: C.muted },
5714
- };
5715
- const spec = specs[next];
5716
- setSegment(hud, 'voice-state', spec.color(`${spec.emoji} voice · ${spec.label}`), 6);
5717
- }
5718
- requestDashboardRender();
5719
- // Phase transition trail. Always-on (gated by debug.enabled) so
5720
- // a freeze report can be diagnosed from log/latest alone.
5721
- if (debug.enabled) {
5722
- debug.log('voice.chat.phase', next, {
5723
- prev,
5724
- desc: describeVoiceChatPhase(next) || null,
5725
- ts: new Date().toISOString(),
5726
- });
5727
- }
5728
- },
5729
- });
5730
- // Boot snapshot — env vars governing voice-chat behavior. One log
5731
- // line per dashboard boot so support sessions can compare expected
5732
- // vs actual without grepping multiple categories.
5733
- if (debug.enabled) {
5734
- debug.log('voice.chat.boot', 'env', {
5735
- vad: process.env.ELANOUS_VOICE_VAD || '(default:server)',
5736
- multiTurn: process.env.ELANOUS_VOICE_CHAT_MULTI_TURN || '(default:off)',
5737
- autoTts: process.env.ELANOUS_AUTO_TTS || '(default:off)',
5738
- sttProvider: process.env.STREAMING_STT_PROVIDER || '(default:openai-realtime-stt)',
5739
- ttsProvider: process.env.TTS_PROVIDER || '(default:openai-tts)',
5740
- providerId: dashboardVoiceChat.providerId,
5741
- hasOpenaiKey: !!process.env.OPENAI_API_KEY,
5742
- });
5743
- }
5744
- if (process.env.OPENAI_API_KEY) {
5745
- void (async () => {
5746
- try {
5747
- const booted = await bootDashboardVoiceHost({
5748
- voiceRuntime,
5749
- createSttProvider: () => createSTTProvider({ id: 'openai-whisper' }),
5750
- createVoiceInputHost: (deps) => createVoiceInputHost(deps),
5751
- createLongPressDetector: (deps) => createSpaceLongPressDetector(deps),
5752
- onIndicatorChange: (label) => {
5753
- voiceIndicatorLabel = label;
5754
- // experiment/voice-chat-realtime-rebind — D5 voice/dictation
5755
- // state now flows into the same HUD segment as voice-chat
5756
- // continuous mode. Single source of truth for "what is
5757
- // elanous doing with audio right now".
5758
- //
5759
- // label === null → segment cleared
5760
- // label like "🎤 hold…" → dictation pending
5761
- // label like "🎙 0.8s" → recording in progress
5762
- // label like "💭 STT" → processing
5763
- //
5764
- // The voice-chat-mode-controller writes to the same key
5765
- // (priority 6) when Alt+R is active. Mutex between D5 voice
5766
- // and voice-chat is enforced upstream so the two sources
5767
- // never overlap; whichever is active owns the segment.
5768
- if (label) {
5769
- setSegment(hud, 'voice-state', C.accent(`${label} · dictation`), 6);
5770
- } else {
5771
- // Only clear when voice-chat is also inactive — a race
5772
- // between D5 voice exit and voice-chat enter could
5773
- // otherwise wipe the chat phase indicator.
5774
- if (!dashboardVoiceChat.controller.isActive()) {
5775
- clearSegment(hud, 'voice-state');
5776
- }
5777
- }
5778
- },
5779
- requestRender: () => { requestDashboardRender(); },
5780
- onLongReleasePreShiftFocus: () => {
5781
- // PR-S1V.D5+ smoothness — focus shift is dashboard-scope so
5782
- // the boot module just calls this closure on detector
5783
- // release, before STT runs. Skipped when chord toggle was
5784
- // used from inside chat-main (focus already in input).
5785
- if (workingDir.focus === 'input') return;
5786
- applyFocusToInputTransition(resolveFocusToInputTransition({
5787
- sourcePane: workingDir.focus,
5788
- rememberPane: true,
5789
- mode: 'plain',
5790
- reason: 'voice-dictation-pre-shift',
5791
- }));
5792
- },
5793
- });
5794
- voiceInputHost = booted.host;
5795
- voiceUnsubscribeIndicator = booted.unsubscribeIndicator;
5796
- voiceLongPressDetector = booted.detector;
5797
- } catch (err) {
5798
- chatLines.push(C.warning(reportDashboardVoiceBootError(err)));
5799
- chatScrollOffset = -1;
5800
- }
5801
- })();
5802
- } else if (debug.enabled) {
5803
- debug.log('voice.host', 'boot.skip', { reason: 'no-openai-key' });
5804
- }
5805
- /** PR-S1V.4-wiring · Ctrl+Shift+V chord — fires from anywhere
5806
- * (popup terminal · VW terminal · bell modal · dashboard) so the
5807
- * user always has a single entry chord. Korean shifted ㅍ (V on
5808
- * 2-bul) accepts ctrl-only because the shift bit may be implicit
5809
- * in the codepoint. Mirrors the isForceQuitChord pattern below. */
5810
- const matchesVoiceEnterChord = (
5811
- routeKey: import('../tui.js').Key,
5812
- ): boolean => {
5813
- if (!routeKey.ctrl) return false;
5814
- if (routeKey.shift && (routeKey.name === 'v' || routeKey.name === 'V' || routeKey.name === 'ㅍ')) return true;
5815
- if (routeKey.name === 'ㅍ' && routeKey.ctrl) return true;
5816
- return false;
5817
- };
5818
- /** experiment/voice-chat-realtime-rebind (2026-04-30) — Alt+R toggles
5819
- * continuous voice-chat mode (Phase 4-5). Switched off Ctrl+Shift+R
5820
- * to avoid colliding with Ctrl+R (chat input reverse-history search).
5821
- * Korean ㄱ (R on 2-bul layout) is also accepted so the chord works
5822
- * with the IME engaged. macOS users may need to set their terminal
5823
- * to "Option as Meta/Alt" so Option+R reaches elanous as `alt+r` (the
5824
- * default Terminal.app sends ® instead). */
5825
- const matchesVoiceChatRealtimeChord = (
5826
- routeKey: import('../tui.js').Key,
5827
- ): boolean => {
5828
- // 2026-05-03 — Alt+R was reassigned to reasoning cycle (which
5829
- // mnemonically owns 'R'). Streaming voice-chat moves to Alt+S
5830
- // (S = Streaming). Korean ㄴ (S on 2-bul layout) accepted so the
5831
- // chord works with the IME engaged. macOS users may need to set
5832
- // their terminal to "Option as Meta/Alt" so Option+S reaches
5833
- // elanous as `alt+s`.
5834
- const isCandidate =
5835
- routeKey.name === 's' || routeKey.name === 'S'
5836
- || routeKey.name === 'ㄴ' /* 한글 s on 2-bul */;
5837
- if (debug.enabled && isCandidate) {
5838
- debug.log('voice.chat.matcher', 'eval', {
5839
- keyName: routeKey.name,
5840
- alt: !!routeKey.alt,
5841
- ctrl: !!routeKey.ctrl,
5842
- shift: !!routeKey.shift,
5843
- meta: !!(routeKey as { meta?: boolean }).meta,
5844
- kind: (routeKey as { kind?: string }).kind ?? 'press',
5845
- });
5846
- }
5847
- if (!routeKey.alt) return false;
5848
- if (routeKey.ctrl) return false; // Ctrl+Alt+S is a different chord by convention
5849
- return isCandidate;
5850
- };
5851
-
5852
- /** Alt+R reasoning cycle matcher — V/D/R mnemonic with V=voice
5853
- * control (Ctrl+Shift+V), D=batch dictation (Space-longpress),
5854
- * R=reasoning. Korean ㄱ (R on 2-bul) accepted with IME. */
5286
+ /** Alt+R reasoning cycle matcher. Korean ㄱ (R on 2-bul) accepted with IME. */
5855
5287
  const matchesReasoningCycleChord = (
5856
5288
  routeKey: import('../tui.js').Key,
5857
5289
  ): boolean => {
@@ -7487,7 +6919,6 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
7487
6919
  chatMainAvailable,
7488
6920
  pluginActive: !!pluginHost.active(),
7489
6921
  chordArmed: isChordArmed(chord),
7490
- voiceModeActive: !!voiceInputHost && voiceInputHost.getState().kind !== 'idle',
7491
6922
  vwLocalComposerActive,
7492
6923
  overlayInputActive,
7493
6924
  questionActive: approvalModalRouter.currentKind() === 'askUser',
@@ -7506,8 +6937,7 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
7506
6937
  chatMainAvailable,
7507
6938
  pluginActive: !!pluginHost.active(),
7508
6939
  chordArmed: isChordArmed(chord),
7509
- voiceModeActive: !!voiceInputHost && voiceInputHost.getState().kind !== 'idle',
7510
- vwLocalComposerActive,
6940
+ vwLocalComposerActive,
7511
6941
  overlayInputActive,
7512
6942
  owner: state.inputOwnership?.owner ?? 'none',
7513
6943
  chatMainSuppressed: state.inputOwnership?.chatMainSuppressed ?? false,
@@ -15860,174 +15290,7 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
15860
15290
  // no mutation happened.
15861
15291
  recomputeViewMode();
15862
15292
 
15863
- // PR-S1V.D4-γ (2026-04-29 · review-revised) — outside-chat-main
15864
- // dictation chord routing. PR #1115 review pinpointed that plain
15865
- // `Space` hold globally collides with too many existing Space-
15866
- // binding surfaces (browser/obsidian/skill-file selection,
15867
- // scheduler form input, preview pager, popup/VW terminal, modals
15868
- // /pickers). The reviewer's recommended split:
15869
- //
15870
- // - **`Ctrl+Shift+Space`** = global dictation chord. Modifier-
15871
- // only carries no char-input role; safe across browse/pane/
15872
- // popup/terminal because surface Space bindings live on
15873
- // plain `Space`. Wired here as the always-on outer hook —
15874
- // chat-main onPreKey already owns it inside input focus
15875
- // (D4-β), so the two paths are mutually exclusive at the
15876
- // dispatch level (chat textInput's own readKey loop never
15877
- // reaches this outer hook).
15878
- //
15879
- // - **plain `Space`** = scoped allowlist only. Default deny;
15880
- // point-of-truth `isAllowlistedDictationSurface()` will
15881
- // return `true` only for surfaces explicitly verified to
15882
- // have no native Space semantics. Initial allowlist is
15883
- // intentionally empty — every existing PaneFocus value is
15884
- // a known consumer (selection toggle / pager next-page /
15885
- // form input / log scroll / etc.). The seam stays so we
15886
- // can opt specific surfaces in after they're cleared by
15887
- // dogfood; until then the plain-Space branch is inert.
15888
- //
15889
- // Both branches share the same skip rules: voice host must be
15890
- // booted + idle, chat-main must not own the working focus
15891
- // (D4-β scope), and PTY/terminal panes still defer the *plain*
15892
- // Space path entirely (Ctrl+Shift+Space stays alive there per
15893
- // the reviewer's note "충돌 보이면 그때 예외 surface 추가").
15894
- // TEMP DEBUG (2026-04-29 · fix/voice-runtime-tdz-2 branch) — log
15895
- // the gate evaluation so dogfood logs show *why* the chord did or
15896
- // didn't fire instead of just "no dictation event". Remove with
15897
- // the chord-trial revert.
15898
- if (debug.enabled && !key.mouse && key.ctrl && key.shift) {
15899
- const hostStateKind = voiceInputHost ? voiceInputHost.getState().kind : null;
15900
- debug.log('voice.outer-hook.gate', 'eval', {
15901
- keyName: key.name,
15902
- ctrl: !!key.ctrl,
15903
- shift: !!key.shift,
15904
- alt: !!key.alt,
15905
- hasVoiceHost: !!voiceInputHost,
15906
- hasDetector: !!voiceLongPressDetector,
15907
- hostState: hostStateKind,
15908
- focus: workingDir.focus,
15909
- willEnter:
15910
- !!voiceInputHost
15911
- && !!voiceLongPressDetector
15912
- && hostStateKind === 'idle'
15913
- && workingDir.focus !== 'input',
15914
- });
15915
- }
15916
- // These two vars are assigned only inside the async boot IIFE
15917
- // (a closure) and reset to null at the bottom of this `while(true)`
15918
- // loop, so TS's loop-carried flow analysis collapses them to
15919
- // `never` here (a false positive — the runtime value is the booted
15920
- // host). Assert the true declared type so the guards below narrow.
15921
- const voiceHostFlow = voiceInputHost as VoiceInputHost | null;
15922
- const voiceDetectorFlow = voiceLongPressDetector as SpaceLongPressDetector | null;
15923
- if (
15924
- voiceHostFlow
15925
- && voiceDetectorFlow
15926
- && voiceHostFlow.getState().kind === 'idle'
15927
- && workingDir.focus !== 'input'
15928
- ) {
15929
- const focusedTerminalPane = false;
15930
-
15931
- // Branch 1 — Ctrl+Shift+D trial chord. TEMP DEBUG (2026-04-29):
15932
- // toggle pattern instead of long-press detector. First press
15933
- // starts dictation, second press stops. Debounce in
15934
- // toggleDictationFromChord swallows OS auto-repeat duplicates.
15935
- // Restore detector wiring once chord question is settled.
15936
- if (isDictationHoldKey(key)) {
15937
- if (debug.enabled) {
15938
- debug.log('voice.outer-hook.dictation.hit', 'branch-1-chord-toggle', {
15939
- keyName: key.name,
15940
- kind: key.kind ?? 'press',
15941
- dictState: voiceHostFlow.getDictationState(),
15942
- });
15943
- }
15944
- // Release events are ignored under toggle — only press toggles.
15945
- if (key.kind !== 'release') {
15946
- toggleDictationFromChord('outer-hook', key.name);
15947
- }
15948
- // Always consume — chord is a deliberate user signal, not
15949
- // ordinary input.
15950
- continue;
15951
- }
15952
-
15953
- // Branch 2 — plain Space (scoped allowlist). Currently the
15954
- // allowlist is empty so every plain Space passes through to
15955
- // the priority route untouched, matching the "global plain
15956
- // Space 비추천" finding from the PR review. As surfaces are
15957
- // verified safe via dogfood, add their PaneFocus values to
15958
- // `isAllowlistedDictationSurface` below.
15959
- if (isPlainSpaceHoldKey(key)) {
15960
- // TEMP DEBUG (2026-04-29 · fix/voice-runtime-tdz-2 trial) —
15961
- // log Branch 2 decision so dogfood can prove plain Space hits
15962
- // the allowlist + non-terminal-pane gate.
15963
- const allowlistHit = isAllowlistedDictationSurface(workingDir.focus);
15964
- if (debug.enabled) {
15965
- debug.log('voice.outer-hook.branch2', 'eval', {
15966
- keyName: key.name,
15967
- kind: key.kind ?? 'press',
15968
- focus: workingDir.focus,
15969
- focusedTerminalPane,
15970
- allowlistHit,
15971
- willEnter: !focusedTerminalPane && allowlistHit,
15972
- });
15973
- }
15974
- if (!focusedTerminalPane && allowlistHit) {
15975
- if (debug.enabled) {
15976
- debug.log('voice.outer-hook.dictation.hit', 'branch-2-plain-space', {
15977
- focus: workingDir.focus,
15978
- kind: key.kind ?? 'press',
15979
- detectorState: voiceDetectorFlow.getState(),
15980
- });
15981
- }
15982
- if (key.kind === 'release') {
15983
- voiceDetectorFlow.noteRelease();
15984
- } else {
15985
- voiceDetectorFlow.noteSpaceKey();
15986
- }
15987
- continue;
15988
- }
15989
- }
15990
-
15991
- // Cancel-by-other-key — same race-fix pattern as the chat-
15992
- // main onPreKey wire (PR #1109 review fix #1). Only await
15993
- // when we're actually terminating an in-flight dictation.
15994
- if (voiceDetectorFlow.getState() !== 'idle') {
15995
- const preState = voiceDetectorFlow.getState();
15996
- voiceDetectorFlow.noteOtherKey();
15997
- if (preState === 'fired') {
15998
- while (voiceHostFlow.getDictationState() !== 'idle') {
15999
- await new Promise<void>((resolve) => setTimeout(resolve, 10));
16000
- }
16001
- }
16002
- // The terminator key still flows through the priority route
16003
- // below — only the ordering shifts so the transcript inserts
16004
- // before the terminator is dispatched.
16005
- }
16006
-
16007
- // TEMP DEBUG TRIAL — ESC stops a toggle-mode dictation. Without
16008
- // this the user could get stuck in `recording` if they forgot
16009
- // the chord. Detector path above handles long-press cancel; this
16010
- // covers the toggle path which doesn't use the detector.
16011
- if (
16012
- key.name === 'escape'
16013
- && !key.ctrl && !key.shift && !key.alt
16014
- && voiceHostFlow.getDictationState() === 'recording'
16015
- ) {
16016
- if (debug.enabled) debug.log('voice.toggle.stop', 'esc-cancel', {});
16017
- void voiceHostFlow.stopDictation();
16018
- while (voiceHostFlow.getDictationState() !== 'idle') {
16019
- await new Promise<void>((resolve) => setTimeout(resolve, 10));
16020
- }
16021
- // Continue dispatch — ESC still flows through (modal close,
16022
- // input clear, etc.) so we don't `continue` here.
16023
- }
16024
- }
16025
-
16026
- // PR-S1V.D5 — kitty `>3u` release/repeat event guard. The voice
16027
- // outer-hook block above is the only path that legitimately needs
16028
- // non-press events (chord toggle skips them, plain-Space detector
16029
- // explicitly handles `kind === 'release'` for explicit release
16030
- // timing). Everything below — priority route, widget routing,
15293
+ // kitty `>3u` release/repeat event guard. Everything below — priority route, widget routing,
16031
15294
  // chat-input dispatcher — was written when `>1u` was the only
16032
15295
  // mode and treats every key as a press. So a kitty release event
16033
15296
  // would otherwise re-fire the press handler and double-dispatch
@@ -16050,6 +15313,10 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
16050
15313
  continue;
16051
15314
  }
16052
15315
 
15316
+ // Keep classic sidetab keys on the normal input route, independent of
15317
+ // chat-main voice handling and before modal/input dispatch.
15318
+ const routeClassicSidetabInputKey = (routeKey: Key): boolean =>
15319
+ classicSidetabRuntime.routeKey(routeKey);
16053
15320
  const priorityRoute = await routeDashboardPriorityKey(key, {
16054
15321
  inputOwner: chatMainVisibility.inputOwnership?.owner,
16055
15322
  routeClassicSigquitChord: (routeKey) => {
@@ -16104,7 +15371,7 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
16104
15371
  draw();
16105
15372
  return true;
16106
15373
  },
16107
- routeSidetabKey: (routeKey) => classicSidetabRuntime.routeKey(routeKey),
15374
+ routeSidetabKey: routeClassicSidetabInputKey,
16108
15375
  dispatchPreKey: (routeKey, targetHandlerName) => {
16109
15376
  const questionViewHandler = {
16110
15377
  name: 'question-view',
@@ -16216,156 +15483,6 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
16216
15483
  if (routeKey.name === 'ㅃ') return true;
16217
15484
  return false;
16218
15485
  },
16219
- // PR-S1V.4-wiring · Step 0x — voice mode entry chord.
16220
- // Fires only when voice mode is currently `idle`; once active
16221
- // the next step (routeVoiceModeKey) takes over. Skipping when
16222
- // voiceInputHost is null keeps the chord inert until the
16223
- // STTProvider has finished booting (or stays inert forever
16224
- // when OPENAI_API_KEY is absent).
16225
- routeVoiceEnterChord: (routeKey) => {
16226
- if (!voiceInputHost) return false;
16227
- if (voiceInputHost.getState().kind !== 'idle') return false;
16228
- if (!matchesVoiceEnterChord(routeKey)) return false;
16229
- if (debug.enabled) debug.log('voice.host', 'enter.chord', {});
16230
- voiceInputHost.requestEnter();
16231
- return true;
16232
- },
16233
- // PR-S1V.4-wiring · Step 0c — voice mode active dispatch.
16234
- // Modal A invariant: while the host is non-idle, every key
16235
- // flows through `maybeHandleKey` which terminates the dispatch
16236
- // (escape exits, space drives the recording lifecycle, every
16237
- // other key is swallowed no-op). Idle state returns false so
16238
- // legacy dispatchers stay reachable.
16239
- routeVoiceModeKey: (routeKey) => {
16240
- if (!voiceInputHost) return false;
16241
- if (voiceInputHost.getState().kind === 'idle') return false;
16242
- return voiceInputHost.maybeHandleKey(routeKey);
16243
- },
16244
- // experiment/voice-chat-realtime-rebind · Step 0r —
16245
- // Ctrl+Shift+R chord (continuous voice-chat toggle). Same
16246
- // outer-hook tier as routeVoiceEnterChord so it reaches
16247
- // anywhere (popup terminal / VW terminal / bell modal). The
16248
- // mutex check + state machine transition + chatLines status
16249
- // line live in the same handler to keep the wire 1-place.
16250
- // experiment/voice-chat-realtime-rebind · Step 0s — modal-A
16251
- // swallow while voice-chat is active. Returns true when the
16252
- // controller is non-idle so any key not already claimed above
16253
- // (force-quit · Alt+W · chord toggle) is consumed
16254
- // — typing doesn't leak into chat input, Space doesn't toggle
16255
- // pickers, etc. ESC explicitly exits. Idle controller returns
16256
- // false so legacy dispatch is reachable.
16257
- routeVoiceChatActiveKey: async (routeKey) => {
16258
- if (!dashboardVoiceChat.controller.isActive()) return false;
16259
- // ESC: exit voice-chat (mode-level cancel), do not pass to
16260
- // dispatch chain so no other surface acts on the ESC.
16261
- if (routeKey.name === 'escape') {
16262
- try {
16263
- await dashboardVoiceChat.handleEsc();
16264
- } catch (err) {
16265
- if (debug.enabled) {
16266
- debug.log('voice.chat.error', 'esc.handle.exception', { err: String(err) }, { level: 'error' });
16267
- }
16268
- }
16269
- emitVoiceChatStopQuickPass('esc');
16270
- chatLines.push('');
16271
- chatLines.push(C.accent('🎙 [voice-chat] stopped (ESC)'));
16272
- chatScrollOffset = -1;
16273
- if (debug.enabled) {
16274
- debug.log('voice.chat.phase', 'esc.exit', {
16275
- phase: dashboardVoiceChat.controller.getPhase(),
16276
- });
16277
- }
16278
- draw();
16279
- return true;
16280
- }
16281
- // Everything else: swallow.
16282
- if (debug.enabled) {
16283
- debug.log('voice.chat.swallow', routeKey.name || '(anon)', {
16284
- ctrl: !!routeKey.ctrl,
16285
- shift: !!routeKey.shift,
16286
- alt: !!routeKey.alt,
16287
- phase: dashboardVoiceChat.controller.getPhase(),
16288
- });
16289
- }
16290
- return true;
16291
- },
16292
- routeVoiceChatRealtimeChord: (routeKey) => {
16293
- // Alt+R reasoning cycle — handled here at the same outer
16294
- // tier as voice-chat so it claims the key before any other
16295
- // surface (chat input, modal, etc) interprets it. Returns
16296
- // true ⇒ key consumed, no further dispatch.
16297
- if (matchesReasoningCycleChord(routeKey)) {
16298
- cycleReasoningLevel();
16299
- return true;
16300
- }
16301
- if (!matchesVoiceChatRealtimeChord(routeKey)) return false;
16302
- if (debug.enabled) {
16303
- debug.log('voice.chat.chord', 'press', {
16304
- keyName: routeKey.name,
16305
- alt: !!routeKey.alt,
16306
- shift: !!routeKey.shift,
16307
- ctrl: !!routeKey.ctrl,
16308
- kind: (routeKey as { kind?: string }).kind ?? 'press',
16309
- wasActive: dashboardVoiceChat.controller.isActive(),
16310
- priorPhase: dashboardVoiceChat.controller.getPhase(),
16311
- });
16312
- }
16313
- // Defer to async runtime — outer-hook tier expects sync
16314
- // boolean, so we kick off the toggle and claim the key.
16315
- void (async () => {
16316
- const startedAt = Date.now();
16317
- if (debug.enabled) {
16318
- debug.log('voice.chat.toggle.begin', 'await', {
16319
- wasActive: dashboardVoiceChat.controller.isActive(),
16320
- d5State: voiceInputHost?.getState().kind ?? null,
16321
- });
16322
- }
16323
- try {
16324
- const result = await toggleVoiceChatRealtime(dashboardVoiceChat, {
16325
- // NOTE: a `|| getState().kind === 'committing'` clause was
16326
- // removed here — 'committing' is not a VoiceModeState.kind
16327
- // ('idle'|'active'|'recording'|'processing'), so the check
16328
- // was always false (dead). Behavior is unchanged.
16329
- d5VoiceActive: () =>
16330
- voiceInputHost?.getState().kind === 'recording',
16331
- });
16332
- if (debug.enabled) {
16333
- debug.log('voice.chat.toggle.resolve', result.action, {
16334
- status: result.status,
16335
- phase: dashboardVoiceChat.controller.getPhase(),
16336
- elapsedMs: Date.now() - startedAt,
16337
- });
16338
- }
16339
- // 2026-04-30 — HUD `voice-state` segment is the single
16340
- // source of truth for entry/exit status. Chord toggle
16341
- // no longer pushes lines into chatLines (per user
16342
- // request: "다시 챗로그에 나타나네요"). Only mutex
16343
- // (D5 voice ↔ voice-chat conflict) is exceptional and
16344
- // worth a chatLines warning so the user knows the
16345
- // chord was REJECTED, not silently no-op'd.
16346
- if (result.action === 'mutex') {
16347
- chatLines.push('');
16348
- chatLines.push(C.warning(`🎙 [voice-chat] ${result.status}`));
16349
- chatScrollOffset = -1;
16350
- } else if (result.action === 'exit' && result.status === 'voice-chat exited') {
16351
- emitVoiceChatStopQuickPass('alt-s');
16352
- }
16353
- draw();
16354
- } catch (err) {
16355
- const msg = err instanceof Error ? err.message : String(err);
16356
- chatLines.push(C.warning(`🎙 [voice-chat] toggle failed: ${msg}`));
16357
- chatScrollOffset = -1;
16358
- if (debug.enabled) {
16359
- debug.log('voice.chat.error', 'toggle.exception', {
16360
- err: msg,
16361
- elapsedMs: Date.now() - startedAt,
16362
- }, { level: 'error' });
16363
- }
16364
- draw();
16365
- }
16366
- })();
16367
- return true;
16368
- },
16369
15486
  // Step 6 hard-quit — only reached when no popup terminal is
16370
15487
  // active. Plain Ctrl+Q stays as the dashboard-mode shortcut
16371
15488
  // so muscle memory survives outside the popup. Inside the
@@ -16418,19 +15535,6 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
16418
15535
  },
16419
15536
  });
16420
15537
  if (priorityRoute.type === 'quit') {
16421
- // PR-S1V.4-wiring — dispose the voice host before closeTui so
16422
- // the kitty `>1u` restore + onIndicator listeners run while
16423
- // stdout is still open.
16424
- // Same loop-carried `never` false positive as the dictation
16425
- // block above — assert the true declared types before dispose.
16426
- const voiceUnsubForQuit = voiceUnsubscribeIndicator as (() => void) | null;
16427
- const voiceHostForQuit = voiceInputHost as VoiceInputHost | null;
16428
- const voiceDetectorForQuit = voiceLongPressDetector as SpaceLongPressDetector | null;
16429
- try { voiceUnsubForQuit?.(); } catch { /* best-effort */ }
16430
- try { voiceHostForQuit?.dispose(); } catch { /* best-effort */ }
16431
- try { voiceDetectorForQuit?.dispose(); } catch { /* best-effort */ }
16432
- voiceInputHost = null;
16433
- voiceLongPressDetector = null;
16434
15538
  closeDashboardTui();
16435
15539
  return 'quit';
16436
15540
  }
@@ -16971,237 +16075,7 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
16971
16075
  shouldSyncPickers: () =>
16972
16076
  chatMainInputVisibilityState().inputOwnership?.owner === 'chat-main',
16973
16077
  onPasteImage: attachClipboardImage,
16974
- routeVoiceKey: async (routeKey) => {
16975
- if (classicSidetabRuntime.routeKey(routeKey)) return 'consumed';
16976
- // 2026-04-30 — voice-chat ESC: when the controller is
16977
- // active and the user hits ESC inside chat-main, take
16978
- // it as a "exit voice mode" gesture and DO NOT let
16979
- // the chat input pane's default ESC handler fire
16980
- // (which would clear the freshly-injected transcript
16981
- // buffer). User feedback: "프롬프트에 발화를 소중히
16982
- // 다뤄야 함. … ESC 를 눌러도 보이스 모드가 종료되는
16983
- // 것이지 인풋 모드 클리어를 의미하는 것이 아님."
16984
- if (
16985
- routeKey.name === 'escape'
16986
- && dashboardVoiceChat.controller.isActive()
16987
- ) {
16988
- if (debug.isKeyTraceEnabled()) {
16989
- debug.log('key.trace.dispatch', 'chat-main.routeVoiceKey.esc-exit', {
16990
- name: routeKey.name,
16991
- claimed: 'voice-chat-exit',
16992
- phase: dashboardVoiceChat.controller.getPhase(),
16993
- });
16994
- }
16995
- try { await dashboardVoiceChat.handleEsc(); } catch { /* swallow */ }
16996
- emitVoiceChatStopQuickPass('esc');
16997
- // 2026-04-30 — Unified `🎙 [voice-chat] stopped
16998
- // (ESC)` line so the chat log lifecycle stays
16999
- // coherent regardless of which dispatch path
17000
- // (chat-main vs outer-tier) claimed the ESC.
17001
- chatLines.push('');
17002
- chatLines.push(C.accent('🎙 [voice-chat] stopped (ESC)'));
17003
- chatScrollOffset = -1;
17004
- return 'consumed';
17005
- }
17006
- // experiment/voice-chat-realtime-rebind — Alt+R chord
17007
- // is routed BEFORE the D5 voice path so chat-input
17008
- // doesn't swallow it. priority-key-route also handles
17009
- // Alt+R (step 0r) but only fires when the input loop
17010
- // is NOT the active reader; from inside chat-main
17011
- // textInput.readKey, this is the only place that runs
17012
- // first. Mirror dashboard outer-hook behavior: log,
17013
- // claim, kick off async toggle.
17014
- //
17015
- // Alt+R reasoning cycle — same chat-main inner tier so
17016
- // it claims the chord before voice-chat. Mnemonic
17017
- // V/D/R: V=voice control, D=batch dictation,
17018
- // R=reasoning.
17019
- if (matchesReasoningCycleChord(routeKey)) {
17020
- cycleReasoningLevel();
17021
- // Chord handled — claim it ('consumed'); the route
17022
- // contract is 'consumed' | 'passthrough', not boolean.
17023
- return 'consumed';
17024
- }
17025
- if (matchesVoiceChatRealtimeChord(routeKey)) {
17026
- if (debug.isKeyTraceEnabled()) {
17027
- debug.log('key.trace.dispatch', 'chat-main.routeVoiceKey.realtime', {
17028
- name: routeKey.name,
17029
- alt: !!routeKey.alt,
17030
- ctrl: !!routeKey.ctrl,
17031
- shift: !!routeKey.shift,
17032
- claimed: 'realtime',
17033
- });
17034
- }
17035
- if (debug.enabled) {
17036
- debug.log('voice.chat.chord', 'press.chat-main', {
17037
- keyName: routeKey.name,
17038
- alt: !!routeKey.alt,
17039
- ctrl: !!routeKey.ctrl,
17040
- shift: !!routeKey.shift,
17041
- kind: (routeKey as { kind?: string }).kind ?? 'press',
17042
- wasActive: dashboardVoiceChat.controller.isActive(),
17043
- });
17044
- }
17045
- void (async () => {
17046
- const startedAt = Date.now();
17047
- if (debug.enabled)
17048
- debug.log('voice.chat.toggle.begin', 'chat-main.await', {
17049
- d5State: voiceInputHost?.getState().kind ?? null,
17050
- });
17051
- try {
17052
- const result = await toggleVoiceChatRealtime(dashboardVoiceChat, {
17053
- // NOTE: dead `=== 'committing'` clause removed (not a
17054
- // VoiceModeState.kind → always false). Unchanged behavior.
17055
- d5VoiceActive: () =>
17056
- voiceInputHost?.getState().kind === 'recording',
17057
- });
17058
- if (debug.enabled)
17059
- debug.log('voice.chat.toggle.resolve', result.action, {
17060
- status: result.status,
17061
- phase: dashboardVoiceChat.controller.getPhase(),
17062
- elapsedMs: Date.now() - startedAt,
17063
- source: 'chat-main',
17064
- });
17065
- // 2026-04-30 — Unified format: `🎙 [voice-chat]
17066
- // <verb> (<trigger>)`. Same emoji + tag + accent
17067
- // color across start/stop so the chat log reads
17068
- // as a coherent voice-chat lifecycle stream.
17069
- // Mutex/failed-start fall through to warning
17070
- // color but keep the same prefix.
17071
- chatLines.push('');
17072
- if (result.action === 'mutex') {
17073
- chatLines.push(C.warning(`🎙 [voice-chat] ${result.status}`));
17074
- } else if (result.action === 'enter') {
17075
- chatLines.push(C.accent(
17076
- `🎙 [voice-chat] started (provider: ${dashboardVoiceChat.providerId}) — Alt+S or ESC to exit`,
17077
- ));
17078
- } else if (result.status === 'voice-chat exited') {
17079
- emitVoiceChatStopQuickPass('alt-s');
17080
- chatLines.push(C.accent('🎙 [voice-chat] stopped (Alt+S)'));
17081
- } else {
17082
- // 'exit' action with diagnostic status
17083
- // (e.g. failed-to-start guard).
17084
- chatLines.push(C.warning(`🎙 [voice-chat] ${result.status}`));
17085
- }
17086
- chatScrollOffset = -1;
17087
- draw();
17088
- } catch (err) {
17089
- const msg = err instanceof Error ? err.message : String(err);
17090
- chatLines.push(C.warning(`🎙 [voice-chat] toggle failed: ${msg}`));
17091
- chatScrollOffset = -1;
17092
- if (debug.enabled)
17093
- debug.log('voice.chat.error', 'chat-main.toggle.exception', {
17094
- err: msg,
17095
- elapsedMs: Date.now() - startedAt,
17096
- }, { level: 'error' });
17097
- draw();
17098
- }
17099
- })();
17100
- return 'consumed';
17101
- }
17102
- if (!voiceInputHost) return 'passthrough';
17103
- if (voiceInputHost.getState().kind !== 'idle') {
17104
- return voiceInputHost.maybeHandleKey(routeKey) ? 'consumed' : 'passthrough';
17105
- }
17106
- if (!matchesVoiceEnterChord(routeKey)) return 'passthrough';
17107
- if (debug.enabled) debug.log('voice.host', 'enter.chord.chat-main', {});
17108
- voiceInputHost.requestEnter();
17109
- return 'consumed';
17110
- },
17111
- // PR-S1V.D4 — Long-press Space dictation pre-key. The
17112
- // detector lives at dashboard scope (see line ~4585) and
17113
- // gets fed every keystroke routed here. The first Space
17114
- // press is `passthrough` so the OS char lands in the chat
17115
- // input buffer; once the threshold fires (`onLongPress`
17116
- // → host.startDictation), subsequent OS repeats are
17117
- // swallowed (`consumed`) so they don't pile " " chars on
17118
- // top of the dictated transcript. Final release (or
17119
- // cancel-by-other-key) flushes via host.stopDictation.
17120
- routeLongPressDictation: async (routeKey) => {
17121
- // TEMP DEBUG (2026-04-29 · fix/voice-runtime-tdz-2) —
17122
- // mirror of the outer-hook gate log at the chat-input
17123
- // route. Same chord-trial reasons as detector.
17124
- if (debug.enabled && !routeKey.mouse && routeKey.ctrl && routeKey.shift) {
17125
- debug.log('voice.chat-input-route.gate', 'eval', {
17126
- keyName: routeKey.name,
17127
- kind: routeKey.kind ?? 'press',
17128
- hasVoiceHost: !!voiceInputHost,
17129
- hasDetector: !!voiceLongPressDetector,
17130
- hostState: voiceInputHost ? voiceInputHost.getState().kind : null,
17131
- });
17132
- }
17133
- if (!voiceLongPressDetector || !voiceInputHost) return 'passthrough';
17134
- // Voice mode active → defer to its own modal; long-press
17135
- // detector stays out so press/release events serve the
17136
- // recording lifecycle there.
17137
- if (voiceInputHost.getState().kind !== 'idle') return 'passthrough';
17138
-
17139
- if (isDictationHoldKey(routeKey)) {
17140
- if (debug.enabled) {
17141
- debug.log('voice.chat-input-route.dictation.hit', 'chord-match-toggle', {
17142
- keyName: routeKey.name,
17143
- kind: routeKey.kind ?? 'press',
17144
- dictState: voiceInputHost.getDictationState(),
17145
- });
17146
- }
17147
- // TEMP DEBUG TRIAL (2026-04-29) — toggle pattern via
17148
- // shared dashboard helper. Release events ignored
17149
- // under toggle; only press toggles. Restore detector
17150
- // wiring once chord question is settled.
17151
- if (routeKey.kind !== 'release') {
17152
- toggleDictationFromChord('chat-input-route', routeKey.name);
17153
- }
17154
- return 'consumed';
17155
- }
17156
-
17157
- // TEMP DEBUG TRIAL — ESC stops a toggle-mode dictation
17158
- // from inside chat-main input. Mirror of the outer-hook
17159
- // ESC-cancel; the detector path below covers long-press
17160
- // mode but not toggle.
17161
- if (
17162
- routeKey.name === 'escape'
17163
- && !routeKey.ctrl && !routeKey.shift && !routeKey.alt
17164
- && voiceInputHost.getDictationState() === 'recording'
17165
- ) {
17166
- if (debug.enabled) {
17167
- debug.log('voice.toggle.stop', 'esc-cancel-chat-input', {});
17168
- }
17169
- void voiceInputHost.stopDictation();
17170
- while (voiceInputHost.getDictationState() !== 'idle') {
17171
- await new Promise<void>((resolve) => setTimeout(resolve, 10));
17172
- }
17173
- return 'passthrough';
17174
- }
17175
-
17176
- // Cancel-by-other-key path — the user pressed something
17177
- // other than Space while a long-press was pending or a
17178
- // dictation was active. PR #1109 review fix: when this
17179
- // terminates an in-flight dictation we MUST await
17180
- // `stopDictation()` before returning, otherwise the
17181
- // terminator key races ahead of the transcript insert
17182
- // and the chat-main buffer ends up with "a<transcript>"
17183
- // instead of "<transcript>a". Sentinel: capture the
17184
- // pre-call state so we can decide whether to await.
17185
- const preState = voiceLongPressDetector.getState();
17186
- if (preState === 'idle') return 'passthrough';
17187
-
17188
- voiceLongPressDetector.noteOtherKey();
17189
- if (preState === 'fired') {
17190
- // `noteOtherKey` already kicked the host's
17191
- // stopDictation via the onLongRelease callback (the
17192
- // detector calls it synchronously). Await the host's
17193
- // dictation pipeline so the chat input handler that
17194
- // runs after us sees the transcript already inserted.
17195
- // We still return 'passthrough' so the terminator key
17196
- // itself is delivered to the chat input as the user
17197
- // intended — only the *ordering* shifts.
17198
- while (voiceInputHost.getDictationState() !== 'idle') {
17199
- await new Promise<void>((resolve) => setTimeout(resolve, 10));
17200
- }
17201
- }
17202
- return 'passthrough';
17203
- },
17204
- routeInputKey: async (key) => {
16078
+ routeInputKey: async (key) => {
17205
16079
  if (await handleLogPaneCopyAction(key)) return 'consumed';
17206
16080
  // A-5b.2 · dispatcher-level key hook (routeInputEventAsync
17207
16081
  // · ViewMode='input'). Runs AFTER onPreKey and BEFORE
@@ -17480,111 +16354,9 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
17480
16354
  formatDebugLine: (display, reason, chars) => C.muted(` -- acp:${display} ${reason} (${chars} chars) --`),
17481
16355
  formatErrorLine: (display, message) => C.error(` acp:${display} error: ${message}`),
17482
16356
  formatAssistantPrefix: (display) => C.accent(` [${display}]`),
17483
- autoTtsHooks: {
17484
- pushChunk: dashboardAutoTts.hooks.pushChunk,
17485
- commit: () => dashboardAutoTts.hooks.commit(),
17486
- cancel: () => dashboardAutoTts.hooks.cancel(),
17487
- },
17488
- // 2026-04-30 — voice-chat controller's notifyResponseDone
17489
- // used to live inside `autoTtsHooks.commit/cancel` wrappers,
17490
- // which meant ELANOUS_AUTO_TTS=off (the default) skipped the
17491
- // call entirely → speaking phase stuck → ESC needed → ESC
17492
- // close triggered "WebSocket closed unexpectedly" warning.
17493
- // Wiring through `onTurnDone` (auto-TTS-independent) makes
17494
- // the speaking → inactive transition unconditional.
17495
- onTurnDone: () => {
17496
- dashboardVoiceChat.notifyResponseDone();
17497
- },
17498
- signalBus: dashboardControlSignals,
17499
- drainCooldownMs: getUserConfig().voice.tts.drainCooldownMs
17500
- ?? VOICE_HARDCODED_DEFAULTS.ttsDrainCooldownMs,
17501
16357
  });
17502
16358
  };
17503
16359
 
17504
- // Phase 4 voice-chat — bind the late submit closure now that
17505
- // `dispatchAcpSend` is in scope. The boot helper holds a
17506
- // mutable reference (set above with the `submitTranscript`
17507
- // hook) so the controller can invoke this on final transcripts.
17508
- //
17509
- // 2026-04-30 — auto-submit destination is now decided by the
17510
- // SAME state the chat-input router uses (sticky ACP backend).
17511
- // Previously this closure unconditionally fell back to
17512
- // `'claude'` when sticky was null, which sent multi-turn
17513
- // voice transcripts to the claude-code ACP binary even when
17514
- // the user never armed it — surfacing as `[-32603] Internal
17515
- // error` because no claude-code session existed.
17516
- //
17517
- // sticky armed (`/acp codex --multi` etc.)
17518
- // → dispatchAcpSend(sticky, text, [])
17519
- // → external ACP backend, voice multi-turn fully hands-free
17520
- //
17521
- // sticky null
17522
- // → replace the live chat-main buffer via the textInput
17523
- // host's external submit hook and inject Enter
17524
- // → main chat's normal `'plain'` dispatch path handles
17525
- // in-process ACP / elanous LLM
17526
- // → multi-turn's auto-relisten still kicks in via
17527
- // notifyResponseDone after that turn ends
17528
- //
17529
- // This keeps the routed plain path canonical while avoiding
17530
- // the old dictate-then-submit two-step, which left transcript
17531
- // residue in the live prompt buffer.
17532
- voiceChatSubmitImpl = (text) => {
17533
- const sticky = dashboardAcpChat.getSticky();
17534
- if (sticky) {
17535
- // sticky armed — auto-submit is real, response stream
17536
- // expected. Transition to `speaking` so the HUD's
17537
- // voice-state segment reflects the assistant's turn
17538
- // (prev: `processing`).
17539
- dispatchAcpSend(sticky, text, []);
17540
- try { dashboardVoiceChat.controller.transition('speaking'); }
17541
- catch { /* swallow — controller may have raced into stopping */ }
17542
- return;
17543
- }
17544
- // 2026-04-30 — sticky null but multi-turn ON. Route the
17545
- // transcript through textInput's external submit hook with
17546
- // the transcript payload itself. textInput replaces the
17547
- // live buffer, injects a synthetic Enter, and the main
17548
- // readKey loop returns through the normal `'plain'`
17549
- // dispatch path (in-process ACP / elanous LLM). Auto-TTS
17550
- // hooks fire there, and notifyResponseDone re-listens on
17551
- // multi-turn.
17552
- //
17553
- // Phase: stay in `processing` until plain dispatch's
17554
- // `onText` first chunk transitions to `speaking` — that
17555
- // matches the user's intent ("실제 보이스 나오기 시작
17556
- // 하면 표시").
17557
- if (debug.enabled)
17558
- debug.log('voice.chat.submit', 'plain.auto-submit', {
17559
- chars: text.length,
17560
- hasPromptCtl: typeof promptCtl.submit === 'function',
17561
- });
17562
- if (typeof promptCtl.submit === 'function') {
17563
- promptCtl.submit({
17564
- text,
17565
- source: {
17566
- kind: 'voice',
17567
- surface: 'dashboard-chat-main',
17568
- mode: 'multi-turn',
17569
- transcriptSource: 'voice',
17570
- channel: 'dashboard',
17571
- },
17572
- });
17573
- return;
17574
- }
17575
- // textInput is not currently live (boot race / pane
17576
- // mode) — we can't auto-submit. Fall back to dictate-only
17577
- // and exit voice-chat so the HUD doesn't lock at
17578
- // `processing`.
17579
- try { voiceRuntime.dictateTranscript(text); } catch { /* ignore */ }
17580
- chatLines.push(C.muted(
17581
- ' ℹ [voice-chat] 입력창이 활성화 안 됨 — transcript 가 채워짐, Enter 로 submit',
17582
- ));
17583
- chatScrollOffset = -1;
17584
- try { dashboardVoiceChat.controller.exit('user-cancel'); }
17585
- catch { /* swallow */ }
17586
- };
17587
-
17588
16360
  // ── Sticky multi-turn passthrough ──
17589
16361
  // When /acp ... --multi armed sticky mode, every plain
17590
16362
  // (non-slash) submit goes straight to that backend. Slash
@@ -17622,13 +16394,6 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
17622
16394
  ...submitIntent,
17623
16395
  sessionId: submitIntent.sessionId ?? dashboardAcpSession.currentSessionId,
17624
16396
  }),
17625
- beforeExecute: (submit) => {
17626
- maybeEmitDashboardSubmitQuickPass({
17627
- submit,
17628
- isOutputSpeaking: dashboardAutoTts.controller.isSpeaking(),
17629
- signalBus: dashboardControlSignals,
17630
- });
17631
- },
17632
16397
  runStickyAcpDispatch: ({ target, text }) => {
17633
16398
  const attachments = attachmentsToNormalized(ctxList(contextRegistry));
17634
16399
  if (debug.enabled) {
@@ -17716,14 +16481,10 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
17716
16481
  getChatOnlyMode: () => chatOnlyMode,
17717
16482
  setChatOnlyLayout: (next, opts) => { setChatOnlyLayout(next, opts); },
17718
16483
  enterSyncMode: () => { void enterSyncMode(); },
17719
- handleVoiceChatSlash: (state, args2) =>
17720
- handleVoiceChatSlash(state as Parameters<typeof handleVoiceChatSlash>[0], args2),
17721
- voiceChatStateRef: { value: dashboardVoiceChat },
17722
16484
  reloadSkillIndex,
17723
16485
  blockStore,
17724
16486
  blockAttach,
17725
16487
  draw,
17726
- autoTtsRef: dashboardAutoTts,
17727
16488
  controlSignalSlashRuntime,
17728
16489
  browserCdpSlashRuntime,
17729
16490
  widgetHost,
@@ -18650,8 +17411,6 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
18650
17411
  }
18651
17412
  // B-1.g migrated: /browser-cdp /bcdp → registry handler.
18652
17413
  // B-2.q migrated: /sim /simulator → registry handler.
18653
- // B-1.e migrated: /auto-tts /autotts /tts — moved to the registry
18654
- // (autoTtsRef threaded through DashboardSlashContext).
18655
17414
  // B-1.g migrated: /widget /widgets /w → registry handler.
18656
17415
  // B-2.y migrated: /plugin /plugins \u2192 registry handler.
18657
17416
  // (/p alias dropped \u2014 collided with /provider's /p which
@@ -19369,16 +18128,6 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
19369
18128
  control: {
19370
18129
  signalBus: dashboardControlSignals,
19371
18130
  },
19372
- autoTts: {
19373
- pushChunk: (chunk) => dashboardAutoTts.hooks.pushChunk(chunk),
19374
- commit: () => dashboardAutoTts.hooks.commit(),
19375
- cancel: () => dashboardAutoTts.hooks.cancel(),
19376
- },
19377
- voiceChat: {
19378
- getPhase: () => dashboardVoiceChat.controller.getPhase(),
19379
- transitionToSpeaking: () => { dashboardVoiceChat.controller.transition('speaking'); },
19380
- notifyResponseDone: () => dashboardVoiceChat.notifyResponseDone(),
19381
- },
19382
18131
  finalizeStreamLifecycle: (cleanupEsc, aborted, currentStatus) =>
19383
18132
  finalizeDashboardStreamLifecycle(cleanupEsc, aborted, currentStatus),
19384
18133
  recordTurnMetrics: async (fullResponse) => {
@@ -19529,13 +18278,6 @@ Mode- and sync-specific instructions are injected per-turn when relevant — do
19529
18278
  ? submitIntent.sessionId ?? dashboardAcpSession.currentSessionId
19530
18279
  : dashboardAcpSession.currentSessionId,
19531
18280
  }),
19532
- beforeExecute: (submit) => {
19533
- maybeEmitDashboardSubmitQuickPass({
19534
- submit,
19535
- isOutputSpeaking: dashboardAutoTts.controller.isSpeaking(),
19536
- signalBus: dashboardControlSignals,
19537
- });
19538
- },
19539
18281
  runStickyAcpDispatch: async () => {},
19540
18282
  runPlainTurn: runPlainSubmitTurn,
19541
18283
  });