patchwork-os 0.2.0-alpha.33 → 0.2.0-alpha.35

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 (270) hide show
  1. package/README.md +248 -48
  2. package/deploy/bootstrap-new-vps.sh +12 -12
  3. package/deploy/bootstrap-vps.sh +6 -3
  4. package/deploy/deploy-landing.sh +59 -2
  5. package/dist/bridge.js +35 -1
  6. package/dist/bridge.js.map +1 -1
  7. package/dist/commands/recipe.d.ts +11 -0
  8. package/dist/commands/recipe.js +32 -3
  9. package/dist/commands/recipe.js.map +1 -1
  10. package/dist/commands/recipeInstall.d.ts +79 -1
  11. package/dist/commands/recipeInstall.js +241 -13
  12. package/dist/commands/recipeInstall.js.map +1 -1
  13. package/dist/connectors/asana.d.ts +198 -0
  14. package/dist/connectors/asana.js +680 -0
  15. package/dist/connectors/asana.js.map +1 -0
  16. package/dist/connectors/baseConnector.d.ts +16 -0
  17. package/dist/connectors/baseConnector.js +107 -25
  18. package/dist/connectors/baseConnector.js.map +1 -1
  19. package/dist/connectors/discord.d.ts +150 -0
  20. package/dist/connectors/discord.js +544 -0
  21. package/dist/connectors/discord.js.map +1 -0
  22. package/dist/connectors/github.js +15 -7
  23. package/dist/connectors/github.js.map +1 -1
  24. package/dist/connectors/gitlab.d.ts +180 -0
  25. package/dist/connectors/gitlab.js +582 -0
  26. package/dist/connectors/gitlab.js.map +1 -0
  27. package/dist/connectors/gmail.js +45 -0
  28. package/dist/connectors/gmail.js.map +1 -1
  29. package/dist/connectors/googleDrive.d.ts +34 -0
  30. package/dist/connectors/googleDrive.js +305 -0
  31. package/dist/connectors/googleDrive.js.map +1 -0
  32. package/dist/connectors/htmlEscape.d.ts +5 -0
  33. package/dist/connectors/htmlEscape.js +13 -0
  34. package/dist/connectors/htmlEscape.js.map +1 -0
  35. package/dist/connectors/linear.js +26 -6
  36. package/dist/connectors/linear.js.map +1 -1
  37. package/dist/connectors/mcpOAuth.d.ts +2 -0
  38. package/dist/connectors/mcpOAuth.js +8 -4
  39. package/dist/connectors/mcpOAuth.js.map +1 -1
  40. package/dist/connectors/pagerduty.d.ts +160 -0
  41. package/dist/connectors/pagerduty.js +464 -0
  42. package/dist/connectors/pagerduty.js.map +1 -0
  43. package/dist/connectors/sentry.js +3 -2
  44. package/dist/connectors/sentry.js.map +1 -1
  45. package/dist/connectors/slack.d.ts +1 -1
  46. package/dist/connectors/slack.js +7 -4
  47. package/dist/connectors/slack.js.map +1 -1
  48. package/dist/featureFlags.d.ts +17 -11
  49. package/dist/featureFlags.js +52 -47
  50. package/dist/featureFlags.js.map +1 -1
  51. package/dist/index.js +262 -129
  52. package/dist/index.js.map +1 -1
  53. package/dist/oauth.js +3 -2
  54. package/dist/oauth.js.map +1 -1
  55. package/dist/recipeOrchestration.d.ts +7 -0
  56. package/dist/recipeOrchestration.js +154 -28
  57. package/dist/recipeOrchestration.js.map +1 -1
  58. package/dist/recipes/agentExecutor.d.ts +1 -0
  59. package/dist/recipes/agentExecutor.js +7 -0
  60. package/dist/recipes/agentExecutor.js.map +1 -1
  61. package/dist/recipes/captureForRunlog.d.ts +27 -0
  62. package/dist/recipes/captureForRunlog.js +128 -0
  63. package/dist/recipes/captureForRunlog.js.map +1 -0
  64. package/dist/recipes/chainedRunner.d.ts +39 -3
  65. package/dist/recipes/chainedRunner.js +183 -28
  66. package/dist/recipes/chainedRunner.js.map +1 -1
  67. package/dist/recipes/detectSilentFail.d.ts +34 -0
  68. package/dist/recipes/detectSilentFail.js +105 -0
  69. package/dist/recipes/detectSilentFail.js.map +1 -0
  70. package/dist/recipes/legacyRecipeCompat.d.ts +8 -0
  71. package/dist/recipes/legacyRecipeCompat.js +20 -1
  72. package/dist/recipes/legacyRecipeCompat.js.map +1 -1
  73. package/dist/recipes/manifest.js +21 -6
  74. package/dist/recipes/manifest.js.map +1 -1
  75. package/dist/recipes/migrations/index.d.ts +24 -0
  76. package/dist/recipes/migrations/index.js +55 -0
  77. package/dist/recipes/migrations/index.js.map +1 -0
  78. package/dist/recipes/migrations/types.d.ts +28 -0
  79. package/dist/recipes/migrations/types.js +2 -0
  80. package/dist/recipes/migrations/types.js.map +1 -0
  81. package/dist/recipes/migrations/v1.d.ts +11 -0
  82. package/dist/recipes/migrations/v1.js +18 -0
  83. package/dist/recipes/migrations/v1.js.map +1 -0
  84. package/dist/recipes/replayRun.d.ts +62 -0
  85. package/dist/recipes/replayRun.js +97 -0
  86. package/dist/recipes/replayRun.js.map +1 -0
  87. package/dist/recipes/scheduler.js +102 -11
  88. package/dist/recipes/scheduler.js.map +1 -1
  89. package/dist/recipes/schemaGenerator.js +3 -3
  90. package/dist/recipes/schemaGenerator.js.map +1 -1
  91. package/dist/recipes/templateEngine.js +8 -1
  92. package/dist/recipes/templateEngine.js.map +1 -1
  93. package/dist/recipes/toolRegistry.d.ts +5 -0
  94. package/dist/recipes/toolRegistry.js +9 -0
  95. package/dist/recipes/toolRegistry.js.map +1 -1
  96. package/dist/recipes/tools/asana.d.ts +16 -0
  97. package/dist/recipes/tools/asana.js +524 -0
  98. package/dist/recipes/tools/asana.js.map +1 -0
  99. package/dist/recipes/tools/discord.d.ts +18 -0
  100. package/dist/recipes/tools/discord.js +254 -0
  101. package/dist/recipes/tools/discord.js.map +1 -0
  102. package/dist/recipes/tools/github.js +29 -4
  103. package/dist/recipes/tools/github.js.map +1 -1
  104. package/dist/recipes/tools/gitlab.d.ts +11 -0
  105. package/dist/recipes/tools/gitlab.js +285 -0
  106. package/dist/recipes/tools/gitlab.js.map +1 -0
  107. package/dist/recipes/tools/gmail.d.ts +1 -1
  108. package/dist/recipes/tools/gmail.js +230 -6
  109. package/dist/recipes/tools/gmail.js.map +1 -1
  110. package/dist/recipes/tools/googleDrive.d.ts +1 -0
  111. package/dist/recipes/tools/googleDrive.js +55 -0
  112. package/dist/recipes/tools/googleDrive.js.map +1 -0
  113. package/dist/recipes/tools/index.d.ts +6 -0
  114. package/dist/recipes/tools/index.js +6 -0
  115. package/dist/recipes/tools/index.js.map +1 -1
  116. package/dist/recipes/tools/linear.d.ts +2 -1
  117. package/dist/recipes/tools/linear.js +222 -1
  118. package/dist/recipes/tools/linear.js.map +1 -1
  119. package/dist/recipes/tools/meetingNotes.d.ts +21 -0
  120. package/dist/recipes/tools/meetingNotes.js +701 -0
  121. package/dist/recipes/tools/meetingNotes.js.map +1 -0
  122. package/dist/recipes/tools/pagerduty.d.ts +15 -0
  123. package/dist/recipes/tools/pagerduty.js +451 -0
  124. package/dist/recipes/tools/pagerduty.js.map +1 -0
  125. package/dist/recipes/tools/slack.js +8 -2
  126. package/dist/recipes/tools/slack.js.map +1 -1
  127. package/dist/recipes/validation.js +54 -15
  128. package/dist/recipes/validation.js.map +1 -1
  129. package/dist/recipes/yamlRunner.d.ts +23 -2
  130. package/dist/recipes/yamlRunner.js +265 -60
  131. package/dist/recipes/yamlRunner.js.map +1 -1
  132. package/dist/recipesHttp.d.ts +60 -0
  133. package/dist/recipesHttp.js +418 -3
  134. package/dist/recipesHttp.js.map +1 -1
  135. package/dist/runLog.d.ts +64 -2
  136. package/dist/runLog.js +116 -2
  137. package/dist/runLog.js.map +1 -1
  138. package/dist/server.d.ts +21 -0
  139. package/dist/server.js +387 -8
  140. package/dist/server.js.map +1 -1
  141. package/dist/streamableHttp.d.ts +31 -1
  142. package/dist/streamableHttp.js +20 -2
  143. package/dist/streamableHttp.js.map +1 -1
  144. package/dist/tools/activityLog.d.ts +2 -0
  145. package/dist/tools/addLinearComment.d.ts +1 -0
  146. package/dist/tools/batchLsp.d.ts +3 -0
  147. package/dist/tools/bridgeDoctor.d.ts +1 -0
  148. package/dist/tools/bridgeStatus.d.ts +1 -0
  149. package/dist/tools/cancelClaudeTask.d.ts +1 -0
  150. package/dist/tools/checkDocumentDirty.d.ts +1 -0
  151. package/dist/tools/clipboard.d.ts +2 -0
  152. package/dist/tools/closeTabs.d.ts +2 -0
  153. package/dist/tools/codeLens.d.ts +1 -0
  154. package/dist/tools/contextBundle.d.ts +1 -0
  155. package/dist/tools/createIssueFromAIComment.d.ts +1 -0
  156. package/dist/tools/createLinearIssue.d.ts +1 -0
  157. package/dist/tools/ctxGetTaskContext.d.ts +1 -0
  158. package/dist/tools/ctxQueryTraces.d.ts +1 -0
  159. package/dist/tools/ctxSaveTrace.d.ts +1 -0
  160. package/dist/tools/debug.d.ts +4 -0
  161. package/dist/tools/decorations.d.ts +2 -0
  162. package/dist/tools/documentLinks.d.ts +1 -0
  163. package/dist/tools/editText.d.ts +1 -0
  164. package/dist/tools/enrichCommit.d.ts +1 -0
  165. package/dist/tools/enrichStackTrace.d.ts +1 -0
  166. package/dist/tools/explainDiagnostic.d.ts +1 -0
  167. package/dist/tools/explainSymbol.d.ts +1 -0
  168. package/dist/tools/fetchCalendarEvents.d.ts +1 -0
  169. package/dist/tools/fetchGithubIssue.d.ts +1 -0
  170. package/dist/tools/fetchGithubPR.d.ts +1 -0
  171. package/dist/tools/fetchLinearIssue.d.ts +1 -0
  172. package/dist/tools/fetchSentryIssue.d.ts +1 -0
  173. package/dist/tools/fetchSlackProfile.d.ts +1 -0
  174. package/dist/tools/fileOperations.d.ts +3 -0
  175. package/dist/tools/fileWatcher.d.ts +2 -0
  176. package/dist/tools/findFiles.d.ts +1 -0
  177. package/dist/tools/findRelatedTests.d.ts +1 -0
  178. package/dist/tools/fixAllLintErrors.d.ts +1 -0
  179. package/dist/tools/foldingRanges.d.ts +1 -0
  180. package/dist/tools/formatDocument.d.ts +1 -0
  181. package/dist/tools/generateTests.d.ts +1 -0
  182. package/dist/tools/getAIComments.d.ts +1 -0
  183. package/dist/tools/getAnalyticsReport.d.ts +1 -0
  184. package/dist/tools/getArchitectureContext.d.ts +1 -0
  185. package/dist/tools/getBufferContent.d.ts +1 -0
  186. package/dist/tools/getChangeImpact.d.ts +1 -0
  187. package/dist/tools/getClaudeTaskStatus.d.ts +1 -0
  188. package/dist/tools/getCodeCoverage.d.ts +1 -0
  189. package/dist/tools/getCommitsForIssue.d.ts +1 -0
  190. package/dist/tools/getConnectorStatus.d.ts +1 -0
  191. package/dist/tools/getCurrentSelection.d.ts +2 -0
  192. package/dist/tools/getDebugState.d.ts +1 -0
  193. package/dist/tools/getDependencyTree.d.ts +1 -0
  194. package/dist/tools/getDiagnostics.d.ts +1 -0
  195. package/dist/tools/getDiffFromHandoff.d.ts +1 -0
  196. package/dist/tools/getDocumentSymbols.d.ts +1 -0
  197. package/dist/tools/getFileTree.d.ts +1 -0
  198. package/dist/tools/getGitDiff.d.ts +1 -0
  199. package/dist/tools/getGitHotspots.d.ts +1 -0
  200. package/dist/tools/getGitLog.d.ts +1 -0
  201. package/dist/tools/getGitStatus.d.ts +1 -0
  202. package/dist/tools/getImportTree.d.ts +1 -0
  203. package/dist/tools/getImportedSignatures.d.ts +1 -0
  204. package/dist/tools/getOpenEditors.d.ts +1 -0
  205. package/dist/tools/getPRTemplate.d.ts +1 -0
  206. package/dist/tools/getProjectContext.d.ts +1 -0
  207. package/dist/tools/getProjectInfo.d.ts +1 -0
  208. package/dist/tools/getSecurityAdvisories.d.ts +1 -0
  209. package/dist/tools/getSessionUsage.d.ts +1 -0
  210. package/dist/tools/getSymbolHistory.d.ts +1 -0
  211. package/dist/tools/getToolCapabilities.d.ts +1 -0
  212. package/dist/tools/getTypeSignature.d.ts +1 -0
  213. package/dist/tools/getWorkspaceFolders.d.ts +1 -0
  214. package/dist/tools/getWorkspaceSettings.d.ts +1 -0
  215. package/dist/tools/gitHistory.d.ts +2 -0
  216. package/dist/tools/gitWrite.d.ts +11 -0
  217. package/dist/tools/github/actions.d.ts +2 -0
  218. package/dist/tools/github/composite.d.ts +3 -0
  219. package/dist/tools/github/issues.d.ts +4 -0
  220. package/dist/tools/github/pr.d.ts +7 -0
  221. package/dist/tools/handoffNote.d.ts +2 -0
  222. package/dist/tools/hoverAtCursor.d.ts +1 -0
  223. package/dist/tools/httpClient.d.ts +2 -0
  224. package/dist/tools/inlayHints.d.ts +1 -0
  225. package/dist/tools/launchQuickTask.d.ts +1 -0
  226. package/dist/tools/listClaudeTasks.d.ts +1 -0
  227. package/dist/tools/listTerminals.d.ts +1 -0
  228. package/dist/tools/lsp.d.ts +14 -0
  229. package/dist/tools/navigateToSymbolByName.d.ts +1 -0
  230. package/dist/tools/openDiff.d.ts +1 -0
  231. package/dist/tools/openFile.d.ts +1 -0
  232. package/dist/tools/openInBrowser.d.ts +1 -0
  233. package/dist/tools/organizeImports.d.ts +1 -0
  234. package/dist/tools/performanceReport.d.ts +1 -0
  235. package/dist/tools/planPersistence.d.ts +5 -0
  236. package/dist/tools/previewEdit.d.ts +1 -0
  237. package/dist/tools/refactorAnalyze.d.ts +1 -0
  238. package/dist/tools/refactorPreview.d.ts +1 -0
  239. package/dist/tools/replaceBlock.d.ts +1 -0
  240. package/dist/tools/resumeClaudeTask.d.ts +1 -0
  241. package/dist/tools/runClaudeTask.d.ts +1 -0
  242. package/dist/tools/runCommand.d.ts +1 -0
  243. package/dist/tools/runTests.d.ts +1 -0
  244. package/dist/tools/saveDocument.d.ts +1 -0
  245. package/dist/tools/screenshotAndAnnotate.d.ts +1 -0
  246. package/dist/tools/searchAndReplace.d.ts +1 -0
  247. package/dist/tools/searchTools.d.ts +1 -0
  248. package/dist/tools/searchWorkspace.d.ts +1 -0
  249. package/dist/tools/selectionRanges.d.ts +1 -0
  250. package/dist/tools/semanticTokens.d.ts +1 -0
  251. package/dist/tools/setActiveWorkspaceFolder.d.ts +1 -0
  252. package/dist/tools/signatureHelp.d.ts +1 -0
  253. package/dist/tools/slackListChannels.d.ts +1 -0
  254. package/dist/tools/slackPostMessage.d.ts +1 -0
  255. package/dist/tools/slackPostMessage.js +1 -1
  256. package/dist/tools/slackPostMessage.js.map +1 -1
  257. package/dist/tools/terminal.d.ts +6 -0
  258. package/dist/tools/testTraceToSource.d.ts +1 -0
  259. package/dist/tools/transaction.d.ts +4 -0
  260. package/dist/tools/typeHierarchy.d.ts +1 -0
  261. package/dist/tools/updateLinearIssue.d.ts +1 -0
  262. package/dist/tools/utils.d.ts +2 -0
  263. package/dist/tools/utils.js.map +1 -1
  264. package/dist/tools/vscodeCommands.d.ts +2 -0
  265. package/dist/tools/vscodeTasks.d.ts +2 -0
  266. package/dist/tools/workspaceSettings.d.ts +1 -0
  267. package/package.json +20 -4
  268. package/templates/recipes/project-health-check.yaml +1 -1
  269. package/dist/schemas/dry-run-plan.v1.json +0 -139
  270. package/dist/schemas/recipe.v1.json +0 -684
