rulesync 3.10.0 → 3.11.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.md +1 -1
- package/dist/index.cjs +48 -12
- package/dist/index.js +48 -12
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -240,7 +240,7 @@ Based on the user's instruction, create a plan while analyzing the related files
|
|
|
240
240
|
Attention, again, you are just the planner, so though you can read any files and run any commands for analysis, please don't write any code.
|
|
241
241
|
```
|
|
242
242
|
|
|
243
|
-
### `.rulesync
|
|
243
|
+
### `.rulesync/mcp.json`
|
|
244
244
|
|
|
245
245
|
Example:
|
|
246
246
|
|
package/dist/index.cjs
CHANGED
|
@@ -2722,21 +2722,54 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
|
|
|
2722
2722
|
}
|
|
2723
2723
|
static getSettablePaths() {
|
|
2724
2724
|
return {
|
|
2725
|
-
|
|
2726
|
-
|
|
2725
|
+
recommended: {
|
|
2726
|
+
relativeDirPath: ".rulesync",
|
|
2727
|
+
relativeFilePath: "mcp.json"
|
|
2728
|
+
},
|
|
2729
|
+
legacy: {
|
|
2730
|
+
relativeDirPath: ".rulesync",
|
|
2731
|
+
relativeFilePath: ".mcp.json"
|
|
2732
|
+
}
|
|
2727
2733
|
};
|
|
2728
2734
|
}
|
|
2729
2735
|
validate() {
|
|
2730
2736
|
return { success: true, error: null };
|
|
2731
2737
|
}
|
|
2732
2738
|
static async fromFile({ validate = true }) {
|
|
2733
|
-
const
|
|
2734
|
-
|
|
2739
|
+
const paths = this.getSettablePaths();
|
|
2740
|
+
const recommendedPath = (0, import_node_path25.join)(
|
|
2741
|
+
paths.recommended.relativeDirPath,
|
|
2742
|
+
paths.recommended.relativeFilePath
|
|
2735
2743
|
);
|
|
2744
|
+
const legacyPath = (0, import_node_path25.join)(paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
|
|
2745
|
+
if (await fileExists(recommendedPath)) {
|
|
2746
|
+
const fileContent2 = await readFileContent(recommendedPath);
|
|
2747
|
+
return new _RulesyncMcp({
|
|
2748
|
+
baseDir: ".",
|
|
2749
|
+
relativeDirPath: paths.recommended.relativeDirPath,
|
|
2750
|
+
relativeFilePath: paths.recommended.relativeFilePath,
|
|
2751
|
+
fileContent: fileContent2,
|
|
2752
|
+
validate
|
|
2753
|
+
});
|
|
2754
|
+
}
|
|
2755
|
+
if (await fileExists(legacyPath)) {
|
|
2756
|
+
logger.warn(
|
|
2757
|
+
`\u26A0\uFE0F Using deprecated path "${legacyPath}". Please migrate to "${recommendedPath}"`
|
|
2758
|
+
);
|
|
2759
|
+
const fileContent2 = await readFileContent(legacyPath);
|
|
2760
|
+
return new _RulesyncMcp({
|
|
2761
|
+
baseDir: ".",
|
|
2762
|
+
relativeDirPath: paths.legacy.relativeDirPath,
|
|
2763
|
+
relativeFilePath: paths.legacy.relativeFilePath,
|
|
2764
|
+
fileContent: fileContent2,
|
|
2765
|
+
validate
|
|
2766
|
+
});
|
|
2767
|
+
}
|
|
2768
|
+
const fileContent = await readFileContent(recommendedPath);
|
|
2736
2769
|
return new _RulesyncMcp({
|
|
2737
2770
|
baseDir: ".",
|
|
2738
|
-
relativeDirPath:
|
|
2739
|
-
relativeFilePath:
|
|
2771
|
+
relativeDirPath: paths.recommended.relativeDirPath,
|
|
2772
|
+
relativeFilePath: paths.recommended.relativeFilePath,
|
|
2740
2773
|
fileContent,
|
|
2741
2774
|
validate
|
|
2742
2775
|
});
|
|
@@ -3471,7 +3504,7 @@ var McpProcessor = class extends FeatureProcessor {
|
|
|
3471
3504
|
(file) => file instanceof RulesyncMcp
|
|
3472
3505
|
);
|
|
3473
3506
|
if (!rulesyncMcp) {
|
|
3474
|
-
throw new Error(`No .rulesync
|
|
3507
|
+
throw new Error(`No .rulesync/mcp.json found.`);
|
|
3475
3508
|
}
|
|
3476
3509
|
const toolMcps = await Promise.all(
|
|
3477
3510
|
[rulesyncMcp].map(async (rulesyncMcp2) => {
|
|
@@ -7262,7 +7295,7 @@ async function initCommand() {
|
|
|
7262
7295
|
await createConfigFile();
|
|
7263
7296
|
logger.success("rulesync initialized successfully!");
|
|
7264
7297
|
logger.info("Next steps:");
|
|
7265
|
-
logger.info(`1. Edit .rulesync/**/*.md, .rulesync
|
|
7298
|
+
logger.info(`1. Edit .rulesync/**/*.md, .rulesync/mcp.json and .rulesyncignore`);
|
|
7266
7299
|
logger.info("2. Run 'rulesync generate' to create configuration files");
|
|
7267
7300
|
}
|
|
7268
7301
|
async function createConfigFile() {
|
|
@@ -7326,7 +7359,7 @@ globs: ["**/*"]
|
|
|
7326
7359
|
`
|
|
7327
7360
|
};
|
|
7328
7361
|
const sampleMcpFile = {
|
|
7329
|
-
filename: "
|
|
7362
|
+
filename: "mcp.json",
|
|
7330
7363
|
content: `{
|
|
7331
7364
|
"mcpServers": {
|
|
7332
7365
|
"serena": {
|
|
@@ -7410,7 +7443,7 @@ Attention, again, you are just the planner, so though you can read any files and
|
|
|
7410
7443
|
const subagentPaths = RulesyncSubagent.getSettablePaths();
|
|
7411
7444
|
const ignorePaths = RulesyncIgnore.getSettablePaths();
|
|
7412
7445
|
await ensureDir(rulePaths.recommended.relativeDirPath);
|
|
7413
|
-
await ensureDir(mcpPaths.relativeDirPath);
|
|
7446
|
+
await ensureDir(mcpPaths.recommended.relativeDirPath);
|
|
7414
7447
|
await ensureDir(commandPaths.relativeDirPath);
|
|
7415
7448
|
await ensureDir(subagentPaths.relativeDirPath);
|
|
7416
7449
|
await ensureDir(ignorePaths.relativeDirPath);
|
|
@@ -7421,7 +7454,10 @@ Attention, again, you are just the planner, so though you can read any files and
|
|
|
7421
7454
|
} else {
|
|
7422
7455
|
logger.info(`Skipped ${ruleFilepath} (already exists)`);
|
|
7423
7456
|
}
|
|
7424
|
-
const mcpFilepath = (0, import_node_path59.join)(
|
|
7457
|
+
const mcpFilepath = (0, import_node_path59.join)(
|
|
7458
|
+
mcpPaths.recommended.relativeDirPath,
|
|
7459
|
+
mcpPaths.recommended.relativeFilePath
|
|
7460
|
+
);
|
|
7425
7461
|
if (!await fileExists(mcpFilepath)) {
|
|
7426
7462
|
await writeFileContent(mcpFilepath, sampleMcpFile.content);
|
|
7427
7463
|
logger.success(`Created ${mcpFilepath}`);
|
|
@@ -7452,7 +7488,7 @@ Attention, again, you are just the planner, so though you can read any files and
|
|
|
7452
7488
|
}
|
|
7453
7489
|
|
|
7454
7490
|
// src/cli/index.ts
|
|
7455
|
-
var getVersion = () => "3.
|
|
7491
|
+
var getVersion = () => "3.11.0";
|
|
7456
7492
|
var main = async () => {
|
|
7457
7493
|
const program = new import_commander.Command();
|
|
7458
7494
|
const version = getVersion();
|
package/dist/index.js
CHANGED
|
@@ -2699,21 +2699,54 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
|
|
|
2699
2699
|
}
|
|
2700
2700
|
static getSettablePaths() {
|
|
2701
2701
|
return {
|
|
2702
|
-
|
|
2703
|
-
|
|
2702
|
+
recommended: {
|
|
2703
|
+
relativeDirPath: ".rulesync",
|
|
2704
|
+
relativeFilePath: "mcp.json"
|
|
2705
|
+
},
|
|
2706
|
+
legacy: {
|
|
2707
|
+
relativeDirPath: ".rulesync",
|
|
2708
|
+
relativeFilePath: ".mcp.json"
|
|
2709
|
+
}
|
|
2704
2710
|
};
|
|
2705
2711
|
}
|
|
2706
2712
|
validate() {
|
|
2707
2713
|
return { success: true, error: null };
|
|
2708
2714
|
}
|
|
2709
2715
|
static async fromFile({ validate = true }) {
|
|
2710
|
-
const
|
|
2711
|
-
|
|
2716
|
+
const paths = this.getSettablePaths();
|
|
2717
|
+
const recommendedPath = join24(
|
|
2718
|
+
paths.recommended.relativeDirPath,
|
|
2719
|
+
paths.recommended.relativeFilePath
|
|
2712
2720
|
);
|
|
2721
|
+
const legacyPath = join24(paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
|
|
2722
|
+
if (await fileExists(recommendedPath)) {
|
|
2723
|
+
const fileContent2 = await readFileContent(recommendedPath);
|
|
2724
|
+
return new _RulesyncMcp({
|
|
2725
|
+
baseDir: ".",
|
|
2726
|
+
relativeDirPath: paths.recommended.relativeDirPath,
|
|
2727
|
+
relativeFilePath: paths.recommended.relativeFilePath,
|
|
2728
|
+
fileContent: fileContent2,
|
|
2729
|
+
validate
|
|
2730
|
+
});
|
|
2731
|
+
}
|
|
2732
|
+
if (await fileExists(legacyPath)) {
|
|
2733
|
+
logger.warn(
|
|
2734
|
+
`\u26A0\uFE0F Using deprecated path "${legacyPath}". Please migrate to "${recommendedPath}"`
|
|
2735
|
+
);
|
|
2736
|
+
const fileContent2 = await readFileContent(legacyPath);
|
|
2737
|
+
return new _RulesyncMcp({
|
|
2738
|
+
baseDir: ".",
|
|
2739
|
+
relativeDirPath: paths.legacy.relativeDirPath,
|
|
2740
|
+
relativeFilePath: paths.legacy.relativeFilePath,
|
|
2741
|
+
fileContent: fileContent2,
|
|
2742
|
+
validate
|
|
2743
|
+
});
|
|
2744
|
+
}
|
|
2745
|
+
const fileContent = await readFileContent(recommendedPath);
|
|
2713
2746
|
return new _RulesyncMcp({
|
|
2714
2747
|
baseDir: ".",
|
|
2715
|
-
relativeDirPath:
|
|
2716
|
-
relativeFilePath:
|
|
2748
|
+
relativeDirPath: paths.recommended.relativeDirPath,
|
|
2749
|
+
relativeFilePath: paths.recommended.relativeFilePath,
|
|
2717
2750
|
fileContent,
|
|
2718
2751
|
validate
|
|
2719
2752
|
});
|
|
@@ -3448,7 +3481,7 @@ var McpProcessor = class extends FeatureProcessor {
|
|
|
3448
3481
|
(file) => file instanceof RulesyncMcp
|
|
3449
3482
|
);
|
|
3450
3483
|
if (!rulesyncMcp) {
|
|
3451
|
-
throw new Error(`No .rulesync
|
|
3484
|
+
throw new Error(`No .rulesync/mcp.json found.`);
|
|
3452
3485
|
}
|
|
3453
3486
|
const toolMcps = await Promise.all(
|
|
3454
3487
|
[rulesyncMcp].map(async (rulesyncMcp2) => {
|
|
@@ -7239,7 +7272,7 @@ async function initCommand() {
|
|
|
7239
7272
|
await createConfigFile();
|
|
7240
7273
|
logger.success("rulesync initialized successfully!");
|
|
7241
7274
|
logger.info("Next steps:");
|
|
7242
|
-
logger.info(`1. Edit .rulesync/**/*.md, .rulesync
|
|
7275
|
+
logger.info(`1. Edit .rulesync/**/*.md, .rulesync/mcp.json and .rulesyncignore`);
|
|
7243
7276
|
logger.info("2. Run 'rulesync generate' to create configuration files");
|
|
7244
7277
|
}
|
|
7245
7278
|
async function createConfigFile() {
|
|
@@ -7303,7 +7336,7 @@ globs: ["**/*"]
|
|
|
7303
7336
|
`
|
|
7304
7337
|
};
|
|
7305
7338
|
const sampleMcpFile = {
|
|
7306
|
-
filename: "
|
|
7339
|
+
filename: "mcp.json",
|
|
7307
7340
|
content: `{
|
|
7308
7341
|
"mcpServers": {
|
|
7309
7342
|
"serena": {
|
|
@@ -7387,7 +7420,7 @@ Attention, again, you are just the planner, so though you can read any files and
|
|
|
7387
7420
|
const subagentPaths = RulesyncSubagent.getSettablePaths();
|
|
7388
7421
|
const ignorePaths = RulesyncIgnore.getSettablePaths();
|
|
7389
7422
|
await ensureDir(rulePaths.recommended.relativeDirPath);
|
|
7390
|
-
await ensureDir(mcpPaths.relativeDirPath);
|
|
7423
|
+
await ensureDir(mcpPaths.recommended.relativeDirPath);
|
|
7391
7424
|
await ensureDir(commandPaths.relativeDirPath);
|
|
7392
7425
|
await ensureDir(subagentPaths.relativeDirPath);
|
|
7393
7426
|
await ensureDir(ignorePaths.relativeDirPath);
|
|
@@ -7398,7 +7431,10 @@ Attention, again, you are just the planner, so though you can read any files and
|
|
|
7398
7431
|
} else {
|
|
7399
7432
|
logger.info(`Skipped ${ruleFilepath} (already exists)`);
|
|
7400
7433
|
}
|
|
7401
|
-
const mcpFilepath = join58(
|
|
7434
|
+
const mcpFilepath = join58(
|
|
7435
|
+
mcpPaths.recommended.relativeDirPath,
|
|
7436
|
+
mcpPaths.recommended.relativeFilePath
|
|
7437
|
+
);
|
|
7402
7438
|
if (!await fileExists(mcpFilepath)) {
|
|
7403
7439
|
await writeFileContent(mcpFilepath, sampleMcpFile.content);
|
|
7404
7440
|
logger.success(`Created ${mcpFilepath}`);
|
|
@@ -7429,7 +7465,7 @@ Attention, again, you are just the planner, so though you can read any files and
|
|
|
7429
7465
|
}
|
|
7430
7466
|
|
|
7431
7467
|
// src/cli/index.ts
|
|
7432
|
-
var getVersion = () => "3.
|
|
7468
|
+
var getVersion = () => "3.11.0";
|
|
7433
7469
|
var main = async () => {
|
|
7434
7470
|
const program = new Command();
|
|
7435
7471
|
const version = getVersion();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rulesync",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"description": "Unified AI rules management CLI tool that generates configuration files for various AI development tools",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"zod": "4.1.12"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@anthropic-ai/claude-agent-sdk": "0.1.
|
|
52
|
+
"@anthropic-ai/claude-agent-sdk": "0.1.23",
|
|
53
53
|
"@biomejs/biome": "2.2.6",
|
|
54
54
|
"@eslint/js": "9.38.0",
|
|
55
55
|
"@secretlint/secretlint-rule-preset-recommend": "11.2.5",
|
|
56
56
|
"@tsconfig/node24": "24.0.1",
|
|
57
57
|
"@types/js-yaml": "4.0.9",
|
|
58
58
|
"@types/micromatch": "4.0.9",
|
|
59
|
-
"@types/node": "24.
|
|
59
|
+
"@types/node": "24.9.1",
|
|
60
60
|
"@typescript/native-preview": "7.0.0-dev.20251019.1",
|
|
61
61
|
"@vitest/coverage-v8": "3.2.4",
|
|
62
62
|
"cspell": "9.2.1",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"eslint-plugin-oxlint": "1.23.0",
|
|
67
67
|
"eslint-plugin-strict-dependencies": "1.3.27",
|
|
68
68
|
"eslint-plugin-zod-import": "0.3.0",
|
|
69
|
-
"knip": "5.66.
|
|
70
|
-
"lint-staged": "16.2.
|
|
69
|
+
"knip": "5.66.2",
|
|
70
|
+
"lint-staged": "16.2.5",
|
|
71
71
|
"o3-search-mcp": "0.0.9",
|
|
72
72
|
"oxlint": "1.23.0",
|
|
73
73
|
"secretlint": "11.2.5",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"tsup": "8.5.0",
|
|
77
77
|
"tsx": "4.20.6",
|
|
78
78
|
"typescript": "5.9.3",
|
|
79
|
-
"typescript-eslint": "8.46.
|
|
79
|
+
"typescript-eslint": "8.46.2",
|
|
80
80
|
"vitest": "3.2.4"
|
|
81
81
|
},
|
|
82
82
|
"engines": {
|