rulesync 3.12.6 → 3.12.8
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/index.cjs +145 -137
- package/dist/index.js +136 -128
- package/package.json +11 -11
package/dist/index.cjs
CHANGED
|
@@ -548,7 +548,7 @@ var SimulatedCommand = class _SimulatedCommand extends ToolCommand {
|
|
|
548
548
|
var AgentsmdCommand = class _AgentsmdCommand extends SimulatedCommand {
|
|
549
549
|
static getSettablePaths() {
|
|
550
550
|
return {
|
|
551
|
-
relativeDirPath: ".agents
|
|
551
|
+
relativeDirPath: (0, import_node_path4.join)(".agents", "commands")
|
|
552
552
|
};
|
|
553
553
|
}
|
|
554
554
|
static fromRulesyncCommand({
|
|
@@ -663,7 +663,7 @@ var RulesyncCommand = class _RulesyncCommand extends RulesyncFile {
|
|
|
663
663
|
}
|
|
664
664
|
static getSettablePaths() {
|
|
665
665
|
return {
|
|
666
|
-
relativeDirPath: ".rulesync
|
|
666
|
+
relativeDirPath: (0, import_node_path5.join)(".rulesync", "commands")
|
|
667
667
|
};
|
|
668
668
|
}
|
|
669
669
|
getFrontmatter() {
|
|
@@ -1232,7 +1232,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
|
|
|
1232
1232
|
body;
|
|
1233
1233
|
static getSettablePaths() {
|
|
1234
1234
|
return {
|
|
1235
|
-
relativeDirPath: ".roo
|
|
1235
|
+
relativeDirPath: (0, import_node_path11.join)(".roo", "commands")
|
|
1236
1236
|
};
|
|
1237
1237
|
}
|
|
1238
1238
|
constructor({ frontmatter, body, ...rest }) {
|
|
@@ -2559,7 +2559,7 @@ var IgnoreProcessor = class extends FeatureProcessor {
|
|
|
2559
2559
|
try {
|
|
2560
2560
|
return [await RulesyncIgnore.fromFile()];
|
|
2561
2561
|
} catch (error) {
|
|
2562
|
-
logger.error(`
|
|
2562
|
+
logger.error(`Failed to load rulesync files: ${formatError(error)}`);
|
|
2563
2563
|
return [];
|
|
2564
2564
|
}
|
|
2565
2565
|
}
|
|
@@ -2572,7 +2572,7 @@ var IgnoreProcessor = class extends FeatureProcessor {
|
|
|
2572
2572
|
const toolIgnores = await this.loadToolIgnores();
|
|
2573
2573
|
return toolIgnores;
|
|
2574
2574
|
} catch (error) {
|
|
2575
|
-
logger.error(`
|
|
2575
|
+
logger.error(`Failed to load tool files: ${formatError(error)}`);
|
|
2576
2576
|
return [];
|
|
2577
2577
|
}
|
|
2578
2578
|
}
|
|
@@ -3776,10 +3776,13 @@ var McpProcessor = class extends FeatureProcessor {
|
|
|
3776
3776
|
};
|
|
3777
3777
|
|
|
3778
3778
|
// src/rules/rules-processor.ts
|
|
3779
|
-
var
|
|
3779
|
+
var import_node_path64 = require("path");
|
|
3780
3780
|
var import_fast_xml_parser = require("fast-xml-parser");
|
|
3781
3781
|
var import_mini21 = require("zod/mini");
|
|
3782
3782
|
|
|
3783
|
+
// src/subagents/agentsmd-subagent.ts
|
|
3784
|
+
var import_node_path36 = require("path");
|
|
3785
|
+
|
|
3783
3786
|
// src/subagents/simulated-subagent.ts
|
|
3784
3787
|
var import_node_path35 = require("path");
|
|
3785
3788
|
var import_mini13 = require("zod/mini");
|
|
@@ -3912,7 +3915,7 @@ var SimulatedSubagent = class extends ToolSubagent {
|
|
|
3912
3915
|
var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
|
|
3913
3916
|
static getSettablePaths() {
|
|
3914
3917
|
return {
|
|
3915
|
-
relativeDirPath: ".agents
|
|
3918
|
+
relativeDirPath: (0, import_node_path36.join)(".agents", "subagents")
|
|
3916
3919
|
};
|
|
3917
3920
|
}
|
|
3918
3921
|
static async fromFile(params) {
|
|
@@ -3932,10 +3935,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
|
|
|
3932
3935
|
};
|
|
3933
3936
|
|
|
3934
3937
|
// src/subagents/codexcli-subagent.ts
|
|
3938
|
+
var import_node_path37 = require("path");
|
|
3935
3939
|
var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
|
|
3936
3940
|
static getSettablePaths() {
|
|
3937
3941
|
return {
|
|
3938
|
-
relativeDirPath: ".codex
|
|
3942
|
+
relativeDirPath: (0, import_node_path37.join)(".codex", "subagents")
|
|
3939
3943
|
};
|
|
3940
3944
|
}
|
|
3941
3945
|
static async fromFile(params) {
|
|
@@ -3955,10 +3959,11 @@ var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
|
|
|
3955
3959
|
};
|
|
3956
3960
|
|
|
3957
3961
|
// src/subagents/copilot-subagent.ts
|
|
3962
|
+
var import_node_path38 = require("path");
|
|
3958
3963
|
var CopilotSubagent = class _CopilotSubagent extends SimulatedSubagent {
|
|
3959
3964
|
static getSettablePaths() {
|
|
3960
3965
|
return {
|
|
3961
|
-
relativeDirPath: ".github
|
|
3966
|
+
relativeDirPath: (0, import_node_path38.join)(".github", "subagents")
|
|
3962
3967
|
};
|
|
3963
3968
|
}
|
|
3964
3969
|
static async fromFile(params) {
|
|
@@ -3978,10 +3983,11 @@ var CopilotSubagent = class _CopilotSubagent extends SimulatedSubagent {
|
|
|
3978
3983
|
};
|
|
3979
3984
|
|
|
3980
3985
|
// src/subagents/cursor-subagent.ts
|
|
3986
|
+
var import_node_path39 = require("path");
|
|
3981
3987
|
var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
|
|
3982
3988
|
static getSettablePaths() {
|
|
3983
3989
|
return {
|
|
3984
|
-
relativeDirPath: ".cursor
|
|
3990
|
+
relativeDirPath: (0, import_node_path39.join)(".cursor", "subagents")
|
|
3985
3991
|
};
|
|
3986
3992
|
}
|
|
3987
3993
|
static async fromFile(params) {
|
|
@@ -4001,10 +4007,11 @@ var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
|
|
|
4001
4007
|
};
|
|
4002
4008
|
|
|
4003
4009
|
// src/subagents/geminicli-subagent.ts
|
|
4010
|
+
var import_node_path40 = require("path");
|
|
4004
4011
|
var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
|
|
4005
4012
|
static getSettablePaths() {
|
|
4006
4013
|
return {
|
|
4007
|
-
relativeDirPath: ".gemini
|
|
4014
|
+
relativeDirPath: (0, import_node_path40.join)(".gemini", "subagents")
|
|
4008
4015
|
};
|
|
4009
4016
|
}
|
|
4010
4017
|
static async fromFile(params) {
|
|
@@ -4024,10 +4031,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
|
|
|
4024
4031
|
};
|
|
4025
4032
|
|
|
4026
4033
|
// src/subagents/roo-subagent.ts
|
|
4034
|
+
var import_node_path41 = require("path");
|
|
4027
4035
|
var RooSubagent = class _RooSubagent extends SimulatedSubagent {
|
|
4028
4036
|
static getSettablePaths() {
|
|
4029
4037
|
return {
|
|
4030
|
-
relativeDirPath: ".roo
|
|
4038
|
+
relativeDirPath: (0, import_node_path41.join)(".roo", "subagents")
|
|
4031
4039
|
};
|
|
4032
4040
|
}
|
|
4033
4041
|
static async fromFile(params) {
|
|
@@ -4047,15 +4055,15 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
|
|
|
4047
4055
|
};
|
|
4048
4056
|
|
|
4049
4057
|
// src/subagents/subagents-processor.ts
|
|
4050
|
-
var
|
|
4058
|
+
var import_node_path44 = require("path");
|
|
4051
4059
|
var import_mini16 = require("zod/mini");
|
|
4052
4060
|
|
|
4053
4061
|
// src/subagents/claudecode-subagent.ts
|
|
4054
|
-
var
|
|
4062
|
+
var import_node_path43 = require("path");
|
|
4055
4063
|
var import_mini15 = require("zod/mini");
|
|
4056
4064
|
|
|
4057
4065
|
// src/subagents/rulesync-subagent.ts
|
|
4058
|
-
var
|
|
4066
|
+
var import_node_path42 = require("path");
|
|
4059
4067
|
var import_mini14 = require("zod/mini");
|
|
4060
4068
|
var RulesyncSubagentModelSchema = import_mini14.z.enum(["opus", "sonnet", "haiku", "inherit"]);
|
|
4061
4069
|
var RulesyncSubagentFrontmatterSchema = import_mini14.z.object({
|
|
@@ -4076,7 +4084,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
4076
4084
|
const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
4077
4085
|
if (!result.success) {
|
|
4078
4086
|
throw new Error(
|
|
4079
|
-
`Invalid frontmatter in ${(0,
|
|
4087
|
+
`Invalid frontmatter in ${(0, import_node_path42.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
4080
4088
|
);
|
|
4081
4089
|
}
|
|
4082
4090
|
}
|
|
@@ -4088,7 +4096,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
4088
4096
|
}
|
|
4089
4097
|
static getSettablePaths() {
|
|
4090
4098
|
return {
|
|
4091
|
-
relativeDirPath: ".rulesync
|
|
4099
|
+
relativeDirPath: (0, import_node_path42.join)(".rulesync", "subagents")
|
|
4092
4100
|
};
|
|
4093
4101
|
}
|
|
4094
4102
|
getFrontmatter() {
|
|
@@ -4108,7 +4116,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
4108
4116
|
return {
|
|
4109
4117
|
success: false,
|
|
4110
4118
|
error: new Error(
|
|
4111
|
-
`Invalid frontmatter in ${(0,
|
|
4119
|
+
`Invalid frontmatter in ${(0, import_node_path42.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
4112
4120
|
)
|
|
4113
4121
|
};
|
|
4114
4122
|
}
|
|
@@ -4116,13 +4124,13 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
4116
4124
|
static async fromFile({
|
|
4117
4125
|
relativeFilePath
|
|
4118
4126
|
}) {
|
|
4119
|
-
const fileContent = await readFileContent((0,
|
|
4127
|
+
const fileContent = await readFileContent((0, import_node_path42.join)(".rulesync", "subagents", relativeFilePath));
|
|
4120
4128
|
const { frontmatter, body: content } = parseFrontmatter(fileContent);
|
|
4121
4129
|
const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
4122
4130
|
if (!result.success) {
|
|
4123
4131
|
throw new Error(`Invalid frontmatter in ${relativeFilePath}: ${formatError(result.error)}`);
|
|
4124
4132
|
}
|
|
4125
|
-
const filename = (0,
|
|
4133
|
+
const filename = (0, import_node_path42.basename)(relativeFilePath);
|
|
4126
4134
|
return new _RulesyncSubagent({
|
|
4127
4135
|
baseDir: ".",
|
|
4128
4136
|
relativeDirPath: this.getSettablePaths().relativeDirPath,
|
|
@@ -4148,7 +4156,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
4148
4156
|
const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
4149
4157
|
if (!result.success) {
|
|
4150
4158
|
throw new Error(
|
|
4151
|
-
`Invalid frontmatter in ${(0,
|
|
4159
|
+
`Invalid frontmatter in ${(0, import_node_path43.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
4152
4160
|
);
|
|
4153
4161
|
}
|
|
4154
4162
|
}
|
|
@@ -4160,7 +4168,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
4160
4168
|
}
|
|
4161
4169
|
static getSettablePaths(_options = {}) {
|
|
4162
4170
|
return {
|
|
4163
|
-
relativeDirPath: (0,
|
|
4171
|
+
relativeDirPath: (0, import_node_path43.join)(".claude", "agents")
|
|
4164
4172
|
};
|
|
4165
4173
|
}
|
|
4166
4174
|
getFrontmatter() {
|
|
@@ -4186,7 +4194,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
4186
4194
|
// RulesyncCommand baseDir is always the project root directory
|
|
4187
4195
|
frontmatter: rulesyncFrontmatter,
|
|
4188
4196
|
body: this.body,
|
|
4189
|
-
relativeDirPath: ".rulesync
|
|
4197
|
+
relativeDirPath: (0, import_node_path43.join)(".rulesync", "subagents"),
|
|
4190
4198
|
relativeFilePath: this.getRelativeFilePath(),
|
|
4191
4199
|
fileContent,
|
|
4192
4200
|
validate: true
|
|
@@ -4228,7 +4236,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
4228
4236
|
return {
|
|
4229
4237
|
success: false,
|
|
4230
4238
|
error: new Error(
|
|
4231
|
-
`Invalid frontmatter in ${(0,
|
|
4239
|
+
`Invalid frontmatter in ${(0, import_node_path43.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
4232
4240
|
)
|
|
4233
4241
|
};
|
|
4234
4242
|
}
|
|
@@ -4246,7 +4254,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
4246
4254
|
global = false
|
|
4247
4255
|
}) {
|
|
4248
4256
|
const paths = this.getSettablePaths({ global });
|
|
4249
|
-
const filePath = (0,
|
|
4257
|
+
const filePath = (0, import_node_path43.join)(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
4250
4258
|
const fileContent = await readFileContent(filePath);
|
|
4251
4259
|
const { frontmatter, body: content } = parseFrontmatter(fileContent);
|
|
4252
4260
|
const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -4400,7 +4408,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
4400
4408
|
* Load and parse rulesync subagent files from .rulesync/subagents/ directory
|
|
4401
4409
|
*/
|
|
4402
4410
|
async loadRulesyncFiles() {
|
|
4403
|
-
const subagentsDir = (0,
|
|
4411
|
+
const subagentsDir = (0, import_node_path44.join)(RulesyncSubagent.getSettablePaths().relativeDirPath);
|
|
4404
4412
|
const dirExists = await directoryExists(subagentsDir);
|
|
4405
4413
|
if (!dirExists) {
|
|
4406
4414
|
logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
|
|
@@ -4415,7 +4423,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
4415
4423
|
logger.info(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
|
|
4416
4424
|
const rulesyncSubagents = [];
|
|
4417
4425
|
for (const mdFile of mdFiles) {
|
|
4418
|
-
const filepath = (0,
|
|
4426
|
+
const filepath = (0, import_node_path44.join)(subagentsDir, mdFile);
|
|
4419
4427
|
try {
|
|
4420
4428
|
const rulesyncSubagent = await RulesyncSubagent.fromFile({
|
|
4421
4429
|
relativeFilePath: mdFile,
|
|
@@ -4534,8 +4542,8 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
4534
4542
|
relativeDirPath,
|
|
4535
4543
|
fromFile
|
|
4536
4544
|
}) {
|
|
4537
|
-
const paths = await findFilesByGlobs((0,
|
|
4538
|
-
const subagents = (await Promise.allSettled(paths.map((path2) => fromFile((0,
|
|
4545
|
+
const paths = await findFilesByGlobs((0, import_node_path44.join)(this.baseDir, relativeDirPath, "*.md"));
|
|
4546
|
+
const subagents = (await Promise.allSettled(paths.map((path2) => fromFile((0, import_node_path44.basename)(path2))))).filter((r) => r.status === "fulfilled").map((r) => r.value);
|
|
4539
4547
|
logger.info(`Successfully loaded ${subagents.length} ${relativeDirPath} subagents`);
|
|
4540
4548
|
return subagents;
|
|
4541
4549
|
}
|
|
@@ -4562,13 +4570,13 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
4562
4570
|
};
|
|
4563
4571
|
|
|
4564
4572
|
// src/rules/agentsmd-rule.ts
|
|
4565
|
-
var
|
|
4573
|
+
var import_node_path47 = require("path");
|
|
4566
4574
|
|
|
4567
4575
|
// src/rules/tool-rule.ts
|
|
4568
|
-
var
|
|
4576
|
+
var import_node_path46 = require("path");
|
|
4569
4577
|
|
|
4570
4578
|
// src/rules/rulesync-rule.ts
|
|
4571
|
-
var
|
|
4579
|
+
var import_node_path45 = require("path");
|
|
4572
4580
|
var import_mini17 = require("zod/mini");
|
|
4573
4581
|
var RulesyncRuleFrontmatterSchema = import_mini17.z.object({
|
|
4574
4582
|
root: import_mini17.z.optional(import_mini17.z.optional(import_mini17.z.boolean())),
|
|
@@ -4597,7 +4605,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
|
|
|
4597
4605
|
const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
|
|
4598
4606
|
if (!result.success) {
|
|
4599
4607
|
throw new Error(
|
|
4600
|
-
`Invalid frontmatter in ${(0,
|
|
4608
|
+
`Invalid frontmatter in ${(0, import_node_path45.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
4601
4609
|
);
|
|
4602
4610
|
}
|
|
4603
4611
|
}
|
|
@@ -4611,7 +4619,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
|
|
|
4611
4619
|
static getSettablePaths() {
|
|
4612
4620
|
return {
|
|
4613
4621
|
recommended: {
|
|
4614
|
-
relativeDirPath: ".rulesync
|
|
4622
|
+
relativeDirPath: (0, import_node_path45.join)(".rulesync", "rules")
|
|
4615
4623
|
},
|
|
4616
4624
|
legacy: {
|
|
4617
4625
|
relativeDirPath: ".rulesync"
|
|
@@ -4632,7 +4640,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
|
|
|
4632
4640
|
return {
|
|
4633
4641
|
success: false,
|
|
4634
4642
|
error: new Error(
|
|
4635
|
-
`Invalid frontmatter in ${(0,
|
|
4643
|
+
`Invalid frontmatter in ${(0, import_node_path45.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
4636
4644
|
)
|
|
4637
4645
|
};
|
|
4638
4646
|
}
|
|
@@ -4641,8 +4649,8 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
|
|
|
4641
4649
|
relativeFilePath,
|
|
4642
4650
|
validate = true
|
|
4643
4651
|
}) {
|
|
4644
|
-
const legacyPath = (0,
|
|
4645
|
-
const recommendedPath = (0,
|
|
4652
|
+
const legacyPath = (0, import_node_path45.join)(this.getSettablePaths().legacy.relativeDirPath, relativeFilePath);
|
|
4653
|
+
const recommendedPath = (0, import_node_path45.join)(
|
|
4646
4654
|
this.getSettablePaths().recommended.relativeDirPath,
|
|
4647
4655
|
relativeFilePath
|
|
4648
4656
|
);
|
|
@@ -4661,7 +4669,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
|
|
|
4661
4669
|
agentsmd: result.data.agentsmd,
|
|
4662
4670
|
cursor: result.data.cursor
|
|
4663
4671
|
};
|
|
4664
|
-
const filename = (0,
|
|
4672
|
+
const filename = (0, import_node_path45.basename)(legacyPath);
|
|
4665
4673
|
return new _RulesyncRule({
|
|
4666
4674
|
baseDir: ".",
|
|
4667
4675
|
relativeDirPath: this.getSettablePaths().recommended.relativeDirPath,
|
|
@@ -4675,7 +4683,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
|
|
|
4675
4683
|
relativeFilePath,
|
|
4676
4684
|
validate = true
|
|
4677
4685
|
}) {
|
|
4678
|
-
const filePath = (0,
|
|
4686
|
+
const filePath = (0, import_node_path45.join)(this.getSettablePaths().recommended.relativeDirPath, relativeFilePath);
|
|
4679
4687
|
const fileContent = await readFileContent(filePath);
|
|
4680
4688
|
const { frontmatter, body: content } = parseFrontmatter(fileContent);
|
|
4681
4689
|
const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -4690,7 +4698,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
|
|
|
4690
4698
|
agentsmd: result.data.agentsmd,
|
|
4691
4699
|
cursor: result.data.cursor
|
|
4692
4700
|
};
|
|
4693
|
-
const filename = (0,
|
|
4701
|
+
const filename = (0, import_node_path45.basename)(filePath);
|
|
4694
4702
|
return new _RulesyncRule({
|
|
4695
4703
|
baseDir: ".",
|
|
4696
4704
|
relativeDirPath: this.getSettablePaths().recommended.relativeDirPath,
|
|
@@ -4765,7 +4773,7 @@ var ToolRule = class extends ToolFile {
|
|
|
4765
4773
|
rulesyncRule,
|
|
4766
4774
|
validate = true,
|
|
4767
4775
|
rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
|
|
4768
|
-
nonRootPath = { relativeDirPath: ".agents
|
|
4776
|
+
nonRootPath = { relativeDirPath: (0, import_node_path46.join)(".agents", "memories") }
|
|
4769
4777
|
}) {
|
|
4770
4778
|
const params = this.buildToolRuleParamsDefault({
|
|
4771
4779
|
baseDir,
|
|
@@ -4776,7 +4784,7 @@ var ToolRule = class extends ToolFile {
|
|
|
4776
4784
|
});
|
|
4777
4785
|
const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
|
|
4778
4786
|
if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
|
|
4779
|
-
params.relativeDirPath = (0,
|
|
4787
|
+
params.relativeDirPath = (0, import_node_path46.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
|
|
4780
4788
|
params.relativeFilePath = "AGENTS.md";
|
|
4781
4789
|
}
|
|
4782
4790
|
return params;
|
|
@@ -4785,7 +4793,7 @@ var ToolRule = class extends ToolFile {
|
|
|
4785
4793
|
return new RulesyncRule({
|
|
4786
4794
|
baseDir: ".",
|
|
4787
4795
|
// RulesyncRule baseDir is always the project root directory
|
|
4788
|
-
relativeDirPath: ".rulesync
|
|
4796
|
+
relativeDirPath: (0, import_node_path46.join)(".rulesync", "rules"),
|
|
4789
4797
|
relativeFilePath: this.getRelativeFilePath(),
|
|
4790
4798
|
frontmatter: {
|
|
4791
4799
|
root: this.isRoot(),
|
|
@@ -4842,7 +4850,7 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
|
|
|
4842
4850
|
relativeFilePath: "AGENTS.md"
|
|
4843
4851
|
},
|
|
4844
4852
|
nonRoot: {
|
|
4845
|
-
relativeDirPath: ".agents
|
|
4853
|
+
relativeDirPath: (0, import_node_path47.join)(".agents", "memories")
|
|
4846
4854
|
}
|
|
4847
4855
|
};
|
|
4848
4856
|
}
|
|
@@ -4852,8 +4860,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
|
|
|
4852
4860
|
validate = true
|
|
4853
4861
|
}) {
|
|
4854
4862
|
const isRoot = relativeFilePath === "AGENTS.md";
|
|
4855
|
-
const relativePath = isRoot ? "AGENTS.md" : (0,
|
|
4856
|
-
const fileContent = await readFileContent((0,
|
|
4863
|
+
const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path47.join)(".agents", "memories", relativeFilePath);
|
|
4864
|
+
const fileContent = await readFileContent((0, import_node_path47.join)(baseDir, relativePath));
|
|
4857
4865
|
return new _AgentsMdRule({
|
|
4858
4866
|
baseDir,
|
|
4859
4867
|
relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
|
|
@@ -4893,12 +4901,12 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
|
|
|
4893
4901
|
};
|
|
4894
4902
|
|
|
4895
4903
|
// src/rules/amazonqcli-rule.ts
|
|
4896
|
-
var
|
|
4904
|
+
var import_node_path48 = require("path");
|
|
4897
4905
|
var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
|
|
4898
4906
|
static getSettablePaths() {
|
|
4899
4907
|
return {
|
|
4900
4908
|
nonRoot: {
|
|
4901
|
-
relativeDirPath: ".amazonq
|
|
4909
|
+
relativeDirPath: (0, import_node_path48.join)(".amazonq", "rules")
|
|
4902
4910
|
}
|
|
4903
4911
|
};
|
|
4904
4912
|
}
|
|
@@ -4908,7 +4916,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
|
|
|
4908
4916
|
validate = true
|
|
4909
4917
|
}) {
|
|
4910
4918
|
const fileContent = await readFileContent(
|
|
4911
|
-
(0,
|
|
4919
|
+
(0, import_node_path48.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
4912
4920
|
);
|
|
4913
4921
|
return new _AmazonQCliRule({
|
|
4914
4922
|
baseDir,
|
|
@@ -4948,7 +4956,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
|
|
|
4948
4956
|
};
|
|
4949
4957
|
|
|
4950
4958
|
// src/rules/augmentcode-legacy-rule.ts
|
|
4951
|
-
var
|
|
4959
|
+
var import_node_path49 = require("path");
|
|
4952
4960
|
var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
|
|
4953
4961
|
toRulesyncRule() {
|
|
4954
4962
|
const rulesyncFrontmatter = {
|
|
@@ -4962,7 +4970,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
|
|
|
4962
4970
|
// RulesyncRule baseDir is always the project root directory
|
|
4963
4971
|
frontmatter: rulesyncFrontmatter,
|
|
4964
4972
|
body: this.getFileContent(),
|
|
4965
|
-
relativeDirPath: ".rulesync
|
|
4973
|
+
relativeDirPath: (0, import_node_path49.join)(".rulesync", "rules"),
|
|
4966
4974
|
relativeFilePath: this.getRelativeFilePath(),
|
|
4967
4975
|
validate: true
|
|
4968
4976
|
});
|
|
@@ -4974,7 +4982,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
|
|
|
4974
4982
|
relativeFilePath: ".augment-guidelines"
|
|
4975
4983
|
},
|
|
4976
4984
|
nonRoot: {
|
|
4977
|
-
relativeDirPath: ".augment
|
|
4985
|
+
relativeDirPath: (0, import_node_path49.join)(".augment", "rules")
|
|
4978
4986
|
}
|
|
4979
4987
|
};
|
|
4980
4988
|
}
|
|
@@ -5009,8 +5017,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
|
|
|
5009
5017
|
}) {
|
|
5010
5018
|
const settablePaths = this.getSettablePaths();
|
|
5011
5019
|
const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
|
|
5012
|
-
const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0,
|
|
5013
|
-
const fileContent = await readFileContent((0,
|
|
5020
|
+
const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path49.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
|
|
5021
|
+
const fileContent = await readFileContent((0, import_node_path49.join)(baseDir, relativePath));
|
|
5014
5022
|
return new _AugmentcodeLegacyRule({
|
|
5015
5023
|
baseDir,
|
|
5016
5024
|
relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
|
|
@@ -5023,7 +5031,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
|
|
|
5023
5031
|
};
|
|
5024
5032
|
|
|
5025
5033
|
// src/rules/augmentcode-rule.ts
|
|
5026
|
-
var
|
|
5034
|
+
var import_node_path50 = require("path");
|
|
5027
5035
|
var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
|
|
5028
5036
|
toRulesyncRule() {
|
|
5029
5037
|
return this.toRulesyncRuleDefault();
|
|
@@ -5031,7 +5039,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
|
|
|
5031
5039
|
static getSettablePaths() {
|
|
5032
5040
|
return {
|
|
5033
5041
|
nonRoot: {
|
|
5034
|
-
relativeDirPath: ".augment
|
|
5042
|
+
relativeDirPath: (0, import_node_path50.join)(".augment", "rules")
|
|
5035
5043
|
}
|
|
5036
5044
|
};
|
|
5037
5045
|
}
|
|
@@ -5055,7 +5063,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
|
|
|
5055
5063
|
validate = true
|
|
5056
5064
|
}) {
|
|
5057
5065
|
const fileContent = await readFileContent(
|
|
5058
|
-
(0,
|
|
5066
|
+
(0, import_node_path50.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
5059
5067
|
);
|
|
5060
5068
|
const { body: content } = parseFrontmatter(fileContent);
|
|
5061
5069
|
return new _AugmentcodeRule({
|
|
@@ -5078,7 +5086,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
|
|
|
5078
5086
|
};
|
|
5079
5087
|
|
|
5080
5088
|
// src/rules/claudecode-rule.ts
|
|
5081
|
-
var
|
|
5089
|
+
var import_node_path51 = require("path");
|
|
5082
5090
|
var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
5083
5091
|
static getSettablePaths({
|
|
5084
5092
|
global
|
|
@@ -5097,7 +5105,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
5097
5105
|
relativeFilePath: "CLAUDE.md"
|
|
5098
5106
|
},
|
|
5099
5107
|
nonRoot: {
|
|
5100
|
-
relativeDirPath: (0,
|
|
5108
|
+
relativeDirPath: (0, import_node_path51.join)(".claude", "memories")
|
|
5101
5109
|
}
|
|
5102
5110
|
};
|
|
5103
5111
|
}
|
|
@@ -5112,7 +5120,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
5112
5120
|
if (isRoot) {
|
|
5113
5121
|
const relativePath2 = paths.root.relativeFilePath;
|
|
5114
5122
|
const fileContent2 = await readFileContent(
|
|
5115
|
-
(0,
|
|
5123
|
+
(0, import_node_path51.join)(baseDir, paths.root.relativeDirPath, relativePath2)
|
|
5116
5124
|
);
|
|
5117
5125
|
return new _ClaudecodeRule({
|
|
5118
5126
|
baseDir,
|
|
@@ -5126,8 +5134,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
5126
5134
|
if (!paths.nonRoot) {
|
|
5127
5135
|
throw new Error("nonRoot path is not set");
|
|
5128
5136
|
}
|
|
5129
|
-
const relativePath = (0,
|
|
5130
|
-
const fileContent = await readFileContent((0,
|
|
5137
|
+
const relativePath = (0, import_node_path51.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
5138
|
+
const fileContent = await readFileContent((0, import_node_path51.join)(baseDir, relativePath));
|
|
5131
5139
|
return new _ClaudecodeRule({
|
|
5132
5140
|
baseDir,
|
|
5133
5141
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -5169,7 +5177,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
5169
5177
|
};
|
|
5170
5178
|
|
|
5171
5179
|
// src/rules/cline-rule.ts
|
|
5172
|
-
var
|
|
5180
|
+
var import_node_path52 = require("path");
|
|
5173
5181
|
var import_mini18 = require("zod/mini");
|
|
5174
5182
|
var ClineRuleFrontmatterSchema = import_mini18.z.object({
|
|
5175
5183
|
description: import_mini18.z.string()
|
|
@@ -5214,7 +5222,7 @@ var ClineRule = class _ClineRule extends ToolRule {
|
|
|
5214
5222
|
validate = true
|
|
5215
5223
|
}) {
|
|
5216
5224
|
const fileContent = await readFileContent(
|
|
5217
|
-
(0,
|
|
5225
|
+
(0, import_node_path52.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
5218
5226
|
);
|
|
5219
5227
|
return new _ClineRule({
|
|
5220
5228
|
baseDir,
|
|
@@ -5227,7 +5235,7 @@ var ClineRule = class _ClineRule extends ToolRule {
|
|
|
5227
5235
|
};
|
|
5228
5236
|
|
|
5229
5237
|
// src/rules/codexcli-rule.ts
|
|
5230
|
-
var
|
|
5238
|
+
var import_node_path53 = require("path");
|
|
5231
5239
|
var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
5232
5240
|
static getSettablePaths({
|
|
5233
5241
|
global
|
|
@@ -5246,7 +5254,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
5246
5254
|
relativeFilePath: "AGENTS.md"
|
|
5247
5255
|
},
|
|
5248
5256
|
nonRoot: {
|
|
5249
|
-
relativeDirPath: ".codex
|
|
5257
|
+
relativeDirPath: (0, import_node_path53.join)(".codex", "memories")
|
|
5250
5258
|
}
|
|
5251
5259
|
};
|
|
5252
5260
|
}
|
|
@@ -5261,7 +5269,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
5261
5269
|
if (isRoot) {
|
|
5262
5270
|
const relativePath2 = paths.root.relativeFilePath;
|
|
5263
5271
|
const fileContent2 = await readFileContent(
|
|
5264
|
-
(0,
|
|
5272
|
+
(0, import_node_path53.join)(baseDir, paths.root.relativeDirPath, relativePath2)
|
|
5265
5273
|
);
|
|
5266
5274
|
return new _CodexcliRule({
|
|
5267
5275
|
baseDir,
|
|
@@ -5275,8 +5283,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
5275
5283
|
if (!paths.nonRoot) {
|
|
5276
5284
|
throw new Error("nonRoot path is not set");
|
|
5277
5285
|
}
|
|
5278
|
-
const relativePath = (0,
|
|
5279
|
-
const fileContent = await readFileContent((0,
|
|
5286
|
+
const relativePath = (0, import_node_path53.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
5287
|
+
const fileContent = await readFileContent((0, import_node_path53.join)(baseDir, relativePath));
|
|
5280
5288
|
return new _CodexcliRule({
|
|
5281
5289
|
baseDir,
|
|
5282
5290
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -5318,7 +5326,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
5318
5326
|
};
|
|
5319
5327
|
|
|
5320
5328
|
// src/rules/copilot-rule.ts
|
|
5321
|
-
var
|
|
5329
|
+
var import_node_path54 = require("path");
|
|
5322
5330
|
var import_mini19 = require("zod/mini");
|
|
5323
5331
|
var CopilotRuleFrontmatterSchema = import_mini19.z.object({
|
|
5324
5332
|
description: import_mini19.z.optional(import_mini19.z.string()),
|
|
@@ -5334,7 +5342,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
5334
5342
|
relativeFilePath: "copilot-instructions.md"
|
|
5335
5343
|
},
|
|
5336
5344
|
nonRoot: {
|
|
5337
|
-
relativeDirPath: ".github
|
|
5345
|
+
relativeDirPath: (0, import_node_path54.join)(".github", "instructions")
|
|
5338
5346
|
}
|
|
5339
5347
|
};
|
|
5340
5348
|
}
|
|
@@ -5343,7 +5351,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
5343
5351
|
const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
|
|
5344
5352
|
if (!result.success) {
|
|
5345
5353
|
throw new Error(
|
|
5346
|
-
`Invalid frontmatter in ${(0,
|
|
5354
|
+
`Invalid frontmatter in ${(0, import_node_path54.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
5347
5355
|
);
|
|
5348
5356
|
}
|
|
5349
5357
|
}
|
|
@@ -5368,7 +5376,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
5368
5376
|
baseDir: this.getBaseDir(),
|
|
5369
5377
|
frontmatter: rulesyncFrontmatter,
|
|
5370
5378
|
body: this.body,
|
|
5371
|
-
relativeDirPath: ".rulesync
|
|
5379
|
+
relativeDirPath: (0, import_node_path54.join)(".rulesync", "rules"),
|
|
5372
5380
|
relativeFilePath,
|
|
5373
5381
|
validate: true
|
|
5374
5382
|
});
|
|
@@ -5415,11 +5423,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
5415
5423
|
validate = true
|
|
5416
5424
|
}) {
|
|
5417
5425
|
const isRoot = relativeFilePath === "copilot-instructions.md";
|
|
5418
|
-
const relativePath = isRoot ? (0,
|
|
5426
|
+
const relativePath = isRoot ? (0, import_node_path54.join)(
|
|
5419
5427
|
this.getSettablePaths().root.relativeDirPath,
|
|
5420
5428
|
this.getSettablePaths().root.relativeFilePath
|
|
5421
|
-
) : (0,
|
|
5422
|
-
const fileContent = await readFileContent((0,
|
|
5429
|
+
) : (0, import_node_path54.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
|
|
5430
|
+
const fileContent = await readFileContent((0, import_node_path54.join)(baseDir, relativePath));
|
|
5423
5431
|
if (isRoot) {
|
|
5424
5432
|
return new _CopilotRule({
|
|
5425
5433
|
baseDir,
|
|
@@ -5438,7 +5446,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
5438
5446
|
const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
|
|
5439
5447
|
if (!result.success) {
|
|
5440
5448
|
throw new Error(
|
|
5441
|
-
`Invalid frontmatter in ${(0,
|
|
5449
|
+
`Invalid frontmatter in ${(0, import_node_path54.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
|
|
5442
5450
|
);
|
|
5443
5451
|
}
|
|
5444
5452
|
return new _CopilotRule({
|
|
@@ -5462,7 +5470,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
5462
5470
|
return {
|
|
5463
5471
|
success: false,
|
|
5464
5472
|
error: new Error(
|
|
5465
|
-
`Invalid frontmatter in ${(0,
|
|
5473
|
+
`Invalid frontmatter in ${(0, import_node_path54.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
5466
5474
|
)
|
|
5467
5475
|
};
|
|
5468
5476
|
}
|
|
@@ -5482,7 +5490,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
5482
5490
|
};
|
|
5483
5491
|
|
|
5484
5492
|
// src/rules/cursor-rule.ts
|
|
5485
|
-
var
|
|
5493
|
+
var import_node_path55 = require("path");
|
|
5486
5494
|
var import_mini20 = require("zod/mini");
|
|
5487
5495
|
var CursorRuleFrontmatterSchema = import_mini20.z.object({
|
|
5488
5496
|
description: import_mini20.z.optional(import_mini20.z.string()),
|
|
@@ -5495,7 +5503,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
5495
5503
|
static getSettablePaths() {
|
|
5496
5504
|
return {
|
|
5497
5505
|
nonRoot: {
|
|
5498
|
-
relativeDirPath: ".cursor
|
|
5506
|
+
relativeDirPath: (0, import_node_path55.join)(".cursor", "rules")
|
|
5499
5507
|
}
|
|
5500
5508
|
};
|
|
5501
5509
|
}
|
|
@@ -5504,7 +5512,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
5504
5512
|
const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
|
|
5505
5513
|
if (!result.success) {
|
|
5506
5514
|
throw new Error(
|
|
5507
|
-
`Invalid frontmatter in ${(0,
|
|
5515
|
+
`Invalid frontmatter in ${(0, import_node_path55.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
5508
5516
|
);
|
|
5509
5517
|
}
|
|
5510
5518
|
}
|
|
@@ -5576,7 +5584,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
5576
5584
|
return new RulesyncRule({
|
|
5577
5585
|
frontmatter: rulesyncFrontmatter,
|
|
5578
5586
|
body: this.body,
|
|
5579
|
-
relativeDirPath: ".rulesync
|
|
5587
|
+
relativeDirPath: (0, import_node_path55.join)(".rulesync", "rules"),
|
|
5580
5588
|
relativeFilePath: this.relativeFilePath.replace(/\.mdc$/, ".md"),
|
|
5581
5589
|
validate: true
|
|
5582
5590
|
});
|
|
@@ -5621,19 +5629,19 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
5621
5629
|
validate = true
|
|
5622
5630
|
}) {
|
|
5623
5631
|
const fileContent = await readFileContent(
|
|
5624
|
-
(0,
|
|
5632
|
+
(0, import_node_path55.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
5625
5633
|
);
|
|
5626
5634
|
const { frontmatter, body: content } = _CursorRule.parseCursorFrontmatter(fileContent);
|
|
5627
5635
|
const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
|
|
5628
5636
|
if (!result.success) {
|
|
5629
5637
|
throw new Error(
|
|
5630
|
-
`Invalid frontmatter in ${(0,
|
|
5638
|
+
`Invalid frontmatter in ${(0, import_node_path55.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
|
|
5631
5639
|
);
|
|
5632
5640
|
}
|
|
5633
5641
|
return new _CursorRule({
|
|
5634
5642
|
baseDir,
|
|
5635
5643
|
relativeDirPath: this.getSettablePaths().nonRoot.relativeDirPath,
|
|
5636
|
-
relativeFilePath: (0,
|
|
5644
|
+
relativeFilePath: (0, import_node_path55.basename)(relativeFilePath),
|
|
5637
5645
|
frontmatter: result.data,
|
|
5638
5646
|
body: content.trim(),
|
|
5639
5647
|
validate
|
|
@@ -5650,7 +5658,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
5650
5658
|
return {
|
|
5651
5659
|
success: false,
|
|
5652
5660
|
error: new Error(
|
|
5653
|
-
`Invalid frontmatter in ${(0,
|
|
5661
|
+
`Invalid frontmatter in ${(0, import_node_path55.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
5654
5662
|
)
|
|
5655
5663
|
};
|
|
5656
5664
|
}
|
|
@@ -5670,7 +5678,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
5670
5678
|
};
|
|
5671
5679
|
|
|
5672
5680
|
// src/rules/geminicli-rule.ts
|
|
5673
|
-
var
|
|
5681
|
+
var import_node_path56 = require("path");
|
|
5674
5682
|
var GeminiCliRule = class _GeminiCliRule extends ToolRule {
|
|
5675
5683
|
static getSettablePaths({
|
|
5676
5684
|
global
|
|
@@ -5689,7 +5697,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
|
|
|
5689
5697
|
relativeFilePath: "GEMINI.md"
|
|
5690
5698
|
},
|
|
5691
5699
|
nonRoot: {
|
|
5692
|
-
relativeDirPath: ".gemini
|
|
5700
|
+
relativeDirPath: (0, import_node_path56.join)(".gemini", "memories")
|
|
5693
5701
|
}
|
|
5694
5702
|
};
|
|
5695
5703
|
}
|
|
@@ -5704,7 +5712,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
|
|
|
5704
5712
|
if (isRoot) {
|
|
5705
5713
|
const relativePath2 = paths.root.relativeFilePath;
|
|
5706
5714
|
const fileContent2 = await readFileContent(
|
|
5707
|
-
(0,
|
|
5715
|
+
(0, import_node_path56.join)(baseDir, paths.root.relativeDirPath, relativePath2)
|
|
5708
5716
|
);
|
|
5709
5717
|
return new _GeminiCliRule({
|
|
5710
5718
|
baseDir,
|
|
@@ -5718,8 +5726,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
|
|
|
5718
5726
|
if (!paths.nonRoot) {
|
|
5719
5727
|
throw new Error("nonRoot path is not set");
|
|
5720
5728
|
}
|
|
5721
|
-
const relativePath = (0,
|
|
5722
|
-
const fileContent = await readFileContent((0,
|
|
5729
|
+
const relativePath = (0, import_node_path56.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
5730
|
+
const fileContent = await readFileContent((0, import_node_path56.join)(baseDir, relativePath));
|
|
5723
5731
|
return new _GeminiCliRule({
|
|
5724
5732
|
baseDir,
|
|
5725
5733
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -5761,7 +5769,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
|
|
|
5761
5769
|
};
|
|
5762
5770
|
|
|
5763
5771
|
// src/rules/junie-rule.ts
|
|
5764
|
-
var
|
|
5772
|
+
var import_node_path57 = require("path");
|
|
5765
5773
|
var JunieRule = class _JunieRule extends ToolRule {
|
|
5766
5774
|
static getSettablePaths() {
|
|
5767
5775
|
return {
|
|
@@ -5770,7 +5778,7 @@ var JunieRule = class _JunieRule extends ToolRule {
|
|
|
5770
5778
|
relativeFilePath: "guidelines.md"
|
|
5771
5779
|
},
|
|
5772
5780
|
nonRoot: {
|
|
5773
|
-
relativeDirPath: ".junie
|
|
5781
|
+
relativeDirPath: (0, import_node_path57.join)(".junie", "memories")
|
|
5774
5782
|
}
|
|
5775
5783
|
};
|
|
5776
5784
|
}
|
|
@@ -5780,8 +5788,8 @@ var JunieRule = class _JunieRule extends ToolRule {
|
|
|
5780
5788
|
validate = true
|
|
5781
5789
|
}) {
|
|
5782
5790
|
const isRoot = relativeFilePath === "guidelines.md";
|
|
5783
|
-
const relativePath = isRoot ? "guidelines.md" : (0,
|
|
5784
|
-
const fileContent = await readFileContent((0,
|
|
5791
|
+
const relativePath = isRoot ? "guidelines.md" : (0, import_node_path57.join)(".junie", "memories", relativeFilePath);
|
|
5792
|
+
const fileContent = await readFileContent((0, import_node_path57.join)(baseDir, relativePath));
|
|
5785
5793
|
return new _JunieRule({
|
|
5786
5794
|
baseDir,
|
|
5787
5795
|
relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
|
|
@@ -5821,12 +5829,12 @@ var JunieRule = class _JunieRule extends ToolRule {
|
|
|
5821
5829
|
};
|
|
5822
5830
|
|
|
5823
5831
|
// src/rules/kiro-rule.ts
|
|
5824
|
-
var
|
|
5832
|
+
var import_node_path58 = require("path");
|
|
5825
5833
|
var KiroRule = class _KiroRule extends ToolRule {
|
|
5826
5834
|
static getSettablePaths() {
|
|
5827
5835
|
return {
|
|
5828
5836
|
nonRoot: {
|
|
5829
|
-
relativeDirPath: ".kiro
|
|
5837
|
+
relativeDirPath: (0, import_node_path58.join)(".kiro", "steering")
|
|
5830
5838
|
}
|
|
5831
5839
|
};
|
|
5832
5840
|
}
|
|
@@ -5836,7 +5844,7 @@ var KiroRule = class _KiroRule extends ToolRule {
|
|
|
5836
5844
|
validate = true
|
|
5837
5845
|
}) {
|
|
5838
5846
|
const fileContent = await readFileContent(
|
|
5839
|
-
(0,
|
|
5847
|
+
(0, import_node_path58.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
5840
5848
|
);
|
|
5841
5849
|
return new _KiroRule({
|
|
5842
5850
|
baseDir,
|
|
@@ -5876,7 +5884,7 @@ var KiroRule = class _KiroRule extends ToolRule {
|
|
|
5876
5884
|
};
|
|
5877
5885
|
|
|
5878
5886
|
// src/rules/opencode-rule.ts
|
|
5879
|
-
var
|
|
5887
|
+
var import_node_path59 = require("path");
|
|
5880
5888
|
var OpenCodeRule = class _OpenCodeRule extends ToolRule {
|
|
5881
5889
|
static getSettablePaths() {
|
|
5882
5890
|
return {
|
|
@@ -5885,7 +5893,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
|
|
|
5885
5893
|
relativeFilePath: "AGENTS.md"
|
|
5886
5894
|
},
|
|
5887
5895
|
nonRoot: {
|
|
5888
|
-
relativeDirPath: ".opencode
|
|
5896
|
+
relativeDirPath: (0, import_node_path59.join)(".opencode", "memories")
|
|
5889
5897
|
}
|
|
5890
5898
|
};
|
|
5891
5899
|
}
|
|
@@ -5895,8 +5903,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
|
|
|
5895
5903
|
validate = true
|
|
5896
5904
|
}) {
|
|
5897
5905
|
const isRoot = relativeFilePath === "AGENTS.md";
|
|
5898
|
-
const relativePath = isRoot ? "AGENTS.md" : (0,
|
|
5899
|
-
const fileContent = await readFileContent((0,
|
|
5906
|
+
const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path59.join)(".opencode", "memories", relativeFilePath);
|
|
5907
|
+
const fileContent = await readFileContent((0, import_node_path59.join)(baseDir, relativePath));
|
|
5900
5908
|
return new _OpenCodeRule({
|
|
5901
5909
|
baseDir,
|
|
5902
5910
|
relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
|
|
@@ -5936,7 +5944,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
|
|
|
5936
5944
|
};
|
|
5937
5945
|
|
|
5938
5946
|
// src/rules/qwencode-rule.ts
|
|
5939
|
-
var
|
|
5947
|
+
var import_node_path60 = require("path");
|
|
5940
5948
|
var QwencodeRule = class _QwencodeRule extends ToolRule {
|
|
5941
5949
|
static getSettablePaths() {
|
|
5942
5950
|
return {
|
|
@@ -5945,7 +5953,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
|
|
|
5945
5953
|
relativeFilePath: "QWEN.md"
|
|
5946
5954
|
},
|
|
5947
5955
|
nonRoot: {
|
|
5948
|
-
relativeDirPath: ".qwen
|
|
5956
|
+
relativeDirPath: (0, import_node_path60.join)(".qwen", "memories")
|
|
5949
5957
|
}
|
|
5950
5958
|
};
|
|
5951
5959
|
}
|
|
@@ -5955,8 +5963,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
|
|
|
5955
5963
|
validate = true
|
|
5956
5964
|
}) {
|
|
5957
5965
|
const isRoot = relativeFilePath === "QWEN.md";
|
|
5958
|
-
const relativePath = isRoot ? "QWEN.md" : (0,
|
|
5959
|
-
const fileContent = await readFileContent((0,
|
|
5966
|
+
const relativePath = isRoot ? "QWEN.md" : (0, import_node_path60.join)(".qwen", "memories", relativeFilePath);
|
|
5967
|
+
const fileContent = await readFileContent((0, import_node_path60.join)(baseDir, relativePath));
|
|
5960
5968
|
return new _QwencodeRule({
|
|
5961
5969
|
baseDir,
|
|
5962
5970
|
relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
|
|
@@ -5993,12 +6001,12 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
|
|
|
5993
6001
|
};
|
|
5994
6002
|
|
|
5995
6003
|
// src/rules/roo-rule.ts
|
|
5996
|
-
var
|
|
6004
|
+
var import_node_path61 = require("path");
|
|
5997
6005
|
var RooRule = class _RooRule extends ToolRule {
|
|
5998
6006
|
static getSettablePaths() {
|
|
5999
6007
|
return {
|
|
6000
6008
|
nonRoot: {
|
|
6001
|
-
relativeDirPath: ".roo
|
|
6009
|
+
relativeDirPath: (0, import_node_path61.join)(".roo", "rules")
|
|
6002
6010
|
}
|
|
6003
6011
|
};
|
|
6004
6012
|
}
|
|
@@ -6008,7 +6016,7 @@ var RooRule = class _RooRule extends ToolRule {
|
|
|
6008
6016
|
validate = true
|
|
6009
6017
|
}) {
|
|
6010
6018
|
const fileContent = await readFileContent(
|
|
6011
|
-
(0,
|
|
6019
|
+
(0, import_node_path61.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
6012
6020
|
);
|
|
6013
6021
|
return new _RooRule({
|
|
6014
6022
|
baseDir,
|
|
@@ -6063,7 +6071,7 @@ var RooRule = class _RooRule extends ToolRule {
|
|
|
6063
6071
|
};
|
|
6064
6072
|
|
|
6065
6073
|
// src/rules/warp-rule.ts
|
|
6066
|
-
var
|
|
6074
|
+
var import_node_path62 = require("path");
|
|
6067
6075
|
var WarpRule = class _WarpRule extends ToolRule {
|
|
6068
6076
|
constructor({ fileContent, root, ...rest }) {
|
|
6069
6077
|
super({
|
|
@@ -6079,7 +6087,7 @@ var WarpRule = class _WarpRule extends ToolRule {
|
|
|
6079
6087
|
relativeFilePath: "WARP.md"
|
|
6080
6088
|
},
|
|
6081
6089
|
nonRoot: {
|
|
6082
|
-
relativeDirPath: ".warp
|
|
6090
|
+
relativeDirPath: (0, import_node_path62.join)(".warp", "memories")
|
|
6083
6091
|
}
|
|
6084
6092
|
};
|
|
6085
6093
|
}
|
|
@@ -6089,8 +6097,8 @@ var WarpRule = class _WarpRule extends ToolRule {
|
|
|
6089
6097
|
validate = true
|
|
6090
6098
|
}) {
|
|
6091
6099
|
const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
|
|
6092
|
-
const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0,
|
|
6093
|
-
const fileContent = await readFileContent((0,
|
|
6100
|
+
const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path62.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
|
|
6101
|
+
const fileContent = await readFileContent((0, import_node_path62.join)(baseDir, relativePath));
|
|
6094
6102
|
return new _WarpRule({
|
|
6095
6103
|
baseDir,
|
|
6096
6104
|
relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
|
|
@@ -6130,12 +6138,12 @@ var WarpRule = class _WarpRule extends ToolRule {
|
|
|
6130
6138
|
};
|
|
6131
6139
|
|
|
6132
6140
|
// src/rules/windsurf-rule.ts
|
|
6133
|
-
var
|
|
6141
|
+
var import_node_path63 = require("path");
|
|
6134
6142
|
var WindsurfRule = class _WindsurfRule extends ToolRule {
|
|
6135
6143
|
static getSettablePaths() {
|
|
6136
6144
|
return {
|
|
6137
6145
|
nonRoot: {
|
|
6138
|
-
relativeDirPath: ".windsurf
|
|
6146
|
+
relativeDirPath: (0, import_node_path63.join)(".windsurf", "rules")
|
|
6139
6147
|
}
|
|
6140
6148
|
};
|
|
6141
6149
|
}
|
|
@@ -6145,7 +6153,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
|
|
|
6145
6153
|
validate = true
|
|
6146
6154
|
}) {
|
|
6147
6155
|
const fileContent = await readFileContent(
|
|
6148
|
-
(0,
|
|
6156
|
+
(0, import_node_path63.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
6149
6157
|
);
|
|
6150
6158
|
return new _WindsurfRule({
|
|
6151
6159
|
baseDir,
|
|
@@ -6545,10 +6553,10 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
6545
6553
|
* Load and parse rulesync rule files from .rulesync/rules/ directory
|
|
6546
6554
|
*/
|
|
6547
6555
|
async loadRulesyncFiles() {
|
|
6548
|
-
const files = await findFilesByGlobs((0,
|
|
6556
|
+
const files = await findFilesByGlobs((0, import_node_path64.join)(".rulesync", "rules", "*.md"));
|
|
6549
6557
|
logger.debug(`Found ${files.length} rulesync files`);
|
|
6550
6558
|
const rulesyncRules = await Promise.all(
|
|
6551
|
-
files.map((file) => RulesyncRule.fromFile({ relativeFilePath: (0,
|
|
6559
|
+
files.map((file) => RulesyncRule.fromFile({ relativeFilePath: (0, import_node_path64.basename)(file) }))
|
|
6552
6560
|
);
|
|
6553
6561
|
const rootRules = rulesyncRules.filter((rule) => rule.getFrontmatter().root);
|
|
6554
6562
|
if (rootRules.length > 1) {
|
|
@@ -6566,10 +6574,10 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
6566
6574
|
return rulesyncRules;
|
|
6567
6575
|
}
|
|
6568
6576
|
async loadRulesyncFilesLegacy() {
|
|
6569
|
-
const legacyFiles = await findFilesByGlobs((0,
|
|
6577
|
+
const legacyFiles = await findFilesByGlobs((0, import_node_path64.join)(".rulesync", "*.md"));
|
|
6570
6578
|
logger.debug(`Found ${legacyFiles.length} legacy rulesync files`);
|
|
6571
6579
|
return Promise.all(
|
|
6572
|
-
legacyFiles.map((file) => RulesyncRule.fromFileLegacy({ relativeFilePath: (0,
|
|
6580
|
+
legacyFiles.map((file) => RulesyncRule.fromFileLegacy({ relativeFilePath: (0, import_node_path64.basename)(file) }))
|
|
6573
6581
|
);
|
|
6574
6582
|
}
|
|
6575
6583
|
/**
|
|
@@ -6617,7 +6625,7 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
6617
6625
|
throw new Error(`Unsupported tool target: ${this.toolTarget}`);
|
|
6618
6626
|
}
|
|
6619
6627
|
} catch (error) {
|
|
6620
|
-
logger.error(`
|
|
6628
|
+
logger.error(`Failed to load tool files: ${formatError(error)}`);
|
|
6621
6629
|
return [];
|
|
6622
6630
|
}
|
|
6623
6631
|
}
|
|
@@ -6633,13 +6641,13 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
6633
6641
|
return [];
|
|
6634
6642
|
}
|
|
6635
6643
|
const rootFilePaths = await findFilesByGlobs(
|
|
6636
|
-
(0,
|
|
6644
|
+
(0, import_node_path64.join)(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
|
|
6637
6645
|
);
|
|
6638
6646
|
return await Promise.all(
|
|
6639
6647
|
rootFilePaths.map(
|
|
6640
6648
|
(filePath) => root.fromFile({
|
|
6641
6649
|
baseDir: this.baseDir,
|
|
6642
|
-
relativeFilePath: (0,
|
|
6650
|
+
relativeFilePath: (0, import_node_path64.basename)(filePath),
|
|
6643
6651
|
global: this.global
|
|
6644
6652
|
})
|
|
6645
6653
|
)
|
|
@@ -6651,13 +6659,13 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
6651
6659
|
return [];
|
|
6652
6660
|
}
|
|
6653
6661
|
const nonRootFilePaths = await findFilesByGlobs(
|
|
6654
|
-
(0,
|
|
6662
|
+
(0, import_node_path64.join)(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
|
|
6655
6663
|
);
|
|
6656
6664
|
return await Promise.all(
|
|
6657
6665
|
nonRootFilePaths.map(
|
|
6658
6666
|
(filePath) => nonRoot.fromFile({
|
|
6659
6667
|
baseDir: this.baseDir,
|
|
6660
|
-
relativeFilePath: (0,
|
|
6668
|
+
relativeFilePath: (0, import_node_path64.basename)(filePath),
|
|
6661
6669
|
global: this.global
|
|
6662
6670
|
})
|
|
6663
6671
|
)
|
|
@@ -7027,14 +7035,14 @@ s/<command> [arguments]
|
|
|
7027
7035
|
This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
|
|
7028
7036
|
The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
|
|
7029
7037
|
|
|
7030
|
-
When users call a custom slash command, you have to look for the markdown file, \`${(0,
|
|
7038
|
+
When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path64.join)(commands.relativeDirPath, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
|
|
7031
7039
|
const subagentsSection = subagents ? `## Simulated Subagents
|
|
7032
7040
|
|
|
7033
7041
|
Simulated subagents are specialized AI assistants that can be invoked to handle specific types of tasks. In this case, it can be appear something like custom slash commands simply. Simulated subagents can be called by custom slash commands.
|
|
7034
7042
|
|
|
7035
|
-
When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0,
|
|
7043
|
+
When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path64.join)(subagents.relativeDirPath, "{subagent}.md")}\`, and execute its contents as the block of operations.
|
|
7036
7044
|
|
|
7037
|
-
For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0,
|
|
7045
|
+
For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path64.join)(subagents.relativeDirPath, "planner.md")}\`, and execute its contents as the block of operations.` : "";
|
|
7038
7046
|
const result = [
|
|
7039
7047
|
overview,
|
|
7040
7048
|
...this.simulateCommands && CommandsProcessor.getToolTargetsSimulated().includes(this.toolTarget) ? [commandsSection] : [],
|
|
@@ -7248,9 +7256,9 @@ async function generateSubagents(config) {
|
|
|
7248
7256
|
}
|
|
7249
7257
|
|
|
7250
7258
|
// src/cli/commands/gitignore.ts
|
|
7251
|
-
var
|
|
7259
|
+
var import_node_path65 = require("path");
|
|
7252
7260
|
var gitignoreCommand = async () => {
|
|
7253
|
-
const gitignorePath = (0,
|
|
7261
|
+
const gitignorePath = (0, import_node_path65.join)(process.cwd(), ".gitignore");
|
|
7254
7262
|
const rulesFilesToIgnore = [
|
|
7255
7263
|
"# Generated by rulesync - AI tool configuration files",
|
|
7256
7264
|
// AGENTS.md
|
|
@@ -7491,7 +7499,7 @@ async function importSubagents(config, tool) {
|
|
|
7491
7499
|
}
|
|
7492
7500
|
|
|
7493
7501
|
// src/cli/commands/init.ts
|
|
7494
|
-
var
|
|
7502
|
+
var import_node_path66 = require("path");
|
|
7495
7503
|
async function initCommand() {
|
|
7496
7504
|
logger.info("Initializing rulesync...");
|
|
7497
7505
|
await ensureDir(".rulesync");
|
|
@@ -7652,14 +7660,14 @@ Attention, again, you are just the planner, so though you can read any files and
|
|
|
7652
7660
|
await ensureDir(commandPaths.relativeDirPath);
|
|
7653
7661
|
await ensureDir(subagentPaths.relativeDirPath);
|
|
7654
7662
|
await ensureDir(ignorePaths.relativeDirPath);
|
|
7655
|
-
const ruleFilepath = (0,
|
|
7663
|
+
const ruleFilepath = (0, import_node_path66.join)(rulePaths.recommended.relativeDirPath, sampleRuleFile.filename);
|
|
7656
7664
|
if (!await fileExists(ruleFilepath)) {
|
|
7657
7665
|
await writeFileContent(ruleFilepath, sampleRuleFile.content);
|
|
7658
7666
|
logger.success(`Created ${ruleFilepath}`);
|
|
7659
7667
|
} else {
|
|
7660
7668
|
logger.info(`Skipped ${ruleFilepath} (already exists)`);
|
|
7661
7669
|
}
|
|
7662
|
-
const mcpFilepath = (0,
|
|
7670
|
+
const mcpFilepath = (0, import_node_path66.join)(
|
|
7663
7671
|
mcpPaths.recommended.relativeDirPath,
|
|
7664
7672
|
mcpPaths.recommended.relativeFilePath
|
|
7665
7673
|
);
|
|
@@ -7669,21 +7677,21 @@ Attention, again, you are just the planner, so though you can read any files and
|
|
|
7669
7677
|
} else {
|
|
7670
7678
|
logger.info(`Skipped ${mcpFilepath} (already exists)`);
|
|
7671
7679
|
}
|
|
7672
|
-
const commandFilepath = (0,
|
|
7680
|
+
const commandFilepath = (0, import_node_path66.join)(commandPaths.relativeDirPath, sampleCommandFile.filename);
|
|
7673
7681
|
if (!await fileExists(commandFilepath)) {
|
|
7674
7682
|
await writeFileContent(commandFilepath, sampleCommandFile.content);
|
|
7675
7683
|
logger.success(`Created ${commandFilepath}`);
|
|
7676
7684
|
} else {
|
|
7677
7685
|
logger.info(`Skipped ${commandFilepath} (already exists)`);
|
|
7678
7686
|
}
|
|
7679
|
-
const subagentFilepath = (0,
|
|
7687
|
+
const subagentFilepath = (0, import_node_path66.join)(subagentPaths.relativeDirPath, sampleSubagentFile.filename);
|
|
7680
7688
|
if (!await fileExists(subagentFilepath)) {
|
|
7681
7689
|
await writeFileContent(subagentFilepath, sampleSubagentFile.content);
|
|
7682
7690
|
logger.success(`Created ${subagentFilepath}`);
|
|
7683
7691
|
} else {
|
|
7684
7692
|
logger.info(`Skipped ${subagentFilepath} (already exists)`);
|
|
7685
7693
|
}
|
|
7686
|
-
const ignoreFilepath = (0,
|
|
7694
|
+
const ignoreFilepath = (0, import_node_path66.join)(ignorePaths.relativeDirPath, ignorePaths.relativeFilePath);
|
|
7687
7695
|
if (!await fileExists(ignoreFilepath)) {
|
|
7688
7696
|
await writeFileContent(ignoreFilepath, sampleIgnoreFile.content);
|
|
7689
7697
|
logger.success(`Created ${ignoreFilepath}`);
|
|
@@ -7693,7 +7701,7 @@ Attention, again, you are just the planner, so though you can read any files and
|
|
|
7693
7701
|
}
|
|
7694
7702
|
|
|
7695
7703
|
// src/cli/index.ts
|
|
7696
|
-
var getVersion = () => "3.12.
|
|
7704
|
+
var getVersion = () => "3.12.8";
|
|
7697
7705
|
var main = async () => {
|
|
7698
7706
|
const program = new import_commander.Command();
|
|
7699
7707
|
const version = getVersion();
|