synabun 2.4.0 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +1 -1
  3. package/browser-extension/content.js +73 -11
  4. package/browser-extension/engine.js +196 -15
  5. package/browser-extension/manifest.json +4 -2
  6. package/browser-extension/popup-strings.js +10 -4
  7. package/browser-extension/popup-view.js +1 -1
  8. package/browser-extension/popup.css +1 -0
  9. package/browser-extension/popup.html +4 -1
  10. package/browser-extension/popup.js +22 -10
  11. package/browser-extension/protocol.js +102 -11
  12. package/browser-extension/service-worker.js +20 -4
  13. package/browser-extension/tokens.css +1 -1
  14. package/docs/browser-extension-bridge.md +25 -5
  15. package/lib/data-home-files.js +47 -0
  16. package/lib/data-home-migration.js +34 -58
  17. package/lib/first-launch-protection.js +8 -2
  18. package/lib/update-snapshot.js +11 -4
  19. package/mcp-server/dist/http.d.ts.map +1 -1
  20. package/mcp-server/dist/http.js +25 -2
  21. package/mcp-server/dist/http.js.map +1 -1
  22. package/mcp-server/dist/index.d.ts.map +1 -1
  23. package/mcp-server/dist/index.js +62 -17
  24. package/mcp-server/dist/index.js.map +1 -1
  25. package/mcp-server/dist/services/browser-bench.d.ts +22 -22
  26. package/mcp-server/dist/services/memory-maintenance.d.ts +1 -0
  27. package/mcp-server/dist/services/memory-maintenance.d.ts.map +1 -1
  28. package/mcp-server/dist/services/memory-maintenance.js +34 -45
  29. package/mcp-server/dist/services/memory-maintenance.js.map +1 -1
  30. package/mcp-server/dist/services/memory-migration-copy.d.ts +144 -0
  31. package/mcp-server/dist/services/memory-migration-copy.d.ts.map +1 -0
  32. package/mcp-server/dist/services/memory-migration-copy.js +467 -0
  33. package/mcp-server/dist/services/memory-migration-copy.js.map +1 -0
  34. package/mcp-server/dist/services/memory-migration-worker.d.ts +2 -0
  35. package/mcp-server/dist/services/memory-migration-worker.d.ts.map +1 -0
  36. package/mcp-server/dist/services/memory-migration-worker.js +60 -0
  37. package/mcp-server/dist/services/memory-migration-worker.js.map +1 -0
  38. package/mcp-server/dist/services/memory-retrieval.d.ts +4 -0
  39. package/mcp-server/dist/services/memory-retrieval.d.ts.map +1 -1
  40. package/mcp-server/dist/services/memory-retrieval.js +188 -40
  41. package/mcp-server/dist/services/memory-retrieval.js.map +1 -1
  42. package/mcp-server/dist/services/memory-schema.d.ts +58 -2
  43. package/mcp-server/dist/services/memory-schema.d.ts.map +1 -1
  44. package/mcp-server/dist/services/memory-schema.js +190 -13
  45. package/mcp-server/dist/services/memory-schema.js.map +1 -1
  46. package/mcp-server/dist/services/memory-sessions.d.ts +19 -1
  47. package/mcp-server/dist/services/memory-sessions.d.ts.map +1 -1
  48. package/mcp-server/dist/services/memory-sessions.js +56 -20
  49. package/mcp-server/dist/services/memory-sessions.js.map +1 -1
  50. package/mcp-server/dist/services/memory-verification.d.ts.map +1 -1
  51. package/mcp-server/dist/services/memory-verification.js +8 -5
  52. package/mcp-server/dist/services/memory-verification.js.map +1 -1
  53. package/mcp-server/dist/services/neural-interface.d.ts +6 -0
  54. package/mcp-server/dist/services/neural-interface.d.ts.map +1 -1
  55. package/mcp-server/dist/services/neural-interface.js +19 -2
  56. package/mcp-server/dist/services/neural-interface.js.map +1 -1
  57. package/mcp-server/dist/services/retrieval-reader-worker.d.ts +2 -0
  58. package/mcp-server/dist/services/retrieval-reader-worker.d.ts.map +1 -0
  59. package/mcp-server/dist/services/retrieval-reader-worker.js +76 -0
  60. package/mcp-server/dist/services/retrieval-reader-worker.js.map +1 -0
  61. package/mcp-server/dist/services/retrieval-reader.d.ts +38 -0
  62. package/mcp-server/dist/services/retrieval-reader.d.ts.map +1 -0
  63. package/mcp-server/dist/services/retrieval-reader.js +145 -0
  64. package/mcp-server/dist/services/retrieval-reader.js.map +1 -0
  65. package/mcp-server/dist/services/sqlite-write.d.ts +14 -0
  66. package/mcp-server/dist/services/sqlite-write.d.ts.map +1 -0
  67. package/mcp-server/dist/services/sqlite-write.js +94 -0
  68. package/mcp-server/dist/services/sqlite-write.js.map +1 -0
  69. package/mcp-server/dist/services/sqlite.d.ts +39 -0
  70. package/mcp-server/dist/services/sqlite.d.ts.map +1 -1
  71. package/mcp-server/dist/services/sqlite.js +249 -8
  72. package/mcp-server/dist/services/sqlite.js.map +1 -1
  73. package/mcp-server/dist/services/tool-catalog.d.ts +1 -1
  74. package/mcp-server/dist/services/typesafe-config.d.ts +7 -1
  75. package/mcp-server/dist/services/typesafe-config.d.ts.map +1 -1
  76. package/mcp-server/dist/services/typesafe-config.js +32 -10
  77. package/mcp-server/dist/services/typesafe-config.js.map +1 -1
  78. package/mcp-server/dist/services/typesafe.d.ts.map +1 -1
  79. package/mcp-server/dist/services/typesafe.js +9 -7
  80. package/mcp-server/dist/services/typesafe.js.map +1 -1
  81. package/mcp-server/dist/services/vector-cache.d.ts +32 -0
  82. package/mcp-server/dist/services/vector-cache.d.ts.map +1 -1
  83. package/mcp-server/dist/services/vector-cache.js +161 -8
  84. package/mcp-server/dist/services/vector-cache.js.map +1 -1
  85. package/mcp-server/dist/tools/agent-definition.d.ts +2 -2
  86. package/mcp-server/dist/tools/agents.d.ts +13 -8
  87. package/mcp-server/dist/tools/agents.d.ts.map +1 -1
  88. package/mcp-server/dist/tools/agents.js +35 -15
  89. package/mcp-server/dist/tools/agents.js.map +1 -1
  90. package/mcp-server/dist/tools/browser-advanced.d.ts +1 -1
  91. package/mcp-server/dist/tools/browser-advanced.d.ts.map +1 -1
  92. package/mcp-server/dist/tools/browser-advanced.js +10 -3
  93. package/mcp-server/dist/tools/browser-advanced.js.map +1 -1
  94. package/mcp-server/dist/tools/browser-extension-setup.d.ts +5 -0
  95. package/mcp-server/dist/tools/browser-extension-setup.d.ts.map +1 -0
  96. package/mcp-server/dist/tools/browser-extension-setup.js +23 -0
  97. package/mcp-server/dist/tools/browser-extension-setup.js.map +1 -0
  98. package/mcp-server/dist/tools/browser-interact.d.ts.map +1 -1
  99. package/mcp-server/dist/tools/browser-interact.js +6 -1
  100. package/mcp-server/dist/tools/browser-interact.js.map +1 -1
  101. package/mcp-server/dist/tools/fb-groups.d.ts +2 -2
  102. package/mcp-server/dist/tools/skill-tools.d.ts +4 -4
  103. package/mcp-server/dist/tools/tool-groups.d.ts +1 -1
  104. package/mcp-server/package-lock.json +2 -2
  105. package/mcp-server/package.json +1 -1
  106. package/mcp-server/src/http.ts +20 -2
  107. package/mcp-server/src/index.ts +59 -17
  108. package/mcp-server/src/services/memory-maintenance.ts +31 -28
  109. package/mcp-server/src/services/memory-migration-copy.ts +419 -0
  110. package/mcp-server/src/services/memory-migration-worker.ts +55 -0
  111. package/mcp-server/src/services/memory-retrieval.ts +173 -32
  112. package/mcp-server/src/services/memory-schema.ts +194 -12
  113. package/mcp-server/src/services/memory-sessions.ts +54 -21
  114. package/mcp-server/src/services/memory-verification.ts +7 -4
  115. package/mcp-server/src/services/neural-interface.ts +23 -2
  116. package/mcp-server/src/services/retrieval-reader-worker.ts +67 -0
  117. package/mcp-server/src/services/retrieval-reader.ts +131 -0
  118. package/mcp-server/src/services/sqlite-write.ts +60 -0
  119. package/mcp-server/src/services/sqlite.ts +246 -8
  120. package/mcp-server/src/services/typesafe-config.ts +25 -6
  121. package/mcp-server/src/services/typesafe.ts +9 -7
  122. package/mcp-server/src/services/vector-cache.ts +154 -9
  123. package/mcp-server/src/tools/agents.ts +33 -14
  124. package/mcp-server/src/tools/browser-advanced.ts +10 -3
  125. package/mcp-server/src/tools/browser-extension-setup.ts +30 -0
  126. package/mcp-server/src/tools/browser-interact.ts +5 -1
  127. package/neural-interface/i18n/en.json +266 -2
  128. package/neural-interface/i18n/pt-BR.json +267 -3
  129. package/neural-interface/lib/agents/builtins.json +207 -0
  130. package/neural-interface/lib/agents/registry.js +60 -15
  131. package/neural-interface/lib/agents/resolve.js +69 -10
  132. package/neural-interface/lib/agents/split.js +32 -4
  133. package/neural-interface/lib/assistant-api.js +19 -8
  134. package/neural-interface/lib/assistant-brains/claude.js +2 -0
  135. package/neural-interface/lib/assistant-brains/opencode.js +60 -11
  136. package/neural-interface/lib/assistant-catalog.js +2 -2
  137. package/neural-interface/lib/assistant-config.js +0 -7
  138. package/neural-interface/lib/assistant-dispatch.js +384 -119
  139. package/neural-interface/lib/assistant-persona.js +17 -5
  140. package/neural-interface/lib/assistant-pricing.js +65 -14
  141. package/neural-interface/lib/assistant-router.js +181 -54
  142. package/neural-interface/lib/assistant-run-wait.js +45 -28
  143. package/neural-interface/lib/assistant-runtime.js +48 -34
  144. package/neural-interface/lib/backup-contents.js +158 -0
  145. package/neural-interface/lib/backup-crypto-io.js +330 -0
  146. package/neural-interface/lib/backup-crypto-worker.js +130 -0
  147. package/neural-interface/lib/backup-crypto.js +525 -0
  148. package/neural-interface/lib/backup-download.js +268 -0
  149. package/neural-interface/lib/backup-encryption.js +318 -0
  150. package/neural-interface/lib/backup-groups.js +287 -0
  151. package/neural-interface/lib/backup-restore-session.js +176 -0
  152. package/neural-interface/lib/backup-restore-stage.js +60 -0
  153. package/neural-interface/lib/backup-service.js +836 -322
  154. package/neural-interface/lib/backup-zip-reader.js +30 -18
  155. package/neural-interface/lib/backup-zip-writer.js +34 -10
  156. package/neural-interface/lib/browser-extension-adapter.js +109 -24
  157. package/neural-interface/lib/browser-extension-bridge.js +42 -8
  158. package/neural-interface/lib/claude-agent-bridge.js +1 -0
  159. package/neural-interface/lib/claude-session-cleanup.js +5 -1
  160. package/neural-interface/lib/cli-update-planner.js +105 -6
  161. package/neural-interface/lib/client-diagnostics.js +42 -0
  162. package/neural-interface/lib/confined-fs.js +7 -2
  163. package/neural-interface/lib/coordination/README.md +8 -2
  164. package/neural-interface/lib/coordination/contract.js +161 -0
  165. package/neural-interface/lib/coordination/database.js +999 -0
  166. package/neural-interface/lib/coordination/operations.js +436 -0
  167. package/neural-interface/lib/coordination/service.js +68 -537
  168. package/neural-interface/lib/coordination/storage-worker.js +101 -0
  169. package/neural-interface/lib/coordination/store.js +219 -1111
  170. package/neural-interface/lib/db.js +70 -32
  171. package/neural-interface/lib/health-count.js +37 -0
  172. package/neural-interface/lib/loop-stall.js +139 -0
  173. package/neural-interface/lib/maritaca/client.js +2 -2
  174. package/neural-interface/lib/maritaca/models.js +12 -17
  175. package/neural-interface/lib/maritaca/opencode.js +4 -2
  176. package/neural-interface/lib/memory-api.js +9 -1
  177. package/neural-interface/lib/memory-session-capture.js +42 -10
  178. package/neural-interface/lib/memory-store-gate.js +313 -0
  179. package/neural-interface/lib/memory-store-migrate.js +65 -0
  180. package/neural-interface/lib/memory-timers.js +7 -7
  181. package/neural-interface/lib/native-loop-providers.js +13 -16
  182. package/neural-interface/lib/native-loop-runtime.js +34 -14
  183. package/neural-interface/lib/opencode-build-preflight.js +30 -8
  184. package/neural-interface/lib/opencode-native-boundary.js +69 -8
  185. package/neural-interface/lib/opencode-provider-view.js +14 -3
  186. package/neural-interface/lib/opencode-v2-ws-requests.js +31 -1
  187. package/neural-interface/lib/opencode2-client.js +2 -1
  188. package/neural-interface/lib/peer-identity.js +13 -8
  189. package/neural-interface/lib/recall-impact.js +122 -0
  190. package/neural-interface/lib/scratch-evidence.js +420 -0
  191. package/neural-interface/lib/scratch-process-guard.js +139 -0
  192. package/neural-interface/lib/scratch-references.js +279 -0
  193. package/neural-interface/lib/scratch-retention-core.js +385 -0
  194. package/neural-interface/lib/scratch-retention-worker.js +37 -0
  195. package/neural-interface/lib/scratch-retention.js +151 -0
  196. package/neural-interface/lib/session-cache-builder.js +70 -44
  197. package/neural-interface/lib/session-cache-worker.js +157 -0
  198. package/neural-interface/lib/session-indexer.js +28 -21
  199. package/neural-interface/lib/session-search-index.js +85 -0
  200. package/neural-interface/lib/skills/creation.js +1 -1
  201. package/neural-interface/lib/sqlite-integrity-worker.js +3 -1
  202. package/neural-interface/lib/style-guide/store.js +43 -3
  203. package/neural-interface/lib/system-restore.js +50 -0
  204. package/neural-interface/lib/teams/api.js +15 -6
  205. package/neural-interface/lib/teams/claims.js +67 -31
  206. package/neural-interface/lib/teams/index.js +7 -7
  207. package/neural-interface/lib/teams/integration.js +40 -40
  208. package/neural-interface/lib/teams/landing.js +6 -6
  209. package/neural-interface/lib/teams/recovery.js +24 -23
  210. package/neural-interface/lib/teams/scheduler.js +196 -97
  211. package/neural-interface/lib/teams/schema.js +1 -1
  212. package/neural-interface/lib/teams/state.js +14 -14
  213. package/neural-interface/lib/teams/worktrees.js +27 -27
  214. package/neural-interface/lib/whatsapp/bridge.js +2 -1
  215. package/neural-interface/lib/worker-confinement.js +47 -2
  216. package/neural-interface/lib/worker-mcp-channel.js +2 -0
  217. package/neural-interface/lib/worker-resume.js +5 -0
  218. package/neural-interface/lib/worker-stop.js +86 -0
  219. package/neural-interface/package-lock.json +2 -2
  220. package/neural-interface/package.json +1 -1
  221. package/neural-interface/public/index.html +260 -0
  222. package/neural-interface/public/offline.html +4 -3
  223. package/neural-interface/public/onboarding.html +259 -34
  224. package/neural-interface/public/shared/agents/studio/ax-agent-view.js +2 -2
  225. package/neural-interface/public/shared/agents/studio/ax-editor-view.js +1 -1
  226. package/neural-interface/public/shared/agents/studio/ax-library.js +0 -6
  227. package/neural-interface/public/shared/agents/studio/ax-main.js +14 -7
  228. package/neural-interface/public/shared/agents/studio/ax-ui.js +2 -2
  229. package/neural-interface/public/shared/agy/agy-options.js +11 -0
  230. package/neural-interface/public/shared/agy/agy-panel.js +29 -10
  231. package/neural-interface/public/shared/agy/agy-styles.js +14 -12
  232. package/neural-interface/public/shared/agy/agy-tabs-logic.js +4 -1
  233. package/neural-interface/public/shared/api.js +3 -2
  234. package/neural-interface/public/shared/assistant/asst-api.js +3 -3
  235. package/neural-interface/public/shared/assistant/asst-brain-picker.js +13 -6
  236. package/neural-interface/public/shared/assistant/asst-control.js +2 -0
  237. package/neural-interface/public/shared/assistant/asst-motion-gate.js +78 -4
  238. package/neural-interface/public/shared/assistant/asst-panel.js +18 -2
  239. package/neural-interface/public/shared/assistant/asst-rack-styles.js +4 -0
  240. package/neural-interface/public/shared/assistant/asst-render.js +106 -38
  241. package/neural-interface/public/shared/assistant/asst-route.js +102 -21
  242. package/neural-interface/public/shared/assistant/asst-routes-editor.js +1 -1
  243. package/neural-interface/public/shared/assistant/asst-sidepanel.js +4 -2
  244. package/neural-interface/public/shared/assistant/asst-state.js +11 -0
  245. package/neural-interface/public/shared/assistant/asst-styles.js +10 -23
  246. package/neural-interface/public/shared/assistant/route-identity.js +2 -1
  247. package/neural-interface/public/shared/cc-dropdown.js +21 -15
  248. package/neural-interface/public/shared/cdx/cdx-render.js +9 -0
  249. package/neural-interface/public/shared/cdx/cdx-settings.js +3 -1
  250. package/neural-interface/public/shared/cdx/cdx-styles.js +6 -0
  251. package/neural-interface/public/shared/cdx/cdx-tabs.js +29 -9
  252. package/neural-interface/public/shared/client-diagnostics.js +94 -0
  253. package/neural-interface/public/shared/cp/cp-markdown.js +7 -2
  254. package/neural-interface/public/shared/cp/cp-styles.js +1 -1
  255. package/neural-interface/public/shared/effort-i18n.js +118 -0
  256. package/neural-interface/public/shared/html-shell.js +4 -51
  257. package/neural-interface/public/shared/loading-diagnostic-entry.js +64 -0
  258. package/neural-interface/public/shared/memory-store-wait.js +52 -0
  259. package/neural-interface/public/shared/morelogin-profile-field.js +1 -1
  260. package/neural-interface/public/shared/mtc/mtc-logic.js +2 -1
  261. package/neural-interface/public/shared/mtc/mtc-panel.js +8 -1
  262. package/neural-interface/public/shared/mtc/mtc-styles.js +13 -12
  263. package/neural-interface/public/shared/ocp-v2/ocp-v2-childpanel.js +7 -0
  264. package/neural-interface/public/shared/ocp-v2/ocp-v2-location-logic.js +109 -0
  265. package/neural-interface/public/shared/ocp-v2/ocp-v2-modelpicker.js +8 -1
  266. package/neural-interface/public/shared/ocp-v2/ocp-v2-panel.js +118 -6
  267. package/neural-interface/public/shared/ocp-v2/ocp-v2-render.js +27 -3
  268. package/neural-interface/public/shared/ocp-v2/ocp-v2-send.js +13 -0
  269. package/neural-interface/public/shared/ocp-v2/ocp-v2-session-actions.js +2 -1
  270. package/neural-interface/public/shared/ocp-v2/ocp-v2-styles.js +27 -93
  271. package/neural-interface/public/shared/ocp-v2/ocp-v2-variantpicker.js +17 -6
  272. package/neural-interface/public/shared/output-format.js +294 -0
  273. package/neural-interface/public/shared/owner-authority-view.js +4 -10
  274. package/neural-interface/public/shared/page-session.js +1 -1
  275. package/neural-interface/public/shared/provider-icons.js +6 -0
  276. package/neural-interface/public/shared/schedules-view.js +2 -1
  277. package/neural-interface/public/shared/server-presence.js +77 -0
  278. package/neural-interface/public/shared/settings/settings-ai-browser.js +5 -5
  279. package/neural-interface/public/shared/settings/settings-backup-contents.js +241 -0
  280. package/neural-interface/public/shared/settings/settings-backup-download.js +298 -0
  281. package/neural-interface/public/shared/settings/settings-backup-encryption-pane.js +335 -0
  282. package/neural-interface/public/shared/settings/settings-backup-encryption.js +545 -0
  283. package/neural-interface/public/shared/settings/settings-ia.js +1 -1
  284. package/neural-interface/public/shared/skills/studio/sx-geometry.js +12 -3
  285. package/neural-interface/public/shared/skills/studio/sx-main.js +14 -7
  286. package/neural-interface/public/shared/start-bridge.js +2 -2
  287. package/neural-interface/public/shared/studio-attention.js +6 -0
  288. package/neural-interface/public/shared/styles.css +354 -438
  289. package/neural-interface/public/shared/transcript-rows.js +28 -3
  290. package/neural-interface/public/shared/tray-auto-close.js +18 -5
  291. package/neural-interface/public/shared/ui-agents.js +1 -2
  292. package/neural-interface/public/shared/ui-automation-studio.js +168 -108
  293. package/neural-interface/public/shared/ui-claude-panel.js +42 -65
  294. package/neural-interface/public/shared/ui-loading.js +185 -25
  295. package/neural-interface/public/shared/ui-native-loop-router.js +59 -20
  296. package/neural-interface/public/shared/ui-navbar.js +2 -1
  297. package/neural-interface/public/shared/ui-output.js +533 -0
  298. package/neural-interface/public/shared/ui-owner-authority.js +48 -25
  299. package/neural-interface/public/shared/ui-schedules-studio.js +165 -128
  300. package/neural-interface/public/shared/ui-scroll-follow.js +97 -6
  301. package/neural-interface/public/shared/ui-sessions.js +2 -2
  302. package/neural-interface/public/shared/ui-settings-entry.js +18 -0
  303. package/neural-interface/public/shared/ui-settings.js +234 -67
  304. package/neural-interface/public/shared/ui-sidepanel-tray.js +3 -2
  305. package/neural-interface/public/shared/ui-sync.js +1 -0
  306. package/neural-interface/public/shared/ui-tooltip.js +16 -0
  307. package/neural-interface/public/shared/ui-tutorial.js +5 -6
  308. package/neural-interface/public/shared/ui-worker-end.js +27 -8
  309. package/neural-interface/public/shared/worker-end.js +9 -4
  310. package/neural-interface/public/sw.js +4 -3
  311. package/neural-interface/public/variant/2d/main.js +5 -0
  312. package/neural-interface/public/variant/3d/app.js +10 -0
  313. package/neural-interface/public/variant/3d/main.js +17 -4
  314. package/neural-interface/scripts/scratch-retention.mjs +20 -0
  315. package/neural-interface/server.js +507 -160
  316. package/npm-shrinkwrap.json +2 -2
  317. package/package.json +2 -1
  318. package/scripts/restore-data-home-from-backup.mjs +175 -8
  319. package/setup.js +18 -4