@@ -0,0 +1,254 @@
1
+ /**
2
+ * Discord tools — wrappers for guilds, channels, messages, user, and send.
3
+ *
4
+ * Self-registering tool module for the recipe tool registry. Read tools wrap
5
+ * connector throws into the `{count, items, error}` shape; the write tool
6
+ * (`discord.send_message`) returns the single-object `{ok, ..., error?}` shape
7
+ * and is gated through the approval queue (`isWrite: true`).
8
+ *
9
+ * Each tool wraps connector throws into the `{count, items, error}` shape that
10
+ * the runner's silent-fail detector (PR #75) catches as a step error rather
11
+ * than a silent empty list.
12
+ *
13
+ * NOTE on `discord.send_message`: Discord's REST API only accepts message
14
+ * sends from bot-scope OAuth tokens. The connector currently uses user-scope
15
+ * (identify/guilds/messages.read), so the underlying call will surface a
16
+ * `permission_denied` error until operators re-auth with the bot scope.
17
+ */
18
+ import { CommonSchemas, registerTool } from "../toolRegistry.js";
19
+ // ============================================================================
20
+ // discord.get_current_user
21
+ // ============================================================================
22
+ registerTool({
23
+ id: "discord.get_current_user",
24
+ namespace: "discord",
25
+ description: "Fetch the authenticated Discord user (username, id, discriminator).",
26
+ paramsSchema: {
27
+ type: "object",
28
+ properties: {
29
+ into: CommonSchemas.into,
30
+ },
31
+ },
32
+ outputSchema: {
33
+ type: "object",
34
+ properties: {
35
+ count: { type: "number" },
36
+ items: { type: "array", items: { type: "object" } },
37
+ error: { type: "string" },
38
+ },
39
+ },
40
+ riskDefault: "low",
41
+ isWrite: false,
42
+ isConnector: true,
43
+ execute: async () => {
44
+ const { getDiscordConnector } = await import("../../connectors/discord.js");
45
+ try {
46
+ const connector = getDiscordConnector();
47
+ const user = await connector.getCurrentUser();
48
+ return JSON.stringify({ count: 1, items: [user] });
49
+ }
50
+ catch (err) {
51
+ return JSON.stringify({
52
+ count: 0,
53
+ items: [],
54
+ error: err instanceof Error ? err.message : String(err),
55
+ });
56
+ }
57
+ },
58
+ });
59
+ // ============================================================================
60
+ // discord.list_guilds
61
+ // ============================================================================
62
+ registerTool({
63
+ id: "discord.list_guilds",
64
+ namespace: "discord",
65
+ description: "List Discord guilds (servers) the authenticated user belongs to.",
66
+ paramsSchema: {
67
+ type: "object",
68
+ properties: {
69
+ max: CommonSchemas.max,
70
+ into: CommonSchemas.into,
71
+ },
72
+ },
73
+ outputSchema: {
74
+ type: "object",
75
+ properties: {
76
+ count: { type: "number" },
77
+ items: { type: "array", items: { type: "object" } },
78
+ error: { type: "string" },
79
+ },
80
+ },
81
+ riskDefault: "low",
82
+ isWrite: false,
83
+ isConnector: true,
84
+ execute: async ({ params }) => {
85
+ const { getDiscordConnector } = await import("../../connectors/discord.js");
86
+ const limit = typeof params.max === "number" ? params.max : 100;
87
+ try {
88
+ const connector = getDiscordConnector();
89
+ const guilds = await connector.listGuilds({ limit });
90
+ return JSON.stringify({ count: guilds.length, items: guilds });
91
+ }
92
+ catch (err) {
93
+ return JSON.stringify({
94
+ count: 0,
95
+ items: [],
96
+ error: err instanceof Error ? err.message : String(err),
97
+ });
98
+ }
99
+ },
100
+ });
101
+ // ============================================================================
102
+ // discord.list_channels
103
+ // ============================================================================
104
+ registerTool({
105
+ id: "discord.list_channels",
106
+ namespace: "discord",
107
+ description: "List text channels in a Discord guild (filters out voice / category / threads).",
108
+ paramsSchema: {
109
+ type: "object",
110
+ properties: {
111
+ guildId: {
112
+ type: "string",
113
+ description: "Discord guild (server) id",
114
+ },
115
+ into: CommonSchemas.into,
116
+ },
117
+ required: ["guildId"],
118
+ },
119
+ outputSchema: {
120
+ type: "object",
121
+ properties: {
122
+ count: { type: "number" },
123
+ items: { type: "array", items: { type: "object" } },
124
+ error: { type: "string" },
125
+ },
126
+ },
127
+ riskDefault: "low",
128
+ isWrite: false,
129
+ isConnector: true,
130
+ execute: async ({ params }) => {
131
+ const { getDiscordConnector } = await import("../../connectors/discord.js");
132
+ try {
133
+ const connector = getDiscordConnector();
134
+ const channels = await connector.listChannels(params.guildId);
135
+ return JSON.stringify({ count: channels.length, items: channels });
136
+ }
137
+ catch (err) {
138
+ return JSON.stringify({
139
+ count: 0,
140
+ items: [],
141
+ error: err instanceof Error ? err.message : String(err),
142
+ });
143
+ }
144
+ },
145
+ });
146
+ // ============================================================================
147
+ // discord.list_messages
148
+ // ============================================================================
149
+ registerTool({
150
+ id: "discord.list_messages",
151
+ namespace: "discord",
152
+ description: "List recent messages in a Discord channel (newest first).",
153
+ paramsSchema: {
154
+ type: "object",
155
+ properties: {
156
+ channelId: {
157
+ type: "string",
158
+ description: "Discord channel id",
159
+ },
160
+ max: CommonSchemas.max,
161
+ into: CommonSchemas.into,
162
+ },
163
+ required: ["channelId"],
164
+ },
165
+ outputSchema: {
166
+ type: "object",
167
+ properties: {
168
+ count: { type: "number" },
169
+ items: { type: "array", items: { type: "object" } },
170
+ error: { type: "string" },
171
+ },
172
+ },
173
+ riskDefault: "low",
174
+ isWrite: false,
175
+ isConnector: true,
176
+ execute: async ({ params }) => {
177
+ const { getDiscordConnector } = await import("../../connectors/discord.js");
178
+ const limit = typeof params.max === "number" ? params.max : 50;
179
+ try {
180
+ const connector = getDiscordConnector();
181
+ const messages = await connector.listMessages(params.channelId, { limit });
182
+ return JSON.stringify({ count: messages.length, items: messages });
183
+ }
184
+ catch (err) {
185
+ return JSON.stringify({
186
+ count: 0,
187
+ items: [],
188
+ error: err instanceof Error ? err.message : String(err),
189
+ });
190
+ }
191
+ },
192
+ });
193
+ // ============================================================================
194
+ // discord.send_message (write-gated)
195
+ // ============================================================================
196
+ registerTool({
197
+ id: "discord.send_message",
198
+ namespace: "discord",
199
+ description: "Send a message to a Discord channel. Requires bot-scope OAuth — user-context tokens will fail with permission_denied.",
200
+ paramsSchema: {
201
+ type: "object",
202
+ properties: {
203
+ channel_id: { type: "string", description: "Discord channel id" },
204
+ content: {
205
+ type: "string",
206
+ description: "Message content (≤2000 chars)",
207
+ },
208
+ tts: {
209
+ type: "boolean",
210
+ description: "Send as text-to-speech (default false)",
211
+ },
212
+ into: CommonSchemas.into,
213
+ },
214
+ required: ["channel_id", "content"],
215
+ },
216
+ outputSchema: {
217
+ type: "object",
218
+ properties: {
219
+ ok: { type: "boolean" },
220
+ id: { type: "string" },
221
+ channel_id: { type: "string" },
222
+ content: { type: "string" },
223
+ timestamp: { type: "string" },
224
+ error: { type: "string" },
225
+ },
226
+ },
227
+ riskDefault: "medium",
228
+ isWrite: true,
229
+ isConnector: true,
230
+ execute: async ({ params }) => {
231
+ const { getDiscordConnector } = await import("../../connectors/discord.js");
232
+ try {
233
+ const connector = getDiscordConnector();
234
+ const message = await connector.sendMessage(params.channel_id, {
235
+ content: params.content,
236
+ tts: typeof params.tts === "boolean" ? params.tts : undefined,
237
+ });
238
+ return JSON.stringify({
239
+ ok: true,
240
+ id: message.id,
241
+ channel_id: message.channel_id,
242
+ content: message.content,
243
+ timestamp: message.timestamp,
244
+ });
245
+ }
246
+ catch (err) {
247
+ return JSON.stringify({
248
+ ok: false,
249
+ error: err instanceof Error ? err.message : String(err),
250
+ });
251
+ }
252
+ },
253
+ });
254
+ //# sourceMappingURL=discord.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discord.js","sourceRoot":"","sources":["../../../src/recipes/tools/discord.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEjE,+EAA+E;AAC/E,2BAA2B;AAC3B,+EAA+E;AAE/E,YAAY,CAAC;IACX,EAAE,EAAE,0BAA0B;IAC9B,SAAS,EAAE,SAAS;IACpB,WAAW,EACT,qEAAqE;IACvE,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;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,7 @@ registerTool({
32
32
  properties: {
33
33
  count: { type: "number" },
34
34
  issues: { type: "array" },
35
+ error: { type: "string" },
35
36
  },
