rulesync 0.48.0 → 0.51.0
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/README.ja.md +8 -2
- package/README.md +95 -2
- package/dist/augmentcode-ICLQ2NEZ.js +9 -0
- package/dist/{chunk-OTCCHS7Q.js → chunk-4MZXYV5H.js} +1 -1
- package/dist/{chunk-BY6RI77W.js → chunk-AREA26HF.js} +1 -1
- package/dist/{chunk-L2JTXZZB.js → chunk-FFW6TGCM.js} +1 -1
- package/dist/{chunk-JWN6GRG6.js → chunk-IXCMY24P.js} +1 -1
- package/dist/chunk-OPZOVKIL.js +111 -0
- package/dist/{chunk-D365OP7N.js → chunk-QUJMXHNR.js} +1 -1
- package/dist/{chunk-7UVBAWYG.js → chunk-TTHBLXOB.js} +1 -1
- package/dist/{chunk-7ZIUEZZQ.js → chunk-USKQYIZ2.js} +13 -3
- package/dist/chunk-Y26DXTAT.js +90 -0
- package/dist/{chunk-P6KQZULZ.js → chunk-Y2XH4E5R.js} +1 -1
- package/dist/{claudecode-Y3GIXDUN.js → claudecode-SRXYHIJE.js} +2 -2
- package/dist/{cline-NS3OPXM2.js → cline-IJW27CUU.js} +2 -2
- package/dist/{copilot-QN2SC7Y2.js → copilot-ARYIWVJ7.js} +2 -2
- package/dist/{cursor-DV2IS7JF.js → cursor-FCS74IAH.js} +2 -2
- package/dist/{geminicli-MRYTLT2T.js → geminicli-VOPV6DXZ.js} +2 -2
- package/dist/index.cjs +2018 -829
- package/dist/index.js +1904 -827
- package/dist/junie-A2Y2WZI4.js +9 -0
- package/dist/{kiro-S5TSM7VW.js → kiro-MHIK4UBV.js} +2 -2
- package/dist/{roo-NWLD3YYN.js → roo-VG4IUNTE.js} +2 -2
- package/package.json +17 -16
package/README.ja.md
CHANGED
|
@@ -15,6 +15,7 @@ rulesyncは以下のAI開発ツールの**生成**と**インポート**の両
|
|
|
15
15
|
- **Cursor Project Rules** (`.cursor/rules/*.mdc` + `.cursorrules`)
|
|
16
16
|
- **Cline Rules** (`.clinerules/*.md` + `.cline/instructions.md`)
|
|
17
17
|
- **Claude Code Memory** (`./CLAUDE.md` + `.claude/memories/*.md`)
|
|
18
|
+
- **AugmentCode Rules** (`.augment/rules/*.md`)
|
|
18
19
|
- **Roo Code Rules** (`.roo/rules/*.md` + `.roo/instructions.md`)
|
|
19
20
|
- **Gemini CLI** (`GEMINI.md` + `.gemini/memories/*.md`)
|
|
20
21
|
- **Kiro IDE カスタムステアリングドキュメント** (`.kiro/steering/*.md`) + **AI除外ファイル** (`.aiignore`)
|
|
@@ -66,7 +67,9 @@ yarn global add rulesync
|
|
|
66
67
|
npx rulesync import --cursor # .cursorrulesと.cursor/rules/*.mdcから
|
|
67
68
|
npx rulesync import --copilot # .github/copilot-instructions.mdから
|
|
68
69
|
npx rulesync import --cline # .cline/instructions.mdから
|
|
69
|
-
npx rulesync import --
|
|
70
|
+
npx rulesync import --augmentcode # .augment/rules/*.mdから
|
|
71
|
+
npx rulesync import --augmentcode-legacy # .augment-guidelines(レガシー形式)から
|
|
72
|
+
npx rulesync import --roo # .roo/instructions.mdから
|
|
70
73
|
npx rulesync import --geminicli # GEMINI.mdと.gemini/memories/*.mdから
|
|
71
74
|
```
|
|
72
75
|
|
|
@@ -214,6 +217,7 @@ npx rulesync generate --copilot
|
|
|
214
217
|
npx rulesync generate --cursor
|
|
215
218
|
npx rulesync generate --cline
|
|
216
219
|
npx rulesync generate --claudecode
|
|
220
|
+
npx rulesync generate --augmentcode
|
|
217
221
|
npx rulesync generate --roo
|
|
218
222
|
npx rulesync generate --geminicli
|
|
219
223
|
npx rulesync generate --kiro
|
|
@@ -238,7 +242,7 @@ npx rulesync generate --base-dir ./apps/web,./apps/api,./packages/shared
|
|
|
238
242
|
|
|
239
243
|
- `--delete`: 新しいファイルを作成する前に既存の生成済みファイルをすべて削除
|
|
240
244
|
- `--verbose`: 生成プロセス中に詳細出力を表示
|
|
241
|
-
- `--copilot`, `--cursor`, `--cline`, `--claudecode`, `--roo`, `--geminicli`, `--kiro`: 指定されたツールのみ生成
|
|
245
|
+
- `--copilot`, `--cursor`, `--cline`, `--claudecode`, `--augmentcode`, `--roo`, `--geminicli`, `--kiro`: 指定されたツールのみ生成
|
|
242
246
|
- `--base-dir <paths>`: 指定されたベースディレクトリに設定ファイルを生成(複数パスの場合はカンマ区切り)。異なるプロジェクトディレクトリにツール固有の設定を生成したいmonorepoセットアップに便利。
|
|
243
247
|
|
|
244
248
|
### 4. 既存設定のインポート
|
|
@@ -251,6 +255,7 @@ npx rulesync import --claudecode # CLAUDE.mdと.claude/memories/*.mdからイン
|
|
|
251
255
|
npx rulesync import --cursor # .cursorrulesと.cursor/rules/*.mdからインポート
|
|
252
256
|
npx rulesync import --copilot # .github/copilot-instructions.mdと.github/instructions/*.instructions.mdからインポート
|
|
253
257
|
npx rulesync import --cline # .cline/instructions.mdからインポート
|
|
258
|
+
npx rulesync import --augmentcode # .augment/rules/*.mdからインポート
|
|
254
259
|
npx rulesync import --roo # .roo/instructions.mdからインポート
|
|
255
260
|
npx rulesync import --geminicli # GEMINI.mdと.gemini/memories/*.mdからインポート
|
|
256
261
|
|
|
@@ -427,6 +432,7 @@ globs: "**/*.ts,**/*.tsx"
|
|
|
427
432
|
| **Cursor** | `.cursor/rules/*.mdc` | MDC (YAMLヘッダー + Markdown) | ルート: `cursorRuleType: always`<br>非ルート: `cursorRuleType: specificFiles` (globs指定時)<br>非ルート: `cursorRuleType: intelligently` (description指定時)<br>非ルート: `cursorRuleType: manual` (デフォルト) |
|
|
428
433
|
| **Cline** | `.clinerules/*.md` | プレーンMarkdown | 両レベルとも同じフォーマットを使用 |
|
|
429
434
|
| **Claude Code** | `./CLAUDE.md` (ルート)<br>`.claude/memories/*.md` (非ルート) | プレーンMarkdown | ルートはCLAUDE.mdに移動<br>非ルートは別メモリファイルに移動<br>CLAUDE.mdは`@filename`参照を含む |
|
|
435
|
+
| **AugmentCode** | `.augment/rules/*.md` | YAMLフロントマター + Markdown | ルート: `type: always`<br>非ルート: `type: auto` (description指定時) または `type: manual` (デフォルト) |
|
|
430
436
|
| **Roo Code** | `.roo/rules/*.md` | プレーンMarkdown | 両レベルとも説明ヘッダー付きの同じフォーマットを使用 |
|
|
431
437
|
| **Gemini CLI** | `GEMINI.md` (ルート)<br>`.gemini/memories/*.md` (非ルート) | プレーンMarkdown | ルートはGEMINI.mdに移動<br>非ルートは別メモリファイルに移動<br>GEMINI.mdは`@filename`参照を含む |
|
|
432
438
|
| **Kiro IDE** | `.kiro/steering/*.md` + `.aiignore` | プレーンMarkdown + 除外パターン | カスタムステアリングドキュメントで両レベルとも同じフォーマット使用<br>AI除外ファイルで機密パターンを除外 |
|
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ rulesync supports both **generation** and **import** for the following AI develo
|
|
|
15
15
|
- **Cursor Project Rules** (`.cursor/rules/*.mdc` + `.cursorrules`)
|
|
16
16
|
- **Cline Rules** (`.clinerules/*.md` + `.cline/instructions.md`)
|
|
17
17
|
- **Claude Code Memory** (`./CLAUDE.md` + `.claude/memories/*.md`)
|
|
18
|
+
- **AugmentCode Rules** (`.augment/rules/*.md`)
|
|
18
19
|
- **Roo Code Rules** (`.roo/rules/*.md` + `.roo/instructions.md`)
|
|
19
20
|
- **Gemini CLI** (`GEMINI.md` + `.gemini/memories/*.md`)
|
|
20
21
|
- **Kiro IDE Custom Steering Documents** (`.kiro/steering/*.md`) + **AI Ignore Files** (`.aiignore`)
|
|
@@ -66,7 +67,9 @@ If you already have AI tool configurations, you can import them into rulesync fo
|
|
|
66
67
|
npx rulesync import --cursor # From .cursorrules and .cursor/rules/*.mdc
|
|
67
68
|
npx rulesync import --copilot # From .github/copilot-instructions.md
|
|
68
69
|
npx rulesync import --cline # From .cline/instructions.md
|
|
69
|
-
npx rulesync import --
|
|
70
|
+
npx rulesync import --augmentcode # From .augment/rules/*.md
|
|
71
|
+
npx rulesync import --augmentcode-legacy # From .augment-guidelines (legacy format)
|
|
72
|
+
npx rulesync import --roo # From .roo/instructions.md
|
|
70
73
|
npx rulesync import --geminicli # From GEMINI.md and .gemini/memories/*.md
|
|
71
74
|
```
|
|
72
75
|
|
|
@@ -214,6 +217,7 @@ npx rulesync generate --copilot
|
|
|
214
217
|
npx rulesync generate --cursor
|
|
215
218
|
npx rulesync generate --cline
|
|
216
219
|
npx rulesync generate --claudecode
|
|
220
|
+
npx rulesync generate --augmentcode
|
|
217
221
|
npx rulesync generate --roo
|
|
218
222
|
npx rulesync generate --geminicli
|
|
219
223
|
npx rulesync generate --kiro
|
|
@@ -238,8 +242,91 @@ npx rulesync generate --base-dir ./apps/web,./apps/api,./packages/shared
|
|
|
238
242
|
|
|
239
243
|
- `--delete`: Remove all existing generated files before creating new ones
|
|
240
244
|
- `--verbose`: Show detailed output during generation process
|
|
241
|
-
- `--copilot`, `--cursor`, `--cline`, `--claudecode`, `--roo`, `--geminicli`, `--kiro`: Generate only for specified tools
|
|
245
|
+
- `--copilot`, `--cursor`, `--cline`, `--claudecode`, `--augmentcode`, `--roo`, `--geminicli`, `--kiro`: Generate only for specified tools
|
|
242
246
|
- `--base-dir <paths>`: Generate configuration files in specified base directories (comma-separated for multiple paths). Useful for monorepo setups where you want to generate tool-specific configurations in different project directories.
|
|
247
|
+
- `--config <path>`: Use a specific configuration file
|
|
248
|
+
- `--no-config`: Disable configuration file loading
|
|
249
|
+
|
|
250
|
+
### Configuration Files
|
|
251
|
+
|
|
252
|
+
rulesync supports configuration files to avoid repetitive command-line arguments. The configuration is loaded from (in order of precedence):
|
|
253
|
+
|
|
254
|
+
1. Path specified with `--config` flag
|
|
255
|
+
2. `rulesync.jsonc` (JSONC format with comments)
|
|
256
|
+
3. `rulesync.ts` (TypeScript format)
|
|
257
|
+
4. `rulesync.config.ts`
|
|
258
|
+
5. `rulesync.config.jsonc`
|
|
259
|
+
6. `package.json` (in a `"rulesync"` field)
|
|
260
|
+
|
|
261
|
+
#### Configuration File Examples
|
|
262
|
+
|
|
263
|
+
**JSONC format (`rulesync.jsonc`):**
|
|
264
|
+
```jsonc
|
|
265
|
+
{
|
|
266
|
+
// List of tools to generate configurations for
|
|
267
|
+
"targets": ["copilot", "cursor", "claudecode"],
|
|
268
|
+
|
|
269
|
+
// Tools to exclude from generation (overrides targets)
|
|
270
|
+
"exclude": ["roo"],
|
|
271
|
+
|
|
272
|
+
// Custom output paths for specific tools
|
|
273
|
+
"outputPaths": {
|
|
274
|
+
"copilot": ".github/copilot-instructions.md"
|
|
275
|
+
},
|
|
276
|
+
|
|
277
|
+
// Base directory or directories for generation
|
|
278
|
+
"baseDir": "./packages",
|
|
279
|
+
|
|
280
|
+
// Delete existing files before generating
|
|
281
|
+
"delete": false,
|
|
282
|
+
|
|
283
|
+
// Enable verbose output
|
|
284
|
+
"verbose": true
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**TypeScript format (`rulesync.ts`):**
|
|
289
|
+
```typescript
|
|
290
|
+
import type { ConfigOptions } from "rulesync";
|
|
291
|
+
|
|
292
|
+
const config: ConfigOptions = {
|
|
293
|
+
targets: ["copilot", "cursor", "claudecode"],
|
|
294
|
+
exclude: ["roo"],
|
|
295
|
+
outputPaths: {
|
|
296
|
+
copilot: ".github/copilot-instructions.md"
|
|
297
|
+
},
|
|
298
|
+
baseDir: "./packages",
|
|
299
|
+
delete: false,
|
|
300
|
+
verbose: true
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
export default config;
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
#### Configuration Options
|
|
307
|
+
|
|
308
|
+
- `targets`: Array of tools to generate configurations for (overrides default targets)
|
|
309
|
+
- `exclude`: Array of tools to exclude from generation
|
|
310
|
+
- `outputPaths`: Custom output paths for specific tools
|
|
311
|
+
- `baseDir`: Base directory or array of directories for generation
|
|
312
|
+
- `delete`: Delete existing files before generating (default: false)
|
|
313
|
+
- `verbose`: Enable verbose output (default: false)
|
|
314
|
+
- `aiRulesDir`: Directory containing rule files (default: ".rulesync")
|
|
315
|
+
- `watch`: Watch configuration with `enabled`, `interval`, and `ignore` options
|
|
316
|
+
|
|
317
|
+
#### Managing Configuration
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
# Show current configuration
|
|
321
|
+
npx rulesync config
|
|
322
|
+
|
|
323
|
+
# Initialize a configuration file
|
|
324
|
+
npx rulesync config --init
|
|
325
|
+
|
|
326
|
+
# Initialize with specific format
|
|
327
|
+
npx rulesync config --init --format jsonc # Default, supports comments
|
|
328
|
+
npx rulesync config --init --format ts # TypeScript with type safety
|
|
329
|
+
```
|
|
243
330
|
|
|
244
331
|
### 4. Import Existing Configurations
|
|
245
332
|
|
|
@@ -251,6 +338,7 @@ npx rulesync import --claudecode # Import from CLAUDE.md and .claude/memories/*.
|
|
|
251
338
|
npx rulesync import --cursor # Import from .cursorrules and .cursor/rules/*.md
|
|
252
339
|
npx rulesync import --copilot # Import from .github/copilot-instructions.md and .github/instructions/*.instructions.md
|
|
253
340
|
npx rulesync import --cline # Import from .cline/instructions.md
|
|
341
|
+
npx rulesync import --augmentcode # Import from .augment/rules/*.md
|
|
254
342
|
npx rulesync import --roo # Import from .roo/instructions.md
|
|
255
343
|
npx rulesync import --geminicli # Import from GEMINI.md and .gemini/memories/*.md
|
|
256
344
|
|
|
@@ -324,6 +412,10 @@ npx rulesync watch
|
|
|
324
412
|
|
|
325
413
|
# Add generated files to .gitignore
|
|
326
414
|
npx rulesync gitignore
|
|
415
|
+
|
|
416
|
+
# Show or manage configuration
|
|
417
|
+
npx rulesync config
|
|
418
|
+
npx rulesync config --init # Create configuration file
|
|
327
419
|
```
|
|
328
420
|
|
|
329
421
|
## Configuration File Structure
|
|
@@ -429,6 +521,7 @@ globs: "**/*.ts,**/*.tsx"
|
|
|
429
521
|
| **Cursor** | `.cursor/rules/*.mdc` | MDC (YAML header + Markdown) | Root: `cursorRuleType: always`<br>Non-root: `cursorRuleType: specificFiles` (with globs)<br>Non-root: `cursorRuleType: intelligently` (with description)<br>Non-root: `cursorRuleType: manual` (default) |
|
|
430
522
|
| **Cline** | `.clinerules/*.md` | Plain Markdown | Both levels use same format |
|
|
431
523
|
| **Claude Code** | `./CLAUDE.md` (root)<br>`.claude/memories/*.md` (non-root) | Plain Markdown | Root goes to CLAUDE.md<br>Non-root go to separate memory files<br>CLAUDE.md includes `@filename` references |
|
|
524
|
+
| **AugmentCode** | `.augment/rules/*.md` | Markdown with YAML frontmatter | Root: `type: always`<br>Non-root: `type: auto` (with description) or `type: manual` (default) |
|
|
432
525
|
| **Roo Code** | `.roo/rules/*.md` | Plain Markdown | Both levels use same format with description header |
|
|
433
526
|
| **Gemini CLI** | `GEMINI.md` (root)<br>`.gemini/memories/*.md` (non-root) | Plain Markdown | Root goes to GEMINI.md<br>Non-root go to separate memory files<br>GEMINI.md includes `@filename` references |
|
|
434
527
|
| **Kiro IDE** | `.kiro/steering/*.md` + `.aiignore` | Plain Markdown + Ignore patterns | Both levels use same format for custom steering docs<br>AI ignore file excludes sensitive patterns |
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import {
|
|
2
|
+
shouldIncludeServer
|
|
3
|
+
} from "./chunk-USKQYIZ2.js";
|
|
4
|
+
|
|
5
|
+
// src/generators/mcp/augmentcode.ts
|
|
6
|
+
function generateAugmentcodeMcp(config) {
|
|
7
|
+
const augmentSettings = {
|
|
8
|
+
mcpServers: []
|
|
9
|
+
};
|
|
10
|
+
const shouldInclude = (server) => {
|
|
11
|
+
return shouldIncludeServer(server, "augmentcode");
|
|
12
|
+
};
|
|
13
|
+
for (const [serverName, server] of Object.entries(config.mcpServers)) {
|
|
14
|
+
if (!shouldInclude(server)) continue;
|
|
15
|
+
const augmentServer = {
|
|
16
|
+
name: serverName
|
|
17
|
+
};
|
|
18
|
+
if (server.command) {
|
|
19
|
+
augmentServer.command = server.command;
|
|
20
|
+
if (server.args) {
|
|
21
|
+
augmentServer.args = server.args;
|
|
22
|
+
}
|
|
23
|
+
} else if (server.url || server.httpUrl) {
|
|
24
|
+
const url = server.httpUrl || server.url;
|
|
25
|
+
if (url) {
|
|
26
|
+
augmentServer.url = url;
|
|
27
|
+
}
|
|
28
|
+
if (server.httpUrl || server.transport === "http") {
|
|
29
|
+
augmentServer.transport = "http";
|
|
30
|
+
} else if (server.transport === "sse") {
|
|
31
|
+
augmentServer.transport = "sse";
|
|
32
|
+
}
|
|
33
|
+
if (server.env) {
|
|
34
|
+
augmentServer.headers = server.env;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (server.env && server.command) {
|
|
38
|
+
augmentServer.env = server.env;
|
|
39
|
+
}
|
|
40
|
+
if (server.timeout) {
|
|
41
|
+
augmentServer.timeout = server.timeout;
|
|
42
|
+
}
|
|
43
|
+
if (server.disabled !== void 0) {
|
|
44
|
+
augmentServer.enabled = !server.disabled;
|
|
45
|
+
}
|
|
46
|
+
if (server.networkTimeout && server.networkTimeout > 0) {
|
|
47
|
+
augmentServer.retries = Math.max(1, Math.floor(server.networkTimeout / 3e4));
|
|
48
|
+
}
|
|
49
|
+
if (augmentSettings.mcpServers) {
|
|
50
|
+
augmentSettings.mcpServers.push(augmentServer);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return JSON.stringify(augmentSettings, null, 2);
|
|
54
|
+
}
|
|
55
|
+
function generateAugmentcodeMcpConfiguration(mcpServers, baseDir = "") {
|
|
56
|
+
const filepath = baseDir ? `${baseDir}/.mcp.json` : ".mcp.json";
|
|
57
|
+
const settings = {
|
|
58
|
+
mcpServers: {}
|
|
59
|
+
};
|
|
60
|
+
for (const [serverName, server] of Object.entries(mcpServers)) {
|
|
61
|
+
if (!shouldIncludeServer(server, "augmentcode")) {
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
const { targets: _, ...serverConfig } = server;
|
|
65
|
+
const augmentServer = {};
|
|
66
|
+
if (serverConfig.command) {
|
|
67
|
+
augmentServer.command = serverConfig.command;
|
|
68
|
+
if (serverConfig.args) {
|
|
69
|
+
augmentServer.args = serverConfig.args;
|
|
70
|
+
}
|
|
71
|
+
if (serverConfig.env) {
|
|
72
|
+
augmentServer.env = serverConfig.env;
|
|
73
|
+
}
|
|
74
|
+
} else if (serverConfig.url || serverConfig.httpUrl) {
|
|
75
|
+
const url = serverConfig.httpUrl || serverConfig.url;
|
|
76
|
+
if (url) {
|
|
77
|
+
augmentServer.url = url;
|
|
78
|
+
}
|
|
79
|
+
if (serverConfig.httpUrl || serverConfig.transport === "http") {
|
|
80
|
+
augmentServer.transport = "http";
|
|
81
|
+
} else if (serverConfig.transport === "sse") {
|
|
82
|
+
augmentServer.transport = "sse";
|
|
83
|
+
}
|
|
84
|
+
if (serverConfig.env) {
|
|
85
|
+
augmentServer.headers = serverConfig.env;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (serverConfig.timeout) {
|
|
89
|
+
augmentServer.timeout = serverConfig.timeout;
|
|
90
|
+
}
|
|
91
|
+
if (serverConfig.disabled !== void 0) {
|
|
92
|
+
augmentServer.enabled = !serverConfig.disabled;
|
|
93
|
+
}
|
|
94
|
+
if (serverConfig.networkTimeout && serverConfig.networkTimeout > 0) {
|
|
95
|
+
augmentServer.retries = Math.max(1, Math.floor(serverConfig.networkTimeout / 3e4));
|
|
96
|
+
}
|
|
97
|
+
settings.mcpServers[serverName] = augmentServer;
|
|
98
|
+
}
|
|
99
|
+
return [
|
|
100
|
+
{
|
|
101
|
+
filepath,
|
|
102
|
+
content: `${JSON.stringify(settings, null, 2)}
|
|
103
|
+
`
|
|
104
|
+
}
|
|
105
|
+
];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export {
|
|
109
|
+
generateAugmentcodeMcp,
|
|
110
|
+
generateAugmentcodeMcpConfiguration
|
|
111
|
+
};
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
// src/types/tool-targets.ts
|
|
2
2
|
import { z } from "zod/mini";
|
|
3
|
-
var
|
|
3
|
+
var ALL_TOOL_TARGETS = [
|
|
4
|
+
"augmentcode",
|
|
5
|
+
"augmentcode-legacy",
|
|
4
6
|
"copilot",
|
|
5
7
|
"cursor",
|
|
6
8
|
"cline",
|
|
7
9
|
"claudecode",
|
|
8
10
|
"roo",
|
|
9
11
|
"geminicli",
|
|
10
|
-
"kiro"
|
|
11
|
-
|
|
12
|
+
"kiro",
|
|
13
|
+
"junie"
|
|
14
|
+
];
|
|
15
|
+
var ToolTargetSchema = z.enum(ALL_TOOL_TARGETS);
|
|
12
16
|
var ToolTargetsSchema = z.array(ToolTargetSchema);
|
|
13
17
|
var WildcardTargetSchema = z.tuple([z.literal("*")]);
|
|
14
18
|
var RulesyncTargetsSchema = z.union([ToolTargetsSchema, WildcardTargetSchema]);
|
|
19
|
+
function isToolTarget(target) {
|
|
20
|
+
if (!target) return false;
|
|
21
|
+
return ALL_TOOL_TARGETS.some((validTarget) => validTarget === target);
|
|
22
|
+
}
|
|
15
23
|
|
|
16
24
|
// src/utils/mcp-helpers.ts
|
|
17
25
|
function shouldIncludeServer(server, targetTool) {
|
|
@@ -32,8 +40,10 @@ function shouldIncludeServer(server, targetTool) {
|
|
|
32
40
|
}
|
|
33
41
|
|
|
34
42
|
export {
|
|
43
|
+
ALL_TOOL_TARGETS,
|
|
35
44
|
ToolTargetSchema,
|
|
36
45
|
ToolTargetsSchema,
|
|
37
46
|
RulesyncTargetsSchema,
|
|
47
|
+
isToolTarget,
|
|
38
48
|
shouldIncludeServer
|
|
39
49
|
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
shouldIncludeServer
|
|
3
|
+
} from "./chunk-USKQYIZ2.js";
|
|
4
|
+
|
|
5
|
+
// src/generators/mcp/junie.ts
|
|
6
|
+
function generateJunieMcp(config) {
|
|
7
|
+
const junieConfig = {
|
|
8
|
+
mcpServers: {}
|
|
9
|
+
};
|
|
10
|
+
for (const [serverName, server] of Object.entries(config.mcpServers)) {
|
|
11
|
+
if (!shouldIncludeServer(server, "junie")) continue;
|
|
12
|
+
const junieServer = {
|
|
13
|
+
name: serverName
|
|
14
|
+
};
|
|
15
|
+
if (server.command) {
|
|
16
|
+
junieServer.command = server.command;
|
|
17
|
+
if (server.args) junieServer.args = server.args;
|
|
18
|
+
} else if (server.url || server.httpUrl) {
|
|
19
|
+
if (server.httpUrl) {
|
|
20
|
+
junieServer.httpUrl = server.httpUrl;
|
|
21
|
+
} else if (server.url) {
|
|
22
|
+
junieServer.url = server.url;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (server.env) {
|
|
26
|
+
junieServer.env = server.env;
|
|
27
|
+
}
|
|
28
|
+
if (server.cwd) {
|
|
29
|
+
junieServer.workingDirectory = server.cwd;
|
|
30
|
+
}
|
|
31
|
+
if (server.timeout !== void 0) {
|
|
32
|
+
junieServer.timeout = server.timeout;
|
|
33
|
+
}
|
|
34
|
+
if (server.trust !== void 0) {
|
|
35
|
+
junieServer.trust = server.trust;
|
|
36
|
+
}
|
|
37
|
+
if (server.transport) {
|
|
38
|
+
if (String(server.transport) === "streamable-http") {
|
|
39
|
+
junieServer.transport = "http";
|
|
40
|
+
} else if (server.transport === "stdio" || server.transport === "http" || server.transport === "sse") {
|
|
41
|
+
junieServer.transport = server.transport;
|
|
42
|
+
}
|
|
43
|
+
} else if (server.command) {
|
|
44
|
+
junieServer.transport = "stdio";
|
|
45
|
+
}
|
|
46
|
+
junieConfig.mcpServers[serverName] = junieServer;
|
|
47
|
+
}
|
|
48
|
+
return JSON.stringify(junieConfig, null, 2);
|
|
49
|
+
}
|
|
50
|
+
function generateJunieMcpConfiguration(mcpServers, baseDir = "") {
|
|
51
|
+
const filepath = baseDir ? `${baseDir}/.junie/mcp-config.json` : ".junie/mcp-config.json";
|
|
52
|
+
const config = {
|
|
53
|
+
mcpServers: {}
|
|
54
|
+
};
|
|
55
|
+
for (const [serverName, server] of Object.entries(mcpServers)) {
|
|
56
|
+
if (!shouldIncludeServer(server, "junie")) {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
const { targets: _, transport, cwd, ...serverConfig } = server;
|
|
60
|
+
const junieServer = {
|
|
61
|
+
...serverConfig,
|
|
62
|
+
name: serverName
|
|
63
|
+
};
|
|
64
|
+
if (cwd) {
|
|
65
|
+
junieServer.workingDirectory = cwd;
|
|
66
|
+
}
|
|
67
|
+
if (transport) {
|
|
68
|
+
if (String(transport) === "streamable-http") {
|
|
69
|
+
junieServer.transport = "http";
|
|
70
|
+
} else if (transport === "stdio" || transport === "http" || transport === "sse") {
|
|
71
|
+
junieServer.transport = transport;
|
|
72
|
+
}
|
|
73
|
+
} else if (serverConfig.command) {
|
|
74
|
+
junieServer.transport = "stdio";
|
|
75
|
+
}
|
|
76
|
+
config.mcpServers[serverName] = junieServer;
|
|
77
|
+
}
|
|
78
|
+
return [
|
|
79
|
+
{
|
|
80
|
+
filepath,
|
|
81
|
+
content: `${JSON.stringify(config, null, 2)}
|
|
82
|
+
`
|
|
83
|
+
}
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
generateJunieMcp,
|
|
89
|
+
generateJunieMcpConfiguration
|
|
90
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateGeminiCliMcp,
|
|
3
3
|
generateGeminiCliMcpConfiguration
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-IXCMY24P.js";
|
|
5
|
+
import "./chunk-USKQYIZ2.js";
|
|
6
6
|
export {
|
|
7
7
|
generateGeminiCliMcp,
|
|
8
8
|
generateGeminiCliMcpConfiguration
|