attocode 0.1.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 (488) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/LICENSE +21 -0
  3. package/README.md +164 -0
  4. package/dist/src/adapters.d.ts +83 -0
  5. package/dist/src/adapters.d.ts.map +1 -0
  6. package/dist/src/adapters.js +221 -0
  7. package/dist/src/adapters.js.map +1 -0
  8. package/dist/src/agent-tools/index.d.ts +7 -0
  9. package/dist/src/agent-tools/index.d.ts.map +1 -0
  10. package/dist/src/agent-tools/index.js +8 -0
  11. package/dist/src/agent-tools/index.js.map +1 -0
  12. package/dist/src/agent-tools/lsp-file-tools.d.ts +33 -0
  13. package/dist/src/agent-tools/lsp-file-tools.d.ts.map +1 -0
  14. package/dist/src/agent-tools/lsp-file-tools.js +200 -0
  15. package/dist/src/agent-tools/lsp-file-tools.js.map +1 -0
  16. package/dist/src/agent.d.ts +667 -0
  17. package/dist/src/agent.d.ts.map +1 -0
  18. package/dist/src/agent.js +2824 -0
  19. package/dist/src/agent.js.map +1 -0
  20. package/dist/src/cli.d.ts +36 -0
  21. package/dist/src/cli.d.ts.map +1 -0
  22. package/dist/src/cli.js +176 -0
  23. package/dist/src/cli.js.map +1 -0
  24. package/dist/src/commands/handler.d.ts +22 -0
  25. package/dist/src/commands/handler.d.ts.map +1 -0
  26. package/dist/src/commands/handler.js +1320 -0
  27. package/dist/src/commands/handler.js.map +1 -0
  28. package/dist/src/commands/init.d.ts +7 -0
  29. package/dist/src/commands/init.d.ts.map +1 -0
  30. package/dist/src/commands/init.js +153 -0
  31. package/dist/src/commands/init.js.map +1 -0
  32. package/dist/src/commands/types.d.ts +70 -0
  33. package/dist/src/commands/types.d.ts.map +1 -0
  34. package/dist/src/commands/types.js +8 -0
  35. package/dist/src/commands/types.js.map +1 -0
  36. package/dist/src/config.d.ts +22 -0
  37. package/dist/src/config.d.ts.map +1 -0
  38. package/dist/src/config.js +25 -0
  39. package/dist/src/config.js.map +1 -0
  40. package/dist/src/core/index.d.ts +32 -0
  41. package/dist/src/core/index.d.ts.map +1 -0
  42. package/dist/src/core/index.js +35 -0
  43. package/dist/src/core/index.js.map +1 -0
  44. package/dist/src/core/process-handlers.d.ts +43 -0
  45. package/dist/src/core/process-handlers.d.ts.map +1 -0
  46. package/dist/src/core/process-handlers.js +117 -0
  47. package/dist/src/core/process-handlers.js.map +1 -0
  48. package/dist/src/core/protocol/bridge.d.ts +117 -0
  49. package/dist/src/core/protocol/bridge.d.ts.map +1 -0
  50. package/dist/src/core/protocol/bridge.js +149 -0
  51. package/dist/src/core/protocol/bridge.js.map +1 -0
  52. package/dist/src/core/protocol/index.d.ts +8 -0
  53. package/dist/src/core/protocol/index.d.ts.map +1 -0
  54. package/dist/src/core/protocol/index.js +8 -0
  55. package/dist/src/core/protocol/index.js.map +1 -0
  56. package/dist/src/core/protocol/types.d.ts +539 -0
  57. package/dist/src/core/protocol/types.d.ts.map +1 -0
  58. package/dist/src/core/protocol/types.js +149 -0
  59. package/dist/src/core/protocol/types.js.map +1 -0
  60. package/dist/src/core/queues/atomic-counter.d.ts +36 -0
  61. package/dist/src/core/queues/atomic-counter.d.ts.map +1 -0
  62. package/dist/src/core/queues/atomic-counter.js +46 -0
  63. package/dist/src/core/queues/atomic-counter.js.map +1 -0
  64. package/dist/src/core/queues/event-queue.d.ts +126 -0
  65. package/dist/src/core/queues/event-queue.d.ts.map +1 -0
  66. package/dist/src/core/queues/event-queue.js +208 -0
  67. package/dist/src/core/queues/event-queue.js.map +1 -0
  68. package/dist/src/core/queues/index.d.ts +12 -0
  69. package/dist/src/core/queues/index.d.ts.map +1 -0
  70. package/dist/src/core/queues/index.js +15 -0
  71. package/dist/src/core/queues/index.js.map +1 -0
  72. package/dist/src/core/queues/submission-queue.d.ts +116 -0
  73. package/dist/src/core/queues/submission-queue.d.ts.map +1 -0
  74. package/dist/src/core/queues/submission-queue.js +236 -0
  75. package/dist/src/core/queues/submission-queue.js.map +1 -0
  76. package/dist/src/costs/index.d.ts +22 -0
  77. package/dist/src/costs/index.d.ts.map +1 -0
  78. package/dist/src/costs/index.js +22 -0
  79. package/dist/src/costs/index.js.map +1 -0
  80. package/dist/src/costs/model-registry.d.ts +80 -0
  81. package/dist/src/costs/model-registry.d.ts.map +1 -0
  82. package/dist/src/costs/model-registry.js +237 -0
  83. package/dist/src/costs/model-registry.js.map +1 -0
  84. package/dist/src/costs/types.d.ts +50 -0
  85. package/dist/src/costs/types.d.ts.map +1 -0
  86. package/dist/src/costs/types.js +2 -0
  87. package/dist/src/costs/types.js.map +1 -0
  88. package/dist/src/defaults.d.ts +114 -0
  89. package/dist/src/defaults.d.ts.map +1 -0
  90. package/dist/src/defaults.js +457 -0
  91. package/dist/src/defaults.js.map +1 -0
  92. package/dist/src/first-run.d.ts +35 -0
  93. package/dist/src/first-run.d.ts.map +1 -0
  94. package/dist/src/first-run.js +94 -0
  95. package/dist/src/first-run.js.map +1 -0
  96. package/dist/src/hello.d.ts +2 -0
  97. package/dist/src/hello.d.ts.map +1 -0
  98. package/dist/src/hello.js +4 -0
  99. package/dist/src/hello.js.map +1 -0
  100. package/dist/src/integrations/agent-registry.d.ts +160 -0
  101. package/dist/src/integrations/agent-registry.d.ts.map +1 -0
  102. package/dist/src/integrations/agent-registry.js +446 -0
  103. package/dist/src/integrations/agent-registry.js.map +1 -0
  104. package/dist/src/integrations/auto-compaction.d.ts +177 -0
  105. package/dist/src/integrations/auto-compaction.d.ts.map +1 -0
  106. package/dist/src/integrations/auto-compaction.js +428 -0
  107. package/dist/src/integrations/auto-compaction.js.map +1 -0
  108. package/dist/src/integrations/cancellation.d.ts +162 -0
  109. package/dist/src/integrations/cancellation.d.ts.map +1 -0
  110. package/dist/src/integrations/cancellation.js +339 -0
  111. package/dist/src/integrations/cancellation.js.map +1 -0
  112. package/dist/src/integrations/codebase-context.d.ts +319 -0
  113. package/dist/src/integrations/codebase-context.d.ts.map +1 -0
  114. package/dist/src/integrations/codebase-context.js +816 -0
  115. package/dist/src/integrations/codebase-context.js.map +1 -0
  116. package/dist/src/integrations/compaction.d.ts +192 -0
  117. package/dist/src/integrations/compaction.d.ts.map +1 -0
  118. package/dist/src/integrations/compaction.js +376 -0
  119. package/dist/src/integrations/compaction.js.map +1 -0
  120. package/dist/src/integrations/context-engineering.d.ts +246 -0
  121. package/dist/src/integrations/context-engineering.d.ts.map +1 -0
  122. package/dist/src/integrations/context-engineering.js +394 -0
  123. package/dist/src/integrations/context-engineering.js.map +1 -0
  124. package/dist/src/integrations/diff-utils.d.ts +105 -0
  125. package/dist/src/integrations/diff-utils.d.ts.map +1 -0
  126. package/dist/src/integrations/diff-utils.js +497 -0
  127. package/dist/src/integrations/diff-utils.js.map +1 -0
  128. package/dist/src/integrations/economics.d.ts +192 -0
  129. package/dist/src/integrations/economics.d.ts.map +1 -0
  130. package/dist/src/integrations/economics.js +431 -0
  131. package/dist/src/integrations/economics.js.map +1 -0
  132. package/dist/src/integrations/execution-policy.d.ts +189 -0
  133. package/dist/src/integrations/execution-policy.d.ts.map +1 -0
  134. package/dist/src/integrations/execution-policy.js +352 -0
  135. package/dist/src/integrations/execution-policy.js.map +1 -0
  136. package/dist/src/integrations/file-change-tracker.d.ts +161 -0
  137. package/dist/src/integrations/file-change-tracker.d.ts.map +1 -0
  138. package/dist/src/integrations/file-change-tracker.js +520 -0
  139. package/dist/src/integrations/file-change-tracker.js.map +1 -0
  140. package/dist/src/integrations/hierarchical-config.d.ts +212 -0
  141. package/dist/src/integrations/hierarchical-config.d.ts.map +1 -0
  142. package/dist/src/integrations/hierarchical-config.js +484 -0
  143. package/dist/src/integrations/hierarchical-config.js.map +1 -0
  144. package/dist/src/integrations/hooks.d.ts +114 -0
  145. package/dist/src/integrations/hooks.d.ts.map +1 -0
  146. package/dist/src/integrations/hooks.js +326 -0
  147. package/dist/src/integrations/hooks.js.map +1 -0
  148. package/dist/src/integrations/ignore.d.ts +143 -0
  149. package/dist/src/integrations/ignore.d.ts.map +1 -0
  150. package/dist/src/integrations/ignore.js +417 -0
  151. package/dist/src/integrations/ignore.js.map +1 -0
  152. package/dist/src/integrations/image-renderer.d.ts +119 -0
  153. package/dist/src/integrations/image-renderer.d.ts.map +1 -0
  154. package/dist/src/integrations/image-renderer.js +306 -0
  155. package/dist/src/integrations/image-renderer.js.map +1 -0
  156. package/dist/src/integrations/index.d.ts +42 -0
  157. package/dist/src/integrations/index.d.ts.map +1 -0
  158. package/dist/src/integrations/index.js +73 -0
  159. package/dist/src/integrations/index.js.map +1 -0
  160. package/dist/src/integrations/lsp.d.ts +196 -0
  161. package/dist/src/integrations/lsp.d.ts.map +1 -0
  162. package/dist/src/integrations/lsp.js +582 -0
  163. package/dist/src/integrations/lsp.js.map +1 -0
  164. package/dist/src/integrations/mcp-client.d.ts +270 -0
  165. package/dist/src/integrations/mcp-client.d.ts.map +1 -0
  166. package/dist/src/integrations/mcp-client.js +698 -0
  167. package/dist/src/integrations/mcp-client.js.map +1 -0
  168. package/dist/src/integrations/mcp-tool-search.d.ts +77 -0
  169. package/dist/src/integrations/mcp-tool-search.d.ts.map +1 -0
  170. package/dist/src/integrations/mcp-tool-search.js +220 -0
  171. package/dist/src/integrations/mcp-tool-search.js.map +1 -0
  172. package/dist/src/integrations/memory.d.ts +108 -0
  173. package/dist/src/integrations/memory.d.ts.map +1 -0
  174. package/dist/src/integrations/memory.js +288 -0
  175. package/dist/src/integrations/memory.js.map +1 -0
  176. package/dist/src/integrations/multi-agent.d.ts +150 -0
  177. package/dist/src/integrations/multi-agent.d.ts.map +1 -0
  178. package/dist/src/integrations/multi-agent.js +306 -0
  179. package/dist/src/integrations/multi-agent.js.map +1 -0
  180. package/dist/src/integrations/observability.d.ts +162 -0
  181. package/dist/src/integrations/observability.d.ts.map +1 -0
  182. package/dist/src/integrations/observability.js +406 -0
  183. package/dist/src/integrations/observability.js.map +1 -0
  184. package/dist/src/integrations/openrouter-pricing.d.ts +42 -0
  185. package/dist/src/integrations/openrouter-pricing.d.ts.map +1 -0
  186. package/dist/src/integrations/openrouter-pricing.js +124 -0
  187. package/dist/src/integrations/openrouter-pricing.js.map +1 -0
  188. package/dist/src/integrations/pending-plan.d.ts +171 -0
  189. package/dist/src/integrations/pending-plan.d.ts.map +1 -0
  190. package/dist/src/integrations/pending-plan.js +244 -0
  191. package/dist/src/integrations/pending-plan.js.map +1 -0
  192. package/dist/src/integrations/persistence.d.ts +48 -0
  193. package/dist/src/integrations/persistence.d.ts.map +1 -0
  194. package/dist/src/integrations/persistence.js +196 -0
  195. package/dist/src/integrations/persistence.js.map +1 -0
  196. package/dist/src/integrations/planning.d.ts +96 -0
  197. package/dist/src/integrations/planning.d.ts.map +1 -0
  198. package/dist/src/integrations/planning.js +338 -0
  199. package/dist/src/integrations/planning.js.map +1 -0
  200. package/dist/src/integrations/pty-shell.d.ts +169 -0
  201. package/dist/src/integrations/pty-shell.d.ts.map +1 -0
  202. package/dist/src/integrations/pty-shell.js +367 -0
  203. package/dist/src/integrations/pty-shell.js.map +1 -0
  204. package/dist/src/integrations/react.d.ts +139 -0
  205. package/dist/src/integrations/react.d.ts.map +1 -0
  206. package/dist/src/integrations/react.js +273 -0
  207. package/dist/src/integrations/react.js.map +1 -0
  208. package/dist/src/integrations/resources.d.ts +177 -0
  209. package/dist/src/integrations/resources.d.ts.map +1 -0
  210. package/dist/src/integrations/resources.js +311 -0
  211. package/dist/src/integrations/resources.js.map +1 -0
  212. package/dist/src/integrations/result-synthesizer.d.ts +389 -0
  213. package/dist/src/integrations/result-synthesizer.d.ts.map +1 -0
  214. package/dist/src/integrations/result-synthesizer.js +951 -0
  215. package/dist/src/integrations/result-synthesizer.js.map +1 -0
  216. package/dist/src/integrations/routing.d.ts +117 -0
  217. package/dist/src/integrations/routing.d.ts.map +1 -0
  218. package/dist/src/integrations/routing.js +347 -0
  219. package/dist/src/integrations/routing.js.map +1 -0
  220. package/dist/src/integrations/rules.d.ts +131 -0
  221. package/dist/src/integrations/rules.d.ts.map +1 -0
  222. package/dist/src/integrations/rules.js +284 -0
  223. package/dist/src/integrations/rules.js.map +1 -0
  224. package/dist/src/integrations/safety.d.ts +142 -0
  225. package/dist/src/integrations/safety.d.ts.map +1 -0
  226. package/dist/src/integrations/safety.js +342 -0
  227. package/dist/src/integrations/safety.js.map +1 -0
  228. package/dist/src/integrations/sandbox/basic.d.ts +74 -0
  229. package/dist/src/integrations/sandbox/basic.d.ts.map +1 -0
  230. package/dist/src/integrations/sandbox/basic.js +310 -0
  231. package/dist/src/integrations/sandbox/basic.js.map +1 -0
  232. package/dist/src/integrations/sandbox/docker.d.ts +94 -0
  233. package/dist/src/integrations/sandbox/docker.d.ts.map +1 -0
  234. package/dist/src/integrations/sandbox/docker.js +293 -0
  235. package/dist/src/integrations/sandbox/docker.js.map +1 -0
  236. package/dist/src/integrations/sandbox/index.d.ts +182 -0
  237. package/dist/src/integrations/sandbox/index.d.ts.map +1 -0
  238. package/dist/src/integrations/sandbox/index.js +382 -0
  239. package/dist/src/integrations/sandbox/index.js.map +1 -0
  240. package/dist/src/integrations/sandbox/landlock.d.ts +59 -0
  241. package/dist/src/integrations/sandbox/landlock.d.ts.map +1 -0
  242. package/dist/src/integrations/sandbox/landlock.js +326 -0
  243. package/dist/src/integrations/sandbox/landlock.js.map +1 -0
  244. package/dist/src/integrations/sandbox/seatbelt.d.ts +68 -0
  245. package/dist/src/integrations/sandbox/seatbelt.d.ts.map +1 -0
  246. package/dist/src/integrations/sandbox/seatbelt.js +298 -0
  247. package/dist/src/integrations/sandbox/seatbelt.js.map +1 -0
  248. package/dist/src/integrations/semantic-cache.d.ts +178 -0
  249. package/dist/src/integrations/semantic-cache.d.ts.map +1 -0
  250. package/dist/src/integrations/semantic-cache.js +372 -0
  251. package/dist/src/integrations/semantic-cache.js.map +1 -0
  252. package/dist/src/integrations/session-store.d.ts +183 -0
  253. package/dist/src/integrations/session-store.d.ts.map +1 -0
  254. package/dist/src/integrations/session-store.js +345 -0
  255. package/dist/src/integrations/session-store.js.map +1 -0
  256. package/dist/src/integrations/shared-blackboard.d.ts +403 -0
  257. package/dist/src/integrations/shared-blackboard.d.ts.map +1 -0
  258. package/dist/src/integrations/shared-blackboard.js +710 -0
  259. package/dist/src/integrations/shared-blackboard.js.map +1 -0
  260. package/dist/src/integrations/skills.d.ts +171 -0
  261. package/dist/src/integrations/skills.d.ts.map +1 -0
  262. package/dist/src/integrations/skills.js +403 -0
  263. package/dist/src/integrations/skills.js.map +1 -0
  264. package/dist/src/integrations/smart-decomposer.d.ts +322 -0
  265. package/dist/src/integrations/smart-decomposer.d.ts.map +1 -0
  266. package/dist/src/integrations/smart-decomposer.js +856 -0
  267. package/dist/src/integrations/smart-decomposer.js.map +1 -0
  268. package/dist/src/integrations/sourcegraph.d.ts +169 -0
  269. package/dist/src/integrations/sourcegraph.d.ts.map +1 -0
  270. package/dist/src/integrations/sourcegraph.js +379 -0
  271. package/dist/src/integrations/sourcegraph.js.map +1 -0
  272. package/dist/src/integrations/sqlite-store.d.ts +518 -0
  273. package/dist/src/integrations/sqlite-store.d.ts.map +1 -0
  274. package/dist/src/integrations/sqlite-store.js +1423 -0
  275. package/dist/src/integrations/sqlite-store.js.map +1 -0
  276. package/dist/src/integrations/streaming.d.ts +102 -0
  277. package/dist/src/integrations/streaming.d.ts.map +1 -0
  278. package/dist/src/integrations/streaming.js +362 -0
  279. package/dist/src/integrations/streaming.js.map +1 -0
  280. package/dist/src/integrations/thread-manager.d.ts +199 -0
  281. package/dist/src/integrations/thread-manager.d.ts.map +1 -0
  282. package/dist/src/integrations/thread-manager.js +357 -0
  283. package/dist/src/integrations/thread-manager.js.map +1 -0
  284. package/dist/src/main.d.ts +26 -0
  285. package/dist/src/main.d.ts.map +1 -0
  286. package/dist/src/main.js +170 -0
  287. package/dist/src/main.js.map +1 -0
  288. package/dist/src/modes/index.d.ts +10 -0
  289. package/dist/src/modes/index.d.ts.map +1 -0
  290. package/dist/src/modes/index.js +10 -0
  291. package/dist/src/modes/index.js.map +1 -0
  292. package/dist/src/modes/repl.d.ts +19 -0
  293. package/dist/src/modes/repl.d.ts.map +1 -0
  294. package/dist/src/modes/repl.js +393 -0
  295. package/dist/src/modes/repl.js.map +1 -0
  296. package/dist/src/modes/tui.d.ts +29 -0
  297. package/dist/src/modes/tui.d.ts.map +1 -0
  298. package/dist/src/modes/tui.js +272 -0
  299. package/dist/src/modes/tui.js.map +1 -0
  300. package/dist/src/modes.d.ts +179 -0
  301. package/dist/src/modes.d.ts.map +1 -0
  302. package/dist/src/modes.js +385 -0
  303. package/dist/src/modes.js.map +1 -0
  304. package/dist/src/observability/tracer.d.ts +111 -0
  305. package/dist/src/observability/tracer.d.ts.map +1 -0
  306. package/dist/src/observability/tracer.js +300 -0
  307. package/dist/src/observability/tracer.js.map +1 -0
  308. package/dist/src/observability/types.d.ts +271 -0
  309. package/dist/src/observability/types.d.ts.map +1 -0
  310. package/dist/src/observability/types.js +24 -0
  311. package/dist/src/observability/types.js.map +1 -0
  312. package/dist/src/paths.d.ts +101 -0
  313. package/dist/src/paths.d.ts.map +1 -0
  314. package/dist/src/paths.js +148 -0
  315. package/dist/src/paths.js.map +1 -0
  316. package/dist/src/persistence/index.d.ts +38 -0
  317. package/dist/src/persistence/index.d.ts.map +1 -0
  318. package/dist/src/persistence/index.js +48 -0
  319. package/dist/src/persistence/index.js.map +1 -0
  320. package/dist/src/persistence/migrator.d.ts +135 -0
  321. package/dist/src/persistence/migrator.d.ts.map +1 -0
  322. package/dist/src/persistence/migrator.js +303 -0
  323. package/dist/src/persistence/migrator.js.map +1 -0
  324. package/dist/src/persistence/schema.d.ts +101 -0
  325. package/dist/src/persistence/schema.d.ts.map +1 -0
  326. package/dist/src/persistence/schema.js +395 -0
  327. package/dist/src/persistence/schema.js.map +1 -0
  328. package/dist/src/providers/adapters/anthropic.d.ts +20 -0
  329. package/dist/src/providers/adapters/anthropic.d.ts.map +1 -0
  330. package/dist/src/providers/adapters/anthropic.js +124 -0
  331. package/dist/src/providers/adapters/anthropic.js.map +1 -0
  332. package/dist/src/providers/adapters/mock.d.ts +25 -0
  333. package/dist/src/providers/adapters/mock.d.ts.map +1 -0
  334. package/dist/src/providers/adapters/mock.js +133 -0
  335. package/dist/src/providers/adapters/mock.js.map +1 -0
  336. package/dist/src/providers/adapters/openai.d.ts +21 -0
  337. package/dist/src/providers/adapters/openai.d.ts.map +1 -0
  338. package/dist/src/providers/adapters/openai.js +126 -0
  339. package/dist/src/providers/adapters/openai.js.map +1 -0
  340. package/dist/src/providers/adapters/openrouter.d.ts +49 -0
  341. package/dist/src/providers/adapters/openrouter.d.ts.map +1 -0
  342. package/dist/src/providers/adapters/openrouter.js +363 -0
  343. package/dist/src/providers/adapters/openrouter.js.map +1 -0
  344. package/dist/src/providers/provider.d.ts +54 -0
  345. package/dist/src/providers/provider.d.ts.map +1 -0
  346. package/dist/src/providers/provider.js +111 -0
  347. package/dist/src/providers/provider.js.map +1 -0
  348. package/dist/src/providers/resilient-fetch.d.ts +99 -0
  349. package/dist/src/providers/resilient-fetch.d.ts.map +1 -0
  350. package/dist/src/providers/resilient-fetch.js +208 -0
  351. package/dist/src/providers/resilient-fetch.js.map +1 -0
  352. package/dist/src/providers/types.d.ts +227 -0
  353. package/dist/src/providers/types.d.ts.map +1 -0
  354. package/dist/src/providers/types.js +24 -0
  355. package/dist/src/providers/types.js.map +1 -0
  356. package/dist/src/session-picker.d.ts +28 -0
  357. package/dist/src/session-picker.d.ts.map +1 -0
  358. package/dist/src/session-picker.js +256 -0
  359. package/dist/src/session-picker.js.map +1 -0
  360. package/dist/src/test-sqlite.d.ts +2 -0
  361. package/dist/src/test-sqlite.d.ts.map +1 -0
  362. package/dist/src/test-sqlite.js +114 -0
  363. package/dist/src/test-sqlite.js.map +1 -0
  364. package/dist/src/tools/agent.d.ts +44 -0
  365. package/dist/src/tools/agent.d.ts.map +1 -0
  366. package/dist/src/tools/agent.js +110 -0
  367. package/dist/src/tools/agent.js.map +1 -0
  368. package/dist/src/tools/bash.d.ts +52 -0
  369. package/dist/src/tools/bash.d.ts.map +1 -0
  370. package/dist/src/tools/bash.js +141 -0
  371. package/dist/src/tools/bash.js.map +1 -0
  372. package/dist/src/tools/file.d.ts +47 -0
  373. package/dist/src/tools/file.d.ts.map +1 -0
  374. package/dist/src/tools/file.js +263 -0
  375. package/dist/src/tools/file.js.map +1 -0
  376. package/dist/src/tools/permission.d.ts +43 -0
  377. package/dist/src/tools/permission.d.ts.map +1 -0
  378. package/dist/src/tools/permission.js +216 -0
  379. package/dist/src/tools/permission.js.map +1 -0
  380. package/dist/src/tools/registry.d.ts +63 -0
  381. package/dist/src/tools/registry.d.ts.map +1 -0
  382. package/dist/src/tools/registry.js +250 -0
  383. package/dist/src/tools/registry.js.map +1 -0
  384. package/dist/src/tools/standard.d.ts +57 -0
  385. package/dist/src/tools/standard.d.ts.map +1 -0
  386. package/dist/src/tools/standard.js +113 -0
  387. package/dist/src/tools/standard.js.map +1 -0
  388. package/dist/src/tools/types.d.ts +146 -0
  389. package/dist/src/tools/types.d.ts.map +1 -0
  390. package/dist/src/tools/types.js +28 -0
  391. package/dist/src/tools/types.js.map +1 -0
  392. package/dist/src/tools/undo.d.ts +71 -0
  393. package/dist/src/tools/undo.d.ts.map +1 -0
  394. package/dist/src/tools/undo.js +123 -0
  395. package/dist/src/tools/undo.js.map +1 -0
  396. package/dist/src/tracing/cache-boundary-tracker.d.ts +189 -0
  397. package/dist/src/tracing/cache-boundary-tracker.d.ts.map +1 -0
  398. package/dist/src/tracing/cache-boundary-tracker.js +411 -0
  399. package/dist/src/tracing/cache-boundary-tracker.js.map +1 -0
  400. package/dist/src/tracing/trace-collector.d.ts +274 -0
  401. package/dist/src/tracing/trace-collector.d.ts.map +1 -0
  402. package/dist/src/tracing/trace-collector.js +727 -0
  403. package/dist/src/tracing/trace-collector.js.map +1 -0
  404. package/dist/src/tracing/types.d.ts +657 -0
  405. package/dist/src/tracing/types.d.ts.map +1 -0
  406. package/dist/src/tracing/types.js +39 -0
  407. package/dist/src/tracing/types.js.map +1 -0
  408. package/dist/src/tricks/failure-evidence.d.ts +268 -0
  409. package/dist/src/tricks/failure-evidence.d.ts.map +1 -0
  410. package/dist/src/tricks/failure-evidence.js +544 -0
  411. package/dist/src/tricks/failure-evidence.js.map +1 -0
  412. package/dist/src/tricks/json-utils.d.ts +77 -0
  413. package/dist/src/tricks/json-utils.d.ts.map +1 -0
  414. package/dist/src/tricks/json-utils.js +247 -0
  415. package/dist/src/tricks/json-utils.js.map +1 -0
  416. package/dist/src/tricks/kv-cache-context.d.ts +227 -0
  417. package/dist/src/tricks/kv-cache-context.d.ts.map +1 -0
  418. package/dist/src/tricks/kv-cache-context.js +377 -0
  419. package/dist/src/tricks/kv-cache-context.js.map +1 -0
  420. package/dist/src/tricks/recitation.d.ts +208 -0
  421. package/dist/src/tricks/recitation.d.ts.map +1 -0
  422. package/dist/src/tricks/recitation.js +374 -0
  423. package/dist/src/tricks/recitation.js.map +1 -0
  424. package/dist/src/tricks/reversible-compaction.d.ts +251 -0
  425. package/dist/src/tricks/reversible-compaction.d.ts.map +1 -0
  426. package/dist/src/tricks/reversible-compaction.js +555 -0
  427. package/dist/src/tricks/reversible-compaction.js.map +1 -0
  428. package/dist/src/tricks/serialization-diversity.d.ts +197 -0
  429. package/dist/src/tricks/serialization-diversity.d.ts.map +1 -0
  430. package/dist/src/tricks/serialization-diversity.js +460 -0
  431. package/dist/src/tricks/serialization-diversity.js.map +1 -0
  432. package/dist/src/tui/app.d.ts +42 -0
  433. package/dist/src/tui/app.d.ts.map +1 -0
  434. package/dist/src/tui/app.js +1076 -0
  435. package/dist/src/tui/app.js.map +1 -0
  436. package/dist/src/tui/components/ApprovalDialog.d.ts +28 -0
  437. package/dist/src/tui/components/ApprovalDialog.d.ts.map +1 -0
  438. package/dist/src/tui/components/ApprovalDialog.js +59 -0
  439. package/dist/src/tui/components/ApprovalDialog.js.map +1 -0
  440. package/dist/src/tui/components/InputArea.d.ts +35 -0
  441. package/dist/src/tui/components/InputArea.d.ts.map +1 -0
  442. package/dist/src/tui/components/InputArea.js +144 -0
  443. package/dist/src/tui/components/InputArea.js.map +1 -0
  444. package/dist/src/tui/components/MessageItem.d.ts +28 -0
  445. package/dist/src/tui/components/MessageItem.d.ts.map +1 -0
  446. package/dist/src/tui/components/MessageItem.js +27 -0
  447. package/dist/src/tui/components/MessageItem.js.map +1 -0
  448. package/dist/src/tui/components/ScrollableBox.d.ts +41 -0
  449. package/dist/src/tui/components/ScrollableBox.d.ts.map +1 -0
  450. package/dist/src/tui/components/ScrollableBox.js +101 -0
  451. package/dist/src/tui/components/ScrollableBox.js.map +1 -0
  452. package/dist/src/tui/components/ToolCallItem.d.ts +33 -0
  453. package/dist/src/tui/components/ToolCallItem.d.ts.map +1 -0
  454. package/dist/src/tui/components/ToolCallItem.js +91 -0
  455. package/dist/src/tui/components/ToolCallItem.js.map +1 -0
  456. package/dist/src/tui/components/index.d.ts +13 -0
  457. package/dist/src/tui/components/index.d.ts.map +1 -0
  458. package/dist/src/tui/components/index.js +15 -0
  459. package/dist/src/tui/components/index.js.map +1 -0
  460. package/dist/src/tui/event-display.d.ts +19 -0
  461. package/dist/src/tui/event-display.d.ts.map +1 -0
  462. package/dist/src/tui/event-display.js +178 -0
  463. package/dist/src/tui/event-display.js.map +1 -0
  464. package/dist/src/tui/index.d.ts +105 -0
  465. package/dist/src/tui/index.d.ts.map +1 -0
  466. package/dist/src/tui/index.js +214 -0
  467. package/dist/src/tui/index.js.map +1 -0
  468. package/dist/src/tui/input/CommandPalette.d.ts +55 -0
  469. package/dist/src/tui/input/CommandPalette.d.ts.map +1 -0
  470. package/dist/src/tui/input/CommandPalette.js +135 -0
  471. package/dist/src/tui/input/CommandPalette.js.map +1 -0
  472. package/dist/src/tui/input/index.d.ts +7 -0
  473. package/dist/src/tui/input/index.d.ts.map +1 -0
  474. package/dist/src/tui/input/index.js +7 -0
  475. package/dist/src/tui/input/index.js.map +1 -0
  476. package/dist/src/tui/theme/index.d.ts +45 -0
  477. package/dist/src/tui/theme/index.d.ts.map +1 -0
  478. package/dist/src/tui/theme/index.js +215 -0
  479. package/dist/src/tui/theme/index.js.map +1 -0
  480. package/dist/src/tui/types.d.ts +214 -0
  481. package/dist/src/tui/types.d.ts.map +1 -0
  482. package/dist/src/tui/types.js +27 -0
  483. package/dist/src/tui/types.js.map +1 -0
  484. package/dist/src/types.d.ts +905 -0
  485. package/dist/src/types.d.ts.map +1 -0
  486. package/dist/src/types.js +9 -0
  487. package/dist/src/types.js.map +1 -0
  488. package/package.json +89 -0
