rulesync 7.8.1 → 7.10.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.
@@ -606,7 +606,7 @@ function getBaseDirsInLightOfGlobal({
606
606
  }
607
607
 
608
608
  // src/lib/generate.ts
609
- import { join as join112 } from "path";
609
+ import { join as join113 } from "path";
610
610
  import { intersection } from "es-toolkit";
611
611
 
612
612
  // src/features/commands/commands-processor.ts
@@ -2991,7 +2991,7 @@ var CommandsProcessor = class extends FeatureProcessor {
2991
2991
  };
2992
2992
 
2993
2993
  // src/features/hooks/hooks-processor.ts
2994
- import { z as z15 } from "zod/mini";
2994
+ import { z as z16 } from "zod/mini";
2995
2995
 
2996
2996
  // src/types/hooks.ts
2997
2997
  import { z as z14 } from "zod/mini";
@@ -3056,6 +3056,14 @@ var OPENCODE_HOOK_EVENTS = [
3056
3056
  "afterShellExecution",
3057
3057
  "permissionRequest"
3058
3058
  ];
3059
+ var COPILOT_HOOK_EVENTS = [
3060
+ "sessionStart",
3061
+ "sessionEnd",
3062
+ "afterSubmitPrompt",
3063
+ "preToolUse",
3064
+ "postToolUse",
3065
+ "afterError"
3066
+ ];
3059
3067
  var FACTORYDROID_HOOK_EVENTS = [
3060
3068
  "sessionStart",
3061
3069
  "sessionEnd",
@@ -3075,6 +3083,7 @@ var HooksConfigSchema = z14.looseObject({
3075
3083
  hooks: hooksRecordSchema,
3076
3084
  cursor: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
3077
3085
  claudecode: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
3086
+ copilot: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
3078
3087
  opencode: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
3079
3088
  factorydroid: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) }))
3080
3089
  });
@@ -3144,6 +3153,17 @@ var CANONICAL_TO_OPENCODE_EVENT_NAMES = {
3144
3153
  afterShellExecution: "command.executed",
3145
3154
  permissionRequest: "permission.asked"
3146
3155
  };
3156
+ var CANONICAL_TO_COPILOT_EVENT_NAMES = {
3157
+ sessionStart: "sessionStart",
3158
+ sessionEnd: "sessionEnd",
3159
+ afterSubmitPrompt: "userPromptSubmitted",
3160
+ preToolUse: "preToolUse",
3161
+ postToolUse: "postToolUse",
3162
+ afterError: "errorOccurred"
3163
+ };
3164
+ var COPILOT_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
3165
+ Object.entries(CANONICAL_TO_COPILOT_EVENT_NAMES).map(([k, v]) => [v, k])
3166
+ );
3147
3167
 
3148
3168
  // src/features/hooks/claudecode-hooks.ts
3149
3169
  import { join as join21 } from "path";
@@ -3420,8 +3440,185 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
3420
3440
  }
3421
3441
  };
3422
3442
 
3423
- // src/features/hooks/cursor-hooks.ts
3443
+ // src/features/hooks/copilot-hooks.ts
3424
3444
  import { join as join22 } from "path";
