@posthog/agent 1.24.2 → 1.25.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 (604) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  3. package/dist/_virtual/additionalItems.js +4 -0
  4. package/dist/_virtual/additionalItems.js.map +1 -0
  5. package/dist/_virtual/additionalProperties.js +4 -0
  6. package/dist/_virtual/additionalProperties.js.map +1 -0
  7. package/dist/_virtual/ajv.js +4 -0
  8. package/dist/_virtual/ajv.js.map +1 -0
  9. package/dist/_virtual/allOf.js +4 -0
  10. package/dist/_virtual/allOf.js.map +1 -0
  11. package/dist/_virtual/anyOf.js +4 -0
  12. package/dist/_virtual/anyOf.js.map +1 -0
  13. package/dist/_virtual/applicability.js +4 -0
  14. package/dist/_virtual/applicability.js.map +1 -0
  15. package/dist/_virtual/boolSchema.js +4 -0
  16. package/dist/_virtual/boolSchema.js.map +1 -0
  17. package/dist/_virtual/code.js +4 -0
  18. package/dist/_virtual/code.js.map +1 -0
  19. package/dist/_virtual/code2.js +4 -0
  20. package/dist/_virtual/code2.js.map +1 -0
  21. package/dist/_virtual/const.js +4 -0
  22. package/dist/_virtual/const.js.map +1 -0
  23. package/dist/_virtual/contains.js +4 -0
  24. package/dist/_virtual/contains.js.map +1 -0
  25. package/dist/_virtual/core.js +4 -0
  26. package/dist/_virtual/core.js.map +1 -0
  27. package/dist/_virtual/dataType.js +4 -0
  28. package/dist/_virtual/dataType.js.map +1 -0
  29. package/dist/_virtual/defaults.js +4 -0
  30. package/dist/_virtual/defaults.js.map +1 -0
  31. package/dist/_virtual/dependencies.js +4 -0
  32. package/dist/_virtual/dependencies.js.map +1 -0
  33. package/dist/_virtual/draft7.js +4 -0
  34. package/dist/_virtual/draft7.js.map +1 -0
  35. package/dist/_virtual/enum.js +4 -0
  36. package/dist/_virtual/enum.js.map +1 -0
  37. package/dist/_virtual/equal.js +4 -0
  38. package/dist/_virtual/equal.js.map +1 -0
  39. package/dist/_virtual/errors.js +4 -0
  40. package/dist/_virtual/errors.js.map +1 -0
  41. package/dist/_virtual/format.js +4 -0
  42. package/dist/_virtual/format.js.map +1 -0
  43. package/dist/_virtual/formats.js +4 -0
  44. package/dist/_virtual/formats.js.map +1 -0
  45. package/dist/_virtual/id.js +4 -0
  46. package/dist/_virtual/id.js.map +1 -0
  47. package/dist/_virtual/if.js +4 -0
  48. package/dist/_virtual/if.js.map +1 -0
  49. package/dist/_virtual/index.js +4 -0
  50. package/dist/_virtual/index.js.map +1 -0
  51. package/dist/_virtual/index10.js +4 -0
  52. package/dist/_virtual/index10.js.map +1 -0
  53. package/dist/_virtual/index11.js +4 -0
  54. package/dist/_virtual/index11.js.map +1 -0
  55. package/dist/_virtual/index2.js +4 -0
  56. package/dist/_virtual/index2.js.map +1 -0
  57. package/dist/_virtual/index3.js +4 -0
  58. package/dist/_virtual/index3.js.map +1 -0
  59. package/dist/_virtual/index4.js +4 -0
  60. package/dist/_virtual/index4.js.map +1 -0
  61. package/dist/_virtual/index5.js +4 -0
  62. package/dist/_virtual/index5.js.map +1 -0
  63. package/dist/_virtual/index6.js +4 -0
  64. package/dist/_virtual/index6.js.map +1 -0
  65. package/dist/_virtual/index7.js +4 -0
  66. package/dist/_virtual/index7.js.map +1 -0
  67. package/dist/_virtual/index8.js +4 -0
  68. package/dist/_virtual/index8.js.map +1 -0
  69. package/dist/_virtual/index9.js +4 -0
  70. package/dist/_virtual/index9.js.map +1 -0
  71. package/dist/_virtual/items.js +4 -0
  72. package/dist/_virtual/items.js.map +1 -0
  73. package/dist/_virtual/items2020.js +4 -0
  74. package/dist/_virtual/items2020.js.map +1 -0
  75. package/dist/_virtual/keyword.js +4 -0
  76. package/dist/_virtual/keyword.js.map +1 -0
  77. package/dist/_virtual/limit.js +4 -0
  78. package/dist/_virtual/limit.js.map +1 -0
  79. package/dist/_virtual/limitItems.js +4 -0
  80. package/dist/_virtual/limitItems.js.map +1 -0
  81. package/dist/_virtual/limitLength.js +4 -0
  82. package/dist/_virtual/limitLength.js.map +1 -0
  83. package/dist/_virtual/limitNumber.js +4 -0
  84. package/dist/_virtual/limitNumber.js.map +1 -0
  85. package/dist/_virtual/limitProperties.js +4 -0
  86. package/dist/_virtual/limitProperties.js.map +1 -0
  87. package/dist/_virtual/metadata.js +4 -0
  88. package/dist/_virtual/metadata.js.map +1 -0
  89. package/dist/_virtual/multipleOf.js +4 -0
  90. package/dist/_virtual/multipleOf.js.map +1 -0
  91. package/dist/_virtual/names.js +4 -0
  92. package/dist/_virtual/names.js.map +1 -0
  93. package/dist/_virtual/not.js +4 -0
  94. package/dist/_virtual/not.js.map +1 -0
  95. package/dist/_virtual/oneOf.js +4 -0
  96. package/dist/_virtual/oneOf.js.map +1 -0
  97. package/dist/_virtual/pattern.js +4 -0
  98. package/dist/_virtual/pattern.js.map +1 -0
  99. package/dist/_virtual/patternProperties.js +4 -0
  100. package/dist/_virtual/patternProperties.js.map +1 -0
  101. package/dist/_virtual/prefixItems.js +4 -0
  102. package/dist/_virtual/prefixItems.js.map +1 -0
  103. package/dist/_virtual/properties.js +4 -0
  104. package/dist/_virtual/properties.js.map +1 -0
  105. package/dist/_virtual/propertyNames.js +4 -0
  106. package/dist/_virtual/propertyNames.js.map +1 -0
  107. package/dist/_virtual/ref.js +4 -0
  108. package/dist/_virtual/ref.js.map +1 -0
  109. package/dist/_virtual/ref_error.js +4 -0
  110. package/dist/_virtual/ref_error.js.map +1 -0
  111. package/dist/_virtual/required.js +4 -0
  112. package/dist/_virtual/required.js.map +1 -0
  113. package/dist/_virtual/resolve.js +4 -0
  114. package/dist/_virtual/resolve.js.map +1 -0
  115. package/dist/_virtual/rules.js +4 -0
  116. package/dist/_virtual/rules.js.map +1 -0
  117. package/dist/_virtual/scope.js +4 -0
  118. package/dist/_virtual/scope.js.map +1 -0
  119. package/dist/_virtual/subschema.js +4 -0
  120. package/dist/_virtual/subschema.js.map +1 -0
  121. package/dist/_virtual/thenElse.js +4 -0
  122. package/dist/_virtual/thenElse.js.map +1 -0
  123. package/dist/_virtual/types.js +4 -0
  124. package/dist/_virtual/types.js.map +1 -0
  125. package/dist/_virtual/ucs2length.js +4 -0
  126. package/dist/_virtual/ucs2length.js.map +1 -0
  127. package/dist/_virtual/uniqueItems.js +4 -0
  128. package/dist/_virtual/uniqueItems.js.map +1 -0
  129. package/dist/_virtual/uri.js +4 -0
  130. package/dist/_virtual/uri.js.map +1 -0
  131. package/dist/_virtual/util.js +4 -0
  132. package/dist/_virtual/util.js.map +1 -0
  133. package/dist/_virtual/validation_error.js +4 -0
  134. package/dist/_virtual/validation_error.js.map +1 -0
  135. package/dist/claude-cli/cli.js +2294 -2146
  136. package/dist/example-client.d.ts +3 -0
  137. package/dist/example-client.d.ts.map +1 -0
  138. package/dist/index.d.ts +19 -11
  139. package/dist/index.d.ts.map +1 -1
  140. package/dist/index.js +7 -3
  141. package/dist/index.js.map +1 -1
  142. package/dist/node_modules/@agentclientprotocol/sdk/dist/acp.js +610 -0
  143. package/dist/node_modules/@agentclientprotocol/sdk/dist/acp.js.map +1 -0
  144. package/dist/node_modules/@agentclientprotocol/sdk/dist/schema.js +875 -0
  145. package/dist/node_modules/@agentclientprotocol/sdk/dist/schema.js.map +1 -0
  146. package/dist/node_modules/@agentclientprotocol/sdk/dist/stream.js +66 -0
  147. package/dist/node_modules/@agentclientprotocol/sdk/dist/stream.js.map +1 -0
  148. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +23 -0
  149. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js.map +1 -0
  150. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +331 -0
  151. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -0
  152. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +717 -0
  153. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -0
  154. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +221 -0
  155. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -0
  156. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +56 -0
  157. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +1 -0
  158. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +440 -0
  159. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
  160. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js +94 -0
  161. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js.map +1 -0
  162. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1610 -0
  163. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
  164. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +91 -0
  165. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +1 -0
  166. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/ZodError.js +133 -0
  167. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/ZodError.js.map +1 -0
  168. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/errors.js +9 -0
  169. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/errors.js.map +1 -0
  170. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/errorUtil.js +9 -0
  171. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/errorUtil.js.map +1 -0
  172. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/parseUtil.js +112 -0
  173. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/parseUtil.js.map +1 -0
  174. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/util.js +136 -0
  175. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/helpers/util.js.map +1 -0
  176. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/locales/en.js +112 -0
  177. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/locales/en.js.map +1 -0
  178. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/types.js +3297 -0
  179. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v3/types.js.map +1 -0
  180. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/errors.js +44 -0
  181. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/errors.js.map +1 -0
  182. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/iso.js +36 -0
  183. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/iso.js.map +1 -0
  184. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/parse.js +10 -0
  185. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/parse.js.map +1 -0
  186. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/schemas.js +657 -0
  187. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/classic/schemas.js.map +1 -0
  188. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/api.js +449 -0
  189. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/api.js.map +1 -0
  190. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/checks.js +413 -0
  191. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/checks.js.map +1 -0
  192. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/core.js +57 -0
  193. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/core.js.map +1 -0
  194. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/doc.js +38 -0
  195. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/doc.js.map +1 -0
  196. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/errors.js +86 -0
  197. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/errors.js.map +1 -0
  198. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/parse.js +61 -0
  199. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/parse.js.map +1 -0
  200. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/regexes.js +80 -0
  201. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/regexes.js.map +1 -0
  202. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/registries.js +52 -0
  203. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/registries.js.map +1 -0
  204. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/schemas.js +1307 -0
  205. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/schemas.js.map +1 -0
  206. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/to-json-schema.js +842 -0
  207. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/to-json-schema.js.map +1 -0
  208. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/util.js +335 -0
  209. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/util.js.map +1 -0
  210. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/versions.js +8 -0
  211. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/core/versions.js.map +1 -0
  212. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/mini/schemas.js +51 -0
  213. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/zod/v4/mini/schemas.js.map +1 -0
  214. package/dist/node_modules/ajv/dist/ajv.js +69 -0
  215. package/dist/node_modules/ajv/dist/ajv.js.map +1 -0
  216. package/dist/node_modules/ajv/dist/compile/codegen/code.js +169 -0
  217. package/dist/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
  218. package/dist/node_modules/ajv/dist/compile/codegen/index.js +712 -0
  219. package/dist/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
  220. package/dist/node_modules/ajv/dist/compile/codegen/scope.js +157 -0
  221. package/dist/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
  222. package/dist/node_modules/ajv/dist/compile/errors.js +140 -0
  223. package/dist/node_modules/ajv/dist/compile/errors.js.map +1 -0
  224. package/dist/node_modules/ajv/dist/compile/index.js +253 -0
  225. package/dist/node_modules/ajv/dist/compile/index.js.map +1 -0
  226. package/dist/node_modules/ajv/dist/compile/names.js +40 -0
  227. package/dist/node_modules/ajv/dist/compile/names.js.map +1 -0
  228. package/dist/node_modules/ajv/dist/compile/ref_error.js +25 -0
  229. package/dist/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
  230. package/dist/node_modules/ajv/dist/compile/resolve.js +162 -0
  231. package/dist/node_modules/ajv/dist/compile/resolve.js.map +1 -0
  232. package/dist/node_modules/ajv/dist/compile/rules.js +29 -0
  233. package/dist/node_modules/ajv/dist/compile/rules.js.map +1 -0
  234. package/dist/node_modules/ajv/dist/compile/util.js +183 -0
  235. package/dist/node_modules/ajv/dist/compile/util.js.map +1 -0
  236. package/dist/node_modules/ajv/dist/compile/validate/applicability.js +30 -0
  237. package/dist/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
  238. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +64 -0
  239. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
  240. package/dist/node_modules/ajv/dist/compile/validate/dataType.js +213 -0
  241. package/dist/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
  242. package/dist/node_modules/ajv/dist/compile/validate/defaults.js +49 -0
  243. package/dist/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
  244. package/dist/node_modules/ajv/dist/compile/validate/index.js +544 -0
  245. package/dist/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
  246. package/dist/node_modules/ajv/dist/compile/validate/keyword.js +139 -0
  247. package/dist/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
  248. package/dist/node_modules/ajv/dist/compile/validate/subschema.js +95 -0
  249. package/dist/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
  250. package/dist/node_modules/ajv/dist/core.js +639 -0
  251. package/dist/node_modules/ajv/dist/core.js.map +1 -0
  252. package/dist/node_modules/ajv/dist/refs/data.json.js +31 -0
  253. package/dist/node_modules/ajv/dist/refs/data.json.js.map +1 -0
  254. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +254 -0
  255. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +1 -0
  256. package/dist/node_modules/ajv/dist/runtime/equal.js +9 -0
  257. package/dist/node_modules/ajv/dist/runtime/equal.js.map +1 -0
  258. package/dist/node_modules/ajv/dist/runtime/ucs2length.js +25 -0
  259. package/dist/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
  260. package/dist/node_modules/ajv/dist/runtime/uri.js +8 -0
  261. package/dist/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  262. package/dist/node_modules/ajv/dist/runtime/validation_error.js +22 -0
  263. package/dist/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
  264. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +53 -0
  265. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
  266. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +112 -0
  267. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
  268. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +26 -0
  269. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
  270. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +14 -0
  271. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
  272. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +99 -0
  273. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
  274. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +93 -0
  275. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
  276. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +70 -0
  277. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
  278. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +77 -0
  279. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
  280. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +57 -0
  281. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
  282. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +37 -0
  283. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
  284. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +29 -0
  285. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
  286. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +64 -0
  287. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
  288. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +80 -0
  289. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
  290. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +15 -0
  291. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
  292. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +61 -0
  293. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
  294. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +42 -0
  295. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
  296. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +16 -0
  297. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
  298. package/dist/node_modules/ajv/dist/vocabularies/code.js +146 -0
  299. package/dist/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
  300. package/dist/node_modules/ajv/dist/vocabularies/core/id.js +11 -0
  301. package/dist/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
  302. package/dist/node_modules/ajv/dist/vocabularies/core/index.js +21 -0
  303. package/dist/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
  304. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +131 -0
  305. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
  306. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +113 -0
  307. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
  308. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +12 -0
  309. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
  310. package/dist/node_modules/ajv/dist/vocabularies/draft7.js +28 -0
  311. package/dist/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
  312. package/dist/node_modules/ajv/dist/vocabularies/format/format.js +94 -0
  313. package/dist/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
  314. package/dist/node_modules/ajv/dist/vocabularies/format/index.js +9 -0
  315. package/dist/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
  316. package/dist/node_modules/ajv/dist/vocabularies/metadata.js +21 -0
  317. package/dist/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
  318. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +31 -0
  319. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
  320. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +54 -0
  321. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
  322. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +54 -0
  323. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
  324. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +26 -0
  325. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
  326. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +33 -0
  327. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
  328. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +29 -0
  329. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
  330. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +26 -0
  331. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
  332. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +28 -0
  333. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
  334. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +27 -0
  335. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  336. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +84 -0
  337. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
  338. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +72 -0
  339. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
  340. package/dist/node_modules/ajv-formats/dist/formats.js +212 -0
  341. package/dist/node_modules/ajv-formats/dist/formats.js.map +1 -0
  342. package/dist/node_modules/ajv-formats/dist/index.js +52 -0
  343. package/dist/node_modules/ajv-formats/dist/index.js.map +1 -0
  344. package/dist/node_modules/ajv-formats/dist/limit.js +75 -0
  345. package/dist/node_modules/ajv-formats/dist/limit.js.map +1 -0
  346. package/dist/node_modules/diff/libesm/diff/base.js +256 -0
  347. package/dist/node_modules/diff/libesm/diff/base.js.map +1 -0
  348. package/dist/node_modules/diff/libesm/diff/line.js +64 -0
  349. package/dist/node_modules/diff/libesm/diff/line.js.map +1 -0
  350. package/dist/node_modules/diff/libesm/patch/create.js +185 -0
  351. package/dist/node_modules/diff/libesm/patch/create.js.map +1 -0
  352. package/dist/node_modules/fast-deep-equal/index.js +47 -0
  353. package/dist/node_modules/fast-deep-equal/index.js.map +1 -0
  354. package/dist/node_modules/fast-uri/index.js +347 -0
  355. package/dist/node_modules/fast-uri/index.js.map +1 -0
  356. package/dist/node_modules/fast-uri/lib/schemes.js +255 -0
  357. package/dist/node_modules/fast-uri/lib/schemes.js.map +1 -0
  358. package/dist/node_modules/fast-uri/lib/utils.js +334 -0
  359. package/dist/node_modules/fast-uri/lib/utils.js.map +1 -0
  360. package/dist/node_modules/json-schema-traverse/index.js +98 -0
  361. package/dist/node_modules/json-schema-traverse/index.js.map +1 -0
  362. package/dist/node_modules/uuid/dist/rng.js +14 -0
  363. package/dist/node_modules/uuid/dist/rng.js.map +1 -0
  364. package/dist/node_modules/uuid/dist/stringify.js +29 -0
  365. package/dist/node_modules/uuid/dist/stringify.js.map +1 -0
  366. package/dist/node_modules/uuid/dist/v7.js +65 -0
  367. package/dist/node_modules/uuid/dist/v7.js.map +1 -0
  368. package/dist/node_modules/zod-to-json-schema/dist/esm/Options.js +37 -0
  369. package/dist/node_modules/zod-to-json-schema/dist/esm/Options.js.map +1 -0
  370. package/dist/node_modules/zod-to-json-schema/dist/esm/Refs.js +26 -0
  371. package/dist/node_modules/zod-to-json-schema/dist/esm/Refs.js.map +1 -0
  372. package/dist/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +17 -0
  373. package/dist/node_modules/zod-to-json-schema/dist/esm/errorMessages.js.map +1 -0
  374. package/dist/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +11 -0
  375. package/dist/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js.map +1 -0
  376. package/dist/node_modules/zod-to-json-schema/dist/esm/parseDef.js +66 -0
  377. package/dist/node_modules/zod-to-json-schema/dist/esm/parseDef.js.map +1 -0
  378. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +21 -0
  379. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/any.js.map +1 -0
  380. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +30 -0
  381. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/array.js.map +1 -0
  382. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +53 -0
  383. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js.map +1 -0
  384. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +8 -0
  385. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js.map +1 -0
  386. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +8 -0
  387. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js.map +1 -0
  388. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +8 -0
  389. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js.map +1 -0
  390. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +50 -0
  391. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/date.js.map +1 -0
  392. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +11 -0
  393. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/default.js.map +1 -0
  394. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +11 -0
  395. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js.map +1 -0
  396. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +9 -0
  397. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js.map +1 -0
  398. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +56 -0
  399. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js.map +1 -0
  400. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +24 -0
  401. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js.map +1 -0
  402. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +30 -0
  403. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/map.js.map +1 -0
  404. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +19 -0
  405. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js.map +1 -0
  406. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +15 -0
  407. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/never.js.map +1 -0
  408. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +13 -0
  409. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/null.js.map +1 -0
  410. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +37 -0
  411. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js.map +1 -0
  412. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +56 -0
  413. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/number.js.map +1 -0
  414. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +76 -0
  415. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/object.js.map +1 -0
  416. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +25 -0
  417. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js.map +1 -0
  418. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +24 -0
  419. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js.map +1 -0
  420. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +8 -0
  421. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js.map +1 -0
  422. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +8 -0
  423. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js.map +1 -0
  424. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +65 -0
  425. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/record.js.map +1 -0
  426. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +24 -0
  427. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/set.js.map +1 -0
  428. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +350 -0
  429. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
  430. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +36 -0
  431. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js.map +1 -0
  432. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +10 -0
  433. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js.map +1 -0
  434. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +84 -0
  435. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/union.js.map +1 -0
  436. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +8 -0
  437. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js.map +1 -0
  438. package/dist/node_modules/zod-to-json-schema/dist/esm/selectParser.js +109 -0
  439. package/dist/node_modules/zod-to-json-schema/dist/esm/selectParser.js.map +1 -0
  440. package/dist/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +90 -0
  441. package/dist/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js.map +1 -0
  442. package/dist/node_modules/zod-to-json-schema/node_modules/zod/v3/types.js +42 -0
  443. package/dist/node_modules/zod-to-json-schema/node_modules/zod/v3/types.js.map +1 -0
  444. package/dist/package.json.js +8 -0
  445. package/dist/package.json.js.map +1 -0
  446. package/dist/src/acp-extensions.d.ts +91 -0
  447. package/dist/src/acp-extensions.d.ts.map +1 -0
  448. package/dist/src/acp-extensions.js +38 -0
  449. package/dist/src/acp-extensions.js.map +1 -0
  450. package/dist/src/adapters/claude/claude.d.ts +136 -0
  451. package/dist/src/adapters/claude/claude.d.ts.map +1 -0
  452. package/dist/src/adapters/claude/claude.js +1112 -0
  453. package/dist/src/adapters/claude/claude.js.map +1 -0
  454. package/dist/src/adapters/claude/mcp-server.d.ts +30 -0
  455. package/dist/src/adapters/claude/mcp-server.d.ts.map +1 -0
  456. package/dist/src/adapters/claude/mcp-server.js +655 -0
  457. package/dist/src/adapters/claude/mcp-server.js.map +1 -0
  458. package/dist/src/adapters/claude/tools.d.ts +35 -0
  459. package/dist/src/adapters/claude/tools.d.ts.map +1 -0
  460. package/dist/src/adapters/claude/tools.js +466 -0
  461. package/dist/src/adapters/claude/tools.js.map +1 -0
  462. package/dist/src/adapters/claude/utils.d.ts +48 -0
  463. package/dist/src/adapters/claude/utils.d.ts.map +1 -0
  464. package/dist/src/adapters/claude/utils.js +158 -0
  465. package/dist/src/adapters/claude/utils.js.map +1 -0
  466. package/dist/src/agent.d.ts +18 -28
  467. package/dist/src/agent.d.ts.map +1 -1
  468. package/dist/src/agent.js +195 -175
  469. package/dist/src/agent.js.map +1 -1
  470. package/dist/src/agents/execution.js.map +1 -1
  471. package/dist/src/agents/planning.js.map +1 -1
  472. package/dist/src/agents/research.js.map +1 -1
  473. package/dist/src/file-manager.d.ts +6 -6
  474. package/dist/src/file-manager.d.ts.map +1 -1
  475. package/dist/src/file-manager.js +72 -63
  476. package/dist/src/file-manager.js.map +1 -1
  477. package/dist/src/git-manager.d.ts +2 -1
  478. package/dist/src/git-manager.d.ts.map +1 -1
  479. package/dist/src/git-manager.js +105 -70
  480. package/dist/src/git-manager.js.map +1 -1
  481. package/dist/src/posthog-api.d.ts +8 -14
  482. package/dist/src/posthog-api.d.ts.map +1 -1
  483. package/dist/src/posthog-api.js +35 -23
  484. package/dist/src/posthog-api.js.map +1 -1
  485. package/dist/src/prompt-builder.d.ts +4 -4
  486. package/dist/src/prompt-builder.d.ts.map +1 -1
  487. package/dist/src/prompt-builder.js +129 -99
  488. package/dist/src/prompt-builder.js.map +1 -1
  489. package/dist/src/schemas.d.ts +980 -0
  490. package/dist/src/schemas.d.ts.map +1 -0
  491. package/dist/src/schemas.js +196 -0
  492. package/dist/src/schemas.js.map +1 -0
  493. package/dist/src/session-store.d.ts +53 -0
  494. package/dist/src/session-store.d.ts.map +1 -0
  495. package/dist/src/session-store.js +195 -0
  496. package/dist/src/session-store.js.map +1 -0
  497. package/dist/src/task-manager.d.ts +7 -7
  498. package/dist/src/task-manager.d.ts.map +1 -1
  499. package/dist/src/task-manager.js +19 -18
  500. package/dist/src/task-manager.js.map +1 -1
  501. package/dist/src/template-manager.d.ts +1 -1
  502. package/dist/src/template-manager.d.ts.map +1 -1
  503. package/dist/src/template-manager.js +30 -28
  504. package/dist/src/template-manager.js.map +1 -1
  505. package/dist/src/todo-manager.d.ts +5 -5
  506. package/dist/src/todo-manager.d.ts.map +1 -1
  507. package/dist/src/todo-manager.js +33 -24
  508. package/dist/src/todo-manager.js.map +1 -1
  509. package/dist/src/tools/registry.d.ts +1 -1
  510. package/dist/src/tools/registry.js +60 -60
  511. package/dist/src/tools/registry.js.map +1 -1
  512. package/dist/src/tools/types.d.ts +31 -31
  513. package/dist/src/types.d.ts +62 -167
  514. package/dist/src/types.d.ts.map +1 -1
  515. package/dist/src/types.js +1 -0
  516. package/dist/src/types.js.map +1 -1
  517. package/dist/src/utils/logger.d.ts +14 -6
  518. package/dist/src/utils/logger.d.ts.map +1 -1
  519. package/dist/src/utils/logger.js +37 -22
  520. package/dist/src/utils/logger.js.map +1 -1
  521. package/dist/src/utils/tapped-stream.d.ts +17 -0
  522. package/dist/src/utils/tapped-stream.d.ts.map +1 -0
  523. package/dist/src/utils/tapped-stream.js +45 -0
  524. package/dist/src/utils/tapped-stream.js.map +1 -0
  525. package/dist/src/workflow/config.d.ts +1 -1
  526. package/dist/src/workflow/config.d.ts.map +1 -1
  527. package/dist/src/workflow/config.js +18 -18
  528. package/dist/src/workflow/config.js.map +1 -1
  529. package/dist/src/workflow/steps/build.d.ts +1 -1
  530. package/dist/src/workflow/steps/build.d.ts.map +1 -1
  531. package/dist/src/workflow/steps/build.js +53 -39
  532. package/dist/src/workflow/steps/build.js.map +1 -1
  533. package/dist/src/workflow/steps/finalize.d.ts +1 -1
  534. package/dist/src/workflow/steps/finalize.d.ts.map +1 -1
  535. package/dist/src/workflow/steps/finalize.js +58 -52
  536. package/dist/src/workflow/steps/finalize.js.map +1 -1
  537. package/dist/src/workflow/steps/plan.d.ts +1 -1
  538. package/dist/src/workflow/steps/plan.d.ts.map +1 -1
  539. package/dist/src/workflow/steps/plan.js +69 -47
  540. package/dist/src/workflow/steps/plan.js.map +1 -1
  541. package/dist/src/workflow/steps/research.d.ts +1 -1
  542. package/dist/src/workflow/steps/research.d.ts.map +1 -1
  543. package/dist/src/workflow/steps/research.js +86 -67
  544. package/dist/src/workflow/steps/research.js.map +1 -1
  545. package/dist/src/workflow/types.d.ts +19 -14
  546. package/dist/src/workflow/types.d.ts.map +1 -1
  547. package/dist/src/workflow/utils.d.ts +1 -1
  548. package/dist/src/workflow/utils.d.ts.map +1 -1
  549. package/dist/src/workflow/utils.js +7 -4
  550. package/dist/src/workflow/utils.js.map +1 -1
  551. package/dist/src/worktree-manager.d.ts +39 -0
  552. package/dist/src/worktree-manager.d.ts.map +1 -0
  553. package/dist/src/worktree-manager.js +810 -0
  554. package/dist/src/worktree-manager.js.map +1 -0
  555. package/package.json +20 -16
  556. package/src/acp-extensions.ts +117 -0
  557. package/src/adapters/claude/claude.ts +1498 -0
  558. package/src/adapters/claude/mcp-server.ts +810 -0
  559. package/src/adapters/claude/tools.ts +609 -0
  560. package/src/adapters/claude/utils.ts +267 -0
  561. package/src/agent.ts +511 -447
  562. package/src/agents/execution.ts +1 -1
  563. package/src/agents/planning.ts +1 -1
  564. package/src/agents/research.ts +0 -1
  565. package/src/file-manager.ts +80 -70
  566. package/src/git-manager.ts +164 -88
  567. package/src/posthog-api.ts +155 -94
  568. package/src/prompt-builder.ts +196 -143
  569. package/src/schemas.ts +241 -0
  570. package/src/session-store.ts +244 -0
  571. package/src/task-manager.ts +41 -33
  572. package/src/template-manager.ts +98 -45
  573. package/src/todo-manager.ts +43 -32
  574. package/src/tools/registry.ts +62 -62
  575. package/src/tools/types.ts +36 -36
  576. package/src/types.ts +130 -239
  577. package/src/utils/logger.ts +89 -58
  578. package/src/utils/tapped-stream.ts +60 -0
  579. package/src/workflow/config.ts +48 -48
  580. package/src/workflow/steps/build.ts +127 -113
  581. package/src/workflow/steps/finalize.ts +207 -182
  582. package/src/workflow/steps/plan.ts +155 -130
  583. package/src/workflow/steps/research.ts +207 -187
  584. package/src/workflow/types.ts +47 -36
  585. package/src/workflow/utils.ts +37 -34
  586. package/src/worktree-manager.ts +884 -0
  587. package/dist/src/adapters/claude/claude-adapter.d.ts +0 -18
  588. package/dist/src/adapters/claude/claude-adapter.d.ts.map +0 -1
  589. package/dist/src/adapters/claude/claude-adapter.js +0 -311
  590. package/dist/src/adapters/claude/claude-adapter.js.map +0 -1
  591. package/dist/src/adapters/claude/tool-mapper.d.ts +0 -19
  592. package/dist/src/adapters/claude/tool-mapper.d.ts.map +0 -1
  593. package/dist/src/adapters/claude/tool-mapper.js +0 -44
  594. package/dist/src/adapters/claude/tool-mapper.js.map +0 -1
  595. package/dist/src/adapters/types.d.ts +0 -33
  596. package/dist/src/adapters/types.d.ts.map +0 -1
  597. package/dist/src/task-progress-reporter.d.ts +0 -43
  598. package/dist/src/task-progress-reporter.d.ts.map +0 -1
  599. package/dist/src/task-progress-reporter.js +0 -393
  600. package/dist/src/task-progress-reporter.js.map +0 -1
  601. package/src/adapters/claude/claude-adapter.ts +0 -338
  602. package/src/adapters/claude/tool-mapper.ts +0 -46
  603. package/src/adapters/types.ts +0 -37
  604. package/src/task-progress-reporter.ts +0 -443
