@qodo/sdk 0.13.4 → 2.0.0-next.1

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 (764) hide show
  1. package/LICENSE +31 -118
  2. package/README.md +133 -121
  3. package/bin/qodo-skills.mjs +13 -0
  4. package/bundled-skills/code-review/SKILL.md +41 -0
  5. package/bundled-skills/pr-summary/SKILL.md +59 -0
  6. package/bundled-skills/test-gen/SKILL.md +47 -0
  7. package/dist/auth/index.browser.d.ts +38 -0
  8. package/dist/auth/index.browser.d.ts.map +1 -0
  9. package/dist/auth/index.browser.js +62 -0
  10. package/dist/auth/index.browser.js.map +1 -0
  11. package/dist/auth/index.d.ts +44 -30
  12. package/dist/auth/index.d.ts.map +1 -1
  13. package/dist/auth/index.js +57 -110
  14. package/dist/auth/index.js.map +1 -1
  15. package/dist/client/AgentsClient.d.ts +33 -0
  16. package/dist/client/AgentsClient.d.ts.map +1 -0
  17. package/dist/client/AgentsClient.js +40 -0
  18. package/dist/client/AgentsClient.js.map +1 -0
  19. package/dist/client/ArtifactsClient.d.ts +43 -0
  20. package/dist/client/ArtifactsClient.d.ts.map +1 -0
  21. package/dist/client/ArtifactsClient.js +54 -0
  22. package/dist/client/ArtifactsClient.js.map +1 -0
  23. package/dist/client/BulletinClient.d.ts +45 -0
  24. package/dist/client/BulletinClient.d.ts.map +1 -0
  25. package/dist/client/BulletinClient.js +51 -0
  26. package/dist/client/BulletinClient.js.map +1 -0
  27. package/dist/client/InfoClient.d.ts +58 -0
  28. package/dist/client/InfoClient.d.ts.map +1 -0
  29. package/dist/client/InfoClient.js +135 -0
  30. package/dist/client/InfoClient.js.map +1 -0
  31. package/dist/client/PipelineClient.d.ts +162 -0
  32. package/dist/client/PipelineClient.d.ts.map +1 -0
  33. package/dist/client/PipelineClient.js +340 -0
  34. package/dist/client/PipelineClient.js.map +1 -0
  35. package/dist/client/QarRegistryClient.d.ts +396 -0
  36. package/dist/client/QarRegistryClient.d.ts.map +1 -0
  37. package/dist/client/QarRegistryClient.js +536 -0
  38. package/dist/client/QarRegistryClient.js.map +1 -0
  39. package/dist/client/QodoClient.d.ts +296 -0
  40. package/dist/client/QodoClient.d.ts.map +1 -0
  41. package/dist/client/QodoClient.js +803 -0
  42. package/dist/client/QodoClient.js.map +1 -0
  43. package/dist/client/SpecsClient.d.ts +121 -0
  44. package/dist/client/SpecsClient.d.ts.map +1 -0
  45. package/dist/client/SpecsClient.js +252 -0
  46. package/dist/client/SpecsClient.js.map +1 -0
  47. package/dist/client/StateClient.d.ts +35 -0
  48. package/dist/client/StateClient.d.ts.map +1 -0
  49. package/dist/client/StateClient.js +36 -0
  50. package/dist/client/StateClient.js.map +1 -0
  51. package/dist/client/TaskClient.d.ts +706 -0
  52. package/dist/client/TaskClient.d.ts.map +1 -0
  53. package/dist/client/TaskClient.js +2522 -0
  54. package/dist/client/TaskClient.js.map +1 -0
  55. package/dist/client/ToolClient.d.ts +278 -0
  56. package/dist/client/ToolClient.d.ts.map +1 -0
  57. package/dist/client/ToolClient.js +1139 -0
  58. package/dist/client/ToolClient.js.map +1 -0
  59. package/dist/client/a2a/index.d.ts +10 -0
  60. package/dist/client/a2a/index.d.ts.map +1 -0
  61. package/dist/client/a2a/index.js +9 -0
  62. package/dist/client/a2a/index.js.map +1 -0
  63. package/dist/client/a2a/registerA2A.d.ts +170 -0
  64. package/dist/client/a2a/registerA2A.d.ts.map +1 -0
  65. package/dist/client/a2a/registerA2A.js +85 -0
  66. package/dist/client/a2a/registerA2A.js.map +1 -0
  67. package/dist/client/connection.d.ts +893 -0
  68. package/dist/client/connection.d.ts.map +1 -0
  69. package/dist/client/connection.js +2189 -0
  70. package/dist/client/connection.js.map +1 -0
  71. package/dist/client/errors.d.ts +735 -0
  72. package/dist/client/errors.d.ts.map +1 -0
  73. package/dist/client/errors.js +921 -0
  74. package/dist/client/errors.js.map +1 -0
  75. package/dist/client/index.d.ts +26 -0
  76. package/dist/client/index.d.ts.map +1 -0
  77. package/dist/client/index.js +20 -0
  78. package/dist/client/index.js.map +1 -0
  79. package/dist/client/inlineGraph.d.ts +66 -0
  80. package/dist/client/inlineGraph.d.ts.map +1 -0
  81. package/dist/client/inlineGraph.js +500 -0
  82. package/dist/client/inlineGraph.js.map +1 -0
  83. package/dist/client/internal/thenable.d.ts +27 -0
  84. package/dist/client/internal/thenable.d.ts.map +1 -0
  85. package/dist/client/internal/thenable.js +31 -0
  86. package/dist/client/internal/thenable.js.map +1 -0
  87. package/dist/client/iterator.d.ts +32 -0
  88. package/dist/client/iterator.d.ts.map +1 -0
  89. package/dist/client/iterator.js +73 -0
  90. package/dist/client/iterator.js.map +1 -0
  91. package/dist/client/mcp/McpClientPool.browser.d.ts +76 -0
  92. package/dist/client/mcp/McpClientPool.browser.d.ts.map +1 -0
  93. package/dist/client/mcp/McpClientPool.browser.js +78 -0
  94. package/dist/client/mcp/McpClientPool.browser.js.map +1 -0
  95. package/dist/client/mcp/McpClientPool.d.ts +236 -0
  96. package/dist/client/mcp/McpClientPool.d.ts.map +1 -0
  97. package/dist/client/mcp/McpClientPool.js +585 -0
  98. package/dist/client/mcp/McpClientPool.js.map +1 -0
  99. package/dist/client/mcp/projection.d.ts +109 -0
  100. package/dist/client/mcp/projection.d.ts.map +1 -0
  101. package/dist/client/mcp/projection.js +446 -0
  102. package/dist/client/mcp/projection.js.map +1 -0
  103. package/dist/client/mcp/substituteEnv.browser.d.ts +18 -0
  104. package/dist/client/mcp/substituteEnv.browser.d.ts.map +1 -0
  105. package/dist/client/mcp/substituteEnv.browser.js +20 -0
  106. package/dist/client/mcp/substituteEnv.browser.js.map +1 -0
  107. package/dist/client/mcp/substituteEnv.d.ts +45 -0
  108. package/dist/client/mcp/substituteEnv.d.ts.map +1 -0
  109. package/dist/client/mcp/substituteEnv.js +63 -0
  110. package/dist/client/mcp/substituteEnv.js.map +1 -0
  111. package/dist/client/observers.d.ts +57 -0
  112. package/dist/client/observers.d.ts.map +1 -0
  113. package/dist/client/observers.js +203 -0
  114. package/dist/client/observers.js.map +1 -0
  115. package/dist/client/options.d.ts +269 -0
  116. package/dist/client/options.d.ts.map +1 -0
  117. package/dist/client/options.js +9 -0
  118. package/dist/client/options.js.map +1 -0
  119. package/dist/client/tools/_readlineApprovalPrompt.browser.d.ts +17 -0
  120. package/dist/client/tools/_readlineApprovalPrompt.browser.d.ts.map +1 -0
  121. package/dist/client/tools/_readlineApprovalPrompt.browser.js +24 -0
  122. package/dist/client/tools/_readlineApprovalPrompt.browser.js.map +1 -0
  123. package/dist/client/tools/_readlineApprovalPrompt.d.ts +33 -0
  124. package/dist/client/tools/_readlineApprovalPrompt.d.ts.map +1 -0
  125. package/dist/client/tools/_readlineApprovalPrompt.js +90 -0
  126. package/dist/client/tools/_readlineApprovalPrompt.js.map +1 -0
  127. package/dist/client/tools/approval.d.ts +280 -0
  128. package/dist/client/tools/approval.d.ts.map +1 -0
  129. package/dist/client/tools/approval.js +229 -0
  130. package/dist/client/tools/approval.js.map +1 -0
  131. package/dist/client/tools/bindFunctionToolDefs.d.ts +156 -0
  132. package/dist/client/tools/bindFunctionToolDefs.d.ts.map +1 -0
  133. package/dist/client/tools/bindFunctionToolDefs.js +360 -0
  134. package/dist/client/tools/bindFunctionToolDefs.js.map +1 -0
  135. package/dist/client/tools/defineFunctionTool.d.ts +277 -0
  136. package/dist/client/tools/defineFunctionTool.d.ts.map +1 -0
  137. package/dist/client/tools/defineFunctionTool.js +190 -0
  138. package/dist/client/tools/defineFunctionTool.js.map +1 -0
  139. package/dist/client/transport.browser.d.ts +20 -0
  140. package/dist/client/transport.browser.d.ts.map +1 -0
  141. package/dist/client/transport.browser.js +29 -0
  142. package/dist/client/transport.browser.js.map +1 -0
  143. package/dist/client/transport.d.ts +47 -0
  144. package/dist/client/transport.d.ts.map +1 -0
  145. package/dist/client/transport.js +102 -0
  146. package/dist/client/transport.js.map +1 -0
  147. package/dist/client/transport.shared.d.ts +30 -0
  148. package/dist/client/transport.shared.d.ts.map +1 -0
  149. package/dist/client/transport.shared.js +40 -0
  150. package/dist/client/transport.shared.js.map +1 -0
  151. package/dist/client/uuid.d.ts +32 -0
  152. package/dist/client/uuid.d.ts.map +1 -0
  153. package/dist/client/uuid.js +65 -0
  154. package/dist/client/uuid.js.map +1 -0
  155. package/dist/index.d.ts +88 -39
  156. package/dist/index.d.ts.map +1 -1
  157. package/dist/index.js +166 -43
  158. package/dist/index.js.map +1 -1
  159. package/dist/observability/attributes.d.ts +136 -0
  160. package/dist/observability/attributes.d.ts.map +1 -0
  161. package/dist/observability/attributes.js +184 -0
  162. package/dist/observability/attributes.js.map +1 -0
  163. package/dist/observability/index.d.ts +14 -0
  164. package/dist/observability/index.d.ts.map +1 -0
  165. package/dist/observability/index.js +11 -0
  166. package/dist/observability/index.js.map +1 -0
  167. package/dist/observability/resolveOTel.browser.d.ts +13 -0
  168. package/dist/observability/resolveOTel.browser.d.ts.map +1 -0
  169. package/dist/observability/resolveOTel.browser.js +14 -0
  170. package/dist/observability/resolveOTel.browser.js.map +1 -0
  171. package/dist/observability/resolveOTel.d.ts +28 -0
  172. package/dist/observability/resolveOTel.d.ts.map +1 -0
  173. package/dist/observability/resolveOTel.js +74 -0
  174. package/dist/observability/resolveOTel.js.map +1 -0
  175. package/dist/observability/spans.d.ts +198 -0
  176. package/dist/observability/spans.d.ts.map +1 -0
  177. package/dist/observability/spans.js +300 -0
  178. package/dist/observability/spans.js.map +1 -0
  179. package/dist/observability/traceContext.d.ts +51 -0
  180. package/dist/observability/traceContext.d.ts.map +1 -0
  181. package/dist/observability/traceContext.js +151 -0
  182. package/dist/observability/traceContext.js.map +1 -0
  183. package/dist/observability/transportMetrics.d.ts +58 -0
  184. package/dist/observability/transportMetrics.d.ts.map +1 -0
  185. package/dist/observability/transportMetrics.js +55 -0
  186. package/dist/observability/transportMetrics.js.map +1 -0
  187. package/dist/qar/agentSpec.d.ts +93 -0
  188. package/dist/qar/agentSpec.d.ts.map +1 -0
  189. package/dist/qar/agentSpec.js +184 -0
  190. package/dist/qar/agentSpec.js.map +1 -0
  191. package/dist/qar/clientEvents.d.ts +86 -0
  192. package/dist/qar/clientEvents.d.ts.map +1 -0
  193. package/dist/qar/clientEvents.js +36 -0
  194. package/dist/qar/clientEvents.js.map +1 -0
  195. package/dist/qar/envelopes.d.ts +227 -0
  196. package/dist/qar/envelopes.d.ts.map +1 -0
  197. package/dist/qar/envelopes.js +67 -0
  198. package/dist/qar/envelopes.js.map +1 -0
  199. package/dist/qar/generated/envelope.d.ts +332 -0
  200. package/dist/qar/generated/envelope.d.ts.map +1 -0
  201. package/dist/qar/generated/envelope.js +15 -0
  202. package/dist/qar/generated/envelope.js.map +1 -0
  203. package/dist/qar/generated/qar-info.d.ts +76 -0
  204. package/dist/qar/generated/qar-info.d.ts.map +1 -0
  205. package/dist/qar/generated/qar-info.js +15 -0
  206. package/dist/qar/generated/qar-info.js.map +1 -0
  207. package/dist/qar/generated/qodo-task-start-payload.d.ts +54 -0
  208. package/dist/qar/generated/qodo-task-start-payload.d.ts.map +1 -0
  209. package/dist/qar/generated/qodo-task-start-payload.js +15 -0
  210. package/dist/qar/generated/qodo-task-start-payload.js.map +1 -0
  211. package/dist/qar/ids.d.ts +19 -0
  212. package/dist/qar/ids.d.ts.map +1 -0
  213. package/dist/qar/ids.js +11 -0
  214. package/dist/qar/ids.js.map +1 -0
  215. package/dist/qar/index.d.ts +24 -0
  216. package/dist/qar/index.d.ts.map +1 -0
  217. package/dist/qar/index.js +16 -0
  218. package/dist/qar/index.js.map +1 -0
  219. package/dist/qar/info.d.ts +37 -0
  220. package/dist/qar/info.d.ts.map +1 -0
  221. package/dist/qar/info.js +17 -0
  222. package/dist/qar/info.js.map +1 -0
  223. package/dist/qar/json.d.ts +14 -0
  224. package/dist/qar/json.d.ts.map +1 -0
  225. package/dist/qar/json.js +9 -0
  226. package/dist/qar/json.js.map +1 -0
  227. package/dist/qar/payloads.d.ts +480 -0
  228. package/dist/qar/payloads.d.ts.map +1 -0
  229. package/dist/qar/payloads.js +37 -0
  230. package/dist/qar/payloads.js.map +1 -0
  231. package/dist/qar/specs.d.ts +604 -0
  232. package/dist/qar/specs.d.ts.map +1 -0
  233. package/dist/qar/specs.js +29 -0
  234. package/dist/qar/specs.js.map +1 -0
  235. package/dist/qar/taskEvents.d.ts +25 -0
  236. package/dist/qar/taskEvents.d.ts.map +1 -0
  237. package/dist/qar/taskEvents.js +22 -0
  238. package/dist/qar/taskEvents.js.map +1 -0
  239. package/dist/qar/trace.d.ts +12 -0
  240. package/dist/qar/trace.d.ts.map +1 -0
  241. package/dist/qar/trace.js +12 -0
  242. package/dist/qar/trace.js.map +1 -0
  243. package/dist/skills/activation.d.ts +177 -0
  244. package/dist/skills/activation.d.ts.map +1 -0
  245. package/dist/skills/activation.js +428 -0
  246. package/dist/skills/activation.js.map +1 -0
  247. package/dist/skills/cli/index.browser.d.ts +18 -0
  248. package/dist/skills/cli/index.browser.d.ts.map +1 -0
  249. package/dist/skills/cli/index.browser.js +27 -0
  250. package/dist/skills/cli/index.browser.js.map +1 -0
  251. package/dist/skills/cli/index.d.ts +37 -0
  252. package/dist/skills/cli/index.d.ts.map +1 -0
  253. package/dist/skills/cli/index.js +494 -0
  254. package/dist/skills/cli/index.js.map +1 -0
  255. package/dist/skills/events.d.ts +255 -0
  256. package/dist/skills/events.d.ts.map +1 -0
  257. package/dist/skills/events.js +224 -0
  258. package/dist/skills/events.js.map +1 -0
  259. package/dist/skills/index.d.ts +45 -0
  260. package/dist/skills/index.d.ts.map +1 -0
  261. package/dist/skills/index.js +34 -0
  262. package/dist/skills/index.js.map +1 -0
  263. package/dist/skills/inject.d.ts +57 -0
  264. package/dist/skills/inject.d.ts.map +1 -0
  265. package/dist/skills/inject.js +162 -0
  266. package/dist/skills/inject.js.map +1 -0
  267. package/dist/skills/lockfile.browser.d.ts +56 -0
  268. package/dist/skills/lockfile.browser.d.ts.map +1 -0
  269. package/dist/skills/lockfile.browser.js +55 -0
  270. package/dist/skills/lockfile.browser.js.map +1 -0
  271. package/dist/skills/lockfile.d.ts +137 -0
  272. package/dist/skills/lockfile.d.ts.map +1 -0
  273. package/dist/skills/lockfile.js +423 -0
  274. package/dist/skills/lockfile.js.map +1 -0
  275. package/dist/skills/manager.browser.d.ts +94 -0
  276. package/dist/skills/manager.browser.d.ts.map +1 -0
  277. package/dist/skills/manager.browser.js +159 -0
  278. package/dist/skills/manager.browser.js.map +1 -0
  279. package/dist/skills/manager.d.ts +362 -0
  280. package/dist/skills/manager.d.ts.map +1 -0
  281. package/dist/skills/manager.js +1386 -0
  282. package/dist/skills/manager.js.map +1 -0
  283. package/dist/skills/mcp/index.d.ts +15 -0
  284. package/dist/skills/mcp/index.d.ts.map +1 -0
  285. package/dist/skills/mcp/index.js +12 -0
  286. package/dist/skills/mcp/index.js.map +1 -0
  287. package/dist/skills/mcp/path.browser.d.ts +27 -0
  288. package/dist/skills/mcp/path.browser.d.ts.map +1 -0
  289. package/dist/skills/mcp/path.browser.js +33 -0
  290. package/dist/skills/mcp/path.browser.js.map +1 -0
  291. package/dist/skills/mcp/path.d.ts +57 -0
  292. package/dist/skills/mcp/path.d.ts.map +1 -0
  293. package/dist/skills/mcp/path.js +150 -0
  294. package/dist/skills/mcp/path.js.map +1 -0
  295. package/dist/skills/mcp/server.browser.d.ts +32 -0
  296. package/dist/skills/mcp/server.browser.d.ts.map +1 -0
  297. package/dist/skills/mcp/server.browser.js +53 -0
  298. package/dist/skills/mcp/server.browser.js.map +1 -0
  299. package/dist/skills/mcp/server.d.ts +144 -0
  300. package/dist/skills/mcp/server.d.ts.map +1 -0
  301. package/dist/skills/mcp/server.js +841 -0
  302. package/dist/skills/mcp/server.js.map +1 -0
  303. package/dist/skills/mcp/types.d.ts +72 -0
  304. package/dist/skills/mcp/types.d.ts.map +1 -0
  305. package/dist/skills/mcp/types.js +20 -0
  306. package/dist/skills/mcp/types.js.map +1 -0
  307. package/dist/skills/mcp/wireDefs.d.ts +58 -0
  308. package/dist/skills/mcp/wireDefs.d.ts.map +1 -0
  309. package/dist/skills/mcp/wireDefs.js +141 -0
  310. package/dist/skills/mcp/wireDefs.js.map +1 -0
  311. package/dist/skills/parser.d.ts +63 -0
  312. package/dist/skills/parser.d.ts.map +1 -0
  313. package/dist/skills/parser.js +755 -0
  314. package/dist/skills/parser.js.map +1 -0
  315. package/dist/skills/prefilter.d.ts +104 -0
  316. package/dist/skills/prefilter.d.ts.map +1 -0
  317. package/dist/skills/prefilter.js +398 -0
  318. package/dist/skills/prefilter.js.map +1 -0
  319. package/dist/skills/preprocess.d.ts +169 -0
  320. package/dist/skills/preprocess.d.ts.map +1 -0
  321. package/dist/skills/preprocess.js +535 -0
  322. package/dist/skills/preprocess.js.map +1 -0
  323. package/dist/skills/render.d.ts +83 -0
  324. package/dist/skills/render.d.ts.map +1 -0
  325. package/dist/skills/render.js +397 -0
  326. package/dist/skills/render.js.map +1 -0
  327. package/dist/skills/sources/index.browser.d.ts +29 -0
  328. package/dist/skills/sources/index.browser.d.ts.map +1 -0
  329. package/dist/skills/sources/index.browser.js +16 -0
  330. package/dist/skills/sources/index.browser.js.map +1 -0
  331. package/dist/skills/sources/index.d.ts +59 -0
  332. package/dist/skills/sources/index.d.ts.map +1 -0
  333. package/dist/skills/sources/index.js +471 -0
  334. package/dist/skills/sources/index.js.map +1 -0
  335. package/dist/skills/sources/walk.browser.d.ts +17 -0
  336. package/dist/skills/sources/walk.browser.d.ts.map +1 -0
  337. package/dist/skills/sources/walk.browser.js +19 -0
  338. package/dist/skills/sources/walk.browser.js.map +1 -0
  339. package/dist/skills/sources/walk.d.ts +68 -0
  340. package/dist/skills/sources/walk.d.ts.map +1 -0
  341. package/dist/skills/sources/walk.js +264 -0
  342. package/dist/skills/sources/walk.js.map +1 -0
  343. package/dist/skills/substitute.d.ts +87 -0
  344. package/dist/skills/substitute.d.ts.map +1 -0
  345. package/dist/skills/substitute.js +322 -0
  346. package/dist/skills/substitute.js.map +1 -0
  347. package/dist/skills/testing/SkillKit.browser.d.ts +62 -0
  348. package/dist/skills/testing/SkillKit.browser.d.ts.map +1 -0
  349. package/dist/skills/testing/SkillKit.browser.js +41 -0
  350. package/dist/skills/testing/SkillKit.browser.js.map +1 -0
  351. package/dist/skills/testing/SkillKit.d.ts +130 -0
  352. package/dist/skills/testing/SkillKit.d.ts.map +1 -0
  353. package/dist/skills/testing/SkillKit.js +316 -0
  354. package/dist/skills/testing/SkillKit.js.map +1 -0
  355. package/dist/skills/testing/index.d.ts +9 -0
  356. package/dist/skills/testing/index.d.ts.map +1 -0
  357. package/dist/skills/testing/index.js +8 -0
  358. package/dist/skills/testing/index.js.map +1 -0
  359. package/dist/skills/trust.d.ts +72 -0
  360. package/dist/skills/trust.d.ts.map +1 -0
  361. package/dist/skills/trust.js +183 -0
  362. package/dist/skills/trust.js.map +1 -0
  363. package/dist/skills/types.d.ts +627 -0
  364. package/dist/skills/types.d.ts.map +1 -0
  365. package/dist/skills/types.js +85 -0
  366. package/dist/skills/types.js.map +1 -0
  367. package/dist/skills/validator.d.ts +95 -0
  368. package/dist/skills/validator.d.ts.map +1 -0
  369. package/dist/skills/validator.js +486 -0
  370. package/dist/skills/validator.js.map +1 -0
  371. package/dist/tracing/PipelineTracer.d.ts +35 -22
  372. package/dist/tracing/PipelineTracer.d.ts.map +1 -1
  373. package/dist/tracing/PipelineTracer.js +106 -61
  374. package/dist/tracing/PipelineTracer.js.map +1 -1
  375. package/dist/tracing/SdkTracer.d.ts +63 -61
  376. package/dist/tracing/SdkTracer.d.ts.map +1 -1
  377. package/dist/tracing/SdkTracer.js +185 -177
  378. package/dist/tracing/SdkTracer.js.map +1 -1
  379. package/dist/tracing/index.d.ts +10 -1
  380. package/dist/tracing/index.d.ts.map +1 -1
  381. package/dist/tracing/index.js +9 -0
  382. package/dist/tracing/index.js.map +1 -1
  383. package/dist/tracing/types.d.ts +89 -16
  384. package/dist/tracing/types.d.ts.map +1 -1
  385. package/dist/tracing/types.js +17 -4
  386. package/dist/tracing/types.js.map +1 -1
  387. package/dist/types.d.ts +6 -1
  388. package/dist/types.d.ts.map +1 -1
  389. package/dist/types.js +4 -0
  390. package/dist/types.js.map +1 -1
  391. package/dist/version.d.ts.map +1 -1
  392. package/dist/version.js +10 -20
  393. package/dist/version.js.map +1 -1
  394. package/package.json +53 -39
  395. package/.claude/skills/qodo-agent/SKILL.md +0 -974
  396. package/.claude/skills/qodo-agent/assets/programmatic-agent.ts +0 -407
  397. package/.claude/skills/qodo-agent/references/builtin-tools.md +0 -342
  398. package/.claude/skills/qodo-agent/references/common-issues.md +0 -537
  399. package/bin/rg +0 -0
  400. package/dist/api/agent.d.ts +0 -105
  401. package/dist/api/agent.d.ts.map +0 -1
  402. package/dist/api/agent.js +0 -963
  403. package/dist/api/agent.js.map +0 -1
  404. package/dist/api/analytics.d.ts +0 -43
  405. package/dist/api/analytics.d.ts.map +0 -1
  406. package/dist/api/analytics.js +0 -163
  407. package/dist/api/analytics.js.map +0 -1
  408. package/dist/api/http.d.ts +0 -5
  409. package/dist/api/http.d.ts.map +0 -1
  410. package/dist/api/http.js +0 -62
  411. package/dist/api/http.js.map +0 -1
  412. package/dist/api/index.d.ts +0 -12
  413. package/dist/api/index.d.ts.map +0 -1
  414. package/dist/api/index.js +0 -17
  415. package/dist/api/index.js.map +0 -1
  416. package/dist/api/taskTracking.d.ts +0 -54
  417. package/dist/api/taskTracking.d.ts.map +0 -1
  418. package/dist/api/taskTracking.js +0 -208
  419. package/dist/api/taskTracking.js.map +0 -1
  420. package/dist/api/types.d.ts +0 -93
  421. package/dist/api/types.d.ts.map +0 -1
  422. package/dist/api/types.js +0 -2
  423. package/dist/api/types.js.map +0 -1
  424. package/dist/api/utils.d.ts +0 -8
  425. package/dist/api/utils.d.ts.map +0 -1
  426. package/dist/api/utils.js +0 -63
  427. package/dist/api/utils.js.map +0 -1
  428. package/dist/api/websocket.d.ts +0 -203
  429. package/dist/api/websocket.d.ts.map +0 -1
  430. package/dist/api/websocket.js +0 -1166
  431. package/dist/api/websocket.js.map +0 -1
  432. package/dist/bin/install-skill.d.ts +0 -14
  433. package/dist/bin/install-skill.d.ts.map +0 -1
  434. package/dist/bin/install-skill.js +0 -125
  435. package/dist/bin/install-skill.js.map +0 -1
  436. package/dist/bin/run-helpers.d.ts +0 -34
  437. package/dist/bin/run-helpers.d.ts.map +0 -1
  438. package/dist/bin/run-helpers.js +0 -186
  439. package/dist/bin/run-helpers.js.map +0 -1
  440. package/dist/bin/run.d.ts +0 -13
  441. package/dist/bin/run.d.ts.map +0 -1
  442. package/dist/bin/run.js +0 -57
  443. package/dist/bin/run.js.map +0 -1
  444. package/dist/clients/index.d.ts +0 -10
  445. package/dist/clients/index.d.ts.map +0 -1
  446. package/dist/clients/index.js +0 -8
  447. package/dist/clients/index.js.map +0 -1
  448. package/dist/clients/info/InfoClient.d.ts +0 -37
  449. package/dist/clients/info/InfoClient.d.ts.map +0 -1
  450. package/dist/clients/info/InfoClient.js +0 -69
  451. package/dist/clients/info/InfoClient.js.map +0 -1
  452. package/dist/clients/info/index.d.ts +0 -4
  453. package/dist/clients/info/index.d.ts.map +0 -1
  454. package/dist/clients/info/index.js +0 -2
  455. package/dist/clients/info/index.js.map +0 -1
  456. package/dist/clients/info/types.d.ts +0 -21
  457. package/dist/clients/info/types.d.ts.map +0 -1
  458. package/dist/clients/info/types.js +0 -2
  459. package/dist/clients/info/types.js.map +0 -1
  460. package/dist/clients/sessions/SessionsClient.d.ts +0 -34
  461. package/dist/clients/sessions/SessionsClient.d.ts.map +0 -1
  462. package/dist/clients/sessions/SessionsClient.js +0 -71
  463. package/dist/clients/sessions/SessionsClient.js.map +0 -1
  464. package/dist/clients/sessions/index.d.ts +0 -4
  465. package/dist/clients/sessions/index.d.ts.map +0 -1
  466. package/dist/clients/sessions/index.js +0 -2
  467. package/dist/clients/sessions/index.js.map +0 -1
  468. package/dist/clients/sessions/types.d.ts +0 -20
  469. package/dist/clients/sessions/types.d.ts.map +0 -1
  470. package/dist/clients/sessions/types.js +0 -2
  471. package/dist/clients/sessions/types.js.map +0 -1
  472. package/dist/clients/tools/ToolsClient.d.ts +0 -39
  473. package/dist/clients/tools/ToolsClient.d.ts.map +0 -1
  474. package/dist/clients/tools/ToolsClient.js +0 -95
  475. package/dist/clients/tools/ToolsClient.js.map +0 -1
  476. package/dist/clients/tools/index.d.ts +0 -4
  477. package/dist/clients/tools/index.d.ts.map +0 -1
  478. package/dist/clients/tools/index.js +0 -2
  479. package/dist/clients/tools/index.js.map +0 -1
  480. package/dist/clients/tools/types.d.ts +0 -14
  481. package/dist/clients/tools/types.d.ts.map +0 -1
  482. package/dist/clients/tools/types.js +0 -2
  483. package/dist/clients/tools/types.js.map +0 -1
  484. package/dist/config/ConfigManager.d.ts +0 -43
  485. package/dist/config/ConfigManager.d.ts.map +0 -1
  486. package/dist/config/ConfigManager.js +0 -472
  487. package/dist/config/ConfigManager.js.map +0 -1
  488. package/dist/config/index.d.ts +0 -6
  489. package/dist/config/index.d.ts.map +0 -1
  490. package/dist/config/index.js +0 -7
  491. package/dist/config/index.js.map +0 -1
  492. package/dist/config/urlConfig.d.ts +0 -15
  493. package/dist/config/urlConfig.d.ts.map +0 -1
  494. package/dist/config/urlConfig.js +0 -75
  495. package/dist/config/urlConfig.js.map +0 -1
  496. package/dist/constants/errors.d.ts +0 -2
  497. package/dist/constants/errors.d.ts.map +0 -1
  498. package/dist/constants/errors.js +0 -2
  499. package/dist/constants/errors.js.map +0 -1
  500. package/dist/constants/index.d.ts +0 -7
  501. package/dist/constants/index.d.ts.map +0 -1
  502. package/dist/constants/index.js +0 -11
  503. package/dist/constants/index.js.map +0 -1
  504. package/dist/constants/tools.d.ts +0 -4
  505. package/dist/constants/tools.d.ts.map +0 -1
  506. package/dist/constants/tools.js +0 -4
  507. package/dist/constants/tools.js.map +0 -1
  508. package/dist/constants/versions.d.ts +0 -2
  509. package/dist/constants/versions.d.ts.map +0 -1
  510. package/dist/constants/versions.js +0 -2
  511. package/dist/constants/versions.js.map +0 -1
  512. package/dist/context/buildUserContext.d.ts +0 -18
  513. package/dist/context/buildUserContext.d.ts.map +0 -1
  514. package/dist/context/buildUserContext.js +0 -34
  515. package/dist/context/buildUserContext.js.map +0 -1
  516. package/dist/context/index.d.ts +0 -9
  517. package/dist/context/index.d.ts.map +0 -1
  518. package/dist/context/index.js +0 -9
  519. package/dist/context/index.js.map +0 -1
  520. package/dist/context/messageManager.d.ts +0 -42
  521. package/dist/context/messageManager.d.ts.map +0 -1
  522. package/dist/context/messageManager.js +0 -322
  523. package/dist/context/messageManager.js.map +0 -1
  524. package/dist/context/taskFocus.d.ts +0 -2
  525. package/dist/context/taskFocus.d.ts.map +0 -1
  526. package/dist/context/taskFocus.js +0 -26
  527. package/dist/context/taskFocus.js.map +0 -1
  528. package/dist/context/userInput.d.ts +0 -3
  529. package/dist/context/userInput.d.ts.map +0 -1
  530. package/dist/context/userInput.js +0 -20
  531. package/dist/context/userInput.js.map +0 -1
  532. package/dist/mcp/MCPManager.d.ts +0 -109
  533. package/dist/mcp/MCPManager.d.ts.map +0 -1
  534. package/dist/mcp/MCPManager.js +0 -592
  535. package/dist/mcp/MCPManager.js.map +0 -1
  536. package/dist/mcp/approvedTools.d.ts +0 -4
  537. package/dist/mcp/approvedTools.d.ts.map +0 -1
  538. package/dist/mcp/approvedTools.js +0 -19
  539. package/dist/mcp/approvedTools.js.map +0 -1
  540. package/dist/mcp/baseServer.d.ts +0 -75
  541. package/dist/mcp/baseServer.d.ts.map +0 -1
  542. package/dist/mcp/baseServer.js +0 -107
  543. package/dist/mcp/baseServer.js.map +0 -1
  544. package/dist/mcp/builtinServers.d.ts +0 -15
  545. package/dist/mcp/builtinServers.d.ts.map +0 -1
  546. package/dist/mcp/builtinServers.js +0 -141
  547. package/dist/mcp/builtinServers.js.map +0 -1
  548. package/dist/mcp/dynamicBEServer.d.ts +0 -20
  549. package/dist/mcp/dynamicBEServer.d.ts.map +0 -1
  550. package/dist/mcp/dynamicBEServer.js +0 -52
  551. package/dist/mcp/dynamicBEServer.js.map +0 -1
  552. package/dist/mcp/index.d.ts +0 -18
  553. package/dist/mcp/index.d.ts.map +0 -1
  554. package/dist/mcp/index.js +0 -23
  555. package/dist/mcp/index.js.map +0 -1
  556. package/dist/mcp/mcpInitialization.d.ts +0 -2
  557. package/dist/mcp/mcpInitialization.d.ts.map +0 -1
  558. package/dist/mcp/mcpInitialization.js +0 -56
  559. package/dist/mcp/mcpInitialization.js.map +0 -1
  560. package/dist/mcp/servers/filesystem.d.ts +0 -44
  561. package/dist/mcp/servers/filesystem.d.ts.map +0 -1
  562. package/dist/mcp/servers/filesystem.js +0 -776
  563. package/dist/mcp/servers/filesystem.js.map +0 -1
  564. package/dist/mcp/servers/git.d.ts +0 -18
  565. package/dist/mcp/servers/git.d.ts.map +0 -1
  566. package/dist/mcp/servers/git.js +0 -441
  567. package/dist/mcp/servers/git.js.map +0 -1
  568. package/dist/mcp/servers/ripgrep.d.ts +0 -39
  569. package/dist/mcp/servers/ripgrep.d.ts.map +0 -1
  570. package/dist/mcp/servers/ripgrep.js +0 -550
  571. package/dist/mcp/servers/ripgrep.js.map +0 -1
  572. package/dist/mcp/servers/shell.d.ts +0 -20
  573. package/dist/mcp/servers/shell.d.ts.map +0 -1
  574. package/dist/mcp/servers/shell.js +0 -519
  575. package/dist/mcp/servers/shell.js.map +0 -1
  576. package/dist/mcp/serversRegistry.d.ts +0 -55
  577. package/dist/mcp/serversRegistry.d.ts.map +0 -1
  578. package/dist/mcp/serversRegistry.js +0 -416
  579. package/dist/mcp/serversRegistry.js.map +0 -1
  580. package/dist/mcp/toolProcessor.d.ts +0 -82
  581. package/dist/mcp/toolProcessor.d.ts.map +0 -1
  582. package/dist/mcp/toolProcessor.js +0 -392
  583. package/dist/mcp/toolProcessor.js.map +0 -1
  584. package/dist/mcp/types.d.ts +0 -29
  585. package/dist/mcp/types.d.ts.map +0 -1
  586. package/dist/mcp/types.js +0 -2
  587. package/dist/mcp/types.js.map +0 -1
  588. package/dist/messages/index.d.ts +0 -8
  589. package/dist/messages/index.d.ts.map +0 -1
  590. package/dist/messages/index.js +0 -7
  591. package/dist/messages/index.js.map +0 -1
  592. package/dist/messages/openai.d.ts +0 -26
  593. package/dist/messages/openai.d.ts.map +0 -1
  594. package/dist/messages/openai.js +0 -55
  595. package/dist/messages/openai.js.map +0 -1
  596. package/dist/messages/types.d.ts +0 -73
  597. package/dist/messages/types.d.ts.map +0 -1
  598. package/dist/messages/types.js +0 -78
  599. package/dist/messages/types.js.map +0 -1
  600. package/dist/parser/index.d.ts +0 -72
  601. package/dist/parser/index.d.ts.map +0 -1
  602. package/dist/parser/index.js +0 -967
  603. package/dist/parser/index.js.map +0 -1
  604. package/dist/parser/types.d.ts +0 -153
  605. package/dist/parser/types.d.ts.map +0 -1
  606. package/dist/parser/types.js +0 -6
  607. package/dist/parser/types.js.map +0 -1
  608. package/dist/parser/utils.d.ts +0 -18
  609. package/dist/parser/utils.d.ts.map +0 -1
  610. package/dist/parser/utils.js +0 -64
  611. package/dist/parser/utils.js.map +0 -1
  612. package/dist/sdk/QodoSDK.d.ts +0 -218
  613. package/dist/sdk/QodoSDK.d.ts.map +0 -1
  614. package/dist/sdk/QodoSDK.js +0 -1115
  615. package/dist/sdk/QodoSDK.js.map +0 -1
  616. package/dist/sdk/artifacts.d.ts +0 -156
  617. package/dist/sdk/artifacts.d.ts.map +0 -1
  618. package/dist/sdk/artifacts.js +0 -166
  619. package/dist/sdk/artifacts.js.map +0 -1
  620. package/dist/sdk/bootstrap.d.ts +0 -16
  621. package/dist/sdk/bootstrap.d.ts.map +0 -1
  622. package/dist/sdk/bootstrap.js +0 -28
  623. package/dist/sdk/bootstrap.js.map +0 -1
  624. package/dist/sdk/builders.d.ts +0 -54
  625. package/dist/sdk/builders.d.ts.map +0 -1
  626. package/dist/sdk/builders.js +0 -117
  627. package/dist/sdk/builders.js.map +0 -1
  628. package/dist/sdk/defaults.d.ts +0 -11
  629. package/dist/sdk/defaults.d.ts.map +0 -1
  630. package/dist/sdk/defaults.js +0 -39
  631. package/dist/sdk/defaults.js.map +0 -1
  632. package/dist/sdk/discovery.d.ts +0 -2
  633. package/dist/sdk/discovery.d.ts.map +0 -1
  634. package/dist/sdk/discovery.js +0 -25
  635. package/dist/sdk/discovery.js.map +0 -1
  636. package/dist/sdk/events.d.ts +0 -269
  637. package/dist/sdk/events.d.ts.map +0 -1
  638. package/dist/sdk/events.js +0 -69
  639. package/dist/sdk/events.js.map +0 -1
  640. package/dist/sdk/exit-expression.d.ts +0 -13
  641. package/dist/sdk/exit-expression.d.ts.map +0 -1
  642. package/dist/sdk/exit-expression.js +0 -35
  643. package/dist/sdk/exit-expression.js.map +0 -1
  644. package/dist/sdk/index.d.ts +0 -17
  645. package/dist/sdk/index.d.ts.map +0 -1
  646. package/dist/sdk/index.js +0 -17
  647. package/dist/sdk/index.js.map +0 -1
  648. package/dist/sdk/middleware.d.ts +0 -59
  649. package/dist/sdk/middleware.d.ts.map +0 -1
  650. package/dist/sdk/middleware.js +0 -69
  651. package/dist/sdk/middleware.js.map +0 -1
  652. package/dist/sdk/pipeline/PipelineBuilder.d.ts +0 -79
  653. package/dist/sdk/pipeline/PipelineBuilder.d.ts.map +0 -1
  654. package/dist/sdk/pipeline/PipelineBuilder.js +0 -129
  655. package/dist/sdk/pipeline/PipelineBuilder.js.map +0 -1
  656. package/dist/sdk/pipeline/PipelineRunner.d.ts +0 -28
  657. package/dist/sdk/pipeline/PipelineRunner.d.ts.map +0 -1
  658. package/dist/sdk/pipeline/PipelineRunner.js +0 -326
  659. package/dist/sdk/pipeline/PipelineRunner.js.map +0 -1
  660. package/dist/sdk/pipeline/compiler.d.ts +0 -24
  661. package/dist/sdk/pipeline/compiler.d.ts.map +0 -1
  662. package/dist/sdk/pipeline/compiler.js +0 -199
  663. package/dist/sdk/pipeline/compiler.js.map +0 -1
  664. package/dist/sdk/pipeline/declarative.d.ts +0 -34
  665. package/dist/sdk/pipeline/declarative.d.ts.map +0 -1
  666. package/dist/sdk/pipeline/declarative.js +0 -9
  667. package/dist/sdk/pipeline/declarative.js.map +0 -1
  668. package/dist/sdk/pipeline/index.d.ts +0 -20
  669. package/dist/sdk/pipeline/index.d.ts.map +0 -1
  670. package/dist/sdk/pipeline/index.js +0 -19
  671. package/dist/sdk/pipeline/index.js.map +0 -1
  672. package/dist/sdk/pipeline/types.d.ts +0 -93
  673. package/dist/sdk/pipeline/types.d.ts.map +0 -1
  674. package/dist/sdk/pipeline/types.js +0 -10
  675. package/dist/sdk/pipeline/types.js.map +0 -1
  676. package/dist/sdk/policies.d.ts +0 -163
  677. package/dist/sdk/policies.d.ts.map +0 -1
  678. package/dist/sdk/policies.js +0 -243
  679. package/dist/sdk/policies.js.map +0 -1
  680. package/dist/sdk/runner/AgentRunner.d.ts +0 -22
  681. package/dist/sdk/runner/AgentRunner.d.ts.map +0 -1
  682. package/dist/sdk/runner/AgentRunner.js +0 -222
  683. package/dist/sdk/runner/AgentRunner.js.map +0 -1
  684. package/dist/sdk/runner/finalize.d.ts +0 -56
  685. package/dist/sdk/runner/finalize.d.ts.map +0 -1
  686. package/dist/sdk/runner/finalize.js +0 -155
  687. package/dist/sdk/runner/finalize.js.map +0 -1
  688. package/dist/sdk/runner/formats.d.ts +0 -7
  689. package/dist/sdk/runner/formats.d.ts.map +0 -1
  690. package/dist/sdk/runner/formats.js +0 -76
  691. package/dist/sdk/runner/formats.js.map +0 -1
  692. package/dist/sdk/runner/index.d.ts +0 -9
  693. package/dist/sdk/runner/index.d.ts.map +0 -1
  694. package/dist/sdk/runner/index.js +0 -9
  695. package/dist/sdk/runner/index.js.map +0 -1
  696. package/dist/sdk/runner/progress.d.ts +0 -3
  697. package/dist/sdk/runner/progress.d.ts.map +0 -1
  698. package/dist/sdk/runner/progress.js +0 -16
  699. package/dist/sdk/runner/progress.js.map +0 -1
  700. package/dist/sdk/schemas.d.ts +0 -72
  701. package/dist/sdk/schemas.d.ts.map +0 -1
  702. package/dist/sdk/schemas.js +0 -282
  703. package/dist/sdk/schemas.js.map +0 -1
  704. package/dist/sdk/trigger-context.d.ts +0 -24
  705. package/dist/sdk/trigger-context.d.ts.map +0 -1
  706. package/dist/sdk/trigger-context.js +0 -136
  707. package/dist/sdk/trigger-context.js.map +0 -1
  708. package/dist/session/SessionContext.d.ts +0 -89
  709. package/dist/session/SessionContext.d.ts.map +0 -1
  710. package/dist/session/SessionContext.js +0 -410
  711. package/dist/session/SessionContext.js.map +0 -1
  712. package/dist/session/environment.d.ts +0 -52
  713. package/dist/session/environment.d.ts.map +0 -1
  714. package/dist/session/environment.js +0 -27
  715. package/dist/session/environment.js.map +0 -1
  716. package/dist/session/history.d.ts +0 -18
  717. package/dist/session/history.d.ts.map +0 -1
  718. package/dist/session/history.js +0 -68
  719. package/dist/session/history.js.map +0 -1
  720. package/dist/session/index.d.ts +0 -10
  721. package/dist/session/index.d.ts.map +0 -1
  722. package/dist/session/index.js +0 -9
  723. package/dist/session/index.js.map +0 -1
  724. package/dist/session/serverData.d.ts +0 -38
  725. package/dist/session/serverData.d.ts.map +0 -1
  726. package/dist/session/serverData.js +0 -261
  727. package/dist/session/serverData.js.map +0 -1
  728. package/dist/tracing/pipelineHelpers.d.ts +0 -29
  729. package/dist/tracing/pipelineHelpers.d.ts.map +0 -1
  730. package/dist/tracing/pipelineHelpers.js +0 -224
  731. package/dist/tracing/pipelineHelpers.js.map +0 -1
  732. package/dist/tracking/Tracker.d.ts +0 -55
  733. package/dist/tracking/Tracker.d.ts.map +0 -1
  734. package/dist/tracking/Tracker.js +0 -217
  735. package/dist/tracking/Tracker.js.map +0 -1
  736. package/dist/tracking/index.d.ts +0 -8
  737. package/dist/tracking/index.d.ts.map +0 -1
  738. package/dist/tracking/index.js +0 -8
  739. package/dist/tracking/index.js.map +0 -1
  740. package/dist/tracking/schemas.d.ts +0 -292
  741. package/dist/tracking/schemas.d.ts.map +0 -1
  742. package/dist/tracking/schemas.js +0 -91
  743. package/dist/tracking/schemas.js.map +0 -1
  744. package/dist/utils/extractSetFlags.d.ts +0 -6
  745. package/dist/utils/extractSetFlags.d.ts.map +0 -1
  746. package/dist/utils/extractSetFlags.js +0 -16
  747. package/dist/utils/extractSetFlags.js.map +0 -1
  748. package/dist/utils/formatTimeAgo.d.ts +0 -2
  749. package/dist/utils/formatTimeAgo.d.ts.map +0 -1
  750. package/dist/utils/formatTimeAgo.js +0 -20
  751. package/dist/utils/formatTimeAgo.js.map +0 -1
  752. package/dist/utils/index.d.ts +0 -12
  753. package/dist/utils/index.d.ts.map +0 -1
  754. package/dist/utils/index.js +0 -12
  755. package/dist/utils/index.js.map +0 -1
  756. package/dist/utils/machineId.d.ts +0 -14
  757. package/dist/utils/machineId.d.ts.map +0 -1
  758. package/dist/utils/machineId.js +0 -66
  759. package/dist/utils/machineId.js.map +0 -1
  760. package/dist/utils/pathUtils.d.ts +0 -22
  761. package/dist/utils/pathUtils.d.ts.map +0 -1
  762. package/dist/utils/pathUtils.js +0 -54
  763. package/dist/utils/pathUtils.js.map +0 -1
  764. package/scripts/download-ripgrep.js +0 -269
