rulesync 9.6.0 → 9.6.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/dist/cli/index.cjs +27 -19
- package/dist/cli/index.js +27 -19
- package/dist/cli/index.js.map +1 -1
- package/dist/{import-CiS5ckUo.cjs → import-DW-a1SJq.cjs} +277 -173
- package/dist/{import-B6nwZmGl.js → import-tTMN0WRi.js} +278 -174
- package/dist/{import-B6nwZmGl.js.map → import-tTMN0WRi.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +13 -35
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +13 -35
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +17 -17
|
@@ -1319,7 +1319,8 @@ var ConfigResolver = class {
|
|
|
1319
1319
|
const validatedConfigPath = resolvePath(configPath, (0, node_path.resolve)(inputRoot ?? cwd));
|
|
1320
1320
|
const baseConfig = await loadConfigFromFile(validatedConfigPath);
|
|
1321
1321
|
const localConfigPath = (0, node_path.join)((0, node_path.dirname)(validatedConfigPath), RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH);
|
|
1322
|
-
const
|
|
1322
|
+
const localConfig = await loadConfigFromFile(localConfigPath);
|
|
1323
|
+
const configByFile = mergeConfigs(baseConfig, localConfig);
|
|
1323
1324
|
if (inputRoot === void 0 && configByFile.inputRoot !== void 0) validateOutputRoot(configByFile.inputRoot);
|
|
1324
1325
|
assertMergedTargetsFeaturesExclusive({
|
|
1325
1326
|
configByFile,
|
|
@@ -2407,14 +2408,17 @@ var AugmentcodeCommand = class AugmentcodeCommand extends ToolCommand {
|
|
|
2407
2408
|
static fromRulesyncCommand({ outputRoot = process.cwd(), rulesyncCommand, validate = true, global = false }) {
|
|
2408
2409
|
const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
|
|
2409
2410
|
const augmentcodeFields = rulesyncFrontmatter.augmentcode ?? {};
|
|
2411
|
+
const augmentcodeFrontmatter = {
|
|
2412
|
+
description: rulesyncFrontmatter.description,
|
|
2413
|
+
...augmentcodeFields
|
|
2414
|
+
};
|
|
2415
|
+
const body = rulesyncCommand.getBody();
|
|
2416
|
+
const paths = this.getSettablePaths({ global });
|
|
2410
2417
|
return new AugmentcodeCommand({
|
|
2411
2418
|
outputRoot,
|
|
2412
|
-
frontmatter:
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
},
|
|
2416
|
-
body: rulesyncCommand.getBody(),
|
|
2417
|
-
relativeDirPath: this.getSettablePaths({ global }).relativeDirPath,
|
|
2419
|
+
frontmatter: augmentcodeFrontmatter,
|
|
2420
|
+
body,
|
|
2421
|
+
relativeDirPath: paths.relativeDirPath,
|
|
2418
2422
|
relativeFilePath: rulesyncCommand.getRelativeFilePath(),
|
|
2419
2423
|
validate
|
|
2420
2424
|
});
|
|
@@ -2548,14 +2552,17 @@ var ClaudecodeCommand = class ClaudecodeCommand extends ToolCommand {
|
|
|
2548
2552
|
static fromRulesyncCommand({ outputRoot = process.cwd(), rulesyncCommand, validate = true, global = false }) {
|
|
2549
2553
|
const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
|
|
2550
2554
|
const claudecodeFields = rulesyncFrontmatter.claudecode ?? {};
|
|
2555
|
+
const claudecodeFrontmatter = {
|
|
2556
|
+
description: rulesyncFrontmatter.description,
|
|
2557
|
+
...claudecodeFields
|
|
2558
|
+
};
|
|
2559
|
+
const body = rulesyncCommand.getBody();
|
|
2560
|
+
const paths = this.getSettablePaths({ global });
|
|
2551
2561
|
return new ClaudecodeCommand({
|
|
2552
2562
|
outputRoot,
|
|
2553
|
-
frontmatter:
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
},
|
|
2557
|
-
body: rulesyncCommand.getBody(),
|
|
2558
|
-
relativeDirPath: this.getSettablePaths({ global }).relativeDirPath,
|
|
2563
|
+
frontmatter: claudecodeFrontmatter,
|
|
2564
|
+
body,
|
|
2565
|
+
relativeDirPath: paths.relativeDirPath,
|
|
2559
2566
|
relativeFilePath: rulesyncCommand.getRelativeFilePath(),
|
|
2560
2567
|
validate
|
|
2561
2568
|
});
|
|
@@ -2756,12 +2763,13 @@ var CodexcliCommand = class CodexcliCommand extends ToolCommand {
|
|
|
2756
2763
|
const paths = this.getSettablePaths({ global });
|
|
2757
2764
|
const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
|
|
2758
2765
|
const codexcliFields = rulesyncFrontmatter.codexcli ?? {};
|
|
2766
|
+
const codexcliFrontmatter = {
|
|
2767
|
+
...rulesyncFrontmatter.description !== void 0 && { description: rulesyncFrontmatter.description },
|
|
2768
|
+
...codexcliFields
|
|
2769
|
+
};
|
|
2759
2770
|
return new CodexcliCommand({
|
|
2760
2771
|
outputRoot,
|
|
2761
|
-
frontmatter:
|
|
2762
|
-
...rulesyncFrontmatter.description !== void 0 && { description: rulesyncFrontmatter.description },
|
|
2763
|
-
...codexcliFields
|
|
2764
|
-
},
|
|
2772
|
+
frontmatter: codexcliFrontmatter,
|
|
2765
2773
|
body: rulesyncCommand.getBody(),
|
|
2766
2774
|
relativeDirPath: paths.relativeDirPath,
|
|
2767
2775
|
relativeFilePath: rulesyncCommand.getRelativeFilePath(),
|
|
@@ -3023,14 +3031,17 @@ var CursorCommand = class CursorCommand extends ToolCommand {
|
|
|
3023
3031
|
static fromRulesyncCommand({ outputRoot = process.cwd(), rulesyncCommand, validate = true, global = false }) {
|
|
3024
3032
|
const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
|
|
3025
3033
|
const cursorFields = rulesyncFrontmatter.cursor ?? {};
|
|
3034
|
+
const cursorFrontmatter = {
|
|
3035
|
+
...rulesyncFrontmatter.description && { description: rulesyncFrontmatter.description },
|
|
3036
|
+
...cursorFields
|
|
3037
|
+
};
|
|
3038
|
+
const body = rulesyncCommand.getBody();
|
|
3039
|
+
const paths = this.getSettablePaths({ global });
|
|
3026
3040
|
return new CursorCommand({
|
|
3027
3041
|
outputRoot,
|
|
3028
|
-
frontmatter:
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
},
|
|
3032
|
-
body: rulesyncCommand.getBody(),
|
|
3033
|
-
relativeDirPath: this.getSettablePaths({ global }).relativeDirPath,
|
|
3042
|
+
frontmatter: cursorFrontmatter,
|
|
3043
|
+
body,
|
|
3044
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3034
3045
|
relativeFilePath: rulesyncCommand.getRelativeFilePath(),
|
|
3035
3046
|
validate
|
|
3036
3047
|
});
|
|
@@ -3154,14 +3165,17 @@ var DevinCommand = class DevinCommand extends ToolCommand {
|
|
|
3154
3165
|
static fromRulesyncCommand({ outputRoot = process.cwd(), rulesyncCommand, validate = true, global = false }) {
|
|
3155
3166
|
const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
|
|
3156
3167
|
const devinFields = rulesyncFrontmatter.devin ?? {};
|
|
3168
|
+
const devinFrontmatter = {
|
|
3169
|
+
description: rulesyncFrontmatter.description,
|
|
3170
|
+
...devinFields
|
|
3171
|
+
};
|
|
3172
|
+
const body = rulesyncCommand.getBody();
|
|
3173
|
+
const paths = this.getSettablePaths({ global });
|
|
3157
3174
|
return new DevinCommand({
|
|
3158
3175
|
outputRoot,
|
|
3159
|
-
frontmatter:
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
},
|
|
3163
|
-
body: rulesyncCommand.getBody(),
|
|
3164
|
-
relativeDirPath: this.getSettablePaths({ global }).relativeDirPath,
|
|
3176
|
+
frontmatter: devinFrontmatter,
|
|
3177
|
+
body,
|
|
3178
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3165
3179
|
relativeFilePath: rulesyncCommand.getRelativeFilePath(),
|
|
3166
3180
|
validate
|
|
3167
3181
|
});
|
|
@@ -3275,14 +3289,17 @@ var FactorydroidCommand = class FactorydroidCommand extends ToolCommand {
|
|
|
3275
3289
|
static fromRulesyncCommand({ outputRoot = process.cwd(), rulesyncCommand, validate = true, global = false }) {
|
|
3276
3290
|
const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
|
|
3277
3291
|
const factorydroidFields = rulesyncFrontmatter.factorydroid ?? {};
|
|
3292
|
+
const factorydroidFrontmatter = {
|
|
3293
|
+
description: rulesyncFrontmatter.description,
|
|
3294
|
+
...factorydroidFields
|
|
3295
|
+
};
|
|
3296
|
+
const body = rulesyncCommand.getBody();
|
|
3297
|
+
const paths = this.getSettablePaths({ global });
|
|
3278
3298
|
return new FactorydroidCommand({
|
|
3279
3299
|
outputRoot,
|
|
3280
|
-
frontmatter:
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
},
|
|
3284
|
-
body: rulesyncCommand.getBody(),
|
|
3285
|
-
relativeDirPath: this.getSettablePaths({ global }).relativeDirPath,
|
|
3300
|
+
frontmatter: factorydroidFrontmatter,
|
|
3301
|
+
body,
|
|
3302
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3286
3303
|
relativeFilePath: rulesyncCommand.getRelativeFilePath(),
|
|
3287
3304
|
validate
|
|
3288
3305
|
});
|
|
@@ -3443,9 +3460,10 @@ var GooseCommand = class GooseCommand extends ToolCommand {
|
|
|
3443
3460
|
prompt,
|
|
3444
3461
|
...extraFields
|
|
3445
3462
|
};
|
|
3463
|
+
const paths = this.getSettablePaths({ global });
|
|
3446
3464
|
return new GooseCommand({
|
|
3447
3465
|
outputRoot,
|
|
3448
|
-
relativeDirPath:
|
|
3466
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3449
3467
|
relativeFilePath,
|
|
3450
3468
|
fileContent: (0, js_yaml.dump)(recipe, {
|
|
3451
3469
|
lineWidth: -1,
|
|
@@ -3486,19 +3504,20 @@ var GooseCommand = class GooseCommand extends ToolCommand {
|
|
|
3486
3504
|
});
|
|
3487
3505
|
}
|
|
3488
3506
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath }) {
|
|
3507
|
+
const placeholder = (0, js_yaml.dump)({
|
|
3508
|
+
version: RECIPE_VERSION$1,
|
|
3509
|
+
title: "",
|
|
3510
|
+
description: "",
|
|
3511
|
+
prompt: ""
|
|
3512
|
+
}, {
|
|
3513
|
+
lineWidth: -1,
|
|
3514
|
+
noRefs: true
|
|
3515
|
+
});
|
|
3489
3516
|
return new GooseCommand({
|
|
3490
3517
|
outputRoot,
|
|
3491
3518
|
relativeDirPath,
|
|
3492
3519
|
relativeFilePath,
|
|
3493
|
-
fileContent:
|
|
3494
|
-
version: RECIPE_VERSION$1,
|
|
3495
|
-
title: "",
|
|
3496
|
-
description: "",
|
|
3497
|
-
prompt: ""
|
|
3498
|
-
}, {
|
|
3499
|
-
lineWidth: -1,
|
|
3500
|
-
noRefs: true
|
|
3501
|
-
}),
|
|
3520
|
+
fileContent: placeholder,
|
|
3502
3521
|
validate: false
|
|
3503
3522
|
});
|
|
3504
3523
|
}
|
|
@@ -3656,14 +3675,17 @@ var JunieCommand = class JunieCommand extends ToolCommand {
|
|
|
3656
3675
|
static fromRulesyncCommand({ outputRoot = process.cwd(), rulesyncCommand, validate = true, global = false }) {
|
|
3657
3676
|
const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
|
|
3658
3677
|
const junieFields = rulesyncFrontmatter.junie ?? {};
|
|
3678
|
+
const junieFrontmatter = {
|
|
3679
|
+
description: rulesyncFrontmatter.description,
|
|
3680
|
+
...junieFields
|
|
3681
|
+
};
|
|
3682
|
+
const body = rulesyncCommand.getBody();
|
|
3683
|
+
const paths = this.getSettablePaths({ global });
|
|
3659
3684
|
return new JunieCommand({
|
|
3660
3685
|
outputRoot,
|
|
3661
|
-
frontmatter:
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
},
|
|
3665
|
-
body: rulesyncCommand.getBody(),
|
|
3666
|
-
relativeDirPath: this.getSettablePaths({ global }).relativeDirPath,
|
|
3686
|
+
frontmatter: junieFrontmatter,
|
|
3687
|
+
body,
|
|
3688
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3667
3689
|
relativeFilePath: rulesyncCommand.getRelativeFilePath(),
|
|
3668
3690
|
validate
|
|
3669
3691
|
});
|
|
@@ -3787,14 +3809,17 @@ var KiloCommand = class KiloCommand extends ToolCommand {
|
|
|
3787
3809
|
static fromRulesyncCommand({ outputRoot = process.cwd(), rulesyncCommand, validate = true, global = false }) {
|
|
3788
3810
|
const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
|
|
3789
3811
|
const kiloFields = rulesyncFrontmatter.kilo ?? {};
|
|
3812
|
+
const kiloFrontmatter = {
|
|
3813
|
+
description: rulesyncFrontmatter.description,
|
|
3814
|
+
...kiloFields
|
|
3815
|
+
};
|
|
3816
|
+
const body = rulesyncCommand.getBody();
|
|
3817
|
+
const paths = this.getSettablePaths({ global });
|
|
3790
3818
|
return new KiloCommand({
|
|
3791
3819
|
outputRoot,
|
|
3792
|
-
frontmatter:
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
},
|
|
3796
|
-
body: rulesyncCommand.getBody(),
|
|
3797
|
-
relativeDirPath: this.getSettablePaths({ global }).relativeDirPath,
|
|
3820
|
+
frontmatter: kiloFrontmatter,
|
|
3821
|
+
body,
|
|
3822
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3798
3823
|
relativeFilePath: rulesyncCommand.getRelativeFilePath(),
|
|
3799
3824
|
validate
|
|
3800
3825
|
});
|
|
@@ -4382,14 +4407,17 @@ var OpenCodeCommand = class OpenCodeCommand extends ToolCommand {
|
|
|
4382
4407
|
static fromRulesyncCommand({ outputRoot = process.cwd(), rulesyncCommand, validate = true, global = false }) {
|
|
4383
4408
|
const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
|
|
4384
4409
|
const opencodeFields = rulesyncFrontmatter.opencode ?? {};
|
|
4410
|
+
const opencodeFrontmatter = {
|
|
4411
|
+
description: rulesyncFrontmatter.description,
|
|
4412
|
+
...opencodeFields
|
|
4413
|
+
};
|
|
4414
|
+
const body = rulesyncCommand.getBody();
|
|
4415
|
+
const paths = this.getSettablePaths({ global });
|
|
4385
4416
|
return new OpenCodeCommand({
|
|
4386
4417
|
outputRoot,
|
|
4387
|
-
frontmatter:
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
},
|
|
4391
|
-
body: rulesyncCommand.getBody(),
|
|
4392
|
-
relativeDirPath: this.getSettablePaths({ global }).relativeDirPath,
|
|
4418
|
+
frontmatter: opencodeFrontmatter,
|
|
4419
|
+
body,
|
|
4420
|
+
relativeDirPath: paths.relativeDirPath,
|
|
4393
4421
|
relativeFilePath: rulesyncCommand.getRelativeFilePath(),
|
|
4394
4422
|
validate
|
|
4395
4423
|
});
|
|
@@ -4677,14 +4705,17 @@ var QwencodeCommand = class QwencodeCommand extends ToolCommand {
|
|
|
4677
4705
|
static fromRulesyncCommand({ outputRoot = process.cwd(), rulesyncCommand, validate = true, global = false }) {
|
|
4678
4706
|
const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
|
|
4679
4707
|
const qwencodeFields = rulesyncFrontmatter.qwencode ?? {};
|
|
4708
|
+
const qwencodeFrontmatter = {
|
|
4709
|
+
description: rulesyncFrontmatter.description,
|
|
4710
|
+
...qwencodeFields
|
|
4711
|
+
};
|
|
4712
|
+
const body = rulesyncCommand.getBody();
|
|
4713
|
+
const paths = this.getSettablePaths({ global });
|
|
4680
4714
|
return new QwencodeCommand({
|
|
4681
4715
|
outputRoot,
|
|
4682
|
-
frontmatter:
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
},
|
|
4686
|
-
body: rulesyncCommand.getBody(),
|
|
4687
|
-
relativeDirPath: this.getSettablePaths({ global }).relativeDirPath,
|
|
4716
|
+
frontmatter: qwencodeFrontmatter,
|
|
4717
|
+
body,
|
|
4718
|
+
relativeDirPath: paths.relativeDirPath,
|
|
4688
4719
|
relativeFilePath: rulesyncCommand.getRelativeFilePath(),
|
|
4689
4720
|
validate
|
|
4690
4721
|
});
|
|
@@ -4808,14 +4839,17 @@ var ReasonixCommand = class ReasonixCommand extends ToolCommand {
|
|
|
4808
4839
|
static fromRulesyncCommand({ outputRoot = process.cwd(), rulesyncCommand, validate = true, global = false }) {
|
|
4809
4840
|
const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
|
|
4810
4841
|
const reasonixFields = rulesyncFrontmatter.reasonix ?? {};
|
|
4842
|
+
const reasonixFrontmatter = {
|
|
4843
|
+
description: rulesyncFrontmatter.description,
|
|
4844
|
+
...reasonixFields
|
|
4845
|
+
};
|
|
4846
|
+
const body = rulesyncCommand.getBody();
|
|
4847
|
+
const paths = this.getSettablePaths({ global });
|
|
4811
4848
|
return new ReasonixCommand({
|
|
4812
4849
|
outputRoot,
|
|
4813
|
-
frontmatter:
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
},
|
|
4817
|
-
body: rulesyncCommand.getBody(),
|
|
4818
|
-
relativeDirPath: this.getSettablePaths({ global }).relativeDirPath,
|
|
4850
|
+
frontmatter: reasonixFrontmatter,
|
|
4851
|
+
body,
|
|
4852
|
+
relativeDirPath: paths.relativeDirPath,
|
|
4819
4853
|
relativeFilePath: rulesyncCommand.getRelativeFilePath(),
|
|
4820
4854
|
validate
|
|
4821
4855
|
});
|
|
@@ -5113,14 +5147,15 @@ var RovodevCommand = class RovodevCommand extends ToolCommand {
|
|
|
5113
5147
|
const paths = this.getSettablePaths({ global });
|
|
5114
5148
|
const body = (await readFileContent((0, node_path.join)(outputRoot, paths.relativeDirPath, relativeFilePath))).trim();
|
|
5115
5149
|
const name = (0, node_path.basename)(relativeFilePath, ".md");
|
|
5150
|
+
const description = await lookupPromptDescription({
|
|
5151
|
+
outputRoot,
|
|
5152
|
+
relativeFilePath,
|
|
5153
|
+
name
|
|
5154
|
+
});
|
|
5116
5155
|
return new RovodevCommand({
|
|
5117
5156
|
outputRoot,
|
|
5118
5157
|
name,
|
|
5119
|
-
description
|
|
5120
|
-
outputRoot,
|
|
5121
|
-
relativeFilePath,
|
|
5122
|
-
name
|
|
5123
|
-
}),
|
|
5158
|
+
description,
|
|
5124
5159
|
body,
|
|
5125
5160
|
relativeDirPath: paths.relativeDirPath,
|
|
5126
5161
|
relativeFilePath,
|
|
@@ -5319,14 +5354,15 @@ var TaktCommand = class TaktCommand extends ToolCommand {
|
|
|
5319
5354
|
});
|
|
5320
5355
|
const relativeFilePath = `${stem}.md`;
|
|
5321
5356
|
const paths = this.getSettablePaths({ global });
|
|
5357
|
+
const body = prependTaktExtends({
|
|
5358
|
+
extendsName: typeof taktSection?.extends === "string" ? taktSection.extends : void 0,
|
|
5359
|
+
body: rulesyncCommand.getBody(),
|
|
5360
|
+
featureLabel: "command",
|
|
5361
|
+
sourceLabel
|
|
5362
|
+
});
|
|
5322
5363
|
return new TaktCommand({
|
|
5323
5364
|
outputRoot,
|
|
5324
|
-
body
|
|
5325
|
-
extendsName: typeof taktSection?.extends === "string" ? taktSection.extends : void 0,
|
|
5326
|
-
body: rulesyncCommand.getBody(),
|
|
5327
|
-
featureLabel: "command",
|
|
5328
|
-
sourceLabel
|
|
5329
|
-
}),
|
|
5365
|
+
body,
|
|
5330
5366
|
relativeDirPath: paths.relativeDirPath,
|
|
5331
5367
|
relativeFilePath,
|
|
5332
5368
|
validate
|
|
@@ -7477,11 +7513,12 @@ var CodexcliConfigToml = class CodexcliConfigToml extends ToolFile {
|
|
|
7477
7513
|
};
|
|
7478
7514
|
}
|
|
7479
7515
|
static async fromOutputRoot({ outputRoot }) {
|
|
7516
|
+
const fileContent = await buildCodexConfigTomlContent({ outputRoot });
|
|
7480
7517
|
return new CodexcliConfigToml({
|
|
7481
7518
|
outputRoot,
|
|
7482
7519
|
relativeDirPath: CODEXCLI_DIR,
|
|
7483
7520
|
relativeFilePath: CODEXCLI_MCP_FILE_NAME,
|
|
7484
|
-
fileContent
|
|
7521
|
+
fileContent
|
|
7485
7522
|
});
|
|
7486
7523
|
}
|
|
7487
7524
|
};
|
|
@@ -8772,15 +8809,16 @@ var HermesagentHooks = class HermesagentHooks extends ToolHooks {
|
|
|
8772
8809
|
}
|
|
8773
8810
|
static fromRulesyncHooks({ outputRoot, rulesyncHooks, logger }) {
|
|
8774
8811
|
const config = rulesyncHooks.getJson();
|
|
8812
|
+
const hermesHooks = canonicalToHermesHooks({
|
|
8813
|
+
config,
|
|
8814
|
+
toolOverrideHooks: config.hermesagent?.hooks,
|
|
8815
|
+
logger
|
|
8816
|
+
});
|
|
8775
8817
|
return new HermesagentHooks({
|
|
8776
8818
|
outputRoot,
|
|
8777
8819
|
fileContent: stringifySharedConfig({
|
|
8778
8820
|
format: "yaml",
|
|
8779
|
-
document: { hooks:
|
|
8780
|
-
config,
|
|
8781
|
-
toolOverrideHooks: config.hermesagent?.hooks,
|
|
8782
|
-
logger
|
|
8783
|
-
}) }
|
|
8821
|
+
document: { hooks: hermesHooks }
|
|
8784
8822
|
})
|
|
8785
8823
|
});
|
|
8786
8824
|
}
|
|
@@ -10055,11 +10093,12 @@ var VibeConfigToml = class VibeConfigToml extends ToolFile {
|
|
|
10055
10093
|
};
|
|
10056
10094
|
}
|
|
10057
10095
|
static async fromOutputRoot({ outputRoot }) {
|
|
10096
|
+
const fileContent = await buildVibeConfigTomlContent({ outputRoot });
|
|
10058
10097
|
return new VibeConfigToml({
|
|
10059
10098
|
outputRoot,
|
|
10060
10099
|
relativeDirPath: VIBE_DIR,
|
|
10061
10100
|
relativeFilePath: VIBE_CONFIG_FILE_NAME,
|
|
10062
|
-
fileContent
|
|
10101
|
+
fileContent
|
|
10063
10102
|
});
|
|
10064
10103
|
}
|
|
10065
10104
|
};
|
|
@@ -10836,9 +10875,10 @@ var ClaudecodeIgnore = class ClaudecodeIgnore extends ToolIgnore {
|
|
|
10836
10875
|
this.patterns = jsonValue.permissions?.deny ?? [];
|
|
10837
10876
|
}
|
|
10838
10877
|
static getSettablePaths(params) {
|
|
10878
|
+
const fileMode = resolveFileMode(params?.options);
|
|
10839
10879
|
return {
|
|
10840
10880
|
relativeDirPath: CLAUDECODE_DIR,
|
|
10841
|
-
relativeFilePath: fileNameForMode(
|
|
10881
|
+
relativeFilePath: fileNameForMode(fileMode)
|
|
10842
10882
|
};
|
|
10843
10883
|
}
|
|
10844
10884
|
/**
|
|
@@ -11071,11 +11111,12 @@ var DevinIgnore = class DevinIgnore extends ToolIgnore {
|
|
|
11071
11111
|
const primaryPath = (0, node_path.join)(outputRoot, relativeDirPath, relativeFilePath);
|
|
11072
11112
|
const legacyPath = (0, node_path.join)(outputRoot, relativeDirPath, DEVIN_LEGACY_IGNORE_FILE_NAME);
|
|
11073
11113
|
const resolvedFilePath = !await fileExists(primaryPath) && await fileExists(legacyPath) ? DEVIN_LEGACY_IGNORE_FILE_NAME : relativeFilePath;
|
|
11114
|
+
const fileContent = await readFileContent((0, node_path.join)(outputRoot, relativeDirPath, resolvedFilePath));
|
|
11074
11115
|
return new DevinIgnore({
|
|
11075
11116
|
outputRoot,
|
|
11076
11117
|
relativeDirPath,
|
|
11077
11118
|
relativeFilePath: resolvedFilePath,
|
|
11078
|
-
fileContent
|
|
11119
|
+
fileContent,
|
|
11079
11120
|
validate
|
|
11080
11121
|
});
|
|
11081
11122
|
}
|
|
@@ -18820,7 +18861,11 @@ function toCursorPattern(canonical, pattern) {
|
|
|
18820
18861
|
function toCanonicalCategory$1(cursorType, pattern) {
|
|
18821
18862
|
if (cursorType === "Mcp") {
|
|
18822
18863
|
const match = pattern.match(/^([^:()]+):([^:()]+)$/);
|
|
18823
|
-
if (match)
|
|
18864
|
+
if (match) {
|
|
18865
|
+
const server = match[1] ?? "*";
|
|
18866
|
+
const tool = match[2] ?? "*";
|
|
18867
|
+
return `${MCP_CANONICAL_PREFIX$1}${server}__${tool}`;
|
|
18868
|
+
}
|
|
18824
18869
|
return CURSOR_TYPE_TO_CANONICAL[cursorType] ?? cursorType.toLowerCase();
|
|
18825
18870
|
}
|
|
18826
18871
|
return CURSOR_TYPE_TO_CANONICAL[cursorType] ?? cursorType.toLowerCase();
|
|
@@ -23163,13 +23208,15 @@ var AgentsmdSkill = class AgentsmdSkill extends SimulatedSkill {
|
|
|
23163
23208
|
return { relativeDirPath: AGENTSMD_SKILLS_DIR_PATH };
|
|
23164
23209
|
}
|
|
23165
23210
|
static async fromDir(params) {
|
|
23166
|
-
|
|
23211
|
+
const baseParams = await this.fromDirDefault(params);
|
|
23212
|
+
return new AgentsmdSkill(baseParams);
|
|
23167
23213
|
}
|
|
23168
23214
|
static fromRulesyncSkill(params) {
|
|
23169
|
-
|
|
23215
|
+
const baseParams = {
|
|
23170
23216
|
...this.fromRulesyncSkillDefault(params),
|
|
23171
23217
|
relativeDirPath: this.getSettablePaths().relativeDirPath
|
|
23172
|
-
}
|
|
23218
|
+
};
|
|
23219
|
+
return new AgentsmdSkill(baseParams);
|
|
23173
23220
|
}
|
|
23174
23221
|
static isTargetedByRulesyncSkill(rulesyncSkill) {
|
|
23175
23222
|
return this.isTargetedByRulesyncSkillDefault({
|
|
@@ -23178,7 +23225,8 @@ var AgentsmdSkill = class AgentsmdSkill extends SimulatedSkill {
|
|
|
23178
23225
|
});
|
|
23179
23226
|
}
|
|
23180
23227
|
static forDeletion(params) {
|
|
23181
|
-
|
|
23228
|
+
const baseParams = this.forDeletionDefault(params);
|
|
23229
|
+
return new AgentsmdSkill(baseParams);
|
|
23182
23230
|
}
|
|
23183
23231
|
};
|
|
23184
23232
|
const RulesyncSkillFrontmatterSchema = zod_mini.z.looseObject({
|
|
@@ -24585,9 +24633,10 @@ var ClaudecodeSkill = class ClaudecodeSkill extends ToolSkill {
|
|
|
24585
24633
|
})
|
|
24586
24634
|
});
|
|
24587
24635
|
const settablePaths = ClaudecodeSkill.getSettablePaths({ global });
|
|
24636
|
+
const relativeDirPath = rulesyncFrontmatter.claudecode?.["scheduled-task"] ? CLAUDECODE_SCHEDULED_TASKS_DIR_PATH : settablePaths.relativeDirPath;
|
|
24588
24637
|
return new ClaudecodeSkill({
|
|
24589
24638
|
outputRoot,
|
|
24590
|
-
relativeDirPath
|
|
24639
|
+
relativeDirPath,
|
|
24591
24640
|
dirName: rulesyncSkill.getDirName(),
|
|
24592
24641
|
frontmatter: claudecodeFrontmatter,
|
|
24593
24642
|
body: rulesyncSkill.getBody(),
|
|
@@ -26376,9 +26425,10 @@ var KiloSkill = class KiloSkill extends ToolSkill {
|
|
|
26376
26425
|
...kiloSection?.compatibility !== void 0 && { compatibility: kiloSection.compatibility },
|
|
26377
26426
|
...kiloSection?.metadata !== void 0 && { metadata: kiloSection.metadata }
|
|
26378
26427
|
};
|
|
26428
|
+
const settablePaths = KiloSkill.getSettablePaths({ global });
|
|
26379
26429
|
return new KiloSkill({
|
|
26380
26430
|
outputRoot,
|
|
26381
|
-
relativeDirPath:
|
|
26431
|
+
relativeDirPath: settablePaths.relativeDirPath,
|
|
26382
26432
|
dirName: rulesyncSkill.getDirName(),
|
|
26383
26433
|
frontmatter: kiloFrontmatter,
|
|
26384
26434
|
body: rulesyncSkill.getBody(),
|
|
@@ -26701,9 +26751,10 @@ var OpenCodeSkill = class OpenCodeSkill extends ToolSkill {
|
|
|
26701
26751
|
...metadata !== void 0 && { metadata },
|
|
26702
26752
|
...opencodeSection?.["allowed-tools"] !== void 0 && { "allowed-tools": opencodeSection["allowed-tools"] }
|
|
26703
26753
|
};
|
|
26754
|
+
const settablePaths = OpenCodeSkill.getSettablePaths({ global });
|
|
26704
26755
|
return new OpenCodeSkill({
|
|
26705
26756
|
outputRoot,
|
|
26706
|
-
relativeDirPath:
|
|
26757
|
+
relativeDirPath: settablePaths.relativeDirPath,
|
|
26707
26758
|
dirName: rulesyncSkill.getDirName(),
|
|
26708
26759
|
frontmatter: opencodeFrontmatter,
|
|
26709
26760
|
body: rulesyncSkill.getBody(),
|
|
@@ -27018,9 +27069,10 @@ var QwencodeSkill = class QwencodeSkill extends ToolSkill {
|
|
|
27018
27069
|
...resolvedUserInvocable !== void 0 && { "user-invocable": resolvedUserInvocable },
|
|
27019
27070
|
...resolvedDisableModelInvocation !== void 0 && { "disable-model-invocation": resolvedDisableModelInvocation }
|
|
27020
27071
|
};
|
|
27072
|
+
const settablePaths = QwencodeSkill.getSettablePaths({ global });
|
|
27021
27073
|
return new QwencodeSkill({
|
|
27022
27074
|
outputRoot,
|
|
27023
|
-
relativeDirPath:
|
|
27075
|
+
relativeDirPath: settablePaths.relativeDirPath,
|
|
27024
27076
|
dirName: rulesyncSkill.getDirName(),
|
|
27025
27077
|
frontmatter: qwencodeFrontmatter,
|
|
27026
27078
|
body: rulesyncSkill.getBody(),
|
|
@@ -27151,9 +27203,10 @@ var ReasonixSkill = class ReasonixSkill extends ToolSkill {
|
|
|
27151
27203
|
name: rulesyncFrontmatter.name,
|
|
27152
27204
|
description: rulesyncFrontmatter.description
|
|
27153
27205
|
};
|
|
27206
|
+
const settablePaths = ReasonixSkill.getSettablePaths({ global });
|
|
27154
27207
|
return new ReasonixSkill({
|
|
27155
27208
|
outputRoot,
|
|
27156
|
-
relativeDirPath:
|
|
27209
|
+
relativeDirPath: settablePaths.relativeDirPath,
|
|
27157
27210
|
dirName: rulesyncSkill.getDirName(),
|
|
27158
27211
|
frontmatter: reasonixFrontmatter,
|
|
27159
27212
|
body: rulesyncSkill.getBody(),
|
|
@@ -27572,17 +27625,20 @@ var TaktSkill = class TaktSkill extends ToolSkill {
|
|
|
27572
27625
|
featureLabel: "skill",
|
|
27573
27626
|
sourceLabel
|
|
27574
27627
|
});
|
|
27628
|
+
const fileName = `${stem}.md`;
|
|
27629
|
+
const relativeDirPath = TAKT_SKILLS_DIR_PATH;
|
|
27630
|
+
const body = prependTaktExtends({
|
|
27631
|
+
extendsName: typeof taktSection?.extends === "string" ? taktSection.extends : void 0,
|
|
27632
|
+
body: rulesyncSkill.getBody(),
|
|
27633
|
+
featureLabel: "skill",
|
|
27634
|
+
sourceLabel
|
|
27635
|
+
});
|
|
27575
27636
|
return new TaktSkill({
|
|
27576
27637
|
outputRoot,
|
|
27577
|
-
relativeDirPath
|
|
27638
|
+
relativeDirPath,
|
|
27578
27639
|
dirName: stem,
|
|
27579
|
-
fileName
|
|
27580
|
-
body
|
|
27581
|
-
extendsName: typeof taktSection?.extends === "string" ? taktSection.extends : void 0,
|
|
27582
|
-
body: rulesyncSkill.getBody(),
|
|
27583
|
-
featureLabel: "skill",
|
|
27584
|
-
sourceLabel
|
|
27585
|
-
}),
|
|
27640
|
+
fileName,
|
|
27641
|
+
body,
|
|
27586
27642
|
otherFiles: rulesyncSkill.getOtherFiles(),
|
|
27587
27643
|
validate,
|
|
27588
27644
|
global
|
|
@@ -27880,9 +27936,10 @@ var WarpSkill = class WarpSkill extends ToolSkill {
|
|
|
27880
27936
|
name: rulesyncFrontmatter.name,
|
|
27881
27937
|
description: rulesyncFrontmatter.description
|
|
27882
27938
|
};
|
|
27939
|
+
const settablePaths = WarpSkill.getSettablePaths({ global });
|
|
27883
27940
|
return new WarpSkill({
|
|
27884
27941
|
outputRoot,
|
|
27885
|
-
relativeDirPath:
|
|
27942
|
+
relativeDirPath: settablePaths.relativeDirPath,
|
|
27886
27943
|
dirName: rulesyncSkill.getDirName(),
|
|
27887
27944
|
frontmatter: warpFrontmatter,
|
|
27888
27945
|
body: rulesyncSkill.getBody(),
|
|
@@ -28699,10 +28756,12 @@ var AgentsmdSubagent = class AgentsmdSubagent extends SimulatedSubagent {
|
|
|
28699
28756
|
return { relativeDirPath: AGENTSMD_SUBAGENTS_DIR_PATH };
|
|
28700
28757
|
}
|
|
28701
28758
|
static async fromFile(params) {
|
|
28702
|
-
|
|
28759
|
+
const baseParams = await this.fromFileDefault(params);
|
|
28760
|
+
return new AgentsmdSubagent(baseParams);
|
|
28703
28761
|
}
|
|
28704
28762
|
static fromRulesyncSubagent(params) {
|
|
28705
|
-
|
|
28763
|
+
const baseParams = this.fromRulesyncSubagentDefault(params);
|
|
28764
|
+
return new AgentsmdSubagent(baseParams);
|
|
28706
28765
|
}
|
|
28707
28766
|
static isTargetedByRulesyncSubagent(rulesyncSubagent) {
|
|
28708
28767
|
return this.isTargetedByRulesyncSubagentDefault({
|
|
@@ -28867,11 +28926,12 @@ var QwencodeSubagent = class QwencodeSubagent extends ToolSubagent {
|
|
|
28867
28926
|
};
|
|
28868
28927
|
const body = rulesyncSubagent.getBody();
|
|
28869
28928
|
const fileContent = stringifyFrontmatter(body, qwencodeSubagentFrontmatter, { avoidBlockScalars: true });
|
|
28929
|
+
const paths = this.getSettablePaths({ global });
|
|
28870
28930
|
return new QwencodeSubagent({
|
|
28871
28931
|
outputRoot,
|
|
28872
28932
|
frontmatter: qwencodeSubagentFrontmatter,
|
|
28873
28933
|
body,
|
|
28874
|
-
relativeDirPath:
|
|
28934
|
+
relativeDirPath: paths.relativeDirPath,
|
|
28875
28935
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
28876
28936
|
fileContent,
|
|
28877
28937
|
validate,
|
|
@@ -28995,11 +29055,12 @@ var RovodevSubagent = class RovodevSubagent extends ToolSubagent {
|
|
|
28995
29055
|
};
|
|
28996
29056
|
const body = rulesyncSubagent.getBody();
|
|
28997
29057
|
const fileContent = stringifyFrontmatter(body, rovodevFrontmatter, { avoidBlockScalars: true });
|
|
29058
|
+
const paths = this.getSettablePaths({ global });
|
|
28998
29059
|
return new RovodevSubagent({
|
|
28999
29060
|
outputRoot,
|
|
29000
29061
|
frontmatter: rovodevFrontmatter,
|
|
29001
29062
|
body,
|
|
29002
|
-
relativeDirPath:
|
|
29063
|
+
relativeDirPath: paths.relativeDirPath,
|
|
29003
29064
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
29004
29065
|
fileContent,
|
|
29005
29066
|
validate,
|
|
@@ -29130,11 +29191,12 @@ var AugmentcodeSubagent = class AugmentcodeSubagent extends ToolSubagent {
|
|
|
29130
29191
|
};
|
|
29131
29192
|
const body = rulesyncSubagent.getBody();
|
|
29132
29193
|
const fileContent = stringifyFrontmatter(body, augmentcodeFrontmatter, { avoidBlockScalars: true });
|
|
29194
|
+
const paths = this.getSettablePaths({ global });
|
|
29133
29195
|
return new AugmentcodeSubagent({
|
|
29134
29196
|
outputRoot,
|
|
29135
29197
|
frontmatter: augmentcodeFrontmatter,
|
|
29136
29198
|
body,
|
|
29137
|
-
relativeDirPath:
|
|
29199
|
+
relativeDirPath: paths.relativeDirPath,
|
|
29138
29200
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
29139
29201
|
fileContent,
|
|
29140
29202
|
validate,
|
|
@@ -29269,11 +29331,12 @@ var ClaudecodeSubagent = class ClaudecodeSubagent extends ToolSubagent {
|
|
|
29269
29331
|
const claudecodeFrontmatter = result.data;
|
|
29270
29332
|
const body = rulesyncSubagent.getBody();
|
|
29271
29333
|
const fileContent = stringifyFrontmatter(body, claudecodeFrontmatter);
|
|
29334
|
+
const paths = this.getSettablePaths({ global });
|
|
29272
29335
|
return new ClaudecodeSubagent({
|
|
29273
29336
|
outputRoot,
|
|
29274
29337
|
frontmatter: claudecodeFrontmatter,
|
|
29275
29338
|
body,
|
|
29276
|
-
relativeDirPath:
|
|
29339
|
+
relativeDirPath: paths.relativeDirPath,
|
|
29277
29340
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
29278
29341
|
fileContent,
|
|
29279
29342
|
validate
|
|
@@ -29399,11 +29462,12 @@ var ClineSubagent = class ClineSubagent extends ToolSubagent {
|
|
|
29399
29462
|
};
|
|
29400
29463
|
const body = rulesyncSubagent.getBody();
|
|
29401
29464
|
const fileContent = stringifyFrontmatter(body, clineFrontmatter, { avoidBlockScalars: true });
|
|
29465
|
+
const paths = this.getSettablePaths({ global });
|
|
29402
29466
|
return new ClineSubagent({
|
|
29403
29467
|
outputRoot,
|
|
29404
29468
|
frontmatter: clineFrontmatter,
|
|
29405
29469
|
body,
|
|
29406
|
-
relativeDirPath:
|
|
29470
|
+
relativeDirPath: paths.relativeDirPath,
|
|
29407
29471
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath().replace(/\.md$/, ".yaml"),
|
|
29408
29472
|
fileContent,
|
|
29409
29473
|
validate,
|
|
@@ -29669,7 +29733,8 @@ var CopilotSubagent = class CopilotSubagent extends ToolSubagent {
|
|
|
29669
29733
|
const rulesyncFrontmatter = rulesyncSubagent.getFrontmatter();
|
|
29670
29734
|
const copilotSection = rulesyncFrontmatter.copilot ?? {};
|
|
29671
29735
|
const toolsField = copilotSection.tools;
|
|
29672
|
-
const
|
|
29736
|
+
const userTools = normalizeTools(Array.isArray(toolsField) || typeof toolsField === "string" ? toolsField : void 0);
|
|
29737
|
+
const mergedTools = ensureRequiredTool(userTools);
|
|
29673
29738
|
const copilotFrontmatter = {
|
|
29674
29739
|
name: rulesyncFrontmatter.name,
|
|
29675
29740
|
description: rulesyncFrontmatter.description,
|
|
@@ -29678,11 +29743,12 @@ var CopilotSubagent = class CopilotSubagent extends ToolSubagent {
|
|
|
29678
29743
|
};
|
|
29679
29744
|
const body = rulesyncSubagent.getBody();
|
|
29680
29745
|
const fileContent = stringifyFrontmatter(body, copilotFrontmatter);
|
|
29746
|
+
const paths = this.getSettablePaths({ global });
|
|
29681
29747
|
return new CopilotSubagent({
|
|
29682
29748
|
outputRoot,
|
|
29683
29749
|
frontmatter: copilotFrontmatter,
|
|
29684
29750
|
body,
|
|
29685
|
-
relativeDirPath:
|
|
29751
|
+
relativeDirPath: paths.relativeDirPath,
|
|
29686
29752
|
relativeFilePath: toCopilotAgentFilePath(rulesyncSubagent.getRelativeFilePath()),
|
|
29687
29753
|
fileContent,
|
|
29688
29754
|
validate,
|
|
@@ -29855,11 +29921,12 @@ var CopilotcliSubagent = class CopilotcliSubagent extends ToolSubagent {
|
|
|
29855
29921
|
const copilotCliFrontmatter = result.data;
|
|
29856
29922
|
const body = rulesyncSubagent.getBody();
|
|
29857
29923
|
const fileContent = stringifyFrontmatter(body, copilotCliFrontmatter);
|
|
29924
|
+
const paths = this.getSettablePaths({ global });
|
|
29858
29925
|
return new CopilotcliSubagent({
|
|
29859
29926
|
outputRoot,
|
|
29860
29927
|
frontmatter: copilotCliFrontmatter,
|
|
29861
29928
|
body,
|
|
29862
|
-
relativeDirPath:
|
|
29929
|
+
relativeDirPath: paths.relativeDirPath,
|
|
29863
29930
|
relativeFilePath: toCopilotCliAgentFilePath(rulesyncSubagent.getRelativeFilePath()),
|
|
29864
29931
|
fileContent,
|
|
29865
29932
|
validate,
|
|
@@ -29973,11 +30040,12 @@ var CursorSubagent = class CursorSubagent extends ToolSubagent {
|
|
|
29973
30040
|
};
|
|
29974
30041
|
const body = rulesyncSubagent.getBody();
|
|
29975
30042
|
const fileContent = stringifyFrontmatter(body, cursorFrontmatter, { avoidBlockScalars: true });
|
|
30043
|
+
const paths = this.getSettablePaths({ global });
|
|
29976
30044
|
return new CursorSubagent({
|
|
29977
30045
|
outputRoot,
|
|
29978
30046
|
frontmatter: cursorFrontmatter,
|
|
29979
30047
|
body,
|
|
29980
|
-
relativeDirPath:
|
|
30048
|
+
relativeDirPath: paths.relativeDirPath,
|
|
29981
30049
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
29982
30050
|
fileContent,
|
|
29983
30051
|
validate,
|
|
@@ -30411,11 +30479,12 @@ var FactorydroidSubagent = class FactorydroidSubagent extends ToolSubagent {
|
|
|
30411
30479
|
const factorydroidFrontmatter = result.data;
|
|
30412
30480
|
const body = rulesyncSubagent.getBody();
|
|
30413
30481
|
const fileContent = stringifyFrontmatter(body, factorydroidFrontmatter);
|
|
30482
|
+
const paths = this.getSettablePaths({ global });
|
|
30414
30483
|
return new FactorydroidSubagent({
|
|
30415
30484
|
outputRoot,
|
|
30416
30485
|
frontmatter: factorydroidFrontmatter,
|
|
30417
30486
|
body,
|
|
30418
|
-
relativeDirPath:
|
|
30487
|
+
relativeDirPath: paths.relativeDirPath,
|
|
30419
30488
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
30420
30489
|
fileContent,
|
|
30421
30490
|
validate,
|
|
@@ -30553,10 +30622,11 @@ var GooseSubagent = class GooseSubagent extends ToolSubagent {
|
|
|
30553
30622
|
instructions,
|
|
30554
30623
|
...extraFields
|
|
30555
30624
|
};
|
|
30625
|
+
const paths = this.getSettablePaths({ global });
|
|
30556
30626
|
return new GooseSubagent({
|
|
30557
30627
|
outputRoot,
|
|
30558
30628
|
recipe,
|
|
30559
|
-
relativeDirPath:
|
|
30629
|
+
relativeDirPath: paths.relativeDirPath,
|
|
30560
30630
|
relativeFilePath,
|
|
30561
30631
|
fileContent: (0, js_yaml.dump)(recipe, {
|
|
30562
30632
|
lineWidth: -1,
|
|
@@ -30691,11 +30761,12 @@ var GrokcliSubagent = class GrokcliSubagent extends ToolSubagent {
|
|
|
30691
30761
|
};
|
|
30692
30762
|
const body = rulesyncSubagent.getBody();
|
|
30693
30763
|
const fileContent = stringifyFrontmatter(body, grokcliSubagentFrontmatter, { avoidBlockScalars: true });
|
|
30764
|
+
const paths = this.getSettablePaths({ global });
|
|
30694
30765
|
return new GrokcliSubagent({
|
|
30695
30766
|
outputRoot,
|
|
30696
30767
|
frontmatter: grokcliSubagentFrontmatter,
|
|
30697
30768
|
body,
|
|
30698
|
-
relativeDirPath:
|
|
30769
|
+
relativeDirPath: paths.relativeDirPath,
|
|
30699
30770
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
30700
30771
|
fileContent,
|
|
30701
30772
|
validate,
|
|
@@ -30931,9 +31002,10 @@ var HermesagentSubagent = class HermesagentSubagent extends ToolSubagent {
|
|
|
30931
31002
|
}
|
|
30932
31003
|
static fromRulesyncSubagent({ rulesyncSubagent, outputRoot }) {
|
|
30933
31004
|
const spec = getSubagentSpec(rulesyncSubagent);
|
|
31005
|
+
const slug = String(spec.slug);
|
|
30934
31006
|
return new HermesagentSubagent({
|
|
30935
31007
|
relativeDirPath: HERMESAGENT_RULESYNC_SUBAGENTS_DIR_PATH,
|
|
30936
|
-
relativeFilePath: `${
|
|
31008
|
+
relativeFilePath: `${slug}.json`,
|
|
30937
31009
|
fileContent: `${JSON.stringify(spec, null, 2)}\n`,
|
|
30938
31010
|
outputRoot
|
|
30939
31011
|
});
|
|
@@ -31067,11 +31139,12 @@ var JunieSubagent = class JunieSubagent extends ToolSubagent {
|
|
|
31067
31139
|
const junieFrontmatter = result.data;
|
|
31068
31140
|
const body = rulesyncSubagent.getBody();
|
|
31069
31141
|
const fileContent = stringifyFrontmatter(body, junieFrontmatter);
|
|
31142
|
+
const paths = this.getSettablePaths({ global });
|
|
31070
31143
|
return new JunieSubagent({
|
|
31071
31144
|
outputRoot,
|
|
31072
31145
|
frontmatter: junieFrontmatter,
|
|
31073
31146
|
body,
|
|
31074
|
-
relativeDirPath:
|
|
31147
|
+
relativeDirPath: paths.relativeDirPath,
|
|
31075
31148
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
31076
31149
|
fileContent,
|
|
31077
31150
|
validate,
|
|
@@ -31262,11 +31335,12 @@ var KiloSubagent = class KiloSubagent extends OpenCodeStyleSubagent {
|
|
|
31262
31335
|
const kiloFrontmatter = parseResult.data;
|
|
31263
31336
|
const body = rulesyncSubagent.getBody();
|
|
31264
31337
|
const fileContent = stringifyFrontmatter(body, kiloFrontmatter);
|
|
31338
|
+
const paths = this.getSettablePaths({ global });
|
|
31265
31339
|
return new KiloSubagent({
|
|
31266
31340
|
outputRoot,
|
|
31267
31341
|
frontmatter: kiloFrontmatter,
|
|
31268
31342
|
body,
|
|
31269
|
-
relativeDirPath:
|
|
31343
|
+
relativeDirPath: paths.relativeDirPath,
|
|
31270
31344
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
31271
31345
|
fileContent,
|
|
31272
31346
|
validate,
|
|
@@ -31538,11 +31612,12 @@ var KiroIdeSubagent = class KiroIdeSubagent extends ToolSubagent {
|
|
|
31538
31612
|
const frontmatter = result.data;
|
|
31539
31613
|
const body = rulesyncSubagent.getBody();
|
|
31540
31614
|
const fileContent = stringifyFrontmatter(body, frontmatter);
|
|
31615
|
+
const paths = this.getSettablePaths({ global });
|
|
31541
31616
|
return new KiroIdeSubagent({
|
|
31542
31617
|
outputRoot,
|
|
31543
31618
|
frontmatter,
|
|
31544
31619
|
body,
|
|
31545
|
-
relativeDirPath:
|
|
31620
|
+
relativeDirPath: paths.relativeDirPath,
|
|
31546
31621
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
31547
31622
|
fileContent,
|
|
31548
31623
|
validate,
|
|
@@ -31686,11 +31761,12 @@ var OpenCodeSubagent = class OpenCodeSubagent extends OpenCodeStyleSubagent {
|
|
|
31686
31761
|
const opencodeFrontmatter = parseResult.data;
|
|
31687
31762
|
const body = rulesyncSubagent.getBody();
|
|
31688
31763
|
const fileContent = stringifyFrontmatter(body, opencodeFrontmatter);
|
|
31764
|
+
const paths = this.getSettablePaths({ global });
|
|
31689
31765
|
return new OpenCodeSubagent({
|
|
31690
31766
|
outputRoot,
|
|
31691
31767
|
frontmatter: opencodeFrontmatter,
|
|
31692
31768
|
body,
|
|
31693
|
-
relativeDirPath:
|
|
31769
|
+
relativeDirPath: paths.relativeDirPath,
|
|
31694
31770
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
31695
31771
|
fileContent,
|
|
31696
31772
|
validate,
|
|
@@ -32979,11 +33055,12 @@ var AiassistantRule = class AiassistantRule extends ToolRule {
|
|
|
32979
33055
|
}
|
|
32980
33056
|
static async fromFile({ outputRoot = process.cwd(), relativeFilePath, validate = true }) {
|
|
32981
33057
|
const relativeDirPath = this.getSettablePaths().nonRoot.relativeDirPath;
|
|
33058
|
+
const fileContent = await readFileContent((0, node_path.join)(outputRoot, relativeDirPath, relativeFilePath));
|
|
32982
33059
|
return new AiassistantRule({
|
|
32983
33060
|
outputRoot,
|
|
32984
33061
|
relativeDirPath,
|
|
32985
33062
|
relativeFilePath,
|
|
32986
|
-
fileContent:
|
|
33063
|
+
fileContent: fileContent.trim(),
|
|
32987
33064
|
validate,
|
|
32988
33065
|
root: false
|
|
32989
33066
|
});
|
|
@@ -33084,13 +33161,14 @@ var AmpRule = class AmpRule extends ToolRule {
|
|
|
33084
33161
|
};
|
|
33085
33162
|
}
|
|
33086
33163
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath, global = false }) {
|
|
33164
|
+
const isRoot = relativeFilePath === this.getSettablePaths({ global }).root.relativeFilePath;
|
|
33087
33165
|
return new AmpRule({
|
|
33088
33166
|
outputRoot,
|
|
33089
33167
|
relativeDirPath,
|
|
33090
33168
|
relativeFilePath,
|
|
33091
33169
|
fileContent: "",
|
|
33092
33170
|
validate: false,
|
|
33093
|
-
root:
|
|
33171
|
+
root: isRoot
|
|
33094
33172
|
});
|
|
33095
33173
|
}
|
|
33096
33174
|
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
@@ -33173,13 +33251,14 @@ var AntigravityCliRule = class AntigravityCliRule extends ToolRule {
|
|
|
33173
33251
|
};
|
|
33174
33252
|
}
|
|
33175
33253
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath, global = false }) {
|
|
33254
|
+
const isRoot = relativeFilePath === this.getSettablePaths({ global }).root.relativeFilePath;
|
|
33176
33255
|
return new AntigravityCliRule({
|
|
33177
33256
|
outputRoot,
|
|
33178
33257
|
relativeDirPath,
|
|
33179
33258
|
relativeFilePath,
|
|
33180
33259
|
fileContent: "",
|
|
33181
33260
|
validate: false,
|
|
33182
|
-
root:
|
|
33261
|
+
root: isRoot
|
|
33183
33262
|
});
|
|
33184
33263
|
}
|
|
33185
33264
|
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
@@ -33593,13 +33672,14 @@ var AugmentcodeLegacyRule = class AugmentcodeLegacyRule extends ToolRule {
|
|
|
33593
33672
|
});
|
|
33594
33673
|
}
|
|
33595
33674
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath }) {
|
|
33675
|
+
const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
|
|
33596
33676
|
return new AugmentcodeLegacyRule({
|
|
33597
33677
|
outputRoot,
|
|
33598
33678
|
relativeDirPath,
|
|
33599
33679
|
relativeFilePath,
|
|
33600
33680
|
fileContent: "",
|
|
33601
33681
|
validate: false,
|
|
33602
|
-
root:
|
|
33682
|
+
root: isRoot
|
|
33603
33683
|
});
|
|
33604
33684
|
}
|
|
33605
33685
|
};
|
|
@@ -33835,13 +33915,14 @@ var ClaudecodeLegacyRule = class ClaudecodeLegacyRule extends ToolRule {
|
|
|
33835
33915
|
};
|
|
33836
33916
|
}
|
|
33837
33917
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath, global = false }) {
|
|
33918
|
+
const isRoot = relativeFilePath === this.getSettablePaths({ global }).root.relativeFilePath;
|
|
33838
33919
|
return new ClaudecodeLegacyRule({
|
|
33839
33920
|
outputRoot,
|
|
33840
33921
|
relativeDirPath,
|
|
33841
33922
|
relativeFilePath,
|
|
33842
33923
|
fileContent: "",
|
|
33843
33924
|
validate: false,
|
|
33844
|
-
root:
|
|
33925
|
+
root: isRoot
|
|
33845
33926
|
});
|
|
33846
33927
|
}
|
|
33847
33928
|
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
@@ -33940,6 +34021,7 @@ var ClaudecodeRule = class ClaudecodeRule extends ToolRule {
|
|
|
33940
34021
|
});
|
|
33941
34022
|
}
|
|
33942
34023
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath, global = false }) {
|
|
34024
|
+
const isRoot = relativeFilePath === this.getSettablePaths({ global }).root.relativeFilePath;
|
|
33943
34025
|
return new ClaudecodeRule({
|
|
33944
34026
|
outputRoot,
|
|
33945
34027
|
relativeDirPath,
|
|
@@ -33947,7 +34029,7 @@ var ClaudecodeRule = class ClaudecodeRule extends ToolRule {
|
|
|
33947
34029
|
frontmatter: {},
|
|
33948
34030
|
body: "",
|
|
33949
34031
|
validate: false,
|
|
33950
|
-
root:
|
|
34032
|
+
root: isRoot
|
|
33951
34033
|
});
|
|
33952
34034
|
}
|
|
33953
34035
|
static fromRulesyncRule({ outputRoot = process.cwd(), rulesyncRule, validate = true, global = false }) {
|
|
@@ -34463,6 +34545,13 @@ var CopilotRule = class CopilotRule extends ToolRule {
|
|
|
34463
34545
|
}
|
|
34464
34546
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath, global = false }) {
|
|
34465
34547
|
const paths = this.getSettablePaths({ global });
|
|
34548
|
+
const isRoot = sameRelativePath({
|
|
34549
|
+
dir: relativeDirPath,
|
|
34550
|
+
file: relativeFilePath
|
|
34551
|
+
}, {
|
|
34552
|
+
dir: paths.root.relativeDirPath,
|
|
34553
|
+
file: paths.root.relativeFilePath
|
|
34554
|
+
});
|
|
34466
34555
|
return new CopilotRule({
|
|
34467
34556
|
outputRoot,
|
|
34468
34557
|
relativeDirPath,
|
|
@@ -34470,13 +34559,7 @@ var CopilotRule = class CopilotRule extends ToolRule {
|
|
|
34470
34559
|
frontmatter: {},
|
|
34471
34560
|
body: "",
|
|
34472
34561
|
validate: false,
|
|
34473
|
-
root:
|
|
34474
|
-
dir: relativeDirPath,
|
|
34475
|
-
file: relativeFilePath
|
|
34476
|
-
}, {
|
|
34477
|
-
dir: paths.root.relativeDirPath,
|
|
34478
|
-
file: paths.root.relativeFilePath
|
|
34479
|
-
})
|
|
34562
|
+
root: isRoot
|
|
34480
34563
|
});
|
|
34481
34564
|
}
|
|
34482
34565
|
validate() {
|
|
@@ -35140,13 +35223,14 @@ var FactorydroidRule = class FactorydroidRule extends ToolRule {
|
|
|
35140
35223
|
}
|
|
35141
35224
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath, global = false }) {
|
|
35142
35225
|
const paths = this.getSettablePaths({ global });
|
|
35226
|
+
const isRoot = relativeFilePath === paths.root.relativeFilePath && relativeDirPath === paths.root.relativeDirPath;
|
|
35143
35227
|
return new FactorydroidRule({
|
|
35144
35228
|
outputRoot,
|
|
35145
35229
|
relativeDirPath,
|
|
35146
35230
|
relativeFilePath,
|
|
35147
35231
|
fileContent: "",
|
|
35148
35232
|
validate: false,
|
|
35149
|
-
root:
|
|
35233
|
+
root: isRoot
|
|
35150
35234
|
});
|
|
35151
35235
|
}
|
|
35152
35236
|
static fromRulesyncRule({ outputRoot = process.cwd(), rulesyncRule, validate = true, global = false }) {
|
|
@@ -35242,13 +35326,14 @@ var GooseRule = class GooseRule extends ToolRule {
|
|
|
35242
35326
|
}
|
|
35243
35327
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath, global = false }) {
|
|
35244
35328
|
const paths = this.getSettablePaths({ global });
|
|
35329
|
+
const isRoot = relativeFilePath === paths.root.relativeFilePath && (relativeDirPath === "." || relativeDirPath === paths.root.relativeDirPath);
|
|
35245
35330
|
return new GooseRule({
|
|
35246
35331
|
outputRoot,
|
|
35247
35332
|
relativeDirPath,
|
|
35248
35333
|
relativeFilePath,
|
|
35249
35334
|
fileContent: "",
|
|
35250
35335
|
validate: false,
|
|
35251
|
-
root:
|
|
35336
|
+
root: isRoot
|
|
35252
35337
|
});
|
|
35253
35338
|
}
|
|
35254
35339
|
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
@@ -35452,11 +35537,12 @@ var JunieRule = class JunieRule extends ToolRule {
|
|
|
35452
35537
|
const settablePaths = this.getSettablePaths();
|
|
35453
35538
|
if (!settablePaths.nonRoot) throw new Error("JunieRule project settable paths must include a nonRoot path");
|
|
35454
35539
|
const relativeDirPath = isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath;
|
|
35540
|
+
const fileContent = await readFileContent((0, node_path.join)(outputRoot, (0, node_path.join)(relativeDirPath, relativeFilePath)));
|
|
35455
35541
|
return new JunieRule({
|
|
35456
35542
|
outputRoot,
|
|
35457
35543
|
relativeDirPath,
|
|
35458
35544
|
relativeFilePath,
|
|
35459
|
-
fileContent
|
|
35545
|
+
fileContent,
|
|
35460
35546
|
validate,
|
|
35461
35547
|
root: isRoot
|
|
35462
35548
|
});
|
|
@@ -35491,13 +35577,14 @@ var JunieRule = class JunieRule extends ToolRule {
|
|
|
35491
35577
|
};
|
|
35492
35578
|
}
|
|
35493
35579
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath }) {
|
|
35580
|
+
const isRoot = JunieRule.isRootRelativeFilePath(relativeFilePath);
|
|
35494
35581
|
return new JunieRule({
|
|
35495
35582
|
outputRoot,
|
|
35496
35583
|
relativeDirPath,
|
|
35497
35584
|
relativeFilePath,
|
|
35498
35585
|
fileContent: "",
|
|
35499
35586
|
validate: false,
|
|
35500
|
-
root:
|
|
35587
|
+
root: isRoot
|
|
35501
35588
|
});
|
|
35502
35589
|
}
|
|
35503
35590
|
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
@@ -35571,13 +35658,14 @@ var KiloRule = class KiloRule extends ToolRule {
|
|
|
35571
35658
|
};
|
|
35572
35659
|
}
|
|
35573
35660
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath, global = false }) {
|
|
35661
|
+
const isRoot = relativeFilePath === this.getSettablePaths({ global }).root.relativeFilePath;
|
|
35574
35662
|
return new KiloRule({
|
|
35575
35663
|
outputRoot,
|
|
35576
35664
|
relativeDirPath,
|
|
35577
35665
|
relativeFilePath,
|
|
35578
35666
|
fileContent: "",
|
|
35579
35667
|
validate: false,
|
|
35580
|
-
root:
|
|
35668
|
+
root: isRoot
|
|
35581
35669
|
});
|
|
35582
35670
|
}
|
|
35583
35671
|
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
@@ -35666,11 +35754,12 @@ var KiroRule = class KiroRule extends ToolRule {
|
|
|
35666
35754
|
const paths = this.getSettablePaths({ global });
|
|
35667
35755
|
const isRoot = "root" in paths && relativeFilePath === paths.root.relativeFilePath;
|
|
35668
35756
|
const relativeDirPath = paths.nonRoot?.relativeDirPath ?? buildToolPath(".kiro", "steering");
|
|
35757
|
+
const fileContent = await readFileContent((0, node_path.join)(outputRoot, relativeDirPath, relativeFilePath));
|
|
35669
35758
|
return new KiroRule({
|
|
35670
35759
|
outputRoot,
|
|
35671
35760
|
relativeDirPath,
|
|
35672
35761
|
relativeFilePath,
|
|
35673
|
-
fileContent
|
|
35762
|
+
fileContent,
|
|
35674
35763
|
validate,
|
|
35675
35764
|
root: isRoot
|
|
35676
35765
|
});
|
|
@@ -35845,13 +35934,14 @@ var OpenCodeRule = class OpenCodeRule extends ToolRule {
|
|
|
35845
35934
|
};
|
|
35846
35935
|
}
|
|
35847
35936
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath, global = false }) {
|
|
35937
|
+
const isRoot = relativeFilePath === this.getSettablePaths({ global }).root.relativeFilePath;
|
|
35848
35938
|
return new OpenCodeRule({
|
|
35849
35939
|
outputRoot,
|
|
35850
35940
|
relativeDirPath,
|
|
35851
35941
|
relativeFilePath,
|
|
35852
35942
|
fileContent: "",
|
|
35853
35943
|
validate: false,
|
|
35854
|
-
root:
|
|
35944
|
+
root: isRoot
|
|
35855
35945
|
});
|
|
35856
35946
|
}
|
|
35857
35947
|
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
@@ -35936,13 +36026,14 @@ var PiRule = class PiRule extends ToolRule {
|
|
|
35936
36026
|
}
|
|
35937
36027
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath, global = false }) {
|
|
35938
36028
|
const { root } = this.getSettablePaths({ global });
|
|
36029
|
+
const isRoot = relativeFilePath === "AGENTS.md" && (relativeDirPath === "." || relativeDirPath === root.relativeDirPath);
|
|
35939
36030
|
return new PiRule({
|
|
35940
36031
|
outputRoot,
|
|
35941
36032
|
relativeDirPath,
|
|
35942
36033
|
relativeFilePath,
|
|
35943
36034
|
fileContent: "",
|
|
35944
36035
|
validate: false,
|
|
35945
|
-
root:
|
|
36036
|
+
root: isRoot
|
|
35946
36037
|
});
|
|
35947
36038
|
}
|
|
35948
36039
|
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
@@ -36286,13 +36377,14 @@ var ReplitRule = class ReplitRule extends ToolRule {
|
|
|
36286
36377
|
};
|
|
36287
36378
|
}
|
|
36288
36379
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath }) {
|
|
36380
|
+
const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
|
|
36289
36381
|
return new ReplitRule({
|
|
36290
36382
|
outputRoot,
|
|
36291
36383
|
relativeDirPath,
|
|
36292
36384
|
relativeFilePath,
|
|
36293
36385
|
fileContent: "",
|
|
36294
36386
|
validate: false,
|
|
36295
|
-
root:
|
|
36387
|
+
root: isRoot
|
|
36296
36388
|
});
|
|
36297
36389
|
}
|
|
36298
36390
|
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
@@ -36443,11 +36535,12 @@ var RovodevRule = class RovodevRule extends ToolRule {
|
|
|
36443
36535
|
}
|
|
36444
36536
|
static async fromModularFile({ outputRoot, relativeFilePath, relativeDirPath, validate, global }) {
|
|
36445
36537
|
if (!this.isAllowedModularRulesRelativePath(relativeFilePath)) throw new Error(`Reserved Rovodev memory basename under modular-rules (not a modular rule): ${(0, node_path.join)(relativeDirPath, relativeFilePath)}`);
|
|
36538
|
+
const fileContent = await readFileContent((0, node_path.join)(outputRoot, relativeDirPath, relativeFilePath));
|
|
36446
36539
|
return new RovodevRule({
|
|
36447
36540
|
outputRoot,
|
|
36448
36541
|
relativeDirPath,
|
|
36449
36542
|
relativeFilePath,
|
|
36450
|
-
fileContent
|
|
36543
|
+
fileContent,
|
|
36451
36544
|
validate,
|
|
36452
36545
|
global,
|
|
36453
36546
|
root: false
|
|
@@ -36458,11 +36551,12 @@ var RovodevRule = class RovodevRule extends ToolRule {
|
|
|
36458
36551
|
const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${(0, node_path.join)(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : (0, node_path.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
|
|
36459
36552
|
if (relativeFilePath !== "AGENTS.md") throw new Error(`Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${(0, node_path.join)(relativeDirPath, relativeFilePath)}`);
|
|
36460
36553
|
if (!(relativeDirPath === paths.root.relativeDirPath || "alternativeRoots" in paths && paths.alternativeRoots?.some((alt) => alt.relativeDirPath === relativeDirPath && alt.relativeFilePath === relativeFilePath))) throw new Error(`Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${(0, node_path.join)(relativeDirPath, relativeFilePath)}`);
|
|
36554
|
+
const fileContent = await readFileContent((0, node_path.join)(outputRoot, relativeDirPath, relativeFilePath));
|
|
36461
36555
|
return new RovodevRule({
|
|
36462
36556
|
outputRoot,
|
|
36463
36557
|
relativeDirPath,
|
|
36464
36558
|
relativeFilePath,
|
|
36465
|
-
fileContent
|
|
36559
|
+
fileContent,
|
|
36466
36560
|
validate,
|
|
36467
36561
|
global,
|
|
36468
36562
|
root: true
|
|
@@ -36653,16 +36747,18 @@ var TaktRule = class TaktRule extends ToolRule {
|
|
|
36653
36747
|
sourceLabel
|
|
36654
36748
|
});
|
|
36655
36749
|
const relativeFilePath = `${stem}.md`;
|
|
36750
|
+
const relativeDirPath = resolveTaktRuleFacet(taktSection?.facet) === "output-contracts" ? TAKT_OUTPUT_CONTRACTS_DIR_PATH : TAKT_RULES_DIR_PATH;
|
|
36751
|
+
const body = prependTaktExtends({
|
|
36752
|
+
extendsName: typeof taktSection?.extends === "string" ? taktSection.extends : void 0,
|
|
36753
|
+
body: rulesyncRule.getBody(),
|
|
36754
|
+
featureLabel: "rule",
|
|
36755
|
+
sourceLabel
|
|
36756
|
+
});
|
|
36656
36757
|
return new TaktRule({
|
|
36657
36758
|
outputRoot,
|
|
36658
|
-
relativeDirPath
|
|
36759
|
+
relativeDirPath,
|
|
36659
36760
|
relativeFilePath,
|
|
36660
|
-
body
|
|
36661
|
-
extendsName: typeof taktSection?.extends === "string" ? taktSection.extends : void 0,
|
|
36662
|
-
body: rulesyncRule.getBody(),
|
|
36663
|
-
featureLabel: "rule",
|
|
36664
|
-
sourceLabel
|
|
36665
|
-
}),
|
|
36761
|
+
body,
|
|
36666
36762
|
validate,
|
|
36667
36763
|
root: false
|
|
36668
36764
|
});
|
|
@@ -36730,13 +36826,14 @@ var VibeRule = class VibeRule extends ToolRule {
|
|
|
36730
36826
|
};
|
|
36731
36827
|
}
|
|
36732
36828
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath, global = false }) {
|
|
36829
|
+
const isRoot = relativeFilePath === this.getSettablePaths({ global }).root.relativeFilePath;
|
|
36733
36830
|
return new VibeRule({
|
|
36734
36831
|
outputRoot,
|
|
36735
36832
|
relativeDirPath,
|
|
36736
36833
|
relativeFilePath,
|
|
36737
36834
|
fileContent: "",
|
|
36738
36835
|
validate: false,
|
|
36739
|
-
root:
|
|
36836
|
+
root: isRoot
|
|
36740
36837
|
});
|
|
36741
36838
|
}
|
|
36742
36839
|
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
@@ -36798,13 +36895,14 @@ var WarpRule = class WarpRule extends ToolRule {
|
|
|
36798
36895
|
}
|
|
36799
36896
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath }) {
|
|
36800
36897
|
const { root } = this.getSettablePaths();
|
|
36898
|
+
const isRoot = relativeFilePath === root.relativeFilePath && relativeDirPath === root.relativeDirPath;
|
|
36801
36899
|
return new WarpRule({
|
|
36802
36900
|
outputRoot,
|
|
36803
36901
|
relativeDirPath,
|
|
36804
36902
|
relativeFilePath,
|
|
36805
36903
|
fileContent: "",
|
|
36806
36904
|
validate: false,
|
|
36807
|
-
root:
|
|
36905
|
+
root: isRoot
|
|
36808
36906
|
});
|
|
36809
36907
|
}
|
|
36810
36908
|
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
@@ -36869,13 +36967,14 @@ var ZedRule = class ZedRule extends ToolRule {
|
|
|
36869
36967
|
};
|
|
36870
36968
|
}
|
|
36871
36969
|
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath, global = false }) {
|
|
36970
|
+
const isRoot = relativeFilePath === this.getSettablePaths({ global }).root.relativeFilePath;
|
|
36872
36971
|
return new ZedRule({
|
|
36873
36972
|
outputRoot,
|
|
36874
36973
|
relativeDirPath,
|
|
36875
36974
|
relativeFilePath,
|
|
36876
36975
|
fileContent: "",
|
|
36877
36976
|
validate: false,
|
|
36878
|
-
root:
|
|
36977
|
+
root: isRoot
|
|
36879
36978
|
});
|
|
36880
36979
|
}
|
|
36881
36980
|
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
@@ -37601,19 +37700,24 @@ As this project's AI coding tool, you must follow the additional conventions bel
|
|
|
37601
37700
|
const localRootToolRules = await (async () => {
|
|
37602
37701
|
if (!forDeletion || this.global || factory.meta.localRootMode !== "separate-local-file" || !factory.meta.localRootFileName) return [];
|
|
37603
37702
|
const fileName = factory.meta.localRootFileName;
|
|
37604
|
-
if (factory.class.getLocalRootDeletionGlob)
|
|
37605
|
-
|
|
37606
|
-
|
|
37607
|
-
|
|
37703
|
+
if (factory.class.getLocalRootDeletionGlob) {
|
|
37704
|
+
const filePaths = await findFilesByGlobs(factory.class.getLocalRootDeletionGlob({
|
|
37705
|
+
outputRoot: this.outputRoot,
|
|
37706
|
+
fileName
|
|
37707
|
+
}));
|
|
37708
|
+
return buildDeletionRulesFromPaths(filePaths);
|
|
37709
|
+
}
|
|
37608
37710
|
if (!settablePaths.root) return [];
|
|
37609
|
-
|
|
37711
|
+
const filePaths = await findFilesWithFallback((0, node_path.join)(this.outputRoot, settablePaths.root.relativeDirPath ?? ".", fileName), settablePaths.alternativeRoots, (alt) => (0, node_path.join)(this.outputRoot, alt.relativeDirPath, fileName));
|
|
37712
|
+
return buildDeletionRulesFromPaths(filePaths);
|
|
37610
37713
|
})();
|
|
37611
37714
|
this.logger.debug(`Found ${localRootToolRules.length} local root tool rule files for deletion`);
|
|
37612
37715
|
const rootMirrorDeletionRules = await (async () => {
|
|
37613
37716
|
if (!forDeletion || this.global || !factory.meta.mirrorsRootToAgentsMd || !factory.class.getRootMirrorDeletionGlobs) return [];
|
|
37614
37717
|
const { primaryGlob, mirrorGlob } = factory.class.getRootMirrorDeletionGlobs({ outputRoot: this.outputRoot });
|
|
37615
37718
|
if ((await findFilesByGlobs(primaryGlob)).length === 0) return [];
|
|
37616
|
-
|
|
37719
|
+
const mirrorPaths = await findFilesByGlobs(mirrorGlob);
|
|
37720
|
+
return buildDeletionRulesFromPaths(mirrorPaths);
|
|
37617
37721
|
})();
|
|
37618
37722
|
const nonRootToolRules = await (async () => {
|
|
37619
37723
|
if (!settablePaths.nonRoot) return [];
|