synabun 1.3.0 → 2.0.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 (1163) hide show
  1. package/CHANGELOG.md +205 -662
  2. package/LICENSE-COMMERCIAL.md +33 -0
  3. package/NOTICE +17 -0
  4. package/README.md +175 -853
  5. package/THIRD-PARTY-LICENSES.md +136 -0
  6. package/benchmarks/browser-live-results.json +79 -0
  7. package/benchmarks/browser-v2-results.json +258 -0
  8. package/benchmarks/fixtures/browser/README.md +57 -0
  9. package/benchmarks/fixtures/browser/page-state.json +132 -0
  10. package/benchmarks/fixtures/browser/social.json +92 -0
  11. package/benchmarks/fixtures/browser/target.json +319 -0
  12. package/benchmarks/fixtures/desktop/README.md +58 -0
  13. package/benchmarks/fixtures/desktop/abstention.json +59 -0
  14. package/benchmarks/fixtures/desktop/adversarial.json +22 -0
  15. package/benchmarks/fixtures/desktop/forbidden.json +93 -0
  16. package/benchmarks/fixtures/desktop/generate.mjs +1023 -0
  17. package/benchmarks/fixtures/desktop/target.json +136 -0
  18. package/bin/synabun.js +30 -0
  19. package/docs/whatsapp.md +325 -0
  20. package/hooks/claude-code/post-plan.mjs +613 -391
  21. package/hooks/claude-code/post-remember.mjs +246 -122
  22. package/hooks/claude-code/pre-compact.mjs +171 -110
  23. package/hooks/claude-code/pre-task.mjs +133 -0
  24. package/hooks/claude-code/pre-websearch.mjs +15 -4
  25. package/hooks/claude-code/prompt-origin.mjs +94 -0
  26. package/hooks/claude-code/prompt-submit.mjs +1244 -861
  27. package/hooks/claude-code/session-start.mjs +114 -156
  28. package/hooks/claude-code/shared.mjs +1228 -368
  29. package/hooks/claude-code/state.mjs +167 -0
  30. package/hooks/claude-code/stop.mjs +515 -140
  31. package/hooks/claude-code/subagent-start.mjs +154 -0
  32. package/hooks/claude-code/subagent-stop.mjs +102 -0
  33. package/hooks/claude-code/task-gate.mjs +150 -0
  34. package/launcher.mjs +40 -0
  35. package/lib/claude-hooks.js +137 -0
  36. package/lib/claude-usage-audit.js +141 -0
  37. package/lib/client-config-repair.js +145 -0
  38. package/lib/data-home-migration.js +502 -0
  39. package/lib/desktop-pwa.js +206 -0
  40. package/lib/external-tools.js +221 -0
  41. package/lib/first-launch-protection.js +245 -0
  42. package/lib/packaged-runtime.js +110 -0
  43. package/lib/paths.d.ts +21 -0
  44. package/lib/paths.js +103 -0
  45. package/lib/start-launcher.js +1309 -0
  46. package/mcp-server/dist/config.d.ts +22 -0
  47. package/mcp-server/dist/config.d.ts.map +1 -0
  48. package/mcp-server/dist/config.js +109 -0
  49. package/mcp-server/dist/config.js.map +1 -0
  50. package/mcp-server/dist/http.d.ts +30 -0
  51. package/mcp-server/dist/http.d.ts.map +1 -0
  52. package/mcp-server/dist/http.js +276 -0
  53. package/mcp-server/dist/http.js.map +1 -0
  54. package/mcp-server/dist/index.d.ts +48 -0
  55. package/mcp-server/dist/index.d.ts.map +1 -0
  56. package/mcp-server/dist/index.js +538 -0
  57. package/mcp-server/dist/index.js.map +1 -0
  58. package/mcp-server/dist/preload-http.d.ts +3 -0
  59. package/mcp-server/dist/preload-http.d.ts.map +1 -0
  60. package/mcp-server/dist/preload-http.js +28 -0
  61. package/mcp-server/dist/preload-http.js.map +1 -0
  62. package/mcp-server/dist/preload.d.ts +3 -0
  63. package/mcp-server/dist/preload.d.ts.map +1 -0
  64. package/mcp-server/dist/preload.js +32 -0
  65. package/mcp-server/dist/preload.js.map +1 -0
  66. package/mcp-server/dist/scripts/migrate-qdrant-to-sqlite.d.ts +19 -0
  67. package/mcp-server/dist/scripts/migrate-qdrant-to-sqlite.d.ts.map +1 -0
  68. package/mcp-server/dist/scripts/migrate-qdrant-to-sqlite.js +403 -0
  69. package/mcp-server/dist/scripts/migrate-qdrant-to-sqlite.js.map +1 -0
  70. package/mcp-server/dist/scripts/setup-embeddings.d.ts +3 -0
  71. package/mcp-server/dist/scripts/setup-embeddings.d.ts.map +1 -0
  72. package/mcp-server/dist/scripts/setup-embeddings.js +15 -0
  73. package/mcp-server/dist/scripts/setup-embeddings.js.map +1 -0
  74. package/mcp-server/dist/services/assistant-judgments.d.ts +79 -0
  75. package/mcp-server/dist/services/assistant-judgments.d.ts.map +1 -0
  76. package/mcp-server/dist/services/assistant-judgments.js +128 -0
  77. package/mcp-server/dist/services/assistant-judgments.js.map +1 -0
  78. package/mcp-server/dist/services/browser-assist-gate.d.ts +314 -0
  79. package/mcp-server/dist/services/browser-assist-gate.d.ts.map +1 -0
  80. package/mcp-server/dist/services/browser-assist-gate.js +344 -0
  81. package/mcp-server/dist/services/browser-assist-gate.js.map +1 -0
  82. package/mcp-server/dist/services/browser-assist.d.ts +104 -0
  83. package/mcp-server/dist/services/browser-assist.d.ts.map +1 -0
  84. package/mcp-server/dist/services/browser-assist.js +282 -0
  85. package/mcp-server/dist/services/browser-assist.js.map +1 -0
  86. package/mcp-server/dist/services/browser-bench.d.ts +772 -0
  87. package/mcp-server/dist/services/browser-bench.d.ts.map +1 -0
  88. package/mcp-server/dist/services/browser-bench.js +424 -0
  89. package/mcp-server/dist/services/browser-bench.js.map +1 -0
  90. package/mcp-server/dist/services/browser-judgments.d.ts +196 -0
  91. package/mcp-server/dist/services/browser-judgments.d.ts.map +1 -0
  92. package/mcp-server/dist/services/browser-judgments.js +363 -0
  93. package/mcp-server/dist/services/browser-judgments.js.map +1 -0
  94. package/mcp-server/dist/services/browser-risk.d.ts +166 -0
  95. package/mcp-server/dist/services/browser-risk.d.ts.map +1 -0
  96. package/mcp-server/dist/services/browser-risk.js +458 -0
  97. package/mcp-server/dist/services/browser-risk.js.map +1 -0
  98. package/mcp-server/dist/services/categories.d.ts +61 -0
  99. package/mcp-server/dist/services/categories.d.ts.map +1 -0
  100. package/mcp-server/dist/services/categories.js +377 -0
  101. package/mcp-server/dist/services/categories.js.map +1 -0
  102. package/mcp-server/dist/services/codex-config-heal.d.ts +49 -0
  103. package/mcp-server/dist/services/codex-config-heal.d.ts.map +1 -0
  104. package/mcp-server/dist/services/codex-config-heal.js +346 -0
  105. package/mcp-server/dist/services/codex-config-heal.js.map +1 -0
  106. package/mcp-server/dist/services/desktop-assist-gate.d.ts +198 -0
  107. package/mcp-server/dist/services/desktop-assist-gate.d.ts.map +1 -0
  108. package/mcp-server/dist/services/desktop-assist-gate.js +202 -0
  109. package/mcp-server/dist/services/desktop-assist-gate.js.map +1 -0
  110. package/mcp-server/dist/services/desktop-assist.d.ts +104 -0
  111. package/mcp-server/dist/services/desktop-assist.d.ts.map +1 -0
  112. package/mcp-server/dist/services/desktop-assist.js +266 -0
  113. package/mcp-server/dist/services/desktop-assist.js.map +1 -0
  114. package/mcp-server/dist/services/desktop-bench.d.ts +553 -0
  115. package/mcp-server/dist/services/desktop-bench.d.ts.map +1 -0
  116. package/mcp-server/dist/services/desktop-bench.js +311 -0
  117. package/mcp-server/dist/services/desktop-bench.js.map +1 -0
  118. package/mcp-server/dist/services/desktop-client.d.ts +23 -0
  119. package/mcp-server/dist/services/desktop-client.d.ts.map +1 -0
  120. package/mcp-server/dist/services/desktop-client.js +79 -0
  121. package/mcp-server/dist/services/desktop-client.js.map +1 -0
  122. package/mcp-server/dist/services/desktop-judgments.d.ts +125 -0
  123. package/mcp-server/dist/services/desktop-judgments.d.ts.map +1 -0
  124. package/mcp-server/dist/services/desktop-judgments.js +177 -0
  125. package/mcp-server/dist/services/desktop-judgments.js.map +1 -0
  126. package/mcp-server/dist/services/desktop-risk.d.ts +283 -0
  127. package/mcp-server/dist/services/desktop-risk.d.ts.map +1 -0
  128. package/mcp-server/dist/services/desktop-risk.js +605 -0
  129. package/mcp-server/dist/services/desktop-risk.js.map +1 -0
  130. package/mcp-server/dist/services/discord.d.ts +112 -0
  131. package/mcp-server/dist/services/discord.d.ts.map +1 -0
  132. package/mcp-server/dist/services/discord.js +477 -0
  133. package/mcp-server/dist/services/discord.js.map +1 -0
  134. package/mcp-server/dist/services/edit-stale.d.ts +81 -0
  135. package/mcp-server/dist/services/edit-stale.d.ts.map +1 -0
  136. package/mcp-server/dist/services/edit-stale.js +358 -0
  137. package/mcp-server/dist/services/edit-stale.js.map +1 -0
  138. package/mcp-server/dist/services/embedding-service.d.ts +16 -0
  139. package/mcp-server/dist/services/embedding-service.d.ts.map +1 -0
  140. package/mcp-server/dist/services/embedding-service.js +126 -0
  141. package/mcp-server/dist/services/embedding-service.js.map +1 -0
  142. package/mcp-server/dist/services/embedding-worker.d.ts +2 -0
  143. package/mcp-server/dist/services/embedding-worker.d.ts.map +1 -0
  144. package/mcp-server/dist/services/embedding-worker.js +52 -0
  145. package/mcp-server/dist/services/embedding-worker.js.map +1 -0
  146. package/mcp-server/dist/services/fb-regions.d.ts +71 -0
  147. package/mcp-server/dist/services/fb-regions.d.ts.map +1 -0
  148. package/mcp-server/dist/services/fb-regions.js +211 -0
  149. package/mcp-server/dist/services/fb-regions.js.map +1 -0
  150. package/mcp-server/dist/services/file-checksums.d.ts +22 -0
  151. package/mcp-server/dist/services/file-checksums.d.ts.map +1 -0
  152. package/mcp-server/dist/services/file-checksums.js +55 -0
  153. package/mcp-server/dist/services/file-checksums.js.map +1 -0
  154. package/mcp-server/dist/services/file-excerpt.d.ts +24 -0
  155. package/mcp-server/dist/services/file-excerpt.d.ts.map +1 -0
  156. package/mcp-server/dist/services/file-excerpt.js +65 -0
  157. package/mcp-server/dist/services/file-excerpt.js.map +1 -0
  158. package/mcp-server/dist/services/identity.d.ts +124 -0
  159. package/mcp-server/dist/services/identity.d.ts.map +1 -0
  160. package/mcp-server/dist/services/identity.js +241 -0
  161. package/mcp-server/dist/services/identity.js.map +1 -0
  162. package/mcp-server/dist/services/local-embeddings.d.ts +2 -0
  163. package/mcp-server/dist/services/local-embeddings.d.ts.map +1 -0
  164. package/mcp-server/dist/services/local-embeddings.js +3 -0
  165. package/mcp-server/dist/services/local-embeddings.js.map +1 -0
  166. package/mcp-server/dist/services/memory-client.d.ts +4 -0
  167. package/mcp-server/dist/services/memory-client.d.ts.map +1 -0
  168. package/mcp-server/dist/services/memory-client.js +27 -0
  169. package/mcp-server/dist/services/memory-client.js.map +1 -0
  170. package/mcp-server/dist/services/memory-judge-backfill.d.ts +135 -0
  171. package/mcp-server/dist/services/memory-judge-backfill.d.ts.map +1 -0
  172. package/mcp-server/dist/services/memory-judge-backfill.js +510 -0
  173. package/mcp-server/dist/services/memory-judge-backfill.js.map +1 -0
  174. package/mcp-server/dist/services/memory-judgments.d.ts +362 -0
  175. package/mcp-server/dist/services/memory-judgments.d.ts.map +1 -0
  176. package/mcp-server/dist/services/memory-judgments.js +674 -0
  177. package/mcp-server/dist/services/memory-judgments.js.map +1 -0
  178. package/mcp-server/dist/services/memory-maintenance.d.ts +108 -0
  179. package/mcp-server/dist/services/memory-maintenance.d.ts.map +1 -0
  180. package/mcp-server/dist/services/memory-maintenance.js +403 -0
  181. package/mcp-server/dist/services/memory-maintenance.js.map +1 -0
  182. package/mcp-server/dist/services/memory-retrieval.d.ts +66 -0
  183. package/mcp-server/dist/services/memory-retrieval.d.ts.map +1 -0
  184. package/mcp-server/dist/services/memory-retrieval.js +412 -0
  185. package/mcp-server/dist/services/memory-retrieval.js.map +1 -0
  186. package/mcp-server/dist/services/memory-schema.d.ts +16 -0
  187. package/mcp-server/dist/services/memory-schema.d.ts.map +1 -0
  188. package/mcp-server/dist/services/memory-schema.js +282 -0
  189. package/mcp-server/dist/services/memory-schema.js.map +1 -0
  190. package/mcp-server/dist/services/memory-sessions.d.ts +24 -0
  191. package/mcp-server/dist/services/memory-sessions.d.ts.map +1 -0
  192. package/mcp-server/dist/services/memory-sessions.js +110 -0
  193. package/mcp-server/dist/services/memory-sessions.js.map +1 -0
  194. package/mcp-server/dist/services/memory-triage.d.ts +60 -0
  195. package/mcp-server/dist/services/memory-triage.d.ts.map +1 -0
  196. package/mcp-server/dist/services/memory-triage.js +189 -0
  197. package/mcp-server/dist/services/memory-triage.js.map +1 -0
  198. package/mcp-server/dist/services/memory-verification.d.ts +24 -0
  199. package/mcp-server/dist/services/memory-verification.d.ts.map +1 -0
  200. package/mcp-server/dist/services/memory-verification.js +92 -0
  201. package/mcp-server/dist/services/memory-verification.js.map +1 -0
  202. package/mcp-server/dist/services/memory-writer.d.ts +26 -0
  203. package/mcp-server/dist/services/memory-writer.d.ts.map +1 -0
  204. package/mcp-server/dist/services/memory-writer.js +126 -0
  205. package/mcp-server/dist/services/memory-writer.js.map +1 -0
  206. package/mcp-server/dist/services/neural-interface.d.ts +439 -0
  207. package/mcp-server/dist/services/neural-interface.d.ts.map +1 -0
  208. package/mcp-server/dist/services/neural-interface.js +1135 -0
  209. package/mcp-server/dist/services/neural-interface.js.map +1 -0
  210. package/mcp-server/dist/services/profiles.d.ts +120 -0
  211. package/mcp-server/dist/services/profiles.d.ts.map +1 -0
  212. package/mcp-server/dist/services/profiles.js +387 -0
  213. package/mcp-server/dist/services/profiles.js.map +1 -0
  214. package/mcp-server/dist/services/secret-gate.d.ts +29 -0
  215. package/mcp-server/dist/services/secret-gate.d.ts.map +1 -0
  216. package/mcp-server/dist/services/secret-gate.js +43 -0
  217. package/mcp-server/dist/services/secret-gate.js.map +1 -0
  218. package/mcp-server/dist/services/server-instructions.d.ts +10 -0
  219. package/mcp-server/dist/services/server-instructions.d.ts.map +1 -0
  220. package/mcp-server/dist/services/server-instructions.js +101 -0
  221. package/mcp-server/dist/services/server-instructions.js.map +1 -0
  222. package/mcp-server/dist/services/sqlite.d.ts +235 -0
  223. package/mcp-server/dist/services/sqlite.d.ts.map +1 -0
  224. package/mcp-server/dist/services/sqlite.js +1185 -0
  225. package/mcp-server/dist/services/sqlite.js.map +1 -0
  226. package/mcp-server/dist/services/typesafe-bench.d.ts +99 -0
  227. package/mcp-server/dist/services/typesafe-bench.d.ts.map +1 -0
  228. package/mcp-server/dist/services/typesafe-bench.js +218 -0
  229. package/mcp-server/dist/services/typesafe-bench.js.map +1 -0
  230. package/mcp-server/dist/services/typesafe-config.d.ts +342 -0
  231. package/mcp-server/dist/services/typesafe-config.d.ts.map +1 -0
  232. package/mcp-server/dist/services/typesafe-config.js +746 -0
  233. package/mcp-server/dist/services/typesafe-config.js.map +1 -0
  234. package/mcp-server/dist/services/typesafe.d.ts +213 -0
  235. package/mcp-server/dist/services/typesafe.d.ts.map +1 -0
  236. package/mcp-server/dist/services/typesafe.js +330 -0
  237. package/mcp-server/dist/services/typesafe.js.map +1 -0
  238. package/mcp-server/dist/services/vector-cache.d.ts +68 -0
  239. package/mcp-server/dist/services/vector-cache.d.ts.map +1 -0
  240. package/mcp-server/dist/services/vector-cache.js +271 -0
  241. package/mcp-server/dist/services/vector-cache.js.map +1 -0
  242. package/mcp-server/dist/services/whiteboard-geometry.d.ts +305 -0
  243. package/mcp-server/dist/services/whiteboard-geometry.d.ts.map +1 -0
  244. package/mcp-server/dist/services/whiteboard-geometry.js +666 -0
  245. package/mcp-server/dist/services/whiteboard-geometry.js.map +1 -0
  246. package/mcp-server/dist/tools/agents.d.ts +212 -0
  247. package/mcp-server/dist/tools/agents.d.ts.map +1 -0
  248. package/mcp-server/dist/tools/agents.js +407 -0
  249. package/mcp-server/dist/tools/agents.js.map +1 -0
  250. package/mcp-server/dist/tools/bluesky.d.ts +39 -0
  251. package/mcp-server/dist/tools/bluesky.d.ts.map +1 -0
  252. package/mcp-server/dist/tools/bluesky.js +1144 -0
  253. package/mcp-server/dist/tools/bluesky.js.map +1 -0
  254. package/mcp-server/dist/tools/browser-advanced.d.ts +58 -0
  255. package/mcp-server/dist/tools/browser-advanced.d.ts.map +1 -0
  256. package/mcp-server/dist/tools/browser-advanced.js +106 -0
  257. package/mcp-server/dist/tools/browser-advanced.js.map +1 -0
  258. package/mcp-server/dist/tools/browser-batch.d.ts +99 -0
  259. package/mcp-server/dist/tools/browser-batch.d.ts.map +1 -0
  260. package/mcp-server/dist/tools/browser-batch.js +187 -0
  261. package/mcp-server/dist/tools/browser-batch.js.map +1 -0
  262. package/mcp-server/dist/tools/browser-cheatsheet.d.ts +21 -0
  263. package/mcp-server/dist/tools/browser-cheatsheet.d.ts.map +1 -0
  264. package/mcp-server/dist/tools/browser-cheatsheet.js +144 -0
  265. package/mcp-server/dist/tools/browser-cheatsheet.js.map +1 -0
  266. package/mcp-server/dist/tools/browser-interact.d.ts +239 -0
  267. package/mcp-server/dist/tools/browser-interact.d.ts.map +1 -0
  268. package/mcp-server/dist/tools/browser-interact.js +300 -0
  269. package/mcp-server/dist/tools/browser-interact.js.map +1 -0
  270. package/mcp-server/dist/tools/browser-navigate.d.ts +90 -0
  271. package/mcp-server/dist/tools/browser-navigate.d.ts.map +1 -0
  272. package/mcp-server/dist/tools/browser-navigate.js +142 -0
  273. package/mcp-server/dist/tools/browser-navigate.js.map +1 -0
  274. package/mcp-server/dist/tools/browser-observe.d.ts +561 -0
  275. package/mcp-server/dist/tools/browser-observe.d.ts.map +1 -0
  276. package/mcp-server/dist/tools/browser-observe.js +2009 -0
  277. package/mcp-server/dist/tools/browser-observe.js.map +1 -0
  278. package/mcp-server/dist/tools/browser.d.ts +34 -0
  279. package/mcp-server/dist/tools/browser.d.ts.map +1 -0
  280. package/mcp-server/dist/tools/browser.js +112 -0
  281. package/mcp-server/dist/tools/browser.js.map +1 -0
  282. package/mcp-server/dist/tools/card-tools.d.ts +82 -0
  283. package/mcp-server/dist/tools/card-tools.d.ts.map +1 -0
  284. package/mcp-server/dist/tools/card-tools.js +137 -0
  285. package/mcp-server/dist/tools/card-tools.js.map +1 -0
  286. package/mcp-server/dist/tools/card.d.ts +8 -0
  287. package/mcp-server/dist/tools/card.d.ts.map +1 -0
  288. package/mcp-server/dist/tools/card.js +16 -0
  289. package/mcp-server/dist/tools/card.js.map +1 -0
  290. package/mcp-server/dist/tools/category.d.ts +32 -0
  291. package/mcp-server/dist/tools/category.d.ts.map +1 -0
  292. package/mcp-server/dist/tools/category.js +290 -0
  293. package/mcp-server/dist/tools/category.js.map +1 -0
  294. package/mcp-server/dist/tools/choice.d.ts +160 -0
  295. package/mcp-server/dist/tools/choice.d.ts.map +1 -0
  296. package/mcp-server/dist/tools/choice.js +80 -0
  297. package/mcp-server/dist/tools/choice.js.map +1 -0
  298. package/mcp-server/dist/tools/computer.d.ts +71 -0
  299. package/mcp-server/dist/tools/computer.d.ts.map +1 -0
  300. package/mcp-server/dist/tools/computer.js +174 -0
  301. package/mcp-server/dist/tools/computer.js.map +1 -0
  302. package/mcp-server/dist/tools/discord-channel.d.ts +44 -0
  303. package/mcp-server/dist/tools/discord-channel.d.ts.map +1 -0
  304. package/mcp-server/dist/tools/discord-channel.js +236 -0
  305. package/mcp-server/dist/tools/discord-channel.js.map +1 -0
  306. package/mcp-server/dist/tools/discord-guild.d.ts +20 -0
  307. package/mcp-server/dist/tools/discord-guild.d.ts.map +1 -0
  308. package/mcp-server/dist/tools/discord-guild.js +138 -0
  309. package/mcp-server/dist/tools/discord-guild.js.map +1 -0
  310. package/mcp-server/dist/tools/discord-member.d.ts +26 -0
  311. package/mcp-server/dist/tools/discord-member.d.ts.map +1 -0
  312. package/mcp-server/dist/tools/discord-member.js +122 -0
  313. package/mcp-server/dist/tools/discord-member.js.map +1 -0
  314. package/mcp-server/dist/tools/discord-message.d.ts +36 -0
  315. package/mcp-server/dist/tools/discord-message.d.ts.map +1 -0
  316. package/mcp-server/dist/tools/discord-message.js +184 -0
  317. package/mcp-server/dist/tools/discord-message.js.map +1 -0
  318. package/mcp-server/dist/tools/discord-onboarding.d.ts +32 -0
  319. package/mcp-server/dist/tools/discord-onboarding.d.ts.map +1 -0
  320. package/mcp-server/dist/tools/discord-onboarding.js +179 -0
  321. package/mcp-server/dist/tools/discord-onboarding.js.map +1 -0
  322. package/mcp-server/dist/tools/discord-role.d.ts +34 -0
  323. package/mcp-server/dist/tools/discord-role.d.ts.map +1 -0
  324. package/mcp-server/dist/tools/discord-role.js +178 -0
  325. package/mcp-server/dist/tools/discord-role.js.map +1 -0
  326. package/mcp-server/dist/tools/discord-thread.d.ts +28 -0
  327. package/mcp-server/dist/tools/discord-thread.d.ts.map +1 -0
  328. package/mcp-server/dist/tools/discord-thread.js +88 -0
  329. package/mcp-server/dist/tools/discord-thread.js.map +1 -0
  330. package/mcp-server/dist/tools/discord-webhook.d.ts +32 -0
  331. package/mcp-server/dist/tools/discord-webhook.d.ts.map +1 -0
  332. package/mcp-server/dist/tools/discord-webhook.js +154 -0
  333. package/mcp-server/dist/tools/discord-webhook.js.map +1 -0
  334. package/mcp-server/dist/tools/discord.d.ts +7 -0
  335. package/mcp-server/dist/tools/discord.d.ts.map +1 -0
  336. package/mcp-server/dist/tools/discord.js +25 -0
  337. package/mcp-server/dist/tools/discord.js.map +1 -0
  338. package/mcp-server/dist/tools/fb-groups.d.ts +98 -0
  339. package/mcp-server/dist/tools/fb-groups.d.ts.map +1 -0
  340. package/mcp-server/dist/tools/fb-groups.js +369 -0
  341. package/mcp-server/dist/tools/fb-groups.js.map +1 -0
  342. package/mcp-server/dist/tools/forget.d.ts +14 -0
  343. package/mcp-server/dist/tools/forget.d.ts.map +1 -0
  344. package/mcp-server/dist/tools/forget.js +26 -0
  345. package/mcp-server/dist/tools/forget.js.map +1 -0
  346. package/mcp-server/dist/tools/git-tools.d.ts +24 -0
  347. package/mcp-server/dist/tools/git-tools.d.ts.map +1 -0
  348. package/mcp-server/dist/tools/git-tools.js +107 -0
  349. package/mcp-server/dist/tools/git-tools.js.map +1 -0
  350. package/mcp-server/dist/tools/git.d.ts +7 -0
  351. package/mcp-server/dist/tools/git.d.ts.map +1 -0
  352. package/mcp-server/dist/tools/git.js +11 -0
  353. package/mcp-server/dist/tools/git.js.map +1 -0
  354. package/mcp-server/dist/tools/gsc/experience.d.ts +135 -0
  355. package/mcp-server/dist/tools/gsc/experience.d.ts.map +1 -0
  356. package/mcp-server/dist/tools/gsc/experience.js +351 -0
  357. package/mcp-server/dist/tools/gsc/experience.js.map +1 -0
  358. package/mcp-server/dist/tools/gsc/helpers.d.ts +78 -0
  359. package/mcp-server/dist/tools/gsc/helpers.d.ts.map +1 -0
  360. package/mcp-server/dist/tools/gsc/helpers.js +258 -0
  361. package/mcp-server/dist/tools/gsc/helpers.js.map +1 -0
  362. package/mcp-server/dist/tools/gsc/indexing.d.ts +121 -0
  363. package/mcp-server/dist/tools/gsc/indexing.d.ts.map +1 -0
  364. package/mcp-server/dist/tools/gsc/indexing.js +357 -0
  365. package/mcp-server/dist/tools/gsc/indexing.js.map +1 -0
  366. package/mcp-server/dist/tools/gsc/inspect.d.ts +78 -0
  367. package/mcp-server/dist/tools/gsc/inspect.d.ts.map +1 -0
  368. package/mcp-server/dist/tools/gsc/inspect.js +321 -0
  369. package/mcp-server/dist/tools/gsc/inspect.js.map +1 -0
  370. package/mcp-server/dist/tools/gsc/navigate.d.ts +44 -0
  371. package/mcp-server/dist/tools/gsc/navigate.d.ts.map +1 -0
  372. package/mcp-server/dist/tools/gsc/navigate.js +197 -0
  373. package/mcp-server/dist/tools/gsc/navigate.js.map +1 -0
  374. package/mcp-server/dist/tools/gsc/performance.d.ts +84 -0
  375. package/mcp-server/dist/tools/gsc/performance.d.ts.map +1 -0
  376. package/mcp-server/dist/tools/gsc/performance.js +274 -0
  377. package/mcp-server/dist/tools/gsc/performance.js.map +1 -0
  378. package/mcp-server/dist/tools/gsc/settings.d.ts +153 -0
  379. package/mcp-server/dist/tools/gsc/settings.d.ts.map +1 -0
  380. package/mcp-server/dist/tools/gsc/settings.js +425 -0
  381. package/mcp-server/dist/tools/gsc/settings.js.map +1 -0
  382. package/mcp-server/dist/tools/gsc.d.ts +7 -0
  383. package/mcp-server/dist/tools/gsc.d.ts.map +1 -0
  384. package/mcp-server/dist/tools/gsc.js +51 -0
  385. package/mcp-server/dist/tools/gsc.js.map +1 -0
  386. package/mcp-server/dist/tools/image-tools.d.ts +24 -0
  387. package/mcp-server/dist/tools/image-tools.d.ts.map +1 -0
  388. package/mcp-server/dist/tools/image-tools.js +80 -0
  389. package/mcp-server/dist/tools/image-tools.js.map +1 -0
  390. package/mcp-server/dist/tools/image.d.ts +10 -0
  391. package/mcp-server/dist/tools/image.d.ts.map +1 -0
  392. package/mcp-server/dist/tools/image.js +14 -0
  393. package/mcp-server/dist/tools/image.js.map +1 -0
  394. package/mcp-server/dist/tools/leonardo-browser-tools.d.ts +97 -0
  395. package/mcp-server/dist/tools/leonardo-browser-tools.d.ts.map +1 -0
  396. package/mcp-server/dist/tools/leonardo-browser-tools.js +228 -0
  397. package/mcp-server/dist/tools/leonardo-browser-tools.js.map +1 -0
  398. package/mcp-server/dist/tools/leonardo.d.ts +13 -0
  399. package/mcp-server/dist/tools/leonardo.d.ts.map +1 -0
  400. package/mcp-server/dist/tools/leonardo.js +21 -0
  401. package/mcp-server/dist/tools/leonardo.js.map +1 -0
  402. package/mcp-server/dist/tools/loop.d.ts +30 -0
  403. package/mcp-server/dist/tools/loop.d.ts.map +1 -0
  404. package/mcp-server/dist/tools/loop.js +401 -0
  405. package/mcp-server/dist/tools/loop.js.map +1 -0
  406. package/mcp-server/dist/tools/memories.d.ts +56 -0
  407. package/mcp-server/dist/tools/memories.d.ts.map +1 -0
  408. package/mcp-server/dist/tools/memories.js +171 -0
  409. package/mcp-server/dist/tools/memories.js.map +1 -0
  410. package/mcp-server/dist/tools/morelogin.d.ts +24 -0
  411. package/mcp-server/dist/tools/morelogin.d.ts.map +1 -0
  412. package/mcp-server/dist/tools/morelogin.js +79 -0
  413. package/mcp-server/dist/tools/morelogin.js.map +1 -0
  414. package/mcp-server/dist/tools/profile.d.ts +17 -0
  415. package/mcp-server/dist/tools/profile.d.ts.map +1 -0
  416. package/mcp-server/dist/tools/profile.js +114 -0
  417. package/mcp-server/dist/tools/profile.js.map +1 -0
  418. package/mcp-server/dist/tools/recall.d.ts +71 -0
  419. package/mcp-server/dist/tools/recall.d.ts.map +1 -0
  420. package/mcp-server/dist/tools/recall.js +147 -0
  421. package/mcp-server/dist/tools/recall.js.map +1 -0
  422. package/mcp-server/dist/tools/reflect.d.ts +56 -0
  423. package/mcp-server/dist/tools/reflect.d.ts.map +1 -0
  424. package/mcp-server/dist/tools/reflect.js +157 -0
  425. package/mcp-server/dist/tools/reflect.js.map +1 -0
  426. package/mcp-server/dist/tools/remember.d.ts +62 -0
  427. package/mcp-server/dist/tools/remember.d.ts.map +1 -0
  428. package/mcp-server/dist/tools/remember.js +201 -0
  429. package/mcp-server/dist/tools/remember.js.map +1 -0
  430. package/mcp-server/dist/tools/response.d.ts +23 -0
  431. package/mcp-server/dist/tools/response.d.ts.map +1 -0
  432. package/mcp-server/dist/tools/response.js +24 -0
  433. package/mcp-server/dist/tools/response.js.map +1 -0
  434. package/mcp-server/dist/tools/restore.d.ts +14 -0
  435. package/mcp-server/dist/tools/restore.d.ts.map +1 -0
  436. package/mcp-server/dist/tools/restore.js +23 -0
  437. package/mcp-server/dist/tools/restore.js.map +1 -0
  438. package/mcp-server/dist/tools/style-guide-tools.d.ts +51 -0
  439. package/mcp-server/dist/tools/style-guide-tools.d.ts.map +1 -0
  440. package/mcp-server/dist/tools/style-guide-tools.js +231 -0
  441. package/mcp-server/dist/tools/style-guide-tools.js.map +1 -0
  442. package/mcp-server/dist/tools/style-guide.d.ts +8 -0
  443. package/mcp-server/dist/tools/style-guide.d.ts.map +1 -0
  444. package/mcp-server/dist/tools/style-guide.js +12 -0
  445. package/mcp-server/dist/tools/style-guide.js.map +1 -0
  446. package/mcp-server/dist/tools/sync.d.ts +20 -0
  447. package/mcp-server/dist/tools/sync.d.ts.map +1 -0
  448. package/mcp-server/dist/tools/sync.js +156 -0
  449. package/mcp-server/dist/tools/sync.js.map +1 -0
  450. package/mcp-server/dist/tools/tictactoe-tools.d.ts +18 -0
  451. package/mcp-server/dist/tools/tictactoe-tools.d.ts.map +1 -0
  452. package/mcp-server/dist/tools/tictactoe-tools.js +78 -0
  453. package/mcp-server/dist/tools/tictactoe-tools.js.map +1 -0
  454. package/mcp-server/dist/tools/tictactoe.d.ts +7 -0
  455. package/mcp-server/dist/tools/tictactoe.d.ts.map +1 -0
  456. package/mcp-server/dist/tools/tictactoe.js +11 -0
  457. package/mcp-server/dist/tools/tictactoe.js.map +1 -0
  458. package/mcp-server/dist/tools/utils.d.ts +19 -0
  459. package/mcp-server/dist/tools/utils.d.ts.map +1 -0
  460. package/mcp-server/dist/tools/utils.js +54 -0
  461. package/mcp-server/dist/tools/utils.js.map +1 -0
  462. package/mcp-server/dist/tools/whiteboard-format.d.ts +88 -0
  463. package/mcp-server/dist/tools/whiteboard-format.d.ts.map +1 -0
  464. package/mcp-server/dist/tools/whiteboard-format.js +337 -0
  465. package/mcp-server/dist/tools/whiteboard-format.js.map +1 -0
  466. package/mcp-server/dist/tools/whiteboard-tools.d.ts +326 -0
  467. package/mcp-server/dist/tools/whiteboard-tools.d.ts.map +1 -0
  468. package/mcp-server/dist/tools/whiteboard-tools.js +222 -0
  469. package/mcp-server/dist/tools/whiteboard-tools.js.map +1 -0
  470. package/mcp-server/dist/tools/whiteboard.d.ts +8 -0
  471. package/mcp-server/dist/tools/whiteboard.d.ts.map +1 -0
  472. package/mcp-server/dist/tools/whiteboard.js +16 -0
  473. package/mcp-server/dist/tools/whiteboard.js.map +1 -0
  474. package/mcp-server/dist/tools/youtube/analytics.d.ts +46 -0
  475. package/mcp-server/dist/tools/youtube/analytics.d.ts.map +1 -0
  476. package/mcp-server/dist/tools/youtube/analytics.js +83 -0
  477. package/mcp-server/dist/tools/youtube/analytics.js.map +1 -0
  478. package/mcp-server/dist/tools/youtube/dedup.d.ts +35 -0
  479. package/mcp-server/dist/tools/youtube/dedup.d.ts.map +1 -0
  480. package/mcp-server/dist/tools/youtube/dedup.js +56 -0
  481. package/mcp-server/dist/tools/youtube/dedup.js.map +1 -0
  482. package/mcp-server/dist/tools/youtube/download.d.ts +31 -0
  483. package/mcp-server/dist/tools/youtube/download.d.ts.map +1 -0
  484. package/mcp-server/dist/tools/youtube/download.js +30 -0
  485. package/mcp-server/dist/tools/youtube/download.js.map +1 -0
  486. package/mcp-server/dist/tools/youtube/helpers.d.ts +66 -0
  487. package/mcp-server/dist/tools/youtube/helpers.d.ts.map +1 -0
  488. package/mcp-server/dist/tools/youtube/helpers.js +143 -0
  489. package/mcp-server/dist/tools/youtube/helpers.js.map +1 -0
  490. package/mcp-server/dist/tools/youtube/media.d.ts +43 -0
  491. package/mcp-server/dist/tools/youtube/media.d.ts.map +1 -0
  492. package/mcp-server/dist/tools/youtube/media.js +97 -0
  493. package/mcp-server/dist/tools/youtube/media.js.map +1 -0
  494. package/mcp-server/dist/tools/youtube/metadata.d.ts +33 -0
  495. package/mcp-server/dist/tools/youtube/metadata.d.ts.map +1 -0
  496. package/mcp-server/dist/tools/youtube/metadata.js +106 -0
  497. package/mcp-server/dist/tools/youtube/metadata.js.map +1 -0
  498. package/mcp-server/dist/tools/youtube/navigate.d.ts +30 -0
  499. package/mcp-server/dist/tools/youtube/navigate.d.ts.map +1 -0
  500. package/mcp-server/dist/tools/youtube/navigate.js +71 -0
  501. package/mcp-server/dist/tools/youtube/navigate.js.map +1 -0
  502. package/mcp-server/dist/tools/youtube/playlist.d.ts +29 -0
  503. package/mcp-server/dist/tools/youtube/playlist.d.ts.map +1 -0
  504. package/mcp-server/dist/tools/youtube/playlist.js +128 -0
  505. package/mcp-server/dist/tools/youtube/playlist.js.map +1 -0
  506. package/mcp-server/dist/tools/youtube/schedule.d.ts +31 -0
  507. package/mcp-server/dist/tools/youtube/schedule.d.ts.map +1 -0
  508. package/mcp-server/dist/tools/youtube/schedule.js +147 -0
  509. package/mcp-server/dist/tools/youtube/schedule.js.map +1 -0
  510. package/mcp-server/dist/tools/youtube/source.d.ts +36 -0
  511. package/mcp-server/dist/tools/youtube/source.d.ts.map +1 -0
  512. package/mcp-server/dist/tools/youtube/source.js +85 -0
  513. package/mcp-server/dist/tools/youtube/source.js.map +1 -0
  514. package/mcp-server/dist/tools/youtube/upload.d.ts +53 -0
  515. package/mcp-server/dist/tools/youtube/upload.d.ts.map +1 -0
  516. package/mcp-server/dist/tools/youtube/upload.js +255 -0
  517. package/mcp-server/dist/tools/youtube/upload.js.map +1 -0
  518. package/mcp-server/dist/tools/youtube.d.ts +12 -0
  519. package/mcp-server/dist/tools/youtube.d.ts.map +1 -0
  520. package/mcp-server/dist/tools/youtube.js +38 -0
  521. package/mcp-server/dist/tools/youtube.js.map +1 -0
  522. package/mcp-server/dist/tui.d.ts +3 -0
  523. package/mcp-server/dist/tui.d.ts.map +1 -0
  524. package/mcp-server/dist/tui.js +806 -0
  525. package/mcp-server/dist/tui.js.map +1 -0
  526. package/mcp-server/dist/types.d.ts +77 -0
  527. package/mcp-server/dist/types.d.ts.map +1 -0
  528. package/mcp-server/dist/types.js +2 -0
  529. package/mcp-server/dist/types.js.map +1 -0
  530. package/mcp-server/package-lock.json +4798 -0
  531. package/mcp-server/package.json +55 -38
  532. package/mcp-server/run.mjs +12 -2
  533. package/mcp-server/src/config.ts +48 -3
  534. package/mcp-server/src/http.ts +296 -93
  535. package/mcp-server/src/index.ts +546 -203
  536. package/mcp-server/src/preload-http.ts +19 -18
  537. package/mcp-server/src/preload.ts +19 -18
  538. package/mcp-server/src/scripts/setup-embeddings.ts +9 -0
  539. package/mcp-server/src/services/assistant-judgments.ts +157 -0
  540. package/mcp-server/src/services/browser-assist-gate.ts +383 -0
  541. package/mcp-server/src/services/browser-assist.ts +267 -0
  542. package/mcp-server/src/services/browser-bench.ts +477 -0
  543. package/mcp-server/src/services/browser-judgments.ts +414 -0
  544. package/mcp-server/src/services/browser-risk.ts +484 -0
  545. package/mcp-server/src/services/categories.ts +36 -19
  546. package/mcp-server/src/services/codex-config-heal.ts +403 -0
  547. package/mcp-server/src/services/desktop-assist-gate.ts +251 -0
  548. package/mcp-server/src/services/desktop-assist.ts +308 -0
  549. package/mcp-server/src/services/desktop-bench.ts +372 -0
  550. package/mcp-server/src/services/desktop-client.ts +76 -0
  551. package/mcp-server/src/services/desktop-judgments.ts +218 -0
  552. package/mcp-server/src/services/desktop-risk.ts +743 -0
  553. package/mcp-server/src/services/edit-stale.ts +299 -0
  554. package/mcp-server/src/services/embedding-service.ts +108 -0
  555. package/mcp-server/src/services/embedding-worker.ts +46 -0
  556. package/mcp-server/src/services/fb-regions.ts +221 -0
  557. package/mcp-server/src/services/file-checksums.ts +26 -9
  558. package/mcp-server/src/services/file-excerpt.ts +59 -0
  559. package/mcp-server/src/services/identity.ts +291 -0
  560. package/mcp-server/src/services/local-embeddings.ts +2 -77
  561. package/mcp-server/src/services/memory-client.ts +23 -0
  562. package/mcp-server/src/services/memory-judge-backfill.ts +462 -0
  563. package/mcp-server/src/services/memory-judgments.ts +901 -0
  564. package/mcp-server/src/services/memory-maintenance.ts +360 -0
  565. package/mcp-server/src/services/memory-retrieval.ts +349 -0
  566. package/mcp-server/src/services/memory-schema.ts +280 -0
  567. package/mcp-server/src/services/memory-sessions.ts +87 -0
  568. package/mcp-server/src/services/memory-triage.ts +182 -0
  569. package/mcp-server/src/services/memory-verification.ts +68 -0
  570. package/mcp-server/src/services/memory-writer.ts +125 -0
  571. package/mcp-server/src/services/neural-interface.ts +1217 -73
  572. package/mcp-server/src/services/profiles.ts +428 -0
  573. package/mcp-server/src/services/secret-gate.ts +52 -0
  574. package/mcp-server/src/services/server-instructions.ts +122 -0
  575. package/mcp-server/src/services/sqlite.ts +1456 -823
  576. package/mcp-server/src/services/typesafe-bench.ts +247 -0
  577. package/mcp-server/src/services/typesafe-config.ts +790 -0
  578. package/mcp-server/src/services/typesafe.ts +390 -0
  579. package/mcp-server/src/services/vector-cache.ts +255 -0
  580. package/mcp-server/src/services/whiteboard-geometry.ts +711 -0
  581. package/mcp-server/src/tools/agents.ts +539 -0
  582. package/mcp-server/src/tools/bluesky.ts +1186 -0
  583. package/mcp-server/src/tools/browser-advanced.ts +15 -6
  584. package/mcp-server/src/tools/browser-batch.ts +178 -0
  585. package/mcp-server/src/tools/browser-cheatsheet.ts +155 -0
  586. package/mcp-server/src/tools/browser-interact.ts +362 -255
  587. package/mcp-server/src/tools/browser-navigate.ts +164 -77
  588. package/mcp-server/src/tools/browser-observe.ts +2222 -1330
  589. package/mcp-server/src/tools/browser.ts +181 -107
  590. package/mcp-server/src/tools/card.ts +7 -5
  591. package/mcp-server/src/tools/choice.ts +103 -0
  592. package/mcp-server/src/tools/computer.ts +190 -0
  593. package/mcp-server/src/tools/discord.ts +10 -23
  594. package/mcp-server/src/tools/fb-groups.ts +387 -0
  595. package/mcp-server/src/tools/forget.ts +1 -1
  596. package/mcp-server/src/tools/git.ts +3 -1
  597. package/mcp-server/src/tools/gsc/experience.ts +440 -0
  598. package/mcp-server/src/tools/gsc/helpers.ts +288 -0
  599. package/mcp-server/src/tools/gsc/indexing.ts +495 -0
  600. package/mcp-server/src/tools/gsc/inspect.ts +391 -0
  601. package/mcp-server/src/tools/gsc/navigate.ts +236 -0
  602. package/mcp-server/src/tools/gsc/performance.ts +352 -0
  603. package/mcp-server/src/tools/gsc/settings.ts +564 -0
  604. package/mcp-server/src/tools/gsc.ts +95 -0
  605. package/mcp-server/src/tools/image.ts +3 -1
  606. package/mcp-server/src/tools/leonardo-browser-tools.ts +47 -37
  607. package/mcp-server/src/tools/leonardo.ts +7 -5
  608. package/mcp-server/src/tools/loop.ts +118 -25
  609. package/mcp-server/src/tools/memories.ts +65 -5
  610. package/mcp-server/src/tools/morelogin.ts +81 -0
  611. package/mcp-server/src/tools/profile.ts +122 -0
  612. package/mcp-server/src/tools/recall.ts +105 -261
  613. package/mcp-server/src/tools/reflect.ts +171 -145
  614. package/mcp-server/src/tools/remember.ts +223 -115
  615. package/mcp-server/src/tools/style-guide-tools.ts +250 -0
  616. package/mcp-server/src/tools/style-guide.ts +16 -0
  617. package/mcp-server/src/tools/sync.ts +66 -9
  618. package/mcp-server/src/tools/tictactoe.ts +3 -1
  619. package/mcp-server/src/tools/utils.ts +22 -0
  620. package/mcp-server/src/tools/whiteboard-format.ts +394 -0
  621. package/mcp-server/src/tools/whiteboard-tools.ts +191 -183
  622. package/mcp-server/src/tools/whiteboard.ts +7 -5
  623. package/mcp-server/src/tools/youtube/analytics.ts +106 -0
  624. package/mcp-server/src/tools/youtube/dedup.ts +57 -0
  625. package/mcp-server/src/tools/youtube/download.ts +41 -0
  626. package/mcp-server/src/tools/youtube/helpers.ts +183 -0
  627. package/mcp-server/src/tools/youtube/media.ts +109 -0
  628. package/mcp-server/src/tools/youtube/metadata.ts +112 -0
  629. package/mcp-server/src/tools/youtube/navigate.ts +81 -0
  630. package/mcp-server/src/tools/youtube/playlist.ts +134 -0
  631. package/mcp-server/src/tools/youtube/schedule.ts +158 -0
  632. package/mcp-server/src/tools/youtube/source.ts +101 -0
  633. package/mcp-server/src/tools/youtube/upload.ts +296 -0
  634. package/mcp-server/src/tools/youtube.ts +47 -0
  635. package/mcp-server/src/tui.ts +8 -9
  636. package/neural-interface/games/TicTacToe/1.svg +1 -0
  637. package/neural-interface/games/TicTacToe/2.svg +1 -0
  638. package/neural-interface/games/TicTacToe/3.svg +1 -0
  639. package/neural-interface/games/TicTacToe/4.svg +1 -0
  640. package/neural-interface/games/TicTacToe/5.svg +1 -0
  641. package/neural-interface/games/TicTacToe/6.svg +1 -0
  642. package/neural-interface/games/TicTacToe/7.svg +1 -0
  643. package/neural-interface/games/TicTacToe/8.svg +1 -0
  644. package/neural-interface/games/TicTacToe/9.svg +1 -0
  645. package/neural-interface/games/TicTacToe/Board.svg +1 -0
  646. package/neural-interface/games/TicTacToe/Circle.svg +1 -0
  647. package/neural-interface/games/TicTacToe/Cross.svg +1 -0
  648. package/neural-interface/i18n/en.json +7022 -0
  649. package/neural-interface/i18n/pt-BR.json +7026 -0
  650. package/neural-interface/lib/assistant-api.js +1005 -0
  651. package/neural-interface/lib/assistant-attachments.js +121 -0
  652. package/neural-interface/lib/assistant-brains/claude.js +207 -0
  653. package/neural-interface/lib/assistant-brains/codex-browser-policy-hook.mjs +43 -0
  654. package/neural-interface/lib/assistant-brains/codex-route-gate-hook.mjs +56 -0
  655. package/neural-interface/lib/assistant-brains/codex.js +213 -0
  656. package/neural-interface/lib/assistant-brains/opencode-browser-policy.js +47 -0
  657. package/neural-interface/lib/assistant-brains/opencode-route-gate.js +62 -0
  658. package/neural-interface/lib/assistant-brains/opencode.js +320 -0
  659. package/neural-interface/lib/assistant-budget.js +318 -0
  660. package/neural-interface/lib/assistant-catalog.js +731 -0
  661. package/neural-interface/lib/assistant-clarify.js +664 -0
  662. package/neural-interface/lib/assistant-config.js +232 -0
  663. package/neural-interface/lib/assistant-dispatch.js +2744 -0
  664. package/neural-interface/lib/assistant-envelope.js +582 -0
  665. package/neural-interface/lib/assistant-evidence.js +236 -0
  666. package/neural-interface/lib/assistant-hidden-models.js +272 -0
  667. package/neural-interface/lib/assistant-jev.js +117 -0
  668. package/neural-interface/lib/assistant-judgments.js +111 -0
  669. package/neural-interface/lib/assistant-media.js +335 -0
  670. package/neural-interface/lib/assistant-memory.js +398 -0
  671. package/neural-interface/lib/assistant-persona.js +444 -0
  672. package/neural-interface/lib/assistant-plan-permissions.js +448 -0
  673. package/neural-interface/lib/assistant-playbooks/design.md +87 -0
  674. package/neural-interface/lib/assistant-playbooks.js +72 -0
  675. package/neural-interface/lib/assistant-pricing.js +159 -0
  676. package/neural-interface/lib/assistant-route-gate-codex.js +163 -0
  677. package/neural-interface/lib/assistant-route-gate.js +212 -0
  678. package/neural-interface/lib/assistant-router.js +1324 -0
  679. package/neural-interface/lib/assistant-runtime.js +3337 -0
  680. package/neural-interface/lib/assistant-task-prompt.js +472 -0
  681. package/neural-interface/lib/assistant-usage.js +1688 -0
  682. package/neural-interface/lib/augmented-path.js +70 -0
  683. package/neural-interface/lib/automation-storage-migration.js +54 -0
  684. package/neural-interface/lib/backup-service.js +851 -0
  685. package/neural-interface/lib/backup-zip-reader.js +262 -0
  686. package/neural-interface/lib/browser-assist-api.js +41 -0
  687. package/neural-interface/lib/browser-console.js +176 -0
  688. package/neural-interface/lib/browser-execution.js +241 -0
  689. package/neural-interface/lib/browser-extraction.js +191 -0
  690. package/neural-interface/lib/browser-language.js +83 -0
  691. package/neural-interface/lib/browser-screenshot.js +399 -0
  692. package/neural-interface/lib/browser-semantic-context.js +639 -0
  693. package/neural-interface/lib/browser-snapshots.js +192 -0
  694. package/neural-interface/lib/browser-tab-recovery.js +119 -0
  695. package/neural-interface/lib/browser-targets.js +70 -0
  696. package/neural-interface/lib/browser-tool-policy.js +926 -0
  697. package/neural-interface/lib/claude-accounts.js +230 -0
  698. package/neural-interface/lib/claude-agent-bridge.js +3203 -0
  699. package/neural-interface/lib/claude-bypass-policy.js +99 -0
  700. package/neural-interface/lib/claude-executable.js +241 -0
  701. package/neural-interface/lib/claude-history.js +429 -0
  702. package/neural-interface/lib/claude-model-catalog.js +444 -0
  703. package/neural-interface/lib/claude-panel-requests.js +165 -0
  704. package/neural-interface/lib/claude-panel-session.js +272 -0
  705. package/neural-interface/lib/claude-permission-rules.js +153 -0
  706. package/neural-interface/lib/claude-session-cleanup.js +71 -0
  707. package/neural-interface/lib/claude-session-list.js +82 -0
  708. package/neural-interface/lib/claude-session-ops.js +140 -0
  709. package/neural-interface/lib/claude-settings-view.js +51 -0
  710. package/neural-interface/lib/claude-skin-connect.js +79 -0
  711. package/neural-interface/lib/claude-stall-policy.js +7 -0
  712. package/neural-interface/lib/claude-temporary.js +435 -0
  713. package/neural-interface/lib/cli-update-planner.js +312 -0
  714. package/neural-interface/lib/codex-capabilities.d.ts +41 -0
  715. package/neural-interface/lib/codex-capabilities.js +148 -0
  716. package/neural-interface/lib/codex-collaboration-mode.js +17 -0
  717. package/neural-interface/lib/codex-compat-rpc.js +241 -0
  718. package/neural-interface/lib/codex-mcp-approvals.js +56 -0
  719. package/neural-interface/lib/codex-mcp-apps.js +47 -0
  720. package/neural-interface/lib/codex-model-context.js +202 -0
  721. package/neural-interface/lib/codex-plan-store.js +71 -0
  722. package/neural-interface/lib/codex-request-journal.js +242 -0
  723. package/neural-interface/lib/codex-runtime-path.js +213 -0
  724. package/neural-interface/lib/codex-session-catalog.js +231 -0
  725. package/neural-interface/lib/codex-session-settings.js +46 -0
  726. package/neural-interface/lib/codex-sidepanel-permissions.js +110 -0
  727. package/neural-interface/lib/codex-thread-history.js +165 -0
  728. package/neural-interface/lib/codex-user-verification.js +34 -0
  729. package/neural-interface/lib/codex-writer-lifecycle.js +152 -0
  730. package/neural-interface/lib/confined-fs.js +256 -0
  731. package/neural-interface/lib/db.js +922 -0
  732. package/neural-interface/lib/design-md.js +9 -0
  733. package/neural-interface/lib/desktop/api.js +92 -0
  734. package/neural-interface/lib/desktop/audit.js +62 -0
  735. package/neural-interface/lib/desktop/build.js +423 -0
  736. package/neural-interface/lib/desktop/config.js +606 -0
  737. package/neural-interface/lib/desktop/coords.js +76 -0
  738. package/neural-interface/lib/desktop/fake-helper.js +1192 -0
  739. package/neural-interface/lib/desktop/frames.js +77 -0
  740. package/neural-interface/lib/desktop/grants.js +84 -0
  741. package/neural-interface/lib/desktop/guards.js +170 -0
  742. package/neural-interface/lib/desktop/helper/SynabunDesktop.swift +3056 -0
  743. package/neural-interface/lib/desktop/lease.js +51 -0
  744. package/neural-interface/lib/desktop/manager.js +545 -0
  745. package/neural-interface/lib/desktop/press-contexts.js +103 -0
  746. package/neural-interface/lib/desktop/protocol.js +495 -0
  747. package/neural-interface/lib/desktop/service.js +1202 -0
  748. package/neural-interface/lib/effort-levels.js +148 -0
  749. package/neural-interface/lib/event-loop-monitor.js +67 -0
  750. package/neural-interface/lib/exec-loop-command.js +209 -0
  751. package/neural-interface/lib/folder-picker.ps1 +77 -0
  752. package/neural-interface/lib/http-guards.js +287 -0
  753. package/neural-interface/lib/jsonl-lines.js +94 -0
  754. package/neural-interface/lib/loop-logger.js +127 -0
  755. package/neural-interface/lib/mcp-client-config.js +133 -0
  756. package/neural-interface/lib/mcp-installer.js +487 -0
  757. package/neural-interface/lib/mcp-profile-refresh-coordinator.js +78 -0
  758. package/neural-interface/lib/mcp-profile-servers.js +120 -0
  759. package/neural-interface/lib/memo-cache.js +84 -0
  760. package/neural-interface/lib/memory-api.js +758 -0
  761. package/neural-interface/lib/memory-map-api.js +1150 -0
  762. package/neural-interface/lib/memory-map-layout.js +872 -0
  763. package/neural-interface/lib/memory-map-worker.js +165 -0
  764. package/neural-interface/lib/memory-session-capture.js +81 -0
  765. package/neural-interface/lib/memory-timers.js +62 -0
  766. package/neural-interface/lib/morelogin.js +301 -0
  767. package/neural-interface/lib/native-binary-runtime.js +382 -0
  768. package/neural-interface/lib/native-loop-goal.js +33 -0
  769. package/neural-interface/lib/native-loop-providers.js +1002 -0
  770. package/neural-interface/lib/native-loop-runtime.js +747 -0
  771. package/neural-interface/lib/offline-page.js +54 -0
  772. package/neural-interface/lib/opencode-hidden-models.js +113 -0
  773. package/neural-interface/lib/opencode-history.js +253 -0
  774. package/neural-interface/lib/opencode-runtime-config.js +58 -0
  775. package/neural-interface/lib/opencode-v2-client.js +486 -0
  776. package/neural-interface/lib/opencode-v2-ws-requests.js +955 -0
  777. package/neural-interface/lib/path-confine.js +213 -0
  778. package/neural-interface/lib/plugin-installer.js +264 -0
  779. package/neural-interface/lib/project-storage.js +766 -0
  780. package/neural-interface/lib/pty-host/core.js +603 -0
  781. package/neural-interface/lib/pty-host/flow.js +43 -0
  782. package/neural-interface/lib/pty-host/host.js +47 -0
  783. package/neural-interface/lib/pty-host/manager.js +360 -0
  784. package/neural-interface/lib/pty-host/protocol.js +81 -0
  785. package/neural-interface/lib/pty-host/snapshot.js +133 -0
  786. package/neural-interface/lib/remote-policy.js +582 -0
  787. package/neural-interface/lib/rulesets/api.js +175 -0
  788. package/neural-interface/lib/rulesets/fs-safe.js +245 -0
  789. package/neural-interface/lib/rulesets/installer.js +1453 -0
  790. package/neural-interface/lib/rulesets/json-edit.js +186 -0
  791. package/neural-interface/lib/rulesets/lock.js +170 -0
  792. package/neural-interface/lib/rulesets/managed-text.js +314 -0
  793. package/neural-interface/lib/rulesets/normalise.js +24 -0
  794. package/neural-interface/lib/rulesets/render.js +84 -0
  795. package/neural-interface/lib/schedule-launch-intent.js +40 -0
  796. package/neural-interface/lib/session-cache-builder.js +524 -0
  797. package/neural-interface/lib/session-chunker.js +344 -0
  798. package/neural-interface/lib/session-indexer.js +327 -0
  799. package/neural-interface/lib/session-title-generator.js +232 -0
  800. package/neural-interface/lib/skill-prompt-bridge.js +11 -0
  801. package/neural-interface/lib/style-guide/api.js +375 -0
  802. package/neural-interface/lib/style-guide/color.js +352 -0
  803. package/neural-interface/lib/style-guide/export-css.js +99 -0
  804. package/neural-interface/lib/style-guide/export-dtcg.js +209 -0
  805. package/neural-interface/lib/style-guide/export-tailwind.js +102 -0
  806. package/neural-interface/lib/style-guide/fonts.json +227 -0
  807. package/neural-interface/lib/style-guide/import.js +1268 -0
  808. package/neural-interface/lib/style-guide/pointers.js +103 -0
  809. package/neural-interface/lib/style-guide/presets.js +232 -0
  810. package/neural-interface/lib/style-guide/render-design-md.js +319 -0
  811. package/neural-interface/lib/style-guide/schema.js +848 -0
  812. package/neural-interface/lib/style-guide/security.js +43 -0
  813. package/neural-interface/lib/style-guide/store.js +491 -0
  814. package/neural-interface/lib/style-guide/summary.js +106 -0
  815. package/neural-interface/lib/style-guide/tokens.js +170 -0
  816. package/neural-interface/lib/synabun-update-plan.js +324 -0
  817. package/neural-interface/lib/synabun-version.js +179 -0
  818. package/neural-interface/lib/system-restore.js +99 -0
  819. package/neural-interface/lib/terminal-env.js +86 -0
  820. package/neural-interface/lib/ui-blob-store.js +106 -0
  821. package/neural-interface/lib/vector-cache.js +2 -0
  822. package/neural-interface/lib/virtual-socket.js +60 -0
  823. package/neural-interface/lib/whatsapp/api.js +146 -0
  824. package/neural-interface/lib/whatsapp/auth-store.js +389 -0
  825. package/neural-interface/lib/whatsapp/baileys-adapter.js +457 -0
  826. package/neural-interface/lib/whatsapp/brain.js +128 -0
  827. package/neural-interface/lib/whatsapp/bridge.js +1499 -0
  828. package/neural-interface/lib/whatsapp/cards.js +519 -0
  829. package/neural-interface/lib/whatsapp/commands.js +92 -0
  830. package/neural-interface/lib/whatsapp/config.js +291 -0
  831. package/neural-interface/lib/whatsapp/connector/entry.mjs +25 -0
  832. package/neural-interface/lib/whatsapp/connector/manifest.json +6 -0
  833. package/neural-interface/lib/whatsapp/connector/npm-shrinkwrap.json +717 -0
  834. package/neural-interface/lib/whatsapp/connector/package.json +8 -0
  835. package/neural-interface/lib/whatsapp/fake-baileys.js +444 -0
  836. package/neural-interface/lib/whatsapp/format.js +552 -0
  837. package/neural-interface/lib/whatsapp/host-core.js +1225 -0
  838. package/neural-interface/lib/whatsapp/host.js +119 -0
  839. package/neural-interface/lib/whatsapp/identity.js +288 -0
  840. package/neural-interface/lib/whatsapp/inbound.js +149 -0
  841. package/neural-interface/lib/whatsapp/installer.js +562 -0
  842. package/neural-interface/lib/whatsapp/manager.js +638 -0
  843. package/neural-interface/lib/whatsapp/paths.js +81 -0
  844. package/neural-interface/lib/whatsapp/protocol.js +327 -0
  845. package/neural-interface/lib/whatsapp/qr-svg.js +57 -0
  846. package/neural-interface/lib/whatsapp/redact.js +130 -0
  847. package/neural-interface/lib/whatsapp/service.js +1305 -0
  848. package/neural-interface/lib/whatsapp/vendor/qrcodegen.js +848 -0
  849. package/neural-interface/package-lock.json +4431 -0
  850. package/neural-interface/package.json +58 -27
  851. package/neural-interface/public/apple-touch-icon.png +0 -0
  852. package/neural-interface/public/category-logos/synabun.png +0 -0
  853. package/neural-interface/public/claude.svg +1 -0
  854. package/neural-interface/public/favicon-16x16.png +0 -0
  855. package/neural-interface/public/favicon-32x32.png +0 -0
  856. package/neural-interface/public/icon-192.png +0 -0
  857. package/neural-interface/public/icon-512.png +0 -0
  858. package/neural-interface/public/index.html +32 -182
  859. package/neural-interface/public/index2d.html +2 -2
  860. package/neural-interface/public/install-app.html +31 -0
  861. package/neural-interface/public/logo-synabun.png +0 -0
  862. package/neural-interface/public/logoHD.png +0 -0
  863. package/neural-interface/public/manifest.json +2 -0
  864. package/neural-interface/public/mcp.svg +4 -0
  865. package/neural-interface/public/offline.html +670 -299
  866. package/neural-interface/public/onboarding.html +804 -161
  867. package/neural-interface/public/opencode-logo-dark-square.svg +1 -0
  868. package/neural-interface/public/shared/agent-runtime-options.js +596 -0
  869. package/neural-interface/public/shared/api.js +339 -28
  870. package/neural-interface/public/shared/assistant/asst-accounts.js +318 -0
  871. package/neural-interface/public/shared/assistant/asst-agents-dock.js +296 -0
  872. package/neural-interface/public/shared/assistant/asst-api.js +270 -0
  873. package/neural-interface/public/shared/assistant/asst-brain-picker.js +744 -0
  874. package/neural-interface/public/shared/assistant/asst-budget.js +333 -0
  875. package/neural-interface/public/shared/assistant/asst-composer.js +656 -0
  876. package/neural-interface/public/shared/assistant/asst-computer.js +803 -0
  877. package/neural-interface/public/shared/assistant/asst-control.js +1018 -0
  878. package/neural-interface/public/shared/assistant/asst-hosts.js +262 -0
  879. package/neural-interface/public/shared/assistant/asst-mascot.js +313 -0
  880. package/neural-interface/public/shared/assistant/asst-menu.js +375 -0
  881. package/neural-interface/public/shared/assistant/asst-panel.js +1845 -0
  882. package/neural-interface/public/shared/assistant/asst-rack-styles.js +586 -0
  883. package/neural-interface/public/shared/assistant/asst-render.js +3305 -0
  884. package/neural-interface/public/shared/assistant/asst-route.js +1653 -0
  885. package/neural-interface/public/shared/assistant/asst-roving.js +75 -0
  886. package/neural-interface/public/shared/assistant/asst-sanitize.js +117 -0
  887. package/neural-interface/public/shared/assistant/asst-sidepanel-styles.js +488 -0
  888. package/neural-interface/public/shared/assistant/asst-sidepanel.js +675 -0
  889. package/neural-interface/public/shared/assistant/asst-slash.js +258 -0
  890. package/neural-interface/public/shared/assistant/asst-state.js +727 -0
  891. package/neural-interface/public/shared/assistant/asst-styles.js +1686 -0
  892. package/neural-interface/public/shared/assistant/asst-tool-kinds.js +1017 -0
  893. package/neural-interface/public/shared/assistant/asst-usage.js +444 -0
  894. package/neural-interface/public/shared/assistant/asst-ws.js +175 -0
  895. package/neural-interface/public/shared/automation-context.js +75 -0
  896. package/neural-interface/public/shared/blob-store.js +99 -0
  897. package/neural-interface/public/shared/cdx/cdx-capabilities.js +118 -0
  898. package/neural-interface/public/shared/cdx/cdx-cards.js +37 -0
  899. package/neural-interface/public/shared/cdx/cdx-commands.js +171 -0
  900. package/neural-interface/public/shared/cdx/cdx-context-menu.js +402 -0
  901. package/neural-interface/public/shared/cdx/cdx-context-model.js +220 -0
  902. package/neural-interface/public/shared/cdx/cdx-features.js +408 -0
  903. package/neural-interface/public/shared/cdx/cdx-icons.js +89 -0
  904. package/neural-interface/public/shared/cdx/cdx-mcp-app-host.js +414 -0
  905. package/neural-interface/public/shared/cdx/cdx-mcp-app-proxy.html +6 -0
  906. package/neural-interface/public/shared/cdx/cdx-mcp-app-proxy.js +56 -0
  907. package/neural-interface/public/shared/cdx/cdx-mcp-app.js +178 -0
  908. package/neural-interface/public/shared/cdx/cdx-model-catalog.js +120 -0
  909. package/neural-interface/public/shared/cdx/cdx-output-model.js +261 -0
  910. package/neural-interface/public/shared/cdx/cdx-output.js +382 -0
  911. package/neural-interface/public/shared/cdx/cdx-panel.js +1372 -0
  912. package/neural-interface/public/shared/cdx/cdx-plan.js +266 -0
  913. package/neural-interface/public/shared/cdx/cdx-protocol.js +682 -0
  914. package/neural-interface/public/shared/cdx/cdx-render.js +3381 -0
  915. package/neural-interface/public/shared/cdx/cdx-requests.js +1136 -0
  916. package/neural-interface/public/shared/cdx/cdx-styles.js +3251 -0
  917. package/neural-interface/public/shared/cdx/cdx-tabs.js +7992 -0
  918. package/neural-interface/public/shared/cdx/cdx-ws.js +363 -0
  919. package/neural-interface/public/shared/cli-status.js +169 -0
  920. package/neural-interface/public/shared/command-runner-model.js +30 -0
  921. package/neural-interface/public/shared/constants.js +22 -5
  922. package/neural-interface/public/shared/cp/cp-agents.js +186 -0
  923. package/neural-interface/public/shared/cp/cp-bash.js +252 -0
  924. package/neural-interface/public/shared/cp/cp-compose.js +159 -0
  925. package/neural-interface/public/shared/cp/cp-context-menu.js +309 -0
  926. package/neural-interface/public/shared/cp/cp-context-model.js +157 -0
  927. package/neural-interface/public/shared/cp/cp-context-window.js +80 -0
  928. package/neural-interface/public/shared/cp/cp-ctx.js +11 -0
  929. package/neural-interface/public/shared/cp/cp-diff.js +255 -0
  930. package/neural-interface/public/shared/cp/cp-event-rows.js +637 -0
  931. package/neural-interface/public/shared/cp/cp-events.js +846 -0
  932. package/neural-interface/public/shared/cp/cp-markdown.js +104 -0
  933. package/neural-interface/public/shared/cp/cp-permission-model.js +905 -0
  934. package/neural-interface/public/shared/cp/cp-permissions.js +626 -0
  935. package/neural-interface/public/shared/cp/cp-rehydrate.js +113 -0
  936. package/neural-interface/public/shared/cp/cp-restore.js +224 -0
  937. package/neural-interface/public/shared/cp/cp-session-model.js +338 -0
  938. package/neural-interface/public/shared/cp/cp-session-settings.js +254 -0
  939. package/neural-interface/public/shared/cp/cp-sessions.js +227 -0
  940. package/neural-interface/public/shared/cp/cp-statusline.js +153 -0
  941. package/neural-interface/public/shared/cp/cp-styles.js +349 -0
  942. package/neural-interface/public/shared/cp/cp-tasks-model.js +282 -0
  943. package/neural-interface/public/shared/cp/cp-tasks.js +107 -0
  944. package/neural-interface/public/shared/cp/cp-temporary-view.js +56 -0
  945. package/neural-interface/public/shared/cp/cp-temporary.js +231 -0
  946. package/neural-interface/public/shared/cp/cp-tool-cards.js +326 -0
  947. package/neural-interface/public/shared/cp/cp-tool-results.js +618 -0
  948. package/neural-interface/public/shared/cp/cp-usage-model.js +124 -0
  949. package/neural-interface/public/shared/graph-activity.js +68 -0
  950. package/neural-interface/public/shared/html-shell.js +116 -17
  951. package/neural-interface/public/shared/i18n.js +132 -34
  952. package/neural-interface/public/shared/node-positions-store.js +44 -0
  953. package/neural-interface/public/shared/ocp-hidden-models.js +116 -0
  954. package/neural-interface/public/shared/ocp-v2/ocp-v2-approvals.js +355 -0
  955. package/neural-interface/public/shared/ocp-v2/ocp-v2-autoaccept-button.js +35 -0
  956. package/neural-interface/public/shared/ocp-v2/ocp-v2-automation-ownership.js +72 -0
  957. package/neural-interface/public/shared/ocp-v2/ocp-v2-binding.js +280 -0
  958. package/neural-interface/public/shared/ocp-v2/ocp-v2-caps.js +67 -0
  959. package/neural-interface/public/shared/ocp-v2/ocp-v2-changes-logic.js +179 -0
  960. package/neural-interface/public/shared/ocp-v2/ocp-v2-changes.js +164 -0
  961. package/neural-interface/public/shared/ocp-v2/ocp-v2-childpanel.js +725 -0
  962. package/neural-interface/public/shared/ocp-v2/ocp-v2-compact-button.js +75 -0
  963. package/neural-interface/public/shared/ocp-v2/ocp-v2-composer-logic.js +1204 -0
  964. package/neural-interface/public/shared/ocp-v2/ocp-v2-confirm-logic.js +117 -0
  965. package/neural-interface/public/shared/ocp-v2/ocp-v2-confirm.js +59 -0
  966. package/neural-interface/public/shared/ocp-v2/ocp-v2-context-gauge.js +252 -0
  967. package/neural-interface/public/shared/ocp-v2/ocp-v2-context-menu.js +478 -0
  968. package/neural-interface/public/shared/ocp-v2/ocp-v2-context-model.js +179 -0
  969. package/neural-interface/public/shared/ocp-v2/ocp-v2-events.js +233 -0
  970. package/neural-interface/public/shared/ocp-v2/ocp-v2-icons.js +30 -0
  971. package/neural-interface/public/shared/ocp-v2/ocp-v2-manager.js +1065 -0
  972. package/neural-interface/public/shared/ocp-v2/ocp-v2-mention-hints.js +182 -0
  973. package/neural-interface/public/shared/ocp-v2/ocp-v2-modelpicker.js +655 -0
  974. package/neural-interface/public/shared/ocp-v2/ocp-v2-panel.js +2636 -0
  975. package/neural-interface/public/shared/ocp-v2/ocp-v2-plan.js +601 -0
  976. package/neural-interface/public/shared/ocp-v2/ocp-v2-profile-inheritance.js +78 -0
  977. package/neural-interface/public/shared/ocp-v2/ocp-v2-projectbar.js +649 -0
  978. package/neural-interface/public/shared/ocp-v2/ocp-v2-providers.js +35 -0
  979. package/neural-interface/public/shared/ocp-v2/ocp-v2-rehydrate.js +357 -0
  980. package/neural-interface/public/shared/ocp-v2/ocp-v2-render-logic.js +189 -0
  981. package/neural-interface/public/shared/ocp-v2/ocp-v2-render.js +1869 -0
  982. package/neural-interface/public/shared/ocp-v2/ocp-v2-select.js +42 -0
  983. package/neural-interface/public/shared/ocp-v2/ocp-v2-send-logic.js +117 -0
  984. package/neural-interface/public/shared/ocp-v2/ocp-v2-send.js +1714 -0
  985. package/neural-interface/public/shared/ocp-v2/ocp-v2-session-actions.js +468 -0
  986. package/neural-interface/public/shared/ocp-v2/ocp-v2-session-widgets.js +63 -0
  987. package/neural-interface/public/shared/ocp-v2/ocp-v2-sessions-logic.js +366 -0
  988. package/neural-interface/public/shared/ocp-v2/ocp-v2-settings-link.js +19 -0
  989. package/neural-interface/public/shared/ocp-v2/ocp-v2-slash-hints.js +343 -0
  990. package/neural-interface/public/shared/ocp-v2/ocp-v2-state.js +746 -0
  991. package/neural-interface/public/shared/ocp-v2/ocp-v2-status-logic.js +347 -0
  992. package/neural-interface/public/shared/ocp-v2/ocp-v2-status.js +338 -0
  993. package/neural-interface/public/shared/ocp-v2/ocp-v2-styles.js +3543 -0
  994. package/neural-interface/public/shared/ocp-v2/ocp-v2-subagents-logic.js +482 -0
  995. package/neural-interface/public/shared/ocp-v2/ocp-v2-tools-logic.js +351 -0
  996. package/neural-interface/public/shared/ocp-v2/ocp-v2-tools.js +168 -0
  997. package/neural-interface/public/shared/ocp-v2/ocp-v2-variantpicker.js +315 -0
  998. package/neural-interface/public/shared/ocp-v2/ocp-v2-ws.js +545 -0
  999. package/neural-interface/public/shared/provider-icons.js +30 -0
  1000. package/neural-interface/public/shared/pwa-install-page.js +34 -0
  1001. package/neural-interface/public/shared/pwa-install.css +12 -0
  1002. package/neural-interface/public/shared/pwa-install.js +28 -0
  1003. package/neural-interface/public/shared/session-title.js +100 -0
  1004. package/neural-interface/public/shared/settings/settings-ia.js +389 -0
  1005. package/neural-interface/public/shared/settings/settings-kit.js +234 -0
  1006. package/neural-interface/public/shared/settings/settings-rules.js +160 -0
  1007. package/neural-interface/public/shared/settings/settings-search.js +463 -0
  1008. package/neural-interface/public/shared/settings/settings-shell.js +570 -0
  1009. package/neural-interface/public/shared/start-bridge.js +583 -0
  1010. package/neural-interface/public/shared/state.js +5 -0
  1011. package/neural-interface/public/shared/storage.js +50 -7
  1012. package/neural-interface/public/shared/styleguide/sg-agents.js +42 -0
  1013. package/neural-interface/public/shared/styleguide/sg-brand.js +4 -0
  1014. package/neural-interface/public/shared/styleguide/sg-color-client.js +388 -0
  1015. package/neural-interface/public/shared/styleguide/sg-colors.js +151 -0
  1016. package/neural-interface/public/shared/styleguide/sg-components.js +35 -0
  1017. package/neural-interface/public/shared/styleguide/sg-history.js +41 -0
  1018. package/neural-interface/public/shared/styleguide/sg-icons-logo.js +38 -0
  1019. package/neural-interface/public/shared/styleguide/sg-imagery.js +4 -0
  1020. package/neural-interface/public/shared/styleguide/sg-import-export.js +48 -0
  1021. package/neural-interface/public/shared/styleguide/sg-kit.js +284 -0
  1022. package/neural-interface/public/shared/styleguide/sg-labels.js +318 -0
  1023. package/neural-interface/public/shared/styleguide/sg-layout.js +4 -0
  1024. package/neural-interface/public/shared/styleguide/sg-motion.js +5 -0
  1025. package/neural-interface/public/shared/styleguide/sg-panel.js +237 -0
  1026. package/neural-interface/public/shared/styleguide/sg-preview.js +138 -0
  1027. package/neural-interface/public/shared/styleguide/sg-rules.js +9 -0
  1028. package/neural-interface/public/shared/styleguide/sg-shape.js +24 -0
  1029. package/neural-interface/public/shared/styleguide/sg-state.js +132 -0
  1030. package/neural-interface/public/shared/styleguide/sg-typography.js +125 -0
  1031. package/neural-interface/public/shared/styles.css +8614 -1477
  1032. package/neural-interface/public/shared/synabun-mascot.js +1625 -0
  1033. package/neural-interface/public/shared/synabun-ticker.js +376 -0
  1034. package/neural-interface/public/shared/term-ready.js +307 -0
  1035. package/neural-interface/public/shared/term-renderer.js +343 -0
  1036. package/neural-interface/public/shared/ui-assistant-panel.js +10 -0
  1037. package/neural-interface/public/shared/ui-assistant.js +77 -0
  1038. package/neural-interface/public/shared/ui-automation-studio.js +5105 -3573
  1039. package/neural-interface/public/shared/ui-claude-panel.js +11685 -6333
  1040. package/neural-interface/public/shared/ui-codex-panel.js +12 -0
  1041. package/neural-interface/public/shared/ui-command-runner.js +251 -468
  1042. package/neural-interface/public/shared/ui-cost-widget.js +55 -34
  1043. package/neural-interface/public/shared/ui-detail.js +77 -14
  1044. package/neural-interface/public/shared/ui-explorer.js +360 -181
  1045. package/neural-interface/public/shared/ui-file-explorer.js +485 -107
  1046. package/neural-interface/public/shared/ui-help.js +2 -2
  1047. package/neural-interface/public/shared/ui-image-gallery.js +45 -21
  1048. package/neural-interface/public/shared/ui-judgments.js +1346 -0
  1049. package/neural-interface/public/shared/ui-keybinds.js +3 -2
  1050. package/neural-interface/public/shared/ui-link.js +105 -51
  1051. package/neural-interface/public/shared/ui-loading.js +222 -11
  1052. package/neural-interface/public/shared/ui-memory-maintenance.js +111 -0
  1053. package/neural-interface/public/shared/ui-menubar.js +100 -31
  1054. package/neural-interface/public/shared/ui-native-loop-router-state.js +94 -0
  1055. package/neural-interface/public/shared/ui-native-loop-router.js +493 -0
  1056. package/neural-interface/public/shared/ui-native-window-id.js +7 -0
  1057. package/neural-interface/public/shared/ui-navbar.js +357 -222
  1058. package/neural-interface/public/shared/ui-notifications.js +58 -12
  1059. package/neural-interface/public/shared/ui-opencode-panel-v2.js +17 -0
  1060. package/neural-interface/public/shared/ui-panels.js +15 -7
  1061. package/neural-interface/public/shared/ui-resume.js +823 -653
  1062. package/neural-interface/public/shared/ui-schedule-queue.js +172 -0
  1063. package/neural-interface/public/shared/ui-schedules-studio.js +1882 -0
  1064. package/neural-interface/public/shared/ui-scroll-follow.js +194 -0
  1065. package/neural-interface/public/shared/ui-sessions.js +789 -34
  1066. package/neural-interface/public/shared/ui-settings.js +5774 -2194
  1067. package/neural-interface/public/shared/ui-sidepanel-layout.js +109 -0
  1068. package/neural-interface/public/shared/ui-sidepanel-runtime.js +19 -0
  1069. package/neural-interface/public/shared/ui-sidepanel-session-entry.js +40 -0
  1070. package/neural-interface/public/shared/ui-sidepanel-sessions.js +221 -0
  1071. package/neural-interface/public/shared/ui-sidepanel-state.js +131 -0
  1072. package/neural-interface/public/shared/ui-sidepanel-tray.js +547 -0
  1073. package/neural-interface/public/shared/ui-sidepanel-windows.js +387 -0
  1074. package/neural-interface/public/shared/ui-skills.js +18 -32
  1075. package/neural-interface/public/shared/ui-styleguide.js +35 -0
  1076. package/neural-interface/public/shared/ui-sync.js +87 -0
  1077. package/neural-interface/public/shared/ui-terminal.js +7863 -6385
  1078. package/neural-interface/public/shared/ui-tool-updates.js +292 -0
  1079. package/neural-interface/public/shared/ui-tooltip.js +156 -15
  1080. package/neural-interface/public/shared/ui-tutorial-draw.js +119 -683
  1081. package/neural-interface/public/shared/ui-tutorial-layout.js +135 -0
  1082. package/neural-interface/public/shared/ui-tutorial-steps.js +59 -2209
  1083. package/neural-interface/public/shared/ui-tutorial.css +102 -0
  1084. package/neural-interface/public/shared/ui-tutorial.js +557 -1076
  1085. package/neural-interface/public/shared/ui-update.js +420 -68
  1086. package/neural-interface/public/shared/ui-whatsapp.js +941 -0
  1087. package/neural-interface/public/shared/ui-whiteboard.js +1076 -233
  1088. package/neural-interface/public/shared/ui-workspaces.js +2 -1
  1089. package/neural-interface/public/shared/utils.js +58 -0
  1090. package/neural-interface/public/shared/vterm-buffer.js +15 -5
  1091. package/neural-interface/public/shared/whatsapp/wa-phone.js +65 -0
  1092. package/neural-interface/public/shared/whatsapp/wa-view.js +411 -0
  1093. package/neural-interface/public/sidepanel-session.html +18 -0
  1094. package/neural-interface/public/sw.js +10 -2
  1095. package/neural-interface/public/synabun.png +0 -0
  1096. package/neural-interface/public/variant/2d/graph.js +1707 -1635
  1097. package/neural-interface/public/variant/2d/lasso.js +2 -1
  1098. package/neural-interface/public/variant/2d/layout.js +595 -594
  1099. package/neural-interface/public/variant/2d/main.js +557 -521
  1100. package/neural-interface/public/variant/2d/settings-gfx.js +18 -24
  1101. package/neural-interface/public/variant/3d/main.js +517 -500
  1102. package/neural-interface/public/variant/3d/map-controls.js +144 -0
  1103. package/neural-interface/public/variant/3d/map-data.js +251 -0
  1104. package/neural-interface/public/variant/3d/map-labels.js +241 -0
  1105. package/neural-interface/public/variant/3d/map-pick.js +90 -0
  1106. package/neural-interface/public/variant/3d/map-renderer.js +521 -0
  1107. package/neural-interface/public/variant/3d/map-shaders.js +158 -0
  1108. package/neural-interface/public/variant/3d/map-view.js +618 -0
  1109. package/neural-interface/public/vendor/three/manifest.json +3 -0
  1110. package/neural-interface/public/vendor/three/three-0.169.0.min.js +3844 -0
  1111. package/neural-interface/public/vendor/xterm/manifest.json +3 -0
  1112. package/neural-interface/public/vendor/xterm/xterm-6.0.0.css +285 -0
  1113. package/neural-interface/public/vendor/xterm/xterm-6.0.0.min.js +192 -0
  1114. package/neural-interface/scripts/build-vendor.mjs +64 -0
  1115. package/neural-interface/scripts/codex-protocol-fixture.mjs +83 -0
  1116. package/neural-interface/scripts/rebuild-pty.js +39 -22
  1117. package/neural-interface/scripts/vendor-three-entry.js +24 -0
  1118. package/neural-interface/scripts/vendor-xterm-entry.js +8 -0
  1119. package/neural-interface/server.js +33983 -15000
  1120. package/neural-interface/skins/default/skin.css +90 -0
  1121. package/neural-interface/skins/default/skin.json +8 -0
  1122. package/neural-interface/templates/rulesets/README.md +9 -0
  1123. package/neural-interface/templates/rulesets/claude.md +3 -0
  1124. package/neural-interface/templates/rulesets/codex.md +2 -0
  1125. package/neural-interface/templates/rulesets/coexistence.md +6 -0
  1126. package/neural-interface/templates/rulesets/core.md +26 -0
  1127. package/neural-interface/templates/rulesets/cursor.md +2 -0
  1128. package/neural-interface/templates/rulesets/gemini.md +2 -0
  1129. package/neural-interface/templates/rulesets/legacy-hashes.json +227 -0
  1130. package/neural-interface/templates/rulesets/manifest.json +12 -0
  1131. package/neural-interface/templates/rulesets/opencode.md +2 -0
  1132. package/package.json +131 -53
  1133. package/postinstall.js +55 -26
  1134. package/preuninstall.js +187 -0
  1135. package/scripts/restore-data-home-from-backup.mjs +239 -0
  1136. package/setup.js +872 -260
  1137. package/skills/leonardo/SKILL.md +19 -10
  1138. package/skills/leonardo/modules/image-prompter.md +18 -12
  1139. package/skills/leonardo/modules/video-prompter.md +19 -13
  1140. package/skills/synabun/SKILL.md +209 -185
  1141. package/skills/synabun/icon.png +0 -0
  1142. package/skills/synabun/modules/audit.md +380 -374
  1143. package/skills/synabun/modules/changelog.md +15 -6
  1144. package/skills/synabun/modules/idea.md +148 -144
  1145. package/skills/synabun/modules/memorize.md +13 -4
  1146. package/skills/synabun/modules/schedule.md +198 -0
  1147. package/skills/synabun/synabunicon.png +0 -0
  1148. package/updater.cmd +31 -0
  1149. package/updater.mjs +382 -0
  1150. package/updater.sh +29 -0
  1151. package/hooks/claude-code/test-user-learning.mjs +0 -531
  1152. package/neural-interface/public/claude-chat.css +0 -878
  1153. package/neural-interface/public/claude-chat.html +0 -92
  1154. package/neural-interface/public/claude-chat.js +0 -1168
  1155. package/neural-interface/public/index-legacy.html +0 -14677
  1156. package/neural-interface/public/index2d-legacy.html +0 -8193
  1157. package/neural-interface/public/shared/html-term-renderer.js +0 -1022
  1158. package/neural-interface/public/variant/3d/background.js +0 -884
  1159. package/neural-interface/public/variant/3d/camera.js +0 -661
  1160. package/neural-interface/public/variant/3d/gfx.js +0 -116
  1161. package/neural-interface/public/variant/3d/graph.js +0 -2399
  1162. package/neural-interface/public/variant/3d/settings-gfx.js +0 -228
  1163. package/neural-interface/templates/CLAUDE-template.md +0 -211
