@proletariat/cli 0.3.23 → 0.3.25

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 (235) hide show
  1. package/dist/commands/action/create.js +4 -4
  2. package/dist/commands/action/update.js +3 -3
  3. package/dist/commands/agent/{temp/cleanup.d.ts → cleanup.d.ts} +1 -1
  4. package/dist/commands/agent/{temp/cleanup.js → cleanup.js} +4 -4
  5. package/dist/commands/agent/index.js +8 -8
  6. package/dist/commands/branch/create.js +2 -2
  7. package/dist/commands/epic/activate.js +9 -17
  8. package/dist/commands/epic/archive.js +13 -24
  9. package/dist/commands/epic/create.d.ts +1 -0
  10. package/dist/commands/epic/create.js +46 -8
  11. package/dist/commands/epic/index.js +2 -2
  12. package/dist/commands/epic/move.js +28 -47
  13. package/dist/commands/epic/progress.js +10 -14
  14. package/dist/commands/epic/project.js +42 -59
  15. package/dist/commands/epic/reorder.js +25 -30
  16. package/dist/commands/epic/spec.d.ts +1 -0
  17. package/dist/commands/epic/spec.js +39 -40
  18. package/dist/commands/epic/ticket.d.ts +2 -0
  19. package/dist/commands/epic/ticket.js +63 -37
  20. package/dist/commands/feedback/index.d.ts +10 -0
  21. package/dist/commands/feedback/index.js +60 -0
  22. package/dist/commands/feedback/list.d.ts +12 -0
  23. package/dist/commands/feedback/list.js +126 -0
  24. package/dist/commands/feedback/submit.d.ts +16 -0
  25. package/dist/commands/feedback/submit.js +220 -0
  26. package/dist/commands/{template/phase/delete.d.ts → feedback/view.d.ts} +7 -5
  27. package/dist/commands/feedback/view.js +109 -0
  28. package/dist/commands/gh/index.js +4 -0
  29. package/dist/commands/{epic/link/remove.d.ts → link/create.d.ts} +6 -7
  30. package/dist/commands/link/create.js +141 -0
  31. package/dist/commands/{epic/link/relates.d.ts → link/index.d.ts} +4 -5
  32. package/dist/commands/link/index.js +87 -0
  33. package/dist/commands/{epic/link/duplicates.d.ts → link/list.d.ts} +7 -4
  34. package/dist/commands/link/list.js +182 -0
  35. package/dist/commands/{spec/link → link}/remove.d.ts +4 -5
  36. package/dist/commands/link/remove.js +120 -0
  37. package/dist/commands/mcp-server.d.ts +22 -0
  38. package/dist/commands/mcp-server.js +98 -0
  39. package/dist/commands/phase/create.js +1 -1
  40. package/dist/commands/project/create.d.ts +1 -0
  41. package/dist/commands/project/create.js +38 -4
  42. package/dist/commands/repo/create.d.ts +38 -0
  43. package/dist/commands/repo/create.js +283 -0
  44. package/dist/commands/repo/index.js +7 -0
  45. package/dist/commands/roadmap/add-project.js +9 -22
  46. package/dist/commands/roadmap/create.d.ts +0 -1
  47. package/dist/commands/roadmap/create.js +46 -40
  48. package/dist/commands/roadmap/delete.js +10 -24
  49. package/dist/commands/roadmap/generate.d.ts +1 -0
  50. package/dist/commands/roadmap/generate.js +21 -22
  51. package/dist/commands/roadmap/remove-project.js +14 -34
  52. package/dist/commands/roadmap/reorder.js +19 -26
  53. package/dist/commands/roadmap/update.js +27 -26
  54. package/dist/commands/roadmap/view.js +5 -12
  55. package/dist/commands/session/attach.d.ts +1 -8
  56. package/dist/commands/session/attach.js +93 -59
  57. package/dist/commands/session/list.d.ts +0 -8
  58. package/dist/commands/session/list.js +130 -81
  59. package/dist/commands/spec/create.d.ts +1 -0
  60. package/dist/commands/spec/create.js +44 -3
  61. package/dist/commands/spec/edit.js +63 -33
  62. package/dist/commands/spec/index.js +2 -2
  63. package/dist/commands/{agent/staff → staff}/add.js +10 -10
  64. package/dist/commands/{agent/staff → staff}/index.d.ts +1 -1
  65. package/dist/commands/{agent/staff → staff}/index.js +7 -7
  66. package/dist/commands/{agent/staff → staff}/list.js +3 -3
  67. package/dist/commands/{agent/staff → staff}/remove.d.ts +1 -1
  68. package/dist/commands/{agent/staff → staff}/remove.js +8 -8
  69. package/dist/commands/{template/phase/index.d.ts → support/book.d.ts} +2 -2
  70. package/dist/commands/support/book.js +54 -0
  71. package/dist/commands/{template/ticket/index.d.ts → support/discord.d.ts} +2 -2
  72. package/dist/commands/support/discord.js +54 -0
  73. package/dist/commands/support/docs.d.ts +10 -0
  74. package/dist/commands/support/docs.js +54 -0
  75. package/dist/commands/support/index.d.ts +19 -0
  76. package/dist/commands/support/index.js +81 -0
  77. package/dist/commands/support/issues.d.ts +11 -0
  78. package/dist/commands/support/issues.js +77 -0
  79. package/dist/commands/support/logs.d.ts +18 -0
  80. package/dist/commands/support/logs.js +247 -0
  81. package/dist/commands/{ticket/template → template}/apply.d.ts +8 -6
  82. package/dist/commands/template/apply.js +262 -0
  83. package/dist/commands/{ticket/template → template}/create.d.ts +5 -6
  84. package/dist/commands/template/create.js +238 -0
  85. package/dist/commands/template/index.js +48 -36
  86. package/dist/commands/{ticket/template → template}/save.d.ts +2 -2
  87. package/dist/commands/template/save.js +104 -0
  88. package/dist/commands/{phase/template → template}/update.d.ts +2 -2
  89. package/dist/commands/template/update.js +99 -0
  90. package/dist/commands/{agent/themes → theme}/add-names.d.ts +1 -1
  91. package/dist/commands/{agent/themes → theme}/add-names.js +6 -6
  92. package/dist/commands/{agent/themes → theme}/create.d.ts +1 -1
  93. package/dist/commands/{agent/themes → theme}/create.js +5 -5
  94. package/dist/commands/{agent/themes → theme}/index.d.ts +1 -1
  95. package/dist/commands/{agent/themes → theme}/index.js +10 -10
  96. package/dist/commands/{agent/themes → theme}/list.d.ts +1 -1
  97. package/dist/commands/{agent/themes → theme}/list.js +5 -5
  98. package/dist/commands/{agent/themes → theme}/set.d.ts +1 -1
  99. package/dist/commands/{agent/themes → theme}/set.js +7 -7
  100. package/dist/commands/ticket/create.d.ts +1 -0
  101. package/dist/commands/ticket/create.js +75 -15
  102. package/dist/commands/ticket/edit.js +44 -13
  103. package/dist/commands/ticket/index.js +6 -6
  104. package/dist/commands/ticket/move.d.ts +7 -0
  105. package/dist/commands/ticket/move.js +132 -0
  106. package/dist/commands/work/spawn.d.ts +1 -0
  107. package/dist/commands/work/spawn.js +72 -8
  108. package/dist/commands/work/start.js +6 -0
  109. package/dist/lib/execution/runners.js +21 -17
  110. package/dist/lib/execution/session-utils.d.ts +60 -0
  111. package/dist/lib/execution/session-utils.js +162 -0
  112. package/dist/lib/execution/spawner.d.ts +2 -0
  113. package/dist/lib/execution/spawner.js +42 -0
  114. package/dist/lib/flags/resolver.d.ts +2 -2
  115. package/dist/lib/flags/resolver.js +15 -0
  116. package/dist/lib/init/index.js +18 -0
  117. package/dist/lib/mcp/helpers.d.ts +43 -0
  118. package/dist/lib/mcp/helpers.js +57 -0
  119. package/dist/lib/mcp/index.d.ts +6 -0
  120. package/dist/lib/mcp/index.js +6 -0
  121. package/dist/lib/mcp/tools/action.d.ts +6 -0
  122. package/dist/lib/mcp/tools/action.js +88 -0
  123. package/dist/lib/mcp/tools/board.d.ts +6 -0
  124. package/dist/lib/mcp/tools/board.js +139 -0
  125. package/dist/lib/mcp/tools/category.d.ts +6 -0
  126. package/dist/lib/mcp/tools/category.js +84 -0
  127. package/dist/lib/mcp/tools/cli-passthrough.d.ts +15 -0
  128. package/dist/lib/mcp/tools/cli-passthrough.js +333 -0
  129. package/dist/lib/mcp/tools/epic.d.ts +6 -0
  130. package/dist/lib/mcp/tools/epic.js +178 -0
  131. package/dist/lib/mcp/tools/index.d.ts +18 -0
  132. package/dist/lib/mcp/tools/index.js +19 -0
  133. package/dist/lib/mcp/tools/phase.d.ts +6 -0
  134. package/dist/lib/mcp/tools/phase.js +131 -0
  135. package/dist/lib/mcp/tools/project.d.ts +6 -0
  136. package/dist/lib/mcp/tools/project.js +196 -0
  137. package/dist/lib/mcp/tools/roadmap.d.ts +6 -0
  138. package/dist/lib/mcp/tools/roadmap.js +123 -0
  139. package/dist/lib/mcp/tools/spec.d.ts +6 -0
  140. package/dist/lib/mcp/tools/spec.js +196 -0
  141. package/dist/lib/mcp/tools/status.d.ts +6 -0
  142. package/dist/lib/mcp/tools/status.js +109 -0
  143. package/dist/lib/mcp/tools/template.d.ts +6 -0
  144. package/dist/lib/mcp/tools/template.js +107 -0
  145. package/dist/lib/mcp/tools/ticket.d.ts +6 -0
  146. package/dist/lib/mcp/tools/ticket.js +393 -0
  147. package/dist/lib/mcp/tools/view.d.ts +6 -0
  148. package/dist/lib/mcp/tools/view.js +76 -0
  149. package/dist/lib/mcp/tools/work.d.ts +6 -0
  150. package/dist/lib/mcp/tools/work.js +132 -0
  151. package/dist/lib/mcp/tools/workflow.d.ts +6 -0
  152. package/dist/lib/mcp/tools/workflow.js +95 -0
  153. package/dist/lib/mcp/types.d.ts +17 -0
  154. package/dist/lib/mcp/types.js +4 -0
  155. package/dist/lib/multiline-input.d.ts +63 -0
  156. package/dist/lib/multiline-input.js +360 -0
  157. package/dist/lib/prompt-json.d.ts +57 -6
  158. package/dist/lib/prompt-json.js +45 -0
  159. package/dist/lib/repos/git.d.ts +7 -0
  160. package/dist/lib/repos/git.js +20 -0
  161. package/oclif.manifest.json +3690 -4995
  162. package/package.json +6 -4
  163. package/dist/commands/agent/temp/index.d.ts +0 -14
  164. package/dist/commands/agent/temp/index.js +0 -85
  165. package/dist/commands/agent/temp/list.d.ts +0 -7
  166. package/dist/commands/agent/temp/list.js +0 -108
  167. package/dist/commands/epic/link/block.d.ts +0 -14
  168. package/dist/commands/epic/link/block.js +0 -81
  169. package/dist/commands/epic/link/duplicates.js +0 -68
  170. package/dist/commands/epic/link/index.d.ts +0 -19
  171. package/dist/commands/epic/link/index.js +0 -272
  172. package/dist/commands/epic/link/relates.js +0 -68
  173. package/dist/commands/epic/link/remove.js +0 -93
  174. package/dist/commands/phase/template/apply.d.ts +0 -17
  175. package/dist/commands/phase/template/apply.js +0 -108
  176. package/dist/commands/phase/template/create.d.ts +0 -17
  177. package/dist/commands/phase/template/create.js +0 -104
  178. package/dist/commands/phase/template/delete.d.ts +0 -17
  179. package/dist/commands/phase/template/delete.js +0 -100
  180. package/dist/commands/phase/template/index.d.ts +0 -15
  181. package/dist/commands/phase/template/index.js +0 -130
  182. package/dist/commands/phase/template/list.d.ts +0 -16
  183. package/dist/commands/phase/template/list.js +0 -97
  184. package/dist/commands/phase/template/update.js +0 -89
  185. package/dist/commands/spec/link/depends.d.ts +0 -14
  186. package/dist/commands/spec/link/depends.js +0 -64
  187. package/dist/commands/spec/link/duplicates.d.ts +0 -14
  188. package/dist/commands/spec/link/duplicates.js +0 -63
  189. package/dist/commands/spec/link/index.d.ts +0 -19
  190. package/dist/commands/spec/link/index.js +0 -207
  191. package/dist/commands/spec/link/relates.d.ts +0 -14
  192. package/dist/commands/spec/link/relates.js +0 -63
  193. package/dist/commands/spec/link/remove.js +0 -96
  194. package/dist/commands/template/phase/apply.d.ts +0 -14
  195. package/dist/commands/template/phase/apply.js +0 -43
  196. package/dist/commands/template/phase/create.d.ts +0 -13
  197. package/dist/commands/template/phase/create.js +0 -38
  198. package/dist/commands/template/phase/delete.js +0 -36
  199. package/dist/commands/template/phase/index.js +0 -63
  200. package/dist/commands/template/phase/list.d.ts +0 -11
  201. package/dist/commands/template/phase/list.js +0 -36
  202. package/dist/commands/template/phase/update.d.ts +0 -14
  203. package/dist/commands/template/phase/update.js +0 -43
  204. package/dist/commands/template/ticket/apply.d.ts +0 -17
  205. package/dist/commands/template/ticket/apply.js +0 -60
  206. package/dist/commands/template/ticket/create.d.ts +0 -20
  207. package/dist/commands/template/ticket/create.js +0 -89
  208. package/dist/commands/template/ticket/delete.d.ts +0 -13
  209. package/dist/commands/template/ticket/delete.js +0 -38
  210. package/dist/commands/template/ticket/index.js +0 -63
  211. package/dist/commands/template/ticket/list.d.ts +0 -11
  212. package/dist/commands/template/ticket/list.js +0 -36
  213. package/dist/commands/template/ticket/save.d.ts +0 -15
  214. package/dist/commands/template/ticket/save.js +0 -46
  215. package/dist/commands/ticket/link/block.d.ts +0 -14
  216. package/dist/commands/ticket/link/block.js +0 -96
  217. package/dist/commands/ticket/link/duplicates.d.ts +0 -14
  218. package/dist/commands/ticket/link/duplicates.js +0 -95
  219. package/dist/commands/ticket/link/index.d.ts +0 -19
  220. package/dist/commands/ticket/link/index.js +0 -256
  221. package/dist/commands/ticket/link/relates.d.ts +0 -14
  222. package/dist/commands/ticket/link/relates.js +0 -95
  223. package/dist/commands/ticket/link/remove.d.ts +0 -16
  224. package/dist/commands/ticket/link/remove.js +0 -132
  225. package/dist/commands/ticket/template/apply.js +0 -252
  226. package/dist/commands/ticket/template/create.js +0 -386
  227. package/dist/commands/ticket/template/delete.d.ts +0 -17
  228. package/dist/commands/ticket/template/delete.js +0 -94
  229. package/dist/commands/ticket/template/index.d.ts +0 -15
  230. package/dist/commands/ticket/template/index.js +0 -120
  231. package/dist/commands/ticket/template/list.d.ts +0 -16
  232. package/dist/commands/ticket/template/list.js +0 -112
  233. package/dist/commands/ticket/template/save.js +0 -163
  234. /package/dist/commands/{agent/staff → staff}/add.d.ts +0 -0
  235. /package/dist/commands/{agent/staff → staff}/list.d.ts +0 -0
