feat: MCP tools refactor - replace grove_contribute with per-kind tools #170
Annotations
2 errors and 1 warning
|
Test
Process completed with exit code 1.
|
|
Test:
src/core/operations/parity-matrix.test.ts#L119
Expected to contain: "\"grove_contribute\""
Create a new session\n *\n * Accesses the GoalSessionStore directly via McpDeps.\n */\n\nimport type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\n\nimport type { McpDeps } from \"../deps.js\";\n\n// ---------------------------------------------------------------------------\n// Input schemas\n// ---------------------------------------------------------------------------\n\nconst listSessionsInputSchema = z.object({\n status: z\n .enum([\"active\", \"archived\"])\n .optional()\n .describe(\"Filter sessions by status. Omit to list all sessions.\"),\n});\n\nconst createSessionInputSchema = z.object({\n goal: z\n .string()\n .optional()\n .describe(\"Optional goal description to associate with the new session\"),\n});\n\n// ---------------------------------------------------------------------------\n// Tool registration\n// ---------------------------------------------------------------------------\n\nexport function registerSessionTools(server: McpServer, deps: McpDeps): void {\n // --- grove_list_sessions -------------------------------------------------\n server.registerTool(\n \"grove_list_sessions\",\n {\n description:\n \"List sessions with optional status filter. Returns session records including \" +\n \"session ID, goal, status, timestamps, and contribution count.\",\n inputSchema: listSessionsInputSchema,\n },\n async (args) => {\n const store = deps.goalSessionStore;\n if (!store) {\n return {\n isError: true,\n content: [\n {\n type: \"text\" as const,\n text: \"[NOT_CONFIGURED] Goal/session store is not configured\",\n },\n ],\n };\n }\n\n const query = args.status !== undefined ? { status: args.status } : undefined;\n const sessions = await store.listSessions(query);\n\n return {\n content: [\n {\n type: \"text\" as const,\n text: JSON.stringify({ count: sessions.length, sessions }),\n },\n ],\n };\n },\n );\n\n // --- grove_create_session ------------------------------------------------\n server.registerTool(\n \"grove_create_session\",\n {\n description:\n \"Create a new session to group contributions. Optionally associate a goal \" +\n \"description with the session. Returns the new session record with its generated ID.\",\n inputSchema: createSessionInputSchema,\n },\n async (args) => {\n const store = deps.goalSessionStore;\n if (!store) {\n return {\n isError: true,\n content: [\n {\n type: \"text\" as const,\n text: \"[NOT_CONFIGURED] Goal/session store is not configured\",\n },\n ],\n };\n }\n\n const session = await store.createSession({\n ...(args.goal !== undefined ? { goal: args.goal } : {}),\n });\n\n return {\n content: [\n {\n type: \"text\" as const,\n text: JSON.stringify(session),\n },\n ],\n };\n },\n );\n}\n"
at <anonymous> (/home/runner/work/grove/grove/src/core/operations/parity-matrix.test.ts:119:29)
|
|
Complete job
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/cache@v4, actions/checkout@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
Loading