package/CHANGELOG.md CHANGED
@@ -1,665 +1,208 @@
1
- # SynaBun Changelog
1
+ # SynaBun v.2.0.0
2
+
3
+ SynaBun 2.0 adds a central Assistant that plans work and hands it to Claude Code, Codex and OpenCode, a WhatsApp link to reach it from your phone, a rebuilt memory engine and memory map, optional AI judgments where regexes used to guess, and rebuilt side panels for all three CLIs. It is also the first release on plain semantic versioning.
4
+
5
+ > **Updating from 2026.x** — Versions used to be dates (`2026.9.5`) and are now plain semver (`2.0.0`). Installs older than 2.0.0 compare version numbers as they are, so their in-app update check does not offer this release. Update once by hand with `npm i -g synabun@latest`; your data is snapshotted on the first launch as usual, and from 2.0.0 on the in-app updater works as before.
6
+
7
+ ## ✨ New
8
+
9
+ - **SynaBun Assistant** — A central orchestrator that opens with `a` (or **Apps → Assistant**) as a tab in the bottom command area or as a side panel. Pick its brain (Claude Code, Codex or OpenCode, with model, effort, account, project, MCP profile and permission mode); every turn recalls SynaBun memory, and tasks are dispatched to worker agents that run in the matching sidepanel and report back with a structured result. The `agents` MCP tool group (11 tools) is advertised only to the Assistant, so workers cannot dispatch workers.
10
+ - **Model routes** — Before it works, the Assistant proposes where a task should run: on its own model, or on a worker model chosen by task class, price and capability. A route mode (always ask, ask when unsure, never ask) decides whether you pick, saved routes are enforced, and any model of any provider can be switched off in **Assistant → Models**. Design runs only on a model confirmed to see images, and Image creation and Video creation only on models that can produce them; the files a creation run generates are collected into the run.
11
+ - **Clarifying questions, budgets and exact token accounting** — A vague request gets up to three multiple-choice questions before anything is dispatched, and workers receive your answers verbatim. A Budget window sets five money caps that hold for every provider and apply without a restart. A live gauge shows the session's tokens with input and output apart, priced from one list-price table.
12
+ - **Computer use on macOS** — Four `computer*` tools let the Assistant, and the workers it dispatches for it, see and operate desktop apps through a native helper compiled on first use. It is bounded by an app blocklist, protected windows, a password-field guard, a locked-screen refusal, one controller at a time and stop controls (the Stop button, `Esc`, the top-left failsafe corner), and the tools are advertised only to callers holding a desktop grant.
13
+ - **WhatsApp Link** — Chat with the Assistant from WhatsApp. SynaBun links as a *linked device*, the way WhatsApp Web does: no Meta developer account, no webhook and no server in between. Set it up in **Settings → Messages → WhatsApp** with a QR code or a pairing code, in your own "Message yourself" chat or with a second number; the connector is installed on demand. Three levels decide what a message may do: Read-only, Ask (the default: your phone approves each risky action) and Autonomous (8 hours, turned on only from the computer plus an `ALLOW` code from the phone). Computer use from WhatsApp stays off until you turn on its own switch. See [docs/whatsapp.md](docs/whatsapp.md).
14
+ - **AI decisions** — With a TypeSafe API key, SynaBun asks for a typed judgment where a regex or a similarity constant used to stand in for one: refusing restated memories and redacting credentials on `remember`, relations and replacements between memories, relevance on recall, stale memories when their files change, whether a turn is worth storing, whether a claim of success matches the output, trash triage, and advisory readings of browser pages. Every judgment has a working fallback, so nothing depends on the network; candidate secrets are masked before they leave the machine; and **Settings → AI decisions** has a master switch, a switch per surface, costs and a log of every judgment. Without a key, or with `SYNABUN_TYPESAFE=off`, nothing is sent. See [docs/judgments.md](docs/judgments.md).
15
+ - **Memory v2** — One local memory engine for the MCP server, the Neural Interface and the hooks: hybrid keyword and vector retrieval, passage-level refinement, compact token-budgeted results (`format: "compact"`), batch fetches, revision history with undo, retry keys that make a repeated `remember` return the same memory, and source verification. Existing memories and their UUIDs are kept; the migration takes a backup first.
16
+ - **The 3D view is a memory map** — A continent is a root category and an island is a category; inside an island similar memories sit side by side, and height is creation order. The map shows every memory (the old graph stopped at 8,000), places new ones as they are written, and renders only when something changes, so an idle map draws nothing. three.js ships with SynaBun; the map loads nothing from a CDN.
17
+ - **Style Guide** — A per-project brand and design system (colors in light and dark, type, spacing, shape, motion, components, rules) that writes `DESIGN.md`, W3C design tokens, CSS variables and a Tailwind theme, and imports from the same formats. Every agent gets it: dispatched workers find it in their brief, and the `style_guide` MCP tool answers with the summary, the tokens or a contrast check. Agents never edit the guide; they propose a change that you accept or reject. See [docs/style-guide.md](docs/style-guide.md).
18
+ - **Rules installed for you** — SynaBun's rules are one short ruleset per tool (Claude Code, Codex, OpenCode, Gemini, Cursor), installed where each tool loads them and kept up to date automatically. This replaces the template you pasted into `CLAUDE.md` or `AGENTS.md` by hand.
19
+ - **Claude Code sidepanel on the Agent SDK** — The panel now follows `@anthropic-ai/claude-agent-sdk` 0.3.288: every SDK event is shown, tool results are complete, reopened sessions keep their tool results, and sessions can be renamed, forked and deleted. Bypass is the SDK's real bypass mode and a tab is in it only by your choice. New: a temporary chat that leaves no transcript and stores nothing while recall still works, a rewind preview, and permission rules you can review and remove.
20
+ - **OpenCode sidepanel rebuilt** — Built against OpenCode 1.18.34: text streams as it is written, approvals queue instead of replacing each other, every sub-agent gets its own pill and panel, and shell mode opens with `!` on an empty composer. The legacy panel is removed.
21
+ - **Codex sidepanel on protocol 0.160** — Answers, terminal output and file diffs are formatted; plans are shown complete and open as that exact revision in the editor; MCP app views open inline behind a click and a per-call approval; attachments, gateway sign-in and user verification are supported.
22
+ - **Settings redesign, search and languages** — Eleven task pages replace twenty-two tabs, every section is a card, and a search field in the sidebar finds any page, section or control. A language selector adds Brazilian Portuguese.
23
+ - **Terminals in their own process** — A dedicated terminal host owns every shell, so typing no longer stutters while the server is busy. Output is flow-controlled, a reconnect restores colours, modes and the cursor, and shells start as login shells with truecolor.
24
+ - **Faster browser tools** — Bounded snapshots, server-side paged extraction, scoped content retrieval and `browser_batch` (several actions, one final observation) are on by default; `SYNABUN_BROWSER_V2=0` goes back. Cancelled or uncertain browser actions are never replayed automatically.
25
+ - **Recall before subagents** — In Claude Code, a Task or Agent dispatch now starts from a shared memory brief (5 memories, 1,200 tokens), so workers begin with the paths, earlier fixes and constraints the session already knows. On by default.
26
+ - **Claude accounts** — Several Claude accounts can be signed in side by side and chosen per session, the way Codex accounts already could.
27
+ - **A new workspace tour** — The **?** button opens a hand-drawn tour of memory and the map, the whiteboard, coding tools, browser and automations, and the Assistant. It resumes where you left off, in English and Brazilian Portuguese.
28
+ - **Start Server button** — When the server is down, the offline page and the app's Server Offline overlay show a **Start Server** button. It works on macOS, Windows and Linux, for npm and GitHub installs, starts one server however often it is clicked, and the page reconnects by itself when the server answers. While a start runs, the page names each step the launcher reports (installing dependencies, the browser download, the build, the pre-update backup, the server starting) next to a clock of whole seconds; a failed start shows its reason, the log's path and **Try again**. The command under the button is one line that works in cmd.exe, PowerShell and POSIX shells. A page opened through a tunnel, an invite link or a LAN address shows the clock and general status only.
29
+ - **Command Runner as a searchable library** — Saved commands can be searched by name, command, group or directory, filtered by group, and sorted by saved order or most recently run. Commands on a local workspace stay runnable without an internet connection.
2
30
 
