rulesync 7.30.0 → 8.0.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.
@@ -656,7 +656,7 @@ function getBaseDirsInLightOfGlobal({
656
656
  }
657
657
 
658
658
  // src/lib/generate.ts
659
- import { join as join134 } from "path";
659
+ import { join as join136 } from "path";
660
660
  import { intersection } from "es-toolkit";
661
661
 
662
662
  // src/features/commands/commands-processor.ts
@@ -6830,7 +6830,8 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
6830
6830
  relativeDirPath: paths.relativeDirPath,
6831
6831
  relativeFilePath: paths.relativeFilePath,
6832
6832
  fileContent: JSON.stringify(newJson, null, 2),
6833
- validate
6833
+ validate,
6834
+ global
6834
6835
  });
6835
6836
  }
6836
6837
  static async fromRulesyncMcp({
@@ -6851,7 +6852,8 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
6851
6852
  relativeDirPath: paths.relativeDirPath,
6852
6853
  relativeFilePath: paths.relativeFilePath,
6853
6854
  fileContent: JSON.stringify(mcpJson, null, 2),
6854
- validate
6855
+ validate,
6856
+ global
6855
6857
  });
6856
6858
  }
6857
6859
  toRulesyncMcp() {
@@ -8970,7 +8972,7 @@ var McpProcessor = class extends FeatureProcessor {
8970
8972
  };
8971
8973
 
8972
8974
  // src/features/permissions/permissions-processor.ts
8973
- import { z as z30 } from "zod/mini";
8975
+ import { z as z31 } from "zod/mini";
8974
8976
 
8975
8977
  // src/features/permissions/claudecode-permissions.ts
8976
8978
  import { join as join62 } from "path";
@@ -9295,16 +9297,382 @@ function convertClaudeToRulesyncPermissions(params) {
9295
9297
  return { permission };
9296
9298
  }
9297
9299
 
9298
- // src/features/permissions/opencode-permissions.ts
9300
+ // src/features/permissions/codexcli-permissions.ts
9299
9301
  import { join as join63 } from "path";
9300
- import { parse as parseJsonc5 } from "jsonc-parser";
9302
+ import * as smolToml4 from "smol-toml";
9303
+ var RULESYNC_PROFILE_NAME = "rulesync";
9304
+ var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
9305
+ static getSettablePaths(_options = {}) {
9306
+ return {
9307
+ relativeDirPath: ".codex",
9308
+ relativeFilePath: "config.toml"
9309
+ };
9310
+ }
9311
+ isDeletable() {
9312
+ return false;
9313
+ }
9314
+ static async fromFile({
9315
+ baseDir = process.cwd(),
9316
+ validate = true,
9317
+ global = false
9318
+ }) {
9319
+ const paths = this.getSettablePaths({ global });
9320
+ const filePath = join63(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9321
+ const fileContent = await readFileContentOrNull(filePath) ?? smolToml4.stringify({});
9322
+ return new _CodexcliPermissions({
9323
+ baseDir,
9324
+ relativeDirPath: paths.relativeDirPath,
9325
+ relativeFilePath: paths.relativeFilePath,
9326
+ fileContent,
9327
+ validate
9328
+ });
9329
+ }
9330
+ static async fromRulesyncPermissions({
9331
+ baseDir = process.cwd(),
9332
+ rulesyncPermissions,
9333
+ validate = true,
9334
+ logger,
9335
+ global = false
9336
+ }) {
9337
+ const paths = this.getSettablePaths({ global });
9338
+ const filePath = join63(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9339
+ const existingContent = await readFileContentOrNull(filePath) ?? smolToml4.stringify({});
9340
+ const parsed = toMutableTable(smolToml4.parse(existingContent));
9341
+ const profile = convertRulesyncToCodexProfile({
9342
+ config: rulesyncPermissions.getJson(),
9343
+ logger
9344
+ });
9345
+ const permissionsTable = toMutableTable(parsed.permissions);
9346
+ permissionsTable[RULESYNC_PROFILE_NAME] = profile;
9347
+ parsed.permissions = permissionsTable;
9348
+ parsed.default_permissions = RULESYNC_PROFILE_NAME;
9349
+ return new _CodexcliPermissions({
9350
+ baseDir,
9351
+ relativeDirPath: paths.relativeDirPath,
9352
+ relativeFilePath: paths.relativeFilePath,
9353
+ fileContent: smolToml4.stringify(parsed),
9354
+ validate
9355
+ });
9356
+ }
9357
+ toRulesyncPermissions() {
9358
+ let parsed;
9359
+ try {
9360
+ parsed = smolToml4.parse(this.getFileContent());
9361
+ } catch (error) {
9362
+ throw new Error(
9363
+ `Failed to parse Codex CLI permissions content in ${join63(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
9364
+ { cause: error }
9365
+ );
9366
+ }
9367
+ const table = toMutableTable(parsed);
9368
+ const defaultProfile = typeof table.default_permissions === "string" ? table.default_permissions : void 0;
9369
+ const permissionsTable = toMutableTable(table.permissions);
9370
+ const profile = toCodexProfile(permissionsTable[defaultProfile ?? RULESYNC_PROFILE_NAME]) ?? toCodexProfile(permissionsTable[RULESYNC_PROFILE_NAME]);
9371
+ const config = convertCodexProfileToRulesync(profile);
9372
+ return this.toRulesyncPermissionsDefault({
9373
+ fileContent: JSON.stringify(config, null, 2)
9374
+ });
9375
+ }
9376
+ validate() {
9377
+ return { success: true, error: null };
9378
+ }
9379
+ static forDeletion({
9380
+ baseDir = process.cwd(),
9381
+ relativeDirPath,
9382
+ relativeFilePath
9383
+ }) {
9384
+ return new _CodexcliPermissions({
9385
+ baseDir,
9386
+ relativeDirPath,
9387
+ relativeFilePath,
9388
+ fileContent: smolToml4.stringify({}),
9389
+ validate: false
9390
+ });
9391
+ }
9392
+ };
9393
+ function convertRulesyncToCodexProfile({
9394
+ config,
9395
+ logger
9396
+ }) {
9397
+ const filesystem = {};
9398
+ const domains = {};
9399
+ for (const [toolName, rules] of Object.entries(config.permission)) {
9400
+ if (toolName === "read") {
9401
+ for (const [pattern, action] of Object.entries(rules)) {
9402
+ filesystem[pattern] = mapReadAction(action);
9403
+ }
9404
+ continue;
9405
+ }
9406
+ if (toolName === "edit" || toolName === "write") {
9407
+ for (const [pattern, action] of Object.entries(rules)) {
9408
+ filesystem[pattern] = mapWriteAction(action);
9409
+ }
9410
+ continue;
9411
+ }
9412
+ if (toolName === "webfetch") {
9413
+ for (const [pattern, action] of Object.entries(rules)) {
9414
+ if (action === "ask") {
9415
+ logger?.warn(
9416
+ `Codex CLI does not support "ask" for network domain permissions. Skipping webfetch rule: ${pattern}`
9417
+ );
9418
+ continue;
9419
+ }
9420
+ domains[pattern] = action;
9421
+ }
9422
+ continue;
9423
+ }
9424
+ logger?.warn(
9425
+ `Codex CLI permissions support only read/edit/write/webfetch categories. Skipping: ${toolName}`
9426
+ );
9427
+ }
9428
+ return {
9429
+ ...Object.keys(filesystem).length > 0 ? { filesystem } : {},
9430
+ ...Object.keys(domains).length > 0 ? { network: { domains } } : {}
9431
+ };
9432
+ }
9433
+ function convertCodexProfileToRulesync(profile) {
9434
+ const permission = {};
9435
+ if (profile?.filesystem) {
9436
+ permission.read = {};
9437
+ permission.edit = {};
9438
+ for (const [pattern, access] of Object.entries(profile.filesystem)) {
9439
+ if (access === "none") {
9440
+ permission.read[pattern] = "deny";
9441
+ permission.edit[pattern] = "deny";
9442
+ } else if (access === "read") {
9443
+ permission.read[pattern] = "allow";
9444
+ } else {
9445
+ permission.edit[pattern] = "allow";
9446
+ }
9447
+ }
9448
+ }
9449
+ if (profile?.network?.domains) {
9450
+ permission.webfetch = {};
9451
+ for (const [domain, value] of Object.entries(profile.network.domains)) {
9452
+ permission.webfetch[domain] = value;
9453
+ }
9454
+ }
9455
+ return { permission };
9456
+ }
9457
+ function toCodexProfile(value) {
9458
+ if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
9459
+ const table = toMutableTable(value);
9460
+ const filesystem = toFilesystemRecord(table.filesystem);
9461
+ const networkRaw = toMutableTable(table.network);
9462
+ const domains = toDomainRecord(networkRaw.domains);
9463
+ return {
9464
+ ...filesystem ? { filesystem } : {},
9465
+ ...domains ? { network: { domains } } : {}
9466
+ };
9467
+ }
9468
+ function toMutableTable(value) {
9469
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
9470
+ return {};
9471
+ }
9472
+ return { ...value };
9473
+ }
9474
+ function toFilesystemRecord(value) {
9475
+ if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
9476
+ const result = {};
9477
+ for (const [key, raw] of Object.entries(value)) {
9478
+ if (typeof raw !== "string") continue;
9479
+ if (raw === "read" || raw === "write" || raw === "none") {
9480
+ result[key] = raw;
9481
+ }
9482
+ }
9483
+ return Object.keys(result).length > 0 ? result : void 0;
9484
+ }
9485
+ function toDomainRecord(value) {
9486
+ if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
9487
+ const result = {};
9488
+ for (const [key, raw] of Object.entries(value)) {
9489
+ if (raw === "allow" || raw === "deny") {
9490
+ result[key] = raw;
9491
+ }
9492
+ }
9493
+ return Object.keys(result).length > 0 ? result : void 0;
9494
+ }
9495
+ function mapReadAction(action) {
9496
+ return action === "allow" ? "read" : "none";
9497
+ }
9498
+ function mapWriteAction(action) {
9499
+ return action === "allow" ? "write" : "none";
9500
+ }
9501
+
9502
+ // src/features/permissions/geminicli-permissions.ts
9503
+ import { join as join64 } from "path";
9301
9504
  import { z as z29 } from "zod/mini";
9302
- var OpencodePermissionSchema = z29.union([
9303
- z29.enum(["allow", "ask", "deny"]),
9304
- z29.record(z29.string(), z29.enum(["allow", "ask", "deny"]))
9505
+ var GeminiCliSettingsSchema = z29.looseObject({
9506
+ tools: z29.optional(
9507
+ z29.looseObject({
9508
+ allowed: z29.optional(z29.array(z29.string())),
9509
+ exclude: z29.optional(z29.array(z29.string()))
9510
+ })
9511
+ )
9512
+ });
9513
+ var RULESYNC_TO_GEMINICLI_TOOL_NAME = {
9514
+ bash: "run_shell_command",
9515
+ read: "read_file",
9516
+ edit: "replace",
9517
+ write: "write_file",
9518
+ webfetch: "web_fetch"
9519
+ };
9520
+ var GeminicliPermissions = class _GeminicliPermissions extends ToolPermissions {
9521
+ static getSettablePaths(_options = {}) {
9522
+ return {
9523
+ relativeDirPath: ".gemini",
9524
+ relativeFilePath: "settings.json"
9525
+ };
9526
+ }
9527
+ isDeletable() {
9528
+ return false;
9529
+ }
9530
+ static async fromFile({
9531
+ baseDir = process.cwd(),
9532
+ validate = true,
9533
+ global = false
9534
+ }) {
9535
+ const paths = this.getSettablePaths({ global });
9536
+ const filePath = join64(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9537
+ const fileContent = await readFileContentOrNull(filePath) ?? JSON.stringify({}, null, 2);
9538
+ return new _GeminicliPermissions({
9539
+ baseDir,
9540
+ relativeDirPath: paths.relativeDirPath,
9541
+ relativeFilePath: paths.relativeFilePath,
9542
+ fileContent,
9543
+ validate
9544
+ });
9545
+ }
9546
+ static async fromRulesyncPermissions({
9547
+ baseDir = process.cwd(),
9548
+ rulesyncPermissions,
9549
+ validate = true,
9550
+ logger,
9551
+ global = false
9552
+ }) {
9553
+ const paths = this.getSettablePaths({ global });
9554
+ const filePath = join64(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9555
+ const existingContent = await readFileContentOrNull(filePath) ?? JSON.stringify({}, null, 2);
9556
+ const settingsResult = GeminiCliSettingsSchema.safeParse(JSON.parse(existingContent));
9557
+ if (!settingsResult.success) {
9558
+ throw new Error(
9559
+ `Failed to parse existing Gemini CLI settings at ${filePath}: ${formatError(settingsResult.error)}`
9560
+ );
9561
+ }
9562
+ const { allowed, exclude } = convertRulesyncToGeminicliTools({
9563
+ config: rulesyncPermissions.getJson(),
9564
+ logger
9565
+ });
9566
+ const merged = {
9567
+ ...settingsResult.data,
9568
+ tools: {
9569
+ ...settingsResult.data.tools,
9570
+ ...allowed.length > 0 ? { allowed } : {},
9571
+ ...exclude.length > 0 ? { exclude } : {}
9572
+ }
9573
+ };
9574
+ return new _GeminicliPermissions({
9575
+ baseDir,
9576
+ relativeDirPath: paths.relativeDirPath,
9577
+ relativeFilePath: paths.relativeFilePath,
9578
+ fileContent: JSON.stringify(merged, null, 2),
9579
+ validate
9580
+ });
9581
+ }
9582
+ toRulesyncPermissions() {
9583
+ let settings;
9584
+ try {
9585
+ const parsed = JSON.parse(this.getFileContent());
9586
+ settings = GeminiCliSettingsSchema.parse(parsed);
9587
+ } catch (error) {
9588
+ throw new Error(
9589
+ `Failed to parse Gemini CLI permissions content in ${join64(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
9590
+ { cause: error }
9591
+ );
9592
+ }
9593
+ const permission = {};
9594
+ for (const toolEntry of settings.tools?.allowed ?? []) {
9595
+ const mapped = parseGeminicliToolEntry({ entry: toolEntry });
9596
+ const rules = permission[mapped.category] ??= {};
9597
+ rules[mapped.pattern] = "allow";
9598
+ }
9599
+ for (const toolEntry of settings.tools?.exclude ?? []) {
9600
+ const mapped = parseGeminicliToolEntry({ entry: toolEntry });
9601
+ const rules = permission[mapped.category] ??= {};
9602
+ rules[mapped.pattern] = "deny";
9603
+ }
9604
+ return this.toRulesyncPermissionsDefault({
9605
+ fileContent: JSON.stringify({ permission }, null, 2)
9606
+ });
9607
+ }
9608
+ validate() {
9609
+ return { success: true, error: null };
9610
+ }
9611
+ static forDeletion({
9612
+ baseDir = process.cwd(),
9613
+ relativeDirPath,
9614
+ relativeFilePath
9615
+ }) {
9616
+ return new _GeminicliPermissions({
9617
+ baseDir,
9618
+ relativeDirPath,
9619
+ relativeFilePath,
9620
+ fileContent: JSON.stringify({}, null, 2),
9621
+ validate: false
9622
+ });
9623
+ }
9624
+ };
9625
+ function convertRulesyncToGeminicliTools({
9626
+ config,
9627
+ logger
9628
+ }) {
9629
+ const allowed = [];
9630
+ const exclude = [];
9631
+ for (const [toolName, rules] of Object.entries(config.permission)) {
9632
+ const mappedToolName = RULESYNC_TO_GEMINICLI_TOOL_NAME[toolName] ?? toolName;
9633
+ if (!RULESYNC_TO_GEMINICLI_TOOL_NAME[toolName]) {
9634
+ logger?.warn(`Gemini CLI permissions use direct tool names. Mapping as-is: ${toolName}`);
9635
+ }
9636
+ for (const [pattern, action] of Object.entries(rules)) {
9637
+ if (action === "ask") {
9638
+ logger?.warn(
9639
+ `Gemini CLI does not support explicit "ask" rules in settings. Skipping ${toolName}:${pattern}`
9640
+ );
9641
+ continue;
9642
+ }
9643
+ const geminiEntry = pattern === "*" ? mappedToolName : `${mappedToolName}(${pattern})`;
9644
+ if (action === "allow") {
9645
+ allowed.push(geminiEntry);
9646
+ } else {
9647
+ exclude.push(geminiEntry);
9648
+ }
9649
+ }
9650
+ }
9651
+ return { allowed, exclude };
9652
+ }
9653
+ function parseGeminicliToolEntry({ entry }) {
9654
+ const match = /^([^()]+?)(?:\((.*)\))?$/.exec(entry);
9655
+ if (!match) return { category: entry, pattern: "*" };
9656
+ const rawToolName = match[1]?.trim() ?? entry;
9657
+ const mappedCategory = Object.entries(RULESYNC_TO_GEMINICLI_TOOL_NAME).find(
9658
+ ([, value]) => value === rawToolName
9659
+ )?.[0];
9660
+ return {
9661
+ category: mappedCategory ?? rawToolName,
9662
+ pattern: (match[2] ?? "*").trim()
9663
+ };
9664
+ }
9665
+
9666
+ // src/features/permissions/opencode-permissions.ts
9667
+ import { join as join65 } from "path";
9668
+ import { parse as parseJsonc5 } from "jsonc-parser";
9669
+ import { z as z30 } from "zod/mini";
9670
+ var OpencodePermissionSchema = z30.union([
9671
+ z30.enum(["allow", "ask", "deny"]),
9672
+ z30.record(z30.string(), z30.enum(["allow", "ask", "deny"]))
9305
9673
  ]);
9306
- var OpencodePermissionsConfigSchema = z29.looseObject({
9307
- permission: z29.optional(z29.record(z29.string(), OpencodePermissionSchema))
9674
+ var OpencodePermissionsConfigSchema = z30.looseObject({
9675
+ permission: z30.optional(z30.record(z30.string(), OpencodePermissionSchema))
9308
9676
  });
9309
9677
  var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
9310
9678
  json;
@@ -9321,7 +9689,7 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
9321
9689
  static getSettablePaths({
9322
9690
  global = false
9323
9691
  } = {}) {
9324
- return global ? { relativeDirPath: join63(".config", "opencode"), relativeFilePath: "opencode.json" } : { relativeDirPath: ".", relativeFilePath: "opencode.json" };
9692
+ return global ? { relativeDirPath: join65(".config", "opencode"), relativeFilePath: "opencode.json" } : { relativeDirPath: ".", relativeFilePath: "opencode.json" };
9325
9693
  }
9326
9694
  static async fromFile({
9327
9695
  baseDir = process.cwd(),
@@ -9329,9 +9697,9 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
9329
9697
  global = false
9330
9698
  }) {
9331
9699
  const basePaths = _OpencodePermissions.getSettablePaths({ global });
9332
- const jsonDir = join63(baseDir, basePaths.relativeDirPath);
9333
- const jsoncPath = join63(jsonDir, "opencode.jsonc");
9334
- const jsonPath = join63(jsonDir, "opencode.json");
9700
+ const jsonDir = join65(baseDir, basePaths.relativeDirPath);
9701
+ const jsoncPath = join65(jsonDir, "opencode.jsonc");
9702
+ const jsonPath = join65(jsonDir, "opencode.json");
9335
9703
  let fileContent = await readFileContentOrNull(jsoncPath);
9336
9704
  let relativeFilePath = "opencode.jsonc";
9337
9705
  if (!fileContent) {
@@ -9356,9 +9724,9 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
9356
9724
  global = false
9357
9725
  }) {
9358
9726
  const basePaths = _OpencodePermissions.getSettablePaths({ global });
9359
- const jsonDir = join63(baseDir, basePaths.relativeDirPath);
9360
- const jsoncPath = join63(jsonDir, "opencode.jsonc");
9361
- const jsonPath = join63(jsonDir, "opencode.json");
9727
+ const jsonDir = join65(baseDir, basePaths.relativeDirPath);
9728
+ const jsoncPath = join65(jsonDir, "opencode.jsonc");
9729
+ const jsonPath = join65(jsonDir, "opencode.json");
9362
9730
  let fileContent = await readFileContentOrNull(jsoncPath);
9363
9731
  let relativeFilePath = "opencode.jsonc";
9364
9732
  if (!fileContent) {
@@ -9428,8 +9796,13 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
9428
9796
  };
9429
9797
 
9430
9798
  // src/features/permissions/permissions-processor.ts
9431
- var permissionsProcessorToolTargetTuple = ["claudecode", "opencode"];
9432
- var PermissionsProcessorToolTargetSchema = z30.enum(permissionsProcessorToolTargetTuple);
9799
+ var permissionsProcessorToolTargetTuple = [
9800
+ "claudecode",
9801
+ "codexcli",
9802
+ "geminicli",
9803
+ "opencode"
9804
+ ];
9805
+ var PermissionsProcessorToolTargetSchema = z31.enum(permissionsProcessorToolTargetTuple);
9433
9806
  var toolPermissionsFactories = /* @__PURE__ */ new Map([
9434
9807
  [
9435
9808
  "claudecode",
@@ -9442,6 +9815,28 @@ var toolPermissionsFactories = /* @__PURE__ */ new Map([
9442
9815
  }
9443
9816
  }
9444
9817
  ],
9818
+ [
9819
+ "codexcli",
9820
+ {
9821
+ class: CodexcliPermissions,
9822
+ meta: {
9823
+ supportsProject: true,
9824
+ supportsGlobal: true,
9825
+ supportsImport: true
9826
+ }
9827
+ }
9828
+ ],
9829
+ [
9830
+ "geminicli",
9831
+ {
9832
+ class: GeminicliPermissions,
9833
+ meta: {
9834
+ supportsProject: true,
9835
+ supportsGlobal: true,
9836
+ supportsImport: true
9837
+ }
9838
+ }
9839
+ ],
9445
9840
  [
9446
9841
  "opencode",
9447
9842
  {
@@ -9552,25 +9947,25 @@ var PermissionsProcessor = class extends FeatureProcessor {
9552
9947
  };
9553
9948
 
9554
9949
  // src/features/rules/rules-processor.ts
9555
- import { basename as basename10, dirname as dirname3, join as join133, relative as relative5 } from "path";
9950
+ import { basename as basename10, dirname as dirname3, join as join135, relative as relative5 } from "path";
9556
9951
  import { encode } from "@toon-format/toon";
9557
- import { z as z69 } from "zod/mini";
9952
+ import { z as z70 } from "zod/mini";
9558
9953
 
9559
9954
  // src/constants/general.ts
9560
9955
  var SKILL_FILE_NAME = "SKILL.md";
9561
9956
 
9562
9957
  // src/features/skills/agentsmd-skill.ts
9563
- import { join as join67 } from "path";
9958
+ import { join as join69 } from "path";
9564
9959
 
9565
9960
  // src/features/skills/simulated-skill.ts
9566
- import { join as join66 } from "path";
9567
- import { z as z31 } from "zod/mini";
9961
+ import { join as join68 } from "path";
9962
+ import { z as z32 } from "zod/mini";
9568
9963
 
9569
9964
  // src/features/skills/tool-skill.ts
9570
- import { join as join65 } from "path";
9965
+ import { join as join67 } from "path";
9571
9966
 
9572
9967
  // src/types/ai-dir.ts
9573
- import path2, { basename as basename3, join as join64, relative as relative4, resolve as resolve4 } from "path";
9968
+ import path2, { basename as basename3, join as join66, relative as relative4, resolve as resolve4 } from "path";
9574
9969
  var AiDir = class {
9575
9970
  /**
9576
9971
  * @example "."
@@ -9667,8 +10062,8 @@ var AiDir = class {
9667
10062
  * @returns Array of files with their relative paths and buffers
9668
10063
  */
9669
10064
  static async collectOtherFiles(baseDir, relativeDirPath, dirName, excludeFileName) {
9670
- const dirPath = join64(baseDir, relativeDirPath, dirName);
9671
- const glob = join64(dirPath, "**", "*");
10065
+ const dirPath = join66(baseDir, relativeDirPath, dirName);
10066
+ const glob = join66(dirPath, "**", "*");
9672
10067
  const filePaths = await findFilesByGlobs(glob, { type: "file" });
9673
10068
  const filteredPaths = filePaths.filter((filePath) => basename3(filePath) !== excludeFileName);
9674
10069
  const files = await Promise.all(
@@ -9769,8 +10164,8 @@ var ToolSkill = class extends AiDir {
9769
10164
  }) {
9770
10165
  const settablePaths = getSettablePaths({ global });
9771
10166
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
9772
- const skillDirPath = join65(baseDir, actualRelativeDirPath, dirName);
9773
- const skillFilePath = join65(skillDirPath, SKILL_FILE_NAME);
10167
+ const skillDirPath = join67(baseDir, actualRelativeDirPath, dirName);
10168
+ const skillFilePath = join67(skillDirPath, SKILL_FILE_NAME);
9774
10169
  if (!await fileExists(skillFilePath)) {
9775
10170
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
9776
10171
  }
@@ -9794,16 +10189,16 @@ var ToolSkill = class extends AiDir {
9794
10189
  }
9795
10190
  requireMainFileFrontmatter() {
9796
10191
  if (!this.mainFile?.frontmatter) {
9797
- throw new Error(`Frontmatter is not defined in ${join65(this.relativeDirPath, this.dirName)}`);
10192
+ throw new Error(`Frontmatter is not defined in ${join67(this.relativeDirPath, this.dirName)}`);
9798
10193
  }
9799
10194
  return this.mainFile.frontmatter;
9800
10195
  }
9801
10196
  };
9802
10197
 
9803
10198
  // src/features/skills/simulated-skill.ts
9804
- var SimulatedSkillFrontmatterSchema = z31.looseObject({
9805
- name: z31.string(),
9806
- description: z31.string()
10199
+ var SimulatedSkillFrontmatterSchema = z32.looseObject({
10200
+ name: z32.string(),
10201
+ description: z32.string()
9807
10202
  });
9808
10203
  var SimulatedSkill = class extends ToolSkill {
9809
10204
  frontmatter;
@@ -9834,7 +10229,7 @@ var SimulatedSkill = class extends ToolSkill {
9834
10229
  const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
9835
10230
  if (!result.success) {
9836
10231
  throw new Error(
9837
- `Invalid frontmatter in ${join66(relativeDirPath, dirName)}: ${formatError(result.error)}`
10232
+ `Invalid frontmatter in ${join68(relativeDirPath, dirName)}: ${formatError(result.error)}`
9838
10233
  );
9839
10234
  }
9840
10235
  }
@@ -9893,8 +10288,8 @@ var SimulatedSkill = class extends ToolSkill {
9893
10288
  }) {
9894
10289
  const settablePaths = this.getSettablePaths();
9895
10290
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
9896
- const skillDirPath = join66(baseDir, actualRelativeDirPath, dirName);
9897
- const skillFilePath = join66(skillDirPath, SKILL_FILE_NAME);
10291
+ const skillDirPath = join68(baseDir, actualRelativeDirPath, dirName);
10292
+ const skillFilePath = join68(skillDirPath, SKILL_FILE_NAME);
9898
10293
  if (!await fileExists(skillFilePath)) {
9899
10294
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
9900
10295
  }
@@ -9971,7 +10366,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
9971
10366
  throw new Error("AgentsmdSkill does not support global mode.");
9972
10367
  }
9973
10368
  return {
9974
- relativeDirPath: join67(".agents", "skills")
10369
+ relativeDirPath: join69(".agents", "skills")
9975
10370
  };
9976
10371
  }
9977
10372
  static async fromDir(params) {
@@ -9998,11 +10393,11 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
9998
10393
  };
9999
10394
 
10000
10395
  // src/features/skills/factorydroid-skill.ts
10001
- import { join as join68 } from "path";
10396
+ import { join as join70 } from "path";
10002
10397
  var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
10003
10398
  static getSettablePaths(_options) {
10004
10399
  return {
10005
- relativeDirPath: join68(".factory", "skills")
10400
+ relativeDirPath: join70(".factory", "skills")
10006
10401
  };
10007
10402
  }
10008
10403
  static async fromDir(params) {
@@ -10029,50 +10424,50 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
10029
10424
  };
10030
10425
 
10031
10426
  // src/features/skills/rovodev-skill.ts
10032
- import { join as join70 } from "path";
10033
- import { z as z33 } from "zod/mini";
10427
+ import { join as join72 } from "path";
10428
+ import { z as z34 } from "zod/mini";
10034
10429
 
10035
10430
  // src/features/skills/rulesync-skill.ts
10036
- import { join as join69 } from "path";
10037
- import { z as z32 } from "zod/mini";
10038
- var RulesyncSkillFrontmatterSchemaInternal = z32.looseObject({
10039
- name: z32.string(),
10040
- description: z32.string(),
10041
- targets: z32._default(RulesyncTargetsSchema, ["*"]),
10042
- claudecode: z32.optional(
10043
- z32.looseObject({
10044
- "allowed-tools": z32.optional(z32.array(z32.string())),
10045
- model: z32.optional(z32.string()),
10046
- "disable-model-invocation": z32.optional(z32.boolean())
10431
+ import { join as join71 } from "path";
10432
+ import { z as z33 } from "zod/mini";
10433
+ var RulesyncSkillFrontmatterSchemaInternal = z33.looseObject({
10434
+ name: z33.string(),
10435
+ description: z33.string(),
10436
+ targets: z33._default(RulesyncTargetsSchema, ["*"]),
10437
+ claudecode: z33.optional(
10438
+ z33.looseObject({
10439
+ "allowed-tools": z33.optional(z33.array(z33.string())),
10440
+ model: z33.optional(z33.string()),
10441
+ "disable-model-invocation": z33.optional(z33.boolean())
10047
10442
  })
10048
10443
  ),
10049
- codexcli: z32.optional(
10050
- z32.looseObject({
10051
- "short-description": z32.optional(z32.string())
10444
+ codexcli: z33.optional(
10445
+ z33.looseObject({
10446
+ "short-description": z33.optional(z33.string())
10052
10447
  })
10053
10448
  ),
10054
- opencode: z32.optional(
10055
- z32.looseObject({
10056
- "allowed-tools": z32.optional(z32.array(z32.string()))
10449
+ opencode: z33.optional(
10450
+ z33.looseObject({
10451
+ "allowed-tools": z33.optional(z33.array(z33.string()))
10057
10452
  })
10058
10453
  ),
10059
- kilo: z32.optional(
10060
- z32.looseObject({
10061
- "allowed-tools": z32.optional(z32.array(z32.string()))
10454
+ kilo: z33.optional(
10455
+ z33.looseObject({
10456
+ "allowed-tools": z33.optional(z33.array(z33.string()))
10062
10457
  })
10063
10458
  ),
10064
- deepagents: z32.optional(
10065
- z32.looseObject({
10066
- "allowed-tools": z32.optional(z32.array(z32.string()))
10459
+ deepagents: z33.optional(
10460
+ z33.looseObject({
10461
+ "allowed-tools": z33.optional(z33.array(z33.string()))
10067
10462
  })
10068
10463
  ),
10069
- copilot: z32.optional(
10070
- z32.looseObject({
10071
- license: z32.optional(z32.string())
10464
+ copilot: z33.optional(
10465
+ z33.looseObject({
10466
+ license: z33.optional(z33.string())
10072
10467
  })
10073
10468
  ),
10074
- cline: z32.optional(z32.looseObject({})),
10075
- roo: z32.optional(z32.looseObject({}))
10469
+ cline: z33.optional(z33.looseObject({})),
10470
+ roo: z33.optional(z33.looseObject({}))
10076
10471
  });
10077
10472
  var RulesyncSkillFrontmatterSchema = RulesyncSkillFrontmatterSchemaInternal;
10078
10473
  var RulesyncSkill = class _RulesyncSkill extends AiDir {
@@ -10112,7 +10507,7 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
10112
10507
  }
10113
10508
  getFrontmatter() {
10114
10509
  if (!this.mainFile?.frontmatter) {
10115
- throw new Error(`Frontmatter is not defined in ${join69(this.relativeDirPath, this.dirName)}`);
10510
+ throw new Error(`Frontmatter is not defined in ${join71(this.relativeDirPath, this.dirName)}`);
10116
10511
  }
10117
10512
  const result = RulesyncSkillFrontmatterSchema.parse(this.mainFile.frontmatter);
10118
10513
  return result;
@@ -10138,8 +10533,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
10138
10533
  dirName,
10139
10534
  global = false
10140
10535
  }) {
10141
- const skillDirPath = join69(baseDir, relativeDirPath, dirName);
10142
- const skillFilePath = join69(skillDirPath, SKILL_FILE_NAME);
10536
+ const skillDirPath = join71(baseDir, relativeDirPath, dirName);
10537
+ const skillFilePath = join71(skillDirPath, SKILL_FILE_NAME);
10143
10538
  if (!await fileExists(skillFilePath)) {
10144
10539
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
10145
10540
  }
@@ -10169,14 +10564,14 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
10169
10564
  };
10170
10565
 
10171
10566
  // src/features/skills/rovodev-skill.ts
10172
- var RovodevSkillFrontmatterSchema = z33.looseObject({
10173
- name: z33.string(),
10174
- description: z33.string()
10567
+ var RovodevSkillFrontmatterSchema = z34.looseObject({
10568
+ name: z34.string(),
10569
+ description: z34.string()
10175
10570
  });
10176
10571
  var RovodevSkill = class _RovodevSkill extends ToolSkill {
10177
10572
  constructor({
10178
10573
  baseDir = process.cwd(),
10179
- relativeDirPath = join70(".rovodev", "skills"),
10574
+ relativeDirPath = join72(".rovodev", "skills"),
10180
10575
  dirName,
10181
10576
  frontmatter,
10182
10577
  body,
@@ -10205,8 +10600,8 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
10205
10600
  }
10206
10601
  static getSettablePaths(_options) {
10207
10602
  return {
10208
- relativeDirPath: join70(".rovodev", "skills"),
10209
- alternativeSkillRoots: [join70(".agents", "skills")]
10603
+ relativeDirPath: join72(".rovodev", "skills"),
10604
+ alternativeSkillRoots: [join72(".agents", "skills")]
10210
10605
  };
10211
10606
  }
10212
10607
  getFrontmatter() {
@@ -10294,13 +10689,13 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
10294
10689
  });
10295
10690
  const result = RovodevSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10296
10691
  if (!result.success) {
10297
- const skillDirPath = join70(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10692
+ const skillDirPath = join72(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10298
10693
  throw new Error(
10299
- `Invalid frontmatter in ${join70(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10694
+ `Invalid frontmatter in ${join72(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10300
10695
  );
10301
10696
  }
10302
10697
  if (result.data.name !== loaded.dirName) {
10303
- const skillFilePath = join70(
10698
+ const skillFilePath = join72(
10304
10699
  loaded.baseDir,
10305
10700
  loaded.relativeDirPath,
10306
10701
  loaded.dirName,
@@ -10342,11 +10737,11 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
10342
10737
  };
10343
10738
 
10344
10739
  // src/features/skills/skills-processor.ts
10345
- import { basename as basename5, join as join88 } from "path";
10346
- import { z as z49 } from "zod/mini";
10740
+ import { basename as basename5, join as join90 } from "path";
10741
+ import { z as z50 } from "zod/mini";
10347
10742
 
10348
10743
  // src/types/dir-feature-processor.ts
10349
- import { join as join71 } from "path";
10744
+ import { join as join73 } from "path";
10350
10745
  var DirFeatureProcessor = class {
10351
10746
  baseDir;
10352
10747
  dryRun;
@@ -10386,7 +10781,7 @@ var DirFeatureProcessor = class {
10386
10781
  const mainFile = aiDir.getMainFile();
10387
10782
  let mainFileContent;
10388
10783
  if (mainFile) {
10389
- const mainFilePath = join71(dirPath, mainFile.name);
10784
+ const mainFilePath = join73(dirPath, mainFile.name);
10390
10785
  const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter, {
10391
10786
  avoidBlockScalars: this.avoidBlockScalars
10392
10787
  });
@@ -10406,7 +10801,7 @@ var DirFeatureProcessor = class {
10406
10801
  const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
10407
10802
  otherFileContents.push(contentWithNewline);
10408
10803
  if (!dirHasChanges) {
10409
- const filePath = join71(dirPath, file.relativeFilePathToDirPath);
10804
+ const filePath = join73(dirPath, file.relativeFilePathToDirPath);
10410
10805
  const existingContent = await readFileContentOrNull(filePath);
10411
10806
  if (!fileContentsEquivalent({
10412
10807
  filePath,
@@ -10424,24 +10819,24 @@ var DirFeatureProcessor = class {
10424
10819
  if (this.dryRun) {
10425
10820
  this.logger.info(`[DRY RUN] Would create directory: ${dirPath}`);
10426
10821
  if (mainFile) {
10427
- this.logger.info(`[DRY RUN] Would write: ${join71(dirPath, mainFile.name)}`);
10428
- changedPaths.push(join71(relativeDir, mainFile.name));
10822
+ this.logger.info(`[DRY RUN] Would write: ${join73(dirPath, mainFile.name)}`);
10823
+ changedPaths.push(join73(relativeDir, mainFile.name));
10429
10824
  }
10430
10825
  for (const file of otherFiles) {
10431
10826
  this.logger.info(
10432
- `[DRY RUN] Would write: ${join71(dirPath, file.relativeFilePathToDirPath)}`
10827
+ `[DRY RUN] Would write: ${join73(dirPath, file.relativeFilePathToDirPath)}`
10433
10828
  );
10434
- changedPaths.push(join71(relativeDir, file.relativeFilePathToDirPath));
10829
+ changedPaths.push(join73(relativeDir, file.relativeFilePathToDirPath));
10435
10830
  }
10436
10831
  } else {
10437
10832
  await ensureDir(dirPath);
10438
10833
  if (mainFile && mainFileContent) {
10439
- const mainFilePath = join71(dirPath, mainFile.name);
10834
+ const mainFilePath = join73(dirPath, mainFile.name);
10440
10835
  await writeFileContent(mainFilePath, mainFileContent);
10441
- changedPaths.push(join71(relativeDir, mainFile.name));
10836
+ changedPaths.push(join73(relativeDir, mainFile.name));
10442
10837
  }
10443
10838
  for (const [i, file] of otherFiles.entries()) {
10444
- const filePath = join71(dirPath, file.relativeFilePathToDirPath);
10839
+ const filePath = join73(dirPath, file.relativeFilePathToDirPath);
10445
10840
  const content = otherFileContents[i];
10446
10841
  if (content === void 0) {
10447
10842
  throw new Error(
@@ -10449,7 +10844,7 @@ var DirFeatureProcessor = class {
10449
10844
  );
10450
10845
  }
10451
10846
  await writeFileContent(filePath, content);
10452
- changedPaths.push(join71(relativeDir, file.relativeFilePathToDirPath));
10847
+ changedPaths.push(join73(relativeDir, file.relativeFilePathToDirPath));
10453
10848
  }
10454
10849
  }
10455
10850
  changedCount++;
@@ -10481,16 +10876,16 @@ var DirFeatureProcessor = class {
10481
10876
  };
10482
10877
 
10483
10878
  // src/features/skills/agentsskills-skill.ts
10484
- import { join as join72 } from "path";
10485
- import { z as z34 } from "zod/mini";
10486
- var AgentsSkillsSkillFrontmatterSchema = z34.looseObject({
10487
- name: z34.string(),
10488
- description: z34.string()
10879
+ import { join as join74 } from "path";
10880
+ import { z as z35 } from "zod/mini";
10881
+ var AgentsSkillsSkillFrontmatterSchema = z35.looseObject({
10882
+ name: z35.string(),
10883
+ description: z35.string()
10489
10884
  });
10490
10885
  var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
10491
10886
  constructor({
10492
10887
  baseDir = process.cwd(),
10493
- relativeDirPath = join72(".agents", "skills"),
10888
+ relativeDirPath = join74(".agents", "skills"),
10494
10889
  dirName,
10495
10890
  frontmatter,
10496
10891
  body,
@@ -10522,7 +10917,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
10522
10917
  throw new Error("AgentsSkillsSkill does not support global mode.");
10523
10918
  }
10524
10919
  return {
10525
- relativeDirPath: join72(".agents", "skills")
10920
+ relativeDirPath: join74(".agents", "skills")
10526
10921
  };
10527
10922
  }
10528
10923
  getFrontmatter() {
@@ -10602,9 +10997,9 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
10602
10997
  });
10603
10998
  const result = AgentsSkillsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10604
10999
  if (!result.success) {
10605
- const skillDirPath = join72(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11000
+ const skillDirPath = join74(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10606
11001
  throw new Error(
10607
- `Invalid frontmatter in ${join72(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11002
+ `Invalid frontmatter in ${join74(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10608
11003
  );
10609
11004
  }
10610
11005
  return new _AgentsSkillsSkill({
@@ -10639,16 +11034,16 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
10639
11034
  };
10640
11035
 
10641
11036
  // src/features/skills/antigravity-skill.ts
10642
- import { join as join73 } from "path";
10643
- import { z as z35 } from "zod/mini";
10644
- var AntigravitySkillFrontmatterSchema = z35.looseObject({
10645
- name: z35.string(),
10646
- description: z35.string()
11037
+ import { join as join75 } from "path";
11038
+ import { z as z36 } from "zod/mini";
11039
+ var AntigravitySkillFrontmatterSchema = z36.looseObject({
11040
+ name: z36.string(),
11041
+ description: z36.string()
10647
11042
  });
10648
11043
  var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
10649
11044
  constructor({
10650
11045
  baseDir = process.cwd(),
10651
- relativeDirPath = join73(".agent", "skills"),
11046
+ relativeDirPath = join75(".agent", "skills"),
10652
11047
  dirName,
10653
11048
  frontmatter,
10654
11049
  body,
@@ -10680,11 +11075,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
10680
11075
  } = {}) {
10681
11076
  if (global) {
10682
11077
  return {
10683
- relativeDirPath: join73(".gemini", "antigravity", "skills")
11078
+ relativeDirPath: join75(".gemini", "antigravity", "skills")
10684
11079
  };
10685
11080
  }
10686
11081
  return {
10687
- relativeDirPath: join73(".agent", "skills")
11082
+ relativeDirPath: join75(".agent", "skills")
10688
11083
  };
10689
11084
  }
10690
11085
  getFrontmatter() {
@@ -10764,9 +11159,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
10764
11159
  });
10765
11160
  const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
10766
11161
  if (!result.success) {
10767
- const skillDirPath = join73(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11162
+ const skillDirPath = join75(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10768
11163
  throw new Error(
10769
- `Invalid frontmatter in ${join73(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11164
+ `Invalid frontmatter in ${join75(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10770
11165
  );
10771
11166
  }
10772
11167
  return new _AntigravitySkill({
@@ -10800,19 +11195,19 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
10800
11195
  };
10801
11196
 
10802
11197
  // src/features/skills/claudecode-skill.ts
10803
- import { join as join74 } from "path";
10804
- import { z as z36 } from "zod/mini";
10805
- var ClaudecodeSkillFrontmatterSchema = z36.looseObject({
10806
- name: z36.string(),
10807
- description: z36.string(),
10808
- "allowed-tools": z36.optional(z36.array(z36.string())),
10809
- model: z36.optional(z36.string()),
10810
- "disable-model-invocation": z36.optional(z36.boolean())
11198
+ import { join as join76 } from "path";
11199
+ import { z as z37 } from "zod/mini";
11200
+ var ClaudecodeSkillFrontmatterSchema = z37.looseObject({
11201
+ name: z37.string(),
11202
+ description: z37.string(),
11203
+ "allowed-tools": z37.optional(z37.array(z37.string())),
11204
+ model: z37.optional(z37.string()),
11205
+ "disable-model-invocation": z37.optional(z37.boolean())
10811
11206
  });
10812
11207
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
10813
11208
  constructor({
10814
11209
  baseDir = process.cwd(),
10815
- relativeDirPath = join74(".claude", "skills"),
11210
+ relativeDirPath = join76(".claude", "skills"),
10816
11211
  dirName,
10817
11212
  frontmatter,
10818
11213
  body,
@@ -10843,7 +11238,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
10843
11238
  global: _global = false
10844
11239
  } = {}) {
10845
11240
  return {
10846
- relativeDirPath: join74(".claude", "skills")
11241
+ relativeDirPath: join76(".claude", "skills")
10847
11242
  };
10848
11243
  }
10849
11244
  getFrontmatter() {
@@ -10940,9 +11335,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
10940
11335
  });
10941
11336
  const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10942
11337
  if (!result.success) {
10943
- const skillDirPath = join74(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11338
+ const skillDirPath = join76(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10944
11339
  throw new Error(
10945
- `Invalid frontmatter in ${join74(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11340
+ `Invalid frontmatter in ${join76(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10946
11341
  );
10947
11342
  }
10948
11343
  return new _ClaudecodeSkill({
@@ -10976,16 +11371,16 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
10976
11371
  };
10977
11372
 
10978
11373
  // src/features/skills/cline-skill.ts
10979
- import { join as join75 } from "path";
10980
- import { z as z37 } from "zod/mini";
10981
- var ClineSkillFrontmatterSchema = z37.looseObject({
10982
- name: z37.string(),
10983
- description: z37.string()
11374
+ import { join as join77 } from "path";
11375
+ import { z as z38 } from "zod/mini";
11376
+ var ClineSkillFrontmatterSchema = z38.looseObject({
11377
+ name: z38.string(),
11378
+ description: z38.string()
10984
11379
  });
10985
11380
  var ClineSkill = class _ClineSkill extends ToolSkill {
10986
11381
  constructor({
10987
11382
  baseDir = process.cwd(),
10988
- relativeDirPath = join75(".cline", "skills"),
11383
+ relativeDirPath = join77(".cline", "skills"),
10989
11384
  dirName,
10990
11385
  frontmatter,
10991
11386
  body,
@@ -11014,7 +11409,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
11014
11409
  }
11015
11410
  static getSettablePaths(_options = {}) {
11016
11411
  return {
11017
- relativeDirPath: join75(".cline", "skills")
11412
+ relativeDirPath: join77(".cline", "skills")
11018
11413
  };
11019
11414
  }
11020
11415
  getFrontmatter() {
@@ -11102,13 +11497,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
11102
11497
  });
11103
11498
  const result = ClineSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11104
11499
  if (!result.success) {
11105
- const skillDirPath = join75(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11500
+ const skillDirPath = join77(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11106
11501
  throw new Error(
11107
- `Invalid frontmatter in ${join75(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11502
+ `Invalid frontmatter in ${join77(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11108
11503
  );
11109
11504
  }
11110
11505
  if (result.data.name !== loaded.dirName) {
11111
- const skillFilePath = join75(
11506
+ const skillFilePath = join77(
11112
11507
  loaded.baseDir,
11113
11508
  loaded.relativeDirPath,
11114
11509
  loaded.dirName,
@@ -11149,21 +11544,21 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
11149
11544
  };
11150
11545
 
11151
11546
  // src/features/skills/codexcli-skill.ts
11152
- import { join as join76 } from "path";
11153
- import { z as z38 } from "zod/mini";
11154
- var CodexCliSkillFrontmatterSchema = z38.looseObject({
11155
- name: z38.string(),
11156
- description: z38.string(),
11157
- metadata: z38.optional(
11158
- z38.looseObject({
11159
- "short-description": z38.optional(z38.string())
11547
+ import { join as join78 } from "path";
11548
+ import { z as z39 } from "zod/mini";
11549
+ var CodexCliSkillFrontmatterSchema = z39.looseObject({
11550
+ name: z39.string(),
11551
+ description: z39.string(),
11552
+ metadata: z39.optional(
11553
+ z39.looseObject({
11554
+ "short-description": z39.optional(z39.string())
11160
11555
  })
11161
11556
  )
11162
11557
  });
11163
11558
  var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
11164
11559
  constructor({
11165
11560
  baseDir = process.cwd(),
11166
- relativeDirPath = join76(".codex", "skills"),
11561
+ relativeDirPath = join78(".codex", "skills"),
11167
11562
  dirName,
11168
11563
  frontmatter,
11169
11564
  body,
@@ -11194,7 +11589,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
11194
11589
  global: _global = false
11195
11590
  } = {}) {
11196
11591
  return {
11197
- relativeDirPath: join76(".codex", "skills")
11592
+ relativeDirPath: join78(".codex", "skills")
11198
11593
  };
11199
11594
  }
11200
11595
  getFrontmatter() {
@@ -11284,9 +11679,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
11284
11679
  });
11285
11680
  const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11286
11681
  if (!result.success) {
11287
- const skillDirPath = join76(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11682
+ const skillDirPath = join78(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11288
11683
  throw new Error(
11289
- `Invalid frontmatter in ${join76(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11684
+ `Invalid frontmatter in ${join78(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11290
11685
  );
11291
11686
  }
11292
11687
  return new _CodexCliSkill({
@@ -11320,17 +11715,17 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
11320
11715
  };
11321
11716
 
11322
11717
  // src/features/skills/copilot-skill.ts
11323
- import { join as join77 } from "path";
11324
- import { z as z39 } from "zod/mini";
11325
- var CopilotSkillFrontmatterSchema = z39.looseObject({
11326
- name: z39.string(),
11327
- description: z39.string(),
11328
- license: z39.optional(z39.string())
11718
+ import { join as join79 } from "path";
11719
+ import { z as z40 } from "zod/mini";
11720
+ var CopilotSkillFrontmatterSchema = z40.looseObject({
11721
+ name: z40.string(),
11722
+ description: z40.string(),
11723
+ license: z40.optional(z40.string())
11329
11724
  });
11330
11725
  var CopilotSkill = class _CopilotSkill extends ToolSkill {
11331
11726
  constructor({
11332
11727
  baseDir = process.cwd(),
11333
- relativeDirPath = join77(".github", "skills"),
11728
+ relativeDirPath = join79(".github", "skills"),
11334
11729
  dirName,
11335
11730
  frontmatter,
11336
11731
  body,
@@ -11362,7 +11757,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
11362
11757
  throw new Error("CopilotSkill does not support global mode.");
11363
11758
  }
11364
11759
  return {
11365
- relativeDirPath: join77(".github", "skills")
11760
+ relativeDirPath: join79(".github", "skills")
11366
11761
  };
11367
11762
  }
11368
11763
  getFrontmatter() {
@@ -11448,9 +11843,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
11448
11843
  });
11449
11844
  const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11450
11845
  if (!result.success) {
11451
- const skillDirPath = join77(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11846
+ const skillDirPath = join79(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11452
11847
  throw new Error(
11453
- `Invalid frontmatter in ${join77(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11848
+ `Invalid frontmatter in ${join79(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11454
11849
  );
11455
11850
  }
11456
11851
  return new _CopilotSkill({
@@ -11485,16 +11880,16 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
11485
11880
  };
11486
11881
 
11487
11882
  // src/features/skills/cursor-skill.ts
11488
- import { join as join78 } from "path";
11489
- import { z as z40 } from "zod/mini";
11490
- var CursorSkillFrontmatterSchema = z40.looseObject({
11491
- name: z40.string(),
11492
- description: z40.string()
11883
+ import { join as join80 } from "path";
11884
+ import { z as z41 } from "zod/mini";
11885
+ var CursorSkillFrontmatterSchema = z41.looseObject({
11886
+ name: z41.string(),
11887
+ description: z41.string()
11493
11888
  });
11494
11889
  var CursorSkill = class _CursorSkill extends ToolSkill {
11495
11890
  constructor({
11496
11891
  baseDir = process.cwd(),
11497
- relativeDirPath = join78(".cursor", "skills"),
11892
+ relativeDirPath = join80(".cursor", "skills"),
11498
11893
  dirName,
11499
11894
  frontmatter,
11500
11895
  body,
@@ -11523,7 +11918,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
11523
11918
  }
11524
11919
  static getSettablePaths(_options) {
11525
11920
  return {
11526
- relativeDirPath: join78(".cursor", "skills")
11921
+ relativeDirPath: join80(".cursor", "skills")
11527
11922
  };
11528
11923
  }
11529
11924
  getFrontmatter() {
@@ -11603,9 +11998,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
11603
11998
  });
11604
11999
  const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11605
12000
  if (!result.success) {
11606
- const skillDirPath = join78(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12001
+ const skillDirPath = join80(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11607
12002
  throw new Error(
11608
- `Invalid frontmatter in ${join78(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12003
+ `Invalid frontmatter in ${join80(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11609
12004
  );
11610
12005
  }
11611
12006
  return new _CursorSkill({
@@ -11640,17 +12035,17 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
11640
12035
  };
11641
12036
 
11642
12037
  // src/features/skills/deepagents-skill.ts
11643
- import { join as join79 } from "path";
11644
- import { z as z41 } from "zod/mini";
11645
- var DeepagentsSkillFrontmatterSchema = z41.looseObject({
11646
- name: z41.string(),
11647
- description: z41.string(),
11648
- "allowed-tools": z41.optional(z41.array(z41.string()))
12038
+ import { join as join81 } from "path";
12039
+ import { z as z42 } from "zod/mini";
12040
+ var DeepagentsSkillFrontmatterSchema = z42.looseObject({
12041
+ name: z42.string(),
12042
+ description: z42.string(),
12043
+ "allowed-tools": z42.optional(z42.array(z42.string()))
11649
12044
  });
11650
12045
  var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
11651
12046
  constructor({
11652
12047
  baseDir = process.cwd(),
11653
- relativeDirPath = join79(".deepagents", "skills"),
12048
+ relativeDirPath = join81(".deepagents", "skills"),
11654
12049
  dirName,
11655
12050
  frontmatter,
11656
12051
  body,
@@ -11679,7 +12074,7 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
11679
12074
  }
11680
12075
  static getSettablePaths(_options) {
11681
12076
  return {
11682
- relativeDirPath: join79(".deepagents", "skills")
12077
+ relativeDirPath: join81(".deepagents", "skills")
11683
12078
  };
11684
12079
  }
11685
12080
  getFrontmatter() {
@@ -11765,9 +12160,9 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
11765
12160
  });
11766
12161
  const result = DeepagentsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11767
12162
  if (!result.success) {
11768
- const skillDirPath = join79(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12163
+ const skillDirPath = join81(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11769
12164
  throw new Error(
11770
- `Invalid frontmatter in ${join79(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12165
+ `Invalid frontmatter in ${join81(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11771
12166
  );
11772
12167
  }
11773
12168
  return new _DeepagentsSkill({
@@ -11802,11 +12197,11 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
11802
12197
  };
11803
12198
 
11804
12199
  // src/features/skills/geminicli-skill.ts
11805
- import { join as join80 } from "path";
11806
- import { z as z42 } from "zod/mini";
11807
- var GeminiCliSkillFrontmatterSchema = z42.looseObject({
11808
- name: z42.string(),
11809
- description: z42.string()
12200
+ import { join as join82 } from "path";
12201
+ import { z as z43 } from "zod/mini";
12202
+ var GeminiCliSkillFrontmatterSchema = z43.looseObject({
12203
+ name: z43.string(),
12204
+ description: z43.string()
11810
12205
  });
11811
12206
  var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
11812
12207
  constructor({
@@ -11842,7 +12237,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
11842
12237
  global: _global = false
11843
12238
  } = {}) {
11844
12239
  return {
11845
- relativeDirPath: join80(".gemini", "skills")
12240
+ relativeDirPath: join82(".gemini", "skills")
11846
12241
  };
11847
12242
  }
11848
12243
  getFrontmatter() {
@@ -11922,9 +12317,9 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
11922
12317
  });
11923
12318
  const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11924
12319
  if (!result.success) {
11925
- const skillDirPath = join80(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12320
+ const skillDirPath = join82(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11926
12321
  throw new Error(
11927
- `Invalid frontmatter in ${join80(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12322
+ `Invalid frontmatter in ${join82(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11928
12323
  );
11929
12324
  }
11930
12325
  return new _GeminiCliSkill({
@@ -11959,16 +12354,16 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
11959
12354
  };
11960
12355
 
11961
12356
  // src/features/skills/junie-skill.ts
11962
- import { join as join81 } from "path";
11963
- import { z as z43 } from "zod/mini";
11964
- var JunieSkillFrontmatterSchema = z43.looseObject({
11965
- name: z43.string(),
11966
- description: z43.string()
12357
+ import { join as join83 } from "path";
12358
+ import { z as z44 } from "zod/mini";
12359
+ var JunieSkillFrontmatterSchema = z44.looseObject({
12360
+ name: z44.string(),
12361
+ description: z44.string()
11967
12362
  });
11968
12363
  var JunieSkill = class _JunieSkill extends ToolSkill {
11969
12364
  constructor({
11970
12365
  baseDir = process.cwd(),
11971
- relativeDirPath = join81(".junie", "skills"),
12366
+ relativeDirPath = join83(".junie", "skills"),
11972
12367
  dirName,
11973
12368
  frontmatter,
11974
12369
  body,
@@ -12000,7 +12395,7 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
12000
12395
  throw new Error("JunieSkill does not support global mode.");
12001
12396
  }
12002
12397
  return {
12003
- relativeDirPath: join81(".junie", "skills")
12398
+ relativeDirPath: join83(".junie", "skills")
12004
12399
  };
12005
12400
  }
12006
12401
  getFrontmatter() {
@@ -12087,13 +12482,13 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
12087
12482
  });
12088
12483
  const result = JunieSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12089
12484
  if (!result.success) {
12090
- const skillDirPath = join81(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12485
+ const skillDirPath = join83(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12091
12486
  throw new Error(
12092
- `Invalid frontmatter in ${join81(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12487
+ `Invalid frontmatter in ${join83(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12093
12488
  );
12094
12489
  }
12095
12490
  if (result.data.name !== loaded.dirName) {
12096
- const skillFilePath = join81(
12491
+ const skillFilePath = join83(
12097
12492
  loaded.baseDir,
12098
12493
  loaded.relativeDirPath,
12099
12494
  loaded.dirName,
@@ -12135,17 +12530,17 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
12135
12530
  };
12136
12531
 
12137
12532
  // src/features/skills/kilo-skill.ts
12138
- import { join as join82 } from "path";
12139
- import { z as z44 } from "zod/mini";
12140
- var KiloSkillFrontmatterSchema = z44.looseObject({
12141
- name: z44.string(),
12142
- description: z44.string(),
12143
- "allowed-tools": z44.optional(z44.array(z44.string()))
12533
+ import { join as join84 } from "path";
12534
+ import { z as z45 } from "zod/mini";
12535
+ var KiloSkillFrontmatterSchema = z45.looseObject({
12536
+ name: z45.string(),
12537
+ description: z45.string(),
12538
+ "allowed-tools": z45.optional(z45.array(z45.string()))
12144
12539
  });
12145
12540
  var KiloSkill = class _KiloSkill extends ToolSkill {
12146
12541
  constructor({
12147
12542
  baseDir = process.cwd(),
12148
- relativeDirPath = join82(".kilo", "skills"),
12543
+ relativeDirPath = join84(".kilo", "skills"),
12149
12544
  dirName,
12150
12545
  frontmatter,
12151
12546
  body,
@@ -12174,7 +12569,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
12174
12569
  }
12175
12570
  static getSettablePaths({ global = false } = {}) {
12176
12571
  return {
12177
- relativeDirPath: global ? join82(".config", "kilo", "skills") : join82(".kilo", "skills")
12572
+ relativeDirPath: global ? join84(".config", "kilo", "skills") : join84(".kilo", "skills")
12178
12573
  };
12179
12574
  }
12180
12575
  getFrontmatter() {
@@ -12260,9 +12655,9 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
12260
12655
  });
12261
12656
  const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12262
12657
  if (!result.success) {
12263
- const skillDirPath = join82(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12658
+ const skillDirPath = join84(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12264
12659
  throw new Error(
12265
- `Invalid frontmatter in ${join82(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12660
+ `Invalid frontmatter in ${join84(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12266
12661
  );
12267
12662
  }
12268
12663
  return new _KiloSkill({
@@ -12296,16 +12691,16 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
12296
12691
  };
12297
12692
 
12298
12693
  // src/features/skills/kiro-skill.ts
12299
- import { join as join83 } from "path";
12300
- import { z as z45 } from "zod/mini";
12301
- var KiroSkillFrontmatterSchema = z45.looseObject({
12302
- name: z45.string(),
12303
- description: z45.string()
12694
+ import { join as join85 } from "path";
12695
+ import { z as z46 } from "zod/mini";
12696
+ var KiroSkillFrontmatterSchema = z46.looseObject({
12697
+ name: z46.string(),
12698
+ description: z46.string()
12304
12699
  });
12305
12700
  var KiroSkill = class _KiroSkill extends ToolSkill {
12306
12701
  constructor({
12307
12702
  baseDir = process.cwd(),
12308
- relativeDirPath = join83(".kiro", "skills"),
12703
+ relativeDirPath = join85(".kiro", "skills"),
12309
12704
  dirName,
12310
12705
  frontmatter,
12311
12706
  body,
@@ -12337,7 +12732,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
12337
12732
  throw new Error("KiroSkill does not support global mode.");
12338
12733
  }
12339
12734
  return {
12340
- relativeDirPath: join83(".kiro", "skills")
12735
+ relativeDirPath: join85(".kiro", "skills")
12341
12736
  };
12342
12737
  }
12343
12738
  getFrontmatter() {
@@ -12425,13 +12820,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
12425
12820
  });
12426
12821
  const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12427
12822
  if (!result.success) {
12428
- const skillDirPath = join83(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12823
+ const skillDirPath = join85(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12429
12824
  throw new Error(
12430
- `Invalid frontmatter in ${join83(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12825
+ `Invalid frontmatter in ${join85(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12431
12826
  );
12432
12827
  }
12433
12828
  if (result.data.name !== loaded.dirName) {
12434
- const skillFilePath = join83(
12829
+ const skillFilePath = join85(
12435
12830
  loaded.baseDir,
12436
12831
  loaded.relativeDirPath,
12437
12832
  loaded.dirName,
@@ -12473,17 +12868,17 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
12473
12868
  };
12474
12869
 
12475
12870
  // src/features/skills/opencode-skill.ts
12476
- import { join as join84 } from "path";
12477
- import { z as z46 } from "zod/mini";
12478
- var OpenCodeSkillFrontmatterSchema = z46.looseObject({
12479
- name: z46.string(),
12480
- description: z46.string(),
12481
- "allowed-tools": z46.optional(z46.array(z46.string()))
12871
+ import { join as join86 } from "path";
12872
+ import { z as z47 } from "zod/mini";
12873
+ var OpenCodeSkillFrontmatterSchema = z47.looseObject({
12874
+ name: z47.string(),
12875
+ description: z47.string(),
12876
+ "allowed-tools": z47.optional(z47.array(z47.string()))
12482
12877
  });
12483
12878
  var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
12484
12879
  constructor({
12485
12880
  baseDir = process.cwd(),
12486
- relativeDirPath = join84(".opencode", "skill"),
12881
+ relativeDirPath = join86(".opencode", "skill"),
12487
12882
  dirName,
12488
12883
  frontmatter,
12489
12884
  body,
@@ -12512,7 +12907,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
12512
12907
  }
12513
12908
  static getSettablePaths({ global = false } = {}) {
12514
12909
  return {
12515
- relativeDirPath: global ? join84(".config", "opencode", "skill") : join84(".opencode", "skill")
12910
+ relativeDirPath: global ? join86(".config", "opencode", "skill") : join86(".opencode", "skill")
12516
12911
  };
12517
12912
  }
12518
12913
  getFrontmatter() {
@@ -12598,9 +12993,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
12598
12993
  });
12599
12994
  const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12600
12995
  if (!result.success) {
12601
- const skillDirPath = join84(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12996
+ const skillDirPath = join86(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12602
12997
  throw new Error(
12603
- `Invalid frontmatter in ${join84(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12998
+ `Invalid frontmatter in ${join86(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12604
12999
  );
12605
13000
  }
12606
13001
  return new _OpenCodeSkill({
@@ -12634,16 +13029,16 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
12634
13029
  };
12635
13030
 
12636
13031
  // src/features/skills/replit-skill.ts
12637
- import { join as join85 } from "path";
12638
- import { z as z47 } from "zod/mini";
12639
- var ReplitSkillFrontmatterSchema = z47.looseObject({
12640
- name: z47.string(),
12641
- description: z47.string()
13032
+ import { join as join87 } from "path";
13033
+ import { z as z48 } from "zod/mini";
13034
+ var ReplitSkillFrontmatterSchema = z48.looseObject({
13035
+ name: z48.string(),
13036
+ description: z48.string()
12642
13037
  });
12643
13038
  var ReplitSkill = class _ReplitSkill extends ToolSkill {
12644
13039
  constructor({
12645
13040
  baseDir = process.cwd(),
12646
- relativeDirPath = join85(".agents", "skills"),
13041
+ relativeDirPath = join87(".agents", "skills"),
12647
13042
  dirName,
12648
13043
  frontmatter,
12649
13044
  body,
@@ -12675,7 +13070,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
12675
13070
  throw new Error("ReplitSkill does not support global mode.");
12676
13071
  }
12677
13072
  return {
12678
- relativeDirPath: join85(".agents", "skills")
13073
+ relativeDirPath: join87(".agents", "skills")
12679
13074
  };
12680
13075
  }
12681
13076
  getFrontmatter() {
@@ -12755,9 +13150,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
12755
13150
  });
12756
13151
  const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12757
13152
  if (!result.success) {
12758
- const skillDirPath = join85(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13153
+ const skillDirPath = join87(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12759
13154
  throw new Error(
12760
- `Invalid frontmatter in ${join85(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13155
+ `Invalid frontmatter in ${join87(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12761
13156
  );
12762
13157
  }
12763
13158
  return new _ReplitSkill({
@@ -12792,16 +13187,16 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
12792
13187
  };
12793
13188
 
12794
13189
  // src/features/skills/roo-skill.ts
12795
- import { join as join86 } from "path";
12796
- import { z as z48 } from "zod/mini";
12797
- var RooSkillFrontmatterSchema = z48.looseObject({
12798
- name: z48.string(),
12799
- description: z48.string()
13190
+ import { join as join88 } from "path";
13191
+ import { z as z49 } from "zod/mini";
13192
+ var RooSkillFrontmatterSchema = z49.looseObject({
13193
+ name: z49.string(),
13194
+ description: z49.string()
12800
13195
  });
12801
13196
  var RooSkill = class _RooSkill extends ToolSkill {
12802
13197
  constructor({
12803
13198
  baseDir = process.cwd(),
12804
- relativeDirPath = join86(".roo", "skills"),
13199
+ relativeDirPath = join88(".roo", "skills"),
12805
13200
  dirName,
12806
13201
  frontmatter,
12807
13202
  body,
@@ -12832,7 +13227,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
12832
13227
  global: _global = false
12833
13228
  } = {}) {
12834
13229
  return {
12835
- relativeDirPath: join86(".roo", "skills")
13230
+ relativeDirPath: join88(".roo", "skills")
12836
13231
  };
12837
13232
  }
12838
13233
  getFrontmatter() {
@@ -12920,13 +13315,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
12920
13315
  });
12921
13316
  const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12922
13317
  if (!result.success) {
12923
- const skillDirPath = join86(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13318
+ const skillDirPath = join88(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12924
13319
  throw new Error(
12925
- `Invalid frontmatter in ${join86(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13320
+ `Invalid frontmatter in ${join88(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12926
13321
  );
12927
13322
  }
12928
13323
  if (result.data.name !== loaded.dirName) {
12929
- const skillFilePath = join86(
13324
+ const skillFilePath = join88(
12930
13325
  loaded.baseDir,
12931
13326
  loaded.relativeDirPath,
12932
13327
  loaded.dirName,
@@ -12967,14 +13362,14 @@ var RooSkill = class _RooSkill extends ToolSkill {
12967
13362
  };
12968
13363
 
12969
13364
  // src/features/skills/skills-utils.ts
12970
- import { basename as basename4, join as join87 } from "path";
13365
+ import { basename as basename4, join as join89 } from "path";
12971
13366
  async function getLocalSkillDirNames(baseDir) {
12972
- const skillsDir = join87(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
13367
+ const skillsDir = join89(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
12973
13368
  const names = /* @__PURE__ */ new Set();
12974
13369
  if (!await directoryExists(skillsDir)) {
12975
13370
  return names;
12976
13371
  }
12977
- const dirPaths = await findFilesByGlobs(join87(skillsDir, "*"), { type: "dir" });
13372
+ const dirPaths = await findFilesByGlobs(join89(skillsDir, "*"), { type: "dir" });
12978
13373
  for (const dirPath of dirPaths) {
12979
13374
  const name = basename4(dirPath);
12980
13375
  if (name === basename4(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
@@ -13005,7 +13400,7 @@ var skillsProcessorToolTargetTuple = [
13005
13400
  "roo",
13006
13401
  "rovodev"
13007
13402
  ];
13008
- var SkillsProcessorToolTargetSchema = z49.enum(skillsProcessorToolTargetTuple);
13403
+ var SkillsProcessorToolTargetSchema = z50.enum(skillsProcessorToolTargetTuple);
13009
13404
  var toolSkillFactories = /* @__PURE__ */ new Map([
13010
13405
  [
13011
13406
  "agentsmd",
@@ -13229,10 +13624,10 @@ var SkillsProcessor = class extends DirFeatureProcessor {
13229
13624
  )
13230
13625
  );
13231
13626
  const localSkillNames = new Set(localDirNames);
13232
- const curatedDirPath = join88(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
13627
+ const curatedDirPath = join90(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
13233
13628
  let curatedSkills = [];
13234
13629
  if (await directoryExists(curatedDirPath)) {
13235
- const curatedDirPaths = await findFilesByGlobs(join88(curatedDirPath, "*"), { type: "dir" });
13630
+ const curatedDirPaths = await findFilesByGlobs(join90(curatedDirPath, "*"), { type: "dir" });
13236
13631
  const curatedDirNames = curatedDirPaths.map((path3) => basename5(path3));
13237
13632
  const nonConflicting = curatedDirNames.filter((name) => {
13238
13633
  if (localSkillNames.has(name)) {
@@ -13270,11 +13665,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
13270
13665
  const seenDirNames = /* @__PURE__ */ new Set();
13271
13666
  const loadEntries = [];
13272
13667
  for (const root of roots) {
13273
- const skillsDirPath = join88(this.baseDir, root);
13668
+ const skillsDirPath = join90(this.baseDir, root);
13274
13669
  if (!await directoryExists(skillsDirPath)) {
13275
13670
  continue;
13276
13671
  }
13277
- const dirPaths = await findFilesByGlobs(join88(skillsDirPath, "*"), { type: "dir" });
13672
+ const dirPaths = await findFilesByGlobs(join90(skillsDirPath, "*"), { type: "dir" });
13278
13673
  for (const dirPath of dirPaths) {
13279
13674
  const dirName = basename5(dirPath);
13280
13675
  if (seenDirNames.has(dirName)) {
@@ -13305,11 +13700,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
13305
13700
  const roots = toolSkillSearchRoots(paths);
13306
13701
  const toolSkills = [];
13307
13702
  for (const root of roots) {
13308
- const skillsDirPath = join88(this.baseDir, root);
13703
+ const skillsDirPath = join90(this.baseDir, root);
13309
13704
  if (!await directoryExists(skillsDirPath)) {
13310
13705
  continue;
13311
13706
  }
13312
- const dirPaths = await findFilesByGlobs(join88(skillsDirPath, "*"), { type: "dir" });
13707
+ const dirPaths = await findFilesByGlobs(join90(skillsDirPath, "*"), { type: "dir" });
13313
13708
  for (const dirPath of dirPaths) {
13314
13709
  const dirName = basename5(dirPath);
13315
13710
  const toolSkill = factory.class.forDeletion({
@@ -13373,11 +13768,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
13373
13768
  };
13374
13769
 
13375
13770
  // src/features/subagents/agentsmd-subagent.ts
13376
- import { join as join90 } from "path";
13771
+ import { join as join92 } from "path";
13377
13772
 
13378
13773
  // src/features/subagents/simulated-subagent.ts
13379
- import { basename as basename6, join as join89 } from "path";
13380
- import { z as z50 } from "zod/mini";
13774
+ import { basename as basename6, join as join91 } from "path";
13775
+ import { z as z51 } from "zod/mini";
13381
13776
 
13382
13777
  // src/features/subagents/tool-subagent.ts
13383
13778
  var ToolSubagent = class extends ToolFile {
@@ -13429,9 +13824,9 @@ var ToolSubagent = class extends ToolFile {
13429
13824
  };
13430
13825
 
13431
13826
  // src/features/subagents/simulated-subagent.ts
13432
- var SimulatedSubagentFrontmatterSchema = z50.object({
13433
- name: z50.string(),
13434
- description: z50.optional(z50.string())
13827
+ var SimulatedSubagentFrontmatterSchema = z51.object({
13828
+ name: z51.string(),
13829
+ description: z51.optional(z51.string())
13435
13830
  });
13436
13831
  var SimulatedSubagent = class extends ToolSubagent {
13437
13832
  frontmatter;
@@ -13441,7 +13836,7 @@ var SimulatedSubagent = class extends ToolSubagent {
13441
13836
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
13442
13837
  if (!result.success) {
13443
13838
  throw new Error(
13444
- `Invalid frontmatter in ${join89(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13839
+ `Invalid frontmatter in ${join91(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13445
13840
  );
13446
13841
  }
13447
13842
  }
@@ -13492,7 +13887,7 @@ var SimulatedSubagent = class extends ToolSubagent {
13492
13887
  return {
13493
13888
  success: false,
13494
13889
  error: new Error(
13495
- `Invalid frontmatter in ${join89(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13890
+ `Invalid frontmatter in ${join91(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13496
13891
  )
13497
13892
  };
13498
13893
  }
@@ -13502,7 +13897,7 @@ var SimulatedSubagent = class extends ToolSubagent {
13502
13897
  relativeFilePath,
13503
13898
  validate = true
13504
13899
  }) {
13505
- const filePath = join89(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
13900
+ const filePath = join91(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
13506
13901
  const fileContent = await readFileContent(filePath);
13507
13902
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13508
13903
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13538,7 +13933,7 @@ var SimulatedSubagent = class extends ToolSubagent {
13538
13933
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
13539
13934
  static getSettablePaths() {
13540
13935
  return {
13541
- relativeDirPath: join90(".agents", "subagents")
13936
+ relativeDirPath: join92(".agents", "subagents")
13542
13937
  };
13543
13938
  }
13544
13939
  static async fromFile(params) {
@@ -13561,11 +13956,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
13561
13956
  };
13562
13957
 
13563
13958
  // src/features/subagents/factorydroid-subagent.ts
13564
- import { join as join91 } from "path";
13959
+ import { join as join93 } from "path";
13565
13960
  var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
13566
13961
  static getSettablePaths(_options) {
13567
13962
  return {
13568
- relativeDirPath: join91(".factory", "droids")
13963
+ relativeDirPath: join93(".factory", "droids")
13569
13964
  };
13570
13965
  }
13571
13966
  static async fromFile(params) {
@@ -13588,16 +13983,16 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
13588
13983
  };
13589
13984
 
13590
13985
  // src/features/subagents/geminicli-subagent.ts
13591
- import { join as join93 } from "path";
13592
- import { z as z52 } from "zod/mini";
13986
+ import { join as join95 } from "path";
13987
+ import { z as z53 } from "zod/mini";
13593
13988
 
13594
13989
  // src/features/subagents/rulesync-subagent.ts
13595
- import { basename as basename7, join as join92 } from "path";
13596
- import { z as z51 } from "zod/mini";
13597
- var RulesyncSubagentFrontmatterSchema = z51.looseObject({
13598
- targets: z51._default(RulesyncTargetsSchema, ["*"]),
13599
- name: z51.string(),
13600
- description: z51.optional(z51.string())
13990
+ import { basename as basename7, join as join94 } from "path";
13991
+ import { z as z52 } from "zod/mini";
13992
+ var RulesyncSubagentFrontmatterSchema = z52.looseObject({
13993
+ targets: z52._default(RulesyncTargetsSchema, ["*"]),
13994
+ name: z52.string(),
13995
+ description: z52.optional(z52.string())
13601
13996
  });
13602
13997
  var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
13603
13998
  frontmatter;
@@ -13606,7 +14001,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
13606
14001
  const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
13607
14002
  if (!parseResult.success && rest.validate !== false) {
13608
14003
  throw new Error(
13609
- `Invalid frontmatter in ${join92(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
14004
+ `Invalid frontmatter in ${join94(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
13610
14005
  );
13611
14006
  }
13612
14007
  const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
@@ -13639,7 +14034,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
13639
14034
  return {
13640
14035
  success: false,
13641
14036
  error: new Error(
13642
- `Invalid frontmatter in ${join92(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14037
+ `Invalid frontmatter in ${join94(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13643
14038
  )
13644
14039
  };
13645
14040
  }
@@ -13647,7 +14042,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
13647
14042
  static async fromFile({
13648
14043
  relativeFilePath
13649
14044
  }) {
13650
- const filePath = join92(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
14045
+ const filePath = join94(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
13651
14046
  const fileContent = await readFileContent(filePath);
13652
14047
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13653
14048
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13666,9 +14061,9 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
13666
14061
  };
13667
14062
 
13668
14063
  // src/features/subagents/geminicli-subagent.ts
13669
- var GeminiCliSubagentFrontmatterSchema = z52.looseObject({
13670
- name: z52.string(),
13671
- description: z52.optional(z52.string())
14064
+ var GeminiCliSubagentFrontmatterSchema = z53.looseObject({
14065
+ name: z53.string(),
14066
+ description: z53.optional(z53.string())
13672
14067
  });
13673
14068
  var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
13674
14069
  frontmatter;
@@ -13678,7 +14073,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
13678
14073
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
13679
14074
  if (!result.success) {
13680
14075
  throw new Error(
13681
- `Invalid frontmatter in ${join93(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14076
+ `Invalid frontmatter in ${join95(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13682
14077
  );
13683
14078
  }
13684
14079
  }
@@ -13691,7 +14086,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
13691
14086
  }
13692
14087
  static getSettablePaths(_options = {}) {
13693
14088
  return {
13694
- relativeDirPath: join93(".gemini", "agents")
14089
+ relativeDirPath: join95(".gemini", "agents")
13695
14090
  };
13696
14091
  }
13697
14092
  getFrontmatter() {
@@ -13759,7 +14154,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
13759
14154
  return {
13760
14155
  success: false,
13761
14156
  error: new Error(
13762
- `Invalid frontmatter in ${join93(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14157
+ `Invalid frontmatter in ${join95(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13763
14158
  )
13764
14159
  };
13765
14160
  }
@@ -13777,7 +14172,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
13777
14172
  global = false
13778
14173
  }) {
13779
14174
  const paths = this.getSettablePaths({ global });
13780
- const filePath = join93(baseDir, paths.relativeDirPath, relativeFilePath);
14175
+ const filePath = join95(baseDir, paths.relativeDirPath, relativeFilePath);
13781
14176
  const fileContent = await readFileContent(filePath);
13782
14177
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13783
14178
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13813,11 +14208,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
13813
14208
  };
13814
14209
 
13815
14210
  // src/features/subagents/roo-subagent.ts
13816
- import { join as join94 } from "path";
14211
+ import { join as join96 } from "path";
13817
14212
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
13818
14213
  static getSettablePaths() {
13819
14214
  return {
13820
- relativeDirPath: join94(".roo", "subagents")
14215
+ relativeDirPath: join96(".roo", "subagents")
13821
14216
  };
13822
14217
  }
13823
14218
  static async fromFile(params) {
@@ -13840,11 +14235,11 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
13840
14235
  };
13841
14236
 
13842
14237
  // src/features/subagents/rovodev-subagent.ts
13843
- import { join as join95 } from "path";
13844
- import { z as z53 } from "zod/mini";
13845
- var RovodevSubagentFrontmatterSchema = z53.looseObject({
13846
- name: z53.string(),
13847
- description: z53.optional(z53.string())
14238
+ import { join as join97 } from "path";
14239
+ import { z as z54 } from "zod/mini";
14240
+ var RovodevSubagentFrontmatterSchema = z54.looseObject({
14241
+ name: z54.string(),
14242
+ description: z54.optional(z54.string())
13848
14243
  });
13849
14244
  var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
13850
14245
  frontmatter;
@@ -13854,7 +14249,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
13854
14249
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
13855
14250
  if (!result.success) {
13856
14251
  throw new Error(
13857
- `Invalid frontmatter in ${join95(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14252
+ `Invalid frontmatter in ${join97(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
13858
14253
  );
13859
14254
  }
13860
14255
  }
@@ -13866,7 +14261,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
13866
14261
  }
13867
14262
  static getSettablePaths(_options = {}) {
13868
14263
  return {
13869
- relativeDirPath: join95(".rovodev", "subagents")
14264
+ relativeDirPath: join97(".rovodev", "subagents")
13870
14265
  };
13871
14266
  }
13872
14267
  getFrontmatter() {
@@ -13929,7 +14324,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
13929
14324
  return {
13930
14325
  success: false,
13931
14326
  error: new Error(
13932
- `Invalid frontmatter in ${join95(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14327
+ `Invalid frontmatter in ${join97(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
13933
14328
  )
13934
14329
  };
13935
14330
  }
@@ -13946,7 +14341,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
13946
14341
  global = false
13947
14342
  }) {
13948
14343
  const paths = this.getSettablePaths({ global });
13949
- const filePath = join95(baseDir, paths.relativeDirPath, relativeFilePath);
14344
+ const filePath = join97(baseDir, paths.relativeDirPath, relativeFilePath);
13950
14345
  const fileContent = await readFileContent(filePath);
13951
14346
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
13952
14347
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -13985,19 +14380,19 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
13985
14380
  };
13986
14381
 
13987
14382
  // src/features/subagents/subagents-processor.ts
13988
- import { basename as basename9, join as join106 } from "path";
13989
- import { z as z62 } from "zod/mini";
14383
+ import { basename as basename9, join as join108 } from "path";
14384
+ import { z as z63 } from "zod/mini";
13990
14385
 
13991
14386
  // src/features/subagents/claudecode-subagent.ts
13992
- import { join as join96 } from "path";
13993
- import { z as z54 } from "zod/mini";
13994
- var ClaudecodeSubagentFrontmatterSchema = z54.looseObject({
13995
- name: z54.string(),
13996
- description: z54.optional(z54.string()),
13997
- model: z54.optional(z54.string()),
13998
- tools: z54.optional(z54.union([z54.string(), z54.array(z54.string())])),
13999
- permissionMode: z54.optional(z54.string()),
14000
- skills: z54.optional(z54.union([z54.string(), z54.array(z54.string())]))
14387
+ import { join as join98 } from "path";
14388
+ import { z as z55 } from "zod/mini";
14389
+ var ClaudecodeSubagentFrontmatterSchema = z55.looseObject({
14390
+ name: z55.string(),
14391
+ description: z55.optional(z55.string()),
14392
+ model: z55.optional(z55.string()),
14393
+ tools: z55.optional(z55.union([z55.string(), z55.array(z55.string())])),
14394
+ permissionMode: z55.optional(z55.string()),
14395
+ skills: z55.optional(z55.union([z55.string(), z55.array(z55.string())]))
14001
14396
  });
14002
14397
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14003
14398
  frontmatter;
@@ -14007,7 +14402,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14007
14402
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
14008
14403
  if (!result.success) {
14009
14404
  throw new Error(
14010
- `Invalid frontmatter in ${join96(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14405
+ `Invalid frontmatter in ${join98(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14011
14406
  );
14012
14407
  }
14013
14408
  }
@@ -14019,7 +14414,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14019
14414
  }
14020
14415
  static getSettablePaths(_options = {}) {
14021
14416
  return {
14022
- relativeDirPath: join96(".claude", "agents")
14417
+ relativeDirPath: join98(".claude", "agents")
14023
14418
  };
14024
14419
  }
14025
14420
  getFrontmatter() {
@@ -14098,7 +14493,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14098
14493
  return {
14099
14494
  success: false,
14100
14495
  error: new Error(
14101
- `Invalid frontmatter in ${join96(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14496
+ `Invalid frontmatter in ${join98(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14102
14497
  )
14103
14498
  };
14104
14499
  }
@@ -14116,7 +14511,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14116
14511
  global = false
14117
14512
  }) {
14118
14513
  const paths = this.getSettablePaths({ global });
14119
- const filePath = join96(baseDir, paths.relativeDirPath, relativeFilePath);
14514
+ const filePath = join98(baseDir, paths.relativeDirPath, relativeFilePath);
14120
14515
  const fileContent = await readFileContent(filePath);
14121
14516
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14122
14517
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14151,27 +14546,27 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14151
14546
  };
14152
14547
 
14153
14548
  // src/features/subagents/codexcli-subagent.ts
14154
- import { join as join97 } from "path";
14155
- import * as smolToml4 from "smol-toml";
14156
- import { z as z55 } from "zod/mini";
14157
- var CodexCliSubagentTomlSchema = z55.looseObject({
14158
- name: z55.string(),
14159
- description: z55.optional(z55.string()),
14160
- developer_instructions: z55.optional(z55.string()),
14161
- model: z55.optional(z55.string()),
14162
- model_reasoning_effort: z55.optional(z55.string()),
14163
- sandbox_mode: z55.optional(z55.string())
14549
+ import { join as join99 } from "path";
14550
+ import * as smolToml5 from "smol-toml";
14551
+ import { z as z56 } from "zod/mini";
14552
+ var CodexCliSubagentTomlSchema = z56.looseObject({
14553
+ name: z56.string(),
14554
+ description: z56.optional(z56.string()),
14555
+ developer_instructions: z56.optional(z56.string()),
14556
+ model: z56.optional(z56.string()),
14557
+ model_reasoning_effort: z56.optional(z56.string()),
14558
+ sandbox_mode: z56.optional(z56.string())
14164
14559
  });
14165
14560
  var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14166
14561
  body;
14167
14562
  constructor({ body, ...rest }) {
14168
14563
  if (rest.validate !== false) {
14169
14564
  try {
14170
- const parsed = smolToml4.parse(body);
14565
+ const parsed = smolToml5.parse(body);
14171
14566
  CodexCliSubagentTomlSchema.parse(parsed);
14172
14567
  } catch (error) {
14173
14568
  throw new Error(
14174
- `Invalid TOML in ${join97(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
14569
+ `Invalid TOML in ${join99(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
14175
14570
  { cause: error }
14176
14571
  );
14177
14572
  }
@@ -14183,7 +14578,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14183
14578
  }
14184
14579
  static getSettablePaths(_options = {}) {
14185
14580
  return {
14186
- relativeDirPath: join97(".codex", "agents")
14581
+ relativeDirPath: join99(".codex", "agents")
14187
14582
  };
14188
14583
  }
14189
14584
  getBody() {
@@ -14192,10 +14587,10 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14192
14587
  toRulesyncSubagent() {
14193
14588
  let parsed;
14194
14589
  try {
14195
- parsed = CodexCliSubagentTomlSchema.parse(smolToml4.parse(this.body));
14590
+ parsed = CodexCliSubagentTomlSchema.parse(smolToml5.parse(this.body));
14196
14591
  } catch (error) {
14197
14592
  throw new Error(
14198
- `Failed to parse TOML in ${join97(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
14593
+ `Failed to parse TOML in ${join99(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
14199
14594
  { cause: error }
14200
14595
  );
14201
14596
  }
@@ -14238,7 +14633,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14238
14633
  ...rulesyncSubagent.getBody() ? { developer_instructions: rulesyncSubagent.getBody() } : {},
14239
14634
  ...codexcliSection
14240
14635
  };
14241
- const body = smolToml4.stringify(tomlObj);
14636
+ const body = smolToml5.stringify(tomlObj);
14242
14637
  const paths = this.getSettablePaths({ global });
14243
14638
  const relativeFilePath = rulesyncSubagent.getRelativeFilePath().replace(/\.md$/, ".toml");
14244
14639
  return new _CodexCliSubagent({
@@ -14253,7 +14648,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14253
14648
  }
14254
14649
  validate() {
14255
14650
  try {
14256
- const parsed = smolToml4.parse(this.body);
14651
+ const parsed = smolToml5.parse(this.body);
14257
14652
  CodexCliSubagentTomlSchema.parse(parsed);
14258
14653
  return { success: true, error: null };
14259
14654
  } catch (error) {
@@ -14276,7 +14671,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14276
14671
  global = false
14277
14672
  }) {
14278
14673
  const paths = this.getSettablePaths({ global });
14279
- const filePath = join97(baseDir, paths.relativeDirPath, relativeFilePath);
14674
+ const filePath = join99(baseDir, paths.relativeDirPath, relativeFilePath);
14280
14675
  const fileContent = await readFileContent(filePath);
14281
14676
  const subagent = new _CodexCliSubagent({
14282
14677
  baseDir,
@@ -14314,13 +14709,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14314
14709
  };
14315
14710
 
14316
14711
  // src/features/subagents/copilot-subagent.ts
14317
- import { join as join98 } from "path";
14318
- import { z as z56 } from "zod/mini";
14712
+ import { join as join100 } from "path";
14713
+ import { z as z57 } from "zod/mini";
14319
14714
  var REQUIRED_TOOL = "agent/runSubagent";
14320
- var CopilotSubagentFrontmatterSchema = z56.looseObject({
14321
- name: z56.string(),
14322
- description: z56.optional(z56.string()),
14323
- tools: z56.optional(z56.union([z56.string(), z56.array(z56.string())]))
14715
+ var CopilotSubagentFrontmatterSchema = z57.looseObject({
14716
+ name: z57.string(),
14717
+ description: z57.optional(z57.string()),
14718
+ tools: z57.optional(z57.union([z57.string(), z57.array(z57.string())]))
14324
14719
  });
14325
14720
  var normalizeTools = (tools) => {
14326
14721
  if (!tools) {
@@ -14340,7 +14735,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
14340
14735
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
14341
14736
  if (!result.success) {
14342
14737
  throw new Error(
14343
- `Invalid frontmatter in ${join98(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14738
+ `Invalid frontmatter in ${join100(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14344
14739
  );
14345
14740
  }
14346
14741
  }
@@ -14352,7 +14747,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
14352
14747
  }
14353
14748
  static getSettablePaths(_options = {}) {
14354
14749
  return {
14355
- relativeDirPath: join98(".github", "agents")
14750
+ relativeDirPath: join100(".github", "agents")
14356
14751
  };
14357
14752
  }
14358
14753
  getFrontmatter() {
@@ -14426,7 +14821,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
14426
14821
  return {
14427
14822
  success: false,
14428
14823
  error: new Error(
14429
- `Invalid frontmatter in ${join98(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14824
+ `Invalid frontmatter in ${join100(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14430
14825
  )
14431
14826
  };
14432
14827
  }
@@ -14444,7 +14839,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
14444
14839
  global = false
14445
14840
  }) {
14446
14841
  const paths = this.getSettablePaths({ global });
14447
- const filePath = join98(baseDir, paths.relativeDirPath, relativeFilePath);
14842
+ const filePath = join100(baseDir, paths.relativeDirPath, relativeFilePath);
14448
14843
  const fileContent = await readFileContent(filePath);
14449
14844
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14450
14845
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14480,11 +14875,11 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
14480
14875
  };
14481
14876
 
14482
14877
  // src/features/subagents/cursor-subagent.ts
14483
- import { join as join99 } from "path";
14484
- import { z as z57 } from "zod/mini";
14485
- var CursorSubagentFrontmatterSchema = z57.looseObject({
14486
- name: z57.string(),
14487
- description: z57.optional(z57.string())
14878
+ import { join as join101 } from "path";
14879
+ import { z as z58 } from "zod/mini";
14880
+ var CursorSubagentFrontmatterSchema = z58.looseObject({
14881
+ name: z58.string(),
14882
+ description: z58.optional(z58.string())
14488
14883
  });
14489
14884
  var CursorSubagent = class _CursorSubagent extends ToolSubagent {
14490
14885
  frontmatter;
@@ -14494,7 +14889,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
14494
14889
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
14495
14890
  if (!result.success) {
14496
14891
  throw new Error(
14497
- `Invalid frontmatter in ${join99(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14892
+ `Invalid frontmatter in ${join101(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14498
14893
  );
14499
14894
  }
14500
14895
  }
@@ -14506,7 +14901,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
14506
14901
  }
14507
14902
  static getSettablePaths(_options = {}) {
14508
14903
  return {
14509
- relativeDirPath: join99(".cursor", "agents")
14904
+ relativeDirPath: join101(".cursor", "agents")
14510
14905
  };
14511
14906
  }
14512
14907
  getFrontmatter() {
@@ -14573,7 +14968,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
14573
14968
  return {
14574
14969
  success: false,
14575
14970
  error: new Error(
14576
- `Invalid frontmatter in ${join99(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14971
+ `Invalid frontmatter in ${join101(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14577
14972
  )
14578
14973
  };
14579
14974
  }
@@ -14591,7 +14986,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
14591
14986
  global = false
14592
14987
  }) {
14593
14988
  const paths = this.getSettablePaths({ global });
14594
- const filePath = join99(baseDir, paths.relativeDirPath, relativeFilePath);
14989
+ const filePath = join101(baseDir, paths.relativeDirPath, relativeFilePath);
14595
14990
  const fileContent = await readFileContent(filePath);
14596
14991
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14597
14992
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14627,12 +15022,12 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
14627
15022
  };
14628
15023
 
14629
15024
  // src/features/subagents/deepagents-subagent.ts
14630
- import { join as join100 } from "path";
14631
- import { z as z58 } from "zod/mini";
14632
- var DeepagentsSubagentFrontmatterSchema = z58.looseObject({
14633
- name: z58.string(),
14634
- description: z58.optional(z58.string()),
14635
- model: z58.optional(z58.string())
15025
+ import { join as join102 } from "path";
15026
+ import { z as z59 } from "zod/mini";
15027
+ var DeepagentsSubagentFrontmatterSchema = z59.looseObject({
15028
+ name: z59.string(),
15029
+ description: z59.optional(z59.string()),
15030
+ model: z59.optional(z59.string())
14636
15031
  });
14637
15032
  var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
14638
15033
  frontmatter;
@@ -14642,7 +15037,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
14642
15037
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
14643
15038
  if (!result.success) {
14644
15039
  throw new Error(
14645
- `Invalid frontmatter in ${join100(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15040
+ `Invalid frontmatter in ${join102(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14646
15041
  );
14647
15042
  }
14648
15043
  }
@@ -14652,7 +15047,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
14652
15047
  }
14653
15048
  static getSettablePaths(_options = {}) {
14654
15049
  return {
14655
- relativeDirPath: join100(".deepagents", "agents")
15050
+ relativeDirPath: join102(".deepagents", "agents")
14656
15051
  };
14657
15052
  }
14658
15053
  getFrontmatter() {
@@ -14727,7 +15122,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
14727
15122
  return {
14728
15123
  success: false,
14729
15124
  error: new Error(
14730
- `Invalid frontmatter in ${join100(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15125
+ `Invalid frontmatter in ${join102(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14731
15126
  )
14732
15127
  };
14733
15128
  }
@@ -14745,7 +15140,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
14745
15140
  global = false
14746
15141
  }) {
14747
15142
  const paths = this.getSettablePaths({ global });
14748
- const filePath = join100(baseDir, paths.relativeDirPath, relativeFilePath);
15143
+ const filePath = join102(baseDir, paths.relativeDirPath, relativeFilePath);
14749
15144
  const fileContent = await readFileContent(filePath);
14750
15145
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14751
15146
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14780,11 +15175,11 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
14780
15175
  };
14781
15176
 
14782
15177
  // src/features/subagents/junie-subagent.ts
14783
- import { join as join101 } from "path";
14784
- import { z as z59 } from "zod/mini";
14785
- var JunieSubagentFrontmatterSchema = z59.looseObject({
14786
- name: z59.optional(z59.string()),
14787
- description: z59.string()
15178
+ import { join as join103 } from "path";
15179
+ import { z as z60 } from "zod/mini";
15180
+ var JunieSubagentFrontmatterSchema = z60.looseObject({
15181
+ name: z60.optional(z60.string()),
15182
+ description: z60.string()
14788
15183
  });
14789
15184
  var JunieSubagent = class _JunieSubagent extends ToolSubagent {
14790
15185
  frontmatter;
@@ -14794,7 +15189,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
14794
15189
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
14795
15190
  if (!result.success) {
14796
15191
  throw new Error(
14797
- `Invalid frontmatter in ${join101(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15192
+ `Invalid frontmatter in ${join103(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14798
15193
  );
14799
15194
  }
14800
15195
  }
@@ -14809,7 +15204,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
14809
15204
  throw new Error("JunieSubagent does not support global mode.");
14810
15205
  }
14811
15206
  return {
14812
- relativeDirPath: join101(".junie", "agents")
15207
+ relativeDirPath: join103(".junie", "agents")
14813
15208
  };
14814
15209
  }
14815
15210
  getFrontmatter() {
@@ -14885,7 +15280,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
14885
15280
  return {
14886
15281
  success: false,
14887
15282
  error: new Error(
14888
- `Invalid frontmatter in ${join101(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15283
+ `Invalid frontmatter in ${join103(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14889
15284
  )
14890
15285
  };
14891
15286
  }
@@ -14903,7 +15298,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
14903
15298
  global = false
14904
15299
  }) {
14905
15300
  const paths = this.getSettablePaths({ global });
14906
- const filePath = join101(baseDir, paths.relativeDirPath, relativeFilePath);
15301
+ const filePath = join103(baseDir, paths.relativeDirPath, relativeFilePath);
14907
15302
  const fileContent = await readFileContent(filePath);
14908
15303
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14909
15304
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14938,15 +15333,15 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
14938
15333
  };
14939
15334
 
14940
15335
  // src/features/subagents/kilo-subagent.ts
14941
- import { join as join103 } from "path";
15336
+ import { join as join105 } from "path";
14942
15337
 
14943
15338
  // src/features/subagents/opencode-style-subagent.ts
14944
- import { basename as basename8, join as join102 } from "path";
14945
- import { z as z60 } from "zod/mini";
14946
- var OpenCodeStyleSubagentFrontmatterSchema = z60.looseObject({
14947
- description: z60.optional(z60.string()),
14948
- mode: z60._default(z60.string(), "subagent"),
14949
- name: z60.optional(z60.string())
15339
+ import { basename as basename8, join as join104 } from "path";
15340
+ import { z as z61 } from "zod/mini";
15341
+ var OpenCodeStyleSubagentFrontmatterSchema = z61.looseObject({
15342
+ description: z61.optional(z61.string()),
15343
+ mode: z61._default(z61.string(), "subagent"),
15344
+ name: z61.optional(z61.string())
14950
15345
  });
14951
15346
  var OpenCodeStyleSubagent = class extends ToolSubagent {
14952
15347
  frontmatter;
@@ -14956,7 +15351,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
14956
15351
  const result = OpenCodeStyleSubagentFrontmatterSchema.safeParse(frontmatter);
14957
15352
  if (!result.success) {
14958
15353
  throw new Error(
14959
- `Invalid frontmatter in ${join102(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15354
+ `Invalid frontmatter in ${join104(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14960
15355
  );
14961
15356
  }
14962
15357
  }
@@ -14998,7 +15393,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
14998
15393
  return {
14999
15394
  success: false,
15000
15395
  error: new Error(
15001
- `Invalid frontmatter in ${join102(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15396
+ `Invalid frontmatter in ${join104(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15002
15397
  )
15003
15398
  };
15004
15399
  }
@@ -15014,7 +15409,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15014
15409
  global = false
15015
15410
  } = {}) {
15016
15411
  return {
15017
- relativeDirPath: global ? join103(".config", "kilo", "agent") : join103(".kilo", "agent")
15412
+ relativeDirPath: global ? join105(".config", "kilo", "agent") : join105(".kilo", "agent")
15018
15413
  };
15019
15414
  }
15020
15415
  static fromRulesyncSubagent({
@@ -15058,7 +15453,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15058
15453
  global = false
15059
15454
  }) {
15060
15455
  const paths = this.getSettablePaths({ global });
15061
- const filePath = join103(baseDir, paths.relativeDirPath, relativeFilePath);
15456
+ const filePath = join105(baseDir, paths.relativeDirPath, relativeFilePath);
15062
15457
  const fileContent = await readFileContent(filePath);
15063
15458
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15064
15459
  const result = KiloSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15094,23 +15489,23 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15094
15489
  };
15095
15490
 
15096
15491
  // src/features/subagents/kiro-subagent.ts
15097
- import { join as join104 } from "path";
15098
- import { z as z61 } from "zod/mini";
15099
- var KiroCliSubagentJsonSchema = z61.looseObject({
15100
- name: z61.string(),
15101
- description: z61.optional(z61.nullable(z61.string())),
15102
- prompt: z61.optional(z61.nullable(z61.string())),
15103
- tools: z61.optional(z61.nullable(z61.array(z61.string()))),
15104
- toolAliases: z61.optional(z61.nullable(z61.record(z61.string(), z61.string()))),
15105
- toolSettings: z61.optional(z61.nullable(z61.unknown())),
15106
- toolSchema: z61.optional(z61.nullable(z61.unknown())),
15107
- hooks: z61.optional(z61.nullable(z61.record(z61.string(), z61.array(z61.unknown())))),
15108
- model: z61.optional(z61.nullable(z61.string())),
15109
- mcpServers: z61.optional(z61.nullable(z61.record(z61.string(), z61.unknown()))),
15110
- useLegacyMcpJson: z61.optional(z61.nullable(z61.boolean())),
15111
- resources: z61.optional(z61.nullable(z61.array(z61.string()))),
15112
- allowedTools: z61.optional(z61.nullable(z61.array(z61.string()))),
15113
- includeMcpJson: z61.optional(z61.nullable(z61.boolean()))
15492
+ import { join as join106 } from "path";
15493
+ import { z as z62 } from "zod/mini";
15494
+ var KiroCliSubagentJsonSchema = z62.looseObject({
15495
+ name: z62.string(),
15496
+ description: z62.optional(z62.nullable(z62.string())),
15497
+ prompt: z62.optional(z62.nullable(z62.string())),
15498
+ tools: z62.optional(z62.nullable(z62.array(z62.string()))),
15499
+ toolAliases: z62.optional(z62.nullable(z62.record(z62.string(), z62.string()))),
15500
+ toolSettings: z62.optional(z62.nullable(z62.unknown())),
15501
+ toolSchema: z62.optional(z62.nullable(z62.unknown())),
15502
+ hooks: z62.optional(z62.nullable(z62.record(z62.string(), z62.array(z62.unknown())))),
15503
+ model: z62.optional(z62.nullable(z62.string())),
15504
+ mcpServers: z62.optional(z62.nullable(z62.record(z62.string(), z62.unknown()))),
15505
+ useLegacyMcpJson: z62.optional(z62.nullable(z62.boolean())),
15506
+ resources: z62.optional(z62.nullable(z62.array(z62.string()))),
15507
+ allowedTools: z62.optional(z62.nullable(z62.array(z62.string()))),
15508
+ includeMcpJson: z62.optional(z62.nullable(z62.boolean()))
15114
15509
  });
15115
15510
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15116
15511
  body;
@@ -15121,7 +15516,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15121
15516
  KiroCliSubagentJsonSchema.parse(parsed);
15122
15517
  } catch (error) {
15123
15518
  throw new Error(
15124
- `Invalid JSON in ${join104(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15519
+ `Invalid JSON in ${join106(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15125
15520
  { cause: error }
15126
15521
  );
15127
15522
  }
@@ -15133,7 +15528,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15133
15528
  }
15134
15529
  static getSettablePaths(_options = {}) {
15135
15530
  return {
15136
- relativeDirPath: join104(".kiro", "agents")
15531
+ relativeDirPath: join106(".kiro", "agents")
15137
15532
  };
15138
15533
  }
15139
15534
  getBody() {
@@ -15145,7 +15540,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15145
15540
  parsed = JSON.parse(this.body);
15146
15541
  } catch (error) {
15147
15542
  throw new Error(
15148
- `Failed to parse JSON in ${join104(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15543
+ `Failed to parse JSON in ${join106(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15149
15544
  { cause: error }
15150
15545
  );
15151
15546
  }
@@ -15226,7 +15621,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15226
15621
  global = false
15227
15622
  }) {
15228
15623
  const paths = this.getSettablePaths({ global });
15229
- const filePath = join104(baseDir, paths.relativeDirPath, relativeFilePath);
15624
+ const filePath = join106(baseDir, paths.relativeDirPath, relativeFilePath);
15230
15625
  const fileContent = await readFileContent(filePath);
15231
15626
  const subagent = new _KiroSubagent({
15232
15627
  baseDir,
@@ -15264,7 +15659,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15264
15659
  };
15265
15660
 
15266
15661
  // src/features/subagents/opencode-subagent.ts
15267
- import { join as join105 } from "path";
15662
+ import { join as join107 } from "path";
15268
15663
  var OpenCodeSubagentFrontmatterSchema = OpenCodeStyleSubagentFrontmatterSchema;
15269
15664
  var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
15270
15665
  getToolTarget() {
@@ -15274,7 +15669,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
15274
15669
  global = false
15275
15670
  } = {}) {
15276
15671
  return {
15277
- relativeDirPath: global ? join105(".config", "opencode", "agent") : join105(".opencode", "agent")
15672
+ relativeDirPath: global ? join107(".config", "opencode", "agent") : join107(".opencode", "agent")
15278
15673
  };
15279
15674
  }
15280
15675
  static fromRulesyncSubagent({
@@ -15318,7 +15713,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
15318
15713
  global = false
15319
15714
  }) {
15320
15715
  const paths = this.getSettablePaths({ global });
15321
- const filePath = join105(baseDir, paths.relativeDirPath, relativeFilePath);
15716
+ const filePath = join107(baseDir, paths.relativeDirPath, relativeFilePath);
15322
15717
  const fileContent = await readFileContent(filePath);
15323
15718
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15324
15719
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15371,7 +15766,7 @@ var subagentsProcessorToolTargetTuple = [
15371
15766
  "roo",
15372
15767
  "rovodev"
15373
15768
  ];
15374
- var SubagentsProcessorToolTargetSchema = z62.enum(subagentsProcessorToolTargetTuple);
15769
+ var SubagentsProcessorToolTargetSchema = z63.enum(subagentsProcessorToolTargetTuple);
15375
15770
  var toolSubagentFactories = /* @__PURE__ */ new Map([
15376
15771
  [
15377
15772
  "agentsmd",
@@ -15562,7 +15957,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
15562
15957
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
15563
15958
  */
15564
15959
  async loadRulesyncFiles() {
15565
- const subagentsDir = join106(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
15960
+ const subagentsDir = join108(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
15566
15961
  const dirExists = await directoryExists(subagentsDir);
15567
15962
  if (!dirExists) {
15568
15963
  this.logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -15577,7 +15972,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
15577
15972
  this.logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
15578
15973
  const rulesyncSubagents = [];
15579
15974
  for (const mdFile of mdFiles) {
15580
- const filepath = join106(subagentsDir, mdFile);
15975
+ const filepath = join108(subagentsDir, mdFile);
15581
15976
  try {
15582
15977
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
15583
15978
  relativeFilePath: mdFile,
@@ -15607,7 +16002,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
15607
16002
  const factory = this.getFactory(this.toolTarget);
15608
16003
  const paths = factory.class.getSettablePaths({ global: this.global });
15609
16004
  const subagentFilePaths = await findFilesByGlobs(
15610
- join106(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
16005
+ join108(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
15611
16006
  );
15612
16007
  if (forDeletion) {
15613
16008
  const toolSubagents2 = subagentFilePaths.map(
@@ -15674,49 +16069,49 @@ var SubagentsProcessor = class extends FeatureProcessor {
15674
16069
  };
15675
16070
 
15676
16071
  // src/features/rules/agentsmd-rule.ts
15677
- import { join as join109 } from "path";
16072
+ import { join as join111 } from "path";
15678
16073
 
15679
16074
  // src/features/rules/tool-rule.ts
15680
- import { join as join108 } from "path";
16075
+ import { join as join110 } from "path";
15681
16076
 
15682
16077
  // src/features/rules/rulesync-rule.ts
15683
- import { join as join107 } from "path";
15684
- import { z as z63 } from "zod/mini";
15685
- var RulesyncRuleFrontmatterSchema = z63.object({
15686
- root: z63.optional(z63.boolean()),
15687
- localRoot: z63.optional(z63.boolean()),
15688
- targets: z63._default(RulesyncTargetsSchema, ["*"]),
15689
- description: z63.optional(z63.string()),
15690
- globs: z63.optional(z63.array(z63.string())),
15691
- agentsmd: z63.optional(
15692
- z63.looseObject({
16078
+ import { join as join109 } from "path";
16079
+ import { z as z64 } from "zod/mini";
16080
+ var RulesyncRuleFrontmatterSchema = z64.object({
16081
+ root: z64.optional(z64.boolean()),
16082
+ localRoot: z64.optional(z64.boolean()),
16083
+ targets: z64._default(RulesyncTargetsSchema, ["*"]),
16084
+ description: z64.optional(z64.string()),
16085
+ globs: z64.optional(z64.array(z64.string())),
16086
+ agentsmd: z64.optional(
16087
+ z64.looseObject({
15693
16088
  // @example "path/to/subproject"
15694
- subprojectPath: z63.optional(z63.string())
16089
+ subprojectPath: z64.optional(z64.string())
15695
16090
  })
15696
16091
  ),
15697
- claudecode: z63.optional(
15698
- z63.looseObject({
16092
+ claudecode: z64.optional(
16093
+ z64.looseObject({
15699
16094
  // Glob patterns for conditional rules (takes precedence over globs)
15700
16095
  // @example ["src/**/*.ts", "tests/**/*.test.ts"]
15701
- paths: z63.optional(z63.array(z63.string()))
16096
+ paths: z64.optional(z64.array(z64.string()))
15702
16097
  })
15703
16098
  ),
15704
- cursor: z63.optional(
15705
- z63.looseObject({
15706
- alwaysApply: z63.optional(z63.boolean()),
15707
- description: z63.optional(z63.string()),
15708
- globs: z63.optional(z63.array(z63.string()))
16099
+ cursor: z64.optional(
16100
+ z64.looseObject({
16101
+ alwaysApply: z64.optional(z64.boolean()),
16102
+ description: z64.optional(z64.string()),
16103
+ globs: z64.optional(z64.array(z64.string()))
15709
16104
  })
15710
16105
  ),
15711
- copilot: z63.optional(
15712
- z63.looseObject({
15713
- excludeAgent: z63.optional(z63.union([z63.literal("code-review"), z63.literal("coding-agent")]))
16106
+ copilot: z64.optional(
16107
+ z64.looseObject({
16108
+ excludeAgent: z64.optional(z64.union([z64.literal("code-review"), z64.literal("coding-agent")]))
15714
16109
  })
15715
16110
  ),
15716
- antigravity: z63.optional(
15717
- z63.looseObject({
15718
- trigger: z63.optional(z63.string()),
15719
- globs: z63.optional(z63.array(z63.string()))
16111
+ antigravity: z64.optional(
16112
+ z64.looseObject({
16113
+ trigger: z64.optional(z64.string()),
16114
+ globs: z64.optional(z64.array(z64.string()))
15720
16115
  })
15721
16116
  )
15722
16117
  });
@@ -15727,7 +16122,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
15727
16122
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
15728
16123
  if (!parseResult.success && rest.validate !== false) {
15729
16124
  throw new Error(
15730
- `Invalid frontmatter in ${join107(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
16125
+ `Invalid frontmatter in ${join109(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
15731
16126
  );
15732
16127
  }
15733
16128
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -15762,7 +16157,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
15762
16157
  return {
15763
16158
  success: false,
15764
16159
  error: new Error(
15765
- `Invalid frontmatter in ${join107(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16160
+ `Invalid frontmatter in ${join109(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15766
16161
  )
15767
16162
  };
15768
16163
  }
@@ -15771,7 +16166,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
15771
16166
  relativeFilePath,
15772
16167
  validate = true
15773
16168
  }) {
15774
- const filePath = join107(
16169
+ const filePath = join109(
15775
16170
  process.cwd(),
15776
16171
  this.getSettablePaths().recommended.relativeDirPath,
15777
16172
  relativeFilePath
@@ -15870,7 +16265,7 @@ var ToolRule = class extends ToolFile {
15870
16265
  rulesyncRule,
15871
16266
  validate = true,
15872
16267
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
15873
- nonRootPath = { relativeDirPath: join108(".agents", "memories") }
16268
+ nonRootPath = { relativeDirPath: join110(".agents", "memories") }
15874
16269
  }) {
15875
16270
  const params = this.buildToolRuleParamsDefault({
15876
16271
  baseDir,
@@ -15881,7 +16276,7 @@ var ToolRule = class extends ToolFile {
15881
16276
  });
15882
16277
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
15883
16278
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
15884
- params.relativeDirPath = join108(rulesyncFrontmatter.agentsmd.subprojectPath);
16279
+ params.relativeDirPath = join110(rulesyncFrontmatter.agentsmd.subprojectPath);
15885
16280
  params.relativeFilePath = "AGENTS.md";
15886
16281
  }
15887
16282
  return params;
@@ -15930,7 +16325,7 @@ var ToolRule = class extends ToolFile {
15930
16325
  }
15931
16326
  };
15932
16327
  function buildToolPath(toolDir, subDir, excludeToolDir) {
15933
- return excludeToolDir ? subDir : join108(toolDir, subDir);
16328
+ return excludeToolDir ? subDir : join110(toolDir, subDir);
15934
16329
  }
15935
16330
 
15936
16331
  // src/features/rules/agentsmd-rule.ts
@@ -15959,8 +16354,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
15959
16354
  validate = true
15960
16355
  }) {
15961
16356
  const isRoot = relativeFilePath === "AGENTS.md";
15962
- const relativePath = isRoot ? "AGENTS.md" : join109(".agents", "memories", relativeFilePath);
15963
- const fileContent = await readFileContent(join109(baseDir, relativePath));
16357
+ const relativePath = isRoot ? "AGENTS.md" : join111(".agents", "memories", relativeFilePath);
16358
+ const fileContent = await readFileContent(join111(baseDir, relativePath));
15964
16359
  return new _AgentsMdRule({
15965
16360
  baseDir,
15966
16361
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -16015,21 +16410,21 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
16015
16410
  };
16016
16411
 
16017
16412
  // src/features/rules/antigravity-rule.ts
16018
- import { join as join110 } from "path";
16019
- import { z as z64 } from "zod/mini";
16020
- var AntigravityRuleFrontmatterSchema = z64.looseObject({
16021
- trigger: z64.optional(
16022
- z64.union([
16023
- z64.literal("always_on"),
16024
- z64.literal("glob"),
16025
- z64.literal("manual"),
16026
- z64.literal("model_decision"),
16027
- z64.string()
16413
+ import { join as join112 } from "path";
16414
+ import { z as z65 } from "zod/mini";
16415
+ var AntigravityRuleFrontmatterSchema = z65.looseObject({
16416
+ trigger: z65.optional(
16417
+ z65.union([
16418
+ z65.literal("always_on"),
16419
+ z65.literal("glob"),
16420
+ z65.literal("manual"),
16421
+ z65.literal("model_decision"),
16422
+ z65.string()
16028
16423
  // accepts any string for forward compatibility
16029
16424
  ])
16030
16425
  ),
16031
- globs: z64.optional(z64.string()),
16032
- description: z64.optional(z64.string())
16426
+ globs: z65.optional(z65.string()),
16427
+ description: z65.optional(z65.string())
16033
16428
  });
16034
16429
  function parseGlobsString(globs) {
16035
16430
  if (!globs) {
@@ -16174,7 +16569,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
16174
16569
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
16175
16570
  if (!result.success) {
16176
16571
  throw new Error(
16177
- `Invalid frontmatter in ${join110(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16572
+ `Invalid frontmatter in ${join112(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16178
16573
  );
16179
16574
  }
16180
16575
  }
@@ -16198,7 +16593,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
16198
16593
  relativeFilePath,
16199
16594
  validate = true
16200
16595
  }) {
16201
- const filePath = join110(
16596
+ const filePath = join112(
16202
16597
  baseDir,
16203
16598
  this.getSettablePaths().nonRoot.relativeDirPath,
16204
16599
  relativeFilePath
@@ -16338,7 +16733,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
16338
16733
  };
16339
16734
 
16340
16735
  // src/features/rules/augmentcode-legacy-rule.ts
16341
- import { join as join111 } from "path";
16736
+ import { join as join113 } from "path";
16342
16737
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
16343
16738
  toRulesyncRule() {
16344
16739
  const rulesyncFrontmatter = {
@@ -16398,8 +16793,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
16398
16793
  }) {
16399
16794
  const settablePaths = this.getSettablePaths();
16400
16795
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
16401
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : join111(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
16402
- const fileContent = await readFileContent(join111(baseDir, relativePath));
16796
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : join113(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
16797
+ const fileContent = await readFileContent(join113(baseDir, relativePath));
16403
16798
  return new _AugmentcodeLegacyRule({
16404
16799
  baseDir,
16405
16800
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -16428,7 +16823,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
16428
16823
  };
16429
16824
 
16430
16825
  // src/features/rules/augmentcode-rule.ts
16431
- import { join as join112 } from "path";
16826
+ import { join as join114 } from "path";
16432
16827
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
16433
16828
  toRulesyncRule() {
16434
16829
  return this.toRulesyncRuleDefault();
@@ -16459,7 +16854,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
16459
16854
  relativeFilePath,
16460
16855
  validate = true
16461
16856
  }) {
16462
- const filePath = join112(
16857
+ const filePath = join114(
16463
16858
  baseDir,
16464
16859
  this.getSettablePaths().nonRoot.relativeDirPath,
16465
16860
  relativeFilePath
@@ -16499,7 +16894,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
16499
16894
  };
16500
16895
 
16501
16896
  // src/features/rules/claudecode-legacy-rule.ts
16502
- import { join as join113 } from "path";
16897
+ import { join as join115 } from "path";
16503
16898
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
16504
16899
  static getSettablePaths({
16505
16900
  global,
@@ -16541,7 +16936,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
16541
16936
  if (isRoot) {
16542
16937
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
16543
16938
  const fileContent2 = await readFileContent(
16544
- join113(baseDir, rootDirPath, paths.root.relativeFilePath)
16939
+ join115(baseDir, rootDirPath, paths.root.relativeFilePath)
16545
16940
  );
16546
16941
  return new _ClaudecodeLegacyRule({
16547
16942
  baseDir,
@@ -16555,8 +16950,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
16555
16950
  if (!paths.nonRoot) {
16556
16951
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
16557
16952
  }
16558
- const relativePath = join113(paths.nonRoot.relativeDirPath, relativeFilePath);
16559
- const fileContent = await readFileContent(join113(baseDir, relativePath));
16953
+ const relativePath = join115(paths.nonRoot.relativeDirPath, relativeFilePath);
16954
+ const fileContent = await readFileContent(join115(baseDir, relativePath));
16560
16955
  return new _ClaudecodeLegacyRule({
16561
16956
  baseDir,
16562
16957
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -16615,10 +17010,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
16615
17010
  };
16616
17011
 
16617
17012
  // src/features/rules/claudecode-rule.ts
16618
- import { join as join114 } from "path";
16619
- import { z as z65 } from "zod/mini";
16620
- var ClaudecodeRuleFrontmatterSchema = z65.object({
16621
- paths: z65.optional(z65.array(z65.string()))
17013
+ import { join as join116 } from "path";
17014
+ import { z as z66 } from "zod/mini";
17015
+ var ClaudecodeRuleFrontmatterSchema = z66.object({
17016
+ paths: z66.optional(z66.array(z66.string()))
16622
17017
  });
16623
17018
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
16624
17019
  frontmatter;
@@ -16656,7 +17051,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
16656
17051
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
16657
17052
  if (!result.success) {
16658
17053
  throw new Error(
16659
- `Invalid frontmatter in ${join114(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17054
+ `Invalid frontmatter in ${join116(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16660
17055
  );
16661
17056
  }
16662
17057
  }
@@ -16686,7 +17081,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
16686
17081
  if (isRoot) {
16687
17082
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
16688
17083
  const fileContent2 = await readFileContent(
16689
- join114(baseDir, rootDirPath, paths.root.relativeFilePath)
17084
+ join116(baseDir, rootDirPath, paths.root.relativeFilePath)
16690
17085
  );
16691
17086
  return new _ClaudecodeRule({
16692
17087
  baseDir,
@@ -16701,8 +17096,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
16701
17096
  if (!paths.nonRoot) {
16702
17097
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
16703
17098
  }
16704
- const relativePath = join114(paths.nonRoot.relativeDirPath, relativeFilePath);
16705
- const filePath = join114(baseDir, relativePath);
17099
+ const relativePath = join116(paths.nonRoot.relativeDirPath, relativeFilePath);
17100
+ const filePath = join116(baseDir, relativePath);
16706
17101
  const fileContent = await readFileContent(filePath);
16707
17102
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
16708
17103
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
@@ -16813,7 +17208,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
16813
17208
  return {
16814
17209
  success: false,
16815
17210
  error: new Error(
16816
- `Invalid frontmatter in ${join114(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17211
+ `Invalid frontmatter in ${join116(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16817
17212
  )
16818
17213
  };
16819
17214
  }
@@ -16833,10 +17228,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
16833
17228
  };
16834
17229
 
16835
17230
  // src/features/rules/cline-rule.ts
16836
- import { join as join115 } from "path";
16837
- import { z as z66 } from "zod/mini";
16838
- var ClineRuleFrontmatterSchema = z66.object({
16839
- description: z66.string()
17231
+ import { join as join117 } from "path";
17232
+ import { z as z67 } from "zod/mini";
17233
+ var ClineRuleFrontmatterSchema = z67.object({
17234
+ description: z67.string()
16840
17235
  });
16841
17236
  var ClineRule = class _ClineRule extends ToolRule {
16842
17237
  static getSettablePaths(_options = {}) {
@@ -16879,7 +17274,7 @@ var ClineRule = class _ClineRule extends ToolRule {
16879
17274
  validate = true
16880
17275
  }) {
16881
17276
  const fileContent = await readFileContent(
16882
- join115(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17277
+ join117(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
16883
17278
  );
16884
17279
  return new _ClineRule({
16885
17280
  baseDir,
@@ -16905,7 +17300,7 @@ var ClineRule = class _ClineRule extends ToolRule {
16905
17300
  };
16906
17301
 
16907
17302
  // src/features/rules/codexcli-rule.ts
16908
- import { join as join116 } from "path";
17303
+ import { join as join118 } from "path";
16909
17304
  var CodexcliRule = class _CodexcliRule extends ToolRule {
16910
17305
  static getSettablePaths({
16911
17306
  global,
@@ -16940,7 +17335,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
16940
17335
  if (isRoot) {
16941
17336
  const relativePath2 = paths.root.relativeFilePath;
16942
17337
  const fileContent2 = await readFileContent(
16943
- join116(baseDir, paths.root.relativeDirPath, relativePath2)
17338
+ join118(baseDir, paths.root.relativeDirPath, relativePath2)
16944
17339
  );
16945
17340
  return new _CodexcliRule({
16946
17341
  baseDir,
@@ -16954,8 +17349,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
16954
17349
  if (!paths.nonRoot) {
16955
17350
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
16956
17351
  }
16957
- const relativePath = join116(paths.nonRoot.relativeDirPath, relativeFilePath);
16958
- const fileContent = await readFileContent(join116(baseDir, relativePath));
17352
+ const relativePath = join118(paths.nonRoot.relativeDirPath, relativeFilePath);
17353
+ const fileContent = await readFileContent(join118(baseDir, relativePath));
16959
17354
  return new _CodexcliRule({
16960
17355
  baseDir,
16961
17356
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17014,12 +17409,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
17014
17409
  };
17015
17410
 
17016
17411
  // src/features/rules/copilot-rule.ts
17017
- import { join as join117 } from "path";
17018
- import { z as z67 } from "zod/mini";
17019
- var CopilotRuleFrontmatterSchema = z67.object({
17020
- description: z67.optional(z67.string()),
17021
- applyTo: z67.optional(z67.string()),
17022
- excludeAgent: z67.optional(z67.union([z67.literal("code-review"), z67.literal("coding-agent")]))
17412
+ import { join as join119 } from "path";
17413
+ import { z as z68 } from "zod/mini";
17414
+ var CopilotRuleFrontmatterSchema = z68.object({
17415
+ description: z68.optional(z68.string()),
17416
+ applyTo: z68.optional(z68.string()),
17417
+ excludeAgent: z68.optional(z68.union([z68.literal("code-review"), z68.literal("coding-agent")]))
17023
17418
  });
17024
17419
  var CopilotRule = class _CopilotRule extends ToolRule {
17025
17420
  frontmatter;
@@ -17051,7 +17446,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17051
17446
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
17052
17447
  if (!result.success) {
17053
17448
  throw new Error(
17054
- `Invalid frontmatter in ${join117(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17449
+ `Invalid frontmatter in ${join119(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17055
17450
  );
17056
17451
  }
17057
17452
  }
@@ -17141,8 +17536,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17141
17536
  const paths = this.getSettablePaths({ global });
17142
17537
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
17143
17538
  if (isRoot) {
17144
- const relativePath2 = join117(paths.root.relativeDirPath, paths.root.relativeFilePath);
17145
- const filePath2 = join117(baseDir, relativePath2);
17539
+ const relativePath2 = join119(paths.root.relativeDirPath, paths.root.relativeFilePath);
17540
+ const filePath2 = join119(baseDir, relativePath2);
17146
17541
  const fileContent2 = await readFileContent(filePath2);
17147
17542
  return new _CopilotRule({
17148
17543
  baseDir,
@@ -17157,8 +17552,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17157
17552
  if (!paths.nonRoot) {
17158
17553
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17159
17554
  }
17160
- const relativePath = join117(paths.nonRoot.relativeDirPath, relativeFilePath);
17161
- const filePath = join117(baseDir, relativePath);
17555
+ const relativePath = join119(paths.nonRoot.relativeDirPath, relativeFilePath);
17556
+ const filePath = join119(baseDir, relativePath);
17162
17557
  const fileContent = await readFileContent(filePath);
17163
17558
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
17164
17559
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
@@ -17204,7 +17599,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17204
17599
  return {
17205
17600
  success: false,
17206
17601
  error: new Error(
17207
- `Invalid frontmatter in ${join117(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17602
+ `Invalid frontmatter in ${join119(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17208
17603
  )
17209
17604
  };
17210
17605
  }
@@ -17260,12 +17655,12 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
17260
17655
  };
17261
17656
 
17262
17657
  // src/features/rules/cursor-rule.ts
17263
- import { join as join118 } from "path";
17264
- import { z as z68 } from "zod/mini";
17265
- var CursorRuleFrontmatterSchema = z68.object({
17266
- description: z68.optional(z68.string()),
17267
- globs: z68.optional(z68.string()),
17268
- alwaysApply: z68.optional(z68.boolean())
17658
+ import { join as join120 } from "path";
17659
+ import { z as z69 } from "zod/mini";
17660
+ var CursorRuleFrontmatterSchema = z69.object({
17661
+ description: z69.optional(z69.string()),
17662
+ globs: z69.optional(z69.string()),
17663
+ alwaysApply: z69.optional(z69.boolean())
17269
17664
  });
17270
17665
  var CursorRule = class _CursorRule extends ToolRule {
17271
17666
  frontmatter;
@@ -17282,7 +17677,7 @@ var CursorRule = class _CursorRule extends ToolRule {
17282
17677
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
17283
17678
  if (!result.success) {
17284
17679
  throw new Error(
17285
- `Invalid frontmatter in ${join118(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17680
+ `Invalid frontmatter in ${join120(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17286
17681
  );
17287
17682
  }
17288
17683
  }
@@ -17398,7 +17793,7 @@ var CursorRule = class _CursorRule extends ToolRule {
17398
17793
  relativeFilePath,
17399
17794
  validate = true
17400
17795
  }) {
17401
- const filePath = join118(
17796
+ const filePath = join120(
17402
17797
  baseDir,
17403
17798
  this.getSettablePaths().nonRoot.relativeDirPath,
17404
17799
  relativeFilePath
@@ -17408,7 +17803,7 @@ var CursorRule = class _CursorRule extends ToolRule {
17408
17803
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
17409
17804
  if (!result.success) {
17410
17805
  throw new Error(
17411
- `Invalid frontmatter in ${join118(baseDir, relativeFilePath)}: ${formatError(result.error)}`
17806
+ `Invalid frontmatter in ${join120(baseDir, relativeFilePath)}: ${formatError(result.error)}`
17412
17807
  );
17413
17808
  }
17414
17809
  return new _CursorRule({
@@ -17445,7 +17840,7 @@ var CursorRule = class _CursorRule extends ToolRule {
17445
17840
  return {
17446
17841
  success: false,
17447
17842
  error: new Error(
17448
- `Invalid frontmatter in ${join118(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17843
+ `Invalid frontmatter in ${join120(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17449
17844
  )
17450
17845
  };
17451
17846
  }
@@ -17465,7 +17860,7 @@ var CursorRule = class _CursorRule extends ToolRule {
17465
17860
  };
17466
17861
 
17467
17862
  // src/features/rules/deepagents-rule.ts
17468
- import { join as join119 } from "path";
17863
+ import { join as join121 } from "path";
17469
17864
  var DeepagentsRule = class _DeepagentsRule extends ToolRule {
17470
17865
  constructor({ fileContent, root, ...rest }) {
17471
17866
  super({
@@ -17492,8 +17887,8 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
17492
17887
  }) {
17493
17888
  const settablePaths = this.getSettablePaths();
17494
17889
  const isRoot = relativeFilePath === "AGENTS.md";
17495
- const relativePath = isRoot ? join119(".deepagents", "AGENTS.md") : join119(".deepagents", "memories", relativeFilePath);
17496
- const fileContent = await readFileContent(join119(baseDir, relativePath));
17890
+ const relativePath = isRoot ? join121(".deepagents", "AGENTS.md") : join121(".deepagents", "memories", relativeFilePath);
17891
+ const fileContent = await readFileContent(join121(baseDir, relativePath));
17497
17892
  return new _DeepagentsRule({
17498
17893
  baseDir,
17499
17894
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -17548,7 +17943,7 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
17548
17943
  };
17549
17944
 
17550
17945
  // src/features/rules/factorydroid-rule.ts
17551
- import { join as join120 } from "path";
17946
+ import { join as join122 } from "path";
17552
17947
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
17553
17948
  constructor({ fileContent, root, ...rest }) {
17554
17949
  super({
@@ -17588,8 +17983,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
17588
17983
  const paths = this.getSettablePaths({ global });
17589
17984
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
17590
17985
  if (isRoot) {
17591
- const relativePath2 = join120(paths.root.relativeDirPath, paths.root.relativeFilePath);
17592
- const fileContent2 = await readFileContent(join120(baseDir, relativePath2));
17986
+ const relativePath2 = join122(paths.root.relativeDirPath, paths.root.relativeFilePath);
17987
+ const fileContent2 = await readFileContent(join122(baseDir, relativePath2));
17593
17988
  return new _FactorydroidRule({
17594
17989
  baseDir,
17595
17990
  relativeDirPath: paths.root.relativeDirPath,
@@ -17602,8 +17997,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
17602
17997
  if (!paths.nonRoot) {
17603
17998
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17604
17999
  }
17605
- const relativePath = join120(paths.nonRoot.relativeDirPath, relativeFilePath);
17606
- const fileContent = await readFileContent(join120(baseDir, relativePath));
18000
+ const relativePath = join122(paths.nonRoot.relativeDirPath, relativeFilePath);
18001
+ const fileContent = await readFileContent(join122(baseDir, relativePath));
17607
18002
  return new _FactorydroidRule({
17608
18003
  baseDir,
17609
18004
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17662,7 +18057,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
17662
18057
  };
17663
18058
 
17664
18059
  // src/features/rules/geminicli-rule.ts
17665
- import { join as join121 } from "path";
18060
+ import { join as join123 } from "path";
17666
18061
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
17667
18062
  static getSettablePaths({
17668
18063
  global,
@@ -17697,7 +18092,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
17697
18092
  if (isRoot) {
17698
18093
  const relativePath2 = paths.root.relativeFilePath;
17699
18094
  const fileContent2 = await readFileContent(
17700
- join121(baseDir, paths.root.relativeDirPath, relativePath2)
18095
+ join123(baseDir, paths.root.relativeDirPath, relativePath2)
17701
18096
  );
17702
18097
  return new _GeminiCliRule({
17703
18098
  baseDir,
@@ -17711,8 +18106,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
17711
18106
  if (!paths.nonRoot) {
17712
18107
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17713
18108
  }
17714
- const relativePath = join121(paths.nonRoot.relativeDirPath, relativeFilePath);
17715
- const fileContent = await readFileContent(join121(baseDir, relativePath));
18109
+ const relativePath = join123(paths.nonRoot.relativeDirPath, relativeFilePath);
18110
+ const fileContent = await readFileContent(join123(baseDir, relativePath));
17716
18111
  return new _GeminiCliRule({
17717
18112
  baseDir,
17718
18113
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17771,7 +18166,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
17771
18166
  };
17772
18167
 
17773
18168
  // src/features/rules/goose-rule.ts
17774
- import { join as join122 } from "path";
18169
+ import { join as join124 } from "path";
17775
18170
  var GooseRule = class _GooseRule extends ToolRule {
17776
18171
  static getSettablePaths({
17777
18172
  global,
@@ -17806,7 +18201,7 @@ var GooseRule = class _GooseRule extends ToolRule {
17806
18201
  if (isRoot) {
17807
18202
  const relativePath2 = paths.root.relativeFilePath;
17808
18203
  const fileContent2 = await readFileContent(
17809
- join122(baseDir, paths.root.relativeDirPath, relativePath2)
18204
+ join124(baseDir, paths.root.relativeDirPath, relativePath2)
17810
18205
  );
17811
18206
  return new _GooseRule({
17812
18207
  baseDir,
@@ -17820,8 +18215,8 @@ var GooseRule = class _GooseRule extends ToolRule {
17820
18215
  if (!paths.nonRoot) {
17821
18216
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17822
18217
  }
17823
- const relativePath = join122(paths.nonRoot.relativeDirPath, relativeFilePath);
17824
- const fileContent = await readFileContent(join122(baseDir, relativePath));
18218
+ const relativePath = join124(paths.nonRoot.relativeDirPath, relativeFilePath);
18219
+ const fileContent = await readFileContent(join124(baseDir, relativePath));
17825
18220
  return new _GooseRule({
17826
18221
  baseDir,
17827
18222
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17880,7 +18275,7 @@ var GooseRule = class _GooseRule extends ToolRule {
17880
18275
  };
17881
18276
 
17882
18277
  // src/features/rules/junie-rule.ts
17883
- import { join as join123 } from "path";
18278
+ import { join as join125 } from "path";
17884
18279
  var JunieRule = class _JunieRule extends ToolRule {
17885
18280
  static getSettablePaths(_options = {}) {
17886
18281
  return {
@@ -17909,8 +18304,8 @@ var JunieRule = class _JunieRule extends ToolRule {
17909
18304
  }) {
17910
18305
  const isRoot = _JunieRule.isRootRelativeFilePath(relativeFilePath);
17911
18306
  const settablePaths = this.getSettablePaths();
17912
- const relativePath = isRoot ? join123(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : join123(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
17913
- const fileContent = await readFileContent(join123(baseDir, relativePath));
18307
+ const relativePath = isRoot ? join125(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : join125(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
18308
+ const fileContent = await readFileContent(join125(baseDir, relativePath));
17914
18309
  return new _JunieRule({
17915
18310
  baseDir,
17916
18311
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -17965,7 +18360,7 @@ var JunieRule = class _JunieRule extends ToolRule {
17965
18360
  };
17966
18361
 
17967
18362
  // src/features/rules/kilo-rule.ts
17968
- import { join as join124 } from "path";
18363
+ import { join as join126 } from "path";
17969
18364
  var KiloRule = class _KiloRule extends ToolRule {
17970
18365
  static getSettablePaths({
17971
18366
  global,
@@ -18000,7 +18395,7 @@ var KiloRule = class _KiloRule extends ToolRule {
18000
18395
  if (isRoot) {
18001
18396
  const relativePath2 = paths.root.relativeFilePath;
18002
18397
  const fileContent2 = await readFileContent(
18003
- join124(baseDir, paths.root.relativeDirPath, relativePath2)
18398
+ join126(baseDir, paths.root.relativeDirPath, relativePath2)
18004
18399
  );
18005
18400
  return new _KiloRule({
18006
18401
  baseDir,
@@ -18014,8 +18409,8 @@ var KiloRule = class _KiloRule extends ToolRule {
18014
18409
  if (!paths.nonRoot) {
18015
18410
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18016
18411
  }
18017
- const relativePath = join124(paths.nonRoot.relativeDirPath, relativeFilePath);
18018
- const fileContent = await readFileContent(join124(baseDir, relativePath));
18412
+ const relativePath = join126(paths.nonRoot.relativeDirPath, relativeFilePath);
18413
+ const fileContent = await readFileContent(join126(baseDir, relativePath));
18019
18414
  return new _KiloRule({
18020
18415
  baseDir,
18021
18416
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18074,7 +18469,7 @@ var KiloRule = class _KiloRule extends ToolRule {
18074
18469
  };
18075
18470
 
18076
18471
  // src/features/rules/kiro-rule.ts
18077
- import { join as join125 } from "path";
18472
+ import { join as join127 } from "path";
18078
18473
  var KiroRule = class _KiroRule extends ToolRule {
18079
18474
  static getSettablePaths(_options = {}) {
18080
18475
  return {
@@ -18089,7 +18484,7 @@ var KiroRule = class _KiroRule extends ToolRule {
18089
18484
  validate = true
18090
18485
  }) {
18091
18486
  const fileContent = await readFileContent(
18092
- join125(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18487
+ join127(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18093
18488
  );
18094
18489
  return new _KiroRule({
18095
18490
  baseDir,
@@ -18143,7 +18538,7 @@ var KiroRule = class _KiroRule extends ToolRule {
18143
18538
  };
18144
18539
 
18145
18540
  // src/features/rules/opencode-rule.ts
18146
- import { join as join126 } from "path";
18541
+ import { join as join128 } from "path";
18147
18542
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18148
18543
  static getSettablePaths({
18149
18544
  global,
@@ -18178,7 +18573,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18178
18573
  if (isRoot) {
18179
18574
  const relativePath2 = paths.root.relativeFilePath;
18180
18575
  const fileContent2 = await readFileContent(
18181
- join126(baseDir, paths.root.relativeDirPath, relativePath2)
18576
+ join128(baseDir, paths.root.relativeDirPath, relativePath2)
18182
18577
  );
18183
18578
  return new _OpenCodeRule({
18184
18579
  baseDir,
@@ -18192,8 +18587,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18192
18587
  if (!paths.nonRoot) {
18193
18588
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18194
18589
  }
18195
- const relativePath = join126(paths.nonRoot.relativeDirPath, relativeFilePath);
18196
- const fileContent = await readFileContent(join126(baseDir, relativePath));
18590
+ const relativePath = join128(paths.nonRoot.relativeDirPath, relativeFilePath);
18591
+ const fileContent = await readFileContent(join128(baseDir, relativePath));
18197
18592
  return new _OpenCodeRule({
18198
18593
  baseDir,
18199
18594
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18252,7 +18647,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18252
18647
  };
18253
18648
 
18254
18649
  // src/features/rules/qwencode-rule.ts
18255
- import { join as join127 } from "path";
18650
+ import { join as join129 } from "path";
18256
18651
  var QwencodeRule = class _QwencodeRule extends ToolRule {
18257
18652
  static getSettablePaths(_options = {}) {
18258
18653
  return {
@@ -18271,8 +18666,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
18271
18666
  validate = true
18272
18667
  }) {
18273
18668
  const isRoot = relativeFilePath === "QWEN.md";
18274
- const relativePath = isRoot ? "QWEN.md" : join127(".qwen", "memories", relativeFilePath);
18275
- const fileContent = await readFileContent(join127(baseDir, relativePath));
18669
+ const relativePath = isRoot ? "QWEN.md" : join129(".qwen", "memories", relativeFilePath);
18670
+ const fileContent = await readFileContent(join129(baseDir, relativePath));
18276
18671
  return new _QwencodeRule({
18277
18672
  baseDir,
18278
18673
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -18324,7 +18719,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
18324
18719
  };
18325
18720
 
18326
18721
  // src/features/rules/replit-rule.ts
18327
- import { join as join128 } from "path";
18722
+ import { join as join130 } from "path";
18328
18723
  var ReplitRule = class _ReplitRule extends ToolRule {
18329
18724
  static getSettablePaths(_options = {}) {
18330
18725
  return {
@@ -18346,7 +18741,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
18346
18741
  }
18347
18742
  const relativePath = paths.root.relativeFilePath;
18348
18743
  const fileContent = await readFileContent(
18349
- join128(baseDir, paths.root.relativeDirPath, relativePath)
18744
+ join130(baseDir, paths.root.relativeDirPath, relativePath)
18350
18745
  );
18351
18746
  return new _ReplitRule({
18352
18747
  baseDir,
@@ -18412,7 +18807,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
18412
18807
  };
18413
18808
 
18414
18809
  // src/features/rules/roo-rule.ts
18415
- import { join as join129 } from "path";
18810
+ import { join as join131 } from "path";
18416
18811
  var RooRule = class _RooRule extends ToolRule {
18417
18812
  static getSettablePaths(_options = {}) {
18418
18813
  return {
@@ -18427,7 +18822,7 @@ var RooRule = class _RooRule extends ToolRule {
18427
18822
  validate = true
18428
18823
  }) {
18429
18824
  const fileContent = await readFileContent(
18430
- join129(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18825
+ join131(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18431
18826
  );
18432
18827
  return new _RooRule({
18433
18828
  baseDir,
@@ -18496,7 +18891,7 @@ var RooRule = class _RooRule extends ToolRule {
18496
18891
  };
18497
18892
 
18498
18893
  // src/features/rules/rovodev-rule.ts
18499
- import { join as join130 } from "path";
18894
+ import { join as join132 } from "path";
18500
18895
  var DISALLOWED_ROVODEV_MODULAR_RULE_BASENAMES = /* @__PURE__ */ new Set(["agents.md", "agents.local.md"]);
18501
18896
  var RovodevRule = class _RovodevRule extends ToolRule {
18502
18897
  /**
@@ -18540,7 +18935,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
18540
18935
  root: rovodevAgents,
18541
18936
  alternativeRoots: [{ relativeDirPath: ".", relativeFilePath: "AGENTS.md" }],
18542
18937
  nonRoot: {
18543
- relativeDirPath: join130(".rovodev", ".rulesync", "modular-rules")
18938
+ relativeDirPath: join132(".rovodev", ".rulesync", "modular-rules")
18544
18939
  }
18545
18940
  };
18546
18941
  }
@@ -18579,10 +18974,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
18579
18974
  }) {
18580
18975
  if (!this.isAllowedModularRulesRelativePath(relativeFilePath)) {
18581
18976
  throw new Error(
18582
- `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${join130(relativeDirPath, relativeFilePath)}`
18977
+ `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${join132(relativeDirPath, relativeFilePath)}`
18583
18978
  );
18584
18979
  }
18585
- const fileContent = await readFileContent(join130(baseDir, relativeDirPath, relativeFilePath));
18980
+ const fileContent = await readFileContent(join132(baseDir, relativeDirPath, relativeFilePath));
18586
18981
  return new _RovodevRule({
18587
18982
  baseDir,
18588
18983
  relativeDirPath,
@@ -18602,10 +18997,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
18602
18997
  paths
18603
18998
  }) {
18604
18999
  const relativeDirPath = overrideDirPath ?? paths.root.relativeDirPath;
18605
- const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${join130(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : join130(paths.root.relativeDirPath, paths.root.relativeFilePath);
19000
+ const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${join132(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : join132(paths.root.relativeDirPath, paths.root.relativeFilePath);
18606
19001
  if (relativeFilePath !== "AGENTS.md") {
18607
19002
  throw new Error(
18608
- `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${join130(relativeDirPath, relativeFilePath)}`
19003
+ `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${join132(relativeDirPath, relativeFilePath)}`
18609
19004
  );
18610
19005
  }
18611
19006
  const allowed = relativeDirPath === paths.root.relativeDirPath || "alternativeRoots" in paths && paths.alternativeRoots?.some(
@@ -18613,10 +19008,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
18613
19008
  );
18614
19009
  if (!allowed) {
18615
19010
  throw new Error(
18616
- `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${join130(relativeDirPath, relativeFilePath)}`
19011
+ `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${join132(relativeDirPath, relativeFilePath)}`
18617
19012
  );
18618
19013
  }
18619
- const fileContent = await readFileContent(join130(baseDir, relativeDirPath, relativeFilePath));
19014
+ const fileContent = await readFileContent(join132(baseDir, relativeDirPath, relativeFilePath));
18620
19015
  return new _RovodevRule({
18621
19016
  baseDir,
18622
19017
  relativeDirPath,
@@ -18730,7 +19125,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
18730
19125
  };
18731
19126
 
18732
19127
  // src/features/rules/warp-rule.ts
18733
- import { join as join131 } from "path";
19128
+ import { join as join133 } from "path";
18734
19129
  var WarpRule = class _WarpRule extends ToolRule {
18735
19130
  constructor({ fileContent, root, ...rest }) {
18736
19131
  super({
@@ -18756,8 +19151,8 @@ var WarpRule = class _WarpRule extends ToolRule {
18756
19151
  validate = true
18757
19152
  }) {
18758
19153
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
18759
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join131(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
18760
- const fileContent = await readFileContent(join131(baseDir, relativePath));
19154
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join133(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
19155
+ const fileContent = await readFileContent(join133(baseDir, relativePath));
18761
19156
  return new _WarpRule({
18762
19157
  baseDir,
18763
19158
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -18812,7 +19207,7 @@ var WarpRule = class _WarpRule extends ToolRule {
18812
19207
  };
18813
19208
 
18814
19209
  // src/features/rules/windsurf-rule.ts
18815
- import { join as join132 } from "path";
19210
+ import { join as join134 } from "path";
18816
19211
  var WindsurfRule = class _WindsurfRule extends ToolRule {
18817
19212
  static getSettablePaths(_options = {}) {
18818
19213
  return {
@@ -18827,7 +19222,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
18827
19222
  validate = true
18828
19223
  }) {
18829
19224
  const fileContent = await readFileContent(
18830
- join132(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19225
+ join134(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18831
19226
  );
18832
19227
  return new _WindsurfRule({
18833
19228
  baseDir,
@@ -18842,14 +19237,21 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
18842
19237
  rulesyncRule,
18843
19238
  validate = true
18844
19239
  }) {
18845
- return new _WindsurfRule(
18846
- this.buildToolRuleParamsDefault({
18847
- baseDir,
18848
- rulesyncRule,
18849
- validate,
18850
- nonRootPath: this.getSettablePaths().nonRoot
18851
- })
18852
- );
19240
+ const toolRuleParams = this.buildToolRuleParamsDefault({
19241
+ baseDir,
19242
+ rulesyncRule,
19243
+ validate,
19244
+ nonRootPath: this.getSettablePaths().nonRoot
19245
+ });
19246
+ const windsurfFrontmatter = this.buildWindsurfFrontmatter({
19247
+ relativeFilePath: rulesyncRule.getRelativeFilePath(),
19248
+ description: rulesyncRule.getFrontmatter().description,
19249
+ globs: rulesyncRule.getFrontmatter().globs
19250
+ });
19251
+ return new _WindsurfRule({
19252
+ ...toolRuleParams,
19253
+ fileContent: stringifyFrontmatter(rulesyncRule.getBody(), windsurfFrontmatter)
19254
+ });
18853
19255
  }
18854
19256
  toRulesyncRule() {
18855
19257
  return this.toRulesyncRuleDefault();
@@ -18876,6 +19278,18 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
18876
19278
  toolTarget: "windsurf"
18877
19279
  });
18878
19280
  }
19281
+ static buildWindsurfFrontmatter({
19282
+ relativeFilePath,
19283
+ description,
19284
+ globs
19285
+ }) {
19286
+ const hasSpecificGlobs = Boolean(globs && globs.length > 0 && !globs.includes("**/*"));
19287
+ return {
19288
+ title: description ?? relativeFilePath.replace(/\.md$/, ""),
19289
+ trigger: hasSpecificGlobs ? "glob" : "always_on",
19290
+ ...hasSpecificGlobs && { globs }
19291
+ };
19292
+ }
18879
19293
  };
18880
19294
 
18881
19295
  // src/features/rules/rules-processor.ts
@@ -18906,8 +19320,30 @@ var rulesProcessorToolTargets = [
18906
19320
  "warp",
18907
19321
  "windsurf"
18908
19322
  ];
18909
- var RulesProcessorToolTargetSchema = z69.enum(rulesProcessorToolTargets);
18910
- var formatRulePaths = (rules) => rules.map((r) => join133(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
19323
+ var RulesProcessorToolTargetSchema = z70.enum(rulesProcessorToolTargets);
19324
+ var formatRulePaths = (rules) => rules.map((r) => join135(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
19325
+ var RulesFeatureOptionsSchema = z70.looseObject({
19326
+ ruleDiscoveryMode: z70.optional(z70.enum(["none", "explicit"]))
19327
+ });
19328
+ var resolveRuleDiscoveryMode = ({
19329
+ defaultMode,
19330
+ options
19331
+ }) => {
19332
+ if (defaultMode === "claudecode-legacy") {
19333
+ return defaultMode;
19334
+ }
19335
+ if (!options) return defaultMode;
19336
+ const parsed = RulesFeatureOptionsSchema.safeParse(options);
19337
+ if (!parsed.success) {
19338
+ throw new Error(
19339
+ `Invalid options for rules feature: ${parsed.error.message}. \`ruleDiscoveryMode\` must be either "none" or "explicit".`
19340
+ );
19341
+ }
19342
+ if (!parsed.data.ruleDiscoveryMode) {
19343
+ return defaultMode;
19344
+ }
19345
+ return parsed.data.ruleDiscoveryMode === "none" ? "auto" : "toon";
19346
+ };
18911
19347
  var toolRuleFactories = /* @__PURE__ */ new Map([
18912
19348
  [
18913
19349
  "agentsmd",
@@ -19222,6 +19658,7 @@ var RulesProcessor = class extends FeatureProcessor {
19222
19658
  global;
19223
19659
  getFactory;
19224
19660
  skills;
19661
+ featureOptions;
19225
19662
  constructor({
19226
19663
  baseDir = process.cwd(),
19227
19664
  toolTarget,
@@ -19231,6 +19668,7 @@ var RulesProcessor = class extends FeatureProcessor {
19231
19668
  global = false,
19232
19669
  getFactory = defaultGetFactory6,
19233
19670
  skills,
19671
+ featureOptions,
19234
19672
  dryRun = false,
19235
19673
  logger
19236
19674
  }) {
@@ -19248,6 +19686,7 @@ var RulesProcessor = class extends FeatureProcessor {
19248
19686
  this.simulateSkills = simulateSkills;
19249
19687
  this.getFactory = getFactory;
19250
19688
  this.skills = skills;
19689
+ this.featureOptions = featureOptions;
19251
19690
  }
19252
19691
  async convertRulesyncFilesToToolFiles(rulesyncFiles) {
19253
19692
  const rulesyncRules = rulesyncFiles.filter(
@@ -19335,7 +19774,7 @@ var RulesProcessor = class extends FeatureProcessor {
19335
19774
  }).relativeDirPath;
19336
19775
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
19337
19776
  const frontmatter = skill.getFrontmatter();
19338
- const relativePath = join133(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
19777
+ const relativePath = join135(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
19339
19778
  return {
19340
19779
  name: frontmatter.name,
19341
19780
  description: frontmatter.description,
@@ -19405,7 +19844,11 @@ var RulesProcessor = class extends FeatureProcessor {
19405
19844
  * Generate reference section based on meta configuration.
19406
19845
  */
19407
19846
  generateReferenceSectionFromMeta(meta, toolRules) {
19408
- switch (meta.ruleDiscoveryMode) {
19847
+ const mode = resolveRuleDiscoveryMode({
19848
+ defaultMode: meta.ruleDiscoveryMode,
19849
+ options: this.featureOptions
19850
+ });
19851
+ switch (mode) {
19409
19852
  case "toon":
19410
19853
  return this.generateToonReferencesSection(toolRules);
19411
19854
  case "claudecode-legacy":
@@ -19460,8 +19903,8 @@ var RulesProcessor = class extends FeatureProcessor {
19460
19903
  * Load and parse rulesync rule files from .rulesync/rules/ directory
19461
19904
  */
19462
19905
  async loadRulesyncFiles() {
19463
- const rulesyncBaseDir = join133(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
19464
- const files = await findFilesByGlobs(join133(rulesyncBaseDir, "**", "*.md"));
19906
+ const rulesyncBaseDir = join135(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
19907
+ const files = await findFilesByGlobs(join135(rulesyncBaseDir, "**", "*.md"));
19465
19908
  this.logger.debug(`Found ${files.length} rulesync files`);
19466
19909
  const rulesyncRules = await Promise.all(
19467
19910
  files.map((file) => {
@@ -19576,13 +20019,13 @@ var RulesProcessor = class extends FeatureProcessor {
19576
20019
  return [];
19577
20020
  }
19578
20021
  const uniqueRootFilePaths = await findFilesWithFallback(
19579
- join133(
20022
+ join135(
19580
20023
  this.baseDir,
19581
20024
  settablePaths.root.relativeDirPath ?? ".",
19582
20025
  settablePaths.root.relativeFilePath
19583
20026
  ),
19584
20027
  settablePaths.alternativeRoots,
19585
- (alt) => join133(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
20028
+ (alt) => join135(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
19586
20029
  );
19587
20030
  if (forDeletion) {
19588
20031
  return buildDeletionRulesFromPaths(uniqueRootFilePaths);
@@ -19613,7 +20056,7 @@ var RulesProcessor = class extends FeatureProcessor {
19613
20056
  return [];
19614
20057
  }
19615
20058
  const uniqueLocalRootFilePaths2 = await findFilesByGlobs(
19616
- join133(this.baseDir, "AGENTS.local.md")
20059
+ join135(this.baseDir, "AGENTS.local.md")
19617
20060
  );
19618
20061
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths2);
19619
20062
  }
@@ -19624,9 +20067,9 @@ var RulesProcessor = class extends FeatureProcessor {
19624
20067
  return [];
19625
20068
  }
19626
20069
  const uniqueLocalRootFilePaths = await findFilesWithFallback(
19627
- join133(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
20070
+ join135(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
19628
20071
  settablePaths.alternativeRoots,
19629
- (alt) => join133(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
20072
+ (alt) => join135(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
19630
20073
  );
19631
20074
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths);
19632
20075
  })();
@@ -19637,20 +20080,20 @@ var RulesProcessor = class extends FeatureProcessor {
19637
20080
  if (!forDeletion || this.toolTarget !== "rovodev" || this.global) {
19638
20081
  return [];
19639
20082
  }
19640
- const primaryPaths = await findFilesByGlobs(join133(this.baseDir, ".rovodev", "AGENTS.md"));
20083
+ const primaryPaths = await findFilesByGlobs(join135(this.baseDir, ".rovodev", "AGENTS.md"));
19641
20084
  if (primaryPaths.length === 0) {
19642
20085
  return [];
19643
20086
  }
19644
- const mirrorPaths = await findFilesByGlobs(join133(this.baseDir, "AGENTS.md"));
20087
+ const mirrorPaths = await findFilesByGlobs(join135(this.baseDir, "AGENTS.md"));
19645
20088
  return buildDeletionRulesFromPaths(mirrorPaths);
19646
20089
  })();
19647
20090
  const nonRootToolRules = await (async () => {
19648
20091
  if (!settablePaths.nonRoot) {
19649
20092
  return [];
19650
20093
  }
19651
- const nonRootBaseDir = join133(this.baseDir, settablePaths.nonRoot.relativeDirPath);
20094
+ const nonRootBaseDir = join135(this.baseDir, settablePaths.nonRoot.relativeDirPath);
19652
20095
  const nonRootFilePaths = await findFilesByGlobs(
19653
- join133(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
20096
+ join135(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
19654
20097
  );
19655
20098
  if (forDeletion) {
19656
20099
  return buildDeletionRulesFromPaths(nonRootFilePaths, {
@@ -19664,7 +20107,7 @@ var RulesProcessor = class extends FeatureProcessor {
19664
20107
  const ok = RovodevRule.isAllowedModularRulesRelativePath(relativeFilePath);
19665
20108
  if (!ok) {
19666
20109
  this.logger.warn(
19667
- `Skipping reserved Rovodev path under modular-rules (import): ${join133(modularRootRelative, relativeFilePath)}`
20110
+ `Skipping reserved Rovodev path under modular-rules (import): ${join135(modularRootRelative, relativeFilePath)}`
19668
20111
  );
19669
20112
  }
19670
20113
  return ok;
@@ -19790,14 +20233,14 @@ s/<command> [arguments]
19790
20233
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
19791
20234
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
19792
20235
 
19793
- When users call a custom slash command, you have to look for the markdown file, \`${join133(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
20236
+ When users call a custom slash command, you have to look for the markdown file, \`${join135(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
19794
20237
  const subagentsSection = subagents ? `## Simulated Subagents
19795
20238
 
19796
20239
  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.
19797
20240
 
19798
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${join133(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
20241
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${join135(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
19799
20242
 
19800
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join133(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
20243
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join135(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
19801
20244
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
19802
20245
  const result = [
19803
20246
  overview,
@@ -19897,7 +20340,7 @@ function warnUnsupportedTargets(params) {
19897
20340
  }
19898
20341
  }
19899
20342
  async function checkRulesyncDirExists(params) {
19900
- return fileExists(join134(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
20343
+ return fileExists(join136(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
19901
20344
  }
19902
20345
  async function generate(params) {
19903
20346
  const { config, logger } = params;
@@ -19952,6 +20395,7 @@ async function generateRulesCore(params) {
19952
20395
  simulateSubagents: config.getSimulateSubagents(),
19953
20396
  simulateSkills: config.getSimulateSkills(),
19954
20397
  skills,
20398
+ featureOptions: config.getFeatureOptions(toolTarget, "rules"),
19955
20399
  dryRun: config.isPreviewMode(),
19956
20400
  logger
19957
20401
  });