rulesync 0.45.0 → 0.47.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 +62 -2
- package/README.md +62 -2
- package/dist/{chunk-FAZT3ILF.js → chunk-7UVBAWYG.js} +1 -1
- package/dist/{chunk-I5XVU7C6.js → chunk-7ZIUEZZQ.js} +3 -2
- package/dist/{chunk-BD37M3ZH.js → chunk-BY6RI77W.js} +1 -1
- package/dist/chunk-D365OP7N.js +86 -0
- package/dist/{chunk-DCSO5MY7.js → chunk-JWN6GRG6.js} +1 -1
- package/dist/{chunk-PJUNIIF4.js → chunk-L2JTXZZB.js} +1 -1
- package/dist/{chunk-22GWBUIP.js → chunk-OTCCHS7Q.js} +1 -1
- package/dist/{chunk-ZORSPGDD.js → chunk-P6KQZULZ.js} +1 -1
- package/dist/{claudecode-KSK2BEI7.js → claudecode-Y3GIXDUN.js} +2 -2
- package/dist/{cline-T5YVGYBF.js → cline-NS3OPXM2.js} +2 -2
- package/dist/{copilot-UDCWNUAH.js → copilot-QN2SC7Y2.js} +2 -2
- package/dist/{cursor-KPV6OVST.js → cursor-DV2IS7JF.js} +2 -2
- package/dist/{geminicli-2DC5F34J.js → geminicli-MRYTLT2T.js} +2 -2
- package/dist/index.cjs +368 -170
- package/dist/index.js +288 -140
- package/dist/kiro-S5TSM7VW.js +9 -0
- package/dist/{roo-DRA2SU4L.js → roo-NWLD3YYN.js} +2 -2
- package/package.json +4 -3
package/README.ja.md
CHANGED
|
@@ -17,6 +17,7 @@ rulesyncは以下のAI開発ツールの**生成**と**インポート**の両
|
|
|
17
17
|
- **Claude Code Memory** (`./CLAUDE.md` + `.claude/memories/*.md`)
|
|
18
18
|
- **Roo Code Rules** (`.roo/rules/*.md` + `.roo/instructions.md`)
|
|
19
19
|
- **Gemini CLI** (`GEMINI.md` + `.gemini/memories/*.md`)
|
|
20
|
+
- **Kiro IDE カスタムステアリングドキュメント** (`.kiro/steering/*.md`) + **AI除外ファイル** (`.aiignore`)
|
|
20
21
|
|
|
21
22
|
## インストール
|
|
22
23
|
|
|
@@ -100,6 +101,35 @@ AI開発ツールは新しいツールが頻繁に登場し、急速に進化し
|
|
|
100
101
|
### 🎯 **ツール間の一貫性**
|
|
101
102
|
すべてのAIツールに一貫したルールを適用し、チーム全体のコード品質と開発体験を向上させます。
|
|
102
103
|
|
|
104
|
+
## Kiro IDE統合
|
|
105
|
+
|
|
106
|
+
### カスタムステアリングドキュメントとAI除外ファイル
|
|
107
|
+
|
|
108
|
+
rulesyncは、Kiro IDEの組み込みプロジェクト管理システムを補完する**カスタムステアリングドキュメント**と**AI除外ファイル**をサポートしています。
|
|
109
|
+
|
|
110
|
+
**重要**: rulesyncは、Kiro IDE自体が直接管理する方が良いコアステアリングファイル(`product.md`、`structure.md`、`tech.md`)を生成しません。代わりに、rulesyncは追加のカスタムステアリングドキュメントとAI専用除外ファイルの生成に焦点を当てています。
|
|
111
|
+
|
|
112
|
+
### rulesyncがKiroに提供する機能:
|
|
113
|
+
- **カスタムステアリングドキュメント**: `.kiro/steering/`ディレクトリの追加`.md`ファイル
|
|
114
|
+
- **AI除外ファイル**: AIアクセスからファイルを除外する`.aiignore`ファイル
|
|
115
|
+
- **プロジェクト固有のルール**: チームコーディング標準、セキュリティガイドライン、デプロイプロセス
|
|
116
|
+
- **ルール同期**: チームメンバー間でカスタムルールを一貫して保つ
|
|
117
|
+
- **インテリジェントパターン抽出**: ルールglobからAI機密パターンを自動識別
|
|
118
|
+
|
|
119
|
+
### AI除外ファイルの機能:
|
|
120
|
+
- **セキュリティ優先除外**: 機密ファイル(`.pem`、`.key`、`.env*`)を自動除外
|
|
121
|
+
- **データファイル除外**: AIを混乱させる可能性のある大きなデータファイル(`.csv`、`.sqlite`、`.zip`)を除外
|
|
122
|
+
- **機密文書**: 内部文書と機密ディレクトリを除外
|
|
123
|
+
- **パターンベース除外**: ルールglobを分析してAI機密パターンを識別
|
|
124
|
+
- **明示的除外パターン**: ルールコンテンツ内の手動除外パターン(`# IGNORE:`、`# aiignore:`)をサポート
|
|
125
|
+
|
|
126
|
+
### Kiro IDEが直接処理する機能:
|
|
127
|
+
- **コアステアリングファイル**: `product.md`(ユーザー要件)、`structure.md`(アーキテクチャ)、`tech.md`(技術スタック)
|
|
128
|
+
- **仕様管理**: `.kiro/specs/`内のフィーチャー仕様
|
|
129
|
+
- **エージェントフック**: 自動化されたコンテキスト適用
|
|
130
|
+
|
|
131
|
+
この責任分担により、rulesyncはKiroのコア機能を複製することなく、その機能を強化します。
|
|
132
|
+
|
|
103
133
|
## Claude Code統合
|
|
104
134
|
|
|
105
135
|
### カスタムスラッシュコマンドの作成
|
|
@@ -186,6 +216,7 @@ npx rulesync generate --cline
|
|
|
186
216
|
npx rulesync generate --claudecode
|
|
187
217
|
npx rulesync generate --roo
|
|
188
218
|
npx rulesync generate --geminicli
|
|
219
|
+
npx rulesync generate --kiro
|
|
189
220
|
|
|
190
221
|
# クリーンビルド(既存ファイルを最初に削除)
|
|
191
222
|
npx rulesync generate --delete
|
|
@@ -207,7 +238,7 @@ npx rulesync generate --base-dir ./apps/web,./apps/api,./packages/shared
|
|
|
207
238
|
|
|
208
239
|
- `--delete`: 新しいファイルを作成する前に既存の生成済みファイルをすべて削除
|
|
209
240
|
- `--verbose`: 生成プロセス中に詳細出力を表示
|
|
210
|
-
- `--copilot`, `--cursor`, `--cline`, `--claudecode`, `--roo`, `--geminicli`: 指定されたツールのみ生成
|
|
241
|
+
- `--copilot`, `--cursor`, `--cline`, `--claudecode`, `--roo`, `--geminicli`, `--kiro`: 指定されたツールのみ生成
|
|
211
242
|
- `--base-dir <paths>`: 指定されたベースディレクトリに設定ファイルを生成(複数パスの場合はカンマ区切り)。異なるプロジェクトディレクトリにツール固有の設定を生成したいmonorepoセットアップに便利。
|
|
212
243
|
|
|
213
244
|
### 4. 既存設定のインポート
|
|
@@ -330,6 +361,7 @@ draft-*.md
|
|
|
330
361
|
- Roo Code用の`.rooignore`
|
|
331
362
|
- GitHub Copilot用の`.copilotignore`(コミュニティツール用)
|
|
332
363
|
- Gemini CLI用の`.aiexclude`
|
|
364
|
+
- Kiro IDE用の`.aiignore`
|
|
333
365
|
- Claude Code用に`.claude/settings.json`のpermissions.denyに`Read()`ルールを追加
|
|
334
366
|
|
|
335
367
|
### フロントマタースキーマ
|
|
@@ -397,6 +429,7 @@ globs: "**/*.ts,**/*.tsx"
|
|
|
397
429
|
| **Claude Code** | `./CLAUDE.md` (ルート)<br>`.claude/memories/*.md` (非ルート) | プレーンMarkdown | ルートはCLAUDE.mdに移動<br>非ルートは別メモリファイルに移動<br>CLAUDE.mdは`@filename`参照を含む |
|
|
398
430
|
| **Roo Code** | `.roo/rules/*.md` | プレーンMarkdown | 両レベルとも説明ヘッダー付きの同じフォーマットを使用 |
|
|
399
431
|
| **Gemini CLI** | `GEMINI.md` (ルート)<br>`.gemini/memories/*.md` (非ルート) | プレーンMarkdown | ルートはGEMINI.mdに移動<br>非ルートは別メモリファイルに移動<br>GEMINI.mdは`@filename`参照を含む |
|
|
432
|
+
| **Kiro IDE** | `.kiro/steering/*.md` + `.aiignore` | プレーンMarkdown + 除外パターン | カスタムステアリングドキュメントで両レベルとも同じフォーマット使用<br>AI除外ファイルで機密パターンを除外 |
|
|
400
433
|
|
|
401
434
|
## バリデーション
|
|
402
435
|
|
|
@@ -423,6 +456,7 @@ rulesyncは、対応するAIツール用のMCPサーバー設定も管理でき
|
|
|
423
456
|
- **Cursor** (`.cursor/mcp.json`)
|
|
424
457
|
- **Cline** (`.cline/mcp.json`)
|
|
425
458
|
- **Gemini CLI** (`.gemini/settings.json`)
|
|
459
|
+
- **Kiro IDE** (`.kiro/mcp.json`)
|
|
426
460
|
- **Roo Code** (`.roo/mcp.json`)
|
|
427
461
|
|
|
428
462
|
### MCP設定
|
|
@@ -458,6 +492,32 @@ rulesyncは、対応するAIツール用のMCPサーバー設定も管理でき
|
|
|
458
492
|
- すべてのサポートツールにデプロイするには`["*"]`を使用
|
|
459
493
|
- 省略した場合、デフォルトですべてのツールにデプロイ
|
|
460
494
|
|
|
495
|
+
### Kiro IDE固有のMCPフィールド
|
|
496
|
+
|
|
497
|
+
Kiro IDEでは、追加の設定フィールドを使用できます:
|
|
498
|
+
|
|
499
|
+
- **`kiroAutoApprove`**: ユーザープロンプトなしで自動承認するツール名の配列
|
|
500
|
+
- **`kiroAutoBlock`**: 自動的にブロックするツール名の配列
|
|
501
|
+
|
|
502
|
+
Kiro固有フィールドの例:
|
|
503
|
+
```json
|
|
504
|
+
{
|
|
505
|
+
"mcpServers": {
|
|
506
|
+
"aws-tools": {
|
|
507
|
+
"command": "python",
|
|
508
|
+
"args": ["-m", "aws_mcp_server"],
|
|
509
|
+
"env": {
|
|
510
|
+
"AWS_PROFILE": "dev",
|
|
511
|
+
"AWS_REGION": "us-east-1"
|
|
512
|
+
},
|
|
513
|
+
"kiroAutoApprove": ["describe_instances", "list_buckets"],
|
|
514
|
+
"kiroAutoBlock": ["delete_bucket", "terminate_instances"],
|
|
515
|
+
"targets": ["kiro"]
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
```
|
|
520
|
+
|
|
461
521
|
### MCP設定の生成
|
|
462
522
|
|
|
463
523
|
MCP設定はルールファイルと一緒に生成されます:
|
|
@@ -467,7 +527,7 @@ MCP設定はルールファイルと一緒に生成されます:
|
|
|
467
527
|
npx rulesync generate
|
|
468
528
|
|
|
469
529
|
# 特定のツールのみ生成
|
|
470
|
-
npx rulesync generate --claudecode --cursor
|
|
530
|
+
npx rulesync generate --claudecode --cursor --kiro
|
|
471
531
|
|
|
472
532
|
# 特定のディレクトリに生成(monorepo)
|
|
473
533
|
npx rulesync generate --base-dir ./packages/frontend
|
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ rulesync supports both **generation** and **import** for the following AI develo
|
|
|
17
17
|
- **Claude Code Memory** (`./CLAUDE.md` + `.claude/memories/*.md`)
|
|
18
18
|
- **Roo Code Rules** (`.roo/rules/*.md` + `.roo/instructions.md`)
|
|
19
19
|
- **Gemini CLI** (`GEMINI.md` + `.gemini/memories/*.md`)
|
|
20
|
+
- **Kiro IDE Custom Steering Documents** (`.kiro/steering/*.md`) + **AI Ignore Files** (`.aiignore`)
|
|
20
21
|
|
|
21
22
|
## Installation
|
|
22
23
|
|
|
@@ -100,6 +101,35 @@ Avoid vendor lock-in completely. If you decide to stop using rulesync, you can c
|
|
|
100
101
|
### 🎯 **Consistency Across Tools**
|
|
101
102
|
Apply consistent rules across all AI tools, improving code quality and development experience for the entire team.
|
|
102
103
|
|
|
104
|
+
## Kiro IDE Integration
|
|
105
|
+
|
|
106
|
+
### Custom Steering Documents and AI Ignore Files
|
|
107
|
+
|
|
108
|
+
rulesync supports **Custom Steering Documents** and **AI Ignore Files** for Kiro IDE, complementing Kiro's built-in project management system.
|
|
109
|
+
|
|
110
|
+
**Important**: rulesync does NOT generate the core steering files (`product.md`, `structure.md`, `tech.md`) as these are better managed directly by Kiro IDE itself. Instead, rulesync focuses on generating additional custom steering documents and AI-specific ignore files.
|
|
111
|
+
|
|
112
|
+
### What rulesync provides for Kiro:
|
|
113
|
+
- **Custom steering documents**: Additional `.md` files in `.kiro/steering/` directory
|
|
114
|
+
- **AI ignore files**: `.aiignore` file for excluding files from AI access
|
|
115
|
+
- **Project-specific rules**: Team coding standards, security guidelines, deployment processes
|
|
116
|
+
- **Rule synchronization**: Keep custom rules consistent across team members
|
|
117
|
+
- **Intelligent pattern extraction**: Automatically identifies AI-sensitive patterns from rule globs
|
|
118
|
+
|
|
119
|
+
### AI Ignore File Features:
|
|
120
|
+
- **Security-first exclusions**: Automatically excludes sensitive files (`.pem`, `.key`, `.env*`)
|
|
121
|
+
- **Data file exclusions**: Excludes large data files that might confuse AI (`.csv`, `.sqlite`, `.zip`)
|
|
122
|
+
- **Sensitive documentation**: Excludes internal documentation and confidential directories
|
|
123
|
+
- **Pattern-based exclusions**: Analyzes rule globs to identify AI-sensitive patterns
|
|
124
|
+
- **Explicit ignore patterns**: Supports manual ignore patterns in rule content (`# IGNORE:`, `# aiignore:`)
|
|
125
|
+
|
|
126
|
+
### What Kiro IDE handles directly:
|
|
127
|
+
- **Core steering files**: `product.md` (user requirements), `structure.md` (architecture), `tech.md` (tech stack)
|
|
128
|
+
- **Spec management**: Feature specifications in `.kiro/specs/`
|
|
129
|
+
- **Agent hooks**: Automated context application
|
|
130
|
+
|
|
131
|
+
This division of responsibility ensures that rulesync enhances Kiro's capabilities without duplicating its core functionality.
|
|
132
|
+
|
|
103
133
|
## Claude Code Integration
|
|
104
134
|
|
|
105
135
|
### Creating Custom Slash Commands
|
|
@@ -186,6 +216,7 @@ npx rulesync generate --cline
|
|
|
186
216
|
npx rulesync generate --claudecode
|
|
187
217
|
npx rulesync generate --roo
|
|
188
218
|
npx rulesync generate --geminicli
|
|
219
|
+
npx rulesync generate --kiro
|
|
189
220
|
|
|
190
221
|
# Clean build (delete existing files first)
|
|
191
222
|
npx rulesync generate --delete
|
|
@@ -207,7 +238,7 @@ npx rulesync generate --base-dir ./apps/web,./apps/api,./packages/shared
|
|
|
207
238
|
|
|
208
239
|
- `--delete`: Remove all existing generated files before creating new ones
|
|
209
240
|
- `--verbose`: Show detailed output during generation process
|
|
210
|
-
- `--copilot`, `--cursor`, `--cline`, `--claudecode`, `--roo`, `--geminicli`: Generate only for specified tools
|
|
241
|
+
- `--copilot`, `--cursor`, `--cline`, `--claudecode`, `--roo`, `--geminicli`, `--kiro`: Generate only for specified tools
|
|
211
242
|
- `--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.
|
|
212
243
|
|
|
213
244
|
### 4. Import Existing Configurations
|
|
@@ -332,6 +363,7 @@ When `.rulesyncignore` exists, rulesync will:
|
|
|
332
363
|
- `.rooignore` for Roo Code
|
|
333
364
|
- `.copilotignore` for GitHub Copilot (community tools)
|
|
334
365
|
- `.aiexclude` for Gemini CLI
|
|
366
|
+
- `.aiignore` for Kiro IDE
|
|
335
367
|
- Update `.claude/settings.json` permissions.deny with `Read()` rules for Claude Code
|
|
336
368
|
|
|
337
369
|
### Frontmatter Schema
|
|
@@ -399,6 +431,7 @@ globs: "**/*.ts,**/*.tsx"
|
|
|
399
431
|
| **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 |
|
|
400
432
|
| **Roo Code** | `.roo/rules/*.md` | Plain Markdown | Both levels use same format with description header |
|
|
401
433
|
| **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
|
+
| **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 |
|
|
402
435
|
|
|
403
436
|
## Validation
|
|
404
437
|
|
|
@@ -425,6 +458,7 @@ rulesync can also manage MCP server configurations for supported AI tools. This
|
|
|
425
458
|
- **Cursor** (`.cursor/mcp.json`)
|
|
426
459
|
- **Cline** (`.cline/mcp.json`)
|
|
427
460
|
- **Gemini CLI** (`.gemini/settings.json`)
|
|
461
|
+
- **Kiro IDE** (`.kiro/mcp.json`)
|
|
428
462
|
- **Roo Code** (`.roo/mcp.json`)
|
|
429
463
|
|
|
430
464
|
### MCP Configuration
|
|
@@ -460,6 +494,32 @@ Create a `.rulesync/.mcp.json` file in your project:
|
|
|
460
494
|
- Use `["*"]` to deploy to all supported tools
|
|
461
495
|
- If omitted, server is deployed to all tools by default
|
|
462
496
|
|
|
497
|
+
### Kiro IDE-Specific MCP Fields
|
|
498
|
+
|
|
499
|
+
For Kiro IDE, you can use additional configuration fields:
|
|
500
|
+
|
|
501
|
+
- **`kiroAutoApprove`**: Array of tool names to automatically approve without user prompts
|
|
502
|
+
- **`kiroAutoBlock`**: Array of tool names to automatically block
|
|
503
|
+
|
|
504
|
+
Example with Kiro-specific fields:
|
|
505
|
+
```json
|
|
506
|
+
{
|
|
507
|
+
"mcpServers": {
|
|
508
|
+
"aws-tools": {
|
|
509
|
+
"command": "python",
|
|
510
|
+
"args": ["-m", "aws_mcp_server"],
|
|
511
|
+
"env": {
|
|
512
|
+
"AWS_PROFILE": "dev",
|
|
513
|
+
"AWS_REGION": "us-east-1"
|
|
514
|
+
},
|
|
515
|
+
"kiroAutoApprove": ["describe_instances", "list_buckets"],
|
|
516
|
+
"kiroAutoBlock": ["delete_bucket", "terminate_instances"],
|
|
517
|
+
"targets": ["kiro"]
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
```
|
|
522
|
+
|
|
463
523
|
### Generating MCP Configurations
|
|
464
524
|
|
|
465
525
|
MCP configurations are generated alongside rule files:
|
|
@@ -469,7 +529,7 @@ MCP configurations are generated alongside rule files:
|
|
|
469
529
|
npx rulesync generate
|
|
470
530
|
|
|
471
531
|
# Generate only for specific tools
|
|
472
|
-
npx rulesync generate --claudecode --cursor
|
|
532
|
+
npx rulesync generate --claudecode --cursor --kiro
|
|
473
533
|
|
|
474
534
|
# Generate in specific directories (monorepo)
|
|
475
535
|
npx rulesync generate --base-dir ./packages/frontend
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// src/types/tool-targets.ts
|
|
2
|
-
import { z } from "zod/
|
|
2
|
+
import { z } from "zod/mini";
|
|
3
3
|
var ToolTargetSchema = z.enum([
|
|
4
4
|
"copilot",
|
|
5
5
|
"cursor",
|
|
6
6
|
"cline",
|
|
7
7
|
"claudecode",
|
|
8
8
|
"roo",
|
|
9
|
-
"geminicli"
|
|
9
|
+
"geminicli",
|
|
10
|
+
"kiro"
|
|
10
11
|
]);
|
|
11
12
|
var ToolTargetsSchema = z.array(ToolTargetSchema);
|
|
12
13
|
var WildcardTargetSchema = z.tuple([z.literal("*")]);
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import {
|
|
2
|
+
shouldIncludeServer
|
|
3
|
+
} from "./chunk-7ZIUEZZQ.js";
|
|
4
|
+
|
|
5
|
+
// src/generators/mcp/kiro.ts
|
|
6
|
+
function generateKiroMcp(config) {
|
|
7
|
+
const kiroConfig = {
|
|
8
|
+
mcpServers: {}
|
|
9
|
+
};
|
|
10
|
+
for (const [serverName, server] of Object.entries(config.mcpServers)) {
|
|
11
|
+
if (!shouldIncludeServer(server, "kiro")) continue;
|
|
12
|
+
const kiroServer = {};
|
|
13
|
+
if (server.command) {
|
|
14
|
+
kiroServer.command = server.command;
|
|
15
|
+
if (server.args) kiroServer.args = server.args;
|
|
16
|
+
} else if (server.url || server.httpUrl) {
|
|
17
|
+
const url = server.httpUrl || server.url;
|
|
18
|
+
if (url) {
|
|
19
|
+
kiroServer.url = url;
|
|
20
|
+
}
|
|
21
|
+
if (server.httpUrl || server.transport === "http") {
|
|
22
|
+
kiroServer.transport = "streamable-http";
|
|
23
|
+
} else if (server.transport === "sse" || server.type === "sse") {
|
|
24
|
+
kiroServer.transport = "sse";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (server.env) {
|
|
28
|
+
kiroServer.env = server.env;
|
|
29
|
+
}
|
|
30
|
+
if (server.timeout) {
|
|
31
|
+
kiroServer.timeout = server.timeout;
|
|
32
|
+
}
|
|
33
|
+
if (server.disabled !== void 0) {
|
|
34
|
+
kiroServer.disabled = server.disabled;
|
|
35
|
+
}
|
|
36
|
+
if (server.transport) {
|
|
37
|
+
kiroServer.transport = server.transport;
|
|
38
|
+
}
|
|
39
|
+
if (server.kiroAutoApprove) {
|
|
40
|
+
kiroServer.autoApprove = server.kiroAutoApprove;
|
|
41
|
+
}
|
|
42
|
+
if (server.kiroAutoBlock) {
|
|
43
|
+
kiroServer.autoBlock = server.kiroAutoBlock;
|
|
44
|
+
}
|
|
45
|
+
kiroConfig.mcpServers[serverName] = kiroServer;
|
|
46
|
+
}
|
|
47
|
+
return JSON.stringify(kiroConfig, null, 2);
|
|
48
|
+
}
|
|
49
|
+
function generateKiroMcpConfiguration(mcpServers, baseDir = "") {
|
|
50
|
+
const filepath = baseDir ? `${baseDir}/.kiro/mcp.json` : ".kiro/mcp.json";
|
|
51
|
+
const config = {
|
|
52
|
+
mcpServers: {}
|
|
53
|
+
};
|
|
54
|
+
for (const [serverName, server] of Object.entries(mcpServers)) {
|
|
55
|
+
if (!shouldIncludeServer(server, "kiro")) {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const { targets: _targets, ...serverConfig } = server;
|
|
59
|
+
const kiroServer = { ...serverConfig };
|
|
60
|
+
if (serverConfig.httpUrl !== void 0) {
|
|
61
|
+
kiroServer.url = serverConfig.httpUrl;
|
|
62
|
+
delete kiroServer.httpUrl;
|
|
63
|
+
}
|
|
64
|
+
if (serverConfig.kiroAutoApprove !== void 0) {
|
|
65
|
+
kiroServer.autoApprove = serverConfig.kiroAutoApprove;
|
|
66
|
+
delete kiroServer.kiroAutoApprove;
|
|
67
|
+
}
|
|
68
|
+
if (serverConfig.kiroAutoBlock !== void 0) {
|
|
69
|
+
kiroServer.autoBlock = serverConfig.kiroAutoBlock;
|
|
70
|
+
delete kiroServer.kiroAutoBlock;
|
|
71
|
+
}
|
|
72
|
+
config.mcpServers[serverName] = kiroServer;
|
|
73
|
+
}
|
|
74
|
+
return [
|
|
75
|
+
{
|
|
76
|
+
filepath,
|
|
77
|
+
content: `${JSON.stringify(config, null, 2)}
|
|
78
|
+
`
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
generateKiroMcp,
|
|
85
|
+
generateKiroMcpConfiguration
|
|
86
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateGeminiCliMcp,
|
|
3
3
|
generateGeminiCliMcpConfiguration
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-JWN6GRG6.js";
|
|
5
|
+
import "./chunk-7ZIUEZZQ.js";
|
|
6
6
|
export {
|
|
7
7
|
generateGeminiCliMcp,
|
|
8
8
|
generateGeminiCliMcpConfiguration
|