36
37
  },
37
38
  riskDefault: "low",
@@ -42,8 +43,22 @@ registerTool({
42
43
  const repo = params.repo ? String(params.repo) : undefined;
43
44
  const assignee = params.assignee ? String(params.assignee) : "@me";
44
45
  const limit = typeof params.max === "number" ? params.max : 20;
45
- const issues = await listIssues({ repo, assignee, limit });
46
- return JSON.stringify({ count: issues.length, issues });
46
+ try {
47
+ const issues = await listIssues({ repo, assignee, limit });
48
+ return JSON.stringify({ count: issues.length, issues });
49
+ }
50
+ catch (err) {
51
+ // Translate connector throw into the {count:0, items:[], error}
52
+ // shape that the runner's silent-fail detector (PR #72) catches
53
+ // as a step error. Pre-fix this just propagated as a thrown
54
+ // error which the runner caught fine — but the connector
55
+ // itself used to silently `[]`-swallow all failures.
56
+ return JSON.stringify({
57
+ count: 0,
58
+ issues: [],
59
+ error: err instanceof Error ? err.message : String(err),
60
+ });
61
+ }
47
62
  },
48
63
  });
49
64
  // ============================================================================
@@ -74,6 +89,7 @@ registerTool({
74
89
  properties: {
75
90
  count: { type: "number" },
76
91
  prs: { type: "array" },
92
+ error: { type: "string" },
77
93
  },
78
94
  },
79
95
  riskDefault: "low",
@@ -84,8 +100,17 @@ registerTool({
84
100
  const repo = params.repo ? String(params.repo) : undefined;
85
101
  const author = params.author ? String(params.author) : "@me";
86
102
  const limit = typeof params.max === "number" ? params.max : 20;
87
- const prs = await listPRs({ repo, author, limit });
88
- return JSON.stringify({ count: prs.length, prs });
103
+ try {
104
+ const prs = await listPRs({ repo, author, limit });
105
+ return JSON.stringify({ count: prs.length, prs });
106
+ }
107
+ catch (err) {
108
+ return JSON.stringify({
109
+ count: 0,
110
+ prs: [],
111
+ error: err instanceof Error ? err.message : String(err),
112
+ });
113
+ }
89
114
  },
90
115
  });