3
- ## 2026-03-29
31
+ ## 🛠 Fixed
4
32
 
5
- ### Fixed — Edit Plan Auto-Implementing Instead of Re-Prompting
6
- - **`plan-saved` handler bypassed user review** — After saving an edited plan in the code editor, the `plan-saved` event handler in `ui-claude-panel.js` immediately sent "Proceed with the implementation based on this updated plan" to Claude, giving the user no opportunity to review the edits or re-edit. Rewrote the handler to render a synthetic assistant message showing the updated plan as markdown, then call `renderPostPlanActions(tab, 'PLAN UPDATED')` to re-display the 3-button action card (Implement / Compact / Edit) — creating an iterative editing loop
7
- - **`renderPostPlanActions()` header was hardcoded** — Added optional `headerText` parameter (defaults to `'PLAN COMPLETE'`) so re-renders after edits can display `'PLAN UPDATED'`
8
- - **Edited plan content lost on implementation** — "Continue with implementation" sent a generic prompt (`'Continue with the implementation based on the approved plan.'`) without the edited content. Now checks `tab._editedPlanContent` and sends the full updated plan text to Claude when present
33
+ - **Any web page could open SynaBun's WebSockets** — Browsers apply no CORS to WebSockets, so a page open in the same browser could connect to `ws://localhost:3344/ws/*` (terminals, the Assistant, sync) and act as you. Every upgrade now checks its `Origin`: the request's own host, loopback on the port, or the configured tunnel or invite proxy.
34
+ - **Backups of large data homes failed and deleted themselves** — Verification read the whole archive into memory, which Node refuses above 2 GiB, and the failed archive was then removed. Verification now streams, and a backup folder on an unmounted drive reports that instead of a permission error.
35
+ - **A failed upgrade snapshot let the new version start anyway** — When the snapshot taken before a new version first runs could not be created, SynaBun warned and launched. It now stops before the server starts and says what failed and how to continue.
36
+ - **The updater could install a version other than the one it offered** — Click-to-update always asked npm for `latest`, so a beta install was moved to the stable release. It now installs exactly the version shown, and a release that npm does not have yet is a manual update.
37
+ - **Every server start could freeze the interface for over a minute** — The session-cache warm-up re-read every OpenCode session on the main thread at each start. Unchanged sessions are skipped and the passes no longer block.
38
+ - **Ended sessions left MCP servers running** — A stdio MCP server never exited when its client went away, so each finished Claude Code or Codex session left a server and its embedding worker behind. They now exit with their client.
39
+ - **Hooks ran twice when installed in two scopes** — Hook commands are identical across project and global settings, so Claude Code runs each handler once per event; server startup repairs older registrations.
40
+ - **The plan-memory reminder could not be satisfied** — The Stop hook identified a plan by a file path the storing hook never saw, so the reminder repeated after the plan was stored. Plans are matched by content.
41
+ - **Claude sidepanel sessions dropped background agents, reconnects and new chats** — Fixed, together with a context gauge that showed 200K on 1M sessions and a model picker that never offered the newest Opus.
42
+ - **The sidepanel ran an older Claude than the one you installed** — Sidepanel sessions and native loops now use the installed Claude CLI when it is newer than the bundled one.
43
+ - **Codex schedules failed on a model id with a context suffix** — Every automation launcher now resolves the context window on its own.
44
+ - **Two ways around the X publish gate** — On loop tabs, `Cmd+Enter` and a scripted click on the post button skipped the publish gate and the write queue. Both are refused.
45
+ - **BlueSky schedules stopped on an expired token** — The token is renewed in place, and every automation runs in the default MoreLogin profile.
46
+ - **Session pills vanished when the toolbar collapsed** — They stay visible.
47
+ - **Saved commands started about 15 seconds late** — The Command Runner waited for a prompt it could recognise, and the default macOS zsh prompt (`%`) was not on its list, so the command was typed by a 15-second fallback. A shell tab now gets the command as soon as its prompt is ready, and the terminal says so when a command could not be delivered. Claude Code, Codex, Gemini and OpenCode tabs keep their timing.
48
+ - **The Settings save bar drifted into the middle of the page** — On a page with a save bar (Settings → Browser) the bar stays on the bottom edge of its column whether sections are open or closed, and its buttons stack in a narrow panel instead of being cut off.
49
+ - **The Assistant mascot covered your message after a send** — The character now moves at once into the Thinking row under the message.
50
+ - **Codex approvals with a policy choice** — When an approval offers a policy change (for example allowing a command from now on), the Assistant sends back exactly the choice Codex offered instead of only its label.
9
51
 
