attocode 0.2.4 → 0.2.5

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 (577) hide show
  1. package/CHANGELOG.md +56 -1
  2. package/dist/src/adapters.d.ts +2 -1
  3. package/dist/src/adapters.d.ts.map +1 -1
  4. package/dist/src/adapters.js +60 -2
  5. package/dist/src/adapters.js.map +1 -1
  6. package/dist/src/agent/agent-builder.d.ts +117 -0
  7. package/dist/src/agent/agent-builder.d.ts.map +1 -0
  8. package/dist/src/agent/agent-builder.js +204 -0
  9. package/dist/src/agent/agent-builder.js.map +1 -0
  10. package/dist/src/agent/feature-initializer.d.ts +80 -0
  11. package/dist/src/agent/feature-initializer.d.ts.map +1 -0
  12. package/dist/src/agent/feature-initializer.js +677 -0
  13. package/dist/src/agent/feature-initializer.js.map +1 -0
  14. package/dist/src/agent/index.d.ts +13 -0
  15. package/dist/src/agent/index.d.ts.map +1 -0
  16. package/dist/src/agent/index.js +13 -0
  17. package/dist/src/agent/index.js.map +1 -0
  18. package/dist/src/agent/message-builder.d.ts +50 -0
  19. package/dist/src/agent/message-builder.d.ts.map +1 -0
  20. package/dist/src/agent/message-builder.js +173 -0
  21. package/dist/src/agent/message-builder.js.map +1 -0
  22. package/dist/src/agent/session-api.d.ts +94 -0
  23. package/dist/src/agent/session-api.d.ts.map +1 -0
  24. package/dist/src/agent/session-api.js +262 -0
  25. package/dist/src/agent/session-api.js.map +1 -0
  26. package/dist/src/agent-tools/lsp-file-tools.d.ts +1 -1
  27. package/dist/src/agent-tools/lsp-file-tools.d.ts.map +1 -1
  28. package/dist/src/agent.d.ts +14 -115
  29. package/dist/src/agent.d.ts.map +1 -1
  30. package/dist/src/agent.js +36 -1177
  31. package/dist/src/agent.js.map +1 -1
  32. package/dist/src/cli.js +1 -1
  33. package/dist/src/cli.js.map +1 -1
  34. package/dist/src/commands/handler.d.ts.map +1 -1
  35. package/dist/src/commands/handler.js +8 -7
  36. package/dist/src/commands/handler.js.map +1 -1
  37. package/dist/src/commands/init.js +1 -1
  38. package/dist/src/commands/init.js.map +1 -1
  39. package/dist/src/config/schema.d.ts +6 -6
  40. package/dist/src/core/execution-loop.d.ts.map +1 -1
  41. package/dist/src/core/execution-loop.js +155 -16
  42. package/dist/src/core/execution-loop.js.map +1 -1
  43. package/dist/src/core/response-handler.d.ts.map +1 -1
  44. package/dist/src/core/response-handler.js +3 -2
  45. package/dist/src/core/response-handler.js.map +1 -1
  46. package/dist/src/core/subagent-spawner.d.ts.map +1 -1
  47. package/dist/src/core/subagent-spawner.js +13 -6
  48. package/dist/src/core/subagent-spawner.js.map +1 -1
  49. package/dist/src/core/tool-executor.d.ts.map +1 -1
  50. package/dist/src/core/tool-executor.js +7 -2
  51. package/dist/src/core/tool-executor.js.map +1 -1
  52. package/dist/src/core/types.d.ts +1 -0
  53. package/dist/src/core/types.d.ts.map +1 -1
  54. package/dist/src/core/types.js.map +1 -1
  55. package/dist/src/integrations/agents/agent-registry.d.ts +262 -0
  56. package/dist/src/integrations/agents/agent-registry.d.ts.map +1 -0
  57. package/dist/src/integrations/agents/agent-registry.js +686 -0
  58. package/dist/src/integrations/agents/agent-registry.js.map +1 -0
  59. package/dist/src/integrations/agents/async-subagent.d.ts +135 -0
  60. package/dist/src/integrations/agents/async-subagent.d.ts.map +1 -0
  61. package/dist/src/integrations/agents/async-subagent.js +213 -0
  62. package/dist/src/integrations/agents/async-subagent.js.map +1 -0
  63. package/dist/src/integrations/agents/complexity-classifier.d.ts +86 -0
  64. package/dist/src/integrations/agents/complexity-classifier.d.ts.map +1 -0
  65. package/dist/src/integrations/agents/complexity-classifier.js +233 -0
  66. package/dist/src/integrations/agents/complexity-classifier.js.map +1 -0
  67. package/dist/src/integrations/agents/delegation-protocol.d.ts +86 -0
  68. package/dist/src/integrations/agents/delegation-protocol.d.ts.map +1 -0
  69. package/dist/src/integrations/agents/delegation-protocol.js +127 -0
  70. package/dist/src/integrations/agents/delegation-protocol.js.map +1 -0
  71. package/dist/src/integrations/agents/multi-agent.d.ts +150 -0
  72. package/dist/src/integrations/agents/multi-agent.d.ts.map +1 -0
  73. package/dist/src/integrations/agents/multi-agent.js +306 -0
  74. package/dist/src/integrations/agents/multi-agent.js.map +1 -0
  75. package/dist/src/integrations/agents/result-synthesizer.d.ts +389 -0
  76. package/dist/src/integrations/agents/result-synthesizer.d.ts.map +1 -0
  77. package/dist/src/integrations/agents/result-synthesizer.js +951 -0
  78. package/dist/src/integrations/agents/result-synthesizer.js.map +1 -0
  79. package/dist/src/integrations/agents/shared-blackboard.d.ts +406 -0
  80. package/dist/src/integrations/agents/shared-blackboard.d.ts.map +1 -0
  81. package/dist/src/integrations/agents/shared-blackboard.js +757 -0
  82. package/dist/src/integrations/agents/shared-blackboard.js.map +1 -0
  83. package/dist/src/integrations/agents/subagent-output-store.d.ts +91 -0
  84. package/dist/src/integrations/agents/subagent-output-store.d.ts.map +1 -0
  85. package/dist/src/integrations/agents/subagent-output-store.js +257 -0
  86. package/dist/src/integrations/agents/subagent-output-store.js.map +1 -0
  87. package/dist/src/integrations/budget/budget-pool.d.ts +115 -0
  88. package/dist/src/integrations/budget/budget-pool.d.ts.map +1 -0
  89. package/dist/src/integrations/budget/budget-pool.js +205 -0
  90. package/dist/src/integrations/budget/budget-pool.js.map +1 -0
  91. package/dist/src/integrations/budget/cancellation.d.ts +229 -0
  92. package/dist/src/integrations/budget/cancellation.d.ts.map +1 -0
  93. package/dist/src/integrations/budget/cancellation.js +520 -0
  94. package/dist/src/integrations/budget/cancellation.js.map +1 -0
  95. package/dist/src/integrations/budget/dynamic-budget.d.ts +81 -0
  96. package/dist/src/integrations/budget/dynamic-budget.d.ts.map +1 -0
  97. package/dist/src/integrations/budget/dynamic-budget.js +151 -0
  98. package/dist/src/integrations/budget/dynamic-budget.js.map +1 -0
  99. package/dist/src/integrations/budget/economics.d.ts +435 -0
  100. package/dist/src/integrations/budget/economics.d.ts.map +1 -0
  101. package/dist/src/integrations/budget/economics.js +1007 -0
  102. package/dist/src/integrations/budget/economics.js.map +1 -0
  103. package/dist/src/integrations/budget/injection-budget.d.ts +71 -0
  104. package/dist/src/integrations/budget/injection-budget.d.ts.map +1 -0
  105. package/dist/src/integrations/budget/injection-budget.js +137 -0
  106. package/dist/src/integrations/budget/injection-budget.js.map +1 -0
  107. package/dist/src/integrations/budget/loop-detector.d.ts +105 -0
  108. package/dist/src/integrations/budget/loop-detector.d.ts.map +1 -0
  109. package/dist/src/integrations/budget/loop-detector.js +287 -0
  110. package/dist/src/integrations/budget/loop-detector.js.map +1 -0
  111. package/dist/src/integrations/budget/phase-tracker.d.ts +114 -0
  112. package/dist/src/integrations/budget/phase-tracker.d.ts.map +1 -0
  113. package/dist/src/integrations/budget/phase-tracker.js +262 -0
  114. package/dist/src/integrations/budget/phase-tracker.js.map +1 -0
  115. package/dist/src/integrations/budget/resources.d.ts +182 -0
  116. package/dist/src/integrations/budget/resources.d.ts.map +1 -0
  117. package/dist/src/integrations/budget/resources.js +318 -0
  118. package/dist/src/integrations/budget/resources.js.map +1 -0
  119. package/dist/src/integrations/context/auto-compaction.d.ts +210 -0
  120. package/dist/src/integrations/context/auto-compaction.d.ts.map +1 -0
  121. package/dist/src/integrations/context/auto-compaction.js +477 -0
  122. package/dist/src/integrations/context/auto-compaction.js.map +1 -0
  123. package/dist/src/integrations/context/code-analyzer.d.ts +71 -0
  124. package/dist/src/integrations/context/code-analyzer.d.ts.map +1 -0
  125. package/dist/src/integrations/context/code-analyzer.js +448 -0
  126. package/dist/src/integrations/context/code-analyzer.js.map +1 -0
  127. package/dist/src/integrations/context/code-selector.d.ts +78 -0
  128. package/dist/src/integrations/context/code-selector.d.ts.map +1 -0
  129. package/dist/src/integrations/context/code-selector.js +649 -0
  130. package/dist/src/integrations/context/code-selector.js.map +1 -0
  131. package/dist/src/integrations/context/codebase-ast.d.ts +138 -0
  132. package/dist/src/integrations/context/codebase-ast.d.ts.map +1 -0
  133. package/dist/src/integrations/context/codebase-ast.js +818 -0
  134. package/dist/src/integrations/context/codebase-ast.js.map +1 -0
  135. package/dist/src/integrations/context/codebase-context.d.ts +473 -0
  136. package/dist/src/integrations/context/codebase-context.d.ts.map +1 -0
  137. package/dist/src/integrations/context/codebase-context.js +685 -0
  138. package/dist/src/integrations/context/codebase-context.js.map +1 -0
  139. package/dist/src/integrations/context/compaction.d.ts +191 -0
  140. package/dist/src/integrations/context/compaction.d.ts.map +1 -0
  141. package/dist/src/integrations/context/compaction.js +384 -0
  142. package/dist/src/integrations/context/compaction.js.map +1 -0
  143. package/dist/src/integrations/context/context-engineering.d.ts +274 -0
  144. package/dist/src/integrations/context/context-engineering.d.ts.map +1 -0
  145. package/dist/src/integrations/context/context-engineering.js +437 -0
  146. package/dist/src/integrations/context/context-engineering.js.map +1 -0
  147. package/dist/src/integrations/context/file-cache.d.ts +97 -0
  148. package/dist/src/integrations/context/file-cache.d.ts.map +1 -0
  149. package/dist/src/integrations/context/file-cache.js +218 -0
  150. package/dist/src/integrations/context/file-cache.js.map +1 -0
  151. package/dist/src/integrations/context/semantic-cache.d.ts +178 -0
  152. package/dist/src/integrations/context/semantic-cache.d.ts.map +1 -0
  153. package/dist/src/integrations/context/semantic-cache.js +372 -0
  154. package/dist/src/integrations/context/semantic-cache.js.map +1 -0
  155. package/dist/src/integrations/index.d.ts +72 -68
  156. package/dist/src/integrations/index.d.ts.map +1 -1
  157. package/dist/src/integrations/index.js +76 -68
  158. package/dist/src/integrations/index.js.map +1 -1
  159. package/dist/src/integrations/lsp/lsp.d.ts +196 -0
  160. package/dist/src/integrations/lsp/lsp.d.ts.map +1 -0
  161. package/dist/src/integrations/lsp/lsp.js +583 -0
  162. package/dist/src/integrations/lsp/lsp.js.map +1 -0
  163. package/dist/src/integrations/mcp/mcp-client.d.ts +279 -0
  164. package/dist/src/integrations/mcp/mcp-client.d.ts.map +1 -0
  165. package/dist/src/integrations/mcp/mcp-client.js +755 -0
  166. package/dist/src/integrations/mcp/mcp-client.js.map +1 -0
  167. package/dist/src/integrations/mcp/mcp-custom-tools.d.ts +102 -0
  168. package/dist/src/integrations/mcp/mcp-custom-tools.d.ts.map +1 -0
  169. package/dist/src/integrations/mcp/mcp-custom-tools.js +232 -0
  170. package/dist/src/integrations/mcp/mcp-custom-tools.js.map +1 -0
  171. package/dist/src/integrations/mcp/mcp-tool-search.d.ts +77 -0
  172. package/dist/src/integrations/mcp/mcp-tool-search.d.ts.map +1 -0
  173. package/dist/src/integrations/mcp/mcp-tool-search.js +220 -0
  174. package/dist/src/integrations/mcp/mcp-tool-search.js.map +1 -0
  175. package/dist/src/integrations/mcp/mcp-tool-validator.d.ts +60 -0
  176. package/dist/src/integrations/mcp/mcp-tool-validator.d.ts.map +1 -0
  177. package/dist/src/integrations/mcp/mcp-tool-validator.js +141 -0
  178. package/dist/src/integrations/mcp/mcp-tool-validator.js.map +1 -0
  179. package/dist/src/integrations/persistence/codebase-repository.d.ts +45 -0
  180. package/dist/src/integrations/persistence/codebase-repository.d.ts.map +1 -0
  181. package/dist/src/integrations/persistence/codebase-repository.js +81 -0
  182. package/dist/src/integrations/persistence/codebase-repository.js.map +1 -0
  183. package/dist/src/integrations/persistence/goal-repository.d.ts +71 -0
  184. package/dist/src/integrations/persistence/goal-repository.d.ts.map +1 -0
  185. package/dist/src/integrations/persistence/goal-repository.js +184 -0
  186. package/dist/src/integrations/persistence/goal-repository.js.map +1 -0
  187. package/dist/src/integrations/persistence/history.d.ts +72 -0
  188. package/dist/src/integrations/persistence/history.d.ts.map +1 -0
  189. package/dist/src/integrations/persistence/history.js +165 -0
  190. package/dist/src/integrations/persistence/history.js.map +1 -0
  191. package/dist/src/integrations/persistence/persistence.d.ts +49 -0
  192. package/dist/src/integrations/persistence/persistence.d.ts.map +1 -0
  193. package/dist/src/integrations/persistence/persistence.js +197 -0
  194. package/dist/src/integrations/persistence/persistence.js.map +1 -0
  195. package/dist/src/integrations/persistence/session-repository.d.ts +212 -0
  196. package/dist/src/integrations/persistence/session-repository.d.ts.map +1 -0
  197. package/dist/src/integrations/persistence/session-repository.js +770 -0
  198. package/dist/src/integrations/persistence/session-repository.js.map +1 -0
  199. package/dist/src/integrations/persistence/session-store.d.ts +184 -0
  200. package/dist/src/integrations/persistence/session-store.d.ts.map +1 -0
  201. package/dist/src/integrations/persistence/session-store.js +346 -0
  202. package/dist/src/integrations/persistence/session-store.js.map +1 -0
  203. package/dist/src/integrations/persistence/sqlite-store.d.ts +453 -0
  204. package/dist/src/integrations/persistence/sqlite-store.d.ts.map +1 -0
  205. package/dist/src/integrations/persistence/sqlite-store.js +676 -0
  206. package/dist/src/integrations/persistence/sqlite-store.js.map +1 -0
  207. package/dist/src/integrations/persistence/worker-repository.d.ts +65 -0
  208. package/dist/src/integrations/persistence/worker-repository.d.ts.map +1 -0
  209. package/dist/src/integrations/persistence/worker-repository.js +183 -0
  210. package/dist/src/integrations/persistence/worker-repository.js.map +1 -0
  211. package/dist/src/integrations/quality/auto-checkpoint.d.ts +98 -0
  212. package/dist/src/integrations/quality/auto-checkpoint.d.ts.map +1 -0
  213. package/dist/src/integrations/quality/auto-checkpoint.js +252 -0
  214. package/dist/src/integrations/quality/auto-checkpoint.js.map +1 -0
  215. package/dist/src/integrations/quality/dead-letter-queue.d.ts +233 -0
  216. package/dist/src/integrations/quality/dead-letter-queue.d.ts.map +1 -0
  217. package/dist/src/integrations/quality/dead-letter-queue.js +543 -0
  218. package/dist/src/integrations/quality/dead-letter-queue.js.map +1 -0
  219. package/dist/src/integrations/quality/health-check.d.ts +218 -0
  220. package/dist/src/integrations/quality/health-check.d.ts.map +1 -0
  221. package/dist/src/integrations/quality/health-check.js +415 -0
  222. package/dist/src/integrations/quality/health-check.js.map +1 -0
  223. package/dist/src/integrations/quality/learning-store.d.ts +291 -0
  224. package/dist/src/integrations/quality/learning-store.d.ts.map +1 -0
  225. package/dist/src/integrations/quality/learning-store.js +646 -0
  226. package/dist/src/integrations/quality/learning-store.js.map +1 -0
  227. package/dist/src/integrations/quality/self-improvement.d.ts +90 -0
  228. package/dist/src/integrations/quality/self-improvement.d.ts.map +1 -0
  229. package/dist/src/integrations/quality/self-improvement.js +229 -0
  230. package/dist/src/integrations/quality/self-improvement.js.map +1 -0
  231. package/dist/src/integrations/quality/tool-recommendation.d.ts +61 -0
  232. package/dist/src/integrations/quality/tool-recommendation.d.ts.map +1 -0
  233. package/dist/src/integrations/quality/tool-recommendation.js +268 -0
  234. package/dist/src/integrations/quality/tool-recommendation.js.map +1 -0
  235. package/dist/src/integrations/safety/bash-policy.d.ts +33 -0
  236. package/dist/src/integrations/safety/bash-policy.d.ts.map +1 -0
  237. package/dist/src/integrations/safety/bash-policy.js +144 -0
  238. package/dist/src/integrations/safety/bash-policy.js.map +1 -0
  239. package/dist/src/integrations/safety/edit-validator.d.ts +30 -0
  240. package/dist/src/integrations/safety/edit-validator.d.ts.map +1 -0
  241. package/dist/src/integrations/safety/edit-validator.js +87 -0
  242. package/dist/src/integrations/safety/edit-validator.js.map +1 -0
  243. package/dist/src/integrations/safety/execution-policy.d.ts +189 -0
  244. package/dist/src/integrations/safety/execution-policy.d.ts.map +1 -0
  245. package/dist/src/integrations/safety/execution-policy.js +352 -0
  246. package/dist/src/integrations/safety/execution-policy.js.map +1 -0
  247. package/dist/src/integrations/safety/policy-engine.d.ts +55 -0
  248. package/dist/src/integrations/safety/policy-engine.d.ts.map +1 -0
  249. package/dist/src/integrations/safety/policy-engine.js +247 -0
  250. package/dist/src/integrations/safety/policy-engine.js.map +1 -0
  251. package/dist/src/integrations/safety/safety.d.ts +174 -0
  252. package/dist/src/integrations/safety/safety.d.ts.map +1 -0
  253. package/dist/src/integrations/safety/safety.js +470 -0
  254. package/dist/src/integrations/safety/safety.js.map +1 -0
  255. package/dist/src/integrations/safety/sandbox/basic.d.ts +81 -0
  256. package/dist/src/integrations/safety/sandbox/basic.d.ts.map +1 -0
  257. package/dist/src/integrations/safety/sandbox/basic.js +335 -0
  258. package/dist/src/integrations/safety/sandbox/basic.js.map +1 -0
  259. package/dist/src/integrations/safety/sandbox/docker.d.ts +94 -0
  260. package/dist/src/integrations/safety/sandbox/docker.d.ts.map +1 -0
  261. package/dist/src/integrations/safety/sandbox/docker.js +294 -0
  262. package/dist/src/integrations/safety/sandbox/docker.js.map +1 -0
  263. package/dist/src/integrations/safety/sandbox/index.d.ts +188 -0
  264. package/dist/src/integrations/safety/sandbox/index.d.ts.map +1 -0
  265. package/dist/src/integrations/safety/sandbox/index.js +386 -0
  266. package/dist/src/integrations/safety/sandbox/index.js.map +1 -0
  267. package/dist/src/integrations/safety/sandbox/landlock.d.ts +59 -0
  268. package/dist/src/integrations/safety/sandbox/landlock.d.ts.map +1 -0
  269. package/dist/src/integrations/safety/sandbox/landlock.js +329 -0
  270. package/dist/src/integrations/safety/sandbox/landlock.js.map +1 -0
  271. package/dist/src/integrations/safety/sandbox/seatbelt.d.ts +68 -0
  272. package/dist/src/integrations/safety/sandbox/seatbelt.d.ts.map +1 -0
  273. package/dist/src/integrations/safety/sandbox/seatbelt.js +298 -0
  274. package/dist/src/integrations/safety/sandbox/seatbelt.js.map +1 -0
  275. package/dist/src/integrations/safety/type-checker.d.ts +53 -0
  276. package/dist/src/integrations/safety/type-checker.d.ts.map +1 -0
  277. package/dist/src/integrations/safety/type-checker.js +142 -0
  278. package/dist/src/integrations/safety/type-checker.js.map +1 -0
  279. package/dist/src/integrations/skills/skill-executor.d.ts +113 -0
  280. package/dist/src/integrations/skills/skill-executor.d.ts.map +1 -0
  281. package/dist/src/integrations/skills/skill-executor.js +270 -0
  282. package/dist/src/integrations/skills/skill-executor.js.map +1 -0
  283. package/dist/src/integrations/skills/skills.d.ts +262 -0
  284. package/dist/src/integrations/skills/skills.d.ts.map +1 -0
  285. package/dist/src/integrations/skills/skills.js +602 -0
  286. package/dist/src/integrations/skills/skills.js.map +1 -0
  287. package/dist/src/integrations/streaming/pty-shell.d.ts +169 -0
  288. package/dist/src/integrations/streaming/pty-shell.d.ts.map +1 -0
  289. package/dist/src/integrations/streaming/pty-shell.js +367 -0
  290. package/dist/src/integrations/streaming/pty-shell.js.map +1 -0
  291. package/dist/src/integrations/streaming/streaming.d.ts +102 -0
  292. package/dist/src/integrations/streaming/streaming.d.ts.map +1 -0
  293. package/dist/src/integrations/streaming/streaming.js +362 -0
  294. package/dist/src/integrations/streaming/streaming.js.map +1 -0
  295. package/dist/src/integrations/swarm/index.d.ts +2 -1
  296. package/dist/src/integrations/swarm/index.d.ts.map +1 -1
  297. package/dist/src/integrations/swarm/index.js +2 -0
  298. package/dist/src/integrations/swarm/index.js.map +1 -1
  299. package/dist/src/integrations/swarm/model-selector.js +1 -1
  300. package/dist/src/integrations/swarm/model-selector.js.map +1 -1
  301. package/dist/src/integrations/swarm/swarm-budget.d.ts +1 -1
  302. package/dist/src/integrations/swarm/swarm-budget.d.ts.map +1 -1
  303. package/dist/src/integrations/swarm/swarm-budget.js +1 -1
  304. package/dist/src/integrations/swarm/swarm-budget.js.map +1 -1
  305. package/dist/src/integrations/swarm/swarm-config-loader.d.ts.map +1 -1
  306. package/dist/src/integrations/swarm/swarm-config-loader.js +7 -0
  307. package/dist/src/integrations/swarm/swarm-config-loader.js.map +1 -1
  308. package/dist/src/integrations/swarm/swarm-events.d.ts +1 -1
  309. package/dist/src/integrations/swarm/swarm-events.d.ts.map +1 -1
  310. package/dist/src/integrations/swarm/swarm-execution.d.ts +27 -0
  311. package/dist/src/integrations/swarm/swarm-execution.d.ts.map +1 -0
  312. package/dist/src/integrations/swarm/swarm-execution.js +1021 -0
  313. package/dist/src/integrations/swarm/swarm-execution.js.map +1 -0
  314. package/dist/src/integrations/swarm/swarm-helpers.d.ts +26 -0
  315. package/dist/src/integrations/swarm/swarm-helpers.d.ts.map +1 -0
  316. package/dist/src/integrations/swarm/swarm-helpers.js +95 -0
  317. package/dist/src/integrations/swarm/swarm-helpers.js.map +1 -0
  318. package/dist/src/integrations/swarm/swarm-lifecycle.d.ts +100 -0
  319. package/dist/src/integrations/swarm/swarm-lifecycle.d.ts.map +1 -0
  320. package/dist/src/integrations/swarm/swarm-lifecycle.js +922 -0
  321. package/dist/src/integrations/swarm/swarm-lifecycle.js.map +1 -0
  322. package/dist/src/integrations/swarm/swarm-orchestrator.d.ts +84 -203
  323. package/dist/src/integrations/swarm/swarm-orchestrator.d.ts.map +1 -1
  324. package/dist/src/integrations/swarm/swarm-orchestrator.js +251 -2870
  325. package/dist/src/integrations/swarm/swarm-orchestrator.js.map +1 -1
  326. package/dist/src/integrations/swarm/swarm-quality-gate.js +1 -1
  327. package/dist/src/integrations/swarm/swarm-quality-gate.js.map +1 -1
  328. package/dist/src/integrations/swarm/swarm-recovery.d.ts +75 -0
  329. package/dist/src/integrations/swarm/swarm-recovery.d.ts.map +1 -0
  330. package/dist/src/integrations/swarm/swarm-recovery.js +550 -0
  331. package/dist/src/integrations/swarm/swarm-recovery.js.map +1 -0
  332. package/dist/src/integrations/swarm/swarm-state-store.d.ts.map +1 -1
  333. package/dist/src/integrations/swarm/swarm-state-store.js +6 -0
  334. package/dist/src/integrations/swarm/swarm-state-store.js.map +1 -1
  335. package/dist/src/integrations/swarm/task-queue.d.ts +1 -1
  336. package/dist/src/integrations/swarm/task-queue.d.ts.map +1 -1
  337. package/dist/src/integrations/swarm/task-queue.js +28 -1
  338. package/dist/src/integrations/swarm/task-queue.js.map +1 -1
  339. package/dist/src/integrations/swarm/types.d.ts +17 -5
  340. package/dist/src/integrations/swarm/types.d.ts.map +1 -1
  341. package/dist/src/integrations/swarm/types.js.map +1 -1
  342. package/dist/src/integrations/swarm/worker-pool.d.ts +1 -1
  343. package/dist/src/integrations/swarm/worker-pool.d.ts.map +1 -1
  344. package/dist/src/integrations/swarm/worker-pool.js +13 -9
  345. package/dist/src/integrations/swarm/worker-pool.js.map +1 -1
  346. package/dist/src/integrations/tasks/dependency-analyzer.d.ts +34 -0
  347. package/dist/src/integrations/tasks/dependency-analyzer.d.ts.map +1 -0
  348. package/dist/src/integrations/tasks/dependency-analyzer.js +232 -0
  349. package/dist/src/integrations/tasks/dependency-analyzer.js.map +1 -0
  350. package/dist/src/integrations/tasks/interactive-planning.d.ts +322 -0
  351. package/dist/src/integrations/tasks/interactive-planning.d.ts.map +1 -0
  352. package/dist/src/integrations/tasks/interactive-planning.js +655 -0
  353. package/dist/src/integrations/tasks/interactive-planning.js.map +1 -0
  354. package/dist/src/integrations/tasks/pending-plan.d.ts +196 -0
  355. package/dist/src/integrations/tasks/pending-plan.d.ts.map +1 -0
  356. package/dist/src/integrations/tasks/pending-plan.js +431 -0
  357. package/dist/src/integrations/tasks/pending-plan.js.map +1 -0
  358. package/dist/src/integrations/tasks/planning.d.ts +115 -0
  359. package/dist/src/integrations/tasks/planning.d.ts.map +1 -0
  360. package/dist/src/integrations/tasks/planning.js +413 -0
  361. package/dist/src/integrations/tasks/planning.js.map +1 -0
  362. package/dist/src/integrations/tasks/smart-decomposer.d.ts +316 -0
  363. package/dist/src/integrations/tasks/smart-decomposer.d.ts.map +1 -0
  364. package/dist/src/integrations/tasks/smart-decomposer.js +661 -0
  365. package/dist/src/integrations/tasks/smart-decomposer.js.map +1 -0
  366. package/dist/src/integrations/tasks/task-manager.d.ts +164 -0
  367. package/dist/src/integrations/tasks/task-manager.d.ts.map +1 -0
  368. package/dist/src/integrations/tasks/task-manager.js +383 -0
  369. package/dist/src/integrations/tasks/task-manager.js.map +1 -0
  370. package/dist/src/integrations/tasks/task-splitter.d.ts +56 -0
  371. package/dist/src/integrations/tasks/task-splitter.d.ts.map +1 -0
  372. package/dist/src/integrations/tasks/task-splitter.js +537 -0
  373. package/dist/src/integrations/tasks/task-splitter.js.map +1 -0
  374. package/dist/src/integrations/tasks/verification-gate.d.ts +103 -0
  375. package/dist/src/integrations/tasks/verification-gate.d.ts.map +1 -0
  376. package/dist/src/integrations/tasks/verification-gate.js +193 -0
  377. package/dist/src/integrations/tasks/verification-gate.js.map +1 -0
  378. package/dist/src/integrations/tasks/work-log.d.ts +87 -0
  379. package/dist/src/integrations/tasks/work-log.d.ts.map +1 -0
  380. package/dist/src/integrations/tasks/work-log.js +275 -0
  381. package/dist/src/integrations/tasks/work-log.js.map +1 -0
  382. package/dist/src/integrations/utilities/capabilities.d.ts +160 -0
  383. package/dist/src/integrations/utilities/capabilities.d.ts.map +1 -0
  384. package/dist/src/integrations/utilities/capabilities.js +426 -0
  385. package/dist/src/integrations/utilities/capabilities.js.map +1 -0
  386. package/dist/src/integrations/utilities/diff-utils.d.ts +105 -0
  387. package/dist/src/integrations/utilities/diff-utils.d.ts.map +1 -0
  388. package/dist/src/integrations/utilities/diff-utils.js +497 -0
  389. package/dist/src/integrations/utilities/diff-utils.js.map +1 -0
  390. package/dist/src/integrations/utilities/environment-facts.d.ts +52 -0
  391. package/dist/src/integrations/utilities/environment-facts.d.ts.map +1 -0
  392. package/dist/src/integrations/utilities/environment-facts.js +84 -0
  393. package/dist/src/integrations/utilities/environment-facts.js.map +1 -0
  394. package/dist/src/integrations/utilities/file-change-tracker.d.ts +162 -0
  395. package/dist/src/integrations/utilities/file-change-tracker.d.ts.map +1 -0
  396. package/dist/src/integrations/utilities/file-change-tracker.js +538 -0
  397. package/dist/src/integrations/utilities/file-change-tracker.js.map +1 -0
  398. package/dist/src/integrations/utilities/graph-visualization.d.ts +72 -0
  399. package/dist/src/integrations/utilities/graph-visualization.d.ts.map +1 -0
  400. package/dist/src/integrations/utilities/graph-visualization.js +383 -0
  401. package/dist/src/integrations/utilities/graph-visualization.js.map +1 -0
  402. package/dist/src/integrations/utilities/hierarchical-config.d.ts +215 -0
  403. package/dist/src/integrations/utilities/hierarchical-config.d.ts.map +1 -0
  404. package/dist/src/integrations/utilities/hierarchical-config.js +504 -0
  405. package/dist/src/integrations/utilities/hierarchical-config.js.map +1 -0
  406. package/dist/src/integrations/utilities/hooks.d.ts +116 -0
  407. package/dist/src/integrations/utilities/hooks.d.ts.map +1 -0
  408. package/dist/src/integrations/utilities/hooks.js +410 -0
  409. package/dist/src/integrations/utilities/hooks.js.map +1 -0
  410. package/dist/src/integrations/utilities/ignore.d.ts +143 -0
  411. package/dist/src/integrations/utilities/ignore.d.ts.map +1 -0
  412. package/dist/src/integrations/utilities/ignore.js +417 -0
  413. package/dist/src/integrations/utilities/ignore.js.map +1 -0
  414. package/dist/src/integrations/utilities/image-renderer.d.ts +119 -0
  415. package/dist/src/integrations/utilities/image-renderer.d.ts.map +1 -0
  416. package/dist/src/integrations/utilities/image-renderer.js +306 -0
  417. package/dist/src/integrations/utilities/image-renderer.js.map +1 -0
  418. package/dist/src/integrations/utilities/logger.d.ts +104 -0
  419. package/dist/src/integrations/utilities/logger.d.ts.map +1 -0
  420. package/dist/src/integrations/utilities/logger.js +219 -0
  421. package/dist/src/integrations/utilities/logger.js.map +1 -0
  422. package/dist/src/integrations/utilities/memory.d.ts +116 -0
  423. package/dist/src/integrations/utilities/memory.d.ts.map +1 -0
  424. package/dist/src/integrations/utilities/memory.js +311 -0
  425. package/dist/src/integrations/utilities/memory.js.map +1 -0
  426. package/dist/src/integrations/utilities/observability.d.ts +162 -0
  427. package/dist/src/integrations/utilities/observability.d.ts.map +1 -0
  428. package/dist/src/integrations/utilities/observability.js +407 -0
  429. package/dist/src/integrations/utilities/observability.js.map +1 -0
  430. package/dist/src/integrations/utilities/openrouter-pricing.d.ts +67 -0
  431. package/dist/src/integrations/utilities/openrouter-pricing.d.ts.map +1 -0
  432. package/dist/src/integrations/utilities/openrouter-pricing.js +166 -0
  433. package/dist/src/integrations/utilities/openrouter-pricing.js.map +1 -0
  434. package/dist/src/integrations/utilities/react.d.ts +139 -0
  435. package/dist/src/integrations/utilities/react.d.ts.map +1 -0
  436. package/dist/src/integrations/utilities/react.js +273 -0
  437. package/dist/src/integrations/utilities/react.js.map +1 -0
  438. package/dist/src/integrations/utilities/retry.d.ts +132 -0
  439. package/dist/src/integrations/utilities/retry.d.ts.map +1 -0
  440. package/dist/src/integrations/utilities/retry.js +233 -0
  441. package/dist/src/integrations/utilities/retry.js.map +1 -0
  442. package/dist/src/integrations/utilities/routing.d.ts +118 -0
  443. package/dist/src/integrations/utilities/routing.d.ts.map +1 -0
  444. package/dist/src/integrations/utilities/routing.js +348 -0
  445. package/dist/src/integrations/utilities/routing.js.map +1 -0
  446. package/dist/src/integrations/utilities/rules.d.ts +131 -0
  447. package/dist/src/integrations/utilities/rules.d.ts.map +1 -0
  448. package/dist/src/integrations/utilities/rules.js +284 -0
  449. package/dist/src/integrations/utilities/rules.js.map +1 -0
  450. package/dist/src/integrations/utilities/sourcegraph.d.ts +169 -0
  451. package/dist/src/integrations/utilities/sourcegraph.d.ts.map +1 -0
  452. package/dist/src/integrations/utilities/sourcegraph.js +379 -0
  453. package/dist/src/integrations/utilities/sourcegraph.js.map +1 -0
  454. package/dist/src/integrations/utilities/thinking-strategy.d.ts +52 -0
  455. package/dist/src/integrations/utilities/thinking-strategy.d.ts.map +1 -0
  456. package/dist/src/integrations/utilities/thinking-strategy.js +129 -0
  457. package/dist/src/integrations/utilities/thinking-strategy.js.map +1 -0
  458. package/dist/src/integrations/utilities/thread-manager.d.ts +199 -0
  459. package/dist/src/integrations/utilities/thread-manager.d.ts.map +1 -0
  460. package/dist/src/integrations/utilities/thread-manager.js +357 -0
  461. package/dist/src/integrations/utilities/thread-manager.js.map +1 -0
  462. package/dist/src/integrations/utilities/token-estimate.d.ts +11 -0
  463. package/dist/src/integrations/utilities/token-estimate.d.ts.map +1 -0
  464. package/dist/src/integrations/utilities/token-estimate.js +14 -0
  465. package/dist/src/integrations/utilities/token-estimate.js.map +1 -0
  466. package/dist/src/main.js +10 -4
  467. package/dist/src/main.js.map +1 -1
  468. package/dist/src/modes/repl.d.ts.map +1 -1
  469. package/dist/src/modes/repl.js +22 -5
  470. package/dist/src/modes/repl.js.map +1 -1
  471. package/dist/src/modes/tui.d.ts.map +1 -1
  472. package/dist/src/modes/tui.js +23 -6
  473. package/dist/src/modes/tui.js.map +1 -1
  474. package/dist/src/modes.js +1 -1
  475. package/dist/src/modes.js.map +1 -1
  476. package/dist/src/observability/tracer.js +1 -1
  477. package/dist/src/observability/tracer.js.map +1 -1
  478. package/dist/src/persistence/schema.d.ts +2 -0
  479. package/dist/src/persistence/schema.d.ts.map +1 -1
  480. package/dist/src/persistence/schema.js +31 -0
  481. package/dist/src/persistence/schema.js.map +1 -1
  482. package/dist/src/providers/adapters/anthropic.d.ts +6 -0
  483. package/dist/src/providers/adapters/anthropic.d.ts.map +1 -1
  484. package/dist/src/providers/adapters/anthropic.js +99 -15
  485. package/dist/src/providers/adapters/anthropic.js.map +1 -1
  486. package/dist/src/providers/adapters/azure.d.ts +74 -0
  487. package/dist/src/providers/adapters/azure.d.ts.map +1 -0
  488. package/dist/src/providers/adapters/azure.js +354 -0
  489. package/dist/src/providers/adapters/azure.js.map +1 -0
  490. package/dist/src/providers/adapters/mock.d.ts +16 -2
  491. package/dist/src/providers/adapters/mock.d.ts.map +1 -1
  492. package/dist/src/providers/adapters/mock.js +44 -3
  493. package/dist/src/providers/adapters/mock.js.map +1 -1
  494. package/dist/src/providers/adapters/openai.d.ts +6 -1
  495. package/dist/src/providers/adapters/openai.d.ts.map +1 -1
  496. package/dist/src/providers/adapters/openai.js +39 -8
  497. package/dist/src/providers/adapters/openai.js.map +1 -1
  498. package/dist/src/providers/adapters/openrouter.d.ts +6 -0
  499. package/dist/src/providers/adapters/openrouter.d.ts.map +1 -1
  500. package/dist/src/providers/adapters/openrouter.js +73 -3
  501. package/dist/src/providers/adapters/openrouter.js.map +1 -1
  502. package/dist/src/providers/provider.js +1 -1
  503. package/dist/src/providers/provider.js.map +1 -1
  504. package/dist/src/providers/resilient-provider.js +1 -1
  505. package/dist/src/providers/resilient-provider.js.map +1 -1
  506. package/dist/src/providers/types.d.ts +23 -2
  507. package/dist/src/providers/types.d.ts.map +1 -1
  508. package/dist/src/session-picker.d.ts +1 -1
  509. package/dist/src/session-picker.d.ts.map +1 -1
  510. package/dist/src/session-picker.js +1 -1
  511. package/dist/src/session-picker.js.map +1 -1
  512. package/dist/src/shared/budget-tracker.js +1 -1
  513. package/dist/src/shared/budget-tracker.js.map +1 -1
  514. package/dist/src/tools/agent.d.ts +1 -1
  515. package/dist/src/tools/agent.d.ts.map +1 -1
  516. package/dist/src/tools/bash.js +1 -1
  517. package/dist/src/tools/bash.js.map +1 -1
  518. package/dist/src/tools/file.js +1 -1
  519. package/dist/src/tools/file.js.map +1 -1
  520. package/dist/src/tools/permission.js +2 -2
  521. package/dist/src/tools/permission.js.map +1 -1
  522. package/dist/src/tools/registry.d.ts +1 -1
  523. package/dist/src/tools/registry.d.ts.map +1 -1
  524. package/dist/src/tools/registry.js +1 -1
  525. package/dist/src/tools/registry.js.map +1 -1
  526. package/dist/src/tools/tasks.d.ts +1 -1
  527. package/dist/src/tools/tasks.d.ts.map +1 -1
  528. package/dist/src/tools/undo.d.ts +1 -1
  529. package/dist/src/tools/undo.d.ts.map +1 -1
  530. package/dist/src/tracing/cache-boundary-tracker.d.ts.map +1 -1
  531. package/dist/src/tracing/cache-boundary-tracker.js +2 -2
  532. package/dist/src/tracing/cache-boundary-tracker.js.map +1 -1
  533. package/dist/src/tracing/trace-collector.d.ts +22 -0
  534. package/dist/src/tracing/trace-collector.d.ts.map +1 -1
  535. package/dist/src/tracing/trace-collector.js +27 -3
  536. package/dist/src/tracing/trace-collector.js.map +1 -1
  537. package/dist/src/tracing/types.d.ts +17 -1
  538. package/dist/src/tracing/types.d.ts.map +1 -1
  539. package/dist/src/tracing/types.js.map +1 -1
  540. package/dist/src/tricks/failure-evidence.js +1 -1
  541. package/dist/src/tricks/failure-evidence.js.map +1 -1
  542. package/dist/src/tricks/recitation.d.ts.map +1 -1
  543. package/dist/src/tricks/recitation.js +2 -1
  544. package/dist/src/tricks/recitation.js.map +1 -1
  545. package/dist/src/tricks/recursive-context.d.ts.map +1 -1
  546. package/dist/src/tricks/recursive-context.js +2 -2
  547. package/dist/src/tricks/recursive-context.js.map +1 -1
  548. package/dist/src/tricks/reversible-compaction.d.ts.map +1 -1
  549. package/dist/src/tricks/reversible-compaction.js +6 -2
  550. package/dist/src/tricks/reversible-compaction.js.map +1 -1
  551. package/dist/src/tui/app.d.ts +3 -3
  552. package/dist/src/tui/app.d.ts.map +1 -1
  553. package/dist/src/tui/app.js +86 -14
  554. package/dist/src/tui/app.js.map +1 -1
  555. package/dist/src/tui/components/CollapsibleDiffView.d.ts +1 -1
  556. package/dist/src/tui/components/CollapsibleDiffView.d.ts.map +1 -1
  557. package/dist/src/tui/components/DiagnosticsPanel.d.ts +24 -0
  558. package/dist/src/tui/components/DiagnosticsPanel.d.ts.map +1 -0
  559. package/dist/src/tui/components/DiagnosticsPanel.js +47 -0
  560. package/dist/src/tui/components/DiagnosticsPanel.js.map +1 -0
  561. package/dist/src/tui/components/DiffView.d.ts +1 -1
  562. package/dist/src/tui/components/DiffView.d.ts.map +1 -1
  563. package/dist/src/tui/components/ErrorBoundary.js +1 -1
  564. package/dist/src/tui/components/ErrorBoundary.js.map +1 -1
  565. package/dist/src/tui/components/TasksPanel.d.ts +1 -1
  566. package/dist/src/tui/components/TasksPanel.d.ts.map +1 -1
  567. package/dist/src/tui/event-display.js +1 -1
  568. package/dist/src/tui/event-display.js.map +1 -1
  569. package/dist/src/tui/index.js +1 -1
  570. package/dist/src/tui/index.js.map +1 -1
  571. package/dist/src/tui/transparency-aggregator.d.ts +13 -0
  572. package/dist/src/tui/transparency-aggregator.d.ts.map +1 -1
  573. package/dist/src/tui/transparency-aggregator.js +21 -0
  574. package/dist/src/tui/transparency-aggregator.js.map +1 -1
  575. package/dist/src/types.d.ts +27 -2
  576. package/dist/src/types.d.ts.map +1 -1
  577. package/package.json +1 -1
