rulesync 7.9.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.
@@ -606,7 +606,7 @@ function getBaseDirsInLightOfGlobal({
606
606
  }
607
607
 
608
608
  // src/lib/generate.ts
609
- import { join as join113 } from "path";
609
+ import { join as join114 } from "path";
610
610
  import { intersection } from "es-toolkit";
611
611
 
612
612
  // src/features/commands/commands-processor.ts
@@ -2991,7 +2991,7 @@ var CommandsProcessor = class extends FeatureProcessor {
2991
2991
  };
2992
2992
 
2993
2993
  // src/features/hooks/hooks-processor.ts
2994
- import { z as z16 } from "zod/mini";
2994
+ import { z as z17 } from "zod/mini";
2995
2995
 
2996
2996
  // src/types/hooks.ts
2997
2997
  import { z as z14 } from "zod/mini";
@@ -3010,7 +3010,9 @@ var HookDefinitionSchema = z14.looseObject({
3010
3010
  timeout: z14.optional(z14.number()),
3011
3011
  matcher: z14.optional(safeString),
3012
3012
  prompt: z14.optional(z14.string()),
3013
- loop_limit: z14.optional(z14.nullable(z14.number()))
3013
+ loop_limit: z14.optional(z14.nullable(z14.number())),
3014
+ name: z14.optional(safeString),
3015
+ description: z14.optional(safeString)
3014
3016
  });
3015
3017
  var CURSOR_HOOK_EVENTS = [
3016
3018
  "sessionStart",
@@ -3077,6 +3079,19 @@ var FACTORYDROID_HOOK_EVENTS = [
3077
3079
  "notification",
3078
3080
  "setup"
3079
3081
  ];
3082
+ var GEMINICLI_HOOK_EVENTS = [
3083
+ "sessionStart",
3084
+ "sessionEnd",
3085
+ "beforeSubmitPrompt",
3086
+ "stop",
3087
+ "beforeAgentResponse",
3088
+ "afterAgentResponse",
3089
+ "beforeToolSelection",
3090
+ "preToolUse",
3091
+ "postToolUse",
3092
+ "preCompact",
3093
+ "notification"
3094
+ ];
3080
3095
  var hooksRecordSchema = z14.record(z14.string(), z14.array(HookDefinitionSchema));
3081
3096
  var HooksConfigSchema = z14.looseObject({
3082
3097
  version: z14.optional(z14.number()),
@@ -3085,7 +3100,8 @@ var HooksConfigSchema = z14.looseObject({
3085
3100
  claudecode: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
3086
3101
  copilot: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
3087
3102
  opencode: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
3088
- factorydroid: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) }))
3103
+ factorydroid: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
3104
+ geminicli: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) }))
3089
3105
  });
3090
3106
  var CANONICAL_TO_CLAUDE_EVENT_NAMES = {
3091
3107
  sessionStart: "SessionStart",
@@ -3164,6 +3180,22 @@ var CANONICAL_TO_COPILOT_EVENT_NAMES = {
3164
3180
  var COPILOT_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
3165
3181
  Object.entries(CANONICAL_TO_COPILOT_EVENT_NAMES).map(([k, v]) => [v, k])
3166
3182
  );
3183
+ var CANONICAL_TO_GEMINICLI_EVENT_NAMES = {
3184
+ sessionStart: "SessionStart",
3185
+ sessionEnd: "SessionEnd",
3186
+ beforeSubmitPrompt: "BeforeAgent",
3187
+ stop: "AfterAgent",
3188
+ beforeAgentResponse: "BeforeModel",
3189
+ afterAgentResponse: "AfterModel",
3190
+ beforeToolSelection: "BeforeToolSelection",
3191
+ preToolUse: "BeforeTool",
3192
+ postToolUse: "AfterTool",
3193
+ preCompact: "PreCompress",
3194
+ notification: "Notification"
3195
+ };
3196
+ var GEMINICLI_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
3197
+ Object.entries(CANONICAL_TO_GEMINICLI_EVENT_NAMES).map(([k, v]) => [v, k])
3198
+ );
3167
3199
 
3168
3200
  // src/features/hooks/claudecode-hooks.ts
3169
3201
  import { join as join21 } from "path";
@@ -3450,6 +3482,7 @@ var CopilotHookEntrySchema = z15.looseObject({
3450
3482
  timeoutSec: z15.optional(z15.number())
3451
3483
  });
