@every-env/compound-plugin 2.40.0 → 2.40.1
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 +7 -0
- package/package.json +1 -1
- package/src/converters/claude-to-kiro.ts +12 -11
- package/src/parsers/claude.ts +11 -2
- package/tests/kiro-converter.test.ts +20 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
Release numbering now follows the repository `v*` tag line. Starting at `v2.34.0`, the root CLI package and this changelog stay on that shared version stream. Older entries below retain the previous `0.x` CLI numbering.
|
|
9
9
|
|
|
10
|
+
## [2.40.1](https://github.com/EveryInc/compound-engineering-plugin/compare/v2.40.0...v2.40.1) (2026-03-17)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **kiro:** parse .mcp.json wrapper key and support remote MCP servers ([#259](https://github.com/EveryInc/compound-engineering-plugin/issues/259)) ([dfff20e](https://github.com/EveryInc/compound-engineering-plugin/commit/dfff20e1adab891b4645a53d0581d4b20577e3f1))
|
|
16
|
+
|
|
10
17
|
# [2.40.0](https://github.com/EveryInc/compound-engineering-plugin/compare/v2.39.0...v2.40.0) (2026-03-17)
|
|
11
18
|
|
|
12
19
|
|
package/package.json
CHANGED
|
@@ -53,7 +53,7 @@ export function convertClaudeToKiro(
|
|
|
53
53
|
convertCommandToSkill(command, usedSkillNames, agentNames),
|
|
54
54
|
)
|
|
55
55
|
|
|
56
|
-
// Convert MCP servers (stdio
|
|
56
|
+
// Convert MCP servers (stdio and remote)
|
|
57
57
|
const mcpServers = convertMcpServers(plugin.mcpServers)
|
|
58
58
|
|
|
59
59
|
// Build steering files from CLAUDE.md
|
|
@@ -177,19 +177,20 @@ function convertMcpServers(
|
|
|
177
177
|
|
|
178
178
|
const result: Record<string, KiroMcpServer> = {}
|
|
179
179
|
for (const [name, server] of Object.entries(servers)) {
|
|
180
|
-
if (
|
|
180
|
+
if (server.command) {
|
|
181
|
+
const entry: KiroMcpServer = { command: server.command }
|
|
182
|
+
if (server.args && server.args.length > 0) entry.args = server.args
|
|
183
|
+
if (server.env && Object.keys(server.env).length > 0) entry.env = server.env
|
|
184
|
+
result[name] = entry
|
|
185
|
+
} else if (server.url) {
|
|
186
|
+
const entry: KiroMcpServer = { url: server.url }
|
|
187
|
+
if (server.headers && Object.keys(server.headers).length > 0) entry.headers = server.headers
|
|
188
|
+
result[name] = entry
|
|
189
|
+
} else {
|
|
181
190
|
console.warn(
|
|
182
|
-
`Warning: MCP server "${name}" has no command
|
|
191
|
+
`Warning: MCP server "${name}" has no command or url. Skipping.`,
|
|
183
192
|
)
|
|
184
|
-
continue
|
|
185
193
|
}
|
|
186
|
-
|
|
187
|
-
const entry: KiroMcpServer = { command: server.command }
|
|
188
|
-
if (server.args && server.args.length > 0) entry.args = server.args
|
|
189
|
-
if (server.env && Object.keys(server.env).length > 0) entry.env = server.env
|
|
190
|
-
|
|
191
|
-
console.log(`MCP server "${name}" will execute: ${server.command}${server.args ? " " + server.args.join(" ") : ""}`)
|
|
192
|
-
result[name] = entry
|
|
193
194
|
}
|
|
194
195
|
return result
|
|
195
196
|
}
|
package/src/parsers/claude.ts
CHANGED
|
@@ -158,7 +158,8 @@ async function loadMcpServers(
|
|
|
158
158
|
|
|
159
159
|
const mcpPath = path.join(root, ".mcp.json")
|
|
160
160
|
if (await pathExists(mcpPath)) {
|
|
161
|
-
|
|
161
|
+
const raw = await readJson<Record<string, unknown>>(mcpPath)
|
|
162
|
+
return unwrapMcpServers(raw)
|
|
162
163
|
}
|
|
163
164
|
|
|
164
165
|
return undefined
|
|
@@ -232,12 +233,20 @@ async function loadMcpPaths(
|
|
|
232
233
|
for (const entry of toPathList(value)) {
|
|
233
234
|
const resolved = resolveWithinRoot(root, entry, "mcpServers path")
|
|
234
235
|
if (await pathExists(resolved)) {
|
|
235
|
-
|
|
236
|
+
const raw = await readJson<Record<string, unknown>>(resolved)
|
|
237
|
+
configs.push(unwrapMcpServers(raw))
|
|
236
238
|
}
|
|
237
239
|
}
|
|
238
240
|
return configs
|
|
239
241
|
}
|
|
240
242
|
|
|
243
|
+
function unwrapMcpServers(raw: Record<string, unknown>): Record<string, ClaudeMcpServer> {
|
|
244
|
+
if (raw.mcpServers && typeof raw.mcpServers === "object") {
|
|
245
|
+
return raw.mcpServers as Record<string, ClaudeMcpServer>
|
|
246
|
+
}
|
|
247
|
+
return raw as Record<string, ClaudeMcpServer>
|
|
248
|
+
}
|
|
249
|
+
|
|
241
250
|
function mergeMcpConfigs(configs: Record<string, ClaudeMcpServer>[]): Record<string, ClaudeMcpServer> {
|
|
242
251
|
return configs.reduce((acc, config) => ({ ...acc, ...config }), {})
|
|
243
252
|
}
|
|
@@ -174,7 +174,24 @@ describe("convertClaudeToKiro", () => {
|
|
|
174
174
|
expect(bundle.mcpServers.local.args).toEqual(["hello"])
|
|
175
175
|
})
|
|
176
176
|
|
|
177
|
-
test("MCP HTTP servers
|
|
177
|
+
test("MCP HTTP servers converted with url", () => {
|
|
178
|
+
const plugin: ClaudePlugin = {
|
|
179
|
+
...fixturePlugin,
|
|
180
|
+
mcpServers: {
|
|
181
|
+
httpServer: { url: "https://example.com/mcp" },
|
|
182
|
+
},
|
|
183
|
+
agents: [],
|
|
184
|
+
commands: [],
|
|
185
|
+
skills: [],
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const bundle = convertClaudeToKiro(plugin, defaultOptions)
|
|
189
|
+
|
|
190
|
+
expect(Object.keys(bundle.mcpServers)).toHaveLength(1)
|
|
191
|
+
expect(bundle.mcpServers.httpServer).toEqual({ url: "https://example.com/mcp" })
|
|
192
|
+
})
|
|
193
|
+
|
|
194
|
+
test("MCP servers with no command or url skipped with warning", () => {
|
|
178
195
|
const warnings: string[] = []
|
|
179
196
|
const originalWarn = console.warn
|
|
180
197
|
console.warn = (msg: string) => warnings.push(msg)
|
|
@@ -182,7 +199,7 @@ describe("convertClaudeToKiro", () => {
|
|
|
182
199
|
const plugin: ClaudePlugin = {
|
|
183
200
|
...fixturePlugin,
|
|
184
201
|
mcpServers: {
|
|
185
|
-
|
|
202
|
+
broken: {} as any,
|
|
186
203
|
},
|
|
187
204
|
agents: [],
|
|
188
205
|
commands: [],
|
|
@@ -193,7 +210,7 @@ describe("convertClaudeToKiro", () => {
|
|
|
193
210
|
console.warn = originalWarn
|
|
194
211
|
|
|
195
212
|
expect(Object.keys(bundle.mcpServers)).toHaveLength(0)
|
|
196
|
-
expect(warnings.some((w) => w.includes("no command
|
|
213
|
+
expect(warnings.some((w) => w.includes("no command or url"))).toBe(true)
|
|
197
214
|
})
|
|
198
215
|
|
|
199
216
|
test("plugin with zero agents produces empty agents array", () => {
|