rulesync 8.2.0 → 8.3.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.
@@ -817,7 +817,7 @@ function getBaseDirsInLightOfGlobal({
817
817
  }
818
818
 
819
819
  // src/lib/generate.ts
820
- import { join as join136 } from "path";
820
+ import { join as join137 } from "path";
821
821
  import { intersection } from "es-toolkit";
822
822
 
823
823
  // src/features/commands/commands-processor.ts
@@ -9133,7 +9133,7 @@ var McpProcessor = class extends FeatureProcessor {
9133
9133
  };
9134
9134
 
9135
9135
  // src/features/permissions/permissions-processor.ts
9136
- import { z as z31 } from "zod/mini";
9136
+ import { z as z32 } from "zod/mini";
9137
9137
 
9138
9138
  // src/features/permissions/claudecode-permissions.ts
9139
9139
  import { join as join62 } from "path";
@@ -9462,6 +9462,7 @@ function convertClaudeToRulesyncPermissions(params) {
9462
9462
  import { join as join63 } from "path";
9463
9463
  import * as smolToml4 from "smol-toml";
9464
9464
  var RULESYNC_PROFILE_NAME = "rulesync";
9465
+ var RULESYNC_BASH_RULES_FILE_NAME = "rulesync.rules";
9465
9466
  var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
9466
9467
  static getSettablePaths(_options = {}) {
9467
9468
  return {
@@ -9551,6 +9552,22 @@ var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
9551
9552
  });
9552
9553
  }
9553
9554
  };
