beth-copilot 1.0.18 → 1.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 (291) hide show
  1. package/CHANGELOG.md +41 -28
  2. package/README.md +87 -247
  3. package/bin/cli.js +158 -358
  4. package/dist/__tests__/smoke.test.d.ts +8 -0
  5. package/dist/__tests__/smoke.test.d.ts.map +1 -0
  6. package/dist/__tests__/smoke.test.js +49 -0
  7. package/dist/__tests__/smoke.test.js.map +1 -0
  8. package/dist/cli/commands/beads.e2e.test.d.ts +13 -0
  9. package/dist/cli/commands/beads.e2e.test.d.ts.map +1 -0
  10. package/dist/cli/commands/beads.e2e.test.js +526 -0
  11. package/dist/cli/commands/beads.e2e.test.js.map +1 -0
  12. package/dist/cli/commands/cli-edge-cases.e2e.test.d.ts +32 -0
  13. package/dist/cli/commands/cli-edge-cases.e2e.test.d.ts.map +1 -0
  14. package/dist/cli/commands/cli-edge-cases.e2e.test.js +162 -0
  15. package/dist/cli/commands/cli-edge-cases.e2e.test.js.map +1 -0
  16. package/dist/cli/commands/close.d.ts +89 -0
  17. package/dist/cli/commands/close.d.ts.map +1 -0
  18. package/dist/cli/commands/close.e2e.test.d.ts +27 -0
  19. package/dist/cli/commands/close.e2e.test.d.ts.map +1 -0
  20. package/dist/cli/commands/close.e2e.test.js +252 -0
  21. package/dist/cli/commands/close.e2e.test.js.map +1 -0
  22. package/dist/cli/commands/close.js +309 -0
  23. package/dist/cli/commands/close.js.map +1 -0
  24. package/dist/cli/commands/close.test.d.ts +15 -0
  25. package/dist/cli/commands/close.test.d.ts.map +1 -0
  26. package/dist/cli/commands/close.test.js +634 -0
  27. package/dist/cli/commands/close.test.js.map +1 -0
  28. package/dist/cli/commands/doctor.d.ts +23 -0
  29. package/dist/cli/commands/doctor.d.ts.map +1 -1
  30. package/dist/cli/commands/doctor.js +93 -0
  31. package/dist/cli/commands/doctor.js.map +1 -1
  32. package/dist/cli/commands/doctor.test.js +209 -0
  33. package/dist/cli/commands/doctor.test.js.map +1 -1
  34. package/dist/cli/commands/framework-isolation.test.d.ts +30 -0
  35. package/dist/cli/commands/framework-isolation.test.d.ts.map +1 -0
  36. package/dist/cli/commands/framework-isolation.test.js +119 -0
  37. package/dist/cli/commands/framework-isolation.test.js.map +1 -0
  38. package/dist/cli/commands/help.e2e.test.js +4 -4
  39. package/dist/cli/commands/help.e2e.test.js.map +1 -1
  40. package/dist/cli/commands/init-logic.e2e.test.d.ts +37 -0
  41. package/dist/cli/commands/init-logic.e2e.test.d.ts.map +1 -0
  42. package/dist/cli/commands/init-logic.e2e.test.js +305 -0
  43. package/dist/cli/commands/init-logic.e2e.test.js.map +1 -0
  44. package/dist/cli/commands/land.d.ts +142 -0
  45. package/dist/cli/commands/land.d.ts.map +1 -0
  46. package/dist/cli/commands/land.js +647 -0
  47. package/dist/cli/commands/land.js.map +1 -0
  48. package/dist/cli/commands/land.test.d.ts +20 -0
  49. package/dist/cli/commands/land.test.d.ts.map +1 -0
  50. package/dist/cli/commands/land.test.js +622 -0
  51. package/dist/cli/commands/land.test.js.map +1 -0
  52. package/dist/cli/commands/mcp.e2e.test.js +22 -29
  53. package/dist/cli/commands/mcp.e2e.test.js.map +1 -1
  54. package/dist/cli/commands/pipeline.e2e.test.js +20 -20
  55. package/dist/cli/commands/pipeline.e2e.test.js.map +1 -1
  56. package/dist/cli/commands/pre-push-guard.d.ts +84 -0
  57. package/dist/cli/commands/pre-push-guard.d.ts.map +1 -0
  58. package/dist/cli/commands/pre-push-guard.e2e.test.d.ts +24 -0
  59. package/dist/cli/commands/pre-push-guard.e2e.test.d.ts.map +1 -0
  60. package/dist/cli/commands/pre-push-guard.e2e.test.js +171 -0
  61. package/dist/cli/commands/pre-push-guard.e2e.test.js.map +1 -0
  62. package/dist/cli/commands/pre-push-guard.js +257 -0
  63. package/dist/cli/commands/pre-push-guard.js.map +1 -0
  64. package/dist/cli/commands/pre-push-guard.test.d.ts +15 -0
  65. package/dist/cli/commands/pre-push-guard.test.d.ts.map +1 -0
  66. package/dist/cli/commands/pre-push-guard.test.js +397 -0
  67. package/dist/cli/commands/pre-push-guard.test.js.map +1 -0
  68. package/dist/cli/commands/quickstart-expanded.e2e.test.d.ts +23 -0
  69. package/dist/cli/commands/quickstart-expanded.e2e.test.d.ts.map +1 -0
  70. package/dist/cli/commands/quickstart-expanded.e2e.test.js +179 -0
  71. package/dist/cli/commands/quickstart-expanded.e2e.test.js.map +1 -0
  72. package/dist/cli/commands/quickstart.d.ts.map +1 -1
  73. package/dist/cli/commands/quickstart.js +7 -23
  74. package/dist/cli/commands/quickstart.js.map +1 -1
  75. package/dist/cli/commands/quickstart.test.js +40 -67
  76. package/dist/cli/commands/quickstart.test.js.map +1 -1
  77. package/dist/core/agents/suite.test.js +4 -2
  78. package/dist/core/agents/suite.test.js.map +1 -1
  79. package/dist/core/agents/tools.test.js +5 -1
  80. package/dist/core/agents/tools.test.js.map +1 -1
  81. package/dist/index.d.ts +3 -10
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/index.js +5 -10
  84. package/dist/index.js.map +1 -1
  85. package/package.json +15 -9
  86. package/sbom.json +2011 -819
  87. package/templates/.github/agents/beth.agent.md +220 -66
  88. package/templates/.github/agents/developer.agent.md +53 -90
  89. package/templates/.github/agents/product-manager.agent.md +15 -68
  90. package/templates/.github/agents/researcher.agent.md +20 -71
  91. package/templates/.github/agents/security-reviewer.agent.md +29 -81
  92. package/templates/.github/agents/tester.agent.md +40 -69
  93. package/templates/.github/agents/ux-designer.agent.md +20 -74
  94. package/templates/.github/copilot-instructions.md +217 -225
  95. package/templates/AGENTS.md +108 -20
  96. package/templates/mcp.json.example +0 -3
  97. package/dist/cli/commands/client-config.d.ts +0 -31
  98. package/dist/cli/commands/client-config.d.ts.map +0 -1
  99. package/dist/cli/commands/client-config.e2e.test.d.ts +0 -15
  100. package/dist/cli/commands/client-config.e2e.test.d.ts.map +0 -1
  101. package/dist/cli/commands/client-config.e2e.test.js +0 -556
  102. package/dist/cli/commands/client-config.e2e.test.js.map +0 -1
  103. package/dist/cli/commands/client-config.js +0 -73
  104. package/dist/cli/commands/client-config.js.map +0 -1
  105. package/dist/cli/commands/client-config.test.d.ts +0 -6
  106. package/dist/cli/commands/client-config.test.d.ts.map +0 -1
  107. package/dist/cli/commands/client-config.test.js +0 -133
  108. package/dist/cli/commands/client-config.test.js.map +0 -1
  109. package/dist/cli/commands/init-quickstart.e2e.test.d.ts +0 -11
  110. package/dist/cli/commands/init-quickstart.e2e.test.d.ts.map +0 -1
  111. package/dist/cli/commands/init-quickstart.e2e.test.js +0 -221
  112. package/dist/cli/commands/init-quickstart.e2e.test.js.map +0 -1
  113. package/dist/core/context.d.ts +0 -171
  114. package/dist/core/context.d.ts.map +0 -1
  115. package/dist/core/context.js +0 -353
  116. package/dist/core/context.js.map +0 -1
  117. package/dist/core/context.test.d.ts +0 -8
  118. package/dist/core/context.test.d.ts.map +0 -1
  119. package/dist/core/context.test.js +0 -253
  120. package/dist/core/context.test.js.map +0 -1
  121. package/dist/core/handoffs.d.ts +0 -151
  122. package/dist/core/handoffs.d.ts.map +0 -1
  123. package/dist/core/handoffs.js +0 -220
  124. package/dist/core/handoffs.js.map +0 -1
  125. package/dist/core/handoffs.test.d.ts +0 -8
  126. package/dist/core/handoffs.test.d.ts.map +0 -1
  127. package/dist/core/handoffs.test.js +0 -231
  128. package/dist/core/handoffs.test.js.map +0 -1
  129. package/dist/core/orchestrator.d.ts +0 -246
  130. package/dist/core/orchestrator.d.ts.map +0 -1
  131. package/dist/core/orchestrator.js +0 -514
  132. package/dist/core/orchestrator.js.map +0 -1
  133. package/dist/core/orchestrator.test.d.ts +0 -8
  134. package/dist/core/orchestrator.test.d.ts.map +0 -1
  135. package/dist/core/orchestrator.test.js +0 -517
  136. package/dist/core/orchestrator.test.js.map +0 -1
  137. package/dist/core/router.d.ts +0 -102
  138. package/dist/core/router.d.ts.map +0 -1
  139. package/dist/core/router.js +0 -178
  140. package/dist/core/router.js.map +0 -1
  141. package/dist/core/router.test.d.ts +0 -8
  142. package/dist/core/router.test.d.ts.map +0 -1
  143. package/dist/core/router.test.js +0 -215
  144. package/dist/core/router.test.js.map +0 -1
  145. package/dist/init.test.js +0 -288
  146. package/dist/providers/azure.d.ts +0 -147
  147. package/dist/providers/azure.d.ts.map +0 -1
  148. package/dist/providers/azure.js +0 -491
  149. package/dist/providers/azure.js.map +0 -1
  150. package/dist/providers/azure.test.d.ts +0 -11
  151. package/dist/providers/azure.test.d.ts.map +0 -1
  152. package/dist/providers/azure.test.js +0 -330
  153. package/dist/providers/azure.test.js.map +0 -1
  154. package/dist/providers/config.d.ts +0 -87
  155. package/dist/providers/config.d.ts.map +0 -1
  156. package/dist/providers/config.js +0 -193
  157. package/dist/providers/config.js.map +0 -1
  158. package/dist/providers/config.test.d.ts +0 -7
  159. package/dist/providers/config.test.d.ts.map +0 -1
  160. package/dist/providers/config.test.js +0 -370
  161. package/dist/providers/config.test.js.map +0 -1
  162. package/dist/providers/index.d.ts +0 -18
  163. package/dist/providers/index.d.ts.map +0 -1
  164. package/dist/providers/index.js +0 -14
  165. package/dist/providers/index.js.map +0 -1
  166. package/dist/providers/interface.d.ts +0 -191
  167. package/dist/providers/interface.d.ts.map +0 -1
  168. package/dist/providers/interface.js +0 -94
  169. package/dist/providers/interface.js.map +0 -1
  170. package/dist/providers/retry.d.ts +0 -128
  171. package/dist/providers/retry.d.ts.map +0 -1
  172. package/dist/providers/retry.js +0 -205
  173. package/dist/providers/retry.js.map +0 -1
  174. package/dist/providers/retry.test.d.ts +0 -7
  175. package/dist/providers/retry.test.d.ts.map +0 -1
  176. package/dist/providers/retry.test.js +0 -439
  177. package/dist/providers/retry.test.js.map +0 -1
  178. package/dist/providers/streaming.d.ts +0 -157
  179. package/dist/providers/streaming.d.ts.map +0 -1
  180. package/dist/providers/streaming.js +0 -233
  181. package/dist/providers/streaming.js.map +0 -1
  182. package/dist/providers/streaming.test.d.ts +0 -7
  183. package/dist/providers/streaming.test.d.ts.map +0 -1
  184. package/dist/providers/streaming.test.js +0 -372
  185. package/dist/providers/streaming.test.js.map +0 -1
  186. package/dist/providers/types.d.ts +0 -209
  187. package/dist/providers/types.d.ts.map +0 -1
  188. package/dist/providers/types.js +0 -53
  189. package/dist/providers/types.js.map +0 -1
  190. package/dist/providers/types.test.d.ts +0 -7
  191. package/dist/providers/types.test.d.ts.map +0 -1
  192. package/dist/providers/types.test.js +0 -141
  193. package/dist/providers/types.test.js.map +0 -1
  194. package/dist/tools/cli/beads.d.ts +0 -27
  195. package/dist/tools/cli/beads.d.ts.map +0 -1
  196. package/dist/tools/cli/beads.js +0 -172
  197. package/dist/tools/cli/beads.js.map +0 -1
  198. package/dist/tools/cli/beads.test.d.ts +0 -8
  199. package/dist/tools/cli/beads.test.d.ts.map +0 -1
  200. package/dist/tools/cli/beads.test.js +0 -264
  201. package/dist/tools/cli/beads.test.js.map +0 -1
  202. package/dist/tools/cli/editFile.d.ts +0 -17
  203. package/dist/tools/cli/editFile.d.ts.map +0 -1
  204. package/dist/tools/cli/editFile.js +0 -125
  205. package/dist/tools/cli/editFile.js.map +0 -1
  206. package/dist/tools/cli/editFile.test.d.ts +0 -8
  207. package/dist/tools/cli/editFile.test.d.ts.map +0 -1
  208. package/dist/tools/cli/editFile.test.js +0 -177
  209. package/dist/tools/cli/editFile.test.js.map +0 -1
  210. package/dist/tools/cli/readFile.d.ts +0 -25
  211. package/dist/tools/cli/readFile.d.ts.map +0 -1
  212. package/dist/tools/cli/readFile.js +0 -118
  213. package/dist/tools/cli/readFile.js.map +0 -1
  214. package/dist/tools/cli/readFile.test.d.ts +0 -8
  215. package/dist/tools/cli/readFile.test.d.ts.map +0 -1
  216. package/dist/tools/cli/readFile.test.js +0 -194
  217. package/dist/tools/cli/readFile.test.js.map +0 -1
  218. package/dist/tools/cli/search.d.ts +0 -16
  219. package/dist/tools/cli/search.d.ts.map +0 -1
  220. package/dist/tools/cli/search.js +0 -261
  221. package/dist/tools/cli/search.js.map +0 -1
  222. package/dist/tools/cli/search.test.d.ts +0 -8
  223. package/dist/tools/cli/search.test.d.ts.map +0 -1
  224. package/dist/tools/cli/search.test.js +0 -172
  225. package/dist/tools/cli/search.test.js.map +0 -1
  226. package/dist/tools/cli/subagent.d.ts +0 -43
  227. package/dist/tools/cli/subagent.d.ts.map +0 -1
  228. package/dist/tools/cli/subagent.js +0 -99
  229. package/dist/tools/cli/subagent.js.map +0 -1
  230. package/dist/tools/cli/subagent.test.d.ts +0 -8
  231. package/dist/tools/cli/subagent.test.d.ts.map +0 -1
  232. package/dist/tools/cli/subagent.test.js +0 -190
  233. package/dist/tools/cli/subagent.test.js.map +0 -1
  234. package/dist/tools/cli/terminal.d.ts +0 -19
  235. package/dist/tools/cli/terminal.d.ts.map +0 -1
  236. package/dist/tools/cli/terminal.js +0 -164
  237. package/dist/tools/cli/terminal.js.map +0 -1
  238. package/dist/tools/cli/terminal.test.d.ts +0 -8
  239. package/dist/tools/cli/terminal.test.d.ts.map +0 -1
  240. package/dist/tools/cli/terminal.test.js +0 -161
  241. package/dist/tools/cli/terminal.test.js.map +0 -1
  242. package/dist/tools/index.d.ts +0 -25
  243. package/dist/tools/index.d.ts.map +0 -1
  244. package/dist/tools/index.js +0 -41
  245. package/dist/tools/index.js.map +0 -1
  246. package/dist/tools/interface.d.ts +0 -64
  247. package/dist/tools/interface.d.ts.map +0 -1
  248. package/dist/tools/interface.js +0 -37
  249. package/dist/tools/interface.js.map +0 -1
  250. package/dist/tools/interface.test.d.ts +0 -7
  251. package/dist/tools/interface.test.d.ts.map +0 -1
  252. package/dist/tools/interface.test.js +0 -179
  253. package/dist/tools/interface.test.js.map +0 -1
  254. package/dist/tools/mcp/bridge.d.ts +0 -48
  255. package/dist/tools/mcp/bridge.d.ts.map +0 -1
  256. package/dist/tools/mcp/bridge.js +0 -128
  257. package/dist/tools/mcp/bridge.js.map +0 -1
  258. package/dist/tools/mcp/bridge.test.d.ts +0 -8
  259. package/dist/tools/mcp/bridge.test.d.ts.map +0 -1
  260. package/dist/tools/mcp/bridge.test.js +0 -300
  261. package/dist/tools/mcp/bridge.test.js.map +0 -1
  262. package/dist/tools/mcp/client.d.ts +0 -135
  263. package/dist/tools/mcp/client.d.ts.map +0 -1
  264. package/dist/tools/mcp/client.js +0 -263
  265. package/dist/tools/mcp/client.js.map +0 -1
  266. package/dist/tools/mcp/client.test.d.ts +0 -8
  267. package/dist/tools/mcp/client.test.d.ts.map +0 -1
  268. package/dist/tools/mcp/client.test.js +0 -390
  269. package/dist/tools/mcp/client.test.js.map +0 -1
  270. package/dist/tools/registry.d.ts +0 -82
  271. package/dist/tools/registry.d.ts.map +0 -1
  272. package/dist/tools/registry.js +0 -99
  273. package/dist/tools/registry.js.map +0 -1
  274. package/dist/tools/registry.test.d.ts +0 -7
  275. package/dist/tools/registry.test.d.ts.map +0 -1
  276. package/dist/tools/registry.test.js +0 -199
  277. package/dist/tools/registry.test.js.map +0 -1
  278. package/dist/tools/suite.test.d.ts +0 -11
  279. package/dist/tools/suite.test.d.ts.map +0 -1
  280. package/dist/tools/suite.test.js +0 -119
  281. package/dist/tools/suite.test.js.map +0 -1
  282. package/dist/tools/types.d.ts +0 -75
  283. package/dist/tools/types.d.ts.map +0 -1
  284. package/dist/tools/types.js +0 -30
  285. package/dist/tools/types.js.map +0 -1
  286. package/dist/tools/types.test.d.ts +0 -7
  287. package/dist/tools/types.test.d.ts.map +0 -1
  288. package/dist/tools/types.test.js +0 -178
  289. package/dist/tools/types.test.js.map +0 -1
  290. package/templates/.vscode/mcp.json +0 -20
  291. package/templates/CLAUDE.md +0 -129
