@od-oneapp/ai-platform 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (872) hide show
  1. package/README.md +235 -0
  2. package/dist/agents-base.d.mts +12 -0
  3. package/dist/agents-base.d.mts.map +1 -0
  4. package/dist/agents-base.mjs +20 -0
  5. package/dist/agents-base.mjs.map +1 -0
  6. package/dist/agents-control-flow.d.mts +115 -0
  7. package/dist/agents-control-flow.d.mts.map +1 -0
  8. package/dist/agents-control-flow.mjs +514 -0
  9. package/dist/agents-control-flow.mjs.map +1 -0
  10. package/dist/agents-coordinator.d.mts +11 -0
  11. package/dist/agents-coordinator.d.mts.map +1 -0
  12. package/dist/agents-coordinator.mjs +12 -0
  13. package/dist/agents-coordinator.mjs.map +1 -0
  14. package/dist/agents-experimental.d.mts +153 -0
  15. package/dist/agents-experimental.d.mts.map +1 -0
  16. package/dist/agents-experimental.mjs +580 -0
  17. package/dist/agents-experimental.mjs.map +1 -0
  18. package/dist/agents-fallback.d.mts +10 -0
  19. package/dist/agents-fallback.d.mts.map +1 -0
  20. package/dist/agents-fallback.mjs +15 -0
  21. package/dist/agents-fallback.mjs.map +1 -0
  22. package/dist/agents-multi-swarm.d.mts +9 -0
  23. package/dist/agents-multi-swarm.d.mts.map +1 -0
  24. package/dist/agents-multi-swarm.mjs +44 -0
  25. package/dist/agents-multi-swarm.mjs.map +1 -0
  26. package/dist/agents-multi.d.mts +10 -0
  27. package/dist/agents-multi.d.mts.map +1 -0
  28. package/dist/agents-multi.mjs +44 -0
  29. package/dist/agents-multi.mjs.map +1 -0
  30. package/dist/agents-observability.d.mts +161 -0
  31. package/dist/agents-observability.d.mts.map +1 -0
  32. package/dist/agents-observability.mjs +550 -0
  33. package/dist/agents-observability.mjs.map +1 -0
  34. package/dist/agents-patterns.d.mts +9 -0
  35. package/dist/agents-patterns.d.mts.map +1 -0
  36. package/dist/agents-patterns.mjs +18 -0
  37. package/dist/agents-patterns.mjs.map +1 -0
  38. package/dist/agents-persistence.d.mts +234 -0
  39. package/dist/agents-persistence.d.mts.map +1 -0
  40. package/dist/agents-persistence.mjs +447 -0
  41. package/dist/agents-persistence.mjs.map +1 -0
  42. package/dist/agents-triage.d.mts +11 -0
  43. package/dist/agents-triage.d.mts.map +1 -0
  44. package/dist/agents-triage.mjs +13 -0
  45. package/dist/agents-triage.mjs.map +1 -0
  46. package/dist/agents-workflows.d.mts +9 -0
  47. package/dist/agents-workflows.d.mts.map +1 -0
  48. package/dist/agents-workflows.mjs +9 -0
  49. package/dist/agents-workflows.mjs.map +1 -0
  50. package/dist/agents.d.mts +30 -0
  51. package/dist/agents.d.mts.map +1 -0
  52. package/dist/agents.mjs +50 -0
  53. package/dist/agents.mjs.map +1 -0
  54. package/dist/aggregation-8KJF1uzp.d.mts +276 -0
  55. package/dist/aggregation-8KJF1uzp.d.mts.map +1 -0
  56. package/dist/aggregation-BDop87kL.mjs +1180 -0
  57. package/dist/aggregation-BDop87kL.mjs.map +1 -0
  58. package/dist/ai-runtime-CDzQztTt.mjs +85 -0
  59. package/dist/ai-runtime-CDzQztTt.mjs.map +1 -0
  60. package/dist/ai-runtime-DIwOEc6g.d.mts +56 -0
  61. package/dist/ai-runtime-DIwOEc6g.d.mts.map +1 -0
  62. package/dist/ai-sdk-error-integration-D0GDqrM0.d.mts +553 -0
  63. package/dist/ai-sdk-error-integration-D0GDqrM0.d.mts.map +1 -0
  64. package/dist/approval-queue-BcDDQ4oQ.mjs +104 -0
  65. package/dist/approval-queue-BcDDQ4oQ.mjs.map +1 -0
  66. package/dist/approval-queue-CiKiFT9z.d.mts +21 -0
  67. package/dist/approval-queue-CiKiFT9z.d.mts.map +1 -0
  68. package/dist/audio-BzvN7r10.d.mts +79 -0
  69. package/dist/audio-BzvN7r10.d.mts.map +1 -0
  70. package/dist/audio-vBG_62ME.mjs +226 -0
  71. package/dist/audio-vBG_62ME.mjs.map +1 -0
  72. package/dist/audit-logger-Bb2JIcIk.d.mts +12 -0
  73. package/dist/audit-logger-Bb2JIcIk.d.mts.map +1 -0
  74. package/dist/audit-logger-CHIP8bRO.mjs +596 -0
  75. package/dist/audit-logger-CHIP8bRO.mjs.map +1 -0
  76. package/dist/auto-resume-BpUNbPtp.d.mts +160 -0
  77. package/dist/auto-resume-BpUNbPtp.d.mts.map +1 -0
  78. package/dist/auto-resume-BuFRNvAX.mjs +638 -0
  79. package/dist/auto-resume-BuFRNvAX.mjs.map +1 -0
  80. package/dist/budget-guard-C83KCH9V.d.mts +52 -0
  81. package/dist/budget-guard-C83KCH9V.d.mts.map +1 -0
  82. package/dist/budget-guard-d_b5rq4u.mjs +158 -0
  83. package/dist/budget-guard-d_b5rq4u.mjs.map +1 -0
  84. package/dist/budget-guard-gyhJS00s.mjs +234 -0
  85. package/dist/budget-guard-gyhJS00s.mjs.map +1 -0
  86. package/dist/buffer-BC8mvXHE.d.mts +98 -0
  87. package/dist/buffer-BC8mvXHE.d.mts.map +1 -0
  88. package/dist/buffer-CefJGbRy.mjs +289 -0
  89. package/dist/buffer-CefJGbRy.mjs.map +1 -0
  90. package/dist/caching-adapters.d.mts +5 -0
  91. package/dist/caching-adapters.mjs +3 -0
  92. package/dist/caching-strategies.d.mts +52 -0
  93. package/dist/caching-strategies.d.mts.map +1 -0
  94. package/dist/caching-strategies.mjs +703 -0
  95. package/dist/caching-strategies.mjs.map +1 -0
  96. package/dist/caching.d.mts +14 -0
  97. package/dist/caching.d.mts.map +1 -0
  98. package/dist/caching.mjs +15 -0
  99. package/dist/caching.mjs.map +1 -0
  100. package/dist/catalog.d.mts +19 -0
  101. package/dist/catalog.d.mts.map +1 -0
  102. package/dist/catalog.mjs +1114 -0
  103. package/dist/catalog.mjs.map +1 -0
  104. package/dist/chunk-CkzbjWQW.mjs +20 -0
  105. package/dist/circuit-breaker-DoKWPORd.mjs +262 -0
  106. package/dist/circuit-breaker-DoKWPORd.mjs.map +1 -0
  107. package/dist/circuit-breaker-Mey3E7tW.d.mts +64 -0
  108. package/dist/circuit-breaker-Mey3E7tW.d.mts.map +1 -0
  109. package/dist/citation-generator-C-9RpbHq.mjs +103 -0
  110. package/dist/citation-generator-C-9RpbHq.mjs.map +1 -0
  111. package/dist/citation-generator-CDSymDs_.d.mts +18 -0
  112. package/dist/citation-generator-CDSymDs_.d.mts.map +1 -0
  113. package/dist/client-CpacYDIE.mjs +882 -0
  114. package/dist/client-CpacYDIE.mjs.map +1 -0
  115. package/dist/client.d.mts +103 -0
  116. package/dist/client.d.mts.map +1 -0
  117. package/dist/client.mjs +470 -0
  118. package/dist/client.mjs.map +1 -0
  119. package/dist/compliance-approval-queue-DQGLojAm.mjs +172 -0
  120. package/dist/compliance-approval-queue-DQGLojAm.mjs.map +1 -0
  121. package/dist/compliance-approval-queue-IrMxFfSJ.d.mts +99 -0
  122. package/dist/compliance-approval-queue-IrMxFfSJ.d.mts.map +1 -0
  123. package/dist/compliance-wrapper-CrOMHhHN.mjs +528 -0
  124. package/dist/compliance-wrapper-CrOMHhHN.mjs.map +1 -0
  125. package/dist/conditions-DmQ6Y1Wt.mjs +179 -0
  126. package/dist/conditions-DmQ6Y1Wt.mjs.map +1 -0
  127. package/dist/conditions-zDrKfrc3.d.mts +42 -0
  128. package/dist/conditions-zDrKfrc3.d.mts.map +1 -0
  129. package/dist/console-BGMxxPZN.mjs +181 -0
  130. package/dist/console-BGMxxPZN.mjs.map +1 -0
  131. package/dist/console-DqEqZd4A.d.mts +76 -0
  132. package/dist/console-DqEqZd4A.d.mts.map +1 -0
  133. package/dist/controller-BOy3-xbC.mjs +501 -0
  134. package/dist/controller-BOy3-xbC.mjs.map +1 -0
  135. package/dist/controller-Y0NGosbJ.d.mts +104 -0
  136. package/dist/controller-Y0NGosbJ.d.mts.map +1 -0
  137. package/dist/coordinator-agent-BglqZLwo.d.mts +54 -0
  138. package/dist/coordinator-agent-BglqZLwo.d.mts.map +1 -0
  139. package/dist/coordinator-agent-WFWBRL-G.mjs +236 -0
  140. package/dist/coordinator-agent-WFWBRL-G.mjs.map +1 -0
  141. package/dist/crypto-8ABhc3TD.mjs +40 -0
  142. package/dist/crypto-8ABhc3TD.mjs.map +1 -0
  143. package/dist/environment-CSoJb0SW.mjs +255 -0
  144. package/dist/environment-CSoJb0SW.mjs.map +1 -0
  145. package/dist/error-handling-DNVkm6RY.mjs +1334 -0
  146. package/dist/error-handling-DNVkm6RY.mjs.map +1 -0
  147. package/dist/errors-CQ8tF4dP.mjs +985 -0
  148. package/dist/errors-CQ8tF4dP.mjs.map +1 -0
  149. package/dist/errors-CfYdVeum.d.mts +212 -0
  150. package/dist/errors-CfYdVeum.d.mts.map +1 -0
  151. package/dist/errors-Dtn-UeRi.mjs +61 -0
  152. package/dist/errors-Dtn-UeRi.mjs.map +1 -0
  153. package/dist/evaluator-Cs84qkr8.mjs +91 -0
  154. package/dist/evaluator-Cs84qkr8.mjs.map +1 -0
  155. package/dist/evaluator-optimizer-De67_mJC.mjs +1086 -0
  156. package/dist/evaluator-optimizer-De67_mJC.mjs.map +1 -0
  157. package/dist/evaluator-optimizer-pattern-B5939s2Z.mjs +367 -0
  158. package/dist/evaluator-optimizer-pattern-B5939s2Z.mjs.map +1 -0
  159. package/dist/evaluator-optimizer-pattern-D1AJrzBD.d.mts +72 -0
  160. package/dist/evaluator-optimizer-pattern-D1AJrzBD.d.mts.map +1 -0
  161. package/dist/factory-DP6VSl8C.mjs +307 -0
  162. package/dist/factory-DP6VSl8C.mjs.map +1 -0
  163. package/dist/generative-ui-catalog.d.mts +8 -0
  164. package/dist/generative-ui-catalog.d.mts.map +1 -0
  165. package/dist/generative-ui-catalog.mjs +679 -0
  166. package/dist/generative-ui-catalog.mjs.map +1 -0
  167. package/dist/generative-ui-registry.d.mts +195 -0
  168. package/dist/generative-ui-registry.d.mts.map +1 -0
  169. package/dist/generative-ui-registry.mjs +250 -0
  170. package/dist/generative-ui-registry.mjs.map +1 -0
  171. package/dist/generative-ui-stream.d.mts +23 -0
  172. package/dist/generative-ui-stream.d.mts.map +1 -0
  173. package/dist/generative-ui-stream.mjs +219 -0
  174. package/dist/generative-ui-stream.mjs.map +1 -0
  175. package/dist/generative-ui-types.d.mts +123 -0
  176. package/dist/generative-ui-types.d.mts.map +1 -0
  177. package/dist/generative-ui-types.mjs +1 -0
  178. package/dist/generative-ui.d.mts +13 -0
  179. package/dist/generative-ui.d.mts.map +1 -0
  180. package/dist/generative-ui.mjs +21 -0
  181. package/dist/generative-ui.mjs.map +1 -0
  182. package/dist/governance-audit.d.mts +3 -0
  183. package/dist/governance-audit.mjs +3 -0
  184. package/dist/governance-compliance.d.mts +5 -0
  185. package/dist/governance-compliance.mjs +4 -0
  186. package/dist/governance-policies.d.mts +4 -0
  187. package/dist/governance-policies.mjs +4 -0
  188. package/dist/governance-tenancy.d.mts +3 -0
  189. package/dist/governance-tenancy.mjs +3 -0
  190. package/dist/governance.d.mts +88 -0
  191. package/dist/governance.d.mts.map +1 -0
  192. package/dist/governance.mjs +432 -0
  193. package/dist/governance.mjs.map +1 -0
  194. package/dist/grounding-attribution.d.mts +63 -0
  195. package/dist/grounding-attribution.d.mts.map +1 -0
  196. package/dist/grounding-attribution.mjs +259 -0
  197. package/dist/grounding-attribution.mjs.map +1 -0
  198. package/dist/grounding-citation.d.mts +2 -0
  199. package/dist/grounding-citation.mjs +3 -0
  200. package/dist/grounding-context.d.mts +9 -0
  201. package/dist/grounding-context.d.mts.map +1 -0
  202. package/dist/grounding-context.mjs +19 -0
  203. package/dist/grounding-context.mjs.map +1 -0
  204. package/dist/grounding-embed.d.mts +102 -0
  205. package/dist/grounding-embed.d.mts.map +1 -0
  206. package/dist/grounding-embed.mjs +417 -0
  207. package/dist/grounding-embed.mjs.map +1 -0
  208. package/dist/grounding-hallucination.d.mts +44 -0
  209. package/dist/grounding-hallucination.d.mts.map +1 -0
  210. package/dist/grounding-hallucination.mjs +115 -0
  211. package/dist/grounding-hallucination.mjs.map +1 -0
  212. package/dist/grounding-proof-map.d.mts +9 -0
  213. package/dist/grounding-proof-map.d.mts.map +1 -0
  214. package/dist/grounding-proof-map.mjs +26 -0
  215. package/dist/grounding-proof-map.mjs.map +1 -0
  216. package/dist/grounding-rag.d.mts +10 -0
  217. package/dist/grounding-rag.d.mts.map +1 -0
  218. package/dist/grounding-rag.mjs +27 -0
  219. package/dist/grounding-rag.mjs.map +1 -0
  220. package/dist/grounding-verification.d.mts +48 -0
  221. package/dist/grounding-verification.d.mts.map +1 -0
  222. package/dist/grounding-verification.mjs +224 -0
  223. package/dist/grounding-verification.mjs.map +1 -0
  224. package/dist/grounding.d.mts +24 -0
  225. package/dist/grounding.d.mts.map +1 -0
  226. package/dist/grounding.mjs +77 -0
  227. package/dist/grounding.mjs.map +1 -0
  228. package/dist/hitl-active-learning.d.mts +41 -0
  229. package/dist/hitl-active-learning.d.mts.map +1 -0
  230. package/dist/hitl-active-learning.mjs +178 -0
  231. package/dist/hitl-active-learning.mjs.map +1 -0
  232. package/dist/hitl-annotation.d.mts +74 -0
  233. package/dist/hitl-annotation.d.mts.map +1 -0
  234. package/dist/hitl-annotation.mjs +170 -0
  235. package/dist/hitl-annotation.mjs.map +1 -0
  236. package/dist/hitl-approval.d.mts +2 -0
  237. package/dist/hitl-approval.mjs +3 -0
  238. package/dist/hitl-feedback.d.mts +59 -0
  239. package/dist/hitl-feedback.d.mts.map +1 -0
  240. package/dist/hitl-feedback.mjs +137 -0
  241. package/dist/hitl-feedback.mjs.map +1 -0
  242. package/dist/hitl-review.d.mts +2 -0
  243. package/dist/hitl-review.mjs +3 -0
  244. package/dist/hitl.d.mts +14 -0
  245. package/dist/hitl.d.mts.map +1 -0
  246. package/dist/hitl.mjs +22 -0
  247. package/dist/hitl.mjs.map +1 -0
  248. package/dist/index-B17HT-VL.d.mts +285 -0
  249. package/dist/index-B17HT-VL.d.mts.map +1 -0
  250. package/dist/index-BDwgsK9B.d.mts +101 -0
  251. package/dist/index-BDwgsK9B.d.mts.map +1 -0
  252. package/dist/index-BGgMn_Ev.d.mts +2615 -0
  253. package/dist/index-BGgMn_Ev.d.mts.map +1 -0
  254. package/dist/index-DOqe5r9G.d.mts +318 -0
  255. package/dist/index-DOqe5r9G.d.mts.map +1 -0
  256. package/dist/index-DotINT7o.d.mts +1004 -0
  257. package/dist/index-DotINT7o.d.mts.map +1 -0
  258. package/dist/index-URlW7aD1.d.mts +67 -0
  259. package/dist/index-URlW7aD1.d.mts.map +1 -0
  260. package/dist/index.d.mts +64 -0
  261. package/dist/index.d.mts.map +1 -0
  262. package/dist/index.mjs +46 -0
  263. package/dist/index.mjs.map +1 -0
  264. package/dist/integrations-blob-storage.d.mts +25 -0
  265. package/dist/integrations-blob-storage.d.mts.map +1 -0
  266. package/dist/integrations-blob-storage.mjs +3 -0
  267. package/dist/integrations-notifications.d.mts +2 -0
  268. package/dist/integrations-notifications.mjs +3 -0
  269. package/dist/integrations-rate-limit.d.mts +27 -0
  270. package/dist/integrations-rate-limit.d.mts.map +1 -0
  271. package/dist/integrations-rate-limit.mjs +30 -0
  272. package/dist/integrations-rate-limit.mjs.map +1 -0
  273. package/dist/integrations-redis.d.mts +3 -0
  274. package/dist/integrations-redis.mjs +3 -0
  275. package/dist/integrations-stream.d.mts +14 -0
  276. package/dist/integrations-stream.d.mts.map +1 -0
  277. package/dist/integrations-stream.mjs +3 -0
  278. package/dist/integrations.d.mts +7 -0
  279. package/dist/integrations.mjs +7 -0
  280. package/dist/log-adapter-BLegSZtz.d.mts +16 -0
  281. package/dist/log-adapter-BLegSZtz.d.mts.map +1 -0
  282. package/dist/log-adapter-PPe_2Pwv.mjs +28 -0
  283. package/dist/log-adapter-PPe_2Pwv.mjs.map +1 -0
  284. package/dist/loop-BOYEtr2g.mjs +520 -0
  285. package/dist/loop-BOYEtr2g.mjs.map +1 -0
  286. package/dist/loop-C-tBBOqi.d.mts +219 -0
  287. package/dist/loop-C-tBBOqi.d.mts.map +1 -0
  288. package/dist/middleware-5wQ9bANW.mjs +306 -0
  289. package/dist/middleware-5wQ9bANW.mjs.map +1 -0
  290. package/dist/middleware-C1apSrj0.mjs +613 -0
  291. package/dist/middleware-C1apSrj0.mjs.map +1 -0
  292. package/dist/middleware-C7k0uItW.d.mts +9 -0
  293. package/dist/middleware-C7k0uItW.d.mts.map +1 -0
  294. package/dist/middleware-CZQCTHfl.mjs +366 -0
  295. package/dist/middleware-CZQCTHfl.mjs.map +1 -0
  296. package/dist/models.d.mts +11 -0
  297. package/dist/models.d.mts.map +1 -0
  298. package/dist/models.mjs +32 -0
  299. package/dist/models.mjs.map +1 -0
  300. package/dist/observability-analytics.d.mts +107 -0
  301. package/dist/observability-analytics.d.mts.map +1 -0
  302. package/dist/observability-analytics.mjs +409 -0
  303. package/dist/observability-analytics.mjs.map +1 -0
  304. package/dist/observability-cost.d.mts +10 -0
  305. package/dist/observability-cost.d.mts.map +1 -0
  306. package/dist/observability-cost.mjs +15 -0
  307. package/dist/observability-cost.mjs.map +1 -0
  308. package/dist/observability-telemetry.d.mts +111 -0
  309. package/dist/observability-telemetry.d.mts.map +1 -0
  310. package/dist/observability-telemetry.mjs +343 -0
  311. package/dist/observability-telemetry.mjs.map +1 -0
  312. package/dist/observability-tracing.d.mts +10 -0
  313. package/dist/observability-tracing.d.mts.map +1 -0
  314. package/dist/observability-tracing.mjs +17 -0
  315. package/dist/observability-tracing.mjs.map +1 -0
  316. package/dist/observability.d.mts +15 -0
  317. package/dist/observability.d.mts.map +1 -0
  318. package/dist/observability.mjs +17 -0
  319. package/dist/observability.mjs.map +1 -0
  320. package/dist/optimizer-DhXXpci6.mjs +97 -0
  321. package/dist/optimizer-DhXXpci6.mjs.map +1 -0
  322. package/dist/output-multimodal.d.mts +9 -0
  323. package/dist/output-multimodal.d.mts.map +1 -0
  324. package/dist/output-multimodal.mjs +18 -0
  325. package/dist/output-multimodal.mjs.map +1 -0
  326. package/dist/output.d.mts +11 -0
  327. package/dist/output.d.mts.map +1 -0
  328. package/dist/output.mjs +40 -0
  329. package/dist/output.mjs.map +1 -0
  330. package/dist/pii-filter-3AxmYSiu.d.mts +23 -0
  331. package/dist/pii-filter-3AxmYSiu.d.mts.map +1 -0
  332. package/dist/pipelines.d.mts +448 -0
  333. package/dist/pipelines.d.mts.map +1 -0
  334. package/dist/pipelines.mjs +1534 -0
  335. package/dist/pipelines.mjs.map +1 -0
  336. package/dist/prompt-injection-DQXchzsV.d.mts +8 -0
  337. package/dist/prompt-injection-DQXchzsV.d.mts.map +1 -0
  338. package/dist/prompt-injection-RpoLPwSa.mjs +52 -0
  339. package/dist/prompt-injection-RpoLPwSa.mjs.map +1 -0
  340. package/dist/prompts.d.mts +192 -0
  341. package/dist/prompts.d.mts.map +1 -0
  342. package/dist/prompts.mjs +732 -0
  343. package/dist/prompts.mjs.map +1 -0
  344. package/dist/protocol-DfBiEsnl.d.mts +112 -0
  345. package/dist/protocol-DfBiEsnl.d.mts.map +1 -0
  346. package/dist/quota-manager-0iPMkQWN.d.mts +62 -0
  347. package/dist/quota-manager-0iPMkQWN.d.mts.map +1 -0
  348. package/dist/quota-manager-D_N7FuQ2.mjs +180 -0
  349. package/dist/quota-manager-D_N7FuQ2.mjs.map +1 -0
  350. package/dist/redaction-utils-DcQwsiNh.mjs +438 -0
  351. package/dist/redaction-utils-DcQwsiNh.mjs.map +1 -0
  352. package/dist/redis-CpsSrF8K.mjs +102 -0
  353. package/dist/redis-CpsSrF8K.mjs.map +1 -0
  354. package/dist/redis-CwguYFGh.d.mts +33 -0
  355. package/dist/redis-CwguYFGh.d.mts.map +1 -0
  356. package/dist/registry-CsD3iTIx.mjs +190 -0
  357. package/dist/registry-CsD3iTIx.mjs.map +1 -0
  358. package/dist/registry-DVPWzkXR.d.mts +36 -0
  359. package/dist/registry-DVPWzkXR.d.mts.map +1 -0
  360. package/dist/reranking-BpWYhYzl.d.mts +72 -0
  361. package/dist/reranking-BpWYhYzl.d.mts.map +1 -0
  362. package/dist/reranking-Ck8aKZW7.mjs +331 -0
  363. package/dist/reranking-Ck8aKZW7.mjs.map +1 -0
  364. package/dist/resumable-adapter-CO1HtsgJ.mjs +21 -0
  365. package/dist/resumable-adapter-CO1HtsgJ.mjs.map +1 -0
  366. package/dist/review-trigger-DmAsiQlM.d.mts +24 -0
  367. package/dist/review-trigger-DmAsiQlM.d.mts.map +1 -0
  368. package/dist/review-trigger-DwXfpww9.mjs +112 -0
  369. package/dist/review-trigger-DwXfpww9.mjs.map +1 -0
  370. package/dist/safe-context-BynhkTKR.d.mts +54 -0
  371. package/dist/safe-context-BynhkTKR.d.mts.map +1 -0
  372. package/dist/safe-context-C5A3Wv3b.mjs +143 -0
  373. package/dist/safe-context-C5A3Wv3b.mjs.map +1 -0
  374. package/dist/schema-Bu2noOZ4.mjs +27 -0
  375. package/dist/schema-Bu2noOZ4.mjs.map +1 -0
  376. package/dist/schema-CwFvuCnA.mjs +97 -0
  377. package/dist/schema-CwFvuCnA.mjs.map +1 -0
  378. package/dist/schema-Wz-1-ro9.d.mts +37 -0
  379. package/dist/schema-Wz-1-ro9.d.mts.map +1 -0
  380. package/dist/schemas-CxQtxIga.mjs +62 -0
  381. package/dist/schemas-CxQtxIga.mjs.map +1 -0
  382. package/dist/schemas-DBOhxgW7.d.mts +32 -0
  383. package/dist/schemas-DBOhxgW7.d.mts.map +1 -0
  384. package/dist/schemas-Dp_OCqBt.d.mts +63 -0
  385. package/dist/schemas-Dp_OCqBt.d.mts.map +1 -0
  386. package/dist/schemas-SwCsnT0z.mjs +83 -0
  387. package/dist/schemas-SwCsnT0z.mjs.map +1 -0
  388. package/dist/sdk-errors.d.mts +2 -0
  389. package/dist/sdk-errors.mjs +3 -0
  390. package/dist/sdk-experimental.d.mts +59 -0
  391. package/dist/sdk-experimental.d.mts.map +1 -0
  392. package/dist/sdk-experimental.mjs +193 -0
  393. package/dist/sdk-experimental.mjs.map +1 -0
  394. package/dist/sdk-stop-conditions.d.mts +3 -0
  395. package/dist/sdk-stop-conditions.mjs +3 -0
  396. package/dist/sdk.d.mts +15 -0
  397. package/dist/sdk.d.mts.map +1 -0
  398. package/dist/sdk.mjs +50 -0
  399. package/dist/sdk.mjs.map +1 -0
  400. package/dist/security-guardrails.d.mts +3 -0
  401. package/dist/security-guardrails.mjs +3 -0
  402. package/dist/security-injection.d.mts +2 -0
  403. package/dist/security-injection.mjs +3 -0
  404. package/dist/security.d.mts +12 -0
  405. package/dist/security.d.mts.map +1 -0
  406. package/dist/security.mjs +18 -0
  407. package/dist/security.mjs.map +1 -0
  408. package/dist/server.d.mts +420 -0
  409. package/dist/server.d.mts.map +1 -0
  410. package/dist/server.mjs +2225 -0
  411. package/dist/server.mjs.map +1 -0
  412. package/dist/shared.d.mts +2 -0
  413. package/dist/shared.mjs +3 -0
  414. package/dist/streaming-control.d.mts +2 -0
  415. package/dist/streaming-control.mjs +4 -0
  416. package/dist/streaming-core.d.mts +4 -0
  417. package/dist/streaming-core.mjs +3 -0
  418. package/dist/streaming-infra-resilience.d.mts +120 -0
  419. package/dist/streaming-infra-resilience.d.mts.map +1 -0
  420. package/dist/streaming-infra-resilience.mjs +358 -0
  421. package/dist/streaming-infra-resilience.mjs.map +1 -0
  422. package/dist/streaming-infra-transport.d.mts +57 -0
  423. package/dist/streaming-infra-transport.d.mts.map +1 -0
  424. package/dist/streaming-infra-transport.mjs +488 -0
  425. package/dist/streaming-infra-transport.mjs.map +1 -0
  426. package/dist/streaming-infra.d.mts +5 -0
  427. package/dist/streaming-infra.mjs +5 -0
  428. package/dist/streaming.d.mts +17 -0
  429. package/dist/streaming.d.mts.map +1 -0
  430. package/dist/streaming.mjs +71 -0
  431. package/dist/streaming.mjs.map +1 -0
  432. package/dist/telemetry-2eKMojIb.mjs +1046 -0
  433. package/dist/telemetry-2eKMojIb.mjs.map +1 -0
  434. package/dist/telemetry-C2t03dwD.d.mts +59 -0
  435. package/dist/telemetry-C2t03dwD.d.mts.map +1 -0
  436. package/dist/tool-Btbththq.d.mts +253 -0
  437. package/dist/tool-Btbththq.d.mts.map +1 -0
  438. package/dist/tool-JSf8JXZ8.mjs +1150 -0
  439. package/dist/tool-JSf8JXZ8.mjs.map +1 -0
  440. package/dist/tool-safety-CZO8a4D4.d.mts +60 -0
  441. package/dist/tool-safety-CZO8a4D4.d.mts.map +1 -0
  442. package/dist/tool-safety-DXtYDXod.mjs +319 -0
  443. package/dist/tool-safety-DXtYDXod.mjs.map +1 -0
  444. package/dist/tools-BuS2Uv0q.mjs +1708 -0
  445. package/dist/tools-BuS2Uv0q.mjs.map +1 -0
  446. package/dist/tools-approval.d.mts +99 -0
  447. package/dist/tools-approval.d.mts.map +1 -0
  448. package/dist/tools-approval.mjs +395 -0
  449. package/dist/tools-approval.mjs.map +1 -0
  450. package/dist/tools-compliance.d.mts +67 -0
  451. package/dist/tools-compliance.d.mts.map +1 -0
  452. package/dist/tools-compliance.mjs +330 -0
  453. package/dist/tools-compliance.mjs.map +1 -0
  454. package/dist/tools-computer.d.mts +25 -0
  455. package/dist/tools-computer.d.mts.map +1 -0
  456. package/dist/tools-computer.mjs +64 -0
  457. package/dist/tools-computer.mjs.map +1 -0
  458. package/dist/tools-core.d.mts +3 -0
  459. package/dist/tools-core.mjs +3 -0
  460. package/dist/tools-mcp.d.mts +3 -0
  461. package/dist/tools-mcp.mjs +5 -0
  462. package/dist/tools-superpowers.d.mts +2 -0
  463. package/dist/tools-superpowers.mjs +3 -0
  464. package/dist/tools.d.mts +401 -0
  465. package/dist/tools.d.mts.map +1 -0
  466. package/dist/tools.mjs +1921 -0
  467. package/dist/tools.mjs.map +1 -0
  468. package/dist/transport-selector-D-Ib05X1.mjs +1936 -0
  469. package/dist/transport-selector-D-Ib05X1.mjs.map +1 -0
  470. package/dist/triage-agent-BEsXg5sw.d.mts +63 -0
  471. package/dist/triage-agent-BEsXg5sw.d.mts.map +1 -0
  472. package/dist/triage-agent-CBsfX-HW.mjs +167 -0
  473. package/dist/triage-agent-CBsfX-HW.mjs.map +1 -0
  474. package/dist/types-BPnq3GQo.d.mts +23 -0
  475. package/dist/types-BPnq3GQo.d.mts.map +1 -0
  476. package/dist/types-BjWgimpY.d.mts +16 -0
  477. package/dist/types-BjWgimpY.d.mts.map +1 -0
  478. package/dist/types-BxD-5btB.d.mts +41 -0
  479. package/dist/types-BxD-5btB.d.mts.map +1 -0
  480. package/dist/types-By-r93bE.d.mts +36 -0
  481. package/dist/types-By-r93bE.d.mts.map +1 -0
  482. package/dist/types-CLBWFRZN.d.mts +69 -0
  483. package/dist/types-CLBWFRZN.d.mts.map +1 -0
  484. package/dist/types-CQ0HFd0u.d.mts +62 -0
  485. package/dist/types-CQ0HFd0u.d.mts.map +1 -0
  486. package/dist/types-D3zJb59_.d.mts +47 -0
  487. package/dist/types-D3zJb59_.d.mts.map +1 -0
  488. package/dist/types-DJnugQX0.d.mts +80 -0
  489. package/dist/types-DJnugQX0.d.mts.map +1 -0
  490. package/dist/types-DbUfMCnT.d.mts +70 -0
  491. package/dist/types-DbUfMCnT.d.mts.map +1 -0
  492. package/dist/upstash-adapter-D96Caq2O.mjs +22 -0
  493. package/dist/upstash-adapter-D96Caq2O.mjs.map +1 -0
  494. package/dist/upstash-adapter-DD4433dx.d.mts +8 -0
  495. package/dist/upstash-adapter-DD4433dx.d.mts.map +1 -0
  496. package/dist/utils-BlYhcD6M.mjs +319 -0
  497. package/dist/utils-BlYhcD6M.mjs.map +1 -0
  498. package/dist/utils-DpJGOb3y.d.mts +120 -0
  499. package/dist/utils-DpJGOb3y.d.mts.map +1 -0
  500. package/dist/vercel-blob-adapter-CkOXLT2D.mjs +25 -0
  501. package/dist/vercel-blob-adapter-CkOXLT2D.mjs.map +1 -0
  502. package/dist/xai-CbV_dCnP.mjs +1600 -0
  503. package/dist/xai-CbV_dCnP.mjs.map +1 -0
  504. package/package.json +479 -0
  505. package/src/agents/base/factory.ts +382 -0
  506. package/src/agents/base/index.ts +8 -0
  507. package/src/agents/base/schemas.ts +117 -0
  508. package/src/agents/base/types.ts +192 -0
  509. package/src/agents/control-flow/index.ts +683 -0
  510. package/src/agents/coordinator/coordinator-agent.ts +381 -0
  511. package/src/agents/coordinator/index.ts +6 -0
  512. package/src/agents/default-agent.ts +211 -0
  513. package/src/agents/evaluator-optimizer/README.md +612 -0
  514. package/src/agents/evaluator-optimizer/evaluator-optimizer.example.ts +437 -0
  515. package/src/agents/evaluator-optimizer/evaluator.ts +282 -0
  516. package/src/agents/evaluator-optimizer/index.test.ts +416 -0
  517. package/src/agents/evaluator-optimizer/index.ts +519 -0
  518. package/src/agents/evaluator-optimizer/optimizer.ts +322 -0
  519. package/src/agents/evaluator-optimizer/schema.ts +302 -0
  520. package/src/agents/evaluator-optimizer/utils.ts +42 -0
  521. package/src/agents/experimental/index.ts +1095 -0
  522. package/src/agents/experimental/types.ts +212 -0
  523. package/src/agents/fallback/index.ts +18 -0
  524. package/src/agents/fallback/recovery/circuit-breaker.ts +166 -0
  525. package/src/agents/fallback/strategies/model-fallback.ts +192 -0
  526. package/src/agents/fallback/types.ts +87 -0
  527. package/src/agents/governance-agent.ts +446 -0
  528. package/src/agents/index.ts +79 -0
  529. package/src/agents/multi/coordination/index.ts +6 -0
  530. package/src/agents/multi/coordination/message-bus.ts +144 -0
  531. package/src/agents/multi/index.ts +6 -0
  532. package/src/agents/multi/state/index.ts +162 -0
  533. package/src/agents/multi/supervisor/index.ts +7 -0
  534. package/src/agents/multi/supervisor/supervisor.ts +254 -0
  535. package/src/agents/multi/swarm/aggregation.ts +466 -0
  536. package/src/agents/multi/swarm/communication.ts +388 -0
  537. package/src/agents/multi/swarm/coordination.ts +380 -0
  538. package/src/agents/multi/swarm/index.ts +73 -0
  539. package/src/agents/multi/swarm/swarm-executor.ts +479 -0
  540. package/src/agents/multi/types.ts +181 -0
  541. package/src/agents/observability/index.ts +914 -0
  542. package/src/agents/orchestrator.ts +218 -0
  543. package/src/agents/patterns/README.md +512 -0
  544. package/src/agents/patterns/evaluator-optimizer-pattern.example.ts +455 -0
  545. package/src/agents/patterns/evaluator-optimizer-pattern.ts +653 -0
  546. package/src/agents/patterns/index.ts +26 -0
  547. package/src/agents/persistence/index.ts +726 -0
  548. package/src/agents/tools/index.ts +291 -0
  549. package/src/agents/tools/mcp.ts +188 -0
  550. package/src/agents/triage/index.ts +6 -0
  551. package/src/agents/triage/triage-agent.ts +280 -0
  552. package/src/agents/workflows/index.ts +6 -0
  553. package/src/agents/workflows/interfaces.ts +36 -0
  554. package/src/agents/workflows/schema.ts +20 -0
  555. package/src/caching/adapters/index.ts +7 -0
  556. package/src/caching/adapters/memory.ts +77 -0
  557. package/src/caching/adapters/redis.ts +60 -0
  558. package/src/caching/index.ts +17 -0
  559. package/src/caching/middleware.ts +452 -0
  560. package/src/caching/strategies/index.ts +1008 -0
  561. package/src/caching/types.ts +47 -0
  562. package/src/catalog.ts +921 -0
  563. package/src/client/chat-usage.ts +53 -0
  564. package/src/client/hooks.ts +343 -0
  565. package/src/client/index.ts +36 -0
  566. package/src/client/message-utils.ts +29 -0
  567. package/src/client/use-generative-ui.ts +174 -0
  568. package/src/client/utils.ts +66 -0
  569. package/src/generative-ui/catalog.ts +653 -0
  570. package/src/generative-ui/index.ts +82 -0
  571. package/src/generative-ui/registry.ts +273 -0
  572. package/src/generative-ui/stream.ts +324 -0
  573. package/src/generative-ui/types.ts +376 -0
  574. package/src/governance/audit/audit-logger.ts +239 -0
  575. package/src/governance/audit/audit-schema.ts +82 -0
  576. package/src/governance/audit/index.ts +6 -0
  577. package/src/governance/compliance/abac/policy-engine.ts +175 -0
  578. package/src/governance/compliance/abac/types.ts +40 -0
  579. package/src/governance/compliance/approval/compliance-approval-queue.ts +217 -0
  580. package/src/governance/compliance/index.ts +16 -0
  581. package/src/governance/compliance/schemas.ts +68 -0
  582. package/src/governance/compliance/types.ts +143 -0
  583. package/src/governance/compliance/validators/phi-detector.ts +145 -0
  584. package/src/governance/compliance/validators/redaction-utils.ts +176 -0
  585. package/src/governance/compliance/validators/safe-harbor.ts +135 -0
  586. package/src/governance/entitlements/index.ts +585 -0
  587. package/src/governance/entitlements/middleware.ts +651 -0
  588. package/src/governance/entitlements/rate-limiter.ts +711 -0
  589. package/src/governance/index.ts +32 -0
  590. package/src/governance/policies/guardrails.ts +1121 -0
  591. package/src/governance/policies/index.ts +42 -0
  592. package/src/governance/policies/loop-controls.ts +136 -0
  593. package/src/governance/policies/telemetry.ts +63 -0
  594. package/src/governance/tenancy/index.ts +30 -0
  595. package/src/governance/tenancy/isolation/context.ts +92 -0
  596. package/src/governance/tenancy/isolation/index.ts +13 -0
  597. package/src/governance/tenancy/quotas/index.ts +11 -0
  598. package/src/governance/tenancy/quotas/quota-manager.ts +180 -0
  599. package/src/governance/tenancy/types.ts +66 -0
  600. package/src/governance/types.ts +16 -0
  601. package/src/governance/versioning/index.ts +573 -0
  602. package/src/grounding/attribution/index.ts +424 -0
  603. package/src/grounding/citation/citation-generator.ts +174 -0
  604. package/src/grounding/citation/index.ts +12 -0
  605. package/src/grounding/context/index.ts +32 -0
  606. package/src/grounding/context/safe-context.ts +116 -0
  607. package/src/grounding/context/types.ts +62 -0
  608. package/src/grounding/context-engineering/error-handling.ts +359 -0
  609. package/src/grounding/context-engineering/index.ts +23 -0
  610. package/src/grounding/context-engineering/memory.ts +559 -0
  611. package/src/grounding/context-engineering/tool-masking.ts +338 -0
  612. package/src/grounding/embed/index.ts +704 -0
  613. package/src/grounding/embed/reranking.ts +604 -0
  614. package/src/grounding/hallucination/index.ts +223 -0
  615. package/src/grounding/index.ts +82 -0
  616. package/src/grounding/proof-map/applyPatch.ts +172 -0
  617. package/src/grounding/proof-map/index.ts +41 -0
  618. package/src/grounding/proof-map/loop.ts +275 -0
  619. package/src/grounding/proof-map/schema.ts +217 -0
  620. package/src/grounding/rag/__tests__/pipeline.test.ts +274 -0
  621. package/src/grounding/rag/__tests__/tool.test.ts +202 -0
  622. package/src/grounding/rag/__tests__/trace.test.ts +229 -0
  623. package/src/grounding/rag/circuit-breaker.ts +152 -0
  624. package/src/grounding/rag/index.ts +64 -0
  625. package/src/grounding/rag/pipeline.ts +602 -0
  626. package/src/grounding/rag/tool.ts +281 -0
  627. package/src/grounding/rag/trace.ts +503 -0
  628. package/src/grounding/rag/types.ts +284 -0
  629. package/src/grounding/retrieval/in-memory-store.ts +107 -0
  630. package/src/grounding/sources/index.ts +943 -0
  631. package/src/grounding/tests/applyPatch.test.ts +194 -0
  632. package/src/grounding/tests/loop.test.ts +141 -0
  633. package/src/grounding/tests/schema.test.ts +160 -0
  634. package/src/grounding/types.ts +100 -0
  635. package/src/grounding/verification/index.ts +419 -0
  636. package/src/hitl/active-learning/index.ts +332 -0
  637. package/src/hitl/annotation/index.ts +362 -0
  638. package/src/hitl/approval/approval-queue.ts +132 -0
  639. package/src/hitl/approval/index.ts +5 -0
  640. package/src/hitl/feedback/index.ts +284 -0
  641. package/src/hitl/index.ts +69 -0
  642. package/src/hitl/review/index.ts +6 -0
  643. package/src/hitl/review/review-trigger.ts +162 -0
  644. package/src/hitl/types.ts +126 -0
  645. package/src/index.ts +125 -0
  646. package/src/integrations/blob-storage/index.ts +7 -0
  647. package/src/integrations/blob-storage/types.ts +28 -0
  648. package/src/integrations/blob-storage/vercel-blob-adapter.ts +35 -0
  649. package/src/integrations/index.ts +15 -0
  650. package/src/integrations/notifications/index.ts +7 -0
  651. package/src/integrations/notifications/log-adapter.ts +30 -0
  652. package/src/integrations/notifications/types.ts +27 -0
  653. package/src/integrations/rate-limit/index.ts +7 -0
  654. package/src/integrations/rate-limit/types.ts +26 -0
  655. package/src/integrations/rate-limit/upstash-adapter.ts +45 -0
  656. package/src/integrations/redis/index.ts +7 -0
  657. package/src/integrations/redis/types.ts +67 -0
  658. package/src/integrations/redis/upstash-adapter.ts +18 -0
  659. package/src/integrations/stream/index.ts +7 -0
  660. package/src/integrations/stream/resumable-adapter.ts +20 -0
  661. package/src/integrations/stream/types.ts +21 -0
  662. package/src/internal/__tests__/hallucination.test.ts +162 -0
  663. package/src/internal/__tests__/models.test.ts +104 -0
  664. package/src/internal/__tests__/sdk-errors.test.ts +201 -0
  665. package/src/internal/__tests__/stop-conditions.test.ts +210 -0
  666. package/src/internal/shared/ai-types.ts +942 -0
  667. package/src/internal/testing/evaluators.ts +575 -0
  668. package/src/internal/testing/index.ts +960 -0
  669. package/src/internal/ui/data-parts.ts +511 -0
  670. package/src/internal/ui/type-guards.ts +344 -0
  671. package/src/internal/ui-factories/__tests__/ui-factories.test.ts +548 -0
  672. package/src/internal/ui-factories/artifact-factory.ts +667 -0
  673. package/src/internal/ui-factories/index.ts +82 -0
  674. package/src/internal/ui-factories/shimmer-manager.ts +220 -0
  675. package/src/internal/ui-factories/status-helpers.ts +149 -0
  676. package/src/internal/ui-factories/tool-renderer.ts +167 -0
  677. package/src/internal/ui-factories/types.ts +235 -0
  678. package/src/models/capabilities.ts +88 -0
  679. package/src/models/index.ts +16 -0
  680. package/src/models/provider-factory.ts +229 -0
  681. package/src/models/providers/anthropic.ts +539 -0
  682. package/src/models/providers/google.ts +354 -0
  683. package/src/models/providers/index.ts +21 -0
  684. package/src/models/providers/openai.ts +346 -0
  685. package/src/models/providers/perplexity.ts +276 -0
  686. package/src/models/providers/shared.ts +90 -0
  687. package/src/models/providers/xai.ts +269 -0
  688. package/src/models/registry.ts +208 -0
  689. package/src/models/routing/index.ts +45 -0
  690. package/src/models/routing/intent-router.ts +143 -0
  691. package/src/models/routing/model-router.ts +300 -0
  692. package/src/models/routing/types.ts +106 -0
  693. package/src/models/types.ts +23 -0
  694. package/src/observability/analytics/index.ts +593 -0
  695. package/src/observability/cost/index.ts +16 -0
  696. package/src/observability/cost/tracking/budget-guard.ts +110 -0
  697. package/src/observability/cost/tracking/usage-tracker.ts +120 -0
  698. package/src/observability/cost/types.ts +85 -0
  699. package/src/observability/index.ts +17 -0
  700. package/src/observability/telemetry/index.ts +508 -0
  701. package/src/observability/tracing/index.ts +30 -0
  702. package/src/observability/tracing/otel/ai-instrumentation.ts +193 -0
  703. package/src/observability/tracing/otel/exporters/console.ts +58 -0
  704. package/src/observability/tracing/otel/exporters/index.ts +6 -0
  705. package/src/observability/tracing/provenance.ts +769 -0
  706. package/src/observability/tracing/types.ts +92 -0
  707. package/src/output/__tests__/output.test.ts +737 -0
  708. package/src/output/element-stream.ts +678 -0
  709. package/src/output/errors.ts +108 -0
  710. package/src/output/factories.ts +392 -0
  711. package/src/output/index.ts +98 -0
  712. package/src/output/multimodal/EXPORTS.md +306 -0
  713. package/src/output/multimodal/IMPLEMENTATION_SUMMARY.md +421 -0
  714. package/src/output/multimodal/README.md +349 -0
  715. package/src/output/multimodal/SETUP_GUIDE.md +472 -0
  716. package/src/output/multimodal/audio.ts +650 -0
  717. package/src/output/multimodal/image.ts +22 -0
  718. package/src/output/multimodal/index.ts +32 -0
  719. package/src/output/multimodal/providers.example.ts +375 -0
  720. package/src/output/validator.ts +495 -0
  721. package/src/pipelines/adapters/trace-storage-blob.ts +458 -0
  722. package/src/pipelines/adapters/trace-storage-memory.ts +319 -0
  723. package/src/pipelines/defaults.ts +109 -0
  724. package/src/pipelines/index.ts +24 -0
  725. package/src/pipelines/message-transforms.ts +107 -0
  726. package/src/pipelines/multi-step-wrapper.ts +433 -0
  727. package/src/pipelines/pipeline-presets.ts +339 -0
  728. package/src/pipelines/step-executor.ts +257 -0
  729. package/src/pipelines/storage-factory.ts +85 -0
  730. package/src/pipelines/trace-storage-interface.ts +216 -0
  731. package/src/pipelines/types.ts +255 -0
  732. package/src/pipelines/validation.ts +323 -0
  733. package/src/prompts/index.ts +271 -0
  734. package/src/prompts/model-variants.ts +410 -0
  735. package/src/prompts/templates.ts +327 -0
  736. package/src/sdk/errors/base.ts +296 -0
  737. package/src/sdk/errors/index.ts +31 -0
  738. package/src/sdk/errors/utils.ts +148 -0
  739. package/src/sdk/experimental/index.ts +286 -0
  740. package/src/sdk/index.ts +25 -0
  741. package/src/sdk/middleware/ai-middleware.ts +95 -0
  742. package/src/sdk/middleware/cache.ts +154 -0
  743. package/src/sdk/middleware/circuit-breaker.ts +388 -0
  744. package/src/sdk/middleware/compose.ts +81 -0
  745. package/src/sdk/middleware/deduplication.ts +307 -0
  746. package/src/sdk/middleware/index.ts +660 -0
  747. package/src/sdk/middleware/model-middleware.ts +200 -0
  748. package/src/sdk/stop-conditions/conditions.ts +209 -0
  749. package/src/sdk/stop-conditions/index.ts +35 -0
  750. package/src/sdk/stop-conditions/types.ts +59 -0
  751. package/src/security/guardrails/index.ts +6 -0
  752. package/src/security/guardrails/middleware.ts +465 -0
  753. package/src/security/guardrails/pii-filter.ts +396 -0
  754. package/src/security/index.ts +33 -0
  755. package/src/security/injection/index.ts +5 -0
  756. package/src/security/injection/prompt-injection.ts +64 -0
  757. package/src/security/types.ts +85 -0
  758. package/src/server/cache/crypto.ts +47 -0
  759. package/src/server/cache/performance.ts +79 -0
  760. package/src/server/error-handler.ts +93 -0
  761. package/src/server/errors.ts +73 -0
  762. package/src/server/helpers.ts +944 -0
  763. package/src/server/http.ts +156 -0
  764. package/src/server/index.ts +12 -0
  765. package/src/server/messages/__tests__/messages.test.ts +720 -0
  766. package/src/server/messages/converter.ts +245 -0
  767. package/src/server/messages/data-parts.ts +338 -0
  768. package/src/server/messages/extraction.ts +328 -0
  769. package/src/server/messages/index.ts +126 -0
  770. package/src/server/messages/types.ts +355 -0
  771. package/src/server/messages/window.ts +450 -0
  772. package/src/server/rate-limit/env.ts +8 -0
  773. package/src/server/rate-limit/rate-limit.ts +165 -0
  774. package/src/server/routes/HEALTH_CHECK.md +502 -0
  775. package/src/server/routes/IMPLEMENTATION_SUMMARY.md +432 -0
  776. package/src/server/routes/QUICK_START.md +327 -0
  777. package/src/server/routes/README.md +357 -0
  778. package/src/server/routes/__tests__/routes.test.ts +628 -0
  779. package/src/server/routes/agent-route.ts +224 -0
  780. package/src/server/routes/agent-routes.ts +191 -0
  781. package/src/server/routes/embed-config.ts +181 -0
  782. package/src/server/routes/health-check.example.ts +507 -0
  783. package/src/server/routes/health-check.test.ts +533 -0
  784. package/src/server/routes/health-check.ts +639 -0
  785. package/src/server/routes/health-check.types.ts +217 -0
  786. package/src/server/routes/index.ts +32 -0
  787. package/src/server/routes/types.ts +274 -0
  788. package/src/shared/__tests__/schemas.test.ts +317 -0
  789. package/src/shared/ai-runtime.ts +139 -0
  790. package/src/shared/ai-types.ts +133 -0
  791. package/src/shared/index.ts +30 -0
  792. package/src/shared/sdk-runtime.ts +198 -0
  793. package/src/shared/sdk-types.ts +301 -0
  794. package/src/streaming/control/__tests__/streaming-control.test.ts +708 -0
  795. package/src/streaming/control/budget-guard.ts +264 -0
  796. package/src/streaming/control/controller.ts +255 -0
  797. package/src/streaming/control/index.ts +105 -0
  798. package/src/streaming/control/smoothing.ts +201 -0
  799. package/src/streaming/control/step-limit.ts +215 -0
  800. package/src/streaming/control/types.ts +234 -0
  801. package/src/streaming/core/auto-resume.ts +276 -0
  802. package/src/streaming/core/index.ts +85 -0
  803. package/src/streaming/core/multi-step.ts +471 -0
  804. package/src/streaming/core/protocol.ts +194 -0
  805. package/src/streaming/core/types.ts +182 -0
  806. package/src/streaming/index.ts +97 -0
  807. package/src/streaming/infra/backpressure/buffer.ts +210 -0
  808. package/src/streaming/infra/backpressure/index.ts +6 -0
  809. package/src/streaming/infra/index.ts +75 -0
  810. package/src/streaming/infra/multiplexing/index.ts +311 -0
  811. package/src/streaming/infra/resilience/index.ts +684 -0
  812. package/src/streaming/infra/transform/index.ts +15 -0
  813. package/src/streaming/infra/transform/stream-transforms.ts +166 -0
  814. package/src/streaming/infra/transport/index.ts +774 -0
  815. package/src/streaming/infra/types.ts +118 -0
  816. package/src/streaming/infra-extra/types.ts +118 -0
  817. package/src/tools/advanced/caching.ts +299 -0
  818. package/src/tools/advanced/generator.ts +267 -0
  819. package/src/tools/advanced/hitl.ts +251 -0
  820. package/src/tools/advanced/index.ts +9 -0
  821. package/src/tools/advanced/llm-tool.ts +208 -0
  822. package/src/tools/approval/FILES.md +449 -0
  823. package/src/tools/approval/IMPLEMENTATION_SUMMARY.md +567 -0
  824. package/src/tools/approval/QUICK_START.md +362 -0
  825. package/src/tools/approval/README.md +514 -0
  826. package/src/tools/approval/advanced-approval-queue.ts +7 -0
  827. package/src/tools/approval/approval.example.ts +571 -0
  828. package/src/tools/approval/in-memory-queue.ts +405 -0
  829. package/src/tools/approval/index.ts +737 -0
  830. package/src/tools/approval/middleware.ts +590 -0
  831. package/src/tools/approval/queue-factory.ts +162 -0
  832. package/src/tools/approval/redis-queue.ts +327 -0
  833. package/src/tools/approval/testing.ts +493 -0
  834. package/src/tools/approval/types.ts +221 -0
  835. package/src/tools/approval/with-approval.ts +366 -0
  836. package/src/tools/artifacts/artifact-tools.ts +273 -0
  837. package/src/tools/artifacts/index.ts +6 -0
  838. package/src/tools/compliance/compliance-wrapper.ts +789 -0
  839. package/src/tools/compliance/create-compliant-stream.ts +226 -0
  840. package/src/tools/compliance/index.ts +8 -0
  841. package/src/tools/compliance/phi-redaction.ts +406 -0
  842. package/src/tools/compliance/tool-wrapper.ts +306 -0
  843. package/src/tools/computer/index.ts +99 -0
  844. package/src/tools/computer/types.ts +41 -0
  845. package/src/tools/core/abort.ts +202 -0
  846. package/src/tools/core/factory.ts +197 -0
  847. package/src/tools/core/index.ts +8 -0
  848. package/src/tools/core/tool-safety.ts +112 -0
  849. package/src/tools/generic/index.ts +9 -0
  850. package/src/tools/generic/json-schema-tool.ts +301 -0
  851. package/src/tools/generic/tiptap-context.ts +619 -0
  852. package/src/tools/generic/web-search-tool.ts +82 -0
  853. package/src/tools/generic/web-search.ts +142 -0
  854. package/src/tools/index.ts +36 -0
  855. package/src/tools/mcp/ai-sdk-error-integration.ts +401 -0
  856. package/src/tools/mcp/client.ts +988 -0
  857. package/src/tools/mcp/connection-manager.ts +380 -0
  858. package/src/tools/mcp/connection-pool.ts +408 -0
  859. package/src/tools/mcp/edge-runtime.ts +318 -0
  860. package/src/tools/mcp/environment.ts +310 -0
  861. package/src/tools/mcp/index.ts +20 -0
  862. package/src/tools/mcp/next-pattern.ts +401 -0
  863. package/src/tools/mcp/stream-lifecycle-integration.ts +617 -0
  864. package/src/tools/mcp/tool-cache.ts +359 -0
  865. package/src/tools/mcp/transport-selector.ts +492 -0
  866. package/src/tools/mcp/transports.ts +99 -0
  867. package/src/tools/simple-factory.ts +55 -0
  868. package/src/tools/superpowers/index.ts +122 -0
  869. package/src/tools/superpowers/prompts/index.ts +533 -0
  870. package/src/tools/superpowers/schemas/index.ts +701 -0
  871. package/src/tools/superpowers/tools/index.ts +721 -0
  872. package/src/tools/validation-wrapper.ts +97 -0
