rulesync 7.16.0 → 7.18.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.
@@ -157,6 +157,8 @@ var RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH = join(
157
157
  var RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH = "rulesync.lock";
158
158
  var RULESYNC_MCP_FILE_NAME = "mcp.json";
159
159
  var RULESYNC_HOOKS_FILE_NAME = "hooks.json";
160
+ var RULESYNC_CONFIG_SCHEMA_URL = "https://github.com/dyoshikawa/rulesync/releases/latest/download/config-schema.json";
161
+ var RULESYNC_MCP_SCHEMA_URL = "https://github.com/dyoshikawa/rulesync/releases/latest/download/mcp-schema.json";
160
162
  var MAX_FILE_SIZE = 10 * 1024 * 1024;
161
163
  var FETCH_CONCURRENCY_LIMIT = 10;
162
164
 
@@ -663,12 +665,12 @@ function getBaseDirsInLightOfGlobal({
663
665
  }
664
666
 
665
667
  // src/lib/generate.ts
666
- import { join as join116 } from "path";
668
+ import { join as join117 } from "path";
667
669
  import { intersection } from "es-toolkit";
668
670
 
669
671
  // src/features/commands/commands-processor.ts
670
- import { basename as basename2, join as join19, relative as relative3 } from "path";
671
- import { z as z13 } from "zod/mini";
672
+ import { basename as basename2, join as join20, relative as relative3 } from "path";
673
+ import { z as z14 } from "zod/mini";
672
674
 
673
675
  // src/types/feature-processor.ts
674
676
  var FeatureProcessor = class {
@@ -2267,12 +2269,152 @@ prompt = ""`;
2267
2269
  }
2268
2270
  };
2269
2271
 
2270
- // src/features/commands/kilo-command.ts
2272
+ // src/features/commands/junie-command.ts
2271
2273
  import { join as join15 } from "path";
2274
+ import { z as z11 } from "zod/mini";
2275
+ var JunieCommandFrontmatterSchema = z11.looseObject({
2276
+ description: z11.optional(z11.string())
2277
+ });
2278
+ var JunieCommand = class _JunieCommand extends ToolCommand {
2279
+ frontmatter;
2280
+ body;
2281
+ constructor({ frontmatter, body, ...rest }) {
2282
+ if (rest.validate) {
2283
+ const result = JunieCommandFrontmatterSchema.safeParse(frontmatter);
2284
+ if (!result.success) {
2285
+ throw new Error(
2286
+ `Invalid frontmatter in ${join15(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
2287
+ );
2288
+ }
2289
+ }
2290
+ super({
2291
+ ...rest,
2292
+ fileContent: stringifyFrontmatter(body, frontmatter)
2293
+ });
2294
+ this.frontmatter = frontmatter;
2295
+ this.body = body;
2296
+ }
2297
+ static getSettablePaths(_options = {}) {
2298
+ return {
2299
+ relativeDirPath: join15(".junie", "commands")
2300
+ };
2301
+ }
2302
+ getBody() {
2303
+ return this.body;
2304
+ }
2305
+ getFrontmatter() {
2306
+ return this.frontmatter;
2307
+ }
2308
+ toRulesyncCommand() {
2309
+ const { description, ...restFields } = this.frontmatter;
2310
+ const rulesyncFrontmatter = {
2311
+ targets: ["*"],
2312
+ description,
2313
+ // Preserve extra fields in junie section
2314
+ ...Object.keys(restFields).length > 0 && { junie: restFields }
2315
+ };
2316
+ const fileContent = stringifyFrontmatter(this.body, rulesyncFrontmatter);
2317
+ return new RulesyncCommand({
2318
+ baseDir: process.cwd(),
2319
+ // RulesyncCommand baseDir is always the project root directory
2320
+ frontmatter: rulesyncFrontmatter,
2321
+ body: this.body,
2322
+ relativeDirPath: RulesyncCommand.getSettablePaths().relativeDirPath,
2323
+ relativeFilePath: this.relativeFilePath,
2324
+ fileContent,
2325
+ validate: true
2326
+ });
2327
+ }
2328
+ static fromRulesyncCommand({
2329
+ baseDir = process.cwd(),
2330
+ rulesyncCommand,
2331
+ validate = true,
2332
+ global = false
2333
+ }) {
2334
+ const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
2335
+ const junieFields = rulesyncFrontmatter.junie ?? {};
2336
+ const junieFrontmatter = {
2337
+ description: rulesyncFrontmatter.description,
2338
+ ...junieFields
2339
+ };
2340
+ const body = rulesyncCommand.getBody();
2341
+ const paths = this.getSettablePaths({ global });
2342
+ return new _JunieCommand({
2343
+ baseDir,
2344
+ frontmatter: junieFrontmatter,
2345
+ body,
2346
+ relativeDirPath: paths.relativeDirPath,
2347
+ relativeFilePath: rulesyncCommand.getRelativeFilePath(),
2348
+ validate
2349
+ });
2350
+ }
2351
+ validate() {
2352
+ if (!this.frontmatter) {
2353
+ return { success: true, error: null };
2354
+ }
2355
+ const result = JunieCommandFrontmatterSchema.safeParse(this.frontmatter);
2356
+ if (result.success) {
2357
+ return { success: true, error: null };
2358
+ } else {
2359
+ return {
2360
+ success: false,
2361
+ error: new Error(
2362
+ `Invalid frontmatter in ${join15(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
2363
+ )
2364
+ };
2365
+ }
2366
+ }
2367
+ static isTargetedByRulesyncCommand(rulesyncCommand) {
2368
+ return this.isTargetedByRulesyncCommandDefault({
2369
+ rulesyncCommand,
2370
+ toolTarget: "junie"
2371
+ });
2372
+ }
2373
+ static async fromFile({
2374
+ baseDir = process.cwd(),
2375
+ relativeFilePath,
2376
+ validate = true,
2377
+ global = false
2378
+ }) {
2379
+ const paths = this.getSettablePaths({ global });
2380
+ const filePath = join15(baseDir, paths.relativeDirPath, relativeFilePath);
2381
+ const fileContent = await readFileContent(filePath);
2382
+ const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
2383
+ const result = JunieCommandFrontmatterSchema.safeParse(frontmatter);
2384
+ if (!result.success) {
2385
+ throw new Error(`Invalid frontmatter in ${filePath}: ${formatError(result.error)}`);
2386
+ }
2387
+ return new _JunieCommand({
2388
+ baseDir,
2389
+ relativeDirPath: paths.relativeDirPath,
2390
+ relativeFilePath,
2391
+ frontmatter: result.data,
2392
+ body: content.trim(),
2393
+ validate
2394
+ });
2395
+ }
2396
+ static forDeletion({
2397
+ baseDir = process.cwd(),
2398
+ relativeDirPath,
2399
+ relativeFilePath
2400
+ }) {
2401
+ return new _JunieCommand({
2402
+ baseDir,
2403
+ relativeDirPath,
2404
+ relativeFilePath,
2405
+ frontmatter: { description: "" },
2406
+ body: "",
2407
+ validate: false
2408
+ });
2409
+ }
2410
+ };
2411
+
2412
+ // src/features/commands/kilo-command.ts
2413
+ import { join as join16 } from "path";
2272
2414
  var KiloCommand = class _KiloCommand extends ToolCommand {
2273
2415
  static getSettablePaths(_options = {}) {
2274
2416
  return {
2275
- relativeDirPath: join15(".kilocode", "workflows")
2417
+ relativeDirPath: join16(".kilocode", "workflows")
2276
2418
  };
2277
2419
  }
2278
2420
  toRulesyncCommand() {
@@ -2321,7 +2463,7 @@ var KiloCommand = class _KiloCommand extends ToolCommand {
2321
2463
  validate = true
2322
2464
  }) {
2323
2465
  const paths = this.getSettablePaths();
2324
- const filePath = join15(baseDir, paths.relativeDirPath, relativeFilePath);
2466
+ const filePath = join16(baseDir, paths.relativeDirPath, relativeFilePath);
2325
2467
  const fileContent = await readFileContent(filePath);
2326
2468
  const { body: content } = parseFrontmatter(fileContent, filePath);
2327
2469
  return new _KiloCommand({
@@ -2348,11 +2490,11 @@ var KiloCommand = class _KiloCommand extends ToolCommand {
2348
2490
  };
2349
2491
 
2350
2492
  // src/features/commands/kiro-command.ts
2351
- import { join as join16 } from "path";
2493
+ import { join as join17 } from "path";
2352
2494
  var KiroCommand = class _KiroCommand extends ToolCommand {
2353
2495
  static getSettablePaths(_options = {}) {
2354
2496
  return {
2355
- relativeDirPath: join16(".kiro", "prompts")
2497
+ relativeDirPath: join17(".kiro", "prompts")
2356
2498
  };
2357
2499
  }
2358
2500
  toRulesyncCommand() {
@@ -2401,7 +2543,7 @@ var KiroCommand = class _KiroCommand extends ToolCommand {
2401
2543
  validate = true
2402
2544
  }) {
2403
2545
  const paths = this.getSettablePaths();
2404
- const filePath = join16(baseDir, paths.relativeDirPath, relativeFilePath);
2546
+ const filePath = join17(baseDir, paths.relativeDirPath, relativeFilePath);
2405
2547
  const fileContent = await readFileContent(filePath);
2406
2548
  const { body: content } = parseFrontmatter(fileContent, filePath);
2407
2549
  return new _KiroCommand({
@@ -2428,13 +2570,13 @@ var KiroCommand = class _KiroCommand extends ToolCommand {
2428
2570
  };
2429
2571
 
2430
2572
  // src/features/commands/opencode-command.ts
2431
- import { join as join17 } from "path";
2432
- import { optional as optional2, z as z11 } from "zod/mini";
2433
- var OpenCodeCommandFrontmatterSchema = z11.looseObject({
2434
- description: z11.optional(z11.string()),
2435
- agent: optional2(z11.string()),
2436
- subtask: optional2(z11.boolean()),
2437
- model: optional2(z11.string())
2573
+ import { join as join18 } from "path";
2574
+ import { optional as optional2, z as z12 } from "zod/mini";
2575
+ var OpenCodeCommandFrontmatterSchema = z12.looseObject({
2576
+ description: z12.optional(z12.string()),
2577
+ agent: optional2(z12.string()),
2578
+ subtask: optional2(z12.boolean()),
2579
+ model: optional2(z12.string())
2438
2580
  });
2439
2581
  var OpenCodeCommand = class _OpenCodeCommand extends ToolCommand {
2440
2582
  frontmatter;
@@ -2444,7 +2586,7 @@ var OpenCodeCommand = class _OpenCodeCommand extends ToolCommand {
2444
2586
  const result = OpenCodeCommandFrontmatterSchema.safeParse(frontmatter);
2445
2587
  if (!result.success) {
2446
2588
  throw new Error(
2447
- `Invalid frontmatter in ${join17(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
2589
+ `Invalid frontmatter in ${join18(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
2448
2590
  );
2449
2591
  }
2450
2592
  }
@@ -2457,7 +2599,7 @@ var OpenCodeCommand = class _OpenCodeCommand extends ToolCommand {
2457
2599
  }
2458
2600
  static getSettablePaths({ global } = {}) {
2459
2601
  return {
2460
- relativeDirPath: global ? join17(".config", "opencode", "command") : join17(".opencode", "command")
2602
+ relativeDirPath: global ? join18(".config", "opencode", "command") : join18(".opencode", "command")
2461
2603
  };
2462
2604
  }
2463
2605
  getBody() {
@@ -2518,7 +2660,7 @@ var OpenCodeCommand = class _OpenCodeCommand extends ToolCommand {
2518
2660
  return {
2519
2661
  success: false,
2520
2662
  error: new Error(
2521
- `Invalid frontmatter in ${join17(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
2663
+ `Invalid frontmatter in ${join18(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
2522
2664
  )
2523
2665
  };
2524
2666
  }
@@ -2529,7 +2671,7 @@ var OpenCodeCommand = class _OpenCodeCommand extends ToolCommand {
2529
2671
  global = false
2530
2672
  }) {
2531
2673
  const paths = this.getSettablePaths({ global });
2532
- const filePath = join17(baseDir, paths.relativeDirPath, relativeFilePath);
2674
+ const filePath = join18(baseDir, paths.relativeDirPath, relativeFilePath);
2533
2675
  const fileContent = await readFileContent(filePath);
2534
2676
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
2535
2677
  const result = OpenCodeCommandFrontmatterSchema.safeParse(frontmatter);
@@ -2568,18 +2710,18 @@ var OpenCodeCommand = class _OpenCodeCommand extends ToolCommand {
2568
2710
  };
2569
2711
 
2570
2712
  // src/features/commands/roo-command.ts
2571
- import { join as join18 } from "path";
2572
- import { optional as optional3, z as z12 } from "zod/mini";
2573
- var RooCommandFrontmatterSchema = z12.looseObject({
2574
- description: z12.optional(z12.string()),
2575
- "argument-hint": optional3(z12.string())
2713
+ import { join as join19 } from "path";
2714
+ import { optional as optional3, z as z13 } from "zod/mini";
2715
+ var RooCommandFrontmatterSchema = z13.looseObject({
2716
+ description: z13.optional(z13.string()),
2717
+ "argument-hint": optional3(z13.string())
2576
2718
  });
2577
2719
  var RooCommand = class _RooCommand extends ToolCommand {
2578
2720
  frontmatter;
2579
2721
  body;
2580
2722
  static getSettablePaths() {
2581
2723
  return {
2582
- relativeDirPath: join18(".roo", "commands")
2724
+ relativeDirPath: join19(".roo", "commands")
2583
2725
  };
2584
2726
  }
2585
2727
  constructor({ frontmatter, body, ...rest }) {
@@ -2587,7 +2729,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
2587
2729
  const result = RooCommandFrontmatterSchema.safeParse(frontmatter);
2588
2730
  if (!result.success) {
2589
2731
  throw new Error(
2590
- `Invalid frontmatter in ${join18(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
2732
+ `Invalid frontmatter in ${join19(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
2591
2733
  );
2592
2734
  }
2593
2735
  }
@@ -2658,7 +2800,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
2658
2800
  return {
2659
2801
  success: false,
2660
2802
  error: new Error(
2661
- `Invalid frontmatter in ${join18(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
2803
+ `Invalid frontmatter in ${join19(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
2662
2804
  )
2663
2805
  };
2664
2806
  }
@@ -2674,7 +2816,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
2674
2816
  relativeFilePath,
2675
2817
  validate = true
2676
2818
  }) {
2677
- const filePath = join18(baseDir, _RooCommand.getSettablePaths().relativeDirPath, relativeFilePath);
2819
+ const filePath = join19(baseDir, _RooCommand.getSettablePaths().relativeDirPath, relativeFilePath);
2678
2820
  const fileContent = await readFileContent(filePath);
2679
2821
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
2680
2822
  const result = RooCommandFrontmatterSchema.safeParse(frontmatter);
@@ -2720,12 +2862,13 @@ var commandsProcessorToolTargetTuple = [
2720
2862
  "cursor",
2721
2863
  "factorydroid",
2722
2864
  "geminicli",
2865
+ "junie",
2723
2866
  "kilo",
2724
2867
  "kiro",
2725
2868
  "opencode",
2726
2869
  "roo"
2727
2870
  ];
2728
- var CommandsProcessorToolTargetSchema = z13.enum(commandsProcessorToolTargetTuple);
2871
+ var CommandsProcessorToolTargetSchema = z14.enum(commandsProcessorToolTargetTuple);
2729
2872
  var toolCommandFactories = /* @__PURE__ */ new Map([
2730
2873
  [
2731
2874
  "agentsmd",
@@ -2857,6 +3000,19 @@ var toolCommandFactories = /* @__PURE__ */ new Map([
2857
3000
  }
2858
3001
  }
2859
3002
  ],
3003
+ [
3004
+ "junie",
3005
+ {
3006
+ class: JunieCommand,
3007
+ meta: {
3008
+ extension: "md",
3009
+ supportsProject: true,
3010
+ supportsGlobal: true,
3011
+ isSimulated: false,
3012
+ supportsSubdirectory: false
3013
+ }
3014
+ }
3015
+ ],
2860
3016
  [
2861
3017
  "kilo",
2862
3018
  {
@@ -3010,7 +3166,7 @@ var CommandsProcessor = class extends FeatureProcessor {
3010
3166
  */
3011
3167
  async loadRulesyncFiles() {
3012
3168
  const basePath = RulesyncCommand.getSettablePaths().relativeDirPath;
3013
- const rulesyncCommandPaths = await findFilesByGlobs(join19(basePath, "**", "*.md"));
3169
+ const rulesyncCommandPaths = await findFilesByGlobs(join20(basePath, "**", "*.md"));
3014
3170
  const rulesyncCommands = await Promise.all(
3015
3171
  rulesyncCommandPaths.map(
3016
3172
  (path3) => RulesyncCommand.fromFile({ relativeFilePath: this.safeRelativePath(basePath, path3) })
@@ -3028,8 +3184,8 @@ var CommandsProcessor = class extends FeatureProcessor {
3028
3184
  } = {}) {
3029
3185
  const factory = this.getFactory(this.toolTarget);
3030
3186
  const paths = factory.class.getSettablePaths({ global: this.global });
3031
- const baseDirFull = join19(this.baseDir, paths.relativeDirPath);
3032
- const globPattern = factory.meta.supportsSubdirectory ? join19(baseDirFull, "**", `*.${factory.meta.extension}`) : join19(baseDirFull, `*.${factory.meta.extension}`);
3187
+ const baseDirFull = join20(this.baseDir, paths.relativeDirPath);
3188
+ const globPattern = factory.meta.supportsSubdirectory ? join20(baseDirFull, "**", `*.${factory.meta.extension}`) : join20(baseDirFull, `*.${factory.meta.extension}`);
3033
3189
  const commandFilePaths = await findFilesByGlobs(globPattern);
3034
3190
  if (forDeletion) {
3035
3191
  const toolCommands2 = commandFilePaths.map(
@@ -3092,28 +3248,28 @@ var CommandsProcessor = class extends FeatureProcessor {
3092
3248
  };
3093
3249
 
3094
3250
  // src/features/hooks/hooks-processor.ts
3095
- import { z as z17 } from "zod/mini";
3251
+ import { z as z18 } from "zod/mini";
3096
3252
 
3097
3253
  // src/types/hooks.ts
3098
- import { z as z14 } from "zod/mini";
3254
+ import { z as z15 } from "zod/mini";
3099
3255
  var CONTROL_CHARS = ["\n", "\r", "\0"];
3100
3256
  var hasControlChars = (val) => CONTROL_CHARS.some((char) => val.includes(char));
3101
- var safeString = z14.pipe(
3102
- z14.string(),
3103
- z14.custom(
3257
+ var safeString = z15.pipe(
3258
+ z15.string(),
3259
+ z15.custom(
3104
3260
  (val) => typeof val === "string" && !hasControlChars(val),
3105
3261
  "must not contain newline, carriage return, or NUL characters"
3106
3262
  )
3107
3263
  );
3108
- var HookDefinitionSchema = z14.looseObject({
3109
- command: z14.optional(safeString),
3110
- type: z14.optional(z14.enum(["command", "prompt"])),
3111
- timeout: z14.optional(z14.number()),
3112
- matcher: z14.optional(safeString),
3113
- prompt: z14.optional(safeString),
3114
- loop_limit: z14.optional(z14.nullable(z14.number())),
3115
- name: z14.optional(safeString),
3116
- description: z14.optional(safeString)
3264
+ var HookDefinitionSchema = z15.looseObject({
3265
+ command: z15.optional(safeString),
3266
+ type: z15.optional(z15.enum(["command", "prompt"])),
3267
+ timeout: z15.optional(z15.number()),
3268
+ matcher: z15.optional(safeString),
3269
+ prompt: z15.optional(safeString),
3270
+ loop_limit: z15.optional(z15.nullable(z15.number())),
3271
+ name: z15.optional(safeString),
3272
+ description: z15.optional(safeString)
3117
3273
  });
3118
3274
  var CURSOR_HOOK_EVENTS = [
3119
3275
  "sessionStart",
@@ -3193,16 +3349,16 @@ var GEMINICLI_HOOK_EVENTS = [
3193
3349
  "preCompact",
3194
3350
  "notification"
3195
3351
  ];
3196
- var hooksRecordSchema = z14.record(z14.string(), z14.array(HookDefinitionSchema));
3197
- var HooksConfigSchema = z14.looseObject({
3198
- version: z14.optional(z14.number()),
3352
+ var hooksRecordSchema = z15.record(z15.string(), z15.array(HookDefinitionSchema));
3353
+ var HooksConfigSchema = z15.looseObject({
3354
+ version: z15.optional(z15.number()),
3199
3355
  hooks: hooksRecordSchema,
3200
- cursor: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
3201
- claudecode: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
3202
- copilot: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
3203
- opencode: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
3204
- factorydroid: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) })),
3205
- geminicli: z14.optional(z14.looseObject({ hooks: z14.optional(hooksRecordSchema) }))
3356
+ cursor: z15.optional(z15.looseObject({ hooks: z15.optional(hooksRecordSchema) })),
3357
+ claudecode: z15.optional(z15.looseObject({ hooks: z15.optional(hooksRecordSchema) })),
3358
+ copilot: z15.optional(z15.looseObject({ hooks: z15.optional(hooksRecordSchema) })),
3359
+ opencode: z15.optional(z15.looseObject({ hooks: z15.optional(hooksRecordSchema) })),
3360
+ factorydroid: z15.optional(z15.looseObject({ hooks: z15.optional(hooksRecordSchema) })),
3361
+ geminicli: z15.optional(z15.looseObject({ hooks: z15.optional(hooksRecordSchema) }))
3206
3362
  });
3207
3363
  var CANONICAL_TO_CLAUDE_EVENT_NAMES = {
3208
3364
  sessionStart: "SessionStart",
@@ -3299,7 +3455,7 @@ var GEMINICLI_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
3299
3455
  );
3300
3456
 
3301
3457
  // src/features/hooks/claudecode-hooks.ts
3302
- import { join as join21 } from "path";
3458
+ import { join as join22 } from "path";
3303
3459
 
3304
3460
  // src/features/hooks/tool-hooks-converter.ts
3305
3461
  function isToolMatcherEntry(x) {
@@ -3407,7 +3563,7 @@ var ToolFile = class extends AiFile {
3407
3563
  };
3408
3564
 
3409
3565
  // src/features/hooks/rulesync-hooks.ts
3410
- import { join as join20 } from "path";
3566
+ import { join as join21 } from "path";
3411
3567
  var RulesyncHooks = class _RulesyncHooks extends RulesyncFile {
3412
3568
  json;
3413
3569
  constructor(params) {
@@ -3438,7 +3594,7 @@ var RulesyncHooks = class _RulesyncHooks extends RulesyncFile {
3438
3594
  validate = true
3439
3595
  }) {
3440
3596
  const paths = _RulesyncHooks.getSettablePaths();
3441
- const filePath = join20(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3597
+ const filePath = join21(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3442
3598
  if (!await fileExists(filePath)) {
3443
3599
  throw new Error(`No ${RULESYNC_HOOKS_RELATIVE_FILE_PATH} found.`);
3444
3600
  }
@@ -3518,7 +3674,7 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
3518
3674
  global = false
3519
3675
  }) {
3520
3676
  const paths = _ClaudecodeHooks.getSettablePaths({ global });
3521
- const filePath = join21(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3677
+ const filePath = join22(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3522
3678
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
3523
3679
  return new _ClaudecodeHooks({
3524
3680
  baseDir,
@@ -3535,7 +3691,7 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
3535
3691
  global = false
3536
3692
  }) {
3537
3693
  const paths = _ClaudecodeHooks.getSettablePaths({ global });
3538
- const filePath = join21(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3694
+ const filePath = join22(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3539
3695
  const existingContent = await readOrInitializeFileContent(
3540
3696
  filePath,
3541
3697
  JSON.stringify({}, null, 2)
@@ -3571,7 +3727,7 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
3571
3727
  settings = JSON.parse(this.getFileContent());
3572
3728
  } catch (error) {
3573
3729
  throw new Error(
3574
- `Failed to parse Claude hooks content in ${join21(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
3730
+ `Failed to parse Claude hooks content in ${join22(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
3575
3731
  {
3576
3732
  cause: error
3577
3733
  }
@@ -3604,13 +3760,13 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
3604
3760
  };
3605
3761
 
3606
3762
  // src/features/hooks/copilot-hooks.ts
3607
- import { join as join22 } from "path";
3608
- import { z as z15 } from "zod/mini";
3609
- var CopilotHookEntrySchema = z15.looseObject({
3610
- type: z15.string(),
3611
- bash: z15.optional(z15.string()),
3612
- powershell: z15.optional(z15.string()),
3613
- timeoutSec: z15.optional(z15.number())
3763
+ import { join as join23 } from "path";
3764
+ import { z as z16 } from "zod/mini";
3765
+ var CopilotHookEntrySchema = z16.looseObject({
3766
+ type: z16.string(),
3767
+ bash: z16.optional(z16.string()),
3768
+ powershell: z16.optional(z16.string()),
3769
+ timeoutSec: z16.optional(z16.number())
3614
3770
  });
3615
3771
  function canonicalToCopilotHooks(config) {
3616
3772
  const canonicalSchemaKeys = Object.keys(HookDefinitionSchema.shape);
@@ -3707,7 +3863,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
3707
3863
  }
3708
3864
  static getSettablePaths(_options = {}) {
3709
3865
  return {
3710
- relativeDirPath: join22(".github", "hooks"),
3866
+ relativeDirPath: join23(".github", "hooks"),
3711
3867
  relativeFilePath: "copilot-hooks.json"
3712
3868
  };
3713
3869
  }
@@ -3717,7 +3873,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
3717
3873
  global = false
3718
3874
  }) {
3719
3875
  const paths = _CopilotHooks.getSettablePaths({ global });
3720
- const filePath = join22(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3876
+ const filePath = join23(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3721
3877
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
3722
3878
  return new _CopilotHooks({
3723
3879
  baseDir,
@@ -3750,7 +3906,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
3750
3906
  parsed = JSON.parse(this.getFileContent());
3751
3907
  } catch (error) {
3752
3908
  throw new Error(
3753
- `Failed to parse Copilot hooks content in ${join22(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
3909
+ `Failed to parse Copilot hooks content in ${join23(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
3754
3910
  {
3755
3911
  cause: error
3756
3912
  }
@@ -3780,7 +3936,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
3780
3936
  };
3781
3937
 
3782
3938
  // src/features/hooks/cursor-hooks.ts
3783
- import { join as join23 } from "path";
3939
+ import { join as join24 } from "path";
3784
3940
  var CursorHooks = class _CursorHooks extends ToolHooks {
3785
3941
  constructor(params) {
3786
3942
  const { rulesyncHooks: _r, ...rest } = params;
@@ -3801,7 +3957,7 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
3801
3957
  }) {
3802
3958
  const paths = _CursorHooks.getSettablePaths();
3803
3959
  const fileContent = await readFileContent(
3804
- join23(baseDir, paths.relativeDirPath, paths.relativeFilePath)
3960
+ join24(baseDir, paths.relativeDirPath, paths.relativeFilePath)
3805
3961
  );
3806
3962
  return new _CursorHooks({
3807
3963
  baseDir,
@@ -3888,7 +4044,7 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
3888
4044
  };
3889
4045
 
3890
4046
  // src/features/hooks/factorydroid-hooks.ts
3891
- import { join as join24 } from "path";
4047
+ import { join as join25 } from "path";
3892
4048
  var FACTORYDROID_CONVERTER_CONFIG = {
3893
4049
  supportedEvents: FACTORYDROID_HOOK_EVENTS,
3894
4050
  canonicalToToolEventNames: CANONICAL_TO_FACTORYDROID_EVENT_NAMES,
@@ -3914,7 +4070,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
3914
4070
  global = false
3915
4071
  }) {
3916
4072
  const paths = _FactorydroidHooks.getSettablePaths({ global });
3917
- const filePath = join24(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4073
+ const filePath = join25(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3918
4074
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
3919
4075
  return new _FactorydroidHooks({
3920
4076
  baseDir,
@@ -3931,7 +4087,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
3931
4087
  global = false
3932
4088
  }) {
3933
4089
  const paths = _FactorydroidHooks.getSettablePaths({ global });
3934
- const filePath = join24(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4090
+ const filePath = join25(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3935
4091
  const existingContent = await readOrInitializeFileContent(
3936
4092
  filePath,
3937
4093
  JSON.stringify({}, null, 2)
@@ -3967,7 +4123,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
3967
4123
  settings = JSON.parse(this.getFileContent());
3968
4124
  } catch (error) {
3969
4125
  throw new Error(
3970
- `Failed to parse Factory Droid hooks content in ${join24(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4126
+ `Failed to parse Factory Droid hooks content in ${join25(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
3971
4127
  {
3972
4128
  cause: error
3973
4129
  }
@@ -4000,8 +4156,8 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4000
4156
  };
4001
4157
 
4002
4158
  // src/features/hooks/geminicli-hooks.ts
4003
- import { join as join25 } from "path";
4004
- import { z as z16 } from "zod/mini";
4159
+ import { join as join26 } from "path";
4160
+ import { z as z17 } from "zod/mini";
4005
4161
  function canonicalToGeminicliHooks(config) {
4006
4162
  const geminiSupported = new Set(GEMINICLI_HOOK_EVENTS);
4007
4163
  const sharedHooks = {};
@@ -4045,16 +4201,16 @@ function canonicalToGeminicliHooks(config) {
4045
4201
  }
4046
4202
  return gemini;
4047
4203
  }
4048
- var GeminiHookEntrySchema = z16.looseObject({
4049
- type: z16.optional(z16.string()),
4050
- command: z16.optional(z16.string()),
4051
- timeout: z16.optional(z16.number()),
4052
- name: z16.optional(z16.string()),
4053
- description: z16.optional(z16.string())
4204
+ var GeminiHookEntrySchema = z17.looseObject({
4205
+ type: z17.optional(z17.string()),
4206
+ command: z17.optional(z17.string()),
4207
+ timeout: z17.optional(z17.number()),
4208
+ name: z17.optional(z17.string()),
4209
+ description: z17.optional(z17.string())
4054
4210
  });
4055
- var GeminiMatcherEntrySchema = z16.looseObject({
4056
- matcher: z16.optional(z16.string()),
4057
- hooks: z16.optional(z16.array(GeminiHookEntrySchema))
4211
+ var GeminiMatcherEntrySchema = z17.looseObject({
4212
+ matcher: z17.optional(z17.string()),
4213
+ hooks: z17.optional(z17.array(GeminiHookEntrySchema))
4058
4214
  });
4059
4215
  function geminiHooksToCanonical(geminiHooks) {
4060
4216
  if (geminiHooks === null || geminiHooks === void 0 || typeof geminiHooks !== "object") {
@@ -4109,7 +4265,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4109
4265
  global = false
4110
4266
  }) {
4111
4267
  const paths = _GeminicliHooks.getSettablePaths({ global });
4112
- const filePath = join25(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4268
+ const filePath = join26(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4113
4269
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4114
4270
  return new _GeminicliHooks({
4115
4271
  baseDir,
@@ -4126,7 +4282,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4126
4282
  global = false
4127
4283
  }) {
4128
4284
  const paths = _GeminicliHooks.getSettablePaths({ global });
4129
- const filePath = join25(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4285
+ const filePath = join26(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4130
4286
  const existingContent = await readOrInitializeFileContent(
4131
4287
  filePath,
4132
4288
  JSON.stringify({}, null, 2)
@@ -4158,7 +4314,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4158
4314
  settings = JSON.parse(this.getFileContent());
4159
4315
  } catch (error) {
4160
4316
  throw new Error(
4161
- `Failed to parse Gemini CLI hooks content in ${join25(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4317
+ `Failed to parse Gemini CLI hooks content in ${join26(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4162
4318
  {
4163
4319
  cause: error
4164
4320
  }
@@ -4188,7 +4344,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4188
4344
  };
4189
4345
 
4190
4346
  // src/features/hooks/opencode-hooks.ts
4191
- import { join as join26 } from "path";
4347
+ import { join as join27 } from "path";
4192
4348
  var NAMED_HOOKS = /* @__PURE__ */ new Set(["tool.execute.before", "tool.execute.after"]);
4193
4349
  function escapeForTemplateLiteral(command) {
4194
4350
  return command.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${");
@@ -4286,7 +4442,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4286
4442
  }
4287
4443
  static getSettablePaths(options) {
4288
4444
  return {
4289
- relativeDirPath: options?.global ? join26(".config", "opencode", "plugins") : join26(".opencode", "plugins"),
4445
+ relativeDirPath: options?.global ? join27(".config", "opencode", "plugins") : join27(".opencode", "plugins"),
4290
4446
  relativeFilePath: "rulesync-hooks.js"
4291
4447
  };
4292
4448
  }
@@ -4297,7 +4453,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
4297
4453
  }) {
4298
4454
  const paths = _OpencodeHooks.getSettablePaths({ global });
4299
4455
  const fileContent = await readFileContent(
4300
- join26(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4456
+ join27(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4301
4457
  );
4302
4458
  return new _OpencodeHooks({
4303
4459
  baseDir,
@@ -4354,7 +4510,7 @@ var hooksProcessorToolTargetTuple = [
4354
4510
  "factorydroid",
4355
4511
  "geminicli"
4356
4512
  ];
4357
- var HooksProcessorToolTargetSchema = z17.enum(hooksProcessorToolTargetTuple);
4513
+ var HooksProcessorToolTargetSchema = z18.enum(hooksProcessorToolTargetTuple);
4358
4514
  var toolHooksFactories = /* @__PURE__ */ new Map([
4359
4515
  [
4360
4516
  "cursor",
@@ -4589,13 +4745,13 @@ var HooksProcessor = class extends FeatureProcessor {
4589
4745
  };
4590
4746
 
4591
4747
  // src/features/ignore/ignore-processor.ts
4592
- import { z as z18 } from "zod/mini";
4748
+ import { z as z19 } from "zod/mini";
4593
4749
 
4594
4750
  // src/features/ignore/augmentcode-ignore.ts
4595
- import { join as join28 } from "path";
4751
+ import { join as join29 } from "path";
4596
4752
 
4597
4753
  // src/features/ignore/rulesync-ignore.ts
4598
- import { join as join27 } from "path";
4754
+ import { join as join28 } from "path";
4599
4755
  var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
4600
4756
  validate() {
4601
4757
  return { success: true, error: null };
@@ -4615,12 +4771,12 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
4615
4771
  static async fromFile() {
4616
4772
  const baseDir = process.cwd();
4617
4773
  const paths = this.getSettablePaths();
4618
- const recommendedPath = join27(
4774
+ const recommendedPath = join28(
4619
4775
  baseDir,
4620
4776
  paths.recommended.relativeDirPath,
4621
4777
  paths.recommended.relativeFilePath
4622
4778
  );
4623
- const legacyPath = join27(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
4779
+ const legacyPath = join28(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
4624
4780
  if (await fileExists(recommendedPath)) {
4625
4781
  const fileContent2 = await readFileContent(recommendedPath);
4626
4782
  return new _RulesyncIgnore({
@@ -4736,7 +4892,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
4736
4892
  validate = true
4737
4893
  }) {
4738
4894
  const fileContent = await readFileContent(
4739
- join28(
4895
+ join29(
4740
4896
  baseDir,
4741
4897
  this.getSettablePaths().relativeDirPath,
4742
4898
  this.getSettablePaths().relativeFilePath
@@ -4766,7 +4922,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
4766
4922
  };
4767
4923
 
4768
4924
  // src/features/ignore/claudecode-ignore.ts
4769
- import { join as join29 } from "path";
4925
+ import { join as join30 } from "path";
4770
4926
  import { uniq } from "es-toolkit";
4771
4927
  var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4772
4928
  constructor(params) {
@@ -4809,7 +4965,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4809
4965
  const fileContent = rulesyncIgnore.getFileContent();
4810
4966
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
4811
4967
  const deniedValues = patterns.map((pattern) => `Read(${pattern})`);
4812
- const filePath = join29(
4968
+ const filePath = join30(
4813
4969
  baseDir,
4814
4970
  this.getSettablePaths().relativeDirPath,
4815
4971
  this.getSettablePaths().relativeFilePath
@@ -4845,7 +5001,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4845
5001
  validate = true
4846
5002
  }) {
4847
5003
  const fileContent = await readFileContent(
4848
- join29(
5004
+ join30(
4849
5005
  baseDir,
4850
5006
  this.getSettablePaths().relativeDirPath,
4851
5007
  this.getSettablePaths().relativeFilePath
@@ -4875,7 +5031,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
4875
5031
  };
4876
5032
 
4877
5033
  // src/features/ignore/cline-ignore.ts
4878
- import { join as join30 } from "path";
5034
+ import { join as join31 } from "path";
4879
5035
  var ClineIgnore = class _ClineIgnore extends ToolIgnore {
4880
5036
  static getSettablePaths() {
4881
5037
  return {
@@ -4912,7 +5068,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
4912
5068
  validate = true
4913
5069
  }) {
4914
5070
  const fileContent = await readFileContent(
4915
- join30(
5071
+ join31(
4916
5072
  baseDir,
4917
5073
  this.getSettablePaths().relativeDirPath,
4918
5074
  this.getSettablePaths().relativeFilePath
@@ -4942,7 +5098,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
4942
5098
  };
4943
5099
 
4944
5100
  // src/features/ignore/cursor-ignore.ts
4945
- import { join as join31 } from "path";
5101
+ import { join as join32 } from "path";
4946
5102
  var CursorIgnore = class _CursorIgnore extends ToolIgnore {
4947
5103
  static getSettablePaths() {
4948
5104
  return {
@@ -4975,7 +5131,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
4975
5131
  validate = true
4976
5132
  }) {
4977
5133
  const fileContent = await readFileContent(
4978
- join31(
5134
+ join32(
4979
5135
  baseDir,
4980
5136
  this.getSettablePaths().relativeDirPath,
4981
5137
  this.getSettablePaths().relativeFilePath
@@ -5005,7 +5161,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
5005
5161
  };
5006
5162
 
5007
5163
  // src/features/ignore/geminicli-ignore.ts
5008
- import { join as join32 } from "path";
5164
+ import { join as join33 } from "path";
5009
5165
  var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
5010
5166
  static getSettablePaths() {
5011
5167
  return {
@@ -5032,7 +5188,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
5032
5188
  validate = true
5033
5189
  }) {
5034
5190
  const fileContent = await readFileContent(
5035
- join32(
5191
+ join33(
5036
5192
  baseDir,
5037
5193
  this.getSettablePaths().relativeDirPath,
5038
5194
  this.getSettablePaths().relativeFilePath
@@ -5062,7 +5218,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
5062
5218
  };
5063
5219
 
5064
5220
  // src/features/ignore/goose-ignore.ts
5065
- import { join as join33 } from "path";
5221
+ import { join as join34 } from "path";
5066
5222
  var GooseIgnore = class _GooseIgnore extends ToolIgnore {
5067
5223
  static getSettablePaths() {
5068
5224
  return {
@@ -5099,7 +5255,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
5099
5255
  validate = true
5100
5256
  }) {
5101
5257
  const fileContent = await readFileContent(
5102
- join33(
5258
+ join34(
5103
5259
  baseDir,
5104
5260
  this.getSettablePaths().relativeDirPath,
5105
5261
  this.getSettablePaths().relativeFilePath
@@ -5129,7 +5285,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
5129
5285
  };
5130
5286
 
5131
5287
  // src/features/ignore/junie-ignore.ts
5132
- import { join as join34 } from "path";
5288
+ import { join as join35 } from "path";
5133
5289
  var JunieIgnore = class _JunieIgnore extends ToolIgnore {
5134
5290
  static getSettablePaths() {
5135
5291
  return {
@@ -5156,7 +5312,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
5156
5312
  validate = true
5157
5313
  }) {
5158
5314
  const fileContent = await readFileContent(
5159
- join34(
5315
+ join35(
5160
5316
  baseDir,
5161
5317
  this.getSettablePaths().relativeDirPath,
5162
5318
  this.getSettablePaths().relativeFilePath
@@ -5186,7 +5342,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
5186
5342
  };
5187
5343
 
5188
5344
  // src/features/ignore/kilo-ignore.ts
5189
- import { join as join35 } from "path";
5345
+ import { join as join36 } from "path";
5190
5346
  var KiloIgnore = class _KiloIgnore extends ToolIgnore {
5191
5347
  static getSettablePaths() {
5192
5348
  return {
@@ -5223,7 +5379,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
5223
5379
  validate = true
5224
5380
  }) {
5225
5381
  const fileContent = await readFileContent(
5226
- join35(
5382
+ join36(
5227
5383
  baseDir,
5228
5384
  this.getSettablePaths().relativeDirPath,
5229
5385
  this.getSettablePaths().relativeFilePath
@@ -5253,7 +5409,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
5253
5409
  };
5254
5410
 
5255
5411
  // src/features/ignore/kiro-ignore.ts
5256
- import { join as join36 } from "path";
5412
+ import { join as join37 } from "path";
5257
5413
  var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5258
5414
  static getSettablePaths() {
5259
5415
  return {
@@ -5280,7 +5436,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5280
5436
  validate = true
5281
5437
  }) {
5282
5438
  const fileContent = await readFileContent(
5283
- join36(
5439
+ join37(
5284
5440
  baseDir,
5285
5441
  this.getSettablePaths().relativeDirPath,
5286
5442
  this.getSettablePaths().relativeFilePath
@@ -5310,7 +5466,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
5310
5466
  };
5311
5467
 
5312
5468
  // src/features/ignore/qwencode-ignore.ts
5313
- import { join as join37 } from "path";
5469
+ import { join as join38 } from "path";
5314
5470
  var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5315
5471
  static getSettablePaths() {
5316
5472
  return {
@@ -5337,7 +5493,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5337
5493
  validate = true
5338
5494
  }) {
5339
5495
  const fileContent = await readFileContent(
5340
- join37(
5496
+ join38(
5341
5497
  baseDir,
5342
5498
  this.getSettablePaths().relativeDirPath,
5343
5499
  this.getSettablePaths().relativeFilePath
@@ -5367,7 +5523,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
5367
5523
  };
5368
5524
 
5369
5525
  // src/features/ignore/roo-ignore.ts
5370
- import { join as join38 } from "path";
5526
+ import { join as join39 } from "path";
5371
5527
  var RooIgnore = class _RooIgnore extends ToolIgnore {
5372
5528
  static getSettablePaths() {
5373
5529
  return {
@@ -5394,7 +5550,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
5394
5550
  validate = true
5395
5551
  }) {
5396
5552
  const fileContent = await readFileContent(
5397
- join38(
5553
+ join39(
5398
5554
  baseDir,
5399
5555
  this.getSettablePaths().relativeDirPath,
5400
5556
  this.getSettablePaths().relativeFilePath
@@ -5424,7 +5580,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
5424
5580
  };
5425
5581
 
5426
5582
  // src/features/ignore/windsurf-ignore.ts
5427
- import { join as join39 } from "path";
5583
+ import { join as join40 } from "path";
5428
5584
  var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5429
5585
  static getSettablePaths() {
5430
5586
  return {
@@ -5451,7 +5607,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5451
5607
  validate = true
5452
5608
  }) {
5453
5609
  const fileContent = await readFileContent(
5454
- join39(
5610
+ join40(
5455
5611
  baseDir,
5456
5612
  this.getSettablePaths().relativeDirPath,
5457
5613
  this.getSettablePaths().relativeFilePath
@@ -5481,7 +5637,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
5481
5637
  };
5482
5638
 
5483
5639
  // src/features/ignore/zed-ignore.ts
5484
- import { join as join40 } from "path";
5640
+ import { join as join41 } from "path";
5485
5641
  import { uniq as uniq2 } from "es-toolkit";
5486
5642
  var ZedIgnore = class _ZedIgnore extends ToolIgnore {
5487
5643
  constructor(params) {
@@ -5518,7 +5674,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
5518
5674
  }) {
5519
5675
  const fileContent = rulesyncIgnore.getFileContent();
5520
5676
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
5521
- const filePath = join40(
5677
+ const filePath = join41(
5522
5678
  baseDir,
5523
5679
  this.getSettablePaths().relativeDirPath,
5524
5680
  this.getSettablePaths().relativeFilePath
@@ -5545,7 +5701,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
5545
5701
  validate = true
5546
5702
  }) {
5547
5703
  const fileContent = await readFileContent(
5548
- join40(
5704
+ join41(
5549
5705
  baseDir,
5550
5706
  this.getSettablePaths().relativeDirPath,
5551
5707
  this.getSettablePaths().relativeFilePath
@@ -5591,7 +5747,7 @@ var ignoreProcessorToolTargets = [
5591
5747
  "windsurf",
5592
5748
  "zed"
5593
5749
  ];
5594
- var IgnoreProcessorToolTargetSchema = z18.enum(ignoreProcessorToolTargets);
5750
+ var IgnoreProcessorToolTargetSchema = z19.enum(ignoreProcessorToolTargets);
5595
5751
  var toolIgnoreFactories = /* @__PURE__ */ new Map([
5596
5752
  ["augmentcode", { class: AugmentcodeIgnore }],
5597
5753
  ["claudecode", { class: ClaudecodeIgnore }],
@@ -5729,49 +5885,53 @@ var IgnoreProcessor = class extends FeatureProcessor {
5729
5885
  };
5730
5886
 
5731
5887
  // src/features/mcp/mcp-processor.ts
5732
- import { z as z22 } from "zod/mini";
5888
+ import { z as z23 } from "zod/mini";
5733
5889
 
5734
5890
  // src/features/mcp/claudecode-mcp.ts
5735
- import { join as join42 } from "path";
5891
+ import { join as join43 } from "path";
5736
5892
 
5737
5893
  // src/features/mcp/rulesync-mcp.ts
5738
- import { join as join41 } from "path";
5894
+ import { join as join42 } from "path";
5739
5895
  import { omit } from "es-toolkit/object";
5740
- import { z as z20 } from "zod/mini";
5896
+ import { z as z21 } from "zod/mini";
5741
5897
 
5742
5898
  // src/types/mcp.ts
5743
- import { z as z19 } from "zod/mini";
5744
- var McpServerSchema = z19.object({
5745
- type: z19.optional(z19.enum(["stdio", "sse", "http"])),
5746
- command: z19.optional(z19.union([z19.string(), z19.array(z19.string())])),
5747
- args: z19.optional(z19.array(z19.string())),
5748
- url: z19.optional(z19.string()),
5749
- httpUrl: z19.optional(z19.string()),
5750
- env: z19.optional(z19.record(z19.string(), z19.string())),
5751
- disabled: z19.optional(z19.boolean()),
5752
- networkTimeout: z19.optional(z19.number()),
5753
- timeout: z19.optional(z19.number()),
5754
- trust: z19.optional(z19.boolean()),
5755
- cwd: z19.optional(z19.string()),
5756
- transport: z19.optional(z19.enum(["stdio", "sse", "http"])),
5757
- alwaysAllow: z19.optional(z19.array(z19.string())),
5758
- tools: z19.optional(z19.array(z19.string())),
5759
- kiroAutoApprove: z19.optional(z19.array(z19.string())),
5760
- kiroAutoBlock: z19.optional(z19.array(z19.string())),
5761
- headers: z19.optional(z19.record(z19.string(), z19.string())),
5762
- enabledTools: z19.optional(z19.array(z19.string())),
5763
- disabledTools: z19.optional(z19.array(z19.string()))
5899
+ import { z as z20 } from "zod/mini";
5900
+ var McpServerSchema = z20.looseObject({
5901
+ type: z20.optional(z20.enum(["stdio", "sse", "http"])),
5902
+ command: z20.optional(z20.union([z20.string(), z20.array(z20.string())])),
5903
+ args: z20.optional(z20.array(z20.string())),
5904
+ url: z20.optional(z20.string()),
5905
+ httpUrl: z20.optional(z20.string()),
5906
+ env: z20.optional(z20.record(z20.string(), z20.string())),
5907
+ disabled: z20.optional(z20.boolean()),
5908
+ networkTimeout: z20.optional(z20.number()),
5909
+ timeout: z20.optional(z20.number()),
5910
+ trust: z20.optional(z20.boolean()),
5911
+ cwd: z20.optional(z20.string()),
5912
+ transport: z20.optional(z20.enum(["stdio", "sse", "http"])),
5913
+ alwaysAllow: z20.optional(z20.array(z20.string())),
5914
+ tools: z20.optional(z20.array(z20.string())),
5915
+ kiroAutoApprove: z20.optional(z20.array(z20.string())),
5916
+ kiroAutoBlock: z20.optional(z20.array(z20.string())),
5917
+ headers: z20.optional(z20.record(z20.string(), z20.string())),
5918
+ enabledTools: z20.optional(z20.array(z20.string())),
5919
+ disabledTools: z20.optional(z20.array(z20.string()))
5764
5920
  });
5765
- var McpServersSchema = z19.record(z19.string(), McpServerSchema);
5921
+ var McpServersSchema = z20.record(z20.string(), McpServerSchema);
5766
5922
 
5767
5923
  // src/features/mcp/rulesync-mcp.ts
5768
- var RulesyncMcpServerSchema = z20.extend(McpServerSchema, {
5769
- targets: z20.optional(RulesyncTargetsSchema),
5770
- description: z20.optional(z20.string()),
5771
- exposed: z20.optional(z20.boolean())
5924
+ var RulesyncMcpServerSchema = z21.extend(McpServerSchema, {
5925
+ targets: z21.optional(RulesyncTargetsSchema),
5926
+ description: z21.optional(z21.string()),
5927
+ exposed: z21.optional(z21.boolean())
5772
5928
  });
5773
- var RulesyncMcpConfigSchema = z20.object({
5774
- mcpServers: z20.record(z20.string(), RulesyncMcpServerSchema)
5929
+ var RulesyncMcpConfigSchema = z21.object({
5930
+ mcpServers: z21.record(z21.string(), RulesyncMcpServerSchema)
5931
+ });
5932
+ var RulesyncMcpFileSchema = z21.looseObject({
5933
+ $schema: z21.optional(z21.string()),
5934
+ ...RulesyncMcpConfigSchema.shape
5775
5935
  });
5776
5936
  var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
5777
5937
  json;
@@ -5798,7 +5958,7 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
5798
5958
  };
5799
5959
  }
5800
5960
  validate() {
5801
- const result = RulesyncMcpConfigSchema.safeParse(this.json);
5961
+ const result = RulesyncMcpFileSchema.safeParse(this.json);
5802
5962
  if (!result.success) {
5803
5963
  return { success: false, error: result.error };
5804
5964
  }
@@ -5807,12 +5967,12 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
5807
5967
  static async fromFile({ validate = true }) {
5808
5968
  const baseDir = process.cwd();
5809
5969
  const paths = this.getSettablePaths();
5810
- const recommendedPath = join41(
5970
+ const recommendedPath = join42(
5811
5971
  baseDir,
5812
5972
  paths.recommended.relativeDirPath,
5813
5973
  paths.recommended.relativeFilePath
5814
5974
  );
5815
- const legacyPath = join41(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5975
+ const legacyPath = join42(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5816
5976
  if (await fileExists(recommendedPath)) {
5817
5977
  const fileContent2 = await readFileContent(recommendedPath);
5818
5978
  return new _RulesyncMcp({
@@ -5901,11 +6061,17 @@ var ToolMcp = class extends ToolFile {
5901
6061
  toRulesyncMcpDefault({
5902
6062
  fileContent = void 0
5903
6063
  } = {}) {
6064
+ const content = fileContent ?? this.fileContent;
6065
+ const { $schema: _, ...json } = JSON.parse(content);
6066
+ const withSchema = {
6067
+ $schema: RULESYNC_MCP_SCHEMA_URL,
6068
+ ...json
6069
+ };
5904
6070
  return new RulesyncMcp({
5905
6071
  baseDir: this.baseDir,
5906
6072
  relativeDirPath: RULESYNC_RELATIVE_DIR_PATH,
5907
- relativeFilePath: ".mcp.json",
5908
- fileContent: fileContent ?? this.fileContent
6073
+ relativeFilePath: RULESYNC_MCP_FILE_NAME,
6074
+ fileContent: JSON.stringify(withSchema, null, 2)
5909
6075
  });
5910
6076
  }
5911
6077
  static async fromFile(_params) {
@@ -5960,7 +6126,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
5960
6126
  global = false
5961
6127
  }) {
5962
6128
  const paths = this.getSettablePaths({ global });
5963
- const fileContent = await readFileContentOrNull(join42(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6129
+ const fileContent = await readFileContentOrNull(join43(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
5964
6130
  const json = JSON.parse(fileContent);
5965
6131
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
5966
6132
  return new _ClaudecodeMcp({
@@ -5979,7 +6145,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
5979
6145
  }) {
5980
6146
  const paths = this.getSettablePaths({ global });
5981
6147
  const fileContent = await readOrInitializeFileContent(
5982
- join42(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6148
+ join43(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5983
6149
  JSON.stringify({ mcpServers: {} }, null, 2)
5984
6150
  );
5985
6151
  const json = JSON.parse(fileContent);
@@ -6018,7 +6184,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
6018
6184
  };
6019
6185
 
6020
6186
  // src/features/mcp/cline-mcp.ts
6021
- import { join as join43 } from "path";
6187
+ import { join as join44 } from "path";
6022
6188
  var ClineMcp = class _ClineMcp extends ToolMcp {
6023
6189
  json;
6024
6190
  constructor(params) {
@@ -6039,7 +6205,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
6039
6205
  validate = true
6040
6206
  }) {
6041
6207
  const fileContent = await readFileContent(
6042
- join43(
6208
+ join44(
6043
6209
  baseDir,
6044
6210
  this.getSettablePaths().relativeDirPath,
6045
6211
  this.getSettablePaths().relativeFilePath
@@ -6088,7 +6254,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
6088
6254
  };
6089
6255
 
6090
6256
  // src/features/mcp/codexcli-mcp.ts
6091
- import { join as join44 } from "path";
6257
+ import { join as join45 } from "path";
6092
6258
  import * as smolToml from "smol-toml";
6093
6259
  function convertFromCodexFormat(codexMcp) {
6094
6260
  const result = {};
@@ -6171,7 +6337,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6171
6337
  global = false
6172
6338
  }) {
6173
6339
  const paths = this.getSettablePaths({ global });
6174
- const fileContent = await readFileContentOrNull(join44(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml.stringify({});
6340
+ const fileContent = await readFileContentOrNull(join45(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml.stringify({});
6175
6341
  return new _CodexcliMcp({
6176
6342
  baseDir,
6177
6343
  relativeDirPath: paths.relativeDirPath,
@@ -6187,7 +6353,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6187
6353
  global = false
6188
6354
  }) {
6189
6355
  const paths = this.getSettablePaths({ global });
6190
- const configTomlFilePath = join44(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6356
+ const configTomlFilePath = join45(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6191
6357
  const configTomlFileContent = await readOrInitializeFileContent(
6192
6358
  configTomlFilePath,
6193
6359
  smolToml.stringify({})
@@ -6208,10 +6374,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6208
6374
  toRulesyncMcp() {
6209
6375
  const mcpServers = this.toml.mcp_servers ?? {};
6210
6376
  const converted = convertFromCodexFormat(mcpServers);
6211
- return new RulesyncMcp({
6212
- baseDir: this.baseDir,
6213
- relativeDirPath: RULESYNC_RELATIVE_DIR_PATH,
6214
- relativeFilePath: ".mcp.json",
6377
+ return this.toRulesyncMcpDefault({
6215
6378
  fileContent: JSON.stringify({ mcpServers: converted }, null, 2)
6216
6379
  });
6217
6380
  }
@@ -6244,7 +6407,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
6244
6407
  };
6245
6408
 
6246
6409
  // src/features/mcp/copilot-mcp.ts
6247
- import { join as join45 } from "path";
6410
+ import { join as join46 } from "path";
6248
6411
  function convertToCopilotFormat(mcpServers) {
6249
6412
  return { servers: mcpServers };
6250
6413
  }
@@ -6271,7 +6434,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
6271
6434
  validate = true
6272
6435
  }) {
6273
6436
  const fileContent = await readFileContent(
6274
- join45(
6437
+ join46(
6275
6438
  baseDir,
6276
6439
  this.getSettablePaths().relativeDirPath,
6277
6440
  this.getSettablePaths().relativeFilePath
@@ -6324,7 +6487,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
6324
6487
  };
6325
6488
 
6326
6489
  // src/features/mcp/cursor-mcp.ts
6327
- import { join as join46 } from "path";
6490
+ import { join as join47 } from "path";
6328
6491
  var CURSOR_ENV_VAR_PATTERN = /\$\{env:([^}]+)\}/g;
6329
6492
  function isMcpServers(value) {
6330
6493
  return value !== void 0 && value !== null && typeof value === "object";
@@ -6374,7 +6537,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6374
6537
  this.json = JSON.parse(this.fileContent);
6375
6538
  } catch (error) {
6376
6539
  throw new Error(
6377
- `Failed to parse Cursor MCP config at ${join46(this.relativeDirPath, this.relativeFilePath)}: ${formatError(error)}`,
6540
+ `Failed to parse Cursor MCP config at ${join47(this.relativeDirPath, this.relativeFilePath)}: ${formatError(error)}`,
6378
6541
  { cause: error }
6379
6542
  );
6380
6543
  }
@@ -6400,14 +6563,14 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6400
6563
  global = false
6401
6564
  }) {
6402
6565
  const paths = this.getSettablePaths({ global });
6403
- const filePath = join46(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6566
+ const filePath = join47(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6404
6567
  const fileContent = await readFileContentOrNull(filePath) ?? '{"mcpServers":{}}';
6405
6568
  let json;
6406
6569
  try {
6407
6570
  json = JSON.parse(fileContent);
6408
6571
  } catch (error) {
6409
6572
  throw new Error(
6410
- `Failed to parse Cursor MCP config at ${join46(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
6573
+ `Failed to parse Cursor MCP config at ${join47(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
6411
6574
  { cause: error }
6412
6575
  );
6413
6576
  }
@@ -6429,7 +6592,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6429
6592
  }) {
6430
6593
  const paths = this.getSettablePaths({ global });
6431
6594
  const fileContent = await readOrInitializeFileContent(
6432
- join46(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6595
+ join47(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6433
6596
  JSON.stringify({ mcpServers: {} }, null, 2)
6434
6597
  );
6435
6598
  let json;
@@ -6437,7 +6600,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6437
6600
  json = JSON.parse(fileContent);
6438
6601
  } catch (error) {
6439
6602
  throw new Error(
6440
- `Failed to parse Cursor MCP config at ${join46(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
6603
+ `Failed to parse Cursor MCP config at ${join47(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
6441
6604
  { cause: error }
6442
6605
  );
6443
6606
  }
@@ -6461,12 +6624,8 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6461
6624
  ...this.json,
6462
6625
  mcpServers: transformedServers
6463
6626
  };
6464
- return new RulesyncMcp({
6465
- baseDir: this.baseDir,
6466
- relativeDirPath: this.relativeDirPath,
6467
- relativeFilePath: "rulesync.mcp.json",
6468
- fileContent: JSON.stringify(transformedJson),
6469
- validate: true
6627
+ return this.toRulesyncMcpDefault({
6628
+ fileContent: JSON.stringify(transformedJson, null, 2)
6470
6629
  });
6471
6630
  }
6472
6631
  validate() {
@@ -6490,7 +6649,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
6490
6649
  };
6491
6650
 
6492
6651
  // src/features/mcp/factorydroid-mcp.ts
6493
- import { join as join47 } from "path";
6652
+ import { join as join48 } from "path";
6494
6653
  var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
6495
6654
  json;
6496
6655
  constructor(params) {
@@ -6511,7 +6670,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
6511
6670
  validate = true
6512
6671
  }) {
6513
6672
  const fileContent = await readFileContent(
6514
- join47(
6673
+ join48(
6515
6674
  baseDir,
6516
6675
  this.getSettablePaths().relativeDirPath,
6517
6676
  this.getSettablePaths().relativeFilePath
@@ -6544,13 +6703,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
6544
6703
  });
6545
6704
  }
6546
6705
  toRulesyncMcp() {
6547
- return new RulesyncMcp({
6548
- baseDir: this.baseDir,
6549
- relativeDirPath: this.relativeDirPath,
6550
- relativeFilePath: "rulesync.mcp.json",
6551
- fileContent: JSON.stringify(this.json),
6552
- validate: true
6553
- });
6706
+ return this.toRulesyncMcpDefault();
6554
6707
  }
6555
6708
  validate() {
6556
6709
  return { success: true, error: null };
@@ -6571,7 +6724,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
6571
6724
  };
6572
6725
 
6573
6726
  // src/features/mcp/geminicli-mcp.ts
6574
- import { join as join48 } from "path";
6727
+ import { join as join49 } from "path";
6575
6728
  var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6576
6729
  json;
6577
6730
  constructor(params) {
@@ -6599,7 +6752,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6599
6752
  global = false
6600
6753
  }) {
6601
6754
  const paths = this.getSettablePaths({ global });
6602
- const fileContent = await readFileContentOrNull(join48(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6755
+ const fileContent = await readFileContentOrNull(join49(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6603
6756
  const json = JSON.parse(fileContent);
6604
6757
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
6605
6758
  return new _GeminiCliMcp({
@@ -6618,7 +6771,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6618
6771
  }) {
6619
6772
  const paths = this.getSettablePaths({ global });
6620
6773
  const fileContent = await readOrInitializeFileContent(
6621
- join48(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6774
+ join49(baseDir, paths.relativeDirPath, paths.relativeFilePath),
6622
6775
  JSON.stringify({ mcpServers: {} }, null, 2)
6623
6776
  );
6624
6777
  const json = JSON.parse(fileContent);
@@ -6663,7 +6816,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
6663
6816
  };
6664
6817
 
6665
6818
  // src/features/mcp/junie-mcp.ts
6666
- import { join as join49 } from "path";
6819
+ import { join as join50 } from "path";
6667
6820
  var JunieMcp = class _JunieMcp extends ToolMcp {
6668
6821
  json;
6669
6822
  constructor(params) {
@@ -6675,7 +6828,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6675
6828
  }
6676
6829
  static getSettablePaths() {
6677
6830
  return {
6678
- relativeDirPath: join49(".junie", "mcp"),
6831
+ relativeDirPath: join50(".junie", "mcp"),
6679
6832
  relativeFilePath: "mcp.json"
6680
6833
  };
6681
6834
  }
@@ -6684,7 +6837,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6684
6837
  validate = true
6685
6838
  }) {
6686
6839
  const fileContent = await readFileContent(
6687
- join49(
6840
+ join50(
6688
6841
  baseDir,
6689
6842
  this.getSettablePaths().relativeDirPath,
6690
6843
  this.getSettablePaths().relativeFilePath
@@ -6733,7 +6886,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
6733
6886
  };
6734
6887
 
6735
6888
  // src/features/mcp/kilo-mcp.ts
6736
- import { join as join50 } from "path";
6889
+ import { join as join51 } from "path";
6737
6890
  var KiloMcp = class _KiloMcp extends ToolMcp {
6738
6891
  json;
6739
6892
  constructor(params) {
@@ -6754,7 +6907,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
6754
6907
  validate = true
6755
6908
  }) {
6756
6909
  const paths = this.getSettablePaths();
6757
- const fileContent = await readFileContentOrNull(join50(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6910
+ const fileContent = await readFileContentOrNull(join51(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6758
6911
  return new _KiloMcp({
6759
6912
  baseDir,
6760
6913
  relativeDirPath: paths.relativeDirPath,
@@ -6802,7 +6955,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
6802
6955
  };
6803
6956
 
6804
6957
  // src/features/mcp/kiro-mcp.ts
6805
- import { join as join51 } from "path";
6958
+ import { join as join52 } from "path";
6806
6959
  var KiroMcp = class _KiroMcp extends ToolMcp {
6807
6960
  json;
6808
6961
  constructor(params) {
@@ -6814,7 +6967,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
6814
6967
  }
6815
6968
  static getSettablePaths() {
6816
6969
  return {
6817
- relativeDirPath: join51(".kiro", "settings"),
6970
+ relativeDirPath: join52(".kiro", "settings"),
6818
6971
  relativeFilePath: "mcp.json"
6819
6972
  };
6820
6973
  }
@@ -6823,7 +6976,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
6823
6976
  validate = true
6824
6977
  }) {
6825
6978
  const paths = this.getSettablePaths();
6826
- const fileContent = await readFileContentOrNull(join51(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6979
+ const fileContent = await readFileContentOrNull(join52(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
6827
6980
  return new _KiroMcp({
6828
6981
  baseDir,
6829
6982
  relativeDirPath: paths.relativeDirPath,
@@ -6871,30 +7024,30 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
6871
7024
  };
6872
7025
 
6873
7026
  // src/features/mcp/opencode-mcp.ts
6874
- import { join as join52 } from "path";
7027
+ import { join as join53 } from "path";
6875
7028
  import { parse as parseJsonc2 } from "jsonc-parser";
6876
- import { z as z21 } from "zod/mini";
6877
- var OpencodeMcpLocalServerSchema = z21.object({
6878
- type: z21.literal("local"),
6879
- command: z21.array(z21.string()),
6880
- environment: z21.optional(z21.record(z21.string(), z21.string())),
6881
- enabled: z21._default(z21.boolean(), true),
6882
- cwd: z21.optional(z21.string())
7029
+ import { z as z22 } from "zod/mini";
7030
+ var OpencodeMcpLocalServerSchema = z22.object({
7031
+ type: z22.literal("local"),
7032
+ command: z22.array(z22.string()),
7033
+ environment: z22.optional(z22.record(z22.string(), z22.string())),
7034
+ enabled: z22._default(z22.boolean(), true),
7035
+ cwd: z22.optional(z22.string())
6883
7036
  });
6884
- var OpencodeMcpRemoteServerSchema = z21.object({
6885
- type: z21.literal("remote"),
6886
- url: z21.string(),
6887
- headers: z21.optional(z21.record(z21.string(), z21.string())),
6888
- enabled: z21._default(z21.boolean(), true)
7037
+ var OpencodeMcpRemoteServerSchema = z22.object({
7038
+ type: z22.literal("remote"),
7039
+ url: z22.string(),
7040
+ headers: z22.optional(z22.record(z22.string(), z22.string())),
7041
+ enabled: z22._default(z22.boolean(), true)
6889
7042
  });
6890
- var OpencodeMcpServerSchema = z21.union([
7043
+ var OpencodeMcpServerSchema = z22.union([
6891
7044
  OpencodeMcpLocalServerSchema,
6892
7045
  OpencodeMcpRemoteServerSchema
6893
7046
  ]);
6894
- var OpencodeConfigSchema = z21.looseObject({
6895
- $schema: z21.optional(z21.string()),
6896
- mcp: z21.optional(z21.record(z21.string(), OpencodeMcpServerSchema)),
6897
- tools: z21.optional(z21.record(z21.string(), z21.boolean()))
7047
+ var OpencodeConfigSchema = z22.looseObject({
7048
+ $schema: z22.optional(z22.string()),
7049
+ mcp: z22.optional(z22.record(z22.string(), OpencodeMcpServerSchema)),
7050
+ tools: z22.optional(z22.record(z22.string(), z22.boolean()))
6898
7051
  });
6899
7052
  function convertFromOpencodeFormat(opencodeMcp, tools) {
6900
7053
  return Object.fromEntries(
@@ -7012,7 +7165,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
7012
7165
  static getSettablePaths({ global } = {}) {
7013
7166
  if (global) {
7014
7167
  return {
7015
- relativeDirPath: join52(".config", "opencode"),
7168
+ relativeDirPath: join53(".config", "opencode"),
7016
7169
  relativeFilePath: "opencode.json"
7017
7170
  };
7018
7171
  }
@@ -7027,11 +7180,11 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
7027
7180
  global = false
7028
7181
  }) {
7029
7182
  const basePaths = this.getSettablePaths({ global });
7030
- const jsonDir = join52(baseDir, basePaths.relativeDirPath);
7183
+ const jsonDir = join53(baseDir, basePaths.relativeDirPath);
7031
7184
  let fileContent = null;
7032
7185
  let relativeFilePath = "opencode.jsonc";
7033
- const jsoncPath = join52(jsonDir, "opencode.jsonc");
7034
- const jsonPath = join52(jsonDir, "opencode.json");
7186
+ const jsoncPath = join53(jsonDir, "opencode.jsonc");
7187
+ const jsonPath = join53(jsonDir, "opencode.json");
7035
7188
  fileContent = await readFileContentOrNull(jsoncPath);
7036
7189
  if (!fileContent) {
7037
7190
  fileContent = await readFileContentOrNull(jsonPath);
@@ -7057,11 +7210,11 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
7057
7210
  global = false
7058
7211
  }) {
7059
7212
  const basePaths = this.getSettablePaths({ global });
7060
- const jsonDir = join52(baseDir, basePaths.relativeDirPath);
7213
+ const jsonDir = join53(baseDir, basePaths.relativeDirPath);
7061
7214
  let fileContent = null;
7062
7215
  let relativeFilePath = "opencode.jsonc";
7063
- const jsoncPath = join52(jsonDir, "opencode.jsonc");
7064
- const jsonPath = join52(jsonDir, "opencode.json");
7216
+ const jsoncPath = join53(jsonDir, "opencode.jsonc");
7217
+ const jsonPath = join53(jsonDir, "opencode.json");
7065
7218
  fileContent = await readFileContentOrNull(jsoncPath);
7066
7219
  if (!fileContent) {
7067
7220
  fileContent = await readFileContentOrNull(jsonPath);
@@ -7122,7 +7275,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
7122
7275
  };
7123
7276
 
7124
7277
  // src/features/mcp/roo-mcp.ts
7125
- import { join as join53 } from "path";
7278
+ import { join as join54 } from "path";
7126
7279
  function isRooMcpServers(value) {
7127
7280
  return value !== void 0 && value !== null && typeof value === "object";
7128
7281
  }
@@ -7174,7 +7327,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
7174
7327
  validate = true
7175
7328
  }) {
7176
7329
  const fileContent = await readFileContent(
7177
- join53(
7330
+ join54(
7178
7331
  baseDir,
7179
7332
  this.getSettablePaths().relativeDirPath,
7180
7333
  this.getSettablePaths().relativeFilePath
@@ -7245,7 +7398,7 @@ var mcpProcessorToolTargetTuple = [
7245
7398
  "opencode",
7246
7399
  "roo"
7247
7400
  ];
7248
- var McpProcessorToolTargetSchema = z22.enum(mcpProcessorToolTargetTuple);
7401
+ var McpProcessorToolTargetSchema = z23.enum(mcpProcessorToolTargetTuple);
7249
7402
  var toolMcpFactories = /* @__PURE__ */ new Map([
7250
7403
  [
7251
7404
  "claudecode",
@@ -7547,25 +7700,25 @@ var McpProcessor = class extends FeatureProcessor {
7547
7700
  };
7548
7701
 
7549
7702
  // src/features/rules/rules-processor.ts
7550
- import { basename as basename10, dirname as dirname3, join as join115, relative as relative5 } from "path";
7703
+ import { basename as basename10, dirname as dirname3, join as join116, relative as relative5 } from "path";
7551
7704
  import { encode } from "@toon-format/toon";
7552
- import { z as z56 } from "zod/mini";
7705
+ import { z as z57 } from "zod/mini";
7553
7706
 
7554
7707
  // src/constants/general.ts
7555
7708
  var SKILL_FILE_NAME = "SKILL.md";
7556
7709
 
7557
7710
  // src/features/skills/agentsmd-skill.ts
7558
- import { join as join57 } from "path";
7711
+ import { join as join58 } from "path";
7559
7712
 
7560
7713
  // src/features/skills/simulated-skill.ts
7561
- import { join as join56 } from "path";
7562
- import { z as z23 } from "zod/mini";
7714
+ import { join as join57 } from "path";
7715
+ import { z as z24 } from "zod/mini";
7563
7716
 
7564
7717
  // src/features/skills/tool-skill.ts
7565
- import { join as join55 } from "path";
7718
+ import { join as join56 } from "path";
7566
7719
 
7567
7720
  // src/types/ai-dir.ts
7568
- import path2, { basename as basename3, join as join54, relative as relative4, resolve as resolve4 } from "path";
7721
+ import path2, { basename as basename3, join as join55, relative as relative4, resolve as resolve4 } from "path";
7569
7722
  var AiDir = class {
7570
7723
  /**
7571
7724
  * @example "."
@@ -7659,8 +7812,8 @@ var AiDir = class {
7659
7812
  * @returns Array of files with their relative paths and buffers
7660
7813
  */
7661
7814
  static async collectOtherFiles(baseDir, relativeDirPath, dirName, excludeFileName) {
7662
- const dirPath = join54(baseDir, relativeDirPath, dirName);
7663
- const glob = join54(dirPath, "**", "*");
7815
+ const dirPath = join55(baseDir, relativeDirPath, dirName);
7816
+ const glob = join55(dirPath, "**", "*");
7664
7817
  const filePaths = await findFilesByGlobs(glob, { type: "file" });
7665
7818
  const filteredPaths = filePaths.filter((filePath) => basename3(filePath) !== excludeFileName);
7666
7819
  const files = await Promise.all(
@@ -7758,8 +7911,8 @@ var ToolSkill = class extends AiDir {
7758
7911
  }) {
7759
7912
  const settablePaths = getSettablePaths({ global });
7760
7913
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
7761
- const skillDirPath = join55(baseDir, actualRelativeDirPath, dirName);
7762
- const skillFilePath = join55(skillDirPath, SKILL_FILE_NAME);
7914
+ const skillDirPath = join56(baseDir, actualRelativeDirPath, dirName);
7915
+ const skillFilePath = join56(skillDirPath, SKILL_FILE_NAME);
7763
7916
  if (!await fileExists(skillFilePath)) {
7764
7917
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
7765
7918
  }
@@ -7783,16 +7936,16 @@ var ToolSkill = class extends AiDir {
7783
7936
  }
7784
7937
  requireMainFileFrontmatter() {
7785
7938
  if (!this.mainFile?.frontmatter) {
7786
- throw new Error(`Frontmatter is not defined in ${join55(this.relativeDirPath, this.dirName)}`);
7939
+ throw new Error(`Frontmatter is not defined in ${join56(this.relativeDirPath, this.dirName)}`);
7787
7940
  }
7788
7941
  return this.mainFile.frontmatter;
7789
7942
  }
7790
7943
  };
7791
7944
 
7792
7945
  // src/features/skills/simulated-skill.ts
7793
- var SimulatedSkillFrontmatterSchema = z23.looseObject({
7794
- name: z23.string(),
7795
- description: z23.string()
7946
+ var SimulatedSkillFrontmatterSchema = z24.looseObject({
7947
+ name: z24.string(),
7948
+ description: z24.string()
7796
7949
  });
7797
7950
  var SimulatedSkill = class extends ToolSkill {
7798
7951
  frontmatter;
@@ -7823,7 +7976,7 @@ var SimulatedSkill = class extends ToolSkill {
7823
7976
  const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
7824
7977
  if (!result.success) {
7825
7978
  throw new Error(
7826
- `Invalid frontmatter in ${join56(relativeDirPath, dirName)}: ${formatError(result.error)}`
7979
+ `Invalid frontmatter in ${join57(relativeDirPath, dirName)}: ${formatError(result.error)}`
7827
7980
  );
7828
7981
  }
7829
7982
  }
@@ -7882,8 +8035,8 @@ var SimulatedSkill = class extends ToolSkill {
7882
8035
  }) {
7883
8036
  const settablePaths = this.getSettablePaths();
7884
8037
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
7885
- const skillDirPath = join56(baseDir, actualRelativeDirPath, dirName);
7886
- const skillFilePath = join56(skillDirPath, SKILL_FILE_NAME);
8038
+ const skillDirPath = join57(baseDir, actualRelativeDirPath, dirName);
8039
+ const skillFilePath = join57(skillDirPath, SKILL_FILE_NAME);
7887
8040
  if (!await fileExists(skillFilePath)) {
7888
8041
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
7889
8042
  }
@@ -7960,7 +8113,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
7960
8113
  throw new Error("AgentsmdSkill does not support global mode.");
7961
8114
  }
7962
8115
  return {
7963
- relativeDirPath: join57(".agents", "skills")
8116
+ relativeDirPath: join58(".agents", "skills")
7964
8117
  };
7965
8118
  }
7966
8119
  static async fromDir(params) {
@@ -7987,11 +8140,11 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
7987
8140
  };
7988
8141
 
7989
8142
  // src/features/skills/factorydroid-skill.ts
7990
- import { join as join58 } from "path";
8143
+ import { join as join59 } from "path";
7991
8144
  var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
7992
8145
  static getSettablePaths(_options) {
7993
8146
  return {
7994
- relativeDirPath: join58(".factory", "skills")
8147
+ relativeDirPath: join59(".factory", "skills")
7995
8148
  };
7996
8149
  }
7997
8150
  static async fromDir(params) {
@@ -8018,11 +8171,11 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
8018
8171
  };
8019
8172
 
8020
8173
  // src/features/skills/skills-processor.ts
8021
- import { basename as basename5, join as join76 } from "path";
8022
- import { z as z39 } from "zod/mini";
8174
+ import { basename as basename5, join as join77 } from "path";
8175
+ import { z as z40 } from "zod/mini";
8023
8176
 
8024
8177
  // src/types/dir-feature-processor.ts
8025
- import { join as join59 } from "path";
8178
+ import { join as join60 } from "path";
8026
8179
  var DirFeatureProcessor = class {
8027
8180
  baseDir;
8028
8181
  dryRun;
@@ -8059,7 +8212,7 @@ var DirFeatureProcessor = class {
8059
8212
  const mainFile = aiDir.getMainFile();
8060
8213
  let mainFileContent;
8061
8214
  if (mainFile) {
8062
- const mainFilePath = join59(dirPath, mainFile.name);
8215
+ const mainFilePath = join60(dirPath, mainFile.name);
8063
8216
  const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter, {
8064
8217
  avoidBlockScalars: this.avoidBlockScalars
8065
8218
  });
@@ -8075,7 +8228,7 @@ var DirFeatureProcessor = class {
8075
8228
  const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
8076
8229
  otherFileContents.push(contentWithNewline);
8077
8230
  if (!dirHasChanges) {
8078
- const filePath = join59(dirPath, file.relativeFilePathToDirPath);
8231
+ const filePath = join60(dirPath, file.relativeFilePathToDirPath);
8079
8232
  const existingContent = await readFileContentOrNull(filePath);
8080
8233
  if (existingContent !== contentWithNewline) {
8081
8234
  dirHasChanges = true;
@@ -8089,22 +8242,22 @@ var DirFeatureProcessor = class {
8089
8242
  if (this.dryRun) {
8090
8243
  logger.info(`[DRY RUN] Would create directory: ${dirPath}`);
8091
8244
  if (mainFile) {
8092
- logger.info(`[DRY RUN] Would write: ${join59(dirPath, mainFile.name)}`);
8093
- changedPaths.push(join59(relativeDir, mainFile.name));
8245
+ logger.info(`[DRY RUN] Would write: ${join60(dirPath, mainFile.name)}`);
8246
+ changedPaths.push(join60(relativeDir, mainFile.name));
8094
8247
  }
8095
8248
  for (const file of otherFiles) {
8096
- logger.info(`[DRY RUN] Would write: ${join59(dirPath, file.relativeFilePathToDirPath)}`);
8097
- changedPaths.push(join59(relativeDir, file.relativeFilePathToDirPath));
8249
+ logger.info(`[DRY RUN] Would write: ${join60(dirPath, file.relativeFilePathToDirPath)}`);
8250
+ changedPaths.push(join60(relativeDir, file.relativeFilePathToDirPath));
8098
8251
  }
8099
8252
  } else {
8100
8253
  await ensureDir(dirPath);
8101
8254
  if (mainFile && mainFileContent) {
8102
- const mainFilePath = join59(dirPath, mainFile.name);
8255
+ const mainFilePath = join60(dirPath, mainFile.name);
8103
8256
  await writeFileContent(mainFilePath, mainFileContent);
8104
- changedPaths.push(join59(relativeDir, mainFile.name));
8257
+ changedPaths.push(join60(relativeDir, mainFile.name));
8105
8258
  }
8106
8259
  for (const [i, file] of otherFiles.entries()) {
8107
- const filePath = join59(dirPath, file.relativeFilePathToDirPath);
8260
+ const filePath = join60(dirPath, file.relativeFilePathToDirPath);
8108
8261
  const content = otherFileContents[i];
8109
8262
  if (content === void 0) {
8110
8263
  throw new Error(
@@ -8112,7 +8265,7 @@ var DirFeatureProcessor = class {
8112
8265
  );
8113
8266
  }
8114
8267
  await writeFileContent(filePath, content);
8115
- changedPaths.push(join59(relativeDir, file.relativeFilePathToDirPath));
8268
+ changedPaths.push(join60(relativeDir, file.relativeFilePathToDirPath));
8116
8269
  }
8117
8270
  }
8118
8271
  changedCount++;
@@ -8144,40 +8297,40 @@ var DirFeatureProcessor = class {
8144
8297
  };
8145
8298
 
8146
8299
  // src/features/skills/agentsskills-skill.ts
8147
- import { join as join61 } from "path";
8148
- import { z as z25 } from "zod/mini";
8300
+ import { join as join62 } from "path";
8301
+ import { z as z26 } from "zod/mini";
8149
8302
 
8150
8303
  // src/features/skills/rulesync-skill.ts
8151
- import { join as join60 } from "path";
8152
- import { z as z24 } from "zod/mini";
8153
- var RulesyncSkillFrontmatterSchemaInternal = z24.looseObject({
8154
- name: z24.string(),
8155
- description: z24.string(),
8156
- targets: z24._default(RulesyncTargetsSchema, ["*"]),
8157
- claudecode: z24.optional(
8158
- z24.looseObject({
8159
- "allowed-tools": z24.optional(z24.array(z24.string())),
8160
- model: z24.optional(z24.string()),
8161
- "disable-model-invocation": z24.optional(z24.boolean())
8304
+ import { join as join61 } from "path";
8305
+ import { z as z25 } from "zod/mini";
8306
+ var RulesyncSkillFrontmatterSchemaInternal = z25.looseObject({
8307
+ name: z25.string(),
8308
+ description: z25.string(),
8309
+ targets: z25._default(RulesyncTargetsSchema, ["*"]),
8310
+ claudecode: z25.optional(
8311
+ z25.looseObject({
8312
+ "allowed-tools": z25.optional(z25.array(z25.string())),
8313
+ model: z25.optional(z25.string()),
8314
+ "disable-model-invocation": z25.optional(z25.boolean())
8162
8315
  })
8163
8316
  ),
8164
- codexcli: z24.optional(
8165
- z24.looseObject({
8166
- "short-description": z24.optional(z24.string())
8317
+ codexcli: z25.optional(
8318
+ z25.looseObject({
8319
+ "short-description": z25.optional(z25.string())
8167
8320
  })
8168
8321
  ),
8169
- opencode: z24.optional(
8170
- z24.looseObject({
8171
- "allowed-tools": z24.optional(z24.array(z24.string()))
8322
+ opencode: z25.optional(
8323
+ z25.looseObject({
8324
+ "allowed-tools": z25.optional(z25.array(z25.string()))
8172
8325
  })
8173
8326
  ),
8174
- copilot: z24.optional(
8175
- z24.looseObject({
8176
- license: z24.optional(z24.string())
8327
+ copilot: z25.optional(
8328
+ z25.looseObject({
8329
+ license: z25.optional(z25.string())
8177
8330
  })
8178
8331
  ),
8179
- cline: z24.optional(z24.looseObject({})),
8180
- roo: z24.optional(z24.looseObject({}))
8332
+ cline: z25.optional(z25.looseObject({})),
8333
+ roo: z25.optional(z25.looseObject({}))
8181
8334
  });
8182
8335
  var RulesyncSkillFrontmatterSchema = RulesyncSkillFrontmatterSchemaInternal;
8183
8336
  var RulesyncSkill = class _RulesyncSkill extends AiDir {
@@ -8217,7 +8370,7 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
8217
8370
  }
8218
8371
  getFrontmatter() {
8219
8372
  if (!this.mainFile?.frontmatter) {
8220
- throw new Error(`Frontmatter is not defined in ${join60(this.relativeDirPath, this.dirName)}`);
8373
+ throw new Error(`Frontmatter is not defined in ${join61(this.relativeDirPath, this.dirName)}`);
8221
8374
  }
8222
8375
  const result = RulesyncSkillFrontmatterSchema.parse(this.mainFile.frontmatter);
8223
8376
  return result;
@@ -8243,8 +8396,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
8243
8396
  dirName,
8244
8397
  global = false
8245
8398
  }) {
8246
- const skillDirPath = join60(baseDir, relativeDirPath, dirName);
8247
- const skillFilePath = join60(skillDirPath, SKILL_FILE_NAME);
8399
+ const skillDirPath = join61(baseDir, relativeDirPath, dirName);
8400
+ const skillFilePath = join61(skillDirPath, SKILL_FILE_NAME);
8248
8401
  if (!await fileExists(skillFilePath)) {
8249
8402
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
8250
8403
  }
@@ -8274,14 +8427,14 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
8274
8427
  };
8275
8428
 
8276
8429
  // src/features/skills/agentsskills-skill.ts
8277
- var AgentsSkillsSkillFrontmatterSchema = z25.looseObject({
8278
- name: z25.string(),
8279
- description: z25.string()
8430
+ var AgentsSkillsSkillFrontmatterSchema = z26.looseObject({
8431
+ name: z26.string(),
8432
+ description: z26.string()
8280
8433
  });
8281
8434
  var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
8282
8435
  constructor({
8283
8436
  baseDir = process.cwd(),
8284
- relativeDirPath = join61(".agents", "skills"),
8437
+ relativeDirPath = join62(".agents", "skills"),
8285
8438
  dirName,
8286
8439
  frontmatter,
8287
8440
  body,
@@ -8313,7 +8466,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
8313
8466
  throw new Error("AgentsSkillsSkill does not support global mode.");
8314
8467
  }
8315
8468
  return {
8316
- relativeDirPath: join61(".agents", "skills")
8469
+ relativeDirPath: join62(".agents", "skills")
8317
8470
  };
8318
8471
  }
8319
8472
  getFrontmatter() {
@@ -8393,9 +8546,9 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
8393
8546
  });
8394
8547
  const result = AgentsSkillsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8395
8548
  if (!result.success) {
8396
- const skillDirPath = join61(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8549
+ const skillDirPath = join62(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8397
8550
  throw new Error(
8398
- `Invalid frontmatter in ${join61(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8551
+ `Invalid frontmatter in ${join62(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8399
8552
  );
8400
8553
  }
8401
8554
  return new _AgentsSkillsSkill({
@@ -8430,16 +8583,16 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
8430
8583
  };
8431
8584
 
8432
8585
  // src/features/skills/antigravity-skill.ts
8433
- import { join as join62 } from "path";
8434
- import { z as z26 } from "zod/mini";
8435
- var AntigravitySkillFrontmatterSchema = z26.looseObject({
8436
- name: z26.string(),
8437
- description: z26.string()
8586
+ import { join as join63 } from "path";
8587
+ import { z as z27 } from "zod/mini";
8588
+ var AntigravitySkillFrontmatterSchema = z27.looseObject({
8589
+ name: z27.string(),
8590
+ description: z27.string()
8438
8591
  });
8439
8592
  var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8440
8593
  constructor({
8441
8594
  baseDir = process.cwd(),
8442
- relativeDirPath = join62(".agent", "skills"),
8595
+ relativeDirPath = join63(".agent", "skills"),
8443
8596
  dirName,
8444
8597
  frontmatter,
8445
8598
  body,
@@ -8471,11 +8624,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8471
8624
  } = {}) {
8472
8625
  if (global) {
8473
8626
  return {
8474
- relativeDirPath: join62(".gemini", "antigravity", "skills")
8627
+ relativeDirPath: join63(".gemini", "antigravity", "skills")
8475
8628
  };
8476
8629
  }
8477
8630
  return {
8478
- relativeDirPath: join62(".agent", "skills")
8631
+ relativeDirPath: join63(".agent", "skills")
8479
8632
  };
8480
8633
  }
8481
8634
  getFrontmatter() {
@@ -8555,9 +8708,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8555
8708
  });
8556
8709
  const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
8557
8710
  if (!result.success) {
8558
- const skillDirPath = join62(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8711
+ const skillDirPath = join63(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8559
8712
  throw new Error(
8560
- `Invalid frontmatter in ${join62(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8713
+ `Invalid frontmatter in ${join63(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8561
8714
  );
8562
8715
  }
8563
8716
  return new _AntigravitySkill({
@@ -8591,19 +8744,19 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
8591
8744
  };
8592
8745
 
8593
8746
  // src/features/skills/claudecode-skill.ts
8594
- import { join as join63 } from "path";
8595
- import { z as z27 } from "zod/mini";
8596
- var ClaudecodeSkillFrontmatterSchema = z27.looseObject({
8597
- name: z27.string(),
8598
- description: z27.string(),
8599
- "allowed-tools": z27.optional(z27.array(z27.string())),
8600
- model: z27.optional(z27.string()),
8601
- "disable-model-invocation": z27.optional(z27.boolean())
8747
+ import { join as join64 } from "path";
8748
+ import { z as z28 } from "zod/mini";
8749
+ var ClaudecodeSkillFrontmatterSchema = z28.looseObject({
8750
+ name: z28.string(),
8751
+ description: z28.string(),
8752
+ "allowed-tools": z28.optional(z28.array(z28.string())),
8753
+ model: z28.optional(z28.string()),
8754
+ "disable-model-invocation": z28.optional(z28.boolean())
8602
8755
  });
8603
8756
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8604
8757
  constructor({
8605
8758
  baseDir = process.cwd(),
8606
- relativeDirPath = join63(".claude", "skills"),
8759
+ relativeDirPath = join64(".claude", "skills"),
8607
8760
  dirName,
8608
8761
  frontmatter,
8609
8762
  body,
@@ -8634,7 +8787,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8634
8787
  global: _global = false
8635
8788
  } = {}) {
8636
8789
  return {
8637
- relativeDirPath: join63(".claude", "skills")
8790
+ relativeDirPath: join64(".claude", "skills")
8638
8791
  };
8639
8792
  }
8640
8793
  getFrontmatter() {
@@ -8731,9 +8884,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8731
8884
  });
8732
8885
  const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8733
8886
  if (!result.success) {
8734
- const skillDirPath = join63(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8887
+ const skillDirPath = join64(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8735
8888
  throw new Error(
8736
- `Invalid frontmatter in ${join63(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8889
+ `Invalid frontmatter in ${join64(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8737
8890
  );
8738
8891
  }
8739
8892
  return new _ClaudecodeSkill({
@@ -8767,16 +8920,16 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
8767
8920
  };
8768
8921
 
8769
8922
  // src/features/skills/cline-skill.ts
8770
- import { join as join64 } from "path";
8771
- import { z as z28 } from "zod/mini";
8772
- var ClineSkillFrontmatterSchema = z28.looseObject({
8773
- name: z28.string(),
8774
- description: z28.string()
8923
+ import { join as join65 } from "path";
8924
+ import { z as z29 } from "zod/mini";
8925
+ var ClineSkillFrontmatterSchema = z29.looseObject({
8926
+ name: z29.string(),
8927
+ description: z29.string()
8775
8928
  });
8776
8929
  var ClineSkill = class _ClineSkill extends ToolSkill {
8777
8930
  constructor({
8778
8931
  baseDir = process.cwd(),
8779
- relativeDirPath = join64(".cline", "skills"),
8932
+ relativeDirPath = join65(".cline", "skills"),
8780
8933
  dirName,
8781
8934
  frontmatter,
8782
8935
  body,
@@ -8805,7 +8958,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
8805
8958
  }
8806
8959
  static getSettablePaths(_options = {}) {
8807
8960
  return {
8808
- relativeDirPath: join64(".cline", "skills")
8961
+ relativeDirPath: join65(".cline", "skills")
8809
8962
  };
8810
8963
  }
8811
8964
  getFrontmatter() {
@@ -8893,13 +9046,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
8893
9046
  });
8894
9047
  const result = ClineSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8895
9048
  if (!result.success) {
8896
- const skillDirPath = join64(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9049
+ const skillDirPath = join65(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8897
9050
  throw new Error(
8898
- `Invalid frontmatter in ${join64(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9051
+ `Invalid frontmatter in ${join65(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8899
9052
  );
8900
9053
  }
8901
9054
  if (result.data.name !== loaded.dirName) {
8902
- const skillFilePath = join64(
9055
+ const skillFilePath = join65(
8903
9056
  loaded.baseDir,
8904
9057
  loaded.relativeDirPath,
8905
9058
  loaded.dirName,
@@ -8940,21 +9093,21 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
8940
9093
  };
8941
9094
 
8942
9095
  // src/features/skills/codexcli-skill.ts
8943
- import { join as join65 } from "path";
8944
- import { z as z29 } from "zod/mini";
8945
- var CodexCliSkillFrontmatterSchema = z29.looseObject({
8946
- name: z29.string(),
8947
- description: z29.string(),
8948
- metadata: z29.optional(
8949
- z29.looseObject({
8950
- "short-description": z29.optional(z29.string())
9096
+ import { join as join66 } from "path";
9097
+ import { z as z30 } from "zod/mini";
9098
+ var CodexCliSkillFrontmatterSchema = z30.looseObject({
9099
+ name: z30.string(),
9100
+ description: z30.string(),
9101
+ metadata: z30.optional(
9102
+ z30.looseObject({
9103
+ "short-description": z30.optional(z30.string())
8951
9104
  })
8952
9105
  )
8953
9106
  });
8954
9107
  var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8955
9108
  constructor({
8956
9109
  baseDir = process.cwd(),
8957
- relativeDirPath = join65(".codex", "skills"),
9110
+ relativeDirPath = join66(".codex", "skills"),
8958
9111
  dirName,
8959
9112
  frontmatter,
8960
9113
  body,
@@ -8985,7 +9138,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
8985
9138
  global: _global = false
8986
9139
  } = {}) {
8987
9140
  return {
8988
- relativeDirPath: join65(".codex", "skills")
9141
+ relativeDirPath: join66(".codex", "skills")
8989
9142
  };
8990
9143
  }
8991
9144
  getFrontmatter() {
@@ -9075,9 +9228,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
9075
9228
  });
9076
9229
  const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9077
9230
  if (!result.success) {
9078
- const skillDirPath = join65(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9231
+ const skillDirPath = join66(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9079
9232
  throw new Error(
9080
- `Invalid frontmatter in ${join65(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9233
+ `Invalid frontmatter in ${join66(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9081
9234
  );
9082
9235
  }
9083
9236
  return new _CodexCliSkill({
@@ -9111,17 +9264,17 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
9111
9264
  };
9112
9265
 
9113
9266
  // src/features/skills/copilot-skill.ts
9114
- import { join as join66 } from "path";
9115
- import { z as z30 } from "zod/mini";
9116
- var CopilotSkillFrontmatterSchema = z30.looseObject({
9117
- name: z30.string(),
9118
- description: z30.string(),
9119
- license: z30.optional(z30.string())
9267
+ import { join as join67 } from "path";
9268
+ import { z as z31 } from "zod/mini";
9269
+ var CopilotSkillFrontmatterSchema = z31.looseObject({
9270
+ name: z31.string(),
9271
+ description: z31.string(),
9272
+ license: z31.optional(z31.string())
9120
9273
  });
9121
9274
  var CopilotSkill = class _CopilotSkill extends ToolSkill {
9122
9275
  constructor({
9123
9276
  baseDir = process.cwd(),
9124
- relativeDirPath = join66(".github", "skills"),
9277
+ relativeDirPath = join67(".github", "skills"),
9125
9278
  dirName,
9126
9279
  frontmatter,
9127
9280
  body,
@@ -9153,7 +9306,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
9153
9306
  throw new Error("CopilotSkill does not support global mode.");
9154
9307
  }
9155
9308
  return {
9156
- relativeDirPath: join66(".github", "skills")
9309
+ relativeDirPath: join67(".github", "skills")
9157
9310
  };
9158
9311
  }
9159
9312
  getFrontmatter() {
@@ -9239,9 +9392,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
9239
9392
  });
9240
9393
  const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9241
9394
  if (!result.success) {
9242
- const skillDirPath = join66(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9395
+ const skillDirPath = join67(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9243
9396
  throw new Error(
9244
- `Invalid frontmatter in ${join66(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9397
+ `Invalid frontmatter in ${join67(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9245
9398
  );
9246
9399
  }
9247
9400
  return new _CopilotSkill({
@@ -9276,16 +9429,16 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
9276
9429
  };
9277
9430
 
9278
9431
  // src/features/skills/cursor-skill.ts
9279
- import { join as join67 } from "path";
9280
- import { z as z31 } from "zod/mini";
9281
- var CursorSkillFrontmatterSchema = z31.looseObject({
9282
- name: z31.string(),
9283
- description: z31.string()
9432
+ import { join as join68 } from "path";
9433
+ import { z as z32 } from "zod/mini";
9434
+ var CursorSkillFrontmatterSchema = z32.looseObject({
9435
+ name: z32.string(),
9436
+ description: z32.string()
9284
9437
  });
9285
9438
  var CursorSkill = class _CursorSkill extends ToolSkill {
9286
9439
  constructor({
9287
9440
  baseDir = process.cwd(),
9288
- relativeDirPath = join67(".cursor", "skills"),
9441
+ relativeDirPath = join68(".cursor", "skills"),
9289
9442
  dirName,
9290
9443
  frontmatter,
9291
9444
  body,
@@ -9314,7 +9467,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
9314
9467
  }
9315
9468
  static getSettablePaths(_options) {
9316
9469
  return {
9317
- relativeDirPath: join67(".cursor", "skills")
9470
+ relativeDirPath: join68(".cursor", "skills")
9318
9471
  };
9319
9472
  }
9320
9473
  getFrontmatter() {
@@ -9394,9 +9547,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
9394
9547
  });
9395
9548
  const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9396
9549
  if (!result.success) {
9397
- const skillDirPath = join67(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9550
+ const skillDirPath = join68(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9398
9551
  throw new Error(
9399
- `Invalid frontmatter in ${join67(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9552
+ `Invalid frontmatter in ${join68(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9400
9553
  );
9401
9554
  }
9402
9555
  return new _CursorSkill({
@@ -9431,11 +9584,11 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
9431
9584
  };
9432
9585
 
9433
9586
  // src/features/skills/geminicli-skill.ts
9434
- import { join as join68 } from "path";
9435
- import { z as z32 } from "zod/mini";
9436
- var GeminiCliSkillFrontmatterSchema = z32.looseObject({
9437
- name: z32.string(),
9438
- description: z32.string()
9587
+ import { join as join69 } from "path";
9588
+ import { z as z33 } from "zod/mini";
9589
+ var GeminiCliSkillFrontmatterSchema = z33.looseObject({
9590
+ name: z33.string(),
9591
+ description: z33.string()
9439
9592
  });
9440
9593
  var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9441
9594
  constructor({
@@ -9471,7 +9624,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9471
9624
  global: _global = false
9472
9625
  } = {}) {
9473
9626
  return {
9474
- relativeDirPath: join68(".gemini", "skills")
9627
+ relativeDirPath: join69(".gemini", "skills")
9475
9628
  };
9476
9629
  }
9477
9630
  getFrontmatter() {
@@ -9551,9 +9704,9 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9551
9704
  });
9552
9705
  const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9553
9706
  if (!result.success) {
9554
- const skillDirPath = join68(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9707
+ const skillDirPath = join69(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9555
9708
  throw new Error(
9556
- `Invalid frontmatter in ${join68(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9709
+ `Invalid frontmatter in ${join69(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9557
9710
  );
9558
9711
  }
9559
9712
  return new _GeminiCliSkill({
@@ -9588,16 +9741,16 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
9588
9741
  };
9589
9742
 
9590
9743
  // src/features/skills/junie-skill.ts
9591
- import { join as join69 } from "path";
9592
- import { z as z33 } from "zod/mini";
9593
- var JunieSkillFrontmatterSchema = z33.looseObject({
9594
- name: z33.string(),
9595
- description: z33.string()
9744
+ import { join as join70 } from "path";
9745
+ import { z as z34 } from "zod/mini";
9746
+ var JunieSkillFrontmatterSchema = z34.looseObject({
9747
+ name: z34.string(),
9748
+ description: z34.string()
9596
9749
  });
9597
9750
  var JunieSkill = class _JunieSkill extends ToolSkill {
9598
9751
  constructor({
9599
9752
  baseDir = process.cwd(),
9600
- relativeDirPath = join69(".junie", "skills"),
9753
+ relativeDirPath = join70(".junie", "skills"),
9601
9754
  dirName,
9602
9755
  frontmatter,
9603
9756
  body,
@@ -9629,7 +9782,7 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
9629
9782
  throw new Error("JunieSkill does not support global mode.");
9630
9783
  }
9631
9784
  return {
9632
- relativeDirPath: join69(".junie", "skills")
9785
+ relativeDirPath: join70(".junie", "skills")
9633
9786
  };
9634
9787
  }
9635
9788
  getFrontmatter() {
@@ -9716,13 +9869,13 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
9716
9869
  });
9717
9870
  const result = JunieSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9718
9871
  if (!result.success) {
9719
- const skillDirPath = join69(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9872
+ const skillDirPath = join70(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9720
9873
  throw new Error(
9721
- `Invalid frontmatter in ${join69(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9874
+ `Invalid frontmatter in ${join70(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9722
9875
  );
9723
9876
  }
9724
9877
  if (result.data.name !== loaded.dirName) {
9725
- const skillFilePath = join69(
9878
+ const skillFilePath = join70(
9726
9879
  loaded.baseDir,
9727
9880
  loaded.relativeDirPath,
9728
9881
  loaded.dirName,
@@ -9764,16 +9917,16 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
9764
9917
  };
9765
9918
 
9766
9919
  // src/features/skills/kilo-skill.ts
9767
- import { join as join70 } from "path";
9768
- import { z as z34 } from "zod/mini";
9769
- var KiloSkillFrontmatterSchema = z34.looseObject({
9770
- name: z34.string(),
9771
- description: z34.string()
9920
+ import { join as join71 } from "path";
9921
+ import { z as z35 } from "zod/mini";
9922
+ var KiloSkillFrontmatterSchema = z35.looseObject({
9923
+ name: z35.string(),
9924
+ description: z35.string()
9772
9925
  });
9773
9926
  var KiloSkill = class _KiloSkill extends ToolSkill {
9774
9927
  constructor({
9775
9928
  baseDir = process.cwd(),
9776
- relativeDirPath = join70(".kilocode", "skills"),
9929
+ relativeDirPath = join71(".kilocode", "skills"),
9777
9930
  dirName,
9778
9931
  frontmatter,
9779
9932
  body,
@@ -9804,7 +9957,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
9804
9957
  global: _global = false
9805
9958
  } = {}) {
9806
9959
  return {
9807
- relativeDirPath: join70(".kilocode", "skills")
9960
+ relativeDirPath: join71(".kilocode", "skills")
9808
9961
  };
9809
9962
  }
9810
9963
  getFrontmatter() {
@@ -9892,13 +10045,13 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
9892
10045
  });
9893
10046
  const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
9894
10047
  if (!result.success) {
9895
- const skillDirPath = join70(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10048
+ const skillDirPath = join71(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
9896
10049
  throw new Error(
9897
- `Invalid frontmatter in ${join70(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10050
+ `Invalid frontmatter in ${join71(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
9898
10051
  );
9899
10052
  }
9900
10053
  if (result.data.name !== loaded.dirName) {
9901
- const skillFilePath = join70(
10054
+ const skillFilePath = join71(
9902
10055
  loaded.baseDir,
9903
10056
  loaded.relativeDirPath,
9904
10057
  loaded.dirName,
@@ -9939,16 +10092,16 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
9939
10092
  };
9940
10093
 
9941
10094
  // src/features/skills/kiro-skill.ts
9942
- import { join as join71 } from "path";
9943
- import { z as z35 } from "zod/mini";
9944
- var KiroSkillFrontmatterSchema = z35.looseObject({
9945
- name: z35.string(),
9946
- description: z35.string()
10095
+ import { join as join72 } from "path";
10096
+ import { z as z36 } from "zod/mini";
10097
+ var KiroSkillFrontmatterSchema = z36.looseObject({
10098
+ name: z36.string(),
10099
+ description: z36.string()
9947
10100
  });
9948
10101
  var KiroSkill = class _KiroSkill extends ToolSkill {
9949
10102
  constructor({
9950
10103
  baseDir = process.cwd(),
9951
- relativeDirPath = join71(".kiro", "skills"),
10104
+ relativeDirPath = join72(".kiro", "skills"),
9952
10105
  dirName,
9953
10106
  frontmatter,
9954
10107
  body,
@@ -9980,7 +10133,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
9980
10133
  throw new Error("KiroSkill does not support global mode.");
9981
10134
  }
9982
10135
  return {
9983
- relativeDirPath: join71(".kiro", "skills")
10136
+ relativeDirPath: join72(".kiro", "skills")
9984
10137
  };
9985
10138
  }
9986
10139
  getFrontmatter() {
@@ -10068,13 +10221,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
10068
10221
  });
10069
10222
  const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10070
10223
  if (!result.success) {
10071
- const skillDirPath = join71(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10224
+ const skillDirPath = join72(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10072
10225
  throw new Error(
10073
- `Invalid frontmatter in ${join71(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10226
+ `Invalid frontmatter in ${join72(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10074
10227
  );
10075
10228
  }
10076
10229
  if (result.data.name !== loaded.dirName) {
10077
- const skillFilePath = join71(
10230
+ const skillFilePath = join72(
10078
10231
  loaded.baseDir,
10079
10232
  loaded.relativeDirPath,
10080
10233
  loaded.dirName,
@@ -10116,17 +10269,17 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
10116
10269
  };
10117
10270
 
10118
10271
  // src/features/skills/opencode-skill.ts
10119
- import { join as join72 } from "path";
10120
- import { z as z36 } from "zod/mini";
10121
- var OpenCodeSkillFrontmatterSchema = z36.looseObject({
10122
- name: z36.string(),
10123
- description: z36.string(),
10124
- "allowed-tools": z36.optional(z36.array(z36.string()))
10272
+ import { join as join73 } from "path";
10273
+ import { z as z37 } from "zod/mini";
10274
+ var OpenCodeSkillFrontmatterSchema = z37.looseObject({
10275
+ name: z37.string(),
10276
+ description: z37.string(),
10277
+ "allowed-tools": z37.optional(z37.array(z37.string()))
10125
10278
  });
10126
10279
  var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
10127
10280
  constructor({
10128
10281
  baseDir = process.cwd(),
10129
- relativeDirPath = join72(".opencode", "skill"),
10282
+ relativeDirPath = join73(".opencode", "skill"),
10130
10283
  dirName,
10131
10284
  frontmatter,
10132
10285
  body,
@@ -10155,7 +10308,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
10155
10308
  }
10156
10309
  static getSettablePaths({ global = false } = {}) {
10157
10310
  return {
10158
- relativeDirPath: global ? join72(".config", "opencode", "skill") : join72(".opencode", "skill")
10311
+ relativeDirPath: global ? join73(".config", "opencode", "skill") : join73(".opencode", "skill")
10159
10312
  };
10160
10313
  }
10161
10314
  getFrontmatter() {
@@ -10241,9 +10394,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
10241
10394
  });
10242
10395
  const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10243
10396
  if (!result.success) {
10244
- const skillDirPath = join72(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10397
+ const skillDirPath = join73(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10245
10398
  throw new Error(
10246
- `Invalid frontmatter in ${join72(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10399
+ `Invalid frontmatter in ${join73(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10247
10400
  );
10248
10401
  }
10249
10402
  return new _OpenCodeSkill({
@@ -10277,16 +10430,16 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
10277
10430
  };
10278
10431
 
10279
10432
  // src/features/skills/replit-skill.ts
10280
- import { join as join73 } from "path";
10281
- import { z as z37 } from "zod/mini";
10282
- var ReplitSkillFrontmatterSchema = z37.looseObject({
10283
- name: z37.string(),
10284
- description: z37.string()
10433
+ import { join as join74 } from "path";
10434
+ import { z as z38 } from "zod/mini";
10435
+ var ReplitSkillFrontmatterSchema = z38.looseObject({
10436
+ name: z38.string(),
10437
+ description: z38.string()
10285
10438
  });
10286
10439
  var ReplitSkill = class _ReplitSkill extends ToolSkill {
10287
10440
  constructor({
10288
10441
  baseDir = process.cwd(),
10289
- relativeDirPath = join73(".agents", "skills"),
10442
+ relativeDirPath = join74(".agents", "skills"),
10290
10443
  dirName,
10291
10444
  frontmatter,
10292
10445
  body,
@@ -10318,7 +10471,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
10318
10471
  throw new Error("ReplitSkill does not support global mode.");
10319
10472
  }
10320
10473
  return {
10321
- relativeDirPath: join73(".agents", "skills")
10474
+ relativeDirPath: join74(".agents", "skills")
10322
10475
  };
10323
10476
  }
10324
10477
  getFrontmatter() {
@@ -10398,9 +10551,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
10398
10551
  });
10399
10552
  const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10400
10553
  if (!result.success) {
10401
- const skillDirPath = join73(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10554
+ const skillDirPath = join74(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10402
10555
  throw new Error(
10403
- `Invalid frontmatter in ${join73(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10556
+ `Invalid frontmatter in ${join74(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10404
10557
  );
10405
10558
  }
10406
10559
  return new _ReplitSkill({
@@ -10435,16 +10588,16 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
10435
10588
  };
10436
10589
 
10437
10590
  // src/features/skills/roo-skill.ts
10438
- import { join as join74 } from "path";
10439
- import { z as z38 } from "zod/mini";
10440
- var RooSkillFrontmatterSchema = z38.looseObject({
10441
- name: z38.string(),
10442
- description: z38.string()
10591
+ import { join as join75 } from "path";
10592
+ import { z as z39 } from "zod/mini";
10593
+ var RooSkillFrontmatterSchema = z39.looseObject({
10594
+ name: z39.string(),
10595
+ description: z39.string()
10443
10596
  });
10444
10597
  var RooSkill = class _RooSkill extends ToolSkill {
10445
10598
  constructor({
10446
10599
  baseDir = process.cwd(),
10447
- relativeDirPath = join74(".roo", "skills"),
10600
+ relativeDirPath = join75(".roo", "skills"),
10448
10601
  dirName,
10449
10602
  frontmatter,
10450
10603
  body,
@@ -10475,7 +10628,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
10475
10628
  global: _global = false
10476
10629
  } = {}) {
10477
10630
  return {
10478
- relativeDirPath: join74(".roo", "skills")
10631
+ relativeDirPath: join75(".roo", "skills")
10479
10632
  };
10480
10633
  }
10481
10634
  getFrontmatter() {
@@ -10563,13 +10716,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
10563
10716
  });
10564
10717
  const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10565
10718
  if (!result.success) {
10566
- const skillDirPath = join74(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10719
+ const skillDirPath = join75(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10567
10720
  throw new Error(
10568
- `Invalid frontmatter in ${join74(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10721
+ `Invalid frontmatter in ${join75(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10569
10722
  );
10570
10723
  }
10571
10724
  if (result.data.name !== loaded.dirName) {
10572
- const skillFilePath = join74(
10725
+ const skillFilePath = join75(
10573
10726
  loaded.baseDir,
10574
10727
  loaded.relativeDirPath,
10575
10728
  loaded.dirName,
@@ -10610,14 +10763,14 @@ var RooSkill = class _RooSkill extends ToolSkill {
10610
10763
  };
10611
10764
 
10612
10765
  // src/features/skills/skills-utils.ts
10613
- import { basename as basename4, join as join75 } from "path";
10766
+ import { basename as basename4, join as join76 } from "path";
10614
10767
  async function getLocalSkillDirNames(baseDir) {
10615
- const skillsDir = join75(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
10768
+ const skillsDir = join76(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
10616
10769
  const names = /* @__PURE__ */ new Set();
10617
10770
  if (!await directoryExists(skillsDir)) {
10618
10771
  return names;
10619
10772
  }
10620
- const dirPaths = await findFilesByGlobs(join75(skillsDir, "*"), { type: "dir" });
10773
+ const dirPaths = await findFilesByGlobs(join76(skillsDir, "*"), { type: "dir" });
10621
10774
  for (const dirPath of dirPaths) {
10622
10775
  const name = basename4(dirPath);
10623
10776
  if (name === basename4(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
@@ -10646,7 +10799,7 @@ var skillsProcessorToolTargetTuple = [
10646
10799
  "replit",
10647
10800
  "roo"
10648
10801
  ];
10649
- var SkillsProcessorToolTargetSchema = z39.enum(skillsProcessorToolTargetTuple);
10802
+ var SkillsProcessorToolTargetSchema = z40.enum(skillsProcessorToolTargetTuple);
10650
10803
  var toolSkillFactories = /* @__PURE__ */ new Map([
10651
10804
  [
10652
10805
  "agentsmd",
@@ -10855,10 +11008,10 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10855
11008
  )
10856
11009
  );
10857
11010
  const localSkillNames = new Set(localDirNames);
10858
- const curatedDirPath = join76(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
11011
+ const curatedDirPath = join77(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
10859
11012
  let curatedSkills = [];
10860
11013
  if (await directoryExists(curatedDirPath)) {
10861
- const curatedDirPaths = await findFilesByGlobs(join76(curatedDirPath, "*"), { type: "dir" });
11014
+ const curatedDirPaths = await findFilesByGlobs(join77(curatedDirPath, "*"), { type: "dir" });
10862
11015
  const curatedDirNames = curatedDirPaths.map((path3) => basename5(path3));
10863
11016
  const nonConflicting = curatedDirNames.filter((name) => {
10864
11017
  if (localSkillNames.has(name)) {
@@ -10892,8 +11045,8 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10892
11045
  async loadToolDirs() {
10893
11046
  const factory = this.getFactory(this.toolTarget);
10894
11047
  const paths = factory.class.getSettablePaths({ global: this.global });
10895
- const skillsDirPath = join76(this.baseDir, paths.relativeDirPath);
10896
- const dirPaths = await findFilesByGlobs(join76(skillsDirPath, "*"), { type: "dir" });
11048
+ const skillsDirPath = join77(this.baseDir, paths.relativeDirPath);
11049
+ const dirPaths = await findFilesByGlobs(join77(skillsDirPath, "*"), { type: "dir" });
10897
11050
  const dirNames = dirPaths.map((path3) => basename5(path3));
10898
11051
  const toolSkills = await Promise.all(
10899
11052
  dirNames.map(
@@ -10910,8 +11063,8 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10910
11063
  async loadToolDirsToDelete() {
10911
11064
  const factory = this.getFactory(this.toolTarget);
10912
11065
  const paths = factory.class.getSettablePaths({ global: this.global });
10913
- const skillsDirPath = join76(this.baseDir, paths.relativeDirPath);
10914
- const dirPaths = await findFilesByGlobs(join76(skillsDirPath, "*"), { type: "dir" });
11066
+ const skillsDirPath = join77(this.baseDir, paths.relativeDirPath);
11067
+ const dirPaths = await findFilesByGlobs(join77(skillsDirPath, "*"), { type: "dir" });
10915
11068
  const dirNames = dirPaths.map((path3) => basename5(path3));
10916
11069
  const toolSkills = dirNames.map(
10917
11070
  (dirName) => factory.class.forDeletion({
@@ -10973,11 +11126,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
10973
11126
  };
10974
11127
 
10975
11128
  // src/features/subagents/agentsmd-subagent.ts
10976
- import { join as join78 } from "path";
11129
+ import { join as join79 } from "path";
10977
11130
 
10978
11131
  // src/features/subagents/simulated-subagent.ts
10979
- import { basename as basename6, join as join77 } from "path";
10980
- import { z as z40 } from "zod/mini";
11132
+ import { basename as basename6, join as join78 } from "path";
11133
+ import { z as z41 } from "zod/mini";
10981
11134
 
10982
11135
  // src/features/subagents/tool-subagent.ts
10983
11136
  var ToolSubagent = class extends ToolFile {
@@ -11029,9 +11182,9 @@ var ToolSubagent = class extends ToolFile {
11029
11182
  };
11030
11183
 
11031
11184
  // src/features/subagents/simulated-subagent.ts
11032
- var SimulatedSubagentFrontmatterSchema = z40.object({
11033
- name: z40.string(),
11034
- description: z40.optional(z40.string())
11185
+ var SimulatedSubagentFrontmatterSchema = z41.object({
11186
+ name: z41.string(),
11187
+ description: z41.optional(z41.string())
11035
11188
  });
11036
11189
  var SimulatedSubagent = class extends ToolSubagent {
11037
11190
  frontmatter;
@@ -11041,7 +11194,7 @@ var SimulatedSubagent = class extends ToolSubagent {
11041
11194
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
11042
11195
  if (!result.success) {
11043
11196
  throw new Error(
11044
- `Invalid frontmatter in ${join77(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11197
+ `Invalid frontmatter in ${join78(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11045
11198
  );
11046
11199
  }
11047
11200
  }
@@ -11092,7 +11245,7 @@ var SimulatedSubagent = class extends ToolSubagent {
11092
11245
  return {
11093
11246
  success: false,
11094
11247
  error: new Error(
11095
- `Invalid frontmatter in ${join77(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11248
+ `Invalid frontmatter in ${join78(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11096
11249
  )
11097
11250
  };
11098
11251
  }
@@ -11102,7 +11255,7 @@ var SimulatedSubagent = class extends ToolSubagent {
11102
11255
  relativeFilePath,
11103
11256
  validate = true
11104
11257
  }) {
11105
- const filePath = join77(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
11258
+ const filePath = join78(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
11106
11259
  const fileContent = await readFileContent(filePath);
11107
11260
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11108
11261
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11138,7 +11291,7 @@ var SimulatedSubagent = class extends ToolSubagent {
11138
11291
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
11139
11292
  static getSettablePaths() {
11140
11293
  return {
11141
- relativeDirPath: join78(".agents", "subagents")
11294
+ relativeDirPath: join79(".agents", "subagents")
11142
11295
  };
11143
11296
  }
11144
11297
  static async fromFile(params) {
@@ -11161,11 +11314,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
11161
11314
  };
11162
11315
 
11163
11316
  // src/features/subagents/factorydroid-subagent.ts
11164
- import { join as join79 } from "path";
11317
+ import { join as join80 } from "path";
11165
11318
  var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
11166
11319
  static getSettablePaths(_options) {
11167
11320
  return {
11168
- relativeDirPath: join79(".factory", "droids")
11321
+ relativeDirPath: join80(".factory", "droids")
11169
11322
  };
11170
11323
  }
11171
11324
  static async fromFile(params) {
@@ -11188,11 +11341,11 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
11188
11341
  };
11189
11342
 
11190
11343
  // src/features/subagents/geminicli-subagent.ts
11191
- import { join as join80 } from "path";
11344
+ import { join as join81 } from "path";
11192
11345
  var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
11193
11346
  static getSettablePaths() {
11194
11347
  return {
11195
- relativeDirPath: join80(".gemini", "subagents")
11348
+ relativeDirPath: join81(".gemini", "subagents")
11196
11349
  };
11197
11350
  }
11198
11351
  static async fromFile(params) {
@@ -11215,11 +11368,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
11215
11368
  };
11216
11369
 
11217
11370
  // src/features/subagents/roo-subagent.ts
11218
- import { join as join81 } from "path";
11371
+ import { join as join82 } from "path";
11219
11372
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
11220
11373
  static getSettablePaths() {
11221
11374
  return {
11222
- relativeDirPath: join81(".roo", "subagents")
11375
+ relativeDirPath: join82(".roo", "subagents")
11223
11376
  };
11224
11377
  }
11225
11378
  static async fromFile(params) {
@@ -11242,20 +11395,20 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
11242
11395
  };
11243
11396
 
11244
11397
  // src/features/subagents/subagents-processor.ts
11245
- import { basename as basename9, join as join90 } from "path";
11246
- import { z as z49 } from "zod/mini";
11398
+ import { basename as basename9, join as join91 } from "path";
11399
+ import { z as z50 } from "zod/mini";
11247
11400
 
11248
11401
  // src/features/subagents/claudecode-subagent.ts
11249
- import { join as join83 } from "path";
11250
- import { z as z42 } from "zod/mini";
11402
+ import { join as join84 } from "path";
11403
+ import { z as z43 } from "zod/mini";
11251
11404
 
11252
11405
  // src/features/subagents/rulesync-subagent.ts
11253
- import { basename as basename7, join as join82 } from "path";
11254
- import { z as z41 } from "zod/mini";
11255
- var RulesyncSubagentFrontmatterSchema = z41.looseObject({
11256
- targets: z41._default(RulesyncTargetsSchema, ["*"]),
11257
- name: z41.string(),
11258
- description: z41.optional(z41.string())
11406
+ import { basename as basename7, join as join83 } from "path";
11407
+ import { z as z42 } from "zod/mini";
11408
+ var RulesyncSubagentFrontmatterSchema = z42.looseObject({
11409
+ targets: z42._default(RulesyncTargetsSchema, ["*"]),
11410
+ name: z42.string(),
11411
+ description: z42.optional(z42.string())
11259
11412
  });
11260
11413
  var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
11261
11414
  frontmatter;
@@ -11264,7 +11417,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
11264
11417
  const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
11265
11418
  if (!parseResult.success && rest.validate !== false) {
11266
11419
  throw new Error(
11267
- `Invalid frontmatter in ${join82(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
11420
+ `Invalid frontmatter in ${join83(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
11268
11421
  );
11269
11422
  }
11270
11423
  const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
@@ -11297,7 +11450,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
11297
11450
  return {
11298
11451
  success: false,
11299
11452
  error: new Error(
11300
- `Invalid frontmatter in ${join82(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11453
+ `Invalid frontmatter in ${join83(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11301
11454
  )
11302
11455
  };
11303
11456
  }
@@ -11305,7 +11458,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
11305
11458
  static async fromFile({
11306
11459
  relativeFilePath
11307
11460
  }) {
11308
- const filePath = join82(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
11461
+ const filePath = join83(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
11309
11462
  const fileContent = await readFileContent(filePath);
11310
11463
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11311
11464
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11324,13 +11477,13 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
11324
11477
  };
11325
11478
 
11326
11479
  // src/features/subagents/claudecode-subagent.ts
11327
- var ClaudecodeSubagentFrontmatterSchema = z42.looseObject({
11328
- name: z42.string(),
11329
- description: z42.optional(z42.string()),
11330
- model: z42.optional(z42.string()),
11331
- tools: z42.optional(z42.union([z42.string(), z42.array(z42.string())])),
11332
- permissionMode: z42.optional(z42.string()),
11333
- skills: z42.optional(z42.union([z42.string(), z42.array(z42.string())]))
11480
+ var ClaudecodeSubagentFrontmatterSchema = z43.looseObject({
11481
+ name: z43.string(),
11482
+ description: z43.optional(z43.string()),
11483
+ model: z43.optional(z43.string()),
11484
+ tools: z43.optional(z43.union([z43.string(), z43.array(z43.string())])),
11485
+ permissionMode: z43.optional(z43.string()),
11486
+ skills: z43.optional(z43.union([z43.string(), z43.array(z43.string())]))
11334
11487
  });
11335
11488
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
11336
11489
  frontmatter;
@@ -11340,7 +11493,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
11340
11493
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
11341
11494
  if (!result.success) {
11342
11495
  throw new Error(
11343
- `Invalid frontmatter in ${join83(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11496
+ `Invalid frontmatter in ${join84(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11344
11497
  );
11345
11498
  }
11346
11499
  }
@@ -11352,7 +11505,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
11352
11505
  }
11353
11506
  static getSettablePaths(_options = {}) {
11354
11507
  return {
11355
- relativeDirPath: join83(".claude", "agents")
11508
+ relativeDirPath: join84(".claude", "agents")
11356
11509
  };
11357
11510
  }
11358
11511
  getFrontmatter() {
@@ -11431,7 +11584,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
11431
11584
  return {
11432
11585
  success: false,
11433
11586
  error: new Error(
11434
- `Invalid frontmatter in ${join83(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11587
+ `Invalid frontmatter in ${join84(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11435
11588
  )
11436
11589
  };
11437
11590
  }
@@ -11449,7 +11602,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
11449
11602
  global = false
11450
11603
  }) {
11451
11604
  const paths = this.getSettablePaths({ global });
11452
- const filePath = join83(baseDir, paths.relativeDirPath, relativeFilePath);
11605
+ const filePath = join84(baseDir, paths.relativeDirPath, relativeFilePath);
11453
11606
  const fileContent = await readFileContent(filePath);
11454
11607
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11455
11608
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11484,16 +11637,16 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
11484
11637
  };
11485
11638
 
11486
11639
  // src/features/subagents/codexcli-subagent.ts
11487
- import { join as join84 } from "path";
11640
+ import { join as join85 } from "path";
11488
11641
  import * as smolToml2 from "smol-toml";
11489
- import { z as z43 } from "zod/mini";
11490
- var CodexCliSubagentTomlSchema = z43.looseObject({
11491
- name: z43.string(),
11492
- description: z43.optional(z43.string()),
11493
- developer_instructions: z43.optional(z43.string()),
11494
- model: z43.optional(z43.string()),
11495
- model_reasoning_effort: z43.optional(z43.string()),
11496
- sandbox_mode: z43.optional(z43.string())
11642
+ import { z as z44 } from "zod/mini";
11643
+ var CodexCliSubagentTomlSchema = z44.looseObject({
11644
+ name: z44.string(),
11645
+ description: z44.optional(z44.string()),
11646
+ developer_instructions: z44.optional(z44.string()),
11647
+ model: z44.optional(z44.string()),
11648
+ model_reasoning_effort: z44.optional(z44.string()),
11649
+ sandbox_mode: z44.optional(z44.string())
11497
11650
  });
11498
11651
  var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11499
11652
  body;
@@ -11504,7 +11657,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11504
11657
  CodexCliSubagentTomlSchema.parse(parsed);
11505
11658
  } catch (error) {
11506
11659
  throw new Error(
11507
- `Invalid TOML in ${join84(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
11660
+ `Invalid TOML in ${join85(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
11508
11661
  { cause: error }
11509
11662
  );
11510
11663
  }
@@ -11516,7 +11669,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11516
11669
  }
11517
11670
  static getSettablePaths(_options = {}) {
11518
11671
  return {
11519
- relativeDirPath: join84(".codex", "agents")
11672
+ relativeDirPath: join85(".codex", "agents")
11520
11673
  };
11521
11674
  }
11522
11675
  getBody() {
@@ -11528,7 +11681,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11528
11681
  parsed = CodexCliSubagentTomlSchema.parse(smolToml2.parse(this.body));
11529
11682
  } catch (error) {
11530
11683
  throw new Error(
11531
- `Failed to parse TOML in ${join84(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
11684
+ `Failed to parse TOML in ${join85(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
11532
11685
  { cause: error }
11533
11686
  );
11534
11687
  }
@@ -11609,7 +11762,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11609
11762
  global = false
11610
11763
  }) {
11611
11764
  const paths = this.getSettablePaths({ global });
11612
- const filePath = join84(baseDir, paths.relativeDirPath, relativeFilePath);
11765
+ const filePath = join85(baseDir, paths.relativeDirPath, relativeFilePath);
11613
11766
  const fileContent = await readFileContent(filePath);
11614
11767
  const subagent = new _CodexCliSubagent({
11615
11768
  baseDir,
@@ -11647,13 +11800,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
11647
11800
  };
11648
11801
 
11649
11802
  // src/features/subagents/copilot-subagent.ts
11650
- import { join as join85 } from "path";
11651
- import { z as z44 } from "zod/mini";
11803
+ import { join as join86 } from "path";
11804
+ import { z as z45 } from "zod/mini";
11652
11805
  var REQUIRED_TOOL = "agent/runSubagent";
11653
- var CopilotSubagentFrontmatterSchema = z44.looseObject({
11654
- name: z44.string(),
11655
- description: z44.optional(z44.string()),
11656
- tools: z44.optional(z44.union([z44.string(), z44.array(z44.string())]))
11806
+ var CopilotSubagentFrontmatterSchema = z45.looseObject({
11807
+ name: z45.string(),
11808
+ description: z45.optional(z45.string()),
11809
+ tools: z45.optional(z45.union([z45.string(), z45.array(z45.string())]))
11657
11810
  });
11658
11811
  var normalizeTools = (tools) => {
11659
11812
  if (!tools) {
@@ -11673,7 +11826,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11673
11826
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
11674
11827
  if (!result.success) {
11675
11828
  throw new Error(
11676
- `Invalid frontmatter in ${join85(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11829
+ `Invalid frontmatter in ${join86(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11677
11830
  );
11678
11831
  }
11679
11832
  }
@@ -11685,7 +11838,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11685
11838
  }
11686
11839
  static getSettablePaths(_options = {}) {
11687
11840
  return {
11688
- relativeDirPath: join85(".github", "agents")
11841
+ relativeDirPath: join86(".github", "agents")
11689
11842
  };
11690
11843
  }
11691
11844
  getFrontmatter() {
@@ -11759,7 +11912,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11759
11912
  return {
11760
11913
  success: false,
11761
11914
  error: new Error(
11762
- `Invalid frontmatter in ${join85(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11915
+ `Invalid frontmatter in ${join86(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11763
11916
  )
11764
11917
  };
11765
11918
  }
@@ -11777,7 +11930,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11777
11930
  global = false
11778
11931
  }) {
11779
11932
  const paths = this.getSettablePaths({ global });
11780
- const filePath = join85(baseDir, paths.relativeDirPath, relativeFilePath);
11933
+ const filePath = join86(baseDir, paths.relativeDirPath, relativeFilePath);
11781
11934
  const fileContent = await readFileContent(filePath);
11782
11935
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11783
11936
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11813,11 +11966,11 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
11813
11966
  };
11814
11967
 
11815
11968
  // src/features/subagents/cursor-subagent.ts
11816
- import { join as join86 } from "path";
11817
- import { z as z45 } from "zod/mini";
11818
- var CursorSubagentFrontmatterSchema = z45.looseObject({
11819
- name: z45.string(),
11820
- description: z45.optional(z45.string())
11969
+ import { join as join87 } from "path";
11970
+ import { z as z46 } from "zod/mini";
11971
+ var CursorSubagentFrontmatterSchema = z46.looseObject({
11972
+ name: z46.string(),
11973
+ description: z46.optional(z46.string())
11821
11974
  });
11822
11975
  var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11823
11976
  frontmatter;
@@ -11827,7 +11980,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11827
11980
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
11828
11981
  if (!result.success) {
11829
11982
  throw new Error(
11830
- `Invalid frontmatter in ${join86(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11983
+ `Invalid frontmatter in ${join87(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11831
11984
  );
11832
11985
  }
11833
11986
  }
@@ -11839,7 +11992,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11839
11992
  }
11840
11993
  static getSettablePaths(_options = {}) {
11841
11994
  return {
11842
- relativeDirPath: join86(".cursor", "agents")
11995
+ relativeDirPath: join87(".cursor", "agents")
11843
11996
  };
11844
11997
  }
11845
11998
  getFrontmatter() {
@@ -11906,7 +12059,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11906
12059
  return {
11907
12060
  success: false,
11908
12061
  error: new Error(
11909
- `Invalid frontmatter in ${join86(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12062
+ `Invalid frontmatter in ${join87(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11910
12063
  )
11911
12064
  };
11912
12065
  }
@@ -11924,7 +12077,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11924
12077
  global = false
11925
12078
  }) {
11926
12079
  const paths = this.getSettablePaths({ global });
11927
- const filePath = join86(baseDir, paths.relativeDirPath, relativeFilePath);
12080
+ const filePath = join87(baseDir, paths.relativeDirPath, relativeFilePath);
11928
12081
  const fileContent = await readFileContent(filePath);
11929
12082
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
11930
12083
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -11960,11 +12113,11 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
11960
12113
  };
11961
12114
 
11962
12115
  // src/features/subagents/junie-subagent.ts
11963
- import { join as join87 } from "path";
11964
- import { z as z46 } from "zod/mini";
11965
- var JunieSubagentFrontmatterSchema = z46.looseObject({
11966
- name: z46.optional(z46.string()),
11967
- description: z46.string()
12116
+ import { join as join88 } from "path";
12117
+ import { z as z47 } from "zod/mini";
12118
+ var JunieSubagentFrontmatterSchema = z47.looseObject({
12119
+ name: z47.optional(z47.string()),
12120
+ description: z47.string()
11968
12121
  });
11969
12122
  var JunieSubagent = class _JunieSubagent extends ToolSubagent {
11970
12123
  frontmatter;
@@ -11974,7 +12127,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
11974
12127
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
11975
12128
  if (!result.success) {
11976
12129
  throw new Error(
11977
- `Invalid frontmatter in ${join87(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12130
+ `Invalid frontmatter in ${join88(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11978
12131
  );
11979
12132
  }
11980
12133
  }
@@ -11989,7 +12142,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
11989
12142
  throw new Error("JunieSubagent does not support global mode.");
11990
12143
  }
11991
12144
  return {
11992
- relativeDirPath: join87(".junie", "agents")
12145
+ relativeDirPath: join88(".junie", "agents")
11993
12146
  };
11994
12147
  }
11995
12148
  getFrontmatter() {
@@ -12065,7 +12218,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
12065
12218
  return {
12066
12219
  success: false,
12067
12220
  error: new Error(
12068
- `Invalid frontmatter in ${join87(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12221
+ `Invalid frontmatter in ${join88(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12069
12222
  )
12070
12223
  };
12071
12224
  }
@@ -12083,7 +12236,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
12083
12236
  global = false
12084
12237
  }) {
12085
12238
  const paths = this.getSettablePaths({ global });
12086
- const filePath = join87(baseDir, paths.relativeDirPath, relativeFilePath);
12239
+ const filePath = join88(baseDir, paths.relativeDirPath, relativeFilePath);
12087
12240
  const fileContent = await readFileContent(filePath);
12088
12241
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
12089
12242
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -12118,23 +12271,23 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
12118
12271
  };
12119
12272
 
12120
12273
  // src/features/subagents/kiro-subagent.ts
12121
- import { join as join88 } from "path";
12122
- import { z as z47 } from "zod/mini";
12123
- var KiroCliSubagentJsonSchema = z47.looseObject({
12124
- name: z47.string(),
12125
- description: z47.optional(z47.nullable(z47.string())),
12126
- prompt: z47.optional(z47.nullable(z47.string())),
12127
- tools: z47.optional(z47.nullable(z47.array(z47.string()))),
12128
- toolAliases: z47.optional(z47.nullable(z47.record(z47.string(), z47.string()))),
12129
- toolSettings: z47.optional(z47.nullable(z47.unknown())),
12130
- toolSchema: z47.optional(z47.nullable(z47.unknown())),
12131
- hooks: z47.optional(z47.nullable(z47.record(z47.string(), z47.array(z47.unknown())))),
12132
- model: z47.optional(z47.nullable(z47.string())),
12133
- mcpServers: z47.optional(z47.nullable(z47.record(z47.string(), z47.unknown()))),
12134
- useLegacyMcpJson: z47.optional(z47.nullable(z47.boolean())),
12135
- resources: z47.optional(z47.nullable(z47.array(z47.string()))),
12136
- allowedTools: z47.optional(z47.nullable(z47.array(z47.string()))),
12137
- includeMcpJson: z47.optional(z47.nullable(z47.boolean()))
12274
+ import { join as join89 } from "path";
12275
+ import { z as z48 } from "zod/mini";
12276
+ var KiroCliSubagentJsonSchema = z48.looseObject({
12277
+ name: z48.string(),
12278
+ description: z48.optional(z48.nullable(z48.string())),
12279
+ prompt: z48.optional(z48.nullable(z48.string())),
12280
+ tools: z48.optional(z48.nullable(z48.array(z48.string()))),
12281
+ toolAliases: z48.optional(z48.nullable(z48.record(z48.string(), z48.string()))),
12282
+ toolSettings: z48.optional(z48.nullable(z48.unknown())),
12283
+ toolSchema: z48.optional(z48.nullable(z48.unknown())),
12284
+ hooks: z48.optional(z48.nullable(z48.record(z48.string(), z48.array(z48.unknown())))),
12285
+ model: z48.optional(z48.nullable(z48.string())),
12286
+ mcpServers: z48.optional(z48.nullable(z48.record(z48.string(), z48.unknown()))),
12287
+ useLegacyMcpJson: z48.optional(z48.nullable(z48.boolean())),
12288
+ resources: z48.optional(z48.nullable(z48.array(z48.string()))),
12289
+ allowedTools: z48.optional(z48.nullable(z48.array(z48.string()))),
12290
+ includeMcpJson: z48.optional(z48.nullable(z48.boolean()))
12138
12291
  });
12139
12292
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
12140
12293
  body;
@@ -12145,7 +12298,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
12145
12298
  KiroCliSubagentJsonSchema.parse(parsed);
12146
12299
  } catch (error) {
12147
12300
  throw new Error(
12148
- `Invalid JSON in ${join88(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
12301
+ `Invalid JSON in ${join89(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
12149
12302
  { cause: error }
12150
12303
  );
12151
12304
  }
@@ -12157,7 +12310,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
12157
12310
  }
12158
12311
  static getSettablePaths(_options = {}) {
12159
12312
  return {
12160
- relativeDirPath: join88(".kiro", "agents")
12313
+ relativeDirPath: join89(".kiro", "agents")
12161
12314
  };
12162
12315
  }
12163
12316
  getBody() {
@@ -12169,7 +12322,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
12169
12322
  parsed = JSON.parse(this.body);
12170
12323
  } catch (error) {
12171
12324
  throw new Error(
12172
- `Failed to parse JSON in ${join88(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
12325
+ `Failed to parse JSON in ${join89(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
12173
12326
  { cause: error }
12174
12327
  );
12175
12328
  }
@@ -12250,7 +12403,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
12250
12403
  global = false
12251
12404
  }) {
12252
12405
  const paths = this.getSettablePaths({ global });
12253
- const filePath = join88(baseDir, paths.relativeDirPath, relativeFilePath);
12406
+ const filePath = join89(baseDir, paths.relativeDirPath, relativeFilePath);
12254
12407
  const fileContent = await readFileContent(filePath);
12255
12408
  const subagent = new _KiroSubagent({
12256
12409
  baseDir,
@@ -12288,12 +12441,12 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
12288
12441
  };
12289
12442
 
12290
12443
  // src/features/subagents/opencode-subagent.ts
12291
- import { basename as basename8, join as join89 } from "path";
12292
- import { z as z48 } from "zod/mini";
12293
- var OpenCodeSubagentFrontmatterSchema = z48.looseObject({
12294
- description: z48.optional(z48.string()),
12295
- mode: z48._default(z48.string(), "subagent"),
12296
- name: z48.optional(z48.string())
12444
+ import { basename as basename8, join as join90 } from "path";
12445
+ import { z as z49 } from "zod/mini";
12446
+ var OpenCodeSubagentFrontmatterSchema = z49.looseObject({
12447
+ description: z49.optional(z49.string()),
12448
+ mode: z49._default(z49.string(), "subagent"),
12449
+ name: z49.optional(z49.string())
12297
12450
  });
12298
12451
  var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
12299
12452
  frontmatter;
@@ -12303,7 +12456,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
12303
12456
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
12304
12457
  if (!result.success) {
12305
12458
  throw new Error(
12306
- `Invalid frontmatter in ${join89(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12459
+ `Invalid frontmatter in ${join90(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
12307
12460
  );
12308
12461
  }
12309
12462
  }
@@ -12317,7 +12470,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
12317
12470
  global = false
12318
12471
  } = {}) {
12319
12472
  return {
12320
- relativeDirPath: global ? join89(".config", "opencode", "agent") : join89(".opencode", "agent")
12473
+ relativeDirPath: global ? join90(".config", "opencode", "agent") : join90(".opencode", "agent")
12321
12474
  };
12322
12475
  }
12323
12476
  getFrontmatter() {
@@ -12383,7 +12536,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
12383
12536
  return {
12384
12537
  success: false,
12385
12538
  error: new Error(
12386
- `Invalid frontmatter in ${join89(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12539
+ `Invalid frontmatter in ${join90(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12387
12540
  )
12388
12541
  };
12389
12542
  }
@@ -12400,7 +12553,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
12400
12553
  global = false
12401
12554
  }) {
12402
12555
  const paths = this.getSettablePaths({ global });
12403
- const filePath = join89(baseDir, paths.relativeDirPath, relativeFilePath);
12556
+ const filePath = join90(baseDir, paths.relativeDirPath, relativeFilePath);
12404
12557
  const fileContent = await readFileContent(filePath);
12405
12558
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
12406
12559
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -12450,7 +12603,7 @@ var subagentsProcessorToolTargetTuple = [
12450
12603
  "opencode",
12451
12604
  "roo"
12452
12605
  ];
12453
- var SubagentsProcessorToolTargetSchema = z49.enum(subagentsProcessorToolTargetTuple);
12606
+ var SubagentsProcessorToolTargetSchema = z50.enum(subagentsProcessorToolTargetTuple);
12454
12607
  var toolSubagentFactories = /* @__PURE__ */ new Map([
12455
12608
  [
12456
12609
  "agentsmd",
@@ -12619,7 +12772,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
12619
12772
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
12620
12773
  */
12621
12774
  async loadRulesyncFiles() {
12622
- const subagentsDir = join90(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
12775
+ const subagentsDir = join91(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
12623
12776
  const dirExists = await directoryExists(subagentsDir);
12624
12777
  if (!dirExists) {
12625
12778
  logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -12634,7 +12787,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
12634
12787
  logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
12635
12788
  const rulesyncSubagents = [];
12636
12789
  for (const mdFile of mdFiles) {
12637
- const filepath = join90(subagentsDir, mdFile);
12790
+ const filepath = join91(subagentsDir, mdFile);
12638
12791
  try {
12639
12792
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
12640
12793
  relativeFilePath: mdFile,
@@ -12664,7 +12817,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
12664
12817
  const factory = this.getFactory(this.toolTarget);
12665
12818
  const paths = factory.class.getSettablePaths({ global: this.global });
12666
12819
  const subagentFilePaths = await findFilesByGlobs(
12667
- join90(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
12820
+ join91(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
12668
12821
  );
12669
12822
  if (forDeletion) {
12670
12823
  const toolSubagents2 = subagentFilePaths.map(
@@ -12729,49 +12882,49 @@ var SubagentsProcessor = class extends FeatureProcessor {
12729
12882
  };
12730
12883
 
12731
12884
  // src/features/rules/agentsmd-rule.ts
12732
- import { join as join93 } from "path";
12885
+ import { join as join94 } from "path";
12733
12886
 
12734
12887
  // src/features/rules/tool-rule.ts
12735
- import { join as join92 } from "path";
12888
+ import { join as join93 } from "path";
12736
12889
 
12737
12890
  // src/features/rules/rulesync-rule.ts
12738
- import { join as join91 } from "path";
12739
- import { z as z50 } from "zod/mini";
12740
- var RulesyncRuleFrontmatterSchema = z50.object({
12741
- root: z50.optional(z50.boolean()),
12742
- localRoot: z50.optional(z50.boolean()),
12743
- targets: z50._default(RulesyncTargetsSchema, ["*"]),
12744
- description: z50.optional(z50.string()),
12745
- globs: z50.optional(z50.array(z50.string())),
12746
- agentsmd: z50.optional(
12747
- z50.object({
12891
+ import { join as join92 } from "path";
12892
+ import { z as z51 } from "zod/mini";
12893
+ var RulesyncRuleFrontmatterSchema = z51.object({
12894
+ root: z51.optional(z51.boolean()),
12895
+ localRoot: z51.optional(z51.boolean()),
12896
+ targets: z51._default(RulesyncTargetsSchema, ["*"]),
12897
+ description: z51.optional(z51.string()),
12898
+ globs: z51.optional(z51.array(z51.string())),
12899
+ agentsmd: z51.optional(
12900
+ z51.object({
12748
12901
  // @example "path/to/subproject"
12749
- subprojectPath: z50.optional(z50.string())
12902
+ subprojectPath: z51.optional(z51.string())
12750
12903
  })
12751
12904
  ),
12752
- claudecode: z50.optional(
12753
- z50.object({
12905
+ claudecode: z51.optional(
12906
+ z51.object({
12754
12907
  // Glob patterns for conditional rules (takes precedence over globs)
12755
12908
  // @example ["src/**/*.ts", "tests/**/*.test.ts"]
12756
- paths: z50.optional(z50.array(z50.string()))
12909
+ paths: z51.optional(z51.array(z51.string()))
12757
12910
  })
12758
12911
  ),
12759
- cursor: z50.optional(
12760
- z50.object({
12761
- alwaysApply: z50.optional(z50.boolean()),
12762
- description: z50.optional(z50.string()),
12763
- globs: z50.optional(z50.array(z50.string()))
12912
+ cursor: z51.optional(
12913
+ z51.object({
12914
+ alwaysApply: z51.optional(z51.boolean()),
12915
+ description: z51.optional(z51.string()),
12916
+ globs: z51.optional(z51.array(z51.string()))
12764
12917
  })
12765
12918
  ),
12766
- copilot: z50.optional(
12767
- z50.object({
12768
- excludeAgent: z50.optional(z50.union([z50.literal("code-review"), z50.literal("coding-agent")]))
12919
+ copilot: z51.optional(
12920
+ z51.object({
12921
+ excludeAgent: z51.optional(z51.union([z51.literal("code-review"), z51.literal("coding-agent")]))
12769
12922
  })
12770
12923
  ),
12771
- antigravity: z50.optional(
12772
- z50.looseObject({
12773
- trigger: z50.optional(z50.string()),
12774
- globs: z50.optional(z50.array(z50.string()))
12924
+ antigravity: z51.optional(
12925
+ z51.looseObject({
12926
+ trigger: z51.optional(z51.string()),
12927
+ globs: z51.optional(z51.array(z51.string()))
12775
12928
  })
12776
12929
  )
12777
12930
  });
@@ -12782,7 +12935,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
12782
12935
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
12783
12936
  if (!parseResult.success && rest.validate !== false) {
12784
12937
  throw new Error(
12785
- `Invalid frontmatter in ${join91(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
12938
+ `Invalid frontmatter in ${join92(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
12786
12939
  );
12787
12940
  }
12788
12941
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -12817,7 +12970,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
12817
12970
  return {
12818
12971
  success: false,
12819
12972
  error: new Error(
12820
- `Invalid frontmatter in ${join91(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12973
+ `Invalid frontmatter in ${join92(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
12821
12974
  )
12822
12975
  };
12823
12976
  }
@@ -12826,7 +12979,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
12826
12979
  relativeFilePath,
12827
12980
  validate = true
12828
12981
  }) {
12829
- const filePath = join91(
12982
+ const filePath = join92(
12830
12983
  process.cwd(),
12831
12984
  this.getSettablePaths().recommended.relativeDirPath,
12832
12985
  relativeFilePath
@@ -12928,7 +13081,7 @@ var ToolRule = class extends ToolFile {
12928
13081
  rulesyncRule,
12929
13082
  validate = true,
12930
13083
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
12931
- nonRootPath = { relativeDirPath: join92(".agents", "memories") }
13084
+ nonRootPath = { relativeDirPath: join93(".agents", "memories") }
12932
13085
  }) {
12933
13086
  const params = this.buildToolRuleParamsDefault({
12934
13087
  baseDir,
@@ -12939,7 +13092,7 @@ var ToolRule = class extends ToolFile {
12939
13092
  });
12940
13093
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
12941
13094
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
12942
- params.relativeDirPath = join92(rulesyncFrontmatter.agentsmd.subprojectPath);
13095
+ params.relativeDirPath = join93(rulesyncFrontmatter.agentsmd.subprojectPath);
12943
13096
  params.relativeFilePath = "AGENTS.md";
12944
13097
  }
12945
13098
  return params;
@@ -12988,7 +13141,7 @@ var ToolRule = class extends ToolFile {
12988
13141
  }
12989
13142
  };
12990
13143
  function buildToolPath(toolDir, subDir, excludeToolDir) {
12991
- return excludeToolDir ? subDir : join92(toolDir, subDir);
13144
+ return excludeToolDir ? subDir : join93(toolDir, subDir);
12992
13145
  }
12993
13146
 
12994
13147
  // src/features/rules/agentsmd-rule.ts
@@ -13017,8 +13170,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
13017
13170
  validate = true
13018
13171
  }) {
13019
13172
  const isRoot = relativeFilePath === "AGENTS.md";
13020
- const relativePath = isRoot ? "AGENTS.md" : join93(".agents", "memories", relativeFilePath);
13021
- const fileContent = await readFileContent(join93(baseDir, relativePath));
13173
+ const relativePath = isRoot ? "AGENTS.md" : join94(".agents", "memories", relativeFilePath);
13174
+ const fileContent = await readFileContent(join94(baseDir, relativePath));
13022
13175
  return new _AgentsMdRule({
13023
13176
  baseDir,
13024
13177
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -13073,21 +13226,21 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
13073
13226
  };
13074
13227
 
13075
13228
  // src/features/rules/antigravity-rule.ts
13076
- import { join as join94 } from "path";
13077
- import { z as z51 } from "zod/mini";
13078
- var AntigravityRuleFrontmatterSchema = z51.looseObject({
13079
- trigger: z51.optional(
13080
- z51.union([
13081
- z51.literal("always_on"),
13082
- z51.literal("glob"),
13083
- z51.literal("manual"),
13084
- z51.literal("model_decision"),
13085
- z51.string()
13229
+ import { join as join95 } from "path";
13230
+ import { z as z52 } from "zod/mini";
13231
+ var AntigravityRuleFrontmatterSchema = z52.looseObject({
13232
+ trigger: z52.optional(
13233
+ z52.union([
13234
+ z52.literal("always_on"),
13235
+ z52.literal("glob"),
13236
+ z52.literal("manual"),
13237
+ z52.literal("model_decision"),
13238
+ z52.string()
13086
13239
  // accepts any string for forward compatibility
13087
13240
  ])
13088
13241
  ),
13089
- globs: z51.optional(z51.string()),
13090
- description: z51.optional(z51.string())
13242
+ globs: z52.optional(z52.string()),
13243
+ description: z52.optional(z52.string())
13091
13244
  });
13092
13245
  function parseGlobsString(globs) {
13093
13246
  if (!globs) {
@@ -13232,7 +13385,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
13232
13385
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
13233
13386
  if (!result.success) {
13234
13387
  throw new Error(
13235
- `Invalid frontmatter in ${join94(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13388
+ `Invalid frontmatter in ${join95(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13236
13389
  );
13237
13390
  }
13238
13391
  }
@@ -13256,7 +13409,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
13256
13409
  relativeFilePath,
13257
13410
  validate = true
13258
13411
  }) {
13259
- const filePath = join94(
13412
+ const filePath = join95(
13260
13413
  baseDir,
13261
13414
  this.getSettablePaths().nonRoot.relativeDirPath,
13262
13415
  relativeFilePath
@@ -13396,7 +13549,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
13396
13549
  };
13397
13550
 
13398
13551
  // src/features/rules/augmentcode-legacy-rule.ts
13399
- import { join as join95 } from "path";
13552
+ import { join as join96 } from "path";
13400
13553
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
13401
13554
  toRulesyncRule() {
13402
13555
  const rulesyncFrontmatter = {
@@ -13456,8 +13609,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
13456
13609
  }) {
13457
13610
  const settablePaths = this.getSettablePaths();
13458
13611
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
13459
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : join95(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
13460
- const fileContent = await readFileContent(join95(baseDir, relativePath));
13612
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : join96(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
13613
+ const fileContent = await readFileContent(join96(baseDir, relativePath));
13461
13614
  return new _AugmentcodeLegacyRule({
13462
13615
  baseDir,
13463
13616
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -13486,7 +13639,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
13486
13639
  };
13487
13640
 
13488
13641
  // src/features/rules/augmentcode-rule.ts
13489
- import { join as join96 } from "path";
13642
+ import { join as join97 } from "path";
13490
13643
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
13491
13644
  toRulesyncRule() {
13492
13645
  return this.toRulesyncRuleDefault();
@@ -13517,7 +13670,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
13517
13670
  relativeFilePath,
13518
13671
  validate = true
13519
13672
  }) {
13520
- const filePath = join96(
13673
+ const filePath = join97(
13521
13674
  baseDir,
13522
13675
  this.getSettablePaths().nonRoot.relativeDirPath,
13523
13676
  relativeFilePath
@@ -13557,7 +13710,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
13557
13710
  };
13558
13711
 
13559
13712
  // src/features/rules/claudecode-legacy-rule.ts
13560
- import { join as join97 } from "path";
13713
+ import { join as join98 } from "path";
13561
13714
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
13562
13715
  static getSettablePaths({
13563
13716
  global,
@@ -13599,7 +13752,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
13599
13752
  if (isRoot) {
13600
13753
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
13601
13754
  const fileContent2 = await readFileContent(
13602
- join97(baseDir, rootDirPath, paths.root.relativeFilePath)
13755
+ join98(baseDir, rootDirPath, paths.root.relativeFilePath)
13603
13756
  );
13604
13757
  return new _ClaudecodeLegacyRule({
13605
13758
  baseDir,
@@ -13613,8 +13766,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
13613
13766
  if (!paths.nonRoot) {
13614
13767
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13615
13768
  }
13616
- const relativePath = join97(paths.nonRoot.relativeDirPath, relativeFilePath);
13617
- const fileContent = await readFileContent(join97(baseDir, relativePath));
13769
+ const relativePath = join98(paths.nonRoot.relativeDirPath, relativeFilePath);
13770
+ const fileContent = await readFileContent(join98(baseDir, relativePath));
13618
13771
  return new _ClaudecodeLegacyRule({
13619
13772
  baseDir,
13620
13773
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -13673,10 +13826,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
13673
13826
  };
13674
13827
 
13675
13828
  // src/features/rules/claudecode-rule.ts
13676
- import { join as join98 } from "path";
13677
- import { z as z52 } from "zod/mini";
13678
- var ClaudecodeRuleFrontmatterSchema = z52.object({
13679
- paths: z52.optional(z52.array(z52.string()))
13829
+ import { join as join99 } from "path";
13830
+ import { z as z53 } from "zod/mini";
13831
+ var ClaudecodeRuleFrontmatterSchema = z53.object({
13832
+ paths: z53.optional(z53.array(z53.string()))
13680
13833
  });
13681
13834
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13682
13835
  frontmatter;
@@ -13714,7 +13867,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13714
13867
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
13715
13868
  if (!result.success) {
13716
13869
  throw new Error(
13717
- `Invalid frontmatter in ${join98(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13870
+ `Invalid frontmatter in ${join99(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13718
13871
  );
13719
13872
  }
13720
13873
  }
@@ -13744,7 +13897,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13744
13897
  if (isRoot) {
13745
13898
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
13746
13899
  const fileContent2 = await readFileContent(
13747
- join98(baseDir, rootDirPath, paths.root.relativeFilePath)
13900
+ join99(baseDir, rootDirPath, paths.root.relativeFilePath)
13748
13901
  );
13749
13902
  return new _ClaudecodeRule({
13750
13903
  baseDir,
@@ -13759,8 +13912,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13759
13912
  if (!paths.nonRoot) {
13760
13913
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13761
13914
  }
13762
- const relativePath = join98(paths.nonRoot.relativeDirPath, relativeFilePath);
13763
- const filePath = join98(baseDir, relativePath);
13915
+ const relativePath = join99(paths.nonRoot.relativeDirPath, relativeFilePath);
13916
+ const filePath = join99(baseDir, relativePath);
13764
13917
  const fileContent = await readFileContent(filePath);
13765
13918
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13766
13919
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
@@ -13871,7 +14024,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13871
14024
  return {
13872
14025
  success: false,
13873
14026
  error: new Error(
13874
- `Invalid frontmatter in ${join98(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14027
+ `Invalid frontmatter in ${join99(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13875
14028
  )
13876
14029
  };
13877
14030
  }
@@ -13891,10 +14044,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
13891
14044
  };
13892
14045
 
13893
14046
  // src/features/rules/cline-rule.ts
13894
- import { join as join99 } from "path";
13895
- import { z as z53 } from "zod/mini";
13896
- var ClineRuleFrontmatterSchema = z53.object({
13897
- description: z53.string()
14047
+ import { join as join100 } from "path";
14048
+ import { z as z54 } from "zod/mini";
14049
+ var ClineRuleFrontmatterSchema = z54.object({
14050
+ description: z54.string()
13898
14051
  });
13899
14052
  var ClineRule = class _ClineRule extends ToolRule {
13900
14053
  static getSettablePaths(_options = {}) {
@@ -13937,7 +14090,7 @@ var ClineRule = class _ClineRule extends ToolRule {
13937
14090
  validate = true
13938
14091
  }) {
13939
14092
  const fileContent = await readFileContent(
13940
- join99(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14093
+ join100(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
13941
14094
  );
13942
14095
  return new _ClineRule({
13943
14096
  baseDir,
@@ -13963,7 +14116,7 @@ var ClineRule = class _ClineRule extends ToolRule {
13963
14116
  };
13964
14117
 
13965
14118
  // src/features/rules/codexcli-rule.ts
13966
- import { join as join100 } from "path";
14119
+ import { join as join101 } from "path";
13967
14120
  var CodexcliRule = class _CodexcliRule extends ToolRule {
13968
14121
  static getSettablePaths({
13969
14122
  global,
@@ -13998,7 +14151,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
13998
14151
  if (isRoot) {
13999
14152
  const relativePath2 = paths.root.relativeFilePath;
14000
14153
  const fileContent2 = await readFileContent(
14001
- join100(baseDir, paths.root.relativeDirPath, relativePath2)
14154
+ join101(baseDir, paths.root.relativeDirPath, relativePath2)
14002
14155
  );
14003
14156
  return new _CodexcliRule({
14004
14157
  baseDir,
@@ -14012,8 +14165,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
14012
14165
  if (!paths.nonRoot) {
14013
14166
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14014
14167
  }
14015
- const relativePath = join100(paths.nonRoot.relativeDirPath, relativeFilePath);
14016
- const fileContent = await readFileContent(join100(baseDir, relativePath));
14168
+ const relativePath = join101(paths.nonRoot.relativeDirPath, relativeFilePath);
14169
+ const fileContent = await readFileContent(join101(baseDir, relativePath));
14017
14170
  return new _CodexcliRule({
14018
14171
  baseDir,
14019
14172
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -14072,12 +14225,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
14072
14225
  };
14073
14226
 
14074
14227
  // src/features/rules/copilot-rule.ts
14075
- import { join as join101 } from "path";
14076
- import { z as z54 } from "zod/mini";
14077
- var CopilotRuleFrontmatterSchema = z54.object({
14078
- description: z54.optional(z54.string()),
14079
- applyTo: z54.optional(z54.string()),
14080
- excludeAgent: z54.optional(z54.union([z54.literal("code-review"), z54.literal("coding-agent")]))
14228
+ import { join as join102 } from "path";
14229
+ import { z as z55 } from "zod/mini";
14230
+ var CopilotRuleFrontmatterSchema = z55.object({
14231
+ description: z55.optional(z55.string()),
14232
+ applyTo: z55.optional(z55.string()),
14233
+ excludeAgent: z55.optional(z55.union([z55.literal("code-review"), z55.literal("coding-agent")]))
14081
14234
  });
14082
14235
  var CopilotRule = class _CopilotRule extends ToolRule {
14083
14236
  frontmatter;
@@ -14109,7 +14262,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
14109
14262
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
14110
14263
  if (!result.success) {
14111
14264
  throw new Error(
14112
- `Invalid frontmatter in ${join101(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14265
+ `Invalid frontmatter in ${join102(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14113
14266
  );
14114
14267
  }
14115
14268
  }
@@ -14199,8 +14352,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
14199
14352
  const paths = this.getSettablePaths({ global });
14200
14353
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
14201
14354
  if (isRoot) {
14202
- const relativePath2 = join101(paths.root.relativeDirPath, paths.root.relativeFilePath);
14203
- const filePath2 = join101(baseDir, relativePath2);
14355
+ const relativePath2 = join102(paths.root.relativeDirPath, paths.root.relativeFilePath);
14356
+ const filePath2 = join102(baseDir, relativePath2);
14204
14357
  const fileContent2 = await readFileContent(filePath2);
14205
14358
  return new _CopilotRule({
14206
14359
  baseDir,
@@ -14215,8 +14368,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
14215
14368
  if (!paths.nonRoot) {
14216
14369
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14217
14370
  }
14218
- const relativePath = join101(paths.nonRoot.relativeDirPath, relativeFilePath);
14219
- const filePath = join101(baseDir, relativePath);
14371
+ const relativePath = join102(paths.nonRoot.relativeDirPath, relativeFilePath);
14372
+ const filePath = join102(baseDir, relativePath);
14220
14373
  const fileContent = await readFileContent(filePath);
14221
14374
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14222
14375
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
@@ -14262,7 +14415,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
14262
14415
  return {
14263
14416
  success: false,
14264
14417
  error: new Error(
14265
- `Invalid frontmatter in ${join101(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14418
+ `Invalid frontmatter in ${join102(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14266
14419
  )
14267
14420
  };
14268
14421
  }
@@ -14282,12 +14435,12 @@ var CopilotRule = class _CopilotRule extends ToolRule {
14282
14435
  };
14283
14436
 
14284
14437
  // src/features/rules/cursor-rule.ts
14285
- import { join as join102 } from "path";
14286
- import { z as z55 } from "zod/mini";
14287
- var CursorRuleFrontmatterSchema = z55.object({
14288
- description: z55.optional(z55.string()),
14289
- globs: z55.optional(z55.string()),
14290
- alwaysApply: z55.optional(z55.boolean())
14438
+ import { join as join103 } from "path";
14439
+ import { z as z56 } from "zod/mini";
14440
+ var CursorRuleFrontmatterSchema = z56.object({
14441
+ description: z56.optional(z56.string()),
14442
+ globs: z56.optional(z56.string()),
14443
+ alwaysApply: z56.optional(z56.boolean())
14291
14444
  });
14292
14445
  var CursorRule = class _CursorRule extends ToolRule {
14293
14446
  frontmatter;
@@ -14304,7 +14457,7 @@ var CursorRule = class _CursorRule extends ToolRule {
14304
14457
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
14305
14458
  if (!result.success) {
14306
14459
  throw new Error(
14307
- `Invalid frontmatter in ${join102(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14460
+ `Invalid frontmatter in ${join103(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14308
14461
  );
14309
14462
  }
14310
14463
  }
@@ -14420,7 +14573,7 @@ var CursorRule = class _CursorRule extends ToolRule {
14420
14573
  relativeFilePath,
14421
14574
  validate = true
14422
14575
  }) {
14423
- const filePath = join102(
14576
+ const filePath = join103(
14424
14577
  baseDir,
14425
14578
  this.getSettablePaths().nonRoot.relativeDirPath,
14426
14579
  relativeFilePath
@@ -14430,7 +14583,7 @@ var CursorRule = class _CursorRule extends ToolRule {
14430
14583
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
14431
14584
  if (!result.success) {
14432
14585
  throw new Error(
14433
- `Invalid frontmatter in ${join102(baseDir, relativeFilePath)}: ${formatError(result.error)}`
14586
+ `Invalid frontmatter in ${join103(baseDir, relativeFilePath)}: ${formatError(result.error)}`
14434
14587
  );
14435
14588
  }
14436
14589
  return new _CursorRule({
@@ -14467,7 +14620,7 @@ var CursorRule = class _CursorRule extends ToolRule {
14467
14620
  return {
14468
14621
  success: false,
14469
14622
  error: new Error(
14470
- `Invalid frontmatter in ${join102(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14623
+ `Invalid frontmatter in ${join103(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14471
14624
  )
14472
14625
  };
14473
14626
  }
@@ -14487,7 +14640,7 @@ var CursorRule = class _CursorRule extends ToolRule {
14487
14640
  };
14488
14641
 
14489
14642
  // src/features/rules/factorydroid-rule.ts
14490
- import { join as join103 } from "path";
14643
+ import { join as join104 } from "path";
14491
14644
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
14492
14645
  constructor({ fileContent, root, ...rest }) {
14493
14646
  super({
@@ -14527,8 +14680,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
14527
14680
  const paths = this.getSettablePaths({ global });
14528
14681
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
14529
14682
  if (isRoot) {
14530
- const relativePath2 = join103(paths.root.relativeDirPath, paths.root.relativeFilePath);
14531
- const fileContent2 = await readFileContent(join103(baseDir, relativePath2));
14683
+ const relativePath2 = join104(paths.root.relativeDirPath, paths.root.relativeFilePath);
14684
+ const fileContent2 = await readFileContent(join104(baseDir, relativePath2));
14532
14685
  return new _FactorydroidRule({
14533
14686
  baseDir,
14534
14687
  relativeDirPath: paths.root.relativeDirPath,
@@ -14541,8 +14694,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
14541
14694
  if (!paths.nonRoot) {
14542
14695
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14543
14696
  }
14544
- const relativePath = join103(paths.nonRoot.relativeDirPath, relativeFilePath);
14545
- const fileContent = await readFileContent(join103(baseDir, relativePath));
14697
+ const relativePath = join104(paths.nonRoot.relativeDirPath, relativeFilePath);
14698
+ const fileContent = await readFileContent(join104(baseDir, relativePath));
14546
14699
  return new _FactorydroidRule({
14547
14700
  baseDir,
14548
14701
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -14601,7 +14754,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
14601
14754
  };
14602
14755
 
14603
14756
  // src/features/rules/geminicli-rule.ts
14604
- import { join as join104 } from "path";
14757
+ import { join as join105 } from "path";
14605
14758
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
14606
14759
  static getSettablePaths({
14607
14760
  global,
@@ -14636,7 +14789,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
14636
14789
  if (isRoot) {
14637
14790
  const relativePath2 = paths.root.relativeFilePath;
14638
14791
  const fileContent2 = await readFileContent(
14639
- join104(baseDir, paths.root.relativeDirPath, relativePath2)
14792
+ join105(baseDir, paths.root.relativeDirPath, relativePath2)
14640
14793
  );
14641
14794
  return new _GeminiCliRule({
14642
14795
  baseDir,
@@ -14650,8 +14803,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
14650
14803
  if (!paths.nonRoot) {
14651
14804
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14652
14805
  }
14653
- const relativePath = join104(paths.nonRoot.relativeDirPath, relativeFilePath);
14654
- const fileContent = await readFileContent(join104(baseDir, relativePath));
14806
+ const relativePath = join105(paths.nonRoot.relativeDirPath, relativeFilePath);
14807
+ const fileContent = await readFileContent(join105(baseDir, relativePath));
14655
14808
  return new _GeminiCliRule({
14656
14809
  baseDir,
14657
14810
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -14710,7 +14863,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
14710
14863
  };
14711
14864
 
14712
14865
  // src/features/rules/goose-rule.ts
14713
- import { join as join105 } from "path";
14866
+ import { join as join106 } from "path";
14714
14867
  var GooseRule = class _GooseRule extends ToolRule {
14715
14868
  static getSettablePaths({
14716
14869
  global,
@@ -14745,7 +14898,7 @@ var GooseRule = class _GooseRule extends ToolRule {
14745
14898
  if (isRoot) {
14746
14899
  const relativePath2 = paths.root.relativeFilePath;
14747
14900
  const fileContent2 = await readFileContent(
14748
- join105(baseDir, paths.root.relativeDirPath, relativePath2)
14901
+ join106(baseDir, paths.root.relativeDirPath, relativePath2)
14749
14902
  );
14750
14903
  return new _GooseRule({
14751
14904
  baseDir,
@@ -14759,8 +14912,8 @@ var GooseRule = class _GooseRule extends ToolRule {
14759
14912
  if (!paths.nonRoot) {
14760
14913
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
14761
14914
  }
14762
- const relativePath = join105(paths.nonRoot.relativeDirPath, relativeFilePath);
14763
- const fileContent = await readFileContent(join105(baseDir, relativePath));
14915
+ const relativePath = join106(paths.nonRoot.relativeDirPath, relativeFilePath);
14916
+ const fileContent = await readFileContent(join106(baseDir, relativePath));
14764
14917
  return new _GooseRule({
14765
14918
  baseDir,
14766
14919
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -14819,7 +14972,7 @@ var GooseRule = class _GooseRule extends ToolRule {
14819
14972
  };
14820
14973
 
14821
14974
  // src/features/rules/junie-rule.ts
14822
- import { join as join106 } from "path";
14975
+ import { join as join107 } from "path";
14823
14976
  var JunieRule = class _JunieRule extends ToolRule {
14824
14977
  static getSettablePaths(_options = {}) {
14825
14978
  return {
@@ -14838,8 +14991,8 @@ var JunieRule = class _JunieRule extends ToolRule {
14838
14991
  validate = true
14839
14992
  }) {
14840
14993
  const isRoot = relativeFilePath === "guidelines.md";
14841
- const relativePath = isRoot ? "guidelines.md" : join106(".junie", "memories", relativeFilePath);
14842
- const fileContent = await readFileContent(join106(baseDir, relativePath));
14994
+ const relativePath = isRoot ? "guidelines.md" : join107(".junie", "memories", relativeFilePath);
14995
+ const fileContent = await readFileContent(join107(baseDir, relativePath));
14843
14996
  return new _JunieRule({
14844
14997
  baseDir,
14845
14998
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -14894,7 +15047,7 @@ var JunieRule = class _JunieRule extends ToolRule {
14894
15047
  };
14895
15048
 
14896
15049
  // src/features/rules/kilo-rule.ts
14897
- import { join as join107 } from "path";
15050
+ import { join as join108 } from "path";
14898
15051
  var KiloRule = class _KiloRule extends ToolRule {
14899
15052
  static getSettablePaths(_options = {}) {
14900
15053
  return {
@@ -14909,7 +15062,7 @@ var KiloRule = class _KiloRule extends ToolRule {
14909
15062
  validate = true
14910
15063
  }) {
14911
15064
  const fileContent = await readFileContent(
14912
- join107(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15065
+ join108(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14913
15066
  );
14914
15067
  return new _KiloRule({
14915
15068
  baseDir,
@@ -14961,7 +15114,7 @@ var KiloRule = class _KiloRule extends ToolRule {
14961
15114
  };
14962
15115
 
14963
15116
  // src/features/rules/kiro-rule.ts
14964
- import { join as join108 } from "path";
15117
+ import { join as join109 } from "path";
14965
15118
  var KiroRule = class _KiroRule extends ToolRule {
14966
15119
  static getSettablePaths(_options = {}) {
14967
15120
  return {
@@ -14976,7 +15129,7 @@ var KiroRule = class _KiroRule extends ToolRule {
14976
15129
  validate = true
14977
15130
  }) {
14978
15131
  const fileContent = await readFileContent(
14979
- join108(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15132
+ join109(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
14980
15133
  );
14981
15134
  return new _KiroRule({
14982
15135
  baseDir,
@@ -15030,7 +15183,7 @@ var KiroRule = class _KiroRule extends ToolRule {
15030
15183
  };
15031
15184
 
15032
15185
  // src/features/rules/opencode-rule.ts
15033
- import { join as join109 } from "path";
15186
+ import { join as join110 } from "path";
15034
15187
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
15035
15188
  static getSettablePaths({
15036
15189
  global,
@@ -15065,7 +15218,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
15065
15218
  if (isRoot) {
15066
15219
  const relativePath2 = paths.root.relativeFilePath;
15067
15220
  const fileContent2 = await readFileContent(
15068
- join109(baseDir, paths.root.relativeDirPath, relativePath2)
15221
+ join110(baseDir, paths.root.relativeDirPath, relativePath2)
15069
15222
  );
15070
15223
  return new _OpenCodeRule({
15071
15224
  baseDir,
@@ -15079,8 +15232,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
15079
15232
  if (!paths.nonRoot) {
15080
15233
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
15081
15234
  }
15082
- const relativePath = join109(paths.nonRoot.relativeDirPath, relativeFilePath);
15083
- const fileContent = await readFileContent(join109(baseDir, relativePath));
15235
+ const relativePath = join110(paths.nonRoot.relativeDirPath, relativeFilePath);
15236
+ const fileContent = await readFileContent(join110(baseDir, relativePath));
15084
15237
  return new _OpenCodeRule({
15085
15238
  baseDir,
15086
15239
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -15139,7 +15292,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
15139
15292
  };
15140
15293
 
15141
15294
  // src/features/rules/qwencode-rule.ts
15142
- import { join as join110 } from "path";
15295
+ import { join as join111 } from "path";
15143
15296
  var QwencodeRule = class _QwencodeRule extends ToolRule {
15144
15297
  static getSettablePaths(_options = {}) {
15145
15298
  return {
@@ -15158,8 +15311,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
15158
15311
  validate = true
15159
15312
  }) {
15160
15313
  const isRoot = relativeFilePath === "QWEN.md";
15161
- const relativePath = isRoot ? "QWEN.md" : join110(".qwen", "memories", relativeFilePath);
15162
- const fileContent = await readFileContent(join110(baseDir, relativePath));
15314
+ const relativePath = isRoot ? "QWEN.md" : join111(".qwen", "memories", relativeFilePath);
15315
+ const fileContent = await readFileContent(join111(baseDir, relativePath));
15163
15316
  return new _QwencodeRule({
15164
15317
  baseDir,
15165
15318
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -15211,7 +15364,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
15211
15364
  };
15212
15365
 
15213
15366
  // src/features/rules/replit-rule.ts
15214
- import { join as join111 } from "path";
15367
+ import { join as join112 } from "path";
15215
15368
  var ReplitRule = class _ReplitRule extends ToolRule {
15216
15369
  static getSettablePaths(_options = {}) {
15217
15370
  return {
@@ -15233,7 +15386,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
15233
15386
  }
15234
15387
  const relativePath = paths.root.relativeFilePath;
15235
15388
  const fileContent = await readFileContent(
15236
- join111(baseDir, paths.root.relativeDirPath, relativePath)
15389
+ join112(baseDir, paths.root.relativeDirPath, relativePath)
15237
15390
  );
15238
15391
  return new _ReplitRule({
15239
15392
  baseDir,
@@ -15299,7 +15452,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
15299
15452
  };
15300
15453
 
15301
15454
  // src/features/rules/roo-rule.ts
15302
- import { join as join112 } from "path";
15455
+ import { join as join113 } from "path";
15303
15456
  var RooRule = class _RooRule extends ToolRule {
15304
15457
  static getSettablePaths(_options = {}) {
15305
15458
  return {
@@ -15314,7 +15467,7 @@ var RooRule = class _RooRule extends ToolRule {
15314
15467
  validate = true
15315
15468
  }) {
15316
15469
  const fileContent = await readFileContent(
15317
- join112(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15470
+ join113(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15318
15471
  );
15319
15472
  return new _RooRule({
15320
15473
  baseDir,
@@ -15383,7 +15536,7 @@ var RooRule = class _RooRule extends ToolRule {
15383
15536
  };
15384
15537
 
15385
15538
  // src/features/rules/warp-rule.ts
15386
- import { join as join113 } from "path";
15539
+ import { join as join114 } from "path";
15387
15540
  var WarpRule = class _WarpRule extends ToolRule {
15388
15541
  constructor({ fileContent, root, ...rest }) {
15389
15542
  super({
@@ -15409,8 +15562,8 @@ var WarpRule = class _WarpRule extends ToolRule {
15409
15562
  validate = true
15410
15563
  }) {
15411
15564
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
15412
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join113(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
15413
- const fileContent = await readFileContent(join113(baseDir, relativePath));
15565
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join114(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
15566
+ const fileContent = await readFileContent(join114(baseDir, relativePath));
15414
15567
  return new _WarpRule({
15415
15568
  baseDir,
15416
15569
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -15465,7 +15618,7 @@ var WarpRule = class _WarpRule extends ToolRule {
15465
15618
  };
15466
15619
 
15467
15620
  // src/features/rules/windsurf-rule.ts
15468
- import { join as join114 } from "path";
15621
+ import { join as join115 } from "path";
15469
15622
  var WindsurfRule = class _WindsurfRule extends ToolRule {
15470
15623
  static getSettablePaths(_options = {}) {
15471
15624
  return {
@@ -15480,7 +15633,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
15480
15633
  validate = true
15481
15634
  }) {
15482
15635
  const fileContent = await readFileContent(
15483
- join114(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15636
+ join115(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
15484
15637
  );
15485
15638
  return new _WindsurfRule({
15486
15639
  baseDir,
@@ -15556,8 +15709,8 @@ var rulesProcessorToolTargets = [
15556
15709
  "warp",
15557
15710
  "windsurf"
15558
15711
  ];
15559
- var RulesProcessorToolTargetSchema = z56.enum(rulesProcessorToolTargets);
15560
- var formatRulePaths = (rules) => rules.map((r) => join115(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
15712
+ var RulesProcessorToolTargetSchema = z57.enum(rulesProcessorToolTargets);
15713
+ var formatRulePaths = (rules) => rules.map((r) => join116(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
15561
15714
  var toolRuleFactories = /* @__PURE__ */ new Map([
15562
15715
  [
15563
15716
  "agentsmd",
@@ -15932,7 +16085,7 @@ var RulesProcessor = class extends FeatureProcessor {
15932
16085
  }).relativeDirPath;
15933
16086
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
15934
16087
  const frontmatter = skill.getFrontmatter();
15935
- const relativePath = join115(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
16088
+ const relativePath = join116(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
15936
16089
  return {
15937
16090
  name: frontmatter.name,
15938
16091
  description: frontmatter.description,
@@ -16045,8 +16198,8 @@ var RulesProcessor = class extends FeatureProcessor {
16045
16198
  * Load and parse rulesync rule files from .rulesync/rules/ directory
16046
16199
  */
16047
16200
  async loadRulesyncFiles() {
16048
- const rulesyncBaseDir = join115(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
16049
- const files = await findFilesByGlobs(join115(rulesyncBaseDir, "**", "*.md"));
16201
+ const rulesyncBaseDir = join116(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
16202
+ const files = await findFilesByGlobs(join116(rulesyncBaseDir, "**", "*.md"));
16050
16203
  logger.debug(`Found ${files.length} rulesync files`);
16051
16204
  const rulesyncRules = await Promise.all(
16052
16205
  files.map((file) => {
@@ -16143,13 +16296,13 @@ var RulesProcessor = class extends FeatureProcessor {
16143
16296
  return [];
16144
16297
  }
16145
16298
  const uniqueRootFilePaths = await findFilesWithFallback(
16146
- join115(
16299
+ join116(
16147
16300
  this.baseDir,
16148
16301
  settablePaths.root.relativeDirPath ?? ".",
16149
16302
  settablePaths.root.relativeFilePath
16150
16303
  ),
16151
16304
  settablePaths.alternativeRoots,
16152
- (alt) => join115(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
16305
+ (alt) => join116(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
16153
16306
  );
16154
16307
  if (forDeletion) {
16155
16308
  return uniqueRootFilePaths.map((filePath) => {
@@ -16194,9 +16347,9 @@ var RulesProcessor = class extends FeatureProcessor {
16194
16347
  return [];
16195
16348
  }
16196
16349
  const uniqueLocalRootFilePaths = await findFilesWithFallback(
16197
- join115(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
16350
+ join116(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
16198
16351
  settablePaths.alternativeRoots,
16199
- (alt) => join115(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
16352
+ (alt) => join116(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
16200
16353
  );
16201
16354
  return uniqueLocalRootFilePaths.map((filePath) => {
16202
16355
  const relativeDirPath = resolveRelativeDirPath(filePath);
@@ -16217,9 +16370,9 @@ var RulesProcessor = class extends FeatureProcessor {
16217
16370
  if (!settablePaths.nonRoot) {
16218
16371
  return [];
16219
16372
  }
16220
- const nonRootBaseDir = join115(this.baseDir, settablePaths.nonRoot.relativeDirPath);
16373
+ const nonRootBaseDir = join116(this.baseDir, settablePaths.nonRoot.relativeDirPath);
16221
16374
  const nonRootFilePaths = await findFilesByGlobs(
16222
- join115(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
16375
+ join116(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
16223
16376
  );
16224
16377
  if (forDeletion) {
16225
16378
  return nonRootFilePaths.map((filePath) => {
@@ -16351,14 +16504,14 @@ s/<command> [arguments]
16351
16504
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
16352
16505
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
16353
16506
 
16354
- When users call a custom slash command, you have to look for the markdown file, \`${join115(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
16507
+ When users call a custom slash command, you have to look for the markdown file, \`${join116(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
16355
16508
  const subagentsSection = subagents ? `## Simulated Subagents
16356
16509
 
16357
16510
  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.
16358
16511
 
16359
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${join115(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
16512
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${join116(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
16360
16513
 
16361
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join115(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
16514
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join116(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
16362
16515
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
16363
16516
  const result = [
16364
16517
  overview,
@@ -16438,7 +16591,7 @@ function warnUnsupportedTargets(params) {
16438
16591
  }
16439
16592
  }
16440
16593
  async function checkRulesyncDirExists(params) {
16441
- return fileExists(join116(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
16594
+ return fileExists(join117(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
16442
16595
  }
16443
16596
  async function generate(params) {
16444
16597
  const { config } = params;
@@ -16996,6 +17149,8 @@ export {
16996
17149
  RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH,
16997
17150
  RULESYNC_MCP_FILE_NAME,
16998
17151
  RULESYNC_HOOKS_FILE_NAME,
17152
+ RULESYNC_CONFIG_SCHEMA_URL,
17153
+ RULESYNC_MCP_SCHEMA_URL,
16999
17154
  MAX_FILE_SIZE,
17000
17155
  FETCH_CONCURRENCY_LIMIT,
17001
17156
  formatError,