rulesync 7.27.1 → 7.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -614,7 +614,7 @@ function getBaseDirsInLightOfGlobal({
614
614
  }
615
615
 
616
616
  // src/lib/generate.ts
617
- var import_node_path133 = require("path");
617
+ var import_node_path134 = require("path");
618
618
  var import_es_toolkit4 = require("es-toolkit");
619
619
 
620
620
  // src/features/commands/commands-processor.ts
@@ -3352,7 +3352,7 @@ var CommandsProcessor = class extends FeatureProcessor {
3352
3352
  };
3353
3353
 
3354
3354
  // src/features/hooks/hooks-processor.ts
3355
- var import_mini19 = require("zod/mini");
3355
+ var import_mini20 = require("zod/mini");
3356
3356
 
3357
3357
  // src/types/hooks.ts
3358
3358
  var import_mini16 = require("zod/mini");
@@ -3465,6 +3465,13 @@ var GEMINICLI_HOOK_EVENTS = [
3465
3465
  "preCompact",
3466
3466
  "notification"
3467
3467
  ];
3468
+ var CODEXCLI_HOOK_EVENTS = [
3469
+ "sessionStart",
3470
+ "preToolUse",
3471
+ "postToolUse",
3472
+ "beforeSubmitPrompt",
3473
+ "stop"
3474
+ ];
3468
3475
  var hooksRecordSchema = import_mini16.z.record(import_mini16.z.string(), import_mini16.z.array(HookDefinitionSchema));
3469
3476
  var HooksConfigSchema = import_mini16.z.looseObject({
3470
3477
  version: import_mini16.z.optional(import_mini16.z.number()),
@@ -3476,6 +3483,7 @@ var HooksConfigSchema = import_mini16.z.looseObject({
3476
3483
  kilo: import_mini16.z.optional(import_mini16.z.looseObject({ hooks: import_mini16.z.optional(hooksRecordSchema) })),
3477
3484
  factorydroid: import_mini16.z.optional(import_mini16.z.looseObject({ hooks: import_mini16.z.optional(hooksRecordSchema) })),
3478
3485
  geminicli: import_mini16.z.optional(import_mini16.z.looseObject({ hooks: import_mini16.z.optional(hooksRecordSchema) })),
3486
+ codexcli: import_mini16.z.optional(import_mini16.z.looseObject({ hooks: import_mini16.z.optional(hooksRecordSchema) })),
3479
3487
  deepagents: import_mini16.z.optional(import_mini16.z.looseObject({ hooks: import_mini16.z.optional(hooksRecordSchema) }))
3480
3488
  });
3481
3489
  var CANONICAL_TO_CLAUDE_EVENT_NAMES = {
@@ -3574,6 +3582,16 @@ var CANONICAL_TO_GEMINICLI_EVENT_NAMES = {
3574
3582
  var GEMINICLI_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
3575
3583
  Object.entries(CANONICAL_TO_GEMINICLI_EVENT_NAMES).map(([k, v]) => [v, k])
3576
3584
  );
3585
+ var CANONICAL_TO_CODEXCLI_EVENT_NAMES = {
3586
+ sessionStart: "SessionStart",
3587
+ preToolUse: "PreToolUse",
3588
+ postToolUse: "PostToolUse",
3589
+ beforeSubmitPrompt: "UserPromptSubmit",
3590
+ stop: "Stop"
3591
+ };
3592
+ var CODEXCLI_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
3593
+ Object.entries(CANONICAL_TO_CODEXCLI_EVENT_NAMES).map(([k, v]) => [v, k])
3594
+ );
3577
3595
  var CANONICAL_TO_DEEPAGENTS_EVENT_NAMES = {
3578
3596
  sessionStart: "session.start",
3579
3597
  sessionEnd: "session.end",
@@ -3904,14 +3922,199 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
3904
3922
  }
3905
3923
  };
3906
3924
 
3907
- // src/features/hooks/copilot-hooks.ts
3925
+ // src/features/hooks/codexcli-hooks.ts
3908
3926
  var import_node_path26 = require("path");
3927
+ var smolToml2 = __toESM(require("smol-toml"), 1);
3909
3928
  var import_mini17 = require("zod/mini");
3910
- var CopilotHookEntrySchema = import_mini17.z.looseObject({
3911
- type: import_mini17.z.string(),
3912
- bash: import_mini17.z.optional(import_mini17.z.string()),
3913
- powershell: import_mini17.z.optional(import_mini17.z.string()),
3914
- timeoutSec: import_mini17.z.optional(import_mini17.z.number())
3929
+ function canonicalToCodexcliHooks(config) {
3930
+ const codexSupported = new Set(CODEXCLI_HOOK_EVENTS);
3931
+ const sharedHooks = {};
3932
+ for (const [event, defs] of Object.entries(config.hooks)) {
3933
+ if (codexSupported.has(event)) {
3934
+ sharedHooks[event] = defs;
3935
+ }
3936
+ }
3937
+ const effectiveHooks = {
3938
+ ...sharedHooks,
3939
+ ...config.codexcli?.hooks
3940
+ };
3941
+ const codex = {};
3942
+ for (const [eventName, definitions] of Object.entries(effectiveHooks)) {
3943
+ const codexEventName = CANONICAL_TO_CODEXCLI_EVENT_NAMES[eventName] ?? eventName;
3944
+ const byMatcher = /* @__PURE__ */ new Map();
3945
+ for (const def of definitions) {
3946
+ const key = def.matcher ?? "";
3947
+ const list = byMatcher.get(key);
3948
+ if (list) list.push(def);
3949
+ else byMatcher.set(key, [def]);
3950
+ }
3951
+ const entries = [];
3952
+ for (const [matcherKey, defs] of byMatcher) {
3953
+ const commandDefs = defs.filter((def) => !def.type || def.type === "command");
3954
+ if (commandDefs.length === 0) continue;
3955
+ const hooks = commandDefs.map((def) => ({
3956
+ type: "command",
3957
+ ...def.command !== void 0 && def.command !== null && { command: def.command },
3958
+ ...def.timeout !== void 0 && def.timeout !== null && { timeout: def.timeout }
3959
+ }));
3960
+ entries.push(matcherKey ? { matcher: matcherKey, hooks } : { hooks });
3961
+ }
3962
+ if (entries.length > 0) {
3963
+ codex[codexEventName] = entries;
3964
+ }
3965
+ }
3966
+ return codex;
3967
+ }
3968
+ var CodexHookEntrySchema = import_mini17.z.looseObject({
3969
+ type: import_mini17.z.optional(import_mini17.z.string()),
3970
+ command: import_mini17.z.optional(import_mini17.z.string()),
3971
+ timeout: import_mini17.z.optional(import_mini17.z.number())
3972
+ });
3973
+ var CodexMatcherEntrySchema = import_mini17.z.looseObject({
3974
+ matcher: import_mini17.z.optional(import_mini17.z.string()),
3975
+ hooks: import_mini17.z.optional(import_mini17.z.array(CodexHookEntrySchema))
3976
+ });
3977
+ function codexcliHooksToCanonical(codexHooks) {
3978
+ if (codexHooks === null || codexHooks === void 0 || typeof codexHooks !== "object") {
3979
+ return {};
3980
+ }
3981
+ const canonical = {};
3982
+ for (const [codexEventName, matcherEntries] of Object.entries(codexHooks)) {
3983
+ const eventName = CODEXCLI_TO_CANONICAL_EVENT_NAMES[codexEventName] ?? codexEventName;
3984
+ if (!Array.isArray(matcherEntries)) continue;
3985
+ const defs = [];
3986
+ for (const rawEntry of matcherEntries) {
3987
+ const parseResult = CodexMatcherEntrySchema.safeParse(rawEntry);
3988
+ if (!parseResult.success) continue;
3989
+ const entry = parseResult.data;
3990
+ const hooks = entry.hooks ?? [];
3991
+ for (const h of hooks) {
3992
+ const hookType = h.type === "command" || h.type === "prompt" ? h.type : "command";
3993
+ defs.push({
3994
+ type: hookType,
3995
+ ...h.command !== void 0 && h.command !== null && { command: h.command },
3996
+ ...h.timeout !== void 0 && h.timeout !== null && { timeout: h.timeout },
3997
+ ...entry.matcher !== void 0 && entry.matcher !== null && entry.matcher !== "" && { matcher: entry.matcher }
3998
+ });
3999
+ }
4000
+ }
4001
+ if (defs.length > 0) {
4002
+ canonical[eventName] = defs;
4003
+ }
4004
+ }
4005
+ return canonical;
4006
+ }
4007
+ async function buildCodexConfigTomlContent({ baseDir }) {
4008
+ const configPath = (0, import_node_path26.join)(baseDir, ".codex", "config.toml");
4009
+ const existingContent = await readFileContentOrNull(configPath) ?? smolToml2.stringify({});
4010
+ const configToml = smolToml2.parse(existingContent);
4011
+ if (typeof configToml.features !== "object" || configToml.features === null) {
4012
+ configToml.features = {};
4013
+ }
4014
+ configToml.features.codex_hooks = true;
4015
+ return smolToml2.stringify(configToml);
4016
+ }
4017
+ var CodexcliConfigToml = class _CodexcliConfigToml extends ToolFile {
4018
+ validate() {
4019
+ return { success: true, error: null };
4020
+ }
4021
+ static async fromBaseDir({ baseDir }) {
4022
+ const fileContent = await buildCodexConfigTomlContent({ baseDir });
4023
+ return new _CodexcliConfigToml({
4024
+ baseDir,
4025
+ relativeDirPath: ".codex",
4026
+ relativeFilePath: "config.toml",
4027
+ fileContent
4028
+ });
4029
+ }
4030
+ };
4031
+ var CodexcliHooks = class _CodexcliHooks extends ToolHooks {
4032
+ constructor(params) {
4033
+ super({
4034
+ ...params,
4035
+ fileContent: params.fileContent ?? "{}"
4036
+ });
4037
+ }
4038
+ static getSettablePaths(_options = {}) {
4039
+ return { relativeDirPath: ".codex", relativeFilePath: "hooks.json" };
4040
+ }
4041
+ static async fromFile({
4042
+ baseDir = process.cwd(),
4043
+ validate = true,
4044
+ global = false
4045
+ }) {
4046
+ const paths = _CodexcliHooks.getSettablePaths({ global });
4047
+ const filePath = (0, import_node_path26.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4048
+ const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4049
+ return new _CodexcliHooks({
4050
+ baseDir,
4051
+ relativeDirPath: paths.relativeDirPath,
4052
+ relativeFilePath: paths.relativeFilePath,
4053
+ fileContent,
4054
+ validate
4055
+ });
4056
+ }
4057
+ static async fromRulesyncHooks({
4058
+ baseDir = process.cwd(),
4059
+ rulesyncHooks,
4060
+ validate = true,
4061
+ global = false
4062
+ }) {
4063
+ const paths = _CodexcliHooks.getSettablePaths({ global });
4064
+ const config = rulesyncHooks.getJson();
4065
+ const codexHooks = canonicalToCodexcliHooks(config);
4066
+ const fileContent = JSON.stringify({ hooks: codexHooks }, null, 2);
4067
+ return new _CodexcliHooks({
4068
+ baseDir,
4069
+ relativeDirPath: paths.relativeDirPath,
4070
+ relativeFilePath: paths.relativeFilePath,
4071
+ fileContent,
4072
+ validate
4073
+ });
4074
+ }
4075
+ toRulesyncHooks() {
4076
+ let parsed;
4077
+ try {
4078
+ parsed = JSON.parse(this.getFileContent());
4079
+ } catch (error) {
4080
+ throw new Error(
4081
+ `Failed to parse Codex CLI hooks content in ${(0, import_node_path26.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4082
+ {
4083
+ cause: error
4084
+ }
4085
+ );
4086
+ }
4087
+ const hooks = codexcliHooksToCanonical(parsed.hooks);
4088
+ return this.toRulesyncHooksDefault({
4089
+ fileContent: JSON.stringify({ version: 1, hooks }, null, 2)
4090
+ });
4091
+ }
4092
+ validate() {
4093
+ return { success: true, error: null };
4094
+ }
4095
+ static forDeletion({
4096
+ baseDir = process.cwd(),
4097
+ relativeDirPath,
4098
+ relativeFilePath
4099
+ }) {
4100
+ return new _CodexcliHooks({
4101
+ baseDir,
4102
+ relativeDirPath,
4103
+ relativeFilePath,
4104
+ fileContent: JSON.stringify({ hooks: {} }, null, 2),
4105
+ validate: false
4106
+ });
4107
+ }
4108
+ };
4109
+
4110
+ // src/features/hooks/copilot-hooks.ts
4111
+ var import_node_path27 = require("path");
4112
+ var import_mini18 = require("zod/mini");
4113
+ var CopilotHookEntrySchema = import_mini18.z.looseObject({
4114
+ type: import_mini18.z.string(),
4115
+ bash: import_mini18.z.optional(import_mini18.z.string()),
4116
+ powershell: import_mini18.z.optional(import_mini18.z.string()),
4117
+ timeoutSec: import_mini18.z.optional(import_mini18.z.number())
3915
4118
  });
3916
4119
  function canonicalToCopilotHooks(config) {
3917
4120
  const canonicalSchemaKeys = Object.keys(HookDefinitionSchema.shape);
@@ -4008,7 +4211,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
4008
4211
  }
4009
4212
  static getSettablePaths(_options = {}) {
4010
4213
  return {
4011
- relativeDirPath: (0, import_node_path26.join)(".github", "hooks"),
4214
+ relativeDirPath: (0, import_node_path27.join)(".github", "hooks"),
4012
4215
  relativeFilePath: "copilot-hooks.json"
4013
4216
  };
4014
4217
  }
@@ -4018,7 +4221,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
4018
4221
  global = false
4019
4222
  }) {
4020
4223
  const paths = _CopilotHooks.getSettablePaths({ global });
4021
- const filePath = (0, import_node_path26.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4224
+ const filePath = (0, import_node_path27.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4022
4225
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4023
4226
  return new _CopilotHooks({
4024
4227
  baseDir,
@@ -4051,7 +4254,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
4051
4254
  parsed = JSON.parse(this.getFileContent());
4052
4255
  } catch (error) {
4053
4256
  throw new Error(
4054
- `Failed to parse Copilot hooks content in ${(0, import_node_path26.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4257
+ `Failed to parse Copilot hooks content in ${(0, import_node_path27.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4055
4258
  {
4056
4259
  cause: error
4057
4260
  }
@@ -4081,7 +4284,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
4081
4284
  };
4082
4285
 
4083
4286
  // src/features/hooks/cursor-hooks.ts
4084
- var import_node_path27 = require("path");
4287
+ var import_node_path28 = require("path");
4085
4288
  var CursorHooks = class _CursorHooks extends ToolHooks {
4086
4289
  constructor(params) {
4087
4290
  const { rulesyncHooks: _r, ...rest } = params;
@@ -4102,7 +4305,7 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
4102
4305
  }) {
4103
4306
  const paths = _CursorHooks.getSettablePaths();
4104
4307
  const fileContent = await readFileContent(
4105
- (0, import_node_path27.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4308
+ (0, import_node_path28.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4106
4309
  );
4107
4310
  return new _CursorHooks({
4108
4311
  baseDir,
@@ -4189,7 +4392,7 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
4189
4392
  };
4190
4393
 
4191
4394
  // src/features/hooks/deepagents-hooks.ts
4192
- var import_node_path28 = require("path");
4395
+ var import_node_path29 = require("path");
4193
4396
  function isDeepagentsHooksFile(val) {
4194
4397
  if (typeof val !== "object" || val === null || !("hooks" in val)) return false;
4195
4398
  return Array.isArray(val.hooks);
@@ -4264,7 +4467,7 @@ var DeepagentsHooks = class _DeepagentsHooks extends ToolHooks {
4264
4467
  global = false
4265
4468
  }) {
4266
4469
  const paths = _DeepagentsHooks.getSettablePaths({ global });
4267
- const filePath = (0, import_node_path28.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4470
+ const filePath = (0, import_node_path29.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4268
4471
  const fileContent = await readFileContentOrNull(filePath) ?? JSON.stringify({ hooks: [] }, null, 2);
4269
4472
  return new _DeepagentsHooks({
4270
4473
  baseDir,
@@ -4298,7 +4501,7 @@ var DeepagentsHooks = class _DeepagentsHooks extends ToolHooks {
4298
4501
  parsed = JSON.parse(this.getFileContent());
4299
4502
  } catch (error) {
4300
4503
  throw new Error(
4301
- `Failed to parse deepagents hooks content in ${(0, import_node_path28.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4504
+ `Failed to parse deepagents hooks content in ${(0, import_node_path29.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4302
4505
  { cause: error }
4303
4506
  );
4304
4507
  }
@@ -4327,7 +4530,7 @@ var DeepagentsHooks = class _DeepagentsHooks extends ToolHooks {
4327
4530
  };
4328
4531
 
4329
4532
  // src/features/hooks/factorydroid-hooks.ts
4330
- var import_node_path29 = require("path");
4533
+ var import_node_path30 = require("path");
4331
4534
  var FACTORYDROID_CONVERTER_CONFIG = {
4332
4535
  supportedEvents: FACTORYDROID_HOOK_EVENTS,
4333
4536
  canonicalToToolEventNames: CANONICAL_TO_FACTORYDROID_EVENT_NAMES,
@@ -4353,7 +4556,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4353
4556
  global = false
4354
4557
  }) {
4355
4558
  const paths = _FactorydroidHooks.getSettablePaths({ global });
4356
- const filePath = (0, import_node_path29.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4559
+ const filePath = (0, import_node_path30.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4357
4560
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4358
4561
  return new _FactorydroidHooks({
4359
4562
  baseDir,
@@ -4371,7 +4574,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4371
4574
  logger
4372
4575
  }) {
4373
4576
  const paths = _FactorydroidHooks.getSettablePaths({ global });
4374
- const filePath = (0, import_node_path29.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4577
+ const filePath = (0, import_node_path30.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4375
4578
  const existingContent = await readOrInitializeFileContent(
4376
4579
  filePath,
4377
4580
  JSON.stringify({}, null, 2)
@@ -4408,7 +4611,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4408
4611
  settings = JSON.parse(this.getFileContent());
4409
4612
  } catch (error) {
4410
4613
  throw new Error(
4411
- `Failed to parse Factory Droid hooks content in ${(0, import_node_path29.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4614
+ `Failed to parse Factory Droid hooks content in ${(0, import_node_path30.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4412
4615
  {
4413
4616
  cause: error
4414
4617
  }
@@ -4441,8 +4644,8 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4441
4644
  };
4442
4645
 
4443
4646
  // src/features/hooks/geminicli-hooks.ts
4444
- var import_node_path30 = require("path");
4445
- var import_mini18 = require("zod/mini");
4647
+ var import_node_path31 = require("path");
4648
+ var import_mini19 = require("zod/mini");
4446
4649
  function canonicalToGeminicliHooks(config) {
4447
4650
  const geminiSupported = new Set(GEMINICLI_HOOK_EVENTS);
4448
4651
  const sharedHooks = {};
@@ -4486,16 +4689,16 @@ function canonicalToGeminicliHooks(config) {
4486
4689
  }
4487
4690
  return gemini;
4488
4691
  }
4489
- var GeminiHookEntrySchema = import_mini18.z.looseObject({
4490
- type: import_mini18.z.optional(import_mini18.z.string()),
4491
- command: import_mini18.z.optional(import_mini18.z.string()),
4492
- timeout: import_mini18.z.optional(import_mini18.z.number()),
4493
- name: import_mini18.z.optional(import_mini18.z.string()),
4494
- description: import_mini18.z.optional(import_mini18.z.string())
4692
+ var GeminiHookEntrySchema = import_mini19.z.looseObject({
4693
+ type: import_mini19.z.optional(import_mini19.z.string()),
4694
+ command: import_mini19.z.optional(import_mini19.z.string()),
4695
+ timeout: import_mini19.z.optional(import_mini19.z.number()),
4696
+ name: import_mini19.z.optional(import_mini19.z.string()),
4697
+ description: import_mini19.z.optional(import_mini19.z.string())
4495
4698
  });
4496
- var GeminiMatcherEntrySchema = import_mini18.z.looseObject({
4497
- matcher: import_mini18.z.optional(import_mini18.z.string()),
4498
- hooks: import_mini18.z.optional(import_mini18.z.array(GeminiHookEntrySchema))
4699
+ var GeminiMatcherEntrySchema = import_mini19.z.looseObject({
4700
+ matcher: import_mini19.z.optional(import_mini19.z.string()),
4701
+ hooks: import_mini19.z.optional(import_mini19.z.array(GeminiHookEntrySchema))
4499
4702
  });
4500
4703
  function geminiHooksToCanonical(geminiHooks) {
4501
4704
  if (geminiHooks === null || geminiHooks === void 0 || typeof geminiHooks !== "object") {
@@ -4550,7 +4753,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4550
4753
  global = false
4551
4754
  }) {
4552
4755
  const paths = _GeminicliHooks.getSettablePaths({ global });
4553
- const filePath = (0, import_node_path30.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4756
+ const filePath = (0, import_node_path31.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4554
4757
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4555
4758
  return new _GeminicliHooks({
4556
4759
  baseDir,
@@ -4567,7 +4770,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4567
4770
  global = false
4568
4771
  }) {
4569
4772
  const paths = _GeminicliHooks.getSettablePaths({ global });
4570
- const filePath = (0, import_node_path30.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4773
+ const filePath = (0, import_node_path31.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4571
4774
  const existingContent = await readOrInitializeFileContent(
4572
4775
  filePath,
4573
4776
  JSON.stringify({}, null, 2)
@@ -4599,7 +4802,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4599
4802
  settings = JSON.parse(this.getFileContent());
4600
4803
  } catch (error) {
4601
4804
  throw new Error(
4602
- `Failed to parse Gemini CLI hooks content in ${(0, import_node_path30.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4805
+ `Failed to parse Gemini CLI hooks content in ${(0, import_node_path31.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4603
4806
  {
4604
4807
  cause: error
4605
4808
  }
@@ -4629,7 +4832,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4629
4832
  };
4630
4833
 
4631
4834
  // src/features/hooks/kilo-hooks.ts
4632
- var import_node_path31 = require("path");
4835
+ var import_node_path32 = require("path");
4633
4836
 
4634
4837
  // src/features/hooks/opencode-style-generator.ts
4635
4838
  var NAMED_HOOKS = /* @__PURE__ */ new Set(["tool.execute.before", "tool.execute.after"]);
@@ -4728,7 +4931,7 @@ var KiloHooks = class _KiloHooks extends ToolHooks {
4728
4931
  }
4729
4932
  static getSettablePaths(options) {
4730
4933
  return {
4731
- relativeDirPath: options?.global ? (0, import_node_path31.join)(".config", "kilo", "plugins") : (0, import_node_path31.join)(".kilo", "plugins"),
4934
+ relativeDirPath: options?.global ? (0, import_node_path32.join)(".config", "kilo", "plugins") : (0, import_node_path32.join)(".kilo", "plugins"),
4732
4935
  relativeFilePath: "rulesync-hooks.js"
4733
4936
  };
4734
4937
  }
@@ -4739,7 +4942,7 @@ var KiloHooks = class _KiloHooks extends ToolHooks {
4739
4942
  }) {
4740
4943
  const paths = _KiloHooks.getSettablePaths({ global });
4741
4944
  const fileContent = await readFileContent(
4742
- (0, import_node_path31.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4945
+ (0, import_node_path32.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4743
4946
  );
4744
4947
  return new _KiloHooks({
4745
4948
  baseDir,
@@ -4793,7 +4996,7 @@ var KiloHooks = class _KiloHooks extends ToolHooks {
4793
4996
  };
4794
4997
 
4795
4998
  // src/features/hooks/opencode-hooks.ts
4796
- var import_node_path32 = require("path");
4999
+ var import_node_path33 = require("path");
4797
5000
  var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4798
5001
  constructor(params) {
4799
5002
  super({
@@ -4803,7 +5006,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4803
5006
  }
4804
5007
  static getSettablePaths(options) {
4805
5008
  return {
4806
- relativeDirPath: options?.global ? (0, import_node_path32.join)(".config", "opencode", "plugins") : (0, import_node_path32.join)(".opencode", "plugins"),
5009
+ relativeDirPath: options?.global ? (0, import_node_path33.join)(".config", "opencode", "plugins") : (0, import_node_path33.join)(".opencode", "plugins"),
4807
5010
  relativeFilePath: "rulesync-hooks.js"
4808
5011
  };
4809
5012
  }
@@ -4814,7 +5017,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4814
5017
  }) {
4815
5018
  const paths = _OpencodeHooks.getSettablePaths({ global });
4816
5019
  const fileContent = await readFileContent(
4817
- (0, import_node_path32.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
5020
+ (0, import_node_path33.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4818
5021
  );
4819
5022
  return new _OpencodeHooks({
4820
5023
  baseDir,
@@ -4872,13 +5075,14 @@ var hooksProcessorToolTargetTuple = [
4872
5075
  "kilo",
4873
5076
  "cursor",
4874
5077
  "claudecode",
5078
+ "codexcli",
4875
5079
  "copilot",
4876
5080
  "opencode",
4877
5081
  "factorydroid",
4878
5082
  "geminicli",
4879
5083
  "deepagents"
4880
5084
  ];
4881
- var HooksProcessorToolTargetSchema = import_mini19.z.enum(hooksProcessorToolTargetTuple);
5085
+ var HooksProcessorToolTargetSchema = import_mini20.z.enum(hooksProcessorToolTargetTuple);
4882
5086
  var toolHooksFactories = /* @__PURE__ */ new Map([
4883
5087
  [
4884
5088
  "cursor",
@@ -4908,6 +5112,20 @@ var toolHooksFactories = /* @__PURE__ */ new Map([
4908
5112
  supportsMatcher: true
4909
5113
  }
4910
5114
  ],
5115
+ [
5116
+ "codexcli",
5117
+ {
5118
+ class: CodexcliHooks,
5119
+ meta: {
5120
+ supportsProject: true,
5121
+ supportsGlobal: true,
5122
+ supportsImport: true
5123
+ },
5124
+ supportedEvents: CODEXCLI_HOOK_EVENTS,
5125
+ supportedHookTypes: ["command"],
5126
+ supportsMatcher: true
5127
+ }
5128
+ ],
4911
5129
  [
4912
5130
  "copilot",
4913
5131
  {
@@ -5024,7 +5242,9 @@ var HooksProcessor = class extends FeatureProcessor {
5024
5242
  return [];
5025
5243
  }
5026
5244
  }
5027
- async loadToolFiles({ forDeletion = false } = {}) {
5245
+ async loadToolFiles({
5246
+ forDeletion = false
5247
+ } = {}) {
5028
5248
  try {
5029
5249
  const factory = toolHooksFactories.get(this.toolTarget);
5030
5250
  if (!factory) throw new Error(`Unsupported tool target: ${this.toolTarget}`);
@@ -5120,7 +5340,11 @@ var HooksProcessor = class extends FeatureProcessor {
5120
5340
  validate: true,
5121
5341
  global: this.global
5122
5342
  });
5123
- return [toolHooks];
5343
+ const result = [toolHooks];
5344
+ if (this.toolTarget === "codexcli") {
5345
+ result.push(await CodexcliConfigToml.fromBaseDir({ baseDir: this.baseDir }));
5346
+ }
5347
+ return result;
5124
5348
  }
5125
5349
  async convertToolFilesToRulesyncFiles(toolFiles) {
5126
5350
  const hooks = toolFiles.filter((f) => f instanceof ToolHooks);
@@ -5138,13 +5362,13 @@ var HooksProcessor = class extends FeatureProcessor {
5138
5362
  };
5139
5363
 
5140
5364
  // src/features/ignore/ignore-processor.ts
5141
- var import_mini20 = require("zod/mini");
5365
+ var import_mini21 = require("zod/mini");
5142
5366
 
5143
5367
  // src/features/ignore/augmentcode-ignore.ts
5144
- var import_node_path34 = require("path");
5368
+ var import_node_path35 = require("path");
5145
5369
 
5146
5370
  // src/features/ignore/rulesync-ignore.ts
5147
- var import_node_path33 = require("path");
5371
+ var import_node_path34 = require("path");
5148
5372
  var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
5149
5373
  validate() {
5150
5374
  return { success: true, error: null };
@@ -5164,12 +5388,12 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
5164
5388
  static async fromFile() {
5165
5389
  const baseDir = process.cwd();
5166
5390
  const paths = this.getSettablePaths();
5167
- const recommendedPath = (0, import_node_path33.join)(
5391
+ const recommendedPath = (0, import_node_path34.join)(
5168
5392
  baseDir,
5169
5393
  paths.recommended.relativeDirPath,
5170
5394
  paths.recommended.relativeFilePath
5171
5395
  );
5172
- const legacyPath = (0, import_node_path33.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5396
+ const legacyPath = (0, import_node_path34.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5173
5397
  if (await fileExists(recommendedPath)) {
5174
5398
  const fileContent2 = await readFileContent(recommendedPath);
5175
5399
  return new _RulesyncIgnore({
@@ -5285,7 +5509,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
5285
5509
  validate = true
5286
5510
  }) {
5287
5511
  const fileContent = await readFileContent(
5288
- (0, import_node_path34.join)(
5512
+ (0, import_node_path35.join)(
5289
5513
  baseDir,
5290
5514
  this.getSettablePaths().relativeDirPath,
5291
5515
  this.getSettablePaths().relativeFilePath
@@ -5315,7 +5539,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
5315
5539
  };
5316
5540
 
5317
5541
  // src/features/ignore/claudecode-ignore.ts
5318
- var import_node_path35 = require("path");
5542
+ var import_node_path36 = require("path");
5319
5543
  var import_es_toolkit2 = require("es-toolkit");
5320
5544
  var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
5321
5545
  constructor(params) {
@@ -5358,7 +5582,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
5358
5582
  const fileContent = rulesyncIgnore.getFileContent();
5359
5583
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
5360
5584
  const deniedValues = patterns.map((pattern) => `Read(${pattern})`);
5361
- const filePath = (0, import_node_path35.join)(
5585
+ const filePath = (0, import_node_path36.join)(
5362
5586
  baseDir,
5363
5587
  this.getSettablePaths().relativeDirPath,
5364
5588
  this.getSettablePaths().relativeFilePath
@@ -5394,7 +5618,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
5394
5618
  validate = true
5395
5619
  }) {
5396
5620
  const fileContent = await readFileContent(
5397
- (0, import_node_path35.join)(
5621
+ (0, import_node_path36.join)(
5398
5622
  baseDir,
5399
5623
  this.getSettablePaths().relativeDirPath,
5400
5624
  this.getSettablePaths().relativeFilePath
@@ -5424,7 +5648,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
5424
5648
  };
5425
5649
 
5426
5650
  // src/features/ignore/cline-ignore.ts
5427
- var import_node_path36 = require("path");
5651
+ var import_node_path37 = require("path");
5428
5652
  var ClineIgnore = class _ClineIgnore extends ToolIgnore {
5429
5653
  static getSettablePaths() {
5430
5654
  return {
@@ -5461,7 +5685,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
5461
5685
  validate = true
5462
5686
  }) {
5463
5687
  const fileContent = await readFileContent(
5464
- (0, import_node_path36.join)(
5688
+ (0, import_node_path37.join)(
5465
5689
  baseDir,
5466
5690
  this.getSettablePaths().relativeDirPath,
5467
5691
  this.getSettablePaths().relativeFilePath
@@ -5491,7 +5715,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
5491
5715
  };
5492
5716
 
5493
5717
  // src/features/ignore/cursor-ignore.ts
5494
- var import_node_path37 = require("path");
5718
+ var import_node_path38 = require("path");
5495
5719
  var CursorIgnore = class _CursorIgnore extends ToolIgnore {
5496
5720
  static getSettablePaths() {
5497
5721
  return {
@@ -5524,7 +5748,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
5524
5748
  validate = true
5525
5749
  }) {
5526
5750
  const fileContent = await readFileContent(
5527
- (0, import_node_path37.join)(
5751
+ (0, import_node_path38.join)(
5528
5752
  baseDir,
5529
5753
  this.getSettablePaths().relativeDirPath,
5530
5754
  this.getSettablePaths().relativeFilePath
@@ -5554,7 +5778,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
5554
5778
  };
5555
5779
 
5556
5780
  // src/features/ignore/geminicli-ignore.ts
5557
- var import_node_path38 = require("path");
5781
+ var import_node_path39 = require("path");
5558
5782
  var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
5559
5783
  static getSettablePaths() {
5560
5784
  return {
@@ -5581,7 +5805,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
5581
5805
  validate = true
5582
5806
  }) {
5583
5807
  const fileContent = await readFileContent(
5584
- (0, import_node_path38.join)(
5808
+ (0, import_node_path39.join)(
5585
5809
  baseDir,
5586
5810
  this.getSettablePaths().relativeDirPath,
5587
5811
  this.getSettablePaths().relativeFilePath
@@ -5611,7 +5835,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
5611
5835
  };
5612
5836
 
5613
5837
  // src/features/ignore/goose-ignore.ts
5614
- var import_node_path39 = require("path");
5838
+ var import_node_path40 = require("path");
5615
5839
  var GooseIgnore = class _GooseIgnore extends ToolIgnore {
5616
5840
  static getSettablePaths() {
5617
5841
  return {
@@ -5648,7 +5872,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
5648
5872
  validate = true
5649
5873
  }) {
5650
5874
  const fileContent = await readFileContent(
5651
- (0, import_node_path39.join)(
5875
+ (0, import_node_path40.join)(
5652
5876
  baseDir,
5653
5877
  this.getSettablePaths().relativeDirPath,
5654
5878
  this.getSettablePaths().relativeFilePath
@@ -5678,7 +5902,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
5678
5902
  };
5679
5903
 
5680
5904
  // src/features/ignore/junie-ignore.ts
5681
- var import_node_path40 = require("path");
5905
+ var import_node_path41 = require("path");
5682
5906
  var JunieIgnore = class _JunieIgnore extends ToolIgnore {
5683
5907
  static getSettablePaths() {
5684
5908
  return {
@@ -5705,7 +5929,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
5705
5929
  validate = true
5706
5930
  }) {
5707
5931
  const fileContent = await readFileContent(
5708
- (0, import_node_path40.join)(
5932
+ (0, import_node_path41.join)(
5709
5933
  baseDir,
5710
5934
  this.getSettablePaths().relativeDirPath,
5711
5935
  this.getSettablePaths().relativeFilePath
@@ -5735,7 +5959,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
5735
5959
  };
5736
5960
 
5737
5961
  // src/features/ignore/kilo-ignore.ts
5738
- var import_node_path41 = require("path");
5962
+ var import_node_path42 = require("path");
5739
5963
  var KiloIgnore = class _KiloIgnore extends ToolIgnore {
5740
5964
  static getSettablePaths() {
5741
5965
  return {
@@ -5772,7 +5996,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
5772
5996
  validate = true
5773
5997
  }) {
5774
5998
  const fileContent = await readFileContent(
5775
- (0, import_node_path41.join)(
5999
+ (0, import_node_path42.join)(
5776
6000
  baseDir,
5777
6001
  this.getSettablePaths().relativeDirPath,
5778
6002
  this.getSettablePaths().relativeFilePath
@@ -5802,7 +6026,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
5802
6026
  };
5803
6027
 
5804
6028
  // src/features/ignore/kiro-ignore.ts
5805
- var import_node_path42 = require("path");
6029
+ var import_node_path43 = require("path");
5806
6030
  var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5807
6031
  static getSettablePaths() {
5808
6032
  return {
@@ -5829,7 +6053,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5829
6053
  validate = true
5830
6054
  }) {
5831
6055
  const fileContent = await readFileContent(
5832
- (0, import_node_path42.join)(
6056
+ (0, import_node_path43.join)(
5833
6057
  baseDir,
5834
6058
  this.getSettablePaths().relativeDirPath,
5835
6059
  this.getSettablePaths().relativeFilePath
@@ -5859,7 +6083,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5859
6083
  };
5860
6084
 
5861
6085
  // src/features/ignore/qwencode-ignore.ts
5862
- var import_node_path43 = require("path");
6086
+ var import_node_path44 = require("path");
5863
6087
  var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5864
6088
  static getSettablePaths() {
5865
6089
  return {
@@ -5886,7 +6110,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5886
6110
  validate = true
5887
6111
  }) {
5888
6112
  const fileContent = await readFileContent(
5889
- (0, import_node_path43.join)(
6113
+ (0, import_node_path44.join)(
5890
6114
  baseDir,
5891
6115
  this.getSettablePaths().relativeDirPath,
5892
6116
  this.getSettablePaths().relativeFilePath
@@ -5916,7 +6140,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5916
6140
  };
5917
6141
 
5918
6142
  // src/features/ignore/roo-ignore.ts
5919
- var import_node_path44 = require("path");
6143
+ var import_node_path45 = require("path");
5920
6144
  var RooIgnore = class _RooIgnore extends ToolIgnore {
5921
6145
  static getSettablePaths() {
5922
6146
  return {
@@ -5943,7 +6167,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
5943
6167
  validate = true
5944
6168
  }) {
5945
6169
  const fileContent = await readFileContent(
5946
- (0, import_node_path44.join)(
6170
+ (0, import_node_path45.join)(
5947
6171
  baseDir,
5948
6172
  this.getSettablePaths().relativeDirPath,
5949
6173
  this.getSettablePaths().relativeFilePath
@@ -5973,7 +6197,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
5973
6197
  };
5974
6198
 
5975
6199
  // src/features/ignore/windsurf-ignore.ts
5976
- var import_node_path45 = require("path");
6200
+ var import_node_path46 = require("path");
5977
6201
  var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5978
6202
  static getSettablePaths() {
5979
6203
  return {
@@ -6000,7 +6224,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
6000
6224
  validate = true
6001
6225
  }) {
6002
6226
  const fileContent = await readFileContent(
6003
- (0, import_node_path45.join)(
6227
+ (0, import_node_path46.join)(
6004
6228
  baseDir,
6005
6229
  this.getSettablePaths().relativeDirPath,
6006
6230
  this.getSettablePaths().relativeFilePath
@@ -6030,7 +6254,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
6030
6254
  };
6031
6255
 
6032
6256
  // src/features/ignore/zed-ignore.ts
6033
- var import_node_path46 = require("path");
6257
+ var import_node_path47 = require("path");
6034
6258
  var import_es_toolkit3 = require("es-toolkit");
6035
6259
  var ZedIgnore = class _ZedIgnore extends ToolIgnore {
6036
6260
  constructor(params) {
@@ -6067,7 +6291,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
6067
6291
  }) {
6068
6292
  const fileContent = rulesyncIgnore.getFileContent();
6069
6293
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
6070
- const filePath = (0, import_node_path46.join)(
6294
+ const filePath = (0, import_node_path47.join)(
6071
6295
  baseDir,
6072
6296
  this.getSettablePaths().relativeDirPath,
6073
6297
  this.getSettablePaths().relativeFilePath
@@ -6094,7 +6318,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
6094
6318
  validate = true
6095
6319
  }) {
6096
6320
  const fileContent = await readFileContent(
6097
- (0, import_node_path46.join)(
6321
+ (0, import_node_path47.join)(
6098
6322
  baseDir,
6099
6323
  this.getSettablePaths().relativeDirPath,
6100
6324
  this.getSettablePaths().relativeFilePath
@@ -6140,7 +6364,7 @@ var ignoreProcessorToolTargets = [
6140
6364
  "windsurf",
6141
6365
  "zed"
6142
6366
  ];
6143
- var IgnoreProcessorToolTargetSchema = import_mini20.z.enum(ignoreProcessorToolTargets);
6367
+ var IgnoreProcessorToolTargetSchema = import_mini21.z.enum(ignoreProcessorToolTargets);
6144
6368
  var toolIgnoreFactories = /* @__PURE__ */ new Map([
6145
6369
  ["augmentcode", { class: AugmentcodeIgnore }],
6146
6370
  ["claudecode", { class: ClaudecodeIgnore }],
@@ -6279,55 +6503,55 @@ var IgnoreProcessor = class extends FeatureProcessor {
6279
6503
  };
6280
6504
 
6281
6505
  // src/features/mcp/mcp-processor.ts
6282
- var import_mini25 = require("zod/mini");
6506
+ var import_mini26 = require("zod/mini");
6283
6507
 
6284
6508
  // src/features/mcp/claudecode-mcp.ts
6285
- var import_node_path48 = require("path");
6509
+ var import_node_path49 = require("path");
6286
6510
 
6287
6511
  // src/features/mcp/rulesync-mcp.ts
6288
- var import_node_path47 = require("path");
6512
+ var import_node_path48 = require("path");
6289
6513
  var import_object = require("es-toolkit/object");
6290
- var import_mini22 = require("zod/mini");
6514
+ var import_mini23 = require("zod/mini");
6291
6515
 
6292
6516
  // src/types/mcp.ts
6293
- var import_mini21 = require("zod/mini");
6294
- var McpServerSchema = import_mini21.z.looseObject({
6295
- type: import_mini21.z.optional(import_mini21.z.enum(["local", "stdio", "sse", "http"])),
6296
- command: import_mini21.z.optional(import_mini21.z.union([import_mini21.z.string(), import_mini21.z.array(import_mini21.z.string())])),
6297
- args: import_mini21.z.optional(import_mini21.z.array(import_mini21.z.string())),
6298
- url: import_mini21.z.optional(import_mini21.z.string()),
6299
- httpUrl: import_mini21.z.optional(import_mini21.z.string()),
6300
- env: import_mini21.z.optional(import_mini21.z.record(import_mini21.z.string(), import_mini21.z.string())),
6301
- disabled: import_mini21.z.optional(import_mini21.z.boolean()),
6302
- networkTimeout: import_mini21.z.optional(import_mini21.z.number()),
6303
- timeout: import_mini21.z.optional(import_mini21.z.number()),
6304
- trust: import_mini21.z.optional(import_mini21.z.boolean()),
6305
- cwd: import_mini21.z.optional(import_mini21.z.string()),
6306
- transport: import_mini21.z.optional(import_mini21.z.enum(["local", "stdio", "sse", "http"])),
6307
- alwaysAllow: import_mini21.z.optional(import_mini21.z.array(import_mini21.z.string())),
6308
- tools: import_mini21.z.optional(import_mini21.z.array(import_mini21.z.string())),
6309
- kiroAutoApprove: import_mini21.z.optional(import_mini21.z.array(import_mini21.z.string())),
6310
- kiroAutoBlock: import_mini21.z.optional(import_mini21.z.array(import_mini21.z.string())),
6311
- headers: import_mini21.z.optional(import_mini21.z.record(import_mini21.z.string(), import_mini21.z.string())),
6312
- enabledTools: import_mini21.z.optional(import_mini21.z.array(import_mini21.z.string())),
6313
- disabledTools: import_mini21.z.optional(import_mini21.z.array(import_mini21.z.string()))
6517
+ var import_mini22 = require("zod/mini");
6518
+ var McpServerSchema = import_mini22.z.looseObject({
6519
+ type: import_mini22.z.optional(import_mini22.z.enum(["local", "stdio", "sse", "http"])),
6520
+ command: import_mini22.z.optional(import_mini22.z.union([import_mini22.z.string(), import_mini22.z.array(import_mini22.z.string())])),
6521
+ args: import_mini22.z.optional(import_mini22.z.array(import_mini22.z.string())),
6522
+ url: import_mini22.z.optional(import_mini22.z.string()),
6523
+ httpUrl: import_mini22.z.optional(import_mini22.z.string()),
6524
+ env: import_mini22.z.optional(import_mini22.z.record(import_mini22.z.string(), import_mini22.z.string())),
6525
+ disabled: import_mini22.z.optional(import_mini22.z.boolean()),
6526
+ networkTimeout: import_mini22.z.optional(import_mini22.z.number()),
6527
+ timeout: import_mini22.z.optional(import_mini22.z.number()),
6528
+ trust: import_mini22.z.optional(import_mini22.z.boolean()),
6529
+ cwd: import_mini22.z.optional(import_mini22.z.string()),
6530
+ transport: import_mini22.z.optional(import_mini22.z.enum(["local", "stdio", "sse", "http"])),
6531
+ alwaysAllow: import_mini22.z.optional(import_mini22.z.array(import_mini22.z.string())),
6532
+ tools: import_mini22.z.optional(import_mini22.z.array(import_mini22.z.string())),
6533
+ kiroAutoApprove: import_mini22.z.optional(import_mini22.z.array(import_mini22.z.string())),
6534
+ kiroAutoBlock: import_mini22.z.optional(import_mini22.z.array(import_mini22.z.string())),
6535
+ headers: import_mini22.z.optional(import_mini22.z.record(import_mini22.z.string(), import_mini22.z.string())),
6536
+ enabledTools: import_mini22.z.optional(import_mini22.z.array(import_mini22.z.string())),
6537
+ disabledTools: import_mini22.z.optional(import_mini22.z.array(import_mini22.z.string()))
6314
6538
  });
6315
- var McpServersSchema = import_mini21.z.record(import_mini21.z.string(), McpServerSchema);
6539
+ var McpServersSchema = import_mini22.z.record(import_mini22.z.string(), McpServerSchema);
6316
6540
  function isMcpServers(value) {
6317
6541
  return value !== void 0 && value !== null && typeof value === "object" && !Array.isArray(value);
6318
6542
  }
6319
6543
 
6320
6544
  // src/features/mcp/rulesync-mcp.ts
6321
- var RulesyncMcpServerSchema = import_mini22.z.extend(McpServerSchema, {
6322
- targets: import_mini22.z.optional(RulesyncTargetsSchema),
6323
- description: import_mini22.z.optional(import_mini22.z.string()),
6324
- exposed: import_mini22.z.optional(import_mini22.z.boolean())
6545
+ var RulesyncMcpServerSchema = import_mini23.z.extend(McpServerSchema, {
6546
+ targets: import_mini23.z.optional(RulesyncTargetsSchema),
6547
+ description: import_mini23.z.optional(import_mini23.z.string()),
6548
+ exposed: import_mini23.z.optional(import_mini23.z.boolean())
6325
6549
  });
6326
- var RulesyncMcpConfigSchema = import_mini22.z.object({
6327
- mcpServers: import_mini22.z.record(import_mini22.z.string(), RulesyncMcpServerSchema)
6550
+ var RulesyncMcpConfigSchema = import_mini23.z.object({
6551
+ mcpServers: import_mini23.z.record(import_mini23.z.string(), RulesyncMcpServerSchema)
6328
6552
  });
6329
- var RulesyncMcpFileSchema = import_mini22.z.looseObject({
6330
- $schema: import_mini22.z.optional(import_mini22.z.string()),
6553
+ var RulesyncMcpFileSchema = import_mini23.z.looseObject({
6554
+ $schema: import_mini23.z.optional(import_mini23.z.string()),
6331
6555
  ...RulesyncMcpConfigSchema.shape
6332
6556
  });
6333
6557
  var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
@@ -6367,12 +6591,12 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
6367
6591
  }) {
6368
6592
  const baseDir = process.cwd();
6369
6593
  const paths = this.getSettablePaths();
6370
- const recommendedPath = (0, import_node_path47.join)(
6594
+ const recommendedPath = (0, import_node_path48.join)(
6371
6595
  baseDir,
6372
6596
  paths.recommended.relativeDirPath,
6373
6597
  paths.recommended.relativeFilePath
6374
6598
  );
6375
- const legacyPath = (0, import_node_path47.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
6599
+ const legacyPath = (0, import_node_path48.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
6376
6600
  if (await fileExists(recommendedPath)) {
6377
6601
  const fileContent2 = await readFileContent(recommendedPath);
6378
6602
  return new _RulesyncMcp({
@@ -6526,7 +6750,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
6526
6750
  global = false
6527
6751
  }) {
6528
6752
  const paths = this.getSettablePaths({ global });
6529
- const fileContent = await readFileContentOrNull((0, import_node_path48.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6753
+ const fileContent = await readFileContentOrNull((0, import_node_path49.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6530
6754
  const json = JSON.parse(fileContent);
6531
6755
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
6532
6756
  return new _ClaudecodeMcp({
@@ -6545,7 +6769,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
6545
6769
  }) {
6546
6770
  const paths = this.getSettablePaths({ global });
6547
6771
  const fileContent = await readOrInitializeFileContent(
6548
- (0, import_node_path48.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6772
+ (0, import_node_path49.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6549
6773
  JSON.stringify({ mcpServers: {} }, null, 2)
6550
6774
  );
6551
6775
  const json = JSON.parse(fileContent);
@@ -6584,7 +6808,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
6584
6808
  };
6585
6809
 
6586
6810
  // src/features/mcp/cline-mcp.ts
6587
- var import_node_path49 = require("path");
6811
+ var import_node_path50 = require("path");
6588
6812
  var ClineMcp = class _ClineMcp extends ToolMcp {
6589
6813
  json;
6590
6814
  constructor(params) {
@@ -6605,7 +6829,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
6605
6829
  validate = true
6606
6830
  }) {
6607
6831
  const fileContent = await readFileContent(
6608
- (0, import_node_path49.join)(
6832
+ (0, import_node_path50.join)(
6609
6833
  baseDir,
6610
6834
  this.getSettablePaths().relativeDirPath,
6611
6835
  this.getSettablePaths().relativeFilePath
@@ -6654,8 +6878,8 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
6654
6878
  };
6655
6879
 
6656
6880
  // src/features/mcp/codexcli-mcp.ts
6657
- var import_node_path50 = require("path");
6658
- var smolToml2 = __toESM(require("smol-toml"), 1);
6881
+ var import_node_path51 = require("path");
6882
+ var smolToml3 = __toESM(require("smol-toml"), 1);
6659
6883
  function convertFromCodexFormat(codexMcp) {
6660
6884
  const result = {};
6661
6885
  for (const [name, config] of Object.entries(codexMcp)) {
@@ -6708,7 +6932,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6708
6932
  ...rest,
6709
6933
  validate: false
6710
6934
  });
6711
- this.toml = smolToml2.parse(this.fileContent);
6935
+ this.toml = smolToml3.parse(this.fileContent);
6712
6936
  if (rest.validate) {
6713
6937
  const result = this.validate();
6714
6938
  if (!result.success) {
@@ -6737,7 +6961,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6737
6961
  global = false
6738
6962
  }) {
6739
6963
  const paths = this.getSettablePaths({ global });
6740
- const fileContent = await readFileContentOrNull((0, import_node_path50.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml2.stringify({});
6964
+ const fileContent = await readFileContentOrNull((0, import_node_path51.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml3.stringify({});
6741
6965
  return new _CodexcliMcp({
6742
6966
  baseDir,
6743
6967
  relativeDirPath: paths.relativeDirPath,
@@ -6753,12 +6977,12 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6753
6977
  global = false
6754
6978
  }) {
6755
6979
  const paths = this.getSettablePaths({ global });
6756
- const configTomlFilePath = (0, import_node_path50.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6980
+ const configTomlFilePath = (0, import_node_path51.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6757
6981
  const configTomlFileContent = await readOrInitializeFileContent(
6758
6982
  configTomlFilePath,
6759
- smolToml2.stringify({})
6983
+ smolToml3.stringify({})
6760
6984
  );
6761
- const configToml = smolToml2.parse(configTomlFileContent);
6985
+ const configToml = smolToml3.parse(configTomlFileContent);
6762
6986
  const mcpServers = rulesyncMcp.getJson().mcpServers;
6763
6987
  const converted = convertToCodexFormat(mcpServers);
6764
6988
  const filteredMcpServers = this.removeEmptyEntries(converted);
@@ -6767,7 +6991,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6767
6991
  baseDir,
6768
6992
  relativeDirPath: paths.relativeDirPath,
6769
6993
  relativeFilePath: paths.relativeFilePath,
6770
- fileContent: smolToml2.stringify(configToml),
6994
+ fileContent: smolToml3.stringify(configToml),
6771
6995
  validate
6772
6996
  });
6773
6997
  }
@@ -6807,7 +7031,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6807
7031
  };
6808
7032
 
6809
7033
  // src/features/mcp/copilot-mcp.ts
6810
- var import_node_path51 = require("path");
7034
+ var import_node_path52 = require("path");
6811
7035
  function convertToCopilotFormat(mcpServers) {
6812
7036
  return { servers: mcpServers };
6813
7037
  }
@@ -6834,7 +7058,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
6834
7058
  validate = true
6835
7059
  }) {
6836
7060
  const fileContent = await readFileContent(
6837
- (0, import_node_path51.join)(
7061
+ (0, import_node_path52.join)(
6838
7062
  baseDir,
6839
7063
  this.getSettablePaths().relativeDirPath,
6840
7064
  this.getSettablePaths().relativeFilePath
@@ -6887,7 +7111,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
6887
7111
  };
6888
7112
 
6889
7113
  // src/features/mcp/copilotcli-mcp.ts
6890
- var import_node_path52 = require("path");
7114
+ var import_node_path53 = require("path");
6891
7115
  var isRemoteServerType = (type) => {
6892
7116
  return type === "http" || type === "sse";
6893
7117
  };
@@ -6985,7 +7209,7 @@ var CopilotcliMcp = class _CopilotcliMcp extends ToolMcp {
6985
7209
  global = false
6986
7210
  }) {
6987
7211
  const paths = this.getSettablePaths({ global });
6988
- const fileContent = await readFileContentOrNull((0, import_node_path52.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7212
+ const fileContent = await readFileContentOrNull((0, import_node_path53.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6989
7213
  const json = JSON.parse(fileContent);
6990
7214
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
6991
7215
  return new _CopilotcliMcp({
@@ -7005,7 +7229,7 @@ var CopilotcliMcp = class _CopilotcliMcp extends ToolMcp {
7005
7229
  }) {
7006
7230
  const paths = this.getSettablePaths({ global });
7007
7231
  const fileContent = await readOrInitializeFileContent(
7008
- (0, import_node_path52.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7232
+ (0, import_node_path53.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7009
7233
  JSON.stringify({ mcpServers: {} }, null, 2)
7010
7234
  );
7011
7235
  const json = JSON.parse(fileContent);
@@ -7047,7 +7271,7 @@ var CopilotcliMcp = class _CopilotcliMcp extends ToolMcp {
7047
7271
  };
7048
7272
 
7049
7273
  // src/features/mcp/cursor-mcp.ts
7050
- var import_node_path53 = require("path");
7274
+ var import_node_path54 = require("path");
7051
7275
  var CURSOR_ENV_VAR_PATTERN = /\$\{env:([^}]+)\}/g;
7052
7276
  function convertEnvFromCursorFormat(mcpServers) {
7053
7277
  return Object.fromEntries(
@@ -7094,7 +7318,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7094
7318
  this.json = JSON.parse(this.fileContent);
7095
7319
  } catch (error) {
7096
7320
  throw new Error(
7097
- `Failed to parse Cursor MCP config at ${(0, import_node_path53.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(error)}`,
7321
+ `Failed to parse Cursor MCP config at ${(0, import_node_path54.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(error)}`,
7098
7322
  { cause: error }
7099
7323
  );
7100
7324
  }
@@ -7120,14 +7344,14 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7120
7344
  global = false
7121
7345
  }) {
7122
7346
  const paths = this.getSettablePaths({ global });
7123
- const filePath = (0, import_node_path53.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
7347
+ const filePath = (0, import_node_path54.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
7124
7348
  const fileContent = await readFileContentOrNull(filePath) ?? '{"mcpServers":{}}';
7125
7349
  let json;
7126
7350
  try {
7127
7351
  json = JSON.parse(fileContent);
7128
7352
  } catch (error) {
7129
7353
  throw new Error(
7130
- `Failed to parse Cursor MCP config at ${(0, import_node_path53.join)(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
7354
+ `Failed to parse Cursor MCP config at ${(0, import_node_path54.join)(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
7131
7355
  { cause: error }
7132
7356
  );
7133
7357
  }
@@ -7149,7 +7373,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7149
7373
  }) {
7150
7374
  const paths = this.getSettablePaths({ global });
7151
7375
  const fileContent = await readOrInitializeFileContent(
7152
- (0, import_node_path53.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7376
+ (0, import_node_path54.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7153
7377
  JSON.stringify({ mcpServers: {} }, null, 2)
7154
7378
  );
7155
7379
  let json;
@@ -7157,7 +7381,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7157
7381
  json = JSON.parse(fileContent);
7158
7382
  } catch (error) {
7159
7383
  throw new Error(
7160
- `Failed to parse Cursor MCP config at ${(0, import_node_path53.join)(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
7384
+ `Failed to parse Cursor MCP config at ${(0, import_node_path54.join)(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
7161
7385
  { cause: error }
7162
7386
  );
7163
7387
  }
@@ -7206,7 +7430,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7206
7430
  };
7207
7431
 
7208
7432
  // src/features/mcp/deepagents-mcp.ts
7209
- var import_node_path54 = require("path");
7433
+ var import_node_path55 = require("path");
7210
7434
  var DeepagentsMcp = class _DeepagentsMcp extends ToolMcp {
7211
7435
  json;
7212
7436
  constructor(params) {
@@ -7231,7 +7455,7 @@ var DeepagentsMcp = class _DeepagentsMcp extends ToolMcp {
7231
7455
  global = false
7232
7456
  }) {
7233
7457
  const paths = this.getSettablePaths({ global });
7234
- const fileContent = await readFileContentOrNull((0, import_node_path54.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7458
+ const fileContent = await readFileContentOrNull((0, import_node_path55.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7235
7459
  const json = JSON.parse(fileContent);
7236
7460
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
7237
7461
  return new _DeepagentsMcp({
@@ -7250,7 +7474,7 @@ var DeepagentsMcp = class _DeepagentsMcp extends ToolMcp {
7250
7474
  }) {
7251
7475
  const paths = this.getSettablePaths({ global });
7252
7476
  const fileContent = await readOrInitializeFileContent(
7253
- (0, import_node_path54.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7477
+ (0, import_node_path55.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7254
7478
  JSON.stringify({ mcpServers: {} }, null, 2)
7255
7479
  );
7256
7480
  const json = JSON.parse(fileContent);
@@ -7289,7 +7513,7 @@ var DeepagentsMcp = class _DeepagentsMcp extends ToolMcp {
7289
7513
  };
7290
7514
 
7291
7515
  // src/features/mcp/factorydroid-mcp.ts
7292
- var import_node_path55 = require("path");
7516
+ var import_node_path56 = require("path");
7293
7517
  var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
7294
7518
  json;
7295
7519
  constructor(params) {
@@ -7310,7 +7534,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
7310
7534
  validate = true
7311
7535
  }) {
7312
7536
  const fileContent = await readFileContent(
7313
- (0, import_node_path55.join)(
7537
+ (0, import_node_path56.join)(
7314
7538
  baseDir,
7315
7539
  this.getSettablePaths().relativeDirPath,
7316
7540
  this.getSettablePaths().relativeFilePath
@@ -7364,7 +7588,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
7364
7588
  };
7365
7589
 
7366
7590
  // src/features/mcp/geminicli-mcp.ts
7367
- var import_node_path56 = require("path");
7591
+ var import_node_path57 = require("path");
7368
7592
  var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
7369
7593
  json;
7370
7594
  constructor(params) {
@@ -7392,7 +7616,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
7392
7616
  global = false
7393
7617
  }) {
7394
7618
  const paths = this.getSettablePaths({ global });
7395
- const fileContent = await readFileContentOrNull((0, import_node_path56.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7619
+ const fileContent = await readFileContentOrNull((0, import_node_path57.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7396
7620
  const json = JSON.parse(fileContent);
7397
7621
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
7398
7622
  return new _GeminiCliMcp({
@@ -7411,7 +7635,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
7411
7635
  }) {
7412
7636
  const paths = this.getSettablePaths({ global });
7413
7637
  const fileContent = await readOrInitializeFileContent(
7414
- (0, import_node_path56.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7638
+ (0, import_node_path57.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7415
7639
  JSON.stringify({ mcpServers: {} }, null, 2)
7416
7640
  );
7417
7641
  const json = JSON.parse(fileContent);
@@ -7456,7 +7680,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
7456
7680
  };
7457
7681
 
7458
7682
  // src/features/mcp/junie-mcp.ts
7459
- var import_node_path57 = require("path");
7683
+ var import_node_path58 = require("path");
7460
7684
  var JunieMcp = class _JunieMcp extends ToolMcp {
7461
7685
  json;
7462
7686
  constructor(params) {
@@ -7468,7 +7692,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
7468
7692
  }
7469
7693
  static getSettablePaths() {
7470
7694
  return {
7471
- relativeDirPath: (0, import_node_path57.join)(".junie", "mcp"),
7695
+ relativeDirPath: (0, import_node_path58.join)(".junie", "mcp"),
7472
7696
  relativeFilePath: "mcp.json"
7473
7697
  };
7474
7698
  }
@@ -7477,7 +7701,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
7477
7701
  validate = true
7478
7702
  }) {
7479
7703
  const fileContent = await readFileContent(
7480
- (0, import_node_path57.join)(
7704
+ (0, import_node_path58.join)(
7481
7705
  baseDir,
7482
7706
  this.getSettablePaths().relativeDirPath,
7483
7707
  this.getSettablePaths().relativeFilePath
@@ -7526,27 +7750,27 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
7526
7750
  };
7527
7751
 
7528
7752
  // src/features/mcp/kilo-mcp.ts
7529
- var import_node_path58 = require("path");
7753
+ var import_node_path59 = require("path");
7530
7754
  var import_jsonc_parser3 = require("jsonc-parser");
7531
- var import_mini23 = require("zod/mini");
7532
- var KiloMcpLocalServerSchema = import_mini23.z.object({
7533
- type: import_mini23.z.literal("local"),
7534
- command: import_mini23.z.array(import_mini23.z.string()),
7535
- environment: import_mini23.z.optional(import_mini23.z.record(import_mini23.z.string(), import_mini23.z.string())),
7536
- enabled: import_mini23.z._default(import_mini23.z.boolean(), true),
7537
- cwd: import_mini23.z.optional(import_mini23.z.string())
7755
+ var import_mini24 = require("zod/mini");
7756
+ var KiloMcpLocalServerSchema = import_mini24.z.object({
7757
+ type: import_mini24.z.literal("local"),
7758
+ command: import_mini24.z.array(import_mini24.z.string()),
7759
+ environment: import_mini24.z.optional(import_mini24.z.record(import_mini24.z.string(), import_mini24.z.string())),
7760
+ enabled: import_mini24.z._default(import_mini24.z.boolean(), true),
7761
+ cwd: import_mini24.z.optional(import_mini24.z.string())
7538
7762
  });
7539
- var KiloMcpRemoteServerSchema = import_mini23.z.object({
7540
- type: import_mini23.z.literal("remote"),
7541
- url: import_mini23.z.string(),
7542
- headers: import_mini23.z.optional(import_mini23.z.record(import_mini23.z.string(), import_mini23.z.string())),
7543
- enabled: import_mini23.z._default(import_mini23.z.boolean(), true)
7763
+ var KiloMcpRemoteServerSchema = import_mini24.z.object({
7764
+ type: import_mini24.z.literal("remote"),
7765
+ url: import_mini24.z.string(),
7766
+ headers: import_mini24.z.optional(import_mini24.z.record(import_mini24.z.string(), import_mini24.z.string())),
7767
+ enabled: import_mini24.z._default(import_mini24.z.boolean(), true)
7544
7768
  });
7545
- var KiloMcpServerSchema = import_mini23.z.union([KiloMcpLocalServerSchema, KiloMcpRemoteServerSchema]);
7546
- var KiloConfigSchema = import_mini23.z.looseObject({
7547
- $schema: import_mini23.z.optional(import_mini23.z.string()),
7548
- mcp: import_mini23.z.optional(import_mini23.z.record(import_mini23.z.string(), KiloMcpServerSchema)),
7549
- tools: import_mini23.z.optional(import_mini23.z.record(import_mini23.z.string(), import_mini23.z.boolean()))
7769
+ var KiloMcpServerSchema = import_mini24.z.union([KiloMcpLocalServerSchema, KiloMcpRemoteServerSchema]);
7770
+ var KiloConfigSchema = import_mini24.z.looseObject({
7771
+ $schema: import_mini24.z.optional(import_mini24.z.string()),
7772
+ mcp: import_mini24.z.optional(import_mini24.z.record(import_mini24.z.string(), KiloMcpServerSchema)),
7773
+ tools: import_mini24.z.optional(import_mini24.z.record(import_mini24.z.string(), import_mini24.z.boolean()))
7550
7774
  });
7551
7775
  function convertFromKiloFormat(kiloMcp, tools) {
7552
7776
  return Object.fromEntries(
@@ -7664,7 +7888,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
7664
7888
  static getSettablePaths({ global } = {}) {
7665
7889
  if (global) {
7666
7890
  return {
7667
- relativeDirPath: (0, import_node_path58.join)(".config", "kilo"),
7891
+ relativeDirPath: (0, import_node_path59.join)(".config", "kilo"),
7668
7892
  relativeFilePath: "kilo.json"
7669
7893
  };
7670
7894
  }
@@ -7679,11 +7903,11 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
7679
7903
  global = false
7680
7904
  }) {
7681
7905
  const basePaths = this.getSettablePaths({ global });
7682
- const jsonDir = (0, import_node_path58.join)(baseDir, basePaths.relativeDirPath);
7906
+ const jsonDir = (0, import_node_path59.join)(baseDir, basePaths.relativeDirPath);
7683
7907
  let fileContent = null;
7684
7908
  let relativeFilePath = "kilo.jsonc";
7685
- const jsoncPath = (0, import_node_path58.join)(jsonDir, "kilo.jsonc");
7686
- const jsonPath = (0, import_node_path58.join)(jsonDir, "kilo.json");
7909
+ const jsoncPath = (0, import_node_path59.join)(jsonDir, "kilo.jsonc");
7910
+ const jsonPath = (0, import_node_path59.join)(jsonDir, "kilo.json");
7687
7911
  fileContent = await readFileContentOrNull(jsoncPath);
7688
7912
  if (!fileContent) {
7689
7913
  fileContent = await readFileContentOrNull(jsonPath);
@@ -7709,11 +7933,11 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
7709
7933
  global = false
7710
7934
  }) {
7711
7935
  const basePaths = this.getSettablePaths({ global });
7712
- const jsonDir = (0, import_node_path58.join)(baseDir, basePaths.relativeDirPath);
7936
+ const jsonDir = (0, import_node_path59.join)(baseDir, basePaths.relativeDirPath);
7713
7937
  let fileContent = null;
7714
7938
  let relativeFilePath = "kilo.jsonc";
7715
- const jsoncPath = (0, import_node_path58.join)(jsonDir, "kilo.jsonc");
7716
- const jsonPath = (0, import_node_path58.join)(jsonDir, "kilo.json");
7939
+ const jsoncPath = (0, import_node_path59.join)(jsonDir, "kilo.jsonc");
7940
+ const jsonPath = (0, import_node_path59.join)(jsonDir, "kilo.json");
7717
7941
  fileContent = await readFileContentOrNull(jsoncPath);
7718
7942
  if (!fileContent) {
7719
7943
  fileContent = await readFileContentOrNull(jsonPath);
@@ -7772,7 +7996,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
7772
7996
  };
7773
7997
 
7774
7998
  // src/features/mcp/kiro-mcp.ts
7775
- var import_node_path59 = require("path");
7999
+ var import_node_path60 = require("path");
7776
8000
  var KiroMcp = class _KiroMcp extends ToolMcp {
7777
8001
  json;
7778
8002
  constructor(params) {
@@ -7784,7 +8008,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
7784
8008
  }
7785
8009
  static getSettablePaths() {
7786
8010
  return {
7787
- relativeDirPath: (0, import_node_path59.join)(".kiro", "settings"),
8011
+ relativeDirPath: (0, import_node_path60.join)(".kiro", "settings"),
7788
8012
  relativeFilePath: "mcp.json"
7789
8013
  };
7790
8014
  }
@@ -7793,7 +8017,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
7793
8017
  validate = true
7794
8018
  }) {
7795
8019
  const paths = this.getSettablePaths();
7796
- const fileContent = await readFileContentOrNull((0, import_node_path59.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
8020
+ const fileContent = await readFileContentOrNull((0, import_node_path60.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7797
8021
  return new _KiroMcp({
7798
8022
  baseDir,
7799
8023
  relativeDirPath: paths.relativeDirPath,
@@ -7841,30 +8065,30 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
7841
8065
  };
7842
8066
 
7843
8067
  // src/features/mcp/opencode-mcp.ts
7844
- var import_node_path60 = require("path");
8068
+ var import_node_path61 = require("path");
7845
8069
  var import_jsonc_parser4 = require("jsonc-parser");
7846
- var import_mini24 = require("zod/mini");
7847
- var OpencodeMcpLocalServerSchema = import_mini24.z.object({
7848
- type: import_mini24.z.literal("local"),
7849
- command: import_mini24.z.array(import_mini24.z.string()),
7850
- environment: import_mini24.z.optional(import_mini24.z.record(import_mini24.z.string(), import_mini24.z.string())),
7851
- enabled: import_mini24.z._default(import_mini24.z.boolean(), true),
7852
- cwd: import_mini24.z.optional(import_mini24.z.string())
8070
+ var import_mini25 = require("zod/mini");
8071
+ var OpencodeMcpLocalServerSchema = import_mini25.z.object({
8072
+ type: import_mini25.z.literal("local"),
8073
+ command: import_mini25.z.array(import_mini25.z.string()),
8074
+ environment: import_mini25.z.optional(import_mini25.z.record(import_mini25.z.string(), import_mini25.z.string())),
8075
+ enabled: import_mini25.z._default(import_mini25.z.boolean(), true),
8076
+ cwd: import_mini25.z.optional(import_mini25.z.string())
7853
8077
  });
7854
- var OpencodeMcpRemoteServerSchema = import_mini24.z.object({
7855
- type: import_mini24.z.literal("remote"),
7856
- url: import_mini24.z.string(),
7857
- headers: import_mini24.z.optional(import_mini24.z.record(import_mini24.z.string(), import_mini24.z.string())),
7858
- enabled: import_mini24.z._default(import_mini24.z.boolean(), true)
8078
+ var OpencodeMcpRemoteServerSchema = import_mini25.z.object({
8079
+ type: import_mini25.z.literal("remote"),
8080
+ url: import_mini25.z.string(),
8081
+ headers: import_mini25.z.optional(import_mini25.z.record(import_mini25.z.string(), import_mini25.z.string())),
8082
+ enabled: import_mini25.z._default(import_mini25.z.boolean(), true)
7859
8083
  });
7860
- var OpencodeMcpServerSchema = import_mini24.z.union([
8084
+ var OpencodeMcpServerSchema = import_mini25.z.union([
7861
8085
  OpencodeMcpLocalServerSchema,
7862
8086
  OpencodeMcpRemoteServerSchema
7863
8087
  ]);
7864
- var OpencodeConfigSchema = import_mini24.z.looseObject({
7865
- $schema: import_mini24.z.optional(import_mini24.z.string()),
7866
- mcp: import_mini24.z.optional(import_mini24.z.record(import_mini24.z.string(), OpencodeMcpServerSchema)),
7867
- tools: import_mini24.z.optional(import_mini24.z.record(import_mini24.z.string(), import_mini24.z.boolean()))
8088
+ var OpencodeConfigSchema = import_mini25.z.looseObject({
8089
+ $schema: import_mini25.z.optional(import_mini25.z.string()),
8090
+ mcp: import_mini25.z.optional(import_mini25.z.record(import_mini25.z.string(), OpencodeMcpServerSchema)),
8091
+ tools: import_mini25.z.optional(import_mini25.z.record(import_mini25.z.string(), import_mini25.z.boolean()))
7868
8092
  });
7869
8093
  function convertFromOpencodeFormat(opencodeMcp, tools) {
7870
8094
  return Object.fromEntries(
@@ -7982,7 +8206,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
7982
8206
  static getSettablePaths({ global } = {}) {
7983
8207
  if (global) {
7984
8208
  return {
7985
- relativeDirPath: (0, import_node_path60.join)(".config", "opencode"),
8209
+ relativeDirPath: (0, import_node_path61.join)(".config", "opencode"),
7986
8210
  relativeFilePath: "opencode.json"
7987
8211
  };
7988
8212
  }
@@ -7997,11 +8221,11 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
7997
8221
  global = false
7998
8222
  }) {
7999
8223
  const basePaths = this.getSettablePaths({ global });
8000
- const jsonDir = (0, import_node_path60.join)(baseDir, basePaths.relativeDirPath);
8224
+ const jsonDir = (0, import_node_path61.join)(baseDir, basePaths.relativeDirPath);
8001
8225
  let fileContent = null;
8002
8226
  let relativeFilePath = "opencode.jsonc";
8003
- const jsoncPath = (0, import_node_path60.join)(jsonDir, "opencode.jsonc");
8004
- const jsonPath = (0, import_node_path60.join)(jsonDir, "opencode.json");
8227
+ const jsoncPath = (0, import_node_path61.join)(jsonDir, "opencode.jsonc");
8228
+ const jsonPath = (0, import_node_path61.join)(jsonDir, "opencode.json");
8005
8229
  fileContent = await readFileContentOrNull(jsoncPath);
8006
8230
  if (!fileContent) {
8007
8231
  fileContent = await readFileContentOrNull(jsonPath);
@@ -8027,11 +8251,11 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
8027
8251
  global = false
8028
8252
  }) {
8029
8253
  const basePaths = this.getSettablePaths({ global });
8030
- const jsonDir = (0, import_node_path60.join)(baseDir, basePaths.relativeDirPath);
8254
+ const jsonDir = (0, import_node_path61.join)(baseDir, basePaths.relativeDirPath);
8031
8255
  let fileContent = null;
8032
8256
  let relativeFilePath = "opencode.jsonc";
8033
- const jsoncPath = (0, import_node_path60.join)(jsonDir, "opencode.jsonc");
8034
- const jsonPath = (0, import_node_path60.join)(jsonDir, "opencode.json");
8257
+ const jsoncPath = (0, import_node_path61.join)(jsonDir, "opencode.jsonc");
8258
+ const jsonPath = (0, import_node_path61.join)(jsonDir, "opencode.json");
8035
8259
  fileContent = await readFileContentOrNull(jsoncPath);
8036
8260
  if (!fileContent) {
8037
8261
  fileContent = await readFileContentOrNull(jsonPath);
@@ -8092,7 +8316,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
8092
8316
  };
8093
8317
 
8094
8318
  // src/features/mcp/roo-mcp.ts
8095
- var import_node_path61 = require("path");
8319
+ var import_node_path62 = require("path");
8096
8320
  function convertToRooFormat(mcpServers) {
8097
8321
  return Object.fromEntries(
8098
8322
  Object.entries(mcpServers).map(([serverName, serverConfig]) => {
@@ -8144,7 +8368,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
8144
8368
  validate = true
8145
8369
  }) {
8146
8370
  const fileContent = await readFileContent(
8147
- (0, import_node_path61.join)(
8371
+ (0, import_node_path62.join)(
8148
8372
  baseDir,
8149
8373
  this.getSettablePaths().relativeDirPath,
8150
8374
  this.getSettablePaths().relativeFilePath
@@ -8199,9 +8423,9 @@ var RooMcp = class _RooMcp extends ToolMcp {
8199
8423
  };
8200
8424
 
8201
8425
  // src/features/mcp/rovodev-mcp.ts
8202
- var import_node_path62 = require("path");
8426
+ var import_node_path63 = require("path");
8203
8427
  function parseRovodevMcpJson(fileContent, relativeDirPath, relativeFilePath) {
8204
- const configPath = (0, import_node_path62.join)(relativeDirPath, relativeFilePath);
8428
+ const configPath = (0, import_node_path63.join)(relativeDirPath, relativeFilePath);
8205
8429
  let parsed;
8206
8430
  try {
8207
8431
  parsed = JSON.parse(fileContent);
@@ -8250,7 +8474,7 @@ var RovodevMcp = class _RovodevMcp extends ToolMcp {
8250
8474
  throw new Error("Rovodev MCP is global-only; use --global to sync ~/.rovodev/mcp.json");
8251
8475
  }
8252
8476
  const paths = this.getSettablePaths({ global });
8253
- const filePath = (0, import_node_path62.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
8477
+ const filePath = (0, import_node_path63.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
8254
8478
  const fileContent = await readFileContentOrNull(filePath) ?? '{"mcpServers":{}}';
8255
8479
  const json = parseRovodevMcpJson(fileContent, paths.relativeDirPath, paths.relativeFilePath);
8256
8480
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
@@ -8274,7 +8498,7 @@ var RovodevMcp = class _RovodevMcp extends ToolMcp {
8274
8498
  }
8275
8499
  const paths = this.getSettablePaths({ global });
8276
8500
  const fileContent = await readOrInitializeFileContent(
8277
- (0, import_node_path62.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
8501
+ (0, import_node_path63.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
8278
8502
  JSON.stringify({ mcpServers: {} }, null, 2)
8279
8503
  );
8280
8504
  const json = parseRovodevMcpJson(fileContent, paths.relativeDirPath, paths.relativeFilePath);
@@ -8335,7 +8559,7 @@ var mcpProcessorToolTargetTuple = [
8335
8559
  "roo",
8336
8560
  "rovodev"
8337
8561
  ];
8338
- var McpProcessorToolTargetSchema = import_mini25.z.enum(mcpProcessorToolTargetTuple);
8562
+ var McpProcessorToolTargetSchema = import_mini26.z.enum(mcpProcessorToolTargetTuple);
8339
8563
  var toolMcpFactories = /* @__PURE__ */ new Map([
8340
8564
  [
8341
8565
  "claudecode",
@@ -8674,25 +8898,25 @@ var McpProcessor = class extends FeatureProcessor {
8674
8898
  };
8675
8899
 
8676
8900
  // src/features/rules/rules-processor.ts
8677
- var import_node_path132 = require("path");
8901
+ var import_node_path133 = require("path");
8678
8902
  var import_toon = require("@toon-format/toon");
8679
- var import_mini64 = require("zod/mini");
8903
+ var import_mini65 = require("zod/mini");
8680
8904
 
8681
8905
  // src/constants/general.ts
8682
8906
  var SKILL_FILE_NAME = "SKILL.md";
8683
8907
 
8684
8908
  // src/features/skills/agentsmd-skill.ts
8685
- var import_node_path66 = require("path");
8909
+ var import_node_path67 = require("path");
8686
8910
 
8687
8911
  // src/features/skills/simulated-skill.ts
8688
- var import_node_path65 = require("path");
8689
- var import_mini26 = require("zod/mini");
8912
+ var import_node_path66 = require("path");
8913
+ var import_mini27 = require("zod/mini");
8690
8914
 
8691
8915
  // src/features/skills/tool-skill.ts
8692
- var import_node_path64 = require("path");
8916
+ var import_node_path65 = require("path");
8693
8917
 
8694
8918
  // src/types/ai-dir.ts
8695
- var import_node_path63 = __toESM(require("path"), 1);
8919
+ var import_node_path64 = __toESM(require("path"), 1);
8696
8920
  var AiDir = class {
8697
8921
  /**
8698
8922
  * @example "."
@@ -8726,7 +8950,7 @@ var AiDir = class {
8726
8950
  otherFiles = [],
8727
8951
  global = false
8728
8952
  }) {
8729
- if (dirName.includes(import_node_path63.default.sep) || dirName.includes("/") || dirName.includes("\\")) {
8953
+ if (dirName.includes(import_node_path64.default.sep) || dirName.includes("/") || dirName.includes("\\")) {
8730
8954
  throw new Error(`Directory name cannot contain path separators: dirName="${dirName}"`);
8731
8955
  }
8732
8956
  this.baseDir = baseDir;
@@ -8749,11 +8973,11 @@ var AiDir = class {
8749
8973
  return this.dirName;
8750
8974
  }
8751
8975
  getDirPath() {
8752
- const fullPath = import_node_path63.default.join(this.baseDir, this.relativeDirPath, this.dirName);
8753
- const resolvedFull = (0, import_node_path63.resolve)(fullPath);
8754
- const resolvedBase = (0, import_node_path63.resolve)(this.baseDir);
8755
- const rel = (0, import_node_path63.relative)(resolvedBase, resolvedFull);
8756
- if (rel.startsWith("..") || import_node_path63.default.isAbsolute(rel)) {
8976
+ const fullPath = import_node_path64.default.join(this.baseDir, this.relativeDirPath, this.dirName);
8977
+ const resolvedFull = (0, import_node_path64.resolve)(fullPath);
8978
+ const resolvedBase = (0, import_node_path64.resolve)(this.baseDir);
8979
+ const rel = (0, import_node_path64.relative)(resolvedBase, resolvedFull);
8980
+ if (rel.startsWith("..") || import_node_path64.default.isAbsolute(rel)) {
8757
8981
  throw new Error(
8758
8982
  `Path traversal detected: Final path escapes baseDir. baseDir="${this.baseDir}", relativeDirPath="${this.relativeDirPath}", dirName="${this.dirName}"`
8759
8983
  );
@@ -8770,7 +8994,7 @@ var AiDir = class {
8770
8994
  * Returns the relative path from CWD with POSIX separators for consistent cross-platform output.
8771
8995
  */
8772
8996
  getRelativePathFromCwd() {
8773
- return toPosixPath(import_node_path63.default.join(this.relativeDirPath, this.dirName));
8997
+ return toPosixPath(import_node_path64.default.join(this.relativeDirPath, this.dirName));
8774
8998
  }
8775
8999
  getGlobal() {
8776
9000
  return this.global;
@@ -8789,15 +9013,15 @@ var AiDir = class {
8789
9013
  * @returns Array of files with their relative paths and buffers
8790
9014
  */
8791
9015
  static async collectOtherFiles(baseDir, relativeDirPath, dirName, excludeFileName) {
8792
- const dirPath = (0, import_node_path63.join)(baseDir, relativeDirPath, dirName);
8793
- const glob = (0, import_node_path63.join)(dirPath, "**", "*");
9016
+ const dirPath = (0, import_node_path64.join)(baseDir, relativeDirPath, dirName);
9017
+ const glob = (0, import_node_path64.join)(dirPath, "**", "*");
8794
9018
  const filePaths = await findFilesByGlobs(glob, { type: "file" });
8795
- const filteredPaths = filePaths.filter((filePath) => (0, import_node_path63.basename)(filePath) !== excludeFileName);
9019
+ const filteredPaths = filePaths.filter((filePath) => (0, import_node_path64.basename)(filePath) !== excludeFileName);
8796
9020
  const files = await Promise.all(
8797
9021
  filteredPaths.map(async (filePath) => {
8798
9022
  const fileBuffer = await readFileBuffer(filePath);
8799
9023
  return {
8800
- relativeFilePathToDirPath: (0, import_node_path63.relative)(dirPath, filePath),
9024
+ relativeFilePathToDirPath: (0, import_node_path64.relative)(dirPath, filePath),
8801
9025
  fileBuffer
8802
9026
  };
8803
9027
  })
@@ -8891,8 +9115,8 @@ var ToolSkill = class extends AiDir {
8891
9115
  }) {
8892
9116
  const settablePaths = getSettablePaths({ global });
8893
9117
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
8894
- const skillDirPath = (0, import_node_path64.join)(baseDir, actualRelativeDirPath, dirName);
8895
- const skillFilePath = (0, import_node_path64.join)(skillDirPath, SKILL_FILE_NAME);
9118
+ const skillDirPath = (0, import_node_path65.join)(baseDir, actualRelativeDirPath, dirName);
9119
+ const skillFilePath = (0, import_node_path65.join)(skillDirPath, SKILL_FILE_NAME);
8896
9120
  if (!await fileExists(skillFilePath)) {
8897
9121
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
8898
9122
  }
@@ -8916,16 +9140,16 @@ var ToolSkill = class extends AiDir {
8916
9140
  }
8917
9141
  requireMainFileFrontmatter() {
8918
9142
  if (!this.mainFile?.frontmatter) {
8919
- throw new Error(`Frontmatter is not defined in ${(0, import_node_path64.join)(this.relativeDirPath, this.dirName)}`);
9143
+ throw new Error(`Frontmatter is not defined in ${(0, import_node_path65.join)(this.relativeDirPath, this.dirName)}`);
8920
9144
  }
8921
9145
  return this.mainFile.frontmatter;
8922
9146
  }
8923
9147
  };
8924
9148
 
8925
9149
  // src/features/skills/simulated-skill.ts
8926
- var SimulatedSkillFrontmatterSchema = import_mini26.z.looseObject({
8927
- name: import_mini26.z.string(),
8928
- description: import_mini26.z.string()
9150
+ var SimulatedSkillFrontmatterSchema = import_mini27.z.looseObject({
9151
+ name: import_mini27.z.string(),
9152
+ description: import_mini27.z.string()
8929
9153
  });
8930
9154
  var SimulatedSkill = class extends ToolSkill {
8931
9155
  frontmatter;
@@ -8956,7 +9180,7 @@ var SimulatedSkill = class extends ToolSkill {
8956
9180
  const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
8957
9181
  if (!result.success) {
8958
9182
  throw new Error(
8959
- `Invalid frontmatter in ${(0, import_node_path65.join)(relativeDirPath, dirName)}: ${formatError(result.error)}`
9183
+ `Invalid frontmatter in ${(0, import_node_path66.join)(relativeDirPath, dirName)}: ${formatError(result.error)}`
8960
9184
  );
8961
9185
  }
8962
9186
  }
@@ -9015,8 +9239,8 @@ var SimulatedSkill = class extends ToolSkill {
9015
9239
  }) {
9016
9240
  const settablePaths = this.getSettablePaths();
9017
9241
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
9018
- const skillDirPath = (0, import_node_path65.join)(baseDir, actualRelativeDirPath, dirName);
9019
- const skillFilePath = (0, import_node_path65.join)(skillDirPath, SKILL_FILE_NAME);
9242
+ const skillDirPath = (0, import_node_path66.join)(baseDir, actualRelativeDirPath, dirName);
9243
+ const skillFilePath = (0, import_node_path66.join)(skillDirPath, SKILL_FILE_NAME);
9020
9244
  if (!await fileExists(skillFilePath)) {
9021
9245
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
9022
9246
  }
@@ -9093,7 +9317,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
9093
9317
  throw new Error("AgentsmdSkill does not support global mode.");
9094
9318
  }
9095
9319
  return {
9096
- relativeDirPath: (0, import_node_path66.join)(".agents", "skills")
9320
+ relativeDirPath: (0, import_node_path67.join)(".agents", "skills")
9097
9321
  };
9098
9322
  }
9099
9323
  static async fromDir(params) {
@@ -9120,11 +9344,11 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
9120
9344
  };
9121
9345
 
9122
9346
  // src/features/skills/factorydroid-skill.ts
9123
- var import_node_path67 = require("path");
9347
+ var import_node_path68 = require("path");
9124
9348
  var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
9125
9349
  static getSettablePaths(_options) {
9126
9350
  return {
9127
- relativeDirPath: (0, import_node_path67.join)(".factory", "skills")
9351
+ relativeDirPath: (0, import_node_path68.join)(".factory", "skills")
9128
9352
  };
9129
9353
  }
9130
9354
  static async fromDir(params) {
@@ -9151,50 +9375,50 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
9151
9375
  };
9152
9376
 
9153
9377
  // src/features/skills/rovodev-skill.ts
9154
- var import_node_path69 = require("path");
9155
- var import_mini28 = require("zod/mini");
9378
+ var import_node_path70 = require("path");
9379
+ var import_mini29 = require("zod/mini");
9156
9380
 
9157
9381
  // src/features/skills/rulesync-skill.ts
9158
- var import_node_path68 = require("path");
9159
- var import_mini27 = require("zod/mini");
9160
- var RulesyncSkillFrontmatterSchemaInternal = import_mini27.z.looseObject({
9161
- name: import_mini27.z.string(),
9162
- description: import_mini27.z.string(),
9163
- targets: import_mini27.z._default(RulesyncTargetsSchema, ["*"]),
9164
- claudecode: import_mini27.z.optional(
9165
- import_mini27.z.looseObject({
9166
- "allowed-tools": import_mini27.z.optional(import_mini27.z.array(import_mini27.z.string())),
9167
- model: import_mini27.z.optional(import_mini27.z.string()),
9168
- "disable-model-invocation": import_mini27.z.optional(import_mini27.z.boolean())
9382
+ var import_node_path69 = require("path");
9383
+ var import_mini28 = require("zod/mini");
9384
+ var RulesyncSkillFrontmatterSchemaInternal = import_mini28.z.looseObject({
9385
+ name: import_mini28.z.string(),
9386
+ description: import_mini28.z.string(),
9387
+ targets: import_mini28.z._default(RulesyncTargetsSchema, ["*"]),
9388
+ claudecode: import_mini28.z.optional(
9389
+ import_mini28.z.looseObject({
9390
+ "allowed-tools": import_mini28.z.optional(import_mini28.z.array(import_mini28.z.string())),
9391
+ model: import_mini28.z.optional(import_mini28.z.string()),
9392
+ "disable-model-invocation": import_mini28.z.optional(import_mini28.z.boolean())
9169
9393
  })
9170
9394
  ),
9171
- codexcli: import_mini27.z.optional(
9172
- import_mini27.z.looseObject({
9173
- "short-description": import_mini27.z.optional(import_mini27.z.string())
9395
+ codexcli: import_mini28.z.optional(
9396
+ import_mini28.z.looseObject({
9397
+ "short-description": import_mini28.z.optional(import_mini28.z.string())
9174
9398
  })
9175
9399
  ),
9176
- opencode: import_mini27.z.optional(
9177
- import_mini27.z.looseObject({
9178
- "allowed-tools": import_mini27.z.optional(import_mini27.z.array(import_mini27.z.string()))
9400
+ opencode: import_mini28.z.optional(
9401
+ import_mini28.z.looseObject({
9402
+ "allowed-tools": import_mini28.z.optional(import_mini28.z.array(import_mini28.z.string()))
9179
9403
  })
9180
9404
  ),
9181
- kilo: import_mini27.z.optional(
9182
- import_mini27.z.looseObject({
9183
- "allowed-tools": import_mini27.z.optional(import_mini27.z.array(import_mini27.z.string()))
9405
+ kilo: import_mini28.z.optional(
9406
+ import_mini28.z.looseObject({
9407
+ "allowed-tools": import_mini28.z.optional(import_mini28.z.array(import_mini28.z.string()))
9184
9408
  })
9185
9409
  ),
9186
- deepagents: import_mini27.z.optional(
9187
- import_mini27.z.looseObject({
9188
- "allowed-tools": import_mini27.z.optional(import_mini27.z.array(import_mini27.z.string()))
9410
+ deepagents: import_mini28.z.optional(
9411
+ import_mini28.z.looseObject({
9412
+ "allowed-tools": import_mini28.z.optional(import_mini28.z.array(import_mini28.z.string()))
9189
9413
  })
9190
9414
  ),
9191
- copilot: import_mini27.z.optional(
9192
- import_mini27.z.looseObject({
9193
- license: import_mini27.z.optional(import_mini27.z.string())
9415
+ copilot: import_mini28.z.optional(
9416
+ import_mini28.z.looseObject({
9417
+ license: import_mini28.z.optional(import_mini28.z.string())
9194
9418
  })
9195
9419
  ),
9196
- cline: import_mini27.z.optional(import_mini27.z.looseObject({})),
9197
- roo: import_mini27.z.optional(import_mini27.z.looseObject({}))
9420
+ cline: import_mini28.z.optional(import_mini28.z.looseObject({})),
9421
+ roo: import_mini28.z.optional(import_mini28.z.looseObject({}))
9198
9422
  });
9199
9423
  var RulesyncSkillFrontmatterSchema = RulesyncSkillFrontmatterSchemaInternal;
9200
9424
  var RulesyncSkill = class _RulesyncSkill extends AiDir {
@@ -9234,7 +9458,7 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
9234
9458
  }
9235
9459
  getFrontmatter() {
9236
9460
  if (!this.mainFile?.frontmatter) {
9237
- throw new Error(`Frontmatter is not defined in ${(0, import_node_path68.join)(this.relativeDirPath, this.dirName)}`);
9461
+ throw new Error(`Frontmatter is not defined in ${(0, import_node_path69.join)(this.relativeDirPath, this.dirName)}`);
9238
9462
  }
9239
9463
  const result = RulesyncSkillFrontmatterSchema.parse(this.mainFile.frontmatter);
9240
9464
  return result;
@@ -9260,8 +9484,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
9260
9484
  dirName,
9261
9485
  global = false
9262
9486
  }) {
9263
- const skillDirPath = (0, import_node_path68.join)(baseDir, relativeDirPath, dirName);
9264
- const skillFilePath = (0, import_node_path68.join)(skillDirPath, SKILL_FILE_NAME);
9487
+ const skillDirPath = (0, import_node_path69.join)(baseDir, relativeDirPath, dirName);
9488
+ const skillFilePath = (0, import_node_path69.join)(skillDirPath, SKILL_FILE_NAME);
9265
9489
  if (!await fileExists(skillFilePath)) {
9266
9490
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
9267
9491
  }
@@ -9291,14 +9515,14 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
9291
9515
  };
9292
9516
 
9293
9517
  // src/features/skills/rovodev-skill.ts
9294
- var RovodevSkillFrontmatterSchema = import_mini28.z.looseObject({
9295
- name: import_mini28.z.string(),
9296
- description: import_mini28.z.string()
9518
+ var RovodevSkillFrontmatterSchema = import_mini29.z.looseObject({
9519
+ name: import_mini29.z.string(),
9520
+ description: import_mini29.z.string()
9297
9521
  });
9298
9522
  var RovodevSkill = class _RovodevSkill extends ToolSkill {
9299
9523
  constructor({
9300
9524
  baseDir = process.cwd(),
9301
- relativeDirPath = (0, import_node_path69.join)(".rovodev", "skills"),
9525
+ relativeDirPath = (0, import_node_path70.join)(".rovodev", "skills"),
9302
9526
  dirName,
9303
9527
  frontmatter,
9304
9528
  body,
@@ -9327,8 +9551,8 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
9327
9551
  }
9328
9552
  static getSettablePaths(_options) {
9329
9553
  return {
9330
- relativeDirPath: (0, import_node_path69.join)(".rovodev", "skills"),
9331
- alternativeSkillRoots: [(0, import_node_path69.join)(".agents", "skills")]
9554
+ relativeDirPath: (0, import_node_path70.join)(".rovodev", "skills"),
9555
+ alternativeSkillRoots: [(0, import_node_path70.join)(".agents", "skills")]
9332
9556
  };
9333
9557
  }
9334
9558
  getFrontmatter() {
@@ -9416,13 +9640,13 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
9416
9640
  });
9417
9641
  const result = RovodevSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9418
9642
  if (!result.success) {
9419
- const skillDirPath = (0, import_node_path69.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9643
+ const skillDirPath = (0, import_node_path70.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9420
9644
  throw new Error(
9421
- `Invalid frontmatter in ${(0, import_node_path69.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9645
+ `Invalid frontmatter in ${(0, import_node_path70.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9422
9646
  );
9423
9647
  }
9424
9648
  if (result.data.name !== loaded.dirName) {
9425
- const skillFilePath = (0, import_node_path69.join)(
9649
+ const skillFilePath = (0, import_node_path70.join)(
9426
9650
  loaded.baseDir,
9427
9651
  loaded.relativeDirPath,
9428
9652
  loaded.dirName,
@@ -9464,11 +9688,11 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
9464
9688
  };
9465
9689
 
9466
9690
  // src/features/skills/skills-processor.ts
9467
- var import_node_path87 = require("path");
9468
- var import_mini44 = require("zod/mini");
9691
+ var import_node_path88 = require("path");
9692
+ var import_mini45 = require("zod/mini");
9469
9693
 
9470
9694
  // src/types/dir-feature-processor.ts
9471
- var import_node_path70 = require("path");
9695
+ var import_node_path71 = require("path");
9472
9696
  var DirFeatureProcessor = class {
9473
9697
  baseDir;
9474
9698
  dryRun;
@@ -9508,7 +9732,7 @@ var DirFeatureProcessor = class {
9508
9732
  const mainFile = aiDir.getMainFile();
9509
9733
  let mainFileContent;
9510
9734
  if (mainFile) {
9511
- const mainFilePath = (0, import_node_path70.join)(dirPath, mainFile.name);
9735
+ const mainFilePath = (0, import_node_path71.join)(dirPath, mainFile.name);
9512
9736
  const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter, {
9513
9737
  avoidBlockScalars: this.avoidBlockScalars
9514
9738
  });
@@ -9528,7 +9752,7 @@ var DirFeatureProcessor = class {
9528
9752
  const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
9529
9753
  otherFileContents.push(contentWithNewline);
9530
9754
  if (!dirHasChanges) {
9531
- const filePath = (0, import_node_path70.join)(dirPath, file.relativeFilePathToDirPath);
9755
+ const filePath = (0, import_node_path71.join)(dirPath, file.relativeFilePathToDirPath);
9532
9756
  const existingContent = await readFileContentOrNull(filePath);
9533
9757
  if (!fileContentsEquivalent({
9534
9758
  filePath,
@@ -9546,24 +9770,24 @@ var DirFeatureProcessor = class {
9546
9770
  if (this.dryRun) {
9547
9771
  this.logger.info(`[DRY RUN] Would create directory: ${dirPath}`);
9548
9772
  if (mainFile) {
9549
- this.logger.info(`[DRY RUN] Would write: ${(0, import_node_path70.join)(dirPath, mainFile.name)}`);
9550
- changedPaths.push((0, import_node_path70.join)(relativeDir, mainFile.name));
9773
+ this.logger.info(`[DRY RUN] Would write: ${(0, import_node_path71.join)(dirPath, mainFile.name)}`);
9774
+ changedPaths.push((0, import_node_path71.join)(relativeDir, mainFile.name));
9551
9775
  }
9552
9776
  for (const file of otherFiles) {
9553
9777
  this.logger.info(
9554
- `[DRY RUN] Would write: ${(0, import_node_path70.join)(dirPath, file.relativeFilePathToDirPath)}`
9778
+ `[DRY RUN] Would write: ${(0, import_node_path71.join)(dirPath, file.relativeFilePathToDirPath)}`
9555
9779
  );
9556
- changedPaths.push((0, import_node_path70.join)(relativeDir, file.relativeFilePathToDirPath));
9780
+ changedPaths.push((0, import_node_path71.join)(relativeDir, file.relativeFilePathToDirPath));
9557
9781
  }
9558
9782
  } else {
9559
9783
  await ensureDir(dirPath);
9560
9784
  if (mainFile && mainFileContent) {
9561
- const mainFilePath = (0, import_node_path70.join)(dirPath, mainFile.name);
9785
+ const mainFilePath = (0, import_node_path71.join)(dirPath, mainFile.name);
9562
9786
  await writeFileContent(mainFilePath, mainFileContent);
9563
- changedPaths.push((0, import_node_path70.join)(relativeDir, mainFile.name));
9787
+ changedPaths.push((0, import_node_path71.join)(relativeDir, mainFile.name));
9564
9788
  }
9565
9789
  for (const [i, file] of otherFiles.entries()) {
9566
- const filePath = (0, import_node_path70.join)(dirPath, file.relativeFilePathToDirPath);
9790
+ const filePath = (0, import_node_path71.join)(dirPath, file.relativeFilePathToDirPath);
9567
9791
  const content = otherFileContents[i];
9568
9792
  if (content === void 0) {
9569
9793
  throw new Error(
@@ -9571,7 +9795,7 @@ var DirFeatureProcessor = class {
9571
9795
  );
9572
9796
  }
9573
9797
  await writeFileContent(filePath, content);
9574
- changedPaths.push((0, import_node_path70.join)(relativeDir, file.relativeFilePathToDirPath));
9798
+ changedPaths.push((0, import_node_path71.join)(relativeDir, file.relativeFilePathToDirPath));
9575
9799
  }
9576
9800
  }
9577
9801
  changedCount++;
@@ -9603,16 +9827,16 @@ var DirFeatureProcessor = class {
9603
9827
  };
9604
9828
 
9605
9829
  // src/features/skills/agentsskills-skill.ts
9606
- var import_node_path71 = require("path");
9607
- var import_mini29 = require("zod/mini");
9608
- var AgentsSkillsSkillFrontmatterSchema = import_mini29.z.looseObject({
9609
- name: import_mini29.z.string(),
9610
- description: import_mini29.z.string()
9830
+ var import_node_path72 = require("path");
9831
+ var import_mini30 = require("zod/mini");
9832
+ var AgentsSkillsSkillFrontmatterSchema = import_mini30.z.looseObject({
9833
+ name: import_mini30.z.string(),
9834
+ description: import_mini30.z.string()
9611
9835
  });
9612
9836
  var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
9613
9837
  constructor({
9614
9838
  baseDir = process.cwd(),
9615
- relativeDirPath = (0, import_node_path71.join)(".agents", "skills"),
9839
+ relativeDirPath = (0, import_node_path72.join)(".agents", "skills"),
9616
9840
  dirName,
9617
9841
  frontmatter,
9618
9842
  body,
@@ -9644,7 +9868,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
9644
9868
  throw new Error("AgentsSkillsSkill does not support global mode.");
9645
9869
  }
9646
9870
  return {
9647
- relativeDirPath: (0, import_node_path71.join)(".agents", "skills")
9871
+ relativeDirPath: (0, import_node_path72.join)(".agents", "skills")
9648
9872
  };
9649
9873
  }
9650
9874
  getFrontmatter() {
@@ -9724,9 +9948,9 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
9724
9948
  });
9725
9949
  const result = AgentsSkillsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9726
9950
  if (!result.success) {
9727
- const skillDirPath = (0, import_node_path71.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9951
+ const skillDirPath = (0, import_node_path72.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9728
9952
  throw new Error(
9729
- `Invalid frontmatter in ${(0, import_node_path71.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9953
+ `Invalid frontmatter in ${(0, import_node_path72.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9730
9954
  );
9731
9955
  }
9732
9956
  return new _AgentsSkillsSkill({
@@ -9761,16 +9985,16 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
9761
9985
  };
9762
9986
 
9763
9987
  // src/features/skills/antigravity-skill.ts
9764
- var import_node_path72 = require("path");
9765
- var import_mini30 = require("zod/mini");
9766
- var AntigravitySkillFrontmatterSchema = import_mini30.z.looseObject({
9767
- name: import_mini30.z.string(),
9768
- description: import_mini30.z.string()
9988
+ var import_node_path73 = require("path");
9989
+ var import_mini31 = require("zod/mini");
9990
+ var AntigravitySkillFrontmatterSchema = import_mini31.z.looseObject({
9991
+ name: import_mini31.z.string(),
9992
+ description: import_mini31.z.string()
9769
9993
  });
9770
9994
  var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
9771
9995
  constructor({
9772
9996
  baseDir = process.cwd(),
9773
- relativeDirPath = (0, import_node_path72.join)(".agent", "skills"),
9997
+ relativeDirPath = (0, import_node_path73.join)(".agent", "skills"),
9774
9998
  dirName,
9775
9999
  frontmatter,
9776
10000
  body,
@@ -9802,11 +10026,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
9802
10026
  } = {}) {
9803
10027
  if (global) {
9804
10028
  return {
9805
- relativeDirPath: (0, import_node_path72.join)(".gemini", "antigravity", "skills")
10029
+ relativeDirPath: (0, import_node_path73.join)(".gemini", "antigravity", "skills")
9806
10030
  };
9807
10031
  }
9808
10032
  return {
9809
- relativeDirPath: (0, import_node_path72.join)(".agent", "skills")
10033
+ relativeDirPath: (0, import_node_path73.join)(".agent", "skills")
9810
10034
  };
9811
10035
  }
9812
10036
  getFrontmatter() {
@@ -9886,9 +10110,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
9886
10110
  });
9887
10111
  const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
9888
10112
  if (!result.success) {
9889
- const skillDirPath = (0, import_node_path72.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10113
+ const skillDirPath = (0, import_node_path73.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9890
10114
  throw new Error(
9891
- `Invalid frontmatter in ${(0, import_node_path72.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10115
+ `Invalid frontmatter in ${(0, import_node_path73.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9892
10116
  );
9893
10117
  }
9894
10118
  return new _AntigravitySkill({
@@ -9922,19 +10146,19 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
9922
10146
  };
9923
10147
 
9924
10148
  // src/features/skills/claudecode-skill.ts
9925
- var import_node_path73 = require("path");
9926
- var import_mini31 = require("zod/mini");
9927
- var ClaudecodeSkillFrontmatterSchema = import_mini31.z.looseObject({
9928
- name: import_mini31.z.string(),
9929
- description: import_mini31.z.string(),
9930
- "allowed-tools": import_mini31.z.optional(import_mini31.z.array(import_mini31.z.string())),
9931
- model: import_mini31.z.optional(import_mini31.z.string()),
9932
- "disable-model-invocation": import_mini31.z.optional(import_mini31.z.boolean())
10149
+ var import_node_path74 = require("path");
10150
+ var import_mini32 = require("zod/mini");
10151
+ var ClaudecodeSkillFrontmatterSchema = import_mini32.z.looseObject({
10152
+ name: import_mini32.z.string(),
10153
+ description: import_mini32.z.string(),
10154
+ "allowed-tools": import_mini32.z.optional(import_mini32.z.array(import_mini32.z.string())),
10155
+ model: import_mini32.z.optional(import_mini32.z.string()),
10156
+ "disable-model-invocation": import_mini32.z.optional(import_mini32.z.boolean())
9933
10157
  });
9934
10158
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
9935
10159
  constructor({
9936
10160
  baseDir = process.cwd(),
9937
- relativeDirPath = (0, import_node_path73.join)(".claude", "skills"),
10161
+ relativeDirPath = (0, import_node_path74.join)(".claude", "skills"),
9938
10162
  dirName,
9939
10163
  frontmatter,
9940
10164
  body,
@@ -9965,7 +10189,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
9965
10189
  global: _global = false
9966
10190
  } = {}) {
9967
10191
  return {
9968
- relativeDirPath: (0, import_node_path73.join)(".claude", "skills")
10192
+ relativeDirPath: (0, import_node_path74.join)(".claude", "skills")
9969
10193
  };
9970
10194
  }
9971
10195
  getFrontmatter() {
@@ -10062,9 +10286,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
10062
10286
  });
10063
10287
  const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10064
10288
  if (!result.success) {
10065
- const skillDirPath = (0, import_node_path73.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10289
+ const skillDirPath = (0, import_node_path74.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10066
10290
  throw new Error(
10067
- `Invalid frontmatter in ${(0, import_node_path73.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10291
+ `Invalid frontmatter in ${(0, import_node_path74.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10068
10292
  );
10069
10293
  }
10070
10294
  return new _ClaudecodeSkill({
@@ -10098,16 +10322,16 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
10098
10322
  };
10099
10323
 
10100
10324
  // src/features/skills/cline-skill.ts
10101
- var import_node_path74 = require("path");
10102
- var import_mini32 = require("zod/mini");
10103
- var ClineSkillFrontmatterSchema = import_mini32.z.looseObject({
10104
- name: import_mini32.z.string(),
10105
- description: import_mini32.z.string()
10325
+ var import_node_path75 = require("path");
10326
+ var import_mini33 = require("zod/mini");
10327
+ var ClineSkillFrontmatterSchema = import_mini33.z.looseObject({
10328
+ name: import_mini33.z.string(),
10329
+ description: import_mini33.z.string()
10106
10330
  });
10107
10331
  var ClineSkill = class _ClineSkill extends ToolSkill {
10108
10332
  constructor({
10109
10333
  baseDir = process.cwd(),
10110
- relativeDirPath = (0, import_node_path74.join)(".cline", "skills"),
10334
+ relativeDirPath = (0, import_node_path75.join)(".cline", "skills"),
10111
10335
  dirName,
10112
10336
  frontmatter,
10113
10337
  body,
@@ -10136,7 +10360,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
10136
10360
  }
10137
10361
  static getSettablePaths(_options = {}) {
10138
10362
  return {
10139
- relativeDirPath: (0, import_node_path74.join)(".cline", "skills")
10363
+ relativeDirPath: (0, import_node_path75.join)(".cline", "skills")
10140
10364
  };
10141
10365
  }
10142
10366
  getFrontmatter() {
@@ -10224,13 +10448,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
10224
10448
  });
10225
10449
  const result = ClineSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10226
10450
  if (!result.success) {
10227
- const skillDirPath = (0, import_node_path74.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10451
+ const skillDirPath = (0, import_node_path75.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10228
10452
  throw new Error(
10229
- `Invalid frontmatter in ${(0, import_node_path74.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10453
+ `Invalid frontmatter in ${(0, import_node_path75.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10230
10454
  );
10231
10455
  }
10232
10456
  if (result.data.name !== loaded.dirName) {
10233
- const skillFilePath = (0, import_node_path74.join)(
10457
+ const skillFilePath = (0, import_node_path75.join)(
10234
10458
  loaded.baseDir,
10235
10459
  loaded.relativeDirPath,
10236
10460
  loaded.dirName,
@@ -10271,21 +10495,21 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
10271
10495
  };
10272
10496
 
10273
10497
  // src/features/skills/codexcli-skill.ts
10274
- var import_node_path75 = require("path");
10275
- var import_mini33 = require("zod/mini");
10276
- var CodexCliSkillFrontmatterSchema = import_mini33.z.looseObject({
10277
- name: import_mini33.z.string(),
10278
- description: import_mini33.z.string(),
10279
- metadata: import_mini33.z.optional(
10280
- import_mini33.z.looseObject({
10281
- "short-description": import_mini33.z.optional(import_mini33.z.string())
10498
+ var import_node_path76 = require("path");
10499
+ var import_mini34 = require("zod/mini");
10500
+ var CodexCliSkillFrontmatterSchema = import_mini34.z.looseObject({
10501
+ name: import_mini34.z.string(),
10502
+ description: import_mini34.z.string(),
10503
+ metadata: import_mini34.z.optional(
10504
+ import_mini34.z.looseObject({
10505
+ "short-description": import_mini34.z.optional(import_mini34.z.string())
10282
10506
  })
10283
10507
  )
10284
10508
  });
10285
10509
  var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
10286
10510
  constructor({
10287
10511
  baseDir = process.cwd(),
10288
- relativeDirPath = (0, import_node_path75.join)(".codex", "skills"),
10512
+ relativeDirPath = (0, import_node_path76.join)(".codex", "skills"),
10289
10513
  dirName,
10290
10514
  frontmatter,
10291
10515
  body,
@@ -10316,7 +10540,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
10316
10540
  global: _global = false
10317
10541
  } = {}) {
10318
10542
  return {
10319
- relativeDirPath: (0, import_node_path75.join)(".codex", "skills")
10543
+ relativeDirPath: (0, import_node_path76.join)(".codex", "skills")
10320
10544
  };
10321
10545
  }
10322
10546
  getFrontmatter() {
@@ -10406,9 +10630,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
10406
10630
  });
10407
10631
  const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10408
10632
  if (!result.success) {
10409
- const skillDirPath = (0, import_node_path75.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10633
+ const skillDirPath = (0, import_node_path76.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10410
10634
  throw new Error(
10411
- `Invalid frontmatter in ${(0, import_node_path75.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10635
+ `Invalid frontmatter in ${(0, import_node_path76.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10412
10636
  );
10413
10637
  }
10414
10638
  return new _CodexCliSkill({
@@ -10442,17 +10666,17 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
10442
10666
  };
10443
10667
 
10444
10668
  // src/features/skills/copilot-skill.ts
10445
- var import_node_path76 = require("path");
10446
- var import_mini34 = require("zod/mini");
10447
- var CopilotSkillFrontmatterSchema = import_mini34.z.looseObject({
10448
- name: import_mini34.z.string(),
10449
- description: import_mini34.z.string(),
10450
- license: import_mini34.z.optional(import_mini34.z.string())
10669
+ var import_node_path77 = require("path");
10670
+ var import_mini35 = require("zod/mini");
10671
+ var CopilotSkillFrontmatterSchema = import_mini35.z.looseObject({
10672
+ name: import_mini35.z.string(),
10673
+ description: import_mini35.z.string(),
10674
+ license: import_mini35.z.optional(import_mini35.z.string())
10451
10675
  });
10452
10676
  var CopilotSkill = class _CopilotSkill extends ToolSkill {
10453
10677
  constructor({
10454
10678
  baseDir = process.cwd(),
10455
- relativeDirPath = (0, import_node_path76.join)(".github", "skills"),
10679
+ relativeDirPath = (0, import_node_path77.join)(".github", "skills"),
10456
10680
  dirName,
10457
10681
  frontmatter,
10458
10682
  body,
@@ -10484,7 +10708,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
10484
10708
  throw new Error("CopilotSkill does not support global mode.");
10485
10709
  }
10486
10710
  return {
10487
- relativeDirPath: (0, import_node_path76.join)(".github", "skills")
10711
+ relativeDirPath: (0, import_node_path77.join)(".github", "skills")
10488
10712
  };
10489
10713
  }
10490
10714
  getFrontmatter() {
@@ -10570,9 +10794,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
10570
10794
  });
10571
10795
  const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10572
10796
  if (!result.success) {
10573
- const skillDirPath = (0, import_node_path76.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10797
+ const skillDirPath = (0, import_node_path77.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10574
10798
  throw new Error(
10575
- `Invalid frontmatter in ${(0, import_node_path76.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10799
+ `Invalid frontmatter in ${(0, import_node_path77.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10576
10800
  );
10577
10801
  }
10578
10802
  return new _CopilotSkill({
@@ -10607,16 +10831,16 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
10607
10831
  };
10608
10832
 
10609
10833
  // src/features/skills/cursor-skill.ts
10610
- var import_node_path77 = require("path");
10611
- var import_mini35 = require("zod/mini");
10612
- var CursorSkillFrontmatterSchema = import_mini35.z.looseObject({
10613
- name: import_mini35.z.string(),
10614
- description: import_mini35.z.string()
10834
+ var import_node_path78 = require("path");
10835
+ var import_mini36 = require("zod/mini");
10836
+ var CursorSkillFrontmatterSchema = import_mini36.z.looseObject({
10837
+ name: import_mini36.z.string(),
10838
+ description: import_mini36.z.string()
10615
10839
  });
10616
10840
  var CursorSkill = class _CursorSkill extends ToolSkill {
10617
10841
  constructor({
10618
10842
  baseDir = process.cwd(),
10619
- relativeDirPath = (0, import_node_path77.join)(".cursor", "skills"),
10843
+ relativeDirPath = (0, import_node_path78.join)(".cursor", "skills"),
10620
10844
  dirName,
10621
10845
  frontmatter,
10622
10846
  body,
@@ -10645,7 +10869,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
10645
10869
  }
10646
10870
  static getSettablePaths(_options) {
10647
10871
  return {
10648
- relativeDirPath: (0, import_node_path77.join)(".cursor", "skills")
10872
+ relativeDirPath: (0, import_node_path78.join)(".cursor", "skills")
10649
10873
  };
10650
10874
  }
10651
10875
  getFrontmatter() {
@@ -10725,9 +10949,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
10725
10949
  });
10726
10950
  const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10727
10951
  if (!result.success) {
10728
- const skillDirPath = (0, import_node_path77.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10952
+ const skillDirPath = (0, import_node_path78.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10729
10953
  throw new Error(
10730
- `Invalid frontmatter in ${(0, import_node_path77.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10954
+ `Invalid frontmatter in ${(0, import_node_path78.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10731
10955
  );
10732
10956
  }
10733
10957
  return new _CursorSkill({
@@ -10762,17 +10986,17 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
10762
10986
  };
10763
10987
 
10764
10988
  // src/features/skills/deepagents-skill.ts
10765
- var import_node_path78 = require("path");
10766
- var import_mini36 = require("zod/mini");
10767
- var DeepagentsSkillFrontmatterSchema = import_mini36.z.looseObject({
10768
- name: import_mini36.z.string(),
10769
- description: import_mini36.z.string(),
10770
- "allowed-tools": import_mini36.z.optional(import_mini36.z.array(import_mini36.z.string()))
10989
+ var import_node_path79 = require("path");
10990
+ var import_mini37 = require("zod/mini");
10991
+ var DeepagentsSkillFrontmatterSchema = import_mini37.z.looseObject({
10992
+ name: import_mini37.z.string(),
10993
+ description: import_mini37.z.string(),
10994
+ "allowed-tools": import_mini37.z.optional(import_mini37.z.array(import_mini37.z.string()))
10771
10995
  });
10772
10996
  var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
10773
10997
  constructor({
10774
10998
  baseDir = process.cwd(),
10775
- relativeDirPath = (0, import_node_path78.join)(".deepagents", "skills"),
10999
+ relativeDirPath = (0, import_node_path79.join)(".deepagents", "skills"),
10776
11000
  dirName,
10777
11001
  frontmatter,
10778
11002
  body,
@@ -10801,7 +11025,7 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
10801
11025
  }
10802
11026
  static getSettablePaths(_options) {
10803
11027
  return {
10804
- relativeDirPath: (0, import_node_path78.join)(".deepagents", "skills")
11028
+ relativeDirPath: (0, import_node_path79.join)(".deepagents", "skills")
10805
11029
  };
10806
11030
  }
10807
11031
  getFrontmatter() {
@@ -10887,9 +11111,9 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
10887
11111
  });
10888
11112
  const result = DeepagentsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10889
11113
  if (!result.success) {
10890
- const skillDirPath = (0, import_node_path78.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11114
+ const skillDirPath = (0, import_node_path79.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10891
11115
  throw new Error(
10892
- `Invalid frontmatter in ${(0, import_node_path78.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11116
+ `Invalid frontmatter in ${(0, import_node_path79.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10893
11117
  );
10894
11118
  }
10895
11119
  return new _DeepagentsSkill({
@@ -10924,11 +11148,11 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
10924
11148
  };
10925
11149
 
10926
11150
  // src/features/skills/geminicli-skill.ts
10927
- var import_node_path79 = require("path");
10928
- var import_mini37 = require("zod/mini");
10929
- var GeminiCliSkillFrontmatterSchema = import_mini37.z.looseObject({
10930
- name: import_mini37.z.string(),
10931
- description: import_mini37.z.string()
11151
+ var import_node_path80 = require("path");
11152
+ var import_mini38 = require("zod/mini");
11153
+ var GeminiCliSkillFrontmatterSchema = import_mini38.z.looseObject({
11154
+ name: import_mini38.z.string(),
11155
+ description: import_mini38.z.string()
10932
11156
  });
10933
11157
  var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
10934
11158
  constructor({
@@ -10964,7 +11188,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
10964
11188
  global: _global = false
10965
11189
  } = {}) {
10966
11190
  return {
10967
- relativeDirPath: (0, import_node_path79.join)(".gemini", "skills")
11191
+ relativeDirPath: (0, import_node_path80.join)(".gemini", "skills")
10968
11192
  };
10969
11193
  }
10970
11194
  getFrontmatter() {
@@ -11044,9 +11268,9 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
11044
11268
  });
11045
11269
  const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11046
11270
  if (!result.success) {
11047
- const skillDirPath = (0, import_node_path79.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11271
+ const skillDirPath = (0, import_node_path80.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11048
11272
  throw new Error(
11049
- `Invalid frontmatter in ${(0, import_node_path79.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11273
+ `Invalid frontmatter in ${(0, import_node_path80.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11050
11274
  );
11051
11275
  }
11052
11276
  return new _GeminiCliSkill({
@@ -11081,16 +11305,16 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
11081
11305
  };
11082
11306
 
11083
11307
  // src/features/skills/junie-skill.ts
11084
- var import_node_path80 = require("path");
11085
- var import_mini38 = require("zod/mini");
11086
- var JunieSkillFrontmatterSchema = import_mini38.z.looseObject({
11087
- name: import_mini38.z.string(),
11088
- description: import_mini38.z.string()
11308
+ var import_node_path81 = require("path");
11309
+ var import_mini39 = require("zod/mini");
11310
+ var JunieSkillFrontmatterSchema = import_mini39.z.looseObject({
11311
+ name: import_mini39.z.string(),
11312
+ description: import_mini39.z.string()
11089
11313
  });
11090
11314
  var JunieSkill = class _JunieSkill extends ToolSkill {
11091
11315
  constructor({
11092
11316
  baseDir = process.cwd(),
11093
- relativeDirPath = (0, import_node_path80.join)(".junie", "skills"),
11317
+ relativeDirPath = (0, import_node_path81.join)(".junie", "skills"),
11094
11318
  dirName,
11095
11319
  frontmatter,
11096
11320
  body,
@@ -11122,7 +11346,7 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
11122
11346
  throw new Error("JunieSkill does not support global mode.");
11123
11347
  }
11124
11348
  return {
11125
- relativeDirPath: (0, import_node_path80.join)(".junie", "skills")
11349
+ relativeDirPath: (0, import_node_path81.join)(".junie", "skills")
11126
11350
  };
11127
11351
  }
11128
11352
  getFrontmatter() {
@@ -11209,13 +11433,13 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
11209
11433
  });
11210
11434
  const result = JunieSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11211
11435
  if (!result.success) {
11212
- const skillDirPath = (0, import_node_path80.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11436
+ const skillDirPath = (0, import_node_path81.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11213
11437
  throw new Error(
11214
- `Invalid frontmatter in ${(0, import_node_path80.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11438
+ `Invalid frontmatter in ${(0, import_node_path81.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11215
11439
  );
11216
11440
  }
11217
11441
  if (result.data.name !== loaded.dirName) {
11218
- const skillFilePath = (0, import_node_path80.join)(
11442
+ const skillFilePath = (0, import_node_path81.join)(
11219
11443
  loaded.baseDir,
11220
11444
  loaded.relativeDirPath,
11221
11445
  loaded.dirName,
@@ -11257,17 +11481,17 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
11257
11481
  };
11258
11482
 
11259
11483
  // src/features/skills/kilo-skill.ts
11260
- var import_node_path81 = require("path");
11261
- var import_mini39 = require("zod/mini");
11262
- var KiloSkillFrontmatterSchema = import_mini39.z.looseObject({
11263
- name: import_mini39.z.string(),
11264
- description: import_mini39.z.string(),
11265
- "allowed-tools": import_mini39.z.optional(import_mini39.z.array(import_mini39.z.string()))
11484
+ var import_node_path82 = require("path");
11485
+ var import_mini40 = require("zod/mini");
11486
+ var KiloSkillFrontmatterSchema = import_mini40.z.looseObject({
11487
+ name: import_mini40.z.string(),
11488
+ description: import_mini40.z.string(),
11489
+ "allowed-tools": import_mini40.z.optional(import_mini40.z.array(import_mini40.z.string()))
11266
11490
  });
11267
11491
  var KiloSkill = class _KiloSkill extends ToolSkill {
11268
11492
  constructor({
11269
11493
  baseDir = process.cwd(),
11270
- relativeDirPath = (0, import_node_path81.join)(".kilo", "skills"),
11494
+ relativeDirPath = (0, import_node_path82.join)(".kilo", "skills"),
11271
11495
  dirName,
11272
11496
  frontmatter,
11273
11497
  body,
@@ -11296,7 +11520,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
11296
11520
  }
11297
11521
  static getSettablePaths({ global = false } = {}) {
11298
11522
  return {
11299
- relativeDirPath: global ? (0, import_node_path81.join)(".config", "kilo", "skills") : (0, import_node_path81.join)(".kilo", "skills")
11523
+ relativeDirPath: global ? (0, import_node_path82.join)(".config", "kilo", "skills") : (0, import_node_path82.join)(".kilo", "skills")
11300
11524
  };
11301
11525
  }
11302
11526
  getFrontmatter() {
@@ -11382,9 +11606,9 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
11382
11606
  });
11383
11607
  const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11384
11608
  if (!result.success) {
11385
- const skillDirPath = (0, import_node_path81.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11609
+ const skillDirPath = (0, import_node_path82.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11386
11610
  throw new Error(
11387
- `Invalid frontmatter in ${(0, import_node_path81.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11611
+ `Invalid frontmatter in ${(0, import_node_path82.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11388
11612
  );
11389
11613
  }
11390
11614
  return new _KiloSkill({
@@ -11418,16 +11642,16 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
11418
11642
  };
11419
11643
 
11420
11644
  // src/features/skills/kiro-skill.ts
11421
- var import_node_path82 = require("path");
11422
- var import_mini40 = require("zod/mini");
11423
- var KiroSkillFrontmatterSchema = import_mini40.z.looseObject({
11424
- name: import_mini40.z.string(),
11425
- description: import_mini40.z.string()
11645
+ var import_node_path83 = require("path");
11646
+ var import_mini41 = require("zod/mini");
11647
+ var KiroSkillFrontmatterSchema = import_mini41.z.looseObject({
11648
+ name: import_mini41.z.string(),
11649
+ description: import_mini41.z.string()
11426
11650
  });
11427
11651
  var KiroSkill = class _KiroSkill extends ToolSkill {
11428
11652
  constructor({
11429
11653
  baseDir = process.cwd(),
11430
- relativeDirPath = (0, import_node_path82.join)(".kiro", "skills"),
11654
+ relativeDirPath = (0, import_node_path83.join)(".kiro", "skills"),
11431
11655
  dirName,
11432
11656
  frontmatter,
11433
11657
  body,
@@ -11459,7 +11683,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
11459
11683
  throw new Error("KiroSkill does not support global mode.");
11460
11684
  }
11461
11685
  return {
11462
- relativeDirPath: (0, import_node_path82.join)(".kiro", "skills")
11686
+ relativeDirPath: (0, import_node_path83.join)(".kiro", "skills")
11463
11687
  };
11464
11688
  }
11465
11689
  getFrontmatter() {
@@ -11547,13 +11771,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
11547
11771
  });
11548
11772
  const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11549
11773
  if (!result.success) {
11550
- const skillDirPath = (0, import_node_path82.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11774
+ const skillDirPath = (0, import_node_path83.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11551
11775
  throw new Error(
11552
- `Invalid frontmatter in ${(0, import_node_path82.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11776
+ `Invalid frontmatter in ${(0, import_node_path83.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11553
11777
  );
11554
11778
  }
11555
11779
  if (result.data.name !== loaded.dirName) {
11556
- const skillFilePath = (0, import_node_path82.join)(
11780
+ const skillFilePath = (0, import_node_path83.join)(
11557
11781
  loaded.baseDir,
11558
11782
  loaded.relativeDirPath,
11559
11783
  loaded.dirName,
@@ -11595,17 +11819,17 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
11595
11819
  };
11596
11820
 
11597
11821
  // src/features/skills/opencode-skill.ts
11598
- var import_node_path83 = require("path");
11599
- var import_mini41 = require("zod/mini");
11600
- var OpenCodeSkillFrontmatterSchema = import_mini41.z.looseObject({
11601
- name: import_mini41.z.string(),
11602
- description: import_mini41.z.string(),
11603
- "allowed-tools": import_mini41.z.optional(import_mini41.z.array(import_mini41.z.string()))
11822
+ var import_node_path84 = require("path");
11823
+ var import_mini42 = require("zod/mini");
11824
+ var OpenCodeSkillFrontmatterSchema = import_mini42.z.looseObject({
11825
+ name: import_mini42.z.string(),
11826
+ description: import_mini42.z.string(),
11827
+ "allowed-tools": import_mini42.z.optional(import_mini42.z.array(import_mini42.z.string()))
11604
11828
  });
11605
11829
  var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
11606
11830
  constructor({
11607
11831
  baseDir = process.cwd(),
11608
- relativeDirPath = (0, import_node_path83.join)(".opencode", "skill"),
11832
+ relativeDirPath = (0, import_node_path84.join)(".opencode", "skill"),
11609
11833
  dirName,
11610
11834
  frontmatter,
11611
11835
  body,
@@ -11634,7 +11858,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
11634
11858
  }
11635
11859
  static getSettablePaths({ global = false } = {}) {
11636
11860
  return {
11637
- relativeDirPath: global ? (0, import_node_path83.join)(".config", "opencode", "skill") : (0, import_node_path83.join)(".opencode", "skill")
11861
+ relativeDirPath: global ? (0, import_node_path84.join)(".config", "opencode", "skill") : (0, import_node_path84.join)(".opencode", "skill")
11638
11862
  };
11639
11863
  }
11640
11864
  getFrontmatter() {
@@ -11720,9 +11944,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
11720
11944
  });
11721
11945
  const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11722
11946
  if (!result.success) {
11723
- const skillDirPath = (0, import_node_path83.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11947
+ const skillDirPath = (0, import_node_path84.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11724
11948
  throw new Error(
11725
- `Invalid frontmatter in ${(0, import_node_path83.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11949
+ `Invalid frontmatter in ${(0, import_node_path84.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11726
11950
  );
11727
11951
  }
11728
11952
  return new _OpenCodeSkill({
@@ -11756,16 +11980,16 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
11756
11980
  };
11757
11981
 
11758
11982
  // src/features/skills/replit-skill.ts
11759
- var import_node_path84 = require("path");
11760
- var import_mini42 = require("zod/mini");
11761
- var ReplitSkillFrontmatterSchema = import_mini42.z.looseObject({
11762
- name: import_mini42.z.string(),
11763
- description: import_mini42.z.string()
11983
+ var import_node_path85 = require("path");
11984
+ var import_mini43 = require("zod/mini");
11985
+ var ReplitSkillFrontmatterSchema = import_mini43.z.looseObject({
11986
+ name: import_mini43.z.string(),
11987
+ description: import_mini43.z.string()
11764
11988
  });
11765
11989
  var ReplitSkill = class _ReplitSkill extends ToolSkill {
11766
11990
  constructor({
11767
11991
  baseDir = process.cwd(),
11768
- relativeDirPath = (0, import_node_path84.join)(".agents", "skills"),
11992
+ relativeDirPath = (0, import_node_path85.join)(".agents", "skills"),
11769
11993
  dirName,
11770
11994
  frontmatter,
11771
11995
  body,
@@ -11797,7 +12021,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
11797
12021
  throw new Error("ReplitSkill does not support global mode.");
11798
12022
  }
11799
12023
  return {
11800
- relativeDirPath: (0, import_node_path84.join)(".agents", "skills")
12024
+ relativeDirPath: (0, import_node_path85.join)(".agents", "skills")
11801
12025
  };
11802
12026
  }
11803
12027
  getFrontmatter() {
@@ -11877,9 +12101,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
11877
12101
  });
11878
12102
  const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11879
12103
  if (!result.success) {
11880
- const skillDirPath = (0, import_node_path84.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12104
+ const skillDirPath = (0, import_node_path85.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11881
12105
  throw new Error(
11882
- `Invalid frontmatter in ${(0, import_node_path84.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12106
+ `Invalid frontmatter in ${(0, import_node_path85.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11883
12107
  );
11884
12108
  }
11885
12109
  return new _ReplitSkill({
@@ -11914,16 +12138,16 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
11914
12138
  };
11915
12139
 
11916
12140
  // src/features/skills/roo-skill.ts
11917
- var import_node_path85 = require("path");
11918
- var import_mini43 = require("zod/mini");
11919
- var RooSkillFrontmatterSchema = import_mini43.z.looseObject({
11920
- name: import_mini43.z.string(),
11921
- description: import_mini43.z.string()
12141
+ var import_node_path86 = require("path");
12142
+ var import_mini44 = require("zod/mini");
12143
+ var RooSkillFrontmatterSchema = import_mini44.z.looseObject({
12144
+ name: import_mini44.z.string(),
12145
+ description: import_mini44.z.string()
11922
12146
  });
11923
12147
  var RooSkill = class _RooSkill extends ToolSkill {
11924
12148
  constructor({
11925
12149
  baseDir = process.cwd(),
11926
- relativeDirPath = (0, import_node_path85.join)(".roo", "skills"),
12150
+ relativeDirPath = (0, import_node_path86.join)(".roo", "skills"),
11927
12151
  dirName,
11928
12152
  frontmatter,
11929
12153
  body,
@@ -11954,7 +12178,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
11954
12178
  global: _global = false
11955
12179
  } = {}) {
11956
12180
  return {
11957
- relativeDirPath: (0, import_node_path85.join)(".roo", "skills")
12181
+ relativeDirPath: (0, import_node_path86.join)(".roo", "skills")
11958
12182
  };
11959
12183
  }
11960
12184
  getFrontmatter() {
@@ -12042,13 +12266,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
12042
12266
  });
12043
12267
  const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12044
12268
  if (!result.success) {
12045
- const skillDirPath = (0, import_node_path85.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12269
+ const skillDirPath = (0, import_node_path86.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12046
12270
  throw new Error(
12047
- `Invalid frontmatter in ${(0, import_node_path85.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12271
+ `Invalid frontmatter in ${(0, import_node_path86.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12048
12272
  );
12049
12273
  }
12050
12274
  if (result.data.name !== loaded.dirName) {
12051
- const skillFilePath = (0, import_node_path85.join)(
12275
+ const skillFilePath = (0, import_node_path86.join)(
12052
12276
  loaded.baseDir,
12053
12277
  loaded.relativeDirPath,
12054
12278
  loaded.dirName,
@@ -12089,17 +12313,17 @@ var RooSkill = class _RooSkill extends ToolSkill {
12089
12313
  };
12090
12314
 
12091
12315
  // src/features/skills/skills-utils.ts
12092
- var import_node_path86 = require("path");
12316
+ var import_node_path87 = require("path");
12093
12317
  async function getLocalSkillDirNames(baseDir) {
12094
- const skillsDir = (0, import_node_path86.join)(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
12318
+ const skillsDir = (0, import_node_path87.join)(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
12095
12319
  const names = /* @__PURE__ */ new Set();
12096
12320
  if (!await directoryExists(skillsDir)) {
12097
12321
  return names;
12098
12322
  }
12099
- const dirPaths = await findFilesByGlobs((0, import_node_path86.join)(skillsDir, "*"), { type: "dir" });
12323
+ const dirPaths = await findFilesByGlobs((0, import_node_path87.join)(skillsDir, "*"), { type: "dir" });
12100
12324
  for (const dirPath of dirPaths) {
12101
- const name = (0, import_node_path86.basename)(dirPath);
12102
- if (name === (0, import_node_path86.basename)(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
12325
+ const name = (0, import_node_path87.basename)(dirPath);
12326
+ if (name === (0, import_node_path87.basename)(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
12103
12327
  names.add(name);
12104
12328
  }
12105
12329
  return names;
@@ -12127,7 +12351,7 @@ var skillsProcessorToolTargetTuple = [
12127
12351
  "roo",
12128
12352
  "rovodev"
12129
12353
  ];
12130
- var SkillsProcessorToolTargetSchema = import_mini44.z.enum(skillsProcessorToolTargetTuple);
12354
+ var SkillsProcessorToolTargetSchema = import_mini45.z.enum(skillsProcessorToolTargetTuple);
12131
12355
  var toolSkillFactories = /* @__PURE__ */ new Map([
12132
12356
  [
12133
12357
  "agentsmd",
@@ -12351,11 +12575,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
12351
12575
  )
12352
12576
  );
12353
12577
  const localSkillNames = new Set(localDirNames);
12354
- const curatedDirPath = (0, import_node_path87.join)(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
12578
+ const curatedDirPath = (0, import_node_path88.join)(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
12355
12579
  let curatedSkills = [];
12356
12580
  if (await directoryExists(curatedDirPath)) {
12357
- const curatedDirPaths = await findFilesByGlobs((0, import_node_path87.join)(curatedDirPath, "*"), { type: "dir" });
12358
- const curatedDirNames = curatedDirPaths.map((path3) => (0, import_node_path87.basename)(path3));
12581
+ const curatedDirPaths = await findFilesByGlobs((0, import_node_path88.join)(curatedDirPath, "*"), { type: "dir" });
12582
+ const curatedDirNames = curatedDirPaths.map((path3) => (0, import_node_path88.basename)(path3));
12359
12583
  const nonConflicting = curatedDirNames.filter((name) => {
12360
12584
  if (localSkillNames.has(name)) {
12361
12585
  this.logger.debug(`Skipping curated skill "${name}": local skill takes precedence.`);
@@ -12392,13 +12616,13 @@ var SkillsProcessor = class extends DirFeatureProcessor {
12392
12616
  const seenDirNames = /* @__PURE__ */ new Set();
12393
12617
  const loadEntries = [];
12394
12618
  for (const root of roots) {
12395
- const skillsDirPath = (0, import_node_path87.join)(this.baseDir, root);
12619
+ const skillsDirPath = (0, import_node_path88.join)(this.baseDir, root);
12396
12620
  if (!await directoryExists(skillsDirPath)) {
12397
12621
  continue;
12398
12622
  }
12399
- const dirPaths = await findFilesByGlobs((0, import_node_path87.join)(skillsDirPath, "*"), { type: "dir" });
12623
+ const dirPaths = await findFilesByGlobs((0, import_node_path88.join)(skillsDirPath, "*"), { type: "dir" });
12400
12624
  for (const dirPath of dirPaths) {
12401
- const dirName = (0, import_node_path87.basename)(dirPath);
12625
+ const dirName = (0, import_node_path88.basename)(dirPath);
12402
12626
  if (seenDirNames.has(dirName)) {
12403
12627
  continue;
12404
12628
  }
@@ -12427,21 +12651,20 @@ var SkillsProcessor = class extends DirFeatureProcessor {
12427
12651
  const roots = toolSkillSearchRoots(paths);
12428
12652
  const toolSkills = [];
12429
12653
  for (const root of roots) {
12430
- const skillsDirPath = (0, import_node_path87.join)(this.baseDir, root);
12654
+ const skillsDirPath = (0, import_node_path88.join)(this.baseDir, root);
12431
12655
  if (!await directoryExists(skillsDirPath)) {
12432
- continue;
12433
- }
12434
- const dirPaths = await findFilesByGlobs((0, import_node_path87.join)(skillsDirPath, "*"), { type: "dir" });
12435
- for (const dirPath of dirPaths) {
12436
- const dirName = (0, import_node_path87.basename)(dirPath);
12437
- toolSkills.push(
12438
- factory.class.forDeletion({
12439
- baseDir: this.baseDir,
12440
- relativeDirPath: root,
12441
- dirName,
12442
- global: this.global
12443
- })
12444
- );
12656
+ continue;
12657
+ }
12658
+ const dirPaths = await findFilesByGlobs((0, import_node_path88.join)(skillsDirPath, "*"), { type: "dir" });
12659
+ for (const dirPath of dirPaths) {
12660
+ const dirName = (0, import_node_path88.basename)(dirPath);
12661
+ const toolSkill = factory.class.forDeletion({
12662
+ baseDir: this.baseDir,
12663
+ relativeDirPath: root,
12664
+ dirName,
12665
+ global: this.global
12666
+ });
12667
+ toolSkills.push(toolSkill);
12445
12668
  }
12446
12669
  }
12447
12670
  this.logger.debug(
@@ -12496,11 +12719,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
12496
12719
  };
12497
12720
 
12498
12721
  // src/features/subagents/agentsmd-subagent.ts
12499
- var import_node_path89 = require("path");
12722
+ var import_node_path90 = require("path");
12500
12723
 
12501
12724
  // src/features/subagents/simulated-subagent.ts
12502
- var import_node_path88 = require("path");
12503
- var import_mini45 = require("zod/mini");
12725
+ var import_node_path89 = require("path");
12726
+ var import_mini46 = require("zod/mini");
12504
12727
 
12505
12728
  // src/features/subagents/tool-subagent.ts
12506
12729
  var ToolSubagent = class extends ToolFile {
@@ -12552,9 +12775,9 @@ var ToolSubagent = class extends ToolFile {
12552
12775
  };
12553
12776
 
12554
12777
  // src/features/subagents/simulated-subagent.ts
12555
- var SimulatedSubagentFrontmatterSchema = import_mini45.z.object({
12556
- name: import_mini45.z.string(),
12557
- description: import_mini45.z.optional(import_mini45.z.string())
12778
+ var SimulatedSubagentFrontmatterSchema = import_mini46.z.object({
12779
+ name: import_mini46.z.string(),
12780
+ description: import_mini46.z.optional(import_mini46.z.string())
12558
12781
  });
12559
12782
  var SimulatedSubagent = class extends ToolSubagent {
12560
12783
  frontmatter;
@@ -12564,7 +12787,7 @@ var SimulatedSubagent = class extends ToolSubagent {
12564
12787
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
12565
12788
  if (!result.success) {
12566
12789
  throw new Error(
12567
- `Invalid frontmatter in ${(0, import_node_path88.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12790
+ `Invalid frontmatter in ${(0, import_node_path89.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12568
12791
  );
12569
12792
  }
12570
12793
  }
@@ -12615,7 +12838,7 @@ var SimulatedSubagent = class extends ToolSubagent {
12615
12838
  return {
12616
12839
  success: false,
12617
12840
  error: new Error(
12618
- `Invalid frontmatter in ${(0, import_node_path88.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12841
+ `Invalid frontmatter in ${(0, import_node_path89.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12619
12842
  )
12620
12843
  };
12621
12844
  }
@@ -12625,7 +12848,7 @@ var SimulatedSubagent = class extends ToolSubagent {
12625
12848
  relativeFilePath,
12626
12849
  validate = true
12627
12850
  }) {
12628
- const filePath = (0, import_node_path88.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
12851
+ const filePath = (0, import_node_path89.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
12629
12852
  const fileContent = await readFileContent(filePath);
12630
12853
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
12631
12854
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -12635,7 +12858,7 @@ var SimulatedSubagent = class extends ToolSubagent {
12635
12858
  return {
12636
12859
  baseDir,
12637
12860
  relativeDirPath: this.getSettablePaths().relativeDirPath,
12638
- relativeFilePath: (0, import_node_path88.basename)(relativeFilePath),
12861
+ relativeFilePath: (0, import_node_path89.basename)(relativeFilePath),
12639
12862
  frontmatter: result.data,
12640
12863
  body: content.trim(),
12641
12864
  validate
@@ -12661,7 +12884,7 @@ var SimulatedSubagent = class extends ToolSubagent {
12661
12884
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
12662
12885
  static getSettablePaths() {
12663
12886
  return {
12664
- relativeDirPath: (0, import_node_path89.join)(".agents", "subagents")
12887
+ relativeDirPath: (0, import_node_path90.join)(".agents", "subagents")
12665
12888
  };
12666
12889
  }
12667
12890
  static async fromFile(params) {
@@ -12684,11 +12907,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
12684
12907
  };
12685
12908
 
12686
12909
  // src/features/subagents/factorydroid-subagent.ts
12687
- var import_node_path90 = require("path");
12910
+ var import_node_path91 = require("path");
12688
12911
  var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
12689
12912
  static getSettablePaths(_options) {
12690
12913
  return {
12691
- relativeDirPath: (0, import_node_path90.join)(".factory", "droids")
12914
+ relativeDirPath: (0, import_node_path91.join)(".factory", "droids")
12692
12915
  };
12693
12916
  }
12694
12917
  static async fromFile(params) {
@@ -12711,16 +12934,16 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
12711
12934
  };
12712
12935
 
12713
12936
  // src/features/subagents/geminicli-subagent.ts
12714
- var import_node_path92 = require("path");
12715
- var import_mini47 = require("zod/mini");
12937
+ var import_node_path93 = require("path");
12938
+ var import_mini48 = require("zod/mini");
12716
12939
 
12717
12940
  // src/features/subagents/rulesync-subagent.ts
12718
- var import_node_path91 = require("path");
12719
- var import_mini46 = require("zod/mini");
12720
- var RulesyncSubagentFrontmatterSchema = import_mini46.z.looseObject({
12721
- targets: import_mini46.z._default(RulesyncTargetsSchema, ["*"]),
12722
- name: import_mini46.z.string(),
12723
- description: import_mini46.z.optional(import_mini46.z.string())
12941
+ var import_node_path92 = require("path");
12942
+ var import_mini47 = require("zod/mini");
12943
+ var RulesyncSubagentFrontmatterSchema = import_mini47.z.looseObject({
12944
+ targets: import_mini47.z._default(RulesyncTargetsSchema, ["*"]),
12945
+ name: import_mini47.z.string(),
12946
+ description: import_mini47.z.optional(import_mini47.z.string())
12724
12947
  });
12725
12948
  var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
12726
12949
  frontmatter;
@@ -12729,7 +12952,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
12729
12952
  const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
12730
12953
  if (!parseResult.success && rest.validate !== false) {
12731
12954
  throw new Error(
12732
- `Invalid frontmatter in ${(0, import_node_path91.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
12955
+ `Invalid frontmatter in ${(0, import_node_path92.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
12733
12956
  );
12734
12957
  }
12735
12958
  const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
@@ -12762,7 +12985,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
12762
12985
  return {
12763
12986
  success: false,
12764
12987
  error: new Error(
12765
- `Invalid frontmatter in ${(0, import_node_path91.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12988
+ `Invalid frontmatter in ${(0, import_node_path92.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12766
12989
  )
12767
12990
  };
12768
12991
  }
@@ -12770,14 +12993,14 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
12770
12993
  static async fromFile({
12771
12994
  relativeFilePath
12772
12995
  }) {
12773
- const filePath = (0, import_node_path91.join)(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
12996
+ const filePath = (0, import_node_path92.join)(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
12774
12997
  const fileContent = await readFileContent(filePath);
12775
12998
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
12776
12999
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
12777
13000
  if (!result.success) {
12778
13001
  throw new Error(`Invalid frontmatter in ${relativeFilePath}: ${formatError(result.error)}`);
12779
13002
  }
12780
- const filename = (0, import_node_path91.basename)(relativeFilePath);
13003
+ const filename = (0, import_node_path92.basename)(relativeFilePath);
12781
13004
  return new _RulesyncSubagent({
12782
13005
  baseDir: process.cwd(),
12783
13006
  relativeDirPath: this.getSettablePaths().relativeDirPath,
@@ -12789,9 +13012,9 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
12789
13012
  };
12790
13013
 
12791
13014
  // src/features/subagents/geminicli-subagent.ts
12792
- var GeminiCliSubagentFrontmatterSchema = import_mini47.z.looseObject({
12793
- name: import_mini47.z.string(),
12794
- description: import_mini47.z.optional(import_mini47.z.string())
13015
+ var GeminiCliSubagentFrontmatterSchema = import_mini48.z.looseObject({
13016
+ name: import_mini48.z.string(),
13017
+ description: import_mini48.z.optional(import_mini48.z.string())
12795
13018
  });
12796
13019
  var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
12797
13020
  frontmatter;
@@ -12801,7 +13024,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
12801
13024
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
12802
13025
  if (!result.success) {
12803
13026
  throw new Error(
12804
- `Invalid frontmatter in ${(0, import_node_path92.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13027
+ `Invalid frontmatter in ${(0, import_node_path93.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12805
13028
  );
12806
13029
  }
12807
13030
  }
@@ -12814,7 +13037,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
12814
13037
  }
12815
13038
  static getSettablePaths(_options = {}) {
12816
13039
  return {
12817
- relativeDirPath: (0, import_node_path92.join)(".gemini", "agents")
13040
+ relativeDirPath: (0, import_node_path93.join)(".gemini", "agents")
12818
13041
  };
12819
13042
  }
12820
13043
  getFrontmatter() {
@@ -12882,7 +13105,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
12882
13105
  return {
12883
13106
  success: false,
12884
13107
  error: new Error(
12885
- `Invalid frontmatter in ${(0, import_node_path92.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13108
+ `Invalid frontmatter in ${(0, import_node_path93.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12886
13109
  )
12887
13110
  };
12888
13111
  }
@@ -12900,7 +13123,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
12900
13123
  global = false
12901
13124
  }) {
12902
13125
  const paths = this.getSettablePaths({ global });
12903
- const filePath = (0, import_node_path92.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13126
+ const filePath = (0, import_node_path93.join)(baseDir, paths.relativeDirPath, relativeFilePath);
12904
13127
  const fileContent = await readFileContent(filePath);
12905
13128
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
12906
13129
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -12936,11 +13159,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
12936
13159
  };
12937
13160
 
12938
13161
  // src/features/subagents/roo-subagent.ts
12939
- var import_node_path93 = require("path");
13162
+ var import_node_path94 = require("path");
12940
13163
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
12941
13164
  static getSettablePaths() {
12942
13165
  return {
12943
- relativeDirPath: (0, import_node_path93.join)(".roo", "subagents")
13166
+ relativeDirPath: (0, import_node_path94.join)(".roo", "subagents")
12944
13167
  };
12945
13168
  }
12946
13169
  static async fromFile(params) {
@@ -12963,11 +13186,11 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
12963
13186
  };
12964
13187
 
12965
13188
  // src/features/subagents/rovodev-subagent.ts
12966
- var import_node_path94 = require("path");
12967
- var import_mini48 = require("zod/mini");
12968
- var RovodevSubagentFrontmatterSchema = import_mini48.z.looseObject({
12969
- name: import_mini48.z.string(),
12970
- description: import_mini48.z.optional(import_mini48.z.string())
13189
+ var import_node_path95 = require("path");
13190
+ var import_mini49 = require("zod/mini");
13191
+ var RovodevSubagentFrontmatterSchema = import_mini49.z.looseObject({
13192
+ name: import_mini49.z.string(),
13193
+ description: import_mini49.z.optional(import_mini49.z.string())
12971
13194
  });
12972
13195
  var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
12973
13196
  frontmatter;
@@ -12977,7 +13200,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
12977
13200
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
12978
13201
  if (!result.success) {
12979
13202
  throw new Error(
12980
- `Invalid frontmatter in ${(0, import_node_path94.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13203
+ `Invalid frontmatter in ${(0, import_node_path95.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12981
13204
  );
12982
13205
  }
12983
13206
  }
@@ -12989,7 +13212,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
12989
13212
  }
12990
13213
  static getSettablePaths(_options = {}) {
12991
13214
  return {
12992
- relativeDirPath: (0, import_node_path94.join)(".rovodev", "subagents")
13215
+ relativeDirPath: (0, import_node_path95.join)(".rovodev", "subagents")
12993
13216
  };
12994
13217
  }
12995
13218
  getFrontmatter() {
@@ -13052,7 +13275,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
13052
13275
  return {
13053
13276
  success: false,
13054
13277
  error: new Error(
13055
- `Invalid frontmatter in ${(0, import_node_path94.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13278
+ `Invalid frontmatter in ${(0, import_node_path95.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13056
13279
  )
13057
13280
  };
13058
13281
  }
@@ -13069,7 +13292,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
13069
13292
  global = false
13070
13293
  }) {
13071
13294
  const paths = this.getSettablePaths({ global });
13072
- const filePath = (0, import_node_path94.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13295
+ const filePath = (0, import_node_path95.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13073
13296
  const fileContent = await readFileContent(filePath);
13074
13297
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13075
13298
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13108,19 +13331,19 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
13108
13331
  };
13109
13332
 
13110
13333
  // src/features/subagents/subagents-processor.ts
13111
- var import_node_path105 = require("path");
13112
- var import_mini57 = require("zod/mini");
13334
+ var import_node_path106 = require("path");
13335
+ var import_mini58 = require("zod/mini");
13113
13336
 
13114
13337
  // src/features/subagents/claudecode-subagent.ts
13115
- var import_node_path95 = require("path");
13116
- var import_mini49 = require("zod/mini");
13117
- var ClaudecodeSubagentFrontmatterSchema = import_mini49.z.looseObject({
13118
- name: import_mini49.z.string(),
13119
- description: import_mini49.z.optional(import_mini49.z.string()),
13120
- model: import_mini49.z.optional(import_mini49.z.string()),
13121
- tools: import_mini49.z.optional(import_mini49.z.union([import_mini49.z.string(), import_mini49.z.array(import_mini49.z.string())])),
13122
- permissionMode: import_mini49.z.optional(import_mini49.z.string()),
13123
- skills: import_mini49.z.optional(import_mini49.z.union([import_mini49.z.string(), import_mini49.z.array(import_mini49.z.string())]))
13338
+ var import_node_path96 = require("path");
13339
+ var import_mini50 = require("zod/mini");
13340
+ var ClaudecodeSubagentFrontmatterSchema = import_mini50.z.looseObject({
13341
+ name: import_mini50.z.string(),
13342
+ description: import_mini50.z.optional(import_mini50.z.string()),
13343
+ model: import_mini50.z.optional(import_mini50.z.string()),
13344
+ tools: import_mini50.z.optional(import_mini50.z.union([import_mini50.z.string(), import_mini50.z.array(import_mini50.z.string())])),
13345
+ permissionMode: import_mini50.z.optional(import_mini50.z.string()),
13346
+ skills: import_mini50.z.optional(import_mini50.z.union([import_mini50.z.string(), import_mini50.z.array(import_mini50.z.string())]))
13124
13347
  });
13125
13348
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
13126
13349
  frontmatter;
@@ -13130,7 +13353,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
13130
13353
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
13131
13354
  if (!result.success) {
13132
13355
  throw new Error(
13133
- `Invalid frontmatter in ${(0, import_node_path95.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13356
+ `Invalid frontmatter in ${(0, import_node_path96.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13134
13357
  );
13135
13358
  }
13136
13359
  }
@@ -13142,7 +13365,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
13142
13365
  }
13143
13366
  static getSettablePaths(_options = {}) {
13144
13367
  return {
13145
- relativeDirPath: (0, import_node_path95.join)(".claude", "agents")
13368
+ relativeDirPath: (0, import_node_path96.join)(".claude", "agents")
13146
13369
  };
13147
13370
  }
13148
13371
  getFrontmatter() {
@@ -13221,7 +13444,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
13221
13444
  return {
13222
13445
  success: false,
13223
13446
  error: new Error(
13224
- `Invalid frontmatter in ${(0, import_node_path95.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13447
+ `Invalid frontmatter in ${(0, import_node_path96.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13225
13448
  )
13226
13449
  };
13227
13450
  }
@@ -13239,7 +13462,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
13239
13462
  global = false
13240
13463
  }) {
13241
13464
  const paths = this.getSettablePaths({ global });
13242
- const filePath = (0, import_node_path95.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13465
+ const filePath = (0, import_node_path96.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13243
13466
  const fileContent = await readFileContent(filePath);
13244
13467
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13245
13468
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13274,27 +13497,27 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
13274
13497
  };
13275
13498
 
13276
13499
  // src/features/subagents/codexcli-subagent.ts
13277
- var import_node_path96 = require("path");
13278
- var smolToml3 = __toESM(require("smol-toml"), 1);
13279
- var import_mini50 = require("zod/mini");
13280
- var CodexCliSubagentTomlSchema = import_mini50.z.looseObject({
13281
- name: import_mini50.z.string(),
13282
- description: import_mini50.z.optional(import_mini50.z.string()),
13283
- developer_instructions: import_mini50.z.optional(import_mini50.z.string()),
13284
- model: import_mini50.z.optional(import_mini50.z.string()),
13285
- model_reasoning_effort: import_mini50.z.optional(import_mini50.z.string()),
13286
- sandbox_mode: import_mini50.z.optional(import_mini50.z.string())
13500
+ var import_node_path97 = require("path");
13501
+ var smolToml4 = __toESM(require("smol-toml"), 1);
13502
+ var import_mini51 = require("zod/mini");
13503
+ var CodexCliSubagentTomlSchema = import_mini51.z.looseObject({
13504
+ name: import_mini51.z.string(),
13505
+ description: import_mini51.z.optional(import_mini51.z.string()),
13506
+ developer_instructions: import_mini51.z.optional(import_mini51.z.string()),
13507
+ model: import_mini51.z.optional(import_mini51.z.string()),
13508
+ model_reasoning_effort: import_mini51.z.optional(import_mini51.z.string()),
13509
+ sandbox_mode: import_mini51.z.optional(import_mini51.z.string())
13287
13510
  });
13288
13511
  var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13289
13512
  body;
13290
13513
  constructor({ body, ...rest }) {
13291
13514
  if (rest.validate !== false) {
13292
13515
  try {
13293
- const parsed = smolToml3.parse(body);
13516
+ const parsed = smolToml4.parse(body);
13294
13517
  CodexCliSubagentTomlSchema.parse(parsed);
13295
13518
  } catch (error) {
13296
13519
  throw new Error(
13297
- `Invalid TOML in ${(0, import_node_path96.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
13520
+ `Invalid TOML in ${(0, import_node_path97.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
13298
13521
  { cause: error }
13299
13522
  );
13300
13523
  }
@@ -13306,7 +13529,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13306
13529
  }
13307
13530
  static getSettablePaths(_options = {}) {
13308
13531
  return {
13309
- relativeDirPath: (0, import_node_path96.join)(".codex", "agents")
13532
+ relativeDirPath: (0, import_node_path97.join)(".codex", "agents")
13310
13533
  };
13311
13534
  }
13312
13535
  getBody() {
@@ -13315,10 +13538,10 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13315
13538
  toRulesyncSubagent() {
13316
13539
  let parsed;
13317
13540
  try {
13318
- parsed = CodexCliSubagentTomlSchema.parse(smolToml3.parse(this.body));
13541
+ parsed = CodexCliSubagentTomlSchema.parse(smolToml4.parse(this.body));
13319
13542
  } catch (error) {
13320
13543
  throw new Error(
13321
- `Failed to parse TOML in ${(0, import_node_path96.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
13544
+ `Failed to parse TOML in ${(0, import_node_path97.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
13322
13545
  { cause: error }
13323
13546
  );
13324
13547
  }
@@ -13361,7 +13584,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13361
13584
  ...rulesyncSubagent.getBody() ? { developer_instructions: rulesyncSubagent.getBody() } : {},
13362
13585
  ...codexcliSection
13363
13586
  };
13364
- const body = smolToml3.stringify(tomlObj);
13587
+ const body = smolToml4.stringify(tomlObj);
13365
13588
  const paths = this.getSettablePaths({ global });
13366
13589
  const relativeFilePath = rulesyncSubagent.getRelativeFilePath().replace(/\.md$/, ".toml");
13367
13590
  return new _CodexCliSubagent({
@@ -13376,7 +13599,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13376
13599
  }
13377
13600
  validate() {
13378
13601
  try {
13379
- const parsed = smolToml3.parse(this.body);
13602
+ const parsed = smolToml4.parse(this.body);
13380
13603
  CodexCliSubagentTomlSchema.parse(parsed);
13381
13604
  return { success: true, error: null };
13382
13605
  } catch (error) {
@@ -13399,7 +13622,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13399
13622
  global = false
13400
13623
  }) {
13401
13624
  const paths = this.getSettablePaths({ global });
13402
- const filePath = (0, import_node_path96.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13625
+ const filePath = (0, import_node_path97.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13403
13626
  const fileContent = await readFileContent(filePath);
13404
13627
  const subagent = new _CodexCliSubagent({
13405
13628
  baseDir,
@@ -13437,13 +13660,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13437
13660
  };
13438
13661
 
13439
13662
  // src/features/subagents/copilot-subagent.ts
13440
- var import_node_path97 = require("path");
13441
- var import_mini51 = require("zod/mini");
13663
+ var import_node_path98 = require("path");
13664
+ var import_mini52 = require("zod/mini");
13442
13665
  var REQUIRED_TOOL = "agent/runSubagent";
13443
- var CopilotSubagentFrontmatterSchema = import_mini51.z.looseObject({
13444
- name: import_mini51.z.string(),
13445
- description: import_mini51.z.optional(import_mini51.z.string()),
13446
- tools: import_mini51.z.optional(import_mini51.z.union([import_mini51.z.string(), import_mini51.z.array(import_mini51.z.string())]))
13666
+ var CopilotSubagentFrontmatterSchema = import_mini52.z.looseObject({
13667
+ name: import_mini52.z.string(),
13668
+ description: import_mini52.z.optional(import_mini52.z.string()),
13669
+ tools: import_mini52.z.optional(import_mini52.z.union([import_mini52.z.string(), import_mini52.z.array(import_mini52.z.string())]))
13447
13670
  });
13448
13671
  var normalizeTools = (tools) => {
13449
13672
  if (!tools) {
@@ -13463,7 +13686,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
13463
13686
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
13464
13687
  if (!result.success) {
13465
13688
  throw new Error(
13466
- `Invalid frontmatter in ${(0, import_node_path97.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13689
+ `Invalid frontmatter in ${(0, import_node_path98.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13467
13690
  );
13468
13691
  }
13469
13692
  }
@@ -13475,7 +13698,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
13475
13698
  }
13476
13699
  static getSettablePaths(_options = {}) {
13477
13700
  return {
13478
- relativeDirPath: (0, import_node_path97.join)(".github", "agents")
13701
+ relativeDirPath: (0, import_node_path98.join)(".github", "agents")
13479
13702
  };
13480
13703
  }
13481
13704
  getFrontmatter() {
@@ -13549,7 +13772,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
13549
13772
  return {
13550
13773
  success: false,
13551
13774
  error: new Error(
13552
- `Invalid frontmatter in ${(0, import_node_path97.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13775
+ `Invalid frontmatter in ${(0, import_node_path98.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13553
13776
  )
13554
13777
  };
13555
13778
  }
@@ -13567,7 +13790,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
13567
13790
  global = false
13568
13791
  }) {
13569
13792
  const paths = this.getSettablePaths({ global });
13570
- const filePath = (0, import_node_path97.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13793
+ const filePath = (0, import_node_path98.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13571
13794
  const fileContent = await readFileContent(filePath);
13572
13795
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13573
13796
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13603,11 +13826,11 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
13603
13826
  };
13604
13827
 
13605
13828
  // src/features/subagents/cursor-subagent.ts
13606
- var import_node_path98 = require("path");
13607
- var import_mini52 = require("zod/mini");
13608
- var CursorSubagentFrontmatterSchema = import_mini52.z.looseObject({
13609
- name: import_mini52.z.string(),
13610
- description: import_mini52.z.optional(import_mini52.z.string())
13829
+ var import_node_path99 = require("path");
13830
+ var import_mini53 = require("zod/mini");
13831
+ var CursorSubagentFrontmatterSchema = import_mini53.z.looseObject({
13832
+ name: import_mini53.z.string(),
13833
+ description: import_mini53.z.optional(import_mini53.z.string())
13611
13834
  });
13612
13835
  var CursorSubagent = class _CursorSubagent extends ToolSubagent {
13613
13836
  frontmatter;
@@ -13617,7 +13840,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
13617
13840
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
13618
13841
  if (!result.success) {
13619
13842
  throw new Error(
13620
- `Invalid frontmatter in ${(0, import_node_path98.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13843
+ `Invalid frontmatter in ${(0, import_node_path99.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13621
13844
  );
13622
13845
  }
13623
13846
  }
@@ -13629,7 +13852,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
13629
13852
  }
13630
13853
  static getSettablePaths(_options = {}) {
13631
13854
  return {
13632
- relativeDirPath: (0, import_node_path98.join)(".cursor", "agents")
13855
+ relativeDirPath: (0, import_node_path99.join)(".cursor", "agents")
13633
13856
  };
13634
13857
  }
13635
13858
  getFrontmatter() {
@@ -13696,7 +13919,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
13696
13919
  return {
13697
13920
  success: false,
13698
13921
  error: new Error(
13699
- `Invalid frontmatter in ${(0, import_node_path98.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13922
+ `Invalid frontmatter in ${(0, import_node_path99.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13700
13923
  )
13701
13924
  };
13702
13925
  }
@@ -13714,7 +13937,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
13714
13937
  global = false
13715
13938
  }) {
13716
13939
  const paths = this.getSettablePaths({ global });
13717
- const filePath = (0, import_node_path98.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13940
+ const filePath = (0, import_node_path99.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13718
13941
  const fileContent = await readFileContent(filePath);
13719
13942
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13720
13943
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13750,12 +13973,12 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
13750
13973
  };
13751
13974
 
13752
13975
  // src/features/subagents/deepagents-subagent.ts
13753
- var import_node_path99 = require("path");
13754
- var import_mini53 = require("zod/mini");
13755
- var DeepagentsSubagentFrontmatterSchema = import_mini53.z.looseObject({
13756
- name: import_mini53.z.string(),
13757
- description: import_mini53.z.optional(import_mini53.z.string()),
13758
- model: import_mini53.z.optional(import_mini53.z.string())
13976
+ var import_node_path100 = require("path");
13977
+ var import_mini54 = require("zod/mini");
13978
+ var DeepagentsSubagentFrontmatterSchema = import_mini54.z.looseObject({
13979
+ name: import_mini54.z.string(),
13980
+ description: import_mini54.z.optional(import_mini54.z.string()),
13981
+ model: import_mini54.z.optional(import_mini54.z.string())
13759
13982
  });
13760
13983
  var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
13761
13984
  frontmatter;
@@ -13765,7 +13988,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
13765
13988
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
13766
13989
  if (!result.success) {
13767
13990
  throw new Error(
13768
- `Invalid frontmatter in ${(0, import_node_path99.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13991
+ `Invalid frontmatter in ${(0, import_node_path100.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13769
13992
  );
13770
13993
  }
13771
13994
  }
@@ -13775,7 +13998,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
13775
13998
  }
13776
13999
  static getSettablePaths(_options = {}) {
13777
14000
  return {
13778
- relativeDirPath: (0, import_node_path99.join)(".deepagents", "agents")
14001
+ relativeDirPath: (0, import_node_path100.join)(".deepagents", "agents")
13779
14002
  };
13780
14003
  }
13781
14004
  getFrontmatter() {
@@ -13850,7 +14073,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
13850
14073
  return {
13851
14074
  success: false,
13852
14075
  error: new Error(
13853
- `Invalid frontmatter in ${(0, import_node_path99.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14076
+ `Invalid frontmatter in ${(0, import_node_path100.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13854
14077
  )
13855
14078
  };
13856
14079
  }
@@ -13868,7 +14091,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
13868
14091
  global = false
13869
14092
  }) {
13870
14093
  const paths = this.getSettablePaths({ global });
13871
- const filePath = (0, import_node_path99.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14094
+ const filePath = (0, import_node_path100.join)(baseDir, paths.relativeDirPath, relativeFilePath);
13872
14095
  const fileContent = await readFileContent(filePath);
13873
14096
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13874
14097
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13903,11 +14126,11 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
13903
14126
  };
13904
14127
 
13905
14128
  // src/features/subagents/junie-subagent.ts
13906
- var import_node_path100 = require("path");
13907
- var import_mini54 = require("zod/mini");
13908
- var JunieSubagentFrontmatterSchema = import_mini54.z.looseObject({
13909
- name: import_mini54.z.optional(import_mini54.z.string()),
13910
- description: import_mini54.z.string()
14129
+ var import_node_path101 = require("path");
14130
+ var import_mini55 = require("zod/mini");
14131
+ var JunieSubagentFrontmatterSchema = import_mini55.z.looseObject({
14132
+ name: import_mini55.z.optional(import_mini55.z.string()),
14133
+ description: import_mini55.z.string()
13911
14134
  });
13912
14135
  var JunieSubagent = class _JunieSubagent extends ToolSubagent {
13913
14136
  frontmatter;
@@ -13917,7 +14140,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
13917
14140
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
13918
14141
  if (!result.success) {
13919
14142
  throw new Error(
13920
- `Invalid frontmatter in ${(0, import_node_path100.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14143
+ `Invalid frontmatter in ${(0, import_node_path101.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13921
14144
  );
13922
14145
  }
13923
14146
  }
@@ -13932,7 +14155,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
13932
14155
  throw new Error("JunieSubagent does not support global mode.");
13933
14156
  }
13934
14157
  return {
13935
- relativeDirPath: (0, import_node_path100.join)(".junie", "agents")
14158
+ relativeDirPath: (0, import_node_path101.join)(".junie", "agents")
13936
14159
  };
13937
14160
  }
13938
14161
  getFrontmatter() {
@@ -14008,7 +14231,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
14008
14231
  return {
14009
14232
  success: false,
14010
14233
  error: new Error(
14011
- `Invalid frontmatter in ${(0, import_node_path100.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14234
+ `Invalid frontmatter in ${(0, import_node_path101.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14012
14235
  )
14013
14236
  };
14014
14237
  }
@@ -14026,7 +14249,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
14026
14249
  global = false
14027
14250
  }) {
14028
14251
  const paths = this.getSettablePaths({ global });
14029
- const filePath = (0, import_node_path100.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14252
+ const filePath = (0, import_node_path101.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14030
14253
  const fileContent = await readFileContent(filePath);
14031
14254
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14032
14255
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14061,15 +14284,15 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
14061
14284
  };
14062
14285
 
14063
14286
  // src/features/subagents/kilo-subagent.ts
14064
- var import_node_path102 = require("path");
14287
+ var import_node_path103 = require("path");
14065
14288
 
14066
14289
  // src/features/subagents/opencode-style-subagent.ts
14067
- var import_node_path101 = require("path");
14068
- var import_mini55 = require("zod/mini");
14069
- var OpenCodeStyleSubagentFrontmatterSchema = import_mini55.z.looseObject({
14070
- description: import_mini55.z.optional(import_mini55.z.string()),
14071
- mode: import_mini55.z._default(import_mini55.z.string(), "subagent"),
14072
- name: import_mini55.z.optional(import_mini55.z.string())
14290
+ var import_node_path102 = require("path");
14291
+ var import_mini56 = require("zod/mini");
14292
+ var OpenCodeStyleSubagentFrontmatterSchema = import_mini56.z.looseObject({
14293
+ description: import_mini56.z.optional(import_mini56.z.string()),
14294
+ mode: import_mini56.z._default(import_mini56.z.string(), "subagent"),
14295
+ name: import_mini56.z.optional(import_mini56.z.string())
14073
14296
  });
14074
14297
  var OpenCodeStyleSubagent = class extends ToolSubagent {
14075
14298
  frontmatter;
@@ -14079,7 +14302,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
14079
14302
  const result = OpenCodeStyleSubagentFrontmatterSchema.safeParse(frontmatter);
14080
14303
  if (!result.success) {
14081
14304
  throw new Error(
14082
- `Invalid frontmatter in ${(0, import_node_path101.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14305
+ `Invalid frontmatter in ${(0, import_node_path102.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14083
14306
  );
14084
14307
  }
14085
14308
  }
@@ -14099,7 +14322,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
14099
14322
  const { description, mode, name, ...toolSection } = this.frontmatter;
14100
14323
  const rulesyncFrontmatter = {
14101
14324
  targets: ["*"],
14102
- name: name ?? (0, import_node_path101.basename)(this.getRelativeFilePath(), ".md"),
14325
+ name: name ?? (0, import_node_path102.basename)(this.getRelativeFilePath(), ".md"),
14103
14326
  description,
14104
14327
  [this.getToolTarget()]: { mode, ...toolSection }
14105
14328
  };
@@ -14121,7 +14344,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
14121
14344
  return {
14122
14345
  success: false,
14123
14346
  error: new Error(
14124
- `Invalid frontmatter in ${(0, import_node_path101.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14347
+ `Invalid frontmatter in ${(0, import_node_path102.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14125
14348
  )
14126
14349
  };
14127
14350
  }
@@ -14137,7 +14360,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
14137
14360
  global = false
14138
14361
  } = {}) {
14139
14362
  return {
14140
- relativeDirPath: global ? (0, import_node_path102.join)(".config", "kilo", "agent") : (0, import_node_path102.join)(".kilo", "agent")
14363
+ relativeDirPath: global ? (0, import_node_path103.join)(".config", "kilo", "agent") : (0, import_node_path103.join)(".kilo", "agent")
14141
14364
  };
14142
14365
  }
14143
14366
  static fromRulesyncSubagent({
@@ -14181,7 +14404,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
14181
14404
  global = false
14182
14405
  }) {
14183
14406
  const paths = this.getSettablePaths({ global });
14184
- const filePath = (0, import_node_path102.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14407
+ const filePath = (0, import_node_path103.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14185
14408
  const fileContent = await readFileContent(filePath);
14186
14409
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14187
14410
  const result = KiloSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14217,23 +14440,23 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
14217
14440
  };
14218
14441
 
14219
14442
  // src/features/subagents/kiro-subagent.ts
14220
- var import_node_path103 = require("path");
14221
- var import_mini56 = require("zod/mini");
14222
- var KiroCliSubagentJsonSchema = import_mini56.z.looseObject({
14223
- name: import_mini56.z.string(),
14224
- description: import_mini56.z.optional(import_mini56.z.nullable(import_mini56.z.string())),
14225
- prompt: import_mini56.z.optional(import_mini56.z.nullable(import_mini56.z.string())),
14226
- tools: import_mini56.z.optional(import_mini56.z.nullable(import_mini56.z.array(import_mini56.z.string()))),
14227
- toolAliases: import_mini56.z.optional(import_mini56.z.nullable(import_mini56.z.record(import_mini56.z.string(), import_mini56.z.string()))),
14228
- toolSettings: import_mini56.z.optional(import_mini56.z.nullable(import_mini56.z.unknown())),
14229
- toolSchema: import_mini56.z.optional(import_mini56.z.nullable(import_mini56.z.unknown())),
14230
- hooks: import_mini56.z.optional(import_mini56.z.nullable(import_mini56.z.record(import_mini56.z.string(), import_mini56.z.array(import_mini56.z.unknown())))),
14231
- model: import_mini56.z.optional(import_mini56.z.nullable(import_mini56.z.string())),
14232
- mcpServers: import_mini56.z.optional(import_mini56.z.nullable(import_mini56.z.record(import_mini56.z.string(), import_mini56.z.unknown()))),
14233
- useLegacyMcpJson: import_mini56.z.optional(import_mini56.z.nullable(import_mini56.z.boolean())),
14234
- resources: import_mini56.z.optional(import_mini56.z.nullable(import_mini56.z.array(import_mini56.z.string()))),
14235
- allowedTools: import_mini56.z.optional(import_mini56.z.nullable(import_mini56.z.array(import_mini56.z.string()))),
14236
- includeMcpJson: import_mini56.z.optional(import_mini56.z.nullable(import_mini56.z.boolean()))
14443
+ var import_node_path104 = require("path");
14444
+ var import_mini57 = require("zod/mini");
14445
+ var KiroCliSubagentJsonSchema = import_mini57.z.looseObject({
14446
+ name: import_mini57.z.string(),
14447
+ description: import_mini57.z.optional(import_mini57.z.nullable(import_mini57.z.string())),
14448
+ prompt: import_mini57.z.optional(import_mini57.z.nullable(import_mini57.z.string())),
14449
+ tools: import_mini57.z.optional(import_mini57.z.nullable(import_mini57.z.array(import_mini57.z.string()))),
14450
+ toolAliases: import_mini57.z.optional(import_mini57.z.nullable(import_mini57.z.record(import_mini57.z.string(), import_mini57.z.string()))),
14451
+ toolSettings: import_mini57.z.optional(import_mini57.z.nullable(import_mini57.z.unknown())),
14452
+ toolSchema: import_mini57.z.optional(import_mini57.z.nullable(import_mini57.z.unknown())),
14453
+ hooks: import_mini57.z.optional(import_mini57.z.nullable(import_mini57.z.record(import_mini57.z.string(), import_mini57.z.array(import_mini57.z.unknown())))),
14454
+ model: import_mini57.z.optional(import_mini57.z.nullable(import_mini57.z.string())),
14455
+ mcpServers: import_mini57.z.optional(import_mini57.z.nullable(import_mini57.z.record(import_mini57.z.string(), import_mini57.z.unknown()))),
14456
+ useLegacyMcpJson: import_mini57.z.optional(import_mini57.z.nullable(import_mini57.z.boolean())),
14457
+ resources: import_mini57.z.optional(import_mini57.z.nullable(import_mini57.z.array(import_mini57.z.string()))),
14458
+ allowedTools: import_mini57.z.optional(import_mini57.z.nullable(import_mini57.z.array(import_mini57.z.string()))),
14459
+ includeMcpJson: import_mini57.z.optional(import_mini57.z.nullable(import_mini57.z.boolean()))
14237
14460
  });
14238
14461
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
14239
14462
  body;
@@ -14244,7 +14467,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
14244
14467
  KiroCliSubagentJsonSchema.parse(parsed);
14245
14468
  } catch (error) {
14246
14469
  throw new Error(
14247
- `Invalid JSON in ${(0, import_node_path103.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
14470
+ `Invalid JSON in ${(0, import_node_path104.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
14248
14471
  { cause: error }
14249
14472
  );
14250
14473
  }
@@ -14256,7 +14479,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
14256
14479
  }
14257
14480
  static getSettablePaths(_options = {}) {
14258
14481
  return {
14259
- relativeDirPath: (0, import_node_path103.join)(".kiro", "agents")
14482
+ relativeDirPath: (0, import_node_path104.join)(".kiro", "agents")
14260
14483
  };
14261
14484
  }
14262
14485
  getBody() {
@@ -14268,7 +14491,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
14268
14491
  parsed = JSON.parse(this.body);
14269
14492
  } catch (error) {
14270
14493
  throw new Error(
14271
- `Failed to parse JSON in ${(0, import_node_path103.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
14494
+ `Failed to parse JSON in ${(0, import_node_path104.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
14272
14495
  { cause: error }
14273
14496
  );
14274
14497
  }
@@ -14349,7 +14572,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
14349
14572
  global = false
14350
14573
  }) {
14351
14574
  const paths = this.getSettablePaths({ global });
14352
- const filePath = (0, import_node_path103.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14575
+ const filePath = (0, import_node_path104.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14353
14576
  const fileContent = await readFileContent(filePath);
14354
14577
  const subagent = new _KiroSubagent({
14355
14578
  baseDir,
@@ -14387,7 +14610,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
14387
14610
  };
14388
14611
 
14389
14612
  // src/features/subagents/opencode-subagent.ts
14390
- var import_node_path104 = require("path");
14613
+ var import_node_path105 = require("path");
14391
14614
  var OpenCodeSubagentFrontmatterSchema = OpenCodeStyleSubagentFrontmatterSchema;
14392
14615
  var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
14393
14616
  getToolTarget() {
@@ -14397,7 +14620,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
14397
14620
  global = false
14398
14621
  } = {}) {
14399
14622
  return {
14400
- relativeDirPath: global ? (0, import_node_path104.join)(".config", "opencode", "agent") : (0, import_node_path104.join)(".opencode", "agent")
14623
+ relativeDirPath: global ? (0, import_node_path105.join)(".config", "opencode", "agent") : (0, import_node_path105.join)(".opencode", "agent")
14401
14624
  };
14402
14625
  }
14403
14626
  static fromRulesyncSubagent({
@@ -14441,7 +14664,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
14441
14664
  global = false
14442
14665
  }) {
14443
14666
  const paths = this.getSettablePaths({ global });
14444
- const filePath = (0, import_node_path104.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14667
+ const filePath = (0, import_node_path105.join)(baseDir, paths.relativeDirPath, relativeFilePath);
14445
14668
  const fileContent = await readFileContent(filePath);
14446
14669
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14447
14670
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14494,7 +14717,7 @@ var subagentsProcessorToolTargetTuple = [
14494
14717
  "roo",
14495
14718
  "rovodev"
14496
14719
  ];
14497
- var SubagentsProcessorToolTargetSchema = import_mini57.z.enum(subagentsProcessorToolTargetTuple);
14720
+ var SubagentsProcessorToolTargetSchema = import_mini58.z.enum(subagentsProcessorToolTargetTuple);
14498
14721
  var toolSubagentFactories = /* @__PURE__ */ new Map([
14499
14722
  [
14500
14723
  "agentsmd",
@@ -14685,7 +14908,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
14685
14908
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
14686
14909
  */
14687
14910
  async loadRulesyncFiles() {
14688
- const subagentsDir = (0, import_node_path105.join)(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
14911
+ const subagentsDir = (0, import_node_path106.join)(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
14689
14912
  const dirExists = await directoryExists(subagentsDir);
14690
14913
  if (!dirExists) {
14691
14914
  this.logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -14700,7 +14923,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
14700
14923
  this.logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
14701
14924
  const rulesyncSubagents = [];
14702
14925
  for (const mdFile of mdFiles) {
14703
- const filepath = (0, import_node_path105.join)(subagentsDir, mdFile);
14926
+ const filepath = (0, import_node_path106.join)(subagentsDir, mdFile);
14704
14927
  try {
14705
14928
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
14706
14929
  relativeFilePath: mdFile,
@@ -14730,14 +14953,14 @@ var SubagentsProcessor = class extends FeatureProcessor {
14730
14953
  const factory = this.getFactory(this.toolTarget);
14731
14954
  const paths = factory.class.getSettablePaths({ global: this.global });
14732
14955
  const subagentFilePaths = await findFilesByGlobs(
14733
- (0, import_node_path105.join)(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
14956
+ (0, import_node_path106.join)(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
14734
14957
  );
14735
14958
  if (forDeletion) {
14736
14959
  const toolSubagents2 = subagentFilePaths.map(
14737
14960
  (path3) => factory.class.forDeletion({
14738
14961
  baseDir: this.baseDir,
14739
14962
  relativeDirPath: paths.relativeDirPath,
14740
- relativeFilePath: (0, import_node_path105.basename)(path3),
14963
+ relativeFilePath: (0, import_node_path106.basename)(path3),
14741
14964
  global: this.global
14742
14965
  })
14743
14966
  ).filter((subagent) => subagent.isDeletable());
@@ -14750,7 +14973,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
14750
14973
  subagentFilePaths.map(
14751
14974
  (path3) => factory.class.fromFile({
14752
14975
  baseDir: this.baseDir,
14753
- relativeFilePath: (0, import_node_path105.basename)(path3),
14976
+ relativeFilePath: (0, import_node_path106.basename)(path3),
14754
14977
  global: this.global
14755
14978
  })
14756
14979
  )
@@ -14797,49 +15020,49 @@ var SubagentsProcessor = class extends FeatureProcessor {
14797
15020
  };
14798
15021
 
14799
15022
  // src/features/rules/agentsmd-rule.ts
14800
- var import_node_path108 = require("path");
15023
+ var import_node_path109 = require("path");
14801
15024
 
14802
15025
  // src/features/rules/tool-rule.ts
14803
- var import_node_path107 = require("path");
15026
+ var import_node_path108 = require("path");
14804
15027
 
14805
15028
  // src/features/rules/rulesync-rule.ts
14806
- var import_node_path106 = require("path");
14807
- var import_mini58 = require("zod/mini");
14808
- var RulesyncRuleFrontmatterSchema = import_mini58.z.object({
14809
- root: import_mini58.z.optional(import_mini58.z.boolean()),
14810
- localRoot: import_mini58.z.optional(import_mini58.z.boolean()),
14811
- targets: import_mini58.z._default(RulesyncTargetsSchema, ["*"]),
14812
- description: import_mini58.z.optional(import_mini58.z.string()),
14813
- globs: import_mini58.z.optional(import_mini58.z.array(import_mini58.z.string())),
14814
- agentsmd: import_mini58.z.optional(
14815
- import_mini58.z.looseObject({
15029
+ var import_node_path107 = require("path");
15030
+ var import_mini59 = require("zod/mini");
15031
+ var RulesyncRuleFrontmatterSchema = import_mini59.z.object({
15032
+ root: import_mini59.z.optional(import_mini59.z.boolean()),
15033
+ localRoot: import_mini59.z.optional(import_mini59.z.boolean()),
15034
+ targets: import_mini59.z._default(RulesyncTargetsSchema, ["*"]),
15035
+ description: import_mini59.z.optional(import_mini59.z.string()),
15036
+ globs: import_mini59.z.optional(import_mini59.z.array(import_mini59.z.string())),
15037
+ agentsmd: import_mini59.z.optional(
15038
+ import_mini59.z.looseObject({
14816
15039
  // @example "path/to/subproject"
14817
- subprojectPath: import_mini58.z.optional(import_mini58.z.string())
15040
+ subprojectPath: import_mini59.z.optional(import_mini59.z.string())
14818
15041
  })
14819
15042
  ),
14820
- claudecode: import_mini58.z.optional(
14821
- import_mini58.z.looseObject({
15043
+ claudecode: import_mini59.z.optional(
15044
+ import_mini59.z.looseObject({
14822
15045
  // Glob patterns for conditional rules (takes precedence over globs)
14823
15046
  // @example ["src/**/*.ts", "tests/**/*.test.ts"]
14824
- paths: import_mini58.z.optional(import_mini58.z.array(import_mini58.z.string()))
15047
+ paths: import_mini59.z.optional(import_mini59.z.array(import_mini59.z.string()))
14825
15048
  })
14826
15049
  ),
14827
- cursor: import_mini58.z.optional(
14828
- import_mini58.z.looseObject({
14829
- alwaysApply: import_mini58.z.optional(import_mini58.z.boolean()),
14830
- description: import_mini58.z.optional(import_mini58.z.string()),
14831
- globs: import_mini58.z.optional(import_mini58.z.array(import_mini58.z.string()))
15050
+ cursor: import_mini59.z.optional(
15051
+ import_mini59.z.looseObject({
15052
+ alwaysApply: import_mini59.z.optional(import_mini59.z.boolean()),
15053
+ description: import_mini59.z.optional(import_mini59.z.string()),
15054
+ globs: import_mini59.z.optional(import_mini59.z.array(import_mini59.z.string()))
14832
15055
  })
14833
15056
  ),
14834
- copilot: import_mini58.z.optional(
14835
- import_mini58.z.looseObject({
14836
- excludeAgent: import_mini58.z.optional(import_mini58.z.union([import_mini58.z.literal("code-review"), import_mini58.z.literal("coding-agent")]))
15057
+ copilot: import_mini59.z.optional(
15058
+ import_mini59.z.looseObject({
15059
+ excludeAgent: import_mini59.z.optional(import_mini59.z.union([import_mini59.z.literal("code-review"), import_mini59.z.literal("coding-agent")]))
14837
15060
  })
14838
15061
  ),
14839
- antigravity: import_mini58.z.optional(
14840
- import_mini58.z.looseObject({
14841
- trigger: import_mini58.z.optional(import_mini58.z.string()),
14842
- globs: import_mini58.z.optional(import_mini58.z.array(import_mini58.z.string()))
15062
+ antigravity: import_mini59.z.optional(
15063
+ import_mini59.z.looseObject({
15064
+ trigger: import_mini59.z.optional(import_mini59.z.string()),
15065
+ globs: import_mini59.z.optional(import_mini59.z.array(import_mini59.z.string()))
14843
15066
  })
14844
15067
  )
14845
15068
  });
@@ -14850,7 +15073,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
14850
15073
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
14851
15074
  if (!parseResult.success && rest.validate !== false) {
14852
15075
  throw new Error(
14853
- `Invalid frontmatter in ${(0, import_node_path106.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
15076
+ `Invalid frontmatter in ${(0, import_node_path107.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
14854
15077
  );
14855
15078
  }
14856
15079
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -14885,7 +15108,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
14885
15108
  return {
14886
15109
  success: false,
14887
15110
  error: new Error(
14888
- `Invalid frontmatter in ${(0, import_node_path106.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15111
+ `Invalid frontmatter in ${(0, import_node_path107.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14889
15112
  )
14890
15113
  };
14891
15114
  }
@@ -14894,7 +15117,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
14894
15117
  relativeFilePath,
14895
15118
  validate = true
14896
15119
  }) {
14897
- const filePath = (0, import_node_path106.join)(
15120
+ const filePath = (0, import_node_path107.join)(
14898
15121
  process.cwd(),
14899
15122
  this.getSettablePaths().recommended.relativeDirPath,
14900
15123
  relativeFilePath
@@ -14993,7 +15216,7 @@ var ToolRule = class extends ToolFile {
14993
15216
  rulesyncRule,
14994
15217
  validate = true,
14995
15218
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
14996
- nonRootPath = { relativeDirPath: (0, import_node_path107.join)(".agents", "memories") }
15219
+ nonRootPath = { relativeDirPath: (0, import_node_path108.join)(".agents", "memories") }
14997
15220
  }) {
14998
15221
  const params = this.buildToolRuleParamsDefault({
14999
15222
  baseDir,
@@ -15004,7 +15227,7 @@ var ToolRule = class extends ToolFile {
15004
15227
  });
15005
15228
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
15006
15229
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
15007
- params.relativeDirPath = (0, import_node_path107.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
15230
+ params.relativeDirPath = (0, import_node_path108.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
15008
15231
  params.relativeFilePath = "AGENTS.md";
15009
15232
  }
15010
15233
  return params;
@@ -15053,7 +15276,7 @@ var ToolRule = class extends ToolFile {
15053
15276
  }
15054
15277
  };
15055
15278
  function buildToolPath(toolDir, subDir, excludeToolDir) {
15056
- return excludeToolDir ? subDir : (0, import_node_path107.join)(toolDir, subDir);
15279
+ return excludeToolDir ? subDir : (0, import_node_path108.join)(toolDir, subDir);
15057
15280
  }
15058
15281
 
15059
15282
  // src/features/rules/agentsmd-rule.ts
@@ -15082,8 +15305,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
15082
15305
  validate = true
15083
15306
  }) {
15084
15307
  const isRoot = relativeFilePath === "AGENTS.md";
15085
- const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path108.join)(".agents", "memories", relativeFilePath);
15086
- const fileContent = await readFileContent((0, import_node_path108.join)(baseDir, relativePath));
15308
+ const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path109.join)(".agents", "memories", relativeFilePath);
15309
+ const fileContent = await readFileContent((0, import_node_path109.join)(baseDir, relativePath));
15087
15310
  return new _AgentsMdRule({
15088
15311
  baseDir,
15089
15312
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -15138,21 +15361,21 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
15138
15361
  };
15139
15362
 
15140
15363
  // src/features/rules/antigravity-rule.ts
15141
- var import_node_path109 = require("path");
15142
- var import_mini59 = require("zod/mini");
15143
- var AntigravityRuleFrontmatterSchema = import_mini59.z.looseObject({
15144
- trigger: import_mini59.z.optional(
15145
- import_mini59.z.union([
15146
- import_mini59.z.literal("always_on"),
15147
- import_mini59.z.literal("glob"),
15148
- import_mini59.z.literal("manual"),
15149
- import_mini59.z.literal("model_decision"),
15150
- import_mini59.z.string()
15364
+ var import_node_path110 = require("path");
15365
+ var import_mini60 = require("zod/mini");
15366
+ var AntigravityRuleFrontmatterSchema = import_mini60.z.looseObject({
15367
+ trigger: import_mini60.z.optional(
15368
+ import_mini60.z.union([
15369
+ import_mini60.z.literal("always_on"),
15370
+ import_mini60.z.literal("glob"),
15371
+ import_mini60.z.literal("manual"),
15372
+ import_mini60.z.literal("model_decision"),
15373
+ import_mini60.z.string()
15151
15374
  // accepts any string for forward compatibility
15152
15375
  ])
15153
15376
  ),
15154
- globs: import_mini59.z.optional(import_mini59.z.string()),
15155
- description: import_mini59.z.optional(import_mini59.z.string())
15377
+ globs: import_mini60.z.optional(import_mini60.z.string()),
15378
+ description: import_mini60.z.optional(import_mini60.z.string())
15156
15379
  });
15157
15380
  function parseGlobsString(globs) {
15158
15381
  if (!globs) {
@@ -15297,7 +15520,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
15297
15520
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
15298
15521
  if (!result.success) {
15299
15522
  throw new Error(
15300
- `Invalid frontmatter in ${(0, import_node_path109.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15523
+ `Invalid frontmatter in ${(0, import_node_path110.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15301
15524
  );
15302
15525
  }
15303
15526
  }
@@ -15321,7 +15544,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
15321
15544
  relativeFilePath,
15322
15545
  validate = true
15323
15546
  }) {
15324
- const filePath = (0, import_node_path109.join)(
15547
+ const filePath = (0, import_node_path110.join)(
15325
15548
  baseDir,
15326
15549
  this.getSettablePaths().nonRoot.relativeDirPath,
15327
15550
  relativeFilePath
@@ -15461,7 +15684,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
15461
15684
  };
15462
15685
 
15463
15686
  // src/features/rules/augmentcode-legacy-rule.ts
15464
- var import_node_path110 = require("path");
15687
+ var import_node_path111 = require("path");
15465
15688
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
15466
15689
  toRulesyncRule() {
15467
15690
  const rulesyncFrontmatter = {
@@ -15521,8 +15744,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
15521
15744
  }) {
15522
15745
  const settablePaths = this.getSettablePaths();
15523
15746
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
15524
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path110.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
15525
- const fileContent = await readFileContent((0, import_node_path110.join)(baseDir, relativePath));
15747
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path111.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
15748
+ const fileContent = await readFileContent((0, import_node_path111.join)(baseDir, relativePath));
15526
15749
  return new _AugmentcodeLegacyRule({
15527
15750
  baseDir,
15528
15751
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -15551,7 +15774,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
15551
15774
  };
15552
15775
 
15553
15776
  // src/features/rules/augmentcode-rule.ts
15554
- var import_node_path111 = require("path");
15777
+ var import_node_path112 = require("path");
15555
15778
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
15556
15779
  toRulesyncRule() {
15557
15780
  return this.toRulesyncRuleDefault();
@@ -15582,7 +15805,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
15582
15805
  relativeFilePath,
15583
15806
  validate = true
15584
15807
  }) {
15585
- const filePath = (0, import_node_path111.join)(
15808
+ const filePath = (0, import_node_path112.join)(
15586
15809
  baseDir,
15587
15810
  this.getSettablePaths().nonRoot.relativeDirPath,
15588
15811
  relativeFilePath
@@ -15622,7 +15845,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
15622
15845
  };
15623
15846
 
15624
15847
  // src/features/rules/claudecode-legacy-rule.ts
15625
- var import_node_path112 = require("path");
15848
+ var import_node_path113 = require("path");
15626
15849
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
15627
15850
  static getSettablePaths({
15628
15851
  global,
@@ -15664,7 +15887,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
15664
15887
  if (isRoot) {
15665
15888
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
15666
15889
  const fileContent2 = await readFileContent(
15667
- (0, import_node_path112.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
15890
+ (0, import_node_path113.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
15668
15891
  );
15669
15892
  return new _ClaudecodeLegacyRule({
15670
15893
  baseDir,
@@ -15678,8 +15901,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
15678
15901
  if (!paths.nonRoot) {
15679
15902
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
15680
15903
  }
15681
- const relativePath = (0, import_node_path112.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
15682
- const fileContent = await readFileContent((0, import_node_path112.join)(baseDir, relativePath));
15904
+ const relativePath = (0, import_node_path113.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
15905
+ const fileContent = await readFileContent((0, import_node_path113.join)(baseDir, relativePath));
15683
15906
  return new _ClaudecodeLegacyRule({
15684
15907
  baseDir,
15685
15908
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -15738,10 +15961,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
15738
15961
  };
15739
15962
 
15740
15963
  // src/features/rules/claudecode-rule.ts
15741
- var import_node_path113 = require("path");
15742
- var import_mini60 = require("zod/mini");
15743
- var ClaudecodeRuleFrontmatterSchema = import_mini60.z.object({
15744
- paths: import_mini60.z.optional(import_mini60.z.array(import_mini60.z.string()))
15964
+ var import_node_path114 = require("path");
15965
+ var import_mini61 = require("zod/mini");
15966
+ var ClaudecodeRuleFrontmatterSchema = import_mini61.z.object({
15967
+ paths: import_mini61.z.optional(import_mini61.z.array(import_mini61.z.string()))
15745
15968
  });
15746
15969
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
15747
15970
  frontmatter;
@@ -15779,7 +16002,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
15779
16002
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
15780
16003
  if (!result.success) {
15781
16004
  throw new Error(
15782
- `Invalid frontmatter in ${(0, import_node_path113.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16005
+ `Invalid frontmatter in ${(0, import_node_path114.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15783
16006
  );
15784
16007
  }
15785
16008
  }
@@ -15809,7 +16032,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
15809
16032
  if (isRoot) {
15810
16033
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
15811
16034
  const fileContent2 = await readFileContent(
15812
- (0, import_node_path113.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
16035
+ (0, import_node_path114.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
15813
16036
  );
15814
16037
  return new _ClaudecodeRule({
15815
16038
  baseDir,
@@ -15824,8 +16047,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
15824
16047
  if (!paths.nonRoot) {
15825
16048
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
15826
16049
  }
15827
- const relativePath = (0, import_node_path113.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
15828
- const filePath = (0, import_node_path113.join)(baseDir, relativePath);
16050
+ const relativePath = (0, import_node_path114.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
16051
+ const filePath = (0, import_node_path114.join)(baseDir, relativePath);
15829
16052
  const fileContent = await readFileContent(filePath);
15830
16053
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15831
16054
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
@@ -15936,7 +16159,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
15936
16159
  return {
15937
16160
  success: false,
15938
16161
  error: new Error(
15939
- `Invalid frontmatter in ${(0, import_node_path113.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16162
+ `Invalid frontmatter in ${(0, import_node_path114.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15940
16163
  )
15941
16164
  };
15942
16165
  }
@@ -15956,10 +16179,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
15956
16179
  };
15957
16180
 
15958
16181
  // src/features/rules/cline-rule.ts
15959
- var import_node_path114 = require("path");
15960
- var import_mini61 = require("zod/mini");
15961
- var ClineRuleFrontmatterSchema = import_mini61.z.object({
15962
- description: import_mini61.z.string()
16182
+ var import_node_path115 = require("path");
16183
+ var import_mini62 = require("zod/mini");
16184
+ var ClineRuleFrontmatterSchema = import_mini62.z.object({
16185
+ description: import_mini62.z.string()
15963
16186
  });
15964
16187
  var ClineRule = class _ClineRule extends ToolRule {
15965
16188
  static getSettablePaths(_options = {}) {
@@ -16002,7 +16225,7 @@ var ClineRule = class _ClineRule extends ToolRule {
16002
16225
  validate = true
16003
16226
  }) {
16004
16227
  const fileContent = await readFileContent(
16005
- (0, import_node_path114.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
16228
+ (0, import_node_path115.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
16006
16229
  );
16007
16230
  return new _ClineRule({
16008
16231
  baseDir,
@@ -16028,7 +16251,7 @@ var ClineRule = class _ClineRule extends ToolRule {
16028
16251
  };
16029
16252
 
16030
16253
  // src/features/rules/codexcli-rule.ts
16031
- var import_node_path115 = require("path");
16254
+ var import_node_path116 = require("path");
16032
16255
  var CodexcliRule = class _CodexcliRule extends ToolRule {
16033
16256
  static getSettablePaths({
16034
16257
  global,
@@ -16063,7 +16286,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
16063
16286
  if (isRoot) {
16064
16287
  const relativePath2 = paths.root.relativeFilePath;
16065
16288
  const fileContent2 = await readFileContent(
16066
- (0, import_node_path115.join)(baseDir, paths.root.relativeDirPath, relativePath2)
16289
+ (0, import_node_path116.join)(baseDir, paths.root.relativeDirPath, relativePath2)
16067
16290
  );
16068
16291
  return new _CodexcliRule({
16069
16292
  baseDir,
@@ -16077,8 +16300,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
16077
16300
  if (!paths.nonRoot) {
16078
16301
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
16079
16302
  }
16080
- const relativePath = (0, import_node_path115.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
16081
- const fileContent = await readFileContent((0, import_node_path115.join)(baseDir, relativePath));
16303
+ const relativePath = (0, import_node_path116.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
16304
+ const fileContent = await readFileContent((0, import_node_path116.join)(baseDir, relativePath));
16082
16305
  return new _CodexcliRule({
16083
16306
  baseDir,
16084
16307
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -16137,12 +16360,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
16137
16360
  };
16138
16361
 
16139
16362
  // src/features/rules/copilot-rule.ts
16140
- var import_node_path116 = require("path");
16141
- var import_mini62 = require("zod/mini");
16142
- var CopilotRuleFrontmatterSchema = import_mini62.z.object({
16143
- description: import_mini62.z.optional(import_mini62.z.string()),
16144
- applyTo: import_mini62.z.optional(import_mini62.z.string()),
16145
- excludeAgent: import_mini62.z.optional(import_mini62.z.union([import_mini62.z.literal("code-review"), import_mini62.z.literal("coding-agent")]))
16363
+ var import_node_path117 = require("path");
16364
+ var import_mini63 = require("zod/mini");
16365
+ var CopilotRuleFrontmatterSchema = import_mini63.z.object({
16366
+ description: import_mini63.z.optional(import_mini63.z.string()),
16367
+ applyTo: import_mini63.z.optional(import_mini63.z.string()),
16368
+ excludeAgent: import_mini63.z.optional(import_mini63.z.union([import_mini63.z.literal("code-review"), import_mini63.z.literal("coding-agent")]))
16146
16369
  });
16147
16370
  var CopilotRule = class _CopilotRule extends ToolRule {
16148
16371
  frontmatter;
@@ -16174,7 +16397,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
16174
16397
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
16175
16398
  if (!result.success) {
16176
16399
  throw new Error(
16177
- `Invalid frontmatter in ${(0, import_node_path116.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16400
+ `Invalid frontmatter in ${(0, import_node_path117.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16178
16401
  );
16179
16402
  }
16180
16403
  }
@@ -16264,8 +16487,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
16264
16487
  const paths = this.getSettablePaths({ global });
16265
16488
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
16266
16489
  if (isRoot) {
16267
- const relativePath2 = (0, import_node_path116.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
16268
- const filePath2 = (0, import_node_path116.join)(baseDir, relativePath2);
16490
+ const relativePath2 = (0, import_node_path117.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
16491
+ const filePath2 = (0, import_node_path117.join)(baseDir, relativePath2);
16269
16492
  const fileContent2 = await readFileContent(filePath2);
16270
16493
  return new _CopilotRule({
16271
16494
  baseDir,
@@ -16280,8 +16503,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
16280
16503
  if (!paths.nonRoot) {
16281
16504
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
16282
16505
  }
16283
- const relativePath = (0, import_node_path116.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
16284
- const filePath = (0, import_node_path116.join)(baseDir, relativePath);
16506
+ const relativePath = (0, import_node_path117.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
16507
+ const filePath = (0, import_node_path117.join)(baseDir, relativePath);
16285
16508
  const fileContent = await readFileContent(filePath);
16286
16509
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
16287
16510
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
@@ -16327,7 +16550,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
16327
16550
  return {
16328
16551
  success: false,
16329
16552
  error: new Error(
16330
- `Invalid frontmatter in ${(0, import_node_path116.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16553
+ `Invalid frontmatter in ${(0, import_node_path117.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16331
16554
  )
16332
16555
  };
16333
16556
  }
@@ -16383,12 +16606,12 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
16383
16606
  };
16384
16607
 
16385
16608
  // src/features/rules/cursor-rule.ts
16386
- var import_node_path117 = require("path");
16387
- var import_mini63 = require("zod/mini");
16388
- var CursorRuleFrontmatterSchema = import_mini63.z.object({
16389
- description: import_mini63.z.optional(import_mini63.z.string()),
16390
- globs: import_mini63.z.optional(import_mini63.z.string()),
16391
- alwaysApply: import_mini63.z.optional(import_mini63.z.boolean())
16609
+ var import_node_path118 = require("path");
16610
+ var import_mini64 = require("zod/mini");
16611
+ var CursorRuleFrontmatterSchema = import_mini64.z.object({
16612
+ description: import_mini64.z.optional(import_mini64.z.string()),
16613
+ globs: import_mini64.z.optional(import_mini64.z.string()),
16614
+ alwaysApply: import_mini64.z.optional(import_mini64.z.boolean())
16392
16615
  });
16393
16616
  var CursorRule = class _CursorRule extends ToolRule {
16394
16617
  frontmatter;
@@ -16405,7 +16628,7 @@ var CursorRule = class _CursorRule extends ToolRule {
16405
16628
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
16406
16629
  if (!result.success) {
16407
16630
  throw new Error(
16408
- `Invalid frontmatter in ${(0, import_node_path117.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16631
+ `Invalid frontmatter in ${(0, import_node_path118.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16409
16632
  );
16410
16633
  }
16411
16634
  }
@@ -16521,7 +16744,7 @@ var CursorRule = class _CursorRule extends ToolRule {
16521
16744
  relativeFilePath,
16522
16745
  validate = true
16523
16746
  }) {
16524
- const filePath = (0, import_node_path117.join)(
16747
+ const filePath = (0, import_node_path118.join)(
16525
16748
  baseDir,
16526
16749
  this.getSettablePaths().nonRoot.relativeDirPath,
16527
16750
  relativeFilePath
@@ -16531,7 +16754,7 @@ var CursorRule = class _CursorRule extends ToolRule {
16531
16754
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
16532
16755
  if (!result.success) {
16533
16756
  throw new Error(
16534
- `Invalid frontmatter in ${(0, import_node_path117.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
16757
+ `Invalid frontmatter in ${(0, import_node_path118.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
16535
16758
  );
16536
16759
  }
16537
16760
  return new _CursorRule({
@@ -16568,7 +16791,7 @@ var CursorRule = class _CursorRule extends ToolRule {
16568
16791
  return {
16569
16792
  success: false,
16570
16793
  error: new Error(
16571
- `Invalid frontmatter in ${(0, import_node_path117.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16794
+ `Invalid frontmatter in ${(0, import_node_path118.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16572
16795
  )
16573
16796
  };
16574
16797
  }
@@ -16588,7 +16811,7 @@ var CursorRule = class _CursorRule extends ToolRule {
16588
16811
  };
16589
16812
 
16590
16813
  // src/features/rules/deepagents-rule.ts
16591
- var import_node_path118 = require("path");
16814
+ var import_node_path119 = require("path");
16592
16815
  var DeepagentsRule = class _DeepagentsRule extends ToolRule {
16593
16816
  constructor({ fileContent, root, ...rest }) {
16594
16817
  super({
@@ -16615,8 +16838,8 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
16615
16838
  }) {
16616
16839
  const settablePaths = this.getSettablePaths();
16617
16840
  const isRoot = relativeFilePath === "AGENTS.md";
16618
- const relativePath = isRoot ? (0, import_node_path118.join)(".deepagents", "AGENTS.md") : (0, import_node_path118.join)(".deepagents", "memories", relativeFilePath);
16619
- const fileContent = await readFileContent((0, import_node_path118.join)(baseDir, relativePath));
16841
+ const relativePath = isRoot ? (0, import_node_path119.join)(".deepagents", "AGENTS.md") : (0, import_node_path119.join)(".deepagents", "memories", relativeFilePath);
16842
+ const fileContent = await readFileContent((0, import_node_path119.join)(baseDir, relativePath));
16620
16843
  return new _DeepagentsRule({
16621
16844
  baseDir,
16622
16845
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -16671,7 +16894,7 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
16671
16894
  };
16672
16895
 
16673
16896
  // src/features/rules/factorydroid-rule.ts
16674
- var import_node_path119 = require("path");
16897
+ var import_node_path120 = require("path");
16675
16898
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
16676
16899
  constructor({ fileContent, root, ...rest }) {
16677
16900
  super({
@@ -16711,8 +16934,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
16711
16934
  const paths = this.getSettablePaths({ global });
16712
16935
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
16713
16936
  if (isRoot) {
16714
- const relativePath2 = (0, import_node_path119.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
16715
- const fileContent2 = await readFileContent((0, import_node_path119.join)(baseDir, relativePath2));
16937
+ const relativePath2 = (0, import_node_path120.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
16938
+ const fileContent2 = await readFileContent((0, import_node_path120.join)(baseDir, relativePath2));
16716
16939
  return new _FactorydroidRule({
16717
16940
  baseDir,
16718
16941
  relativeDirPath: paths.root.relativeDirPath,
@@ -16725,8 +16948,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
16725
16948
  if (!paths.nonRoot) {
16726
16949
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
16727
16950
  }
16728
- const relativePath = (0, import_node_path119.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
16729
- const fileContent = await readFileContent((0, import_node_path119.join)(baseDir, relativePath));
16951
+ const relativePath = (0, import_node_path120.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
16952
+ const fileContent = await readFileContent((0, import_node_path120.join)(baseDir, relativePath));
16730
16953
  return new _FactorydroidRule({
16731
16954
  baseDir,
16732
16955
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -16785,7 +17008,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
16785
17008
  };
16786
17009
 
16787
17010
  // src/features/rules/geminicli-rule.ts
16788
- var import_node_path120 = require("path");
17011
+ var import_node_path121 = require("path");
16789
17012
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
16790
17013
  static getSettablePaths({
16791
17014
  global,
@@ -16820,7 +17043,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
16820
17043
  if (isRoot) {
16821
17044
  const relativePath2 = paths.root.relativeFilePath;
16822
17045
  const fileContent2 = await readFileContent(
16823
- (0, import_node_path120.join)(baseDir, paths.root.relativeDirPath, relativePath2)
17046
+ (0, import_node_path121.join)(baseDir, paths.root.relativeDirPath, relativePath2)
16824
17047
  );
16825
17048
  return new _GeminiCliRule({
16826
17049
  baseDir,
@@ -16834,8 +17057,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
16834
17057
  if (!paths.nonRoot) {
16835
17058
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
16836
17059
  }
16837
- const relativePath = (0, import_node_path120.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
16838
- const fileContent = await readFileContent((0, import_node_path120.join)(baseDir, relativePath));
17060
+ const relativePath = (0, import_node_path121.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
17061
+ const fileContent = await readFileContent((0, import_node_path121.join)(baseDir, relativePath));
16839
17062
  return new _GeminiCliRule({
16840
17063
  baseDir,
16841
17064
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -16894,7 +17117,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
16894
17117
  };
16895
17118
 
16896
17119
  // src/features/rules/goose-rule.ts
16897
- var import_node_path121 = require("path");
17120
+ var import_node_path122 = require("path");
16898
17121
  var GooseRule = class _GooseRule extends ToolRule {
16899
17122
  static getSettablePaths({
16900
17123
  global,
@@ -16929,7 +17152,7 @@ var GooseRule = class _GooseRule extends ToolRule {
16929
17152
  if (isRoot) {
16930
17153
  const relativePath2 = paths.root.relativeFilePath;
16931
17154
  const fileContent2 = await readFileContent(
16932
- (0, import_node_path121.join)(baseDir, paths.root.relativeDirPath, relativePath2)
17155
+ (0, import_node_path122.join)(baseDir, paths.root.relativeDirPath, relativePath2)
16933
17156
  );
16934
17157
  return new _GooseRule({
16935
17158
  baseDir,
@@ -16943,8 +17166,8 @@ var GooseRule = class _GooseRule extends ToolRule {
16943
17166
  if (!paths.nonRoot) {
16944
17167
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
16945
17168
  }
16946
- const relativePath = (0, import_node_path121.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
16947
- const fileContent = await readFileContent((0, import_node_path121.join)(baseDir, relativePath));
17169
+ const relativePath = (0, import_node_path122.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
17170
+ const fileContent = await readFileContent((0, import_node_path122.join)(baseDir, relativePath));
16948
17171
  return new _GooseRule({
16949
17172
  baseDir,
16950
17173
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17003,7 +17226,7 @@ var GooseRule = class _GooseRule extends ToolRule {
17003
17226
  };
17004
17227
 
17005
17228
  // src/features/rules/junie-rule.ts
17006
- var import_node_path122 = require("path");
17229
+ var import_node_path123 = require("path");
17007
17230
  var JunieRule = class _JunieRule extends ToolRule {
17008
17231
  static getSettablePaths(_options = {}) {
17009
17232
  return {
@@ -17016,18 +17239,28 @@ var JunieRule = class _JunieRule extends ToolRule {
17016
17239
  }
17017
17240
  };
17018
17241
  }
17242
+ /**
17243
+ * Determines whether a given relative file path refers to the root
17244
+ * `guidelines.md` file. Memory files live under `.junie/memories/` and are
17245
+ * passed in as bare filenames (e.g. `memo.md`), so a top-level
17246
+ * `guidelines.md` is unambiguously the root entry.
17247
+ */
17248
+ static isRootRelativeFilePath(relativeFilePath) {
17249
+ return relativeFilePath === "guidelines.md";
17250
+ }
17019
17251
  static async fromFile({
17020
17252
  baseDir = process.cwd(),
17021
17253
  relativeFilePath,
17022
17254
  validate = true
17023
17255
  }) {
17024
- const isRoot = relativeFilePath === "guidelines.md";
17025
- const relativePath = isRoot ? "guidelines.md" : (0, import_node_path122.join)(".junie", "memories", relativeFilePath);
17026
- const fileContent = await readFileContent((0, import_node_path122.join)(baseDir, relativePath));
17256
+ const isRoot = _JunieRule.isRootRelativeFilePath(relativeFilePath);
17257
+ const settablePaths = this.getSettablePaths();
17258
+ const relativePath = isRoot ? (0, import_node_path123.join)(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : (0, import_node_path123.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
17259
+ const fileContent = await readFileContent((0, import_node_path123.join)(baseDir, relativePath));
17027
17260
  return new _JunieRule({
17028
17261
  baseDir,
17029
- relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
17030
- relativeFilePath: isRoot ? "guidelines.md" : relativeFilePath,
17262
+ relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
17263
+ relativeFilePath: isRoot ? settablePaths.root.relativeFilePath : relativeFilePath,
17031
17264
  fileContent,
17032
17265
  validate,
17033
17266
  root: isRoot
@@ -17059,7 +17292,7 @@ var JunieRule = class _JunieRule extends ToolRule {
17059
17292
  relativeDirPath,
17060
17293
  relativeFilePath
17061
17294
  }) {
17062
- const isRoot = relativeFilePath === "guidelines.md";
17295
+ const isRoot = _JunieRule.isRootRelativeFilePath(relativeFilePath);
17063
17296
  return new _JunieRule({
17064
17297
  baseDir,
17065
17298
  relativeDirPath,
@@ -17078,7 +17311,7 @@ var JunieRule = class _JunieRule extends ToolRule {
17078
17311
  };
17079
17312
 
17080
17313
  // src/features/rules/kilo-rule.ts
17081
- var import_node_path123 = require("path");
17314
+ var import_node_path124 = require("path");
17082
17315
  var KiloRule = class _KiloRule extends ToolRule {
17083
17316
  static getSettablePaths({
17084
17317
  global,
@@ -17113,7 +17346,7 @@ var KiloRule = class _KiloRule extends ToolRule {
17113
17346
  if (isRoot) {
17114
17347
  const relativePath2 = paths.root.relativeFilePath;
17115
17348
  const fileContent2 = await readFileContent(
17116
- (0, import_node_path123.join)(baseDir, paths.root.relativeDirPath, relativePath2)
17349
+ (0, import_node_path124.join)(baseDir, paths.root.relativeDirPath, relativePath2)
17117
17350
  );
17118
17351
  return new _KiloRule({
17119
17352
  baseDir,
@@ -17127,8 +17360,8 @@ var KiloRule = class _KiloRule extends ToolRule {
17127
17360
  if (!paths.nonRoot) {
17128
17361
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17129
17362
  }
17130
- const relativePath = (0, import_node_path123.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
17131
- const fileContent = await readFileContent((0, import_node_path123.join)(baseDir, relativePath));
17363
+ const relativePath = (0, import_node_path124.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
17364
+ const fileContent = await readFileContent((0, import_node_path124.join)(baseDir, relativePath));
17132
17365
  return new _KiloRule({
17133
17366
  baseDir,
17134
17367
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17187,7 +17420,7 @@ var KiloRule = class _KiloRule extends ToolRule {
17187
17420
  };
17188
17421
 
17189
17422
  // src/features/rules/kiro-rule.ts
17190
- var import_node_path124 = require("path");
17423
+ var import_node_path125 = require("path");
17191
17424
  var KiroRule = class _KiroRule extends ToolRule {
17192
17425
  static getSettablePaths(_options = {}) {
17193
17426
  return {
@@ -17202,7 +17435,7 @@ var KiroRule = class _KiroRule extends ToolRule {
17202
17435
  validate = true
17203
17436
  }) {
17204
17437
  const fileContent = await readFileContent(
17205
- (0, import_node_path124.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17438
+ (0, import_node_path125.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17206
17439
  );
17207
17440
  return new _KiroRule({
17208
17441
  baseDir,
@@ -17256,7 +17489,7 @@ var KiroRule = class _KiroRule extends ToolRule {
17256
17489
  };
17257
17490
 
17258
17491
  // src/features/rules/opencode-rule.ts
17259
- var import_node_path125 = require("path");
17492
+ var import_node_path126 = require("path");
17260
17493
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
17261
17494
  static getSettablePaths({
17262
17495
  global,
@@ -17291,7 +17524,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
17291
17524
  if (isRoot) {
17292
17525
  const relativePath2 = paths.root.relativeFilePath;
17293
17526
  const fileContent2 = await readFileContent(
17294
- (0, import_node_path125.join)(baseDir, paths.root.relativeDirPath, relativePath2)
17527
+ (0, import_node_path126.join)(baseDir, paths.root.relativeDirPath, relativePath2)
17295
17528
  );
17296
17529
  return new _OpenCodeRule({
17297
17530
  baseDir,
@@ -17305,8 +17538,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
17305
17538
  if (!paths.nonRoot) {
17306
17539
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17307
17540
  }
17308
- const relativePath = (0, import_node_path125.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
17309
- const fileContent = await readFileContent((0, import_node_path125.join)(baseDir, relativePath));
17541
+ const relativePath = (0, import_node_path126.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
17542
+ const fileContent = await readFileContent((0, import_node_path126.join)(baseDir, relativePath));
17310
17543
  return new _OpenCodeRule({
17311
17544
  baseDir,
17312
17545
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17365,7 +17598,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
17365
17598
  };
17366
17599
 
17367
17600
  // src/features/rules/qwencode-rule.ts
17368
- var import_node_path126 = require("path");
17601
+ var import_node_path127 = require("path");
17369
17602
  var QwencodeRule = class _QwencodeRule extends ToolRule {
17370
17603
  static getSettablePaths(_options = {}) {
17371
17604
  return {
@@ -17384,8 +17617,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
17384
17617
  validate = true
17385
17618
  }) {
17386
17619
  const isRoot = relativeFilePath === "QWEN.md";
17387
- const relativePath = isRoot ? "QWEN.md" : (0, import_node_path126.join)(".qwen", "memories", relativeFilePath);
17388
- const fileContent = await readFileContent((0, import_node_path126.join)(baseDir, relativePath));
17620
+ const relativePath = isRoot ? "QWEN.md" : (0, import_node_path127.join)(".qwen", "memories", relativeFilePath);
17621
+ const fileContent = await readFileContent((0, import_node_path127.join)(baseDir, relativePath));
17389
17622
  return new _QwencodeRule({
17390
17623
  baseDir,
17391
17624
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -17437,7 +17670,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
17437
17670
  };
17438
17671
 
17439
17672
  // src/features/rules/replit-rule.ts
17440
- var import_node_path127 = require("path");
17673
+ var import_node_path128 = require("path");
17441
17674
  var ReplitRule = class _ReplitRule extends ToolRule {
17442
17675
  static getSettablePaths(_options = {}) {
17443
17676
  return {
@@ -17459,7 +17692,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
17459
17692
  }
17460
17693
  const relativePath = paths.root.relativeFilePath;
17461
17694
  const fileContent = await readFileContent(
17462
- (0, import_node_path127.join)(baseDir, paths.root.relativeDirPath, relativePath)
17695
+ (0, import_node_path128.join)(baseDir, paths.root.relativeDirPath, relativePath)
17463
17696
  );
17464
17697
  return new _ReplitRule({
17465
17698
  baseDir,
@@ -17525,7 +17758,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
17525
17758
  };
17526
17759
 
17527
17760
  // src/features/rules/roo-rule.ts
17528
- var import_node_path128 = require("path");
17761
+ var import_node_path129 = require("path");
17529
17762
  var RooRule = class _RooRule extends ToolRule {
17530
17763
  static getSettablePaths(_options = {}) {
17531
17764
  return {
@@ -17540,7 +17773,7 @@ var RooRule = class _RooRule extends ToolRule {
17540
17773
  validate = true
17541
17774
  }) {
17542
17775
  const fileContent = await readFileContent(
17543
- (0, import_node_path128.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17776
+ (0, import_node_path129.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17544
17777
  );
17545
17778
  return new _RooRule({
17546
17779
  baseDir,
@@ -17609,7 +17842,7 @@ var RooRule = class _RooRule extends ToolRule {
17609
17842
  };
17610
17843
 
17611
17844
  // src/features/rules/rovodev-rule.ts
17612
- var import_node_path129 = require("path");
17845
+ var import_node_path130 = require("path");
17613
17846
  var DISALLOWED_ROVODEV_MODULAR_RULE_BASENAMES = /* @__PURE__ */ new Set(["agents.md", "agents.local.md"]);
17614
17847
  var RovodevRule = class _RovodevRule extends ToolRule {
17615
17848
  /**
@@ -17653,7 +17886,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
17653
17886
  root: rovodevAgents,
17654
17887
  alternativeRoots: [{ relativeDirPath: ".", relativeFilePath: "AGENTS.md" }],
17655
17888
  nonRoot: {
17656
- relativeDirPath: (0, import_node_path129.join)(".rovodev", ".rulesync", "modular-rules")
17889
+ relativeDirPath: (0, import_node_path130.join)(".rovodev", ".rulesync", "modular-rules")
17657
17890
  }
17658
17891
  };
17659
17892
  }
@@ -17692,10 +17925,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
17692
17925
  }) {
17693
17926
  if (!this.isAllowedModularRulesRelativePath(relativeFilePath)) {
17694
17927
  throw new Error(
17695
- `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${(0, import_node_path129.join)(relativeDirPath, relativeFilePath)}`
17928
+ `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${(0, import_node_path130.join)(relativeDirPath, relativeFilePath)}`
17696
17929
  );
17697
17930
  }
17698
- const fileContent = await readFileContent((0, import_node_path129.join)(baseDir, relativeDirPath, relativeFilePath));
17931
+ const fileContent = await readFileContent((0, import_node_path130.join)(baseDir, relativeDirPath, relativeFilePath));
17699
17932
  return new _RovodevRule({
17700
17933
  baseDir,
17701
17934
  relativeDirPath,
@@ -17715,10 +17948,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
17715
17948
  paths
17716
17949
  }) {
17717
17950
  const relativeDirPath = overrideDirPath ?? paths.root.relativeDirPath;
17718
- const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${(0, import_node_path129.join)(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : (0, import_node_path129.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
17951
+ const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${(0, import_node_path130.join)(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : (0, import_node_path130.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
17719
17952
  if (relativeFilePath !== "AGENTS.md") {
17720
17953
  throw new Error(
17721
- `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path129.join)(relativeDirPath, relativeFilePath)}`
17954
+ `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path130.join)(relativeDirPath, relativeFilePath)}`
17722
17955
  );
17723
17956
  }
17724
17957
  const allowed = relativeDirPath === paths.root.relativeDirPath || "alternativeRoots" in paths && paths.alternativeRoots?.some(
@@ -17726,10 +17959,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
17726
17959
  );
17727
17960
  if (!allowed) {
17728
17961
  throw new Error(
17729
- `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path129.join)(relativeDirPath, relativeFilePath)}`
17962
+ `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path130.join)(relativeDirPath, relativeFilePath)}`
17730
17963
  );
17731
17964
  }
17732
- const fileContent = await readFileContent((0, import_node_path129.join)(baseDir, relativeDirPath, relativeFilePath));
17965
+ const fileContent = await readFileContent((0, import_node_path130.join)(baseDir, relativeDirPath, relativeFilePath));
17733
17966
  return new _RovodevRule({
17734
17967
  baseDir,
17735
17968
  relativeDirPath,
@@ -17843,7 +18076,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
17843
18076
  };
17844
18077
 
17845
18078
  // src/features/rules/warp-rule.ts
17846
- var import_node_path130 = require("path");
18079
+ var import_node_path131 = require("path");
17847
18080
  var WarpRule = class _WarpRule extends ToolRule {
17848
18081
  constructor({ fileContent, root, ...rest }) {
17849
18082
  super({
@@ -17869,8 +18102,8 @@ var WarpRule = class _WarpRule extends ToolRule {
17869
18102
  validate = true
17870
18103
  }) {
17871
18104
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
17872
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path130.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
17873
- const fileContent = await readFileContent((0, import_node_path130.join)(baseDir, relativePath));
18105
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path131.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
18106
+ const fileContent = await readFileContent((0, import_node_path131.join)(baseDir, relativePath));
17874
18107
  return new _WarpRule({
17875
18108
  baseDir,
17876
18109
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -17925,7 +18158,7 @@ var WarpRule = class _WarpRule extends ToolRule {
17925
18158
  };
17926
18159
 
17927
18160
  // src/features/rules/windsurf-rule.ts
17928
- var import_node_path131 = require("path");
18161
+ var import_node_path132 = require("path");
17929
18162
  var WindsurfRule = class _WindsurfRule extends ToolRule {
17930
18163
  static getSettablePaths(_options = {}) {
17931
18164
  return {
@@ -17940,7 +18173,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
17940
18173
  validate = true
17941
18174
  }) {
17942
18175
  const fileContent = await readFileContent(
17943
- (0, import_node_path131.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18176
+ (0, import_node_path132.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17944
18177
  );
17945
18178
  return new _WindsurfRule({
17946
18179
  baseDir,
@@ -18019,8 +18252,8 @@ var rulesProcessorToolTargets = [
18019
18252
  "warp",
18020
18253
  "windsurf"
18021
18254
  ];
18022
- var RulesProcessorToolTargetSchema = import_mini64.z.enum(rulesProcessorToolTargets);
18023
- var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path132.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
18255
+ var RulesProcessorToolTargetSchema = import_mini65.z.enum(rulesProcessorToolTargets);
18256
+ var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path133.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
18024
18257
  var toolRuleFactories = /* @__PURE__ */ new Map([
18025
18258
  [
18026
18259
  "agentsmd",
@@ -18448,7 +18681,7 @@ var RulesProcessor = class extends FeatureProcessor {
18448
18681
  }).relativeDirPath;
18449
18682
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
18450
18683
  const frontmatter = skill.getFrontmatter();
18451
- const relativePath = (0, import_node_path132.join)(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
18684
+ const relativePath = (0, import_node_path133.join)(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
18452
18685
  return {
18453
18686
  name: frontmatter.name,
18454
18687
  description: frontmatter.description,
@@ -18573,12 +18806,12 @@ var RulesProcessor = class extends FeatureProcessor {
18573
18806
  * Load and parse rulesync rule files from .rulesync/rules/ directory
18574
18807
  */
18575
18808
  async loadRulesyncFiles() {
18576
- const rulesyncBaseDir = (0, import_node_path132.join)(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
18577
- const files = await findFilesByGlobs((0, import_node_path132.join)(rulesyncBaseDir, "**", "*.md"));
18809
+ const rulesyncBaseDir = (0, import_node_path133.join)(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
18810
+ const files = await findFilesByGlobs((0, import_node_path133.join)(rulesyncBaseDir, "**", "*.md"));
18578
18811
  this.logger.debug(`Found ${files.length} rulesync files`);
18579
18812
  const rulesyncRules = await Promise.all(
18580
18813
  files.map((file) => {
18581
- const relativeFilePath = (0, import_node_path132.relative)(rulesyncBaseDir, file);
18814
+ const relativeFilePath = (0, import_node_path133.relative)(rulesyncBaseDir, file);
18582
18815
  checkPathTraversal({
18583
18816
  relativePath: relativeFilePath,
18584
18817
  intendedRootDir: rulesyncBaseDir
@@ -18653,7 +18886,7 @@ var RulesProcessor = class extends FeatureProcessor {
18653
18886
  global: this.global
18654
18887
  });
18655
18888
  const resolveRelativeDirPath = (filePath) => {
18656
- const dirName = (0, import_node_path132.dirname)((0, import_node_path132.relative)(this.baseDir, filePath));
18889
+ const dirName = (0, import_node_path133.dirname)((0, import_node_path133.relative)(this.baseDir, filePath));
18657
18890
  return dirName === "" ? "." : dirName;
18658
18891
  };
18659
18892
  const buildDeletionRulesFromPaths = (filePaths, opts) => {
@@ -18661,7 +18894,7 @@ var RulesProcessor = class extends FeatureProcessor {
18661
18894
  const effectiveBaseDir = isNonRoot ? opts.baseDirOverride : this.baseDir;
18662
18895
  return filePaths.map((filePath) => {
18663
18896
  const relativeDirPath = isNonRoot ? opts.relativeDirPathOverride : resolveRelativeDirPath(filePath);
18664
- const relativeFilePath = isNonRoot ? (0, import_node_path132.relative)(effectiveBaseDir, filePath) : (0, import_node_path132.basename)(filePath);
18897
+ const relativeFilePath = isNonRoot ? (0, import_node_path133.relative)(effectiveBaseDir, filePath) : (0, import_node_path133.basename)(filePath);
18665
18898
  checkPathTraversal({
18666
18899
  relativePath: isNonRoot ? relativeFilePath : relativeDirPath,
18667
18900
  intendedRootDir: effectiveBaseDir
@@ -18689,13 +18922,13 @@ var RulesProcessor = class extends FeatureProcessor {
18689
18922
  return [];
18690
18923
  }
18691
18924
  const uniqueRootFilePaths = await findFilesWithFallback(
18692
- (0, import_node_path132.join)(
18925
+ (0, import_node_path133.join)(
18693
18926
  this.baseDir,
18694
18927
  settablePaths.root.relativeDirPath ?? ".",
18695
18928
  settablePaths.root.relativeFilePath
18696
18929
  ),
18697
18930
  settablePaths.alternativeRoots,
18698
- (alt) => (0, import_node_path132.join)(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
18931
+ (alt) => (0, import_node_path133.join)(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
18699
18932
  );
18700
18933
  if (forDeletion) {
18701
18934
  return buildDeletionRulesFromPaths(uniqueRootFilePaths);
@@ -18709,7 +18942,7 @@ var RulesProcessor = class extends FeatureProcessor {
18709
18942
  });
18710
18943
  return factory.class.fromFile({
18711
18944
  baseDir: this.baseDir,
18712
- relativeFilePath: (0, import_node_path132.basename)(filePath),
18945
+ relativeFilePath: (0, import_node_path133.basename)(filePath),
18713
18946
  relativeDirPath,
18714
18947
  global: this.global
18715
18948
  });
@@ -18726,7 +18959,7 @@ var RulesProcessor = class extends FeatureProcessor {
18726
18959
  return [];
18727
18960
  }
18728
18961
  const uniqueLocalRootFilePaths2 = await findFilesByGlobs(
18729
- (0, import_node_path132.join)(this.baseDir, "AGENTS.local.md")
18962
+ (0, import_node_path133.join)(this.baseDir, "AGENTS.local.md")
18730
18963
  );
18731
18964
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths2);
18732
18965
  }
@@ -18737,9 +18970,9 @@ var RulesProcessor = class extends FeatureProcessor {
18737
18970
  return [];
18738
18971
  }
18739
18972
  const uniqueLocalRootFilePaths = await findFilesWithFallback(
18740
- (0, import_node_path132.join)(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
18973
+ (0, import_node_path133.join)(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
18741
18974
  settablePaths.alternativeRoots,
18742
- (alt) => (0, import_node_path132.join)(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
18975
+ (alt) => (0, import_node_path133.join)(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
18743
18976
  );
18744
18977
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths);
18745
18978
  })();
@@ -18750,20 +18983,20 @@ var RulesProcessor = class extends FeatureProcessor {
18750
18983
  if (!forDeletion || this.toolTarget !== "rovodev" || this.global) {
18751
18984
  return [];
18752
18985
  }
18753
- const primaryPaths = await findFilesByGlobs((0, import_node_path132.join)(this.baseDir, ".rovodev", "AGENTS.md"));
18986
+ const primaryPaths = await findFilesByGlobs((0, import_node_path133.join)(this.baseDir, ".rovodev", "AGENTS.md"));
18754
18987
  if (primaryPaths.length === 0) {
18755
18988
  return [];
18756
18989
  }
18757
- const mirrorPaths = await findFilesByGlobs((0, import_node_path132.join)(this.baseDir, "AGENTS.md"));
18990
+ const mirrorPaths = await findFilesByGlobs((0, import_node_path133.join)(this.baseDir, "AGENTS.md"));
18758
18991
  return buildDeletionRulesFromPaths(mirrorPaths);
18759
18992
  })();
18760
18993
  const nonRootToolRules = await (async () => {
18761
18994
  if (!settablePaths.nonRoot) {
18762
18995
  return [];
18763
18996
  }
18764
- const nonRootBaseDir = (0, import_node_path132.join)(this.baseDir, settablePaths.nonRoot.relativeDirPath);
18997
+ const nonRootBaseDir = (0, import_node_path133.join)(this.baseDir, settablePaths.nonRoot.relativeDirPath);
18765
18998
  const nonRootFilePaths = await findFilesByGlobs(
18766
- (0, import_node_path132.join)(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
18999
+ (0, import_node_path133.join)(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
18767
19000
  );
18768
19001
  if (forDeletion) {
18769
19002
  return buildDeletionRulesFromPaths(nonRootFilePaths, {
@@ -18773,18 +19006,18 @@ var RulesProcessor = class extends FeatureProcessor {
18773
19006
  }
18774
19007
  const modularRootRelative = settablePaths.nonRoot.relativeDirPath;
18775
19008
  const nonRootPathsForImport = this.toolTarget === "rovodev" ? nonRootFilePaths.filter((filePath) => {
18776
- const relativeFilePath = (0, import_node_path132.relative)(nonRootBaseDir, filePath);
19009
+ const relativeFilePath = (0, import_node_path133.relative)(nonRootBaseDir, filePath);
18777
19010
  const ok = RovodevRule.isAllowedModularRulesRelativePath(relativeFilePath);
18778
19011
  if (!ok) {
18779
19012
  this.logger.warn(
18780
- `Skipping reserved Rovodev path under modular-rules (import): ${(0, import_node_path132.join)(modularRootRelative, relativeFilePath)}`
19013
+ `Skipping reserved Rovodev path under modular-rules (import): ${(0, import_node_path133.join)(modularRootRelative, relativeFilePath)}`
18781
19014
  );
18782
19015
  }
18783
19016
  return ok;
18784
19017
  }) : nonRootFilePaths;
18785
19018
  return await Promise.all(
18786
19019
  nonRootPathsForImport.map((filePath) => {
18787
- const relativeFilePath = (0, import_node_path132.relative)(nonRootBaseDir, filePath);
19020
+ const relativeFilePath = (0, import_node_path133.relative)(nonRootBaseDir, filePath);
18788
19021
  checkPathTraversal({
18789
19022
  relativePath: relativeFilePath,
18790
19023
  intendedRootDir: nonRootBaseDir
@@ -18903,14 +19136,14 @@ s/<command> [arguments]
18903
19136
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
18904
19137
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
18905
19138
 
18906
- When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path132.join)(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
19139
+ When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path133.join)(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
18907
19140
  const subagentsSection = subagents ? `## Simulated Subagents
18908
19141
 
18909
19142
  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.
18910
19143
 
18911
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path132.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
19144
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path133.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
18912
19145
 
18913
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path132.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
19146
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path133.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
18914
19147
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
18915
19148
  const result = [
18916
19149
  overview,
@@ -18981,6 +19214,14 @@ async function processEmptyFeatureGeneration(params) {
18981
19214
  }
18982
19215
  return { count: totalCount, paths: [], hasDiff };
18983
19216
  }
19217
+ async function processFeatureWithRulesyncFiles(params) {
19218
+ const { config, processor, rulesyncFiles } = params;
19219
+ if (rulesyncFiles.length === 0) {
19220
+ return processEmptyFeatureGeneration({ config, processor });
19221
+ }
19222
+ const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19223
+ return processFeatureGeneration({ config, processor, toolFiles });
19224
+ }
18984
19225
  var SIMULATE_OPTION_MAP = {
18985
19226
  commands: "--simulate-commands",
18986
19227
  subagents: "--simulate-subagents",
@@ -19002,7 +19243,7 @@ function warnUnsupportedTargets(params) {
19002
19243
  }
19003
19244
  }
19004
19245
  async function checkRulesyncDirExists(params) {
19005
- return fileExists((0, import_node_path133.join)(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
19246
+ return fileExists((0, import_node_path134.join)(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
19006
19247
  }
19007
19248
  async function generate(params) {
19008
19249
  const { config, logger } = params;
@@ -19058,12 +19299,7 @@ async function generateRulesCore(params) {
19058
19299
  logger
19059
19300
  });
19060
19301
  const rulesyncFiles = await processor.loadRulesyncFiles();
19061
- const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19062
- const result = await processFeatureGeneration({
19063
- config,
19064
- processor,
19065
- toolFiles
19066
- });
19302
+ const result = await processFeatureWithRulesyncFiles({ config, processor, rulesyncFiles });
19067
19303
  totalCount += result.count;
19068
19304
  allPaths.push(...result.paths);
19069
19305
  if (result.hasDiff) hasDiff = true;
@@ -19099,20 +19335,7 @@ async function generateIgnoreCore(params) {
19099
19335
  logger
19100
19336
  });
19101
19337
  const rulesyncFiles = await processor.loadRulesyncFiles();
19102
- let result;
19103
- if (rulesyncFiles.length > 0) {
19104
- const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19105
- result = await processFeatureGeneration({
19106
- config,
19107
- processor,
19108
- toolFiles
19109
- });
19110
- } else {
19111
- result = await processEmptyFeatureGeneration({
19112
- config,
19113
- processor
19114
- });
19115
- }
19338
+ const result = await processFeatureWithRulesyncFiles({ config, processor, rulesyncFiles });
19116
19339
  totalCount += result.count;
19117
19340
  allPaths.push(...result.paths);
19118
19341
  if (result.hasDiff) hasDiff = true;
@@ -19152,12 +19375,7 @@ async function generateMcpCore(params) {
19152
19375
  logger
19153
19376
  });
19154
19377
  const rulesyncFiles = await processor.loadRulesyncFiles();
19155
- const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19156
- const result = await processFeatureGeneration({
19157
- config,
19158
- processor,
19159
- toolFiles
19160
- });
19378
+ const result = await processFeatureWithRulesyncFiles({ config, processor, rulesyncFiles });
19161
19379
  totalCount += result.count;
19162
19380
  allPaths.push(...result.paths);
19163
19381
  if (result.hasDiff) hasDiff = true;
@@ -19195,12 +19413,7 @@ async function generateCommandsCore(params) {
19195
19413
  logger
19196
19414
  });
19197
19415
  const rulesyncFiles = await processor.loadRulesyncFiles();
19198
- const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19199
- const result = await processFeatureGeneration({
19200
- config,
19201
- processor,
19202
- toolFiles
19203
- });
19416
+ const result = await processFeatureWithRulesyncFiles({ config, processor, rulesyncFiles });
19204
19417
  totalCount += result.count;
19205
19418
  allPaths.push(...result.paths);
19206
19419
  if (result.hasDiff) hasDiff = true;
@@ -19238,12 +19451,7 @@ async function generateSubagentsCore(params) {
19238
19451
  logger
19239
19452
  });
19240
19453
  const rulesyncFiles = await processor.loadRulesyncFiles();
19241
- const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19242
- const result = await processFeatureGeneration({
19243
- config,
19244
- processor,
19245
- toolFiles
19246
- });
19454
+ const result = await processFeatureWithRulesyncFiles({ config, processor, rulesyncFiles });
19247
19455
  totalCount += result.count;
19248
19456
  allPaths.push(...result.paths);
19249
19457
  if (result.hasDiff) hasDiff = true;
@@ -19326,20 +19534,7 @@ async function generateHooksCore(params) {
19326
19534
  logger
19327
19535
  });
19328
19536
  const rulesyncFiles = await processor.loadRulesyncFiles();
19329
- let result;
19330
- if (rulesyncFiles.length === 0) {
19331
- result = await processEmptyFeatureGeneration({
19332
- config,
19333
- processor
19334
- });
19335
- } else {
19336
- const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19337
- result = await processFeatureGeneration({
19338
- config,
19339
- processor,
19340
- toolFiles
19341
- });
19342
- }
19537
+ const result = await processFeatureWithRulesyncFiles({ config, processor, rulesyncFiles });
19343
19538
  totalCount += result.count;
19344
19539
  allPaths.push(...result.paths);
19345
19540
  if (result.hasDiff) hasDiff = true;