@@ -0,0 +1,2615 @@
1
+ import { z } from "zod";
2
+ import * as ai from "ai";
3
+
4
+ //#region src/tools/superpowers/schemas/index.d.ts
5
+ declare const BrainstormOutputSchema: z.ZodObject<{
6
+ analysis: z.ZodObject<{
7
+ ambiguityScore: z.ZodNumber;
8
+ missingContext: z.ZodArray<z.ZodString>;
9
+ assumptions: z.ZodArray<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ clarifyingQuestions: z.ZodArray<z.ZodObject<{
12
+ question: z.ZodString;
13
+ priority: z.ZodEnum<{
14
+ critical: "critical";
15
+ important: "important";
16
+ "nice-to-have": "nice-to-have";
17
+ }>;
18
+ context: z.ZodString;
19
+ }, z.core.$strip>>;
20
+ edgeCases: z.ZodArray<z.ZodObject<{
21
+ scenario: z.ZodString;
22
+ risk: z.ZodEnum<{
23
+ low: "low";
24
+ medium: "medium";
25
+ high: "high";
26
+ }>;
27
+ mitigation: z.ZodOptional<z.ZodString>;
28
+ }, z.core.$strip>>;
29
+ approaches: z.ZodArray<z.ZodObject<{
30
+ name: z.ZodString;
31
+ description: z.ZodString;
32
+ pros: z.ZodArray<z.ZodString>;
33
+ cons: z.ZodArray<z.ZodString>;
34
+ techStackRecommendation: z.ZodOptional<z.ZodString>;
35
+ estimatedComplexity: z.ZodEnum<{
36
+ simple: "simple";
37
+ moderate: "moderate";
38
+ complex: "complex";
39
+ }>;
40
+ }, z.core.$strip>>;
41
+ }, z.core.$strip>;
42
+ declare const PlanOutputSchema: z.ZodObject<{
43
+ summary: z.ZodString;
44
+ riskAnalysis: z.ZodArray<z.ZodObject<{
45
+ risk: z.ZodString;
46
+ severity: z.ZodEnum<{
47
+ critical: "critical";
48
+ low: "low";
49
+ medium: "medium";
50
+ high: "high";
51
+ }>;
52
+ mitigation: z.ZodString;
53
+ }, z.core.$strip>>;
54
+ dependencies: z.ZodArray<z.ZodObject<{
55
+ name: z.ZodString;
56
+ type: z.ZodEnum<{
57
+ file: "file";
58
+ package: "package";
59
+ service: "service";
60
+ api: "api";
61
+ database: "database";
62
+ }>;
63
+ status: z.ZodEnum<{
64
+ exists: "exists";
65
+ "needs-creation": "needs-creation";
66
+ "needs-modification": "needs-modification";
67
+ }>;
68
+ }, z.core.$strip>>;
69
+ steps: z.ZodArray<z.ZodObject<{
70
+ order: z.ZodNumber;
71
+ title: z.ZodString;
72
+ filePaths: z.ZodArray<z.ZodString>;
73
+ actionType: z.ZodEnum<{
74
+ create: "create";
75
+ modify: "modify";
76
+ delete: "delete";
77
+ refactor: "refactor";
78
+ test: "test";
79
+ configure: "configure";
80
+ }>;
81
+ description: z.ZodString;
82
+ verificationCmd: z.ZodString;
83
+ blockedBy: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
84
+ }, z.core.$strip>>;
85
+ rollbackPlan: z.ZodOptional<z.ZodString>;
86
+ }, z.core.$strip>;
87
+ declare const DesignReviewOutputSchema: z.ZodObject<{
88
+ adheresToConventions: z.ZodBoolean;
89
+ conventionViolations: z.ZodArray<z.ZodObject<{
90
+ convention: z.ZodString;
91
+ violation: z.ZodString;
92
+ severity: z.ZodEnum<{
93
+ moderate: "moderate";
94
+ minor: "minor";
95
+ severe: "severe";
96
+ }>;
97
+ suggestion: z.ZodString;
98
+ }, z.core.$strip>>;
99
+ architecturalConcerns: z.ZodArray<z.ZodObject<{
100
+ concern: z.ZodString;
101
+ impact: z.ZodEnum<{
102
+ low: "low";
103
+ medium: "medium";
104
+ high: "high";
105
+ }>;
106
+ recommendation: z.ZodString;
107
+ }, z.core.$strip>>;
108
+ compatibility: z.ZodObject<{
109
+ backwardsCompatible: z.ZodBoolean;
110
+ breakingChanges: z.ZodArray<z.ZodString>;
111
+ migrationRequired: z.ZodBoolean;
112
+ migrationSteps: z.ZodOptional<z.ZodArray<z.ZodString>>;
113
+ }, z.core.$strip>;
114
+ recommendations: z.ZodArray<z.ZodString>;
115
+ approval: z.ZodEnum<{
116
+ approved: "approved";
117
+ "approved-with-changes": "approved-with-changes";
118
+ rejected: "rejected";
119
+ }>;
120
+ }, z.core.$strip>;
121
+ declare const TDDOutputSchema: z.ZodObject<{
122
+ phase: z.ZodEnum<{
123
+ refactor: "refactor";
124
+ "write-test": "write-test";
125
+ "run-test": "run-test";
126
+ implement: "implement";
127
+ complete: "complete";
128
+ }>;
129
+ testFile: z.ZodOptional<z.ZodObject<{
130
+ path: z.ZodString;
131
+ content: z.ZodString;
132
+ description: z.ZodString;
133
+ }, z.core.$strip>>;
134
+ implementation: z.ZodOptional<z.ZodObject<{
135
+ path: z.ZodString;
136
+ content: z.ZodString;
137
+ description: z.ZodString;
138
+ }, z.core.$strip>>;
139
+ testResult: z.ZodOptional<z.ZodObject<{
140
+ passed: z.ZodBoolean;
141
+ output: z.ZodString;
142
+ failureReason: z.ZodOptional<z.ZodString>;
143
+ }, z.core.$strip>>;
144
+ iteration: z.ZodNumber;
145
+ nextAction: z.ZodString;
146
+ confidence: z.ZodNumber;
147
+ }, z.core.$strip>;
148
+ declare const CodeReviewOutputSchema: z.ZodObject<{
149
+ summary: z.ZodObject<{
150
+ overallScore: z.ZodNumber;
151
+ recommendation: z.ZodEnum<{
152
+ approve: "approve";
153
+ "request-changes": "request-changes";
154
+ "needs-discussion": "needs-discussion";
155
+ }>;
156
+ reviewerConfidence: z.ZodNumber;
157
+ }, z.core.$strip>;
158
+ categories: z.ZodObject<{
159
+ security: z.ZodObject<{
160
+ score: z.ZodNumber;
161
+ issues: z.ZodArray<z.ZodObject<{
162
+ severity: z.ZodEnum<{
163
+ error: "error";
164
+ warning: "warning";
165
+ info: "info";
166
+ critical: "critical";
167
+ }>;
168
+ line: z.ZodOptional<z.ZodNumber>;
169
+ message: z.ZodString;
170
+ suggestion: z.ZodOptional<z.ZodString>;
171
+ }, z.core.$strip>>;
172
+ }, z.core.$strip>;
173
+ performance: z.ZodObject<{
174
+ score: z.ZodNumber;
175
+ issues: z.ZodArray<z.ZodObject<{
176
+ severity: z.ZodEnum<{
177
+ error: "error";
178
+ warning: "warning";
179
+ info: "info";
180
+ }>;
181
+ line: z.ZodOptional<z.ZodNumber>;
182
+ message: z.ZodString;
183
+ suggestion: z.ZodOptional<z.ZodString>;
184
+ }, z.core.$strip>>;
185
+ }, z.core.$strip>;
186
+ maintainability: z.ZodObject<{
187
+ score: z.ZodNumber;
188
+ issues: z.ZodArray<z.ZodObject<{
189
+ severity: z.ZodEnum<{
190
+ error: "error";
191
+ warning: "warning";
192
+ info: "info";
193
+ }>;
194
+ line: z.ZodOptional<z.ZodNumber>;
195
+ message: z.ZodString;
196
+ suggestion: z.ZodOptional<z.ZodString>;
197
+ }, z.core.$strip>>;
198
+ }, z.core.$strip>;
199
+ testCoverage: z.ZodObject<{
200
+ score: z.ZodNumber;
201
+ missingTests: z.ZodArray<z.ZodString>;
202
+ }, z.core.$strip>;
203
+ }, z.core.$strip>;
204
+ antiPatterns: z.ZodArray<z.ZodObject<{
205
+ name: z.ZodString;
206
+ location: z.ZodString;
207
+ description: z.ZodString;
208
+ suggestedFix: z.ZodString;
209
+ }, z.core.$strip>>;
210
+ positives: z.ZodArray<z.ZodString>;
211
+ }, z.core.$strip>;
212
+ declare const AntiPatternOutputSchema: z.ZodObject<{
213
+ detected: z.ZodBoolean;
214
+ patterns: z.ZodArray<z.ZodObject<{
215
+ name: z.ZodString;
216
+ severity: z.ZodEnum<{
217
+ moderate: "moderate";
218
+ minor: "minor";
219
+ severe: "severe";
220
+ }>;
221
+ location: z.ZodObject<{
222
+ file: z.ZodString;
223
+ line: z.ZodOptional<z.ZodNumber>;
224
+ snippet: z.ZodOptional<z.ZodString>;
225
+ }, z.core.$strip>;
226
+ description: z.ZodString;
227
+ why: z.ZodString;
228
+ fix: z.ZodString;
229
+ category: z.ZodEnum<{
230
+ security: "security";
231
+ hardcoding: "hardcoding";
232
+ "error-swallowing": "error-swallowing";
233
+ "magic-numbers": "magic-numbers";
234
+ "god-object": "god-object";
235
+ "over-engineering": "over-engineering";
236
+ "premature-optimization": "premature-optimization";
237
+ "copy-paste": "copy-paste";
238
+ other: "other";
239
+ }>;
240
+ }, z.core.$strip>>;
241
+ score: z.ZodNumber;
242
+ }, z.core.$strip>;
243
+ declare const SystematicDebuggingOutputSchema: z.ZodObject<{
244
+ phase: z.ZodEnum<{
245
+ implementation: "implementation";
246
+ investigation: "investigation";
247
+ "pattern-analysis": "pattern-analysis";
248
+ "hypothesis-testing": "hypothesis-testing";
249
+ }>;
250
+ investigation: z.ZodObject<{
251
+ errorMessages: z.ZodArray<z.ZodString>;
252
+ reproductionSteps: z.ZodArray<z.ZodString>;
253
+ recentChanges: z.ZodArray<z.ZodString>;
254
+ dataFlowTrace: z.ZodString;
255
+ failurePoint: z.ZodString;
256
+ rootCauseHypothesis: z.ZodString;
257
+ }, z.core.$strip>;
258
+ patternAnalysis: z.ZodOptional<z.ZodObject<{
259
+ workingCodeExamples: z.ZodArray<z.ZodString>;
260
+ differences: z.ZodArray<z.ZodString>;
261
+ missingDependencies: z.ZodArray<z.ZodString>;
262
+ }, z.core.$strip>>;
263
+ hypothesis: z.ZodOptional<z.ZodObject<{
264
+ statement: z.ZodString;
265
+ testPlan: z.ZodString;
266
+ result: z.ZodOptional<z.ZodEnum<{
267
+ rejected: "rejected";
268
+ confirmed: "confirmed";
269
+ inconclusive: "inconclusive";
270
+ }>>;
271
+ iterations: z.ZodNumber;
272
+ }, z.core.$strip>>;
273
+ fix: z.ZodOptional<z.ZodObject<{
274
+ testCase: z.ZodString;
275
+ implementation: z.ZodString;
276
+ verification: z.ZodString;
277
+ }, z.core.$strip>>;
278
+ confidence: z.ZodNumber;
279
+ redFlags: z.ZodArray<z.ZodString>;
280
+ }, z.core.$strip>;
281
+ declare const RootCauseTracingOutputSchema: z.ZodObject<{
282
+ symptom: z.ZodString;
283
+ traceSteps: z.ZodArray<z.ZodObject<{
284
+ layer: z.ZodString;
285
+ component: z.ZodString;
286
+ finding: z.ZodString;
287
+ isRootCause: z.ZodBoolean;
288
+ }, z.core.$strip>>;
289
+ rootCause: z.ZodObject<{
290
+ location: z.ZodString;
291
+ description: z.ZodString;
292
+ category: z.ZodEnum<{
293
+ other: "other";
294
+ "logic-error": "logic-error";
295
+ "data-corruption": "data-corruption";
296
+ "race-condition": "race-condition";
297
+ "missing-validation": "missing-validation";
298
+ configuration: "configuration";
299
+ dependency: "dependency";
300
+ "resource-exhaustion": "resource-exhaustion";
301
+ }>;
302
+ }, z.core.$strip>;
303
+ contributingFactors: z.ZodArray<z.ZodString>;
304
+ preventionRecommendations: z.ZodArray<z.ZodString>;
305
+ }, z.core.$strip>;
306
+ declare const DefenseInDepthOutputSchema: z.ZodObject<{
307
+ layers: z.ZodArray<z.ZodObject<{
308
+ name: z.ZodString;
309
+ type: z.ZodEnum<{
310
+ "input-validation": "input-validation";
311
+ authentication: "authentication";
312
+ authorization: "authorization";
313
+ encryption: "encryption";
314
+ logging: "logging";
315
+ "rate-limiting": "rate-limiting";
316
+ "error-handling": "error-handling";
317
+ backup: "backup";
318
+ }>;
319
+ status: z.ZodEnum<{
320
+ present: "present";
321
+ missing: "missing";
322
+ partial: "partial";
323
+ }>;
324
+ strength: z.ZodEnum<{
325
+ strong: "strong";
326
+ adequate: "adequate";
327
+ weak: "weak";
328
+ }>;
329
+ recommendations: z.ZodArray<z.ZodString>;
330
+ }, z.core.$strip>>;
331
+ overallScore: z.ZodNumber;
332
+ criticalGaps: z.ZodArray<z.ZodString>;
333
+ redundancyAnalysis: z.ZodObject<{
334
+ hasRedundancy: z.ZodBoolean;
335
+ singlePointsOfFailure: z.ZodArray<z.ZodString>;
336
+ }, z.core.$strip>;
337
+ gaps: z.ZodArray<z.ZodObject<{
338
+ name: z.ZodString;
339
+ severity: z.ZodEnum<{
340
+ critical: "critical";
341
+ low: "low";
342
+ medium: "medium";
343
+ high: "high";
344
+ }>;
345
+ recommendation: z.ZodString;
346
+ }, z.core.$strip>>;
347
+ recommendations: z.ZodArray<z.ZodString>;
348
+ }, z.core.$strip>;
349
+ declare const AsyncPatternsOutputSchema: z.ZodObject<{
350
+ asyncOperations: z.ZodArray<z.ZodObject<{
351
+ description: z.ZodString;
352
+ type: z.ZodEnum<{
353
+ network: "network";
354
+ timer: "timer";
355
+ animation: "animation";
356
+ "state-change": "state-change";
357
+ "dom-update": "dom-update";
358
+ "file-io": "file-io";
359
+ }>;
360
+ waitStrategy: z.ZodEnum<{
361
+ promise: "promise";
362
+ polling: "polling";
363
+ "event-listener": "event-listener";
364
+ callback: "callback";
365
+ observable: "observable";
366
+ }>;
367
+ condition: z.ZodString;
368
+ timeout: z.ZodNumber;
369
+ fallback: z.ZodString;
370
+ }, z.core.$strip>>;
371
+ raceConditions: z.ZodArray<z.ZodObject<{
372
+ description: z.ZodString;
373
+ location: z.ZodString;
374
+ fix: z.ZodString;
375
+ }, z.core.$strip>>;
376
+ antiPatterns: z.ZodArray<z.ZodObject<{
377
+ pattern: z.ZodString;
378
+ location: z.ZodString;
379
+ betterApproach: z.ZodString;
380
+ }, z.core.$strip>>;
381
+ recommendations: z.ZodArray<z.ZodString>;
382
+ }, z.core.$strip>;
383
+ declare const PlanExecutionOutputSchema: z.ZodObject<{
384
+ planId: z.ZodString;
385
+ currentStep: z.ZodNumber;
386
+ totalSteps: z.ZodNumber;
387
+ status: z.ZodEnum<{
388
+ completed: "completed";
389
+ failed: "failed";
390
+ "in-progress": "in-progress";
391
+ checkpoint: "checkpoint";
392
+ blocked: "blocked";
393
+ }>;
394
+ executedSteps: z.ZodArray<z.ZodObject<{
395
+ stepNumber: z.ZodNumber;
396
+ title: z.ZodString;
397
+ status: z.ZodEnum<{
398
+ completed: "completed";
399
+ failed: "failed";
400
+ skipped: "skipped";
401
+ }>;
402
+ output: z.ZodOptional<z.ZodString>;
403
+ verificationResult: z.ZodOptional<z.ZodString>;
404
+ duration: z.ZodOptional<z.ZodNumber>;
405
+ }, z.core.$strip>>;
406
+ checkpoint: z.ZodOptional<z.ZodObject<{
407
+ reason: z.ZodString;
408
+ question: z.ZodString;
409
+ options: z.ZodArray<z.ZodString>;
410
+ }, z.core.$strip>>;
411
+ blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
412
+ nextAction: z.ZodString;
413
+ }, z.core.$strip>;
414
+ declare const AgentDispatchOutputSchema: z.ZodObject<{
415
+ taskDecomposition: z.ZodArray<z.ZodObject<{
416
+ taskId: z.ZodString;
417
+ description: z.ZodString;
418
+ dependencies: z.ZodArray<z.ZodString>;
419
+ estimatedDuration: z.ZodString;
420
+ agentType: z.ZodEnum<{
421
+ test: "test";
422
+ implement: "implement";
423
+ brainstorm: "brainstorm";
424
+ plan: "plan";
425
+ review: "review";
426
+ document: "document";
427
+ }>;
428
+ }, z.core.$strip>>;
429
+ parallelGroups: z.ZodArray<z.ZodObject<{
430
+ groupId: z.ZodString;
431
+ tasks: z.ZodArray<z.ZodString>;
432
+ completionCondition: z.ZodEnum<{
433
+ any: "any";
434
+ all: "all";
435
+ majority: "majority";
436
+ }>;
437
+ }, z.core.$strip>>;
438
+ executionOrder: z.ZodArray<z.ZodString>;
439
+ coordinationStrategy: z.ZodEnum<{
440
+ "fork-join": "fork-join";
441
+ pipeline: "pipeline";
442
+ "scatter-gather": "scatter-gather";
443
+ choreography: "choreography";
444
+ }>;
445
+ mergeStrategy: z.ZodString;
446
+ }, z.core.$strip>;
447
+ declare const SubagentDevOutputSchema: z.ZodObject<{
448
+ phase: z.ZodEnum<{
449
+ complete: "complete";
450
+ iteration: "iteration";
451
+ setup: "setup";
452
+ "quality-gate": "quality-gate";
453
+ integration: "integration";
454
+ }>;
455
+ status: z.ZodEnum<{
456
+ success: "success";
457
+ running: "running";
458
+ failed: "failed";
459
+ pending: "pending";
460
+ }>;
461
+ iteration: z.ZodObject<{
462
+ number: z.ZodNumber;
463
+ objective: z.ZodString;
464
+ agentAssignments: z.ZodArray<z.ZodObject<{
465
+ agentId: z.ZodString;
466
+ role: z.ZodString;
467
+ task: z.ZodString;
468
+ status: z.ZodEnum<{
469
+ running: "running";
470
+ completed: "completed";
471
+ failed: "failed";
472
+ pending: "pending";
473
+ }>;
474
+ }, z.core.$strip>>;
475
+ }, z.core.$strip>;
476
+ qualityGates: z.ZodArray<z.ZodObject<{
477
+ name: z.ZodString;
478
+ criteria: z.ZodString;
479
+ passed: z.ZodOptional<z.ZodBoolean>;
480
+ blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
481
+ }, z.core.$strip>>;
482
+ artifacts: z.ZodArray<z.ZodObject<{
483
+ type: z.ZodEnum<{
484
+ code: "code";
485
+ test: "test";
486
+ documentation: "documentation";
487
+ config: "config";
488
+ }>;
489
+ path: z.ZodString;
490
+ status: z.ZodEnum<{
491
+ created: "created";
492
+ modified: "modified";
493
+ verified: "verified";
494
+ }>;
495
+ }, z.core.$strip>>;
496
+ nextIteration: z.ZodOptional<z.ZodString>;
497
+ }, z.core.$strip>;
498
+ declare const CodeReviewResponseOutputSchema: z.ZodObject<{
499
+ reviewId: z.ZodString;
500
+ allAddressed: z.ZodBoolean;
501
+ updatedCode: z.ZodOptional<z.ZodString>;
502
+ feedbackItems: z.ZodArray<z.ZodObject<{
503
+ id: z.ZodString;
504
+ type: z.ZodEnum<{
505
+ question: "question";
506
+ suggestion: "suggestion";
507
+ bug: "bug";
508
+ nitpick: "nitpick";
509
+ praise: "praise";
510
+ }>;
511
+ severity: z.ZodEnum<{
512
+ critical: "critical";
513
+ minor: "minor";
514
+ major: "major";
515
+ trivial: "trivial";
516
+ }>;
517
+ comment: z.ZodString;
518
+ file: z.ZodOptional<z.ZodString>;
519
+ line: z.ZodOptional<z.ZodNumber>;
520
+ response: z.ZodOptional<z.ZodObject<{
521
+ action: z.ZodEnum<{
522
+ rejected: "rejected";
523
+ accepted: "accepted";
524
+ discussed: "discussed";
525
+ deferred: "deferred";
526
+ }>;
527
+ explanation: z.ZodString;
528
+ implementation: z.ZodOptional<z.ZodString>;
529
+ }, z.core.$strip>>;
530
+ }, z.core.$strip>>;
531
+ summary: z.ZodObject<{
532
+ totalItems: z.ZodNumber;
533
+ addressed: z.ZodNumber;
534
+ deferred: z.ZodNumber;
535
+ rejected: z.ZodNumber;
536
+ }, z.core.$strip>;
537
+ followUpQuestions: z.ZodArray<z.ZodString>;
538
+ }, z.core.$strip>;
539
+ declare const CommitAnalysisOutputSchema: z.ZodObject<{
540
+ type: z.ZodEnum<{
541
+ refactor: "refactor";
542
+ test: "test";
543
+ fix: "fix";
544
+ feat: "feat";
545
+ docs: "docs";
546
+ style: "style";
547
+ chore: "chore";
548
+ perf: "perf";
549
+ ci: "ci";
550
+ }>;
551
+ scope: z.ZodOptional<z.ZodString>;
552
+ subject: z.ZodString;
553
+ body: z.ZodOptional<z.ZodString>;
554
+ breakingChange: z.ZodOptional<z.ZodObject<{
555
+ isBreaking: z.ZodBoolean;
556
+ description: z.ZodOptional<z.ZodString>;
557
+ }, z.core.$strip>>;
558
+ fullMessage: z.ZodString;
559
+ confidence: z.ZodNumber;
560
+ relatedIssues: z.ZodOptional<z.ZodArray<z.ZodString>>;
561
+ }, z.core.$strip>;
562
+ declare const WorktreeOutputSchema: z.ZodObject<{
563
+ action: z.ZodEnum<{
564
+ create: "create";
565
+ list: "list";
566
+ remove: "remove";
567
+ switch: "switch";
568
+ }>;
569
+ worktree: z.ZodOptional<z.ZodObject<{
570
+ path: z.ZodString;
571
+ branch: z.ZodString;
572
+ baseBranch: z.ZodOptional<z.ZodString>;
573
+ isClean: z.ZodBoolean;
574
+ }, z.core.$strip>>;
575
+ setup: z.ZodOptional<z.ZodObject<{
576
+ projectType: z.ZodEnum<{
577
+ other: "other";
578
+ nodejs: "nodejs";
579
+ python: "python";
580
+ rust: "rust";
581
+ go: "go";
582
+ java: "java";
583
+ }>;
584
+ dependenciesInstalled: z.ZodBoolean;
585
+ testsRun: z.ZodBoolean;
586
+ testsPassed: z.ZodOptional<z.ZodBoolean>;
587
+ baselineEstablished: z.ZodBoolean;
588
+ }, z.core.$strip>>;
589
+ safetyChecks: z.ZodObject<{
590
+ gitignoreVerified: z.ZodBoolean;
591
+ noUncommittedChanges: z.ZodBoolean;
592
+ branchNameValid: z.ZodBoolean;
593
+ }, z.core.$strip>;
594
+ existingWorktrees: z.ZodOptional<z.ZodArray<z.ZodObject<{
595
+ path: z.ZodString;
596
+ branch: z.ZodString;
597
+ isLocked: z.ZodBoolean;
598
+ }, z.core.$strip>>>;
599
+ }, z.core.$strip>;
600
+ declare const BranchFinishOutputSchema: z.ZodObject<{
601
+ branch: z.ZodString;
602
+ status: z.ZodEnum<{
603
+ ready: "ready";
604
+ "ready-to-merge": "ready-to-merge";
605
+ "ready-for-pr": "ready-for-pr";
606
+ "needs-work": "needs-work";
607
+ merged: "merged";
608
+ abandoned: "abandoned";
609
+ }>;
610
+ preFlightChecks: z.ZodArray<z.ZodObject<{
611
+ check: z.ZodString;
612
+ passed: z.ZodBoolean;
613
+ details: z.ZodOptional<z.ZodString>;
614
+ }, z.core.$strip>>;
615
+ mergeStrategy: z.ZodOptional<z.ZodObject<{
616
+ recommendation: z.ZodEnum<{
617
+ merge: "merge";
618
+ squash: "squash";
619
+ rebase: "rebase";
620
+ }>;
621
+ reason: z.ZodString;
622
+ targetBranch: z.ZodString;
623
+ }, z.core.$strip>>;
624
+ prDetails: z.ZodOptional<z.ZodObject<{
625
+ title: z.ZodString;
626
+ body: z.ZodString;
627
+ labels: z.ZodArray<z.ZodString>;
628
+ reviewers: z.ZodOptional<z.ZodArray<z.ZodString>>;
629
+ }, z.core.$strip>>;
630
+ cleanup: z.ZodObject<{
631
+ localBranchDeleted: z.ZodBoolean;
632
+ remoteBranchDeleted: z.ZodBoolean;
633
+ worktreeRemoved: z.ZodOptional<z.ZodBoolean>;
634
+ }, z.core.$strip>;
635
+ }, z.core.$strip>;
636
+ declare const SkillWriteOutputSchema: z.ZodObject<{
637
+ skillName: z.ZodString;
638
+ implementation: z.ZodOptional<z.ZodString>;
639
+ skillDefinition: z.ZodObject<{
640
+ purpose: z.ZodString;
641
+ corePrinciple: z.ZodString;
642
+ phases: z.ZodArray<z.ZodObject<{
643
+ name: z.ZodString;
644
+ activities: z.ZodArray<z.ZodString>;
645
+ successCriterion: z.ZodString;
646
+ }, z.core.$strip>>;
647
+ redFlags: z.ZodArray<z.ZodString>;
648
+ integrationPoints: z.ZodObject<{
649
+ calledBy: z.ZodArray<z.ZodString>;
650
+ pairsWith: z.ZodArray<z.ZodString>;
651
+ }, z.core.$strip>;
652
+ }, z.core.$strip>;
653
+ outputSchema: z.ZodString;
654
+ systemPrompt: z.ZodString;
655
+ exampleUsage: z.ZodString;
656
+ }, z.core.$strip>;
657
+ declare const SkillTestOutputSchema: z.ZodObject<{
658
+ skillName: z.ZodString;
659
+ passRate: z.ZodNumber;
660
+ testCases: z.ZodArray<z.ZodObject<{
661
+ name: z.ZodString;
662
+ input: z.ZodString;
663
+ expectedBehavior: z.ZodString;
664
+ actualResult: z.ZodOptional<z.ZodString>;
665
+ passed: z.ZodOptional<z.ZodBoolean>;
666
+ }, z.core.$strip>>;
667
+ edgeCases: z.ZodArray<z.ZodObject<{
668
+ scenario: z.ZodString;
669
+ handled: z.ZodBoolean;
670
+ notes: z.ZodOptional<z.ZodString>;
671
+ }, z.core.$strip>>;
672
+ qualityMetrics: z.ZodObject<{
673
+ completeness: z.ZodNumber;
674
+ clarity: z.ZodNumber;
675
+ robustness: z.ZodNumber;
676
+ }, z.core.$strip>;
677
+ recommendations: z.ZodArray<z.ZodString>;
678
+ }, z.core.$strip>;
679
+ declare const SkillShareOutputSchema: z.ZodObject<{
680
+ skillName: z.ZodString;
681
+ exportFormat: z.ZodEnum<{
682
+ markdown: "markdown";
683
+ json: "json";
684
+ yaml: "yaml";
685
+ }>;
686
+ documentation: z.ZodObject<{
687
+ overview: z.ZodString;
688
+ quickStart: z.ZodString;
689
+ fullDocumentation: z.ZodString;
690
+ examples: z.ZodArray<z.ZodString>;
691
+ }, z.core.$strip>;
692
+ compatibility: z.ZodObject<{
693
+ platforms: z.ZodArray<z.ZodEnum<{
694
+ other: "other";
695
+ "claude-code": "claude-code";
696
+ cursor: "cursor";
697
+ windsurf: "windsurf";
698
+ }>>;
699
+ version: z.ZodString;
700
+ dependencies: z.ZodArray<z.ZodString>;
701
+ }, z.core.$strip>;
702
+ distribution: z.ZodObject<{
703
+ method: z.ZodEnum<{
704
+ git: "git";
705
+ npm: "npm";
706
+ manual: "manual";
707
+ marketplace: "marketplace";
708
+ }>;
709
+ location: z.ZodString;
710
+ installInstructions: z.ZodString;
711
+ }, z.core.$strip>;
712
+ }, z.core.$strip>;
713
+ declare const SuperpowersIntroOutputSchema: z.ZodObject<{
714
+ availableSuperpowers: z.ZodArray<z.ZodObject<{
715
+ name: z.ZodString;
716
+ category: z.ZodEnum<{
717
+ git: "git";
718
+ planning: "planning";
719
+ debugging: "debugging";
720
+ quality: "quality";
721
+ workflow: "workflow";
722
+ meta: "meta";
723
+ }>;
724
+ description: z.ZodString;
725
+ whenToUse: z.ZodString;
726
+ }, z.core.$strip>>;
727
+ recommendedWorkflow: z.ZodArray<z.ZodObject<{
728
+ step: z.ZodNumber;
729
+ superpower: z.ZodString;
730
+ purpose: z.ZodString;
731
+ }, z.core.$strip>>;
732
+ corePrinciples: z.ZodArray<z.ZodString>;
733
+ antiPatterns: z.ZodArray<z.ZodObject<{
734
+ pattern: z.ZodString;
735
+ why: z.ZodString;
736
+ instead: z.ZodString;
737
+ }, z.core.$strip>>;
738
+ }, z.core.$strip>;
739
+ type BrainstormOutput = z.infer<typeof BrainstormOutputSchema>;
740
+ type PlanOutput = z.infer<typeof PlanOutputSchema>;
741
+ type DesignReviewOutput = z.infer<typeof DesignReviewOutputSchema>;
742
+ type TDDOutput = z.infer<typeof TDDOutputSchema>;
743
+ type CodeReviewOutput = z.infer<typeof CodeReviewOutputSchema>;
744
+ type AntiPatternOutput = z.infer<typeof AntiPatternOutputSchema>;
745
+ type SystematicDebuggingOutput = z.infer<typeof SystematicDebuggingOutputSchema>;
746
+ type RootCauseTracingOutput = z.infer<typeof RootCauseTracingOutputSchema>;
747
+ type DefenseInDepthOutput = z.infer<typeof DefenseInDepthOutputSchema>;
748
+ type AsyncPatternsOutput = z.infer<typeof AsyncPatternsOutputSchema>;
749
+ type PlanExecutionOutput = z.infer<typeof PlanExecutionOutputSchema>;
750
+ type AgentDispatchOutput = z.infer<typeof AgentDispatchOutputSchema>;
751
+ type SubagentDevOutput = z.infer<typeof SubagentDevOutputSchema>;
752
+ type CodeReviewResponseOutput = z.infer<typeof CodeReviewResponseOutputSchema>;
753
+ type CommitAnalysisOutput = z.infer<typeof CommitAnalysisOutputSchema>;
754
+ type WorktreeOutput = z.infer<typeof WorktreeOutputSchema>;
755
+ type BranchFinishOutput = z.infer<typeof BranchFinishOutputSchema>;
756
+ type SkillWriteOutput = z.infer<typeof SkillWriteOutputSchema>;
757
+ type SkillTestOutput = z.infer<typeof SkillTestOutputSchema>;
758
+ type SkillShareOutput = z.infer<typeof SkillShareOutputSchema>;
759
+ type SuperpowersIntroOutput = z.infer<typeof SuperpowersIntroOutputSchema>;
760
+ //#endregion
761
+ //#region src/tools/superpowers/prompts/index.d.ts
762
+ declare const BRAINSTORM_SYSTEM_PROMPT = "You are a Senior Product Manager and System Analyst.\nYour goal is NOT to solve the problem, but to EXPLORE it deeply.\n\n## Your Responsibilities:\n1. Challenge assumptions - don't accept requirements at face value\n2. Identify edge cases the user might have missed\n3. Propose 3 distinct approaches (Conservative, Balanced, Ambitious)\n4. Generate clarifying questions that MUST be answered before coding begins\n5. Consider security, scalability, and maintenance implications\n\n## Output Guidelines:\n- Be specific about what information is missing\n- Prioritize questions by criticality\n- For each approach, clearly state trade-offs\n- Consider both technical and business implications\n- Flag any assumptions you're making";
763
+ declare const PLANNER_SYSTEM_PROMPT = "You are a Principal Software Architect.\nYour goal is to create a safe, incremental implementation plan.\n\n## Your Responsibilities:\n1. Do NOT write the actual code yet - focus on the plan\n2. Identify dependencies and their order\n3. Define verification methods for each step\n4. Consider rollback strategies\n5. Identify potential breaking changes\n\n## Planning Principles:\n- Atomic steps: Each step should be independently verifiable\n- Dependency order: What must exist first?\n- Risk mitigation: How do we minimize blast radius?\n- Testability: How do we know each step works?\n\n## Output Guidelines:\n- Be specific about file paths and actions\n- Include shell commands for verification\n- Consider both happy path and error scenarios\n- Mark steps that require human review";
764
+ declare const DESIGN_REVIEW_SYSTEM_PROMPT = "You are a Design Review Expert evaluating proposed changes against project conventions.\n\n## Review Areas:\n1. Convention Adherence: Does it follow project patterns?\n2. Architecture: Does it fit the existing design?\n3. Compatibility: Is it backwards compatible?\n4. Migration: What changes are needed for existing code?\n\n## Review Guidelines:\n- Reference specific conventions being violated\n- Consider the broader system impact\n- Evaluate maintainability implications\n- Suggest alternatives where appropriate";
765
+ declare const TDD_SYSTEM_PROMPT = "You are a Test-Driven Development Coach.\nYour goal is to guide implementation through the Red-Green-Refactor cycle.\n\n## TDD Cycle:\n1. RED: Write a failing test first\n2. GREEN: Write minimal code to pass the test\n3. REFACTOR: Improve code quality without changing behavior\n\n## Your Responsibilities:\n1. Write tests that fail for the right reasons\n2. Keep implementation minimal - just enough to pass\n3. Identify opportunities for refactoring\n4. Ensure tests are meaningful, not just passing\n\n## Output Guidelines:\n- Tests should be readable and document behavior\n- Implementation should be the simplest solution\n- Clearly explain what the test is verifying\n- Flag when refactoring is needed";
766
+ declare const CODE_REVIEW_SYSTEM_PROMPT = "You are a Senior Code Reviewer with expertise in security, performance, and maintainability.\nYour goal is to provide actionable, constructive feedback.\n\n## Review Categories:\n1. Security: XSS, injection, auth issues, data exposure\n2. Performance: N+1 queries, memory leaks, unnecessary re-renders\n3. Maintainability: Complexity, naming, documentation\n4. Test Coverage: Missing tests, edge cases\n\n## Review Principles:\n- Be specific: Reference line numbers and code snippets\n- Be constructive: Suggest fixes, don't just criticize\n- Be prioritized: Critical issues first\n- Be fair: Acknowledge good practices\n\n## Output Guidelines:\n- Score each category 0-100\n- Provide actionable suggestions\n- Identify anti-patterns with fixes\n- Note positive patterns to encourage";
767
+ declare const ANTI_PATTERN_SYSTEM_PROMPT = "You are a Code Quality Analyzer specializing in detecting anti-patterns and code smells.\n\n## Common Anti-Patterns to Detect:\n1. Hardcoding: Magic numbers, hardcoded URLs, embedded credentials\n2. Error Swallowing: Empty catch blocks, ignored errors\n3. God Objects: Classes/modules doing too much\n4. Over-Engineering: Unnecessary abstractions, premature optimization\n5. Copy-Paste Programming: Duplicated code that should be abstracted\n6. Security Issues: SQL injection, XSS vulnerabilities\n\n## Detection Guidelines:\n- Be specific about location (file, line, snippet)\n- Explain WHY something is an anti-pattern\n- Provide concrete fix suggestions\n- Consider context - not everything is an anti-pattern";
768
+ declare const SYSTEMATIC_DEBUGGING_SYSTEM_PROMPT = "You are a Systematic Debugging Expert.\nYour core principle: NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.\n\n## The Four Mandatory Phases:\n\n### Phase 1: Root Cause Investigation\n- Carefully read error messages and stack traces\n- Reproduce the issue consistently\n- Review recent changes (git diffs, commits)\n- Gather diagnostic evidence at component boundaries\n- Trace data flow backward to identify the failure point\nSuccess criterion: Understanding both WHAT failed and WHY\n\n### Phase 2: Pattern Analysis\n- Locate similar working code in the codebase\n- Study reference implementations completely\n- Document every difference between working/broken versions\n- Identify required dependencies and assumptions\nSuccess criterion: Isolate specific differences causing the failure\n\n### Phase 3: Hypothesis and Testing\n- Formulate a single, specific hypothesis in writing\n- Test with minimal changes (one variable at a time)\n- Verify results before proceeding\n- Form new hypotheses if the first fails\nSuccess criterion: Confirmed root cause understanding\n\n### Phase 4: Implementation\n- Create automated failing test case first\n- Implement single targeted fix addressing root cause\n- Verify test passes and no other tests break\n- If 3+ fixes fail: pause and question architectural soundness\nSuccess criterion: Bug resolved with verified test coverage\n\n## Critical Red Flags (Pause Immediately):\n- Planning \"quick fixes\" before investigation\n- Making multiple simultaneous changes\n- Proposing solutions without tracing data flow\n- Attempting fix #4 after 3 failures without architectural review";
769
+ declare const ROOT_CAUSE_TRACING_SYSTEM_PROMPT = "You are a Root Cause Analysis Expert.\nYour goal is to trace symptoms back to their underlying causes.\n\n## Tracing Process:\n1. Document the observed symptom precisely\n2. Work backward through system layers\n3. At each layer, determine if this is THE cause or just a symptom\n4. Continue until you find where the bad state originates\n5. Verify the root cause by checking if fixing it would prevent the symptom\n\n## Layer Analysis:\n- UI Layer: Is the display wrong or is the data wrong?\n- API Layer: Is the response wrong or was the request wrong?\n- Service Layer: Is the logic wrong or is the input wrong?\n- Data Layer: Is the query wrong or is the stored data wrong?\n\n## Output Guidelines:\n- Be specific about file and line locations\n- Distinguish between root causes and contributing factors\n- Recommend prevention measures";
770
+ declare const DEFENSE_IN_DEPTH_SYSTEM_PROMPT = "You are a Security Architecture Expert specializing in defense in depth.\nYour goal is to ensure multiple layers of protection exist.\n\n## Defense Layers to Evaluate:\n1. Input Validation: Is all input sanitized and validated?\n2. Authentication: Is identity verified correctly?\n3. Authorization: Are permissions checked at every level?\n4. Encryption: Is sensitive data encrypted at rest and in transit?\n5. Logging: Are security events logged for audit?\n6. Rate Limiting: Are abuse protections in place?\n7. Error Handling: Do errors leak sensitive information?\n8. Backup: Can the system recover from attacks?\n\n## Evaluation Criteria:\n- Each layer should function independently\n- Failure of one layer should not compromise the system\n- No single point of failure should exist\n- Redundancy should exist for critical protections";
771
+ declare const CONDITION_BASED_WAITING_SYSTEM_PROMPT = "You are an Async Testing Expert specializing in condition-based waiting.\nYour goal is to identify and fix flaky async patterns in tests.\n\n## Common Anti-Patterns:\n- Fixed delays (setTimeout, sleep)\n- Race conditions in assertions\n- Missing await statements\n- Polling without timeouts\n- Assuming operation order\n\n## Correct Patterns:\n- Wait for specific conditions to be true\n- Use retry logic with exponential backoff\n- Set reasonable timeouts with clear failure messages\n- Use framework-specific waiting utilities\n- Assert on observable state, not implementation details\n\n## Output Guidelines:\n- Identify each async operation and its wait strategy\n- Flag any hardcoded delays\n- Recommend condition-based alternatives";
772
+ declare const EXECUTING_PLANS_SYSTEM_PROMPT = "You are a Plan Execution Coordinator.\nYour goal is to execute implementation plans step by step with human checkpoints.\n\n## Execution Principles:\n1. Execute one step at a time\n2. Verify each step before proceeding\n3. Stop at checkpoints for human review\n4. Report blockers immediately\n5. Never skip verification steps\n\n## Checkpoint Triggers:\n- Destructive operations (delete, overwrite)\n- External service interactions\n- Security-sensitive changes\n- Breaking changes to APIs\n- After completing logical groups of steps\n\n## Output Guidelines:\n- Report progress clearly\n- Include verification results\n- Ask specific questions at checkpoints\n- Provide clear options for human decisions";
773
+ declare const DISPATCHING_AGENTS_SYSTEM_PROMPT = "You are a Parallel Agent Coordinator.\nYour goal is to decompose tasks and coordinate parallel execution.\n\n## Task Decomposition:\n1. Identify independent subtasks\n2. Map dependencies between tasks\n3. Group tasks that can run in parallel\n4. Define completion conditions for each group\n\n## Coordination Strategies:\n- Fork-Join: Split work, wait for all to complete\n- Pipeline: Output of one feeds input of next\n- Scatter-Gather: Distribute work, collect results\n- Choreography: Agents coordinate directly\n\n## Output Guidelines:\n- Define clear task boundaries\n- Specify merge strategies for parallel results\n- Handle partial failures gracefully";
774
+ declare const SUBAGENT_DRIVEN_DEV_SYSTEM_PROMPT = "You are a Subagent-Driven Development Coordinator.\nYour goal is to coordinate fast iteration cycles with quality gates.\n\n## Development Cycle:\n1. Setup: Create isolated workspace\n2. Iteration: Assign tasks to specialized agents\n3. Quality Gate: Verify all quality criteria met\n4. Integration: Merge results into main codebase\n\n## Agent Roles:\n- Implementer: Writes code\n- Tester: Writes and runs tests\n- Reviewer: Reviews code quality\n- Documenter: Updates documentation\n\n## Quality Gates:\n- All tests pass\n- Code review approved\n- No security issues\n- Documentation updated\n\n## Output Guidelines:\n- Track iteration progress\n- Report quality gate status\n- Coordinate agent handoffs";
775
+ declare const RECEIVING_CODE_REVIEW_SYSTEM_PROMPT = "You are a Code Review Response Expert.\nYour goal is to process feedback constructively and respond appropriately.\n\n## Response Process:\n1. Categorize each feedback item (bug, suggestion, nitpick)\n2. Assess severity (critical, major, minor, trivial)\n3. Decide action (accept, reject, discuss, defer)\n4. Implement accepted changes\n5. Explain rejections respectfully\n\n## Response Guidelines:\n- Thank reviewers for their time\n- Accept valid criticism gracefully\n- Explain your reasoning for rejections\n- Ask clarifying questions when needed\n- Don't argue over nitpicks\n\n## Output Guidelines:\n- Track each feedback item\n- Document your response and reasoning\n- Identify follow-up questions";
776
+ declare const COMMIT_ANALYSIS_SYSTEM_PROMPT = "You are a Git Commit Message Expert following Conventional Commits specification.\n\n## Commit Types:\n- feat: New feature for the user\n- fix: Bug fix for the user\n- docs: Documentation only changes\n- style: Formatting, missing semicolons, etc.\n- refactor: Code change that neither fixes a bug nor adds a feature\n- test: Adding missing tests or correcting existing tests\n- chore: Maintenance tasks, dependency updates\n- perf: Performance improvements\n- ci: CI/CD configuration changes\n\n## Message Guidelines:\n- Subject: Imperative mood, max 50 chars, no period\n- Body: Explain WHAT and WHY, not HOW\n- Use present tense (\"add\" not \"added\")\n- Reference issues/PRs when relevant\n\n## Output Guidelines:\n- Analyze the actual changes, not just file names\n- Determine the most appropriate type\n- Identify if it's a breaking change\n- Write a clear, professional commit message";
777
+ declare const GIT_WORKTREE_SYSTEM_PROMPT = "You are a Git Worktree Expert.\nYour goal is to manage isolated workspaces for feature development.\n\n## Worktree Setup:\n1. Select appropriate directory (.worktrees preferred)\n2. Verify .gitignore contains worktree pattern\n3. Create worktree with feature branch\n4. Auto-detect project type\n5. Install dependencies\n6. Run baseline tests\n\n## Safety Checks:\n- Never create worktrees in tracked directories\n- Always verify .gitignore before creation\n- Check for uncommitted changes\n- Validate branch names\n\n## Output Guidelines:\n- Report worktree location\n- Include test baseline status\n- Confirm feature readiness";
778
+ declare const FINISHING_BRANCH_SYSTEM_PROMPT = "You are a Branch Completion Expert.\nYour goal is to safely complete and merge development branches.\n\n## Pre-Flight Checks:\n1. All tests pass\n2. Code review approved\n3. No merge conflicts\n4. Documentation updated\n5. Changelog updated\n\n## Merge Strategies:\n- Merge: Preserves history, good for features\n- Squash: Clean history, good for small changes\n- Rebase: Linear history, good for hotfixes\n\n## Cleanup:\n1. Delete local branch\n2. Delete remote branch\n3. Remove worktree if used\n\n## Output Guidelines:\n- Report pre-flight status\n- Recommend merge strategy\n- Generate PR details if needed";
779
+ declare const WRITING_SKILLS_SYSTEM_PROMPT = "You are a Skill Definition Expert.\nYour goal is to create well-structured, reusable superpowers.\n\n## Skill Structure:\n1. Purpose: What problem does this skill solve?\n2. Core Principle: The key rule that guides this skill\n3. Phases: Sequential steps with success criteria\n4. Red Flags: Warning signs of misuse\n5. Integration Points: How it connects to other skills\n\n## Quality Criteria:\n- Clear, actionable instructions\n- Measurable success criteria\n- Appropriate scope (not too broad/narrow)\n- Well-defined output schema\n\n## Output Guidelines:\n- Provide complete skill definition\n- Include Zod schema\n- Include system prompt\n- Include usage examples";
780
+ declare const TESTING_SKILLS_SYSTEM_PROMPT = "You are a Skill Testing Expert.\nYour goal is to validate skill quality through comprehensive testing.\n\n## Test Categories:\n1. Happy Path: Does it work for normal inputs?\n2. Edge Cases: Does it handle unusual inputs?\n3. Error Cases: Does it fail gracefully?\n4. Integration: Does it work with other skills?\n\n## Quality Metrics:\n- Completeness: Are all phases covered?\n- Clarity: Are instructions unambiguous?\n- Robustness: Does it handle edge cases?\n\n## Output Guidelines:\n- Document test cases and results\n- Identify quality gaps\n- Recommend improvements";
781
+ declare const SHARING_SKILLS_SYSTEM_PROMPT = "You are a Skill Distribution Expert.\nYour goal is to package skills for sharing across teams and platforms.\n\n## Documentation Requirements:\n- Overview: What the skill does\n- Quick Start: Minimal usage example\n- Full Documentation: Complete reference\n- Examples: Real-world usage scenarios\n\n## Compatibility:\n- Target platforms (Claude Code, Cursor, etc.)\n- Version requirements\n- Dependencies\n\n## Distribution Methods:\n- Git repository\n- NPM package\n- Manual installation\n- Marketplace";
782
+ declare const USING_SUPERPOWERS_SYSTEM_PROMPT = "You are a Superpowers Framework Expert.\nYour goal is to introduce and guide usage of the superpowers system.\n\n## Core Principles:\n1. Think before you act - always plan first\n2. Test-driven development - tests before code\n3. Systematic over ad-hoc - follow processes\n4. Evidence over claims - verify everything\n\n## Recommended Workflow:\n1. Brainstorm: Explore requirements\n2. Plan: Create implementation plan\n3. Execute: Follow plan with checkpoints\n4. Review: Quality check all code\n5. Finish: Complete and merge\n\n## Anti-Patterns:\n- Jumping straight to code\n- Skipping tests\n- Making assumptions\n- Ignoring review feedback";
783
+ declare const systemPrompts: {
784
+ readonly brainstorm: "You are a Senior Product Manager and System Analyst.\nYour goal is NOT to solve the problem, but to EXPLORE it deeply.\n\n## Your Responsibilities:\n1. Challenge assumptions - don't accept requirements at face value\n2. Identify edge cases the user might have missed\n3. Propose 3 distinct approaches (Conservative, Balanced, Ambitious)\n4. Generate clarifying questions that MUST be answered before coding begins\n5. Consider security, scalability, and maintenance implications\n\n## Output Guidelines:\n- Be specific about what information is missing\n- Prioritize questions by criticality\n- For each approach, clearly state trade-offs\n- Consider both technical and business implications\n- Flag any assumptions you're making";
785
+ readonly planner: "You are a Principal Software Architect.\nYour goal is to create a safe, incremental implementation plan.\n\n## Your Responsibilities:\n1. Do NOT write the actual code yet - focus on the plan\n2. Identify dependencies and their order\n3. Define verification methods for each step\n4. Consider rollback strategies\n5. Identify potential breaking changes\n\n## Planning Principles:\n- Atomic steps: Each step should be independently verifiable\n- Dependency order: What must exist first?\n- Risk mitigation: How do we minimize blast radius?\n- Testability: How do we know each step works?\n\n## Output Guidelines:\n- Be specific about file paths and actions\n- Include shell commands for verification\n- Consider both happy path and error scenarios\n- Mark steps that require human review";
786
+ readonly designReview: "You are a Design Review Expert evaluating proposed changes against project conventions.\n\n## Review Areas:\n1. Convention Adherence: Does it follow project patterns?\n2. Architecture: Does it fit the existing design?\n3. Compatibility: Is it backwards compatible?\n4. Migration: What changes are needed for existing code?\n\n## Review Guidelines:\n- Reference specific conventions being violated\n- Consider the broader system impact\n- Evaluate maintainability implications\n- Suggest alternatives where appropriate";
787
+ readonly tdd: "You are a Test-Driven Development Coach.\nYour goal is to guide implementation through the Red-Green-Refactor cycle.\n\n## TDD Cycle:\n1. RED: Write a failing test first\n2. GREEN: Write minimal code to pass the test\n3. REFACTOR: Improve code quality without changing behavior\n\n## Your Responsibilities:\n1. Write tests that fail for the right reasons\n2. Keep implementation minimal - just enough to pass\n3. Identify opportunities for refactoring\n4. Ensure tests are meaningful, not just passing\n\n## Output Guidelines:\n- Tests should be readable and document behavior\n- Implementation should be the simplest solution\n- Clearly explain what the test is verifying\n- Flag when refactoring is needed";
788
+ readonly codeReview: "You are a Senior Code Reviewer with expertise in security, performance, and maintainability.\nYour goal is to provide actionable, constructive feedback.\n\n## Review Categories:\n1. Security: XSS, injection, auth issues, data exposure\n2. Performance: N+1 queries, memory leaks, unnecessary re-renders\n3. Maintainability: Complexity, naming, documentation\n4. Test Coverage: Missing tests, edge cases\n\n## Review Principles:\n- Be specific: Reference line numbers and code snippets\n- Be constructive: Suggest fixes, don't just criticize\n- Be prioritized: Critical issues first\n- Be fair: Acknowledge good practices\n\n## Output Guidelines:\n- Score each category 0-100\n- Provide actionable suggestions\n- Identify anti-patterns with fixes\n- Note positive patterns to encourage";
789
+ readonly antiPattern: "You are a Code Quality Analyzer specializing in detecting anti-patterns and code smells.\n\n## Common Anti-Patterns to Detect:\n1. Hardcoding: Magic numbers, hardcoded URLs, embedded credentials\n2. Error Swallowing: Empty catch blocks, ignored errors\n3. God Objects: Classes/modules doing too much\n4. Over-Engineering: Unnecessary abstractions, premature optimization\n5. Copy-Paste Programming: Duplicated code that should be abstracted\n6. Security Issues: SQL injection, XSS vulnerabilities\n\n## Detection Guidelines:\n- Be specific about location (file, line, snippet)\n- Explain WHY something is an anti-pattern\n- Provide concrete fix suggestions\n- Consider context - not everything is an anti-pattern";
790
+ readonly systematicDebugging: "You are a Systematic Debugging Expert.\nYour core principle: NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.\n\n## The Four Mandatory Phases:\n\n### Phase 1: Root Cause Investigation\n- Carefully read error messages and stack traces\n- Reproduce the issue consistently\n- Review recent changes (git diffs, commits)\n- Gather diagnostic evidence at component boundaries\n- Trace data flow backward to identify the failure point\nSuccess criterion: Understanding both WHAT failed and WHY\n\n### Phase 2: Pattern Analysis\n- Locate similar working code in the codebase\n- Study reference implementations completely\n- Document every difference between working/broken versions\n- Identify required dependencies and assumptions\nSuccess criterion: Isolate specific differences causing the failure\n\n### Phase 3: Hypothesis and Testing\n- Formulate a single, specific hypothesis in writing\n- Test with minimal changes (one variable at a time)\n- Verify results before proceeding\n- Form new hypotheses if the first fails\nSuccess criterion: Confirmed root cause understanding\n\n### Phase 4: Implementation\n- Create automated failing test case first\n- Implement single targeted fix addressing root cause\n- Verify test passes and no other tests break\n- If 3+ fixes fail: pause and question architectural soundness\nSuccess criterion: Bug resolved with verified test coverage\n\n## Critical Red Flags (Pause Immediately):\n- Planning \"quick fixes\" before investigation\n- Making multiple simultaneous changes\n- Proposing solutions without tracing data flow\n- Attempting fix #4 after 3 failures without architectural review";
791
+ readonly rootCauseTracing: "You are a Root Cause Analysis Expert.\nYour goal is to trace symptoms back to their underlying causes.\n\n## Tracing Process:\n1. Document the observed symptom precisely\n2. Work backward through system layers\n3. At each layer, determine if this is THE cause or just a symptom\n4. Continue until you find where the bad state originates\n5. Verify the root cause by checking if fixing it would prevent the symptom\n\n## Layer Analysis:\n- UI Layer: Is the display wrong or is the data wrong?\n- API Layer: Is the response wrong or was the request wrong?\n- Service Layer: Is the logic wrong or is the input wrong?\n- Data Layer: Is the query wrong or is the stored data wrong?\n\n## Output Guidelines:\n- Be specific about file and line locations\n- Distinguish between root causes and contributing factors\n- Recommend prevention measures";
792
+ readonly defenseInDepth: "You are a Security Architecture Expert specializing in defense in depth.\nYour goal is to ensure multiple layers of protection exist.\n\n## Defense Layers to Evaluate:\n1. Input Validation: Is all input sanitized and validated?\n2. Authentication: Is identity verified correctly?\n3. Authorization: Are permissions checked at every level?\n4. Encryption: Is sensitive data encrypted at rest and in transit?\n5. Logging: Are security events logged for audit?\n6. Rate Limiting: Are abuse protections in place?\n7. Error Handling: Do errors leak sensitive information?\n8. Backup: Can the system recover from attacks?\n\n## Evaluation Criteria:\n- Each layer should function independently\n- Failure of one layer should not compromise the system\n- No single point of failure should exist\n- Redundancy should exist for critical protections";
793
+ readonly conditionBasedWaiting: "You are an Async Testing Expert specializing in condition-based waiting.\nYour goal is to identify and fix flaky async patterns in tests.\n\n## Common Anti-Patterns:\n- Fixed delays (setTimeout, sleep)\n- Race conditions in assertions\n- Missing await statements\n- Polling without timeouts\n- Assuming operation order\n\n## Correct Patterns:\n- Wait for specific conditions to be true\n- Use retry logic with exponential backoff\n- Set reasonable timeouts with clear failure messages\n- Use framework-specific waiting utilities\n- Assert on observable state, not implementation details\n\n## Output Guidelines:\n- Identify each async operation and its wait strategy\n- Flag any hardcoded delays\n- Recommend condition-based alternatives";
794
+ readonly executingPlans: "You are a Plan Execution Coordinator.\nYour goal is to execute implementation plans step by step with human checkpoints.\n\n## Execution Principles:\n1. Execute one step at a time\n2. Verify each step before proceeding\n3. Stop at checkpoints for human review\n4. Report blockers immediately\n5. Never skip verification steps\n\n## Checkpoint Triggers:\n- Destructive operations (delete, overwrite)\n- External service interactions\n- Security-sensitive changes\n- Breaking changes to APIs\n- After completing logical groups of steps\n\n## Output Guidelines:\n- Report progress clearly\n- Include verification results\n- Ask specific questions at checkpoints\n- Provide clear options for human decisions";
795
+ readonly dispatchingAgents: "You are a Parallel Agent Coordinator.\nYour goal is to decompose tasks and coordinate parallel execution.\n\n## Task Decomposition:\n1. Identify independent subtasks\n2. Map dependencies between tasks\n3. Group tasks that can run in parallel\n4. Define completion conditions for each group\n\n## Coordination Strategies:\n- Fork-Join: Split work, wait for all to complete\n- Pipeline: Output of one feeds input of next\n- Scatter-Gather: Distribute work, collect results\n- Choreography: Agents coordinate directly\n\n## Output Guidelines:\n- Define clear task boundaries\n- Specify merge strategies for parallel results\n- Handle partial failures gracefully";
796
+ readonly subagentDrivenDev: "You are a Subagent-Driven Development Coordinator.\nYour goal is to coordinate fast iteration cycles with quality gates.\n\n## Development Cycle:\n1. Setup: Create isolated workspace\n2. Iteration: Assign tasks to specialized agents\n3. Quality Gate: Verify all quality criteria met\n4. Integration: Merge results into main codebase\n\n## Agent Roles:\n- Implementer: Writes code\n- Tester: Writes and runs tests\n- Reviewer: Reviews code quality\n- Documenter: Updates documentation\n\n## Quality Gates:\n- All tests pass\n- Code review approved\n- No security issues\n- Documentation updated\n\n## Output Guidelines:\n- Track iteration progress\n- Report quality gate status\n- Coordinate agent handoffs";
797
+ readonly receivingCodeReview: "You are a Code Review Response Expert.\nYour goal is to process feedback constructively and respond appropriately.\n\n## Response Process:\n1. Categorize each feedback item (bug, suggestion, nitpick)\n2. Assess severity (critical, major, minor, trivial)\n3. Decide action (accept, reject, discuss, defer)\n4. Implement accepted changes\n5. Explain rejections respectfully\n\n## Response Guidelines:\n- Thank reviewers for their time\n- Accept valid criticism gracefully\n- Explain your reasoning for rejections\n- Ask clarifying questions when needed\n- Don't argue over nitpicks\n\n## Output Guidelines:\n- Track each feedback item\n- Document your response and reasoning\n- Identify follow-up questions";
798
+ readonly commitAnalysis: "You are a Git Commit Message Expert following Conventional Commits specification.\n\n## Commit Types:\n- feat: New feature for the user\n- fix: Bug fix for the user\n- docs: Documentation only changes\n- style: Formatting, missing semicolons, etc.\n- refactor: Code change that neither fixes a bug nor adds a feature\n- test: Adding missing tests or correcting existing tests\n- chore: Maintenance tasks, dependency updates\n- perf: Performance improvements\n- ci: CI/CD configuration changes\n\n## Message Guidelines:\n- Subject: Imperative mood, max 50 chars, no period\n- Body: Explain WHAT and WHY, not HOW\n- Use present tense (\"add\" not \"added\")\n- Reference issues/PRs when relevant\n\n## Output Guidelines:\n- Analyze the actual changes, not just file names\n- Determine the most appropriate type\n- Identify if it's a breaking change\n- Write a clear, professional commit message";
799
+ readonly gitWorktree: "You are a Git Worktree Expert.\nYour goal is to manage isolated workspaces for feature development.\n\n## Worktree Setup:\n1. Select appropriate directory (.worktrees preferred)\n2. Verify .gitignore contains worktree pattern\n3. Create worktree with feature branch\n4. Auto-detect project type\n5. Install dependencies\n6. Run baseline tests\n\n## Safety Checks:\n- Never create worktrees in tracked directories\n- Always verify .gitignore before creation\n- Check for uncommitted changes\n- Validate branch names\n\n## Output Guidelines:\n- Report worktree location\n- Include test baseline status\n- Confirm feature readiness";
800
+ readonly finishingBranch: "You are a Branch Completion Expert.\nYour goal is to safely complete and merge development branches.\n\n## Pre-Flight Checks:\n1. All tests pass\n2. Code review approved\n3. No merge conflicts\n4. Documentation updated\n5. Changelog updated\n\n## Merge Strategies:\n- Merge: Preserves history, good for features\n- Squash: Clean history, good for small changes\n- Rebase: Linear history, good for hotfixes\n\n## Cleanup:\n1. Delete local branch\n2. Delete remote branch\n3. Remove worktree if used\n\n## Output Guidelines:\n- Report pre-flight status\n- Recommend merge strategy\n- Generate PR details if needed";
801
+ readonly writingSkills: "You are a Skill Definition Expert.\nYour goal is to create well-structured, reusable superpowers.\n\n## Skill Structure:\n1. Purpose: What problem does this skill solve?\n2. Core Principle: The key rule that guides this skill\n3. Phases: Sequential steps with success criteria\n4. Red Flags: Warning signs of misuse\n5. Integration Points: How it connects to other skills\n\n## Quality Criteria:\n- Clear, actionable instructions\n- Measurable success criteria\n- Appropriate scope (not too broad/narrow)\n- Well-defined output schema\n\n## Output Guidelines:\n- Provide complete skill definition\n- Include Zod schema\n- Include system prompt\n- Include usage examples";
802
+ readonly testingSkills: "You are a Skill Testing Expert.\nYour goal is to validate skill quality through comprehensive testing.\n\n## Test Categories:\n1. Happy Path: Does it work for normal inputs?\n2. Edge Cases: Does it handle unusual inputs?\n3. Error Cases: Does it fail gracefully?\n4. Integration: Does it work with other skills?\n\n## Quality Metrics:\n- Completeness: Are all phases covered?\n- Clarity: Are instructions unambiguous?\n- Robustness: Does it handle edge cases?\n\n## Output Guidelines:\n- Document test cases and results\n- Identify quality gaps\n- Recommend improvements";
803
+ readonly sharingSkills: "You are a Skill Distribution Expert.\nYour goal is to package skills for sharing across teams and platforms.\n\n## Documentation Requirements:\n- Overview: What the skill does\n- Quick Start: Minimal usage example\n- Full Documentation: Complete reference\n- Examples: Real-world usage scenarios\n\n## Compatibility:\n- Target platforms (Claude Code, Cursor, etc.)\n- Version requirements\n- Dependencies\n\n## Distribution Methods:\n- Git repository\n- NPM package\n- Manual installation\n- Marketplace";
804
+ readonly usingSuperpowers: "You are a Superpowers Framework Expert.\nYour goal is to introduce and guide usage of the superpowers system.\n\n## Core Principles:\n1. Think before you act - always plan first\n2. Test-driven development - tests before code\n3. Systematic over ad-hoc - follow processes\n4. Evidence over claims - verify everything\n\n## Recommended Workflow:\n1. Brainstorm: Explore requirements\n2. Plan: Create implementation plan\n3. Execute: Follow plan with checkpoints\n4. Review: Quality check all code\n5. Finish: Complete and merge\n\n## Anti-Patterns:\n- Jumping straight to code\n- Skipping tests\n- Making assumptions\n- Ignoring review feedback";
805
+ };
806
+ type SystemPromptKey = keyof typeof systemPrompts;
807
+ //#endregion
808
+ //#region src/tools/superpowers/tools/index.d.ts
809
+ type GenerateValidatedObjectFn = <T>(prompt: string, schema: z.ZodType<T>, options?: {
810
+ system?: string;
811
+ }) => Promise<T>;
812
+ declare function initSuperpowers(deps: {
813
+ generateValidatedObject: GenerateValidatedObjectFn;
814
+ }): void;
815
+ declare const refineRequirements: ai.Tool<{
816
+ rawRequest: string;
817
+ projectContext?: string | undefined;
818
+ existingCode?: string | undefined;
819
+ }, {
820
+ analysis: {
821
+ ambiguityScore: number;
822
+ missingContext: string[];
823
+ assumptions: string[];
824
+ };
825
+ clarifyingQuestions: {
826
+ question: string;
827
+ priority: "critical" | "important" | "nice-to-have";
828
+ context: string;
829
+ }[];
830
+ edgeCases: {
831
+ scenario: string;
832
+ risk: "low" | "medium" | "high";
833
+ mitigation?: string | undefined;
834
+ }[];
835
+ approaches: {
836
+ name: string;
837
+ description: string;
838
+ pros: string[];
839
+ cons: string[];
840
+ estimatedComplexity: "simple" | "moderate" | "complex";
841
+ techStackRecommendation?: string | undefined;
842
+ }[];
843
+ }>;
844
+ declare const consultArchitect: ai.Tool<{
845
+ featureRequest: string;
846
+ currentContext: string;
847
+ constraints?: string[] | undefined;
848
+ existingCode?: string | undefined;
849
+ }, {
850
+ summary: string;
851
+ riskAnalysis: {
852
+ risk: string;
853
+ severity: "critical" | "low" | "medium" | "high";
854
+ mitigation: string;
855
+ }[];
856
+ dependencies: {
857
+ name: string;
858
+ type: "file" | "package" | "service" | "api" | "database";
859
+ status: "exists" | "needs-creation" | "needs-modification";
860
+ }[];
861
+ steps: {
862
+ order: number;
863
+ title: string;
864
+ filePaths: string[];
865
+ actionType: "create" | "modify" | "delete" | "refactor" | "test" | "configure";
866
+ description: string;
867
+ verificationCmd: string;
868
+ blockedBy?: number[] | undefined;
869
+ }[];
870
+ rollbackPlan?: string | undefined;
871
+ }>;
872
+ declare const reviewDesign: ai.Tool<{
873
+ proposedChanges: string;
874
+ conventions: string;
875
+ existingArchitecture?: string | undefined;
876
+ affectedAreas?: string[] | undefined;
877
+ }, {
878
+ adheresToConventions: boolean;
879
+ conventionViolations: {
880
+ convention: string;
881
+ violation: string;
882
+ severity: "moderate" | "minor" | "severe";
883
+ suggestion: string;
884
+ }[];
885
+ architecturalConcerns: {
886
+ concern: string;
887
+ impact: "low" | "medium" | "high";
888
+ recommendation: string;
889
+ }[];
890
+ compatibility: {
891
+ backwardsCompatible: boolean;
892
+ breakingChanges: string[];
893
+ migrationRequired: boolean;
894
+ migrationSteps?: string[] | undefined;
895
+ };
896
+ recommendations: string[];
897
+ approval: "approved" | "approved-with-changes" | "rejected";
898
+ }>;
899
+ declare const runTDDCycle: ai.Tool<{
900
+ feature: string;
901
+ testFramework: "vitest" | "jest" | "mocha" | "playwright";
902
+ targetPath: string;
903
+ iteration: number;
904
+ existingTests?: string | undefined;
905
+ previousResult?: string | undefined;
906
+ }, {
907
+ phase: "refactor" | "write-test" | "run-test" | "implement" | "complete";
908
+ iteration: number;
909
+ nextAction: string;
910
+ confidence: number;
911
+ testFile?: {
912
+ path: string;
913
+ content: string;
914
+ description: string;
915
+ } | undefined;
916
+ implementation?: {
917
+ path: string;
918
+ content: string;
919
+ description: string;
920
+ } | undefined;
921
+ testResult?: {
922
+ passed: boolean;
923
+ output: string;
924
+ failureReason?: string | undefined;
925
+ } | undefined;
926
+ }>;
927
+ declare const reviewCode: ai.Tool<{
928
+ code: string;
929
+ language: "other" | "python" | "rust" | "go" | "java" | "typescript" | "javascript";
930
+ context?: string | undefined;
931
+ projectConventions?: string | undefined;
932
+ focusAreas?: ("security" | "performance" | "maintainability" | "testing")[] | undefined;
933
+ }, {
934
+ summary: {
935
+ overallScore: number;
936
+ recommendation: "approve" | "request-changes" | "needs-discussion";
937
+ reviewerConfidence: number;
938
+ };
939
+ categories: {
940
+ security: {
941
+ score: number;
942
+ issues: {
943
+ severity: "error" | "warning" | "info" | "critical";
944
+ message: string;
945
+ line?: number | undefined;
946
+ suggestion?: string | undefined;
947
+ }[];
948
+ };
949
+ performance: {
950
+ score: number;
951
+ issues: {
952
+ severity: "error" | "warning" | "info";
953
+ message: string;
954
+ line?: number | undefined;
955
+ suggestion?: string | undefined;
956
+ }[];
957
+ };
958
+ maintainability: {
959
+ score: number;
960
+ issues: {
961
+ severity: "error" | "warning" | "info";
962
+ message: string;
963
+ line?: number | undefined;
964
+ suggestion?: string | undefined;
965
+ }[];
966
+ };
967
+ testCoverage: {
968
+ score: number;
969
+ missingTests: string[];
970
+ };
971
+ };
972
+ antiPatterns: {
973
+ name: string;
974
+ location: string;
975
+ description: string;
976
+ suggestedFix: string;
977
+ }[];
978
+ positives: string[];
979
+ }>;
980
+ declare const detectAntiPatterns: ai.Tool<{
981
+ code: string;
982
+ filePath: string;
983
+ language: "other" | "python" | "rust" | "go" | "java" | "typescript" | "javascript";
984
+ strictMode: boolean;
985
+ }, {
986
+ detected: boolean;
987
+ patterns: {
988
+ name: string;
989
+ severity: "moderate" | "minor" | "severe";
990
+ location: {
991
+ file: string;
992
+ line?: number | undefined;
993
+ snippet?: string | undefined;
994
+ };
995
+ description: string;
996
+ why: string;
997
+ fix: string;
998
+ category: "security" | "hardcoding" | "error-swallowing" | "magic-numbers" | "god-object" | "over-engineering" | "premature-optimization" | "copy-paste" | "other";
999
+ }[];
1000
+ score: number;
1001
+ }>;
1002
+ declare const systematicDebug: ai.Tool<{
1003
+ symptom: string;
1004
+ context: string;
1005
+ recentChanges?: string[] | undefined;
1006
+ failingCode?: string | undefined;
1007
+ }, {
1008
+ phase: "implementation" | "investigation" | "pattern-analysis" | "hypothesis-testing";
1009
+ investigation: {
1010
+ errorMessages: string[];
1011
+ reproductionSteps: string[];
1012
+ recentChanges: string[];
1013
+ dataFlowTrace: string;
1014
+ failurePoint: string;
1015
+ rootCauseHypothesis: string;
1016
+ };
1017
+ confidence: number;
1018
+ redFlags: string[];
1019
+ patternAnalysis?: {
1020
+ workingCodeExamples: string[];
1021
+ differences: string[];
1022
+ missingDependencies: string[];
1023
+ } | undefined;
1024
+ hypothesis?: {
1025
+ statement: string;
1026
+ testPlan: string;
1027
+ iterations: number;
1028
+ result?: "rejected" | "confirmed" | "inconclusive" | undefined;
1029
+ } | undefined;
1030
+ fix?: {
1031
+ testCase: string;
1032
+ implementation: string;
1033
+ verification: string;
1034
+ } | undefined;
1035
+ }>;
1036
+ declare const traceRootCause: ai.Tool<{
1037
+ symptom: string;
1038
+ systemLayers: string[];
1039
+ codeContext?: string | undefined;
1040
+ }, {
1041
+ symptom: string;
1042
+ traceSteps: {
1043
+ layer: string;
1044
+ component: string;
1045
+ finding: string;
1046
+ isRootCause: boolean;
1047
+ }[];
1048
+ rootCause: {
1049
+ location: string;
1050
+ description: string;
1051
+ category: "other" | "logic-error" | "data-corruption" | "race-condition" | "missing-validation" | "configuration" | "dependency" | "resource-exhaustion";
1052
+ };
1053
+ contributingFactors: string[];
1054
+ preventionRecommendations: string[];
1055
+ }>;
1056
+ declare const analyzeDefenseInDepth: ai.Tool<{
1057
+ component: string;
1058
+ code: string;
1059
+ threatModel?: string | undefined;
1060
+ }, {
1061
+ layers: {
1062
+ name: string;
1063
+ type: "input-validation" | "authentication" | "authorization" | "encryption" | "logging" | "rate-limiting" | "error-handling" | "backup";
1064
+ status: "present" | "missing" | "partial";
1065
+ strength: "strong" | "adequate" | "weak";
1066
+ recommendations: string[];
1067
+ }[];
1068
+ overallScore: number;
1069
+ criticalGaps: string[];
1070
+ redundancyAnalysis: {
1071
+ hasRedundancy: boolean;
1072
+ singlePointsOfFailure: string[];
1073
+ };
1074
+ gaps: {
1075
+ name: string;
1076
+ severity: "critical" | "low" | "medium" | "high";
1077
+ recommendation: string;
1078
+ }[];
1079
+ recommendations: string[];
1080
+ }>;
1081
+ declare const analyzeAsyncPatterns: ai.Tool<{
1082
+ code: string;
1083
+ framework: "other" | "vitest" | "jest" | "playwright" | "cypress";
1084
+ }, {
1085
+ asyncOperations: {
1086
+ description: string;
1087
+ type: "network" | "timer" | "animation" | "state-change" | "dom-update" | "file-io";
1088
+ waitStrategy: "promise" | "polling" | "event-listener" | "callback" | "observable";
1089
+ condition: string;
1090
+ timeout: number;
1091
+ fallback: string;
1092
+ }[];
1093
+ raceConditions: {
1094
+ description: string;
1095
+ location: string;
1096
+ fix: string;
1097
+ }[];
1098
+ antiPatterns: {
1099
+ pattern: string;
1100
+ location: string;
1101
+ betterApproach: string;
1102
+ }[];
1103
+ recommendations: string[];
1104
+ }>;
1105
+ declare const executePlan: ai.Tool<{
1106
+ plan: string;
1107
+ currentStep: number;
1108
+ previousResults?: string | undefined;
1109
+ }, {
1110
+ planId: string;
1111
+ currentStep: number;
1112
+ totalSteps: number;
1113
+ status: "completed" | "failed" | "in-progress" | "checkpoint" | "blocked";
1114
+ executedSteps: {
1115
+ stepNumber: number;
1116
+ title: string;
1117
+ status: "completed" | "failed" | "skipped";
1118
+ output?: string | undefined;
1119
+ verificationResult?: string | undefined;
1120
+ duration?: number | undefined;
1121
+ }[];
1122
+ nextAction: string;
1123
+ checkpoint?: {
1124
+ reason: string;
1125
+ question: string;
1126
+ options: string[];
1127
+ } | undefined;
1128
+ blockers?: string[] | undefined;
1129
+ }>;
1130
+ declare const dispatchAgents: ai.Tool<{
1131
+ task: string;
1132
+ availableAgents: string[];
1133
+ constraints?: string | undefined;
1134
+ }, {
1135
+ taskDecomposition: {
1136
+ taskId: string;
1137
+ description: string;
1138
+ dependencies: string[];
1139
+ estimatedDuration: string;
1140
+ agentType: "test" | "implement" | "brainstorm" | "plan" | "review" | "document";
1141
+ }[];
1142
+ parallelGroups: {
1143
+ groupId: string;
1144
+ tasks: string[];
1145
+ completionCondition: "any" | "all" | "majority";
1146
+ }[];
1147
+ executionOrder: string[];
1148
+ coordinationStrategy: "fork-join" | "pipeline" | "scatter-gather" | "choreography";
1149
+ mergeStrategy: string;
1150
+ }>;
1151
+ declare const runSubagentDev: ai.Tool<{
1152
+ objective: string;
1153
+ qualityGates: string[];
1154
+ iteration: number;
1155
+ }, {
1156
+ phase: "complete" | "iteration" | "setup" | "quality-gate" | "integration";
1157
+ status: "success" | "running" | "failed" | "pending";
1158
+ iteration: {
1159
+ number: number;
1160
+ objective: string;
1161
+ agentAssignments: {
1162
+ agentId: string;
1163
+ role: string;
1164
+ task: string;
1165
+ status: "running" | "completed" | "failed" | "pending";
1166
+ }[];
1167
+ };
1168
+ qualityGates: {
1169
+ name: string;
1170
+ criteria: string;
1171
+ passed?: boolean | undefined;
1172
+ blockers?: string[] | undefined;
1173
+ }[];
1174
+ artifacts: {
1175
+ type: "code" | "test" | "documentation" | "config";
1176
+ path: string;
1177
+ status: "created" | "modified" | "verified";
1178
+ }[];
1179
+ nextIteration?: string | undefined;
1180
+ }>;
1181
+ declare const processCodeReview: ai.Tool<{
1182
+ feedback: string;
1183
+ originalCode: string;
1184
+ reviewerId?: string | undefined;
1185
+ }, {
1186
+ reviewId: string;
1187
+ allAddressed: boolean;
1188
+ feedbackItems: {
1189
+ id: string;
1190
+ type: "question" | "suggestion" | "bug" | "nitpick" | "praise";
1191
+ severity: "critical" | "minor" | "major" | "trivial";
1192
+ comment: string;
1193
+ file?: string | undefined;
1194
+ line?: number | undefined;
1195
+ response?: {
1196
+ action: "rejected" | "accepted" | "discussed" | "deferred";
1197
+ explanation: string;
1198
+ implementation?: string | undefined;
1199
+ } | undefined;
1200
+ }[];
1201
+ summary: {
1202
+ totalItems: number;
1203
+ addressed: number;
1204
+ deferred: number;
1205
+ rejected: number;
1206
+ };
1207
+ followUpQuestions: string[];
1208
+ updatedCode?: string | undefined;
1209
+ }>;
1210
+ declare const analyzeCommit: ai.Tool<{
1211
+ diff: string;
1212
+ changedFiles: string[];
1213
+ context?: string | undefined;
1214
+ relatedIssue?: string | undefined;
1215
+ }, {
1216
+ type: "refactor" | "test" | "fix" | "feat" | "docs" | "style" | "chore" | "perf" | "ci";
1217
+ subject: string;
1218
+ fullMessage: string;
1219
+ confidence: number;
1220
+ scope?: string | undefined;
1221
+ body?: string | undefined;
1222
+ breakingChange?: {
1223
+ isBreaking: boolean;
1224
+ description?: string | undefined;
1225
+ } | undefined;
1226
+ relatedIssues?: string[] | undefined;
1227
+ }>;
1228
+ declare const manageWorktree: ai.Tool<{
1229
+ action: "create" | "list" | "remove" | "switch";
1230
+ branchName?: string | undefined;
1231
+ baseBranch?: string | undefined;
1232
+ path?: string | undefined;
1233
+ }, {
1234
+ action: "create" | "list" | "remove" | "switch";
1235
+ safetyChecks: {
1236
+ gitignoreVerified: boolean;
1237
+ noUncommittedChanges: boolean;
1238
+ branchNameValid: boolean;
1239
+ };
1240
+ worktree?: {
1241
+ path: string;
1242
+ branch: string;
1243
+ isClean: boolean;
1244
+ baseBranch?: string | undefined;
1245
+ } | undefined;
1246
+ setup?: {
1247
+ projectType: "other" | "nodejs" | "python" | "rust" | "go" | "java";
1248
+ dependenciesInstalled: boolean;
1249
+ testsRun: boolean;
1250
+ baselineEstablished: boolean;
1251
+ testsPassed?: boolean | undefined;
1252
+ } | undefined;
1253
+ existingWorktrees?: {
1254
+ path: string;
1255
+ branch: string;
1256
+ isLocked: boolean;
1257
+ }[] | undefined;
1258
+ }>;
1259
+ declare const finishBranch: ai.Tool<{
1260
+ branchName: string;
1261
+ targetBranch: string;
1262
+ createPR: boolean;
1263
+ }, {
1264
+ branch: string;
1265
+ status: "ready" | "ready-to-merge" | "ready-for-pr" | "needs-work" | "merged" | "abandoned";
1266
+ preFlightChecks: {
1267
+ check: string;
1268
+ passed: boolean;
1269
+ details?: string | undefined;
1270
+ }[];
1271
+ cleanup: {
1272
+ localBranchDeleted: boolean;
1273
+ remoteBranchDeleted: boolean;
1274
+ worktreeRemoved?: boolean | undefined;
1275
+ };
1276
+ mergeStrategy?: {
1277
+ recommendation: "merge" | "squash" | "rebase";
1278
+ reason: string;
1279
+ targetBranch: string;
1280
+ } | undefined;
1281
+ prDetails?: {
1282
+ title: string;
1283
+ body: string;
1284
+ labels: string[];
1285
+ reviewers?: string[] | undefined;
1286
+ } | undefined;
1287
+ }>;
1288
+ declare const writeSkill: ai.Tool<{
1289
+ skillName: string;
1290
+ purpose: string;
1291
+ examples: string[];
1292
+ }, {
1293
+ skillName: string;
1294
+ skillDefinition: {
1295
+ purpose: string;
1296
+ corePrinciple: string;
1297
+ phases: {
1298
+ name: string;
1299
+ activities: string[];
1300
+ successCriterion: string;
1301
+ }[];
1302
+ redFlags: string[];
1303
+ integrationPoints: {
1304
+ calledBy: string[];
1305
+ pairsWith: string[];
1306
+ };
1307
+ };
1308
+ outputSchema: string;
1309
+ systemPrompt: string;
1310
+ exampleUsage: string;
1311
+ implementation?: string | undefined;
1312
+ }>;
1313
+ declare const testSkill: ai.Tool<{
1314
+ skillDefinition: string;
1315
+ testCases: string[];
1316
+ }, {
1317
+ skillName: string;
1318
+ passRate: number;
1319
+ testCases: {
1320
+ name: string;
1321
+ input: string;
1322
+ expectedBehavior: string;
1323
+ actualResult?: string | undefined;
1324
+ passed?: boolean | undefined;
1325
+ }[];
1326
+ edgeCases: {
1327
+ scenario: string;
1328
+ handled: boolean;
1329
+ notes?: string | undefined;
1330
+ }[];
1331
+ qualityMetrics: {
1332
+ completeness: number;
1333
+ clarity: number;
1334
+ robustness: number;
1335
+ };
1336
+ recommendations: string[];
1337
+ }>;
1338
+ declare const shareSkill: ai.Tool<{
1339
+ skillDefinition: string;
1340
+ targetPlatforms: string[];
1341
+ version: string;
1342
+ }, {
1343
+ skillName: string;
1344
+ exportFormat: "markdown" | "json" | "yaml";
1345
+ documentation: {
1346
+ overview: string;
1347
+ quickStart: string;
1348
+ fullDocumentation: string;
1349
+ examples: string[];
1350
+ };
1351
+ compatibility: {
1352
+ platforms: ("other" | "claude-code" | "cursor" | "windsurf")[];
1353
+ version: string;
1354
+ dependencies: string[];
1355
+ };
1356
+ distribution: {
1357
+ method: "git" | "npm" | "manual" | "marketplace";
1358
+ location: string;
1359
+ installInstructions: string;
1360
+ };
1361
+ }>;
1362
+ declare const introduceSuperpowers: ai.Tool<{
1363
+ projectContext: string;
1364
+ userExperience: "beginner" | "intermediate" | "expert";
1365
+ }, {
1366
+ availableSuperpowers: {
1367
+ name: string;
1368
+ category: "git" | "planning" | "debugging" | "quality" | "workflow" | "meta";
1369
+ description: string;
1370
+ whenToUse: string;
1371
+ }[];
1372
+ recommendedWorkflow: {
1373
+ step: number;
1374
+ superpower: string;
1375
+ purpose: string;
1376
+ }[];
1377
+ corePrinciples: string[];
1378
+ antiPatterns: {
1379
+ pattern: string;
1380
+ why: string;
1381
+ instead: string;
1382
+ }[];
1383
+ }>;
1384
+ declare const planningTools: {
1385
+ readonly refineRequirements: ai.Tool<{
1386
+ rawRequest: string;
1387
+ projectContext?: string | undefined;
1388
+ existingCode?: string | undefined;
1389
+ }, {
1390
+ analysis: {
1391
+ ambiguityScore: number;
1392
+ missingContext: string[];
1393
+ assumptions: string[];
1394
+ };
1395
+ clarifyingQuestions: {
1396
+ question: string;
1397
+ priority: "critical" | "important" | "nice-to-have";
1398
+ context: string;
1399
+ }[];
1400
+ edgeCases: {
1401
+ scenario: string;
1402
+ risk: "low" | "medium" | "high";
1403
+ mitigation?: string | undefined;
1404
+ }[];
1405
+ approaches: {
1406
+ name: string;
1407
+ description: string;
1408
+ pros: string[];
1409
+ cons: string[];
1410
+ estimatedComplexity: "simple" | "moderate" | "complex";
1411
+ techStackRecommendation?: string | undefined;
1412
+ }[];
1413
+ }>;
1414
+ readonly consultArchitect: ai.Tool<{
1415
+ featureRequest: string;
1416
+ currentContext: string;
1417
+ constraints?: string[] | undefined;
1418
+ existingCode?: string | undefined;
1419
+ }, {
1420
+ summary: string;
1421
+ riskAnalysis: {
1422
+ risk: string;
1423
+ severity: "critical" | "low" | "medium" | "high";
1424
+ mitigation: string;
1425
+ }[];
1426
+ dependencies: {
1427
+ name: string;
1428
+ type: "file" | "package" | "service" | "api" | "database";
1429
+ status: "exists" | "needs-creation" | "needs-modification";
1430
+ }[];
1431
+ steps: {
1432
+ order: number;
1433
+ title: string;
1434
+ filePaths: string[];
1435
+ actionType: "create" | "modify" | "delete" | "refactor" | "test" | "configure";
1436
+ description: string;
1437
+ verificationCmd: string;
1438
+ blockedBy?: number[] | undefined;
1439
+ }[];
1440
+ rollbackPlan?: string | undefined;
1441
+ }>;
1442
+ readonly reviewDesign: ai.Tool<{
1443
+ proposedChanges: string;
1444
+ conventions: string;
1445
+ existingArchitecture?: string | undefined;
1446
+ affectedAreas?: string[] | undefined;
1447
+ }, {
1448
+ adheresToConventions: boolean;
1449
+ conventionViolations: {
1450
+ convention: string;
1451
+ violation: string;
1452
+ severity: "moderate" | "minor" | "severe";
1453
+ suggestion: string;
1454
+ }[];
1455
+ architecturalConcerns: {
1456
+ concern: string;
1457
+ impact: "low" | "medium" | "high";
1458
+ recommendation: string;
1459
+ }[];
1460
+ compatibility: {
1461
+ backwardsCompatible: boolean;
1462
+ breakingChanges: string[];
1463
+ migrationRequired: boolean;
1464
+ migrationSteps?: string[] | undefined;
1465
+ };
1466
+ recommendations: string[];
1467
+ approval: "approved" | "approved-with-changes" | "rejected";
1468
+ }>;
1469
+ };
1470
+ declare const qualityTools: {
1471
+ readonly runTDDCycle: ai.Tool<{
1472
+ feature: string;
1473
+ testFramework: "vitest" | "jest" | "mocha" | "playwright";
1474
+ targetPath: string;
1475
+ iteration: number;
1476
+ existingTests?: string | undefined;
1477
+ previousResult?: string | undefined;
1478
+ }, {
1479
+ phase: "refactor" | "write-test" | "run-test" | "implement" | "complete";
1480
+ iteration: number;
1481
+ nextAction: string;
1482
+ confidence: number;
1483
+ testFile?: {
1484
+ path: string;
1485
+ content: string;
1486
+ description: string;
1487
+ } | undefined;
1488
+ implementation?: {
1489
+ path: string;
1490
+ content: string;
1491
+ description: string;
1492
+ } | undefined;
1493
+ testResult?: {
1494
+ passed: boolean;
1495
+ output: string;
1496
+ failureReason?: string | undefined;
1497
+ } | undefined;
1498
+ }>;
1499
+ readonly reviewCode: ai.Tool<{
1500
+ code: string;
1501
+ language: "other" | "python" | "rust" | "go" | "java" | "typescript" | "javascript";
1502
+ context?: string | undefined;
1503
+ projectConventions?: string | undefined;
1504
+ focusAreas?: ("security" | "performance" | "maintainability" | "testing")[] | undefined;
1505
+ }, {
1506
+ summary: {
1507
+ overallScore: number;
1508
+ recommendation: "approve" | "request-changes" | "needs-discussion";
1509
+ reviewerConfidence: number;
1510
+ };
1511
+ categories: {
1512
+ security: {
1513
+ score: number;
1514
+ issues: {
1515
+ severity: "error" | "warning" | "info" | "critical";
1516
+ message: string;
1517
+ line?: number | undefined;
1518
+ suggestion?: string | undefined;
1519
+ }[];
1520
+ };
1521
+ performance: {
1522
+ score: number;
1523
+ issues: {
1524
+ severity: "error" | "warning" | "info";
1525
+ message: string;
1526
+ line?: number | undefined;
1527
+ suggestion?: string | undefined;
1528
+ }[];
1529
+ };
1530
+ maintainability: {
1531
+ score: number;
1532
+ issues: {
1533
+ severity: "error" | "warning" | "info";
1534
+ message: string;
1535
+ line?: number | undefined;
1536
+ suggestion?: string | undefined;
1537
+ }[];
1538
+ };
1539
+ testCoverage: {
1540
+ score: number;
1541
+ missingTests: string[];
1542
+ };
1543
+ };
1544
+ antiPatterns: {
1545
+ name: string;
1546
+ location: string;
1547
+ description: string;
1548
+ suggestedFix: string;
1549
+ }[];
1550
+ positives: string[];
1551
+ }>;
1552
+ readonly detectAntiPatterns: ai.Tool<{
1553
+ code: string;
1554
+ filePath: string;
1555
+ language: "other" | "python" | "rust" | "go" | "java" | "typescript" | "javascript";
1556
+ strictMode: boolean;
1557
+ }, {
1558
+ detected: boolean;
1559
+ patterns: {
1560
+ name: string;
1561
+ severity: "moderate" | "minor" | "severe";
1562
+ location: {
1563
+ file: string;
1564
+ line?: number | undefined;
1565
+ snippet?: string | undefined;
1566
+ };
1567
+ description: string;
1568
+ why: string;
1569
+ fix: string;
1570
+ category: "security" | "hardcoding" | "error-swallowing" | "magic-numbers" | "god-object" | "over-engineering" | "premature-optimization" | "copy-paste" | "other";
1571
+ }[];
1572
+ score: number;
1573
+ }>;
1574
+ };
1575
+ declare const debuggingTools: {
1576
+ readonly systematicDebug: ai.Tool<{
1577
+ symptom: string;
1578
+ context: string;
1579
+ recentChanges?: string[] | undefined;
1580
+ failingCode?: string | undefined;
1581
+ }, {
1582
+ phase: "implementation" | "investigation" | "pattern-analysis" | "hypothesis-testing";
1583
+ investigation: {
1584
+ errorMessages: string[];
1585
+ reproductionSteps: string[];
1586
+ recentChanges: string[];
1587
+ dataFlowTrace: string;
1588
+ failurePoint: string;
1589
+ rootCauseHypothesis: string;
1590
+ };
1591
+ confidence: number;
1592
+ redFlags: string[];
1593
+ patternAnalysis?: {
1594
+ workingCodeExamples: string[];
1595
+ differences: string[];
1596
+ missingDependencies: string[];
1597
+ } | undefined;
1598
+ hypothesis?: {
1599
+ statement: string;
1600
+ testPlan: string;
1601
+ iterations: number;
1602
+ result?: "rejected" | "confirmed" | "inconclusive" | undefined;
1603
+ } | undefined;
1604
+ fix?: {
1605
+ testCase: string;
1606
+ implementation: string;
1607
+ verification: string;
1608
+ } | undefined;
1609
+ }>;
1610
+ readonly traceRootCause: ai.Tool<{
1611
+ symptom: string;
1612
+ systemLayers: string[];
1613
+ codeContext?: string | undefined;
1614
+ }, {
1615
+ symptom: string;
1616
+ traceSteps: {
1617
+ layer: string;
1618
+ component: string;
1619
+ finding: string;
1620
+ isRootCause: boolean;
1621
+ }[];
1622
+ rootCause: {
1623
+ location: string;
1624
+ description: string;
1625
+ category: "other" | "logic-error" | "data-corruption" | "race-condition" | "missing-validation" | "configuration" | "dependency" | "resource-exhaustion";
1626
+ };
1627
+ contributingFactors: string[];
1628
+ preventionRecommendations: string[];
1629
+ }>;
1630
+ readonly analyzeDefenseInDepth: ai.Tool<{
1631
+ component: string;
1632
+ code: string;
1633
+ threatModel?: string | undefined;
1634
+ }, {
1635
+ layers: {
1636
+ name: string;
1637
+ type: "input-validation" | "authentication" | "authorization" | "encryption" | "logging" | "rate-limiting" | "error-handling" | "backup";
1638
+ status: "present" | "missing" | "partial";
1639
+ strength: "strong" | "adequate" | "weak";
1640
+ recommendations: string[];
1641
+ }[];
1642
+ overallScore: number;
1643
+ criticalGaps: string[];
1644
+ redundancyAnalysis: {
1645
+ hasRedundancy: boolean;
1646
+ singlePointsOfFailure: string[];
1647
+ };
1648
+ gaps: {
1649
+ name: string;
1650
+ severity: "critical" | "low" | "medium" | "high";
1651
+ recommendation: string;
1652
+ }[];
1653
+ recommendations: string[];
1654
+ }>;
1655
+ readonly analyzeAsyncPatterns: ai.Tool<{
1656
+ code: string;
1657
+ framework: "other" | "vitest" | "jest" | "playwright" | "cypress";
1658
+ }, {
1659
+ asyncOperations: {
1660
+ description: string;
1661
+ type: "network" | "timer" | "animation" | "state-change" | "dom-update" | "file-io";
1662
+ waitStrategy: "promise" | "polling" | "event-listener" | "callback" | "observable";
1663
+ condition: string;
1664
+ timeout: number;
1665
+ fallback: string;
1666
+ }[];
1667
+ raceConditions: {
1668
+ description: string;
1669
+ location: string;
1670
+ fix: string;
1671
+ }[];
1672
+ antiPatterns: {
1673
+ pattern: string;
1674
+ location: string;
1675
+ betterApproach: string;
1676
+ }[];
1677
+ recommendations: string[];
1678
+ }>;
1679
+ };
1680
+ declare const workflowTools: {
1681
+ readonly executePlan: ai.Tool<{
1682
+ plan: string;
1683
+ currentStep: number;
1684
+ previousResults?: string | undefined;
1685
+ }, {
1686
+ planId: string;
1687
+ currentStep: number;
1688
+ totalSteps: number;
1689
+ status: "completed" | "failed" | "in-progress" | "checkpoint" | "blocked";
1690
+ executedSteps: {
1691
+ stepNumber: number;
1692
+ title: string;
1693
+ status: "completed" | "failed" | "skipped";
1694
+ output?: string | undefined;
1695
+ verificationResult?: string | undefined;
1696
+ duration?: number | undefined;
1697
+ }[];
1698
+ nextAction: string;
1699
+ checkpoint?: {
1700
+ reason: string;
1701
+ question: string;
1702
+ options: string[];
1703
+ } | undefined;
1704
+ blockers?: string[] | undefined;
1705
+ }>;
1706
+ readonly dispatchAgents: ai.Tool<{
1707
+ task: string;
1708
+ availableAgents: string[];
1709
+ constraints?: string | undefined;
1710
+ }, {
1711
+ taskDecomposition: {
1712
+ taskId: string;
1713
+ description: string;
1714
+ dependencies: string[];
1715
+ estimatedDuration: string;
1716
+ agentType: "test" | "implement" | "brainstorm" | "plan" | "review" | "document";
1717
+ }[];
1718
+ parallelGroups: {
1719
+ groupId: string;
1720
+ tasks: string[];
1721
+ completionCondition: "any" | "all" | "majority";
1722
+ }[];
1723
+ executionOrder: string[];
1724
+ coordinationStrategy: "fork-join" | "pipeline" | "scatter-gather" | "choreography";
1725
+ mergeStrategy: string;
1726
+ }>;
1727
+ readonly runSubagentDev: ai.Tool<{
1728
+ objective: string;
1729
+ qualityGates: string[];
1730
+ iteration: number;
1731
+ }, {
1732
+ phase: "complete" | "iteration" | "setup" | "quality-gate" | "integration";
1733
+ status: "success" | "running" | "failed" | "pending";
1734
+ iteration: {
1735
+ number: number;
1736
+ objective: string;
1737
+ agentAssignments: {
1738
+ agentId: string;
1739
+ role: string;
1740
+ task: string;
1741
+ status: "running" | "completed" | "failed" | "pending";
1742
+ }[];
1743
+ };
1744
+ qualityGates: {
1745
+ name: string;
1746
+ criteria: string;
1747
+ passed?: boolean | undefined;
1748
+ blockers?: string[] | undefined;
1749
+ }[];
1750
+ artifacts: {
1751
+ type: "code" | "test" | "documentation" | "config";
1752
+ path: string;
1753
+ status: "created" | "modified" | "verified";
1754
+ }[];
1755
+ nextIteration?: string | undefined;
1756
+ }>;
1757
+ };
1758
+ declare const codeReviewTools: {
1759
+ readonly reviewCode: ai.Tool<{
1760
+ code: string;
1761
+ language: "other" | "python" | "rust" | "go" | "java" | "typescript" | "javascript";
1762
+ context?: string | undefined;
1763
+ projectConventions?: string | undefined;
1764
+ focusAreas?: ("security" | "performance" | "maintainability" | "testing")[] | undefined;
1765
+ }, {
1766
+ summary: {
1767
+ overallScore: number;
1768
+ recommendation: "approve" | "request-changes" | "needs-discussion";
1769
+ reviewerConfidence: number;
1770
+ };
1771
+ categories: {
1772
+ security: {
1773
+ score: number;
1774
+ issues: {
1775
+ severity: "error" | "warning" | "info" | "critical";
1776
+ message: string;
1777
+ line?: number | undefined;
1778
+ suggestion?: string | undefined;
1779
+ }[];
1780
+ };
1781
+ performance: {
1782
+ score: number;
1783
+ issues: {
1784
+ severity: "error" | "warning" | "info";
1785
+ message: string;
1786
+ line?: number | undefined;
1787
+ suggestion?: string | undefined;
1788
+ }[];
1789
+ };
1790
+ maintainability: {
1791
+ score: number;
1792
+ issues: {
1793
+ severity: "error" | "warning" | "info";
1794
+ message: string;
1795
+ line?: number | undefined;
1796
+ suggestion?: string | undefined;
1797
+ }[];
1798
+ };
1799
+ testCoverage: {
1800
+ score: number;
1801
+ missingTests: string[];
1802
+ };
1803
+ };
1804
+ antiPatterns: {
1805
+ name: string;
1806
+ location: string;
1807
+ description: string;
1808
+ suggestedFix: string;
1809
+ }[];
1810
+ positives: string[];
1811
+ }>;
1812
+ readonly processCodeReview: ai.Tool<{
1813
+ feedback: string;
1814
+ originalCode: string;
1815
+ reviewerId?: string | undefined;
1816
+ }, {
1817
+ reviewId: string;
1818
+ allAddressed: boolean;
1819
+ feedbackItems: {
1820
+ id: string;
1821
+ type: "question" | "suggestion" | "bug" | "nitpick" | "praise";
1822
+ severity: "critical" | "minor" | "major" | "trivial";
1823
+ comment: string;
1824
+ file?: string | undefined;
1825
+ line?: number | undefined;
1826
+ response?: {
1827
+ action: "rejected" | "accepted" | "discussed" | "deferred";
1828
+ explanation: string;
1829
+ implementation?: string | undefined;
1830
+ } | undefined;
1831
+ }[];
1832
+ summary: {
1833
+ totalItems: number;
1834
+ addressed: number;
1835
+ deferred: number;
1836
+ rejected: number;
1837
+ };
1838
+ followUpQuestions: string[];
1839
+ updatedCode?: string | undefined;
1840
+ }>;
1841
+ readonly detectAntiPatterns: ai.Tool<{
1842
+ code: string;
1843
+ filePath: string;
1844
+ language: "other" | "python" | "rust" | "go" | "java" | "typescript" | "javascript";
1845
+ strictMode: boolean;
1846
+ }, {
1847
+ detected: boolean;
1848
+ patterns: {
1849
+ name: string;
1850
+ severity: "moderate" | "minor" | "severe";
1851
+ location: {
1852
+ file: string;
1853
+ line?: number | undefined;
1854
+ snippet?: string | undefined;
1855
+ };
1856
+ description: string;
1857
+ why: string;
1858
+ fix: string;
1859
+ category: "security" | "hardcoding" | "error-swallowing" | "magic-numbers" | "god-object" | "over-engineering" | "premature-optimization" | "copy-paste" | "other";
1860
+ }[];
1861
+ score: number;
1862
+ }>;
1863
+ };
1864
+ declare const gitTools: {
1865
+ readonly analyzeCommit: ai.Tool<{
1866
+ diff: string;
1867
+ changedFiles: string[];
1868
+ context?: string | undefined;
1869
+ relatedIssue?: string | undefined;
1870
+ }, {
1871
+ type: "refactor" | "test" | "fix" | "feat" | "docs" | "style" | "chore" | "perf" | "ci";
1872
+ subject: string;
1873
+ fullMessage: string;
1874
+ confidence: number;
1875
+ scope?: string | undefined;
1876
+ body?: string | undefined;
1877
+ breakingChange?: {
1878
+ isBreaking: boolean;
1879
+ description?: string | undefined;
1880
+ } | undefined;
1881
+ relatedIssues?: string[] | undefined;
1882
+ }>;
1883
+ readonly manageWorktree: ai.Tool<{
1884
+ action: "create" | "list" | "remove" | "switch";
1885
+ branchName?: string | undefined;
1886
+ baseBranch?: string | undefined;
1887
+ path?: string | undefined;
1888
+ }, {
1889
+ action: "create" | "list" | "remove" | "switch";
1890
+ safetyChecks: {
1891
+ gitignoreVerified: boolean;
1892
+ noUncommittedChanges: boolean;
1893
+ branchNameValid: boolean;
1894
+ };
1895
+ worktree?: {
1896
+ path: string;
1897
+ branch: string;
1898
+ isClean: boolean;
1899
+ baseBranch?: string | undefined;
1900
+ } | undefined;
1901
+ setup?: {
1902
+ projectType: "other" | "nodejs" | "python" | "rust" | "go" | "java";
1903
+ dependenciesInstalled: boolean;
1904
+ testsRun: boolean;
1905
+ baselineEstablished: boolean;
1906
+ testsPassed?: boolean | undefined;
1907
+ } | undefined;
1908
+ existingWorktrees?: {
1909
+ path: string;
1910
+ branch: string;
1911
+ isLocked: boolean;
1912
+ }[] | undefined;
1913
+ }>;
1914
+ readonly finishBranch: ai.Tool<{
1915
+ branchName: string;
1916
+ targetBranch: string;
1917
+ createPR: boolean;
1918
+ }, {
1919
+ branch: string;
1920
+ status: "ready" | "ready-to-merge" | "ready-for-pr" | "needs-work" | "merged" | "abandoned";
1921
+ preFlightChecks: {
1922
+ check: string;
1923
+ passed: boolean;
1924
+ details?: string | undefined;
1925
+ }[];
1926
+ cleanup: {
1927
+ localBranchDeleted: boolean;
1928
+ remoteBranchDeleted: boolean;
1929
+ worktreeRemoved?: boolean | undefined;
1930
+ };
1931
+ mergeStrategy?: {
1932
+ recommendation: "merge" | "squash" | "rebase";
1933
+ reason: string;
1934
+ targetBranch: string;
1935
+ } | undefined;
1936
+ prDetails?: {
1937
+ title: string;
1938
+ body: string;
1939
+ labels: string[];
1940
+ reviewers?: string[] | undefined;
1941
+ } | undefined;
1942
+ }>;
1943
+ };
1944
+ declare const metaTools: {
1945
+ readonly writeSkill: ai.Tool<{
1946
+ skillName: string;
1947
+ purpose: string;
1948
+ examples: string[];
1949
+ }, {
1950
+ skillName: string;
1951
+ skillDefinition: {
1952
+ purpose: string;
1953
+ corePrinciple: string;
1954
+ phases: {
1955
+ name: string;
1956
+ activities: string[];
1957
+ successCriterion: string;
1958
+ }[];
1959
+ redFlags: string[];
1960
+ integrationPoints: {
1961
+ calledBy: string[];
1962
+ pairsWith: string[];
1963
+ };
1964
+ };
1965
+ outputSchema: string;
1966
+ systemPrompt: string;
1967
+ exampleUsage: string;
1968
+ implementation?: string | undefined;
1969
+ }>;
1970
+ readonly testSkill: ai.Tool<{
1971
+ skillDefinition: string;
1972
+ testCases: string[];
1973
+ }, {
1974
+ skillName: string;
1975
+ passRate: number;
1976
+ testCases: {
1977
+ name: string;
1978
+ input: string;
1979
+ expectedBehavior: string;
1980
+ actualResult?: string | undefined;
1981
+ passed?: boolean | undefined;
1982
+ }[];
1983
+ edgeCases: {
1984
+ scenario: string;
1985
+ handled: boolean;
1986
+ notes?: string | undefined;
1987
+ }[];
1988
+ qualityMetrics: {
1989
+ completeness: number;
1990
+ clarity: number;
1991
+ robustness: number;
1992
+ };
1993
+ recommendations: string[];
1994
+ }>;
1995
+ readonly shareSkill: ai.Tool<{
1996
+ skillDefinition: string;
1997
+ targetPlatforms: string[];
1998
+ version: string;
1999
+ }, {
2000
+ skillName: string;
2001
+ exportFormat: "markdown" | "json" | "yaml";
2002
+ documentation: {
2003
+ overview: string;
2004
+ quickStart: string;
2005
+ fullDocumentation: string;
2006
+ examples: string[];
2007
+ };
2008
+ compatibility: {
2009
+ platforms: ("other" | "claude-code" | "cursor" | "windsurf")[];
2010
+ version: string;
2011
+ dependencies: string[];
2012
+ };
2013
+ distribution: {
2014
+ method: "git" | "npm" | "manual" | "marketplace";
2015
+ location: string;
2016
+ installInstructions: string;
2017
+ };
2018
+ }>;
2019
+ readonly introduceSuperpowers: ai.Tool<{
2020
+ projectContext: string;
2021
+ userExperience: "beginner" | "intermediate" | "expert";
2022
+ }, {
2023
+ availableSuperpowers: {
2024
+ name: string;
2025
+ category: "git" | "planning" | "debugging" | "quality" | "workflow" | "meta";
2026
+ description: string;
2027
+ whenToUse: string;
2028
+ }[];
2029
+ recommendedWorkflow: {
2030
+ step: number;
2031
+ superpower: string;
2032
+ purpose: string;
2033
+ }[];
2034
+ corePrinciples: string[];
2035
+ antiPatterns: {
2036
+ pattern: string;
2037
+ why: string;
2038
+ instead: string;
2039
+ }[];
2040
+ }>;
2041
+ };
2042
+ declare const allSuperpowerTools: {
2043
+ readonly writeSkill: ai.Tool<{
2044
+ skillName: string;
2045
+ purpose: string;
2046
+ examples: string[];
2047
+ }, {
2048
+ skillName: string;
2049
+ skillDefinition: {
2050
+ purpose: string;
2051
+ corePrinciple: string;
2052
+ phases: {
2053
+ name: string;
2054
+ activities: string[];
2055
+ successCriterion: string;
2056
+ }[];
2057
+ redFlags: string[];
2058
+ integrationPoints: {
2059
+ calledBy: string[];
2060
+ pairsWith: string[];
2061
+ };
2062
+ };
2063
+ outputSchema: string;
2064
+ systemPrompt: string;
2065
+ exampleUsage: string;
2066
+ implementation?: string | undefined;
2067
+ }>;
2068
+ readonly testSkill: ai.Tool<{
2069
+ skillDefinition: string;
2070
+ testCases: string[];
2071
+ }, {
2072
+ skillName: string;
2073
+ passRate: number;
2074
+ testCases: {
2075
+ name: string;
2076
+ input: string;
2077
+ expectedBehavior: string;
2078
+ actualResult?: string | undefined;
2079
+ passed?: boolean | undefined;
2080
+ }[];
2081
+ edgeCases: {
2082
+ scenario: string;
2083
+ handled: boolean;
2084
+ notes?: string | undefined;
2085
+ }[];
2086
+ qualityMetrics: {
2087
+ completeness: number;
2088
+ clarity: number;
2089
+ robustness: number;
2090
+ };
2091
+ recommendations: string[];
2092
+ }>;
2093
+ readonly shareSkill: ai.Tool<{
2094
+ skillDefinition: string;
2095
+ targetPlatforms: string[];
2096
+ version: string;
2097
+ }, {
2098
+ skillName: string;
2099
+ exportFormat: "markdown" | "json" | "yaml";
2100
+ documentation: {
2101
+ overview: string;
2102
+ quickStart: string;
2103
+ fullDocumentation: string;
2104
+ examples: string[];
2105
+ };
2106
+ compatibility: {
2107
+ platforms: ("other" | "claude-code" | "cursor" | "windsurf")[];
2108
+ version: string;
2109
+ dependencies: string[];
2110
+ };
2111
+ distribution: {
2112
+ method: "git" | "npm" | "manual" | "marketplace";
2113
+ location: string;
2114
+ installInstructions: string;
2115
+ };
2116
+ }>;
2117
+ readonly introduceSuperpowers: ai.Tool<{
2118
+ projectContext: string;
2119
+ userExperience: "beginner" | "intermediate" | "expert";
2120
+ }, {
2121
+ availableSuperpowers: {
2122
+ name: string;
2123
+ category: "git" | "planning" | "debugging" | "quality" | "workflow" | "meta";
2124
+ description: string;
2125
+ whenToUse: string;
2126
+ }[];
2127
+ recommendedWorkflow: {
2128
+ step: number;
2129
+ superpower: string;
2130
+ purpose: string;
2131
+ }[];
2132
+ corePrinciples: string[];
2133
+ antiPatterns: {
2134
+ pattern: string;
2135
+ why: string;
2136
+ instead: string;
2137
+ }[];
2138
+ }>;
2139
+ readonly analyzeCommit: ai.Tool<{
2140
+ diff: string;
2141
+ changedFiles: string[];
2142
+ context?: string | undefined;
2143
+ relatedIssue?: string | undefined;
2144
+ }, {
2145
+ type: "refactor" | "test" | "fix" | "feat" | "docs" | "style" | "chore" | "perf" | "ci";
2146
+ subject: string;
2147
+ fullMessage: string;
2148
+ confidence: number;
2149
+ scope?: string | undefined;
2150
+ body?: string | undefined;
2151
+ breakingChange?: {
2152
+ isBreaking: boolean;
2153
+ description?: string | undefined;
2154
+ } | undefined;
2155
+ relatedIssues?: string[] | undefined;
2156
+ }>;
2157
+ readonly manageWorktree: ai.Tool<{
2158
+ action: "create" | "list" | "remove" | "switch";
2159
+ branchName?: string | undefined;
2160
+ baseBranch?: string | undefined;
2161
+ path?: string | undefined;
2162
+ }, {
2163
+ action: "create" | "list" | "remove" | "switch";
2164
+ safetyChecks: {
2165
+ gitignoreVerified: boolean;
2166
+ noUncommittedChanges: boolean;
2167
+ branchNameValid: boolean;
2168
+ };
2169
+ worktree?: {
2170
+ path: string;
2171
+ branch: string;
2172
+ isClean: boolean;
2173
+ baseBranch?: string | undefined;
2174
+ } | undefined;
2175
+ setup?: {
2176
+ projectType: "other" | "nodejs" | "python" | "rust" | "go" | "java";
2177
+ dependenciesInstalled: boolean;
2178
+ testsRun: boolean;
2179
+ baselineEstablished: boolean;
2180
+ testsPassed?: boolean | undefined;
2181
+ } | undefined;
2182
+ existingWorktrees?: {
2183
+ path: string;
2184
+ branch: string;
2185
+ isLocked: boolean;
2186
+ }[] | undefined;
2187
+ }>;
2188
+ readonly finishBranch: ai.Tool<{
2189
+ branchName: string;
2190
+ targetBranch: string;
2191
+ createPR: boolean;
2192
+ }, {
2193
+ branch: string;
2194
+ status: "ready" | "ready-to-merge" | "ready-for-pr" | "needs-work" | "merged" | "abandoned";
2195
+ preFlightChecks: {
2196
+ check: string;
2197
+ passed: boolean;
2198
+ details?: string | undefined;
2199
+ }[];
2200
+ cleanup: {
2201
+ localBranchDeleted: boolean;
2202
+ remoteBranchDeleted: boolean;
2203
+ worktreeRemoved?: boolean | undefined;
2204
+ };
2205
+ mergeStrategy?: {
2206
+ recommendation: "merge" | "squash" | "rebase";
2207
+ reason: string;
2208
+ targetBranch: string;
2209
+ } | undefined;
2210
+ prDetails?: {
2211
+ title: string;
2212
+ body: string;
2213
+ labels: string[];
2214
+ reviewers?: string[] | undefined;
2215
+ } | undefined;
2216
+ }>;
2217
+ readonly reviewCode: ai.Tool<{
2218
+ code: string;
2219
+ language: "other" | "python" | "rust" | "go" | "java" | "typescript" | "javascript";
2220
+ context?: string | undefined;
2221
+ projectConventions?: string | undefined;
2222
+ focusAreas?: ("security" | "performance" | "maintainability" | "testing")[] | undefined;
2223
+ }, {
2224
+ summary: {
2225
+ overallScore: number;
2226
+ recommendation: "approve" | "request-changes" | "needs-discussion";
2227
+ reviewerConfidence: number;
2228
+ };
2229
+ categories: {
2230
+ security: {
2231
+ score: number;
2232
+ issues: {
2233
+ severity: "error" | "warning" | "info" | "critical";
2234
+ message: string;
2235
+ line?: number | undefined;
2236
+ suggestion?: string | undefined;
2237
+ }[];
2238
+ };
2239
+ performance: {
2240
+ score: number;
2241
+ issues: {
2242
+ severity: "error" | "warning" | "info";
2243
+ message: string;
2244
+ line?: number | undefined;
2245
+ suggestion?: string | undefined;
2246
+ }[];
2247
+ };
2248
+ maintainability: {
2249
+ score: number;
2250
+ issues: {
2251
+ severity: "error" | "warning" | "info";
2252
+ message: string;
2253
+ line?: number | undefined;
2254
+ suggestion?: string | undefined;
2255
+ }[];
2256
+ };
2257
+ testCoverage: {
2258
+ score: number;
2259
+ missingTests: string[];
2260
+ };
2261
+ };
2262
+ antiPatterns: {
2263
+ name: string;
2264
+ location: string;
2265
+ description: string;
2266
+ suggestedFix: string;
2267
+ }[];
2268
+ positives: string[];
2269
+ }>;
2270
+ readonly processCodeReview: ai.Tool<{
2271
+ feedback: string;
2272
+ originalCode: string;
2273
+ reviewerId?: string | undefined;
2274
+ }, {
2275
+ reviewId: string;
2276
+ allAddressed: boolean;
2277
+ feedbackItems: {
2278
+ id: string;
2279
+ type: "question" | "suggestion" | "bug" | "nitpick" | "praise";
2280
+ severity: "critical" | "minor" | "major" | "trivial";
2281
+ comment: string;
2282
+ file?: string | undefined;
2283
+ line?: number | undefined;
2284
+ response?: {
2285
+ action: "rejected" | "accepted" | "discussed" | "deferred";
2286
+ explanation: string;
2287
+ implementation?: string | undefined;
2288
+ } | undefined;
2289
+ }[];
2290
+ summary: {
2291
+ totalItems: number;
2292
+ addressed: number;
2293
+ deferred: number;
2294
+ rejected: number;
2295
+ };
2296
+ followUpQuestions: string[];
2297
+ updatedCode?: string | undefined;
2298
+ }>;
2299
+ readonly detectAntiPatterns: ai.Tool<{
2300
+ code: string;
2301
+ filePath: string;
2302
+ language: "other" | "python" | "rust" | "go" | "java" | "typescript" | "javascript";
2303
+ strictMode: boolean;
2304
+ }, {
2305
+ detected: boolean;
2306
+ patterns: {
2307
+ name: string;
2308
+ severity: "moderate" | "minor" | "severe";
2309
+ location: {
2310
+ file: string;
2311
+ line?: number | undefined;
2312
+ snippet?: string | undefined;
2313
+ };
2314
+ description: string;
2315
+ why: string;
2316
+ fix: string;
2317
+ category: "security" | "hardcoding" | "error-swallowing" | "magic-numbers" | "god-object" | "over-engineering" | "premature-optimization" | "copy-paste" | "other";
2318
+ }[];
2319
+ score: number;
2320
+ }>;
2321
+ readonly executePlan: ai.Tool<{
2322
+ plan: string;
2323
+ currentStep: number;
2324
+ previousResults?: string | undefined;
2325
+ }, {
2326
+ planId: string;
2327
+ currentStep: number;
2328
+ totalSteps: number;
2329
+ status: "completed" | "failed" | "in-progress" | "checkpoint" | "blocked";
2330
+ executedSteps: {
2331
+ stepNumber: number;
2332
+ title: string;
2333
+ status: "completed" | "failed" | "skipped";
2334
+ output?: string | undefined;
2335
+ verificationResult?: string | undefined;
2336
+ duration?: number | undefined;
2337
+ }[];
2338
+ nextAction: string;
2339
+ checkpoint?: {
2340
+ reason: string;
2341
+ question: string;
2342
+ options: string[];
2343
+ } | undefined;
2344
+ blockers?: string[] | undefined;
2345
+ }>;
2346
+ readonly dispatchAgents: ai.Tool<{
2347
+ task: string;
2348
+ availableAgents: string[];
2349
+ constraints?: string | undefined;
2350
+ }, {
2351
+ taskDecomposition: {
2352
+ taskId: string;
2353
+ description: string;
2354
+ dependencies: string[];
2355
+ estimatedDuration: string;
2356
+ agentType: "test" | "implement" | "brainstorm" | "plan" | "review" | "document";
2357
+ }[];
2358
+ parallelGroups: {
2359
+ groupId: string;
2360
+ tasks: string[];
2361
+ completionCondition: "any" | "all" | "majority";
2362
+ }[];
2363
+ executionOrder: string[];
2364
+ coordinationStrategy: "fork-join" | "pipeline" | "scatter-gather" | "choreography";
2365
+ mergeStrategy: string;
2366
+ }>;
2367
+ readonly runSubagentDev: ai.Tool<{
2368
+ objective: string;
2369
+ qualityGates: string[];
2370
+ iteration: number;
2371
+ }, {
2372
+ phase: "complete" | "iteration" | "setup" | "quality-gate" | "integration";
2373
+ status: "success" | "running" | "failed" | "pending";
2374
+ iteration: {
2375
+ number: number;
2376
+ objective: string;
2377
+ agentAssignments: {
2378
+ agentId: string;
2379
+ role: string;
2380
+ task: string;
2381
+ status: "running" | "completed" | "failed" | "pending";
2382
+ }[];
2383
+ };
2384
+ qualityGates: {
2385
+ name: string;
2386
+ criteria: string;
2387
+ passed?: boolean | undefined;
2388
+ blockers?: string[] | undefined;
2389
+ }[];
2390
+ artifacts: {
2391
+ type: "code" | "test" | "documentation" | "config";
2392
+ path: string;
2393
+ status: "created" | "modified" | "verified";
2394
+ }[];
2395
+ nextIteration?: string | undefined;
2396
+ }>;
2397
+ readonly systematicDebug: ai.Tool<{
2398
+ symptom: string;
2399
+ context: string;
2400
+ recentChanges?: string[] | undefined;
2401
+ failingCode?: string | undefined;
2402
+ }, {
2403
+ phase: "implementation" | "investigation" | "pattern-analysis" | "hypothesis-testing";
2404
+ investigation: {
2405
+ errorMessages: string[];
2406
+ reproductionSteps: string[];
2407
+ recentChanges: string[];
2408
+ dataFlowTrace: string;
2409
+ failurePoint: string;
2410
+ rootCauseHypothesis: string;
2411
+ };
2412
+ confidence: number;
2413
+ redFlags: string[];
2414
+ patternAnalysis?: {
2415
+ workingCodeExamples: string[];
2416
+ differences: string[];
2417
+ missingDependencies: string[];
2418
+ } | undefined;
2419
+ hypothesis?: {
2420
+ statement: string;
2421
+ testPlan: string;
2422
+ iterations: number;
2423
+ result?: "rejected" | "confirmed" | "inconclusive" | undefined;
2424
+ } | undefined;
2425
+ fix?: {
2426
+ testCase: string;
2427
+ implementation: string;
2428
+ verification: string;
2429
+ } | undefined;
2430
+ }>;
2431
+ readonly traceRootCause: ai.Tool<{
2432
+ symptom: string;
2433
+ systemLayers: string[];
2434
+ codeContext?: string | undefined;
2435
+ }, {
2436
+ symptom: string;
2437
+ traceSteps: {
2438
+ layer: string;
2439
+ component: string;
2440
+ finding: string;
2441
+ isRootCause: boolean;
2442
+ }[];
2443
+ rootCause: {
2444
+ location: string;
2445
+ description: string;
2446
+ category: "other" | "logic-error" | "data-corruption" | "race-condition" | "missing-validation" | "configuration" | "dependency" | "resource-exhaustion";
2447
+ };
2448
+ contributingFactors: string[];
2449
+ preventionRecommendations: string[];
2450
+ }>;
2451
+ readonly analyzeDefenseInDepth: ai.Tool<{
2452
+ component: string;
2453
+ code: string;
2454
+ threatModel?: string | undefined;
2455
+ }, {
2456
+ layers: {
2457
+ name: string;
2458
+ type: "input-validation" | "authentication" | "authorization" | "encryption" | "logging" | "rate-limiting" | "error-handling" | "backup";
2459
+ status: "present" | "missing" | "partial";
2460
+ strength: "strong" | "adequate" | "weak";
2461
+ recommendations: string[];
2462
+ }[];
2463
+ overallScore: number;
2464
+ criticalGaps: string[];
2465
+ redundancyAnalysis: {
2466
+ hasRedundancy: boolean;
2467
+ singlePointsOfFailure: string[];
2468
+ };
2469
+ gaps: {
2470
+ name: string;
2471
+ severity: "critical" | "low" | "medium" | "high";
2472
+ recommendation: string;
2473
+ }[];
2474
+ recommendations: string[];
2475
+ }>;
2476
+ readonly analyzeAsyncPatterns: ai.Tool<{
2477
+ code: string;
2478
+ framework: "other" | "vitest" | "jest" | "playwright" | "cypress";
2479
+ }, {
2480
+ asyncOperations: {
2481
+ description: string;
2482
+ type: "network" | "timer" | "animation" | "state-change" | "dom-update" | "file-io";
2483
+ waitStrategy: "promise" | "polling" | "event-listener" | "callback" | "observable";
2484
+ condition: string;
2485
+ timeout: number;
2486
+ fallback: string;
2487
+ }[];
2488
+ raceConditions: {
2489
+ description: string;
2490
+ location: string;
2491
+ fix: string;
2492
+ }[];
2493
+ antiPatterns: {
2494
+ pattern: string;
2495
+ location: string;
2496
+ betterApproach: string;
2497
+ }[];
2498
+ recommendations: string[];
2499
+ }>;
2500
+ readonly runTDDCycle: ai.Tool<{
2501
+ feature: string;
2502
+ testFramework: "vitest" | "jest" | "mocha" | "playwright";
2503
+ targetPath: string;
2504
+ iteration: number;
2505
+ existingTests?: string | undefined;
2506
+ previousResult?: string | undefined;
2507
+ }, {
2508
+ phase: "refactor" | "write-test" | "run-test" | "implement" | "complete";
2509
+ iteration: number;
2510
+ nextAction: string;
2511
+ confidence: number;
2512
+ testFile?: {
2513
+ path: string;
2514
+ content: string;
2515
+ description: string;
2516
+ } | undefined;
2517
+ implementation?: {
2518
+ path: string;
2519
+ content: string;
2520
+ description: string;
2521
+ } | undefined;
2522
+ testResult?: {
2523
+ passed: boolean;
2524
+ output: string;
2525
+ failureReason?: string | undefined;
2526
+ } | undefined;
2527
+ }>;
2528
+ readonly refineRequirements: ai.Tool<{
2529
+ rawRequest: string;
2530
+ projectContext?: string | undefined;
2531
+ existingCode?: string | undefined;
2532
+ }, {
2533
+ analysis: {
2534
+ ambiguityScore: number;
2535
+ missingContext: string[];
2536
+ assumptions: string[];
2537
+ };
2538
+ clarifyingQuestions: {
2539
+ question: string;
2540
+ priority: "critical" | "important" | "nice-to-have";
2541
+ context: string;
2542
+ }[];
2543
+ edgeCases: {
2544
+ scenario: string;
2545
+ risk: "low" | "medium" | "high";
2546
+ mitigation?: string | undefined;
2547
+ }[];
2548
+ approaches: {
2549
+ name: string;
2550
+ description: string;
2551
+ pros: string[];
2552
+ cons: string[];
2553
+ estimatedComplexity: "simple" | "moderate" | "complex";
2554
+ techStackRecommendation?: string | undefined;
2555
+ }[];
2556
+ }>;
2557
+ readonly consultArchitect: ai.Tool<{
2558
+ featureRequest: string;
2559
+ currentContext: string;
2560
+ constraints?: string[] | undefined;
2561
+ existingCode?: string | undefined;
2562
+ }, {
2563
+ summary: string;
2564
+ riskAnalysis: {
2565
+ risk: string;
2566
+ severity: "critical" | "low" | "medium" | "high";
2567
+ mitigation: string;
2568
+ }[];
2569
+ dependencies: {
2570
+ name: string;
2571
+ type: "file" | "package" | "service" | "api" | "database";
2572
+ status: "exists" | "needs-creation" | "needs-modification";
2573
+ }[];
2574
+ steps: {
2575
+ order: number;
2576
+ title: string;
2577
+ filePaths: string[];
2578
+ actionType: "create" | "modify" | "delete" | "refactor" | "test" | "configure";
2579
+ description: string;
2580
+ verificationCmd: string;
2581
+ blockedBy?: number[] | undefined;
2582
+ }[];
2583
+ rollbackPlan?: string | undefined;
2584
+ }>;
2585
+ readonly reviewDesign: ai.Tool<{
2586
+ proposedChanges: string;
2587
+ conventions: string;
2588
+ existingArchitecture?: string | undefined;
2589
+ affectedAreas?: string[] | undefined;
2590
+ }, {
2591
+ adheresToConventions: boolean;
2592
+ conventionViolations: {
2593
+ convention: string;
2594
+ violation: string;
2595
+ severity: "moderate" | "minor" | "severe";
2596
+ suggestion: string;
2597
+ }[];
2598
+ architecturalConcerns: {
2599
+ concern: string;
2600
+ impact: "low" | "medium" | "high";
2601
+ recommendation: string;
2602
+ }[];
2603
+ compatibility: {
2604
+ backwardsCompatible: boolean;
2605
+ breakingChanges: string[];
2606
+ migrationRequired: boolean;
2607
+ migrationSteps?: string[] | undefined;
2608
+ };
2609
+ recommendations: string[];
2610
+ approval: "approved" | "approved-with-changes" | "rejected";
2611
+ }>;
2612
+ };
2613
+ //#endregion
2614
+ export { systemPrompts as $, writeSkill as A, SkillWriteOutput as At, FINISHING_BRANCH_SYSTEM_PROMPT as B, WorktreeOutput as Bt, runSubagentDev as C, PlanOutputSchema as Ct, testSkill as D, SkillShareOutputSchema as Dt, systematicDebug as E, SkillShareOutput as Et, CONDITION_BASED_WAITING_SYSTEM_PROMPT as F, SuperpowersIntroOutputSchema as Ft, SHARING_SKILLS_SYSTEM_PROMPT as G, PLANNER_SYSTEM_PROMPT as H, DEFENSE_IN_DEPTH_SYSTEM_PROMPT as I, SystematicDebuggingOutput as It, SystemPromptKey as J, SUBAGENT_DRIVEN_DEV_SYSTEM_PROMPT as K, DESIGN_REVIEW_SYSTEM_PROMPT as L, SystematicDebuggingOutputSchema as Lt, BRAINSTORM_SYSTEM_PROMPT as M, SubagentDevOutput as Mt, CODE_REVIEW_SYSTEM_PROMPT as N, SubagentDevOutputSchema as Nt, traceRootCause as O, SkillTestOutput as Ot, COMMIT_ANALYSIS_SYSTEM_PROMPT as P, SuperpowersIntroOutput as Pt, WRITING_SKILLS_SYSTEM_PROMPT as Q, DISPATCHING_AGENTS_SYSTEM_PROMPT as R, TDDOutput as Rt, reviewDesign as S, PlanOutput as St, shareSkill as T, RootCauseTracingOutputSchema as Tt, RECEIVING_CODE_REVIEW_SYSTEM_PROMPT as U, GIT_WORKTREE_SYSTEM_PROMPT as V, WorktreeOutputSchema as Vt, ROOT_CAUSE_TRACING_SYSTEM_PROMPT as W, TESTING_SKILLS_SYSTEM_PROMPT as X, TDD_SYSTEM_PROMPT as Y, USING_SUPERPOWERS_SYSTEM_PROMPT as Z, planningTools as _, DefenseInDepthOutputSchema as _t, codeReviewTools as a, AsyncPatternsOutputSchema as at, refineRequirements as b, PlanExecutionOutput as bt, detectAntiPatterns as c, BranchFinishOutput as ct, finishBranch as d, CodeReviewOutputSchema as dt, AgentDispatchOutput as et, gitTools as f, CodeReviewResponseOutput as ft, metaTools as g, DefenseInDepthOutput as gt, manageWorktree as h, CommitAnalysisOutputSchema as ht, analyzeDefenseInDepth as i, AsyncPatternsOutput as it, ANTI_PATTERN_SYSTEM_PROMPT as j, SkillWriteOutputSchema as jt, workflowTools as k, SkillTestOutputSchema as kt, dispatchAgents as l, BranchFinishOutputSchema as lt, introduceSuperpowers as m, CommitAnalysisOutput as mt, analyzeAsyncPatterns as n, AntiPatternOutput as nt, consultArchitect as o, BrainstormOutput as ot, initSuperpowers as p, CodeReviewResponseOutputSchema as pt, SYSTEMATIC_DEBUGGING_SYSTEM_PROMPT as q, analyzeCommit as r, AntiPatternOutputSchema as rt, debuggingTools as s, BrainstormOutputSchema as st, allSuperpowerTools as t, AgentDispatchOutputSchema as tt, executePlan as u, CodeReviewOutput as ut, processCodeReview as v, DesignReviewOutput as vt, runTDDCycle as w, RootCauseTracingOutput as wt, reviewCode as x, PlanExecutionOutputSchema as xt, qualityTools as y, DesignReviewOutputSchema as yt, EXECUTING_PLANS_SYSTEM_PROMPT as z, TDDOutputSchema as zt };
2615
+ //# sourceMappingURL=index-BGgMn_Ev.d.mts.map