@@ -0,0 +1,57 @@
1
+ /**
2
+ * MCP Helper Functions
3
+ */
4
+ export function formatTicket(t) {
5
+ return {
6
+ id: t.id,
7
+ title: t.title,
8
+ priority: t.priority,
9
+ category: t.category,
10
+ statusName: t.statusName,
11
+ statusCategory: t.statusCategory,
12
+ projectId: t.projectId,
13
+ assignee: t.assignee,
14
+ owner: t.owner,
15
+ branch: t.branch,
16
+ epicId: t.epicId,
17
+ };
18
+ }
19
+ export function formatTicketFull(t) {
20
+ return {
21
+ ...formatTicket(t),
22
+ description: t.description,
23
+ subtasks: t.subtasks,
24
+ labels: t.labels,
25
+ metadata: t.metadata,
26
+ blockedBy: t.blockedBy,
27
+ acceptanceCriteria: t.acceptanceCriteria,
28
+ specId: t.specId,
29
+ createdAt: t.createdAt.toISOString(),
30
+ updatedAt: t.updatedAt.toISOString(),
31
+ };
32
+ }
33
+ export function successResponse(data) {
34
+ return {
35
+ content: [{
36
+ type: 'text',
37
+ text: JSON.stringify({ success: true, ...data }, null, 2),
38
+ }],
39
+ };
40
+ }
41
+ export function errorResponse(error) {
42
+ return {
43
+ content: [{
44
+ type: 'text',
45
+ text: JSON.stringify({
46
+ success: false,
47
+ error: error instanceof Error ? error.message : 'Unknown error',
48
+ }),
49
+ }],
50
+ isError: true,
51
+ };
52
+ }
53
+ export function textResponse(text) {
54
+ return {
55
+ content: [{ type: 'text', text }],
56
+ };
57
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * MCP Library - Main exports
3
+ */
4
+ export * from './types.js';
5
+ export * from './helpers.js';
6
+ export * from './tools/index.js';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * MCP Library - Main exports
3
+ */
4
+ export * from './types.js';
5
+ export * from './helpers.js';
6
+ export * from './tools/index.js';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * MCP Action Tools
3
+ */
4
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
+ import type { McpToolContext } from '../types.js';
6
+ export declare function registerActionTools(server: McpServer, ctx: McpToolContext): void;
@@ -0,0 +1,88 @@
1
+ /**
2
+ * MCP Action Tools
3
+ */
4
+ import { z } from 'zod';
5
+ import { errorResponse } from '../helpers.js';
6
+ export function registerActionTools(server, ctx) {
7
+ server.tool('action_list', 'List work actions', { include_builtin: z.boolean().optional() }, async (params) => {
8
+ try {
9
+ const actions = await ctx.storage.listActions({
10
+ isBuiltin: params.include_builtin ? undefined : false,
11
+ });
12
+ return {
13
+ content: [{
14
+ type: 'text',
15
+ text: JSON.stringify({
16
+ success: true,
17
+ actions: actions.map((a) => ({
18
+ id: a.id,
19
+ name: a.name,
20
+ description: a.description,
21
+ modifiesCode: a.modifiesCode,
22
+ isBuiltin: a.isBuiltin,
23
+ })),
24
+ }, null, 2),
25
+ }],
26
+ };
27
+ }
28
+ catch (error) {
29
+ return errorResponse(error);
30
+ }
31
+ });
32
+ server.tool('action_show', 'Get action details', { id: z.string().describe('Action ID') }, async (params) => {
33
+ try {
34
+ const action = await ctx.storage.getAction(params.id);
35
+ if (!action)
36
+ throw new Error(`Action not found: ${params.id}`);
37
+ return {
38
+ content: [{
39
+ type: 'text',
40
+ text: JSON.stringify({ success: true, action }, null, 2),
41
+ }],
42
+ };
43
+ }
44
+ catch (error) {
45
+ return errorResponse(error);
46
+ }
47
+ });
48
+ server.tool('action_create', 'Create a work action', {
49
+ name: z.string().describe('Action name'),
50
+ prompt: z.string().describe('Start prompt'),
51
+ description: z.string().optional(),
52
+ end_prompt: z.string().optional(),
53
+ modifies_code: z.boolean().optional(),
54
+ }, async (params) => {
55
+ try {
56
+ const action = await ctx.storage.createAction({
57
+ name: params.name,
58
+ prompt: params.prompt,
59
+ description: params.description,
60
+ endPrompt: params.end_prompt,
61
+ modifiesCode: params.modifies_code ?? true,
62
+ });
63
+ return {
64
+ content: [{
65
+ type: 'text',
66
+ text: JSON.stringify({ success: true, action: { id: action.id, name: action.name } }, null, 2),
67
+ }],
68
+ };
69
+ }
70
+ catch (error) {
71
+ return errorResponse(error);
72
+ }
73
+ });
74
+ server.tool('action_delete', 'Delete an action', { id: z.string().describe('Action ID') }, async (params) => {
75
+ try {
76
+ await ctx.storage.deleteAction(params.id);
77
+ return {
78
+ content: [{
79
+ type: 'text',
80
+ text: JSON.stringify({ success: true, message: 'Action deleted' }, null, 2),
81
+ }],
82
+ };
83
+ }
84
+ catch (error) {
85
+ return errorResponse(error);
86
+ }
87
+ });
88
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * MCP Board Tools
3
+ */
4
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
+ import type { McpToolContext } from '../types.js';
6
+ export declare function registerBoardTools(server: McpServer, ctx: McpToolContext): void;
@@ -0,0 +1,139 @@
1
+ /**
2
+ * MCP Board Tools
3
+ */
4
+ import { z } from 'zod';
5
+ import { errorResponse } from '../helpers.js';
6
+ export function registerBoardTools(server, ctx) {
7
+ server.tool('board_show', 'Show the kanban board', { project: z.string().optional().describe('Project ID') }, async (params) => {
8
+ try {
9
+ let projectId = params.project;
10
+ if (!projectId) {
11
+ const projects = await ctx.storage.listProjects();
12
+ if (projects.length === 0)
13
+ throw new Error('No projects found');
14
+ projectId = projects[0].id;
15
+ }
16
+ const board = await ctx.storage.getBoard(projectId);
17
+ return {
18
+ content: [{
19
+ type: 'text',
20
+ text: JSON.stringify({
21
+ success: true,
22
+ board: {
23
+ id: board.id,
24
+ name: board.name,
25
+ columns: board.columns.map((col) => ({
26
+ name: col.name,
27
+ position: col.position,
28
+ ticketCount: col.tickets.length,
29
+ tickets: col.tickets.map((t) => ({
30
+ id: t.id,
31
+ title: t.title,
32
+ priority: t.priority,
33
+ assignee: t.assignee,
34
+ })),
35
+ })),
36
+ updatedAt: board.updatedAt.toISOString(),
37
+ },
38
+ }, null, 2),
39
+ }],
40
+ };
41
+ }
42
+ catch (error) {
43
+ return errorResponse(error);
44
+ }
45
+ });
46
+ server.tool('board_columns', 'Get column names for a project', { project: z.string().optional().describe('Project ID') }, async (params) => {
47
+ try {
48
+ let projectId = params.project;
49
+ if (!projectId) {
50
+ const projects = await ctx.storage.listProjects();
51
+ if (projects.length === 0)
52
+ throw new Error('No projects found');
53
+ projectId = projects[0].id;
54
+ }
55
+ const columns = ctx.storage.getColumnNames(projectId);
56
+ return {
57
+ content: [{
58
+ type: 'text',
59
+ text: JSON.stringify({ success: true, projectId, columns }, null, 2),
60
+ }],
61
+ };
62
+ }
63
+ catch (error) {
64
+ return errorResponse(error);
65
+ }
66
+ });
67
+ server.tool('board_create_column', 'Add a new column to the board', {
68
+ project: z.string().describe('Project ID'),
69
+ name: z.string().describe('Column name'),
70
+ position: z.number().optional().describe('Position'),
71
+ }, async (params) => {
72
+ try {
73
+ const column = await ctx.storage.createColumn(params.project, params.name, params.position);
74
+ return {
75
+ content: [{
76
+ type: 'text',
77
+ text: JSON.stringify({ success: true, column: { id: column.id, name: column.name, position: column.position } }, null, 2),
78
+ }],
79
+ };
80
+ }
81
+ catch (error) {
82
+ return errorResponse(error);
83
+ }
84
+ });
85
+ server.tool('board_rename_column', 'Rename a column', {
86
+ project: z.string().describe('Project ID'),
87
+ column_id: z.string().describe('Column ID'),
88
+ name: z.string().describe('New name'),
89
+ }, async (params) => {
90
+ try {
91
+ const column = await ctx.storage.renameColumn(params.project, params.column_id, params.name);
92
+ return {
93
+ content: [{
94
+ type: 'text',
95
+ text: JSON.stringify({ success: true, column: { id: column.id, name: column.name } }, null, 2),
96
+ }],
97
+ };
98
+ }
99
+ catch (error) {
100
+ return errorResponse(error);
101
+ }
102
+ });
103
+ server.tool('board_move_column', 'Reorder a column', {
104
+ project: z.string().describe('Project ID'),
105
+ column_id: z.string().describe('Column ID'),
106
+ position: z.number().describe('New position'),
107
+ }, async (params) => {
108
+ try {
109
+ const column = await ctx.storage.moveColumn(params.project, params.column_id, params.position);
110
+ return {
111
+ content: [{
112
+ type: 'text',
113
+ text: JSON.stringify({ success: true, column: { id: column.id, name: column.name, position: column.position } }, null, 2),
114
+ }],
115
+ };
116
+ }
117
+ catch (error) {
118
+ return errorResponse(error);
119
+ }
120
+ });
121
+ server.tool('board_delete_column', 'Delete a column', {
122
+ project: z.string().describe('Project ID'),
123
+ column_id: z.string().describe('Column ID'),
124
+ cascade: z.boolean().optional().describe('Delete tickets in column'),
125
+ }, async (params) => {
126
+ try {
127
+ await ctx.storage.deleteColumn(params.project, params.column_id, params.cascade);
128
+ return {
129
+ content: [{
130
+ type: 'text',
131
+ text: JSON.stringify({ success: true, message: 'Column deleted' }, null, 2),
132
+ }],
133
+ };
134
+ }
135
+ catch (error) {
136
+ return errorResponse(error);
137
+ }
138
+ });
139
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * MCP Category Tools
3
+ */
4
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
+ import type { McpToolContext } from '../types.js';
6
+ export declare function registerCategoryTools(server: McpServer, ctx: McpToolContext): void;
@@ -0,0 +1,84 @@
1
+ /**
2
+ * MCP Category Tools
3
+ */
4
+ import { z } from 'zod';
5
+ import { errorResponse } from '../helpers.js';
6
+ export function registerCategoryTools(server, ctx) {
7
+ server.tool('category_list', 'List categories', { type: z.enum(['ticket', 'status']).optional() }, async (params) => {
8
+ try {
9
+ const categories = await ctx.storage.listCategories({ type: params.type });
10
+ return {
11
+ content: [{
12
+ type: 'text',
13
+ text: JSON.stringify({
14
+ success: true,
15
+ categories: categories.map((c) => ({
16
+ id: c.id,
17
+ name: c.name,
18
+ type: c.type,
19
+ isBuiltin: c.isBuiltin,
20
+ })),
21
+ }, null, 2),
22
+ }],
23
+ };
24
+ }
25
+ catch (error) {
26
+ return errorResponse(error);
27
+ }
28
+ });
29
+ server.tool('category_create', 'Create a category', {
30
+ name: z.string().describe('Category name'),
31
+ type: z.enum(['ticket', 'status']).describe('Category type'),
32
+ description: z.string().optional(),
33
+ color: z.string().optional(),
34
+ }, async (params) => {
35
+ try {
36
+ const category = await ctx.storage.createCategory({
37
+ name: params.name,
38
+ type: params.type,
39
+ description: params.description,
40
+ color: params.color,
41
+ });
42
+ return {
43
+ content: [{
44
+ type: 'text',
45
+ text: JSON.stringify({ success: true, category: { id: category.id, name: category.name } }, null, 2),
46
+ }],
47
+ };
48
+ }
49
+ catch (error) {
50
+ return errorResponse(error);
51
+ }
52
+ });
53
+ server.tool('category_rename', 'Rename a category', {
54
+ id: z.string().describe('Category ID'),
55
+ name: z.string().describe('New name'),
56
+ }, async (params) => {
57
+ try {
58
+ const category = await ctx.storage.renameCategory(params.id, params.name);
59
+ return {
60
+ content: [{
61
+ type: 'text',
62
+ text: JSON.stringify({ success: true, category: { id: category.id, name: category.name } }, null, 2),
63
+ }],
64
+ };
65
+ }
66
+ catch (error) {
67
+ return errorResponse(error);
68
+ }
69
+ });
70
+ server.tool('category_delete', 'Delete a category', { id: z.string().describe('Category ID') }, async (params) => {
71
+ try {
72
+ await ctx.storage.deleteCategory(params.id);
73
+ return {
74
+ content: [{
75
+ type: 'text',
76
+ text: JSON.stringify({ success: true, message: 'Category deleted' }, null, 2),
77
+ }],
78
+ };
79
+ }
80
+ catch (error) {
81
+ return errorResponse(error);
82
+ }
83
+ });
84
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * MCP CLI Passthrough Tools
3
+ *
4
+ * These tools call CLI commands that don't have a clean storage API.
5
+ * They're wrapped for MCP but return formatted text output.
6
+ */
7
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
8
+ import type { McpToolContext } from '../types.js';
9
+ export declare function registerAgentTools(server: McpServer, ctx: McpToolContext): void;
10
+ export declare function registerDockerTools(server: McpServer, ctx: McpToolContext): void;
11
+ export declare function registerRepoTools(server: McpServer, ctx: McpToolContext): void;
12
+ export declare function registerBranchTools(server: McpServer, ctx: McpToolContext): void;
13
+ export declare function registerGitHubTools(server: McpServer, ctx: McpToolContext): void;
14
+ export declare function registerInitTools(server: McpServer, ctx: McpToolContext): void;
15
+ export declare function registerUtilityTools(server: McpServer, ctx: McpToolContext): void;