rulesync 8.4.0 → 8.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -259,8 +259,13 @@ var ALL_FEATURES = [
259
259
  var ALL_FEATURES_WITH_WILDCARD = [...ALL_FEATURES, "*"];
260
260
  var FeatureSchema = import_mini.z.enum(ALL_FEATURES);
261
261
  var FeaturesSchema = import_mini.z.array(FeatureSchema);
262
+ var GitignoreDestinationSchema = import_mini.z.enum(["gitignore", "gitattributes"]);
262
263
  var FeatureOptionsSchema = import_mini.z.record(import_mini.z.string(), import_mini.z.unknown());
263
- var FeatureValueSchema = import_mini.z.union([import_mini.z.boolean(), FeatureOptionsSchema]);
264
+ var FeatureValueSchema = import_mini.z.union([
265
+ import_mini.z.boolean(),
266
+ FeatureOptionsSchema,
267
+ GitignoreDestinationSchema
268
+ ]);
264
269
  var PerFeatureConfigSchema = import_mini.z.record(import_mini.z.string(), FeatureValueSchema);
265
270
  var PerTargetFeaturesValueSchema = import_mini.z.union([
266
271
  import_mini.z.array(import_mini.z.enum(ALL_FEATURES_WITH_WILDCARD)),
@@ -335,6 +340,7 @@ function hasControlCharacters(value) {
335
340
  }
336
341
 
337
342
  // src/config/config.ts
343
+ var GITIGNORE_DESTINATION_KEY = "gitignoreDestination";
338
344
  var SourceEntrySchema = import_mini3.z.object({
339
345
  source: import_mini3.z.string().check((0, import_mini3.minLength)(1, "source must be a non-empty string")),
340
346
  skills: (0, import_mini3.optional)(import_mini3.z.array(import_mini3.z.string())),
@@ -366,6 +372,7 @@ var ConfigParamsSchema = import_mini3.z.object({
366
372
  simulateSubagents: (0, import_mini3.optional)(import_mini3.z.boolean()),
367
373
  simulateSkills: (0, import_mini3.optional)(import_mini3.z.boolean()),
368
374
  gitignoreTargetsOnly: (0, import_mini3.optional)(import_mini3.z.boolean()),
375
+ gitignoreDestination: (0, import_mini3.optional)(GitignoreDestinationSchema),
369
376
  dryRun: (0, import_mini3.optional)(import_mini3.z.boolean()),
370
377
  check: (0, import_mini3.optional)(import_mini3.z.boolean()),
371
378
  // Declarative skill sources
@@ -426,6 +433,7 @@ var Config = class _Config {
426
433
  simulateSubagents;
427
434
  simulateSkills;
428
435
  gitignoreTargetsOnly;
436
+ gitignoreDestination;
429
437
  dryRun;
430
438
  check;
431
439
  sources;
@@ -441,6 +449,7 @@ var Config = class _Config {
441
449
  simulateSubagents,
442
450
  simulateSkills,
443
451
  gitignoreTargetsOnly,
452
+ gitignoreDestination,
444
453
  dryRun,
445
454
  check,
446
455
  sources
@@ -466,6 +475,7 @@ var Config = class _Config {
466
475
  this.simulateSubagents = simulateSubagents ?? false;
467
476
  this.simulateSkills = simulateSkills ?? false;
468
477
  this.gitignoreTargetsOnly = gitignoreTargetsOnly ?? true;
478
+ this.gitignoreDestination = gitignoreDestination ?? "gitignore";
469
479
  this.dryRun = dryRun ?? false;
470
480
  this.check = check ?? false;
471
481
  this.sources = sources ?? [];
@@ -623,6 +633,36 @@ var Config = class _Config {
623
633
  }
624
634
  return void 0;
625
635
  }
636
+ getGitignoreDestination(target, feature) {
637
+ const rootLevel = this.gitignoreDestination;
638
+ if (!isRulesyncConfigTargetsObject(this.targets)) {
639
+ return rootLevel;
640
+ }
641
+ const targetValue = this.targets[target];
642
+ if (!targetValue || Array.isArray(targetValue)) {
643
+ return rootLevel;
644
+ }
645
+ const perFeature = targetValue;
646
+ const toolLevel = _Config.parseGitignoreDestination(perFeature[GITIGNORE_DESTINATION_KEY]);
647
+ if (feature) {
648
+ const featureValue = perFeature[feature];
649
+ if (featureValue && typeof featureValue === "object" && !Array.isArray(featureValue)) {
650
+ const featureLevel = _Config.parseGitignoreDestination(
651
+ featureValue[GITIGNORE_DESTINATION_KEY]
652
+ );
653
+ if (featureLevel) {
654
+ return featureLevel;
655
+ }
656
+ }
657
+ }
658
+ return toolLevel ?? rootLevel;
659
+ }
660
+ static parseGitignoreDestination(value) {
661
+ if (value === "gitignore" || value === "gitattributes") {
662
+ return value;
663
+ }
664
+ return void 0;
665
+ }
626
666
  /**
627
667
  * Check if per-target features configuration is being used.
628
668
  */
@@ -703,6 +743,7 @@ var getDefaults = () => ({
703
743
  simulateSubagents: false,
704
744
  simulateSkills: false,
705
745
  gitignoreTargetsOnly: true,
746
+ gitignoreDestination: "gitignore",
706
747
  dryRun: false,
707
748
  check: false,
708
749
  sources: []
@@ -734,6 +775,7 @@ var mergeConfigs = (baseConfig, localConfig) => {
734
775
  simulateSubagents: localConfig.simulateSubagents ?? baseConfig.simulateSubagents,
735
776
  simulateSkills: localConfig.simulateSkills ?? baseConfig.simulateSkills,
736
777
  gitignoreTargetsOnly: localConfig.gitignoreTargetsOnly ?? baseConfig.gitignoreTargetsOnly,
778
+ gitignoreDestination: localConfig.gitignoreDestination ?? baseConfig.gitignoreDestination,
737
779
  dryRun: localConfig.dryRun ?? baseConfig.dryRun,
738
780
  check: localConfig.check ?? baseConfig.check,
739
781
  sources: localConfig.sources ?? baseConfig.sources
@@ -754,7 +796,8 @@ var ConfigResolver = class {
754
796
  simulateSkills,
755
797
  gitignoreTargetsOnly,
756
798
  dryRun,
757
- check
799
+ check,
800
+ gitignoreDestination
758
801
  }) {
759
802
  const validatedConfigPath = resolvePath(configPath, process.cwd());
760
803
  const baseConfig = await loadConfigFromFile(validatedConfigPath);
@@ -803,6 +846,7 @@ var ConfigResolver = class {
803
846
  simulateSubagents: resolvedSimulateSubagents,
804
847
  simulateSkills: resolvedSimulateSkills,
805
848
  gitignoreTargetsOnly: resolvedGitignoreTargetsOnly,
849
+ gitignoreDestination: gitignoreDestination ?? configByFile.gitignoreDestination ?? getDefaults().gitignoreDestination,
806
850
  dryRun: dryRun ?? configByFile.dryRun ?? getDefaults().dryRun,
807
851
  check: check ?? configByFile.check ?? getDefaults().check,
808
852
  sources: configByFile.sources ?? getDefaults().sources
@@ -825,7 +869,7 @@ function getBaseDirsInLightOfGlobal({
825
869
  }
826
870
 
827
871
  // src/lib/generate.ts
828
- var import_node_path140 = require("path");
872
+ var import_node_path141 = require("path");
829
873
  var import_es_toolkit5 = require("es-toolkit");
830
874
 
831
875
  // src/features/commands/commands-processor.ts
@@ -10376,9 +10420,9 @@ var PermissionsProcessor = class extends FeatureProcessor {
10376
10420
  };
10377
10421
 
10378
10422
  // src/features/rules/rules-processor.ts
10379
- var import_node_path139 = require("path");
10423
+ var import_node_path140 = require("path");
10380
10424
  var import_toon = require("@toon-format/toon");
10381
- var import_mini71 = require("zod/mini");
10425
+ var import_mini72 = require("zod/mini");
10382
10426
 
10383
10427
  // src/constants/general.ts
10384
10428
  var SKILL_FILE_NAME = "SKILL.md";
@@ -11166,8 +11210,8 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
11166
11210
  };
11167
11211
 
11168
11212
  // src/features/skills/skills-processor.ts
11169
- var import_node_path94 = require("path");
11170
- var import_mini51 = require("zod/mini");
11213
+ var import_node_path95 = require("path");
11214
+ var import_mini52 = require("zod/mini");
11171
11215
 
11172
11216
  // src/types/dir-feature-processor.ts
11173
11217
  var import_node_path77 = require("path");
@@ -13807,6 +13851,166 @@ async function getLocalSkillDirNames(baseDir) {
13807
13851
  return names;
13808
13852
  }
13809
13853
 
13854
+ // src/features/skills/windsurf-skill.ts
13855
+ var import_node_path94 = require("path");
13856
+ var import_mini51 = require("zod/mini");
13857
+ var WindsurfSkillFrontmatterSchema = import_mini51.z.looseObject({
13858
+ name: import_mini51.z.string(),
13859
+ description: import_mini51.z.string()
13860
+ });
13861
+ var WindsurfSkill = class _WindsurfSkill extends ToolSkill {
13862
+ constructor({
13863
+ baseDir = process.cwd(),
13864
+ relativeDirPath = _WindsurfSkill.getSettablePaths().relativeDirPath,
13865
+ dirName,
13866
+ frontmatter,
13867
+ body,
13868
+ otherFiles = [],
13869
+ validate = true,
13870
+ global = false
13871
+ }) {
13872
+ super({
13873
+ baseDir,
13874
+ relativeDirPath,
13875
+ dirName,
13876
+ mainFile: {
13877
+ name: SKILL_FILE_NAME,
13878
+ body,
13879
+ frontmatter: { ...frontmatter }
13880
+ },
13881
+ otherFiles,
13882
+ global
13883
+ });
13884
+ if (validate) {
13885
+ const result = this.validate();
13886
+ if (!result.success) {
13887
+ throw result.error;
13888
+ }
13889
+ }
13890
+ }
13891
+ static getSettablePaths({ global = false } = {}) {
13892
+ if (global) {
13893
+ return {
13894
+ relativeDirPath: (0, import_node_path94.join)(".codeium", "windsurf", "skills")
13895
+ };
13896
+ }
13897
+ return {
13898
+ relativeDirPath: (0, import_node_path94.join)(".windsurf", "skills")
13899
+ };
13900
+ }
13901
+ getFrontmatter() {
13902
+ const result = WindsurfSkillFrontmatterSchema.parse(this.requireMainFileFrontmatter());
13903
+ return result;
13904
+ }
13905
+ getBody() {
13906
+ return this.mainFile?.body ?? "";
13907
+ }
13908
+ validate() {
13909
+ if (!this.mainFile) {
13910
+ return {
13911
+ success: false,
13912
+ error: new Error(`${this.getDirPath()}: ${SKILL_FILE_NAME} file does not exist`)
13913
+ };
13914
+ }
13915
+ const result = WindsurfSkillFrontmatterSchema.safeParse(this.mainFile.frontmatter);
13916
+ if (!result.success) {
13917
+ return {
13918
+ success: false,
13919
+ error: new Error(
13920
+ `Invalid frontmatter in ${this.getDirPath()}: ${formatError(result.error)}`
13921
+ )
13922
+ };
13923
+ }
13924
+ return { success: true, error: null };
13925
+ }
13926
+ toRulesyncSkill() {
13927
+ const frontmatter = this.getFrontmatter();
13928
+ const rulesyncFrontmatter = {
13929
+ name: frontmatter.name,
13930
+ description: frontmatter.description,
13931
+ targets: ["*"]
13932
+ };
13933
+ return new RulesyncSkill({
13934
+ baseDir: this.baseDir,
13935
+ relativeDirPath: RULESYNC_SKILLS_RELATIVE_DIR_PATH,
13936
+ dirName: this.getDirName(),
13937
+ frontmatter: rulesyncFrontmatter,
13938
+ body: this.getBody(),
13939
+ otherFiles: this.getOtherFiles(),
13940
+ validate: true,
13941
+ global: this.global
13942
+ });
13943
+ }
13944
+ static fromRulesyncSkill({
13945
+ baseDir = process.cwd(),
13946
+ rulesyncSkill,
13947
+ validate = true,
13948
+ global = false
13949
+ }) {
13950
+ const settablePaths = _WindsurfSkill.getSettablePaths({ global });
13951
+ const rulesyncFrontmatter = rulesyncSkill.getFrontmatter();
13952
+ const windsurfFrontmatter = {
13953
+ name: rulesyncFrontmatter.name,
13954
+ description: rulesyncFrontmatter.description
13955
+ };
13956
+ return new _WindsurfSkill({
13957
+ baseDir,
13958
+ relativeDirPath: settablePaths.relativeDirPath,
13959
+ dirName: rulesyncSkill.getDirName(),
13960
+ frontmatter: windsurfFrontmatter,
13961
+ body: rulesyncSkill.getBody(),
13962
+ otherFiles: rulesyncSkill.getOtherFiles(),
13963
+ validate,
13964
+ global
13965
+ });
13966
+ }
13967
+ static isTargetedByRulesyncSkill(rulesyncSkill) {
13968
+ const targets = rulesyncSkill.getFrontmatter().targets;
13969
+ return targets.includes("*") || targets.includes("windsurf");
13970
+ }
13971
+ static async fromDir(params) {
13972
+ const loaded = await this.loadSkillDirContent({
13973
+ ...params,
13974
+ getSettablePaths: _WindsurfSkill.getSettablePaths
13975
+ });
13976
+ const result = WindsurfSkillFrontmatterSchema.safeParse(loaded.frontmatter);
13977
+ if (!result.success) {
13978
+ const skillDirPath = (0, import_node_path94.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13979
+ throw new Error(
13980
+ `Invalid frontmatter in ${(0, import_node_path94.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13981
+ );
13982
+ }
13983
+ return new _WindsurfSkill({
13984
+ baseDir: loaded.baseDir,
13985
+ relativeDirPath: loaded.relativeDirPath,
13986
+ dirName: loaded.dirName,
13987
+ frontmatter: result.data,
13988
+ body: loaded.body,
13989
+ otherFiles: loaded.otherFiles,
13990
+ validate: true,
13991
+ global: loaded.global
13992
+ });
13993
+ }
13994
+ static forDeletion({
13995
+ baseDir = process.cwd(),
13996
+ relativeDirPath,
13997
+ dirName,
13998
+ global = false
13999
+ }) {
14000
+ const settablePaths = _WindsurfSkill.getSettablePaths({ global });
14001
+ return new _WindsurfSkill({
14002
+ baseDir,
14003
+ relativeDirPath: relativeDirPath ?? settablePaths.relativeDirPath,
14004
+ dirName,
14005
+ frontmatter: { name: "", description: "" },
14006
+ body: "",
14007
+ otherFiles: [],
14008
+ validate: false,
14009
+ global
14010
+ });
14011
+ }
14012
+ };
14013
+
13810
14014
  // src/features/skills/skills-processor.ts
13811
14015
  var skillsProcessorToolTargetTuple = [
13812
14016
  "agentsmd",
@@ -13827,9 +14031,10 @@ var skillsProcessorToolTargetTuple = [
13827
14031
  "opencode",
13828
14032
  "replit",
13829
14033
  "roo",
13830
- "rovodev"
14034
+ "rovodev",
14035
+ "windsurf"
13831
14036
  ];
13832
- var SkillsProcessorToolTargetSchema = import_mini51.z.enum(skillsProcessorToolTargetTuple);
14037
+ var SkillsProcessorToolTargetSchema = import_mini52.z.enum(skillsProcessorToolTargetTuple);
13833
14038
  var toolSkillFactories = /* @__PURE__ */ new Map([
13834
14039
  [
13835
14040
  "agentsmd",
@@ -13963,6 +14168,13 @@ var toolSkillFactories = /* @__PURE__ */ new Map([
13963
14168
  class: RovodevSkill,
13964
14169
  meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: true }
13965
14170
  }
14171
+ ],
14172
+ [
14173
+ "windsurf",
14174
+ {
14175
+ class: WindsurfSkill,
14176
+ meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: true }
14177
+ }
13966
14178
  ]
13967
14179
  ]);
13968
14180
  var defaultGetFactory4 = (target) => {
@@ -14053,11 +14265,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
14053
14265
  )
14054
14266
  );
14055
14267
  const localSkillNames = new Set(localDirNames);
14056
- const curatedDirPath = (0, import_node_path94.join)(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
14268
+ const curatedDirPath = (0, import_node_path95.join)(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
14057
14269
  let curatedSkills = [];
14058
14270
  if (await directoryExists(curatedDirPath)) {
14059
- const curatedDirPaths = await findFilesByGlobs((0, import_node_path94.join)(curatedDirPath, "*"), { type: "dir" });
14060
- const curatedDirNames = curatedDirPaths.map((path3) => (0, import_node_path94.basename)(path3));
14271
+ const curatedDirPaths = await findFilesByGlobs((0, import_node_path95.join)(curatedDirPath, "*"), { type: "dir" });
14272
+ const curatedDirNames = curatedDirPaths.map((path3) => (0, import_node_path95.basename)(path3));
14061
14273
  const nonConflicting = curatedDirNames.filter((name) => {
14062
14274
  if (localSkillNames.has(name)) {
14063
14275
  this.logger.debug(`Skipping curated skill "${name}": local skill takes precedence.`);
@@ -14094,13 +14306,13 @@ var SkillsProcessor = class extends DirFeatureProcessor {
14094
14306
  const seenDirNames = /* @__PURE__ */ new Set();
14095
14307
  const loadEntries = [];
14096
14308
  for (const root of roots) {
14097
- const skillsDirPath = (0, import_node_path94.join)(this.baseDir, root);
14309
+ const skillsDirPath = (0, import_node_path95.join)(this.baseDir, root);
14098
14310
  if (!await directoryExists(skillsDirPath)) {
14099
14311
  continue;
14100
14312
  }
14101
- const dirPaths = await findFilesByGlobs((0, import_node_path94.join)(skillsDirPath, "*"), { type: "dir" });
14313
+ const dirPaths = await findFilesByGlobs((0, import_node_path95.join)(skillsDirPath, "*"), { type: "dir" });
14102
14314
  for (const dirPath of dirPaths) {
14103
- const dirName = (0, import_node_path94.basename)(dirPath);
14315
+ const dirName = (0, import_node_path95.basename)(dirPath);
14104
14316
  if (seenDirNames.has(dirName)) {
14105
14317
  continue;
14106
14318
  }
@@ -14129,13 +14341,13 @@ var SkillsProcessor = class extends DirFeatureProcessor {
14129
14341
  const roots = toolSkillSearchRoots(paths);
14130
14342
  const toolSkills = [];
14131
14343
  for (const root of roots) {
14132
- const skillsDirPath = (0, import_node_path94.join)(this.baseDir, root);
14344
+ const skillsDirPath = (0, import_node_path95.join)(this.baseDir, root);
14133
14345
  if (!await directoryExists(skillsDirPath)) {
14134
14346
  continue;
14135
14347
  }
14136
- const dirPaths = await findFilesByGlobs((0, import_node_path94.join)(skillsDirPath, "*"), { type: "dir" });
14348
+ const dirPaths = await findFilesByGlobs((0, import_node_path95.join)(skillsDirPath, "*"), { type: "dir" });
14137
14349
  for (const dirPath of dirPaths) {
14138
- const dirName = (0, import_node_path94.basename)(dirPath);
14350
+ const dirName = (0, import_node_path95.basename)(dirPath);
14139
14351
  const toolSkill = factory.class.forDeletion({
14140
14352
  baseDir: this.baseDir,
14141
14353
  relativeDirPath: root,
@@ -14197,11 +14409,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
14197
14409
  };
14198
14410
 
14199
14411
  // src/features/subagents/agentsmd-subagent.ts
14200
- var import_node_path96 = require("path");
14412
+ var import_node_path97 = require("path");
14201
14413
 
14202
14414
  // src/features/subagents/simulated-subagent.ts
14203
- var import_node_path95 = require("path");
14204
- var import_mini52 = require("zod/mini");
14415
+ var import_node_path96 = require("path");
14416
+ var import_mini53 = require("zod/mini");
14205
14417
 
14206
14418
  // src/features/subagents/tool-subagent.ts
14207
14419
  var ToolSubagent = class extends ToolFile {
@@ -14253,9 +14465,9 @@ var ToolSubagent = class extends ToolFile {
14253
14465
  };
14254
14466
 
14255
14467
  // src/features/subagents/simulated-subagent.ts
14256
- var SimulatedSubagentFrontmatterSchema = import_mini52.z.object({
14257
- name: import_mini52.z.string(),
14258
- description: import_mini52.z.optional(import_mini52.z.string())
14468
+ var SimulatedSubagentFrontmatterSchema = import_mini53.z.object({
14469
+ name: import_mini53.z.string(),
14470
+ description: import_mini53.z.optional(import_mini53.z.string())
14259
14471
  });
14260
14472
  var SimulatedSubagent = class extends ToolSubagent {
14261
14473
  frontmatter;
@@ -14265,7 +14477,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14265
14477
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
14266
14478
  if (!result.success) {
14267
14479
  throw new Error(
14268
- `Invalid frontmatter in ${(0, import_node_path95.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14480
+ `Invalid frontmatter in ${(0, import_node_path96.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14269
14481
  );
14270
14482
  }
14271
14483
  }
@@ -14316,7 +14528,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14316
14528
  return {
14317
14529
  success: false,
14318
14530
  error: new Error(
14319
- `Invalid frontmatter in ${(0, import_node_path95.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14531
+ `Invalid frontmatter in ${(0, import_node_path96.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14320
14532
  )
14321
14533
  };
14322
14534
  }
@@ -14326,7 +14538,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14326
14538
  relativeFilePath,
14327
14539
  validate = true
14328
14540
  }) {
14329
- const filePath = (0, import_node_path95.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
14541
+ const filePath = (0, import_node_path96.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
14330
14542
  const fileContent = await readFileContent(filePath);
14331
14543
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14332
14544
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14336,7 +14548,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14336
14548
  return {
14337
14549
  baseDir,
14338
14550
  relativeDirPath: this.getSettablePaths().relativeDirPath,
14339
- relativeFilePath: (0, import_node_path95.basename)(relativeFilePath),
14551
+ relativeFilePath: (0, import_node_path96.basename)(relativeFilePath),
14340
14552
  frontmatter: result.data,
14341
14553
  body: content.trim(),
14342
14554
  validate
@@ -14362,7 +14574,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14362
14574
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
14363
14575
  static getSettablePaths() {
14364
14576
  return {
14365
- relativeDirPath: (0, import_node_path96.join)(".agents", "subagents")
14577
+ relativeDirPath: (0, import_node_path97.join)(".agents", "subagents")
14366
14578
  };
14367
14579
  }
14368
14580
  static async fromFile(params) {
@@ -14385,11 +14597,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
14385
14597
  };
14386
14598
 
14387
14599
  // src/features/subagents/factorydroid-subagent.ts
14388
- var import_node_path97 = require("path");
14600
+ var import_node_path98 = require("path");
14389
14601
  var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
14390
14602
  static getSettablePaths(_options) {
14391
14603
  return {
14392
- relativeDirPath: (0, import_node_path97.join)(".factory", "droids")
14604
+ relativeDirPath: (0, import_node_path98.join)(".factory", "droids")
14393
14605
  };
14394
14606
  }
14395
14607
  static async fromFile(params) {
@@ -14412,16 +14624,16 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
14412
14624
  };
14413
14625
 
14414
14626
  // src/features/subagents/geminicli-subagent.ts
14415
- var import_node_path99 = require("path");
14416
- var import_mini54 = require("zod/mini");
14627
+ var import_node_path100 = require("path");
14628
+ var import_mini55 = require("zod/mini");
14417
14629
 
14418
14630
  // src/features/subagents/rulesync-subagent.ts
14419
- var import_node_path98 = require("path");
14420
- var import_mini53 = require("zod/mini");
14421
- var RulesyncSubagentFrontmatterSchema = import_mini53.z.looseObject({
14422
- targets: import_mini53.z._default(RulesyncTargetsSchema, ["*"]),
14423
- name: import_mini53.z.string(),
14424
- description: import_mini53.z.optional(import_mini53.z.string())
14631
+ var import_node_path99 = require("path");
14632
+ var import_mini54 = require("zod/mini");
14633
+ var RulesyncSubagentFrontmatterSchema = import_mini54.z.looseObject({
14634
+ targets: import_mini54.z._default(RulesyncTargetsSchema, ["*"]),
14635
+ name: import_mini54.z.string(),
14636
+ description: import_mini54.z.optional(import_mini54.z.string())
14425
14637
  });
14426
14638
  var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14427
14639
  frontmatter;
@@ -14430,7 +14642,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14430
14642
  const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
14431
14643
  if (!parseResult.success && rest.validate !== false) {
14432
14644
  throw new Error(
14433
- `Invalid frontmatter in ${(0, import_node_path98.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
14645
+ `Invalid frontmatter in ${(0, import_node_path99.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
14434
14646
  );
14435
14647
  }
14436
14648
  const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
@@ -14463,7 +14675,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14463
14675
  return {
14464
14676
  success: false,
14465
14677
  error: new Error(
14466
- `Invalid frontmatter in ${(0, import_node_path98.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14678
+ `Invalid frontmatter in ${(0, import_node_path99.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14467
14679
  )
14468
14680
  };
14469
14681
  }
@@ -14471,14 +14683,14 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14471
14683
  static async fromFile({
14472
14684
  relativeFilePath
14473
14685
  }) {
14474
- const filePath = (0, import_node_path98.join)(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
14686
+ const filePath = (0, import_node_path99.join)(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
14475
14687
  const fileContent = await readFileContent(filePath);
14476
14688
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14477
14689
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
14478
14690
  if (!result.success) {
14479
14691
  throw new Error(`Invalid frontmatter in ${relativeFilePath}: ${formatError(result.error)}`);
14480
14692
  }
14481
- const filename = (0, import_node_path98.basename)(relativeFilePath);
14693
+ const filename = (0, import_node_path99.basename)(relativeFilePath);
14482
14694
  return new _RulesyncSubagent({
14483
14695
  baseDir: process.cwd(),
14484
14696
  relativeDirPath: this.getSettablePaths().relativeDirPath,
@@ -14490,9 +14702,9 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14490
14702
  };
14491
14703
 
14492
14704
  // src/features/subagents/geminicli-subagent.ts
14493
- var GeminiCliSubagentFrontmatterSchema = import_mini54.z.looseObject({
14494
- name: import_mini54.z.string(),
14495
- description: import_mini54.z.optional(import_mini54.z.string())
14705
+ var GeminiCliSubagentFrontmatterSchema = import_mini55.z.looseObject({
14706
+ name: import_mini55.z.string(),
14707
+ description: import_mini55.z.optional(import_mini55.z.string())
14496
14708
  });
14497
14709
  var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14498
14710
  frontmatter;
@@ -14502,7 +14714,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14502
14714
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
14503
14715
  if (!result.success) {
14504
14716
  throw new Error(
14505
- `Invalid frontmatter in ${(0, import_node_path99.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14717
+ `Invalid frontmatter in ${(0, import_node_path100.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14506
14718
  );
14507
14719
  }
14508
14720
  }
@@ -14515,7 +14727,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14515
14727
  }
14516
14728
  static getSettablePaths(_options = {}) {
14517
14729
  return {
14518
- relativeDirPath: (0, import_node_path99.join)(".gemini", "agents")
14730
+ relativeDirPath: (0, import_node_path100.join)(".gemini", "agents")
14519
14731
  };
14520
14732
  }
14521
14733
  getFrontmatter() {
@@ -14583,7 +14795,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14583
14795
  return {
14584
14796
  success: false,
14585
14797
  error: new Error(
14586
- `Invalid frontmatter in ${(0, import_node_path99.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14798
+ `Invalid frontmatter in ${(0, import_node_path100.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14587
14799
  )
14588
14800
  };
14589
14801
  }
@@ -14601,7 +14813,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14601
14813
  global = false
14602
14814
  }) {
14603
14815
  const paths = this.getSettablePaths({ global });
14604
- const filePath = (0, import_node_path99.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14816
+ const filePath = (0, import_node_path100.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14605
14817
  const fileContent = await readFileContent(filePath);
14606
14818
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14607
14819
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14637,11 +14849,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14637
14849
  };
14638
14850
 
14639
14851
  // src/features/subagents/roo-subagent.ts
14640
- var import_node_path100 = require("path");
14852
+ var import_node_path101 = require("path");
14641
14853
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
14642
14854
  static getSettablePaths() {
14643
14855
  return {
14644
- relativeDirPath: (0, import_node_path100.join)(".roo", "subagents")
14856
+ relativeDirPath: (0, import_node_path101.join)(".roo", "subagents")
14645
14857
  };
14646
14858
  }
14647
14859
  static async fromFile(params) {
@@ -14664,11 +14876,11 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
14664
14876
  };
14665
14877
 
14666
14878
  // src/features/subagents/rovodev-subagent.ts
14667
- var import_node_path101 = require("path");
14668
- var import_mini55 = require("zod/mini");
14669
- var RovodevSubagentFrontmatterSchema = import_mini55.z.looseObject({
14670
- name: import_mini55.z.string(),
14671
- description: import_mini55.z.optional(import_mini55.z.string())
14879
+ var import_node_path102 = require("path");
14880
+ var import_mini56 = require("zod/mini");
14881
+ var RovodevSubagentFrontmatterSchema = import_mini56.z.looseObject({
14882
+ name: import_mini56.z.string(),
14883
+ description: import_mini56.z.optional(import_mini56.z.string())
14672
14884
  });
14673
14885
  var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14674
14886
  frontmatter;
@@ -14678,7 +14890,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14678
14890
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
14679
14891
  if (!result.success) {
14680
14892
  throw new Error(
14681
- `Invalid frontmatter in ${(0, import_node_path101.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14893
+ `Invalid frontmatter in ${(0, import_node_path102.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14682
14894
  );
14683
14895
  }
14684
14896
  }
@@ -14690,7 +14902,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14690
14902
  }
14691
14903
  static getSettablePaths(_options = {}) {
14692
14904
  return {
14693
- relativeDirPath: (0, import_node_path101.join)(".rovodev", "subagents")
14905
+ relativeDirPath: (0, import_node_path102.join)(".rovodev", "subagents")
14694
14906
  };
14695
14907
  }
14696
14908
  getFrontmatter() {
@@ -14753,7 +14965,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14753
14965
  return {
14754
14966
  success: false,
14755
14967
  error: new Error(
14756
- `Invalid frontmatter in ${(0, import_node_path101.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14968
+ `Invalid frontmatter in ${(0, import_node_path102.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14757
14969
  )
14758
14970
  };
14759
14971
  }
@@ -14770,7 +14982,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14770
14982
  global = false
14771
14983
  }) {
14772
14984
  const paths = this.getSettablePaths({ global });
14773
- const filePath = (0, import_node_path101.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14985
+ const filePath = (0, import_node_path102.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14774
14986
  const fileContent = await readFileContent(filePath);
14775
14987
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14776
14988
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14809,19 +15021,19 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14809
15021
  };
14810
15022
 
14811
15023
  // src/features/subagents/subagents-processor.ts
14812
- var import_node_path112 = require("path");
14813
- var import_mini64 = require("zod/mini");
15024
+ var import_node_path113 = require("path");
15025
+ var import_mini65 = require("zod/mini");
14814
15026
 
14815
15027
  // src/features/subagents/claudecode-subagent.ts
14816
- var import_node_path102 = require("path");
14817
- var import_mini56 = require("zod/mini");
14818
- var ClaudecodeSubagentFrontmatterSchema = import_mini56.z.looseObject({
14819
- name: import_mini56.z.string(),
14820
- description: import_mini56.z.optional(import_mini56.z.string()),
14821
- model: import_mini56.z.optional(import_mini56.z.string()),
14822
- tools: import_mini56.z.optional(import_mini56.z.union([import_mini56.z.string(), import_mini56.z.array(import_mini56.z.string())])),
14823
- permissionMode: import_mini56.z.optional(import_mini56.z.string()),
14824
- skills: import_mini56.z.optional(import_mini56.z.union([import_mini56.z.string(), import_mini56.z.array(import_mini56.z.string())]))
15028
+ var import_node_path103 = require("path");
15029
+ var import_mini57 = require("zod/mini");
15030
+ var ClaudecodeSubagentFrontmatterSchema = import_mini57.z.looseObject({
15031
+ name: import_mini57.z.string(),
15032
+ description: import_mini57.z.optional(import_mini57.z.string()),
15033
+ model: import_mini57.z.optional(import_mini57.z.string()),
15034
+ tools: import_mini57.z.optional(import_mini57.z.union([import_mini57.z.string(), import_mini57.z.array(import_mini57.z.string())])),
15035
+ permissionMode: import_mini57.z.optional(import_mini57.z.string()),
15036
+ skills: import_mini57.z.optional(import_mini57.z.union([import_mini57.z.string(), import_mini57.z.array(import_mini57.z.string())]))
14825
15037
  });
14826
15038
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14827
15039
  frontmatter;
@@ -14831,7 +15043,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14831
15043
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
14832
15044
  if (!result.success) {
14833
15045
  throw new Error(
14834
- `Invalid frontmatter in ${(0, import_node_path102.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15046
+ `Invalid frontmatter in ${(0, import_node_path103.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14835
15047
  );
14836
15048
  }
14837
15049
  }
@@ -14843,7 +15055,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14843
15055
  }
14844
15056
  static getSettablePaths(_options = {}) {
14845
15057
  return {
14846
- relativeDirPath: (0, import_node_path102.join)(".claude", "agents")
15058
+ relativeDirPath: (0, import_node_path103.join)(".claude", "agents")
14847
15059
  };
14848
15060
  }
14849
15061
  getFrontmatter() {
@@ -14922,7 +15134,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14922
15134
  return {
14923
15135
  success: false,
14924
15136
  error: new Error(
14925
- `Invalid frontmatter in ${(0, import_node_path102.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15137
+ `Invalid frontmatter in ${(0, import_node_path103.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14926
15138
  )
14927
15139
  };
14928
15140
  }
@@ -14940,7 +15152,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14940
15152
  global = false
14941
15153
  }) {
14942
15154
  const paths = this.getSettablePaths({ global });
14943
- const filePath = (0, import_node_path102.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15155
+ const filePath = (0, import_node_path103.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14944
15156
  const fileContent = await readFileContent(filePath);
14945
15157
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14946
15158
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14975,16 +15187,16 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14975
15187
  };
14976
15188
 
14977
15189
  // src/features/subagents/codexcli-subagent.ts
14978
- var import_node_path103 = require("path");
15190
+ var import_node_path104 = require("path");
14979
15191
  var smolToml5 = __toESM(require("smol-toml"), 1);
14980
- var import_mini57 = require("zod/mini");
14981
- var CodexCliSubagentTomlSchema = import_mini57.z.looseObject({
14982
- name: import_mini57.z.string(),
14983
- description: import_mini57.z.optional(import_mini57.z.string()),
14984
- developer_instructions: import_mini57.z.optional(import_mini57.z.string()),
14985
- model: import_mini57.z.optional(import_mini57.z.string()),
14986
- model_reasoning_effort: import_mini57.z.optional(import_mini57.z.string()),
14987
- sandbox_mode: import_mini57.z.optional(import_mini57.z.string())
15192
+ var import_mini58 = require("zod/mini");
15193
+ var CodexCliSubagentTomlSchema = import_mini58.z.looseObject({
15194
+ name: import_mini58.z.string(),
15195
+ description: import_mini58.z.optional(import_mini58.z.string()),
15196
+ developer_instructions: import_mini58.z.optional(import_mini58.z.string()),
15197
+ model: import_mini58.z.optional(import_mini58.z.string()),
15198
+ model_reasoning_effort: import_mini58.z.optional(import_mini58.z.string()),
15199
+ sandbox_mode: import_mini58.z.optional(import_mini58.z.string())
14988
15200
  });
14989
15201
  function stringifyCodexCliSubagentToml(tomlObj) {
14990
15202
  const { developer_instructions, ...restFields } = tomlObj;
@@ -15006,7 +15218,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15006
15218
  CodexCliSubagentTomlSchema.parse(parsed);
15007
15219
  } catch (error) {
15008
15220
  throw new Error(
15009
- `Invalid TOML in ${(0, import_node_path103.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15221
+ `Invalid TOML in ${(0, import_node_path104.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15010
15222
  { cause: error }
15011
15223
  );
15012
15224
  }
@@ -15018,7 +15230,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15018
15230
  }
15019
15231
  static getSettablePaths(_options = {}) {
15020
15232
  return {
15021
- relativeDirPath: (0, import_node_path103.join)(".codex", "agents")
15233
+ relativeDirPath: (0, import_node_path104.join)(".codex", "agents")
15022
15234
  };
15023
15235
  }
15024
15236
  getBody() {
@@ -15030,7 +15242,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15030
15242
  parsed = CodexCliSubagentTomlSchema.parse(smolToml5.parse(this.body));
15031
15243
  } catch (error) {
15032
15244
  throw new Error(
15033
- `Failed to parse TOML in ${(0, import_node_path103.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15245
+ `Failed to parse TOML in ${(0, import_node_path104.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15034
15246
  { cause: error }
15035
15247
  );
15036
15248
  }
@@ -15111,7 +15323,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15111
15323
  global = false
15112
15324
  }) {
15113
15325
  const paths = this.getSettablePaths({ global });
15114
- const filePath = (0, import_node_path103.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15326
+ const filePath = (0, import_node_path104.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15115
15327
  const fileContent = await readFileContent(filePath);
15116
15328
  const subagent = new _CodexCliSubagent({
15117
15329
  baseDir,
@@ -15149,13 +15361,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15149
15361
  };
15150
15362
 
15151
15363
  // src/features/subagents/copilot-subagent.ts
15152
- var import_node_path104 = require("path");
15153
- var import_mini58 = require("zod/mini");
15364
+ var import_node_path105 = require("path");
15365
+ var import_mini59 = require("zod/mini");
15154
15366
  var REQUIRED_TOOL = "agent/runSubagent";
15155
- var CopilotSubagentFrontmatterSchema = import_mini58.z.looseObject({
15156
- name: import_mini58.z.string(),
15157
- description: import_mini58.z.optional(import_mini58.z.string()),
15158
- tools: import_mini58.z.optional(import_mini58.z.union([import_mini58.z.string(), import_mini58.z.array(import_mini58.z.string())]))
15367
+ var CopilotSubagentFrontmatterSchema = import_mini59.z.looseObject({
15368
+ name: import_mini59.z.string(),
15369
+ description: import_mini59.z.optional(import_mini59.z.string()),
15370
+ tools: import_mini59.z.optional(import_mini59.z.union([import_mini59.z.string(), import_mini59.z.array(import_mini59.z.string())]))
15159
15371
  });
15160
15372
  var normalizeTools = (tools) => {
15161
15373
  if (!tools) {
@@ -15175,7 +15387,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15175
15387
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
15176
15388
  if (!result.success) {
15177
15389
  throw new Error(
15178
- `Invalid frontmatter in ${(0, import_node_path104.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15390
+ `Invalid frontmatter in ${(0, import_node_path105.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15179
15391
  );
15180
15392
  }
15181
15393
  }
@@ -15187,7 +15399,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15187
15399
  }
15188
15400
  static getSettablePaths(_options = {}) {
15189
15401
  return {
15190
- relativeDirPath: (0, import_node_path104.join)(".github", "agents")
15402
+ relativeDirPath: (0, import_node_path105.join)(".github", "agents")
15191
15403
  };
15192
15404
  }
15193
15405
  getFrontmatter() {
@@ -15265,7 +15477,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15265
15477
  return {
15266
15478
  success: false,
15267
15479
  error: new Error(
15268
- `Invalid frontmatter in ${(0, import_node_path104.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15480
+ `Invalid frontmatter in ${(0, import_node_path105.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15269
15481
  )
15270
15482
  };
15271
15483
  }
@@ -15283,7 +15495,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15283
15495
  global = false
15284
15496
  }) {
15285
15497
  const paths = this.getSettablePaths({ global });
15286
- const filePath = (0, import_node_path104.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15498
+ const filePath = (0, import_node_path105.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15287
15499
  const fileContent = await readFileContent(filePath);
15288
15500
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15289
15501
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15319,11 +15531,11 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15319
15531
  };
15320
15532
 
15321
15533
  // src/features/subagents/cursor-subagent.ts
15322
- var import_node_path105 = require("path");
15323
- var import_mini59 = require("zod/mini");
15324
- var CursorSubagentFrontmatterSchema = import_mini59.z.looseObject({
15325
- name: import_mini59.z.string(),
15326
- description: import_mini59.z.optional(import_mini59.z.string())
15534
+ var import_node_path106 = require("path");
15535
+ var import_mini60 = require("zod/mini");
15536
+ var CursorSubagentFrontmatterSchema = import_mini60.z.looseObject({
15537
+ name: import_mini60.z.string(),
15538
+ description: import_mini60.z.optional(import_mini60.z.string())
15327
15539
  });
15328
15540
  var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15329
15541
  frontmatter;
@@ -15333,7 +15545,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15333
15545
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
15334
15546
  if (!result.success) {
15335
15547
  throw new Error(
15336
- `Invalid frontmatter in ${(0, import_node_path105.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15548
+ `Invalid frontmatter in ${(0, import_node_path106.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15337
15549
  );
15338
15550
  }
15339
15551
  }
@@ -15345,7 +15557,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15345
15557
  }
15346
15558
  static getSettablePaths(_options = {}) {
15347
15559
  return {
15348
- relativeDirPath: (0, import_node_path105.join)(".cursor", "agents")
15560
+ relativeDirPath: (0, import_node_path106.join)(".cursor", "agents")
15349
15561
  };
15350
15562
  }
15351
15563
  getFrontmatter() {
@@ -15412,7 +15624,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15412
15624
  return {
15413
15625
  success: false,
15414
15626
  error: new Error(
15415
- `Invalid frontmatter in ${(0, import_node_path105.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15627
+ `Invalid frontmatter in ${(0, import_node_path106.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15416
15628
  )
15417
15629
  };
15418
15630
  }
@@ -15430,7 +15642,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15430
15642
  global = false
15431
15643
  }) {
15432
15644
  const paths = this.getSettablePaths({ global });
15433
- const filePath = (0, import_node_path105.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15645
+ const filePath = (0, import_node_path106.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15434
15646
  const fileContent = await readFileContent(filePath);
15435
15647
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15436
15648
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15466,12 +15678,12 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15466
15678
  };
15467
15679
 
15468
15680
  // src/features/subagents/deepagents-subagent.ts
15469
- var import_node_path106 = require("path");
15470
- var import_mini60 = require("zod/mini");
15471
- var DeepagentsSubagentFrontmatterSchema = import_mini60.z.looseObject({
15472
- name: import_mini60.z.string(),
15473
- description: import_mini60.z.optional(import_mini60.z.string()),
15474
- model: import_mini60.z.optional(import_mini60.z.string())
15681
+ var import_node_path107 = require("path");
15682
+ var import_mini61 = require("zod/mini");
15683
+ var DeepagentsSubagentFrontmatterSchema = import_mini61.z.looseObject({
15684
+ name: import_mini61.z.string(),
15685
+ description: import_mini61.z.optional(import_mini61.z.string()),
15686
+ model: import_mini61.z.optional(import_mini61.z.string())
15475
15687
  });
15476
15688
  var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15477
15689
  frontmatter;
@@ -15481,7 +15693,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15481
15693
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
15482
15694
  if (!result.success) {
15483
15695
  throw new Error(
15484
- `Invalid frontmatter in ${(0, import_node_path106.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15696
+ `Invalid frontmatter in ${(0, import_node_path107.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15485
15697
  );
15486
15698
  }
15487
15699
  }
@@ -15491,7 +15703,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15491
15703
  }
15492
15704
  static getSettablePaths(_options = {}) {
15493
15705
  return {
15494
- relativeDirPath: (0, import_node_path106.join)(".deepagents", "agents")
15706
+ relativeDirPath: (0, import_node_path107.join)(".deepagents", "agents")
15495
15707
  };
15496
15708
  }
15497
15709
  getFrontmatter() {
@@ -15566,7 +15778,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15566
15778
  return {
15567
15779
  success: false,
15568
15780
  error: new Error(
15569
- `Invalid frontmatter in ${(0, import_node_path106.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15781
+ `Invalid frontmatter in ${(0, import_node_path107.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15570
15782
  )
15571
15783
  };
15572
15784
  }
@@ -15584,7 +15796,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15584
15796
  global = false
15585
15797
  }) {
15586
15798
  const paths = this.getSettablePaths({ global });
15587
- const filePath = (0, import_node_path106.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15799
+ const filePath = (0, import_node_path107.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15588
15800
  const fileContent = await readFileContent(filePath);
15589
15801
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15590
15802
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15619,11 +15831,11 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15619
15831
  };
15620
15832
 
15621
15833
  // src/features/subagents/junie-subagent.ts
15622
- var import_node_path107 = require("path");
15623
- var import_mini61 = require("zod/mini");
15624
- var JunieSubagentFrontmatterSchema = import_mini61.z.looseObject({
15625
- name: import_mini61.z.optional(import_mini61.z.string()),
15626
- description: import_mini61.z.string()
15834
+ var import_node_path108 = require("path");
15835
+ var import_mini62 = require("zod/mini");
15836
+ var JunieSubagentFrontmatterSchema = import_mini62.z.looseObject({
15837
+ name: import_mini62.z.optional(import_mini62.z.string()),
15838
+ description: import_mini62.z.string()
15627
15839
  });
15628
15840
  var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15629
15841
  frontmatter;
@@ -15633,7 +15845,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15633
15845
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
15634
15846
  if (!result.success) {
15635
15847
  throw new Error(
15636
- `Invalid frontmatter in ${(0, import_node_path107.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15848
+ `Invalid frontmatter in ${(0, import_node_path108.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15637
15849
  );
15638
15850
  }
15639
15851
  }
@@ -15648,7 +15860,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15648
15860
  throw new Error("JunieSubagent does not support global mode.");
15649
15861
  }
15650
15862
  return {
15651
- relativeDirPath: (0, import_node_path107.join)(".junie", "agents")
15863
+ relativeDirPath: (0, import_node_path108.join)(".junie", "agents")
15652
15864
  };
15653
15865
  }
15654
15866
  getFrontmatter() {
@@ -15724,7 +15936,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15724
15936
  return {
15725
15937
  success: false,
15726
15938
  error: new Error(
15727
- `Invalid frontmatter in ${(0, import_node_path107.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15939
+ `Invalid frontmatter in ${(0, import_node_path108.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15728
15940
  )
15729
15941
  };
15730
15942
  }
@@ -15742,7 +15954,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15742
15954
  global = false
15743
15955
  }) {
15744
15956
  const paths = this.getSettablePaths({ global });
15745
- const filePath = (0, import_node_path107.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15957
+ const filePath = (0, import_node_path108.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15746
15958
  const fileContent = await readFileContent(filePath);
15747
15959
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15748
15960
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15777,15 +15989,15 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15777
15989
  };
15778
15990
 
15779
15991
  // src/features/subagents/kilo-subagent.ts
15780
- var import_node_path109 = require("path");
15992
+ var import_node_path110 = require("path");
15781
15993
 
15782
15994
  // src/features/subagents/opencode-style-subagent.ts
15783
- var import_node_path108 = require("path");
15784
- var import_mini62 = require("zod/mini");
15785
- var OpenCodeStyleSubagentFrontmatterSchema = import_mini62.z.looseObject({
15786
- description: import_mini62.z.optional(import_mini62.z.string()),
15787
- mode: import_mini62.z._default(import_mini62.z.string(), "subagent"),
15788
- name: import_mini62.z.optional(import_mini62.z.string())
15995
+ var import_node_path109 = require("path");
15996
+ var import_mini63 = require("zod/mini");
15997
+ var OpenCodeStyleSubagentFrontmatterSchema = import_mini63.z.looseObject({
15998
+ description: import_mini63.z.optional(import_mini63.z.string()),
15999
+ mode: import_mini63.z._default(import_mini63.z.string(), "subagent"),
16000
+ name: import_mini63.z.optional(import_mini63.z.string())
15789
16001
  });
15790
16002
  var OpenCodeStyleSubagent = class extends ToolSubagent {
15791
16003
  frontmatter;
@@ -15795,7 +16007,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
15795
16007
  const result = OpenCodeStyleSubagentFrontmatterSchema.safeParse(frontmatter);
15796
16008
  if (!result.success) {
15797
16009
  throw new Error(
15798
- `Invalid frontmatter in ${(0, import_node_path108.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16010
+ `Invalid frontmatter in ${(0, import_node_path109.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15799
16011
  );
15800
16012
  }
15801
16013
  }
@@ -15815,7 +16027,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
15815
16027
  const { description, mode, name, ...toolSection } = this.frontmatter;
15816
16028
  const rulesyncFrontmatter = {
15817
16029
  targets: ["*"],
15818
- name: name ?? (0, import_node_path108.basename)(this.getRelativeFilePath(), ".md"),
16030
+ name: name ?? (0, import_node_path109.basename)(this.getRelativeFilePath(), ".md"),
15819
16031
  description,
15820
16032
  [this.getToolTarget()]: { mode, ...toolSection }
15821
16033
  };
@@ -15837,7 +16049,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
15837
16049
  return {
15838
16050
  success: false,
15839
16051
  error: new Error(
15840
- `Invalid frontmatter in ${(0, import_node_path108.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16052
+ `Invalid frontmatter in ${(0, import_node_path109.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15841
16053
  )
15842
16054
  };
15843
16055
  }
@@ -15853,7 +16065,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15853
16065
  global = false
15854
16066
  } = {}) {
15855
16067
  return {
15856
- relativeDirPath: global ? (0, import_node_path109.join)(".config", "kilo", "agent") : (0, import_node_path109.join)(".kilo", "agent")
16068
+ relativeDirPath: global ? (0, import_node_path110.join)(".config", "kilo", "agent") : (0, import_node_path110.join)(".kilo", "agent")
15857
16069
  };
15858
16070
  }
15859
16071
  static fromRulesyncSubagent({
@@ -15897,7 +16109,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15897
16109
  global = false
15898
16110
  }) {
15899
16111
  const paths = this.getSettablePaths({ global });
15900
- const filePath = (0, import_node_path109.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16112
+ const filePath = (0, import_node_path110.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15901
16113
  const fileContent = await readFileContent(filePath);
15902
16114
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15903
16115
  const result = KiloSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15933,23 +16145,23 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15933
16145
  };
15934
16146
 
15935
16147
  // src/features/subagents/kiro-subagent.ts
15936
- var import_node_path110 = require("path");
15937
- var import_mini63 = require("zod/mini");
15938
- var KiroCliSubagentJsonSchema = import_mini63.z.looseObject({
15939
- name: import_mini63.z.string(),
15940
- description: import_mini63.z.optional(import_mini63.z.nullable(import_mini63.z.string())),
15941
- prompt: import_mini63.z.optional(import_mini63.z.nullable(import_mini63.z.string())),
15942
- tools: import_mini63.z.optional(import_mini63.z.nullable(import_mini63.z.array(import_mini63.z.string()))),
15943
- toolAliases: import_mini63.z.optional(import_mini63.z.nullable(import_mini63.z.record(import_mini63.z.string(), import_mini63.z.string()))),
15944
- toolSettings: import_mini63.z.optional(import_mini63.z.nullable(import_mini63.z.unknown())),
15945
- toolSchema: import_mini63.z.optional(import_mini63.z.nullable(import_mini63.z.unknown())),
15946
- hooks: import_mini63.z.optional(import_mini63.z.nullable(import_mini63.z.record(import_mini63.z.string(), import_mini63.z.array(import_mini63.z.unknown())))),
15947
- model: import_mini63.z.optional(import_mini63.z.nullable(import_mini63.z.string())),
15948
- mcpServers: import_mini63.z.optional(import_mini63.z.nullable(import_mini63.z.record(import_mini63.z.string(), import_mini63.z.unknown()))),
15949
- useLegacyMcpJson: import_mini63.z.optional(import_mini63.z.nullable(import_mini63.z.boolean())),
15950
- resources: import_mini63.z.optional(import_mini63.z.nullable(import_mini63.z.array(import_mini63.z.string()))),
15951
- allowedTools: import_mini63.z.optional(import_mini63.z.nullable(import_mini63.z.array(import_mini63.z.string()))),
15952
- includeMcpJson: import_mini63.z.optional(import_mini63.z.nullable(import_mini63.z.boolean()))
16148
+ var import_node_path111 = require("path");
16149
+ var import_mini64 = require("zod/mini");
16150
+ var KiroCliSubagentJsonSchema = import_mini64.z.looseObject({
16151
+ name: import_mini64.z.string(),
16152
+ description: import_mini64.z.optional(import_mini64.z.nullable(import_mini64.z.string())),
16153
+ prompt: import_mini64.z.optional(import_mini64.z.nullable(import_mini64.z.string())),
16154
+ tools: import_mini64.z.optional(import_mini64.z.nullable(import_mini64.z.array(import_mini64.z.string()))),
16155
+ toolAliases: import_mini64.z.optional(import_mini64.z.nullable(import_mini64.z.record(import_mini64.z.string(), import_mini64.z.string()))),
16156
+ toolSettings: import_mini64.z.optional(import_mini64.z.nullable(import_mini64.z.unknown())),
16157
+ toolSchema: import_mini64.z.optional(import_mini64.z.nullable(import_mini64.z.unknown())),
16158
+ hooks: import_mini64.z.optional(import_mini64.z.nullable(import_mini64.z.record(import_mini64.z.string(), import_mini64.z.array(import_mini64.z.unknown())))),
16159
+ model: import_mini64.z.optional(import_mini64.z.nullable(import_mini64.z.string())),
16160
+ mcpServers: import_mini64.z.optional(import_mini64.z.nullable(import_mini64.z.record(import_mini64.z.string(), import_mini64.z.unknown()))),
16161
+ useLegacyMcpJson: import_mini64.z.optional(import_mini64.z.nullable(import_mini64.z.boolean())),
16162
+ resources: import_mini64.z.optional(import_mini64.z.nullable(import_mini64.z.array(import_mini64.z.string()))),
16163
+ allowedTools: import_mini64.z.optional(import_mini64.z.nullable(import_mini64.z.array(import_mini64.z.string()))),
16164
+ includeMcpJson: import_mini64.z.optional(import_mini64.z.nullable(import_mini64.z.boolean()))
15953
16165
  });
15954
16166
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15955
16167
  body;
@@ -15960,7 +16172,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15960
16172
  KiroCliSubagentJsonSchema.parse(parsed);
15961
16173
  } catch (error) {
15962
16174
  throw new Error(
15963
- `Invalid JSON in ${(0, import_node_path110.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
16175
+ `Invalid JSON in ${(0, import_node_path111.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15964
16176
  { cause: error }
15965
16177
  );
15966
16178
  }
@@ -15972,7 +16184,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15972
16184
  }
15973
16185
  static getSettablePaths(_options = {}) {
15974
16186
  return {
15975
- relativeDirPath: (0, import_node_path110.join)(".kiro", "agents")
16187
+ relativeDirPath: (0, import_node_path111.join)(".kiro", "agents")
15976
16188
  };
15977
16189
  }
15978
16190
  getBody() {
@@ -15984,7 +16196,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15984
16196
  parsed = JSON.parse(this.body);
15985
16197
  } catch (error) {
15986
16198
  throw new Error(
15987
- `Failed to parse JSON in ${(0, import_node_path110.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
16199
+ `Failed to parse JSON in ${(0, import_node_path111.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15988
16200
  { cause: error }
15989
16201
  );
15990
16202
  }
@@ -16065,7 +16277,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
16065
16277
  global = false
16066
16278
  }) {
16067
16279
  const paths = this.getSettablePaths({ global });
16068
- const filePath = (0, import_node_path110.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16280
+ const filePath = (0, import_node_path111.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16069
16281
  const fileContent = await readFileContent(filePath);
16070
16282
  const subagent = new _KiroSubagent({
16071
16283
  baseDir,
@@ -16103,7 +16315,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
16103
16315
  };
16104
16316
 
16105
16317
  // src/features/subagents/opencode-subagent.ts
16106
- var import_node_path111 = require("path");
16318
+ var import_node_path112 = require("path");
16107
16319
  var OpenCodeSubagentFrontmatterSchema = OpenCodeStyleSubagentFrontmatterSchema;
16108
16320
  var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
16109
16321
  getToolTarget() {
@@ -16113,7 +16325,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
16113
16325
  global = false
16114
16326
  } = {}) {
16115
16327
  return {
16116
- relativeDirPath: global ? (0, import_node_path111.join)(".config", "opencode", "agent") : (0, import_node_path111.join)(".opencode", "agent")
16328
+ relativeDirPath: global ? (0, import_node_path112.join)(".config", "opencode", "agent") : (0, import_node_path112.join)(".opencode", "agent")
16117
16329
  };
16118
16330
  }
16119
16331
  static fromRulesyncSubagent({
@@ -16157,7 +16369,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
16157
16369
  global = false
16158
16370
  }) {
16159
16371
  const paths = this.getSettablePaths({ global });
16160
- const filePath = (0, import_node_path111.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16372
+ const filePath = (0, import_node_path112.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16161
16373
  const fileContent = await readFileContent(filePath);
16162
16374
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
16163
16375
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -16210,7 +16422,7 @@ var subagentsProcessorToolTargetTuple = [
16210
16422
  "roo",
16211
16423
  "rovodev"
16212
16424
  ];
16213
- var SubagentsProcessorToolTargetSchema = import_mini64.z.enum(subagentsProcessorToolTargetTuple);
16425
+ var SubagentsProcessorToolTargetSchema = import_mini65.z.enum(subagentsProcessorToolTargetTuple);
16214
16426
  var toolSubagentFactories = /* @__PURE__ */ new Map([
16215
16427
  [
16216
16428
  "agentsmd",
@@ -16401,7 +16613,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16401
16613
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
16402
16614
  */
16403
16615
  async loadRulesyncFiles() {
16404
- const subagentsDir = (0, import_node_path112.join)(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
16616
+ const subagentsDir = (0, import_node_path113.join)(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
16405
16617
  const dirExists = await directoryExists(subagentsDir);
16406
16618
  if (!dirExists) {
16407
16619
  this.logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -16416,7 +16628,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16416
16628
  this.logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
16417
16629
  const rulesyncSubagents = [];
16418
16630
  for (const mdFile of mdFiles) {
16419
- const filepath = (0, import_node_path112.join)(subagentsDir, mdFile);
16631
+ const filepath = (0, import_node_path113.join)(subagentsDir, mdFile);
16420
16632
  try {
16421
16633
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
16422
16634
  relativeFilePath: mdFile,
@@ -16446,14 +16658,14 @@ var SubagentsProcessor = class extends FeatureProcessor {
16446
16658
  const factory = this.getFactory(this.toolTarget);
16447
16659
  const paths = factory.class.getSettablePaths({ global: this.global });
16448
16660
  const subagentFilePaths = await findFilesByGlobs(
16449
- (0, import_node_path112.join)(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
16661
+ (0, import_node_path113.join)(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
16450
16662
  );
16451
16663
  if (forDeletion) {
16452
16664
  const toolSubagents2 = subagentFilePaths.map(
16453
16665
  (path3) => factory.class.forDeletion({
16454
16666
  baseDir: this.baseDir,
16455
16667
  relativeDirPath: paths.relativeDirPath,
16456
- relativeFilePath: (0, import_node_path112.basename)(path3),
16668
+ relativeFilePath: (0, import_node_path113.basename)(path3),
16457
16669
  global: this.global
16458
16670
  })
16459
16671
  ).filter((subagent) => subagent.isDeletable());
@@ -16466,7 +16678,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16466
16678
  subagentFilePaths.map(
16467
16679
  (path3) => factory.class.fromFile({
16468
16680
  baseDir: this.baseDir,
16469
- relativeFilePath: (0, import_node_path112.basename)(path3),
16681
+ relativeFilePath: (0, import_node_path113.basename)(path3),
16470
16682
  global: this.global
16471
16683
  })
16472
16684
  )
@@ -16513,49 +16725,49 @@ var SubagentsProcessor = class extends FeatureProcessor {
16513
16725
  };
16514
16726
 
16515
16727
  // src/features/rules/agentsmd-rule.ts
16516
- var import_node_path115 = require("path");
16728
+ var import_node_path116 = require("path");
16517
16729
 
16518
16730
  // src/features/rules/tool-rule.ts
16519
- var import_node_path114 = require("path");
16731
+ var import_node_path115 = require("path");
16520
16732
 
16521
16733
  // src/features/rules/rulesync-rule.ts
16522
- var import_node_path113 = require("path");
16523
- var import_mini65 = require("zod/mini");
16524
- var RulesyncRuleFrontmatterSchema = import_mini65.z.object({
16525
- root: import_mini65.z.optional(import_mini65.z.boolean()),
16526
- localRoot: import_mini65.z.optional(import_mini65.z.boolean()),
16527
- targets: import_mini65.z._default(RulesyncTargetsSchema, ["*"]),
16528
- description: import_mini65.z.optional(import_mini65.z.string()),
16529
- globs: import_mini65.z.optional(import_mini65.z.array(import_mini65.z.string())),
16530
- agentsmd: import_mini65.z.optional(
16531
- import_mini65.z.looseObject({
16734
+ var import_node_path114 = require("path");
16735
+ var import_mini66 = require("zod/mini");
16736
+ var RulesyncRuleFrontmatterSchema = import_mini66.z.object({
16737
+ root: import_mini66.z.optional(import_mini66.z.boolean()),
16738
+ localRoot: import_mini66.z.optional(import_mini66.z.boolean()),
16739
+ targets: import_mini66.z._default(RulesyncTargetsSchema, ["*"]),
16740
+ description: import_mini66.z.optional(import_mini66.z.string()),
16741
+ globs: import_mini66.z.optional(import_mini66.z.array(import_mini66.z.string())),
16742
+ agentsmd: import_mini66.z.optional(
16743
+ import_mini66.z.looseObject({
16532
16744
  // @example "path/to/subproject"
16533
- subprojectPath: import_mini65.z.optional(import_mini65.z.string())
16745
+ subprojectPath: import_mini66.z.optional(import_mini66.z.string())
16534
16746
  })
16535
16747
  ),
16536
- claudecode: import_mini65.z.optional(
16537
- import_mini65.z.looseObject({
16748
+ claudecode: import_mini66.z.optional(
16749
+ import_mini66.z.looseObject({
16538
16750
  // Glob patterns for conditional rules (takes precedence over globs)
16539
16751
  // @example ["src/**/*.ts", "tests/**/*.test.ts"]
16540
- paths: import_mini65.z.optional(import_mini65.z.array(import_mini65.z.string()))
16752
+ paths: import_mini66.z.optional(import_mini66.z.array(import_mini66.z.string()))
16541
16753
  })
16542
16754
  ),
16543
- cursor: import_mini65.z.optional(
16544
- import_mini65.z.looseObject({
16545
- alwaysApply: import_mini65.z.optional(import_mini65.z.boolean()),
16546
- description: import_mini65.z.optional(import_mini65.z.string()),
16547
- globs: import_mini65.z.optional(import_mini65.z.array(import_mini65.z.string()))
16755
+ cursor: import_mini66.z.optional(
16756
+ import_mini66.z.looseObject({
16757
+ alwaysApply: import_mini66.z.optional(import_mini66.z.boolean()),
16758
+ description: import_mini66.z.optional(import_mini66.z.string()),
16759
+ globs: import_mini66.z.optional(import_mini66.z.array(import_mini66.z.string()))
16548
16760
  })
16549
16761
  ),
16550
- copilot: import_mini65.z.optional(
16551
- import_mini65.z.looseObject({
16552
- excludeAgent: import_mini65.z.optional(import_mini65.z.union([import_mini65.z.literal("code-review"), import_mini65.z.literal("coding-agent")]))
16762
+ copilot: import_mini66.z.optional(
16763
+ import_mini66.z.looseObject({
16764
+ excludeAgent: import_mini66.z.optional(import_mini66.z.union([import_mini66.z.literal("code-review"), import_mini66.z.literal("coding-agent")]))
16553
16765
  })
16554
16766
  ),
16555
- antigravity: import_mini65.z.optional(
16556
- import_mini65.z.looseObject({
16557
- trigger: import_mini65.z.optional(import_mini65.z.string()),
16558
- globs: import_mini65.z.optional(import_mini65.z.array(import_mini65.z.string()))
16767
+ antigravity: import_mini66.z.optional(
16768
+ import_mini66.z.looseObject({
16769
+ trigger: import_mini66.z.optional(import_mini66.z.string()),
16770
+ globs: import_mini66.z.optional(import_mini66.z.array(import_mini66.z.string()))
16559
16771
  })
16560
16772
  )
16561
16773
  });
@@ -16566,7 +16778,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
16566
16778
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
16567
16779
  if (!parseResult.success && rest.validate !== false) {
16568
16780
  throw new Error(
16569
- `Invalid frontmatter in ${(0, import_node_path113.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
16781
+ `Invalid frontmatter in ${(0, import_node_path114.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
16570
16782
  );
16571
16783
  }
16572
16784
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -16601,7 +16813,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
16601
16813
  return {
16602
16814
  success: false,
16603
16815
  error: new Error(
16604
- `Invalid frontmatter in ${(0, import_node_path113.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16816
+ `Invalid frontmatter in ${(0, import_node_path114.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16605
16817
  )
16606
16818
  };
16607
16819
  }
@@ -16610,7 +16822,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
16610
16822
  relativeFilePath,
16611
16823
  validate = true
16612
16824
  }) {
16613
- const filePath = (0, import_node_path113.join)(
16825
+ const filePath = (0, import_node_path114.join)(
16614
16826
  process.cwd(),
16615
16827
  this.getSettablePaths().recommended.relativeDirPath,
16616
16828
  relativeFilePath
@@ -16709,7 +16921,7 @@ var ToolRule = class extends ToolFile {
16709
16921
  rulesyncRule,
16710
16922
  validate = true,
16711
16923
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
16712
- nonRootPath = { relativeDirPath: (0, import_node_path114.join)(".agents", "memories") }
16924
+ nonRootPath = { relativeDirPath: (0, import_node_path115.join)(".agents", "memories") }
16713
16925
  }) {
16714
16926
  const params = this.buildToolRuleParamsDefault({
16715
16927
  baseDir,
@@ -16720,7 +16932,7 @@ var ToolRule = class extends ToolFile {
16720
16932
  });
16721
16933
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
16722
16934
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
16723
- params.relativeDirPath = (0, import_node_path114.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
16935
+ params.relativeDirPath = (0, import_node_path115.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
16724
16936
  params.relativeFilePath = "AGENTS.md";
16725
16937
  }
16726
16938
  return params;
@@ -16769,7 +16981,7 @@ var ToolRule = class extends ToolFile {
16769
16981
  }
16770
16982
  };
16771
16983
  function buildToolPath(toolDir, subDir, excludeToolDir) {
16772
- return excludeToolDir ? subDir : (0, import_node_path114.join)(toolDir, subDir);
16984
+ return excludeToolDir ? subDir : (0, import_node_path115.join)(toolDir, subDir);
16773
16985
  }
16774
16986
 
16775
16987
  // src/features/rules/agentsmd-rule.ts
@@ -16798,8 +17010,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
16798
17010
  validate = true
16799
17011
  }) {
16800
17012
  const isRoot = relativeFilePath === "AGENTS.md";
16801
- const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path115.join)(".agents", "memories", relativeFilePath);
16802
- const fileContent = await readFileContent((0, import_node_path115.join)(baseDir, relativePath));
17013
+ const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path116.join)(".agents", "memories", relativeFilePath);
17014
+ const fileContent = await readFileContent((0, import_node_path116.join)(baseDir, relativePath));
16803
17015
  return new _AgentsMdRule({
16804
17016
  baseDir,
16805
17017
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -16854,21 +17066,21 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
16854
17066
  };
16855
17067
 
16856
17068
  // src/features/rules/antigravity-rule.ts
16857
- var import_node_path116 = require("path");
16858
- var import_mini66 = require("zod/mini");
16859
- var AntigravityRuleFrontmatterSchema = import_mini66.z.looseObject({
16860
- trigger: import_mini66.z.optional(
16861
- import_mini66.z.union([
16862
- import_mini66.z.literal("always_on"),
16863
- import_mini66.z.literal("glob"),
16864
- import_mini66.z.literal("manual"),
16865
- import_mini66.z.literal("model_decision"),
16866
- import_mini66.z.string()
17069
+ var import_node_path117 = require("path");
17070
+ var import_mini67 = require("zod/mini");
17071
+ var AntigravityRuleFrontmatterSchema = import_mini67.z.looseObject({
17072
+ trigger: import_mini67.z.optional(
17073
+ import_mini67.z.union([
17074
+ import_mini67.z.literal("always_on"),
17075
+ import_mini67.z.literal("glob"),
17076
+ import_mini67.z.literal("manual"),
17077
+ import_mini67.z.literal("model_decision"),
17078
+ import_mini67.z.string()
16867
17079
  // accepts any string for forward compatibility
16868
17080
  ])
16869
17081
  ),
16870
- globs: import_mini66.z.optional(import_mini66.z.string()),
16871
- description: import_mini66.z.optional(import_mini66.z.string())
17082
+ globs: import_mini67.z.optional(import_mini67.z.string()),
17083
+ description: import_mini67.z.optional(import_mini67.z.string())
16872
17084
  });
16873
17085
  function parseGlobsString(globs) {
16874
17086
  if (!globs) {
@@ -17013,7 +17225,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
17013
17225
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
17014
17226
  if (!result.success) {
17015
17227
  throw new Error(
17016
- `Invalid frontmatter in ${(0, import_node_path116.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17228
+ `Invalid frontmatter in ${(0, import_node_path117.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17017
17229
  );
17018
17230
  }
17019
17231
  }
@@ -17037,7 +17249,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
17037
17249
  relativeFilePath,
17038
17250
  validate = true
17039
17251
  }) {
17040
- const filePath = (0, import_node_path116.join)(
17252
+ const filePath = (0, import_node_path117.join)(
17041
17253
  baseDir,
17042
17254
  this.getSettablePaths().nonRoot.relativeDirPath,
17043
17255
  relativeFilePath
@@ -17177,7 +17389,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
17177
17389
  };
17178
17390
 
17179
17391
  // src/features/rules/augmentcode-legacy-rule.ts
17180
- var import_node_path117 = require("path");
17392
+ var import_node_path118 = require("path");
17181
17393
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
17182
17394
  toRulesyncRule() {
17183
17395
  const rulesyncFrontmatter = {
@@ -17237,8 +17449,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
17237
17449
  }) {
17238
17450
  const settablePaths = this.getSettablePaths();
17239
17451
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
17240
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path117.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
17241
- const fileContent = await readFileContent((0, import_node_path117.join)(baseDir, relativePath));
17452
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path118.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
17453
+ const fileContent = await readFileContent((0, import_node_path118.join)(baseDir, relativePath));
17242
17454
  return new _AugmentcodeLegacyRule({
17243
17455
  baseDir,
17244
17456
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -17267,7 +17479,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
17267
17479
  };
17268
17480
 
17269
17481
  // src/features/rules/augmentcode-rule.ts
17270
- var import_node_path118 = require("path");
17482
+ var import_node_path119 = require("path");
17271
17483
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
17272
17484
  toRulesyncRule() {
17273
17485
  return this.toRulesyncRuleDefault();
@@ -17298,7 +17510,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
17298
17510
  relativeFilePath,
17299
17511
  validate = true
17300
17512
  }) {
17301
- const filePath = (0, import_node_path118.join)(
17513
+ const filePath = (0, import_node_path119.join)(
17302
17514
  baseDir,
17303
17515
  this.getSettablePaths().nonRoot.relativeDirPath,
17304
17516
  relativeFilePath
@@ -17338,7 +17550,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
17338
17550
  };
17339
17551
 
17340
17552
  // src/features/rules/claudecode-legacy-rule.ts
17341
- var import_node_path119 = require("path");
17553
+ var import_node_path120 = require("path");
17342
17554
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17343
17555
  static getSettablePaths({
17344
17556
  global,
@@ -17380,7 +17592,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17380
17592
  if (isRoot) {
17381
17593
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
17382
17594
  const fileContent2 = await readFileContent(
17383
- (0, import_node_path119.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
17595
+ (0, import_node_path120.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
17384
17596
  );
17385
17597
  return new _ClaudecodeLegacyRule({
17386
17598
  baseDir,
@@ -17394,8 +17606,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17394
17606
  if (!paths.nonRoot) {
17395
17607
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17396
17608
  }
17397
- const relativePath = (0, import_node_path119.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
17398
- const fileContent = await readFileContent((0, import_node_path119.join)(baseDir, relativePath));
17609
+ const relativePath = (0, import_node_path120.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
17610
+ const fileContent = await readFileContent((0, import_node_path120.join)(baseDir, relativePath));
17399
17611
  return new _ClaudecodeLegacyRule({
17400
17612
  baseDir,
17401
17613
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17454,10 +17666,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17454
17666
  };
17455
17667
 
17456
17668
  // src/features/rules/claudecode-rule.ts
17457
- var import_node_path120 = require("path");
17458
- var import_mini67 = require("zod/mini");
17459
- var ClaudecodeRuleFrontmatterSchema = import_mini67.z.object({
17460
- paths: import_mini67.z.optional(import_mini67.z.array(import_mini67.z.string()))
17669
+ var import_node_path121 = require("path");
17670
+ var import_mini68 = require("zod/mini");
17671
+ var ClaudecodeRuleFrontmatterSchema = import_mini68.z.object({
17672
+ paths: import_mini68.z.optional(import_mini68.z.array(import_mini68.z.string()))
17461
17673
  });
17462
17674
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17463
17675
  frontmatter;
@@ -17495,7 +17707,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17495
17707
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
17496
17708
  if (!result.success) {
17497
17709
  throw new Error(
17498
- `Invalid frontmatter in ${(0, import_node_path120.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17710
+ `Invalid frontmatter in ${(0, import_node_path121.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17499
17711
  );
17500
17712
  }
17501
17713
  }
@@ -17525,7 +17737,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17525
17737
  if (isRoot) {
17526
17738
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
17527
17739
  const fileContent2 = await readFileContent(
17528
- (0, import_node_path120.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
17740
+ (0, import_node_path121.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
17529
17741
  );
17530
17742
  return new _ClaudecodeRule({
17531
17743
  baseDir,
@@ -17540,8 +17752,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17540
17752
  if (!paths.nonRoot) {
17541
17753
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17542
17754
  }
17543
- const relativePath = (0, import_node_path120.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
17544
- const filePath = (0, import_node_path120.join)(baseDir, relativePath);
17755
+ const relativePath = (0, import_node_path121.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
17756
+ const filePath = (0, import_node_path121.join)(baseDir, relativePath);
17545
17757
  const fileContent = await readFileContent(filePath);
17546
17758
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
17547
17759
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
@@ -17652,7 +17864,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17652
17864
  return {
17653
17865
  success: false,
17654
17866
  error: new Error(
17655
- `Invalid frontmatter in ${(0, import_node_path120.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17867
+ `Invalid frontmatter in ${(0, import_node_path121.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17656
17868
  )
17657
17869
  };
17658
17870
  }
@@ -17672,10 +17884,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17672
17884
  };
17673
17885
 
17674
17886
  // src/features/rules/cline-rule.ts
17675
- var import_node_path121 = require("path");
17676
- var import_mini68 = require("zod/mini");
17677
- var ClineRuleFrontmatterSchema = import_mini68.z.object({
17678
- description: import_mini68.z.string()
17887
+ var import_node_path122 = require("path");
17888
+ var import_mini69 = require("zod/mini");
17889
+ var ClineRuleFrontmatterSchema = import_mini69.z.object({
17890
+ description: import_mini69.z.string()
17679
17891
  });
17680
17892
  var ClineRule = class _ClineRule extends ToolRule {
17681
17893
  static getSettablePaths(_options = {}) {
@@ -17718,7 +17930,7 @@ var ClineRule = class _ClineRule extends ToolRule {
17718
17930
  validate = true
17719
17931
  }) {
17720
17932
  const fileContent = await readFileContent(
17721
- (0, import_node_path121.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17933
+ (0, import_node_path122.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17722
17934
  );
17723
17935
  return new _ClineRule({
17724
17936
  baseDir,
@@ -17744,7 +17956,7 @@ var ClineRule = class _ClineRule extends ToolRule {
17744
17956
  };
17745
17957
 
17746
17958
  // src/features/rules/codexcli-rule.ts
17747
- var import_node_path122 = require("path");
17959
+ var import_node_path123 = require("path");
17748
17960
  var CodexcliRule = class _CodexcliRule extends ToolRule {
17749
17961
  static getSettablePaths({
17750
17962
  global,
@@ -17779,7 +17991,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
17779
17991
  if (isRoot) {
17780
17992
  const relativePath2 = paths.root.relativeFilePath;
17781
17993
  const fileContent2 = await readFileContent(
17782
- (0, import_node_path122.join)(baseDir, paths.root.relativeDirPath, relativePath2)
17994
+ (0, import_node_path123.join)(baseDir, paths.root.relativeDirPath, relativePath2)
17783
17995
  );
17784
17996
  return new _CodexcliRule({
17785
17997
  baseDir,
@@ -17793,8 +18005,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
17793
18005
  if (!paths.nonRoot) {
17794
18006
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17795
18007
  }
17796
- const relativePath = (0, import_node_path122.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
17797
- const fileContent = await readFileContent((0, import_node_path122.join)(baseDir, relativePath));
18008
+ const relativePath = (0, import_node_path123.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18009
+ const fileContent = await readFileContent((0, import_node_path123.join)(baseDir, relativePath));
17798
18010
  return new _CodexcliRule({
17799
18011
  baseDir,
17800
18012
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17853,12 +18065,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
17853
18065
  };
17854
18066
 
17855
18067
  // src/features/rules/copilot-rule.ts
17856
- var import_node_path123 = require("path");
17857
- var import_mini69 = require("zod/mini");
17858
- var CopilotRuleFrontmatterSchema = import_mini69.z.object({
17859
- description: import_mini69.z.optional(import_mini69.z.string()),
17860
- applyTo: import_mini69.z.optional(import_mini69.z.string()),
17861
- excludeAgent: import_mini69.z.optional(import_mini69.z.union([import_mini69.z.literal("code-review"), import_mini69.z.literal("coding-agent")]))
18068
+ var import_node_path124 = require("path");
18069
+ var import_mini70 = require("zod/mini");
18070
+ var CopilotRuleFrontmatterSchema = import_mini70.z.object({
18071
+ description: import_mini70.z.optional(import_mini70.z.string()),
18072
+ applyTo: import_mini70.z.optional(import_mini70.z.string()),
18073
+ excludeAgent: import_mini70.z.optional(import_mini70.z.union([import_mini70.z.literal("code-review"), import_mini70.z.literal("coding-agent")]))
17862
18074
  });
17863
18075
  var CopilotRule = class _CopilotRule extends ToolRule {
17864
18076
  frontmatter;
@@ -17890,7 +18102,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17890
18102
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
17891
18103
  if (!result.success) {
17892
18104
  throw new Error(
17893
- `Invalid frontmatter in ${(0, import_node_path123.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18105
+ `Invalid frontmatter in ${(0, import_node_path124.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17894
18106
  );
17895
18107
  }
17896
18108
  }
@@ -17980,8 +18192,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17980
18192
  const paths = this.getSettablePaths({ global });
17981
18193
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
17982
18194
  if (isRoot) {
17983
- const relativePath2 = (0, import_node_path123.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
17984
- const filePath2 = (0, import_node_path123.join)(baseDir, relativePath2);
18195
+ const relativePath2 = (0, import_node_path124.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
18196
+ const filePath2 = (0, import_node_path124.join)(baseDir, relativePath2);
17985
18197
  const fileContent2 = await readFileContent(filePath2);
17986
18198
  return new _CopilotRule({
17987
18199
  baseDir,
@@ -17996,8 +18208,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17996
18208
  if (!paths.nonRoot) {
17997
18209
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17998
18210
  }
17999
- const relativePath = (0, import_node_path123.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18000
- const filePath = (0, import_node_path123.join)(baseDir, relativePath);
18211
+ const relativePath = (0, import_node_path124.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18212
+ const filePath = (0, import_node_path124.join)(baseDir, relativePath);
18001
18213
  const fileContent = await readFileContent(filePath);
18002
18214
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
18003
18215
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
@@ -18043,7 +18255,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
18043
18255
  return {
18044
18256
  success: false,
18045
18257
  error: new Error(
18046
- `Invalid frontmatter in ${(0, import_node_path123.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18258
+ `Invalid frontmatter in ${(0, import_node_path124.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18047
18259
  )
18048
18260
  };
18049
18261
  }
@@ -18099,12 +18311,12 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
18099
18311
  };
18100
18312
 
18101
18313
  // src/features/rules/cursor-rule.ts
18102
- var import_node_path124 = require("path");
18103
- var import_mini70 = require("zod/mini");
18104
- var CursorRuleFrontmatterSchema = import_mini70.z.object({
18105
- description: import_mini70.z.optional(import_mini70.z.string()),
18106
- globs: import_mini70.z.optional(import_mini70.z.string()),
18107
- alwaysApply: import_mini70.z.optional(import_mini70.z.boolean())
18314
+ var import_node_path125 = require("path");
18315
+ var import_mini71 = require("zod/mini");
18316
+ var CursorRuleFrontmatterSchema = import_mini71.z.object({
18317
+ description: import_mini71.z.optional(import_mini71.z.string()),
18318
+ globs: import_mini71.z.optional(import_mini71.z.string()),
18319
+ alwaysApply: import_mini71.z.optional(import_mini71.z.boolean())
18108
18320
  });
18109
18321
  var CursorRule = class _CursorRule extends ToolRule {
18110
18322
  frontmatter;
@@ -18121,7 +18333,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18121
18333
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
18122
18334
  if (!result.success) {
18123
18335
  throw new Error(
18124
- `Invalid frontmatter in ${(0, import_node_path124.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18336
+ `Invalid frontmatter in ${(0, import_node_path125.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18125
18337
  );
18126
18338
  }
18127
18339
  }
@@ -18237,7 +18449,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18237
18449
  relativeFilePath,
18238
18450
  validate = true
18239
18451
  }) {
18240
- const filePath = (0, import_node_path124.join)(
18452
+ const filePath = (0, import_node_path125.join)(
18241
18453
  baseDir,
18242
18454
  this.getSettablePaths().nonRoot.relativeDirPath,
18243
18455
  relativeFilePath
@@ -18247,7 +18459,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18247
18459
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
18248
18460
  if (!result.success) {
18249
18461
  throw new Error(
18250
- `Invalid frontmatter in ${(0, import_node_path124.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
18462
+ `Invalid frontmatter in ${(0, import_node_path125.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
18251
18463
  );
18252
18464
  }
18253
18465
  return new _CursorRule({
@@ -18284,7 +18496,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18284
18496
  return {
18285
18497
  success: false,
18286
18498
  error: new Error(
18287
- `Invalid frontmatter in ${(0, import_node_path124.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18499
+ `Invalid frontmatter in ${(0, import_node_path125.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18288
18500
  )
18289
18501
  };
18290
18502
  }
@@ -18304,7 +18516,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18304
18516
  };
18305
18517
 
18306
18518
  // src/features/rules/deepagents-rule.ts
18307
- var import_node_path125 = require("path");
18519
+ var import_node_path126 = require("path");
18308
18520
  var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18309
18521
  constructor({ fileContent, root, ...rest }) {
18310
18522
  super({
@@ -18331,8 +18543,8 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18331
18543
  }) {
18332
18544
  const settablePaths = this.getSettablePaths();
18333
18545
  const isRoot = relativeFilePath === "AGENTS.md";
18334
- const relativePath = isRoot ? (0, import_node_path125.join)(".deepagents", "AGENTS.md") : (0, import_node_path125.join)(".deepagents", "memories", relativeFilePath);
18335
- const fileContent = await readFileContent((0, import_node_path125.join)(baseDir, relativePath));
18546
+ const relativePath = isRoot ? (0, import_node_path126.join)(".deepagents", "AGENTS.md") : (0, import_node_path126.join)(".deepagents", "memories", relativeFilePath);
18547
+ const fileContent = await readFileContent((0, import_node_path126.join)(baseDir, relativePath));
18336
18548
  return new _DeepagentsRule({
18337
18549
  baseDir,
18338
18550
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -18387,7 +18599,7 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18387
18599
  };
18388
18600
 
18389
18601
  // src/features/rules/factorydroid-rule.ts
18390
- var import_node_path126 = require("path");
18602
+ var import_node_path127 = require("path");
18391
18603
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18392
18604
  constructor({ fileContent, root, ...rest }) {
18393
18605
  super({
@@ -18427,8 +18639,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18427
18639
  const paths = this.getSettablePaths({ global });
18428
18640
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
18429
18641
  if (isRoot) {
18430
- const relativePath2 = (0, import_node_path126.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
18431
- const fileContent2 = await readFileContent((0, import_node_path126.join)(baseDir, relativePath2));
18642
+ const relativePath2 = (0, import_node_path127.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
18643
+ const fileContent2 = await readFileContent((0, import_node_path127.join)(baseDir, relativePath2));
18432
18644
  return new _FactorydroidRule({
18433
18645
  baseDir,
18434
18646
  relativeDirPath: paths.root.relativeDirPath,
@@ -18441,8 +18653,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18441
18653
  if (!paths.nonRoot) {
18442
18654
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18443
18655
  }
18444
- const relativePath = (0, import_node_path126.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18445
- const fileContent = await readFileContent((0, import_node_path126.join)(baseDir, relativePath));
18656
+ const relativePath = (0, import_node_path127.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18657
+ const fileContent = await readFileContent((0, import_node_path127.join)(baseDir, relativePath));
18446
18658
  return new _FactorydroidRule({
18447
18659
  baseDir,
18448
18660
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18501,7 +18713,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18501
18713
  };
18502
18714
 
18503
18715
  // src/features/rules/geminicli-rule.ts
18504
- var import_node_path127 = require("path");
18716
+ var import_node_path128 = require("path");
18505
18717
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18506
18718
  static getSettablePaths({
18507
18719
  global,
@@ -18536,7 +18748,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18536
18748
  if (isRoot) {
18537
18749
  const relativePath2 = paths.root.relativeFilePath;
18538
18750
  const fileContent2 = await readFileContent(
18539
- (0, import_node_path127.join)(baseDir, paths.root.relativeDirPath, relativePath2)
18751
+ (0, import_node_path128.join)(baseDir, paths.root.relativeDirPath, relativePath2)
18540
18752
  );
18541
18753
  return new _GeminiCliRule({
18542
18754
  baseDir,
@@ -18550,8 +18762,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18550
18762
  if (!paths.nonRoot) {
18551
18763
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18552
18764
  }
18553
- const relativePath = (0, import_node_path127.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18554
- const fileContent = await readFileContent((0, import_node_path127.join)(baseDir, relativePath));
18765
+ const relativePath = (0, import_node_path128.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18766
+ const fileContent = await readFileContent((0, import_node_path128.join)(baseDir, relativePath));
18555
18767
  return new _GeminiCliRule({
18556
18768
  baseDir,
18557
18769
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18610,7 +18822,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18610
18822
  };
18611
18823
 
18612
18824
  // src/features/rules/goose-rule.ts
18613
- var import_node_path128 = require("path");
18825
+ var import_node_path129 = require("path");
18614
18826
  var GooseRule = class _GooseRule extends ToolRule {
18615
18827
  static getSettablePaths({
18616
18828
  global,
@@ -18645,7 +18857,7 @@ var GooseRule = class _GooseRule extends ToolRule {
18645
18857
  if (isRoot) {
18646
18858
  const relativePath2 = paths.root.relativeFilePath;
18647
18859
  const fileContent2 = await readFileContent(
18648
- (0, import_node_path128.join)(baseDir, paths.root.relativeDirPath, relativePath2)
18860
+ (0, import_node_path129.join)(baseDir, paths.root.relativeDirPath, relativePath2)
18649
18861
  );
18650
18862
  return new _GooseRule({
18651
18863
  baseDir,
@@ -18659,8 +18871,8 @@ var GooseRule = class _GooseRule extends ToolRule {
18659
18871
  if (!paths.nonRoot) {
18660
18872
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18661
18873
  }
18662
- const relativePath = (0, import_node_path128.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18663
- const fileContent = await readFileContent((0, import_node_path128.join)(baseDir, relativePath));
18874
+ const relativePath = (0, import_node_path129.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18875
+ const fileContent = await readFileContent((0, import_node_path129.join)(baseDir, relativePath));
18664
18876
  return new _GooseRule({
18665
18877
  baseDir,
18666
18878
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18719,7 +18931,7 @@ var GooseRule = class _GooseRule extends ToolRule {
18719
18931
  };
18720
18932
 
18721
18933
  // src/features/rules/junie-rule.ts
18722
- var import_node_path129 = require("path");
18934
+ var import_node_path130 = require("path");
18723
18935
  var JunieRule = class _JunieRule extends ToolRule {
18724
18936
  static getSettablePaths(_options = {}) {
18725
18937
  return {
@@ -18748,8 +18960,8 @@ var JunieRule = class _JunieRule extends ToolRule {
18748
18960
  }) {
18749
18961
  const isRoot = _JunieRule.isRootRelativeFilePath(relativeFilePath);
18750
18962
  const settablePaths = this.getSettablePaths();
18751
- const relativePath = isRoot ? (0, import_node_path129.join)(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : (0, import_node_path129.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
18752
- const fileContent = await readFileContent((0, import_node_path129.join)(baseDir, relativePath));
18963
+ const relativePath = isRoot ? (0, import_node_path130.join)(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : (0, import_node_path130.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
18964
+ const fileContent = await readFileContent((0, import_node_path130.join)(baseDir, relativePath));
18753
18965
  return new _JunieRule({
18754
18966
  baseDir,
18755
18967
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -18804,7 +19016,7 @@ var JunieRule = class _JunieRule extends ToolRule {
18804
19016
  };
18805
19017
 
18806
19018
  // src/features/rules/kilo-rule.ts
18807
- var import_node_path130 = require("path");
19019
+ var import_node_path131 = require("path");
18808
19020
  var KiloRule = class _KiloRule extends ToolRule {
18809
19021
  static getSettablePaths({
18810
19022
  global,
@@ -18839,7 +19051,7 @@ var KiloRule = class _KiloRule extends ToolRule {
18839
19051
  if (isRoot) {
18840
19052
  const relativePath2 = paths.root.relativeFilePath;
18841
19053
  const fileContent2 = await readFileContent(
18842
- (0, import_node_path130.join)(baseDir, paths.root.relativeDirPath, relativePath2)
19054
+ (0, import_node_path131.join)(baseDir, paths.root.relativeDirPath, relativePath2)
18843
19055
  );
18844
19056
  return new _KiloRule({
18845
19057
  baseDir,
@@ -18853,8 +19065,8 @@ var KiloRule = class _KiloRule extends ToolRule {
18853
19065
  if (!paths.nonRoot) {
18854
19066
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18855
19067
  }
18856
- const relativePath = (0, import_node_path130.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18857
- const fileContent = await readFileContent((0, import_node_path130.join)(baseDir, relativePath));
19068
+ const relativePath = (0, import_node_path131.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
19069
+ const fileContent = await readFileContent((0, import_node_path131.join)(baseDir, relativePath));
18858
19070
  return new _KiloRule({
18859
19071
  baseDir,
18860
19072
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18913,7 +19125,7 @@ var KiloRule = class _KiloRule extends ToolRule {
18913
19125
  };
18914
19126
 
18915
19127
  // src/features/rules/kiro-rule.ts
18916
- var import_node_path131 = require("path");
19128
+ var import_node_path132 = require("path");
18917
19129
  var KiroRule = class _KiroRule extends ToolRule {
18918
19130
  static getSettablePaths(_options = {}) {
18919
19131
  return {
@@ -18928,7 +19140,7 @@ var KiroRule = class _KiroRule extends ToolRule {
18928
19140
  validate = true
18929
19141
  }) {
18930
19142
  const fileContent = await readFileContent(
18931
- (0, import_node_path131.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19143
+ (0, import_node_path132.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18932
19144
  );
18933
19145
  return new _KiroRule({
18934
19146
  baseDir,
@@ -18982,7 +19194,7 @@ var KiroRule = class _KiroRule extends ToolRule {
18982
19194
  };
18983
19195
 
18984
19196
  // src/features/rules/opencode-rule.ts
18985
- var import_node_path132 = require("path");
19197
+ var import_node_path133 = require("path");
18986
19198
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18987
19199
  static getSettablePaths({
18988
19200
  global,
@@ -19017,7 +19229,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
19017
19229
  if (isRoot) {
19018
19230
  const relativePath2 = paths.root.relativeFilePath;
19019
19231
  const fileContent2 = await readFileContent(
19020
- (0, import_node_path132.join)(baseDir, paths.root.relativeDirPath, relativePath2)
19232
+ (0, import_node_path133.join)(baseDir, paths.root.relativeDirPath, relativePath2)
19021
19233
  );
19022
19234
  return new _OpenCodeRule({
19023
19235
  baseDir,
@@ -19031,8 +19243,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
19031
19243
  if (!paths.nonRoot) {
19032
19244
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
19033
19245
  }
19034
- const relativePath = (0, import_node_path132.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
19035
- const fileContent = await readFileContent((0, import_node_path132.join)(baseDir, relativePath));
19246
+ const relativePath = (0, import_node_path133.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
19247
+ const fileContent = await readFileContent((0, import_node_path133.join)(baseDir, relativePath));
19036
19248
  return new _OpenCodeRule({
19037
19249
  baseDir,
19038
19250
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -19091,7 +19303,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
19091
19303
  };
19092
19304
 
19093
19305
  // src/features/rules/qwencode-rule.ts
19094
- var import_node_path133 = require("path");
19306
+ var import_node_path134 = require("path");
19095
19307
  var QwencodeRule = class _QwencodeRule extends ToolRule {
19096
19308
  static getSettablePaths(_options = {}) {
19097
19309
  return {
@@ -19110,8 +19322,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
19110
19322
  validate = true
19111
19323
  }) {
19112
19324
  const isRoot = relativeFilePath === "QWEN.md";
19113
- const relativePath = isRoot ? "QWEN.md" : (0, import_node_path133.join)(".qwen", "memories", relativeFilePath);
19114
- const fileContent = await readFileContent((0, import_node_path133.join)(baseDir, relativePath));
19325
+ const relativePath = isRoot ? "QWEN.md" : (0, import_node_path134.join)(".qwen", "memories", relativeFilePath);
19326
+ const fileContent = await readFileContent((0, import_node_path134.join)(baseDir, relativePath));
19115
19327
  return new _QwencodeRule({
19116
19328
  baseDir,
19117
19329
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -19163,7 +19375,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
19163
19375
  };
19164
19376
 
19165
19377
  // src/features/rules/replit-rule.ts
19166
- var import_node_path134 = require("path");
19378
+ var import_node_path135 = require("path");
19167
19379
  var ReplitRule = class _ReplitRule extends ToolRule {
19168
19380
  static getSettablePaths(_options = {}) {
19169
19381
  return {
@@ -19185,7 +19397,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
19185
19397
  }
19186
19398
  const relativePath = paths.root.relativeFilePath;
19187
19399
  const fileContent = await readFileContent(
19188
- (0, import_node_path134.join)(baseDir, paths.root.relativeDirPath, relativePath)
19400
+ (0, import_node_path135.join)(baseDir, paths.root.relativeDirPath, relativePath)
19189
19401
  );
19190
19402
  return new _ReplitRule({
19191
19403
  baseDir,
@@ -19251,7 +19463,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
19251
19463
  };
19252
19464
 
19253
19465
  // src/features/rules/roo-rule.ts
19254
- var import_node_path135 = require("path");
19466
+ var import_node_path136 = require("path");
19255
19467
  var RooRule = class _RooRule extends ToolRule {
19256
19468
  static getSettablePaths(_options = {}) {
19257
19469
  return {
@@ -19266,7 +19478,7 @@ var RooRule = class _RooRule extends ToolRule {
19266
19478
  validate = true
19267
19479
  }) {
19268
19480
  const fileContent = await readFileContent(
19269
- (0, import_node_path135.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19481
+ (0, import_node_path136.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19270
19482
  );
19271
19483
  return new _RooRule({
19272
19484
  baseDir,
@@ -19335,7 +19547,7 @@ var RooRule = class _RooRule extends ToolRule {
19335
19547
  };
19336
19548
 
19337
19549
  // src/features/rules/rovodev-rule.ts
19338
- var import_node_path136 = require("path");
19550
+ var import_node_path137 = require("path");
19339
19551
  var DISALLOWED_ROVODEV_MODULAR_RULE_BASENAMES = /* @__PURE__ */ new Set(["agents.md", "agents.local.md"]);
19340
19552
  var RovodevRule = class _RovodevRule extends ToolRule {
19341
19553
  /**
@@ -19379,7 +19591,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19379
19591
  root: rovodevAgents,
19380
19592
  alternativeRoots: [{ relativeDirPath: ".", relativeFilePath: "AGENTS.md" }],
19381
19593
  nonRoot: {
19382
- relativeDirPath: (0, import_node_path136.join)(".rovodev", ".rulesync", "modular-rules")
19594
+ relativeDirPath: (0, import_node_path137.join)(".rovodev", ".rulesync", "modular-rules")
19383
19595
  }
19384
19596
  };
19385
19597
  }
@@ -19418,10 +19630,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19418
19630
  }) {
19419
19631
  if (!this.isAllowedModularRulesRelativePath(relativeFilePath)) {
19420
19632
  throw new Error(
19421
- `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${(0, import_node_path136.join)(relativeDirPath, relativeFilePath)}`
19633
+ `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${(0, import_node_path137.join)(relativeDirPath, relativeFilePath)}`
19422
19634
  );
19423
19635
  }
19424
- const fileContent = await readFileContent((0, import_node_path136.join)(baseDir, relativeDirPath, relativeFilePath));
19636
+ const fileContent = await readFileContent((0, import_node_path137.join)(baseDir, relativeDirPath, relativeFilePath));
19425
19637
  return new _RovodevRule({
19426
19638
  baseDir,
19427
19639
  relativeDirPath,
@@ -19441,10 +19653,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19441
19653
  paths
19442
19654
  }) {
19443
19655
  const relativeDirPath = overrideDirPath ?? paths.root.relativeDirPath;
19444
- const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${(0, import_node_path136.join)(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : (0, import_node_path136.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
19656
+ const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${(0, import_node_path137.join)(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : (0, import_node_path137.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
19445
19657
  if (relativeFilePath !== "AGENTS.md") {
19446
19658
  throw new Error(
19447
- `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path136.join)(relativeDirPath, relativeFilePath)}`
19659
+ `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path137.join)(relativeDirPath, relativeFilePath)}`
19448
19660
  );
19449
19661
  }
19450
19662
  const allowed = relativeDirPath === paths.root.relativeDirPath || "alternativeRoots" in paths && paths.alternativeRoots?.some(
@@ -19452,10 +19664,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19452
19664
  );
19453
19665
  if (!allowed) {
19454
19666
  throw new Error(
19455
- `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path136.join)(relativeDirPath, relativeFilePath)}`
19667
+ `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path137.join)(relativeDirPath, relativeFilePath)}`
19456
19668
  );
19457
19669
  }
19458
- const fileContent = await readFileContent((0, import_node_path136.join)(baseDir, relativeDirPath, relativeFilePath));
19670
+ const fileContent = await readFileContent((0, import_node_path137.join)(baseDir, relativeDirPath, relativeFilePath));
19459
19671
  return new _RovodevRule({
19460
19672
  baseDir,
19461
19673
  relativeDirPath,
@@ -19569,7 +19781,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19569
19781
  };
19570
19782
 
19571
19783
  // src/features/rules/warp-rule.ts
19572
- var import_node_path137 = require("path");
19784
+ var import_node_path138 = require("path");
19573
19785
  var WarpRule = class _WarpRule extends ToolRule {
19574
19786
  constructor({ fileContent, root, ...rest }) {
19575
19787
  super({
@@ -19595,8 +19807,8 @@ var WarpRule = class _WarpRule extends ToolRule {
19595
19807
  validate = true
19596
19808
  }) {
19597
19809
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
19598
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path137.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
19599
- const fileContent = await readFileContent((0, import_node_path137.join)(baseDir, relativePath));
19810
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path138.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
19811
+ const fileContent = await readFileContent((0, import_node_path138.join)(baseDir, relativePath));
19600
19812
  return new _WarpRule({
19601
19813
  baseDir,
19602
19814
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -19651,7 +19863,7 @@ var WarpRule = class _WarpRule extends ToolRule {
19651
19863
  };
19652
19864
 
19653
19865
  // src/features/rules/windsurf-rule.ts
19654
- var import_node_path138 = require("path");
19866
+ var import_node_path139 = require("path");
19655
19867
  var WindsurfRule = class _WindsurfRule extends ToolRule {
19656
19868
  static getSettablePaths(_options = {}) {
19657
19869
  return {
@@ -19666,7 +19878,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
19666
19878
  validate = true
19667
19879
  }) {
19668
19880
  const fileContent = await readFileContent(
19669
- (0, import_node_path138.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19881
+ (0, import_node_path139.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19670
19882
  );
19671
19883
  return new _WindsurfRule({
19672
19884
  baseDir,
@@ -19764,11 +19976,11 @@ var rulesProcessorToolTargets = [
19764
19976
  "warp",
19765
19977
  "windsurf"
19766
19978
  ];
19767
- var RulesProcessorToolTargetSchema = import_mini71.z.enum(rulesProcessorToolTargets);
19768
- var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path139.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
19769
- var RulesFeatureOptionsSchema = import_mini71.z.looseObject({
19770
- ruleDiscoveryMode: import_mini71.z.optional(import_mini71.z.enum(["none", "explicit"])),
19771
- includeLocalRoot: import_mini71.z.optional(import_mini71.z.boolean())
19979
+ var RulesProcessorToolTargetSchema = import_mini72.z.enum(rulesProcessorToolTargets);
19980
+ var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path140.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
19981
+ var RulesFeatureOptionsSchema = import_mini72.z.looseObject({
19982
+ ruleDiscoveryMode: import_mini72.z.optional(import_mini72.z.enum(["none", "explicit"])),
19983
+ includeLocalRoot: import_mini72.z.optional(import_mini72.z.boolean())
19772
19984
  });
19773
19985
  var resolveRuleDiscoveryMode = ({
19774
19986
  defaultMode,
@@ -19789,8 +20001,8 @@ var resolveRuleDiscoveryMode = ({
19789
20001
  }
19790
20002
  return parsed.data.ruleDiscoveryMode === "none" ? "auto" : "toon";
19791
20003
  };
19792
- var IncludeLocalRootSchema = import_mini71.z.looseObject({
19793
- includeLocalRoot: import_mini71.z.optional(import_mini71.z.boolean())
20004
+ var IncludeLocalRootSchema = import_mini72.z.looseObject({
20005
+ includeLocalRoot: import_mini72.z.optional(import_mini72.z.boolean())
19794
20006
  });
19795
20007
  var resolveIncludeLocalRoot = (options) => {
19796
20008
  if (!options) return true;
@@ -20096,6 +20308,8 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
20096
20308
  extension: "md",
20097
20309
  supportsGlobal: false,
20098
20310
  ruleDiscoveryMode: "auto"
20311
+ // No additionalConventions.skills needed: Windsurf Cascade auto-discovers
20312
+ // skills from .windsurf/skills/ and ~/.codeium/windsurf/skills/ directories.
20099
20313
  }
20100
20314
  }
20101
20315
  ]
@@ -20233,7 +20447,7 @@ var RulesProcessor = class extends FeatureProcessor {
20233
20447
  }).relativeDirPath;
20234
20448
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
20235
20449
  const frontmatter = skill.getFrontmatter();
20236
- const relativePath = (0, import_node_path139.join)(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
20450
+ const relativePath = (0, import_node_path140.join)(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
20237
20451
  return {
20238
20452
  name: frontmatter.name,
20239
20453
  description: frontmatter.description,
@@ -20362,12 +20576,12 @@ var RulesProcessor = class extends FeatureProcessor {
20362
20576
  * Load and parse rulesync rule files from .rulesync/rules/ directory
20363
20577
  */
20364
20578
  async loadRulesyncFiles() {
20365
- const rulesyncBaseDir = (0, import_node_path139.join)(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
20366
- const files = await findFilesByGlobs((0, import_node_path139.join)(rulesyncBaseDir, "**", "*.md"));
20579
+ const rulesyncBaseDir = (0, import_node_path140.join)(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
20580
+ const files = await findFilesByGlobs((0, import_node_path140.join)(rulesyncBaseDir, "**", "*.md"));
20367
20581
  this.logger.debug(`Found ${files.length} rulesync files`);
20368
20582
  const rulesyncRules = await Promise.all(
20369
20583
  files.map((file) => {
20370
- const relativeFilePath = (0, import_node_path139.relative)(rulesyncBaseDir, file);
20584
+ const relativeFilePath = (0, import_node_path140.relative)(rulesyncBaseDir, file);
20371
20585
  checkPathTraversal({
20372
20586
  relativePath: relativeFilePath,
20373
20587
  intendedRootDir: rulesyncBaseDir
@@ -20442,7 +20656,7 @@ var RulesProcessor = class extends FeatureProcessor {
20442
20656
  global: this.global
20443
20657
  });
20444
20658
  const resolveRelativeDirPath = (filePath) => {
20445
- const dirName = (0, import_node_path139.dirname)((0, import_node_path139.relative)(this.baseDir, filePath));
20659
+ const dirName = (0, import_node_path140.dirname)((0, import_node_path140.relative)(this.baseDir, filePath));
20446
20660
  return dirName === "" ? "." : dirName;
20447
20661
  };
20448
20662
  const buildDeletionRulesFromPaths = (filePaths, opts) => {
@@ -20450,7 +20664,7 @@ var RulesProcessor = class extends FeatureProcessor {
20450
20664
  const effectiveBaseDir = isNonRoot ? opts.baseDirOverride : this.baseDir;
20451
20665
  return filePaths.map((filePath) => {
20452
20666
  const relativeDirPath = isNonRoot ? opts.relativeDirPathOverride : resolveRelativeDirPath(filePath);
20453
- const relativeFilePath = isNonRoot ? (0, import_node_path139.relative)(effectiveBaseDir, filePath) : (0, import_node_path139.basename)(filePath);
20667
+ const relativeFilePath = isNonRoot ? (0, import_node_path140.relative)(effectiveBaseDir, filePath) : (0, import_node_path140.basename)(filePath);
20454
20668
  checkPathTraversal({
20455
20669
  relativePath: isNonRoot ? relativeFilePath : relativeDirPath,
20456
20670
  intendedRootDir: effectiveBaseDir
@@ -20478,13 +20692,13 @@ var RulesProcessor = class extends FeatureProcessor {
20478
20692
  return [];
20479
20693
  }
20480
20694
  const uniqueRootFilePaths = await findFilesWithFallback(
20481
- (0, import_node_path139.join)(
20695
+ (0, import_node_path140.join)(
20482
20696
  this.baseDir,
20483
20697
  settablePaths.root.relativeDirPath ?? ".",
20484
20698
  settablePaths.root.relativeFilePath
20485
20699
  ),
20486
20700
  settablePaths.alternativeRoots,
20487
- (alt) => (0, import_node_path139.join)(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
20701
+ (alt) => (0, import_node_path140.join)(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
20488
20702
  );
20489
20703
  if (forDeletion) {
20490
20704
  return buildDeletionRulesFromPaths(uniqueRootFilePaths);
@@ -20498,7 +20712,7 @@ var RulesProcessor = class extends FeatureProcessor {
20498
20712
  });
20499
20713
  return factory.class.fromFile({
20500
20714
  baseDir: this.baseDir,
20501
- relativeFilePath: (0, import_node_path139.basename)(filePath),
20715
+ relativeFilePath: (0, import_node_path140.basename)(filePath),
20502
20716
  relativeDirPath,
20503
20717
  global: this.global
20504
20718
  });
@@ -20515,7 +20729,7 @@ var RulesProcessor = class extends FeatureProcessor {
20515
20729
  return [];
20516
20730
  }
20517
20731
  const uniqueLocalRootFilePaths2 = await findFilesByGlobs(
20518
- (0, import_node_path139.join)(this.baseDir, "AGENTS.local.md")
20732
+ (0, import_node_path140.join)(this.baseDir, "AGENTS.local.md")
20519
20733
  );
20520
20734
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths2);
20521
20735
  }
@@ -20526,9 +20740,9 @@ var RulesProcessor = class extends FeatureProcessor {
20526
20740
  return [];
20527
20741
  }
20528
20742
  const uniqueLocalRootFilePaths = await findFilesWithFallback(
20529
- (0, import_node_path139.join)(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
20743
+ (0, import_node_path140.join)(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
20530
20744
  settablePaths.alternativeRoots,
20531
- (alt) => (0, import_node_path139.join)(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
20745
+ (alt) => (0, import_node_path140.join)(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
20532
20746
  );
20533
20747
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths);
20534
20748
  })();
@@ -20539,20 +20753,20 @@ var RulesProcessor = class extends FeatureProcessor {
20539
20753
  if (!forDeletion || this.toolTarget !== "rovodev" || this.global) {
20540
20754
  return [];
20541
20755
  }
20542
- const primaryPaths = await findFilesByGlobs((0, import_node_path139.join)(this.baseDir, ".rovodev", "AGENTS.md"));
20756
+ const primaryPaths = await findFilesByGlobs((0, import_node_path140.join)(this.baseDir, ".rovodev", "AGENTS.md"));
20543
20757
  if (primaryPaths.length === 0) {
20544
20758
  return [];
20545
20759
  }
20546
- const mirrorPaths = await findFilesByGlobs((0, import_node_path139.join)(this.baseDir, "AGENTS.md"));
20760
+ const mirrorPaths = await findFilesByGlobs((0, import_node_path140.join)(this.baseDir, "AGENTS.md"));
20547
20761
  return buildDeletionRulesFromPaths(mirrorPaths);
20548
20762
  })();
20549
20763
  const nonRootToolRules = await (async () => {
20550
20764
  if (!settablePaths.nonRoot) {
20551
20765
  return [];
20552
20766
  }
20553
- const nonRootBaseDir = (0, import_node_path139.join)(this.baseDir, settablePaths.nonRoot.relativeDirPath);
20767
+ const nonRootBaseDir = (0, import_node_path140.join)(this.baseDir, settablePaths.nonRoot.relativeDirPath);
20554
20768
  const nonRootFilePaths = await findFilesByGlobs(
20555
- (0, import_node_path139.join)(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
20769
+ (0, import_node_path140.join)(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
20556
20770
  );
20557
20771
  if (forDeletion) {
20558
20772
  return buildDeletionRulesFromPaths(nonRootFilePaths, {
@@ -20562,18 +20776,18 @@ var RulesProcessor = class extends FeatureProcessor {
20562
20776
  }
20563
20777
  const modularRootRelative = settablePaths.nonRoot.relativeDirPath;
20564
20778
  const nonRootPathsForImport = this.toolTarget === "rovodev" ? nonRootFilePaths.filter((filePath) => {
20565
- const relativeFilePath = (0, import_node_path139.relative)(nonRootBaseDir, filePath);
20779
+ const relativeFilePath = (0, import_node_path140.relative)(nonRootBaseDir, filePath);
20566
20780
  const ok = RovodevRule.isAllowedModularRulesRelativePath(relativeFilePath);
20567
20781
  if (!ok) {
20568
20782
  this.logger.warn(
20569
- `Skipping reserved Rovodev path under modular-rules (import): ${(0, import_node_path139.join)(modularRootRelative, relativeFilePath)}`
20783
+ `Skipping reserved Rovodev path under modular-rules (import): ${(0, import_node_path140.join)(modularRootRelative, relativeFilePath)}`
20570
20784
  );
20571
20785
  }
20572
20786
  return ok;
20573
20787
  }) : nonRootFilePaths;
20574
20788
  return await Promise.all(
20575
20789
  nonRootPathsForImport.map((filePath) => {
20576
- const relativeFilePath = (0, import_node_path139.relative)(nonRootBaseDir, filePath);
20790
+ const relativeFilePath = (0, import_node_path140.relative)(nonRootBaseDir, filePath);
20577
20791
  checkPathTraversal({
20578
20792
  relativePath: relativeFilePath,
20579
20793
  intendedRootDir: nonRootBaseDir
@@ -20692,14 +20906,14 @@ s/<command> [arguments]
20692
20906
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
20693
20907
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
20694
20908
 
20695
- When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path139.join)(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
20909
+ When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path140.join)(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
20696
20910
  const subagentsSection = subagents ? `## Simulated Subagents
20697
20911
 
20698
20912
  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.
20699
20913
 
20700
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path139.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
20914
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path140.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
20701
20915
 
20702
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path139.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
20916
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path140.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
20703
20917
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
20704
20918
  const result = [
20705
20919
  overview,
@@ -20799,7 +21013,7 @@ function warnUnsupportedTargets(params) {
20799
21013
  }
20800
21014
  }
20801
21015
  async function checkRulesyncDirExists(params) {
20802
- return fileExists((0, import_node_path140.join)(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
21016
+ return fileExists((0, import_node_path141.join)(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
20803
21017
  }
20804
21018
  async function generate(params) {
20805
21019
  const { config, logger } = params;