cuelo 0.8.2 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +11 -8
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +27 -3
  5. package/.next/react-loadable-manifest.json +3 -2
  6. package/.next/required-server-files.js +2 -2
  7. package/.next/required-server-files.json +2 -2
  8. package/.next/routes-manifest.json +20 -0
  9. package/.next/server/app/_global-error/page.js +3 -3
  10. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_global-error.html +1 -1
  12. package/.next/server/app/_global-error.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  18. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  19. package/.next/server/app/_not-found/page.js +2 -2
  20. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/_not-found.html +1 -1
  22. package/.next/server/app/_not-found.rsc +3 -3
  23. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  24. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  26. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  27. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  28. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  29. package/.next/server/app/api/agent/[id]/account/route.js +1 -1
  30. package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
  31. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  32. package/.next/server/app/api/agent/[id]/route.js +1 -1
  33. package/.next/server/app/api/agent/new/route.js +1 -1
  34. package/.next/server/app/api/agent/running/route.js +1 -1
  35. package/.next/server/app/api/attachments/route.js +3 -3
  36. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  37. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  38. package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
  39. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  40. package/.next/server/app/api/auth/providers/route.js +1 -1
  41. package/.next/server/app/api/cwd/browse/route.js +1 -1
  42. package/.next/server/app/api/cwd/validate/route.js +1 -1
  43. package/.next/server/app/api/default-cwd/route.js +1 -1
  44. package/.next/server/app/api/display-settings/route.js +1 -1
  45. package/.next/server/app/api/document-text/route.js +2 -2
  46. package/.next/server/app/api/experiments/route.js +1 -1
  47. package/.next/server/app/api/file-index/route.js +1 -1
  48. package/.next/server/app/api/files/[...path]/route.js +1 -1
  49. package/.next/server/app/api/git/diff/route.js +1 -1
  50. package/.next/server/app/api/git/status/route.js +2 -2
  51. package/.next/server/app/api/gpt6/handles/route.js +1 -1
  52. package/.next/server/app/api/gpt6/reply/route.js +1 -1
  53. package/.next/server/app/api/gpt6/token/route.js +1 -1
  54. package/.next/server/app/api/gpt6/web6-session/route.js +1 -1
  55. package/.next/server/app/api/home/route.js +1 -1
  56. package/.next/server/app/api/live/call/[callId]/route.js +1 -1
  57. package/.next/server/app/api/live/character-voice/route.js +1 -1
  58. package/.next/server/app/api/live/events/route.js +2 -2
  59. package/.next/server/app/api/live/offer/route.js +1 -1
  60. package/.next/server/app/api/live/voices/route.js +1 -1
  61. package/.next/server/app/api/lounge/events/route.js +2 -2
  62. package/.next/server/app/api/lounge/route.js +1 -1
  63. package/.next/server/app/api/mcp/route.js +2 -2
  64. package/.next/server/app/api/model-roles/route.js +1 -1
  65. package/.next/server/app/api/models/route.js +1 -1
  66. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  67. package/.next/server/app/api/models-config/discover/route.js +1 -1
  68. package/.next/server/app/api/models-config/route.js +2 -2
  69. package/.next/server/app/api/models-config/test/route.js +1 -1
  70. package/.next/server/app/api/office-avatars/[id]/route.js +1 -0
  71. package/.next/server/app/api/office-avatars/[id]/route.js.nft.json +1 -0
  72. package/.next/server/app/api/office-avatars/[id]/route_client-reference-manifest.js +1 -0
  73. package/.next/server/app/api/office-avatars/route.js +1 -0
  74. package/.next/server/app/api/office-avatars/route.js.nft.json +1 -0
  75. package/.next/server/app/api/office-avatars/route_client-reference-manifest.js +1 -0
  76. package/.next/server/app/api/plugins/route.js +1 -1
  77. package/.next/server/app/api/project-trust/route.js +1 -1
  78. package/.next/server/app/api/projects/route.js +2 -2
  79. package/.next/server/app/api/runs/[runId]/route.js +1 -1
  80. package/.next/server/app/api/runs/route.js +1 -1
  81. package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
  82. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  83. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
  84. package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
  85. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  86. package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  87. package/.next/server/app/api/sessions/route.js +1 -1
  88. package/.next/server/app/api/sessions/search/route.js +1 -1
  89. package/.next/server/app/api/settings/route.js +1 -1
  90. package/.next/server/app/api/sidecars/[service]/[...path]/route.js +1 -1
  91. package/.next/server/app/api/skills/check/route.js +1 -1
  92. package/.next/server/app/api/skills/install/route.js +2 -2
  93. package/.next/server/app/api/skills/route.js +2 -2
  94. package/.next/server/app/api/skills/search/route.js +1 -1
  95. package/.next/server/app/api/skills/update/route.js +1 -1
  96. package/.next/server/app/api/theme/route.js +1 -1
  97. package/.next/server/app/api/tool-image/route.js +1 -1
  98. package/.next/server/app/api/update-maintenance/route.js +2 -2
  99. package/.next/server/app/api/updates/route.js +1 -1
  100. package/.next/server/app/api/web-access/recovery/route.js +1 -1
  101. package/.next/server/app/api/web-access/route.js +1 -1
  102. package/.next/server/app/api/web6/consults/route.js +1 -1
  103. package/.next/server/app/api/worktrees/route.js +1 -1
  104. package/.next/server/app/favicon.ico/route.js +1 -1
  105. package/.next/server/app/index.html +1 -1
  106. package/.next/server/app/index.rsc +7 -7
  107. package/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  108. package/.next/server/app/index.segments/_full.segment.rsc +7 -7
  109. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  110. package/.next/server/app/index.segments/_index.segment.rsc +3 -3
  111. package/.next/server/app/index.segments/_tree.segment.rsc +4 -4
  112. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  113. package/.next/server/app/office/page.js +2 -0
  114. package/.next/server/app/office/page.js.nft.json +1 -0
  115. package/.next/server/app/office/page_client-reference-manifest.js +1 -0
  116. package/.next/server/app/office-preview/page.js +2 -2
  117. package/.next/server/app/office-preview/page.js.nft.json +1 -1
  118. package/.next/server/app/office-preview/page_client-reference-manifest.js +1 -1
  119. package/.next/server/app/office-preview.html +1 -1
  120. package/.next/server/app/office-preview.rsc +4 -4
  121. package/.next/server/app/office-preview.segments/_full.segment.rsc +4 -4
  122. package/.next/server/app/office-preview.segments/_head.segment.rsc +1 -1
  123. package/.next/server/app/office-preview.segments/_index.segment.rsc +3 -3
  124. package/.next/server/app/office-preview.segments/_tree.segment.rsc +3 -3
  125. package/.next/server/app/office-preview.segments/office-preview/__PAGE__.segment.rsc +2 -2
  126. package/.next/server/app/office-preview.segments/office-preview.segment.rsc +1 -1
  127. package/.next/server/app/office.html +1 -0
  128. package/.next/server/app/office.meta +15 -0
  129. package/.next/server/app/office.rsc +23 -0
  130. package/.next/server/app/office.segments/_full.segment.rsc +23 -0
  131. package/.next/server/app/office.segments/_head.segment.rsc +6 -0
  132. package/.next/server/app/office.segments/_index.segment.rsc +7 -0
  133. package/.next/server/app/office.segments/_tree.segment.rsc +6 -0
  134. package/.next/server/app/office.segments/office/__PAGE__.segment.rsc +10 -0
  135. package/.next/server/app/office.segments/office.segment.rsc +5 -0
  136. package/.next/server/app/page.js +2 -28
  137. package/.next/server/app/page.js.nft.json +1 -1
  138. package/.next/server/app/page_client-reference-manifest.js +1 -1
  139. package/.next/server/app/recover/page.js +2 -2
  140. package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
  141. package/.next/server/app/recover.html +1 -1
  142. package/.next/server/app/recover.rsc +3 -3
  143. package/.next/server/app/recover.segments/_full.segment.rsc +3 -3
  144. package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
  145. package/.next/server/app/recover.segments/_index.segment.rsc +3 -3
  146. package/.next/server/app/recover.segments/_tree.segment.rsc +2 -2
  147. package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +1 -1
  148. package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
  149. package/.next/server/app-paths-manifest.json +11 -8
  150. package/.next/server/chunks/205.js +2 -2
  151. package/.next/server/chunks/5431.js +7 -0
  152. package/.next/server/chunks/5489.js +21 -0
  153. package/.next/server/chunks/6432.js +353 -0
  154. package/.next/server/chunks/7362.js +1 -0
  155. package/.next/server/functions-config-manifest.json +4 -0
  156. package/.next/server/middleware-build-manifest.js +1 -1
  157. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  158. package/.next/server/middleware.js +4 -4
  159. package/.next/server/pages/404.html +1 -1
  160. package/.next/server/pages/500.html +1 -1
  161. package/.next/server/server-reference-manifest.json +1 -1
  162. package/.next/static/chunks/6110-dffa6a7b1ada31e6.js +1 -0
  163. package/.next/static/chunks/726.66a45469e1fb0093.js +1 -0
  164. package/.next/static/chunks/9575-09e3873e0ee5ecfc.js +22 -0
  165. package/.next/static/chunks/app/_global-error/page-b73c548944bb1320.js +1 -0
  166. package/.next/static/chunks/app/api/agent/[id]/account/route-b73c548944bb1320.js +1 -0
  167. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-b73c548944bb1320.js +1 -0
  168. package/.next/static/chunks/app/api/agent/[id]/events/route-b73c548944bb1320.js +1 -0
  169. package/.next/static/chunks/app/api/agent/[id]/route-b73c548944bb1320.js +1 -0
  170. package/.next/static/chunks/app/api/agent/new/route-b73c548944bb1320.js +1 -0
  171. package/.next/static/chunks/app/api/agent/running/route-b73c548944bb1320.js +1 -0
  172. package/.next/static/chunks/app/api/attachments/route-b73c548944bb1320.js +1 -0
  173. package/.next/static/chunks/app/api/auth/all-providers/route-b73c548944bb1320.js +1 -0
  174. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-b73c548944bb1320.js +1 -0
  175. package/.next/static/chunks/app/api/auth/login/[provider]/route-b73c548944bb1320.js +1 -0
  176. package/.next/static/chunks/app/api/auth/logout/[provider]/route-b73c548944bb1320.js +1 -0
  177. package/.next/static/chunks/app/api/auth/providers/route-b73c548944bb1320.js +1 -0
  178. package/.next/static/chunks/app/api/cwd/browse/route-b73c548944bb1320.js +1 -0
  179. package/.next/static/chunks/app/api/cwd/validate/route-b73c548944bb1320.js +1 -0
  180. package/.next/static/chunks/app/api/default-cwd/route-b73c548944bb1320.js +1 -0
  181. package/.next/static/chunks/app/api/display-settings/route-b73c548944bb1320.js +1 -0
  182. package/.next/static/chunks/app/api/document-text/route-b73c548944bb1320.js +1 -0
  183. package/.next/static/chunks/app/api/experiments/route-b73c548944bb1320.js +1 -0
  184. package/.next/static/chunks/app/api/file-index/route-b73c548944bb1320.js +1 -0
  185. package/.next/static/chunks/app/api/files/[...path]/route-b73c548944bb1320.js +1 -0
  186. package/.next/static/chunks/app/api/git/diff/route-b73c548944bb1320.js +1 -0
  187. package/.next/static/chunks/app/api/git/status/route-b73c548944bb1320.js +1 -0
  188. package/.next/static/chunks/app/api/gpt6/handles/route-b73c548944bb1320.js +1 -0
  189. package/.next/static/chunks/app/api/gpt6/reply/route-b73c548944bb1320.js +1 -0
  190. package/.next/static/chunks/app/api/gpt6/token/route-b73c548944bb1320.js +1 -0
  191. package/.next/static/chunks/app/api/gpt6/web6-session/route-b73c548944bb1320.js +1 -0
  192. package/.next/static/chunks/app/api/home/route-b73c548944bb1320.js +1 -0
  193. package/.next/static/chunks/app/api/live/call/[callId]/route-b73c548944bb1320.js +1 -0
  194. package/.next/static/chunks/app/api/live/character-voice/route-b73c548944bb1320.js +1 -0
  195. package/.next/static/chunks/app/api/live/events/route-b73c548944bb1320.js +1 -0
  196. package/.next/static/chunks/app/api/live/offer/route-b73c548944bb1320.js +1 -0
  197. package/.next/static/chunks/app/api/live/voices/route-b73c548944bb1320.js +1 -0
  198. package/.next/static/chunks/app/api/lounge/events/route-b73c548944bb1320.js +1 -0
  199. package/.next/static/chunks/app/api/lounge/route-b73c548944bb1320.js +1 -0
  200. package/.next/static/chunks/app/api/mcp/route-b73c548944bb1320.js +1 -0
  201. package/.next/static/chunks/app/api/model-roles/route-b73c548944bb1320.js +1 -0
  202. package/.next/static/chunks/app/api/models/route-b73c548944bb1320.js +1 -0
  203. package/.next/static/chunks/app/api/models-config/catalog/route-b73c548944bb1320.js +1 -0
  204. package/.next/static/chunks/app/api/models-config/discover/route-b73c548944bb1320.js +1 -0
  205. package/.next/static/chunks/app/api/models-config/route-b73c548944bb1320.js +1 -0
  206. package/.next/static/chunks/app/api/models-config/test/route-b73c548944bb1320.js +1 -0
  207. package/.next/static/chunks/app/api/office-avatars/[id]/route-b73c548944bb1320.js +1 -0
  208. package/.next/static/chunks/app/api/office-avatars/route-b73c548944bb1320.js +1 -0
  209. package/.next/static/chunks/app/api/plugins/route-b73c548944bb1320.js +1 -0
  210. package/.next/static/chunks/app/api/project-trust/route-b73c548944bb1320.js +1 -0
  211. package/.next/static/chunks/app/api/projects/route-b73c548944bb1320.js +1 -0
  212. package/.next/static/chunks/app/api/runs/[runId]/route-b73c548944bb1320.js +1 -0
  213. package/.next/static/chunks/app/api/runs/route-b73c548944bb1320.js +1 -0
  214. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-b73c548944bb1320.js +1 -0
  215. package/.next/static/chunks/app/api/sessions/[id]/context/route-b73c548944bb1320.js +1 -0
  216. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-b73c548944bb1320.js +1 -0
  217. package/.next/static/chunks/app/api/sessions/[id]/export/route-b73c548944bb1320.js +1 -0
  218. package/.next/static/chunks/app/api/sessions/[id]/route-b73c548944bb1320.js +1 -0
  219. package/.next/static/chunks/app/api/sessions/[id]/state/route-b73c548944bb1320.js +1 -0
  220. package/.next/static/chunks/app/api/sessions/route-b73c548944bb1320.js +1 -0
  221. package/.next/static/chunks/app/api/sessions/search/route-b73c548944bb1320.js +1 -0
  222. package/.next/static/chunks/app/api/settings/route-b73c548944bb1320.js +1 -0
  223. package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-b73c548944bb1320.js +1 -0
  224. package/.next/static/chunks/app/api/skills/check/route-b73c548944bb1320.js +1 -0
  225. package/.next/static/chunks/app/api/skills/install/route-b73c548944bb1320.js +1 -0
  226. package/.next/static/chunks/app/api/skills/route-b73c548944bb1320.js +1 -0
  227. package/.next/static/chunks/app/api/skills/search/route-b73c548944bb1320.js +1 -0
  228. package/.next/static/chunks/app/api/skills/update/route-b73c548944bb1320.js +1 -0
  229. package/.next/static/chunks/app/api/theme/route-b73c548944bb1320.js +1 -0
  230. package/.next/static/chunks/app/api/tool-image/route-b73c548944bb1320.js +1 -0
  231. package/.next/static/chunks/app/api/update-maintenance/route-b73c548944bb1320.js +1 -0
  232. package/.next/static/chunks/app/api/updates/route-b73c548944bb1320.js +1 -0
  233. package/.next/static/chunks/app/api/web-access/recovery/route-b73c548944bb1320.js +1 -0
  234. package/.next/static/chunks/app/api/web-access/route-b73c548944bb1320.js +1 -0
  235. package/.next/static/chunks/app/api/web6/consults/route-b73c548944bb1320.js +1 -0
  236. package/.next/static/chunks/app/api/worktrees/route-b73c548944bb1320.js +1 -0
  237. package/.next/static/chunks/app/{layout-78440a2c8d3cd1c7.js → layout-3adbfd44301cba82.js} +1 -1
  238. package/.next/static/chunks/app/manifest.webmanifest/route-b73c548944bb1320.js +1 -0
  239. package/.next/static/chunks/app/office/page-424e244f1c7fcdc6.js +1 -0
  240. package/.next/static/chunks/app/office-preview/page-8a0f779f534c409f.js +1 -0
  241. package/.next/static/chunks/app/page-b43b2b8679ed66e2.js +1 -0
  242. package/.next/static/chunks/c9cb82ce.18c8cafa64d76bc3.js +1 -0
  243. package/.next/static/chunks/{main-50999e6ee5708e08.js → main-2603b128da53b28c.js} +1 -1
  244. package/.next/static/chunks/next/dist/client/components/builtin/app-error-b73c548944bb1320.js +1 -0
  245. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-b73c548944bb1320.js +1 -0
  246. package/.next/static/chunks/next/dist/client/components/builtin/not-found-b73c548944bb1320.js +1 -0
  247. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b73c548944bb1320.js +1 -0
  248. package/.next/static/chunks/webpack-fe8f1f81562a2b61.js +1 -0
  249. package/.next/static/css/{67b6e19482963224.css → 1a4cea7126dfb757.css} +1 -1
  250. package/.next/static/css/1ffe2d5d654f7eea.css +1 -0
  251. package/.next/static/css/8cdfcac889e08fd3.css +1 -0
  252. package/.next/static/do0UuZKXEeG2rQnEL-f1I/_buildManifest.js +1 -0
  253. package/.next/trace +107 -107
  254. package/.next/trace-build +1 -1
  255. package/.next/types/app/api/office-avatars/[id]/route.ts +351 -0
  256. package/.next/types/app/api/office-avatars/route.ts +351 -0
  257. package/.next/types/app/office/page.ts +87 -0
  258. package/.next/types/routes.d.ts +5 -2
  259. package/.next/types/validator.ts +27 -0
  260. package/README.md +10 -5
  261. package/Tools/CUELO_Setup/files/native-runtime-patch.js +3 -3
  262. package/Tools/CUELO_Setup/files/usage-server.js +56 -3
  263. package/Tools/OMP_Global_Config/agent/AGENTS.md +2 -0
  264. package/Tools/OMP_Global_Config/agent/RULES.md +2 -2
  265. package/Tools/OMP_Global_Config/agent/agents/maker.md +3 -1
  266. package/Tools/OMP_Global_Config/agent/extensions/lib/maker-routing.ts +5 -2
  267. package/Tools/OMP_Global_Config/agent/extensions/skim.ts +2 -2
  268. package/Tools/OMP_Global_Config/agent/prompt-copies/AGENTS.en.md +3 -1
  269. package/Tools/OMP_Global_Config/agent/prompt-copies/RULES.en.md +3 -3
  270. package/Tools/OMP_Global_Config/agent/rules/harness-policy.json +12 -8
  271. package/Tools/OMP_Global_Config/agent/rules/omp-harness.md +5 -0
  272. package/Tools/OMP_Global_Config/agent/rules/subagent.md +28 -4
  273. package/Tools/OMP_Global_Config/agent/sop/_writer.md +2 -0
  274. package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +576 -1
  275. package/package.json +8 -7
  276. package/.next/server/chunks/1933.js +0 -353
  277. package/.next/server/chunks/2607.js +0 -1
  278. package/.next/static/3xAqEONTnox8I-4Te8HCx/_buildManifest.js +0 -1
  279. package/.next/static/chunks/8637.5c189b15878e878b.js +0 -1
  280. package/.next/static/chunks/9889-4e472951b0a45120.js +0 -1
  281. package/.next/static/chunks/app/_global-error/page-2bfa6c2cae0dc17e.js +0 -1
  282. package/.next/static/chunks/app/api/agent/[id]/account/route-2bfa6c2cae0dc17e.js +0 -1
  283. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-2bfa6c2cae0dc17e.js +0 -1
  284. package/.next/static/chunks/app/api/agent/[id]/events/route-2bfa6c2cae0dc17e.js +0 -1
  285. package/.next/static/chunks/app/api/agent/[id]/route-2bfa6c2cae0dc17e.js +0 -1
  286. package/.next/static/chunks/app/api/agent/new/route-2bfa6c2cae0dc17e.js +0 -1
  287. package/.next/static/chunks/app/api/agent/running/route-2bfa6c2cae0dc17e.js +0 -1
  288. package/.next/static/chunks/app/api/attachments/route-2bfa6c2cae0dc17e.js +0 -1
  289. package/.next/static/chunks/app/api/auth/all-providers/route-2bfa6c2cae0dc17e.js +0 -1
  290. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-2bfa6c2cae0dc17e.js +0 -1
  291. package/.next/static/chunks/app/api/auth/login/[provider]/route-2bfa6c2cae0dc17e.js +0 -1
  292. package/.next/static/chunks/app/api/auth/logout/[provider]/route-2bfa6c2cae0dc17e.js +0 -1
  293. package/.next/static/chunks/app/api/auth/providers/route-2bfa6c2cae0dc17e.js +0 -1
  294. package/.next/static/chunks/app/api/cwd/browse/route-2bfa6c2cae0dc17e.js +0 -1
  295. package/.next/static/chunks/app/api/cwd/validate/route-2bfa6c2cae0dc17e.js +0 -1
  296. package/.next/static/chunks/app/api/default-cwd/route-2bfa6c2cae0dc17e.js +0 -1
  297. package/.next/static/chunks/app/api/display-settings/route-2bfa6c2cae0dc17e.js +0 -1
  298. package/.next/static/chunks/app/api/document-text/route-2bfa6c2cae0dc17e.js +0 -1
  299. package/.next/static/chunks/app/api/experiments/route-2bfa6c2cae0dc17e.js +0 -1
  300. package/.next/static/chunks/app/api/file-index/route-2bfa6c2cae0dc17e.js +0 -1
  301. package/.next/static/chunks/app/api/files/[...path]/route-2bfa6c2cae0dc17e.js +0 -1
  302. package/.next/static/chunks/app/api/git/diff/route-2bfa6c2cae0dc17e.js +0 -1
  303. package/.next/static/chunks/app/api/git/status/route-2bfa6c2cae0dc17e.js +0 -1
  304. package/.next/static/chunks/app/api/gpt6/handles/route-2bfa6c2cae0dc17e.js +0 -1
  305. package/.next/static/chunks/app/api/gpt6/reply/route-2bfa6c2cae0dc17e.js +0 -1
  306. package/.next/static/chunks/app/api/gpt6/token/route-2bfa6c2cae0dc17e.js +0 -1
  307. package/.next/static/chunks/app/api/gpt6/web6-session/route-2bfa6c2cae0dc17e.js +0 -1
  308. package/.next/static/chunks/app/api/home/route-2bfa6c2cae0dc17e.js +0 -1
  309. package/.next/static/chunks/app/api/live/call/[callId]/route-2bfa6c2cae0dc17e.js +0 -1
  310. package/.next/static/chunks/app/api/live/character-voice/route-2bfa6c2cae0dc17e.js +0 -1
  311. package/.next/static/chunks/app/api/live/events/route-2bfa6c2cae0dc17e.js +0 -1
  312. package/.next/static/chunks/app/api/live/offer/route-2bfa6c2cae0dc17e.js +0 -1
  313. package/.next/static/chunks/app/api/live/voices/route-2bfa6c2cae0dc17e.js +0 -1
  314. package/.next/static/chunks/app/api/lounge/events/route-2bfa6c2cae0dc17e.js +0 -1
  315. package/.next/static/chunks/app/api/lounge/route-2bfa6c2cae0dc17e.js +0 -1
  316. package/.next/static/chunks/app/api/mcp/route-2bfa6c2cae0dc17e.js +0 -1
  317. package/.next/static/chunks/app/api/model-roles/route-2bfa6c2cae0dc17e.js +0 -1
  318. package/.next/static/chunks/app/api/models/route-2bfa6c2cae0dc17e.js +0 -1
  319. package/.next/static/chunks/app/api/models-config/catalog/route-2bfa6c2cae0dc17e.js +0 -1
  320. package/.next/static/chunks/app/api/models-config/discover/route-2bfa6c2cae0dc17e.js +0 -1
  321. package/.next/static/chunks/app/api/models-config/route-2bfa6c2cae0dc17e.js +0 -1
  322. package/.next/static/chunks/app/api/models-config/test/route-2bfa6c2cae0dc17e.js +0 -1
  323. package/.next/static/chunks/app/api/plugins/route-2bfa6c2cae0dc17e.js +0 -1
  324. package/.next/static/chunks/app/api/project-trust/route-2bfa6c2cae0dc17e.js +0 -1
  325. package/.next/static/chunks/app/api/projects/route-2bfa6c2cae0dc17e.js +0 -1
  326. package/.next/static/chunks/app/api/runs/[runId]/route-2bfa6c2cae0dc17e.js +0 -1
  327. package/.next/static/chunks/app/api/runs/route-2bfa6c2cae0dc17e.js +0 -1
  328. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-2bfa6c2cae0dc17e.js +0 -1
  329. package/.next/static/chunks/app/api/sessions/[id]/context/route-2bfa6c2cae0dc17e.js +0 -1
  330. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-2bfa6c2cae0dc17e.js +0 -1
  331. package/.next/static/chunks/app/api/sessions/[id]/export/route-2bfa6c2cae0dc17e.js +0 -1
  332. package/.next/static/chunks/app/api/sessions/[id]/route-2bfa6c2cae0dc17e.js +0 -1
  333. package/.next/static/chunks/app/api/sessions/[id]/state/route-2bfa6c2cae0dc17e.js +0 -1
  334. package/.next/static/chunks/app/api/sessions/route-2bfa6c2cae0dc17e.js +0 -1
  335. package/.next/static/chunks/app/api/sessions/search/route-2bfa6c2cae0dc17e.js +0 -1
  336. package/.next/static/chunks/app/api/settings/route-2bfa6c2cae0dc17e.js +0 -1
  337. package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-2bfa6c2cae0dc17e.js +0 -1
  338. package/.next/static/chunks/app/api/skills/check/route-2bfa6c2cae0dc17e.js +0 -1
  339. package/.next/static/chunks/app/api/skills/install/route-2bfa6c2cae0dc17e.js +0 -1
  340. package/.next/static/chunks/app/api/skills/route-2bfa6c2cae0dc17e.js +0 -1
  341. package/.next/static/chunks/app/api/skills/search/route-2bfa6c2cae0dc17e.js +0 -1
  342. package/.next/static/chunks/app/api/skills/update/route-2bfa6c2cae0dc17e.js +0 -1
  343. package/.next/static/chunks/app/api/theme/route-2bfa6c2cae0dc17e.js +0 -1
  344. package/.next/static/chunks/app/api/tool-image/route-2bfa6c2cae0dc17e.js +0 -1
  345. package/.next/static/chunks/app/api/update-maintenance/route-2bfa6c2cae0dc17e.js +0 -1
  346. package/.next/static/chunks/app/api/updates/route-2bfa6c2cae0dc17e.js +0 -1
  347. package/.next/static/chunks/app/api/web-access/recovery/route-2bfa6c2cae0dc17e.js +0 -1
  348. package/.next/static/chunks/app/api/web-access/route-2bfa6c2cae0dc17e.js +0 -1
  349. package/.next/static/chunks/app/api/web6/consults/route-2bfa6c2cae0dc17e.js +0 -1
  350. package/.next/static/chunks/app/api/worktrees/route-2bfa6c2cae0dc17e.js +0 -1
  351. package/.next/static/chunks/app/manifest.webmanifest/route-2bfa6c2cae0dc17e.js +0 -1
  352. package/.next/static/chunks/app/office-preview/page-68828399eb58177b.js +0 -1
  353. package/.next/static/chunks/app/page-a4c4acecc034872f.js +0 -22
  354. package/.next/static/chunks/next/dist/client/components/builtin/app-error-2bfa6c2cae0dc17e.js +0 -1
  355. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-2bfa6c2cae0dc17e.js +0 -1
  356. package/.next/static/chunks/next/dist/client/components/builtin/not-found-2bfa6c2cae0dc17e.js +0 -1
  357. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-2bfa6c2cae0dc17e.js +0 -1
  358. package/.next/static/chunks/webpack-aba44445f0ef2ed9.js +0 -1
  359. package/.next/static/css/aab5fc8ab1b53780.css +0 -1
  360. package/.next/static/css/d6462eb5a4d2cb8c.css +0 -1
  361. /package/.next/static/{3xAqEONTnox8I-4Te8HCx → do0UuZKXEeG2rQnEL-f1I}/_ssgManifest.js +0 -0