@@ -1,6 +1,6 @@
1
- import { exec } from 'child_process';
2
- import { promisify } from 'util';
3
- import { Logger } from './utils/logger.js';
1
+ import { exec } from "node:child_process";
2
+ import { promisify } from "node:util";
3
+ import { Logger } from "./utils/logger.js";
4
4
 
5
5
  const execAsync = promisify(exec);
6
6
 
@@ -27,20 +27,23 @@ export class GitManager {
27
27
  this.repositoryPath = config.repositoryPath;
28
28
  this.authorName = config.authorName;
29
29
  this.authorEmail = config.authorEmail;
30
- this.logger = config.logger || new Logger({ debug: false, prefix: '[GitManager]' });
30
+ this.logger =
31
+ config.logger || new Logger({ debug: false, prefix: "[GitManager]" });
31
32
  }
32
33
 
33
34
  private escapeShellArg(str: string): string {
34
35
  return str
35
- .replace(/\\/g, '\\\\')
36
+ .replace(/\\/g, "\\\\")
36
37
  .replace(/"/g, '\\"')
37
- .replace(/`/g, '\\`')
38
- .replace(/\$/g, '\\$');
38
+ .replace(/`/g, "\\`")
39
+ .replace(/\$/g, "\\$");
39
40
  }
40
41
 
41
42
  private async runGitCommand(command: string): Promise<string> {
42
43
  try {
43
- const { stdout } = await execAsync(`cd "${this.repositoryPath}" && git ${command}`);
44
+ const { stdout } = await execAsync(
45
+ `cd "${this.repositoryPath}" && git ${command}`,
46
+ );
44
47
  return stdout.trim();
45
48
  } catch (error) {
46
49
  throw new Error(`Git command failed: ${command}\n${error}`);
@@ -49,7 +52,9 @@ export class GitManager {
49
52
 
50
53
  private async runCommand(command: string): Promise<string> {
51
54
  try {
52
- const { stdout } = await execAsync(`cd "${this.repositoryPath}" && ${command}`);
55
+ const { stdout } = await execAsync(
56
+ `cd "${this.repositoryPath}" && ${command}`,
57
+ );
53
58
  return stdout.trim();
54
59
  } catch (error) {
55
60
  throw new Error(`Command failed: ${command}\n${error}`);
@@ -58,7 +63,7 @@ export class GitManager {
58
63
 
59
64
  async isGitRepository(): Promise<boolean> {
60
65
  try {
61
- await this.runGitCommand('rev-parse --git-dir');
66
+ await this.runGitCommand("rev-parse --git-dir");
62
67
  return true;
63
68
  } catch {
64
69
  return false;
@@ -66,22 +71,26 @@ export class GitManager {
66
71
  }
67
72
 
68
73
  async getCurrentBranch(): Promise<string> {
69
- return await this.runGitCommand('branch --show-current');
74
+ return await this.runGitCommand("branch --show-current");
70
75
  }
71
76
 
72
77
  async getDefaultBranch(): Promise<string> {
73
78
  try {
74
79
  // Try to get the default branch from remote
75
- const remoteBranch = await this.runGitCommand('symbolic-ref refs/remotes/origin/HEAD');
76
- return remoteBranch.replace('refs/remotes/origin/', '');
80
+ const remoteBranch = await this.runGitCommand(
81
+ "symbolic-ref refs/remotes/origin/HEAD",
82
+ );
83
+ return remoteBranch.replace("refs/remotes/origin/", "");
77
84
  } catch {
78
85
  // Fallback: check if main exists, otherwise use master
79
- if (await this.branchExists('main')) {
80
- return 'main';
81
- } else if (await this.branchExists('master')) {
82
- return 'master';
86
+ if (await this.branchExists("main")) {
87
+ return "main";
88
+ } else if (await this.branchExists("master")) {
89
+ return "master";
83
90
  } else {
84
- throw new Error('Cannot determine default branch. No main or master branch found.');
91
+ throw new Error(
92
+ "Cannot determine default branch. No main or master branch found.",
93
+ );
85
94
  }
86
95
  }
87
96
  }
@@ -96,7 +105,7 @@ export class GitManager {
96
105
  }
97
106
 
98
107
  async createBranch(branchName: string, baseBranch?: string): Promise<void> {
99
- const base = baseBranch || await this.getCurrentBranch();
108
+ const base = baseBranch || (await this.getCurrentBranch());
100
109
  await this.runGitCommand(`checkout -b ${branchName} ${base}`);
101
110
  }
102
111
 
@@ -109,25 +118,31 @@ export class GitManager {
109
118
  const defaultBranch = await this.getDefaultBranch();
110
119
 
111
120
  if (currentBranch === defaultBranch) {
112
- this.logger.debug('Already on default branch', { branch: defaultBranch });
121
+ this.logger.debug("Already on default branch", { branch: defaultBranch });
113
122
  return true;
114
123
  }
115
124
 
116
125
  if (await this.hasChanges()) {
117
- this.logger.warn('Skipping branch reset - uncommitted changes present', {
126
+ this.logger.warn("Skipping branch reset - uncommitted changes present", {
118
127
  currentBranch,
119
- defaultBranch
128
+ defaultBranch,
120
129
  });
121
130
  return false;
122
131
  }
123
132
 
124
133
  await this.switchToBranch(defaultBranch);
125
- this.logger.info('Reset to default branch', { from: currentBranch, to: defaultBranch });
134
+ this.logger.info("Reset to default branch", {
135
+ from: currentBranch,
136
+ to: defaultBranch,
137
+ });
126
138
  return true;
127
139
  }
128
140
 
129
- async createOrSwitchToBranch(branchName: string, baseBranch?: string): Promise<void> {
130
- await this.ensureCleanWorkingDirectory('switching branches');
141
+ async createOrSwitchToBranch(
142
+ branchName: string,
143
+ baseBranch?: string,
144
+ ): Promise<void> {
145
+ await this.ensureCleanWorkingDirectory("switching branches");
131
146
 
132
147
  const exists = await this.branchExists(branchName);
133
148
  if (exists) {
@@ -138,38 +153,41 @@ export class GitManager {
138
153
  }
139
154
 
140
155
  async addFiles(paths: string[]): Promise<void> {
141
- const pathList = paths.map(p => `"${this.escapeShellArg(p)}"`).join(' ');
156
+ const pathList = paths.map((p) => `"${this.escapeShellArg(p)}"`).join(" ");
142
157
  await this.runGitCommand(`add ${pathList}`);
143
158
  }
144
159
 
145
160
  async addAllPostHogFiles(): Promise<void> {
146
161
  try {
147
162
  // Use -A flag to add all changes (including new files) and ignore errors if directory is empty
148
- await this.runGitCommand('add -A .posthog/');
163
+ await this.runGitCommand("add -A .posthog/");
149
164
  } catch (error) {
150
165
  // If the directory doesn't exist or has no files, that's fine - just log and continue
151
- this.logger.debug('No PostHog files to add', { error });
166
+ this.logger.debug("No PostHog files to add", { error });
152
167
  }
153
168
  }
154
169
 
155
- async commitChanges(message: string, options?: {
156
- authorName?: string;
157
- authorEmail?: string;
158
- }): Promise<string> {
170
+ async commitChanges(
171
+ message: string,
172
+ options?: {
173
+ authorName?: string;
174
+ authorEmail?: string;
175
+ },
176
+ ): Promise<string> {
159
177
  const command = this.buildCommitCommand(message, options);
160
178
  return await this.runGitCommand(command);
161
179
  }
162
180
 
163
181
  async hasChanges(): Promise<boolean> {
164
182
  try {
165
- const status = await this.runGitCommand('status --porcelain');
183
+ const status = await this.runGitCommand("status --porcelain");
166
184
  if (!status || status.trim().length === 0) {
167
185
  return false;
168
186
  }
169
187
 
170
- const lines = status.split('\n').filter(line => {
188
+ const lines = status.split("\n").filter((line) => {
171
189
  const trimmed = line.trim();
172
- return trimmed.length > 0 && !trimmed.includes('.posthog/');
190
+ return trimmed.length > 0 && !trimmed.includes(".posthog/");
173
191
  });
174
192
 
175
193
  return lines.length > 0;
@@ -180,7 +198,7 @@ export class GitManager {
180
198
 
181
199
  async hasStagedChanges(): Promise<boolean> {
182
200
  try {
183
- const status = await this.runGitCommand('diff --cached --name-only');
201
+ const status = await this.runGitCommand("diff --cached --name-only");
184
202
  return status.length > 0;
185
203
  } catch {
186
204
  return false;
@@ -190,12 +208,14 @@ export class GitManager {
190
208
  // Helper: Centralized safety check for uncommitted changes
191
209
  private async ensureCleanWorkingDirectory(operation: string): Promise<void> {
192
210
  if (await this.hasChanges()) {
193
- throw new Error(`Uncommitted changes detected. Please commit or stash changes before ${operation}.`);
211
+ throw new Error(
212
+ `Uncommitted changes detected. Please commit or stash changes before ${operation}.`,
213
+ );
194
214
  }
195
215
  }
196
216
 
197
217
  private async generateUniqueBranchName(baseName: string): Promise<string> {
198
- if (!await this.branchExists(baseName)) {
218
+ if (!(await this.branchExists(baseName))) {
199
219
  return baseName;
200
220
  }
201
221
 
@@ -213,18 +233,25 @@ export class GitManager {
213
233
  const currentBranch = await this.getCurrentBranch();
214
234
 
215
235
  if (currentBranch !== defaultBranch) {
216
- await this.ensureCleanWorkingDirectory('switching to default branch');
236
+ await this.ensureCleanWorkingDirectory("switching to default branch");
217
237
  await this.switchToBranch(defaultBranch);
218
238
  }
219
239
 
220
240
  return defaultBranch;
221
241
  }
222
242
 
223
- private buildCommitCommand(message: string, options?: { allowEmpty?: boolean; authorName?: string; authorEmail?: string }): string {
243
+ private buildCommitCommand(
244
+ message: string,
245
+ options?: {
246
+ allowEmpty?: boolean;
247
+ authorName?: string;
248
+ authorEmail?: string;
249
+ },
250
+ ): string {
224
251
  let command = `commit -m "${this.escapeShellArg(message)}"`;
225
252
 
226
253
  if (options?.allowEmpty) {
227
- command += ' --allow-empty';
254
+ command += " --allow-empty";
228
255
  }
229
256
 
230
257
  const authorName = options?.authorName || this.authorName;
@@ -239,14 +266,14 @@ export class GitManager {
239
266
 
240
267
  async getRemoteUrl(): Promise<string | null> {
241
268
  try {
242
- return await this.runGitCommand('remote get-url origin');
269
+ return await this.runGitCommand("remote get-url origin");
243
270
  } catch {
244
271
  return null;
245
272
  }
246
273
  }
247
274
 
248
275
  async pushBranch(branchName: string, force: boolean = false): Promise<void> {
249
- const forceFlag = force ? '--force' : '';
276
+ const forceFlag = force ? "--force" : "";
250
277
  await this.runGitCommand(`push ${forceFlag} -u origin ${branchName}`);
251
278
  }
252
279
 
@@ -265,11 +292,11 @@ export class GitManager {
265
292
  push?: boolean;
266
293
  }) => Promise<{ commitCreated: boolean; pushedBranch: boolean }>;
267
294
  }> {
268
- const initialSha = await this.getCommitSha('HEAD');
295
+ const initialSha = await this.getCommitSha("HEAD");
269
296
 
270
297
  return {
271
298
  finalize: async (options) => {
272
- const currentSha = await this.getCommitSha('HEAD');
299
+ const currentSha = await this.getCommitSha("HEAD");
273
300
  const externalCommitsCreated = initialSha !== currentSha;
274
301
  const hasUncommittedChanges = await this.hasChanges();
275
302
 
@@ -282,7 +309,7 @@ export class GitManager {
282
309
 
283
310
  // Commit any remaining uncommitted changes
284
311
  if (hasUncommittedChanges) {
285
- await this.runGitCommand('add .');
312
+ await this.runGitCommand("add .");
286
313
  const hasStagedChanges = await this.hasStagedChanges();
287
314
 
288
315
  if (hasStagedChanges) {
@@ -297,11 +324,13 @@ export class GitManager {
297
324
  const currentBranch = await this.getCurrentBranch();
298
325
  await this.pushBranch(currentBranch);
299
326
  pushedBranch = true;
300
- this.logger.info('Pushed branch after operation', { branch: currentBranch });
327
+ this.logger.info("Pushed branch after operation", {
328
+ branch: currentBranch,
329
+ });
301
330
  }
302
331
 
303
332
  return { commitCreated, pushedBranch };
304
- }
333
+ },
305
334
  };
306
335
  }
307
336
 
@@ -311,10 +340,10 @@ export class GitManager {
311
340
  // Ensure we're on default branch before creating task branch
312
341
  const defaultBranch = await this.ensureOnDefaultBranch();
313
342
 
314
- this.logger.info('Creating task branch from default branch', {
343
+ this.logger.info("Creating task branch from default branch", {
315
344
  branchName,
316
345
  taskSlug,
317
- baseBranch: defaultBranch
346
+ baseBranch: defaultBranch,
318
347
  });
319
348
 
320
349
  await this.createOrSwitchToBranch(branchName, defaultBranch);
@@ -322,26 +351,35 @@ export class GitManager {
322
351
  return branchName;
323
352
  }
324
353
 
325
- async createTaskPlanningBranch(taskId: string, baseBranch?: string): Promise<string> {
354
+ async createTaskPlanningBranch(
355
+ taskId: string,
356
+ baseBranch?: string,
357
+ ): Promise<string> {
326
358
  const baseName = `posthog/task-${taskId}-planning`;
327
359
  const branchName = await this.generateUniqueBranchName(baseName);
328
360
 
329
- this.logger.debug('Creating unique planning branch', { branchName, taskId });
361
+ this.logger.debug("Creating unique planning branch", {
362
+ branchName,
363
+ taskId,
364
+ });
330
365
 
331
- const base = baseBranch || await this.ensureOnDefaultBranch();
366
+ const base = baseBranch || (await this.ensureOnDefaultBranch());
332
367
  await this.createBranch(branchName, base);
333
368
 
334
369
  return branchName;
335
370
  }
336
371
 
337
- async createTaskImplementationBranch(taskId: string, planningBranchName?: string): Promise<string> {
372
+ async createTaskImplementationBranch(
373
+ taskId: string,
374
+ planningBranchName?: string,
375
+ ): Promise<string> {
338
376
  const baseName = `posthog/task-${taskId}-implementation`;
339
377
  const branchName = await this.generateUniqueBranchName(baseName);
340
378
 
341
- this.logger.debug('Creating unique implementation branch', {
379
+ this.logger.debug("Creating unique implementation branch", {
342
380
  branchName,
343
381
  taskId,
344
- currentBranch: await this.getCurrentBranch()
382
+ currentBranch: await this.getCurrentBranch(),
345
383
  });
346
384
 
347
385
  // Determine base branch: explicit param > current planning branch > default
@@ -349,21 +387,24 @@ export class GitManager {
349
387
 
350
388
  if (!baseBranch) {
351
389
  const currentBranch = await this.getCurrentBranch();
352
- if (currentBranch.includes('-planning')) {
390
+ if (currentBranch.includes("-planning")) {
353
391
  baseBranch = currentBranch;
354
- this.logger.debug('Using current planning branch', { baseBranch });
392
+ this.logger.debug("Using current planning branch", { baseBranch });
355
393
  } else {
356
394
  baseBranch = await this.ensureOnDefaultBranch();
357
- this.logger.debug('Using default branch', { baseBranch });
395
+ this.logger.debug("Using default branch", { baseBranch });
358
396
  }
359
397
  }
360
398
 
361
- this.logger.debug('Creating implementation branch from base', { baseBranch, branchName });
399
+ this.logger.debug("Creating implementation branch from base", {
400
+ baseBranch,
401
+ branchName,
402
+ });
362
403
  await this.createBranch(branchName, baseBranch);
363
404
 
364
- this.logger.info('Implementation branch created', {
405
+ this.logger.info("Implementation branch created", {
365
406
  branchName,
366
- currentBranch: await this.getCurrentBranch()
407
+ currentBranch: await this.getCurrentBranch(),
367
408
  });
368
409
 
369
410
  return branchName;
@@ -371,16 +412,16 @@ export class GitManager {
371
412
 
372
413
  async commitPlan(taskId: string, taskTitle: string): Promise<string> {
373
414
  const currentBranch = await this.getCurrentBranch();
374
- this.logger.debug('Committing plan', { taskId, currentBranch });
415
+ this.logger.debug("Committing plan", { taskId, currentBranch });
375
416
 
376
417
  await this.addAllPostHogFiles();
377
418
 
378
419
  const hasChanges = await this.hasStagedChanges();
379
- this.logger.debug('Checking for staged changes', { hasChanges });
420
+ this.logger.debug("Checking for staged changes", { hasChanges });
380
421
 
381
422
  if (!hasChanges) {
382
- this.logger.info('No plan changes to commit', { taskId });
383
- return 'No changes to commit';
423
+ this.logger.info("No plan changes to commit", { taskId });
424
+ return "No changes to commit";
384
425
  }
385
426
 
386
427
  const message = `📋 Add plan for task: ${taskTitle}
@@ -392,17 +433,21 @@ This commit contains the implementation plan and supporting documentation
392
433
  for the task. Review the plan before proceeding with implementation.`;
393
434
 
394
435
  const result = await this.commitChanges(message);
395
- this.logger.info('Plan committed', { taskId, taskTitle });
436
+ this.logger.info("Plan committed", { taskId, taskTitle });
396
437
  return result;
397
438
  }
398
439
 
399
- async commitImplementation(taskId: string, taskTitle: string, planSummary?: string): Promise<string> {
400
- await this.runGitCommand('add .');
440
+ async commitImplementation(
441
+ taskId: string,
442
+ taskTitle: string,
443
+ planSummary?: string,
444
+ ): Promise<string> {
445
+ await this.runGitCommand("add .");
401
446
 
402
447
  const hasChanges = await this.hasStagedChanges();
403
448
  if (!hasChanges) {
404
- this.logger.warn('No implementation changes to commit', { taskId });
405
- return 'No changes to commit';
449
+ this.logger.warn("No implementation changes to commit", { taskId });
450
+ return "No changes to commit";
406
451
  }
407
452
 
408
453
  let message = `✨ Implement task: ${taskTitle}
@@ -417,12 +462,15 @@ Generated by PostHog Agent`;
417
462
  message += `\n\nThis commit implements the changes described in the task plan.`;
418
463
 
419
464
  const result = await this.commitChanges(message);
420
- this.logger.info('Implementation committed', { taskId, taskTitle });
465
+ this.logger.info("Implementation committed", { taskId, taskTitle });
421
466
  return result;
422
467
  }
423
468
 
424
- async deleteBranch(branchName: string, force: boolean = false): Promise<void> {
425
- const forceFlag = force ? '-D' : '-d';
469
+ async deleteBranch(
470
+ branchName: string,
471
+ force: boolean = false,
472
+ ): Promise<void> {
473
+ const forceFlag = force ? "-D" : "-d";
426
474
  await this.runGitCommand(`branch ${forceFlag} ${branchName}`);
427
475
  }
428
476
 
@@ -437,15 +485,15 @@ Generated by PostHog Agent`;
437
485
  return {
438
486
  name: branchName,
439
487
  exists,
440
- isCurrentBranch: branchName === currentBranch
488
+ isCurrentBranch: branchName === currentBranch,
441
489
  };
442
490
  }
443
491
 
444
- async getCommitSha(ref: string = 'HEAD'): Promise<string> {
492
+ async getCommitSha(ref: string = "HEAD"): Promise<string> {
445
493
  return await this.runGitCommand(`rev-parse ${ref}`);
446
494
  }
447
495
 
448
- async getCommitMessage(ref: string = 'HEAD'): Promise<string> {
496
+ async getCommitMessage(ref: string = "HEAD"): Promise<string> {
449
497
  return await this.runGitCommand(`log -1 --pretty=%B ${ref}`);
450
498
  }
451
499
 
@@ -453,11 +501,11 @@ Generated by PostHog Agent`;
453
501
  branchName: string,
454
502
  title: string,
455
503
  body: string,
456
- baseBranch?: string
504
+ baseBranch?: string,
457
505
  ): Promise<string> {
458
506
  const currentBranch = await this.getCurrentBranch();
459
507
  if (currentBranch !== branchName) {
460
- await this.ensureCleanWorkingDirectory('creating PR');
508
+ await this.ensureCleanWorkingDirectory("creating PR");
461
509
  await this.switchToBranch(branchName);
462
510
  }
463
511
 
@@ -480,30 +528,35 @@ Generated by PostHog Agent`;
480
528
  async getTaskBranch(taskSlug: string): Promise<string | null> {
481
529
  try {
482
530
  // Get all branches matching the task slug pattern
483
- const branches = await this.runGitCommand('branch --list --all');
531
+ const branches = await this.runGitCommand("branch --list --all");
484
532
  const branchPattern = `posthog/task-${taskSlug}`;
485
-
533
+
486
534
  // Look for exact match or with counter suffix
487
- const lines = branches.split('\n').map(l => l.trim().replace(/^\*\s+/, ''));
535
+ const lines = branches
536
+ .split("\n")
537
+ .map((l) => l.trim().replace(/^\*\s+/, ""));
488
538
  for (const line of lines) {
489
- const cleanBranch = line.replace('remotes/origin/', '');
539
+ const cleanBranch = line.replace("remotes/origin/", "");
490
540
  if (cleanBranch.startsWith(branchPattern)) {
491
541
  return cleanBranch;
492
542
  }
493
543
  }
494
-
544
+
495
545
  return null;
496
546
  } catch (error) {
497
- this.logger.debug('Failed to get task branch', { taskSlug, error });
547
+ this.logger.debug("Failed to get task branch", { taskSlug, error });
498
548
  return null;
499
549
  }
500
550
  }
501
551
 
502
- async commitAndPush(message: string, options?: { allowEmpty?: boolean }): Promise<void> {
552
+ async commitAndPush(
553
+ message: string,
554
+ options?: { allowEmpty?: boolean },
555
+ ): Promise<void> {
503
556
  const hasChanges = await this.hasStagedChanges();
504
557
 
505
558
  if (!hasChanges && !options?.allowEmpty) {
506
- this.logger.debug('No changes to commit, skipping');
559
+ this.logger.debug("No changes to commit, skipping");
507
560
  return;
508
561
  }
509
562
 
@@ -514,6 +567,29 @@ Generated by PostHog Agent`;
514
567
  const currentBranch = await this.getCurrentBranch();
515
568
  await this.pushBranch(currentBranch);
516
569
 
517
- this.logger.info('Committed and pushed changes', { branch: currentBranch, message });
570
+ this.logger.info("Committed and pushed changes", {
571
+ branch: currentBranch,
572
+ message,
573
+ });
574
+ }
575
+
576
+ async isWorktree(): Promise<boolean> {
577
+ try {
578
+ // In a worktree, .git is a file pointing to the main repo's .git/worktrees/{name}
579
+ // In a normal repo, .git is a directory
580
+ const result = await this.runGitCommand(
581
+ "rev-parse --git-common-dir --git-dir",
582
+ );
583
+ const lines = result.split("\n");
584
+ if (lines.length >= 2) {
585
+ const commonDir = lines[0].trim();
586
+ const gitDir = lines[1].trim();
587
+ // If they're different, we're in a worktree
588
+ return commonDir !== gitDir;
589
+ }
590
+ return false;
591
+ } catch {
592
+ return false;
593
+ }
518
594
  }
519
595
  }