@@ -0,0 +1,538 @@
1
+ /**
2
+ * File Change Tracker
3
+ *
4
+ * Tracks file changes for undo capability in agent sessions.
5
+ * Provides before/after content capture, diff generation, and undo functionality.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import Database from 'better-sqlite3';
10
+ * import { FileChangeTracker } from './file-change-tracker.js';
11
+ *
12
+ * const db = new Database('sessions.db');
13
+ * const tracker = new FileChangeTracker(db, 'session-123');
14
+ *
15
+ * // Record a file change
16
+ * const changeId = await tracker.recordChange({
17
+ * filePath: '/path/to/file.ts',
18
+ * operation: 'edit',
19
+ * contentBefore: 'old content',
20
+ * contentAfter: 'new content',
21
+ * turnNumber: 1,
22
+ * });
23
+ *
24
+ * // Undo the change
25
+ * const result = await tracker.undoChange(changeId);
26
+ * ```
27
+ */
28
+ import { writeFile, unlink } from 'node:fs/promises';
29
+ import { existsSync } from 'node:fs';
30
+ // =============================================================================
31
+ // DIFF UTILITIES
32
+ // =============================================================================
33
+ /**
34
+ * Generate a simple unified diff between two strings.
35
+ * This is a basic implementation - for production, consider using a proper diff library.
36
+ */
37
+ function generateUnifiedDiff(before, after, filePath) {
38
+ const beforeLines = before.split('\n');
39
+ const afterLines = after.split('\n');
40
+ const header = [
41
+ `--- a/${filePath}`,
42
+ `+++ b/${filePath}`,
43
+ ];
44
+ // Simple line-by-line diff (not optimal but functional)
45
+ const hunks = [];
46
+ let i = 0;
47
+ let j = 0;
48
+ while (i < beforeLines.length || j < afterLines.length) {
49
+ // Find next difference
50
+ const startI = i;
51
+ const startJ = j;
52
+ // Skip matching lines
53
+ while (i < beforeLines.length && j < afterLines.length && beforeLines[i] === afterLines[j]) {
54
+ i++;
55
+ j++;
56
+ }
57
+ // If we've found a difference or reached the end
58
+ if (i < beforeLines.length || j < afterLines.length) {
59
+ // Determine the hunk boundaries
60
+ const contextBefore = Math.max(0, i - 3);
61
+ const hunkStart = contextBefore + 1;
62
+ // Find the extent of the difference
63
+ const diffStartI = i;
64
+ const diffStartJ = j;
65
+ // Advance through differing lines
66
+ while (i < beforeLines.length || j < afterLines.length) {
67
+ if (i < beforeLines.length && j < afterLines.length && beforeLines[i] === afterLines[j]) {
68
+ // Found a match - check if it's the end of the diff section
69
+ let matchCount = 0;
70
+ let tempI = i;
71
+ let tempJ = j;
72
+ while (tempI < beforeLines.length && tempJ < afterLines.length &&
73
+ beforeLines[tempI] === afterLines[tempJ] && matchCount < 3) {
74
+ matchCount++;
75
+ tempI++;
76
+ tempJ++;
77
+ }
78
+ if (matchCount >= 3) {
79
+ break;
80
+ }
81
+ }
82
+ if (i < beforeLines.length)
83
+ i++;
84
+ if (j < afterLines.length)
85
+ j++;
86
+ }
87
+ // Build the hunk
88
+ const hunkLines = [];
89
+ const beforeCount = i - contextBefore;
90
+ const afterCount = j - (startJ + (contextBefore - startI));
91
+ hunkLines.push(`@@ -${hunkStart},${beforeCount} +${hunkStart},${afterCount} @@`);
92
+ // Add context before
93
+ for (let k = contextBefore; k < diffStartI; k++) {
94
+ hunkLines.push(` ${beforeLines[k]}`);
95
+ }
96
+ // Add removed lines
97
+ for (let k = diffStartI; k < i; k++) {
98
+ if (k < beforeLines.length) {
99
+ hunkLines.push(`-${beforeLines[k]}`);
100
+ }
101
+ }
102
+ // Add added lines
103
+ for (let k = diffStartJ; k < j; k++) {
104
+ if (k < afterLines.length) {
105
+ hunkLines.push(`+${afterLines[k]}`);
106
+ }
107
+ }
108
+ hunks.push(hunkLines.join('\n'));
109
+ }
110
+ }
111
+ return [...header, ...hunks].join('\n');
112
+ }
113
+ /**
114
+ * Apply a unified diff to restore original content.
115
+ * Returns the original content before the diff was applied.
116
+ */
117
+ function applyReverseDiff(currentContent, diff) {
118
+ // Parse diff hunks
119
+ const lines = diff.split('\n');
120
+ const resultLines = currentContent.split('\n');
121
+ let lineIndex = 0;
122
+ let i = 0;
123
+ // Skip header lines
124
+ while (i < lines.length && !lines[i].startsWith('@@')) {
125
+ i++;
126
+ }
127
+ while (i < lines.length) {
128
+ const line = lines[i];
129
+ if (line.startsWith('@@')) {
130
+ // Parse hunk header: @@ -start,count +start,count @@
131
+ const match = line.match(/@@ -(\d+),?\d* \+(\d+),?\d* @@/);
132
+ if (match) {
133
+ lineIndex = parseInt(match[2], 10) - 1;
134
+ }
135
+ i++;
136
+ continue;
137
+ }
138
+ if (line.startsWith('+')) {
139
+ // This was an addition - remove it to reverse
140
+ if (lineIndex < resultLines.length && resultLines[lineIndex] === line.slice(1)) {
141
+ resultLines.splice(lineIndex, 1);
142
+ }
143
+ i++;
144
+ continue;
145
+ }
146
+ if (line.startsWith('-')) {
147
+ // This was a removal - add it back to reverse
148
+ resultLines.splice(lineIndex, 0, line.slice(1));
149
+ lineIndex++;
150
+ i++;
151
+ continue;
152
+ }
153
+ if (line.startsWith(' ')) {
154
+ // Context line
155
+ lineIndex++;
156
+ i++;
157
+ continue;
158
+ }
159
+ i++;
160
+ }
161
+ return resultLines.join('\n');
162
+ }
163
+ // =============================================================================
164
+ // FILE CHANGE TRACKER
165
+ // =============================================================================
166
+ /**
167
+ * Tracks file changes for undo capability.
168
+ */
169
+ export class FileChangeTracker {
170
+ db;
171
+ sessionId;
172
+ config;
173
+ stmts;
174
+ constructor(db, sessionId, config) {
175
+ this.db = db;
176
+ this.sessionId = sessionId;
177
+ this.config = {
178
+ enabled: config?.enabled ?? true,
179
+ maxFullContentBytes: config?.maxFullContentBytes ?? 50 * 1024, // 50KB
180
+ };
181
+ this.prepareStatements();
182
+ }
183
+ /**
184
+ * Prepare SQL statements for reuse.
185
+ */
186
+ prepareStatements() {
187
+ this.stmts = {
188
+ insertChange: this.db.prepare(`
189
+ INSERT INTO file_changes (
190
+ session_id, entry_id, tool_call_id, turn_number, file_path,
191
+ operation, content_before, content_after, diff_unified,
192
+ storage_mode, bytes_before, bytes_after, is_undone,
193
+ undo_change_id, created_at
194
+ )
195
+ VALUES (
196
+ @sessionId, @entryId, @toolCallId, @turnNumber, @filePath,
197
+ @operation, @contentBefore, @contentAfter, @diffUnified,
198
+ @storageMode, @bytesBefore, @bytesAfter, @isUndone,
199
+ @undoChangeId, @createdAt
200
+ )
201
+ `),
202
+ getChange: this.db.prepare(`
203
+ SELECT
204
+ id, session_id as sessionId, turn_number as turnNumber,
205
+ file_path as filePath, operation, content_before as contentBefore,
206
+ content_after as contentAfter, diff_unified as diffUnified,
207
+ storage_mode as storageMode, bytes_before as bytesBefore,
208
+ bytes_after as bytesAfter, is_undone as isUndone,
209
+ undo_change_id as undoChangeId, tool_call_id as toolCallId,
210
+ created_at as createdAt
211
+ FROM file_changes
212
+ WHERE id = ? AND session_id = ?
213
+ `),
214
+ getChanges: this.db.prepare(`
215
+ SELECT
216
+ id, session_id as sessionId, turn_number as turnNumber,
217
+ file_path as filePath, operation, content_before as contentBefore,
218
+ content_after as contentAfter, diff_unified as diffUnified,
219
+ storage_mode as storageMode, bytes_before as bytesBefore,
220
+ bytes_after as bytesAfter, is_undone as isUndone,
221
+ undo_change_id as undoChangeId, tool_call_id as toolCallId,
222
+ created_at as createdAt
223
+ FROM file_changes
224
+ WHERE session_id = ?
225
+ ORDER BY id ASC
226
+ `),
227
+ getFileChanges: this.db.prepare(`
228
+ SELECT
229
+ id, session_id as sessionId, turn_number as turnNumber,
230
+ file_path as filePath, operation, content_before as contentBefore,
231
+ content_after as contentAfter, diff_unified as diffUnified,
232
+ storage_mode as storageMode, bytes_before as bytesBefore,
233
+ bytes_after as bytesAfter, is_undone as isUndone,
234
+ undo_change_id as undoChangeId, tool_call_id as toolCallId,
235
+ created_at as createdAt
236
+ FROM file_changes
237
+ WHERE session_id = ? AND file_path = ?
238
+ ORDER BY id ASC
239
+ `),
240
+ getLastFileChange: this.db.prepare(`
241
+ SELECT
242
+ id, session_id as sessionId, turn_number as turnNumber,
243
+ file_path as filePath, operation, content_before as contentBefore,
244
+ content_after as contentAfter, diff_unified as diffUnified,
245
+ storage_mode as storageMode, bytes_before as bytesBefore,
246
+ bytes_after as bytesAfter, is_undone as isUndone,
247
+ undo_change_id as undoChangeId, tool_call_id as toolCallId,
248
+ created_at as createdAt
249
+ FROM file_changes
250
+ WHERE session_id = ? AND file_path = ? AND is_undone = 0
251
+ ORDER BY id DESC
252
+ LIMIT 1
253
+ `),
254
+ getTurnChanges: this.db.prepare(`
255
+ SELECT
256
+ id, session_id as sessionId, turn_number as turnNumber,
257
+ file_path as filePath, operation, content_before as contentBefore,
258
+ content_after as contentAfter, diff_unified as diffUnified,
259
+ storage_mode as storageMode, bytes_before as bytesBefore,
260
+ bytes_after as bytesAfter, is_undone as isUndone,
261
+ undo_change_id as undoChangeId, tool_call_id as toolCallId,
262
+ created_at as createdAt
263
+ FROM file_changes
264
+ WHERE session_id = ? AND turn_number = ? AND is_undone = 0
265
+ ORDER BY id DESC
266
+ `),
267
+ markUndone: this.db.prepare(`
268
+ UPDATE file_changes
269
+ SET is_undone = 1, undo_change_id = ?
270
+ WHERE id = ? AND session_id = ? AND is_undone = 0
271
+ `),
272
+ clearUndone: this.db.prepare(`
273
+ UPDATE file_changes
274
+ SET is_undone = 0, undo_change_id = NULL
275
+ WHERE id = ? AND session_id = ?
276
+ `),
277
+ getSessionSummary: this.db.prepare(`
278
+ SELECT
279
+ COUNT(*) as totalChanges,
280
+ SUM(CASE WHEN is_undone = 0 THEN 1 ELSE 0 END) as activeChanges,
281
+ SUM(CASE WHEN is_undone = 1 THEN 1 ELSE 0 END) as undoneChanges,
282
+ SUM(CASE WHEN operation = 'create' AND is_undone = 0 THEN 1 ELSE 0 END) as createCount,
283
+ SUM(CASE WHEN operation = 'write' AND is_undone = 0 THEN 1 ELSE 0 END) as writeCount,
284
+ SUM(CASE WHEN operation = 'edit' AND is_undone = 0 THEN 1 ELSE 0 END) as editCount,
285
+ SUM(CASE WHEN operation = 'delete' AND is_undone = 0 THEN 1 ELSE 0 END) as deleteCount
286
+ FROM file_changes
287
+ WHERE session_id = ?
288
+ `),
289
+ };
290
+ }
291
+ /**
292
+ * Record a file change.
293
+ */
294
+ async recordChange(params) {
295
+ if (!this.config.enabled) {
296
+ return -1;
297
+ }
298
+ const now = new Date().toISOString();
299
+ const contentBefore = params.contentBefore ?? null;
300
+ const contentAfter = params.contentAfter ?? null;
301
+ const bytesBefore = contentBefore ? Buffer.byteLength(contentBefore, 'utf-8') : 0;
302
+ const bytesAfter = contentAfter ? Buffer.byteLength(contentAfter, 'utf-8') : 0;
303
+ // Determine storage mode
304
+ let storageMode = 'full';
305
+ let diffUnified = null;
306
+ let storedBefore = contentBefore;
307
+ let storedAfter = contentAfter;
308
+ // Use diff mode for large files
309
+ const totalBytes = bytesBefore + bytesAfter;
310
+ if (totalBytes > this.config.maxFullContentBytes && contentBefore && contentAfter) {
311
+ storageMode = 'diff';
312
+ diffUnified = generateUnifiedDiff(contentBefore, contentAfter, params.filePath);
313
+ // In diff mode, we only store the after content (current state) and the diff
314
+ // to reconstruct the before content
315
+ storedBefore = null;
316
+ storedAfter = contentAfter;
317
+ }
318
+ const result = this.stmts.insertChange.run({
319
+ sessionId: this.sessionId,
320
+ entryId: null,
321
+ toolCallId: params.toolCallId ?? null,
322
+ turnNumber: params.turnNumber,
323
+ filePath: params.filePath,
324
+ operation: params.operation,
325
+ contentBefore: storedBefore,
326
+ contentAfter: storedAfter,
327
+ diffUnified,
328
+ storageMode,
329
+ bytesBefore,
330
+ bytesAfter,
331
+ isUndone: 0,
332
+ undoChangeId: null,
333
+ createdAt: now,
334
+ });
335
+ return result.lastInsertRowid;
336
+ }
337
+ /**
338
+ * Undo a specific change by ID.
339
+ * Uses a transaction with optimistic locking to prevent TOCTOU race conditions.
340
+ */
341
+ async undoChange(changeId) {
342
+ // Use database transaction with optimistic locking to prevent race condition
343
+ // The key insight: we mark as undone BEFORE file operations, inside a transaction
344
+ // If two calls race, only one will succeed in updating is_undone from 0 to 1
345
+ const txResult = this.db.transaction(() => {
346
+ const row = this.stmts.getChange.get(changeId, this.sessionId);
347
+ if (!row) {
348
+ return { success: false, error: 'Change not found' };
349
+ }
350
+ if (row.isUndone) {
351
+ return { success: false, error: 'Change already undone' };
352
+ }
353
+ // Optimistic lock: mark as undone BEFORE file operations
354
+ // The WHERE clause includes is_undone = 0, so only one concurrent call succeeds
355
+ const result = this.stmts.markUndone.run(null, changeId, this.sessionId);
356
+ if (result.changes === 0) {
357
+ return { success: false, error: 'Concurrent modification detected' };
358
+ }
359
+ return { success: true, row };
360
+ })();
361
+ if (!txResult.success || !txResult.row) {
362
+ return {
363
+ success: false,
364
+ filePath: '',
365
+ message: txResult.error || 'Transaction failed',
366
+ };
367
+ }
368
+ const row = txResult.row;
369
+ const filePath = row.filePath;
370
+ try {
371
+ // Determine what content to restore
372
+ let contentToRestore = null;
373
+ if (row.storageMode === 'full') {
374
+ contentToRestore = row.contentBefore;
375
+ }
376
+ else if (row.storageMode === 'diff' && row.diffUnified && row.contentAfter) {
377
+ // Reconstruct the before content from the diff
378
+ contentToRestore = applyReverseDiff(row.contentAfter, row.diffUnified);
379
+ }
380
+ // Perform the undo based on operation type
381
+ switch (row.operation) {
382
+ case 'create':
383
+ // Undo create = delete the file
384
+ if (existsSync(filePath)) {
385
+ await unlink(filePath);
386
+ }
387
+ break;
388
+ case 'write':
389
+ case 'edit':
390
+ // Undo write/edit = restore previous content
391
+ if (contentToRestore !== null) {
392
+ await writeFile(filePath, contentToRestore, 'utf-8');
393
+ }
394
+ else if (row.operation === 'write') {
395
+ // If no previous content for a write, delete the file
396
+ if (existsSync(filePath)) {
397
+ await unlink(filePath);
398
+ }
399
+ }
400
+ break;
401
+ case 'delete':
402
+ // Undo delete = recreate the file with original content
403
+ if (contentToRestore !== null) {
404
+ await writeFile(filePath, contentToRestore, 'utf-8');
405
+ }
406
+ break;
407
+ }
408
+ return {
409
+ success: true,
410
+ filePath,
411
+ message: `Successfully undid ${row.operation} on ${filePath}`,
412
+ changeId,
413
+ };
414
+ }
415
+ catch (error) {
416
+ // File operations failed - rollback the database change
417
+ this.stmts.clearUndone.run(changeId, this.sessionId);
418
+ return {
419
+ success: false,
420
+ filePath,
421
+ message: `Failed to undo change: ${error instanceof Error ? error.message : String(error)}`,
422
+ changeId,
423
+ };
424
+ }
425
+ }
426
+ /**
427
+ * Undo the last change to a specific file.
428
+ */
429
+ async undoLastChange(filePath) {
430
+ const row = this.stmts.getLastFileChange.get(this.sessionId, filePath);
431
+ if (!row) {
432
+ return {
433
+ success: false,
434
+ filePath,
435
+ message: `No undoable changes found for ${filePath}`,
436
+ };
437
+ }
438
+ return this.undoChange(row.id);
439
+ }
440
+ /**
441
+ * Undo all changes in a turn.
442
+ */
443
+ async undoTurn(turnNumber) {
444
+ const rows = this.stmts.getTurnChanges.all(this.sessionId, turnNumber);
445
+ const results = [];
446
+ // Undo in reverse order (last change first)
447
+ for (const row of rows) {
448
+ const result = await this.undoChange(row.id);
449
+ results.push(result);
450
+ }
451
+ return results;
452
+ }
453
+ /**
454
+ * Get all changes for a file.
455
+ */
456
+ getFileHistory(filePath) {
457
+ const rows = this.stmts.getFileChanges.all(this.sessionId, filePath);
458
+ return rows.map(row => ({
459
+ id: row.id,
460
+ sessionId: row.sessionId,
461
+ turnNumber: row.turnNumber,
462
+ filePath: row.filePath,
463
+ operation: row.operation,
464
+ contentBefore: row.contentBefore,
465
+ contentAfter: row.contentAfter,
466
+ diffUnified: row.diffUnified,
467
+ storageMode: row.storageMode,
468
+ bytesBefore: row.bytesBefore,
469
+ bytesAfter: row.bytesAfter,
470
+ isUndone: row.isUndone === 1,
471
+ undoChangeId: row.undoChangeId,
472
+ toolCallId: row.toolCallId,
473
+ createdAt: row.createdAt,
474
+ }));
475
+ }
476
+ /**
477
+ * Get all changes in session.
478
+ */
479
+ getChanges(options) {
480
+ if (options?.filePath) {
481
+ return this.getFileHistory(options.filePath);
482
+ }
483
+ const rows = this.stmts.getChanges.all(this.sessionId);
484
+ return rows.map(row => ({
485
+ id: row.id,
486
+ sessionId: row.sessionId,
487
+ turnNumber: row.turnNumber,
488
+ filePath: row.filePath,
489
+ operation: row.operation,
490
+ contentBefore: row.contentBefore,
491
+ contentAfter: row.contentAfter,
492
+ diffUnified: row.diffUnified,
493
+ storageMode: row.storageMode,
494
+ bytesBefore: row.bytesBefore,
495
+ bytesAfter: row.bytesAfter,
496
+ isUndone: row.isUndone === 1,
497
+ undoChangeId: row.undoChangeId,
498
+ toolCallId: row.toolCallId,
499
+ createdAt: row.createdAt,
500
+ }));
501
+ }
502
+ /**
503
+ * Get session change summary.
504
+ */
505
+ getSessionChangeSummary() {
506
+ const row = this.stmts.getSessionSummary.get(this.sessionId);
507
+ // Get unique file paths from active changes
508
+ const changes = this.getChanges();
509
+ const activeFiles = new Set();
510
+ for (const change of changes) {
511
+ if (!change.isUndone) {
512
+ activeFiles.add(change.filePath);
513
+ }
514
+ }
515
+ return {
516
+ totalChanges: row.totalChanges || 0,
517
+ activeChanges: row.activeChanges || 0,
518
+ undoneChanges: row.undoneChanges || 0,
519
+ filesModified: Array.from(activeFiles),
520
+ byOperation: {
521
+ create: row.createCount || 0,
522
+ write: row.writeCount || 0,
523
+ edit: row.editCount || 0,
524
+ delete: row.deleteCount || 0,
525
+ },
526
+ };
527
+ }
528
+ }
529
+ // =============================================================================
530
+ // FACTORY
531
+ // =============================================================================
532
+ /**
533
+ * Create a FileChangeTracker instance.
534
+ */
535
+ export function createFileChangeTracker(db, sessionId, config) {
536
+ return new FileChangeTracker(db, sessionId, config);
537
+ }
538
+ //# sourceMappingURL=file-change-tracker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-change-tracker.js","sourceRoot":"","sources":["../../../../src/integrations/utilities/file-change-tracker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,EAAE,SAAS,EAAY,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAuFrC,gFAAgF;AAChF,iBAAiB;AACjB,gFAAgF;AAEhF;;;GAGG;AACH,SAAS,mBAAmB,CAAC,MAAc,EAAE,KAAa,EAAE,QAAgB;IAC1E,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAErC,MAAM,MAAM,GAAG;QACb,SAAS,QAAQ,EAAE;QACnB,SAAS,QAAQ,EAAE;KACpB,CAAC;IAEF,wDAAwD;IACxD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC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,OAAO;YACL,YAAY,EAAE,GAAG,CAAC,YAAY,IAAI,CAAC;YACnC,aAAa,EAAE,GAAG,CAAC,aAAa,IAAI,CAAC;YACrC,aAAa,EAAE,GAAG,CAAC,aAAa,IAAI,CAAC;YACrC,aAAa,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC;YACtC,WAAW,EAAE;gBACX,MAAM,EAAE,GAAG,CAAC,WAAW,IAAI,CAAC;gBAC5B,KAAK,EAAE,GAAG,CAAC,UAAU,IAAI,CAAC;gBAC1B,IAAI,EAAE,GAAG,CAAC,SAAS,IAAI,CAAC;gBACxB,MAAM,EAAE,GAAG,CAAC,WAAW,IAAI,CAAC;aAC7B;SACF,CAAC;IACJ,CAAC;CACF;AAED,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,EAAqB,EACrB,SAAiB,EACjB,MAAgC;IAEhC,OAAO,IAAI,iBAAiB,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Dependency Graph Visualization
3
+ *
4
+ * Generates visual representations of codebase dependency graphs.
5
+ * Supports multiple output formats:
6
+ * - Mermaid: Markdown-compatible diagrams (renders in GitHub, VS Code, etc.)
7
+ * - DOT: GraphViz format for advanced visualization
8
+ * - ASCII: Terminal-friendly text diagrams
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const repoMap = await codebaseContext.analyze();
13
+ * const diagram = generateDependencyDiagram(repoMap.dependencyGraph, {
14
+ * format: 'mermaid',
15
+ * maxNodes: 20,
16
+ * direction: 'LR',
17
+ * });
18
+ * console.log(diagram);
19
+ * ```
20
+ */
21
+ export type FileDependencyGraph = Map<string, Set<string>>;
22
+ export type DiagramFormat = 'mermaid' | 'dot' | 'ascii';
23
+ export type DiagramDirection = 'TD' | 'LR' | 'BT' | 'RL';
24
+ export interface GraphVisualizationOptions {
25
+ /** Output format */
26
+ format: DiagramFormat;
27
+ /** Maximum number of nodes to include (prevents huge diagrams) */
28
+ maxNodes?: number;
29
+ /** Graph direction: TD (top-down), LR (left-right), BT (bottom-top), RL (right-left) */
30
+ direction?: DiagramDirection;
31
+ /** Include external dependencies (node_modules, etc.) */
32
+ includeExternal?: boolean;
33
+ /** Group files by directory */
34
+ groupByDirectory?: boolean;
35
+ /** Only show files matching these patterns */
36
+ filterPatterns?: string[];
37
+ /** Highlight these files (shown with different style) */
38
+ highlightFiles?: string[];
39
+ /** Title for the diagram */
40
+ title?: string;
41
+ }
42
+ export interface DiagramResult {
43
+ /** The generated diagram content */
44
+ content: string;
45
+ /** Number of nodes in the diagram */
46
+ nodeCount: number;
47
+ /** Number of edges in the diagram */
48
+ edgeCount: number;
49
+ /** Files that were excluded due to limits */
50
+ excludedFiles: string[];
51
+ }
52
+ /**
53
+ * Generate a visual diagram of a dependency graph.
54
+ */
55
+ export declare function generateDependencyDiagram(graph: FileDependencyGraph, options?: Partial<GraphVisualizationOptions>): DiagramResult;
56
+ /**
57
+ * Generate a focused diagram showing a file and its immediate dependencies.
58
+ */
59
+ export declare function generateFocusedDiagram(graph: FileDependencyGraph, centerFile: string, options?: Partial<GraphVisualizationOptions>): DiagramResult;
60
+ /**
61
+ * Generate a diagram showing the reverse dependencies (what depends on this file).
62
+ */
63
+ export declare function generateReverseDiagram(reverseFileDependencyGraph: FileDependencyGraph, targetFile: string, options?: Partial<GraphVisualizationOptions>): DiagramResult;
64
+ /**
65
+ * Create a configured diagram generator.
66
+ */
67
+ export declare function createGraphVisualizer(defaultOptions?: Partial<GraphVisualizationOptions>): {
68
+ generate: (graph: FileDependencyGraph, options?: Partial<GraphVisualizationOptions>) => DiagramResult;
69
+ focused: (graph: FileDependencyGraph, centerFile: string, options?: Partial<GraphVisualizationOptions>) => DiagramResult;
70
+ reverse: (graph: FileDependencyGraph, targetFile: string, options?: Partial<GraphVisualizationOptions>) => DiagramResult;
71
+ };
72
+ //# sourceMappingURL=graph-visualization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph-visualization.d.ts","sourceRoot":"","sources":["../../../../src/integrations/utilities/graph-visualization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAQH,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEzD,MAAM,WAAW,yBAAyB;IACxC,oBAAoB;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,yDAAyD;IACzD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAMD;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,mBAAmB,EAC1B,OAAO,GAAE,OAAO,CAAC,yBAAyB,CAAM,GAC/C,aAAa,CAsBf;AAED;;GAEG;AACH,wBAAgB,sB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