@@ -78,6 +78,13 @@ const OPUS55_ROW_18410 = {
78
78
  patched: OPUS55_ROW_18410_PATCHED,
79
79
  };
80
80
 
81
+ /**
82
+ * #310의 18.5.1 no-op 후보(RETIRE). upstream #14168이 이 행에 prefixBinding과 binding controls를 둘 다 넣어 18.4.6 적용본과
83
+ * tps(93)만 다르다. 18.4.6 후보의 marker는 tps 뒤 조각이라 이 순정에서도 applied로 읽히고, 그러면 --revert가 없는 patched를
84
+ * 찾다 실패하므로 18.4.6 후보는 이 행이 있는 파일에서 빠진다(EDITS 항목의 excludes).
85
+ */
86
+ const OPUS55_ROW_1851 = OPUS55_ROW_1846.patched.replace('"tps":95.2,', '"tps":93,');
87
+
81
88
  /** 각 항목: 원본 앵커를 찾아 patched 로 바꾼다. marker 가 있으면 이미 적용된 것으로 본다. */
82
89
  const EDITS = [
83
90
  {
@@ -786,6 +793,8 @@ Project-wide validation is the main agent's job, run once after all subagents la
786
793
  // 페이지를 닫지 않으므로, 만들어진 작업 탭도 사용자가 직접 닫는다.
787
794
  file: "src/tools/browser/tab-supervisor.ts",
788
795
  marker: "createRelayTab",
796
+ // 18.5.1(#13375)은 pickElectronTarget 에 relayJson·signal 을 더했다. 사용자 탭 채택은 그대로라 새 탭 의미는 유지한다(ADAPT).
797
+ excludes: 'relayJson: browser.kind.kind === "relay"',
789
798
  anchor: ` // Connected and relay browsers are user-driven. When no target is requested,
790
799
  // adopt the visible tab and avoid raising it before screenshots. An explicit
791
800
  // target may be backgrounded, so retain activation for target-correct pixels.
@@ -811,6 +820,40 @@ Project-wide validation is the main agent's job, run once after all subagents la
811
820
  matcher: opts.target,
812
821
  preferVisible: !activateForScreenshot,
813
822
  });`,
823
+ alternates: [{
824
+ file: "src/tools/browser/tab-supervisor.ts",
825
+ requires: 'relayJson: browser.kind.kind === "relay"',
826
+ marker: "createRelayTab",
827
+ anchor: ` // Connected and relay browsers are user-driven. When no target is requested,
828
+ // adopt the visible tab and avoid raising it before screenshots. An explicit
829
+ // target may be backgrounded, so retain activation for target-correct pixels.
830
+ const userDriven = browser.kind.kind === "connected" || browser.kind.kind === "relay";
831
+ const activateForScreenshot = !userDriven || !shouldPreserveConnectedBrowserFocus(opts.target);
832
+ const page = await pickElectronTarget(browser.browser, {
833
+ matcher: opts.target,
834
+ preferVisible: !activateForScreenshot,
835
+ relayJson: browser.kind.kind === "relay" ? browser.kind.cdpUrl : undefined,
836
+ signal: opts.signal,
837
+ });`,
838
+ patched: ` // Connected and relay browsers are user-driven. An explicit target may be
839
+ // backgrounded, so retain activation for target-correct pixels.
840
+ const userDriven = browser.kind.kind === "connected" || browser.kind.kind === "relay";
841
+ // Relay with no target used to adopt the user's visible tab and navigate it.
842
+ // Open our own tab instead (\`newPage\` = \`Target.createTarget\`, which the
843
+ // relay bridge implements with \`chrome.tabs.create\`). An explicit target
844
+ // still selects an existing tab, and reopening the same name still reuses
845
+ // this tab. Still attach mode: release keeps the page, it is never closed.
846
+ const createRelayTab = browser.kind.kind === "relay" && shouldPreserveConnectedBrowserFocus(opts.target);
847
+ const activateForScreenshot = createRelayTab || !userDriven || !shouldPreserveConnectedBrowserFocus(opts.target);
848
+ const page = createRelayTab
849
+ ? await browser.browser.newPage()
850
+ : await pickElectronTarget(browser.browser, {
851
+ matcher: opts.target,
852
+ preferVisible: !activateForScreenshot,
853
+ relayJson: browser.kind.kind === "relay" ? browser.kind.cdpUrl : undefined,
854
+ signal: opts.signal,
855
+ });`,
856
+ }],
814
857
  },
815
858
  {
816
859
  // 도구 프롬프트가 "target 없으면 visible 탭을 채택한다"고 명시한다.
@@ -919,6 +962,9 @@ export interface IrcBridgeHost {
919
962
  // 위 항목의 기록 지점. 같은 파일의 두 번째 편집이므로 marker 를 분리한다.
920
963
  file: "src/session/irc-bridge.ts",
921
964
  marker: "this.queueParentSteerRelay({ steered, record })",
965
+ // 18.5.1(#13914)은 fromParent 를 앞에서 계산하고 본문을 escapeHarnessTags 로 감싼다. streaming steer 분기는 여전히
966
+ // 관찰자를 설치하지 않으므로 빚 기록은 그대로 필요하다(ADAPT).
967
+ excludes: "const fromParent = AgentRegistry.global().get(msg.to)?.parentId === msg.from;",
922
968
  anchor: ` if (streaming) {
923
969
  const recipientParentId = AgentRegistry.global().get(msg.to)?.parentId;
924
970
  if (recipientParentId === msg.from) {
@@ -962,6 +1008,52 @@ export interface IrcBridgeHost {
962
1008
  this.#host.adoptParentSteerForRunningTurn();
963
1009
  }
964
1010
  } else {`,
1011
+ alternates: [{
1012
+ file: "src/session/irc-bridge.ts",
1013
+ requires: "const fromParent = AgentRegistry.global().get(msg.to)?.parentId === msg.from;",
1014
+ marker: "this.queueParentSteerRelay({ steered, record })",
1015
+ anchor: ` if (streaming) {
1016
+ if (fromParent) {
1017
+ this.#host.agent.steer({
1018
+ role: "user",
1019
+ content: prompt.render(parentIrcSteerTemplate, { from: msg.from, message: envelopeBody }),
1020
+ attribution: "agent",
1021
+ timestamp: msg.ts,
1022
+ steering: true,
1023
+ });
1024
+ } else {`,
1025
+ patched: ` if (streaming) {
1026
+ if (fromParent) {
1027
+ const steered: AgentMessage = {
1028
+ role: "user",
1029
+ content: prompt.render(parentIrcSteerTemplate, { from: msg.from, message: envelopeBody }),
1030
+ attribution: "agent",
1031
+ timestamp: msg.ts,
1032
+ steering: true,
1033
+ };
1034
+ this.#host.agent.steer(steered);
1035
+ // The turn that consumes this steer - the running one, or the
1036
+ // continuation that resumes it when it strands past the loop's
1037
+ // final queue poll - owes the parent a \`<task-result>\` if it ends
1038
+ // in a \`yield\`. The wake branch below gets that from its observer;
1039
+ // this branch installs none, and a kept-alive subagent's spawn job
1040
+ // settled long ago, so its later yields reached nobody. Park the
1041
+ // obligation against \`steered\` itself: agent-core holds that exact
1042
+ // object until a turn consumes it, so the settle-time reconciliation
1043
+ // can tell "this steer was answered" from "some other queue item is
1044
+ // pending". A relay itself is an answer, never a new obligation (it
1045
+ // would ping-pong two idle peers).
1046
+ if (msg.wakeRelay !== true) {
1047
+ this.queueParentSteerRelay({ steered, record });
1048
+ // The running turn may be the one that consumes it, and nothing
1049
+ // else would then answer: the spawn job settled long ago and the
1050
+ // continuation bracket only covers turns that START owing a
1051
+ // steer. Let the session bracket the turn now; it decides at
1052
+ // settle, from the queue, whether this turn owned the answer.
1053
+ this.#host.adoptParentSteerForRunningTurn();
1054
+ }
1055
+ } else {`,
1056
+ }],
965
1057
  },
966
1058
  {
967
1059
  // 세션 경계. 전환이 큐를 비우면 그 transcript 에 속한 relay 빚도 함께 물러나고,
@@ -1173,6 +1265,9 @@ export interface IrcBridgeHost {
1173
1265
  // turn 시작에서 observer 를 열고, #endInFlight 의 settle 콜백에서 닫는다.
1174
1266
  file: "src/session/agent-session.ts",
1175
1267
  marker: "const steerObservation = this.#beginIrcSteerContinuationObservation()",
1268
+ // 18.5.1(#14143)은 agent_end 가 낸 continue 를 기다렸다 새로 시작하고 attempt 에 turnEnded 를 단다. bracket 은
1269
+ // 실제로 새 turn 을 시작하는 #beginInFlight 자리에만 걸므로 그 의미는 같다(ADAPT).
1270
+ excludes: "turnEnded: boolean;",
1176
1271
  anchor: ` this.#beginInFlight();
1177
1272
  const coalescedSources = new Set([options.source]);
1178
1273
  const promise = this.#runAgentContinue(signal, request, coalescedSources);
@@ -1218,6 +1313,58 @@ export interface IrcBridgeHost {
1218
1313
  }
1219
1314
  this.#handleAgentContinueOutcome(outcome, request);
1220
1315
  } finally {`,
1316
+ alternates: [{
1317
+ file: "src/session/agent-session.ts",
1318
+ requires: "turnEnded: boolean;",
1319
+ marker: "const steerObservation = this.#beginIrcSteerContinuationObservation()",
1320
+ anchor: ` this.#beginInFlight();
1321
+ const coalescedSources = new Set([options.source]);
1322
+ const promise = this.#runAgentContinue(signal, request, coalescedSources);
1323
+ const attempt: ActiveAgentContinue = {
1324
+ schedulerToken: request.schedulerToken,
1325
+ turnEnded: false,
1326
+ source: options.source,
1327
+ coalescedSources,
1328
+ promise,
1329
+ };
1330
+ this.#activeAgentContinue = attempt;
1331
+ try {
1332
+ this.#handleAgentContinueOutcome(await promise, request);
1333
+ } finally {`,
1334
+ patched: ` this.#beginInFlight();
1335
+ // A parent IRC steer that missed the running turn's final queue poll
1336
+ // strands in the agent-core queue, and this drain is what resumes it.
1337
+ // For a kept-alive subagent that continuation is a full autonomous
1338
+ // turn whose \`yield\` republishes agent://<id>, yet it was the one
1339
+ // turn with no monitor bracket — the wake observer is installed only
1340
+ // by #wakeForIrc and the spawn job settled long ago — so its terminal
1341
+ // result notified nobody. Bracket it with the same observer: the
1342
+ // steering parent gets exactly one <task-result>, and
1343
+ // relayWakeTurnOutput still suppresses it when the agent already
1344
+ // answered them itself.
1345
+ const steerObservation = this.#beginIrcSteerContinuationObservation();
1346
+ const coalescedSources = new Set([options.source]);
1347
+ const promise = this.#runAgentContinue(signal, request, coalescedSources);
1348
+ const attempt: ActiveAgentContinue = {
1349
+ schedulerToken: request.schedulerToken,
1350
+ turnEnded: false,
1351
+ source: options.source,
1352
+ coalescedSources,
1353
+ promise,
1354
+ };
1355
+ this.#activeAgentContinue = attempt;
1356
+ let steerObservationError: unknown;
1357
+ try {
1358
+ const outcome = await promise;
1359
+ if (steerObservation) {
1360
+ // The turn never ran: re-arm the obligation so the next
1361
+ // continuation still owes the parent its answer.
1362
+ if (outcome.status === "skipped") this.#irc.queueParentSteerRelay(...steerObservation.entries);
1363
+ else if (outcome.status === "failed") steerObservationError = outcome.error;
1364
+ }
1365
+ this.#handleAgentContinueOutcome(outcome, request);
1366
+ } finally {`,
1367
+ }],
1221
1368
  },
1222
1369
  {
1223
1370
  // 위 bracket 의 닫는 쪽. wake 경로(#wakeForIrc)와 같이 settle 콜백에서 닫아야
@@ -1374,6 +1521,47 @@ export interface IrcBridgeHost {
1374
1521
  this.#ircTurnBracketOpen = false;
1375
1522
  try {
1376
1523
  await finishObservation?.(turnError, undefined, this.#takeAdoptedParentSteerRecords());`,
1524
+ // 18.5.1(#13703)은 endInFlight() 뒤 settleAsyncWork() 를 기다린 다음 관찰자를 닫아, async 후속 turn 의 yield 까지
1525
+ // 같은 monitor 가 본다. bracket 도 그 구간 끝까지 열어 둔다: 먼저 닫으면 그 사이 continuation 이 관찰자를 하나 더 열고
1526
+ // 관찰자 시작이 공유 yield 상태(resetYieldTurnState)를 지운다. settle 은 agent streaming 만 기다리므로, 그 뒤에도
1527
+ // turn 이 진행 중이면(continuation 이 #beginInFlight 와 agent.continue 사이의 await 에 있음) 그 turn 의 settle
1528
+ // 콜백에서 닫아 그 turn 이 소비한 adopted steer 까지 한 번에 답한다(ADAPT).
1529
+ alternates: [{
1530
+ file: "src/session/agent-session.ts",
1531
+ marker: "const finishWakeObservation = async (): Promise<void> => {",
1532
+ anchor: ` try {
1533
+ await this.settleAsyncWork();
1534
+ } catch (error) {
1535
+ logger.warn("IRC wake async-work settle failed", { error: String(error) });
1536
+ }
1537
+ try {
1538
+ await finishObservation?.(turnError);
1539
+ } catch (error) {
1540
+ logger.warn("IRC wake turn observer failed to finish", { error: String(error) });
1541
+ }`,
1542
+ patched: ` try {
1543
+ await this.settleAsyncWork();
1544
+ } catch (error) {
1545
+ logger.warn("IRC wake async-work settle failed", { error: String(error) });
1546
+ }
1547
+ // The bracket stays open across the settle pause above: this one
1548
+ // monitor owns every turn in it, so a continuation that resumes a
1549
+ // stranded parent steer opens no second observer (starting one resets
1550
+ // the shared yield state). The settle waits for agent streaming only;
1551
+ // a turn still in flight past it (a continuation between
1552
+ // #beginInFlight and agent.continue) is closed at its own settle, so
1553
+ // the adopted steers it consumes ride this one finalization.
1554
+ const finishWakeObservation = async (): Promise<void> => {
1555
+ this.#ircTurnBracketOpen = false;
1556
+ try {
1557
+ await finishObservation?.(turnError, undefined, this.#takeAdoptedParentSteerRecords());
1558
+ } catch (error) {
1559
+ logger.warn("IRC wake turn observer failed to finish", { error: String(error) });
1560
+ }
1561
+ };
1562
+ if (this.#promptInFlightCount > 0) this.#inFlightSettledCallbacks.push(finishWakeObservation);
1563
+ else await finishWakeObservation();`,
1564
+ }],
1377
1565
  },
1378
1566
  {
1379
1567
  // 18.2.1은 relay 호출을 `finally`로 옮기고 실패·취소·빈 turn·finalize 오류까지
@@ -1452,6 +1640,9 @@ export interface IrcBridgeHost {
1452
1640
  // `tools/wait.ts` 로 옮겼다(buildJobResult 의 6번째 인자가 agents, async/job-control.ts:226-233).
1453
1641
  file: "src/tools/wait.ts",
1454
1642
  marker: "runningAgentsOutsideJobs,",
1643
+ // 18.5.1 은 wait 가 자기 job·service 만 기다리게 하고 빈 결과(nothingToWaitForResult)를 오류로 바꿨다. buildJobResult 의
1644
+ // 6번째 인자 agents 는 그대로라 job 결과에 job row 없는 SubAgent 를 싣는 의미는 유지한다(ADAPT).
1645
+ requires: "nothingToWaitForResult",
1455
1646
  anchor: `import { buildJobResult, nothingToWaitForResult, snapshotJobs, undeliveredJobs } from "../async/job-control";`,
1456
1647
  patched: `import {
1457
1648
  buildJobResult,
@@ -1460,11 +1651,18 @@ export interface IrcBridgeHost {
1460
1651
  snapshotJobs,
1461
1652
  undeliveredJobs,
1462
1653
  } from "../async/job-control";`,
1654
+ alternates: [{
1655
+ file: "src/tools/wait.ts",
1656
+ marker: `import { buildJobResult, runningAgentsOutsideJobs, snapshotJobs, undeliveredJobs } from "../async/job-control";`,
1657
+ anchor: `import { buildJobResult, snapshotJobs, undeliveredJobs } from "../async/job-control";`,
1658
+ patched: `import { buildJobResult, runningAgentsOutsideJobs, snapshotJobs, undeliveredJobs } from "../async/job-control";`,
1659
+ }],
1463
1660
  },
1464
1661
  {
1465
1662
  // 이미 정산됐으나 아직 전달되지 않은 결과를 즉시 돌려주는 자리.
1466
1663
  file: "src/tools/wait.ts",
1467
1664
  marker: "Same roster source as the empty result and `read proc://`",
1665
+ requires: "nothingToWaitForResult",
1468
1666
  anchor: ` return buildJobResult(this.session, manager, "wait", [...undelivered, ...jobs], []);`,
1469
1667
  patched: ` // Same roster source as the empty result and \`read proc://\`: the 6th
1470
1668
  // argument (\`agents\`); the 5th stays the empty cancel-outcome list.
@@ -1476,6 +1674,23 @@ export interface IrcBridgeHost {
1476
1674
  [],
1477
1675
  runningAgentsOutsideJobs(this.session),
1478
1676
  );`,
1677
+ // 18.5.1: 같은 줄이 루프 밖으로 나와 들여쓰기가 한 단계 얕다. 그 줄은 18.5.0 줄의 부분 문자열이라 excludes 로 가른다.
1678
+ alternates: [{
1679
+ file: "src/tools/wait.ts",
1680
+ excludes: "nothingToWaitForResult",
1681
+ marker: "Same roster source as `read proc://`",
1682
+ anchor: ` return buildJobResult(this.session, manager, "wait", [...undelivered, ...jobs], []);`,
1683
+ patched: ` // Same roster source as \`read proc://\`: the 6th argument (\`agents\`);
1684
+ // the 5th stays the empty cancel-outcome list.
1685
+ return buildJobResult(
1686
+ this.session,
1687
+ manager,
1688
+ "wait",
1689
+ [...undelivered, ...jobs],
1690
+ [],
1691
+ runningAgentsOutsideJobs(this.session),
1692
+ );`,
1693
+ }],
1479
1694
  },
1480
1695
  {
1481
1696
  // 사건(job 종료)·30분 상한 뒤의 반환. 여기가 Main 이 "## Still Running" 만 받고
@@ -8140,8 +8355,15 @@ export function summarizeAutoLearnSaved(messages: readonly AgentMessage[], from:
8140
8355
  // 있을 때만 이 정확한 코드를 거절 ack 로 돌려 기존 claim.reject() → 다음 경계 일반 전달 경로를
8141
8356
  // 타게 하고, 같은 소켓은 이후 steer 를 전송하지 않는다(새 소켓은 다시 한 번 시도한다).
8142
8357
  // 대기자가 없거나 다른 코드인 error 프레임은 그대로 스트림에 push 한다.
8358
+ // 18.5.1 RETIRE(#13705): upstream 이 같은 프레임을 처리한다(openai-codex-responses.ts). onmessage 가 steer 대기자를
8359
+ // 거절(#refuseSteerWaiters, :4084-4088)한 뒤 프레임을 스트림에 그대로 push 하고, 이 코드는 재시도 가능 오류
8360
+ // (CODEX_RETRYABLE_EVENT_CODES, :276-288)라 #recoverStreamError(:2762)가 #stopSteeringOnNativeLaneRejection(:2747)으로
8361
+ // 세션 단위 steeringUnsupported 를 세우고 죽은 소켓을 버린 뒤 #tryRetryProviderError 로 새 소켓에서 재생한다.
8362
+ // 이후 #startSteering(:2477)은 steer 를 다시 보내지 않는다. 우리 swallow(return)가 남으면 그 복구 경로를 가로채므로
8363
+ // 세 항목 모두 18.5.1 에서는 upstream 줄의 no-op 후보만 성립한다(본 후보 excludes).
8143
8364
  {
8144
8365
  file: "../pi-ai/src/providers/openai-codex-responses.ts",
8366
+ excludes: "CODEX_NATIVE_LANE_STEER_REJECTED_CODE",
8145
8367
  marker: "#steerUnsupported = false;",
8146
8368
  anchor: ` /** Steering whose automatic successor the active attach request is reading. */
8147
8369
  #attachSteerIds?: ReadonlySet<string>;`,
@@ -8149,9 +8371,17 @@ export function summarizeAutoLearnSaved(messages: readonly AgentMessage[], from:
8149
8371
  #attachSteerIds?: ReadonlySet<string>;
8150
8372
  /** The server answered a steer with unsupported_native_inflight_message; this socket no longer submits steers. */
8151
8373
  #steerUnsupported = false;`,
8374
+ alternates: [{
8375
+ file: "../pi-ai/src/providers/openai-codex-responses.ts",
8376
+ requires: "CODEX_NATIVE_LANE_STEER_REJECTED_CODE",
8377
+ marker: "\t/** The server refused steering for this session (native turn lane); later responses are not steered. */\n\tsteeringUnsupported?: boolean;",
8378
+ anchor: "\t/** The server refused steering for this session (native turn lane); later responses are not steered. */\n\tsteeringUnsupported?: boolean;",
8379
+ patched: "\t/** The server refused steering for this session (native turn lane); later responses are not steered. */\n\tsteeringUnsupported?: boolean;",
8380
+ }],
8152
8381
  },
8153
8382
  {
8154
8383
  file: "../pi-ai/src/providers/openai-codex-responses.ts",
8384
+ excludes: "CODEX_NATIVE_LANE_STEER_REJECTED_CODE",
8155
8385
  marker: "this.#steerWaiters.shift()?.resolve({",
8156
8386
  anchor: ` // Steering acknowledgements belong to the submitter, not to the
8157
8387
  // response stream they interleave with.
@@ -8174,9 +8404,17 @@ export function summarizeAutoLearnSaved(messages: readonly AgentMessage[], from:
8174
8404
  // Steering acknowledgements belong to the submitter, not to the
8175
8405
  // response stream they interleave with.
8176
8406
  if (typeof parsed.type === "string" && parsed.type.startsWith("response.steer.")) {`,
8407
+ alternates: [{
8408
+ file: "../pi-ai/src/providers/openai-codex-responses.ts",
8409
+ requires: "CODEX_NATIVE_LANE_STEER_REJECTED_CODE",
8410
+ marker: "\t\t\t\tif (parsed.type === \"error\" && parsed.code === CODEX_NATIVE_LANE_STEER_REJECTED_CODE) {\n\t\t\t\t\tthis.#refuseSteerWaiters(",
8411
+ anchor: "\t\t\t\tif (parsed.type === \"error\" && parsed.code === CODEX_NATIVE_LANE_STEER_REJECTED_CODE) {\n\t\t\t\t\tthis.#refuseSteerWaiters(",
8412
+ patched: "\t\t\t\tif (parsed.type === \"error\" && parsed.code === CODEX_NATIVE_LANE_STEER_REJECTED_CODE) {\n\t\t\t\t\tthis.#refuseSteerWaiters(",
8413
+ }],
8177
8414
  },
8178
8415
  {
8179
8416
  file: "../pi-ai/src/providers/openai-codex-responses.ts",
8417
+ excludes: "CODEX_NATIVE_LANE_STEER_REJECTED_CODE",
8180
8418
  marker: "code: \"unsupported_native_inflight_message\", message: undefined",
8181
8419
  anchor: ` return Promise.reject(new CodexWebSocketTransportError(\`websocket connection is unavailable\`));
8182
8420
  }
@@ -8187,6 +8425,13 @@ export function summarizeAutoLearnSaved(messages: readonly AgentMessage[], from:
8187
8425
  return Promise.resolve({ accepted: false, code: "unsupported_native_inflight_message", message: undefined });
8188
8426
  }
8189
8427
  const event = { type: "response.steer", previous_response_id: previousResponseId, input };`,
8428
+ alternates: [{
8429
+ file: "../pi-ai/src/providers/openai-codex-responses.ts",
8430
+ requires: "CODEX_NATIVE_LANE_STEER_REJECTED_CODE",
8431
+ marker: "\t\t\tstate?.steeringUnsupported ||\n",
8432
+ anchor: "\t\t\tstate?.steeringUnsupported ||\n",
8433
+ patched: "\t\t\tstate?.steeringUnsupported ||\n",
8434
+ }],
8190
8435
  },
8191
8436
  // 2026-09-30 사용자 요청(0.6.6): 일반 구현 선택 질문만 `ask.timeout` 무응답 시 추천안으로 진행한다.
8192
8437
  // 자동선택은 긍정 opt-in(`autoSelectRecommended: true`)이고 유효한 `recommended`가 필수다. 한 호출의
@@ -8305,7 +8550,12 @@ function parentSubagentServiceTiers(
8305
8550
  marker: OPUS55_ROW_18410.patched.replace(OPUS55_TPS_18410, OPUS55_TPS_18412),
8306
8551
  anchor: OPUS55_ROW_18410.anchor.replace(OPUS55_TPS_18410, OPUS55_TPS_18412),
8307
8552
  patched: OPUS55_ROW_18410.patched.replace(OPUS55_TPS_18410, OPUS55_TPS_18412),
8308
- alternates: [OPUS55_ROW_18410, OPUS55_ROW_1846],
8553
+ // 18.5.1: 위 OPUS55_ROW_1851 no-op(RETIRE). 18.4.6 후보는 그 행이 있으면 성립하지 않는다.
8554
+ alternates: [
8555
+ OPUS55_ROW_18410,
8556
+ { ...OPUS55_ROW_1846, excludes: OPUS55_ROW_1851 },
8557
+ { file: "../pi-catalog/src/models.json", marker: OPUS55_ROW_1851, anchor: OPUS55_ROW_1851, patched: OPUS55_ROW_1851 },
8558
+ ],
8309
8559
  },
8310
8560
  {
8311
8561
  // 모든 provider의 Opus 5.5 규칙 계보에 prefixBinding(Sonnet 5.5 규칙과 같은 모양). 18.4.10은 upstream #14019가 kdl:61에
@@ -8328,6 +8578,12 @@ function parentSubagentServiceTiers(
8328
8578
  marker: '{"source":"classes/anthropic.kdl:60","class":"anthropic","family":"opus","revision":[{"op":">=","revision":"5.5.0"},{"op":"<","revision":"6.0.0"}],"wire":{"supportsForcedToolChoice":false},"thinking":{"prefixBinding":true}}',
8329
8579
  anchor: '{"source":"classes/anthropic.kdl:60","class":"anthropic","family":"opus","revision":[{"op":">=","revision":"5.5.0"},{"op":"<","revision":"6.0.0"}],"wire":{"supportsForcedToolChoice":false}}',
8330
8580
  patched: '{"source":"classes/anthropic.kdl:60","class":"anthropic","family":"opus","revision":[{"op":">=","revision":"5.5.0"},{"op":"<","revision":"6.0.0"}],"wire":{"supportsForcedToolChoice":false},"thinking":{"prefixBinding":true}}',
8581
+ }, {
8582
+ // 18.5.1: 같은 upstream 규칙이 kdl:85(뒤 Sonnet 규칙 kdl:101)로 옮겨졌다. 그 줄의 no-op.
8583
+ file: "../pi-catalog/src/compat/rules.json",
8584
+ marker: '{"source":"classes/anthropic.kdl:85","class":"anthropic","family":"opus","revision":[{"op":">=","revision":"5.5.0"},{"op":"<","revision":"6.0.0"}],"wire":{"supportsForcedToolChoice":false},"thinking":{"prefixBinding":true}},{"source":"classes/anthropic.kdl:101",',
8585
+ anchor: '{"source":"classes/anthropic.kdl:85","class":"anthropic","family":"opus","revision":[{"op":">=","revision":"5.5.0"},{"op":"<","revision":"6.0.0"}],"wire":{"supportsForcedToolChoice":false},"thinking":{"prefixBinding":true}},{"source":"classes/anthropic.kdl:101",',
8586
+ patched: '{"source":"classes/anthropic.kdl:85","class":"anthropic","family":"opus","revision":[{"op":">=","revision":"5.5.0"},{"op":"<","revision":"6.0.0"}],"wire":{"supportsForcedToolChoice":false},"thinking":{"prefixBinding":true}},{"source":"classes/anthropic.kdl:101",',
8331
8587
  }],
8332
8588
  },
8333
8589
  {
@@ -8358,6 +8614,13 @@ function parentSubagentServiceTiers(
8358
8614
  marker: '{"source":"cuelo:opus-5.5-thinking-binding","class":"anthropic","providers":["anthropic","cloudflare-ai-gateway","google-vertex"],"family":"opus","revision":[{"op":">=","revision":"5.5.0"},{"op":"<","revision":"6.0.0"}],"wire":{"supportsThinkingBindingControls":true}}',
8359
8615
  anchor: '{"source":"classes/anthropic.kdl:106","class":"anthropic","providers":["anthropic","cloudflare-ai-gateway","google-vertex"],"family":"sonnet","revision":[{"op":">=","revision":"5.5.0"}],"wire":{"supportsMidConversationSystem":true,"supportsMidConversationToolChanges":true,"supportsTurnScopedSystem":true,"supportsPerMessageEffort":true,"supportsThinkingBindingControls":true}}',
8360
8616
  patched: '{"source":"classes/anthropic.kdl:106","class":"anthropic","providers":["anthropic","cloudflare-ai-gateway","google-vertex"],"family":"sonnet","revision":[{"op":">=","revision":"5.5.0"}],"wire":{"supportsMidConversationSystem":true,"supportsMidConversationToolChanges":true,"supportsTurnScopedSystem":true,"supportsPerMessageEffort":true,"supportsThinkingBindingControls":true}},{"source":"cuelo:opus-5.5-thinking-binding","class":"anthropic","providers":["anthropic","cloudflare-ai-gateway","google-vertex"],"family":"opus","revision":[{"op":">=","revision":"5.5.0"},{"op":"<","revision":"6.0.0"}],"wire":{"supportsThinkingBindingControls":true}}',
8617
+ }, {
8618
+ // 18.5.1 RETIRE(#14168): upstream 이 같은 provider 범위(anthropic·cloudflare)의 Opus 5.5 binding controls 규칙을
8619
+ // kdl:175 로 넣었다. 그 upstream 규칙의 no-op.
8620
+ file: "../pi-catalog/src/compat/rules.json",
8621
+ marker: '{"source":"classes/anthropic.kdl:175","class":"anthropic","providers":["anthropic","cloudflare-ai-gateway"],"family":"opus","revision":[{"op":">=","revision":"5.5.0"},{"op":"<","revision":"6.0.0"}],"wire":{"supportsThinkingBindingControls":true}}',
8622
+ anchor: '{"source":"classes/anthropic.kdl:175","class":"anthropic","providers":["anthropic","cloudflare-ai-gateway"],"family":"opus","revision":[{"op":">=","revision":"5.5.0"},{"op":"<","revision":"6.0.0"}],"wire":{"supportsThinkingBindingControls":true}}',
8623
+ patched: '{"source":"classes/anthropic.kdl:175","class":"anthropic","providers":["anthropic","cloudflare-ai-gateway"],"family":"opus","revision":[{"op":">=","revision":"5.5.0"},{"op":"<","revision":"6.0.0"}],"wire":{"supportsThinkingBindingControls":true}}',
8361
8624
  }],
8362
8625
  },
8363
8626
  // 위 세 항목과 짝: modelOverrides의 thinking은 buildModel이 규칙으로 채운 thinking을 통째로 덮어써서, override가
@@ -8541,6 +8804,18 @@ function parentSubagentServiceTiers(
8541
8804
  marker: 'if(!i.endsWith(".jsonl")||i.includes(".bak")||XTe(i))continue;let a=i.slice(0,-6),',
8542
8805
  anchor: 'if(!i.endsWith(".jsonl")||i.includes(".bak")||XTe(i))continue;let a=i.slice(0,-6),',
8543
8806
  patched: 'if(!i.endsWith(".jsonl")||i.includes(".bak")||XTe(i))continue;let a=i.slice(0,-6),',
8807
+ }, {
8808
+ // 18.5.1 번들의 같은 upstream 조건(ERe = isAdvisorTranscriptName) no-op.
8809
+ file: "dist/cli.js",
8810
+ marker: 'if(!i.endsWith(".jsonl")||i.includes(".bak")||ERe(i))continue;let a=i.slice(0,-6),',
8811
+ anchor: 'if(!i.endsWith(".jsonl")||i.includes(".bak")||ERe(i))continue;let a=i.slice(0,-6),',
8812
+ patched: 'if(!i.endsWith(".jsonl")||i.includes(".bak")||ERe(i))continue;let a=i.slice(0,-6),',
8813
+ }, {
8814
+ // 18.6.0 번들의 같은 upstream 조건(_Re = isAdvisorTranscriptName) no-op. 이름만 바뀌었다.
8815
+ file: "dist/cli.js",
8816
+ marker: 'if(!i.endsWith(".jsonl")||i.includes(".bak")||_Re(i))continue;let a=i.slice(0,-6),',
8817
+ anchor: 'if(!i.endsWith(".jsonl")||i.includes(".bak")||_Re(i))continue;let a=i.slice(0,-6),',
8818
+ patched: 'if(!i.endsWith(".jsonl")||i.includes(".bak")||_Re(i))continue;let a=i.slice(0,-6),',
8544
8819
  }],
8545
8820
  },
8546
8821
  // 18.4.5 는 /ratchet 을 새로 넣으면서 `src/ratchet/prelude.ts`(코드)와 `prelude.js`(eval 텍스트 자산)를 같은 stem 으로
@@ -8794,6 +9069,9 @@ class HarmonyLeakInterruption extends Error {`,
8794
9069
  {
8795
9070
  file: "../pi-agent-core/src/agent-loop.ts",
8796
9071
  marker: "if (steerRestartController?.signal.aborted && !requestSignal?.aborted) await restartForSteering();",
9072
+ // 18.5.1(#13847)은 이 결과를 retainCompletedToolCalls·recoverTransientErrorToolTurn 로 감싼다. 재시작 판정은 그 정산 전
9073
+ // 같은 자리에 둔다(ADAPT). 두 판 적용본이 같은 marker 를 가지므로 그 upstream 호출로 가른다.
9074
+ excludes: "let trailing = recoverTransientErrorToolTurn(",
8797
9075
  anchor: ` try {
8798
9076
  let trailing = await response.result();`,
8799
9077
  patched: ` // CUELO P55: the iterator ended after a restart was requested; restart instead of finalizing.
@@ -8801,6 +9079,18 @@ class HarmonyLeakInterruption extends Error {`,
8801
9079
  steerRestartClosed = true;
8802
9080
  try {
8803
9081
  let trailing = await response.result();`,
9082
+ alternates: [{
9083
+ file: "../pi-agent-core/src/agent-loop.ts",
9084
+ requires: "let trailing = recoverTransientErrorToolTurn(",
9085
+ marker: "if (steerRestartController?.signal.aborted && !requestSignal?.aborted) await restartForSteering();",
9086
+ anchor: ` try {
9087
+ let trailing = recoverTransientErrorToolTurn(`,
9088
+ patched: ` // CUELO P55: the iterator ended after a restart was requested; restart instead of finalizing.
9089
+ if (steerRestartController?.signal.aborted && !requestSignal?.aborted) await restartForSteering();
9090
+ steerRestartClosed = true;
9091
+ try {
9092
+ let trailing = recoverTransientErrorToolTurn(`,
9093
+ }],
8804
9094
  },
8805
9095
  {
8806
9096
  file: "../pi-agent-core/src/agent-loop.ts",
@@ -8981,6 +9271,291 @@ class HarmonyLeakInterruption extends Error {`,
8981
9271
  anchor: "\t\t\t() => (hasSession ? session.getAsyncJobSnapshot() : null),",
8982
9272
  patched: "\t\t\toptions => (hasSession ? session.getAsyncJobSnapshot(options) : null),",
8983
9273
  },
9274
+ {
9275
+ // 2026-10-04 사용자 결정: 실행 중 사용자 steering·follow-up 으로 목표가 늘어나면 Main auto 강도를 다시
9276
+ // 판정한다. 같은 턴 안에서는 올리기만 하고(raiseOnly), 다음 새 사용자 턴은 평소처럼 양방향으로 다시 고른다.
9277
+ // 근거: 같은 계정의 effort 변경은 캐시를 대체로 유지했다(Astra medium→high→medium, Opus 자동 변경 4건 중 3건).
9278
+ // 아래 여섯 항목: 분류 옵션·raise 판정(model-controls), 턴 입력 보관·갱신과 큐 입력 연결(agent-session).
9279
+ // 검증: core-agent-thinking-test.ts [raise-only], core-steer-auto-thinking-test.ts.
9280
+ file: "src/session/model-controls.ts",
9281
+ marker: "options?: { raiseOnly?: boolean },",
9282
+ anchor: "\tasync applyAutoThinkingLevel(promptText: string, generation: number, solutionSpace?: string): Promise<void> {",
9283
+ patched: `\tasync applyAutoThinkingLevel(
9284
+ promptText: string,
9285
+ generation: number,
9286
+ solutionSpace?: string,
9287
+ // CUELO: 실행 중 사용자 steering·follow-up 재판정은 같은 턴 안에서 강도를 올리기만 한다.
9288
+ options?: { raiseOnly?: boolean },
9289
+ ): Promise<void> {`,
9290
+ },
9291
+ {
9292
+ file: "src/session/model-controls.ts",
9293
+ marker: "// CUELO: raise-only",
9294
+ anchor: "\t\tif (effort === undefined) return;\n",
9295
+ patched: `\t\tif (effort === undefined) return;
9296
+ // CUELO: raise-only — 같은 턴의 재판정은 현재보다 높을 때만 반영한다(상태·기록·이벤트 모두 그대로).
9297
+ if (
9298
+ options?.raiseOnly &&
9299
+ this.#thinkingLevel !== undefined &&
9300
+ THINKING_EFFORTS.indexOf(effort) <= THINKING_EFFORTS.indexOf(this.#thinkingLevel as Effort)
9301
+ ) {
9302
+ return;
9303
+ }
9304
+ `,
9305
+ },
9306
+ {
9307
+ file: "src/session/agent-session.ts",
9308
+ marker: "\t#autoThinkingTurnText: string | undefined;",
9309
+ anchor: "\t#promptGeneration = 0;\n",
9310
+ patched: `\t#promptGeneration = 0;
9311
+ // CUELO: 이번 사용자 턴의 auto 분류 입력. 실행 중 사용자 steering·follow-up 이 이어 붙어 재판정 입력이 된다.
9312
+ #autoThinkingTurnText: string | undefined;
9313
+ `,
9314
+ },
9315
+ {
9316
+ file: "src/session/agent-session.ts",
9317
+ marker: "\t\t\tif (isUserTurn) this.#autoThinkingTurnText = expandedText;",
9318
+ anchor: "\t\t\tif (this.isAutoThinking && isUserTurn) {\n\t\t\t\tawait this.#models.applyAutoThinkingLevel(expandedText, generation, options?.solutionSpace);",
9319
+ // 턴 중에 auto 로 바꿔도 이전 턴 문장이 섞이지 않도록 모든 사용자 턴에서 보관한다.
9320
+ patched: "\t\t\tif (isUserTurn) this.#autoThinkingTurnText = expandedText;\n\t\t\tif (this.isAutoThinking && isUserTurn) {\n\t\t\t\tawait this.#models.applyAutoThinkingLevel(expandedText, generation, options?.solutionSpace);",
9321
+ },
9322
+ {
9323
+ // CUELO 화면의 실행 중 입력은 steer()가 아니라 prompt(..., { streamingBehavior })로 들어와 이 함수에서
9324
+ // 바로 큐에 들어간다. 그래서 연결은 steer()·followUp()이 아니라 모든 사용자 큐 입력이 지나는 여기 한 곳이다.
9325
+ file: "src/session/agent-session.ts",
9326
+ marker: "#raiseAutoThinkingForQueuedInput(text: string",
9327
+ anchor: "\tasync #queueUserMessage(\n",
9328
+ patched: `\t/**
9329
+ * CUELO: 실행 중 사용자 steering·follow-up 으로 목표가 늘어나면 auto 강도를 다시 판정한다.
9330
+ * 이번 턴 요청에 지금까지의 입력을 이어 붙여 분류하고, 같은 턴 안에서는 올리기만 한다.
9331
+ * 분류(최대 4초)를 기다리지 않으므로 메시지 전달은 늦어지지 않고, 결과는 다음 모델 요청부터 쓴다.
9332
+ * agent 가 넣은 메시지, aside, auto 가 아닌 세션(고정 effort 인 Maker 포함)은 건드리지 않는다.
9333
+ */
9334
+ #raiseAutoThinkingForQueuedInput(text: string, attribution: MessageAttribution): void {
9335
+ if (!this.isAutoThinking || attribution === "agent" || !text.trim()) return;
9336
+ const request = this.#autoThinkingTurnText ? \`\${this.#autoThinkingTurnText}\\n\\n\${text}\` : text;
9337
+ this.#autoThinkingTurnText = request;
9338
+ void this.#models.applyAutoThinkingLevel(request, this.#promptGeneration, undefined, { raiseOnly: true });
9339
+ }
9340
+
9341
+ async #queueUserMessage(
9342
+ `,
9343
+ },
9344
+ {
9345
+ file: "src/session/agent-session.ts",
9346
+ marker: "\t\tif (mode !== \"aside\") this.#raiseAutoThinkingForQueuedInput(text, attribution);",
9347
+ anchor: "\t\tconst attribution = options?.attribution ?? \"user\";\n",
9348
+ patched: "\t\tconst attribution = options?.attribution ?? \"user\";\n\t\tif (mode !== \"aside\") this.#raiseAutoThinkingForQueuedInput(text, attribution);\n",
9349
+ },
9350
+ // CUELO 계정 자리(2026-10-04). upstream oauth.accounts()의 position은 활성 credential 배열 index라서,
9351
+ // 한 계정이 인증 실패로 비활성화되면 뒤 계정이 앞 자리로 당겨진다(RIN 자리 0이 비면 MIO 계정이 RIN이 된다).
9352
+ // 재로그인도 새 행을 만들고 tombstone을 지우므로 [11, 12]처럼 순서가 뒤집힌다. 자리 = (활성 OAuth id ∪
9353
+ // 인증 실패로 자리를 지키는 tombstone id) 오름차순 index로 바꾸고, 같은 identity의 재로그인은 그
9354
+ // tombstone 행을 같은 id로 되살린다. 로그아웃(deleted by user)·교체(replaced by)는 자리를 반납한다.
9355
+ // accounts()는 계속 활성 계정만 돌려주므로 position과 배열 index가 다를 수 있다.
9356
+ {
9357
+ file: "../pi-ai/src/auth/sqlite-credential-store.ts",
9358
+ marker: "function holdsOAuthSeat(row: AuthRow): boolean {",
9359
+ anchor: "\nfunction matchesReplacementCredential(\n",
9360
+ patched: `
9361
+ /**
9362
+ * CUELO: a tombstone that keeps its account seat (\`oauth.accounts\` position) — an OAuth row
9363
+ * disabled by an auth failure. Replacement and logout tombstones give their seat up.
9364
+ */
9365
+ function holdsOAuthSeat(row: AuthRow): boolean {
9366
+ return (
9367
+ row.credential_type !== "api_key" &&
9368
+ row.disabled_cause !== null &&
9369
+ !/^(replaced by|deleted by user)/i.test(row.disabled_cause)
9370
+ );
9371
+ }
9372
+
9373
+ function matchesReplacementCredential(
9374
+ `,
9375
+ },
9376
+ {
9377
+ file: "../pi-ai/src/auth/sqlite-credential-store.ts",
9378
+ marker: "\t\t\t// CUELO: an auth-failed account that logs in again revives its own tombstone in place",
9379
+ anchor: "\t\t\t\tthis.#deleteStmt.run(\"replaced by newer credential\", row.id);\n\t\t\t}\n\n\t\t\tif (targetId === null) {\n\t\t\t\tconst row = this.#insertStmt.get(\n",
9380
+ patched: `\t\t\t\tthis.#deleteStmt.run("replaced by newer credential", row.id);
9381
+ \t\t\t}
9382
+
9383
+ \t\t\t// CUELO: an auth-failed account that logs in again revives its own tombstone in place
9384
+ \t\t\t// instead of getting a new row, so its credential id, account seat and the session pins
9385
+ \t\t\t// that name it survive re-authentication. Upstream's replacement matcher decides identity:
9386
+ \t\t\t// another member of the same org never claims the row. Blocks on the id stay as they were.
9387
+ \t\t\tif (targetId === null && item.type === "oauth") {
9388
+ \t\t\t\tfor (const row of this.#listDisabledByProviderStmt.all(providerName) as AuthRow[]) {
9389
+ \t\t\t\t\tif (!holdsOAuthSeat(row)) continue;
9390
+ \t\t\t\t\tconst identityKey = resolveRowCredentialIdentityKey(providerName, row);
9391
+ \t\t\t\t\tif (!matchesReplacementCredential(providerName, deserializeCredential(row), identityKey, item)) continue;
9392
+ \t\t\t\t\tconst revived = this.#db
9393
+ \t\t\t\t\t\t.query(
9394
+ \t\t\t\t\t\t\t\`UPDATE auth_credentials SET credential_type = ?, data = ?, identity_key = ?, disabled_cause = NULL, updated_at = \${SQLITE_NOW_EPOCH} WHERE id = ? AND disabled_cause IS NOT NULL\`,
9395
+ \t\t\t\t\t\t)
9396
+ \t\t\t\t\t\t.run(serialized.credentialType, serialized.data, serialized.identityKey, row.id) as { changes: number };
9397
+ \t\t\t\t\tif (revived.changes > 0) {
9398
+ \t\t\t\t\t\ttargetId = row.id;
9399
+ \t\t\t\t\t\tbreak;
9400
+ \t\t\t\t\t}
9401
+ \t\t\t\t}
9402
+ \t\t\t}
9403
+
9404
+ \t\t\tif (targetId === null) {
9405
+ \t\t\t\tconst row = this.#insertStmt.get(
9406
+ `,
9407
+ },
9408
+ {
9409
+ file: "../pi-ai/src/auth/sqlite-credential-store.ts",
9410
+ marker: "\tlistOAuthSeatHolderIds(provider: string): number[] {",
9411
+ anchor: "\tasync listDisabledCredentials(provider?: string): Promise<DisabledCredentialSummary[]> {\n",
9412
+ patched: `\t/**
9413
+ \t * CUELO: ids of \`provider\` tombstones that keep their account seat — auth failures whose
9414
+ \t * identity no active row has taken over (the superseded-tombstone purge's own rule).
9415
+ \t */
9416
+ \tlistOAuthSeatHolderIds(provider: string): number[] {
9417
+ \t\tconst active: AuthCredential[] = [];
9418
+ \t\tfor (const row of this.#listActiveByProviderStmt.all(provider) as AuthRow[]) {
9419
+ \t\t\tconst credential = deserializeCredential(row);
9420
+ \t\t\tif (credential?.type === "oauth") active.push(credential);
9421
+ \t\t}
9422
+ \t\tconst ids: number[] = [];
9423
+ \t\tfor (const row of this.#listDisabledByProviderStmt.all(provider) as AuthRow[]) {
9424
+ \t\t\tif (!holdsOAuthSeat(row)) continue;
9425
+ \t\t\tconst credential = deserializeCredential(row);
9426
+ \t\t\tif (credential === null) continue;
9427
+ \t\t\tconst identityKey = resolveRowCredentialIdentityKey(provider, row);
9428
+ \t\t\tif (active.some(current => matchesReplacementCredential(provider, credential, identityKey, current))) continue;
9429
+ \t\t\tids.push(row.id);
9430
+ \t\t}
9431
+ \t\treturn ids;
9432
+ \t}
9433
+
9434
+ \tasync listDisabledCredentials(provider?: string): Promise<DisabledCredentialSummary[]> {
9435
+ `,
9436
+ },
9437
+ {
9438
+ file: "../pi-ai/src/auth/store.ts",
9439
+ marker: "\tlistOAuthSeatHolderIds?(provider: string): number[];",
9440
+ anchor: "\tlistDisabledCredentials?(provider?: string, signal?: AbortSignal): Promise<DisabledCredentialSummary[]>;\n",
9441
+ patched: "\tlistDisabledCredentials?(provider?: string, signal?: AbortSignal): Promise<DisabledCredentialSummary[]>;\n\t/** CUELO: ids of tombstones that keep their account seat. Local stores only; others keep upstream's compacted order. */\n\tlistOAuthSeatHolderIds?(provider: string): number[];\n",
9442
+ },
9443
+ {
9444
+ file: "../pi-ai/src/auth/pool.ts",
9445
+ marker: "\toauthSeatIds(provider: string): number[] {",
9446
+ anchor: "\t/**\n\t * Disabled credential tombstones for display surfaces (`omp usage`,\n\t * broker `GET /v1/credentials/disabled`). Empty when the backing store\n\t * keeps no tombstones or the remote broker predates the endpoint.\n\t */\n\tasync listDisabled(",
9447
+ patched: `\t/**
9448
+ \t * CUELO: the account seats of \`provider\` — active OAuth rows plus tombstones that keep their
9449
+ \t * seat, by id. \`oauth.accounts\` reports an account's index here as its \`position\`, so an
9450
+ \t * auth-failed account leaves its seat empty instead of shifting every later account.
9451
+ \t */
9452
+ \toauthSeatIds(provider: string): number[] {
9453
+ \t\tconst ids = new Set<number>();
9454
+ \t\tfor (const entry of this.entries(provider)) if (entry.credential.type === "oauth") ids.add(entry.id);
9455
+ \t\tfor (const id of this.#store.listOAuthSeatHolderIds?.(provider) ?? []) ids.add(id);
9456
+ \t\treturn [...ids].sort((a, b) => a - b);
9457
+ \t}
9458
+
9459
+ \t/**
9460
+ \t * Disabled credential tombstones for display surfaces (\`omp usage\`,
9461
+ \t * broker \`GET /v1/credentials/disabled\`). Empty when the backing store
9462
+ \t * keeps no tombstones or the remote broker predates the endpoint.
9463
+ \t */
9464
+ \tasync listDisabled(`,
9465
+ },
9466
+ {
9467
+ file: "../pi-ai/src/auth/types.ts",
9468
+ marker: "\toauthSeatIds(provider: string): number[];",
9469
+ anchor: "\tlistDisabled(provider?: string, signal?: AbortSignal): Promise<DisabledCredentialSummary[]>;\n",
9470
+ patched: "\tlistDisabled(provider?: string, signal?: AbortSignal): Promise<DisabledCredentialSummary[]>;\n\t/** CUELO: account seats by id — active OAuth rows plus auth-failed tombstones awaiting re-login. A seat's index is `OAuthAccountSummary.position`. */\n\toauthSeatIds(provider: string): number[];\n",
9471
+ },
9472
+ {
9473
+ file: "../pi-ai/src/auth/types.ts",
9474
+ marker: " * Returned by {@link AuthStorage.oauth.accounts}; `position` (0-based) is the\n * account seat.",
9475
+ anchor: " * Returned by {@link AuthStorage.oauth.accounts}; `position` (0-based) is the\n * selector accepted by {@link AuthStorage.oauth.accessById}.\n",
9476
+ patched: " * Returned by {@link AuthStorage.oauth.accounts}; `position` (0-based) is the\n * account seat. CUELO: an auth-failed account keeps its seat until it logs in again, so\n * positions can have gaps — select by `position` or `credentialId`, never by array index.\n",
9477
+ },
9478
+ {
9479
+ file: "../pi-ai/src/auth/types.ts",
9480
+ marker: "\t * order, WITHOUT refreshing any token. Each account's `position` (0-based) is its\n\t * account seat",
9481
+ anchor: "\t * order, WITHOUT refreshing any token. The array position (0-based) is the\n\t * selector accepted by {@link AuthStorage.oauth.accessById}; a \"pick the Nth\n\t * account\" UI should render `position + 1`.\n",
9482
+ patched: "\t * order, WITHOUT refreshing any token. Each account's `position` (0-based) is its\n\t * account seat; a \"pick the Nth account\" UI should render `position + 1`. CUELO: an\n\t * auth-failed account keeps its seat empty, so positions can have gaps.\n",
9483
+ },
9484
+ {
9485
+ file: "../pi-ai/src/auth/oauth.ts",
9486
+ marker: "\t * order, WITHOUT refreshing any token. Each account's `position` (0-based) is its\n\t * account seat",
9487
+ anchor: "\t * order, WITHOUT refreshing any token. The array position (0-based) is the\n\t * selector displayed by a \"pick the Nth account\" UI as `position + 1`.\n",
9488
+ patched: "\t * order, WITHOUT refreshing any token. Each account's `position` (0-based) is its\n\t * account seat, displayed by a \"pick the Nth account\" UI as `position + 1`. CUELO: an\n\t * auth-failed account keeps its seat empty, so positions can have gaps.\n",
9489
+ },
9490
+ {
9491
+ file: "../pi-ai/src/auth/oauth.ts",
9492
+ marker: "\t\tconst seats = this.#deps.pool.oauthSeatIds(provider);",
9493
+ anchor: "\t\treturn this.#getStoredOAuthSelections(provider).map((selection, position) => {\n\t\t\tconst active = selection.credentialId === activeCredentialId;\n\t\t\treturn {\n\t\t\t\tposition,\n",
9494
+ patched: `\t\t// CUELO: \`position\` is the account seat (CredentialPool.oauthSeatIds), not the index in this
9495
+ \t\t// active-only list, so a later account is never renumbered into an auth-failed account's seat.
9496
+ \t\tconst seats = this.#deps.pool.oauthSeatIds(provider);
9497
+ \t\treturn this.#getStoredOAuthSelections(provider).map(selection => {
9498
+ \t\t\tconst active = selection.credentialId === activeCredentialId;
9499
+ \t\t\treturn {
9500
+ \t\t\t\tposition: seats.indexOf(selection.credentialId),
9501
+ `,
9502
+ },
9503
+ {
9504
+ // 같은 org의 다른 사람 tombstone을 활성 계정이 숨기던 판정. upstream 주석("neither email nor
9505
+ // accountId contradicts")대로 email·accountId가 다르면 org가 같아도 다른 identity다.
9506
+ file: "src/cli/usage-cli.ts",
9507
+ marker: "\t\tif (summaryEmail && accountEmail) return summaryEmail === accountEmail;",
9508
+ anchor: "\t\tif (summaryEmail && accountEmail && summaryEmail === accountEmail) return true;\n\t\tif (summaryAccountId && accountAccountId && summaryAccountId === accountAccountId) return true;\n",
9509
+ patched: "\t\t// CUELO: a differing email or accountId is another person even inside one org (or a shared\n\t\t// Codex workspace id), so that member's auth failure stays visible.\n\t\tif (summaryEmail && accountEmail) return summaryEmail === accountEmail;\n\t\tif (summaryAccountId && accountAccountId) return summaryAccountId === accountAccountId;\n",
9510
+ },
9511
+ {
9512
+ // --list 가 position + 1 로 번호를 보여 주므로 --account 도 같은 번호(자리)로 고른다.
9513
+ file: "src/commands/token.ts",
9514
+ marker: "\t\t\t\tconst selected = n === undefined ? undefined : accounts.find(acct => acct.position === n - 1);",
9515
+ anchor: `\t\t\t\tconst n = flags.account;
9516
+ \t\t\t\tif (n === undefined || n < 1 || n > accounts.length) {
9517
+ \t\t\t\t\tprocess.stderr.write(
9518
+ \t\t\t\t\t\t\`\${chalk.red(\`Invalid --account \${n ?? "(missing)"}.\`)} Provider "\${providerName}" has \${accounts.length} OAuth account(s) (1-\${accounts.length}).\\n\`,
9519
+ \t\t\t\t\t);
9520
+ \t\t\t\t\tprocess.exitCode = 1;
9521
+ \t\t\t\t\treturn;
9522
+ \t\t\t\t}
9523
+ \t\t\t\tconst resolution = managedMcpOAuth
9524
+ \t\t\t\t\t? await resolveManagedMcpOAuthToken(authStorage, provider, {
9525
+ \t\t\t\t\t\t\tcredentialId: accounts[n - 1]?.credentialId,
9526
+ \t\t\t\t\t\t\tforceRefresh: flags["force-refresh"],
9527
+ \t\t\t\t\t\t})
9528
+ \t\t\t\t\t: await authStorage.oauth.accessById(provider, accounts[n - 1]!.credentialId, {
9529
+ `,
9530
+ patched: `\t\t\t\tconst n = flags.account;
9531
+ \t\t\t\t// CUELO: account numbers are seats (\`position + 1\`, as --list prints them); an auth-failed
9532
+ \t\t\t\t// account leaves its number empty instead of shifting the others.
9533
+ \t\t\t\tconst selected = n === undefined ? undefined : accounts.find(acct => acct.position === n - 1);
9534
+ \t\t\t\tif (n === undefined || selected === undefined) {
9535
+ \t\t\t\t\tprocess.stderr.write(
9536
+ \t\t\t\t\t\t\`\${chalk.red(\`Invalid --account \${n ?? "(missing)"}.\`)} Provider "\${providerName}" has OAuth account(s) \${accounts.map(acct => acct.position + 1).join(", ")}.\\n\`,
9537
+ \t\t\t\t\t);
9538
+ \t\t\t\t\tprocess.exitCode = 1;
9539
+ \t\t\t\t\treturn;
9540
+ \t\t\t\t}
9541
+ \t\t\t\tconst resolution = managedMcpOAuth
9542
+ \t\t\t\t\t? await resolveManagedMcpOAuthToken(authStorage, provider, {
9543
+ \t\t\t\t\t\t\tcredentialId: selected.credentialId,
9544
+ \t\t\t\t\t\t\tforceRefresh: flags["force-refresh"],
9545
+ \t\t\t\t\t\t})
9546
+ \t\t\t\t\t: await authStorage.oauth.accessById(provider, selected.credentialId, {
9547
+ `,
9548
+ },
9549
+ {
9550
+ // 첫 줄이 read 예산보다 크면 hashline 모드는 그 줄을 한 바이트도 내지 않고 거부 문구만 낸다. 그런데
9551
+ // upstream은 preview 크기를 전달량으로 보고해 "[Showing line 1 (partial, 150.0KB of 195.3KB)]"처럼
9552
+ // 모델이 받은 적 없는 150KB를 받았다고 말한다(2026-10-04 실측). 전달량은 본문에 실제로 실린 것만 센다.
9553
+ // :raw·hashline을 끈 모드의 preview, 재개 offset 미제공, 수집 예산은 그대로다.
9554
+ file: "src/tools/read.ts",
9555
+ marker: "\t\t\t\t\t// CUELO: hashline mode refuses the oversized line outright",
9556
+ anchor: "\t\t\t\t\tconst previewBytes = firstLineExceedsLimit ? (firstLinePreview?.bytes ?? 0) : 0;\n",
9557
+ patched: "\t\t\t\t\t// CUELO: hashline mode refuses the oversized line outright and delivers none of it, so its\n\t\t\t\t\t// notice must report 0 bytes shown, not the preview it never rendered.\n\t\t\t\t\tconst previewBytes =\n\t\t\t\t\t\tfirstLineExceedsLimit && (rawSelector || !displayMode.hashLines) ? (firstLinePreview?.bytes ?? 0) : 0;\n",
9558
+ },
8984
9559
  ];
8985
9560
  // EDITS 문자열의 줄 끝을 LF로 통일한다. 이 파일의 작업 사본이 CRLF여도 core 파일(LF)과
8986
9561
  // 비교·치환이 어긋나지 않는다. core 파일 자체의 줄 끝은 건드리지 않는다.