@@ -0,0 +1,518 @@
1
+ /**
2
+ * SQLite Session Store
3
+ *
4
+ * Alternative backend for session persistence using SQLite.
5
+ * Provides better query performance and ACID guarantees.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * const store = await createSQLiteStore({ dbPath: '.agent/sessions.db' });
10
+ * await store.createSession('My Session');
11
+ * await store.appendMessage({ role: 'user', content: 'Hello' });
12
+ * ```
13
+ */
14
+ import type { Message, ToolCall } from '../types.js';
15
+ import type { SessionEntry, SessionEventListener, SessionStoreConfig } from './session-store.js';
16
+ import type { PendingPlan } from './pending-plan.js';
17
+ /**
18
+ * SQLite store configuration.
19
+ */
20
+ export interface SQLiteStoreConfig extends SessionStoreConfig {
21
+ /** Path to SQLite database file */
22
+ dbPath?: string;
23
+ /** Enable WAL mode for better concurrency (default: true) */
24
+ walMode?: boolean;
25
+ }
26
+ /**
27
+ * Usage log entry for tracking API costs.
28
+ */
29
+ export interface UsageLog {
30
+ /** Session ID this usage belongs to */
31
+ sessionId: string;
32
+ /** Model ID used for the request */
33
+ modelId: string;
34
+ /** Number of prompt tokens used */
35
+ promptTokens: number;
36
+ /** Number of completion tokens generated */
37
+ completionTokens: number;
38
+ /** Cost in USD for this request */
39
+ costUsd: number;
40
+ /** ISO timestamp of when the usage occurred */
41
+ timestamp: string;
42
+ }
43
+ /**
44
+ * Session types for hierarchy management.
45
+ */
46
+ export type SessionType = 'main' | 'subagent' | 'branch' | 'fork';
47
+ /**
48
+ * Session metadata with cost tracking and hierarchy support.
49
+ */
50
+ export interface SessionMetadata {
51
+ id: string;
52
+ name?: string;
53
+ createdAt: string;
54
+ lastActiveAt: string;
55
+ messageCount: number;
56
+ tokenCount: number;
57
+ summary?: string;
58
+ /** Parent session ID for child sessions */
59
+ parentSessionId?: string;
60
+ /** Type of session */
61
+ sessionType?: SessionType;
62
+ /** Total prompt tokens used */
63
+ promptTokens?: number;
64
+ /** Total completion tokens generated */
65
+ completionTokens?: number;
66
+ /** Total cost in USD */
67
+ costUsd?: number;
68
+ }
69
+ /**
70
+ * Goal status types.
71
+ */
72
+ export type GoalStatus = 'active' | 'completed' | 'abandoned';
73
+ /**
74
+ * Goal for tracking agent objectives.
75
+ * Goals persist outside of context and survive compaction.
76
+ */
77
+ export interface Goal {
78
+ id: string;
79
+ sessionId: string;
80
+ goalText: string;
81
+ status: GoalStatus;
82
+ priority: number;
83
+ parentGoalId?: string;
84
+ progressCurrent: number;
85
+ progressTotal?: number;
86
+ createdAt: string;
87
+ updatedAt: string;
88
+ completedAt?: string;
89
+ metadata?: string;
90
+ }
91
+ /**
92
+ * Juncture type - key moments in agent execution.
93
+ */
94
+ export type JunctureType = 'decision' | 'failure' | 'breakthrough' | 'pivot';
95
+ /**
96
+ * Critical juncture - captures key decisions, failures, breakthroughs.
97
+ */
98
+ export interface Juncture {
99
+ id: number;
100
+ sessionId: string;
101
+ goalId?: string;
102
+ type: JunctureType;
103
+ description: string;
104
+ outcome?: string;
105
+ importance: number;
106
+ context?: string;
107
+ createdAt: string;
108
+ }
109
+ /**
110
+ * Worker result status types.
111
+ */
112
+ export type WorkerResultStatus = 'pending' | 'success' | 'error';
113
+ /**
114
+ * Worker result - stores full output outside main context.
115
+ * Main agent only sees reference + summary.
116
+ */
117
+ export interface WorkerResult {
118
+ id: string;
119
+ sessionId: string;
120
+ workerId: string;
121
+ taskDescription: string;
122
+ modelUsed?: string;
123
+ status: WorkerResultStatus;
124
+ summary?: string;
125
+ fullOutput?: string;
126
+ artifacts?: string;
127
+ metrics?: string;
128
+ error?: string;
129
+ createdAt: string;
130
+ completedAt?: string;
131
+ }
132
+ /**
133
+ * Worker result reference - lightweight pointer to stored result.
134
+ * This is what gets injected into context instead of full output.
135
+ */
136
+ export interface WorkerResultRef {
137
+ id: string;
138
+ workerId: string;
139
+ taskDescription: string;
140
+ status: WorkerResultStatus;
141
+ summary?: string;
142
+ modelUsed?: string;
143
+ /** Hint: Use store.getWorkerResult(id) to retrieve full output */
144
+ retrievalHint: string;
145
+ }
146
+ /**
147
+ * Session manifest - complete snapshot for handoff.
148
+ * Contains all information needed for another agent/human to pick up work.
149
+ */
150
+ export interface SessionManifest {
151
+ version: string;
152
+ exportedAt: string;
153
+ session: {
154
+ id: string;
155
+ name?: string;
156
+ createdAt: string;
157
+ lastActiveAt: string;
158
+ summary?: string;
159
+ };
160
+ state: {
161
+ messageCount: number;
162
+ toolCallCount: number;
163
+ compactionCount: number;
164
+ tokenCount?: number;
165
+ costUsd?: number;
166
+ };
167
+ goals: {
168
+ active: Array<{
169
+ id: string;
170
+ text: string;
171
+ priority: number;
172
+ progress?: string;
173
+ }>;
174
+ completed: Array<{
175
+ id: string;
176
+ text: string;
177
+ completedAt?: string;
178
+ }>;
179
+ };
180
+ keyMoments: Array<{
181
+ type: string;
182
+ description: string;
183
+ outcome?: string;
184
+ createdAt: string;
185
+ }>;
186
+ workerResults: Array<{
187
+ id: string;
188
+ task: string;
189
+ status: string;
190
+ summary?: string;
191
+ model?: string;
192
+ }>;
193
+ resumption: {
194
+ currentSessionId: string;
195
+ canResume: boolean;
196
+ hint: string;
197
+ };
198
+ }
199
+ /**
200
+ * SQLite-backed session store.
201
+ */
202
+ export declare class SQLiteStore {
203
+ private db;
204
+ private config;
205
+ private currentSessionId;
206
+ private listeners;
207
+ /** Available schema features (detected after migration) */
208
+ private features;
209
+ private stmts;
210
+ constructor(config?: SQLiteStoreConfig);
211
+ /**
212
+ * Initialize the store (create tables, prepare statements).
213
+ */
214
+ initialize(): Promise<void>;
215
+ /**
216
+ * Prepare SQL statements for reuse.
217
+ */
218
+ private prepareStatements;
219
+ /**
220
+ * Create a new session.
221
+ */
222
+ createSession(name?: string): string;
223
+ /**
224
+ * Get current session ID.
225
+ */
226
+ getCurrentSessionId(): string | null;
227
+ /**
228
+ * Set current session ID.
229
+ */
230
+ setCurrentSessionId(sessionId: string): void;
231
+ /**
232
+ * Append an entry to the current session.
233
+ */
234
+ appendEntry(entry: Omit<SessionEntry, 'timestamp'>): void;
235
+ /**
236
+ * Append a message to the current session.
237
+ */
238
+ appendMessage(message: Message): void;
239
+ /**
240
+ * Append a tool call to the current session.
241
+ */
242
+ appendToolCall(toolCall: ToolCall): void;
243
+ /**
244
+ * Append a tool result to the current session.
245
+ */
246
+ appendToolResult(callId: string, result: unknown): void;
247
+ /**
248
+ * Append a compaction summary.
249
+ */
250
+ appendCompaction(summary: string, compactedCount: number): void;
251
+ /**
252
+ * Load a session by ID.
253
+ */
254
+ loadSession(sessionId: string): SessionEntry[];
255
+ /**
256
+ * Reconstruct messages from session entries.
257
+ */
258
+ loadSessionMessages(sessionId: string): Message[];
259
+ /**
260
+ * Delete a session.
261
+ */
262
+ deleteSession(sessionId: string): void;
263
+ /**
264
+ * List all sessions.
265
+ */
266
+ listSessions(): SessionMetadata[];
267
+ /**
268
+ * Get the most recent session.
269
+ */
270
+ getRecentSession(): SessionMetadata | null;
271
+ /**
272
+ * Get session metadata by ID.
273
+ */
274
+ getSessionMetadata(sessionId: string): SessionMetadata | undefined;
275
+ /**
276
+ * Update session metadata.
277
+ */
278
+ updateSessionMetadata(sessionId: string, updates: Partial<Pick<SessionMetadata, 'name' | 'summary' | 'tokenCount'>>): void;
279
+ /**
280
+ * Save a checkpoint for state restoration.
281
+ */
282
+ saveCheckpoint(state: Record<string, unknown>, description?: string): string;
283
+ /**
284
+ * Load the latest checkpoint for a session.
285
+ */
286
+ loadLatestCheckpoint(sessionId: string): {
287
+ id: string;
288
+ state: Record<string, unknown>;
289
+ createdAt: string;
290
+ description?: string;
291
+ } | null;
292
+ /**
293
+ * Query entries with SQL (advanced usage).
294
+ */
295
+ query<T = unknown>(sql: string, params?: unknown[]): T[];
296
+ /**
297
+ * Get database statistics.
298
+ */
299
+ getStats(): {
300
+ sessionCount: number;
301
+ entryCount: number;
302
+ toolCallCount: number;
303
+ checkpointCount: number;
304
+ dbSizeBytes: number;
305
+ };
306
+ /**
307
+ * Log API usage for cost tracking.
308
+ * Inserts a usage log entry and updates session totals atomically.
309
+ */
310
+ logUsage(usage: UsageLog): void;
311
+ /**
312
+ * Get aggregated usage for a session.
313
+ */
314
+ getSessionUsage(sessionId: string): {
315
+ promptTokens: number;
316
+ completionTokens: number;
317
+ costUsd: number;
318
+ };
319
+ /**
320
+ * Create a child session linked to a parent.
321
+ */
322
+ createChildSession(parentId: string, name?: string, type?: SessionType): string;
323
+ /**
324
+ * Get all direct child sessions of a parent.
325
+ */
326
+ getChildSessions(parentId: string): SessionMetadata[];
327
+ /**
328
+ * Get the full session tree starting from a root session.
329
+ * Uses a recursive CTE to traverse the hierarchy.
330
+ */
331
+ getSessionTree(rootId: string): SessionMetadata[];
332
+ /**
333
+ * Check if goals feature is available.
334
+ */
335
+ hasGoalsFeature(): boolean;
336
+ /**
337
+ * Create a new goal for the current session.
338
+ * Goals persist outside of context and survive compaction.
339
+ * Returns undefined if goals feature is not available.
340
+ */
341
+ createGoal(goalText: string, options?: {
342
+ priority?: number;
343
+ parentGoalId?: string;
344
+ progressTotal?: number;
345
+ metadata?: Record<string, unknown>;
346
+ }): string | undefined;
347
+ /**
348
+ * Update a goal's status or progress.
349
+ */
350
+ updateGoal(goalId: string, updates: {
351
+ goalText?: string;
352
+ status?: GoalStatus;
353
+ priority?: number;
354
+ progressCurrent?: number;
355
+ progressTotal?: number;
356
+ metadata?: Record<string, unknown>;
357
+ }): void;
358
+ /**
359
+ * Mark a goal as completed.
360
+ */
361
+ completeGoal(goalId: string): void;
362
+ /**
363
+ * Get a goal by ID.
364
+ */
365
+ getGoal(goalId: string): Goal | undefined;
366
+ /**
367
+ * List all goals for a session.
368
+ */
369
+ listGoals(sessionId?: string): Goal[];
370
+ /**
371
+ * List active goals for a session.
372
+ */
373
+ listActiveGoals(sessionId?: string): Goal[];
374
+ /**
375
+ * Get a summary of the current goals for context injection.
376
+ * This is what gets recited to maintain goal awareness.
377
+ */
378
+ getGoalsSummary(sessionId?: string): string;
379
+ /**
380
+ * Log a critical juncture (decision, failure, breakthrough, pivot).
381
+ * Returns -1 if goals feature is not available.
382
+ */
383
+ logJuncture(type: JunctureType, description: string, options?: {
384
+ goalId?: string;
385
+ outcome?: string;
386
+ importance?: number;
387
+ context?: Record<string, unknown>;
388
+ }): number;
389
+ /**
390
+ * List junctures for a session.
391
+ */
392
+ listJunctures(sessionId?: string, limit?: number): Juncture[];
393
+ /**
394
+ * Get recent critical junctures for context.
395
+ */
396
+ getJuncturesSummary(sessionId?: string, limit?: number): string;
397
+ /**
398
+ * Check if worker results feature is available.
399
+ */
400
+ hasWorkerResultsFeature(): boolean;
401
+ /**
402
+ * Create a pending worker result entry.
403
+ * Call this when spawning a worker to reserve the result slot.
404
+ * Returns the result ID for later reference.
405
+ */
406
+ createWorkerResult(workerId: string, taskDescription: string, modelUsed?: string): string | undefined;
407
+ /**
408
+ * Complete a worker result with output.
409
+ * Stores full output in database, generates summary for context injection.
410
+ */
411
+ completeWorkerResult(resultId: string, output: {
412
+ fullOutput: string;
413
+ summary?: string;
414
+ artifacts?: Record<string, unknown>[];
415
+ metrics?: {
416
+ tokens?: number;
417
+ duration?: number;
418
+ toolCalls?: number;
419
+ };
420
+ }): WorkerResultRef | undefined;
421
+ /**
422
+ * Mark a worker result as failed.
423
+ */
424
+ failWorkerResult(resultId: string, error: string): void;
425
+ /**
426
+ * Get a worker result by ID (includes full output).
427
+ */
428
+ getWorkerResult(resultId: string): WorkerResult | undefined;
429
+ /**
430
+ * Get a lightweight reference to a worker result (for context injection).
431
+ * Does NOT include full output - that stays in database.
432
+ */
433
+ getWorkerResultRef(resultId: string): WorkerResultRef | undefined;
434
+ /**
435
+ * List all worker results for a session.
436
+ */
437
+ listWorkerResults(sessionId?: string): WorkerResult[];
438
+ /**
439
+ * List pending worker results (workers still running).
440
+ */
441
+ listPendingWorkerResults(sessionId?: string): WorkerResult[];
442
+ /**
443
+ * Get a summary of worker results for context injection.
444
+ * Returns lightweight references, not full outputs.
445
+ */
446
+ getWorkerResultsSummary(sessionId?: string): string;
447
+ /**
448
+ * Convert a full WorkerResult to a lightweight reference.
449
+ */
450
+ private toResultRef;
451
+ /**
452
+ * Generate a brief summary from full output.
453
+ */
454
+ private generateResultSummary;
455
+ /**
456
+ * Check if pending plans feature is available.
457
+ */
458
+ hasPendingPlansFeature(): boolean;
459
+ /**
460
+ * Save a pending plan to the database.
461
+ */
462
+ savePendingPlan(plan: PendingPlan, sessionId?: string): void;
463
+ /**
464
+ * Get the pending plan for a session.
465
+ * Returns the most recent pending plan, or null if none.
466
+ */
467
+ getPendingPlan(sessionId?: string): PendingPlan | null;
468
+ /**
469
+ * Update the status of a pending plan.
470
+ */
471
+ updatePlanStatus(planId: string, status: 'approved' | 'rejected' | 'partially_approved'): void;
472
+ /**
473
+ * Delete a pending plan.
474
+ */
475
+ deletePendingPlan(planId: string): void;
476
+ /**
477
+ * Export a complete session manifest for handoff.
478
+ * Contains all information needed for another agent/human to pick up the work.
479
+ */
480
+ exportSessionManifest(sessionId?: string): SessionManifest | undefined;
481
+ /**
482
+ * Export session as human-readable markdown.
483
+ * Suitable for printing, sharing, or reviewing offline.
484
+ */
485
+ exportSessionMarkdown(sessionId?: string): string;
486
+ /**
487
+ * Migrate sessions from JSONL format to SQLite.
488
+ */
489
+ migrateFromJSONL(jsonlDir: string): Promise<{
490
+ migrated: number;
491
+ failed: number;
492
+ }>;
493
+ /**
494
+ * Prune old sessions if over limit.
495
+ */
496
+ private pruneOldSessions;
497
+ /**
498
+ * Subscribe to events.
499
+ */
500
+ on(listener: SessionEventListener): () => void;
501
+ /**
502
+ * Emit an event.
503
+ */
504
+ private emit;
505
+ /**
506
+ * Close the database connection.
507
+ */
508
+ close(): void;
509
+ /**
510
+ * Cleanup - same as close for compatibility.
511
+ */
512
+ cleanup(): Promise<void>;
513
+ }
514
+ /**
515
+ * Create and initialize a SQLite session store.
516
+ */
517
+ export declare function createSQLiteStore(config?: SQLiteStoreConfig): Promise<SQLiteStore>;
518
+ //# sourceMappingURL=sqlite-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite-store.d.ts","sourceRoot":"","sources":["../../../src/integrations/sqlite-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EACV,YAAY,EAGZ,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAO5B,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,mBAAmB,CAAC;AAMrE;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,gBAAgB,EAAE,MAAM,CAAC;IACzB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B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