@@ -39,6 +39,7 @@ export class VectorCache {
39
39
  }
40
40
  /** Drop everything; next query reloads from the database. */
41
41
  invalidate() {
42
+ this.version++;
42
43
  this.loaded = false;
43
44
  this.ids = [];
44
45
  this.rowIndexById.clear();
@@ -92,6 +93,7 @@ export class VectorCache {
92
93
  this.reload();
93
94
  }
94
95
  reload() {
96
+ this.version++;
95
97
  this.reloadCount++;
96
98
  // Read the watermark BEFORE the rows. A concurrent commit will then be
97
99
  // replayed on the next call instead of accidentally marked as observed.
@@ -193,6 +195,7 @@ export class VectorCache {
193
195
  const idx = this.rowIndexById.get(id);
194
196
  if (idx === undefined)
195
197
  return;
198
+ this.version++;
196
199
  const last = this.count - 1;
197
200
  if (idx !== last) {
198
201
  this.matrix.copyWithin(idx * this.dim, last * this.dim, (last + 1) * this.dim);
@@ -212,17 +215,67 @@ export class VectorCache {
212
215
  */
213
216
  topK(query, k, threshold, allowedIds) {
214
217
  this.ensureFresh();
215
- if (this.count === 0 || this.dim === 0)
218
+ const scan = this.startScan(query, k, allowedIds, threshold);
219
+ if (!scan)
216
220
  return [];
221
+ this.scanRows(scan, 0, scan.total);
222
+ return this.finishScan(scan);
223
+ }
224
+ /**
225
+ * topK() in slices of ~8 ms that yield to the event loop (149k session
226
+ * chunks: ~60 ms of scoring in one piece). Brings the cache up to date first,
227
+ * as ready() does. A cache changed during a yield is scanned again from the
228
+ * start; after three such restarts the last scan runs without yielding.
229
+ */
230
+ async topKAsync(query, k, threshold, allowedIds) {
231
+ await this.ready();
232
+ for (let attempt = 0; attempt < 3; attempt++) {
233
+ this.ensureFresh();
234
+ const scan = this.startScan(query, k, allowedIds, threshold);
235
+ if (!scan)
236
+ return [];
237
+ const version = this.version;
238
+ let from = 0;
239
+ let slice = performance.now();
240
+ while (from < scan.total) {
241
+ const to = Math.min(scan.total, from + 2048);
242
+ this.scanRows(scan, from, to);
243
+ from = to;
244
+ if (from < scan.total && performance.now() - slice >= 8) {
245
+ await new Promise(done => setImmediate(done));
246
+ if (this.version !== version)
247
+ break;
248
+ slice = performance.now();
249
+ }
250
+ }
251
+ if (from >= scan.total)
252
+ return this.finishScan(scan);
253
+ }
254
+ return this.topK(query, k, threshold, allowedIds);
255
+ }
256
+ /** Bumped by every change to the rows, their order or the matrix. */
257
+ version = 0;
258
+ startScan(query, k, allowedIds, threshold) {
259
+ if (this.count === 0 || this.dim === 0)
260
+ return null;
217
261
  const q = query instanceof Float32Array ? query : new Float32Array(query);
218
262
  if (q.length !== this.dim || !q.every(Number.isFinite) || k < 1)
219
- return [];
220
- const dim = this.dim;
221
- const m = this.matrix;
222
- const hits = [];
263
+ return null;
223
264
  const selected = allowedIds && allowedIds.size < this.count / 2
224
265
  ? [...allowedIds].map(id => this.rowIndexById.get(id)).filter((r) => r !== undefined) : undefined;
225
- for (let index = 0; index < (selected?.length ?? this.count); index++) {
266
+ return { q, k, threshold, allowedIds, selected, total: selected?.length ?? this.count, hits: [] };
267
+ }
268
+ finishScan(scan) {
269
+ const { hits, k } = scan;
270
+ hits.sort((a, b) => b.score - a.score);
271
+ return hits.length > k ? hits.slice(0, k) : hits;
272
+ }
273
+ scanRows(scan, from, to) {
274
+ const { q, k, allowedIds, selected, hits } = scan;
275
+ const threshold = scan.threshold;
276
+ const dim = this.dim;
277
+ const m = this.matrix;
278
+ for (let index = from; index < to; index++) {
226
279
  const r = selected ? selected[index] : index;
227
280
  if (allowedIds && !allowedIds.has(this.ids[r]))
228
281
  continue;
@@ -260,8 +313,108 @@ export class VectorCache {
260
313
  }
261
314
  }
262
315
  }
263
- hits.sort((a, b) => b.score - a.score);
264
- return hits.length > k ? hits.slice(0, k) : hits;
316
+ }
317
+ /**
318
+ * Bring a journalled cache up to date without a synchronous full load, for
319
+ * async callers (recall). A cold cache, or one opened on another connection,
320
+ * is built in slices; a journal backlog of any size replays in slices. The
321
+ * topK() that follows in the same turn then has (almost) nothing to replay.
322
+ * A synchronous reload of 149k session chunks blocked the Neural Interface's
323
+ * event loop for 0.5-1.8 s per recall (docs/startup-freeze-and-agents-audit.md).
324
+ */
325
+ async ready() {
326
+ if (!this.entity)
327
+ return;
328
+ for (let attempt = 0; attempt < 3; attempt++) {
329
+ const db = this.getDb();
330
+ if (!this.loaded || this.connection !== db) {
331
+ await this.warm();
332
+ continue;
333
+ }
334
+ if (await this.replay(db))
335
+ return;
336
+ }
337
+ }
338
+ /** Replay the journal after lastSequence in pages, yielding every ~8 ms. false: the cache changed under it. */
339
+ async replay(db) {
340
+ const page = db.prepare('SELECT seq,id FROM memory_changes WHERE entity=? AND seq>? ORDER BY seq LIMIT 512');
341
+ const generation = this.ids;
342
+ let slice = performance.now();
343
+ for (;;) {
344
+ const rows = page.all(this.entity, this.lastSequence);
345
+ if (!rows.length)
346
+ return true;
347
+ for (const id of new Set(rows.map(r => r.id))) {
348
+ this.remove(id);
349
+ this.setFromDb(id);
350
+ if (performance.now() - slice >= 8) {
351
+ await new Promise(done => setImmediate(done));
352
+ if (generation !== this.ids || !this.loaded || db !== this.getDb())
353
+ return false;
354
+ slice = performance.now();
355
+ }
356
+ }
357
+ if (generation !== this.ids || !this.loaded)
358
+ return false;
359
+ // A synchronous topK() may have replayed further meanwhile: never move back.
360
+ this.lastSequence = Math.max(this.lastSequence, Number(rows[rows.length - 1].seq));
361
+ }
362
+ }
363
+ warming = null;
364
+ /**
365
+ * Page the journalled table by rowid and read each eligible vector by its
366
+ * indexed id. No cursor or WAL read transaction crosses a yield. Changes to
367
+ * earlier pages replay from the starting watermark before the first search.
368
+ * Concurrent callers share one build.
369
+ */
370
+ warm() {
371
+ if (!this.warming)
372
+ this.warming = this.warmOnce().finally(() => { this.warming = null; });
373
+ return this.warming;
374
+ }
375
+ async warmOnce() {
376
+ const db = this.getDb();
377
+ if (!this.entity || (this.loaded && this.connection === db))
378
+ return;
379
+ const generation = this.ids;
380
+ const watermark = db.prepare('SELECT COALESCE(MAX(seq),0) AS seq FROM memory_changes WHERE entity=?').get(this.entity);
381
+ const table = '"' + this.entity.replaceAll('"', '""') + '"';
382
+ const first = db.prepare(`SELECT rowid,id FROM ${table} ORDER BY rowid LIMIT 64`);
383
+ const next = db.prepare(`SELECT rowid,id FROM ${table} WHERE rowid>? ORDER BY rowid LIMIT 64`);
384
+ first.setReadBigInts(true);
385
+ next.setReadBigInts(true);
386
+ const byId = db.prepare(this.getVectorSql);
387
+ const staged = new VectorCache(this.getDb, this.loadSql, this.getVectorSql);
388
+ staged.loaded = true;
389
+ staged.capacity = 64;
390
+ let slice = performance.now();
391
+ let rows = first.all();
392
+ while (rows.length) {
393
+ for (const row of rows) {
394
+ const vector = byId.get(row.id)?.vector;
395
+ if (vector?.byteLength && !(vector.byteLength % 4) && (!staged.dim || vector.byteLength === staged.dim * 4)) {
396
+ staged.set(String(row.id), new Float32Array(vector.buffer, vector.byteOffset, vector.byteLength / 4));
397
+ }
398
+ if (performance.now() - slice >= 8) {
399
+ await new Promise(done => setImmediate(done));
400
+ if (generation !== this.ids || db !== this.getDb())
401
+ return;
402
+ slice = performance.now();
403
+ }
404
+ }
405
+ rows = next.all(rows[rows.length - 1].rowid);
406
+ }
407
+ this.connection = db;
408
+ this.lastSequence = Number(watermark?.seq ?? 0);
409
+ this.ids = staged.ids;
410
+ this.rowIndexById = staged.rowIndexById;
411
+ this.matrix = staged.matrix;
412
+ this.capacity = staged.capacity;
413
+ this.count = staged.count;
414
+ this.dim = staged.dim;
415
+ this.loaded = true;
416
+ this.version++;
417
+ this.reloadCount++;
265
418
  }
266
419
  size() {
267
420
  this.ensureFresh();
@@ -1 +1 @@
1
- {"version":3,"file":"vector-cache.js","sourceRoot":"","sources":["../../src/services/vector-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AASH,MAAM,OAAO,WAAW;IAeZ;IACA;IACA;IACA;IAjBF,GAAG,GAAa,EAAE,CAAC;IACnB,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,MAAM,GAAiB,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;IAC3C,GAAG,GAAG,CAAC,CAAC;IACR,KAAK,GAAG,CAAC,CAAC;IACV,QAAQ,GAAG,CAAC,CAAC;IACb,MAAM,GAAG,KAAK,CAAC;IACf,eAAe,GAAG,CAAC,CAAC,CAAC;IACrB,YAAY,GAAG,CAAC,CAAC,CAAC;IAClB,UAAU,GAAG,KAAK,CAAC;IACpB,WAAW,GAAG,CAAC,CAAC;IACf,UAAU,GAAwB,IAAI,CAAC;IAE/C,YACU,KAAyB,EACzB,OAAe,EAAE,2BAA2B;IAC5C,YAAoB,EAAE,iCAAiC;IACvD,MAAe;QAHf,UAAK,GAAL,KAAK,CAAoB;QACzB,YAAO,GAAP,OAAO,CAAQ;QACf,iBAAY,GAAZ,YAAY,CAAQ;QACpB,WAAM,GAAN,MAAM,CAAS;IACtB,CAAC;IAEJ,6DAA6D;IAC7D,UAAU;QACR,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QAC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,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAED,IAAI;QACF,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF"}
@@ -85,17 +85,17 @@ export declare const agentDefinitionSchema: {
85
85
  kind: "opencode" | "claude-code" | "agent";
86
86
  project?: string | undefined;
87
87
  id?: string | undefined;
88
+ path?: string | undefined;
88
89
  name?: string | undefined;
89
90
  text?: string | undefined;
90
- path?: string | undefined;
91
91
  scope?: "project" | "global" | undefined;
92
92
  }, {
93
93
  kind: "opencode" | "claude-code" | "agent";
94
94
  project?: string | undefined;
95
95
  id?: string | undefined;
96
+ path?: string | undefined;
96
97
  name?: string | undefined;
97
98
  text?: string | undefined;
98
- path?: string | undefined;
99
99
  scope?: "project" | "global" | undefined;
100
100
  }>>;
101
101
  expected_etag: z.ZodOptional<z.ZodString>;
@@ -5,11 +5,14 @@ export declare const AGENT_ROLE_DENIED = "agent_* tools are only available to th
5
5
  export declare const AGENT_TOOL_NAMES: readonly ["agent_catalog", "agent_list", "agent_route", "agent_clarify", "agent_dispatch", "agent_status", "agent_read", "agent_send", "agent_wait", "agent_stop", "agent_focus", "agent_usage", "agent_team"];
6
6
  export declare const TASK_CLASSES: readonly ["chat", "quick", "code", "complex", "review", "research", "browser", "computer", "automation", "design", "image_gen", "video_gen"];
7
7
  export declare const RUN_EVENT_KINDS: readonly ["run.result", "run.needs_input", "run.permission", "run.failed", "run.stalled", "run.stopped", "run.interrupted", "run.completed", "run.budget", "run.notice", "run.message", "run.progress"];
8
+ /** One title limit for agent_route planned_split.slices and agent_team slices[].title (= TEAM_LIMITS.title in neural-interface/lib/teams/schema.js). */
9
+ export declare const SLICE_TITLE_MAX = 80;
8
10
  export declare const agentCatalogSchema: {
9
11
  provider: z.ZodOptional<z.ZodEnum<["claude-code", "codex", "opencode", "antigravity"]>>;
10
12
  search: z.ZodOptional<z.ZodString>;
11
13
  };
12
14
  export declare const agentRouteSchema: {
15
+ agent_ref: z.ZodOptional<z.ZodString>;
13
16
  assistant_session_id: z.ZodString;
14
17
  task_class: z.ZodEnum<["chat", "quick", "code", "complex", "review", "research", "browser", "computer", "automation", "design", "image_gen", "video_gen"]>;
15
18
  summary: z.ZodString;
@@ -28,6 +31,7 @@ export declare const agentRouteSchema: {
28
31
  slices: string[];
29
32
  reason?: string | undefined;
30
33
  }>>;
34
+ needs_host: z.ZodOptional<z.ZodBoolean>;
31
35
  needs_vision: z.ZodOptional<z.ZodBoolean>;
32
36
  proposals: z.ZodArray<z.ZodObject<{
33
37
  kind: z.ZodEnum<["direct", "dispatch"]>;
@@ -39,16 +43,16 @@ export declare const agentRouteSchema: {
39
43
  reason: z.ZodOptional<z.ZodString>;
40
44
  }, "strip", z.ZodTypeAny, {
41
45
  kind: "direct" | "dispatch";
42
- model?: string | undefined;
43
46
  reason?: string | undefined;
47
+ model?: string | undefined;
44
48
  provider?: "opencode" | "antigravity" | "claude-code" | "codex" | undefined;
45
49
  effort?: string | undefined;
46
50
  account_id?: string | undefined;
47
51
  agent_ref?: string | undefined;
48
52
  }, {
49
53
  kind: "direct" | "dispatch";
50
- model?: string | undefined;
51
54
  reason?: string | undefined;
55
+ model?: string | undefined;
52
56
  provider?: "opencode" | "antigravity" | "claude-code" | "codex" | undefined;
53
57
  effort?: string | undefined;
54
58
  account_id?: string | undefined;
@@ -156,13 +160,13 @@ export declare const agentSendSchema: {
156
160
  }, "strip", z.ZodTypeAny, {
157
161
  decision: "allow" | "deny" | "answer";
158
162
  request_id: string;
159
- answers?: Record<string, unknown> | undefined;
160
163
  note?: string | undefined;
164
+ answers?: Record<string, unknown> | undefined;
161
165
  }, {
162
166
  decision: "allow" | "deny" | "answer";
163
167
  request_id: string;
164
- answers?: Record<string, unknown> | undefined;
165
168
  note?: string | undefined;
169
+ answers?: Record<string, unknown> | undefined;
166
170
  }>>;
167
171
  queue: z.ZodOptional<z.ZodBoolean>;
168
172
  };
@@ -193,10 +197,10 @@ export declare const agentUsageSchema: {
193
197
  run_id: z.ZodOptional<z.ZodString>;
194
198
  };
195
199
  export declare const agentCatalogDescription = "Discover what you can route to: providers (claude-code, codex, opencode, antigravity) with models (tier, price per 1M tokens, vision, context, efforts), plus `chat` (chat-only providers such as maritaca: a side panel the user talks to, prices in BRL, never a dispatch target), accounts with subscription usage remaining (or usage unknown; API keys are n/a), registered projects (cwd candidates), SynaBun tool groups and each host's effect, rails/limits, active runs, and `agents`: the SynaBun agents the owner approved, which a dispatch names with agent_ref (ref, name, description, provider/model, task classes, scope global or project, revision; provider and search filter them too). Without arguments it returns a compact routing view (OpenCode sampled); pass provider and/or search to list more models. Call it when the routing sheet in your instructions lacks a model, or after a MODEL_UNKNOWN rejection. Returns JSON.";
196
- export declare const agentRouteDescription = "The runtime taskId owns one card: retries return it even with different wording or proposals. Only a genuinely separate subtask uses its own stable task_key. Plan the whole task before routing it once. At Pair/Team/Swarm, code/complex/research/review target 2/4/6 workers: pass planned_split with that many distinct titles or fewer with a reason. All four require cwd; a non-git project falls back to one worker with a reason. The card shows this split and one approval covers all workers. Follow next: agent_team plan \u2192 start for all splits. Research/review pass task_class and empty owned_paths: separate worktrees, no integration or landing; wait and synthesize. Never route individual slices. Other classes and Solo stay single. Route an actionable task BEFORE starting it (you are the planner). Give task_class, a one-line summary, your honest confidence (0-1) and 1-3 proposals (direct = here on your model; dispatch = a worker provider/model). proposals.account_id accepts an account id or \"auto\" (most subscription usage left); limited pinned/default accounts fall back within the provider. The returned target.account includes usage and corrections explain the choice. The server applies the session's route mode (always ask / ask when unsure / never ask): it approves at once, or shows the user a route card and waits briefly. A planned split uses workers; on a single-task route card the user can pick here or a worker: follow the returned target.kind and next, never your proposal. Follow the returned status and next: approved+dispatch \u2192 follow next with the approved route_id; approved+direct \u2192 do it yourself (a route the user kept here is never dispatched: agent_dispatch refuses it with ROUTE_IS_DIRECT); continuation \u2192 end your turn (SynaBun continues on the chosen model); pending \u2192 end your turn, the choice arrives as a [SynaBun Mailbox] route_decided event; declined \u2192 do not start (reason no_capable_model: no model can make the image or video, or see for design; tell the user which Model routes row needs one); clarifying \u2192 end your turn, the user has not answered your agent_clarify questions yet (independent:true for a task that does not depend on them). image_gen / video_gen always route to a worker whose model generates the medium, design to a worker whose model can see. With a session budget, a provider whose share is used up cannot take the task: SynaBun first divides the unspent budget again, then moves the task to the next capable provider with money left (your next proposal, the same tier on another provider, then a free model) and says so in corrections (reason budget_share, \"budget: codex share used up -> claude-code/sonnet\"); the saved routes yield to this. When no provider can pay it declines with reason budget_exhausted and names the dry providers (dry). The result carries budget: each provider's share, spent and left. A proposal may name an agent (agent_ref, with cwd for a project's own): it is a dispatch on what the agent runs on, unless the proposal names its own. Never use it for conversation or bookkeeping. Returns JSON.";
200
+ export declare const agentRouteDescription = "The runtime taskId owns one card: retries return it even with different wording or proposals. Only a genuinely separate subtask uses its own stable task_key. Plan the whole task before routing it once. At Pair/Team/Swarm, code/complex/research/review target 2/4/6 workers: pass planned_split with that many distinct titles or fewer with a reason. All four require cwd; a non-git project falls back to one worker with a reason. The card shows this split and one approval covers all workers. Follow next: agent_team plan \u2192 start for all splits. Research/review pass task_class and empty owned_paths: separate worktrees, no integration or landing; wait and synthesize. Never route individual slices. Other classes and Solo stay single. For work that requires access outside the worker sandbox, set needs_host:true. Only Here is available. The worker-only classes design, image_gen, and video_gen refuse needs_host:true with ROUTE_INVALID. Route an actionable task BEFORE starting it (you are the planner). Give task_class, a one-line summary, your honest confidence (0-1) and 1-3 proposals (direct = here on your model; dispatch = a worker provider/model). proposals.account_id accepts an account id or \"auto\" (most subscription usage left); limited pinned/default accounts fall back within the provider. The returned target.account includes usage and corrections explain the choice. The server applies the session's route mode (always ask / ask when unsure / never ask): it approves at once, or shows the user a route card and waits briefly. A planned split uses workers; on a single-task route card the user can pick here or a worker: follow the returned target.kind and next, never your proposal. Follow the returned status and next: approved+dispatch \u2192 follow next with the approved route_id; approved+direct \u2192 do it yourself (a route the user kept here is never dispatched: agent_dispatch refuses it with ROUTE_IS_DIRECT); continuation \u2192 end your turn (SynaBun continues on the chosen model); pending \u2192 end your turn, the choice arrives as a [SynaBun Mailbox] route_decided event; declined \u2192 do not start (reason no_capable_model: no model can make the image or video, or see for design; tell the user which Model routes row needs one); clarifying \u2192 end your turn, the user has not answered your agent_clarify questions yet (independent:true for a task that does not depend on them). image_gen / video_gen always route to a worker whose model generates the medium, design to a worker whose model can see. With a session budget, a provider whose share is used up cannot take the task: SynaBun first divides the unspent budget again, then moves the task to the next capable provider with money left (your next proposal, the same tier on another provider, then a free model) and says so in corrections (reason budget_share, \"budget: codex share used up -> claude-code/sonnet\"); the saved routes yield to this. When no provider can pay it declines with reason budget_exhausted and names the dry providers (dry). A host-only route on an unpriced provider declines with reason budget_unpriced (BUDGET_UNPRICED). The result carries budget: each provider's share, spent and left. Routed workers inherit the approved agent for their task class; agent_ref \"none\" opts out. A proposal may name an agent (agent_ref, with cwd for a project's own): it is a dispatch on what the agent runs on, unless the proposal names its own. Never use it for conversation or bookkeeping. Returns JSON.";
197
201
  export declare const agentClarifyDescription = "Ask the user 1-3 targeted questions BEFORE routing a new request that is materially ambiguous: two plausible readings with different results, an unclear target (project, feature, files, audience), destructive or irreversible scope, spend, or memories that conflict with it. Not for clear requests, details a sensible default covers, anything the request, memory or the project answers, or the model (agent_route asks that). Each question gets 2-4 options (recommended first; the user can always type their own); add constraints (what the request fixes) and assumptions (what you will assume for the rest). The card waits briefly. Follow the returned status and next: answered \u2192 route, then agent_dispatch with the brief_id (SynaBun adds the user's original words, their answers, the constraints and assumptions to the worker's context); declined \u2192 proceed on your assumptions; pending \u2192 end your turn, the answers arrive as a [SynaBun Mailbox] clarify_answered event or as the user's next message, and dependent routes and dispatches wait until then. Returns JSON.";
198
202
  export declare const agentListDescription = "List dispatched worker runs with status, state, provider/model, the agent a run runs as (agentRef, agentRevision; absent for a plain worker), title, elapsed time, work time left (workLeftMs), cost and resumes (how often a server restart cut the run off and it was resumed). Use it before dispatching more work, to recover run ids, or after a mailbox event. Filter with active_only, assistant_session_id (your own session) or workflow_id. Returns JSON.";
199
- export declare const agentDispatchDescription = "Dispatch a task to a worker agent (Claude Code, Codex or OpenCode). Route it first with agent_route and pass the approved route_id (the server applies that provider/model/effort); without one, the dispatch may be held until the user picks a model (awaitingRoute:true \u2014 do not dispatch it again; if the user picks \"here\" instead, the run never starts and a route_decided mailbox event asks you to do the task yourself). A route_id the user decided to keep here is refused (ROUTE_IS_DIRECT): do that task yourself. After agent_clarify, pass its brief_id: the worker gets the user's own words and answers; while its questions are open a dependent dispatch is refused (CLARIFICATION_PENDING). The run attaches as a live automation tab in the matching sidepanel without stealing focus. Write a self-contained task that ends with a ## Result block, pass the absolute cwd and your assistant_session_id. Defaults: permission_policy \"auto\", capability \"full\", 45 minutes of work time (max_minutes, at least 20), no per-run dollar ceiling (with a budget the run draws from its provider's share; a provider whose share is used up and cannot get more is refused with BUDGET_SHARE_EXHAUSTED: route again). Use \"ask\" only for sensitive scopes (Codex cannot ask: use \"restricted\"). uses_computer:true for desktop work (one at a time, vision model). uses_browser:true with morelogin_profile (a profile id or name) opens the worker's browser tab in that MoreLogin profile for this run only, next to runs in the default or other profiles (only a profile the owner allowed agents to choose; MORELOGIN_PROFILE_NOT_ALLOWED otherwise: tell the user to switch it on in Settings). An image_gen / video_gen run makes the asset with its model's own generation tool; SynaBun collects the files into the run's result (media: path + url); with no model that generates the medium an un-routed dispatch is refused (NO_CAPABLE_MODEL), and a route_id approved for other work is refused for image_gen / video_gen / design (and the other way round: ROUTE_CLASS_MISMATCH; route the task again with its own class). A design run gets SynaBun's design rules and the project's style guide, defaults to capability \"workspace\", uses_browser true, browser, styleguide and image groups, and 60 minutes of work time (explicit values win), runs only on a model confirmed to see (MODEL_CANNOT_SEE otherwise), and its screenshots land in the result's media. agent_ref runs the worker as one of the owner's approved agents (agent_catalog agents): its definition fills what you leave out and its instructions become the worker's role, the run carries agentRef and agentRevision, and corrections list what the definition was held to. Group fan-outs with workflow_id, chain with parent_run_id, retry safely with idempotency_key. Over-limit dispatches are queued (queued:true, position). After dispatching, block with agent_wait rather than polling. Returns JSON.";
203
+ export declare const agentDispatchDescription = "Dispatch a task to a worker agent (Claude Code, Codex or OpenCode). Route it first with agent_route and pass the approved route_id (the server applies that provider/model/effort); without one, the dispatch may be held until the user picks a model (awaitingRoute:true \u2014 do not dispatch it again; if the user picks \"here\" instead, the run never starts and a route_decided mailbox event asks you to do the task yourself). A route_id the user decided to keep here is refused (ROUTE_IS_DIRECT): do that task yourself. After agent_clarify, pass its brief_id: the worker gets the user's own words and answers; while its questions are open a dependent dispatch is refused (CLARIFICATION_PENDING). The run attaches as a live automation tab in the matching sidepanel without stealing focus. Write a self-contained task that ends with a ## Result block, pass the absolute cwd and your assistant_session_id. Defaults: permission_policy \"auto\", capability \"full\", 45 minutes of work time (max_minutes, at least 20), no per-run dollar ceiling (with a budget the run draws from its provider's share; a provider whose share is used up and cannot get more is refused with BUDGET_SHARE_EXHAUSTED: route again). Use \"ask\" only for sensitive scopes (Codex cannot ask: use \"restricted\"). uses_computer:true for desktop work (one at a time, vision model). uses_browser:true with morelogin_profile (a profile id or name) opens the worker's browser tab in that MoreLogin profile for this run only, next to runs in the default or other profiles (only a profile the owner allowed agents to choose; MORELOGIN_PROFILE_NOT_ALLOWED otherwise: tell the user to switch it on in Settings). An image_gen / video_gen run makes the asset with its model's own generation tool; SynaBun collects the files into the run's result (media: path + url); with no model that generates the medium an un-routed dispatch is refused (NO_CAPABLE_MODEL), and a route_id approved for other work is refused for image_gen / video_gen / design (and the other way round: ROUTE_CLASS_MISMATCH; route the task again with its own class). A design run gets SynaBun's design rules and the project's style guide, defaults to capability \"workspace\", uses_browser true, browser, styleguide and image groups, and 60 minutes of work time (explicit values win), runs only on a model confirmed to see (MODEL_CANNOT_SEE otherwise), and its screenshots land in the result's media. The class agent applies automatically; agent_ref \"none\" opts out. An explicit agent_ref runs the worker as one of the owner's approved agents (agent_catalog agents): its definition fills what you leave out and its instructions become the worker's role, the run carries agentRef and agentRevision, and corrections list what the definition was held to. Group fan-outs with workflow_id, chain with parent_run_id, retry safely with idempotency_key. Over-limit dispatches are queued (queued:true, position). After dispatching, block with agent_wait rather than polling. Returns JSON.";
200
204
  export declare const agentStatusDescription = "Get one run's current descriptor: status (queued, starting, running, completed, failed, stopped, interrupted), state (the detail: also idle, awaiting_permission, and suspended / resuming while a SynaBun server restart cuts a Claude Code worker off and the next start resumes it as the same run, its Claude session and its tab; resumes counts that, at most 3; a run that could not be resumed ends interrupted, with why in notes), turnState (running, idle, awaiting_permission), provider/model/account, the agent it runs as (agentRef, agentRevision, agentPin with what its definition was held to; absent for a plain worker), elapsed time (elapsedMs, wall clock), work time used and left of max_minutes (workMs, workLeftMs), cost, the last parsed result summary and any pending permission or question requests. Cheap; use it between agent_wait calls or before agent_send / agent_stop. Returns JSON.";
201
205
  export declare const agentReadDescription = "Read a run's output. format \"result\" (default) returns the parsed ## Result contract (status, summary, changes, follow_ups, question, json, and media: the images / videos an image_gen or video_gen run generated or a design run captured, each { kind, path, url, mime, bytes } \u2014 show one with ![](url) plus its path); \"tail\" returns the last transcript events (also after the run ended or the server restarted); \"text\" the worker's assistant text; \"files\" the files it reported. Call after agent_wait reports idle or terminal; keep max_chars small. A text longer than max_chars is read in pages: the answer carries totalChars, offset and nextOffset; pass offset (0 for the start, then each nextOffset) to read the rest. Returns JSON.";
202
206
  export declare const agentSendDescription = "Continue a worker's conversation. text sends a follow-up turn (queue:true enqueues it while the worker is still running, or while it is suspended / resuming after a server restart: it goes to the worker once resumed; queued follow-ups keep their order, survive a restart, and at most 20 wait per run). reply answers a pending permission or question request: decision allow/deny for tools, answer (with answers) for questions, note as an optional message. Obtain request ids from agent_status or agent_wait until=\"event\". A follow-up to a run whose work time (max_minutes) is used up is refused with TIME_CAP: dispatch a new run with its result as context. Returns JSON.";
@@ -204,11 +208,11 @@ export declare const agentWaitDescription = "Blocking barrier for orchestration.
204
208
  export declare const agentStopDescription = "Stop work. run_id stops one run; all:true with your assistant_session_id stops every run of this assistant session, workflow_id every run of a workflow (kill-all). Use when the user cancels, a worker misbehaves, or a time/budget rail is at risk. Returns JSON.";
205
209
  export declare const agentFocusDescription = "Bring a run's sidepanel automation tab to the front (focus:false releases it). Use when the user asks to watch a worker; dispatches never steal focus by themselves. Returns JSON.";
206
210
  export declare const agentUsageDescription = "Get token usage for a task, run, or entire Assistant session. Returns compact JSON. `session` is the headline the panel shows: every task of this session added up (it only grows, and survives a restart), with a per-model breakdown (models: inputTotal, outputTotal, total, costUsd, costBasis). Below it the task asked for: tokens, USD cost, fidelity, unsynced (rows not on disk yet, normally 0), and each agent's key, title, provider, model, total, sub-agents total, fidelity and state (partialReason when a count is partial; calls on the Jev judgments row). `budget` is the session budget: mode (limited / unlimited: the user chose No limit), the amount, spent and left, warned / exceeded, how the split was made (source jev | fallback, updatedAt) and each provider's share, spent and left (brain marks your own provider; leftUsd is what its workers may still spend), and dry: the providers whose share is used up. Every tokens object has the five additive classes (input = uncached input, cacheWrite, cacheRead, output = visible output, reasoning), total, inputTotal (input + cacheWrite + cacheRead: everything sent to the model) and outputTotal (output + reasoning): the same meaning for every provider, nothing counted twice. costUsd is at API list prices; costBasis says how it is known: reported (the provider reported it), estimated (tokens at list price: Codex and other plan-billed work, where it is the list-price equivalent, not a charge), free, or unpriced (no list price: tokens counted, no dollars). Counts are exact provider counts when fidelity is exact; live marks provisional counts and partial marks incomplete counts. metered:false means this server keeps no usage ledger. No routing is needed.";
207
- export declare const AGENT_TEAM_ACTIONS: readonly ["plan", "start", "status", "integrate", "land", "cleanup", "discard", "list"];
211
+ export declare const AGENT_TEAM_ACTIONS: readonly ["plan", "start", "status", "assign", "set_test_command", "integrate", "land", "cleanup", "discard", "list"];
208
212
  /** The most slices any Agent density allows (Swarm). */
209
213
  export declare const AGENT_TEAM_MAX_SLICES = 6;
210
214
  export declare const agentTeamSchema: {
211
- action: z.ZodEnum<["plan", "start", "status", "integrate", "land", "cleanup", "discard", "list"]>;
215
+ action: z.ZodEnum<["plan", "start", "status", "assign", "set_test_command", "integrate", "land", "cleanup", "discard", "list"]>;
212
216
  assistant_session_id: z.ZodOptional<z.ZodString>;
213
217
  team_id: z.ZodOptional<z.ZodString>;
214
218
  title: z.ZodOptional<z.ZodString>;
@@ -254,6 +258,7 @@ export declare const agentTeamSchema: {
254
258
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
255
259
  brief_id: z.ZodOptional<z.ZodString>;
256
260
  slice_id: z.ZodOptional<z.ZodString>;
261
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
257
262
  target_branch: z.ZodOptional<z.ZodString>;
258
263
  mode: z.ZodOptional<z.ZodEnum<["ff", "merge"]>>;
259
264
  user_confirmed: z.ZodOptional<z.ZodBoolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/tools/agents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAarC,eAAO,MAAM,iBAAiB,uEAAuE,CAAC;AAEtG,eAAO,MAAM,gBAAgB,gNAInB,CAAC;AAIX,eAAO,MAAM,YAAY,8IAA+I,CAAC;AAOzK,eAAO,MAAM,eAAe,yMAGlB,CAAC;AAOX,eAAO,MAAM,kBAAkB;;;CAG9B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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