91
116
  //# sourceMappingURL=github.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"github.js","sourceRoot":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7D,MAAM,KAAK,GAAG,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;YACnD,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACpD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,IAAI,CAAC,SAAS,CAAC;gBACpB,KAAK,EAAE,CAAC;gBACR,GAAG,EAAE,EAAE;gBACP,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACxD,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * GitLab tools — read-only wrappers (projects, issues, merge requests, user).
3
+ *
4
+ * Self-registering tool module for the recipe tool registry. Read-list tools
5
+ * use `{count, items, error}` — single-object lookups (`get_issue`,
6
+ * `get_current_user`) return the object spread with an optional `error`.
7
+ *
8
+ * Write tools (createIssue, createMergeRequestNote) are intentionally deferred
9
+ * to a follow-up PR; this module only registers read-only methods.
10
+ */
11
+ export {};
@@ -0,0 +1,285 @@
1
+ /**
2
+ * GitLab tools — read-only wrappers (projects, issues, merge requests, user).
3
+ *
4
+ * Self-registering tool module for the recipe tool registry. Read-list tools
5
+ * use `{count, items, error}` — single-object lookups (`get_issue`,
6
+ * `get_current_user`) return the object spread with an optional `error`.
7
+ *
8
+ * Write tools (createIssue, createMergeRequestNote) are intentionally deferred
9
+ * to a follow-up PR; this module only registers read-only methods.
10
+ */
11
+ import { CommonSchemas, registerTool } from "../toolRegistry.js";
12
+ // ============================================================================
13
+ // gitlab.get_current_user
14
+ // ============================================================================
15
+ registerTool({
16
+ id: "gitlab.get_current_user",
17
+ namespace: "gitlab",
18
+ description: "Fetch the authenticated GitLab user (id, username, email).",
19
+ paramsSchema: {
20
+ type: "object",
21
+ properties: {
22
+ into: CommonSchemas.into,
23
+ },
24
+ },
25
+ outputSchema: {
26
+ type: "object",
27
+ properties: {
28
+ id: { type: "number" },
29
+ username: { type: "string" },
30
+ name: { type: "string" },
31
+ email: { type: "string" },
32
+ error: { type: "string" },
33
+ },
34
+ },
35
+ riskDefault: "low",
36
+ isWrite: false,
37
+ isConnector: true,
38
+ execute: async () => {
39
+ const { getGitLabConnector } = await import("../../connectors/gitlab.js");
40
+ try {
41
+ const connector = getGitLabConnector();
42
+ const user = await connector.getCurrentUser();
43
+ return JSON.stringify({ ...user });
44
+ }
45
+ catch (err) {
46
+ return JSON.stringify({
47
+ error: err instanceof Error ? err.message : String(err),
48
+ });
49
+ }
50
+ },
51
+ });
52
+ // ============================================================================
53
+ // gitlab.list_projects
54
+ // ============================================================================
55
+ registerTool({
56
+ id: "gitlab.list_projects",
57
+ namespace: "gitlab",
58
+ description: "List GitLab projects. Defaults to the authenticated user's memberships.",
59
+ paramsSchema: {
60
+ type: "object",
61
+ properties: {
62
+ membership: {
63
+ type: "boolean",
64
+ description: "If true (default), only return projects the user is a member of.",
65
+ },
66
+ owned: {
67
+ type: "boolean",
68
+ description: "If true, only return projects owned by the user.",
69
+ },
70
+ search: {
71
+ type: "string",
72
+ description: "Optional substring search applied to project name/path.",
73
+ },
74
+ max: CommonSchemas.max,
75
+ into: CommonSchemas.into,
76
+ },
77
+ },
78
+ outputSchema: {
79
+ type: "object",
80
+ properties: {
81
+ count: { type: "number" },
82
+ items: { type: "array", items: { type: "object" } },
83
+ error: { type: "string" },
84
+ },
85
+ },
86
+ riskDefault: "low",
87
+ isWrite: false,
88
+ isConnector: true,
89
+ execute: async ({ params }) => {
90
+ const { getGitLabConnector } = await import("../../connectors/gitlab.js");
91
+ const limit = typeof params.max === "number" ? params.max : 50;
92
+ try {
93
+ const connector = getGitLabConnector();
94
+ const projects = await connector.listProjects({
95
+ membership: typeof params.membership === "boolean"
96
+ ? params.membership
97
+ : undefined,
98
+ owned: typeof params.owned === "boolean" ? params.owned : undefined,
99
+ search: typeof params.search === "string" ? params.search : undefined,
100
+ limit,
101
+ });
102
+ return JSON.stringify({ count: projects.length, items: projects });
103
+ }
104
+ catch (err) {
105
+ return JSON.stringify({
106
+ count: 0,
107
+ items: [],
108
+ error: err instanceof Error ? err.message : String(err),
109
+ });
110
+ }
111
+ },
112
+ });
113
+ // ============================================================================
114
+ // gitlab.list_issues
115
+ // ============================================================================
116
+ registerTool({
117
+ id: "gitlab.list_issues",
118
+ namespace: "gitlab",
119
+ description: "List GitLab issues. Pass projectId to scope to a project, or omit for issues across the user's projects.",
120
+ paramsSchema: {
121
+ type: "object",
122
+ properties: {
123
+ projectId: {
124
+ type: ["string", "number"],
125
+ description: "GitLab project id or URL-encoded path (e.g. 'group/repo').",
126
+ },
127
+ assignedToMe: {
128
+ type: "boolean",
129
+ description: "When projectId is omitted, restrict to issues assigned to the current user.",
130
+ },
131
+ state: {
132
+ type: "string",
133
+ enum: ["opened", "closed", "all"],
134
+ description: "Filter by state. Default: GitLab returns 'opened'.",
135
+ },
136
+ max: CommonSchemas.max,
137
+ into: CommonSchemas.into,
138
+ },
139
+ },
140
+ outputSchema: {
141
+ type: "object",
142
+ properties: {
143
+ count: { type: "number" },
144
+ items: { type: "array", items: { type: "object" } },
145
+ error: { type: "string" },
146
+ },
147
+ },
148
+ riskDefault: "low",
149
+ isWrite: false,
150
+ isConnector: true,
151
+ execute: async ({ params }) => {
152
+ const { getGitLabConnector } = await import("../../connectors/gitlab.js");
153
+ const limit = typeof params.max === "number" ? params.max : 50;
154
+ try {
155
+ const connector = getGitLabConnector();
156
+ const issues = await connector.listIssues({
157
+ projectId: params.projectId,
158
+ assignedToMe: typeof params.assignedToMe === "boolean"
159
+ ? params.assignedToMe
160
+ : undefined,
161
+ state: params.state,
162
+ limit,
163
+ });
164
+ return JSON.stringify({ count: issues.length, items: issues });
165
+ }
166
+ catch (err) {
167
+ return JSON.stringify({
168
+ count: 0,
169
+ items: [],
170
+ error: err instanceof Error ? err.message : String(err),
171
+ });
172
+ }
173
+ },
174
+ });
175
+ // ============================================================================
176
+ // gitlab.get_issue
177
+ // ============================================================================
178
+ registerTool({
179
+ id: "gitlab.get_issue",
180
+ namespace: "gitlab",
181
+ description: "Fetch a single GitLab issue by project + issue iid.",
182
+ paramsSchema: {
183
+ type: "object",
184
+ properties: {
185
+ projectId: {
186
+ type: ["string", "number"],
187
+ description: "GitLab project id or URL-encoded path.",
188
+ },
189
+ issueIid: {
190
+ type: "number",
191
+ description: "Per-project issue iid (the number you see in URLs).",
192
+ },
193
+ into: CommonSchemas.into,
194
+ },
195
+ required: ["projectId", "issueIid"],
196
+ },
197
+ outputSchema: {
198
+ type: "object",
199
+ properties: {
200
+ id: { type: "number" },
201
+ iid: { type: "number" },
202
+ title: { type: "string" },
203
+ state: { type: "string" },
204
+ error: { type: "string" },
205
+ },
206
+ },
207
+ riskDefault: "low",
208
+ isWrite: false,
209
+ isConnector: true,
210
+ execute: async ({ params }) => {
211
+ const { getGitLabConnector } = await import("../../connectors/gitlab.js");
212
+ try {
213
+ const connector = getGitLabConnector();
214
+ const issue = await connector.getIssue(params.projectId, params.issueIid);
215
+ return JSON.stringify({ ...issue });
216
+ }
217
+ catch (err) {
218
+ return JSON.stringify({
219
+ error: err instanceof Error ? err.message : String(err),
220
+ });
221
+ }
222
+ },
223
+ });
224
+ // ============================================================================
225
+ // gitlab.list_merge_requests
226
+ // ============================================================================
227
+ registerTool({
228
+ id: "gitlab.list_merge_requests",
229
+ namespace: "gitlab",
230
+ description: "List GitLab merge requests. Pass projectId to scope to a project, or omit for cross-project queries.",
231
+ paramsSchema: {
232
+ type: "object",
233
+ properties: {
234
+ projectId: {
235
+ type: ["string", "number"],
236
+ description: "GitLab project id or URL-encoded path.",
237
+ },
238
+ state: {
239
+ type: "string",
240
+ enum: ["opened", "closed", "merged", "all"],
241
+ description: "Filter by state. Default: GitLab returns 'opened'.",
242
+ },
243
+ scope: {
244
+ type: "string",
245
+ enum: ["created_by_me", "assigned_to_me", "all"],
246
+ description: "Cross-project scope when projectId is omitted. Default: 'created_by_me'.",
247
+ },
248
+ max: CommonSchemas.max,
249
+ into: CommonSchemas.into,
250
+ },
251
+ },
252
+ outputSchema: {
253
+ type: "object",
254
+ properties: {
255
+ count: { type: "number" },
256
+ items: { type: "array", items: { type: "object" } },
257
+ error: { type: "string" },
258
+ },
259
+ },
260
+ riskDefault: "low",
261
+ isWrite: false,
262
+ isConnector: true,
263
+ execute: async ({ params }) => {
264
+ const { getGitLabConnector } = await import("../../connectors/gitlab.js");
265
+ const limit = typeof params.max === "number" ? params.max : 50;
266
+ try {
267
+ const connector = getGitLabConnector();
268
+ const mrs = await connector.listMergeRequests({
269
+ projectId: params.projectId,
270
+ state: params.state,
271
+ scope: params.scope,
272
+ limit,
273
+ });
274
+ return JSON.stringify({ count: mrs.length, items: mrs });
275
+ }
276
+ catch (err) {
277
+ return JSON.stringify({
278
+ count: 0,
279
+ items: [],
280
+ error: err instanceof Error ? err.message : String(err),
281
+ });
282
+ }
283
+ },
284
+ });
285
+ //# sourceMappingURL=gitlab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitlab.js","sourceRoot":"","sources":["../../../src/recipes/tools/gitlab.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEjE,+EAA+E;AAC/E,0BAA0B;AAC1B,+EAA+E;AAE/E,YAAY,CAAC;IACX,EAAE,EAAE,yBAAyB;IAC7B,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,4DAA4D;IACzE,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YAC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F;IACD,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAC5B,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAC;QAC1E,MAAM,KAAK,GAAG,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,kBAAkB,EAAE,CAAC;YACvC,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,iBAAiB,CAAC;gBAC5C,SAAS,EAAE,MAAM,CAAC,SAAwC;gBAC1D,KAAK,EAAE,MAAM,CAAC,KAKD;gBACb,KAAK,EAAE,MAAM,CAAC,KAID;gBACb,KAAK;aACN,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;QAC3D,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,IAAI,CAAC,SAAS,CAAC;gBACpB,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,EAAE;gBACT,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACxD,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * Self-registering tool module for the recipe tool registry.
5
5
  */
6
- export {};
6
+ export declare function sinceToGmailQuery(since: string): string;