@locusai/mcp 0.1.6 → 0.1.7
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.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/tools/kanban.ts +0 -64
- package/src/types.ts +24 -27
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/tools/kanban.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { apiGet, apiPatch, apiPost, error, success } from "../api.js";
|
|
4
|
-
import { projectDir } from "../config.js";
|
|
5
4
|
import { ROLE_PROMPTS, type Sprint, type Task } from "../types.js";
|
|
6
5
|
|
|
7
6
|
export function registerKanbanTools(server: McpServer): void {
|
|
@@ -178,69 +177,6 @@ export function registerKanbanTools(server: McpServer): void {
|
|
|
178
177
|
}
|
|
179
178
|
);
|
|
180
179
|
|
|
181
|
-
// Commit changes
|
|
182
|
-
server.registerTool(
|
|
183
|
-
"kanban.commit",
|
|
184
|
-
{
|
|
185
|
-
title: "Commit Task Changes",
|
|
186
|
-
description:
|
|
187
|
-
"Create a git commit with the task ID in the message. Call this BEFORE moving to VERIFICATION to save your work.",
|
|
188
|
-
inputSchema: {
|
|
189
|
-
taskId: z.number(),
|
|
190
|
-
additionalMessage: z.string().optional(),
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
async ({ taskId, additionalMessage }) => {
|
|
194
|
-
try {
|
|
195
|
-
const task = await apiGet<Task>(`/tasks/${taskId}`);
|
|
196
|
-
|
|
197
|
-
if (!task.title) {
|
|
198
|
-
return error("Task not found");
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// Build commit message
|
|
202
|
-
let commitMessage = `Task #${taskId}: ${task.title}`;
|
|
203
|
-
if (additionalMessage) {
|
|
204
|
-
commitMessage += `\n\n${additionalMessage}`;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// Execute git commands
|
|
208
|
-
const addProc = Bun.spawn(["git", "add", "-A"], {
|
|
209
|
-
cwd: projectDir,
|
|
210
|
-
stdout: "pipe",
|
|
211
|
-
stderr: "pipe",
|
|
212
|
-
});
|
|
213
|
-
await addProc.exited;
|
|
214
|
-
|
|
215
|
-
const commitProc = Bun.spawn(["git", "commit", "-m", commitMessage], {
|
|
216
|
-
cwd: projectDir,
|
|
217
|
-
stdout: "pipe",
|
|
218
|
-
stderr: "pipe",
|
|
219
|
-
});
|
|
220
|
-
const exitCode = await commitProc.exited;
|
|
221
|
-
const stdout = await new Response(commitProc.stdout).text();
|
|
222
|
-
const stderr = await new Response(commitProc.stderr).text();
|
|
223
|
-
|
|
224
|
-
if (exitCode !== 0) {
|
|
225
|
-
return success({
|
|
226
|
-
success: false,
|
|
227
|
-
error: stderr || "Git commit failed",
|
|
228
|
-
hint: "Make sure there are staged changes to commit",
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
return success({
|
|
233
|
-
success: true,
|
|
234
|
-
message: `Committed changes for Task #${taskId}`,
|
|
235
|
-
commitMessage,
|
|
236
|
-
output: stdout,
|
|
237
|
-
});
|
|
238
|
-
} catch (e) {
|
|
239
|
-
return error(String(e));
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
);
|
|
243
|
-
|
|
244
180
|
// Check acceptance criteria
|
|
245
181
|
server.registerTool(
|
|
246
182
|
"kanban.check",
|
package/src/types.ts
CHANGED
|
@@ -27,42 +27,39 @@ export interface Sprint {
|
|
|
27
27
|
export const ROLE_PROMPTS: Record<string, string> = {
|
|
28
28
|
FRONTEND: `## Frontend Implementation Guidelines
|
|
29
29
|
|
|
30
|
-
### Design
|
|
31
|
-
- **Visual Excellence**: Create stunning, premium interfaces. Use vibrant
|
|
32
|
-
- **
|
|
33
|
-
- **Dynamic Interactions**:
|
|
34
|
-
- **
|
|
30
|
+
### Locus Design Aesthetics
|
|
31
|
+
- **Visual Excellence**: Create stunning, premium interfaces. Use vibrant, harmonious color palettes (avoid generic colors).
|
|
32
|
+
- **Glassmorphism & Depth**: Use subtle backgrounds, blurred overlays, and soft shadows to create depth.
|
|
33
|
+
- **Dynamic Interactions**: Implement smooth transitions, hover effects, and micro-animations for a responsive feel.
|
|
34
|
+
- **Typography**: Use modern, readable fonts (Inter, Roboto, Outfit). Ensure perfect hierarchy and spacing.
|
|
35
35
|
|
|
36
36
|
### Technical Standards
|
|
37
|
-
- **Component-Driven**: Build
|
|
38
|
-
- **
|
|
39
|
-
- **
|
|
40
|
-
- **Performance**: Optimize images and minimize re-renders.
|
|
37
|
+
- **Component-Driven**: Build modular, reusable components with clear prop interfaces.
|
|
38
|
+
- **Modern CSS**: Use Vanilla CSS with variables for the design system. Avoid ad-hoc utilities.
|
|
39
|
+
- **Performance**: Optimize assets and minimize re-renders.
|
|
41
40
|
|
|
42
41
|
### Workflow Rules (CRITICAL)
|
|
43
|
-
1. **
|
|
44
|
-
2. **
|
|
45
|
-
3. **
|
|
46
|
-
4. **
|
|
47
|
-
5. **
|
|
48
|
-
6. **If Rejected**: Check task comments for feedback, fix issues, commit again, and move back to VERIFICATION.`,
|
|
42
|
+
1. **Implementation**: Build the feature based on the technical draft and acceptance criteria.
|
|
43
|
+
2. **Verification**: Run \`bun run lint\` and \`bun run typecheck\`. Use \`ci.run(taskId, "quick")\` to validate your changes.
|
|
44
|
+
3. **Submission**: Use \`kanban.check\` to mark items as done, then move to **VERIFICATION** using \`kanban.move(taskId, "VERIFICATION")\`.
|
|
45
|
+
4. **NEVER move to DONE**: Only the manager can approve a task to DONE.
|
|
46
|
+
5. **Rejection**: If rejected, review feedback in task comments and resubmit.`,
|
|
49
47
|
|
|
50
48
|
BACKEND: `## Backend Implementation Guidelines
|
|
51
49
|
|
|
52
50
|
### Architecture & Quality
|
|
53
|
-
- **Modularity**:
|
|
54
|
-
- **Type Safety**:
|
|
55
|
-
- **Error Handling**:
|
|
51
|
+
- **Modularity**: Use a strict Controller-Service-Repository pattern.
|
|
52
|
+
- **Type Safety**: Ensure 100% type coverage. Avoid \`any\`. Use Zod for validation.
|
|
53
|
+
- **Error Handling**: Use the centralized error handling middleware and return semantic HTTP status codes.
|
|
56
54
|
|
|
57
|
-
### Security &
|
|
58
|
-
- **
|
|
59
|
-
- **
|
|
55
|
+
### Security & Efficiency
|
|
56
|
+
- **Data Integrity**: Use transactions where necessary. Optimize queries to avoid N+1 problems.
|
|
57
|
+
- **Security**: Sanitize all inputs and follow least privilege principles.
|
|
60
58
|
|
|
61
59
|
### Workflow Rules (CRITICAL)
|
|
62
|
-
1. **
|
|
63
|
-
2. **
|
|
64
|
-
3. **
|
|
65
|
-
4. **
|
|
66
|
-
5. **
|
|
67
|
-
6. **If Rejected**: Check task comments for feedback, fix issues, commit again, and move back to VERIFICATION.`,
|
|
60
|
+
1. **Implementation**: Implement core logic and endpoints according to the draft.
|
|
61
|
+
2. **Verification**: Run \`bun run lint\` and \`bun run typecheck\`. Use \`ci.run(taskId, "quick")\` to validate your changes.
|
|
62
|
+
3. **Submission**: Use \`kanban.check\` to mark items as done, then move to **VERIFICATION** using \`kanban.move(taskId, "VERIFICATION")\`.
|
|
63
|
+
4. **NEVER move to DONE**: Only the manager can approve a task to DONE.
|
|
64
|
+
5. **Rejection**: If rejected, review feedback in task comments and resubmit.`,
|
|
68
65
|
};
|