@@ -0,0 +1,735 @@
1
+ /**
2
+ * Error classes thrown by the SDK 2.0 client surface.
3
+ */
4
+ /**
5
+ * Thrown by API surfaces whose bodies haven't landed yet. Loud-but-typed —
6
+ * the `ticket` field tells callers which work item fills this method's
7
+ * body so they can wait for the right milestone.
8
+ */
9
+ export declare class QodoNotImplementedError extends Error {
10
+ /** Always `'QodoNotImplementedError'`. */
11
+ readonly name = "QodoNotImplementedError";
12
+ /** Human-readable name of the API surface that's not yet implemented. */
13
+ readonly api: string;
14
+ /** Ticket ID that fills this stub. */
15
+ readonly ticket: string;
16
+ constructor(api: string, ticket: string);
17
+ }
18
+ /**
19
+ * Thrown when consumer code drives the client into an invalid state at
20
+ * construction time (bad URL, missing required option). Distinct from
21
+ * `QodoNotImplementedError` because this is a real validation failure.
22
+ */
23
+ export declare class QodoClientOptionsError extends Error {
24
+ readonly name = "QodoClientOptionsError";
25
+ constructor(message: string);
26
+ }
27
+ /**
28
+ * Thrown by `tasks.cancel` when the consumer-supplied `AbortSignal`
29
+ * short-circuits the cancel. Distinct from the generic "connection closed
30
+ * before task.done arrived" failure shape so consumers can branch on
31
+ * intentional abort vs. server-side cancel failure.
32
+ *
33
+ * `kind` distinguishes two scenarios with materially different wire
34
+ * effects:
35
+ *
36
+ * - `'pre_aborted'`: signal was already aborted at the call site.
37
+ * NO wire `task.cancel` was emitted (and nothing else). The
38
+ * consumer can safely treat the task as untouched by this call.
39
+ * Because `tasks.cancel` is async, this surfaces as a rejected
40
+ * Promise — `try / catch` around `await tasks.cancel(...)` is
41
+ * the consumer-side pattern, identical to the post-send-abort
42
+ * case below.
43
+ *
44
+ * - `'aborted_after_send'`: the wire `task.cancel` was already on
45
+ * the wire when the signal aborted. The server's terminal
46
+ * `task.done` still arrives on the task's own subscription
47
+ * (initiated by `tasks.start` / `tasks.continue`); only the
48
+ * wait inside `tasks.cancel` was abandoned.
49
+ *
50
+ * Carries `taskId` so consumers can match the throw against their own
51
+ * task-id state without parsing the message.
52
+ */
53
+ export declare class QodoCancelAbortedError extends Error {
54
+ readonly name = "QodoCancelAbortedError";
55
+ readonly taskId: string;
56
+ readonly kind: 'pre_aborted' | 'aborted_after_send';
57
+ constructor(kind: 'pre_aborted' | 'aborted_after_send', taskId: string, reason?: unknown);
58
+ }
59
+ /**
60
+ * Thrown synchronously by `tasks.cancel` / `tasks.continue` /
61
+ * `tasks.resubscribe` / `tools.respond` when the SDK can't determine the
62
+ * per-Task / per-ToolCall `session_id` locally AND the caller didn't pass
63
+ * the explicit `sessionId` option.
64
+ *
65
+ * Surfaces locally before the wire write so the remediation lands in the
66
+ * error message rather than in a wire round-trip's
67
+ * `session_mismatch` rejection:
68
+ *
69
+ * - For cross-process recovery: hydrate `{ taskId, sessionId }` from
70
+ * durable storage and pass `sessionId` in the cold-address options.
71
+ * - For HITL respond after restart: same shape via
72
+ * `client.tools.respond(node, response, { sessionId })`.
73
+ *
74
+ * `kind` is a stable discriminator (`'task'` for the three task ongoing
75
+ * envelopes; `'tool_call'` for `tools.respond`) so consumer logging /
76
+ * branching can pick the right hydration path without parsing the message.
77
+ */
78
+ export declare class QodoColdAddressError extends Error {
79
+ readonly name = "QodoColdAddressError";
80
+ readonly kind: 'task' | 'tool_call';
81
+ readonly addressId: string;
82
+ constructor(kind: 'task' | 'tool_call', addressId: string);
83
+ }
84
+ /**
85
+ * Client-side `idempotency_key` validation failure.
86
+ *
87
+ * Thrown synchronously by `tasks.start` / `tasks.startWithAgent` /
88
+ * `tasks.startWithGraph` BEFORE the wire write when the consumer-supplied
89
+ * `idempotencyKey` violates the wire contract (1–512 **Unicode code
90
+ * points** — counted by `[...str].length`, not UTF-16 code units — and no
91
+ * NUL byte). Mirrors QAR's Pydantic `Field(min_length=1, max_length=512,
92
+ * pattern=r"^[^\x00]+$")` on `TaskStartPayload.idempotency_key` so a bad
93
+ * value fails fast on the SDK side without waiting for the wire round-trip.
94
+ *
95
+ * The `reason` field is a stable discriminator (`'too_short'`, `'too_long'`,
96
+ * `'contains_nul'`) so test assertions and downstream consumer error
97
+ * handling can branch without parsing the human message.
98
+ */
99
+ export declare class QodoIdempotencyKeyValidationError extends Error {
100
+ readonly name = "QodoIdempotencyKeyValidationError";
101
+ readonly reason: 'too_short' | 'too_long' | 'contains_nul';
102
+ readonly codePoints: number;
103
+ constructor(reason: 'too_short' | 'too_long' | 'contains_nul', codePoints: number);
104
+ }
105
+ /**
106
+ * Thrown synchronously by {@link TaskClient.continueOrStart} when the
107
+ * `graphSpec` argument is `undefined`. The helper requires a graphSpec
108
+ * to handle the fresh-dispatch branch; consumers without one on hand
109
+ * should reach for {@link TaskClient.continue} (if they already have a
110
+ * `taskId`) or {@link TaskClient.forceResume} (if they only have the
111
+ * `idempotencyKey` and want stuck-session recovery).
112
+ *
113
+ * Carries the rejected `idempotencyKey` so error-handling code can
114
+ * surface which session-derivation key triggered the throw.
115
+ */
116
+ export declare class RequiredGraphSpecError extends Error {
117
+ readonly name = "RequiredGraphSpecError";
118
+ readonly idempotencyKey: string;
119
+ constructor(idempotencyKey: string);
120
+ }
121
+ /**
122
+ * Thrown at the transport seam for inputs that would crash the underlying
123
+ * WebSocket library. Today this is just the RFC 6455 close-frame reason
124
+ * cap — a custom caller synthesizing a reason longer than 123 UTF-8
125
+ * bytes gets a typed SDK error rather than an opaque `ws` crash. The
126
+ * class is the home for any future transport-seam validation.
127
+ */
128
+ export declare class QodoTransportError extends Error {
129
+ readonly name = "QodoTransportError";
130
+ constructor(message: string);
131
+ }
132
+ /**
133
+ * Thrown when an outbound `task.start` / `task.continue` is rejected because
134
+ * the connection is in `flow.pause` state and the paused queue has already
135
+ * reached its cap. The matching wire-level taxonomy is
136
+ * `sdk.error { code: 'flow_backlog_exceeded' }`.
137
+ *
138
+ * Pathological case: under healthy traffic only one or two envelopes ever
139
+ * queue before `flow.resume` arrives. Hitting the cap means the consumer is
140
+ * driving the client far above QAR's per-session in-flight ceiling — backing
141
+ * off and waiting for `flow.resume` is the correct response.
142
+ */
143
+ export declare class QodoBackpressureError extends Error {
144
+ readonly name = "QodoBackpressureError";
145
+ /** Wire-aligned error code. */
146
+ readonly code = "flow_backlog_exceeded";
147
+ /** How many envelopes were already queued when this call was rejected. */
148
+ readonly queueSize: number;
149
+ /** The configured cap. */
150
+ readonly queueCap: number;
151
+ constructor(queueSize: number, queueCap: number);
152
+ }
153
+ /**
154
+ * Thrown by `client.specs.validate` when the supplied spec is structurally
155
+ * unfit to send — most commonly a missing or unknown `kind` discriminator.
156
+ *
157
+ * This is a *pre-wire* rejection: the spec never reached QAR. Per-rule
158
+ * failures (D10-R*, D11-R*) come back from the endpoint in the
159
+ * `SpecValidateResult.errors` array — those are not exceptions, they're a
160
+ * normal `valid: false` result.
161
+ */
162
+ export declare class QodoSpecValidationError extends Error {
163
+ readonly name = "QodoSpecValidationError";
164
+ constructor(message: string);
165
+ }
166
+ /**
167
+ * Thrown by `client.qar.registerAgent` / `client.qar.registerMcp` /
168
+ * `client.qar.registerA2A` when a name conflicts with an existing
169
+ * registration (and `replace: true` wasn't passed), or when the supplied
170
+ * name / endpoint is empty.
171
+ *
172
+ * Carries `entity` (`'agent' | 'mcp' | 'a2a'`) and `entryName` so test code
173
+ * and structured loggers can branch on the specific conflict shape without
174
+ * parsing the message text. `name` (the standard Error field) is fixed at
175
+ * `'QodoRegistryConflictError'`.
176
+ *
177
+ * **`entity` is open-ended by design.** New register-helpers (S9 added
178
+ * `'a2a'`; future surfaces will add more) extend this union additively.
179
+ * Consumers writing exhaustive `switch` / `assertNever` patterns on
180
+ * `entity` should treat unknown values as "another registry the SDK
181
+ * grew" — typically by routing through a default arm that surfaces the
182
+ * raw `entryName` + message. The SDK is on the 2.x major; breaking the
183
+ * union literally is allowed within the major per the SDK1→2 migration
184
+ * posture, but each addition lands behind its own feature commit so
185
+ * consumer code can pin if needed.
186
+ */
187
+ export declare class QodoRegistryConflictError extends Error {
188
+ readonly name = "QodoRegistryConflictError";
189
+ /** Which registry the conflict came from. */
190
+ readonly entity: 'agent' | 'mcp' | 'a2a';
191
+ /** The name the caller tried to register. */
192
+ readonly entryName: string;
193
+ constructor(entity: 'agent' | 'mcp' | 'a2a', entryName: string, message: string);
194
+ }
195
+ /**
196
+ * Wire-validation context attached to a `QodoWireValidationError`. Populated
197
+ * on inbound failures so consumers routing the error into structured
198
+ * logging / metrics can branch on the exact protocol drift without parsing
199
+ * the `[@qodo/sdk]` console.error breadcrumb.
200
+ */
201
+ export interface WireValidationContext {
202
+ /**
203
+ * `'outbound'` — thrown synchronously from `client.tools.respond(...)`
204
+ * when the caller's input violates the wire shape.
205
+ * `'inbound'` — surfaced (NOT thrown) via
206
+ * `client.tools.onWireValidationError(...)` when the SDK drops a malformed
207
+ * `tool.request` arriving from the runtime.
208
+ */
209
+ readonly scope: 'outbound' | 'inbound';
210
+ /** `message_id` of the offending envelope (inbound only). */
211
+ readonly messageId?: string;
212
+ /**
213
+ * `node_name` from the offending envelope, if it was present and well-shaped
214
+ * (inbound only). Absent for the "missing node_name" violation itself.
215
+ */
216
+ readonly nodeName?: string;
217
+ }
218
+ /**
219
+ * Surfaced when the SDK's tool-tunneling layer encounters an envelope
220
+ * that violates the parallel-batched wire shape. Two scopes:
221
+ *
222
+ * - **`outbound`** — thrown synchronously from `client.tools.respond(...)`
223
+ * when the caller's input is malformed (empty `node_name`, empty
224
+ * `responses`). Catches consumer bugs at the call site instead of
225
+ * letting them silently ship a malformed envelope onto the wire.
226
+ *
227
+ * - **`inbound`** — NOT thrown (throwing would fail the whole connection
228
+ * across every subscription). Surfaced via
229
+ * `client.tools.onWireValidationError(handler)` after the
230
+ * `[@qodo/sdk]` console.error breadcrumb fires. The SDK has no
231
+ * `tool_call_id` to respond against for these envelopes, so consumers
232
+ * observe the failure but can't actively recover — QAR's per-task
233
+ * tool-response timeout is the wire-side safety net.
234
+ *
235
+ * Handler-return shape violations (positional length mismatch from a
236
+ * `ToolRequestHandler`, malformed `ToolResponseResult`) are NOT surfaced as
237
+ * `QodoWireValidationError` — they're converted to per-call
238
+ * `status: 'error'` items on the wire so the agent loop unblocks
239
+ * deterministically.
240
+ *
241
+ * Distinct from `TypeError` because the failure is wire-shape specific;
242
+ * consumers wanting a broader catch should `instanceof Error`. The
243
+ * structured `context` field is the preferred branch surface —
244
+ * `instanceof QodoWireValidationError` then switch on `err.context.scope`.
245
+ */
246
+ export declare class QodoWireValidationError extends Error {
247
+ readonly name: string;
248
+ /** Structured drop metadata. Always populated. */
249
+ readonly context: WireValidationContext;
250
+ constructor(message: string, context?: WireValidationContext);
251
+ }
252
+ /**
253
+ * Thrown by `tasks.startWithAgent` / `tasks.startWithGraph` when the
254
+ * consumer's `mcpTools` selector references an MCP name that isn't
255
+ * registered on this client.
256
+ *
257
+ * Surface remediation: call `client.qar.registerMcp('<name>', ...)`
258
+ * before the dispatch, or drop the entry from the `mcpTools` selector.
259
+ */
260
+ export declare class QodoUnknownMcpError extends QodoWireValidationError {
261
+ readonly name = "QodoUnknownMcpError";
262
+ /** Distinct MCP names referenced by `mcpTools` but not present in the registry. */
263
+ readonly mcpNames: readonly string[];
264
+ constructor(mcpNames: readonly string[]);
265
+ }
266
+ /**
267
+ * Thrown by `tasks.startWithAgent` / `tasks.startWithGraph` when the
268
+ * consumer's `mcpTools` selector — or the sibling `mcpToolOverrides`
269
+ * map — references a `<mcp>.<tool>` dotted name whose MCP IS registered
270
+ * but whose live catalog doesn't expose the named tool.
271
+ *
272
+ * Catches version drift between consumer code and upstream MCP catalogs
273
+ * at task.start, not at LLM-call time. Pair with
274
+ * `client.qar.listMcpTools(name)` during development to see the live
275
+ * surface.
276
+ */
277
+ export declare class QodoUnknownMcpToolError extends QodoWireValidationError {
278
+ readonly name = "QodoUnknownMcpToolError";
279
+ /** Distinct `<mcp>.<tool>` dotted names that don't resolve to a discovered tool. */
280
+ readonly dottedNames: readonly string[];
281
+ constructor(dottedNames: readonly string[]);
282
+ }
283
+ /**
284
+ * Thrown by `tasks.startWithAgent` / `tasks.startWithGraph` when a
285
+ * registered MCP whose `unavailability` policy is `'fail'` (the default)
286
+ * has no cached catalog at projection time — its cold-start
287
+ * `Client.connect()` + `tools/list` cycle didn't complete inside the
288
+ * SDK's settle window.
289
+ *
290
+ * Indicates a real config / startup bug for local sidecars (typical
291
+ * fail-mode for `litegit`, `slack`, in-cluster MCPs). For third-party
292
+ * remote MCPs that flake transiently, register with
293
+ * `{ unavailability: 'warn' }` to ship without the MCP's tools instead
294
+ * of failing the task.
295
+ */
296
+ export declare class QodoMcpUnavailableError extends QodoWireValidationError {
297
+ readonly name = "QodoMcpUnavailableError";
298
+ /** Distinct MCP names whose `unavailability` is `'fail'` and whose catalog hasn't populated. */
299
+ readonly mcpNames: readonly string[];
300
+ constructor(mcpNames: readonly string[]);
301
+ }
302
+ /**
303
+ * One pre-wire validation failure on an inline `GraphSpec`. Mirrors QAR's
304
+ * `SpecValidationError` envelope (rule_id + path + message) so consumers can
305
+ * use the same branch logic for both client-side rejection (here) and
306
+ * `client.specs.validate(...)` round-trips.
307
+ */
308
+ export interface InlineGraphValidationFailure {
309
+ /** Wire rule identifier (e.g. `'D11-R6'`, `'D11-R9'`, `'D11-R11'`, `'D11-R12'`). */
310
+ readonly rule_id: string;
311
+ /** JSON Pointer (RFC 6901) into the offending spec. `""` denotes the root. */
312
+ readonly path: string;
313
+ /** Human-readable explanation. */
314
+ readonly message: string;
315
+ }
316
+ /**
317
+ * Thrown by `client.tasks.startWithGraph(...)` when the inline `GraphSpec`
318
+ * fails one of the SDK's pre-wire structural checks against the
319
+ * GraphSpec safe subset.
320
+ *
321
+ * Pre-wire rejection: the envelope never reaches QAR. Same `rule_id` /
322
+ * `path` / `message` shape as `client.specs.validate(...)` per-rule failures,
323
+ * so consumers can route both surfaces into the same error handler.
324
+ *
325
+ * The SDK enforces the rule subset that doesn't require server-side
326
+ * state (no tenant lookup, no model-registry probe):
327
+ * - `D11-R1..R3` — entry / agents present + named uniquely.
328
+ * - `D11-R6..R8` — edges resolve to declared agents, entry resolves.
329
+ * - `D11-R9` — `evaluate` edges only target evaluator-role nodes.
330
+ * - `D11-R10` — graph depth ≤ configured maximum (default 4).
331
+ * - `D11-R11` — evaluator nodes are leaves (no outbound edges).
332
+ * - `D11-R12` — evaluator `output_schema` is shaped like `VerdictResult`.
333
+ * - `D11-Rcycle` — acyclicity (the SDK rejects cycles unconditionally; QAR
334
+ * surfaces the same rule via `D11-R9` numbering in its own response shape).
335
+ *
336
+ * Rules requiring server-side state (AgentSpec composition, alternate
337
+ * operator-maximum depth) flow through the `client.specs.validate(...)`
338
+ * opt-in pre-flight instead — see `preflight: true` on `TaskOptions`.
339
+ */
340
+ export declare class QodoInlineGraphValidationError extends Error {
341
+ readonly name = "QodoInlineGraphValidationError";
342
+ /** All failures the validator observed, in stable depth-first order. */
343
+ readonly failures: readonly InlineGraphValidationFailure[];
344
+ constructor(failures: readonly InlineGraphValidationFailure[]);
345
+ }
346
+ /**
347
+ * Per-violation entry carried on `QodoInlineAgentValidationError` and
348
+ * `QodoAgentSpecRejectedError`. Mirrors the QAR-side `agent_spec_rejected`
349
+ * error envelope shape so consumers handling both paths can branch on the
350
+ * same `(rule_id, path, message)` triple.
351
+ *
352
+ * `rule_id` is one of the `D10-R*` set (server-side wire validator) or a
353
+ * `D10-SHAPE-*` synthetic id (SDK-side pre-wire shape check — distinct
354
+ * prefix so SDK-only ids never collide with QAR's documented ruleset).
355
+ * `path` is an RFC 6901 JSON Pointer into the spec — `""` denotes the
356
+ * root.
357
+ *
358
+ * Shape parallels `InlineGraphValidationFailure` so consumers can write
359
+ * one error handler that branches on `instanceof` and reads the same
360
+ * fields off either error class.
361
+ */
362
+ export interface InlineAgentSpecIssue {
363
+ readonly rule_id: string;
364
+ readonly path: string;
365
+ readonly message: string;
366
+ }
367
+ /**
368
+ * Thrown synchronously by `client.tasks.startWithAgent({ agent: spec, ... })`
369
+ * when the supplied `InlineAgentSpec` violates the data-only safe subset
370
+ * before the wire write. Carries the structured `issues` array so
371
+ * structured-logging consumers can branch on `rule_id` / `path` without
372
+ * parsing the message text.
373
+ *
374
+ * **Pre-wire only.** The mirror error for server-rejected specs (after
375
+ * the wire write, when QAR's validator runs the full ruleset including
376
+ * registry-dependent rules) is `QodoAgentSpecRejectedError`, surfaced
377
+ * via the task iterator's `kind: 'error'` envelope.
378
+ *
379
+ * Distinct from `QodoSpecValidationError` (which is for
380
+ * `client.specs.validate` — the pre-flight wrapper around
381
+ * `POST /v1/specs/validate`); both exist because the pre-flight wrapper
382
+ * accepts intentionally-invalid shapes (the whole point is to ask the
383
+ * server "tell me which rule I broke"), while `startWithAgent` rejects
384
+ * at intake to avoid kicking off server-side work the spec can't possibly
385
+ * pass.
386
+ */
387
+ export declare class QodoInlineAgentValidationError extends Error {
388
+ readonly name = "QodoInlineAgentValidationError";
389
+ /** Per-violation breakdown — at least one entry. */
390
+ readonly issues: readonly InlineAgentSpecIssue[];
391
+ constructor(issues: readonly InlineAgentSpecIssue[]);
392
+ }
393
+ /**
394
+ * Thrown / surfaced when QAR's `_handle_task_start` rejects the supplied
395
+ * inline `agent: InlineAgentSpec` (Pattern B) at wire-validation time via
396
+ * an `error { code: 'agent_spec_rejected' }` envelope. Mirror for the
397
+ * server-static path doesn't exist — there's no inline-spec to reject for
398
+ * Pattern A.
399
+ *
400
+ * Carries the full `issues` array so consumers can show per-rule messages
401
+ * in IDE / Studio surfaces. The first issue's `rule_id` is also exposed
402
+ * at `rule_id` / `path` for the common "just give me the primary failure"
403
+ * branch.
404
+ *
405
+ * Surfaced via the iterator returned by `tasks.startWithAgent`: when the
406
+ * first inbound envelope is an `error { code: 'agent_spec_rejected' }`,
407
+ * the iterator rejects with this error (instead of yielding the envelope)
408
+ * so consumers don't need to defensively type-narrow the error case out
409
+ * of `TaskEvent.kind`.
410
+ */
411
+ export declare class QodoAgentSpecRejectedError extends Error {
412
+ readonly name = "QodoAgentSpecRejectedError";
413
+ /** Wire-aligned error code. */
414
+ readonly code = "agent_spec_rejected";
415
+ /** Per-violation breakdown — at least one entry. */
416
+ readonly issues: readonly InlineAgentSpecIssue[];
417
+ /** Convenience: first issue's `rule_id` (`'D10-R*'` or `'D10-UNSUPPORTED*'`). */
418
+ readonly rule_id: string;
419
+ /** Convenience: first issue's `path` (RFC 6901 JSON Pointer; `""` = root). */
420
+ readonly path: string;
421
+ constructor(issues: readonly InlineAgentSpecIssue[], message?: string);
422
+ }
423
+ /**
424
+ * One per-rule entry on a server `error` envelope's `payload.errors`, when
425
+ * the envelope carries the structured array (D15-R*, agent-spec-rejected
426
+ * shape). Mirrors `InlineAgentSpecIssue` but is the canonical shape across
427
+ * every typed server-error class — agent-spec rejection still ships its
428
+ * own `InlineAgentSpecIssue` alias for back-compat with the existing
429
+ * `QodoAgentSpecRejectedError` consumers.
430
+ */
431
+ export interface ServerErrorEntry {
432
+ /** D10/D11/D15 rule identifier or QAR-side code (`'cancel_routing_failed'`, …). */
433
+ readonly rule_id: string;
434
+ /** JSON Pointer (RFC 6901) into the offending envelope/spec. `""` denotes the root. */
435
+ readonly path: string;
436
+ /** Human-readable explanation. */
437
+ readonly message: string;
438
+ }
439
+ /**
440
+ * Base class for every typed server-error class (cancel/resume/HITL/graph
441
+ * codes). Each concrete subclass pins its `code` to the documented QAR
442
+ * wire string so consumers can branch on
443
+ * `instanceof QodoCancelRoutingFailedError` instead of
444
+ * `err.code === 'cancel_routing_failed'`.
445
+ *
446
+ * `QodoAgentSpecRejectedError` predates this base and keeps its own
447
+ * shape; new error codes here use the unified `QodoServerError` surface
448
+ * for forward compatibility.
449
+ */
450
+ export declare class QodoServerError extends Error {
451
+ /** Wire-level QAR error code. Pinned per subclass. */
452
+ readonly code: string;
453
+ /**
454
+ * Structured per-rule breakdown, if QAR shipped one on the envelope. Empty
455
+ * array when the envelope only carried top-level `code` + `message`.
456
+ */
457
+ readonly errors: readonly ServerErrorEntry[];
458
+ /** `payload.offending_message_id` — useful for tracing the cause envelope. */
459
+ readonly offendingMessageId?: string;
460
+ /**
461
+ * @param name The concrete subclass name (matches `this.name`).
462
+ * @param code Wire-level error code.
463
+ * @param message Human-readable summary; mirrored to `Error.message`.
464
+ * @param errors Structured breakdown when QAR emitted one. Default `[]`.
465
+ * @param offendingMessageId `error.payload.offending_message_id` if present.
466
+ */
467
+ constructor(name: string, code: string, message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
468
+ }
469
+ /** Cancel routing lookup failed — see QAR `_handle_task_cancel`. */
470
+ export declare class QodoCancelRoutingFailedError extends QodoServerError {
471
+ readonly name = "QodoCancelRoutingFailedError";
472
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
473
+ }
474
+ /** Cancel all-writes-fail — see QAR `_handle_task_cancel`. */
475
+ export declare class QodoCancelFailedError extends QodoServerError {
476
+ readonly name = "QodoCancelFailedError";
477
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
478
+ }
479
+ /** Session lookup miss — `cancel`/`continue` against an unknown task. */
480
+ export declare class QodoTaskNotFoundError extends QodoServerError {
481
+ readonly name = "QodoTaskNotFoundError";
482
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
483
+ }
484
+ /** Cancel-on-non-waiting-task — see QAR `_handle_task_cancel` precondition. */
485
+ export declare class QodoTaskNotWaitingError extends QodoServerError {
486
+ readonly name = "QodoTaskNotWaitingError";
487
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
488
+ }
489
+ /** Pod failed to reconstruct the agent for a cross-pod task. */
490
+ export declare class QodoAgentReconstructionFailedError extends QodoServerError {
491
+ readonly name = "QodoAgentReconstructionFailedError";
492
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
493
+ }
494
+ /** Cross-pod resume hook aborted before delivering control. */
495
+ export declare class QodoCrossPodResumeAbortedError extends QodoServerError {
496
+ readonly name = "QodoCrossPodResumeAbortedError";
497
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
498
+ }
499
+ /** Deps construction failed during agent dispatch (Pattern A/B/C). */
500
+ export declare class QodoDepsConstructionFailedError extends QodoServerError {
501
+ readonly name = "QodoDepsConstructionFailedError";
502
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
503
+ }
504
+ /** Message history load failed during resume / continue. */
505
+ export declare class QodoMessageHistoryLoadFailedError extends QodoServerError {
506
+ readonly name = "QodoMessageHistoryLoadFailedError";
507
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
508
+ }
509
+ /** HITL persistence failure — substrate accepted but the row didn't durable. */
510
+ export declare class QodoHitlPersistFailedError extends QodoServerError {
511
+ readonly name = "QodoHitlPersistFailedError";
512
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
513
+ }
514
+ /** HITL substrate unavailable — backing store offline / unconfigured. */
515
+ export declare class QodoHitlSubstrateUnavailableError extends QodoServerError {
516
+ readonly name = "QodoHitlSubstrateUnavailableError";
517
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
518
+ }
519
+ /** Caller is not the authorized resolver for the HITL row. */
520
+ export declare class QodoUnauthorizedResolverError extends QodoServerError {
521
+ readonly name = "QodoUnauthorizedResolverError";
522
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
523
+ }
524
+ /** HITL resolution payload failed validation against the prompt's schema. */
525
+ export declare class QodoInvalidResolutionError extends QodoServerError {
526
+ readonly name = "QodoInvalidResolutionError";
527
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
528
+ }
529
+ /**
530
+ * Pattern C (inline graph) validator rejection — GraphSpec rule failure
531
+ * surfaced AFTER the wire. Mirror of `QodoAgentSpecRejectedError` for the
532
+ * graph path; the `errors[]` array carries each `D11-R*` / `D13-R*`
533
+ * failure with `rule_id` + `path` + `message`.
534
+ */
535
+ export declare class QodoGraphSpecRejectedError extends QodoServerError {
536
+ readonly name = "QodoGraphSpecRejectedError";
537
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
538
+ }
539
+ /**
540
+ * Typed error for QAR's `session_mismatch` wire rejection. Surfaces when
541
+ * an outbound ongoing envelope (`task.continue` / `task.cancel` /
542
+ * `task.resubscribe` / `tool.response`) carries a `session_id` that
543
+ * doesn't match the connection's bound session for the referenced task.
544
+ *
545
+ * The SDK no longer mints a zero-UUID sentinel for cold-address paths —
546
+ * the missing-session case is caught locally and raised as
547
+ * {@link QodoColdAddressError} before the wire write. This typed error
548
+ * fires only when the consumer-supplied `sessionId` override on the
549
+ * cold-address API doesn't actually match the server's bound session
550
+ * (stale durable-storage row, deliberate mismatch test).
551
+ */
552
+ export declare class QodoSessionMismatchError extends QodoServerError {
553
+ readonly name = "QodoSessionMismatchError";
554
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
555
+ }
556
+ /**
557
+ * Admission has been pending past the operator timeout
558
+ * (`PENDING_ADMISSION_TIMEOUT`, server default 5 min). Terminal,
559
+ * non-retryable. Scoped to the derived `session_id` so the consumer can
560
+ * `task.resubscribe` if a recovery path exists, but the typical handling
561
+ * is to surface the failure to the operator — the server's sweeper will
562
+ * compensate the orphan row on its next sweep cycle.
563
+ *
564
+ * The wire envelope carries the derived `session_id` — exposed here as
565
+ * `sessionId` so consumers don't need to dig through the envelope to
566
+ * find it. `undefined` only on synthetic / spec-violating envelopes
567
+ * that omit the field.
568
+ */
569
+ export declare class QodoAdmissionStalledError extends QodoServerError {
570
+ readonly name = "QodoAdmissionStalledError";
571
+ /**
572
+ * Derived `session_id` from the inbound `admission_stalled` envelope.
573
+ * Populated by {@link attachSessionId} (called by
574
+ * `errorFromServerErrorEnvelope` when it has the inherited envelope
575
+ * field in hand) — the constructor matches the unified server-error
576
+ * factory signature so the typed-error dispatcher (`classForServerErrorCode`)
577
+ * can build instances uniformly. `undefined` only on synthetic envelopes
578
+ * that omit the session_id field.
579
+ */
580
+ sessionId?: string;
581
+ constructor(message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
582
+ /** Internal — set by the envelope-to-error helper. Read-once-after-construct. */
583
+ attachSessionId(sessionId: string): void;
584
+ }
585
+ /**
586
+ * Client-side terminal when the consumer breaks the `TaskStartIterable`
587
+ * (via `iter.return()`, `break` inside a `for await`, or `iter.throw()`)
588
+ * BEFORE the server's `task.started` admission ack arrives.
589
+ *
590
+ * Surfaces on `await stream.sessionId` / `await stream.admittedTaskId` so
591
+ * the caller's pending awaits don't hang forever after they've abandoned
592
+ * the stream.
593
+ *
594
+ * Distinct from `QodoAdmissionTimeoutError` (SDK-side budget exhaustion)
595
+ * and `QodoAdmissionStalledError` (server-emitted terminal) so consumer
596
+ * code can branch on the reason — voluntary abort vs. genuine admission
597
+ * failure.
598
+ */
599
+ export declare class QodoStreamAbortedError extends Error {
600
+ readonly name = "QodoStreamAbortedError";
601
+ constructor(message?: string);
602
+ }
603
+ /**
604
+ * Client-side terminal after the SDK's `admission_in_progress` retry
605
+ * loop exhausts its budget without ever seeing a `task.started` ack.
606
+ *
607
+ * The SDK honours the server's `retry_after_ms` hint when present and
608
+ * falls back to exponential backoff with jitter (initial 100 ms, doubling,
609
+ * capped at `PENDING_ADMISSION_TIMEOUT = 5 min`). Reaching the cap means
610
+ * the deterministic-key admission contended for the full timeout window
611
+ * without resolving.
612
+ *
613
+ * `sessionId` carries the derived session UUID extracted from the final
614
+ * `admission_in_progress` envelope so a consumer that wants to
615
+ * `task.resubscribe` has the address; `undefined` only when no
616
+ * admission_in_progress envelope was ever observed (transport drop
617
+ * mid-retry).
618
+ */
619
+ export declare class QodoAdmissionTimeoutError extends Error {
620
+ readonly name = "QodoAdmissionTimeoutError";
621
+ /** Total wall-clock milliseconds spent retrying before giving up. */
622
+ readonly elapsedMs: number;
623
+ /** Number of `admission_in_progress` envelopes observed before timing out. */
624
+ readonly attempts: number;
625
+ /** Derived `session_id` from the final envelope, if observed. */
626
+ readonly sessionId?: string;
627
+ constructor(elapsedMs: number, attempts: number, sessionId?: string);
628
+ }
629
+ /**
630
+ * Fallback for any unrecognized `error.code` value arriving from QAR.
631
+ *
632
+ * The SDK's typed-error catalog tracks the codes QAR's documented contract
633
+ * surfaces; a new code that hasn't landed in the SDK yet still surfaces
634
+ * as a typed throw (via this class) so consumers' `catch
635
+ * (err: QodoServerError)` blocks see structure rather than a yielded
636
+ * `kind: 'error'` event their type narrows can't account for. Branch on
637
+ * `err.code` (the raw wire string) until the SDK adds a typed subclass.
638
+ */
639
+ export declare class QodoUnknownServerError extends QodoServerError {
640
+ readonly name = "QodoUnknownServerError";
641
+ constructor(code: string, message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string);
642
+ }
643
+ /**
644
+ * Map a wire `error.code` to its typed `QodoServerError` subclass. Returns
645
+ * `undefined` for the SDK-side `agent_spec_rejected` code — that case is
646
+ * intentionally handled by `QodoAgentSpecRejectedError`'s own
647
+ * `errorFromAgentSpecRejection` parser (it carries an
648
+ * `InlineAgentSpecIssue[]` shape that predates the unified
649
+ * `ServerErrorEntry`). All other documented codes route through here.
650
+ *
651
+ * Callers needing to wrap an arbitrary error envelope: prefer the
652
+ * higher-level `errorFromServerErrorEnvelope` helper in `TaskClient.ts` —
653
+ * it handles the parse-`errors[]` step, the `agent_spec_rejected` carve-
654
+ * out, and the `QodoUnknownServerError` fallback uniformly.
655
+ */
656
+ export declare function classForServerErrorCode(code: string): (new (message: string, errors?: readonly ServerErrorEntry[], offendingMessageId?: string) => QodoServerError) | undefined;
657
+ /**
658
+ * Thrown when the SDK's MCP client pool fails to connect to a registered
659
+ * remote / stdio MCP server.
660
+ *
661
+ * Carries the registered MCP `name` so callers can branch / log without
662
+ * parsing the message text. `cause` is the underlying transport / protocol
663
+ * error from `@modelcontextprotocol/sdk` (`McpError`, `StreamableHTTPError`,
664
+ * `SseError`, plain `Error` from `Client.connect`) — preserved on
665
+ * `Error.cause` per the standard idiom.
666
+ *
667
+ * Distinct from `QodoMcpToolError` so consumer code can branch on
668
+ * "connection failed" vs. "tool invocation failed" without inspecting
669
+ * the underlying cause.
670
+ */
671
+ export declare class QodoMcpClientError extends Error {
672
+ readonly name = "QodoMcpClientError";
673
+ /** Registered MCP name (the `name` argument passed to `qar.registerMcp`). */
674
+ readonly mcpName: string;
675
+ /** Transport discriminator from the failing config. */
676
+ readonly transport: string;
677
+ constructor(mcpName: string, transport: string, message: string, cause?: unknown);
678
+ }
679
+ /**
680
+ * Thrown when a tool invocation against a registered remote / stdio MCP
681
+ * fails. Distinct from `QodoMcpClientError` (which is a connection
682
+ * failure) — this one fires AFTER the MCP `Client` is connected and is
683
+ * reporting an error from a `callTool` round-trip.
684
+ *
685
+ * Two failure shapes both route through this class:
686
+ * - **Transport error** — the wire layer (HTTP request, SSE stream, stdio
687
+ * pipe) failed during the call. `cause` is the underlying error.
688
+ * - **Tool-reported error** — the call succeeded at the transport level
689
+ * but the tool result has `isError: true`. The MCP envelope is preserved
690
+ * in `mcpResult` so consumers can inspect the per-tool content array.
691
+ *
692
+ * `mcpName` and `toolName` are populated so structured logging / metrics
693
+ * can branch on the exact dispatch coordinates without parsing the message.
694
+ */
695
+ export declare class QodoMcpToolError extends Error {
696
+ readonly name = "QodoMcpToolError";
697
+ /** Registered MCP name (the `name` argument passed to `qar.registerMcp`). */
698
+ readonly mcpName: string;
699
+ /** MCP tool name that failed (the `name` field of the `callTool` request). */
700
+ readonly toolName: string;
701
+ /**
702
+ * MCP envelope when the tool returned `isError: true`. Absent for pure
703
+ * transport failures (those carry the underlying error on `cause`).
704
+ */
705
+ readonly mcpResult?: {
706
+ readonly content: readonly unknown[];
707
+ readonly isError?: boolean;
708
+ };
709
+ constructor(mcpName: string, toolName: string, message: string, opts?: {
710
+ readonly cause?: unknown;
711
+ readonly mcpResult?: {
712
+ readonly content: readonly unknown[];
713
+ readonly isError?: boolean;
714
+ };
715
+ });
716
+ }
717
+ /**
718
+ * Typed escape path for a tool handler that wants to reject a `tool.request`.
719
+ *
720
+ * Throwing `new ToolDeniedError("not allowed")` from a handler registered via
721
+ * `client.tools.onRequest` maps to a `tool.response { outcome: "denied" }`
722
+ * envelope on the wire. The reason string is forwarded to QAR (truncated to
723
+ * keep error payloads bounded) so the model and observability traces see why
724
+ * the call was rejected.
725
+ *
726
+ * Plain `throw new Error(...)` from a handler still works — the SDK maps any
727
+ * other thrown value to `outcome: "error"`. Use `ToolDeniedError` only when
728
+ * the rejection is a deliberate policy decision (approval flow rejected the
729
+ * call, capability lookup denied the tool) rather than an unexpected failure.
730
+ */
731
+ export declare class ToolDeniedError extends Error {
732
+ readonly name = "ToolDeniedError";
733
+ constructor(reason: string);
734
+ }
735
+ //# sourceMappingURL=errors.d.ts.map