rulesync 7.10.0 → 7.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -634,7 +634,7 @@ function getBaseDirsInLightOfGlobal({
634
634
  }
635
635
 
636
636
  // src/lib/generate.ts
637
- var import_node_path114 = require("path");
637
+ var import_node_path115 = require("path");
638
638
  var import_es_toolkit4 = require("es-toolkit");
639
639
 
640
640
  // src/features/commands/commands-processor.ts
@@ -3019,7 +3019,7 @@ var CommandsProcessor = class extends FeatureProcessor {
3019
3019
  };
3020
3020
 
3021
3021
  // src/features/hooks/hooks-processor.ts
3022
- var import_mini16 = require("zod/mini");
3022
+ var import_mini17 = require("zod/mini");
3023
3023
 
3024
3024
  // src/types/hooks.ts
3025
3025
  var import_mini14 = require("zod/mini");
@@ -3038,7 +3038,9 @@ var HookDefinitionSchema = import_mini14.z.looseObject({
3038
3038
  timeout: import_mini14.z.optional(import_mini14.z.number()),
3039
3039
  matcher: import_mini14.z.optional(safeString),
3040
3040
  prompt: import_mini14.z.optional(import_mini14.z.string()),
3041
- loop_limit: import_mini14.z.optional(import_mini14.z.nullable(import_mini14.z.number()))
3041
+ loop_limit: import_mini14.z.optional(import_mini14.z.nullable(import_mini14.z.number())),
3042
+ name: import_mini14.z.optional(safeString),
3043
+ description: import_mini14.z.optional(safeString)
3042
3044
  });
3043
3045
  var CURSOR_HOOK_EVENTS = [
3044
3046
  "sessionStart",
@@ -3105,6 +3107,19 @@ var FACTORYDROID_HOOK_EVENTS = [
3105
3107
  "notification",
3106
3108
  "setup"
3107
3109
  ];
3110
+ var GEMINICLI_HOOK_EVENTS = [
3111
+ "sessionStart",
3112
+ "sessionEnd",
3113
+ "beforeSubmitPrompt",
3114
+ "stop",
3115
+ "beforeAgentResponse",
3116
+ "afterAgentResponse",
3117
+ "beforeToolSelection",
3118
+ "preToolUse",
3119
+ "postToolUse",
3120
+ "preCompact",
3121
+ "notification"
3122
+ ];
3108
3123
  var hooksRecordSchema = import_mini14.z.record(import_mini14.z.string(), import_mini14.z.array(HookDefinitionSchema));
3109
3124
  var HooksConfigSchema = import_mini14.z.looseObject({
3110
3125
  version: import_mini14.z.optional(import_mini14.z.number()),
@@ -3113,7 +3128,8 @@ var HooksConfigSchema = import_mini14.z.looseObject({
3113
3128
  claudecode: import_mini14.z.optional(import_mini14.z.looseObject({ hooks: import_mini14.z.optional(hooksRecordSchema) })),
3114
3129
  copilot: import_mini14.z.optional(import_mini14.z.looseObject({ hooks: import_mini14.z.optional(hooksRecordSchema) })),
3115
3130
  opencode: import_mini14.z.optional(import_mini14.z.looseObject({ hooks: import_mini14.z.optional(hooksRecordSchema) })),
3116
- factorydroid: import_mini14.z.optional(import_mini14.z.looseObject({ hooks: import_mini14.z.optional(hooksRecordSchema) }))
3131
+ factorydroid: import_mini14.z.optional(import_mini14.z.looseObject({ hooks: import_mini14.z.optional(hooksRecordSchema) })),
3132
+ geminicli: import_mini14.z.optional(import_mini14.z.looseObject({ hooks: import_mini14.z.optional(hooksRecordSchema) }))
3117
3133
  });
3118
3134
  var CANONICAL_TO_CLAUDE_EVENT_NAMES = {
3119
3135
  sessionStart: "SessionStart",
@@ -3192,6 +3208,22 @@ var CANONICAL_TO_COPILOT_EVENT_NAMES = {
3192
3208
  var COPILOT_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
3193
3209
  Object.entries(CANONICAL_TO_COPILOT_EVENT_NAMES).map(([k, v]) => [v, k])
3194
3210
  );
3211
+ var CANONICAL_TO_GEMINICLI_EVENT_NAMES = {
3212
+ sessionStart: "SessionStart",
3213
+ sessionEnd: "SessionEnd",
3214
+ beforeSubmitPrompt: "BeforeAgent",
3215
+ stop: "AfterAgent",
3216
+ beforeAgentResponse: "BeforeModel",
3217
+ afterAgentResponse: "AfterModel",
3218
+ beforeToolSelection: "BeforeToolSelection",
3219
+ preToolUse: "BeforeTool",
3220
+ postToolUse: "AfterTool",
3221
+ preCompact: "PreCompress",
3222
+ notification: "Notification"
3223
+ };
3224
+ var GEMINICLI_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
3225
+ Object.entries(CANONICAL_TO_GEMINICLI_EVENT_NAMES).map(([k, v]) => [v, k])
3226
+ );
3195
3227
 
3196
3228
  // src/features/hooks/claudecode-hooks.ts
3197
3229
  var import_node_path22 = require("path");
@@ -3478,6 +3510,7 @@ var CopilotHookEntrySchema = import_mini15.z.looseObject({
3478
3510
  timeoutSec: import_mini15.z.optional(import_mini15.z.number())
3479
3511
  });
3480
3512
  function canonicalToCopilotHooks(config) {
3513
+ const canonicalSchemaKeys = Object.keys(HookDefinitionSchema.shape);
3481
3514
  const isWindows = process.platform === "win32";
3482
3515
  const commandField = isWindows ? "powershell" : "bash";
3483
3516
  const supported = new Set(COPILOT_HOOK_EVENTS);
@@ -3502,9 +3535,7 @@ function canonicalToCopilotHooks(config) {
3502
3535
  const command = def.command;
3503
3536
  const timeout = def.timeout;
3504
3537
  const rest = Object.fromEntries(
3505
- Object.entries(def).filter(
3506
- ([k]) => !["type", "matcher", "command", "prompt", "timeout"].includes(k)
3507
- )
3538
+ Object.entries(def).filter(([k]) => !canonicalSchemaKeys.includes(k))
3508
3539
  );
3509
3540
  entries.push({
3510
3541
  type: hookType,
@@ -3697,7 +3728,14 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
3697
3728
  const mappedHooks = {};
3698
3729
  for (const [eventName, defs] of Object.entries(mergedHooks)) {
3699
3730
  const cursorEventName = CANONICAL_TO_CURSOR_EVENT_NAMES[eventName] ?? eventName;
3700
- mappedHooks[cursorEventName] = defs;
3731
+ mappedHooks[cursorEventName] = defs.map((def) => ({
3732
+ ...def.type !== void 0 && def.type !== null && { type: def.type },
3733
+ ...def.command !== void 0 && def.command !== null && { command: def.command },
3734
+ ...def.timeout !== void 0 && def.timeout !== null && { timeout: def.timeout },
3735
+ ...def.loop_limit !== void 0 && { loop_limit: def.loop_limit },
3736
+ ...def.matcher !== void 0 && def.matcher !== null && { matcher: def.matcher },
3737
+ ...def.prompt !== void 0 && def.prompt !== null && { prompt: def.prompt }
3738
+ }));
3701
3739
  }
3702
3740
  const cursorConfig = {
3703
3741
  version: config.version ?? 1,
@@ -3930,8 +3968,193 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
3930
3968
  }
3931
3969
  };
3932
3970
 
3933
- // src/features/hooks/opencode-hooks.ts
3971
+ // src/features/hooks/geminicli-hooks.ts
3934
3972
  var import_node_path26 = require("path");
3973
+ var import_mini16 = require("zod/mini");
3974
+ function canonicalToGeminicliHooks(config) {
3975
+ const geminiSupported = new Set(GEMINICLI_HOOK_EVENTS);
3976
+ const sharedHooks = {};
3977
+ for (const [event, defs] of Object.entries(config.hooks)) {
3978
+ if (geminiSupported.has(event)) {
3979
+ sharedHooks[event] = defs;
3980
+ }
3981
+ }
3982
+ const effectiveHooks = {
3983
+ ...sharedHooks,
3984
+ ...config.geminicli?.hooks
3985
+ };
3986
+ const gemini = {};
3987
+ for (const [eventName, definitions] of Object.entries(effectiveHooks)) {
3988
+ const geminiEventName = CANONICAL_TO_GEMINICLI_EVENT_NAMES[eventName] ?? eventName;
3989
+ const byMatcher = /* @__PURE__ */ new Map();
3990
+ for (const def of definitions) {
3991
+ const key = def.matcher ?? "";
3992
+ const list = byMatcher.get(key);
3993
+ if (list) list.push(def);
3994
+ else byMatcher.set(key, [def]);
3995
+ }
3996
+ const entries = [];
3997
+ for (const [matcherKey, defs] of byMatcher) {
3998
+ const hooks = defs.map((def) => {
3999
+ const command = def.command !== void 0 && def.command !== null && !def.command.startsWith("$") ? `$GEMINI_PROJECT_DIR/${def.command.replace(/^\.\//, "")}` : def.command;
4000
+ return {
4001
+ type: def.type ?? "command",
4002
+ ...command !== void 0 && command !== null && { command },
4003
+ ...def.timeout !== void 0 && def.timeout !== null && { timeout: def.timeout },
4004
+ ...def.name !== void 0 && def.name !== null && { name: def.name },
4005
+ ...def.description !== void 0 && def.description !== null && { description: def.description }
4006
+ };
4007
+ });
4008
+ entries.push(matcherKey ? { matcher: matcherKey, hooks } : { hooks });
4009
+ }
4010
+ gemini[geminiEventName] = entries;
4011
+ }
4012
+ return gemini;
4013
+ }
4014
+ var GeminiHookEntrySchema = import_mini16.z.looseObject({
4015
+ type: import_mini16.z.optional(import_mini16.z.string()),
4016
+ command: import_mini16.z.optional(import_mini16.z.string()),
4017
+ timeout: import_mini16.z.optional(import_mini16.z.number()),
4018
+ name: import_mini16.z.optional(import_mini16.z.string()),
4019
+ description: import_mini16.z.optional(import_mini16.z.string())
4020
+ });
4021
+ var GeminiMatcherEntrySchema = import_mini16.z.looseObject({
4022
+ matcher: import_mini16.z.optional(import_mini16.z.string()),
4023
+ hooks: import_mini16.z.optional(import_mini16.z.array(GeminiHookEntrySchema))
4024
+ });
4025
+ function geminiHooksToCanonical(geminiHooks) {
4026
+ if (geminiHooks === null || geminiHooks === void 0 || typeof geminiHooks !== "object") {
4027
+ return {};
4028
+ }
4029
+ const canonical = {};
4030
+ for (const [geminiEventName, matcherEntries] of Object.entries(geminiHooks)) {
4031
+ const eventName = GEMINICLI_TO_CANONICAL_EVENT_NAMES[geminiEventName] ?? geminiEventName;
4032
+ if (!Array.isArray(matcherEntries)) continue;
4033
+ const defs = [];
4034
+ for (const rawEntry of matcherEntries) {
4035
+ const parseResult = GeminiMatcherEntrySchema.safeParse(rawEntry);
4036
+ if (!parseResult.success) continue;
4037
+ const entry = parseResult.data;
4038
+ const hooks = entry.hooks ?? [];
4039
+ for (const h of hooks) {
4040
+ const cmd = h.command;
4041
+ const command = typeof cmd === "string" && cmd.startsWith("$GEMINI_PROJECT_DIR/") ? cmd.replace(/^\$GEMINI_PROJECT_DIR\/?/, "./") : cmd;
4042
+ const hookType = h.type === "command" || h.type === "prompt" ? h.type : "command";
4043
+ defs.push({
4044
+ type: hookType,
4045
+ ...command !== void 0 && command !== null && { command },
4046
+ ...h.timeout !== void 0 && h.timeout !== null && { timeout: h.timeout },
4047
+ ...h.name !== void 0 && h.name !== null && { name: h.name },
4048
+ ...h.description !== void 0 && h.description !== null && { description: h.description },
4049
+ ...entry.matcher !== void 0 && entry.matcher !== null && entry.matcher !== "" && { matcher: entry.matcher }
4050
+ });
4051
+ }
4052
+ }
4053
+ if (defs.length > 0) {
4054
+ canonical[eventName] = defs;
4055
+ }
4056
+ }
4057
+ return canonical;
4058
+ }
4059
+ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4060
+ constructor(params) {
4061
+ super({
4062
+ ...params,
4063
+ fileContent: params.fileContent ?? "{}"
4064
+ });
4065
+ }
4066
+ isDeletable() {
4067
+ return false;
4068
+ }
4069
+ static getSettablePaths(_options = {}) {
4070
+ return { relativeDirPath: ".gemini", relativeFilePath: "settings.json" };
4071
+ }
4072
+ static async fromFile({
4073
+ baseDir = process.cwd(),
4074
+ validate = true,
4075
+ global = false
4076
+ }) {
4077
+ const paths = _GeminicliHooks.getSettablePaths({ global });
4078
+ const filePath = (0, import_node_path26.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4079
+ const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4080
+ return new _GeminicliHooks({
4081
+ baseDir,
4082
+ relativeDirPath: paths.relativeDirPath,
4083
+ relativeFilePath: paths.relativeFilePath,
4084
+ fileContent,
4085
+ validate
4086
+ });
4087
+ }
4088
+ static async fromRulesyncHooks({
4089
+ baseDir = process.cwd(),
4090
+ rulesyncHooks,
4091
+ validate = true,
4092
+ global = false
4093
+ }) {
4094
+ const paths = _GeminicliHooks.getSettablePaths({ global });
4095
+ const filePath = (0, import_node_path26.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4096
+ const existingContent = await readOrInitializeFileContent(
4097
+ filePath,
4098
+ JSON.stringify({}, null, 2)
4099
+ );
4100
+ let settings;
4101
+ try {
4102
+ settings = JSON.parse(existingContent);
4103
+ } catch (error) {
4104
+ throw new Error(
4105
+ `Failed to parse existing Gemini CLI settings at ${filePath}: ${formatError(error)}`,
4106
+ { cause: error }
4107
+ );
4108
+ }
4109
+ const config = rulesyncHooks.getJson();
4110
+ const geminiHooks = canonicalToGeminicliHooks(config);
4111
+ const merged = { ...settings, hooks: geminiHooks };
4112
+ const fileContent = JSON.stringify(merged, null, 2);
4113
+ return new _GeminicliHooks({
4114
+ baseDir,
4115
+ relativeDirPath: paths.relativeDirPath,
4116
+ relativeFilePath: paths.relativeFilePath,
4117
+ fileContent,
4118
+ validate
4119
+ });
4120
+ }
4121
+ toRulesyncHooks() {
4122
+ let settings;
4123
+ try {
4124
+ settings = JSON.parse(this.getFileContent());
4125
+ } catch (error) {
4126
+ throw new Error(
4127
+ `Failed to parse Gemini CLI hooks content in ${(0, import_node_path26.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4128
+ {
4129
+ cause: error
4130
+ }
4131
+ );
4132
+ }
4133
+ const hooks = geminiHooksToCanonical(settings.hooks);
4134
+ return this.toRulesyncHooksDefault({
4135
+ fileContent: JSON.stringify({ version: 1, hooks }, null, 2)
4136
+ });
4137
+ }
4138
+ validate() {
4139
+ return { success: true, error: null };
4140
+ }
4141
+ static forDeletion({
4142
+ baseDir = process.cwd(),
4143
+ relativeDirPath,
4144
+ relativeFilePath
4145
+ }) {
4146
+ return new _GeminicliHooks({
4147
+ baseDir,
4148
+ relativeDirPath,
4149
+ relativeFilePath,
4150
+ fileContent: JSON.stringify({ hooks: {} }, null, 2),
4151
+ validate: false
4152
+ });
4153
+ }
4154
+ };
4155
+
4156
+ // src/features/hooks/opencode-hooks.ts
4157
+ var import_node_path27 = require("path");
3935
4158
  var NAMED_HOOKS = /* @__PURE__ */ new Set(["tool.execute.before", "tool.execute.after"]);
3936
4159
  function escapeForTemplateLiteral(command) {
3937
4160
  return command.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${");
@@ -4029,7 +4252,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4029
4252
  }
4030
4253
  static getSettablePaths(options) {
4031
4254
  return {
4032
- relativeDirPath: options?.global ? (0, import_node_path26.join)(".config", "opencode", "plugins") : (0, import_node_path26.join)(".opencode", "plugins"),
4255
+ relativeDirPath: options?.global ? (0, import_node_path27.join)(".config", "opencode", "plugins") : (0, import_node_path27.join)(".opencode", "plugins"),
4033
4256
  relativeFilePath: "rulesync-hooks.js"
4034
4257
  };
4035
4258
  }
@@ -4040,7 +4263,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4040
4263
  }) {
4041
4264
  const paths = _OpencodeHooks.getSettablePaths({ global });
4042
4265
  const fileContent = await readFileContent(
4043
- (0, import_node_path26.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4266
+ (0, import_node_path27.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4044
4267
  );
4045
4268
  return new _OpencodeHooks({
4046
4269
  baseDir,
@@ -4094,9 +4317,10 @@ var hooksProcessorToolTargetTuple = [
4094
4317
  "claudecode",
4095
4318
  "copilot",
4096
4319
  "opencode",
4097
- "factorydroid"
4320
+ "factorydroid",
4321
+ "geminicli"
4098
4322
  ];
4099
- var HooksProcessorToolTargetSchema = import_mini16.z.enum(hooksProcessorToolTargetTuple);
4323
+ var HooksProcessorToolTargetSchema = import_mini17.z.enum(hooksProcessorToolTargetTuple);
4100
4324
  var toolHooksFactories = /* @__PURE__ */ new Map([
4101
4325
  [
4102
4326
  "cursor",
@@ -4167,6 +4391,16 @@ var toolHooksFactories = /* @__PURE__ */ new Map([
4167
4391
  supportedHookTypes: ["command", "prompt"],
4168
4392
  supportsMatcher: true
4169
4393
  }
4394
+ ],
4395
+ [
4396
+ "geminicli",
4397
+ {
4398
+ class: GeminicliHooks,
4399
+ meta: { supportsProject: true, supportsGlobal: true, supportsImport: true },
4400
+ supportedEvents: GEMINICLI_HOOK_EVENTS,
4401
+ supportedHookTypes: ["command"],
4402
+ supportsMatcher: true
4403
+ }
4170
4404
  ]
4171
4405
  ]);
4172
4406
  var hooksProcessorToolTargets = [...toolHooksFactories.keys()];
@@ -4321,13 +4555,13 @@ var HooksProcessor = class extends FeatureProcessor {
4321
4555
  };
4322
4556
 
4323
4557
  // src/features/ignore/ignore-processor.ts
4324
- var import_mini17 = require("zod/mini");
4558
+ var import_mini18 = require("zod/mini");
4325
4559
 
4326
4560
  // src/features/ignore/augmentcode-ignore.ts
4327
- var import_node_path28 = require("path");
4561
+ var import_node_path29 = require("path");
4328
4562
 
4329
4563
  // src/features/ignore/rulesync-ignore.ts
4330
- var import_node_path27 = require("path");
4564
+ var import_node_path28 = require("path");
4331
4565
  var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
4332
4566
  validate() {
4333
4567
  return { success: true, error: null };
@@ -4347,12 +4581,12 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
4347
4581
  static async fromFile() {
4348
4582
  const baseDir = process.cwd();
4349
4583
  const paths = this.getSettablePaths();
4350
- const recommendedPath = (0, import_node_path27.join)(
4584
+ const recommendedPath = (0, import_node_path28.join)(
4351
4585
  baseDir,
4352
4586
  paths.recommended.relativeDirPath,
4353
4587
  paths.recommended.relativeFilePath
4354
4588
  );
4355
- const legacyPath = (0, import_node_path27.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
4589
+ const legacyPath = (0, import_node_path28.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
4356
4590
  if (await fileExists(recommendedPath)) {
4357
4591
  const fileContent2 = await readFileContent(recommendedPath);
4358
4592
  return new _RulesyncIgnore({
@@ -4468,7 +4702,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
4468
4702
  validate = true
4469
4703
  }) {
4470
4704
  const fileContent = await readFileContent(
4471
- (0, import_node_path28.join)(
4705
+ (0, import_node_path29.join)(
4472
4706
  baseDir,
4473
4707
  this.getSettablePaths().relativeDirPath,
4474
4708
  this.getSettablePaths().relativeFilePath
@@ -4498,7 +4732,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
4498
4732
  };
4499
4733
 
4500
4734
  // src/features/ignore/claudecode-ignore.ts
4501
- var import_node_path29 = require("path");
4735
+ var import_node_path30 = require("path");
4502
4736
  var import_es_toolkit2 = require("es-toolkit");
4503
4737
  var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4504
4738
  constructor(params) {
@@ -4541,7 +4775,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4541
4775
  const fileContent = rulesyncIgnore.getFileContent();
4542
4776
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
4543
4777
  const deniedValues = patterns.map((pattern) => `Read(${pattern})`);
4544
- const filePath = (0, import_node_path29.join)(
4778
+ const filePath = (0, import_node_path30.join)(
4545
4779
  baseDir,
4546
4780
  this.getSettablePaths().relativeDirPath,
4547
4781
  this.getSettablePaths().relativeFilePath
@@ -4577,7 +4811,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4577
4811
  validate = true
4578
4812
  }) {
4579
4813
  const fileContent = await readFileContent(
4580
- (0, import_node_path29.join)(
4814
+ (0, import_node_path30.join)(
4581
4815
  baseDir,
4582
4816
  this.getSettablePaths().relativeDirPath,
4583
4817
  this.getSettablePaths().relativeFilePath
@@ -4607,7 +4841,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4607
4841
  };
4608
4842
 
4609
4843
  // src/features/ignore/cline-ignore.ts
4610
- var import_node_path30 = require("path");
4844
+ var import_node_path31 = require("path");
4611
4845
  var ClineIgnore = class _ClineIgnore extends ToolIgnore {
4612
4846
  static getSettablePaths() {
4613
4847
  return {
@@ -4644,7 +4878,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
4644
4878
  validate = true
4645
4879
  }) {
4646
4880
  const fileContent = await readFileContent(
4647
- (0, import_node_path30.join)(
4881
+ (0, import_node_path31.join)(
4648
4882
  baseDir,
4649
4883
  this.getSettablePaths().relativeDirPath,
4650
4884
  this.getSettablePaths().relativeFilePath
@@ -4674,7 +4908,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
4674
4908
  };
4675
4909
 
4676
4910
  // src/features/ignore/cursor-ignore.ts
4677
- var import_node_path31 = require("path");
4911
+ var import_node_path32 = require("path");
4678
4912
  var CursorIgnore = class _CursorIgnore extends ToolIgnore {
4679
4913
  static getSettablePaths() {
4680
4914
  return {
@@ -4707,7 +4941,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
4707
4941
  validate = true
4708
4942
  }) {
4709
4943
  const fileContent = await readFileContent(
4710
- (0, import_node_path31.join)(
4944
+ (0, import_node_path32.join)(
4711
4945
  baseDir,
4712
4946
  this.getSettablePaths().relativeDirPath,
4713
4947
  this.getSettablePaths().relativeFilePath
@@ -4737,7 +4971,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
4737
4971
  };
4738
4972
 
4739
4973
  // src/features/ignore/geminicli-ignore.ts
4740
- var import_node_path32 = require("path");
4974
+ var import_node_path33 = require("path");
4741
4975
  var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
4742
4976
  static getSettablePaths() {
4743
4977
  return {
@@ -4764,7 +4998,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
4764
4998
  validate = true
4765
4999
  }) {
4766
5000
  const fileContent = await readFileContent(
4767
- (0, import_node_path32.join)(
5001
+ (0, import_node_path33.join)(
4768
5002
  baseDir,
4769
5003
  this.getSettablePaths().relativeDirPath,
4770
5004
  this.getSettablePaths().relativeFilePath
@@ -4794,7 +5028,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
4794
5028
  };
4795
5029
 
4796
5030
  // src/features/ignore/goose-ignore.ts
4797
- var import_node_path33 = require("path");
5031
+ var import_node_path34 = require("path");
4798
5032
  var GooseIgnore = class _GooseIgnore extends ToolIgnore {
4799
5033
  static getSettablePaths() {
4800
5034
  return {
@@ -4831,7 +5065,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
4831
5065
  validate = true
4832
5066
  }) {
4833
5067
  const fileContent = await readFileContent(
4834
- (0, import_node_path33.join)(
5068
+ (0, import_node_path34.join)(
4835
5069
  baseDir,
4836
5070
  this.getSettablePaths().relativeDirPath,
4837
5071
  this.getSettablePaths().relativeFilePath
@@ -4861,7 +5095,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
4861
5095
  };
4862
5096
 
4863
5097
  // src/features/ignore/junie-ignore.ts
4864
- var import_node_path34 = require("path");
5098
+ var import_node_path35 = require("path");
4865
5099
  var JunieIgnore = class _JunieIgnore extends ToolIgnore {
4866
5100
  static getSettablePaths() {
4867
5101
  return {
@@ -4888,7 +5122,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
4888
5122
  validate = true
4889
5123
  }) {
4890
5124
  const fileContent = await readFileContent(
4891
- (0, import_node_path34.join)(
5125
+ (0, import_node_path35.join)(
4892
5126
  baseDir,
4893
5127
  this.getSettablePaths().relativeDirPath,
4894
5128
  this.getSettablePaths().relativeFilePath
@@ -4918,7 +5152,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
4918
5152
  };
4919
5153
 
4920
5154
  // src/features/ignore/kilo-ignore.ts
4921
- var import_node_path35 = require("path");
5155
+ var import_node_path36 = require("path");
4922
5156
  var KiloIgnore = class _KiloIgnore extends ToolIgnore {
4923
5157
  static getSettablePaths() {
4924
5158
  return {
@@ -4955,7 +5189,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
4955
5189
  validate = true
4956
5190
  }) {
4957
5191
  const fileContent = await readFileContent(
4958
- (0, import_node_path35.join)(
5192
+ (0, import_node_path36.join)(
4959
5193
  baseDir,
4960
5194
  this.getSettablePaths().relativeDirPath,
4961
5195
  this.getSettablePaths().relativeFilePath
@@ -4985,7 +5219,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
4985
5219
  };
4986
5220
 
4987
5221
  // src/features/ignore/kiro-ignore.ts
4988
- var import_node_path36 = require("path");
5222
+ var import_node_path37 = require("path");
4989
5223
  var KiroIgnore = class _KiroIgnore extends ToolIgnore {
4990
5224
  static getSettablePaths() {
4991
5225
  return {
@@ -5012,7 +5246,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5012
5246
  validate = true
5013
5247
  }) {
5014
5248
  const fileContent = await readFileContent(
5015
- (0, import_node_path36.join)(
5249
+ (0, import_node_path37.join)(
5016
5250
  baseDir,
5017
5251
  this.getSettablePaths().relativeDirPath,
5018
5252
  this.getSettablePaths().relativeFilePath
@@ -5042,7 +5276,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5042
5276
  };
5043
5277
 
5044
5278
  // src/features/ignore/qwencode-ignore.ts
5045
- var import_node_path37 = require("path");
5279
+ var import_node_path38 = require("path");
5046
5280
  var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5047
5281
  static getSettablePaths() {
5048
5282
  return {
@@ -5069,7 +5303,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5069
5303
  validate = true
5070
5304
  }) {
5071
5305
  const fileContent = await readFileContent(
5072
- (0, import_node_path37.join)(
5306
+ (0, import_node_path38.join)(
5073
5307
  baseDir,
5074
5308
  this.getSettablePaths().relativeDirPath,
5075
5309
  this.getSettablePaths().relativeFilePath
@@ -5099,7 +5333,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5099
5333
  };
5100
5334
 
5101
5335
  // src/features/ignore/roo-ignore.ts
5102
- var import_node_path38 = require("path");
5336
+ var import_node_path39 = require("path");
5103
5337
  var RooIgnore = class _RooIgnore extends ToolIgnore {
5104
5338
  static getSettablePaths() {
5105
5339
  return {
@@ -5126,7 +5360,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
5126
5360
  validate = true
5127
5361
  }) {
5128
5362
  const fileContent = await readFileContent(
5129
- (0, import_node_path38.join)(
5363
+ (0, import_node_path39.join)(
5130
5364
  baseDir,
5131
5365
  this.getSettablePaths().relativeDirPath,
5132
5366
  this.getSettablePaths().relativeFilePath
@@ -5156,7 +5390,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
5156
5390
  };
5157
5391
 
5158
5392
  // src/features/ignore/windsurf-ignore.ts
5159
- var import_node_path39 = require("path");
5393
+ var import_node_path40 = require("path");
5160
5394
  var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5161
5395
  static getSettablePaths() {
5162
5396
  return {
@@ -5183,7 +5417,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5183
5417
  validate = true
5184
5418
  }) {
5185
5419
  const fileContent = await readFileContent(
5186
- (0, import_node_path39.join)(
5420
+ (0, import_node_path40.join)(
5187
5421
  baseDir,
5188
5422
  this.getSettablePaths().relativeDirPath,
5189
5423
  this.getSettablePaths().relativeFilePath
@@ -5213,7 +5447,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5213
5447
  };
5214
5448
 
5215
5449
  // src/features/ignore/zed-ignore.ts
5216
- var import_node_path40 = require("path");
5450
+ var import_node_path41 = require("path");
5217
5451
  var import_es_toolkit3 = require("es-toolkit");
5218
5452
  var ZedIgnore = class _ZedIgnore extends ToolIgnore {
5219
5453
  constructor(params) {
@@ -5250,7 +5484,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
5250
5484
  }) {
5251
5485
  const fileContent = rulesyncIgnore.getFileContent();
5252
5486
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
5253
- const filePath = (0, import_node_path40.join)(
5487
+ const filePath = (0, import_node_path41.join)(
5254
5488
  baseDir,
5255
5489
  this.getSettablePaths().relativeDirPath,
5256
5490
  this.getSettablePaths().relativeFilePath
@@ -5277,7 +5511,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
5277
5511
  validate = true
5278
5512
  }) {
5279
5513
  const fileContent = await readFileContent(
5280
- (0, import_node_path40.join)(
5514
+ (0, import_node_path41.join)(
5281
5515
  baseDir,
5282
5516
  this.getSettablePaths().relativeDirPath,
5283
5517
  this.getSettablePaths().relativeFilePath
@@ -5323,7 +5557,7 @@ var ignoreProcessorToolTargets = [
5323
5557
  "windsurf",
5324
5558
  "zed"
5325
5559
  ];
5326
- var IgnoreProcessorToolTargetSchema = import_mini17.z.enum(ignoreProcessorToolTargets);
5560
+ var IgnoreProcessorToolTargetSchema = import_mini18.z.enum(ignoreProcessorToolTargets);
5327
5561
  var toolIgnoreFactories = /* @__PURE__ */ new Map([
5328
5562
  ["augmentcode", { class: AugmentcodeIgnore }],
5329
5563
  ["claudecode", { class: ClaudecodeIgnore }],
@@ -5461,49 +5695,49 @@ var IgnoreProcessor = class extends FeatureProcessor {
5461
5695
  };
5462
5696
 
5463
5697
  // src/features/mcp/mcp-processor.ts
5464
- var import_mini21 = require("zod/mini");
5698
+ var import_mini22 = require("zod/mini");
5465
5699
 
5466
5700
  // src/features/mcp/claudecode-mcp.ts
5467
- var import_node_path42 = require("path");
5701
+ var import_node_path43 = require("path");
5468
5702
 
5469
5703
  // src/features/mcp/rulesync-mcp.ts
5470
- var import_node_path41 = require("path");
5704
+ var import_node_path42 = require("path");
5471
5705
  var import_object = require("es-toolkit/object");
5472
- var import_mini19 = require("zod/mini");
5706
+ var import_mini20 = require("zod/mini");
5473
5707
 
5474
5708
  // src/types/mcp.ts
5475
- var import_mini18 = require("zod/mini");
5476
- var McpServerSchema = import_mini18.z.object({
5477
- type: import_mini18.z.optional(import_mini18.z.enum(["stdio", "sse", "http"])),
5478
- command: import_mini18.z.optional(import_mini18.z.union([import_mini18.z.string(), import_mini18.z.array(import_mini18.z.string())])),
5479
- args: import_mini18.z.optional(import_mini18.z.array(import_mini18.z.string())),
5480
- url: import_mini18.z.optional(import_mini18.z.string()),
5481
- httpUrl: import_mini18.z.optional(import_mini18.z.string()),
5482
- env: import_mini18.z.optional(import_mini18.z.record(import_mini18.z.string(), import_mini18.z.string())),
5483
- disabled: import_mini18.z.optional(import_mini18.z.boolean()),
5484
- networkTimeout: import_mini18.z.optional(import_mini18.z.number()),
5485
- timeout: import_mini18.z.optional(import_mini18.z.number()),
5486
- trust: import_mini18.z.optional(import_mini18.z.boolean()),
5487
- cwd: import_mini18.z.optional(import_mini18.z.string()),
5488
- transport: import_mini18.z.optional(import_mini18.z.enum(["stdio", "sse", "http"])),
5489
- alwaysAllow: import_mini18.z.optional(import_mini18.z.array(import_mini18.z.string())),
5490
- tools: import_mini18.z.optional(import_mini18.z.array(import_mini18.z.string())),
5491
- kiroAutoApprove: import_mini18.z.optional(import_mini18.z.array(import_mini18.z.string())),
5492
- kiroAutoBlock: import_mini18.z.optional(import_mini18.z.array(import_mini18.z.string())),
5493
- headers: import_mini18.z.optional(import_mini18.z.record(import_mini18.z.string(), import_mini18.z.string())),
5494
- enabledTools: import_mini18.z.optional(import_mini18.z.array(import_mini18.z.string())),
5495
- disabledTools: import_mini18.z.optional(import_mini18.z.array(import_mini18.z.string()))
5709
+ var import_mini19 = require("zod/mini");
5710
+ var McpServerSchema = import_mini19.z.object({
5711
+ type: import_mini19.z.optional(import_mini19.z.enum(["stdio", "sse", "http"])),
5712
+ command: import_mini19.z.optional(import_mini19.z.union([import_mini19.z.string(), import_mini19.z.array(import_mini19.z.string())])),
5713
+ args: import_mini19.z.optional(import_mini19.z.array(import_mini19.z.string())),
5714
+ url: import_mini19.z.optional(import_mini19.z.string()),
5715
+ httpUrl: import_mini19.z.optional(import_mini19.z.string()),
5716
+ env: import_mini19.z.optional(import_mini19.z.record(import_mini19.z.string(), import_mini19.z.string())),
5717
+ disabled: import_mini19.z.optional(import_mini19.z.boolean()),
5718
+ networkTimeout: import_mini19.z.optional(import_mini19.z.number()),
5719
+ timeout: import_mini19.z.optional(import_mini19.z.number()),
5720
+ trust: import_mini19.z.optional(import_mini19.z.boolean()),
5721
+ cwd: import_mini19.z.optional(import_mini19.z.string()),
5722
+ transport: import_mini19.z.optional(import_mini19.z.enum(["stdio", "sse", "http"])),
5723
+ alwaysAllow: import_mini19.z.optional(import_mini19.z.array(import_mini19.z.string())),
5724
+ tools: import_mini19.z.optional(import_mini19.z.array(import_mini19.z.string())),
5725
+ kiroAutoApprove: import_mini19.z.optional(import_mini19.z.array(import_mini19.z.string())),
5726
+ kiroAutoBlock: import_mini19.z.optional(import_mini19.z.array(import_mini19.z.string())),
5727
+ headers: import_mini19.z.optional(import_mini19.z.record(import_mini19.z.string(), import_mini19.z.string())),
5728
+ enabledTools: import_mini19.z.optional(import_mini19.z.array(import_mini19.z.string())),
5729
+ disabledTools: import_mini19.z.optional(import_mini19.z.array(import_mini19.z.string()))
5496
5730
  });
5497
- var McpServersSchema = import_mini18.z.record(import_mini18.z.string(), McpServerSchema);
5731
+ var McpServersSchema = import_mini19.z.record(import_mini19.z.string(), McpServerSchema);
5498
5732
 
5499
5733
  // src/features/mcp/rulesync-mcp.ts
5500
- var RulesyncMcpServerSchema = import_mini19.z.extend(McpServerSchema, {
5501
- targets: import_mini19.z.optional(RulesyncTargetsSchema),
5502
- description: import_mini19.z.optional(import_mini19.z.string()),
5503
- exposed: import_mini19.z.optional(import_mini19.z.boolean())
5734
+ var RulesyncMcpServerSchema = import_mini20.z.extend(McpServerSchema, {
5735
+ targets: import_mini20.z.optional(RulesyncTargetsSchema),
5736
+ description: import_mini20.z.optional(import_mini20.z.string()),
5737
+ exposed: import_mini20.z.optional(import_mini20.z.boolean())
5504
5738
  });
5505
- var RulesyncMcpConfigSchema = import_mini19.z.object({
5506
- mcpServers: import_mini19.z.record(import_mini19.z.string(), RulesyncMcpServerSchema)
5739
+ var RulesyncMcpConfigSchema = import_mini20.z.object({
5740
+ mcpServers: import_mini20.z.record(import_mini20.z.string(), RulesyncMcpServerSchema)
5507
5741
  });
5508
5742
  var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
5509
5743
  json;
@@ -5539,12 +5773,12 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
5539
5773
  static async fromFile({ validate = true }) {
5540
5774
  const baseDir = process.cwd();
5541
5775
  const paths = this.getSettablePaths();
5542
- const recommendedPath = (0, import_node_path41.join)(
5776
+ const recommendedPath = (0, import_node_path42.join)(
5543
5777
  baseDir,
5544
5778
  paths.recommended.relativeDirPath,
5545
5779
  paths.recommended.relativeFilePath
5546
5780
  );
5547
- const legacyPath = (0, import_node_path41.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5781
+ const legacyPath = (0, import_node_path42.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5548
5782
  if (await fileExists(recommendedPath)) {
5549
5783
  const fileContent2 = await readFileContent(recommendedPath);
5550
5784
  return new _RulesyncMcp({
@@ -5689,7 +5923,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
5689
5923
  global = false
5690
5924
  }) {
5691
5925
  const paths = this.getSettablePaths({ global });
5692
- const fileContent = await readFileContentOrNull((0, import_node_path42.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
5926
+ const fileContent = await readFileContentOrNull((0, import_node_path43.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
5693
5927
  const json = JSON.parse(fileContent);
5694
5928
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
5695
5929
  return new _ClaudecodeMcp({
@@ -5708,7 +5942,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
5708
5942
  }) {
5709
5943
  const paths = this.getSettablePaths({ global });
5710
5944
  const fileContent = await readOrInitializeFileContent(
5711
- (0, import_node_path42.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5945
+ (0, import_node_path43.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5712
5946
  JSON.stringify({ mcpServers: {} }, null, 2)
5713
5947
  );
5714
5948
  const json = JSON.parse(fileContent);
@@ -5747,7 +5981,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
5747
5981
  };
5748
5982
 
5749
5983
  // src/features/mcp/cline-mcp.ts
5750
- var import_node_path43 = require("path");
5984
+ var import_node_path44 = require("path");
5751
5985
  var ClineMcp = class _ClineMcp extends ToolMcp {
5752
5986
  json;
5753
5987
  constructor(params) {
@@ -5768,7 +6002,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
5768
6002
  validate = true
5769
6003
  }) {
5770
6004
  const fileContent = await readFileContent(
5771
- (0, import_node_path43.join)(
6005
+ (0, import_node_path44.join)(
5772
6006
  baseDir,
5773
6007
  this.getSettablePaths().relativeDirPath,
5774
6008
  this.getSettablePaths().relativeFilePath
@@ -5817,7 +6051,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
5817
6051
  };
5818
6052
 
5819
6053
  // src/features/mcp/codexcli-mcp.ts
5820
- var import_node_path44 = require("path");
6054
+ var import_node_path45 = require("path");
5821
6055
  var smolToml = __toESM(require("smol-toml"), 1);
5822
6056
  function convertFromCodexFormat(codexMcp) {
5823
6057
  const result = {};
@@ -5900,7 +6134,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
5900
6134
  global = false
5901
6135
  }) {
5902
6136
  const paths = this.getSettablePaths({ global });
5903
- const fileContent = await readFileContentOrNull((0, import_node_path44.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml.stringify({});
6137
+ const fileContent = await readFileContentOrNull((0, import_node_path45.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml.stringify({});
5904
6138
  return new _CodexcliMcp({
5905
6139
  baseDir,
5906
6140
  relativeDirPath: paths.relativeDirPath,
@@ -5916,7 +6150,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
5916
6150
  global = false
5917
6151
  }) {
5918
6152
  const paths = this.getSettablePaths({ global });
5919
- const configTomlFilePath = (0, import_node_path44.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6153
+ const configTomlFilePath = (0, import_node_path45.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
5920
6154
  const configTomlFileContent = await readOrInitializeFileContent(
5921
6155
  configTomlFilePath,
5922
6156
  smolToml.stringify({})
@@ -5973,7 +6207,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
5973
6207
  };
5974
6208
 
5975
6209
  // src/features/mcp/copilot-mcp.ts
5976
- var import_node_path45 = require("path");
6210
+ var import_node_path46 = require("path");
5977
6211
  function convertToCopilotFormat(mcpServers) {
5978
6212
  return { servers: mcpServers };
5979
6213
  }
@@ -6000,7 +6234,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
6000
6234
  validate = true
6001
6235
  }) {
6002
6236
  const fileContent = await readFileContent(
6003
- (0, import_node_path45.join)(
6237
+ (0, import_node_path46.join)(
6004
6238
  baseDir,
6005
6239
  this.getSettablePaths().relativeDirPath,
6006
6240
  this.getSettablePaths().relativeFilePath
@@ -6053,7 +6287,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
6053
6287
  };
6054
6288
 
6055
6289
  // src/features/mcp/cursor-mcp.ts
6056
- var import_node_path46 = require("path");
6290
+ var import_node_path47 = require("path");
6057
6291
  var CURSOR_ENV_VAR_PATTERN = /\$\{env:([^}]+)\}/g;
6058
6292
  function isMcpServers(value) {
6059
6293
  return value !== void 0 && value !== null && typeof value === "object";
@@ -6114,7 +6348,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6114
6348
  validate = true
6115
6349
  }) {
6116
6350
  const fileContent = await readFileContent(
6117
- (0, import_node_path46.join)(
6351
+ (0, import_node_path47.join)(
6118
6352
  baseDir,
6119
6353
  this.getSettablePaths().relativeDirPath,
6120
6354
  this.getSettablePaths().relativeFilePath
@@ -6182,7 +6416,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6182
6416
  };
6183
6417
 
6184
6418
  // src/features/mcp/factorydroid-mcp.ts
6185
- var import_node_path47 = require("path");
6419
+ var import_node_path48 = require("path");
6186
6420
  var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
6187
6421
  json;
6188
6422
  constructor(params) {
@@ -6203,7 +6437,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
6203
6437
  validate = true
6204
6438
  }) {
6205
6439
  const fileContent = await readFileContent(
6206
- (0, import_node_path47.join)(
6440
+ (0, import_node_path48.join)(
6207
6441
  baseDir,
6208
6442
  this.getSettablePaths().relativeDirPath,
6209
6443
  this.getSettablePaths().relativeFilePath
@@ -6263,7 +6497,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
6263
6497
  };
6264
6498
 
6265
6499
  // src/features/mcp/geminicli-mcp.ts
6266
- var import_node_path48 = require("path");
6500
+ var import_node_path49 = require("path");
6267
6501
  var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6268
6502
  json;
6269
6503
  constructor(params) {
@@ -6291,7 +6525,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6291
6525
  global = false
6292
6526
  }) {
6293
6527
  const paths = this.getSettablePaths({ global });
6294
- const fileContent = await readFileContentOrNull((0, import_node_path48.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6528
+ const fileContent = await readFileContentOrNull((0, import_node_path49.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6295
6529
  const json = JSON.parse(fileContent);
6296
6530
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
6297
6531
  return new _GeminiCliMcp({
@@ -6310,7 +6544,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6310
6544
  }) {
6311
6545
  const paths = this.getSettablePaths({ global });
6312
6546
  const fileContent = await readOrInitializeFileContent(
6313
- (0, import_node_path48.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6547
+ (0, import_node_path49.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6314
6548
  JSON.stringify({ mcpServers: {} }, null, 2)
6315
6549
  );
6316
6550
  const json = JSON.parse(fileContent);
@@ -6355,7 +6589,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6355
6589
  };
6356
6590
 
6357
6591
  // src/features/mcp/junie-mcp.ts
6358
- var import_node_path49 = require("path");
6592
+ var import_node_path50 = require("path");
6359
6593
  var JunieMcp = class _JunieMcp extends ToolMcp {
6360
6594
  json;
6361
6595
  constructor(params) {
@@ -6367,7 +6601,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6367
6601
  }
6368
6602
  static getSettablePaths() {
6369
6603
  return {
6370
- relativeDirPath: (0, import_node_path49.join)(".junie", "mcp"),
6604
+ relativeDirPath: (0, import_node_path50.join)(".junie", "mcp"),
6371
6605
  relativeFilePath: "mcp.json"
6372
6606
  };
6373
6607
  }
@@ -6376,7 +6610,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6376
6610
  validate = true
6377
6611
  }) {
6378
6612
  const fileContent = await readFileContent(
6379
- (0, import_node_path49.join)(
6613
+ (0, import_node_path50.join)(
6380
6614
  baseDir,
6381
6615
  this.getSettablePaths().relativeDirPath,
6382
6616
  this.getSettablePaths().relativeFilePath
@@ -6425,7 +6659,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6425
6659
  };
6426
6660
 
6427
6661
  // src/features/mcp/kilo-mcp.ts
6428
- var import_node_path50 = require("path");
6662
+ var import_node_path51 = require("path");
6429
6663
  var KiloMcp = class _KiloMcp extends ToolMcp {
6430
6664
  json;
6431
6665
  constructor(params) {
@@ -6446,7 +6680,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
6446
6680
  validate = true
6447
6681
  }) {
6448
6682
  const paths = this.getSettablePaths();
6449
- const fileContent = await readFileContentOrNull((0, import_node_path50.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6683
+ const fileContent = await readFileContentOrNull((0, import_node_path51.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6450
6684
  return new _KiloMcp({
6451
6685
  baseDir,
6452
6686
  relativeDirPath: paths.relativeDirPath,
@@ -6494,7 +6728,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
6494
6728
  };
6495
6729
 
6496
6730
  // src/features/mcp/kiro-mcp.ts
6497
- var import_node_path51 = require("path");
6731
+ var import_node_path52 = require("path");
6498
6732
  var KiroMcp = class _KiroMcp extends ToolMcp {
6499
6733
  json;
6500
6734
  constructor(params) {
@@ -6506,7 +6740,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
6506
6740
  }
6507
6741
  static getSettablePaths() {
6508
6742
  return {
6509
- relativeDirPath: (0, import_node_path51.join)(".kiro", "settings"),
6743
+ relativeDirPath: (0, import_node_path52.join)(".kiro", "settings"),
6510
6744
  relativeFilePath: "mcp.json"
6511
6745
  };
6512
6746
  }
@@ -6515,7 +6749,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
6515
6749
  validate = true
6516
6750
  }) {
6517
6751
  const paths = this.getSettablePaths();
6518
- const fileContent = await readFileContentOrNull((0, import_node_path51.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6752
+ const fileContent = await readFileContentOrNull((0, import_node_path52.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6519
6753
  return new _KiroMcp({
6520
6754
  baseDir,
6521
6755
  relativeDirPath: paths.relativeDirPath,
@@ -6563,30 +6797,30 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
6563
6797
  };
6564
6798
 
6565
6799
  // src/features/mcp/opencode-mcp.ts
6566
- var import_node_path52 = require("path");
6800
+ var import_node_path53 = require("path");
6567
6801
  var import_jsonc_parser2 = require("jsonc-parser");
6568
- var import_mini20 = require("zod/mini");
6569
- var OpencodeMcpLocalServerSchema = import_mini20.z.object({
6570
- type: import_mini20.z.literal("local"),
6571
- command: import_mini20.z.array(import_mini20.z.string()),
6572
- environment: import_mini20.z.optional(import_mini20.z.record(import_mini20.z.string(), import_mini20.z.string())),
6573
- enabled: import_mini20.z._default(import_mini20.z.boolean(), true),
6574
- cwd: import_mini20.z.optional(import_mini20.z.string())
6802
+ var import_mini21 = require("zod/mini");
6803
+ var OpencodeMcpLocalServerSchema = import_mini21.z.object({
6804
+ type: import_mini21.z.literal("local"),
6805
+ command: import_mini21.z.array(import_mini21.z.string()),
6806
+ environment: import_mini21.z.optional(import_mini21.z.record(import_mini21.z.string(), import_mini21.z.string())),
6807
+ enabled: import_mini21.z._default(import_mini21.z.boolean(), true),
6808
+ cwd: import_mini21.z.optional(import_mini21.z.string())
6575
6809
  });
6576
- var OpencodeMcpRemoteServerSchema = import_mini20.z.object({
6577
- type: import_mini20.z.literal("remote"),
6578
- url: import_mini20.z.string(),
6579
- headers: import_mini20.z.optional(import_mini20.z.record(import_mini20.z.string(), import_mini20.z.string())),
6580
- enabled: import_mini20.z._default(import_mini20.z.boolean(), true)
6810
+ var OpencodeMcpRemoteServerSchema = import_mini21.z.object({
6811
+ type: import_mini21.z.literal("remote"),
6812
+ url: import_mini21.z.string(),
6813
+ headers: import_mini21.z.optional(import_mini21.z.record(import_mini21.z.string(), import_mini21.z.string())),
6814
+ enabled: import_mini21.z._default(import_mini21.z.boolean(), true)
6581
6815
  });
6582
- var OpencodeMcpServerSchema = import_mini20.z.union([
6816
+ var OpencodeMcpServerSchema = import_mini21.z.union([
6583
6817
  OpencodeMcpLocalServerSchema,
6584
6818
  OpencodeMcpRemoteServerSchema
6585
6819
  ]);
6586
- var OpencodeConfigSchema = import_mini20.z.looseObject({
6587
- $schema: import_mini20.z.optional(import_mini20.z.string()),
6588
- mcp: import_mini20.z.optional(import_mini20.z.record(import_mini20.z.string(), OpencodeMcpServerSchema)),
6589
- tools: import_mini20.z.optional(import_mini20.z.record(import_mini20.z.string(), import_mini20.z.boolean()))
6820
+ var OpencodeConfigSchema = import_mini21.z.looseObject({
6821
+ $schema: import_mini21.z.optional(import_mini21.z.string()),
6822
+ mcp: import_mini21.z.optional(import_mini21.z.record(import_mini21.z.string(), OpencodeMcpServerSchema)),
6823
+ tools: import_mini21.z.optional(import_mini21.z.record(import_mini21.z.string(), import_mini21.z.boolean()))
6590
6824
  });
6591
6825
  function convertFromOpencodeFormat(opencodeMcp, tools) {
6592
6826
  return Object.fromEntries(
@@ -6704,7 +6938,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6704
6938
  static getSettablePaths({ global } = {}) {
6705
6939
  if (global) {
6706
6940
  return {
6707
- relativeDirPath: (0, import_node_path52.join)(".config", "opencode"),
6941
+ relativeDirPath: (0, import_node_path53.join)(".config", "opencode"),
6708
6942
  relativeFilePath: "opencode.json"
6709
6943
  };
6710
6944
  }
@@ -6719,11 +6953,11 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6719
6953
  global = false
6720
6954
  }) {
6721
6955
  const basePaths = this.getSettablePaths({ global });
6722
- const jsonDir = (0, import_node_path52.join)(baseDir, basePaths.relativeDirPath);
6956
+ const jsonDir = (0, import_node_path53.join)(baseDir, basePaths.relativeDirPath);
6723
6957
  let fileContent = null;
6724
6958
  let relativeFilePath = "opencode.jsonc";
6725
- const jsoncPath = (0, import_node_path52.join)(jsonDir, "opencode.jsonc");
6726
- const jsonPath = (0, import_node_path52.join)(jsonDir, "opencode.json");
6959
+ const jsoncPath = (0, import_node_path53.join)(jsonDir, "opencode.jsonc");
6960
+ const jsonPath = (0, import_node_path53.join)(jsonDir, "opencode.json");
6727
6961
  fileContent = await readFileContentOrNull(jsoncPath);
6728
6962
  if (!fileContent) {
6729
6963
  fileContent = await readFileContentOrNull(jsonPath);
@@ -6749,11 +6983,11 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6749
6983
  global = false
6750
6984
  }) {
6751
6985
  const basePaths = this.getSettablePaths({ global });
6752
- const jsonDir = (0, import_node_path52.join)(baseDir, basePaths.relativeDirPath);
6986
+ const jsonDir = (0, import_node_path53.join)(baseDir, basePaths.relativeDirPath);
6753
6987
  let fileContent = null;
6754
6988
  let relativeFilePath = "opencode.jsonc";
6755
- const jsoncPath = (0, import_node_path52.join)(jsonDir, "opencode.jsonc");
6756
- const jsonPath = (0, import_node_path52.join)(jsonDir, "opencode.json");
6989
+ const jsoncPath = (0, import_node_path53.join)(jsonDir, "opencode.jsonc");
6990
+ const jsonPath = (0, import_node_path53.join)(jsonDir, "opencode.json");
6757
6991
  fileContent = await readFileContentOrNull(jsoncPath);
6758
6992
  if (!fileContent) {
6759
6993
  fileContent = await readFileContentOrNull(jsonPath);
@@ -6814,7 +7048,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6814
7048
  };
6815
7049
 
6816
7050
  // src/features/mcp/roo-mcp.ts
6817
- var import_node_path53 = require("path");
7051
+ var import_node_path54 = require("path");
6818
7052
  function isRooMcpServers(value) {
6819
7053
  return value !== void 0 && value !== null && typeof value === "object";
6820
7054
  }
@@ -6866,7 +7100,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
6866
7100
  validate = true
6867
7101
  }) {
6868
7102
  const fileContent = await readFileContent(
6869
- (0, import_node_path53.join)(
7103
+ (0, import_node_path54.join)(
6870
7104
  baseDir,
6871
7105
  this.getSettablePaths().relativeDirPath,
6872
7106
  this.getSettablePaths().relativeFilePath
@@ -6937,7 +7171,7 @@ var mcpProcessorToolTargetTuple = [
6937
7171
  "opencode",
6938
7172
  "roo"
6939
7173
  ];
6940
- var McpProcessorToolTargetSchema = import_mini21.z.enum(mcpProcessorToolTargetTuple);
7174
+ var McpProcessorToolTargetSchema = import_mini22.z.enum(mcpProcessorToolTargetTuple);
6941
7175
  var toolMcpFactories = /* @__PURE__ */ new Map([
6942
7176
  [
6943
7177
  "claudecode",
@@ -7239,25 +7473,25 @@ var McpProcessor = class extends FeatureProcessor {
7239
7473
  };
7240
7474
 
7241
7475
  // src/features/rules/rules-processor.ts
7242
- var import_node_path113 = require("path");
7476
+ var import_node_path114 = require("path");
7243
7477
  var import_toon = require("@toon-format/toon");
7244
- var import_mini53 = require("zod/mini");
7478
+ var import_mini54 = require("zod/mini");
7245
7479
 
7246
7480
  // src/constants/general.ts
7247
7481
  var SKILL_FILE_NAME = "SKILL.md";
7248
7482
 
7249
7483
  // src/features/skills/agentsmd-skill.ts
7250
- var import_node_path57 = require("path");
7484
+ var import_node_path58 = require("path");
7251
7485
 
7252
7486
  // src/features/skills/simulated-skill.ts
7253
- var import_node_path56 = require("path");
7254
- var import_mini22 = require("zod/mini");
7487
+ var import_node_path57 = require("path");
7488
+ var import_mini23 = require("zod/mini");
7255
7489
 
7256
7490
  // src/features/skills/tool-skill.ts
7257
- var import_node_path55 = require("path");
7491
+ var import_node_path56 = require("path");
7258
7492
 
7259
7493
  // src/types/ai-dir.ts
7260
- var import_node_path54 = __toESM(require("path"), 1);
7494
+ var import_node_path55 = __toESM(require("path"), 1);
7261
7495
  var AiDir = class {
7262
7496
  /**
7263
7497
  * @example "."
@@ -7291,7 +7525,7 @@ var AiDir = class {
7291
7525
  otherFiles = [],
7292
7526
  global = false
7293
7527
  }) {
7294
- if (dirName.includes(import_node_path54.default.sep) || dirName.includes("/") || dirName.includes("\\")) {
7528
+ if (dirName.includes(import_node_path55.default.sep) || dirName.includes("/") || dirName.includes("\\")) {
7295
7529
  throw new Error(`Directory name cannot contain path separators: dirName="${dirName}"`);
7296
7530
  }
7297
7531
  this.baseDir = baseDir;
@@ -7314,11 +7548,11 @@ var AiDir = class {
7314
7548
  return this.dirName;
7315
7549
  }
7316
7550
  getDirPath() {
7317
- const fullPath = import_node_path54.default.join(this.baseDir, this.relativeDirPath, this.dirName);
7318
- const resolvedFull = (0, import_node_path54.resolve)(fullPath);
7319
- const resolvedBase = (0, import_node_path54.resolve)(this.baseDir);
7320
- const rel = (0, import_node_path54.relative)(resolvedBase, resolvedFull);
7321
- if (rel.startsWith("..") || import_node_path54.default.isAbsolute(rel)) {
7551
+ const fullPath = import_node_path55.default.join(this.baseDir, this.relativeDirPath, this.dirName);
7552
+ const resolvedFull = (0, import_node_path55.resolve)(fullPath);
7553
+ const resolvedBase = (0, import_node_path55.resolve)(this.baseDir);
7554
+ const rel = (0, import_node_path55.relative)(resolvedBase, resolvedFull);
7555
+ if (rel.startsWith("..") || import_node_path55.default.isAbsolute(rel)) {
7322
7556
  throw new Error(
7323
7557
  `Path traversal detected: Final path escapes baseDir. baseDir="${this.baseDir}", relativeDirPath="${this.relativeDirPath}", dirName="${this.dirName}"`
7324
7558
  );
@@ -7332,7 +7566,7 @@ var AiDir = class {
7332
7566
  return this.otherFiles;
7333
7567
  }
7334
7568
  getRelativePathFromCwd() {
7335
- return import_node_path54.default.join(this.relativeDirPath, this.dirName);
7569
+ return import_node_path55.default.join(this.relativeDirPath, this.dirName);
7336
7570
  }
7337
7571
  getGlobal() {
7338
7572
  return this.global;
@@ -7351,15 +7585,15 @@ var AiDir = class {
7351
7585
  * @returns Array of files with their relative paths and buffers
7352
7586
  */
7353
7587
  static async collectOtherFiles(baseDir, relativeDirPath, dirName, excludeFileName) {
7354
- const dirPath = (0, import_node_path54.join)(baseDir, relativeDirPath, dirName);
7355
- const glob = (0, import_node_path54.join)(dirPath, "**", "*");
7588
+ const dirPath = (0, import_node_path55.join)(baseDir, relativeDirPath, dirName);
7589
+ const glob = (0, import_node_path55.join)(dirPath, "**", "*");
7356
7590
  const filePaths = await findFilesByGlobs(glob, { type: "file" });
7357
- const filteredPaths = filePaths.filter((filePath) => (0, import_node_path54.basename)(filePath) !== excludeFileName);
7591
+ const filteredPaths = filePaths.filter((filePath) => (0, import_node_path55.basename)(filePath) !== excludeFileName);
7358
7592
  const files = await Promise.all(
7359
7593
  filteredPaths.map(async (filePath) => {
7360
7594
  const fileBuffer = await readFileBuffer(filePath);
7361
7595
  return {
7362
- relativeFilePathToDirPath: (0, import_node_path54.relative)(dirPath, filePath),
7596
+ relativeFilePathToDirPath: (0, import_node_path55.relative)(dirPath, filePath),
7363
7597
  fileBuffer
7364
7598
  };
7365
7599
  })
@@ -7450,8 +7684,8 @@ var ToolSkill = class extends AiDir {
7450
7684
  }) {
7451
7685
  const settablePaths = getSettablePaths({ global });
7452
7686
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
7453
- const skillDirPath = (0, import_node_path55.join)(baseDir, actualRelativeDirPath, dirName);
7454
- const skillFilePath = (0, import_node_path55.join)(skillDirPath, SKILL_FILE_NAME);
7687
+ const skillDirPath = (0, import_node_path56.join)(baseDir, actualRelativeDirPath, dirName);
7688
+ const skillFilePath = (0, import_node_path56.join)(skillDirPath, SKILL_FILE_NAME);
7455
7689
  if (!await fileExists(skillFilePath)) {
7456
7690
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
7457
7691
  }
@@ -7475,16 +7709,16 @@ var ToolSkill = class extends AiDir {
7475
7709
  }
7476
7710
  requireMainFileFrontmatter() {
7477
7711
  if (!this.mainFile?.frontmatter) {
7478
- throw new Error(`Frontmatter is not defined in ${(0, import_node_path55.join)(this.relativeDirPath, this.dirName)}`);
7712
+ throw new Error(`Frontmatter is not defined in ${(0, import_node_path56.join)(this.relativeDirPath, this.dirName)}`);
7479
7713
  }
7480
7714
  return this.mainFile.frontmatter;
7481
7715
  }
7482
7716
  };
7483
7717
 
7484
7718
  // src/features/skills/simulated-skill.ts
7485
- var SimulatedSkillFrontmatterSchema = import_mini22.z.looseObject({
7486
- name: import_mini22.z.string(),
7487
- description: import_mini22.z.string()
7719
+ var SimulatedSkillFrontmatterSchema = import_mini23.z.looseObject({
7720
+ name: import_mini23.z.string(),
7721
+ description: import_mini23.z.string()
7488
7722
  });
7489
7723
  var SimulatedSkill = class extends ToolSkill {
7490
7724
  frontmatter;
@@ -7515,7 +7749,7 @@ var SimulatedSkill = class extends ToolSkill {
7515
7749
  const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
7516
7750
  if (!result.success) {
7517
7751
  throw new Error(
7518
- `Invalid frontmatter in ${(0, import_node_path56.join)(relativeDirPath, dirName)}: ${formatError(result.error)}`
7752
+ `Invalid frontmatter in ${(0, import_node_path57.join)(relativeDirPath, dirName)}: ${formatError(result.error)}`
7519
7753
  );
7520
7754
  }
7521
7755
  }
@@ -7573,8 +7807,8 @@ var SimulatedSkill = class extends ToolSkill {
7573
7807
  }) {
7574
7808
  const settablePaths = this.getSettablePaths();
7575
7809
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
7576
- const skillDirPath = (0, import_node_path56.join)(baseDir, actualRelativeDirPath, dirName);
7577
- const skillFilePath = (0, import_node_path56.join)(skillDirPath, SKILL_FILE_NAME);
7810
+ const skillDirPath = (0, import_node_path57.join)(baseDir, actualRelativeDirPath, dirName);
7811
+ const skillFilePath = (0, import_node_path57.join)(skillDirPath, SKILL_FILE_NAME);
7578
7812
  if (!await fileExists(skillFilePath)) {
7579
7813
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
7580
7814
  }
@@ -7651,7 +7885,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
7651
7885
  throw new Error("AgentsmdSkill does not support global mode.");
7652
7886
  }
7653
7887
  return {
7654
- relativeDirPath: (0, import_node_path57.join)(".agents", "skills")
7888
+ relativeDirPath: (0, import_node_path58.join)(".agents", "skills")
7655
7889
  };
7656
7890
  }
7657
7891
  static async fromDir(params) {
@@ -7678,11 +7912,11 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
7678
7912
  };
7679
7913
 
7680
7914
  // src/features/skills/factorydroid-skill.ts
7681
- var import_node_path58 = require("path");
7915
+ var import_node_path59 = require("path");
7682
7916
  var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
7683
7917
  static getSettablePaths(_options) {
7684
7918
  return {
7685
- relativeDirPath: (0, import_node_path58.join)(".factory", "skills")
7919
+ relativeDirPath: (0, import_node_path59.join)(".factory", "skills")
7686
7920
  };
7687
7921
  }
7688
7922
  static async fromDir(params) {
@@ -7709,11 +7943,11 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
7709
7943
  };
7710
7944
 
7711
7945
  // src/features/skills/skills-processor.ts
7712
- var import_node_path75 = require("path");
7713
- var import_mini37 = require("zod/mini");
7946
+ var import_node_path76 = require("path");
7947
+ var import_mini38 = require("zod/mini");
7714
7948
 
7715
7949
  // src/types/dir-feature-processor.ts
7716
- var import_node_path59 = require("path");
7950
+ var import_node_path60 = require("path");
7717
7951
  var DirFeatureProcessor = class {
7718
7952
  baseDir;
7719
7953
  dryRun;
@@ -7744,7 +7978,7 @@ var DirFeatureProcessor = class {
7744
7978
  const mainFile = aiDir.getMainFile();
7745
7979
  let mainFileContent;
7746
7980
  if (mainFile) {
7747
- const mainFilePath = (0, import_node_path59.join)(dirPath, mainFile.name);
7981
+ const mainFilePath = (0, import_node_path60.join)(dirPath, mainFile.name);
7748
7982
  const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter);
7749
7983
  mainFileContent = addTrailingNewline(content);
7750
7984
  const existingContent = await readFileContentOrNull(mainFilePath);
@@ -7758,7 +7992,7 @@ var DirFeatureProcessor = class {
7758
7992
  const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
7759
7993
  otherFileContents.push(contentWithNewline);
7760
7994
  if (!dirHasChanges) {
7761
- const filePath = (0, import_node_path59.join)(dirPath, file.relativeFilePathToDirPath);
7995
+ const filePath = (0, import_node_path60.join)(dirPath, file.relativeFilePathToDirPath);
7762
7996
  const existingContent = await readFileContentOrNull(filePath);
7763
7997
  if (existingContent !== contentWithNewline) {
7764
7998
  dirHasChanges = true;
@@ -7772,22 +8006,22 @@ var DirFeatureProcessor = class {
7772
8006
  if (this.dryRun) {
7773
8007
  logger.info(`[DRY RUN] Would create directory: ${dirPath}`);
7774
8008
  if (mainFile) {
7775
- logger.info(`[DRY RUN] Would write: ${(0, import_node_path59.join)(dirPath, mainFile.name)}`);
7776
- changedPaths.push((0, import_node_path59.join)(relativeDir, mainFile.name));
8009
+ logger.info(`[DRY RUN] Would write: ${(0, import_node_path60.join)(dirPath, mainFile.name)}`);
8010
+ changedPaths.push((0, import_node_path60.join)(relativeDir, mainFile.name));
7777
8011
  }
7778
8012
  for (const file of otherFiles) {
7779
- logger.info(`[DRY RUN] Would write: ${(0, import_node_path59.join)(dirPath, file.relativeFilePathToDirPath)}`);
7780
- changedPaths.push((0, import_node_path59.join)(relativeDir, file.relativeFilePathToDirPath));
8013
+ logger.info(`[DRY RUN] Would write: ${(0, import_node_path60.join)(dirPath, file.relativeFilePathToDirPath)}`);
8014
+ changedPaths.push((0, import_node_path60.join)(relativeDir, file.relativeFilePathToDirPath));
7781
8015
  }
7782
8016
  } else {
7783
8017
  await ensureDir(dirPath);
7784
8018
  if (mainFile && mainFileContent) {
7785
- const mainFilePath = (0, import_node_path59.join)(dirPath, mainFile.name);
8019
+ const mainFilePath = (0, import_node_path60.join)(dirPath, mainFile.name);
7786
8020
  await writeFileContent(mainFilePath, mainFileContent);
7787
- changedPaths.push((0, import_node_path59.join)(relativeDir, mainFile.name));
8021
+ changedPaths.push((0, import_node_path60.join)(relativeDir, mainFile.name));
7788
8022
  }
7789
8023
  for (const [i, file] of otherFiles.entries()) {
7790
- const filePath = (0, import_node_path59.join)(dirPath, file.relativeFilePathToDirPath);
8024
+ const filePath = (0, import_node_path60.join)(dirPath, file.relativeFilePathToDirPath);
7791
8025
  const content = otherFileContents[i];
7792
8026
  if (content === void 0) {
7793
8027
  throw new Error(
@@ -7795,7 +8029,7 @@ var DirFeatureProcessor = class {
7795
8029
  );
7796
8030
  }
7797
8031
  await writeFileContent(filePath, content);
7798
- changedPaths.push((0, import_node_path59.join)(relativeDir, file.relativeFilePathToDirPath));
8032
+ changedPaths.push((0, import_node_path60.join)(relativeDir, file.relativeFilePathToDirPath));
7799
8033
  }
7800
8034
  }
7801
8035
  changedCount++;
@@ -7827,38 +8061,38 @@ var DirFeatureProcessor = class {
7827
8061
  };
7828
8062
 
7829
8063
  // src/features/skills/agentsskills-skill.ts
7830
- var import_node_path61 = require("path");
7831
- var import_mini24 = require("zod/mini");
8064
+ var import_node_path62 = require("path");
8065
+ var import_mini25 = require("zod/mini");
7832
8066
 
7833
8067
  // src/features/skills/rulesync-skill.ts
7834
- var import_node_path60 = require("path");
7835
- var import_mini23 = require("zod/mini");
7836
- var RulesyncSkillFrontmatterSchemaInternal = import_mini23.z.looseObject({
7837
- name: import_mini23.z.string(),
7838
- description: import_mini23.z.string(),
7839
- targets: import_mini23.z._default(RulesyncTargetsSchema, ["*"]),
7840
- claudecode: import_mini23.z.optional(
7841
- import_mini23.z.looseObject({
7842
- "allowed-tools": import_mini23.z.optional(import_mini23.z.array(import_mini23.z.string()))
8068
+ var import_node_path61 = require("path");
8069
+ var import_mini24 = require("zod/mini");
8070
+ var RulesyncSkillFrontmatterSchemaInternal = import_mini24.z.looseObject({
8071
+ name: import_mini24.z.string(),
8072
+ description: import_mini24.z.string(),
8073
+ targets: import_mini24.z._default(RulesyncTargetsSchema, ["*"]),
8074
+ claudecode: import_mini24.z.optional(
8075
+ import_mini24.z.looseObject({
8076
+ "allowed-tools": import_mini24.z.optional(import_mini24.z.array(import_mini24.z.string()))
7843
8077
  })
7844
8078
  ),
7845
- codexcli: import_mini23.z.optional(
7846
- import_mini23.z.looseObject({
7847
- "short-description": import_mini23.z.optional(import_mini23.z.string())
8079
+ codexcli: import_mini24.z.optional(
8080
+ import_mini24.z.looseObject({
8081
+ "short-description": import_mini24.z.optional(import_mini24.z.string())
7848
8082
  })
7849
8083
  ),
7850
- opencode: import_mini23.z.optional(
7851
- import_mini23.z.looseObject({
7852
- "allowed-tools": import_mini23.z.optional(import_mini23.z.array(import_mini23.z.string()))
8084
+ opencode: import_mini24.z.optional(
8085
+ import_mini24.z.looseObject({
8086
+ "allowed-tools": import_mini24.z.optional(import_mini24.z.array(import_mini24.z.string()))
7853
8087
  })
7854
8088
  ),
7855
- copilot: import_mini23.z.optional(
7856
- import_mini23.z.looseObject({
7857
- license: import_mini23.z.optional(import_mini23.z.string())
8089
+ copilot: import_mini24.z.optional(
8090
+ import_mini24.z.looseObject({
8091
+ license: import_mini24.z.optional(import_mini24.z.string())
7858
8092
  })
7859
8093
  ),
7860
- cline: import_mini23.z.optional(import_mini23.z.looseObject({})),
7861
- roo: import_mini23.z.optional(import_mini23.z.looseObject({}))
8094
+ cline: import_mini24.z.optional(import_mini24.z.looseObject({})),
8095
+ roo: import_mini24.z.optional(import_mini24.z.looseObject({}))
7862
8096
  });
7863
8097
  var RulesyncSkillFrontmatterSchema = RulesyncSkillFrontmatterSchemaInternal;
7864
8098
  var RulesyncSkill = class _RulesyncSkill extends AiDir {
@@ -7898,7 +8132,7 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
7898
8132
  }
7899
8133
  getFrontmatter() {
7900
8134
  if (!this.mainFile?.frontmatter) {
7901
- throw new Error(`Frontmatter is not defined in ${(0, import_node_path60.join)(this.relativeDirPath, this.dirName)}`);
8135
+ throw new Error(`Frontmatter is not defined in ${(0, import_node_path61.join)(this.relativeDirPath, this.dirName)}`);
7902
8136
  }
7903
8137
  const result = RulesyncSkillFrontmatterSchema.parse(this.mainFile.frontmatter);
7904
8138
  return result;
@@ -7924,8 +8158,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
7924
8158
  dirName,
7925
8159
  global = false
7926
8160
  }) {
7927
- const skillDirPath = (0, import_node_path60.join)(baseDir, relativeDirPath, dirName);
7928
- const skillFilePath = (0, import_node_path60.join)(skillDirPath, SKILL_FILE_NAME);
8161
+ const skillDirPath = (0, import_node_path61.join)(baseDir, relativeDirPath, dirName);
8162
+ const skillFilePath = (0, import_node_path61.join)(skillDirPath, SKILL_FILE_NAME);
7929
8163
  if (!await fileExists(skillFilePath)) {
7930
8164
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
7931
8165
  }
@@ -7955,14 +8189,14 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
7955
8189
  };
7956
8190
 
7957
8191
  // src/features/skills/agentsskills-skill.ts
7958
- var AgentsSkillsSkillFrontmatterSchema = import_mini24.z.looseObject({
7959
- name: import_mini24.z.string(),
7960
- description: import_mini24.z.string()
8192
+ var AgentsSkillsSkillFrontmatterSchema = import_mini25.z.looseObject({
8193
+ name: import_mini25.z.string(),
8194
+ description: import_mini25.z.string()
7961
8195
  });
7962
8196
  var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
7963
8197
  constructor({
7964
8198
  baseDir = process.cwd(),
7965
- relativeDirPath = (0, import_node_path61.join)(".agents", "skills"),
8199
+ relativeDirPath = (0, import_node_path62.join)(".agents", "skills"),
7966
8200
  dirName,
7967
8201
  frontmatter,
7968
8202
  body,
@@ -7994,7 +8228,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
7994
8228
  throw new Error("AgentsSkillsSkill does not support global mode.");
7995
8229
  }
7996
8230
  return {
7997
- relativeDirPath: (0, import_node_path61.join)(".agents", "skills")
8231
+ relativeDirPath: (0, import_node_path62.join)(".agents", "skills")
7998
8232
  };
7999
8233
  }
8000
8234
  getFrontmatter() {
@@ -8073,9 +8307,9 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
8073
8307
  });
8074
8308
  const result = AgentsSkillsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8075
8309
  if (!result.success) {
8076
- const skillDirPath = (0, import_node_path61.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8310
+ const skillDirPath = (0, import_node_path62.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8077
8311
  throw new Error(
8078
- `Invalid frontmatter in ${(0, import_node_path61.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8312
+ `Invalid frontmatter in ${(0, import_node_path62.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8079
8313
  );
8080
8314
  }
8081
8315
  return new _AgentsSkillsSkill({
@@ -8110,16 +8344,16 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
8110
8344
  };
8111
8345
 
8112
8346
  // src/features/skills/antigravity-skill.ts
8113
- var import_node_path62 = require("path");
8114
- var import_mini25 = require("zod/mini");
8115
- var AntigravitySkillFrontmatterSchema = import_mini25.z.looseObject({
8116
- name: import_mini25.z.string(),
8117
- description: import_mini25.z.string()
8347
+ var import_node_path63 = require("path");
8348
+ var import_mini26 = require("zod/mini");
8349
+ var AntigravitySkillFrontmatterSchema = import_mini26.z.looseObject({
8350
+ name: import_mini26.z.string(),
8351
+ description: import_mini26.z.string()
8118
8352
  });
8119
8353
  var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8120
8354
  constructor({
8121
8355
  baseDir = process.cwd(),
8122
- relativeDirPath = (0, import_node_path62.join)(".agent", "skills"),
8356
+ relativeDirPath = (0, import_node_path63.join)(".agent", "skills"),
8123
8357
  dirName,
8124
8358
  frontmatter,
8125
8359
  body,
@@ -8151,11 +8385,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8151
8385
  } = {}) {
8152
8386
  if (global) {
8153
8387
  return {
8154
- relativeDirPath: (0, import_node_path62.join)(".gemini", "antigravity", "skills")
8388
+ relativeDirPath: (0, import_node_path63.join)(".gemini", "antigravity", "skills")
8155
8389
  };
8156
8390
  }
8157
8391
  return {
8158
- relativeDirPath: (0, import_node_path62.join)(".agent", "skills")
8392
+ relativeDirPath: (0, import_node_path63.join)(".agent", "skills")
8159
8393
  };
8160
8394
  }
8161
8395
  getFrontmatter() {
@@ -8234,9 +8468,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8234
8468
  });
8235
8469
  const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
8236
8470
  if (!result.success) {
8237
- const skillDirPath = (0, import_node_path62.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8471
+ const skillDirPath = (0, import_node_path63.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8238
8472
  throw new Error(
8239
- `Invalid frontmatter in ${(0, import_node_path62.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8473
+ `Invalid frontmatter in ${(0, import_node_path63.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8240
8474
  );
8241
8475
  }
8242
8476
  return new _AntigravitySkill({
@@ -8270,17 +8504,17 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8270
8504
  };
8271
8505
 
8272
8506
  // src/features/skills/claudecode-skill.ts
8273
- var import_node_path63 = require("path");
8274
- var import_mini26 = require("zod/mini");
8275
- var ClaudecodeSkillFrontmatterSchema = import_mini26.z.looseObject({
8276
- name: import_mini26.z.string(),
8277
- description: import_mini26.z.string(),
8278
- "allowed-tools": import_mini26.z.optional(import_mini26.z.array(import_mini26.z.string()))
8507
+ var import_node_path64 = require("path");
8508
+ var import_mini27 = require("zod/mini");
8509
+ var ClaudecodeSkillFrontmatterSchema = import_mini27.z.looseObject({
8510
+ name: import_mini27.z.string(),
8511
+ description: import_mini27.z.string(),
8512
+ "allowed-tools": import_mini27.z.optional(import_mini27.z.array(import_mini27.z.string()))
8279
8513
  });
8280
8514
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8281
8515
  constructor({
8282
8516
  baseDir = process.cwd(),
8283
- relativeDirPath = (0, import_node_path63.join)(".claude", "skills"),
8517
+ relativeDirPath = (0, import_node_path64.join)(".claude", "skills"),
8284
8518
  dirName,
8285
8519
  frontmatter,
8286
8520
  body,
@@ -8311,7 +8545,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8311
8545
  global: _global = false
8312
8546
  } = {}) {
8313
8547
  return {
8314
- relativeDirPath: (0, import_node_path63.join)(".claude", "skills")
8548
+ relativeDirPath: (0, import_node_path64.join)(".claude", "skills")
8315
8549
  };
8316
8550
  }
8317
8551
  getFrontmatter() {
@@ -8396,9 +8630,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8396
8630
  });
8397
8631
  const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8398
8632
  if (!result.success) {
8399
- const skillDirPath = (0, import_node_path63.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8633
+ const skillDirPath = (0, import_node_path64.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8400
8634
  throw new Error(
8401
- `Invalid frontmatter in ${(0, import_node_path63.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8635
+ `Invalid frontmatter in ${(0, import_node_path64.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8402
8636
  );
8403
8637
  }
8404
8638
  return new _ClaudecodeSkill({
@@ -8432,16 +8666,16 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8432
8666
  };
8433
8667
 
8434
8668
  // src/features/skills/cline-skill.ts
8435
- var import_node_path64 = require("path");
8436
- var import_mini27 = require("zod/mini");
8437
- var ClineSkillFrontmatterSchema = import_mini27.z.looseObject({
8438
- name: import_mini27.z.string(),
8439
- description: import_mini27.z.string()
8669
+ var import_node_path65 = require("path");
8670
+ var import_mini28 = require("zod/mini");
8671
+ var ClineSkillFrontmatterSchema = import_mini28.z.looseObject({
8672
+ name: import_mini28.z.string(),
8673
+ description: import_mini28.z.string()
8440
8674
  });
8441
8675
  var ClineSkill = class _ClineSkill extends ToolSkill {
8442
8676
  constructor({
8443
8677
  baseDir = process.cwd(),
8444
- relativeDirPath = (0, import_node_path64.join)(".cline", "skills"),
8678
+ relativeDirPath = (0, import_node_path65.join)(".cline", "skills"),
8445
8679
  dirName,
8446
8680
  frontmatter,
8447
8681
  body,
@@ -8470,7 +8704,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
8470
8704
  }
8471
8705
  static getSettablePaths(_options = {}) {
8472
8706
  return {
8473
- relativeDirPath: (0, import_node_path64.join)(".cline", "skills")
8707
+ relativeDirPath: (0, import_node_path65.join)(".cline", "skills")
8474
8708
  };
8475
8709
  }
8476
8710
  getFrontmatter() {
@@ -8557,13 +8791,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
8557
8791
  });
8558
8792
  const result = ClineSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8559
8793
  if (!result.success) {
8560
- const skillDirPath = (0, import_node_path64.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8794
+ const skillDirPath = (0, import_node_path65.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8561
8795
  throw new Error(
8562
- `Invalid frontmatter in ${(0, import_node_path64.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8796
+ `Invalid frontmatter in ${(0, import_node_path65.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8563
8797
  );
8564
8798
  }
8565
8799
  if (result.data.name !== loaded.dirName) {
8566
- const skillFilePath = (0, import_node_path64.join)(
8800
+ const skillFilePath = (0, import_node_path65.join)(
8567
8801
  loaded.baseDir,
8568
8802
  loaded.relativeDirPath,
8569
8803
  loaded.dirName,
@@ -8604,21 +8838,21 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
8604
8838
  };
8605
8839
 
8606
8840
  // src/features/skills/codexcli-skill.ts
8607
- var import_node_path65 = require("path");
8608
- var import_mini28 = require("zod/mini");
8609
- var CodexCliSkillFrontmatterSchema = import_mini28.z.looseObject({
8610
- name: import_mini28.z.string(),
8611
- description: import_mini28.z.string(),
8612
- metadata: import_mini28.z.optional(
8613
- import_mini28.z.looseObject({
8614
- "short-description": import_mini28.z.optional(import_mini28.z.string())
8841
+ var import_node_path66 = require("path");
8842
+ var import_mini29 = require("zod/mini");
8843
+ var CodexCliSkillFrontmatterSchema = import_mini29.z.looseObject({
8844
+ name: import_mini29.z.string(),
8845
+ description: import_mini29.z.string(),
8846
+ metadata: import_mini29.z.optional(
8847
+ import_mini29.z.looseObject({
8848
+ "short-description": import_mini29.z.optional(import_mini29.z.string())
8615
8849
  })
8616
8850
  )
8617
8851
  });
8618
8852
  var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8619
8853
  constructor({
8620
8854
  baseDir = process.cwd(),
8621
- relativeDirPath = (0, import_node_path65.join)(".codex", "skills"),
8855
+ relativeDirPath = (0, import_node_path66.join)(".codex", "skills"),
8622
8856
  dirName,
8623
8857
  frontmatter,
8624
8858
  body,
@@ -8649,7 +8883,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8649
8883
  global: _global = false
8650
8884
  } = {}) {
8651
8885
  return {
8652
- relativeDirPath: (0, import_node_path65.join)(".codex", "skills")
8886
+ relativeDirPath: (0, import_node_path66.join)(".codex", "skills")
8653
8887
  };
8654
8888
  }
8655
8889
  getFrontmatter() {
@@ -8738,9 +8972,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8738
8972
  });
8739
8973
  const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8740
8974
  if (!result.success) {
8741
- const skillDirPath = (0, import_node_path65.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8975
+ const skillDirPath = (0, import_node_path66.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8742
8976
  throw new Error(
8743
- `Invalid frontmatter in ${(0, import_node_path65.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8977
+ `Invalid frontmatter in ${(0, import_node_path66.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8744
8978
  );
8745
8979
  }
8746
8980
  return new _CodexCliSkill({
@@ -8774,17 +9008,17 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8774
9008
  };
8775
9009
 
8776
9010
  // src/features/skills/copilot-skill.ts
8777
- var import_node_path66 = require("path");
8778
- var import_mini29 = require("zod/mini");
8779
- var CopilotSkillFrontmatterSchema = import_mini29.z.looseObject({
8780
- name: import_mini29.z.string(),
8781
- description: import_mini29.z.string(),
8782
- license: import_mini29.z.optional(import_mini29.z.string())
9011
+ var import_node_path67 = require("path");
9012
+ var import_mini30 = require("zod/mini");
9013
+ var CopilotSkillFrontmatterSchema = import_mini30.z.looseObject({
9014
+ name: import_mini30.z.string(),
9015
+ description: import_mini30.z.string(),
9016
+ license: import_mini30.z.optional(import_mini30.z.string())
8783
9017
  });
8784
9018
  var CopilotSkill = class _CopilotSkill extends ToolSkill {
8785
9019
  constructor({
8786
9020
  baseDir = process.cwd(),
8787
- relativeDirPath = (0, import_node_path66.join)(".github", "skills"),
9021
+ relativeDirPath = (0, import_node_path67.join)(".github", "skills"),
8788
9022
  dirName,
8789
9023
  frontmatter,
8790
9024
  body,
@@ -8816,7 +9050,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
8816
9050
  throw new Error("CopilotSkill does not support global mode.");
8817
9051
  }
8818
9052
  return {
8819
- relativeDirPath: (0, import_node_path66.join)(".github", "skills")
9053
+ relativeDirPath: (0, import_node_path67.join)(".github", "skills")
8820
9054
  };
8821
9055
  }
8822
9056
  getFrontmatter() {
@@ -8901,9 +9135,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
8901
9135
  });
8902
9136
  const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8903
9137
  if (!result.success) {
8904
- const skillDirPath = (0, import_node_path66.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9138
+ const skillDirPath = (0, import_node_path67.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8905
9139
  throw new Error(
8906
- `Invalid frontmatter in ${(0, import_node_path66.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9140
+ `Invalid frontmatter in ${(0, import_node_path67.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8907
9141
  );
8908
9142
  }
8909
9143
  return new _CopilotSkill({
@@ -8938,16 +9172,16 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
8938
9172
  };
8939
9173
 
8940
9174
  // src/features/skills/cursor-skill.ts
8941
- var import_node_path67 = require("path");
8942
- var import_mini30 = require("zod/mini");
8943
- var CursorSkillFrontmatterSchema = import_mini30.z.looseObject({
8944
- name: import_mini30.z.string(),
8945
- description: import_mini30.z.string()
9175
+ var import_node_path68 = require("path");
9176
+ var import_mini31 = require("zod/mini");
9177
+ var CursorSkillFrontmatterSchema = import_mini31.z.looseObject({
9178
+ name: import_mini31.z.string(),
9179
+ description: import_mini31.z.string()
8946
9180
  });
8947
9181
  var CursorSkill = class _CursorSkill extends ToolSkill {
8948
9182
  constructor({
8949
9183
  baseDir = process.cwd(),
8950
- relativeDirPath = (0, import_node_path67.join)(".cursor", "skills"),
9184
+ relativeDirPath = (0, import_node_path68.join)(".cursor", "skills"),
8951
9185
  dirName,
8952
9186
  frontmatter,
8953
9187
  body,
@@ -8976,7 +9210,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
8976
9210
  }
8977
9211
  static getSettablePaths(_options) {
8978
9212
  return {
8979
- relativeDirPath: (0, import_node_path67.join)(".cursor", "skills")
9213
+ relativeDirPath: (0, import_node_path68.join)(".cursor", "skills")
8980
9214
  };
8981
9215
  }
8982
9216
  getFrontmatter() {
@@ -9055,9 +9289,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
9055
9289
  });
9056
9290
  const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9057
9291
  if (!result.success) {
9058
- const skillDirPath = (0, import_node_path67.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9292
+ const skillDirPath = (0, import_node_path68.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9059
9293
  throw new Error(
9060
- `Invalid frontmatter in ${(0, import_node_path67.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9294
+ `Invalid frontmatter in ${(0, import_node_path68.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9061
9295
  );
9062
9296
  }
9063
9297
  return new _CursorSkill({
@@ -9092,11 +9326,11 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
9092
9326
  };
9093
9327
 
9094
9328
  // src/features/skills/geminicli-skill.ts
9095
- var import_node_path68 = require("path");
9096
- var import_mini31 = require("zod/mini");
9097
- var GeminiCliSkillFrontmatterSchema = import_mini31.z.looseObject({
9098
- name: import_mini31.z.string(),
9099
- description: import_mini31.z.string()
9329
+ var import_node_path69 = require("path");
9330
+ var import_mini32 = require("zod/mini");
9331
+ var GeminiCliSkillFrontmatterSchema = import_mini32.z.looseObject({
9332
+ name: import_mini32.z.string(),
9333
+ description: import_mini32.z.string()
9100
9334
  });
9101
9335
  var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9102
9336
  constructor({
@@ -9132,7 +9366,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9132
9366
  global: _global = false
9133
9367
  } = {}) {
9134
9368
  return {
9135
- relativeDirPath: (0, import_node_path68.join)(".gemini", "skills")
9369
+ relativeDirPath: (0, import_node_path69.join)(".gemini", "skills")
9136
9370
  };
9137
9371
  }
9138
9372
  getFrontmatter() {
@@ -9211,9 +9445,9 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9211
9445
  });
9212
9446
  const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9213
9447
  if (!result.success) {
9214
- const skillDirPath = (0, import_node_path68.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9448
+ const skillDirPath = (0, import_node_path69.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9215
9449
  throw new Error(
9216
- `Invalid frontmatter in ${(0, import_node_path68.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9450
+ `Invalid frontmatter in ${(0, import_node_path69.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9217
9451
  );
9218
9452
  }
9219
9453
  return new _GeminiCliSkill({
@@ -9248,16 +9482,16 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9248
9482
  };
9249
9483
 
9250
9484
  // src/features/skills/kilo-skill.ts
9251
- var import_node_path69 = require("path");
9252
- var import_mini32 = require("zod/mini");
9253
- var KiloSkillFrontmatterSchema = import_mini32.z.looseObject({
9254
- name: import_mini32.z.string(),
9255
- description: import_mini32.z.string()
9485
+ var import_node_path70 = require("path");
9486
+ var import_mini33 = require("zod/mini");
9487
+ var KiloSkillFrontmatterSchema = import_mini33.z.looseObject({
9488
+ name: import_mini33.z.string(),
9489
+ description: import_mini33.z.string()
9256
9490
  });
9257
9491
  var KiloSkill = class _KiloSkill extends ToolSkill {
9258
9492
  constructor({
9259
9493
  baseDir = process.cwd(),
9260
- relativeDirPath = (0, import_node_path69.join)(".kilocode", "skills"),
9494
+ relativeDirPath = (0, import_node_path70.join)(".kilocode", "skills"),
9261
9495
  dirName,
9262
9496
  frontmatter,
9263
9497
  body,
@@ -9288,7 +9522,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
9288
9522
  global: _global = false
9289
9523
  } = {}) {
9290
9524
  return {
9291
- relativeDirPath: (0, import_node_path69.join)(".kilocode", "skills")
9525
+ relativeDirPath: (0, import_node_path70.join)(".kilocode", "skills")
9292
9526
  };
9293
9527
  }
9294
9528
  getFrontmatter() {
@@ -9375,13 +9609,13 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
9375
9609
  });
9376
9610
  const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9377
9611
  if (!result.success) {
9378
- const skillDirPath = (0, import_node_path69.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9612
+ const skillDirPath = (0, import_node_path70.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9379
9613
  throw new Error(
9380
- `Invalid frontmatter in ${(0, import_node_path69.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9614
+ `Invalid frontmatter in ${(0, import_node_path70.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9381
9615
  );
9382
9616
  }
9383
9617
  if (result.data.name !== loaded.dirName) {
9384
- const skillFilePath = (0, import_node_path69.join)(
9618
+ const skillFilePath = (0, import_node_path70.join)(
9385
9619
  loaded.baseDir,
9386
9620
  loaded.relativeDirPath,
9387
9621
  loaded.dirName,
@@ -9422,16 +9656,16 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
9422
9656
  };
9423
9657
 
9424
9658
  // src/features/skills/kiro-skill.ts
9425
- var import_node_path70 = require("path");
9426
- var import_mini33 = require("zod/mini");
9427
- var KiroSkillFrontmatterSchema = import_mini33.z.looseObject({
9428
- name: import_mini33.z.string(),
9429
- description: import_mini33.z.string()
9659
+ var import_node_path71 = require("path");
9660
+ var import_mini34 = require("zod/mini");
9661
+ var KiroSkillFrontmatterSchema = import_mini34.z.looseObject({
9662
+ name: import_mini34.z.string(),
9663
+ description: import_mini34.z.string()
9430
9664
  });
9431
9665
  var KiroSkill = class _KiroSkill extends ToolSkill {
9432
9666
  constructor({
9433
9667
  baseDir = process.cwd(),
9434
- relativeDirPath = (0, import_node_path70.join)(".kiro", "skills"),
9668
+ relativeDirPath = (0, import_node_path71.join)(".kiro", "skills"),
9435
9669
  dirName,
9436
9670
  frontmatter,
9437
9671
  body,
@@ -9463,7 +9697,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
9463
9697
  throw new Error("KiroSkill does not support global mode.");
9464
9698
  }
9465
9699
  return {
9466
- relativeDirPath: (0, import_node_path70.join)(".kiro", "skills")
9700
+ relativeDirPath: (0, import_node_path71.join)(".kiro", "skills")
9467
9701
  };
9468
9702
  }
9469
9703
  getFrontmatter() {
@@ -9550,13 +9784,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
9550
9784
  });
9551
9785
  const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9552
9786
  if (!result.success) {
9553
- const skillDirPath = (0, import_node_path70.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9787
+ const skillDirPath = (0, import_node_path71.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9554
9788
  throw new Error(
9555
- `Invalid frontmatter in ${(0, import_node_path70.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9789
+ `Invalid frontmatter in ${(0, import_node_path71.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9556
9790
  );
9557
9791
  }
9558
9792
  if (result.data.name !== loaded.dirName) {
9559
- const skillFilePath = (0, import_node_path70.join)(
9793
+ const skillFilePath = (0, import_node_path71.join)(
9560
9794
  loaded.baseDir,
9561
9795
  loaded.relativeDirPath,
9562
9796
  loaded.dirName,
@@ -9598,17 +9832,17 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
9598
9832
  };
9599
9833
 
9600
9834
  // src/features/skills/opencode-skill.ts
9601
- var import_node_path71 = require("path");
9602
- var import_mini34 = require("zod/mini");
9603
- var OpenCodeSkillFrontmatterSchema = import_mini34.z.looseObject({
9604
- name: import_mini34.z.string(),
9605
- description: import_mini34.z.string(),
9606
- "allowed-tools": import_mini34.z.optional(import_mini34.z.array(import_mini34.z.string()))
9835
+ var import_node_path72 = require("path");
9836
+ var import_mini35 = require("zod/mini");
9837
+ var OpenCodeSkillFrontmatterSchema = import_mini35.z.looseObject({
9838
+ name: import_mini35.z.string(),
9839
+ description: import_mini35.z.string(),
9840
+ "allowed-tools": import_mini35.z.optional(import_mini35.z.array(import_mini35.z.string()))
9607
9841
  });
9608
9842
  var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
9609
9843
  constructor({
9610
9844
  baseDir = process.cwd(),
9611
- relativeDirPath = (0, import_node_path71.join)(".opencode", "skill"),
9845
+ relativeDirPath = (0, import_node_path72.join)(".opencode", "skill"),
9612
9846
  dirName,
9613
9847
  frontmatter,
9614
9848
  body,
@@ -9637,7 +9871,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
9637
9871
  }
9638
9872
  static getSettablePaths({ global = false } = {}) {
9639
9873
  return {
9640
- relativeDirPath: global ? (0, import_node_path71.join)(".config", "opencode", "skill") : (0, import_node_path71.join)(".opencode", "skill")
9874
+ relativeDirPath: global ? (0, import_node_path72.join)(".config", "opencode", "skill") : (0, import_node_path72.join)(".opencode", "skill")
9641
9875
  };
9642
9876
  }
9643
9877
  getFrontmatter() {
@@ -9722,9 +9956,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
9722
9956
  });
9723
9957
  const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9724
9958
  if (!result.success) {
9725
- const skillDirPath = (0, import_node_path71.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9959
+ const skillDirPath = (0, import_node_path72.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9726
9960
  throw new Error(
9727
- `Invalid frontmatter in ${(0, import_node_path71.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9961
+ `Invalid frontmatter in ${(0, import_node_path72.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9728
9962
  );
9729
9963
  }
9730
9964
  return new _OpenCodeSkill({
@@ -9758,16 +9992,16 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
9758
9992
  };
9759
9993
 
9760
9994
  // src/features/skills/replit-skill.ts
9761
- var import_node_path72 = require("path");
9762
- var import_mini35 = require("zod/mini");
9763
- var ReplitSkillFrontmatterSchema = import_mini35.z.looseObject({
9764
- name: import_mini35.z.string(),
9765
- description: import_mini35.z.string()
9995
+ var import_node_path73 = require("path");
9996
+ var import_mini36 = require("zod/mini");
9997
+ var ReplitSkillFrontmatterSchema = import_mini36.z.looseObject({
9998
+ name: import_mini36.z.string(),
9999
+ description: import_mini36.z.string()
9766
10000
  });
9767
10001
  var ReplitSkill = class _ReplitSkill extends ToolSkill {
9768
10002
  constructor({
9769
10003
  baseDir = process.cwd(),
9770
- relativeDirPath = (0, import_node_path72.join)(".agents", "skills"),
10004
+ relativeDirPath = (0, import_node_path73.join)(".agents", "skills"),
9771
10005
  dirName,
9772
10006
  frontmatter,
9773
10007
  body,
@@ -9799,7 +10033,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
9799
10033
  throw new Error("ReplitSkill does not support global mode.");
9800
10034
  }
9801
10035
  return {
9802
- relativeDirPath: (0, import_node_path72.join)(".agents", "skills")
10036
+ relativeDirPath: (0, import_node_path73.join)(".agents", "skills")
9803
10037
  };
9804
10038
  }
9805
10039
  getFrontmatter() {
@@ -9878,9 +10112,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
9878
10112
  });
9879
10113
  const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9880
10114
  if (!result.success) {
9881
- const skillDirPath = (0, import_node_path72.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10115
+ const skillDirPath = (0, import_node_path73.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9882
10116
  throw new Error(
9883
- `Invalid frontmatter in ${(0, import_node_path72.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10117
+ `Invalid frontmatter in ${(0, import_node_path73.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9884
10118
  );
9885
10119
  }
9886
10120
  return new _ReplitSkill({
@@ -9915,16 +10149,16 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
9915
10149
  };
9916
10150
 
9917
10151
  // src/features/skills/roo-skill.ts
9918
- var import_node_path73 = require("path");
9919
- var import_mini36 = require("zod/mini");
9920
- var RooSkillFrontmatterSchema = import_mini36.z.looseObject({
9921
- name: import_mini36.z.string(),
9922
- description: import_mini36.z.string()
10152
+ var import_node_path74 = require("path");
10153
+ var import_mini37 = require("zod/mini");
10154
+ var RooSkillFrontmatterSchema = import_mini37.z.looseObject({
10155
+ name: import_mini37.z.string(),
10156
+ description: import_mini37.z.string()
9923
10157
  });
9924
10158
  var RooSkill = class _RooSkill extends ToolSkill {
9925
10159
  constructor({
9926
10160
  baseDir = process.cwd(),
9927
- relativeDirPath = (0, import_node_path73.join)(".roo", "skills"),
10161
+ relativeDirPath = (0, import_node_path74.join)(".roo", "skills"),
9928
10162
  dirName,
9929
10163
  frontmatter,
9930
10164
  body,
@@ -9955,7 +10189,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
9955
10189
  global: _global = false
9956
10190
  } = {}) {
9957
10191
  return {
9958
- relativeDirPath: (0, import_node_path73.join)(".roo", "skills")
10192
+ relativeDirPath: (0, import_node_path74.join)(".roo", "skills")
9959
10193
  };
9960
10194
  }
9961
10195
  getFrontmatter() {
@@ -10042,13 +10276,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
10042
10276
  });
10043
10277
  const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10044
10278
  if (!result.success) {
10045
- const skillDirPath = (0, import_node_path73.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10279
+ const skillDirPath = (0, import_node_path74.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10046
10280
  throw new Error(
10047
- `Invalid frontmatter in ${(0, import_node_path73.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10281
+ `Invalid frontmatter in ${(0, import_node_path74.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10048
10282
  );
10049
10283
  }
10050
10284
  if (result.data.name !== loaded.dirName) {
10051
- const skillFilePath = (0, import_node_path73.join)(
10285
+ const skillFilePath = (0, import_node_path74.join)(
10052
10286
  loaded.baseDir,
10053
10287
  loaded.relativeDirPath,
10054
10288
  loaded.dirName,
@@ -10089,17 +10323,17 @@ var RooSkill = class _RooSkill extends ToolSkill {
10089
10323
  };
10090
10324
 
10091
10325
  // src/features/skills/skills-utils.ts
10092
- var import_node_path74 = require("path");
10326
+ var import_node_path75 = require("path");
10093
10327
  async function getLocalSkillDirNames(baseDir) {
10094
- const skillsDir = (0, import_node_path74.join)(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
10328
+ const skillsDir = (0, import_node_path75.join)(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
10095
10329
  const names = /* @__PURE__ */ new Set();
10096
10330
  if (!await directoryExists(skillsDir)) {
10097
10331
  return names;
10098
10332
  }
10099
- const dirPaths = await findFilesByGlobs((0, import_node_path74.join)(skillsDir, "*"), { type: "dir" });
10333
+ const dirPaths = await findFilesByGlobs((0, import_node_path75.join)(skillsDir, "*"), { type: "dir" });
10100
10334
  for (const dirPath of dirPaths) {
10101
- const name = (0, import_node_path74.basename)(dirPath);
10102
- if (name === (0, import_node_path74.basename)(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
10335
+ const name = (0, import_node_path75.basename)(dirPath);
10336
+ if (name === (0, import_node_path75.basename)(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
10103
10337
  names.add(name);
10104
10338
  }
10105
10339
  return names;
@@ -10124,7 +10358,7 @@ var skillsProcessorToolTargetTuple = [
10124
10358
  "replit",
10125
10359
  "roo"
10126
10360
  ];
10127
- var SkillsProcessorToolTargetSchema = import_mini37.z.enum(skillsProcessorToolTargetTuple);
10361
+ var SkillsProcessorToolTargetSchema = import_mini38.z.enum(skillsProcessorToolTargetTuple);
10128
10362
  var toolSkillFactories = /* @__PURE__ */ new Map([
10129
10363
  [
10130
10364
  "agentsmd",
@@ -10325,11 +10559,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10325
10559
  )
10326
10560
  );
10327
10561
  const localSkillNames = new Set(localDirNames);
10328
- const curatedDirPath = (0, import_node_path75.join)(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
10562
+ const curatedDirPath = (0, import_node_path76.join)(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
10329
10563
  let curatedSkills = [];
10330
10564
  if (await directoryExists(curatedDirPath)) {
10331
- const curatedDirPaths = await findFilesByGlobs((0, import_node_path75.join)(curatedDirPath, "*"), { type: "dir" });
10332
- const curatedDirNames = curatedDirPaths.map((path3) => (0, import_node_path75.basename)(path3));
10565
+ const curatedDirPaths = await findFilesByGlobs((0, import_node_path76.join)(curatedDirPath, "*"), { type: "dir" });
10566
+ const curatedDirNames = curatedDirPaths.map((path3) => (0, import_node_path76.basename)(path3));
10333
10567
  const nonConflicting = curatedDirNames.filter((name) => {
10334
10568
  if (localSkillNames.has(name)) {
10335
10569
  logger.debug(`Skipping curated skill "${name}": local skill takes precedence.`);
@@ -10362,9 +10596,9 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10362
10596
  async loadToolDirs() {
10363
10597
  const factory = this.getFactory(this.toolTarget);
10364
10598
  const paths = factory.class.getSettablePaths({ global: this.global });
10365
- const skillsDirPath = (0, import_node_path75.join)(this.baseDir, paths.relativeDirPath);
10366
- const dirPaths = await findFilesByGlobs((0, import_node_path75.join)(skillsDirPath, "*"), { type: "dir" });
10367
- const dirNames = dirPaths.map((path3) => (0, import_node_path75.basename)(path3));
10599
+ const skillsDirPath = (0, import_node_path76.join)(this.baseDir, paths.relativeDirPath);
10600
+ const dirPaths = await findFilesByGlobs((0, import_node_path76.join)(skillsDirPath, "*"), { type: "dir" });
10601
+ const dirNames = dirPaths.map((path3) => (0, import_node_path76.basename)(path3));
10368
10602
  const toolSkills = await Promise.all(
10369
10603
  dirNames.map(
10370
10604
  (dirName) => factory.class.fromDir({
@@ -10380,9 +10614,9 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10380
10614
  async loadToolDirsToDelete() {
10381
10615
  const factory = this.getFactory(this.toolTarget);
10382
10616
  const paths = factory.class.getSettablePaths({ global: this.global });
10383
- const skillsDirPath = (0, import_node_path75.join)(this.baseDir, paths.relativeDirPath);
10384
- const dirPaths = await findFilesByGlobs((0, import_node_path75.join)(skillsDirPath, "*"), { type: "dir" });
10385
- const dirNames = dirPaths.map((path3) => (0, import_node_path75.basename)(path3));
10617
+ const skillsDirPath = (0, import_node_path76.join)(this.baseDir, paths.relativeDirPath);
10618
+ const dirPaths = await findFilesByGlobs((0, import_node_path76.join)(skillsDirPath, "*"), { type: "dir" });
10619
+ const dirNames = dirPaths.map((path3) => (0, import_node_path76.basename)(path3));
10386
10620
  const toolSkills = dirNames.map(
10387
10621
  (dirName) => factory.class.forDeletion({
10388
10622
  baseDir: this.baseDir,
@@ -10443,11 +10677,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10443
10677
  };
10444
10678
 
10445
10679
  // src/features/subagents/agentsmd-subagent.ts
10446
- var import_node_path77 = require("path");
10680
+ var import_node_path78 = require("path");
10447
10681
 
10448
10682
  // src/features/subagents/simulated-subagent.ts
10449
- var import_node_path76 = require("path");
10450
- var import_mini38 = require("zod/mini");
10683
+ var import_node_path77 = require("path");
10684
+ var import_mini39 = require("zod/mini");
10451
10685
 
10452
10686
  // src/features/subagents/tool-subagent.ts
10453
10687
  var ToolSubagent = class extends ToolFile {
@@ -10499,9 +10733,9 @@ var ToolSubagent = class extends ToolFile {
10499
10733
  };
10500
10734
 
10501
10735
  // src/features/subagents/simulated-subagent.ts
10502
- var SimulatedSubagentFrontmatterSchema = import_mini38.z.object({
10503
- name: import_mini38.z.string(),
10504
- description: import_mini38.z.string()
10736
+ var SimulatedSubagentFrontmatterSchema = import_mini39.z.object({
10737
+ name: import_mini39.z.string(),
10738
+ description: import_mini39.z.string()
10505
10739
  });
10506
10740
  var SimulatedSubagent = class extends ToolSubagent {
10507
10741
  frontmatter;
@@ -10511,7 +10745,7 @@ var SimulatedSubagent = class extends ToolSubagent {
10511
10745
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
10512
10746
  if (!result.success) {
10513
10747
  throw new Error(
10514
- `Invalid frontmatter in ${(0, import_node_path76.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10748
+ `Invalid frontmatter in ${(0, import_node_path77.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10515
10749
  );
10516
10750
  }
10517
10751
  }
@@ -10562,7 +10796,7 @@ var SimulatedSubagent = class extends ToolSubagent {
10562
10796
  return {
10563
10797
  success: false,
10564
10798
  error: new Error(
10565
- `Invalid frontmatter in ${(0, import_node_path76.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10799
+ `Invalid frontmatter in ${(0, import_node_path77.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10566
10800
  )
10567
10801
  };
10568
10802
  }
@@ -10572,7 +10806,7 @@ var SimulatedSubagent = class extends ToolSubagent {
10572
10806
  relativeFilePath,
10573
10807
  validate = true
10574
10808
  }) {
10575
- const filePath = (0, import_node_path76.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
10809
+ const filePath = (0, import_node_path77.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
10576
10810
  const fileContent = await readFileContent(filePath);
10577
10811
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
10578
10812
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -10582,7 +10816,7 @@ var SimulatedSubagent = class extends ToolSubagent {
10582
10816
  return {
10583
10817
  baseDir,
10584
10818
  relativeDirPath: this.getSettablePaths().relativeDirPath,
10585
- relativeFilePath: (0, import_node_path76.basename)(relativeFilePath),
10819
+ relativeFilePath: (0, import_node_path77.basename)(relativeFilePath),
10586
10820
  frontmatter: result.data,
10587
10821
  body: content.trim(),
10588
10822
  validate
@@ -10608,7 +10842,7 @@ var SimulatedSubagent = class extends ToolSubagent {
10608
10842
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
10609
10843
  static getSettablePaths() {
10610
10844
  return {
10611
- relativeDirPath: (0, import_node_path77.join)(".agents", "subagents")
10845
+ relativeDirPath: (0, import_node_path78.join)(".agents", "subagents")
10612
10846
  };
10613
10847
  }
10614
10848
  static async fromFile(params) {
@@ -10631,11 +10865,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
10631
10865
  };
10632
10866
 
10633
10867
  // src/features/subagents/factorydroid-subagent.ts
10634
- var import_node_path78 = require("path");
10868
+ var import_node_path79 = require("path");
10635
10869
  var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
10636
10870
  static getSettablePaths(_options) {
10637
10871
  return {
10638
- relativeDirPath: (0, import_node_path78.join)(".factory", "droids")
10872
+ relativeDirPath: (0, import_node_path79.join)(".factory", "droids")
10639
10873
  };
10640
10874
  }
10641
10875
  static async fromFile(params) {
@@ -10658,11 +10892,11 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
10658
10892
  };
10659
10893
 
10660
10894
  // src/features/subagents/geminicli-subagent.ts
10661
- var import_node_path79 = require("path");
10895
+ var import_node_path80 = require("path");
10662
10896
  var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
10663
10897
  static getSettablePaths() {
10664
10898
  return {
10665
- relativeDirPath: (0, import_node_path79.join)(".gemini", "subagents")
10899
+ relativeDirPath: (0, import_node_path80.join)(".gemini", "subagents")
10666
10900
  };
10667
10901
  }
10668
10902
  static async fromFile(params) {
@@ -10685,11 +10919,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
10685
10919
  };
10686
10920
 
10687
10921
  // src/features/subagents/roo-subagent.ts
10688
- var import_node_path80 = require("path");
10922
+ var import_node_path81 = require("path");
10689
10923
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
10690
10924
  static getSettablePaths() {
10691
10925
  return {
10692
- relativeDirPath: (0, import_node_path80.join)(".roo", "subagents")
10926
+ relativeDirPath: (0, import_node_path81.join)(".roo", "subagents")
10693
10927
  };
10694
10928
  }
10695
10929
  static async fromFile(params) {
@@ -10712,20 +10946,20 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
10712
10946
  };
10713
10947
 
10714
10948
  // src/features/subagents/subagents-processor.ts
10715
- var import_node_path88 = require("path");
10716
- var import_mini46 = require("zod/mini");
10949
+ var import_node_path89 = require("path");
10950
+ var import_mini47 = require("zod/mini");
10717
10951
 
10718
10952
  // src/features/subagents/claudecode-subagent.ts
10719
- var import_node_path82 = require("path");
10720
- var import_mini40 = require("zod/mini");
10953
+ var import_node_path83 = require("path");
10954
+ var import_mini41 = require("zod/mini");
10721
10955
 
10722
10956
  // src/features/subagents/rulesync-subagent.ts
10723
- var import_node_path81 = require("path");
10724
- var import_mini39 = require("zod/mini");
10725
- var RulesyncSubagentFrontmatterSchema = import_mini39.z.looseObject({
10726
- targets: import_mini39.z._default(RulesyncTargetsSchema, ["*"]),
10727
- name: import_mini39.z.string(),
10728
- description: import_mini39.z.string()
10957
+ var import_node_path82 = require("path");
10958
+ var import_mini40 = require("zod/mini");
10959
+ var RulesyncSubagentFrontmatterSchema = import_mini40.z.looseObject({
10960
+ targets: import_mini40.z._default(RulesyncTargetsSchema, ["*"]),
10961
+ name: import_mini40.z.string(),
10962
+ description: import_mini40.z.string()
10729
10963
  });
10730
10964
  var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10731
10965
  frontmatter;
@@ -10734,7 +10968,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10734
10968
  const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
10735
10969
  if (!parseResult.success && rest.validate !== false) {
10736
10970
  throw new Error(
10737
- `Invalid frontmatter in ${(0, import_node_path81.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
10971
+ `Invalid frontmatter in ${(0, import_node_path82.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
10738
10972
  );
10739
10973
  }
10740
10974
  const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
@@ -10767,7 +11001,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10767
11001
  return {
10768
11002
  success: false,
10769
11003
  error: new Error(
10770
- `Invalid frontmatter in ${(0, import_node_path81.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11004
+ `Invalid frontmatter in ${(0, import_node_path82.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10771
11005
  )
10772
11006
  };
10773
11007
  }
@@ -10775,14 +11009,14 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10775
11009
  static async fromFile({
10776
11010
  relativeFilePath
10777
11011
  }) {
10778
- const filePath = (0, import_node_path81.join)(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
11012
+ const filePath = (0, import_node_path82.join)(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
10779
11013
  const fileContent = await readFileContent(filePath);
10780
11014
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
10781
11015
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
10782
11016
  if (!result.success) {
10783
11017
  throw new Error(`Invalid frontmatter in ${relativeFilePath}: ${formatError(result.error)}`);
10784
11018
  }
10785
- const filename = (0, import_node_path81.basename)(relativeFilePath);
11019
+ const filename = (0, import_node_path82.basename)(relativeFilePath);
10786
11020
  return new _RulesyncSubagent({
10787
11021
  baseDir: process.cwd(),
10788
11022
  relativeDirPath: this.getSettablePaths().relativeDirPath,
@@ -10794,13 +11028,13 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10794
11028
  };
10795
11029
 
10796
11030
  // src/features/subagents/claudecode-subagent.ts
10797
- var ClaudecodeSubagentFrontmatterSchema = import_mini40.z.looseObject({
10798
- name: import_mini40.z.string(),
10799
- description: import_mini40.z.string(),
10800
- model: import_mini40.z.optional(import_mini40.z.string()),
10801
- tools: import_mini40.z.optional(import_mini40.z.union([import_mini40.z.string(), import_mini40.z.array(import_mini40.z.string())])),
10802
- permissionMode: import_mini40.z.optional(import_mini40.z.string()),
10803
- skills: import_mini40.z.optional(import_mini40.z.union([import_mini40.z.string(), import_mini40.z.array(import_mini40.z.string())]))
11031
+ var ClaudecodeSubagentFrontmatterSchema = import_mini41.z.looseObject({
11032
+ name: import_mini41.z.string(),
11033
+ description: import_mini41.z.string(),
11034
+ model: import_mini41.z.optional(import_mini41.z.string()),
11035
+ tools: import_mini41.z.optional(import_mini41.z.union([import_mini41.z.string(), import_mini41.z.array(import_mini41.z.string())])),
11036
+ permissionMode: import_mini41.z.optional(import_mini41.z.string()),
11037
+ skills: import_mini41.z.optional(import_mini41.z.union([import_mini41.z.string(), import_mini41.z.array(import_mini41.z.string())]))
10804
11038
  });
10805
11039
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10806
11040
  frontmatter;
@@ -10810,7 +11044,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10810
11044
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
10811
11045
  if (!result.success) {
10812
11046
  throw new Error(
10813
- `Invalid frontmatter in ${(0, import_node_path82.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11047
+ `Invalid frontmatter in ${(0, import_node_path83.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10814
11048
  );
10815
11049
  }
10816
11050
  }
@@ -10822,7 +11056,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10822
11056
  }
10823
11057
  static getSettablePaths(_options = {}) {
10824
11058
  return {
10825
- relativeDirPath: (0, import_node_path82.join)(".claude", "agents")
11059
+ relativeDirPath: (0, import_node_path83.join)(".claude", "agents")
10826
11060
  };
10827
11061
  }
10828
11062
  getFrontmatter() {
@@ -10898,7 +11132,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10898
11132
  return {
10899
11133
  success: false,
10900
11134
  error: new Error(
10901
- `Invalid frontmatter in ${(0, import_node_path82.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11135
+ `Invalid frontmatter in ${(0, import_node_path83.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10902
11136
  )
10903
11137
  };
10904
11138
  }
@@ -10916,7 +11150,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10916
11150
  global = false
10917
11151
  }) {
10918
11152
  const paths = this.getSettablePaths({ global });
10919
- const filePath = (0, import_node_path82.join)(baseDir, paths.relativeDirPath, relativeFilePath);
11153
+ const filePath = (0, import_node_path83.join)(baseDir, paths.relativeDirPath, relativeFilePath);
10920
11154
  const fileContent = await readFileContent(filePath);
10921
11155
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
10922
11156
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -10951,16 +11185,16 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10951
11185
  };
10952
11186
 
10953
11187
  // src/features/subagents/codexcli-subagent.ts
10954
- var import_node_path83 = require("path");
11188
+ var import_node_path84 = require("path");
10955
11189
  var smolToml2 = __toESM(require("smol-toml"), 1);
10956
- var import_mini41 = require("zod/mini");
10957
- var CodexCliSubagentTomlSchema = import_mini41.z.looseObject({
10958
- name: import_mini41.z.string(),
10959
- description: import_mini41.z.optional(import_mini41.z.string()),
10960
- developer_instructions: import_mini41.z.optional(import_mini41.z.string()),
10961
- model: import_mini41.z.optional(import_mini41.z.string()),
10962
- model_reasoning_effort: import_mini41.z.optional(import_mini41.z.string()),
10963
- sandbox_mode: import_mini41.z.optional(import_mini41.z.string())
11190
+ var import_mini42 = require("zod/mini");
11191
+ var CodexCliSubagentTomlSchema = import_mini42.z.looseObject({
11192
+ name: import_mini42.z.string(),
11193
+ description: import_mini42.z.optional(import_mini42.z.string()),
11194
+ developer_instructions: import_mini42.z.optional(import_mini42.z.string()),
11195
+ model: import_mini42.z.optional(import_mini42.z.string()),
11196
+ model_reasoning_effort: import_mini42.z.optional(import_mini42.z.string()),
11197
+ sandbox_mode: import_mini42.z.optional(import_mini42.z.string())
10964
11198
  });
10965
11199
  var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10966
11200
  body;
@@ -10971,7 +11205,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10971
11205
  CodexCliSubagentTomlSchema.parse(parsed);
10972
11206
  } catch (error) {
10973
11207
  throw new Error(
10974
- `Invalid TOML in ${(0, import_node_path83.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
11208
+ `Invalid TOML in ${(0, import_node_path84.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
10975
11209
  { cause: error }
10976
11210
  );
10977
11211
  }
@@ -10983,7 +11217,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10983
11217
  }
10984
11218
  static getSettablePaths(_options = {}) {
10985
11219
  return {
10986
- relativeDirPath: (0, import_node_path83.join)(".codex", "agents")
11220
+ relativeDirPath: (0, import_node_path84.join)(".codex", "agents")
10987
11221
  };
10988
11222
  }
10989
11223
  getBody() {
@@ -10995,7 +11229,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10995
11229
  parsed = CodexCliSubagentTomlSchema.parse(smolToml2.parse(this.body));
10996
11230
  } catch (error) {
10997
11231
  throw new Error(
10998
- `Failed to parse TOML in ${(0, import_node_path83.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
11232
+ `Failed to parse TOML in ${(0, import_node_path84.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
10999
11233
  { cause: error }
11000
11234
  );
11001
11235
  }
@@ -11076,7 +11310,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11076
11310
  global = false
11077
11311
  }) {
11078
11312
  const paths = this.getSettablePaths({ global });
11079
- const filePath = (0, import_node_path83.join)(baseDir, paths.relativeDirPath, relativeFilePath);
11313
+ const filePath = (0, import_node_path84.join)(baseDir, paths.relativeDirPath, relativeFilePath);
11080
11314
  const fileContent = await readFileContent(filePath);
11081
11315
  const subagent = new _CodexCliSubagent({
11082
11316
  baseDir,
@@ -11114,13 +11348,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11114
11348
  };
11115
11349
 
11116
11350
  // src/features/subagents/copilot-subagent.ts
11117
- var import_node_path84 = require("path");
11118
- var import_mini42 = require("zod/mini");
11351
+ var import_node_path85 = require("path");
11352
+ var import_mini43 = require("zod/mini");
11119
11353
  var REQUIRED_TOOL = "agent/runSubagent";
11120
- var CopilotSubagentFrontmatterSchema = import_mini42.z.looseObject({
11121
- name: import_mini42.z.string(),
11122
- description: import_mini42.z.string(),
11123
- tools: import_mini42.z.optional(import_mini42.z.union([import_mini42.z.string(), import_mini42.z.array(import_mini42.z.string())]))
11354
+ var CopilotSubagentFrontmatterSchema = import_mini43.z.looseObject({
11355
+ name: import_mini43.z.string(),
11356
+ description: import_mini43.z.string(),
11357
+ tools: import_mini43.z.optional(import_mini43.z.union([import_mini43.z.string(), import_mini43.z.array(import_mini43.z.string())]))
11124
11358
  });
11125
11359
  var normalizeTools = (tools) => {
11126
11360
  if (!tools) {
@@ -11140,7 +11374,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11140
11374
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
11141
11375
  if (!result.success) {
11142
11376
  throw new Error(
11143
- `Invalid frontmatter in ${(0, import_node_path84.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11377
+ `Invalid frontmatter in ${(0, import_node_path85.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11144
11378
  );
11145
11379
  }
11146
11380
  }
@@ -11152,7 +11386,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11152
11386
  }
11153
11387
  static getSettablePaths(_options = {}) {
11154
11388
  return {
11155
- relativeDirPath: (0, import_node_path84.join)(".github", "agents")
11389
+ relativeDirPath: (0, import_node_path85.join)(".github", "agents")
11156
11390
  };
11157
11391
  }
11158
11392
  getFrontmatter() {
@@ -11226,7 +11460,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11226
11460
  return {
11227
11461
  success: false,
11228
11462
  error: new Error(
11229
- `Invalid frontmatter in ${(0, import_node_path84.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11463
+ `Invalid frontmatter in ${(0, import_node_path85.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11230
11464
  )
11231
11465
  };
11232
11466
  }
@@ -11244,7 +11478,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11244
11478
  global = false
11245
11479
  }) {
11246
11480
  const paths = this.getSettablePaths({ global });
11247
- const filePath = (0, import_node_path84.join)(baseDir, paths.relativeDirPath, relativeFilePath);
11481
+ const filePath = (0, import_node_path85.join)(baseDir, paths.relativeDirPath, relativeFilePath);
11248
11482
  const fileContent = await readFileContent(filePath);
11249
11483
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11250
11484
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11280,11 +11514,11 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11280
11514
  };
11281
11515
 
11282
11516
  // src/features/subagents/cursor-subagent.ts
11283
- var import_node_path85 = require("path");
11284
- var import_mini43 = require("zod/mini");
11285
- var CursorSubagentFrontmatterSchema = import_mini43.z.looseObject({
11286
- name: import_mini43.z.string(),
11287
- description: import_mini43.z.string()
11517
+ var import_node_path86 = require("path");
11518
+ var import_mini44 = require("zod/mini");
11519
+ var CursorSubagentFrontmatterSchema = import_mini44.z.looseObject({
11520
+ name: import_mini44.z.string(),
11521
+ description: import_mini44.z.string()
11288
11522
  });
11289
11523
  var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11290
11524
  frontmatter;
@@ -11294,7 +11528,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11294
11528
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
11295
11529
  if (!result.success) {
11296
11530
  throw new Error(
11297
- `Invalid frontmatter in ${(0, import_node_path85.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11531
+ `Invalid frontmatter in ${(0, import_node_path86.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11298
11532
  );
11299
11533
  }
11300
11534
  }
@@ -11306,7 +11540,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11306
11540
  }
11307
11541
  static getSettablePaths(_options = {}) {
11308
11542
  return {
11309
- relativeDirPath: (0, import_node_path85.join)(".cursor", "agents")
11543
+ relativeDirPath: (0, import_node_path86.join)(".cursor", "agents")
11310
11544
  };
11311
11545
  }
11312
11546
  getFrontmatter() {
@@ -11373,7 +11607,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11373
11607
  return {
11374
11608
  success: false,
11375
11609
  error: new Error(
11376
- `Invalid frontmatter in ${(0, import_node_path85.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11610
+ `Invalid frontmatter in ${(0, import_node_path86.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11377
11611
  )
11378
11612
  };
11379
11613
  }
@@ -11391,7 +11625,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11391
11625
  global = false
11392
11626
  }) {
11393
11627
  const paths = this.getSettablePaths({ global });
11394
- const filePath = (0, import_node_path85.join)(baseDir, paths.relativeDirPath, relativeFilePath);
11628
+ const filePath = (0, import_node_path86.join)(baseDir, paths.relativeDirPath, relativeFilePath);
11395
11629
  const fileContent = await readFileContent(filePath);
11396
11630
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11397
11631
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11427,23 +11661,23 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11427
11661
  };
11428
11662
 
11429
11663
  // src/features/subagents/kiro-subagent.ts
11430
- var import_node_path86 = require("path");
11431
- var import_mini44 = require("zod/mini");
11432
- var KiroCliSubagentJsonSchema = import_mini44.z.looseObject({
11433
- name: import_mini44.z.string(),
11434
- description: import_mini44.z.optional(import_mini44.z.nullable(import_mini44.z.string())),
11435
- prompt: import_mini44.z.optional(import_mini44.z.nullable(import_mini44.z.string())),
11436
- tools: import_mini44.z.optional(import_mini44.z.nullable(import_mini44.z.array(import_mini44.z.string()))),
11437
- toolAliases: import_mini44.z.optional(import_mini44.z.nullable(import_mini44.z.record(import_mini44.z.string(), import_mini44.z.string()))),
11438
- toolSettings: import_mini44.z.optional(import_mini44.z.nullable(import_mini44.z.unknown())),
11439
- toolSchema: import_mini44.z.optional(import_mini44.z.nullable(import_mini44.z.unknown())),
11440
- hooks: import_mini44.z.optional(import_mini44.z.nullable(import_mini44.z.record(import_mini44.z.string(), import_mini44.z.array(import_mini44.z.unknown())))),
11441
- model: import_mini44.z.optional(import_mini44.z.nullable(import_mini44.z.string())),
11442
- mcpServers: import_mini44.z.optional(import_mini44.z.nullable(import_mini44.z.record(import_mini44.z.string(), import_mini44.z.unknown()))),
11443
- useLegacyMcpJson: import_mini44.z.optional(import_mini44.z.nullable(import_mini44.z.boolean())),
11444
- resources: import_mini44.z.optional(import_mini44.z.nullable(import_mini44.z.array(import_mini44.z.string()))),
11445
- allowedTools: import_mini44.z.optional(import_mini44.z.nullable(import_mini44.z.array(import_mini44.z.string()))),
11446
- includeMcpJson: import_mini44.z.optional(import_mini44.z.nullable(import_mini44.z.boolean()))
11664
+ var import_node_path87 = require("path");
11665
+ var import_mini45 = require("zod/mini");
11666
+ var KiroCliSubagentJsonSchema = import_mini45.z.looseObject({
11667
+ name: import_mini45.z.string(),
11668
+ description: import_mini45.z.optional(import_mini45.z.nullable(import_mini45.z.string())),
11669
+ prompt: import_mini45.z.optional(import_mini45.z.nullable(import_mini45.z.string())),
11670
+ tools: import_mini45.z.optional(import_mini45.z.nullable(import_mini45.z.array(import_mini45.z.string()))),
11671
+ toolAliases: import_mini45.z.optional(import_mini45.z.nullable(import_mini45.z.record(import_mini45.z.string(), import_mini45.z.string()))),
11672
+ toolSettings: import_mini45.z.optional(import_mini45.z.nullable(import_mini45.z.unknown())),
11673
+ toolSchema: import_mini45.z.optional(import_mini45.z.nullable(import_mini45.z.unknown())),
11674
+ hooks: import_mini45.z.optional(import_mini45.z.nullable(import_mini45.z.record(import_mini45.z.string(), import_mini45.z.array(import_mini45.z.unknown())))),
11675
+ model: import_mini45.z.optional(import_mini45.z.nullable(import_mini45.z.string())),
11676
+ mcpServers: import_mini45.z.optional(import_mini45.z.nullable(import_mini45.z.record(import_mini45.z.string(), import_mini45.z.unknown()))),
11677
+ useLegacyMcpJson: import_mini45.z.optional(import_mini45.z.nullable(import_mini45.z.boolean())),
11678
+ resources: import_mini45.z.optional(import_mini45.z.nullable(import_mini45.z.array(import_mini45.z.string()))),
11679
+ allowedTools: import_mini45.z.optional(import_mini45.z.nullable(import_mini45.z.array(import_mini45.z.string()))),
11680
+ includeMcpJson: import_mini45.z.optional(import_mini45.z.nullable(import_mini45.z.boolean()))
11447
11681
  });
11448
11682
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11449
11683
  body;
@@ -11454,7 +11688,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11454
11688
  KiroCliSubagentJsonSchema.parse(parsed);
11455
11689
  } catch (error) {
11456
11690
  throw new Error(
11457
- `Invalid JSON in ${(0, import_node_path86.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
11691
+ `Invalid JSON in ${(0, import_node_path87.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
11458
11692
  { cause: error }
11459
11693
  );
11460
11694
  }
@@ -11466,7 +11700,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11466
11700
  }
11467
11701
  static getSettablePaths(_options = {}) {
11468
11702
  return {
11469
- relativeDirPath: (0, import_node_path86.join)(".kiro", "agents")
11703
+ relativeDirPath: (0, import_node_path87.join)(".kiro", "agents")
11470
11704
  };
11471
11705
  }
11472
11706
  getBody() {
@@ -11478,7 +11712,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11478
11712
  parsed = JSON.parse(this.body);
11479
11713
  } catch (error) {
11480
11714
  throw new Error(
11481
- `Failed to parse JSON in ${(0, import_node_path86.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
11715
+ `Failed to parse JSON in ${(0, import_node_path87.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
11482
11716
  { cause: error }
11483
11717
  );
11484
11718
  }
@@ -11559,7 +11793,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11559
11793
  global = false
11560
11794
  }) {
11561
11795
  const paths = this.getSettablePaths({ global });
11562
- const filePath = (0, import_node_path86.join)(baseDir, paths.relativeDirPath, relativeFilePath);
11796
+ const filePath = (0, import_node_path87.join)(baseDir, paths.relativeDirPath, relativeFilePath);
11563
11797
  const fileContent = await readFileContent(filePath);
11564
11798
  const subagent = new _KiroSubagent({
11565
11799
  baseDir,
@@ -11597,12 +11831,12 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11597
11831
  };
11598
11832
 
11599
11833
  // src/features/subagents/opencode-subagent.ts
11600
- var import_node_path87 = require("path");
11601
- var import_mini45 = require("zod/mini");
11602
- var OpenCodeSubagentFrontmatterSchema = import_mini45.z.looseObject({
11603
- description: import_mini45.z.string(),
11604
- mode: import_mini45.z._default(import_mini45.z.string(), "subagent"),
11605
- name: import_mini45.z.optional(import_mini45.z.string())
11834
+ var import_node_path88 = require("path");
11835
+ var import_mini46 = require("zod/mini");
11836
+ var OpenCodeSubagentFrontmatterSchema = import_mini46.z.looseObject({
11837
+ description: import_mini46.z.string(),
11838
+ mode: import_mini46.z._default(import_mini46.z.string(), "subagent"),
11839
+ name: import_mini46.z.optional(import_mini46.z.string())
11606
11840
  });
11607
11841
  var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11608
11842
  frontmatter;
@@ -11612,7 +11846,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11612
11846
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
11613
11847
  if (!result.success) {
11614
11848
  throw new Error(
11615
- `Invalid frontmatter in ${(0, import_node_path87.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11849
+ `Invalid frontmatter in ${(0, import_node_path88.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11616
11850
  );
11617
11851
  }
11618
11852
  }
@@ -11626,7 +11860,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11626
11860
  global = false
11627
11861
  } = {}) {
11628
11862
  return {
11629
- relativeDirPath: global ? (0, import_node_path87.join)(".config", "opencode", "agent") : (0, import_node_path87.join)(".opencode", "agent")
11863
+ relativeDirPath: global ? (0, import_node_path88.join)(".config", "opencode", "agent") : (0, import_node_path88.join)(".opencode", "agent")
11630
11864
  };
11631
11865
  }
11632
11866
  getFrontmatter() {
@@ -11639,7 +11873,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11639
11873
  const { description, mode, name, ...opencodeSection } = this.frontmatter;
11640
11874
  const rulesyncFrontmatter = {
11641
11875
  targets: ["*"],
11642
- name: name ?? (0, import_node_path87.basename)(this.getRelativeFilePath(), ".md"),
11876
+ name: name ?? (0, import_node_path88.basename)(this.getRelativeFilePath(), ".md"),
11643
11877
  description,
11644
11878
  opencode: { mode, ...opencodeSection }
11645
11879
  };
@@ -11664,7 +11898,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11664
11898
  const opencodeFrontmatter = {
11665
11899
  ...opencodeSection,
11666
11900
  description: rulesyncFrontmatter.description,
11667
- mode: "subagent",
11901
+ mode: typeof opencodeSection.mode === "string" ? opencodeSection.mode : "subagent",
11668
11902
  ...rulesyncFrontmatter.name && { name: rulesyncFrontmatter.name }
11669
11903
  };
11670
11904
  const body = rulesyncSubagent.getBody();
@@ -11692,7 +11926,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11692
11926
  return {
11693
11927
  success: false,
11694
11928
  error: new Error(
11695
- `Invalid frontmatter in ${(0, import_node_path87.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11929
+ `Invalid frontmatter in ${(0, import_node_path88.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11696
11930
  )
11697
11931
  };
11698
11932
  }
@@ -11709,7 +11943,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11709
11943
  global = false
11710
11944
  }) {
11711
11945
  const paths = this.getSettablePaths({ global });
11712
- const filePath = (0, import_node_path87.join)(baseDir, paths.relativeDirPath, relativeFilePath);
11946
+ const filePath = (0, import_node_path88.join)(baseDir, paths.relativeDirPath, relativeFilePath);
11713
11947
  const fileContent = await readFileContent(filePath);
11714
11948
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11715
11949
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11758,7 +11992,7 @@ var subagentsProcessorToolTargetTuple = [
11758
11992
  "opencode",
11759
11993
  "roo"
11760
11994
  ];
11761
- var SubagentsProcessorToolTargetSchema = import_mini46.z.enum(subagentsProcessorToolTargetTuple);
11995
+ var SubagentsProcessorToolTargetSchema = import_mini47.z.enum(subagentsProcessorToolTargetTuple);
11762
11996
  var toolSubagentFactories = /* @__PURE__ */ new Map([
11763
11997
  [
11764
11998
  "agentsmd",
@@ -11920,7 +12154,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
11920
12154
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
11921
12155
  */
11922
12156
  async loadRulesyncFiles() {
11923
- const subagentsDir = (0, import_node_path88.join)(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
12157
+ const subagentsDir = (0, import_node_path89.join)(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
11924
12158
  const dirExists = await directoryExists(subagentsDir);
11925
12159
  if (!dirExists) {
11926
12160
  logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -11935,7 +12169,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
11935
12169
  logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
11936
12170
  const rulesyncSubagents = [];
11937
12171
  for (const mdFile of mdFiles) {
11938
- const filepath = (0, import_node_path88.join)(subagentsDir, mdFile);
12172
+ const filepath = (0, import_node_path89.join)(subagentsDir, mdFile);
11939
12173
  try {
11940
12174
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
11941
12175
  relativeFilePath: mdFile,
@@ -11965,14 +12199,14 @@ var SubagentsProcessor = class extends FeatureProcessor {
11965
12199
  const factory = this.getFactory(this.toolTarget);
11966
12200
  const paths = factory.class.getSettablePaths({ global: this.global });
11967
12201
  const subagentFilePaths = await findFilesByGlobs(
11968
- (0, import_node_path88.join)(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
12202
+ (0, import_node_path89.join)(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
11969
12203
  );
11970
12204
  if (forDeletion) {
11971
12205
  const toolSubagents2 = subagentFilePaths.map(
11972
12206
  (path3) => factory.class.forDeletion({
11973
12207
  baseDir: this.baseDir,
11974
12208
  relativeDirPath: paths.relativeDirPath,
11975
- relativeFilePath: (0, import_node_path88.basename)(path3),
12209
+ relativeFilePath: (0, import_node_path89.basename)(path3),
11976
12210
  global: this.global
11977
12211
  })
11978
12212
  ).filter((subagent) => subagent.isDeletable());
@@ -11985,7 +12219,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
11985
12219
  subagentFilePaths.map(
11986
12220
  (path3) => factory.class.fromFile({
11987
12221
  baseDir: this.baseDir,
11988
- relativeFilePath: (0, import_node_path88.basename)(path3),
12222
+ relativeFilePath: (0, import_node_path89.basename)(path3),
11989
12223
  global: this.global
11990
12224
  })
11991
12225
  )
@@ -12030,49 +12264,49 @@ var SubagentsProcessor = class extends FeatureProcessor {
12030
12264
  };
12031
12265
 
12032
12266
  // src/features/rules/agentsmd-rule.ts
12033
- var import_node_path91 = require("path");
12267
+ var import_node_path92 = require("path");
12034
12268
 
12035
12269
  // src/features/rules/tool-rule.ts
12036
- var import_node_path90 = require("path");
12270
+ var import_node_path91 = require("path");
12037
12271
 
12038
12272
  // src/features/rules/rulesync-rule.ts
12039
- var import_node_path89 = require("path");
12040
- var import_mini47 = require("zod/mini");
12041
- var RulesyncRuleFrontmatterSchema = import_mini47.z.object({
12042
- root: import_mini47.z.optional(import_mini47.z.boolean()),
12043
- localRoot: import_mini47.z.optional(import_mini47.z.boolean()),
12044
- targets: import_mini47.z._default(RulesyncTargetsSchema, ["*"]),
12045
- description: import_mini47.z.optional(import_mini47.z.string()),
12046
- globs: import_mini47.z.optional(import_mini47.z.array(import_mini47.z.string())),
12047
- agentsmd: import_mini47.z.optional(
12048
- import_mini47.z.object({
12273
+ var import_node_path90 = require("path");
12274
+ var import_mini48 = require("zod/mini");
12275
+ var RulesyncRuleFrontmatterSchema = import_mini48.z.object({
12276
+ root: import_mini48.z.optional(import_mini48.z.boolean()),
12277
+ localRoot: import_mini48.z.optional(import_mini48.z.boolean()),
12278
+ targets: import_mini48.z._default(RulesyncTargetsSchema, ["*"]),
12279
+ description: import_mini48.z.optional(import_mini48.z.string()),
12280
+ globs: import_mini48.z.optional(import_mini48.z.array(import_mini48.z.string())),
12281
+ agentsmd: import_mini48.z.optional(
12282
+ import_mini48.z.object({
12049
12283
  // @example "path/to/subproject"
12050
- subprojectPath: import_mini47.z.optional(import_mini47.z.string())
12284
+ subprojectPath: import_mini48.z.optional(import_mini48.z.string())
12051
12285
  })
12052
12286
  ),
12053
- claudecode: import_mini47.z.optional(
12054
- import_mini47.z.object({
12287
+ claudecode: import_mini48.z.optional(
12288
+ import_mini48.z.object({
12055
12289
  // Glob patterns for conditional rules (takes precedence over globs)
12056
12290
  // @example ["src/**/*.ts", "tests/**/*.test.ts"]
12057
- paths: import_mini47.z.optional(import_mini47.z.array(import_mini47.z.string()))
12291
+ paths: import_mini48.z.optional(import_mini48.z.array(import_mini48.z.string()))
12058
12292
  })
12059
12293
  ),
12060
- cursor: import_mini47.z.optional(
12061
- import_mini47.z.object({
12062
- alwaysApply: import_mini47.z.optional(import_mini47.z.boolean()),
12063
- description: import_mini47.z.optional(import_mini47.z.string()),
12064
- globs: import_mini47.z.optional(import_mini47.z.array(import_mini47.z.string()))
12294
+ cursor: import_mini48.z.optional(
12295
+ import_mini48.z.object({
12296
+ alwaysApply: import_mini48.z.optional(import_mini48.z.boolean()),
12297
+ description: import_mini48.z.optional(import_mini48.z.string()),
12298
+ globs: import_mini48.z.optional(import_mini48.z.array(import_mini48.z.string()))
12065
12299
  })
12066
12300
  ),
12067
- copilot: import_mini47.z.optional(
12068
- import_mini47.z.object({
12069
- excludeAgent: import_mini47.z.optional(import_mini47.z.union([import_mini47.z.literal("code-review"), import_mini47.z.literal("coding-agent")]))
12301
+ copilot: import_mini48.z.optional(
12302
+ import_mini48.z.object({
12303
+ excludeAgent: import_mini48.z.optional(import_mini48.z.union([import_mini48.z.literal("code-review"), import_mini48.z.literal("coding-agent")]))
12070
12304
  })
12071
12305
  ),
12072
- antigravity: import_mini47.z.optional(
12073
- import_mini47.z.looseObject({
12074
- trigger: import_mini47.z.optional(import_mini47.z.string()),
12075
- globs: import_mini47.z.optional(import_mini47.z.array(import_mini47.z.string()))
12306
+ antigravity: import_mini48.z.optional(
12307
+ import_mini48.z.looseObject({
12308
+ trigger: import_mini48.z.optional(import_mini48.z.string()),
12309
+ globs: import_mini48.z.optional(import_mini48.z.array(import_mini48.z.string()))
12076
12310
  })
12077
12311
  )
12078
12312
  });
@@ -12083,7 +12317,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
12083
12317
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
12084
12318
  if (!parseResult.success && rest.validate !== false) {
12085
12319
  throw new Error(
12086
- `Invalid frontmatter in ${(0, import_node_path89.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
12320
+ `Invalid frontmatter in ${(0, import_node_path90.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
12087
12321
  );
12088
12322
  }
12089
12323
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -12118,7 +12352,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
12118
12352
  return {
12119
12353
  success: false,
12120
12354
  error: new Error(
12121
- `Invalid frontmatter in ${(0, import_node_path89.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12355
+ `Invalid frontmatter in ${(0, import_node_path90.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12122
12356
  )
12123
12357
  };
12124
12358
  }
@@ -12127,7 +12361,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
12127
12361
  relativeFilePath,
12128
12362
  validate = true
12129
12363
  }) {
12130
- const filePath = (0, import_node_path89.join)(
12364
+ const filePath = (0, import_node_path90.join)(
12131
12365
  process.cwd(),
12132
12366
  this.getSettablePaths().recommended.relativeDirPath,
12133
12367
  relativeFilePath
@@ -12229,7 +12463,7 @@ var ToolRule = class extends ToolFile {
12229
12463
  rulesyncRule,
12230
12464
  validate = true,
12231
12465
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
12232
- nonRootPath = { relativeDirPath: (0, import_node_path90.join)(".agents", "memories") }
12466
+ nonRootPath = { relativeDirPath: (0, import_node_path91.join)(".agents", "memories") }
12233
12467
  }) {
12234
12468
  const params = this.buildToolRuleParamsDefault({
12235
12469
  baseDir,
@@ -12240,7 +12474,7 @@ var ToolRule = class extends ToolFile {
12240
12474
  });
12241
12475
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
12242
12476
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
12243
- params.relativeDirPath = (0, import_node_path90.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
12477
+ params.relativeDirPath = (0, import_node_path91.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
12244
12478
  params.relativeFilePath = "AGENTS.md";
12245
12479
  }
12246
12480
  return params;
@@ -12289,7 +12523,7 @@ var ToolRule = class extends ToolFile {
12289
12523
  }
12290
12524
  };
12291
12525
  function buildToolPath(toolDir, subDir, excludeToolDir) {
12292
- return excludeToolDir ? subDir : (0, import_node_path90.join)(toolDir, subDir);
12526
+ return excludeToolDir ? subDir : (0, import_node_path91.join)(toolDir, subDir);
12293
12527
  }
12294
12528
 
12295
12529
  // src/features/rules/agentsmd-rule.ts
@@ -12318,8 +12552,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
12318
12552
  validate = true
12319
12553
  }) {
12320
12554
  const isRoot = relativeFilePath === "AGENTS.md";
12321
- const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path91.join)(".agents", "memories", relativeFilePath);
12322
- const fileContent = await readFileContent((0, import_node_path91.join)(baseDir, relativePath));
12555
+ const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path92.join)(".agents", "memories", relativeFilePath);
12556
+ const fileContent = await readFileContent((0, import_node_path92.join)(baseDir, relativePath));
12323
12557
  return new _AgentsMdRule({
12324
12558
  baseDir,
12325
12559
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -12374,21 +12608,21 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
12374
12608
  };
12375
12609
 
12376
12610
  // src/features/rules/antigravity-rule.ts
12377
- var import_node_path92 = require("path");
12378
- var import_mini48 = require("zod/mini");
12379
- var AntigravityRuleFrontmatterSchema = import_mini48.z.looseObject({
12380
- trigger: import_mini48.z.optional(
12381
- import_mini48.z.union([
12382
- import_mini48.z.literal("always_on"),
12383
- import_mini48.z.literal("glob"),
12384
- import_mini48.z.literal("manual"),
12385
- import_mini48.z.literal("model_decision"),
12386
- import_mini48.z.string()
12611
+ var import_node_path93 = require("path");
12612
+ var import_mini49 = require("zod/mini");
12613
+ var AntigravityRuleFrontmatterSchema = import_mini49.z.looseObject({
12614
+ trigger: import_mini49.z.optional(
12615
+ import_mini49.z.union([
12616
+ import_mini49.z.literal("always_on"),
12617
+ import_mini49.z.literal("glob"),
12618
+ import_mini49.z.literal("manual"),
12619
+ import_mini49.z.literal("model_decision"),
12620
+ import_mini49.z.string()
12387
12621
  // accepts any string for forward compatibility
12388
12622
  ])
12389
12623
  ),
12390
- globs: import_mini48.z.optional(import_mini48.z.string()),
12391
- description: import_mini48.z.optional(import_mini48.z.string())
12624
+ globs: import_mini49.z.optional(import_mini49.z.string()),
12625
+ description: import_mini49.z.optional(import_mini49.z.string())
12392
12626
  });
12393
12627
  function parseGlobsString(globs) {
12394
12628
  if (!globs) {
@@ -12533,7 +12767,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
12533
12767
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
12534
12768
  if (!result.success) {
12535
12769
  throw new Error(
12536
- `Invalid frontmatter in ${(0, import_node_path92.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12770
+ `Invalid frontmatter in ${(0, import_node_path93.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12537
12771
  );
12538
12772
  }
12539
12773
  }
@@ -12557,7 +12791,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
12557
12791
  relativeFilePath,
12558
12792
  validate = true
12559
12793
  }) {
12560
- const filePath = (0, import_node_path92.join)(
12794
+ const filePath = (0, import_node_path93.join)(
12561
12795
  baseDir,
12562
12796
  this.getSettablePaths().nonRoot.relativeDirPath,
12563
12797
  relativeFilePath
@@ -12698,7 +12932,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
12698
12932
  };
12699
12933
 
12700
12934
  // src/features/rules/augmentcode-legacy-rule.ts
12701
- var import_node_path93 = require("path");
12935
+ var import_node_path94 = require("path");
12702
12936
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
12703
12937
  toRulesyncRule() {
12704
12938
  const rulesyncFrontmatter = {
@@ -12759,8 +12993,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
12759
12993
  }) {
12760
12994
  const settablePaths = this.getSettablePaths();
12761
12995
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
12762
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path93.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
12763
- const fileContent = await readFileContent((0, import_node_path93.join)(baseDir, relativePath));
12996
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path94.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
12997
+ const fileContent = await readFileContent((0, import_node_path94.join)(baseDir, relativePath));
12764
12998
  return new _AugmentcodeLegacyRule({
12765
12999
  baseDir,
12766
13000
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -12789,7 +13023,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
12789
13023
  };
12790
13024
 
12791
13025
  // src/features/rules/augmentcode-rule.ts
12792
- var import_node_path94 = require("path");
13026
+ var import_node_path95 = require("path");
12793
13027
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
12794
13028
  toRulesyncRule() {
12795
13029
  return this.toRulesyncRuleDefault();
@@ -12820,7 +13054,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
12820
13054
  relativeFilePath,
12821
13055
  validate = true
12822
13056
  }) {
12823
- const filePath = (0, import_node_path94.join)(
13057
+ const filePath = (0, import_node_path95.join)(
12824
13058
  baseDir,
12825
13059
  this.getSettablePaths().nonRoot.relativeDirPath,
12826
13060
  relativeFilePath
@@ -12860,7 +13094,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
12860
13094
  };
12861
13095
 
12862
13096
  // src/features/rules/claudecode-legacy-rule.ts
12863
- var import_node_path95 = require("path");
13097
+ var import_node_path96 = require("path");
12864
13098
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
12865
13099
  static getSettablePaths({
12866
13100
  global,
@@ -12895,7 +13129,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
12895
13129
  if (isRoot) {
12896
13130
  const relativePath2 = paths.root.relativeFilePath;
12897
13131
  const fileContent2 = await readFileContent(
12898
- (0, import_node_path95.join)(baseDir, paths.root.relativeDirPath, relativePath2)
13132
+ (0, import_node_path96.join)(baseDir, paths.root.relativeDirPath, relativePath2)
12899
13133
  );
12900
13134
  return new _ClaudecodeLegacyRule({
12901
13135
  baseDir,
@@ -12909,8 +13143,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
12909
13143
  if (!paths.nonRoot) {
12910
13144
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
12911
13145
  }
12912
- const relativePath = (0, import_node_path95.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
12913
- const fileContent = await readFileContent((0, import_node_path95.join)(baseDir, relativePath));
13146
+ const relativePath = (0, import_node_path96.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
13147
+ const fileContent = await readFileContent((0, import_node_path96.join)(baseDir, relativePath));
12914
13148
  return new _ClaudecodeLegacyRule({
12915
13149
  baseDir,
12916
13150
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -12969,10 +13203,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
12969
13203
  };
12970
13204
 
12971
13205
  // src/features/rules/claudecode-rule.ts
12972
- var import_node_path96 = require("path");
12973
- var import_mini49 = require("zod/mini");
12974
- var ClaudecodeRuleFrontmatterSchema = import_mini49.z.object({
12975
- paths: import_mini49.z.optional(import_mini49.z.array(import_mini49.z.string()))
13206
+ var import_node_path97 = require("path");
13207
+ var import_mini50 = require("zod/mini");
13208
+ var ClaudecodeRuleFrontmatterSchema = import_mini50.z.object({
13209
+ paths: import_mini50.z.optional(import_mini50.z.array(import_mini50.z.string()))
12976
13210
  });
12977
13211
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
12978
13212
  frontmatter;
@@ -13004,7 +13238,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13004
13238
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
13005
13239
  if (!result.success) {
13006
13240
  throw new Error(
13007
- `Invalid frontmatter in ${(0, import_node_path96.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13241
+ `Invalid frontmatter in ${(0, import_node_path97.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13008
13242
  );
13009
13243
  }
13010
13244
  }
@@ -13032,7 +13266,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13032
13266
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
13033
13267
  if (isRoot) {
13034
13268
  const fileContent2 = await readFileContent(
13035
- (0, import_node_path96.join)(baseDir, paths.root.relativeDirPath, paths.root.relativeFilePath)
13269
+ (0, import_node_path97.join)(baseDir, paths.root.relativeDirPath, paths.root.relativeFilePath)
13036
13270
  );
13037
13271
  return new _ClaudecodeRule({
13038
13272
  baseDir,
@@ -13047,16 +13281,16 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13047
13281
  if (!paths.nonRoot) {
13048
13282
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13049
13283
  }
13050
- const relativePath = (0, import_node_path96.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
13051
- const fileContent = await readFileContent((0, import_node_path96.join)(baseDir, relativePath));
13284
+ const relativePath = (0, import_node_path97.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
13285
+ const fileContent = await readFileContent((0, import_node_path97.join)(baseDir, relativePath));
13052
13286
  const { frontmatter, body: content } = parseFrontmatter(
13053
13287
  fileContent,
13054
- (0, import_node_path96.join)(baseDir, relativePath)
13288
+ (0, import_node_path97.join)(baseDir, relativePath)
13055
13289
  );
13056
13290
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
13057
13291
  if (!result.success) {
13058
13292
  throw new Error(
13059
- `Invalid frontmatter in ${(0, import_node_path96.join)(baseDir, relativePath)}: ${formatError(result.error)}`
13293
+ `Invalid frontmatter in ${(0, import_node_path97.join)(baseDir, relativePath)}: ${formatError(result.error)}`
13060
13294
  );
13061
13295
  }
13062
13296
  return new _ClaudecodeRule({
@@ -13163,7 +13397,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13163
13397
  return {
13164
13398
  success: false,
13165
13399
  error: new Error(
13166
- `Invalid frontmatter in ${(0, import_node_path96.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13400
+ `Invalid frontmatter in ${(0, import_node_path97.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13167
13401
  )
13168
13402
  };
13169
13403
  }
@@ -13183,10 +13417,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13183
13417
  };
13184
13418
 
13185
13419
  // src/features/rules/cline-rule.ts
13186
- var import_node_path97 = require("path");
13187
- var import_mini50 = require("zod/mini");
13188
- var ClineRuleFrontmatterSchema = import_mini50.z.object({
13189
- description: import_mini50.z.string()
13420
+ var import_node_path98 = require("path");
13421
+ var import_mini51 = require("zod/mini");
13422
+ var ClineRuleFrontmatterSchema = import_mini51.z.object({
13423
+ description: import_mini51.z.string()
13190
13424
  });
13191
13425
  var ClineRule = class _ClineRule extends ToolRule {
13192
13426
  static getSettablePaths(_options = {}) {
@@ -13229,7 +13463,7 @@ var ClineRule = class _ClineRule extends ToolRule {
13229
13463
  validate = true
13230
13464
  }) {
13231
13465
  const fileContent = await readFileContent(
13232
- (0, import_node_path97.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
13466
+ (0, import_node_path98.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
13233
13467
  );
13234
13468
  return new _ClineRule({
13235
13469
  baseDir,
@@ -13255,7 +13489,7 @@ var ClineRule = class _ClineRule extends ToolRule {
13255
13489
  };
13256
13490
 
13257
13491
  // src/features/rules/codexcli-rule.ts
13258
- var import_node_path98 = require("path");
13492
+ var import_node_path99 = require("path");
13259
13493
  var CodexcliRule = class _CodexcliRule extends ToolRule {
13260
13494
  static getSettablePaths({
13261
13495
  global,
@@ -13290,7 +13524,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
13290
13524
  if (isRoot) {
13291
13525
  const relativePath2 = paths.root.relativeFilePath;
13292
13526
  const fileContent2 = await readFileContent(
13293
- (0, import_node_path98.join)(baseDir, paths.root.relativeDirPath, relativePath2)
13527
+ (0, import_node_path99.join)(baseDir, paths.root.relativeDirPath, relativePath2)
13294
13528
  );
13295
13529
  return new _CodexcliRule({
13296
13530
  baseDir,
@@ -13304,8 +13538,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
13304
13538
  if (!paths.nonRoot) {
13305
13539
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13306
13540
  }
13307
- const relativePath = (0, import_node_path98.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
13308
- const fileContent = await readFileContent((0, import_node_path98.join)(baseDir, relativePath));
13541
+ const relativePath = (0, import_node_path99.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
13542
+ const fileContent = await readFileContent((0, import_node_path99.join)(baseDir, relativePath));
13309
13543
  return new _CodexcliRule({
13310
13544
  baseDir,
13311
13545
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -13364,12 +13598,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
13364
13598
  };
13365
13599
 
13366
13600
  // src/features/rules/copilot-rule.ts
13367
- var import_node_path99 = require("path");
13368
- var import_mini51 = require("zod/mini");
13369
- var CopilotRuleFrontmatterSchema = import_mini51.z.object({
13370
- description: import_mini51.z.optional(import_mini51.z.string()),
13371
- applyTo: import_mini51.z.optional(import_mini51.z.string()),
13372
- excludeAgent: import_mini51.z.optional(import_mini51.z.union([import_mini51.z.literal("code-review"), import_mini51.z.literal("coding-agent")]))
13601
+ var import_node_path100 = require("path");
13602
+ var import_mini52 = require("zod/mini");
13603
+ var CopilotRuleFrontmatterSchema = import_mini52.z.object({
13604
+ description: import_mini52.z.optional(import_mini52.z.string()),
13605
+ applyTo: import_mini52.z.optional(import_mini52.z.string()),
13606
+ excludeAgent: import_mini52.z.optional(import_mini52.z.union([import_mini52.z.literal("code-review"), import_mini52.z.literal("coding-agent")]))
13373
13607
  });
13374
13608
  var CopilotRule = class _CopilotRule extends ToolRule {
13375
13609
  frontmatter;
@@ -13398,7 +13632,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13398
13632
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
13399
13633
  if (!result.success) {
13400
13634
  throw new Error(
13401
- `Invalid frontmatter in ${(0, import_node_path99.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13635
+ `Invalid frontmatter in ${(0, import_node_path100.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13402
13636
  );
13403
13637
  }
13404
13638
  }
@@ -13488,8 +13722,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13488
13722
  const paths = this.getSettablePaths({ global });
13489
13723
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
13490
13724
  if (isRoot) {
13491
- const relativePath2 = (0, import_node_path99.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
13492
- const fileContent2 = await readFileContent((0, import_node_path99.join)(baseDir, relativePath2));
13725
+ const relativePath2 = (0, import_node_path100.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
13726
+ const fileContent2 = await readFileContent((0, import_node_path100.join)(baseDir, relativePath2));
13493
13727
  return new _CopilotRule({
13494
13728
  baseDir,
13495
13729
  relativeDirPath: paths.root.relativeDirPath,
@@ -13503,16 +13737,16 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13503
13737
  if (!paths.nonRoot) {
13504
13738
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13505
13739
  }
13506
- const relativePath = (0, import_node_path99.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
13507
- const fileContent = await readFileContent((0, import_node_path99.join)(baseDir, relativePath));
13740
+ const relativePath = (0, import_node_path100.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
13741
+ const fileContent = await readFileContent((0, import_node_path100.join)(baseDir, relativePath));
13508
13742
  const { frontmatter, body: content } = parseFrontmatter(
13509
13743
  fileContent,
13510
- (0, import_node_path99.join)(baseDir, relativePath)
13744
+ (0, import_node_path100.join)(baseDir, relativePath)
13511
13745
  );
13512
13746
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
13513
13747
  if (!result.success) {
13514
13748
  throw new Error(
13515
- `Invalid frontmatter in ${(0, import_node_path99.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
13749
+ `Invalid frontmatter in ${(0, import_node_path100.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
13516
13750
  );
13517
13751
  }
13518
13752
  return new _CopilotRule({
@@ -13554,7 +13788,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13554
13788
  return {
13555
13789
  success: false,
13556
13790
  error: new Error(
13557
- `Invalid frontmatter in ${(0, import_node_path99.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13791
+ `Invalid frontmatter in ${(0, import_node_path100.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13558
13792
  )
13559
13793
  };
13560
13794
  }
@@ -13574,12 +13808,12 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13574
13808
  };
13575
13809
 
13576
13810
  // src/features/rules/cursor-rule.ts
13577
- var import_node_path100 = require("path");
13578
- var import_mini52 = require("zod/mini");
13579
- var CursorRuleFrontmatterSchema = import_mini52.z.object({
13580
- description: import_mini52.z.optional(import_mini52.z.string()),
13581
- globs: import_mini52.z.optional(import_mini52.z.string()),
13582
- alwaysApply: import_mini52.z.optional(import_mini52.z.boolean())
13811
+ var import_node_path101 = require("path");
13812
+ var import_mini53 = require("zod/mini");
13813
+ var CursorRuleFrontmatterSchema = import_mini53.z.object({
13814
+ description: import_mini53.z.optional(import_mini53.z.string()),
13815
+ globs: import_mini53.z.optional(import_mini53.z.string()),
13816
+ alwaysApply: import_mini53.z.optional(import_mini53.z.boolean())
13583
13817
  });
13584
13818
  var CursorRule = class _CursorRule extends ToolRule {
13585
13819
  frontmatter;
@@ -13596,7 +13830,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13596
13830
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
13597
13831
  if (!result.success) {
13598
13832
  throw new Error(
13599
- `Invalid frontmatter in ${(0, import_node_path100.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13833
+ `Invalid frontmatter in ${(0, import_node_path101.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13600
13834
  );
13601
13835
  }
13602
13836
  }
@@ -13712,7 +13946,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13712
13946
  relativeFilePath,
13713
13947
  validate = true
13714
13948
  }) {
13715
- const filePath = (0, import_node_path100.join)(
13949
+ const filePath = (0, import_node_path101.join)(
13716
13950
  baseDir,
13717
13951
  this.getSettablePaths().nonRoot.relativeDirPath,
13718
13952
  relativeFilePath
@@ -13722,7 +13956,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13722
13956
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
13723
13957
  if (!result.success) {
13724
13958
  throw new Error(
13725
- `Invalid frontmatter in ${(0, import_node_path100.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
13959
+ `Invalid frontmatter in ${(0, import_node_path101.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
13726
13960
  );
13727
13961
  }
13728
13962
  return new _CursorRule({
@@ -13759,7 +13993,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13759
13993
  return {
13760
13994
  success: false,
13761
13995
  error: new Error(
13762
- `Invalid frontmatter in ${(0, import_node_path100.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13996
+ `Invalid frontmatter in ${(0, import_node_path101.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13763
13997
  )
13764
13998
  };
13765
13999
  }
@@ -13779,7 +14013,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13779
14013
  };
13780
14014
 
13781
14015
  // src/features/rules/factorydroid-rule.ts
13782
- var import_node_path101 = require("path");
14016
+ var import_node_path102 = require("path");
13783
14017
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
13784
14018
  constructor({ fileContent, root, ...rest }) {
13785
14019
  super({
@@ -13819,8 +14053,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
13819
14053
  const paths = this.getSettablePaths({ global });
13820
14054
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
13821
14055
  if (isRoot) {
13822
- const relativePath2 = (0, import_node_path101.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
13823
- const fileContent2 = await readFileContent((0, import_node_path101.join)(baseDir, relativePath2));
14056
+ const relativePath2 = (0, import_node_path102.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
14057
+ const fileContent2 = await readFileContent((0, import_node_path102.join)(baseDir, relativePath2));
13824
14058
  return new _FactorydroidRule({
13825
14059
  baseDir,
13826
14060
  relativeDirPath: paths.root.relativeDirPath,
@@ -13833,8 +14067,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
13833
14067
  if (!paths.nonRoot) {
13834
14068
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13835
14069
  }
13836
- const relativePath = (0, import_node_path101.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
13837
- const fileContent = await readFileContent((0, import_node_path101.join)(baseDir, relativePath));
14070
+ const relativePath = (0, import_node_path102.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14071
+ const fileContent = await readFileContent((0, import_node_path102.join)(baseDir, relativePath));
13838
14072
  return new _FactorydroidRule({
13839
14073
  baseDir,
13840
14074
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -13893,7 +14127,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
13893
14127
  };
13894
14128
 
13895
14129
  // src/features/rules/geminicli-rule.ts
13896
- var import_node_path102 = require("path");
14130
+ var import_node_path103 = require("path");
13897
14131
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
13898
14132
  static getSettablePaths({
13899
14133
  global,
@@ -13928,7 +14162,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
13928
14162
  if (isRoot) {
13929
14163
  const relativePath2 = paths.root.relativeFilePath;
13930
14164
  const fileContent2 = await readFileContent(
13931
- (0, import_node_path102.join)(baseDir, paths.root.relativeDirPath, relativePath2)
14165
+ (0, import_node_path103.join)(baseDir, paths.root.relativeDirPath, relativePath2)
13932
14166
  );
13933
14167
  return new _GeminiCliRule({
13934
14168
  baseDir,
@@ -13942,8 +14176,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
13942
14176
  if (!paths.nonRoot) {
13943
14177
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13944
14178
  }
13945
- const relativePath = (0, import_node_path102.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
13946
- const fileContent = await readFileContent((0, import_node_path102.join)(baseDir, relativePath));
14179
+ const relativePath = (0, import_node_path103.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14180
+ const fileContent = await readFileContent((0, import_node_path103.join)(baseDir, relativePath));
13947
14181
  return new _GeminiCliRule({
13948
14182
  baseDir,
13949
14183
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -14002,7 +14236,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
14002
14236
  };
14003
14237
 
14004
14238
  // src/features/rules/goose-rule.ts
14005
- var import_node_path103 = require("path");
14239
+ var import_node_path104 = require("path");
14006
14240
  var GooseRule = class _GooseRule extends ToolRule {
14007
14241
  static getSettablePaths({
14008
14242
  global,
@@ -14037,7 +14271,7 @@ var GooseRule = class _GooseRule extends ToolRule {
14037
14271
  if (isRoot) {
14038
14272
  const relativePath2 = paths.root.relativeFilePath;
14039
14273
  const fileContent2 = await readFileContent(
14040
- (0, import_node_path103.join)(baseDir, paths.root.relativeDirPath, relativePath2)
14274
+ (0, import_node_path104.join)(baseDir, paths.root.relativeDirPath, relativePath2)
14041
14275
  );
14042
14276
  return new _GooseRule({
14043
14277
  baseDir,
@@ -14051,8 +14285,8 @@ var GooseRule = class _GooseRule extends ToolRule {
14051
14285
  if (!paths.nonRoot) {
14052
14286
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14053
14287
  }
14054
- const relativePath = (0, import_node_path103.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14055
- const fileContent = await readFileContent((0, import_node_path103.join)(baseDir, relativePath));
14288
+ const relativePath = (0, import_node_path104.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14289
+ const fileContent = await readFileContent((0, import_node_path104.join)(baseDir, relativePath));
14056
14290
  return new _GooseRule({
14057
14291
  baseDir,
14058
14292
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -14111,7 +14345,7 @@ var GooseRule = class _GooseRule extends ToolRule {
14111
14345
  };
14112
14346
 
14113
14347
  // src/features/rules/junie-rule.ts
14114
- var import_node_path104 = require("path");
14348
+ var import_node_path105 = require("path");
14115
14349
  var JunieRule = class _JunieRule extends ToolRule {
14116
14350
  static getSettablePaths(_options = {}) {
14117
14351
  return {
@@ -14130,8 +14364,8 @@ var JunieRule = class _JunieRule extends ToolRule {
14130
14364
  validate = true
14131
14365
  }) {
14132
14366
  const isRoot = relativeFilePath === "guidelines.md";
14133
- const relativePath = isRoot ? "guidelines.md" : (0, import_node_path104.join)(".junie", "memories", relativeFilePath);
14134
- const fileContent = await readFileContent((0, import_node_path104.join)(baseDir, relativePath));
14367
+ const relativePath = isRoot ? "guidelines.md" : (0, import_node_path105.join)(".junie", "memories", relativeFilePath);
14368
+ const fileContent = await readFileContent((0, import_node_path105.join)(baseDir, relativePath));
14135
14369
  return new _JunieRule({
14136
14370
  baseDir,
14137
14371
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -14186,7 +14420,7 @@ var JunieRule = class _JunieRule extends ToolRule {
14186
14420
  };
14187
14421
 
14188
14422
  // src/features/rules/kilo-rule.ts
14189
- var import_node_path105 = require("path");
14423
+ var import_node_path106 = require("path");
14190
14424
  var KiloRule = class _KiloRule extends ToolRule {
14191
14425
  static getSettablePaths(_options = {}) {
14192
14426
  return {
@@ -14201,7 +14435,7 @@ var KiloRule = class _KiloRule extends ToolRule {
14201
14435
  validate = true
14202
14436
  }) {
14203
14437
  const fileContent = await readFileContent(
14204
- (0, import_node_path105.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14438
+ (0, import_node_path106.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14205
14439
  );
14206
14440
  return new _KiloRule({
14207
14441
  baseDir,
@@ -14253,7 +14487,7 @@ var KiloRule = class _KiloRule extends ToolRule {
14253
14487
  };
14254
14488
 
14255
14489
  // src/features/rules/kiro-rule.ts
14256
- var import_node_path106 = require("path");
14490
+ var import_node_path107 = require("path");
14257
14491
  var KiroRule = class _KiroRule extends ToolRule {
14258
14492
  static getSettablePaths(_options = {}) {
14259
14493
  return {
@@ -14268,7 +14502,7 @@ var KiroRule = class _KiroRule extends ToolRule {
14268
14502
  validate = true
14269
14503
  }) {
14270
14504
  const fileContent = await readFileContent(
14271
- (0, import_node_path106.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14505
+ (0, import_node_path107.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14272
14506
  );
14273
14507
  return new _KiroRule({
14274
14508
  baseDir,
@@ -14322,7 +14556,7 @@ var KiroRule = class _KiroRule extends ToolRule {
14322
14556
  };
14323
14557
 
14324
14558
  // src/features/rules/opencode-rule.ts
14325
- var import_node_path107 = require("path");
14559
+ var import_node_path108 = require("path");
14326
14560
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
14327
14561
  static getSettablePaths({
14328
14562
  global,
@@ -14357,7 +14591,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
14357
14591
  if (isRoot) {
14358
14592
  const relativePath2 = paths.root.relativeFilePath;
14359
14593
  const fileContent2 = await readFileContent(
14360
- (0, import_node_path107.join)(baseDir, paths.root.relativeDirPath, relativePath2)
14594
+ (0, import_node_path108.join)(baseDir, paths.root.relativeDirPath, relativePath2)
14361
14595
  );
14362
14596
  return new _OpenCodeRule({
14363
14597
  baseDir,
@@ -14371,8 +14605,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
14371
14605
  if (!paths.nonRoot) {
14372
14606
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14373
14607
  }
14374
- const relativePath = (0, import_node_path107.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14375
- const fileContent = await readFileContent((0, import_node_path107.join)(baseDir, relativePath));
14608
+ const relativePath = (0, import_node_path108.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
14609
+ const fileContent = await readFileContent((0, import_node_path108.join)(baseDir, relativePath));
14376
14610
  return new _OpenCodeRule({
14377
14611
  baseDir,
14378
14612
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -14431,7 +14665,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
14431
14665
  };
14432
14666
 
14433
14667
  // src/features/rules/qwencode-rule.ts
14434
- var import_node_path108 = require("path");
14668
+ var import_node_path109 = require("path");
14435
14669
  var QwencodeRule = class _QwencodeRule extends ToolRule {
14436
14670
  static getSettablePaths(_options = {}) {
14437
14671
  return {
@@ -14450,8 +14684,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
14450
14684
  validate = true
14451
14685
  }) {
14452
14686
  const isRoot = relativeFilePath === "QWEN.md";
14453
- const relativePath = isRoot ? "QWEN.md" : (0, import_node_path108.join)(".qwen", "memories", relativeFilePath);
14454
- const fileContent = await readFileContent((0, import_node_path108.join)(baseDir, relativePath));
14687
+ const relativePath = isRoot ? "QWEN.md" : (0, import_node_path109.join)(".qwen", "memories", relativeFilePath);
14688
+ const fileContent = await readFileContent((0, import_node_path109.join)(baseDir, relativePath));
14455
14689
  return new _QwencodeRule({
14456
14690
  baseDir,
14457
14691
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -14503,7 +14737,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
14503
14737
  };
14504
14738
 
14505
14739
  // src/features/rules/replit-rule.ts
14506
- var import_node_path109 = require("path");
14740
+ var import_node_path110 = require("path");
14507
14741
  var ReplitRule = class _ReplitRule extends ToolRule {
14508
14742
  static getSettablePaths(_options = {}) {
14509
14743
  return {
@@ -14525,7 +14759,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
14525
14759
  }
14526
14760
  const relativePath = paths.root.relativeFilePath;
14527
14761
  const fileContent = await readFileContent(
14528
- (0, import_node_path109.join)(baseDir, paths.root.relativeDirPath, relativePath)
14762
+ (0, import_node_path110.join)(baseDir, paths.root.relativeDirPath, relativePath)
14529
14763
  );
14530
14764
  return new _ReplitRule({
14531
14765
  baseDir,
@@ -14591,7 +14825,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
14591
14825
  };
14592
14826
 
14593
14827
  // src/features/rules/roo-rule.ts
14594
- var import_node_path110 = require("path");
14828
+ var import_node_path111 = require("path");
14595
14829
  var RooRule = class _RooRule extends ToolRule {
14596
14830
  static getSettablePaths(_options = {}) {
14597
14831
  return {
@@ -14606,7 +14840,7 @@ var RooRule = class _RooRule extends ToolRule {
14606
14840
  validate = true
14607
14841
  }) {
14608
14842
  const fileContent = await readFileContent(
14609
- (0, import_node_path110.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14843
+ (0, import_node_path111.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14610
14844
  );
14611
14845
  return new _RooRule({
14612
14846
  baseDir,
@@ -14675,7 +14909,7 @@ var RooRule = class _RooRule extends ToolRule {
14675
14909
  };
14676
14910
 
14677
14911
  // src/features/rules/warp-rule.ts
14678
- var import_node_path111 = require("path");
14912
+ var import_node_path112 = require("path");
14679
14913
  var WarpRule = class _WarpRule extends ToolRule {
14680
14914
  constructor({ fileContent, root, ...rest }) {
14681
14915
  super({
@@ -14701,8 +14935,8 @@ var WarpRule = class _WarpRule extends ToolRule {
14701
14935
  validate = true
14702
14936
  }) {
14703
14937
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
14704
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path111.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
14705
- const fileContent = await readFileContent((0, import_node_path111.join)(baseDir, relativePath));
14938
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path112.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
14939
+ const fileContent = await readFileContent((0, import_node_path112.join)(baseDir, relativePath));
14706
14940
  return new _WarpRule({
14707
14941
  baseDir,
14708
14942
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -14757,7 +14991,7 @@ var WarpRule = class _WarpRule extends ToolRule {
14757
14991
  };
14758
14992
 
14759
14993
  // src/features/rules/windsurf-rule.ts
14760
- var import_node_path112 = require("path");
14994
+ var import_node_path113 = require("path");
14761
14995
  var WindsurfRule = class _WindsurfRule extends ToolRule {
14762
14996
  static getSettablePaths(_options = {}) {
14763
14997
  return {
@@ -14772,7 +15006,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
14772
15006
  validate = true
14773
15007
  }) {
14774
15008
  const fileContent = await readFileContent(
14775
- (0, import_node_path112.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15009
+ (0, import_node_path113.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14776
15010
  );
14777
15011
  return new _WindsurfRule({
14778
15012
  baseDir,
@@ -14848,8 +15082,8 @@ var rulesProcessorToolTargets = [
14848
15082
  "warp",
14849
15083
  "windsurf"
14850
15084
  ];
14851
- var RulesProcessorToolTargetSchema = import_mini53.z.enum(rulesProcessorToolTargets);
14852
- var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path113.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
15085
+ var RulesProcessorToolTargetSchema = import_mini54.z.enum(rulesProcessorToolTargets);
15086
+ var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path114.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
14853
15087
  var toolRuleFactories = /* @__PURE__ */ new Map([
14854
15088
  [
14855
15089
  "agentsmd",
@@ -15224,7 +15458,7 @@ var RulesProcessor = class extends FeatureProcessor {
15224
15458
  }).relativeDirPath;
15225
15459
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
15226
15460
  const frontmatter = skill.getFrontmatter();
15227
- const relativePath = (0, import_node_path113.join)(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
15461
+ const relativePath = (0, import_node_path114.join)(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
15228
15462
  return {
15229
15463
  name: frontmatter.name,
15230
15464
  description: frontmatter.description,
@@ -15337,12 +15571,12 @@ var RulesProcessor = class extends FeatureProcessor {
15337
15571
  * Load and parse rulesync rule files from .rulesync/rules/ directory
15338
15572
  */
15339
15573
  async loadRulesyncFiles() {
15340
- const rulesyncBaseDir = (0, import_node_path113.join)(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
15341
- const files = await findFilesByGlobs((0, import_node_path113.join)(rulesyncBaseDir, "**", "*.md"));
15574
+ const rulesyncBaseDir = (0, import_node_path114.join)(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
15575
+ const files = await findFilesByGlobs((0, import_node_path114.join)(rulesyncBaseDir, "**", "*.md"));
15342
15576
  logger.debug(`Found ${files.length} rulesync files`);
15343
15577
  const rulesyncRules = await Promise.all(
15344
15578
  files.map((file) => {
15345
- const relativeFilePath = (0, import_node_path113.relative)(rulesyncBaseDir, file);
15579
+ const relativeFilePath = (0, import_node_path114.relative)(rulesyncBaseDir, file);
15346
15580
  checkPathTraversal({
15347
15581
  relativePath: relativeFilePath,
15348
15582
  intendedRootDir: rulesyncBaseDir
@@ -15405,7 +15639,7 @@ var RulesProcessor = class extends FeatureProcessor {
15405
15639
  return [];
15406
15640
  }
15407
15641
  const rootFilePaths = await findFilesByGlobs(
15408
- (0, import_node_path113.join)(
15642
+ (0, import_node_path114.join)(
15409
15643
  this.baseDir,
15410
15644
  settablePaths.root.relativeDirPath ?? ".",
15411
15645
  settablePaths.root.relativeFilePath
@@ -15416,7 +15650,7 @@ var RulesProcessor = class extends FeatureProcessor {
15416
15650
  (filePath) => factory.class.forDeletion({
15417
15651
  baseDir: this.baseDir,
15418
15652
  relativeDirPath: settablePaths.root?.relativeDirPath ?? ".",
15419
- relativeFilePath: (0, import_node_path113.basename)(filePath),
15653
+ relativeFilePath: (0, import_node_path114.basename)(filePath),
15420
15654
  global: this.global
15421
15655
  })
15422
15656
  ).filter((rule) => rule.isDeletable());
@@ -15425,7 +15659,7 @@ var RulesProcessor = class extends FeatureProcessor {
15425
15659
  rootFilePaths.map(
15426
15660
  (filePath) => factory.class.fromFile({
15427
15661
  baseDir: this.baseDir,
15428
- relativeFilePath: (0, import_node_path113.basename)(filePath),
15662
+ relativeFilePath: (0, import_node_path114.basename)(filePath),
15429
15663
  global: this.global
15430
15664
  })
15431
15665
  )
@@ -15443,13 +15677,13 @@ var RulesProcessor = class extends FeatureProcessor {
15443
15677
  return [];
15444
15678
  }
15445
15679
  const localRootFilePaths = await findFilesByGlobs(
15446
- (0, import_node_path113.join)(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md")
15680
+ (0, import_node_path114.join)(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md")
15447
15681
  );
15448
15682
  return localRootFilePaths.map(
15449
15683
  (filePath) => factory.class.forDeletion({
15450
15684
  baseDir: this.baseDir,
15451
15685
  relativeDirPath: settablePaths.root?.relativeDirPath ?? ".",
15452
- relativeFilePath: (0, import_node_path113.basename)(filePath),
15686
+ relativeFilePath: (0, import_node_path114.basename)(filePath),
15453
15687
  global: this.global
15454
15688
  })
15455
15689
  ).filter((rule) => rule.isDeletable());
@@ -15459,13 +15693,13 @@ var RulesProcessor = class extends FeatureProcessor {
15459
15693
  if (!settablePaths.nonRoot) {
15460
15694
  return [];
15461
15695
  }
15462
- const nonRootBaseDir = (0, import_node_path113.join)(this.baseDir, settablePaths.nonRoot.relativeDirPath);
15696
+ const nonRootBaseDir = (0, import_node_path114.join)(this.baseDir, settablePaths.nonRoot.relativeDirPath);
15463
15697
  const nonRootFilePaths = await findFilesByGlobs(
15464
- (0, import_node_path113.join)(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
15698
+ (0, import_node_path114.join)(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
15465
15699
  );
15466
15700
  if (forDeletion) {
15467
15701
  return nonRootFilePaths.map((filePath) => {
15468
- const relativeFilePath = (0, import_node_path113.relative)(nonRootBaseDir, filePath);
15702
+ const relativeFilePath = (0, import_node_path114.relative)(nonRootBaseDir, filePath);
15469
15703
  checkPathTraversal({
15470
15704
  relativePath: relativeFilePath,
15471
15705
  intendedRootDir: nonRootBaseDir
@@ -15480,7 +15714,7 @@ var RulesProcessor = class extends FeatureProcessor {
15480
15714
  }
15481
15715
  return await Promise.all(
15482
15716
  nonRootFilePaths.map((filePath) => {
15483
- const relativeFilePath = (0, import_node_path113.relative)(nonRootBaseDir, filePath);
15717
+ const relativeFilePath = (0, import_node_path114.relative)(nonRootBaseDir, filePath);
15484
15718
  checkPathTraversal({
15485
15719
  relativePath: relativeFilePath,
15486
15720
  intendedRootDir: nonRootBaseDir
@@ -15593,14 +15827,14 @@ s/<command> [arguments]
15593
15827
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
15594
15828
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
15595
15829
 
15596
- When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path113.join)(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
15830
+ When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path114.join)(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
15597
15831
  const subagentsSection = subagents ? `## Simulated Subagents
15598
15832
 
15599
15833
  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.
15600
15834
 
15601
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path113.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
15835
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path114.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
15602
15836
 
15603
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path113.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
15837
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path114.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
15604
15838
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
15605
15839
  const result = [
15606
15840
  overview,
@@ -15672,7 +15906,7 @@ async function processEmptyFeatureGeneration(params) {
15672
15906
  return { count: totalCount, paths: [], hasDiff };
15673
15907
  }
15674
15908
  async function checkRulesyncDirExists(params) {
15675
- return fileExists((0, import_node_path114.join)(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
15909
+ return fileExists((0, import_node_path115.join)(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
15676
15910
  }
15677
15911
  async function generate(params) {
15678
15912
  const { config } = params;