9555
+ var CodexcliRulesFile = class extends ToolFile {
9556
+ validate() {
9557
+ return { success: true, error: null };
9558
+ }
9559
+ };
9560
+ function createCodexcliBashRulesFile({
9561
+ baseDir = process.cwd(),
9562
+ config
9563
+ }) {
9564
+ return new CodexcliRulesFile({
9565
+ baseDir,
9566
+ relativeDirPath: join63(".codex", "rules"),
9567
+ relativeFilePath: RULESYNC_BASH_RULES_FILE_NAME,
9568
+ fileContent: buildCodexBashRulesContent(config)
9569
+ });
9570
+ }
9554
9571
  function convertRulesyncToCodexProfile({
9555
9572
  config,
9556
9573
  logger
@@ -9659,6 +9676,46 @@ function mapReadAction(action) {
9659
9676
  function mapWriteAction(action) {
9660
9677
  return action === "allow" ? "write" : "none";
9661
9678
  }
9679
+ function buildCodexBashRulesContent(config) {
9680
+ const bashRules = config.permission.bash ?? {};
9681
+ const entries = Object.entries(bashRules);
9682
+ const header = [
9683
+ "# Generated by Rulesync from .rulesync/permissions.json (permission.bash)",
9684
+ "# https://developers.openai.com/codex/rules"
9685
+ ];
9686
+ if (entries.length === 0) {
9687
+ return [...header, "# No bash permission rules were configured."].join("\n");
9688
+ }
9689
+ const ruleBlocks = entries.map(([pattern, action]) => {
9690
+ const tokens = toCommandPatternTokens(pattern);
9691
+ if (tokens.length === 0) {
9692
+ return null;
9693
+ }
9694
+ const serializedTokens = tokens.map((token) => JSON.stringify(token)).join(", ");
9695
+ const decision = mapBashActionToDecision(action);
9696
+ return [
9697
+ "",
9698
+ `# ${pattern}`,
9699
+ "prefix_rule(",
9700
+ ` pattern = [${serializedTokens}],`,
9701
+ ` decision = ${JSON.stringify(decision)},`,
9702
+ ` justification = ${JSON.stringify(`Generated from Rulesync permission.bash: ${pattern}`)},`,
9703
+ ")"
9704
+ ].join("\n");
9705
+ }).filter((block) => block !== null);
9706
+ if (ruleBlocks.length === 0) {
9707
+ return [...header, "# No valid bash patterns were found."].join("\n");
9708
+ }
9709
+ return [...header, ...ruleBlocks].join("\n");
9710
+ }
9711
+ function toCommandPatternTokens(commandPattern) {
9712
+ return commandPattern.trim().split(/\s+/).map((token) => token.trim()).filter((token) => token.length > 0);
9713
+ }
9714
+ function mapBashActionToDecision(action) {
9715
+ if (action === "allow") return "allow";
9716
+ if (action === "ask") return "prompt";
9717
+ return "forbidden";
9718
+ }
9662
9719
 
9663
9720
  // src/features/permissions/geminicli-permissions.ts
9664
9721
  import { join as join64 } from "path";
@@ -9824,16 +9881,200 @@ function parseGeminicliToolEntry({ entry }) {
9824
9881
  };
9825
9882
  }
9826
9883
 
9827
- // src/features/permissions/opencode-permissions.ts
9884
+ // src/features/permissions/kiro-permissions.ts
9828
9885
  import { join as join65 } from "path";
9829
- import { parse as parseJsonc5 } from "jsonc-parser";
9830
9886
  import { z as z30 } from "zod/mini";
9831
- var OpencodePermissionSchema = z30.union([
9832
- z30.enum(["allow", "ask", "deny"]),
9833
- z30.record(z30.string(), z30.enum(["allow", "ask", "deny"]))
9887
+ var KiroAgentSchema = z30.looseObject({
9888
+ allowedTools: z30.optional(z30.array(z30.string())),
9889
+ toolsSettings: z30.optional(z30.record(z30.string(), z30.unknown()))
9890
+ });
9891
+ var UnknownRecordSchema = z30.record(z30.string(), z30.unknown());
9892
+ var KiroPermissions = class _KiroPermissions extends ToolPermissions {
9893
+ static getSettablePaths(_options = {}) {
9894
+ return {
9895
+ relativeDirPath: join65(".kiro", "agents"),
9896
+ relativeFilePath: "default.json"
9897
+ };
9898
+ }
9899
+ isDeletable() {
9900
+ return false;
9901
+ }
9902
+ static async fromFile({
9903
+ baseDir = process.cwd(),
9904
+ validate = true
9905
+ }) {
9906
+ const paths = this.getSettablePaths();
9907
+ const filePath = join65(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9908
+ const fileContent = await readFileContentOrNull(filePath) ?? JSON.stringify({}, null, 2);
9909
+ return new _KiroPermissions({
9910
+ baseDir,
9911
+ relativeDirPath: paths.relativeDirPath,
9912
+ relativeFilePath: paths.relativeFilePath,
9913
+ fileContent,
9914
+ validate
9915
+ });
9916
+ }
9917
+ static async fromRulesyncPermissions({
9918
+ baseDir = process.cwd(),
9919
+ rulesyncPermissions,
9920
+ validate = true,
9921
+ logger
9922
+ }) {
9923
+ const paths = this.getSettablePaths();
9924
+ const filePath = join65(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9925
+ const existingContent = await readFileContentOrNull(filePath) ?? JSON.stringify({}, null, 2);
9926
+ const parsedResult = KiroAgentSchema.safeParse(JSON.parse(existingContent));
9927
+ if (!parsedResult.success) {
9928
+ throw new Error(
9929
+ `Failed to parse existing Kiro agent config at ${filePath}: ${formatError(parsedResult.error)}`
9930
+ );
9931
+ }
9932
+ const config = rulesyncPermissions.getJson();
9933
+ const next = buildKiroPermissionsFromRulesync({ config, logger, existing: parsedResult.data });
9934
+ return new _KiroPermissions({
9935
+ baseDir,
9936
+ relativeDirPath: paths.relativeDirPath,
9937
+ relativeFilePath: paths.relativeFilePath,
9938
+ fileContent: JSON.stringify(next, null, 2),
9939
+ validate
9940
+ });
9941
+ }
9942
+ toRulesyncPermissions() {
9943
+ let parsed;
9944
+ try {
9945
+ parsed = KiroAgentSchema.parse(JSON.parse(this.getFileContent()));
9946
+ } catch (error) {
9947
+ throw new Error(
9948
+ `Failed to parse Kiro permissions content in ${join65(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
9949
+ { cause: error }
9950
+ );
9951
+ }
9952
+ const permission = {};
9953
+ const toolsSettings = parsed.toolsSettings ?? {};
9954
+ const shellSettings = asRecord(toolsSettings.shell);
9955
+ const shellAllow = asStringArray(shellSettings.allowedCommands);
9956
+ const shellDeny = asStringArray(shellSettings.deniedCommands);
9957
+ if (shellAllow.length > 0 || shellDeny.length > 0) {
9958
+ permission.bash = {};
9959
+ for (const pattern of shellAllow) permission.bash[pattern] = "allow";
9960
+ for (const pattern of shellDeny) permission.bash[pattern] = "deny";
9961
+ }
9962
+ const readSettings = asRecord(toolsSettings.read);
9963
+ const readAllow = asStringArray(readSettings.allowedPaths);
9964
+ const readDeny = asStringArray(readSettings.deniedPaths);
9965
+ if (readAllow.length > 0 || readDeny.length > 0) {
9966
+ permission.read = {};
9967
+ for (const pattern of readAllow) permission.read[pattern] = "allow";
9968
+ for (const pattern of readDeny) permission.read[pattern] = "deny";
9969
+ }
9970
+ const writeSettings = asRecord(toolsSettings.write);
9971
+ const writeAllow = asStringArray(writeSettings.allowedPaths);
9972
+ const writeDeny = asStringArray(writeSettings.deniedPaths);
9973
+ if (writeAllow.length > 0 || writeDeny.length > 0) {
9974
+ permission.write = {};
9975
+ for (const pattern of writeAllow) permission.write[pattern] = "allow";
9976
+ for (const pattern of writeDeny) permission.write[pattern] = "deny";
9977
+ }
9978
+ const allowedTools = new Set(parsed.allowedTools ?? []);
9979
+ if (allowedTools.has("web_fetch")) {
9980
+ permission.webfetch = { "*": "allow" };
9981
+ }
9982
+ if (allowedTools.has("web_search")) {
9983
+ permission.websearch = { "*": "allow" };
9984
+ }
9985
+ return this.toRulesyncPermissionsDefault({
9986
+ fileContent: JSON.stringify({ permission }, null, 2)
9987
+ });
9988
+ }
9989
+ validate() {
9990
+ return { success: true, error: null };
9991
+ }
9992
+ static forDeletion({
9993
+ baseDir = process.cwd(),
9994
+ relativeDirPath,
9995
+ relativeFilePath
9996
+ }) {
9997
+ return new _KiroPermissions({
9998
+ baseDir,
9999
+ relativeDirPath,
10000
+ relativeFilePath,
10001
+ fileContent: JSON.stringify({}, null, 2),
10002
+ validate: false
10003
+ });
10004
+ }
10005
+ };
10006
+ function buildKiroPermissionsFromRulesync({
10007
+ config,
10008
+ logger,
10009
+ existing
10010
+ }) {
10011
+ const nextAllowedTools = new Set(existing.allowedTools ?? []);
10012
+ const nextToolsSettings = { ...asRecord(existing.toolsSettings) };
10013
+ const shell = {
10014
+ allowedCommands: [],
10015
+ deniedCommands: []
10016
+ };
10017
+ const read = {
10018
+ allowedPaths: [],
10019
+ deniedPaths: []
10020
+ };
10021
+ const write = {
10022
+ allowedPaths: [],
10023
+ deniedPaths: []
10024
+ };
10025
+ for (const [category, rules] of Object.entries(config.permission)) {
10026
+ for (const [pattern, action] of Object.entries(rules)) {
10027
+ if (action === "ask") {
10028
+ logger?.warn(`Kiro permissions do not support "ask". Skipping ${category}:${pattern}`);
10029
+ continue;
10030
+ }
10031
+ if (category === "bash") {
10032
+ (action === "allow" ? shell.allowedCommands : shell.deniedCommands).push(pattern);
10033
+ } else if (category === "read") {
10034
+ (action === "allow" ? read.allowedPaths : read.deniedPaths).push(pattern);
10035
+ } else if (category === "edit" || category === "write") {
10036
+ (action === "allow" ? write.allowedPaths : write.deniedPaths).push(pattern);
10037
+ } else if (category === "webfetch" || category === "websearch") {
10038
+ if (pattern !== "*") {
10039
+ logger?.warn(
10040
+ `Kiro ${category} supports only wildcard (*) via allowedTools. Skipping rule: ${pattern}`
10041
+ );
10042
+ continue;
10043
+ }
10044
+ if (action === "allow")
10045
+ nextAllowedTools.add(category === "webfetch" ? "web_fetch" : "web_search");
10046
+ } else {
10047
+ logger?.warn(`Kiro permissions do not support category: ${category}. Skipping.`);
10048
+ }
10049
+ }
10050
+ }
10051
+ nextToolsSettings.shell = shell;
10052
+ nextToolsSettings.read = read;
10053
+ nextToolsSettings.write = write;
10054
+ return {
10055
+ ...existing,
10056
+ allowedTools: [...nextAllowedTools].toSorted(),
10057
+ toolsSettings: nextToolsSettings
10058
+ };
10059
+ }
10060
+ function asRecord(value) {
10061
+ const result = UnknownRecordSchema.safeParse(value);
10062
+ return result.success ? result.data : {};
10063
+ }
10064
+ function asStringArray(value) {
10065
+ return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
10066
+ }
10067
+
10068
+ // src/features/permissions/opencode-permissions.ts
10069
+ import { join as join66 } from "path";
10070
+ import { parse as parseJsonc5 } from "jsonc-parser";
10071
+ import { z as z31 } from "zod/mini";
10072
+ var OpencodePermissionSchema = z31.union([
10073
+ z31.enum(["allow", "ask", "deny"]),
10074
+ z31.record(z31.string(), z31.enum(["allow", "ask", "deny"]))
9834
10075
  ]);
9835
- var OpencodePermissionsConfigSchema = z30.looseObject({
9836
- permission: z30.optional(z30.record(z30.string(), OpencodePermissionSchema))
10076
+ var OpencodePermissionsConfigSchema = z31.looseObject({
10077
+ permission: z31.optional(z31.record(z31.string(), OpencodePermissionSchema))
9837
10078
  });
9838
10079
  var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
9839
10080
  json;
@@ -9850,7 +10091,7 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
9850
10091
  static getSettablePaths({
9851
10092
  global = false
9852
10093
  } = {}) {
9853
- return global ? { relativeDirPath: join65(".config", "opencode"), relativeFilePath: "opencode.json" } : { relativeDirPath: ".", relativeFilePath: "opencode.json" };
10094
+ return global ? { relativeDirPath: join66(".config", "opencode"), relativeFilePath: "opencode.json" } : { relativeDirPath: ".", relativeFilePath: "opencode.json" };
9854
10095
  }
9855
10096
  static async fromFile({
9856
10097
  baseDir = process.cwd(),
@@ -9858,9 +10099,9 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
9858
10099
  global = false
9859
10100
  }) {
9860
10101
  const basePaths = _OpencodePermissions.getSettablePaths({ global });
9861
- const jsonDir = join65(baseDir, basePaths.relativeDirPath);
9862
- const jsoncPath = join65(jsonDir, "opencode.jsonc");
9863
- const jsonPath = join65(jsonDir, "opencode.json");
10102
+ const jsonDir = join66(baseDir, basePaths.relativeDirPath);
10103
+ const jsoncPath = join66(jsonDir, "opencode.jsonc");
10104
+ const jsonPath = join66(jsonDir, "opencode.json");
9864
10105
  let fileContent = await readFileContentOrNull(jsoncPath);
9865
10106
  let relativeFilePath = "opencode.jsonc";
9866
10107
  if (!fileContent) {
@@ -9885,9 +10126,9 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
9885
10126
  global = false
9886
10127
  }) {
9887
10128
  const basePaths = _OpencodePermissions.getSettablePaths({ global });
9888
- const jsonDir = join65(baseDir, basePaths.relativeDirPath);
9889
- const jsoncPath = join65(jsonDir, "opencode.jsonc");
9890
- const jsonPath = join65(jsonDir, "opencode.json");
10129
+ const jsonDir = join66(baseDir, basePaths.relativeDirPath);
10130
+ const jsoncPath = join66(jsonDir, "opencode.jsonc");
10131
+ const jsonPath = join66(jsonDir, "opencode.json");
9891
10132
  let fileContent = await readFileContentOrNull(jsoncPath);
9892
10133
  let relativeFilePath = "opencode.jsonc";
9893
10134
  if (!fileContent) {
@@ -9961,9 +10202,10 @@ var permissionsProcessorToolTargetTuple = [
9961
10202
  "claudecode",
9962
10203
  "codexcli",
9963
10204
  "geminicli",
10205
+ "kiro",
9964
10206
  "opencode"
9965
10207
  ];
9966
- var PermissionsProcessorToolTargetSchema = z31.enum(permissionsProcessorToolTargetTuple);
10208
+ var PermissionsProcessorToolTargetSchema = z32.enum(permissionsProcessorToolTargetTuple);
9967
10209
  var toolPermissionsFactories = /* @__PURE__ */ new Map([
9968
10210
  [
9969
10211
  "claudecode",
@@ -9971,7 +10213,7 @@ var toolPermissionsFactories = /* @__PURE__ */ new Map([
9971
10213
  class: ClaudecodePermissions,
9972
10214
  meta: {
9973
10215
  supportsProject: true,
9974
- supportsGlobal: false,
10216
+ supportsGlobal: true,
9975
10217
  supportsImport: true
9976
10218
  }
9977
10219
  }
@@ -9998,6 +10240,17 @@ var toolPermissionsFactories = /* @__PURE__ */ new Map([
9998
10240
  }
9999
10241
  }
10000
10242
  ],
10243
+ [
10244
+ "kiro",
10245
+ {
10246
+ class: KiroPermissions,
10247
+ meta: {
10248
+ supportsProject: true,
10249
+ supportsGlobal: false,
10250
+ supportsImport: true
10251
+ }
10252
+ }
10253
+ ],
10001
10254
  [
10002
10255
  "opencode",
10003
10256
  {
@@ -10093,7 +10346,14 @@ var PermissionsProcessor = class extends FeatureProcessor {
10093
10346
  logger: this.logger,
10094
10347
  global: this.global
10095
10348
  });
10096
- return [toolPermissions];
10349
+ if (this.toolTarget !== "codexcli") {
10350
+ return [toolPermissions];
10351
+ }
10352
+ const bashRulesFile = createCodexcliBashRulesFile({
10353
+ baseDir: this.baseDir,
10354
+ config: rulesyncPermissions.getJson()
10355
+ });
10356
+ return [toolPermissions, bashRulesFile];
10097
10357
  }
10098
10358
  async convertToolFilesToRulesyncFiles(toolFiles) {
10099
10359
  const permissions = toolFiles.filter((f) => f instanceof ToolPermissions);
@@ -10108,25 +10368,25 @@ var PermissionsProcessor = class extends FeatureProcessor {
10108
10368
  };
10109
10369
 
10110
10370
  // src/features/rules/rules-processor.ts
10111
- import { basename as basename10, dirname as dirname3, join as join135, relative as relative5 } from "path";
10371
+ import { basename as basename10, dirname as dirname3, join as join136, relative as relative5 } from "path";
10112
10372
  import { encode } from "@toon-format/toon";
10113
- import { z as z70 } from "zod/mini";
10373
+ import { z as z71 } from "zod/mini";
10114
10374
 
10115
10375
  // src/constants/general.ts
10116
10376
  var SKILL_FILE_NAME = "SKILL.md";
10117
10377
 
10118
10378
  // src/features/skills/agentsmd-skill.ts
10119
- import { join as join69 } from "path";
10379
+ import { join as join70 } from "path";
10120
10380
 
10121
10381
  // src/features/skills/simulated-skill.ts
10122
- import { join as join68 } from "path";
10123
- import { z as z32 } from "zod/mini";
10382
+ import { join as join69 } from "path";
10383
+ import { z as z33 } from "zod/mini";
10124
10384
 
10125
10385
  // src/features/skills/tool-skill.ts
10126
- import { join as join67 } from "path";
10386
+ import { join as join68 } from "path";
10127
10387
 
10128
10388
  // src/types/ai-dir.ts
10129
- import path2, { basename as basename3, join as join66, relative as relative4, resolve as resolve4 } from "path";
10389
+ import path2, { basename as basename3, join as join67, relative as relative4, resolve as resolve4 } from "path";
10130
10390
  var AiDir = class {
10131
10391
  /**
10132
10392
  * @example "."
@@ -10223,8 +10483,8 @@ var AiDir = class {
10223
10483
  * @returns Array of files with their relative paths and buffers
10224
10484
  */
10225
10485
  static async collectOtherFiles(baseDir, relativeDirPath, dirName, excludeFileName) {
10226
- const dirPath = join66(baseDir, relativeDirPath, dirName);
10227
- const glob = join66(dirPath, "**", "*");
10486
+ const dirPath = join67(baseDir, relativeDirPath, dirName);
10487
+ const glob = join67(dirPath, "**", "*");
10228
10488
  const filePaths = await findFilesByGlobs(glob, { type: "file" });
10229
10489
  const filteredPaths = filePaths.filter((filePath) => basename3(filePath) !== excludeFileName);
10230
10490
  const files = await Promise.all(
@@ -10325,8 +10585,8 @@ var ToolSkill = class extends AiDir {
10325
10585
  }) {
10326
10586
  const settablePaths = getSettablePaths({ global });
10327
10587
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
10328
- const skillDirPath = join67(baseDir, actualRelativeDirPath, dirName);
10329
- const skillFilePath = join67(skillDirPath, SKILL_FILE_NAME);
10588
+ const skillDirPath = join68(baseDir, actualRelativeDirPath, dirName);
10589
+ const skillFilePath = join68(skillDirPath, SKILL_FILE_NAME);
10330
10590
  if (!await fileExists(skillFilePath)) {
10331
10591
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
10332
10592
  }
@@ -10350,16 +10610,16 @@ var ToolSkill = class extends AiDir {
10350
10610
  }
10351
10611
  requireMainFileFrontmatter() {
10352
10612
  if (!this.mainFile?.frontmatter) {
10353
- throw new Error(`Frontmatter is not defined in ${join67(this.relativeDirPath, this.dirName)}`);
10613
+ throw new Error(`Frontmatter is not defined in ${join68(this.relativeDirPath, this.dirName)}`);
10354
10614
  }
10355
10615
  return this.mainFile.frontmatter;
10356
10616
  }
10357
10617
  };
10358
10618
 
10359
10619
  // src/features/skills/simulated-skill.ts
10360
- var SimulatedSkillFrontmatterSchema = z32.looseObject({
10361
- name: z32.string(),
10362
- description: z32.string()
10620
+ var SimulatedSkillFrontmatterSchema = z33.looseObject({
10621
+ name: z33.string(),
10622
+ description: z33.string()
10363
10623
  });
10364
10624
  var SimulatedSkill = class extends ToolSkill {
10365
10625
  frontmatter;
@@ -10390,7 +10650,7 @@ var SimulatedSkill = class extends ToolSkill {
10390
10650
  const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
10391
10651
  if (!result.success) {
10392
10652
  throw new Error(
10393
- `Invalid frontmatter in ${join68(relativeDirPath, dirName)}: ${formatError(result.error)}`
10653
+ `Invalid frontmatter in ${join69(relativeDirPath, dirName)}: ${formatError(result.error)}`
10394
10654
  );
10395
10655
  }
10396
10656
  }
@@ -10449,8 +10709,8 @@ var SimulatedSkill = class extends ToolSkill {
10449
10709
  }) {
10450
10710
  const settablePaths = this.getSettablePaths();
10451
10711
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
10452
- const skillDirPath = join68(baseDir, actualRelativeDirPath, dirName);
10453
- const skillFilePath = join68(skillDirPath, SKILL_FILE_NAME);
10712
+ const skillDirPath = join69(baseDir, actualRelativeDirPath, dirName);
10713
+ const skillFilePath = join69(skillDirPath, SKILL_FILE_NAME);
10454
10714
  if (!await fileExists(skillFilePath)) {
10455
10715
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
10456
10716
  }
@@ -10527,7 +10787,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
10527
10787
  throw new Error("AgentsmdSkill does not support global mode.");
10528
10788
  }
10529
10789
  return {
10530
- relativeDirPath: join69(".agents", "skills")
10790
+ relativeDirPath: join70(".agents", "skills")
10531
10791
  };
10532
10792
  }
10533
10793
  static async fromDir(params) {
@@ -10554,11 +10814,11 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
10554
10814
  };
10555
10815
 
10556
10816
  // src/features/skills/factorydroid-skill.ts
10557
- import { join as join70 } from "path";
10817
+ import { join as join71 } from "path";
10558
10818
  var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
10559
10819
  static getSettablePaths(_options) {
10560
10820
  return {
10561
- relativeDirPath: join70(".factory", "skills")
10821
+ relativeDirPath: join71(".factory", "skills")
10562
10822
  };
10563
10823
  }
10564
10824
  static async fromDir(params) {
@@ -10585,50 +10845,50 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
10585
10845
  };
10586
10846
 
10587
10847
  // src/features/skills/rovodev-skill.ts
10588
- import { join as join72 } from "path";
10589
- import { z as z34 } from "zod/mini";
10848
+ import { join as join73 } from "path";
10849
+ import { z as z35 } from "zod/mini";
10590
10850
 
10591
10851
  // src/features/skills/rulesync-skill.ts
10592
- import { join as join71 } from "path";
10593
- import { z as z33 } from "zod/mini";
10594
- var RulesyncSkillFrontmatterSchemaInternal = z33.looseObject({
10595
- name: z33.string(),
10596
- description: z33.string(),
10597
- targets: z33._default(RulesyncTargetsSchema, ["*"]),
10598
- claudecode: z33.optional(
10599
- z33.looseObject({
10600
- "allowed-tools": z33.optional(z33.array(z33.string())),
10601
- model: z33.optional(z33.string()),
10602
- "disable-model-invocation": z33.optional(z33.boolean())
10852
+ import { join as join72 } from "path";
10853
+ import { z as z34 } from "zod/mini";
10854
+ var RulesyncSkillFrontmatterSchemaInternal = z34.looseObject({
10855
+ name: z34.string(),
10856
+ description: z34.string(),
10857
+ targets: z34._default(RulesyncTargetsSchema, ["*"]),
10858
+ claudecode: z34.optional(
10859
+ z34.looseObject({
10860
+ "allowed-tools": z34.optional(z34.array(z34.string())),
10861
+ model: z34.optional(z34.string()),
10862
+ "disable-model-invocation": z34.optional(z34.boolean())
10603
10863
  })
10604
10864
  ),
10605
- codexcli: z33.optional(
10606
- z33.looseObject({
10607
- "short-description": z33.optional(z33.string())
10865
+ codexcli: z34.optional(
10866
+ z34.looseObject({
10867
+ "short-description": z34.optional(z34.string())
10608
10868
  })
10609
10869
  ),
10610
- opencode: z33.optional(
10611
- z33.looseObject({
10612
- "allowed-tools": z33.optional(z33.array(z33.string()))
10870
+ opencode: z34.optional(
10871
+ z34.looseObject({
10872
+ "allowed-tools": z34.optional(z34.array(z34.string()))
10613
10873
  })
10614
10874
  ),
10615
- kilo: z33.optional(
10616
- z33.looseObject({
10617
- "allowed-tools": z33.optional(z33.array(z33.string()))
10875
+ kilo: z34.optional(
10876
+ z34.looseObject({
10877
+ "allowed-tools": z34.optional(z34.array(z34.string()))
10618
10878
  })
10619
10879
  ),
10620
- deepagents: z33.optional(
10621
- z33.looseObject({
10622
- "allowed-tools": z33.optional(z33.array(z33.string()))
10880
+ deepagents: z34.optional(
10881
+ z34.looseObject({
10882
+ "allowed-tools": z34.optional(z34.array(z34.string()))
10623
10883
  })
10624
10884
  ),
10625
- copilot: z33.optional(
10626
- z33.looseObject({
10627
- license: z33.optional(z33.string())
10885
+ copilot: z34.optional(
10886
+ z34.looseObject({
10887
+ license: z34.optional(z34.string())
10628
10888
  })
10629
10889
  ),
10630
- cline: z33.optional(z33.looseObject({})),
10631
- roo: z33.optional(z33.looseObject({}))
10890
+ cline: z34.optional(z34.looseObject({})),
10891
+ roo: z34.optional(z34.looseObject({}))
10632
10892
  });
10633
10893
  var RulesyncSkillFrontmatterSchema = RulesyncSkillFrontmatterSchemaInternal;
10634
10894
  var RulesyncSkill = class _RulesyncSkill extends AiDir {
@@ -10668,7 +10928,7 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
10668
10928
  }
10669
10929
  getFrontmatter() {
10670
10930
  if (!this.mainFile?.frontmatter) {
10671
- throw new Error(`Frontmatter is not defined in ${join71(this.relativeDirPath, this.dirName)}`);
10931
+ throw new Error(`Frontmatter is not defined in ${join72(this.relativeDirPath, this.dirName)}`);
10672
10932
  }
10673
10933
  const result = RulesyncSkillFrontmatterSchema.parse(this.mainFile.frontmatter);
10674
10934
  return result;
@@ -10694,8 +10954,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
10694
10954
  dirName,
10695
10955
  global = false
10696
10956
  }) {
10697
- const skillDirPath = join71(baseDir, relativeDirPath, dirName);
10698
- const skillFilePath = join71(skillDirPath, SKILL_FILE_NAME);
10957
+ const skillDirPath = join72(baseDir, relativeDirPath, dirName);
10958
+ const skillFilePath = join72(skillDirPath, SKILL_FILE_NAME);
10699
10959
  if (!await fileExists(skillFilePath)) {
10700
10960
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
10701
10961
  }
@@ -10725,14 +10985,14 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
10725
10985
  };
10726
10986
 
10727
10987
  // src/features/skills/rovodev-skill.ts
10728
- var RovodevSkillFrontmatterSchema = z34.looseObject({
10729
- name: z34.string(),
10730
- description: z34.string()
10988
+ var RovodevSkillFrontmatterSchema = z35.looseObject({
10989
+ name: z35.string(),
10990
+ description: z35.string()
10731
10991
  });
10732
10992
  var RovodevSkill = class _RovodevSkill extends ToolSkill {
10733
10993
  constructor({
10734
10994
  baseDir = process.cwd(),
10735
- relativeDirPath = join72(".rovodev", "skills"),
10995
+ relativeDirPath = join73(".rovodev", "skills"),
10736
10996
  dirName,
10737
10997
  frontmatter,
10738
10998
  body,
@@ -10761,8 +11021,8 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
10761
11021
  }
10762
11022
  static getSettablePaths(_options) {
10763
11023
  return {
10764
- relativeDirPath: join72(".rovodev", "skills"),
10765
- alternativeSkillRoots: [join72(".agents", "skills")]
11024
+ relativeDirPath: join73(".rovodev", "skills"),
11025
+ alternativeSkillRoots: [join73(".agents", "skills")]
10766
11026
  };
10767
11027
  }
10768
11028
  getFrontmatter() {
@@ -10850,13 +11110,13 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
10850
11110
  });
10851
11111
  const result = RovodevSkillFrontmatterSchema.safeParse(loaded.frontmatter);
10852
11112
  if (!result.success) {
10853
- const skillDirPath = join72(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11113
+ const skillDirPath = join73(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
10854
11114
  throw new Error(
10855
- `Invalid frontmatter in ${join72(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11115
+ `Invalid frontmatter in ${join73(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
10856
11116
  );
10857
11117
  }
10858
11118
  if (result.data.name !== loaded.dirName) {
10859
- const skillFilePath = join72(
11119
+ const skillFilePath = join73(
10860
11120
  loaded.baseDir,
10861
11121
  loaded.relativeDirPath,
10862
11122
  loaded.dirName,
@@ -10898,11 +11158,11 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
10898
11158
  };
10899
11159
 
10900
11160
  // src/features/skills/skills-processor.ts
10901
- import { basename as basename5, join as join90 } from "path";
10902
- import { z as z50 } from "zod/mini";
11161
+ import { basename as basename5, join as join91 } from "path";
11162
+ import { z as z51 } from "zod/mini";
10903
11163
 
10904
11164
  // src/types/dir-feature-processor.ts
10905
- import { join as join73 } from "path";
11165
+ import { join as join74 } from "path";
10906
11166
  var DirFeatureProcessor = class {
10907
11167
  baseDir;
10908
11168
  dryRun;
@@ -10942,7 +11202,7 @@ var DirFeatureProcessor = class {
10942
11202
  const mainFile = aiDir.getMainFile();
10943
11203
  let mainFileContent;
10944
11204
  if (mainFile) {
10945
- const mainFilePath = join73(dirPath, mainFile.name);
11205
+ const mainFilePath = join74(dirPath, mainFile.name);
10946
11206
  const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter, {
10947
11207
  avoidBlockScalars: this.avoidBlockScalars
10948
11208
  });
@@ -10962,7 +11222,7 @@ var DirFeatureProcessor = class {
10962
11222
  const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
10963
11223
  otherFileContents.push(contentWithNewline);
10964
11224
  if (!dirHasChanges) {
10965
- const filePath = join73(dirPath, file.relativeFilePathToDirPath);
11225
+ const filePath = join74(dirPath, file.relativeFilePathToDirPath);
10966
11226
  const existingContent = await readFileContentOrNull(filePath);
10967
11227
  if (!fileContentsEquivalent({
10968
11228
  filePath,
@@ -10980,24 +11240,24 @@ var DirFeatureProcessor = class {
10980
11240
  if (this.dryRun) {
10981
11241
  this.logger.info(`[DRY RUN] Would create directory: ${dirPath}`);
10982
11242
  if (mainFile) {
10983
- this.logger.info(`[DRY RUN] Would write: ${join73(dirPath, mainFile.name)}`);
10984
- changedPaths.push(join73(relativeDir, mainFile.name));
11243
+ this.logger.info(`[DRY RUN] Would write: ${join74(dirPath, mainFile.name)}`);
11244
+ changedPaths.push(join74(relativeDir, mainFile.name));
10985
11245
  }
10986
11246
  for (const file of otherFiles) {
10987
11247
  this.logger.info(
10988
- `[DRY RUN] Would write: ${join73(dirPath, file.relativeFilePathToDirPath)}`
11248
+ `[DRY RUN] Would write: ${join74(dirPath, file.relativeFilePathToDirPath)}`
10989
11249
  );
10990
- changedPaths.push(join73(relativeDir, file.relativeFilePathToDirPath));
11250
+ changedPaths.push(join74(relativeDir, file.relativeFilePathToDirPath));
10991
11251
  }
10992
11252
  } else {
10993
11253
  await ensureDir(dirPath);
10994
11254
  if (mainFile && mainFileContent) {
10995
- const mainFilePath = join73(dirPath, mainFile.name);
11255
+ const mainFilePath = join74(dirPath, mainFile.name);
10996
11256
  await writeFileContent(mainFilePath, mainFileContent);
10997
- changedPaths.push(join73(relativeDir, mainFile.name));
11257
+ changedPaths.push(join74(relativeDir, mainFile.name));
10998
11258
  }
10999
11259
  for (const [i, file] of otherFiles.entries()) {
11000
- const filePath = join73(dirPath, file.relativeFilePathToDirPath);
11260
+ const filePath = join74(dirPath, file.relativeFilePathToDirPath);
11001
11261
  const content = otherFileContents[i];
11002
11262
  if (content === void 0) {
11003
11263
  throw new Error(
@@ -11005,7 +11265,7 @@ var DirFeatureProcessor = class {
11005
11265
  );
11006
11266
  }
11007
11267
  await writeFileContent(filePath, content);
11008
- changedPaths.push(join73(relativeDir, file.relativeFilePathToDirPath));
11268
+ changedPaths.push(join74(relativeDir, file.relativeFilePathToDirPath));
11009
11269
  }
11010
11270
  }
11011
11271
  changedCount++;
@@ -11037,16 +11297,16 @@ var DirFeatureProcessor = class {
11037
11297
  };
11038
11298
 
11039
11299
  // src/features/skills/agentsskills-skill.ts
11040
- import { join as join74 } from "path";
11041
- import { z as z35 } from "zod/mini";
11042
- var AgentsSkillsSkillFrontmatterSchema = z35.looseObject({
11043
- name: z35.string(),
11044
- description: z35.string()
11300
+ import { join as join75 } from "path";
11301
+ import { z as z36 } from "zod/mini";
11302
+ var AgentsSkillsSkillFrontmatterSchema = z36.looseObject({
11303
+ name: z36.string(),
11304
+ description: z36.string()
11045
11305
  });
11046
11306
  var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
11047
11307
  constructor({
11048
11308
  baseDir = process.cwd(),
11049
- relativeDirPath = join74(".agents", "skills"),
11309
+ relativeDirPath = join75(".agents", "skills"),
11050
11310
  dirName,
11051
11311
  frontmatter,
11052
11312
  body,
@@ -11078,7 +11338,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
11078
11338
  throw new Error("AgentsSkillsSkill does not support global mode.");
11079
11339
  }
11080
11340
  return {
11081
- relativeDirPath: join74(".agents", "skills")
11341
+ relativeDirPath: join75(".agents", "skills")
11082
11342
  };
11083
11343
  }
11084
11344
  getFrontmatter() {
@@ -11158,9 +11418,9 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
11158
11418
  });
11159
11419
  const result = AgentsSkillsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11160
11420
  if (!result.success) {
11161
- const skillDirPath = join74(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11421
+ const skillDirPath = join75(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11162
11422
  throw new Error(
11163
- `Invalid frontmatter in ${join74(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11423
+ `Invalid frontmatter in ${join75(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11164
11424
  );
11165
11425
  }
11166
11426
  return new _AgentsSkillsSkill({
@@ -11195,16 +11455,16 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
11195
11455
  };
11196
11456
 
11197
11457
  // src/features/skills/antigravity-skill.ts
11198
- import { join as join75 } from "path";
11199
- import { z as z36 } from "zod/mini";
11200
- var AntigravitySkillFrontmatterSchema = z36.looseObject({
11201
- name: z36.string(),
11202
- description: z36.string()
11458
+ import { join as join76 } from "path";
11459
+ import { z as z37 } from "zod/mini";
11460
+ var AntigravitySkillFrontmatterSchema = z37.looseObject({
11461
+ name: z37.string(),
11462
+ description: z37.string()
11203
11463
  });
11204
11464
  var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
11205
11465
  constructor({
11206
11466
  baseDir = process.cwd(),
11207
- relativeDirPath = join75(".agent", "skills"),
11467
+ relativeDirPath = join76(".agent", "skills"),
11208
11468
  dirName,
11209
11469
  frontmatter,
11210
11470
  body,
@@ -11236,11 +11496,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
11236
11496
  } = {}) {
11237
11497
  if (global) {
11238
11498
  return {
11239
- relativeDirPath: join75(".gemini", "antigravity", "skills")
11499
+ relativeDirPath: join76(".gemini", "antigravity", "skills")
11240
11500
  };
11241
11501
  }
11242
11502
  return {
11243
- relativeDirPath: join75(".agent", "skills")
11503
+ relativeDirPath: join76(".agent", "skills")
11244
11504
  };
11245
11505
  }
11246
11506
  getFrontmatter() {
@@ -11320,9 +11580,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
11320
11580
  });
11321
11581
  const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
11322
11582
  if (!result.success) {
11323
- const skillDirPath = join75(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11583
+ const skillDirPath = join76(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11324
11584
  throw new Error(
11325
- `Invalid frontmatter in ${join75(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11585
+ `Invalid frontmatter in ${join76(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11326
11586
  );
11327
11587
  }
11328
11588
  return new _AntigravitySkill({
@@ -11356,19 +11616,19 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
11356
11616
  };
11357
11617
 
11358
11618
  // src/features/skills/claudecode-skill.ts
11359
- import { join as join76 } from "path";
11360
- import { z as z37 } from "zod/mini";
11361
- var ClaudecodeSkillFrontmatterSchema = z37.looseObject({
11362
- name: z37.string(),
11363
- description: z37.string(),
11364
- "allowed-tools": z37.optional(z37.array(z37.string())),
11365
- model: z37.optional(z37.string()),
11366
- "disable-model-invocation": z37.optional(z37.boolean())
11619
+ import { join as join77 } from "path";
11620
+ import { z as z38 } from "zod/mini";
11621
+ var ClaudecodeSkillFrontmatterSchema = z38.looseObject({
11622
+ name: z38.string(),
11623
+ description: z38.string(),
11624
+ "allowed-tools": z38.optional(z38.array(z38.string())),
11625
+ model: z38.optional(z38.string()),
11626
+ "disable-model-invocation": z38.optional(z38.boolean())
11367
11627
  });
11368
11628
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
11369
11629
  constructor({
11370
11630
  baseDir = process.cwd(),
11371
- relativeDirPath = join76(".claude", "skills"),
11631
+ relativeDirPath = join77(".claude", "skills"),
11372
11632
  dirName,
11373
11633
  frontmatter,
11374
11634
  body,
@@ -11399,7 +11659,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
11399
11659
  global: _global = false
11400
11660
  } = {}) {
11401
11661
  return {
11402
- relativeDirPath: join76(".claude", "skills")
11662
+ relativeDirPath: join77(".claude", "skills")
11403
11663
  };
11404
11664
  }
11405
11665
  getFrontmatter() {
@@ -11496,9 +11756,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
11496
11756
  });
11497
11757
  const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11498
11758
  if (!result.success) {
11499
- const skillDirPath = join76(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11759
+ const skillDirPath = join77(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11500
11760
  throw new Error(
11501
- `Invalid frontmatter in ${join76(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11761
+ `Invalid frontmatter in ${join77(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11502
11762
  );
11503
11763
  }
11504
11764
  return new _ClaudecodeSkill({
@@ -11532,16 +11792,16 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
11532
11792
  };
11533
11793
 
11534
11794
  // src/features/skills/cline-skill.ts
11535
- import { join as join77 } from "path";
11536
- import { z as z38 } from "zod/mini";
11537
- var ClineSkillFrontmatterSchema = z38.looseObject({
11538
- name: z38.string(),
11539
- description: z38.string()
11795
+ import { join as join78 } from "path";
11796
+ import { z as z39 } from "zod/mini";
11797
+ var ClineSkillFrontmatterSchema = z39.looseObject({
11798
+ name: z39.string(),
11799
+ description: z39.string()
11540
11800
  });
11541
11801
  var ClineSkill = class _ClineSkill extends ToolSkill {
11542
11802
  constructor({
11543
11803
  baseDir = process.cwd(),
11544
- relativeDirPath = join77(".cline", "skills"),
11804
+ relativeDirPath = join78(".cline", "skills"),
11545
11805
  dirName,
11546
11806
  frontmatter,
11547
11807
  body,
@@ -11570,7 +11830,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
11570
11830
  }
11571
11831
  static getSettablePaths(_options = {}) {
11572
11832
  return {
11573
- relativeDirPath: join77(".cline", "skills")
11833
+ relativeDirPath: join78(".cline", "skills")
11574
11834
  };
11575
11835
  }
11576
11836
  getFrontmatter() {
@@ -11658,13 +11918,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
11658
11918
  });
11659
11919
  const result = ClineSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11660
11920
  if (!result.success) {
11661
- const skillDirPath = join77(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11921
+ const skillDirPath = join78(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11662
11922
  throw new Error(
11663
- `Invalid frontmatter in ${join77(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11923
+ `Invalid frontmatter in ${join78(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11664
11924
  );
11665
11925
  }
11666
11926
  if (result.data.name !== loaded.dirName) {
11667
- const skillFilePath = join77(
11927
+ const skillFilePath = join78(
11668
11928
  loaded.baseDir,
11669
11929
  loaded.relativeDirPath,
11670
11930
  loaded.dirName,
@@ -11705,21 +11965,21 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
11705
11965
  };
11706
11966
 
11707
11967
  // src/features/skills/codexcli-skill.ts
11708
- import { join as join78 } from "path";
11709
- import { z as z39 } from "zod/mini";
11710
- var CodexCliSkillFrontmatterSchema = z39.looseObject({
11711
- name: z39.string(),
11712
- description: z39.string(),
11713
- metadata: z39.optional(
11714
- z39.looseObject({
11715
- "short-description": z39.optional(z39.string())
11968
+ import { join as join79 } from "path";
11969
+ import { z as z40 } from "zod/mini";
11970
+ var CodexCliSkillFrontmatterSchema = z40.looseObject({
11971
+ name: z40.string(),
11972
+ description: z40.string(),
11973
+ metadata: z40.optional(
11974
+ z40.looseObject({
11975
+ "short-description": z40.optional(z40.string())
11716
11976
  })
11717
11977
  )
11718
11978
  });
11719
11979
  var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
11720
11980
  constructor({
11721
11981
  baseDir = process.cwd(),
11722
- relativeDirPath = join78(".codex", "skills"),
11982
+ relativeDirPath = join79(".codex", "skills"),
11723
11983
  dirName,
11724
11984
  frontmatter,
11725
11985
  body,
@@ -11750,7 +12010,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
11750
12010
  global: _global = false
11751
12011
  } = {}) {
11752
12012
  return {
11753
- relativeDirPath: join78(".codex", "skills")
12013
+ relativeDirPath: join79(".codex", "skills")
11754
12014
  };
11755
12015
  }
11756
12016
  getFrontmatter() {
@@ -11840,9 +12100,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
11840
12100
  });
11841
12101
  const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11842
12102
  if (!result.success) {
11843
- const skillDirPath = join78(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12103
+ const skillDirPath = join79(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11844
12104
  throw new Error(
11845
- `Invalid frontmatter in ${join78(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12105
+ `Invalid frontmatter in ${join79(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11846
12106
  );
11847
12107
  }
11848
12108
  return new _CodexCliSkill({
@@ -11876,17 +12136,17 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
11876
12136
  };
11877
12137
 
11878
12138
  // src/features/skills/copilot-skill.ts
11879
- import { join as join79 } from "path";
11880
- import { z as z40 } from "zod/mini";
11881
- var CopilotSkillFrontmatterSchema = z40.looseObject({
11882
- name: z40.string(),
11883
- description: z40.string(),
11884
- license: z40.optional(z40.string())
12139
+ import { join as join80 } from "path";
12140
+ import { z as z41 } from "zod/mini";
12141
+ var CopilotSkillFrontmatterSchema = z41.looseObject({
12142
+ name: z41.string(),
12143
+ description: z41.string(),
12144
+ license: z41.optional(z41.string())
11885
12145
  });
11886
12146
  var CopilotSkill = class _CopilotSkill extends ToolSkill {
11887
12147
  constructor({
11888
12148
  baseDir = process.cwd(),
11889
- relativeDirPath = join79(".github", "skills"),
12149
+ relativeDirPath = join80(".github", "skills"),
11890
12150
  dirName,
11891
12151
  frontmatter,
11892
12152
  body,
@@ -11918,7 +12178,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
11918
12178
  throw new Error("CopilotSkill does not support global mode.");
11919
12179
  }
11920
12180
  return {
11921
- relativeDirPath: join79(".github", "skills")
12181
+ relativeDirPath: join80(".github", "skills")
11922
12182
  };
11923
12183
  }
11924
12184
  getFrontmatter() {
@@ -12004,9 +12264,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
12004
12264
  });
12005
12265
  const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12006
12266
  if (!result.success) {
12007
- const skillDirPath = join79(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12267
+ const skillDirPath = join80(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12008
12268
  throw new Error(
12009
- `Invalid frontmatter in ${join79(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12269
+ `Invalid frontmatter in ${join80(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12010
12270
  );
12011
12271
  }
12012
12272
  return new _CopilotSkill({
@@ -12041,16 +12301,16 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
12041
12301
  };
12042
12302
 
12043
12303
  // src/features/skills/cursor-skill.ts
12044
- import { join as join80 } from "path";
12045
- import { z as z41 } from "zod/mini";
12046
- var CursorSkillFrontmatterSchema = z41.looseObject({
12047
- name: z41.string(),
12048
- description: z41.string()
12304
+ import { join as join81 } from "path";
12305
+ import { z as z42 } from "zod/mini";
12306
+ var CursorSkillFrontmatterSchema = z42.looseObject({
12307
+ name: z42.string(),
12308
+ description: z42.string()
12049
12309
  });
12050
12310
  var CursorSkill = class _CursorSkill extends ToolSkill {
12051
12311
  constructor({
12052
12312
  baseDir = process.cwd(),
12053
- relativeDirPath = join80(".cursor", "skills"),
12313
+ relativeDirPath = join81(".cursor", "skills"),
12054
12314
  dirName,
12055
12315
  frontmatter,
12056
12316
  body,
@@ -12079,7 +12339,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
12079
12339
  }
12080
12340
  static getSettablePaths(_options) {
12081
12341
  return {
12082
- relativeDirPath: join80(".cursor", "skills")
12342
+ relativeDirPath: join81(".cursor", "skills")
12083
12343
  };
12084
12344
  }
12085
12345
  getFrontmatter() {
@@ -12159,9 +12419,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
12159
12419
  });
12160
12420
  const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12161
12421
  if (!result.success) {
12162
- const skillDirPath = join80(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12422
+ const skillDirPath = join81(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12163
12423
  throw new Error(
12164
- `Invalid frontmatter in ${join80(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12424
+ `Invalid frontmatter in ${join81(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12165
12425
  );
12166
12426
  }
12167
12427
  return new _CursorSkill({
@@ -12196,17 +12456,17 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
12196
12456
  };
12197
12457
 
12198
12458
  // src/features/skills/deepagents-skill.ts
12199
- import { join as join81 } from "path";
12200
- import { z as z42 } from "zod/mini";
12201
- var DeepagentsSkillFrontmatterSchema = z42.looseObject({
12202
- name: z42.string(),
12203
- description: z42.string(),
12204
- "allowed-tools": z42.optional(z42.array(z42.string()))
12459
+ import { join as join82 } from "path";
12460
+ import { z as z43 } from "zod/mini";
12461
+ var DeepagentsSkillFrontmatterSchema = z43.looseObject({
12462
+ name: z43.string(),
12463
+ description: z43.string(),
12464
+ "allowed-tools": z43.optional(z43.array(z43.string()))
12205
12465
  });
12206
12466
  var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
12207
12467
  constructor({
12208
12468
  baseDir = process.cwd(),
12209
- relativeDirPath = join81(".deepagents", "skills"),
12469
+ relativeDirPath = join82(".deepagents", "skills"),
12210
12470
  dirName,
12211
12471
  frontmatter,
12212
12472
  body,
@@ -12235,7 +12495,7 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
12235
12495
  }
12236
12496
  static getSettablePaths(_options) {
12237
12497
  return {
12238
- relativeDirPath: join81(".deepagents", "skills")
12498
+ relativeDirPath: join82(".deepagents", "skills")
12239
12499
  };
12240
12500
  }
12241
12501
  getFrontmatter() {
@@ -12321,9 +12581,9 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
12321
12581
  });
12322
12582
  const result = DeepagentsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12323
12583
  if (!result.success) {
12324
- const skillDirPath = join81(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12584
+ const skillDirPath = join82(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12325
12585
  throw new Error(
12326
- `Invalid frontmatter in ${join81(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12586
+ `Invalid frontmatter in ${join82(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12327
12587
  );
12328
12588
  }
12329
12589
  return new _DeepagentsSkill({
@@ -12358,11 +12618,11 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
12358
12618
  };
12359
12619
 
12360
12620
  // src/features/skills/geminicli-skill.ts
12361
- import { join as join82 } from "path";
12362
- import { z as z43 } from "zod/mini";
12363
- var GeminiCliSkillFrontmatterSchema = z43.looseObject({
12364
- name: z43.string(),
12365
- description: z43.string()
12621
+ import { join as join83 } from "path";
12622
+ import { z as z44 } from "zod/mini";
12623
+ var GeminiCliSkillFrontmatterSchema = z44.looseObject({
12624
+ name: z44.string(),
12625
+ description: z44.string()
12366
12626
  });
12367
12627
  var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
12368
12628
  constructor({
@@ -12398,7 +12658,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
12398
12658
  global: _global = false
12399
12659
  } = {}) {
12400
12660
  return {
12401
- relativeDirPath: join82(".gemini", "skills")
12661
+ relativeDirPath: join83(".gemini", "skills")
12402
12662
  };
12403
12663
  }
12404
12664
  getFrontmatter() {
@@ -12478,9 +12738,9 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
12478
12738
  });
12479
12739
  const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12480
12740
  if (!result.success) {
12481
- const skillDirPath = join82(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12741
+ const skillDirPath = join83(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12482
12742
  throw new Error(
12483
- `Invalid frontmatter in ${join82(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12743
+ `Invalid frontmatter in ${join83(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12484
12744
  );
12485
12745
  }
12486
12746
  return new _GeminiCliSkill({
@@ -12515,16 +12775,16 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
12515
12775
  };
12516
12776
 
12517
12777
  // src/features/skills/junie-skill.ts
12518
- import { join as join83 } from "path";
12519
- import { z as z44 } from "zod/mini";
12520
- var JunieSkillFrontmatterSchema = z44.looseObject({
12521
- name: z44.string(),
12522
- description: z44.string()
12778
+ import { join as join84 } from "path";
12779
+ import { z as z45 } from "zod/mini";
12780
+ var JunieSkillFrontmatterSchema = z45.looseObject({
12781
+ name: z45.string(),
12782
+ description: z45.string()
12523
12783
  });
12524
12784
  var JunieSkill = class _JunieSkill extends ToolSkill {
12525
12785
  constructor({
12526
12786
  baseDir = process.cwd(),
12527
- relativeDirPath = join83(".junie", "skills"),
12787
+ relativeDirPath = join84(".junie", "skills"),
12528
12788
  dirName,
12529
12789
  frontmatter,
12530
12790
  body,
@@ -12556,7 +12816,7 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
12556
12816
  throw new Error("JunieSkill does not support global mode.");
12557
12817
  }
12558
12818
  return {
12559
- relativeDirPath: join83(".junie", "skills")
12819
+ relativeDirPath: join84(".junie", "skills")
12560
12820
  };
12561
12821
  }
12562
12822
  getFrontmatter() {
@@ -12643,13 +12903,13 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
12643
12903
  });
12644
12904
  const result = JunieSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12645
12905
  if (!result.success) {
12646
- const skillDirPath = join83(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12906
+ const skillDirPath = join84(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12647
12907
  throw new Error(
12648
- `Invalid frontmatter in ${join83(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12908
+ `Invalid frontmatter in ${join84(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12649
12909
  );
12650
12910
  }
12651
12911
  if (result.data.name !== loaded.dirName) {
12652
- const skillFilePath = join83(
12912
+ const skillFilePath = join84(
12653
12913
  loaded.baseDir,
12654
12914
  loaded.relativeDirPath,
12655
12915
  loaded.dirName,
@@ -12691,17 +12951,17 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
12691
12951
  };
12692
12952
 
12693
12953
  // src/features/skills/kilo-skill.ts
12694
- import { join as join84 } from "path";
12695
- import { z as z45 } from "zod/mini";
12696
- var KiloSkillFrontmatterSchema = z45.looseObject({
12697
- name: z45.string(),
12698
- description: z45.string(),
12699
- "allowed-tools": z45.optional(z45.array(z45.string()))
12954
+ import { join as join85 } from "path";
12955
+ import { z as z46 } from "zod/mini";
12956
+ var KiloSkillFrontmatterSchema = z46.looseObject({
12957
+ name: z46.string(),
12958
+ description: z46.string(),
12959
+ "allowed-tools": z46.optional(z46.array(z46.string()))
12700
12960
  });
12701
12961
  var KiloSkill = class _KiloSkill extends ToolSkill {
12702
12962
  constructor({
12703
12963
  baseDir = process.cwd(),
12704
- relativeDirPath = join84(".kilo", "skills"),
12964
+ relativeDirPath = join85(".kilo", "skills"),
12705
12965
  dirName,
12706
12966
  frontmatter,
12707
12967
  body,
@@ -12730,7 +12990,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
12730
12990
  }
12731
12991
  static getSettablePaths({ global = false } = {}) {
12732
12992
  return {
12733
- relativeDirPath: global ? join84(".config", "kilo", "skills") : join84(".kilo", "skills")
12993
+ relativeDirPath: global ? join85(".config", "kilo", "skills") : join85(".kilo", "skills")
12734
12994
  };
12735
12995
  }
12736
12996
  getFrontmatter() {
@@ -12816,9 +13076,9 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
12816
13076
  });
12817
13077
  const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12818
13078
  if (!result.success) {
12819
- const skillDirPath = join84(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13079
+ const skillDirPath = join85(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12820
13080
  throw new Error(
12821
- `Invalid frontmatter in ${join84(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13081
+ `Invalid frontmatter in ${join85(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12822
13082
  );
12823
13083
  }
12824
13084
  return new _KiloSkill({
@@ -12852,16 +13112,16 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
12852
13112
  };
12853
13113
 
12854
13114
  // src/features/skills/kiro-skill.ts
12855
- import { join as join85 } from "path";
12856
- import { z as z46 } from "zod/mini";
12857
- var KiroSkillFrontmatterSchema = z46.looseObject({
12858
- name: z46.string(),
12859
- description: z46.string()
13115
+ import { join as join86 } from "path";
13116
+ import { z as z47 } from "zod/mini";
13117
+ var KiroSkillFrontmatterSchema = z47.looseObject({
13118
+ name: z47.string(),
13119
+ description: z47.string()
12860
13120
  });
12861
13121
  var KiroSkill = class _KiroSkill extends ToolSkill {
12862
13122
  constructor({
12863
13123
  baseDir = process.cwd(),
12864
- relativeDirPath = join85(".kiro", "skills"),
13124
+ relativeDirPath = join86(".kiro", "skills"),
12865
13125
  dirName,
12866
13126
  frontmatter,
12867
13127
  body,
@@ -12893,7 +13153,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
12893
13153
  throw new Error("KiroSkill does not support global mode.");
12894
13154
  }
12895
13155
  return {
12896
- relativeDirPath: join85(".kiro", "skills")
13156
+ relativeDirPath: join86(".kiro", "skills")
12897
13157
  };
12898
13158
  }
12899
13159
  getFrontmatter() {
@@ -12981,13 +13241,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
12981
13241
  });
12982
13242
  const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12983
13243
  if (!result.success) {
12984
- const skillDirPath = join85(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13244
+ const skillDirPath = join86(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12985
13245
  throw new Error(
12986
- `Invalid frontmatter in ${join85(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13246
+ `Invalid frontmatter in ${join86(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12987
13247
  );
12988
13248
  }
12989
13249
  if (result.data.name !== loaded.dirName) {
12990
- const skillFilePath = join85(
13250
+ const skillFilePath = join86(
12991
13251
  loaded.baseDir,
12992
13252
  loaded.relativeDirPath,
12993
13253
  loaded.dirName,
@@ -13029,17 +13289,17 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
13029
13289
  };
13030
13290
 
13031
13291
  // src/features/skills/opencode-skill.ts
13032
- import { join as join86 } from "path";
13033
- import { z as z47 } from "zod/mini";
13034
- var OpenCodeSkillFrontmatterSchema = z47.looseObject({
13035
- name: z47.string(),
13036
- description: z47.string(),
13037
- "allowed-tools": z47.optional(z47.array(z47.string()))
13292
+ import { join as join87 } from "path";
13293
+ import { z as z48 } from "zod/mini";
13294
+ var OpenCodeSkillFrontmatterSchema = z48.looseObject({
13295
+ name: z48.string(),
13296
+ description: z48.string(),
13297
+ "allowed-tools": z48.optional(z48.array(z48.string()))
13038
13298
  });
13039
13299
  var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
13040
13300
  constructor({
13041
13301
  baseDir = process.cwd(),
13042
- relativeDirPath = join86(".opencode", "skill"),
13302
+ relativeDirPath = join87(".opencode", "skill"),
13043
13303
  dirName,
13044
13304
  frontmatter,
13045
13305
  body,
@@ -13068,7 +13328,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
13068
13328
  }
13069
13329
  static getSettablePaths({ global = false } = {}) {
13070
13330
  return {
13071
- relativeDirPath: global ? join86(".config", "opencode", "skill") : join86(".opencode", "skill")
13331
+ relativeDirPath: global ? join87(".config", "opencode", "skill") : join87(".opencode", "skill")
13072
13332
  };
13073
13333
  }
13074
13334
  getFrontmatter() {
@@ -13154,9 +13414,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
13154
13414
  });
13155
13415
  const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
13156
13416
  if (!result.success) {
13157
- const skillDirPath = join86(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13417
+ const skillDirPath = join87(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13158
13418
  throw new Error(
13159
- `Invalid frontmatter in ${join86(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13419
+ `Invalid frontmatter in ${join87(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13160
13420
  );
13161
13421
  }
13162
13422
  return new _OpenCodeSkill({
@@ -13190,16 +13450,16 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
13190
13450
  };
13191
13451
 
13192
13452
  // src/features/skills/replit-skill.ts
13193
- import { join as join87 } from "path";
13194
- import { z as z48 } from "zod/mini";
13195
- var ReplitSkillFrontmatterSchema = z48.looseObject({
13196
- name: z48.string(),
13197
- description: z48.string()
13453
+ import { join as join88 } from "path";
13454
+ import { z as z49 } from "zod/mini";
13455
+ var ReplitSkillFrontmatterSchema = z49.looseObject({
13456
+ name: z49.string(),
13457
+ description: z49.string()
13198
13458
  });
13199
13459
  var ReplitSkill = class _ReplitSkill extends ToolSkill {
13200
13460
  constructor({
13201
13461
  baseDir = process.cwd(),
13202
- relativeDirPath = join87(".agents", "skills"),
13462
+ relativeDirPath = join88(".agents", "skills"),
13203
13463
  dirName,
13204
13464
  frontmatter,
13205
13465
  body,
@@ -13231,7 +13491,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
13231
13491
  throw new Error("ReplitSkill does not support global mode.");
13232
13492
  }
13233
13493
  return {
13234
- relativeDirPath: join87(".agents", "skills")
13494
+ relativeDirPath: join88(".agents", "skills")
13235
13495
  };
13236
13496
  }
13237
13497
  getFrontmatter() {
@@ -13311,9 +13571,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
13311
13571
  });
13312
13572
  const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
13313
13573
  if (!result.success) {
13314
- const skillDirPath = join87(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13574
+ const skillDirPath = join88(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13315
13575
  throw new Error(
13316
- `Invalid frontmatter in ${join87(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13576
+ `Invalid frontmatter in ${join88(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13317
13577
  );
13318
13578
  }
13319
13579
  return new _ReplitSkill({
@@ -13348,16 +13608,16 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
13348
13608
  };
13349
13609
 
13350
13610
  // src/features/skills/roo-skill.ts
13351
- import { join as join88 } from "path";
13352
- import { z as z49 } from "zod/mini";
13353
- var RooSkillFrontmatterSchema = z49.looseObject({
13354
- name: z49.string(),
13355
- description: z49.string()
13611
+ import { join as join89 } from "path";
13612
+ import { z as z50 } from "zod/mini";
13613
+ var RooSkillFrontmatterSchema = z50.looseObject({
13614
+ name: z50.string(),
13615
+ description: z50.string()
13356
13616
  });
13357
13617
  var RooSkill = class _RooSkill extends ToolSkill {
13358
13618
  constructor({
13359
13619
  baseDir = process.cwd(),
13360
- relativeDirPath = join88(".roo", "skills"),
13620
+ relativeDirPath = join89(".roo", "skills"),
13361
13621
  dirName,
13362
13622
  frontmatter,
13363
13623
  body,
@@ -13388,7 +13648,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
13388
13648
  global: _global = false
13389
13649
  } = {}) {
13390
13650
  return {
13391
- relativeDirPath: join88(".roo", "skills")
13651
+ relativeDirPath: join89(".roo", "skills")
13392
13652
  };
13393
13653
  }
13394
13654
  getFrontmatter() {
@@ -13476,13 +13736,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
13476
13736
  });
13477
13737
  const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
13478
13738
  if (!result.success) {
13479
- const skillDirPath = join88(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13739
+ const skillDirPath = join89(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13480
13740
  throw new Error(
13481
- `Invalid frontmatter in ${join88(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13741
+ `Invalid frontmatter in ${join89(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13482
13742
  );
13483
13743
  }
13484
13744
  if (result.data.name !== loaded.dirName) {
13485
- const skillFilePath = join88(
13745
+ const skillFilePath = join89(
13486
13746
  loaded.baseDir,
13487
13747
  loaded.relativeDirPath,
13488
13748
  loaded.dirName,
@@ -13523,14 +13783,14 @@ var RooSkill = class _RooSkill extends ToolSkill {
13523
13783
  };
13524
13784
 
13525
13785
  // src/features/skills/skills-utils.ts
13526
- import { basename as basename4, join as join89 } from "path";
13786
+ import { basename as basename4, join as join90 } from "path";
13527
13787
  async function getLocalSkillDirNames(baseDir) {
13528
- const skillsDir = join89(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
13788
+ const skillsDir = join90(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
13529
13789
  const names = /* @__PURE__ */ new Set();
13530
13790
  if (!await directoryExists(skillsDir)) {
13531
13791
  return names;
13532
13792
  }
13533
- const dirPaths = await findFilesByGlobs(join89(skillsDir, "*"), { type: "dir" });
13793
+ const dirPaths = await findFilesByGlobs(join90(skillsDir, "*"), { type: "dir" });
13534
13794
  for (const dirPath of dirPaths) {
13535
13795
  const name = basename4(dirPath);
13536
13796
  if (name === basename4(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
@@ -13561,7 +13821,7 @@ var skillsProcessorToolTargetTuple = [
13561
13821
  "roo",
13562
13822
  "rovodev"
13563
13823
  ];
13564
- var SkillsProcessorToolTargetSchema = z50.enum(skillsProcessorToolTargetTuple);
13824
+ var SkillsProcessorToolTargetSchema = z51.enum(skillsProcessorToolTargetTuple);
13565
13825
  var toolSkillFactories = /* @__PURE__ */ new Map([
13566
13826
  [
13567
13827
  "agentsmd",
@@ -13785,10 +14045,10 @@ var SkillsProcessor = class extends DirFeatureProcessor {
13785
14045
  )
13786
14046
  );
13787
14047
  const localSkillNames = new Set(localDirNames);
13788
- const curatedDirPath = join90(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
14048
+ const curatedDirPath = join91(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
13789
14049
  let curatedSkills = [];
13790
14050
  if (await directoryExists(curatedDirPath)) {
13791
- const curatedDirPaths = await findFilesByGlobs(join90(curatedDirPath, "*"), { type: "dir" });
14051
+ const curatedDirPaths = await findFilesByGlobs(join91(curatedDirPath, "*"), { type: "dir" });
13792
14052
  const curatedDirNames = curatedDirPaths.map((path3) => basename5(path3));
13793
14053
  const nonConflicting = curatedDirNames.filter((name) => {
13794
14054
  if (localSkillNames.has(name)) {
@@ -13826,11 +14086,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
13826
14086
  const seenDirNames = /* @__PURE__ */ new Set();
13827
14087
  const loadEntries = [];
13828
14088
  for (const root of roots) {
13829
- const skillsDirPath = join90(this.baseDir, root);
14089
+ const skillsDirPath = join91(this.baseDir, root);
13830
14090
  if (!await directoryExists(skillsDirPath)) {
13831
14091
  continue;
13832
14092
  }
13833
- const dirPaths = await findFilesByGlobs(join90(skillsDirPath, "*"), { type: "dir" });
14093
+ const dirPaths = await findFilesByGlobs(join91(skillsDirPath, "*"), { type: "dir" });
13834
14094
  for (const dirPath of dirPaths) {
13835
14095
  const dirName = basename5(dirPath);
13836
14096
  if (seenDirNames.has(dirName)) {
@@ -13861,11 +14121,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
13861
14121
  const roots = toolSkillSearchRoots(paths);
13862
14122
  const toolSkills = [];
13863
14123
  for (const root of roots) {
13864
- const skillsDirPath = join90(this.baseDir, root);
14124
+ const skillsDirPath = join91(this.baseDir, root);
13865
14125
  if (!await directoryExists(skillsDirPath)) {
13866
14126
  continue;
13867
14127
  }
13868
- const dirPaths = await findFilesByGlobs(join90(skillsDirPath, "*"), { type: "dir" });
14128
+ const dirPaths = await findFilesByGlobs(join91(skillsDirPath, "*"), { type: "dir" });
13869
14129
  for (const dirPath of dirPaths) {
13870
14130
  const dirName = basename5(dirPath);
13871
14131
  const toolSkill = factory.class.forDeletion({
@@ -13929,11 +14189,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
13929
14189
  };
13930
14190
 
13931
14191
  // src/features/subagents/agentsmd-subagent.ts
13932
- import { join as join92 } from "path";
14192
+ import { join as join93 } from "path";
13933
14193
 
13934
14194
  // src/features/subagents/simulated-subagent.ts
13935
- import { basename as basename6, join as join91 } from "path";
13936
- import { z as z51 } from "zod/mini";
14195
+ import { basename as basename6, join as join92 } from "path";
14196
+ import { z as z52 } from "zod/mini";
13937
14197
 
13938
14198
  // src/features/subagents/tool-subagent.ts
13939
14199
  var ToolSubagent = class extends ToolFile {
@@ -13985,9 +14245,9 @@ var ToolSubagent = class extends ToolFile {
13985
14245
  };
13986
14246
 
13987
14247
  // src/features/subagents/simulated-subagent.ts
13988
- var SimulatedSubagentFrontmatterSchema = z51.object({
13989
- name: z51.string(),
13990
- description: z51.optional(z51.string())
14248
+ var SimulatedSubagentFrontmatterSchema = z52.object({
14249
+ name: z52.string(),
14250
+ description: z52.optional(z52.string())
13991
14251
  });
13992
14252
  var SimulatedSubagent = class extends ToolSubagent {
13993
14253
  frontmatter;
@@ -13997,7 +14257,7 @@ var SimulatedSubagent = class extends ToolSubagent {
13997
14257
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
13998
14258
  if (!result.success) {
13999
14259
  throw new Error(
14000
- `Invalid frontmatter in ${join91(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14260
+ `Invalid frontmatter in ${join92(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14001
14261
  );
14002
14262
  }
14003
14263
  }
@@ -14048,7 +14308,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14048
14308
  return {
14049
14309
  success: false,
14050
14310
  error: new Error(
14051
- `Invalid frontmatter in ${join91(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14311
+ `Invalid frontmatter in ${join92(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14052
14312
  )
14053
14313
  };
14054
14314
  }
@@ -14058,7 +14318,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14058
14318
  relativeFilePath,
14059
14319
  validate = true
14060
14320
  }) {
14061
- const filePath = join91(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
14321
+ const filePath = join92(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
14062
14322
  const fileContent = await readFileContent(filePath);
14063
14323
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14064
14324
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14094,7 +14354,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14094
14354
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
14095
14355
  static getSettablePaths() {
14096
14356
  return {
14097
- relativeDirPath: join92(".agents", "subagents")
14357
+ relativeDirPath: join93(".agents", "subagents")
14098
14358
  };
14099
14359
  }
14100
14360
  static async fromFile(params) {
@@ -14117,11 +14377,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
14117
14377
  };
14118
14378
 
14119
14379
  // src/features/subagents/factorydroid-subagent.ts
14120
- import { join as join93 } from "path";
14380
+ import { join as join94 } from "path";
14121
14381
  var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
14122
14382
  static getSettablePaths(_options) {
14123
14383
  return {
14124
- relativeDirPath: join93(".factory", "droids")
14384
+ relativeDirPath: join94(".factory", "droids")
14125
14385
  };
14126
14386
  }
14127
14387
  static async fromFile(params) {
@@ -14144,16 +14404,16 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
14144
14404
  };
14145
14405
 
14146
14406
  // src/features/subagents/geminicli-subagent.ts
14147
- import { join as join95 } from "path";
14148
- import { z as z53 } from "zod/mini";
14407
+ import { join as join96 } from "path";
14408
+ import { z as z54 } from "zod/mini";
14149
14409
 
14150
14410
  // src/features/subagents/rulesync-subagent.ts
14151
- import { basename as basename7, join as join94 } from "path";
14152
- import { z as z52 } from "zod/mini";
14153
- var RulesyncSubagentFrontmatterSchema = z52.looseObject({
14154
- targets: z52._default(RulesyncTargetsSchema, ["*"]),
14155
- name: z52.string(),
14156
- description: z52.optional(z52.string())
14411
+ import { basename as basename7, join as join95 } from "path";
14412
+ import { z as z53 } from "zod/mini";
14413
+ var RulesyncSubagentFrontmatterSchema = z53.looseObject({
14414
+ targets: z53._default(RulesyncTargetsSchema, ["*"]),
14415
+ name: z53.string(),
14416
+ description: z53.optional(z53.string())
14157
14417
  });
14158
14418
  var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14159
14419
  frontmatter;
@@ -14162,7 +14422,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14162
14422
  const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
14163
14423
  if (!parseResult.success && rest.validate !== false) {
14164
14424
  throw new Error(
14165
- `Invalid frontmatter in ${join94(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
14425
+ `Invalid frontmatter in ${join95(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
14166
14426
  );
14167
14427
  }
14168
14428
  const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
@@ -14195,7 +14455,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14195
14455
  return {
14196
14456
  success: false,
14197
14457
  error: new Error(
14198
- `Invalid frontmatter in ${join94(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14458
+ `Invalid frontmatter in ${join95(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14199
14459
  )
14200
14460
  };
14201
14461
  }
@@ -14203,7 +14463,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14203
14463
  static async fromFile({
14204
14464
  relativeFilePath
14205
14465
  }) {
14206
- const filePath = join94(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
14466
+ const filePath = join95(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
14207
14467
  const fileContent = await readFileContent(filePath);
14208
14468
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14209
14469
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14222,9 +14482,9 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14222
14482
  };
14223
14483
 
14224
14484
  // src/features/subagents/geminicli-subagent.ts
14225
- var GeminiCliSubagentFrontmatterSchema = z53.looseObject({
14226
- name: z53.string(),
14227
- description: z53.optional(z53.string())
14485
+ var GeminiCliSubagentFrontmatterSchema = z54.looseObject({
14486
+ name: z54.string(),
14487
+ description: z54.optional(z54.string())
14228
14488
  });
14229
14489
  var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14230
14490
  frontmatter;
@@ -14234,7 +14494,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14234
14494
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
14235
14495
  if (!result.success) {
14236
14496
  throw new Error(
14237
- `Invalid frontmatter in ${join95(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14497
+ `Invalid frontmatter in ${join96(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14238
14498
  );
14239
14499
  }
14240
14500
  }
@@ -14247,7 +14507,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14247
14507
  }
14248
14508
  static getSettablePaths(_options = {}) {
14249
14509
  return {
14250
- relativeDirPath: join95(".gemini", "agents")
14510
+ relativeDirPath: join96(".gemini", "agents")
14251
14511
  };
14252
14512
  }
14253
14513
  getFrontmatter() {
@@ -14315,7 +14575,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14315
14575
  return {
14316
14576
  success: false,
14317
14577
  error: new Error(
14318
- `Invalid frontmatter in ${join95(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14578
+ `Invalid frontmatter in ${join96(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14319
14579
  )
14320
14580
  };
14321
14581
  }
@@ -14333,7 +14593,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14333
14593
  global = false
14334
14594
  }) {
14335
14595
  const paths = this.getSettablePaths({ global });
14336
- const filePath = join95(baseDir, paths.relativeDirPath, relativeFilePath);
14596
+ const filePath = join96(baseDir, paths.relativeDirPath, relativeFilePath);
14337
14597
  const fileContent = await readFileContent(filePath);
14338
14598
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14339
14599
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14369,11 +14629,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14369
14629
  };
14370
14630
 
14371
14631
  // src/features/subagents/roo-subagent.ts
14372
- import { join as join96 } from "path";
14632
+ import { join as join97 } from "path";
14373
14633
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
14374
14634
  static getSettablePaths() {
14375
14635
  return {
14376
- relativeDirPath: join96(".roo", "subagents")
14636
+ relativeDirPath: join97(".roo", "subagents")
14377
14637
  };
14378
14638
  }
14379
14639
  static async fromFile(params) {
@@ -14396,11 +14656,11 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
14396
14656
  };
14397
14657
 
14398
14658
  // src/features/subagents/rovodev-subagent.ts
14399
- import { join as join97 } from "path";
14400
- import { z as z54 } from "zod/mini";
14401
- var RovodevSubagentFrontmatterSchema = z54.looseObject({
14402
- name: z54.string(),
14403
- description: z54.optional(z54.string())
14659
+ import { join as join98 } from "path";
14660
+ import { z as z55 } from "zod/mini";
14661
+ var RovodevSubagentFrontmatterSchema = z55.looseObject({
14662
+ name: z55.string(),
14663
+ description: z55.optional(z55.string())
14404
14664
  });
14405
14665
  var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14406
14666
  frontmatter;
@@ -14410,7 +14670,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14410
14670
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
14411
14671
  if (!result.success) {
14412
14672
  throw new Error(
14413
- `Invalid frontmatter in ${join97(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14673
+ `Invalid frontmatter in ${join98(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14414
14674
  );
14415
14675
  }
14416
14676
  }
@@ -14422,7 +14682,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14422
14682
  }
14423
14683
  static getSettablePaths(_options = {}) {
14424
14684
  return {
14425
- relativeDirPath: join97(".rovodev", "subagents")
14685
+ relativeDirPath: join98(".rovodev", "subagents")
14426
14686
  };
14427
14687
  }
14428
14688
  getFrontmatter() {
@@ -14485,7 +14745,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14485
14745
  return {
14486
14746
  success: false,
14487
14747
  error: new Error(
14488
- `Invalid frontmatter in ${join97(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14748
+ `Invalid frontmatter in ${join98(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14489
14749
  )
14490
14750
  };
14491
14751
  }
@@ -14502,7 +14762,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14502
14762
  global = false
14503
14763
  }) {
14504
14764
  const paths = this.getSettablePaths({ global });
14505
- const filePath = join97(baseDir, paths.relativeDirPath, relativeFilePath);
14765
+ const filePath = join98(baseDir, paths.relativeDirPath, relativeFilePath);
14506
14766
  const fileContent = await readFileContent(filePath);
14507
14767
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14508
14768
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14541,19 +14801,19 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14541
14801
  };
14542
14802
 
14543
14803
  // src/features/subagents/subagents-processor.ts
14544
- import { basename as basename9, join as join108 } from "path";
14545
- import { z as z63 } from "zod/mini";
14804
+ import { basename as basename9, join as join109 } from "path";
14805
+ import { z as z64 } from "zod/mini";
14546
14806
 
14547
14807
  // src/features/subagents/claudecode-subagent.ts
14548
- import { join as join98 } from "path";
14549
- import { z as z55 } from "zod/mini";
14550
- var ClaudecodeSubagentFrontmatterSchema = z55.looseObject({
14551
- name: z55.string(),
14552
- description: z55.optional(z55.string()),
14553
- model: z55.optional(z55.string()),
14554
- tools: z55.optional(z55.union([z55.string(), z55.array(z55.string())])),
14555
- permissionMode: z55.optional(z55.string()),
14556
- skills: z55.optional(z55.union([z55.string(), z55.array(z55.string())]))
14808
+ import { join as join99 } from "path";
14809
+ import { z as z56 } from "zod/mini";
14810
+ var ClaudecodeSubagentFrontmatterSchema = z56.looseObject({
14811
+ name: z56.string(),
14812
+ description: z56.optional(z56.string()),
14813
+ model: z56.optional(z56.string()),
14814
+ tools: z56.optional(z56.union([z56.string(), z56.array(z56.string())])),
14815
+ permissionMode: z56.optional(z56.string()),
14816
+ skills: z56.optional(z56.union([z56.string(), z56.array(z56.string())]))
14557
14817
  });
14558
14818
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14559
14819
  frontmatter;
@@ -14563,7 +14823,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14563
14823
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
14564
14824
  if (!result.success) {
14565
14825
  throw new Error(
14566
- `Invalid frontmatter in ${join98(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14826
+ `Invalid frontmatter in ${join99(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14567
14827
  );
14568
14828
  }
14569
14829
  }
@@ -14575,7 +14835,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14575
14835
  }
14576
14836
  static getSettablePaths(_options = {}) {
14577
14837
  return {
14578
- relativeDirPath: join98(".claude", "agents")
14838
+ relativeDirPath: join99(".claude", "agents")
14579
14839
  };
14580
14840
  }
14581
14841
  getFrontmatter() {
@@ -14654,7 +14914,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14654
14914
  return {
14655
14915
  success: false,
14656
14916
  error: new Error(
14657
- `Invalid frontmatter in ${join98(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14917
+ `Invalid frontmatter in ${join99(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14658
14918
  )
14659
14919
  };
14660
14920
  }
@@ -14672,7 +14932,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14672
14932
  global = false
14673
14933
  }) {
14674
14934
  const paths = this.getSettablePaths({ global });
14675
- const filePath = join98(baseDir, paths.relativeDirPath, relativeFilePath);
14935
+ const filePath = join99(baseDir, paths.relativeDirPath, relativeFilePath);
14676
14936
  const fileContent = await readFileContent(filePath);
14677
14937
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14678
14938
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14707,16 +14967,16 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14707
14967
  };
14708
14968
 
14709
14969
  // src/features/subagents/codexcli-subagent.ts
14710
- import { join as join99 } from "path";
14970
+ import { join as join100 } from "path";
14711
14971
  import * as smolToml5 from "smol-toml";
14712
- import { z as z56 } from "zod/mini";
14713
- var CodexCliSubagentTomlSchema = z56.looseObject({
14714
- name: z56.string(),
14715
- description: z56.optional(z56.string()),
14716
- developer_instructions: z56.optional(z56.string()),
14717
- model: z56.optional(z56.string()),
14718
- model_reasoning_effort: z56.optional(z56.string()),
14719
- sandbox_mode: z56.optional(z56.string())
14972
+ import { z as z57 } from "zod/mini";
14973
+ var CodexCliSubagentTomlSchema = z57.looseObject({
14974
+ name: z57.string(),
14975
+ description: z57.optional(z57.string()),
14976
+ developer_instructions: z57.optional(z57.string()),
14977
+ model: z57.optional(z57.string()),
14978
+ model_reasoning_effort: z57.optional(z57.string()),
14979
+ sandbox_mode: z57.optional(z57.string())
14720
14980
  });
14721
14981
  var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14722
14982
  body;
@@ -14727,7 +14987,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14727
14987
  CodexCliSubagentTomlSchema.parse(parsed);
14728
14988
  } catch (error) {
14729
14989
  throw new Error(
14730
- `Invalid TOML in ${join99(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
14990
+ `Invalid TOML in ${join100(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
14731
14991
  { cause: error }
14732
14992
  );
14733
14993
  }
@@ -14739,7 +14999,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14739
14999
  }
14740
15000
  static getSettablePaths(_options = {}) {
14741
15001
  return {
14742
- relativeDirPath: join99(".codex", "agents")
15002
+ relativeDirPath: join100(".codex", "agents")
14743
15003
  };
14744
15004
  }
14745
15005
  getBody() {
@@ -14751,7 +15011,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14751
15011
  parsed = CodexCliSubagentTomlSchema.parse(smolToml5.parse(this.body));
14752
15012
  } catch (error) {
14753
15013
  throw new Error(
14754
- `Failed to parse TOML in ${join99(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15014
+ `Failed to parse TOML in ${join100(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
14755
15015
  { cause: error }
14756
15016
  );
14757
15017
  }
@@ -14832,7 +15092,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14832
15092
  global = false
14833
15093
  }) {
14834
15094
  const paths = this.getSettablePaths({ global });
14835
- const filePath = join99(baseDir, paths.relativeDirPath, relativeFilePath);
15095
+ const filePath = join100(baseDir, paths.relativeDirPath, relativeFilePath);
14836
15096
  const fileContent = await readFileContent(filePath);
14837
15097
  const subagent = new _CodexCliSubagent({
14838
15098
  baseDir,
@@ -14870,13 +15130,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14870
15130
  };
14871
15131
 
14872
15132
  // src/features/subagents/copilot-subagent.ts
14873
- import { join as join100 } from "path";
14874
- import { z as z57 } from "zod/mini";
15133
+ import { join as join101 } from "path";
15134
+ import { z as z58 } from "zod/mini";
14875
15135
  var REQUIRED_TOOL = "agent/runSubagent";
14876
- var CopilotSubagentFrontmatterSchema = z57.looseObject({
14877
- name: z57.string(),
14878
- description: z57.optional(z57.string()),
14879
- tools: z57.optional(z57.union([z57.string(), z57.array(z57.string())]))
15136
+ var CopilotSubagentFrontmatterSchema = z58.looseObject({
15137
+ name: z58.string(),
15138
+ description: z58.optional(z58.string()),
15139
+ tools: z58.optional(z58.union([z58.string(), z58.array(z58.string())]))
14880
15140
  });
14881
15141
  var normalizeTools = (tools) => {
14882
15142
  if (!tools) {
@@ -14896,7 +15156,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
14896
15156
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
14897
15157
  if (!result.success) {
14898
15158
  throw new Error(
14899
- `Invalid frontmatter in ${join100(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15159
+ `Invalid frontmatter in ${join101(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14900
15160
  );
14901
15161
  }
14902
15162
  }
@@ -14908,7 +15168,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
14908
15168
  }
14909
15169
  static getSettablePaths(_options = {}) {
14910
15170
  return {
14911
- relativeDirPath: join100(".github", "agents")
15171
+ relativeDirPath: join101(".github", "agents")
14912
15172
  };
14913
15173
  }
14914
15174
  getFrontmatter() {
@@ -14986,7 +15246,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
14986
15246
  return {
14987
15247
  success: false,
14988
15248
  error: new Error(
14989
- `Invalid frontmatter in ${join100(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15249
+ `Invalid frontmatter in ${join101(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14990
15250
  )
14991
15251
  };
14992
15252
  }
@@ -15004,7 +15264,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15004
15264
  global = false
15005
15265
  }) {
15006
15266
  const paths = this.getSettablePaths({ global });
15007
- const filePath = join100(baseDir, paths.relativeDirPath, relativeFilePath);
15267
+ const filePath = join101(baseDir, paths.relativeDirPath, relativeFilePath);
15008
15268
  const fileContent = await readFileContent(filePath);
15009
15269
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15010
15270
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15040,11 +15300,11 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15040
15300
  };
15041
15301
 
15042
15302
  // src/features/subagents/cursor-subagent.ts
15043
- import { join as join101 } from "path";
15044
- import { z as z58 } from "zod/mini";
15045
- var CursorSubagentFrontmatterSchema = z58.looseObject({
15046
- name: z58.string(),
15047
- description: z58.optional(z58.string())
15303
+ import { join as join102 } from "path";
15304
+ import { z as z59 } from "zod/mini";
15305
+ var CursorSubagentFrontmatterSchema = z59.looseObject({
15306
+ name: z59.string(),
15307
+ description: z59.optional(z59.string())
15048
15308
  });
15049
15309
  var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15050
15310
  frontmatter;
@@ -15054,7 +15314,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15054
15314
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
15055
15315
  if (!result.success) {
15056
15316
  throw new Error(
15057
- `Invalid frontmatter in ${join101(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15317
+ `Invalid frontmatter in ${join102(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15058
15318
  );
15059
15319
  }
15060
15320
  }
@@ -15066,7 +15326,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15066
15326
  }
15067
15327
  static getSettablePaths(_options = {}) {
15068
15328
  return {
15069
- relativeDirPath: join101(".cursor", "agents")
15329
+ relativeDirPath: join102(".cursor", "agents")
15070
15330
  };
15071
15331
  }
15072
15332
  getFrontmatter() {
@@ -15133,7 +15393,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15133
15393
  return {
15134
15394
  success: false,
15135
15395
  error: new Error(
15136
- `Invalid frontmatter in ${join101(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15396
+ `Invalid frontmatter in ${join102(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15137
15397
  )
15138
15398
  };
15139
15399
  }
@@ -15151,7 +15411,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15151
15411
  global = false
15152
15412
  }) {
15153
15413
  const paths = this.getSettablePaths({ global });
15154
- const filePath = join101(baseDir, paths.relativeDirPath, relativeFilePath);
15414
+ const filePath = join102(baseDir, paths.relativeDirPath, relativeFilePath);
15155
15415
  const fileContent = await readFileContent(filePath);
15156
15416
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15157
15417
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15187,12 +15447,12 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15187
15447
  };
15188
15448
 
15189
15449
  // src/features/subagents/deepagents-subagent.ts
15190
- import { join as join102 } from "path";
15191
- import { z as z59 } from "zod/mini";
15192
- var DeepagentsSubagentFrontmatterSchema = z59.looseObject({
15193
- name: z59.string(),
15194
- description: z59.optional(z59.string()),
15195
- model: z59.optional(z59.string())
15450
+ import { join as join103 } from "path";
15451
+ import { z as z60 } from "zod/mini";
15452
+ var DeepagentsSubagentFrontmatterSchema = z60.looseObject({
15453
+ name: z60.string(),
15454
+ description: z60.optional(z60.string()),
15455
+ model: z60.optional(z60.string())
15196
15456
  });
15197
15457
  var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15198
15458
  frontmatter;
@@ -15202,7 +15462,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15202
15462
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
15203
15463
  if (!result.success) {
15204
15464
  throw new Error(
15205
- `Invalid frontmatter in ${join102(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15465
+ `Invalid frontmatter in ${join103(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15206
15466
  );
15207
15467
  }
15208
15468
  }
@@ -15212,7 +15472,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15212
15472
  }
15213
15473
  static getSettablePaths(_options = {}) {
15214
15474
  return {
15215
- relativeDirPath: join102(".deepagents", "agents")
15475
+ relativeDirPath: join103(".deepagents", "agents")
15216
15476
  };
15217
15477
  }
15218
15478
  getFrontmatter() {
@@ -15287,7 +15547,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15287
15547
  return {
15288
15548
  success: false,
15289
15549
  error: new Error(
15290
- `Invalid frontmatter in ${join102(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15550
+ `Invalid frontmatter in ${join103(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15291
15551
  )
15292
15552
  };
15293
15553
  }
@@ -15305,7 +15565,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15305
15565
  global = false
15306
15566
  }) {
15307
15567
  const paths = this.getSettablePaths({ global });
15308
- const filePath = join102(baseDir, paths.relativeDirPath, relativeFilePath);
15568
+ const filePath = join103(baseDir, paths.relativeDirPath, relativeFilePath);
15309
15569
  const fileContent = await readFileContent(filePath);
15310
15570
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15311
15571
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15340,11 +15600,11 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15340
15600
  };
15341
15601
 
15342
15602
  // src/features/subagents/junie-subagent.ts
15343
- import { join as join103 } from "path";
15344
- import { z as z60 } from "zod/mini";
15345
- var JunieSubagentFrontmatterSchema = z60.looseObject({
15346
- name: z60.optional(z60.string()),
15347
- description: z60.string()
15603
+ import { join as join104 } from "path";
15604
+ import { z as z61 } from "zod/mini";
15605
+ var JunieSubagentFrontmatterSchema = z61.looseObject({
15606
+ name: z61.optional(z61.string()),
15607
+ description: z61.string()
15348
15608
  });
15349
15609
  var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15350
15610
  frontmatter;
@@ -15354,7 +15614,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15354
15614
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
15355
15615
  if (!result.success) {
15356
15616
  throw new Error(
15357
- `Invalid frontmatter in ${join103(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15617
+ `Invalid frontmatter in ${join104(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15358
15618
  );
15359
15619
  }
15360
15620
  }
@@ -15369,7 +15629,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15369
15629
  throw new Error("JunieSubagent does not support global mode.");
15370
15630
  }
15371
15631
  return {
15372
- relativeDirPath: join103(".junie", "agents")
15632
+ relativeDirPath: join104(".junie", "agents")
15373
15633
  };
15374
15634
  }
15375
15635
  getFrontmatter() {
@@ -15445,7 +15705,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15445
15705
  return {
15446
15706
  success: false,
15447
15707
  error: new Error(
15448
- `Invalid frontmatter in ${join103(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15708
+ `Invalid frontmatter in ${join104(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15449
15709
  )
15450
15710
  };
15451
15711
  }
@@ -15463,7 +15723,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15463
15723
  global = false
15464
15724
  }) {
15465
15725
  const paths = this.getSettablePaths({ global });
15466
- const filePath = join103(baseDir, paths.relativeDirPath, relativeFilePath);
15726
+ const filePath = join104(baseDir, paths.relativeDirPath, relativeFilePath);
15467
15727
  const fileContent = await readFileContent(filePath);
15468
15728
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15469
15729
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15498,15 +15758,15 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15498
15758
  };
15499
15759
 
15500
15760
  // src/features/subagents/kilo-subagent.ts
15501
- import { join as join105 } from "path";
15761
+ import { join as join106 } from "path";
15502
15762
 
15503
15763
  // src/features/subagents/opencode-style-subagent.ts
15504
- import { basename as basename8, join as join104 } from "path";
15505
- import { z as z61 } from "zod/mini";
15506
- var OpenCodeStyleSubagentFrontmatterSchema = z61.looseObject({
15507
- description: z61.optional(z61.string()),
15508
- mode: z61._default(z61.string(), "subagent"),
15509
- name: z61.optional(z61.string())
15764
+ import { basename as basename8, join as join105 } from "path";
15765
+ import { z as z62 } from "zod/mini";
15766
+ var OpenCodeStyleSubagentFrontmatterSchema = z62.looseObject({
15767
+ description: z62.optional(z62.string()),
15768
+ mode: z62._default(z62.string(), "subagent"),
15769
+ name: z62.optional(z62.string())
15510
15770
  });
15511
15771
  var OpenCodeStyleSubagent = class extends ToolSubagent {
15512
15772
  frontmatter;
@@ -15516,7 +15776,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
15516
15776
  const result = OpenCodeStyleSubagentFrontmatterSchema.safeParse(frontmatter);
15517
15777
  if (!result.success) {
15518
15778
  throw new Error(
15519
- `Invalid frontmatter in ${join104(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15779
+ `Invalid frontmatter in ${join105(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15520
15780
  );
15521
15781
  }
15522
15782
  }
@@ -15558,7 +15818,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
15558
15818
  return {
15559
15819
  success: false,
15560
15820
  error: new Error(
15561
- `Invalid frontmatter in ${join104(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15821
+ `Invalid frontmatter in ${join105(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15562
15822
  )
15563
15823
  };
15564
15824
  }
@@ -15574,7 +15834,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15574
15834
  global = false
15575
15835
  } = {}) {
15576
15836
  return {
15577
- relativeDirPath: global ? join105(".config", "kilo", "agent") : join105(".kilo", "agent")
15837
+ relativeDirPath: global ? join106(".config", "kilo", "agent") : join106(".kilo", "agent")
15578
15838
  };
15579
15839
  }
15580
15840
  static fromRulesyncSubagent({
@@ -15618,7 +15878,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15618
15878
  global = false
15619
15879
  }) {
15620
15880
  const paths = this.getSettablePaths({ global });
15621
- const filePath = join105(baseDir, paths.relativeDirPath, relativeFilePath);
15881
+ const filePath = join106(baseDir, paths.relativeDirPath, relativeFilePath);
15622
15882
  const fileContent = await readFileContent(filePath);
15623
15883
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15624
15884
  const result = KiloSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15654,23 +15914,23 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15654
15914
  };
15655
15915
 
15656
15916
  // src/features/subagents/kiro-subagent.ts
15657
- import { join as join106 } from "path";
15658
- import { z as z62 } from "zod/mini";
15659
- var KiroCliSubagentJsonSchema = z62.looseObject({
15660
- name: z62.string(),
15661
- description: z62.optional(z62.nullable(z62.string())),
15662
- prompt: z62.optional(z62.nullable(z62.string())),
15663
- tools: z62.optional(z62.nullable(z62.array(z62.string()))),
15664
- toolAliases: z62.optional(z62.nullable(z62.record(z62.string(), z62.string()))),
15665
- toolSettings: z62.optional(z62.nullable(z62.unknown())),
15666
- toolSchema: z62.optional(z62.nullable(z62.unknown())),
15667
- hooks: z62.optional(z62.nullable(z62.record(z62.string(), z62.array(z62.unknown())))),
15668
- model: z62.optional(z62.nullable(z62.string())),
15669
- mcpServers: z62.optional(z62.nullable(z62.record(z62.string(), z62.unknown()))),
15670
- useLegacyMcpJson: z62.optional(z62.nullable(z62.boolean())),
15671
- resources: z62.optional(z62.nullable(z62.array(z62.string()))),
15672
- allowedTools: z62.optional(z62.nullable(z62.array(z62.string()))),
15673
- includeMcpJson: z62.optional(z62.nullable(z62.boolean()))
15917
+ import { join as join107 } from "path";
15918
+ import { z as z63 } from "zod/mini";
15919
+ var KiroCliSubagentJsonSchema = z63.looseObject({
15920
+ name: z63.string(),
15921
+ description: z63.optional(z63.nullable(z63.string())),
15922
+ prompt: z63.optional(z63.nullable(z63.string())),
15923
+ tools: z63.optional(z63.nullable(z63.array(z63.string()))),
15924
+ toolAliases: z63.optional(z63.nullable(z63.record(z63.string(), z63.string()))),
15925
+ toolSettings: z63.optional(z63.nullable(z63.unknown())),
15926
+ toolSchema: z63.optional(z63.nullable(z63.unknown())),
15927
+ hooks: z63.optional(z63.nullable(z63.record(z63.string(), z63.array(z63.unknown())))),
15928
+ model: z63.optional(z63.nullable(z63.string())),
15929
+ mcpServers: z63.optional(z63.nullable(z63.record(z63.string(), z63.unknown()))),
15930
+ useLegacyMcpJson: z63.optional(z63.nullable(z63.boolean())),
15931
+ resources: z63.optional(z63.nullable(z63.array(z63.string()))),
15932
+ allowedTools: z63.optional(z63.nullable(z63.array(z63.string()))),
15933
+ includeMcpJson: z63.optional(z63.nullable(z63.boolean()))
15674
15934
  });
15675
15935
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15676
15936
  body;
@@ -15681,7 +15941,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15681
15941
  KiroCliSubagentJsonSchema.parse(parsed);
15682
15942
  } catch (error) {
15683
15943
  throw new Error(
15684
- `Invalid JSON in ${join106(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15944
+ `Invalid JSON in ${join107(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15685
15945
  { cause: error }
15686
15946
  );
15687
15947
  }
@@ -15693,7 +15953,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15693
15953
  }
15694
15954
  static getSettablePaths(_options = {}) {
15695
15955
  return {
15696
- relativeDirPath: join106(".kiro", "agents")
15956
+ relativeDirPath: join107(".kiro", "agents")
15697
15957
  };
15698
15958
  }
15699
15959
  getBody() {
@@ -15705,7 +15965,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15705
15965
  parsed = JSON.parse(this.body);
15706
15966
  } catch (error) {
15707
15967
  throw new Error(
15708
- `Failed to parse JSON in ${join106(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15968
+ `Failed to parse JSON in ${join107(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15709
15969
  { cause: error }
15710
15970
  );
15711
15971
  }
@@ -15786,7 +16046,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15786
16046
  global = false
15787
16047
  }) {
15788
16048
  const paths = this.getSettablePaths({ global });
15789
- const filePath = join106(baseDir, paths.relativeDirPath, relativeFilePath);
16049
+ const filePath = join107(baseDir, paths.relativeDirPath, relativeFilePath);
15790
16050
  const fileContent = await readFileContent(filePath);
15791
16051
  const subagent = new _KiroSubagent({
15792
16052
  baseDir,
@@ -15824,7 +16084,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15824
16084
  };
15825
16085
 
15826
16086
  // src/features/subagents/opencode-subagent.ts
15827
- import { join as join107 } from "path";
16087
+ import { join as join108 } from "path";
15828
16088
  var OpenCodeSubagentFrontmatterSchema = OpenCodeStyleSubagentFrontmatterSchema;
15829
16089
  var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
15830
16090
  getToolTarget() {
@@ -15834,7 +16094,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
15834
16094
  global = false
15835
16095
  } = {}) {
15836
16096
  return {
15837
- relativeDirPath: global ? join107(".config", "opencode", "agent") : join107(".opencode", "agent")
16097
+ relativeDirPath: global ? join108(".config", "opencode", "agent") : join108(".opencode", "agent")
15838
16098
  };
15839
16099
  }
15840
16100
  static fromRulesyncSubagent({
@@ -15878,7 +16138,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
15878
16138
  global = false
15879
16139
  }) {
15880
16140
  const paths = this.getSettablePaths({ global });
15881
- const filePath = join107(baseDir, paths.relativeDirPath, relativeFilePath);
16141
+ const filePath = join108(baseDir, paths.relativeDirPath, relativeFilePath);
15882
16142
  const fileContent = await readFileContent(filePath);
15883
16143
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15884
16144
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15931,7 +16191,7 @@ var subagentsProcessorToolTargetTuple = [
15931
16191
  "roo",
15932
16192
  "rovodev"
15933
16193
  ];
15934
- var SubagentsProcessorToolTargetSchema = z63.enum(subagentsProcessorToolTargetTuple);
16194
+ var SubagentsProcessorToolTargetSchema = z64.enum(subagentsProcessorToolTargetTuple);
15935
16195
  var toolSubagentFactories = /* @__PURE__ */ new Map([
15936
16196
  [
15937
16197
  "agentsmd",
@@ -16122,7 +16382,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16122
16382
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
16123
16383
  */
16124
16384
  async loadRulesyncFiles() {
16125
- const subagentsDir = join108(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
16385
+ const subagentsDir = join109(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
16126
16386
  const dirExists = await directoryExists(subagentsDir);
16127
16387
  if (!dirExists) {
16128
16388
  this.logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -16137,7 +16397,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16137
16397
  this.logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
16138
16398
  const rulesyncSubagents = [];
16139
16399
  for (const mdFile of mdFiles) {
16140
- const filepath = join108(subagentsDir, mdFile);
16400
+ const filepath = join109(subagentsDir, mdFile);
16141
16401
  try {
16142
16402
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
16143
16403
  relativeFilePath: mdFile,
@@ -16167,7 +16427,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16167
16427
  const factory = this.getFactory(this.toolTarget);
16168
16428
  const paths = factory.class.getSettablePaths({ global: this.global });
16169
16429
  const subagentFilePaths = await findFilesByGlobs(
16170
- join108(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
16430
+ join109(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
16171
16431
  );
16172
16432
  if (forDeletion) {
16173
16433
  const toolSubagents2 = subagentFilePaths.map(
@@ -16234,49 +16494,49 @@ var SubagentsProcessor = class extends FeatureProcessor {
16234
16494
  };
16235
16495
 
16236
16496
  // src/features/rules/agentsmd-rule.ts
16237
- import { join as join111 } from "path";
16497
+ import { join as join112 } from "path";
16238
16498
 
16239
16499
  // src/features/rules/tool-rule.ts
16240
- import { join as join110 } from "path";
16500
+ import { join as join111 } from "path";
16241
16501
 
16242
16502
  // src/features/rules/rulesync-rule.ts
16243
- import { join as join109 } from "path";
16244
- import { z as z64 } from "zod/mini";
16245
- var RulesyncRuleFrontmatterSchema = z64.object({
16246
- root: z64.optional(z64.boolean()),
16247
- localRoot: z64.optional(z64.boolean()),
16248
- targets: z64._default(RulesyncTargetsSchema, ["*"]),
16249
- description: z64.optional(z64.string()),
16250
- globs: z64.optional(z64.array(z64.string())),
16251
- agentsmd: z64.optional(
16252
- z64.looseObject({
16503
+ import { join as join110 } from "path";
16504
+ import { z as z65 } from "zod/mini";
16505
+ var RulesyncRuleFrontmatterSchema = z65.object({
16506
+ root: z65.optional(z65.boolean()),
16507
+ localRoot: z65.optional(z65.boolean()),
16508
+ targets: z65._default(RulesyncTargetsSchema, ["*"]),
16509
+ description: z65.optional(z65.string()),
16510
+ globs: z65.optional(z65.array(z65.string())),
16511
+ agentsmd: z65.optional(
16512
+ z65.looseObject({
16253
16513
  // @example "path/to/subproject"
16254
- subprojectPath: z64.optional(z64.string())
16514
+ subprojectPath: z65.optional(z65.string())
16255
16515
  })
16256
16516
  ),
16257
- claudecode: z64.optional(
16258
- z64.looseObject({
16517
+ claudecode: z65.optional(
16518
+ z65.looseObject({
16259
16519
  // Glob patterns for conditional rules (takes precedence over globs)
16260
16520
  // @example ["src/**/*.ts", "tests/**/*.test.ts"]
16261
- paths: z64.optional(z64.array(z64.string()))
16521
+ paths: z65.optional(z65.array(z65.string()))
16262
16522
  })
16263
16523
  ),
16264
- cursor: z64.optional(
16265
- z64.looseObject({
16266
- alwaysApply: z64.optional(z64.boolean()),
16267
- description: z64.optional(z64.string()),
16268
- globs: z64.optional(z64.array(z64.string()))
16524
+ cursor: z65.optional(
16525
+ z65.looseObject({
16526
+ alwaysApply: z65.optional(z65.boolean()),
16527
+ description: z65.optional(z65.string()),
16528
+ globs: z65.optional(z65.array(z65.string()))
16269
16529
  })
16270
16530
  ),
16271
- copilot: z64.optional(
16272
- z64.looseObject({
16273
- excludeAgent: z64.optional(z64.union([z64.literal("code-review"), z64.literal("coding-agent")]))
16531
+ copilot: z65.optional(
16532
+ z65.looseObject({
16533
+ excludeAgent: z65.optional(z65.union([z65.literal("code-review"), z65.literal("coding-agent")]))
16274
16534
  })
16275
16535
  ),
16276
- antigravity: z64.optional(
16277
- z64.looseObject({
16278
- trigger: z64.optional(z64.string()),
16279
- globs: z64.optional(z64.array(z64.string()))
16536
+ antigravity: z65.optional(
16537
+ z65.looseObject({
16538
+ trigger: z65.optional(z65.string()),
16539
+ globs: z65.optional(z65.array(z65.string()))
16280
16540
  })
16281
16541
  )
16282
16542
  });
@@ -16287,7 +16547,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
16287
16547
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
16288
16548
  if (!parseResult.success && rest.validate !== false) {
16289
16549
  throw new Error(
16290
- `Invalid frontmatter in ${join109(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
16550
+ `Invalid frontmatter in ${join110(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
16291
16551
  );
16292
16552
  }
16293
16553
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -16322,7 +16582,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
16322
16582
  return {
16323
16583
  success: false,
16324
16584
  error: new Error(
16325
- `Invalid frontmatter in ${join109(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16585
+ `Invalid frontmatter in ${join110(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16326
16586
  )
16327
16587
  };
16328
16588
  }
@@ -16331,7 +16591,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
16331
16591
  relativeFilePath,
16332
16592
  validate = true
16333
16593
  }) {
16334
- const filePath = join109(
16594
+ const filePath = join110(
16335
16595
  process.cwd(),
16336
16596
  this.getSettablePaths().recommended.relativeDirPath,
16337
16597
  relativeFilePath
@@ -16430,7 +16690,7 @@ var ToolRule = class extends ToolFile {
16430
16690
  rulesyncRule,
16431
16691
  validate = true,
16432
16692
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
16433
- nonRootPath = { relativeDirPath: join110(".agents", "memories") }
16693
+ nonRootPath = { relativeDirPath: join111(".agents", "memories") }
16434
16694
  }) {
16435
16695
  const params = this.buildToolRuleParamsDefault({
16436
16696
  baseDir,
@@ -16441,7 +16701,7 @@ var ToolRule = class extends ToolFile {
16441
16701
  });
16442
16702
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
16443
16703
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
16444
- params.relativeDirPath = join110(rulesyncFrontmatter.agentsmd.subprojectPath);
16704
+ params.relativeDirPath = join111(rulesyncFrontmatter.agentsmd.subprojectPath);
16445
16705
  params.relativeFilePath = "AGENTS.md";
16446
16706
  }
16447
16707
  return params;
@@ -16490,7 +16750,7 @@ var ToolRule = class extends ToolFile {
16490
16750
  }
16491
16751
  };
16492
16752
  function buildToolPath(toolDir, subDir, excludeToolDir) {
16493
- return excludeToolDir ? subDir : join110(toolDir, subDir);
16753
+ return excludeToolDir ? subDir : join111(toolDir, subDir);
16494
16754
  }
16495
16755
 
16496
16756
  // src/features/rules/agentsmd-rule.ts
@@ -16519,8 +16779,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
16519
16779
  validate = true
16520
16780
  }) {
16521
16781
  const isRoot = relativeFilePath === "AGENTS.md";
16522
- const relativePath = isRoot ? "AGENTS.md" : join111(".agents", "memories", relativeFilePath);
16523
- const fileContent = await readFileContent(join111(baseDir, relativePath));
16782
+ const relativePath = isRoot ? "AGENTS.md" : join112(".agents", "memories", relativeFilePath);
16783
+ const fileContent = await readFileContent(join112(baseDir, relativePath));
16524
16784
  return new _AgentsMdRule({
16525
16785
  baseDir,
16526
16786
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -16575,21 +16835,21 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
16575
16835
  };
16576
16836
 
16577
16837
  // src/features/rules/antigravity-rule.ts
16578
- import { join as join112 } from "path";
16579
- import { z as z65 } from "zod/mini";
16580
- var AntigravityRuleFrontmatterSchema = z65.looseObject({
16581
- trigger: z65.optional(
16582
- z65.union([
16583
- z65.literal("always_on"),
16584
- z65.literal("glob"),
16585
- z65.literal("manual"),
16586
- z65.literal("model_decision"),
16587
- z65.string()
16838
+ import { join as join113 } from "path";
16839
+ import { z as z66 } from "zod/mini";
16840
+ var AntigravityRuleFrontmatterSchema = z66.looseObject({
16841
+ trigger: z66.optional(
16842
+ z66.union([
16843
+ z66.literal("always_on"),
16844
+ z66.literal("glob"),
16845
+ z66.literal("manual"),
16846
+ z66.literal("model_decision"),
16847
+ z66.string()
16588
16848
  // accepts any string for forward compatibility
16589
16849
  ])
16590
16850
  ),
16591
- globs: z65.optional(z65.string()),
16592
- description: z65.optional(z65.string())
16851
+ globs: z66.optional(z66.string()),
16852
+ description: z66.optional(z66.string())
16593
16853
  });
16594
16854
  function parseGlobsString(globs) {
16595
16855
  if (!globs) {
@@ -16734,7 +16994,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
16734
16994
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
16735
16995
  if (!result.success) {
16736
16996
  throw new Error(
16737
- `Invalid frontmatter in ${join112(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16997
+ `Invalid frontmatter in ${join113(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16738
16998
  );
16739
16999
  }
16740
17000
  }
@@ -16758,7 +17018,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
16758
17018
  relativeFilePath,
16759
17019
  validate = true
16760
17020
  }) {
16761
- const filePath = join112(
17021
+ const filePath = join113(
16762
17022
  baseDir,
16763
17023
  this.getSettablePaths().nonRoot.relativeDirPath,
16764
17024
  relativeFilePath
@@ -16898,7 +17158,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
16898
17158
  };
16899
17159
 
16900
17160
  // src/features/rules/augmentcode-legacy-rule.ts
16901
- import { join as join113 } from "path";
17161
+ import { join as join114 } from "path";
16902
17162
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
16903
17163
  toRulesyncRule() {
16904
17164
  const rulesyncFrontmatter = {
@@ -16958,8 +17218,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
16958
17218
  }) {
16959
17219
  const settablePaths = this.getSettablePaths();
16960
17220
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
16961
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : join113(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
16962
- const fileContent = await readFileContent(join113(baseDir, relativePath));
17221
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : join114(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
17222
+ const fileContent = await readFileContent(join114(baseDir, relativePath));
16963
17223
  return new _AugmentcodeLegacyRule({
16964
17224
  baseDir,
16965
17225
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -16988,7 +17248,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
16988
17248
  };
16989
17249
 
16990
17250
  // src/features/rules/augmentcode-rule.ts
16991
- import { join as join114 } from "path";
17251
+ import { join as join115 } from "path";
16992
17252
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
16993
17253
  toRulesyncRule() {
16994
17254
  return this.toRulesyncRuleDefault();
@@ -17019,7 +17279,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
17019
17279
  relativeFilePath,
17020
17280
  validate = true
17021
17281
  }) {
17022
- const filePath = join114(
17282
+ const filePath = join115(
17023
17283
  baseDir,
17024
17284
  this.getSettablePaths().nonRoot.relativeDirPath,
17025
17285
  relativeFilePath
@@ -17059,7 +17319,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
17059
17319
  };
17060
17320
 
17061
17321
  // src/features/rules/claudecode-legacy-rule.ts
17062
- import { join as join115 } from "path";
17322
+ import { join as join116 } from "path";
17063
17323
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17064
17324
  static getSettablePaths({
17065
17325
  global,
@@ -17101,7 +17361,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17101
17361
  if (isRoot) {
17102
17362
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
17103
17363
  const fileContent2 = await readFileContent(
17104
- join115(baseDir, rootDirPath, paths.root.relativeFilePath)
17364
+ join116(baseDir, rootDirPath, paths.root.relativeFilePath)
17105
17365
  );
17106
17366
  return new _ClaudecodeLegacyRule({
17107
17367
  baseDir,
@@ -17115,8 +17375,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17115
17375
  if (!paths.nonRoot) {
17116
17376
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17117
17377
  }
17118
- const relativePath = join115(paths.nonRoot.relativeDirPath, relativeFilePath);
17119
- const fileContent = await readFileContent(join115(baseDir, relativePath));
17378
+ const relativePath = join116(paths.nonRoot.relativeDirPath, relativeFilePath);
17379
+ const fileContent = await readFileContent(join116(baseDir, relativePath));
17120
17380
  return new _ClaudecodeLegacyRule({
17121
17381
  baseDir,
17122
17382
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17175,10 +17435,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17175
17435
  };
17176
17436
 
17177
17437
  // src/features/rules/claudecode-rule.ts
17178
- import { join as join116 } from "path";
17179
- import { z as z66 } from "zod/mini";
17180
- var ClaudecodeRuleFrontmatterSchema = z66.object({
17181
- paths: z66.optional(z66.array(z66.string()))
17438
+ import { join as join117 } from "path";
17439
+ import { z as z67 } from "zod/mini";
17440
+ var ClaudecodeRuleFrontmatterSchema = z67.object({
17441
+ paths: z67.optional(z67.array(z67.string()))
17182
17442
  });
17183
17443
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17184
17444
  frontmatter;
@@ -17216,7 +17476,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17216
17476
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
17217
17477
  if (!result.success) {
17218
17478
  throw new Error(
17219
- `Invalid frontmatter in ${join116(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17479
+ `Invalid frontmatter in ${join117(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17220
17480
  );
17221
17481
  }
17222
17482
  }
@@ -17246,7 +17506,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17246
17506
  if (isRoot) {
17247
17507
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
17248
17508
  const fileContent2 = await readFileContent(
17249
- join116(baseDir, rootDirPath, paths.root.relativeFilePath)
17509
+ join117(baseDir, rootDirPath, paths.root.relativeFilePath)
17250
17510
  );
17251
17511
  return new _ClaudecodeRule({
17252
17512
  baseDir,
@@ -17261,8 +17521,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17261
17521
  if (!paths.nonRoot) {
17262
17522
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17263
17523
  }
17264
- const relativePath = join116(paths.nonRoot.relativeDirPath, relativeFilePath);
17265
- const filePath = join116(baseDir, relativePath);
17524
+ const relativePath = join117(paths.nonRoot.relativeDirPath, relativeFilePath);
17525
+ const filePath = join117(baseDir, relativePath);
17266
17526
  const fileContent = await readFileContent(filePath);
17267
17527
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
17268
17528
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
@@ -17373,7 +17633,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17373
17633
  return {
17374
17634
  success: false,
17375
17635
  error: new Error(
17376
- `Invalid frontmatter in ${join116(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17636
+ `Invalid frontmatter in ${join117(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17377
17637
  )
17378
17638
  };
17379
17639
  }
@@ -17393,10 +17653,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17393
17653
  };
17394
17654
 
17395
17655
  // src/features/rules/cline-rule.ts
17396
- import { join as join117 } from "path";
17397
- import { z as z67 } from "zod/mini";
17398
- var ClineRuleFrontmatterSchema = z67.object({
17399
- description: z67.string()
17656
+ import { join as join118 } from "path";
17657
+ import { z as z68 } from "zod/mini";
17658
+ var ClineRuleFrontmatterSchema = z68.object({
17659
+ description: z68.string()
17400
17660
  });
17401
17661
  var ClineRule = class _ClineRule extends ToolRule {
17402
17662
  static getSettablePaths(_options = {}) {
@@ -17439,7 +17699,7 @@ var ClineRule = class _ClineRule extends ToolRule {
17439
17699
  validate = true
17440
17700
  }) {
17441
17701
  const fileContent = await readFileContent(
17442
- join117(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17702
+ join118(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17443
17703
  );
17444
17704
  return new _ClineRule({
17445
17705
  baseDir,
@@ -17465,7 +17725,7 @@ var ClineRule = class _ClineRule extends ToolRule {
17465
17725
  };
17466
17726
 
17467
17727
  // src/features/rules/codexcli-rule.ts
17468
- import { join as join118 } from "path";
17728
+ import { join as join119 } from "path";
17469
17729
  var CodexcliRule = class _CodexcliRule extends ToolRule {
17470
17730
  static getSettablePaths({
17471
17731
  global,
@@ -17500,7 +17760,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
17500
17760
  if (isRoot) {
17501
17761
  const relativePath2 = paths.root.relativeFilePath;
17502
17762
  const fileContent2 = await readFileContent(
17503
- join118(baseDir, paths.root.relativeDirPath, relativePath2)
17763
+ join119(baseDir, paths.root.relativeDirPath, relativePath2)
17504
17764
  );
17505
17765
  return new _CodexcliRule({
17506
17766
  baseDir,
@@ -17514,8 +17774,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
17514
17774
  if (!paths.nonRoot) {
17515
17775
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17516
17776
  }
17517
- const relativePath = join118(paths.nonRoot.relativeDirPath, relativeFilePath);
17518
- const fileContent = await readFileContent(join118(baseDir, relativePath));
17777
+ const relativePath = join119(paths.nonRoot.relativeDirPath, relativeFilePath);
17778
+ const fileContent = await readFileContent(join119(baseDir, relativePath));
17519
17779
  return new _CodexcliRule({
17520
17780
  baseDir,
17521
17781
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17574,12 +17834,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
17574
17834
  };
17575
17835
 
17576
17836
  // src/features/rules/copilot-rule.ts
17577
- import { join as join119 } from "path";
17578
- import { z as z68 } from "zod/mini";
17579
- var CopilotRuleFrontmatterSchema = z68.object({
17580
- description: z68.optional(z68.string()),
17581
- applyTo: z68.optional(z68.string()),
17582
- excludeAgent: z68.optional(z68.union([z68.literal("code-review"), z68.literal("coding-agent")]))
17837
+ import { join as join120 } from "path";
17838
+ import { z as z69 } from "zod/mini";
17839
+ var CopilotRuleFrontmatterSchema = z69.object({
17840
+ description: z69.optional(z69.string()),
17841
+ applyTo: z69.optional(z69.string()),
17842
+ excludeAgent: z69.optional(z69.union([z69.literal("code-review"), z69.literal("coding-agent")]))
17583
17843
  });
17584
17844
  var CopilotRule = class _CopilotRule extends ToolRule {
17585
17845
  frontmatter;
@@ -17611,7 +17871,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17611
17871
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
17612
17872
  if (!result.success) {
17613
17873
  throw new Error(
17614
- `Invalid frontmatter in ${join119(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17874
+ `Invalid frontmatter in ${join120(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17615
17875
  );
17616
17876
  }
17617
17877
  }
@@ -17701,8 +17961,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17701
17961
  const paths = this.getSettablePaths({ global });
17702
17962
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
17703
17963
  if (isRoot) {
17704
- const relativePath2 = join119(paths.root.relativeDirPath, paths.root.relativeFilePath);
17705
- const filePath2 = join119(baseDir, relativePath2);
17964
+ const relativePath2 = join120(paths.root.relativeDirPath, paths.root.relativeFilePath);
17965
+ const filePath2 = join120(baseDir, relativePath2);
17706
17966
  const fileContent2 = await readFileContent(filePath2);
17707
17967
  return new _CopilotRule({
17708
17968
  baseDir,
@@ -17717,8 +17977,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17717
17977
  if (!paths.nonRoot) {
17718
17978
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17719
17979
  }
17720
- const relativePath = join119(paths.nonRoot.relativeDirPath, relativeFilePath);
17721
- const filePath = join119(baseDir, relativePath);
17980
+ const relativePath = join120(paths.nonRoot.relativeDirPath, relativeFilePath);
17981
+ const filePath = join120(baseDir, relativePath);
17722
17982
  const fileContent = await readFileContent(filePath);
17723
17983
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
17724
17984
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
@@ -17764,7 +18024,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17764
18024
  return {
17765
18025
  success: false,
17766
18026
  error: new Error(
17767
- `Invalid frontmatter in ${join119(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18027
+ `Invalid frontmatter in ${join120(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17768
18028
  )
17769
18029
  };
17770
18030
  }
@@ -17820,12 +18080,12 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
17820
18080
  };
17821
18081
 
17822
18082
  // src/features/rules/cursor-rule.ts
17823
- import { join as join120 } from "path";
17824
- import { z as z69 } from "zod/mini";
17825
- var CursorRuleFrontmatterSchema = z69.object({
17826
- description: z69.optional(z69.string()),
17827
- globs: z69.optional(z69.string()),
17828
- alwaysApply: z69.optional(z69.boolean())
18083
+ import { join as join121 } from "path";
18084
+ import { z as z70 } from "zod/mini";
18085
+ var CursorRuleFrontmatterSchema = z70.object({
18086
+ description: z70.optional(z70.string()),
18087
+ globs: z70.optional(z70.string()),
18088
+ alwaysApply: z70.optional(z70.boolean())
17829
18089
  });
17830
18090
  var CursorRule = class _CursorRule extends ToolRule {
17831
18091
  frontmatter;
@@ -17842,7 +18102,7 @@ var CursorRule = class _CursorRule extends ToolRule {
17842
18102
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
17843
18103
  if (!result.success) {
17844
18104
  throw new Error(
17845
- `Invalid frontmatter in ${join120(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18105
+ `Invalid frontmatter in ${join121(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17846
18106
  );
17847
18107
  }
17848
18108
  }
@@ -17958,7 +18218,7 @@ var CursorRule = class _CursorRule extends ToolRule {
17958
18218
  relativeFilePath,
17959
18219
  validate = true
17960
18220
  }) {
17961
- const filePath = join120(
18221
+ const filePath = join121(
17962
18222
  baseDir,
17963
18223
  this.getSettablePaths().nonRoot.relativeDirPath,
17964
18224
  relativeFilePath
@@ -17968,7 +18228,7 @@ var CursorRule = class _CursorRule extends ToolRule {
17968
18228
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
17969
18229
  if (!result.success) {
17970
18230
  throw new Error(
17971
- `Invalid frontmatter in ${join120(baseDir, relativeFilePath)}: ${formatError(result.error)}`
18231
+ `Invalid frontmatter in ${join121(baseDir, relativeFilePath)}: ${formatError(result.error)}`
17972
18232
  );
17973
18233
  }
17974
18234
  return new _CursorRule({
@@ -18005,7 +18265,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18005
18265
  return {
18006
18266
  success: false,
18007
18267
  error: new Error(
18008
- `Invalid frontmatter in ${join120(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18268
+ `Invalid frontmatter in ${join121(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18009
18269
  )
18010
18270
  };
18011
18271
  }
@@ -18025,7 +18285,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18025
18285
  };
18026
18286
 
18027
18287
  // src/features/rules/deepagents-rule.ts
18028
- import { join as join121 } from "path";
18288
+ import { join as join122 } from "path";
18029
18289
  var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18030
18290
  constructor({ fileContent, root, ...rest }) {
18031
18291
  super({
@@ -18052,8 +18312,8 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18052
18312
  }) {
18053
18313
  const settablePaths = this.getSettablePaths();
18054
18314
  const isRoot = relativeFilePath === "AGENTS.md";
18055
- const relativePath = isRoot ? join121(".deepagents", "AGENTS.md") : join121(".deepagents", "memories", relativeFilePath);
18056
- const fileContent = await readFileContent(join121(baseDir, relativePath));
18315
+ const relativePath = isRoot ? join122(".deepagents", "AGENTS.md") : join122(".deepagents", "memories", relativeFilePath);
18316
+ const fileContent = await readFileContent(join122(baseDir, relativePath));
18057
18317
  return new _DeepagentsRule({
18058
18318
  baseDir,
18059
18319
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -18108,7 +18368,7 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18108
18368
  };
18109
18369
 
18110
18370
  // src/features/rules/factorydroid-rule.ts
18111
- import { join as join122 } from "path";
18371
+ import { join as join123 } from "path";
18112
18372
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18113
18373
  constructor({ fileContent, root, ...rest }) {
18114
18374
  super({
@@ -18148,8 +18408,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18148
18408
  const paths = this.getSettablePaths({ global });
18149
18409
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
18150
18410
  if (isRoot) {
18151
- const relativePath2 = join122(paths.root.relativeDirPath, paths.root.relativeFilePath);
18152
- const fileContent2 = await readFileContent(join122(baseDir, relativePath2));
18411
+ const relativePath2 = join123(paths.root.relativeDirPath, paths.root.relativeFilePath);
18412
+ const fileContent2 = await readFileContent(join123(baseDir, relativePath2));
18153
18413
  return new _FactorydroidRule({
18154
18414
  baseDir,
18155
18415
  relativeDirPath: paths.root.relativeDirPath,
@@ -18162,8 +18422,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18162
18422
  if (!paths.nonRoot) {
18163
18423
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18164
18424
  }
18165
- const relativePath = join122(paths.nonRoot.relativeDirPath, relativeFilePath);
18166
- const fileContent = await readFileContent(join122(baseDir, relativePath));
18425
+ const relativePath = join123(paths.nonRoot.relativeDirPath, relativeFilePath);
18426
+ const fileContent = await readFileContent(join123(baseDir, relativePath));
18167
18427
  return new _FactorydroidRule({
18168
18428
  baseDir,
18169
18429
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18222,7 +18482,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18222
18482
  };
18223
18483
 
18224
18484
  // src/features/rules/geminicli-rule.ts
18225
- import { join as join123 } from "path";
18485
+ import { join as join124 } from "path";
18226
18486
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18227
18487
  static getSettablePaths({
18228
18488
  global,
@@ -18257,7 +18517,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18257
18517
  if (isRoot) {
18258
18518
  const relativePath2 = paths.root.relativeFilePath;
18259
18519
  const fileContent2 = await readFileContent(
18260
- join123(baseDir, paths.root.relativeDirPath, relativePath2)
18520
+ join124(baseDir, paths.root.relativeDirPath, relativePath2)
18261
18521
  );
18262
18522
  return new _GeminiCliRule({
18263
18523
  baseDir,
@@ -18271,8 +18531,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18271
18531
  if (!paths.nonRoot) {
18272
18532
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18273
18533
  }
18274
- const relativePath = join123(paths.nonRoot.relativeDirPath, relativeFilePath);
18275
- const fileContent = await readFileContent(join123(baseDir, relativePath));
18534
+ const relativePath = join124(paths.nonRoot.relativeDirPath, relativeFilePath);
18535
+ const fileContent = await readFileContent(join124(baseDir, relativePath));
18276
18536
  return new _GeminiCliRule({
18277
18537
  baseDir,
18278
18538
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18331,7 +18591,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18331
18591
  };
18332
18592
 
18333
18593
  // src/features/rules/goose-rule.ts
18334
- import { join as join124 } from "path";
18594
+ import { join as join125 } from "path";
18335
18595
  var GooseRule = class _GooseRule extends ToolRule {
18336
18596
  static getSettablePaths({
18337
18597
  global,
@@ -18366,7 +18626,7 @@ var GooseRule = class _GooseRule extends ToolRule {
18366
18626
  if (isRoot) {
18367
18627
  const relativePath2 = paths.root.relativeFilePath;
18368
18628
  const fileContent2 = await readFileContent(
18369
- join124(baseDir, paths.root.relativeDirPath, relativePath2)
18629
+ join125(baseDir, paths.root.relativeDirPath, relativePath2)
18370
18630
  );
18371
18631
  return new _GooseRule({
18372
18632
  baseDir,
@@ -18380,8 +18640,8 @@ var GooseRule = class _GooseRule extends ToolRule {
18380
18640
  if (!paths.nonRoot) {
18381
18641
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18382
18642
  }
18383
- const relativePath = join124(paths.nonRoot.relativeDirPath, relativeFilePath);
18384
- const fileContent = await readFileContent(join124(baseDir, relativePath));
18643
+ const relativePath = join125(paths.nonRoot.relativeDirPath, relativeFilePath);
18644
+ const fileContent = await readFileContent(join125(baseDir, relativePath));
18385
18645
  return new _GooseRule({
18386
18646
  baseDir,
18387
18647
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18440,7 +18700,7 @@ var GooseRule = class _GooseRule extends ToolRule {
18440
18700
  };
18441
18701
 
18442
18702
  // src/features/rules/junie-rule.ts
18443
- import { join as join125 } from "path";
18703
+ import { join as join126 } from "path";
18444
18704
  var JunieRule = class _JunieRule extends ToolRule {
18445
18705
  static getSettablePaths(_options = {}) {
18446
18706
  return {
@@ -18469,8 +18729,8 @@ var JunieRule = class _JunieRule extends ToolRule {
18469
18729
  }) {
18470
18730
  const isRoot = _JunieRule.isRootRelativeFilePath(relativeFilePath);
18471
18731
  const settablePaths = this.getSettablePaths();
18472
- const relativePath = isRoot ? join125(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : join125(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
18473
- const fileContent = await readFileContent(join125(baseDir, relativePath));
18732
+ const relativePath = isRoot ? join126(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : join126(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
18733
+ const fileContent = await readFileContent(join126(baseDir, relativePath));
18474
18734
  return new _JunieRule({
18475
18735
  baseDir,
18476
18736
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -18525,7 +18785,7 @@ var JunieRule = class _JunieRule extends ToolRule {
18525
18785
  };
18526
18786
 
18527
18787
  // src/features/rules/kilo-rule.ts
18528
- import { join as join126 } from "path";
18788
+ import { join as join127 } from "path";
18529
18789
  var KiloRule = class _KiloRule extends ToolRule {
18530
18790
  static getSettablePaths({
18531
18791
  global,
@@ -18560,7 +18820,7 @@ var KiloRule = class _KiloRule extends ToolRule {
18560
18820
  if (isRoot) {
18561
18821
  const relativePath2 = paths.root.relativeFilePath;
18562
18822
  const fileContent2 = await readFileContent(
18563
- join126(baseDir, paths.root.relativeDirPath, relativePath2)
18823
+ join127(baseDir, paths.root.relativeDirPath, relativePath2)
18564
18824
  );
18565
18825
  return new _KiloRule({
18566
18826
  baseDir,
@@ -18574,8 +18834,8 @@ var KiloRule = class _KiloRule extends ToolRule {
18574
18834
  if (!paths.nonRoot) {
18575
18835
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18576
18836
  }
18577
- const relativePath = join126(paths.nonRoot.relativeDirPath, relativeFilePath);
18578
- const fileContent = await readFileContent(join126(baseDir, relativePath));
18837
+ const relativePath = join127(paths.nonRoot.relativeDirPath, relativeFilePath);
18838
+ const fileContent = await readFileContent(join127(baseDir, relativePath));
18579
18839
  return new _KiloRule({
18580
18840
  baseDir,
18581
18841
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18634,7 +18894,7 @@ var KiloRule = class _KiloRule extends ToolRule {
18634
18894
  };
18635
18895
 
18636
18896
  // src/features/rules/kiro-rule.ts
18637
- import { join as join127 } from "path";
18897
+ import { join as join128 } from "path";
18638
18898
  var KiroRule = class _KiroRule extends ToolRule {
18639
18899
  static getSettablePaths(_options = {}) {
18640
18900
  return {
@@ -18649,7 +18909,7 @@ var KiroRule = class _KiroRule extends ToolRule {
18649
18909
  validate = true
18650
18910
  }) {
18651
18911
  const fileContent = await readFileContent(
18652
- join127(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18912
+ join128(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18653
18913
  );
18654
18914
  return new _KiroRule({
18655
18915
  baseDir,
@@ -18703,7 +18963,7 @@ var KiroRule = class _KiroRule extends ToolRule {
18703
18963
  };
18704
18964
 
18705
18965
  // src/features/rules/opencode-rule.ts
18706
- import { join as join128 } from "path";
18966
+ import { join as join129 } from "path";
18707
18967
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18708
18968
  static getSettablePaths({
18709
18969
  global,
@@ -18738,7 +18998,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18738
18998
  if (isRoot) {
18739
18999
  const relativePath2 = paths.root.relativeFilePath;
18740
19000
  const fileContent2 = await readFileContent(
18741
- join128(baseDir, paths.root.relativeDirPath, relativePath2)
19001
+ join129(baseDir, paths.root.relativeDirPath, relativePath2)
18742
19002
  );
18743
19003
  return new _OpenCodeRule({
18744
19004
  baseDir,
@@ -18752,8 +19012,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18752
19012
  if (!paths.nonRoot) {
18753
19013
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18754
19014
  }
18755
- const relativePath = join128(paths.nonRoot.relativeDirPath, relativeFilePath);
18756
- const fileContent = await readFileContent(join128(baseDir, relativePath));
19015
+ const relativePath = join129(paths.nonRoot.relativeDirPath, relativeFilePath);
19016
+ const fileContent = await readFileContent(join129(baseDir, relativePath));
18757
19017
  return new _OpenCodeRule({
18758
19018
  baseDir,
18759
19019
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18812,7 +19072,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18812
19072
  };
18813
19073
 
18814
19074
  // src/features/rules/qwencode-rule.ts
18815
- import { join as join129 } from "path";
19075
+ import { join as join130 } from "path";
18816
19076
  var QwencodeRule = class _QwencodeRule extends ToolRule {
18817
19077
  static getSettablePaths(_options = {}) {
18818
19078
  return {
@@ -18831,8 +19091,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
18831
19091
  validate = true
18832
19092
  }) {
18833
19093
  const isRoot = relativeFilePath === "QWEN.md";
18834
- const relativePath = isRoot ? "QWEN.md" : join129(".qwen", "memories", relativeFilePath);
18835
- const fileContent = await readFileContent(join129(baseDir, relativePath));
19094
+ const relativePath = isRoot ? "QWEN.md" : join130(".qwen", "memories", relativeFilePath);
19095
+ const fileContent = await readFileContent(join130(baseDir, relativePath));
18836
19096
  return new _QwencodeRule({
18837
19097
  baseDir,
18838
19098
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -18884,7 +19144,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
18884
19144
  };
18885
19145
 
18886
19146
  // src/features/rules/replit-rule.ts
18887
- import { join as join130 } from "path";
19147
+ import { join as join131 } from "path";
18888
19148
  var ReplitRule = class _ReplitRule extends ToolRule {
18889
19149
  static getSettablePaths(_options = {}) {
18890
19150
  return {
@@ -18906,7 +19166,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
18906
19166
  }
18907
19167
  const relativePath = paths.root.relativeFilePath;
18908
19168
  const fileContent = await readFileContent(
18909
- join130(baseDir, paths.root.relativeDirPath, relativePath)
19169
+ join131(baseDir, paths.root.relativeDirPath, relativePath)
18910
19170
  );
18911
19171
  return new _ReplitRule({
18912
19172
  baseDir,
@@ -18972,7 +19232,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
18972
19232
  };
18973
19233
 
18974
19234
  // src/features/rules/roo-rule.ts
18975
- import { join as join131 } from "path";
19235
+ import { join as join132 } from "path";
18976
19236
  var RooRule = class _RooRule extends ToolRule {
18977
19237
  static getSettablePaths(_options = {}) {
18978
19238
  return {
@@ -18987,7 +19247,7 @@ var RooRule = class _RooRule extends ToolRule {
18987
19247
  validate = true
18988
19248
  }) {
18989
19249
  const fileContent = await readFileContent(
18990
- join131(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19250
+ join132(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18991
19251
  );
18992
19252
  return new _RooRule({
18993
19253
  baseDir,
@@ -19056,7 +19316,7 @@ var RooRule = class _RooRule extends ToolRule {
19056
19316
  };
19057
19317
 
19058
19318
  // src/features/rules/rovodev-rule.ts
19059
- import { join as join132 } from "path";
19319
+ import { join as join133 } from "path";
19060
19320
  var DISALLOWED_ROVODEV_MODULAR_RULE_BASENAMES = /* @__PURE__ */ new Set(["agents.md", "agents.local.md"]);
19061
19321
  var RovodevRule = class _RovodevRule extends ToolRule {
19062
19322
  /**
@@ -19100,7 +19360,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19100
19360
  root: rovodevAgents,
19101
19361
  alternativeRoots: [{ relativeDirPath: ".", relativeFilePath: "AGENTS.md" }],
19102
19362
  nonRoot: {
19103
- relativeDirPath: join132(".rovodev", ".rulesync", "modular-rules")
19363
+ relativeDirPath: join133(".rovodev", ".rulesync", "modular-rules")
19104
19364
  }
19105
19365
  };
19106
19366
  }
@@ -19139,10 +19399,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19139
19399
  }) {
19140
19400
  if (!this.isAllowedModularRulesRelativePath(relativeFilePath)) {
19141
19401
  throw new Error(
19142
- `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${join132(relativeDirPath, relativeFilePath)}`
19402
+ `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${join133(relativeDirPath, relativeFilePath)}`
19143
19403
  );
19144
19404
  }
19145
- const fileContent = await readFileContent(join132(baseDir, relativeDirPath, relativeFilePath));
19405
+ const fileContent = await readFileContent(join133(baseDir, relativeDirPath, relativeFilePath));
19146
19406
  return new _RovodevRule({
19147
19407
  baseDir,
19148
19408
  relativeDirPath,
@@ -19162,10 +19422,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19162
19422
  paths
19163
19423
  }) {
19164
19424
  const relativeDirPath = overrideDirPath ?? paths.root.relativeDirPath;
19165
- 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);
19425
+ const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${join133(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : join133(paths.root.relativeDirPath, paths.root.relativeFilePath);
19166
19426
  if (relativeFilePath !== "AGENTS.md") {
19167
19427
  throw new Error(
19168
- `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${join132(relativeDirPath, relativeFilePath)}`
19428
+ `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${join133(relativeDirPath, relativeFilePath)}`
19169
19429
  );
19170
19430
  }
19171
19431
  const allowed = relativeDirPath === paths.root.relativeDirPath || "alternativeRoots" in paths && paths.alternativeRoots?.some(
@@ -19173,10 +19433,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19173
19433
  );
19174
19434
  if (!allowed) {
19175
19435
  throw new Error(
19176
- `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${join132(relativeDirPath, relativeFilePath)}`
19436
+ `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${join133(relativeDirPath, relativeFilePath)}`
19177
19437
  );
19178
19438
  }
19179
- const fileContent = await readFileContent(join132(baseDir, relativeDirPath, relativeFilePath));
19439
+ const fileContent = await readFileContent(join133(baseDir, relativeDirPath, relativeFilePath));
19180
19440
  return new _RovodevRule({
19181
19441
  baseDir,
19182
19442
  relativeDirPath,
@@ -19290,7 +19550,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19290
19550
  };
19291
19551
 
19292
19552
  // src/features/rules/warp-rule.ts
19293
- import { join as join133 } from "path";
19553
+ import { join as join134 } from "path";
19294
19554
  var WarpRule = class _WarpRule extends ToolRule {
19295
19555
  constructor({ fileContent, root, ...rest }) {
19296
19556
  super({
@@ -19316,8 +19576,8 @@ var WarpRule = class _WarpRule extends ToolRule {
19316
19576
  validate = true
19317
19577
  }) {
19318
19578
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
19319
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join133(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
19320
- const fileContent = await readFileContent(join133(baseDir, relativePath));
19579
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join134(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
19580
+ const fileContent = await readFileContent(join134(baseDir, relativePath));
19321
19581
  return new _WarpRule({
19322
19582
  baseDir,
19323
19583
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -19372,7 +19632,7 @@ var WarpRule = class _WarpRule extends ToolRule {
19372
19632
  };
19373
19633
 
19374
19634
  // src/features/rules/windsurf-rule.ts
19375
- import { join as join134 } from "path";
19635
+ import { join as join135 } from "path";
19376
19636
  var WindsurfRule = class _WindsurfRule extends ToolRule {
19377
19637
  static getSettablePaths(_options = {}) {
19378
19638
  return {
@@ -19387,7 +19647,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
19387
19647
  validate = true
19388
19648
  }) {
19389
19649
  const fileContent = await readFileContent(
19390
- join134(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19650
+ join135(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19391
19651
  );
19392
19652
  return new _WindsurfRule({
19393
19653
  baseDir,
@@ -19485,11 +19745,11 @@ var rulesProcessorToolTargets = [
19485
19745
  "warp",
19486
19746
  "windsurf"
19487
19747
  ];
19488
- var RulesProcessorToolTargetSchema = z70.enum(rulesProcessorToolTargets);
19489
- var formatRulePaths = (rules) => rules.map((r) => join135(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
19490
- var RulesFeatureOptionsSchema = z70.looseObject({
19491
- ruleDiscoveryMode: z70.optional(z70.enum(["none", "explicit"])),
19492
- includeLocalRoot: z70.optional(z70.boolean())
19748
+ var RulesProcessorToolTargetSchema = z71.enum(rulesProcessorToolTargets);
19749
+ var formatRulePaths = (rules) => rules.map((r) => join136(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
19750
+ var RulesFeatureOptionsSchema = z71.looseObject({
19751
+ ruleDiscoveryMode: z71.optional(z71.enum(["none", "explicit"])),
19752
+ includeLocalRoot: z71.optional(z71.boolean())
19493
19753
  });
19494
19754
  var resolveRuleDiscoveryMode = ({
19495
19755
  defaultMode,
@@ -19510,8 +19770,8 @@ var resolveRuleDiscoveryMode = ({
19510
19770
  }
19511
19771
  return parsed.data.ruleDiscoveryMode === "none" ? "auto" : "toon";
19512
19772
  };
19513
- var IncludeLocalRootSchema = z70.looseObject({
19514
- includeLocalRoot: z70.optional(z70.boolean())
19773
+ var IncludeLocalRootSchema = z71.looseObject({
19774
+ includeLocalRoot: z71.optional(z71.boolean())
19515
19775
  });
19516
19776
  var resolveIncludeLocalRoot = (options) => {
19517
19777
  if (!options) return true;
@@ -19954,7 +20214,7 @@ var RulesProcessor = class extends FeatureProcessor {
19954
20214
  }).relativeDirPath;
19955
20215
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
19956
20216
  const frontmatter = skill.getFrontmatter();
19957
- const relativePath = join135(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
20217
+ const relativePath = join136(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
19958
20218
  return {
19959
20219
  name: frontmatter.name,
19960
20220
  description: frontmatter.description,
@@ -20083,8 +20343,8 @@ var RulesProcessor = class extends FeatureProcessor {
20083
20343
  * Load and parse rulesync rule files from .rulesync/rules/ directory
20084
20344
  */
20085
20345
  async loadRulesyncFiles() {
20086
- const rulesyncBaseDir = join135(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
20087
- const files = await findFilesByGlobs(join135(rulesyncBaseDir, "**", "*.md"));
20346
+ const rulesyncBaseDir = join136(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
20347
+ const files = await findFilesByGlobs(join136(rulesyncBaseDir, "**", "*.md"));
20088
20348
  this.logger.debug(`Found ${files.length} rulesync files`);
20089
20349
  const rulesyncRules = await Promise.all(
20090
20350
  files.map((file) => {
@@ -20199,13 +20459,13 @@ var RulesProcessor = class extends FeatureProcessor {
20199
20459
  return [];
20200
20460
  }
20201
20461
  const uniqueRootFilePaths = await findFilesWithFallback(
20202
- join135(
20462
+ join136(
20203
20463
  this.baseDir,
20204
20464
  settablePaths.root.relativeDirPath ?? ".",
20205
20465
  settablePaths.root.relativeFilePath
20206
20466
  ),
20207
20467
  settablePaths.alternativeRoots,
20208
- (alt) => join135(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
20468
+ (alt) => join136(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
20209
20469
  );
20210
20470
  if (forDeletion) {
20211
20471
  return buildDeletionRulesFromPaths(uniqueRootFilePaths);
@@ -20236,7 +20496,7 @@ var RulesProcessor = class extends FeatureProcessor {
20236
20496
  return [];
20237
20497
  }
20238
20498
  const uniqueLocalRootFilePaths2 = await findFilesByGlobs(
20239
- join135(this.baseDir, "AGENTS.local.md")
20499
+ join136(this.baseDir, "AGENTS.local.md")
20240
20500
  );
20241
20501
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths2);
20242
20502
  }
@@ -20247,9 +20507,9 @@ var RulesProcessor = class extends FeatureProcessor {
20247
20507
  return [];
20248
20508
  }
20249
20509
  const uniqueLocalRootFilePaths = await findFilesWithFallback(
20250
- join135(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
20510
+ join136(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
20251
20511
  settablePaths.alternativeRoots,
20252
- (alt) => join135(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
20512
+ (alt) => join136(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
20253
20513
  );
20254
20514
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths);
20255
20515
  })();
@@ -20260,20 +20520,20 @@ var RulesProcessor = class extends FeatureProcessor {
20260
20520
  if (!forDeletion || this.toolTarget !== "rovodev" || this.global) {
20261
20521
  return [];
20262
20522
  }
20263
- const primaryPaths = await findFilesByGlobs(join135(this.baseDir, ".rovodev", "AGENTS.md"));
20523
+ const primaryPaths = await findFilesByGlobs(join136(this.baseDir, ".rovodev", "AGENTS.md"));
20264
20524
  if (primaryPaths.length === 0) {
20265
20525
  return [];
20266
20526
  }
20267
- const mirrorPaths = await findFilesByGlobs(join135(this.baseDir, "AGENTS.md"));
20527
+ const mirrorPaths = await findFilesByGlobs(join136(this.baseDir, "AGENTS.md"));
20268
20528
  return buildDeletionRulesFromPaths(mirrorPaths);
20269
20529
  })();
20270
20530
  const nonRootToolRules = await (async () => {
20271
20531
  if (!settablePaths.nonRoot) {
20272
20532
  return [];
20273
20533
  }
20274
- const nonRootBaseDir = join135(this.baseDir, settablePaths.nonRoot.relativeDirPath);
20534
+ const nonRootBaseDir = join136(this.baseDir, settablePaths.nonRoot.relativeDirPath);
20275
20535
  const nonRootFilePaths = await findFilesByGlobs(
20276
- join135(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
20536
+ join136(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
20277
20537
  );
20278
20538
  if (forDeletion) {
20279
20539
  return buildDeletionRulesFromPaths(nonRootFilePaths, {
@@ -20287,7 +20547,7 @@ var RulesProcessor = class extends FeatureProcessor {
20287
20547
  const ok = RovodevRule.isAllowedModularRulesRelativePath(relativeFilePath);
20288
20548
  if (!ok) {
20289
20549
  this.logger.warn(
20290
- `Skipping reserved Rovodev path under modular-rules (import): ${join135(modularRootRelative, relativeFilePath)}`
20550
+ `Skipping reserved Rovodev path under modular-rules (import): ${join136(modularRootRelative, relativeFilePath)}`
20291
20551
  );
20292
20552
  }
20293
20553
  return ok;
@@ -20413,14 +20673,14 @@ s/<command> [arguments]
20413
20673
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
20414
20674
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
20415
20675
 
20416
- 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.` : "";
20676
+ When users call a custom slash command, you have to look for the markdown file, \`${join136(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
20417
20677
  const subagentsSection = subagents ? `## Simulated Subagents
20418
20678
 
20419
20679
  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.
20420
20680
 
20421
- 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.
20681
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${join136(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
20422
20682
 
20423
- 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.` : "";
20683
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join136(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
20424
20684
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
20425
20685
  const result = [
20426
20686
  overview,
@@ -20520,7 +20780,7 @@ function warnUnsupportedTargets(params) {
20520
20780
  }
20521
20781
  }
20522
20782
  async function checkRulesyncDirExists(params) {
20523
- return fileExists(join136(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
20783
+ return fileExists(join137(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
20524
20784
  }
20525
20785
  async function generate(params) {
20526
20786
  const { config, logger } = params;