10
- ### Added — Minimized Pill Checkmark Icon on Task Complete
11
- - **Profile icon swaps to green checkmark when CLI status is DONE** — When a minimized terminal pill's CLI status changes to `done`, the `.term-minimized-pill-icon` innerHTML is replaced with a checkmark SVG (`SVG_CHECK_DONE` constant, 16x16 polyline). Original icon is preserved in `dataset.originalIcon` and restored when status changes away from `done`. Icon swap logic added to the pill section of `_updateSessionBadges()` in `ui-terminal.js`. Green color (`rgba(100, 200, 120, 0.8)`) applied via `.term-minimized-pill-icon.done` CSS class in `styles.css`, matching the existing DONE badge palette
12
-
13
- ### Fixed — Permission Spam in Claude Code Sidepanel
14
- - **Events leaked through buffer gate** — `handleTabMsg()` in `ui-claude-panel.js` allowed `event` type messages through while `_activePerm` was set, causing thinking dots and streaming text to render below active permission cards. Also, `AskUserQuestion` control requests had zero message buffering — `pendingAskRequestId` was never checked by the buffer gate. Changed the gate to block ALL message types (except `control_request`) when either `_activePerm` or `pendingAskRequestId` is set
15
- - **Process not killed on deny** — The `control_response` handler in `server.js` sent a `done` message to the client on permission denial but never called `killProc()`. The still-running Claude CLI process continued executing, triggered more tool uses, and flooded the user with additional permission cards. Now calls `killProc()` before sending `done` in the deny branch
16
- - **Queue and buffer not cleared on deny** — After killing the process, queued permission cards (`_permQueue`) and buffered messages (`_msgBuffer`) from the now-dead process would still pop up sequentially. The `resolve('deny')` path in `renderPermissionPrompt()` now empties both arrays immediately
17
-
18
- ### Fixed — AskUserQuestion Buffer Flush
19
- - **Buffered messages not flushed after answering** — Since `pendingAskRequestId` now gates the message buffer, `sendAskAnswer()` needed a corresponding `_flushMsgBuffer(tab)` call after clearing `pendingAskRequestId` to release buffered messages once the user responds
20
-
21
- ### Changed — Permission Card "Always" Button UX
22
- - **Replaced checkbox + label with dedicated button** — Removed the `alwaysLbl`/`alwaysCb`/`alwaysText` checkbox elements from `renderPermissionPrompt()` in `ui-claude-panel.js`. Added a `perm-btn-always` button as the leftmost element in the actions row: `[Always] [Allow] [Deny]`. One click auto-allows the tool for the session and resolves the card. Status badge shows "Always" when used. CSS: subtle default styling (`rgba(255,255,255,0.04)`) that warms to match the Allow button on hover
23
-
24
- ### Added — Permission System Test Suite
25
- - **81-test suite for sidepanel permission blocking** — Created `tests/automated/permission-system.test.mjs` with three test categories: source validation (28 tests verifying code patterns in `ui-claude-panel.js` and `server.js` — buffer gate, deny cleanup, Always button DOM, CSS, `killProc()` ordering), logic simulation (52 tests with mock tab objects covering buffer gate during perm/ask/idle states, buffer capacity, deny vs allow behavior, `autoAllowTools` set management, `_showNextPerm()` queue processing, full permission spam scenario, mixed perm+ask scenario, and sequential allows), and server integration (1 test verifying `killProc()` before `done` on deny). Registered in `run-all.mjs` as key `"permissions"` for `node tests/automated/run-all.mjs permissions`
26
-
27
- ### Fixed — AskUserQuestion Card Duplication
28
- - **Buffer flushed after dedup flag cleared** — `sendAskAnswer()` in `ui-claude-panel.js` cleared `askRenderedViaControl = false` before calling `_flushMsgBuffer()`. Buffered `assistant` events flushed after the user answered saw the flag as false, causing `buildAskFromToolUse()` to render full duplicate cards instead of hidden placeholders. Reordered to flush the buffer first while `askRenderedViaControl` is still true, then clear the flag
29
- - **No DOM-level guard against duplicate ask cards** — `renderAskUserQuestion()` (control_request render path) had no check for whether an active ask card already existed in the DOM. Added a querySelector guard for `.ask-card .ask-submit:not([disabled])` — if an active card is found, the render is skipped entirely
30
-
31
- ### Added — Interactive Feature Stress Test (Claude Code Sidepanel)
32
- - **Full QA pass across all interactive card types** — Validated 8 `AskUserQuestion` variations in `ui-claude-panel.js`: single-select with recommended option, multi-select (4 options), max 4-question batch (mixed single/multi), code snippet previews, markdown rich previews, long description overflow, rapid-fire back-to-back (3x), and interleaved with tool calls (Glob + Ask). All rendered correctly with no duplication or overlap
33
- - **Plan Mode validation** — Tested in-plan `AskUserQuestion` clarification, 15-step plan content rendering, and `ExitPlanMode`. Confirmed `ExitPlanMode` requires system-level plan mode state (via `EnterPlanMode`) — user-typed `[PLAN MODE]` prompt prefix does not set the system flag
34
- - **TodoWrite validation** — Tested 10-item task list creation with mixed states (completed/in_progress/pending), rapid state transitions (3 sequential updates sweeping pending → completed), and full completion sweep
35
- - **Combined flow validation** — Tested Bash + AskUserQuestion + TodoWrite in a single response, Agent subagent + AskUserQuestion (agent researched test files, ask used results as context), and Glob + AskUserQuestion interleaving
36
-
37
- ### Fixed — Session Dropdown Chevron Hit Target Too Small
38
- - **`▾` arrow in `.cp-session-btn` nearly unclickable** — The `.cp-dd-arrow` chevron that opens the session dropdown menu was `font-size: 7px` with no padding, making it extremely difficult to click. Since clicking the `.cp-session-label` text triggers rename (not dropdown), the chevron was the only clickable area for opening the menu. Added scoped CSS for `.cp-session-btn .cp-dd-arrow`: bumped font to `9px`, added `padding: 4px 6px` with negative margin to extend hit area without affecting layout, plus `border-radius` and hover highlight (`background: rgba(255,255,255,0.08)`) for visual feedback
39
-
40
- ### Fixed — White Dropdown Backgrounds on Windows
41
- - **Native `<select>` option menus unstyled on Windows** — Select dropdowns (toast position, auto-dismiss, sound preset, backup interval) rendered with white backgrounds on Windows Chrome/Edge because the app lacked a `color-scheme` declaration. Added `color-scheme: dark` to `:root` in both `styles.css` (main app) and `onboarding.html` (standalone page with its own `:root`), telling browsers to render all native form controls in dark mode. No impact on macOS which already respects system dark mode
42
-
43
- ### Changed — Settings Add Project Uses Native OS Folder Picker
44
- - **Replaced inline folder browser with native OS dialog** — The "Add Project" modal in Settings had a custom inline folder browser requiring users to navigate directories one-by-one and click a small "Select" button to confirm — confusing UX with no drive/volume switching on Windows. Replaced the entire `loadDir()` browser component (~50 lines) with a `POST /api/browse-folder` call that opens the native OS folder picker (same endpoint onboarding already uses). Browse button shows a loading spinner while the dialog is open, auto-fills the label from the selected folder name. Manual path input retained as fallback
45
-
46
- ### Changed — Custom Dropdown Replacement for Settings Selects (Cross-Platform)
47
- - **Native `<select>` elements replaced with custom `cc-dropdown` components** — All 4 native `<select>` dropdowns in Settings (backup frequency `#auto-backup-interval`, sound preset `#notif-sound-type`, toast position `#notif-toast-position`, auto-dismiss duration `#notif-toast-duration`) converted to div-based `cc-dropdown` components with `.stg-dropdown` override class in `styles.css`. Native dropdown popups render with OS-native styling — on Windows this produces a white dropdown popup that clashes with the dark theme. Custom dropdowns reuse the existing `cc-dropdown` pattern (already used for 9 browser settings dropdowns) with settings-specific sizing
48
- - `wireStgDropdowns(container)` helper in `ui-settings.js` wires all `.stg-dropdown` elements — trigger click toggle, item selection with hidden input sync via `dispatchEvent(new Event('change'))`, and click-outside-to-close
49
- - `syncStgDropdown(container, hiddenId)` helper syncs dropdown display from hidden input values on initial API load
50
- - `.stg-dropdown-inline` CSS variant for notification dropdowns (`flex:1`, smaller padding, no min-width)
51
- - Dropdown menu uses `min-width: 100%; right: auto` to prevent horizontal overflow in the settings panel
52
-
53
- ## 2026-03-28
54
-
55
- ### Added — Browser Stream Toggle (Settings > Browser)
56
- - **Stream enable/disable toggle** — New `#bc-screencastEnabled` toggle in the Browser settings Quick Setup card (`ui-settings.js`). Persisted as `screencast.disabled` in `data/browser-config.json` via `collectBrowserConfig()`, restored via `applyBrowserConfig()`. Default: OFF (stream disabled by default, toggle ON to enable with GPU warning)
57
- - **Server-side screencast guard** — `startScreencast()` in `server.js` now checks `loadBrowserConfig().screencast.disabled` before starting CDP `Page.startScreencast`. When disabled, returns early — no frame capture, encoding, or WebSocket broadcasting. Eliminates ~50% CPU from the Playwright Chrome GPU process
58
- - **Client-side floating window suppression** — Both `reconnectBrowserSession()` and `openBrowserSession()` in `ui-terminal.js` now check `/api/browser/config` at entry and return early when `screencast.disabled` is true, blocking ALL code paths that create floating browser windows — MCP automation sync events, reconnect events, page-load auto-restore, Apps dropdown launches, and keyboard shortcuts. Additional guards in `sync:browser:created` handler and auto-reconnect logic for defense in depth
59
- - **Automation unaffected** — All MCP browser tools (`browser_click`, `browser_navigate`, etc.) continue working via REST API. Playwright browser still launches headful (visible Chrome window). Only the CDP screencast stream and Neural Interface preview are disabled
60
-
61
- ### Added — Multi-Select Checkbox Visual Distinction for AskUserQuestion
62
- - **Square checkbox indicators for multi-select questions** — When `AskUserQuestion` is called with `multiSelect: true`, the UI now renders square checkbox `::before` pseudo-elements (`border-radius: 3px`) instead of the default circle radio indicators (`border-radius: 50%`). Applied via `.ask-options.multi` CSS class in both the sidepanel (`ui-claude-panel.js` inline styles) and standalone chat (`claude-chat.css`).
63
- - **"Select all that apply" hint text** — A `.ask-multi-hint` element is injected above the options when multi-select is active, styled as a subtle italic label (`9-10px`, `rgba(100,160,255,0.4)`). Implemented in three JS render paths: `renderAskUserQuestion()` and `buildAskFromToolUse()` in `ui-claude-panel.js`, and `renderAskUserQuestion()` in `claude-chat.js`.
64
-
65
- ### Changed — Standalone Chat Radio Indicators (Parity Fix)
66
- - **Added missing `::before` radio indicator to standalone `.ask-option`** — The standalone chat (`claude-chat.css`) previously had no visual radio/checkbox indicator on question options, unlike the sidepanel. Added full `::before` pseudo-element with `14px` circle, hover border color transition, and selected state with filled background + inset box-shadow. Also restructured `.ask-option` layout from `flex-direction: column` to `row` with `.ask-option-wrap` for label/description column alignment.
67
-
68
- ### Changed — multiSelect Ruleset Guidance
69
- - **Added `### Multi-Select Questions` section to rulesets** — New section in `CLAUDE-template.md` and `CLAUDE.md` instructing Claude to set `multiSelect: true` when options are not mutually exclusive (e.g., multiple features, tags, effects, follow-up actions). Added corresponding one-liner to all 4 condensed rulesets (Cursor, Generic, Gemini, Codex). Auto-propagates to Settings "Copy Ruleset" and Onboarding Step 6 via `GET /api/claude-code/ruleset`.
70
-
71
- ### Added — Whiteboard Multi-Select Keyboard Shortcut
72
- - **`M` key toggles multi-select mode** — Added keyboard shortcut in the whiteboard's `onKeyDown` handler (`ui-whiteboard.js`) to toggle `toggleMultiSelectMode()` via `M` key press. Only fires when not editing text/list elements (inside the `!isEditing` block). Updated toolbar tooltip from `"Multi-select (drag to select)"` to `"Multi-select (M)"` in `html-shell.js`
73
-
74
- ### Changed — Focus Mode Zero-Resource Consumption for 3D & 2D Memory Views
75
- - **Event handler pausing via `_focusPaused` flag (3D)** — Added `_focusPaused` module-level flag to `variant/3d/graph.js` with early-return guards on `_onPointerMove()`, `_onPointerDown()`, `_onPointerUp()`, the `mousemove` tracker in `_initMouseTracking()`, and the wheel-during-drag handler. New `pauseInteraction()` / `resumeInteraction()` exports also disable/enable `OrbitControls` to prevent orbit/zoom input processing
76
- - **Camera input pausing via `_cameraPaused` flag (3D)** — Added `_cameraPaused` flag to `variant/3d/camera.js` with early-return guards on `onKeyDown()`, `onKeyUp()`, `onMouseDown()`, and `updateCameraMovement()`. New `pauseCamera()` / `resumeCamera()` exports clear all held WASD keys and reset `_lastFrameTime` to prevent deltaTime spikes on resume
77
- - **Event handler pausing via `_focusPaused` flag (2D)** — Added `_focusPaused` flag to `variant/2d/graph.js` with early-return guards on all 7 canvas event handlers: `_onPointerDown()`, `_onPointerMove()`, `_onPointerUp()`, `_onPointerLeave()`, `_onWheel()`, `_onDblClick()`, `_onContextMenu()`. New `pauseInteraction()` / `resumeInteraction()` exports also kill active pan inertia
78
- - **Focus event wiring (both variants)** — `variant/3d/main.js` wires `focus:enter` → `pauseInteraction()` + `pauseCamera()` and `focus:exit` → `resumeInteraction()` + `resumeCamera()`. `variant/2d/main.js` wires `focus:enter` → `pauseInteraction()` and `focus:exit` → `resumeInteraction()`. Resize handlers intentionally left active (cheap, ensures correct dimensions on focus exit)
79
-
80
- ### Fixed — Window Controls Overlay CSS Specificity Bug
81
- - **WCO padding overridden by base styles** — The `@media (display-mode: window-controls-overlay)` block at line ~142 in `styles.css` set `padding-left` on `#title-bar`, but the base `#title-bar` rule at line ~1302 used `padding` shorthand with equal specificity (1-0-0). Since the base rule appeared later in the file, it silently overwrote the WCO padding — traffic lights overlapped navbar elements when the macOS overlay toggle was clicked. Replaced the media query with `body.wco-active #title-bar` (specificity 1-1-1), using the `wco-active` class already toggled by `navigator.windowControlsOverlay.geometrychange` in `ui-navbar.js` but never wired to CSS. Also added right-side padding via `max(18px, calc(100vw - env(titlebar-area-x) - env(titlebar-area-width) + 10px))` to account for the WCO toggle arrow
82
-
83
- ### Changed — Window Controls Overlay Visual Polish
84
- - **Theme color matched to navbar** — Changed `theme_color` from `#1c1c1e` to `#0e0e10` in `manifest.json`, `index.html`, and `index2d.html`. The old value was visibly lighter than the navbar's composited appearance (`rgba(18,18,20,0.65)` over `#030305` body ≈ `#0d0d0f`), causing a mismatch behind the macOS traffic lights
85
- - **Vertical alignment with traffic lights** — Replaced `padding-top: calc(env(titlebar-area-y) + 10px)` with `padding-top: 0; padding-bottom: 0; height: env(titlebar-area-height, 48px)`. The navbar now matches the WCO area height exactly, and the base `align-items: center` vertically centers content at the same midpoint as the traffic lights
86
- - **Bar-right pill invisible in WCO mode** — Added `body.wco-active #title-bar .bar-right` rule that strips `background`, `backdrop-filter`, `border`, and `box-shadow`. The frosted glass pill container becomes seamless with the navbar when compact, and reappears automatically in expanded standalone mode
87
-
88
- ### Fixed — Pencil Tool Rendering Smoothness (Whiteboard)
89
- - **Screenshot capture used `lineTo` instead of smooth bezier curves** — The canvas-based `_captureScreenshot()` in `ui-whiteboard.js` rendered pen strokes with straight `ctx.lineTo()` segments between points, producing visibly polygonal lines (circles looked like hexagons). Replaced with `new Path2D(el.pathD)` which reuses the pre-computed Catmull-Rom cubic bezier SVG path data already stored on each pen element. The live SVG rendering was already smooth — only the screenshot capture path was broken
90
- - **Increased Laplacian smoothing passes from 3 to 5** — `penEnd()` now calls `smoothPoints(_penPoints, 5)` instead of 3 passes, producing rounder curves with fewer angular artifacts on finalized strokes
91
- - **Reduced jitter threshold from 3px to 2px** — `penMove()` minimum distance filter lowered to capture denser point sampling during drawing, giving the bezier interpolation more data points for smoother curves
92
-
93
- ### Fixed — Plan System "PLAN COMPLETE" Card Never Rendering in Sidepanel
94
- - **Root cause: `--print` mode doesn't emit `tool_result` events for built-in tools** — The sidepanel runs Claude CLI in `--print --output-format stream-json` mode, which emits `assistant` events (with tool_use blocks) but NOT `tool_result` events for built-in CLI tools like ExitPlanMode. All plan completion logic was in `updateToolResult()`, which never fired. Moved ExitPlanMode detection to `renderAssistant()` (where tool_use blocks ARE visible), setting `_exitPlanPending` / `_exitPlanWasPlanMode` flags. The `result` event handler (and `done` handler as backup) now checks these flags and calls `renderPostPlanActions()` before `finishTab()` clears them
95
- - **`buildTool()` missing `dataset.toolName`** — Regular tool cards were created with `dataset.toolId` but never `dataset.toolName`. Added `card.dataset.toolName = block.name` in `buildTool()` for all non-MCP tool cards
96
- - **`wasPlanMode` guard in `updateToolResult()`** — Sidepanel plan mode is simulated (prompt prefix, not native EnterPlanMode), so ExitPlanMode always returns `is_error: true` with "You are not in plan mode". Added `wasPlanMode` capture before clearing `tab.planMode`, allowing post-plan actions to render even on expected errors. Kept as secondary handler if CLI ever emits tool_result for built-in tools
97
-
98
- ### Fixed — Post-Plan Hook Matcher Drift (server.js)
99
- - **Stale matcher dropped EnterPlanMode handling** — Server-side hook config at `server.js:7340` had matcher `'^ExitPlanMode$'` but the actual `~/.claude/settings.json` registration uses `'^(Enter|Exit)PlanMode$'`. If hooks were re-registered from server config, the EnterPlanMode handler in `post-plan.mjs` (AskUserQuestion reminder, plan file path guidance to `data/plans/` instead of `~/.claude/plans/`) would silently stop firing. Updated matcher to `'^(Enter|Exit)PlanMode$'`
100
-
101
- ### Fixed — Agent Loop Browser Sessions Dying Between Iterations
102
- - **Per-iteration browser session lifecycle** — Browser sessions died between agent loop iterations because `context.on('close')` in `createBrowserSession()` deleted sessions from the `browserSessions` Map with zero agent ownership checks, and the mirror directory (`data/browser-profiles/c141af32ddb4`) had recurring `ENOTEMPTY` cleanup errors causing re-created sessions to launch from corrupted profiles that crashed immediately. Loops would complete 1 productive iteration then stall.
103
- - Iterations 2+ now destroy the old browser session (saving cookies via `destroyBrowserSession()`) and create a fresh one with a unique ID and 3 retry attempts
104
- - Added `_agentOwned` flag on browser sessions — grace timer at the WS `close` handler now checks `session._agentOwned` before destroying, preventing premature session kills when no UI viewer is connected
105
- - Mirror directory `rmSync` in `createBrowserSession()` now retries 3x with escalating delay (500ms, 1000ms, 1500ms) to handle `ENOTEMPTY` from locked Chrome files
106
- - Added `_usesBrowser` flag on agent object to track browser-dependent loops
107
- - Final browser session is destroyed on loop end via cleanup block after the iteration `for` loop
108
-
109
- ### Added — Notification Click-to-Navigate with Session/Tab Specificity
110
- - **`notify()` extended with routing opts** — Added optional 4th `opts` parameter to `notify(source, type, label, opts)` in `ui-notifications.js`, accepting `{ sessionId, tabId }` to identify the specific terminal session or panel tab that triggered the notification
111
- - **Toast click routes to specific session/tab** — `_showToast()` click handler now emits `terminal:show` with `{ sessionId }` or `claude-panel:show` with `{ tabId }` data payload, enabling the event listeners to focus the exact source rather than just showing the panel generically
112
- - **OS banner click-through via service worker** — `_sendBanner()` passes a `routing` object (containing `source`, `sessionId`, `tabId`) to the service worker. `sw.js` stores it in `notification.data` and relays it back to the client via `postMessage({ type: 'NOTIFICATION_CLICK', ...routing })` on `notificationclick`. A new `navigator.serviceWorker` message listener in `ui-notifications.js` catches this and emits the correct routing event
113
- - **Terminal session focus on notification click** — `terminal:show` event handler in `ui-terminal.js` now accepts a `data` parameter; when `data.sessionId` is present, finds the session index via `_sessions.findIndex()` and calls `switchToSession(idx)` to focus that specific tab
114
- - **Panel tab focus on notification click** — `claude-panel:show` event handler in `ui-claude-panel.js` now accepts a `data` parameter; when `data.tabId` is present, finds the tab index via `_tabs.findIndex()` and calls `switchTab(idx)` to activate that specific tab
115
- - **All 10 notify call sites updated** — 8 panel calls pass `{ tabId: tab.id }` (error, done, action, ask, timeout) and 2 CLI calls in `_notifyStatusChange()` pass `{ sessionId }`
116
-
117
- ### Added — Message Queue System for Claude Code Sidepanel
118
- - **Per-tab message queue with FIFO auto-advance** — New queue system in `ui-claude-panel.js` (448 lines) allows users to stack multiple messages while Claude is processing. Messages fire sequentially with 300ms delay between turns. Tab state extended with `queue[]`, `queuePaused`, `queueExpanded`, and `_queueWasActive` fields in `createTab()`, persisted via `saveTabs()`/`restoreTabs()` in localStorage
119
- - **Collapsible queue tray UI** — Glass-aesthetic drawer injected inside `.cp-bottom` above the project bar. Features expand/collapse toggle, live count badge with pulse animation, pause/resume button (amber state when paused), and clear-all button. Items show truncated text preview, attachment badges, edit and remove buttons
120
- - **Drag-to-reorder queue items** — HTML5 DnD on `.cp-queue-item` elements with `dragging`/`drag-over` CSS states. Source index stored in `dataTransfer`, drop handler splices `tab.queue` array and re-renders
121
- - **Inline edit of queued messages** — Click edit icon replaces `.cp-queue-text` span with an `<input>`, commit on Enter/blur, cancel on Escape. Edited text saved back to `tab.queue[idx].text`
122
- - **Input behavior change while running** — Enter (while running + has text) now **queues** the message instead of triggering /btw. Shift+Enter (while running + has text) triggers the existing /btw abort+send interrupt. Send button icon dynamically shows queue icon (☰) by default, switches to /btw arrow when Shift held, stop square when empty. Shift keydown/keyup listeners on `#cp-input` toggle the icon in real-time
123
- - **Auto-advance on turn completion** — `advanceQueue(tab)` hooked into `done` and `aborted` handlers in `_processTabMsg()`. Guards on `tab.running`, `tab._activePerm`, and `tab.pendingAsk` ensure queue pauses naturally during permission prompts and AskUserQuestion interactions, resuming after resolution + turn completion
124
- - **Internal `_sendQueued(tab, item)`** — Mirrors the `send()` flow but reads text/images/files from the queue item object instead of `#cp-input`. Respects `tab.planMode` (wraps prompt with plan prefix), updates pill label on first message, handles image/file attachments. "Queue complete" status message appended when all items are processed
125
-
126
- ## 2026-03-27
127
-
128
- ### Added — Hook-Side Auto-Recall Memory Injection
129
- - **`POST /api/hook-recall` endpoint** — New lightweight recall endpoint in `neural-interface/server.js` that accepts `{ query, project, limit, min_score }`, calls `getEmbedding()` + `dbSearchMemories()`, and returns top N memories with content truncated to 300 chars. Returns `{ results: [] }` on any error for graceful degradation
130
- - **`autoRecall()` in prompt-submit hook** — New function in `hooks/claude-code/prompt-submit.mjs` that calls `/api/hook-recall` on every substantive user prompt (past skip patterns), auto-detects project from `cwd` via `detectProject()`, and injects top 3 matching memories (score >= 0.4) directly into `additionalContext` as a formatted `=== SynaBun: Related Memories ===` block
131
- - Added `import { detectProject } from './shared.mjs'` for project-scoped queries
132
- - Added `cwd` parsing from hook stdin input
133
- - 3-second timeout with silent fallback — NI server down or slow never blocks the hook
134
- - Skipped for first message (boot sequence handles recall) and active loops (own context management)
135
- - Coexists with existing Tier 1-3 recall nudges — memories are injected directly while nudges still tell Claude to do deeper targeted searches when specific patterns match
136
-
137
- ### Fixed — Duplicate AskUserQuestion Cards in Claude Skin
138
- - **Dual control_request rendering** — The server sent two `control_request` messages for every `AskUserQuestion` tool call: a proactive one when detecting the tool in the assistant stream event, and a second from the CLI's `permission_denials` in the result event. Client-side dedup guards failed to catch the second render due to an edge case where `renderAssistant()` short-circuits when a message contains only `AskUserQuestion` tools (no text), leaving `pendingAskToolUseId` unset.
139
- - **Server fix** (`neural-interface/server.js`) — Added `permCardToolNames.has(requestId)` check in the denial loop to skip sending a duplicate `control_request` when the proactive one was already sent
140
- - **Sidepanel fix** (`neural-interface/public/shared/ui-claude-panel.js`) — Added `&& !tab.askRenderedViaControl` guard to `handleControlRequest` to prevent rendering a second card even if a duplicate `control_request` reaches the client
141
- - **Standalone chat fix** (`neural-interface/public/claude-chat.js`) — Added full `askRenderedViaControl` flag lifecycle (declaration, set on render, guard in `handleControlRequest`, clear on response) — this page previously had no dedup logic at all
142
-
143
- ### Fixed — File Attachments Not Reaching Agent from Claude Panel "Send to AI"
144
- - **Send button disabled logic ignored `attachedFiles`** — Three separate locations in `ui-claude-panel.js` (tab switch at line 1983, window focus at line 2289, input handler at line 5117) computed `$send.disabled` by checking only `tab.attachedImages.length`, never `tab.attachedFiles.length`. When a file was attached from the file explorer with no text typed, the send button stayed disabled. Added `&& !tab.attachedFiles.length` to all three checks.
145
- - **Early return guard in `send()` blocked file-only sends** — The guard `if (!text && !tab.attachedImages.length) return` at line 4477 prevented sending when only files were attached (no text, no images). Added `&& !tab.attachedFiles.length` to the guard and the running-state abort check.
146
- - **Path chips persisted after send** — `buildPromptWithAttachments()` removed `.cp-file-chip` elements but "Send to AI" from the file explorer creates `.cp-path-chip` elements. Changed selector to `.cp-file-chip, .cp-path-chip` so both chip types are cleaned up after the file content is consumed into the prompt.
147
- - **No explicit framing for attached files** — File content was wrapped in bare `<file>` XML tags with no natural language context, while images got explicit "The user attached an image. Use the Read tool to view it:" framing. Added a header: `"The user attached a file (path). Its content is provided below."` matching the image attachment pattern.
148
- - **BTW interrupt flow discarded attached files** — `_btwPending` captured `images` but not `files`. After the abort-and-resend cycle, files were lost. Added `files` to the btw snapshot and `buildPromptWithAttachments()` processing on resend.
149
- - **No visual feedback for sent files in chat** — `appendUser()` displayed images in the message bubble but had no `files` parameter. Added file chip rendering (inline SVG + filename) so the user sees which files were included in their message.
150
-
151
- ### Changed — Recall Profile Presets Modernized (Settings > Memory)
152
- - **New SVG icons** — Replaced generic icons with more distinctive ones: Quick (arrow-right), Balanced (sun/radiate), Deep (concentric circles/target), Custom (3-slider equalizer)
153
- - **Mouse-tracking radial glow** — Ported the website's `integ-btile` hover pattern: `radial-gradient(180px circle at var(--mx) var(--my), ...)` following cursor position via JS `mousemove` handler setting CSS custom properties
154
- - **Icon-to-background hover effect** — Ported the website's `.giants-card` pattern: on hover, the small icon fades out (`opacity: 0; transform: scale(0.5)`) and a cloned oversized SVG (`.recall-bg-icon`, 110x110px) scales in as a ghostly background watermark (7% opacity, 0.5px blur) at the top-right corner
155
- - **Active state shows background icon** — Active/selected card permanently displays the background watermark instead of the small icon, matching the hover visual
156
- - **Card hover depth** — Added inset box-shadow (`inset 0 0 40px 6px rgba(0,0,0,0.4)`) and subtle top-edge highlight line via `::after` pseudo-element
157
- - **Active state gradients** — Replaced flat backgrounds with directional `linear-gradient(160deg, ...)` and per-profile accent-tinted mouse-tracking glow (blue/green/purple/amber)
158
-
159
- ### Fixed — Neural Interface Memory Leaks (11GB+ RAM in Edge)
160
- - **Unbounded DOM growth in Claude panel** — Messages, status lines, tool cards, and stream chunks were appended to `tab.messagesEl` forever with no cleanup. Added `pruneMessages()` function with `MAX_MSG_CHILDREN=600` and `PRUNE_BATCH=150` — removes oldest 150 nodes when threshold exceeded. Wired into all 5 append paths: `appendStatus()`, `appendError()`, `renderAssistant()`, stream `content_block_start`, and `loadSessionHistory()` in `ui-claude-panel.js`
161
- - **Unbounded message buffer during permission prompts** — `tab._msgBuffer` grew without limit while `_activePerm` was true, accumulating all incoming WebSocket messages. Capped at 500 entries in `ui-claude-panel.js`
162
- - **Event listener accumulation in Automation Studio** — Six `document.addEventListener` calls (mousemove, mouseup, 2x click, 2x keydown) in `initDrag()`, `wireIconPicker()`, `wireCategoryPicker()`, and `wirePanel()` were never removed when the panel closed. Each open/close cycle leaked more listeners onto `document`. Added `_docListeners[]` registry to store references and cleanup loop in `closePanel()` that calls `removeEventListener` for each in `ui-automation-studio.js`
163
-
164
- ### Changed — Window Header Modernization (Neural Interface)
165
- - **Consistent design language across 13+ window headers** — Updated `.settings-panel-header`, `.as-header`, `.as-detail-header`, `.as-picker-header`, `.as-wizard-header`, `.as-launch-inline-header`, `.as-unsaved-dialog-header`, `.ss-header`, `.ss-editor-header`, `.tw-header`, `.term-float-tab-header`, `.link-panel-header`, `.fe-editor-header`, `.awiz-header`, `.cat-change-modal-header`, `.ecm-header`, `.detail-header`, and `.sidebar-header` in `styles.css` with unified styling: gradient backgrounds (`linear-gradient(to bottom, rgba(255,255,255,0.025), transparent)`), softer borders (`rgba(255,255,255,0.04)` replacing `var(--b-subtle)`), lighter title weight (500 with `letter-spacing: 0.01em`), ghost-style action buttons (transparent default, subtle border on hover), red-tint close hover (`rgba(255,82,82,0.1)` background), and muted badge colors
166
- - **Terminal floating tabs refined** — Added gradient header background, tighter margins (6px vs 8px), and softer shadow to `.term-float-tab-header` and pinned variant
167
-
168
- ### Changed — Focus Mode Buttons & Active Badge Removed
169
- - **Focus mode buttons removed from all windows** — Deleted `.as-focus-btn`, `.ss-focus-btn`, and `.stg-focus-btn` CSS classes (including SVG, hover, and active states) from `styles.css`, along with responsive container query overrides at 680px, 560px, and 440px breakpoints. Removed HTML templates, click event listeners (`$('as-focus')`, `$('ss-focus')`), and `_focusMode` state variables from `ui-automation-studio.js`, `ui-skills.js`, and `ui-settings.js`. The feature was dead code — `_focusMode` only toggled a CSS class with no UI effect
170
- - **Active automation badge removed from Automation Studio** — Deleted `.as-active-badge` CSS (including hover, `.running-pulse` child, and responsive overrides at 560px/440px) from `styles.css`. Removed badge HTML template, `updateHeaderBadge()` function, and its 3 call sites (initial render, polling interval, stop-loop handler) from `ui-automation-studio.js`
171
-
172
- ### Changed — Unified Page Margins (Workspace Toolbar & Claude Panel)
173
- - **Dynamic top margin and increased right/bottom margins** — The workspace toolbar (`#topright-controls` in `styles.css`) and Claude panel (`.claude-panel` in `ui-claude-panel.js`) used a hardcoded `top: 68px` that drifted from the dynamically-measured navbar height. Changed `top` to `calc(var(--navbar-height, 48px) + 20px)` so the gap tracks the actual navbar. Increased `right` from `16px` to `20px` and `bottom` from `16px` to `20px` on the panel, and `right` from `calc(16px + ...)` to `calc(20px + ...)` on the toolbar — all three margins now consistently 20px
174
-
175
- ### Fixed — Context Gauge Showing Inflated Values Above Max
176
- - **Gauge corrupted by cumulative `result.usage`** — The Claude Code CLI's `result` event contains cumulative token usage (sum of all API calls in a single CLI process), but `handleTabEvent()` in `ui-claude-panel.js` overwrote `tab.usage` with these values. Since `cache_read_input_tokens` accumulates across every internal API call (hooks, tools, response), the gauge total could reach multiples of the context window. Removed the `tab.usage` overwrite from the `result` handler — gauge now only uses correct per-turn values from `assistant`/`message_start` events
177
- - **`contextWindow` update now triggers gauge re-render** — Previously `tab.contextWindow` was set from `result.modelUsage` but `renderGauge()` was not called afterward, so the gauge could display against a stale denominator until the next turn
178
-
179
- ### Fixed — Auto-Compact Detection Never Triggering
180
- - **Detection used cumulative values that only increase** — Server-side auto-compact detection in `server.js` tracked `prevTurnTokens` from `result.usage` (cumulative across all API calls). Since cumulative values never decrease, the >50% drop check could never fire. Moved detection to `assistant` events where `message.usage` contains per-turn context size, enabling correct detection of compaction drops
181
-
182
- ### Fixed — Session History Endpoint Using Wrong Context Window
183
- - **`CLI_CONTEXT_WINDOWS` hardcoded 1M instead of 200K** — The `/api/claude-code/sessions/:id/messages` endpoint inferred context windows as 1M for Opus/Sonnet 4.6, but the CLI actually reports 200K via `modelUsage.contextWindow`. Fixed to 200K to match reality
184
- - **Removed `result.usage` override in JSONL parser** — The session history endpoint preferred `result.usage` (cumulative) over `assistant.message.usage` (per-turn) when both were present, which would produce inflated token counts for restored sessions
185
-
186
- ### Changed — Batched AskUserQuestion Submission UX
187
- - **Options toggle freely without immediate send** — Rewrote `renderAskUserQuestion()` and `buildAskFromToolUse()` in `ui-claude-panel.js` to use a shared `pendingAnswers` dict instead of firing `sendAskAnswer()` on each individual option click. Single-select questions deselect siblings on click; `multiSelect` questions toggle selections. All options remain enabled until the batch is submitted. Same pattern applied to `renderAskUserQuestion()` in `claude-chat.js` (standalone chat page)
188
- - **Submit button with progress counter** — Added `div.ask-submit-bar` containing `button.ask-submit` after all question cards. Button shows `Submit (0/N)` initially, updates counter as each question is answered (`Submit (2/3)`), and enables only when all questions have selections. On click: disables all options/inputs and sends the full answers dict via `sendAskAnswer()` / `sendControlResponse()`
189
- - **Inline text input for free-text questions** — Questions without options now render an `input.ask-text-input` inside the card instead of relying on the main chat input box. Text is stored in `pendingAnswers` on each `input` event, contributing to the submit counter
190
- - **CSS for submit bar and text inputs** — Added `.ask-submit-bar`, `.ask-submit`, `.ask-text-input` styles in both `ui-claude-panel.js` embedded styles and `claude-chat.css`, matching the existing design system (JetBrains Mono, blue accent colors, disabled opacity)
191
-
192
- ### Fixed — Whiteboard List Items Lost on Reload/Reboot
193
- - **List item content not persisting** — List elements saved with empty `items: ['']` because contenteditable `<li>` DOM content was never flushed back to `el.items` in the `_elements` array. Unlike text elements (which have a `blur` handler syncing `el.content`), list items only synced in `exitListEditMode()`, which was missing from most exit paths (click canvas, click element, switch tools). Added `flushListEdits()` and `flushTextEdits()` helpers that sync DOM → model without exiting edit mode. `persistDebounced()` now calls both flush helpers before serializing, ensuring content is always captured. `getWhiteboardSnapshot()` refactored to use the same helpers. Added `exitListEditMode()` alongside every `exitEditMode()` call in `onMouseDown()` across 8 code paths in `ui-whiteboard.js`
194
-
195
- ### Changed — Browser Viewer Resize Decoupled from Actual Browser Viewport
196
- - **Removed `ResizeObserver` viewport sync in `openBrowserSession` and `reconnectBrowserSession`** — Previously, resizing the floating browser window sent `{ type: 'resize', width, height }` to the server after 500ms settle, which called `page.setViewportSize()` on the Playwright browser — physically changing the external browser's viewport. Removed `sendBrowserResize()`, `sendReconnResize()`, their `ResizeObserver` instances, `visibilitychange` handlers, and tracking variables from `ui-terminal.js`. The browser now stays at its configured 1280x800 viewport. Click coordinate mapping via `canvasCoords()` already uses `scaleX = canvas.width / rect.width`, so interaction accuracy is preserved
197
- - **CSS canvas fill** — Changed `.browser-canvas` from `max-width: 100%; max-height: 100%` to `width: 100%; height: 100%; object-fit: contain` in `styles.css` so the canvas always fills the container and scales proportionally
198
-
199
- ### Changed — Browser Screencast 30fps Frame Rate Cap
200
- - **Frame throttle in `createFrameRenderer()`** — Added `performance.now()` tracking with `FRAME_INTERVAL = 1000/30` (33.3ms) threshold in `utils.js`. Frames arriving sooner than the interval are dropped before decoding. Applied globally to all browser screencast viewers (floating windows, side panel embed, reconnected sessions)
201
-
202
- ### Changed — Browser Screencast Pauses on Minimize
203
- - **`minimizeTab()` sends `pause-screencast`** — When a browser floating window is minimized to a pill, sends `{ type: 'pause-screencast' }` via WebSocket in `ui-terminal.js`. Server handler in `handleBrowserWebSocket()` (`server.js`) calls `stopScreencast(session)` which sends `Page.stopScreencast` to CDP, stopping frame encoding and delivery
204
- - **`restoreTab()` sends `resume-screencast`** — On restore, sends `{ type: 'resume-screencast' }` which calls `startScreencast(session)`. Both handlers are idempotent (guarded by `screencastActive` flag)
205
-
206
- ### Added — Focus-Based Browser Screencast Throttle
207
- - **Non-focused browser windows throttle to ~2fps** — `_applyBrowserFocusThrottle()` in `ui-terminal.js` sends `{ type: 'throttle-screencast' }` to non-focused browser sessions when tab focus changes via `bringTabToFront()`. Server-side handler in `handleBrowserWebSocket()` (`server.js`) re-sends `Page.startScreencast` with `everyNthFrame: 15` and reduced quality (capped at 50), replacing the active screencast config atomically without stop/start gap. Focused window receives `resume-screencast` to restore full framerate
208
- - **`resume-screencast` handles both throttled and paused states** — If `session.screencastActive` is true (throttled), sends `Page.startScreencast` directly with full-rate config to un-throttle. If false (fully paused), calls `startScreencast(session)` to restart from scratch
209
-
210
- ### Added — Browser Screencast Idle Timeout (5 Minutes)
211
- - **Auto-pause after inactivity** — `_resetBrowserIdleTimer()` and `_resumeFromIdleIfNeeded()` in `ui-terminal.js` manage a per-session idle timer (`BROWSER_IDLE_TIMEOUT_MS = 5 * 60 * 1000`). On timeout, sends `{ type: 'pause-screencast' }` to fully stop streaming and sets `session._screencastIdlePaused = true`
212
- - **Canvas interaction resets timer** — `_onCanvasInteraction()` wrapper calls `_resumeFromIdleIfNeeded()` and `_resetBrowserIdleTimer()` at the start of every canvas event handler (click, dblclick, wheel, keydown, keyup) in both `openBrowserSession` and `reconnectBrowserSession`
213
- - **Timer cleanup on session close** — `clearTimeout(session._idleTimer)` added to `closeSession()` teardown path
214
-
215
- ### Added — Shift+Tab Plan Mode Shortcut in Claude Sidepanel
216
- - **Keyboard shortcut** — Pressing `Shift+Tab` while the `#cp-input` textarea is focused now toggles plan mode on/off. Updates the `#cp-plan-toggle` button active state and displays a status message. Added in the `keydown` listener inside `wireEvents()` in `ui-claude-panel.js`
217
-
218
- ### Fixed — User Learning Enforcement Not Triggering After Decluttering
219
- - **Stop-hook CHECK 2.5 removed during decluttering broke enforcement** — The prompt-submit nudge fired correctly (debug log confirmed `FIRE` entries at message thresholds 3/6/9 across multiple sessions) but Claude ignored every nudge — `userLearningObserved` stayed `false` in all sessions. Root cause: the decluttering replaced CHECK 2.5 with a comment at `stop.mjs:482` stating "User learning handled by prompt-submit nudges — not stop-hook blocks." Original architecture decision had documented that nudges alone were insufficient.
220
- - **Restored CHECK 2.5 as bundled obligation** — User learning now piggybacks on the existing obligation system in `stop.mjs`. When both task memory (CHECK 2) and user learning are pending, they're combined into a single block (zero extra chat noise). When only user learning is pending, fires as a lightweight standalone block with 1-retry max (not 3). Guarded by `!waitingForUser` and `!userLearningObserved` to prevent re-triggering.
221
- - **Added `isWaitingForUser(msg)` guard function** — Broader than `isHumanBlocker()`, detects when Claude is pausing for ANY user action: interactive flow phrases (`attach`, `upload`, `provide`, `select continue`, `when ready`, `let me know`) plus all existing login/CAPTCHA/2FA blocker phrases. Prevents soft obligations from interrupting Leonardo questionnaires and similar interactive flows.
222
- - **Stop block verbose text includes full guardrails** — Category MUST be `communication-style` NOT `conversations`, NOT a session summary, GOOD/BAD examples, AVOID DUPLICATES warning, reflect-or-remember instructions.
223
-
224
- ### Changed — User Learning Test Suite Updated for Bundled Enforcement
225
- - **Tests 3c/4 updated for 1-retry max** — User learning enforcement now gives up after 1 retry instead of 3 (`MAX_RETRIES`), minimizing chat panel clutter. Test 3c verifies stop allows after single retry; Test 4 verifies soft cleanup after 1 block.
226
- - **Test 7 simplified — removed `userLearningBlockActive` concept** — The `blockActive` flag was expected by tests but never implemented in `post-remember.mjs`. Removed the assertion gap: any `reflect` call when `userLearningPending` is true now clears the pending flag (matching actual `post-remember.mjs` behavior).
227
- - **Test 12 fixed for `EDIT_THRESHOLD=1`** — Pre-existing issue: test wrote `editCount: 1` expecting soft cleanup, but `EDIT_THRESHOLD` had been lowered to 1, triggering a task-memory block instead. Changed to `editCount: 0` so soft cleanup path is actually tested.
228
- - **Test 14 rewritten for bundled obligations** — Previously expected separate sequential blocks (task memory then user learning). Now verifies both obligations appear in a single combined block reason with `Task memory` and `User learning` keywords.
229
- - **All 72 tests pass** — `node hooks/claude-code/test-user-learning.mjs` exits clean.
230
-
231
- ### Changed — Claude Panel Session Button + Rename Icon Connected as Button Group
232
- - **Joined session selector and rename icon** — `cp-session-btn` border-radius changed from `8px` to `8px 0 0 8px`, `cp-header-rename-btn` border-radius changed to `0 8px 8px 0` with `align-self: stretch` and a `1px` left border divider. The two elements now render as a single connected button group instead of separate floating controls in `ui-claude-panel.js`
233
-
234
- ### Fixed — Plan File Write Permission Loop in Onboarding
235
- - **`ensureSynaBunPermissions()` now injects `Write(~/.claude/plans/*)` permission** — Writing custom-named plan files to `~/.claude/plans/` via the Write tool triggered repeated "sensitive file" permission prompts. Grants didn't survive context compaction, creating an infinite permission loop. Root cause: `~/.claude/plans/` is outside the session's working directories and `Write` had no pre-authorized permissions in `settings.json`. Auto-generated plan files (via `ExitPlanMode`) were unaffected because they bypass the Write tool entirely. `ensureSynaBunPermissions()` in `neural-interface/server.js` now dynamically resolves `$HOME` and adds `Write(${home}/.claude/plans/*)` to `permissions.allow` — idempotent with `includes()` check before adding
236
-
237
- ### Fixed — Plan Mode Stuck After ExitPlanMode Auto-Approve Race
238
- - **`tab.planMode` not cleared on ExitPlanMode error** — In `updateToolResult()` in `ui-claude-panel.js`, `tab.planMode` was only set to `false` when ExitPlanMode succeeded (`!ev.is_error`). However, Claude Code in `--print` mode often auto-approves plans before the ExitPlanMode tool call completes, returning a `tool_use_error`. This left `tab.planMode = true`, causing all subsequent messages to get the `[PLAN MODE ...]` prefix (line ~4727) and every `done` event to render spurious "PLAN COMPLETE" post-plan action cards (line ~2984). Removed the `!ev.is_error` guard — `tab.planMode` is now always cleared when ExitPlanMode fires. Added `saveTabs()` call to persist immediately, preventing stale `planMode: true` from surviving page refresh. `renderPostPlanActions()` remains gated on `!ev.is_error` so the "PLAN COMPLETE" card only shows on genuine success
239
-
240
- ### Fixed — Attachment Overflow Breaking Sidepanel Layout
241
- - **Send/mic buttons pushed off-screen with many attachments** — When multiple files or images were attached in the Claude sidepanel, `.cp-image-preview` grew unbounded, pushing `.cp-input-inner` (containing send/mic buttons) below the visible panel area. Root cause: `.cp-input-wrap` lacked `min-width: 0`, so the default flexbox `min-width: auto` prevented the flex item from shrinking below content size, bypassing `overflow-x: auto` on the child. Added `min-width: 0; overflow: hidden` to `.cp-input-wrap` and explicit `flex-wrap: nowrap` with thin scrollbar styling (`scrollbar-width: thin`, webkit overrides at 4px height) to `.cp-image-preview` in `ui-claude-panel.js`
242
-
243
- ### Changed — Leonardo Skill Free-Text Input & Prompt Display
244
- - **Phase 1 (Vision) switched from `AskUserQuestion` to natural chat message** — Both `video-prompter.md` and `image-prompter.md` used `AskUserQuestion` for the initial concept description, which forced Claude to invent radio button presets instead of letting the user type freely. Replaced with plain text output so users describe their vision in their own words
245
- - **Creative Brief (Phase 5.5/6.5) switched from `AskUserQuestion` to natural chat message** — Same issue as Phase 1. The detailed scene description phase now outputs a config summary as text and waits for the user's typed response instead of forcing preset options
246
- - **Prompt Review now displays the engineered prompt before asking for approval** — The "Build the prompt" section said "show it to the user" but had no explicit display instruction, causing Claude to ask "How does this prompt look?" without showing the actual prompt. Added mandatory formatted code block display before the `AskUserQuestion` review step. Also fixed stale reference from "Phase 1" to `$CREATIVE_BRIEF` in both files
247
-
248
- ## 2026-03-26
249
-
250
- ### Fixed — Floating Browser Close Button Unresponsive After Session Reconnection
251
- - **Close handler used object identity instead of ID lookup** — The close button handler in `detachTab()` (`ui-terminal.js`) used `_sessions.indexOf(session)` which checks object identity. When `_pushSession()` replaces a session object after reconnection (same ID, new object), the closure-captured `session` reference goes stale and `indexOf` returns `-1`, silently preventing close. Changed to `_sessions.findIndex(s => s.id === session.id)` for ID-based lookup.
252
- - Added fallback cleanup for orphaned floating windows — if the session is already gone from `_sessions`, the handler now removes the DOM element, cleans up `_detachedTabs`, and updates the tab bar directly
253
- - **Pin button had same stale closure bug** — The pin handler directly mutated the closure-captured `session` object (`session.pinned = !session.pinned`). After reconnection, mutations went to the stale object while `_sessions` held the new one. Now re-finds the live session via `_sessions.find(s => s.id === session.id)` before mutating — matching the pattern already used by the rename handler.
254
-
255
- ### Fixed — Loop Detection Hijacking Non-Loop Sessions
256
- - **SessionStart hook terminal isolation** — The loop detection logic in `session-start.mjs:209` had a guard `if (terminalSessionEnv && ...)` that short-circuited when `SYNABUN_TERMINAL_SESSION` was empty (all regular sessions), causing every active loop file to match every non-loop session. This suppressed greetings and recall boot sequences in normal sessions whenever an autonomous loop was running in another terminal. Removed the `terminalSessionEnv &&` guard so loops with a `terminalSessionId` only match sessions that share that exact terminal ID.
257
-
258
- ### Changed — Recall Token Estimation Accuracy in Settings UI
259
- - **`/api/recall-impact` endpoint** — Enhanced to return `avg_tags_len` and `avg_files_len` per importance group from the `memories` table, plus `sessionStats` (count, `avg_summary_len`, `avg_details_len`) from the `session_chunks` table, giving the UI real data for accurate token estimation.
260
- - **`updateImpactIndicator()` formula** — Rewrote the token estimation in `ui-settings.js` with per-component calculation: char-to-token ratio changed from `1:4` to `1:3.7`, metadata overhead now uses actual DB averages (tags, files) instead of a flat `+30`, session chunks are estimated from real `session_chunks` stats with a `0.6x` multiplier for `auto` mode, and a `15` token header is included.
261
-
262
- ### Fixed — Changelog "Edit first" Button Hanging in Claude Skin Panel
263
- - **Dual render path mismatch** — `renderAskUserQuestion` (the `control_request` rendering path) had a generic click handler that immediately sent `"Edit first"` as a bare text answer via `sendAskAnswer()`, instead of opening the file editor. The changelog edit detection logic (`isChangelogAsk` pattern matching, `extractPlanText()`, `/api/create-plan` temp file creation, `open-changelog-editor` event emission) only existed in `buildAskFromToolUse` (the `tool_use` rendering path). Since the server's proactive `control_request` always arrives before the `assistant` event, `renderAskUserQuestion` rendered the visible ask card while `buildAskFromToolUse` returned a hidden placeholder — so the user always got the version without edit support. Replicated the full changelog edit handler into `renderAskUserQuestion`'s click handler in `ui-claude-panel.js`.
264
-
265
- ### Fixed — Edit Cancel Leaves Options Disabled in Plan and Changelog Flows
266
- - **Closing editor without saving left buttons permanently disabled** — When the user clicked "Edit plan" or "Edit first" (changelog), the post-plan card or AskUserQuestion options were disabled while the editor opened. If the user closed the editor without saving, no event was emitted back to the Claude panel, leaving buttons stuck in their disabled state until page refresh. Added `plan-edit-cancelled` and `changelog-edit-cancelled` event emissions from `closeFileEditor()` in `ui-file-explorer.js` (before clearing edit mode flags), and corresponding listeners in `ui-claude-panel.js` that restore post-plan card interactivity or re-enable `.ask-option` buttons respectively. Safe because `saveFileEditor()` clears the flags before calling `closeFileEditor()`, so cancel events only fire on close-without-save.
267
-
268
- ## 2026-03-25
269
-
270
- ### Changed — Toolbar Modernization (Apple-style Unified Glass Bars)
271
- - **Top-right navbar converted to unified frosted glass pill** — Replaced 4 separate `.bar-group` containers (each with own `background`, `border`, `border-radius: 10px`) with a single continuous pill bar on `.bar-right`: `background: rgba(18,18,22,0.65)`, `backdrop-filter: blur(24px) saturate(1.3)`, `border-radius: 14px`, inner highlight via `inset 0 0.5px 0 rgba(255,255,255,0.06)`. Groups inside are now transparent flex containers separated by `<span class="bar-divider">` elements (1px wide, 14px tall, `rgba(255,255,255,0.08)`).
272
- - **Bottom-right toolbar converted to unified frosted dock bar** — `#topright-inner` now serves as the unified glass container (matching top bar treatment). Individual `.topright-icon-btn` buttons stripped of their per-button `background`, `border`, `backdrop-filter: blur(20px)` — now transparent icons inside the shared pill. Added `<span class="tr-divider">` elements between logical groups (workspace tools | panels | social | workspace selector). Claude panel and collapse buttons kept as standalone glass elements with matching frosted treatment.
273
- - **Hover effects refined across both toolbars** — Replaced aggressive `scale(1.22)` on `.bar-icon:hover` with subtle `scale(1.08)` + `radial-gradient(circle, rgba(255,255,255,0.1))` glow. Added matching hover to `.topright-icon-btn` (previously only shifted background color). Both now use spring `cubic-bezier(0.34, 1.56, 0.64, 1)` for scale transforms. `:active` press state: `scale(0.94)` with 0.06s snap. SVG hover glow: `drop-shadow(0 0 4px rgba(255,255,255,0.2))`.
274
- - **Active state indicator unified** — Both toolbars now show a 6px glowing blue dot under active icons: `width: 6px`, `height: 2.5px`, `border-radius: 2px`, `box-shadow: 0 0 6px var(--accent-blue)`. Top bar's previous 8px flat underline replaced.
275
- - **SVG icons refined** — All icons reduced from `stroke-width: 1.8`/`2` to `1.7`. Removed decorative opacity fill layers from session monitor, gallery, tutorial, viz toggle, and fullscreen icons. Grid icon redesigned from crosshatch lines to 9-dot grid (3x3 `<circle>` elements). Tile icon corners rounded (`rx="2"`). Keybinds simplified from 8 dot-lines to 3 filled dots + spacebar line. Trash icon given inner vertical delete lines.
276
- - **Workspace indicator adapted for unified bar** — Removed individual `backdrop-filter: blur(20px)` and `background: rgba(20,20,24,0.7)` from `#ws-indicator` — now uses subtle `rgba(255,255,255,0.04)` background inside the shared pill.
277
-
278
- ### Fixed — Dropdown Menus Hidden Behind Minimized Terminal Tray Pills
279
- - **Stacking context trap from `backdrop-filter`** — The workspace, bookmarks, and invite dropdowns rendered behind minimized terminal session pills (e.g. browser tabs). Root cause: `#topright-inner`'s `backdrop-filter: blur(24px)` creates a CSS stacking context, trapping child dropdown `z-index` values. The `#term-minimized-tray` sits outside `#topright-inner` at the `#topright-controls` level, so it painted above regardless of dropdown z-index. Fixed by: (1) adding `#topright-controls:has(#ws-indicator.open) #term-minimized-tray { display: none }` to hide the tray when workspace dropdown is open, (2) bumping all three dropdowns (`#ws-dropdown`, `#bookmarks-dropdown`, `#invite-dropdown`) to `z-index: 100001` and `top: calc(100% + 12px)` for better spacing.
280
-
281
- ### Changed — Recall Settings Redesign (Settings > Recall Tab)
282
- - **Recall Profiles replace Token Budget** — Replaced the basic "Recall Token Budget" system (3 presets controlling only character truncation + a slider) with a comprehensive 4-profile system: Quick (3 results, importance 5+, tight matching), Balanced (5 results, standard), Deep (10 results, sessions always included, loose matching), and Custom (opens all individual controls). Profile selection auto-configures all parameters; manually adjusting any control auto-switches to Custom.
283
- - **Fine-Tune Controls section** — Added collapsible `Fine-Tune Controls` with 6 individual parameters: Results per recall (slider 1-20), Minimum importance (slider 0-10 with semantic labels), Similarity threshold (slider 0.10-0.80), Content length (slider 100-2100+), Session context (segmented toggle: Never/Auto/Always), and Recency boost (toggle switch). Auto-opens when Custom profile is selected.
284
- - **Impact Indicator** — Added 3-stat bar showing estimated tokens per recall, memories reachable at current importance threshold, and session context status. Fetches data from new `GET /api/recall-impact` endpoint that returns per-importance memory counts and average content lengths.
285
- - **Backend: Configurable recall defaults** — Replaced `getRecallMaxChars()` in `recall.ts` with `getRecallDefaults()` that reads a full `recallDefaults` object from `display-settings.json` (limit, minImportance, minScore, maxChars, includeSessions, recencyBoost). `handleRecall()` now uses these as defaults when the AI calls `recall` without explicit parameters. Backward-compatible with legacy `recallMaxChars` field.
286
- - **Display settings schema expanded** — `display-settings.json` upgraded from `{ recallMaxChars: 0 }` to `{ recallDefaults: { limit, minImportance, minScore, maxChars, includeSessions, recencyBoost }, profile: "quick|balanced|deep|custom" }`.
287
- - **CSS overhaul** — Replaced all old recall preset/preview/tips styles (`.recall-preview-box`, `.recall-tips`, `.recall-tip-tag`) with purpose-built styles: `.recall-profile-card` with per-profile color theming, `.recall-impact` stat bar, `.recall-segmented` toggle buttons, `.recall-toggle` switch, and `.recall-control-*` form elements.
288
-
289
- ### Added — Edit Plan in Code Editor
290
- - **Direct plan editing via SynaBun code editor** — Clicking "Edit plan" on the post-plan action card now opens the plan MD file directly in the Neural Interface file editor instead of re-entering plan mode for chat-based edits. Uses cross-module event bus (`emit`/`on` from `state.js`) with two new events: `'open-plan-editor'` and `'plan-saved'`.
291
- - `buildTool()` in `ui-claude-panel.js` now accepts a `tab` parameter and stores `tab.planFilePath` when Claude writes a plan file
292
- - `ui-file-explorer.js` listens for `'open-plan-editor'`, opens the editor with a green accent banner ("Editing plan — save to send to Claude"), and tracks plan edit state via `_planEditMode`/`_planEditFilePath`
293
- - On save, the editor emits `'plan-saved'` with the full updated content, auto-closes, and the Claude panel receives the event, clears the post-plan card, exits plan mode, and auto-sends the updated plan to Claude for immediate pickup
294
- - Falls back to a status message if no `tab.planFilePath` exists (e.g., plan created in a prior session)
295
-
296
- ### Fixed — Terminal Context Menu Z-Index Layering
297
- - **Context menu rendered behind terminal panel** — The right-click context menu (`#term-context-menu`) had a static `z-index: 10100`, but `_floatZCounter` in `ui-terminal.js` starts at `10000` and increments on every terminal mousedown/focus event. After ~101 interactions the terminal panel's inline z-index surpassed the menu's. Bumped `#term-context-menu` from `z-index: 10100` to `100003` in `styles.css` — safely above all terminal-layer elements including the float color picker (`100002`) and profile flyout (`100001`).
298
-
299
- ### Changed — Terminal Context Menu Viewport Clamping
300
- - **Context menu no longer opens outside screen bounds** — Added viewport boundary clamping to `initContextMenu()` in `ui-terminal.js`. The menu is first made visible at `(0, 0)` to measure its `getBoundingClientRect()`, then repositioned at the cursor with edge guards: flips above the cursor when too close to the bottom, shifts left when too close to the right edge, and clamps negative coordinates to a `4px` margin.
301
-
302
- ## 2026-03-24
303
-
304
- ### Fixed — Terminal Loop Time Cap & Iteration Cap Silently Clamped Too Low
305
- - **`maxMinutes` hard-capped at 60 despite UI allowing 120+** — The `/api/loop/launch` endpoint in `server.js` clamped `maxMinutes` with `Math.min(..., 60)`, silently truncating any value above 60 minutes. The stop hook reads `maxMinutes` from the loop state file to enforce the time cap, so loops died after ~50-55 minutes regardless of template or UI settings. The March 12 fix ("MAX_MINUTES 60→480") only updated the agent endpoint (`/api/agents/launch`), not the terminal loop endpoint. Raised cap from 60 to 480 in both `/api/loop/launch` and `launchScheduledLoop()`.
306
- - **`totalIterations` capped at 50** — Same endpoint clamped iterations with `Math.min(..., 50)`. Raised to 200 to match the agent endpoint.
307
- - **UI sliders didn't match server caps** — Template editor time cap slider had `max="120"`, wizard had `max="60"`, iterations slider had `max="50"`. Updated all three to 480/480/200 respectively in `ui-automation-studio.js`.
308
-
309
- ### Fixed — Code Editor Line Highlight Misaligned with Text and Gutter
310
- - **Highlight band drifted from text lines on scroll** — The editor's `line-height: 1.65` at `font-size: 12px` produced `19.8px` — a non-integer that caused cumulative sub-pixel rounding drift between the highlight band, gutter line numbers, and textarea text content. After ~15 lines the highlight visibly straddled two lines instead of covering one. Changed all editor line-height values from `1.65` to explicit `20px` across 5 CSS rules (`.fe-editor-gutter`, `.fe-editor-gutter div`, `.fe-editor-highlight`, `.fe-editor-textarea`, `.fe-editor-line-highlight`) and 4 JS constants (`SH_LINE_H`, `lineH`, two `lineHeight` locals) in `ui-file-explorer.js`.
311
-
312
- ### Fixed — Sidepanel Attach Button Rejected Image Files
313
- - **Attach button only accepted text/code files** — The paperclip attach button's `fileInput` change handler in `ui-claude-panel.js` ran every selected file through `_isTextFile()`, which checks against `_TEXT_EXTENSIONS`. Image files (`.png`, `.jpg`, `.gif`, etc.) failed this check and were skipped with "only text/code files supported". Images could only be attached via paste (Cmd+V) or drag-and-drop, but not the attach button itself. Added an image detection branch (`file.type.startsWith('image/')`) before the text file check that routes images through the same `FileReader → base64 → attachedImages` pipeline used by paste and drop handlers. Also added an `accept` attribute to the file input (`image/*,text/*,.js,.ts,...`) so the OS file picker shows images alongside code files.
314
-
315
- ### Changed — Offline Page Restyled to Transparent Layout
316
- - **Removed card container background and border** — The "Server is sleeping" offline page (`offline.html`) previously rendered all content inside a dark card with `background: rgba(28,28,30,0.85)` and a subtle border. Removed both — `.card` is now fully transparent with no border, so the sleeping mascot, floating Z's, heading text, and command block float directly against the `#030305` body background.
317
- - **Command block made transparent** — `.cmd-block` background and border removed, padding adjusted from `14px 16px` to `14px 0`, added `justify-content: center` so the command text and copy button sit centered without a visible container.
318
- - **Copy button made subtler** — `.copy-btn` background changed from `rgba(255,255,255,0.06)` to transparent, border and text color dimmed to `0.08`/`0.35` opacity respectively, hover states softened to match the containerless aesthetic.
319
-
320
- ### Added — Notifications Settings Tab
321
- - **Dedicated Notifications tab in Settings** — Moved the single notification toggle out of the Terminal tab into a proper "Notifications" tab under the System group in the settings sidebar. Bell icon, placed between Terminal and Browser.
322
- - **Master toggle** — Enable/disable all notifications with a single switch. Sub-sections dim and become non-interactive when disabled.
323
- - **System Permission status** — Shows current `Notification.permission` state with color-coded dot (green/red/grey), "Request Permission" button when `default`, and guidance when `denied`.
324
- - **Sound controls** — Toggle for sound on/off, volume slider (0–100%) with live percentage label, and "Test Sound" button that plays the action-required double beep at the configured volume.
325
- - **Banner controls** — Toggle for OS notification banners (shown only when app is not focused).
326
- - **Trigger filter** — "Action only" toggle to suppress "Task Complete" notifications and only fire on "Action Required" (permission prompts).
327
- - **Test Notification button** — Fires a real service worker notification to verify the full pipeline works end-to-end.
328
- - **New storage keys** — `NOTIF_SOUND`, `NOTIF_SOUND_VOLUME`, `NOTIF_BANNER`, `NOTIF_ACTION_ONLY` in `constants.js`
329
- - **Notification engine updated** — `_notifyStatusChange()` in `ui-terminal.js` now reads all granular settings: sound toggle, volume, banner toggle, and action-only filter.
330
-
331
- ### Fixed — Notifications Not Working in Safari PWA
332
- - **Service worker notification routing** — Safari PWAs ignore the basic `new Notification()` API. Replaced direct `Notification` constructor in `ui-terminal.js` with `serviceWorker.postMessage()` → `registration.showNotification()` flow. Added `SHOW_NOTIFICATION` message listener and `notificationclick` handler to `sw.js`. Bumped service worker cache version from `v6` to `v7` to force update.
333
-
334
- ### Changed — Floating Window Border Visibility
335
- - **Thin visible border on all floating windows** — The `.glass` base class used `--glass-border-opacity: 0.06` (6% white), making window edges nearly invisible against the background. Added `border: 1px solid rgba(255,255,255,0.12)` to all 8 floating window types (`.settings-panel`, `.skills-studio-panel`, `.automation-studio-panel`, `.session-monitor-panel`, `.command-runner-panel`, `.image-gallery-panel`, `.detail-card`, `.tw`). Also added an override rule so borders persist when `body.explorer-open` is active (which normally sets `border-color: transparent` on all `.glass` elements).
336
-
337
- ## 2026-03-23
338
-
339
- ### Added — Multi-Browser Session Isolation for Concurrent Automations
340
- - **Dedicated browser session per automation** — Rewrote the loop launch browser acquisition in `server.js` `/api/loop/launch` with a 3-strategy approach: (1) accept a pre-created `browserSessionId` from the UI request body, (2) wait for only NEW sessions created after launch (tracks `preExistingIds` Set to avoid stealing other automations' sessions), (3) fall back to creating a dedicated session server-side via `createBrowserSession()`. Previously, loop launch grabbed `existingIds[0]` — the first available session regardless of ownership — causing concurrent automations to fight over the same browser.
341
- - **Environment-based session pinning for loops** — Extended `createTerminalSession()` in `server.js` to accept `opts.extraEnv`, merged into the PTY spawn env. Loop launch passes `{ SYNABUN_BROWSER_SESSION: browserSessionId }` so the MCP's `resolveSession()` in `neural-interface.ts` auto-resolves to the correct session. Chain: PTY → shell → Claude Code → MCP server (inherits parent env). Agents already had this via `buildAgentMcpConfig()` + `--mcp-config`; loops did not.
342
- - **UI always creates new sessions** — Rewrote `confirmLaunch()` in `ui-automation-studio.js` to always create a new browser session per launch, removing the `hasBrowser` check that skipped creation when any session existed. The new `dedicatedBrowserSessionId` is captured from `createBrowserSession()` (side panel) or `sync:browser:created` event (floating), then passed to `/api/loop/launch` as `browserSessionId` in the request body.
343
- - **Prompt-level session ID injection** — Updated `buildBrowserNote()` in `prompt-submit.mjs` to include `state.browserSessionId` in the browser enforcement block, instructing Claude to pass `sessionId` to all browser tool calls. Acts as a fallback if environment propagation doesn't reach the MCP process.
344
- - **Scheduled loop support** — Updated `launchScheduledLoop()` in `server.js` to create dedicated browser sessions for `usesBrowser` schedules, with env pinning via `createTerminalSession()`'s new `extraEnv` option.
345
- - **Browser cleanup on loop stop** — `POST /api/loop/stop` now calls `destroyBrowserSession()` for each stopped loop's `browserSessionId`, preventing orphaned browser processes.
346
-
347
- ### Added — Floating Move Handle for Whiteboard Text & List Elements
348
- - **Move handle on selected text/list elements** — New floating move icon (4-directional arrow SVG) appears on the left side of text and list elements when selected, mirroring the rotate handle on the right. Implemented as `_moveEl` in `ui-whiteboard.js` alongside existing `_rotateEl`, created in `showContextMenu()` only for `el.type === 'text' || 'list'`. The handle initiates a standard `type: 'move'` drag on mousedown, calls `exitEditMode()` and `exitListEditMode()` before starting to save content, and is cleaned up in `hideContextMenu()`. Added to `onMouseDown()` skip list (`.wb-move-float`) to prevent canvas interference.
349
- - **Accurate positioning for auto-sized elements** — Enhanced `positionContextMenu()` to read actual DOM dimensions (`offsetWidth`/`offsetHeight`) for text/list elements that auto-size (stored `width=0`), ensuring the move handle, rotate handle, and context menu are positioned correctly. Added `leftX` variable to the bounds calculation.
350
- - **CSS styling** — `.wb-move-float` in `styles.css` matches `.wb-rotate-float` styling: 32px glass circle, backdrop blur, hover scale animation, grab/grabbing cursors.
351
-
352
- ### Changed — Automation Studio Launch Flow (Inline Panel)
353
- - **Replaced overlay launch modal with inline launch panel** — The launch configuration (Mode/CLI/Model selection) previously spawned a full-screen backdrop modal (`showLaunchDialog()`) that covered the entire workspace. Now renders directly inside the detail view's `.as-detail-content` area via `showLaunchInline()`, keeping the user in context. Back button or Escape restores the editor. For non-detail contexts (wizard launch), a standalone contained panel renders in the main area via `.as-launch-standalone`.
354
- - Removed `showLaunchDialog()`, `closeLaunchDialog()`, `wireLaunchDialog()` — replaced by `showLaunchInline()`, `closeLaunchInline()`, `wireLaunchInline()`
355
- - Action names changed from `launch-dialog-close/confirm` to `launch-inline-close/confirm`
356
- - New CSS: `.as-launch-inline`, `.as-launch-inline-header/body/footer`, `.as-launch-standalone` with slide-up entrance animation
357
- - Removed overlay CSS: `.as-launch-dialog`, `.as-launch-dialog-inner`, `.as-launch-dialog-header/body/footer`
358
- - Updated responsive breakpoints from dialog classes to inline panel classes
359
- - Fixed wizard launch path to not override `_view` after showing inline panel
360
-
361
- ### Fixed — Automation Studio Panel Stays Open After Launching Automation
362
- - **Panel not dismissed on launch** — The Automation Studio window remained open after successfully launching an automation (both agent and loop modes), leaving a stale overlay on screen. Added `closePanel()` calls in `confirmLaunch()` in `ui-automation-studio.js` after both successful launch paths: agent mode (after "Agent launched" toast) and loop mode (after "Loop started" toast). The agent path also had unnecessary post-launch view switching (`_view = 'running'`, `renderView()`, `refreshAgents()`) that was removed since the panel now closes entirely.
363
-
364
- ### Changed — Container Spacing Alignment for Side Panel & Workspace Toolbar
365
- - **Top gap now matches right margin** — The Claude panel (`.claude-panel` in `ui-claude-panel.js`) and workspace toolbar (`#topright-controls` in `styles.css`) both used `top: 64px`, leaving only ~12px between the title bar bottom and the panel/toolbar top. Changed both to `top: 68px` so the top gap (~16px) matches the panel's `right: 16px` margin from the screen edge, creating uniform spacing around the floating UI elements.
366
-
367
- ### Fixed — Multi-Loop Isolation (Cross-Session Iteration Leaks)
368
- - **Iterations leaking between concurrent automations** — When two or more automations were launched simultaneously from the Automation Studio, loop iterations would cross-contaminate: the stop hook couldn't find its loop file after `/clear` (which changes the Claude session ID), and fallback scans would grab the first active loop regardless of ownership. Root cause: no stable identifier survived the `/clear` boundary to tie a Claude session to its loop file.
369
- - Added `SYNABUN_TERMINAL_SESSION` env var to PTY environment at loop launch (`server.js` `/api/loop/launch`), pre-generating the terminal session ID via `randomBytes()` and passing it via `extraEnv` + `opts.sessionId` in `createTerminalSession()`
370
- - `stop.mjs` — `hasActiveLoop` pre-check now scoped to own terminal; fallback scan uses Strategy A (env-based `terminalSessionId` match, safe for any iteration) or Strategy B (legacy: unclaimed iteration-0 loops only)
371
- - `prompt-submit.mjs` — Pending loop claim now filters by `terminalSessionId` instead of blindly taking `pending[0]`; subsequent iteration fallback scan filters by `terminalSessionId`
372
- - `session-start.mjs` — `isLoopSession` detection scoped to own terminal's loop only
373
- - `mcp-server/src/tools/loop.ts` — `resolveSessionId()` checks `SYNABUN_TERMINAL_SESSION` env before falling back to blind directory scan
374
-
375
- ## 2026-03-22
376
-
377
- ### Fixed — AskUserQuestion Interactive Cards Never Rendering in Sidepanel
378
- - **Proactive detection in `assistant` event handler** — AskUserQuestion tool calls were never rendered as interactive ask cards in the Claude Code sidepanel skin. The `permission_denial` → `control_request` path existed but wasn't being triggered reliably. Added server-side detection in the `assistant` event handler's `tool_use` iteration loop (`server.js` ~line 2422) that intercepts `AskUserQuestion` before the `GATED_TOOLS` check, immediately sending a `control_request` to the client. The client's existing `renderAskUserQuestion()` handles the rest — rendering clickable option buttons instead of plain markdown text.
379
- - **`--allowedTools` caused CLI hang, not permission denial** — An earlier attempt added `AskUserQuestion` to the `--allowedTools` flag, which told the CLI to EXECUTE the tool (blocking on stdin in `--print` mode) instead of DENYING it. This caused a 5-minute hang requiring abort. Reverted entirely — the CLI naturally denies `AskUserQuestion` in `--print` mode, which is the desired behavior triggering the `permission_denial` → `control_request` → ask card flow.
380
-
381
- ### Fixed — `--allowedTools` Join Character Unsafe on Windows
382
- - **Space-joined tool list broke on `shell: true`** — The `--allowedTools` argument joined approved tool names with spaces, which could cause argument splitting when spawned with `shell: true` on Windows (`cmd.exe /c`). Changed join character from space to comma (`[...approvedTools].join(',')`) in `server.js` ~line 2220. Comma is safe across all platforms.
383
-
384
- ### Added — Multi-Tab Browser Architecture
385
- - **Tab-per-session data model** — Extended `createBrowserSession()` in `server.js` with a `tabs` Map keyed by `tabId` (random 4-byte hex). Each tab stores its own `page`, `cdpSession`, `url`, and `title`. `session.page` and `session.cdpSession` remain as aliases to the active tab, preserving backward compatibility with all existing MCP tools and REST endpoints.
386
- - **`createSessionTab(session, sessionId, url)`** — Opens a new page in the existing browser context, creates a CDP session, wires `framenavigated`/`load`/`close` events via `wireTabPageEvents()`, and broadcasts `browser:tab-created` over WebSocket.
387
- - **`_switchSessionTab(session, sessionId, tabId)`** — Stops screencast on the old tab's CDP session, updates `session.page`/`session.cdpSession`/`session.activeTabId` aliases, starts screencast on the new tab, and broadcasts `browser:tab-switched`.
388
- - **`closeSessionTab(session, sessionId, tabId)`** — Closes the page, switches to another tab if the closed tab was active, destroys the entire session if it was the last tab. Broadcasts `browser:tab-closed`.
389
- - **4 REST endpoints** — `GET /api/browser/sessions/:id/tabs` (list tabs), `POST /api/browser/sessions/:id/tabs` (create tab with URL), `POST /api/browser/sessions/:id/tabs/:tabId/activate` (switch active tab), `DELETE /api/browser/sessions/:id/tabs/:tabId` (close tab).
390
- - **3 WebSocket message types** — `switch-tab`, `new-tab`, `close-tab` inbound messages handled in `handleBrowserWebSocket()`. `browser:tab-created`, `browser:tab-switched`, `browser:tab-closed` outbound events routed through `ui-sync.js` to frontend.
391
-
392
- ### Added — Automation Studio Launch Destination Prompt
393
- - **"Run in" toggle** — New destination toggle in the Automation Studio launch dialog between Mode and CLI sections, with "Floating" and "Side Panel" buttons (`.as-launch-destination` class). Selection persisted via `storage.getItem/setItem('as-launch-destination')`.
394
- - **Side Panel routing** — When destination is `sidepanel`, `confirmLaunch()` emits `claude-panel:ensure-open` → 300ms delay → `terminal:attach-floating` with `snapToPanel: true` → `claude-panel:show-browser`. Terminal snaps adjacent to the Claude panel using `--claude-panel-width` CSS variable. Browser embeds in the panel's existing browser embed area.
395
- - **Floating (CLI) routing** — Existing flow unchanged — floating terminal + floating browser as before.
396
- - **Responsive styles** — `.as-launch-destination` button styles matching `.as-launch-mode` pattern, with compact variant in mobile breakpoint (`styles.css`).
397
-
398
- ### Fixed — Browser Not Appearing After Loop Close and Relaunch
399
- - **Zombie session detection in loop launch** — Loop launch's browser reuse poll in `server.js` now runs `page.evaluate('1')` liveness probe on candidate sessions before reusing. Dead/zombie sessions are destroyed and skipped, allowing a fresh session to be created instead of silently binding to a dead browser.
400
- - **WebSocket reconnect-once pattern** — `openBrowserSession()` and `reconnectBrowserSession()` in `ui-terminal.js` now attempt one automatic reconnection on WebSocket close (1.5s delay) before giving up. Prevents transient connection drops from killing the browser view. Uses `_wsReconnectAttempted` flag to prevent infinite retry loops.
401
- - **`_opening` guard unstick** — Reduced the `_opening` flag timeout from 15s to 10s in `ui-terminal.js`, preventing the guard from permanently blocking new browser sessions when a previous open attempt failed silently.
402
- - **`sync:browser:created` race resolution** — Terminal's `sync:browser:created` handler now gives the Claude panel 2 seconds to claim the browser embed before taking over. Checks `#cp-browser-embed.active` after the delay — if the panel already embedded it, terminal skips. Prevents both panel and terminal from fighting over the same browser session.
403
- - **Claude panel loop detection** — Panel's `sync:browser:created` handler replaced unreachable `msg.source === 'loop'` check with a fetch to `/api/loop/active` to detect active loops when Claude isn't actively processing (`ui-claude-panel.js`).
404
-
405
- ### Changed — Multi-Loop Coexistence
406
- - **Stale-only loop cleanup** — Loop launch in `server.js` no longer kills all active loops before starting a new one. Instead, only cleans up loop state files whose associated terminal sessions are dead (`terminalSessions.has()` check). Active concurrent loops with live terminals are preserved.
407
- - **`/api/loop/active` returns all loops** — Endpoint now returns a `loops` array containing all active loop sessions. First loop populates top-level fields for backward compatibility. Consumers can iterate `loops` to see all concurrent loop states.
408
- - **Per-loop browser tabs** — Each new loop creates a new tab in the shared browser session via `createSessionTab()` instead of hijacking the current page. Loop state stores `browserTabId` for per-loop tab tracking.
409
-
410
- ### Added — LinkedIn Jobs Browser Extractor
411
- - **`browser_extract_li_jobs` MCP tool** — New browser extraction tool (tool #39) that extracts structured job listing data from LinkedIn. Handles two page types: search results (`/jobs/search/?keywords=QUERY&location=LOC`) using `[data-occludable-job-id]` card containers, and homepage recommendations (`/jobs/`) using `main a[href*="/jobs/collections/"]` link cards. Extracts 11 fields per job: `jobId`, `title`, `company`, `companyUrl`, `location`, `salary`, `jobUrl`, `logo`, `promoted`, `easyApply`, `postedDate`.
412
- - Search path: reads `span[aria-hidden="true"]` inside title link for clean title (avoids duplication with visually-hidden screen-reader span), `.artdeco-entity-lockup__subtitle` for company, `.artdeco-entity-lockup__caption` for location
413
- - Homepage path: parses `<p>` elements sequentially, strips `(Vaga verificada)` / `(Verified listing)` suffix from titles, extracts posted dates from `Anunciada há` / `Posted` patterns
414
- - Salary regex handles `R$`, `US$`, `$` with `por hr`/`mês`/`per month`/`yr` suffixes and ranges
415
- - De-duplicates via `seen` Set on `jobId`; homepage fallback only runs when search cards count is 0
416
- - Files: `mcp-server/src/tools/browser-observe.ts` (extractor script + schema + handler), `mcp-server/src/tools/browser.ts` (import + registration), `mcp-server/src/index.ts` (server instructions)
417
-
418
- ### Changed — Window Close Behavior (ESC / Close Button Only)
419
- - **Disabled outside-click closing on all windows** — All modal windows (Automation Studio, Skills Studio, Settings, Keybinds, Session Monitor, Image Gallery, Help, Terminal dir picker) no longer close when clicking the backdrop overlay. Removed 12 `backdrop.addEventListener('click', ...)` handlers across 8 files. Windows now close exclusively via ESC key or the close button, preventing accidental dismissal during work.
420
- - **Added ESC key handlers where missing** — `ui-settings.js` (`onSettingsEsc` with cleanup in `close()`), `ui-sessions.js` (`onEsc` in `openPanel()`), `ui-help.js` (global listener checking `overlay.open`), `ui-image-gallery.js` (extended `handleKey()` to close panel on ESC, not just lightbox), and `ui-terminal.js` (`onPickerEsc` for dir picker modal with cleanup) now all respond to ESC for closing.
421
-
422
- ### Added — Backdrop Toggle Button on All Windows
423
- - **Eye icon toggle in every window header** — New `.backdrop-toggle-btn` button (eye SVG icon, 28x28) placed before the close button in all window headers. Clicking smoothly fades the backdrop overlay in/out. Button highlights with `.active` state when backdrop is hidden. IDs: `#as-backdrop-toggle`, `#ss-backdrop-toggle`, `#stg-backdrop-toggle`, `#sm-backdrop-toggle`, `#ig-backdrop-toggle`, `#kb-backdrop-toggle`, `#help-backdrop-toggle`.
424
- - **Shared CSS classes** — `.backdrop-toggle-btn` styling (matches existing focus-btn pattern) and `.backdrop-hidden` modifier for all backdrop types (`studio-backdrop`, `kb-backdrop`, `sm-backdrop`, `ig-backdrop`) using `opacity: 0 + pointer-events: none`. Help overlay uses `background: transparent` + `backdrop-filter: none` with 0.25s transition since it's display-toggled rather than opacity-toggled.
425
-
426
- ### Added — Automation Studio Icon Picker Expansion (13 Icons)
427
- - **Social media icons** — Added 8 platform-specific fill-based SVGs to `AS_ICONS` in `ui-automation-studio.js`: `x` (X/Twitter rebrand logo), `instagram` (rounded square + camera), `facebook` (F logo), `linkedin` (in logo), `tiktok` (musical note), `youtube` (play button), `whatsapp` (phone in speech bubble), `discord` (controller face). All use 16x16 viewBox with `fill="currentColor"`. Original stroke-based `twitter` bird icon preserved alongside `x`.
428
- - **AI platform logos** — Added `claude`, `openai`, `gemini` as inlined fill-based SVGs with 24x24 viewBox, sourced from `public/category-logos/` directory files.
429
- - **Leonardo and pin icons** — `leonardo` uses `<img src="/leonardoai.svg">` reference (SVG too large to inline — contains embedded base64 bitmap data). `pin` uses existing `_s()` stroke helper with simplified pushpin path.
430
- - **Section organization** — Reorganized `AS_ICONS` object with comment headers: Social media icons, General purpose icons, External SVG logos, UI chrome. All 13 new icons automatically included in `ICON_KEYS` and appear in the icon picker dropdown.
431
-
432
- ### Fixed — Automation Studio Sidebar Scroll Position Reset
433
- - **Scroll jumping to top on item click** — Clicking a template in the left sidebar triggered `switchToDetail()` → `renderView()` → `renderSidebar()`, which replaced the entire `list.innerHTML`, destroying all DOM nodes and resetting scroll position to the top. Fixed by saving `list.scrollTop` before the innerHTML replacement and restoring it immediately after in `renderSidebar()` (~line 1518 of `ui-automation-studio.js`).
434
-
435
- ### Changed — Leonardo.ai Converted to 100% Browser-Based
436
- - **Removed all API-based tools and code** — Deleted 5 API source files (`leonardo-api.ts`, `leonardo-image-tools.ts`, `leonardo-video-tools.ts`, `leonardo-utility-tools.ts`, `leonardo-constants.ts`) and all corresponding `dist/` output. The integration no longer requires `LEONARDO_API_KEY` or any API credentials. Tool count reduced from 14 API tools to 4 browser tools.
437
- - **Rewrote `leonardo-browser-tools.ts` as primary** — Removed "fallback" framing. 4 tools: `leonardo_browser_navigate` (8 page destinations incl. new `flow-state`), `leonardo_browser_generate` (fill prompt + click Generate — expects settings pre-configured via generic browser tools), `leonardo_browser_library` (view/search personal library), `leonardo_browser_download` (screenshot results). Updated descriptions to instruct Claude to configure all UI settings BEFORE calling generate.
438
- - **Updated `leonardo.ts` barrel and `index.ts` registration** — Barrel file imports only browser tools. `index.ts` tool listing reduced to 4 browser tools. Server instructions changed from API key requirement to browser-based workflow guidance referencing `/leonardo` skill.
439
- - **Rewrote `/leonardo` skill (`SKILL.md`)** — Removed API key prerequisite. Added browser tool listing with "Critical workflow" note. Step 3 Execute now follows: navigate → snapshot → configure UI settings → summary → generate → monitor. Added `browser-guide.md` module read in configuration step. Expanded follow-up actions with Download option.
440
- - **New `browser-guide.md` — complete Leonardo.ai UI map** — Comprehensive reference created through live browser research. IMAGE PAGE: 18 models (capabilities table), 8 style presets, dimension presets + custom social/device presets, Add Elements, prompt field. VIDEO PAGE: 23 models (capabilities table), 39 Motion Controls (Camera/Zoom/FX categories), 27 Motion Elements (creative overlays), 3-layer Style Stacking (9 Vibe + 16 Lighting + 14 Color Theme options), Prompt Enhance, Generation Mode, dimensions, advanced settings. Includes React element click workarounds (`evaluate()` patterns) and error recovery instructions.
441
- - **Expanded `video-prompter.md` to 7-phase questionnaire** — Added Phase 3 (Motion Control — 39 options with curated recommendations), Phase 4 (Motion Elements — 27 overlays grouped by aesthetic), Phase 5 (Style Stacking — Vibe/Lighting/Color with 10 recommended combo table). All three new phases gated to Motion 2.0/Fast models only.
442
- - **Expanded `image-prompter.md` to 6-phase questionnaire** — Added Phase 3 (Style Preset — 8 options with auto-recommendation by category), expanded Phase 4 (Dimensions — added custom social/device presets), refined Phase 6 prompt engineering with 3 example transformations and negative prompt templates.
443
- - **Updated `model-advisor.md` with all 2026 models** — Image models decision matrix (13 use cases), video models decision matrix (13 use cases), video model capabilities table (23 models × 8 columns), cost optimization tips.
444
- - **Updated `style-guide.md` with full option set** — 8 image style presets with usage guidance, 9 Vibe options, 16 Lighting options (11 new), 14 Color Theme options (9 new), 15 recommended style combos table, 39 motion controls with cinematic language descriptions, 27 motion elements with aesthetic descriptions.
445
- - **Updated `prompt-library.md` with curated templates** — 5 video categories (Cinematic, Product, Nature, Abstract, Social Media) with 2 templates each, 5 image categories (Portrait, Landscape, Product, Logo, Illustration) with 2 templates each, 4 negative prompt templates by content type.
446
-
447
- ## 2026-03-21
448
-
449
- ### Fixed — Context Gauge Tooltip Positioning and Overflow Clipping
450
- - **Tooltip clipped by panel overflow** — The `.cp-gauge-tip` tooltip used `position: absolute` inside `.cp-gauge-section`, but the parent `.claude-panel` has `overflow: hidden`, causing tooltips to get cut off — especially on the left edge. Switched to `position: fixed` with JS-calculated coordinates on `mouseenter` (centered above the hovered section via `getBoundingClientRect()`), so the tooltip escapes the clipping container entirely. Set `z-index: 999999` to render above all UI layers in `neural-interface/public/shared/ui-claude-panel.js`.
451
-
452
- ### Fixed — Browser Not Re-launching After First Use
453
- - **Stale tab reuse blocked new browser sessions** — `openBrowserSession()` in `ui-terminal.js` checked for an existing browser tab DOM element and switched to it without verifying the underlying WebSocket was still open. Now validates `ws.readyState === WebSocket.OPEN` before reusing; if the session is dead, cleans up via `closeSession()` and falls through to create a fresh browser.
454
- - **Zombie sessions accepted WebSocket reconnections** — `handleBrowserWebSocket()` in `server.js` allowed new WebSocket clients to connect to sessions where the browser page had already exited. Added a `session.page.evaluate('1')` liveness probe on connect — if the page is dead, the zombie session is destroyed and the client receives an error, prompting fresh session creation.
455
- - **Race condition in session Map cleanup** — `destroyBrowserSession()` in `server.js` removed the session from `browserSessions` Map at the end of the function, after async cleanup. Moved `browserSessions.delete(sessionId)` to the top (immediately after fetching the session object) to prevent concurrent requests from seeing zombie entries during the teardown window.
456
-
457
- ## 2026-03-20
458
-
459
- ### Added — Image Gallery App
460
- - **Floating image browser for `data/images/`** — New `ui-image-gallery.js` module (~330 lines) implementing a draggable/resizable panel following the Session Monitor window pattern. Toolbar includes debounced search input, type filter dropdown (All/Screenshots/Attachments/Whiteboard/Pastes), sort dropdown (Newest/Oldest/Name/Size), and favorites-only toggle. Thumbnails render in a CSS grid (`auto-fill, minmax(150px, 1fr)`) with 4:3 aspect ratio and `object-fit: cover`.
461
- - **Card overlay actions** — Hover reveals action buttons (favorite, add to whiteboard, download, delete) with styled `data-tooltip` tooltips on each button.
462
- - **Full lightbox** — Click any thumbnail to open a full-screen lightbox with keyboard navigation (arrow keys, Escape), prev/next buttons, and a bottom bar with favorite/whiteboard/download/delete actions.
463
- - **Add to Whiteboard integration** — New exported `addImageToWhiteboard(url)` in `ui-whiteboard.js` fetches image, converts to dataUrl via canvas, and places as a whiteboard element centered in the viewport (max 400px wide, preserves aspect ratio). Available from both card overlay and lightbox.
464
- - **Server API** — 4 REST endpoints in `server.js`: `GET /api/images` (list with metadata + type detection from filename prefix), `GET /api/images/file/:filename` (serve file), `POST /api/images/favorite` (toggle), `DELETE /api/images/:filename` (remove + cleanup favorites).
465
- - **Favorites persistence** — `data/image-favorites.json` stores favorited filenames. 24h startup cleanup sweep now skips favorited images.
466
- - **API client** — `fetchImages()`, `toggleImageFavorite()`, `deleteImage()` in `api.js`.
467
- - **Navbar button** — Gallery icon in `bar-right` between Session Monitor and Cost Tracker in `html-shell.js`, wired in `ui-navbar.js` with `image-gallery:closed` event sync and `registerAction('toggle-image-gallery')` keybind. Imported and initialized in both `2d/main.js` and `3d/main.js`.
468
-
469
- ### Fixed — Tooltip Z-Index Below Floating Panels
470
- - **Tooltips invisible on gallery/lightbox/session-monitor overlays** — The `.ui-tooltip` had `z-index: 99999` but floating panels use `z-index: 300000` and the lightbox uses `400000`, causing `data-tooltip` styled tooltips to render behind these overlays. Bumped `.ui-tooltip` z-index to `500000` in `styles.css` so tooltips always render above all overlay layers.
471
-
472
- ### Fixed — Whiteboard Context Menu Hidden Behind Neighboring Images
473
- - **Context menu and rotate handle rendered behind overlapping images** — The `.wb-ctx-menu` had a static CSS `z-index: 15` and `.wb-rotate-float` had `z-index: 20`, but whiteboard element z-indices increment indefinitely via `_nextZIndex++`. Once the board had more than ~15 elements, the toolbar (send-to-terminal, duplicate, copy, delete buttons) and rotate handle would render behind neighboring images, appearing cropped or fully hidden. Fixed by dynamically setting `style.zIndex = _nextZIndex + 100` on both `_ctxMenu` and `_rotateEl` in `showContextMenu()` and `showMultiContextMenu()` in `ui-whiteboard.js`, ensuring they always float above all elements regardless of how many items exist on the board.
474
-
475
- ### Added — Cron-Driven Social Engagement Scheduler
476
- - **Server-side schedule evaluator** — 60-second `setInterval` loop in `server.js` that evaluates cron expressions against the current time in each schedule's timezone via `getNowInTimezone()`. Fires matching schedules with minute-level dedup lock and 30-second stagger queue for concurrent fires. Includes deferred missed-fire detection on startup (5-minute grace window).
477
- - **Cron parser** — Custom 5-field cron expression parser (`parseCronField()`, `cronMatchesDate()`) supporting `*`, ranges (`1-5`), lists (`1,3,5`), and step values (`*/3`). `getNextCronRun()` computes next fire time up to 7 days ahead. `describeCron()` generates human-readable descriptions.
478
- - **`launchScheduledLoop()` with day theme merging** — Resolves the schedule's `templateId` to a loop template, merges day-of-week `contextOverride` from `dayThemes` into the template's base context, then launches via `createTerminalSession()` + `attachLoopDriver()`. Adds `scheduledBy` field to loop state file for provenance tracking.
479
- - **Schedule data model** — New `data/loop-schedules.json` file with schema: `{ schedules: [{ id, name, templateId, cron, timezone, enabled, dayThemes, overrides, lastRun, lastRunResult, nextRun, runCount, createdAt, updatedAt }] }`. `dayThemes` maps JS day-of-week (0=Sun through 6=Sat) to context override strings for content calendar weekly themes.
480
- - **6 REST API endpoints** — `GET/POST /api/schedules`, `GET/PUT/DELETE /api/schedules/:id`, `POST /api/schedules/:id/test` (immediate fire). Full CRUD with template existence validation, cron format validation, and `nextRun` recomputation on every update.
481
- - **6 WebSocket events** — `schedule:created`, `schedule:updated`, `schedule:deleted`, `schedule:fired`, `schedule:completed`, `schedule:failed` broadcast via `broadcastSync()`. Event dispatcher entries added in `ui-sync.js`.
482
- - **API client functions** — `fetchSchedules()`, `createSchedule()`, `fetchSchedule()`, `updateSchedule()`, `deleteSchedule()`, `testSchedule()` in `api.js`.
483
- - **Automation Studio — Schedules tab** — New "Schedules" button with clock icon in the header. `renderSchedulesMain()` renders a card-based list view showing template icon, cron description, next-run countdown, run count, timezone, status badges (Active/Paused/Error), and action buttons (toggle, test fire, edit, delete).
484
- - **Automation Studio — Schedule editor** — `renderScheduleEditorMain()` provides a form with name, template dropdown, 5 cron presets (3x daily, 2x daily, morning only, every day 9am, every 3h), live cron description preview, timezone input, 7-row day themes grid (Sun–Sat context overrides), and enabled toggle. `saveScheduleFromEditor()` validates and creates/updates via API.
485
- - **Schedule WebSocket listeners** — `setupScheduleWebSocket()` in `ui-automation-studio.js` listens for all 6 schedule events for live UI updates and toast notifications.
486
- - **Backup inclusion** — `loop-schedules.json` added to both auto-backup (`buildBackupZipToFile()`) and manual backup file lists.
487
-
488
- ### Added — Whiteboard Shape Picker Submenu
489
- - **Shape picker flyout** — Added `#wb-shape-picker` panel that appears when the shape tool is selected, matching the existing section picker pattern. Offers three shape presets: Rectangle, Circle, and Triangle, each with inline SVG icon and label.
490
- - **Triangle shape support** — Added `generateHandDrawnShape('triangle')` with wobbly 3-point path rendering in `ui-whiteboard.js`. New `_activeShapeType` state variable (default `'rect'`) tracks which shape to create on click/drag. Triangle added to double-click shape cycle: rect → pill → circle → triangle → drawn-circle → rect.
491
- - **Shape picker CSS** — Added `#wb-shape-picker`, `.wb-shape-btn` styles in `styles.css` replicating the section picker's glass panel appearance.
492
-
493
- ### Fixed — Circle Shape Rendering as Polygon
494
- - **Circle had visible straight-line segments** — The circle shape rendered with 12-point Catmull-Rom approximation via `closedSmoothPath()` with `t=0.3` tension, producing a visible polygon. Replaced the point-based approach entirely with proper SVG arc commands (`A rx ry 0 1 1`) for a mathematically perfect ellipse in `generateHandDrawnShape('circle')`.
495
-
496
- ### Changed — Whiteboard Toolbar Icons
497
- - **Arrow icon** — Replaced flat horizontal line + chevron with a diagonal arrow (bottom-left to top-right) with L-shaped arrowhead lines in `html-shell.js`. Clearer directional intent.
498
- - **Shape icon** — Replaced rect + circle combo with a clean rounded rectangle (`rx="3"`). Simpler, matches design tool conventions.
499
- - **Wireframe/Section icon** — Replaced 3-rect layout (top bar + two columns) with a 4-section wireframe layout (navbar strip, sidebar, content area, footer bar) in `html-shell.js`. Better represents actual page layouts.
500
-
501
- ### Fixed — Quick Timer Buttons Did Nothing on Click
502
- - **`el` undefined in `handlePanelClick` switch cases** — The `qt-select` and `qt-go` handlers referenced `el` (undefined variable) instead of `btn` (the actual resolved element from `e.target.closest('[data-action]')`). Every click silently threw a ReferenceError, so preset selection and Go button had no effect. Fixed all references to use `btn` in `ui-automation-studio.js`.
503
-
504
- ### Fixed — Quick Timer Duplicate Entries
505
- - **Timer appeared twice in Active Timers list** — The `qt-go` click handler pushed the new timer to `_quickTimers` immediately after the API response, then the server's `quick-timer:set` WebSocket broadcast triggered the `sync:quick-timer:set` listener which pushed the same timer again. Added dedup check (`!_quickTimers.some(t => t.id === data.timerId)`) to the sync handler so it skips timers already present.
506
-
507
- ### Changed — Quick Timer UX and New Schedule Form Rework
508
- - **Quick Timer — unified select-then-go flow** — Preset buttons (5m, 15m, 30m, 1h, 2h, 4h) no longer fire immediately on click. Changed from `data-action="qt-start"` to `data-action="qt-select"` which highlights the selected preset (`.as-qt-preset--selected` with blue border/background). A single unified "Go" button (`data-action="qt-go"`) triggers the timer, reading either the selected preset or custom minute input. New `_selectedQtMinutes` state variable tracks selection.
509
- - **New Schedule form — grouped cron presets** — Expanded from 5 flat presets to 18 presets organized in 3 groups via `CRON_PRESET_GROUPS`: Frequency (Every 15m/30m/1h/2h/3h/6h), Daily (Morning/Midday/Evening/2x/3x/4x), Weekly (Weekdays 9am/2x/3x, Weekends 10am, Mon/Wed/Fri, Tue/Thu). Rendered in a 3-column CSS grid (`.as-sched-preset-grid`) with group labels.
510
- - **New Schedule form — side-by-side fields** — Name+Template and Timezone+Status fields now render in horizontal rows (`.as-sched-field-row` with `.as-sched-field--flex`). Cron input uses monospace font with inline live description (`.as-sched-cron-row`).
511
- - **New Schedule form — day themes 2-column grid** — Day themes reordered from Sun-first to Mon-first (`dayOrder = [1,2,3,4,5,6,0]`) and rendered in a 2-column CSS grid (`.as-sched-daythemes-grid`). Mon/Tue, Wed/Thu, Fri/Sat pair naturally; Sun spans full width.
512
- - **`describeCronClient()` improvements** — Now handles `*/N` minute patterns (e.g., `*/15` → "every 15 minutes") and `*/N` hour patterns (e.g., `*/2` → "every 2 hours at :00") instead of falling through to generic display.
513
-
514
- ### Changed — Response Ordering System
515
- - **New "Response Ordering (IMPORTANT)" section in `CLAUDE.md` and `CLAUDE-template.md`** — Instructs Claude to call `remember` (and other memory tools) BEFORE writing the task completion summary. Tool call results appear above text in a single response, so the summary naturally ends up at the bottom where the user sees it. Prevents the stop hook from blocking and burying the summary under memory tool noise.
516
- - **Stop hook summary instruction in `stop.mjs`** — All block reasons (single obligation, combined obligations, standalone plan check) now append: "After completing all memory operations, end your response with a brief task completion summary so the user sees it as the final message." Added `SUMMARY_SUFFIX` constant for single/combined obligation blocks (line 630) and inline suffix for the standalone plan block (line 659).
517
- - **Session-start boot directive in `session-start.mjs`** — Added response ordering one-liner to the SynaBun Persistent Memory boot block (line 315): reminds Claude that memory tools go first, summary goes last.
518
- - **Condensed rulesets updated** — Added `Response ordering: call remember FIRST, then write your summary LAST. Never summary-then-tools.` to all 4 condensed rulesets (Cursor, Generic, Gemini, Codex) in both `CLAUDE.md` and `CLAUDE-template.md`. These propagate to onboarding and settings copy buttons via the `/api/claude-code/ruleset` endpoint.
519
-
520
- ### Changed — CLAUDE.md Documentation Accuracy
521
- - **Hook System table descriptions updated** — SessionStart: was "Injects directives + category tree" → now "Greeting, boot sequence, compaction recovery, loop detection, session registration." UserPromptSubmit: added "loop iteration injection, category tree on first threshold." Stop: was "Blocks if pending-compact or 3+ edits without remember" → now "Combined obligations: compaction, loops, task memory, user learning, conversation turns, auto-store, unstored plans." PostToolUse (post-remember): added "User learning flag management."
522
- - **Development section updated** — Directory tree now shows `neural-interface/` sub-structure with `public/` and `templates/` subdirectories. Architecture line changed from "single-file Neural Interface" to "modular Neural Interface (vanilla JS + Three.js, shared/ modules)".
523
-
524
- ## 2026-03-19
525
-
526
- ### Added — Isolated Agent System
527
- - **Fully isolated Claude Code agents from Automation Studio** — New system to spawn Claude Code as independent child processes using `child_process.spawn` with `claude --print --output-format stream-json`, completely separate from the existing terminal relay / loop pipeline. No node-pty dependency — cross-platform by default (macOS, Linux, Windows).
528
- - **Session isolation** — Each agent gets `--session-id <uuid>`, `--strict-mcp-config` with empty MCP config (no global servers), and `--permission-mode bypassPermissions`. No SynaBun hooks fire, no state files shared, no MCP cross-talk.
529
- - **`spawnIsolatedAgent()` in `server.js`** — Spawns child process, parses newline-delimited JSON stream from stdout, extracts assistant text and tool use events, tracks cost from result events. Clean environment with `NO_COLOR=1`, `TERM=dumb`, stripped `VSCODE_*` vars.
530
- - **`agentRegistry` Map** — In-memory registry tracking all active/completed agents with status (`running`/`completed`/`failed`/`stopped`), accumulated text output, tool use summaries, and cost.
531
- - **5 REST API endpoints** — `POST /api/agents/launch`, `GET /api/agents`, `GET /api/agents/:id`, `POST /api/agents/:id/stop`, `DELETE /api/agents/:id`
532
- - **WebSocket broadcasting** — `agent:launched`, `agent:output`, `agent:status`, `agent:removed` events via `broadcastSync()` for real-time UI updates
533
- - **Cross-platform process kill** — Unix: `process.kill(-pid, 'SIGTERM')` for process group kill. Windows: `taskkill /pid X /T /F` for tree kill. `AGENT_IS_WIN` constant avoids forward-reference to `IS_WIN`.
534
- - **Automation Studio launch dialog mode toggle** — New Loop/Agent toggle (`.as-launch-mode-toggle`) in the launch confirmation dialog. Agent mode hides iteration/time fields and shows isolation badge. Persists mode across launches.
535
- - **Agent cards in Running view** — Live-streaming agent cards (`.as-agent-card`) with status-colored borders, monospace output area (`.as-agent-output`), tool call count, cost display, elapsed time, and stop/remove controls. Auto-scrolls output. WebSocket listener (`setupAgentWebSocket()`) updates cards in real-time as events arrive.
536
- - **API client functions in `api.js`** — `launchAgent()`, `fetchAgents()`, `fetchAgent()`, `stopAgent()`, `removeAgent()`
537
- - **Sync event dispatch in `ui-sync.js`** — 4 new agent event handlers: `agent:output`, `agent:launched`, `agent:status`, `agent:removed`
538
-
539
- ### Changed — Database Tab Visual Polish
540
- - **Section cards** — Wrapped Memory Database and Embedding Management areas in `.stg-section` card containers, replacing flat `.stg-section-divider` with card-gap separation for consistent visual hierarchy across settings tabs
541
- - **Stats grid** — Replaced inline-styled text stats with `.db-stats-row` — a 2-column grid of inset stat tiles (`.db-stat`) with uppercase labels and monospace values for Storage and DB Size
542
- - **Buttons** — Replaced `conn-add-btn` and `settings-btn-cancel` with `.stg-action-btn`. Reindex and Cancel buttons wrapped in `.db-reindex-row` flex container at 50/50 width
543
- - **Progress bar** — Extracted all inline styles from the reindex progress area into CSS classes: `.db-reindex-status`, `.db-reindex-header`, `.db-reindex-text`, `.db-reindex-bar-track`, `.db-reindex-bar`, `.db-reindex-summary`
544
- - **Embedding model footer** — Moved embedding model/dimensions info from the stats grid into a `.db-model-footer` hairline-separated note at the bottom of the Embedding Management card
545
-
546
- ### Fixed — Plan Storage Cross-Session Leak
547
- - **`post-plan.mjs` stored wrong plan when multiple sessions were in plan mode** — The `findLatestPlan()` function blindly picked the most recently modified `.md` file from `~/.claude/plans/` (a shared global directory) with no session awareness. When two concurrent Claude Code sessions were in plan mode, `ExitPlanMode` in one session could grab the other session's plan file — the one with the newer `mtime` — and store it under the wrong project/context. Evidence: 10 of 17 plan files in the plans directory were never stored, likely victims of the same cross-session mismatch or dedup cascade.
548
- - **`findPlanByContent(toolResponse)`** — New primary matching function that uses `tool_response` content from `ExitPlanMode` to identify the correct plan file. Four strategies in priority order: filename extraction from response text, exact content match, substring match (response contains file content or vice versa), and H1 heading match.
549
- - **`listPlanFiles()`** — Extracted shared utility that lists and sorts all `.md` files by `mtime` descending, used by both `findPlanByContent()` and the mtime fallback.
550
- - **`findLatestPlan()` demoted to fallback** — The original mtime-based selection is now only used when content matching fails (e.g., empty `tool_response`), ensuring no regression for edge cases.
551
- - **Debug logging** — New `data/plan-debug.log` (append-only) records session ID, `tool_response` preview (first 200 chars), and match method (`exact-content`, `heading-match`, `filename`, `mtime-fallback`) for every `ExitPlanMode` invocation. Match method also included in the `additionalContext` response.
552
-
553
- ### Fixed — Image Sharing Pipeline (Claude Panel → Claude Code)
554
- - **Claude Code CLI never received pasted/dropped images** — The `query` WebSocket handler in `server.js` destructured `images` from the message but never passed them to `spawnProc()`. Since Claude Code's `--print` mode accepts only text stdin, images can't be sent as multimodal content. Fixed by saving each attached image as a temp file (`synabun-img-{timestamp}-{idx}.{ext}`) and prepending a "Use the Read tool to view" instruction block to the text prompt before spawning the process.
555
-
556
- ### Fixed — Terminal Image Paste Not Inserting Into PTY
557
- - **`image_saved` response only copied path to clipboard** — All 6 `image_saved` handlers across terminal session types (xterm main, html-term-renderer, floating xterm, floating html-term, detached, generic) called `navigator.clipboard.writeText()` but never wrote the path into the PTY stream. Fixed by adding `ws.send(JSON.stringify({ type: 'input', data: msg.path }))` after the clipboard copy in every handler, so the saved image path is both copied and inserted at the cursor.
558
-
559
- ### Fixed — Whiteboard "Send to Terminal" Session Lookup
560
- - **`wb:send-to-terminal` event handler had no session fallback** — The handler tried to use `_activePaneIdx` directly without checking validity or falling back to any open session. When no pane was explicitly active (common after tab switches), the send silently failed. Fixed by checking `_activePaneIdx[0]` then `[1]`, then falling back to the first session with an open WebSocket, with a toast message if no session is available.
561
-
562
- ### Fixed — Standalone Chat Missing Image Preview
563
- - **Pasted images in `claude-chat.html` showed only a status line, no thumbnail** — The standalone chat page called `appendStatus()` for pasted images with no visual preview or way to remove them before sending. Added an `#chat-image-preview` container with `addImageThumb()` rendering 56×56 rounded thumbnails with hover-reveal `×` remove buttons. Thumbnails re-index on removal, preview clears on send.
564
-
565
- ### Fixed — Screenshot Auto-Paste macOS-Only
566
- - **Screenshot watcher hardcoded to macOS paths and patterns** — The `fs.watch()` screenshot watcher in `server.js` only checked `com.apple.screencapture` and `~/Desktop` with a macOS-specific filename regex. Refactored to a cross-platform block: macOS reads `defaults read com.apple.screencapture location` with `~/Desktop` fallback; Windows checks `~/Pictures/Screenshots`, `~/OneDrive/Pictures/Screenshots`, `~/Pictures`; Linux checks `~/Pictures/Screenshots`, `~/Pictures`, and Portuguese locale variants. Each platform gets its own filename pattern.
567
-
568
- ### Fixed — Clipboard Operations Failing in Non-Secure Contexts
569
- - **`navigator.clipboard.writeText()` silently fails over LAN (non-HTTPS)** — The Clipboard API requires a secure context (HTTPS or localhost). When Neural Interface is accessed via LAN IP, all clipboard operations failed silently. Added `_clipCopy()` / `_clipboardWrite()` helpers in both `ui-terminal.js` and `ui-whiteboard.js` that try the modern API first, then fall back to a hidden `<textarea>` + `document.execCommand('copy')` pattern. Also added a WebSocket connection check with tooltip feedback on the whiteboard "Copy Image Path" button.
570
-
571
- ### Added — Content Negotiation & Markdown Extraction
572
- - **Browser markdown extraction endpoint** — New `GET /api/browser/sessions/:id/markdown` in `server.js` extracts clean markdown from any rendered page. Uses `page.evaluate()` to clone the DOM, strips noise elements (nav, header, footer, aside, ads, cookie banners, modals, scripts, styles, iframes), prefers `<main>`/`<article>`/`[role="main"]` content areas, then converts via `node-html-markdown`. Returns `{ url, title, markdown, tokens }` with 80K char truncation and token estimation (`Math.ceil(length / 4)`).
573
- - **Lightweight HTTP fetch with Accept header negotiation** — New `POST /api/fetch-markdown` endpoint performs direct HTTP fetch (no browser) with `Accept: text/markdown, text/html, */*` header (RFC 7763). Detects native markdown responses via `Content-Type`, reads Cloudflare `x-markdown-tokens` and `content-signal` headers. Falls back to `node-html-markdown` conversion for HTML responses. 15s timeout via AbortController.
574
- - **MCP client methods `getMarkdown()` and `fetchMarkdown()`** — Added to `mcp-server/src/services/neural-interface.ts` for the two new endpoints.
575
- - **`node-html-markdown` dependency** — Added to `neural-interface/package.json`. Shared `NodeHtmlMarkdown` instance configured with fenced code blocks, `-` bullet markers, `*`/`**` emphasis, and max 2 consecutive newlines.
576
-
577
- ### Changed — `browser_content` Tool Format Parameter
578
- - **New `format` parameter on `browser_content`** — Accepts `"text"` (default, backward-compatible) or `"markdown"`. Markdown mode calls the new extraction endpoint, returning structured content with headings, links, and lists preserved — ideal for LLM consumption. Updated schema, description, and handler in `mcp-server/src/tools/browser-observe.ts`.
579
-
580
- ### Fixed — Agent Launch Dialog DOM-Timing Bug
581
- - **`confirmLaunch()` read DOM values after dialog destruction** — `closeLaunchDialog()` was called before reading the SynaBun checkbox, submode buttons, iterations, and max-minutes inputs. Since `closeLaunchDialog()` calls `.remove()` on the dialog element, all 5 `document.getElementById()` / `querySelector()` calls returned `null`, making `withSynabun` always `false`, `agentSubmode` always `"single"`, `agentIterations` always `1`, and `agentMaxMinutes` always `30`. Moved all DOM reads before `closeLaunchDialog()` in `ui-automation-studio.js`. This caused agents to launch with empty MCP config (`{"mcpServers":{}}`) and no browser session — making browser automation impossible.
582
-
583
- ### Fixed — Agent CLAUDE.md Boot Sequence Hijack
584
- - **Agents burned all turns on session boot instead of executing tasks** — Agents spawned with `cwd: PROJECT_ROOT` loaded the project's `CLAUDE.md`, which mandates a greeting, session recall, and communication-style recall before any work. The agent spent its first 4 turns on `ToolSearch` + `recall` calls for the boot sequence, then output "Let me navigate..." as text-only — which terminates `--print` mode (text-only responses end the session). Added `defaultAgentPrompt` in `launchAgentController()` (`server.js`) when `withSynabun=true`: instructs the agent to skip CLAUDE.md boot, go straight to the task, and chain `ToolSearch` with actual tool calls in the same response to avoid text-only termination.
585
-
586
- ### Changed — Agent Process Tuning & Diagnostics
587
- - **Max turns bumped from 25 to 200** — Browser automations require many turns per page interaction (navigate, snapshot, click, type, wait). 25 turns was exhausted before meaningful work could begin. Default now 200 in `launchAgentController()`.
588
- - **Real-time stderr logging** — Agent stderr was silently buffered with no console output. Added line-by-line filtering for `error`, `MCP`, `ENOENT`, `refused` keywords with `console.warn()`. Full stderr dump logged on process close.
589
- - **Spawn command logging** — `[agent] <id> spawn:` line logs the full claude binary path and arguments (truncated at 80 chars per arg) for debugging.
590
- - **Tool use logging** — `[agent] <id> tool_use: <name>` logged for every MCP/built-in tool call.
591
- - **Close summary** — `[agent] <id> close: code=<N>, tools=<N>, textLen=<N>` logged on process exit.
592
-
593
- ### Changed — Focus Mode Gradient Glow
594
- - **Upgraded `.focus-breathe` ambient glow** — Replaced the 300×300px single-stop radial gradient with a 600×600px multi-layered glow in `styles.css`. Outer layer uses a 4-stop gradient (`rgba(100,150,220,0.07)` → `rgba(80,125,200,0.035)` → `rgba(60,100,180,0.015)` → transparent) for smoother falloff. Added `::before` pseudo-element as a brighter inner core with offset animation timing (`-1.5s` delay) for visual depth.
595
- - **Fixed glow centering for panel tracking** — Replaced `margin-left: -150px; margin-top: -150px` centering hack with `translate(-50%, -50%)` combined with `scale()` in the `@keyframes focus-breathe` animation. The glow now auto-centers regardless of size and correctly follows the logo when sidebars or Claude panel slide open/closed via `--sidebar-total-width` and `--claude-panel-width` CSS variables.
596
- - **Slower, calmer animation** — Reduced animation cycle from 4s to 6s and scale amplitude from 1.15× to 1.1× for a more ambient feel.
597
-
598
- ### Fixed — macOS Permission Error on Screenshot/Image Temp Files
599
- - **Images written to `os.tmpdir()` were inaccessible on macOS** — All 5 image/file write paths in `neural-interface/server.js` used `os.tmpdir()` (e.g., `/var/folders/.../T/`), which macOS can restrict access to. Claude Code's `Read` tool would fail when trying to view pasted or dropped images from the whiteboard focus mode. Replaced all paths with a project-local `IMAGES_DIR` (`data/images/`): Claude skin image attachments (`synabun-img-*`), terminal image paste (`synabun-paste-*`), whiteboard image drag-drop (`synabun-wbimg-*`), memory drag-drop (`synabun-*.md`), and whiteboard image save (`synabun-wbimg-*`).
600
- - Added `IMAGES_DIR` constant with auto-`mkdirSync` at server startup
601
- - Added 24h stale file cleanup sweep on server boot to prevent unbounded growth
602
- - Added `data/images/` to `.gitignore`
603
-
604
- ### Fixed — Cost Tracking Not Updating Live (Navbar + Session Cost)
605
- - **Navbar label stuck at $0.00 until clicked** — The `cost:updated` event emitted `{ amount, total }` but the navbar listener in `ui-navbar.js` read `data.sessionCost`, a field that didn't exist in the payload. Added `sessionCost: tab.sessionCost` to the event emission in `ui-claude-panel.js`. Additionally, `_updateCostLabel()` now directly updates the navbar `.bar-cost-label` element, covering all 6 call sites (init, tab switch, session restore, sync, monthly load, result events).
606
- - **Cost widget overwriting navbar with monthly total** — `_render()` in `ui-cost-widget.js` was setting the navbar label to `totalUsd` (monthly total), conflicting with the session cost. Removed this — navbar label is now solely managed by `_updateCostLabel()`.
607
- - **Docked cost widget had no initial data fetch** — When docked, `initCostWidget()` skipped the initial `_fetchAndRender()` call, only fetching on first click. Now calls `_positionDocked()` + `_fetchAndRender()` on init when docked.
608
-
609
- ### Changed — Session Monitor Rewritten as Proper Window
610
- - **Replaced flyout panel with draggable/resizable window** — The Session Monitor was a narrow 340px fixed panel anchored to the top-right corner (`z-index: 900`). Now it opens as a proper centered window (640x480 default) using the same `glass resizable` + `drag-handle` pattern as the Automation Studio. Includes backdrop overlay, scale-in animation, and all 8 resize handles. (`ui-sessions.js`, `styles.css`)
611
- - **Added tabbed interface with 3 sections** — Content is now organized into **Sessions**, **Agents**, and **Health** tabs. Each tab has a count badge that updates in real-time (blue for running agents, red for critical leaks, orange for warnings). Tab content renders into a scrollable body area. (`ui-sessions.js`)
612
- - **Sessions tab** — Active Claude Code sessions displayed as cards with type icon, project name, pulse indicator, and a key/value detail grid (ID, uptime, last active, PID, CWD). Dead sessions show reduced opacity; sessions with associated leaks get a red border.
613
- - **Agents tab** — Running and recent agents grouped by status with pill-style status badges (`Running`/`Completed`/`Failed`/`Stopped`), iteration counters for loops, stop/remove buttons, and cost display.
614
- - **Health tab** — Leaks grouped by severity (critical/warning/info) with color-coded card borders and full detail rows (type, age, file, CWD, session IDs, loop data). Orphaned files section includes a "Clean All" action bar.
615
- - **Added empty states** — Each tab shows a centered icon + message when there's no data (e.g., "No active sessions", "All clear" for health). Health tab uses a green icon for the all-clear state.
616
- - **Synced navbar button state** — Navbar icon now listens for `session-monitor:closed` event to deactivate when the window is closed via its own close button or backdrop click, preventing the button from getting stuck in the `active` state. (`ui-navbar.js`)
617
- - **Preserved widget mode** — `mountSessionWidget()` still works for the claude-chat inline skin. `createSessionMonitorPanel()` returns `null` as a backwards-compat no-op.
618
-
619
- ## 2026-03-18
620
-
621
- ### Added — Shared Frame Renderer Factory
622
- - **`createFrameRenderer(canvas, ctx)`** — New utility in `utils.js` that creates a serialized latest-frame-wins renderer for browser screencast streams. Only one `Image` decode runs at a time; incoming frames during decode replace the pending frame (stale frames discarded). Includes `onerror` recovery so corrupted base64 data doesn't permanently stall the pipeline. Returns `{ render(base64), destroy() }` interface.
623
-
624
- ### Fixed — Browser Screencast Stream Freezing
625
- - **Canvas freeze across all rendering surfaces** — Browser screencast streams in the terminal, floating terminal, and Claude panel side panel would freeze while the actual Playwright browser continued working. Root cause: every incoming CDP frame created a new `Image()` for async base64 decode with no backpressure — when frames arrived faster than the browser could decode, Image objects piled up and `onload` callbacks stopped firing permanently. Fixed by replacing the naive per-frame `new Image()` pattern with `createFrameRenderer()` in all three locations: `ui-claude-panel.js:showBrowserEmbed()`, `ui-terminal.js:openBrowserSession()`, and `ui-terminal.js:reconnectBrowserSession()`. Frame renderers are properly destroyed on session close/hide.
626
-
627
- ### Changed — Server-Side Screencast Backpressure
628
- - **WebSocket write buffer check** — Frame broadcast in `server.js:startScreencast()` now checks `ws.bufferedAmount < 512KB` before sending to each client. Clients with congested write buffers are skipped, preventing server-side frame backlog that contributed to client freezes.
629
- - **Default `everyNthFrame` bumped from 1 to 2** — Both `startScreencast()` and the resize-triggered screencast restart now default to sending every 2nd CDP frame instead of every frame. Halves throughput with minimal visual impact. Config file value (`browser-config.json`) still overrides.
630
-
631
- ### Changed — Resize Debounce for Browser Sessions
632
- - **200ms debounce on `ResizeObserver`** — Both `openBrowserSession()` and `reconnectBrowserSession()` in `ui-terminal.js` now debounce resize events before sending viewport resize messages to the server, preventing rapid screencast stop/start cycles during window drag-resizing.
633
-
634
- ### Added — Auto Backup System
635
- - **Scheduled backup to local folder** — New auto-backup system that writes a full SynaBun backup ZIP (`synabun-auto-backup.zip`) directly to a user-chosen folder on a configurable schedule. Uses atomic write pattern (`.tmp` → `renameSync`) to prevent corrupt backups mid-write. Single file replacement — each scheduled run overwrites the previous backup, avoiding disk bloat.
636
- - **Server scheduler** — `setInterval`-based scheduler in `server.js` starts on server boot if enabled, restarts automatically when config changes (no server restart needed). Config persisted in `data/auto-backup-config.json` with fields: `enabled`, `intervalMinutes`, `folderPath`, `lastBackup`, `lastBackupSize`, `lastBackupError`.
637
- - **`buildBackupZipToFile(destPath)`** — Reusable function that creates the same ZIP content as the manual `GET /api/system/backup` endpoint (`.env`, `data/` configs, categories, skills, agents, SQLite database) but writes to disk via `createWriteStream` instead of HTTP response.
638
- - **3 API endpoints** — `GET /api/system/auto-backup` (read config), `PUT /api/system/auto-backup` (update config + restart scheduler), `POST /api/system/auto-backup/trigger` (run backup immediately).
639
- - **Settings UI** — New "Auto Backup" section in Settings > Server tab below the existing backup controls. Toggle on/off, frequency dropdown (30min / 1h / 3h / 6h / 12h / 24h), native OS folder picker via `/api/browse-folder`, "Backup Now" button for immediate trigger, and status display showing last backup time, file size, and errors.
640
-
641
- ### Fixed — Session Isolation Leak Across Claude Code Skin Tabs
642
- - **Project/model/effort state leaked between sidepanel tabs** — The Claude Code skin sidepanel (`ui-claude-panel.js`) stored project, model, and effort toggle in global `storage` keys shared across all tabs/windows. When a user selected a different project in a new tab, the first tab's session would inherit the second tab's project path via the shared `cwd` key, causing Claude to execute tasks in the wrong project directory. Fixed by adding `project`, `model`, and `effort` as per-tab fields in the tab state object.
643
- - **`createTab()`** — Captures current dropdown values (`ddGetValue()`) into the new tab's `project`, `model`, `effort` fields at creation time
644
- - **`switchTab()`** — Restores project/model/effort dropdowns via `ddPopulate()` and `_setEffort()` when switching between tabs, ensuring each tab shows its own project context
645
- - **Change handlers** — Project, model, and effort `change`/`click` listeners now write to `activeTab()` and call `saveTabs()` in addition to global storage
646
- - **`saveTabs()` / `restoreTabs()`** — Serializes and restores `project`, `model`, `effort` per tab across page reloads
647
- - **Session history selection** — Clicking a past session now sets `tab.project` from the session's `cwd`, keeping tab state consistent
648
- - **Standalone chat page (`claude-chat.js`) leaked state between browser tabs** — The standalone `/claude-chat.html` page wrote project, model, and session ID to server-synced `storage`, meaning opening two browser tabs with different projects would clobber each other. Fixed by introducing a `tabStore` wrapper over browser `sessionStorage` (naturally tab-scoped). Falls back to server-synced `storage` for initial defaults on first load, then uses `sessionStorage` exclusively for all subsequent reads/writes.
649
-
650
- ### Fixed — Loop Cross-Session Leaking
651
- - **Loop driver and hook fallback scans ignored terminal ownership** — Three code paths in the loop system scanned all `data/loop/*.json` files without checking which terminal session owned each loop, causing a running loop to leak into unrelated Claude Code sessions when multiple sessions were active simultaneously.
652
- - **`attachLoopDriver()` in `server.js`** — The 2-second polling scan picked up any loop with `awaitingNext=true` regardless of `terminalSessionId`, then sent `/clear` and iteration messages to the wrong terminal's PTY. Fixed by adding `loopState.terminalSessionId !== terminalSessionId` guard before driving.
653
- - **`prompt-submit.mjs` pending claim (line 509)** — After renaming a pending loop file to the Claude session ID, the hook deleted `state.terminalSessionId` — destroying the ownership marker that the loop driver needs for scoping. Fixed by preserving the field.
654
- - **`prompt-submit.mjs` fallback scan (lines 543-567)** — After `/clear` changed the Claude session ID, this scan found any active loop and renamed (stole) it to the new session ID, transferring ownership. Fixed by removing the `renameSync` — the fallback now reads the loop state without claiming it.
655
-
656
- ## 2026-03-17
657
-
658
- ### Fixed — Loop Pending-Claim Failure
659
- - **Server-side pending claim** — `attachLoopDriver` now scans for `pending-*.json` files matching its terminal session and writes the `[SynaBun Loop] Begin task.` message directly via `session.pty.write()` when the `>` prompt is detected, bypassing the unreliable client-side `_sendOnceReady` which silently fails when the WebSocket is closed
660
- - **Stale pending cleanup** — `cleanupStaleLoops` in `shared.mjs` now deletes `pending-*.json` files older than `maxMinutes + 5` minutes instead of ignoring them
661
-
662
- ### Fixed — Loop History Accumulation Breaking State
663
- - **Delete on end/stop** — Loop JSON files are now deleted immediately when a loop finishes (iteration cap, time cap), is force-stopped (API or duplicate launch), or fails (consecutive prompt detection failures) — previously they were marked inactive and lingered in `data/loop/`
664
- - **Stale loops deleted immediately** — `cleanupStaleLoops` now deletes stale and inactive loop files on sight instead of deactivating them or waiting 24 hours
665
- - **History endpoints gutted** — `GET /api/loop/history` returns `[]`, `DELETE /api/loop/history/:id` is a no-op — no loop logging, only actively running loops exist as files
52
+ ## ⚙️ Changed
53
+
54
+ - **Plain semantic versioning** — 2.0.0 replaces the date-style versions on npm and on GitHub. The update check treats every date-style release as older than any 2.x release.
55
+ - **The Assistant and its workers look at pages only through the SynaBun browser** — Public pages and `localhost` alike; ad-hoc Playwright, Puppeteer or headless browsers started from a shell are refused outside a project's own test suite.
56
+ - **Hide all toolbars** — The top-right chevron now hides every toolbar, with a rebindable shortcut.
57
+ - **Onboarding installs the rules** — Step 6 of the setup wizard is **Install SynaBun Rules**: **Install for all**, or **Install**, **Update** or **Replace** per tool, with the file each tool reads. Copying by hand remains only where SynaBun cannot write (Cursor's User Rules and the optional coexistence snippet), under **Manual setup**.
58
+ - **Style Guide panel** — The header has a close button and wraps in a narrow panel, and each section is labelled for screen readers.
59
+ - **Dependencies** — `@anthropic-ai/claude-agent-sdk` 0.3.258 → 0.3.288, `@openai/codex-sdk` 0.121 → 0.160, `@opencode-ai/sdk` 1.14 → 1.18.34 (pinned); `@xterm/headless` and `@xterm/addon-serialize` are new.
60
+ - **Removed** — The legacy OpenCode sidepanel, the standalone Claude chat page, the 3D graphics presets, and `CLAUDE-template.md` (replaced by the installed rulesets).
61
+
62
+ ---
63
+
64
+ # SynaBun v.2026.09.05
65
+
66
+ A Claude Code model release: the model picker stops quietly serving a stale built-in list, sidepanel sessions run the model the picker actually offered, and Fable 5.1 is priced correctly.
67
+
68
+ ## 🛠 Fixed
69
+
70
+ - **The Claude model picker silently served a static fallback list** — Model discovery spawns the Claude Code CLI to read its live model table, and that spawn goes through a shell whenever the resolved binary is a bare command name rather than a full path. A shell concatenates its arguments instead of passing them through, so the empty string in `--setting-sources ''` vanished, the CLI exited with `option '--setting-sources <sources>' argument missing`, and discovery came back empty. The flag is now a single `--setting-sources=` token, which survives both spawn paths. The failure was invisible by design: an empty result falls back to a four-entry list of unversioned aliases with no Fable entry at all, so the picker looked merely out of date rather than broken.
71
+ - **Discovery missed a Claude CLI installed outside the login shell's `PATH`** — SynaBun is routinely started from Finder or launchd with a minimal environment, where a CLI in `~/.local/bin`, Homebrew, Bun, or an npm global prefix is invisible. The same `PATH` augmentation the rest of the server already used is now applied to the model-discovery and version probes, so those installations are found.
72
+ - **The sidepanel offered Fable 5.1 but ran Fable 5** — The picker reads the CLI you have installed, while sidepanel chats run the CLI bundled inside `@anthropic-ai/claude-agent-sdk`. The two had drifted apart, and the older bundle's model table knows only `claude-fable-5` — so choosing Fable 5.1, or the `fable`/`best` aliases, quietly launched Fable 5 with no symptom beyond the model naming a different version of itself. The SDK is bumped `0.3.220` → `0.3.258` to close the gap. The guard test that exists to catch exactly this had been passing vacuously, because it probed for a CLI under the un-augmented `PATH` and skipped whenever it could not find one; it now runs on the machines it was written to protect.
73
+ - **Fable 5.1 sessions reported the wrong cost** — With no pricing row of its own, `claude-fable-5-1` fell through to the Sonnet fallback and understated input and output by roughly 3.3x. It now carries its own rates, which are deliberately not a copy of the Fable 5 row: same input and output pricing, cheaper cache reads.
74
+
75
+ ---
76
+
77
+ # SynaBun v.2026.09.01
78
+
79
+ A Codex and memory-hooks release: Codex sidepanels no longer strand `already has an active writer` errors across tab switches, thread history moves off Codex's deprecated hydration path, and the Claude Code memory hooks stop re-issuing a block they were never able to clear.
80
+
81
+ ## 🛠 Fixed
82
+
83
+ - **The "Unstored file edits" block never cleared** — A `remember` call without a `category` reset nothing, because the entire pending-remember reset was gated behind a branch that Claude Code rarely reaches: it routinely sends `remember` with `{ content }` alone. The flag was never cleared, so the Stop hook re-issued the identical block on every turn for the rest of the session — confirmed against a real session flag showing `rememberCount: 0` after four successful `remember` calls. The reset is now unconditional for any successful `remember` or `reflect`. Failure detection fails open by design: only an explicit `isError` / `success: false` / `status: "error"` counts as a failure, so a future payload change cannot silently reintroduce a block that never clears. A new `MAX_TASK_BLOCKS` session ceiling bounds the worst case.
84
+ - **Edit nudges never reached the model** — Every PostToolUse nudge was written as a bare top-level `{ additionalContext }`, but PostToolUse only reads `hookSpecificOutput: { hookEventName, additionalContext }`. The output was valid JSON, so it failed silently rather than erroring, and no "N file edits — remember to store this work" message was ever delivered. Fixed in `post-remember.mjs`, and in the five emission sites in `post-plan.mjs` that had the same bug — all now routed through one shared helper.
85
+ - **`reflect` was excluded by the hook matcher** — `post-remember.mjs` already handled `reflect`, but the registered PostToolUse matcher ended at `remember`, making that code unreachable: `reflect` calls never reached the hook. The matcher now covers both, anchored so it still never fires for `recall`, `memories`, or `forget`, and matches both Claude Code's `mcp__SynaBun__remember` and OpenCode's `SynaBun_remember` spelling.
86
+ - **Every hook invocation stalled about two seconds** — `readStdin()` resolved promptly, but its 2000 ms fallback timer stayed pending afterwards and held the event loop open, so each hook lingered for the full timeout before exiting — measured at 2.05 s against a configured 3 s hook timeout. Clearing and unref-ing the guard brings it to 0.02 s across every hook.
87
+ - **Memories were filed under the wrong project** — The MCP server read `claude-code-projects.json` from a data directory that has never existed, so registered project labels were silently ignored and every project fell back to a raw directory basename — `/Apps/MyShop` was stored as `myshop` rather than the registered label `shop`. Over the HTTP transport `process.cwd()` is the Neural Interface's own directory, which labeled every HTTP-sourced memory `neural-interface` regardless of the caller; that case now resolves to `global`, a recoverable mislabel rather than one indistinguishable from a real project.
88
+ - **Codex sidepanels stranded "already has an active writer"** — A tab's intentional socket close was invisible to the server, so it orphaned an idle Codex app-server for the full 30-minute grace period and the next `thread/resume` collided with SynaBun's own abandoned writer. Ownership is now handed back through a release handshake before the socket closes, retirement waits for observed process exit rather than a kill flag, and only connections with genuinely reattachable work — active turns, pending approvals, in-flight RPCs — keep the grace period. Rapid tab switching can no longer strand or resurrect a hidden writer, and a genuinely external writer still reports an actionable error instead of requiring a restart.
89
+ - **Codex thread history rode a deprecated hydration path** — Full history was requested through `thread/read` and `thread/resume`. SynaBun now rebuilds the same client shape by paging `thread/turns/list` and `thread/items/list` in chronological order, and falls back to paginated turns with `itemsView: "full"` when a store reports that item pagination is unsupported. Repeated cursors, invalid pages, duplicate ids, and items with no matching turn are rejected before they can loop or poison a transcript; timeouts and unrelated protocol failures still surface rather than being misread as compatibility gaps.
90
+ - **The Codex Resume dropdown blocked on a full account scan** — It now serves from the cached session catalog when rows exist and refreshes in the background, falling back to a full multi-account walk only when the cache is cold; the same cached catalog backs Codex search metadata. Windows path matching resolves with `path.win32` and compares case-insensitively, so drive-letter case and slash direction no longer drop valid sessions from project grouping. Cache warmup also starts earlier at boot, so the dropdown is usually warm by the time it is opened.
91
+ - **Agent-selected MCP profiles did not expose their tools** — Profile state was module-global even though the HTTP transport hosts multiple stateful MCP sessions in one process, so a profile switch could mutate the most recently registered server instead of the caller's. Each stdio process and HTTP client session now owns an isolated profile runtime. The `tools/list_changed` notification is also no longer emitted synchronously from inside `profile set` — where OpenCode could abort or discard the in-flight roundtrip — but delayed and coalesced until after the tool result returns, so newly enabled tools are usable within the same agent turn.
92
+ - **Codex could not call newly enabled tools mid-turn** — Codex snapshots deferred MCP tools when a turn starts, so a successful refresh updated the app-server inventory without making anything callable by the running agent. Canonical Codex registrations now start SynaBun with the full deferred catalog, while per-sidepanel and automation profiles remain isolated focus selections. Profile changes no longer trigger a global `config/mcpServer/reload` that restarted unrelated MCP servers and reported success before startup had finished, and repeating a valid `profile.set` now re-reports the runtime and emits a fresh notification so a strictly profiled host can heal a stale catalog.
93
+
94
+ ## ⚙️ Changed
95
+
96
+ - **`remember` now requires `category` and `project`** — Both were declared optional in the tool schema, and the `category` description merely noted that "if omitted, a project default is used." Hosts took the hint and sent `{ content }` alone — which is exactly what left the Stop hook blocked. A JSON Schema `required` entry is enforcement; a description is advice, and the advice was already being ignored. `importance` stays optional, since nothing downstream depends on it. Category names that are present but misspelled are still remapped rather than lost.
97
+ - **The memory ruleset now states this accurately** — The shipped `CLAUDE.md` template claimed no recall-and-reflect was needed afterwards, without mentioning that omitting `category` misfiles the memory and leaves the stop hook blocked. Corrected across all six template sites, the README, and the `/synabun` skill modules. The ruleset version is now `1.2.0`, so existing installs are offered the update.
98
+ - **Installed hook matchers repair themselves at startup** — A matcher change previously reached fresh installs but left every existing `.claude/settings.json` on the old value indefinitely, because the startup sweep compared only the command string and short-circuited. It now compares the matcher too, counts repairs, reports them on the startup `Hooks:` line, and is idempotent — so a stale matcher cannot keep a hook unreachable across upgrades.
99
+
100
+ ---
101
+
102
+ # SynaBun v.2026.07.34
103
+
104
+ A reliability release: the Claude sidepanel no longer dies with a misleading "does not match this system's libc" error, and every bundled native binary is checked and repaired at startup.
105
+
106
+ ## 🛠 Fixed
107
+
108
+ - **"Native binary exists but failed to launch"** — The Claude sidepanel could fail every turn with *"Claude Code native binary at `…/claude` exists but failed to launch. This usually means the binary does not match this system's libc…"*. On macOS and Windows that explanation is never right: the real cause is almost always a missing execute bit. npm does not preserve the execute bit for files a package ships without a `bin` entry, which is exactly how the Claude Agent SDK and Codex deliver their native payloads, so a perfectly good binary can land as mode `0644` and fail to spawn. SynaBun now stats the binary the SDK is about to launch, restores the execute bit when it is missing, and retries — and when it cannot repair it, it says what is actually wrong: a permission problem on macOS and Linux, Gatekeeper quarantine (with the `xattr -d com.apple.quarantine` command) on macOS, a genuine libc mismatch only on Linux, and an unlaunchable `.cmd`/`.bat`/`.ps1` shim on Windows.
109
+ - **Only the current machine's binaries were repaired** — The startup repair looked at one directory, `prebuilds/<your platform>-<your arch>`, so a checkout carrying several platform builds left the others broken — including `darwin-x64`, which is what an Intel Mac needs for terminals. Startup and postinstall now sweep every vendored binary that is present (Claude Agent SDK, Codex, `node-pty`) by walking the tree instead of consulting a hardcoded list, so new platform directories are covered automatically.
110
+ - **The postinstall repair had stopped doing anything** — `scripts/rebuild-pty.js` was still fixing permissions on `node_modules/.bin/claude` and `@anthropic-ai/claude-code/cli.js`, neither of which has existed since that package was replaced by the Agent SDK. Its prebuild list named Linux directories that are not shipped while missing ones that are. It now runs the shared sweep, and runs it *before* the "node-pty not found, skipping" guard — previously an install without node-pty skipped the Claude and Codex repair entirely.
111
+ - **A `.cjs` executable override was launched the wrong way** — A custom Claude executable ending in `.cjs` was treated as a script to run through Node, but the SDK spawns it directly, so it needed the execute bit and did not get it.
112
+
113
+ ## ✨ New
114
+
115
+ - **Runtime notices in the Claude sidepanel** — A new amber notice sits between grey status text and a red fatal error: something went wrong, was worked around, and the session is continuing in a degraded state. You will see it when the bundled binary is repaired and retried, and when a session falls back to your globally installed Claude CLI. It appears in both the sidepanel and the standalone chat page.
116
+ - **Fallback to your installed Claude CLI** — If the bundled runtime cannot be launched or repaired, sessions and unattended automation loops now fall back to the Claude CLI you have installed rather than failing the turn. Because model aliases and effort levels resolve per-binary, a version difference between your CLI and the bundled runtime is reported alongside the fallback instead of silently changing which model runs.
117
+
118
+ ## ⚙️ Changed
119
+
120
+ - **A custom Claude executable path is now validated before use** — The `claude-skin` → `sdkExecutable` override was passed straight through to the SDK, which uses it verbatim with no checks of its own. It is now vetted first, and a bare command name such as `claude` is rejected with an explanation: the SDK spawns without a shell and cannot resolve a name from `PATH`, so handing one over produces a worse and more confusing failure than the one being recovered from. Overrides may be either a script entrypoint or a native binary path, and the same rule now applies to automation loops, which previously accepted anything.
121
+
122
+ ---
123
+
124
+ # SynaBun v.2026.07.33
125
+
126
+ A Windows release: Codex schedules and sidepanels now find a globally installed Codex runtime instead of failing at launch.
127
+
128
+ ## 🛠 Fixed
129
+
130
+ - **Codex could not be found on Windows even with the global CLI installed** — SynaBun located the Codex runtime by looking it up on the inherited `PATH`, and the PATH it built for that lookup only added POSIX directories (`~/.local/bin`, `/usr/local/bin`, `~/.npm-global/bin`) that do not exist on Windows. Started from anywhere whose environment did not already carry the npm global bin — a shortcut, a service, a fresh terminal after an install — Codex was invisible and every Codex schedule failed. Discovery no longer depends on `PATH` at all: `@openai/codex` is now located under `npm root -g`, `%APPDATA%\npm\node_modules`, an `npm_config_prefix` override, the `node_modules` directory that contains SynaBun itself, and Node's own install directory. The Windows PATH augmentation also picks up `%APPDATA%\npm`, the configured npm prefix, and Node's directory, deduplicated, so the shell-aware launch paths improve too.
131
+ - **The native Codex executable was missed under current npm layouts** — The resolver looked in exactly one place, `vendor/<target>/codex/codex.exe` inside the platform package resolved through `require.resolve`. Current Codex releases ship the executable at `vendor/<target>/bin/`, and depending on the npm version the platform package sits either beside `@openai/codex` or nested inside its own `node_modules` — and package `exports` can block the resolve entirely. Both vendor layouts and all three package locations are now checked directly, so hoisting differences no longer read as "Codex is not installed".
132
+ - **Windows launched npm's shell shim instead of the real launcher** — `npm install -g` writes both an extensionless `codex` sh shim and a `codex.cmd`, and `where codex` lists the shim first, which Windows cannot spawn. The sidepanel launch path now prefers a `.cmd`, `.exe`, `.bat`, or `.ps1` launcher and keeps the first result only as a fallback for non-npm installations.
133
+
134
+ ## ⚙️ Improved
135
+
136
+ - **A missing Codex runtime says which problem it is** — The failure notice now distinguishes "the global Codex package is installed but its Windows runtime is missing" from "Codex is not installed globally", and both point at `npm install -g @openai/codex@latest --include=optional`. The platform executable ships as an optional dependency, so an install that skipped optional packages leaves a Codex that looks present and cannot run. Successful resolution logs which layout it came from, and failures log the candidate paths that were checked.
137
+
138
+ ---
139
+
140
+ # SynaBun v.2026.07.32
141
+
142
+ A follow-up to 2026.07.31 that makes updating fast again on a large data home.
143
+
144
+ ## 🛠 Fixed
145
+
146
+ - **Updating took several minutes on a large data home** — Before a new version starts, SynaBun snapshots your data home so the update can be rolled back. That snapshot archived *everything*, so a multi-GB data home spent minutes compressing during `npm install` — one report was 9,470 files and 3,832 MB. An upgrade snapshot only needs to protect state: it never rewrites your generated images, audio, or video, and those survive a rollback on disk regardless. Upgrade snapshots now skip generated media, and if what remains is still over ~1 GB they fall back to irreplaceable state only — your `.env`, everything under `mcp-data/`, and any `.db`, `.sqlite`, or `.json`. Compression on the blocking path drops to the fastest level, since what is left is SQLite and JSON that still shrink well. The snapshot reports what it skipped and why, and its manifest records whether it is `state-only` or `complete` so a restore can never mistake one for the other. Scheduled and manual backups are unchanged and still capture everything.
147
+
148
+ ---
149
+
150
+ # SynaBun v.2026.07.30
151
+
152
+ A point release on top of 2026.07.20, focused on correct Claude Code model selection, a new project storage cleanup tool, and a stricter default browser policy.
153
+
154
+ ## ✨ New
155
+
156
+ - **Live Claude Code model discovery** — The model list is now read from the installed Claude Code CLI at runtime rather than from two hand-maintained lists that had drifted out of date. Adds `GET /api/claude/models`, and `/api/claude/config` now reports a `modelsSource`. Every picker is covered: sidepanel, standalone chat, Automation Studio, Schedules Studio, and the resume/provider picker. Discovery falls back to a small static list when the CLI cannot be reached.
157
+ - **Project storage cleanup** — A new Projects area in Settings measures and clears build, test, cache, and dependency directories across macOS, Windows, and Linux, backed by admin-only `GET`/`POST /api/settings/project-storage` endpoints. Git-tracked files, nested repositories, SynaBun's own runtime dependencies, incomplete scans, and broad cache roots all fail closed, and cleanup revalidates the complete selection before deleting anything.
158
+ - **`xhigh` thinking is reachable** — The CLI has advertised `low/medium/high/xhigh/max` for some time, but `xhigh` was being filtered out at six spawn sites, including the engine the sidepanel actually uses. All six now share one effort list, and models that advertise no effort levels disable the toggle instead of passing a flag the CLI ignores.
159
+
160
+ ## 🛠 Fixed
161
+
162
+ - **First launch after an update could look frozen** — The pre-update snapshot protects your data home before a new version starts, but it ran silently, so on a large data home there was nothing on screen for long enough that the upgrade looked hung and got killed — and an interrupted run left a partial archive behind that nothing reclaimed. The snapshot now reports its collect, checksum, archive, and verify phases with file counts and sizes; skips `data/youtube-downloads`, a re-downloadable cache rather than user state; stores already-compressed payloads instead of spending full CPU deflating video and images for no gain; and reclaims temporary files orphaned by an interrupted run. On a 1.8 GB data home this took the snapshot from 17.8s and 543 MB to 9.7s and 172 MB.
163
+ - **Sidepanel launched Opus 4.8 when Opus 5 was picked** — The model picker read its list from the standalone Claude Code CLI, while sidepanel chats ran on the Agent SDK's own bundled CLI. Both accept the same alias selectors and each resolved them against its own model table, so the picker could show one model while the session launched another. `@anthropic-ai/claude-agent-sdk` moves `0.3.174` → `0.3.220` so both sides resolve identically, and a version skew between the two is now reported instead of passing silently. Takes effect after a server restart, not just an install.
164
+ - **Claude model pricing** — Corrected against published list prices. Opus 5 was missing from the table entirely and fell through to a Sonnet fallback, while the Opus and Fable rows were inflated roughly 3x. Displayed cost for past Opus and Fable sessions drops accordingly and now tracks what was actually billed.
165
+ - **Coexistence ruleset preview included neighbouring sections** — The extraction boundary matched an LF-only marker that was absent from the template's CRLF section, so the preview could return the condensed rulesets alongside the requested coexistence rules. It now stops at a stable heading.
166
+ - **Duplicate OpenCode model names in schedule selectors** — Group launch-override and Cron schedule editors now render provider-aware `Model — Service` labels while preserving the stored selector value.
167
+
168
+ ## ⚙️ Changed
169
+
170
+ - **The SynaBun browser is the default public-web path** — Public-web browsing, search, and page retrieval now go through the configured SynaBun browser. Other web tools require an explicit request, and agent-facing Playwright and Chrome DevTools default to localhost and loopback testing. Unavailable browser access is reported rather than silently substituted. All five provider rulesets move `1.0.0` → `1.1.0`, so existing users are notified to refresh their defaults.
171
+
172
+ ---
173
+
174
+ # SynaBun v.2026.07.20
175
+
176
+ Two months of work focused on native agent workflows, safer concurrent automation, broader browser tooling, and a much more resilient Neural Interface.
177
+
178
+ ## ✨ New
179
+
180
+ - **Native automation sidepanels** — Claude Code, Codex, and OpenCode loops and schedules now run in their native SynaBun sidepanels instead of terminal PTYs, with faster launches, background execution, and correct focus for manual runs.
181
+ - **Claude Code Agent SDK engine** — The Claude sidepanel now delivers full CLI-style sessions with tool calls, permissions, plan review, multiple tabs, account-safe ownership, and restored-session support.
182
+ - **Bluesky MCP tools** — A new 15-tool AT Protocol suite covers feeds, search, profiles, threads, notifications, DMs, posting, images, engagement, and moderation through the logged-in `bsky.app` session.
183
+ - **MoreLogin browser support** — MoreLogin anti-detect profiles are now a first-class browser backend, with profile management in Settings and an MCP action tool for status, creation, start, stop, and default-profile selection.
184
+ - **Reference-based browser snapshots** — AI browser sessions can work from compact element references instead of repeatedly consuming full page snapshots, cutting tokens while keeping interactions deterministic.
185
+ - **Session-scoped MCP profiles** — Codex tabs, OpenCode sessions, loops, and schedules can own isolated tool profiles that switch in place without changing another runtime or the default for future sessions.
186
+ - **Codex workflow upgrades** — Added project-aware `@` file mentions, multi-account switching and resume, inline plan refinement, persistent MCP approvals, interactive SynaBun choices, live model metadata, and dynamic reasoning controls.
187
+ - **Stronger scheduling controls** — Added queue visibility, cross-group mutual exclusion, group-level launch overrides, per-launch OpenAI accounts, and shared runtime options across Automation Studio and Schedules Studio.
188
+ - **Current Claude model lineup** — Added selectable 1M-context variants across launchers, Claude Sonnet 5, Fable 5, and Opus 4.8, while keeping legacy saved selections compatible.
189
+
190
+ ## 🛠 Fixed
191
+
192
+ - **Cross-session isolation** — Codex and OpenCode events, transcripts, child agents, approvals, tabs, projects, and accounts no longer leak into unrelated sidepanels or resumed sessions.
193
+ - **Concurrent browser automation** — Server-authoritative tab ownership now keeps loops, schedules, agents, and interactive sessions on dedicated tabs; recovery repairs wedged pages without stealing or destroying another automation’s work.
194
+ - **Schedule reliability** — Run Now launches no longer queue silently, missed jobs recover after macOS clamshell sleep, automatic runs stay in the background, and startup failures are persisted and shown instead of disappearing.
195
+ - **Agent interaction deadlocks** — Fixed permission stalls, premature prompt rejection, broken plan-approval actions, missing tool results, and loop hangs after transient API or socket errors across Claude, Codex, and OpenCode.
196
+ - **Codex resume and MCP recovery** — Resumable sessions are discovered across every configured account, stale entries are filtered out, MCP startup errors stay contained, and authentication can be completed directly from the failure notice.
197
+ - **Crash and corruption paths** — Fixed Playwright lifecycle crashes, graph-link heap exhaustion, `onnxruntime-node` shutdown failures, frozen supervised logs, and backup replacement errors in macOS-protected folders.
198
+ - **Sidepanel usability** — Streaming transcripts respect manual scrolling, scrollbars are easier to grab, project menus stay above terminals, and plan or permission cards no longer duplicate or become unresponsive.
199
+
200
+ ## ⚙️ Improved
201
+
202
+ - **Safer application data** — Mutable state now lives outside the Git checkout by default, with verified migration, conflict detection, `synabun doctor`, rotating checksum-verified backups, recovery tooling, and automatic MCP client path repair.
203
+ - **Neural Interface performance** — Memory Explorer virtualization, faster file-tree scanning, shared debounce/throttle utilities, idle render-loop pausing, cheaper graph interactions, reduced screencast work, and lower-cost terminal rendering improve large projects and long sessions.
204
+ - **Browser lifecycle diagnostics** — MoreLogin/CDP teardown, pinned-tab recovery, co-ownership, route validation, and failure reporting now fail closed and expose clearer recovery state.
205
+ - **Automation throughput** — Leaner iteration delays, reusable Facebook composer-state probing, full-content memory fetch by ID, and more efficient browser typing/snapshot guidance reduce repeated work and token use.
206
+ - **Accessible UI polish** — Added global reduced-motion support, refined navigation styling, responsive permissions layouts, and smoother window dragging, resizing, tooltips, and detail cards.
207
+
208
+ Detailed technical notes: [v.2026.07.20-RAW.md](changelog/v.2026.07.20-RAW.md)