3452
3484
  function canonicalToCopilotHooks(config) {
3485
+ const canonicalSchemaKeys = Object.keys(HookDefinitionSchema.shape);
3453
3486
  const isWindows = process.platform === "win32";
3454
3487
  const commandField = isWindows ? "powershell" : "bash";
3455
3488
  const supported = new Set(COPILOT_HOOK_EVENTS);
@@ -3474,9 +3507,7 @@ function canonicalToCopilotHooks(config) {
3474
3507
  const command = def.command;
3475
3508
  const timeout = def.timeout;
3476
3509
  const rest = Object.fromEntries(
3477
- Object.entries(def).filter(
3478
- ([k]) => !["type", "matcher", "command", "prompt", "timeout"].includes(k)
3479
- )
3510
+ Object.entries(def).filter(([k]) => !canonicalSchemaKeys.includes(k))
3480
3511
  );
3481
3512
  entries.push({
3482
3513
  type: hookType,
@@ -3669,7 +3700,14 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
3669
3700
  const mappedHooks = {};
3670
3701
  for (const [eventName, defs] of Object.entries(mergedHooks)) {
3671
3702
  const cursorEventName = CANONICAL_TO_CURSOR_EVENT_NAMES[eventName] ?? eventName;
3672
- mappedHooks[cursorEventName] = defs;
3703
+ mappedHooks[cursorEventName] = defs.map((def) => ({
3704
+ ...def.type !== void 0 && def.type !== null && { type: def.type },
3705
+ ...def.command !== void 0 && def.command !== null && { command: def.command },
3706
+ ...def.timeout !== void 0 && def.timeout !== null && { timeout: def.timeout },
3707
+ ...def.loop_limit !== void 0 && { loop_limit: def.loop_limit },
3708
+ ...def.matcher !== void 0 && def.matcher !== null && { matcher: def.matcher },
3709
+ ...def.prompt !== void 0 && def.prompt !== null && { prompt: def.prompt }
3710
+ }));
3673
3711
  }
3674
3712
  const cursorConfig = {
3675
3713
  version: config.version ?? 1,
@@ -3902,8 +3940,193 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
3902
3940
  }
3903
3941
  };
3904
3942
 
3905
- // src/features/hooks/opencode-hooks.ts
3943
+ // src/features/hooks/geminicli-hooks.ts
3906
3944
  import { join as join25 } from "path";
3945
+ import { z as z16 } from "zod/mini";
3946
+ function canonicalToGeminicliHooks(config) {
3947
+ const geminiSupported = new Set(GEMINICLI_HOOK_EVENTS);
3948
+ const sharedHooks = {};
3949
+ for (const [event, defs] of Object.entries(config.hooks)) {
3950
+ if (geminiSupported.has(event)) {
3951
+ sharedHooks[event] = defs;
3952
+ }
3953
+ }
3954
+ const effectiveHooks = {
3955
+ ...sharedHooks,
3956
+ ...config.geminicli?.hooks
3957
+ };
3958
+ const gemini = {};
3959
+ for (const [eventName, definitions] of Object.entries(effectiveHooks)) {
3960
+ const geminiEventName = CANONICAL_TO_GEMINICLI_EVENT_NAMES[eventName] ?? eventName;
3961
+ const byMatcher = /* @__PURE__ */ new Map();
3962
+ for (const def of definitions) {
3963
+ const key = def.matcher ?? "";
3964
+ const list = byMatcher.get(key);
3965
+ if (list) list.push(def);
3966
+ else byMatcher.set(key, [def]);
3967
+ }
3968
+ const entries = [];
3969
+ for (const [matcherKey, defs] of byMatcher) {
3970
+ const hooks = defs.map((def) => {
3971
+ const command = def.command !== void 0 && def.command !== null && !def.command.startsWith("$") ? `$GEMINI_PROJECT_DIR/${def.command.replace(/^\.\//, "")}` : def.command;
3972
+ return {
3973
+ type: def.type ?? "command",
3974
+ ...command !== void 0 && command !== null && { command },
3975
+ ...def.timeout !== void 0 && def.timeout !== null && { timeout: def.timeout },
3976
+ ...def.name !== void 0 && def.name !== null && { name: def.name },
3977
+ ...def.description !== void 0 && def.description !== null && { description: def.description }
3978
+ };
3979
+ });
3980
+ entries.push(matcherKey ? { matcher: matcherKey, hooks } : { hooks });
3981
+ }
3982
+ gemini[geminiEventName] = entries;
3983
+ }
3984
+ return gemini;
3985
+ }
3986
+ var GeminiHookEntrySchema = z16.looseObject({
3987
+ type: z16.optional(z16.string()),
3988
+ command: z16.optional(z16.string()),
3989
+ timeout: z16.optional(z16.number()),
3990
+ name: z16.optional(z16.string()),
3991
+ description: z16.optional(z16.string())
3992
+ });
3993
+ var GeminiMatcherEntrySchema = z16.looseObject({
3994
+ matcher: z16.optional(z16.string()),
3995
+ hooks: z16.optional(z16.array(GeminiHookEntrySchema))
3996
+ });
3997
+ function geminiHooksToCanonical(geminiHooks) {
3998
+ if (geminiHooks === null || geminiHooks === void 0 || typeof geminiHooks !== "object") {
3999
+ return {};
4000
+ }
4001
+ const canonical = {};
4002
+ for (const [geminiEventName, matcherEntries] of Object.entries(geminiHooks)) {
4003
+ const eventName = GEMINICLI_TO_CANONICAL_EVENT_NAMES[geminiEventName] ?? geminiEventName;
4004
+ if (!Array.isArray(matcherEntries)) continue;
4005
+ const defs = [];
4006
+ for (const rawEntry of matcherEntries) {
4007
+ const parseResult = GeminiMatcherEntrySchema.safeParse(rawEntry);
4008
+ if (!parseResult.success) continue;
4009
+ const entry = parseResult.data;
4010
+ const hooks = entry.hooks ?? [];
4011
+ for (const h of hooks) {
4012
+ const cmd = h.command;
4013
+ const command = typeof cmd === "string" && cmd.startsWith("$GEMINI_PROJECT_DIR/") ? cmd.replace(/^\$GEMINI_PROJECT_DIR\/?/, "./") : cmd;
4014
+ const hookType = h.type === "command" || h.type === "prompt" ? h.type : "command";
4015
+ defs.push({
4016
+ type: hookType,
4017
+ ...command !== void 0 && command !== null && { command },
4018
+ ...h.timeout !== void 0 && h.timeout !== null && { timeout: h.timeout },
4019
+ ...h.name !== void 0 && h.name !== null && { name: h.name },
4020
+ ...h.description !== void 0 && h.description !== null && { description: h.description },
4021
+ ...entry.matcher !== void 0 && entry.matcher !== null && entry.matcher !== "" && { matcher: entry.matcher }
4022
+ });
4023
+ }
4024
+ }
4025
+ if (defs.length > 0) {
4026
+ canonical[eventName] = defs;
4027
+ }
4028
+ }
4029
+ return canonical;
4030
+ }
4031
+ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4032
+ constructor(params) {
4033
+ super({
4034
+ ...params,
4035
+ fileContent: params.fileContent ?? "{}"
4036
+ });
4037
+ }
4038
+ isDeletable() {
4039
+ return false;
4040
+ }
4041
+ static getSettablePaths(_options = {}) {
4042
+ return { relativeDirPath: ".gemini", relativeFilePath: "settings.json" };
4043
+ }
4044
+ static async fromFile({
4045
+ baseDir = process.cwd(),
4046
+ validate = true,
4047
+ global = false
4048
+ }) {
4049
+ const paths = _GeminicliHooks.getSettablePaths({ global });
4050
+ const filePath = join25(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4051
+ const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4052
+ return new _GeminicliHooks({
4053
+ baseDir,
4054
+ relativeDirPath: paths.relativeDirPath,
4055
+ relativeFilePath: paths.relativeFilePath,
4056
+ fileContent,
4057
+ validate
4058
+ });
4059
+ }
4060
+ static async fromRulesyncHooks({
4061
+ baseDir = process.cwd(),
4062
+ rulesyncHooks,
4063
+ validate = true,
4064
+ global = false
4065
+ }) {
4066
+ const paths = _GeminicliHooks.getSettablePaths({ global });
4067
+ const filePath = join25(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4068
+ const existingContent = await readOrInitializeFileContent(
4069
+ filePath,
4070
+ JSON.stringify({}, null, 2)
4071
+ );
4072
+ let settings;
4073
+ try {
4074
+ settings = JSON.parse(existingContent);
4075
+ } catch (error) {
4076
+ throw new Error(
4077
+ `Failed to parse existing Gemini CLI settings at ${filePath}: ${formatError(error)}`,
4078
+ { cause: error }
4079
+ );
4080
+ }
4081
+ const config = rulesyncHooks.getJson();
4082
+ const geminiHooks = canonicalToGeminicliHooks(config);
4083
+ const merged = { ...settings, hooks: geminiHooks };
4084
+ const fileContent = JSON.stringify(merged, null, 2);
4085
+ return new _GeminicliHooks({
4086
+ baseDir,
4087
+ relativeDirPath: paths.relativeDirPath,
4088
+ relativeFilePath: paths.relativeFilePath,
4089
+ fileContent,
4090
+ validate
4091
+ });
4092
+ }
4093
+ toRulesyncHooks() {
4094
+ let settings;
4095
+ try {
4096
+ settings = JSON.parse(this.getFileContent());
4097
+ } catch (error) {
4098
+ throw new Error(
4099
+ `Failed to parse Gemini CLI hooks content in ${join25(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4100
+ {
4101
+ cause: error
4102
+ }
4103
+ );
4104
+ }
4105
+ const hooks = geminiHooksToCanonical(settings.hooks);
4106
+ return this.toRulesyncHooksDefault({
4107
+ fileContent: JSON.stringify({ version: 1, hooks }, null, 2)
4108
+ });
4109
+ }
4110
+ validate() {
4111
+ return { success: true, error: null };
4112
+ }
4113
+ static forDeletion({
4114
+ baseDir = process.cwd(),
4115
+ relativeDirPath,
4116
+ relativeFilePath
4117
+ }) {
4118
+ return new _GeminicliHooks({
4119
+ baseDir,
4120
+ relativeDirPath,
4121
+ relativeFilePath,
4122
+ fileContent: JSON.stringify({ hooks: {} }, null, 2),
4123
+ validate: false
4124
+ });
4125
+ }
4126
+ };
4127
+
4128
+ // src/features/hooks/opencode-hooks.ts
4129
+ import { join as join26 } from "path";
3907
4130
  var NAMED_HOOKS = /* @__PURE__ */ new Set(["tool.execute.before", "tool.execute.after"]);
3908
4131
  function escapeForTemplateLiteral(command) {
3909
4132
  return command.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${");
@@ -4001,7 +4224,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4001
4224
  }
4002
4225
  static getSettablePaths(options) {
4003
4226
  return {
4004
- relativeDirPath: options?.global ? join25(".config", "opencode", "plugins") : join25(".opencode", "plugins"),
4227
+ relativeDirPath: options?.global ? join26(".config", "opencode", "plugins") : join26(".opencode", "plugins"),
4005
4228
  relativeFilePath: "rulesync-hooks.js"
4006
4229
  };
4007
4230
  }
@@ -4012,7 +4235,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4012
4235
  }) {
4013
4236
  const paths = _OpencodeHooks.getSettablePaths({ global });
4014
4237
  const fileContent = await readFileContent(
4015
- join25(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4238
+ join26(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4016
4239
  );
4017
4240
  return new _OpencodeHooks({
4018
4241
  baseDir,
@@ -4066,9 +4289,10 @@ var hooksProcessorToolTargetTuple = [
4066
4289
  "claudecode",
4067
4290
  "copilot",
4068
4291
  "opencode",
4069
- "factorydroid"
4292
+ "factorydroid",
4293
+ "geminicli"
4070
4294
  ];
4071
- var HooksProcessorToolTargetSchema = z16.enum(hooksProcessorToolTargetTuple);
4295
+ var HooksProcessorToolTargetSchema = z17.enum(hooksProcessorToolTargetTuple);
4072
4296
  var toolHooksFactories = /* @__PURE__ */ new Map([
4073
4297
  [
4074
4298
  "cursor",
@@ -4139,6 +4363,16 @@ var toolHooksFactories = /* @__PURE__ */ new Map([
4139
4363
  supportedHookTypes: ["command", "prompt"],
4140
4364
  supportsMatcher: true
4141
4365
  }
4366
+ ],
4367
+ [
4368
+ "geminicli",
4369
+ {
4370
+ class: GeminicliHooks,
4371
+ meta: { supportsProject: true, supportsGlobal: true, supportsImport: true },
4372
+ supportedEvents: GEMINICLI_HOOK_EVENTS,
4373
+ supportedHookTypes: ["command"],
4374
+ supportsMatcher: true
4375
+ }
4142
4376
  ]
4143
4377
  ]);
4144
4378
  var hooksProcessorToolTargets = [...toolHooksFactories.keys()];
@@ -4293,13 +4527,13 @@ var HooksProcessor = class extends FeatureProcessor {
4293
4527
  };
4294
4528
 
4295
4529
  // src/features/ignore/ignore-processor.ts
4296
- import { z as z17 } from "zod/mini";
4530
+ import { z as z18 } from "zod/mini";
4297
4531
 
4298
4532
  // src/features/ignore/augmentcode-ignore.ts
4299
- import { join as join27 } from "path";
4533
+ import { join as join28 } from "path";
4300
4534
 
4301
4535
  // src/features/ignore/rulesync-ignore.ts
4302
- import { join as join26 } from "path";
4536
+ import { join as join27 } from "path";
4303
4537
  var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
4304
4538
  validate() {
4305
4539
  return { success: true, error: null };
@@ -4319,12 +4553,12 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
4319
4553
  static async fromFile() {
4320
4554
  const baseDir = process.cwd();
4321
4555
  const paths = this.getSettablePaths();
4322
- const recommendedPath = join26(
4556
+ const recommendedPath = join27(
4323
4557
  baseDir,
4324
4558
  paths.recommended.relativeDirPath,
4325
4559
  paths.recommended.relativeFilePath
4326
4560
  );
4327
- const legacyPath = join26(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
4561
+ const legacyPath = join27(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
4328
4562
  if (await fileExists(recommendedPath)) {
4329
4563
  const fileContent2 = await readFileContent(recommendedPath);
4330
4564
  return new _RulesyncIgnore({
@@ -4440,7 +4674,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
4440
4674
  validate = true
4441
4675
  }) {
4442
4676
  const fileContent = await readFileContent(
4443
- join27(
4677
+ join28(
4444
4678
  baseDir,
4445
4679
  this.getSettablePaths().relativeDirPath,
4446
4680
  this.getSettablePaths().relativeFilePath
@@ -4470,7 +4704,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
4470
4704
  };
4471
4705
 
4472
4706
  // src/features/ignore/claudecode-ignore.ts
4473
- import { join as join28 } from "path";
4707
+ import { join as join29 } from "path";
4474
4708
  import { uniq } from "es-toolkit";
4475
4709
  var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4476
4710
  constructor(params) {
@@ -4513,7 +4747,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4513
4747
  const fileContent = rulesyncIgnore.getFileContent();
4514
4748
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
4515
4749
  const deniedValues = patterns.map((pattern) => `Read(${pattern})`);
4516
- const filePath = join28(
4750
+ const filePath = join29(
4517
4751
  baseDir,
4518
4752
  this.getSettablePaths().relativeDirPath,
4519
4753
  this.getSettablePaths().relativeFilePath
@@ -4549,7 +4783,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4549
4783
  validate = true
4550
4784
  }) {
4551
4785
  const fileContent = await readFileContent(
4552
- join28(
4786
+ join29(
4553
4787
  baseDir,
4554
4788
  this.getSettablePaths().relativeDirPath,
4555
4789
  this.getSettablePaths().relativeFilePath
@@ -4579,7 +4813,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4579
4813
  };
4580
4814
 
4581
4815
  // src/features/ignore/cline-ignore.ts
4582
- import { join as join29 } from "path";
4816
+ import { join as join30 } from "path";
4583
4817
  var ClineIgnore = class _ClineIgnore extends ToolIgnore {
4584
4818
  static getSettablePaths() {
4585
4819
  return {
@@ -4616,7 +4850,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
4616
4850
  validate = true
4617
4851
  }) {
4618
4852
  const fileContent = await readFileContent(
4619
- join29(
4853
+ join30(
4620
4854
  baseDir,
4621
4855
  this.getSettablePaths().relativeDirPath,
4622
4856
  this.getSettablePaths().relativeFilePath
@@ -4646,7 +4880,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
4646
4880
  };
4647
4881
 
4648
4882
  // src/features/ignore/cursor-ignore.ts
4649
- import { join as join30 } from "path";
4883
+ import { join as join31 } from "path";
4650
4884
  var CursorIgnore = class _CursorIgnore extends ToolIgnore {
4651
4885
  static getSettablePaths() {
4652
4886
  return {
@@ -4679,7 +4913,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
4679
4913
  validate = true
4680
4914
  }) {
4681
4915
  const fileContent = await readFileContent(
4682
- join30(
4916
+ join31(
4683
4917
  baseDir,
4684
4918
  this.getSettablePaths().relativeDirPath,
4685
4919
  this.getSettablePaths().relativeFilePath
@@ -4709,7 +4943,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
4709
4943
  };
4710
4944
 
4711
4945
  // src/features/ignore/geminicli-ignore.ts
4712
- import { join as join31 } from "path";
4946
+ import { join as join32 } from "path";
4713
4947
  var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
4714
4948
  static getSettablePaths() {
4715
4949
  return {
@@ -4736,7 +4970,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
4736
4970
  validate = true
4737
4971
  }) {
4738
4972
  const fileContent = await readFileContent(
4739
- join31(
4973
+ join32(
4740
4974
  baseDir,
4741
4975
  this.getSettablePaths().relativeDirPath,
4742
4976
  this.getSettablePaths().relativeFilePath
@@ -4766,7 +5000,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
4766
5000
  };
4767
5001
 
4768
5002
  // src/features/ignore/goose-ignore.ts
4769
- import { join as join32 } from "path";
5003
+ import { join as join33 } from "path";
4770
5004
  var GooseIgnore = class _GooseIgnore extends ToolIgnore {
4771
5005
  static getSettablePaths() {
4772
5006
  return {
@@ -4803,7 +5037,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
4803
5037
  validate = true
4804
5038
  }) {
4805
5039
  const fileContent = await readFileContent(
4806
- join32(
5040
+ join33(
4807
5041
  baseDir,
4808
5042
  this.getSettablePaths().relativeDirPath,
4809
5043
  this.getSettablePaths().relativeFilePath
@@ -4833,7 +5067,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
4833
5067
  };
4834
5068
 
4835
5069
  // src/features/ignore/junie-ignore.ts
4836
- import { join as join33 } from "path";
5070
+ import { join as join34 } from "path";
4837
5071
  var JunieIgnore = class _JunieIgnore extends ToolIgnore {
4838
5072
  static getSettablePaths() {
4839
5073
  return {
@@ -4860,7 +5094,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
4860
5094
  validate = true
4861
5095
  }) {
4862
5096
  const fileContent = await readFileContent(
4863
- join33(
5097
+ join34(
4864
5098
  baseDir,
4865
5099
  this.getSettablePaths().relativeDirPath,
4866
5100
  this.getSettablePaths().relativeFilePath
@@ -4890,7 +5124,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
4890
5124
  };
4891
5125
 
4892
5126
  // src/features/ignore/kilo-ignore.ts
4893
- import { join as join34 } from "path";
5127
+ import { join as join35 } from "path";
4894
5128
  var KiloIgnore = class _KiloIgnore extends ToolIgnore {
4895
5129
  static getSettablePaths() {
4896
5130
  return {
@@ -4927,7 +5161,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
4927
5161
  validate = true
4928
5162
  }) {
4929
5163
  const fileContent = await readFileContent(
4930
- join34(
5164
+ join35(
4931
5165
  baseDir,
4932
5166
  this.getSettablePaths().relativeDirPath,
4933
5167
  this.getSettablePaths().relativeFilePath
@@ -4957,7 +5191,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
4957
5191
  };
4958
5192
 
4959
5193
  // src/features/ignore/kiro-ignore.ts
4960
- import { join as join35 } from "path";
5194
+ import { join as join36 } from "path";
4961
5195
  var KiroIgnore = class _KiroIgnore extends ToolIgnore {
4962
5196
  static getSettablePaths() {
4963
5197
  return {
@@ -4984,7 +5218,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
4984
5218
  validate = true
4985
5219
  }) {
4986
5220
  const fileContent = await readFileContent(
4987
- join35(
5221
+ join36(
4988
5222
  baseDir,
4989
5223
  this.getSettablePaths().relativeDirPath,
4990
5224
  this.getSettablePaths().relativeFilePath
@@ -5014,7 +5248,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5014
5248
  };
5015
5249
 
5016
5250
  // src/features/ignore/qwencode-ignore.ts
5017
- import { join as join36 } from "path";
5251
+ import { join as join37 } from "path";
5018
5252
  var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5019
5253
  static getSettablePaths() {
5020
5254
  return {
@@ -5041,7 +5275,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5041
5275
  validate = true
5042
5276
  }) {
5043
5277
  const fileContent = await readFileContent(
5044
- join36(
5278
+ join37(
5045
5279
  baseDir,
5046
5280
  this.getSettablePaths().relativeDirPath,
5047
5281
  this.getSettablePaths().relativeFilePath
@@ -5071,7 +5305,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5071
5305
  };
5072
5306
 
5073
5307
  // src/features/ignore/roo-ignore.ts
5074
- import { join as join37 } from "path";
5308
+ import { join as join38 } from "path";
5075
5309
  var RooIgnore = class _RooIgnore extends ToolIgnore {
5076
5310
  static getSettablePaths() {
5077
5311
  return {
@@ -5098,7 +5332,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
5098
5332
  validate = true
5099
5333
  }) {
5100
5334
  const fileContent = await readFileContent(
5101
- join37(
5335
+ join38(
5102
5336
  baseDir,
5103
5337
  this.getSettablePaths().relativeDirPath,
5104
5338
  this.getSettablePaths().relativeFilePath
@@ -5128,7 +5362,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
5128
5362
  };
5129
5363
 
5130
5364
  // src/features/ignore/windsurf-ignore.ts
5131
- import { join as join38 } from "path";
5365
+ import { join as join39 } from "path";
5132
5366
  var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5133
5367
  static getSettablePaths() {
5134
5368
  return {
@@ -5155,7 +5389,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5155
5389
  validate = true
5156
5390
  }) {
5157
5391
  const fileContent = await readFileContent(
5158
- join38(
5392
+ join39(
5159
5393
  baseDir,
5160
5394
  this.getSettablePaths().relativeDirPath,
5161
5395
  this.getSettablePaths().relativeFilePath
@@ -5185,7 +5419,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5185
5419
  };
5186
5420
 
5187
5421
  // src/features/ignore/zed-ignore.ts
5188
- import { join as join39 } from "path";
5422
+ import { join as join40 } from "path";
5189
5423
  import { uniq as uniq2 } from "es-toolkit";
5190
5424
  var ZedIgnore = class _ZedIgnore extends ToolIgnore {
5191
5425
  constructor(params) {
@@ -5222,7 +5456,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
5222
5456
  }) {
5223
5457
  const fileContent = rulesyncIgnore.getFileContent();
5224
5458
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
5225
- const filePath = join39(
5459
+ const filePath = join40(
5226
5460
  baseDir,
5227
5461
  this.getSettablePaths().relativeDirPath,
5228
5462
  this.getSettablePaths().relativeFilePath
@@ -5249,7 +5483,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
5249
5483
  validate = true
5250
5484
  }) {
5251
5485
  const fileContent = await readFileContent(
5252
- join39(
5486
+ join40(
5253
5487
  baseDir,
5254
5488
  this.getSettablePaths().relativeDirPath,
5255
5489
  this.getSettablePaths().relativeFilePath
@@ -5295,7 +5529,7 @@ var ignoreProcessorToolTargets = [
5295
5529
  "windsurf",
5296
5530
  "zed"
5297
5531
  ];
5298
- var IgnoreProcessorToolTargetSchema = z17.enum(ignoreProcessorToolTargets);
5532
+ var IgnoreProcessorToolTargetSchema = z18.enum(ignoreProcessorToolTargets);
5299
5533
  var toolIgnoreFactories = /* @__PURE__ */ new Map([
5300
5534
  ["augmentcode", { class: AugmentcodeIgnore }],
5301
5535
  ["claudecode", { class: ClaudecodeIgnore }],
@@ -5433,49 +5667,49 @@ var IgnoreProcessor = class extends FeatureProcessor {
5433
5667
  };
5434
5668
 
5435
5669
  // src/features/mcp/mcp-processor.ts
5436
- import { z as z21 } from "zod/mini";
5670
+ import { z as z22 } from "zod/mini";
5437
5671
 
5438
5672
  // src/features/mcp/claudecode-mcp.ts
5439
- import { join as join41 } from "path";
5673
+ import { join as join42 } from "path";
5440
5674
 
5441
5675
  // src/features/mcp/rulesync-mcp.ts
5442
- import { join as join40 } from "path";
5676
+ import { join as join41 } from "path";
5443
5677
  import { omit } from "es-toolkit/object";
5444
- import { z as z19 } from "zod/mini";
5678
+ import { z as z20 } from "zod/mini";
5445
5679
 
5446
5680
  // src/types/mcp.ts
5447
- import { z as z18 } from "zod/mini";
5448
- var McpServerSchema = z18.object({
5449
- type: z18.optional(z18.enum(["stdio", "sse", "http"])),
5450
- command: z18.optional(z18.union([z18.string(), z18.array(z18.string())])),
5451
- args: z18.optional(z18.array(z18.string())),
5452
- url: z18.optional(z18.string()),
5453
- httpUrl: z18.optional(z18.string()),
5454
- env: z18.optional(z18.record(z18.string(), z18.string())),
5455
- disabled: z18.optional(z18.boolean()),
5456
- networkTimeout: z18.optional(z18.number()),
5457
- timeout: z18.optional(z18.number()),
5458
- trust: z18.optional(z18.boolean()),
5459
- cwd: z18.optional(z18.string()),
5460
- transport: z18.optional(z18.enum(["stdio", "sse", "http"])),
5461
- alwaysAllow: z18.optional(z18.array(z18.string())),
5462
- tools: z18.optional(z18.array(z18.string())),
5463
- kiroAutoApprove: z18.optional(z18.array(z18.string())),
5464
- kiroAutoBlock: z18.optional(z18.array(z18.string())),
5465
- headers: z18.optional(z18.record(z18.string(), z18.string())),
5466
- enabledTools: z18.optional(z18.array(z18.string())),
5467
- disabledTools: z18.optional(z18.array(z18.string()))
5681
+ import { z as z19 } from "zod/mini";
5682
+ var McpServerSchema = z19.object({
5683
+ type: z19.optional(z19.enum(["stdio", "sse", "http"])),
5684
+ command: z19.optional(z19.union([z19.string(), z19.array(z19.string())])),
5685
+ args: z19.optional(z19.array(z19.string())),
5686
+ url: z19.optional(z19.string()),
5687
+ httpUrl: z19.optional(z19.string()),
5688
+ env: z19.optional(z19.record(z19.string(), z19.string())),
5689
+ disabled: z19.optional(z19.boolean()),
5690
+ networkTimeout: z19.optional(z19.number()),
5691
+ timeout: z19.optional(z19.number()),
5692
+ trust: z19.optional(z19.boolean()),
5693
+ cwd: z19.optional(z19.string()),
5694
+ transport: z19.optional(z19.enum(["stdio", "sse", "http"])),
5695
+ alwaysAllow: z19.optional(z19.array(z19.string())),
5696
+ tools: z19.optional(z19.array(z19.string())),
5697
+ kiroAutoApprove: z19.optional(z19.array(z19.string())),
5698
+ kiroAutoBlock: z19.optional(z19.array(z19.string())),
5699
+ headers: z19.optional(z19.record(z19.string(), z19.string())),
5700
+ enabledTools: z19.optional(z19.array(z19.string())),
5701
+ disabledTools: z19.optional(z19.array(z19.string()))
5468
5702
  });
5469
- var McpServersSchema = z18.record(z18.string(), McpServerSchema);
5703
+ var McpServersSchema = z19.record(z19.string(), McpServerSchema);
5470
5704
 
5471
5705
  // src/features/mcp/rulesync-mcp.ts
5472
- var RulesyncMcpServerSchema = z19.extend(McpServerSchema, {
5473
- targets: z19.optional(RulesyncTargetsSchema),
5474
- description: z19.optional(z19.string()),
5475
- exposed: z19.optional(z19.boolean())
5706
+ var RulesyncMcpServerSchema = z20.extend(McpServerSchema, {
5707
+ targets: z20.optional(RulesyncTargetsSchema),
5708
+ description: z20.optional(z20.string()),
5709
+ exposed: z20.optional(z20.boolean())
5476
5710
  });
5477
- var RulesyncMcpConfigSchema = z19.object({
5478
- mcpServers: z19.record(z19.string(), RulesyncMcpServerSchema)
5711
+ var RulesyncMcpConfigSchema = z20.object({
5712
+ mcpServers: z20.record(z20.string(), RulesyncMcpServerSchema)
5479
5713
  });
5480
5714
  var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
5481
5715
  json;
@@ -5511,12 +5745,12 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
5511
5745
  static async fromFile({ validate = true }) {
5512
5746
  const baseDir = process.cwd();
5513
5747
  const paths = this.getSettablePaths();
5514
- const recommendedPath = join40(
5748
+ const recommendedPath = join41(
5515
5749
  baseDir,
5516
5750
  paths.recommended.relativeDirPath,
5517
5751
  paths.recommended.relativeFilePath
5518
5752
  );
5519
- const legacyPath = join40(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5753
+ const legacyPath = join41(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5520
5754
  if (await fileExists(recommendedPath)) {
5521
5755
  const fileContent2 = await readFileContent(recommendedPath);
5522
5756
  return new _RulesyncMcp({
@@ -5661,7 +5895,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
5661
5895
  global = false
5662
5896
  }) {
5663
5897
  const paths = this.getSettablePaths({ global });
5664
- const fileContent = await readFileContentOrNull(join41(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
5898
+ const fileContent = await readFileContentOrNull(join42(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
5665
5899
  const json = JSON.parse(fileContent);
5666
5900
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
5667
5901
  return new _ClaudecodeMcp({
@@ -5680,7 +5914,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
5680
5914
  }) {
5681
5915
  const paths = this.getSettablePaths({ global });
5682
5916
  const fileContent = await readOrInitializeFileContent(
5683
- join41(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5917
+ join42(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5684
5918
  JSON.stringify({ mcpServers: {} }, null, 2)
5685
5919
  );
5686
5920
  const json = JSON.parse(fileContent);
@@ -5719,7 +5953,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
5719
5953
  };
5720
5954
 
5721
5955
  // src/features/mcp/cline-mcp.ts
5722
- import { join as join42 } from "path";
5956
+ import { join as join43 } from "path";
5723
5957
  var ClineMcp = class _ClineMcp extends ToolMcp {
5724
5958
  json;
5725
5959
  constructor(params) {
@@ -5740,7 +5974,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
5740
5974
  validate = true
5741
5975
  }) {
5742
5976
  const fileContent = await readFileContent(
5743
- join42(
5977
+ join43(
5744
5978
  baseDir,
5745
5979
  this.getSettablePaths().relativeDirPath,
5746
5980
  this.getSettablePaths().relativeFilePath
@@ -5789,7 +6023,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
5789
6023
  };
5790
6024
 
5791
6025
  // src/features/mcp/codexcli-mcp.ts
5792
- import { join as join43 } from "path";
6026
+ import { join as join44 } from "path";
5793
6027
  import * as smolToml from "smol-toml";
5794
6028
  function convertFromCodexFormat(codexMcp) {
5795
6029
  const result = {};
@@ -5872,7 +6106,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
5872
6106
  global = false
5873
6107
  }) {
5874
6108
  const paths = this.getSettablePaths({ global });
5875
- const fileContent = await readFileContentOrNull(join43(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml.stringify({});
6109
+ const fileContent = await readFileContentOrNull(join44(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml.stringify({});
5876
6110
  return new _CodexcliMcp({
5877
6111
  baseDir,
5878
6112
  relativeDirPath: paths.relativeDirPath,
@@ -5888,7 +6122,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
5888
6122
  global = false
5889
6123
  }) {
5890
6124
  const paths = this.getSettablePaths({ global });
5891
- const configTomlFilePath = join43(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6125
+ const configTomlFilePath = join44(baseDir, paths.relativeDirPath, paths.relativeFilePath);
5892
6126
  const configTomlFileContent = await readOrInitializeFileContent(
5893
6127
  configTomlFilePath,
5894
6128
  smolToml.stringify({})
@@ -5945,7 +6179,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
5945
6179
  };
5946
6180
 
5947
6181
  // src/features/mcp/copilot-mcp.ts
5948
- import { join as join44 } from "path";
6182
+ import { join as join45 } from "path";
5949
6183
  function convertToCopilotFormat(mcpServers) {
5950
6184
  return { servers: mcpServers };
5951
6185
  }
@@ -5972,7 +6206,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
5972
6206
  validate = true
5973
6207
  }) {
5974
6208
  const fileContent = await readFileContent(
5975
- join44(
6209
+ join45(
5976
6210
  baseDir,
5977
6211
  this.getSettablePaths().relativeDirPath,
5978
6212
  this.getSettablePaths().relativeFilePath
@@ -6025,7 +6259,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
6025
6259
  };
6026
6260
 
6027
6261
  // src/features/mcp/cursor-mcp.ts
6028
- import { join as join45 } from "path";
6262
+ import { join as join46 } from "path";
6029
6263
  var CURSOR_ENV_VAR_PATTERN = /\$\{env:([^}]+)\}/g;
6030
6264
  function isMcpServers(value) {
6031
6265
  return value !== void 0 && value !== null && typeof value === "object";
@@ -6086,7 +6320,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6086
6320
  validate = true
6087
6321
  }) {
6088
6322
  const fileContent = await readFileContent(
6089
- join45(
6323
+ join46(
6090
6324
  baseDir,
6091
6325
  this.getSettablePaths().relativeDirPath,
6092
6326
  this.getSettablePaths().relativeFilePath
@@ -6154,7 +6388,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6154
6388
  };
6155
6389
 
6156
6390
  // src/features/mcp/factorydroid-mcp.ts
6157
- import { join as join46 } from "path";
6391
+ import { join as join47 } from "path";
6158
6392
  var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
6159
6393
  json;
6160
6394
  constructor(params) {
@@ -6175,7 +6409,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
6175
6409
  validate = true
6176
6410
  }) {
6177
6411
  const fileContent = await readFileContent(
6178
- join46(
6412
+ join47(
6179
6413
  baseDir,
6180
6414
  this.getSettablePaths().relativeDirPath,
6181
6415
  this.getSettablePaths().relativeFilePath
@@ -6235,7 +6469,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
6235
6469
  };
6236
6470
 
6237
6471
  // src/features/mcp/geminicli-mcp.ts
6238
- import { join as join47 } from "path";
6472
+ import { join as join48 } from "path";
6239
6473
  var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6240
6474
  json;
6241
6475
  constructor(params) {
@@ -6263,7 +6497,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6263
6497
  global = false
6264
6498
  }) {
6265
6499
  const paths = this.getSettablePaths({ global });
6266
- const fileContent = await readFileContentOrNull(join47(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6500
+ const fileContent = await readFileContentOrNull(join48(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6267
6501
  const json = JSON.parse(fileContent);
6268
6502
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
6269
6503
  return new _GeminiCliMcp({
@@ -6282,7 +6516,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6282
6516
  }) {
6283
6517
  const paths = this.getSettablePaths({ global });
6284
6518
  const fileContent = await readOrInitializeFileContent(
6285
- join47(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6519
+ join48(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6286
6520
  JSON.stringify({ mcpServers: {} }, null, 2)
6287
6521
  );
6288
6522
  const json = JSON.parse(fileContent);
@@ -6327,7 +6561,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6327
6561
  };
6328
6562
 
6329
6563
  // src/features/mcp/junie-mcp.ts
6330
- import { join as join48 } from "path";
6564
+ import { join as join49 } from "path";
6331
6565
  var JunieMcp = class _JunieMcp extends ToolMcp {
6332
6566
  json;
6333
6567
  constructor(params) {
@@ -6339,7 +6573,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6339
6573
  }
6340
6574
  static getSettablePaths() {
6341
6575
  return {
6342
- relativeDirPath: join48(".junie", "mcp"),
6576
+ relativeDirPath: join49(".junie", "mcp"),
6343
6577
  relativeFilePath: "mcp.json"
6344
6578
  };
6345
6579
  }
@@ -6348,7 +6582,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6348
6582
  validate = true
6349
6583
  }) {
6350
6584
  const fileContent = await readFileContent(
6351
- join48(
6585
+ join49(
6352
6586
  baseDir,
6353
6587
  this.getSettablePaths().relativeDirPath,
6354
6588
  this.getSettablePaths().relativeFilePath
@@ -6397,7 +6631,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6397
6631
  };
6398
6632
 
6399
6633
  // src/features/mcp/kilo-mcp.ts
6400
- import { join as join49 } from "path";
6634
+ import { join as join50 } from "path";
6401
6635
  var KiloMcp = class _KiloMcp extends ToolMcp {
6402
6636
  json;
6403
6637
  constructor(params) {
@@ -6418,7 +6652,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
6418
6652
  validate = true
6419
6653
  }) {
6420
6654
  const paths = this.getSettablePaths();
6421
- const fileContent = await readFileContentOrNull(join49(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6655
+ const fileContent = await readFileContentOrNull(join50(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6422
6656
  return new _KiloMcp({
6423
6657
  baseDir,
6424
6658
  relativeDirPath: paths.relativeDirPath,
@@ -6466,7 +6700,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
6466
6700
  };
6467
6701
 
6468
6702
  // src/features/mcp/kiro-mcp.ts
6469
- import { join as join50 } from "path";
6703
+ import { join as join51 } from "path";
6470
6704
  var KiroMcp = class _KiroMcp extends ToolMcp {
6471
6705
  json;
6472
6706
  constructor(params) {
@@ -6478,7 +6712,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
6478
6712
  }
6479
6713
  static getSettablePaths() {
6480
6714
  return {
6481
- relativeDirPath: join50(".kiro", "settings"),
6715
+ relativeDirPath: join51(".kiro", "settings"),
6482
6716
  relativeFilePath: "mcp.json"
6483
6717
  };
6484
6718
  }
@@ -6487,7 +6721,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
6487
6721
  validate = true
6488
6722
  }) {
6489
6723
  const paths = this.getSettablePaths();
6490
- const fileContent = await readFileContentOrNull(join50(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6724
+ const fileContent = await readFileContentOrNull(join51(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6491
6725
  return new _KiroMcp({
6492
6726
  baseDir,
6493
6727
  relativeDirPath: paths.relativeDirPath,
@@ -6535,29 +6769,30 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
6535
6769
  };
6536
6770
 
6537
6771
  // src/features/mcp/opencode-mcp.ts
6538
- import { join as join51 } from "path";
6539
- import { z as z20 } from "zod/mini";
6540
- var OpencodeMcpLocalServerSchema = z20.object({
6541
- type: z20.literal("local"),
6542
- command: z20.array(z20.string()),
6543
- environment: z20.optional(z20.record(z20.string(), z20.string())),
6544
- enabled: z20._default(z20.boolean(), true),
6545
- cwd: z20.optional(z20.string())
6772
+ import { join as join52 } from "path";
6773
+ import { parse as parseJsonc2 } from "jsonc-parser";
6774
+ import { z as z21 } from "zod/mini";
6775
+ var OpencodeMcpLocalServerSchema = z21.object({
6776
+ type: z21.literal("local"),
6777
+ command: z21.array(z21.string()),
6778
+ environment: z21.optional(z21.record(z21.string(), z21.string())),
6779
+ enabled: z21._default(z21.boolean(), true),
6780
+ cwd: z21.optional(z21.string())
6546
6781
  });
6547
- var OpencodeMcpRemoteServerSchema = z20.object({
6548
- type: z20.literal("remote"),
6549
- url: z20.string(),
6550
- headers: z20.optional(z20.record(z20.string(), z20.string())),
6551
- enabled: z20._default(z20.boolean(), true)
6782
+ var OpencodeMcpRemoteServerSchema = z21.object({
6783
+ type: z21.literal("remote"),
6784
+ url: z21.string(),
6785
+ headers: z21.optional(z21.record(z21.string(), z21.string())),
6786
+ enabled: z21._default(z21.boolean(), true)
6552
6787
  });
6553
- var OpencodeMcpServerSchema = z20.union([
6788
+ var OpencodeMcpServerSchema = z21.union([
6554
6789
  OpencodeMcpLocalServerSchema,
6555
6790
  OpencodeMcpRemoteServerSchema
6556
6791
  ]);
6557
- var OpencodeConfigSchema = z20.looseObject({
6558
- $schema: z20.optional(z20.string()),
6559
- mcp: z20.optional(z20.record(z20.string(), OpencodeMcpServerSchema)),
6560
- tools: z20.optional(z20.record(z20.string(), z20.boolean()))
6792
+ var OpencodeConfigSchema = z21.looseObject({
6793
+ $schema: z21.optional(z21.string()),
6794
+ mcp: z21.optional(z21.record(z21.string(), OpencodeMcpServerSchema)),
6795
+ tools: z21.optional(z21.record(z21.string(), z21.boolean()))
6561
6796
  });
6562
6797
  function convertFromOpencodeFormat(opencodeMcp, tools) {
6563
6798
  return Object.fromEntries(
@@ -6661,7 +6896,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6661
6896
  json;
6662
6897
  constructor(params) {
6663
6898
  super(params);
6664
- this.json = OpencodeConfigSchema.parse(JSON.parse(this.fileContent || "{}"));
6899
+ this.json = OpencodeConfigSchema.parse(parseJsonc2(this.fileContent || "{}"));
6665
6900
  }
6666
6901
  getJson() {
6667
6902
  return this.json;
@@ -6675,7 +6910,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6675
6910
  static getSettablePaths({ global } = {}) {
6676
6911
  if (global) {
6677
6912
  return {
6678
- relativeDirPath: join51(".config", "opencode"),
6913
+ relativeDirPath: join52(".config", "opencode"),
6679
6914
  relativeFilePath: "opencode.json"
6680
6915
  };
6681
6916
  }
@@ -6689,14 +6924,26 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6689
6924
  validate = true,
6690
6925
  global = false
6691
6926
  }) {
6692
- const paths = this.getSettablePaths({ global });
6693
- const fileContent = await readFileContentOrNull(join51(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcp":{}}';
6694
- const json = JSON.parse(fileContent);
6927
+ const basePaths = this.getSettablePaths({ global });
6928
+ const jsonDir = join52(baseDir, basePaths.relativeDirPath);
6929
+ let fileContent = null;
6930
+ let relativeFilePath = "opencode.jsonc";
6931
+ const jsoncPath = join52(jsonDir, "opencode.jsonc");
6932
+ const jsonPath = join52(jsonDir, "opencode.json");
6933
+ fileContent = await readFileContentOrNull(jsoncPath);
6934
+ if (!fileContent) {
6935
+ fileContent = await readFileContentOrNull(jsonPath);
6936
+ if (fileContent) {
6937
+ relativeFilePath = "opencode.json";
6938
+ }
6939
+ }
6940
+ const fileContentToUse = fileContent ?? '{"mcp":{}}';
6941
+ const json = parseJsonc2(fileContentToUse);
6695
6942
  const newJson = { ...json, mcp: json.mcp ?? {} };
6696
6943
  return new _OpencodeMcp({
6697
6944
  baseDir,
6698
- relativeDirPath: paths.relativeDirPath,
6699
- relativeFilePath: paths.relativeFilePath,
6945
+ relativeDirPath: basePaths.relativeDirPath,
6946
+ relativeFilePath,
6700
6947
  fileContent: JSON.stringify(newJson, null, 2),
6701
6948
  validate
6702
6949
  });
@@ -6707,12 +6954,23 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6707
6954
  validate = true,
6708
6955
  global = false
6709
6956
  }) {
6710
- const paths = this.getSettablePaths({ global });
6711
- const fileContent = await readOrInitializeFileContent(
6712
- join51(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6713
- JSON.stringify({ mcp: {} }, null, 2)
6714
- );
6715
- const json = JSON.parse(fileContent);
6957
+ const basePaths = this.getSettablePaths({ global });
6958
+ const jsonDir = join52(baseDir, basePaths.relativeDirPath);
6959
+ let fileContent = null;
6960
+ let relativeFilePath = "opencode.jsonc";
6961
+ const jsoncPath = join52(jsonDir, "opencode.jsonc");
6962
+ const jsonPath = join52(jsonDir, "opencode.json");
6963
+ fileContent = await readFileContentOrNull(jsoncPath);
6964
+ if (!fileContent) {
6965
+ fileContent = await readFileContentOrNull(jsonPath);
6966
+ if (fileContent) {
6967
+ relativeFilePath = "opencode.json";
6968
+ }
6969
+ }
6970
+ if (!fileContent) {
6971
+ fileContent = JSON.stringify({ mcp: {} }, null, 2);
6972
+ }
6973
+ const json = parseJsonc2(fileContent);
6716
6974
  const { mcp: convertedMcp, tools: mcpTools } = convertToOpencodeFormat(
6717
6975
  rulesyncMcp.getMcpServers()
6718
6976
  );
@@ -6724,8 +6982,8 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6724
6982
  };
6725
6983
  return new _OpencodeMcp({
6726
6984
  baseDir,
6727
- relativeDirPath: paths.relativeDirPath,
6728
- relativeFilePath: paths.relativeFilePath,
6985
+ relativeDirPath: basePaths.relativeDirPath,
6986
+ relativeFilePath,
6729
6987
  fileContent: JSON.stringify(newJson, null, 2),
6730
6988
  validate
6731
6989
  });
@@ -6762,7 +7020,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
6762
7020
  };
6763
7021
 
6764
7022
  // src/features/mcp/roo-mcp.ts
6765
- import { join as join52 } from "path";
7023
+ import { join as join53 } from "path";
6766
7024
  function isRooMcpServers(value) {
6767
7025
  return value !== void 0 && value !== null && typeof value === "object";
6768
7026
  }
@@ -6814,7 +7072,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
6814
7072
  validate = true
6815
7073
  }) {
6816
7074
  const fileContent = await readFileContent(
6817
- join52(
7075
+ join53(
6818
7076
  baseDir,
6819
7077
  this.getSettablePaths().relativeDirPath,
6820
7078
  this.getSettablePaths().relativeFilePath
@@ -6885,7 +7143,7 @@ var mcpProcessorToolTargetTuple = [
6885
7143
  "opencode",
6886
7144
  "roo"
6887
7145
  ];
6888
- var McpProcessorToolTargetSchema = z21.enum(mcpProcessorToolTargetTuple);
7146
+ var McpProcessorToolTargetSchema = z22.enum(mcpProcessorToolTargetTuple);
6889
7147
  var toolMcpFactories = /* @__PURE__ */ new Map([
6890
7148
  [
6891
7149
  "claudecode",
@@ -7187,25 +7445,25 @@ var McpProcessor = class extends FeatureProcessor {
7187
7445
  };
7188
7446
 
7189
7447
  // src/features/rules/rules-processor.ts
7190
- import { basename as basename10, join as join112, relative as relative5 } from "path";
7448
+ import { basename as basename10, join as join113, relative as relative5 } from "path";
7191
7449
  import { encode } from "@toon-format/toon";
7192
- import { z as z53 } from "zod/mini";
7450
+ import { z as z54 } from "zod/mini";
7193
7451
 
7194
7452
  // src/constants/general.ts
7195
7453
  var SKILL_FILE_NAME = "SKILL.md";
7196
7454
 
7197
7455
  // src/features/skills/agentsmd-skill.ts
7198
- import { join as join56 } from "path";
7456
+ import { join as join57 } from "path";
7199
7457
 
7200
7458
  // src/features/skills/simulated-skill.ts
7201
- import { join as join55 } from "path";
7202
- import { z as z22 } from "zod/mini";
7459
+ import { join as join56 } from "path";
7460
+ import { z as z23 } from "zod/mini";
7203
7461
 
7204
7462
  // src/features/skills/tool-skill.ts
7205
- import { join as join54 } from "path";
7463
+ import { join as join55 } from "path";
7206
7464
 
7207
7465
  // src/types/ai-dir.ts
7208
- import path2, { basename as basename3, join as join53, relative as relative4, resolve as resolve4 } from "path";
7466
+ import path2, { basename as basename3, join as join54, relative as relative4, resolve as resolve4 } from "path";
7209
7467
  var AiDir = class {
7210
7468
  /**
7211
7469
  * @example "."
@@ -7299,8 +7557,8 @@ var AiDir = class {
7299
7557
  * @returns Array of files with their relative paths and buffers
7300
7558
  */
7301
7559
  static async collectOtherFiles(baseDir, relativeDirPath, dirName, excludeFileName) {
7302
- const dirPath = join53(baseDir, relativeDirPath, dirName);
7303
- const glob = join53(dirPath, "**", "*");
7560
+ const dirPath = join54(baseDir, relativeDirPath, dirName);
7561
+ const glob = join54(dirPath, "**", "*");
7304
7562
  const filePaths = await findFilesByGlobs(glob, { type: "file" });
7305
7563
  const filteredPaths = filePaths.filter((filePath) => basename3(filePath) !== excludeFileName);
7306
7564
  const files = await Promise.all(
@@ -7398,8 +7656,8 @@ var ToolSkill = class extends AiDir {
7398
7656
  }) {
7399
7657
  const settablePaths = getSettablePaths({ global });
7400
7658
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
7401
- const skillDirPath = join54(baseDir, actualRelativeDirPath, dirName);
7402
- const skillFilePath = join54(skillDirPath, SKILL_FILE_NAME);
7659
+ const skillDirPath = join55(baseDir, actualRelativeDirPath, dirName);
7660
+ const skillFilePath = join55(skillDirPath, SKILL_FILE_NAME);
7403
7661
  if (!await fileExists(skillFilePath)) {
7404
7662
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
7405
7663
  }
@@ -7423,16 +7681,16 @@ var ToolSkill = class extends AiDir {
7423
7681
  }
7424
7682
  requireMainFileFrontmatter() {
7425
7683
  if (!this.mainFile?.frontmatter) {
7426
- throw new Error(`Frontmatter is not defined in ${join54(this.relativeDirPath, this.dirName)}`);
7684
+ throw new Error(`Frontmatter is not defined in ${join55(this.relativeDirPath, this.dirName)}`);
7427
7685
  }
7428
7686
  return this.mainFile.frontmatter;
7429
7687
  }
7430
7688
  };
7431
7689
 
7432
7690
  // src/features/skills/simulated-skill.ts
7433
- var SimulatedSkillFrontmatterSchema = z22.looseObject({
7434
- name: z22.string(),
7435
- description: z22.string()
7691
+ var SimulatedSkillFrontmatterSchema = z23.looseObject({
7692
+ name: z23.string(),
7693
+ description: z23.string()
7436
7694
  });
7437
7695
  var SimulatedSkill = class extends ToolSkill {
7438
7696
  frontmatter;
@@ -7463,7 +7721,7 @@ var SimulatedSkill = class extends ToolSkill {
7463
7721
  const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
7464
7722
  if (!result.success) {
7465
7723
  throw new Error(
7466
- `Invalid frontmatter in ${join55(relativeDirPath, dirName)}: ${formatError(result.error)}`
7724
+ `Invalid frontmatter in ${join56(relativeDirPath, dirName)}: ${formatError(result.error)}`
7467
7725
  );
7468
7726
  }
7469
7727
  }
@@ -7521,8 +7779,8 @@ var SimulatedSkill = class extends ToolSkill {
7521
7779
  }) {
7522
7780
  const settablePaths = this.getSettablePaths();
7523
7781
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
7524
- const skillDirPath = join55(baseDir, actualRelativeDirPath, dirName);
7525
- const skillFilePath = join55(skillDirPath, SKILL_FILE_NAME);
7782
+ const skillDirPath = join56(baseDir, actualRelativeDirPath, dirName);
7783
+ const skillFilePath = join56(skillDirPath, SKILL_FILE_NAME);
7526
7784
  if (!await fileExists(skillFilePath)) {
7527
7785
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
7528
7786
  }
@@ -7599,7 +7857,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
7599
7857
  throw new Error("AgentsmdSkill does not support global mode.");
7600
7858
  }
7601
7859
  return {
7602
- relativeDirPath: join56(".agents", "skills")
7860
+ relativeDirPath: join57(".agents", "skills")
7603
7861
  };
7604
7862
  }
7605
7863
  static async fromDir(params) {
@@ -7626,11 +7884,11 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
7626
7884
  };
7627
7885
 
7628
7886
  // src/features/skills/factorydroid-skill.ts
7629
- import { join as join57 } from "path";
7887
+ import { join as join58 } from "path";
7630
7888
  var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
7631
7889
  static getSettablePaths(_options) {
7632
7890
  return {
7633
- relativeDirPath: join57(".factory", "skills")
7891
+ relativeDirPath: join58(".factory", "skills")
7634
7892
  };
7635
7893
  }
7636
7894
  static async fromDir(params) {
@@ -7657,11 +7915,11 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
7657
7915
  };
7658
7916
 
7659
7917
  // src/features/skills/skills-processor.ts
7660
- import { basename as basename5, join as join74 } from "path";
7661
- import { z as z37 } from "zod/mini";
7918
+ import { basename as basename5, join as join75 } from "path";
7919
+ import { z as z38 } from "zod/mini";
7662
7920
 
7663
7921
  // src/types/dir-feature-processor.ts
7664
- import { join as join58 } from "path";
7922
+ import { join as join59 } from "path";
7665
7923
  var DirFeatureProcessor = class {
7666
7924
  baseDir;
7667
7925
  dryRun;
@@ -7692,7 +7950,7 @@ var DirFeatureProcessor = class {
7692
7950
  const mainFile = aiDir.getMainFile();
7693
7951
  let mainFileContent;
7694
7952
  if (mainFile) {
7695
- const mainFilePath = join58(dirPath, mainFile.name);
7953
+ const mainFilePath = join59(dirPath, mainFile.name);
7696
7954
  const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter);
7697
7955
  mainFileContent = addTrailingNewline(content);
7698
7956
  const existingContent = await readFileContentOrNull(mainFilePath);
@@ -7706,7 +7964,7 @@ var DirFeatureProcessor = class {
7706
7964
  const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
7707
7965
  otherFileContents.push(contentWithNewline);
7708
7966
  if (!dirHasChanges) {
7709
- const filePath = join58(dirPath, file.relativeFilePathToDirPath);
7967
+ const filePath = join59(dirPath, file.relativeFilePathToDirPath);
7710
7968
  const existingContent = await readFileContentOrNull(filePath);
7711
7969
  if (existingContent !== contentWithNewline) {
7712
7970
  dirHasChanges = true;
@@ -7720,22 +7978,22 @@ var DirFeatureProcessor = class {
7720
7978
  if (this.dryRun) {
7721
7979
  logger.info(`[DRY RUN] Would create directory: ${dirPath}`);
7722
7980
  if (mainFile) {
7723
- logger.info(`[DRY RUN] Would write: ${join58(dirPath, mainFile.name)}`);
7724
- changedPaths.push(join58(relativeDir, mainFile.name));
7981
+ logger.info(`[DRY RUN] Would write: ${join59(dirPath, mainFile.name)}`);
7982
+ changedPaths.push(join59(relativeDir, mainFile.name));
7725
7983
  }
7726
7984
  for (const file of otherFiles) {
7727
- logger.info(`[DRY RUN] Would write: ${join58(dirPath, file.relativeFilePathToDirPath)}`);
7728
- changedPaths.push(join58(relativeDir, file.relativeFilePathToDirPath));
7985
+ logger.info(`[DRY RUN] Would write: ${join59(dirPath, file.relativeFilePathToDirPath)}`);
7986
+ changedPaths.push(join59(relativeDir, file.relativeFilePathToDirPath));
7729
7987
  }
7730
7988
  } else {
7731
7989
  await ensureDir(dirPath);
7732
7990
  if (mainFile && mainFileContent) {
7733
- const mainFilePath = join58(dirPath, mainFile.name);
7991
+ const mainFilePath = join59(dirPath, mainFile.name);
7734
7992
  await writeFileContent(mainFilePath, mainFileContent);
7735
- changedPaths.push(join58(relativeDir, mainFile.name));
7993
+ changedPaths.push(join59(relativeDir, mainFile.name));
7736
7994
  }
7737
7995
  for (const [i, file] of otherFiles.entries()) {
7738
- const filePath = join58(dirPath, file.relativeFilePathToDirPath);
7996
+ const filePath = join59(dirPath, file.relativeFilePathToDirPath);
7739
7997
  const content = otherFileContents[i];
7740
7998
  if (content === void 0) {
7741
7999
  throw new Error(
@@ -7743,7 +8001,7 @@ var DirFeatureProcessor = class {
7743
8001
  );
7744
8002
  }
7745
8003
  await writeFileContent(filePath, content);
7746
- changedPaths.push(join58(relativeDir, file.relativeFilePathToDirPath));
8004
+ changedPaths.push(join59(relativeDir, file.relativeFilePathToDirPath));
7747
8005
  }
7748
8006
  }
7749
8007
  changedCount++;
@@ -7775,38 +8033,38 @@ var DirFeatureProcessor = class {
7775
8033
  };
7776
8034
 
7777
8035
  // src/features/skills/agentsskills-skill.ts
7778
- import { join as join60 } from "path";
7779
- import { z as z24 } from "zod/mini";
8036
+ import { join as join61 } from "path";
8037
+ import { z as z25 } from "zod/mini";
7780
8038
 
7781
8039
  // src/features/skills/rulesync-skill.ts
7782
- import { join as join59 } from "path";
7783
- import { z as z23 } from "zod/mini";
7784
- var RulesyncSkillFrontmatterSchemaInternal = z23.looseObject({
7785
- name: z23.string(),
7786
- description: z23.string(),
7787
- targets: z23._default(RulesyncTargetsSchema, ["*"]),
7788
- claudecode: z23.optional(
7789
- z23.looseObject({
7790
- "allowed-tools": z23.optional(z23.array(z23.string()))
8040
+ import { join as join60 } from "path";
8041
+ import { z as z24 } from "zod/mini";
8042
+ var RulesyncSkillFrontmatterSchemaInternal = z24.looseObject({
8043
+ name: z24.string(),
8044
+ description: z24.string(),
8045
+ targets: z24._default(RulesyncTargetsSchema, ["*"]),
8046
+ claudecode: z24.optional(
8047
+ z24.looseObject({
8048
+ "allowed-tools": z24.optional(z24.array(z24.string()))
7791
8049
  })
7792
8050
  ),
7793
- codexcli: z23.optional(
7794
- z23.looseObject({
7795
- "short-description": z23.optional(z23.string())
8051
+ codexcli: z24.optional(
8052
+ z24.looseObject({
8053
+ "short-description": z24.optional(z24.string())
7796
8054
  })
7797
8055
  ),
7798
- opencode: z23.optional(
7799
- z23.looseObject({
7800
- "allowed-tools": z23.optional(z23.array(z23.string()))
8056
+ opencode: z24.optional(
8057
+ z24.looseObject({
8058
+ "allowed-tools": z24.optional(z24.array(z24.string()))
7801
8059
  })
7802
8060
  ),
7803
- copilot: z23.optional(
7804
- z23.looseObject({
7805
- license: z23.optional(z23.string())
8061
+ copilot: z24.optional(
8062
+ z24.looseObject({
8063
+ license: z24.optional(z24.string())
7806
8064
  })
7807
8065
  ),
7808
- cline: z23.optional(z23.looseObject({})),
7809
- roo: z23.optional(z23.looseObject({}))
8066
+ cline: z24.optional(z24.looseObject({})),
8067
+ roo: z24.optional(z24.looseObject({}))
7810
8068
  });
7811
8069
  var RulesyncSkillFrontmatterSchema = RulesyncSkillFrontmatterSchemaInternal;
7812
8070
  var RulesyncSkill = class _RulesyncSkill extends AiDir {
@@ -7846,7 +8104,7 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
7846
8104
  }
7847
8105
  getFrontmatter() {
7848
8106
  if (!this.mainFile?.frontmatter) {
7849
- throw new Error(`Frontmatter is not defined in ${join59(this.relativeDirPath, this.dirName)}`);
8107
+ throw new Error(`Frontmatter is not defined in ${join60(this.relativeDirPath, this.dirName)}`);
7850
8108
  }
7851
8109
  const result = RulesyncSkillFrontmatterSchema.parse(this.mainFile.frontmatter);
7852
8110
  return result;
@@ -7872,8 +8130,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
7872
8130
  dirName,
7873
8131
  global = false
7874
8132
  }) {
7875
- const skillDirPath = join59(baseDir, relativeDirPath, dirName);
7876
- const skillFilePath = join59(skillDirPath, SKILL_FILE_NAME);
8133
+ const skillDirPath = join60(baseDir, relativeDirPath, dirName);
8134
+ const skillFilePath = join60(skillDirPath, SKILL_FILE_NAME);
7877
8135
  if (!await fileExists(skillFilePath)) {
7878
8136
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
7879
8137
  }
@@ -7903,14 +8161,14 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
7903
8161
  };
7904
8162
 
7905
8163
  // src/features/skills/agentsskills-skill.ts
7906
- var AgentsSkillsSkillFrontmatterSchema = z24.looseObject({
7907
- name: z24.string(),
7908
- description: z24.string()
8164
+ var AgentsSkillsSkillFrontmatterSchema = z25.looseObject({
8165
+ name: z25.string(),
8166
+ description: z25.string()
7909
8167
  });
7910
8168
  var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
7911
8169
  constructor({
7912
8170
  baseDir = process.cwd(),
7913
- relativeDirPath = join60(".agents", "skills"),
8171
+ relativeDirPath = join61(".agents", "skills"),
7914
8172
  dirName,
7915
8173
  frontmatter,
7916
8174
  body,
@@ -7942,7 +8200,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
7942
8200
  throw new Error("AgentsSkillsSkill does not support global mode.");
7943
8201
  }
7944
8202
  return {
7945
- relativeDirPath: join60(".agents", "skills")
8203
+ relativeDirPath: join61(".agents", "skills")
7946
8204
  };
7947
8205
  }
7948
8206
  getFrontmatter() {
@@ -8021,9 +8279,9 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
8021
8279
  });
8022
8280
  const result = AgentsSkillsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8023
8281
  if (!result.success) {
8024
- const skillDirPath = join60(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8282
+ const skillDirPath = join61(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8025
8283
  throw new Error(
8026
- `Invalid frontmatter in ${join60(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8284
+ `Invalid frontmatter in ${join61(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8027
8285
  );
8028
8286
  }
8029
8287
  return new _AgentsSkillsSkill({
@@ -8058,16 +8316,16 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
8058
8316
  };
8059
8317
 
8060
8318
  // src/features/skills/antigravity-skill.ts
8061
- import { join as join61 } from "path";
8062
- import { z as z25 } from "zod/mini";
8063
- var AntigravitySkillFrontmatterSchema = z25.looseObject({
8064
- name: z25.string(),
8065
- description: z25.string()
8319
+ import { join as join62 } from "path";
8320
+ import { z as z26 } from "zod/mini";
8321
+ var AntigravitySkillFrontmatterSchema = z26.looseObject({
8322
+ name: z26.string(),
8323
+ description: z26.string()
8066
8324
  });
8067
8325
  var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8068
8326
  constructor({
8069
8327
  baseDir = process.cwd(),
8070
- relativeDirPath = join61(".agent", "skills"),
8328
+ relativeDirPath = join62(".agent", "skills"),
8071
8329
  dirName,
8072
8330
  frontmatter,
8073
8331
  body,
@@ -8099,11 +8357,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8099
8357
  } = {}) {
8100
8358
  if (global) {
8101
8359
  return {
8102
- relativeDirPath: join61(".gemini", "antigravity", "skills")
8360
+ relativeDirPath: join62(".gemini", "antigravity", "skills")
8103
8361
  };
8104
8362
  }
8105
8363
  return {
8106
- relativeDirPath: join61(".agent", "skills")
8364
+ relativeDirPath: join62(".agent", "skills")
8107
8365
  };
8108
8366
  }
8109
8367
  getFrontmatter() {
@@ -8182,9 +8440,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8182
8440
  });
8183
8441
  const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
8184
8442
  if (!result.success) {
8185
- const skillDirPath = join61(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8443
+ const skillDirPath = join62(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8186
8444
  throw new Error(
8187
- `Invalid frontmatter in ${join61(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8445
+ `Invalid frontmatter in ${join62(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8188
8446
  );
8189
8447
  }
8190
8448
  return new _AntigravitySkill({
@@ -8218,17 +8476,17 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8218
8476
  };
8219
8477
 
8220
8478
  // src/features/skills/claudecode-skill.ts
8221
- import { join as join62 } from "path";
8222
- import { z as z26 } from "zod/mini";
8223
- var ClaudecodeSkillFrontmatterSchema = z26.looseObject({
8224
- name: z26.string(),
8225
- description: z26.string(),
8226
- "allowed-tools": z26.optional(z26.array(z26.string()))
8479
+ import { join as join63 } from "path";
8480
+ import { z as z27 } from "zod/mini";
8481
+ var ClaudecodeSkillFrontmatterSchema = z27.looseObject({
8482
+ name: z27.string(),
8483
+ description: z27.string(),
8484
+ "allowed-tools": z27.optional(z27.array(z27.string()))
8227
8485
  });
8228
8486
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8229
8487
  constructor({
8230
8488
  baseDir = process.cwd(),
8231
- relativeDirPath = join62(".claude", "skills"),
8489
+ relativeDirPath = join63(".claude", "skills"),
8232
8490
  dirName,
8233
8491
  frontmatter,
8234
8492
  body,
@@ -8259,7 +8517,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8259
8517
  global: _global = false
8260
8518
  } = {}) {
8261
8519
  return {
8262
- relativeDirPath: join62(".claude", "skills")
8520
+ relativeDirPath: join63(".claude", "skills")
8263
8521
  };
8264
8522
  }
8265
8523
  getFrontmatter() {
@@ -8344,9 +8602,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8344
8602
  });
8345
8603
  const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8346
8604
  if (!result.success) {
8347
- const skillDirPath = join62(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8605
+ const skillDirPath = join63(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8348
8606
  throw new Error(
8349
- `Invalid frontmatter in ${join62(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8607
+ `Invalid frontmatter in ${join63(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8350
8608
  );
8351
8609
  }
8352
8610
  return new _ClaudecodeSkill({
@@ -8380,16 +8638,16 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8380
8638
  };
8381
8639
 
8382
8640
  // src/features/skills/cline-skill.ts
8383
- import { join as join63 } from "path";
8384
- import { z as z27 } from "zod/mini";
8385
- var ClineSkillFrontmatterSchema = z27.looseObject({
8386
- name: z27.string(),
8387
- description: z27.string()
8641
+ import { join as join64 } from "path";
8642
+ import { z as z28 } from "zod/mini";
8643
+ var ClineSkillFrontmatterSchema = z28.looseObject({
8644
+ name: z28.string(),
8645
+ description: z28.string()
8388
8646
  });
8389
8647
  var ClineSkill = class _ClineSkill extends ToolSkill {
8390
8648
  constructor({
8391
8649
  baseDir = process.cwd(),
8392
- relativeDirPath = join63(".cline", "skills"),
8650
+ relativeDirPath = join64(".cline", "skills"),
8393
8651
  dirName,
8394
8652
  frontmatter,
8395
8653
  body,
@@ -8418,7 +8676,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
8418
8676
  }
8419
8677
  static getSettablePaths(_options = {}) {
8420
8678
  return {
8421
- relativeDirPath: join63(".cline", "skills")
8679
+ relativeDirPath: join64(".cline", "skills")
8422
8680
  };
8423
8681
  }
8424
8682
  getFrontmatter() {
@@ -8505,13 +8763,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
8505
8763
  });
8506
8764
  const result = ClineSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8507
8765
  if (!result.success) {
8508
- const skillDirPath = join63(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8766
+ const skillDirPath = join64(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8509
8767
  throw new Error(
8510
- `Invalid frontmatter in ${join63(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8768
+ `Invalid frontmatter in ${join64(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8511
8769
  );
8512
8770
  }
8513
8771
  if (result.data.name !== loaded.dirName) {
8514
- const skillFilePath = join63(
8772
+ const skillFilePath = join64(
8515
8773
  loaded.baseDir,
8516
8774
  loaded.relativeDirPath,
8517
8775
  loaded.dirName,
@@ -8552,21 +8810,21 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
8552
8810
  };
8553
8811
 
8554
8812
  // src/features/skills/codexcli-skill.ts
8555
- import { join as join64 } from "path";
8556
- import { z as z28 } from "zod/mini";
8557
- var CodexCliSkillFrontmatterSchema = z28.looseObject({
8558
- name: z28.string(),
8559
- description: z28.string(),
8560
- metadata: z28.optional(
8561
- z28.looseObject({
8562
- "short-description": z28.optional(z28.string())
8813
+ import { join as join65 } from "path";
8814
+ import { z as z29 } from "zod/mini";
8815
+ var CodexCliSkillFrontmatterSchema = z29.looseObject({
8816
+ name: z29.string(),
8817
+ description: z29.string(),
8818
+ metadata: z29.optional(
8819
+ z29.looseObject({
8820
+ "short-description": z29.optional(z29.string())
8563
8821
  })
8564
8822
  )
8565
8823
  });
8566
8824
  var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8567
8825
  constructor({
8568
8826
  baseDir = process.cwd(),
8569
- relativeDirPath = join64(".codex", "skills"),
8827
+ relativeDirPath = join65(".codex", "skills"),
8570
8828
  dirName,
8571
8829
  frontmatter,
8572
8830
  body,
@@ -8597,7 +8855,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8597
8855
  global: _global = false
8598
8856
  } = {}) {
8599
8857
  return {
8600
- relativeDirPath: join64(".codex", "skills")
8858
+ relativeDirPath: join65(".codex", "skills")
8601
8859
  };
8602
8860
  }
8603
8861
  getFrontmatter() {
@@ -8686,9 +8944,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8686
8944
  });
8687
8945
  const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8688
8946
  if (!result.success) {
8689
- const skillDirPath = join64(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8947
+ const skillDirPath = join65(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8690
8948
  throw new Error(
8691
- `Invalid frontmatter in ${join64(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8949
+ `Invalid frontmatter in ${join65(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8692
8950
  );
8693
8951
  }
8694
8952
  return new _CodexCliSkill({
@@ -8722,17 +8980,17 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8722
8980
  };
8723
8981
 
8724
8982
  // src/features/skills/copilot-skill.ts
8725
- import { join as join65 } from "path";
8726
- import { z as z29 } from "zod/mini";
8727
- var CopilotSkillFrontmatterSchema = z29.looseObject({
8728
- name: z29.string(),
8729
- description: z29.string(),
8730
- license: z29.optional(z29.string())
8983
+ import { join as join66 } from "path";
8984
+ import { z as z30 } from "zod/mini";
8985
+ var CopilotSkillFrontmatterSchema = z30.looseObject({
8986
+ name: z30.string(),
8987
+ description: z30.string(),
8988
+ license: z30.optional(z30.string())
8731
8989
  });
8732
8990
  var CopilotSkill = class _CopilotSkill extends ToolSkill {
8733
8991
  constructor({
8734
8992
  baseDir = process.cwd(),
8735
- relativeDirPath = join65(".github", "skills"),
8993
+ relativeDirPath = join66(".github", "skills"),
8736
8994
  dirName,
8737
8995
  frontmatter,
8738
8996
  body,
@@ -8764,7 +9022,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
8764
9022
  throw new Error("CopilotSkill does not support global mode.");
8765
9023
  }
8766
9024
  return {
8767
- relativeDirPath: join65(".github", "skills")
9025
+ relativeDirPath: join66(".github", "skills")
8768
9026
  };
8769
9027
  }
8770
9028
  getFrontmatter() {
@@ -8849,9 +9107,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
8849
9107
  });
8850
9108
  const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8851
9109
  if (!result.success) {
8852
- const skillDirPath = join65(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9110
+ const skillDirPath = join66(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8853
9111
  throw new Error(
8854
- `Invalid frontmatter in ${join65(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9112
+ `Invalid frontmatter in ${join66(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8855
9113
  );
8856
9114
  }
8857
9115
  return new _CopilotSkill({
@@ -8886,16 +9144,16 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
8886
9144
  };
8887
9145
 
8888
9146
  // src/features/skills/cursor-skill.ts
8889
- import { join as join66 } from "path";
8890
- import { z as z30 } from "zod/mini";
8891
- var CursorSkillFrontmatterSchema = z30.looseObject({
8892
- name: z30.string(),
8893
- description: z30.string()
9147
+ import { join as join67 } from "path";
9148
+ import { z as z31 } from "zod/mini";
9149
+ var CursorSkillFrontmatterSchema = z31.looseObject({
9150
+ name: z31.string(),
9151
+ description: z31.string()
8894
9152
  });
8895
9153
  var CursorSkill = class _CursorSkill extends ToolSkill {
8896
9154
  constructor({
8897
9155
  baseDir = process.cwd(),
8898
- relativeDirPath = join66(".cursor", "skills"),
9156
+ relativeDirPath = join67(".cursor", "skills"),
8899
9157
  dirName,
8900
9158
  frontmatter,
8901
9159
  body,
@@ -8924,7 +9182,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
8924
9182
  }
8925
9183
  static getSettablePaths(_options) {
8926
9184
  return {
8927
- relativeDirPath: join66(".cursor", "skills")
9185
+ relativeDirPath: join67(".cursor", "skills")
8928
9186
  };
8929
9187
  }
8930
9188
  getFrontmatter() {
@@ -9003,9 +9261,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
9003
9261
  });
9004
9262
  const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9005
9263
  if (!result.success) {
9006
- const skillDirPath = join66(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9264
+ const skillDirPath = join67(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9007
9265
  throw new Error(
9008
- `Invalid frontmatter in ${join66(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9266
+ `Invalid frontmatter in ${join67(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9009
9267
  );
9010
9268
  }
9011
9269
  return new _CursorSkill({
@@ -9040,11 +9298,11 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
9040
9298
  };
9041
9299
 
9042
9300
  // src/features/skills/geminicli-skill.ts
9043
- import { join as join67 } from "path";
9044
- import { z as z31 } from "zod/mini";
9045
- var GeminiCliSkillFrontmatterSchema = z31.looseObject({
9046
- name: z31.string(),
9047
- description: z31.string()
9301
+ import { join as join68 } from "path";
9302
+ import { z as z32 } from "zod/mini";
9303
+ var GeminiCliSkillFrontmatterSchema = z32.looseObject({
9304
+ name: z32.string(),
9305
+ description: z32.string()
9048
9306
  });
9049
9307
  var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9050
9308
  constructor({
@@ -9080,7 +9338,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9080
9338
  global: _global = false
9081
9339
  } = {}) {
9082
9340
  return {
9083
- relativeDirPath: join67(".gemini", "skills")
9341
+ relativeDirPath: join68(".gemini", "skills")
9084
9342
  };
9085
9343
  }
9086
9344
  getFrontmatter() {
@@ -9159,9 +9417,9 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9159
9417
  });
9160
9418
  const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9161
9419
  if (!result.success) {
9162
- const skillDirPath = join67(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9420
+ const skillDirPath = join68(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9163
9421
  throw new Error(
9164
- `Invalid frontmatter in ${join67(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9422
+ `Invalid frontmatter in ${join68(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9165
9423
  );
9166
9424
  }
9167
9425
  return new _GeminiCliSkill({
@@ -9196,16 +9454,16 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9196
9454
  };
9197
9455
 
9198
9456
  // src/features/skills/kilo-skill.ts
9199
- import { join as join68 } from "path";
9200
- import { z as z32 } from "zod/mini";
9201
- var KiloSkillFrontmatterSchema = z32.looseObject({
9202
- name: z32.string(),
9203
- description: z32.string()
9457
+ import { join as join69 } from "path";
9458
+ import { z as z33 } from "zod/mini";
9459
+ var KiloSkillFrontmatterSchema = z33.looseObject({
9460
+ name: z33.string(),
9461
+ description: z33.string()
9204
9462
  });
9205
9463
  var KiloSkill = class _KiloSkill extends ToolSkill {
9206
9464
  constructor({
9207
9465
  baseDir = process.cwd(),
9208
- relativeDirPath = join68(".kilocode", "skills"),
9466
+ relativeDirPath = join69(".kilocode", "skills"),
9209
9467
  dirName,
9210
9468
  frontmatter,
9211
9469
  body,
@@ -9236,7 +9494,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
9236
9494
  global: _global = false
9237
9495
  } = {}) {
9238
9496
  return {
9239
- relativeDirPath: join68(".kilocode", "skills")
9497
+ relativeDirPath: join69(".kilocode", "skills")
9240
9498
  };
9241
9499
  }
9242
9500
  getFrontmatter() {
@@ -9323,13 +9581,13 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
9323
9581
  });
9324
9582
  const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9325
9583
  if (!result.success) {
9326
- const skillDirPath = join68(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9584
+ const skillDirPath = join69(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9327
9585
  throw new Error(
9328
- `Invalid frontmatter in ${join68(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9586
+ `Invalid frontmatter in ${join69(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9329
9587
  );
9330
9588
  }
9331
9589
  if (result.data.name !== loaded.dirName) {
9332
- const skillFilePath = join68(
9590
+ const skillFilePath = join69(
9333
9591
  loaded.baseDir,
9334
9592
  loaded.relativeDirPath,
9335
9593
  loaded.dirName,
@@ -9370,16 +9628,16 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
9370
9628
  };
9371
9629
 
9372
9630
  // src/features/skills/kiro-skill.ts
9373
- import { join as join69 } from "path";
9374
- import { z as z33 } from "zod/mini";
9375
- var KiroSkillFrontmatterSchema = z33.looseObject({
9376
- name: z33.string(),
9377
- description: z33.string()
9631
+ import { join as join70 } from "path";
9632
+ import { z as z34 } from "zod/mini";
9633
+ var KiroSkillFrontmatterSchema = z34.looseObject({
9634
+ name: z34.string(),
9635
+ description: z34.string()
9378
9636
  });
9379
9637
  var KiroSkill = class _KiroSkill extends ToolSkill {
9380
9638
  constructor({
9381
9639
  baseDir = process.cwd(),
9382
- relativeDirPath = join69(".kiro", "skills"),
9640
+ relativeDirPath = join70(".kiro", "skills"),
9383
9641
  dirName,
9384
9642
  frontmatter,
9385
9643
  body,
@@ -9411,7 +9669,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
9411
9669
  throw new Error("KiroSkill does not support global mode.");
9412
9670
  }
9413
9671
  return {
9414
- relativeDirPath: join69(".kiro", "skills")
9672
+ relativeDirPath: join70(".kiro", "skills")
9415
9673
  };
9416
9674
  }
9417
9675
  getFrontmatter() {
@@ -9498,13 +9756,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
9498
9756
  });
9499
9757
  const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9500
9758
  if (!result.success) {
9501
- const skillDirPath = join69(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9759
+ const skillDirPath = join70(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9502
9760
  throw new Error(
9503
- `Invalid frontmatter in ${join69(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9761
+ `Invalid frontmatter in ${join70(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9504
9762
  );
9505
9763
  }
9506
9764
  if (result.data.name !== loaded.dirName) {
9507
- const skillFilePath = join69(
9765
+ const skillFilePath = join70(
9508
9766
  loaded.baseDir,
9509
9767
  loaded.relativeDirPath,
9510
9768
  loaded.dirName,
@@ -9546,17 +9804,17 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
9546
9804
  };
9547
9805
 
9548
9806
  // src/features/skills/opencode-skill.ts
9549
- import { join as join70 } from "path";
9550
- import { z as z34 } from "zod/mini";
9551
- var OpenCodeSkillFrontmatterSchema = z34.looseObject({
9552
- name: z34.string(),
9553
- description: z34.string(),
9554
- "allowed-tools": z34.optional(z34.array(z34.string()))
9807
+ import { join as join71 } from "path";
9808
+ import { z as z35 } from "zod/mini";
9809
+ var OpenCodeSkillFrontmatterSchema = z35.looseObject({
9810
+ name: z35.string(),
9811
+ description: z35.string(),
9812
+ "allowed-tools": z35.optional(z35.array(z35.string()))
9555
9813
  });
9556
9814
  var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
9557
9815
  constructor({
9558
9816
  baseDir = process.cwd(),
9559
- relativeDirPath = join70(".opencode", "skill"),
9817
+ relativeDirPath = join71(".opencode", "skill"),
9560
9818
  dirName,
9561
9819
  frontmatter,
9562
9820
  body,
@@ -9585,7 +9843,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
9585
9843
  }
9586
9844
  static getSettablePaths({ global = false } = {}) {
9587
9845
  return {
9588
- relativeDirPath: global ? join70(".config", "opencode", "skill") : join70(".opencode", "skill")
9846
+ relativeDirPath: global ? join71(".config", "opencode", "skill") : join71(".opencode", "skill")
9589
9847
  };
9590
9848
  }
9591
9849
  getFrontmatter() {
@@ -9670,9 +9928,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
9670
9928
  });
9671
9929
  const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9672
9930
  if (!result.success) {
9673
- const skillDirPath = join70(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9931
+ const skillDirPath = join71(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9674
9932
  throw new Error(
9675
- `Invalid frontmatter in ${join70(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9933
+ `Invalid frontmatter in ${join71(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9676
9934
  );
9677
9935
  }
9678
9936
  return new _OpenCodeSkill({
@@ -9706,16 +9964,16 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
9706
9964
  };
9707
9965
 
9708
9966
  // src/features/skills/replit-skill.ts
9709
- import { join as join71 } from "path";
9710
- import { z as z35 } from "zod/mini";
9711
- var ReplitSkillFrontmatterSchema = z35.looseObject({
9712
- name: z35.string(),
9713
- description: z35.string()
9967
+ import { join as join72 } from "path";
9968
+ import { z as z36 } from "zod/mini";
9969
+ var ReplitSkillFrontmatterSchema = z36.looseObject({
9970
+ name: z36.string(),
9971
+ description: z36.string()
9714
9972
  });
9715
9973
  var ReplitSkill = class _ReplitSkill extends ToolSkill {
9716
9974
  constructor({
9717
9975
  baseDir = process.cwd(),
9718
- relativeDirPath = join71(".agents", "skills"),
9976
+ relativeDirPath = join72(".agents", "skills"),
9719
9977
  dirName,
9720
9978
  frontmatter,
9721
9979
  body,
@@ -9747,7 +10005,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
9747
10005
  throw new Error("ReplitSkill does not support global mode.");
9748
10006
  }
9749
10007
  return {
9750
- relativeDirPath: join71(".agents", "skills")
10008
+ relativeDirPath: join72(".agents", "skills")
9751
10009
  };
9752
10010
  }
9753
10011
  getFrontmatter() {
@@ -9826,9 +10084,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
9826
10084
  });
9827
10085
  const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9828
10086
  if (!result.success) {
9829
- const skillDirPath = join71(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10087
+ const skillDirPath = join72(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9830
10088
  throw new Error(
9831
- `Invalid frontmatter in ${join71(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10089
+ `Invalid frontmatter in ${join72(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9832
10090
  );
9833
10091
  }
9834
10092
  return new _ReplitSkill({
@@ -9863,16 +10121,16 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
9863
10121
  };
9864
10122
 
9865
10123
  // src/features/skills/roo-skill.ts
9866
- import { join as join72 } from "path";
9867
- import { z as z36 } from "zod/mini";
9868
- var RooSkillFrontmatterSchema = z36.looseObject({
9869
- name: z36.string(),
9870
- description: z36.string()
10124
+ import { join as join73 } from "path";
10125
+ import { z as z37 } from "zod/mini";
10126
+ var RooSkillFrontmatterSchema = z37.looseObject({
10127
+ name: z37.string(),
10128
+ description: z37.string()
9871
10129
  });
9872
10130
  var RooSkill = class _RooSkill extends ToolSkill {
9873
10131
  constructor({
9874
10132
  baseDir = process.cwd(),
9875
- relativeDirPath = join72(".roo", "skills"),
10133
+ relativeDirPath = join73(".roo", "skills"),
9876
10134
  dirName,
9877
10135
  frontmatter,
9878
10136
  body,
@@ -9903,7 +10161,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
9903
10161
  global: _global = false
9904
10162
  } = {}) {
9905
10163
  return {
9906
- relativeDirPath: join72(".roo", "skills")
10164
+ relativeDirPath: join73(".roo", "skills")
9907
10165
  };
9908
10166
  }
9909
10167
  getFrontmatter() {
@@ -9990,13 +10248,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
9990
10248
  });
9991
10249
  const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9992
10250
  if (!result.success) {
9993
- const skillDirPath = join72(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10251
+ const skillDirPath = join73(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9994
10252
  throw new Error(
9995
- `Invalid frontmatter in ${join72(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10253
+ `Invalid frontmatter in ${join73(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9996
10254
  );
9997
10255
  }
9998
10256
  if (result.data.name !== loaded.dirName) {
9999
- const skillFilePath = join72(
10257
+ const skillFilePath = join73(
10000
10258
  loaded.baseDir,
10001
10259
  loaded.relativeDirPath,
10002
10260
  loaded.dirName,
@@ -10037,14 +10295,14 @@ var RooSkill = class _RooSkill extends ToolSkill {
10037
10295
  };
10038
10296
 
10039
10297
  // src/features/skills/skills-utils.ts
10040
- import { basename as basename4, join as join73 } from "path";
10298
+ import { basename as basename4, join as join74 } from "path";
10041
10299
  async function getLocalSkillDirNames(baseDir) {
10042
- const skillsDir = join73(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
10300
+ const skillsDir = join74(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
10043
10301
  const names = /* @__PURE__ */ new Set();
10044
10302
  if (!await directoryExists(skillsDir)) {
10045
10303
  return names;
10046
10304
  }
10047
- const dirPaths = await findFilesByGlobs(join73(skillsDir, "*"), { type: "dir" });
10305
+ const dirPaths = await findFilesByGlobs(join74(skillsDir, "*"), { type: "dir" });
10048
10306
  for (const dirPath of dirPaths) {
10049
10307
  const name = basename4(dirPath);
10050
10308
  if (name === basename4(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
@@ -10072,7 +10330,7 @@ var skillsProcessorToolTargetTuple = [
10072
10330
  "replit",
10073
10331
  "roo"
10074
10332
  ];
10075
- var SkillsProcessorToolTargetSchema = z37.enum(skillsProcessorToolTargetTuple);
10333
+ var SkillsProcessorToolTargetSchema = z38.enum(skillsProcessorToolTargetTuple);
10076
10334
  var toolSkillFactories = /* @__PURE__ */ new Map([
10077
10335
  [
10078
10336
  "agentsmd",
@@ -10273,10 +10531,10 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10273
10531
  )
10274
10532
  );
10275
10533
  const localSkillNames = new Set(localDirNames);
10276
- const curatedDirPath = join74(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
10534
+ const curatedDirPath = join75(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
10277
10535
  let curatedSkills = [];
10278
10536
  if (await directoryExists(curatedDirPath)) {
10279
- const curatedDirPaths = await findFilesByGlobs(join74(curatedDirPath, "*"), { type: "dir" });
10537
+ const curatedDirPaths = await findFilesByGlobs(join75(curatedDirPath, "*"), { type: "dir" });
10280
10538
  const curatedDirNames = curatedDirPaths.map((path3) => basename5(path3));
10281
10539
  const nonConflicting = curatedDirNames.filter((name) => {
10282
10540
  if (localSkillNames.has(name)) {
@@ -10310,8 +10568,8 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10310
10568
  async loadToolDirs() {
10311
10569
  const factory = this.getFactory(this.toolTarget);
10312
10570
  const paths = factory.class.getSettablePaths({ global: this.global });
10313
- const skillsDirPath = join74(this.baseDir, paths.relativeDirPath);
10314
- const dirPaths = await findFilesByGlobs(join74(skillsDirPath, "*"), { type: "dir" });
10571
+ const skillsDirPath = join75(this.baseDir, paths.relativeDirPath);
10572
+ const dirPaths = await findFilesByGlobs(join75(skillsDirPath, "*"), { type: "dir" });
10315
10573
  const dirNames = dirPaths.map((path3) => basename5(path3));
10316
10574
  const toolSkills = await Promise.all(
10317
10575
  dirNames.map(
@@ -10328,8 +10586,8 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10328
10586
  async loadToolDirsToDelete() {
10329
10587
  const factory = this.getFactory(this.toolTarget);
10330
10588
  const paths = factory.class.getSettablePaths({ global: this.global });
10331
- const skillsDirPath = join74(this.baseDir, paths.relativeDirPath);
10332
- const dirPaths = await findFilesByGlobs(join74(skillsDirPath, "*"), { type: "dir" });
10589
+ const skillsDirPath = join75(this.baseDir, paths.relativeDirPath);
10590
+ const dirPaths = await findFilesByGlobs(join75(skillsDirPath, "*"), { type: "dir" });
10333
10591
  const dirNames = dirPaths.map((path3) => basename5(path3));
10334
10592
  const toolSkills = dirNames.map(
10335
10593
  (dirName) => factory.class.forDeletion({
@@ -10391,11 +10649,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10391
10649
  };
10392
10650
 
10393
10651
  // src/features/subagents/agentsmd-subagent.ts
10394
- import { join as join76 } from "path";
10652
+ import { join as join77 } from "path";
10395
10653
 
10396
10654
  // src/features/subagents/simulated-subagent.ts
10397
- import { basename as basename6, join as join75 } from "path";
10398
- import { z as z38 } from "zod/mini";
10655
+ import { basename as basename6, join as join76 } from "path";
10656
+ import { z as z39 } from "zod/mini";
10399
10657
 
10400
10658
  // src/features/subagents/tool-subagent.ts
10401
10659
  var ToolSubagent = class extends ToolFile {
@@ -10447,9 +10705,9 @@ var ToolSubagent = class extends ToolFile {
10447
10705
  };
10448
10706
 
10449
10707
  // src/features/subagents/simulated-subagent.ts
10450
- var SimulatedSubagentFrontmatterSchema = z38.object({
10451
- name: z38.string(),
10452
- description: z38.string()
10708
+ var SimulatedSubagentFrontmatterSchema = z39.object({
10709
+ name: z39.string(),
10710
+ description: z39.string()
10453
10711
  });
10454
10712
  var SimulatedSubagent = class extends ToolSubagent {
10455
10713
  frontmatter;
@@ -10459,7 +10717,7 @@ var SimulatedSubagent = class extends ToolSubagent {
10459
10717
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
10460
10718
  if (!result.success) {
10461
10719
  throw new Error(
10462
- `Invalid frontmatter in ${join75(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10720
+ `Invalid frontmatter in ${join76(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10463
10721
  );
10464
10722
  }
10465
10723
  }
@@ -10510,7 +10768,7 @@ var SimulatedSubagent = class extends ToolSubagent {
10510
10768
  return {
10511
10769
  success: false,
10512
10770
  error: new Error(
10513
- `Invalid frontmatter in ${join75(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10771
+ `Invalid frontmatter in ${join76(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10514
10772
  )
10515
10773
  };
10516
10774
  }
@@ -10520,7 +10778,7 @@ var SimulatedSubagent = class extends ToolSubagent {
10520
10778
  relativeFilePath,
10521
10779
  validate = true
10522
10780
  }) {
10523
- const filePath = join75(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
10781
+ const filePath = join76(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
10524
10782
  const fileContent = await readFileContent(filePath);
10525
10783
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
10526
10784
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -10556,7 +10814,7 @@ var SimulatedSubagent = class extends ToolSubagent {
10556
10814
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
10557
10815
  static getSettablePaths() {
10558
10816
  return {
10559
- relativeDirPath: join76(".agents", "subagents")
10817
+ relativeDirPath: join77(".agents", "subagents")
10560
10818
  };
10561
10819
  }
10562
10820
  static async fromFile(params) {
@@ -10579,11 +10837,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
10579
10837
  };
10580
10838
 
10581
10839
  // src/features/subagents/factorydroid-subagent.ts
10582
- import { join as join77 } from "path";
10840
+ import { join as join78 } from "path";
10583
10841
  var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
10584
10842
  static getSettablePaths(_options) {
10585
10843
  return {
10586
- relativeDirPath: join77(".factory", "droids")
10844
+ relativeDirPath: join78(".factory", "droids")
10587
10845
  };
10588
10846
  }
10589
10847
  static async fromFile(params) {
@@ -10606,11 +10864,11 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
10606
10864
  };
10607
10865
 
10608
10866
  // src/features/subagents/geminicli-subagent.ts
10609
- import { join as join78 } from "path";
10867
+ import { join as join79 } from "path";
10610
10868
  var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
10611
10869
  static getSettablePaths() {
10612
10870
  return {
10613
- relativeDirPath: join78(".gemini", "subagents")
10871
+ relativeDirPath: join79(".gemini", "subagents")
10614
10872
  };
10615
10873
  }
10616
10874
  static async fromFile(params) {
@@ -10633,11 +10891,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
10633
10891
  };
10634
10892
 
10635
10893
  // src/features/subagents/roo-subagent.ts
10636
- import { join as join79 } from "path";
10894
+ import { join as join80 } from "path";
10637
10895
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
10638
10896
  static getSettablePaths() {
10639
10897
  return {
10640
- relativeDirPath: join79(".roo", "subagents")
10898
+ relativeDirPath: join80(".roo", "subagents")
10641
10899
  };
10642
10900
  }
10643
10901
  static async fromFile(params) {
@@ -10660,20 +10918,20 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
10660
10918
  };
10661
10919
 
10662
10920
  // src/features/subagents/subagents-processor.ts
10663
- import { basename as basename9, join as join87 } from "path";
10664
- import { z as z46 } from "zod/mini";
10921
+ import { basename as basename9, join as join88 } from "path";
10922
+ import { z as z47 } from "zod/mini";
10665
10923
 
10666
10924
  // src/features/subagents/claudecode-subagent.ts
10667
- import { join as join81 } from "path";
10668
- import { z as z40 } from "zod/mini";
10925
+ import { join as join82 } from "path";
10926
+ import { z as z41 } from "zod/mini";
10669
10927
 
10670
10928
  // src/features/subagents/rulesync-subagent.ts
10671
- import { basename as basename7, join as join80 } from "path";
10672
- import { z as z39 } from "zod/mini";
10673
- var RulesyncSubagentFrontmatterSchema = z39.looseObject({
10674
- targets: z39._default(RulesyncTargetsSchema, ["*"]),
10675
- name: z39.string(),
10676
- description: z39.string()
10929
+ import { basename as basename7, join as join81 } from "path";
10930
+ import { z as z40 } from "zod/mini";
10931
+ var RulesyncSubagentFrontmatterSchema = z40.looseObject({
10932
+ targets: z40._default(RulesyncTargetsSchema, ["*"]),
10933
+ name: z40.string(),
10934
+ description: z40.string()
10677
10935
  });
10678
10936
  var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10679
10937
  frontmatter;
@@ -10682,7 +10940,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10682
10940
  const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
10683
10941
  if (!parseResult.success && rest.validate !== false) {
10684
10942
  throw new Error(
10685
- `Invalid frontmatter in ${join80(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
10943
+ `Invalid frontmatter in ${join81(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
10686
10944
  );
10687
10945
  }
10688
10946
  const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
@@ -10715,7 +10973,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10715
10973
  return {
10716
10974
  success: false,
10717
10975
  error: new Error(
10718
- `Invalid frontmatter in ${join80(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10976
+ `Invalid frontmatter in ${join81(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10719
10977
  )
10720
10978
  };
10721
10979
  }
@@ -10723,7 +10981,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10723
10981
  static async fromFile({
10724
10982
  relativeFilePath
10725
10983
  }) {
10726
- const filePath = join80(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
10984
+ const filePath = join81(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
10727
10985
  const fileContent = await readFileContent(filePath);
10728
10986
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
10729
10987
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -10742,13 +11000,13 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
10742
11000
  };
10743
11001
 
10744
11002
  // src/features/subagents/claudecode-subagent.ts
10745
- var ClaudecodeSubagentFrontmatterSchema = z40.looseObject({
10746
- name: z40.string(),
10747
- description: z40.string(),
10748
- model: z40.optional(z40.string()),
10749
- tools: z40.optional(z40.union([z40.string(), z40.array(z40.string())])),
10750
- permissionMode: z40.optional(z40.string()),
10751
- skills: z40.optional(z40.union([z40.string(), z40.array(z40.string())]))
11003
+ var ClaudecodeSubagentFrontmatterSchema = z41.looseObject({
11004
+ name: z41.string(),
11005
+ description: z41.string(),
11006
+ model: z41.optional(z41.string()),
11007
+ tools: z41.optional(z41.union([z41.string(), z41.array(z41.string())])),
11008
+ permissionMode: z41.optional(z41.string()),
11009
+ skills: z41.optional(z41.union([z41.string(), z41.array(z41.string())]))
10752
11010
  });
10753
11011
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10754
11012
  frontmatter;
@@ -10758,7 +11016,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10758
11016
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
10759
11017
  if (!result.success) {
10760
11018
  throw new Error(
10761
- `Invalid frontmatter in ${join81(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11019
+ `Invalid frontmatter in ${join82(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10762
11020
  );
10763
11021
  }
10764
11022
  }
@@ -10770,7 +11028,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10770
11028
  }
10771
11029
  static getSettablePaths(_options = {}) {
10772
11030
  return {
10773
- relativeDirPath: join81(".claude", "agents")
11031
+ relativeDirPath: join82(".claude", "agents")
10774
11032
  };
10775
11033
  }
10776
11034
  getFrontmatter() {
@@ -10846,7 +11104,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10846
11104
  return {
10847
11105
  success: false,
10848
11106
  error: new Error(
10849
- `Invalid frontmatter in ${join81(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11107
+ `Invalid frontmatter in ${join82(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10850
11108
  )
10851
11109
  };
10852
11110
  }
@@ -10864,7 +11122,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10864
11122
  global = false
10865
11123
  }) {
10866
11124
  const paths = this.getSettablePaths({ global });
10867
- const filePath = join81(baseDir, paths.relativeDirPath, relativeFilePath);
11125
+ const filePath = join82(baseDir, paths.relativeDirPath, relativeFilePath);
10868
11126
  const fileContent = await readFileContent(filePath);
10869
11127
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
10870
11128
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -10899,16 +11157,16 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
10899
11157
  };
10900
11158
 
10901
11159
  // src/features/subagents/codexcli-subagent.ts
10902
- import { join as join82 } from "path";
11160
+ import { join as join83 } from "path";
10903
11161
  import * as smolToml2 from "smol-toml";
10904
- import { z as z41 } from "zod/mini";
10905
- var CodexCliSubagentTomlSchema = z41.looseObject({
10906
- name: z41.string(),
10907
- description: z41.optional(z41.string()),
10908
- developer_instructions: z41.optional(z41.string()),
10909
- model: z41.optional(z41.string()),
10910
- model_reasoning_effort: z41.optional(z41.string()),
10911
- sandbox_mode: z41.optional(z41.string())
11162
+ import { z as z42 } from "zod/mini";
11163
+ var CodexCliSubagentTomlSchema = z42.looseObject({
11164
+ name: z42.string(),
11165
+ description: z42.optional(z42.string()),
11166
+ developer_instructions: z42.optional(z42.string()),
11167
+ model: z42.optional(z42.string()),
11168
+ model_reasoning_effort: z42.optional(z42.string()),
11169
+ sandbox_mode: z42.optional(z42.string())
10912
11170
  });
10913
11171
  var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10914
11172
  body;
@@ -10919,7 +11177,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10919
11177
  CodexCliSubagentTomlSchema.parse(parsed);
10920
11178
  } catch (error) {
10921
11179
  throw new Error(
10922
- `Invalid TOML in ${join82(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
11180
+ `Invalid TOML in ${join83(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
10923
11181
  { cause: error }
10924
11182
  );
10925
11183
  }
@@ -10931,7 +11189,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10931
11189
  }
10932
11190
  static getSettablePaths(_options = {}) {
10933
11191
  return {
10934
- relativeDirPath: join82(".codex", "agents")
11192
+ relativeDirPath: join83(".codex", "agents")
10935
11193
  };
10936
11194
  }
10937
11195
  getBody() {
@@ -10943,7 +11201,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
10943
11201
  parsed = CodexCliSubagentTomlSchema.parse(smolToml2.parse(this.body));
10944
11202
  } catch (error) {
10945
11203
  throw new Error(
10946
- `Failed to parse TOML in ${join82(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
11204
+ `Failed to parse TOML in ${join83(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
10947
11205
  { cause: error }
10948
11206
  );
10949
11207
  }
@@ -11024,7 +11282,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11024
11282
  global = false
11025
11283
  }) {
11026
11284
  const paths = this.getSettablePaths({ global });
11027
- const filePath = join82(baseDir, paths.relativeDirPath, relativeFilePath);
11285
+ const filePath = join83(baseDir, paths.relativeDirPath, relativeFilePath);
11028
11286
  const fileContent = await readFileContent(filePath);
11029
11287
  const subagent = new _CodexCliSubagent({
11030
11288
  baseDir,
@@ -11062,13 +11320,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11062
11320
  };
11063
11321
 
11064
11322
  // src/features/subagents/copilot-subagent.ts
11065
- import { join as join83 } from "path";
11066
- import { z as z42 } from "zod/mini";
11323
+ import { join as join84 } from "path";
11324
+ import { z as z43 } from "zod/mini";
11067
11325
  var REQUIRED_TOOL = "agent/runSubagent";
11068
- var CopilotSubagentFrontmatterSchema = z42.looseObject({
11069
- name: z42.string(),
11070
- description: z42.string(),
11071
- tools: z42.optional(z42.union([z42.string(), z42.array(z42.string())]))
11326
+ var CopilotSubagentFrontmatterSchema = z43.looseObject({
11327
+ name: z43.string(),
11328
+ description: z43.string(),
11329
+ tools: z43.optional(z43.union([z43.string(), z43.array(z43.string())]))
11072
11330
  });
11073
11331
  var normalizeTools = (tools) => {
11074
11332
  if (!tools) {
@@ -11088,7 +11346,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11088
11346
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
11089
11347
  if (!result.success) {
11090
11348
  throw new Error(
11091
- `Invalid frontmatter in ${join83(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11349
+ `Invalid frontmatter in ${join84(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11092
11350
  );
11093
11351
  }
11094
11352
  }
@@ -11100,7 +11358,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11100
11358
  }
11101
11359
  static getSettablePaths(_options = {}) {
11102
11360
  return {
11103
- relativeDirPath: join83(".github", "agents")
11361
+ relativeDirPath: join84(".github", "agents")
11104
11362
  };
11105
11363
  }
11106
11364
  getFrontmatter() {
@@ -11174,7 +11432,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11174
11432
  return {
11175
11433
  success: false,
11176
11434
  error: new Error(
11177
- `Invalid frontmatter in ${join83(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11435
+ `Invalid frontmatter in ${join84(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11178
11436
  )
11179
11437
  };
11180
11438
  }
@@ -11192,7 +11450,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11192
11450
  global = false
11193
11451
  }) {
11194
11452
  const paths = this.getSettablePaths({ global });
11195
- const filePath = join83(baseDir, paths.relativeDirPath, relativeFilePath);
11453
+ const filePath = join84(baseDir, paths.relativeDirPath, relativeFilePath);
11196
11454
  const fileContent = await readFileContent(filePath);
11197
11455
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11198
11456
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11228,11 +11486,11 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11228
11486
  };
11229
11487
 
11230
11488
  // src/features/subagents/cursor-subagent.ts
11231
- import { join as join84 } from "path";
11232
- import { z as z43 } from "zod/mini";
11233
- var CursorSubagentFrontmatterSchema = z43.looseObject({
11234
- name: z43.string(),
11235
- description: z43.string()
11489
+ import { join as join85 } from "path";
11490
+ import { z as z44 } from "zod/mini";
11491
+ var CursorSubagentFrontmatterSchema = z44.looseObject({
11492
+ name: z44.string(),
11493
+ description: z44.string()
11236
11494
  });
11237
11495
  var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11238
11496
  frontmatter;
@@ -11242,7 +11500,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11242
11500
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
11243
11501
  if (!result.success) {
11244
11502
  throw new Error(
11245
- `Invalid frontmatter in ${join84(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11503
+ `Invalid frontmatter in ${join85(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11246
11504
  );
11247
11505
  }
11248
11506
  }
@@ -11254,7 +11512,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11254
11512
  }
11255
11513
  static getSettablePaths(_options = {}) {
11256
11514
  return {
11257
- relativeDirPath: join84(".cursor", "agents")
11515
+ relativeDirPath: join85(".cursor", "agents")
11258
11516
  };
11259
11517
  }
11260
11518
  getFrontmatter() {
@@ -11321,7 +11579,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11321
11579
  return {
11322
11580
  success: false,
11323
11581
  error: new Error(
11324
- `Invalid frontmatter in ${join84(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11582
+ `Invalid frontmatter in ${join85(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11325
11583
  )
11326
11584
  };
11327
11585
  }
@@ -11339,7 +11597,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11339
11597
  global = false
11340
11598
  }) {
11341
11599
  const paths = this.getSettablePaths({ global });
11342
- const filePath = join84(baseDir, paths.relativeDirPath, relativeFilePath);
11600
+ const filePath = join85(baseDir, paths.relativeDirPath, relativeFilePath);
11343
11601
  const fileContent = await readFileContent(filePath);
11344
11602
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11345
11603
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11375,23 +11633,23 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11375
11633
  };
11376
11634
 
11377
11635
  // src/features/subagents/kiro-subagent.ts
11378
- import { join as join85 } from "path";
11379
- import { z as z44 } from "zod/mini";
11380
- var KiroCliSubagentJsonSchema = z44.looseObject({
11381
- name: z44.string(),
11382
- description: z44.optional(z44.nullable(z44.string())),
11383
- prompt: z44.optional(z44.nullable(z44.string())),
11384
- tools: z44.optional(z44.nullable(z44.array(z44.string()))),
11385
- toolAliases: z44.optional(z44.nullable(z44.record(z44.string(), z44.string()))),
11386
- toolSettings: z44.optional(z44.nullable(z44.unknown())),
11387
- toolSchema: z44.optional(z44.nullable(z44.unknown())),
11388
- hooks: z44.optional(z44.nullable(z44.record(z44.string(), z44.array(z44.unknown())))),
11389
- model: z44.optional(z44.nullable(z44.string())),
11390
- mcpServers: z44.optional(z44.nullable(z44.record(z44.string(), z44.unknown()))),
11391
- useLegacyMcpJson: z44.optional(z44.nullable(z44.boolean())),
11392
- resources: z44.optional(z44.nullable(z44.array(z44.string()))),
11393
- allowedTools: z44.optional(z44.nullable(z44.array(z44.string()))),
11394
- includeMcpJson: z44.optional(z44.nullable(z44.boolean()))
11636
+ import { join as join86 } from "path";
11637
+ import { z as z45 } from "zod/mini";
11638
+ var KiroCliSubagentJsonSchema = z45.looseObject({
11639
+ name: z45.string(),
11640
+ description: z45.optional(z45.nullable(z45.string())),
11641
+ prompt: z45.optional(z45.nullable(z45.string())),
11642
+ tools: z45.optional(z45.nullable(z45.array(z45.string()))),
11643
+ toolAliases: z45.optional(z45.nullable(z45.record(z45.string(), z45.string()))),
11644
+ toolSettings: z45.optional(z45.nullable(z45.unknown())),
11645
+ toolSchema: z45.optional(z45.nullable(z45.unknown())),
11646
+ hooks: z45.optional(z45.nullable(z45.record(z45.string(), z45.array(z45.unknown())))),
11647
+ model: z45.optional(z45.nullable(z45.string())),
11648
+ mcpServers: z45.optional(z45.nullable(z45.record(z45.string(), z45.unknown()))),
11649
+ useLegacyMcpJson: z45.optional(z45.nullable(z45.boolean())),
11650
+ resources: z45.optional(z45.nullable(z45.array(z45.string()))),
11651
+ allowedTools: z45.optional(z45.nullable(z45.array(z45.string()))),
11652
+ includeMcpJson: z45.optional(z45.nullable(z45.boolean()))
11395
11653
  });
11396
11654
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11397
11655
  body;
@@ -11402,7 +11660,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11402
11660
  KiroCliSubagentJsonSchema.parse(parsed);
11403
11661
  } catch (error) {
11404
11662
  throw new Error(
11405
- `Invalid JSON in ${join85(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
11663
+ `Invalid JSON in ${join86(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
11406
11664
  { cause: error }
11407
11665
  );
11408
11666
  }
@@ -11414,7 +11672,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11414
11672
  }
11415
11673
  static getSettablePaths(_options = {}) {
11416
11674
  return {
11417
- relativeDirPath: join85(".kiro", "agents")
11675
+ relativeDirPath: join86(".kiro", "agents")
11418
11676
  };
11419
11677
  }
11420
11678
  getBody() {
@@ -11426,7 +11684,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11426
11684
  parsed = JSON.parse(this.body);
11427
11685
  } catch (error) {
11428
11686
  throw new Error(
11429
- `Failed to parse JSON in ${join85(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
11687
+ `Failed to parse JSON in ${join86(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
11430
11688
  { cause: error }
11431
11689
  );
11432
11690
  }
@@ -11507,7 +11765,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11507
11765
  global = false
11508
11766
  }) {
11509
11767
  const paths = this.getSettablePaths({ global });
11510
- const filePath = join85(baseDir, paths.relativeDirPath, relativeFilePath);
11768
+ const filePath = join86(baseDir, paths.relativeDirPath, relativeFilePath);
11511
11769
  const fileContent = await readFileContent(filePath);
11512
11770
  const subagent = new _KiroSubagent({
11513
11771
  baseDir,
@@ -11545,12 +11803,12 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
11545
11803
  };
11546
11804
 
11547
11805
  // src/features/subagents/opencode-subagent.ts
11548
- import { basename as basename8, join as join86 } from "path";
11549
- import { z as z45 } from "zod/mini";
11550
- var OpenCodeSubagentFrontmatterSchema = z45.looseObject({
11551
- description: z45.string(),
11552
- mode: z45._default(z45.string(), "subagent"),
11553
- name: z45.optional(z45.string())
11806
+ import { basename as basename8, join as join87 } from "path";
11807
+ import { z as z46 } from "zod/mini";
11808
+ var OpenCodeSubagentFrontmatterSchema = z46.looseObject({
11809
+ description: z46.string(),
11810
+ mode: z46._default(z46.string(), "subagent"),
11811
+ name: z46.optional(z46.string())
11554
11812
  });
11555
11813
  var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11556
11814
  frontmatter;
@@ -11560,7 +11818,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11560
11818
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
11561
11819
  if (!result.success) {
11562
11820
  throw new Error(
11563
- `Invalid frontmatter in ${join86(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11821
+ `Invalid frontmatter in ${join87(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11564
11822
  );
11565
11823
  }
11566
11824
  }
@@ -11574,7 +11832,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11574
11832
  global = false
11575
11833
  } = {}) {
11576
11834
  return {
11577
- relativeDirPath: global ? join86(".config", "opencode", "agent") : join86(".opencode", "agent")
11835
+ relativeDirPath: global ? join87(".config", "opencode", "agent") : join87(".opencode", "agent")
11578
11836
  };
11579
11837
  }
11580
11838
  getFrontmatter() {
@@ -11612,7 +11870,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11612
11870
  const opencodeFrontmatter = {
11613
11871
  ...opencodeSection,
11614
11872
  description: rulesyncFrontmatter.description,
11615
- mode: "subagent",
11873
+ mode: typeof opencodeSection.mode === "string" ? opencodeSection.mode : "subagent",
11616
11874
  ...rulesyncFrontmatter.name && { name: rulesyncFrontmatter.name }
11617
11875
  };
11618
11876
  const body = rulesyncSubagent.getBody();
@@ -11640,7 +11898,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11640
11898
  return {
11641
11899
  success: false,
11642
11900
  error: new Error(
11643
- `Invalid frontmatter in ${join86(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11901
+ `Invalid frontmatter in ${join87(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11644
11902
  )
11645
11903
  };
11646
11904
  }
@@ -11657,7 +11915,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
11657
11915
  global = false
11658
11916
  }) {
11659
11917
  const paths = this.getSettablePaths({ global });
11660
- const filePath = join86(baseDir, paths.relativeDirPath, relativeFilePath);
11918
+ const filePath = join87(baseDir, paths.relativeDirPath, relativeFilePath);
11661
11919
  const fileContent = await readFileContent(filePath);
11662
11920
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11663
11921
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11706,7 +11964,7 @@ var subagentsProcessorToolTargetTuple = [
11706
11964
  "opencode",
11707
11965
  "roo"
11708
11966
  ];
11709
- var SubagentsProcessorToolTargetSchema = z46.enum(subagentsProcessorToolTargetTuple);
11967
+ var SubagentsProcessorToolTargetSchema = z47.enum(subagentsProcessorToolTargetTuple);
11710
11968
  var toolSubagentFactories = /* @__PURE__ */ new Map([
11711
11969
  [
11712
11970
  "agentsmd",
@@ -11868,7 +12126,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
11868
12126
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
11869
12127
  */
11870
12128
  async loadRulesyncFiles() {
11871
- const subagentsDir = join87(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
12129
+ const subagentsDir = join88(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
11872
12130
  const dirExists = await directoryExists(subagentsDir);
11873
12131
  if (!dirExists) {
11874
12132
  logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -11883,7 +12141,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
11883
12141
  logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
11884
12142
  const rulesyncSubagents = [];
11885
12143
  for (const mdFile of mdFiles) {
11886
- const filepath = join87(subagentsDir, mdFile);
12144
+ const filepath = join88(subagentsDir, mdFile);
11887
12145
  try {
11888
12146
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
11889
12147
  relativeFilePath: mdFile,
@@ -11913,7 +12171,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
11913
12171
  const factory = this.getFactory(this.toolTarget);
11914
12172
  const paths = factory.class.getSettablePaths({ global: this.global });
11915
12173
  const subagentFilePaths = await findFilesByGlobs(
11916
- join87(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
12174
+ join88(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
11917
12175
  );
11918
12176
  if (forDeletion) {
11919
12177
  const toolSubagents2 = subagentFilePaths.map(
@@ -11978,49 +12236,49 @@ var SubagentsProcessor = class extends FeatureProcessor {
11978
12236
  };
11979
12237
 
11980
12238
  // src/features/rules/agentsmd-rule.ts
11981
- import { join as join90 } from "path";
12239
+ import { join as join91 } from "path";
11982
12240
 
11983
12241
  // src/features/rules/tool-rule.ts
11984
- import { join as join89 } from "path";
12242
+ import { join as join90 } from "path";
11985
12243
 
11986
12244
  // src/features/rules/rulesync-rule.ts
11987
- import { join as join88 } from "path";
11988
- import { z as z47 } from "zod/mini";
11989
- var RulesyncRuleFrontmatterSchema = z47.object({
11990
- root: z47.optional(z47.boolean()),
11991
- localRoot: z47.optional(z47.boolean()),
11992
- targets: z47._default(RulesyncTargetsSchema, ["*"]),
11993
- description: z47.optional(z47.string()),
11994
- globs: z47.optional(z47.array(z47.string())),
11995
- agentsmd: z47.optional(
11996
- z47.object({
12245
+ import { join as join89 } from "path";
12246
+ import { z as z48 } from "zod/mini";
12247
+ var RulesyncRuleFrontmatterSchema = z48.object({
12248
+ root: z48.optional(z48.boolean()),
12249
+ localRoot: z48.optional(z48.boolean()),
12250
+ targets: z48._default(RulesyncTargetsSchema, ["*"]),
12251
+ description: z48.optional(z48.string()),
12252
+ globs: z48.optional(z48.array(z48.string())),
12253
+ agentsmd: z48.optional(
12254
+ z48.object({
11997
12255
  // @example "path/to/subproject"
11998
- subprojectPath: z47.optional(z47.string())
12256
+ subprojectPath: z48.optional(z48.string())
11999
12257
  })
12000
12258
  ),
12001
- claudecode: z47.optional(
12002
- z47.object({
12259
+ claudecode: z48.optional(
12260
+ z48.object({
12003
12261
  // Glob patterns for conditional rules (takes precedence over globs)
12004
12262
  // @example ["src/**/*.ts", "tests/**/*.test.ts"]
12005
- paths: z47.optional(z47.array(z47.string()))
12263
+ paths: z48.optional(z48.array(z48.string()))
12006
12264
  })
12007
12265
  ),
12008
- cursor: z47.optional(
12009
- z47.object({
12010
- alwaysApply: z47.optional(z47.boolean()),
12011
- description: z47.optional(z47.string()),
12012
- globs: z47.optional(z47.array(z47.string()))
12266
+ cursor: z48.optional(
12267
+ z48.object({
12268
+ alwaysApply: z48.optional(z48.boolean()),
12269
+ description: z48.optional(z48.string()),
12270
+ globs: z48.optional(z48.array(z48.string()))
12013
12271
  })
12014
12272
  ),
12015
- copilot: z47.optional(
12016
- z47.object({
12017
- excludeAgent: z47.optional(z47.union([z47.literal("code-review"), z47.literal("coding-agent")]))
12273
+ copilot: z48.optional(
12274
+ z48.object({
12275
+ excludeAgent: z48.optional(z48.union([z48.literal("code-review"), z48.literal("coding-agent")]))
12018
12276
  })
12019
12277
  ),
12020
- antigravity: z47.optional(
12021
- z47.looseObject({
12022
- trigger: z47.optional(z47.string()),
12023
- globs: z47.optional(z47.array(z47.string()))
12278
+ antigravity: z48.optional(
12279
+ z48.looseObject({
12280
+ trigger: z48.optional(z48.string()),
12281
+ globs: z48.optional(z48.array(z48.string()))
12024
12282
  })
12025
12283
  )
12026
12284
  });
@@ -12031,7 +12289,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
12031
12289
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
12032
12290
  if (!parseResult.success && rest.validate !== false) {
12033
12291
  throw new Error(
12034
- `Invalid frontmatter in ${join88(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
12292
+ `Invalid frontmatter in ${join89(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
12035
12293
  );
12036
12294
  }
12037
12295
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -12066,7 +12324,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
12066
12324
  return {
12067
12325
  success: false,
12068
12326
  error: new Error(
12069
- `Invalid frontmatter in ${join88(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12327
+ `Invalid frontmatter in ${join89(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12070
12328
  )
12071
12329
  };
12072
12330
  }
@@ -12075,7 +12333,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
12075
12333
  relativeFilePath,
12076
12334
  validate = true
12077
12335
  }) {
12078
- const filePath = join88(
12336
+ const filePath = join89(
12079
12337
  process.cwd(),
12080
12338
  this.getSettablePaths().recommended.relativeDirPath,
12081
12339
  relativeFilePath
@@ -12177,7 +12435,7 @@ var ToolRule = class extends ToolFile {
12177
12435
  rulesyncRule,
12178
12436
  validate = true,
12179
12437
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
12180
- nonRootPath = { relativeDirPath: join89(".agents", "memories") }
12438
+ nonRootPath = { relativeDirPath: join90(".agents", "memories") }
12181
12439
  }) {
12182
12440
  const params = this.buildToolRuleParamsDefault({
12183
12441
  baseDir,
@@ -12188,7 +12446,7 @@ var ToolRule = class extends ToolFile {
12188
12446
  });
12189
12447
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
12190
12448
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
12191
- params.relativeDirPath = join89(rulesyncFrontmatter.agentsmd.subprojectPath);
12449
+ params.relativeDirPath = join90(rulesyncFrontmatter.agentsmd.subprojectPath);
12192
12450
  params.relativeFilePath = "AGENTS.md";
12193
12451
  }
12194
12452
  return params;
@@ -12237,7 +12495,7 @@ var ToolRule = class extends ToolFile {
12237
12495
  }
12238
12496
  };
12239
12497
  function buildToolPath(toolDir, subDir, excludeToolDir) {
12240
- return excludeToolDir ? subDir : join89(toolDir, subDir);
12498
+ return excludeToolDir ? subDir : join90(toolDir, subDir);
12241
12499
  }
12242
12500
 
12243
12501
  // src/features/rules/agentsmd-rule.ts
@@ -12266,8 +12524,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
12266
12524
  validate = true
12267
12525
  }) {
12268
12526
  const isRoot = relativeFilePath === "AGENTS.md";
12269
- const relativePath = isRoot ? "AGENTS.md" : join90(".agents", "memories", relativeFilePath);
12270
- const fileContent = await readFileContent(join90(baseDir, relativePath));
12527
+ const relativePath = isRoot ? "AGENTS.md" : join91(".agents", "memories", relativeFilePath);
12528
+ const fileContent = await readFileContent(join91(baseDir, relativePath));
12271
12529
  return new _AgentsMdRule({
12272
12530
  baseDir,
12273
12531
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -12322,21 +12580,21 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
12322
12580
  };
12323
12581
 
12324
12582
  // src/features/rules/antigravity-rule.ts
12325
- import { join as join91 } from "path";
12326
- import { z as z48 } from "zod/mini";
12327
- var AntigravityRuleFrontmatterSchema = z48.looseObject({
12328
- trigger: z48.optional(
12329
- z48.union([
12330
- z48.literal("always_on"),
12331
- z48.literal("glob"),
12332
- z48.literal("manual"),
12333
- z48.literal("model_decision"),
12334
- z48.string()
12583
+ import { join as join92 } from "path";
12584
+ import { z as z49 } from "zod/mini";
12585
+ var AntigravityRuleFrontmatterSchema = z49.looseObject({
12586
+ trigger: z49.optional(
12587
+ z49.union([
12588
+ z49.literal("always_on"),
12589
+ z49.literal("glob"),
12590
+ z49.literal("manual"),
12591
+ z49.literal("model_decision"),
12592
+ z49.string()
12335
12593
  // accepts any string for forward compatibility
12336
12594
  ])
12337
12595
  ),
12338
- globs: z48.optional(z48.string()),
12339
- description: z48.optional(z48.string())
12596
+ globs: z49.optional(z49.string()),
12597
+ description: z49.optional(z49.string())
12340
12598
  });
12341
12599
  function parseGlobsString(globs) {
12342
12600
  if (!globs) {
@@ -12481,7 +12739,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
12481
12739
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
12482
12740
  if (!result.success) {
12483
12741
  throw new Error(
12484
- `Invalid frontmatter in ${join91(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12742
+ `Invalid frontmatter in ${join92(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12485
12743
  );
12486
12744
  }
12487
12745
  }
@@ -12505,7 +12763,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
12505
12763
  relativeFilePath,
12506
12764
  validate = true
12507
12765
  }) {
12508
- const filePath = join91(
12766
+ const filePath = join92(
12509
12767
  baseDir,
12510
12768
  this.getSettablePaths().nonRoot.relativeDirPath,
12511
12769
  relativeFilePath
@@ -12646,7 +12904,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
12646
12904
  };
12647
12905
 
12648
12906
  // src/features/rules/augmentcode-legacy-rule.ts
12649
- import { join as join92 } from "path";
12907
+ import { join as join93 } from "path";
12650
12908
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
12651
12909
  toRulesyncRule() {
12652
12910
  const rulesyncFrontmatter = {
@@ -12707,8 +12965,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
12707
12965
  }) {
12708
12966
  const settablePaths = this.getSettablePaths();
12709
12967
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
12710
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : join92(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
12711
- const fileContent = await readFileContent(join92(baseDir, relativePath));
12968
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : join93(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
12969
+ const fileContent = await readFileContent(join93(baseDir, relativePath));
12712
12970
  return new _AugmentcodeLegacyRule({
12713
12971
  baseDir,
12714
12972
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -12737,7 +12995,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
12737
12995
  };
12738
12996
 
12739
12997
  // src/features/rules/augmentcode-rule.ts
12740
- import { join as join93 } from "path";
12998
+ import { join as join94 } from "path";
12741
12999
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
12742
13000
  toRulesyncRule() {
12743
13001
  return this.toRulesyncRuleDefault();
@@ -12768,7 +13026,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
12768
13026
  relativeFilePath,
12769
13027
  validate = true
12770
13028
  }) {
12771
- const filePath = join93(
13029
+ const filePath = join94(
12772
13030
  baseDir,
12773
13031
  this.getSettablePaths().nonRoot.relativeDirPath,
12774
13032
  relativeFilePath
@@ -12808,7 +13066,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
12808
13066
  };
12809
13067
 
12810
13068
  // src/features/rules/claudecode-legacy-rule.ts
12811
- import { join as join94 } from "path";
13069
+ import { join as join95 } from "path";
12812
13070
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
12813
13071
  static getSettablePaths({
12814
13072
  global,
@@ -12843,7 +13101,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
12843
13101
  if (isRoot) {
12844
13102
  const relativePath2 = paths.root.relativeFilePath;
12845
13103
  const fileContent2 = await readFileContent(
12846
- join94(baseDir, paths.root.relativeDirPath, relativePath2)
13104
+ join95(baseDir, paths.root.relativeDirPath, relativePath2)
12847
13105
  );
12848
13106
  return new _ClaudecodeLegacyRule({
12849
13107
  baseDir,
@@ -12857,8 +13115,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
12857
13115
  if (!paths.nonRoot) {
12858
13116
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
12859
13117
  }
12860
- const relativePath = join94(paths.nonRoot.relativeDirPath, relativeFilePath);
12861
- const fileContent = await readFileContent(join94(baseDir, relativePath));
13118
+ const relativePath = join95(paths.nonRoot.relativeDirPath, relativeFilePath);
13119
+ const fileContent = await readFileContent(join95(baseDir, relativePath));
12862
13120
  return new _ClaudecodeLegacyRule({
12863
13121
  baseDir,
12864
13122
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -12917,10 +13175,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
12917
13175
  };
12918
13176
 
12919
13177
  // src/features/rules/claudecode-rule.ts
12920
- import { join as join95 } from "path";
12921
- import { z as z49 } from "zod/mini";
12922
- var ClaudecodeRuleFrontmatterSchema = z49.object({
12923
- paths: z49.optional(z49.array(z49.string()))
13178
+ import { join as join96 } from "path";
13179
+ import { z as z50 } from "zod/mini";
13180
+ var ClaudecodeRuleFrontmatterSchema = z50.object({
13181
+ paths: z50.optional(z50.array(z50.string()))
12924
13182
  });
12925
13183
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
12926
13184
  frontmatter;
@@ -12952,7 +13210,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
12952
13210
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
12953
13211
  if (!result.success) {
12954
13212
  throw new Error(
12955
- `Invalid frontmatter in ${join95(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13213
+ `Invalid frontmatter in ${join96(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12956
13214
  );
12957
13215
  }
12958
13216
  }
@@ -12980,7 +13238,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
12980
13238
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
12981
13239
  if (isRoot) {
12982
13240
  const fileContent2 = await readFileContent(
12983
- join95(baseDir, paths.root.relativeDirPath, paths.root.relativeFilePath)
13241
+ join96(baseDir, paths.root.relativeDirPath, paths.root.relativeFilePath)
12984
13242
  );
12985
13243
  return new _ClaudecodeRule({
12986
13244
  baseDir,
@@ -12995,16 +13253,16 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
12995
13253
  if (!paths.nonRoot) {
12996
13254
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
12997
13255
  }
12998
- const relativePath = join95(paths.nonRoot.relativeDirPath, relativeFilePath);
12999
- const fileContent = await readFileContent(join95(baseDir, relativePath));
13256
+ const relativePath = join96(paths.nonRoot.relativeDirPath, relativeFilePath);
13257
+ const fileContent = await readFileContent(join96(baseDir, relativePath));
13000
13258
  const { frontmatter, body: content } = parseFrontmatter(
13001
13259
  fileContent,
13002
- join95(baseDir, relativePath)
13260
+ join96(baseDir, relativePath)
13003
13261
  );
13004
13262
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
13005
13263
  if (!result.success) {
13006
13264
  throw new Error(
13007
- `Invalid frontmatter in ${join95(baseDir, relativePath)}: ${formatError(result.error)}`
13265
+ `Invalid frontmatter in ${join96(baseDir, relativePath)}: ${formatError(result.error)}`
13008
13266
  );
13009
13267
  }
13010
13268
  return new _ClaudecodeRule({
@@ -13111,7 +13369,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13111
13369
  return {
13112
13370
  success: false,
13113
13371
  error: new Error(
13114
- `Invalid frontmatter in ${join95(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13372
+ `Invalid frontmatter in ${join96(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13115
13373
  )
13116
13374
  };
13117
13375
  }
@@ -13131,10 +13389,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13131
13389
  };
13132
13390
 
13133
13391
  // src/features/rules/cline-rule.ts
13134
- import { join as join96 } from "path";
13135
- import { z as z50 } from "zod/mini";
13136
- var ClineRuleFrontmatterSchema = z50.object({
13137
- description: z50.string()
13392
+ import { join as join97 } from "path";
13393
+ import { z as z51 } from "zod/mini";
13394
+ var ClineRuleFrontmatterSchema = z51.object({
13395
+ description: z51.string()
13138
13396
  });
13139
13397
  var ClineRule = class _ClineRule extends ToolRule {
13140
13398
  static getSettablePaths(_options = {}) {
@@ -13177,7 +13435,7 @@ var ClineRule = class _ClineRule extends ToolRule {
13177
13435
  validate = true
13178
13436
  }) {
13179
13437
  const fileContent = await readFileContent(
13180
- join96(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
13438
+ join97(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
13181
13439
  );
13182
13440
  return new _ClineRule({
13183
13441
  baseDir,
@@ -13203,7 +13461,7 @@ var ClineRule = class _ClineRule extends ToolRule {
13203
13461
  };
13204
13462
 
13205
13463
  // src/features/rules/codexcli-rule.ts
13206
- import { join as join97 } from "path";
13464
+ import { join as join98 } from "path";
13207
13465
  var CodexcliRule = class _CodexcliRule extends ToolRule {
13208
13466
  static getSettablePaths({
13209
13467
  global,
@@ -13238,7 +13496,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
13238
13496
  if (isRoot) {
13239
13497
  const relativePath2 = paths.root.relativeFilePath;
13240
13498
  const fileContent2 = await readFileContent(
13241
- join97(baseDir, paths.root.relativeDirPath, relativePath2)
13499
+ join98(baseDir, paths.root.relativeDirPath, relativePath2)
13242
13500
  );
13243
13501
  return new _CodexcliRule({
13244
13502
  baseDir,
@@ -13252,8 +13510,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
13252
13510
  if (!paths.nonRoot) {
13253
13511
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13254
13512
  }
13255
- const relativePath = join97(paths.nonRoot.relativeDirPath, relativeFilePath);
13256
- const fileContent = await readFileContent(join97(baseDir, relativePath));
13513
+ const relativePath = join98(paths.nonRoot.relativeDirPath, relativeFilePath);
13514
+ const fileContent = await readFileContent(join98(baseDir, relativePath));
13257
13515
  return new _CodexcliRule({
13258
13516
  baseDir,
13259
13517
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -13312,12 +13570,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
13312
13570
  };
13313
13571
 
13314
13572
  // src/features/rules/copilot-rule.ts
13315
- import { join as join98 } from "path";
13316
- import { z as z51 } from "zod/mini";
13317
- var CopilotRuleFrontmatterSchema = z51.object({
13318
- description: z51.optional(z51.string()),
13319
- applyTo: z51.optional(z51.string()),
13320
- excludeAgent: z51.optional(z51.union([z51.literal("code-review"), z51.literal("coding-agent")]))
13573
+ import { join as join99 } from "path";
13574
+ import { z as z52 } from "zod/mini";
13575
+ var CopilotRuleFrontmatterSchema = z52.object({
13576
+ description: z52.optional(z52.string()),
13577
+ applyTo: z52.optional(z52.string()),
13578
+ excludeAgent: z52.optional(z52.union([z52.literal("code-review"), z52.literal("coding-agent")]))
13321
13579
  });
13322
13580
  var CopilotRule = class _CopilotRule extends ToolRule {
13323
13581
  frontmatter;
@@ -13346,7 +13604,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13346
13604
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
13347
13605
  if (!result.success) {
13348
13606
  throw new Error(
13349
- `Invalid frontmatter in ${join98(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13607
+ `Invalid frontmatter in ${join99(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13350
13608
  );
13351
13609
  }
13352
13610
  }
@@ -13436,8 +13694,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13436
13694
  const paths = this.getSettablePaths({ global });
13437
13695
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
13438
13696
  if (isRoot) {
13439
- const relativePath2 = join98(paths.root.relativeDirPath, paths.root.relativeFilePath);
13440
- const fileContent2 = await readFileContent(join98(baseDir, relativePath2));
13697
+ const relativePath2 = join99(paths.root.relativeDirPath, paths.root.relativeFilePath);
13698
+ const fileContent2 = await readFileContent(join99(baseDir, relativePath2));
13441
13699
  return new _CopilotRule({
13442
13700
  baseDir,
13443
13701
  relativeDirPath: paths.root.relativeDirPath,
@@ -13451,16 +13709,16 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13451
13709
  if (!paths.nonRoot) {
13452
13710
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13453
13711
  }
13454
- const relativePath = join98(paths.nonRoot.relativeDirPath, relativeFilePath);
13455
- const fileContent = await readFileContent(join98(baseDir, relativePath));
13712
+ const relativePath = join99(paths.nonRoot.relativeDirPath, relativeFilePath);
13713
+ const fileContent = await readFileContent(join99(baseDir, relativePath));
13456
13714
  const { frontmatter, body: content } = parseFrontmatter(
13457
13715
  fileContent,
13458
- join98(baseDir, relativePath)
13716
+ join99(baseDir, relativePath)
13459
13717
  );
13460
13718
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
13461
13719
  if (!result.success) {
13462
13720
  throw new Error(
13463
- `Invalid frontmatter in ${join98(baseDir, relativeFilePath)}: ${formatError(result.error)}`
13721
+ `Invalid frontmatter in ${join99(baseDir, relativeFilePath)}: ${formatError(result.error)}`
13464
13722
  );
13465
13723
  }
13466
13724
  return new _CopilotRule({
@@ -13502,7 +13760,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13502
13760
  return {
13503
13761
  success: false,
13504
13762
  error: new Error(
13505
- `Invalid frontmatter in ${join98(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13763
+ `Invalid frontmatter in ${join99(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13506
13764
  )
13507
13765
  };
13508
13766
  }
@@ -13522,12 +13780,12 @@ var CopilotRule = class _CopilotRule extends ToolRule {
13522
13780
  };
13523
13781
 
13524
13782
  // src/features/rules/cursor-rule.ts
13525
- import { join as join99 } from "path";
13526
- import { z as z52 } from "zod/mini";
13527
- var CursorRuleFrontmatterSchema = z52.object({
13528
- description: z52.optional(z52.string()),
13529
- globs: z52.optional(z52.string()),
13530
- alwaysApply: z52.optional(z52.boolean())
13783
+ import { join as join100 } from "path";
13784
+ import { z as z53 } from "zod/mini";
13785
+ var CursorRuleFrontmatterSchema = z53.object({
13786
+ description: z53.optional(z53.string()),
13787
+ globs: z53.optional(z53.string()),
13788
+ alwaysApply: z53.optional(z53.boolean())
13531
13789
  });
13532
13790
  var CursorRule = class _CursorRule extends ToolRule {
13533
13791
  frontmatter;
@@ -13544,7 +13802,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13544
13802
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
13545
13803
  if (!result.success) {
13546
13804
  throw new Error(
13547
- `Invalid frontmatter in ${join99(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13805
+ `Invalid frontmatter in ${join100(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13548
13806
  );
13549
13807
  }
13550
13808
  }
@@ -13660,7 +13918,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13660
13918
  relativeFilePath,
13661
13919
  validate = true
13662
13920
  }) {
13663
- const filePath = join99(
13921
+ const filePath = join100(
13664
13922
  baseDir,
13665
13923
  this.getSettablePaths().nonRoot.relativeDirPath,
13666
13924
  relativeFilePath
@@ -13670,7 +13928,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13670
13928
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
13671
13929
  if (!result.success) {
13672
13930
  throw new Error(
13673
- `Invalid frontmatter in ${join99(baseDir, relativeFilePath)}: ${formatError(result.error)}`
13931
+ `Invalid frontmatter in ${join100(baseDir, relativeFilePath)}: ${formatError(result.error)}`
13674
13932
  );
13675
13933
  }
13676
13934
  return new _CursorRule({
@@ -13707,7 +13965,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13707
13965
  return {
13708
13966
  success: false,
13709
13967
  error: new Error(
13710
- `Invalid frontmatter in ${join99(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13968
+ `Invalid frontmatter in ${join100(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13711
13969
  )
13712
13970
  };
13713
13971
  }
@@ -13727,7 +13985,7 @@ var CursorRule = class _CursorRule extends ToolRule {
13727
13985
  };
13728
13986
 
13729
13987
  // src/features/rules/factorydroid-rule.ts
13730
- import { join as join100 } from "path";
13988
+ import { join as join101 } from "path";
13731
13989
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
13732
13990
  constructor({ fileContent, root, ...rest }) {
13733
13991
  super({
@@ -13767,8 +14025,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
13767
14025
  const paths = this.getSettablePaths({ global });
13768
14026
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
13769
14027
  if (isRoot) {
13770
- const relativePath2 = join100(paths.root.relativeDirPath, paths.root.relativeFilePath);
13771
- const fileContent2 = await readFileContent(join100(baseDir, relativePath2));
14028
+ const relativePath2 = join101(paths.root.relativeDirPath, paths.root.relativeFilePath);
14029
+ const fileContent2 = await readFileContent(join101(baseDir, relativePath2));
13772
14030
  return new _FactorydroidRule({
13773
14031
  baseDir,
13774
14032
  relativeDirPath: paths.root.relativeDirPath,
@@ -13781,8 +14039,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
13781
14039
  if (!paths.nonRoot) {
13782
14040
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13783
14041
  }
13784
- const relativePath = join100(paths.nonRoot.relativeDirPath, relativeFilePath);
13785
- const fileContent = await readFileContent(join100(baseDir, relativePath));
14042
+ const relativePath = join101(paths.nonRoot.relativeDirPath, relativeFilePath);
14043
+ const fileContent = await readFileContent(join101(baseDir, relativePath));
13786
14044
  return new _FactorydroidRule({
13787
14045
  baseDir,
13788
14046
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -13841,7 +14099,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
13841
14099
  };
13842
14100
 
13843
14101
  // src/features/rules/geminicli-rule.ts
13844
- import { join as join101 } from "path";
14102
+ import { join as join102 } from "path";
13845
14103
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
13846
14104
  static getSettablePaths({
13847
14105
  global,
@@ -13876,7 +14134,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
13876
14134
  if (isRoot) {
13877
14135
  const relativePath2 = paths.root.relativeFilePath;
13878
14136
  const fileContent2 = await readFileContent(
13879
- join101(baseDir, paths.root.relativeDirPath, relativePath2)
14137
+ join102(baseDir, paths.root.relativeDirPath, relativePath2)
13880
14138
  );
13881
14139
  return new _GeminiCliRule({
13882
14140
  baseDir,
@@ -13890,8 +14148,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
13890
14148
  if (!paths.nonRoot) {
13891
14149
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13892
14150
  }
13893
- const relativePath = join101(paths.nonRoot.relativeDirPath, relativeFilePath);
13894
- const fileContent = await readFileContent(join101(baseDir, relativePath));
14151
+ const relativePath = join102(paths.nonRoot.relativeDirPath, relativeFilePath);
14152
+ const fileContent = await readFileContent(join102(baseDir, relativePath));
13895
14153
  return new _GeminiCliRule({
13896
14154
  baseDir,
13897
14155
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -13950,7 +14208,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
13950
14208
  };
13951
14209
 
13952
14210
  // src/features/rules/goose-rule.ts
13953
- import { join as join102 } from "path";
14211
+ import { join as join103 } from "path";
13954
14212
  var GooseRule = class _GooseRule extends ToolRule {
13955
14213
  static getSettablePaths({
13956
14214
  global,
@@ -13985,7 +14243,7 @@ var GooseRule = class _GooseRule extends ToolRule {
13985
14243
  if (isRoot) {
13986
14244
  const relativePath2 = paths.root.relativeFilePath;
13987
14245
  const fileContent2 = await readFileContent(
13988
- join102(baseDir, paths.root.relativeDirPath, relativePath2)
14246
+ join103(baseDir, paths.root.relativeDirPath, relativePath2)
13989
14247
  );
13990
14248
  return new _GooseRule({
13991
14249
  baseDir,
@@ -13999,8 +14257,8 @@ var GooseRule = class _GooseRule extends ToolRule {
13999
14257
  if (!paths.nonRoot) {
14000
14258
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14001
14259
  }
14002
- const relativePath = join102(paths.nonRoot.relativeDirPath, relativeFilePath);
14003
- const fileContent = await readFileContent(join102(baseDir, relativePath));
14260
+ const relativePath = join103(paths.nonRoot.relativeDirPath, relativeFilePath);
14261
+ const fileContent = await readFileContent(join103(baseDir, relativePath));
14004
14262
  return new _GooseRule({
14005
14263
  baseDir,
14006
14264
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -14059,7 +14317,7 @@ var GooseRule = class _GooseRule extends ToolRule {
14059
14317
  };
14060
14318
 
14061
14319
  // src/features/rules/junie-rule.ts
14062
- import { join as join103 } from "path";
14320
+ import { join as join104 } from "path";
14063
14321
  var JunieRule = class _JunieRule extends ToolRule {
14064
14322
  static getSettablePaths(_options = {}) {
14065
14323
  return {
@@ -14078,8 +14336,8 @@ var JunieRule = class _JunieRule extends ToolRule {
14078
14336
  validate = true
14079
14337
  }) {
14080
14338
  const isRoot = relativeFilePath === "guidelines.md";
14081
- const relativePath = isRoot ? "guidelines.md" : join103(".junie", "memories", relativeFilePath);
14082
- const fileContent = await readFileContent(join103(baseDir, relativePath));
14339
+ const relativePath = isRoot ? "guidelines.md" : join104(".junie", "memories", relativeFilePath);
14340
+ const fileContent = await readFileContent(join104(baseDir, relativePath));
14083
14341
  return new _JunieRule({
14084
14342
  baseDir,
14085
14343
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -14134,7 +14392,7 @@ var JunieRule = class _JunieRule extends ToolRule {
14134
14392
  };
14135
14393
 
14136
14394
  // src/features/rules/kilo-rule.ts
14137
- import { join as join104 } from "path";
14395
+ import { join as join105 } from "path";
14138
14396
  var KiloRule = class _KiloRule extends ToolRule {
14139
14397
  static getSettablePaths(_options = {}) {
14140
14398
  return {
@@ -14149,7 +14407,7 @@ var KiloRule = class _KiloRule extends ToolRule {
14149
14407
  validate = true
14150
14408
  }) {
14151
14409
  const fileContent = await readFileContent(
14152
- join104(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14410
+ join105(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14153
14411
  );
14154
14412
  return new _KiloRule({
14155
14413
  baseDir,
@@ -14201,7 +14459,7 @@ var KiloRule = class _KiloRule extends ToolRule {
14201
14459
  };
14202
14460
 
14203
14461
  // src/features/rules/kiro-rule.ts
14204
- import { join as join105 } from "path";
14462
+ import { join as join106 } from "path";
14205
14463
  var KiroRule = class _KiroRule extends ToolRule {
14206
14464
  static getSettablePaths(_options = {}) {
14207
14465
  return {
@@ -14216,7 +14474,7 @@ var KiroRule = class _KiroRule extends ToolRule {
14216
14474
  validate = true
14217
14475
  }) {
14218
14476
  const fileContent = await readFileContent(
14219
- join105(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14477
+ join106(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14220
14478
  );
14221
14479
  return new _KiroRule({
14222
14480
  baseDir,
@@ -14270,7 +14528,7 @@ var KiroRule = class _KiroRule extends ToolRule {
14270
14528
  };
14271
14529
 
14272
14530
  // src/features/rules/opencode-rule.ts
14273
- import { join as join106 } from "path";
14531
+ import { join as join107 } from "path";
14274
14532
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
14275
14533
  static getSettablePaths({
14276
14534
  global,
@@ -14305,7 +14563,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
14305
14563
  if (isRoot) {
14306
14564
  const relativePath2 = paths.root.relativeFilePath;
14307
14565
  const fileContent2 = await readFileContent(
14308
- join106(baseDir, paths.root.relativeDirPath, relativePath2)
14566
+ join107(baseDir, paths.root.relativeDirPath, relativePath2)
14309
14567
  );
14310
14568
  return new _OpenCodeRule({
14311
14569
  baseDir,
@@ -14319,8 +14577,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
14319
14577
  if (!paths.nonRoot) {
14320
14578
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14321
14579
  }
14322
- const relativePath = join106(paths.nonRoot.relativeDirPath, relativeFilePath);
14323
- const fileContent = await readFileContent(join106(baseDir, relativePath));
14580
+ const relativePath = join107(paths.nonRoot.relativeDirPath, relativeFilePath);
14581
+ const fileContent = await readFileContent(join107(baseDir, relativePath));
14324
14582
  return new _OpenCodeRule({
14325
14583
  baseDir,
14326
14584
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -14379,7 +14637,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
14379
14637
  };
14380
14638
 
14381
14639
  // src/features/rules/qwencode-rule.ts
14382
- import { join as join107 } from "path";
14640
+ import { join as join108 } from "path";
14383
14641
  var QwencodeRule = class _QwencodeRule extends ToolRule {
14384
14642
  static getSettablePaths(_options = {}) {
14385
14643
  return {
@@ -14398,8 +14656,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
14398
14656
  validate = true
14399
14657
  }) {
14400
14658
  const isRoot = relativeFilePath === "QWEN.md";
14401
- const relativePath = isRoot ? "QWEN.md" : join107(".qwen", "memories", relativeFilePath);
14402
- const fileContent = await readFileContent(join107(baseDir, relativePath));
14659
+ const relativePath = isRoot ? "QWEN.md" : join108(".qwen", "memories", relativeFilePath);
14660
+ const fileContent = await readFileContent(join108(baseDir, relativePath));
14403
14661
  return new _QwencodeRule({
14404
14662
  baseDir,
14405
14663
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -14451,7 +14709,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
14451
14709
  };
14452
14710
 
14453
14711
  // src/features/rules/replit-rule.ts
14454
- import { join as join108 } from "path";
14712
+ import { join as join109 } from "path";
14455
14713
  var ReplitRule = class _ReplitRule extends ToolRule {
14456
14714
  static getSettablePaths(_options = {}) {
14457
14715
  return {
@@ -14473,7 +14731,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
14473
14731
  }
14474
14732
  const relativePath = paths.root.relativeFilePath;
14475
14733
  const fileContent = await readFileContent(
14476
- join108(baseDir, paths.root.relativeDirPath, relativePath)
14734
+ join109(baseDir, paths.root.relativeDirPath, relativePath)
14477
14735
  );
14478
14736
  return new _ReplitRule({
14479
14737
  baseDir,
@@ -14539,7 +14797,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
14539
14797
  };
14540
14798
 
14541
14799
  // src/features/rules/roo-rule.ts
14542
- import { join as join109 } from "path";
14800
+ import { join as join110 } from "path";
14543
14801
  var RooRule = class _RooRule extends ToolRule {
14544
14802
  static getSettablePaths(_options = {}) {
14545
14803
  return {
@@ -14554,7 +14812,7 @@ var RooRule = class _RooRule extends ToolRule {
14554
14812
  validate = true
14555
14813
  }) {
14556
14814
  const fileContent = await readFileContent(
14557
- join109(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14815
+ join110(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14558
14816
  );
14559
14817
  return new _RooRule({
14560
14818
  baseDir,
@@ -14623,7 +14881,7 @@ var RooRule = class _RooRule extends ToolRule {
14623
14881
  };
14624
14882
 
14625
14883
  // src/features/rules/warp-rule.ts
14626
- import { join as join110 } from "path";
14884
+ import { join as join111 } from "path";
14627
14885
  var WarpRule = class _WarpRule extends ToolRule {
14628
14886
  constructor({ fileContent, root, ...rest }) {
14629
14887
  super({
@@ -14649,8 +14907,8 @@ var WarpRule = class _WarpRule extends ToolRule {
14649
14907
  validate = true
14650
14908
  }) {
14651
14909
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
14652
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join110(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
14653
- const fileContent = await readFileContent(join110(baseDir, relativePath));
14910
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join111(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
14911
+ const fileContent = await readFileContent(join111(baseDir, relativePath));
14654
14912
  return new _WarpRule({
14655
14913
  baseDir,
14656
14914
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -14705,7 +14963,7 @@ var WarpRule = class _WarpRule extends ToolRule {
14705
14963
  };
14706
14964
 
14707
14965
  // src/features/rules/windsurf-rule.ts
14708
- import { join as join111 } from "path";
14966
+ import { join as join112 } from "path";
14709
14967
  var WindsurfRule = class _WindsurfRule extends ToolRule {
14710
14968
  static getSettablePaths(_options = {}) {
14711
14969
  return {
@@ -14720,7 +14978,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
14720
14978
  validate = true
14721
14979
  }) {
14722
14980
  const fileContent = await readFileContent(
14723
- join111(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14981
+ join112(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14724
14982
  );
14725
14983
  return new _WindsurfRule({
14726
14984
  baseDir,
@@ -14796,8 +15054,8 @@ var rulesProcessorToolTargets = [
14796
15054
  "warp",
14797
15055
  "windsurf"
14798
15056
  ];
14799
- var RulesProcessorToolTargetSchema = z53.enum(rulesProcessorToolTargets);
14800
- var formatRulePaths = (rules) => rules.map((r) => join112(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
15057
+ var RulesProcessorToolTargetSchema = z54.enum(rulesProcessorToolTargets);
15058
+ var formatRulePaths = (rules) => rules.map((r) => join113(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
14801
15059
  var toolRuleFactories = /* @__PURE__ */ new Map([
14802
15060
  [
14803
15061
  "agentsmd",
@@ -15172,7 +15430,7 @@ var RulesProcessor = class extends FeatureProcessor {
15172
15430
  }).relativeDirPath;
15173
15431
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
15174
15432
  const frontmatter = skill.getFrontmatter();
15175
- const relativePath = join112(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
15433
+ const relativePath = join113(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
15176
15434
  return {
15177
15435
  name: frontmatter.name,
15178
15436
  description: frontmatter.description,
@@ -15285,8 +15543,8 @@ var RulesProcessor = class extends FeatureProcessor {
15285
15543
  * Load and parse rulesync rule files from .rulesync/rules/ directory
15286
15544
  */
15287
15545
  async loadRulesyncFiles() {
15288
- const rulesyncBaseDir = join112(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
15289
- const files = await findFilesByGlobs(join112(rulesyncBaseDir, "**", "*.md"));
15546
+ const rulesyncBaseDir = join113(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
15547
+ const files = await findFilesByGlobs(join113(rulesyncBaseDir, "**", "*.md"));
15290
15548
  logger.debug(`Found ${files.length} rulesync files`);
15291
15549
  const rulesyncRules = await Promise.all(
15292
15550
  files.map((file) => {
@@ -15353,7 +15611,7 @@ var RulesProcessor = class extends FeatureProcessor {
15353
15611
  return [];
15354
15612
  }
15355
15613
  const rootFilePaths = await findFilesByGlobs(
15356
- join112(
15614
+ join113(
15357
15615
  this.baseDir,
15358
15616
  settablePaths.root.relativeDirPath ?? ".",
15359
15617
  settablePaths.root.relativeFilePath
@@ -15391,7 +15649,7 @@ var RulesProcessor = class extends FeatureProcessor {
15391
15649
  return [];
15392
15650
  }
15393
15651
  const localRootFilePaths = await findFilesByGlobs(
15394
- join112(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md")
15652
+ join113(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md")
15395
15653
  );
15396
15654
  return localRootFilePaths.map(
15397
15655
  (filePath) => factory.class.forDeletion({
@@ -15407,9 +15665,9 @@ var RulesProcessor = class extends FeatureProcessor {
15407
15665
  if (!settablePaths.nonRoot) {
15408
15666
  return [];
15409
15667
  }
15410
- const nonRootBaseDir = join112(this.baseDir, settablePaths.nonRoot.relativeDirPath);
15668
+ const nonRootBaseDir = join113(this.baseDir, settablePaths.nonRoot.relativeDirPath);
15411
15669
  const nonRootFilePaths = await findFilesByGlobs(
15412
- join112(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
15670
+ join113(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
15413
15671
  );
15414
15672
  if (forDeletion) {
15415
15673
  return nonRootFilePaths.map((filePath) => {
@@ -15541,14 +15799,14 @@ s/<command> [arguments]
15541
15799
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
15542
15800
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
15543
15801
 
15544
- When users call a custom slash command, you have to look for the markdown file, \`${join112(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
15802
+ When users call a custom slash command, you have to look for the markdown file, \`${join113(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
15545
15803
  const subagentsSection = subagents ? `## Simulated Subagents
15546
15804
 
15547
15805
  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.
15548
15806
 
15549
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${join112(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
15807
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${join113(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
15550
15808
 
15551
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join112(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
15809
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join113(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
15552
15810
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
15553
15811
  const result = [
15554
15812
  overview,
@@ -15620,7 +15878,7 @@ async function processEmptyFeatureGeneration(params) {
15620
15878
  return { count: totalCount, paths: [], hasDiff };
15621
15879
  }
15622
15880
  async function checkRulesyncDirExists(params) {
15623
- return fileExists(join113(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
15881
+ return fileExists(join114(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
15624
15882
  }
15625
15883
  async function generate(params) {
15626
15884
  const { config } = params;