@@ -1,209 +0,0 @@
1
- /**
2
- * LLM Provider Types
3
- *
4
- * Type definitions for the LLM provider abstraction layer.
5
- * Designed to be compatible with OpenAI/Azure OpenAI API shapes (Responses API).
6
- * Authentication uses Entra ID (Azure AD) via @azure/identity TokenCredential.
7
- */
8
- import type { TokenCredential } from '@azure/identity';
9
- /**
10
- * Error codes for LLM provider errors.
11
- * Used to categorize failures and determine retry behavior.
12
- */
13
- export type LLMErrorCode = 'AUTH_FAILED' | 'RATE_LIMITED' | 'TIMEOUT' | 'INVALID_REQUEST' | 'SERVER_ERROR' | 'NETWORK_ERROR';
14
- /**
15
- * Custom error class for LLM provider errors.
16
- * Includes metadata for error handling and retry logic.
17
- */
18
- export declare class LLMError extends Error {
19
- /** Categorized error code for programmatic handling */
20
- readonly code: LLMErrorCode;
21
- /** HTTP status code if applicable */
22
- readonly statusCode: number | undefined;
23
- /** Whether this error can be retried */
24
- readonly retryable: boolean;
25
- /** Provider that generated this error */
26
- readonly provider: string;
27
- /** Original error that caused this error */
28
- readonly cause?: Error;
29
- constructor(message: string, code: LLMErrorCode, provider: string, options?: {
30
- statusCode?: number;
31
- retryable?: boolean;
32
- cause?: Error;
33
- });
34
- /**
35
- * Determines default retry behavior based on error code.
36
- */
37
- private isRetryableByDefault;
38
- }
39
- /**
40
- * Role of a message in a chat conversation.
41
- */
42
- export type ChatRole = 'system' | 'user' | 'assistant' | 'tool';
43
- /**
44
- * A function call within a tool call.
45
- */
46
- export interface ToolCallFunction {
47
- /** Name of the function to call */
48
- name: string;
49
- /** JSON-encoded arguments for the function */
50
- arguments: string;
51
- }
52
- /**
53
- * A tool call requested by the model.
54
- */
55
- export interface ToolCall {
56
- /** Unique identifier for this tool call */
57
- id: string;
58
- /** Type of tool (currently only 'function' is supported) */
59
- type: 'function';
60
- /** Function call details */
61
- function: ToolCallFunction;
62
- }
63
- /**
64
- * A message in a chat conversation.
65
- * Represents a single turn from system, user, assistant, or tool.
66
- */
67
- export interface ChatMessage {
68
- /** The role of the message author */
69
- role: ChatRole;
70
- /** The content of the message */
71
- content: string;
72
- /** Optional name of the author (for multi-user conversations) */
73
- name?: string;
74
- /** Tool call ID this message is responding to (for tool role) */
75
- tool_call_id?: string;
76
- /** Tool calls requested by the assistant */
77
- tool_calls?: ToolCall[];
78
- }
79
- /**
80
- * Reason the model stopped generating.
81
- */
82
- export type FinishReason = 'stop' | 'tool_calls' | 'length' | 'content_filter';
83
- /**
84
- * Delta for a tool call in a streaming response.
85
- * Fields are optional as they arrive incrementally.
86
- */
87
- export interface ToolCallDelta {
88
- /** Index of the tool call in the array */
89
- index: number;
90
- /** Tool call ID (sent in first chunk) */
91
- id?: string;
92
- /** Type of tool (sent in first chunk) */
93
- type?: 'function';
94
- /** Function details (arrives incrementally) */
95
- function?: {
96
- /** Function name (sent in first chunk) */
97
- name?: string;
98
- /** Arguments (streamed incrementally) */
99
- arguments?: string;
100
- };
101
- }
102
- /**
103
- * A chunk of a streaming chat response.
104
- * Represents incremental content as it's generated.
105
- */
106
- export interface ChatChunk {
107
- /** Unique identifier for this completion */
108
- id: string;
109
- /** Incremental content (null when no content in this chunk) */
110
- content: string | null;
111
- /** Role of the response (typically only in first chunk) */
112
- role?: ChatRole;
113
- /** Reason for stopping (only in final chunk) */
114
- finish_reason: FinishReason | null;
115
- /** Incremental tool call data */
116
- tool_calls?: ToolCallDelta[];
117
- }
118
- /**
119
- * JSON Schema definition for function parameters.
120
- * Uses Record for flexibility with standard JSON Schema properties.
121
- */
122
- export type JSONSchema = Record<string, unknown>;
123
- /**
124
- * Function definition within a tool.
125
- */
126
- export interface ToolFunctionDefinition {
127
- /** Name of the function */
128
- name: string;
129
- /** Description of what the function does */
130
- description: string;
131
- /** JSON Schema describing the function parameters */
132
- parameters: JSONSchema;
133
- }
134
- /**
135
- * A tool definition that can be provided to the model.
136
- * Defines tools the model can choose to call.
137
- */
138
- export interface ToolDefinition {
139
- /** Type of tool (currently only 'function' is supported) */
140
- type: 'function';
141
- /** Function definition */
142
- function: ToolFunctionDefinition;
143
- }
144
- /**
145
- * Supported LLM providers.
146
- */
147
- export type LLMProvider = 'azure-openai';
148
- /**
149
- * Configuration for an LLM provider connection.
150
- * Contains credentials, model selection, and generation parameters.
151
- * Authentication uses Entra ID via TokenCredential.
152
- */
153
- export interface LLMConfig {
154
- /** The LLM provider to use */
155
- provider: LLMProvider;
156
- /** Model or deployment name */
157
- model: string;
158
- /** API endpoint URL */
159
- endpoint: string;
160
- /** Entra ID token credential for authentication */
161
- credential: TokenCredential;
162
- /** API version (required for Azure OpenAI) */
163
- apiVersion?: string;
164
- /** Sampling temperature (0-2, default varies by provider) */
165
- temperature?: number;
166
- /** Maximum tokens to generate */
167
- maxTokens?: number;
168
- /** Top-p (nucleus) sampling parameter (0-1) */
169
- topP?: number;
170
- /** Frequency penalty (-2 to 2) */
171
- frequencyPenalty?: number;
172
- /** Presence penalty (-2 to 2) */
173
- presencePenalty?: number;
174
- }
175
- /**
176
- * Token usage statistics for a completion.
177
- */
178
- export interface TokenUsage {
179
- /** Number of tokens in the prompt */
180
- prompt_tokens: number;
181
- /** Number of tokens in the completion */
182
- completion_tokens: number;
183
- /** Total tokens used (prompt + completion) */
184
- total_tokens: number;
185
- }
186
- /**
187
- * A choice within an LLM response.
188
- * Represents one possible completion (typically just one for chat).
189
- */
190
- export interface LLMResponseChoice {
191
- /** Index of this choice */
192
- index: number;
193
- /** The generated message */
194
- message: ChatMessage;
195
- /** Reason the model stopped generating */
196
- finish_reason: FinishReason;
197
- }
198
- /**
199
- * Full (non-streaming) response from an LLM.
200
- */
201
- export interface LLMResponse {
202
- /** Unique identifier for this completion */
203
- id: string;
204
- /** List of completion choices */
205
- choices: LLMResponseChoice[];
206
- /** Token usage statistics */
207
- usage: TokenUsage;
208
- }
209
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/providers/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAMvD;;;GAGG;AACH,MAAM,MAAM,YAAY,GACpB,aAAa,GACb,cAAc,GACd,SAAS,GACT,iBAAiB,GACjB,cAAc,GACd,eAAe,CAAC;AAEpB;;;GAGG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACjC,uDAAuD;IACvD,QAAQ,CAAC,IAA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;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,8BAA8B;IAC9B,QAAQ,EAAE,WAAW,CAAC;IAEtB,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IAEd,uBAAuB;IACvB,QAAQ,EAAE,MAAM,CAAC;IAEjB,mDAAmD;IACnD,UAAU,EAAE,eAAe,CAAC;IAE5B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,kCAAkC;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,iCAAiC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAMD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,qCAAqC;IACrC,aAAa,EAAE,MAAM,CAAC;IAEtB,yCAAyC;IACzC,iBAAiB,EAAE,MAAM,CAAC;IAE1B,8CAA8C;IAC9C,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IAEd,4BAA4B;IAC5B,OAAO,EAAE,WAAW,CAAC;IAErB,0CAA0C;IAC1C,aAAa,EAAE,YAAY,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IAEX,iCAAiC;IACjC,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAE7B,6BAA6B;IAC7B,KAAK,EAAE,UAAU,CAAC;CACnB"}
@@ -1,53 +0,0 @@
1
- /**
2
- * LLM Provider Types
3
- *
4
- * Type definitions for the LLM provider abstraction layer.
5
- * Designed to be compatible with OpenAI/Azure OpenAI API shapes (Responses API).
6
- * Authentication uses Entra ID (Azure AD) via @azure/identity TokenCredential.
7
- */
8
- /**
9
- * Custom error class for LLM provider errors.
10
- * Includes metadata for error handling and retry logic.
11
- */
12
- export class LLMError extends Error {
13
- /** Categorized error code for programmatic handling */
14
- code;
15
- /** HTTP status code if applicable */
16
- statusCode;
17
- /** Whether this error can be retried */
18
- retryable;
19
- /** Provider that generated this error */
20
- provider;
21
- /** Original error that caused this error */
22
- cause;
23
- constructor(message, code, provider, options) {
24
- super(message);
25
- this.name = 'LLMError';
26
- this.code = code;
27
- this.provider = provider;
28
- this.statusCode = options?.statusCode;
29
- this.retryable = options?.retryable ?? this.isRetryableByDefault(code);
30
- // Set cause for error chaining (ES2022+)
31
- if (options?.cause) {
32
- this.cause = options.cause;
33
- }
34
- }
35
- /**
36
- * Determines default retry behavior based on error code.
37
- */
38
- isRetryableByDefault(code) {
39
- switch (code) {
40
- case 'RATE_LIMITED':
41
- case 'TIMEOUT':
42
- case 'SERVER_ERROR':
43
- case 'NETWORK_ERROR':
44
- return true;
45
- case 'AUTH_FAILED':
46
- case 'INVALID_REQUEST':
47
- return false;
48
- default:
49
- return false;
50
- }
51
- }
52
- }
53
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/providers/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoBH;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAK;IACjC,uDAAuD;IAC9C,IAAI,CAAe;IAE5B,qCAAqC;IAC5B,UAAU,CAAqB;IAExC,wCAAwC;IAC/B,SAAS,CAAU;IAE5B,yCAAyC;IAChC,QAAQ,CAAS;IAE1B,4CAA4C;IACnC,KAAK,CAAS;IAEvB,YACE,OAAe,EACf,IAAkB,EAClB,QAAgB,EAChB,OAIC;QAED,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,OAAO,EAAE,UAAU,CAAC;QACtC,IAAI,CAAC,SAAS,GAAG,OAAO,EAAE,SAAS,IAAI,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAEvE,yCAAyC;QACzC,IAAI,OAAO,EAAE,KAAK,EAAE,CAAC;YACnB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC7B,CAAC;IACH,CAAC;IAED;;OAEG;IACK,oBAAoB,CAAC,IAAkB;QAC7C,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,cAAc,CAAC;YACpB,KAAK,SAAS,CAAC;YACf,KAAK,cAAc,CAAC;YACpB,KAAK,eAAe;gBAClB,OAAO,IAAI,CAAC;YACd,KAAK,aAAa,CAAC;YACnB,KAAK,iBAAiB;gBACpB,OAAO,KAAK,CAAC;YACf;gBACE,OAAO,KAAK,CAAC;QACjB,CAAC;IACH,CAAC;CACF"}
@@ -1,7 +0,0 @@
1
- /**
2
- * LLM Provider Types Tests
3
- *
4
- * Tests for LLMError class and type definitions.
5
- */
6
- export {};
7
- //# sourceMappingURL=types.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.test.d.ts","sourceRoot":"","sources":["../../src/providers/types.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -1,141 +0,0 @@
1
- /**
2
- * LLM Provider Types Tests
3
- *
4
- * Tests for LLMError class and type definitions.
5
- */
6
- import { describe, it } from 'node:test';
7
- import assert from 'node:assert';
8
- import { LLMError } from './types.js';
9
- describe('LLMError', () => {
10
- describe('constructor', () => {
11
- it('should set message correctly', () => {
12
- const error = new LLMError('Test message', 'AUTH_FAILED', 'test-provider');
13
- assert.strictEqual(error.message, 'Test message');
14
- });
15
- it('should set code correctly', () => {
16
- const error = new LLMError('Test', 'RATE_LIMITED', 'test-provider');
17
- assert.strictEqual(error.code, 'RATE_LIMITED');
18
- });
19
- it('should set provider correctly', () => {
20
- const error = new LLMError('Test', 'TIMEOUT', 'azure-openai');
21
- assert.strictEqual(error.provider, 'azure-openai');
22
- });
23
- it('should set statusCode from options', () => {
24
- const error = new LLMError('Test', 'SERVER_ERROR', 'test-provider', {
25
- statusCode: 503,
26
- });
27
- assert.strictEqual(error.statusCode, 503);
28
- });
29
- it('should leave statusCode undefined when not provided', () => {
30
- const error = new LLMError('Test', 'SERVER_ERROR', 'test-provider');
31
- assert.strictEqual(error.statusCode, undefined);
32
- });
33
- it('should set cause from options', () => {
34
- const originalError = new Error('Original error');
35
- const error = new LLMError('Wrapped', 'NETWORK_ERROR', 'test-provider', {
36
- cause: originalError,
37
- });
38
- assert.strictEqual(error.cause, originalError);
39
- });
40
- it('should leave cause undefined when not provided', () => {
41
- const error = new LLMError('Test', 'AUTH_FAILED', 'test-provider');
42
- assert.strictEqual(error.cause, undefined);
43
- });
44
- it('should set all options together', () => {
45
- const cause = new Error('Root cause');
46
- const error = new LLMError('Complete error', 'RATE_LIMITED', 'azure-openai', {
47
- statusCode: 429,
48
- retryable: true,
49
- cause,
50
- });
51
- assert.strictEqual(error.message, 'Complete error');
52
- assert.strictEqual(error.code, 'RATE_LIMITED');
53
- assert.strictEqual(error.provider, 'azure-openai');
54
- assert.strictEqual(error.statusCode, 429);
55
- assert.strictEqual(error.retryable, true);
56
- assert.strictEqual(error.cause, cause);
57
- });
58
- });
59
- describe('name property', () => {
60
- it('should be "LLMError"', () => {
61
- const error = new LLMError('Test', 'AUTH_FAILED', 'test');
62
- assert.strictEqual(error.name, 'LLMError');
63
- });
64
- });
65
- describe('inheritance', () => {
66
- it('should be an instance of Error', () => {
67
- const error = new LLMError('Test', 'AUTH_FAILED', 'test');
68
- assert.ok(error instanceof Error);
69
- });
70
- it('should be an instance of LLMError', () => {
71
- const error = new LLMError('Test', 'AUTH_FAILED', 'test');
72
- assert.ok(error instanceof LLMError);
73
- });
74
- it('should have a stack trace', () => {
75
- const error = new LLMError('Test', 'AUTH_FAILED', 'test');
76
- assert.ok(typeof error.stack === 'string');
77
- assert.ok(error.stack.length > 0);
78
- });
79
- });
80
- describe('isRetryableByDefault', () => {
81
- describe('retryable error codes', () => {
82
- const retryableErrorCodes = [
83
- 'RATE_LIMITED',
84
- 'TIMEOUT',
85
- 'SERVER_ERROR',
86
- 'NETWORK_ERROR',
87
- ];
88
- for (const code of retryableErrorCodes) {
89
- it(`should default retryable to true for ${code}`, () => {
90
- const error = new LLMError('Test', code, 'test-provider');
91
- assert.strictEqual(error.retryable, true, `${code} should be retryable by default`);
92
- });
93
- }
94
- });
95
- describe('non-retryable error codes', () => {
96
- const nonRetryableErrorCodes = ['AUTH_FAILED', 'INVALID_REQUEST'];
97
- for (const code of nonRetryableErrorCodes) {
98
- it(`should default retryable to false for ${code}`, () => {
99
- const error = new LLMError('Test', code, 'test-provider');
100
- assert.strictEqual(error.retryable, false, `${code} should not be retryable by default`);
101
- });
102
- }
103
- });
104
- });
105
- describe('custom retryable override', () => {
106
- it('should allow overriding retryable to false for a normally-retryable code', () => {
107
- const error = new LLMError('Test', 'RATE_LIMITED', 'test-provider', {
108
- retryable: false,
109
- });
110
- assert.strictEqual(error.retryable, false);
111
- });
112
- it('should allow overriding retryable to true for a normally-non-retryable code', () => {
113
- const error = new LLMError('Test', 'AUTH_FAILED', 'test-provider', {
114
- retryable: true,
115
- });
116
- assert.strictEqual(error.retryable, true);
117
- });
118
- it('should respect explicit retryable false even for SERVER_ERROR', () => {
119
- const error = new LLMError('Test', 'SERVER_ERROR', 'test-provider', {
120
- retryable: false,
121
- });
122
- assert.strictEqual(error.retryable, false);
123
- });
124
- });
125
- describe('readonly properties', () => {
126
- it('should have readonly code', () => {
127
- const error = new LLMError('Test', 'AUTH_FAILED', 'test');
128
- // TypeScript enforces this at compile time, but we verify the value is set correctly
129
- assert.strictEqual(error.code, 'AUTH_FAILED');
130
- });
131
- it('should have readonly provider', () => {
132
- const error = new LLMError('Test', 'AUTH_FAILED', 'test-provider');
133
- assert.strictEqual(error.provider, 'test-provider');
134
- });
135
- it('should have readonly retryable', () => {
136
- const error = new LLMError('Test', 'AUTH_FAILED', 'test');
137
- assert.strictEqual(error.retryable, false);
138
- });
139
- });
140
- });
141
- //# sourceMappingURL=types.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.test.js","sourceRoot":"","sources":["../../src/providers/types.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;QAC3B,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;YACtC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,cAAc,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;YAE3E,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QACpD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;YACnC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;YAEpE,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;YACvC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;YAE9D,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oCAAoC,EAA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AAa,EAAE,MAAM,CAAC,CAAC;YAE1D,qFAAqF;YACrF,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;YACvC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;YAEnE,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE;YACxC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;YAE1D,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,27 +0,0 @@
1
- /**
2
- * Beads Tool
3
- *
4
- * Wraps the `bd` CLI for issue tracking via the beads system.
5
- * Supports creating, closing, listing, and inspecting issues
6
- * and their dependency trees.
7
- *
8
- * @see https://github.com/steveyegge/beads
9
- */
10
- import { execFile as nodeExecFile } from 'node:child_process';
11
- import type { Tool } from '../interface.js';
12
- /** Type for the execFile callback-style function, used for dependency injection in tests */
13
- type ExecFileFn = typeof nodeExecFile;
14
- /**
15
- * Create a beads tool instance.
16
- *
17
- * Accepts an optional `execFn` for dependency injection in tests.
18
- * When omitted, uses `node:child_process.execFile`.
19
- *
20
- * @param execFn - Optional execFile function for testing
21
- * @returns A Tool implementation for beads
22
- */
23
- export declare function createBeadsTool(execFn?: ExecFileFn): Tool;
24
- /** Default beads tool instance using real execFile */
25
- export declare const beadsTool: Tool;
26
- export {};
27
- //# sourceMappingURL=beads.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"beads.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/beads.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAQ5C,4FAA4F;AAC5F,KAAK,UAAU,GAAG,OAAO,YAAY,CAAC;AAsGtC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CA2EzD;AAED,sDAAsD;AACtD,eAAO,MAAM,SAAS,EAAE,IAAwB,CAAC"}
@@ -1,172 +0,0 @@
1
- /**
2
- * Beads Tool
3
- *
4
- * Wraps the `bd` CLI for issue tracking via the beads system.
5
- * Supports creating, closing, listing, and inspecting issues
6
- * and their dependency trees.
7
- *
8
- * @see https://github.com/steveyegge/beads
9
- */
10
- import { execFile as nodeExecFile } from 'node:child_process';
11
- import { ToolError } from '../types.js';
12
- /** Valid beads commands */
13
- const BEADS_COMMANDS = ['create', 'close', 'list', 'ready', 'show', 'dep-tree'];
14
- /** Input schema for the beads tool */
15
- const inputSchema = {
16
- type: 'object',
17
- properties: {
18
- command: {
19
- type: 'string',
20
- enum: [...BEADS_COMMANDS],
21
- description: 'Beads command to execute',
22
- },
23
- args: {
24
- type: 'object',
25
- description: 'Command-specific arguments',
26
- properties: {
27
- title: { type: 'string', description: 'Issue title (for create)' },
28
- description: { type: 'string', description: 'Issue description (for create)' },
29
- type: { type: 'string', enum: ['task', 'epic'], description: 'Issue type (for create)' },
30
- priority: { type: 'number', description: 'Priority level (for create)' },
31
- parent: { type: 'string', description: 'Parent issue ID (for create)' },
32
- deps: { type: 'string', description: 'Comma-separated dependency IDs (for create)' },
33
- label: { type: 'string', description: 'Label to apply (for create)' },
34
- id: { type: 'string', description: 'Issue ID (for close, show, dep-tree)' },
35
- },
36
- },
37
- },
38
- required: ['command'],
39
- };
40
- /**
41
- * Build the `bd` CLI argument array for a given command and args.
42
- *
43
- * @param command - The beads command to run
44
- * @param args - Command-specific arguments
45
- * @param toolName - Tool name for error reporting
46
- * @returns Array of string arguments to pass to `bd`
47
- */
48
- function buildArgs(command, args, toolName) {
49
- switch (command) {
50
- case 'create': {
51
- const title = args?.title;
52
- if (typeof title !== 'string' || title.trim().length === 0) {
53
- throw new ToolError('title is required for create command', 'INVALID_INPUT', toolName);
54
- }
55
- const result = ['create', title];
56
- if (typeof args?.description === 'string' && args.description.length > 0) {
57
- result.push(`--description=${args.description}`);
58
- }
59
- if (args?.type === 'epic') {
60
- result.push('--type', 'epic');
61
- }
62
- if (typeof args?.priority === 'number') {
63
- result.push('-p', String(args.priority));
64
- }
65
- if (typeof args?.parent === 'string' && args.parent.length > 0) {
66
- result.push('--parent', args.parent);
67
- }
68
- if (typeof args?.deps === 'string' && args.deps.length > 0) {
69
- result.push('--deps', args.deps);
70
- }
71
- if (typeof args?.label === 'string' && args.label.length > 0) {
72
- result.push('-l', args.label);
73
- }
74
- return result;
75
- }
76
- case 'close': {
77
- const id = args?.id;
78
- if (typeof id !== 'string' || id.trim().length === 0) {
79
- throw new ToolError('id is required for close command', 'INVALID_INPUT', toolName);
80
- }
81
- return ['close', id];
82
- }
83
- case 'list':
84
- return ['list'];
85
- case 'ready':
86
- return ['ready'];
87
- case 'show': {
88
- const id = args?.id;
89
- if (typeof id !== 'string' || id.trim().length === 0) {
90
- throw new ToolError('id is required for show command', 'INVALID_INPUT', toolName);
91
- }
92
- return ['show', id];
93
- }
94
- case 'dep-tree': {
95
- const id = args?.id;
96
- if (typeof id !== 'string' || id.trim().length === 0) {
97
- throw new ToolError('id is required for dep-tree command', 'INVALID_INPUT', toolName);
98
- }
99
- return ['dep', 'tree', id];
100
- }
101
- }
102
- }
103
- /**
104
- * Create a beads tool instance.
105
- *
106
- * Accepts an optional `execFn` for dependency injection in tests.
107
- * When omitted, uses `node:child_process.execFile`.
108
- *
109
- * @param execFn - Optional execFile function for testing
110
- * @returns A Tool implementation for beads
111
- */
112
- export function createBeadsTool(execFn) {
113
- const exec = execFn ?? nodeExecFile;
114
- return {
115
- name: 'beads',
116
- description: 'Manage issues and work tracking via the beads (bd) CLI',
117
- inputSchema,
118
- async execute(input, context) {
119
- // Check permission — beads runs as a CLI command
120
- if (!context.permissions.allowTerminal) {
121
- throw new ToolError('Terminal permission denied', 'PERMISSION_DENIED', 'beads');
122
- }
123
- // Validate command
124
- const command = input.command;
125
- if (typeof command !== 'string' || !BEADS_COMMANDS.includes(command)) {
126
- throw new ToolError(`command must be one of: ${BEADS_COMMANDS.join(', ')}`, 'INVALID_INPUT', 'beads');
127
- }
128
- const args = (input.args ?? undefined);
129
- const bdArgs = buildArgs(command, args, 'beads');
130
- // Verify bd is available
131
- await new Promise((resolve, reject) => {
132
- exec('bd', ['--version'], { timeout: 5000 }, (error) => {
133
- if (error) {
134
- reject(new ToolError('beads (bd) CLI not found. Install from https://github.com/steveyegge/beads', 'NOT_FOUND', 'beads', { cause: error }));
135
- }
136
- else {
137
- resolve();
138
- }
139
- });
140
- });
141
- // Execute the bd command
142
- return new Promise((resolve, reject) => {
143
- exec('bd', bdArgs, { cwd: context.workingDir, timeout: 30_000 }, (error, stdout, stderr) => {
144
- let output = '';
145
- if (stdout)
146
- output += stdout;
147
- if (stderr) {
148
- if (output.length > 0 && !output.endsWith('\n'))
149
- output += '\n';
150
- if (stderr.length > 0)
151
- output += stderr;
152
- }
153
- if (error) {
154
- reject(new ToolError(`bd ${command} failed: ${output || error.message}`, 'EXECUTION_FAILED', 'beads', { cause: error }));
155
- return;
156
- }
157
- resolve({
158
- success: true,
159
- output: output.trim(),
160
- metadata: {
161
- command,
162
- args: bdArgs,
163
- },
164
- });
165
- });
166
- });
167
- },
168
- };
169
- }
170
- /** Default beads tool instance using real execFile */
171
- export const beadsTool = createBeadsTool();
172
- //# sourceMappingURL=beads.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"beads.js","sourceRoot":"","s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,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE;wBACrB,QAAQ,EAAE;4BACR,OAAO;4BACP,IAAI,EAAE,MAAM;yBACb;qBACF,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED,sDAAsD;AACtD,MAAM,CAAC,MAAM,SAAS,GAAS,eAAe,EAAE,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Beads Tool Tests
3
- *
4
- * Tests for the beads tool implementation.
5
- * Uses dependency injection (createBeadsTool) to mock execFile.
6
- */
7
- export {};
8
- //# sourceMappingURL=beads.test.d.ts.map