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/dist/{chunk-QIOBV22I.js → chunk-6PZSQLNC.js} +12 -12
- package/dist/{chunk-C6IOMGXW.js → chunk-B7L4ZPGB.js} +33 -33
- package/dist/{chunk-FIMT2XWG.js → chunk-FYYO2R33.js} +11 -11
- package/dist/{chunk-KEOQGGM5.js → chunk-IFQZRTNU.js} +55 -54
- package/dist/{chunk-NWBPSHNL.js → chunk-IKBVWGNN.js} +377 -102
- package/dist/{chunk-3X3IL2A6.js → chunk-PMRETU6D.js} +80 -72
- package/dist/{dist-es-MAMFGWZS.js → dist-es-2L3JFPXA.js} +17 -17
- package/dist/{dist-es-KLEKEXIP.js → dist-es-C6C5EPYY.js} +7 -7
- package/dist/{dist-es-7DMTLQRJ.js → dist-es-M6CDI3BC.js} +7 -7
- package/dist/{dist-es-3DLRX4SC.js → dist-es-N74TKJQO.js} +9 -9
- package/dist/{dist-es-V7ZJXG3C.js → dist-es-W4ABA4W6.js} +22 -19
- package/dist/{dist-es-VBWSM7AX.js → dist-es-XIFQZYH7.js} +43 -35
- package/dist/{dist-es-B6XNMCQ4.js → dist-es-YTPWGDNE.js} +4 -4
- package/dist/{event-streams-D47TMH7D.js → event-streams-SFJFPYVF.js} +17 -17
- package/dist/index.js +379 -8
- package/dist/{loadSso-4NJATGLO.js → loadSso-UZHA43K3.js} +19 -19
- package/dist/{signin-HB5KQSHQ.js → signin-HL5RI4AN.js} +155 -77
- package/dist/{sso-oidc-7AKRONOU.js → sso-oidc-AMAMV42C.js} +21 -21
- package/dist/{sts-WSDR725H.js → sts-ZEHQ76A7.js} +434 -45
- package/package.json +1 -1
- package/src/index.ts +15 -5
package/package.json
CHANGED
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 {
|
|
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.
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
},
|