replicas-mcp 0.2.5 → 0.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-mcp",
3
- "version": "0.2.5",
3
+ "version": "0.2.8",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -2,7 +2,14 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
3
  import { z } from 'zod';
4
4
  import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
5
- import { parseAgentEvents, type AgentProvider, type ReadReplicaHistoryResponse } from '@replicas/shared';
5
+ import {
6
+ getCodingAgentDisplayNames,
7
+ getProviderDisplayName,
8
+ isValidCodingAgentProvider,
9
+ parseAgentEvents,
10
+ type AgentProvider,
11
+ type ReadReplicaHistoryResponse,
12
+ } from '@replicas/shared';
6
13
 
7
14
  const API_URL = process.env.REPLICAS_API_URL || 'https://api.tryreplicas.com';
8
15
  const API_KEY = process.env.REPLICAS_API_KEY;
@@ -57,10 +64,13 @@ type RegisterToolFn = (
57
64
 
58
65
  const server = new McpServer({
59
66
  name: 'replicas-mcp',
60
- version: '0.2.5',
67
+ version: '0.2.8',
61
68
  });
62
69
 
63
70
  const registerTool = server.registerTool.bind(server) as RegisterToolFn;
71
+ const codingAgentSchema = z.string().refine(isValidCodingAgentProvider, {
72
+ message: `Coding agent must be ${getCodingAgentDisplayNames()}`,
73
+ });
64
74
 
65
75
  // ---------------------------------------------------------------------------
66
76
  // Replica CRUD
@@ -75,7 +85,7 @@ registerTool(
75
85
  message: z.string(),
76
86
  repository_ids: z.array(z.string()).min(1).optional().describe('Repository IDs to include. Mutually exclusive with repository_set_id.'),
77
87
  repository_set_id: z.string().optional().describe('Repository set ID to use. Mutually exclusive with repository_ids.'),
78
- coding_agent: z.enum(['claude', 'codex']).optional().describe('Coding agent to use (default: claude)'),
88
+ coding_agent: codingAgentSchema.optional().describe('Coding agent to use (default: claude)'),
79
89
  model: z.string().optional().describe('Model to use for the coding agent'),
80
90
  lifecycle_policy: z.enum(['default', 'delete_when_done', 'delete_after_inactivity']).optional().describe('Lifecycle policy for the workspace'),
81
91
  },
@@ -154,7 +164,7 @@ registerTool(
154
164
  inputSchema: {
155
165
  id: z.string(),
156
166
  message: z.string(),
157
- coding_agent: z.enum(['claude', 'codex']).optional().describe('Coding agent to use'),
167
+ coding_agent: codingAgentSchema.optional().describe('Coding agent to use'),
158
168
  chat_id: z.string().optional().describe('Chat ID to send the message to (uses default chat if omitted)'),
159
169
  model: z.string().optional().describe('Model to use'),
160
170
  plan_mode: z.boolean().optional().describe('Whether to use plan mode'),
@@ -250,7 +260,7 @@ registerTool(
250
260
  description: 'Create a new chat in a replica workspace',
251
261
  inputSchema: {
252
262
  id: z.string().describe('Replica ID'),
253
- provider: z.enum(['claude', 'codex']).describe('Coding agent provider for the chat'),
263
+ provider: codingAgentSchema.describe('Coding agent provider for the chat'),
254
264
  title: z.string().optional().describe('Optional title for the chat'),
255
265
  },
256
266
  },