3445
+ import { z as z15 } from "zod/mini";
3446
+ var CopilotHookEntrySchema = z15.looseObject({
3447
+ type: z15.string(),
3448
+ bash: z15.optional(z15.string()),
3449
+ powershell: z15.optional(z15.string()),
3450
+ timeoutSec: z15.optional(z15.number())
3451
+ });
3452
+ function canonicalToCopilotHooks(config) {
3453
+ const isWindows = process.platform === "win32";
3454
+ const commandField = isWindows ? "powershell" : "bash";
3455
+ const supported = new Set(COPILOT_HOOK_EVENTS);
3456
+ const sharedConfigHooks = {};
3457
+ for (const [event, defs] of Object.entries(config.hooks)) {
3458
+ if (supported.has(event)) {
3459
+ sharedConfigHooks[event] = defs;
3460
+ }
3461
+ }
3462
+ const effectiveHooks = {
3463
+ ...sharedConfigHooks,
3464
+ ...config.copilot?.hooks
3465
+ };
3466
+ const copilot = {};
3467
+ for (const [eventName, definitions] of Object.entries(effectiveHooks)) {
3468
+ const copilotEventName = CANONICAL_TO_COPILOT_EVENT_NAMES[eventName] ?? eventName;
3469
+ const entries = [];
3470
+ for (const def of definitions) {
3471
+ const hookType = def.type ?? "command";
3472
+ if (def.matcher) continue;
3473
+ if (hookType !== "command") continue;
3474
+ const command = def.command;
3475
+ const timeout = def.timeout;
3476
+ const rest = Object.fromEntries(
3477
+ Object.entries(def).filter(
3478
+ ([k]) => !["type", "matcher", "command", "prompt", "timeout"].includes(k)
3479
+ )
3480
+ );
3481
+ entries.push({
3482
+ type: hookType,
3483
+ ...command !== void 0 && command !== null && { [commandField]: command },
3484
+ ...timeout !== void 0 && timeout !== null && { timeoutSec: timeout },
3485
+ ...rest
3486
+ });
3487
+ }
3488
+ if (entries.length > 0) {
3489
+ copilot[copilotEventName] = entries;
3490
+ }
3491
+ }
3492
+ return copilot;
3493
+ }
3494
+ function resolveImportCommand(entry) {
3495
+ const hasBash = typeof entry.bash === "string";
3496
+ const hasPowershell = typeof entry.powershell === "string";
3497
+ if (hasBash && hasPowershell) {
3498
+ const isWindows = process.platform === "win32";
3499
+ const chosen = isWindows ? "powershell" : "bash";
3500
+ const ignored = isWindows ? "bash" : "powershell";
3501
+ logger.warn(
3502
+ `Copilot hook has both bash and powershell commands; using ${chosen} and ignoring ${ignored} on this platform.`
3503
+ );
3504
+ return isWindows ? entry.powershell : entry.bash;
3505
+ } else if (hasBash) {
3506
+ return entry.bash;
3507
+ } else if (hasPowershell) {
3508
+ return entry.powershell;
3509
+ }
3510
+ return void 0;
3511
+ }
3512
+ function copilotHooksToCanonical(copilotHooks) {
3513
+ if (copilotHooks === null || copilotHooks === void 0 || typeof copilotHooks !== "object") {
3514
+ return {};
3515
+ }
3516
+ const canonical = {};
3517
+ for (const [copilotEventName, hookEntries] of Object.entries(copilotHooks)) {
3518
+ const eventName = COPILOT_TO_CANONICAL_EVENT_NAMES[copilotEventName] ?? copilotEventName;
3519
+ if (!Array.isArray(hookEntries)) continue;
3520
+ const defs = [];
3521
+ for (const rawEntry of hookEntries) {
3522
+ const parseResult = CopilotHookEntrySchema.safeParse(rawEntry);
3523
+ if (!parseResult.success) continue;
3524
+ const entry = parseResult.data;
3525
+ const command = resolveImportCommand(entry);
3526
+ const timeout = entry.timeoutSec;
3527
+ defs.push({
3528
+ type: "command",
3529
+ ...command !== void 0 && { command },
3530
+ ...timeout !== void 0 && { timeout }
3531
+ });
3532
+ }
3533
+ if (defs.length > 0) {
3534
+ canonical[eventName] = defs;
3535
+ }
3536
+ }
3537
+ return canonical;
3538
+ }
3539
+ var CopilotHooks = class _CopilotHooks extends ToolHooks {
3540
+ constructor(params) {
3541
+ super({
3542
+ ...params,
3543
+ fileContent: params.fileContent ?? "{}"
3544
+ });
3545
+ }
3546
+ static getSettablePaths(_options = {}) {
3547
+ return {
3548
+ relativeDirPath: join22(".github", "hooks"),
3549
+ relativeFilePath: "copilot-hooks.json"
3550
+ };
3551
+ }
3552
+ static async fromFile({
3553
+ baseDir = process.cwd(),
3554
+ validate = true,
3555
+ global = false
3556
+ }) {
3557
+ const paths = _CopilotHooks.getSettablePaths({ global });
3558
+ const filePath = join22(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3559
+ const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
3560
+ return new _CopilotHooks({
3561
+ baseDir,
3562
+ relativeDirPath: paths.relativeDirPath,
3563
+ relativeFilePath: paths.relativeFilePath,
3564
+ fileContent,
3565
+ validate
3566
+ });
3567
+ }
3568
+ static async fromRulesyncHooks({
3569
+ baseDir = process.cwd(),
3570
+ rulesyncHooks,
3571
+ validate = true
3572
+ }) {
3573
+ const paths = _CopilotHooks.getSettablePaths();
3574
+ const config = rulesyncHooks.getJson();
3575
+ const copilotHooks = canonicalToCopilotHooks(config);
3576
+ const fileContent = JSON.stringify({ version: 1, hooks: copilotHooks }, null, 2);
3577
+ return new _CopilotHooks({
3578
+ baseDir,
3579
+ relativeDirPath: paths.relativeDirPath,
3580
+ relativeFilePath: paths.relativeFilePath,
3581
+ fileContent,
3582
+ validate
3583
+ });
3584
+ }
3585
+ toRulesyncHooks() {
3586
+ let parsed;
3587
+ try {
3588
+ parsed = JSON.parse(this.getFileContent());
3589
+ } catch (error) {
3590
+ throw new Error(
3591
+ `Failed to parse Copilot hooks content in ${join22(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
3592
+ {
3593
+ cause: error
3594
+ }
3595
+ );
3596
+ }
3597
+ const hooks = copilotHooksToCanonical(parsed.hooks);
3598
+ return this.toRulesyncHooksDefault({
3599
+ fileContent: JSON.stringify({ version: 1, hooks }, null, 2)
3600
+ });
3601
+ }
3602
+ validate() {
3603
+ return { success: true, error: null };
3604
+ }
3605
+ static forDeletion({
3606
+ baseDir = process.cwd(),
3607
+ relativeDirPath,
3608
+ relativeFilePath
3609
+ }) {
3610
+ return new _CopilotHooks({
3611
+ baseDir,
3612
+ relativeDirPath,
3613
+ relativeFilePath,
3614
+ fileContent: JSON.stringify({ hooks: {} }, null, 2),
3615
+ validate: false
3616
+ });
3617
+ }
3618
+ };
3619
+
3620
+ // src/features/hooks/cursor-hooks.ts
3621
+ import { join as join23 } from "path";
3425
3622
  var CursorHooks = class _CursorHooks extends ToolHooks {
3426
3623
  constructor(params) {
3427
3624
  const { rulesyncHooks: _r, ...rest } = params;
@@ -3442,7 +3639,7 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
3442
3639
  }) {
3443
3640
  const paths = _CursorHooks.getSettablePaths();
3444
3641
  const fileContent = await readFileContent(
3445
- join22(baseDir, paths.relativeDirPath, paths.relativeFilePath)
3642
+ join23(baseDir, paths.relativeDirPath, paths.relativeFilePath)
3446
3643
  );
3447
3644
  return new _CursorHooks({
3448
3645
  baseDir,
@@ -3522,7 +3719,7 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
3522
3719
  };
3523
3720
 
3524
3721
  // src/features/hooks/factorydroid-hooks.ts
3525
- import { join as join23 } from "path";
3722
+ import { join as join24 } from "path";
3526
3723
  function canonicalToFactorydroidHooks(config) {
3527
3724
  const supported = new Set(FACTORYDROID_HOOK_EVENTS);
3528
3725
  const sharedHooks = {};
@@ -3627,7 +3824,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
3627
3824
  global = false
3628
3825
  }) {
3629
3826
  const paths = _FactorydroidHooks.getSettablePaths({ global });
3630
- const filePath = join23(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3827
+ const filePath = join24(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3631
3828
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
3632
3829
  return new _FactorydroidHooks({
3633
3830
  baseDir,
@@ -3644,7 +3841,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
3644
3841
  global = false
3645
3842
  }) {
3646
3843
  const paths = _FactorydroidHooks.getSettablePaths({ global });
3647
- const filePath = join23(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3844
+ const filePath = join24(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3648
3845
  const existingContent = await readOrInitializeFileContent(
3649
3846
  filePath,
3650
3847
  JSON.stringify({}, null, 2)
@@ -3676,7 +3873,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
3676
3873
  settings = JSON.parse(this.getFileContent());
3677
3874
  } catch (error) {
3678
3875
  throw new Error(
3679
- `Failed to parse Factory Droid hooks content in ${join23(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
3876
+ `Failed to parse Factory Droid hooks content in ${join24(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
3680
3877
  {
3681
3878
  cause: error
3682
3879
  }
@@ -3706,7 +3903,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
3706
3903
  };
3707
3904
 
3708
3905
  // src/features/hooks/opencode-hooks.ts
3709
- import { join as join24 } from "path";
3906
+ import { join as join25 } from "path";
3710
3907
  var NAMED_HOOKS = /* @__PURE__ */ new Set(["tool.execute.before", "tool.execute.after"]);
3711
3908
  function escapeForTemplateLiteral(command) {
3712
3909
  return command.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${");
@@ -3804,7 +4001,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
3804
4001
  }
3805
4002
  static getSettablePaths(options) {
3806
4003
  return {
3807
- relativeDirPath: options?.global ? join24(".config", "opencode", "plugins") : join24(".opencode", "plugins"),
4004
+ relativeDirPath: options?.global ? join25(".config", "opencode", "plugins") : join25(".opencode", "plugins"),
3808
4005
  relativeFilePath: "rulesync-hooks.js"
3809
4006
  };
3810
4007
  }
@@ -3815,7 +4012,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
3815
4012
  }) {
3816
4013
  const paths = _OpencodeHooks.getSettablePaths({ global });
3817
4014
  const fileContent = await readFileContent(
3818
- join24(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4015
+ join25(baseDir, paths.relativeDirPath, paths.relativeFilePath)
3819
4016
  );
3820
4017
  return new _OpencodeHooks({
3821
4018
  baseDir,
@@ -3864,43 +4061,83 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
3864
4061
  };
3865
4062
 
3866
4063
  // src/features/hooks/hooks-processor.ts
3867
- var hooksProcessorToolTargetTuple = ["cursor", "claudecode", "opencode", "factorydroid"];
3868
- var HooksProcessorToolTargetSchema = z15.enum(hooksProcessorToolTargetTuple);
4064
+ var hooksProcessorToolTargetTuple = [
4065
+ "cursor",
4066
+ "claudecode",
4067
+ "copilot",
4068
+ "opencode",
4069
+ "factorydroid"
4070
+ ];
4071
+ var HooksProcessorToolTargetSchema = z16.enum(hooksProcessorToolTargetTuple);
3869
4072
  var toolHooksFactories = /* @__PURE__ */ new Map([
3870
4073
  [
3871
4074
  "cursor",
3872
4075
  {
3873
4076
  class: CursorHooks,
3874
- meta: { supportsProject: true, supportsGlobal: false, supportsImport: true },
4077
+ meta: {
4078
+ supportsProject: true,
4079
+ supportsGlobal: false,
4080
+ supportsImport: true
4081
+ },
3875
4082
  supportedEvents: CURSOR_HOOK_EVENTS,
3876
- supportedHookTypes: ["command", "prompt"]
4083
+ supportedHookTypes: ["command", "prompt"],
4084
+ supportsMatcher: true
3877
4085
  }
3878
4086
  ],
3879
4087
  [
3880
4088
  "claudecode",
3881
4089
  {
3882
4090
  class: ClaudecodeHooks,
3883
- meta: { supportsProject: true, supportsGlobal: true, supportsImport: true },
4091
+ meta: {
4092
+ supportsProject: true,
4093
+ supportsGlobal: true,
4094
+ supportsImport: true
4095
+ },
3884
4096
  supportedEvents: CLAUDE_HOOK_EVENTS,
3885
- supportedHookTypes: ["command", "prompt"]
4097
+ supportedHookTypes: ["command", "prompt"],
4098
+ supportsMatcher: true
4099
+ }
4100
+ ],
4101
+ [
4102
+ "copilot",
4103
+ {
4104
+ class: CopilotHooks,
4105
+ meta: {
4106
+ supportsProject: true,
4107
+ supportsGlobal: false,
4108
+ supportsImport: true
4109
+ },
4110
+ supportedEvents: COPILOT_HOOK_EVENTS,
4111
+ supportedHookTypes: ["command"],
4112
+ supportsMatcher: false
3886
4113
  }
3887
4114
  ],
3888
4115
  [
3889
4116
  "opencode",
3890
4117
  {
3891
4118
  class: OpencodeHooks,
3892
- meta: { supportsProject: true, supportsGlobal: true, supportsImport: false },
4119
+ meta: {
4120
+ supportsProject: true,
4121
+ supportsGlobal: true,
4122
+ supportsImport: false
4123
+ },
3893
4124
  supportedEvents: OPENCODE_HOOK_EVENTS,
3894
- supportedHookTypes: ["command"]
4125
+ supportedHookTypes: ["command"],
4126
+ supportsMatcher: true
3895
4127
  }
3896
4128
  ],
3897
4129
  [
3898
4130
  "factorydroid",
3899
4131
  {
3900
4132
  class: FactorydroidHooks,
3901
- meta: { supportsProject: true, supportsGlobal: true, supportsImport: true },
4133
+ meta: {
4134
+ supportsProject: true,
4135
+ supportsGlobal: true,
4136
+ supportsImport: true
4137
+ },
3902
4138
  supportedEvents: FACTORYDROID_HOOK_EVENTS,
3903
- supportedHookTypes: ["command", "prompt"]
4139
+ supportedHookTypes: ["command", "prompt"],
4140
+ supportsMatcher: true
3904
4141
  }
3905
4142
  ]
3906
4143
  ]);
@@ -4017,6 +4254,21 @@ var HooksProcessor = class extends FeatureProcessor {
4017
4254
  );
4018
4255
  }
4019
4256
  }
4257
+ if (!factory.supportsMatcher) {
4258
+ const eventsWithMatcher = /* @__PURE__ */ new Set();
4259
+ for (const [event, defs] of Object.entries(effectiveHooks)) {
4260
+ for (const def of defs) {
4261
+ if (def.matcher) {
4262
+ eventsWithMatcher.add(event);
4263
+ }
4264
+ }
4265
+ }
4266
+ if (eventsWithMatcher.size > 0) {
4267
+ logger.warn(
4268
+ `Skipped matcher hook(s) for ${this.toolTarget} (not supported): ${Array.from(eventsWithMatcher).join(", ")}`
4269
+ );
4270
+ }
4271
+ }
4020
4272
  const toolHooks = await factory.class.fromRulesyncHooks({
4021
4273
  baseDir: this.baseDir,
4022
4274
  rulesyncHooks,
@@ -4041,13 +4293,13 @@ var HooksProcessor = class extends FeatureProcessor {
4041
4293
  };
4042
4294
 
4043
4295
  // src/features/ignore/ignore-processor.ts
4044
- import { z as z16 } from "zod/mini";
4296
+ import { z as z17 } from "zod/mini";
4045
4297
 
4046
4298
  // src/features/ignore/augmentcode-ignore.ts
4047
- import { join as join26 } from "path";
4299
+ import { join as join27 } from "path";
4048
4300
 
4049
4301
  // src/features/ignore/rulesync-ignore.ts
4050
- import { join as join25 } from "path";
4302
+ import { join as join26 } from "path";
4051
4303
  var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
4052
4304
  validate() {
4053
4305
  return { success: true, error: null };
@@ -4067,12 +4319,12 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
4067
4319
  static async fromFile() {
4068
4320
  const baseDir = process.cwd();
4069
4321
  const paths = this.getSettablePaths();
4070
- const recommendedPath = join25(
4322
+ const recommendedPath = join26(
4071
4323
  baseDir,
4072
4324
  paths.recommended.relativeDirPath,
4073
4325
  paths.recommended.relativeFilePath
4074
4326
  );
4075
- const legacyPath = join25(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
4327
+ const legacyPath = join26(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
4076
4328
  if (await fileExists(recommendedPath)) {
4077
4329
  const fileContent2 = await readFileContent(recommendedPath);
4078
4330
  return new _RulesyncIgnore({
@@ -4188,7 +4440,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
4188
4440
  validate = true
4189
4441
  }) {
4190
4442
  const fileContent = await readFileContent(
4191
- join26(
4443
+ join27(
4192
4444
  baseDir,
4193
4445
  this.getSettablePaths().relativeDirPath,
4194
4446
  this.getSettablePaths().relativeFilePath
@@ -4218,7 +4470,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
4218
4470
  };
4219
4471
 
4220
4472
  // src/features/ignore/claudecode-ignore.ts
4221
- import { join as join27 } from "path";
4473
+ import { join as join28 } from "path";
4222
4474
  import { uniq } from "es-toolkit";
4223
4475
  var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4224
4476
  constructor(params) {
@@ -4261,7 +4513,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4261
4513
  const fileContent = rulesyncIgnore.getFileContent();
4262
4514
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
4263
4515
  const deniedValues = patterns.map((pattern) => `Read(${pattern})`);
4264
- const filePath = join27(
4516
+ const filePath = join28(
4265
4517
  baseDir,
4266
4518
  this.getSettablePaths().relativeDirPath,
4267
4519
  this.getSettablePaths().relativeFilePath
@@ -4297,7 +4549,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4297
4549
  validate = true
4298
4550
  }) {
4299
4551
  const fileContent = await readFileContent(
4300
- join27(
4552
+ join28(
4301
4553
  baseDir,
4302
4554
  this.getSettablePaths().relativeDirPath,
4303
4555
  this.getSettablePaths().relativeFilePath
@@ -4327,7 +4579,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4327
4579
  };
4328
4580
 
4329
4581
  // src/features/ignore/cline-ignore.ts
4330
- import { join as join28 } from "path";
4582
+ import { join as join29 } from "path";
4331
4583
  var ClineIgnore = class _ClineIgnore extends ToolIgnore {
4332
4584
  static getSettablePaths() {
4333
4585
  return {
@@ -4364,7 +4616,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
4364
4616
  validate = true
4365
4617
  }) {
4366
4618
  const fileContent = await readFileContent(
4367
- join28(
4619
+ join29(
4368
4620
  baseDir,
4369
4621
  this.getSettablePaths().relativeDirPath,
4370
4622
  this.getSettablePaths().relativeFilePath
@@ -4394,7 +4646,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
4394
4646
  };
4395
4647
 
4396
4648
  // src/features/ignore/cursor-ignore.ts
4397
- import { join as join29 } from "path";
4649
+ import { join as join30 } from "path";
4398
4650
  var CursorIgnore = class _CursorIgnore extends ToolIgnore {
4399
4651
  static getSettablePaths() {
4400
4652
  return {
@@ -4427,7 +4679,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
4427
4679
  validate = true
4428
4680
  }) {
4429
4681
  const fileContent = await readFileContent(
4430
- join29(
4682
+ join30(
4431
4683
  baseDir,
4432
4684
  this.getSettablePaths().relativeDirPath,
4433
4685
  this.getSettablePaths().relativeFilePath
@@ -4457,7 +4709,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
4457
4709
  };
4458
4710
 
4459
4711
  // src/features/ignore/geminicli-ignore.ts
4460
- import { join as join30 } from "path";
4712
+ import { join as join31 } from "path";
4461
4713
  var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
4462
4714
  static getSettablePaths() {
4463
4715
  return {
@@ -4484,7 +4736,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
4484
4736
  validate = true
4485
4737
  }) {
4486
4738
  const fileContent = await readFileContent(
4487
- join30(
4739
+ join31(
4488
4740
  baseDir,
4489
4741
  this.getSettablePaths().relativeDirPath,
4490
4742
  this.getSettablePaths().relativeFilePath
@@ -4514,7 +4766,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
4514
4766
  };
4515
4767
 
4516
4768
  // src/features/ignore/goose-ignore.ts
4517
- import { join as join31 } from "path";
4769
+ import { join as join32 } from "path";
4518
4770
  var GooseIgnore = class _GooseIgnore extends ToolIgnore {
4519
4771
  static getSettablePaths() {
4520
4772
  return {
@@ -4551,7 +4803,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
4551
4803
  validate = true
4552
4804
  }) {
4553
4805
  const fileContent = await readFileContent(
4554
- join31(
4806
+ join32(
4555
4807
  baseDir,
4556
4808
  this.getSettablePaths().relativeDirPath,
4557
4809
  this.getSettablePaths().relativeFilePath
@@ -4581,7 +4833,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
4581
4833
  };
4582
4834
 
4583
4835
  // src/features/ignore/junie-ignore.ts
4584
- import { join as join32 } from "path";
4836
+ import { join as join33 } from "path";
4585
4837
  var JunieIgnore = class _JunieIgnore extends ToolIgnore {
4586
4838
  static getSettablePaths() {
4587
4839
  return {
@@ -4608,7 +4860,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
4608
4860
  validate = true
4609
4861
  }) {
4610
4862
  const fileContent = await readFileContent(
4611
- join32(
4863
+ join33(
4612
4864
  baseDir,
4613
4865
  this.getSettablePaths().relativeDirPath,
4614
4866
  this.getSettablePaths().relativeFilePath
@@ -4638,7 +4890,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
4638
4890
  };
4639
4891
 
4640
4892
  // src/features/ignore/kilo-ignore.ts
4641
- import { join as join33 } from "path";
4893
+ import { join as join34 } from "path";
4642
4894
  var KiloIgnore = class _KiloIgnore extends ToolIgnore {
4643
4895
  static getSettablePaths() {
4644
4896
  return {
@@ -4675,7 +4927,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
4675
4927
  validate = true
4676
4928
  }) {
4677
4929
  const fileContent = await readFileContent(
4678
- join33(
4930
+ join34(
4679
4931
  baseDir,
4680
4932
  this.getSettablePaths().relativeDirPath,
4681
4933
  this.getSettablePaths().relativeFilePath
@@ -4705,7 +4957,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
4705
4957
  };
4706
4958
 
4707
4959
  // src/features/ignore/kiro-ignore.ts
4708
- import { join as join34 } from "path";
4960
+ import { join as join35 } from "path";
4709
4961
  var KiroIgnore = class _KiroIgnore extends ToolIgnore {
4710
4962
  static getSettablePaths() {
4711
4963
  return {
@@ -4732,7 +4984,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
4732
4984
  validate = true
4733
4985
  }) {
4734
4986
  const fileContent = await readFileContent(
4735
- join34(
4987
+ join35(
4736
4988
  baseDir,
4737
4989
  this.getSettablePaths().relativeDirPath,
4738
4990
  this.getSettablePaths().relativeFilePath
@@ -4762,7 +5014,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
4762
5014
  };
4763
5015
 
4764
5016
  // src/features/ignore/qwencode-ignore.ts
4765
- import { join as join35 } from "path";
5017
+ import { join as join36 } from "path";
4766
5018
  var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
4767
5019
  static getSettablePaths() {
4768
5020
  return {
@@ -4789,7 +5041,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
4789
5041
  validate = true
4790
5042
  }) {
4791
5043
  const fileContent = await readFileContent(
4792
- join35(
5044
+ join36(
4793
5045
  baseDir,
4794
5046
  this.getSettablePaths().relativeDirPath,
4795
5047
  this.getSettablePaths().relativeFilePath
@@ -4819,7 +5071,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
4819
5071
  };
4820
5072
 
4821
5073
  // src/features/ignore/roo-ignore.ts
4822
- import { join as join36 } from "path";
5074
+ import { join as join37 } from "path";
4823
5075
  var RooIgnore = class _RooIgnore extends ToolIgnore {
4824
5076
  static getSettablePaths() {
4825
5077
  return {
@@ -4846,7 +5098,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
4846
5098
  validate = true
4847
5099
  }) {
4848
5100
  const fileContent = await readFileContent(
4849
- join36(
5101
+ join37(
4850
5102
  baseDir,
4851
5103
  this.getSettablePaths().relativeDirPath,
4852
5104
  this.getSettablePaths().relativeFilePath
@@ -4876,7 +5128,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
4876
5128
  };
4877
5129
 
4878
5130
  // src/features/ignore/windsurf-ignore.ts
4879
- import { join as join37 } from "path";
5131
+ import { join as join38 } from "path";
4880
5132
  var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
4881
5133
  static getSettablePaths() {
4882
5134
  return {
@@ -4903,7 +5155,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
4903
5155
  validate = true
4904
5156
  }) {
4905
5157
  const fileContent = await readFileContent(
4906
- join37(
5158
+ join38(
4907
5159
  baseDir,
4908
5160
  this.getSettablePaths().relativeDirPath,
4909
5161
  this.getSettablePaths().relativeFilePath
@@ -4933,7 +5185,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
4933
5185
  };
4934
5186
 
4935
5187
  // src/features/ignore/zed-ignore.ts
4936
- import { join as join38 } from "path";
5188
+ import { join as join39 } from "path";
4937
5189
  import { uniq as uniq2 } from "es-toolkit";
4938
5190
  var ZedIgnore = class _ZedIgnore extends ToolIgnore {
4939
5191
  constructor(params) {
@@ -4970,7 +5222,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
4970
5222
  }) {
4971
5223
  const fileContent = rulesyncIgnore.getFileContent();
4972
5224
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
4973
- const filePath = join38(
5225
+ const filePath = join39(
4974
5226
  baseDir,
4975
5227
  this.getSettablePaths().relativeDirPath,
4976
5228
  this.getSettablePaths().relativeFilePath
@@ -4997,7 +5249,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
4997
5249
  validate = true
4998
5250
  }) {
4999
5251
  const fileContent = await readFileContent(
5000
- join38(
5252
+ join39(
5001
5253
  baseDir,
5002
5254
  this.getSettablePaths().relativeDirPath,
5003
5255
  this.getSettablePaths().relativeFilePath
@@ -5043,7 +5295,7 @@ var ignoreProcessorToolTargets = [
5043
5295
  "windsurf",
5044
5296
  "zed"
5045
5297
  ];
5046
- var IgnoreProcessorToolTargetSchema = z16.enum(ignoreProcessorToolTargets);
5298
+ var IgnoreProcessorToolTargetSchema = z17.enum(ignoreProcessorToolTargets);
5047
5299
  var toolIgnoreFactories = /* @__PURE__ */ new Map([
5048
5300
  ["augmentcode", { class: AugmentcodeIgnore }],
5049
5301
  ["claudecode", { class: ClaudecodeIgnore }],
@@ -5181,49 +5433,49 @@ var IgnoreProcessor = class extends FeatureProcessor {
5181
5433
  };
5182
5434
 
5183
5435
  // src/features/mcp/mcp-processor.ts
5184
- import { z as z20 } from "zod/mini";
5436
+ import { z as z21 } from "zod/mini";
5185
5437
 
5186
5438
  // src/features/mcp/claudecode-mcp.ts
5187
- import { join as join40 } from "path";
5439
+ import { join as join41 } from "path";
5188
5440
 
5189
5441
  // src/features/mcp/rulesync-mcp.ts
5190
- import { join as join39 } from "path";
5442
+ import { join as join40 } from "path";
5191
5443
  import { omit } from "es-toolkit/object";
5192
- import { z as z18 } from "zod/mini";
5444
+ import { z as z19 } from "zod/mini";
5193
5445
 
5194
5446
  // src/types/mcp.ts
5195
- import { z as z17 } from "zod/mini";
5196
- var McpServerSchema = z17.object({
5197
- type: z17.optional(z17.enum(["stdio", "sse", "http"])),
5198
- command: z17.optional(z17.union([z17.string(), z17.array(z17.string())])),
5199
- args: z17.optional(z17.array(z17.string())),
5200
- url: z17.optional(z17.string()),
5201
- httpUrl: z17.optional(z17.string()),
5202
- env: z17.optional(z17.record(z17.string(), z17.string())),
5203
- disabled: z17.optional(z17.boolean()),
5204
- networkTimeout: z17.optional(z17.number()),
5205
- timeout: z17.optional(z17.number()),
5206
- trust: z17.optional(z17.boolean()),
5207
- cwd: z17.optional(z17.string()),
5208
- transport: z17.optional(z17.enum(["stdio", "sse", "http"])),
5209
- alwaysAllow: z17.optional(z17.array(z17.string())),
5210
- tools: z17.optional(z17.array(z17.string())),
5211
- kiroAutoApprove: z17.optional(z17.array(z17.string())),
5212
- kiroAutoBlock: z17.optional(z17.array(z17.string())),
5213
- headers: z17.optional(z17.record(z17.string(), z17.string())),
5214
- enabledTools: z17.optional(z17.array(z17.string())),
5215
- disabledTools: z17.optional(z17.array(z17.string()))
5447
+ import { z as z18 } from "zod/mini";
5448
+ var McpServerSchema = z18.object({
5449
+ type: z18.optional(z18.enum(["stdio", "sse", "http"])),
5450
+ command: z18.optional(z18.union([z18.string(), z18.array(z18.string())])),
5451
+ args: z18.optional(z18.array(z18.string())),
5452
+ url: z18.optional(z18.string()),
5453
+ httpUrl: z18.optional(z18.string()),
5454
+ env: z18.optional(z18.record(z18.string(), z18.string())),
5455
+ disabled: z18.optional(z18.boolean()),
5456
+ networkTimeout: z18.optional(z18.number()),
5457
+ timeout: z18.optional(z18.number()),
5458
+ trust: z18.optional(z18.boolean()),
5459
+ cwd: z18.optional(z18.string()),
5460
+ transport: z18.optional(z18.enum(["stdio", "sse", "http"])),
5461
+ alwaysAllow: z18.optional(z18.array(z18.string())),
5462
+ tools: z18.optional(z18.array(z18.string())),
5463
+ kiroAutoApprove: z18.optional(z18.array(z18.string())),
5464
+ kiroAutoBlock: z18.optional(z18.array(z18.string())),
5465
+ headers: z18.optional(z18.record(z18.string(), z18.string())),
5466
+ enabledTools: z18.optional(z18.array(z18.string())),
5467
+ disabledTools: z18.optional(z18.array(z18.string()))
5216
5468
  });
5217
- var McpServersSchema = z17.record(z17.string(), McpServerSchema);
5469
+ var McpServersSchema = z18.record(z18.string(), McpServerSchema);
5218
5470
 
5219
5471
  // src/features/mcp/rulesync-mcp.ts
5220
- var RulesyncMcpServerSchema = z18.extend(McpServerSchema, {
5221
- targets: z18.optional(RulesyncTargetsSchema),
5222
- description: z18.optional(z18.string()),
5223
- exposed: z18.optional(z18.boolean())
5472
+ var RulesyncMcpServerSchema = z19.extend(McpServerSchema, {
5473
+ targets: z19.optional(RulesyncTargetsSchema),
5474
+ description: z19.optional(z19.string()),
5475
+ exposed: z19.optional(z19.boolean())
5224
5476
  });
5225
- var RulesyncMcpConfigSchema = z18.object({
5226
- mcpServers: z18.record(z18.string(), RulesyncMcpServerSchema)
5477
+ var RulesyncMcpConfigSchema = z19.object({
5478
+ mcpServers: z19.record(z19.string(), RulesyncMcpServerSchema)
5227
5479
  });
5228
5480
  var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
5229
5481
  json;
@@ -5259,12 +5511,12 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
5259
5511
  static async fromFile({ validate = true }) {
5260
5512
  const baseDir = process.cwd();
5261
5513
  const paths = this.getSettablePaths();
5262
- const recommendedPath = join39(
5514
+ const recommendedPath = join40(
5263
5515
  baseDir,
5264
5516
  paths.recommended.relativeDirPath,
5265
5517
  paths.recommended.relativeFilePath
5266
5518
  );
5267
- const legacyPath = join39(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5519
+ const legacyPath = join40(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5268
5520
  if (await fileExists(recommendedPath)) {
5269
5521
  const fileContent2 = await readFileContent(recommendedPath);
5270
5522
  return new _RulesyncMcp({
@@ -5409,7 +5661,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
5409
5661
  global = false
5410
5662
  }) {
5411
5663
  const paths = this.getSettablePaths({ global });
5412
- const fileContent = await readFileContentOrNull(join40(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
5664
+ const fileContent = await readFileContentOrNull(join41(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
5413
5665
  const json = JSON.parse(fileContent);
5414
5666
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
5415
5667
  return new _ClaudecodeMcp({
@@ -5428,7 +5680,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
5428
5680
  }) {
5429
5681
  const paths = this.getSettablePaths({ global });
5430
5682
  const fileContent = await readOrInitializeFileContent(
5431
- join40(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5683
+ join41(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5432
5684
  JSON.stringify({ mcpServers: {} }, null, 2)
5433
5685
  );
5434
5686
  const json = JSON.parse(fileContent);
@@ -5467,7 +5719,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
5467
5719
  };
5468
5720
 
5469
5721
  // src/features/mcp/cline-mcp.ts
5470
- import { join as join41 } from "path";
5722
+ import { join as join42 } from "path";
5471
5723
  var ClineMcp = class _ClineMcp extends ToolMcp {
5472
5724
  json;
5473
5725
  constructor(params) {
@@ -5488,7 +5740,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
5488
5740
  validate = true
5489
5741
  }) {
5490
5742
  const fileContent = await readFileContent(
5491
- join41(
5743
+ join42(
5492
5744
  baseDir,
5493
5745
  this.getSettablePaths().relativeDirPath,
5494
5746
  this.getSettablePaths().relativeFilePath
@@ -5537,7 +5789,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
5537
5789
  };
5538
5790
 
5539
5791
  // src/features/mcp/codexcli-mcp.ts
5540
- import { join as join42 } from "path";
5792
+ import { join as join43 } from "path";
5541
5793
  import * as smolToml from "smol-toml";
5542
5794
  function convertFromCodexFormat(codexMcp) {
5543
5795
  const result = {};
@@ -5620,7 +5872,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
5620
5872
  global = false
5621
5873
  }) {
5622
5874
  const paths = this.getSettablePaths({ global });
5623
- const fileContent = await readFileContentOrNull(join42(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml.stringify({});
5875
+ const fileContent = await readFileContentOrNull(join43(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml.stringify({});
5624
5876
  return new _CodexcliMcp({
5625
5877
  baseDir,
5626
5878
  relativeDirPath: paths.relativeDirPath,
@@ -5636,7 +5888,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
5636
5888
  global = false
5637
5889
  }) {
5638
5890
  const paths = this.getSettablePaths({ global });
5639
- const configTomlFilePath = join42(baseDir, paths.relativeDirPath, paths.relativeFilePath);
5891
+ const configTomlFilePath = join43(baseDir, paths.relativeDirPath, paths.relativeFilePath);
5640
5892
  const configTomlFileContent = await readOrInitializeFileContent(
5641
5893
  configTomlFilePath,
5642
5894
  smolToml.stringify({})
@@ -5693,7 +5945,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
5693
5945
  };
5694
5946
 
5695
5947
  // src/features/mcp/copilot-mcp.ts
5696
- import { join as join43 } from "path";
5948
+ import { join as join44 } from "path";
5697
5949
  function convertToCopilotFormat(mcpServers) {
5698
5950
  return { servers: mcpServers };
5699
5951
  }
@@ -5720,7 +5972,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
5720
5972
  validate = true
5721
5973
  }) {
5722
5974
  const fileContent = await readFileContent(
5723
- join43(
5975
+ join44(
5724
5976
  baseDir,
5725
5977
  this.getSettablePaths().relativeDirPath,
5726
5978
  this.getSettablePaths().relativeFilePath
@@ -5773,7 +6025,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
5773
6025
  };
5774
6026
 
5775
6027
  // src/features/mcp/cursor-mcp.ts
5776
- import { join as join44 } from "path";
6028
+ import { join as join45 } from "path";
5777
6029
  var CURSOR_ENV_VAR_PATTERN = /\$\{env:([^}]+)\}/g;
5778
6030
  function isMcpServers(value) {
5779
6031
  return value !== void 0 && value !== null && typeof value === "object";
@@ -5834,7 +6086,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
5834
6086
  validate = true
5835
6087
  }) {
5836
6088
  const fileContent = await readFileContent(
5837
- join44(
6089
+ join45(
5838
6090
  baseDir,
5839
6091
  this.getSettablePaths().relativeDirPath,
5840
6092
  this.getSettablePaths().relativeFilePath
@@ -5902,7 +6154,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
5902
6154
  };
5903
6155
 
5904
6156
  // src/features/mcp/factorydroid-mcp.ts
5905
- import { join as join45 } from "path";
6157
+ import { join as join46 } from "path";
5906
6158
  var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
5907
6159
  json;
5908
6160
  constructor(params) {
@@ -5923,7 +6175,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
5923
6175
  validate = true
5924
6176
  }) {
5925
6177
  const fileContent = await readFileContent(
5926
- join45(
6178
+ join46(
5927
6179
  baseDir,
5928
6180
  this.getSettablePaths().relativeDirPath,
5929
6181
  this.getSettablePaths().relativeFilePath
@@ -5983,7 +6235,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
5983
6235
  };
5984
6236
 
5985
6237
  // src/features/mcp/geminicli-mcp.ts
5986
- import { join as join46 } from "path";
6238
+ import { join as join47 } from "path";
5987
6239
  var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
5988
6240
  json;
5989
6241
  constructor(params) {
@@ -6011,7 +6263,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6011
6263
  global = false
6012
6264
  }) {
6013
6265
  const paths = this.getSettablePaths({ global });
6014
- const fileContent = await readFileContentOrNull(join46(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6266
+ const fileContent = await readFileContentOrNull(join47(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6015
6267
  const json = JSON.parse(fileContent);
6016
6268
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
6017
6269
  return new _GeminiCliMcp({
@@ -6030,7 +6282,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6030
6282
  }) {
6031
6283
  const paths = this.getSettablePaths({ global });
6032
6284
  const fileContent = await readOrInitializeFileContent(
6033
- join46(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6285
+ join47(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6034
6286
  JSON.stringify({ mcpServers: {} }, null, 2)
6035
6287
  );
6036
6288
  const json = JSON.parse(fileContent);
@@ -6075,7 +6327,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6075
6327
  };
6076
6328
 
6077
6329
  // src/features/mcp/junie-mcp.ts
6078
- import { join as join47 } from "path";
6330
+ import { join as join48 } from "path";
6079
6331
  var JunieMcp = class _JunieMcp extends ToolMcp {
6080
6332
  json;
6081
6333
  constructor(params) {
@@ -6087,7 +6339,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6087
6339
  }
6088
6340
  static getSettablePaths() {
6089
6341
  return {
6090
- relativeDirPath: join47(".junie", "mcp"),
6342
+ relativeDirPath: join48(".junie", "mcp"),
6091
6343
  relativeFilePath: "mcp.json"
6092
6344
  };
6093
6345
  }
@@ -6096,7 +6348,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6096
6348
  validate = true
6097
6349
  }) {
6098
6350
  const fileContent = await readFileContent(
6099
- join47(
6351
+ join48(
6100
6352
  baseDir,
6101
6353
  this.getSettablePaths().relativeDirPath,
6102
6354
  this.getSettablePaths().relativeFilePath
@@ -6145,7 +6397,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6145
6397
  };
6146
6398
 
6147
6399
  // src/features/mcp/kilo-mcp.ts
6148
- import { join as join48 } from "path";
6400
+ import { join as join49 } from "path";
6149
6401
  var KiloMcp = class _KiloMcp extends ToolMcp {
6150
6402
  json;
6151
6403
  constructor(params) {
@@ -6166,7 +6418,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
6166
6418
  validate = true
6167
6419
  }) {
6168
6420
  const paths = this.getSettablePaths();
6169
- const fileContent = await readFileContentOrNull(join48(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6421
+ const fileContent = await readFileContentOrNull(join49(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6170
6422
  return new _KiloMcp({
6171
6423
  baseDir,
6172
6424
  relativeDirPath: paths.relativeDirPath,
@@ -6214,7 +6466,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
6214
6466
  };
6215
6467
 
6216
6468
  // src/features/mcp/kiro-mcp.ts
6217
- import { join as join49 } from "path";
6469
+ import { join as join50 } from "path";
6218
6470
  var KiroMcp = class _KiroMcp extends ToolMcp {
6219
6471
  json;
6220
6472
  constructor(params) {
@@ -6226,7 +6478,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
6226
6478
  }
6227
6479
  static getSettablePaths() {
6228
6480
  return {
6229
- relativeDirPath: join49(".kiro", "settings"),
6481
+ relativeDirPath: join50(".kiro", "settings"),
6230
6482
  relativeFilePath: "mcp.json"
6231
6483
  };
6232
6484
  }
@@ -6235,7 +6487,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
6235
6487
  validate = true
6236
6488
  }) {
6237
6489
  const paths = this.getSettablePaths();
6238
- const fileContent = await readFileContentOrNull(join49(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6490
+ const fileContent = await readFileContentOrNull(join50(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6239
6491
  return new _KiroMcp({
6240
6492
  baseDir,
6241
6493
  relativeDirPath: paths.relativeDirPath,
@@ -6283,29 +6535,30 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
6283
6535
  };
6284
6536
 
6285
6537
  // src/features/mcp/opencode-mcp.ts
6286
- import { join as join50 } from "path";
6287
- import { z as z19 } from "zod/mini";
6288
- var OpencodeMcpLocalServerSchema = z19.object({
6289
- type: z19.literal("local"),
6290
- command: z19.array(z19.string()),
6291
- environment: z19.optional(z19.record(z19.string(), z19.string())),
6292
- enabled: z19._default(z19.boolean(), true),
6293
- cwd: z19.optional(z19.string())
6538
+ import { join as join51 } from "path";
6539
+ import { parse as parseJsonc2 } from "jsonc-parser";
6540
+ import { z as z20 } from "zod/mini";
6541
+ var OpencodeMcpLocalServerSchema = z20.object({
6542
+ type: z20.literal("local"),
6543
+ command: z20.array(z20.string()),
6544
+ environment: z20.optional(z20.record(z20.string(), z20.string())),
6545
+ enabled: z20._default(z20.boolean(), true),
6546
+ cwd: z20.optional(z20.string())
6294
6547
  });
6295
- var OpencodeMcpRemoteServerSchema = z19.object({
6296
- type: z19.literal("remote"),
6297
- url: z19.string(),
6298
- headers: z19.optional(z19.record(z19.string(), z19.string())),
6299
- enabled: z19._default(z19.boolean(), true)
6548
+ var OpencodeMcpRemoteServerSchema = z20.object({
6549
+ type: z20.literal("remote"),
6550
+ url: z20.string(),
6551
+ headers: z20.optional(z20.record(z20.string(), z20.string())),
6552
+ enabled: z20._default(z20.boolean(), true)
6300
6553
  });
6301
- var OpencodeMcpServerSchema = z19.union([
6554
+ var OpencodeMcpServerSchema = z20.union([
6302
6555
  OpencodeMcpLocalServerSchema,
6303
6556
  OpencodeMcpRemoteServerSchema
6304
6557
  ]);
6305
- var OpencodeConfigSchema = z19.looseObject({
6306
- $schema: z19.optional(z19.string()),
6307
- mcp: z19.optional(z19.record(z19.string(), OpencodeMcpServerSchema)),
6308
- tools: z19.optional(z19.record(z19.string(), z19.boolean()))
6558
+ var OpencodeConfigSchema = z20.looseObject({
6559
+ $schema: z20.optional(z20.string()),
6560
+ mcp: z20.optional(z20.record(z20.string(), OpencodeMcpServerSchema)),
6561
+ tools: z20.optional(z20.record(z20.string(), z20.boolean()))
6309
6562
  });
6310
6563
  function convertFromOpencodeFormat(opencodeMcp, tools) {
6311
6564
  return Object.fromEntries(
@@ -6409,7 +6662,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6409
6662
  json;
6410
6663
  constructor(params) {
6411
6664
  super(params);
6412
- this.json = OpencodeConfigSchema.parse(JSON.parse(this.fileContent || "{}"));
6665
+ this.json = OpencodeConfigSchema.parse(parseJsonc2(this.fileContent || "{}"));
6413
6666
  }
6414
6667
  getJson() {
6415
6668
  return this.json;
@@ -6423,7 +6676,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6423
6676
  static getSettablePaths({ global } = {}) {
6424
6677
  if (global) {
6425
6678
  return {
6426
- relativeDirPath: join50(".config", "opencode"),
6679
+ relativeDirPath: join51(".config", "opencode"),
6427
6680
  relativeFilePath: "opencode.json"
6428
6681
  };
6429
6682
  }
@@ -6437,14 +6690,26 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6437
6690
  validate = true,
6438
6691
  global = false
6439
6692
  }) {
6440
- const paths = this.getSettablePaths({ global });
6441
- const fileContent = await readFileContentOrNull(join50(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcp":{}}';
6442
- const json = JSON.parse(fileContent);
6693
+ const basePaths = this.getSettablePaths({ global });
6694
+ const jsonDir = join51(baseDir, basePaths.relativeDirPath);
6695
+ let fileContent = null;
6696
+ let relativeFilePath = "opencode.jsonc";
6697
+ const jsoncPath = join51(jsonDir, "opencode.jsonc");
6698
+ const jsonPath = join51(jsonDir, "opencode.json");
6699
+ fileContent = await readFileContentOrNull(jsoncPath);
6700
+ if (!fileContent) {
6701
+ fileContent = await readFileContentOrNull(jsonPath);
6702
+ if (fileContent) {
6703
+ relativeFilePath = "opencode.json";
6704
+ }
6705
+ }
6706
+ const fileContentToUse = fileContent ?? '{"mcp":{}}';
6707
+ const json = parseJsonc2(fileContentToUse);
6443
6708
  const newJson = { ...json, mcp: json.mcp ?? {} };
6444
6709
  return new _OpencodeMcp({
6445
6710
  baseDir,
6446
- relativeDirPath: paths.relativeDirPath,
6447
- relativeFilePath: paths.relativeFilePath,
6711
+ relativeDirPath: basePaths.relativeDirPath,
6712
+ relativeFilePath,
6448
6713
  fileContent: JSON.stringify(newJson, null, 2),
6449
6714
  validate
6450
6715
  });
@@ -6455,12 +6720,23 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6455
6720
  validate = true,
6456
6721
  global = false
6457
6722
  }) {
6458
- const paths = this.getSettablePaths({ global });
6459
- const fileContent = await readOrInitializeFileContent(
6460
- join50(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6461
- JSON.stringify({ mcp: {} }, null, 2)
6462
- );
6463
- const json = JSON.parse(fileContent);
6723
+ const basePaths = this.getSettablePaths({ global });
6724
+ const jsonDir = join51(baseDir, basePaths.relativeDirPath);
6725
+ let fileContent = null;
6726
+ let relativeFilePath = "opencode.jsonc";
6727
+ const jsoncPath = join51(jsonDir, "opencode.jsonc");
6728
+ const jsonPath = join51(jsonDir, "opencode.json");
6729
+ fileContent = await readFileContentOrNull(jsoncPath);
6730
+ if (!fileContent) {
6731
+ fileContent = await readFileContentOrNull(jsonPath);
6732
+ if (fileContent) {
6733
+ relativeFilePath = "opencode.json";
6734
+ }
6735
+ }
6736
+ if (!fileContent) {
6737
+ fileContent = JSON.stringify({ mcp: {} }, null, 2);
6738
+ }
6739
+ const json = parseJsonc2(fileContent);
6464
6740
  const { mcp: convertedMcp, tools: mcpTools } = convertToOpencodeFormat(
6465
6741
  rulesyncMcp.getMcpServers()
6466
6742
  );
@@ -6472,8 +6748,8 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6472
6748
  };
6473
6749
  return new _OpencodeMcp({
6474
6750
  baseDir,
6475
- relativeDirPath: paths.relativeDirPath,
6476
- relativeFilePath: paths.relativeFilePath,
6751
+ relativeDirPath: basePaths.relativeDirPath,
6752
+ relativeFilePath,
6477
6753
  fileContent: JSON.stringify(newJson, null, 2),
6478
6754
  validate
6479
6755
  });
@@ -6510,7 +6786,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6510
6786
  };
6511
6787
 
6512
6788
  // src/features/mcp/roo-mcp.ts
6513
- import { join as join51 } from "path";
6789
+ import { join as join52 } from "path";
6514
6790
  function isRooMcpServers(value) {
6515
6791
  return value !== void 0 && value !== null && typeof value === "object";
6516
6792
  }
@@ -6562,7 +6838,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
6562
6838
  validate = true
6563
6839
  }) {
6564
6840
  const fileContent = await readFileContent(
6565
- join51(
6841
+ join52(
6566
6842
  baseDir,
6567
6843
  this.getSettablePaths().relativeDirPath,
6568
6844
  this.getSettablePaths().relativeFilePath
@@ -6633,7 +6909,7 @@ var mcpProcessorToolTargetTuple = [
6633
6909
  "opencode",
6634
6910
  "roo"
6635
6911
  ];
6636
- var McpProcessorToolTargetSchema = z20.enum(mcpProcessorToolTargetTuple);
6912
+ var McpProcessorToolTargetSchema = z21.enum(mcpProcessorToolTargetTuple);
6637
6913
  var toolMcpFactories = /* @__PURE__ */ new Map([
6638
6914
  [
6639
6915
  "claudecode",
@@ -6935,25 +7211,25 @@ var McpProcessor = class extends FeatureProcessor {
6935
7211
  };
6936
7212
 
6937
7213
  // src/features/rules/rules-processor.ts
6938
- import { basename as basename10, join as join111, relative as relative5 } from "path";
7214
+ import { basename as basename10, join as join112, relative as relative5 } from "path";
6939
7215
  import { encode } from "@toon-format/toon";
6940
- import { z as z52 } from "zod/mini";
7216
+ import { z as z53 } from "zod/mini";
6941
7217
 
6942
7218
  // src/constants/general.ts
6943
7219
  var SKILL_FILE_NAME = "SKILL.md";
6944
7220
 
6945
7221
  // src/features/skills/agentsmd-skill.ts
6946
- import { join as join55 } from "path";
7222
+ import { join as join56 } from "path";
6947
7223
 
6948
7224
  // src/features/skills/simulated-skill.ts
6949
- import { join as join54 } from "path";
6950
- import { z as z21 } from "zod/mini";
7225
+ import { join as join55 } from "path";
7226
+ import { z as z22 } from "zod/mini";
6951
7227
 
6952
7228
  // src/features/skills/tool-skill.ts
6953
- import { join as join53 } from "path";
7229
+ import { join as join54 } from "path";
6954
7230
 
6955
7231
  // src/types/ai-dir.ts
6956
- import path2, { basename as basename3, join as join52, relative as relative4, resolve as resolve4 } from "path";
7232
+ import path2, { basename as basename3, join as join53, relative as relative4, resolve as resolve4 } from "path";
6957
7233
  var AiDir = class {
6958
7234
  /**
6959
7235
  * @example "."
@@ -7047,8 +7323,8 @@ var AiDir = class {
7047
7323
  * @returns Array of files with their relative paths and buffers
7048
7324
  */
7049
7325
  static async collectOtherFiles(baseDir, relativeDirPath, dirName, excludeFileName) {
7050
- const dirPath = join52(baseDir, relativeDirPath, dirName);
7051
- const glob = join52(dirPath, "**", "*");
7326
+ const dirPath = join53(baseDir, relativeDirPath, dirName);
7327
+ const glob = join53(dirPath, "**", "*");
7052
7328
  const filePaths = await findFilesByGlobs(glob, { type: "file" });
7053
7329
  const filteredPaths = filePaths.filter((filePath) => basename3(filePath) !== excludeFileName);
7054
7330
  const files = await Promise.all(
@@ -7146,8 +7422,8 @@ var ToolSkill = class extends AiDir {
7146
7422
  }) {
7147
7423
  const settablePaths = getSettablePaths({ global });
7148
7424
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
7149
- const skillDirPath = join53(baseDir, actualRelativeDirPath, dirName);
7150
- const skillFilePath = join53(skillDirPath, SKILL_FILE_NAME);
7425
+ const skillDirPath = join54(baseDir, actualRelativeDirPath, dirName);
7426
+ const skillFilePath = join54(skillDirPath, SKILL_FILE_NAME);
7151
7427
  if (!await fileExists(skillFilePath)) {
7152
7428
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
7153
7429
  }
@@ -7171,16 +7447,16 @@ var ToolSkill = class extends AiDir {
7171
7447
  }
7172
7448
  requireMainFileFrontmatter() {
7173
7449
  if (!this.mainFile?.frontmatter) {
7174
- throw new Error(`Frontmatter is not defined in ${join53(this.relativeDirPath, this.dirName)}`);
7450
+ throw new Error(`Frontmatter is not defined in ${join54(this.relativeDirPath, this.dirName)}`);
7175
7451
  }
7176
7452
  return this.mainFile.frontmatter;
7177
7453
  }
7178
7454
  };
7179
7455
 
7180
7456
  // src/features/skills/simulated-skill.ts
7181
- var SimulatedSkillFrontmatterSchema = z21.looseObject({
7182
- name: z21.string(),
7183
- description: z21.string()
7457
+ var SimulatedSkillFrontmatterSchema = z22.looseObject({
7458
+ name: z22.string(),
7459
+ description: z22.string()
7184
7460
  });
7185
7461
  var SimulatedSkill = class extends ToolSkill {
7186
7462
  frontmatter;
@@ -7211,7 +7487,7 @@ var SimulatedSkill = class extends ToolSkill {
7211
7487
  const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
7212
7488
  if (!result.success) {
7213
7489
  throw new Error(
7214
- `Invalid frontmatter in ${join54(relativeDirPath, dirName)}: ${formatError(result.error)}`
7490
+ `Invalid frontmatter in ${join55(relativeDirPath, dirName)}: ${formatError(result.error)}`
7215
7491
  );
7216
7492
  }
7217
7493
  }
@@ -7269,8 +7545,8 @@ var SimulatedSkill = class extends ToolSkill {
7269
7545
  }) {
7270
7546
  const settablePaths = this.getSettablePaths();
7271
7547
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
7272
- const skillDirPath = join54(baseDir, actualRelativeDirPath, dirName);
7273
- const skillFilePath = join54(skillDirPath, SKILL_FILE_NAME);
7548
+ const skillDirPath = join55(baseDir, actualRelativeDirPath, dirName);
7549
+ const skillFilePath = join55(skillDirPath, SKILL_FILE_NAME);
7274
7550
  if (!await fileExists(skillFilePath)) {
7275
7551
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
7276
7552
  }
@@ -7347,7 +7623,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
7347
7623
  throw new Error("AgentsmdSkill does not support global mode.");
7348
7624
  }
7349
7625
  return {
7350
- relativeDirPath: join55(".agents", "skills")
7626
+ relativeDirPath: join56(".agents", "skills")
7351
7627
  };
7352
7628
  }
7353
7629
  static async fromDir(params) {
@@ -7374,11 +7650,11 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
7374
7650
  };
7375
7651
 
7376
7652
  // src/features/skills/factorydroid-skill.ts
7377
- import { join as join56 } from "path";
7653
+ import { join as join57 } from "path";
7378
7654
  var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
7379
7655
  static getSettablePaths(_options) {
7380
7656
  return {
7381
- relativeDirPath: join56(".factory", "skills")
7657
+ relativeDirPath: join57(".factory", "skills")
7382
7658
  };
7383
7659
  }
7384
7660
  static async fromDir(params) {
@@ -7405,11 +7681,11 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
7405
7681
  };
7406
7682
 
7407
7683
  // src/features/skills/skills-processor.ts
7408
- import { basename as basename5, join as join73 } from "path";
7409
- import { z as z36 } from "zod/mini";
7684
+ import { basename as basename5, join as join74 } from "path";
7685
+ import { z as z37 } from "zod/mini";
7410
7686
 
7411
7687
  // src/types/dir-feature-processor.ts
7412
- import { join as join57 } from "path";
7688
+ import { join as join58 } from "path";
7413
7689
  var DirFeatureProcessor = class {
7414
7690
  baseDir;
7415
7691
  dryRun;
@@ -7440,7 +7716,7 @@ var DirFeatureProcessor = class {
7440
7716
  const mainFile = aiDir.getMainFile();
7441
7717
  let mainFileContent;
7442
7718
  if (mainFile) {
7443
- const mainFilePath = join57(dirPath, mainFile.name);
7719
+ const mainFilePath = join58(dirPath, mainFile.name);
7444
7720
  const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter);
7445
7721
  mainFileContent = addTrailingNewline(content);
7446
7722
  const existingContent = await readFileContentOrNull(mainFilePath);
@@ -7454,7 +7730,7 @@ var DirFeatureProcessor = class {
7454
7730
  const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
7455
7731
  otherFileContents.push(contentWithNewline);
7456
7732
  if (!dirHasChanges) {
7457
- const filePath = join57(dirPath, file.relativeFilePathToDirPath);
7733
+ const filePath = join58(dirPath, file.relativeFilePathToDirPath);
7458
7734
  const existingContent = await readFileContentOrNull(filePath);
7459
7735
  if (existingContent !== contentWithNewline) {
7460
7736
  dirHasChanges = true;
@@ -7468,22 +7744,22 @@ var DirFeatureProcessor = class {
7468
7744
  if (this.dryRun) {
7469
7745
  logger.info(`[DRY RUN] Would create directory: ${dirPath}`);
7470
7746
  if (mainFile) {
7471
- logger.info(`[DRY RUN] Would write: ${join57(dirPath, mainFile.name)}`);
7472
- changedPaths.push(join57(relativeDir, mainFile.name));
7747
+ logger.info(`[DRY RUN] Would write: ${join58(dirPath, mainFile.name)}`);
7748
+ changedPaths.push(join58(relativeDir, mainFile.name));
7473
7749
  }
7474
7750
  for (const file of otherFiles) {
7475
- logger.info(`[DRY RUN] Would write: ${join57(dirPath, file.relativeFilePathToDirPath)}`);
7476
- changedPaths.push(join57(relativeDir, file.relativeFilePathToDirPath));
7751
+ logger.info(`[DRY RUN] Would write: ${join58(dirPath, file.relativeFilePathToDirPath)}`);
7752
+ changedPaths.push(join58(relativeDir, file.relativeFilePathToDirPath));
7477
7753
  }
7478
7754
  } else {
7479
7755
  await ensureDir(dirPath);
7480
7756
  if (mainFile && mainFileContent) {
7481
- const mainFilePath = join57(dirPath, mainFile.name);
7757
+ const mainFilePath = join58(dirPath, mainFile.name);
7482
7758
  await writeFileContent(mainFilePath, mainFileContent);
7483
- changedPaths.push(join57(relativeDir, mainFile.name));
7759
+ changedPaths.push(join58(relativeDir, mainFile.name));
7484
7760
  }
7485
7761
  for (const [i, file] of otherFiles.entries()) {
7486
- const filePath = join57(dirPath, file.relativeFilePathToDirPath);
7762
+ const filePath = join58(dirPath, file.relativeFilePathToDirPath);
7487
7763
  const content = otherFileContents[i];
7488
7764
  if (content === void 0) {
7489
7765
  throw new Error(
@@ -7491,7 +7767,7 @@ var DirFeatureProcessor = class {
7491
7767
  );
7492
7768
  }
7493
7769
  await writeFileContent(filePath, content);
7494
- changedPaths.push(join57(relativeDir, file.relativeFilePathToDirPath));
7770
+ changedPaths.push(join58(relativeDir, file.relativeFilePathToDirPath));
7495
7771
  }
7496
7772
  }
7497
7773
  changedCount++;
@@ -7523,38 +7799,38 @@ var DirFeatureProcessor = class {
7523
7799
  };
7524
7800
 
7525
7801
  // src/features/skills/agentsskills-skill.ts
7526
- import { join as join59 } from "path";
7527
- import { z as z23 } from "zod/mini";
7802
+ import { join as join60 } from "path";
7803
+ import { z as z24 } from "zod/mini";
7528
7804
 
7529
7805
  // src/features/skills/rulesync-skill.ts
7530
- import { join as join58 } from "path";
7531
- import { z as z22 } from "zod/mini";
7532
- var RulesyncSkillFrontmatterSchemaInternal = z22.looseObject({
7533
- name: z22.string(),
7534
- description: z22.string(),
7535
- targets: z22._default(RulesyncTargetsSchema, ["*"]),
7536
- claudecode: z22.optional(
7537
- z22.looseObject({
7538
- "allowed-tools": z22.optional(z22.array(z22.string()))
7806
+ import { join as join59 } from "path";
7807
+ import { z as z23 } from "zod/mini";
7808
+ var RulesyncSkillFrontmatterSchemaInternal = z23.looseObject({
7809
+ name: z23.string(),
7810
+ description: z23.string(),
7811
+ targets: z23._default(RulesyncTargetsSchema, ["*"]),
7812
+ claudecode: z23.optional(
7813
+ z23.looseObject({
7814
+ "allowed-tools": z23.optional(z23.array(z23.string()))
7539
7815
  })
7540
7816
  ),
7541
- codexcli: z22.optional(
7542
- z22.looseObject({
7543
- "short-description": z22.optional(z22.string())
7817
+ codexcli: z23.optional(
7818
+ z23.looseObject({
7819
+ "short-description": z23.optional(z23.string())
7544
7820
  })
7545
7821
  ),
7546
- opencode: z22.optional(
7547
- z22.looseObject({
7548
- "allowed-tools": z22.optional(z22.array(z22.string()))
7822
+ opencode: z23.optional(
7823
+ z23.looseObject({
7824
+ "allowed-tools": z23.optional(z23.array(z23.string()))
7549
7825
  })
7550
7826
  ),
7551
- copilot: z22.optional(
7552
- z22.looseObject({
7553
- license: z22.optional(z22.string())
7827
+ copilot: z23.optional(
7828
+ z23.looseObject({
7829
+ license: z23.optional(z23.string())
7554
7830
  })
7555
7831
  ),
7556
- cline: z22.optional(z22.looseObject({})),
7557
- roo: z22.optional(z22.looseObject({}))
7832
+ cline: z23.optional(z23.looseObject({})),
7833
+ roo: z23.optional(z23.looseObject({}))
7558
7834
  });
7559
7835
  var RulesyncSkillFrontmatterSchema = RulesyncSkillFrontmatterSchemaInternal;
7560
7836
  var RulesyncSkill = class _RulesyncSkill extends AiDir {
@@ -7594,7 +7870,7 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
7594
7870
  }
7595
7871
  getFrontmatter() {
7596
7872
  if (!this.mainFile?.frontmatter) {
7597
- throw new Error(`Frontmatter is not defined in ${join58(this.relativeDirPath, this.dirName)}`);
7873
+ throw new Error(`Frontmatter is not defined in ${join59(this.relativeDirPath, this.dirName)}`);
7598
7874
  }
7599
7875
  const result = RulesyncSkillFrontmatterSchema.parse(this.mainFile.frontmatter);
7600
7876
  return result;
@@ -7620,8 +7896,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
7620
7896
  dirName,
7621
7897
  global = false
7622
7898
  }) {
7623
- const skillDirPath = join58(baseDir, relativeDirPath, dirName);
7624
- const skillFilePath = join58(skillDirPath, SKILL_FILE_NAME);
7899
+ const skillDirPath = join59(baseDir, relativeDirPath, dirName);
7900
+ const skillFilePath = join59(skillDirPath, SKILL_FILE_NAME);
7625
7901
  if (!await fileExists(skillFilePath)) {
7626
7902
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
7627
7903
  }
@@ -7651,14 +7927,14 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
7651
7927
  };
7652
7928
 
7653
7929
  // src/features/skills/agentsskills-skill.ts
7654
- var AgentsSkillsSkillFrontmatterSchema = z23.looseObject({
7655
- name: z23.string(),
7656
- description: z23.string()
7930
+ var AgentsSkillsSkillFrontmatterSchema = z24.looseObject({
7931
+ name: z24.string(),
7932
+ description: z24.string()
7657
7933
  });
7658
7934
  var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
7659
7935
  constructor({
7660
7936
  baseDir = process.cwd(),
7661
- relativeDirPath = join59(".agents", "skills"),
7937
+ relativeDirPath = join60(".agents", "skills"),
7662
7938
  dirName,
7663
7939
  frontmatter,
7664
7940
  body,
@@ -7690,7 +7966,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
7690
7966
  throw new Error("AgentsSkillsSkill does not support global mode.");
7691
7967
  }
7692
7968
  return {
7693
- relativeDirPath: join59(".agents", "skills")
7969
+ relativeDirPath: join60(".agents", "skills")
7694
7970
  };
7695
7971
  }
7696
7972
  getFrontmatter() {
@@ -7769,9 +8045,9 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
7769
8045
  });
7770
8046
  const result = AgentsSkillsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
7771
8047
  if (!result.success) {
7772
- const skillDirPath = join59(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8048
+ const skillDirPath = join60(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7773
8049
  throw new Error(
7774
- `Invalid frontmatter in ${join59(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8050
+ `Invalid frontmatter in ${join60(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7775
8051
  );
7776
8052
  }
7777
8053
  return new _AgentsSkillsSkill({
@@ -7806,16 +8082,16 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
7806
8082
  };
7807
8083
 
7808
8084
  // src/features/skills/antigravity-skill.ts
7809
- import { join as join60 } from "path";
7810
- import { z as z24 } from "zod/mini";
7811
- var AntigravitySkillFrontmatterSchema = z24.looseObject({
7812
- name: z24.string(),
7813
- description: z24.string()
8085
+ import { join as join61 } from "path";
8086
+ import { z as z25 } from "zod/mini";
8087
+ var AntigravitySkillFrontmatterSchema = z25.looseObject({
8088
+ name: z25.string(),
8089
+ description: z25.string()
7814
8090
  });
7815
8091
  var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
7816
8092
  constructor({
7817
8093
  baseDir = process.cwd(),
7818
- relativeDirPath = join60(".agent", "skills"),
8094
+ relativeDirPath = join61(".agent", "skills"),
7819
8095
  dirName,
7820
8096
  frontmatter,
7821
8097
  body,
@@ -7847,11 +8123,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
7847
8123
  } = {}) {
7848
8124
  if (global) {
7849
8125
  return {
7850
- relativeDirPath: join60(".gemini", "antigravity", "skills")
8126
+ relativeDirPath: join61(".gemini", "antigravity", "skills")
7851
8127
  };
7852
8128
  }
7853
8129
  return {
7854
- relativeDirPath: join60(".agent", "skills")
8130
+ relativeDirPath: join61(".agent", "skills")
7855
8131
  };
7856
8132
  }
7857
8133
  getFrontmatter() {
@@ -7930,9 +8206,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
7930
8206
  });
7931
8207
  const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
7932
8208
  if (!result.success) {
7933
- const skillDirPath = join60(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8209
+ const skillDirPath = join61(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7934
8210
  throw new Error(
7935
- `Invalid frontmatter in ${join60(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8211
+ `Invalid frontmatter in ${join61(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7936
8212
  );
7937
8213
  }
7938
8214
  return new _AntigravitySkill({
@@ -7966,17 +8242,17 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
7966
8242
  };
7967
8243
 
7968
8244
  // src/features/skills/claudecode-skill.ts
7969
- import { join as join61 } from "path";
7970
- import { z as z25 } from "zod/mini";
7971
- var ClaudecodeSkillFrontmatterSchema = z25.looseObject({
7972
- name: z25.string(),
7973
- description: z25.string(),
7974
- "allowed-tools": z25.optional(z25.array(z25.string()))
8245
+ import { join as join62 } from "path";
8246
+ import { z as z26 } from "zod/mini";
8247
+ var ClaudecodeSkillFrontmatterSchema = z26.looseObject({
8248
+ name: z26.string(),
8249
+ description: z26.string(),
8250
+ "allowed-tools": z26.optional(z26.array(z26.string()))
7975
8251
  });
7976
8252
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
7977
8253
  constructor({
7978
8254
  baseDir = process.cwd(),
7979
- relativeDirPath = join61(".claude", "skills"),
8255
+ relativeDirPath = join62(".claude", "skills"),
7980
8256
  dirName,
7981
8257
  frontmatter,
7982
8258
  body,
@@ -8007,7 +8283,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8007
8283
  global: _global = false
8008
8284
  } = {}) {
8009
8285
  return {
8010
- relativeDirPath: join61(".claude", "skills")
8286
+ relativeDirPath: join62(".claude", "skills")
8011
8287
  };
8012
8288
  }
8013
8289
  getFrontmatter() {
@@ -8092,9 +8368,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8092
8368
  });
8093
8369
  const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8094
8370
  if (!result.success) {
8095
- const skillDirPath = join61(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8371
+ const skillDirPath = join62(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8096
8372
  throw new Error(
8097
- `Invalid frontmatter in ${join61(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8373
+ `Invalid frontmatter in ${join62(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8098
8374
  );
8099
8375
  }
8100
8376
  return new _ClaudecodeSkill({
@@ -8128,16 +8404,16 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8128
8404
  };
8129
8405
 
8130
8406
  // src/features/skills/cline-skill.ts
8131
- import { join as join62 } from "path";
8132
- import { z as z26 } from "zod/mini";
8133
- var ClineSkillFrontmatterSchema = z26.looseObject({
8134
- name: z26.string(),
8135
- description: z26.string()
8407
+ import { join as join63 } from "path";
8408
+ import { z as z27 } from "zod/mini";
8409
+ var ClineSkillFrontmatterSchema = z27.looseObject({
8410
+ name: z27.string(),
8411
+ description: z27.string()
8136
8412
  });
8137
8413
  var ClineSkill = class _ClineSkill extends ToolSkill {
8138
8414
  constructor({
8139
8415
  baseDir = process.cwd(),
8140
- relativeDirPath = join62(".cline", "skills"),
8416
+ relativeDirPath = join63(".cline", "skills"),
8141
8417
  dirName,
8142
8418
  frontmatter,
8143
8419
  body,
@@ -8166,7 +8442,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
8166
8442
  }
8167
8443
  static getSettablePaths(_options = {}) {
8168
8444
  return {
8169
- relativeDirPath: join62(".cline", "skills")
8445
+ relativeDirPath: join63(".cline", "skills")
8170
8446
  };
8171
8447
  }
8172
8448
  getFrontmatter() {
@@ -8253,13 +8529,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
8253
8529
  });
8254
8530
  const result = ClineSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8255
8531
  if (!result.success) {
8256
- const skillDirPath = join62(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8532
+ const skillDirPath = join63(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8257
8533
  throw new Error(
8258
- `Invalid frontmatter in ${join62(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8534
+ `Invalid frontmatter in ${join63(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8259
8535
  );
8260
8536
  }
8261
8537
  if (result.data.name !== loaded.dirName) {
8262
- const skillFilePath = join62(
8538
+ const skillFilePath = join63(
8263
8539
  loaded.baseDir,
8264
8540
  loaded.relativeDirPath,
8265
8541
  loaded.dirName,
@@ -8300,21 +8576,21 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
8300
8576
  };
8301
8577
 
8302
8578
  // src/features/skills/codexcli-skill.ts
8303
- import { join as join63 } from "path";
8304
- import { z as z27 } from "zod/mini";
8305
- var CodexCliSkillFrontmatterSchema = z27.looseObject({
8306
- name: z27.string(),
8307
- description: z27.string(),
8308
- metadata: z27.optional(
8309
- z27.looseObject({
8310
- "short-description": z27.optional(z27.string())
8579
+ import { join as join64 } from "path";
8580
+ import { z as z28 } from "zod/mini";
8581
+ var CodexCliSkillFrontmatterSchema = z28.looseObject({
8582
+ name: z28.string(),
8583
+ description: z28.string(),
8584
+ metadata: z28.optional(
8585
+ z28.looseObject({
8586
+ "short-description": z28.optional(z28.string())
8311
8587
  })
8312
8588
  )
8313
8589
  });
8314
8590
  var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8315
8591
  constructor({
8316
8592
  baseDir = process.cwd(),
8317
- relativeDirPath = join63(".codex", "skills"),
8593
+ relativeDirPath = join64(".codex", "skills"),
8318
8594
  dirName,
8319
8595
  frontmatter,
8320
8596
  body,
@@ -8345,7 +8621,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8345
8621
  global: _global = false
8346
8622
  } = {}) {
8347
8623
  return {
8348
- relativeDirPath: join63(".codex", "skills")
8624
+ relativeDirPath: join64(".codex", "skills")
8349
8625
  };
8350
8626
  }
8351
8627
  getFrontmatter() {
@@ -8434,9 +8710,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8434
8710
  });
8435
8711
  const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8436
8712
  if (!result.success) {
8437
- const skillDirPath = join63(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8713
+ const skillDirPath = join64(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8438
8714
  throw new Error(
8439
- `Invalid frontmatter in ${join63(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8715
+ `Invalid frontmatter in ${join64(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8440
8716
  );
8441
8717
  }
8442
8718
  return new _CodexCliSkill({
@@ -8470,17 +8746,17 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8470
8746
  };
8471
8747
 
8472
8748
  // src/features/skills/copilot-skill.ts
8473
- import { join as join64 } from "path";
8474
- import { z as z28 } from "zod/mini";
8475
- var CopilotSkillFrontmatterSchema = z28.looseObject({
8476
- name: z28.string(),
8477
- description: z28.string(),
8478
- license: z28.optional(z28.string())
8749
+ import { join as join65 } from "path";
8750
+ import { z as z29 } from "zod/mini";
8751
+ var CopilotSkillFrontmatterSchema = z29.looseObject({
8752
+ name: z29.string(),
8753
+ description: z29.string(),
8754
+ license: z29.optional(z29.string())
8479
8755
  });
8480
8756
  var CopilotSkill = class _CopilotSkill extends ToolSkill {
8481
8757
  constructor({
8482
8758
  baseDir = process.cwd(),
8483
- relativeDirPath = join64(".github", "skills"),
8759
+ relativeDirPath = join65(".github", "skills"),
8484
8760
  dirName,
8485
8761
  frontmatter,
8486
8762
  body,
@@ -8512,7 +8788,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
8512
8788
  throw new Error("CopilotSkill does not support global mode.");
8513
8789
  }
8514
8790
  return {
8515
- relativeDirPath: join64(".github", "skills")
8791
+ relativeDirPath: join65(".github", "skills")
8516
8792
  };
8517
8793
  }
8518
8794
  getFrontmatter() {
@@ -8597,9 +8873,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
8597
8873
  });
8598
8874
  const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8599
8875
  if (!result.success) {
8600
- const skillDirPath = join64(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8876
+ const skillDirPath = join65(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8601
8877
  throw new Error(
8602
- `Invalid frontmatter in ${join64(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8878
+ `Invalid frontmatter in ${join65(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8603
8879
  );
8604
8880
  }
8605
8881
  return new _CopilotSkill({
@@ -8634,16 +8910,16 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
8634
8910
  };
8635
8911
 
8636
8912
  // src/features/skills/cursor-skill.ts
8637
- import { join as join65 } from "path";
8638
- import { z as z29 } from "zod/mini";
8639
- var CursorSkillFrontmatterSchema = z29.looseObject({
8640
- name: z29.string(),
8641
- description: z29.string()
8913
+ import { join as join66 } from "path";
8914
+ import { z as z30 } from "zod/mini";
8915
+ var CursorSkillFrontmatterSchema = z30.looseObject({
8916
+ name: z30.string(),
8917
+ description: z30.string()
8642
8918
  });
8643
8919
  var CursorSkill = class _CursorSkill extends ToolSkill {
8644
8920
  constructor({
8645
8921
  baseDir = process.cwd(),
8646
- relativeDirPath = join65(".cursor", "skills"),
8922
+ relativeDirPath = join66(".cursor", "skills"),
8647
8923
  dirName,
8648
8924
  frontmatter,
8649
8925
  body,
@@ -8672,7 +8948,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
8672
8948
  }
8673
8949
  static getSettablePaths(_options) {
8674
8950
  return {
8675
- relativeDirPath: join65(".cursor", "skills")
8951
+ relativeDirPath: join66(".cursor", "skills")
8676
8952
  };
8677
8953
  }
8678
8954
  getFrontmatter() {
@@ -8751,9 +9027,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
8751
9027
  });
8752
9028
  const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8753
9029
  if (!result.success) {
8754
- const skillDirPath = join65(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9030
+ const skillDirPath = join66(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8755
9031
  throw new Error(
8756
- `Invalid frontmatter in ${join65(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9032
+ `Invalid frontmatter in ${join66(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8757
9033
  );
8758
9034
  }
8759
9035
  return new _CursorSkill({
@@ -8788,11 +9064,11 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
8788
9064
  };
8789
9065
 
8790
9066
  // src/features/skills/geminicli-skill.ts
8791
- import { join as join66 } from "path";
8792
- import { z as z30 } from "zod/mini";
8793
- var GeminiCliSkillFrontmatterSchema = z30.looseObject({
8794
- name: z30.string(),
8795
- description: z30.string()
9067
+ import { join as join67 } from "path";
9068
+ import { z as z31 } from "zod/mini";
9069
+ var GeminiCliSkillFrontmatterSchema = z31.looseObject({
9070
+ name: z31.string(),
9071
+ description: z31.string()
8796
9072
  });
8797
9073
  var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
8798
9074
  constructor({
@@ -8828,7 +9104,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
8828
9104
  global: _global = false
8829
9105
  } = {}) {
8830
9106
  return {
8831
- relativeDirPath: join66(".gemini", "skills")
9107
+ relativeDirPath: join67(".gemini", "skills")
8832
9108
  };
8833
9109
  }
8834
9110
  getFrontmatter() {
@@ -8907,9 +9183,9 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
8907
9183
  });
8908
9184
  const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8909
9185
  if (!result.success) {
8910
- const skillDirPath = join66(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9186
+ const skillDirPath = join67(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8911
9187
  throw new Error(
8912
- `Invalid frontmatter in ${join66(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9188
+ `Invalid frontmatter in ${join67(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8913
9189
  );
8914
9190
  }
8915
9191
  return new _GeminiCliSkill({
@@ -8944,16 +9220,16 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
8944
9220
  };
8945
9221
 
8946
9222
  // src/features/skills/kilo-skill.ts
8947
- import { join as join67 } from "path";
8948
- import { z as z31 } from "zod/mini";
8949
- var KiloSkillFrontmatterSchema = z31.looseObject({
8950
- name: z31.string(),
8951
- description: z31.string()
9223
+ import { join as join68 } from "path";
9224
+ import { z as z32 } from "zod/mini";
9225
+ var KiloSkillFrontmatterSchema = z32.looseObject({
9226
+ name: z32.string(),
9227
+ description: z32.string()
8952
9228
  });
8953
9229
  var KiloSkill = class _KiloSkill extends ToolSkill {
8954
9230
  constructor({
8955
9231
  baseDir = process.cwd(),
8956
- relativeDirPath = join67(".kilocode", "skills"),
9232
+ relativeDirPath = join68(".kilocode", "skills"),
8957
9233
  dirName,
8958
9234
  frontmatter,
8959
9235
  body,
@@ -8984,7 +9260,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
8984
9260
  global: _global = false
8985
9261
  } = {}) {
8986
9262
  return {
8987
- relativeDirPath: join67(".kilocode", "skills")
9263
+ relativeDirPath: join68(".kilocode", "skills")
8988
9264
  };
8989
9265
  }
8990
9266
  getFrontmatter() {
@@ -9071,13 +9347,13 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
9071
9347
  });
9072
9348
  const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9073
9349
  if (!result.success) {
9074
- const skillDirPath = join67(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9350
+ const skillDirPath = join68(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9075
9351
  throw new Error(
9076
- `Invalid frontmatter in ${join67(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9352
+ `Invalid frontmatter in ${join68(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9077
9353
  );
9078
9354
  }
9079
9355
  if (result.data.name !== loaded.dirName) {
9080
- const skillFilePath = join67(
9356
+ const skillFilePath = join68(
9081
9357
  loaded.baseDir,
9082
9358
  loaded.relativeDirPath,
9083
9359
  loaded.dirName,
@@ -9118,16 +9394,16 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
9118
9394
  };
9119
9395
 
9120
9396
  // src/features/skills/kiro-skill.ts
9121
- import { join as join68 } from "path";
9122
- import { z as z32 } from "zod/mini";
9123
- var KiroSkillFrontmatterSchema = z32.looseObject({
9124
- name: z32.string(),
9125
- description: z32.string()
9397
+ import { join as join69 } from "path";
9398
+ import { z as z33 } from "zod/mini";
9399
+ var KiroSkillFrontmatterSchema = z33.looseObject({
9400
+ name: z33.string(),
9401
+ description: z33.string()
9126
9402
  });
9127
9403
  var KiroSkill = class _KiroSkill extends ToolSkill {
9128
9404
  constructor({
9129
9405
  baseDir = process.cwd(),
9130
- relativeDirPath = join68(".kiro", "skills"),
9406
+ relativeDirPath = join69(".kiro", "skills"),
9131
9407
  dirName,
9132
9408
  frontmatter,
9133
9409
  body,
@@ -9159,7 +9435,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
9159
9435
  throw new Error("KiroSkill does not support global mode.");
9160
9436
  }
9161
9437
  return {
9162
- relativeDirPath: join68(".kiro", "skills")
9438
+ relativeDirPath: join69(".kiro", "skills")
9163
9439
  };
9164
9440
  }
9165
9441
  getFrontmatter() {
@@ -9246,13 +9522,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
9246
9522
  });
9247
9523
  const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9248
9524
  if (!result.success) {
9249
- const skillDirPath = join68(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9525
+ const skillDirPath = join69(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9250
9526
  throw new Error(
9251
- `Invalid frontmatter in ${join68(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9527
+ `Invalid frontmatter in ${join69(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9252
9528
  );
9253
9529
  }
9254
9530
  if (result.data.name !== loaded.dirName) {
9255
- const skillFilePath = join68(
9531
+ const skillFilePath = join69(
9256
9532
  loaded.baseDir,
9257
9533
  loaded.relativeDirPath,
9258
9534
  loaded.dirName,
@@ -9294,17 +9570,17 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
9294
9570
  };
9295
9571
 
9296
9572
  // src/features/skills/opencode-skill.ts
9297
- import { join as join69 } from "path";
9298
- import { z as z33 } from "zod/mini";
9299
- var OpenCodeSkillFrontmatterSchema = z33.looseObject({
9300
- name: z33.string(),
9301
- description: z33.string(),
9302
- "allowed-tools": z33.optional(z33.array(z33.string()))
9573
+ import { join as join70 } from "path";
9574
+ import { z as z34 } from "zod/mini";
9575
+ var OpenCodeSkillFrontmatterSchema = z34.looseObject({
9576
+ name: z34.string(),
9577
+ description: z34.string(),
9578
+ "allowed-tools": z34.optional(z34.array(z34.string()))
9303
9579
  });
9304
9580
  var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
9305
9581
  constructor({
9306
9582
  baseDir = process.cwd(),
9307
- relativeDirPath = join69(".opencode", "skill"),
9583
+ relativeDirPath = join70(".opencode", "skill"),
9308
9584
  dirName,
9309
9585
  frontmatter,
9310
9586
  body,
@@ -9333,7 +9609,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
9333
9609
  }
9334
9610
  static getSettablePaths({ global = false } = {}) {
9335
9611
  return {
9336
- relativeDirPath: global ? join69(".config", "opencode", "skill") : join69(".opencode", "skill")
9612
+ relativeDirPath: global ? join70(".config", "opencode", "skill") : join70(".opencode", "skill")
9337
9613
  };
9338
9614
  }
9339
9615
  getFrontmatter() {
@@ -9418,9 +9694,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
9418
9694
  });
9419
9695
  const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9420
9696
  if (!result.success) {
9421
- const skillDirPath = join69(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9697
+ const skillDirPath = join70(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9422
9698
  throw new Error(
9423
- `Invalid frontmatter in ${join69(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9699
+ `Invalid frontmatter in ${join70(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9424
9700
  );
9425
9701
  }
9426
9702
  return new _OpenCodeSkill({
@@ -9454,16 +9730,16 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
9454
9730
  };
9455
9731
 
9456
9732
  // src/features/skills/replit-skill.ts
9457
- import { join as join70 } from "path";
9458
- import { z as z34 } from "zod/mini";
9459
- var ReplitSkillFrontmatterSchema = z34.looseObject({
9460
- name: z34.string(),
9461
- description: z34.string()
9733
+ import { join as join71 } from "path";
9734
+ import { z as z35 } from "zod/mini";
9735
+ var ReplitSkillFrontmatterSchema = z35.looseObject({
9736
+ name: z35.string(),
9737
+ description: z35.string()
9462
9738
  });
9463
9739
  var ReplitSkill = class _ReplitSkill extends ToolSkill {
9464
9740
  constructor({
9465
9741
  baseDir = process.cwd(),
9466
- relativeDirPath = join70(".agents", "skills"),
9742
+ relativeDirPath = join71(".agents", "skills"),
9467
9743
  dirName,
9468
9744
  frontmatter,
9469
9745
  body,
@@ -9495,7 +9771,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
9495
9771
  throw new Error("ReplitSkill does not support global mode.");
9496
9772
  }
9497
9773
  return {
9498
- relativeDirPath: join70(".agents", "skills")
9774
+ relativeDirPath: join71(".agents", "skills")
9499
9775
  };
9500
9776
  }
9501
9777
  getFrontmatter() {
@@ -9574,9 +9850,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
9574
9850
  });
9575
9851
  const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9576
9852
  if (!result.success) {
9577
- const skillDirPath = join70(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9853
+ const skillDirPath = join71(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9578
9854
  throw new Error(
9579
- `Invalid frontmatter in ${join70(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9855
+ `Invalid frontmatter in ${join71(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9580
9856
  );
9581
9857
  }
9582
9858
  return new _ReplitSkill({
@@ -9611,16 +9887,16 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
9611
9887
  };
9612
9888
 
9613
9889
  // src/features/skills/roo-skill.ts
9614
- import { join as join71 } from "path";
9615
- import { z as z35 } from "zod/mini";
9616
- var RooSkillFrontmatterSchema = z35.looseObject({
9617
- name: z35.string(),
9618
- description: z35.string()
9890
+ import { join as join72 } from "path";
9891
+ import { z as z36 } from "zod/mini";
9892
+ var RooSkillFrontmatterSchema = z36.looseObject({
9893
+ name: z36.string(),
9894
+ description: z36.string()
9619
9895
  });
9620
9896
  var RooSkill = class _RooSkill extends ToolSkill {
9621
9897
  constructor({
9622
9898
  baseDir = process.cwd(),
9623
- relativeDirPath = join71(".roo", "skills"),
9899
+ relativeDirPath = join72(".roo", "skills"),
9624
9900
  dirName,
9625
9901
  frontmatter,
9626
9902
  body,
@@ -9651,7 +9927,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
9651
9927
  global: _global = false
9652
9928
  } = {}) {
9653
9929
  return {
9654
- relativeDirPath: join71(".roo", "skills")
9930
+ relativeDirPath: join72(".roo", "skills")
9655
9931
  };
9656
9932
  }
9657
9933
  getFrontmatter() {
@@ -9738,13 +10014,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
9738
10014
  });
9739
10015
  const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9740
10016
  if (!result.success) {
9741
- const skillDirPath = join71(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10017
+ const skillDirPath = join72(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9742
10018
  throw new Error(
9743
- `Invalid frontmatter in ${join71(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10019
+ `Invalid frontmatter in ${join72(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9744
10020
  );
9745
10021
  }
9746
10022
  if (result.data.name !== loaded.dirName) {
9747
- const skillFilePath = join71(
10023
+ const skillFilePath = join72(
9748
10024
  loaded.baseDir,
9749
10025
  loaded.relativeDirPath,
9750
10026
  loaded.dirName,
@@ -9785,14 +10061,14 @@ var RooSkill = class _RooSkill extends ToolSkill {
9785
10061
  };
9786
10062
 
9787
10063
  // src/features/skills/skills-utils.ts
9788
- import { basename as basename4, join as join72 } from "path";
10064
+ import { basename as basename4, join as join73 } from "path";
9789
10065
  async function getLocalSkillDirNames(baseDir) {
9790
- const skillsDir = join72(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
10066
+ const skillsDir = join73(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
9791
10067
  const names = /* @__PURE__ */ new Set();
9792
10068
  if (!await directoryExists(skillsDir)) {
9793
10069
  return names;
9794
10070
  }
9795
- const dirPaths = await findFilesByGlobs(join72(skillsDir, "*"), { type: "dir" });
10071
+ const dirPaths = await findFilesByGlobs(join73(skillsDir, "*"), { type: "dir" });
9796
10072
  for (const dirPath of dirPaths) {
9797
10073
  const name = basename4(dirPath);
9798
10074
  if (name === basename4(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
@@ -9820,7 +10096,7 @@ var skillsProcessorToolTargetTuple = [
9820
10096
  "replit",
9821
10097
  "roo"
9822
10098
  ];
9823
- var SkillsProcessorToolTargetSchema = z36.enum(skillsProcessorToolTargetTuple);
10099
+ var SkillsProcessorToolTargetSchema = z37.enum(skillsProcessorToolTargetTuple);
9824
10100
  var toolSkillFactories = /* @__PURE__ */ new Map([
9825
10101
  [
9826
10102
  "agentsmd",
@@ -10021,10 +10297,10 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10021
10297
  )
10022
10298
  );
10023
10299
  const localSkillNames = new Set(localDirNames);
10024
- const curatedDirPath = join73(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
10300
+ const curatedDirPath = join74(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
10025
10301
  let curatedSkills = [];
10026
10302
  if (await directoryExists(curatedDirPath)) {
10027
- const curatedDirPaths = await findFilesByGlobs(join73(curatedDirPath, "*"), { type: "dir" });
10303
+ const curatedDirPaths = await findFilesByGlobs(join74(curatedDirPath, "*"), { type: "dir" });
10028
10304
  const curatedDirNames = curatedDirPaths.map((path3) => basename5(path3));
10029
10305
  const nonConflicting = curatedDirNames.filter((name) => {
10030
10306
  if (localSkillNames.has(name)) {
@@ -10058,8 +10334,8 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10058
10334
  async loadToolDirs() {
10059
10335
  const factory = this.getFactory(this.toolTarget);
10060
10336
  const paths = factory.class.getSettablePaths({ global: this.global });
10061
- const skillsDirPath = join73(this.baseDir, paths.relativeDirPath);
10062
- const dirPaths = await findFilesByGlobs(join73(skillsDirPath, "*"), { type: "dir" });
10337
+ const skillsDirPath = join74(this.baseDir, paths.relativeDirPath);
10338
+ const dirPaths = await findFilesByGlobs(join74(skillsDirPath, "*"), { type: "dir" });
10063
10339
  const dirNames = dirPaths.map((path3) => basename5(path3));
10064
10340
  const toolSkills = await Promise.all(
10065
10341
  dirNames.map(
@@ -10076,8 +10352,8 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10076
10352
  async loadToolDirsToDelete() {
10077
10353
  const factory = this.getFactory(this.toolTarget);
10078
10354
  const paths = factory.class.getSettablePaths({ global: this.global });
10079
- const skillsDirPath = join73(this.baseDir, paths.relativeDirPath);
10080
- const dirPaths = await findFilesByGlobs(join73(skillsDirPath, "*"), { type: "dir" });
10355
+ const skillsDirPath = join74(this.baseDir, paths.relativeDirPath);
10356
+ const dirPaths = await findFilesByGlobs(join74(skillsDirPath, "*"), { type: "dir" });
10081
10357
  const dirNames = dirPaths.map((path3) => basename5(path3));
10082
10358
  const toolSkills = dirNames.map(
10083
10359
  (dirName) => factory.class.forDeletion({
@@ -10139,11 +10415,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10139
10415
  };
10140
10416
 
10141
10417
  // src/features/subagents/agentsmd-subagent.ts
10142
- import { join as join75 } from "path";
10418
+ import { join as join76 } from "path";
10143
10419
 
10144
10420
  // src/features/subagents/simulated-subagent.ts
10145
- import { basename as basename6, join as join74 } from "path";
10146
- import { z as z37 } from "zod/mini";
10421
+ import { basename as basename6, join as join75 } from "path";
10422
+ import { z as z38 } from "zod/mini";
10147
10423
 
10148
10424
  // src/features/subagents/tool-subagent.ts
10149
10425
  var ToolSubagent = class extends ToolFile {
@@ -10195,9 +10471,9 @@ var ToolSubagent = class extends ToolFile {
10195
10471
  };
10196
10472
 
10197
10473
  // src/features/subagents/simulated-subagent.ts
10198
- var SimulatedSubagentFrontmatterSchema = z37.object({
10199
- name: z37.string(),
10200
- description: z37.string()
10474
+ var SimulatedSubagentFrontmatterSchema = z38.object({
10475
+ name: z38.string(),
10476
+ description: z38.string()
10201
10477
  });
10202
10478
  var SimulatedSubagent = class extends ToolSubagent {
10203
10479
  frontmatter;
@@ -10207,7 +10483,7 @@ var SimulatedSubagent = class extends ToolSubagent {
10207
10483
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
10208
10484
  if (!result.success) {
10209
10485
  throw new Error(
10210
- `Invalid frontmatter in ${join74(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10486
+ `Invalid frontmatter in ${join75(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10211
10487
  );
10212
10488
  }
10213
10489
  }
@@ -10258,7 +10534,7 @@ var SimulatedSubagent = class extends ToolSubagent {
10258
10534
  return {
10259
10535
  success: false,
10260
10536
  error: new Error(
10261
- `Invalid frontmatter in ${join74(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10537
+ `Invalid frontmatter in ${join75(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10262
10538
  )
10263
10539
  };
10264
10540
  }
@@ -10268,7 +10544,7 @@ var SimulatedSubagent = class extends ToolSubagent {
10268
10544
  relativeFilePath,
10269
10545
  validate = true
10270
10546
  }) {
10271
- const filePath = join74(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
10547
+ const filePath = join75(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
10272
10548
  const fileContent = await readFileContent(filePath);
10273
10549
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
10274
10550
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -10304,7 +10580,7 @@ var SimulatedSubagent = class extends ToolSubagent {
10304
10580
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
10305
10581
  static getSettablePaths() {
10306
10582
  return {
10307
- relativeDirPath: join75(".agents", "subagents")
10583
+ relativeDirPath: join76(".agents", "subagents")
10308
10584
  };
10309
10585
  }
10310
10586
  static async fromFile(params) {
@@ -10327,11 +10603,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
10327
10603
  };
10328
10604
 
10329
10605
  // src/features/subagents/factorydroid-subagent.ts
10330
- import { join as join76 } from "path";
10606
+ import { join as join77 } from "path";
10331
10607
  var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
10332
10608
  static getSettablePaths(_options) {
10333
10609
  return {
10334
- relativeDirPath: join76(".factory", "droids")
10610
+ relativeDirPath: join77(".factory", "droids")
10335
10611
  };
10336
10612
  }
10337
10613
  static async fromFile(params) {
@@ -10354,11 +10630,11 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
10354
10630
  };
10355
10631
 
10356
10632
  // src/features/subagents/geminicli-subagent.ts
10357
- import { join as join77 } from "path";
10633
+ import { join as join78 } from "path";
10358
10634
  var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
10359
10635
  static getSettablePaths() {
10360
10636
  return {
10361
- relativeDirPath: join77(".gemini", "subagents")
10637
+ relativeDirPath: join78(".gemini", "subagents")
10362
10638
  };
10363
10639
  }
10364
10640
  static async fromFile(params) {
@@ -10381,11 +10657,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
10381
10657
  };
10382
10658
 
10383
10659
  // src/features/subagents/roo-subagent.ts
10384
- import { join as join78 } from "path";
10660
+ import { join as join79 } from "path";
10385
10661
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
10386
10662
  static getSettablePaths() {
10387
10663
  return {
10388
- relativeDirPath: join78(".roo", "subagents")
10664
+ relativeDirPath: join79(".roo", "subagents")
10389
10665
  };
10390
10666
  }
10391
10667
  static async fromFile(params) {
@@ -10408,20 +10684,20 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
10408
10684
  };
10409
10685
 
10410
10686
  // src/features/subagents/subagents-processor.ts
10411
- import { basename as basename9, join as join86 } from "path";
10412
- import { z as z45 } from "zod/mini";
10687
+ import { basename as basename9, join as join87 } from "path";
10688
+ import { z as z46 } from "zod/mini";
10413
10689
 
10414
10690
  // src/features/subagents/claudecode-subagent.ts
10415
- import { join as join80 } from "path";
10416
- import { z as z39 } from "zod/mini";
10691
+ import { join as join81 } from "path";
10692
+ import { z as z40 } from "zod/mini";
10417
10693
 
10418
10694
  // src/features/subagents/rulesync-subagent.ts
10419
- import { basename as basename7, join as join79 } from "path";
10420
- import { z as z38 } from "zod/mini";
10421
- var RulesyncSubagentFrontmatterSchema = z38.looseObject({
10422
- targets: z38._default(RulesyncTargetsSchema, ["*"]),
10423
- name: z38.string(),
10424
- description: z38.string()
10695
+ import { basename as basename7, join as join80 } from "path";
10696
+ import { z as z39 } from "zod/mini";
10697
+ var RulesyncSubagentFrontmatterSchema = z39.looseObject({
10698
+ targets: z39._default(RulesyncTargetsSchema, ["*"]),
10699
+ name: z39.string(),
10700
+ description: z39.string()
10425
10701
  });
10426
10702
  var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10427
10703
  frontmatter;
@@ -10430,7 +10706,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10430
10706
  const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
10431
10707
  if (!parseResult.success && rest.validate !== false) {
10432
10708
  throw new Error(
10433
- `Invalid frontmatter in ${join79(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
10709
+ `Invalid frontmatter in ${join80(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
10434
10710
  );
10435
10711
  }
10436
10712
  const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
@@ -10463,7 +10739,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10463
10739
  return {
10464
10740
  success: false,
10465
10741
  error: new Error(
10466
- `Invalid frontmatter in ${join79(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10742
+ `Invalid frontmatter in ${join80(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10467
10743
  )
10468
10744
  };
10469
10745
  }
@@ -10471,7 +10747,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10471
10747
  static async fromFile({
10472
10748
  relativeFilePath
10473
10749
  }) {
10474
- const filePath = join79(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
10750
+ const filePath = join80(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
10475
10751
  const fileContent = await readFileContent(filePath);
10476
10752
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
10477
10753
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -10490,13 +10766,13 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10490
10766
  };
10491
10767
 
10492
10768
  // src/features/subagents/claudecode-subagent.ts
10493
- var ClaudecodeSubagentFrontmatterSchema = z39.looseObject({
10494
- name: z39.string(),
10495
- description: z39.string(),
10496
- model: z39.optional(z39.string()),
10497
- tools: z39.optional(z39.union([z39.string(), z39.array(z39.string())])),
10498
- permissionMode: z39.optional(z39.string()),
10499
- skills: z39.optional(z39.union([z39.string(), z39.array(z39.string())]))
10769
+ var ClaudecodeSubagentFrontmatterSchema = z40.looseObject({
10770
+ name: z40.string(),
10771
+ description: z40.string(),
10772
+ model: z40.optional(z40.string()),
10773
+ tools: z40.optional(z40.union([z40.string(), z40.array(z40.string())])),
10774
+ permissionMode: z40.optional(z40.string()),
10775
+ skills: z40.optional(z40.union([z40.string(), z40.array(z40.string())]))
10500
10776
  });
10501
10777
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10502
10778
  frontmatter;
@@ -10506,7 +10782,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10506
10782
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
10507
10783
  if (!result.success) {
10508
10784
  throw new Error(
10509
- `Invalid frontmatter in ${join80(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10785
+ `Invalid frontmatter in ${join81(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10510
10786
  );
10511
10787
  }
10512
10788
  }
@@ -10518,7 +10794,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10518
10794
  }
10519
10795
  static getSettablePaths(_options = {}) {
10520
10796
  return {
10521
- relativeDirPath: join80(".claude", "agents")
10797
+ relativeDirPath: join81(".claude", "agents")
10522
10798
  };
10523
10799
  }
10524
10800
  getFrontmatter() {
@@ -10594,7 +10870,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10594
10870
  return {
10595
10871
  success: false,
10596
10872
  error: new Error(
10597
- `Invalid frontmatter in ${join80(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10873
+ `Invalid frontmatter in ${join81(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10598
10874
  )
10599
10875
  };
10600
10876
  }
@@ -10612,7 +10888,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10612
10888
  global = false
10613
10889
  }) {
10614
10890
  const paths = this.getSettablePaths({ global });
10615
- const filePath = join80(baseDir, paths.relativeDirPath, relativeFilePath);
10891
+ const filePath = join81(baseDir, paths.relativeDirPath, relativeFilePath);
10616
10892
  const fileContent = await readFileContent(filePath);
10617
10893
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
10618
10894
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -10647,16 +10923,16 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10647
10923
  };
10648
10924
 
10649
10925
  // src/features/subagents/codexcli-subagent.ts
10650
- import { join as join81 } from "path";
10926
+ import { join as join82 } from "path";
10651
10927
  import * as smolToml2 from "smol-toml";
10652
- import { z as z40 } from "zod/mini";
10653
- var CodexCliSubagentTomlSchema = z40.looseObject({
10654
- name: z40.string(),
10655
- description: z40.optional(z40.string()),
10656
- developer_instructions: z40.optional(z40.string()),
10657
- model: z40.optional(z40.string()),
10658
- model_reasoning_effort: z40.optional(z40.string()),
10659
- sandbox_mode: z40.optional(z40.string())
10928
+ import { z as z41 } from "zod/mini";
10929
+ var CodexCliSubagentTomlSchema = z41.looseObject({
10930
+ name: z41.string(),
10931
+ description: z41.optional(z41.string()),
10932
+ developer_instructions: z41.optional(z41.string()),
10933
+ model: z41.optional(z41.string()),
10934
+ model_reasoning_effort: z41.optional(z41.string()),
10935
+ sandbox_mode: z41.optional(z41.string())
10660
10936
  });
10661
10937
  var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10662
10938
  body;
@@ -10667,7 +10943,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10667
10943
  CodexCliSubagentTomlSchema.parse(parsed);
10668
10944
  } catch (error) {
10669
10945
  throw new Error(
10670
- `Invalid TOML in ${join81(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
10946
+ `Invalid TOML in ${join82(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
10671
10947
  { cause: error }
10672
10948
  );
10673
10949
  }
@@ -10679,7 +10955,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10679
10955
  }
10680
10956
  static getSettablePaths(_options = {}) {
10681
10957
  return {
10682
- relativeDirPath: join81(".codex", "agents")
10958
+ relativeDirPath: join82(".codex", "agents")
10683
10959
  };
10684
10960
  }
10685
10961
  getBody() {
@@ -10691,7 +10967,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10691
10967
  parsed = CodexCliSubagentTomlSchema.parse(smolToml2.parse(this.body));
10692
10968
  } catch (error) {
10693
10969
  throw new Error(
10694
- `Failed to parse TOML in ${join81(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
10970
+ `Failed to parse TOML in ${join82(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
10695
10971
  { cause: error }
10696
10972
  );
10697
10973
  }
@@ -10772,7 +11048,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10772
11048
  global = false
10773
11049
  }) {
10774
11050
  const paths = this.getSettablePaths({ global });
10775
- const filePath = join81(baseDir, paths.relativeDirPath, relativeFilePath);
11051
+ const filePath = join82(baseDir, paths.relativeDirPath, relativeFilePath);
10776
11052
  const fileContent = await readFileContent(filePath);
10777
11053
  const subagent = new _CodexCliSubagent({
10778
11054
  baseDir,
@@ -10810,13 +11086,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10810
11086
  };
10811
11087
 
10812
11088
  // src/features/subagents/copilot-subagent.ts
10813
- import { join as join82 } from "path";
10814
- import { z as z41 } from "zod/mini";
11089
+ import { join as join83 } from "path";
11090
+ import { z as z42 } from "zod/mini";
10815
11091
  var REQUIRED_TOOL = "agent/runSubagent";
10816
- var CopilotSubagentFrontmatterSchema = z41.looseObject({
10817
- name: z41.string(),
10818
- description: z41.string(),
10819
- tools: z41.optional(z41.union([z41.string(), z41.array(z41.string())]))
11092
+ var CopilotSubagentFrontmatterSchema = z42.looseObject({
11093
+ name: z42.string(),
11094
+ description: z42.string(),
11095
+ tools: z42.optional(z42.union([z42.string(), z42.array(z42.string())]))
10820
11096
  });
10821
11097
  var normalizeTools = (tools) => {
10822
11098
  if (!tools) {
@@ -10836,7 +11112,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
10836
11112
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
10837
11113
  if (!result.success) {
10838
11114
  throw new Error(
10839
- `Invalid frontmatter in ${join82(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11115
+ `Invalid frontmatter in ${join83(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10840
11116
  );
10841
11117
  }
10842
11118
  }
@@ -10848,7 +11124,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
10848
11124
  }
10849
11125
  static getSettablePaths(_options = {}) {
10850
11126
  return {
10851
- relativeDirPath: join82(".github", "agents")
11127
+ relativeDirPath: join83(".github", "agents")
10852
11128
  };
10853
11129
  }
10854
11130
  getFrontmatter() {
@@ -10922,7 +11198,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
10922
11198
  return {
10923
11199
  success: false,
10924
11200
  error: new Error(
10925
- `Invalid frontmatter in ${join82(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11201
+ `Invalid frontmatter in ${join83(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10926
11202
  )
10927
11203
  };
10928
11204
  }
@@ -10940,7 +11216,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
10940
11216
  global = false
10941
11217
  }) {
10942
11218
  const paths = this.getSettablePaths({ global });
10943
- const filePath = join82(baseDir, paths.relativeDirPath, relativeFilePath);
11219
+ const filePath = join83(baseDir, paths.relativeDirPath, relativeFilePath);
10944
11220
  const fileContent = await readFileContent(filePath);
10945
11221
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
10946
11222
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -10976,11 +11252,11 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
10976
11252
  };
10977
11253
 
10978
11254
  // src/features/subagents/cursor-subagent.ts
10979
- import { join as join83 } from "path";
10980
- import { z as z42 } from "zod/mini";
10981
- var CursorSubagentFrontmatterSchema = z42.looseObject({
10982
- name: z42.string(),
10983
- description: z42.string()
11255
+ import { join as join84 } from "path";
11256
+ import { z as z43 } from "zod/mini";
11257
+ var CursorSubagentFrontmatterSchema = z43.looseObject({
11258
+ name: z43.string(),
11259
+ description: z43.string()
10984
11260
  });
10985
11261
  var CursorSubagent = class _CursorSubagent extends ToolSubagent {
10986
11262
  frontmatter;
@@ -10990,7 +11266,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
10990
11266
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
10991
11267
  if (!result.success) {
10992
11268
  throw new Error(
10993
- `Invalid frontmatter in ${join83(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11269
+ `Invalid frontmatter in ${join84(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10994
11270
  );
10995
11271
  }
10996
11272
  }
@@ -11002,7 +11278,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11002
11278
  }
11003
11279
  static getSettablePaths(_options = {}) {
11004
11280
  return {
11005
- relativeDirPath: join83(".cursor", "agents")
11281
+ relativeDirPath: join84(".cursor", "agents")
11006
11282
  };
11007
11283
  }
11008
11284
  getFrontmatter() {
@@ -11069,7 +11345,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11069
11345
  return {
11070
11346
  success: false,
11071
11347
  error: new Error(
11072
- `Invalid frontmatter in ${join83(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11348
+ `Invalid frontmatter in ${join84(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11073
11349
  )
11074
11350
  };
11075
11351
  }
@@ -11087,7 +11363,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11087
11363
  global = false
11088
11364
  }) {
11089
11365
  const paths = this.getSettablePaths({ global });
11090
- const filePath = join83(baseDir, paths.relativeDirPath, relativeFilePath);
11366
+ const filePath = join84(baseDir, paths.relativeDirPath, relativeFilePath);
11091
11367
  const fileContent = await readFileContent(filePath);
11092
11368
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11093
11369
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11123,23 +11399,23 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11123
11399
  };
11124
11400
 
11125
11401
  // src/features/subagents/kiro-subagent.ts
11126
- import { join as join84 } from "path";
11127
- import { z as z43 } from "zod/mini";
11128
- var KiroCliSubagentJsonSchema = z43.looseObject({
11129
- name: z43.string(),
11130
- description: z43.optional(z43.nullable(z43.string())),
11131
- prompt: z43.optional(z43.nullable(z43.string())),
11132
- tools: z43.optional(z43.nullable(z43.array(z43.string()))),
11133
- toolAliases: z43.optional(z43.nullable(z43.record(z43.string(), z43.string()))),
11134
- toolSettings: z43.optional(z43.nullable(z43.unknown())),
11135
- toolSchema: z43.optional(z43.nullable(z43.unknown())),
11136
- hooks: z43.optional(z43.nullable(z43.record(z43.string(), z43.array(z43.unknown())))),
11137
- model: z43.optional(z43.nullable(z43.string())),
11138
- mcpServers: z43.optional(z43.nullable(z43.record(z43.string(), z43.unknown()))),
11139
- useLegacyMcpJson: z43.optional(z43.nullable(z43.boolean())),
11140
- resources: z43.optional(z43.nullable(z43.array(z43.string()))),
11141
- allowedTools: z43.optional(z43.nullable(z43.array(z43.string()))),
11142
- includeMcpJson: z43.optional(z43.nullable(z43.boolean()))
11402
+ import { join as join85 } from "path";
11403
+ import { z as z44 } from "zod/mini";
11404
+ var KiroCliSubagentJsonSchema = z44.looseObject({
11405
+ name: z44.string(),
11406
+ description: z44.optional(z44.nullable(z44.string())),
11407
+ prompt: z44.optional(z44.nullable(z44.string())),
11408
+ tools: z44.optional(z44.nullable(z44.array(z44.string()))),
11409
+ toolAliases: z44.optional(z44.nullable(z44.record(z44.string(), z44.string()))),
11410
+ toolSettings: z44.optional(z44.nullable(z44.unknown())),
11411
+ toolSchema: z44.optional(z44.nullable(z44.unknown())),
11412
+ hooks: z44.optional(z44.nullable(z44.record(z44.string(), z44.array(z44.unknown())))),
11413
+ model: z44.optional(z44.nullable(z44.string())),
11414
+ mcpServers: z44.optional(z44.nullable(z44.record(z44.string(), z44.unknown()))),
11415
+ useLegacyMcpJson: z44.optional(z44.nullable(z44.boolean())),
11416
+ resources: z44.optional(z44.nullable(z44.array(z44.string()))),
11417
+ allowedTools: z44.optional(z44.nullable(z44.array(z44.string()))),
11418
+ includeMcpJson: z44.optional(z44.nullable(z44.boolean()))
11143
11419
  });
11144
11420
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11145
11421
  body;
@@ -11150,7 +11426,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11150
11426
  KiroCliSubagentJsonSchema.parse(parsed);
11151
11427
  } catch (error) {
11152
11428
  throw new Error(
11153
- `Invalid JSON in ${join84(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
11429
+ `Invalid JSON in ${join85(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
11154
11430
  { cause: error }
11155
11431
  );
11156
11432
  }
@@ -11162,7 +11438,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11162
11438
  }
11163
11439
  static getSettablePaths(_options = {}) {
11164
11440
  return {
11165
- relativeDirPath: join84(".kiro", "agents")
11441
+ relativeDirPath: join85(".kiro", "agents")
11166
11442
  };
11167
11443
  }
11168
11444
  getBody() {
@@ -11174,7 +11450,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11174
11450
  parsed = JSON.parse(this.body);
11175
11451
  } catch (error) {
11176
11452
  throw new Error(
11177
- `Failed to parse JSON in ${join84(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
11453
+ `Failed to parse JSON in ${join85(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
11178
11454
  { cause: error }
11179
11455
  );
11180
11456
  }
@@ -11255,7 +11531,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11255
11531
  global = false
11256
11532
  }) {
11257
11533
  const paths = this.getSettablePaths({ global });
11258
- const filePath = join84(baseDir, paths.relativeDirPath, relativeFilePath);
11534
+ const filePath = join85(baseDir, paths.relativeDirPath, relativeFilePath);
11259
11535
  const fileContent = await readFileContent(filePath);
11260
11536
  const subagent = new _KiroSubagent({
11261
11537
  baseDir,
@@ -11293,12 +11569,12 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11293
11569
  };
11294
11570
 
11295
11571
  // src/features/subagents/opencode-subagent.ts
11296
- import { basename as basename8, join as join85 } from "path";
11297
- import { z as z44 } from "zod/mini";
11298
- var OpenCodeSubagentFrontmatterSchema = z44.looseObject({
11299
- description: z44.string(),
11300
- mode: z44._default(z44.string(), "subagent"),
11301
- name: z44.optional(z44.string())
11572
+ import { basename as basename8, join as join86 } from "path";
11573
+ import { z as z45 } from "zod/mini";
11574
+ var OpenCodeSubagentFrontmatterSchema = z45.looseObject({
11575
+ description: z45.string(),
11576
+ mode: z45._default(z45.string(), "subagent"),
11577
+ name: z45.optional(z45.string())
11302
11578
  });
11303
11579
  var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11304
11580
  frontmatter;
@@ -11308,7 +11584,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11308
11584
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
11309
11585
  if (!result.success) {
11310
11586
  throw new Error(
11311
- `Invalid frontmatter in ${join85(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11587
+ `Invalid frontmatter in ${join86(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11312
11588
  );
11313
11589
  }
11314
11590
  }
@@ -11322,7 +11598,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11322
11598
  global = false
11323
11599
  } = {}) {
11324
11600
  return {
11325
- relativeDirPath: global ? join85(".config", "opencode", "agent") : join85(".opencode", "agent")
11601
+ relativeDirPath: global ? join86(".config", "opencode", "agent") : join86(".opencode", "agent")
11326
11602
  };
11327
11603
  }
11328
11604
  getFrontmatter() {
@@ -11388,7 +11664,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11388
11664
  return {
11389
11665
  success: false,
11390
11666
  error: new Error(
11391
- `Invalid frontmatter in ${join85(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11667
+ `Invalid frontmatter in ${join86(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11392
11668
  )
11393
11669
  };
11394
11670
  }
@@ -11405,7 +11681,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11405
11681
  global = false
11406
11682
  }) {
11407
11683
  const paths = this.getSettablePaths({ global });
11408
- const filePath = join85(baseDir, paths.relativeDirPath, relativeFilePath);
11684
+ const filePath = join86(baseDir, paths.relativeDirPath, relativeFilePath);
11409
11685
  const fileContent = await readFileContent(filePath);
11410
11686
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11411
11687
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11454,7 +11730,7 @@ var subagentsProcessorToolTargetTuple = [
11454
11730
  "opencode",
11455
11731
  "roo"
11456
11732
  ];
11457
- var SubagentsProcessorToolTargetSchema = z45.enum(subagentsProcessorToolTargetTuple);
11733
+ var SubagentsProcessorToolTargetSchema = z46.enum(subagentsProcessorToolTargetTuple);
11458
11734
  var toolSubagentFactories = /* @__PURE__ */ new Map([
11459
11735
  [
11460
11736
  "agentsmd",
@@ -11616,7 +11892,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
11616
11892
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
11617
11893
  */
11618
11894
  async loadRulesyncFiles() {
11619
- const subagentsDir = join86(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
11895
+ const subagentsDir = join87(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
11620
11896
  const dirExists = await directoryExists(subagentsDir);
11621
11897
  if (!dirExists) {
11622
11898
  logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -11631,7 +11907,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
11631
11907
  logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
11632
11908
  const rulesyncSubagents = [];
11633
11909
  for (const mdFile of mdFiles) {
11634
- const filepath = join86(subagentsDir, mdFile);
11910
+ const filepath = join87(subagentsDir, mdFile);
11635
11911
  try {
11636
11912
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
11637
11913
  relativeFilePath: mdFile,
@@ -11661,7 +11937,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
11661
11937
  const factory = this.getFactory(this.toolTarget);
11662
11938
  const paths = factory.class.getSettablePaths({ global: this.global });
11663
11939
  const subagentFilePaths = await findFilesByGlobs(
11664
- join86(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
11940
+ join87(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
11665
11941
  );
11666
11942
  if (forDeletion) {
11667
11943
  const toolSubagents2 = subagentFilePaths.map(
@@ -11726,49 +12002,49 @@ var SubagentsProcessor = class extends FeatureProcessor {
11726
12002
  };
11727
12003
 
11728
12004
  // src/features/rules/agentsmd-rule.ts
11729
- import { join as join89 } from "path";
12005
+ import { join as join90 } from "path";
11730
12006
 
11731
12007
  // src/features/rules/tool-rule.ts
11732
- import { join as join88 } from "path";
12008
+ import { join as join89 } from "path";
11733
12009
 
11734
12010
  // src/features/rules/rulesync-rule.ts
11735
- import { join as join87 } from "path";
11736
- import { z as z46 } from "zod/mini";
11737
- var RulesyncRuleFrontmatterSchema = z46.object({
11738
- root: z46.optional(z46.boolean()),
11739
- localRoot: z46.optional(z46.boolean()),
11740
- targets: z46._default(RulesyncTargetsSchema, ["*"]),
11741
- description: z46.optional(z46.string()),
11742
- globs: z46.optional(z46.array(z46.string())),
11743
- agentsmd: z46.optional(
11744
- z46.object({
12011
+ import { join as join88 } from "path";
12012
+ import { z as z47 } from "zod/mini";
12013
+ var RulesyncRuleFrontmatterSchema = z47.object({
12014
+ root: z47.optional(z47.boolean()),
12015
+ localRoot: z47.optional(z47.boolean()),
12016
+ targets: z47._default(RulesyncTargetsSchema, ["*"]),
12017
+ description: z47.optional(z47.string()),
12018
+ globs: z47.optional(z47.array(z47.string())),
12019
+ agentsmd: z47.optional(
12020
+ z47.object({
11745
12021
  // @example "path/to/subproject"
11746
- subprojectPath: z46.optional(z46.string())
12022
+ subprojectPath: z47.optional(z47.string())
11747
12023
  })
11748
12024
  ),
11749
- claudecode: z46.optional(
11750
- z46.object({
12025
+ claudecode: z47.optional(
12026
+ z47.object({
11751
12027
  // Glob patterns for conditional rules (takes precedence over globs)
11752
12028
  // @example ["src/**/*.ts", "tests/**/*.test.ts"]
11753
- paths: z46.optional(z46.array(z46.string()))
12029
+ paths: z47.optional(z47.array(z47.string()))
11754
12030
  })
11755
12031
  ),
11756
- cursor: z46.optional(
11757
- z46.object({
11758
- alwaysApply: z46.optional(z46.boolean()),
11759
- description: z46.optional(z46.string()),
11760
- globs: z46.optional(z46.array(z46.string()))
12032
+ cursor: z47.optional(
12033
+ z47.object({
12034
+ alwaysApply: z47.optional(z47.boolean()),
12035
+ description: z47.optional(z47.string()),
12036
+ globs: z47.optional(z47.array(z47.string()))
11761
12037
  })
11762
12038
  ),
11763
- copilot: z46.optional(
11764
- z46.object({
11765
- excludeAgent: z46.optional(z46.union([z46.literal("code-review"), z46.literal("coding-agent")]))
12039
+ copilot: z47.optional(
12040
+ z47.object({
12041
+ excludeAgent: z47.optional(z47.union([z47.literal("code-review"), z47.literal("coding-agent")]))
11766
12042
  })
11767
12043
  ),
11768
- antigravity: z46.optional(
11769
- z46.looseObject({
11770
- trigger: z46.optional(z46.string()),
11771
- globs: z46.optional(z46.array(z46.string()))
12044
+ antigravity: z47.optional(
12045
+ z47.looseObject({
12046
+ trigger: z47.optional(z47.string()),
12047
+ globs: z47.optional(z47.array(z47.string()))
11772
12048
  })
11773
12049
  )
11774
12050
  });
@@ -11779,7 +12055,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
11779
12055
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
11780
12056
  if (!parseResult.success && rest.validate !== false) {
11781
12057
  throw new Error(
11782
- `Invalid frontmatter in ${join87(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
12058
+ `Invalid frontmatter in ${join88(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
11783
12059
  );
11784
12060
  }
11785
12061
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -11814,7 +12090,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
11814
12090
  return {
11815
12091
  success: false,
11816
12092
  error: new Error(
11817
- `Invalid frontmatter in ${join87(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12093
+ `Invalid frontmatter in ${join88(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11818
12094
  )
11819
12095
  };
11820
12096
  }
@@ -11823,7 +12099,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
11823
12099
  relativeFilePath,
11824
12100
  validate = true
11825
12101
  }) {
11826
- const filePath = join87(
12102
+ const filePath = join88(
11827
12103
  process.cwd(),
11828
12104
  this.getSettablePaths().recommended.relativeDirPath,
11829
12105
  relativeFilePath
@@ -11925,7 +12201,7 @@ var ToolRule = class extends ToolFile {
11925
12201
  rulesyncRule,
11926
12202
  validate = true,
11927
12203
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
11928
- nonRootPath = { relativeDirPath: join88(".agents", "memories") }
12204
+ nonRootPath = { relativeDirPath: join89(".agents", "memories") }
11929
12205
  }) {
11930
12206
  const params = this.buildToolRuleParamsDefault({
11931
12207
  baseDir,
@@ -11936,7 +12212,7 @@ var ToolRule = class extends ToolFile {
11936
12212
  });
11937
12213
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
11938
12214
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
11939
- params.relativeDirPath = join88(rulesyncFrontmatter.agentsmd.subprojectPath);
12215
+ params.relativeDirPath = join89(rulesyncFrontmatter.agentsmd.subprojectPath);
11940
12216
  params.relativeFilePath = "AGENTS.md";
11941
12217
  }
11942
12218
  return params;
@@ -11985,7 +12261,7 @@ var ToolRule = class extends ToolFile {
11985
12261
  }
11986
12262
  };
11987
12263
  function buildToolPath(toolDir, subDir, excludeToolDir) {
11988
- return excludeToolDir ? subDir : join88(toolDir, subDir);
12264
+ return excludeToolDir ? subDir : join89(toolDir, subDir);
11989
12265
  }
11990
12266
 
11991
12267
  // src/features/rules/agentsmd-rule.ts
@@ -12014,8 +12290,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
12014
12290
  validate = true
12015
12291
  }) {
12016
12292
  const isRoot = relativeFilePath === "AGENTS.md";
12017
- const relativePath = isRoot ? "AGENTS.md" : join89(".agents", "memories", relativeFilePath);
12018
- const fileContent = await readFileContent(join89(baseDir, relativePath));
12293
+ const relativePath = isRoot ? "AGENTS.md" : join90(".agents", "memories", relativeFilePath);
12294
+ const fileContent = await readFileContent(join90(baseDir, relativePath));
12019
12295
  return new _AgentsMdRule({
12020
12296
  baseDir,
12021
12297
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -12070,21 +12346,21 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
12070
12346
  };
12071
12347
 
12072
12348
  // src/features/rules/antigravity-rule.ts
12073
- import { join as join90 } from "path";
12074
- import { z as z47 } from "zod/mini";
12075
- var AntigravityRuleFrontmatterSchema = z47.looseObject({
12076
- trigger: z47.optional(
12077
- z47.union([
12078
- z47.literal("always_on"),
12079
- z47.literal("glob"),
12080
- z47.literal("manual"),
12081
- z47.literal("model_decision"),
12082
- z47.string()
12349
+ import { join as join91 } from "path";
12350
+ import { z as z48 } from "zod/mini";
12351
+ var AntigravityRuleFrontmatterSchema = z48.looseObject({
12352
+ trigger: z48.optional(
12353
+ z48.union([
12354
+ z48.literal("always_on"),
12355
+ z48.literal("glob"),
12356
+ z48.literal("manual"),
12357
+ z48.literal("model_decision"),
12358
+ z48.string()
12083
12359
  // accepts any string for forward compatibility
12084
12360
  ])
12085
12361
  ),
12086
- globs: z47.optional(z47.string()),
12087
- description: z47.optional(z47.string())
12362
+ globs: z48.optional(z48.string()),
12363
+ description: z48.optional(z48.string())
12088
12364
  });
12089
12365
  function parseGlobsString(globs) {
12090
12366
  if (!globs) {
@@ -12229,7 +12505,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
12229
12505
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
12230
12506
  if (!result.success) {
12231
12507
  throw new Error(
12232
- `Invalid frontmatter in ${join90(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12508
+ `Invalid frontmatter in ${join91(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12233
12509
  );
12234
12510
  }
12235
12511
  }
@@ -12253,7 +12529,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
12253
12529
  relativeFilePath,
12254
12530
  validate = true
12255
12531
  }) {
12256
- const filePath = join90(
12532
+ const filePath = join91(
12257
12533
  baseDir,
12258
12534
  this.getSettablePaths().nonRoot.relativeDirPath,
12259
12535
  relativeFilePath
@@ -12394,7 +12670,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
12394
12670
  };
12395
12671
 
12396
12672
  // src/features/rules/augmentcode-legacy-rule.ts
12397
- import { join as join91 } from "path";
12673
+ import { join as join92 } from "path";
12398
12674
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
12399
12675
  toRulesyncRule() {
12400
12676
  const rulesyncFrontmatter = {
@@ -12455,8 +12731,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
12455
12731
  }) {
12456
12732
  const settablePaths = this.getSettablePaths();
12457
12733
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
12458
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : join91(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
12459
- const fileContent = await readFileContent(join91(baseDir, relativePath));
12734
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : join92(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
12735
+ const fileContent = await readFileContent(join92(baseDir, relativePath));
12460
12736
  return new _AugmentcodeLegacyRule({
12461
12737
  baseDir,
12462
12738
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -12485,7 +12761,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
12485
12761
  };
12486
12762
 
12487
12763
  // src/features/rules/augmentcode-rule.ts
12488
- import { join as join92 } from "path";
12764
+ import { join as join93 } from "path";
12489
12765
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
12490
12766
  toRulesyncRule() {
12491
12767
  return this.toRulesyncRuleDefault();
@@ -12516,7 +12792,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
12516
12792
  relativeFilePath,
12517
12793
  validate = true
12518
12794
  }) {
12519
- const filePath = join92(
12795
+ const filePath = join93(
12520
12796
  baseDir,
12521
12797
  this.getSettablePaths().nonRoot.relativeDirPath,
12522
12798
  relativeFilePath
@@ -12556,7 +12832,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
12556
12832
  };
12557
12833
 
12558
12834
  // src/features/rules/claudecode-legacy-rule.ts
12559
- import { join as join93 } from "path";
12835
+ import { join as join94 } from "path";
12560
12836
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
12561
12837
  static getSettablePaths({
12562
12838
  global,
@@ -12591,7 +12867,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
12591
12867
  if (isRoot) {
12592
12868
  const relativePath2 = paths.root.relativeFilePath;
12593
12869
  const fileContent2 = await readFileContent(
12594
- join93(baseDir, paths.root.relativeDirPath, relativePath2)
12870
+ join94(baseDir, paths.root.relativeDirPath, relativePath2)
12595
12871
  );
12596
12872
  return new _ClaudecodeLegacyRule({
12597
12873
  baseDir,
@@ -12605,8 +12881,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
12605
12881
  if (!paths.nonRoot) {
12606
12882
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
12607
12883
  }
12608
- const relativePath = join93(paths.nonRoot.relativeDirPath, relativeFilePath);
12609
- const fileContent = await readFileContent(join93(baseDir, relativePath));
12884
+ const relativePath = join94(paths.nonRoot.relativeDirPath, relativeFilePath);
12885
+ const fileContent = await readFileContent(join94(baseDir, relativePath));
12610
12886
  return new _ClaudecodeLegacyRule({
12611
12887
  baseDir,
12612
12888
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -12665,10 +12941,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
12665
12941
  };
12666
12942
 
12667
12943
  // src/features/rules/claudecode-rule.ts
12668
- import { join as join94 } from "path";
12669
- import { z as z48 } from "zod/mini";
12670
- var ClaudecodeRuleFrontmatterSchema = z48.object({
12671
- paths: z48.optional(z48.array(z48.string()))
12944
+ import { join as join95 } from "path";
12945
+ import { z as z49 } from "zod/mini";
12946
+ var ClaudecodeRuleFrontmatterSchema = z49.object({
12947
+ paths: z49.optional(z49.array(z49.string()))
12672
12948
  });
12673
12949
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
12674
12950
  frontmatter;
@@ -12700,7 +12976,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
12700
12976
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
12701
12977
  if (!result.success) {
12702
12978
  throw new Error(
12703
- `Invalid frontmatter in ${join94(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12979
+ `Invalid frontmatter in ${join95(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12704
12980
  );
12705
12981
  }
12706
12982
  }
@@ -12728,7 +13004,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
12728
13004
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
12729
13005
  if (isRoot) {
12730
13006
  const fileContent2 = await readFileContent(
12731
- join94(baseDir, paths.root.relativeDirPath, paths.root.relativeFilePath)
13007
+ join95(baseDir, paths.root.relativeDirPath, paths.root.relativeFilePath)
12732
13008
  );
12733
13009
  return new _ClaudecodeRule({
12734
13010
  baseDir,
@@ -12743,16 +13019,16 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
12743
13019
  if (!paths.nonRoot) {
12744
13020
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
12745
13021
  }
12746
- const relativePath = join94(paths.nonRoot.relativeDirPath, relativeFilePath);
12747
- const fileContent = await readFileContent(join94(baseDir, relativePath));
13022
+ const relativePath = join95(paths.nonRoot.relativeDirPath, relativeFilePath);
13023
+ const fileContent = await readFileContent(join95(baseDir, relativePath));
12748
13024
  const { frontmatter, body: content } = parseFrontmatter(
12749
13025
  fileContent,
12750
- join94(baseDir, relativePath)
13026
+ join95(baseDir, relativePath)
12751
13027
  );
12752
13028
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
12753
13029
  if (!result.success) {
12754
13030
  throw new Error(
12755
- `Invalid frontmatter in ${join94(baseDir, relativePath)}: ${formatError(result.error)}`
13031
+ `Invalid frontmatter in ${join95(baseDir, relativePath)}: ${formatError(result.error)}`
12756
13032
  );
12757
13033
  }
12758
13034
  return new _ClaudecodeRule({
@@ -12859,7 +13135,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
12859
13135
  return {
12860
13136
  success: false,
12861
13137
  error: new Error(
12862
- `Invalid frontmatter in ${join94(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13138
+ `Invalid frontmatter in ${join95(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12863
13139
  )
12864
13140
  };
12865
13141
  }
@@ -12879,10 +13155,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
12879
13155
  };
12880
13156
 
12881
13157
  // src/features/rules/cline-rule.ts
12882
- import { join as join95 } from "path";
12883
- import { z as z49 } from "zod/mini";
12884
- var ClineRuleFrontmatterSchema = z49.object({
12885
- description: z49.string()
13158
+ import { join as join96 } from "path";
13159
+ import { z as z50 } from "zod/mini";
13160
+ var ClineRuleFrontmatterSchema = z50.object({
13161
+ description: z50.string()
12886
13162
  });
12887
13163
  var ClineRule = class _ClineRule extends ToolRule {
12888
13164
  static getSettablePaths(_options = {}) {
@@ -12925,7 +13201,7 @@ var ClineRule = class _ClineRule extends ToolRule {
12925
13201
  validate = true
12926
13202
  }) {
12927
13203
  const fileContent = await readFileContent(
12928
- join95(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
13204
+ join96(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
12929
13205
  );
12930
13206
  return new _ClineRule({
12931
13207
  baseDir,
@@ -12951,7 +13227,7 @@ var ClineRule = class _ClineRule extends ToolRule {
12951
13227
  };
12952
13228
 
12953
13229
  // src/features/rules/codexcli-rule.ts
12954
- import { join as join96 } from "path";
13230
+ import { join as join97 } from "path";
12955
13231
  var CodexcliRule = class _CodexcliRule extends ToolRule {
12956
13232
  static getSettablePaths({
12957
13233
  global,
@@ -12986,7 +13262,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
12986
13262
  if (isRoot) {
12987
13263
  const relativePath2 = paths.root.relativeFilePath;
12988
13264
  const fileContent2 = await readFileContent(
12989
- join96(baseDir, paths.root.relativeDirPath, relativePath2)
13265
+ join97(baseDir, paths.root.relativeDirPath, relativePath2)
12990
13266
  );
12991
13267
  return new _CodexcliRule({
12992
13268
  baseDir,
@@ -13000,8 +13276,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
13000
13276
  if (!paths.nonRoot) {
13001
13277
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13002
13278
  }
13003
- const relativePath = join96(paths.nonRoot.relativeDirPath, relativeFilePath);
13004
- const fileContent = await readFileContent(join96(baseDir, relativePath));
13279
+ const relativePath = join97(paths.nonRoot.relativeDirPath, relativeFilePath);
13280
+ const fileContent = await readFileContent(join97(baseDir, relativePath));
13005
13281
  return new _CodexcliRule({
13006
13282
  baseDir,
13007
13283
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -13060,12 +13336,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
13060
13336
  };
13061
13337
 
13062
13338
  // src/features/rules/copilot-rule.ts
13063
- import { join as join97 } from "path";
13064
- import { z as z50 } from "zod/mini";
13065
- var CopilotRuleFrontmatterSchema = z50.object({
13066
- description: z50.optional(z50.string()),
13067
- applyTo: z50.optional(z50.string()),
13068
- excludeAgent: z50.optional(z50.union([z50.literal("code-review"), z50.literal("coding-agent")]))
13339
+ import { join as join98 } from "path";
13340
+ import { z as z51 } from "zod/mini";
13341
+ var CopilotRuleFrontmatterSchema = z51.object({
13342
+ description: z51.optional(z51.string()),
13343
+ applyTo: z51.optional(z51.string()),
13344
+ excludeAgent: z51.optional(z51.union([z51.literal("code-review"), z51.literal("coding-agent")]))
13069
13345
  });
13070
13346
  var CopilotRule = class _CopilotRule extends ToolRule {
13071
13347
  frontmatter;
@@ -13094,7 +13370,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13094
13370
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
13095
13371
  if (!result.success) {
13096
13372
  throw new Error(
13097
- `Invalid frontmatter in ${join97(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13373
+ `Invalid frontmatter in ${join98(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13098
13374
  );
13099
13375
  }
13100
13376
  }
@@ -13184,8 +13460,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13184
13460
  const paths = this.getSettablePaths({ global });
13185
13461
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
13186
13462
  if (isRoot) {
13187
- const relativePath2 = join97(paths.root.relativeDirPath, paths.root.relativeFilePath);
13188
- const fileContent2 = await readFileContent(join97(baseDir, relativePath2));
13463
+ const relativePath2 = join98(paths.root.relativeDirPath, paths.root.relativeFilePath);
13464
+ const fileContent2 = await readFileContent(join98(baseDir, relativePath2));
13189
13465
  return new _CopilotRule({
13190
13466
  baseDir,
13191
13467
  relativeDirPath: paths.root.relativeDirPath,
@@ -13199,16 +13475,16 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13199
13475
  if (!paths.nonRoot) {
13200
13476
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13201
13477
  }
13202
- const relativePath = join97(paths.nonRoot.relativeDirPath, relativeFilePath);
13203
- const fileContent = await readFileContent(join97(baseDir, relativePath));
13478
+ const relativePath = join98(paths.nonRoot.relativeDirPath, relativeFilePath);
13479
+ const fileContent = await readFileContent(join98(baseDir, relativePath));
13204
13480
  const { frontmatter, body: content } = parseFrontmatter(
13205
13481
  fileContent,
13206
- join97(baseDir, relativePath)
13482
+ join98(baseDir, relativePath)
13207
13483
  );
13208
13484
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
13209
13485
  if (!result.success) {
13210
13486
  throw new Error(
13211
- `Invalid frontmatter in ${join97(baseDir, relativeFilePath)}: ${formatError(result.error)}`
13487
+ `Invalid frontmatter in ${join98(baseDir, relativeFilePath)}: ${formatError(result.error)}`
13212
13488
  );
13213
13489
  }
13214
13490
  return new _CopilotRule({
@@ -13250,7 +13526,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13250
13526
  return {
13251
13527
  success: false,
13252
13528
  error: new Error(
13253
- `Invalid frontmatter in ${join97(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13529
+ `Invalid frontmatter in ${join98(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13254
13530
  )
13255
13531
  };
13256
13532
  }
@@ -13270,12 +13546,12 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13270
13546
  };
13271
13547
 
13272
13548
  // src/features/rules/cursor-rule.ts
13273
- import { join as join98 } from "path";
13274
- import { z as z51 } from "zod/mini";
13275
- var CursorRuleFrontmatterSchema = z51.object({
13276
- description: z51.optional(z51.string()),
13277
- globs: z51.optional(z51.string()),
13278
- alwaysApply: z51.optional(z51.boolean())
13549
+ import { join as join99 } from "path";
13550
+ import { z as z52 } from "zod/mini";
13551
+ var CursorRuleFrontmatterSchema = z52.object({
13552
+ description: z52.optional(z52.string()),
13553
+ globs: z52.optional(z52.string()),
13554
+ alwaysApply: z52.optional(z52.boolean())
13279
13555
  });
13280
13556
  var CursorRule = class _CursorRule extends ToolRule {
13281
13557
  frontmatter;
@@ -13292,7 +13568,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13292
13568
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
13293
13569
  if (!result.success) {
13294
13570
  throw new Error(
13295
- `Invalid frontmatter in ${join98(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13571
+ `Invalid frontmatter in ${join99(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13296
13572
  );
13297
13573
  }
13298
13574
  }
@@ -13408,7 +13684,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13408
13684
  relativeFilePath,
13409
13685
  validate = true
13410
13686
  }) {
13411
- const filePath = join98(
13687
+ const filePath = join99(
13412
13688
  baseDir,
13413
13689
  this.getSettablePaths().nonRoot.relativeDirPath,
13414
13690
  relativeFilePath
@@ -13418,7 +13694,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13418
13694
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
13419
13695
  if (!result.success) {
13420
13696
  throw new Error(
13421
- `Invalid frontmatter in ${join98(baseDir, relativeFilePath)}: ${formatError(result.error)}`
13697
+ `Invalid frontmatter in ${join99(baseDir, relativeFilePath)}: ${formatError(result.error)}`
13422
13698
  );
13423
13699
  }
13424
13700
  return new _CursorRule({
@@ -13455,7 +13731,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13455
13731
  return {
13456
13732
  success: false,
13457
13733
  error: new Error(
13458
- `Invalid frontmatter in ${join98(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13734
+ `Invalid frontmatter in ${join99(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13459
13735
  )
13460
13736
  };
13461
13737
  }
@@ -13475,7 +13751,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13475
13751
  };
13476
13752
 
13477
13753
  // src/features/rules/factorydroid-rule.ts
13478
- import { join as join99 } from "path";
13754
+ import { join as join100 } from "path";
13479
13755
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
13480
13756
  constructor({ fileContent, root, ...rest }) {
13481
13757
  super({
@@ -13515,8 +13791,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
13515
13791
  const paths = this.getSettablePaths({ global });
13516
13792
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
13517
13793
  if (isRoot) {
13518
- const relativePath2 = join99(paths.root.relativeDirPath, paths.root.relativeFilePath);
13519
- const fileContent2 = await readFileContent(join99(baseDir, relativePath2));
13794
+ const relativePath2 = join100(paths.root.relativeDirPath, paths.root.relativeFilePath);
13795
+ const fileContent2 = await readFileContent(join100(baseDir, relativePath2));
13520
13796
  return new _FactorydroidRule({
13521
13797
  baseDir,
13522
13798
  relativeDirPath: paths.root.relativeDirPath,
@@ -13529,8 +13805,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
13529
13805
  if (!paths.nonRoot) {
13530
13806
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13531
13807
  }
13532
- const relativePath = join99(paths.nonRoot.relativeDirPath, relativeFilePath);
13533
- const fileContent = await readFileContent(join99(baseDir, relativePath));
13808
+ const relativePath = join100(paths.nonRoot.relativeDirPath, relativeFilePath);
13809
+ const fileContent = await readFileContent(join100(baseDir, relativePath));
13534
13810
  return new _FactorydroidRule({
13535
13811
  baseDir,
13536
13812
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -13589,7 +13865,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
13589
13865
  };
13590
13866
 
13591
13867
  // src/features/rules/geminicli-rule.ts
13592
- import { join as join100 } from "path";
13868
+ import { join as join101 } from "path";
13593
13869
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
13594
13870
  static getSettablePaths({
13595
13871
  global,
@@ -13624,7 +13900,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
13624
13900
  if (isRoot) {
13625
13901
  const relativePath2 = paths.root.relativeFilePath;
13626
13902
  const fileContent2 = await readFileContent(
13627
- join100(baseDir, paths.root.relativeDirPath, relativePath2)
13903
+ join101(baseDir, paths.root.relativeDirPath, relativePath2)
13628
13904
  );
13629
13905
  return new _GeminiCliRule({
13630
13906
  baseDir,
@@ -13638,8 +13914,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
13638
13914
  if (!paths.nonRoot) {
13639
13915
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13640
13916
  }
13641
- const relativePath = join100(paths.nonRoot.relativeDirPath, relativeFilePath);
13642
- const fileContent = await readFileContent(join100(baseDir, relativePath));
13917
+ const relativePath = join101(paths.nonRoot.relativeDirPath, relativeFilePath);
13918
+ const fileContent = await readFileContent(join101(baseDir, relativePath));
13643
13919
  return new _GeminiCliRule({
13644
13920
  baseDir,
13645
13921
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -13698,7 +13974,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
13698
13974
  };
13699
13975
 
13700
13976
  // src/features/rules/goose-rule.ts
13701
- import { join as join101 } from "path";
13977
+ import { join as join102 } from "path";
13702
13978
  var GooseRule = class _GooseRule extends ToolRule {
13703
13979
  static getSettablePaths({
13704
13980
  global,
@@ -13733,7 +14009,7 @@ var GooseRule = class _GooseRule extends ToolRule {
13733
14009
  if (isRoot) {
13734
14010
  const relativePath2 = paths.root.relativeFilePath;
13735
14011
  const fileContent2 = await readFileContent(
13736
- join101(baseDir, paths.root.relativeDirPath, relativePath2)
14012
+ join102(baseDir, paths.root.relativeDirPath, relativePath2)
13737
14013
  );
13738
14014
  return new _GooseRule({
13739
14015
  baseDir,
@@ -13747,8 +14023,8 @@ var GooseRule = class _GooseRule extends ToolRule {
13747
14023
  if (!paths.nonRoot) {
13748
14024
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13749
14025
  }
13750
- const relativePath = join101(paths.nonRoot.relativeDirPath, relativeFilePath);
13751
- const fileContent = await readFileContent(join101(baseDir, relativePath));
14026
+ const relativePath = join102(paths.nonRoot.relativeDirPath, relativeFilePath);
14027
+ const fileContent = await readFileContent(join102(baseDir, relativePath));
13752
14028
  return new _GooseRule({
13753
14029
  baseDir,
13754
14030
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -13807,7 +14083,7 @@ var GooseRule = class _GooseRule extends ToolRule {
13807
14083
  };
13808
14084
 
13809
14085
  // src/features/rules/junie-rule.ts
13810
- import { join as join102 } from "path";
14086
+ import { join as join103 } from "path";
13811
14087
  var JunieRule = class _JunieRule extends ToolRule {
13812
14088
  static getSettablePaths(_options = {}) {
13813
14089
  return {
@@ -13826,8 +14102,8 @@ var JunieRule = class _JunieRule extends ToolRule {
13826
14102
  validate = true
13827
14103
  }) {
13828
14104
  const isRoot = relativeFilePath === "guidelines.md";
13829
- const relativePath = isRoot ? "guidelines.md" : join102(".junie", "memories", relativeFilePath);
13830
- const fileContent = await readFileContent(join102(baseDir, relativePath));
14105
+ const relativePath = isRoot ? "guidelines.md" : join103(".junie", "memories", relativeFilePath);
14106
+ const fileContent = await readFileContent(join103(baseDir, relativePath));
13831
14107
  return new _JunieRule({
13832
14108
  baseDir,
13833
14109
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -13882,7 +14158,7 @@ var JunieRule = class _JunieRule extends ToolRule {
13882
14158
  };
13883
14159
 
13884
14160
  // src/features/rules/kilo-rule.ts
13885
- import { join as join103 } from "path";
14161
+ import { join as join104 } from "path";
13886
14162
  var KiloRule = class _KiloRule extends ToolRule {
13887
14163
  static getSettablePaths(_options = {}) {
13888
14164
  return {
@@ -13897,7 +14173,7 @@ var KiloRule = class _KiloRule extends ToolRule {
13897
14173
  validate = true
13898
14174
  }) {
13899
14175
  const fileContent = await readFileContent(
13900
- join103(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14176
+ join104(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
13901
14177
  );
13902
14178
  return new _KiloRule({
13903
14179
  baseDir,
@@ -13949,7 +14225,7 @@ var KiloRule = class _KiloRule extends ToolRule {
13949
14225
  };
13950
14226
 
13951
14227
  // src/features/rules/kiro-rule.ts
13952
- import { join as join104 } from "path";
14228
+ import { join as join105 } from "path";
13953
14229
  var KiroRule = class _KiroRule extends ToolRule {
13954
14230
  static getSettablePaths(_options = {}) {
13955
14231
  return {
@@ -13964,7 +14240,7 @@ var KiroRule = class _KiroRule extends ToolRule {
13964
14240
  validate = true
13965
14241
  }) {
13966
14242
  const fileContent = await readFileContent(
13967
- join104(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14243
+ join105(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
13968
14244
  );
13969
14245
  return new _KiroRule({
13970
14246
  baseDir,
@@ -14018,7 +14294,7 @@ var KiroRule = class _KiroRule extends ToolRule {
14018
14294
  };
14019
14295
 
14020
14296
  // src/features/rules/opencode-rule.ts
14021
- import { join as join105 } from "path";
14297
+ import { join as join106 } from "path";
14022
14298
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
14023
14299
  static getSettablePaths({
14024
14300
  global,
@@ -14053,7 +14329,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
14053
14329
  if (isRoot) {
14054
14330
  const relativePath2 = paths.root.relativeFilePath;
14055
14331
  const fileContent2 = await readFileContent(
14056
- join105(baseDir, paths.root.relativeDirPath, relativePath2)
14332
+ join106(baseDir, paths.root.relativeDirPath, relativePath2)
14057
14333
  );
14058
14334
  return new _OpenCodeRule({
14059
14335
  baseDir,
@@ -14067,8 +14343,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
14067
14343
  if (!paths.nonRoot) {
14068
14344
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14069
14345
  }
14070
- const relativePath = join105(paths.nonRoot.relativeDirPath, relativeFilePath);
14071
- const fileContent = await readFileContent(join105(baseDir, relativePath));
14346
+ const relativePath = join106(paths.nonRoot.relativeDirPath, relativeFilePath);
14347
+ const fileContent = await readFileContent(join106(baseDir, relativePath));
14072
14348
  return new _OpenCodeRule({
14073
14349
  baseDir,
14074
14350
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -14127,7 +14403,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
14127
14403
  };
14128
14404
 
14129
14405
  // src/features/rules/qwencode-rule.ts
14130
- import { join as join106 } from "path";
14406
+ import { join as join107 } from "path";
14131
14407
  var QwencodeRule = class _QwencodeRule extends ToolRule {
14132
14408
  static getSettablePaths(_options = {}) {
14133
14409
  return {
@@ -14146,8 +14422,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
14146
14422
  validate = true
14147
14423
  }) {
14148
14424
  const isRoot = relativeFilePath === "QWEN.md";
14149
- const relativePath = isRoot ? "QWEN.md" : join106(".qwen", "memories", relativeFilePath);
14150
- const fileContent = await readFileContent(join106(baseDir, relativePath));
14425
+ const relativePath = isRoot ? "QWEN.md" : join107(".qwen", "memories", relativeFilePath);
14426
+ const fileContent = await readFileContent(join107(baseDir, relativePath));
14151
14427
  return new _QwencodeRule({
14152
14428
  baseDir,
14153
14429
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -14199,7 +14475,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
14199
14475
  };
14200
14476
 
14201
14477
  // src/features/rules/replit-rule.ts
14202
- import { join as join107 } from "path";
14478
+ import { join as join108 } from "path";
14203
14479
  var ReplitRule = class _ReplitRule extends ToolRule {
14204
14480
  static getSettablePaths(_options = {}) {
14205
14481
  return {
@@ -14221,7 +14497,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
14221
14497
  }
14222
14498
  const relativePath = paths.root.relativeFilePath;
14223
14499
  const fileContent = await readFileContent(
14224
- join107(baseDir, paths.root.relativeDirPath, relativePath)
14500
+ join108(baseDir, paths.root.relativeDirPath, relativePath)
14225
14501
  );
14226
14502
  return new _ReplitRule({
14227
14503
  baseDir,
@@ -14287,7 +14563,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
14287
14563
  };
14288
14564
 
14289
14565
  // src/features/rules/roo-rule.ts
14290
- import { join as join108 } from "path";
14566
+ import { join as join109 } from "path";
14291
14567
  var RooRule = class _RooRule extends ToolRule {
14292
14568
  static getSettablePaths(_options = {}) {
14293
14569
  return {
@@ -14302,7 +14578,7 @@ var RooRule = class _RooRule extends ToolRule {
14302
14578
  validate = true
14303
14579
  }) {
14304
14580
  const fileContent = await readFileContent(
14305
- join108(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14581
+ join109(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14306
14582
  );
14307
14583
  return new _RooRule({
14308
14584
  baseDir,
@@ -14371,7 +14647,7 @@ var RooRule = class _RooRule extends ToolRule {
14371
14647
  };
14372
14648
 
14373
14649
  // src/features/rules/warp-rule.ts
14374
- import { join as join109 } from "path";
14650
+ import { join as join110 } from "path";
14375
14651
  var WarpRule = class _WarpRule extends ToolRule {
14376
14652
  constructor({ fileContent, root, ...rest }) {
14377
14653
  super({
@@ -14397,8 +14673,8 @@ var WarpRule = class _WarpRule extends ToolRule {
14397
14673
  validate = true
14398
14674
  }) {
14399
14675
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
14400
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join109(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
14401
- const fileContent = await readFileContent(join109(baseDir, relativePath));
14676
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join110(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
14677
+ const fileContent = await readFileContent(join110(baseDir, relativePath));
14402
14678
  return new _WarpRule({
14403
14679
  baseDir,
14404
14680
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -14453,7 +14729,7 @@ var WarpRule = class _WarpRule extends ToolRule {
14453
14729
  };
14454
14730
 
14455
14731
  // src/features/rules/windsurf-rule.ts
14456
- import { join as join110 } from "path";
14732
+ import { join as join111 } from "path";
14457
14733
  var WindsurfRule = class _WindsurfRule extends ToolRule {
14458
14734
  static getSettablePaths(_options = {}) {
14459
14735
  return {
@@ -14468,7 +14744,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
14468
14744
  validate = true
14469
14745
  }) {
14470
14746
  const fileContent = await readFileContent(
14471
- join110(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14747
+ join111(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14472
14748
  );
14473
14749
  return new _WindsurfRule({
14474
14750
  baseDir,
@@ -14544,8 +14820,8 @@ var rulesProcessorToolTargets = [
14544
14820
  "warp",
14545
14821
  "windsurf"
14546
14822
  ];
14547
- var RulesProcessorToolTargetSchema = z52.enum(rulesProcessorToolTargets);
14548
- var formatRulePaths = (rules) => rules.map((r) => join111(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
14823
+ var RulesProcessorToolTargetSchema = z53.enum(rulesProcessorToolTargets);
14824
+ var formatRulePaths = (rules) => rules.map((r) => join112(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
14549
14825
  var toolRuleFactories = /* @__PURE__ */ new Map([
14550
14826
  [
14551
14827
  "agentsmd",
@@ -14920,7 +15196,7 @@ var RulesProcessor = class extends FeatureProcessor {
14920
15196
  }).relativeDirPath;
14921
15197
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
14922
15198
  const frontmatter = skill.getFrontmatter();
14923
- const relativePath = join111(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
15199
+ const relativePath = join112(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
14924
15200
  return {
14925
15201
  name: frontmatter.name,
14926
15202
  description: frontmatter.description,
@@ -15033,8 +15309,8 @@ var RulesProcessor = class extends FeatureProcessor {
15033
15309
  * Load and parse rulesync rule files from .rulesync/rules/ directory
15034
15310
  */
15035
15311
  async loadRulesyncFiles() {
15036
- const rulesyncBaseDir = join111(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
15037
- const files = await findFilesByGlobs(join111(rulesyncBaseDir, "**", "*.md"));
15312
+ const rulesyncBaseDir = join112(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
15313
+ const files = await findFilesByGlobs(join112(rulesyncBaseDir, "**", "*.md"));
15038
15314
  logger.debug(`Found ${files.length} rulesync files`);
15039
15315
  const rulesyncRules = await Promise.all(
15040
15316
  files.map((file) => {
@@ -15101,7 +15377,7 @@ var RulesProcessor = class extends FeatureProcessor {
15101
15377
  return [];
15102
15378
  }
15103
15379
  const rootFilePaths = await findFilesByGlobs(
15104
- join111(
15380
+ join112(
15105
15381
  this.baseDir,
15106
15382
  settablePaths.root.relativeDirPath ?? ".",
15107
15383
  settablePaths.root.relativeFilePath
@@ -15139,7 +15415,7 @@ var RulesProcessor = class extends FeatureProcessor {
15139
15415
  return [];
15140
15416
  }
15141
15417
  const localRootFilePaths = await findFilesByGlobs(
15142
- join111(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md")
15418
+ join112(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md")
15143
15419
  );
15144
15420
  return localRootFilePaths.map(
15145
15421
  (filePath) => factory.class.forDeletion({
@@ -15155,9 +15431,9 @@ var RulesProcessor = class extends FeatureProcessor {
15155
15431
  if (!settablePaths.nonRoot) {
15156
15432
  return [];
15157
15433
  }
15158
- const nonRootBaseDir = join111(this.baseDir, settablePaths.nonRoot.relativeDirPath);
15434
+ const nonRootBaseDir = join112(this.baseDir, settablePaths.nonRoot.relativeDirPath);
15159
15435
  const nonRootFilePaths = await findFilesByGlobs(
15160
- join111(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
15436
+ join112(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
15161
15437
  );
15162
15438
  if (forDeletion) {
15163
15439
  return nonRootFilePaths.map((filePath) => {
@@ -15289,14 +15565,14 @@ s/<command> [arguments]
15289
15565
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
15290
15566
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
15291
15567
 
15292
- When users call a custom slash command, you have to look for the markdown file, \`${join111(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
15568
+ When users call a custom slash command, you have to look for the markdown file, \`${join112(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
15293
15569
  const subagentsSection = subagents ? `## Simulated Subagents
15294
15570
 
15295
15571
  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.
15296
15572
 
15297
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${join111(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
15573
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${join112(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
15298
15574
 
15299
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join111(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
15575
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join112(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
15300
15576
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
15301
15577
  const result = [
15302
15578
  overview,
@@ -15368,7 +15644,7 @@ async function processEmptyFeatureGeneration(params) {
15368
15644
  return { count: totalCount, paths: [], hasDiff };
15369
15645
  }
15370
15646
  async function checkRulesyncDirExists(params) {
15371
- return fileExists(join112(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
15647
+ return fileExists(join113(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
15372
15648
  }
15373
15649
  async function generate(params) {
15374
15650
  const { config } = params;