wotann 0.5.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 (4534) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +110 -0
  3. package/README.md +382 -0
  4. package/dist/acp/manifest.d.ts +160 -0
  5. package/dist/acp/manifest.d.ts.map +1 -0
  6. package/dist/acp/manifest.js +185 -0
  7. package/dist/acp/manifest.js.map +1 -0
  8. package/dist/acp/protocol.d.ts +533 -0
  9. package/dist/acp/protocol.d.ts.map +1 -0
  10. package/dist/acp/protocol.js +220 -0
  11. package/dist/acp/protocol.js.map +1 -0
  12. package/dist/acp/registry.d.ts +90 -0
  13. package/dist/acp/registry.d.ts.map +1 -0
  14. package/dist/acp/registry.js +297 -0
  15. package/dist/acp/registry.js.map +1 -0
  16. package/dist/acp/runtime-handlers.d.ts +58 -0
  17. package/dist/acp/runtime-handlers.d.ts.map +1 -0
  18. package/dist/acp/runtime-handlers.js +169 -0
  19. package/dist/acp/runtime-handlers.js.map +1 -0
  20. package/dist/acp/server.d.ts +184 -0
  21. package/dist/acp/server.d.ts.map +1 -0
  22. package/dist/acp/server.js +553 -0
  23. package/dist/acp/server.js.map +1 -0
  24. package/dist/acp/stdio.d.ts +57 -0
  25. package/dist/acp/stdio.d.ts.map +1 -0
  26. package/dist/acp/stdio.js +178 -0
  27. package/dist/acp/stdio.js.map +1 -0
  28. package/dist/acp/thread-handlers.d.ts +27 -0
  29. package/dist/acp/thread-handlers.d.ts.map +1 -0
  30. package/dist/acp/thread-handlers.js +94 -0
  31. package/dist/acp/thread-handlers.js.map +1 -0
  32. package/dist/agents/background-agent.d.ts +80 -0
  33. package/dist/agents/background-agent.d.ts.map +1 -0
  34. package/dist/agents/background-agent.js +329 -0
  35. package/dist/agents/background-agent.js.map +1 -0
  36. package/dist/agents/required-reading.d.ts +57 -0
  37. package/dist/agents/required-reading.d.ts.map +1 -0
  38. package/dist/agents/required-reading.js +118 -0
  39. package/dist/agents/required-reading.js.map +1 -0
  40. package/dist/api/anthropic-gateway.d.ts +195 -0
  41. package/dist/api/anthropic-gateway.d.ts.map +1 -0
  42. package/dist/api/anthropic-gateway.js +265 -0
  43. package/dist/api/anthropic-gateway.js.map +1 -0
  44. package/dist/api/server.d.ts +166 -0
  45. package/dist/api/server.d.ts.map +1 -0
  46. package/dist/api/server.js +413 -0
  47. package/dist/api/server.js.map +1 -0
  48. package/dist/api/sse-computer-session.d.ts +119 -0
  49. package/dist/api/sse-computer-session.d.ts.map +1 -0
  50. package/dist/api/sse-computer-session.js +220 -0
  51. package/dist/api/sse-computer-session.js.map +1 -0
  52. package/dist/api/ws-hardening.d.ts +76 -0
  53. package/dist/api/ws-hardening.d.ts.map +1 -0
  54. package/dist/api/ws-hardening.js +102 -0
  55. package/dist/api/ws-hardening.js.map +1 -0
  56. package/dist/auth/auth-mode.d.ts +111 -0
  57. package/dist/auth/auth-mode.d.ts.map +1 -0
  58. package/dist/auth/auth-mode.js +133 -0
  59. package/dist/auth/auth-mode.js.map +1 -0
  60. package/dist/auth/login.d.ts +72 -0
  61. package/dist/auth/login.d.ts.map +1 -0
  62. package/dist/auth/login.js +414 -0
  63. package/dist/auth/login.js.map +1 -0
  64. package/dist/auth/oauth-rotator.d.ts +60 -0
  65. package/dist/auth/oauth-rotator.d.ts.map +1 -0
  66. package/dist/auth/oauth-rotator.js +71 -0
  67. package/dist/auth/oauth-rotator.js.map +1 -0
  68. package/dist/auth/oauth-server.d.ts +88 -0
  69. package/dist/auth/oauth-server.d.ts.map +1 -0
  70. package/dist/auth/oauth-server.js +382 -0
  71. package/dist/auth/oauth-server.js.map +1 -0
  72. package/dist/auth/secure-store.d.ts +65 -0
  73. package/dist/auth/secure-store.d.ts.map +1 -0
  74. package/dist/auth/secure-store.js +235 -0
  75. package/dist/auth/secure-store.js.map +1 -0
  76. package/dist/automation/monitor-agents.d.ts +86 -0
  77. package/dist/automation/monitor-agents.d.ts.map +1 -0
  78. package/dist/automation/monitor-agents.js +210 -0
  79. package/dist/automation/monitor-agents.js.map +1 -0
  80. package/dist/automation/n8n-templates.d.ts +62 -0
  81. package/dist/automation/n8n-templates.d.ts.map +1 -0
  82. package/dist/automation/n8n-templates.js +164 -0
  83. package/dist/automation/n8n-templates.js.map +1 -0
  84. package/dist/automation/rss-parser.d.ts +26 -0
  85. package/dist/automation/rss-parser.d.ts.map +1 -0
  86. package/dist/automation/rss-parser.js +54 -0
  87. package/dist/automation/rss-parser.js.map +1 -0
  88. package/dist/autopilot/checkpoint.d.ts +116 -0
  89. package/dist/autopilot/checkpoint.d.ts.map +1 -0
  90. package/dist/autopilot/checkpoint.js +222 -0
  91. package/dist/autopilot/checkpoint.js.map +1 -0
  92. package/dist/autopilot/ci-feedback.d.ts +68 -0
  93. package/dist/autopilot/ci-feedback.d.ts.map +1 -0
  94. package/dist/autopilot/ci-feedback.js +207 -0
  95. package/dist/autopilot/ci-feedback.js.map +1 -0
  96. package/dist/autopilot/completion-oracle.d.ts +63 -0
  97. package/dist/autopilot/completion-oracle.d.ts.map +1 -0
  98. package/dist/autopilot/completion-oracle.js +280 -0
  99. package/dist/autopilot/completion-oracle.js.map +1 -0
  100. package/dist/autopilot/oracle-worker.d.ts +102 -0
  101. package/dist/autopilot/oracle-worker.d.ts.map +1 -0
  102. package/dist/autopilot/oracle-worker.js +232 -0
  103. package/dist/autopilot/oracle-worker.js.map +1 -0
  104. package/dist/autopilot/pr-artifacts.d.ts +73 -0
  105. package/dist/autopilot/pr-artifacts.d.ts.map +1 -0
  106. package/dist/autopilot/pr-artifacts.js +308 -0
  107. package/dist/autopilot/pr-artifacts.js.map +1 -0
  108. package/dist/autopilot/trajectory-recorder.d.ts +86 -0
  109. package/dist/autopilot/trajectory-recorder.d.ts.map +1 -0
  110. package/dist/autopilot/trajectory-recorder.js +181 -0
  111. package/dist/autopilot/trajectory-recorder.js.map +1 -0
  112. package/dist/autopilot/types.d.ts +60 -0
  113. package/dist/autopilot/types.d.ts.map +1 -0
  114. package/dist/autopilot/types.js +14 -0
  115. package/dist/autopilot/types.js.map +1 -0
  116. package/dist/browser/agentic-browser.d.ts +291 -0
  117. package/dist/browser/agentic-browser.d.ts.map +1 -0
  118. package/dist/browser/agentic-browser.js +595 -0
  119. package/dist/browser/agentic-browser.js.map +1 -0
  120. package/dist/browser/annotation-bridge.d.ts +116 -0
  121. package/dist/browser/annotation-bridge.d.ts.map +1 -0
  122. package/dist/browser/annotation-bridge.js +156 -0
  123. package/dist/browser/annotation-bridge.js.map +1 -0
  124. package/dist/browser/atomic-actions.d.ts +130 -0
  125. package/dist/browser/atomic-actions.d.ts.map +1 -0
  126. package/dist/browser/atomic-actions.js +178 -0
  127. package/dist/browser/atomic-actions.js.map +1 -0
  128. package/dist/browser/browser-tools.d.ts +86 -0
  129. package/dist/browser/browser-tools.d.ts.map +1 -0
  130. package/dist/browser/browser-tools.js +329 -0
  131. package/dist/browser/browser-tools.js.map +1 -0
  132. package/dist/browser/camoufox-backend.d.ts +166 -0
  133. package/dist/browser/camoufox-backend.d.ts.map +1 -0
  134. package/dist/browser/camoufox-backend.js +500 -0
  135. package/dist/browser/camoufox-backend.js.map +1 -0
  136. package/dist/browser/chrome-bridge.d.ts +183 -0
  137. package/dist/browser/chrome-bridge.d.ts.map +1 -0
  138. package/dist/browser/chrome-bridge.js +607 -0
  139. package/dist/browser/chrome-bridge.js.map +1 -0
  140. package/dist/browser/tab-registry.d.ts +103 -0
  141. package/dist/browser/tab-registry.d.ts.map +1 -0
  142. package/dist/browser/tab-registry.js +191 -0
  143. package/dist/browser/tab-registry.js.map +1 -0
  144. package/dist/build/auth-provisioner.d.ts +55 -0
  145. package/dist/build/auth-provisioner.d.ts.map +1 -0
  146. package/dist/build/auth-provisioner.js +207 -0
  147. package/dist/build/auth-provisioner.js.map +1 -0
  148. package/dist/build/db-provisioner.d.ts +63 -0
  149. package/dist/build/db-provisioner.d.ts.map +1 -0
  150. package/dist/build/db-provisioner.js +254 -0
  151. package/dist/build/db-provisioner.js.map +1 -0
  152. package/dist/build/deploy-adapter.d.ts +72 -0
  153. package/dist/build/deploy-adapter.d.ts.map +1 -0
  154. package/dist/build/deploy-adapter.js +273 -0
  155. package/dist/build/deploy-adapter.js.map +1 -0
  156. package/dist/build/deploy-targets/coolify.d.ts +148 -0
  157. package/dist/build/deploy-targets/coolify.d.ts.map +1 -0
  158. package/dist/build/deploy-targets/coolify.js +339 -0
  159. package/dist/build/deploy-targets/coolify.js.map +1 -0
  160. package/dist/build/deploy-targets/dokploy.d.ts +139 -0
  161. package/dist/build/deploy-targets/dokploy.d.ts.map +1 -0
  162. package/dist/build/deploy-targets/dokploy.js +339 -0
  163. package/dist/build/deploy-targets/dokploy.js.map +1 -0
  164. package/dist/build/scaffold-pack-materializer.d.ts +108 -0
  165. package/dist/build/scaffold-pack-materializer.d.ts.map +1 -0
  166. package/dist/build/scaffold-pack-materializer.js +235 -0
  167. package/dist/build/scaffold-pack-materializer.js.map +1 -0
  168. package/dist/build/scaffold-registry.d.ts +103 -0
  169. package/dist/build/scaffold-registry.d.ts.map +1 -0
  170. package/dist/build/scaffold-registry.js +279 -0
  171. package/dist/build/scaffold-registry.js.map +1 -0
  172. package/dist/channels/adapter.d.ts +94 -0
  173. package/dist/channels/adapter.d.ts.map +1 -0
  174. package/dist/channels/adapter.js +94 -0
  175. package/dist/channels/adapter.js.map +1 -0
  176. package/dist/channels/auto-detect.d.ts +165 -0
  177. package/dist/channels/auto-detect.d.ts.map +1 -0
  178. package/dist/channels/auto-detect.js +869 -0
  179. package/dist/channels/auto-detect.js.map +1 -0
  180. package/dist/channels/channel-types.d.ts +16 -0
  181. package/dist/channels/channel-types.d.ts.map +1 -0
  182. package/dist/channels/channel-types.js +15 -0
  183. package/dist/channels/channel-types.js.map +1 -0
  184. package/dist/channels/dingtalk.d.ts +65 -0
  185. package/dist/channels/dingtalk.d.ts.map +1 -0
  186. package/dist/channels/dingtalk.js +158 -0
  187. package/dist/channels/dingtalk.js.map +1 -0
  188. package/dist/channels/discord.d.ts +58 -0
  189. package/dist/channels/discord.d.ts.map +1 -0
  190. package/dist/channels/discord.js +257 -0
  191. package/dist/channels/discord.js.map +1 -0
  192. package/dist/channels/dispatch.d.ts +109 -0
  193. package/dist/channels/dispatch.d.ts.map +1 -0
  194. package/dist/channels/dispatch.js +266 -0
  195. package/dist/channels/dispatch.js.map +1 -0
  196. package/dist/channels/email.d.ts +42 -0
  197. package/dist/channels/email.d.ts.map +1 -0
  198. package/dist/channels/email.js +166 -0
  199. package/dist/channels/email.js.map +1 -0
  200. package/dist/channels/fan-out.d.ts +112 -0
  201. package/dist/channels/fan-out.d.ts.map +1 -0
  202. package/dist/channels/fan-out.js +202 -0
  203. package/dist/channels/fan-out.js.map +1 -0
  204. package/dist/channels/feishu.d.ts +85 -0
  205. package/dist/channels/feishu.d.ts.map +1 -0
  206. package/dist/channels/feishu.js +215 -0
  207. package/dist/channels/feishu.js.map +1 -0
  208. package/dist/channels/gateway.d.ts +207 -0
  209. package/dist/channels/gateway.d.ts.map +1 -0
  210. package/dist/channels/gateway.js +379 -0
  211. package/dist/channels/gateway.js.map +1 -0
  212. package/dist/channels/github-bot.d.ts +94 -0
  213. package/dist/channels/github-bot.d.ts.map +1 -0
  214. package/dist/channels/github-bot.js +318 -0
  215. package/dist/channels/github-bot.js.map +1 -0
  216. package/dist/channels/google-chat.d.ts +40 -0
  217. package/dist/channels/google-chat.d.ts.map +1 -0
  218. package/dist/channels/google-chat.js +84 -0
  219. package/dist/channels/google-chat.js.map +1 -0
  220. package/dist/channels/ide-bridge.d.ts +77 -0
  221. package/dist/channels/ide-bridge.d.ts.map +1 -0
  222. package/dist/channels/ide-bridge.js +316 -0
  223. package/dist/channels/ide-bridge.js.map +1 -0
  224. package/dist/channels/imessage-gateway-adapter.d.ts +25 -0
  225. package/dist/channels/imessage-gateway-adapter.d.ts.map +1 -0
  226. package/dist/channels/imessage-gateway-adapter.js +57 -0
  227. package/dist/channels/imessage-gateway-adapter.js.map +1 -0
  228. package/dist/channels/imessage.d.ts +45 -0
  229. package/dist/channels/imessage.d.ts.map +1 -0
  230. package/dist/channels/imessage.js +140 -0
  231. package/dist/channels/imessage.js.map +1 -0
  232. package/dist/channels/integration.d.ts +16 -0
  233. package/dist/channels/integration.d.ts.map +1 -0
  234. package/dist/channels/integration.js +79 -0
  235. package/dist/channels/integration.js.map +1 -0
  236. package/dist/channels/irc.d.ts +58 -0
  237. package/dist/channels/irc.d.ts.map +1 -0
  238. package/dist/channels/irc.js +188 -0
  239. package/dist/channels/irc.js.map +1 -0
  240. package/dist/channels/line.d.ts +75 -0
  241. package/dist/channels/line.d.ts.map +1 -0
  242. package/dist/channels/line.js +226 -0
  243. package/dist/channels/line.js.map +1 -0
  244. package/dist/channels/mastodon.d.ts +82 -0
  245. package/dist/channels/mastodon.d.ts.map +1 -0
  246. package/dist/channels/mastodon.js +217 -0
  247. package/dist/channels/mastodon.js.map +1 -0
  248. package/dist/channels/matrix.d.ts +36 -0
  249. package/dist/channels/matrix.d.ts.map +1 -0
  250. package/dist/channels/matrix.js +161 -0
  251. package/dist/channels/matrix.js.map +1 -0
  252. package/dist/channels/push-inversion.d.ts +63 -0
  253. package/dist/channels/push-inversion.d.ts.map +1 -0
  254. package/dist/channels/push-inversion.js +167 -0
  255. package/dist/channels/push-inversion.js.map +1 -0
  256. package/dist/channels/route-policies.d.ts +144 -0
  257. package/dist/channels/route-policies.d.ts.map +1 -0
  258. package/dist/channels/route-policies.js +374 -0
  259. package/dist/channels/route-policies.js.map +1 -0
  260. package/dist/channels/signal.d.ts +25 -0
  261. package/dist/channels/signal.d.ts.map +1 -0
  262. package/dist/channels/signal.js +109 -0
  263. package/dist/channels/signal.js.map +1 -0
  264. package/dist/channels/slack.d.ts +52 -0
  265. package/dist/channels/slack.d.ts.map +1 -0
  266. package/dist/channels/slack.js +194 -0
  267. package/dist/channels/slack.js.map +1 -0
  268. package/dist/channels/sms.d.ts +63 -0
  269. package/dist/channels/sms.d.ts.map +1 -0
  270. package/dist/channels/sms.js +151 -0
  271. package/dist/channels/sms.js.map +1 -0
  272. package/dist/channels/teams.d.ts +120 -0
  273. package/dist/channels/teams.d.ts.map +1 -0
  274. package/dist/channels/teams.js +263 -0
  275. package/dist/channels/teams.js.map +1 -0
  276. package/dist/channels/telegram.d.ts +55 -0
  277. package/dist/channels/telegram.d.ts.map +1 -0
  278. package/dist/channels/telegram.js +187 -0
  279. package/dist/channels/telegram.js.map +1 -0
  280. package/dist/channels/terminal-mention.d.ts +43 -0
  281. package/dist/channels/terminal-mention.d.ts.map +1 -0
  282. package/dist/channels/terminal-mention.js +86 -0
  283. package/dist/channels/terminal-mention.js.map +1 -0
  284. package/dist/channels/unified-dispatch.d.ts +190 -0
  285. package/dist/channels/unified-dispatch.d.ts.map +1 -0
  286. package/dist/channels/unified-dispatch.js +554 -0
  287. package/dist/channels/unified-dispatch.js.map +1 -0
  288. package/dist/channels/viber.d.ts +72 -0
  289. package/dist/channels/viber.d.ts.map +1 -0
  290. package/dist/channels/viber.js +185 -0
  291. package/dist/channels/viber.js.map +1 -0
  292. package/dist/channels/webchat.d.ts +44 -0
  293. package/dist/channels/webchat.d.ts.map +1 -0
  294. package/dist/channels/webchat.js +218 -0
  295. package/dist/channels/webchat.js.map +1 -0
  296. package/dist/channels/webhook-router.d.ts +155 -0
  297. package/dist/channels/webhook-router.d.ts.map +1 -0
  298. package/dist/channels/webhook-router.js +411 -0
  299. package/dist/channels/webhook-router.js.map +1 -0
  300. package/dist/channels/webhook.d.ts +28 -0
  301. package/dist/channels/webhook.d.ts.map +1 -0
  302. package/dist/channels/webhook.js +129 -0
  303. package/dist/channels/webhook.js.map +1 -0
  304. package/dist/channels/wechat.d.ts +68 -0
  305. package/dist/channels/wechat.d.ts.map +1 -0
  306. package/dist/channels/wechat.js +196 -0
  307. package/dist/channels/wechat.js.map +1 -0
  308. package/dist/channels/whatsapp.d.ts +74 -0
  309. package/dist/channels/whatsapp.d.ts.map +1 -0
  310. package/dist/channels/whatsapp.js +268 -0
  311. package/dist/channels/whatsapp.js.map +1 -0
  312. package/dist/claude/agents/definitions.d.ts +79 -0
  313. package/dist/claude/agents/definitions.d.ts.map +1 -0
  314. package/dist/claude/agents/definitions.js +196 -0
  315. package/dist/claude/agents/definitions.js.map +1 -0
  316. package/dist/claude/agents/index.d.ts +6 -0
  317. package/dist/claude/agents/index.d.ts.map +1 -0
  318. package/dist/claude/agents/index.js +5 -0
  319. package/dist/claude/agents/index.js.map +1 -0
  320. package/dist/claude/bridge-deps.d.ts +47 -0
  321. package/dist/claude/bridge-deps.d.ts.map +1 -0
  322. package/dist/claude/bridge-deps.js +251 -0
  323. package/dist/claude/bridge-deps.js.map +1 -0
  324. package/dist/claude/bridge.d.ts +65 -0
  325. package/dist/claude/bridge.d.ts.map +1 -0
  326. package/dist/claude/bridge.js +110 -0
  327. package/dist/claude/bridge.js.map +1 -0
  328. package/dist/claude/channels/index.d.ts +6 -0
  329. package/dist/claude/channels/index.d.ts.map +1 -0
  330. package/dist/claude/channels/index.js +5 -0
  331. package/dist/claude/channels/index.js.map +1 -0
  332. package/dist/claude/channels/wotann-channel.d.ts +103 -0
  333. package/dist/claude/channels/wotann-channel.d.ts.map +1 -0
  334. package/dist/claude/channels/wotann-channel.js +224 -0
  335. package/dist/claude/channels/wotann-channel.js.map +1 -0
  336. package/dist/claude/hardening/error-handler.d.ts +52 -0
  337. package/dist/claude/hardening/error-handler.d.ts.map +1 -0
  338. package/dist/claude/hardening/error-handler.js +158 -0
  339. package/dist/claude/hardening/error-handler.js.map +1 -0
  340. package/dist/claude/hardening/feature-flag.d.ts +36 -0
  341. package/dist/claude/hardening/feature-flag.d.ts.map +1 -0
  342. package/dist/claude/hardening/feature-flag.js +70 -0
  343. package/dist/claude/hardening/feature-flag.js.map +1 -0
  344. package/dist/claude/hardening/index.d.ts +8 -0
  345. package/dist/claude/hardening/index.d.ts.map +1 -0
  346. package/dist/claude/hardening/index.js +6 -0
  347. package/dist/claude/hardening/index.js.map +1 -0
  348. package/dist/claude/hardening/telemetry.d.ts +64 -0
  349. package/dist/claude/hardening/telemetry.d.ts.map +1 -0
  350. package/dist/claude/hardening/telemetry.js +129 -0
  351. package/dist/claude/hardening/telemetry.js.map +1 -0
  352. package/dist/claude/hooks/config-builder.d.ts +37 -0
  353. package/dist/claude/hooks/config-builder.d.ts.map +1 -0
  354. package/dist/claude/hooks/config-builder.js +55 -0
  355. package/dist/claude/hooks/config-builder.js.map +1 -0
  356. package/dist/claude/hooks/index.d.ts +19 -0
  357. package/dist/claude/hooks/index.d.ts.map +1 -0
  358. package/dist/claude/hooks/index.js +17 -0
  359. package/dist/claude/hooks/index.js.map +1 -0
  360. package/dist/claude/hooks/post-tool-use.d.ts +16 -0
  361. package/dist/claude/hooks/post-tool-use.d.ts.map +1 -0
  362. package/dist/claude/hooks/post-tool-use.js +91 -0
  363. package/dist/claude/hooks/post-tool-use.js.map +1 -0
  364. package/dist/claude/hooks/pre-compact.d.ts +14 -0
  365. package/dist/claude/hooks/pre-compact.d.ts.map +1 -0
  366. package/dist/claude/hooks/pre-compact.js +30 -0
  367. package/dist/claude/hooks/pre-compact.js.map +1 -0
  368. package/dist/claude/hooks/pre-tool-use.d.ts +24 -0
  369. package/dist/claude/hooks/pre-tool-use.d.ts.map +1 -0
  370. package/dist/claude/hooks/pre-tool-use.js +120 -0
  371. package/dist/claude/hooks/pre-tool-use.js.map +1 -0
  372. package/dist/claude/hooks/server.d.ts +67 -0
  373. package/dist/claude/hooks/server.d.ts.map +1 -0
  374. package/dist/claude/hooks/server.js +396 -0
  375. package/dist/claude/hooks/server.js.map +1 -0
  376. package/dist/claude/hooks/session-start.d.ts +20 -0
  377. package/dist/claude/hooks/session-start.d.ts.map +1 -0
  378. package/dist/claude/hooks/session-start.js +55 -0
  379. package/dist/claude/hooks/session-start.js.map +1 -0
  380. package/dist/claude/hooks/stop.d.ts +19 -0
  381. package/dist/claude/hooks/stop.d.ts.map +1 -0
  382. package/dist/claude/hooks/stop.js +57 -0
  383. package/dist/claude/hooks/stop.js.map +1 -0
  384. package/dist/claude/hooks/user-prompt-submit.d.ts +20 -0
  385. package/dist/claude/hooks/user-prompt-submit.d.ts.map +1 -0
  386. package/dist/claude/hooks/user-prompt-submit.js +59 -0
  387. package/dist/claude/hooks/user-prompt-submit.js.map +1 -0
  388. package/dist/claude/index.d.ts +30 -0
  389. package/dist/claude/index.d.ts.map +1 -0
  390. package/dist/claude/index.js +27 -0
  391. package/dist/claude/index.js.map +1 -0
  392. package/dist/claude/types.d.ts +206 -0
  393. package/dist/claude/types.d.ts.map +1 -0
  394. package/dist/claude/types.js +27 -0
  395. package/dist/claude/types.js.map +1 -0
  396. package/dist/cli/audit.d.ts +17 -0
  397. package/dist/cli/audit.d.ts.map +1 -0
  398. package/dist/cli/audit.js +54 -0
  399. package/dist/cli/audit.js.map +1 -0
  400. package/dist/cli/autofix-pr.d.ts +40 -0
  401. package/dist/cli/autofix-pr.d.ts.map +1 -0
  402. package/dist/cli/autofix-pr.js +199 -0
  403. package/dist/cli/autofix-pr.js.map +1 -0
  404. package/dist/cli/away-summary.d.ts +62 -0
  405. package/dist/cli/away-summary.d.ts.map +1 -0
  406. package/dist/cli/away-summary.js +141 -0
  407. package/dist/cli/away-summary.js.map +1 -0
  408. package/dist/cli/ci-runner.d.ts +52 -0
  409. package/dist/cli/ci-runner.d.ts.map +1 -0
  410. package/dist/cli/ci-runner.js +143 -0
  411. package/dist/cli/ci-runner.js.map +1 -0
  412. package/dist/cli/cli-detection.d.ts +41 -0
  413. package/dist/cli/cli-detection.d.ts.map +1 -0
  414. package/dist/cli/cli-detection.js +148 -0
  415. package/dist/cli/cli-detection.js.map +1 -0
  416. package/dist/cli/commands/acp-register.d.ts +73 -0
  417. package/dist/cli/commands/acp-register.d.ts.map +1 -0
  418. package/dist/cli/commands/acp-register.js +134 -0
  419. package/dist/cli/commands/acp-register.js.map +1 -0
  420. package/dist/cli/commands/best-of-n.d.ts +74 -0
  421. package/dist/cli/commands/best-of-n.d.ts.map +1 -0
  422. package/dist/cli/commands/best-of-n.js +144 -0
  423. package/dist/cli/commands/best-of-n.js.map +1 -0
  424. package/dist/cli/commands/browse.d.ts +46 -0
  425. package/dist/cli/commands/browse.d.ts.map +1 -0
  426. package/dist/cli/commands/browse.js +230 -0
  427. package/dist/cli/commands/browse.js.map +1 -0
  428. package/dist/cli/commands/build.d.ts +92 -0
  429. package/dist/cli/commands/build.d.ts.map +1 -0
  430. package/dist/cli/commands/build.js +238 -0
  431. package/dist/cli/commands/build.js.map +1 -0
  432. package/dist/cli/commands/deploy.d.ts +60 -0
  433. package/dist/cli/commands/deploy.d.ts.map +1 -0
  434. package/dist/cli/commands/deploy.js +107 -0
  435. package/dist/cli/commands/deploy.js.map +1 -0
  436. package/dist/cli/commands/design-apply.d.ts +81 -0
  437. package/dist/cli/commands/design-apply.d.ts.map +1 -0
  438. package/dist/cli/commands/design-apply.js +122 -0
  439. package/dist/cli/commands/design-apply.js.map +1 -0
  440. package/dist/cli/commands/design-export.d.ts +62 -0
  441. package/dist/cli/commands/design-export.d.ts.map +1 -0
  442. package/dist/cli/commands/design-export.js +88 -0
  443. package/dist/cli/commands/design-export.js.map +1 -0
  444. package/dist/cli/commands/design-extract.d.ts +40 -0
  445. package/dist/cli/commands/design-extract.d.ts.map +1 -0
  446. package/dist/cli/commands/design-extract.js +72 -0
  447. package/dist/cli/commands/design-extract.js.map +1 -0
  448. package/dist/cli/commands/design-lint.d.ts +49 -0
  449. package/dist/cli/commands/design-lint.d.ts.map +1 -0
  450. package/dist/cli/commands/design-lint.js +235 -0
  451. package/dist/cli/commands/design-lint.js.map +1 -0
  452. package/dist/cli/commands/design-mode.d.ts +50 -0
  453. package/dist/cli/commands/design-mode.d.ts.map +1 -0
  454. package/dist/cli/commands/design-mode.js +311 -0
  455. package/dist/cli/commands/design-mode.js.map +1 -0
  456. package/dist/cli/commands/design-preview.d.ts +69 -0
  457. package/dist/cli/commands/design-preview.d.ts.map +1 -0
  458. package/dist/cli/commands/design-preview.js +171 -0
  459. package/dist/cli/commands/design-preview.js.map +1 -0
  460. package/dist/cli/commands/design-verify.d.ts +59 -0
  461. package/dist/cli/commands/design-verify.d.ts.map +1 -0
  462. package/dist/cli/commands/design-verify.js +74 -0
  463. package/dist/cli/commands/design-verify.js.map +1 -0
  464. package/dist/cli/commands/exploit.d.ts +126 -0
  465. package/dist/cli/commands/exploit.d.ts.map +1 -0
  466. package/dist/cli/commands/exploit.js +298 -0
  467. package/dist/cli/commands/exploit.js.map +1 -0
  468. package/dist/cli/commands/grep.d.ts +92 -0
  469. package/dist/cli/commands/grep.d.ts.map +1 -0
  470. package/dist/cli/commands/grep.js +221 -0
  471. package/dist/cli/commands/grep.js.map +1 -0
  472. package/dist/cli/commands/intent.d.ts +43 -0
  473. package/dist/cli/commands/intent.d.ts.map +1 -0
  474. package/dist/cli/commands/intent.js +282 -0
  475. package/dist/cli/commands/intent.js.map +1 -0
  476. package/dist/cli/commands/magic.d.ts +41 -0
  477. package/dist/cli/commands/magic.d.ts.map +1 -0
  478. package/dist/cli/commands/magic.js +67 -0
  479. package/dist/cli/commands/magic.js.map +1 -0
  480. package/dist/cli/commands/multitask.d.ts +62 -0
  481. package/dist/cli/commands/multitask.d.ts.map +1 -0
  482. package/dist/cli/commands/multitask.js +111 -0
  483. package/dist/cli/commands/multitask.js.map +1 -0
  484. package/dist/cli/commands/onboard.d.ts +44 -0
  485. package/dist/cli/commands/onboard.d.ts.map +1 -0
  486. package/dist/cli/commands/onboard.js +112 -0
  487. package/dist/cli/commands/onboard.js.map +1 -0
  488. package/dist/cli/commands/review.d.ts +139 -0
  489. package/dist/cli/commands/review.d.ts.map +1 -0
  490. package/dist/cli/commands/review.js +364 -0
  491. package/dist/cli/commands/review.js.map +1 -0
  492. package/dist/cli/commands/rules.d.ts +140 -0
  493. package/dist/cli/commands/rules.d.ts.map +1 -0
  494. package/dist/cli/commands/rules.js +251 -0
  495. package/dist/cli/commands/rules.js.map +1 -0
  496. package/dist/cli/commands/sandbox.d.ts +64 -0
  497. package/dist/cli/commands/sandbox.d.ts.map +1 -0
  498. package/dist/cli/commands/sandbox.js +69 -0
  499. package/dist/cli/commands/sandbox.js.map +1 -0
  500. package/dist/cli/commands/sop.d.ts +70 -0
  501. package/dist/cli/commands/sop.d.ts.map +1 -0
  502. package/dist/cli/commands/sop.js +152 -0
  503. package/dist/cli/commands/sop.js.map +1 -0
  504. package/dist/cli/commands/stuck.d.ts +51 -0
  505. package/dist/cli/commands/stuck.d.ts.map +1 -0
  506. package/dist/cli/commands/stuck.js +249 -0
  507. package/dist/cli/commands/stuck.js.map +1 -0
  508. package/dist/cli/commands/worktree.d.ts +49 -0
  509. package/dist/cli/commands/worktree.d.ts.map +1 -0
  510. package/dist/cli/commands/worktree.js +153 -0
  511. package/dist/cli/commands/worktree.js.map +1 -0
  512. package/dist/cli/commands.d.ts +30 -0
  513. package/dist/cli/commands.d.ts.map +1 -0
  514. package/dist/cli/commands.js +446 -0
  515. package/dist/cli/commands.js.map +1 -0
  516. package/dist/cli/components/AuthModeBanner.d.ts +43 -0
  517. package/dist/cli/components/AuthModeBanner.d.ts.map +1 -0
  518. package/dist/cli/components/AuthModeBanner.js +25 -0
  519. package/dist/cli/components/AuthModeBanner.js.map +1 -0
  520. package/dist/cli/debug-share.d.ts +94 -0
  521. package/dist/cli/debug-share.d.ts.map +1 -0
  522. package/dist/cli/debug-share.js +227 -0
  523. package/dist/cli/debug-share.js.map +1 -0
  524. package/dist/cli/first-run-runner-factory.d.ts +99 -0
  525. package/dist/cli/first-run-runner-factory.d.ts.map +1 -0
  526. package/dist/cli/first-run-runner-factory.js +188 -0
  527. package/dist/cli/first-run-runner-factory.js.map +1 -0
  528. package/dist/cli/first-run-success.d.ts +123 -0
  529. package/dist/cli/first-run-success.d.ts.map +1 -0
  530. package/dist/cli/first-run-success.js +124 -0
  531. package/dist/cli/first-run-success.js.map +1 -0
  532. package/dist/cli/fork.d.ts +80 -0
  533. package/dist/cli/fork.d.ts.map +1 -0
  534. package/dist/cli/fork.js +127 -0
  535. package/dist/cli/fork.js.map +1 -0
  536. package/dist/cli/hooks-browser.d.ts +142 -0
  537. package/dist/cli/hooks-browser.d.ts.map +1 -0
  538. package/dist/cli/hooks-browser.js +238 -0
  539. package/dist/cli/hooks-browser.js.map +1 -0
  540. package/dist/cli/local-status.d.ts +11 -0
  541. package/dist/cli/local-status.d.ts.map +1 -0
  542. package/dist/cli/local-status.js +56 -0
  543. package/dist/cli/local-status.js.map +1 -0
  544. package/dist/cli/loop-command.d.ts +46 -0
  545. package/dist/cli/loop-command.d.ts.map +1 -0
  546. package/dist/cli/loop-command.js +123 -0
  547. package/dist/cli/loop-command.js.map +1 -0
  548. package/dist/cli/onboarding-screens/done-screen.d.ts +23 -0
  549. package/dist/cli/onboarding-screens/done-screen.d.ts.map +1 -0
  550. package/dist/cli/onboarding-screens/done-screen.js +10 -0
  551. package/dist/cli/onboarding-screens/done-screen.js.map +1 -0
  552. package/dist/cli/onboarding-screens/first-run-screen.d.ts +27 -0
  553. package/dist/cli/onboarding-screens/first-run-screen.d.ts.map +1 -0
  554. package/dist/cli/onboarding-screens/first-run-screen.js +62 -0
  555. package/dist/cli/onboarding-screens/first-run-screen.js.map +1 -0
  556. package/dist/cli/onboarding-screens.d.ts +227 -0
  557. package/dist/cli/onboarding-screens.d.ts.map +1 -0
  558. package/dist/cli/onboarding-screens.js +467 -0
  559. package/dist/cli/onboarding-screens.js.map +1 -0
  560. package/dist/cli/onboarding.d.ts +34 -0
  561. package/dist/cli/onboarding.d.ts.map +1 -0
  562. package/dist/cli/onboarding.js +150 -0
  563. package/dist/cli/onboarding.js.map +1 -0
  564. package/dist/cli/orphan-wires/anthropic-write-cmd.d.ts +21 -0
  565. package/dist/cli/orphan-wires/anthropic-write-cmd.d.ts.map +1 -0
  566. package/dist/cli/orphan-wires/anthropic-write-cmd.js +83 -0
  567. package/dist/cli/orphan-wires/anthropic-write-cmd.js.map +1 -0
  568. package/dist/cli/orphan-wires/archon-cmd.d.ts +11 -0
  569. package/dist/cli/orphan-wires/archon-cmd.d.ts.map +1 -0
  570. package/dist/cli/orphan-wires/archon-cmd.js +74 -0
  571. package/dist/cli/orphan-wires/archon-cmd.js.map +1 -0
  572. package/dist/cli/orphan-wires/cli-anything-cmd.d.ts +17 -0
  573. package/dist/cli/orphan-wires/cli-anything-cmd.d.ts.map +1 -0
  574. package/dist/cli/orphan-wires/cli-anything-cmd.js +39 -0
  575. package/dist/cli/orphan-wires/cli-anything-cmd.js.map +1 -0
  576. package/dist/cli/orphan-wires/dev-search-cmd.d.ts +10 -0
  577. package/dist/cli/orphan-wires/dev-search-cmd.d.ts.map +1 -0
  578. package/dist/cli/orphan-wires/dev-search-cmd.js +28 -0
  579. package/dist/cli/orphan-wires/dev-search-cmd.js.map +1 -0
  580. package/dist/cli/orphan-wires/effort-mode-cmd.d.ts +8 -0
  581. package/dist/cli/orphan-wires/effort-mode-cmd.d.ts.map +1 -0
  582. package/dist/cli/orphan-wires/effort-mode-cmd.js +40 -0
  583. package/dist/cli/orphan-wires/effort-mode-cmd.js.map +1 -0
  584. package/dist/cli/orphan-wires/flow-cmd.d.ts +9 -0
  585. package/dist/cli/orphan-wires/flow-cmd.d.ts.map +1 -0
  586. package/dist/cli/orphan-wires/flow-cmd.js +64 -0
  587. package/dist/cli/orphan-wires/flow-cmd.js.map +1 -0
  588. package/dist/cli/orphan-wires/handoff-cmd.d.ts +11 -0
  589. package/dist/cli/orphan-wires/handoff-cmd.d.ts.map +1 -0
  590. package/dist/cli/orphan-wires/handoff-cmd.js +48 -0
  591. package/dist/cli/orphan-wires/handoff-cmd.js.map +1 -0
  592. package/dist/cli/orphan-wires/index.d.ts +20 -0
  593. package/dist/cli/orphan-wires/index.d.ts.map +1 -0
  594. package/dist/cli/orphan-wires/index.js +61 -0
  595. package/dist/cli/orphan-wires/index.js.map +1 -0
  596. package/dist/cli/orphan-wires/markitdown-cmd.d.ts +10 -0
  597. package/dist/cli/orphan-wires/markitdown-cmd.d.ts.map +1 -0
  598. package/dist/cli/orphan-wires/markitdown-cmd.js +44 -0
  599. package/dist/cli/orphan-wires/markitdown-cmd.js.map +1 -0
  600. package/dist/cli/orphan-wires/multitask-cmd.d.ts +8 -0
  601. package/dist/cli/orphan-wires/multitask-cmd.d.ts.map +1 -0
  602. package/dist/cli/orphan-wires/multitask-cmd.js +43 -0
  603. package/dist/cli/orphan-wires/multitask-cmd.js.map +1 -0
  604. package/dist/cli/orphan-wires/n8n-template-cmd.d.ts +7 -0
  605. package/dist/cli/orphan-wires/n8n-template-cmd.d.ts.map +1 -0
  606. package/dist/cli/orphan-wires/n8n-template-cmd.js +81 -0
  607. package/dist/cli/orphan-wires/n8n-template-cmd.js.map +1 -0
  608. package/dist/cli/orphan-wires/onboard-cmd.d.ts +9 -0
  609. package/dist/cli/orphan-wires/onboard-cmd.d.ts.map +1 -0
  610. package/dist/cli/orphan-wires/onboard-cmd.js +60 -0
  611. package/dist/cli/orphan-wires/onboard-cmd.js.map +1 -0
  612. package/dist/cli/orphan-wires/outline-cmd.d.ts +8 -0
  613. package/dist/cli/orphan-wires/outline-cmd.d.ts.map +1 -0
  614. package/dist/cli/orphan-wires/outline-cmd.js +47 -0
  615. package/dist/cli/orphan-wires/outline-cmd.js.map +1 -0
  616. package/dist/cli/orphan-wires/private-mode-cmd.d.ts +8 -0
  617. package/dist/cli/orphan-wires/private-mode-cmd.d.ts.map +1 -0
  618. package/dist/cli/orphan-wires/private-mode-cmd.js +51 -0
  619. package/dist/cli/orphan-wires/private-mode-cmd.js.map +1 -0
  620. package/dist/cli/orphan-wires/prompt-corpus-cmd.d.ts +7 -0
  621. package/dist/cli/orphan-wires/prompt-corpus-cmd.d.ts.map +1 -0
  622. package/dist/cli/orphan-wires/prompt-corpus-cmd.js +32 -0
  623. package/dist/cli/orphan-wires/prompt-corpus-cmd.js.map +1 -0
  624. package/dist/cli/orphan-wires/prompt-files-cmd.d.ts +7 -0
  625. package/dist/cli/orphan-wires/prompt-files-cmd.d.ts.map +1 -0
  626. package/dist/cli/orphan-wires/prompt-files-cmd.js +58 -0
  627. package/dist/cli/orphan-wires/prompt-files-cmd.js.map +1 -0
  628. package/dist/cli/orphan-wires/promptfoo-assert-cmd.d.ts +19 -0
  629. package/dist/cli/orphan-wires/promptfoo-assert-cmd.d.ts.map +1 -0
  630. package/dist/cli/orphan-wires/promptfoo-assert-cmd.js +81 -0
  631. package/dist/cli/orphan-wires/promptfoo-assert-cmd.js.map +1 -0
  632. package/dist/cli/orphan-wires/proof-of-work-cmd.d.ts +25 -0
  633. package/dist/cli/orphan-wires/proof-of-work-cmd.d.ts.map +1 -0
  634. package/dist/cli/orphan-wires/proof-of-work-cmd.js +132 -0
  635. package/dist/cli/orphan-wires/proof-of-work-cmd.js.map +1 -0
  636. package/dist/cli/orphan-wires/redteam-cmd.d.ts +7 -0
  637. package/dist/cli/orphan-wires/redteam-cmd.d.ts.map +1 -0
  638. package/dist/cli/orphan-wires/redteam-cmd.js +26 -0
  639. package/dist/cli/orphan-wires/redteam-cmd.js.map +1 -0
  640. package/dist/cli/orphan-wires/skill-catalog-cmd.d.ts +22 -0
  641. package/dist/cli/orphan-wires/skill-catalog-cmd.d.ts.map +1 -0
  642. package/dist/cli/orphan-wires/skill-catalog-cmd.js +92 -0
  643. package/dist/cli/orphan-wires/skill-catalog-cmd.js.map +1 -0
  644. package/dist/cli/repl-mode.d.ts +62 -0
  645. package/dist/cli/repl-mode.d.ts.map +1 -0
  646. package/dist/cli/repl-mode.js +178 -0
  647. package/dist/cli/repl-mode.js.map +1 -0
  648. package/dist/cli/replay.d.ts +100 -0
  649. package/dist/cli/replay.d.ts.map +1 -0
  650. package/dist/cli/replay.js +147 -0
  651. package/dist/cli/replay.js.map +1 -0
  652. package/dist/cli/run-onboarding-wizard.d.ts +81 -0
  653. package/dist/cli/run-onboarding-wizard.d.ts.map +1 -0
  654. package/dist/cli/run-onboarding-wizard.js +182 -0
  655. package/dist/cli/run-onboarding-wizard.js.map +1 -0
  656. package/dist/cli/runtime-query.d.ts +24 -0
  657. package/dist/cli/runtime-query.d.ts.map +1 -0
  658. package/dist/cli/runtime-query.js +49 -0
  659. package/dist/cli/runtime-query.js.map +1 -0
  660. package/dist/cli/safety/read-only-gate.d.ts +86 -0
  661. package/dist/cli/safety/read-only-gate.d.ts.map +1 -0
  662. package/dist/cli/safety/read-only-gate.js +115 -0
  663. package/dist/cli/safety/read-only-gate.js.map +1 -0
  664. package/dist/cli/self-improve.d.ts +41 -0
  665. package/dist/cli/self-improve.d.ts.map +1 -0
  666. package/dist/cli/self-improve.js +140 -0
  667. package/dist/cli/self-improve.js.map +1 -0
  668. package/dist/cli/session-recap.d.ts +109 -0
  669. package/dist/cli/session-recap.d.ts.map +1 -0
  670. package/dist/cli/session-recap.js +176 -0
  671. package/dist/cli/session-recap.js.map +1 -0
  672. package/dist/cli/team-onboarding.d.ts +51 -0
  673. package/dist/cli/team-onboarding.d.ts.map +1 -0
  674. package/dist/cli/team-onboarding.js +326 -0
  675. package/dist/cli/team-onboarding.js.map +1 -0
  676. package/dist/cli/test-provider.d.ts +6 -0
  677. package/dist/cli/test-provider.d.ts.map +1 -0
  678. package/dist/cli/test-provider.js +100 -0
  679. package/dist/cli/test-provider.js.map +1 -0
  680. package/dist/cli/thin-client.d.ts +86 -0
  681. package/dist/cli/thin-client.d.ts.map +1 -0
  682. package/dist/cli/thin-client.js +237 -0
  683. package/dist/cli/thin-client.js.map +1 -0
  684. package/dist/cli/tricks/completion-checklist.d.ts +58 -0
  685. package/dist/cli/tricks/completion-checklist.d.ts.map +1 -0
  686. package/dist/cli/tricks/completion-checklist.js +121 -0
  687. package/dist/cli/tricks/completion-checklist.js.map +1 -0
  688. package/dist/cli/tricks/image-read.d.ts +45 -0
  689. package/dist/cli/tricks/image-read.d.ts.map +1 -0
  690. package/dist/cli/tricks/image-read.js +74 -0
  691. package/dist/cli/tricks/image-read.js.map +1 -0
  692. package/dist/cli/tricks/terminal-run.d.ts +73 -0
  693. package/dist/cli/tricks/terminal-run.d.ts.map +1 -0
  694. package/dist/cli/tricks/terminal-run.js +91 -0
  695. package/dist/cli/tricks/terminal-run.js.map +1 -0
  696. package/dist/cli/tricks/tmux-pull.d.ts +67 -0
  697. package/dist/cli/tricks/tmux-pull.d.ts.map +1 -0
  698. package/dist/cli/tricks/tmux-pull.js +77 -0
  699. package/dist/cli/tricks/tmux-pull.js.map +1 -0
  700. package/dist/cli/voice-cmds.d.ts +37 -0
  701. package/dist/cli/voice-cmds.d.ts.map +1 -0
  702. package/dist/cli/voice-cmds.js +83 -0
  703. package/dist/cli/voice-cmds.js.map +1 -0
  704. package/dist/cli/voice.d.ts +12 -0
  705. package/dist/cli/voice.d.ts.map +1 -0
  706. package/dist/cli/voice.js +15 -0
  707. package/dist/cli/voice.js.map +1 -0
  708. package/dist/cli/watch-mode.d.ts +64 -0
  709. package/dist/cli/watch-mode.d.ts.map +1 -0
  710. package/dist/cli/watch-mode.js +214 -0
  711. package/dist/cli/watch-mode.js.map +1 -0
  712. package/dist/computer-use/action-repertoire.d.ts +117 -0
  713. package/dist/computer-use/action-repertoire.d.ts.map +1 -0
  714. package/dist/computer-use/action-repertoire.js +214 -0
  715. package/dist/computer-use/action-repertoire.js.map +1 -0
  716. package/dist/computer-use/action-replay.d.ts +103 -0
  717. package/dist/computer-use/action-replay.d.ts.map +1 -0
  718. package/dist/computer-use/action-replay.js +160 -0
  719. package/dist/computer-use/action-replay.js.map +1 -0
  720. package/dist/computer-use/computer-agent.d.ts +124 -0
  721. package/dist/computer-use/computer-agent.d.ts.map +1 -0
  722. package/dist/computer-use/computer-agent.js +378 -0
  723. package/dist/computer-use/computer-agent.js.map +1 -0
  724. package/dist/computer-use/confidence-gate.d.ts +80 -0
  725. package/dist/computer-use/confidence-gate.d.ts.map +1 -0
  726. package/dist/computer-use/confidence-gate.js +111 -0
  727. package/dist/computer-use/confidence-gate.js.map +1 -0
  728. package/dist/computer-use/cursor-sprite.d.ts +103 -0
  729. package/dist/computer-use/cursor-sprite.d.ts.map +1 -0
  730. package/dist/computer-use/cursor-sprite.js +193 -0
  731. package/dist/computer-use/cursor-sprite.js.map +1 -0
  732. package/dist/computer-use/non-stealing-input.d.ts +79 -0
  733. package/dist/computer-use/non-stealing-input.d.ts.map +1 -0
  734. package/dist/computer-use/non-stealing-input.js +133 -0
  735. package/dist/computer-use/non-stealing-input.js.map +1 -0
  736. package/dist/computer-use/perception-adapter.d.ts +56 -0
  737. package/dist/computer-use/perception-adapter.d.ts.map +1 -0
  738. package/dist/computer-use/perception-adapter.js +216 -0
  739. package/dist/computer-use/perception-adapter.js.map +1 -0
  740. package/dist/computer-use/perception-engine.d.ts +203 -0
  741. package/dist/computer-use/perception-engine.d.ts.map +1 -0
  742. package/dist/computer-use/perception-engine.js +886 -0
  743. package/dist/computer-use/perception-engine.js.map +1 -0
  744. package/dist/computer-use/persistent-task-queue.d.ts +85 -0
  745. package/dist/computer-use/persistent-task-queue.d.ts.map +1 -0
  746. package/dist/computer-use/persistent-task-queue.js +182 -0
  747. package/dist/computer-use/persistent-task-queue.js.map +1 -0
  748. package/dist/computer-use/platform-bindings.d.ts +115 -0
  749. package/dist/computer-use/platform-bindings.d.ts.map +1 -0
  750. package/dist/computer-use/platform-bindings.js +783 -0
  751. package/dist/computer-use/platform-bindings.js.map +1 -0
  752. package/dist/computer-use/session-scoped-perception.d.ts +111 -0
  753. package/dist/computer-use/session-scoped-perception.d.ts.map +1 -0
  754. package/dist/computer-use/session-scoped-perception.js +262 -0
  755. package/dist/computer-use/session-scoped-perception.js.map +1 -0
  756. package/dist/computer-use/types.d.ts +157 -0
  757. package/dist/computer-use/types.d.ts.map +1 -0
  758. package/dist/computer-use/types.js +5 -0
  759. package/dist/computer-use/types.js.map +1 -0
  760. package/dist/computer-use/virtual-cursor-pool.d.ts +98 -0
  761. package/dist/computer-use/virtual-cursor-pool.d.ts.map +1 -0
  762. package/dist/computer-use/virtual-cursor-pool.js +231 -0
  763. package/dist/computer-use/virtual-cursor-pool.js.map +1 -0
  764. package/dist/computer-use/vm-isolation.d.ts +90 -0
  765. package/dist/computer-use/vm-isolation.d.ts.map +1 -0
  766. package/dist/computer-use/vm-isolation.js +140 -0
  767. package/dist/computer-use/vm-isolation.js.map +1 -0
  768. package/dist/connectors/confluence.d.ts +32 -0
  769. package/dist/connectors/confluence.d.ts.map +1 -0
  770. package/dist/connectors/confluence.js +132 -0
  771. package/dist/connectors/confluence.js.map +1 -0
  772. package/dist/connectors/connector-registry.d.ts +115 -0
  773. package/dist/connectors/connector-registry.d.ts.map +1 -0
  774. package/dist/connectors/connector-registry.js +166 -0
  775. package/dist/connectors/connector-registry.js.map +1 -0
  776. package/dist/connectors/connector-tools.d.ts +229 -0
  777. package/dist/connectors/connector-tools.d.ts.map +1 -0
  778. package/dist/connectors/connector-tools.js +778 -0
  779. package/dist/connectors/connector-tools.js.map +1 -0
  780. package/dist/connectors/connector-webhook-server.d.ts +138 -0
  781. package/dist/connectors/connector-webhook-server.d.ts.map +1 -0
  782. package/dist/connectors/connector-webhook-server.js +374 -0
  783. package/dist/connectors/connector-webhook-server.js.map +1 -0
  784. package/dist/connectors/connector-writes.d.ts +253 -0
  785. package/dist/connectors/connector-writes.d.ts.map +1 -0
  786. package/dist/connectors/connector-writes.js +1044 -0
  787. package/dist/connectors/connector-writes.js.map +1 -0
  788. package/dist/connectors/google-drive.d.ts +35 -0
  789. package/dist/connectors/google-drive.d.ts.map +1 -0
  790. package/dist/connectors/google-drive.js +222 -0
  791. package/dist/connectors/google-drive.js.map +1 -0
  792. package/dist/connectors/guarded-fetch.d.ts +23 -0
  793. package/dist/connectors/guarded-fetch.d.ts.map +1 -0
  794. package/dist/connectors/guarded-fetch.js +30 -0
  795. package/dist/connectors/guarded-fetch.js.map +1 -0
  796. package/dist/connectors/jira.d.ts +35 -0
  797. package/dist/connectors/jira.d.ts.map +1 -0
  798. package/dist/connectors/jira.js +220 -0
  799. package/dist/connectors/jira.js.map +1 -0
  800. package/dist/connectors/linear.d.ts +32 -0
  801. package/dist/connectors/linear.d.ts.map +1 -0
  802. package/dist/connectors/linear.js +232 -0
  803. package/dist/connectors/linear.js.map +1 -0
  804. package/dist/connectors/notion.d.ts +33 -0
  805. package/dist/connectors/notion.d.ts.map +1 -0
  806. package/dist/connectors/notion.js +244 -0
  807. package/dist/connectors/notion.js.map +1 -0
  808. package/dist/connectors/slack.d.ts +30 -0
  809. package/dist/connectors/slack.d.ts.map +1 -0
  810. package/dist/connectors/slack.js +127 -0
  811. package/dist/connectors/slack.js.map +1 -0
  812. package/dist/context/budget-estimator.d.ts +83 -0
  813. package/dist/context/budget-estimator.d.ts.map +1 -0
  814. package/dist/context/budget-estimator.js +236 -0
  815. package/dist/context/budget-estimator.js.map +1 -0
  816. package/dist/context/compaction.d.ts +64 -0
  817. package/dist/context/compaction.d.ts.map +1 -0
  818. package/dist/context/compaction.js +192 -0
  819. package/dist/context/compaction.js.map +1 -0
  820. package/dist/context/context-replay.d.ts +62 -0
  821. package/dist/context/context-replay.d.ts.map +1 -0
  822. package/dist/context/context-replay.js +220 -0
  823. package/dist/context/context-replay.js.map +1 -0
  824. package/dist/context/context-sharding.d.ts +113 -0
  825. package/dist/context/context-sharding.d.ts.map +1 -0
  826. package/dist/context/context-sharding.js +364 -0
  827. package/dist/context/context-sharding.js.map +1 -0
  828. package/dist/context/importance-compactor.d.ts +74 -0
  829. package/dist/context/importance-compactor.d.ts.map +1 -0
  830. package/dist/context/importance-compactor.js +111 -0
  831. package/dist/context/importance-compactor.js.map +1 -0
  832. package/dist/context/inspector.d.ts +86 -0
  833. package/dist/context/inspector.d.ts.map +1 -0
  834. package/dist/context/inspector.js +170 -0
  835. package/dist/context/inspector.js.map +1 -0
  836. package/dist/context/limits.d.ts +94 -0
  837. package/dist/context/limits.d.ts.map +1 -0
  838. package/dist/context/limits.js +640 -0
  839. package/dist/context/limits.js.map +1 -0
  840. package/dist/context/maximizer.d.ts +138 -0
  841. package/dist/context/maximizer.d.ts.map +1 -0
  842. package/dist/context/maximizer.js +334 -0
  843. package/dist/context/maximizer.js.map +1 -0
  844. package/dist/context/ollama-kv-compression.d.ts +85 -0
  845. package/dist/context/ollama-kv-compression.d.ts.map +1 -0
  846. package/dist/context/ollama-kv-compression.js +263 -0
  847. package/dist/context/ollama-kv-compression.js.map +1 -0
  848. package/dist/context/repo-map.d.ts +38 -0
  849. package/dist/context/repo-map.d.ts.map +1 -0
  850. package/dist/context/repo-map.js +277 -0
  851. package/dist/context/repo-map.js.map +1 -0
  852. package/dist/context/sleep-summarizer.d.ts +77 -0
  853. package/dist/context/sleep-summarizer.d.ts.map +1 -0
  854. package/dist/context/sleep-summarizer.js +161 -0
  855. package/dist/context/sleep-summarizer.js.map +1 -0
  856. package/dist/context/spaces.d.ts +53 -0
  857. package/dist/context/spaces.d.ts.map +1 -0
  858. package/dist/context/spaces.js +92 -0
  859. package/dist/context/spaces.js.map +1 -0
  860. package/dist/context/tiered-loader.d.ts +62 -0
  861. package/dist/context/tiered-loader.d.ts.map +1 -0
  862. package/dist/context/tiered-loader.js +453 -0
  863. package/dist/context/tiered-loader.js.map +1 -0
  864. package/dist/context/tool-arg-truncator.d.ts +69 -0
  865. package/dist/context/tool-arg-truncator.d.ts.map +1 -0
  866. package/dist/context/tool-arg-truncator.js +212 -0
  867. package/dist/context/tool-arg-truncator.js.map +1 -0
  868. package/dist/context/virtual-context.d.ts +89 -0
  869. package/dist/context/virtual-context.d.ts.map +1 -0
  870. package/dist/context/virtual-context.js +289 -0
  871. package/dist/context/virtual-context.js.map +1 -0
  872. package/dist/context/window-intelligence.d.ts +221 -0
  873. package/dist/context/window-intelligence.d.ts.map +1 -0
  874. package/dist/context/window-intelligence.js +485 -0
  875. package/dist/context/window-intelligence.js.map +1 -0
  876. package/dist/core/agent-bridge.d.ts +80 -0
  877. package/dist/core/agent-bridge.d.ts.map +1 -0
  878. package/dist/core/agent-bridge.js +473 -0
  879. package/dist/core/agent-bridge.js.map +1 -0
  880. package/dist/core/agent-profiles.d.ts +65 -0
  881. package/dist/core/agent-profiles.d.ts.map +1 -0
  882. package/dist/core/agent-profiles.js +137 -0
  883. package/dist/core/agent-profiles.js.map +1 -0
  884. package/dist/core/bootstrap-snapshot.d.ts +125 -0
  885. package/dist/core/bootstrap-snapshot.d.ts.map +1 -0
  886. package/dist/core/bootstrap-snapshot.js +513 -0
  887. package/dist/core/bootstrap-snapshot.js.map +1 -0
  888. package/dist/core/config-discovery.d.ts +103 -0
  889. package/dist/core/config-discovery.d.ts.map +1 -0
  890. package/dist/core/config-discovery.js +336 -0
  891. package/dist/core/config-discovery.js.map +1 -0
  892. package/dist/core/config-migration.d.ts +69 -0
  893. package/dist/core/config-migration.d.ts.map +1 -0
  894. package/dist/core/config-migration.js +185 -0
  895. package/dist/core/config-migration.js.map +1 -0
  896. package/dist/core/config.d.ts +22 -0
  897. package/dist/core/config.d.ts.map +1 -0
  898. package/dist/core/config.js +253 -0
  899. package/dist/core/config.js.map +1 -0
  900. package/dist/core/content-cid.d.ts +85 -0
  901. package/dist/core/content-cid.d.ts.map +1 -0
  902. package/dist/core/content-cid.js +135 -0
  903. package/dist/core/content-cid.js.map +1 -0
  904. package/dist/core/conversation-branching.d.ts +93 -0
  905. package/dist/core/conversation-branching.d.ts.map +1 -0
  906. package/dist/core/conversation-branching.js +215 -0
  907. package/dist/core/conversation-branching.js.map +1 -0
  908. package/dist/core/conversation-tree.d.ts +107 -0
  909. package/dist/core/conversation-tree.d.ts.map +1 -0
  910. package/dist/core/conversation-tree.js +211 -0
  911. package/dist/core/conversation-tree.js.map +1 -0
  912. package/dist/core/deep-link.d.ts +50 -0
  913. package/dist/core/deep-link.d.ts.map +1 -0
  914. package/dist/core/deep-link.js +212 -0
  915. package/dist/core/deep-link.js.map +1 -0
  916. package/dist/core/default-provider.d.ts +28 -0
  917. package/dist/core/default-provider.d.ts.map +1 -0
  918. package/dist/core/default-provider.js +90 -0
  919. package/dist/core/default-provider.js.map +1 -0
  920. package/dist/core/effort-mode.d.ts +81 -0
  921. package/dist/core/effort-mode.d.ts.map +1 -0
  922. package/dist/core/effort-mode.js +191 -0
  923. package/dist/core/effort-mode.js.map +1 -0
  924. package/dist/core/execution-modes.d.ts +103 -0
  925. package/dist/core/execution-modes.d.ts.map +1 -0
  926. package/dist/core/execution-modes.js +130 -0
  927. package/dist/core/execution-modes.js.map +1 -0
  928. package/dist/core/handoff.d.ts +184 -0
  929. package/dist/core/handoff.d.ts.map +1 -0
  930. package/dist/core/handoff.js +195 -0
  931. package/dist/core/handoff.js.map +1 -0
  932. package/dist/core/hardware-detect.d.ts +88 -0
  933. package/dist/core/hardware-detect.d.ts.map +1 -0
  934. package/dist/core/hardware-detect.js +182 -0
  935. package/dist/core/hardware-detect.js.map +1 -0
  936. package/dist/core/message-queue.d.ts +68 -0
  937. package/dist/core/message-queue.d.ts.map +1 -0
  938. package/dist/core/message-queue.js +96 -0
  939. package/dist/core/message-queue.js.map +1 -0
  940. package/dist/core/mode-cycling.d.ts +59 -0
  941. package/dist/core/mode-cycling.d.ts.map +1 -0
  942. package/dist/core/mode-cycling.js +259 -0
  943. package/dist/core/mode-cycling.js.map +1 -0
  944. package/dist/core/project-onboarding.d.ts +75 -0
  945. package/dist/core/project-onboarding.d.ts.map +1 -0
  946. package/dist/core/project-onboarding.js +307 -0
  947. package/dist/core/project-onboarding.js.map +1 -0
  948. package/dist/core/prompt-override.d.ts +77 -0
  949. package/dist/core/prompt-override.d.ts.map +1 -0
  950. package/dist/core/prompt-override.js +201 -0
  951. package/dist/core/prompt-override.js.map +1 -0
  952. package/dist/core/runtime/bound-tool-filter.d.ts +39 -0
  953. package/dist/core/runtime/bound-tool-filter.d.ts.map +1 -0
  954. package/dist/core/runtime/bound-tool-filter.js +50 -0
  955. package/dist/core/runtime/bound-tool-filter.js.map +1 -0
  956. package/dist/core/runtime/provider-gates.d.ts +145 -0
  957. package/dist/core/runtime/provider-gates.d.ts.map +1 -0
  958. package/dist/core/runtime/provider-gates.js +194 -0
  959. package/dist/core/runtime/provider-gates.js.map +1 -0
  960. package/dist/core/runtime-intelligence.d.ts +63 -0
  961. package/dist/core/runtime-intelligence.d.ts.map +1 -0
  962. package/dist/core/runtime-intelligence.js +301 -0
  963. package/dist/core/runtime-intelligence.js.map +1 -0
  964. package/dist/core/runtime-tool-dispatch.d.ts +271 -0
  965. package/dist/core/runtime-tool-dispatch.d.ts.map +1 -0
  966. package/dist/core/runtime-tool-dispatch.js +845 -0
  967. package/dist/core/runtime-tool-dispatch.js.map +1 -0
  968. package/dist/core/runtime-tools.d.ts +92 -0
  969. package/dist/core/runtime-tools.d.ts.map +1 -0
  970. package/dist/core/runtime-tools.js +520 -0
  971. package/dist/core/runtime-tools.js.map +1 -0
  972. package/dist/core/runtime.d.ts +1425 -0
  973. package/dist/core/runtime.d.ts.map +1 -0
  974. package/dist/core/runtime.js +6223 -0
  975. package/dist/core/runtime.js.map +1 -0
  976. package/dist/core/schema-migration.d.ts +92 -0
  977. package/dist/core/schema-migration.d.ts.map +1 -0
  978. package/dist/core/schema-migration.js +322 -0
  979. package/dist/core/schema-migration.js.map +1 -0
  980. package/dist/core/session-fork.d.ts +52 -0
  981. package/dist/core/session-fork.d.ts.map +1 -0
  982. package/dist/core/session-fork.js +147 -0
  983. package/dist/core/session-fork.js.map +1 -0
  984. package/dist/core/session-recap.d.ts +51 -0
  985. package/dist/core/session-recap.d.ts.map +1 -0
  986. package/dist/core/session-recap.js +157 -0
  987. package/dist/core/session-recap.js.map +1 -0
  988. package/dist/core/session-resume.d.ts +89 -0
  989. package/dist/core/session-resume.d.ts.map +1 -0
  990. package/dist/core/session-resume.js +181 -0
  991. package/dist/core/session-resume.js.map +1 -0
  992. package/dist/core/session.d.ts +42 -0
  993. package/dist/core/session.d.ts.map +1 -0
  994. package/dist/core/session.js +155 -0
  995. package/dist/core/session.js.map +1 -0
  996. package/dist/core/steering-server.d.ts +66 -0
  997. package/dist/core/steering-server.d.ts.map +1 -0
  998. package/dist/core/steering-server.js +206 -0
  999. package/dist/core/steering-server.js.map +1 -0
  1000. package/dist/core/stream-resume.d.ts +66 -0
  1001. package/dist/core/stream-resume.d.ts.map +1 -0
  1002. package/dist/core/stream-resume.js +162 -0
  1003. package/dist/core/stream-resume.js.map +1 -0
  1004. package/dist/core/tool-path-extractor.d.ts +17 -0
  1005. package/dist/core/tool-path-extractor.d.ts.map +1 -0
  1006. package/dist/core/tool-path-extractor.js +26 -0
  1007. package/dist/core/tool-path-extractor.js.map +1 -0
  1008. package/dist/core/types.d.ts +203 -0
  1009. package/dist/core/types.d.ts.map +1 -0
  1010. package/dist/core/types.js +6 -0
  1011. package/dist/core/types.js.map +1 -0
  1012. package/dist/core/virtual-paths.d.ts +71 -0
  1013. package/dist/core/virtual-paths.d.ts.map +1 -0
  1014. package/dist/core/virtual-paths.js +157 -0
  1015. package/dist/core/virtual-paths.js.map +1 -0
  1016. package/dist/core/workspace.d.ts +20 -0
  1017. package/dist/core/workspace.d.ts.map +1 -0
  1018. package/dist/core/workspace.js +400 -0
  1019. package/dist/core/workspace.js.map +1 -0
  1020. package/dist/core/wotann-yml.d.ts +89 -0
  1021. package/dist/core/wotann-yml.d.ts.map +1 -0
  1022. package/dist/core/wotann-yml.js +328 -0
  1023. package/dist/core/wotann-yml.js.map +1 -0
  1024. package/dist/daemon/auto-update.d.ts +42 -0
  1025. package/dist/daemon/auto-update.d.ts.map +1 -0
  1026. package/dist/daemon/auto-update.js +167 -0
  1027. package/dist/daemon/auto-update.js.map +1 -0
  1028. package/dist/daemon/automations.d.ts +169 -0
  1029. package/dist/daemon/automations.d.ts.map +1 -0
  1030. package/dist/daemon/automations.js +571 -0
  1031. package/dist/daemon/automations.js.map +1 -0
  1032. package/dist/daemon/background-workers.d.ts +73 -0
  1033. package/dist/daemon/background-workers.d.ts.map +1 -0
  1034. package/dist/daemon/background-workers.js +529 -0
  1035. package/dist/daemon/background-workers.js.map +1 -0
  1036. package/dist/daemon/comment-watcher.d.ts +28 -0
  1037. package/dist/daemon/comment-watcher.d.ts.map +1 -0
  1038. package/dist/daemon/comment-watcher.js +81 -0
  1039. package/dist/daemon/comment-watcher.js.map +1 -0
  1040. package/dist/daemon/context-pressure.d.ts +31 -0
  1041. package/dist/daemon/context-pressure.d.ts.map +1 -0
  1042. package/dist/daemon/context-pressure.js +92 -0
  1043. package/dist/daemon/context-pressure.js.map +1 -0
  1044. package/dist/daemon/cron-store.d.ts +186 -0
  1045. package/dist/daemon/cron-store.d.ts.map +1 -0
  1046. package/dist/daemon/cron-store.js +464 -0
  1047. package/dist/daemon/cron-store.js.map +1 -0
  1048. package/dist/daemon/cron-utils.d.ts +35 -0
  1049. package/dist/daemon/cron-utils.d.ts.map +1 -0
  1050. package/dist/daemon/cron-utils.js +67 -0
  1051. package/dist/daemon/cron-utils.js.map +1 -0
  1052. package/dist/daemon/event-triggers.d.ts +106 -0
  1053. package/dist/daemon/event-triggers.d.ts.map +1 -0
  1054. package/dist/daemon/event-triggers.js +337 -0
  1055. package/dist/daemon/event-triggers.js.map +1 -0
  1056. package/dist/daemon/file-dep-graph.d.ts +45 -0
  1057. package/dist/daemon/file-dep-graph.d.ts.map +1 -0
  1058. package/dist/daemon/file-dep-graph.js +190 -0
  1059. package/dist/daemon/file-dep-graph.js.map +1 -0
  1060. package/dist/daemon/kairos-ipc.d.ts +175 -0
  1061. package/dist/daemon/kairos-ipc.d.ts.map +1 -0
  1062. package/dist/daemon/kairos-ipc.js +640 -0
  1063. package/dist/daemon/kairos-ipc.js.map +1 -0
  1064. package/dist/daemon/kairos-rpc.d.ts +389 -0
  1065. package/dist/daemon/kairos-rpc.d.ts.map +1 -0
  1066. package/dist/daemon/kairos-rpc.js +9893 -0
  1067. package/dist/daemon/kairos-rpc.js.map +1 -0
  1068. package/dist/daemon/kairos-tools.d.ts +91 -0
  1069. package/dist/daemon/kairos-tools.d.ts.map +1 -0
  1070. package/dist/daemon/kairos-tools.js +251 -0
  1071. package/dist/daemon/kairos-tools.js.map +1 -0
  1072. package/dist/daemon/kairos.d.ts +480 -0
  1073. package/dist/daemon/kairos.d.ts.map +1 -0
  1074. package/dist/daemon/kairos.js +3016 -0
  1075. package/dist/daemon/kairos.js.map +1 -0
  1076. package/dist/daemon/port-resolver.d.ts +42 -0
  1077. package/dist/daemon/port-resolver.d.ts.map +1 -0
  1078. package/dist/daemon/port-resolver.js +82 -0
  1079. package/dist/daemon/port-resolver.js.map +1 -0
  1080. package/dist/daemon/rpc-handlers/intelligence-rpc.d.ts +125 -0
  1081. package/dist/daemon/rpc-handlers/intelligence-rpc.d.ts.map +1 -0
  1082. package/dist/daemon/rpc-handlers/intelligence-rpc.js +265 -0
  1083. package/dist/daemon/rpc-handlers/intelligence-rpc.js.map +1 -0
  1084. package/dist/daemon/rpc-handlers/orchestration-rpc.d.ts +8 -0
  1085. package/dist/daemon/rpc-handlers/orchestration-rpc.d.ts.map +1 -0
  1086. package/dist/daemon/rpc-handlers/orchestration-rpc.js +258 -0
  1087. package/dist/daemon/rpc-handlers/orchestration-rpc.js.map +1 -0
  1088. package/dist/daemon/rpc-handlers/sandbox-rpc.d.ts +68 -0
  1089. package/dist/daemon/rpc-handlers/sandbox-rpc.d.ts.map +1 -0
  1090. package/dist/daemon/rpc-handlers/sandbox-rpc.js +119 -0
  1091. package/dist/daemon/rpc-handlers/sandbox-rpc.js.map +1 -0
  1092. package/dist/daemon/rpc-subscription.d.ts +177 -0
  1093. package/dist/daemon/rpc-subscription.d.ts.map +1 -0
  1094. package/dist/daemon/rpc-subscription.js +204 -0
  1095. package/dist/daemon/rpc-subscription.js.map +1 -0
  1096. package/dist/daemon/start.d.ts +9 -0
  1097. package/dist/daemon/start.d.ts.map +1 -0
  1098. package/dist/daemon/start.js +267 -0
  1099. package/dist/daemon/start.js.map +1 -0
  1100. package/dist/daemon/terminal-monitor.d.ts +29 -0
  1101. package/dist/daemon/terminal-monitor.d.ts.map +1 -0
  1102. package/dist/daemon/terminal-monitor.js +125 -0
  1103. package/dist/daemon/terminal-monitor.js.map +1 -0
  1104. package/dist/daemon/transport/index.d.ts +17 -0
  1105. package/dist/daemon/transport/index.d.ts.map +1 -0
  1106. package/dist/daemon/transport/index.js +17 -0
  1107. package/dist/daemon/transport/index.js.map +1 -0
  1108. package/dist/daemon/transport/replay-buffer.d.ts +148 -0
  1109. package/dist/daemon/transport/replay-buffer.d.ts.map +1 -0
  1110. package/dist/daemon/transport/replay-buffer.js +180 -0
  1111. package/dist/daemon/transport/replay-buffer.js.map +1 -0
  1112. package/dist/daemon/transport/replay-registry.d.ts +112 -0
  1113. package/dist/daemon/transport/replay-registry.d.ts.map +1 -0
  1114. package/dist/daemon/transport/replay-registry.js +137 -0
  1115. package/dist/daemon/transport/replay-registry.js.map +1 -0
  1116. package/dist/design/bundle-diff.d.ts +96 -0
  1117. package/dist/design/bundle-diff.d.ts.map +1 -0
  1118. package/dist/design/bundle-diff.js +300 -0
  1119. package/dist/design/bundle-diff.js.map +1 -0
  1120. package/dist/design/bundle-writer.d.ts +103 -0
  1121. package/dist/design/bundle-writer.d.ts.map +1 -0
  1122. package/dist/design/bundle-writer.js +157 -0
  1123. package/dist/design/bundle-writer.js.map +1 -0
  1124. package/dist/design/canvas-store.d.ts +84 -0
  1125. package/dist/design/canvas-store.d.ts.map +1 -0
  1126. package/dist/design/canvas-store.js +180 -0
  1127. package/dist/design/canvas-store.js.map +1 -0
  1128. package/dist/design/canvas-to-code.d.ts +56 -0
  1129. package/dist/design/canvas-to-code.d.ts.map +1 -0
  1130. package/dist/design/canvas-to-code.js +238 -0
  1131. package/dist/design/canvas-to-code.js.map +1 -0
  1132. package/dist/design/canvas.d.ts +160 -0
  1133. package/dist/design/canvas.d.ts.map +1 -0
  1134. package/dist/design/canvas.js +405 -0
  1135. package/dist/design/canvas.js.map +1 -0
  1136. package/dist/design/component-importer.d.ts +42 -0
  1137. package/dist/design/component-importer.d.ts.map +1 -0
  1138. package/dist/design/component-importer.js +229 -0
  1139. package/dist/design/component-importer.js.map +1 -0
  1140. package/dist/design/design-md-spec.d.ts +83 -0
  1141. package/dist/design/design-md-spec.d.ts.map +1 -0
  1142. package/dist/design/design-md-spec.js +210 -0
  1143. package/dist/design/design-md-spec.js.map +1 -0
  1144. package/dist/design/design-mode.d.ts +127 -0
  1145. package/dist/design/design-mode.d.ts.map +1 -0
  1146. package/dist/design/design-mode.js +235 -0
  1147. package/dist/design/design-mode.js.map +1 -0
  1148. package/dist/design/design-tokens-parser.d.ts +46 -0
  1149. package/dist/design/design-tokens-parser.d.ts.map +1 -0
  1150. package/dist/design/design-tokens-parser.js +183 -0
  1151. package/dist/design/design-tokens-parser.js.map +1 -0
  1152. package/dist/design/designmd-linter.d.ts +41 -0
  1153. package/dist/design/designmd-linter.d.ts.map +1 -0
  1154. package/dist/design/designmd-linter.js +232 -0
  1155. package/dist/design/designmd-linter.js.map +1 -0
  1156. package/dist/design/designmd-parser.d.ts +96 -0
  1157. package/dist/design/designmd-parser.d.ts.map +1 -0
  1158. package/dist/design/designmd-parser.js +254 -0
  1159. package/dist/design/designmd-parser.js.map +1 -0
  1160. package/dist/design/dtcg-emitter.d.ts +127 -0
  1161. package/dist/design/dtcg-emitter.d.ts.map +1 -0
  1162. package/dist/design/dtcg-emitter.js +225 -0
  1163. package/dist/design/dtcg-emitter.js.map +1 -0
  1164. package/dist/design/extractor.d.ts +150 -0
  1165. package/dist/design/extractor.d.ts.map +1 -0
  1166. package/dist/design/extractor.js +569 -0
  1167. package/dist/design/extractor.js.map +1 -0
  1168. package/dist/design/handoff-receiver.d.ts +65 -0
  1169. package/dist/design/handoff-receiver.d.ts.map +1 -0
  1170. package/dist/design/handoff-receiver.js +144 -0
  1171. package/dist/design/handoff-receiver.js.map +1 -0
  1172. package/dist/design/token-emitters/desktop.d.ts +13 -0
  1173. package/dist/design/token-emitters/desktop.d.ts.map +1 -0
  1174. package/dist/design/token-emitters/desktop.js +152 -0
  1175. package/dist/design/token-emitters/desktop.js.map +1 -0
  1176. package/dist/design/token-emitters/index.d.ts +12 -0
  1177. package/dist/design/token-emitters/index.d.ts.map +1 -0
  1178. package/dist/design/token-emitters/index.js +12 -0
  1179. package/dist/design/token-emitters/index.js.map +1 -0
  1180. package/dist/design/token-emitters/ios.d.ts +15 -0
  1181. package/dist/design/token-emitters/ios.d.ts.map +1 -0
  1182. package/dist/design/token-emitters/ios.js +116 -0
  1183. package/dist/design/token-emitters/ios.js.map +1 -0
  1184. package/dist/design/token-emitters/tui.d.ts +22 -0
  1185. package/dist/design/token-emitters/tui.d.ts.map +1 -0
  1186. package/dist/design/token-emitters/tui.js +23 -0
  1187. package/dist/design/token-emitters/tui.js.map +1 -0
  1188. package/dist/design/token-emitters/w3c-tokens.d.ts +28 -0
  1189. package/dist/design/token-emitters/w3c-tokens.d.ts.map +1 -0
  1190. package/dist/design/token-emitters/w3c-tokens.js +108 -0
  1191. package/dist/design/token-emitters/w3c-tokens.js.map +1 -0
  1192. package/dist/design/tokens.d.ts +154 -0
  1193. package/dist/design/tokens.d.ts.map +1 -0
  1194. package/dist/design/tokens.js +162 -0
  1195. package/dist/design/tokens.js.map +1 -0
  1196. package/dist/design/zip-reader.d.ts +14 -0
  1197. package/dist/design/zip-reader.d.ts.map +1 -0
  1198. package/dist/design/zip-reader.js +125 -0
  1199. package/dist/design/zip-reader.js.map +1 -0
  1200. package/dist/desktop/app-state.d.ts +133 -0
  1201. package/dist/desktop/app-state.d.ts.map +1 -0
  1202. package/dist/desktop/app-state.js +161 -0
  1203. package/dist/desktop/app-state.js.map +1 -0
  1204. package/dist/desktop/artifact-comments.d.ts +94 -0
  1205. package/dist/desktop/artifact-comments.d.ts.map +1 -0
  1206. package/dist/desktop/artifact-comments.js +106 -0
  1207. package/dist/desktop/artifact-comments.js.map +1 -0
  1208. package/dist/desktop/artifacts.d.ts +78 -0
  1209. package/dist/desktop/artifacts.d.ts.map +1 -0
  1210. package/dist/desktop/artifacts.js +187 -0
  1211. package/dist/desktop/artifacts.js.map +1 -0
  1212. package/dist/desktop/command-palette.d.ts +105 -0
  1213. package/dist/desktop/command-palette.d.ts.map +1 -0
  1214. package/dist/desktop/command-palette.js +319 -0
  1215. package/dist/desktop/command-palette.js.map +1 -0
  1216. package/dist/desktop/companion-server.d.ts +494 -0
  1217. package/dist/desktop/companion-server.d.ts.map +1 -0
  1218. package/dist/desktop/companion-server.js +2147 -0
  1219. package/dist/desktop/companion-server.js.map +1 -0
  1220. package/dist/desktop/conversation-manager.d.ts +122 -0
  1221. package/dist/desktop/conversation-manager.d.ts.map +1 -0
  1222. package/dist/desktop/conversation-manager.js +207 -0
  1223. package/dist/desktop/conversation-manager.js.map +1 -0
  1224. package/dist/desktop/desktop-runtime-bridge.d.ts +78 -0
  1225. package/dist/desktop/desktop-runtime-bridge.d.ts.map +1 -0
  1226. package/dist/desktop/desktop-runtime-bridge.js +155 -0
  1227. package/dist/desktop/desktop-runtime-bridge.js.map +1 -0
  1228. package/dist/desktop/keyboard-shortcuts.d.ts +64 -0
  1229. package/dist/desktop/keyboard-shortcuts.d.ts.map +1 -0
  1230. package/dist/desktop/keyboard-shortcuts.js +152 -0
  1231. package/dist/desktop/keyboard-shortcuts.js.map +1 -0
  1232. package/dist/desktop/layout.d.ts +90 -0
  1233. package/dist/desktop/layout.d.ts.map +1 -0
  1234. package/dist/desktop/layout.js +117 -0
  1235. package/dist/desktop/layout.js.map +1 -0
  1236. package/dist/desktop/notification-manager.d.ts +88 -0
  1237. package/dist/desktop/notification-manager.d.ts.map +1 -0
  1238. package/dist/desktop/notification-manager.js +167 -0
  1239. package/dist/desktop/notification-manager.js.map +1 -0
  1240. package/dist/desktop/project-manager.d.ts +80 -0
  1241. package/dist/desktop/project-manager.d.ts.map +1 -0
  1242. package/dist/desktop/project-manager.js +146 -0
  1243. package/dist/desktop/project-manager.js.map +1 -0
  1244. package/dist/desktop/prompt-enhancer.d.ts +65 -0
  1245. package/dist/desktop/prompt-enhancer.d.ts.map +1 -0
  1246. package/dist/desktop/prompt-enhancer.js +177 -0
  1247. package/dist/desktop/prompt-enhancer.js.map +1 -0
  1248. package/dist/desktop/smart-apply-panel.d.ts +78 -0
  1249. package/dist/desktop/smart-apply-panel.d.ts.map +1 -0
  1250. package/dist/desktop/smart-apply-panel.js +140 -0
  1251. package/dist/desktop/smart-apply-panel.js.map +1 -0
  1252. package/dist/desktop/supabase-relay.d.ts +86 -0
  1253. package/dist/desktop/supabase-relay.d.ts.map +1 -0
  1254. package/dist/desktop/supabase-relay.js +335 -0
  1255. package/dist/desktop/supabase-relay.js.map +1 -0
  1256. package/dist/desktop/tauri-config.d.ts +116 -0
  1257. package/dist/desktop/tauri-config.d.ts.map +1 -0
  1258. package/dist/desktop/tauri-config.js +208 -0
  1259. package/dist/desktop/tauri-config.js.map +1 -0
  1260. package/dist/desktop/types.d.ts +135 -0
  1261. package/dist/desktop/types.d.ts.map +1 -0
  1262. package/dist/desktop/types.js +89 -0
  1263. package/dist/desktop/types.js.map +1 -0
  1264. package/dist/evals/g-eval.d.ts +36 -0
  1265. package/dist/evals/g-eval.d.ts.map +1 -0
  1266. package/dist/evals/g-eval.js +147 -0
  1267. package/dist/evals/g-eval.js.map +1 -0
  1268. package/dist/evals/owasp-llm-redteam.d.ts +39 -0
  1269. package/dist/evals/owasp-llm-redteam.d.ts.map +1 -0
  1270. package/dist/evals/owasp-llm-redteam.js +128 -0
  1271. package/dist/evals/owasp-llm-redteam.js.map +1 -0
  1272. package/dist/evals/prompt-eval.d.ts +102 -0
  1273. package/dist/evals/prompt-eval.d.ts.map +1 -0
  1274. package/dist/evals/prompt-eval.js +176 -0
  1275. package/dist/evals/prompt-eval.js.map +1 -0
  1276. package/dist/evals/ragas-metrics.d.ts +23 -0
  1277. package/dist/evals/ragas-metrics.d.ts.map +1 -0
  1278. package/dist/evals/ragas-metrics.js +233 -0
  1279. package/dist/evals/ragas-metrics.js.map +1 -0
  1280. package/dist/evals/types.d.ts +154 -0
  1281. package/dist/evals/types.d.ts.map +1 -0
  1282. package/dist/evals/types.js +43 -0
  1283. package/dist/evals/types.js.map +1 -0
  1284. package/dist/evolution/constraints.d.ts +12 -0
  1285. package/dist/evolution/constraints.d.ts.map +1 -0
  1286. package/dist/evolution/constraints.js +45 -0
  1287. package/dist/evolution/constraints.js.map +1 -0
  1288. package/dist/evolution/evaluator.d.ts +45 -0
  1289. package/dist/evolution/evaluator.d.ts.map +1 -0
  1290. package/dist/evolution/evaluator.js +109 -0
  1291. package/dist/evolution/evaluator.js.map +1 -0
  1292. package/dist/evolution/mutator.d.ts +38 -0
  1293. package/dist/evolution/mutator.d.ts.map +1 -0
  1294. package/dist/evolution/mutator.js +97 -0
  1295. package/dist/evolution/mutator.js.map +1 -0
  1296. package/dist/evolution/optimizer.d.ts +68 -0
  1297. package/dist/evolution/optimizer.d.ts.map +1 -0
  1298. package/dist/evolution/optimizer.js +170 -0
  1299. package/dist/evolution/optimizer.js.map +1 -0
  1300. package/dist/evolution/runner.d.ts +30 -0
  1301. package/dist/evolution/runner.d.ts.map +1 -0
  1302. package/dist/evolution/runner.js +67 -0
  1303. package/dist/evolution/runner.js.map +1 -0
  1304. package/dist/evolution/types.d.ts +76 -0
  1305. package/dist/evolution/types.d.ts.map +1 -0
  1306. package/dist/evolution/types.js +9 -0
  1307. package/dist/evolution/types.js.map +1 -0
  1308. package/dist/exploit/mythos-scaffold.d.ts +230 -0
  1309. package/dist/exploit/mythos-scaffold.d.ts.map +1 -0
  1310. package/dist/exploit/mythos-scaffold.js +517 -0
  1311. package/dist/exploit/mythos-scaffold.js.map +1 -0
  1312. package/dist/git/magic-git.d.ts +62 -0
  1313. package/dist/git/magic-git.d.ts.map +1 -0
  1314. package/dist/git/magic-git.js +260 -0
  1315. package/dist/git/magic-git.js.map +1 -0
  1316. package/dist/hooks/auto-archive.d.ts +65 -0
  1317. package/dist/hooks/auto-archive.d.ts.map +1 -0
  1318. package/dist/hooks/auto-archive.js +137 -0
  1319. package/dist/hooks/auto-archive.js.map +1 -0
  1320. package/dist/hooks/benchmark-engineering.d.ts +174 -0
  1321. package/dist/hooks/benchmark-engineering.d.ts.map +1 -0
  1322. package/dist/hooks/benchmark-engineering.js +484 -0
  1323. package/dist/hooks/benchmark-engineering.js.map +1 -0
  1324. package/dist/hooks/built-in.d.ts +102 -0
  1325. package/dist/hooks/built-in.d.ts.map +1 -0
  1326. package/dist/hooks/built-in.js +1358 -0
  1327. package/dist/hooks/built-in.js.map +1 -0
  1328. package/dist/hooks/compact-snapshot.d.ts +78 -0
  1329. package/dist/hooks/compact-snapshot.d.ts.map +1 -0
  1330. package/dist/hooks/compact-snapshot.js +179 -0
  1331. package/dist/hooks/compact-snapshot.js.map +1 -0
  1332. package/dist/hooks/doom-loop-detector.d.ts +63 -0
  1333. package/dist/hooks/doom-loop-detector.d.ts.map +1 -0
  1334. package/dist/hooks/doom-loop-detector.js +247 -0
  1335. package/dist/hooks/doom-loop-detector.js.map +1 -0
  1336. package/dist/hooks/engine.d.ts +274 -0
  1337. package/dist/hooks/engine.d.ts.map +1 -0
  1338. package/dist/hooks/engine.js +495 -0
  1339. package/dist/hooks/engine.js.map +1 -0
  1340. package/dist/hooks/rate-limit-resume.d.ts +99 -0
  1341. package/dist/hooks/rate-limit-resume.d.ts.map +1 -0
  1342. package/dist/hooks/rate-limit-resume.js +185 -0
  1343. package/dist/hooks/rate-limit-resume.js.map +1 -0
  1344. package/dist/hooks/verifier-gate-helpers.d.ts +126 -0
  1345. package/dist/hooks/verifier-gate-helpers.d.ts.map +1 -0
  1346. package/dist/hooks/verifier-gate-helpers.js +129 -0
  1347. package/dist/hooks/verifier-gate-helpers.js.map +1 -0
  1348. package/dist/identity/persona.d.ts +99 -0
  1349. package/dist/identity/persona.d.ts.map +1 -0
  1350. package/dist/identity/persona.js +312 -0
  1351. package/dist/identity/persona.js.map +1 -0
  1352. package/dist/identity/reasoning-engine.d.ts +88 -0
  1353. package/dist/identity/reasoning-engine.d.ts.map +1 -0
  1354. package/dist/identity/reasoning-engine.js +251 -0
  1355. package/dist/identity/reasoning-engine.js.map +1 -0
  1356. package/dist/identity/role-templates/csm.d.ts +9 -0
  1357. package/dist/identity/role-templates/csm.d.ts.map +1 -0
  1358. package/dist/identity/role-templates/csm.js +42 -0
  1359. package/dist/identity/role-templates/csm.js.map +1 -0
  1360. package/dist/identity/role-templates/devrel.d.ts +9 -0
  1361. package/dist/identity/role-templates/devrel.d.ts.map +1 -0
  1362. package/dist/identity/role-templates/devrel.js +43 -0
  1363. package/dist/identity/role-templates/devrel.js.map +1 -0
  1364. package/dist/identity/role-templates/index.d.ts +40 -0
  1365. package/dist/identity/role-templates/index.d.ts.map +1 -0
  1366. package/dist/identity/role-templates/index.js +62 -0
  1367. package/dist/identity/role-templates/index.js.map +1 -0
  1368. package/dist/identity/role-templates/recruiter.d.ts +10 -0
  1369. package/dist/identity/role-templates/recruiter.d.ts.map +1 -0
  1370. package/dist/identity/role-templates/recruiter.js +42 -0
  1371. package/dist/identity/role-templates/recruiter.js.map +1 -0
  1372. package/dist/identity/role-templates/sdr.d.ts +9 -0
  1373. package/dist/identity/role-templates/sdr.d.ts.map +1 -0
  1374. package/dist/identity/role-templates/sdr.js +41 -0
  1375. package/dist/identity/role-templates/sdr.js.map +1 -0
  1376. package/dist/identity/role-templates/support.d.ts +9 -0
  1377. package/dist/identity/role-templates/support.d.ts.map +1 -0
  1378. package/dist/identity/role-templates/support.js +41 -0
  1379. package/dist/identity/role-templates/support.js.map +1 -0
  1380. package/dist/identity/role-templates/types.d.ts +16 -0
  1381. package/dist/identity/role-templates/types.d.ts.map +1 -0
  1382. package/dist/identity/role-templates/types.js +9 -0
  1383. package/dist/identity/role-templates/types.js.map +1 -0
  1384. package/dist/identity/user-model.d.ts +110 -0
  1385. package/dist/identity/user-model.d.ts.map +1 -0
  1386. package/dist/identity/user-model.js +386 -0
  1387. package/dist/identity/user-model.js.map +1 -0
  1388. package/dist/index.d.ts +7 -0
  1389. package/dist/index.d.ts.map +1 -0
  1390. package/dist/index.js +9117 -0
  1391. package/dist/index.js.map +1 -0
  1392. package/dist/integrations/posthog-events.d.ts +70 -0
  1393. package/dist/integrations/posthog-events.d.ts.map +1 -0
  1394. package/dist/integrations/posthog-events.js +126 -0
  1395. package/dist/integrations/posthog-events.js.map +1 -0
  1396. package/dist/intelligence/12factor/enforcer.d.ts +32 -0
  1397. package/dist/intelligence/12factor/enforcer.d.ts.map +1 -0
  1398. package/dist/intelligence/12factor/enforcer.js +39 -0
  1399. package/dist/intelligence/12factor/enforcer.js.map +1 -0
  1400. package/dist/intelligence/12factor/principles.d.ts +63 -0
  1401. package/dist/intelligence/12factor/principles.d.ts.map +1 -0
  1402. package/dist/intelligence/12factor/principles.js +112 -0
  1403. package/dist/intelligence/12factor/principles.js.map +1 -0
  1404. package/dist/intelligence/12factor/single-binary.d.ts +56 -0
  1405. package/dist/intelligence/12factor/single-binary.d.ts.map +1 -0
  1406. package/dist/intelligence/12factor/single-binary.js +79 -0
  1407. package/dist/intelligence/12factor/single-binary.js.map +1 -0
  1408. package/dist/intelligence/accuracy-boost.d.ts +140 -0
  1409. package/dist/intelligence/accuracy-boost.d.ts.map +1 -0
  1410. package/dist/intelligence/accuracy-boost.js +686 -0
  1411. package/dist/intelligence/accuracy-boost.js.map +1 -0
  1412. package/dist/intelligence/action-item-extractor.d.ts +63 -0
  1413. package/dist/intelligence/action-item-extractor.d.ts.map +1 -0
  1414. package/dist/intelligence/action-item-extractor.js +154 -0
  1415. package/dist/intelligence/action-item-extractor.js.map +1 -0
  1416. package/dist/intelligence/adaptive-prompts.d.ts +43 -0
  1417. package/dist/intelligence/adaptive-prompts.d.ts.map +1 -0
  1418. package/dist/intelligence/adaptive-prompts.js +308 -0
  1419. package/dist/intelligence/adaptive-prompts.js.map +1 -0
  1420. package/dist/intelligence/adversarial-test-generator.d.ts +104 -0
  1421. package/dist/intelligence/adversarial-test-generator.d.ts.map +1 -0
  1422. package/dist/intelligence/adversarial-test-generator.js +242 -0
  1423. package/dist/intelligence/adversarial-test-generator.js.map +1 -0
  1424. package/dist/intelligence/agent-patterns/catalog.d.ts +31 -0
  1425. package/dist/intelligence/agent-patterns/catalog.d.ts.map +1 -0
  1426. package/dist/intelligence/agent-patterns/catalog.js +49 -0
  1427. package/dist/intelligence/agent-patterns/catalog.js.map +1 -0
  1428. package/dist/intelligence/agent-patterns/pattern-mapper.d.ts +56 -0
  1429. package/dist/intelligence/agent-patterns/pattern-mapper.d.ts.map +1 -0
  1430. package/dist/intelligence/agent-patterns/pattern-mapper.js +154 -0
  1431. package/dist/intelligence/agent-patterns/pattern-mapper.js.map +1 -0
  1432. package/dist/intelligence/agent-patterns/patterns-core.d.ts +10 -0
  1433. package/dist/intelligence/agent-patterns/patterns-core.d.ts.map +1 -0
  1434. package/dist/intelligence/agent-patterns/patterns-core.js +125 -0
  1435. package/dist/intelligence/agent-patterns/patterns-core.js.map +1 -0
  1436. package/dist/intelligence/agent-patterns/patterns-extended.d.ts +11 -0
  1437. package/dist/intelligence/agent-patterns/patterns-extended.d.ts.map +1 -0
  1438. package/dist/intelligence/agent-patterns/patterns-extended.js +125 -0
  1439. package/dist/intelligence/agent-patterns/patterns-extended.js.map +1 -0
  1440. package/dist/intelligence/agent-patterns/patterns.d.ts +13 -0
  1441. package/dist/intelligence/agent-patterns/patterns.d.ts.map +1 -0
  1442. package/dist/intelligence/agent-patterns/patterns.js +14 -0
  1443. package/dist/intelligence/agent-patterns/patterns.js.map +1 -0
  1444. package/dist/intelligence/agent-patterns/types.d.ts +35 -0
  1445. package/dist/intelligence/agent-patterns/types.d.ts.map +1 -0
  1446. package/dist/intelligence/agent-patterns/types.js +9 -0
  1447. package/dist/intelligence/agent-patterns/types.js.map +1 -0
  1448. package/dist/intelligence/ai-time-machine.d.ts +105 -0
  1449. package/dist/intelligence/ai-time-machine.d.ts.map +1 -0
  1450. package/dist/intelligence/ai-time-machine.js +234 -0
  1451. package/dist/intelligence/ai-time-machine.js.map +1 -0
  1452. package/dist/intelligence/ambient-awareness.d.ts +102 -0
  1453. package/dist/intelligence/ambient-awareness.d.ts.map +1 -0
  1454. package/dist/intelligence/ambient-awareness.js +355 -0
  1455. package/dist/intelligence/ambient-awareness.js.map +1 -0
  1456. package/dist/intelligence/amplifier.d.ts +101 -0
  1457. package/dist/intelligence/amplifier.d.ts.map +1 -0
  1458. package/dist/intelligence/amplifier.js +236 -0
  1459. package/dist/intelligence/amplifier.js.map +1 -0
  1460. package/dist/intelligence/answer-normalizer.d.ts +67 -0
  1461. package/dist/intelligence/answer-normalizer.d.ts.map +1 -0
  1462. package/dist/intelligence/answer-normalizer.js +221 -0
  1463. package/dist/intelligence/answer-normalizer.js.map +1 -0
  1464. package/dist/intelligence/auto-enhance.d.ts +34 -0
  1465. package/dist/intelligence/auto-enhance.d.ts.map +1 -0
  1466. package/dist/intelligence/auto-enhance.js +99 -0
  1467. package/dist/intelligence/auto-enhance.js.map +1 -0
  1468. package/dist/intelligence/auto-mode-detector.d.ts +32 -0
  1469. package/dist/intelligence/auto-mode-detector.d.ts.map +1 -0
  1470. package/dist/intelligence/auto-mode-detector.js +176 -0
  1471. package/dist/intelligence/auto-mode-detector.js.map +1 -0
  1472. package/dist/intelligence/auto-reviewer.d.ts +105 -0
  1473. package/dist/intelligence/auto-reviewer.d.ts.map +1 -0
  1474. package/dist/intelligence/auto-reviewer.js +477 -0
  1475. package/dist/intelligence/auto-reviewer.js.map +1 -0
  1476. package/dist/intelligence/auto-verify.d.ts +52 -0
  1477. package/dist/intelligence/auto-verify.d.ts.map +1 -0
  1478. package/dist/intelligence/auto-verify.js +153 -0
  1479. package/dist/intelligence/auto-verify.js.map +1 -0
  1480. package/dist/intelligence/away-summary.d.ts +48 -0
  1481. package/dist/intelligence/away-summary.d.ts.map +1 -0
  1482. package/dist/intelligence/away-summary.js +98 -0
  1483. package/dist/intelligence/away-summary.js.map +1 -0
  1484. package/dist/intelligence/bash-classifier.d.ts +19 -0
  1485. package/dist/intelligence/bash-classifier.d.ts.map +1 -0
  1486. package/dist/intelligence/bash-classifier.js +153 -0
  1487. package/dist/intelligence/bash-classifier.js.map +1 -0
  1488. package/dist/intelligence/benchmark-harness.d.ts +152 -0
  1489. package/dist/intelligence/benchmark-harness.d.ts.map +1 -0
  1490. package/dist/intelligence/benchmark-harness.js +534 -0
  1491. package/dist/intelligence/benchmark-harness.js.map +1 -0
  1492. package/dist/intelligence/benchmark-runners/aider-polyglot.d.ts +136 -0
  1493. package/dist/intelligence/benchmark-runners/aider-polyglot.d.ts.map +1 -0
  1494. package/dist/intelligence/benchmark-runners/aider-polyglot.js +389 -0
  1495. package/dist/intelligence/benchmark-runners/aider-polyglot.js.map +1 -0
  1496. package/dist/intelligence/benchmark-runners/code-eval.d.ts +162 -0
  1497. package/dist/intelligence/benchmark-runners/code-eval.d.ts.map +1 -0
  1498. package/dist/intelligence/benchmark-runners/code-eval.js +418 -0
  1499. package/dist/intelligence/benchmark-runners/code-eval.js.map +1 -0
  1500. package/dist/intelligence/benchmark-runners/index.d.ts +15 -0
  1501. package/dist/intelligence/benchmark-runners/index.d.ts.map +1 -0
  1502. package/dist/intelligence/benchmark-runners/index.js +20 -0
  1503. package/dist/intelligence/benchmark-runners/index.js.map +1 -0
  1504. package/dist/intelligence/benchmark-runners/shared.d.ts +98 -0
  1505. package/dist/intelligence/benchmark-runners/shared.d.ts.map +1 -0
  1506. package/dist/intelligence/benchmark-runners/shared.js +119 -0
  1507. package/dist/intelligence/benchmark-runners/shared.js.map +1 -0
  1508. package/dist/intelligence/benchmark-runners/swe-bench.d.ts +139 -0
  1509. package/dist/intelligence/benchmark-runners/swe-bench.d.ts.map +1 -0
  1510. package/dist/intelligence/benchmark-runners/swe-bench.js +374 -0
  1511. package/dist/intelligence/benchmark-runners/swe-bench.js.map +1 -0
  1512. package/dist/intelligence/benchmark-runners/tau-bench.d.ts +137 -0
  1513. package/dist/intelligence/benchmark-runners/tau-bench.d.ts.map +1 -0
  1514. package/dist/intelligence/benchmark-runners/tau-bench.js +378 -0
  1515. package/dist/intelligence/benchmark-runners/tau-bench.js.map +1 -0
  1516. package/dist/intelligence/benchmark-runners/terminal-bench.d.ts +210 -0
  1517. package/dist/intelligence/benchmark-runners/terminal-bench.d.ts.map +1 -0
  1518. package/dist/intelligence/benchmark-runners/terminal-bench.js +600 -0
  1519. package/dist/intelligence/benchmark-runners/terminal-bench.js.map +1 -0
  1520. package/dist/intelligence/budget-enforcer.d.ts +104 -0
  1521. package/dist/intelligence/budget-enforcer.d.ts.map +1 -0
  1522. package/dist/intelligence/budget-enforcer.js +136 -0
  1523. package/dist/intelligence/budget-enforcer.js.map +1 -0
  1524. package/dist/intelligence/bugbot.d.ts +62 -0
  1525. package/dist/intelligence/bugbot.d.ts.map +1 -0
  1526. package/dist/intelligence/bugbot.js +337 -0
  1527. package/dist/intelligence/bugbot.js.map +1 -0
  1528. package/dist/intelligence/chain-of-verification.d.ts +51 -0
  1529. package/dist/intelligence/chain-of-verification.d.ts.map +1 -0
  1530. package/dist/intelligence/chain-of-verification.js +97 -0
  1531. package/dist/intelligence/chain-of-verification.js.map +1 -0
  1532. package/dist/intelligence/code-graph.d.ts +80 -0
  1533. package/dist/intelligence/code-graph.d.ts.map +1 -0
  1534. package/dist/intelligence/code-graph.js +208 -0
  1535. package/dist/intelligence/code-graph.js.map +1 -0
  1536. package/dist/intelligence/code-outline.d.ts +44 -0
  1537. package/dist/intelligence/code-outline.d.ts.map +1 -0
  1538. package/dist/intelligence/code-outline.js +101 -0
  1539. package/dist/intelligence/code-outline.js.map +1 -0
  1540. package/dist/intelligence/codebase-health.d.ts +47 -0
  1541. package/dist/intelligence/codebase-health.d.ts.map +1 -0
  1542. package/dist/intelligence/codebase-health.js +307 -0
  1543. package/dist/intelligence/codebase-health.js.map +1 -0
  1544. package/dist/intelligence/codemaps.d.ts +44 -0
  1545. package/dist/intelligence/codemaps.d.ts.map +1 -0
  1546. package/dist/intelligence/codemaps.js +385 -0
  1547. package/dist/intelligence/codemaps.js.map +1 -0
  1548. package/dist/intelligence/confidence-calibrator.d.ts +86 -0
  1549. package/dist/intelligence/confidence-calibrator.d.ts.map +1 -0
  1550. package/dist/intelligence/confidence-calibrator.js +163 -0
  1551. package/dist/intelligence/confidence-calibrator.js.map +1 -0
  1552. package/dist/intelligence/content-cid.d.ts +63 -0
  1553. package/dist/intelligence/content-cid.d.ts.map +1 -0
  1554. package/dist/intelligence/content-cid.js +91 -0
  1555. package/dist/intelligence/content-cid.js.map +1 -0
  1556. package/dist/intelligence/context-relevance.d.ts +108 -0
  1557. package/dist/intelligence/context-relevance.d.ts.map +1 -0
  1558. package/dist/intelligence/context-relevance.js +325 -0
  1559. package/dist/intelligence/context-relevance.js.map +1 -0
  1560. package/dist/intelligence/courses-index/anthropic.d.ts +39 -0
  1561. package/dist/intelligence/courses-index/anthropic.d.ts.map +1 -0
  1562. package/dist/intelligence/courses-index/anthropic.js +110 -0
  1563. package/dist/intelligence/courses-index/anthropic.js.map +1 -0
  1564. package/dist/intelligence/critic-model.d.ts +56 -0
  1565. package/dist/intelligence/critic-model.d.ts.map +1 -0
  1566. package/dist/intelligence/critic-model.js +152 -0
  1567. package/dist/intelligence/critic-model.js.map +1 -0
  1568. package/dist/intelligence/cross-device-context.d.ts +66 -0
  1569. package/dist/intelligence/cross-device-context.d.ts.map +1 -0
  1570. package/dist/intelligence/cross-device-context.js +122 -0
  1571. package/dist/intelligence/cross-device-context.js.map +1 -0
  1572. package/dist/intelligence/data-loaders/csv.d.ts +16 -0
  1573. package/dist/intelligence/data-loaders/csv.d.ts.map +1 -0
  1574. package/dist/intelligence/data-loaders/csv.js +120 -0
  1575. package/dist/intelligence/data-loaders/csv.js.map +1 -0
  1576. package/dist/intelligence/data-loaders/json.d.ts +12 -0
  1577. package/dist/intelligence/data-loaders/json.d.ts.map +1 -0
  1578. package/dist/intelligence/data-loaders/json.js +65 -0
  1579. package/dist/intelligence/data-loaders/json.js.map +1 -0
  1580. package/dist/intelligence/data-loaders/jsonl.d.ts +15 -0
  1581. package/dist/intelligence/data-loaders/jsonl.d.ts.map +1 -0
  1582. package/dist/intelligence/data-loaders/jsonl.js +62 -0
  1583. package/dist/intelligence/data-loaders/jsonl.js.map +1 -0
  1584. package/dist/intelligence/data-loaders/markdown.d.ts +13 -0
  1585. package/dist/intelligence/data-loaders/markdown.d.ts.map +1 -0
  1586. package/dist/intelligence/data-loaders/markdown.js +40 -0
  1587. package/dist/intelligence/data-loaders/markdown.js.map +1 -0
  1588. package/dist/intelligence/data-loaders/registry.d.ts +57 -0
  1589. package/dist/intelligence/data-loaders/registry.d.ts.map +1 -0
  1590. package/dist/intelligence/data-loaders/registry.js +72 -0
  1591. package/dist/intelligence/data-loaders/registry.js.map +1 -0
  1592. package/dist/intelligence/deep-research.d.ts +90 -0
  1593. package/dist/intelligence/deep-research.d.ts.map +1 -0
  1594. package/dist/intelligence/deep-research.js +495 -0
  1595. package/dist/intelligence/deep-research.js.map +1 -0
  1596. package/dist/intelligence/dev-grounded-search.d.ts +33 -0
  1597. package/dist/intelligence/dev-grounded-search.d.ts.map +1 -0
  1598. package/dist/intelligence/dev-grounded-search.js +84 -0
  1599. package/dist/intelligence/dev-grounded-search.js.map +1 -0
  1600. package/dist/intelligence/devika/engineer-plan.d.ts +54 -0
  1601. package/dist/intelligence/devika/engineer-plan.d.ts.map +1 -0
  1602. package/dist/intelligence/devika/engineer-plan.js +124 -0
  1603. package/dist/intelligence/devika/engineer-plan.js.map +1 -0
  1604. package/dist/intelligence/domain-skill-router.d.ts +24 -0
  1605. package/dist/intelligence/domain-skill-router.d.ts.map +1 -0
  1606. package/dist/intelligence/domain-skill-router.js +143 -0
  1607. package/dist/intelligence/domain-skill-router.js.map +1 -0
  1608. package/dist/intelligence/error-pattern-learner.d.ts +67 -0
  1609. package/dist/intelligence/error-pattern-learner.d.ts.map +1 -0
  1610. package/dist/intelligence/error-pattern-learner.js +230 -0
  1611. package/dist/intelligence/error-pattern-learner.js.map +1 -0
  1612. package/dist/intelligence/eval-frameworks/redteam.d.ts +53 -0
  1613. package/dist/intelligence/eval-frameworks/redteam.d.ts.map +1 -0
  1614. package/dist/intelligence/eval-frameworks/redteam.js +160 -0
  1615. package/dist/intelligence/eval-frameworks/redteam.js.map +1 -0
  1616. package/dist/intelligence/everything-cc/catalog.d.ts +39 -0
  1617. package/dist/intelligence/everything-cc/catalog.d.ts.map +1 -0
  1618. package/dist/intelligence/everything-cc/catalog.js +122 -0
  1619. package/dist/intelligence/everything-cc/catalog.js.map +1 -0
  1620. package/dist/intelligence/everything-cc/tauri-pattern-checks.d.ts +61 -0
  1621. package/dist/intelligence/everything-cc/tauri-pattern-checks.d.ts.map +1 -0
  1622. package/dist/intelligence/everything-cc/tauri-pattern-checks.js +104 -0
  1623. package/dist/intelligence/everything-cc/tauri-pattern-checks.js.map +1 -0
  1624. package/dist/intelligence/fact-extraction.d.ts +92 -0
  1625. package/dist/intelligence/fact-extraction.d.ts.map +1 -0
  1626. package/dist/intelligence/fact-extraction.js +203 -0
  1627. package/dist/intelligence/fact-extraction.js.map +1 -0
  1628. package/dist/intelligence/finance-terminal-shell/shell.d.ts +69 -0
  1629. package/dist/intelligence/finance-terminal-shell/shell.d.ts.map +1 -0
  1630. package/dist/intelligence/finance-terminal-shell/shell.js +130 -0
  1631. package/dist/intelligence/finance-terminal-shell/shell.js.map +1 -0
  1632. package/dist/intelligence/flow-tracker.d.ts +83 -0
  1633. package/dist/intelligence/flow-tracker.d.ts.map +1 -0
  1634. package/dist/intelligence/flow-tracker.js +201 -0
  1635. package/dist/intelligence/flow-tracker.js.map +1 -0
  1636. package/dist/intelligence/follow-up-chips-v2.d.ts +64 -0
  1637. package/dist/intelligence/follow-up-chips-v2.d.ts.map +1 -0
  1638. package/dist/intelligence/follow-up-chips-v2.js +233 -0
  1639. package/dist/intelligence/follow-up-chips-v2.js.map +1 -0
  1640. package/dist/intelligence/forgecode-techniques.d.ts +143 -0
  1641. package/dist/intelligence/forgecode-techniques.d.ts.map +1 -0
  1642. package/dist/intelligence/forgecode-techniques.js +796 -0
  1643. package/dist/intelligence/forgecode-techniques.js.map +1 -0
  1644. package/dist/intelligence/genai-agents/extended-patterns.d.ts +51 -0
  1645. package/dist/intelligence/genai-agents/extended-patterns.d.ts.map +1 -0
  1646. package/dist/intelligence/genai-agents/extended-patterns.js +137 -0
  1647. package/dist/intelligence/genai-agents/extended-patterns.js.map +1 -0
  1648. package/dist/intelligence/guardian.d.ts +119 -0
  1649. package/dist/intelligence/guardian.d.ts.map +1 -0
  1650. package/dist/intelligence/guardian.js +314 -0
  1651. package/dist/intelligence/guardian.js.map +1 -0
  1652. package/dist/intelligence/haystack-patterns/pipeline.d.ts +71 -0
  1653. package/dist/intelligence/haystack-patterns/pipeline.d.ts.map +1 -0
  1654. package/dist/intelligence/haystack-patterns/pipeline.js +98 -0
  1655. package/dist/intelligence/haystack-patterns/pipeline.js.map +1 -0
  1656. package/dist/intelligence/kg-builder.d.ts +181 -0
  1657. package/dist/intelligence/kg-builder.d.ts.map +1 -0
  1658. package/dist/intelligence/kg-builder.js +807 -0
  1659. package/dist/intelligence/kg-builder.js.map +1 -0
  1660. package/dist/intelligence/langchain-patterns/chain.d.ts +64 -0
  1661. package/dist/intelligence/langchain-patterns/chain.d.ts.map +1 -0
  1662. package/dist/intelligence/langchain-patterns/chain.js +109 -0
  1663. package/dist/intelligence/langchain-patterns/chain.js.map +1 -0
  1664. package/dist/intelligence/learning-platform/ppt-generator.d.ts +45 -0
  1665. package/dist/intelligence/learning-platform/ppt-generator.d.ts.map +1 -0
  1666. package/dist/intelligence/learning-platform/ppt-generator.js +91 -0
  1667. package/dist/intelligence/learning-platform/ppt-generator.js.map +1 -0
  1668. package/dist/intelligence/llm-app-catalog/index.d.ts +35 -0
  1669. package/dist/intelligence/llm-app-catalog/index.d.ts.map +1 -0
  1670. package/dist/intelligence/llm-app-catalog/index.js +82 -0
  1671. package/dist/intelligence/llm-app-catalog/index.js.map +1 -0
  1672. package/dist/intelligence/llm-flows.d.ts +103 -0
  1673. package/dist/intelligence/llm-flows.d.ts.map +1 -0
  1674. package/dist/intelligence/llm-flows.js +145 -0
  1675. package/dist/intelligence/llm-flows.js.map +1 -0
  1676. package/dist/intelligence/meeting-capture/transcript-actionable.d.ts +36 -0
  1677. package/dist/intelligence/meeting-capture/transcript-actionable.d.ts.map +1 -0
  1678. package/dist/intelligence/meeting-capture/transcript-actionable.js +69 -0
  1679. package/dist/intelligence/meeting-capture/transcript-actionable.js.map +1 -0
  1680. package/dist/intelligence/micro-eval.d.ts +65 -0
  1681. package/dist/intelligence/micro-eval.d.ts.map +1 -0
  1682. package/dist/intelligence/micro-eval.js +278 -0
  1683. package/dist/intelligence/micro-eval.js.map +1 -0
  1684. package/dist/intelligence/multi-patch-voter.d.ts +71 -0
  1685. package/dist/intelligence/multi-patch-voter.d.ts.map +1 -0
  1686. package/dist/intelligence/multi-patch-voter.js +164 -0
  1687. package/dist/intelligence/multi-patch-voter.js.map +1 -0
  1688. package/dist/intelligence/multimodal-extract.d.ts +87 -0
  1689. package/dist/intelligence/multimodal-extract.d.ts.map +1 -0
  1690. package/dist/intelligence/multimodal-extract.js +164 -0
  1691. package/dist/intelligence/multimodal-extract.js.map +1 -0
  1692. package/dist/intelligence/note-ingest.d.ts +76 -0
  1693. package/dist/intelligence/note-ingest.d.ts.map +1 -0
  1694. package/dist/intelligence/note-ingest.js +217 -0
  1695. package/dist/intelligence/note-ingest.js.map +1 -0
  1696. package/dist/intelligence/overrides.d.ts +53 -0
  1697. package/dist/intelligence/overrides.d.ts.map +1 -0
  1698. package/dist/intelligence/overrides.js +198 -0
  1699. package/dist/intelligence/overrides.js.map +1 -0
  1700. package/dist/intelligence/parallel-search-agent.d.ts +95 -0
  1701. package/dist/intelligence/parallel-search-agent.d.ts.map +1 -0
  1702. package/dist/intelligence/parallel-search-agent.js +155 -0
  1703. package/dist/intelligence/parallel-search-agent.js.map +1 -0
  1704. package/dist/intelligence/parallel-search.d.ts +75 -0
  1705. package/dist/intelligence/parallel-search.d.ts.map +1 -0
  1706. package/dist/intelligence/parallel-search.js +312 -0
  1707. package/dist/intelligence/parallel-search.js.map +1 -0
  1708. package/dist/intelligence/patch-scorer.d.ts +136 -0
  1709. package/dist/intelligence/patch-scorer.d.ts.map +1 -0
  1710. package/dist/intelligence/patch-scorer.js +348 -0
  1711. package/dist/intelligence/patch-scorer.js.map +1 -0
  1712. package/dist/intelligence/perception/element-resolver.d.ts +105 -0
  1713. package/dist/intelligence/perception/element-resolver.d.ts.map +1 -0
  1714. package/dist/intelligence/perception/element-resolver.js +149 -0
  1715. package/dist/intelligence/perception/element-resolver.js.map +1 -0
  1716. package/dist/intelligence/perception/page-comprehension.d.ts +78 -0
  1717. package/dist/intelligence/perception/page-comprehension.d.ts.map +1 -0
  1718. package/dist/intelligence/perception/page-comprehension.js +192 -0
  1719. package/dist/intelligence/perception/page-comprehension.js.map +1 -0
  1720. package/dist/intelligence/perception/screenshot-anchored-memory.d.ts +86 -0
  1721. package/dist/intelligence/perception/screenshot-anchored-memory.d.ts.map +1 -0
  1722. package/dist/intelligence/perception/screenshot-anchored-memory.js +132 -0
  1723. package/dist/intelligence/perception/screenshot-anchored-memory.js.map +1 -0
  1724. package/dist/intelligence/policy-injector.d.ts +96 -0
  1725. package/dist/intelligence/policy-injector.d.ts.map +1 -0
  1726. package/dist/intelligence/policy-injector.js +193 -0
  1727. package/dist/intelligence/policy-injector.js.map +1 -0
  1728. package/dist/intelligence/pre-completion-verifier.d.ts +155 -0
  1729. package/dist/intelligence/pre-completion-verifier.d.ts.map +1 -0
  1730. package/dist/intelligence/pre-completion-verifier.js +373 -0
  1731. package/dist/intelligence/pre-completion-verifier.js.map +1 -0
  1732. package/dist/intelligence/predictive-context.d.ts +56 -0
  1733. package/dist/intelligence/predictive-context.d.ts.map +1 -0
  1734. package/dist/intelligence/predictive-context.js +220 -0
  1735. package/dist/intelligence/predictive-context.js.map +1 -0
  1736. package/dist/intelligence/prefill-continuation.d.ts +36 -0
  1737. package/dist/intelligence/prefill-continuation.d.ts.map +1 -0
  1738. package/dist/intelligence/prefill-continuation.js +137 -0
  1739. package/dist/intelligence/prefill-continuation.js.map +1 -0
  1740. package/dist/intelligence/progressive-budget.d.ts +219 -0
  1741. package/dist/intelligence/progressive-budget.d.ts.map +1 -0
  1742. package/dist/intelligence/progressive-budget.js +270 -0
  1743. package/dist/intelligence/progressive-budget.js.map +1 -0
  1744. package/dist/intelligence/prompt-corpus.d.ts +58 -0
  1745. package/dist/intelligence/prompt-corpus.d.ts.map +1 -0
  1746. package/dist/intelligence/prompt-corpus.js +130 -0
  1747. package/dist/intelligence/prompt-corpus.js.map +1 -0
  1748. package/dist/intelligence/provider-arbitrage.d.ts +50 -0
  1749. package/dist/intelligence/provider-arbitrage.d.ts.map +1 -0
  1750. package/dist/intelligence/provider-arbitrage.js +245 -0
  1751. package/dist/intelligence/provider-arbitrage.js.map +1 -0
  1752. package/dist/intelligence/qlib-patterns/feature-engineering.d.ts +52 -0
  1753. package/dist/intelligence/qlib-patterns/feature-engineering.d.ts.map +1 -0
  1754. package/dist/intelligence/qlib-patterns/feature-engineering.js +168 -0
  1755. package/dist/intelligence/qlib-patterns/feature-engineering.js.map +1 -0
  1756. package/dist/intelligence/quant/time-series.d.ts +83 -0
  1757. package/dist/intelligence/quant/time-series.d.ts.map +1 -0
  1758. package/dist/intelligence/quant/time-series.js +178 -0
  1759. package/dist/intelligence/quant/time-series.js.map +1 -0
  1760. package/dist/intelligence/repo-knowledge/graph.d.ts +67 -0
  1761. package/dist/intelligence/repo-knowledge/graph.d.ts.map +1 -0
  1762. package/dist/intelligence/repo-knowledge/graph.js +99 -0
  1763. package/dist/intelligence/repo-knowledge/graph.js.map +1 -0
  1764. package/dist/intelligence/research-loops/budgeted-research.d.ts +68 -0
  1765. package/dist/intelligence/research-loops/budgeted-research.d.ts.map +1 -0
  1766. package/dist/intelligence/research-loops/budgeted-research.js +130 -0
  1767. package/dist/intelligence/research-loops/budgeted-research.js.map +1 -0
  1768. package/dist/intelligence/research-loops/design-patterns.d.ts +43 -0
  1769. package/dist/intelligence/research-loops/design-patterns.d.ts.map +1 -0
  1770. package/dist/intelligence/research-loops/design-patterns.js +134 -0
  1771. package/dist/intelligence/research-loops/design-patterns.js.map +1 -0
  1772. package/dist/intelligence/research-loops/domain-router.d.ts +56 -0
  1773. package/dist/intelligence/research-loops/domain-router.d.ts.map +1 -0
  1774. package/dist/intelligence/research-loops/domain-router.js +190 -0
  1775. package/dist/intelligence/research-loops/domain-router.js.map +1 -0
  1776. package/dist/intelligence/research-loops/reflective-dialog.d.ts +81 -0
  1777. package/dist/intelligence/research-loops/reflective-dialog.d.ts.map +1 -0
  1778. package/dist/intelligence/research-loops/reflective-dialog.js +132 -0
  1779. package/dist/intelligence/research-loops/reflective-dialog.js.map +1 -0
  1780. package/dist/intelligence/response-validator.d.ts +103 -0
  1781. package/dist/intelligence/response-validator.d.ts.map +1 -0
  1782. package/dist/intelligence/response-validator.js +417 -0
  1783. package/dist/intelligence/response-validator.js.map +1 -0
  1784. package/dist/intelligence/schema-optimizer.d.ts +61 -0
  1785. package/dist/intelligence/schema-optimizer.d.ts.map +1 -0
  1786. package/dist/intelligence/schema-optimizer.js +162 -0
  1787. package/dist/intelligence/schema-optimizer.js.map +1 -0
  1788. package/dist/intelligence/search-providers.d.ts +76 -0
  1789. package/dist/intelligence/search-providers.d.ts.map +1 -0
  1790. package/dist/intelligence/search-providers.js +209 -0
  1791. package/dist/intelligence/search-providers.js.map +1 -0
  1792. package/dist/intelligence/skill-catalog-index.d.ts +49 -0
  1793. package/dist/intelligence/skill-catalog-index.d.ts.map +1 -0
  1794. package/dist/intelligence/skill-catalog-index.js +178 -0
  1795. package/dist/intelligence/skill-catalog-index.js.map +1 -0
  1796. package/dist/intelligence/smart-file-search.d.ts +55 -0
  1797. package/dist/intelligence/smart-file-search.d.ts.map +1 -0
  1798. package/dist/intelligence/smart-file-search.js +268 -0
  1799. package/dist/intelligence/smart-file-search.js.map +1 -0
  1800. package/dist/intelligence/smart-retry.d.ts +57 -0
  1801. package/dist/intelligence/smart-retry.d.ts.map +1 -0
  1802. package/dist/intelligence/smart-retry.js +177 -0
  1803. package/dist/intelligence/smart-retry.js.map +1 -0
  1804. package/dist/intelligence/strict-schema.d.ts +76 -0
  1805. package/dist/intelligence/strict-schema.d.ts.map +1 -0
  1806. package/dist/intelligence/strict-schema.js +287 -0
  1807. package/dist/intelligence/strict-schema.js.map +1 -0
  1808. package/dist/intelligence/task-semantic-router.d.ts +49 -0
  1809. package/dist/intelligence/task-semantic-router.d.ts.map +1 -0
  1810. package/dist/intelligence/task-semantic-router.js +344 -0
  1811. package/dist/intelligence/task-semantic-router.js.map +1 -0
  1812. package/dist/intelligence/tool-pattern-detector.d.ts +68 -0
  1813. package/dist/intelligence/tool-pattern-detector.d.ts.map +1 -0
  1814. package/dist/intelligence/tool-pattern-detector.js +121 -0
  1815. package/dist/intelligence/tool-pattern-detector.js.map +1 -0
  1816. package/dist/intelligence/trace-analyzer.d.ts +90 -0
  1817. package/dist/intelligence/trace-analyzer.d.ts.map +1 -0
  1818. package/dist/intelligence/trace-analyzer.js +287 -0
  1819. package/dist/intelligence/trace-analyzer.js.map +1 -0
  1820. package/dist/intelligence/trajectory-scorer.d.ts +55 -0
  1821. package/dist/intelligence/trajectory-scorer.d.ts.map +1 -0
  1822. package/dist/intelligence/trajectory-scorer.js +235 -0
  1823. package/dist/intelligence/trajectory-scorer.js.map +1 -0
  1824. package/dist/intelligence/user-model.d.ts +93 -0
  1825. package/dist/intelligence/user-model.d.ts.map +1 -0
  1826. package/dist/intelligence/user-model.js +128 -0
  1827. package/dist/intelligence/user-model.js.map +1 -0
  1828. package/dist/intelligence/verification-cascade.d.ts +59 -0
  1829. package/dist/intelligence/verification-cascade.d.ts.map +1 -0
  1830. package/dist/intelligence/verification-cascade.js +258 -0
  1831. package/dist/intelligence/verification-cascade.js.map +1 -0
  1832. package/dist/intelligence/wall-clock-budget.d.ts +55 -0
  1833. package/dist/intelligence/wall-clock-budget.d.ts.map +1 -0
  1834. package/dist/intelligence/wall-clock-budget.js +121 -0
  1835. package/dist/intelligence/wall-clock-budget.js.map +1 -0
  1836. package/dist/intent/byoa-detector.d.ts +109 -0
  1837. package/dist/intent/byoa-detector.d.ts.map +1 -0
  1838. package/dist/intent/byoa-detector.js +208 -0
  1839. package/dist/intent/byoa-detector.js.map +1 -0
  1840. package/dist/intent/living-spec.d.ts +61 -0
  1841. package/dist/intent/living-spec.d.ts.map +1 -0
  1842. package/dist/intent/living-spec.js +301 -0
  1843. package/dist/intent/living-spec.js.map +1 -0
  1844. package/dist/learning/autodream.d.ts +190 -0
  1845. package/dist/learning/autodream.d.ts.map +1 -0
  1846. package/dist/learning/autodream.js +415 -0
  1847. package/dist/learning/autodream.js.map +1 -0
  1848. package/dist/learning/cross-session.d.ts +111 -0
  1849. package/dist/learning/cross-session.d.ts.map +1 -0
  1850. package/dist/learning/cross-session.js +406 -0
  1851. package/dist/learning/cross-session.js.map +1 -0
  1852. package/dist/learning/darwinian-evolver.d.ts +83 -0
  1853. package/dist/learning/darwinian-evolver.d.ts.map +1 -0
  1854. package/dist/learning/darwinian-evolver.js +144 -0
  1855. package/dist/learning/darwinian-evolver.js.map +1 -0
  1856. package/dist/learning/decision-ledger.d.ts +87 -0
  1857. package/dist/learning/decision-ledger.d.ts.map +1 -0
  1858. package/dist/learning/decision-ledger.js +228 -0
  1859. package/dist/learning/decision-ledger.js.map +1 -0
  1860. package/dist/learning/dream-pipeline.d.ts +108 -0
  1861. package/dist/learning/dream-pipeline.d.ts.map +1 -0
  1862. package/dist/learning/dream-pipeline.js +464 -0
  1863. package/dist/learning/dream-pipeline.js.map +1 -0
  1864. package/dist/learning/dream-runner.d.ts +55 -0
  1865. package/dist/learning/dream-runner.d.ts.map +1 -0
  1866. package/dist/learning/dream-runner.js +270 -0
  1867. package/dist/learning/dream-runner.js.map +1 -0
  1868. package/dist/learning/feedback-collector.d.ts +79 -0
  1869. package/dist/learning/feedback-collector.d.ts.map +1 -0
  1870. package/dist/learning/feedback-collector.js +170 -0
  1871. package/dist/learning/feedback-collector.js.map +1 -0
  1872. package/dist/learning/gepa-optimizer.d.ts +100 -0
  1873. package/dist/learning/gepa-optimizer.d.ts.map +1 -0
  1874. package/dist/learning/gepa-optimizer.js +207 -0
  1875. package/dist/learning/gepa-optimizer.js.map +1 -0
  1876. package/dist/learning/instinct-system.d.ts +87 -0
  1877. package/dist/learning/instinct-system.d.ts.map +1 -0
  1878. package/dist/learning/instinct-system.js +286 -0
  1879. package/dist/learning/instinct-system.js.map +1 -0
  1880. package/dist/learning/miprov2-optimizer.d.ts +82 -0
  1881. package/dist/learning/miprov2-optimizer.d.ts.map +1 -0
  1882. package/dist/learning/miprov2-optimizer.js +113 -0
  1883. package/dist/learning/miprov2-optimizer.js.map +1 -0
  1884. package/dist/learning/nightly-consolidator.d.ts +121 -0
  1885. package/dist/learning/nightly-consolidator.d.ts.map +1 -0
  1886. package/dist/learning/nightly-consolidator.js +163 -0
  1887. package/dist/learning/nightly-consolidator.js.map +1 -0
  1888. package/dist/learning/pattern-crystallizer.d.ts +87 -0
  1889. package/dist/learning/pattern-crystallizer.d.ts.map +1 -0
  1890. package/dist/learning/pattern-crystallizer.js +248 -0
  1891. package/dist/learning/pattern-crystallizer.js.map +1 -0
  1892. package/dist/learning/reflection-buffer.d.ts +68 -0
  1893. package/dist/learning/reflection-buffer.d.ts.map +1 -0
  1894. package/dist/learning/reflection-buffer.js +155 -0
  1895. package/dist/learning/reflection-buffer.js.map +1 -0
  1896. package/dist/learning/rl-feedback-export.d.ts +79 -0
  1897. package/dist/learning/rl-feedback-export.d.ts.map +1 -0
  1898. package/dist/learning/rl-feedback-export.js +132 -0
  1899. package/dist/learning/rl-feedback-export.js.map +1 -0
  1900. package/dist/learning/self-evolution.d.ts +86 -0
  1901. package/dist/learning/self-evolution.d.ts.map +1 -0
  1902. package/dist/learning/self-evolution.js +217 -0
  1903. package/dist/learning/self-evolution.js.map +1 -0
  1904. package/dist/learning/skill-forge.d.ts +157 -0
  1905. package/dist/learning/skill-forge.d.ts.map +1 -0
  1906. package/dist/learning/skill-forge.js +515 -0
  1907. package/dist/learning/skill-forge.js.map +1 -0
  1908. package/dist/learning/sleep-time-agent.d.ts +107 -0
  1909. package/dist/learning/sleep-time-agent.d.ts.map +1 -0
  1910. package/dist/learning/sleep-time-agent.js +197 -0
  1911. package/dist/learning/sleep-time-agent.js.map +1 -0
  1912. package/dist/learning/types.d.ts +77 -0
  1913. package/dist/learning/types.d.ts.map +1 -0
  1914. package/dist/learning/types.js +11 -0
  1915. package/dist/learning/types.js.map +1 -0
  1916. package/dist/lib.d.ts +230 -0
  1917. package/dist/lib.d.ts.map +1 -0
  1918. package/dist/lib.js +471 -0
  1919. package/dist/lib.js.map +1 -0
  1920. package/dist/lsp/agent-tools.d.ts +109 -0
  1921. package/dist/lsp/agent-tools.d.ts.map +1 -0
  1922. package/dist/lsp/agent-tools.js +585 -0
  1923. package/dist/lsp/agent-tools.js.map +1 -0
  1924. package/dist/lsp/lsp-tools.d.ts +84 -0
  1925. package/dist/lsp/lsp-tools.d.ts.map +1 -0
  1926. package/dist/lsp/lsp-tools.js +267 -0
  1927. package/dist/lsp/lsp-tools.js.map +1 -0
  1928. package/dist/lsp/server-registry.d.ts +153 -0
  1929. package/dist/lsp/server-registry.d.ts.map +1 -0
  1930. package/dist/lsp/server-registry.js +339 -0
  1931. package/dist/lsp/server-registry.js.map +1 -0
  1932. package/dist/lsp/symbol-operations.d.ts +97 -0
  1933. package/dist/lsp/symbol-operations.d.ts.map +1 -0
  1934. package/dist/lsp/symbol-operations.js +761 -0
  1935. package/dist/lsp/symbol-operations.js.map +1 -0
  1936. package/dist/magic/command-resolver.d.ts +27 -0
  1937. package/dist/magic/command-resolver.d.ts.map +1 -0
  1938. package/dist/magic/command-resolver.js +52 -0
  1939. package/dist/magic/command-resolver.js.map +1 -0
  1940. package/dist/magic/handlers/ai-commit.d.ts +24 -0
  1941. package/dist/magic/handlers/ai-commit.d.ts.map +1 -0
  1942. package/dist/magic/handlers/ai-commit.js +56 -0
  1943. package/dist/magic/handlers/ai-commit.js.map +1 -0
  1944. package/dist/magic/handlers/docstring.d.ts +3 -0
  1945. package/dist/magic/handlers/docstring.d.ts.map +1 -0
  1946. package/dist/magic/handlers/docstring.js +11 -0
  1947. package/dist/magic/handlers/docstring.js.map +1 -0
  1948. package/dist/magic/handlers/explain.d.ts +3 -0
  1949. package/dist/magic/handlers/explain.d.ts.map +1 -0
  1950. package/dist/magic/handlers/explain.js +11 -0
  1951. package/dist/magic/handlers/explain.js.map +1 -0
  1952. package/dist/magic/handlers/fix.d.ts +3 -0
  1953. package/dist/magic/handlers/fix.d.ts.map +1 -0
  1954. package/dist/magic/handlers/fix.js +11 -0
  1955. package/dist/magic/handlers/fix.js.map +1 -0
  1956. package/dist/magic/handlers/format.d.ts +3 -0
  1957. package/dist/magic/handlers/format.d.ts.map +1 -0
  1958. package/dist/magic/handlers/format.js +11 -0
  1959. package/dist/magic/handlers/format.js.map +1 -0
  1960. package/dist/magic/handlers/investigate-issue.d.ts +27 -0
  1961. package/dist/magic/handlers/investigate-issue.d.ts.map +1 -0
  1962. package/dist/magic/handlers/investigate-issue.js +59 -0
  1963. package/dist/magic/handlers/investigate-issue.js.map +1 -0
  1964. package/dist/magic/handlers/investigate-pr.d.ts +24 -0
  1965. package/dist/magic/handlers/investigate-pr.d.ts.map +1 -0
  1966. package/dist/magic/handlers/investigate-pr.js +58 -0
  1967. package/dist/magic/handlers/investigate-pr.js.map +1 -0
  1968. package/dist/magic/handlers/investigate-workflow.d.ts +23 -0
  1969. package/dist/magic/handlers/investigate-workflow.d.ts.map +1 -0
  1970. package/dist/magic/handlers/investigate-workflow.js +56 -0
  1971. package/dist/magic/handlers/investigate-workflow.js.map +1 -0
  1972. package/dist/magic/handlers/merge-conflict.d.ts +27 -0
  1973. package/dist/magic/handlers/merge-conflict.d.ts.map +1 -0
  1974. package/dist/magic/handlers/merge-conflict.js +68 -0
  1975. package/dist/magic/handlers/merge-conflict.js.map +1 -0
  1976. package/dist/magic/handlers/optimize.d.ts +3 -0
  1977. package/dist/magic/handlers/optimize.d.ts.map +1 -0
  1978. package/dist/magic/handlers/optimize.js +11 -0
  1979. package/dist/magic/handlers/optimize.js.map +1 -0
  1980. package/dist/magic/handlers/pr-content.d.ts +23 -0
  1981. package/dist/magic/handlers/pr-content.d.ts.map +1 -0
  1982. package/dist/magic/handlers/pr-content.js +67 -0
  1983. package/dist/magic/handlers/pr-content.js.map +1 -0
  1984. package/dist/magic/handlers/refactor.d.ts +3 -0
  1985. package/dist/magic/handlers/refactor.d.ts.map +1 -0
  1986. package/dist/magic/handlers/refactor.js +11 -0
  1987. package/dist/magic/handlers/refactor.js.map +1 -0
  1988. package/dist/magic/handlers/release-notes.d.ts +28 -0
  1989. package/dist/magic/handlers/release-notes.d.ts.map +1 -0
  1990. package/dist/magic/handlers/release-notes.js +85 -0
  1991. package/dist/magic/handlers/release-notes.js.map +1 -0
  1992. package/dist/magic/handlers/review.d.ts +3 -0
  1993. package/dist/magic/handlers/review.d.ts.map +1 -0
  1994. package/dist/magic/handlers/review.js +11 -0
  1995. package/dist/magic/handlers/review.js.map +1 -0
  1996. package/dist/magic/handlers/test.d.ts +3 -0
  1997. package/dist/magic/handlers/test.d.ts.map +1 -0
  1998. package/dist/magic/handlers/test.js +11 -0
  1999. package/dist/magic/handlers/test.js.map +1 -0
  2000. package/dist/magic/magic-commands.d.ts +17 -0
  2001. package/dist/magic/magic-commands.d.ts.map +1 -0
  2002. package/dist/magic/magic-commands.js +143 -0
  2003. package/dist/magic/magic-commands.js.map +1 -0
  2004. package/dist/magic/types.d.ts +52 -0
  2005. package/dist/magic/types.d.ts.map +1 -0
  2006. package/dist/magic/types.js +10 -0
  2007. package/dist/magic/types.js.map +1 -0
  2008. package/dist/marketplace/acp-agent-registry.d.ts +237 -0
  2009. package/dist/marketplace/acp-agent-registry.d.ts.map +1 -0
  2010. package/dist/marketplace/acp-agent-registry.js +694 -0
  2011. package/dist/marketplace/acp-agent-registry.js.map +1 -0
  2012. package/dist/marketplace/manifest.d.ts +47 -0
  2013. package/dist/marketplace/manifest.d.ts.map +1 -0
  2014. package/dist/marketplace/manifest.js +174 -0
  2015. package/dist/marketplace/manifest.js.map +1 -0
  2016. package/dist/marketplace/mcpb.d.ts +131 -0
  2017. package/dist/marketplace/mcpb.d.ts.map +1 -0
  2018. package/dist/marketplace/mcpb.js +218 -0
  2019. package/dist/marketplace/mcpb.js.map +1 -0
  2020. package/dist/marketplace/plugin-loader.d.ts +126 -0
  2021. package/dist/marketplace/plugin-loader.d.ts.map +1 -0
  2022. package/dist/marketplace/plugin-loader.js +335 -0
  2023. package/dist/marketplace/plugin-loader.js.map +1 -0
  2024. package/dist/marketplace/registry.d.ts +229 -0
  2025. package/dist/marketplace/registry.d.ts.map +1 -0
  2026. package/dist/marketplace/registry.js +875 -0
  2027. package/dist/marketplace/registry.js.map +1 -0
  2028. package/dist/marketplace/skill-quarantine.d.ts +76 -0
  2029. package/dist/marketplace/skill-quarantine.d.ts.map +1 -0
  2030. package/dist/marketplace/skill-quarantine.js +146 -0
  2031. package/dist/marketplace/skill-quarantine.js.map +1 -0
  2032. package/dist/mcp/chrome-devtools.d.ts +91 -0
  2033. package/dist/mcp/chrome-devtools.d.ts.map +1 -0
  2034. package/dist/mcp/chrome-devtools.js +152 -0
  2035. package/dist/mcp/chrome-devtools.js.map +1 -0
  2036. package/dist/mcp/discovery.d.ts +67 -0
  2037. package/dist/mcp/discovery.d.ts.map +1 -0
  2038. package/dist/mcp/discovery.js +188 -0
  2039. package/dist/mcp/discovery.js.map +1 -0
  2040. package/dist/mcp/elicitation.d.ts +128 -0
  2041. package/dist/mcp/elicitation.d.ts.map +1 -0
  2042. package/dist/mcp/elicitation.js +197 -0
  2043. package/dist/mcp/elicitation.js.map +1 -0
  2044. package/dist/mcp/health-probe.d.ts +60 -0
  2045. package/dist/mcp/health-probe.d.ts.map +1 -0
  2046. package/dist/mcp/health-probe.js +208 -0
  2047. package/dist/mcp/health-probe.js.map +1 -0
  2048. package/dist/mcp/mcp-server.d.ts +276 -0
  2049. package/dist/mcp/mcp-server.d.ts.map +1 -0
  2050. package/dist/mcp/mcp-server.js +543 -0
  2051. package/dist/mcp/mcp-server.js.map +1 -0
  2052. package/dist/mcp/memory-tool-shim.d.ts +125 -0
  2053. package/dist/mcp/memory-tool-shim.d.ts.map +1 -0
  2054. package/dist/mcp/memory-tool-shim.js +397 -0
  2055. package/dist/mcp/memory-tool-shim.js.map +1 -0
  2056. package/dist/mcp/servers/design-bridge.d.ts +87 -0
  2057. package/dist/mcp/servers/design-bridge.d.ts.map +1 -0
  2058. package/dist/mcp/servers/design-bridge.js +259 -0
  2059. package/dist/mcp/servers/design-bridge.js.map +1 -0
  2060. package/dist/mcp/servers/wotann-tools.d.ts +133 -0
  2061. package/dist/mcp/servers/wotann-tools.d.ts.map +1 -0
  2062. package/dist/mcp/servers/wotann-tools.js +452 -0
  2063. package/dist/mcp/servers/wotann-tools.js.map +1 -0
  2064. package/dist/mcp/skills-as-prompts.d.ts +126 -0
  2065. package/dist/mcp/skills-as-prompts.d.ts.map +1 -0
  2066. package/dist/mcp/skills-as-prompts.js +212 -0
  2067. package/dist/mcp/skills-as-prompts.js.map +1 -0
  2068. package/dist/mcp/tool-loader.d.ts +116 -0
  2069. package/dist/mcp/tool-loader.d.ts.map +1 -0
  2070. package/dist/mcp/tool-loader.js +368 -0
  2071. package/dist/mcp/tool-loader.js.map +1 -0
  2072. package/dist/mcp/ui-resources.d.ts +79 -0
  2073. package/dist/mcp/ui-resources.d.ts.map +1 -0
  2074. package/dist/mcp/ui-resources.js +193 -0
  2075. package/dist/mcp/ui-resources.js.map +1 -0
  2076. package/dist/meet/coaching-engine.d.ts +35 -0
  2077. package/dist/meet/coaching-engine.d.ts.map +1 -0
  2078. package/dist/meet/coaching-engine.js +101 -0
  2079. package/dist/meet/coaching-engine.js.map +1 -0
  2080. package/dist/meet/meeting-pipeline.d.ts +85 -0
  2081. package/dist/meet/meeting-pipeline.d.ts.map +1 -0
  2082. package/dist/meet/meeting-pipeline.js +156 -0
  2083. package/dist/meet/meeting-pipeline.js.map +1 -0
  2084. package/dist/meet/meeting-runtime.d.ts +90 -0
  2085. package/dist/meet/meeting-runtime.d.ts.map +1 -0
  2086. package/dist/meet/meeting-runtime.js +189 -0
  2087. package/dist/meet/meeting-runtime.js.map +1 -0
  2088. package/dist/meet/meeting-store.d.ts +37 -0
  2089. package/dist/meet/meeting-store.d.ts.map +1 -0
  2090. package/dist/meet/meeting-store.js +158 -0
  2091. package/dist/meet/meeting-store.js.map +1 -0
  2092. package/dist/memory/abstention.d.ts +132 -0
  2093. package/dist/memory/abstention.d.ts.map +1 -0
  2094. package/dist/memory/abstention.js +192 -0
  2095. package/dist/memory/abstention.js.map +1 -0
  2096. package/dist/memory/active-memory.d.ts +153 -0
  2097. package/dist/memory/active-memory.d.ts.map +1 -0
  2098. package/dist/memory/active-memory.js +431 -0
  2099. package/dist/memory/active-memory.js.map +1 -0
  2100. package/dist/memory/agent-facts.d.ts +121 -0
  2101. package/dist/memory/agent-facts.d.ts.map +1 -0
  2102. package/dist/memory/agent-facts.js +225 -0
  2103. package/dist/memory/agent-facts.js.map +1 -0
  2104. package/dist/memory/asmr-voter.d.ts +106 -0
  2105. package/dist/memory/asmr-voter.d.ts.map +1 -0
  2106. package/dist/memory/asmr-voter.js +143 -0
  2107. package/dist/memory/asmr-voter.js.map +1 -0
  2108. package/dist/memory/atomic-memory.d.ts +122 -0
  2109. package/dist/memory/atomic-memory.d.ts.map +1 -0
  2110. package/dist/memory/atomic-memory.js +232 -0
  2111. package/dist/memory/atomic-memory.js.map +1 -0
  2112. package/dist/memory/bi-temporal-edges.d.ts +154 -0
  2113. package/dist/memory/bi-temporal-edges.d.ts.map +1 -0
  2114. package/dist/memory/bi-temporal-edges.js +177 -0
  2115. package/dist/memory/bi-temporal-edges.js.map +1 -0
  2116. package/dist/memory/block-memory.d.ts +60 -0
  2117. package/dist/memory/block-memory.d.ts.map +1 -0
  2118. package/dist/memory/block-memory.js +195 -0
  2119. package/dist/memory/block-memory.js.map +1 -0
  2120. package/dist/memory/cloud-sync.d.ts +86 -0
  2121. package/dist/memory/cloud-sync.d.ts.map +1 -0
  2122. package/dist/memory/cloud-sync.js +195 -0
  2123. package/dist/memory/cloud-sync.js.map +1 -0
  2124. package/dist/memory/community-detection.d.ts +104 -0
  2125. package/dist/memory/community-detection.d.ts.map +1 -0
  2126. package/dist/memory/community-detection.js +287 -0
  2127. package/dist/memory/community-detection.js.map +1 -0
  2128. package/dist/memory/context-builder.d.ts +112 -0
  2129. package/dist/memory/context-builder.d.ts.map +1 -0
  2130. package/dist/memory/context-builder.js +251 -0
  2131. package/dist/memory/context-builder.js.map +1 -0
  2132. package/dist/memory/context-fence.d.ts +88 -0
  2133. package/dist/memory/context-fence.d.ts.map +1 -0
  2134. package/dist/memory/context-fence.js +166 -0
  2135. package/dist/memory/context-fence.js.map +1 -0
  2136. package/dist/memory/context-loader.d.ts +111 -0
  2137. package/dist/memory/context-loader.d.ts.map +1 -0
  2138. package/dist/memory/context-loader.js +215 -0
  2139. package/dist/memory/context-loader.js.map +1 -0
  2140. package/dist/memory/context-tree-files.d.ts +56 -0
  2141. package/dist/memory/context-tree-files.d.ts.map +1 -0
  2142. package/dist/memory/context-tree-files.js +185 -0
  2143. package/dist/memory/context-tree-files.js.map +1 -0
  2144. package/dist/memory/context-tree.d.ts +75 -0
  2145. package/dist/memory/context-tree.d.ts.map +1 -0
  2146. package/dist/memory/context-tree.js +302 -0
  2147. package/dist/memory/context-tree.js.map +1 -0
  2148. package/dist/memory/contextual-embeddings.d.ts +106 -0
  2149. package/dist/memory/contextual-embeddings.d.ts.map +1 -0
  2150. package/dist/memory/contextual-embeddings.js +210 -0
  2151. package/dist/memory/contextual-embeddings.js.map +1 -0
  2152. package/dist/memory/contradiction-detector.d.ts +81 -0
  2153. package/dist/memory/contradiction-detector.d.ts.map +1 -0
  2154. package/dist/memory/contradiction-detector.js +248 -0
  2155. package/dist/memory/contradiction-detector.js.map +1 -0
  2156. package/dist/memory/conversation-miner.d.ts +53 -0
  2157. package/dist/memory/conversation-miner.d.ts.map +1 -0
  2158. package/dist/memory/conversation-miner.js +416 -0
  2159. package/dist/memory/conversation-miner.js.map +1 -0
  2160. package/dist/memory/cross-encoder.d.ts +78 -0
  2161. package/dist/memory/cross-encoder.d.ts.map +1 -0
  2162. package/dist/memory/cross-encoder.js +124 -0
  2163. package/dist/memory/cross-encoder.js.map +1 -0
  2164. package/dist/memory/dual-timestamp.d.ts +115 -0
  2165. package/dist/memory/dual-timestamp.d.ts.map +1 -0
  2166. package/dist/memory/dual-timestamp.js +253 -0
  2167. package/dist/memory/dual-timestamp.js.map +1 -0
  2168. package/dist/memory/embedding-profiles.d.ts +98 -0
  2169. package/dist/memory/embedding-profiles.d.ts.map +1 -0
  2170. package/dist/memory/embedding-profiles.js +193 -0
  2171. package/dist/memory/embedding-profiles.js.map +1 -0
  2172. package/dist/memory/entity-types.d.ts +271 -0
  2173. package/dist/memory/entity-types.d.ts.map +1 -0
  2174. package/dist/memory/entity-types.js +205 -0
  2175. package/dist/memory/entity-types.js.map +1 -0
  2176. package/dist/memory/episodic-memory.d.ts +149 -0
  2177. package/dist/memory/episodic-memory.d.ts.map +1 -0
  2178. package/dist/memory/episodic-memory.js +399 -0
  2179. package/dist/memory/episodic-memory.js.map +1 -0
  2180. package/dist/memory/evals/longmemeval/corpus.d.ts +115 -0
  2181. package/dist/memory/evals/longmemeval/corpus.d.ts.map +1 -0
  2182. package/dist/memory/evals/longmemeval/corpus.js +419 -0
  2183. package/dist/memory/evals/longmemeval/corpus.js.map +1 -0
  2184. package/dist/memory/evals/longmemeval/index.d.ts +31 -0
  2185. package/dist/memory/evals/longmemeval/index.d.ts.map +1 -0
  2186. package/dist/memory/evals/longmemeval/index.js +31 -0
  2187. package/dist/memory/evals/longmemeval/index.js.map +1 -0
  2188. package/dist/memory/evals/longmemeval/runner.d.ts +81 -0
  2189. package/dist/memory/evals/longmemeval/runner.d.ts.map +1 -0
  2190. package/dist/memory/evals/longmemeval/runner.js +258 -0
  2191. package/dist/memory/evals/longmemeval/runner.js.map +1 -0
  2192. package/dist/memory/evals/longmemeval/scorer.d.ts +135 -0
  2193. package/dist/memory/evals/longmemeval/scorer.d.ts.map +1 -0
  2194. package/dist/memory/evals/longmemeval/scorer.js +452 -0
  2195. package/dist/memory/evals/longmemeval/scorer.js.map +1 -0
  2196. package/dist/memory/extended-search-types.d.ts +96 -0
  2197. package/dist/memory/extended-search-types.d.ts.map +1 -0
  2198. package/dist/memory/extended-search-types.js +245 -0
  2199. package/dist/memory/extended-search-types.js.map +1 -0
  2200. package/dist/memory/folded-context.d.ts +80 -0
  2201. package/dist/memory/folded-context.d.ts.map +1 -0
  2202. package/dist/memory/folded-context.js +196 -0
  2203. package/dist/memory/folded-context.js.map +1 -0
  2204. package/dist/memory/freshness-decay.d.ts +89 -0
  2205. package/dist/memory/freshness-decay.d.ts.map +1 -0
  2206. package/dist/memory/freshness-decay.js +134 -0
  2207. package/dist/memory/freshness-decay.js.map +1 -0
  2208. package/dist/memory/graph-rag.d.ts +166 -0
  2209. package/dist/memory/graph-rag.d.ts.map +1 -0
  2210. package/dist/memory/graph-rag.js +573 -0
  2211. package/dist/memory/graph-rag.js.map +1 -0
  2212. package/dist/memory/guidance-whisper.d.ts +37 -0
  2213. package/dist/memory/guidance-whisper.d.ts.map +1 -0
  2214. package/dist/memory/guidance-whisper.js +76 -0
  2215. package/dist/memory/guidance-whisper.js.map +1 -0
  2216. package/dist/memory/hybrid-retrieval-v2.d.ts +154 -0
  2217. package/dist/memory/hybrid-retrieval-v2.d.ts.map +1 -0
  2218. package/dist/memory/hybrid-retrieval-v2.js +295 -0
  2219. package/dist/memory/hybrid-retrieval-v2.js.map +1 -0
  2220. package/dist/memory/hybrid-retrieval.d.ts +87 -0
  2221. package/dist/memory/hybrid-retrieval.d.ts.map +1 -0
  2222. package/dist/memory/hybrid-retrieval.js +244 -0
  2223. package/dist/memory/hybrid-retrieval.js.map +1 -0
  2224. package/dist/memory/incremental-indexer.d.ts +117 -0
  2225. package/dist/memory/incremental-indexer.d.ts.map +1 -0
  2226. package/dist/memory/incremental-indexer.js +200 -0
  2227. package/dist/memory/incremental-indexer.js.map +1 -0
  2228. package/dist/memory/knowledge-update-dynamics.d.ts +95 -0
  2229. package/dist/memory/knowledge-update-dynamics.d.ts.map +1 -0
  2230. package/dist/memory/knowledge-update-dynamics.js +154 -0
  2231. package/dist/memory/knowledge-update-dynamics.js.map +1 -0
  2232. package/dist/memory/mem-palace.d.ts +99 -0
  2233. package/dist/memory/mem-palace.d.ts.map +1 -0
  2234. package/dist/memory/mem-palace.js +215 -0
  2235. package/dist/memory/mem-palace.js.map +1 -0
  2236. package/dist/memory/mem0-add-only.d.ts +140 -0
  2237. package/dist/memory/mem0-add-only.d.ts.map +1 -0
  2238. package/dist/memory/mem0-add-only.js +279 -0
  2239. package/dist/memory/mem0-add-only.js.map +1 -0
  2240. package/dist/memory/memory-benchmark.d.ts +99 -0
  2241. package/dist/memory/memory-benchmark.d.ts.map +1 -0
  2242. package/dist/memory/memory-benchmark.js +393 -0
  2243. package/dist/memory/memory-benchmark.js.map +1 -0
  2244. package/dist/memory/memory-tools.d.ts +147 -0
  2245. package/dist/memory/memory-tools.d.ts.map +1 -0
  2246. package/dist/memory/memory-tools.js +415 -0
  2247. package/dist/memory/memory-tools.js.map +1 -0
  2248. package/dist/memory/memvid-backend.d.ts +122 -0
  2249. package/dist/memory/memvid-backend.d.ts.map +1 -0
  2250. package/dist/memory/memvid-backend.js +302 -0
  2251. package/dist/memory/memvid-backend.js.map +1 -0
  2252. package/dist/memory/multi-tier.d.ts +87 -0
  2253. package/dist/memory/multi-tier.d.ts.map +1 -0
  2254. package/dist/memory/multi-tier.js +186 -0
  2255. package/dist/memory/multi-tier.js.map +1 -0
  2256. package/dist/memory/observation-extractor.d.ts +122 -0
  2257. package/dist/memory/observation-extractor.d.ts.map +1 -0
  2258. package/dist/memory/observation-extractor.js +529 -0
  2259. package/dist/memory/observation-extractor.js.map +1 -0
  2260. package/dist/memory/observer.d.ts +159 -0
  2261. package/dist/memory/observer.d.ts.map +1 -0
  2262. package/dist/memory/observer.js +273 -0
  2263. package/dist/memory/observer.js.map +1 -0
  2264. package/dist/memory/omega-layers.d.ts +136 -0
  2265. package/dist/memory/omega-layers.d.ts.map +1 -0
  2266. package/dist/memory/omega-layers.js +263 -0
  2267. package/dist/memory/omega-layers.js.map +1 -0
  2268. package/dist/memory/onnx-cross-encoder.d.ts +239 -0
  2269. package/dist/memory/onnx-cross-encoder.d.ts.map +1 -0
  2270. package/dist/memory/onnx-cross-encoder.js +627 -0
  2271. package/dist/memory/onnx-cross-encoder.js.map +1 -0
  2272. package/dist/memory/persona-tree.d.ts +102 -0
  2273. package/dist/memory/persona-tree.d.ts.map +1 -0
  2274. package/dist/memory/persona-tree.js +269 -0
  2275. package/dist/memory/persona-tree.js.map +1 -0
  2276. package/dist/memory/pluggable-provider.d.ts +140 -0
  2277. package/dist/memory/pluggable-provider.d.ts.map +1 -0
  2278. package/dist/memory/pluggable-provider.js +253 -0
  2279. package/dist/memory/pluggable-provider.js.map +1 -0
  2280. package/dist/memory/proactive-memory.d.ts +59 -0
  2281. package/dist/memory/proactive-memory.d.ts.map +1 -0
  2282. package/dist/memory/proactive-memory.js +296 -0
  2283. package/dist/memory/proactive-memory.js.map +1 -0
  2284. package/dist/memory/progressive-context-loader.d.ts +153 -0
  2285. package/dist/memory/progressive-context-loader.d.ts.map +1 -0
  2286. package/dist/memory/progressive-context-loader.js +212 -0
  2287. package/dist/memory/progressive-context-loader.js.map +1 -0
  2288. package/dist/memory/qmd-integration.d.ts +23 -0
  2289. package/dist/memory/qmd-integration.d.ts.map +1 -0
  2290. package/dist/memory/qmd-integration.js +149 -0
  2291. package/dist/memory/qmd-integration.js.map +1 -0
  2292. package/dist/memory/quantized-vector-store.d.ts +126 -0
  2293. package/dist/memory/quantized-vector-store.d.ts.map +1 -0
  2294. package/dist/memory/quantized-vector-store.js +151 -0
  2295. package/dist/memory/quantized-vector-store.js.map +1 -0
  2296. package/dist/memory/reflector.d.ts +158 -0
  2297. package/dist/memory/reflector.d.ts.map +1 -0
  2298. package/dist/memory/reflector.js +315 -0
  2299. package/dist/memory/reflector.js.map +1 -0
  2300. package/dist/memory/relationship-types.d.ts +117 -0
  2301. package/dist/memory/relationship-types.d.ts.map +1 -0
  2302. package/dist/memory/relationship-types.js +215 -0
  2303. package/dist/memory/relationship-types.js.map +1 -0
  2304. package/dist/memory/retrieval-modes/authority-weight.d.ts +17 -0
  2305. package/dist/memory/retrieval-modes/authority-weight.d.ts.map +1 -0
  2306. package/dist/memory/retrieval-modes/authority-weight.js +40 -0
  2307. package/dist/memory/retrieval-modes/authority-weight.js.map +1 -0
  2308. package/dist/memory/retrieval-modes/cross-session-bridge.d.ts +16 -0
  2309. package/dist/memory/retrieval-modes/cross-session-bridge.d.ts.map +1 -0
  2310. package/dist/memory/retrieval-modes/cross-session-bridge.js +68 -0
  2311. package/dist/memory/retrieval-modes/cross-session-bridge.js.map +1 -0
  2312. package/dist/memory/retrieval-modes/fact-time-travel.d.ts +19 -0
  2313. package/dist/memory/retrieval-modes/fact-time-travel.d.ts.map +1 -0
  2314. package/dist/memory/retrieval-modes/fact-time-travel.js +89 -0
  2315. package/dist/memory/retrieval-modes/fact-time-travel.js.map +1 -0
  2316. package/dist/memory/retrieval-modes/fuzzy-match.d.ts +16 -0
  2317. package/dist/memory/retrieval-modes/fuzzy-match.d.ts.map +1 -0
  2318. package/dist/memory/retrieval-modes/fuzzy-match.js +67 -0
  2319. package/dist/memory/retrieval-modes/fuzzy-match.js.map +1 -0
  2320. package/dist/memory/retrieval-modes/graph-traversal.d.ts +16 -0
  2321. package/dist/memory/retrieval-modes/graph-traversal.d.ts.map +1 -0
  2322. package/dist/memory/retrieval-modes/graph-traversal.js +88 -0
  2323. package/dist/memory/retrieval-modes/graph-traversal.js.map +1 -0
  2324. package/dist/memory/retrieval-modes/ingest-time-travel.d.ts +21 -0
  2325. package/dist/memory/retrieval-modes/ingest-time-travel.d.ts.map +1 -0
  2326. package/dist/memory/retrieval-modes/ingest-time-travel.js +73 -0
  2327. package/dist/memory/retrieval-modes/ingest-time-travel.js.map +1 -0
  2328. package/dist/memory/retrieval-modes/path-based.d.ts +16 -0
  2329. package/dist/memory/retrieval-modes/path-based.d.ts.map +1 -0
  2330. package/dist/memory/retrieval-modes/path-based.js +110 -0
  2331. package/dist/memory/retrieval-modes/path-based.js.map +1 -0
  2332. package/dist/memory/retrieval-modes/semantic-cluster.d.ts +20 -0
  2333. package/dist/memory/retrieval-modes/semantic-cluster.d.ts.map +1 -0
  2334. package/dist/memory/retrieval-modes/semantic-cluster.js +159 -0
  2335. package/dist/memory/retrieval-modes/semantic-cluster.js.map +1 -0
  2336. package/dist/memory/retrieval-modes/summary-first.d.ts +17 -0
  2337. package/dist/memory/retrieval-modes/summary-first.d.ts.map +1 -0
  2338. package/dist/memory/retrieval-modes/summary-first.js +82 -0
  2339. package/dist/memory/retrieval-modes/summary-first.js.map +1 -0
  2340. package/dist/memory/retrieval-modes/temporal-window.d.ts +15 -0
  2341. package/dist/memory/retrieval-modes/temporal-window.d.ts.map +1 -0
  2342. package/dist/memory/retrieval-modes/temporal-window.js +52 -0
  2343. package/dist/memory/retrieval-modes/temporal-window.js.map +1 -0
  2344. package/dist/memory/retrieval-modes/time-decay.d.ts +16 -0
  2345. package/dist/memory/retrieval-modes/time-decay.d.ts.map +1 -0
  2346. package/dist/memory/retrieval-modes/time-decay.js +54 -0
  2347. package/dist/memory/retrieval-modes/time-decay.js.map +1 -0
  2348. package/dist/memory/retrieval-modes/typed-entity.d.ts +15 -0
  2349. package/dist/memory/retrieval-modes/typed-entity.d.ts.map +1 -0
  2350. package/dist/memory/retrieval-modes/typed-entity.js +75 -0
  2351. package/dist/memory/retrieval-modes/typed-entity.js.map +1 -0
  2352. package/dist/memory/retrieval-modes/types.d.ts +98 -0
  2353. package/dist/memory/retrieval-modes/types.d.ts.map +1 -0
  2354. package/dist/memory/retrieval-modes/types.js +24 -0
  2355. package/dist/memory/retrieval-modes/types.js.map +1 -0
  2356. package/dist/memory/retrieval-quality.d.ts +73 -0
  2357. package/dist/memory/retrieval-quality.d.ts.map +1 -0
  2358. package/dist/memory/retrieval-quality.js +117 -0
  2359. package/dist/memory/retrieval-quality.js.map +1 -0
  2360. package/dist/memory/retrieval-registry.d.ts +51 -0
  2361. package/dist/memory/retrieval-registry.d.ts.map +1 -0
  2362. package/dist/memory/retrieval-registry.js +73 -0
  2363. package/dist/memory/retrieval-registry.js.map +1 -0
  2364. package/dist/memory/rrf.d.ts +65 -0
  2365. package/dist/memory/rrf.d.ts.map +1 -0
  2366. package/dist/memory/rrf.js +84 -0
  2367. package/dist/memory/rrf.js.map +1 -0
  2368. package/dist/memory/semantic-cache.d.ts +77 -0
  2369. package/dist/memory/semantic-cache.d.ts.map +1 -0
  2370. package/dist/memory/semantic-cache.js +182 -0
  2371. package/dist/memory/semantic-cache.js.map +1 -0
  2372. package/dist/memory/semantic-search.d.ts +93 -0
  2373. package/dist/memory/semantic-search.d.ts.map +1 -0
  2374. package/dist/memory/semantic-search.js +276 -0
  2375. package/dist/memory/semantic-search.js.map +1 -0
  2376. package/dist/memory/session-ingestion.d.ts +209 -0
  2377. package/dist/memory/session-ingestion.d.ts.map +1 -0
  2378. package/dist/memory/session-ingestion.js +314 -0
  2379. package/dist/memory/session-ingestion.js.map +1 -0
  2380. package/dist/memory/sqlite-vec-backend.d.ts +77 -0
  2381. package/dist/memory/sqlite-vec-backend.d.ts.map +1 -0
  2382. package/dist/memory/sqlite-vec-backend.js +255 -0
  2383. package/dist/memory/sqlite-vec-backend.js.map +1 -0
  2384. package/dist/memory/stable-prefix.d.ts +123 -0
  2385. package/dist/memory/stable-prefix.d.ts.map +1 -0
  2386. package/dist/memory/stable-prefix.js +209 -0
  2387. package/dist/memory/stable-prefix.js.map +1 -0
  2388. package/dist/memory/store.d.ts +1090 -0
  2389. package/dist/memory/store.d.ts.map +1 -0
  2390. package/dist/memory/store.js +3571 -0
  2391. package/dist/memory/store.js.map +1 -0
  2392. package/dist/memory/temporal-memory.d.ts +113 -0
  2393. package/dist/memory/temporal-memory.d.ts.map +1 -0
  2394. package/dist/memory/temporal-memory.js +358 -0
  2395. package/dist/memory/temporal-memory.js.map +1 -0
  2396. package/dist/memory/tempr.d.ts +129 -0
  2397. package/dist/memory/tempr.d.ts.map +1 -0
  2398. package/dist/memory/tempr.js +175 -0
  2399. package/dist/memory/tempr.js.map +1 -0
  2400. package/dist/memory/tunnel-detector.d.ts +82 -0
  2401. package/dist/memory/tunnel-detector.d.ts.map +1 -0
  2402. package/dist/memory/tunnel-detector.js +122 -0
  2403. package/dist/memory/tunnel-detector.js.map +1 -0
  2404. package/dist/memory/unified-knowledge.d.ts +58 -0
  2405. package/dist/memory/unified-knowledge.d.ts.map +1 -0
  2406. package/dist/memory/unified-knowledge.js +85 -0
  2407. package/dist/memory/unified-knowledge.js.map +1 -0
  2408. package/dist/memory/vector-store.d.ts +140 -0
  2409. package/dist/memory/vector-store.d.ts.map +1 -0
  2410. package/dist/memory/vector-store.js +399 -0
  2411. package/dist/memory/vector-store.js.map +1 -0
  2412. package/dist/memory/web-history-bank.d.ts +70 -0
  2413. package/dist/memory/web-history-bank.d.ts.map +1 -0
  2414. package/dist/memory/web-history-bank.js +175 -0
  2415. package/dist/memory/web-history-bank.js.map +1 -0
  2416. package/dist/memory/whisper-hook.d.ts +19 -0
  2417. package/dist/memory/whisper-hook.d.ts.map +1 -0
  2418. package/dist/memory/whisper-hook.js +35 -0
  2419. package/dist/memory/whisper-hook.js.map +1 -0
  2420. package/dist/memory/wings-rooms-halls.d.ts +107 -0
  2421. package/dist/memory/wings-rooms-halls.d.ts.map +1 -0
  2422. package/dist/memory/wings-rooms-halls.js +214 -0
  2423. package/dist/memory/wings-rooms-halls.js.map +1 -0
  2424. package/dist/middleware/auto-install.d.ts +94 -0
  2425. package/dist/middleware/auto-install.d.ts.map +1 -0
  2426. package/dist/middleware/auto-install.js +254 -0
  2427. package/dist/middleware/auto-install.js.map +1 -0
  2428. package/dist/middleware/dangling-tool-call.d.ts +59 -0
  2429. package/dist/middleware/dangling-tool-call.d.ts.map +1 -0
  2430. package/dist/middleware/dangling-tool-call.js +124 -0
  2431. package/dist/middleware/dangling-tool-call.js.map +1 -0
  2432. package/dist/middleware/deferred-tool-filter.d.ts +149 -0
  2433. package/dist/middleware/deferred-tool-filter.d.ts.map +1 -0
  2434. package/dist/middleware/deferred-tool-filter.js +321 -0
  2435. package/dist/middleware/deferred-tool-filter.js.map +1 -0
  2436. package/dist/middleware/doom-loop.d.ts +119 -0
  2437. package/dist/middleware/doom-loop.d.ts.map +1 -0
  2438. package/dist/middleware/doom-loop.js +362 -0
  2439. package/dist/middleware/doom-loop.js.map +1 -0
  2440. package/dist/middleware/file-type-gate.d.ts +140 -0
  2441. package/dist/middleware/file-type-gate.d.ts.map +1 -0
  2442. package/dist/middleware/file-type-gate.js +486 -0
  2443. package/dist/middleware/file-type-gate.js.map +1 -0
  2444. package/dist/middleware/guardrail-provider.d.ts +125 -0
  2445. package/dist/middleware/guardrail-provider.d.ts.map +1 -0
  2446. package/dist/middleware/guardrail-provider.js +216 -0
  2447. package/dist/middleware/guardrail-provider.js.map +1 -0
  2448. package/dist/middleware/intent-gate.d.ts +8 -0
  2449. package/dist/middleware/intent-gate.d.ts.map +1 -0
  2450. package/dist/middleware/intent-gate.js +184 -0
  2451. package/dist/middleware/intent-gate.js.map +1 -0
  2452. package/dist/middleware/layers.d.ts +71 -0
  2453. package/dist/middleware/layers.d.ts.map +1 -0
  2454. package/dist/middleware/layers.js +529 -0
  2455. package/dist/middleware/layers.js.map +1 -0
  2456. package/dist/middleware/llm-error-handling.d.ts +98 -0
  2457. package/dist/middleware/llm-error-handling.d.ts.map +1 -0
  2458. package/dist/middleware/llm-error-handling.js +315 -0
  2459. package/dist/middleware/llm-error-handling.js.map +1 -0
  2460. package/dist/middleware/local-context.d.ts +47 -0
  2461. package/dist/middleware/local-context.d.ts.map +1 -0
  2462. package/dist/middleware/local-context.js +237 -0
  2463. package/dist/middleware/local-context.js.map +1 -0
  2464. package/dist/middleware/loop-detection.d.ts +87 -0
  2465. package/dist/middleware/loop-detection.d.ts.map +1 -0
  2466. package/dist/middleware/loop-detection.js +168 -0
  2467. package/dist/middleware/loop-detection.js.map +1 -0
  2468. package/dist/middleware/model-call-limit.d.ts +98 -0
  2469. package/dist/middleware/model-call-limit.d.ts.map +1 -0
  2470. package/dist/middleware/model-call-limit.js +160 -0
  2471. package/dist/middleware/model-call-limit.js.map +1 -0
  2472. package/dist/middleware/non-interactive.d.ts +82 -0
  2473. package/dist/middleware/non-interactive.d.ts.map +1 -0
  2474. package/dist/middleware/non-interactive.js +195 -0
  2475. package/dist/middleware/non-interactive.js.map +1 -0
  2476. package/dist/middleware/output-truncation.d.ts +72 -0
  2477. package/dist/middleware/output-truncation.d.ts.map +1 -0
  2478. package/dist/middleware/output-truncation.js +152 -0
  2479. package/dist/middleware/output-truncation.js.map +1 -0
  2480. package/dist/middleware/pipeline.d.ts +142 -0
  2481. package/dist/middleware/pipeline.d.ts.map +1 -0
  2482. package/dist/middleware/pipeline.js +426 -0
  2483. package/dist/middleware/pipeline.js.map +1 -0
  2484. package/dist/middleware/plan-enforcement.d.ts +102 -0
  2485. package/dist/middleware/plan-enforcement.d.ts.map +1 -0
  2486. package/dist/middleware/plan-enforcement.js +247 -0
  2487. package/dist/middleware/plan-enforcement.js.map +1 -0
  2488. package/dist/middleware/pre-completion-checklist.d.ts +124 -0
  2489. package/dist/middleware/pre-completion-checklist.d.ts.map +1 -0
  2490. package/dist/middleware/pre-completion-checklist.js +401 -0
  2491. package/dist/middleware/pre-completion-checklist.js.map +1 -0
  2492. package/dist/middleware/reasoning-sandwich.d.ts +131 -0
  2493. package/dist/middleware/reasoning-sandwich.d.ts.map +1 -0
  2494. package/dist/middleware/reasoning-sandwich.js +476 -0
  2495. package/dist/middleware/reasoning-sandwich.js.map +1 -0
  2496. package/dist/middleware/response-cache.d.ts +118 -0
  2497. package/dist/middleware/response-cache.d.ts.map +1 -0
  2498. package/dist/middleware/response-cache.js +267 -0
  2499. package/dist/middleware/response-cache.js.map +1 -0
  2500. package/dist/middleware/sandbox-audit.d.ts +124 -0
  2501. package/dist/middleware/sandbox-audit.d.ts.map +1 -0
  2502. package/dist/middleware/sandbox-audit.js +319 -0
  2503. package/dist/middleware/sandbox-audit.js.map +1 -0
  2504. package/dist/middleware/sanitize-tool-inputs.d.ts +84 -0
  2505. package/dist/middleware/sanitize-tool-inputs.d.ts.map +1 -0
  2506. package/dist/middleware/sanitize-tool-inputs.js +235 -0
  2507. package/dist/middleware/sanitize-tool-inputs.js.map +1 -0
  2508. package/dist/middleware/stale-detection.d.ts +103 -0
  2509. package/dist/middleware/stale-detection.d.ts.map +1 -0
  2510. package/dist/middleware/stale-detection.js +211 -0
  2511. package/dist/middleware/stale-detection.js.map +1 -0
  2512. package/dist/middleware/system-notifications.d.ts +92 -0
  2513. package/dist/middleware/system-notifications.d.ts.map +1 -0
  2514. package/dist/middleware/system-notifications.js +280 -0
  2515. package/dist/middleware/system-notifications.js.map +1 -0
  2516. package/dist/middleware/title.d.ts +83 -0
  2517. package/dist/middleware/title.d.ts.map +1 -0
  2518. package/dist/middleware/title.js +162 -0
  2519. package/dist/middleware/title.js.map +1 -0
  2520. package/dist/middleware/tool-flow-gate.d.ts +74 -0
  2521. package/dist/middleware/tool-flow-gate.d.ts.map +1 -0
  2522. package/dist/middleware/tool-flow-gate.js +105 -0
  2523. package/dist/middleware/tool-flow-gate.js.map +1 -0
  2524. package/dist/middleware/tool-pair-validator.d.ts +61 -0
  2525. package/dist/middleware/tool-pair-validator.d.ts.map +1 -0
  2526. package/dist/middleware/tool-pair-validator.js +127 -0
  2527. package/dist/middleware/tool-pair-validator.js.map +1 -0
  2528. package/dist/middleware/trifecta-guard.d.ts +132 -0
  2529. package/dist/middleware/trifecta-guard.d.ts.map +1 -0
  2530. package/dist/middleware/trifecta-guard.js +261 -0
  2531. package/dist/middleware/trifecta-guard.js.map +1 -0
  2532. package/dist/middleware/ttsr.d.ts +40 -0
  2533. package/dist/middleware/ttsr.d.ts.map +1 -0
  2534. package/dist/middleware/ttsr.js +107 -0
  2535. package/dist/middleware/ttsr.js.map +1 -0
  2536. package/dist/middleware/types.d.ts +68 -0
  2537. package/dist/middleware/types.d.ts.map +1 -0
  2538. package/dist/middleware/types.js +7 -0
  2539. package/dist/middleware/types.js.map +1 -0
  2540. package/dist/middleware/verification-enforcement.d.ts +89 -0
  2541. package/dist/middleware/verification-enforcement.d.ts.map +1 -0
  2542. package/dist/middleware/verification-enforcement.js +192 -0
  2543. package/dist/middleware/verification-enforcement.js.map +1 -0
  2544. package/dist/middleware/verifier.d.ts +44 -0
  2545. package/dist/middleware/verifier.d.ts.map +1 -0
  2546. package/dist/middleware/verifier.js +103 -0
  2547. package/dist/middleware/verifier.js.map +1 -0
  2548. package/dist/mobile/haptic-feedback.d.ts +25 -0
  2549. package/dist/mobile/haptic-feedback.d.ts.map +1 -0
  2550. package/dist/mobile/haptic-feedback.js +46 -0
  2551. package/dist/mobile/haptic-feedback.js.map +1 -0
  2552. package/dist/mobile/ios-app.d.ts +285 -0
  2553. package/dist/mobile/ios-app.d.ts.map +1 -0
  2554. package/dist/mobile/ios-app.js +539 -0
  2555. package/dist/mobile/ios-app.js.map +1 -0
  2556. package/dist/mobile/ios-types.d.ts +185 -0
  2557. package/dist/mobile/ios-types.d.ts.map +1 -0
  2558. package/dist/mobile/ios-types.js +117 -0
  2559. package/dist/mobile/ios-types.js.map +1 -0
  2560. package/dist/mobile/secure-auth.d.ts +123 -0
  2561. package/dist/mobile/secure-auth.d.ts.map +1 -0
  2562. package/dist/mobile/secure-auth.js +220 -0
  2563. package/dist/mobile/secure-auth.js.map +1 -0
  2564. package/dist/modes/agentless/localize.d.ts +52 -0
  2565. package/dist/modes/agentless/localize.d.ts.map +1 -0
  2566. package/dist/modes/agentless/localize.js +200 -0
  2567. package/dist/modes/agentless/localize.js.map +1 -0
  2568. package/dist/modes/agentless/orchestrator.d.ts +49 -0
  2569. package/dist/modes/agentless/orchestrator.d.ts.map +1 -0
  2570. package/dist/modes/agentless/orchestrator.js +94 -0
  2571. package/dist/modes/agentless/orchestrator.js.map +1 -0
  2572. package/dist/modes/agentless/repair.d.ts +45 -0
  2573. package/dist/modes/agentless/repair.d.ts.map +1 -0
  2574. package/dist/modes/agentless/repair.js +122 -0
  2575. package/dist/modes/agentless/repair.js.map +1 -0
  2576. package/dist/modes/agentless/types.d.ts +126 -0
  2577. package/dist/modes/agentless/types.d.ts.map +1 -0
  2578. package/dist/modes/agentless/types.js +13 -0
  2579. package/dist/modes/agentless/types.js.map +1 -0
  2580. package/dist/modes/agentless/validate.d.ts +46 -0
  2581. package/dist/modes/agentless/validate.d.ts.map +1 -0
  2582. package/dist/modes/agentless/validate.js +125 -0
  2583. package/dist/modes/agentless/validate.js.map +1 -0
  2584. package/dist/monitoring/source-monitor.d.ts +53 -0
  2585. package/dist/monitoring/source-monitor.d.ts.map +1 -0
  2586. package/dist/monitoring/source-monitor.js +251 -0
  2587. package/dist/monitoring/source-monitor.js.map +1 -0
  2588. package/dist/observability/openinference.d.ts +213 -0
  2589. package/dist/observability/openinference.d.ts.map +1 -0
  2590. package/dist/observability/openinference.js +336 -0
  2591. package/dist/observability/openinference.js.map +1 -0
  2592. package/dist/observability/otel-exporter.d.ts +142 -0
  2593. package/dist/observability/otel-exporter.d.ts.map +1 -0
  2594. package/dist/observability/otel-exporter.js +336 -0
  2595. package/dist/observability/otel-exporter.js.map +1 -0
  2596. package/dist/optimize/ripple-test-scope.d.ts +75 -0
  2597. package/dist/optimize/ripple-test-scope.d.ts.map +1 -0
  2598. package/dist/optimize/ripple-test-scope.js +121 -0
  2599. package/dist/optimize/ripple-test-scope.js.map +1 -0
  2600. package/dist/optimize/textgrad-critic.d.ts +46 -0
  2601. package/dist/optimize/textgrad-critic.d.ts.map +1 -0
  2602. package/dist/optimize/textgrad-critic.js +185 -0
  2603. package/dist/optimize/textgrad-critic.js.map +1 -0
  2604. package/dist/optimize/textgrad-optimizer.d.ts +119 -0
  2605. package/dist/optimize/textgrad-optimizer.d.ts.map +1 -0
  2606. package/dist/optimize/textgrad-optimizer.js +320 -0
  2607. package/dist/optimize/textgrad-optimizer.js.map +1 -0
  2608. package/dist/optimize/textgrad-types.d.ts +122 -0
  2609. package/dist/optimize/textgrad-types.d.ts.map +1 -0
  2610. package/dist/optimize/textgrad-types.js +61 -0
  2611. package/dist/optimize/textgrad-types.js.map +1 -0
  2612. package/dist/orchestration/agent-flows/command-blocks.d.ts +68 -0
  2613. package/dist/orchestration/agent-flows/command-blocks.d.ts.map +1 -0
  2614. package/dist/orchestration/agent-flows/command-blocks.js +94 -0
  2615. package/dist/orchestration/agent-flows/command-blocks.js.map +1 -0
  2616. package/dist/orchestration/agent-hierarchy.d.ts +75 -0
  2617. package/dist/orchestration/agent-hierarchy.d.ts.map +1 -0
  2618. package/dist/orchestration/agent-hierarchy.js +165 -0
  2619. package/dist/orchestration/agent-hierarchy.js.map +1 -0
  2620. package/dist/orchestration/agent-registry.d.ts +224 -0
  2621. package/dist/orchestration/agent-registry.d.ts.map +1 -0
  2622. package/dist/orchestration/agent-registry.js +753 -0
  2623. package/dist/orchestration/agent-registry.js.map +1 -0
  2624. package/dist/orchestration/agent-workspace.d.ts +60 -0
  2625. package/dist/orchestration/agent-workspace.d.ts.map +1 -0
  2626. package/dist/orchestration/agent-workspace.js +174 -0
  2627. package/dist/orchestration/agent-workspace.js.map +1 -0
  2628. package/dist/orchestration/architect-editor.d.ts +80 -0
  2629. package/dist/orchestration/architect-editor.d.ts.map +1 -0
  2630. package/dist/orchestration/architect-editor.js +130 -0
  2631. package/dist/orchestration/architect-editor.js.map +1 -0
  2632. package/dist/orchestration/architect-implement.d.ts +38 -0
  2633. package/dist/orchestration/architect-implement.d.ts.map +1 -0
  2634. package/dist/orchestration/architect-implement.js +88 -0
  2635. package/dist/orchestration/architect-implement.js.map +1 -0
  2636. package/dist/orchestration/archon-workflow-loader.d.ts +63 -0
  2637. package/dist/orchestration/archon-workflow-loader.d.ts.map +1 -0
  2638. package/dist/orchestration/archon-workflow-loader.js +202 -0
  2639. package/dist/orchestration/archon-workflow-loader.js.map +1 -0
  2640. package/dist/orchestration/arena.d.ts +69 -0
  2641. package/dist/orchestration/arena.d.ts.map +1 -0
  2642. package/dist/orchestration/arena.js +157 -0
  2643. package/dist/orchestration/arena.js.map +1 -0
  2644. package/dist/orchestration/auto-commit.d.ts +60 -0
  2645. package/dist/orchestration/auto-commit.d.ts.map +1 -0
  2646. package/dist/orchestration/auto-commit.js +223 -0
  2647. package/dist/orchestration/auto-commit.js.map +1 -0
  2648. package/dist/orchestration/autonomous-context.d.ts +105 -0
  2649. package/dist/orchestration/autonomous-context.d.ts.map +1 -0
  2650. package/dist/orchestration/autonomous-context.js +246 -0
  2651. package/dist/orchestration/autonomous-context.js.map +1 -0
  2652. package/dist/orchestration/autonomous.d.ts +386 -0
  2653. package/dist/orchestration/autonomous.d.ts.map +1 -0
  2654. package/dist/orchestration/autonomous.js +1163 -0
  2655. package/dist/orchestration/autonomous.js.map +1 -0
  2656. package/dist/orchestration/canary-monitor.d.ts +66 -0
  2657. package/dist/orchestration/canary-monitor.d.ts.map +1 -0
  2658. package/dist/orchestration/canary-monitor.js +157 -0
  2659. package/dist/orchestration/canary-monitor.js.map +1 -0
  2660. package/dist/orchestration/code-mode.d.ts +63 -0
  2661. package/dist/orchestration/code-mode.d.ts.map +1 -0
  2662. package/dist/orchestration/code-mode.js +218 -0
  2663. package/dist/orchestration/code-mode.js.map +1 -0
  2664. package/dist/orchestration/coordinator.d.ts +129 -0
  2665. package/dist/orchestration/coordinator.d.ts.map +1 -0
  2666. package/dist/orchestration/coordinator.js +355 -0
  2667. package/dist/orchestration/coordinator.js.map +1 -0
  2668. package/dist/orchestration/council.d.ts +163 -0
  2669. package/dist/orchestration/council.d.ts.map +1 -0
  2670. package/dist/orchestration/council.js +391 -0
  2671. package/dist/orchestration/council.js.map +1 -0
  2672. package/dist/orchestration/cowork.d.ts +198 -0
  2673. package/dist/orchestration/cowork.d.ts.map +1 -0
  2674. package/dist/orchestration/cowork.js +185 -0
  2675. package/dist/orchestration/cowork.js.map +1 -0
  2676. package/dist/orchestration/coze-flow/flow.d.ts +68 -0
  2677. package/dist/orchestration/coze-flow/flow.d.ts.map +1 -0
  2678. package/dist/orchestration/coze-flow/flow.js +126 -0
  2679. package/dist/orchestration/coze-flow/flow.js.map +1 -0
  2680. package/dist/orchestration/crew.d.ts +68 -0
  2681. package/dist/orchestration/crew.d.ts.map +1 -0
  2682. package/dist/orchestration/crew.js +130 -0
  2683. package/dist/orchestration/crew.js.map +1 -0
  2684. package/dist/orchestration/critic-rerank.d.ts +119 -0
  2685. package/dist/orchestration/critic-rerank.d.ts.map +1 -0
  2686. package/dist/orchestration/critic-rerank.js +207 -0
  2687. package/dist/orchestration/critic-rerank.js.map +1 -0
  2688. package/dist/orchestration/dag-runner.d.ts +78 -0
  2689. package/dist/orchestration/dag-runner.d.ts.map +1 -0
  2690. package/dist/orchestration/dag-runner.js +176 -0
  2691. package/dist/orchestration/dag-runner.js.map +1 -0
  2692. package/dist/orchestration/dify-flow/builder.d.ts +64 -0
  2693. package/dist/orchestration/dify-flow/builder.d.ts.map +1 -0
  2694. package/dist/orchestration/dify-flow/builder.js +125 -0
  2695. package/dist/orchestration/dify-flow/builder.js.map +1 -0
  2696. package/dist/orchestration/dify-flow/langflow-engine.d.ts +71 -0
  2697. package/dist/orchestration/dify-flow/langflow-engine.d.ts.map +1 -0
  2698. package/dist/orchestration/dify-flow/langflow-engine.js +133 -0
  2699. package/dist/orchestration/dify-flow/langflow-engine.js.map +1 -0
  2700. package/dist/orchestration/dual-persona-reviewer.d.ts +131 -0
  2701. package/dist/orchestration/dual-persona-reviewer.d.ts.map +1 -0
  2702. package/dist/orchestration/dual-persona-reviewer.js +242 -0
  2703. package/dist/orchestration/dual-persona-reviewer.js.map +1 -0
  2704. package/dist/orchestration/durable-execution.d.ts +85 -0
  2705. package/dist/orchestration/durable-execution.d.ts.map +1 -0
  2706. package/dist/orchestration/durable-execution.js +221 -0
  2707. package/dist/orchestration/durable-execution.js.map +1 -0
  2708. package/dist/orchestration/dynamic-replan.d.ts +80 -0
  2709. package/dist/orchestration/dynamic-replan.d.ts.map +1 -0
  2710. package/dist/orchestration/dynamic-replan.js +109 -0
  2711. package/dist/orchestration/dynamic-replan.js.map +1 -0
  2712. package/dist/orchestration/file-transport.d.ts +44 -0
  2713. package/dist/orchestration/file-transport.d.ts.map +1 -0
  2714. package/dist/orchestration/file-transport.js +126 -0
  2715. package/dist/orchestration/file-transport.js.map +1 -0
  2716. package/dist/orchestration/flow-primitives.d.ts +99 -0
  2717. package/dist/orchestration/flow-primitives.d.ts.map +1 -0
  2718. package/dist/orchestration/flow-primitives.js +175 -0
  2719. package/dist/orchestration/flow-primitives.js.map +1 -0
  2720. package/dist/orchestration/flowise-canvas/canvas.d.ts +63 -0
  2721. package/dist/orchestration/flowise-canvas/canvas.d.ts.map +1 -0
  2722. package/dist/orchestration/flowise-canvas/canvas.js +137 -0
  2723. package/dist/orchestration/flowise-canvas/canvas.js.map +1 -0
  2724. package/dist/orchestration/generative-agents-deep/observation-stream.d.ts +69 -0
  2725. package/dist/orchestration/generative-agents-deep/observation-stream.d.ts.map +1 -0
  2726. package/dist/orchestration/generative-agents-deep/observation-stream.js +115 -0
  2727. package/dist/orchestration/generative-agents-deep/observation-stream.js.map +1 -0
  2728. package/dist/orchestration/generator-agent-loop.d.ts +136 -0
  2729. package/dist/orchestration/generator-agent-loop.d.ts.map +1 -0
  2730. package/dist/orchestration/generator-agent-loop.js +144 -0
  2731. package/dist/orchestration/generator-agent-loop.js.map +1 -0
  2732. package/dist/orchestration/goal-drift.d.ts +87 -0
  2733. package/dist/orchestration/goal-drift.d.ts.map +1 -0
  2734. package/dist/orchestration/goal-drift.js +278 -0
  2735. package/dist/orchestration/goal-drift.js.map +1 -0
  2736. package/dist/orchestration/graph-dsl.d.ts +47 -0
  2737. package/dist/orchestration/graph-dsl.d.ts.map +1 -0
  2738. package/dist/orchestration/graph-dsl.js +148 -0
  2739. package/dist/orchestration/graph-dsl.js.map +1 -0
  2740. package/dist/orchestration/handoffs.d.ts +118 -0
  2741. package/dist/orchestration/handoffs.d.ts.map +1 -0
  2742. package/dist/orchestration/handoffs.js +145 -0
  2743. package/dist/orchestration/handoffs.js.map +1 -0
  2744. package/dist/orchestration/issue-graph.d.ts +176 -0
  2745. package/dist/orchestration/issue-graph.d.ts.map +1 -0
  2746. package/dist/orchestration/issue-graph.js +313 -0
  2747. package/dist/orchestration/issue-graph.js.map +1 -0
  2748. package/dist/orchestration/jean-orchestrator.d.ts +79 -0
  2749. package/dist/orchestration/jean-orchestrator.d.ts.map +1 -0
  2750. package/dist/orchestration/jean-orchestrator.js +253 -0
  2751. package/dist/orchestration/jean-orchestrator.js.map +1 -0
  2752. package/dist/orchestration/jean-registries/command-registry.d.ts +85 -0
  2753. package/dist/orchestration/jean-registries/command-registry.d.ts.map +1 -0
  2754. package/dist/orchestration/jean-registries/command-registry.js +120 -0
  2755. package/dist/orchestration/jean-registries/command-registry.js.map +1 -0
  2756. package/dist/orchestration/jean-registries/event-registry.d.ts +80 -0
  2757. package/dist/orchestration/jean-registries/event-registry.d.ts.map +1 -0
  2758. package/dist/orchestration/jean-registries/event-registry.js +147 -0
  2759. package/dist/orchestration/jean-registries/event-registry.js.map +1 -0
  2760. package/dist/orchestration/jean-registries/process-registry.d.ts +71 -0
  2761. package/dist/orchestration/jean-registries/process-registry.d.ts.map +1 -0
  2762. package/dist/orchestration/jean-registries/process-registry.js +104 -0
  2763. package/dist/orchestration/jean-registries/process-registry.js.map +1 -0
  2764. package/dist/orchestration/jean-registries/result-registry.d.ts +71 -0
  2765. package/dist/orchestration/jean-registries/result-registry.d.ts.map +1 -0
  2766. package/dist/orchestration/jean-registries/result-registry.js +97 -0
  2767. package/dist/orchestration/jean-registries/result-registry.js.map +1 -0
  2768. package/dist/orchestration/librechat-multi/config.d.ts +61 -0
  2769. package/dist/orchestration/librechat-multi/config.d.ts.map +1 -0
  2770. package/dist/orchestration/librechat-multi/config.js +128 -0
  2771. package/dist/orchestration/librechat-multi/config.js.map +1 -0
  2772. package/dist/orchestration/living-spec.d.ts +49 -0
  2773. package/dist/orchestration/living-spec.d.ts.map +1 -0
  2774. package/dist/orchestration/living-spec.js +306 -0
  2775. package/dist/orchestration/living-spec.js.map +1 -0
  2776. package/dist/orchestration/long-horizon-orchestrator.d.ts +217 -0
  2777. package/dist/orchestration/long-horizon-orchestrator.d.ts.map +1 -0
  2778. package/dist/orchestration/long-horizon-orchestrator.js +543 -0
  2779. package/dist/orchestration/long-horizon-orchestrator.js.map +1 -0
  2780. package/dist/orchestration/long-horizon-runner.d.ts +88 -0
  2781. package/dist/orchestration/long-horizon-runner.d.ts.map +1 -0
  2782. package/dist/orchestration/long-horizon-runner.js +198 -0
  2783. package/dist/orchestration/long-horizon-runner.js.map +1 -0
  2784. package/dist/orchestration/loop-detector.d.ts +80 -0
  2785. package/dist/orchestration/loop-detector.d.ts.map +1 -0
  2786. package/dist/orchestration/loop-detector.js +225 -0
  2787. package/dist/orchestration/loop-detector.js.map +1 -0
  2788. package/dist/orchestration/meta-harness.d.ts +182 -0
  2789. package/dist/orchestration/meta-harness.d.ts.map +1 -0
  2790. package/dist/orchestration/meta-harness.js +499 -0
  2791. package/dist/orchestration/meta-harness.js.map +1 -0
  2792. package/dist/orchestration/multi-agent-society/agent.d.ts +88 -0
  2793. package/dist/orchestration/multi-agent-society/agent.d.ts.map +1 -0
  2794. package/dist/orchestration/multi-agent-society/agent.js +133 -0
  2795. package/dist/orchestration/multi-agent-society/agent.js.map +1 -0
  2796. package/dist/orchestration/multi-agent-society/society.d.ts +72 -0
  2797. package/dist/orchestration/multi-agent-society/society.d.ts.map +1 -0
  2798. package/dist/orchestration/multi-agent-society/society.js +114 -0
  2799. package/dist/orchestration/multi-agent-society/society.js.map +1 -0
  2800. package/dist/orchestration/multi-agent-society/world.d.ts +62 -0
  2801. package/dist/orchestration/multi-agent-society/world.d.ts.map +1 -0
  2802. package/dist/orchestration/multi-agent-society/world.js +109 -0
  2803. package/dist/orchestration/multi-agent-society/world.js.map +1 -0
  2804. package/dist/orchestration/owl/debate.d.ts +59 -0
  2805. package/dist/orchestration/owl/debate.d.ts.map +1 -0
  2806. package/dist/orchestration/owl/debate.js +84 -0
  2807. package/dist/orchestration/owl/debate.js.map +1 -0
  2808. package/dist/orchestration/parallel-coordinator.d.ts +55 -0
  2809. package/dist/orchestration/parallel-coordinator.d.ts.map +1 -0
  2810. package/dist/orchestration/parallel-coordinator.js +99 -0
  2811. package/dist/orchestration/parallel-coordinator.js.map +1 -0
  2812. package/dist/orchestration/paused-state.d.ts +81 -0
  2813. package/dist/orchestration/paused-state.d.ts.map +1 -0
  2814. package/dist/orchestration/paused-state.js +129 -0
  2815. package/dist/orchestration/paused-state.js.map +1 -0
  2816. package/dist/orchestration/persistence-policy.d.ts +97 -0
  2817. package/dist/orchestration/persistence-policy.d.ts.map +1 -0
  2818. package/dist/orchestration/persistence-policy.js +103 -0
  2819. package/dist/orchestration/persistence-policy.js.map +1 -0
  2820. package/dist/orchestration/phase-gate.d.ts +98 -0
  2821. package/dist/orchestration/phase-gate.d.ts.map +1 -0
  2822. package/dist/orchestration/phase-gate.js +146 -0
  2823. package/dist/orchestration/phase-gate.js.map +1 -0
  2824. package/dist/orchestration/phased-executor.d.ts +121 -0
  2825. package/dist/orchestration/phased-executor.d.ts.map +1 -0
  2826. package/dist/orchestration/phased-executor.js +188 -0
  2827. package/dist/orchestration/phased-executor.js.map +1 -0
  2828. package/dist/orchestration/plan-store.d.ts +167 -0
  2829. package/dist/orchestration/plan-store.d.ts.map +1 -0
  2830. package/dist/orchestration/plan-store.js +649 -0
  2831. package/dist/orchestration/plan-store.js.map +1 -0
  2832. package/dist/orchestration/plateau-detector.d.ts +63 -0
  2833. package/dist/orchestration/plateau-detector.d.ts.map +1 -0
  2834. package/dist/orchestration/plateau-detector.js +162 -0
  2835. package/dist/orchestration/plateau-detector.js.map +1 -0
  2836. package/dist/orchestration/proof-bundles.d.ts +71 -0
  2837. package/dist/orchestration/proof-bundles.d.ts.map +1 -0
  2838. package/dist/orchestration/proof-bundles.js +73 -0
  2839. package/dist/orchestration/proof-bundles.js.map +1 -0
  2840. package/dist/orchestration/pwr-cycle.d.ts +61 -0
  2841. package/dist/orchestration/pwr-cycle.d.ts.map +1 -0
  2842. package/dist/orchestration/pwr-cycle.js +141 -0
  2843. package/dist/orchestration/pwr-cycle.js.map +1 -0
  2844. package/dist/orchestration/ralph-mode.d.ts +50 -0
  2845. package/dist/orchestration/ralph-mode.d.ts.map +1 -0
  2846. package/dist/orchestration/ralph-mode.js +131 -0
  2847. package/dist/orchestration/ralph-mode.js.map +1 -0
  2848. package/dist/orchestration/red-blue-testing.d.ts +65 -0
  2849. package/dist/orchestration/red-blue-testing.d.ts.map +1 -0
  2850. package/dist/orchestration/red-blue-testing.js +178 -0
  2851. package/dist/orchestration/red-blue-testing.js.map +1 -0
  2852. package/dist/orchestration/self-healing-pipeline.d.ts +104 -0
  2853. package/dist/orchestration/self-healing-pipeline.d.ts.map +1 -0
  2854. package/dist/orchestration/self-healing-pipeline.js +376 -0
  2855. package/dist/orchestration/self-healing-pipeline.js.map +1 -0
  2856. package/dist/orchestration/skill-rules-provider.d.ts +88 -0
  2857. package/dist/orchestration/skill-rules-provider.d.ts.map +1 -0
  2858. package/dist/orchestration/skill-rules-provider.js +134 -0
  2859. package/dist/orchestration/skill-rules-provider.js.map +1 -0
  2860. package/dist/orchestration/sleep-time-consumer.d.ts +63 -0
  2861. package/dist/orchestration/sleep-time-consumer.d.ts.map +1 -0
  2862. package/dist/orchestration/sleep-time-consumer.js +86 -0
  2863. package/dist/orchestration/sleep-time-consumer.js.map +1 -0
  2864. package/dist/orchestration/spec-to-ship.d.ts +118 -0
  2865. package/dist/orchestration/spec-to-ship.d.ts.map +1 -0
  2866. package/dist/orchestration/spec-to-ship.js +383 -0
  2867. package/dist/orchestration/spec-to-ship.js.map +1 -0
  2868. package/dist/orchestration/speculative-execution.d.ts +45 -0
  2869. package/dist/orchestration/speculative-execution.d.ts.map +1 -0
  2870. package/dist/orchestration/speculative-execution.js +94 -0
  2871. package/dist/orchestration/speculative-execution.js.map +1 -0
  2872. package/dist/orchestration/symphony/conductor.d.ts +69 -0
  2873. package/dist/orchestration/symphony/conductor.d.ts.map +1 -0
  2874. package/dist/orchestration/symphony/conductor.js +106 -0
  2875. package/dist/orchestration/symphony/conductor.js.map +1 -0
  2876. package/dist/orchestration/task-delegation.d.ts +90 -0
  2877. package/dist/orchestration/task-delegation.d.ts.map +1 -0
  2878. package/dist/orchestration/task-delegation.js +93 -0
  2879. package/dist/orchestration/task-delegation.js.map +1 -0
  2880. package/dist/orchestration/team-templates.d.ts +46 -0
  2881. package/dist/orchestration/team-templates.d.ts.map +1 -0
  2882. package/dist/orchestration/team-templates.js +347 -0
  2883. package/dist/orchestration/team-templates.js.map +1 -0
  2884. package/dist/orchestration/todo-provider.d.ts +93 -0
  2885. package/dist/orchestration/todo-provider.d.ts.map +1 -0
  2886. package/dist/orchestration/todo-provider.js +139 -0
  2887. package/dist/orchestration/todo-provider.js.map +1 -0
  2888. package/dist/orchestration/todo-tracker.d.ts +138 -0
  2889. package/dist/orchestration/todo-tracker.d.ts.map +1 -0
  2890. package/dist/orchestration/todo-tracker.js +481 -0
  2891. package/dist/orchestration/todo-tracker.js.map +1 -0
  2892. package/dist/orchestration/tool-rules.d.ts +106 -0
  2893. package/dist/orchestration/tool-rules.d.ts.map +1 -0
  2894. package/dist/orchestration/tool-rules.js +151 -0
  2895. package/dist/orchestration/tool-rules.js.map +1 -0
  2896. package/dist/orchestration/two-state-spec.d.ts +75 -0
  2897. package/dist/orchestration/two-state-spec.d.ts.map +1 -0
  2898. package/dist/orchestration/two-state-spec.js +160 -0
  2899. package/dist/orchestration/two-state-spec.js.map +1 -0
  2900. package/dist/orchestration/ultraplan.d.ts +93 -0
  2901. package/dist/orchestration/ultraplan.d.ts.map +1 -0
  2902. package/dist/orchestration/ultraplan.js +195 -0
  2903. package/dist/orchestration/ultraplan.js.map +1 -0
  2904. package/dist/orchestration/virtual-cursor-consumer.d.ts +82 -0
  2905. package/dist/orchestration/virtual-cursor-consumer.d.ts.map +1 -0
  2906. package/dist/orchestration/virtual-cursor-consumer.js +94 -0
  2907. package/dist/orchestration/virtual-cursor-consumer.js.map +1 -0
  2908. package/dist/orchestration/visual-builders/canonical-schema.d.ts +98 -0
  2909. package/dist/orchestration/visual-builders/canonical-schema.d.ts.map +1 -0
  2910. package/dist/orchestration/visual-builders/canonical-schema.js +157 -0
  2911. package/dist/orchestration/visual-builders/canonical-schema.js.map +1 -0
  2912. package/dist/orchestration/wall-clock-budget.d.ts +63 -0
  2913. package/dist/orchestration/wall-clock-budget.d.ts.map +1 -0
  2914. package/dist/orchestration/wall-clock-budget.js +74 -0
  2915. package/dist/orchestration/wall-clock-budget.js.map +1 -0
  2916. package/dist/orchestration/wave-executor.d.ts +69 -0
  2917. package/dist/orchestration/wave-executor.d.ts.map +1 -0
  2918. package/dist/orchestration/wave-executor.js +158 -0
  2919. package/dist/orchestration/wave-executor.js.map +1 -0
  2920. package/dist/orchestration/webhook-trigger-bridge.d.ts +98 -0
  2921. package/dist/orchestration/webhook-trigger-bridge.d.ts.map +1 -0
  2922. package/dist/orchestration/webhook-trigger-bridge.js +119 -0
  2923. package/dist/orchestration/webhook-trigger-bridge.js.map +1 -0
  2924. package/dist/orchestration/workflow-dag.d.ts +117 -0
  2925. package/dist/orchestration/workflow-dag.d.ts.map +1 -0
  2926. package/dist/orchestration/workflow-dag.js +530 -0
  2927. package/dist/orchestration/workflow-dag.js.map +1 -0
  2928. package/dist/orchestration/worktree-kanban.d.ts +53 -0
  2929. package/dist/orchestration/worktree-kanban.d.ts.map +1 -0
  2930. package/dist/orchestration/worktree-kanban.js +140 -0
  2931. package/dist/orchestration/worktree-kanban.js.map +1 -0
  2932. package/dist/orchestration/worktree-manager.d.ts +129 -0
  2933. package/dist/orchestration/worktree-manager.d.ts.map +1 -0
  2934. package/dist/orchestration/worktree-manager.js +285 -0
  2935. package/dist/orchestration/worktree-manager.js.map +1 -0
  2936. package/dist/plugins/lifecycle.d.ts +146 -0
  2937. package/dist/plugins/lifecycle.d.ts.map +1 -0
  2938. package/dist/plugins/lifecycle.js +167 -0
  2939. package/dist/plugins/lifecycle.js.map +1 -0
  2940. package/dist/plugins/manager.d.ts +27 -0
  2941. package/dist/plugins/manager.d.ts.map +1 -0
  2942. package/dist/plugins/manager.js +148 -0
  2943. package/dist/plugins/manager.js.map +1 -0
  2944. package/dist/ports/chatdev-waterfall.d.ts +120 -0
  2945. package/dist/ports/chatdev-waterfall.d.ts.map +1 -0
  2946. package/dist/ports/chatdev-waterfall.js +211 -0
  2947. package/dist/ports/chatdev-waterfall.js.map +1 -0
  2948. package/dist/ports/deer-flow-research.d.ts +137 -0
  2949. package/dist/ports/deer-flow-research.d.ts.map +1 -0
  2950. package/dist/ports/deer-flow-research.js +163 -0
  2951. package/dist/ports/deer-flow-research.js.map +1 -0
  2952. package/dist/ports/mem0-graph-memory.d.ts +143 -0
  2953. package/dist/ports/mem0-graph-memory.d.ts.map +1 -0
  2954. package/dist/ports/mem0-graph-memory.js +271 -0
  2955. package/dist/ports/mem0-graph-memory.js.map +1 -0
  2956. package/dist/ports/promptfoo-assertions.d.ts +153 -0
  2957. package/dist/ports/promptfoo-assertions.d.ts.map +1 -0
  2958. package/dist/ports/promptfoo-assertions.js +339 -0
  2959. package/dist/ports/promptfoo-assertions.js.map +1 -0
  2960. package/dist/ports/scrapling-adaptive.d.ts +129 -0
  2961. package/dist/ports/scrapling-adaptive.d.ts.map +1 -0
  2962. package/dist/ports/scrapling-adaptive.js +254 -0
  2963. package/dist/ports/scrapling-adaptive.js.map +1 -0
  2964. package/dist/pr-checks/check-emitter.d.ts +75 -0
  2965. package/dist/pr-checks/check-emitter.d.ts.map +1 -0
  2966. package/dist/pr-checks/check-emitter.js +198 -0
  2967. package/dist/pr-checks/check-emitter.js.map +1 -0
  2968. package/dist/pr-checks/diff-loader.d.ts +65 -0
  2969. package/dist/pr-checks/diff-loader.d.ts.map +1 -0
  2970. package/dist/pr-checks/diff-loader.js +123 -0
  2971. package/dist/pr-checks/diff-loader.js.map +1 -0
  2972. package/dist/pr-checks/pr-runner.d.ts +106 -0
  2973. package/dist/pr-checks/pr-runner.d.ts.map +1 -0
  2974. package/dist/pr-checks/pr-runner.js +300 -0
  2975. package/dist/pr-checks/pr-runner.js.map +1 -0
  2976. package/dist/pr-checks/pr-types.d.ts +82 -0
  2977. package/dist/pr-checks/pr-types.d.ts.map +1 -0
  2978. package/dist/pr-checks/pr-types.js +10 -0
  2979. package/dist/pr-checks/pr-types.js.map +1 -0
  2980. package/dist/prompt/engine.d.ts +126 -0
  2981. package/dist/prompt/engine.d.ts.map +1 -0
  2982. package/dist/prompt/engine.js +567 -0
  2983. package/dist/prompt/engine.js.map +1 -0
  2984. package/dist/prompt/instruction-provenance.d.ts +52 -0
  2985. package/dist/prompt/instruction-provenance.d.ts.map +1 -0
  2986. package/dist/prompt/instruction-provenance.js +92 -0
  2987. package/dist/prompt/instruction-provenance.js.map +1 -0
  2988. package/dist/prompt/model-formatter.d.ts +59 -0
  2989. package/dist/prompt/model-formatter.d.ts.map +1 -0
  2990. package/dist/prompt/model-formatter.js +200 -0
  2991. package/dist/prompt/model-formatter.js.map +1 -0
  2992. package/dist/prompt/modules/capabilities.d.ts +7 -0
  2993. package/dist/prompt/modules/capabilities.d.ts.map +1 -0
  2994. package/dist/prompt/modules/capabilities.js +141 -0
  2995. package/dist/prompt/modules/capabilities.js.map +1 -0
  2996. package/dist/prompt/modules/channels.d.ts +8 -0
  2997. package/dist/prompt/modules/channels.d.ts.map +1 -0
  2998. package/dist/prompt/modules/channels.js +19 -0
  2999. package/dist/prompt/modules/channels.js.map +1 -0
  3000. package/dist/prompt/modules/conventions.d.ts +8 -0
  3001. package/dist/prompt/modules/conventions.d.ts.map +1 -0
  3002. package/dist/prompt/modules/conventions.js +90 -0
  3003. package/dist/prompt/modules/conventions.js.map +1 -0
  3004. package/dist/prompt/modules/cost.d.ts +6 -0
  3005. package/dist/prompt/modules/cost.d.ts.map +1 -0
  3006. package/dist/prompt/modules/cost.js +24 -0
  3007. package/dist/prompt/modules/cost.js.map +1 -0
  3008. package/dist/prompt/modules/history.d.ts +7 -0
  3009. package/dist/prompt/modules/history.d.ts.map +1 -0
  3010. package/dist/prompt/modules/history.js +29 -0
  3011. package/dist/prompt/modules/history.js.map +1 -0
  3012. package/dist/prompt/modules/identity.d.ts +17 -0
  3013. package/dist/prompt/modules/identity.d.ts.map +1 -0
  3014. package/dist/prompt/modules/identity.js +67 -0
  3015. package/dist/prompt/modules/identity.js.map +1 -0
  3016. package/dist/prompt/modules/index.d.ts +45 -0
  3017. package/dist/prompt/modules/index.d.ts.map +1 -0
  3018. package/dist/prompt/modules/index.js +99 -0
  3019. package/dist/prompt/modules/index.js.map +1 -0
  3020. package/dist/prompt/modules/llms-txt.d.ts +12 -0
  3021. package/dist/prompt/modules/llms-txt.d.ts.map +1 -0
  3022. package/dist/prompt/modules/llms-txt.js +51 -0
  3023. package/dist/prompt/modules/llms-txt.js.map +1 -0
  3024. package/dist/prompt/modules/memory.d.ts +17 -0
  3025. package/dist/prompt/modules/memory.d.ts.map +1 -0
  3026. package/dist/prompt/modules/memory.js +110 -0
  3027. package/dist/prompt/modules/memory.js.map +1 -0
  3028. package/dist/prompt/modules/mode.d.ts +7 -0
  3029. package/dist/prompt/modules/mode.d.ts.map +1 -0
  3030. package/dist/prompt/modules/mode.js +78 -0
  3031. package/dist/prompt/modules/mode.js.map +1 -0
  3032. package/dist/prompt/modules/phone.d.ts +8 -0
  3033. package/dist/prompt/modules/phone.d.ts.map +1 -0
  3034. package/dist/prompt/modules/phone.js +35 -0
  3035. package/dist/prompt/modules/phone.js.map +1 -0
  3036. package/dist/prompt/modules/project.d.ts +7 -0
  3037. package/dist/prompt/modules/project.d.ts.map +1 -0
  3038. package/dist/prompt/modules/project.js +29 -0
  3039. package/dist/prompt/modules/project.js.map +1 -0
  3040. package/dist/prompt/modules/safety.d.ts +7 -0
  3041. package/dist/prompt/modules/safety.d.ts.map +1 -0
  3042. package/dist/prompt/modules/safety.js +37 -0
  3043. package/dist/prompt/modules/safety.js.map +1 -0
  3044. package/dist/prompt/modules/security.d.ts +9 -0
  3045. package/dist/prompt/modules/security.d.ts.map +1 -0
  3046. package/dist/prompt/modules/security.js +121 -0
  3047. package/dist/prompt/modules/security.js.map +1 -0
  3048. package/dist/prompt/modules/skills.d.ts +7 -0
  3049. package/dist/prompt/modules/skills.d.ts.map +1 -0
  3050. package/dist/prompt/modules/skills.js +22 -0
  3051. package/dist/prompt/modules/skills.js.map +1 -0
  3052. package/dist/prompt/modules/surfaces.d.ts +7 -0
  3053. package/dist/prompt/modules/surfaces.d.ts.map +1 -0
  3054. package/dist/prompt/modules/surfaces.js +29 -0
  3055. package/dist/prompt/modules/surfaces.js.map +1 -0
  3056. package/dist/prompt/modules/tools.d.ts +16 -0
  3057. package/dist/prompt/modules/tools.d.ts.map +1 -0
  3058. package/dist/prompt/modules/tools.js +101 -0
  3059. package/dist/prompt/modules/tools.js.map +1 -0
  3060. package/dist/prompt/modules/user.d.ts +16 -0
  3061. package/dist/prompt/modules/user.d.ts.map +1 -0
  3062. package/dist/prompt/modules/user.js +23 -0
  3063. package/dist/prompt/modules/user.js.map +1 -0
  3064. package/dist/prompt/reasoning-sandwich.d.ts +145 -0
  3065. package/dist/prompt/reasoning-sandwich.d.ts.map +1 -0
  3066. package/dist/prompt/reasoning-sandwich.js +215 -0
  3067. package/dist/prompt/reasoning-sandwich.js.map +1 -0
  3068. package/dist/prompt/system-prompt.d.ts +101 -0
  3069. package/dist/prompt/system-prompt.d.ts.map +1 -0
  3070. package/dist/prompt/system-prompt.js +129 -0
  3071. package/dist/prompt/system-prompt.js.map +1 -0
  3072. package/dist/prompt/template-compiler.d.ts +44 -0
  3073. package/dist/prompt/template-compiler.d.ts.map +1 -0
  3074. package/dist/prompt/template-compiler.js +228 -0
  3075. package/dist/prompt/template-compiler.js.map +1 -0
  3076. package/dist/prompt/think-in-code.d.ts +86 -0
  3077. package/dist/prompt/think-in-code.d.ts.map +1 -0
  3078. package/dist/prompt/think-in-code.js +110 -0
  3079. package/dist/prompt/think-in-code.js.map +1 -0
  3080. package/dist/providers/account-pool.d.ts +94 -0
  3081. package/dist/providers/account-pool.d.ts.map +1 -0
  3082. package/dist/providers/account-pool.js +240 -0
  3083. package/dist/providers/account-pool.js.map +1 -0
  3084. package/dist/providers/anthropic-adapter.d.ts +47 -0
  3085. package/dist/providers/anthropic-adapter.d.ts.map +1 -0
  3086. package/dist/providers/anthropic-adapter.js +567 -0
  3087. package/dist/providers/anthropic-adapter.js.map +1 -0
  3088. package/dist/providers/anthropic-stream-decoder.d.ts +79 -0
  3089. package/dist/providers/anthropic-stream-decoder.d.ts.map +1 -0
  3090. package/dist/providers/anthropic-stream-decoder.js +281 -0
  3091. package/dist/providers/anthropic-stream-decoder.js.map +1 -0
  3092. package/dist/providers/bedrock-eventstream.d.ts +107 -0
  3093. package/dist/providers/bedrock-eventstream.d.ts.map +1 -0
  3094. package/dist/providers/bedrock-eventstream.js +246 -0
  3095. package/dist/providers/bedrock-eventstream.js.map +1 -0
  3096. package/dist/providers/bedrock-signer.d.ts +23 -0
  3097. package/dist/providers/bedrock-signer.d.ts.map +1 -0
  3098. package/dist/providers/bedrock-signer.js +439 -0
  3099. package/dist/providers/bedrock-signer.js.map +1 -0
  3100. package/dist/providers/budget-downgrader.d.ts +65 -0
  3101. package/dist/providers/budget-downgrader.d.ts.map +1 -0
  3102. package/dist/providers/budget-downgrader.js +109 -0
  3103. package/dist/providers/budget-downgrader.js.map +1 -0
  3104. package/dist/providers/capability-augmenter.d.ts +63 -0
  3105. package/dist/providers/capability-augmenter.d.ts.map +1 -0
  3106. package/dist/providers/capability-augmenter.js +202 -0
  3107. package/dist/providers/capability-augmenter.js.map +1 -0
  3108. package/dist/providers/capability-equalizer.d.ts +63 -0
  3109. package/dist/providers/capability-equalizer.d.ts.map +1 -0
  3110. package/dist/providers/capability-equalizer.js +532 -0
  3111. package/dist/providers/capability-equalizer.js.map +1 -0
  3112. package/dist/providers/capability-fingerprint.d.ts +66 -0
  3113. package/dist/providers/capability-fingerprint.d.ts.map +1 -0
  3114. package/dist/providers/capability-fingerprint.js +227 -0
  3115. package/dist/providers/capability-fingerprint.js.map +1 -0
  3116. package/dist/providers/circuit-breaker.d.ts +65 -0
  3117. package/dist/providers/circuit-breaker.d.ts.map +1 -0
  3118. package/dist/providers/circuit-breaker.js +137 -0
  3119. package/dist/providers/circuit-breaker.js.map +1 -0
  3120. package/dist/providers/claude-cli-backend.d.ts +213 -0
  3121. package/dist/providers/claude-cli-backend.d.ts.map +1 -0
  3122. package/dist/providers/claude-cli-backend.js +590 -0
  3123. package/dist/providers/claude-cli-backend.js.map +1 -0
  3124. package/dist/providers/cli-registry.d.ts +39 -0
  3125. package/dist/providers/cli-registry.d.ts.map +1 -0
  3126. package/dist/providers/cli-registry.js +217 -0
  3127. package/dist/providers/cli-registry.js.map +1 -0
  3128. package/dist/providers/cloud-offload/adapter.d.ts +118 -0
  3129. package/dist/providers/cloud-offload/adapter.d.ts.map +1 -0
  3130. package/dist/providers/cloud-offload/adapter.js +61 -0
  3131. package/dist/providers/cloud-offload/adapter.js.map +1 -0
  3132. package/dist/providers/cloud-offload/anthropic-managed.d.ts +169 -0
  3133. package/dist/providers/cloud-offload/anthropic-managed.d.ts.map +1 -0
  3134. package/dist/providers/cloud-offload/anthropic-managed.js +627 -0
  3135. package/dist/providers/cloud-offload/anthropic-managed.js.map +1 -0
  3136. package/dist/providers/cloud-offload/cloudflare-agents.d.ts +174 -0
  3137. package/dist/providers/cloud-offload/cloudflare-agents.d.ts.map +1 -0
  3138. package/dist/providers/cloud-offload/cloudflare-agents.js +583 -0
  3139. package/dist/providers/cloud-offload/cloudflare-agents.js.map +1 -0
  3140. package/dist/providers/cloud-offload/fly-sprites.d.ts +147 -0
  3141. package/dist/providers/cloud-offload/fly-sprites.d.ts.map +1 -0
  3142. package/dist/providers/cloud-offload/fly-sprites.js +563 -0
  3143. package/dist/providers/cloud-offload/fly-sprites.js.map +1 -0
  3144. package/dist/providers/cloud-offload/session-handle.d.ts +62 -0
  3145. package/dist/providers/cloud-offload/session-handle.d.ts.map +1 -0
  3146. package/dist/providers/cloud-offload/session-handle.js +109 -0
  3147. package/dist/providers/cloud-offload/session-handle.js.map +1 -0
  3148. package/dist/providers/cloud-offload/snapshot.d.ts +97 -0
  3149. package/dist/providers/cloud-offload/snapshot.d.ts.map +1 -0
  3150. package/dist/providers/cloud-offload/snapshot.js +303 -0
  3151. package/dist/providers/cloud-offload/snapshot.js.map +1 -0
  3152. package/dist/providers/codex-adapter.d.ts +25 -0
  3153. package/dist/providers/codex-adapter.d.ts.map +1 -0
  3154. package/dist/providers/codex-adapter.js +493 -0
  3155. package/dist/providers/codex-adapter.js.map +1 -0
  3156. package/dist/providers/codex-detector.d.ts +73 -0
  3157. package/dist/providers/codex-detector.d.ts.map +1 -0
  3158. package/dist/providers/codex-detector.js +162 -0
  3159. package/dist/providers/codex-detector.js.map +1 -0
  3160. package/dist/providers/codex-models.d.ts +117 -0
  3161. package/dist/providers/codex-models.d.ts.map +1 -0
  3162. package/dist/providers/codex-models.js +398 -0
  3163. package/dist/providers/codex-models.js.map +1 -0
  3164. package/dist/providers/copilot-adapter.d.ts +40 -0
  3165. package/dist/providers/copilot-adapter.d.ts.map +1 -0
  3166. package/dist/providers/copilot-adapter.js +512 -0
  3167. package/dist/providers/copilot-adapter.js.map +1 -0
  3168. package/dist/providers/credential-pool.d.ts +247 -0
  3169. package/dist/providers/credential-pool.d.ts.map +1 -0
  3170. package/dist/providers/credential-pool.js +577 -0
  3171. package/dist/providers/credential-pool.js.map +1 -0
  3172. package/dist/providers/discovery.d.ts +103 -0
  3173. package/dist/providers/discovery.d.ts.map +1 -0
  3174. package/dist/providers/discovery.js +601 -0
  3175. package/dist/providers/discovery.js.map +1 -0
  3176. package/dist/providers/dynamic-discovery.d.ts +35 -0
  3177. package/dist/providers/dynamic-discovery.d.ts.map +1 -0
  3178. package/dist/providers/dynamic-discovery.js +240 -0
  3179. package/dist/providers/dynamic-discovery.js.map +1 -0
  3180. package/dist/providers/extended-thinking.d.ts +69 -0
  3181. package/dist/providers/extended-thinking.d.ts.map +1 -0
  3182. package/dist/providers/extended-thinking.js +233 -0
  3183. package/dist/providers/extended-thinking.js.map +1 -0
  3184. package/dist/providers/fallback-chain.d.ts +34 -0
  3185. package/dist/providers/fallback-chain.d.ts.map +1 -0
  3186. package/dist/providers/fallback-chain.js +116 -0
  3187. package/dist/providers/fallback-chain.js.map +1 -0
  3188. package/dist/providers/format-translator.d.ts +115 -0
  3189. package/dist/providers/format-translator.d.ts.map +1 -0
  3190. package/dist/providers/format-translator.js +347 -0
  3191. package/dist/providers/format-translator.js.map +1 -0
  3192. package/dist/providers/gemini-native-adapter.d.ts +51 -0
  3193. package/dist/providers/gemini-native-adapter.d.ts.map +1 -0
  3194. package/dist/providers/gemini-native-adapter.js +505 -0
  3195. package/dist/providers/gemini-native-adapter.js.map +1 -0
  3196. package/dist/providers/harness-profiles.d.ts +70 -0
  3197. package/dist/providers/harness-profiles.d.ts.map +1 -0
  3198. package/dist/providers/harness-profiles.js +210 -0
  3199. package/dist/providers/harness-profiles.js.map +1 -0
  3200. package/dist/providers/header-injection.d.ts +24 -0
  3201. package/dist/providers/header-injection.d.ts.map +1 -0
  3202. package/dist/providers/header-injection.js +109 -0
  3203. package/dist/providers/header-injection.js.map +1 -0
  3204. package/dist/providers/health-check.d.ts +80 -0
  3205. package/dist/providers/health-check.d.ts.map +1 -0
  3206. package/dist/providers/health-check.js +465 -0
  3207. package/dist/providers/health-check.js.map +1 -0
  3208. package/dist/providers/model-defaults.d.ts +60 -0
  3209. package/dist/providers/model-defaults.d.ts.map +1 -0
  3210. package/dist/providers/model-defaults.js +257 -0
  3211. package/dist/providers/model-defaults.js.map +1 -0
  3212. package/dist/providers/model-discovery.d.ts +85 -0
  3213. package/dist/providers/model-discovery.d.ts.map +1 -0
  3214. package/dist/providers/model-discovery.js +325 -0
  3215. package/dist/providers/model-discovery.js.map +1 -0
  3216. package/dist/providers/model-performance.d.ts +30 -0
  3217. package/dist/providers/model-performance.d.ts.map +1 -0
  3218. package/dist/providers/model-performance.js +57 -0
  3219. package/dist/providers/model-performance.js.map +1 -0
  3220. package/dist/providers/model-router.d.ts +119 -0
  3221. package/dist/providers/model-router.d.ts.map +1 -0
  3222. package/dist/providers/model-router.js +550 -0
  3223. package/dist/providers/model-router.js.map +1 -0
  3224. package/dist/providers/model-switcher.d.ts +116 -0
  3225. package/dist/providers/model-switcher.d.ts.map +1 -0
  3226. package/dist/providers/model-switcher.js +298 -0
  3227. package/dist/providers/model-switcher.js.map +1 -0
  3228. package/dist/providers/ollama-adapter.d.ts +66 -0
  3229. package/dist/providers/ollama-adapter.d.ts.map +1 -0
  3230. package/dist/providers/ollama-adapter.js +423 -0
  3231. package/dist/providers/ollama-adapter.js.map +1 -0
  3232. package/dist/providers/ollama-host.d.ts +66 -0
  3233. package/dist/providers/ollama-host.d.ts.map +1 -0
  3234. package/dist/providers/ollama-host.js +90 -0
  3235. package/dist/providers/ollama-host.js.map +1 -0
  3236. package/dist/providers/openai-compat-adapter.d.ts +20 -0
  3237. package/dist/providers/openai-compat-adapter.d.ts.map +1 -0
  3238. package/dist/providers/openai-compat-adapter.js +513 -0
  3239. package/dist/providers/openai-compat-adapter.js.map +1 -0
  3240. package/dist/providers/opencode-sst-adapter.d.ts +131 -0
  3241. package/dist/providers/opencode-sst-adapter.d.ts.map +1 -0
  3242. package/dist/providers/opencode-sst-adapter.js +385 -0
  3243. package/dist/providers/opencode-sst-adapter.js.map +1 -0
  3244. package/dist/providers/peer-tool-auth.d.ts +87 -0
  3245. package/dist/providers/peer-tool-auth.d.ts.map +1 -0
  3246. package/dist/providers/peer-tool-auth.js +254 -0
  3247. package/dist/providers/peer-tool-auth.js.map +1 -0
  3248. package/dist/providers/preset-library.d.ts +55 -0
  3249. package/dist/providers/preset-library.d.ts.map +1 -0
  3250. package/dist/providers/preset-library.js +299 -0
  3251. package/dist/providers/preset-library.js.map +1 -0
  3252. package/dist/providers/prompt-cache-warmup.d.ts +139 -0
  3253. package/dist/providers/prompt-cache-warmup.d.ts.map +1 -0
  3254. package/dist/providers/prompt-cache-warmup.js +233 -0
  3255. package/dist/providers/prompt-cache-warmup.js.map +1 -0
  3256. package/dist/providers/provider-brain.d.ts +79 -0
  3257. package/dist/providers/provider-brain.d.ts.map +1 -0
  3258. package/dist/providers/provider-brain.js +208 -0
  3259. package/dist/providers/provider-brain.js.map +1 -0
  3260. package/dist/providers/provider-ladder.d.ts +100 -0
  3261. package/dist/providers/provider-ladder.d.ts.map +1 -0
  3262. package/dist/providers/provider-ladder.js +220 -0
  3263. package/dist/providers/provider-ladder.js.map +1 -0
  3264. package/dist/providers/provider-service.d.ts +340 -0
  3265. package/dist/providers/provider-service.d.ts.map +1 -0
  3266. package/dist/providers/provider-service.js +1270 -0
  3267. package/dist/providers/provider-service.js.map +1 -0
  3268. package/dist/providers/public-tier/fallback-chain.d.ts +58 -0
  3269. package/dist/providers/public-tier/fallback-chain.d.ts.map +1 -0
  3270. package/dist/providers/public-tier/fallback-chain.js +160 -0
  3271. package/dist/providers/public-tier/fallback-chain.js.map +1 -0
  3272. package/dist/providers/public-tier/horde.d.ts +42 -0
  3273. package/dist/providers/public-tier/horde.d.ts.map +1 -0
  3274. package/dist/providers/public-tier/horde.js +203 -0
  3275. package/dist/providers/public-tier/horde.js.map +1 -0
  3276. package/dist/providers/public-tier/huggingface-free.d.ts +55 -0
  3277. package/dist/providers/public-tier/huggingface-free.d.ts.map +1 -0
  3278. package/dist/providers/public-tier/huggingface-free.js +85 -0
  3279. package/dist/providers/public-tier/huggingface-free.js.map +1 -0
  3280. package/dist/providers/public-tier/llm7.d.ts +48 -0
  3281. package/dist/providers/public-tier/llm7.d.ts.map +1 -0
  3282. package/dist/providers/public-tier/llm7.js +197 -0
  3283. package/dist/providers/public-tier/llm7.js.map +1 -0
  3284. package/dist/providers/public-tier/opencode-zen-research.d.ts +59 -0
  3285. package/dist/providers/public-tier/opencode-zen-research.d.ts.map +1 -0
  3286. package/dist/providers/public-tier/opencode-zen-research.js +57 -0
  3287. package/dist/providers/public-tier/opencode-zen-research.js.map +1 -0
  3288. package/dist/providers/public-tier/ovhcloud.d.ts +57 -0
  3289. package/dist/providers/public-tier/ovhcloud.d.ts.map +1 -0
  3290. package/dist/providers/public-tier/ovhcloud.js +210 -0
  3291. package/dist/providers/public-tier/ovhcloud.js.map +1 -0
  3292. package/dist/providers/public-tier/pollinations.d.ts +60 -0
  3293. package/dist/providers/public-tier/pollinations.d.ts.map +1 -0
  3294. package/dist/providers/public-tier/pollinations.js +252 -0
  3295. package/dist/providers/public-tier/pollinations.js.map +1 -0
  3296. package/dist/providers/rate-limiter.d.ts +55 -0
  3297. package/dist/providers/rate-limiter.d.ts.map +1 -0
  3298. package/dist/providers/rate-limiter.js +141 -0
  3299. package/dist/providers/rate-limiter.js.map +1 -0
  3300. package/dist/providers/registry.d.ts +19 -0
  3301. package/dist/providers/registry.d.ts.map +1 -0
  3302. package/dist/providers/registry.js +315 -0
  3303. package/dist/providers/registry.js.map +1 -0
  3304. package/dist/providers/retry-strategies.d.ts +78 -0
  3305. package/dist/providers/retry-strategies.d.ts.map +1 -0
  3306. package/dist/providers/retry-strategies.js +161 -0
  3307. package/dist/providers/retry-strategies.js.map +1 -0
  3308. package/dist/providers/thinking-preserver.d.ts +74 -0
  3309. package/dist/providers/thinking-preserver.d.ts.map +1 -0
  3310. package/dist/providers/thinking-preserver.js +109 -0
  3311. package/dist/providers/thinking-preserver.js.map +1 -0
  3312. package/dist/providers/tool-parsers/index.d.ts +7 -0
  3313. package/dist/providers/tool-parsers/index.d.ts.map +1 -0
  3314. package/dist/providers/tool-parsers/index.js +7 -0
  3315. package/dist/providers/tool-parsers/index.js.map +1 -0
  3316. package/dist/providers/tool-parsers/parsers.d.ts +78 -0
  3317. package/dist/providers/tool-parsers/parsers.d.ts.map +1 -0
  3318. package/dist/providers/tool-parsers/parsers.js +622 -0
  3319. package/dist/providers/tool-parsers/parsers.js.map +1 -0
  3320. package/dist/providers/tool-serializer.d.ts +221 -0
  3321. package/dist/providers/tool-serializer.d.ts.map +1 -0
  3322. package/dist/providers/tool-serializer.js +335 -0
  3323. package/dist/providers/tool-serializer.js.map +1 -0
  3324. package/dist/providers/types.d.ts +181 -0
  3325. package/dist/providers/types.d.ts.map +1 -0
  3326. package/dist/providers/types.js +5 -0
  3327. package/dist/providers/types.js.map +1 -0
  3328. package/dist/providers/usage-intelligence.d.ts +50 -0
  3329. package/dist/providers/usage-intelligence.d.ts.map +1 -0
  3330. package/dist/providers/usage-intelligence.js +146 -0
  3331. package/dist/providers/usage-intelligence.js.map +1 -0
  3332. package/dist/providers/vertex-oauth.d.ts +21 -0
  3333. package/dist/providers/vertex-oauth.d.ts.map +1 -0
  3334. package/dist/providers/vertex-oauth.js +393 -0
  3335. package/dist/providers/vertex-oauth.js.map +1 -0
  3336. package/dist/rag/chunker.d.ts +42 -0
  3337. package/dist/rag/chunker.d.ts.map +1 -0
  3338. package/dist/rag/chunker.js +247 -0
  3339. package/dist/rag/chunker.js.map +1 -0
  3340. package/dist/rag/reranker.d.ts +59 -0
  3341. package/dist/rag/reranker.d.ts.map +1 -0
  3342. package/dist/rag/reranker.js +79 -0
  3343. package/dist/rag/reranker.js.map +1 -0
  3344. package/dist/rag/visual-flow.d.ts +66 -0
  3345. package/dist/rag/visual-flow.d.ts.map +1 -0
  3346. package/dist/rag/visual-flow.js +203 -0
  3347. package/dist/rag/visual-flow.js.map +1 -0
  3348. package/dist/recipes/recipe-loader.d.ts +37 -0
  3349. package/dist/recipes/recipe-loader.d.ts.map +1 -0
  3350. package/dist/recipes/recipe-loader.js +434 -0
  3351. package/dist/recipes/recipe-loader.js.map +1 -0
  3352. package/dist/recipes/recipe-runtime.d.ts +33 -0
  3353. package/dist/recipes/recipe-runtime.d.ts.map +1 -0
  3354. package/dist/recipes/recipe-runtime.js +349 -0
  3355. package/dist/recipes/recipe-runtime.js.map +1 -0
  3356. package/dist/recipes/recipe-types.d.ts +178 -0
  3357. package/dist/recipes/recipe-types.d.ts.map +1 -0
  3358. package/dist/recipes/recipe-types.js +19 -0
  3359. package/dist/recipes/recipe-types.js.map +1 -0
  3360. package/dist/runtime-hooks/dead-code-hooks.d.ts +201 -0
  3361. package/dist/runtime-hooks/dead-code-hooks.d.ts.map +1 -0
  3362. package/dist/runtime-hooks/dead-code-hooks.js +176 -0
  3363. package/dist/runtime-hooks/dead-code-hooks.js.map +1 -0
  3364. package/dist/sandbox/approval-rules.d.ts +107 -0
  3365. package/dist/sandbox/approval-rules.d.ts.map +1 -0
  3366. package/dist/sandbox/approval-rules.js +253 -0
  3367. package/dist/sandbox/approval-rules.js.map +1 -0
  3368. package/dist/sandbox/backends/cloud-auth.d.ts +50 -0
  3369. package/dist/sandbox/backends/cloud-auth.d.ts.map +1 -0
  3370. package/dist/sandbox/backends/cloud-auth.js +93 -0
  3371. package/dist/sandbox/backends/cloud-auth.js.map +1 -0
  3372. package/dist/sandbox/backends/landlock-linux.d.ts +44 -0
  3373. package/dist/sandbox/backends/landlock-linux.d.ts.map +1 -0
  3374. package/dist/sandbox/backends/landlock-linux.js +284 -0
  3375. package/dist/sandbox/backends/landlock-linux.js.map +1 -0
  3376. package/dist/sandbox/backends/seatbelt-macos.d.ts +31 -0
  3377. package/dist/sandbox/backends/seatbelt-macos.d.ts.map +1 -0
  3378. package/dist/sandbox/backends/seatbelt-macos.js +248 -0
  3379. package/dist/sandbox/backends/seatbelt-macos.js.map +1 -0
  3380. package/dist/sandbox/backends/windows-jobobject.d.ts +92 -0
  3381. package/dist/sandbox/backends/windows-jobobject.d.ts.map +1 -0
  3382. package/dist/sandbox/backends/windows-jobobject.js +158 -0
  3383. package/dist/sandbox/backends/windows-jobobject.js.map +1 -0
  3384. package/dist/sandbox/cloud-sandbox-types.d.ts +48 -0
  3385. package/dist/sandbox/cloud-sandbox-types.d.ts.map +1 -0
  3386. package/dist/sandbox/cloud-sandbox-types.js +9 -0
  3387. package/dist/sandbox/cloud-sandbox-types.js.map +1 -0
  3388. package/dist/sandbox/composite-backend.d.ts +61 -0
  3389. package/dist/sandbox/composite-backend.d.ts.map +1 -0
  3390. package/dist/sandbox/composite-backend.js +145 -0
  3391. package/dist/sandbox/composite-backend.js.map +1 -0
  3392. package/dist/sandbox/docker-backend.d.ts +184 -0
  3393. package/dist/sandbox/docker-backend.d.ts.map +1 -0
  3394. package/dist/sandbox/docker-backend.js +457 -0
  3395. package/dist/sandbox/docker-backend.js.map +1 -0
  3396. package/dist/sandbox/execution-environments.d.ts +77 -0
  3397. package/dist/sandbox/execution-environments.d.ts.map +1 -0
  3398. package/dist/sandbox/execution-environments.js +183 -0
  3399. package/dist/sandbox/execution-environments.js.map +1 -0
  3400. package/dist/sandbox/executor.d.ts +35 -0
  3401. package/dist/sandbox/executor.d.ts.map +1 -0
  3402. package/dist/sandbox/executor.js +120 -0
  3403. package/dist/sandbox/executor.js.map +1 -0
  3404. package/dist/sandbox/extended-backends.d.ts +58 -0
  3405. package/dist/sandbox/extended-backends.d.ts.map +1 -0
  3406. package/dist/sandbox/extended-backends.js +199 -0
  3407. package/dist/sandbox/extended-backends.js.map +1 -0
  3408. package/dist/sandbox/flyio-backend.d.ts +22 -0
  3409. package/dist/sandbox/flyio-backend.d.ts.map +1 -0
  3410. package/dist/sandbox/flyio-backend.js +119 -0
  3411. package/dist/sandbox/flyio-backend.js.map +1 -0
  3412. package/dist/sandbox/kernel-sandbox.d.ts +91 -0
  3413. package/dist/sandbox/kernel-sandbox.d.ts.map +1 -0
  3414. package/dist/sandbox/kernel-sandbox.js +260 -0
  3415. package/dist/sandbox/kernel-sandbox.js.map +1 -0
  3416. package/dist/sandbox/modal-backend.d.ts +15 -0
  3417. package/dist/sandbox/modal-backend.d.ts.map +1 -0
  3418. package/dist/sandbox/modal-backend.js +110 -0
  3419. package/dist/sandbox/modal-backend.js.map +1 -0
  3420. package/dist/sandbox/no-change-timeout.d.ts +81 -0
  3421. package/dist/sandbox/no-change-timeout.d.ts.map +1 -0
  3422. package/dist/sandbox/no-change-timeout.js +105 -0
  3423. package/dist/sandbox/no-change-timeout.js.map +1 -0
  3424. package/dist/sandbox/output-isolator.d.ts +104 -0
  3425. package/dist/sandbox/output-isolator.d.ts.map +1 -0
  3426. package/dist/sandbox/output-isolator.js +220 -0
  3427. package/dist/sandbox/output-isolator.js.map +1 -0
  3428. package/dist/sandbox/request-rule.d.ts +105 -0
  3429. package/dist/sandbox/request-rule.d.ts.map +1 -0
  3430. package/dist/sandbox/request-rule.js +328 -0
  3431. package/dist/sandbox/request-rule.js.map +1 -0
  3432. package/dist/sandbox/sandbox-policy.d.ts +147 -0
  3433. package/dist/sandbox/sandbox-policy.d.ts.map +1 -0
  3434. package/dist/sandbox/sandbox-policy.js +156 -0
  3435. package/dist/sandbox/sandbox-policy.js.map +1 -0
  3436. package/dist/sandbox/security.d.ts +98 -0
  3437. package/dist/sandbox/security.d.ts.map +1 -0
  3438. package/dist/sandbox/security.js +449 -0
  3439. package/dist/sandbox/security.js.map +1 -0
  3440. package/dist/sandbox/task-isolation.d.ts +86 -0
  3441. package/dist/sandbox/task-isolation.d.ts.map +1 -0
  3442. package/dist/sandbox/task-isolation.js +240 -0
  3443. package/dist/sandbox/task-isolation.js.map +1 -0
  3444. package/dist/sandbox/terminal-backends.d.ts +189 -0
  3445. package/dist/sandbox/terminal-backends.d.ts.map +1 -0
  3446. package/dist/sandbox/terminal-backends.js +699 -0
  3447. package/dist/sandbox/terminal-backends.js.map +1 -0
  3448. package/dist/sandbox/unified-exec.d.ts +127 -0
  3449. package/dist/sandbox/unified-exec.d.ts.map +1 -0
  3450. package/dist/sandbox/unified-exec.js +446 -0
  3451. package/dist/sandbox/unified-exec.js.map +1 -0
  3452. package/dist/sandbox/virtual-paths.d.ts +91 -0
  3453. package/dist/sandbox/virtual-paths.d.ts.map +1 -0
  3454. package/dist/sandbox/virtual-paths.js +213 -0
  3455. package/dist/sandbox/virtual-paths.js.map +1 -0
  3456. package/dist/scheduler/cron-scheduler.d.ts +204 -0
  3457. package/dist/scheduler/cron-scheduler.d.ts.map +1 -0
  3458. package/dist/scheduler/cron-scheduler.js +423 -0
  3459. package/dist/scheduler/cron-scheduler.js.map +1 -0
  3460. package/dist/scheduler/schedule-store.d.ts +135 -0
  3461. package/dist/scheduler/schedule-store.d.ts.map +1 -0
  3462. package/dist/scheduler/schedule-store.js +293 -0
  3463. package/dist/scheduler/schedule-store.js.map +1 -0
  3464. package/dist/search/warp-grep.d.ts +127 -0
  3465. package/dist/search/warp-grep.d.ts.map +1 -0
  3466. package/dist/search/warp-grep.js +306 -0
  3467. package/dist/search/warp-grep.js.map +1 -0
  3468. package/dist/security/anti-distillation.d.ts +46 -0
  3469. package/dist/security/anti-distillation.d.ts.map +1 -0
  3470. package/dist/security/anti-distillation.js +358 -0
  3471. package/dist/security/anti-distillation.js.map +1 -0
  3472. package/dist/security/archive-preflight.d.ts +31 -0
  3473. package/dist/security/archive-preflight.d.ts.map +1 -0
  3474. package/dist/security/archive-preflight.js +200 -0
  3475. package/dist/security/archive-preflight.js.map +1 -0
  3476. package/dist/security/auto-classifier.d.ts +76 -0
  3477. package/dist/security/auto-classifier.d.ts.map +1 -0
  3478. package/dist/security/auto-classifier.js +319 -0
  3479. package/dist/security/auto-classifier.js.map +1 -0
  3480. package/dist/security/command-sanitizer.d.ts +93 -0
  3481. package/dist/security/command-sanitizer.d.ts.map +1 -0
  3482. package/dist/security/command-sanitizer.js +442 -0
  3483. package/dist/security/command-sanitizer.js.map +1 -0
  3484. package/dist/security/confirm-action.d.ts +70 -0
  3485. package/dist/security/confirm-action.d.ts.map +1 -0
  3486. package/dist/security/confirm-action.js +216 -0
  3487. package/dist/security/confirm-action.js.map +1 -0
  3488. package/dist/security/file-freeze.d.ts +86 -0
  3489. package/dist/security/file-freeze.d.ts.map +1 -0
  3490. package/dist/security/file-freeze.js +213 -0
  3491. package/dist/security/file-freeze.js.map +1 -0
  3492. package/dist/security/file-type-validator.d.ts +37 -0
  3493. package/dist/security/file-type-validator.d.ts.map +1 -0
  3494. package/dist/security/file-type-validator.js +176 -0
  3495. package/dist/security/file-type-validator.js.map +1 -0
  3496. package/dist/security/guardrails-off.d.ts +244 -0
  3497. package/dist/security/guardrails-off.d.ts.map +1 -0
  3498. package/dist/security/guardrails-off.js +592 -0
  3499. package/dist/security/guardrails-off.js.map +1 -0
  3500. package/dist/security/hash-audit-chain.d.ts +98 -0
  3501. package/dist/security/hash-audit-chain.d.ts.map +1 -0
  3502. package/dist/security/hash-audit-chain.js +198 -0
  3503. package/dist/security/hash-audit-chain.js.map +1 -0
  3504. package/dist/security/hidden-text-detector.d.ts +112 -0
  3505. package/dist/security/hidden-text-detector.d.ts.map +1 -0
  3506. package/dist/security/hidden-text-detector.js +258 -0
  3507. package/dist/security/hidden-text-detector.js.map +1 -0
  3508. package/dist/security/human-approval.d.ts +92 -0
  3509. package/dist/security/human-approval.d.ts.map +1 -0
  3510. package/dist/security/human-approval.js +199 -0
  3511. package/dist/security/human-approval.js.map +1 -0
  3512. package/dist/security/intent-verifier.d.ts +97 -0
  3513. package/dist/security/intent-verifier.d.ts.map +1 -0
  3514. package/dist/security/intent-verifier.js +250 -0
  3515. package/dist/security/intent-verifier.js.map +1 -0
  3516. package/dist/security/multi-encoding-decoder.d.ts +47 -0
  3517. package/dist/security/multi-encoding-decoder.d.ts.map +1 -0
  3518. package/dist/security/multi-encoding-decoder.js +336 -0
  3519. package/dist/security/multi-encoding-decoder.js.map +1 -0
  3520. package/dist/security/origin-validator.d.ts +52 -0
  3521. package/dist/security/origin-validator.d.ts.map +1 -0
  3522. package/dist/security/origin-validator.js +135 -0
  3523. package/dist/security/origin-validator.js.map +1 -0
  3524. package/dist/security/pii-redactor.d.ts +60 -0
  3525. package/dist/security/pii-redactor.d.ts.map +1 -0
  3526. package/dist/security/pii-redactor.js +364 -0
  3527. package/dist/security/pii-redactor.js.map +1 -0
  3528. package/dist/security/plugin-scanner.d.ts +103 -0
  3529. package/dist/security/plugin-scanner.d.ts.map +1 -0
  3530. package/dist/security/plugin-scanner.js +241 -0
  3531. package/dist/security/plugin-scanner.js.map +1 -0
  3532. package/dist/security/policy-language.d.ts +47 -0
  3533. package/dist/security/policy-language.d.ts.map +1 -0
  3534. package/dist/security/policy-language.js +103 -0
  3535. package/dist/security/policy-language.js.map +1 -0
  3536. package/dist/security/privacy-router.d.ts +129 -0
  3537. package/dist/security/privacy-router.d.ts.map +1 -0
  3538. package/dist/security/privacy-router.js +344 -0
  3539. package/dist/security/privacy-router.js.map +1 -0
  3540. package/dist/security/private-mode.d.ts +48 -0
  3541. package/dist/security/private-mode.d.ts.map +1 -0
  3542. package/dist/security/private-mode.js +80 -0
  3543. package/dist/security/private-mode.js.map +1 -0
  3544. package/dist/security/prompt-injection-quarantine.d.ts +181 -0
  3545. package/dist/security/prompt-injection-quarantine.d.ts.map +1 -0
  3546. package/dist/security/prompt-injection-quarantine.js +279 -0
  3547. package/dist/security/prompt-injection-quarantine.js.map +1 -0
  3548. package/dist/security/prompt-quarantine.d.ts +50 -0
  3549. package/dist/security/prompt-quarantine.d.ts.map +1 -0
  3550. package/dist/security/prompt-quarantine.js +61 -0
  3551. package/dist/security/prompt-quarantine.js.map +1 -0
  3552. package/dist/security/recon-osint/username-search.d.ts +48 -0
  3553. package/dist/security/recon-osint/username-search.d.ts.map +1 -0
  3554. package/dist/security/recon-osint/username-search.js +88 -0
  3555. package/dist/security/recon-osint/username-search.js.map +1 -0
  3556. package/dist/security/redact-overlapping-spans.d.ts +87 -0
  3557. package/dist/security/redact-overlapping-spans.d.ts.map +1 -0
  3558. package/dist/security/redact-overlapping-spans.js +159 -0
  3559. package/dist/security/redact-overlapping-spans.js.map +1 -0
  3560. package/dist/security/rules-of-engagement.d.ts +94 -0
  3561. package/dist/security/rules-of-engagement.d.ts.map +1 -0
  3562. package/dist/security/rules-of-engagement.js +290 -0
  3563. package/dist/security/rules-of-engagement.js.map +1 -0
  3564. package/dist/security/secret-scanner.d.ts +81 -0
  3565. package/dist/security/secret-scanner.d.ts.map +1 -0
  3566. package/dist/security/secret-scanner.js +336 -0
  3567. package/dist/security/secret-scanner.js.map +1 -0
  3568. package/dist/security/signed-audit.d.ts +50 -0
  3569. package/dist/security/signed-audit.d.ts.map +1 -0
  3570. package/dist/security/signed-audit.js +110 -0
  3571. package/dist/security/signed-audit.js.map +1 -0
  3572. package/dist/security/skills-guard.d.ts +74 -0
  3573. package/dist/security/skills-guard.d.ts.map +1 -0
  3574. package/dist/security/skills-guard.js +367 -0
  3575. package/dist/security/skills-guard.js.map +1 -0
  3576. package/dist/security/ssrf-guard.d.ts +70 -0
  3577. package/dist/security/ssrf-guard.d.ts.map +1 -0
  3578. package/dist/security/ssrf-guard.js +275 -0
  3579. package/dist/security/ssrf-guard.js.map +1 -0
  3580. package/dist/security/url-instruction-guard.d.ts +80 -0
  3581. package/dist/security/url-instruction-guard.d.ts.map +1 -0
  3582. package/dist/security/url-instruction-guard.js +476 -0
  3583. package/dist/security/url-instruction-guard.js.map +1 -0
  3584. package/dist/security/write-audit.d.ts +52 -0
  3585. package/dist/security/write-audit.d.ts.map +1 -0
  3586. package/dist/security/write-audit.js +64 -0
  3587. package/dist/security/write-audit.js.map +1 -0
  3588. package/dist/session/approval-queue.d.ts +307 -0
  3589. package/dist/session/approval-queue.d.ts.map +1 -0
  3590. package/dist/session/approval-queue.js +469 -0
  3591. package/dist/session/approval-queue.js.map +1 -0
  3592. package/dist/session/carplay-dispatch.d.ts +259 -0
  3593. package/dist/session/carplay-dispatch.d.ts.map +1 -0
  3594. package/dist/session/carplay-dispatch.js +459 -0
  3595. package/dist/session/carplay-dispatch.js.map +1 -0
  3596. package/dist/session/computer-session-store.d.ts +332 -0
  3597. package/dist/session/computer-session-store.d.ts.map +1 -0
  3598. package/dist/session/computer-session-store.js +758 -0
  3599. package/dist/session/computer-session-store.js.map +1 -0
  3600. package/dist/session/creations.d.ts +328 -0
  3601. package/dist/session/creations.d.ts.map +1 -0
  3602. package/dist/session/creations.js +667 -0
  3603. package/dist/session/creations.js.map +1 -0
  3604. package/dist/session/cursor-stream.d.ts +191 -0
  3605. package/dist/session/cursor-stream.d.ts.map +1 -0
  3606. package/dist/session/cursor-stream.js +328 -0
  3607. package/dist/session/cursor-stream.js.map +1 -0
  3608. package/dist/session/dispatch/companion-bridge.d.ts +116 -0
  3609. package/dist/session/dispatch/companion-bridge.d.ts.map +1 -0
  3610. package/dist/session/dispatch/companion-bridge.js +213 -0
  3611. package/dist/session/dispatch/companion-bridge.js.map +1 -0
  3612. package/dist/session/file-delivery.d.ts +365 -0
  3613. package/dist/session/file-delivery.d.ts.map +1 -0
  3614. package/dist/session/file-delivery.js +557 -0
  3615. package/dist/session/file-delivery.js.map +1 -0
  3616. package/dist/session/file-get-handler.d.ts +236 -0
  3617. package/dist/session/file-get-handler.d.ts.map +1 -0
  3618. package/dist/session/file-get-handler.js +476 -0
  3619. package/dist/session/file-get-handler.js.map +1 -0
  3620. package/dist/session/fleet-view.d.ts +245 -0
  3621. package/dist/session/fleet-view.d.ts.map +1 -0
  3622. package/dist/session/fleet-view.js +422 -0
  3623. package/dist/session/fleet-view.js.map +1 -0
  3624. package/dist/session/live-activity.d.ts +312 -0
  3625. package/dist/session/live-activity.d.ts.map +1 -0
  3626. package/dist/session/live-activity.js +473 -0
  3627. package/dist/session/live-activity.js.map +1 -0
  3628. package/dist/session/session-handoff.d.ts +150 -0
  3629. package/dist/session/session-handoff.d.ts.map +1 -0
  3630. package/dist/session/session-handoff.js +223 -0
  3631. package/dist/session/session-handoff.js.map +1 -0
  3632. package/dist/session/surface-subscribers.d.ts +139 -0
  3633. package/dist/session/surface-subscribers.d.ts.map +1 -0
  3634. package/dist/session/surface-subscribers.js +206 -0
  3635. package/dist/session/surface-subscribers.js.map +1 -0
  3636. package/dist/session/voice-intent.d.ts +144 -0
  3637. package/dist/session/voice-intent.d.ts.map +1 -0
  3638. package/dist/session/voice-intent.js +211 -0
  3639. package/dist/session/voice-intent.js.map +1 -0
  3640. package/dist/session/watch-dispatch.d.ts +207 -0
  3641. package/dist/session/watch-dispatch.d.ts.map +1 -0
  3642. package/dist/session/watch-dispatch.js +399 -0
  3643. package/dist/session/watch-dispatch.js.map +1 -0
  3644. package/dist/skills/agentskills-registry.d.ts +102 -0
  3645. package/dist/skills/agentskills-registry.d.ts.map +1 -0
  3646. package/dist/skills/agentskills-registry.js +157 -0
  3647. package/dist/skills/agentskills-registry.js.map +1 -0
  3648. package/dist/skills/anthropic-imports/docx-writer.d.ts +59 -0
  3649. package/dist/skills/anthropic-imports/docx-writer.d.ts.map +1 -0
  3650. package/dist/skills/anthropic-imports/docx-writer.js +239 -0
  3651. package/dist/skills/anthropic-imports/docx-writer.js.map +1 -0
  3652. package/dist/skills/anthropic-imports/pdf-writer.d.ts +63 -0
  3653. package/dist/skills/anthropic-imports/pdf-writer.d.ts.map +1 -0
  3654. package/dist/skills/anthropic-imports/pdf-writer.js +277 -0
  3655. package/dist/skills/anthropic-imports/pdf-writer.js.map +1 -0
  3656. package/dist/skills/anthropic-imports/pptx-writer.d.ts +50 -0
  3657. package/dist/skills/anthropic-imports/pptx-writer.d.ts.map +1 -0
  3658. package/dist/skills/anthropic-imports/pptx-writer.js +334 -0
  3659. package/dist/skills/anthropic-imports/pptx-writer.js.map +1 -0
  3660. package/dist/skills/anthropic-imports/xlsx-writer.d.ts +63 -0
  3661. package/dist/skills/anthropic-imports/xlsx-writer.d.ts.map +1 -0
  3662. package/dist/skills/anthropic-imports/xlsx-writer.js +289 -0
  3663. package/dist/skills/anthropic-imports/xlsx-writer.js.map +1 -0
  3664. package/dist/skills/awesome-imports/entries-domains.d.ts +10 -0
  3665. package/dist/skills/awesome-imports/entries-domains.d.ts.map +1 -0
  3666. package/dist/skills/awesome-imports/entries-domains.js +137 -0
  3667. package/dist/skills/awesome-imports/entries-domains.js.map +1 -0
  3668. package/dist/skills/awesome-imports/entries-skills.d.ts +10 -0
  3669. package/dist/skills/awesome-imports/entries-skills.d.ts.map +1 -0
  3670. package/dist/skills/awesome-imports/entries-skills.js +145 -0
  3671. package/dist/skills/awesome-imports/entries-skills.js.map +1 -0
  3672. package/dist/skills/awesome-imports/entries.d.ts +13 -0
  3673. package/dist/skills/awesome-imports/entries.d.ts.map +1 -0
  3674. package/dist/skills/awesome-imports/entries.js +14 -0
  3675. package/dist/skills/awesome-imports/entries.js.map +1 -0
  3676. package/dist/skills/awesome-imports/index.d.ts +36 -0
  3677. package/dist/skills/awesome-imports/index.d.ts.map +1 -0
  3678. package/dist/skills/awesome-imports/index.js +53 -0
  3679. package/dist/skills/awesome-imports/index.js.map +1 -0
  3680. package/dist/skills/awesome-imports/types.d.ts +33 -0
  3681. package/dist/skills/awesome-imports/types.d.ts.map +1 -0
  3682. package/dist/skills/awesome-imports/types.js +9 -0
  3683. package/dist/skills/awesome-imports/types.js.map +1 -0
  3684. package/dist/skills/cli-anything.d.ts +75 -0
  3685. package/dist/skills/cli-anything.d.ts.map +1 -0
  3686. package/dist/skills/cli-anything.js +156 -0
  3687. package/dist/skills/cli-anything.js.map +1 -0
  3688. package/dist/skills/eval.d.ts +70 -0
  3689. package/dist/skills/eval.d.ts.map +1 -0
  3690. package/dist/skills/eval.js +178 -0
  3691. package/dist/skills/eval.js.map +1 -0
  3692. package/dist/skills/input-sanitizer.d.ts +25 -0
  3693. package/dist/skills/input-sanitizer.d.ts.map +1 -0
  3694. package/dist/skills/input-sanitizer.js +55 -0
  3695. package/dist/skills/input-sanitizer.js.map +1 -0
  3696. package/dist/skills/loader.d.ts +189 -0
  3697. package/dist/skills/loader.d.ts.map +1 -0
  3698. package/dist/skills/loader.js +839 -0
  3699. package/dist/skills/loader.js.map +1 -0
  3700. package/dist/skills/prompt-file-loader.d.ts +55 -0
  3701. package/dist/skills/prompt-file-loader.d.ts.map +1 -0
  3702. package/dist/skills/prompt-file-loader.js +94 -0
  3703. package/dist/skills/prompt-file-loader.js.map +1 -0
  3704. package/dist/skills/self-crystallization.d.ts +62 -0
  3705. package/dist/skills/self-crystallization.d.ts.map +1 -0
  3706. package/dist/skills/self-crystallization.js +143 -0
  3707. package/dist/skills/self-crystallization.js.map +1 -0
  3708. package/dist/skills/skill-compositor.d.ts +66 -0
  3709. package/dist/skills/skill-compositor.d.ts.map +1 -0
  3710. package/dist/skills/skill-compositor.js +143 -0
  3711. package/dist/skills/skill-compositor.js.map +1 -0
  3712. package/dist/skills/skill-merger.d.ts +104 -0
  3713. package/dist/skills/skill-merger.d.ts.map +1 -0
  3714. package/dist/skills/skill-merger.js +369 -0
  3715. package/dist/skills/skill-merger.js.map +1 -0
  3716. package/dist/skills/skill-optimizer.d.ts +83 -0
  3717. package/dist/skills/skill-optimizer.d.ts.map +1 -0
  3718. package/dist/skills/skill-optimizer.js +131 -0
  3719. package/dist/skills/skill-optimizer.js.map +1 -0
  3720. package/dist/skills/skill-source-adapter.d.ts +184 -0
  3721. package/dist/skills/skill-source-adapter.d.ts.map +1 -0
  3722. package/dist/skills/skill-source-adapter.js +0 -0
  3723. package/dist/skills/skill-source-adapter.js.map +1 -0
  3724. package/dist/skills/skill-standard.d.ts +78 -0
  3725. package/dist/skills/skill-standard.d.ts.map +1 -0
  3726. package/dist/skills/skill-standard.js +198 -0
  3727. package/dist/skills/skill-standard.js.map +1 -0
  3728. package/dist/skills/tool-rules-parser.d.ts +51 -0
  3729. package/dist/skills/tool-rules-parser.d.ts.map +1 -0
  3730. package/dist/skills/tool-rules-parser.js +168 -0
  3731. package/dist/skills/tool-rules-parser.js.map +1 -0
  3732. package/dist/skills/wotann-skills-registry.d.ts +88 -0
  3733. package/dist/skills/wotann-skills-registry.d.ts.map +1 -0
  3734. package/dist/skills/wotann-skills-registry.js +533 -0
  3735. package/dist/skills/wotann-skills-registry.js.map +1 -0
  3736. package/dist/snippets/snippet-store.d.ts +121 -0
  3737. package/dist/snippets/snippet-store.d.ts.map +1 -0
  3738. package/dist/snippets/snippet-store.js +267 -0
  3739. package/dist/snippets/snippet-store.js.map +1 -0
  3740. package/dist/sop/pipeline.d.ts +60 -0
  3741. package/dist/sop/pipeline.d.ts.map +1 -0
  3742. package/dist/sop/pipeline.js +214 -0
  3743. package/dist/sop/pipeline.js.map +1 -0
  3744. package/dist/sop/stages/code-generator.d.ts +22 -0
  3745. package/dist/sop/stages/code-generator.d.ts.map +1 -0
  3746. package/dist/sop/stages/code-generator.js +106 -0
  3747. package/dist/sop/stages/code-generator.js.map +1 -0
  3748. package/dist/sop/stages/design-writer.d.ts +21 -0
  3749. package/dist/sop/stages/design-writer.d.ts.map +1 -0
  3750. package/dist/sop/stages/design-writer.js +96 -0
  3751. package/dist/sop/stages/design-writer.js.map +1 -0
  3752. package/dist/sop/stages/prd-writer.d.ts +22 -0
  3753. package/dist/sop/stages/prd-writer.d.ts.map +1 -0
  3754. package/dist/sop/stages/prd-writer.js +88 -0
  3755. package/dist/sop/stages/prd-writer.js.map +1 -0
  3756. package/dist/sop/stages/qa.d.ts +64 -0
  3757. package/dist/sop/stages/qa.d.ts.map +1 -0
  3758. package/dist/sop/stages/qa.js +241 -0
  3759. package/dist/sop/stages/qa.js.map +1 -0
  3760. package/dist/sop/types.d.ts +94 -0
  3761. package/dist/sop/types.d.ts.map +1 -0
  3762. package/dist/sop/types.js +13 -0
  3763. package/dist/sop/types.js.map +1 -0
  3764. package/dist/storage/checkpoint-supersede.d.ts +78 -0
  3765. package/dist/storage/checkpoint-supersede.d.ts.map +1 -0
  3766. package/dist/storage/checkpoint-supersede.js +85 -0
  3767. package/dist/storage/checkpoint-supersede.js.map +1 -0
  3768. package/dist/storage/index.d.ts +80 -0
  3769. package/dist/storage/index.d.ts.map +1 -0
  3770. package/dist/storage/index.js +95 -0
  3771. package/dist/storage/index.js.map +1 -0
  3772. package/dist/storage/sqlite-better-backend.d.ts +64 -0
  3773. package/dist/storage/sqlite-better-backend.d.ts.map +1 -0
  3774. package/dist/storage/sqlite-better-backend.js +169 -0
  3775. package/dist/storage/sqlite-better-backend.js.map +1 -0
  3776. package/dist/storage/sqlite-node-backend.d.ts +69 -0
  3777. package/dist/storage/sqlite-node-backend.d.ts.map +1 -0
  3778. package/dist/storage/sqlite-node-backend.js +195 -0
  3779. package/dist/storage/sqlite-node-backend.js.map +1 -0
  3780. package/dist/storage/storage-adapter.d.ts +184 -0
  3781. package/dist/storage/storage-adapter.d.ts.map +1 -0
  3782. package/dist/storage/storage-adapter.js +62 -0
  3783. package/dist/storage/storage-adapter.js.map +1 -0
  3784. package/dist/telemetry/audit-trail.d.ts +124 -0
  3785. package/dist/telemetry/audit-trail.d.ts.map +1 -0
  3786. package/dist/telemetry/audit-trail.js +280 -0
  3787. package/dist/telemetry/audit-trail.js.map +1 -0
  3788. package/dist/telemetry/benchmarks.d.ts +65 -0
  3789. package/dist/telemetry/benchmarks.d.ts.map +1 -0
  3790. package/dist/telemetry/benchmarks.js +171 -0
  3791. package/dist/telemetry/benchmarks.js.map +1 -0
  3792. package/dist/telemetry/cost-oracle.d.ts +53 -0
  3793. package/dist/telemetry/cost-oracle.d.ts.map +1 -0
  3794. package/dist/telemetry/cost-oracle.js +206 -0
  3795. package/dist/telemetry/cost-oracle.js.map +1 -0
  3796. package/dist/telemetry/cost-tracker.d.ts +318 -0
  3797. package/dist/telemetry/cost-tracker.d.ts.map +1 -0
  3798. package/dist/telemetry/cost-tracker.js +887 -0
  3799. package/dist/telemetry/cost-tracker.js.map +1 -0
  3800. package/dist/telemetry/daily-cost-store.d.ts +43 -0
  3801. package/dist/telemetry/daily-cost-store.d.ts.map +1 -0
  3802. package/dist/telemetry/daily-cost-store.js +140 -0
  3803. package/dist/telemetry/daily-cost-store.js.map +1 -0
  3804. package/dist/telemetry/eval-observability.d.ts +105 -0
  3805. package/dist/telemetry/eval-observability.d.ts.map +1 -0
  3806. package/dist/telemetry/eval-observability.js +182 -0
  3807. package/dist/telemetry/eval-observability.js.map +1 -0
  3808. package/dist/telemetry/observability-export.d.ts +145 -0
  3809. package/dist/telemetry/observability-export.d.ts.map +1 -0
  3810. package/dist/telemetry/observability-export.js +339 -0
  3811. package/dist/telemetry/observability-export.js.map +1 -0
  3812. package/dist/telemetry/opt-out.d.ts +31 -0
  3813. package/dist/telemetry/opt-out.d.ts.map +1 -0
  3814. package/dist/telemetry/opt-out.js +58 -0
  3815. package/dist/telemetry/opt-out.js.map +1 -0
  3816. package/dist/telemetry/session-analytics.d.ts +94 -0
  3817. package/dist/telemetry/session-analytics.d.ts.map +1 -0
  3818. package/dist/telemetry/session-analytics.js +152 -0
  3819. package/dist/telemetry/session-analytics.js.map +1 -0
  3820. package/dist/telemetry/session-replay.d.ts +132 -0
  3821. package/dist/telemetry/session-replay.d.ts.map +1 -0
  3822. package/dist/telemetry/session-replay.js +245 -0
  3823. package/dist/telemetry/session-replay.js.map +1 -0
  3824. package/dist/telemetry/token-estimator.d.ts +72 -0
  3825. package/dist/telemetry/token-estimator.d.ts.map +1 -0
  3826. package/dist/telemetry/token-estimator.js +86 -0
  3827. package/dist/telemetry/token-estimator.js.map +1 -0
  3828. package/dist/telemetry/traceparent.d.ts +139 -0
  3829. package/dist/telemetry/traceparent.d.ts.map +1 -0
  3830. package/dist/telemetry/traceparent.js +249 -0
  3831. package/dist/telemetry/traceparent.js.map +1 -0
  3832. package/dist/telemetry/wotann-compute-unit.d.ts +82 -0
  3833. package/dist/telemetry/wotann-compute-unit.d.ts.map +1 -0
  3834. package/dist/telemetry/wotann-compute-unit.js +112 -0
  3835. package/dist/telemetry/wotann-compute-unit.js.map +1 -0
  3836. package/dist/testing/prompt-regression.d.ts +73 -0
  3837. package/dist/testing/prompt-regression.d.ts.map +1 -0
  3838. package/dist/testing/prompt-regression.js +170 -0
  3839. package/dist/testing/prompt-regression.js.map +1 -0
  3840. package/dist/testing/screen-aware.d.ts +55 -0
  3841. package/dist/testing/screen-aware.d.ts.map +1 -0
  3842. package/dist/testing/screen-aware.js +137 -0
  3843. package/dist/testing/screen-aware.js.map +1 -0
  3844. package/dist/testing/visual-diff-theater.d.ts +86 -0
  3845. package/dist/testing/visual-diff-theater.d.ts.map +1 -0
  3846. package/dist/testing/visual-diff-theater.js +262 -0
  3847. package/dist/testing/visual-diff-theater.js.map +1 -0
  3848. package/dist/testing/visual-verifier.d.ts +61 -0
  3849. package/dist/testing/visual-verifier.d.ts.map +1 -0
  3850. package/dist/testing/visual-verifier.js +201 -0
  3851. package/dist/testing/visual-verifier.js.map +1 -0
  3852. package/dist/tools/aux-tools.d.ts +39 -0
  3853. package/dist/tools/aux-tools.d.ts.map +1 -0
  3854. package/dist/tools/aux-tools.js +301 -0
  3855. package/dist/tools/aux-tools.js.map +1 -0
  3856. package/dist/tools/composio-adapter.d.ts +99 -0
  3857. package/dist/tools/composio-adapter.d.ts.map +1 -0
  3858. package/dist/tools/composio-adapter.js +140 -0
  3859. package/dist/tools/composio-adapter.js.map +1 -0
  3860. package/dist/tools/deep-research-loop.d.ts +91 -0
  3861. package/dist/tools/deep-research-loop.d.ts.map +1 -0
  3862. package/dist/tools/deep-research-loop.js +129 -0
  3863. package/dist/tools/deep-research-loop.js.map +1 -0
  3864. package/dist/tools/docx-processor.d.ts +54 -0
  3865. package/dist/tools/docx-processor.d.ts.map +1 -0
  3866. package/dist/tools/docx-processor.js +183 -0
  3867. package/dist/tools/docx-processor.js.map +1 -0
  3868. package/dist/tools/encoding-detector.d.ts +25 -0
  3869. package/dist/tools/encoding-detector.d.ts.map +1 -0
  3870. package/dist/tools/encoding-detector.js +147 -0
  3871. package/dist/tools/encoding-detector.js.map +1 -0
  3872. package/dist/tools/grep-subagent.d.ts +85 -0
  3873. package/dist/tools/grep-subagent.d.ts.map +1 -0
  3874. package/dist/tools/grep-subagent.js +414 -0
  3875. package/dist/tools/grep-subagent.js.map +1 -0
  3876. package/dist/tools/hash-anchored-edit.d.ts +100 -0
  3877. package/dist/tools/hash-anchored-edit.d.ts.map +1 -0
  3878. package/dist/tools/hash-anchored-edit.js +161 -0
  3879. package/dist/tools/hash-anchored-edit.js.map +1 -0
  3880. package/dist/tools/hashline-edit.d.ts +79 -0
  3881. package/dist/tools/hashline-edit.d.ts.map +1 -0
  3882. package/dist/tools/hashline-edit.js +174 -0
  3883. package/dist/tools/hashline-edit.js.map +1 -0
  3884. package/dist/tools/hashline-edits.d.ts +169 -0
  3885. package/dist/tools/hashline-edits.d.ts.map +1 -0
  3886. package/dist/tools/hashline-edits.js +594 -0
  3887. package/dist/tools/hashline-edits.js.map +1 -0
  3888. package/dist/tools/image-gen-router.d.ts +39 -0
  3889. package/dist/tools/image-gen-router.d.ts.map +1 -0
  3890. package/dist/tools/image-gen-router.js +288 -0
  3891. package/dist/tools/image-gen-router.js.map +1 -0
  3892. package/dist/tools/markitdown-bridge.d.ts +42 -0
  3893. package/dist/tools/markitdown-bridge.d.ts.map +1 -0
  3894. package/dist/tools/markitdown-bridge.js +249 -0
  3895. package/dist/tools/markitdown-bridge.js.map +1 -0
  3896. package/dist/tools/monitor-bg.d.ts +73 -0
  3897. package/dist/tools/monitor-bg.d.ts.map +1 -0
  3898. package/dist/tools/monitor-bg.js +275 -0
  3899. package/dist/tools/monitor-bg.js.map +1 -0
  3900. package/dist/tools/monitor.d.ts +58 -0
  3901. package/dist/tools/monitor.d.ts.map +1 -0
  3902. package/dist/tools/monitor.js +204 -0
  3903. package/dist/tools/monitor.js.map +1 -0
  3904. package/dist/tools/parallel-grep.d.ts +72 -0
  3905. package/dist/tools/parallel-grep.d.ts.map +1 -0
  3906. package/dist/tools/parallel-grep.js +154 -0
  3907. package/dist/tools/parallel-grep.js.map +1 -0
  3908. package/dist/tools/pdf-processor.d.ts +47 -0
  3909. package/dist/tools/pdf-processor.d.ts.map +1 -0
  3910. package/dist/tools/pdf-processor.js +214 -0
  3911. package/dist/tools/pdf-processor.js.map +1 -0
  3912. package/dist/tools/post-callback.d.ts +62 -0
  3913. package/dist/tools/post-callback.d.ts.map +1 -0
  3914. package/dist/tools/post-callback.js +153 -0
  3915. package/dist/tools/post-callback.js.map +1 -0
  3916. package/dist/tools/rtk-compressor.d.ts +59 -0
  3917. package/dist/tools/rtk-compressor.d.ts.map +1 -0
  3918. package/dist/tools/rtk-compressor.js +236 -0
  3919. package/dist/tools/rtk-compressor.js.map +1 -0
  3920. package/dist/tools/task-tool.d.ts +80 -0
  3921. package/dist/tools/task-tool.d.ts.map +1 -0
  3922. package/dist/tools/task-tool.js +309 -0
  3923. package/dist/tools/task-tool.js.map +1 -0
  3924. package/dist/tools/tool-timing.d.ts +99 -0
  3925. package/dist/tools/tool-timing.d.ts.map +1 -0
  3926. package/dist/tools/tool-timing.js +196 -0
  3927. package/dist/tools/tool-timing.js.map +1 -0
  3928. package/dist/tools/web-fetch.d.ts +116 -0
  3929. package/dist/tools/web-fetch.d.ts.map +1 -0
  3930. package/dist/tools/web-fetch.js +501 -0
  3931. package/dist/tools/web-fetch.js.map +1 -0
  3932. package/dist/tools/xlsx-processor.d.ts +57 -0
  3933. package/dist/tools/xlsx-processor.d.ts.map +1 -0
  3934. package/dist/tools/xlsx-processor.js +274 -0
  3935. package/dist/tools/xlsx-processor.js.map +1 -0
  3936. package/dist/training/autoresearch.d.ts +129 -0
  3937. package/dist/training/autoresearch.d.ts.map +1 -0
  3938. package/dist/training/autoresearch.js +307 -0
  3939. package/dist/training/autoresearch.js.map +1 -0
  3940. package/dist/training/llm-modification-generator.d.ts +45 -0
  3941. package/dist/training/llm-modification-generator.d.ts.map +1 -0
  3942. package/dist/training/llm-modification-generator.js +207 -0
  3943. package/dist/training/llm-modification-generator.js.map +1 -0
  3944. package/dist/training/pipeline.d.ts +120 -0
  3945. package/dist/training/pipeline.d.ts.map +1 -0
  3946. package/dist/training/pipeline.js +272 -0
  3947. package/dist/training/pipeline.js.map +1 -0
  3948. package/dist/training/rl-environment.d.ts +148 -0
  3949. package/dist/training/rl-environment.d.ts.map +1 -0
  3950. package/dist/training/rl-environment.js +264 -0
  3951. package/dist/training/rl-environment.js.map +1 -0
  3952. package/dist/training/session-extractor.d.ts +55 -0
  3953. package/dist/training/session-extractor.d.ts.map +1 -0
  3954. package/dist/training/session-extractor.js +177 -0
  3955. package/dist/training/session-extractor.js.map +1 -0
  3956. package/dist/training/trajectory-extractor.d.ts +83 -0
  3957. package/dist/training/trajectory-extractor.d.ts.map +1 -0
  3958. package/dist/training/trajectory-extractor.js +211 -0
  3959. package/dist/training/trajectory-extractor.js.map +1 -0
  3960. package/dist/ui/App.d.ts +24 -0
  3961. package/dist/ui/App.d.ts.map +1 -0
  3962. package/dist/ui/App.js +3248 -0
  3963. package/dist/ui/App.js.map +1 -0
  3964. package/dist/ui/accessibility.d.ts +157 -0
  3965. package/dist/ui/accessibility.d.ts.map +1 -0
  3966. package/dist/ui/accessibility.js +232 -0
  3967. package/dist/ui/accessibility.js.map +1 -0
  3968. package/dist/ui/agent-fleet-dashboard.d.ts +59 -0
  3969. package/dist/ui/agent-fleet-dashboard.d.ts.map +1 -0
  3970. package/dist/ui/agent-fleet-dashboard.js +143 -0
  3971. package/dist/ui/agent-fleet-dashboard.js.map +1 -0
  3972. package/dist/ui/alt-buffer.d.ts +73 -0
  3973. package/dist/ui/alt-buffer.d.ts.map +1 -0
  3974. package/dist/ui/alt-buffer.js +151 -0
  3975. package/dist/ui/alt-buffer.js.map +1 -0
  3976. package/dist/ui/animations/RavensFlight.d.ts +56 -0
  3977. package/dist/ui/animations/RavensFlight.d.ts.map +1 -0
  3978. package/dist/ui/animations/RavensFlight.js +103 -0
  3979. package/dist/ui/animations/RavensFlight.js.map +1 -0
  3980. package/dist/ui/animations/SigilStamp.d.ts +89 -0
  3981. package/dist/ui/animations/SigilStamp.d.ts.map +1 -0
  3982. package/dist/ui/animations/SigilStamp.js +142 -0
  3983. package/dist/ui/animations/SigilStamp.js.map +1 -0
  3984. package/dist/ui/animations.d.ts +102 -0
  3985. package/dist/ui/animations.d.ts.map +1 -0
  3986. package/dist/ui/animations.js +277 -0
  3987. package/dist/ui/animations.js.map +1 -0
  3988. package/dist/ui/bootstrap.d.ts +25 -0
  3989. package/dist/ui/bootstrap.d.ts.map +1 -0
  3990. package/dist/ui/bootstrap.js +51 -0
  3991. package/dist/ui/bootstrap.js.map +1 -0
  3992. package/dist/ui/canvas.d.ts +85 -0
  3993. package/dist/ui/canvas.d.ts.map +1 -0
  3994. package/dist/ui/canvas.js +210 -0
  3995. package/dist/ui/canvas.js.map +1 -0
  3996. package/dist/ui/command-registry.d.ts +64 -0
  3997. package/dist/ui/command-registry.d.ts.map +1 -0
  3998. package/dist/ui/command-registry.js +148 -0
  3999. package/dist/ui/command-registry.js.map +1 -0
  4000. package/dist/ui/components/AgentStatusPanel.d.ts +25 -0
  4001. package/dist/ui/components/AgentStatusPanel.d.ts.map +1 -0
  4002. package/dist/ui/components/AgentStatusPanel.js +32 -0
  4003. package/dist/ui/components/AgentStatusPanel.js.map +1 -0
  4004. package/dist/ui/components/AuditLogPanel.d.ts +22 -0
  4005. package/dist/ui/components/AuditLogPanel.d.ts.map +1 -0
  4006. package/dist/ui/components/AuditLogPanel.js +158 -0
  4007. package/dist/ui/components/AuditLogPanel.js.map +1 -0
  4008. package/dist/ui/components/AutomationsPanel.d.ts +28 -0
  4009. package/dist/ui/components/AutomationsPanel.d.ts.map +1 -0
  4010. package/dist/ui/components/AutomationsPanel.js +298 -0
  4011. package/dist/ui/components/AutomationsPanel.js.map +1 -0
  4012. package/dist/ui/components/ChatView.d.ts +27 -0
  4013. package/dist/ui/components/ChatView.d.ts.map +1 -0
  4014. package/dist/ui/components/ChatView.js +49 -0
  4015. package/dist/ui/components/ChatView.js.map +1 -0
  4016. package/dist/ui/components/CommandPalette.d.ts +39 -0
  4017. package/dist/ui/components/CommandPalette.d.ts.map +1 -0
  4018. package/dist/ui/components/CommandPalette.js +95 -0
  4019. package/dist/ui/components/CommandPalette.js.map +1 -0
  4020. package/dist/ui/components/CommandPaletteCommands.d.ts +70 -0
  4021. package/dist/ui/components/CommandPaletteCommands.d.ts.map +1 -0
  4022. package/dist/ui/components/CommandPaletteCommands.js +267 -0
  4023. package/dist/ui/components/CommandPaletteCommands.js.map +1 -0
  4024. package/dist/ui/components/ContextHUD.d.ts +24 -0
  4025. package/dist/ui/components/ContextHUD.d.ts.map +1 -0
  4026. package/dist/ui/components/ContextHUD.js +27 -0
  4027. package/dist/ui/components/ContextHUD.js.map +1 -0
  4028. package/dist/ui/components/ContextSourcePanel.d.ts +20 -0
  4029. package/dist/ui/components/ContextSourcePanel.d.ts.map +1 -0
  4030. package/dist/ui/components/ContextSourcePanel.js +91 -0
  4031. package/dist/ui/components/ContextSourcePanel.js.map +1 -0
  4032. package/dist/ui/components/DesignPreview.d.ts +66 -0
  4033. package/dist/ui/components/DesignPreview.d.ts.map +1 -0
  4034. package/dist/ui/components/DesignPreview.js +39 -0
  4035. package/dist/ui/components/DesignPreview.js.map +1 -0
  4036. package/dist/ui/components/DiffTimeline.d.ts +38 -0
  4037. package/dist/ui/components/DiffTimeline.d.ts.map +1 -0
  4038. package/dist/ui/components/DiffTimeline.js +65 -0
  4039. package/dist/ui/components/DiffTimeline.js.map +1 -0
  4040. package/dist/ui/components/DiffViewer.d.ts +35 -0
  4041. package/dist/ui/components/DiffViewer.d.ts.map +1 -0
  4042. package/dist/ui/components/DiffViewer.js +115 -0
  4043. package/dist/ui/components/DiffViewer.js.map +1 -0
  4044. package/dist/ui/components/DispatchInbox.d.ts +32 -0
  4045. package/dist/ui/components/DispatchInbox.d.ts.map +1 -0
  4046. package/dist/ui/components/DispatchInbox.js +89 -0
  4047. package/dist/ui/components/DispatchInbox.js.map +1 -0
  4048. package/dist/ui/components/GdprPanel.d.ts +22 -0
  4049. package/dist/ui/components/GdprPanel.d.ts.map +1 -0
  4050. package/dist/ui/components/GdprPanel.js +165 -0
  4051. package/dist/ui/components/GdprPanel.js.map +1 -0
  4052. package/dist/ui/components/HistoryPicker.d.ts +19 -0
  4053. package/dist/ui/components/HistoryPicker.d.ts.map +1 -0
  4054. package/dist/ui/components/HistoryPicker.js +129 -0
  4055. package/dist/ui/components/HistoryPicker.js.map +1 -0
  4056. package/dist/ui/components/MemoryInspector.d.ts +19 -0
  4057. package/dist/ui/components/MemoryInspector.d.ts.map +1 -0
  4058. package/dist/ui/components/MemoryInspector.js +129 -0
  4059. package/dist/ui/components/MemoryInspector.js.map +1 -0
  4060. package/dist/ui/components/MessageActions.d.ts +15 -0
  4061. package/dist/ui/components/MessageActions.d.ts.map +1 -0
  4062. package/dist/ui/components/MessageActions.js +84 -0
  4063. package/dist/ui/components/MessageActions.js.map +1 -0
  4064. package/dist/ui/components/ModelPicker.d.ts +61 -0
  4065. package/dist/ui/components/ModelPicker.d.ts.map +1 -0
  4066. package/dist/ui/components/ModelPicker.js +224 -0
  4067. package/dist/ui/components/ModelPicker.js.map +1 -0
  4068. package/dist/ui/components/OptionPicker.d.ts +38 -0
  4069. package/dist/ui/components/OptionPicker.d.ts.map +1 -0
  4070. package/dist/ui/components/OptionPicker.js +146 -0
  4071. package/dist/ui/components/OptionPicker.js.map +1 -0
  4072. package/dist/ui/components/PermissionPrompt.d.ts +22 -0
  4073. package/dist/ui/components/PermissionPrompt.d.ts.map +1 -0
  4074. package/dist/ui/components/PermissionPrompt.js +68 -0
  4075. package/dist/ui/components/PermissionPrompt.js.map +1 -0
  4076. package/dist/ui/components/PromptInput.d.ts +31 -0
  4077. package/dist/ui/components/PromptInput.d.ts.map +1 -0
  4078. package/dist/ui/components/PromptInput.js +244 -0
  4079. package/dist/ui/components/PromptInput.js.map +1 -0
  4080. package/dist/ui/components/ProofViewer.d.ts +30 -0
  4081. package/dist/ui/components/ProofViewer.d.ts.map +1 -0
  4082. package/dist/ui/components/ProofViewer.js +62 -0
  4083. package/dist/ui/components/ProofViewer.js.map +1 -0
  4084. package/dist/ui/components/Sparkline.d.ts +81 -0
  4085. package/dist/ui/components/Sparkline.d.ts.map +1 -0
  4086. package/dist/ui/components/Sparkline.js +102 -0
  4087. package/dist/ui/components/Sparkline.js.map +1 -0
  4088. package/dist/ui/components/StartupScreen.d.ts +31 -0
  4089. package/dist/ui/components/StartupScreen.d.ts.map +1 -0
  4090. package/dist/ui/components/StartupScreen.js +29 -0
  4091. package/dist/ui/components/StartupScreen.js.map +1 -0
  4092. package/dist/ui/components/StatusBar.d.ts +51 -0
  4093. package/dist/ui/components/StatusBar.d.ts.map +1 -0
  4094. package/dist/ui/components/StatusBar.js +74 -0
  4095. package/dist/ui/components/StatusBar.js.map +1 -0
  4096. package/dist/ui/components/TerminalBlocksView.d.ts +31 -0
  4097. package/dist/ui/components/TerminalBlocksView.d.ts.map +1 -0
  4098. package/dist/ui/components/TerminalBlocksView.js +149 -0
  4099. package/dist/ui/components/TerminalBlocksView.js.map +1 -0
  4100. package/dist/ui/components/TrustPanel.d.ts +26 -0
  4101. package/dist/ui/components/TrustPanel.d.ts.map +1 -0
  4102. package/dist/ui/components/TrustPanel.js +173 -0
  4103. package/dist/ui/components/TrustPanel.js.map +1 -0
  4104. package/dist/ui/components/UnifiedStatusBar.d.ts +65 -0
  4105. package/dist/ui/components/UnifiedStatusBar.d.ts.map +1 -0
  4106. package/dist/ui/components/UnifiedStatusBar.js +60 -0
  4107. package/dist/ui/components/UnifiedStatusBar.js.map +1 -0
  4108. package/dist/ui/components/primitives/Banner.d.ts +47 -0
  4109. package/dist/ui/components/primitives/Banner.d.ts.map +1 -0
  4110. package/dist/ui/components/primitives/Banner.js +29 -0
  4111. package/dist/ui/components/primitives/Banner.js.map +1 -0
  4112. package/dist/ui/components/primitives/Card.d.ts +58 -0
  4113. package/dist/ui/components/primitives/Card.d.ts.map +1 -0
  4114. package/dist/ui/components/primitives/Card.js +20 -0
  4115. package/dist/ui/components/primitives/Card.js.map +1 -0
  4116. package/dist/ui/components/primitives/KeyHint.d.ts +58 -0
  4117. package/dist/ui/components/primitives/KeyHint.d.ts.map +1 -0
  4118. package/dist/ui/components/primitives/KeyHint.js +21 -0
  4119. package/dist/ui/components/primitives/KeyHint.js.map +1 -0
  4120. package/dist/ui/components/primitives/Notification.d.ts +26 -0
  4121. package/dist/ui/components/primitives/Notification.d.ts.map +1 -0
  4122. package/dist/ui/components/primitives/Notification.js +24 -0
  4123. package/dist/ui/components/primitives/Notification.js.map +1 -0
  4124. package/dist/ui/components/primitives/ProgressMeter.d.ts +47 -0
  4125. package/dist/ui/components/primitives/ProgressMeter.d.ts.map +1 -0
  4126. package/dist/ui/components/primitives/ProgressMeter.js +46 -0
  4127. package/dist/ui/components/primitives/ProgressMeter.js.map +1 -0
  4128. package/dist/ui/components/primitives/Spinner.d.ts +28 -0
  4129. package/dist/ui/components/primitives/Spinner.d.ts.map +1 -0
  4130. package/dist/ui/components/primitives/Spinner.js +32 -0
  4131. package/dist/ui/components/primitives/Spinner.js.map +1 -0
  4132. package/dist/ui/components/primitives/StatusBadge.d.ts +38 -0
  4133. package/dist/ui/components/primitives/StatusBadge.d.ts.map +1 -0
  4134. package/dist/ui/components/primitives/StatusBadge.js +28 -0
  4135. package/dist/ui/components/primitives/StatusBadge.js.map +1 -0
  4136. package/dist/ui/components/primitives/index.d.ts +24 -0
  4137. package/dist/ui/components/primitives/index.d.ts.map +1 -0
  4138. package/dist/ui/components/primitives/index.js +17 -0
  4139. package/dist/ui/components/primitives/index.js.map +1 -0
  4140. package/dist/ui/context-meter.d.ts +46 -0
  4141. package/dist/ui/context-meter.d.ts.map +1 -0
  4142. package/dist/ui/context-meter.js +111 -0
  4143. package/dist/ui/context-meter.js.map +1 -0
  4144. package/dist/ui/context-references.d.ts +62 -0
  4145. package/dist/ui/context-references.d.ts.map +1 -0
  4146. package/dist/ui/context-references.js +559 -0
  4147. package/dist/ui/context-references.js.map +1 -0
  4148. package/dist/ui/cost-readout.d.ts +60 -0
  4149. package/dist/ui/cost-readout.d.ts.map +1 -0
  4150. package/dist/ui/cost-readout.js +101 -0
  4151. package/dist/ui/cost-readout.js.map +1 -0
  4152. package/dist/ui/diff-engine.d.ts +110 -0
  4153. package/dist/ui/diff-engine.d.ts.map +1 -0
  4154. package/dist/ui/diff-engine.js +274 -0
  4155. package/dist/ui/diff-engine.js.map +1 -0
  4156. package/dist/ui/follow-ups.d.ts +39 -0
  4157. package/dist/ui/follow-ups.d.ts.map +1 -0
  4158. package/dist/ui/follow-ups.js +226 -0
  4159. package/dist/ui/follow-ups.js.map +1 -0
  4160. package/dist/ui/helpers.d.ts +33 -0
  4161. package/dist/ui/helpers.d.ts.map +1 -0
  4162. package/dist/ui/helpers.js +97 -0
  4163. package/dist/ui/helpers.js.map +1 -0
  4164. package/dist/ui/input/mouse.d.ts +139 -0
  4165. package/dist/ui/input/mouse.d.ts.map +1 -0
  4166. package/dist/ui/input/mouse.js +239 -0
  4167. package/dist/ui/input/mouse.js.map +1 -0
  4168. package/dist/ui/keybindings.d.ts +26 -0
  4169. package/dist/ui/keybindings.d.ts.map +1 -0
  4170. package/dist/ui/keybindings.js +76 -0
  4171. package/dist/ui/keybindings.js.map +1 -0
  4172. package/dist/ui/raven/raven-state.d.ts +69 -0
  4173. package/dist/ui/raven/raven-state.d.ts.map +1 -0
  4174. package/dist/ui/raven/raven-state.js +185 -0
  4175. package/dist/ui/raven/raven-state.js.map +1 -0
  4176. package/dist/ui/sound.d.ts +85 -0
  4177. package/dist/ui/sound.d.ts.map +1 -0
  4178. package/dist/ui/sound.js +126 -0
  4179. package/dist/ui/sound.js.map +1 -0
  4180. package/dist/ui/statusline.d.ts +74 -0
  4181. package/dist/ui/statusline.d.ts.map +1 -0
  4182. package/dist/ui/statusline.js +111 -0
  4183. package/dist/ui/statusline.js.map +1 -0
  4184. package/dist/ui/string-width-cache.d.ts +204 -0
  4185. package/dist/ui/string-width-cache.d.ts.map +1 -0
  4186. package/dist/ui/string-width-cache.js +374 -0
  4187. package/dist/ui/string-width-cache.js.map +1 -0
  4188. package/dist/ui/terminal-blocks/block.d.ts +90 -0
  4189. package/dist/ui/terminal-blocks/block.d.ts.map +1 -0
  4190. package/dist/ui/terminal-blocks/block.js +183 -0
  4191. package/dist/ui/terminal-blocks/block.js.map +1 -0
  4192. package/dist/ui/terminal-blocks/init-snippets.d.ts +32 -0
  4193. package/dist/ui/terminal-blocks/init-snippets.d.ts.map +1 -0
  4194. package/dist/ui/terminal-blocks/init-snippets.js +163 -0
  4195. package/dist/ui/terminal-blocks/init-snippets.js.map +1 -0
  4196. package/dist/ui/terminal-blocks/osc-133-parser.d.ts +98 -0
  4197. package/dist/ui/terminal-blocks/osc-133-parser.d.ts.map +1 -0
  4198. package/dist/ui/terminal-blocks/osc-133-parser.js +230 -0
  4199. package/dist/ui/terminal-blocks/osc-133-parser.js.map +1 -0
  4200. package/dist/ui/theme/tokens.d.ts +198 -0
  4201. package/dist/ui/theme/tokens.d.ts.map +1 -0
  4202. package/dist/ui/theme/tokens.js +199 -0
  4203. package/dist/ui/theme/tokens.js.map +1 -0
  4204. package/dist/ui/themes/colorblind.d.ts +74 -0
  4205. package/dist/ui/themes/colorblind.d.ts.map +1 -0
  4206. package/dist/ui/themes/colorblind.js +162 -0
  4207. package/dist/ui/themes/colorblind.js.map +1 -0
  4208. package/dist/ui/themes.d.ts +158 -0
  4209. package/dist/ui/themes.d.ts.map +1 -0
  4210. package/dist/ui/themes.js +425 -0
  4211. package/dist/ui/themes.js.map +1 -0
  4212. package/dist/ui/turn-finalize.d.ts +66 -0
  4213. package/dist/ui/turn-finalize.d.ts.map +1 -0
  4214. package/dist/ui/turn-finalize.js +79 -0
  4215. package/dist/ui/turn-finalize.js.map +1 -0
  4216. package/dist/ui/voice-controller.d.ts +32 -0
  4217. package/dist/ui/voice-controller.d.ts.map +1 -0
  4218. package/dist/ui/voice-controller.js +72 -0
  4219. package/dist/ui/voice-controller.js.map +1 -0
  4220. package/dist/utils/atomic-io.d.ts +83 -0
  4221. package/dist/utils/atomic-io.d.ts.map +1 -0
  4222. package/dist/utils/atomic-io.js +219 -0
  4223. package/dist/utils/atomic-io.js.map +1 -0
  4224. package/dist/utils/atomic-write.d.ts +60 -0
  4225. package/dist/utils/atomic-write.d.ts.map +1 -0
  4226. package/dist/utils/atomic-write.js +144 -0
  4227. package/dist/utils/atomic-write.js.map +1 -0
  4228. package/dist/utils/execFileNoThrow.d.ts +19 -0
  4229. package/dist/utils/execFileNoThrow.d.ts.map +1 -0
  4230. package/dist/utils/execFileNoThrow.js +31 -0
  4231. package/dist/utils/execFileNoThrow.js.map +1 -0
  4232. package/dist/utils/json-parse.d.ts +52 -0
  4233. package/dist/utils/json-parse.d.ts.map +1 -0
  4234. package/dist/utils/json-parse.js +259 -0
  4235. package/dist/utils/json-parse.js.map +1 -0
  4236. package/dist/utils/marker-polling.d.ts +216 -0
  4237. package/dist/utils/marker-polling.d.ts.map +1 -0
  4238. package/dist/utils/marker-polling.js +324 -0
  4239. package/dist/utils/marker-polling.js.map +1 -0
  4240. package/dist/utils/path-realpath.d.ts +81 -0
  4241. package/dist/utils/path-realpath.d.ts.map +1 -0
  4242. package/dist/utils/path-realpath.js +210 -0
  4243. package/dist/utils/path-realpath.js.map +1 -0
  4244. package/dist/utils/process-handlers.d.ts +65 -0
  4245. package/dist/utils/process-handlers.d.ts.map +1 -0
  4246. package/dist/utils/process-handlers.js +102 -0
  4247. package/dist/utils/process-handlers.js.map +1 -0
  4248. package/dist/utils/proxy-setup.d.ts +56 -0
  4249. package/dist/utils/proxy-setup.d.ts.map +1 -0
  4250. package/dist/utils/proxy-setup.js +109 -0
  4251. package/dist/utils/proxy-setup.js.map +1 -0
  4252. package/dist/utils/schema-drift.d.ts +99 -0
  4253. package/dist/utils/schema-drift.d.ts.map +1 -0
  4254. package/dist/utils/schema-drift.js +123 -0
  4255. package/dist/utils/schema-drift.js.map +1 -0
  4256. package/dist/utils/shadow-git.d.ts +111 -0
  4257. package/dist/utils/shadow-git.d.ts.map +1 -0
  4258. package/dist/utils/shadow-git.js +392 -0
  4259. package/dist/utils/shadow-git.js.map +1 -0
  4260. package/dist/utils/sidecar-downloader.d.ts +54 -0
  4261. package/dist/utils/sidecar-downloader.d.ts.map +1 -0
  4262. package/dist/utils/sidecar-downloader.js +185 -0
  4263. package/dist/utils/sidecar-downloader.js.map +1 -0
  4264. package/dist/utils/sqlite-kv-store.d.ts +91 -0
  4265. package/dist/utils/sqlite-kv-store.d.ts.map +1 -0
  4266. package/dist/utils/sqlite-kv-store.js +229 -0
  4267. package/dist/utils/sqlite-kv-store.js.map +1 -0
  4268. package/dist/utils/sqlite-store-init.d.ts +33 -0
  4269. package/dist/utils/sqlite-store-init.d.ts.map +1 -0
  4270. package/dist/utils/sqlite-store-init.js +31 -0
  4271. package/dist/utils/sqlite-store-init.js.map +1 -0
  4272. package/dist/utils/stub-detection.d.ts +18 -0
  4273. package/dist/utils/stub-detection.d.ts.map +1 -0
  4274. package/dist/utils/stub-detection.js +32 -0
  4275. package/dist/utils/stub-detection.js.map +1 -0
  4276. package/dist/utils/transcript-shrinker.d.ts +51 -0
  4277. package/dist/utils/transcript-shrinker.d.ts.map +1 -0
  4278. package/dist/utils/transcript-shrinker.js +124 -0
  4279. package/dist/utils/transcript-shrinker.js.map +1 -0
  4280. package/dist/utils/trusted-workspaces.d.ts +106 -0
  4281. package/dist/utils/trusted-workspaces.d.ts.map +1 -0
  4282. package/dist/utils/trusted-workspaces.js +175 -0
  4283. package/dist/utils/trusted-workspaces.js.map +1 -0
  4284. package/dist/utils/vision-ocr.d.ts +46 -0
  4285. package/dist/utils/vision-ocr.d.ts.map +1 -0
  4286. package/dist/utils/vision-ocr.js +225 -0
  4287. package/dist/utils/vision-ocr.js.map +1 -0
  4288. package/dist/utils/wasm-bypass.d.ts +23 -0
  4289. package/dist/utils/wasm-bypass.d.ts.map +1 -0
  4290. package/dist/utils/wasm-bypass.js +63 -0
  4291. package/dist/utils/wasm-bypass.js.map +1 -0
  4292. package/dist/utils/wotann-home.d.ts +39 -0
  4293. package/dist/utils/wotann-home.d.ts.map +1 -0
  4294. package/dist/utils/wotann-home.js +49 -0
  4295. package/dist/utils/wotann-home.js.map +1 -0
  4296. package/dist/verification/index.d.ts +56 -0
  4297. package/dist/verification/index.d.ts.map +1 -0
  4298. package/dist/verification/index.js +86 -0
  4299. package/dist/verification/index.js.map +1 -0
  4300. package/dist/verification/judge-adapter.d.ts +32 -0
  4301. package/dist/verification/judge-adapter.d.ts.map +1 -0
  4302. package/dist/verification/judge-adapter.js +72 -0
  4303. package/dist/verification/judge-adapter.js.map +1 -0
  4304. package/dist/verification/pre-commit.d.ts +22 -0
  4305. package/dist/verification/pre-commit.d.ts.map +1 -0
  4306. package/dist/verification/pre-commit.js +66 -0
  4307. package/dist/verification/pre-commit.js.map +1 -0
  4308. package/dist/verification/strategies/cove-wrapper.d.ts +23 -0
  4309. package/dist/verification/strategies/cove-wrapper.d.ts.map +1 -0
  4310. package/dist/verification/strategies/cove-wrapper.js +108 -0
  4311. package/dist/verification/strategies/cove-wrapper.js.map +1 -0
  4312. package/dist/verification/strategies/faithfulness.d.ts +15 -0
  4313. package/dist/verification/strategies/faithfulness.d.ts.map +1 -0
  4314. package/dist/verification/strategies/faithfulness.js +102 -0
  4315. package/dist/verification/strategies/faithfulness.js.map +1 -0
  4316. package/dist/verification/strategies/format.d.ts +16 -0
  4317. package/dist/verification/strategies/format.d.ts.map +1 -0
  4318. package/dist/verification/strategies/format.js +116 -0
  4319. package/dist/verification/strategies/format.js.map +1 -0
  4320. package/dist/verification/strategies/four-perspective-wrapper.d.ts +21 -0
  4321. package/dist/verification/strategies/four-perspective-wrapper.d.ts.map +1 -0
  4322. package/dist/verification/strategies/four-perspective-wrapper.js +109 -0
  4323. package/dist/verification/strategies/four-perspective-wrapper.js.map +1 -0
  4324. package/dist/verification/strategies/guardian-wrapper.d.ts +20 -0
  4325. package/dist/verification/strategies/guardian-wrapper.d.ts.map +1 -0
  4326. package/dist/verification/strategies/guardian-wrapper.js +78 -0
  4327. package/dist/verification/strategies/guardian-wrapper.js.map +1 -0
  4328. package/dist/verification/strategies/hallucination.d.ts +25 -0
  4329. package/dist/verification/strategies/hallucination.d.ts.map +1 -0
  4330. package/dist/verification/strategies/hallucination.js +153 -0
  4331. package/dist/verification/strategies/hallucination.js.map +1 -0
  4332. package/dist/verification/strategies/plan-action-match.d.ts +16 -0
  4333. package/dist/verification/strategies/plan-action-match.d.ts.map +1 -0
  4334. package/dist/verification/strategies/plan-action-match.js +120 -0
  4335. package/dist/verification/strategies/plan-action-match.js.map +1 -0
  4336. package/dist/verification/strategies/safety.d.ts +18 -0
  4337. package/dist/verification/strategies/safety.d.ts.map +1 -0
  4338. package/dist/verification/strategies/safety.js +115 -0
  4339. package/dist/verification/strategies/safety.js.map +1 -0
  4340. package/dist/verification/types.d.ts +201 -0
  4341. package/dist/verification/types.d.ts.map +1 -0
  4342. package/dist/verification/types.js +42 -0
  4343. package/dist/verification/types.js.map +1 -0
  4344. package/dist/verification/verifier-engine.d.ts +36 -0
  4345. package/dist/verification/verifier-engine.d.ts.map +1 -0
  4346. package/dist/verification/verifier-engine.js +226 -0
  4347. package/dist/verification/verifier-engine.js.map +1 -0
  4348. package/dist/vision/cache.d.ts +50 -0
  4349. package/dist/vision/cache.d.ts.map +1 -0
  4350. package/dist/vision/cache.js +95 -0
  4351. package/dist/vision/cache.js.map +1 -0
  4352. package/dist/vision/ingest.d.ts +61 -0
  4353. package/dist/vision/ingest.d.ts.map +1 -0
  4354. package/dist/vision/ingest.js +162 -0
  4355. package/dist/vision/ingest.js.map +1 -0
  4356. package/dist/vision/keyframes.d.ts +53 -0
  4357. package/dist/vision/keyframes.d.ts.map +1 -0
  4358. package/dist/vision/keyframes.js +203 -0
  4359. package/dist/vision/keyframes.js.map +1 -0
  4360. package/dist/vision/mime-sniff.d.ts +38 -0
  4361. package/dist/vision/mime-sniff.d.ts.map +1 -0
  4362. package/dist/vision/mime-sniff.js +55 -0
  4363. package/dist/vision/mime-sniff.js.map +1 -0
  4364. package/dist/vision/resize.d.ts +60 -0
  4365. package/dist/vision/resize.d.ts.map +1 -0
  4366. package/dist/vision/resize.js +138 -0
  4367. package/dist/vision/resize.js.map +1 -0
  4368. package/dist/vision/size-policy.d.ts +53 -0
  4369. package/dist/vision/size-policy.d.ts.map +1 -0
  4370. package/dist/vision/size-policy.js +159 -0
  4371. package/dist/vision/size-policy.js.map +1 -0
  4372. package/dist/vision/types.d.ts +119 -0
  4373. package/dist/vision/types.d.ts.map +1 -0
  4374. package/dist/vision/types.js +41 -0
  4375. package/dist/vision/types.js.map +1 -0
  4376. package/dist/voice/edge-tts-backend.d.ts +65 -0
  4377. package/dist/voice/edge-tts-backend.d.ts.map +1 -0
  4378. package/dist/voice/edge-tts-backend.js +150 -0
  4379. package/dist/voice/edge-tts-backend.js.map +1 -0
  4380. package/dist/voice/stt-detector.d.ts +100 -0
  4381. package/dist/voice/stt-detector.d.ts.map +1 -0
  4382. package/dist/voice/stt-detector.js +484 -0
  4383. package/dist/voice/stt-detector.js.map +1 -0
  4384. package/dist/voice/tts-engine.d.ts +123 -0
  4385. package/dist/voice/tts-engine.d.ts.map +1 -0
  4386. package/dist/voice/tts-engine.js +602 -0
  4387. package/dist/voice/tts-engine.js.map +1 -0
  4388. package/dist/voice/vibevoice-backend.d.ts +113 -0
  4389. package/dist/voice/vibevoice-backend.d.ts.map +1 -0
  4390. package/dist/voice/vibevoice-backend.js +340 -0
  4391. package/dist/voice/vibevoice-backend.js.map +1 -0
  4392. package/dist/voice/voice-mode.d.ts +96 -0
  4393. package/dist/voice/voice-mode.d.ts.map +1 -0
  4394. package/dist/voice/voice-mode.js +627 -0
  4395. package/dist/voice/voice-mode.js.map +1 -0
  4396. package/dist/voice/voice-pipeline.d.ts +140 -0
  4397. package/dist/voice/voice-pipeline.d.ts.map +1 -0
  4398. package/dist/voice/voice-pipeline.js +658 -0
  4399. package/dist/voice/voice-pipeline.js.map +1 -0
  4400. package/dist/workflows/workflow-runner.d.ts +96 -0
  4401. package/dist/workflows/workflow-runner.d.ts.map +1 -0
  4402. package/dist/workflows/workflow-runner.js +362 -0
  4403. package/dist/workflows/workflow-runner.js.map +1 -0
  4404. package/install.sh +261 -0
  4405. package/package.json +121 -0
  4406. package/skills/a2ui.md +37 -0
  4407. package/skills/agent-autonomy-kit.md +168 -0
  4408. package/skills/agent-reach.md +58 -0
  4409. package/skills/ai-humanizer.md +204 -0
  4410. package/skills/ai-slop-cleaner.md +63 -0
  4411. package/skills/angular-architect.md +67 -0
  4412. package/skills/anthropic-imports/docx-create.md +61 -0
  4413. package/skills/anthropic-imports/pdf-create.md +63 -0
  4414. package/skills/anthropic-imports/pptx-create.md +61 -0
  4415. package/skills/anthropic-imports/xlsx-create.md +67 -0
  4416. package/skills/api-design-rest.md +112 -0
  4417. package/skills/api-design.md +40 -0
  4418. package/skills/batch-processing.md +36 -0
  4419. package/skills/benchmark-engineering.md +45 -0
  4420. package/skills/boost-prompt.md +182 -0
  4421. package/skills/branch-management.md +57 -0
  4422. package/skills/brooks-lint.md +101 -0
  4423. package/skills/canvas-mode.md +40 -0
  4424. package/skills/capability-evolver.md +141 -0
  4425. package/skills/chain-of-thought.md +48 -0
  4426. package/skills/cicd-engineer.md +68 -0
  4427. package/skills/cloud-architect.md +59 -0
  4428. package/skills/code-review-deep.md +82 -0
  4429. package/skills/code-reviewer.md +32 -0
  4430. package/skills/code-simplifier.md +35 -0
  4431. package/skills/codebase-recon.md +101 -0
  4432. package/skills/command-block-replay.md +58 -0
  4433. package/skills/compaction-ui-enhancements.md +169 -0
  4434. package/skills/compare-providers.md +66 -0
  4435. package/skills/compliance-checker.md +62 -0
  4436. package/skills/constitutional-ai.md +44 -0
  4437. package/skills/context-engine.md +186 -0
  4438. package/skills/context-management.md +59 -0
  4439. package/skills/conventional-commit.md +43 -0
  4440. package/skills/cost-intelligence.md +50 -0
  4441. package/skills/cpp-pro.md +72 -0
  4442. package/skills/csharp-developer.md +70 -0
  4443. package/skills/debug-hypothesis-tree.md +56 -0
  4444. package/skills/dependency-auditor.md +50 -0
  4445. package/skills/design-doc-template.md +82 -0
  4446. package/skills/django-expert.md +66 -0
  4447. package/skills/docker-expert.md +41 -0
  4448. package/skills/documentation.md +65 -0
  4449. package/skills/dotnet-core.md +69 -0
  4450. package/skills/dream-cycle.md +59 -0
  4451. package/skills/elite-longterm-memory.md +144 -0
  4452. package/skills/evaluate-prompt.md +71 -0
  4453. package/skills/event-driven.md +21 -0
  4454. package/skills/example-tool-rules.md +56 -0
  4455. package/skills/express-api.md +70 -0
  4456. package/skills/fastapi-expert.md +76 -0
  4457. package/skills/file-based-planning.md +49 -0
  4458. package/skills/find-missing-tests.md +75 -0
  4459. package/skills/flutter-expert.md +23 -0
  4460. package/skills/frontend-design-system.md +35 -0
  4461. package/skills/generator-critic-loop.md +63 -0
  4462. package/skills/golang-pro.md +26 -0
  4463. package/skills/governance.md +175 -0
  4464. package/skills/incident-postmortem.md +89 -0
  4465. package/skills/incident-response.md +196 -0
  4466. package/skills/integration-testing.md +67 -0
  4467. package/skills/java-architect.md +23 -0
  4468. package/skills/karpathy-principles.md +62 -0
  4469. package/skills/kotlin-specialist.md +64 -0
  4470. package/skills/kubernetes-specialist.md +68 -0
  4471. package/skills/lsp-operations.md +40 -0
  4472. package/skills/marketing-conversion-ops.md +36 -0
  4473. package/skills/marketing-expert-panel.md +33 -0
  4474. package/skills/marketing-growth-engine.md +33 -0
  4475. package/skills/marketing-outbound-engine.md +27 -0
  4476. package/skills/marketing-seo-ops.md +32 -0
  4477. package/skills/mcp-marketplace.md +51 -0
  4478. package/skills/memory-stack.md +24 -0
  4479. package/skills/microservices-architect.md +60 -0
  4480. package/skills/mongodb-expert.md +58 -0
  4481. package/skills/monitoring-expert.md +69 -0
  4482. package/skills/multi-source-research.md +56 -0
  4483. package/skills/nestjs-expert.md +69 -0
  4484. package/skills/nextjs-developer.md +23 -0
  4485. package/skills/pack-astro-static.md +225 -0
  4486. package/skills/pack-expo.md +304 -0
  4487. package/skills/pack-hono-react-edge.md +237 -0
  4488. package/skills/pack-nextjs-app-router.md +219 -0
  4489. package/skills/pentest-patterns.md +61 -0
  4490. package/skills/performance-profiler.md +22 -0
  4491. package/skills/php-pro.md +78 -0
  4492. package/skills/playwright-expert.md +23 -0
  4493. package/skills/postgres-pro.md +61 -0
  4494. package/skills/postmortem-template.md +89 -0
  4495. package/skills/pr-creation.md +64 -0
  4496. package/skills/proactive-agent-v3.md +138 -0
  4497. package/skills/prompt-master.md +61 -0
  4498. package/skills/prompt-testing.md +58 -0
  4499. package/skills/python-pro.md +33 -0
  4500. package/skills/rails-expert.md +23 -0
  4501. package/skills/react-expert.md +34 -0
  4502. package/skills/react-native-expert.md +70 -0
  4503. package/skills/redis-expert.md +58 -0
  4504. package/skills/refactor-safely.md +73 -0
  4505. package/skills/refactor-with-tests.md +57 -0
  4506. package/skills/rust-engineer.md +24 -0
  4507. package/skills/scientific-method.md +54 -0
  4508. package/skills/search-first.md +32 -0
  4509. package/skills/security-recon-checklist.md +63 -0
  4510. package/skills/security-reviewer.md +37 -0
  4511. package/skills/self-healing.md +52 -0
  4512. package/skills/setup-audit.md +56 -0
  4513. package/skills/skeleton-of-thought.md +53 -0
  4514. package/skills/skill-creator.md +28 -0
  4515. package/skills/spec-driven-workflow.md +23 -0
  4516. package/skills/spring-boot.md +67 -0
  4517. package/skills/sql-pro.md +34 -0
  4518. package/skills/superpowers-dispatcher.md +234 -0
  4519. package/skills/svelte-expert.md +66 -0
  4520. package/skills/swift-expert.md +77 -0
  4521. package/skills/system-design-interview.md +69 -0
  4522. package/skills/system-design.md +58 -0
  4523. package/skills/systematic-debugging.md +33 -0
  4524. package/skills/tdd-workflow.md +32 -0
  4525. package/skills/terraform-engineer.md +72 -0
  4526. package/skills/think-in-code.md +147 -0
  4527. package/skills/trace-analysis.md +65 -0
  4528. package/skills/tree-search.md +21 -0
  4529. package/skills/turing-pyramid.md +113 -0
  4530. package/skills/typescript-deep.md +70 -0
  4531. package/skills/typescript-pro.md +33 -0
  4532. package/skills/ultraplan.md +61 -0
  4533. package/skills/vue-expert.md +71 -0
  4534. package/skills/web-scraper.md +35 -0
@@ -0,0 +1,3571 @@
1
+ /**
2
+ * SQLite memory store with FTS5 full-text search.
3
+ * 8-layer unified memory system per §14 and MEMORY_ARCHITECTURE.md.
4
+ *
5
+ * LAYERS:
6
+ * 1. Auto-Capture — every tool call, file read, command output
7
+ * 2. Core Blocks — user/feedback/project/reference/cases/patterns/decisions/issues
8
+ * 3. Working Memory — current session state, recent context
9
+ * 4. Knowledge Graph — entity relationships, bi-temporal facts
10
+ * 5. Archival — long-term storage with temporal decay
11
+ * 6. Recall — retrieval with skeptical verification
12
+ * 7. Team Memory — shared across agents/sessions
13
+ * 8. Proactive Context — anticipated context based on patterns
14
+ *
15
+ * FEATURES:
16
+ * - FTS5 full-text search across all layers
17
+ * - Skeptical memory: verify before acting on recalled memories
18
+ * - Consolidation lock: prevent concurrent autoDream sessions
19
+ * - Decision log: track architectural/design decisions with rationale
20
+ * - Temporal decay: older memories get lower relevance scores
21
+ * - Privacy tags: mark sensitive memories for restricted access
22
+ */
23
+ import Database from "better-sqlite3";
24
+ import { join } from "node:path";
25
+ import { mkdirSync, existsSync, writeFileSync, readFileSync, unlinkSync } from "node:fs";
26
+ import { randomUUID } from "node:crypto";
27
+ import { writeFileAtomicSyncBestEffort } from "../utils/atomic-io.js";
28
+ import { deriveIngestTimestamps } from "./dual-timestamp.js";
29
+ import { clampContextTokens, cleanContext, buildContextualChunk, buildBatchedContextualChunks, createLlmContextGenerator, } from "./contextual-embeddings.js";
30
+ import { fromStoreFields as palaceFromStoreFields, toStoreFields as palaceToStoreFields, isUnder as palaceIsUnder, parsePath as palaceParsePath, formatPath as palaceFormatPath, listHalls as palaceListHalls, listWings as palaceListWings, listRooms as palaceListRooms, countTree as palaceCountTree, renderTree as palaceRenderTree, } from "./mem-palace.js";
31
+ import { hybridFusion as rrfFusion, temporalFiltered, metadataOnly, summaryOnly, } from "./extended-search-types.js";
32
+ import { EntitySchema } from "./entity-types.js";
33
+ import { createHeuristicClassifier, resolveLatest, partitionByKind } from "./relationship-types.js";
34
+ import { validateDate, validateDateOrNull, } from "./bi-temporal-edges.js";
35
+ import { IncrementalIndexer, computeContentSha, } from "./incremental-indexer.js";
36
+ import { hybridSearch as hybridRetrieverSearch, createLexicalRetriever, createVectorRetriever, } from "./hybrid-retrieval.js";
37
+ import { MemvidBackend, } from "./memvid-backend.js";
38
+ import { SemanticCache, bigramEmbedding, } from "./semantic-cache.js";
39
+ import { MemoryBenchmark } from "./memory-benchmark.js";
40
+ import { MemoryToolkit, } from "./memory-tools.js";
41
+ import { createTEMPR, } from "./tempr.js";
42
+ import { createHeuristicCrossEncoder } from "./cross-encoder.js";
43
+ // V9 T1.3 — sqlite-vec backend (FATAL orphan). Loaded opt-in via
44
+ // `WOTANN_SQLITE_VEC=1` env var because the native `sqlite-vec`
45
+ // extension isn't bundled by default; loading is synchronous when
46
+ // the extension is available.
47
+ import { createSqliteVecBackend, isSqliteVecAvailable, } from "./sqlite-vec-backend.js";
48
+ // Asymmetric embedding prefixes — model-aware text shaping inspired by
49
+ // LightRAG's `embedding-prefixes` branch (HKUDS, merged 2026-04-26).
50
+ // Modern instruction-tuned encoders (BGE / Qwen3-Embedding / E5) score
51
+ // noticeably higher when queries get one prefix and docs get another.
52
+ // Gated behind `WOTANN_ASYMMETRIC_EMBEDDINGS=1` so existing un-prefixed
53
+ // indexes keep working unchanged. See ./embedding-profiles.ts.
54
+ import { applyDocPrefix, applyQueryPrefix, getEmbeddingProfile, isAsymmetricEmbeddingsEnabled, } from "./embedding-profiles.js";
55
+ // V9 T1.4 — ONNX cross-encoder (FATAL orphan). Session loading is
56
+ // async (`loadMiniLmSession`) so the member field is populated post-
57
+ // construction via `attachOnnxCrossEncoder()`. Baseline remains
58
+ // the heuristic encoder for sync callers.
59
+ import { createOnnxCrossEncoder, isMiniLmModelAvailable, isOnnxRuntimeAvailable, loadMiniLmSession, } from "./onnx-cross-encoder.js";
60
+ import { createDefaultRetrievalRegistry, } from "./retrieval-registry.js";
61
+ // V9 T14.2 — opt-in retrieval strategies. Each is a heavy / experimental
62
+ // retriever that is OFF by default; callers opt in via
63
+ // `registerOptionalStrategies(opts)`. The orphan modules each ship a
64
+ // pure function (asmr voter, Louvain community detector, persona tree
65
+ // builder); the wrappers below adapt them onto the RetrievalMode
66
+ // contract so the existing dispatch path (`searchWithMode`) drives them.
67
+ import { runAsmrVoter } from "./asmr-voter.js";
68
+ import { detectCommunities, communityOf } from "./community-detection.js";
69
+ import { buildPersonaTree, walkPersonaTree } from "./persona-tree.js";
70
+ export class MemoryStore {
71
+ /** MemoryProvider contract: stable identifier for the SQLite + FTS5 backend. */
72
+ name = "sqlite";
73
+ /** MemoryProvider contract: semver of the MemoryStore implementation. */
74
+ version = "1.0.0";
75
+ db;
76
+ dbPath;
77
+ /**
78
+ * Optional synchronous contextual-retrieval generator. When set, insert()
79
+ * prepends a ~50-token chunk-context to the FTS-indexed value per
80
+ * Anthropic's 2024 contextual retrieval (+30-50% recall on paraphrase).
81
+ * Pure sync — LLM-backed generators should pre-render async context and
82
+ * capture it in the closure. Null = disabled (honest pass-through).
83
+ */
84
+ contextGenerator = null;
85
+ /** Install or clear the contextual-embedding generator used by insert(). */
86
+ setContextGenerator(gen) {
87
+ this.contextGenerator = gen;
88
+ }
89
+ /**
90
+ * V9 T1.3 — Optional sqlite-vec backend for native dense-vector
91
+ * retrieval in TEMPR's vector channel. Null until `attachVectorBackend()`
92
+ * lazy-initializes it (or if the native extension isn't loadable).
93
+ * When non-null, `temprSearch()` uses it as the default `opts.vectorBackend`
94
+ * instead of the FTS5+cosine fallback.
95
+ *
96
+ * Population is the caller's responsibility — use `upsertEmbedding()`
97
+ * below as new entries arrive with their embeddings. See V9 T1.3 for
98
+ * the full persistent-index design.
99
+ */
100
+ vectorBackend = null;
101
+ /**
102
+ * V9 T1.4 — Optional ONNX-backed cross-encoder for TEMPR rerank.
103
+ * Upgraded from the heuristic baseline via `attachOnnxCrossEncoder()`
104
+ * (async — session load is async). `temprSearch()` uses this as the
105
+ * default `opts.crossEncoder` when caller doesn't override.
106
+ */
107
+ defaultCrossEncoder = createHeuristicCrossEncoder();
108
+ constructor(dbPath) {
109
+ this.dbPath = dbPath;
110
+ const dir = join(dbPath, "..");
111
+ if (!existsSync(dir)) {
112
+ mkdirSync(dir, { recursive: true });
113
+ }
114
+ this.db = new Database(dbPath);
115
+ // Wave 6.5-UU (H-21): standard PRAGMA bundle. busy_timeout = 5000 lets
116
+ // concurrent writers wait up to 5s for the lock instead of throwing
117
+ // SQLITE_BUSY immediately (the better-sqlite3 default is 0ms).
118
+ // synchronous = NORMAL keeps writes durable across app crashes at ~10x
119
+ // the throughput of FULL. foreign_keys = ON enables CASCADE.
120
+ this.db.pragma("busy_timeout = 5000");
121
+ this.db.pragma("journal_mode = WAL");
122
+ this.db.pragma("synchronous = NORMAL");
123
+ this.db.pragma("foreign_keys = ON");
124
+ this.db.pragma("user_version"); // read for migration check
125
+ this.initializeSchema();
126
+ }
127
+ /**
128
+ * MemoryProvider contract. Idempotent — schema is created in the
129
+ * constructor via `initializeSchema()`, so this is a no-op for
130
+ * already-constructed instances. Exposed for contract conformance
131
+ * with async backends that defer connection/table creation.
132
+ */
133
+ initialize() {
134
+ // Schema already created in constructor. Re-running is safe
135
+ // (all DDL is IF NOT EXISTS) but unnecessary.
136
+ }
137
+ /**
138
+ * V9 T1.3 — Attach the sqlite-vec backend. Call once post-construction
139
+ * when the caller knows their embedding dimension. Safe to call
140
+ * multiple times — idempotent (attaches once). When sqlite-vec isn't
141
+ * available, silently keeps `vectorBackend: null` so `temprSearch`
142
+ * falls back to the FTS5+cosine path.
143
+ *
144
+ * @param dimensions Embedding dimension (384 for MiniLM-L-6, 768 for L-12).
145
+ * @param tableName Optional vec0 table name override.
146
+ * @returns true when the backend was attached; false on unavailability.
147
+ */
148
+ attachVectorBackend(dimensions, tableName) {
149
+ if (this.vectorBackend !== null)
150
+ return true; // idempotent
151
+ if (!isSqliteVecAvailable())
152
+ return false;
153
+ try {
154
+ this.vectorBackend = createSqliteVecBackend({
155
+ db: this.db,
156
+ dimensions,
157
+ ...(tableName ? { tableName } : {}),
158
+ });
159
+ return true;
160
+ }
161
+ catch {
162
+ // Extension loaded but table creation failed (e.g. dimension
163
+ // mismatch against an existing vec0 table). Honest null.
164
+ this.vectorBackend = null;
165
+ return false;
166
+ }
167
+ }
168
+ /**
169
+ * V9 T1.4 — Upgrade the default cross-encoder from heuristic to
170
+ * ONNX-backed MiniLM rerank. Async because `loadMiniLmSession`
171
+ * loads the native `onnxruntime-node` session asynchronously.
172
+ * Safe to call at any time — `temprSearch` reads `this.defaultCrossEncoder`
173
+ * per-call so the swap takes effect on the next invocation.
174
+ *
175
+ * @param modelPath Optional override for the MiniLM .onnx file.
176
+ * @returns true when ONNX was attached; false when runtime/model absent.
177
+ */
178
+ async attachOnnxCrossEncoder(modelPath) {
179
+ if (!isOnnxRuntimeAvailable() || !isMiniLmModelAvailable(modelPath)) {
180
+ return false;
181
+ }
182
+ try {
183
+ const session = await loadMiniLmSession(modelPath);
184
+ if (!session)
185
+ return false;
186
+ this.defaultCrossEncoder = createOnnxCrossEncoder({ session });
187
+ return true;
188
+ }
189
+ catch {
190
+ // Keep the heuristic baseline on any ONNX failure.
191
+ return false;
192
+ }
193
+ }
194
+ /**
195
+ * V9 T1.3 companion — push an embedding into the vec0 index for a
196
+ * given memory entry. No-op when the backend isn't attached. Caller
197
+ * generates the embedding using its chosen embedder so the store
198
+ * doesn't pull an embedder dependency. Idempotent on duplicate id.
199
+ *
200
+ * Asymmetric-prefix port (LightRAG `embedding-prefixes`): the caller
201
+ * is responsible for applying the doc prefix BEFORE generating the
202
+ * vector. A typical wiring looks like:
203
+ *
204
+ * import { applyDocPrefix, getEmbeddingProfile,
205
+ * isAsymmetricEmbeddingsEnabled } from "./embedding-profiles.js";
206
+ * const profile = isAsymmetricEmbeddingsEnabled()
207
+ * ? getEmbeddingProfile(modelName)
208
+ * : null;
209
+ * const vec = await embed(applyDocPrefix(profile, entry.value));
210
+ * store.upsertEmbedding(entry.id, vec);
211
+ *
212
+ * NOTE: turning the env-var gate ON for an existing index that was
213
+ * built without prefixes will skew similarity scores at query time.
214
+ * Rebuild the vec_embeddings table after enabling. See
215
+ * embedding-profiles.ts header for the full rationale.
216
+ */
217
+ upsertEmbedding(id, vector) {
218
+ if (!this.vectorBackend)
219
+ return false;
220
+ try {
221
+ this.vectorBackend.upsert(id, vector);
222
+ return true;
223
+ }
224
+ catch {
225
+ return false;
226
+ }
227
+ }
228
+ /**
229
+ * Accessor for the attached vectorBackend (null when not attached).
230
+ * Used by TEMPR-aware callers to pass `opts.vectorBackend` explicitly
231
+ * OR to confirm availability before generating an embedding. See
232
+ * `temprSearch()` for default-injection behavior.
233
+ */
234
+ getVectorBackend() {
235
+ return this.vectorBackend;
236
+ }
237
+ /** Accessor for the default cross-encoder. Callers can override via
238
+ * `temprSearch`'s `opts.crossEncoder`. */
239
+ getDefaultCrossEncoder() {
240
+ return this.defaultCrossEncoder;
241
+ }
242
+ initializeSchema() {
243
+ this.db.exec(`
244
+ CREATE TABLE IF NOT EXISTS memory_entries (
245
+ id TEXT PRIMARY KEY,
246
+ layer TEXT NOT NULL,
247
+ block_type TEXT NOT NULL,
248
+ key TEXT NOT NULL,
249
+ value TEXT NOT NULL,
250
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
251
+ updated_at TEXT NOT NULL DEFAULT (datetime('now')),
252
+ session_id TEXT,
253
+ verified INTEGER NOT NULL DEFAULT 0,
254
+ archived INTEGER NOT NULL DEFAULT 0,
255
+ confidence REAL DEFAULT 1.0,
256
+ tags TEXT DEFAULT '',
257
+ access_count INTEGER DEFAULT 0,
258
+ last_accessed TEXT,
259
+ source_type TEXT DEFAULT 'auto_capture',
260
+ source_file TEXT,
261
+ source_command TEXT,
262
+ verified_at TEXT,
263
+ verified_by TEXT,
264
+ freshness_score REAL NOT NULL DEFAULT 1.0,
265
+ confidence_level REAL NOT NULL DEFAULT 0.5,
266
+ last_verified_at TEXT,
267
+ verification_status TEXT NOT NULL DEFAULT 'unverified',
268
+ domain TEXT NOT NULL DEFAULT '',
269
+ topic TEXT NOT NULL DEFAULT ''
270
+ );
271
+
272
+ CREATE INDEX IF NOT EXISTS idx_memory_layer ON memory_entries(layer);
273
+ CREATE INDEX IF NOT EXISTS idx_memory_block ON memory_entries(block_type);
274
+ CREATE INDEX IF NOT EXISTS idx_memory_key ON memory_entries(key);
275
+ CREATE INDEX IF NOT EXISTS idx_memory_session ON memory_entries(session_id);
276
+
277
+ CREATE VIRTUAL TABLE IF NOT EXISTS memory_fts USING fts5(
278
+ key, value,
279
+ content='memory_entries',
280
+ content_rowid='rowid'
281
+ );
282
+
283
+ CREATE TRIGGER IF NOT EXISTS memory_ai AFTER INSERT ON memory_entries BEGIN
284
+ INSERT INTO memory_fts(rowid, key, value) VALUES (new.rowid, new.key, new.value);
285
+ END;
286
+ CREATE TRIGGER IF NOT EXISTS memory_au AFTER UPDATE ON memory_entries BEGIN
287
+ INSERT INTO memory_fts(memory_fts, rowid, key, value) VALUES('delete', old.rowid, old.key, old.value);
288
+ INSERT INTO memory_fts(rowid, key, value) VALUES (new.rowid, new.key, new.value);
289
+ END;
290
+ CREATE TRIGGER IF NOT EXISTS memory_ad AFTER DELETE ON memory_entries BEGIN
291
+ INSERT INTO memory_fts(memory_fts, rowid, key, value) VALUES('delete', old.rowid, old.key, old.value);
292
+ END;
293
+
294
+ CREATE TABLE IF NOT EXISTS knowledge_nodes (
295
+ id TEXT PRIMARY KEY,
296
+ entity TEXT NOT NULL,
297
+ entity_type TEXT NOT NULL,
298
+ properties TEXT DEFAULT '{}',
299
+ valid_from TEXT NOT NULL DEFAULT (datetime('now')),
300
+ valid_to TEXT,
301
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
302
+ );
303
+ CREATE TABLE IF NOT EXISTS knowledge_edges (
304
+ id TEXT PRIMARY KEY,
305
+ source_id TEXT NOT NULL REFERENCES knowledge_nodes(id),
306
+ target_id TEXT NOT NULL REFERENCES knowledge_nodes(id),
307
+ relation TEXT NOT NULL,
308
+ weight REAL NOT NULL DEFAULT 1.0,
309
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
310
+ );
311
+ CREATE INDEX IF NOT EXISTS idx_kg_entity ON knowledge_nodes(entity);
312
+ CREATE INDEX IF NOT EXISTS idx_kg_edges_src ON knowledge_edges(source_id);
313
+ CREATE INDEX IF NOT EXISTS idx_kg_edges_tgt ON knowledge_edges(target_id);
314
+
315
+ CREATE TABLE IF NOT EXISTS team_memory (
316
+ id TEXT PRIMARY KEY,
317
+ agent_id TEXT NOT NULL,
318
+ key TEXT NOT NULL,
319
+ value TEXT NOT NULL,
320
+ shared INTEGER NOT NULL DEFAULT 1,
321
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
322
+ updated_at TEXT NOT NULL DEFAULT (datetime('now'))
323
+ );
324
+ CREATE INDEX IF NOT EXISTS idx_team_agent ON team_memory(agent_id);
325
+
326
+ CREATE TABLE IF NOT EXISTS working_memory (
327
+ id TEXT PRIMARY KEY,
328
+ session_id TEXT NOT NULL,
329
+ key TEXT NOT NULL,
330
+ value TEXT NOT NULL,
331
+ importance REAL NOT NULL DEFAULT 0.5,
332
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
333
+ expires_at TEXT
334
+ );
335
+ CREATE INDEX IF NOT EXISTS idx_working_session ON working_memory(session_id);
336
+
337
+ CREATE TABLE IF NOT EXISTS decision_log (
338
+ id TEXT PRIMARY KEY,
339
+ decision TEXT NOT NULL,
340
+ rationale TEXT NOT NULL,
341
+ alternatives TEXT,
342
+ constraints TEXT,
343
+ stakeholders TEXT,
344
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
345
+ session_id TEXT
346
+ );
347
+
348
+ CREATE TABLE IF NOT EXISTS auto_capture (
349
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
350
+ event_type TEXT NOT NULL,
351
+ tool_name TEXT,
352
+ content TEXT NOT NULL,
353
+ session_id TEXT,
354
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
355
+ );
356
+ CREATE INDEX IF NOT EXISTS idx_capture_session ON auto_capture(session_id);
357
+
358
+ CREATE TABLE IF NOT EXISTS verbatim_drawers (
359
+ id TEXT PRIMARY KEY,
360
+ entry_id TEXT REFERENCES memory_entries(id) ON DELETE SET NULL,
361
+ raw_content TEXT NOT NULL,
362
+ content_type TEXT NOT NULL DEFAULT 'conversation',
363
+ session_id TEXT,
364
+ domain TEXT NOT NULL DEFAULT '',
365
+ topic TEXT NOT NULL DEFAULT '',
366
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
367
+ );
368
+ CREATE INDEX IF NOT EXISTS idx_verbatim_entry ON verbatim_drawers(entry_id);
369
+ CREATE INDEX IF NOT EXISTS idx_verbatim_session ON verbatim_drawers(session_id);
370
+ CREATE INDEX IF NOT EXISTS idx_verbatim_domain ON verbatim_drawers(domain, topic);
371
+
372
+ CREATE VIRTUAL TABLE IF NOT EXISTS verbatim_fts USING fts5(
373
+ raw_content,
374
+ content='verbatim_drawers',
375
+ content_rowid='rowid'
376
+ );
377
+
378
+ CREATE TRIGGER IF NOT EXISTS verbatim_ai AFTER INSERT ON verbatim_drawers BEGIN
379
+ INSERT INTO verbatim_fts(rowid, raw_content) VALUES (new.rowid, new.raw_content);
380
+ END;
381
+ CREATE TRIGGER IF NOT EXISTS verbatim_au AFTER UPDATE ON verbatim_drawers BEGIN
382
+ INSERT INTO verbatim_fts(verbatim_fts, rowid, raw_content) VALUES('delete', old.rowid, old.raw_content);
383
+ INSERT INTO verbatim_fts(rowid, raw_content) VALUES (new.rowid, new.raw_content);
384
+ END;
385
+ CREATE TRIGGER IF NOT EXISTS verbatim_ad AFTER DELETE ON verbatim_drawers BEGIN
386
+ INSERT INTO verbatim_fts(verbatim_fts, rowid, raw_content) VALUES('delete', old.rowid, old.raw_content);
387
+ END;
388
+
389
+ CREATE TABLE IF NOT EXISTS memory_vectors (
390
+ entry_id TEXT PRIMARY KEY REFERENCES memory_entries(id) ON DELETE CASCADE,
391
+ embedding BLOB NOT NULL,
392
+ model TEXT NOT NULL DEFAULT 'local-trigram',
393
+ dimensions INTEGER NOT NULL DEFAULT 0,
394
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
395
+ );
396
+ CREATE INDEX IF NOT EXISTS idx_vectors_model ON memory_vectors(model);
397
+
398
+ CREATE TABLE IF NOT EXISTS memory_provenance_log (
399
+ id TEXT PRIMARY KEY,
400
+ entry_id TEXT NOT NULL REFERENCES memory_entries(id) ON DELETE CASCADE,
401
+ action TEXT NOT NULL,
402
+ old_value TEXT,
403
+ new_value TEXT,
404
+ actor TEXT,
405
+ reason TEXT,
406
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
407
+ );
408
+ CREATE INDEX IF NOT EXISTS idx_provenance_entry ON memory_provenance_log(entry_id);
409
+ CREATE INDEX IF NOT EXISTS idx_memory_source_type ON memory_entries(source_type);
410
+ CREATE INDEX IF NOT EXISTS idx_memory_source_file ON memory_entries(source_file);
411
+ `);
412
+ // ── Domain-Partitioned Search Migration (MemPalace R1) ──
413
+ // Add domain/topic columns for existing databases. +34% retrieval improvement
414
+ // from metadata filtering before FTS5 search (MemPalace: 60.9% → 94.8%).
415
+ this.migrateAddColumn("memory_entries", "domain", "TEXT NOT NULL DEFAULT ''");
416
+ this.migrateAddColumn("memory_entries", "topic", "TEXT NOT NULL DEFAULT ''");
417
+ this.db.prepare(`CREATE INDEX IF NOT EXISTS idx_memory_domain ON memory_entries(domain)`).run();
418
+ this.db.prepare(`CREATE INDEX IF NOT EXISTS idx_memory_topic ON memory_entries(topic)`).run();
419
+ this.db
420
+ .prepare(`CREATE INDEX IF NOT EXISTS idx_memory_domain_topic ON memory_entries(domain, topic)`)
421
+ .run();
422
+ // ── Auto-Capture Consolidation Tracking (Phase B Bug #1 fix) ──
423
+ // Without this column, every consolidation pass would re-process all
424
+ // auto_capture rows and create duplicate memory_entries. The column
425
+ // records the ISO-timestamp when a row was routed into the structured
426
+ // tables (memory_entries / decision_log / etc.). NULL = not yet
427
+ // consolidated.
428
+ this.migrateAddColumn("auto_capture", "consolidated_at", "TEXT");
429
+ this.db
430
+ .prepare(`CREATE INDEX IF NOT EXISTS idx_capture_consolidated ON auto_capture(consolidated_at)`)
431
+ .run();
432
+ // ── Temporal Validity Migration (MemPalace R2) ──
433
+ // Add valid_from/valid_to to knowledge_edges for bi-temporal fact queries.
434
+ this.migrateAddColumn("knowledge_edges", "valid_from", "TEXT NOT NULL DEFAULT (datetime('now'))");
435
+ this.migrateAddColumn("knowledge_edges", "valid_to", "TEXT");
436
+ this.db
437
+ .prepare(`CREATE INDEX IF NOT EXISTS idx_kg_edges_temporal ON knowledge_edges(valid_from, valid_to)`)
438
+ .run();
439
+ // ── Bi-Temporal Ingest Axis Migration (Phase 2 P1-M5, Zep/Graphiti port) ──
440
+ // Adds the SECOND time axis to knowledge_edges. The knowledge-time
441
+ // axis (valid_from/valid_to) was wired in M7; this migration adds
442
+ // the ingest-time axis (recorded_from/recorded_to) so callers can
443
+ // answer "what did WOTANN know about X on date Y?". Legacy rows
444
+ // default recorded_from = created_at so they behave as if inserted
445
+ // at creation time; recorded_to stays null (still known). This is
446
+ // non-breaking — existing readers (getActiveEdgesAt, etc.) ignore
447
+ // the new columns.
448
+ this.migrateAddColumn("knowledge_edges", "recorded_from", "TEXT NOT NULL DEFAULT (datetime('now'))");
449
+ this.migrateAddColumn("knowledge_edges", "recorded_to", "TEXT");
450
+ this.db
451
+ .prepare(`CREATE INDEX IF NOT EXISTS idx_kg_edges_recorded ON knowledge_edges(recorded_from, recorded_to)`)
452
+ .run();
453
+ // Back-fill legacy rows: set recorded_from = created_at where the
454
+ // ALTER TABLE default (datetime('now')) would otherwise stamp the
455
+ // migration time, not the original insert time. Only touches rows
456
+ // where recorded_from is equal to the default we just added (i.e.
457
+ // the ones we can't distinguish from genuine inserts). Safe because
458
+ // we only update when the stored value exceeds created_at — i.e.
459
+ // this row was materialized BEFORE the migration.
460
+ this.db
461
+ .prepare(`UPDATE knowledge_edges
462
+ SET recorded_from = created_at
463
+ WHERE recorded_from > created_at`)
464
+ .run();
465
+ // ── Dual-Timestamp Migration (Phase H Task 1) ──
466
+ // Records both WHEN the memory was written (document_date) and WHEN
467
+ // the referenced event happened (event_date). Enables queries like
468
+ // "what did we say last week about last year's launch?". Legacy rows
469
+ // leave event_date_source='' so readers can distinguish them from
470
+ // honestly-fallback rows.
471
+ this.migrateAddColumn("memory_entries", "document_date", "INTEGER");
472
+ this.migrateAddColumn("memory_entries", "event_date", "INTEGER");
473
+ this.migrateAddColumn("memory_entries", "event_date_uncertainty_ms", "INTEGER");
474
+ this.migrateAddColumn("memory_entries", "event_date_source", "TEXT NOT NULL DEFAULT ''");
475
+ this.db
476
+ .prepare(`CREATE INDEX IF NOT EXISTS idx_memory_event_date ON memory_entries(event_date)`)
477
+ .run();
478
+ this.db
479
+ .prepare(`CREATE INDEX IF NOT EXISTS idx_memory_document_date ON memory_entries(document_date)`)
480
+ .run();
481
+ // ── Typed Relationships Migration (Phase H Task 2) ──
482
+ // Typed edges between memory_entries with a kind in
483
+ // {updates,extends,derives,unknown}. Lets us answer "what is the
484
+ // CURRENT policy?" by walking updates forward from the root.
485
+ this.db
486
+ .prepare(`CREATE TABLE IF NOT EXISTS memory_relationships (
487
+ id TEXT PRIMARY KEY,
488
+ from_id TEXT NOT NULL,
489
+ to_id TEXT NOT NULL,
490
+ kind TEXT NOT NULL,
491
+ confidence REAL NOT NULL DEFAULT 0.5,
492
+ rationale TEXT,
493
+ invalidated_at INTEGER,
494
+ created_at INTEGER NOT NULL
495
+ )`)
496
+ .run();
497
+ this.db
498
+ .prepare(`CREATE INDEX IF NOT EXISTS idx_memrel_from ON memory_relationships(from_id)`)
499
+ .run();
500
+ this.db
501
+ .prepare(`CREATE INDEX IF NOT EXISTS idx_memrel_to ON memory_relationships(to_id)`)
502
+ .run();
503
+ this.db
504
+ .prepare(`CREATE INDEX IF NOT EXISTS idx_memrel_kind ON memory_relationships(kind)`)
505
+ .run();
506
+ }
507
+ /** @internal Migration helper — ONLY called with hardcoded literals.
508
+ *
509
+ * Wave 6.5-UU (H-23) — wrap PRAGMA + ALTER inside an explicit transaction
510
+ * so a SIGKILL between the existence check and the column add can't
511
+ * leave the DB half-migrated (column added but no committed marker).
512
+ * SQLite is internally transactional per-statement, but the *combination*
513
+ * of PRAGMA table_info + ALTER TABLE is not — without the transaction
514
+ * wrapper a crash between the two could let the next call see an
515
+ * already-added column and skip a follow-up step that depends on the
516
+ * write being committed end-to-end.
517
+ *
518
+ * Identifier validation runs BEFORE entering the transaction so a bad
519
+ * identifier doesn't open and immediately roll back a tx for nothing.
520
+ */
521
+ migrateAddColumn(table, column, definition) {
522
+ // Validate inputs match safe identifier patterns
523
+ const SAFE_IDENTIFIER = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
524
+ if (!SAFE_IDENTIFIER.test(table) || !SAFE_IDENTIFIER.test(column)) {
525
+ throw new Error(`Invalid SQL identifier: table="${table}", column="${column}"`);
526
+ }
527
+ // Definition can include type + constraints but must not contain semicolons or comments
528
+ if (/[;]|--/.test(definition)) {
529
+ throw new Error(`Invalid column definition: "${definition}"`);
530
+ }
531
+ this.db.transaction(() => {
532
+ const cols = this.db.prepare(`PRAGMA table_info(${table})`).all();
533
+ if (!cols.some((c) => c.name === column)) {
534
+ this.db.prepare(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`).run();
535
+ }
536
+ })();
537
+ }
538
+ // ── Layer 1: Auto-Capture ──────────────────────────────────
539
+ captureEvent(eventType, content, toolName, sessionId) {
540
+ this.db
541
+ .prepare(`
542
+ INSERT INTO auto_capture (event_type, tool_name, content, session_id) VALUES (?, ?, ?, ?)
543
+ `)
544
+ .run(eventType, toolName ?? null, content.slice(0, 2000), sessionId ?? null);
545
+ }
546
+ getRecentCaptures(sessionId, limit = 20) {
547
+ return this.db
548
+ .prepare(`
549
+ SELECT * FROM auto_capture WHERE session_id = ? ORDER BY created_at DESC LIMIT ?
550
+ `)
551
+ .all(sessionId, limit);
552
+ }
553
+ getAutoCaptureEntries(limit = 50, sessionId) {
554
+ const rows = sessionId
555
+ ? this.db
556
+ .prepare(`
557
+ SELECT * FROM auto_capture WHERE session_id = ? ORDER BY created_at DESC LIMIT ?
558
+ `)
559
+ .all(sessionId, limit)
560
+ : this.db
561
+ .prepare(`
562
+ SELECT * FROM auto_capture ORDER BY created_at DESC LIMIT ?
563
+ `)
564
+ .all(limit);
565
+ return rows.map((row) => ({
566
+ id: Number(row["id"] ?? 0),
567
+ eventType: row["event_type"],
568
+ toolName: row["tool_name"],
569
+ content: row["content"],
570
+ sessionId: row["session_id"],
571
+ createdAt: row["created_at"],
572
+ }));
573
+ }
574
+ /**
575
+ * Return auto_capture entries that have NOT yet been routed into the
576
+ * structured memory_entries / decision_log tables. Phase B Bug #1 fix.
577
+ *
578
+ * Consolidation uses `consolidated_at IS NULL` as the work-queue marker.
579
+ * Once a row has been processed by `consolidateAutoCaptures()`, its
580
+ * `consolidated_at` is stamped with the current ISO-8601 timestamp so
581
+ * it won't be re-read on the next pass.
582
+ */
583
+ getUnconsolidatedAutoCaptures(limit = 500) {
584
+ const rows = this.db
585
+ .prepare(`
586
+ SELECT * FROM auto_capture
587
+ WHERE consolidated_at IS NULL
588
+ ORDER BY created_at ASC
589
+ LIMIT ?
590
+ `)
591
+ .all(limit);
592
+ return rows.map((row) => ({
593
+ id: Number(row["id"] ?? 0),
594
+ eventType: row["event_type"],
595
+ toolName: row["tool_name"],
596
+ content: row["content"],
597
+ sessionId: row["session_id"],
598
+ createdAt: row["created_at"],
599
+ }));
600
+ }
601
+ /**
602
+ * Mark a set of auto_capture rows as consolidated. Called by
603
+ * `consolidateAutoCaptures()` once their observations have been inserted
604
+ * into `memory_entries` / `decision_log`. Idempotent.
605
+ */
606
+ markAutoCapturesConsolidated(ids) {
607
+ if (ids.length === 0)
608
+ return;
609
+ const placeholders = ids.map(() => "?").join(",");
610
+ const stmt = this.db.prepare(`UPDATE auto_capture SET consolidated_at = datetime('now')
611
+ WHERE id IN (${placeholders}) AND consolidated_at IS NULL`);
612
+ stmt.run(...ids);
613
+ }
614
+ /**
615
+ * Route unconsolidated auto_capture rows into structured memory tables
616
+ * (memory_entries + decision_log). Phase B Bug #1 fix.
617
+ *
618
+ * Bug: `.wotann/memory.db` showed 1,990 rows in `auto_capture` but 0
619
+ * in `memory_entries`, `knowledge_nodes`, and `decision_log` — every
620
+ * observation was silently dumped into the raw capture table with no
621
+ * structured routing. Session-end extraction ran from
622
+ * `session.messages` (not from the DB), so daemon lifecycle events
623
+ * never produced structured entries.
624
+ *
625
+ * This method reads from the auto_capture table itself, runs each row
626
+ * through the caller-supplied extractor (normally
627
+ * `ObservationExtractor.extractFromCaptures`), maps the observation
628
+ * type to the right MemoryBlockType, and inserts into memory_entries.
629
+ * Decisions are ALSO mirrored into decision_log for the decision
630
+ * ledger.
631
+ *
632
+ * Classification failures (row content matches no pattern) emit a
633
+ * `classification_failed` event via the optional callback — never
634
+ * silently swallowed. Quality bar from feedback_wotann_quality_bars.
635
+ *
636
+ * @returns a report: how many routed per bucket + how many failed classification.
637
+ */
638
+ consolidateAutoCaptures(extractFn, options) {
639
+ const batchSize = options?.batchSize ?? 500;
640
+ const entries = this.getUnconsolidatedAutoCaptures(batchSize);
641
+ if (entries.length === 0) {
642
+ return {
643
+ read: 0,
644
+ routed: 0,
645
+ byBlock: {},
646
+ classificationFailed: 0,
647
+ decisionLogged: 0,
648
+ };
649
+ }
650
+ let observations;
651
+ try {
652
+ observations = extractFn(entries);
653
+ }
654
+ catch (err) {
655
+ // Extractor crash — surface to caller via callback (honest stub, not
656
+ // silent success — feedback_wotann_quality_bars_session2). Mark NONE
657
+ // consolidated so the next pass can retry when the extractor is fixed.
658
+ options?.onClassificationFailed?.(entries[0], `extractor_crash:${err.message}`);
659
+ throw err;
660
+ }
661
+ const covered = new Set();
662
+ const byBlock = {};
663
+ let decisionLogged = 0;
664
+ // Phase 1: insert into memory_entries for every extracted observation.
665
+ // Wrapped in a transaction so a later SQL failure rolls back the whole
666
+ // batch — we don't want a half-routed pass where some rows are marked
667
+ // consolidated but their memory_entries never made it.
668
+ const insertTx = this.db.transaction(() => {
669
+ for (const obs of observations) {
670
+ const blockType = this.observationTypeToBlockType(obs.type);
671
+ byBlock[blockType] = (byBlock[blockType] ?? 0) + 1;
672
+ const sessionId = entries.find((e) => obs.sourceIds.includes(e.id))?.sessionId;
673
+ this.insert({
674
+ id: randomUUID(),
675
+ layer: "working",
676
+ blockType,
677
+ key: `${obs.type}:${obs.assertion.slice(0, 80)}`,
678
+ value: obs.assertion,
679
+ sessionId,
680
+ verified: false,
681
+ freshnessScore: 1.0,
682
+ confidenceLevel: obs.confidence,
683
+ verificationStatus: "unverified",
684
+ tags: `consolidated,${obs.type}`,
685
+ domain: obs.domain ?? "",
686
+ topic: obs.topic ?? "",
687
+ });
688
+ // Decisions ALSO flow into the decision_log (bi-temporal ledger).
689
+ if (obs.type === "decision") {
690
+ this.db
691
+ .prepare(`INSERT INTO decision_log (id, decision, rationale, alternatives, constraints, stakeholders, session_id)
692
+ VALUES (?, ?, ?, ?, ?, ?, ?)`)
693
+ .run(randomUUID(), obs.assertion.slice(0, 500), `auto-consolidated from ${obs.sourceIds.length} capture(s)`, null, null, null, sessionId ?? null);
694
+ decisionLogged++;
695
+ }
696
+ for (const sid of obs.sourceIds)
697
+ covered.add(sid);
698
+ }
699
+ });
700
+ insertTx();
701
+ // Phase 2: mark all auto_capture rows that fed into an observation as
702
+ // consolidated, AND mark uncovered rows as consolidated-but-unclassified
703
+ // so we don't re-visit them every tick. Emit classification_failed for
704
+ // those so the caller can log/alert.
705
+ const coveredIds = [...covered];
706
+ this.markAutoCapturesConsolidated(coveredIds);
707
+ const unclassified = entries.filter((e) => !covered.has(e.id));
708
+ if (unclassified.length > 0 && options?.onClassificationFailed) {
709
+ for (const entry of unclassified) {
710
+ options.onClassificationFailed(entry, "no_pattern_matched");
711
+ }
712
+ }
713
+ // Mark unclassified as consolidated too — they've had their chance.
714
+ // Without this, the queue grows unbounded and every pass re-examines
715
+ // the same junk. The `onClassificationFailed` callback above gives
716
+ // observability without keeping them in the work queue forever.
717
+ this.markAutoCapturesConsolidated(unclassified.map((e) => e.id));
718
+ return {
719
+ read: entries.length,
720
+ routed: covered.size,
721
+ byBlock,
722
+ classificationFailed: unclassified.length,
723
+ decisionLogged,
724
+ };
725
+ }
726
+ /** Map observation type to the right memory block. Isolated for testability. */
727
+ observationTypeToBlockType(type) {
728
+ switch (type) {
729
+ case "decision":
730
+ return "decisions";
731
+ case "preference":
732
+ return "feedback";
733
+ case "milestone":
734
+ return "project";
735
+ case "problem":
736
+ return "issues";
737
+ case "discovery":
738
+ return "cases";
739
+ }
740
+ }
741
+ // ── Verbatim Drawers (MemPalace R6) ────────────────────────
742
+ // Stores raw conversation chunks alongside structured blocks.
743
+ // Search against summaries, return originals — how MemPalace gets 96.6% recall.
744
+ /** Store a raw verbatim chunk, optionally linked to a structured memory entry. */
745
+ storeVerbatim(rawContent, options) {
746
+ const id = randomUUID();
747
+ this.db
748
+ .prepare(`
749
+ INSERT INTO verbatim_drawers (id, entry_id, raw_content, content_type, session_id, domain, topic)
750
+ VALUES (?, ?, ?, ?, ?, ?, ?)
751
+ `)
752
+ .run(id, options?.entryId ?? null, rawContent, options?.contentType ?? "conversation", options?.sessionId ?? null, options?.domain ?? "", options?.topic ?? "");
753
+ return id;
754
+ }
755
+ /** Search verbatim drawers via FTS5. Returns raw content with match scores. */
756
+ searchVerbatim(query, limit = 10) {
757
+ const rows = this.db
758
+ .prepare(`
759
+ SELECT vd.*, rank AS score
760
+ FROM verbatim_fts
761
+ JOIN verbatim_drawers vd ON vd.rowid = verbatim_fts.rowid
762
+ WHERE verbatim_fts MATCH ?
763
+ ORDER BY rank LIMIT ?
764
+ `)
765
+ .all(query, limit);
766
+ return rows.map((r) => ({
767
+ id: r["id"],
768
+ rawContent: r["raw_content"],
769
+ entryId: r["entry_id"] ?? null,
770
+ score: r["score"] ?? 0,
771
+ domain: r["domain"] ?? "",
772
+ topic: r["topic"] ?? "",
773
+ }));
774
+ }
775
+ /** Get the raw verbatim content linked to a structured memory entry. */
776
+ getVerbatimForEntry(entryId) {
777
+ const rows = this.db
778
+ .prepare(`
779
+ SELECT id, raw_content, content_type FROM verbatim_drawers WHERE entry_id = ? ORDER BY created_at DESC
780
+ `)
781
+ .all(entryId);
782
+ return rows.map((r) => ({
783
+ id: r["id"],
784
+ rawContent: r["raw_content"],
785
+ contentType: r["content_type"],
786
+ }));
787
+ }
788
+ /** Count of verbatim entries. */
789
+ getVerbatimCount() {
790
+ return this.db.prepare(`SELECT COUNT(*) as count FROM verbatim_drawers`).get().count;
791
+ }
792
+ // ── Layer 2: Core Blocks CRUD ──────────────────────────────
793
+ insert(entry) {
794
+ // Phase H Task 1: derive dual-timestamp fields from raw content so
795
+ // temporal queries ("what did we say last week about last year's
796
+ // launch?") can distinguish writing date from event date. Caller
797
+ // may override by passing explicit documentDate / eventDate.
798
+ const derived = deriveIngestTimestamps(`${entry.key} ${entry.value}`);
799
+ const documentDate = entry.documentDate ?? derived.documentDate;
800
+ const eventDate = entry.eventDate ?? derived.eventDate;
801
+ const eventDateUncertaintyMs = entry.eventDateUncertaintyMs ?? derived.eventDateUncertaintyMs;
802
+ const eventDateSource = entry.eventDate !== undefined && entry.eventDateSource === undefined
803
+ ? "user-supplied"
804
+ : (entry.eventDateSource ?? derived.eventDateSource);
805
+ // Phase H Wave-3C: contextual-retrieval enrichment. When a generator
806
+ // is installed, prepend a ~50-token chunk-context to the indexed
807
+ // value per Anthropic contextual retrieval. Generator failure falls
808
+ // through to raw value — honest pass-through, never silent garbage.
809
+ let indexedValue = entry.value;
810
+ if (this.contextGenerator) {
811
+ try {
812
+ const raw = this.contextGenerator(entry.key, entry.value);
813
+ const context = clampContextTokens(cleanContext(raw));
814
+ if (context)
815
+ indexedValue = `${context}\n\n${entry.value}`;
816
+ }
817
+ catch {
818
+ /* honest fallback: keep raw value */
819
+ }
820
+ }
821
+ // Phase 2 P1-M8 Fix A — write BOTH confidence columns so read-back
822
+ // matches caller intent. Prior to this fix `confidence_level`,
823
+ // `freshness_score`, and `verification_status` were never written by
824
+ // insert(), so `rowToEntry` always returned confidence_level=0.5 (the
825
+ // column default). Reflector.promote and consolidateAutoCaptures both
826
+ // pass explicit confidenceLevel signals that were being silently
827
+ // dropped. Preserves the split semantics:
828
+ // - confidence = caller-supplied raw score (stays stable)
829
+ // - confidence_level = working value the verify pipeline mutates
830
+ // (seeded from caller at insert time)
831
+ const confidenceLevel = entry.confidenceLevel ?? entry.confidence ?? 0.5;
832
+ const freshnessScore = entry.freshnessScore ?? 1.0;
833
+ const verificationStatus = entry.verificationStatus ?? "unverified";
834
+ this.db
835
+ .prepare(`
836
+ INSERT INTO memory_entries (id, layer, block_type, key, value, session_id, verified, confidence, tags, domain, topic, document_date, event_date, event_date_uncertainty_ms, event_date_source, freshness_score, confidence_level, verification_status)
837
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
838
+ `)
839
+ .run(entry.id, entry.layer, entry.blockType, entry.key, indexedValue, entry.sessionId ?? null, entry.verified ? 1 : 0, entry.confidence ?? 1.0, entry.tags ?? "", entry.domain ?? "", entry.topic ?? "", documentDate, eventDate, eventDateUncertaintyMs, eventDateSource, freshnessScore, confidenceLevel, verificationStatus);
840
+ }
841
+ replace(id, key, value) {
842
+ this.db
843
+ .prepare(`
844
+ UPDATE memory_entries SET key = ?, value = ?, updated_at = datetime('now') WHERE id = ?
845
+ `)
846
+ .run(key, value, id);
847
+ }
848
+ archive(id) {
849
+ this.db
850
+ .prepare(`
851
+ UPDATE memory_entries SET archived = 1, updated_at = datetime('now') WHERE id = ?
852
+ `)
853
+ .run(id);
854
+ }
855
+ /**
856
+ * MemoryProvider contract: structured update of an existing entry.
857
+ * Builds a dynamic UPDATE with only the supplied fields, preserving
858
+ * every other column. Silent no-op when `updates` is empty or the id
859
+ * does not exist — matches `InMemoryProvider.update` semantics.
860
+ *
861
+ * NOTE: separate from `replace()` which is the legacy key/value-only
862
+ * mutation used by `memoryReplace()`. `update()` additionally supports
863
+ * `verified` and `confidence` columns required by the interface.
864
+ */
865
+ update(id, updates) {
866
+ const sets = [];
867
+ const params = [];
868
+ if (updates.key !== undefined) {
869
+ sets.push("key = ?");
870
+ params.push(updates.key);
871
+ }
872
+ if (updates.value !== undefined) {
873
+ sets.push("value = ?");
874
+ params.push(updates.value);
875
+ }
876
+ if (updates.verified !== undefined) {
877
+ sets.push("verified = ?");
878
+ params.push(updates.verified ? 1 : 0);
879
+ }
880
+ if (updates.confidence !== undefined) {
881
+ sets.push("confidence = ?");
882
+ params.push(updates.confidence);
883
+ }
884
+ if (sets.length === 0)
885
+ return;
886
+ sets.push("updated_at = datetime('now')");
887
+ params.push(id);
888
+ this.db.prepare(`UPDATE memory_entries SET ${sets.join(", ")} WHERE id = ?`).run(...params);
889
+ }
890
+ /**
891
+ * MemoryProvider contract: hard-delete by id. Distinct from
892
+ * `archive()` (soft-delete via the `archived` column). Hard-delete
893
+ * cascades to FTS5 shadow table via SQLite foreign-key triggers.
894
+ */
895
+ delete(id) {
896
+ this.db.prepare(`DELETE FROM memory_entries WHERE id = ?`).run(id);
897
+ }
898
+ /**
899
+ * MemoryProvider contract: total count of non-archived entries.
900
+ * Thin alias over `getEntryCount()` so conforming callers have a
901
+ * stable name across providers.
902
+ */
903
+ count() {
904
+ return this.getEntryCount();
905
+ }
906
+ /**
907
+ * MemoryProvider contract: basic liveness probe. Issues a trivial
908
+ * `SELECT 1` to confirm the SQLite handle is open and responsive.
909
+ * Returns false on any exception rather than throwing.
910
+ */
911
+ healthCheck() {
912
+ try {
913
+ const row = this.db.prepare("SELECT 1 AS ok").get();
914
+ return row?.ok === 1;
915
+ }
916
+ catch {
917
+ return false;
918
+ }
919
+ }
920
+ getById(id) {
921
+ const row = this.db
922
+ .prepare(`
923
+ SELECT * FROM memory_entries WHERE id = ? AND archived = 0
924
+ `)
925
+ .get(id);
926
+ if (row) {
927
+ this.db
928
+ .prepare(`
929
+ UPDATE memory_entries SET access_count = access_count + 1, last_accessed = datetime('now') WHERE id = ?
930
+ `)
931
+ .run(id);
932
+ }
933
+ return row ? this.rowToEntry(row) : null;
934
+ }
935
+ getByLayer(layer) {
936
+ return this.db
937
+ .prepare(`
938
+ SELECT * FROM memory_entries WHERE layer = ? AND archived = 0 ORDER BY updated_at DESC
939
+ `)
940
+ .all(layer).map((r) => this.rowToEntry(r));
941
+ }
942
+ getByBlock(blockType) {
943
+ return this.db
944
+ .prepare(`
945
+ SELECT * FROM memory_entries WHERE block_type = ? AND archived = 0 ORDER BY updated_at DESC
946
+ `)
947
+ .all(blockType).map((r) => this.rowToEntry(r));
948
+ }
949
+ // ── Layer 3: Working Memory ────────────────────────────────
950
+ setWorkingMemory(sessionId, key, value, importance = 0.5) {
951
+ this.db
952
+ .prepare(`
953
+ INSERT OR REPLACE INTO working_memory (id, session_id, key, value, importance) VALUES (?, ?, ?, ?, ?)
954
+ `)
955
+ .run(randomUUID(), sessionId, key, value, importance);
956
+ }
957
+ getWorkingMemory(sessionId) {
958
+ return this.db
959
+ .prepare(`
960
+ SELECT key, value, importance FROM working_memory
961
+ WHERE session_id = ? AND (expires_at IS NULL OR expires_at > datetime('now'))
962
+ ORDER BY importance DESC
963
+ `)
964
+ .all(sessionId);
965
+ }
966
+ clearWorkingMemory(sessionId) {
967
+ this.db.prepare(`DELETE FROM working_memory WHERE session_id = ?`).run(sessionId);
968
+ }
969
+ // ── Layer 4: Knowledge Graph ───────────────────────────────
970
+ /**
971
+ * Phase 2 P1-M7: typed-entity graph population.
972
+ *
973
+ * Validates a structured entity against `entity-types.EntitySchema`
974
+ * (person / project / file / concept / event / goal / skill / tool)
975
+ * and inserts it into `knowledge_nodes`. If a node with the same
976
+ * entity+type already exists, the existing id is returned rather
977
+ * than duplicated. Remaining fields are serialized into the
978
+ * properties JSON payload so downstream consumers can reconstruct
979
+ * the typed entity.
980
+ *
981
+ * Exists specifically to fix the "49-byte empty KG" bug: callers
982
+ * that already hold a validated Entity can push it to the graph
983
+ * without re-typing the free-form API.
984
+ */
985
+ recordEntity(entity) {
986
+ const parsed = EntitySchema.safeParse(entity);
987
+ if (!parsed.success) {
988
+ throw new Error(`recordEntity: invalid entity — ${parsed.error.message}`);
989
+ }
990
+ const valid = parsed.data;
991
+ const name = entityNameOf(valid);
992
+ const existing = this.db
993
+ .prepare(`SELECT id FROM knowledge_nodes WHERE entity = ? AND entity_type = ? LIMIT 1`)
994
+ .get(name, valid.type);
995
+ if (existing)
996
+ return existing.id;
997
+ const properties = {};
998
+ for (const [k, v] of Object.entries(valid)) {
999
+ if (k === "type" || k === "name")
1000
+ continue;
1001
+ if (v === undefined || v === null)
1002
+ continue;
1003
+ properties[k] = typeof v === "string" ? v : JSON.stringify(v);
1004
+ }
1005
+ return this.addKnowledgeNode(name, valid.type, properties);
1006
+ }
1007
+ /**
1008
+ * Phase 2 P1-M7: batch entity population. Parses each entity, skips
1009
+ * invalid rows (returning them in `skipped`), inserts the rest in a
1010
+ * single transaction.
1011
+ */
1012
+ recordEntities(entities) {
1013
+ const inserted = [];
1014
+ const skipped = [];
1015
+ const tx = this.db.transaction(() => {
1016
+ for (const entity of entities) {
1017
+ try {
1018
+ const nodeId = this.recordEntity(entity);
1019
+ inserted.push({ entity, nodeId });
1020
+ }
1021
+ catch (err) {
1022
+ skipped.push({ entity, reason: err instanceof Error ? err.message : String(err) });
1023
+ }
1024
+ }
1025
+ });
1026
+ tx();
1027
+ return { inserted, skipped };
1028
+ }
1029
+ /**
1030
+ * Phase 2 P1-M7: heuristic relationship materialization.
1031
+ *
1032
+ * Given two memory entries, classify the relationship between them
1033
+ * using the heuristic classifier (no LLM call) and, when confident,
1034
+ * insert a knowledge_edges row linking their knowledge_nodes.
1035
+ *
1036
+ * Returns the edge id when inserted, or null when the classifier
1037
+ * emits no relationship (or confidence is below the threshold).
1038
+ */
1039
+ async recordHeuristicRelationship(fromNodeId, toNodeId, predecessorContent, successorContent, minConfidence = 0.5) {
1040
+ const classifier = createHeuristicClassifier();
1041
+ const result = await classifier.classify(predecessorContent, successorContent);
1042
+ if (!result)
1043
+ return null;
1044
+ if (result.confidence < minConfidence)
1045
+ return null;
1046
+ return this.addKnowledgeEdge(fromNodeId, toNodeId, result.kind, result.confidence);
1047
+ }
1048
+ /**
1049
+ * Phase 2 P1-M7: follow an `updates`-relationship chain from the
1050
+ * given rootId and return the id of the most recent node in that
1051
+ * chain. Delegates to relationship-types.resolveLatest so callers
1052
+ * don't have to import both modules. Used for "what is the CURRENT
1053
+ * version of fact X?" queries.
1054
+ */
1055
+ resolveLatestRelationship(rels, rootId) {
1056
+ return resolveLatest(rels, rootId);
1057
+ }
1058
+ /**
1059
+ * Phase 2 P1-M7: group the relationships attached to a node by kind
1060
+ * (updates / extends / derives / unknown). Delegates to
1061
+ * relationship-types.partitionByKind.
1062
+ */
1063
+ partitionRelationshipsByKind(rels, nodeId) {
1064
+ return partitionByKind(rels, nodeId);
1065
+ }
1066
+ addKnowledgeNode(entity, entityType, properties) {
1067
+ const id = randomUUID();
1068
+ this.db
1069
+ .prepare(`
1070
+ INSERT INTO knowledge_nodes (id, entity, entity_type, properties) VALUES (?, ?, ?, ?)
1071
+ `)
1072
+ .run(id, entity, entityType, JSON.stringify(properties ?? {}));
1073
+ return id;
1074
+ }
1075
+ addKnowledgeEdge(sourceId, targetId, relation, weight = 1.0, validFrom) {
1076
+ const id = randomUUID();
1077
+ const now = new Date().toISOString();
1078
+ this.db
1079
+ .prepare(`
1080
+ INSERT INTO knowledge_edges (id, source_id, target_id, relation, weight, valid_from, recorded_from) VALUES (?, ?, ?, ?, ?, ?, ?)
1081
+ `)
1082
+ .run(id, sourceId, targetId, relation, weight, validFrom ?? now, now);
1083
+ return id;
1084
+ }
1085
+ // ── Bi-Temporal Edges (Phase 2 P1-M5, Zep/Graphiti port) ──
1086
+ /**
1087
+ * Insert a bi-temporal knowledge edge. Both axes are independent:
1088
+ * - valid_from / valid_to: when the fact is true in the world
1089
+ * - recorded_from / recorded_to: when WOTANN knew the fact
1090
+ *
1091
+ * Defaults:
1092
+ * - valid_from = options.validFrom ?? now
1093
+ * - valid_to = options.validTo ?? null (still valid)
1094
+ * - recorded_from = options.recordedFrom ?? now (set automatically
1095
+ * on every insert — the "when WOTANN learned it"
1096
+ * timestamp is typically right-now)
1097
+ * - recorded_to = null (still known)
1098
+ *
1099
+ * Throws ValidationError on malformed dates.
1100
+ */
1101
+ addBiTemporalEdge(sourceId, targetId, relation, options = {}) {
1102
+ const now = new Date().toISOString();
1103
+ const validFrom = options.validFrom ? validateDate(options.validFrom, "validFrom") : now;
1104
+ const validTo = validateDateOrNull(options.validTo ?? null, "validTo");
1105
+ const recordedFrom = options.recordedFrom
1106
+ ? validateDate(options.recordedFrom, "recordedFrom")
1107
+ : now;
1108
+ const weight = options.weight ?? 1.0;
1109
+ const id = randomUUID();
1110
+ this.db
1111
+ .prepare(`INSERT INTO knowledge_edges
1112
+ (id, source_id, target_id, relation, weight, valid_from, valid_to, recorded_from, recorded_to)
1113
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`)
1114
+ .run(id, sourceId, targetId, relation, weight, validFrom, validTo, recordedFrom, null);
1115
+ return id;
1116
+ }
1117
+ /**
1118
+ * Retract an edge on the ingest-time axis (the fact is no longer
1119
+ * known to WOTANN). Optionally also closes the knowledge-time axis
1120
+ * when `factEndedAt` is supplied — use when WOTANN learns a fact was
1121
+ * wrong AND knows when the fact stopped being true.
1122
+ *
1123
+ * The row is NOT deleted — historical queries (queryKnownAt(past))
1124
+ * still see it. This preserves the "WOTANN knew this between dates
1125
+ * X and Y" audit trail that Zep/Graphiti uses for knowledge updates.
1126
+ */
1127
+ retractBiTemporalEdge(edgeId, input = {}) {
1128
+ const retractedAt = input.retractedAt ?? new Date().toISOString();
1129
+ validateDate(retractedAt, "retractedAt");
1130
+ if (input.factEndedAt !== undefined) {
1131
+ const validTo = validateDateOrNull(input.factEndedAt, "factEndedAt");
1132
+ const info = this.db
1133
+ .prepare(`UPDATE knowledge_edges
1134
+ SET recorded_to = ?, valid_to = ?
1135
+ WHERE id = ? AND recorded_to IS NULL`)
1136
+ .run(retractedAt, validTo, edgeId);
1137
+ return info.changes > 0;
1138
+ }
1139
+ const info = this.db
1140
+ .prepare(`UPDATE knowledge_edges
1141
+ SET recorded_to = ?
1142
+ WHERE id = ? AND recorded_to IS NULL`)
1143
+ .run(retractedAt, edgeId);
1144
+ return info.changes > 0;
1145
+ }
1146
+ /**
1147
+ * Fetch a single bi-temporal edge by id. Returns null when missing.
1148
+ * Handles legacy rows (null recorded_from) by falling back to
1149
+ * created_at per the migration spec.
1150
+ */
1151
+ getBiTemporalEdge(edgeId) {
1152
+ const row = this.db
1153
+ .prepare(`SELECT id, source_id, target_id, relation, weight,
1154
+ valid_from, valid_to, recorded_from, recorded_to, created_at
1155
+ FROM knowledge_edges WHERE id = ?`)
1156
+ .get(edgeId);
1157
+ if (!row)
1158
+ return null;
1159
+ return rowToBiTemporalEdge(row);
1160
+ }
1161
+ /**
1162
+ * Query edges that were VALID (true in the world) at `date`.
1163
+ * Ignores the ingest-time axis entirely — even retracted edges are
1164
+ * returned if they were valid at the given date.
1165
+ */
1166
+ queryValidAt(date) {
1167
+ validateDate(date, "date");
1168
+ const rows = this.db
1169
+ .prepare(`SELECT id, source_id, target_id, relation, weight,
1170
+ valid_from, valid_to, recorded_from, recorded_to, created_at
1171
+ FROM knowledge_edges
1172
+ WHERE valid_from <= ? AND (valid_to IS NULL OR valid_to > ?)`)
1173
+ .all(date, date);
1174
+ return rows.map(rowToBiTemporalEdge);
1175
+ }
1176
+ /**
1177
+ * Query edges that WOTANN KNEW at `date` on the ingest-time axis.
1178
+ * Ignores the knowledge-time axis — even edges that represent
1179
+ * historical (no-longer-valid) facts are returned if WOTANN knew
1180
+ * about them at the given date.
1181
+ */
1182
+ queryKnownAt(date) {
1183
+ validateDate(date, "date");
1184
+ const rows = this.db
1185
+ .prepare(`SELECT id, source_id, target_id, relation, weight,
1186
+ valid_from, valid_to, recorded_from, recorded_to, created_at
1187
+ FROM knowledge_edges
1188
+ WHERE recorded_from <= ? AND (recorded_to IS NULL OR recorded_to > ?)`)
1189
+ .all(date, date);
1190
+ return rows.map(rowToBiTemporalEdge);
1191
+ }
1192
+ /**
1193
+ * Query edges matching BOTH axes: the fact was true in the world at
1194
+ * `validAt` AND WOTANN knew the fact at `knownAt`. This is the
1195
+ * canonical Zep/Graphiti snapshot query — "what was WOTANN's picture
1196
+ * of the world as of date X?".
1197
+ */
1198
+ querySnapshot(q) {
1199
+ validateDate(q.validAt, "validAt");
1200
+ validateDate(q.knownAt, "knownAt");
1201
+ const rows = this.db
1202
+ .prepare(`SELECT id, source_id, target_id, relation, weight,
1203
+ valid_from, valid_to, recorded_from, recorded_to, created_at
1204
+ FROM knowledge_edges
1205
+ WHERE valid_from <= ? AND (valid_to IS NULL OR valid_to > ?)
1206
+ AND recorded_from <= ? AND (recorded_to IS NULL OR recorded_to > ?)`)
1207
+ .all(q.validAt, q.validAt, q.knownAt, q.knownAt);
1208
+ return rows.map(rowToBiTemporalEdge);
1209
+ }
1210
+ /**
1211
+ * Replace an edge: invalidate the old one on BOTH axes (fact ended
1212
+ * AND knowledge retracted) and insert a new edge carrying the
1213
+ * successor fact. Returns the new edge id. This is the canonical
1214
+ * Zep/Graphiti contradiction-handling flow: "we used to think X, now
1215
+ * we think Y — the switchover happened at time T".
1216
+ */
1217
+ replaceBiTemporalEdge(oldEdgeId, input) {
1218
+ const at = input.at ?? new Date().toISOString();
1219
+ validateDate(at, "at");
1220
+ const existing = this.getBiTemporalEdge(oldEdgeId);
1221
+ if (!existing)
1222
+ return null;
1223
+ const tx = this.db.transaction(() => {
1224
+ this.retractBiTemporalEdge(oldEdgeId, {
1225
+ retractedAt: at,
1226
+ factEndedAt: at,
1227
+ });
1228
+ return this.addBiTemporalEdge(input.sourceId, input.targetId, input.relation, {
1229
+ validFrom: at,
1230
+ recordedFrom: at,
1231
+ ...(input.weight !== undefined ? { weight: input.weight } : {}),
1232
+ });
1233
+ });
1234
+ return tx();
1235
+ }
1236
+ /**
1237
+ * Invalidate a knowledge edge by setting its valid_to timestamp.
1238
+ * The edge remains for historical queries but is excluded from active queries.
1239
+ */
1240
+ invalidateKnowledgeEdge(edgeId, endedAt) {
1241
+ const result = this.db
1242
+ .prepare(`
1243
+ UPDATE knowledge_edges SET valid_to = ? WHERE id = ? AND valid_to IS NULL
1244
+ `)
1245
+ .run(endedAt ?? new Date().toISOString(), edgeId);
1246
+ return result.changes > 0;
1247
+ }
1248
+ /**
1249
+ * Get knowledge edges that were active at a specific point in time.
1250
+ * A relationship is active if valid_from <= date AND (valid_to IS NULL OR valid_to > date).
1251
+ */
1252
+ getActiveEdgesAt(date) {
1253
+ return this.db
1254
+ .prepare(`
1255
+ SELECT id, source_id, target_id, relation, weight, valid_from, valid_to
1256
+ FROM knowledge_edges
1257
+ WHERE valid_from <= ? AND (valid_to IS NULL OR valid_to > ?)
1258
+ `)
1259
+ .all(date, date).map((r) => ({
1260
+ id: r["id"],
1261
+ sourceId: r["source_id"],
1262
+ targetId: r["target_id"],
1263
+ relation: r["relation"],
1264
+ weight: r["weight"],
1265
+ validFrom: r["valid_from"],
1266
+ validTo: r["valid_to"] ?? null,
1267
+ }));
1268
+ }
1269
+ getRelatedEntities(entity, maxDepth = 2) {
1270
+ const startNodes = this.db
1271
+ .prepare(`
1272
+ SELECT * FROM knowledge_nodes WHERE entity = ? AND (valid_to IS NULL OR valid_to > datetime('now'))
1273
+ `)
1274
+ .all(entity);
1275
+ if (startNodes.length === 0)
1276
+ return [];
1277
+ const visited = new Set();
1278
+ const result = [];
1279
+ let frontier = startNodes.map((n) => n["id"]);
1280
+ for (let depth = 0; depth < maxDepth && frontier.length > 0; depth++) {
1281
+ const nextFrontier = [];
1282
+ for (const nodeId of frontier) {
1283
+ if (visited.has(nodeId))
1284
+ continue;
1285
+ visited.add(nodeId);
1286
+ const node = this.db.prepare(`SELECT * FROM knowledge_nodes WHERE id = ?`).get(nodeId);
1287
+ if (node) {
1288
+ result.push({
1289
+ id: node["id"],
1290
+ entity: node["entity"],
1291
+ entityType: node["entity_type"],
1292
+ properties: JSON.parse(node["properties"] || "{}"),
1293
+ validFrom: node["valid_from"],
1294
+ validTo: node["valid_to"],
1295
+ });
1296
+ }
1297
+ const edges = this.db
1298
+ .prepare(`
1299
+ SELECT target_id AS connected FROM knowledge_edges WHERE source_id = ? AND (valid_to IS NULL OR valid_to > datetime('now'))
1300
+ UNION SELECT source_id AS connected FROM knowledge_edges WHERE target_id = ? AND (valid_to IS NULL OR valid_to > datetime('now'))
1301
+ `)
1302
+ .all(nodeId, nodeId);
1303
+ for (const e of edges) {
1304
+ if (!visited.has(e.connected))
1305
+ nextFrontier.push(e.connected);
1306
+ }
1307
+ }
1308
+ frontier = nextFrontier;
1309
+ }
1310
+ return result;
1311
+ }
1312
+ getKnowledgeGraphSize() {
1313
+ const nodes = this.db.prepare(`SELECT COUNT(*) as c FROM knowledge_nodes`).get().c;
1314
+ const edges = this.db.prepare(`SELECT COUNT(*) as c FROM knowledge_edges`).get().c;
1315
+ return { nodes, edges };
1316
+ }
1317
+ // ── Layer 6: Skeptical Recall ──────────────────────────────
1318
+ skepticalSearch(query, limit = 10) {
1319
+ const results = this.search(query, limit);
1320
+ return results.map((r) => {
1321
+ let ageDays = 0;
1322
+ try {
1323
+ const updatedTime = new Date(r.entry.updatedAt).getTime();
1324
+ if (!isNaN(updatedTime)) {
1325
+ ageDays = (Date.now() - updatedTime) / (1000 * 60 * 60 * 24);
1326
+ }
1327
+ }
1328
+ catch {
1329
+ /* default to 0 days age */
1330
+ }
1331
+ const temporalDecay = Math.max(0.3, 1.0 - ageDays * 0.01);
1332
+ const confidence = (r.entry.confidence ?? 1.0) * temporalDecay * (r.entry.verified ? 1.0 : 0.7);
1333
+ return { ...r, needsVerification: confidence < 0.6 || !r.entry.verified };
1334
+ });
1335
+ }
1336
+ // ── Layer 7: Team Memory ───────────────────────────────────
1337
+ setTeamMemory(agentId, key, value) {
1338
+ this.db
1339
+ .prepare(`
1340
+ INSERT INTO team_memory (id, agent_id, key, value) VALUES (?, ?, ?, ?)
1341
+ `)
1342
+ .run(randomUUID(), agentId, key, value);
1343
+ }
1344
+ getTeamMemory(agentId) {
1345
+ if (agentId) {
1346
+ return this.db
1347
+ .prepare(`
1348
+ SELECT agent_id, key, value FROM team_memory WHERE agent_id = ? AND shared = 1 ORDER BY updated_at DESC
1349
+ `)
1350
+ .all(agentId);
1351
+ }
1352
+ return this.db
1353
+ .prepare(`
1354
+ SELECT agent_id, key, value FROM team_memory WHERE shared = 1 ORDER BY updated_at DESC LIMIT 100
1355
+ `)
1356
+ .all();
1357
+ }
1358
+ getTeamMemoryRecords(agentId) {
1359
+ const rows = agentId
1360
+ ? this.db
1361
+ .prepare(`
1362
+ SELECT id, agent_id, key, value, shared, created_at, updated_at
1363
+ FROM team_memory
1364
+ WHERE agent_id = ?
1365
+ ORDER BY updated_at DESC
1366
+ `)
1367
+ .all(agentId)
1368
+ : this.db
1369
+ .prepare(`
1370
+ SELECT id, agent_id, key, value, shared, created_at, updated_at
1371
+ FROM team_memory
1372
+ ORDER BY updated_at DESC
1373
+ `)
1374
+ .all();
1375
+ return rows.map((row) => ({
1376
+ id: row["id"],
1377
+ agentId: row["agent_id"],
1378
+ key: row["key"],
1379
+ value: row["value"],
1380
+ shared: Boolean(row["shared"]),
1381
+ createdAt: row["created_at"],
1382
+ updatedAt: row["updated_at"],
1383
+ }));
1384
+ }
1385
+ exportTeamMemorySnapshot(agentId) {
1386
+ return {
1387
+ exportedAt: new Date().toISOString(),
1388
+ entries: this.getTeamMemoryRecords(agentId),
1389
+ };
1390
+ }
1391
+ importTeamMemorySnapshot(snapshot) {
1392
+ let inserted = 0;
1393
+ let updated = 0;
1394
+ let skipped = 0;
1395
+ const conflicts = [];
1396
+ for (const entry of snapshot.entries) {
1397
+ const existing = this.db
1398
+ .prepare(`
1399
+ SELECT id, value, updated_at
1400
+ FROM team_memory
1401
+ WHERE agent_id = ? AND key = ?
1402
+ ORDER BY updated_at DESC
1403
+ LIMIT 1
1404
+ `)
1405
+ .get(entry.agentId, entry.key);
1406
+ if (!existing) {
1407
+ this.db
1408
+ .prepare(`
1409
+ INSERT INTO team_memory (id, agent_id, key, value, shared, created_at, updated_at)
1410
+ VALUES (?, ?, ?, ?, ?, ?, ?)
1411
+ `)
1412
+ .run(entry.id, entry.agentId, entry.key, entry.value, entry.shared ? 1 : 0, entry.createdAt, entry.updatedAt);
1413
+ inserted++;
1414
+ continue;
1415
+ }
1416
+ const incomingTs = Date.parse(entry.updatedAt);
1417
+ const existingTs = Date.parse(existing.updated_at);
1418
+ const incomingIsNewer = !Number.isNaN(incomingTs) && !Number.isNaN(existingTs)
1419
+ ? incomingTs > existingTs
1420
+ : entry.updatedAt > existing.updated_at;
1421
+ if (existing.value !== entry.value) {
1422
+ conflicts.push(`${entry.agentId}:${entry.key}`);
1423
+ }
1424
+ if (incomingIsNewer) {
1425
+ this.db
1426
+ .prepare(`
1427
+ UPDATE team_memory
1428
+ SET value = ?, shared = ?, updated_at = ?, created_at = ?
1429
+ WHERE id = ?
1430
+ `)
1431
+ .run(entry.value, entry.shared ? 1 : 0, entry.updatedAt, entry.createdAt, existing.id);
1432
+ updated++;
1433
+ }
1434
+ else {
1435
+ skipped++;
1436
+ }
1437
+ }
1438
+ return {
1439
+ inserted,
1440
+ updated,
1441
+ skipped,
1442
+ conflicts: [...new Set(conflicts)],
1443
+ };
1444
+ }
1445
+ syncTeamMemoryFile(snapshotPath, agentId) {
1446
+ let syncResult = {
1447
+ inserted: 0,
1448
+ updated: 0,
1449
+ skipped: 0,
1450
+ conflicts: [],
1451
+ };
1452
+ if (existsSync(snapshotPath)) {
1453
+ try {
1454
+ const parsed = JSON.parse(readFileSync(snapshotPath, "utf-8"));
1455
+ if (Array.isArray(parsed.entries)) {
1456
+ syncResult = this.importTeamMemorySnapshot(parsed);
1457
+ }
1458
+ }
1459
+ catch {
1460
+ syncResult = {
1461
+ inserted: 0,
1462
+ updated: 0,
1463
+ skipped: 0,
1464
+ conflicts: ["snapshot:parse-error"],
1465
+ };
1466
+ }
1467
+ }
1468
+ const exportedSnapshot = this.exportTeamMemorySnapshot(agentId);
1469
+ // SECURITY (B6): atomic write + lock so concurrent daemon processes don't
1470
+ // write a half-serialized JSON blob to the snapshot file.
1471
+ writeFileAtomicSyncBestEffort(snapshotPath, JSON.stringify(exportedSnapshot, null, 2), {
1472
+ encoding: "utf-8",
1473
+ mode: 0o600,
1474
+ });
1475
+ return {
1476
+ ...syncResult,
1477
+ exported: exportedSnapshot.entries.length,
1478
+ };
1479
+ }
1480
+ // ── Layer 8: Proactive Context ─────────────────────────────
1481
+ getProactiveContext(sessionId, currentFile) {
1482
+ const suggestions = [];
1483
+ const recent = this.db
1484
+ .prepare(`
1485
+ SELECT * FROM memory_entries WHERE session_id = ? AND archived = 0 ORDER BY last_accessed DESC LIMIT 5
1486
+ `)
1487
+ .all(sessionId);
1488
+ for (const r of recent)
1489
+ suggestions.push(this.rowToEntry(r));
1490
+ if (currentFile) {
1491
+ const fileRelated = this.search(currentFile.split("/").pop() ?? "", 3);
1492
+ for (const r of fileRelated) {
1493
+ if (!suggestions.some((s) => s.id === r.entry.id))
1494
+ suggestions.push(r.entry);
1495
+ }
1496
+ }
1497
+ return suggestions.slice(0, 10);
1498
+ }
1499
+ // ── FTS5 Search ────────────────────────────────────────────
1500
+ search(query, limit = 10, options) {
1501
+ const domainFilter = options?.domainFilter ?? [];
1502
+ const hasDomainFilter = domainFilter.length > 0;
1503
+ const conditions = ["memory_fts MATCH ?", "me.archived = 0"];
1504
+ const params = [query];
1505
+ if (hasDomainFilter) {
1506
+ const placeholders = domainFilter.map(() => "?").join(", ");
1507
+ conditions.push(`me.domain IN (${placeholders})`);
1508
+ for (const d of domainFilter)
1509
+ params.push(d);
1510
+ }
1511
+ params.push(limit);
1512
+ const sql = `
1513
+ SELECT me.*, rank AS score, snippet(memory_fts, 1, '<b>', '</b>', '...', 32) AS snippet
1514
+ FROM memory_fts
1515
+ JOIN memory_entries me ON me.rowid = memory_fts.rowid
1516
+ WHERE ${conditions.join(" AND ")}
1517
+ ORDER BY rank LIMIT ?
1518
+ `;
1519
+ const rows = this.db.prepare(sql).all(...params);
1520
+ return rows.map((r) => ({
1521
+ entry: this.rowToEntry(r),
1522
+ score: r["score"] ?? 0,
1523
+ snippet: r["snippet"] ?? "",
1524
+ }));
1525
+ }
1526
+ /**
1527
+ * Domain-partitioned search (MemPalace R1).
1528
+ * Filters by domain/topic BEFORE running FTS5, reducing noise by up to 34%.
1529
+ * - domain only: +12% retrieval (MemPalace: 60.9% → 73.1%)
1530
+ * - domain + topic: +34% retrieval (MemPalace: 60.9% → 94.8%)
1531
+ */
1532
+ searchPartitioned(query, options = {}) {
1533
+ const { domain, topic, limit = 10 } = options;
1534
+ // No partition filters → fall back to standard search
1535
+ if (!domain && !topic)
1536
+ return this.search(query, limit);
1537
+ // Build dynamic WHERE clause for domain/topic filtering
1538
+ const conditions = ["memory_fts MATCH ?", "me.archived = 0"];
1539
+ const params = [query];
1540
+ if (domain) {
1541
+ conditions.push("me.domain = ?");
1542
+ params.push(domain);
1543
+ }
1544
+ if (topic) {
1545
+ conditions.push("me.topic = ?");
1546
+ params.push(topic);
1547
+ }
1548
+ params.push(limit);
1549
+ const sql = `
1550
+ SELECT me.*, rank AS score, snippet(memory_fts, 1, '<b>', '</b>', '...', 32) AS snippet
1551
+ FROM memory_fts
1552
+ JOIN memory_entries me ON me.rowid = memory_fts.rowid
1553
+ WHERE ${conditions.join(" AND ")}
1554
+ ORDER BY rank LIMIT ?
1555
+ `;
1556
+ const rows = this.db.prepare(sql).all(...params);
1557
+ return rows.map((r) => ({
1558
+ entry: this.rowToEntry(r),
1559
+ score: r["score"] ?? 0,
1560
+ snippet: r["snippet"] ?? "",
1561
+ }));
1562
+ }
1563
+ /**
1564
+ * Phase 13 Wave-3C — MemPalace-aware search. Gated by MEMORY_PALACE=1
1565
+ * env. When enabled, accepts a MemPalacePath/Query and routes through
1566
+ * searchPartitioned with domain/topic derived from the palace path
1567
+ * (hall → domain, wing[/room] → topic). The palace-style hierarchy
1568
+ * then post-filters results so wing=X/room=Y queries only return
1569
+ * entries recorded under X/Y, not X alone. When MEMORY_PALACE is
1570
+ * unset, falls back to standard search (no regression).
1571
+ */
1572
+ searchPalace(query, palace = {}, limit = 10) {
1573
+ if (process.env["MEMORY_PALACE"] !== "1") {
1574
+ return this.search(query, limit);
1575
+ }
1576
+ const path = { hall: palace.hall ?? "" };
1577
+ const { domain, topic } = palace.hall
1578
+ ? palaceToStoreFields({
1579
+ hall: palace.hall,
1580
+ ...(palace.wing ? { wing: palace.wing } : {}),
1581
+ ...(palace.room ? { room: palace.room } : {}),
1582
+ })
1583
+ : { domain: "", topic: undefined };
1584
+ const hits = this.searchPartitioned(query, {
1585
+ limit: limit * 2,
1586
+ ...(domain ? { domain } : {}),
1587
+ ...(topic ? { topic } : {}),
1588
+ });
1589
+ if (!palace.hall)
1590
+ return hits.slice(0, limit);
1591
+ // Post-filter: require the row's palace-path to fall under the query.
1592
+ const filtered = hits.filter((h) => {
1593
+ const rowPath = palaceFromStoreFields({
1594
+ domain: h.entry.domain ?? "",
1595
+ topic: h.entry.topic,
1596
+ });
1597
+ return palaceIsUnder(rowPath, path);
1598
+ });
1599
+ return filtered.slice(0, limit);
1600
+ }
1601
+ // ── MemPalace helpers (Phase 2 P1-M7) ───────────────────────
1602
+ /**
1603
+ * Phase 2 P1-M7: list every distinct hall currently represented in
1604
+ * memory_entries, derived from the row's domain/topic fields. A hall
1605
+ * is the top-level palace axis ("auth", "deploy", "memory").
1606
+ */
1607
+ palaceListHalls() {
1608
+ const rows = this.db
1609
+ .prepare(`SELECT DISTINCT domain, topic FROM memory_entries WHERE archived = 0 AND domain != ''`)
1610
+ .all();
1611
+ const entries = this.rowsToPalaceEntries(rows);
1612
+ return palaceListHalls(entries);
1613
+ }
1614
+ /** Phase 2 P1-M7: list wings under a hall. */
1615
+ palaceListWings(hall) {
1616
+ const rows = this.db
1617
+ .prepare(`SELECT DISTINCT domain, topic FROM memory_entries
1618
+ WHERE archived = 0 AND domain != ''`)
1619
+ .all();
1620
+ const entries = this.rowsToPalaceEntries(rows);
1621
+ return palaceListWings(entries, hall);
1622
+ }
1623
+ /** Phase 2 P1-M7: list rooms under a specific wing within a hall. */
1624
+ palaceListRooms(hall, wing) {
1625
+ const rows = this.db
1626
+ .prepare(`SELECT DISTINCT domain, topic FROM memory_entries
1627
+ WHERE archived = 0 AND domain != ''`)
1628
+ .all();
1629
+ const entries = this.rowsToPalaceEntries(rows);
1630
+ return palaceListRooms(entries, hall, wing);
1631
+ }
1632
+ /**
1633
+ * Phase 2 P1-M7: tree-view of the palace — counts at hall, wing, and
1634
+ * room granularity. Use together with `palaceTreeText()` for a
1635
+ * printable outline.
1636
+ */
1637
+ palaceCountTree() {
1638
+ const rows = this.db
1639
+ .prepare(`SELECT domain, topic FROM memory_entries WHERE archived = 0 AND domain != ''`)
1640
+ .all();
1641
+ const entries = this.rowsToPalaceEntries(rows);
1642
+ return palaceCountTree(entries);
1643
+ }
1644
+ /**
1645
+ * Phase 2 P1-M7: render the palace tree as a printable outline.
1646
+ * Wraps palaceCountTree + palaceRenderTree so TUIs and CLI consumers
1647
+ * can print a quick palace summary without reaching into mem-palace
1648
+ * directly.
1649
+ */
1650
+ palaceTreeText() {
1651
+ return palaceRenderTree(this.palaceCountTree());
1652
+ }
1653
+ /**
1654
+ * Phase 2 P1-M7: parse a slash-separated palace path and format it
1655
+ * back out. Kept on MemoryStore so the palace API is discoverable
1656
+ * from a single entry point.
1657
+ */
1658
+ palaceParsePath(pathString) {
1659
+ return palaceParsePath(pathString);
1660
+ }
1661
+ palaceFormatPath(path) {
1662
+ return palaceFormatPath(path);
1663
+ }
1664
+ /**
1665
+ * Convert memory_entries rows to MemPalaceEntry shape. Derives the
1666
+ * palace path from domain/topic fields via the shared
1667
+ * palaceFromStoreFields helper.
1668
+ */
1669
+ rowsToPalaceEntries(rows) {
1670
+ return rows.map((r) => ({
1671
+ path: palaceFromStoreFields({ domain: r.domain, topic: r.topic ?? "" }),
1672
+ data: null,
1673
+ }));
1674
+ }
1675
+ // ── Contextual embeddings helpers (Phase 2 P1-M7) ───────────
1676
+ /**
1677
+ * Phase 2 P1-M7: install a ContextualChunkGenerator on this store.
1678
+ * When set, every subsequent insert() will call the generator and
1679
+ * prepend ~50 tokens of context to the indexed value per Anthropic's
1680
+ * contextual retrieval guidelines.
1681
+ *
1682
+ * Thin wrapper over setContextGenerator that accepts the structured
1683
+ * ContextualChunkGenerator type defined in contextual-embeddings.ts.
1684
+ */
1685
+ asyncContextGenerator = null;
1686
+ installContextGenerator(generator) {
1687
+ this.asyncContextGenerator = generator;
1688
+ }
1689
+ /** Phase 2 P1-M7: retrieve the installed async ContextualChunkGenerator. */
1690
+ getContextGenerator() {
1691
+ return this.asyncContextGenerator;
1692
+ }
1693
+ /**
1694
+ * Phase 2 P1-M7: convenience — wrap an LLM query function as a
1695
+ * ContextualChunkGenerator and install it in one call.
1696
+ */
1697
+ enableContextualRetrieval(llm) {
1698
+ this.installContextGenerator(createLlmContextGenerator(llm));
1699
+ }
1700
+ /**
1701
+ * Phase 2 P1-M7: build one contextual chunk (chunk + LLM-derived
1702
+ * context). Exposed for callers that want to precompute chunks
1703
+ * offline before inserting into memory.
1704
+ */
1705
+ async buildContextualChunk(chunk, document, llm) {
1706
+ const generator = createLlmContextGenerator(llm);
1707
+ const built = await buildContextualChunk(chunk, document, generator);
1708
+ return built.contextualized;
1709
+ }
1710
+ /**
1711
+ * Phase 2 P1-M7: batch version — build multiple contextual chunks
1712
+ * with bounded concurrency.
1713
+ */
1714
+ async buildContextualChunksBatch(chunks, document, llm, options) {
1715
+ const generator = createLlmContextGenerator(llm);
1716
+ const built = await buildBatchedContextualChunks(chunks, document, generator, options);
1717
+ return built.map((b) => b.contextualized);
1718
+ }
1719
+ /**
1720
+ * Phase 13 Wave-3C — extended search modes (Cognee parity). Dispatches
1721
+ * to extended-search-types for non-default modes: temporal-filtered,
1722
+ * summary-only, metadata-only, hybrid-fusion. Default mode falls
1723
+ * through to FTS5 search. Non-default modes return an empty list when
1724
+ * the store has no entries matching the mode's criteria.
1725
+ */
1726
+ searchExtended(query, options = {}) {
1727
+ const mode = options.mode ?? "default";
1728
+ const limit = options.limit ?? 10;
1729
+ if (mode === "default")
1730
+ return this.search(query, limit);
1731
+ const ftsHits = this.search(query, limit * 2);
1732
+ const entries = ftsHits.map((h) => ({
1733
+ id: h.entry.id,
1734
+ content: h.entry.value,
1735
+ ...(h.entry.documentDate ? { timestamp: h.entry.documentDate } : {}),
1736
+ ...(h.entry.tags ? { metadata: { type: h.entry.tags } } : {}),
1737
+ }));
1738
+ const byId = new Map(ftsHits.map((h) => [h.entry.id, h]));
1739
+ let hits = [];
1740
+ if (mode === "temporal-filtered" && options.temporal) {
1741
+ hits = temporalFiltered(entries, options.temporal);
1742
+ }
1743
+ else if (mode === "summary-only") {
1744
+ hits = summaryOnly(entries);
1745
+ }
1746
+ else if (mode === "metadata-only" && options.metadata) {
1747
+ hits = metadataOnly(entries, options.metadata);
1748
+ }
1749
+ else if (mode === "hybrid-fusion" && options.secondaryRanking) {
1750
+ const primary = ftsHits.map((h, rank) => ({
1751
+ entry: {
1752
+ id: h.entry.id,
1753
+ content: h.entry.value,
1754
+ ...(h.entry.documentDate ? { timestamp: h.entry.documentDate } : {}),
1755
+ },
1756
+ score: 1 / (rank + 1),
1757
+ }));
1758
+ const secondary = options.secondaryRanking.map((h, rank) => ({
1759
+ entry: {
1760
+ id: h.entry.id,
1761
+ content: h.entry.value,
1762
+ ...(h.entry.documentDate ? { timestamp: h.entry.documentDate } : {}),
1763
+ },
1764
+ score: 1 / (rank + 1),
1765
+ }));
1766
+ hits = rrfFusion([primary, secondary]);
1767
+ }
1768
+ return hits
1769
+ .map((hit) => byId.get(hit.entry.id))
1770
+ .filter((r) => r !== undefined)
1771
+ .slice(0, limit);
1772
+ }
1773
+ // ── TEMPR (Phase 2 P1-M4, Hindsight port) ──────────────
1774
+ /**
1775
+ * TEMPR 4-channel parallel retrieval + RRF + cross-encoder rerank.
1776
+ *
1777
+ * Hindsight port (arXiv 2512.12818) — 91.4% LongMemEval-S reference.
1778
+ * Runs 4 canonical channels in parallel over this store:
1779
+ *
1780
+ * 1. VECTOR — dense retrieval via caller-supplied embedder
1781
+ * (falls back to FTS5-equivalent if no embedder)
1782
+ * 2. BM25 — FTS5 lexical match (store.search)
1783
+ * 3. ENTITY — KG-aware: parses query entity candidates and
1784
+ * retrieves entries whose content mentions any
1785
+ * related entity (from knowledge_nodes + M7 edges)
1786
+ * 4. TEMPORAL — bi-temporal snapshot: returns entries adjacent
1787
+ * to edges valid at `opts.validAt` (leverages M5
1788
+ * queryValidAt). When no validAt, falls back to
1789
+ * eventDate/documentDate proximity to `opts.now`.
1790
+ *
1791
+ * Failed channels (exceptions from the backing calls) are isolated
1792
+ * — the remaining channels still contribute. A channel that crashes
1793
+ * is captured in `result.channelResults.get(name).error`; the overall
1794
+ * query never crashes.
1795
+ *
1796
+ * Cross-encoder: defaults to the word-overlap heuristic (good
1797
+ * enough for wiring; the real MS MARCO MiniLM lands in P1-M2 via
1798
+ * createCrossEncoderFromFn). Pass `crossEncoder: null` to skip
1799
+ * rerank entirely.
1800
+ *
1801
+ * Per-query isolation: every call constructs a fresh TEMPR handle
1802
+ * over snapshot channel functions — no shared state between calls.
1803
+ */
1804
+ async temprSearch(query, opts = {}) {
1805
+ const topK = opts.topK ?? 20;
1806
+ const pool = opts.candidatePool ?? Math.max(50, topK * 3);
1807
+ // Resolve the asymmetric prefix profile ONCE per call. Order:
1808
+ // 1. Explicit profile override (highest priority).
1809
+ // 2. Registry lookup by model name.
1810
+ // 3. null (symmetric / no prefix).
1811
+ // The env-var gate suppresses the entire feature when off — keeps
1812
+ // existing un-prefixed indexes from getting score-skewed by a
1813
+ // prefixed query embedding (see embedding-profiles.ts header).
1814
+ const prefixesEnabled = isAsymmetricEmbeddingsEnabled();
1815
+ const resolvedProfile = !prefixesEnabled
1816
+ ? null
1817
+ : (opts.embeddingProfile ??
1818
+ (opts.embeddingModel ? getEmbeddingProfile(opts.embeddingModel) : null));
1819
+ // Build each channel. Each channel is a closure over `this`. Errors
1820
+ // inside the closure become rejections that TEMPR captures — never
1821
+ // swallow here.
1822
+ const vectorChannel = {
1823
+ name: "vector",
1824
+ retrieve: async (args) => {
1825
+ if (!opts.embed) {
1826
+ // No embedder provided — emit empty rather than faking
1827
+ // (quality bar: honest failure). Caller sees the empty
1828
+ // channel result and can decide what to do.
1829
+ return { candidates: [] };
1830
+ }
1831
+ // Phase 2 P1-M2 (OMEGA): native sqlite-vec knn path.
1832
+ // When a vectorBackend is provided, route through it rather
1833
+ // than doing per-row cosine. The backend is populated by the
1834
+ // caller (typically via MemoryStore.upsertEmbedding).
1835
+ // V9 T1.3: when `opts.vectorBackend` is omitted, fall back to
1836
+ // the store's attached `this.vectorBackend` so callers that
1837
+ // called `attachVectorBackend()` at setup time get sqlite-vec
1838
+ // routing automatically.
1839
+ const resolvedBackend = opts.vectorBackend ?? this.vectorBackend;
1840
+ if (resolvedBackend) {
1841
+ try {
1842
+ // LightRAG asymmetric-prefix port: prepend the model's
1843
+ // recommended query prefix BEFORE embedding. No-op when
1844
+ // the env-var gate is off OR the model isn't in the
1845
+ // registry (resolvedProfile === null).
1846
+ const queryText = applyQueryPrefix(resolvedProfile, args.query);
1847
+ const queryVec = await opts.embed(queryText);
1848
+ const hits = resolvedBackend.knn(queryVec, pool);
1849
+ if (hits.length === 0)
1850
+ return { candidates: [] };
1851
+ // Rehydrate content from the store. Missing ids (stale
1852
+ // index) are dropped silently — honest fail.
1853
+ const cands = [];
1854
+ for (const h of hits) {
1855
+ const entry = this.getById(h.id);
1856
+ if (entry) {
1857
+ cands.push({ id: entry.id, content: entry.value });
1858
+ }
1859
+ }
1860
+ return { candidates: cands };
1861
+ }
1862
+ catch {
1863
+ // sqlite-vec path failed — fall through to FTS5+cosine
1864
+ // fallback below. Honest degradation.
1865
+ }
1866
+ }
1867
+ // Baseline vector retrieval: FTS5 shortlist → cosine rerank
1868
+ // against query embedding. This is a COARSE approximation
1869
+ // used when sqlite-vec isn't wired.
1870
+ const shortlist = this.search(args.query, pool);
1871
+ if (shortlist.length === 0)
1872
+ return { candidates: [] };
1873
+ // LightRAG asymmetric-prefix port: query gets queryPrefix,
1874
+ // each doc gets docPrefix — different prefixes are the whole
1875
+ // point of this branch. Both calls no-op when the gate is off.
1876
+ const queryVec = await opts.embed(applyQueryPrefix(resolvedProfile, args.query));
1877
+ const scored = [];
1878
+ for (const row of shortlist) {
1879
+ const docVec = await opts.embed(applyDocPrefix(resolvedProfile, row.entry.value));
1880
+ const score = cosineSimTempr(queryVec, docVec);
1881
+ if (score > 0) {
1882
+ scored.push({
1883
+ c: { id: row.entry.id, content: row.entry.value },
1884
+ score,
1885
+ });
1886
+ }
1887
+ }
1888
+ scored.sort((a, b) => b.score - a.score);
1889
+ return { candidates: scored.slice(0, pool).map((s) => s.c) };
1890
+ },
1891
+ };
1892
+ const bm25Channel = {
1893
+ name: "bm25",
1894
+ retrieve: async (args) => {
1895
+ const results = this.search(args.query, pool);
1896
+ return {
1897
+ candidates: results.map((r) => ({
1898
+ id: r.entry.id,
1899
+ content: r.entry.value,
1900
+ })),
1901
+ };
1902
+ },
1903
+ };
1904
+ const entityChannel = {
1905
+ name: "entity",
1906
+ retrieve: async (args) => {
1907
+ // Heuristic entity extraction from the query: capitalized
1908
+ // tokens + quoted strings. Good enough for the channel split
1909
+ // (we don't need a full NER — the LLM-based extraction lives
1910
+ // in observation-extractor and feeds into recordEntity).
1911
+ const tokens = extractQueryEntities(args.query);
1912
+ if (tokens.length === 0)
1913
+ return { candidates: [] };
1914
+ // Look up knowledge_nodes by any matching entity name, then
1915
+ // find memory entries that mention any related entity.
1916
+ const collected = new Map();
1917
+ for (const tok of tokens) {
1918
+ try {
1919
+ const related = this.getRelatedEntities(tok, 2);
1920
+ for (const node of related) {
1921
+ // Find entries whose value mentions this entity name.
1922
+ // FTS5 quoted-phrase search: "Alice" (no operators).
1923
+ const safe = fts5QuoteName(node.entity);
1924
+ if (!safe)
1925
+ continue;
1926
+ const rows = this.search(safe, 20);
1927
+ for (const row of rows) {
1928
+ if (!collected.has(row.entry.id)) {
1929
+ collected.set(row.entry.id, {
1930
+ id: row.entry.id,
1931
+ content: row.entry.value,
1932
+ metadata: { entityMatch: node.entity, entityType: node.entityType },
1933
+ });
1934
+ }
1935
+ }
1936
+ }
1937
+ }
1938
+ catch {
1939
+ // skip this token — another might match
1940
+ }
1941
+ }
1942
+ return { candidates: [...collected.values()].slice(0, pool) };
1943
+ },
1944
+ };
1945
+ const temporalChannel = {
1946
+ name: "temporal",
1947
+ retrieve: async (_args) => {
1948
+ // If a validAt is provided, fetch edges valid at that point
1949
+ // and surface entries connected (via KG node.entity) to those
1950
+ // edges' source/target. Otherwise, surface entries whose
1951
+ // documentDate/eventDate is closest to `now` — a recency
1952
+ // proxy for temporal relevance.
1953
+ if (opts.validAt) {
1954
+ try {
1955
+ const edges = this.queryValidAt(opts.validAt);
1956
+ if (edges.length === 0)
1957
+ return { candidates: [] };
1958
+ // Resolve each edge's source/target knowledge_node entity
1959
+ // name, then collect matching entries.
1960
+ const entityNames = new Set();
1961
+ for (const edge of edges.slice(0, pool)) {
1962
+ const sNode = this.db
1963
+ .prepare(`SELECT entity FROM knowledge_nodes WHERE id = ?`)
1964
+ .get(edge.sourceId);
1965
+ const tNode = this.db
1966
+ .prepare(`SELECT entity FROM knowledge_nodes WHERE id = ?`)
1967
+ .get(edge.targetId);
1968
+ if (sNode?.entity)
1969
+ entityNames.add(sNode.entity);
1970
+ if (tNode?.entity)
1971
+ entityNames.add(tNode.entity);
1972
+ }
1973
+ const collected = new Map();
1974
+ for (const name of entityNames) {
1975
+ const safe = fts5QuoteName(name);
1976
+ if (!safe)
1977
+ continue;
1978
+ const rows = this.search(safe, 10);
1979
+ for (const row of rows) {
1980
+ if (!collected.has(row.entry.id)) {
1981
+ collected.set(row.entry.id, {
1982
+ id: row.entry.id,
1983
+ content: row.entry.value,
1984
+ metadata: { temporalEntity: name, validAt: opts.validAt },
1985
+ });
1986
+ }
1987
+ }
1988
+ }
1989
+ return { candidates: [...collected.values()].slice(0, pool) };
1990
+ }
1991
+ catch {
1992
+ return { candidates: [] };
1993
+ }
1994
+ }
1995
+ // Fallback: recency-based. Pick entries with documentDate
1996
+ // closest to `now` from within a BM25 shortlist for relevance.
1997
+ const now = opts.now ?? Date.now();
1998
+ const shortlist = this.search(query, pool);
1999
+ const scored = shortlist
2000
+ .filter((r) => r.entry.documentDate !== undefined)
2001
+ .map((r) => {
2002
+ const age = Math.abs(now - r.entry.documentDate);
2003
+ return { entry: r.entry, age };
2004
+ })
2005
+ .sort((a, b) => a.age - b.age);
2006
+ return {
2007
+ candidates: scored.slice(0, pool).map((s) => ({
2008
+ id: s.entry.id,
2009
+ content: s.entry.value,
2010
+ metadata: { temporalRecencyAge: s.age },
2011
+ })),
2012
+ };
2013
+ },
2014
+ };
2015
+ // V9 T1.4: when `opts.crossEncoder` is omitted, default to the
2016
+ // store's attached `this.defaultCrossEncoder` (ONNX when attached
2017
+ // via `attachOnnxCrossEncoder`, heuristic otherwise). Passing
2018
+ // `null` still explicitly disables reranking.
2019
+ const crossEncoder = opts.crossEncoder === null ? undefined : (opts.crossEncoder ?? this.defaultCrossEncoder);
2020
+ const tempr = createTEMPR({
2021
+ channels: [vectorChannel, bm25Channel, entityChannel, temporalChannel],
2022
+ ...(crossEncoder !== undefined ? { crossEncoder } : {}),
2023
+ topK,
2024
+ ...(opts.onChannelError !== undefined ? { onChannelError: opts.onChannelError } : {}),
2025
+ });
2026
+ const searchOpts = { topK };
2027
+ const result = await tempr.search(query, searchOpts);
2028
+ // Rehydrate full MemoryEntry on each hit (callers typically want
2029
+ // the full entry, not just id + content).
2030
+ const hits = result.hits.map((hit) => ({
2031
+ ...hit,
2032
+ entry: this.getById(hit.id),
2033
+ }));
2034
+ return {
2035
+ hits,
2036
+ channelResults: result.channelResults,
2037
+ rerankerApplied: result.rerankerApplied,
2038
+ durationMs: result.durationMs,
2039
+ };
2040
+ }
2041
+ /** Get all unique domains in the memory store. */
2042
+ getDomains() {
2043
+ const rows = this.db
2044
+ .prepare(`SELECT DISTINCT domain FROM memory_entries WHERE archived = 0 AND domain != '' ORDER BY domain`)
2045
+ .all();
2046
+ return rows.map((r) => r.domain);
2047
+ }
2048
+ /** Get all unique topics within a domain (or all topics if no domain specified). */
2049
+ getTopics(domain) {
2050
+ const rows = domain
2051
+ ? this.db
2052
+ .prepare(`SELECT DISTINCT topic FROM memory_entries WHERE archived = 0 AND domain = ? AND topic != '' ORDER BY topic`)
2053
+ .all(domain)
2054
+ : this.db
2055
+ .prepare(`SELECT DISTINCT topic FROM memory_entries WHERE archived = 0 AND topic != '' ORDER BY topic`)
2056
+ .all();
2057
+ return rows.map((r) => r.topic);
2058
+ }
2059
+ // ── Consolidation Lock ─────────────────────────────────────
2060
+ acquireConsolidationLock(lockId) {
2061
+ const lockPath = join(this.dbPath, "..", "consolidation.lock");
2062
+ if (existsSync(lockPath)) {
2063
+ try {
2064
+ const lockData = JSON.parse(readFileSync(lockPath, "utf-8"));
2065
+ if (Date.now() - lockData.timestamp > 30 * 60 * 1000) {
2066
+ unlinkSync(lockPath);
2067
+ }
2068
+ else {
2069
+ return false;
2070
+ }
2071
+ }
2072
+ catch {
2073
+ try {
2074
+ unlinkSync(lockPath);
2075
+ }
2076
+ catch {
2077
+ /* ignore */
2078
+ }
2079
+ }
2080
+ }
2081
+ try {
2082
+ writeFileSync(lockPath, JSON.stringify({ lockId, timestamp: Date.now() }), { flag: "wx" });
2083
+ return true;
2084
+ }
2085
+ catch {
2086
+ return false;
2087
+ }
2088
+ }
2089
+ releaseConsolidationLock() {
2090
+ const lockPath = join(this.dbPath, "..", "consolidation.lock");
2091
+ try {
2092
+ unlinkSync(lockPath);
2093
+ }
2094
+ catch {
2095
+ /* ignore */
2096
+ }
2097
+ }
2098
+ // ── Decision Log ───────────────────────────────────────────
2099
+ logDecision(decision) {
2100
+ this.db
2101
+ .prepare(`
2102
+ INSERT INTO decision_log (id, decision, rationale, alternatives, constraints, stakeholders, session_id)
2103
+ VALUES (?, ?, ?, ?, ?, ?, ?)
2104
+ `)
2105
+ .run(decision.id, decision.decision, decision.rationale, decision.alternatives ?? null, decision.constraints ?? null, decision.stakeholders ?? null, decision.sessionId ?? null);
2106
+ }
2107
+ getDecisions(limit = 20) {
2108
+ return this.db
2109
+ .prepare(`SELECT * FROM decision_log ORDER BY created_at DESC LIMIT ?`)
2110
+ .all(limit);
2111
+ }
2112
+ // ── Memory Tools (6 agent-callable tools per spec) ─────────
2113
+ memoryReplace(block, key, value, domain, topic) {
2114
+ const existing = this.db
2115
+ .prepare(`
2116
+ SELECT id FROM memory_entries WHERE block_type = ? AND key = ? AND archived = 0
2117
+ `)
2118
+ .get(block, key);
2119
+ if (existing) {
2120
+ this.replace(existing.id, key, value);
2121
+ }
2122
+ else {
2123
+ this.insert({
2124
+ id: randomUUID(),
2125
+ layer: "core_blocks",
2126
+ blockType: block,
2127
+ key,
2128
+ value,
2129
+ verified: false,
2130
+ freshnessScore: 1.0,
2131
+ confidenceLevel: 0.8,
2132
+ verificationStatus: "unverified",
2133
+ domain: domain ?? "",
2134
+ topic: topic ?? "",
2135
+ });
2136
+ }
2137
+ }
2138
+ memoryInsert(block, key, value, domain, topic) {
2139
+ this.insert({
2140
+ id: randomUUID(),
2141
+ layer: "core_blocks",
2142
+ blockType: block,
2143
+ key,
2144
+ value,
2145
+ verified: false,
2146
+ freshnessScore: 1.0,
2147
+ confidenceLevel: 0.8,
2148
+ verificationStatus: "unverified",
2149
+ domain: domain ?? "",
2150
+ topic: topic ?? "",
2151
+ });
2152
+ }
2153
+ memoryRethink(entryId, newValue) {
2154
+ const entry = this.getById(entryId);
2155
+ if (!entry)
2156
+ return null;
2157
+ this.replace(entryId, entry.key, newValue);
2158
+ return { ...entry, value: newValue };
2159
+ }
2160
+ memorySearch(query, optionsOrLayers) {
2161
+ // Backward compat: accept both old (layers array) and new (options object) signatures
2162
+ if (Array.isArray(optionsOrLayers)) {
2163
+ // Old API: memorySearch(query, layers[])
2164
+ const results = this.searchPartitioned(query, { limit: 50 });
2165
+ return optionsOrLayers.length === 0
2166
+ ? results
2167
+ : results.filter((r) => optionsOrLayers.includes(r.entry.layer));
2168
+ }
2169
+ // New API: memorySearch(query, { layers?, domain?, topic? })
2170
+ const opts = (optionsOrLayers ?? {});
2171
+ const results = this.searchPartitioned(query, {
2172
+ domain: opts.domain,
2173
+ topic: opts.topic,
2174
+ limit: 50,
2175
+ });
2176
+ if (!opts.layers || opts.layers.length === 0)
2177
+ return results;
2178
+ return results.filter((r) => opts.layers.includes(r.entry.layer));
2179
+ }
2180
+ memoryArchive(entryId) {
2181
+ const entry = this.getById(entryId);
2182
+ if (!entry)
2183
+ return false;
2184
+ this.archive(entryId);
2185
+ return true;
2186
+ }
2187
+ memoryVerify(entryId) {
2188
+ const entry = this.getById(entryId);
2189
+ if (entry) {
2190
+ this.db
2191
+ .prepare(`UPDATE memory_entries SET verified = 1, updated_at = datetime('now') WHERE id = ?`)
2192
+ .run(entryId);
2193
+ return { ...entry, verified: true };
2194
+ }
2195
+ return null;
2196
+ }
2197
+ // ── Stats ──────────────────────────────────────────────────
2198
+ getEntryCount() {
2199
+ return this.db.prepare(`SELECT COUNT(*) as count FROM memory_entries WHERE archived = 0`).get().count;
2200
+ }
2201
+ getLayerStats() {
2202
+ const rows = this.db
2203
+ .prepare(`
2204
+ SELECT layer, COUNT(*) as count FROM memory_entries WHERE archived = 0 GROUP BY layer
2205
+ `)
2206
+ .all();
2207
+ const stats = {};
2208
+ for (const r of rows)
2209
+ stats[r.layer] = r.count;
2210
+ return stats;
2211
+ }
2212
+ // ── Helpers ────────────────────────────────────────────────
2213
+ rowToEntry(row) {
2214
+ return {
2215
+ id: row["id"],
2216
+ layer: row["layer"],
2217
+ blockType: row["block_type"],
2218
+ key: row["key"],
2219
+ value: row["value"],
2220
+ createdAt: row["created_at"],
2221
+ updatedAt: row["updated_at"],
2222
+ sessionId: row["session_id"],
2223
+ verified: Boolean(row["verified"]),
2224
+ confidence: row["confidence"],
2225
+ tags: row["tags"],
2226
+ sourceType: row["source_type"],
2227
+ sourceFile: row["source_file"],
2228
+ freshnessScore: row["freshness_score"] ?? 1.0,
2229
+ confidenceLevel: row["confidence_level"] ?? 0.5,
2230
+ lastVerifiedAt: row["last_verified_at"],
2231
+ verificationStatus: row["verification_status"] ?? "unverified",
2232
+ domain: row["domain"] ?? "",
2233
+ topic: row["topic"] ?? "",
2234
+ documentDate: row["document_date"],
2235
+ eventDate: row["event_date"],
2236
+ eventDateUncertaintyMs: row["event_date_uncertainty_ms"],
2237
+ eventDateSource: row["event_date_source"] ?? "",
2238
+ };
2239
+ }
2240
+ // ── Vector Embeddings ──────────────────────────────────────
2241
+ /**
2242
+ * Store a vector embedding for a memory entry.
2243
+ * Uses trigram-based local embeddings by default (zero API calls).
2244
+ */
2245
+ storeEmbedding(entryId, embedding, model = "local-trigram") {
2246
+ this.db
2247
+ .prepare(`
2248
+ INSERT OR REPLACE INTO memory_vectors (entry_id, embedding, model, dimensions)
2249
+ VALUES (?, ?, ?, ?)
2250
+ `)
2251
+ .run(entryId, Buffer.from(embedding.buffer), model, embedding.length);
2252
+ }
2253
+ /**
2254
+ * Generate a local trigram-based embedding (no API needed).
2255
+ * Not as good as nomic-embed-text but works offline.
2256
+ */
2257
+ generateLocalEmbedding(text) {
2258
+ const normalized = text.toLowerCase().replace(/[^a-z0-9\s]/g, "");
2259
+ const words = normalized.split(/\s+/).filter(Boolean);
2260
+ // Simple bag-of-trigrams → fixed-size vector via hashing
2261
+ const DIMS = 256;
2262
+ const vec = new Float32Array(DIMS);
2263
+ for (const word of words) {
2264
+ for (let i = 0; i <= word.length - 3; i++) {
2265
+ const trigram = word.slice(i, i + 3);
2266
+ let hash = 0;
2267
+ for (let j = 0; j < trigram.length; j++) {
2268
+ hash = ((hash << 5) - hash + trigram.charCodeAt(j)) | 0;
2269
+ }
2270
+ const idx = Math.abs(hash) % DIMS;
2271
+ vec[idx] = (vec[idx] ?? 0) + 1;
2272
+ }
2273
+ }
2274
+ // L2 normalize
2275
+ let norm = 0;
2276
+ for (let i = 0; i < DIMS; i++)
2277
+ norm += (vec[i] ?? 0) * (vec[i] ?? 0);
2278
+ norm = Math.sqrt(norm);
2279
+ if (norm > 0) {
2280
+ for (let i = 0; i < DIMS; i++)
2281
+ vec[i] = (vec[i] ?? 0) / norm;
2282
+ }
2283
+ return vec;
2284
+ }
2285
+ /**
2286
+ * Cosine similarity between two embeddings.
2287
+ */
2288
+ cosineSimilarity(a, b) {
2289
+ let dot = 0;
2290
+ let normA = 0;
2291
+ let normB = 0;
2292
+ const len = Math.min(a.length, b.length);
2293
+ for (let i = 0; i < len; i++) {
2294
+ dot += (a[i] ?? 0) * (b[i] ?? 0);
2295
+ normA += (a[i] ?? 0) * (a[i] ?? 0);
2296
+ normB += (b[i] ?? 0) * (b[i] ?? 0);
2297
+ }
2298
+ const denom = Math.sqrt(normA) * Math.sqrt(normB);
2299
+ return denom > 0 ? dot / denom : 0;
2300
+ }
2301
+ /**
2302
+ * Vector similarity search across all memory entries with embeddings.
2303
+ * Optional domainFilter narrows the candidate set to entries in the specified
2304
+ * domains (MemPalace-style partition). Up to +34% retrieval improvement.
2305
+ */
2306
+ vectorSearch(query, limit = 10, options) {
2307
+ const queryEmbedding = this.generateLocalEmbedding(query);
2308
+ const domainFilter = options?.domainFilter ?? [];
2309
+ const hasDomainFilter = domainFilter.length > 0;
2310
+ const sqlParts = [
2311
+ "SELECT mv.entry_id, mv.embedding, mv.dimensions",
2312
+ "FROM memory_vectors mv",
2313
+ "JOIN memory_entries me ON me.id = mv.entry_id",
2314
+ "WHERE me.archived = 0",
2315
+ ];
2316
+ const params = [];
2317
+ if (hasDomainFilter) {
2318
+ const placeholders = domainFilter.map(() => "?").join(", ");
2319
+ sqlParts.push(`AND me.domain IN (${placeholders})`);
2320
+ for (const d of domainFilter)
2321
+ params.push(d);
2322
+ }
2323
+ const rows = this.db.prepare(sqlParts.join(" ")).all(...params);
2324
+ const scored = rows.map((row) => {
2325
+ const embedding = new Float32Array(row.embedding.buffer, row.embedding.byteOffset, row.dimensions);
2326
+ const similarity = this.cosineSimilarity(queryEmbedding, embedding);
2327
+ return { entryId: row.entry_id, similarity };
2328
+ });
2329
+ scored.sort((a, b) => b.similarity - a.similarity);
2330
+ return scored
2331
+ .slice(0, limit)
2332
+ .map((s) => ({
2333
+ entryId: s.entryId,
2334
+ similarity: s.similarity,
2335
+ entry: this.getById(s.entryId),
2336
+ }))
2337
+ .filter((r) => r.entry !== null);
2338
+ }
2339
+ // ── Reciprocal Rank Fusion Search ──────────────────────────
2340
+ /**
2341
+ * Hybrid search combining FTS5 (BM25), vector similarity, temporal recency,
2342
+ * and access frequency using Reciprocal Rank Fusion.
2343
+ * Optional domainFilter narrows every signal to entries in the specified domains.
2344
+ */
2345
+ hybridSearch(query, limit = 10, options) {
2346
+ const K = 60; // RRF constant
2347
+ const domainFilter = options?.domainFilter ?? [];
2348
+ const hasDomainFilter = domainFilter.length > 0;
2349
+ // Signal 1: FTS5 BM25
2350
+ const ftsResults = this.search(query, limit * 2, { domainFilter });
2351
+ const ftsRanks = new Map();
2352
+ ftsResults.forEach((r, i) => ftsRanks.set(r.entry.id, i + 1));
2353
+ // Signal 2: Vector similarity
2354
+ const vecResults = this.vectorSearch(query, limit * 2, { domainFilter });
2355
+ const vecRanks = new Map();
2356
+ vecResults.forEach((r, i) => vecRanks.set(r.entryId, i + 1));
2357
+ // Signal 3: Temporal recency (all non-archived entries sorted by date)
2358
+ let recentSql = "SELECT id FROM memory_entries WHERE archived = 0";
2359
+ const recentParams = [];
2360
+ if (hasDomainFilter) {
2361
+ const placeholders = domainFilter.map(() => "?").join(", ");
2362
+ recentSql += ` AND domain IN (${placeholders})`;
2363
+ for (const d of domainFilter)
2364
+ recentParams.push(d);
2365
+ }
2366
+ recentSql += " ORDER BY updated_at DESC LIMIT ?";
2367
+ recentParams.push(limit * 3);
2368
+ const recentRows = this.db.prepare(recentSql).all(...recentParams);
2369
+ const recencyRanks = new Map();
2370
+ recentRows.forEach((r, i) => recencyRanks.set(r.id, i + 1));
2371
+ // Signal 4: Access frequency
2372
+ let freqSql = "SELECT id FROM memory_entries WHERE archived = 0";
2373
+ const freqParams = [];
2374
+ if (hasDomainFilter) {
2375
+ const placeholders = domainFilter.map(() => "?").join(", ");
2376
+ freqSql += ` AND domain IN (${placeholders})`;
2377
+ for (const d of domainFilter)
2378
+ freqParams.push(d);
2379
+ }
2380
+ freqSql += " ORDER BY access_count DESC LIMIT ?";
2381
+ freqParams.push(limit * 3);
2382
+ const freqRows = this.db.prepare(freqSql).all(...freqParams);
2383
+ const freqRanks = new Map();
2384
+ freqRows.forEach((r, i) => freqRanks.set(r.id, i + 1));
2385
+ // Merge all candidate IDs
2386
+ const allIds = new Set([
2387
+ ...ftsRanks.keys(),
2388
+ ...vecRanks.keys(),
2389
+ ...recencyRanks.keys(),
2390
+ ...freqRanks.keys(),
2391
+ ]);
2392
+ // Compute RRF score
2393
+ const scored = [];
2394
+ for (const id of allIds) {
2395
+ const ftsRank = ftsRanks.get(id) ?? Infinity;
2396
+ const vecRank = vecRanks.get(id) ?? Infinity;
2397
+ const recRank = recencyRanks.get(id) ?? Infinity;
2398
+ const freqRank = freqRanks.get(id) ?? Infinity;
2399
+ const score = (ftsRank < Infinity ? 1 / (K + ftsRank) : 0) * 0.4 +
2400
+ (vecRank < Infinity ? 1 / (K + vecRank) : 0) * 0.3 +
2401
+ (recRank < Infinity ? 1 / (K + recRank) : 0) * 0.2 +
2402
+ (freqRank < Infinity ? 1 / (K + freqRank) : 0) * 0.1;
2403
+ scored.push({ id, score });
2404
+ }
2405
+ scored.sort((a, b) => b.score - a.score);
2406
+ const results = [];
2407
+ for (const s of scored.slice(0, limit)) {
2408
+ const entry = this.getById(s.id);
2409
+ if (!entry)
2410
+ continue;
2411
+ results.push({
2412
+ entry,
2413
+ score: s.score,
2414
+ snippet: entry.value.slice(0, 200),
2415
+ matchType: "hybrid",
2416
+ });
2417
+ }
2418
+ return results;
2419
+ }
2420
+ // ── Semantic retrieval cache (Phase 2 P1-M7) ───────────────
2421
+ /**
2422
+ * Phase 2 P1-M7: expose the semantic-cache backend via MemoryStore
2423
+ * so callers can build a deduped retrieval cache without importing
2424
+ * semantic-cache directly. The cache's lifetime is the store's
2425
+ * lifetime; call `clearRetrievalCache()` to reset or
2426
+ * `getRetrievalCacheStats()` to observe.
2427
+ */
2428
+ retrievalCache = null;
2429
+ getRetrievalCache(options) {
2430
+ if (!this.retrievalCache) {
2431
+ this.retrievalCache = new SemanticCache({
2432
+ similarityThreshold: options?.similarityThreshold ?? 0.9,
2433
+ maxEntries: options?.maxEntries ?? 200,
2434
+ ttlMs: options?.ttlMs ?? 10 * 60 * 1000,
2435
+ embed: options?.embed ?? (async (text) => bigramEmbedding(text)),
2436
+ });
2437
+ }
2438
+ return this.retrievalCache;
2439
+ }
2440
+ /**
2441
+ * Phase 2 P1-M7: cached wrapper around search() — returns previously
2442
+ * computed results when the query embedding is near-identical to a
2443
+ * prior miss. Miss falls through to live search, result is cached.
2444
+ */
2445
+ async cachedSearch(query, limit = 10, options) {
2446
+ const cache = this.getRetrievalCache(options);
2447
+ const hit = await cache.get(query);
2448
+ if (hit !== null)
2449
+ return hit;
2450
+ const live = this.search(query, limit);
2451
+ await cache.set(query, live);
2452
+ return live;
2453
+ }
2454
+ /** Phase 2 P1-M7: cache observability — hit/miss/eviction counters. */
2455
+ getRetrievalCacheStats() {
2456
+ return this.retrievalCache?.stats() ?? null;
2457
+ }
2458
+ /** Phase 2 P1-M7: clear the retrieval cache. */
2459
+ clearRetrievalCache() {
2460
+ this.retrievalCache?.clear();
2461
+ }
2462
+ // ── Memory benchmark (Phase 2 P1-M7) ───────────────────────
2463
+ /**
2464
+ * Phase 2 P1-M7: run the LongMemEval-style memory benchmark against
2465
+ * this store. Wires the MemoryBenchmark orphan into MemoryStore —
2466
+ * callers just say `store.runMemoryBenchmark()` and receive a
2467
+ * scored BenchmarkSuite. Optional category lets callers run only a
2468
+ * specific slice (e.g. "adversarial", "partitioned").
2469
+ */
2470
+ runMemoryBenchmark(category) {
2471
+ const bench = new MemoryBenchmark();
2472
+ const adapter = {
2473
+ insert: (entry) => {
2474
+ this.insert({
2475
+ id: entry.id,
2476
+ layer: entry.layer,
2477
+ blockType: entry.blockType,
2478
+ key: entry.key,
2479
+ value: entry.value,
2480
+ verified: entry.verified,
2481
+ freshnessScore: entry.freshnessScore,
2482
+ confidenceLevel: entry.confidenceLevel,
2483
+ verificationStatus: entry.verificationStatus,
2484
+ ...(entry.domain ? { domain: entry.domain } : {}),
2485
+ ...(entry.topic ? { topic: entry.topic } : {}),
2486
+ });
2487
+ },
2488
+ search: (query, limit) => {
2489
+ const safe = sanitizeForFts5(query);
2490
+ if (!safe)
2491
+ return [];
2492
+ return this.search(safe, limit).map((r) => ({
2493
+ entry: { key: r.entry.key, value: r.entry.value },
2494
+ score: r.score,
2495
+ }));
2496
+ },
2497
+ searchPartitioned: (query, options) => {
2498
+ const safe = sanitizeForFts5(query);
2499
+ if (!safe)
2500
+ return [];
2501
+ return this.searchPartitioned(safe, options).map((r) => ({
2502
+ entry: { key: r.entry.key, value: r.entry.value },
2503
+ score: r.score,
2504
+ }));
2505
+ },
2506
+ };
2507
+ return category ? bench.runCategory(adapter, category) : bench.run(adapter);
2508
+ }
2509
+ // ── Agent-callable memory toolkit (Phase 2 P1-M7) ──────────
2510
+ /**
2511
+ * Phase 2 P1-M7: return a MemoryToolkit bound to this store.
2512
+ *
2513
+ * MemoryToolkit exposes memory_search / memory_replace / memory_insert
2514
+ * as agent-callable tools following the OpenAI function-calling
2515
+ * schema. Before this wire, the toolkit existed (580 LOC with tests)
2516
+ * but no caller instantiated it — agents couldn't actually invoke
2517
+ * memory operations by name.
2518
+ *
2519
+ * The adapter cast is safe because MemoryStore already implements
2520
+ * every method of MemoryToolStoreAdapter with the exact signatures
2521
+ * used by memory-tools.ts.
2522
+ */
2523
+ createAgentToolkit() {
2524
+ return new MemoryToolkit(this);
2525
+ }
2526
+ /**
2527
+ * Phase 2 P1-M7: fetch the tool definitions (name + schema) for
2528
+ * registering memory ops with a provider that supports function
2529
+ * calling. Convenience so callers don't need to construct a
2530
+ * MemoryToolkit just to read definitions.
2531
+ */
2532
+ getMemoryToolDefinitions() {
2533
+ return this.createAgentToolkit().getToolDefinitions();
2534
+ }
2535
+ /**
2536
+ * Phase 2 P1-M7: dispatch a memory tool by name. Returns the result
2537
+ * envelope with success/error + data payload. Agents pass the
2538
+ * tool_name + arguments received from the provider.
2539
+ */
2540
+ dispatchMemoryTool(toolName, args) {
2541
+ return this.createAgentToolkit().dispatch(toolName, args);
2542
+ }
2543
+ // ── Phase 2 P1-M3: Mem0 v3 agent-facts wrappers ───────────
2544
+ //
2545
+ // Thin forwarders to the agent-facts module so callers holding a
2546
+ // MemoryStore can record and retrieve Mem0 v3 agent-scoped facts
2547
+ // without a second import. The actual tag-encoding / filter logic
2548
+ // lives in `agent-facts.ts` (single source of truth — Quality
2549
+ // Bar #11). These wrappers exist to keep the API symmetric with
2550
+ // other MemoryStore capabilities (e.g., recordEntity, searchPalace).
2551
+ //
2552
+ // Lazy import pattern avoids any circular-module-load edge case
2553
+ // with `agent-facts.ts` which imports MemoryStore as a type. Using
2554
+ // `import()` at call time would make these async; we use a cached
2555
+ // module reference instead to keep the API synchronous.
2556
+ /**
2557
+ * Phase 2 P1-M3: record an ADD-only agent-fact. Delegates to
2558
+ * `recordAgentFact` in `agent-facts.ts`. Honest failure on empty
2559
+ * agentId bubbles up — caller must provide a non-empty identity.
2560
+ */
2561
+ recordAgentFact(fact) {
2562
+ // Synchronous require via eagerly-resolved module ref. The
2563
+ // `agent-facts` module depends only on MemoryStore as a type so
2564
+ // the cycle is harmless at runtime; the lazy binding keeps
2565
+ // initialisation order independent of load order.
2566
+ const mod = getAgentFactsModule();
2567
+ mod.recordAgentFact(this, fact);
2568
+ }
2569
+ /**
2570
+ * Phase 2 P1-M3: retrieve agent-facts scoped to an agent identity.
2571
+ * Delegates to `retrieveAgentFacts` in `agent-facts.ts`.
2572
+ */
2573
+ retrieveAgentFacts(opts) {
2574
+ const mod = getAgentFactsModule();
2575
+ return mod.retrieveAgentFacts(this, opts);
2576
+ }
2577
+ // ── Memvid portable export/import (Phase 2 P1-M7) ──────────
2578
+ /**
2579
+ * Phase 2 P1-M7: export all non-archived memory_entries to a
2580
+ * portable MemvidFile (JSON). Useful for sharing memory between
2581
+ * machines or backing up for review.
2582
+ *
2583
+ * Wires the orphan MemvidBackend into the MemoryStore export path.
2584
+ * The returned MemvidFile can be written to disk with
2585
+ * `JSON.stringify(file, null, 2)` or passed to another
2586
+ * store.importFromMemvid() on a different machine.
2587
+ */
2588
+ exportToMemvid(options) {
2589
+ const { outputPath, ...exportOptions } = options ?? {};
2590
+ // Build a transient memvid backend. We don't persist to disk from
2591
+ // the store itself (caller decides where to write).
2592
+ const tempPath = outputPath ?? join(process.cwd(), ".wotann", "memvid-export.json");
2593
+ const backend = new MemvidBackend(tempPath);
2594
+ const rows = this.db
2595
+ .prepare(`SELECT id, key, value, tags, confidence, block_type, domain, topic, updated_at
2596
+ FROM memory_entries WHERE archived = 0`)
2597
+ .all();
2598
+ for (const r of rows) {
2599
+ backend.save({
2600
+ key: String(r["key"]),
2601
+ value: String(r["value"]),
2602
+ category: String(r["block_type"] ?? "general"),
2603
+ tags: r["tags"] ? r["tags"].split(",").filter(Boolean) : [],
2604
+ confidence: Number(r["confidence"] ?? 1.0),
2605
+ metadata: {
2606
+ sourceId: String(r["id"]),
2607
+ ...(r["domain"] ? { domain: String(r["domain"]) } : {}),
2608
+ ...(r["topic"] ? { topic: String(r["topic"]) } : {}),
2609
+ },
2610
+ });
2611
+ }
2612
+ return backend.export(exportOptions);
2613
+ }
2614
+ /**
2615
+ * Phase 2 P1-M7: import entries from a MemvidFile into memory_entries.
2616
+ * Delegates per-entry de-dup to the MemvidBackend then replays
2617
+ * unique entries into the store as core_blocks rows.
2618
+ *
2619
+ * Returns a MemvidImportResult with imported / skipped / duplicate
2620
+ * counts. The import is idempotent-by-key for the memvid layer but
2621
+ * creates fresh memory_entries rows (caller can dedupe via domain
2622
+ * or block_type after the fact).
2623
+ */
2624
+ importFromMemvid(file) {
2625
+ let imported = 0;
2626
+ let duplicates = 0;
2627
+ const errors = [];
2628
+ const insertTx = this.db.transaction(() => {
2629
+ for (const entry of file.entries) {
2630
+ try {
2631
+ const existing = this.db
2632
+ .prepare(`SELECT id FROM memory_entries WHERE key = ? LIMIT 1`)
2633
+ .get(entry.key);
2634
+ if (existing) {
2635
+ duplicates++;
2636
+ continue;
2637
+ }
2638
+ this.insert({
2639
+ id: randomUUID(),
2640
+ layer: "core_blocks",
2641
+ blockType: blockTypeFromMemvid(entry.category),
2642
+ key: entry.key,
2643
+ value: entry.value,
2644
+ verified: false,
2645
+ confidence: entry.confidence,
2646
+ tags: entry.tags.join(","),
2647
+ freshnessScore: 1.0,
2648
+ confidenceLevel: entry.confidence,
2649
+ verificationStatus: "unverified",
2650
+ });
2651
+ imported++;
2652
+ }
2653
+ catch (err) {
2654
+ errors.push(`Failed to import "${entry.key}": ${err instanceof Error ? err.message : String(err)}`);
2655
+ }
2656
+ }
2657
+ });
2658
+ insertTx();
2659
+ return { imported, skipped: errors.length, duplicates, errors };
2660
+ }
2661
+ // ── Hybrid Retriever Framework (Phase 2 P1-M7) ─────────────
2662
+ /**
2663
+ * Phase 2 P1-M7: pluggable retriever-chain search.
2664
+ *
2665
+ * Wraps `hybrid-retrieval.hybridSearch`: a generic retriever-framework
2666
+ * with RRF fusion + optional reranker. Complements the existing
2667
+ * `hybridSearch()` (which hard-codes FTS5 + vector + recency + freq)
2668
+ * by letting callers supply arbitrary Retriever / Reranker
2669
+ * combinations.
2670
+ *
2671
+ * Default retrievers: the lexical retriever from hybrid-retrieval.
2672
+ * Callers can pass additional retrievers (e.g. a dense-vector one) or
2673
+ * a reranker via the `config` param.
2674
+ */
2675
+ async hybridRetrieverSearch(query, config) {
2676
+ // Pull all non-archived entries into the searchable shape.
2677
+ const rows = this.db
2678
+ .prepare(`SELECT id, key, value, tags, domain, topic, document_date
2679
+ FROM memory_entries WHERE archived = 0 ORDER BY updated_at DESC LIMIT 500`)
2680
+ .all();
2681
+ const entries = rows.map((r) => ({
2682
+ id: String(r["id"]),
2683
+ content: `${String(r["key"] ?? "")} ${String(r["value"] ?? "")}`.trim(),
2684
+ ...(r["tags"] ? { metadata: { tags: String(r["tags"]) } } : {}),
2685
+ ...(r["document_date"] ? { timestamp: Number(r["document_date"]) } : {}),
2686
+ }));
2687
+ const retrievers = config?.retrievers ?? [createLexicalRetriever()];
2688
+ const merged = {
2689
+ retrievers,
2690
+ ...(config?.reranker ? { reranker: config.reranker } : {}),
2691
+ ...(config?.fusionK !== undefined ? { fusionK: config.fusionK } : {}),
2692
+ ...(config?.topKBeforeRerank !== undefined
2693
+ ? { topKBeforeRerank: config.topKBeforeRerank }
2694
+ : {}),
2695
+ topK: config?.topK ?? config?.limit ?? 10,
2696
+ ...(config?.parallel !== undefined ? { parallel: config.parallel } : {}),
2697
+ };
2698
+ return hybridRetrieverSearch(query, entries, merged);
2699
+ }
2700
+ /**
2701
+ * Phase 2 P1-M7: factory for a default lexical retriever. Thin
2702
+ * convenience so callers can build a HybridRetrievalConfig without
2703
+ * importing hybrid-retrieval directly.
2704
+ */
2705
+ createLexicalRetriever() {
2706
+ return createLexicalRetriever();
2707
+ }
2708
+ /**
2709
+ * Phase 2 P1-M7: factory for a default vector retriever backed by
2710
+ * a caller-supplied embedding function.
2711
+ */
2712
+ createVectorRetriever(embed) {
2713
+ return createVectorRetriever({ embed });
2714
+ }
2715
+ /**
2716
+ * Phase 2 P1-M7: reranker used by the retriever-chain API when
2717
+ * supplied. Kept as a pass-through (caller implements their own).
2718
+ */
2719
+ applyReranker(query, hits, reranker) {
2720
+ return reranker.rerank(query, hits);
2721
+ }
2722
+ // ── Memory Freshness Scoring ───────────────────────────────
2723
+ /**
2724
+ * Compute the freshness-adjusted confidence for a memory entry.
2725
+ * confidence = base_confidence * decay(age) * verification_boost
2726
+ */
2727
+ computeFreshness(entry) {
2728
+ const base = entry.confidence ?? 1.0;
2729
+ // Temporal decay: lose 1% per day, minimum 0.2
2730
+ let ageDays = 0;
2731
+ try {
2732
+ const updatedTime = new Date(entry.updatedAt).getTime();
2733
+ if (!isNaN(updatedTime)) {
2734
+ ageDays = (Date.now() - updatedTime) / (1000 * 60 * 60 * 24);
2735
+ }
2736
+ }
2737
+ catch {
2738
+ /* default to 0 */
2739
+ }
2740
+ const decay = Math.max(0.2, 1.0 - ageDays * 0.01);
2741
+ // Verified memories decay 3x slower
2742
+ const verifiedBoost = entry.verified ? 1.0 : 0.7;
2743
+ return base * decay * verifiedBoost;
2744
+ }
2745
+ // ── Contradiction Detection ────────────────────────────────
2746
+ /**
2747
+ * Check if a new memory contradicts existing entries.
2748
+ * Uses keyword overlap + sentiment analysis to detect conflicts.
2749
+ */
2750
+ detectContradictions(key, value) {
2751
+ const results = [];
2752
+ const existing = this.search(key, 10);
2753
+ for (const r of existing) {
2754
+ // Skip same-value entries
2755
+ if (r.entry.value === value)
2756
+ continue;
2757
+ // Check for direct contradiction keywords
2758
+ const existingLower = r.entry.value.toLowerCase();
2759
+ const newLower = value.toLowerCase();
2760
+ // Pattern: "uses X" vs "uses Y" (for same subject)
2761
+ const usesPatternExisting = existingLower.match(/uses?\s+(\w+)/);
2762
+ const usesPatternNew = newLower.match(/uses?\s+(\w+)/);
2763
+ if (usesPatternExisting && usesPatternNew && usesPatternExisting[1] !== usesPatternNew[1]) {
2764
+ results.push({
2765
+ existingEntry: r.entry,
2766
+ newValue: value,
2767
+ conflictType: "direct",
2768
+ confidence: 0.8,
2769
+ });
2770
+ continue;
2771
+ }
2772
+ // Pattern: negation words that flip meaning
2773
+ const negations = ["not", "never", "don't", "doesn't", "shouldn't", "disabled", "removed"];
2774
+ for (const neg of negations) {
2775
+ const existingHasNeg = existingLower.includes(neg);
2776
+ const newHasNeg = newLower.includes(neg);
2777
+ if (existingHasNeg !== newHasNeg && this.keywordOverlap(existingLower, newLower) > 0.5) {
2778
+ results.push({
2779
+ existingEntry: r.entry,
2780
+ newValue: value,
2781
+ conflictType: "indirect",
2782
+ confidence: 0.6,
2783
+ });
2784
+ break;
2785
+ }
2786
+ }
2787
+ }
2788
+ return results;
2789
+ }
2790
+ keywordOverlap(a, b) {
2791
+ const wordsA = new Set(a.split(/\s+/).filter((w) => w.length > 3));
2792
+ const wordsB = new Set(b.split(/\s+/).filter((w) => w.length > 3));
2793
+ if (wordsA.size === 0 || wordsB.size === 0)
2794
+ return 0;
2795
+ let overlap = 0;
2796
+ for (const w of wordsA) {
2797
+ if (wordsB.has(w))
2798
+ overlap++;
2799
+ }
2800
+ return overlap / Math.max(wordsA.size, wordsB.size);
2801
+ }
2802
+ // ── Provenance Logging ─────────────────────────────────────
2803
+ logProvenance(entryId, action, oldValue, newValue, actor, reason) {
2804
+ this.db
2805
+ .prepare(`
2806
+ INSERT INTO memory_provenance_log (id, entry_id, action, old_value, new_value, actor, reason)
2807
+ VALUES (?, ?, ?, ?, ?, ?, ?)
2808
+ `)
2809
+ .run(randomUUID(), entryId, action, oldValue, newValue, actor ?? null, reason ?? null);
2810
+ }
2811
+ getProvenance(entryId) {
2812
+ return this.db
2813
+ .prepare(`
2814
+ SELECT * FROM memory_provenance_log WHERE entry_id = ? ORDER BY created_at DESC
2815
+ `)
2816
+ .all(entryId);
2817
+ }
2818
+ // ── Insert with Provenance ─────────────────────────────────
2819
+ insertWithProvenance(entry, sourceType, sourceFile) {
2820
+ // Check for contradictions before inserting
2821
+ const contradictions = this.detectContradictions(entry.key, entry.value);
2822
+ // Phase H Task 1: dual-timestamp derivation on the provenance path.
2823
+ const derived = deriveIngestTimestamps(`${entry.key} ${entry.value}`);
2824
+ const documentDate = entry.documentDate ?? derived.documentDate;
2825
+ const eventDate = entry.eventDate ?? derived.eventDate;
2826
+ const eventDateUncertaintyMs = entry.eventDateUncertaintyMs ?? derived.eventDateUncertaintyMs;
2827
+ const eventDateSource = entry.eventDate !== undefined && entry.eventDateSource === undefined
2828
+ ? "user-supplied"
2829
+ : (entry.eventDateSource ?? derived.eventDateSource);
2830
+ // Insert the entry with source metadata + dual timestamps.
2831
+ // Phase 2 P1-M8 Fix A — see insert() above; mirror the same confidence
2832
+ // column contract so the provenance path doesn't silently drop
2833
+ // confidenceLevel/freshnessScore/verificationStatus.
2834
+ const confidenceLevel = entry.confidenceLevel ?? entry.confidence ?? 0.5;
2835
+ const freshnessScore = entry.freshnessScore ?? 1.0;
2836
+ const verificationStatus = entry.verificationStatus ?? "unverified";
2837
+ this.db
2838
+ .prepare(`
2839
+ INSERT INTO memory_entries (id, layer, block_type, key, value, session_id, verified, confidence, tags, source_type, source_file, document_date, event_date, event_date_uncertainty_ms, event_date_source, freshness_score, confidence_level, verification_status)
2840
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2841
+ `)
2842
+ .run(entry.id, entry.layer, entry.blockType, entry.key, entry.value, entry.sessionId ?? null, entry.verified ? 1 : 0, entry.confidence ?? 1.0, entry.tags ?? "", sourceType, sourceFile ?? null, documentDate, eventDate, eventDateUncertaintyMs, eventDateSource, freshnessScore, confidenceLevel, verificationStatus);
2843
+ // Generate and store local embedding
2844
+ const embedding = this.generateLocalEmbedding(`${entry.key} ${entry.value}`);
2845
+ this.storeEmbedding(entry.id, embedding);
2846
+ // Log provenance
2847
+ this.logProvenance(entry.id, "insert", null, entry.value, undefined, `source: ${sourceType}`);
2848
+ return { contradictions };
2849
+ }
2850
+ // ── Memory Freshness + Provenance Verification ─────────────
2851
+ /**
2852
+ * Compute a freshness score for a memory entry using exponential decay.
2853
+ * Score decays based on time since last update, with verified entries
2854
+ * decaying 3x slower than unverified ones.
2855
+ *
2856
+ * Returns a value between 0 and 1.
2857
+ */
2858
+ computeFreshnessScore(entry) {
2859
+ const HALF_LIFE_DAYS_UNVERIFIED = 30;
2860
+ const HALF_LIFE_DAYS_VERIFIED = 90;
2861
+ let ageDays = 0;
2862
+ try {
2863
+ const updatedTime = new Date(entry.updatedAt).getTime();
2864
+ if (!isNaN(updatedTime)) {
2865
+ ageDays = Math.max(0, (Date.now() - updatedTime) / (1000 * 60 * 60 * 24));
2866
+ }
2867
+ }
2868
+ catch {
2869
+ /* default to 0 */
2870
+ }
2871
+ const halfLife = entry.verified ? HALF_LIFE_DAYS_VERIFIED : HALF_LIFE_DAYS_UNVERIFIED;
2872
+ // Exponential decay: score = e^(-lambda * t), where lambda = ln(2) / half_life
2873
+ const lambda = Math.LN2 / halfLife;
2874
+ return Math.max(0, Math.min(1, Math.exp(-lambda * ageDays)));
2875
+ }
2876
+ /**
2877
+ * Verify a memory entry against the codebase by checking whether
2878
+ * the source file (if any) still exists and the entry's content
2879
+ * is still relevant. Updates verification status and freshness.
2880
+ */
2881
+ verifyMemoryAgainstCodebase(entryId, workspaceDir) {
2882
+ const entry = this.getById(entryId);
2883
+ if (!entry) {
2884
+ return {
2885
+ entryId,
2886
+ previousStatus: "unverified",
2887
+ newStatus: "unverified",
2888
+ freshnessScore: 0,
2889
+ confidenceLevel: 0,
2890
+ reason: "Entry not found",
2891
+ };
2892
+ }
2893
+ const previousStatus = entry.verificationStatus;
2894
+ const freshness = this.computeFreshnessScore(entry);
2895
+ let newStatus = "unverified";
2896
+ let confidence = entry.confidenceLevel;
2897
+ let reason = "";
2898
+ // Check if source file still exists
2899
+ if (entry.sourceFile) {
2900
+ const fullPath = entry.sourceFile.startsWith("/")
2901
+ ? entry.sourceFile
2902
+ : join(workspaceDir, entry.sourceFile);
2903
+ if (existsSync(fullPath)) {
2904
+ // File exists -- read it to check if content is still relevant
2905
+ try {
2906
+ const fileContent = readFileSync(fullPath, "utf-8");
2907
+ const keyWords = entry.key
2908
+ .toLowerCase()
2909
+ .split(/\s+/)
2910
+ .filter((w) => w.length > 3);
2911
+ const relevantWords = keyWords.filter((w) => fileContent.toLowerCase().includes(w));
2912
+ const relevanceRatio = keyWords.length > 0 ? relevantWords.length / keyWords.length : 0.5;
2913
+ if (relevanceRatio > 0.5) {
2914
+ newStatus = "verified";
2915
+ confidence = Math.min(1.0, 0.7 + relevanceRatio * 0.3);
2916
+ reason = `Source file exists, ${Math.round(relevanceRatio * 100)}% keyword match`;
2917
+ }
2918
+ else {
2919
+ newStatus = "stale";
2920
+ confidence = Math.max(0.1, relevanceRatio);
2921
+ reason = `Source file exists but content diverged (${Math.round(relevanceRatio * 100)}% match)`;
2922
+ }
2923
+ }
2924
+ catch {
2925
+ newStatus = "stale";
2926
+ confidence = 0.3;
2927
+ reason = "Source file exists but unreadable";
2928
+ }
2929
+ }
2930
+ else {
2931
+ newStatus = "stale";
2932
+ confidence = 0.1;
2933
+ reason = "Source file no longer exists";
2934
+ }
2935
+ }
2936
+ else {
2937
+ // No source file -- check contradictions
2938
+ const contradictions = this.detectContradictions(entry.key, entry.value);
2939
+ if (contradictions.length > 0) {
2940
+ newStatus = "conflicting";
2941
+ confidence = Math.max(0.1, confidence * 0.5);
2942
+ reason = `${contradictions.length} conflicting entries found`;
2943
+ }
2944
+ else if (freshness > 0.7) {
2945
+ newStatus = "verified";
2946
+ confidence = Math.min(1.0, confidence + 0.1);
2947
+ reason = "No contradictions, still fresh";
2948
+ }
2949
+ else {
2950
+ newStatus = "stale";
2951
+ confidence = freshness;
2952
+ reason = `No source file, freshness decayed to ${(freshness * 100).toFixed(0)}%`;
2953
+ }
2954
+ }
2955
+ // Persist the updated verification state
2956
+ const now = new Date().toISOString();
2957
+ this.db
2958
+ .prepare(`
2959
+ UPDATE memory_entries
2960
+ SET freshness_score = ?,
2961
+ confidence_level = ?,
2962
+ last_verified_at = ?,
2963
+ verification_status = ?,
2964
+ updated_at = datetime('now')
2965
+ WHERE id = ?
2966
+ `)
2967
+ .run(freshness, confidence, now, newStatus, entryId);
2968
+ // Log provenance for the verification
2969
+ this.logProvenance(entryId, "verify_against_codebase", previousStatus, newStatus, "system", reason);
2970
+ return {
2971
+ entryId,
2972
+ previousStatus,
2973
+ newStatus,
2974
+ freshnessScore: freshness,
2975
+ confidenceLevel: confidence,
2976
+ reason,
2977
+ };
2978
+ }
2979
+ /**
2980
+ * Batch-refresh freshness scores for all non-archived entries.
2981
+ * Returns the number of entries updated.
2982
+ */
2983
+ refreshAllFreshnessScores() {
2984
+ const rows = this.db
2985
+ .prepare(`
2986
+ SELECT id, updated_at, verified, confidence FROM memory_entries WHERE archived = 0
2987
+ `)
2988
+ .all();
2989
+ let updated = 0;
2990
+ for (const row of rows) {
2991
+ const entry = this.rowToEntry(row);
2992
+ const freshness = this.computeFreshnessScore(entry);
2993
+ const currentFreshness = row["freshness_score"] ?? 1.0;
2994
+ // Only update if the score has changed meaningfully
2995
+ if (Math.abs(freshness - currentFreshness) > 0.01) {
2996
+ this.db
2997
+ .prepare(`
2998
+ UPDATE memory_entries SET freshness_score = ? WHERE id = ?
2999
+ `)
3000
+ .run(freshness, row["id"]);
3001
+ updated++;
3002
+ }
3003
+ }
3004
+ return updated;
3005
+ }
3006
+ /**
3007
+ * Get entries that need verification (stale or unverified with low freshness).
3008
+ */
3009
+ getEntriesNeedingVerification(limit = 20) {
3010
+ const rows = this.db
3011
+ .prepare(`
3012
+ SELECT * FROM memory_entries
3013
+ WHERE archived = 0
3014
+ AND (verification_status IN ('stale', 'unverified', 'conflicting')
3015
+ OR freshness_score < 0.5)
3016
+ ORDER BY freshness_score ASC
3017
+ LIMIT ?
3018
+ `)
3019
+ .all(limit);
3020
+ return rows.map((r) => this.rowToEntry(r));
3021
+ }
3022
+ /**
3023
+ * Delete auto_capture entries older than the retention window (S1-14).
3024
+ *
3025
+ * auto_capture logs every tool call's input/output — identical growth
3026
+ * profile to the audit trail. Pair a call to this with
3027
+ * AuditTrail.pruneOlderThan() on a daemon cron to keep
3028
+ * `~/.wotann/memory.db` bounded.
3029
+ *
3030
+ * Returns the number of rows removed. Idempotent.
3031
+ */
3032
+ pruneAutoCaptures(days = 30) {
3033
+ const cutoff = new Date(Date.now() - days * 24 * 60 * 60 * 1000).toISOString();
3034
+ const info = this.db.prepare("DELETE FROM auto_capture WHERE created_at < ?").run(cutoff);
3035
+ return Number(info.changes);
3036
+ }
3037
+ // ── Incremental Indexer (Phase 2 P1-M7) ─────────────────────
3038
+ /**
3039
+ * Phase 2 P1-M7: file-indexing helpers wired into MemoryStore.
3040
+ *
3041
+ * The underlying IncrementalIndexer persists a SHA-per-file cache to
3042
+ * `~/.wotann/index-cache.json` so repeat indexing runs only re-read
3043
+ * files whose content actually changed. A lazy singleton keeps the
3044
+ * cache in memory for the store's lifetime.
3045
+ */
3046
+ incrementalIndexer = null;
3047
+ getIncrementalIndexer(options) {
3048
+ if (!this.incrementalIndexer) {
3049
+ this.incrementalIndexer = new IncrementalIndexer(options ?? {});
3050
+ }
3051
+ return this.incrementalIndexer;
3052
+ }
3053
+ /**
3054
+ * Return only the paths that need re-indexing (new or SHA-changed).
3055
+ * First call loads the on-disk cache. Safe to call repeatedly.
3056
+ */
3057
+ async getStaleFiles(paths, options) {
3058
+ const indexer = this.getIncrementalIndexer(options);
3059
+ await indexer.load();
3060
+ return indexer.getStaleFiles(paths);
3061
+ }
3062
+ /**
3063
+ * Record that a file has been indexed. Content-SHA is computed from
3064
+ * the supplied text so callers who already have the content in
3065
+ * memory don't pay an extra disk read.
3066
+ */
3067
+ async markFileIndexed(path, content, chunksCount, options) {
3068
+ const indexer = this.getIncrementalIndexer(options);
3069
+ await indexer.load();
3070
+ const sha = computeContentSha(content);
3071
+ indexer.markIndexed(path, sha, chunksCount);
3072
+ await indexer.save();
3073
+ }
3074
+ /** Forget a path — used when a file is deleted. Persists immediately. */
3075
+ async forgetFileIndex(path, options) {
3076
+ const indexer = this.getIncrementalIndexer(options);
3077
+ await indexer.load();
3078
+ const removed = indexer.forget(path);
3079
+ if (removed)
3080
+ await indexer.save();
3081
+ return removed;
3082
+ }
3083
+ /** Stats on the in-memory index cache. */
3084
+ async getFileIndexStats(options) {
3085
+ const indexer = this.getIncrementalIndexer(options);
3086
+ await indexer.load();
3087
+ return indexer.stats();
3088
+ }
3089
+ // ── Typed Relationships (Phase H Task 2) ───────────────────
3090
+ /** Persist one typed relationship. Idempotent on id. */
3091
+ addRelationship(rel) {
3092
+ this.db
3093
+ .prepare(`INSERT OR REPLACE INTO memory_relationships
3094
+ (id, from_id, to_id, kind, confidence, rationale, invalidated_at, created_at)
3095
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?)`)
3096
+ .run(rel.id, rel.fromId, rel.toId, rel.kind, rel.confidence, rel.rationale ?? null, null, rel.createdAt);
3097
+ }
3098
+ /** Bulk-persist relationships in a single transaction. */
3099
+ addRelationships(rels) {
3100
+ if (rels.length === 0)
3101
+ return 0;
3102
+ const tx = this.db.transaction((items) => {
3103
+ for (const rel of items)
3104
+ this.addRelationship(rel);
3105
+ });
3106
+ tx(rels);
3107
+ return rels.length;
3108
+ }
3109
+ /**
3110
+ * Mark a relationship as invalidated. Used by
3111
+ * knowledge-update-dynamics when a successor supersedes a
3112
+ * predecessor — the predecessor's outbound non-updates edges are
3113
+ * stamped so readers can distinguish active from historical edges.
3114
+ */
3115
+ invalidateRelationship(id, atMs = Date.now()) {
3116
+ const info = this.db
3117
+ .prepare(`UPDATE memory_relationships SET invalidated_at = ? WHERE id = ? AND invalidated_at IS NULL`)
3118
+ .run(atMs, id);
3119
+ return Number(info.changes) > 0;
3120
+ }
3121
+ /** Fetch all relationships touching a given memory_entries id. */
3122
+ getRelationshipsForEntry(entryId, options) {
3123
+ const includeInvalidated = options?.includeInvalidated ?? false;
3124
+ const conditions = ["(from_id = ? OR to_id = ?)"];
3125
+ const params = [entryId, entryId];
3126
+ if (options?.kind) {
3127
+ conditions.push("kind = ?");
3128
+ params.push(options.kind);
3129
+ }
3130
+ if (!includeInvalidated)
3131
+ conditions.push("invalidated_at IS NULL");
3132
+ const rows = this.db
3133
+ .prepare(`SELECT id, from_id, to_id, kind, confidence, rationale, created_at
3134
+ FROM memory_relationships
3135
+ WHERE ${conditions.join(" AND ")}
3136
+ ORDER BY created_at DESC`)
3137
+ .all(...params);
3138
+ return rows.map((r) => ({
3139
+ id: r["id"],
3140
+ fromId: r["from_id"],
3141
+ toId: r["to_id"],
3142
+ kind: r["kind"],
3143
+ confidence: r["confidence"] ?? 0.5,
3144
+ createdAt: r["created_at"] ?? 0,
3145
+ ...(r["rationale"] ? { rationale: r["rationale"] } : {}),
3146
+ }));
3147
+ }
3148
+ /** All relationships — used by resolveLatest walkers + tests. */
3149
+ getAllRelationships(options) {
3150
+ const includeInvalidated = options?.includeInvalidated ?? false;
3151
+ const sql = includeInvalidated
3152
+ ? `SELECT id, from_id, to_id, kind, confidence, rationale, created_at FROM memory_relationships ORDER BY created_at DESC`
3153
+ : `SELECT id, from_id, to_id, kind, confidence, rationale, created_at FROM memory_relationships WHERE invalidated_at IS NULL ORDER BY created_at DESC`;
3154
+ const rows = this.db.prepare(sql).all();
3155
+ return rows.map((r) => ({
3156
+ id: r["id"],
3157
+ fromId: r["from_id"],
3158
+ toId: r["to_id"],
3159
+ kind: r["kind"],
3160
+ confidence: r["confidence"] ?? 0.5,
3161
+ createdAt: r["created_at"] ?? 0,
3162
+ ...(r["rationale"] ? { rationale: r["rationale"] } : {}),
3163
+ }));
3164
+ }
3165
+ // ── Phase 2 P1-M6: retrieval-mode dispatcher ─────────────────
3166
+ //
3167
+ // Cognee exposes a menu of ~14 retrieval modes. WOTANN owns 2 native
3168
+ // retrievers (FTS5 search, hybrid TEMPR) plus 10 narrow functions in
3169
+ // extended-search-types.ts. P1-M6 adds 12 more single-axis modes and
3170
+ // exposes them via a registry. `searchWithMode` is the store-level
3171
+ // dispatch entry: callers pass a mode name + options, we route
3172
+ // through the registry and inject a RetrievalContext pre-wired with
3173
+ // this store.
3174
+ //
3175
+ // Quality bar #3 (sibling-site scan): the registry is lazily
3176
+ // allocated — no cost to callers that never use a mode.
3177
+ retrievalRegistrySlot = null;
3178
+ getRetrievalRegistry() {
3179
+ if (this.retrievalRegistrySlot)
3180
+ return this.retrievalRegistrySlot;
3181
+ this.retrievalRegistrySlot = createDefaultRetrievalRegistry();
3182
+ return this.retrievalRegistrySlot;
3183
+ }
3184
+ /**
3185
+ * Register a custom retrieval mode on this store's registry. Callers
3186
+ * that want a custom mode (e.g. a domain-specific reranker) can push
3187
+ * it in here and then dispatch via `searchWithMode`.
3188
+ */
3189
+ registerRetrievalMode(mode) {
3190
+ this.getRetrievalRegistry().register(mode);
3191
+ }
3192
+ /** List every retrieval mode name available on this store. */
3193
+ listRetrievalModes() {
3194
+ return this.getRetrievalRegistry()
3195
+ .list()
3196
+ .map((m) => m.name);
3197
+ }
3198
+ /**
3199
+ * Dispatch a retrieval mode by name. When the mode is not
3200
+ * registered, returns an empty result with an "unknown-mode"
3201
+ * scoring note rather than throwing. This keeps callers in callback
3202
+ * chains from needing to guard every dispatch.
3203
+ */
3204
+ async searchWithMode(modeName, query, opts) {
3205
+ const registry = this.getRetrievalRegistry();
3206
+ const mode = registry.get(modeName);
3207
+ if (!mode) {
3208
+ return {
3209
+ mode: modeName,
3210
+ results: [],
3211
+ scoring: {
3212
+ method: "unknown-mode",
3213
+ isHeuristic: true,
3214
+ notes: `mode "${modeName}" is not registered`,
3215
+ },
3216
+ };
3217
+ }
3218
+ const ctx = { store: this };
3219
+ return mode.search(ctx, query, opts);
3220
+ }
3221
+ /**
3222
+ * V9 T14.2 — Register opt-in heavy / experimental retrieval
3223
+ * strategies onto this store's registry. Default-OFF: callers must
3224
+ * pass each flag explicitly. Each strategy delegates to a pure
3225
+ * orphan module (asmr-voter / community-detection / persona-tree)
3226
+ * and surfaces honest fallback semantics when its prerequisites
3227
+ * (entry pool, edge graph, etc.) aren't available.
3228
+ *
3229
+ * Returns the names registered so the caller can introspect.
3230
+ */
3231
+ registerOptionalStrategies(opts) {
3232
+ const added = [];
3233
+ const store = this;
3234
+ if (opts.asmrVoter === true) {
3235
+ const asmrMode = {
3236
+ name: "asmr-voter",
3237
+ description: "Reciprocal-rank-fusion ensemble: run N base retrievers and majority-vote the top-K. Off by default; opt-in heavy retrieval.",
3238
+ search: async (_ctx, query, modeOpts) => {
3239
+ const limit = Math.max(1, modeOpts?.limit ?? 10);
3240
+ // Default ensemble: re-use the store's own search path twice
3241
+ // so the wire is exercised even without a custom retriever
3242
+ // panel. Callers that need real diversity inject specs via
3243
+ // modeOpts.params.retrievers.
3244
+ const params = modeOpts?.params ?? {};
3245
+ const customRetrievers = params
3246
+ .retrievers;
3247
+ const retrievers = customRetrievers ?? [
3248
+ {
3249
+ name: "fts-primary",
3250
+ retriever: async (q) => store.search(q, limit * 2),
3251
+ },
3252
+ {
3253
+ name: "fts-secondary",
3254
+ retriever: async (q) => store.search(q, limit),
3255
+ },
3256
+ ];
3257
+ const vote = await runAsmrVoter(query, retrievers, { topK: limit });
3258
+ return {
3259
+ mode: "asmr-voter",
3260
+ results: vote.hits.map((h) => ({
3261
+ id: h.entry.id,
3262
+ content: h.entry.value,
3263
+ score: h.fusedScore,
3264
+ reason: `RRF across ${Object.keys(h.ranks).length} retrievers`,
3265
+ metadata: {
3266
+ ranks: h.ranks,
3267
+ hasPartialFailure: vote.hasPartialFailure,
3268
+ },
3269
+ })),
3270
+ scoring: {
3271
+ method: "rrf-ensemble",
3272
+ isHeuristic: vote.hasPartialFailure,
3273
+ ...(vote.hasPartialFailure
3274
+ ? { notes: "one or more retrievers failed; results degraded" }
3275
+ : {}),
3276
+ },
3277
+ };
3278
+ },
3279
+ };
3280
+ this.registerRetrievalMode(asmrMode);
3281
+ added.push(asmrMode.name);
3282
+ }
3283
+ if (opts.communityDetection === true) {
3284
+ const cdMode = {
3285
+ name: "community-detection",
3286
+ description: "Louvain community detection over the bi-temporal knowledge graph; pulls all members of the community a query-matched entity belongs to. Off by default.",
3287
+ search: async (ctx, query, modeOpts) => {
3288
+ const limit = Math.max(1, modeOpts?.limit ?? 10);
3289
+ const edges = ctx.edges;
3290
+ if (!edges || edges.length === 0) {
3291
+ // Honest fallback: no graph, no community pull-in. Still
3292
+ // surface the FTS hits so the mode never returns empty
3293
+ // when the store has matches.
3294
+ const fts = store.search(query, limit);
3295
+ return {
3296
+ mode: "community-detection",
3297
+ results: fts.map((r) => ({
3298
+ id: r.entry.id,
3299
+ content: r.entry.value,
3300
+ score: r.score,
3301
+ reason: "fts-only (no graph edges injected)",
3302
+ })),
3303
+ scoring: {
3304
+ method: "louvain-fallback-fts",
3305
+ isHeuristic: true,
3306
+ notes: "no edges in RetrievalContext; community detection skipped",
3307
+ },
3308
+ };
3309
+ }
3310
+ // The orphan helper takes BiTemporalEdge[]; the registry
3311
+ // ctx.edges is a lighter shape (RetrievalEdge). Adapt.
3312
+ const adaptedEdges = edges.map((e, i) => ({
3313
+ id: `ctx-edge-${i}`,
3314
+ sourceId: e.fromId,
3315
+ targetId: e.toId,
3316
+ relation: e.relation ?? "related",
3317
+ weight: e.weight ?? 1,
3318
+ validFrom: new Date(0).toISOString(),
3319
+ validTo: null,
3320
+ recordedFrom: new Date(0).toISOString(),
3321
+ recordedTo: null,
3322
+ }));
3323
+ const report = detectCommunities(adaptedEdges);
3324
+ const fts = store.search(query, limit);
3325
+ // Pull in community siblings of the top FTS hit to broaden
3326
+ // recall — this is the actual "community detection" boost.
3327
+ const top = fts[0];
3328
+ const siblings = top ? communityOf(report, top.entry.id) : null;
3329
+ return {
3330
+ mode: "community-detection",
3331
+ results: fts.map((r) => ({
3332
+ id: r.entry.id,
3333
+ content: r.entry.value,
3334
+ score: r.score,
3335
+ reason: siblings !== null ? `community ${siblings}` : "fts-hit",
3336
+ metadata: {
3337
+ modularity: report.modularity,
3338
+ communityCount: report.communities.length,
3339
+ },
3340
+ })),
3341
+ scoring: {
3342
+ method: "louvain",
3343
+ isHeuristic: false,
3344
+ notes: `${report.communities.length} communities, modularity=${report.modularity.toFixed(3)}`,
3345
+ },
3346
+ };
3347
+ },
3348
+ };
3349
+ this.registerRetrievalMode(cdMode);
3350
+ added.push(cdMode.name);
3351
+ }
3352
+ if (opts.personaTree === true) {
3353
+ const ptMode = {
3354
+ name: "persona-tree",
3355
+ description: "Hierarchical persona-tree retrieval: groups memories into topic/trait/persona levels then surfaces top entries from the matching subtree. Off by default.",
3356
+ search: async (_ctx, query, modeOpts) => {
3357
+ const limit = Math.max(1, modeOpts?.limit ?? 10);
3358
+ // Source entries: prefer ctx.entries when injected; otherwise
3359
+ // go through FTS so we never crash on empty stores.
3360
+ const ftsHits = store.search(query, limit * 4);
3361
+ if (ftsHits.length === 0) {
3362
+ return {
3363
+ mode: "persona-tree",
3364
+ results: [],
3365
+ scoring: {
3366
+ method: "tree-walk",
3367
+ isHeuristic: true,
3368
+ notes: "no matching memories",
3369
+ },
3370
+ };
3371
+ }
3372
+ const tree = buildPersonaTree(ftsHits.map((h) => h.entry));
3373
+ // Walk the tree to find leaves whose memoryId is in the FTS
3374
+ // hit set, ordered by tree-level (level-0 leaves first).
3375
+ const orderedIds = [];
3376
+ walkPersonaTree(tree, (node) => {
3377
+ if (node.level === 0 && node.memoryId) {
3378
+ orderedIds.push(node.memoryId);
3379
+ }
3380
+ });
3381
+ const ftsById = new Map(ftsHits.map((h) => [h.entry.id, h]));
3382
+ const ranked = orderedIds
3383
+ .map((id) => ftsById.get(id))
3384
+ .filter((h) => h !== undefined)
3385
+ .slice(0, limit);
3386
+ return {
3387
+ mode: "persona-tree",
3388
+ results: ranked.map((r) => ({
3389
+ id: r.entry.id,
3390
+ content: r.entry.value,
3391
+ score: r.score,
3392
+ reason: "persona-tree leaf",
3393
+ metadata: {
3394
+ totalMemories: tree.totalMemories,
3395
+ builtAt: tree.builtAt,
3396
+ },
3397
+ })),
3398
+ scoring: {
3399
+ method: "tree-walk",
3400
+ isHeuristic: false,
3401
+ notes: `tree built from ${tree.totalMemories} memories`,
3402
+ },
3403
+ };
3404
+ },
3405
+ };
3406
+ this.registerRetrievalMode(ptMode);
3407
+ added.push(ptMode.name);
3408
+ }
3409
+ return added;
3410
+ }
3411
+ close() {
3412
+ this.db.close();
3413
+ }
3414
+ }
3415
+ // ── Helpers ──────────────────────────────────────────────────
3416
+ /**
3417
+ * Return the canonical name field for an entity. Handles per-type
3418
+ * name fields: `person.name`, `project.name`, `file.path`,
3419
+ * `concept.name`, `event.name`, `goal.name`, `skill.name`,
3420
+ * `tool.name`.
3421
+ */
3422
+ function entityNameOf(entity) {
3423
+ if (entity.type === "file")
3424
+ return entity.path;
3425
+ return entity.name;
3426
+ }
3427
+ /**
3428
+ * Map a memvid category string onto a valid MemoryBlockType. Unknown
3429
+ * categories fall back to `reference`.
3430
+ */
3431
+ function blockTypeFromMemvid(category) {
3432
+ const valid = [
3433
+ "user",
3434
+ "feedback",
3435
+ "project",
3436
+ "reference",
3437
+ "cases",
3438
+ "patterns",
3439
+ "decisions",
3440
+ "issues",
3441
+ ];
3442
+ return valid.includes(category)
3443
+ ? category
3444
+ : "reference";
3445
+ }
3446
+ /**
3447
+ * Map a knowledge_edges row onto a BiTemporalEdge. Legacy rows that
3448
+ * predate the P1-M5 migration may have null/empty recorded_from — fall
3449
+ * back to created_at so the consumer always gets a populated axis.
3450
+ */
3451
+ function rowToBiTemporalEdge(row) {
3452
+ const id = row["id"];
3453
+ const sourceId = row["source_id"];
3454
+ const targetId = row["target_id"];
3455
+ const relation = row["relation"];
3456
+ const weight = typeof row["weight"] === "number" ? row["weight"] : 1.0;
3457
+ const createdAt = row["created_at"];
3458
+ const validFromRaw = row["valid_from"];
3459
+ const recordedFromRaw = row["recorded_from"];
3460
+ return {
3461
+ id,
3462
+ sourceId,
3463
+ targetId,
3464
+ relation,
3465
+ weight,
3466
+ validFrom: validFromRaw && validFromRaw.length > 0
3467
+ ? validFromRaw
3468
+ : (createdAt ?? new Date(0).toISOString()),
3469
+ validTo: row["valid_to"] ?? null,
3470
+ recordedFrom: recordedFromRaw && recordedFromRaw.length > 0
3471
+ ? recordedFromRaw
3472
+ : (createdAt ?? new Date(0).toISOString()),
3473
+ recordedTo: row["recorded_to"] ?? null,
3474
+ };
3475
+ }
3476
+ /**
3477
+ * Minimal FTS5 sanitizer — strips punctuation to tokens and joins with
3478
+ * OR. Returns empty string when no valid tokens survive. Used by the
3479
+ * benchmark adapter so natural-language questions (which contain ?, :,
3480
+ * quotes, etc.) don't crash FTS5.
3481
+ */
3482
+ // ── TEMPR helpers (Phase 2 P1-M4) ─────────────────────
3483
+ /** Cosine similarity for TEMPR vector channel. Zero-safe. */
3484
+ function cosineSimTempr(a, b) {
3485
+ if (a.length === 0 || b.length === 0 || a.length !== b.length)
3486
+ return 0;
3487
+ let dot = 0;
3488
+ let na = 0;
3489
+ let nb = 0;
3490
+ for (let i = 0; i < a.length; i++) {
3491
+ const x = a[i];
3492
+ const y = b[i];
3493
+ dot += x * y;
3494
+ na += x * x;
3495
+ nb += y * y;
3496
+ }
3497
+ if (na === 0 || nb === 0)
3498
+ return 0;
3499
+ return dot / (Math.sqrt(na) * Math.sqrt(nb));
3500
+ }
3501
+ /**
3502
+ * Heuristic entity extraction from a natural-language query.
3503
+ * Returns capitalized multi-word sequences, quoted phrases, and
3504
+ * standalone capitalized words of length >= 2. The LLM-based
3505
+ * extraction is the real thing; this channel bootstrap is a proxy
3506
+ * that catches common proper nouns with zero dep.
3507
+ */
3508
+ function extractQueryEntities(query) {
3509
+ const tokens = new Set();
3510
+ // Quoted phrases first — "New York", 'Alice Bob'
3511
+ const quoted = query.match(/["']([^"']+)["']/g);
3512
+ if (quoted) {
3513
+ for (const q of quoted)
3514
+ tokens.add(q.replace(/["']/g, "").trim());
3515
+ }
3516
+ // Multi-word capitalized sequences — "New York City"
3517
+ const caps = query.match(/\b[A-Z][a-zA-Z]+(?:\s+[A-Z][a-zA-Z]+)+\b/g);
3518
+ if (caps) {
3519
+ for (const c of caps)
3520
+ tokens.add(c);
3521
+ }
3522
+ // Standalone capitalized words — "Alice"
3523
+ const solo = query.match(/\b[A-Z][a-zA-Z]{1,}\b/g);
3524
+ if (solo) {
3525
+ for (const s of solo)
3526
+ tokens.add(s);
3527
+ }
3528
+ return [...tokens].filter((t) => t.length >= 2).slice(0, 8);
3529
+ }
3530
+ /**
3531
+ * Sanitize a proper name for use in an FTS5 MATCH query.
3532
+ * Strips control characters and wraps in double quotes so FTS5
3533
+ * treats it as a phrase. Returns empty string when the name is
3534
+ * empty after sanitization.
3535
+ */
3536
+ function fts5QuoteName(name) {
3537
+ const cleaned = name.replace(/["\\]/g, " ").replace(/\s+/g, " ").trim();
3538
+ if (cleaned.length === 0)
3539
+ return "";
3540
+ return `"${cleaned}"`;
3541
+ }
3542
+ function sanitizeForFts5(query) {
3543
+ const tokens = query
3544
+ .toLowerCase()
3545
+ .split(/[^a-z0-9]+/i)
3546
+ .filter((t) => t.length >= 2);
3547
+ const unique = Array.from(new Set(tokens));
3548
+ if (unique.length === 0)
3549
+ return "";
3550
+ return unique.slice(0, 12).join(" OR ");
3551
+ }
3552
+ let agentFactsModuleCache = null;
3553
+ function getAgentFactsModule() {
3554
+ if (agentFactsModuleCache === null) {
3555
+ throw new Error("MemoryStore.recordAgentFact/retrieveAgentFacts: agent-facts module not bootstrapped; " +
3556
+ "import src/memory/agent-facts.js at composition-root to register the wiring.");
3557
+ }
3558
+ return agentFactsModuleCache;
3559
+ }
3560
+ /**
3561
+ * Bootstrap the agent-facts module reference used by
3562
+ * `MemoryStore.recordAgentFact` / `MemoryStore.retrieveAgentFacts`.
3563
+ *
3564
+ * Called automatically by `agent-facts.ts` at import time so any
3565
+ * consumer who imports either file gets the wiring transparently.
3566
+ * Exposed for testability — tests can inject a stub module.
3567
+ */
3568
+ export function setAgentFactsModule(mod) {
3569
+ agentFactsModuleCache = mod;
3570
+ }
3571
+ //# sourceMappingURL=store.js.map