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.
@@ -607,7 +607,7 @@ function getBaseDirsInLightOfGlobal({
607
607
  }
608
608
 
609
609
  // src/lib/generate.ts
610
- import { join as join130 } from "path";
610
+ import { join as join131 } from "path";
611
611
  import { intersection } from "es-toolkit";
612
612
 
613
613
  // src/features/commands/commands-processor.ts
@@ -3345,7 +3345,7 @@ var CommandsProcessor = class extends FeatureProcessor {
3345
3345
  };
3346
3346
 
3347
3347
  // src/features/hooks/hooks-processor.ts
3348
- import { z as z19 } from "zod/mini";
3348
+ import { z as z20 } from "zod/mini";
3349
3349
 
3350
3350
  // src/types/hooks.ts
3351
3351
  import { z as z16 } from "zod/mini";
@@ -3458,6 +3458,13 @@ var GEMINICLI_HOOK_EVENTS = [
3458
3458
  "preCompact",
3459
3459
  "notification"
3460
3460
  ];
3461
+ var CODEXCLI_HOOK_EVENTS = [
3462
+ "sessionStart",
3463
+ "preToolUse",
3464
+ "postToolUse",
3465
+ "beforeSubmitPrompt",
3466
+ "stop"
3467
+ ];
3461
3468
  var hooksRecordSchema = z16.record(z16.string(), z16.array(HookDefinitionSchema));
3462
3469
  var HooksConfigSchema = z16.looseObject({
3463
3470
  version: z16.optional(z16.number()),
@@ -3469,6 +3476,7 @@ var HooksConfigSchema = z16.looseObject({
3469
3476
  kilo: z16.optional(z16.looseObject({ hooks: z16.optional(hooksRecordSchema) })),
3470
3477
  factorydroid: z16.optional(z16.looseObject({ hooks: z16.optional(hooksRecordSchema) })),
3471
3478
  geminicli: z16.optional(z16.looseObject({ hooks: z16.optional(hooksRecordSchema) })),
3479
+ codexcli: z16.optional(z16.looseObject({ hooks: z16.optional(hooksRecordSchema) })),
3472
3480
  deepagents: z16.optional(z16.looseObject({ hooks: z16.optional(hooksRecordSchema) }))
3473
3481
  });
3474
3482
  var CANONICAL_TO_CLAUDE_EVENT_NAMES = {
@@ -3567,6 +3575,16 @@ var CANONICAL_TO_GEMINICLI_EVENT_NAMES = {
3567
3575
  var GEMINICLI_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
3568
3576
  Object.entries(CANONICAL_TO_GEMINICLI_EVENT_NAMES).map(([k, v]) => [v, k])
3569
3577
  );
3578
+ var CANONICAL_TO_CODEXCLI_EVENT_NAMES = {
3579
+ sessionStart: "SessionStart",
3580
+ preToolUse: "PreToolUse",
3581
+ postToolUse: "PostToolUse",
3582
+ beforeSubmitPrompt: "UserPromptSubmit",
3583
+ stop: "Stop"
3584
+ };
3585
+ var CODEXCLI_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
3586
+ Object.entries(CANONICAL_TO_CODEXCLI_EVENT_NAMES).map(([k, v]) => [v, k])
3587
+ );
3570
3588
  var CANONICAL_TO_DEEPAGENTS_EVENT_NAMES = {
3571
3589
  sessionStart: "session.start",
3572
3590
  sessionEnd: "session.end",
@@ -3897,14 +3915,199 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
3897
3915
  }
3898
3916
  };
3899
3917
 
3900
- // src/features/hooks/copilot-hooks.ts
3918
+ // src/features/hooks/codexcli-hooks.ts
3901
3919
  import { join as join23 } from "path";
3920
+ import * as smolToml2 from "smol-toml";
3902
3921
  import { z as z17 } from "zod/mini";
3903
- var CopilotHookEntrySchema = z17.looseObject({
3904
- type: z17.string(),
3905
- bash: z17.optional(z17.string()),
3906
- powershell: z17.optional(z17.string()),
3907
- timeoutSec: z17.optional(z17.number())
3922
+ function canonicalToCodexcliHooks(config) {
3923
+ const codexSupported = new Set(CODEXCLI_HOOK_EVENTS);
3924
+ const sharedHooks = {};
3925
+ for (const [event, defs] of Object.entries(config.hooks)) {
3926
+ if (codexSupported.has(event)) {
3927
+ sharedHooks[event] = defs;
3928
+ }
3929
+ }
3930
+ const effectiveHooks = {
3931
+ ...sharedHooks,
3932
+ ...config.codexcli?.hooks
3933
+ };
3934
+ const codex = {};
3935
+ for (const [eventName, definitions] of Object.entries(effectiveHooks)) {
3936
+ const codexEventName = CANONICAL_TO_CODEXCLI_EVENT_NAMES[eventName] ?? eventName;
3937
+ const byMatcher = /* @__PURE__ */ new Map();
3938
+ for (const def of definitions) {
3939
+ const key = def.matcher ?? "";
3940
+ const list = byMatcher.get(key);
3941
+ if (list) list.push(def);
3942
+ else byMatcher.set(key, [def]);
3943
+ }
3944
+ const entries = [];
3945
+ for (const [matcherKey, defs] of byMatcher) {
3946
+ const commandDefs = defs.filter((def) => !def.type || def.type === "command");
3947
+ if (commandDefs.length === 0) continue;
3948
+ const hooks = commandDefs.map((def) => ({
3949
+ type: "command",
3950
+ ...def.command !== void 0 && def.command !== null && { command: def.command },
3951
+ ...def.timeout !== void 0 && def.timeout !== null && { timeout: def.timeout }
3952
+ }));
3953
+ entries.push(matcherKey ? { matcher: matcherKey, hooks } : { hooks });
3954
+ }
3955
+ if (entries.length > 0) {
3956
+ codex[codexEventName] = entries;
3957
+ }
3958
+ }
3959
+ return codex;
3960
+ }
3961
+ var CodexHookEntrySchema = z17.looseObject({
3962
+ type: z17.optional(z17.string()),
3963
+ command: z17.optional(z17.string()),
3964
+ timeout: z17.optional(z17.number())
3965
+ });
3966
+ var CodexMatcherEntrySchema = z17.looseObject({
3967
+ matcher: z17.optional(z17.string()),
3968
+ hooks: z17.optional(z17.array(CodexHookEntrySchema))
3969
+ });
3970
+ function codexcliHooksToCanonical(codexHooks) {
3971
+ if (codexHooks === null || codexHooks === void 0 || typeof codexHooks !== "object") {
3972
+ return {};
3973
+ }
3974
+ const canonical = {};
3975
+ for (const [codexEventName, matcherEntries] of Object.entries(codexHooks)) {
3976
+ const eventName = CODEXCLI_TO_CANONICAL_EVENT_NAMES[codexEventName] ?? codexEventName;
3977
+ if (!Array.isArray(matcherEntries)) continue;
3978
+ const defs = [];
3979
+ for (const rawEntry of matcherEntries) {
3980
+ const parseResult = CodexMatcherEntrySchema.safeParse(rawEntry);
3981
+ if (!parseResult.success) continue;
3982
+ const entry = parseResult.data;
3983
+ const hooks = entry.hooks ?? [];
3984
+ for (const h of hooks) {
3985
+ const hookType = h.type === "command" || h.type === "prompt" ? h.type : "command";
3986
+ defs.push({
3987
+ type: hookType,
3988
+ ...h.command !== void 0 && h.command !== null && { command: h.command },
3989
+ ...h.timeout !== void 0 && h.timeout !== null && { timeout: h.timeout },
3990
+ ...entry.matcher !== void 0 && entry.matcher !== null && entry.matcher !== "" && { matcher: entry.matcher }
3991
+ });
3992
+ }
3993
+ }
3994
+ if (defs.length > 0) {
3995
+ canonical[eventName] = defs;
3996
+ }
3997
+ }
3998
+ return canonical;
3999
+ }
4000
+ async function buildCodexConfigTomlContent({ baseDir }) {
4001
+ const configPath = join23(baseDir, ".codex", "config.toml");
4002
+ const existingContent = await readFileContentOrNull(configPath) ?? smolToml2.stringify({});
4003
+ const configToml = smolToml2.parse(existingContent);
4004
+ if (typeof configToml.features !== "object" || configToml.features === null) {
4005
+ configToml.features = {};
4006
+ }
4007
+ configToml.features.codex_hooks = true;
4008
+ return smolToml2.stringify(configToml);
4009
+ }
4010
+ var CodexcliConfigToml = class _CodexcliConfigToml extends ToolFile {
4011
+ validate() {
4012
+ return { success: true, error: null };
4013
+ }
4014
+ static async fromBaseDir({ baseDir }) {
4015
+ const fileContent = await buildCodexConfigTomlContent({ baseDir });
4016
+ return new _CodexcliConfigToml({
4017
+ baseDir,
4018
+ relativeDirPath: ".codex",
4019
+ relativeFilePath: "config.toml",
4020
+ fileContent
4021
+ });
4022
+ }
4023
+ };
4024
+ var CodexcliHooks = class _CodexcliHooks extends ToolHooks {
4025
+ constructor(params) {
4026
+ super({
4027
+ ...params,
4028
+ fileContent: params.fileContent ?? "{}"
4029
+ });
4030
+ }
4031
+ static getSettablePaths(_options = {}) {
4032
+ return { relativeDirPath: ".codex", relativeFilePath: "hooks.json" };
4033
+ }
4034
+ static async fromFile({
4035
+ baseDir = process.cwd(),
4036
+ validate = true,
4037
+ global = false
4038
+ }) {
4039
+ const paths = _CodexcliHooks.getSettablePaths({ global });
4040
+ const filePath = join23(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4041
+ const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4042
+ return new _CodexcliHooks({
4043
+ baseDir,
4044
+ relativeDirPath: paths.relativeDirPath,
4045
+ relativeFilePath: paths.relativeFilePath,
4046
+ fileContent,
4047
+ validate
4048
+ });
4049
+ }
4050
+ static async fromRulesyncHooks({
4051
+ baseDir = process.cwd(),
4052
+ rulesyncHooks,
4053
+ validate = true,
4054
+ global = false
4055
+ }) {
4056
+ const paths = _CodexcliHooks.getSettablePaths({ global });
4057
+ const config = rulesyncHooks.getJson();
4058
+ const codexHooks = canonicalToCodexcliHooks(config);
4059
+ const fileContent = JSON.stringify({ hooks: codexHooks }, null, 2);
4060
+ return new _CodexcliHooks({
4061
+ baseDir,
4062
+ relativeDirPath: paths.relativeDirPath,
4063
+ relativeFilePath: paths.relativeFilePath,
4064
+ fileContent,
4065
+ validate
4066
+ });
4067
+ }
4068
+ toRulesyncHooks() {
4069
+ let parsed;
4070
+ try {
4071
+ parsed = JSON.parse(this.getFileContent());
4072
+ } catch (error) {
4073
+ throw new Error(
4074
+ `Failed to parse Codex CLI hooks content in ${join23(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4075
+ {
4076
+ cause: error
4077
+ }
4078
+ );
4079
+ }
4080
+ const hooks = codexcliHooksToCanonical(parsed.hooks);
4081
+ return this.toRulesyncHooksDefault({
4082
+ fileContent: JSON.stringify({ version: 1, hooks }, null, 2)
4083
+ });
4084
+ }
4085
+ validate() {
4086
+ return { success: true, error: null };
4087
+ }
4088
+ static forDeletion({
4089
+ baseDir = process.cwd(),
4090
+ relativeDirPath,
4091
+ relativeFilePath
4092
+ }) {
4093
+ return new _CodexcliHooks({
4094
+ baseDir,
4095
+ relativeDirPath,
4096
+ relativeFilePath,
4097
+ fileContent: JSON.stringify({ hooks: {} }, null, 2),
4098
+ validate: false
4099
+ });
4100
+ }
4101
+ };
4102
+
4103
+ // src/features/hooks/copilot-hooks.ts
4104
+ import { join as join24 } from "path";
4105
+ import { z as z18 } from "zod/mini";
4106
+ var CopilotHookEntrySchema = z18.looseObject({
4107
+ type: z18.string(),
4108
+ bash: z18.optional(z18.string()),
4109
+ powershell: z18.optional(z18.string()),
4110
+ timeoutSec: z18.optional(z18.number())
3908
4111
  });
3909
4112
  function canonicalToCopilotHooks(config) {
3910
4113
  const canonicalSchemaKeys = Object.keys(HookDefinitionSchema.shape);
@@ -4001,7 +4204,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
4001
4204
  }
4002
4205
  static getSettablePaths(_options = {}) {
4003
4206
  return {
4004
- relativeDirPath: join23(".github", "hooks"),
4207
+ relativeDirPath: join24(".github", "hooks"),
4005
4208
  relativeFilePath: "copilot-hooks.json"
4006
4209
  };
4007
4210
  }
@@ -4011,7 +4214,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
4011
4214
  global = false
4012
4215
  }) {
4013
4216
  const paths = _CopilotHooks.getSettablePaths({ global });
4014
- const filePath = join23(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4217
+ const filePath = join24(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4015
4218
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4016
4219
  return new _CopilotHooks({
4017
4220
  baseDir,
@@ -4044,7 +4247,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
4044
4247
  parsed = JSON.parse(this.getFileContent());
4045
4248
  } catch (error) {
4046
4249
  throw new Error(
4047
- `Failed to parse Copilot hooks content in ${join23(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4250
+ `Failed to parse Copilot hooks content in ${join24(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4048
4251
  {
4049
4252
  cause: error
4050
4253
  }
@@ -4074,7 +4277,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
4074
4277
  };
4075
4278
 
4076
4279
  // src/features/hooks/cursor-hooks.ts
4077
- import { join as join24 } from "path";
4280
+ import { join as join25 } from "path";
4078
4281
  var CursorHooks = class _CursorHooks extends ToolHooks {
4079
4282
  constructor(params) {
4080
4283
  const { rulesyncHooks: _r, ...rest } = params;
@@ -4095,7 +4298,7 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
4095
4298
  }) {
4096
4299
  const paths = _CursorHooks.getSettablePaths();
4097
4300
  const fileContent = await readFileContent(
4098
- join24(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4301
+ join25(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4099
4302
  );
4100
4303
  return new _CursorHooks({
4101
4304
  baseDir,
@@ -4182,7 +4385,7 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
4182
4385
  };
4183
4386
 
4184
4387
  // src/features/hooks/deepagents-hooks.ts
4185
- import { join as join25 } from "path";
4388
+ import { join as join26 } from "path";
4186
4389
  function isDeepagentsHooksFile(val) {
4187
4390
  if (typeof val !== "object" || val === null || !("hooks" in val)) return false;
4188
4391
  return Array.isArray(val.hooks);
@@ -4257,7 +4460,7 @@ var DeepagentsHooks = class _DeepagentsHooks extends ToolHooks {
4257
4460
  global = false
4258
4461
  }) {
4259
4462
  const paths = _DeepagentsHooks.getSettablePaths({ global });
4260
- const filePath = join25(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4463
+ const filePath = join26(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4261
4464
  const fileContent = await readFileContentOrNull(filePath) ?? JSON.stringify({ hooks: [] }, null, 2);
4262
4465
  return new _DeepagentsHooks({
4263
4466
  baseDir,
@@ -4291,7 +4494,7 @@ var DeepagentsHooks = class _DeepagentsHooks extends ToolHooks {
4291
4494
  parsed = JSON.parse(this.getFileContent());
4292
4495
  } catch (error) {
4293
4496
  throw new Error(
4294
- `Failed to parse deepagents hooks content in ${join25(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4497
+ `Failed to parse deepagents hooks content in ${join26(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4295
4498
  { cause: error }
4296
4499
  );
4297
4500
  }
@@ -4320,7 +4523,7 @@ var DeepagentsHooks = class _DeepagentsHooks extends ToolHooks {
4320
4523
  };
4321
4524
 
4322
4525
  // src/features/hooks/factorydroid-hooks.ts
4323
- import { join as join26 } from "path";
4526
+ import { join as join27 } from "path";
4324
4527
  var FACTORYDROID_CONVERTER_CONFIG = {
4325
4528
  supportedEvents: FACTORYDROID_HOOK_EVENTS,
4326
4529
  canonicalToToolEventNames: CANONICAL_TO_FACTORYDROID_EVENT_NAMES,
@@ -4346,7 +4549,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4346
4549
  global = false
4347
4550
  }) {
4348
4551
  const paths = _FactorydroidHooks.getSettablePaths({ global });
4349
- const filePath = join26(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4552
+ const filePath = join27(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4350
4553
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4351
4554
  return new _FactorydroidHooks({
4352
4555
  baseDir,
@@ -4364,7 +4567,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4364
4567
  logger
4365
4568
  }) {
4366
4569
  const paths = _FactorydroidHooks.getSettablePaths({ global });
4367
- const filePath = join26(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4570
+ const filePath = join27(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4368
4571
  const existingContent = await readOrInitializeFileContent(
4369
4572
  filePath,
4370
4573
  JSON.stringify({}, null, 2)
@@ -4401,7 +4604,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4401
4604
  settings = JSON.parse(this.getFileContent());
4402
4605
  } catch (error) {
4403
4606
  throw new Error(
4404
- `Failed to parse Factory Droid hooks content in ${join26(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4607
+ `Failed to parse Factory Droid hooks content in ${join27(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4405
4608
  {
4406
4609
  cause: error
4407
4610
  }
@@ -4434,8 +4637,8 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4434
4637
  };
4435
4638
 
4436
4639
  // src/features/hooks/geminicli-hooks.ts
4437
- import { join as join27 } from "path";
4438
- import { z as z18 } from "zod/mini";
4640
+ import { join as join28 } from "path";
4641
+ import { z as z19 } from "zod/mini";
4439
4642
  function canonicalToGeminicliHooks(config) {
4440
4643
  const geminiSupported = new Set(GEMINICLI_HOOK_EVENTS);
4441
4644
  const sharedHooks = {};
@@ -4479,16 +4682,16 @@ function canonicalToGeminicliHooks(config) {
4479
4682
  }
4480
4683
  return gemini;
4481
4684
  }
4482
- var GeminiHookEntrySchema = z18.looseObject({
4483
- type: z18.optional(z18.string()),
4484
- command: z18.optional(z18.string()),
4485
- timeout: z18.optional(z18.number()),
4486
- name: z18.optional(z18.string()),
4487
- description: z18.optional(z18.string())
4685
+ var GeminiHookEntrySchema = z19.looseObject({
4686
+ type: z19.optional(z19.string()),
4687
+ command: z19.optional(z19.string()),
4688
+ timeout: z19.optional(z19.number()),
4689
+ name: z19.optional(z19.string()),
4690
+ description: z19.optional(z19.string())
4488
4691
  });
4489
- var GeminiMatcherEntrySchema = z18.looseObject({
4490
- matcher: z18.optional(z18.string()),
4491
- hooks: z18.optional(z18.array(GeminiHookEntrySchema))
4692
+ var GeminiMatcherEntrySchema = z19.looseObject({
4693
+ matcher: z19.optional(z19.string()),
4694
+ hooks: z19.optional(z19.array(GeminiHookEntrySchema))
4492
4695
  });
4493
4696
  function geminiHooksToCanonical(geminiHooks) {
4494
4697
  if (geminiHooks === null || geminiHooks === void 0 || typeof geminiHooks !== "object") {
@@ -4543,7 +4746,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4543
4746
  global = false
4544
4747
  }) {
4545
4748
  const paths = _GeminicliHooks.getSettablePaths({ global });
4546
- const filePath = join27(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4749
+ const filePath = join28(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4547
4750
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4548
4751
  return new _GeminicliHooks({
4549
4752
  baseDir,
@@ -4560,7 +4763,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4560
4763
  global = false
4561
4764
  }) {
4562
4765
  const paths = _GeminicliHooks.getSettablePaths({ global });
4563
- const filePath = join27(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4766
+ const filePath = join28(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4564
4767
  const existingContent = await readOrInitializeFileContent(
4565
4768
  filePath,
4566
4769
  JSON.stringify({}, null, 2)
@@ -4592,7 +4795,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4592
4795
  settings = JSON.parse(this.getFileContent());
4593
4796
  } catch (error) {
4594
4797
  throw new Error(
4595
- `Failed to parse Gemini CLI hooks content in ${join27(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4798
+ `Failed to parse Gemini CLI hooks content in ${join28(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4596
4799
  {
4597
4800
  cause: error
4598
4801
  }
@@ -4622,7 +4825,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4622
4825
  };
4623
4826
 
4624
4827
  // src/features/hooks/kilo-hooks.ts
4625
- import { join as join28 } from "path";
4828
+ import { join as join29 } from "path";
4626
4829
 
4627
4830
  // src/features/hooks/opencode-style-generator.ts
4628
4831
  var NAMED_HOOKS = /* @__PURE__ */ new Set(["tool.execute.before", "tool.execute.after"]);
@@ -4721,7 +4924,7 @@ var KiloHooks = class _KiloHooks extends ToolHooks {
4721
4924
  }
4722
4925
  static getSettablePaths(options) {
4723
4926
  return {
4724
- relativeDirPath: options?.global ? join28(".config", "kilo", "plugins") : join28(".kilo", "plugins"),
4927
+ relativeDirPath: options?.global ? join29(".config", "kilo", "plugins") : join29(".kilo", "plugins"),
4725
4928
  relativeFilePath: "rulesync-hooks.js"
4726
4929
  };
4727
4930
  }
@@ -4732,7 +4935,7 @@ var KiloHooks = class _KiloHooks extends ToolHooks {
4732
4935
  }) {
4733
4936
  const paths = _KiloHooks.getSettablePaths({ global });
4734
4937
  const fileContent = await readFileContent(
4735
- join28(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4938
+ join29(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4736
4939
  );
4737
4940
  return new _KiloHooks({
4738
4941
  baseDir,
@@ -4786,7 +4989,7 @@ var KiloHooks = class _KiloHooks extends ToolHooks {
4786
4989
  };
4787
4990
 
4788
4991
  // src/features/hooks/opencode-hooks.ts
4789
- import { join as join29 } from "path";
4992
+ import { join as join30 } from "path";
4790
4993
  var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4791
4994
  constructor(params) {
4792
4995
  super({
@@ -4796,7 +4999,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4796
4999
  }
4797
5000
  static getSettablePaths(options) {
4798
5001
  return {
4799
- relativeDirPath: options?.global ? join29(".config", "opencode", "plugins") : join29(".opencode", "plugins"),
5002
+ relativeDirPath: options?.global ? join30(".config", "opencode", "plugins") : join30(".opencode", "plugins"),
4800
5003
  relativeFilePath: "rulesync-hooks.js"
4801
5004
  };
4802
5005
  }
@@ -4807,7 +5010,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4807
5010
  }) {
4808
5011
  const paths = _OpencodeHooks.getSettablePaths({ global });
4809
5012
  const fileContent = await readFileContent(
4810
- join29(baseDir, paths.relativeDirPath, paths.relativeFilePath)
5013
+ join30(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4811
5014
  );
4812
5015
  return new _OpencodeHooks({
4813
5016
  baseDir,
@@ -4865,13 +5068,14 @@ var hooksProcessorToolTargetTuple = [
4865
5068
  "kilo",
4866
5069
  "cursor",
4867
5070
  "claudecode",
5071
+ "codexcli",
4868
5072
  "copilot",
4869
5073
  "opencode",
4870
5074
  "factorydroid",
4871
5075
  "geminicli",
4872
5076
  "deepagents"
4873
5077
  ];
4874
- var HooksProcessorToolTargetSchema = z19.enum(hooksProcessorToolTargetTuple);
5078
+ var HooksProcessorToolTargetSchema = z20.enum(hooksProcessorToolTargetTuple);
4875
5079
  var toolHooksFactories = /* @__PURE__ */ new Map([
4876
5080
  [
4877
5081
  "cursor",
@@ -4901,6 +5105,20 @@ var toolHooksFactories = /* @__PURE__ */ new Map([
4901
5105
  supportsMatcher: true
4902
5106
  }
4903
5107
  ],
5108
+ [
5109
+ "codexcli",
5110
+ {
5111
+ class: CodexcliHooks,
5112
+ meta: {
5113
+ supportsProject: true,
5114
+ supportsGlobal: true,
5115
+ supportsImport: true
5116
+ },
5117
+ supportedEvents: CODEXCLI_HOOK_EVENTS,
5118
+ supportedHookTypes: ["command"],
5119
+ supportsMatcher: true
5120
+ }
5121
+ ],
4904
5122
  [
4905
5123
  "copilot",
4906
5124
  {
@@ -5017,7 +5235,9 @@ var HooksProcessor = class extends FeatureProcessor {
5017
5235
  return [];
5018
5236
  }
5019
5237
  }
5020
- async loadToolFiles({ forDeletion = false } = {}) {
5238
+ async loadToolFiles({
5239
+ forDeletion = false
5240
+ } = {}) {
5021
5241
  try {
5022
5242
  const factory = toolHooksFactories.get(this.toolTarget);
5023
5243
  if (!factory) throw new Error(`Unsupported tool target: ${this.toolTarget}`);
@@ -5113,7 +5333,11 @@ var HooksProcessor = class extends FeatureProcessor {
5113
5333
  validate: true,
5114
5334
  global: this.global
5115
5335
  });
5116
- return [toolHooks];
5336
+ const result = [toolHooks];
5337
+ if (this.toolTarget === "codexcli") {
5338
+ result.push(await CodexcliConfigToml.fromBaseDir({ baseDir: this.baseDir }));
5339
+ }
5340
+ return result;
5117
5341
  }
5118
5342
  async convertToolFilesToRulesyncFiles(toolFiles) {
5119
5343
  const hooks = toolFiles.filter((f) => f instanceof ToolHooks);
@@ -5131,13 +5355,13 @@ var HooksProcessor = class extends FeatureProcessor {
5131
5355
  };
5132
5356
 
5133
5357
  // src/features/ignore/ignore-processor.ts
5134
- import { z as z20 } from "zod/mini";
5358
+ import { z as z21 } from "zod/mini";
5135
5359
 
5136
5360
  // src/features/ignore/augmentcode-ignore.ts
5137
- import { join as join31 } from "path";
5361
+ import { join as join32 } from "path";
5138
5362
 
5139
5363
  // src/features/ignore/rulesync-ignore.ts
5140
- import { join as join30 } from "path";
5364
+ import { join as join31 } from "path";
5141
5365
  var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
5142
5366
  validate() {
5143
5367
  return { success: true, error: null };
@@ -5157,12 +5381,12 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
5157
5381
  static async fromFile() {
5158
5382
  const baseDir = process.cwd();
5159
5383
  const paths = this.getSettablePaths();
5160
- const recommendedPath = join30(
5384
+ const recommendedPath = join31(
5161
5385
  baseDir,
5162
5386
  paths.recommended.relativeDirPath,
5163
5387
  paths.recommended.relativeFilePath
5164
5388
  );
5165
- const legacyPath = join30(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5389
+ const legacyPath = join31(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5166
5390
  if (await fileExists(recommendedPath)) {
5167
5391
  const fileContent2 = await readFileContent(recommendedPath);
5168
5392
  return new _RulesyncIgnore({
@@ -5278,7 +5502,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
5278
5502
  validate = true
5279
5503
  }) {
5280
5504
  const fileContent = await readFileContent(
5281
- join31(
5505
+ join32(
5282
5506
  baseDir,
5283
5507
  this.getSettablePaths().relativeDirPath,
5284
5508
  this.getSettablePaths().relativeFilePath
@@ -5308,7 +5532,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
5308
5532
  };
5309
5533
 
5310
5534
  // src/features/ignore/claudecode-ignore.ts
5311
- import { join as join32 } from "path";
5535
+ import { join as join33 } from "path";
5312
5536
  import { uniq } from "es-toolkit";
5313
5537
  var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
5314
5538
  constructor(params) {
@@ -5351,7 +5575,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
5351
5575
  const fileContent = rulesyncIgnore.getFileContent();
5352
5576
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
5353
5577
  const deniedValues = patterns.map((pattern) => `Read(${pattern})`);
5354
- const filePath = join32(
5578
+ const filePath = join33(
5355
5579
  baseDir,
5356
5580
  this.getSettablePaths().relativeDirPath,
5357
5581
  this.getSettablePaths().relativeFilePath
@@ -5387,7 +5611,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
5387
5611
  validate = true
5388
5612
  }) {
5389
5613
  const fileContent = await readFileContent(
5390
- join32(
5614
+ join33(
5391
5615
  baseDir,
5392
5616
  this.getSettablePaths().relativeDirPath,
5393
5617
  this.getSettablePaths().relativeFilePath
@@ -5417,7 +5641,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
5417
5641
  };
5418
5642
 
5419
5643
  // src/features/ignore/cline-ignore.ts
5420
- import { join as join33 } from "path";
5644
+ import { join as join34 } from "path";
5421
5645
  var ClineIgnore = class _ClineIgnore extends ToolIgnore {
5422
5646
  static getSettablePaths() {
5423
5647
  return {
@@ -5454,7 +5678,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
5454
5678
  validate = true
5455
5679
  }) {
5456
5680
  const fileContent = await readFileContent(
5457
- join33(
5681
+ join34(
5458
5682
  baseDir,
5459
5683
  this.getSettablePaths().relativeDirPath,
5460
5684
  this.getSettablePaths().relativeFilePath
@@ -5484,7 +5708,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
5484
5708
  };
5485
5709
 
5486
5710
  // src/features/ignore/cursor-ignore.ts
5487
- import { join as join34 } from "path";
5711
+ import { join as join35 } from "path";
5488
5712
  var CursorIgnore = class _CursorIgnore extends ToolIgnore {
5489
5713
  static getSettablePaths() {
5490
5714
  return {
@@ -5517,7 +5741,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
5517
5741
  validate = true
5518
5742
  }) {
5519
5743
  const fileContent = await readFileContent(
5520
- join34(
5744
+ join35(
5521
5745
  baseDir,
5522
5746
  this.getSettablePaths().relativeDirPath,
5523
5747
  this.getSettablePaths().relativeFilePath
@@ -5547,7 +5771,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
5547
5771
  };
5548
5772
 
5549
5773
  // src/features/ignore/geminicli-ignore.ts
5550
- import { join as join35 } from "path";
5774
+ import { join as join36 } from "path";
5551
5775
  var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
5552
5776
  static getSettablePaths() {
5553
5777
  return {
@@ -5574,7 +5798,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
5574
5798
  validate = true
5575
5799
  }) {
5576
5800
  const fileContent = await readFileContent(
5577
- join35(
5801
+ join36(
5578
5802
  baseDir,
5579
5803
  this.getSettablePaths().relativeDirPath,
5580
5804
  this.getSettablePaths().relativeFilePath
@@ -5604,7 +5828,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
5604
5828
  };
5605
5829
 
5606
5830
  // src/features/ignore/goose-ignore.ts
5607
- import { join as join36 } from "path";
5831
+ import { join as join37 } from "path";
5608
5832
  var GooseIgnore = class _GooseIgnore extends ToolIgnore {
5609
5833
  static getSettablePaths() {
5610
5834
  return {
@@ -5641,7 +5865,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
5641
5865
  validate = true
5642
5866
  }) {
5643
5867
  const fileContent = await readFileContent(
5644
- join36(
5868
+ join37(
5645
5869
  baseDir,
5646
5870
  this.getSettablePaths().relativeDirPath,
5647
5871
  this.getSettablePaths().relativeFilePath
@@ -5671,7 +5895,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
5671
5895
  };
5672
5896
 
5673
5897
  // src/features/ignore/junie-ignore.ts
5674
- import { join as join37 } from "path";
5898
+ import { join as join38 } from "path";
5675
5899
  var JunieIgnore = class _JunieIgnore extends ToolIgnore {
5676
5900
  static getSettablePaths() {
5677
5901
  return {
@@ -5698,7 +5922,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
5698
5922
  validate = true
5699
5923
  }) {
5700
5924
  const fileContent = await readFileContent(
5701
- join37(
5925
+ join38(
5702
5926
  baseDir,
5703
5927
  this.getSettablePaths().relativeDirPath,
5704
5928
  this.getSettablePaths().relativeFilePath
@@ -5728,7 +5952,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
5728
5952
  };
5729
5953
 
5730
5954
  // src/features/ignore/kilo-ignore.ts
5731
- import { join as join38 } from "path";
5955
+ import { join as join39 } from "path";
5732
5956
  var KiloIgnore = class _KiloIgnore extends ToolIgnore {
5733
5957
  static getSettablePaths() {
5734
5958
  return {
@@ -5765,7 +5989,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
5765
5989
  validate = true
5766
5990
  }) {
5767
5991
  const fileContent = await readFileContent(
5768
- join38(
5992
+ join39(
5769
5993
  baseDir,
5770
5994
  this.getSettablePaths().relativeDirPath,
5771
5995
  this.getSettablePaths().relativeFilePath
@@ -5795,7 +6019,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
5795
6019
  };
5796
6020
 
5797
6021
  // src/features/ignore/kiro-ignore.ts
5798
- import { join as join39 } from "path";
6022
+ import { join as join40 } from "path";
5799
6023
  var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5800
6024
  static getSettablePaths() {
5801
6025
  return {
@@ -5822,7 +6046,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5822
6046
  validate = true
5823
6047
  }) {
5824
6048
  const fileContent = await readFileContent(
5825
- join39(
6049
+ join40(
5826
6050
  baseDir,
5827
6051
  this.getSettablePaths().relativeDirPath,
5828
6052
  this.getSettablePaths().relativeFilePath
@@ -5852,7 +6076,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5852
6076
  };
5853
6077
 
5854
6078
  // src/features/ignore/qwencode-ignore.ts
5855
- import { join as join40 } from "path";
6079
+ import { join as join41 } from "path";
5856
6080
  var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5857
6081
  static getSettablePaths() {
5858
6082
  return {
@@ -5879,7 +6103,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5879
6103
  validate = true
5880
6104
  }) {
5881
6105
  const fileContent = await readFileContent(
5882
- join40(
6106
+ join41(
5883
6107
  baseDir,
5884
6108
  this.getSettablePaths().relativeDirPath,
5885
6109
  this.getSettablePaths().relativeFilePath
@@ -5909,7 +6133,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5909
6133
  };
5910
6134
 
5911
6135
  // src/features/ignore/roo-ignore.ts
5912
- import { join as join41 } from "path";
6136
+ import { join as join42 } from "path";
5913
6137
  var RooIgnore = class _RooIgnore extends ToolIgnore {
5914
6138
  static getSettablePaths() {
5915
6139
  return {
@@ -5936,7 +6160,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
5936
6160
  validate = true
5937
6161
  }) {
5938
6162
  const fileContent = await readFileContent(
5939
- join41(
6163
+ join42(
5940
6164
  baseDir,
5941
6165
  this.getSettablePaths().relativeDirPath,
5942
6166
  this.getSettablePaths().relativeFilePath
@@ -5966,7 +6190,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
5966
6190
  };
5967
6191
 
5968
6192
  // src/features/ignore/windsurf-ignore.ts
5969
- import { join as join42 } from "path";
6193
+ import { join as join43 } from "path";
5970
6194
  var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5971
6195
  static getSettablePaths() {
5972
6196
  return {
@@ -5993,7 +6217,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5993
6217
  validate = true
5994
6218
  }) {
5995
6219
  const fileContent = await readFileContent(
5996
- join42(
6220
+ join43(
5997
6221
  baseDir,
5998
6222
  this.getSettablePaths().relativeDirPath,
5999
6223
  this.getSettablePaths().relativeFilePath
@@ -6023,7 +6247,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
6023
6247
  };
6024
6248
 
6025
6249
  // src/features/ignore/zed-ignore.ts
6026
- import { join as join43 } from "path";
6250
+ import { join as join44 } from "path";
6027
6251
  import { uniq as uniq2 } from "es-toolkit";
6028
6252
  var ZedIgnore = class _ZedIgnore extends ToolIgnore {
6029
6253
  constructor(params) {
@@ -6060,7 +6284,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
6060
6284
  }) {
6061
6285
  const fileContent = rulesyncIgnore.getFileContent();
6062
6286
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
6063
- const filePath = join43(
6287
+ const filePath = join44(
6064
6288
  baseDir,
6065
6289
  this.getSettablePaths().relativeDirPath,
6066
6290
  this.getSettablePaths().relativeFilePath
@@ -6087,7 +6311,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
6087
6311
  validate = true
6088
6312
  }) {
6089
6313
  const fileContent = await readFileContent(
6090
- join43(
6314
+ join44(
6091
6315
  baseDir,
6092
6316
  this.getSettablePaths().relativeDirPath,
6093
6317
  this.getSettablePaths().relativeFilePath
@@ -6133,7 +6357,7 @@ var ignoreProcessorToolTargets = [
6133
6357
  "windsurf",
6134
6358
  "zed"
6135
6359
  ];
6136
- var IgnoreProcessorToolTargetSchema = z20.enum(ignoreProcessorToolTargets);
6360
+ var IgnoreProcessorToolTargetSchema = z21.enum(ignoreProcessorToolTargets);
6137
6361
  var toolIgnoreFactories = /* @__PURE__ */ new Map([
6138
6362
  ["augmentcode", { class: AugmentcodeIgnore }],
6139
6363
  ["claudecode", { class: ClaudecodeIgnore }],
@@ -6272,55 +6496,55 @@ var IgnoreProcessor = class extends FeatureProcessor {
6272
6496
  };
6273
6497
 
6274
6498
  // src/features/mcp/mcp-processor.ts
6275
- import { z as z25 } from "zod/mini";
6499
+ import { z as z26 } from "zod/mini";
6276
6500
 
6277
6501
  // src/features/mcp/claudecode-mcp.ts
6278
- import { join as join45 } from "path";
6502
+ import { join as join46 } from "path";
6279
6503
 
6280
6504
  // src/features/mcp/rulesync-mcp.ts
6281
- import { join as join44 } from "path";
6505
+ import { join as join45 } from "path";
6282
6506
  import { omit } from "es-toolkit/object";
6283
- import { z as z22 } from "zod/mini";
6507
+ import { z as z23 } from "zod/mini";
6284
6508
 
6285
6509
  // src/types/mcp.ts
6286
- import { z as z21 } from "zod/mini";
6287
- var McpServerSchema = z21.looseObject({
6288
- type: z21.optional(z21.enum(["local", "stdio", "sse", "http"])),
6289
- command: z21.optional(z21.union([z21.string(), z21.array(z21.string())])),
6290
- args: z21.optional(z21.array(z21.string())),
6291
- url: z21.optional(z21.string()),
6292
- httpUrl: z21.optional(z21.string()),
6293
- env: z21.optional(z21.record(z21.string(), z21.string())),
6294
- disabled: z21.optional(z21.boolean()),
6295
- networkTimeout: z21.optional(z21.number()),
6296
- timeout: z21.optional(z21.number()),
6297
- trust: z21.optional(z21.boolean()),
6298
- cwd: z21.optional(z21.string()),
6299
- transport: z21.optional(z21.enum(["local", "stdio", "sse", "http"])),
6300
- alwaysAllow: z21.optional(z21.array(z21.string())),
6301
- tools: z21.optional(z21.array(z21.string())),
6302
- kiroAutoApprove: z21.optional(z21.array(z21.string())),
6303
- kiroAutoBlock: z21.optional(z21.array(z21.string())),
6304
- headers: z21.optional(z21.record(z21.string(), z21.string())),
6305
- enabledTools: z21.optional(z21.array(z21.string())),
6306
- disabledTools: z21.optional(z21.array(z21.string()))
6510
+ import { z as z22 } from "zod/mini";
6511
+ var McpServerSchema = z22.looseObject({
6512
+ type: z22.optional(z22.enum(["local", "stdio", "sse", "http"])),
6513
+ command: z22.optional(z22.union([z22.string(), z22.array(z22.string())])),
6514
+ args: z22.optional(z22.array(z22.string())),
6515
+ url: z22.optional(z22.string()),
6516
+ httpUrl: z22.optional(z22.string()),
6517
+ env: z22.optional(z22.record(z22.string(), z22.string())),
6518
+ disabled: z22.optional(z22.boolean()),
6519
+ networkTimeout: z22.optional(z22.number()),
6520
+ timeout: z22.optional(z22.number()),
6521
+ trust: z22.optional(z22.boolean()),
6522
+ cwd: z22.optional(z22.string()),
6523
+ transport: z22.optional(z22.enum(["local", "stdio", "sse", "http"])),
6524
+ alwaysAllow: z22.optional(z22.array(z22.string())),
6525
+ tools: z22.optional(z22.array(z22.string())),
6526
+ kiroAutoApprove: z22.optional(z22.array(z22.string())),
6527
+ kiroAutoBlock: z22.optional(z22.array(z22.string())),
6528
+ headers: z22.optional(z22.record(z22.string(), z22.string())),
6529
+ enabledTools: z22.optional(z22.array(z22.string())),
6530
+ disabledTools: z22.optional(z22.array(z22.string()))
6307
6531
  });
6308
- var McpServersSchema = z21.record(z21.string(), McpServerSchema);
6532
+ var McpServersSchema = z22.record(z22.string(), McpServerSchema);
6309
6533
  function isMcpServers(value) {
6310
6534
  return value !== void 0 && value !== null && typeof value === "object" && !Array.isArray(value);
6311
6535
  }
6312
6536
 
6313
6537
  // src/features/mcp/rulesync-mcp.ts
6314
- var RulesyncMcpServerSchema = z22.extend(McpServerSchema, {
6315
- targets: z22.optional(RulesyncTargetsSchema),
6316
- description: z22.optional(z22.string()),
6317
- exposed: z22.optional(z22.boolean())
6538
+ var RulesyncMcpServerSchema = z23.extend(McpServerSchema, {
6539
+ targets: z23.optional(RulesyncTargetsSchema),
6540
+ description: z23.optional(z23.string()),
6541
+ exposed: z23.optional(z23.boolean())
6318
6542
  });
6319
- var RulesyncMcpConfigSchema = z22.object({
6320
- mcpServers: z22.record(z22.string(), RulesyncMcpServerSchema)
6543
+ var RulesyncMcpConfigSchema = z23.object({
6544
+ mcpServers: z23.record(z23.string(), RulesyncMcpServerSchema)
6321
6545
  });
6322
- var RulesyncMcpFileSchema = z22.looseObject({
6323
- $schema: z22.optional(z22.string()),
6546
+ var RulesyncMcpFileSchema = z23.looseObject({
6547
+ $schema: z23.optional(z23.string()),
6324
6548
  ...RulesyncMcpConfigSchema.shape
6325
6549
  });
6326
6550
  var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
@@ -6360,12 +6584,12 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
6360
6584
  }) {
6361
6585
  const baseDir = process.cwd();
6362
6586
  const paths = this.getSettablePaths();
6363
- const recommendedPath = join44(
6587
+ const recommendedPath = join45(
6364
6588
  baseDir,
6365
6589
  paths.recommended.relativeDirPath,
6366
6590
  paths.recommended.relativeFilePath
6367
6591
  );
6368
- const legacyPath = join44(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
6592
+ const legacyPath = join45(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
6369
6593
  if (await fileExists(recommendedPath)) {
6370
6594
  const fileContent2 = await readFileContent(recommendedPath);
6371
6595
  return new _RulesyncMcp({
@@ -6519,7 +6743,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
6519
6743
  global = false
6520
6744
  }) {
6521
6745
  const paths = this.getSettablePaths({ global });
6522
- const fileContent = await readFileContentOrNull(join45(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6746
+ const fileContent = await readFileContentOrNull(join46(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6523
6747
  const json = JSON.parse(fileContent);
6524
6748
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
6525
6749
  return new _ClaudecodeMcp({
@@ -6538,7 +6762,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
6538
6762
  }) {
6539
6763
  const paths = this.getSettablePaths({ global });
6540
6764
  const fileContent = await readOrInitializeFileContent(
6541
- join45(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6765
+ join46(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6542
6766
  JSON.stringify({ mcpServers: {} }, null, 2)
6543
6767
  );
6544
6768
  const json = JSON.parse(fileContent);
@@ -6577,7 +6801,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
6577
6801
  };
6578
6802
 
6579
6803
  // src/features/mcp/cline-mcp.ts
6580
- import { join as join46 } from "path";
6804
+ import { join as join47 } from "path";
6581
6805
  var ClineMcp = class _ClineMcp extends ToolMcp {
6582
6806
  json;
6583
6807
  constructor(params) {
@@ -6598,7 +6822,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
6598
6822
  validate = true
6599
6823
  }) {
6600
6824
  const fileContent = await readFileContent(
6601
- join46(
6825
+ join47(
6602
6826
  baseDir,
6603
6827
  this.getSettablePaths().relativeDirPath,
6604
6828
  this.getSettablePaths().relativeFilePath
@@ -6647,8 +6871,8 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
6647
6871
  };
6648
6872
 
6649
6873
  // src/features/mcp/codexcli-mcp.ts
6650
- import { join as join47 } from "path";
6651
- import * as smolToml2 from "smol-toml";
6874
+ import { join as join48 } from "path";
6875
+ import * as smolToml3 from "smol-toml";
6652
6876
  function convertFromCodexFormat(codexMcp) {
6653
6877
  const result = {};
6654
6878
  for (const [name, config] of Object.entries(codexMcp)) {
@@ -6701,7 +6925,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6701
6925
  ...rest,
6702
6926
  validate: false
6703
6927
  });
6704
- this.toml = smolToml2.parse(this.fileContent);
6928
+ this.toml = smolToml3.parse(this.fileContent);
6705
6929
  if (rest.validate) {
6706
6930
  const result = this.validate();
6707
6931
  if (!result.success) {
@@ -6730,7 +6954,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6730
6954
  global = false
6731
6955
  }) {
6732
6956
  const paths = this.getSettablePaths({ global });
6733
- const fileContent = await readFileContentOrNull(join47(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml2.stringify({});
6957
+ const fileContent = await readFileContentOrNull(join48(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml3.stringify({});
6734
6958
  return new _CodexcliMcp({
6735
6959
  baseDir,
6736
6960
  relativeDirPath: paths.relativeDirPath,
@@ -6746,12 +6970,12 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6746
6970
  global = false
6747
6971
  }) {
6748
6972
  const paths = this.getSettablePaths({ global });
6749
- const configTomlFilePath = join47(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6973
+ const configTomlFilePath = join48(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6750
6974
  const configTomlFileContent = await readOrInitializeFileContent(
6751
6975
  configTomlFilePath,
6752
- smolToml2.stringify({})
6976
+ smolToml3.stringify({})
6753
6977
  );
6754
- const configToml = smolToml2.parse(configTomlFileContent);
6978
+ const configToml = smolToml3.parse(configTomlFileContent);
6755
6979
  const mcpServers = rulesyncMcp.getJson().mcpServers;
6756
6980
  const converted = convertToCodexFormat(mcpServers);
6757
6981
  const filteredMcpServers = this.removeEmptyEntries(converted);
@@ -6760,7 +6984,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6760
6984
  baseDir,
6761
6985
  relativeDirPath: paths.relativeDirPath,
6762
6986
  relativeFilePath: paths.relativeFilePath,
6763
- fileContent: smolToml2.stringify(configToml),
6987
+ fileContent: smolToml3.stringify(configToml),
6764
6988
  validate
6765
6989
  });
6766
6990
  }
@@ -6800,7 +7024,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6800
7024
  };
6801
7025
 
6802
7026
  // src/features/mcp/copilot-mcp.ts
6803
- import { join as join48 } from "path";
7027
+ import { join as join49 } from "path";
6804
7028
  function convertToCopilotFormat(mcpServers) {
6805
7029
  return { servers: mcpServers };
6806
7030
  }
@@ -6827,7 +7051,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
6827
7051
  validate = true
6828
7052
  }) {
6829
7053
  const fileContent = await readFileContent(
6830
- join48(
7054
+ join49(
6831
7055
  baseDir,
6832
7056
  this.getSettablePaths().relativeDirPath,
6833
7057
  this.getSettablePaths().relativeFilePath
@@ -6880,7 +7104,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
6880
7104
  };
6881
7105
 
6882
7106
  // src/features/mcp/copilotcli-mcp.ts
6883
- import { join as join49 } from "path";
7107
+ import { join as join50 } from "path";
6884
7108
  var isRemoteServerType = (type) => {
6885
7109
  return type === "http" || type === "sse";
6886
7110
  };
@@ -6978,7 +7202,7 @@ var CopilotcliMcp = class _CopilotcliMcp extends ToolMcp {
6978
7202
  global = false
6979
7203
  }) {
6980
7204
  const paths = this.getSettablePaths({ global });
6981
- const fileContent = await readFileContentOrNull(join49(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7205
+ const fileContent = await readFileContentOrNull(join50(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6982
7206
  const json = JSON.parse(fileContent);
6983
7207
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
6984
7208
  return new _CopilotcliMcp({
@@ -6998,7 +7222,7 @@ var CopilotcliMcp = class _CopilotcliMcp extends ToolMcp {
6998
7222
  }) {
6999
7223
  const paths = this.getSettablePaths({ global });
7000
7224
  const fileContent = await readOrInitializeFileContent(
7001
- join49(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7225
+ join50(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7002
7226
  JSON.stringify({ mcpServers: {} }, null, 2)
7003
7227
  );
7004
7228
  const json = JSON.parse(fileContent);
@@ -7040,7 +7264,7 @@ var CopilotcliMcp = class _CopilotcliMcp extends ToolMcp {
7040
7264
  };
7041
7265
 
7042
7266
  // src/features/mcp/cursor-mcp.ts
7043
- import { join as join50 } from "path";
7267
+ import { join as join51 } from "path";
7044
7268
  var CURSOR_ENV_VAR_PATTERN = /\$\{env:([^}]+)\}/g;
7045
7269
  function convertEnvFromCursorFormat(mcpServers) {
7046
7270
  return Object.fromEntries(
@@ -7087,7 +7311,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7087
7311
  this.json = JSON.parse(this.fileContent);
7088
7312
  } catch (error) {
7089
7313
  throw new Error(
7090
- `Failed to parse Cursor MCP config at ${join50(this.relativeDirPath, this.relativeFilePath)}: ${formatError(error)}`,
7314
+ `Failed to parse Cursor MCP config at ${join51(this.relativeDirPath, this.relativeFilePath)}: ${formatError(error)}`,
7091
7315
  { cause: error }
7092
7316
  );
7093
7317
  }
@@ -7113,14 +7337,14 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7113
7337
  global = false
7114
7338
  }) {
7115
7339
  const paths = this.getSettablePaths({ global });
7116
- const filePath = join50(baseDir, paths.relativeDirPath, paths.relativeFilePath);
7340
+ const filePath = join51(baseDir, paths.relativeDirPath, paths.relativeFilePath);
7117
7341
  const fileContent = await readFileContentOrNull(filePath) ?? '{"mcpServers":{}}';
7118
7342
  let json;
7119
7343
  try {
7120
7344
  json = JSON.parse(fileContent);
7121
7345
  } catch (error) {
7122
7346
  throw new Error(
7123
- `Failed to parse Cursor MCP config at ${join50(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
7347
+ `Failed to parse Cursor MCP config at ${join51(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
7124
7348
  { cause: error }
7125
7349
  );
7126
7350
  }
@@ -7142,7 +7366,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7142
7366
  }) {
7143
7367
  const paths = this.getSettablePaths({ global });
7144
7368
  const fileContent = await readOrInitializeFileContent(
7145
- join50(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7369
+ join51(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7146
7370
  JSON.stringify({ mcpServers: {} }, null, 2)
7147
7371
  );
7148
7372
  let json;
@@ -7150,7 +7374,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7150
7374
  json = JSON.parse(fileContent);
7151
7375
  } catch (error) {
7152
7376
  throw new Error(
7153
- `Failed to parse Cursor MCP config at ${join50(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
7377
+ `Failed to parse Cursor MCP config at ${join51(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
7154
7378
  { cause: error }
7155
7379
  );
7156
7380
  }
@@ -7199,7 +7423,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7199
7423
  };
7200
7424
 
7201
7425
  // src/features/mcp/deepagents-mcp.ts
7202
- import { join as join51 } from "path";
7426
+ import { join as join52 } from "path";
7203
7427
  var DeepagentsMcp = class _DeepagentsMcp extends ToolMcp {
7204
7428
  json;
7205
7429
  constructor(params) {
@@ -7224,7 +7448,7 @@ var DeepagentsMcp = class _DeepagentsMcp extends ToolMcp {
7224
7448
  global = false
7225
7449
  }) {
7226
7450
  const paths = this.getSettablePaths({ global });
7227
- const fileContent = await readFileContentOrNull(join51(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7451
+ const fileContent = await readFileContentOrNull(join52(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7228
7452
  const json = JSON.parse(fileContent);
7229
7453
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
7230
7454
  return new _DeepagentsMcp({
@@ -7243,7 +7467,7 @@ var DeepagentsMcp = class _DeepagentsMcp extends ToolMcp {
7243
7467
  }) {
7244
7468
  const paths = this.getSettablePaths({ global });
7245
7469
  const fileContent = await readOrInitializeFileContent(
7246
- join51(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7470
+ join52(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7247
7471
  JSON.stringify({ mcpServers: {} }, null, 2)
7248
7472
  );
7249
7473
  const json = JSON.parse(fileContent);
@@ -7282,7 +7506,7 @@ var DeepagentsMcp = class _DeepagentsMcp extends ToolMcp {
7282
7506
  };
7283
7507
 
7284
7508
  // src/features/mcp/factorydroid-mcp.ts
7285
- import { join as join52 } from "path";
7509
+ import { join as join53 } from "path";
7286
7510
  var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
7287
7511
  json;
7288
7512
  constructor(params) {
@@ -7303,7 +7527,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
7303
7527
  validate = true
7304
7528
  }) {
7305
7529
  const fileContent = await readFileContent(
7306
- join52(
7530
+ join53(
7307
7531
  baseDir,
7308
7532
  this.getSettablePaths().relativeDirPath,
7309
7533
  this.getSettablePaths().relativeFilePath
@@ -7357,7 +7581,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
7357
7581
  };
7358
7582
 
7359
7583
  // src/features/mcp/geminicli-mcp.ts
7360
- import { join as join53 } from "path";
7584
+ import { join as join54 } from "path";
7361
7585
  var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
7362
7586
  json;
7363
7587
  constructor(params) {
@@ -7385,7 +7609,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
7385
7609
  global = false
7386
7610
  }) {
7387
7611
  const paths = this.getSettablePaths({ global });
7388
- const fileContent = await readFileContentOrNull(join53(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7612
+ const fileContent = await readFileContentOrNull(join54(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7389
7613
  const json = JSON.parse(fileContent);
7390
7614
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
7391
7615
  return new _GeminiCliMcp({
@@ -7404,7 +7628,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
7404
7628
  }) {
7405
7629
  const paths = this.getSettablePaths({ global });
7406
7630
  const fileContent = await readOrInitializeFileContent(
7407
- join53(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7631
+ join54(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7408
7632
  JSON.stringify({ mcpServers: {} }, null, 2)
7409
7633
  );
7410
7634
  const json = JSON.parse(fileContent);
@@ -7449,7 +7673,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
7449
7673
  };
7450
7674
 
7451
7675
  // src/features/mcp/junie-mcp.ts
7452
- import { join as join54 } from "path";
7676
+ import { join as join55 } from "path";
7453
7677
  var JunieMcp = class _JunieMcp extends ToolMcp {
7454
7678
  json;
7455
7679
  constructor(params) {
@@ -7461,7 +7685,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
7461
7685
  }
7462
7686
  static getSettablePaths() {
7463
7687
  return {
7464
- relativeDirPath: join54(".junie", "mcp"),
7688
+ relativeDirPath: join55(".junie", "mcp"),
7465
7689
  relativeFilePath: "mcp.json"
7466
7690
  };
7467
7691
  }
@@ -7470,7 +7694,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
7470
7694
  validate = true
7471
7695
  }) {
7472
7696
  const fileContent = await readFileContent(
7473
- join54(
7697
+ join55(
7474
7698
  baseDir,
7475
7699
  this.getSettablePaths().relativeDirPath,
7476
7700
  this.getSettablePaths().relativeFilePath
@@ -7519,27 +7743,27 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
7519
7743
  };
7520
7744
 
7521
7745
  // src/features/mcp/kilo-mcp.ts
7522
- import { join as join55 } from "path";
7746
+ import { join as join56 } from "path";
7523
7747
  import { parse as parseJsonc3 } from "jsonc-parser";
7524
- import { z as z23 } from "zod/mini";
7525
- var KiloMcpLocalServerSchema = z23.object({
7526
- type: z23.literal("local"),
7527
- command: z23.array(z23.string()),
7528
- environment: z23.optional(z23.record(z23.string(), z23.string())),
7529
- enabled: z23._default(z23.boolean(), true),
7530
- cwd: z23.optional(z23.string())
7748
+ import { z as z24 } from "zod/mini";
7749
+ var KiloMcpLocalServerSchema = z24.object({
7750
+ type: z24.literal("local"),
7751
+ command: z24.array(z24.string()),
7752
+ environment: z24.optional(z24.record(z24.string(), z24.string())),
7753
+ enabled: z24._default(z24.boolean(), true),
7754
+ cwd: z24.optional(z24.string())
7531
7755
  });
7532
- var KiloMcpRemoteServerSchema = z23.object({
7533
- type: z23.literal("remote"),
7534
- url: z23.string(),
7535
- headers: z23.optional(z23.record(z23.string(), z23.string())),
7536
- enabled: z23._default(z23.boolean(), true)
7756
+ var KiloMcpRemoteServerSchema = z24.object({
7757
+ type: z24.literal("remote"),
7758
+ url: z24.string(),
7759
+ headers: z24.optional(z24.record(z24.string(), z24.string())),
7760
+ enabled: z24._default(z24.boolean(), true)
7537
7761
  });
7538
- var KiloMcpServerSchema = z23.union([KiloMcpLocalServerSchema, KiloMcpRemoteServerSchema]);
7539
- var KiloConfigSchema = z23.looseObject({
7540
- $schema: z23.optional(z23.string()),
7541
- mcp: z23.optional(z23.record(z23.string(), KiloMcpServerSchema)),
7542
- tools: z23.optional(z23.record(z23.string(), z23.boolean()))
7762
+ var KiloMcpServerSchema = z24.union([KiloMcpLocalServerSchema, KiloMcpRemoteServerSchema]);
7763
+ var KiloConfigSchema = z24.looseObject({
7764
+ $schema: z24.optional(z24.string()),
7765
+ mcp: z24.optional(z24.record(z24.string(), KiloMcpServerSchema)),
7766
+ tools: z24.optional(z24.record(z24.string(), z24.boolean()))
7543
7767
  });
7544
7768
  function convertFromKiloFormat(kiloMcp, tools) {
7545
7769
  return Object.fromEntries(
@@ -7657,7 +7881,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
7657
7881
  static getSettablePaths({ global } = {}) {
7658
7882
  if (global) {
7659
7883
  return {
7660
- relativeDirPath: join55(".config", "kilo"),
7884
+ relativeDirPath: join56(".config", "kilo"),
7661
7885
  relativeFilePath: "kilo.json"
7662
7886
  };
7663
7887
  }
@@ -7672,11 +7896,11 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
7672
7896
  global = false
7673
7897
  }) {
7674
7898
  const basePaths = this.getSettablePaths({ global });
7675
- const jsonDir = join55(baseDir, basePaths.relativeDirPath);
7899
+ const jsonDir = join56(baseDir, basePaths.relativeDirPath);
7676
7900
  let fileContent = null;
7677
7901
  let relativeFilePath = "kilo.jsonc";
7678
- const jsoncPath = join55(jsonDir, "kilo.jsonc");
7679
- const jsonPath = join55(jsonDir, "kilo.json");
7902
+ const jsoncPath = join56(jsonDir, "kilo.jsonc");
7903
+ const jsonPath = join56(jsonDir, "kilo.json");
7680
7904
  fileContent = await readFileContentOrNull(jsoncPath);
7681
7905
  if (!fileContent) {
7682
7906
  fileContent = await readFileContentOrNull(jsonPath);
@@ -7702,11 +7926,11 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
7702
7926
  global = false
7703
7927
  }) {
7704
7928
  const basePaths = this.getSettablePaths({ global });
7705
- const jsonDir = join55(baseDir, basePaths.relativeDirPath);
7929
+ const jsonDir = join56(baseDir, basePaths.relativeDirPath);
7706
7930
  let fileContent = null;
7707
7931
  let relativeFilePath = "kilo.jsonc";
7708
- const jsoncPath = join55(jsonDir, "kilo.jsonc");
7709
- const jsonPath = join55(jsonDir, "kilo.json");
7932
+ const jsoncPath = join56(jsonDir, "kilo.jsonc");
7933
+ const jsonPath = join56(jsonDir, "kilo.json");
7710
7934
  fileContent = await readFileContentOrNull(jsoncPath);
7711
7935
  if (!fileContent) {
7712
7936
  fileContent = await readFileContentOrNull(jsonPath);
@@ -7765,7 +7989,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
7765
7989
  };
7766
7990
 
7767
7991
  // src/features/mcp/kiro-mcp.ts
7768
- import { join as join56 } from "path";
7992
+ import { join as join57 } from "path";
7769
7993
  var KiroMcp = class _KiroMcp extends ToolMcp {
7770
7994
  json;
7771
7995
  constructor(params) {
@@ -7777,7 +8001,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
7777
8001
  }
7778
8002
  static getSettablePaths() {
7779
8003
  return {
7780
- relativeDirPath: join56(".kiro", "settings"),
8004
+ relativeDirPath: join57(".kiro", "settings"),
7781
8005
  relativeFilePath: "mcp.json"
7782
8006
  };
7783
8007
  }
@@ -7786,7 +8010,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
7786
8010
  validate = true
7787
8011
  }) {
7788
8012
  const paths = this.getSettablePaths();
7789
- const fileContent = await readFileContentOrNull(join56(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
8013
+ const fileContent = await readFileContentOrNull(join57(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7790
8014
  return new _KiroMcp({
7791
8015
  baseDir,
7792
8016
  relativeDirPath: paths.relativeDirPath,
@@ -7834,30 +8058,30 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
7834
8058
  };
7835
8059
 
7836
8060
  // src/features/mcp/opencode-mcp.ts
7837
- import { join as join57 } from "path";
8061
+ import { join as join58 } from "path";
7838
8062
  import { parse as parseJsonc4 } from "jsonc-parser";
7839
- import { z as z24 } from "zod/mini";
7840
- var OpencodeMcpLocalServerSchema = z24.object({
7841
- type: z24.literal("local"),
7842
- command: z24.array(z24.string()),
7843
- environment: z24.optional(z24.record(z24.string(), z24.string())),
7844
- enabled: z24._default(z24.boolean(), true),
7845
- cwd: z24.optional(z24.string())
8063
+ import { z as z25 } from "zod/mini";
8064
+ var OpencodeMcpLocalServerSchema = z25.object({
8065
+ type: z25.literal("local"),
8066
+ command: z25.array(z25.string()),
8067
+ environment: z25.optional(z25.record(z25.string(), z25.string())),
8068
+ enabled: z25._default(z25.boolean(), true),
8069
+ cwd: z25.optional(z25.string())
7846
8070
  });
7847
- var OpencodeMcpRemoteServerSchema = z24.object({
7848
- type: z24.literal("remote"),
7849
- url: z24.string(),
7850
- headers: z24.optional(z24.record(z24.string(), z24.string())),
7851
- enabled: z24._default(z24.boolean(), true)
8071
+ var OpencodeMcpRemoteServerSchema = z25.object({
8072
+ type: z25.literal("remote"),
8073
+ url: z25.string(),
8074
+ headers: z25.optional(z25.record(z25.string(), z25.string())),
8075
+ enabled: z25._default(z25.boolean(), true)
7852
8076
  });
7853
- var OpencodeMcpServerSchema = z24.union([
8077
+ var OpencodeMcpServerSchema = z25.union([
7854
8078
  OpencodeMcpLocalServerSchema,
7855
8079
  OpencodeMcpRemoteServerSchema
7856
8080
  ]);
7857
- var OpencodeConfigSchema = z24.looseObject({
7858
- $schema: z24.optional(z24.string()),
7859
- mcp: z24.optional(z24.record(z24.string(), OpencodeMcpServerSchema)),
7860
- tools: z24.optional(z24.record(z24.string(), z24.boolean()))
8081
+ var OpencodeConfigSchema = z25.looseObject({
8082
+ $schema: z25.optional(z25.string()),
8083
+ mcp: z25.optional(z25.record(z25.string(), OpencodeMcpServerSchema)),
8084
+ tools: z25.optional(z25.record(z25.string(), z25.boolean()))
7861
8085
  });
7862
8086
  function convertFromOpencodeFormat(opencodeMcp, tools) {
7863
8087
  return Object.fromEntries(
@@ -7975,7 +8199,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
7975
8199
  static getSettablePaths({ global } = {}) {
7976
8200
  if (global) {
7977
8201
  return {
7978
- relativeDirPath: join57(".config", "opencode"),
8202
+ relativeDirPath: join58(".config", "opencode"),
7979
8203
  relativeFilePath: "opencode.json"
7980
8204
  };
7981
8205
  }
@@ -7990,11 +8214,11 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
7990
8214
  global = false
7991
8215
  }) {
7992
8216
  const basePaths = this.getSettablePaths({ global });
7993
- const jsonDir = join57(baseDir, basePaths.relativeDirPath);
8217
+ const jsonDir = join58(baseDir, basePaths.relativeDirPath);
7994
8218
  let fileContent = null;
7995
8219
  let relativeFilePath = "opencode.jsonc";
7996
- const jsoncPath = join57(jsonDir, "opencode.jsonc");
7997
- const jsonPath = join57(jsonDir, "opencode.json");
8220
+ const jsoncPath = join58(jsonDir, "opencode.jsonc");
8221
+ const jsonPath = join58(jsonDir, "opencode.json");
7998
8222
  fileContent = await readFileContentOrNull(jsoncPath);
7999
8223
  if (!fileContent) {
8000
8224
  fileContent = await readFileContentOrNull(jsonPath);
@@ -8020,11 +8244,11 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
8020
8244
  global = false
8021
8245
  }) {
8022
8246
  const basePaths = this.getSettablePaths({ global });
8023
- const jsonDir = join57(baseDir, basePaths.relativeDirPath);
8247
+ const jsonDir = join58(baseDir, basePaths.relativeDirPath);
8024
8248
  let fileContent = null;
8025
8249
  let relativeFilePath = "opencode.jsonc";
8026
- const jsoncPath = join57(jsonDir, "opencode.jsonc");
8027
- const jsonPath = join57(jsonDir, "opencode.json");
8250
+ const jsoncPath = join58(jsonDir, "opencode.jsonc");
8251
+ const jsonPath = join58(jsonDir, "opencode.json");
8028
8252
  fileContent = await readFileContentOrNull(jsoncPath);
8029
8253
  if (!fileContent) {
8030
8254
  fileContent = await readFileContentOrNull(jsonPath);
@@ -8085,7 +8309,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
8085
8309
  };
8086
8310
 
8087
8311
  // src/features/mcp/roo-mcp.ts
8088
- import { join as join58 } from "path";
8312
+ import { join as join59 } from "path";
8089
8313
  function convertToRooFormat(mcpServers) {
8090
8314
  return Object.fromEntries(
8091
8315
  Object.entries(mcpServers).map(([serverName, serverConfig]) => {
@@ -8137,7 +8361,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
8137
8361
  validate = true
8138
8362
  }) {
8139
8363
  const fileContent = await readFileContent(
8140
- join58(
8364
+ join59(
8141
8365
  baseDir,
8142
8366
  this.getSettablePaths().relativeDirPath,
8143
8367
  this.getSettablePaths().relativeFilePath
@@ -8192,9 +8416,9 @@ var RooMcp = class _RooMcp extends ToolMcp {
8192
8416
  };
8193
8417
 
8194
8418
  // src/features/mcp/rovodev-mcp.ts
8195
- import { join as join59 } from "path";
8419
+ import { join as join60 } from "path";
8196
8420
  function parseRovodevMcpJson(fileContent, relativeDirPath, relativeFilePath) {
8197
- const configPath = join59(relativeDirPath, relativeFilePath);
8421
+ const configPath = join60(relativeDirPath, relativeFilePath);
8198
8422
  let parsed;
8199
8423
  try {
8200
8424
  parsed = JSON.parse(fileContent);
@@ -8243,7 +8467,7 @@ var RovodevMcp = class _RovodevMcp extends ToolMcp {
8243
8467
  throw new Error("Rovodev MCP is global-only; use --global to sync ~/.rovodev/mcp.json");
8244
8468
  }
8245
8469
  const paths = this.getSettablePaths({ global });
8246
- const filePath = join59(baseDir, paths.relativeDirPath, paths.relativeFilePath);
8470
+ const filePath = join60(baseDir, paths.relativeDirPath, paths.relativeFilePath);
8247
8471
  const fileContent = await readFileContentOrNull(filePath) ?? '{"mcpServers":{}}';
8248
8472
  const json = parseRovodevMcpJson(fileContent, paths.relativeDirPath, paths.relativeFilePath);
8249
8473
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
@@ -8267,7 +8491,7 @@ var RovodevMcp = class _RovodevMcp extends ToolMcp {
8267
8491
  }
8268
8492
  const paths = this.getSettablePaths({ global });
8269
8493
  const fileContent = await readOrInitializeFileContent(
8270
- join59(baseDir, paths.relativeDirPath, paths.relativeFilePath),
8494
+ join60(baseDir, paths.relativeDirPath, paths.relativeFilePath),
8271
8495
  JSON.stringify({ mcpServers: {} }, null, 2)
8272
8496
  );
8273
8497
  const json = parseRovodevMcpJson(fileContent, paths.relativeDirPath, paths.relativeFilePath);
@@ -8328,7 +8552,7 @@ var mcpProcessorToolTargetTuple = [
8328
8552
  "roo",
8329
8553
  "rovodev"
8330
8554
  ];
8331
- var McpProcessorToolTargetSchema = z25.enum(mcpProcessorToolTargetTuple);
8555
+ var McpProcessorToolTargetSchema = z26.enum(mcpProcessorToolTargetTuple);
8332
8556
  var toolMcpFactories = /* @__PURE__ */ new Map([
8333
8557
  [
8334
8558
  "claudecode",
@@ -8667,25 +8891,25 @@ var McpProcessor = class extends FeatureProcessor {
8667
8891
  };
8668
8892
 
8669
8893
  // src/features/rules/rules-processor.ts
8670
- import { basename as basename10, dirname as dirname3, join as join129, relative as relative5 } from "path";
8894
+ import { basename as basename10, dirname as dirname3, join as join130, relative as relative5 } from "path";
8671
8895
  import { encode } from "@toon-format/toon";
8672
- import { z as z64 } from "zod/mini";
8896
+ import { z as z65 } from "zod/mini";
8673
8897
 
8674
8898
  // src/constants/general.ts
8675
8899
  var SKILL_FILE_NAME = "SKILL.md";
8676
8900
 
8677
8901
  // src/features/skills/agentsmd-skill.ts
8678
- import { join as join63 } from "path";
8902
+ import { join as join64 } from "path";
8679
8903
 
8680
8904
  // src/features/skills/simulated-skill.ts
8681
- import { join as join62 } from "path";
8682
- import { z as z26 } from "zod/mini";
8905
+ import { join as join63 } from "path";
8906
+ import { z as z27 } from "zod/mini";
8683
8907
 
8684
8908
  // src/features/skills/tool-skill.ts
8685
- import { join as join61 } from "path";
8909
+ import { join as join62 } from "path";
8686
8910
 
8687
8911
  // src/types/ai-dir.ts
8688
- import path2, { basename as basename3, join as join60, relative as relative4, resolve as resolve4 } from "path";
8912
+ import path2, { basename as basename3, join as join61, relative as relative4, resolve as resolve4 } from "path";
8689
8913
  var AiDir = class {
8690
8914
  /**
8691
8915
  * @example "."
@@ -8782,8 +9006,8 @@ var AiDir = class {
8782
9006
  * @returns Array of files with their relative paths and buffers
8783
9007
  */
8784
9008
  static async collectOtherFiles(baseDir, relativeDirPath, dirName, excludeFileName) {
8785
- const dirPath = join60(baseDir, relativeDirPath, dirName);
8786
- const glob = join60(dirPath, "**", "*");
9009
+ const dirPath = join61(baseDir, relativeDirPath, dirName);
9010
+ const glob = join61(dirPath, "**", "*");
8787
9011
  const filePaths = await findFilesByGlobs(glob, { type: "file" });
8788
9012
  const filteredPaths = filePaths.filter((filePath) => basename3(filePath) !== excludeFileName);
8789
9013
  const files = await Promise.all(
@@ -8884,8 +9108,8 @@ var ToolSkill = class extends AiDir {
8884
9108
  }) {
8885
9109
  const settablePaths = getSettablePaths({ global });
8886
9110
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
8887
- const skillDirPath = join61(baseDir, actualRelativeDirPath, dirName);
8888
- const skillFilePath = join61(skillDirPath, SKILL_FILE_NAME);
9111
+ const skillDirPath = join62(baseDir, actualRelativeDirPath, dirName);
9112
+ const skillFilePath = join62(skillDirPath, SKILL_FILE_NAME);
8889
9113
  if (!await fileExists(skillFilePath)) {
8890
9114
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
8891
9115
  }
@@ -8909,16 +9133,16 @@ var ToolSkill = class extends AiDir {
8909
9133
  }
8910
9134
  requireMainFileFrontmatter() {
8911
9135
  if (!this.mainFile?.frontmatter) {
8912
- throw new Error(`Frontmatter is not defined in ${join61(this.relativeDirPath, this.dirName)}`);
9136
+ throw new Error(`Frontmatter is not defined in ${join62(this.relativeDirPath, this.dirName)}`);
8913
9137
  }
8914
9138
  return this.mainFile.frontmatter;
8915
9139
  }
8916
9140
  };
8917
9141
 
8918
9142
  // src/features/skills/simulated-skill.ts
8919
- var SimulatedSkillFrontmatterSchema = z26.looseObject({
8920
- name: z26.string(),
8921
- description: z26.string()
9143
+ var SimulatedSkillFrontmatterSchema = z27.looseObject({
9144
+ name: z27.string(),
9145
+ description: z27.string()
8922
9146
  });
8923
9147
  var SimulatedSkill = class extends ToolSkill {
8924
9148
  frontmatter;
@@ -8949,7 +9173,7 @@ var SimulatedSkill = class extends ToolSkill {
8949
9173
  const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
8950
9174
  if (!result.success) {
8951
9175
  throw new Error(
8952
- `Invalid frontmatter in ${join62(relativeDirPath, dirName)}: ${formatError(result.error)}`
9176
+ `Invalid frontmatter in ${join63(relativeDirPath, dirName)}: ${formatError(result.error)}`
8953
9177
  );
8954
9178
  }
8955
9179
  }
@@ -9008,8 +9232,8 @@ var SimulatedSkill = class extends ToolSkill {
9008
9232
  }) {
9009
9233
  const settablePaths = this.getSettablePaths();
9010
9234
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
9011
- const skillDirPath = join62(baseDir, actualRelativeDirPath, dirName);
9012
- const skillFilePath = join62(skillDirPath, SKILL_FILE_NAME);
9235
+ const skillDirPath = join63(baseDir, actualRelativeDirPath, dirName);
9236
+ const skillFilePath = join63(skillDirPath, SKILL_FILE_NAME);
9013
9237
  if (!await fileExists(skillFilePath)) {
9014
9238
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
9015
9239
  }
@@ -9086,7 +9310,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
9086
9310
  throw new Error("AgentsmdSkill does not support global mode.");
9087
9311
  }
9088
9312
  return {
9089
- relativeDirPath: join63(".agents", "skills")
9313
+ relativeDirPath: join64(".agents", "skills")
9090
9314
  };
9091
9315
  }
9092
9316
  static async fromDir(params) {
@@ -9113,11 +9337,11 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
9113
9337
  };
9114
9338
 
9115
9339
  // src/features/skills/factorydroid-skill.ts
9116
- import { join as join64 } from "path";
9340
+ import { join as join65 } from "path";
9117
9341
  var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
9118
9342
  static getSettablePaths(_options) {
9119
9343
  return {
9120
- relativeDirPath: join64(".factory", "skills")
9344
+ relativeDirPath: join65(".factory", "skills")
9121
9345
  };
9122
9346
  }
9123
9347
  static async fromDir(params) {
@@ -9144,50 +9368,50 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
9144
9368
  };
9145
9369
 
9146
9370
  // src/features/skills/rovodev-skill.ts
9147
- import { join as join66 } from "path";
9148
- import { z as z28 } from "zod/mini";
9371
+ import { join as join67 } from "path";
9372
+ import { z as z29 } from "zod/mini";
9149
9373
 
9150
9374
  // src/features/skills/rulesync-skill.ts
9151
- import { join as join65 } from "path";
9152
- import { z as z27 } from "zod/mini";
9153
- var RulesyncSkillFrontmatterSchemaInternal = z27.looseObject({
9154
- name: z27.string(),
9155
- description: z27.string(),
9156
- targets: z27._default(RulesyncTargetsSchema, ["*"]),
9157
- claudecode: z27.optional(
9158
- z27.looseObject({
9159
- "allowed-tools": z27.optional(z27.array(z27.string())),
9160
- model: z27.optional(z27.string()),
9161
- "disable-model-invocation": z27.optional(z27.boolean())
9375
+ import { join as join66 } from "path";
9376
+ import { z as z28 } from "zod/mini";
9377
+ var RulesyncSkillFrontmatterSchemaInternal = z28.looseObject({
9378
+ name: z28.string(),
9379
+ description: z28.string(),
9380
+ targets: z28._default(RulesyncTargetsSchema, ["*"]),
9381
+ claudecode: z28.optional(
9382
+ z28.looseObject({
9383
+ "allowed-tools": z28.optional(z28.array(z28.string())),
9384
+ model: z28.optional(z28.string()),
9385
+ "disable-model-invocation": z28.optional(z28.boolean())
9162
9386
  })
9163
9387
  ),
9164
- codexcli: z27.optional(
9165
- z27.looseObject({
9166
- "short-description": z27.optional(z27.string())
9388
+ codexcli: z28.optional(
9389
+ z28.looseObject({
9390
+ "short-description": z28.optional(z28.string())
9167
9391
  })
9168
9392
  ),
9169
- opencode: z27.optional(
9170
- z27.looseObject({
9171
- "allowed-tools": z27.optional(z27.array(z27.string()))
9393
+ opencode: z28.optional(
9394
+ z28.looseObject({
9395
+ "allowed-tools": z28.optional(z28.array(z28.string()))
9172
9396
  })
9173
9397
  ),
9174
- kilo: z27.optional(
9175
- z27.looseObject({
9176
- "allowed-tools": z27.optional(z27.array(z27.string()))
9398
+ kilo: z28.optional(
9399
+ z28.looseObject({
9400
+ "allowed-tools": z28.optional(z28.array(z28.string()))
9177
9401
  })
9178
9402
  ),
9179
- deepagents: z27.optional(
9180
- z27.looseObject({
9181
- "allowed-tools": z27.optional(z27.array(z27.string()))
9403
+ deepagents: z28.optional(
9404
+ z28.looseObject({
9405
+ "allowed-tools": z28.optional(z28.array(z28.string()))
9182
9406
  })
9183
9407
  ),
9184
- copilot: z27.optional(
9185
- z27.looseObject({
9186
- license: z27.optional(z27.string())
9408
+ copilot: z28.optional(
9409
+ z28.looseObject({
9410
+ license: z28.optional(z28.string())
9187
9411
  })
9188
9412
  ),
9189
- cline: z27.optional(z27.looseObject({})),
9190
- roo: z27.optional(z27.looseObject({}))
9413
+ cline: z28.optional(z28.looseObject({})),
9414
+ roo: z28.optional(z28.looseObject({}))
9191
9415
  });
9192
9416
  var RulesyncSkillFrontmatterSchema = RulesyncSkillFrontmatterSchemaInternal;
9193
9417
  var RulesyncSkill = class _RulesyncSkill extends AiDir {
@@ -9227,7 +9451,7 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
9227
9451
  }
9228
9452
  getFrontmatter() {
9229
9453
  if (!this.mainFile?.frontmatter) {
9230
- throw new Error(`Frontmatter is not defined in ${join65(this.relativeDirPath, this.dirName)}`);
9454
+ throw new Error(`Frontmatter is not defined in ${join66(this.relativeDirPath, this.dirName)}`);
9231
9455
  }
9232
9456
  const result = RulesyncSkillFrontmatterSchema.parse(this.mainFile.frontmatter);
9233
9457
  return result;
@@ -9253,8 +9477,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
9253
9477
  dirName,
9254
9478
  global = false
9255
9479
  }) {
9256
- const skillDirPath = join65(baseDir, relativeDirPath, dirName);
9257
- const skillFilePath = join65(skillDirPath, SKILL_FILE_NAME);
9480
+ const skillDirPath = join66(baseDir, relativeDirPath, dirName);
9481
+ const skillFilePath = join66(skillDirPath, SKILL_FILE_NAME);
9258
9482
  if (!await fileExists(skillFilePath)) {
9259
9483
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
9260
9484
  }
@@ -9284,14 +9508,14 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
9284
9508
  };
9285
9509
 
9286
9510
  // src/features/skills/rovodev-skill.ts
9287
- var RovodevSkillFrontmatterSchema = z28.looseObject({
9288
- name: z28.string(),
9289
- description: z28.string()
9511
+ var RovodevSkillFrontmatterSchema = z29.looseObject({
9512
+ name: z29.string(),
9513
+ description: z29.string()
9290
9514
  });
9291
9515
  var RovodevSkill = class _RovodevSkill extends ToolSkill {
9292
9516
  constructor({
9293
9517
  baseDir = process.cwd(),
9294
- relativeDirPath = join66(".rovodev", "skills"),
9518
+ relativeDirPath = join67(".rovodev", "skills"),
9295
9519
  dirName,
9296
9520
  frontmatter,
9297
9521
  body,
@@ -9320,8 +9544,8 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
9320
9544
  }
9321
9545
  static getSettablePaths(_options) {
9322
9546
  return {
9323
- relativeDirPath: join66(".rovodev", "skills"),
9324
- alternativeSkillRoots: [join66(".agents", "skills")]
9547
+ relativeDirPath: join67(".rovodev", "skills"),
9548
+ alternativeSkillRoots: [join67(".agents", "skills")]
9325
9549
  };
9326
9550
  }
9327
9551
  getFrontmatter() {
@@ -9409,13 +9633,13 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
9409
9633
  });
9410
9634
  const result = RovodevSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9411
9635
  if (!result.success) {
9412
- const skillDirPath = join66(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9636
+ const skillDirPath = join67(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9413
9637
  throw new Error(
9414
- `Invalid frontmatter in ${join66(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9638
+ `Invalid frontmatter in ${join67(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9415
9639
  );
9416
9640
  }
9417
9641
  if (result.data.name !== loaded.dirName) {
9418
- const skillFilePath = join66(
9642
+ const skillFilePath = join67(
9419
9643
  loaded.baseDir,
9420
9644
  loaded.relativeDirPath,
9421
9645
  loaded.dirName,
@@ -9457,11 +9681,11 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
9457
9681
  };
9458
9682
 
9459
9683
  // src/features/skills/skills-processor.ts
9460
- import { basename as basename5, join as join84 } from "path";
9461
- import { z as z44 } from "zod/mini";
9684
+ import { basename as basename5, join as join85 } from "path";
9685
+ import { z as z45 } from "zod/mini";
9462
9686
 
9463
9687
  // src/types/dir-feature-processor.ts
9464
- import { join as join67 } from "path";
9688
+ import { join as join68 } from "path";
9465
9689
  var DirFeatureProcessor = class {
9466
9690
  baseDir;
9467
9691
  dryRun;
@@ -9501,7 +9725,7 @@ var DirFeatureProcessor = class {
9501
9725
  const mainFile = aiDir.getMainFile();
9502
9726
  let mainFileContent;
9503
9727
  if (mainFile) {
9504
- const mainFilePath = join67(dirPath, mainFile.name);
9728
+ const mainFilePath = join68(dirPath, mainFile.name);
9505
9729
  const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter, {
9506
9730
  avoidBlockScalars: this.avoidBlockScalars
9507
9731
  });
@@ -9521,7 +9745,7 @@ var DirFeatureProcessor = class {
9521
9745
  const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
9522
9746
  otherFileContents.push(contentWithNewline);
9523
9747
  if (!dirHasChanges) {
9524
- const filePath = join67(dirPath, file.relativeFilePathToDirPath);
9748
+ const filePath = join68(dirPath, file.relativeFilePathToDirPath);
9525
9749
  const existingContent = await readFileContentOrNull(filePath);
9526
9750
  if (!fileContentsEquivalent({
9527
9751
  filePath,
@@ -9539,24 +9763,24 @@ var DirFeatureProcessor = class {
9539
9763
  if (this.dryRun) {
9540
9764
  this.logger.info(`[DRY RUN] Would create directory: ${dirPath}`);
9541
9765
  if (mainFile) {
9542
- this.logger.info(`[DRY RUN] Would write: ${join67(dirPath, mainFile.name)}`);
9543
- changedPaths.push(join67(relativeDir, mainFile.name));
9766
+ this.logger.info(`[DRY RUN] Would write: ${join68(dirPath, mainFile.name)}`);
9767
+ changedPaths.push(join68(relativeDir, mainFile.name));
9544
9768
  }
9545
9769
  for (const file of otherFiles) {
9546
9770
  this.logger.info(
9547
- `[DRY RUN] Would write: ${join67(dirPath, file.relativeFilePathToDirPath)}`
9771
+ `[DRY RUN] Would write: ${join68(dirPath, file.relativeFilePathToDirPath)}`
9548
9772
  );
9549
- changedPaths.push(join67(relativeDir, file.relativeFilePathToDirPath));
9773
+ changedPaths.push(join68(relativeDir, file.relativeFilePathToDirPath));
9550
9774
  }
9551
9775
  } else {
9552
9776
  await ensureDir(dirPath);
9553
9777
  if (mainFile && mainFileContent) {
9554
- const mainFilePath = join67(dirPath, mainFile.name);
9778
+ const mainFilePath = join68(dirPath, mainFile.name);
9555
9779
  await writeFileContent(mainFilePath, mainFileContent);
9556
- changedPaths.push(join67(relativeDir, mainFile.name));
9780
+ changedPaths.push(join68(relativeDir, mainFile.name));
9557
9781
  }
9558
9782
  for (const [i, file] of otherFiles.entries()) {
9559
- const filePath = join67(dirPath, file.relativeFilePathToDirPath);
9783
+ const filePath = join68(dirPath, file.relativeFilePathToDirPath);
9560
9784
  const content = otherFileContents[i];
9561
9785
  if (content === void 0) {
9562
9786
  throw new Error(
@@ -9564,7 +9788,7 @@ var DirFeatureProcessor = class {
9564
9788
  );
9565
9789
  }
9566
9790
  await writeFileContent(filePath, content);
9567
- changedPaths.push(join67(relativeDir, file.relativeFilePathToDirPath));
9791
+ changedPaths.push(join68(relativeDir, file.relativeFilePathToDirPath));
9568
9792
  }
9569
9793
  }
9570
9794
  changedCount++;
@@ -9596,16 +9820,16 @@ var DirFeatureProcessor = class {
9596
9820
  };
9597
9821
 
9598
9822
  // src/features/skills/agentsskills-skill.ts
9599
- import { join as join68 } from "path";
9600
- import { z as z29 } from "zod/mini";
9601
- var AgentsSkillsSkillFrontmatterSchema = z29.looseObject({
9602
- name: z29.string(),
9603
- description: z29.string()
9823
+ import { join as join69 } from "path";
9824
+ import { z as z30 } from "zod/mini";
9825
+ var AgentsSkillsSkillFrontmatterSchema = z30.looseObject({
9826
+ name: z30.string(),
9827
+ description: z30.string()
9604
9828
  });
9605
9829
  var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
9606
9830
  constructor({
9607
9831
  baseDir = process.cwd(),
9608
- relativeDirPath = join68(".agents", "skills"),
9832
+ relativeDirPath = join69(".agents", "skills"),
9609
9833
  dirName,
9610
9834
  frontmatter,
9611
9835
  body,
@@ -9637,7 +9861,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
9637
9861
  throw new Error("AgentsSkillsSkill does not support global mode.");
9638
9862
  }
9639
9863
  return {
9640
- relativeDirPath: join68(".agents", "skills")
9864
+ relativeDirPath: join69(".agents", "skills")
9641
9865
  };
9642
9866
  }
9643
9867
  getFrontmatter() {
@@ -9717,9 +9941,9 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
9717
9941
  });
9718
9942
  const result = AgentsSkillsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9719
9943
  if (!result.success) {
9720
- const skillDirPath = join68(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9944
+ const skillDirPath = join69(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9721
9945
  throw new Error(
9722
- `Invalid frontmatter in ${join68(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9946
+ `Invalid frontmatter in ${join69(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9723
9947
  );
9724
9948
  }
9725
9949
  return new _AgentsSkillsSkill({
@@ -9754,16 +9978,16 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
9754
9978
  };
9755
9979
 
9756
9980
  // src/features/skills/antigravity-skill.ts
9757
- import { join as join69 } from "path";
9758
- import { z as z30 } from "zod/mini";
9759
- var AntigravitySkillFrontmatterSchema = z30.looseObject({
9760
- name: z30.string(),
9761
- description: z30.string()
9981
+ import { join as join70 } from "path";
9982
+ import { z as z31 } from "zod/mini";
9983
+ var AntigravitySkillFrontmatterSchema = z31.looseObject({
9984
+ name: z31.string(),
9985
+ description: z31.string()
9762
9986
  });
9763
9987
  var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
9764
9988
  constructor({
9765
9989
  baseDir = process.cwd(),
9766
- relativeDirPath = join69(".agent", "skills"),
9990
+ relativeDirPath = join70(".agent", "skills"),
9767
9991
  dirName,
9768
9992
  frontmatter,
9769
9993
  body,
@@ -9795,11 +10019,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
9795
10019
  } = {}) {
9796
10020
  if (global) {
9797
10021
  return {
9798
- relativeDirPath: join69(".gemini", "antigravity", "skills")
10022
+ relativeDirPath: join70(".gemini", "antigravity", "skills")
9799
10023
  };
9800
10024
  }
9801
10025
  return {
9802
- relativeDirPath: join69(".agent", "skills")
10026
+ relativeDirPath: join70(".agent", "skills")
9803
10027
  };
9804
10028
  }
9805
10029
  getFrontmatter() {
@@ -9879,9 +10103,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
9879
10103
  });
9880
10104
  const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
9881
10105
  if (!result.success) {
9882
- const skillDirPath = join69(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10106
+ const skillDirPath = join70(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9883
10107
  throw new Error(
9884
- `Invalid frontmatter in ${join69(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10108
+ `Invalid frontmatter in ${join70(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9885
10109
  );
9886
10110
  }
9887
10111
  return new _AntigravitySkill({
@@ -9915,19 +10139,19 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
9915
10139
  };
9916
10140
 
9917
10141
  // src/features/skills/claudecode-skill.ts
9918
- import { join as join70 } from "path";
9919
- import { z as z31 } from "zod/mini";
9920
- var ClaudecodeSkillFrontmatterSchema = z31.looseObject({
9921
- name: z31.string(),
9922
- description: z31.string(),
9923
- "allowed-tools": z31.optional(z31.array(z31.string())),
9924
- model: z31.optional(z31.string()),
9925
- "disable-model-invocation": z31.optional(z31.boolean())
10142
+ import { join as join71 } from "path";
10143
+ import { z as z32 } from "zod/mini";
10144
+ var ClaudecodeSkillFrontmatterSchema = z32.looseObject({
10145
+ name: z32.string(),
10146
+ description: z32.string(),
10147
+ "allowed-tools": z32.optional(z32.array(z32.string())),
10148
+ model: z32.optional(z32.string()),
10149
+ "disable-model-invocation": z32.optional(z32.boolean())
9926
10150
  });
9927
10151
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
9928
10152
  constructor({
9929
10153
  baseDir = process.cwd(),
9930
- relativeDirPath = join70(".claude", "skills"),
10154
+ relativeDirPath = join71(".claude", "skills"),
9931
10155
  dirName,
9932
10156
  frontmatter,
9933
10157
  body,
@@ -9958,7 +10182,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
9958
10182
  global: _global = false
9959
10183
  } = {}) {
9960
10184
  return {
9961
- relativeDirPath: join70(".claude", "skills")
10185
+ relativeDirPath: join71(".claude", "skills")
9962
10186
  };
9963
10187
  }
9964
10188
  getFrontmatter() {
@@ -10055,9 +10279,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
10055
10279
  });
10056
10280
  const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10057
10281
  if (!result.success) {
10058
- const skillDirPath = join70(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10282
+ const skillDirPath = join71(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10059
10283
  throw new Error(
10060
- `Invalid frontmatter in ${join70(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10284
+ `Invalid frontmatter in ${join71(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10061
10285
  );
10062
10286
  }
10063
10287
  return new _ClaudecodeSkill({
@@ -10091,16 +10315,16 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
10091
10315
  };
10092
10316
 
10093
10317
  // src/features/skills/cline-skill.ts
10094
- import { join as join71 } from "path";
10095
- import { z as z32 } from "zod/mini";
10096
- var ClineSkillFrontmatterSchema = z32.looseObject({
10097
- name: z32.string(),
10098
- description: z32.string()
10318
+ import { join as join72 } from "path";
10319
+ import { z as z33 } from "zod/mini";
10320
+ var ClineSkillFrontmatterSchema = z33.looseObject({
10321
+ name: z33.string(),
10322
+ description: z33.string()
10099
10323
  });
10100
10324
  var ClineSkill = class _ClineSkill extends ToolSkill {
10101
10325
  constructor({
10102
10326
  baseDir = process.cwd(),
10103
- relativeDirPath = join71(".cline", "skills"),
10327
+ relativeDirPath = join72(".cline", "skills"),
10104
10328
  dirName,
10105
10329
  frontmatter,
10106
10330
  body,
@@ -10129,7 +10353,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
10129
10353
  }
10130
10354
  static getSettablePaths(_options = {}) {
10131
10355
  return {
10132
- relativeDirPath: join71(".cline", "skills")
10356
+ relativeDirPath: join72(".cline", "skills")
10133
10357
  };
10134
10358
  }
10135
10359
  getFrontmatter() {
@@ -10217,13 +10441,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
10217
10441
  });
10218
10442
  const result = ClineSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10219
10443
  if (!result.success) {
10220
- const skillDirPath = join71(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10444
+ const skillDirPath = join72(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10221
10445
  throw new Error(
10222
- `Invalid frontmatter in ${join71(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10446
+ `Invalid frontmatter in ${join72(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10223
10447
  );
10224
10448
  }
10225
10449
  if (result.data.name !== loaded.dirName) {
10226
- const skillFilePath = join71(
10450
+ const skillFilePath = join72(
10227
10451
  loaded.baseDir,
10228
10452
  loaded.relativeDirPath,
10229
10453
  loaded.dirName,
@@ -10264,21 +10488,21 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
10264
10488
  };
10265
10489
 
10266
10490
  // src/features/skills/codexcli-skill.ts
10267
- import { join as join72 } from "path";
10268
- import { z as z33 } from "zod/mini";
10269
- var CodexCliSkillFrontmatterSchema = z33.looseObject({
10270
- name: z33.string(),
10271
- description: z33.string(),
10272
- metadata: z33.optional(
10273
- z33.looseObject({
10274
- "short-description": z33.optional(z33.string())
10491
+ import { join as join73 } from "path";
10492
+ import { z as z34 } from "zod/mini";
10493
+ var CodexCliSkillFrontmatterSchema = z34.looseObject({
10494
+ name: z34.string(),
10495
+ description: z34.string(),
10496
+ metadata: z34.optional(
10497
+ z34.looseObject({
10498
+ "short-description": z34.optional(z34.string())
10275
10499
  })
10276
10500
  )
10277
10501
  });
10278
10502
  var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
10279
10503
  constructor({
10280
10504
  baseDir = process.cwd(),
10281
- relativeDirPath = join72(".codex", "skills"),
10505
+ relativeDirPath = join73(".codex", "skills"),
10282
10506
  dirName,
10283
10507
  frontmatter,
10284
10508
  body,
@@ -10309,7 +10533,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
10309
10533
  global: _global = false
10310
10534
  } = {}) {
10311
10535
  return {
10312
- relativeDirPath: join72(".codex", "skills")
10536
+ relativeDirPath: join73(".codex", "skills")
10313
10537
  };
10314
10538
  }
10315
10539
  getFrontmatter() {
@@ -10399,9 +10623,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
10399
10623
  });
10400
10624
  const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10401
10625
  if (!result.success) {
10402
- const skillDirPath = join72(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10626
+ const skillDirPath = join73(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10403
10627
  throw new Error(
10404
- `Invalid frontmatter in ${join72(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10628
+ `Invalid frontmatter in ${join73(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10405
10629
  );
10406
10630
  }
10407
10631
  return new _CodexCliSkill({
@@ -10435,17 +10659,17 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
10435
10659
  };
10436
10660
 
10437
10661
  // src/features/skills/copilot-skill.ts
10438
- import { join as join73 } from "path";
10439
- import { z as z34 } from "zod/mini";
10440
- var CopilotSkillFrontmatterSchema = z34.looseObject({
10441
- name: z34.string(),
10442
- description: z34.string(),
10443
- license: z34.optional(z34.string())
10662
+ import { join as join74 } from "path";
10663
+ import { z as z35 } from "zod/mini";
10664
+ var CopilotSkillFrontmatterSchema = z35.looseObject({
10665
+ name: z35.string(),
10666
+ description: z35.string(),
10667
+ license: z35.optional(z35.string())
10444
10668
  });
10445
10669
  var CopilotSkill = class _CopilotSkill extends ToolSkill {
10446
10670
  constructor({
10447
10671
  baseDir = process.cwd(),
10448
- relativeDirPath = join73(".github", "skills"),
10672
+ relativeDirPath = join74(".github", "skills"),
10449
10673
  dirName,
10450
10674
  frontmatter,
10451
10675
  body,
@@ -10477,7 +10701,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
10477
10701
  throw new Error("CopilotSkill does not support global mode.");
10478
10702
  }
10479
10703
  return {
10480
- relativeDirPath: join73(".github", "skills")
10704
+ relativeDirPath: join74(".github", "skills")
10481
10705
  };
10482
10706
  }
10483
10707
  getFrontmatter() {
@@ -10563,9 +10787,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
10563
10787
  });
10564
10788
  const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10565
10789
  if (!result.success) {
10566
- const skillDirPath = join73(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10790
+ const skillDirPath = join74(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10567
10791
  throw new Error(
10568
- `Invalid frontmatter in ${join73(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10792
+ `Invalid frontmatter in ${join74(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10569
10793
  );
10570
10794
  }
10571
10795
  return new _CopilotSkill({
@@ -10600,16 +10824,16 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
10600
10824
  };
10601
10825
 
10602
10826
  // src/features/skills/cursor-skill.ts
10603
- import { join as join74 } from "path";
10604
- import { z as z35 } from "zod/mini";
10605
- var CursorSkillFrontmatterSchema = z35.looseObject({
10606
- name: z35.string(),
10607
- description: z35.string()
10827
+ import { join as join75 } from "path";
10828
+ import { z as z36 } from "zod/mini";
10829
+ var CursorSkillFrontmatterSchema = z36.looseObject({
10830
+ name: z36.string(),
10831
+ description: z36.string()
10608
10832
  });
10609
10833
  var CursorSkill = class _CursorSkill extends ToolSkill {
10610
10834
  constructor({
10611
10835
  baseDir = process.cwd(),
10612
- relativeDirPath = join74(".cursor", "skills"),
10836
+ relativeDirPath = join75(".cursor", "skills"),
10613
10837
  dirName,
10614
10838
  frontmatter,
10615
10839
  body,
@@ -10638,7 +10862,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
10638
10862
  }
10639
10863
  static getSettablePaths(_options) {
10640
10864
  return {
10641
- relativeDirPath: join74(".cursor", "skills")
10865
+ relativeDirPath: join75(".cursor", "skills")
10642
10866
  };
10643
10867
  }
10644
10868
  getFrontmatter() {
@@ -10718,9 +10942,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
10718
10942
  });
10719
10943
  const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10720
10944
  if (!result.success) {
10721
- const skillDirPath = join74(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10945
+ const skillDirPath = join75(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10722
10946
  throw new Error(
10723
- `Invalid frontmatter in ${join74(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10947
+ `Invalid frontmatter in ${join75(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10724
10948
  );
10725
10949
  }
10726
10950
  return new _CursorSkill({
@@ -10755,17 +10979,17 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
10755
10979
  };
10756
10980
 
10757
10981
  // src/features/skills/deepagents-skill.ts
10758
- import { join as join75 } from "path";
10759
- import { z as z36 } from "zod/mini";
10760
- var DeepagentsSkillFrontmatterSchema = z36.looseObject({
10761
- name: z36.string(),
10762
- description: z36.string(),
10763
- "allowed-tools": z36.optional(z36.array(z36.string()))
10982
+ import { join as join76 } from "path";
10983
+ import { z as z37 } from "zod/mini";
10984
+ var DeepagentsSkillFrontmatterSchema = z37.looseObject({
10985
+ name: z37.string(),
10986
+ description: z37.string(),
10987
+ "allowed-tools": z37.optional(z37.array(z37.string()))
10764
10988
  });
10765
10989
  var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
10766
10990
  constructor({
10767
10991
  baseDir = process.cwd(),
10768
- relativeDirPath = join75(".deepagents", "skills"),
10992
+ relativeDirPath = join76(".deepagents", "skills"),
10769
10993
  dirName,
10770
10994
  frontmatter,
10771
10995
  body,
@@ -10794,7 +11018,7 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
10794
11018
  }
10795
11019
  static getSettablePaths(_options) {
10796
11020
  return {
10797
- relativeDirPath: join75(".deepagents", "skills")
11021
+ relativeDirPath: join76(".deepagents", "skills")
10798
11022
  };
10799
11023
  }
10800
11024
  getFrontmatter() {
@@ -10880,9 +11104,9 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
10880
11104
  });
10881
11105
  const result = DeepagentsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10882
11106
  if (!result.success) {
10883
- const skillDirPath = join75(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11107
+ const skillDirPath = join76(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10884
11108
  throw new Error(
10885
- `Invalid frontmatter in ${join75(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11109
+ `Invalid frontmatter in ${join76(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10886
11110
  );
10887
11111
  }
10888
11112
  return new _DeepagentsSkill({
@@ -10917,11 +11141,11 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
10917
11141
  };
10918
11142
 
10919
11143
  // src/features/skills/geminicli-skill.ts
10920
- import { join as join76 } from "path";
10921
- import { z as z37 } from "zod/mini";
10922
- var GeminiCliSkillFrontmatterSchema = z37.looseObject({
10923
- name: z37.string(),
10924
- description: z37.string()
11144
+ import { join as join77 } from "path";
11145
+ import { z as z38 } from "zod/mini";
11146
+ var GeminiCliSkillFrontmatterSchema = z38.looseObject({
11147
+ name: z38.string(),
11148
+ description: z38.string()
10925
11149
  });
10926
11150
  var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
10927
11151
  constructor({
@@ -10957,7 +11181,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
10957
11181
  global: _global = false
10958
11182
  } = {}) {
10959
11183
  return {
10960
- relativeDirPath: join76(".gemini", "skills")
11184
+ relativeDirPath: join77(".gemini", "skills")
10961
11185
  };
10962
11186
  }
10963
11187
  getFrontmatter() {
@@ -11037,9 +11261,9 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
11037
11261
  });
11038
11262
  const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11039
11263
  if (!result.success) {
11040
- const skillDirPath = join76(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11264
+ const skillDirPath = join77(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11041
11265
  throw new Error(
11042
- `Invalid frontmatter in ${join76(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11266
+ `Invalid frontmatter in ${join77(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11043
11267
  );
11044
11268
  }
11045
11269
  return new _GeminiCliSkill({
@@ -11074,16 +11298,16 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
11074
11298
  };
11075
11299
 
11076
11300
  // src/features/skills/junie-skill.ts
11077
- import { join as join77 } from "path";
11078
- import { z as z38 } from "zod/mini";
11079
- var JunieSkillFrontmatterSchema = z38.looseObject({
11080
- name: z38.string(),
11081
- description: z38.string()
11301
+ import { join as join78 } from "path";
11302
+ import { z as z39 } from "zod/mini";
11303
+ var JunieSkillFrontmatterSchema = z39.looseObject({
11304
+ name: z39.string(),
11305
+ description: z39.string()
11082
11306
  });
11083
11307
  var JunieSkill = class _JunieSkill extends ToolSkill {
11084
11308
  constructor({
11085
11309
  baseDir = process.cwd(),
11086
- relativeDirPath = join77(".junie", "skills"),
11310
+ relativeDirPath = join78(".junie", "skills"),
11087
11311
  dirName,
11088
11312
  frontmatter,
11089
11313
  body,
@@ -11115,7 +11339,7 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
11115
11339
  throw new Error("JunieSkill does not support global mode.");
11116
11340
  }
11117
11341
  return {
11118
- relativeDirPath: join77(".junie", "skills")
11342
+ relativeDirPath: join78(".junie", "skills")
11119
11343
  };
11120
11344
  }
11121
11345
  getFrontmatter() {
@@ -11202,13 +11426,13 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
11202
11426
  });
11203
11427
  const result = JunieSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11204
11428
  if (!result.success) {
11205
- const skillDirPath = join77(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11429
+ const skillDirPath = join78(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11206
11430
  throw new Error(
11207
- `Invalid frontmatter in ${join77(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11431
+ `Invalid frontmatter in ${join78(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11208
11432
  );
11209
11433
  }
11210
11434
  if (result.data.name !== loaded.dirName) {
11211
- const skillFilePath = join77(
11435
+ const skillFilePath = join78(
11212
11436
  loaded.baseDir,
11213
11437
  loaded.relativeDirPath,
11214
11438
  loaded.dirName,
@@ -11250,17 +11474,17 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
11250
11474
  };
11251
11475
 
11252
11476
  // src/features/skills/kilo-skill.ts
11253
- import { join as join78 } from "path";
11254
- import { z as z39 } from "zod/mini";
11255
- var KiloSkillFrontmatterSchema = z39.looseObject({
11256
- name: z39.string(),
11257
- description: z39.string(),
11258
- "allowed-tools": z39.optional(z39.array(z39.string()))
11477
+ import { join as join79 } from "path";
11478
+ import { z as z40 } from "zod/mini";
11479
+ var KiloSkillFrontmatterSchema = z40.looseObject({
11480
+ name: z40.string(),
11481
+ description: z40.string(),
11482
+ "allowed-tools": z40.optional(z40.array(z40.string()))
11259
11483
  });
11260
11484
  var KiloSkill = class _KiloSkill extends ToolSkill {
11261
11485
  constructor({
11262
11486
  baseDir = process.cwd(),
11263
- relativeDirPath = join78(".kilo", "skills"),
11487
+ relativeDirPath = join79(".kilo", "skills"),
11264
11488
  dirName,
11265
11489
  frontmatter,
11266
11490
  body,
@@ -11289,7 +11513,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
11289
11513
  }
11290
11514
  static getSettablePaths({ global = false } = {}) {
11291
11515
  return {
11292
- relativeDirPath: global ? join78(".config", "kilo", "skills") : join78(".kilo", "skills")
11516
+ relativeDirPath: global ? join79(".config", "kilo", "skills") : join79(".kilo", "skills")
11293
11517
  };
11294
11518
  }
11295
11519
  getFrontmatter() {
@@ -11375,9 +11599,9 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
11375
11599
  });
11376
11600
  const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11377
11601
  if (!result.success) {
11378
- const skillDirPath = join78(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11602
+ const skillDirPath = join79(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11379
11603
  throw new Error(
11380
- `Invalid frontmatter in ${join78(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11604
+ `Invalid frontmatter in ${join79(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11381
11605
  );
11382
11606
  }
11383
11607
  return new _KiloSkill({
@@ -11411,16 +11635,16 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
11411
11635
  };
11412
11636
 
11413
11637
  // src/features/skills/kiro-skill.ts
11414
- import { join as join79 } from "path";
11415
- import { z as z40 } from "zod/mini";
11416
- var KiroSkillFrontmatterSchema = z40.looseObject({
11417
- name: z40.string(),
11418
- description: z40.string()
11638
+ import { join as join80 } from "path";
11639
+ import { z as z41 } from "zod/mini";
11640
+ var KiroSkillFrontmatterSchema = z41.looseObject({
11641
+ name: z41.string(),
11642
+ description: z41.string()
11419
11643
  });
11420
11644
  var KiroSkill = class _KiroSkill extends ToolSkill {
11421
11645
  constructor({
11422
11646
  baseDir = process.cwd(),
11423
- relativeDirPath = join79(".kiro", "skills"),
11647
+ relativeDirPath = join80(".kiro", "skills"),
11424
11648
  dirName,
11425
11649
  frontmatter,
11426
11650
  body,
@@ -11452,7 +11676,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
11452
11676
  throw new Error("KiroSkill does not support global mode.");
11453
11677
  }
11454
11678
  return {
11455
- relativeDirPath: join79(".kiro", "skills")
11679
+ relativeDirPath: join80(".kiro", "skills")
11456
11680
  };
11457
11681
  }
11458
11682
  getFrontmatter() {
@@ -11540,13 +11764,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
11540
11764
  });
11541
11765
  const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11542
11766
  if (!result.success) {
11543
- const skillDirPath = join79(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11767
+ const skillDirPath = join80(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11544
11768
  throw new Error(
11545
- `Invalid frontmatter in ${join79(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11769
+ `Invalid frontmatter in ${join80(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11546
11770
  );
11547
11771
  }
11548
11772
  if (result.data.name !== loaded.dirName) {
11549
- const skillFilePath = join79(
11773
+ const skillFilePath = join80(
11550
11774
  loaded.baseDir,
11551
11775
  loaded.relativeDirPath,
11552
11776
  loaded.dirName,
@@ -11588,17 +11812,17 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
11588
11812
  };
11589
11813
 
11590
11814
  // src/features/skills/opencode-skill.ts
11591
- import { join as join80 } from "path";
11592
- import { z as z41 } from "zod/mini";
11593
- var OpenCodeSkillFrontmatterSchema = z41.looseObject({
11594
- name: z41.string(),
11595
- description: z41.string(),
11596
- "allowed-tools": z41.optional(z41.array(z41.string()))
11815
+ import { join as join81 } from "path";
11816
+ import { z as z42 } from "zod/mini";
11817
+ var OpenCodeSkillFrontmatterSchema = z42.looseObject({
11818
+ name: z42.string(),
11819
+ description: z42.string(),
11820
+ "allowed-tools": z42.optional(z42.array(z42.string()))
11597
11821
  });
11598
11822
  var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
11599
11823
  constructor({
11600
11824
  baseDir = process.cwd(),
11601
- relativeDirPath = join80(".opencode", "skill"),
11825
+ relativeDirPath = join81(".opencode", "skill"),
11602
11826
  dirName,
11603
11827
  frontmatter,
11604
11828
  body,
@@ -11627,7 +11851,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
11627
11851
  }
11628
11852
  static getSettablePaths({ global = false } = {}) {
11629
11853
  return {
11630
- relativeDirPath: global ? join80(".config", "opencode", "skill") : join80(".opencode", "skill")
11854
+ relativeDirPath: global ? join81(".config", "opencode", "skill") : join81(".opencode", "skill")
11631
11855
  };
11632
11856
  }
11633
11857
  getFrontmatter() {
@@ -11713,9 +11937,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
11713
11937
  });
11714
11938
  const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11715
11939
  if (!result.success) {
11716
- const skillDirPath = join80(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11940
+ const skillDirPath = join81(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11717
11941
  throw new Error(
11718
- `Invalid frontmatter in ${join80(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11942
+ `Invalid frontmatter in ${join81(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11719
11943
  );
11720
11944
  }
11721
11945
  return new _OpenCodeSkill({
@@ -11749,16 +11973,16 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
11749
11973
  };
11750
11974
 
11751
11975
  // src/features/skills/replit-skill.ts
11752
- import { join as join81 } from "path";
11753
- import { z as z42 } from "zod/mini";
11754
- var ReplitSkillFrontmatterSchema = z42.looseObject({
11755
- name: z42.string(),
11756
- description: z42.string()
11976
+ import { join as join82 } from "path";
11977
+ import { z as z43 } from "zod/mini";
11978
+ var ReplitSkillFrontmatterSchema = z43.looseObject({
11979
+ name: z43.string(),
11980
+ description: z43.string()
11757
11981
  });
11758
11982
  var ReplitSkill = class _ReplitSkill extends ToolSkill {
11759
11983
  constructor({
11760
11984
  baseDir = process.cwd(),
11761
- relativeDirPath = join81(".agents", "skills"),
11985
+ relativeDirPath = join82(".agents", "skills"),
11762
11986
  dirName,
11763
11987
  frontmatter,
11764
11988
  body,
@@ -11790,7 +12014,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
11790
12014
  throw new Error("ReplitSkill does not support global mode.");
11791
12015
  }
11792
12016
  return {
11793
- relativeDirPath: join81(".agents", "skills")
12017
+ relativeDirPath: join82(".agents", "skills")
11794
12018
  };
11795
12019
  }
11796
12020
  getFrontmatter() {
@@ -11870,9 +12094,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
11870
12094
  });
11871
12095
  const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11872
12096
  if (!result.success) {
11873
- const skillDirPath = join81(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12097
+ const skillDirPath = join82(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11874
12098
  throw new Error(
11875
- `Invalid frontmatter in ${join81(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12099
+ `Invalid frontmatter in ${join82(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11876
12100
  );
11877
12101
  }
11878
12102
  return new _ReplitSkill({
@@ -11907,16 +12131,16 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
11907
12131
  };
11908
12132
 
11909
12133
  // src/features/skills/roo-skill.ts
11910
- import { join as join82 } from "path";
11911
- import { z as z43 } from "zod/mini";
11912
- var RooSkillFrontmatterSchema = z43.looseObject({
11913
- name: z43.string(),
11914
- description: z43.string()
12134
+ import { join as join83 } from "path";
12135
+ import { z as z44 } from "zod/mini";
12136
+ var RooSkillFrontmatterSchema = z44.looseObject({
12137
+ name: z44.string(),
12138
+ description: z44.string()
11915
12139
  });
11916
12140
  var RooSkill = class _RooSkill extends ToolSkill {
11917
12141
  constructor({
11918
12142
  baseDir = process.cwd(),
11919
- relativeDirPath = join82(".roo", "skills"),
12143
+ relativeDirPath = join83(".roo", "skills"),
11920
12144
  dirName,
11921
12145
  frontmatter,
11922
12146
  body,
@@ -11947,7 +12171,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
11947
12171
  global: _global = false
11948
12172
  } = {}) {
11949
12173
  return {
11950
- relativeDirPath: join82(".roo", "skills")
12174
+ relativeDirPath: join83(".roo", "skills")
11951
12175
  };
11952
12176
  }
11953
12177
  getFrontmatter() {
@@ -12035,13 +12259,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
12035
12259
  });
12036
12260
  const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12037
12261
  if (!result.success) {
12038
- const skillDirPath = join82(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12262
+ const skillDirPath = join83(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12039
12263
  throw new Error(
12040
- `Invalid frontmatter in ${join82(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12264
+ `Invalid frontmatter in ${join83(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12041
12265
  );
12042
12266
  }
12043
12267
  if (result.data.name !== loaded.dirName) {
12044
- const skillFilePath = join82(
12268
+ const skillFilePath = join83(
12045
12269
  loaded.baseDir,
12046
12270
  loaded.relativeDirPath,
12047
12271
  loaded.dirName,
@@ -12082,14 +12306,14 @@ var RooSkill = class _RooSkill extends ToolSkill {
12082
12306
  };
12083
12307
 
12084
12308
  // src/features/skills/skills-utils.ts
12085
- import { basename as basename4, join as join83 } from "path";
12309
+ import { basename as basename4, join as join84 } from "path";
12086
12310
  async function getLocalSkillDirNames(baseDir) {
12087
- const skillsDir = join83(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
12311
+ const skillsDir = join84(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
12088
12312
  const names = /* @__PURE__ */ new Set();
12089
12313
  if (!await directoryExists(skillsDir)) {
12090
12314
  return names;
12091
12315
  }
12092
- const dirPaths = await findFilesByGlobs(join83(skillsDir, "*"), { type: "dir" });
12316
+ const dirPaths = await findFilesByGlobs(join84(skillsDir, "*"), { type: "dir" });
12093
12317
  for (const dirPath of dirPaths) {
12094
12318
  const name = basename4(dirPath);
12095
12319
  if (name === basename4(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
@@ -12120,7 +12344,7 @@ var skillsProcessorToolTargetTuple = [
12120
12344
  "roo",
12121
12345
  "rovodev"
12122
12346
  ];
12123
- var SkillsProcessorToolTargetSchema = z44.enum(skillsProcessorToolTargetTuple);
12347
+ var SkillsProcessorToolTargetSchema = z45.enum(skillsProcessorToolTargetTuple);
12124
12348
  var toolSkillFactories = /* @__PURE__ */ new Map([
12125
12349
  [
12126
12350
  "agentsmd",
@@ -12344,10 +12568,10 @@ var SkillsProcessor = class extends DirFeatureProcessor {
12344
12568
  )
12345
12569
  );
12346
12570
  const localSkillNames = new Set(localDirNames);
12347
- const curatedDirPath = join84(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
12571
+ const curatedDirPath = join85(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
12348
12572
  let curatedSkills = [];
12349
12573
  if (await directoryExists(curatedDirPath)) {
12350
- const curatedDirPaths = await findFilesByGlobs(join84(curatedDirPath, "*"), { type: "dir" });
12574
+ const curatedDirPaths = await findFilesByGlobs(join85(curatedDirPath, "*"), { type: "dir" });
12351
12575
  const curatedDirNames = curatedDirPaths.map((path3) => basename5(path3));
12352
12576
  const nonConflicting = curatedDirNames.filter((name) => {
12353
12577
  if (localSkillNames.has(name)) {
@@ -12385,11 +12609,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
12385
12609
  const seenDirNames = /* @__PURE__ */ new Set();
12386
12610
  const loadEntries = [];
12387
12611
  for (const root of roots) {
12388
- const skillsDirPath = join84(this.baseDir, root);
12612
+ const skillsDirPath = join85(this.baseDir, root);
12389
12613
  if (!await directoryExists(skillsDirPath)) {
12390
12614
  continue;
12391
12615
  }
12392
- const dirPaths = await findFilesByGlobs(join84(skillsDirPath, "*"), { type: "dir" });
12616
+ const dirPaths = await findFilesByGlobs(join85(skillsDirPath, "*"), { type: "dir" });
12393
12617
  for (const dirPath of dirPaths) {
12394
12618
  const dirName = basename5(dirPath);
12395
12619
  if (seenDirNames.has(dirName)) {
@@ -12420,21 +12644,20 @@ var SkillsProcessor = class extends DirFeatureProcessor {
12420
12644
  const roots = toolSkillSearchRoots(paths);
12421
12645
  const toolSkills = [];
12422
12646
  for (const root of roots) {
12423
- const skillsDirPath = join84(this.baseDir, root);
12647
+ const skillsDirPath = join85(this.baseDir, root);
12424
12648
  if (!await directoryExists(skillsDirPath)) {
12425
12649
  continue;
12426
12650
  }
12427
- const dirPaths = await findFilesByGlobs(join84(skillsDirPath, "*"), { type: "dir" });
12651
+ const dirPaths = await findFilesByGlobs(join85(skillsDirPath, "*"), { type: "dir" });
12428
12652
  for (const dirPath of dirPaths) {
12429
12653
  const dirName = basename5(dirPath);
12430
- toolSkills.push(
12431
- factory.class.forDeletion({
12432
- baseDir: this.baseDir,
12433
- relativeDirPath: root,
12434
- dirName,
12435
- global: this.global
12436
- })
12437
- );
12654
+ const toolSkill = factory.class.forDeletion({
12655
+ baseDir: this.baseDir,
12656
+ relativeDirPath: root,
12657
+ dirName,
12658
+ global: this.global
12659
+ });
12660
+ toolSkills.push(toolSkill);
12438
12661
  }
12439
12662
  }
12440
12663
  this.logger.debug(
@@ -12489,11 +12712,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
12489
12712
  };
12490
12713
 
12491
12714
  // src/features/subagents/agentsmd-subagent.ts
12492
- import { join as join86 } from "path";
12715
+ import { join as join87 } from "path";
12493
12716
 
12494
12717
  // src/features/subagents/simulated-subagent.ts
12495
- import { basename as basename6, join as join85 } from "path";
12496
- import { z as z45 } from "zod/mini";
12718
+ import { basename as basename6, join as join86 } from "path";
12719
+ import { z as z46 } from "zod/mini";
12497
12720
 
12498
12721
  // src/features/subagents/tool-subagent.ts
12499
12722
  var ToolSubagent = class extends ToolFile {
@@ -12545,9 +12768,9 @@ var ToolSubagent = class extends ToolFile {
12545
12768
  };
12546
12769
 
12547
12770
  // src/features/subagents/simulated-subagent.ts
12548
- var SimulatedSubagentFrontmatterSchema = z45.object({
12549
- name: z45.string(),
12550
- description: z45.optional(z45.string())
12771
+ var SimulatedSubagentFrontmatterSchema = z46.object({
12772
+ name: z46.string(),
12773
+ description: z46.optional(z46.string())
12551
12774
  });
12552
12775
  var SimulatedSubagent = class extends ToolSubagent {
12553
12776
  frontmatter;
@@ -12557,7 +12780,7 @@ var SimulatedSubagent = class extends ToolSubagent {
12557
12780
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
12558
12781
  if (!result.success) {
12559
12782
  throw new Error(
12560
- `Invalid frontmatter in ${join85(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12783
+ `Invalid frontmatter in ${join86(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12561
12784
  );
12562
12785
  }
12563
12786
  }
@@ -12608,7 +12831,7 @@ var SimulatedSubagent = class extends ToolSubagent {
12608
12831
  return {
12609
12832
  success: false,
12610
12833
  error: new Error(
12611
- `Invalid frontmatter in ${join85(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12834
+ `Invalid frontmatter in ${join86(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12612
12835
  )
12613
12836
  };
12614
12837
  }
@@ -12618,7 +12841,7 @@ var SimulatedSubagent = class extends ToolSubagent {
12618
12841
  relativeFilePath,
12619
12842
  validate = true
12620
12843
  }) {
12621
- const filePath = join85(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
12844
+ const filePath = join86(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
12622
12845
  const fileContent = await readFileContent(filePath);
12623
12846
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
12624
12847
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -12654,7 +12877,7 @@ var SimulatedSubagent = class extends ToolSubagent {
12654
12877
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
12655
12878
  static getSettablePaths() {
12656
12879
  return {
12657
- relativeDirPath: join86(".agents", "subagents")
12880
+ relativeDirPath: join87(".agents", "subagents")
12658
12881
  };
12659
12882
  }
12660
12883
  static async fromFile(params) {
@@ -12677,11 +12900,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
12677
12900
  };
12678
12901
 
12679
12902
  // src/features/subagents/factorydroid-subagent.ts
12680
- import { join as join87 } from "path";
12903
+ import { join as join88 } from "path";
12681
12904
  var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
12682
12905
  static getSettablePaths(_options) {
12683
12906
  return {
12684
- relativeDirPath: join87(".factory", "droids")
12907
+ relativeDirPath: join88(".factory", "droids")
12685
12908
  };
12686
12909
  }
12687
12910
  static async fromFile(params) {
@@ -12704,16 +12927,16 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
12704
12927
  };
12705
12928
 
12706
12929
  // src/features/subagents/geminicli-subagent.ts
12707
- import { join as join89 } from "path";
12708
- import { z as z47 } from "zod/mini";
12930
+ import { join as join90 } from "path";
12931
+ import { z as z48 } from "zod/mini";
12709
12932
 
12710
12933
  // src/features/subagents/rulesync-subagent.ts
12711
- import { basename as basename7, join as join88 } from "path";
12712
- import { z as z46 } from "zod/mini";
12713
- var RulesyncSubagentFrontmatterSchema = z46.looseObject({
12714
- targets: z46._default(RulesyncTargetsSchema, ["*"]),
12715
- name: z46.string(),
12716
- description: z46.optional(z46.string())
12934
+ import { basename as basename7, join as join89 } from "path";
12935
+ import { z as z47 } from "zod/mini";
12936
+ var RulesyncSubagentFrontmatterSchema = z47.looseObject({
12937
+ targets: z47._default(RulesyncTargetsSchema, ["*"]),
12938
+ name: z47.string(),
12939
+ description: z47.optional(z47.string())
12717
12940
  });
12718
12941
  var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
12719
12942
  frontmatter;
@@ -12722,7 +12945,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
12722
12945
  const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
12723
12946
  if (!parseResult.success && rest.validate !== false) {
12724
12947
  throw new Error(
12725
- `Invalid frontmatter in ${join88(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
12948
+ `Invalid frontmatter in ${join89(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
12726
12949
  );
12727
12950
  }
12728
12951
  const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
@@ -12755,7 +12978,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
12755
12978
  return {
12756
12979
  success: false,
12757
12980
  error: new Error(
12758
- `Invalid frontmatter in ${join88(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12981
+ `Invalid frontmatter in ${join89(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12759
12982
  )
12760
12983
  };
12761
12984
  }
@@ -12763,7 +12986,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
12763
12986
  static async fromFile({
12764
12987
  relativeFilePath
12765
12988
  }) {
12766
- const filePath = join88(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
12989
+ const filePath = join89(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
12767
12990
  const fileContent = await readFileContent(filePath);
12768
12991
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
12769
12992
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -12782,9 +13005,9 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
12782
13005
  };
12783
13006
 
12784
13007
  // src/features/subagents/geminicli-subagent.ts
12785
- var GeminiCliSubagentFrontmatterSchema = z47.looseObject({
12786
- name: z47.string(),
12787
- description: z47.optional(z47.string())
13008
+ var GeminiCliSubagentFrontmatterSchema = z48.looseObject({
13009
+ name: z48.string(),
13010
+ description: z48.optional(z48.string())
12788
13011
  });
12789
13012
  var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
12790
13013
  frontmatter;
@@ -12794,7 +13017,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
12794
13017
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
12795
13018
  if (!result.success) {
12796
13019
  throw new Error(
12797
- `Invalid frontmatter in ${join89(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13020
+ `Invalid frontmatter in ${join90(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12798
13021
  );
12799
13022
  }
12800
13023
  }
@@ -12807,7 +13030,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
12807
13030
  }
12808
13031
  static getSettablePaths(_options = {}) {
12809
13032
  return {
12810
- relativeDirPath: join89(".gemini", "agents")
13033
+ relativeDirPath: join90(".gemini", "agents")
12811
13034
  };
12812
13035
  }
12813
13036
  getFrontmatter() {
@@ -12875,7 +13098,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
12875
13098
  return {
12876
13099
  success: false,
12877
13100
  error: new Error(
12878
- `Invalid frontmatter in ${join89(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13101
+ `Invalid frontmatter in ${join90(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12879
13102
  )
12880
13103
  };
12881
13104
  }
@@ -12893,7 +13116,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
12893
13116
  global = false
12894
13117
  }) {
12895
13118
  const paths = this.getSettablePaths({ global });
12896
- const filePath = join89(baseDir, paths.relativeDirPath, relativeFilePath);
13119
+ const filePath = join90(baseDir, paths.relativeDirPath, relativeFilePath);
12897
13120
  const fileContent = await readFileContent(filePath);
12898
13121
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
12899
13122
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -12929,11 +13152,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
12929
13152
  };
12930
13153
 
12931
13154
  // src/features/subagents/roo-subagent.ts
12932
- import { join as join90 } from "path";
13155
+ import { join as join91 } from "path";
12933
13156
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
12934
13157
  static getSettablePaths() {
12935
13158
  return {
12936
- relativeDirPath: join90(".roo", "subagents")
13159
+ relativeDirPath: join91(".roo", "subagents")
12937
13160
  };
12938
13161
  }
12939
13162
  static async fromFile(params) {
@@ -12956,11 +13179,11 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
12956
13179
  };
12957
13180
 
12958
13181
  // src/features/subagents/rovodev-subagent.ts
12959
- import { join as join91 } from "path";
12960
- import { z as z48 } from "zod/mini";
12961
- var RovodevSubagentFrontmatterSchema = z48.looseObject({
12962
- name: z48.string(),
12963
- description: z48.optional(z48.string())
13182
+ import { join as join92 } from "path";
13183
+ import { z as z49 } from "zod/mini";
13184
+ var RovodevSubagentFrontmatterSchema = z49.looseObject({
13185
+ name: z49.string(),
13186
+ description: z49.optional(z49.string())
12964
13187
  });
12965
13188
  var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
12966
13189
  frontmatter;
@@ -12970,7 +13193,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
12970
13193
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
12971
13194
  if (!result.success) {
12972
13195
  throw new Error(
12973
- `Invalid frontmatter in ${join91(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13196
+ `Invalid frontmatter in ${join92(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12974
13197
  );
12975
13198
  }
12976
13199
  }
@@ -12982,7 +13205,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
12982
13205
  }
12983
13206
  static getSettablePaths(_options = {}) {
12984
13207
  return {
12985
- relativeDirPath: join91(".rovodev", "subagents")
13208
+ relativeDirPath: join92(".rovodev", "subagents")
12986
13209
  };
12987
13210
  }
12988
13211
  getFrontmatter() {
@@ -13045,7 +13268,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
13045
13268
  return {
13046
13269
  success: false,
13047
13270
  error: new Error(
13048
- `Invalid frontmatter in ${join91(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13271
+ `Invalid frontmatter in ${join92(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13049
13272
  )
13050
13273
  };
13051
13274
  }
@@ -13062,7 +13285,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
13062
13285
  global = false
13063
13286
  }) {
13064
13287
  const paths = this.getSettablePaths({ global });
13065
- const filePath = join91(baseDir, paths.relativeDirPath, relativeFilePath);
13288
+ const filePath = join92(baseDir, paths.relativeDirPath, relativeFilePath);
13066
13289
  const fileContent = await readFileContent(filePath);
13067
13290
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13068
13291
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13101,19 +13324,19 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
13101
13324
  };
13102
13325
 
13103
13326
  // src/features/subagents/subagents-processor.ts
13104
- import { basename as basename9, join as join102 } from "path";
13105
- import { z as z57 } from "zod/mini";
13327
+ import { basename as basename9, join as join103 } from "path";
13328
+ import { z as z58 } from "zod/mini";
13106
13329
 
13107
13330
  // src/features/subagents/claudecode-subagent.ts
13108
- import { join as join92 } from "path";
13109
- import { z as z49 } from "zod/mini";
13110
- var ClaudecodeSubagentFrontmatterSchema = z49.looseObject({
13111
- name: z49.string(),
13112
- description: z49.optional(z49.string()),
13113
- model: z49.optional(z49.string()),
13114
- tools: z49.optional(z49.union([z49.string(), z49.array(z49.string())])),
13115
- permissionMode: z49.optional(z49.string()),
13116
- skills: z49.optional(z49.union([z49.string(), z49.array(z49.string())]))
13331
+ import { join as join93 } from "path";
13332
+ import { z as z50 } from "zod/mini";
13333
+ var ClaudecodeSubagentFrontmatterSchema = z50.looseObject({
13334
+ name: z50.string(),
13335
+ description: z50.optional(z50.string()),
13336
+ model: z50.optional(z50.string()),
13337
+ tools: z50.optional(z50.union([z50.string(), z50.array(z50.string())])),
13338
+ permissionMode: z50.optional(z50.string()),
13339
+ skills: z50.optional(z50.union([z50.string(), z50.array(z50.string())]))
13117
13340
  });
13118
13341
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
13119
13342
  frontmatter;
@@ -13123,7 +13346,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
13123
13346
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
13124
13347
  if (!result.success) {
13125
13348
  throw new Error(
13126
- `Invalid frontmatter in ${join92(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13349
+ `Invalid frontmatter in ${join93(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13127
13350
  );
13128
13351
  }
13129
13352
  }
@@ -13135,7 +13358,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
13135
13358
  }
13136
13359
  static getSettablePaths(_options = {}) {
13137
13360
  return {
13138
- relativeDirPath: join92(".claude", "agents")
13361
+ relativeDirPath: join93(".claude", "agents")
13139
13362
  };
13140
13363
  }
13141
13364
  getFrontmatter() {
@@ -13214,7 +13437,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
13214
13437
  return {
13215
13438
  success: false,
13216
13439
  error: new Error(
13217
- `Invalid frontmatter in ${join92(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13440
+ `Invalid frontmatter in ${join93(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13218
13441
  )
13219
13442
  };
13220
13443
  }
@@ -13232,7 +13455,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
13232
13455
  global = false
13233
13456
  }) {
13234
13457
  const paths = this.getSettablePaths({ global });
13235
- const filePath = join92(baseDir, paths.relativeDirPath, relativeFilePath);
13458
+ const filePath = join93(baseDir, paths.relativeDirPath, relativeFilePath);
13236
13459
  const fileContent = await readFileContent(filePath);
13237
13460
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13238
13461
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13267,27 +13490,27 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
13267
13490
  };
13268
13491
 
13269
13492
  // src/features/subagents/codexcli-subagent.ts
13270
- import { join as join93 } from "path";
13271
- import * as smolToml3 from "smol-toml";
13272
- import { z as z50 } from "zod/mini";
13273
- var CodexCliSubagentTomlSchema = z50.looseObject({
13274
- name: z50.string(),
13275
- description: z50.optional(z50.string()),
13276
- developer_instructions: z50.optional(z50.string()),
13277
- model: z50.optional(z50.string()),
13278
- model_reasoning_effort: z50.optional(z50.string()),
13279
- sandbox_mode: z50.optional(z50.string())
13493
+ import { join as join94 } from "path";
13494
+ import * as smolToml4 from "smol-toml";
13495
+ import { z as z51 } from "zod/mini";
13496
+ var CodexCliSubagentTomlSchema = z51.looseObject({
13497
+ name: z51.string(),
13498
+ description: z51.optional(z51.string()),
13499
+ developer_instructions: z51.optional(z51.string()),
13500
+ model: z51.optional(z51.string()),
13501
+ model_reasoning_effort: z51.optional(z51.string()),
13502
+ sandbox_mode: z51.optional(z51.string())
13280
13503
  });
13281
13504
  var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13282
13505
  body;
13283
13506
  constructor({ body, ...rest }) {
13284
13507
  if (rest.validate !== false) {
13285
13508
  try {
13286
- const parsed = smolToml3.parse(body);
13509
+ const parsed = smolToml4.parse(body);
13287
13510
  CodexCliSubagentTomlSchema.parse(parsed);
13288
13511
  } catch (error) {
13289
13512
  throw new Error(
13290
- `Invalid TOML in ${join93(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
13513
+ `Invalid TOML in ${join94(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
13291
13514
  { cause: error }
13292
13515
  );
13293
13516
  }
@@ -13299,7 +13522,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13299
13522
  }
13300
13523
  static getSettablePaths(_options = {}) {
13301
13524
  return {
13302
- relativeDirPath: join93(".codex", "agents")
13525
+ relativeDirPath: join94(".codex", "agents")
13303
13526
  };
13304
13527
  }
13305
13528
  getBody() {
@@ -13308,10 +13531,10 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13308
13531
  toRulesyncSubagent() {
13309
13532
  let parsed;
13310
13533
  try {
13311
- parsed = CodexCliSubagentTomlSchema.parse(smolToml3.parse(this.body));
13534
+ parsed = CodexCliSubagentTomlSchema.parse(smolToml4.parse(this.body));
13312
13535
  } catch (error) {
13313
13536
  throw new Error(
13314
- `Failed to parse TOML in ${join93(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
13537
+ `Failed to parse TOML in ${join94(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
13315
13538
  { cause: error }
13316
13539
  );
13317
13540
  }
@@ -13354,7 +13577,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13354
13577
  ...rulesyncSubagent.getBody() ? { developer_instructions: rulesyncSubagent.getBody() } : {},
13355
13578
  ...codexcliSection
13356
13579
  };
13357
- const body = smolToml3.stringify(tomlObj);
13580
+ const body = smolToml4.stringify(tomlObj);
13358
13581
  const paths = this.getSettablePaths({ global });
13359
13582
  const relativeFilePath = rulesyncSubagent.getRelativeFilePath().replace(/\.md$/, ".toml");
13360
13583
  return new _CodexCliSubagent({
@@ -13369,7 +13592,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13369
13592
  }
13370
13593
  validate() {
13371
13594
  try {
13372
- const parsed = smolToml3.parse(this.body);
13595
+ const parsed = smolToml4.parse(this.body);
13373
13596
  CodexCliSubagentTomlSchema.parse(parsed);
13374
13597
  return { success: true, error: null };
13375
13598
  } catch (error) {
@@ -13392,7 +13615,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13392
13615
  global = false
13393
13616
  }) {
13394
13617
  const paths = this.getSettablePaths({ global });
13395
- const filePath = join93(baseDir, paths.relativeDirPath, relativeFilePath);
13618
+ const filePath = join94(baseDir, paths.relativeDirPath, relativeFilePath);
13396
13619
  const fileContent = await readFileContent(filePath);
13397
13620
  const subagent = new _CodexCliSubagent({
13398
13621
  baseDir,
@@ -13430,13 +13653,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
13430
13653
  };
13431
13654
 
13432
13655
  // src/features/subagents/copilot-subagent.ts
13433
- import { join as join94 } from "path";
13434
- import { z as z51 } from "zod/mini";
13656
+ import { join as join95 } from "path";
13657
+ import { z as z52 } from "zod/mini";
13435
13658
  var REQUIRED_TOOL = "agent/runSubagent";
13436
- var CopilotSubagentFrontmatterSchema = z51.looseObject({
13437
- name: z51.string(),
13438
- description: z51.optional(z51.string()),
13439
- tools: z51.optional(z51.union([z51.string(), z51.array(z51.string())]))
13659
+ var CopilotSubagentFrontmatterSchema = z52.looseObject({
13660
+ name: z52.string(),
13661
+ description: z52.optional(z52.string()),
13662
+ tools: z52.optional(z52.union([z52.string(), z52.array(z52.string())]))
13440
13663
  });
13441
13664
  var normalizeTools = (tools) => {
13442
13665
  if (!tools) {
@@ -13456,7 +13679,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
13456
13679
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
13457
13680
  if (!result.success) {
13458
13681
  throw new Error(
13459
- `Invalid frontmatter in ${join94(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13682
+ `Invalid frontmatter in ${join95(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13460
13683
  );
13461
13684
  }
13462
13685
  }
@@ -13468,7 +13691,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
13468
13691
  }
13469
13692
  static getSettablePaths(_options = {}) {
13470
13693
  return {
13471
- relativeDirPath: join94(".github", "agents")
13694
+ relativeDirPath: join95(".github", "agents")
13472
13695
  };
13473
13696
  }
13474
13697
  getFrontmatter() {
@@ -13542,7 +13765,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
13542
13765
  return {
13543
13766
  success: false,
13544
13767
  error: new Error(
13545
- `Invalid frontmatter in ${join94(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13768
+ `Invalid frontmatter in ${join95(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13546
13769
  )
13547
13770
  };
13548
13771
  }
@@ -13560,7 +13783,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
13560
13783
  global = false
13561
13784
  }) {
13562
13785
  const paths = this.getSettablePaths({ global });
13563
- const filePath = join94(baseDir, paths.relativeDirPath, relativeFilePath);
13786
+ const filePath = join95(baseDir, paths.relativeDirPath, relativeFilePath);
13564
13787
  const fileContent = await readFileContent(filePath);
13565
13788
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13566
13789
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13596,11 +13819,11 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
13596
13819
  };
13597
13820
 
13598
13821
  // src/features/subagents/cursor-subagent.ts
13599
- import { join as join95 } from "path";
13600
- import { z as z52 } from "zod/mini";
13601
- var CursorSubagentFrontmatterSchema = z52.looseObject({
13602
- name: z52.string(),
13603
- description: z52.optional(z52.string())
13822
+ import { join as join96 } from "path";
13823
+ import { z as z53 } from "zod/mini";
13824
+ var CursorSubagentFrontmatterSchema = z53.looseObject({
13825
+ name: z53.string(),
13826
+ description: z53.optional(z53.string())
13604
13827
  });
13605
13828
  var CursorSubagent = class _CursorSubagent extends ToolSubagent {
13606
13829
  frontmatter;
@@ -13610,7 +13833,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
13610
13833
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
13611
13834
  if (!result.success) {
13612
13835
  throw new Error(
13613
- `Invalid frontmatter in ${join95(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13836
+ `Invalid frontmatter in ${join96(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13614
13837
  );
13615
13838
  }
13616
13839
  }
@@ -13622,7 +13845,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
13622
13845
  }
13623
13846
  static getSettablePaths(_options = {}) {
13624
13847
  return {
13625
- relativeDirPath: join95(".cursor", "agents")
13848
+ relativeDirPath: join96(".cursor", "agents")
13626
13849
  };
13627
13850
  }
13628
13851
  getFrontmatter() {
@@ -13689,7 +13912,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
13689
13912
  return {
13690
13913
  success: false,
13691
13914
  error: new Error(
13692
- `Invalid frontmatter in ${join95(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13915
+ `Invalid frontmatter in ${join96(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13693
13916
  )
13694
13917
  };
13695
13918
  }
@@ -13707,7 +13930,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
13707
13930
  global = false
13708
13931
  }) {
13709
13932
  const paths = this.getSettablePaths({ global });
13710
- const filePath = join95(baseDir, paths.relativeDirPath, relativeFilePath);
13933
+ const filePath = join96(baseDir, paths.relativeDirPath, relativeFilePath);
13711
13934
  const fileContent = await readFileContent(filePath);
13712
13935
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13713
13936
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13743,12 +13966,12 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
13743
13966
  };
13744
13967
 
13745
13968
  // src/features/subagents/deepagents-subagent.ts
13746
- import { join as join96 } from "path";
13747
- import { z as z53 } from "zod/mini";
13748
- var DeepagentsSubagentFrontmatterSchema = z53.looseObject({
13749
- name: z53.string(),
13750
- description: z53.optional(z53.string()),
13751
- model: z53.optional(z53.string())
13969
+ import { join as join97 } from "path";
13970
+ import { z as z54 } from "zod/mini";
13971
+ var DeepagentsSubagentFrontmatterSchema = z54.looseObject({
13972
+ name: z54.string(),
13973
+ description: z54.optional(z54.string()),
13974
+ model: z54.optional(z54.string())
13752
13975
  });
13753
13976
  var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
13754
13977
  frontmatter;
@@ -13758,7 +13981,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
13758
13981
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
13759
13982
  if (!result.success) {
13760
13983
  throw new Error(
13761
- `Invalid frontmatter in ${join96(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13984
+ `Invalid frontmatter in ${join97(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13762
13985
  );
13763
13986
  }
13764
13987
  }
@@ -13768,7 +13991,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
13768
13991
  }
13769
13992
  static getSettablePaths(_options = {}) {
13770
13993
  return {
13771
- relativeDirPath: join96(".deepagents", "agents")
13994
+ relativeDirPath: join97(".deepagents", "agents")
13772
13995
  };
13773
13996
  }
13774
13997
  getFrontmatter() {
@@ -13843,7 +14066,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
13843
14066
  return {
13844
14067
  success: false,
13845
14068
  error: new Error(
13846
- `Invalid frontmatter in ${join96(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14069
+ `Invalid frontmatter in ${join97(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13847
14070
  )
13848
14071
  };
13849
14072
  }
@@ -13861,7 +14084,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
13861
14084
  global = false
13862
14085
  }) {
13863
14086
  const paths = this.getSettablePaths({ global });
13864
- const filePath = join96(baseDir, paths.relativeDirPath, relativeFilePath);
14087
+ const filePath = join97(baseDir, paths.relativeDirPath, relativeFilePath);
13865
14088
  const fileContent = await readFileContent(filePath);
13866
14089
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13867
14090
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13896,11 +14119,11 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
13896
14119
  };
13897
14120
 
13898
14121
  // src/features/subagents/junie-subagent.ts
13899
- import { join as join97 } from "path";
13900
- import { z as z54 } from "zod/mini";
13901
- var JunieSubagentFrontmatterSchema = z54.looseObject({
13902
- name: z54.optional(z54.string()),
13903
- description: z54.string()
14122
+ import { join as join98 } from "path";
14123
+ import { z as z55 } from "zod/mini";
14124
+ var JunieSubagentFrontmatterSchema = z55.looseObject({
14125
+ name: z55.optional(z55.string()),
14126
+ description: z55.string()
13904
14127
  });
13905
14128
  var JunieSubagent = class _JunieSubagent extends ToolSubagent {
13906
14129
  frontmatter;
@@ -13910,7 +14133,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
13910
14133
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
13911
14134
  if (!result.success) {
13912
14135
  throw new Error(
13913
- `Invalid frontmatter in ${join97(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14136
+ `Invalid frontmatter in ${join98(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13914
14137
  );
13915
14138
  }
13916
14139
  }
@@ -13925,7 +14148,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
13925
14148
  throw new Error("JunieSubagent does not support global mode.");
13926
14149
  }
13927
14150
  return {
13928
- relativeDirPath: join97(".junie", "agents")
14151
+ relativeDirPath: join98(".junie", "agents")
13929
14152
  };
13930
14153
  }
13931
14154
  getFrontmatter() {
@@ -14001,7 +14224,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
14001
14224
  return {
14002
14225
  success: false,
14003
14226
  error: new Error(
14004
- `Invalid frontmatter in ${join97(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14227
+ `Invalid frontmatter in ${join98(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14005
14228
  )
14006
14229
  };
14007
14230
  }
@@ -14019,7 +14242,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
14019
14242
  global = false
14020
14243
  }) {
14021
14244
  const paths = this.getSettablePaths({ global });
14022
- const filePath = join97(baseDir, paths.relativeDirPath, relativeFilePath);
14245
+ const filePath = join98(baseDir, paths.relativeDirPath, relativeFilePath);
14023
14246
  const fileContent = await readFileContent(filePath);
14024
14247
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14025
14248
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14054,15 +14277,15 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
14054
14277
  };
14055
14278
 
14056
14279
  // src/features/subagents/kilo-subagent.ts
14057
- import { join as join99 } from "path";
14280
+ import { join as join100 } from "path";
14058
14281
 
14059
14282
  // src/features/subagents/opencode-style-subagent.ts
14060
- import { basename as basename8, join as join98 } from "path";
14061
- import { z as z55 } from "zod/mini";
14062
- var OpenCodeStyleSubagentFrontmatterSchema = z55.looseObject({
14063
- description: z55.optional(z55.string()),
14064
- mode: z55._default(z55.string(), "subagent"),
14065
- name: z55.optional(z55.string())
14283
+ import { basename as basename8, join as join99 } from "path";
14284
+ import { z as z56 } from "zod/mini";
14285
+ var OpenCodeStyleSubagentFrontmatterSchema = z56.looseObject({
14286
+ description: z56.optional(z56.string()),
14287
+ mode: z56._default(z56.string(), "subagent"),
14288
+ name: z56.optional(z56.string())
14066
14289
  });
14067
14290
  var OpenCodeStyleSubagent = class extends ToolSubagent {
14068
14291
  frontmatter;
@@ -14072,7 +14295,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
14072
14295
  const result = OpenCodeStyleSubagentFrontmatterSchema.safeParse(frontmatter);
14073
14296
  if (!result.success) {
14074
14297
  throw new Error(
14075
- `Invalid frontmatter in ${join98(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14298
+ `Invalid frontmatter in ${join99(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14076
14299
  );
14077
14300
  }
14078
14301
  }
@@ -14114,7 +14337,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
14114
14337
  return {
14115
14338
  success: false,
14116
14339
  error: new Error(
14117
- `Invalid frontmatter in ${join98(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14340
+ `Invalid frontmatter in ${join99(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14118
14341
  )
14119
14342
  };
14120
14343
  }
@@ -14130,7 +14353,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
14130
14353
  global = false
14131
14354
  } = {}) {
14132
14355
  return {
14133
- relativeDirPath: global ? join99(".config", "kilo", "agent") : join99(".kilo", "agent")
14356
+ relativeDirPath: global ? join100(".config", "kilo", "agent") : join100(".kilo", "agent")
14134
14357
  };
14135
14358
  }
14136
14359
  static fromRulesyncSubagent({
@@ -14174,7 +14397,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
14174
14397
  global = false
14175
14398
  }) {
14176
14399
  const paths = this.getSettablePaths({ global });
14177
- const filePath = join99(baseDir, paths.relativeDirPath, relativeFilePath);
14400
+ const filePath = join100(baseDir, paths.relativeDirPath, relativeFilePath);
14178
14401
  const fileContent = await readFileContent(filePath);
14179
14402
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14180
14403
  const result = KiloSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14210,23 +14433,23 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
14210
14433
  };
14211
14434
 
14212
14435
  // src/features/subagents/kiro-subagent.ts
14213
- import { join as join100 } from "path";
14214
- import { z as z56 } from "zod/mini";
14215
- var KiroCliSubagentJsonSchema = z56.looseObject({
14216
- name: z56.string(),
14217
- description: z56.optional(z56.nullable(z56.string())),
14218
- prompt: z56.optional(z56.nullable(z56.string())),
14219
- tools: z56.optional(z56.nullable(z56.array(z56.string()))),
14220
- toolAliases: z56.optional(z56.nullable(z56.record(z56.string(), z56.string()))),
14221
- toolSettings: z56.optional(z56.nullable(z56.unknown())),
14222
- toolSchema: z56.optional(z56.nullable(z56.unknown())),
14223
- hooks: z56.optional(z56.nullable(z56.record(z56.string(), z56.array(z56.unknown())))),
14224
- model: z56.optional(z56.nullable(z56.string())),
14225
- mcpServers: z56.optional(z56.nullable(z56.record(z56.string(), z56.unknown()))),
14226
- useLegacyMcpJson: z56.optional(z56.nullable(z56.boolean())),
14227
- resources: z56.optional(z56.nullable(z56.array(z56.string()))),
14228
- allowedTools: z56.optional(z56.nullable(z56.array(z56.string()))),
14229
- includeMcpJson: z56.optional(z56.nullable(z56.boolean()))
14436
+ import { join as join101 } from "path";
14437
+ import { z as z57 } from "zod/mini";
14438
+ var KiroCliSubagentJsonSchema = z57.looseObject({
14439
+ name: z57.string(),
14440
+ description: z57.optional(z57.nullable(z57.string())),
14441
+ prompt: z57.optional(z57.nullable(z57.string())),
14442
+ tools: z57.optional(z57.nullable(z57.array(z57.string()))),
14443
+ toolAliases: z57.optional(z57.nullable(z57.record(z57.string(), z57.string()))),
14444
+ toolSettings: z57.optional(z57.nullable(z57.unknown())),
14445
+ toolSchema: z57.optional(z57.nullable(z57.unknown())),
14446
+ hooks: z57.optional(z57.nullable(z57.record(z57.string(), z57.array(z57.unknown())))),
14447
+ model: z57.optional(z57.nullable(z57.string())),
14448
+ mcpServers: z57.optional(z57.nullable(z57.record(z57.string(), z57.unknown()))),
14449
+ useLegacyMcpJson: z57.optional(z57.nullable(z57.boolean())),
14450
+ resources: z57.optional(z57.nullable(z57.array(z57.string()))),
14451
+ allowedTools: z57.optional(z57.nullable(z57.array(z57.string()))),
14452
+ includeMcpJson: z57.optional(z57.nullable(z57.boolean()))
14230
14453
  });
14231
14454
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
14232
14455
  body;
@@ -14237,7 +14460,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
14237
14460
  KiroCliSubagentJsonSchema.parse(parsed);
14238
14461
  } catch (error) {
14239
14462
  throw new Error(
14240
- `Invalid JSON in ${join100(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
14463
+ `Invalid JSON in ${join101(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
14241
14464
  { cause: error }
14242
14465
  );
14243
14466
  }
@@ -14249,7 +14472,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
14249
14472
  }
14250
14473
  static getSettablePaths(_options = {}) {
14251
14474
  return {
14252
- relativeDirPath: join100(".kiro", "agents")
14475
+ relativeDirPath: join101(".kiro", "agents")
14253
14476
  };
14254
14477
  }
14255
14478
  getBody() {
@@ -14261,7 +14484,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
14261
14484
  parsed = JSON.parse(this.body);
14262
14485
  } catch (error) {
14263
14486
  throw new Error(
14264
- `Failed to parse JSON in ${join100(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
14487
+ `Failed to parse JSON in ${join101(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
14265
14488
  { cause: error }
14266
14489
  );
14267
14490
  }
@@ -14342,7 +14565,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
14342
14565
  global = false
14343
14566
  }) {
14344
14567
  const paths = this.getSettablePaths({ global });
14345
- const filePath = join100(baseDir, paths.relativeDirPath, relativeFilePath);
14568
+ const filePath = join101(baseDir, paths.relativeDirPath, relativeFilePath);
14346
14569
  const fileContent = await readFileContent(filePath);
14347
14570
  const subagent = new _KiroSubagent({
14348
14571
  baseDir,
@@ -14380,7 +14603,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
14380
14603
  };
14381
14604
 
14382
14605
  // src/features/subagents/opencode-subagent.ts
14383
- import { join as join101 } from "path";
14606
+ import { join as join102 } from "path";
14384
14607
  var OpenCodeSubagentFrontmatterSchema = OpenCodeStyleSubagentFrontmatterSchema;
14385
14608
  var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
14386
14609
  getToolTarget() {
@@ -14390,7 +14613,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
14390
14613
  global = false
14391
14614
  } = {}) {
14392
14615
  return {
14393
- relativeDirPath: global ? join101(".config", "opencode", "agent") : join101(".opencode", "agent")
14616
+ relativeDirPath: global ? join102(".config", "opencode", "agent") : join102(".opencode", "agent")
14394
14617
  };
14395
14618
  }
14396
14619
  static fromRulesyncSubagent({
@@ -14434,7 +14657,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
14434
14657
  global = false
14435
14658
  }) {
14436
14659
  const paths = this.getSettablePaths({ global });
14437
- const filePath = join101(baseDir, paths.relativeDirPath, relativeFilePath);
14660
+ const filePath = join102(baseDir, paths.relativeDirPath, relativeFilePath);
14438
14661
  const fileContent = await readFileContent(filePath);
14439
14662
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14440
14663
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14487,7 +14710,7 @@ var subagentsProcessorToolTargetTuple = [
14487
14710
  "roo",
14488
14711
  "rovodev"
14489
14712
  ];
14490
- var SubagentsProcessorToolTargetSchema = z57.enum(subagentsProcessorToolTargetTuple);
14713
+ var SubagentsProcessorToolTargetSchema = z58.enum(subagentsProcessorToolTargetTuple);
14491
14714
  var toolSubagentFactories = /* @__PURE__ */ new Map([
14492
14715
  [
14493
14716
  "agentsmd",
@@ -14678,7 +14901,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
14678
14901
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
14679
14902
  */
14680
14903
  async loadRulesyncFiles() {
14681
- const subagentsDir = join102(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
14904
+ const subagentsDir = join103(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
14682
14905
  const dirExists = await directoryExists(subagentsDir);
14683
14906
  if (!dirExists) {
14684
14907
  this.logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -14693,7 +14916,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
14693
14916
  this.logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
14694
14917
  const rulesyncSubagents = [];
14695
14918
  for (const mdFile of mdFiles) {
14696
- const filepath = join102(subagentsDir, mdFile);
14919
+ const filepath = join103(subagentsDir, mdFile);
14697
14920
  try {
14698
14921
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
14699
14922
  relativeFilePath: mdFile,
@@ -14723,7 +14946,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
14723
14946
  const factory = this.getFactory(this.toolTarget);
14724
14947
  const paths = factory.class.getSettablePaths({ global: this.global });
14725
14948
  const subagentFilePaths = await findFilesByGlobs(
14726
- join102(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
14949
+ join103(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
14727
14950
  );
14728
14951
  if (forDeletion) {
14729
14952
  const toolSubagents2 = subagentFilePaths.map(
@@ -14790,49 +15013,49 @@ var SubagentsProcessor = class extends FeatureProcessor {
14790
15013
  };
14791
15014
 
14792
15015
  // src/features/rules/agentsmd-rule.ts
14793
- import { join as join105 } from "path";
15016
+ import { join as join106 } from "path";
14794
15017
 
14795
15018
  // src/features/rules/tool-rule.ts
14796
- import { join as join104 } from "path";
15019
+ import { join as join105 } from "path";
14797
15020
 
14798
15021
  // src/features/rules/rulesync-rule.ts
14799
- import { join as join103 } from "path";
14800
- import { z as z58 } from "zod/mini";
14801
- var RulesyncRuleFrontmatterSchema = z58.object({
14802
- root: z58.optional(z58.boolean()),
14803
- localRoot: z58.optional(z58.boolean()),
14804
- targets: z58._default(RulesyncTargetsSchema, ["*"]),
14805
- description: z58.optional(z58.string()),
14806
- globs: z58.optional(z58.array(z58.string())),
14807
- agentsmd: z58.optional(
14808
- z58.looseObject({
15022
+ import { join as join104 } from "path";
15023
+ import { z as z59 } from "zod/mini";
15024
+ var RulesyncRuleFrontmatterSchema = z59.object({
15025
+ root: z59.optional(z59.boolean()),
15026
+ localRoot: z59.optional(z59.boolean()),
15027
+ targets: z59._default(RulesyncTargetsSchema, ["*"]),
15028
+ description: z59.optional(z59.string()),
15029
+ globs: z59.optional(z59.array(z59.string())),
15030
+ agentsmd: z59.optional(
15031
+ z59.looseObject({
14809
15032
  // @example "path/to/subproject"
14810
- subprojectPath: z58.optional(z58.string())
15033
+ subprojectPath: z59.optional(z59.string())
14811
15034
  })
14812
15035
  ),
14813
- claudecode: z58.optional(
14814
- z58.looseObject({
15036
+ claudecode: z59.optional(
15037
+ z59.looseObject({
14815
15038
  // Glob patterns for conditional rules (takes precedence over globs)
14816
15039
  // @example ["src/**/*.ts", "tests/**/*.test.ts"]
14817
- paths: z58.optional(z58.array(z58.string()))
15040
+ paths: z59.optional(z59.array(z59.string()))
14818
15041
  })
14819
15042
  ),
14820
- cursor: z58.optional(
14821
- z58.looseObject({
14822
- alwaysApply: z58.optional(z58.boolean()),
14823
- description: z58.optional(z58.string()),
14824
- globs: z58.optional(z58.array(z58.string()))
15043
+ cursor: z59.optional(
15044
+ z59.looseObject({
15045
+ alwaysApply: z59.optional(z59.boolean()),
15046
+ description: z59.optional(z59.string()),
15047
+ globs: z59.optional(z59.array(z59.string()))
14825
15048
  })
14826
15049
  ),
14827
- copilot: z58.optional(
14828
- z58.looseObject({
14829
- excludeAgent: z58.optional(z58.union([z58.literal("code-review"), z58.literal("coding-agent")]))
15050
+ copilot: z59.optional(
15051
+ z59.looseObject({
15052
+ excludeAgent: z59.optional(z59.union([z59.literal("code-review"), z59.literal("coding-agent")]))
14830
15053
  })
14831
15054
  ),
14832
- antigravity: z58.optional(
14833
- z58.looseObject({
14834
- trigger: z58.optional(z58.string()),
14835
- globs: z58.optional(z58.array(z58.string()))
15055
+ antigravity: z59.optional(
15056
+ z59.looseObject({
15057
+ trigger: z59.optional(z59.string()),
15058
+ globs: z59.optional(z59.array(z59.string()))
14836
15059
  })
14837
15060
  )
14838
15061
  });
@@ -14843,7 +15066,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
14843
15066
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
14844
15067
  if (!parseResult.success && rest.validate !== false) {
14845
15068
  throw new Error(
14846
- `Invalid frontmatter in ${join103(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
15069
+ `Invalid frontmatter in ${join104(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
14847
15070
  );
14848
15071
  }
14849
15072
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -14878,7 +15101,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
14878
15101
  return {
14879
15102
  success: false,
14880
15103
  error: new Error(
14881
- `Invalid frontmatter in ${join103(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15104
+ `Invalid frontmatter in ${join104(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14882
15105
  )
14883
15106
  };
14884
15107
  }
@@ -14887,7 +15110,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
14887
15110
  relativeFilePath,
14888
15111
  validate = true
14889
15112
  }) {
14890
- const filePath = join103(
15113
+ const filePath = join104(
14891
15114
  process.cwd(),
14892
15115
  this.getSettablePaths().recommended.relativeDirPath,
14893
15116
  relativeFilePath
@@ -14986,7 +15209,7 @@ var ToolRule = class extends ToolFile {
14986
15209
  rulesyncRule,
14987
15210
  validate = true,
14988
15211
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
14989
- nonRootPath = { relativeDirPath: join104(".agents", "memories") }
15212
+ nonRootPath = { relativeDirPath: join105(".agents", "memories") }
14990
15213
  }) {
14991
15214
  const params = this.buildToolRuleParamsDefault({
14992
15215
  baseDir,
@@ -14997,7 +15220,7 @@ var ToolRule = class extends ToolFile {
14997
15220
  });
14998
15221
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
14999
15222
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
15000
- params.relativeDirPath = join104(rulesyncFrontmatter.agentsmd.subprojectPath);
15223
+ params.relativeDirPath = join105(rulesyncFrontmatter.agentsmd.subprojectPath);
15001
15224
  params.relativeFilePath = "AGENTS.md";
15002
15225
  }
15003
15226
  return params;
@@ -15046,7 +15269,7 @@ var ToolRule = class extends ToolFile {
15046
15269
  }
15047
15270
  };
15048
15271
  function buildToolPath(toolDir, subDir, excludeToolDir) {
15049
- return excludeToolDir ? subDir : join104(toolDir, subDir);
15272
+ return excludeToolDir ? subDir : join105(toolDir, subDir);
15050
15273
  }
15051
15274
 
15052
15275
  // src/features/rules/agentsmd-rule.ts
@@ -15075,8 +15298,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
15075
15298
  validate = true
15076
15299
  }) {
15077
15300
  const isRoot = relativeFilePath === "AGENTS.md";
15078
- const relativePath = isRoot ? "AGENTS.md" : join105(".agents", "memories", relativeFilePath);
15079
- const fileContent = await readFileContent(join105(baseDir, relativePath));
15301
+ const relativePath = isRoot ? "AGENTS.md" : join106(".agents", "memories", relativeFilePath);
15302
+ const fileContent = await readFileContent(join106(baseDir, relativePath));
15080
15303
  return new _AgentsMdRule({
15081
15304
  baseDir,
15082
15305
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -15131,21 +15354,21 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
15131
15354
  };
15132
15355
 
15133
15356
  // src/features/rules/antigravity-rule.ts
15134
- import { join as join106 } from "path";
15135
- import { z as z59 } from "zod/mini";
15136
- var AntigravityRuleFrontmatterSchema = z59.looseObject({
15137
- trigger: z59.optional(
15138
- z59.union([
15139
- z59.literal("always_on"),
15140
- z59.literal("glob"),
15141
- z59.literal("manual"),
15142
- z59.literal("model_decision"),
15143
- z59.string()
15357
+ import { join as join107 } from "path";
15358
+ import { z as z60 } from "zod/mini";
15359
+ var AntigravityRuleFrontmatterSchema = z60.looseObject({
15360
+ trigger: z60.optional(
15361
+ z60.union([
15362
+ z60.literal("always_on"),
15363
+ z60.literal("glob"),
15364
+ z60.literal("manual"),
15365
+ z60.literal("model_decision"),
15366
+ z60.string()
15144
15367
  // accepts any string for forward compatibility
15145
15368
  ])
15146
15369
  ),
15147
- globs: z59.optional(z59.string()),
15148
- description: z59.optional(z59.string())
15370
+ globs: z60.optional(z60.string()),
15371
+ description: z60.optional(z60.string())
15149
15372
  });
15150
15373
  function parseGlobsString(globs) {
15151
15374
  if (!globs) {
@@ -15290,7 +15513,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
15290
15513
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
15291
15514
  if (!result.success) {
15292
15515
  throw new Error(
15293
- `Invalid frontmatter in ${join106(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15516
+ `Invalid frontmatter in ${join107(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15294
15517
  );
15295
15518
  }
15296
15519
  }
@@ -15314,7 +15537,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
15314
15537
  relativeFilePath,
15315
15538
  validate = true
15316
15539
  }) {
15317
- const filePath = join106(
15540
+ const filePath = join107(
15318
15541
  baseDir,
15319
15542
  this.getSettablePaths().nonRoot.relativeDirPath,
15320
15543
  relativeFilePath
@@ -15454,7 +15677,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
15454
15677
  };
15455
15678
 
15456
15679
  // src/features/rules/augmentcode-legacy-rule.ts
15457
- import { join as join107 } from "path";
15680
+ import { join as join108 } from "path";
15458
15681
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
15459
15682
  toRulesyncRule() {
15460
15683
  const rulesyncFrontmatter = {
@@ -15514,8 +15737,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
15514
15737
  }) {
15515
15738
  const settablePaths = this.getSettablePaths();
15516
15739
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
15517
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : join107(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
15518
- const fileContent = await readFileContent(join107(baseDir, relativePath));
15740
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : join108(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
15741
+ const fileContent = await readFileContent(join108(baseDir, relativePath));
15519
15742
  return new _AugmentcodeLegacyRule({
15520
15743
  baseDir,
15521
15744
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -15544,7 +15767,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
15544
15767
  };
15545
15768
 
15546
15769
  // src/features/rules/augmentcode-rule.ts
15547
- import { join as join108 } from "path";
15770
+ import { join as join109 } from "path";
15548
15771
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
15549
15772
  toRulesyncRule() {
15550
15773
  return this.toRulesyncRuleDefault();
@@ -15575,7 +15798,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
15575
15798
  relativeFilePath,
15576
15799
  validate = true
15577
15800
  }) {
15578
- const filePath = join108(
15801
+ const filePath = join109(
15579
15802
  baseDir,
15580
15803
  this.getSettablePaths().nonRoot.relativeDirPath,
15581
15804
  relativeFilePath
@@ -15615,7 +15838,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
15615
15838
  };
15616
15839
 
15617
15840
  // src/features/rules/claudecode-legacy-rule.ts
15618
- import { join as join109 } from "path";
15841
+ import { join as join110 } from "path";
15619
15842
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
15620
15843
  static getSettablePaths({
15621
15844
  global,
@@ -15657,7 +15880,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
15657
15880
  if (isRoot) {
15658
15881
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
15659
15882
  const fileContent2 = await readFileContent(
15660
- join109(baseDir, rootDirPath, paths.root.relativeFilePath)
15883
+ join110(baseDir, rootDirPath, paths.root.relativeFilePath)
15661
15884
  );
15662
15885
  return new _ClaudecodeLegacyRule({
15663
15886
  baseDir,
@@ -15671,8 +15894,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
15671
15894
  if (!paths.nonRoot) {
15672
15895
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
15673
15896
  }
15674
- const relativePath = join109(paths.nonRoot.relativeDirPath, relativeFilePath);
15675
- const fileContent = await readFileContent(join109(baseDir, relativePath));
15897
+ const relativePath = join110(paths.nonRoot.relativeDirPath, relativeFilePath);
15898
+ const fileContent = await readFileContent(join110(baseDir, relativePath));
15676
15899
  return new _ClaudecodeLegacyRule({
15677
15900
  baseDir,
15678
15901
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -15731,10 +15954,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
15731
15954
  };
15732
15955
 
15733
15956
  // src/features/rules/claudecode-rule.ts
15734
- import { join as join110 } from "path";
15735
- import { z as z60 } from "zod/mini";
15736
- var ClaudecodeRuleFrontmatterSchema = z60.object({
15737
- paths: z60.optional(z60.array(z60.string()))
15957
+ import { join as join111 } from "path";
15958
+ import { z as z61 } from "zod/mini";
15959
+ var ClaudecodeRuleFrontmatterSchema = z61.object({
15960
+ paths: z61.optional(z61.array(z61.string()))
15738
15961
  });
15739
15962
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
15740
15963
  frontmatter;
@@ -15772,7 +15995,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
15772
15995
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
15773
15996
  if (!result.success) {
15774
15997
  throw new Error(
15775
- `Invalid frontmatter in ${join110(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15998
+ `Invalid frontmatter in ${join111(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15776
15999
  );
15777
16000
  }
15778
16001
  }
@@ -15802,7 +16025,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
15802
16025
  if (isRoot) {
15803
16026
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
15804
16027
  const fileContent2 = await readFileContent(
15805
- join110(baseDir, rootDirPath, paths.root.relativeFilePath)
16028
+ join111(baseDir, rootDirPath, paths.root.relativeFilePath)
15806
16029
  );
15807
16030
  return new _ClaudecodeRule({
15808
16031
  baseDir,
@@ -15817,8 +16040,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
15817
16040
  if (!paths.nonRoot) {
15818
16041
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
15819
16042
  }
15820
- const relativePath = join110(paths.nonRoot.relativeDirPath, relativeFilePath);
15821
- const filePath = join110(baseDir, relativePath);
16043
+ const relativePath = join111(paths.nonRoot.relativeDirPath, relativeFilePath);
16044
+ const filePath = join111(baseDir, relativePath);
15822
16045
  const fileContent = await readFileContent(filePath);
15823
16046
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15824
16047
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
@@ -15929,7 +16152,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
15929
16152
  return {
15930
16153
  success: false,
15931
16154
  error: new Error(
15932
- `Invalid frontmatter in ${join110(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16155
+ `Invalid frontmatter in ${join111(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15933
16156
  )
15934
16157
  };
15935
16158
  }
@@ -15949,10 +16172,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
15949
16172
  };
15950
16173
 
15951
16174
  // src/features/rules/cline-rule.ts
15952
- import { join as join111 } from "path";
15953
- import { z as z61 } from "zod/mini";
15954
- var ClineRuleFrontmatterSchema = z61.object({
15955
- description: z61.string()
16175
+ import { join as join112 } from "path";
16176
+ import { z as z62 } from "zod/mini";
16177
+ var ClineRuleFrontmatterSchema = z62.object({
16178
+ description: z62.string()
15956
16179
  });
15957
16180
  var ClineRule = class _ClineRule extends ToolRule {
15958
16181
  static getSettablePaths(_options = {}) {
@@ -15995,7 +16218,7 @@ var ClineRule = class _ClineRule extends ToolRule {
15995
16218
  validate = true
15996
16219
  }) {
15997
16220
  const fileContent = await readFileContent(
15998
- join111(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
16221
+ join112(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15999
16222
  );
16000
16223
  return new _ClineRule({
16001
16224
  baseDir,
@@ -16021,7 +16244,7 @@ var ClineRule = class _ClineRule extends ToolRule {
16021
16244
  };
16022
16245
 
16023
16246
  // src/features/rules/codexcli-rule.ts
16024
- import { join as join112 } from "path";
16247
+ import { join as join113 } from "path";
16025
16248
  var CodexcliRule = class _CodexcliRule extends ToolRule {
16026
16249
  static getSettablePaths({
16027
16250
  global,
@@ -16056,7 +16279,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
16056
16279
  if (isRoot) {
16057
16280
  const relativePath2 = paths.root.relativeFilePath;
16058
16281
  const fileContent2 = await readFileContent(
16059
- join112(baseDir, paths.root.relativeDirPath, relativePath2)
16282
+ join113(baseDir, paths.root.relativeDirPath, relativePath2)
16060
16283
  );
16061
16284
  return new _CodexcliRule({
16062
16285
  baseDir,
@@ -16070,8 +16293,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
16070
16293
  if (!paths.nonRoot) {
16071
16294
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
16072
16295
  }
16073
- const relativePath = join112(paths.nonRoot.relativeDirPath, relativeFilePath);
16074
- const fileContent = await readFileContent(join112(baseDir, relativePath));
16296
+ const relativePath = join113(paths.nonRoot.relativeDirPath, relativeFilePath);
16297
+ const fileContent = await readFileContent(join113(baseDir, relativePath));
16075
16298
  return new _CodexcliRule({
16076
16299
  baseDir,
16077
16300
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -16130,12 +16353,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
16130
16353
  };
16131
16354
 
16132
16355
  // src/features/rules/copilot-rule.ts
16133
- import { join as join113 } from "path";
16134
- import { z as z62 } from "zod/mini";
16135
- var CopilotRuleFrontmatterSchema = z62.object({
16136
- description: z62.optional(z62.string()),
16137
- applyTo: z62.optional(z62.string()),
16138
- excludeAgent: z62.optional(z62.union([z62.literal("code-review"), z62.literal("coding-agent")]))
16356
+ import { join as join114 } from "path";
16357
+ import { z as z63 } from "zod/mini";
16358
+ var CopilotRuleFrontmatterSchema = z63.object({
16359
+ description: z63.optional(z63.string()),
16360
+ applyTo: z63.optional(z63.string()),
16361
+ excludeAgent: z63.optional(z63.union([z63.literal("code-review"), z63.literal("coding-agent")]))
16139
16362
  });
16140
16363
  var CopilotRule = class _CopilotRule extends ToolRule {
16141
16364
  frontmatter;
@@ -16167,7 +16390,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
16167
16390
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
16168
16391
  if (!result.success) {
16169
16392
  throw new Error(
16170
- `Invalid frontmatter in ${join113(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16393
+ `Invalid frontmatter in ${join114(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16171
16394
  );
16172
16395
  }
16173
16396
  }
@@ -16257,8 +16480,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
16257
16480
  const paths = this.getSettablePaths({ global });
16258
16481
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
16259
16482
  if (isRoot) {
16260
- const relativePath2 = join113(paths.root.relativeDirPath, paths.root.relativeFilePath);
16261
- const filePath2 = join113(baseDir, relativePath2);
16483
+ const relativePath2 = join114(paths.root.relativeDirPath, paths.root.relativeFilePath);
16484
+ const filePath2 = join114(baseDir, relativePath2);
16262
16485
  const fileContent2 = await readFileContent(filePath2);
16263
16486
  return new _CopilotRule({
16264
16487
  baseDir,
@@ -16273,8 +16496,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
16273
16496
  if (!paths.nonRoot) {
16274
16497
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
16275
16498
  }
16276
- const relativePath = join113(paths.nonRoot.relativeDirPath, relativeFilePath);
16277
- const filePath = join113(baseDir, relativePath);
16499
+ const relativePath = join114(paths.nonRoot.relativeDirPath, relativeFilePath);
16500
+ const filePath = join114(baseDir, relativePath);
16278
16501
  const fileContent = await readFileContent(filePath);
16279
16502
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
16280
16503
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
@@ -16320,7 +16543,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
16320
16543
  return {
16321
16544
  success: false,
16322
16545
  error: new Error(
16323
- `Invalid frontmatter in ${join113(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16546
+ `Invalid frontmatter in ${join114(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16324
16547
  )
16325
16548
  };
16326
16549
  }
@@ -16376,12 +16599,12 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
16376
16599
  };
16377
16600
 
16378
16601
  // src/features/rules/cursor-rule.ts
16379
- import { join as join114 } from "path";
16380
- import { z as z63 } from "zod/mini";
16381
- var CursorRuleFrontmatterSchema = z63.object({
16382
- description: z63.optional(z63.string()),
16383
- globs: z63.optional(z63.string()),
16384
- alwaysApply: z63.optional(z63.boolean())
16602
+ import { join as join115 } from "path";
16603
+ import { z as z64 } from "zod/mini";
16604
+ var CursorRuleFrontmatterSchema = z64.object({
16605
+ description: z64.optional(z64.string()),
16606
+ globs: z64.optional(z64.string()),
16607
+ alwaysApply: z64.optional(z64.boolean())
16385
16608
  });
16386
16609
  var CursorRule = class _CursorRule extends ToolRule {
16387
16610
  frontmatter;
@@ -16398,7 +16621,7 @@ var CursorRule = class _CursorRule extends ToolRule {
16398
16621
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
16399
16622
  if (!result.success) {
16400
16623
  throw new Error(
16401
- `Invalid frontmatter in ${join114(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16624
+ `Invalid frontmatter in ${join115(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16402
16625
  );
16403
16626
  }
16404
16627
  }
@@ -16514,7 +16737,7 @@ var CursorRule = class _CursorRule extends ToolRule {
16514
16737
  relativeFilePath,
16515
16738
  validate = true
16516
16739
  }) {
16517
- const filePath = join114(
16740
+ const filePath = join115(
16518
16741
  baseDir,
16519
16742
  this.getSettablePaths().nonRoot.relativeDirPath,
16520
16743
  relativeFilePath
@@ -16524,7 +16747,7 @@ var CursorRule = class _CursorRule extends ToolRule {
16524
16747
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
16525
16748
  if (!result.success) {
16526
16749
  throw new Error(
16527
- `Invalid frontmatter in ${join114(baseDir, relativeFilePath)}: ${formatError(result.error)}`
16750
+ `Invalid frontmatter in ${join115(baseDir, relativeFilePath)}: ${formatError(result.error)}`
16528
16751
  );
16529
16752
  }
16530
16753
  return new _CursorRule({
@@ -16561,7 +16784,7 @@ var CursorRule = class _CursorRule extends ToolRule {
16561
16784
  return {
16562
16785
  success: false,
16563
16786
  error: new Error(
16564
- `Invalid frontmatter in ${join114(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16787
+ `Invalid frontmatter in ${join115(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16565
16788
  )
16566
16789
  };
16567
16790
  }
@@ -16581,7 +16804,7 @@ var CursorRule = class _CursorRule extends ToolRule {
16581
16804
  };
16582
16805
 
16583
16806
  // src/features/rules/deepagents-rule.ts
16584
- import { join as join115 } from "path";
16807
+ import { join as join116 } from "path";
16585
16808
  var DeepagentsRule = class _DeepagentsRule extends ToolRule {
16586
16809
  constructor({ fileContent, root, ...rest }) {
16587
16810
  super({
@@ -16608,8 +16831,8 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
16608
16831
  }) {
16609
16832
  const settablePaths = this.getSettablePaths();
16610
16833
  const isRoot = relativeFilePath === "AGENTS.md";
16611
- const relativePath = isRoot ? join115(".deepagents", "AGENTS.md") : join115(".deepagents", "memories", relativeFilePath);
16612
- const fileContent = await readFileContent(join115(baseDir, relativePath));
16834
+ const relativePath = isRoot ? join116(".deepagents", "AGENTS.md") : join116(".deepagents", "memories", relativeFilePath);
16835
+ const fileContent = await readFileContent(join116(baseDir, relativePath));
16613
16836
  return new _DeepagentsRule({
16614
16837
  baseDir,
16615
16838
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -16664,7 +16887,7 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
16664
16887
  };
16665
16888
 
16666
16889
  // src/features/rules/factorydroid-rule.ts
16667
- import { join as join116 } from "path";
16890
+ import { join as join117 } from "path";
16668
16891
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
16669
16892
  constructor({ fileContent, root, ...rest }) {
16670
16893
  super({
@@ -16704,8 +16927,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
16704
16927
  const paths = this.getSettablePaths({ global });
16705
16928
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
16706
16929
  if (isRoot) {
16707
- const relativePath2 = join116(paths.root.relativeDirPath, paths.root.relativeFilePath);
16708
- const fileContent2 = await readFileContent(join116(baseDir, relativePath2));
16930
+ const relativePath2 = join117(paths.root.relativeDirPath, paths.root.relativeFilePath);
16931
+ const fileContent2 = await readFileContent(join117(baseDir, relativePath2));
16709
16932
  return new _FactorydroidRule({
16710
16933
  baseDir,
16711
16934
  relativeDirPath: paths.root.relativeDirPath,
@@ -16718,8 +16941,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
16718
16941
  if (!paths.nonRoot) {
16719
16942
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
16720
16943
  }
16721
- const relativePath = join116(paths.nonRoot.relativeDirPath, relativeFilePath);
16722
- const fileContent = await readFileContent(join116(baseDir, relativePath));
16944
+ const relativePath = join117(paths.nonRoot.relativeDirPath, relativeFilePath);
16945
+ const fileContent = await readFileContent(join117(baseDir, relativePath));
16723
16946
  return new _FactorydroidRule({
16724
16947
  baseDir,
16725
16948
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -16778,7 +17001,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
16778
17001
  };
16779
17002
 
16780
17003
  // src/features/rules/geminicli-rule.ts
16781
- import { join as join117 } from "path";
17004
+ import { join as join118 } from "path";
16782
17005
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
16783
17006
  static getSettablePaths({
16784
17007
  global,
@@ -16813,7 +17036,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
16813
17036
  if (isRoot) {
16814
17037
  const relativePath2 = paths.root.relativeFilePath;
16815
17038
  const fileContent2 = await readFileContent(
16816
- join117(baseDir, paths.root.relativeDirPath, relativePath2)
17039
+ join118(baseDir, paths.root.relativeDirPath, relativePath2)
16817
17040
  );
16818
17041
  return new _GeminiCliRule({
16819
17042
  baseDir,
@@ -16827,8 +17050,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
16827
17050
  if (!paths.nonRoot) {
16828
17051
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
16829
17052
  }
16830
- const relativePath = join117(paths.nonRoot.relativeDirPath, relativeFilePath);
16831
- const fileContent = await readFileContent(join117(baseDir, relativePath));
17053
+ const relativePath = join118(paths.nonRoot.relativeDirPath, relativeFilePath);
17054
+ const fileContent = await readFileContent(join118(baseDir, relativePath));
16832
17055
  return new _GeminiCliRule({
16833
17056
  baseDir,
16834
17057
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -16887,7 +17110,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
16887
17110
  };
16888
17111
 
16889
17112
  // src/features/rules/goose-rule.ts
16890
- import { join as join118 } from "path";
17113
+ import { join as join119 } from "path";
16891
17114
  var GooseRule = class _GooseRule extends ToolRule {
16892
17115
  static getSettablePaths({
16893
17116
  global,
@@ -16922,7 +17145,7 @@ var GooseRule = class _GooseRule extends ToolRule {
16922
17145
  if (isRoot) {
16923
17146
  const relativePath2 = paths.root.relativeFilePath;
16924
17147
  const fileContent2 = await readFileContent(
16925
- join118(baseDir, paths.root.relativeDirPath, relativePath2)
17148
+ join119(baseDir, paths.root.relativeDirPath, relativePath2)
16926
17149
  );
16927
17150
  return new _GooseRule({
16928
17151
  baseDir,
@@ -16936,8 +17159,8 @@ var GooseRule = class _GooseRule extends ToolRule {
16936
17159
  if (!paths.nonRoot) {
16937
17160
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
16938
17161
  }
16939
- const relativePath = join118(paths.nonRoot.relativeDirPath, relativeFilePath);
16940
- const fileContent = await readFileContent(join118(baseDir, relativePath));
17162
+ const relativePath = join119(paths.nonRoot.relativeDirPath, relativeFilePath);
17163
+ const fileContent = await readFileContent(join119(baseDir, relativePath));
16941
17164
  return new _GooseRule({
16942
17165
  baseDir,
16943
17166
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -16996,7 +17219,7 @@ var GooseRule = class _GooseRule extends ToolRule {
16996
17219
  };
16997
17220
 
16998
17221
  // src/features/rules/junie-rule.ts
16999
- import { join as join119 } from "path";
17222
+ import { join as join120 } from "path";
17000
17223
  var JunieRule = class _JunieRule extends ToolRule {
17001
17224
  static getSettablePaths(_options = {}) {
17002
17225
  return {
@@ -17009,18 +17232,28 @@ var JunieRule = class _JunieRule extends ToolRule {
17009
17232
  }
17010
17233
  };
17011
17234
  }
17235
+ /**
17236
+ * Determines whether a given relative file path refers to the root
17237
+ * `guidelines.md` file. Memory files live under `.junie/memories/` and are
17238
+ * passed in as bare filenames (e.g. `memo.md`), so a top-level
17239
+ * `guidelines.md` is unambiguously the root entry.
17240
+ */
17241
+ static isRootRelativeFilePath(relativeFilePath) {
17242
+ return relativeFilePath === "guidelines.md";
17243
+ }
17012
17244
  static async fromFile({
17013
17245
  baseDir = process.cwd(),
17014
17246
  relativeFilePath,
17015
17247
  validate = true
17016
17248
  }) {
17017
- const isRoot = relativeFilePath === "guidelines.md";
17018
- const relativePath = isRoot ? "guidelines.md" : join119(".junie", "memories", relativeFilePath);
17019
- const fileContent = await readFileContent(join119(baseDir, relativePath));
17249
+ const isRoot = _JunieRule.isRootRelativeFilePath(relativeFilePath);
17250
+ const settablePaths = this.getSettablePaths();
17251
+ const relativePath = isRoot ? join120(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : join120(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
17252
+ const fileContent = await readFileContent(join120(baseDir, relativePath));
17020
17253
  return new _JunieRule({
17021
17254
  baseDir,
17022
- relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
17023
- relativeFilePath: isRoot ? "guidelines.md" : relativeFilePath,
17255
+ relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
17256
+ relativeFilePath: isRoot ? settablePaths.root.relativeFilePath : relativeFilePath,
17024
17257
  fileContent,
17025
17258
  validate,
17026
17259
  root: isRoot
@@ -17052,7 +17285,7 @@ var JunieRule = class _JunieRule extends ToolRule {
17052
17285
  relativeDirPath,
17053
17286
  relativeFilePath
17054
17287
  }) {
17055
- const isRoot = relativeFilePath === "guidelines.md";
17288
+ const isRoot = _JunieRule.isRootRelativeFilePath(relativeFilePath);
17056
17289
  return new _JunieRule({
17057
17290
  baseDir,
17058
17291
  relativeDirPath,
@@ -17071,7 +17304,7 @@ var JunieRule = class _JunieRule extends ToolRule {
17071
17304
  };
17072
17305
 
17073
17306
  // src/features/rules/kilo-rule.ts
17074
- import { join as join120 } from "path";
17307
+ import { join as join121 } from "path";
17075
17308
  var KiloRule = class _KiloRule extends ToolRule {
17076
17309
  static getSettablePaths({
17077
17310
  global,
@@ -17106,7 +17339,7 @@ var KiloRule = class _KiloRule extends ToolRule {
17106
17339
  if (isRoot) {
17107
17340
  const relativePath2 = paths.root.relativeFilePath;
17108
17341
  const fileContent2 = await readFileContent(
17109
- join120(baseDir, paths.root.relativeDirPath, relativePath2)
17342
+ join121(baseDir, paths.root.relativeDirPath, relativePath2)
17110
17343
  );
17111
17344
  return new _KiloRule({
17112
17345
  baseDir,
@@ -17120,8 +17353,8 @@ var KiloRule = class _KiloRule extends ToolRule {
17120
17353
  if (!paths.nonRoot) {
17121
17354
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17122
17355
  }
17123
- const relativePath = join120(paths.nonRoot.relativeDirPath, relativeFilePath);
17124
- const fileContent = await readFileContent(join120(baseDir, relativePath));
17356
+ const relativePath = join121(paths.nonRoot.relativeDirPath, relativeFilePath);
17357
+ const fileContent = await readFileContent(join121(baseDir, relativePath));
17125
17358
  return new _KiloRule({
17126
17359
  baseDir,
17127
17360
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17180,7 +17413,7 @@ var KiloRule = class _KiloRule extends ToolRule {
17180
17413
  };
17181
17414
 
17182
17415
  // src/features/rules/kiro-rule.ts
17183
- import { join as join121 } from "path";
17416
+ import { join as join122 } from "path";
17184
17417
  var KiroRule = class _KiroRule extends ToolRule {
17185
17418
  static getSettablePaths(_options = {}) {
17186
17419
  return {
@@ -17195,7 +17428,7 @@ var KiroRule = class _KiroRule extends ToolRule {
17195
17428
  validate = true
17196
17429
  }) {
17197
17430
  const fileContent = await readFileContent(
17198
- join121(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17431
+ join122(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17199
17432
  );
17200
17433
  return new _KiroRule({
17201
17434
  baseDir,
@@ -17249,7 +17482,7 @@ var KiroRule = class _KiroRule extends ToolRule {
17249
17482
  };
17250
17483
 
17251
17484
  // src/features/rules/opencode-rule.ts
17252
- import { join as join122 } from "path";
17485
+ import { join as join123 } from "path";
17253
17486
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
17254
17487
  static getSettablePaths({
17255
17488
  global,
@@ -17284,7 +17517,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
17284
17517
  if (isRoot) {
17285
17518
  const relativePath2 = paths.root.relativeFilePath;
17286
17519
  const fileContent2 = await readFileContent(
17287
- join122(baseDir, paths.root.relativeDirPath, relativePath2)
17520
+ join123(baseDir, paths.root.relativeDirPath, relativePath2)
17288
17521
  );
17289
17522
  return new _OpenCodeRule({
17290
17523
  baseDir,
@@ -17298,8 +17531,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
17298
17531
  if (!paths.nonRoot) {
17299
17532
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17300
17533
  }
17301
- const relativePath = join122(paths.nonRoot.relativeDirPath, relativeFilePath);
17302
- const fileContent = await readFileContent(join122(baseDir, relativePath));
17534
+ const relativePath = join123(paths.nonRoot.relativeDirPath, relativeFilePath);
17535
+ const fileContent = await readFileContent(join123(baseDir, relativePath));
17303
17536
  return new _OpenCodeRule({
17304
17537
  baseDir,
17305
17538
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17358,7 +17591,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
17358
17591
  };
17359
17592
 
17360
17593
  // src/features/rules/qwencode-rule.ts
17361
- import { join as join123 } from "path";
17594
+ import { join as join124 } from "path";
17362
17595
  var QwencodeRule = class _QwencodeRule extends ToolRule {
17363
17596
  static getSettablePaths(_options = {}) {
17364
17597
  return {
@@ -17377,8 +17610,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
17377
17610
  validate = true
17378
17611
  }) {
17379
17612
  const isRoot = relativeFilePath === "QWEN.md";
17380
- const relativePath = isRoot ? "QWEN.md" : join123(".qwen", "memories", relativeFilePath);
17381
- const fileContent = await readFileContent(join123(baseDir, relativePath));
17613
+ const relativePath = isRoot ? "QWEN.md" : join124(".qwen", "memories", relativeFilePath);
17614
+ const fileContent = await readFileContent(join124(baseDir, relativePath));
17382
17615
  return new _QwencodeRule({
17383
17616
  baseDir,
17384
17617
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -17430,7 +17663,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
17430
17663
  };
17431
17664
 
17432
17665
  // src/features/rules/replit-rule.ts
17433
- import { join as join124 } from "path";
17666
+ import { join as join125 } from "path";
17434
17667
  var ReplitRule = class _ReplitRule extends ToolRule {
17435
17668
  static getSettablePaths(_options = {}) {
17436
17669
  return {
@@ -17452,7 +17685,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
17452
17685
  }
17453
17686
  const relativePath = paths.root.relativeFilePath;
17454
17687
  const fileContent = await readFileContent(
17455
- join124(baseDir, paths.root.relativeDirPath, relativePath)
17688
+ join125(baseDir, paths.root.relativeDirPath, relativePath)
17456
17689
  );
17457
17690
  return new _ReplitRule({
17458
17691
  baseDir,
@@ -17518,7 +17751,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
17518
17751
  };
17519
17752
 
17520
17753
  // src/features/rules/roo-rule.ts
17521
- import { join as join125 } from "path";
17754
+ import { join as join126 } from "path";
17522
17755
  var RooRule = class _RooRule extends ToolRule {
17523
17756
  static getSettablePaths(_options = {}) {
17524
17757
  return {
@@ -17533,7 +17766,7 @@ var RooRule = class _RooRule extends ToolRule {
17533
17766
  validate = true
17534
17767
  }) {
17535
17768
  const fileContent = await readFileContent(
17536
- join125(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17769
+ join126(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17537
17770
  );
17538
17771
  return new _RooRule({
17539
17772
  baseDir,
@@ -17602,7 +17835,7 @@ var RooRule = class _RooRule extends ToolRule {
17602
17835
  };
17603
17836
 
17604
17837
  // src/features/rules/rovodev-rule.ts
17605
- import { join as join126 } from "path";
17838
+ import { join as join127 } from "path";
17606
17839
  var DISALLOWED_ROVODEV_MODULAR_RULE_BASENAMES = /* @__PURE__ */ new Set(["agents.md", "agents.local.md"]);
17607
17840
  var RovodevRule = class _RovodevRule extends ToolRule {
17608
17841
  /**
@@ -17646,7 +17879,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
17646
17879
  root: rovodevAgents,
17647
17880
  alternativeRoots: [{ relativeDirPath: ".", relativeFilePath: "AGENTS.md" }],
17648
17881
  nonRoot: {
17649
- relativeDirPath: join126(".rovodev", ".rulesync", "modular-rules")
17882
+ relativeDirPath: join127(".rovodev", ".rulesync", "modular-rules")
17650
17883
  }
17651
17884
  };
17652
17885
  }
@@ -17685,10 +17918,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
17685
17918
  }) {
17686
17919
  if (!this.isAllowedModularRulesRelativePath(relativeFilePath)) {
17687
17920
  throw new Error(
17688
- `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${join126(relativeDirPath, relativeFilePath)}`
17921
+ `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${join127(relativeDirPath, relativeFilePath)}`
17689
17922
  );
17690
17923
  }
17691
- const fileContent = await readFileContent(join126(baseDir, relativeDirPath, relativeFilePath));
17924
+ const fileContent = await readFileContent(join127(baseDir, relativeDirPath, relativeFilePath));
17692
17925
  return new _RovodevRule({
17693
17926
  baseDir,
17694
17927
  relativeDirPath,
@@ -17708,10 +17941,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
17708
17941
  paths
17709
17942
  }) {
17710
17943
  const relativeDirPath = overrideDirPath ?? paths.root.relativeDirPath;
17711
- const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${join126(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : join126(paths.root.relativeDirPath, paths.root.relativeFilePath);
17944
+ const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${join127(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : join127(paths.root.relativeDirPath, paths.root.relativeFilePath);
17712
17945
  if (relativeFilePath !== "AGENTS.md") {
17713
17946
  throw new Error(
17714
- `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${join126(relativeDirPath, relativeFilePath)}`
17947
+ `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${join127(relativeDirPath, relativeFilePath)}`
17715
17948
  );
17716
17949
  }
17717
17950
  const allowed = relativeDirPath === paths.root.relativeDirPath || "alternativeRoots" in paths && paths.alternativeRoots?.some(
@@ -17719,10 +17952,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
17719
17952
  );
17720
17953
  if (!allowed) {
17721
17954
  throw new Error(
17722
- `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${join126(relativeDirPath, relativeFilePath)}`
17955
+ `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${join127(relativeDirPath, relativeFilePath)}`
17723
17956
  );
17724
17957
  }
17725
- const fileContent = await readFileContent(join126(baseDir, relativeDirPath, relativeFilePath));
17958
+ const fileContent = await readFileContent(join127(baseDir, relativeDirPath, relativeFilePath));
17726
17959
  return new _RovodevRule({
17727
17960
  baseDir,
17728
17961
  relativeDirPath,
@@ -17836,7 +18069,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
17836
18069
  };
17837
18070
 
17838
18071
  // src/features/rules/warp-rule.ts
17839
- import { join as join127 } from "path";
18072
+ import { join as join128 } from "path";
17840
18073
  var WarpRule = class _WarpRule extends ToolRule {
17841
18074
  constructor({ fileContent, root, ...rest }) {
17842
18075
  super({
@@ -17862,8 +18095,8 @@ var WarpRule = class _WarpRule extends ToolRule {
17862
18095
  validate = true
17863
18096
  }) {
17864
18097
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
17865
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join127(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
17866
- const fileContent = await readFileContent(join127(baseDir, relativePath));
18098
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join128(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
18099
+ const fileContent = await readFileContent(join128(baseDir, relativePath));
17867
18100
  return new _WarpRule({
17868
18101
  baseDir,
17869
18102
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -17918,7 +18151,7 @@ var WarpRule = class _WarpRule extends ToolRule {
17918
18151
  };
17919
18152
 
17920
18153
  // src/features/rules/windsurf-rule.ts
17921
- import { join as join128 } from "path";
18154
+ import { join as join129 } from "path";
17922
18155
  var WindsurfRule = class _WindsurfRule extends ToolRule {
17923
18156
  static getSettablePaths(_options = {}) {
17924
18157
  return {
@@ -17933,7 +18166,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
17933
18166
  validate = true
17934
18167
  }) {
17935
18168
  const fileContent = await readFileContent(
17936
- join128(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18169
+ join129(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17937
18170
  );
17938
18171
  return new _WindsurfRule({
17939
18172
  baseDir,
@@ -18012,8 +18245,8 @@ var rulesProcessorToolTargets = [
18012
18245
  "warp",
18013
18246
  "windsurf"
18014
18247
  ];
18015
- var RulesProcessorToolTargetSchema = z64.enum(rulesProcessorToolTargets);
18016
- var formatRulePaths = (rules) => rules.map((r) => join129(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
18248
+ var RulesProcessorToolTargetSchema = z65.enum(rulesProcessorToolTargets);
18249
+ var formatRulePaths = (rules) => rules.map((r) => join130(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
18017
18250
  var toolRuleFactories = /* @__PURE__ */ new Map([
18018
18251
  [
18019
18252
  "agentsmd",
@@ -18441,7 +18674,7 @@ var RulesProcessor = class extends FeatureProcessor {
18441
18674
  }).relativeDirPath;
18442
18675
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
18443
18676
  const frontmatter = skill.getFrontmatter();
18444
- const relativePath = join129(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
18677
+ const relativePath = join130(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
18445
18678
  return {
18446
18679
  name: frontmatter.name,
18447
18680
  description: frontmatter.description,
@@ -18566,8 +18799,8 @@ var RulesProcessor = class extends FeatureProcessor {
18566
18799
  * Load and parse rulesync rule files from .rulesync/rules/ directory
18567
18800
  */
18568
18801
  async loadRulesyncFiles() {
18569
- const rulesyncBaseDir = join129(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
18570
- const files = await findFilesByGlobs(join129(rulesyncBaseDir, "**", "*.md"));
18802
+ const rulesyncBaseDir = join130(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
18803
+ const files = await findFilesByGlobs(join130(rulesyncBaseDir, "**", "*.md"));
18571
18804
  this.logger.debug(`Found ${files.length} rulesync files`);
18572
18805
  const rulesyncRules = await Promise.all(
18573
18806
  files.map((file) => {
@@ -18682,13 +18915,13 @@ var RulesProcessor = class extends FeatureProcessor {
18682
18915
  return [];
18683
18916
  }
18684
18917
  const uniqueRootFilePaths = await findFilesWithFallback(
18685
- join129(
18918
+ join130(
18686
18919
  this.baseDir,
18687
18920
  settablePaths.root.relativeDirPath ?? ".",
18688
18921
  settablePaths.root.relativeFilePath
18689
18922
  ),
18690
18923
  settablePaths.alternativeRoots,
18691
- (alt) => join129(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
18924
+ (alt) => join130(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
18692
18925
  );
18693
18926
  if (forDeletion) {
18694
18927
  return buildDeletionRulesFromPaths(uniqueRootFilePaths);
@@ -18719,7 +18952,7 @@ var RulesProcessor = class extends FeatureProcessor {
18719
18952
  return [];
18720
18953
  }
18721
18954
  const uniqueLocalRootFilePaths2 = await findFilesByGlobs(
18722
- join129(this.baseDir, "AGENTS.local.md")
18955
+ join130(this.baseDir, "AGENTS.local.md")
18723
18956
  );
18724
18957
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths2);
18725
18958
  }
@@ -18730,9 +18963,9 @@ var RulesProcessor = class extends FeatureProcessor {
18730
18963
  return [];
18731
18964
  }
18732
18965
  const uniqueLocalRootFilePaths = await findFilesWithFallback(
18733
- join129(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
18966
+ join130(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
18734
18967
  settablePaths.alternativeRoots,
18735
- (alt) => join129(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
18968
+ (alt) => join130(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
18736
18969
  );
18737
18970
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths);
18738
18971
  })();
@@ -18743,20 +18976,20 @@ var RulesProcessor = class extends FeatureProcessor {
18743
18976
  if (!forDeletion || this.toolTarget !== "rovodev" || this.global) {
18744
18977
  return [];
18745
18978
  }
18746
- const primaryPaths = await findFilesByGlobs(join129(this.baseDir, ".rovodev", "AGENTS.md"));
18979
+ const primaryPaths = await findFilesByGlobs(join130(this.baseDir, ".rovodev", "AGENTS.md"));
18747
18980
  if (primaryPaths.length === 0) {
18748
18981
  return [];
18749
18982
  }
18750
- const mirrorPaths = await findFilesByGlobs(join129(this.baseDir, "AGENTS.md"));
18983
+ const mirrorPaths = await findFilesByGlobs(join130(this.baseDir, "AGENTS.md"));
18751
18984
  return buildDeletionRulesFromPaths(mirrorPaths);
18752
18985
  })();
18753
18986
  const nonRootToolRules = await (async () => {
18754
18987
  if (!settablePaths.nonRoot) {
18755
18988
  return [];
18756
18989
  }
18757
- const nonRootBaseDir = join129(this.baseDir, settablePaths.nonRoot.relativeDirPath);
18990
+ const nonRootBaseDir = join130(this.baseDir, settablePaths.nonRoot.relativeDirPath);
18758
18991
  const nonRootFilePaths = await findFilesByGlobs(
18759
- join129(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
18992
+ join130(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
18760
18993
  );
18761
18994
  if (forDeletion) {
18762
18995
  return buildDeletionRulesFromPaths(nonRootFilePaths, {
@@ -18770,7 +19003,7 @@ var RulesProcessor = class extends FeatureProcessor {
18770
19003
  const ok = RovodevRule.isAllowedModularRulesRelativePath(relativeFilePath);
18771
19004
  if (!ok) {
18772
19005
  this.logger.warn(
18773
- `Skipping reserved Rovodev path under modular-rules (import): ${join129(modularRootRelative, relativeFilePath)}`
19006
+ `Skipping reserved Rovodev path under modular-rules (import): ${join130(modularRootRelative, relativeFilePath)}`
18774
19007
  );
18775
19008
  }
18776
19009
  return ok;
@@ -18896,14 +19129,14 @@ s/<command> [arguments]
18896
19129
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
18897
19130
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
18898
19131
 
18899
- When users call a custom slash command, you have to look for the markdown file, \`${join129(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
19132
+ When users call a custom slash command, you have to look for the markdown file, \`${join130(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
18900
19133
  const subagentsSection = subagents ? `## Simulated Subagents
18901
19134
 
18902
19135
  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.
18903
19136
 
18904
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${join129(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
19137
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${join130(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
18905
19138
 
18906
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join129(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
19139
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join130(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
18907
19140
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
18908
19141
  const result = [
18909
19142
  overview,
@@ -18974,6 +19207,14 @@ async function processEmptyFeatureGeneration(params) {
18974
19207
  }
18975
19208
  return { count: totalCount, paths: [], hasDiff };
18976
19209
  }
19210
+ async function processFeatureWithRulesyncFiles(params) {
19211
+ const { config, processor, rulesyncFiles } = params;
19212
+ if (rulesyncFiles.length === 0) {
19213
+ return processEmptyFeatureGeneration({ config, processor });
19214
+ }
19215
+ const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19216
+ return processFeatureGeneration({ config, processor, toolFiles });
19217
+ }
18977
19218
  var SIMULATE_OPTION_MAP = {
18978
19219
  commands: "--simulate-commands",
18979
19220
  subagents: "--simulate-subagents",
@@ -18995,7 +19236,7 @@ function warnUnsupportedTargets(params) {
18995
19236
  }
18996
19237
  }
18997
19238
  async function checkRulesyncDirExists(params) {
18998
- return fileExists(join130(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
19239
+ return fileExists(join131(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
18999
19240
  }
19000
19241
  async function generate(params) {
19001
19242
  const { config, logger } = params;
@@ -19051,12 +19292,7 @@ async function generateRulesCore(params) {
19051
19292
  logger
19052
19293
  });
19053
19294
  const rulesyncFiles = await processor.loadRulesyncFiles();
19054
- const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19055
- const result = await processFeatureGeneration({
19056
- config,
19057
- processor,
19058
- toolFiles
19059
- });
19295
+ const result = await processFeatureWithRulesyncFiles({ config, processor, rulesyncFiles });
19060
19296
  totalCount += result.count;
19061
19297
  allPaths.push(...result.paths);
19062
19298
  if (result.hasDiff) hasDiff = true;
@@ -19092,20 +19328,7 @@ async function generateIgnoreCore(params) {
19092
19328
  logger
19093
19329
  });
19094
19330
  const rulesyncFiles = await processor.loadRulesyncFiles();
19095
- let result;
19096
- if (rulesyncFiles.length > 0) {
19097
- const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19098
- result = await processFeatureGeneration({
19099
- config,
19100
- processor,
19101
- toolFiles
19102
- });
19103
- } else {
19104
- result = await processEmptyFeatureGeneration({
19105
- config,
19106
- processor
19107
- });
19108
- }
19331
+ const result = await processFeatureWithRulesyncFiles({ config, processor, rulesyncFiles });
19109
19332
  totalCount += result.count;
19110
19333
  allPaths.push(...result.paths);
19111
19334
  if (result.hasDiff) hasDiff = true;
@@ -19145,12 +19368,7 @@ async function generateMcpCore(params) {
19145
19368
  logger
19146
19369
  });
19147
19370
  const rulesyncFiles = await processor.loadRulesyncFiles();
19148
- const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19149
- const result = await processFeatureGeneration({
19150
- config,
19151
- processor,
19152
- toolFiles
19153
- });
19371
+ const result = await processFeatureWithRulesyncFiles({ config, processor, rulesyncFiles });
19154
19372
  totalCount += result.count;
19155
19373
  allPaths.push(...result.paths);
19156
19374
  if (result.hasDiff) hasDiff = true;
@@ -19188,12 +19406,7 @@ async function generateCommandsCore(params) {
19188
19406
  logger
19189
19407
  });
19190
19408
  const rulesyncFiles = await processor.loadRulesyncFiles();
19191
- const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19192
- const result = await processFeatureGeneration({
19193
- config,
19194
- processor,
19195
- toolFiles
19196
- });
19409
+ const result = await processFeatureWithRulesyncFiles({ config, processor, rulesyncFiles });
19197
19410
  totalCount += result.count;
19198
19411
  allPaths.push(...result.paths);
19199
19412
  if (result.hasDiff) hasDiff = true;
@@ -19231,12 +19444,7 @@ async function generateSubagentsCore(params) {
19231
19444
  logger
19232
19445
  });
19233
19446
  const rulesyncFiles = await processor.loadRulesyncFiles();
19234
- const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19235
- const result = await processFeatureGeneration({
19236
- config,
19237
- processor,
19238
- toolFiles
19239
- });
19447
+ const result = await processFeatureWithRulesyncFiles({ config, processor, rulesyncFiles });
19240
19448
  totalCount += result.count;
19241
19449
  allPaths.push(...result.paths);
19242
19450
  if (result.hasDiff) hasDiff = true;
@@ -19319,20 +19527,7 @@ async function generateHooksCore(params) {
19319
19527
  logger
19320
19528
  });
19321
19529
  const rulesyncFiles = await processor.loadRulesyncFiles();
19322
- let result;
19323
- if (rulesyncFiles.length === 0) {
19324
- result = await processEmptyFeatureGeneration({
19325
- config,
19326
- processor
19327
- });
19328
- } else {
19329
- const toolFiles = await processor.convertRulesyncFilesToToolFiles(rulesyncFiles);
19330
- result = await processFeatureGeneration({
19331
- config,
19332
- processor,
19333
- toolFiles
19334
- });
19335
- }
19530
+ const result = await processFeatureWithRulesyncFiles({ config, processor, rulesyncFiles });
19336
19531
  totalCount += result.count;
19337
19532
  allPaths.push(...result.paths);
19338
19533
  if (result.hasDiff) hasDiff = true;