rulesync 8.2.0 → 8.4.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,17 +14967,28 @@ 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
  });
14981
+ function stringifyCodexCliSubagentToml(tomlObj) {
14982
+ const { developer_instructions, ...restFields } = tomlObj;
14983
+ const restToml = smolToml5.stringify(restFields).trimEnd();
14984
+ if (developer_instructions === void 0) {
14985
+ return restToml;
14986
+ }
14987
+ const developerInstructionsToml = developer_instructions.includes("\n") ? developer_instructions.includes("'''") ? smolToml5.stringify({ developer_instructions }).trimEnd() : `developer_instructions = '''
14988
+ ${developer_instructions}
14989
+ '''` : smolToml5.stringify({ developer_instructions }).trimEnd();
14990
+ return [restToml, developerInstructionsToml].filter((value) => value.length > 0).join("\n");
14991
+ }
14721
14992
  var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14722
14993
  body;
14723
14994
  constructor({ body, ...rest }) {
@@ -14727,7 +14998,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14727
14998
  CodexCliSubagentTomlSchema.parse(parsed);
14728
14999
  } catch (error) {
14729
15000
  throw new Error(
14730
- `Invalid TOML in ${join99(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15001
+ `Invalid TOML in ${join100(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
14731
15002
  { cause: error }
14732
15003
  );
14733
15004
  }
@@ -14739,7 +15010,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14739
15010
  }
14740
15011
  static getSettablePaths(_options = {}) {
14741
15012
  return {
14742
- relativeDirPath: join99(".codex", "agents")
15013
+ relativeDirPath: join100(".codex", "agents")
14743
15014
  };
14744
15015
  }
14745
15016
  getBody() {
@@ -14751,7 +15022,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14751
15022
  parsed = CodexCliSubagentTomlSchema.parse(smolToml5.parse(this.body));
14752
15023
  } catch (error) {
14753
15024
  throw new Error(
14754
- `Failed to parse TOML in ${join99(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15025
+ `Failed to parse TOML in ${join100(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
14755
15026
  { cause: error }
14756
15027
  );
14757
15028
  }
@@ -14794,7 +15065,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14794
15065
  ...rulesyncSubagent.getBody() ? { developer_instructions: rulesyncSubagent.getBody() } : {},
14795
15066
  ...codexcliSection
14796
15067
  };
14797
- const body = smolToml5.stringify(tomlObj);
15068
+ const body = stringifyCodexCliSubagentToml(tomlObj);
14798
15069
  const paths = this.getSettablePaths({ global });
14799
15070
  const relativeFilePath = rulesyncSubagent.getRelativeFilePath().replace(/\.md$/, ".toml");
14800
15071
  return new _CodexCliSubagent({
@@ -14832,7 +15103,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14832
15103
  global = false
14833
15104
  }) {
14834
15105
  const paths = this.getSettablePaths({ global });
14835
- const filePath = join99(baseDir, paths.relativeDirPath, relativeFilePath);
15106
+ const filePath = join100(baseDir, paths.relativeDirPath, relativeFilePath);
14836
15107
  const fileContent = await readFileContent(filePath);
14837
15108
  const subagent = new _CodexCliSubagent({
14838
15109
  baseDir,
@@ -14870,13 +15141,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14870
15141
  };
14871
15142
 
14872
15143
  // src/features/subagents/copilot-subagent.ts
14873
- import { join as join100 } from "path";
14874
- import { z as z57 } from "zod/mini";
15144
+ import { join as join101 } from "path";
15145
+ import { z as z58 } from "zod/mini";
14875
15146
  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())]))
15147
+ var CopilotSubagentFrontmatterSchema = z58.looseObject({
15148
+ name: z58.string(),
15149
+ description: z58.optional(z58.string()),
15150
+ tools: z58.optional(z58.union([z58.string(), z58.array(z58.string())]))
14880
15151
  });
14881
15152
  var normalizeTools = (tools) => {
14882
15153
  if (!tools) {
@@ -14896,7 +15167,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
14896
15167
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
14897
15168
  if (!result.success) {
14898
15169
  throw new Error(
14899
- `Invalid frontmatter in ${join100(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15170
+ `Invalid frontmatter in ${join101(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14900
15171
  );
14901
15172
  }
14902
15173
  }
@@ -14908,7 +15179,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
14908
15179
  }
14909
15180
  static getSettablePaths(_options = {}) {
14910
15181
  return {
14911
- relativeDirPath: join100(".github", "agents")
15182
+ relativeDirPath: join101(".github", "agents")
14912
15183
  };
14913
15184
  }
14914
15185
  getFrontmatter() {
@@ -14986,7 +15257,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
14986
15257
  return {
14987
15258
  success: false,
14988
15259
  error: new Error(
14989
- `Invalid frontmatter in ${join100(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15260
+ `Invalid frontmatter in ${join101(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14990
15261
  )
14991
15262
  };
14992
15263
  }
@@ -15004,7 +15275,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15004
15275
  global = false
15005
15276
  }) {
15006
15277
  const paths = this.getSettablePaths({ global });
15007
- const filePath = join100(baseDir, paths.relativeDirPath, relativeFilePath);
15278
+ const filePath = join101(baseDir, paths.relativeDirPath, relativeFilePath);
15008
15279
  const fileContent = await readFileContent(filePath);
15009
15280
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15010
15281
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15040,11 +15311,11 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15040
15311
  };
15041
15312
 
15042
15313
  // 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())
15314
+ import { join as join102 } from "path";
15315
+ import { z as z59 } from "zod/mini";
15316
+ var CursorSubagentFrontmatterSchema = z59.looseObject({
15317
+ name: z59.string(),
15318
+ description: z59.optional(z59.string())
15048
15319
  });
15049
15320
  var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15050
15321
  frontmatter;
@@ -15054,7 +15325,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15054
15325
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
15055
15326
  if (!result.success) {
15056
15327
  throw new Error(
15057
- `Invalid frontmatter in ${join101(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15328
+ `Invalid frontmatter in ${join102(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15058
15329
  );
15059
15330
  }
15060
15331
  }
@@ -15066,7 +15337,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15066
15337
  }
15067
15338
  static getSettablePaths(_options = {}) {
15068
15339
  return {
15069
- relativeDirPath: join101(".cursor", "agents")
15340
+ relativeDirPath: join102(".cursor", "agents")
15070
15341
  };
15071
15342
  }
15072
15343
  getFrontmatter() {
@@ -15133,7 +15404,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15133
15404
  return {
15134
15405
  success: false,
15135
15406
  error: new Error(
15136
- `Invalid frontmatter in ${join101(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15407
+ `Invalid frontmatter in ${join102(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15137
15408
  )
15138
15409
  };
15139
15410
  }
@@ -15151,7 +15422,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15151
15422
  global = false
15152
15423
  }) {
15153
15424
  const paths = this.getSettablePaths({ global });
15154
- const filePath = join101(baseDir, paths.relativeDirPath, relativeFilePath);
15425
+ const filePath = join102(baseDir, paths.relativeDirPath, relativeFilePath);
15155
15426
  const fileContent = await readFileContent(filePath);
15156
15427
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15157
15428
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15187,12 +15458,12 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15187
15458
  };
15188
15459
 
15189
15460
  // 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())
15461
+ import { join as join103 } from "path";
15462
+ import { z as z60 } from "zod/mini";
15463
+ var DeepagentsSubagentFrontmatterSchema = z60.looseObject({
15464
+ name: z60.string(),
15465
+ description: z60.optional(z60.string()),
15466
+ model: z60.optional(z60.string())
15196
15467
  });
15197
15468
  var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15198
15469
  frontmatter;
@@ -15202,7 +15473,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15202
15473
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
15203
15474
  if (!result.success) {
15204
15475
  throw new Error(
15205
- `Invalid frontmatter in ${join102(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15476
+ `Invalid frontmatter in ${join103(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15206
15477
  );
15207
15478
  }
15208
15479
  }
@@ -15212,7 +15483,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15212
15483
  }
15213
15484
  static getSettablePaths(_options = {}) {
15214
15485
  return {
15215
- relativeDirPath: join102(".deepagents", "agents")
15486
+ relativeDirPath: join103(".deepagents", "agents")
15216
15487
  };
15217
15488
  }
15218
15489
  getFrontmatter() {
@@ -15287,7 +15558,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15287
15558
  return {
15288
15559
  success: false,
15289
15560
  error: new Error(
15290
- `Invalid frontmatter in ${join102(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15561
+ `Invalid frontmatter in ${join103(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15291
15562
  )
15292
15563
  };
15293
15564
  }
@@ -15305,7 +15576,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15305
15576
  global = false
15306
15577
  }) {
15307
15578
  const paths = this.getSettablePaths({ global });
15308
- const filePath = join102(baseDir, paths.relativeDirPath, relativeFilePath);
15579
+ const filePath = join103(baseDir, paths.relativeDirPath, relativeFilePath);
15309
15580
  const fileContent = await readFileContent(filePath);
15310
15581
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15311
15582
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15340,11 +15611,11 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15340
15611
  };
15341
15612
 
15342
15613
  // 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()
15614
+ import { join as join104 } from "path";
15615
+ import { z as z61 } from "zod/mini";
15616
+ var JunieSubagentFrontmatterSchema = z61.looseObject({
15617
+ name: z61.optional(z61.string()),
15618
+ description: z61.string()
15348
15619
  });
15349
15620
  var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15350
15621
  frontmatter;
@@ -15354,7 +15625,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15354
15625
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
15355
15626
  if (!result.success) {
15356
15627
  throw new Error(
15357
- `Invalid frontmatter in ${join103(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15628
+ `Invalid frontmatter in ${join104(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15358
15629
  );
15359
15630
  }
15360
15631
  }
@@ -15369,7 +15640,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15369
15640
  throw new Error("JunieSubagent does not support global mode.");
15370
15641
  }
15371
15642
  return {
15372
- relativeDirPath: join103(".junie", "agents")
15643
+ relativeDirPath: join104(".junie", "agents")
15373
15644
  };
15374
15645
  }
15375
15646
  getFrontmatter() {
@@ -15445,7 +15716,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15445
15716
  return {
15446
15717
  success: false,
15447
15718
  error: new Error(
15448
- `Invalid frontmatter in ${join103(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15719
+ `Invalid frontmatter in ${join104(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15449
15720
  )
15450
15721
  };
15451
15722
  }
@@ -15463,7 +15734,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15463
15734
  global = false
15464
15735
  }) {
15465
15736
  const paths = this.getSettablePaths({ global });
15466
- const filePath = join103(baseDir, paths.relativeDirPath, relativeFilePath);
15737
+ const filePath = join104(baseDir, paths.relativeDirPath, relativeFilePath);
15467
15738
  const fileContent = await readFileContent(filePath);
15468
15739
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15469
15740
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15498,15 +15769,15 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15498
15769
  };
15499
15770
 
15500
15771
  // src/features/subagents/kilo-subagent.ts
15501
- import { join as join105 } from "path";
15772
+ import { join as join106 } from "path";
15502
15773
 
15503
15774
  // 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())
15775
+ import { basename as basename8, join as join105 } from "path";
15776
+ import { z as z62 } from "zod/mini";
15777
+ var OpenCodeStyleSubagentFrontmatterSchema = z62.looseObject({
15778
+ description: z62.optional(z62.string()),
15779
+ mode: z62._default(z62.string(), "subagent"),
15780
+ name: z62.optional(z62.string())
15510
15781
  });
15511
15782
  var OpenCodeStyleSubagent = class extends ToolSubagent {
15512
15783
  frontmatter;
@@ -15516,7 +15787,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
15516
15787
  const result = OpenCodeStyleSubagentFrontmatterSchema.safeParse(frontmatter);
15517
15788
  if (!result.success) {
15518
15789
  throw new Error(
15519
- `Invalid frontmatter in ${join104(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15790
+ `Invalid frontmatter in ${join105(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15520
15791
  );
15521
15792
  }
15522
15793
  }
@@ -15558,7 +15829,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
15558
15829
  return {
15559
15830
  success: false,
15560
15831
  error: new Error(
15561
- `Invalid frontmatter in ${join104(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15832
+ `Invalid frontmatter in ${join105(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15562
15833
  )
15563
15834
  };
15564
15835
  }
@@ -15574,7 +15845,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15574
15845
  global = false
15575
15846
  } = {}) {
15576
15847
  return {
15577
- relativeDirPath: global ? join105(".config", "kilo", "agent") : join105(".kilo", "agent")
15848
+ relativeDirPath: global ? join106(".config", "kilo", "agent") : join106(".kilo", "agent")
15578
15849
  };
15579
15850
  }
15580
15851
  static fromRulesyncSubagent({
@@ -15618,7 +15889,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15618
15889
  global = false
15619
15890
  }) {
15620
15891
  const paths = this.getSettablePaths({ global });
15621
- const filePath = join105(baseDir, paths.relativeDirPath, relativeFilePath);
15892
+ const filePath = join106(baseDir, paths.relativeDirPath, relativeFilePath);
15622
15893
  const fileContent = await readFileContent(filePath);
15623
15894
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15624
15895
  const result = KiloSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15654,23 +15925,23 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15654
15925
  };
15655
15926
 
15656
15927
  // 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()))
15928
+ import { join as join107 } from "path";
15929
+ import { z as z63 } from "zod/mini";
15930
+ var KiroCliSubagentJsonSchema = z63.looseObject({
15931
+ name: z63.string(),
15932
+ description: z63.optional(z63.nullable(z63.string())),
15933
+ prompt: z63.optional(z63.nullable(z63.string())),
15934
+ tools: z63.optional(z63.nullable(z63.array(z63.string()))),
15935
+ toolAliases: z63.optional(z63.nullable(z63.record(z63.string(), z63.string()))),
15936
+ toolSettings: z63.optional(z63.nullable(z63.unknown())),
15937
+ toolSchema: z63.optional(z63.nullable(z63.unknown())),
15938
+ hooks: z63.optional(z63.nullable(z63.record(z63.string(), z63.array(z63.unknown())))),
15939
+ model: z63.optional(z63.nullable(z63.string())),
15940
+ mcpServers: z63.optional(z63.nullable(z63.record(z63.string(), z63.unknown()))),
15941
+ useLegacyMcpJson: z63.optional(z63.nullable(z63.boolean())),
15942
+ resources: z63.optional(z63.nullable(z63.array(z63.string()))),
15943
+ allowedTools: z63.optional(z63.nullable(z63.array(z63.string()))),
15944
+ includeMcpJson: z63.optional(z63.nullable(z63.boolean()))
15674
15945
  });
15675
15946
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15676
15947
  body;
@@ -15681,7 +15952,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15681
15952
  KiroCliSubagentJsonSchema.parse(parsed);
15682
15953
  } catch (error) {
15683
15954
  throw new Error(
15684
- `Invalid JSON in ${join106(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15955
+ `Invalid JSON in ${join107(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15685
15956
  { cause: error }
15686
15957
  );
15687
15958
  }
@@ -15693,7 +15964,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15693
15964
  }
15694
15965
  static getSettablePaths(_options = {}) {
15695
15966
  return {
15696
- relativeDirPath: join106(".kiro", "agents")
15967
+ relativeDirPath: join107(".kiro", "agents")
15697
15968
  };
15698
15969
  }
15699
15970
  getBody() {
@@ -15705,7 +15976,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15705
15976
  parsed = JSON.parse(this.body);
15706
15977
  } catch (error) {
15707
15978
  throw new Error(
15708
- `Failed to parse JSON in ${join106(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15979
+ `Failed to parse JSON in ${join107(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15709
15980
  { cause: error }
15710
15981
  );
15711
15982
  }
@@ -15786,7 +16057,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15786
16057
  global = false
15787
16058
  }) {
15788
16059
  const paths = this.getSettablePaths({ global });
15789
- const filePath = join106(baseDir, paths.relativeDirPath, relativeFilePath);
16060
+ const filePath = join107(baseDir, paths.relativeDirPath, relativeFilePath);
15790
16061
  const fileContent = await readFileContent(filePath);
15791
16062
  const subagent = new _KiroSubagent({
15792
16063
  baseDir,
@@ -15824,7 +16095,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15824
16095
  };
15825
16096
 
15826
16097
  // src/features/subagents/opencode-subagent.ts
15827
- import { join as join107 } from "path";
16098
+ import { join as join108 } from "path";
15828
16099
  var OpenCodeSubagentFrontmatterSchema = OpenCodeStyleSubagentFrontmatterSchema;
15829
16100
  var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
15830
16101
  getToolTarget() {
@@ -15834,7 +16105,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
15834
16105
  global = false
15835
16106
  } = {}) {
15836
16107
  return {
15837
- relativeDirPath: global ? join107(".config", "opencode", "agent") : join107(".opencode", "agent")
16108
+ relativeDirPath: global ? join108(".config", "opencode", "agent") : join108(".opencode", "agent")
15838
16109
  };
15839
16110
  }
15840
16111
  static fromRulesyncSubagent({
@@ -15878,7 +16149,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
15878
16149
  global = false
15879
16150
  }) {
15880
16151
  const paths = this.getSettablePaths({ global });
15881
- const filePath = join107(baseDir, paths.relativeDirPath, relativeFilePath);
16152
+ const filePath = join108(baseDir, paths.relativeDirPath, relativeFilePath);
15882
16153
  const fileContent = await readFileContent(filePath);
15883
16154
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15884
16155
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15931,7 +16202,7 @@ var subagentsProcessorToolTargetTuple = [
15931
16202
  "roo",
15932
16203
  "rovodev"
15933
16204
  ];
15934
- var SubagentsProcessorToolTargetSchema = z63.enum(subagentsProcessorToolTargetTuple);
16205
+ var SubagentsProcessorToolTargetSchema = z64.enum(subagentsProcessorToolTargetTuple);
15935
16206
  var toolSubagentFactories = /* @__PURE__ */ new Map([
15936
16207
  [
15937
16208
  "agentsmd",
@@ -16122,7 +16393,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16122
16393
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
16123
16394
  */
16124
16395
  async loadRulesyncFiles() {
16125
- const subagentsDir = join108(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
16396
+ const subagentsDir = join109(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
16126
16397
  const dirExists = await directoryExists(subagentsDir);
16127
16398
  if (!dirExists) {
16128
16399
  this.logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -16137,7 +16408,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16137
16408
  this.logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
16138
16409
  const rulesyncSubagents = [];
16139
16410
  for (const mdFile of mdFiles) {
16140
- const filepath = join108(subagentsDir, mdFile);
16411
+ const filepath = join109(subagentsDir, mdFile);
16141
16412
  try {
16142
16413
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
16143
16414
  relativeFilePath: mdFile,
@@ -16167,7 +16438,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16167
16438
  const factory = this.getFactory(this.toolTarget);
16168
16439
  const paths = factory.class.getSettablePaths({ global: this.global });
16169
16440
  const subagentFilePaths = await findFilesByGlobs(
16170
- join108(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
16441
+ join109(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
16171
16442
  );
16172
16443
  if (forDeletion) {
16173
16444
  const toolSubagents2 = subagentFilePaths.map(
@@ -16234,49 +16505,49 @@ var SubagentsProcessor = class extends FeatureProcessor {
16234
16505
  };
16235
16506
 
16236
16507
  // src/features/rules/agentsmd-rule.ts
16237
- import { join as join111 } from "path";
16508
+ import { join as join112 } from "path";
16238
16509
 
16239
16510
  // src/features/rules/tool-rule.ts
16240
- import { join as join110 } from "path";
16511
+ import { join as join111 } from "path";
16241
16512
 
16242
16513
  // 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({
16514
+ import { join as join110 } from "path";
16515
+ import { z as z65 } from "zod/mini";
16516
+ var RulesyncRuleFrontmatterSchema = z65.object({
16517
+ root: z65.optional(z65.boolean()),
16518
+ localRoot: z65.optional(z65.boolean()),
16519
+ targets: z65._default(RulesyncTargetsSchema, ["*"]),
16520
+ description: z65.optional(z65.string()),
16521
+ globs: z65.optional(z65.array(z65.string())),
16522
+ agentsmd: z65.optional(
16523
+ z65.looseObject({
16253
16524
  // @example "path/to/subproject"
16254
- subprojectPath: z64.optional(z64.string())
16525
+ subprojectPath: z65.optional(z65.string())
16255
16526
  })
16256
16527
  ),
16257
- claudecode: z64.optional(
16258
- z64.looseObject({
16528
+ claudecode: z65.optional(
16529
+ z65.looseObject({
16259
16530
  // Glob patterns for conditional rules (takes precedence over globs)
16260
16531
  // @example ["src/**/*.ts", "tests/**/*.test.ts"]
16261
- paths: z64.optional(z64.array(z64.string()))
16532
+ paths: z65.optional(z65.array(z65.string()))
16262
16533
  })
16263
16534
  ),
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()))
16535
+ cursor: z65.optional(
16536
+ z65.looseObject({
16537
+ alwaysApply: z65.optional(z65.boolean()),
16538
+ description: z65.optional(z65.string()),
16539
+ globs: z65.optional(z65.array(z65.string()))
16269
16540
  })
16270
16541
  ),
16271
- copilot: z64.optional(
16272
- z64.looseObject({
16273
- excludeAgent: z64.optional(z64.union([z64.literal("code-review"), z64.literal("coding-agent")]))
16542
+ copilot: z65.optional(
16543
+ z65.looseObject({
16544
+ excludeAgent: z65.optional(z65.union([z65.literal("code-review"), z65.literal("coding-agent")]))
16274
16545
  })
16275
16546
  ),
16276
- antigravity: z64.optional(
16277
- z64.looseObject({
16278
- trigger: z64.optional(z64.string()),
16279
- globs: z64.optional(z64.array(z64.string()))
16547
+ antigravity: z65.optional(
16548
+ z65.looseObject({
16549
+ trigger: z65.optional(z65.string()),
16550
+ globs: z65.optional(z65.array(z65.string()))
16280
16551
  })
16281
16552
  )
16282
16553
  });
@@ -16287,7 +16558,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
16287
16558
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
16288
16559
  if (!parseResult.success && rest.validate !== false) {
16289
16560
  throw new Error(
16290
- `Invalid frontmatter in ${join109(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
16561
+ `Invalid frontmatter in ${join110(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
16291
16562
  );
16292
16563
  }
16293
16564
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -16322,7 +16593,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
16322
16593
  return {
16323
16594
  success: false,
16324
16595
  error: new Error(
16325
- `Invalid frontmatter in ${join109(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16596
+ `Invalid frontmatter in ${join110(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16326
16597
  )
16327
16598
  };
16328
16599
  }
@@ -16331,7 +16602,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
16331
16602
  relativeFilePath,
16332
16603
  validate = true
16333
16604
  }) {
16334
- const filePath = join109(
16605
+ const filePath = join110(
16335
16606
  process.cwd(),
16336
16607
  this.getSettablePaths().recommended.relativeDirPath,
16337
16608
  relativeFilePath
@@ -16430,7 +16701,7 @@ var ToolRule = class extends ToolFile {
16430
16701
  rulesyncRule,
16431
16702
  validate = true,
16432
16703
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
16433
- nonRootPath = { relativeDirPath: join110(".agents", "memories") }
16704
+ nonRootPath = { relativeDirPath: join111(".agents", "memories") }
16434
16705
  }) {
16435
16706
  const params = this.buildToolRuleParamsDefault({
16436
16707
  baseDir,
@@ -16441,7 +16712,7 @@ var ToolRule = class extends ToolFile {
16441
16712
  });
16442
16713
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
16443
16714
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
16444
- params.relativeDirPath = join110(rulesyncFrontmatter.agentsmd.subprojectPath);
16715
+ params.relativeDirPath = join111(rulesyncFrontmatter.agentsmd.subprojectPath);
16445
16716
  params.relativeFilePath = "AGENTS.md";
16446
16717
  }
16447
16718
  return params;
@@ -16490,7 +16761,7 @@ var ToolRule = class extends ToolFile {
16490
16761
  }
16491
16762
  };
16492
16763
  function buildToolPath(toolDir, subDir, excludeToolDir) {
16493
- return excludeToolDir ? subDir : join110(toolDir, subDir);
16764
+ return excludeToolDir ? subDir : join111(toolDir, subDir);
16494
16765
  }
16495
16766
 
16496
16767
  // src/features/rules/agentsmd-rule.ts
@@ -16519,8 +16790,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
16519
16790
  validate = true
16520
16791
  }) {
16521
16792
  const isRoot = relativeFilePath === "AGENTS.md";
16522
- const relativePath = isRoot ? "AGENTS.md" : join111(".agents", "memories", relativeFilePath);
16523
- const fileContent = await readFileContent(join111(baseDir, relativePath));
16793
+ const relativePath = isRoot ? "AGENTS.md" : join112(".agents", "memories", relativeFilePath);
16794
+ const fileContent = await readFileContent(join112(baseDir, relativePath));
16524
16795
  return new _AgentsMdRule({
16525
16796
  baseDir,
16526
16797
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -16575,21 +16846,21 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
16575
16846
  };
16576
16847
 
16577
16848
  // 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()
16849
+ import { join as join113 } from "path";
16850
+ import { z as z66 } from "zod/mini";
16851
+ var AntigravityRuleFrontmatterSchema = z66.looseObject({
16852
+ trigger: z66.optional(
16853
+ z66.union([
16854
+ z66.literal("always_on"),
16855
+ z66.literal("glob"),
16856
+ z66.literal("manual"),
16857
+ z66.literal("model_decision"),
16858
+ z66.string()
16588
16859
  // accepts any string for forward compatibility
16589
16860
  ])
16590
16861
  ),
16591
- globs: z65.optional(z65.string()),
16592
- description: z65.optional(z65.string())
16862
+ globs: z66.optional(z66.string()),
16863
+ description: z66.optional(z66.string())
16593
16864
  });
16594
16865
  function parseGlobsString(globs) {
16595
16866
  if (!globs) {
@@ -16734,7 +17005,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
16734
17005
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
16735
17006
  if (!result.success) {
16736
17007
  throw new Error(
16737
- `Invalid frontmatter in ${join112(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17008
+ `Invalid frontmatter in ${join113(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16738
17009
  );
16739
17010
  }
16740
17011
  }
@@ -16758,7 +17029,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
16758
17029
  relativeFilePath,
16759
17030
  validate = true
16760
17031
  }) {
16761
- const filePath = join112(
17032
+ const filePath = join113(
16762
17033
  baseDir,
16763
17034
  this.getSettablePaths().nonRoot.relativeDirPath,
16764
17035
  relativeFilePath
@@ -16898,7 +17169,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
16898
17169
  };
16899
17170
 
16900
17171
  // src/features/rules/augmentcode-legacy-rule.ts
16901
- import { join as join113 } from "path";
17172
+ import { join as join114 } from "path";
16902
17173
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
16903
17174
  toRulesyncRule() {
16904
17175
  const rulesyncFrontmatter = {
@@ -16958,8 +17229,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
16958
17229
  }) {
16959
17230
  const settablePaths = this.getSettablePaths();
16960
17231
  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));
17232
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : join114(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
17233
+ const fileContent = await readFileContent(join114(baseDir, relativePath));
16963
17234
  return new _AugmentcodeLegacyRule({
16964
17235
  baseDir,
16965
17236
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -16988,7 +17259,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
16988
17259
  };
16989
17260
 
16990
17261
  // src/features/rules/augmentcode-rule.ts
16991
- import { join as join114 } from "path";
17262
+ import { join as join115 } from "path";
16992
17263
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
16993
17264
  toRulesyncRule() {
16994
17265
  return this.toRulesyncRuleDefault();
@@ -17019,7 +17290,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
17019
17290
  relativeFilePath,
17020
17291
  validate = true
17021
17292
  }) {
17022
- const filePath = join114(
17293
+ const filePath = join115(
17023
17294
  baseDir,
17024
17295
  this.getSettablePaths().nonRoot.relativeDirPath,
17025
17296
  relativeFilePath
@@ -17059,7 +17330,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
17059
17330
  };
17060
17331
 
17061
17332
  // src/features/rules/claudecode-legacy-rule.ts
17062
- import { join as join115 } from "path";
17333
+ import { join as join116 } from "path";
17063
17334
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17064
17335
  static getSettablePaths({
17065
17336
  global,
@@ -17101,7 +17372,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17101
17372
  if (isRoot) {
17102
17373
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
17103
17374
  const fileContent2 = await readFileContent(
17104
- join115(baseDir, rootDirPath, paths.root.relativeFilePath)
17375
+ join116(baseDir, rootDirPath, paths.root.relativeFilePath)
17105
17376
  );
17106
17377
  return new _ClaudecodeLegacyRule({
17107
17378
  baseDir,
@@ -17115,8 +17386,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17115
17386
  if (!paths.nonRoot) {
17116
17387
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17117
17388
  }
17118
- const relativePath = join115(paths.nonRoot.relativeDirPath, relativeFilePath);
17119
- const fileContent = await readFileContent(join115(baseDir, relativePath));
17389
+ const relativePath = join116(paths.nonRoot.relativeDirPath, relativeFilePath);
17390
+ const fileContent = await readFileContent(join116(baseDir, relativePath));
17120
17391
  return new _ClaudecodeLegacyRule({
17121
17392
  baseDir,
17122
17393
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17175,10 +17446,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17175
17446
  };
17176
17447
 
17177
17448
  // 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()))
17449
+ import { join as join117 } from "path";
17450
+ import { z as z67 } from "zod/mini";
17451
+ var ClaudecodeRuleFrontmatterSchema = z67.object({
17452
+ paths: z67.optional(z67.array(z67.string()))
17182
17453
  });
17183
17454
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17184
17455
  frontmatter;
@@ -17216,7 +17487,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17216
17487
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
17217
17488
  if (!result.success) {
17218
17489
  throw new Error(
17219
- `Invalid frontmatter in ${join116(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17490
+ `Invalid frontmatter in ${join117(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17220
17491
  );
17221
17492
  }
17222
17493
  }
@@ -17246,7 +17517,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17246
17517
  if (isRoot) {
17247
17518
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
17248
17519
  const fileContent2 = await readFileContent(
17249
- join116(baseDir, rootDirPath, paths.root.relativeFilePath)
17520
+ join117(baseDir, rootDirPath, paths.root.relativeFilePath)
17250
17521
  );
17251
17522
  return new _ClaudecodeRule({
17252
17523
  baseDir,
@@ -17261,8 +17532,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17261
17532
  if (!paths.nonRoot) {
17262
17533
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17263
17534
  }
17264
- const relativePath = join116(paths.nonRoot.relativeDirPath, relativeFilePath);
17265
- const filePath = join116(baseDir, relativePath);
17535
+ const relativePath = join117(paths.nonRoot.relativeDirPath, relativeFilePath);
17536
+ const filePath = join117(baseDir, relativePath);
17266
17537
  const fileContent = await readFileContent(filePath);
17267
17538
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
17268
17539
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
@@ -17373,7 +17644,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17373
17644
  return {
17374
17645
  success: false,
17375
17646
  error: new Error(
17376
- `Invalid frontmatter in ${join116(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17647
+ `Invalid frontmatter in ${join117(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17377
17648
  )
17378
17649
  };
17379
17650
  }
@@ -17393,10 +17664,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17393
17664
  };
17394
17665
 
17395
17666
  // 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()
17667
+ import { join as join118 } from "path";
17668
+ import { z as z68 } from "zod/mini";
17669
+ var ClineRuleFrontmatterSchema = z68.object({
17670
+ description: z68.string()
17400
17671
  });
17401
17672
  var ClineRule = class _ClineRule extends ToolRule {
17402
17673
  static getSettablePaths(_options = {}) {
@@ -17439,7 +17710,7 @@ var ClineRule = class _ClineRule extends ToolRule {
17439
17710
  validate = true
17440
17711
  }) {
17441
17712
  const fileContent = await readFileContent(
17442
- join117(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17713
+ join118(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17443
17714
  );
17444
17715
  return new _ClineRule({
17445
17716
  baseDir,
@@ -17465,7 +17736,7 @@ var ClineRule = class _ClineRule extends ToolRule {
17465
17736
  };
17466
17737
 
17467
17738
  // src/features/rules/codexcli-rule.ts
17468
- import { join as join118 } from "path";
17739
+ import { join as join119 } from "path";
17469
17740
  var CodexcliRule = class _CodexcliRule extends ToolRule {
17470
17741
  static getSettablePaths({
17471
17742
  global,
@@ -17500,7 +17771,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
17500
17771
  if (isRoot) {
17501
17772
  const relativePath2 = paths.root.relativeFilePath;
17502
17773
  const fileContent2 = await readFileContent(
17503
- join118(baseDir, paths.root.relativeDirPath, relativePath2)
17774
+ join119(baseDir, paths.root.relativeDirPath, relativePath2)
17504
17775
  );
17505
17776
  return new _CodexcliRule({
17506
17777
  baseDir,
@@ -17514,8 +17785,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
17514
17785
  if (!paths.nonRoot) {
17515
17786
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17516
17787
  }
17517
- const relativePath = join118(paths.nonRoot.relativeDirPath, relativeFilePath);
17518
- const fileContent = await readFileContent(join118(baseDir, relativePath));
17788
+ const relativePath = join119(paths.nonRoot.relativeDirPath, relativeFilePath);
17789
+ const fileContent = await readFileContent(join119(baseDir, relativePath));
17519
17790
  return new _CodexcliRule({
17520
17791
  baseDir,
17521
17792
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17574,12 +17845,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
17574
17845
  };
17575
17846
 
17576
17847
  // 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")]))
17848
+ import { join as join120 } from "path";
17849
+ import { z as z69 } from "zod/mini";
17850
+ var CopilotRuleFrontmatterSchema = z69.object({
17851
+ description: z69.optional(z69.string()),
17852
+ applyTo: z69.optional(z69.string()),
17853
+ excludeAgent: z69.optional(z69.union([z69.literal("code-review"), z69.literal("coding-agent")]))
17583
17854
  });
17584
17855
  var CopilotRule = class _CopilotRule extends ToolRule {
17585
17856
  frontmatter;
@@ -17611,7 +17882,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17611
17882
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
17612
17883
  if (!result.success) {
17613
17884
  throw new Error(
17614
- `Invalid frontmatter in ${join119(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17885
+ `Invalid frontmatter in ${join120(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17615
17886
  );
17616
17887
  }
17617
17888
  }
@@ -17701,8 +17972,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17701
17972
  const paths = this.getSettablePaths({ global });
17702
17973
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
17703
17974
  if (isRoot) {
17704
- const relativePath2 = join119(paths.root.relativeDirPath, paths.root.relativeFilePath);
17705
- const filePath2 = join119(baseDir, relativePath2);
17975
+ const relativePath2 = join120(paths.root.relativeDirPath, paths.root.relativeFilePath);
17976
+ const filePath2 = join120(baseDir, relativePath2);
17706
17977
  const fileContent2 = await readFileContent(filePath2);
17707
17978
  return new _CopilotRule({
17708
17979
  baseDir,
@@ -17717,8 +17988,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17717
17988
  if (!paths.nonRoot) {
17718
17989
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17719
17990
  }
17720
- const relativePath = join119(paths.nonRoot.relativeDirPath, relativeFilePath);
17721
- const filePath = join119(baseDir, relativePath);
17991
+ const relativePath = join120(paths.nonRoot.relativeDirPath, relativeFilePath);
17992
+ const filePath = join120(baseDir, relativePath);
17722
17993
  const fileContent = await readFileContent(filePath);
17723
17994
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
17724
17995
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
@@ -17764,7 +18035,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17764
18035
  return {
17765
18036
  success: false,
17766
18037
  error: new Error(
17767
- `Invalid frontmatter in ${join119(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18038
+ `Invalid frontmatter in ${join120(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17768
18039
  )
17769
18040
  };
17770
18041
  }
@@ -17820,12 +18091,12 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
17820
18091
  };
17821
18092
 
17822
18093
  // 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())
18094
+ import { join as join121 } from "path";
18095
+ import { z as z70 } from "zod/mini";
18096
+ var CursorRuleFrontmatterSchema = z70.object({
18097
+ description: z70.optional(z70.string()),
18098
+ globs: z70.optional(z70.string()),
18099
+ alwaysApply: z70.optional(z70.boolean())
17829
18100
  });
17830
18101
  var CursorRule = class _CursorRule extends ToolRule {
17831
18102
  frontmatter;
@@ -17842,7 +18113,7 @@ var CursorRule = class _CursorRule extends ToolRule {
17842
18113
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
17843
18114
  if (!result.success) {
17844
18115
  throw new Error(
17845
- `Invalid frontmatter in ${join120(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18116
+ `Invalid frontmatter in ${join121(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17846
18117
  );
17847
18118
  }
17848
18119
  }
@@ -17958,7 +18229,7 @@ var CursorRule = class _CursorRule extends ToolRule {
17958
18229
  relativeFilePath,
17959
18230
  validate = true
17960
18231
  }) {
17961
- const filePath = join120(
18232
+ const filePath = join121(
17962
18233
  baseDir,
17963
18234
  this.getSettablePaths().nonRoot.relativeDirPath,
17964
18235
  relativeFilePath
@@ -17968,7 +18239,7 @@ var CursorRule = class _CursorRule extends ToolRule {
17968
18239
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
17969
18240
  if (!result.success) {
17970
18241
  throw new Error(
17971
- `Invalid frontmatter in ${join120(baseDir, relativeFilePath)}: ${formatError(result.error)}`
18242
+ `Invalid frontmatter in ${join121(baseDir, relativeFilePath)}: ${formatError(result.error)}`
17972
18243
  );
17973
18244
  }
17974
18245
  return new _CursorRule({
@@ -18005,7 +18276,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18005
18276
  return {
18006
18277
  success: false,
18007
18278
  error: new Error(
18008
- `Invalid frontmatter in ${join120(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18279
+ `Invalid frontmatter in ${join121(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18009
18280
  )
18010
18281
  };
18011
18282
  }
@@ -18025,7 +18296,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18025
18296
  };
18026
18297
 
18027
18298
  // src/features/rules/deepagents-rule.ts
18028
- import { join as join121 } from "path";
18299
+ import { join as join122 } from "path";
18029
18300
  var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18030
18301
  constructor({ fileContent, root, ...rest }) {
18031
18302
  super({
@@ -18052,8 +18323,8 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18052
18323
  }) {
18053
18324
  const settablePaths = this.getSettablePaths();
18054
18325
  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));
18326
+ const relativePath = isRoot ? join122(".deepagents", "AGENTS.md") : join122(".deepagents", "memories", relativeFilePath);
18327
+ const fileContent = await readFileContent(join122(baseDir, relativePath));
18057
18328
  return new _DeepagentsRule({
18058
18329
  baseDir,
18059
18330
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -18108,7 +18379,7 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18108
18379
  };
18109
18380
 
18110
18381
  // src/features/rules/factorydroid-rule.ts
18111
- import { join as join122 } from "path";
18382
+ import { join as join123 } from "path";
18112
18383
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18113
18384
  constructor({ fileContent, root, ...rest }) {
18114
18385
  super({
@@ -18148,8 +18419,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18148
18419
  const paths = this.getSettablePaths({ global });
18149
18420
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
18150
18421
  if (isRoot) {
18151
- const relativePath2 = join122(paths.root.relativeDirPath, paths.root.relativeFilePath);
18152
- const fileContent2 = await readFileContent(join122(baseDir, relativePath2));
18422
+ const relativePath2 = join123(paths.root.relativeDirPath, paths.root.relativeFilePath);
18423
+ const fileContent2 = await readFileContent(join123(baseDir, relativePath2));
18153
18424
  return new _FactorydroidRule({
18154
18425
  baseDir,
18155
18426
  relativeDirPath: paths.root.relativeDirPath,
@@ -18162,8 +18433,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18162
18433
  if (!paths.nonRoot) {
18163
18434
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18164
18435
  }
18165
- const relativePath = join122(paths.nonRoot.relativeDirPath, relativeFilePath);
18166
- const fileContent = await readFileContent(join122(baseDir, relativePath));
18436
+ const relativePath = join123(paths.nonRoot.relativeDirPath, relativeFilePath);
18437
+ const fileContent = await readFileContent(join123(baseDir, relativePath));
18167
18438
  return new _FactorydroidRule({
18168
18439
  baseDir,
18169
18440
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18222,7 +18493,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18222
18493
  };
18223
18494
 
18224
18495
  // src/features/rules/geminicli-rule.ts
18225
- import { join as join123 } from "path";
18496
+ import { join as join124 } from "path";
18226
18497
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18227
18498
  static getSettablePaths({
18228
18499
  global,
@@ -18257,7 +18528,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18257
18528
  if (isRoot) {
18258
18529
  const relativePath2 = paths.root.relativeFilePath;
18259
18530
  const fileContent2 = await readFileContent(
18260
- join123(baseDir, paths.root.relativeDirPath, relativePath2)
18531
+ join124(baseDir, paths.root.relativeDirPath, relativePath2)
18261
18532
  );
18262
18533
  return new _GeminiCliRule({
18263
18534
  baseDir,
@@ -18271,8 +18542,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18271
18542
  if (!paths.nonRoot) {
18272
18543
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18273
18544
  }
18274
- const relativePath = join123(paths.nonRoot.relativeDirPath, relativeFilePath);
18275
- const fileContent = await readFileContent(join123(baseDir, relativePath));
18545
+ const relativePath = join124(paths.nonRoot.relativeDirPath, relativeFilePath);
18546
+ const fileContent = await readFileContent(join124(baseDir, relativePath));
18276
18547
  return new _GeminiCliRule({
18277
18548
  baseDir,
18278
18549
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18331,7 +18602,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18331
18602
  };
18332
18603
 
18333
18604
  // src/features/rules/goose-rule.ts
18334
- import { join as join124 } from "path";
18605
+ import { join as join125 } from "path";
18335
18606
  var GooseRule = class _GooseRule extends ToolRule {
18336
18607
  static getSettablePaths({
18337
18608
  global,
@@ -18366,7 +18637,7 @@ var GooseRule = class _GooseRule extends ToolRule {
18366
18637
  if (isRoot) {
18367
18638
  const relativePath2 = paths.root.relativeFilePath;
18368
18639
  const fileContent2 = await readFileContent(
18369
- join124(baseDir, paths.root.relativeDirPath, relativePath2)
18640
+ join125(baseDir, paths.root.relativeDirPath, relativePath2)
18370
18641
  );
18371
18642
  return new _GooseRule({
18372
18643
  baseDir,
@@ -18380,8 +18651,8 @@ var GooseRule = class _GooseRule extends ToolRule {
18380
18651
  if (!paths.nonRoot) {
18381
18652
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18382
18653
  }
18383
- const relativePath = join124(paths.nonRoot.relativeDirPath, relativeFilePath);
18384
- const fileContent = await readFileContent(join124(baseDir, relativePath));
18654
+ const relativePath = join125(paths.nonRoot.relativeDirPath, relativeFilePath);
18655
+ const fileContent = await readFileContent(join125(baseDir, relativePath));
18385
18656
  return new _GooseRule({
18386
18657
  baseDir,
18387
18658
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18440,7 +18711,7 @@ var GooseRule = class _GooseRule extends ToolRule {
18440
18711
  };
18441
18712
 
18442
18713
  // src/features/rules/junie-rule.ts
18443
- import { join as join125 } from "path";
18714
+ import { join as join126 } from "path";
18444
18715
  var JunieRule = class _JunieRule extends ToolRule {
18445
18716
  static getSettablePaths(_options = {}) {
18446
18717
  return {
@@ -18469,8 +18740,8 @@ var JunieRule = class _JunieRule extends ToolRule {
18469
18740
  }) {
18470
18741
  const isRoot = _JunieRule.isRootRelativeFilePath(relativeFilePath);
18471
18742
  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));
18743
+ const relativePath = isRoot ? join126(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : join126(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
18744
+ const fileContent = await readFileContent(join126(baseDir, relativePath));
18474
18745
  return new _JunieRule({
18475
18746
  baseDir,
18476
18747
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -18525,7 +18796,7 @@ var JunieRule = class _JunieRule extends ToolRule {
18525
18796
  };
18526
18797
 
18527
18798
  // src/features/rules/kilo-rule.ts
18528
- import { join as join126 } from "path";
18799
+ import { join as join127 } from "path";
18529
18800
  var KiloRule = class _KiloRule extends ToolRule {
18530
18801
  static getSettablePaths({
18531
18802
  global,
@@ -18560,7 +18831,7 @@ var KiloRule = class _KiloRule extends ToolRule {
18560
18831
  if (isRoot) {
18561
18832
  const relativePath2 = paths.root.relativeFilePath;
18562
18833
  const fileContent2 = await readFileContent(
18563
- join126(baseDir, paths.root.relativeDirPath, relativePath2)
18834
+ join127(baseDir, paths.root.relativeDirPath, relativePath2)
18564
18835
  );
18565
18836
  return new _KiloRule({
18566
18837
  baseDir,
@@ -18574,8 +18845,8 @@ var KiloRule = class _KiloRule extends ToolRule {
18574
18845
  if (!paths.nonRoot) {
18575
18846
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18576
18847
  }
18577
- const relativePath = join126(paths.nonRoot.relativeDirPath, relativeFilePath);
18578
- const fileContent = await readFileContent(join126(baseDir, relativePath));
18848
+ const relativePath = join127(paths.nonRoot.relativeDirPath, relativeFilePath);
18849
+ const fileContent = await readFileContent(join127(baseDir, relativePath));
18579
18850
  return new _KiloRule({
18580
18851
  baseDir,
18581
18852
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18634,7 +18905,7 @@ var KiloRule = class _KiloRule extends ToolRule {
18634
18905
  };
18635
18906
 
18636
18907
  // src/features/rules/kiro-rule.ts
18637
- import { join as join127 } from "path";
18908
+ import { join as join128 } from "path";
18638
18909
  var KiroRule = class _KiroRule extends ToolRule {
18639
18910
  static getSettablePaths(_options = {}) {
18640
18911
  return {
@@ -18649,7 +18920,7 @@ var KiroRule = class _KiroRule extends ToolRule {
18649
18920
  validate = true
18650
18921
  }) {
18651
18922
  const fileContent = await readFileContent(
18652
- join127(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18923
+ join128(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18653
18924
  );
18654
18925
  return new _KiroRule({
18655
18926
  baseDir,
@@ -18703,7 +18974,7 @@ var KiroRule = class _KiroRule extends ToolRule {
18703
18974
  };
18704
18975
 
18705
18976
  // src/features/rules/opencode-rule.ts
18706
- import { join as join128 } from "path";
18977
+ import { join as join129 } from "path";
18707
18978
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18708
18979
  static getSettablePaths({
18709
18980
  global,
@@ -18738,7 +19009,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18738
19009
  if (isRoot) {
18739
19010
  const relativePath2 = paths.root.relativeFilePath;
18740
19011
  const fileContent2 = await readFileContent(
18741
- join128(baseDir, paths.root.relativeDirPath, relativePath2)
19012
+ join129(baseDir, paths.root.relativeDirPath, relativePath2)
18742
19013
  );
18743
19014
  return new _OpenCodeRule({
18744
19015
  baseDir,
@@ -18752,8 +19023,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18752
19023
  if (!paths.nonRoot) {
18753
19024
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18754
19025
  }
18755
- const relativePath = join128(paths.nonRoot.relativeDirPath, relativeFilePath);
18756
- const fileContent = await readFileContent(join128(baseDir, relativePath));
19026
+ const relativePath = join129(paths.nonRoot.relativeDirPath, relativeFilePath);
19027
+ const fileContent = await readFileContent(join129(baseDir, relativePath));
18757
19028
  return new _OpenCodeRule({
18758
19029
  baseDir,
18759
19030
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18812,7 +19083,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18812
19083
  };
18813
19084
 
18814
19085
  // src/features/rules/qwencode-rule.ts
18815
- import { join as join129 } from "path";
19086
+ import { join as join130 } from "path";
18816
19087
  var QwencodeRule = class _QwencodeRule extends ToolRule {
18817
19088
  static getSettablePaths(_options = {}) {
18818
19089
  return {
@@ -18831,8 +19102,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
18831
19102
  validate = true
18832
19103
  }) {
18833
19104
  const isRoot = relativeFilePath === "QWEN.md";
18834
- const relativePath = isRoot ? "QWEN.md" : join129(".qwen", "memories", relativeFilePath);
18835
- const fileContent = await readFileContent(join129(baseDir, relativePath));
19105
+ const relativePath = isRoot ? "QWEN.md" : join130(".qwen", "memories", relativeFilePath);
19106
+ const fileContent = await readFileContent(join130(baseDir, relativePath));
18836
19107
  return new _QwencodeRule({
18837
19108
  baseDir,
18838
19109
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -18884,7 +19155,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
18884
19155
  };
18885
19156
 
18886
19157
  // src/features/rules/replit-rule.ts
18887
- import { join as join130 } from "path";
19158
+ import { join as join131 } from "path";
18888
19159
  var ReplitRule = class _ReplitRule extends ToolRule {
18889
19160
  static getSettablePaths(_options = {}) {
18890
19161
  return {
@@ -18906,7 +19177,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
18906
19177
  }
18907
19178
  const relativePath = paths.root.relativeFilePath;
18908
19179
  const fileContent = await readFileContent(
18909
- join130(baseDir, paths.root.relativeDirPath, relativePath)
19180
+ join131(baseDir, paths.root.relativeDirPath, relativePath)
18910
19181
  );
18911
19182
  return new _ReplitRule({
18912
19183
  baseDir,
@@ -18972,7 +19243,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
18972
19243
  };
18973
19244
 
18974
19245
  // src/features/rules/roo-rule.ts
18975
- import { join as join131 } from "path";
19246
+ import { join as join132 } from "path";
18976
19247
  var RooRule = class _RooRule extends ToolRule {
18977
19248
  static getSettablePaths(_options = {}) {
18978
19249
  return {
@@ -18987,7 +19258,7 @@ var RooRule = class _RooRule extends ToolRule {
18987
19258
  validate = true
18988
19259
  }) {
18989
19260
  const fileContent = await readFileContent(
18990
- join131(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19261
+ join132(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18991
19262
  );
18992
19263
  return new _RooRule({
18993
19264
  baseDir,
@@ -19056,7 +19327,7 @@ var RooRule = class _RooRule extends ToolRule {
19056
19327
  };
19057
19328
 
19058
19329
  // src/features/rules/rovodev-rule.ts
19059
- import { join as join132 } from "path";
19330
+ import { join as join133 } from "path";
19060
19331
  var DISALLOWED_ROVODEV_MODULAR_RULE_BASENAMES = /* @__PURE__ */ new Set(["agents.md", "agents.local.md"]);
19061
19332
  var RovodevRule = class _RovodevRule extends ToolRule {
19062
19333
  /**
@@ -19100,7 +19371,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19100
19371
  root: rovodevAgents,
19101
19372
  alternativeRoots: [{ relativeDirPath: ".", relativeFilePath: "AGENTS.md" }],
19102
19373
  nonRoot: {
19103
- relativeDirPath: join132(".rovodev", ".rulesync", "modular-rules")
19374
+ relativeDirPath: join133(".rovodev", ".rulesync", "modular-rules")
19104
19375
  }
19105
19376
  };
19106
19377
  }
@@ -19139,10 +19410,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19139
19410
  }) {
19140
19411
  if (!this.isAllowedModularRulesRelativePath(relativeFilePath)) {
19141
19412
  throw new Error(
19142
- `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${join132(relativeDirPath, relativeFilePath)}`
19413
+ `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${join133(relativeDirPath, relativeFilePath)}`
19143
19414
  );
19144
19415
  }
19145
- const fileContent = await readFileContent(join132(baseDir, relativeDirPath, relativeFilePath));
19416
+ const fileContent = await readFileContent(join133(baseDir, relativeDirPath, relativeFilePath));
19146
19417
  return new _RovodevRule({
19147
19418
  baseDir,
19148
19419
  relativeDirPath,
@@ -19162,10 +19433,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19162
19433
  paths
19163
19434
  }) {
19164
19435
  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);
19436
+ 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
19437
  if (relativeFilePath !== "AGENTS.md") {
19167
19438
  throw new Error(
19168
- `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${join132(relativeDirPath, relativeFilePath)}`
19439
+ `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${join133(relativeDirPath, relativeFilePath)}`
19169
19440
  );
19170
19441
  }
19171
19442
  const allowed = relativeDirPath === paths.root.relativeDirPath || "alternativeRoots" in paths && paths.alternativeRoots?.some(
@@ -19173,10 +19444,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19173
19444
  );
19174
19445
  if (!allowed) {
19175
19446
  throw new Error(
19176
- `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${join132(relativeDirPath, relativeFilePath)}`
19447
+ `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${join133(relativeDirPath, relativeFilePath)}`
19177
19448
  );
19178
19449
  }
19179
- const fileContent = await readFileContent(join132(baseDir, relativeDirPath, relativeFilePath));
19450
+ const fileContent = await readFileContent(join133(baseDir, relativeDirPath, relativeFilePath));
19180
19451
  return new _RovodevRule({
19181
19452
  baseDir,
19182
19453
  relativeDirPath,
@@ -19290,7 +19561,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19290
19561
  };
19291
19562
 
19292
19563
  // src/features/rules/warp-rule.ts
19293
- import { join as join133 } from "path";
19564
+ import { join as join134 } from "path";
19294
19565
  var WarpRule = class _WarpRule extends ToolRule {
19295
19566
  constructor({ fileContent, root, ...rest }) {
19296
19567
  super({
@@ -19316,8 +19587,8 @@ var WarpRule = class _WarpRule extends ToolRule {
19316
19587
  validate = true
19317
19588
  }) {
19318
19589
  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));
19590
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join134(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
19591
+ const fileContent = await readFileContent(join134(baseDir, relativePath));
19321
19592
  return new _WarpRule({
19322
19593
  baseDir,
19323
19594
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -19372,7 +19643,7 @@ var WarpRule = class _WarpRule extends ToolRule {
19372
19643
  };
19373
19644
 
19374
19645
  // src/features/rules/windsurf-rule.ts
19375
- import { join as join134 } from "path";
19646
+ import { join as join135 } from "path";
19376
19647
  var WindsurfRule = class _WindsurfRule extends ToolRule {
19377
19648
  static getSettablePaths(_options = {}) {
19378
19649
  return {
@@ -19387,7 +19658,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
19387
19658
  validate = true
19388
19659
  }) {
19389
19660
  const fileContent = await readFileContent(
19390
- join134(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19661
+ join135(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19391
19662
  );
19392
19663
  return new _WindsurfRule({
19393
19664
  baseDir,
@@ -19485,11 +19756,11 @@ var rulesProcessorToolTargets = [
19485
19756
  "warp",
19486
19757
  "windsurf"
19487
19758
  ];
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())
19759
+ var RulesProcessorToolTargetSchema = z71.enum(rulesProcessorToolTargets);
19760
+ var formatRulePaths = (rules) => rules.map((r) => join136(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
19761
+ var RulesFeatureOptionsSchema = z71.looseObject({
19762
+ ruleDiscoveryMode: z71.optional(z71.enum(["none", "explicit"])),
19763
+ includeLocalRoot: z71.optional(z71.boolean())
19493
19764
  });
19494
19765
  var resolveRuleDiscoveryMode = ({
19495
19766
  defaultMode,
@@ -19510,8 +19781,8 @@ var resolveRuleDiscoveryMode = ({
19510
19781
  }
19511
19782
  return parsed.data.ruleDiscoveryMode === "none" ? "auto" : "toon";
19512
19783
  };
19513
- var IncludeLocalRootSchema = z70.looseObject({
19514
- includeLocalRoot: z70.optional(z70.boolean())
19784
+ var IncludeLocalRootSchema = z71.looseObject({
19785
+ includeLocalRoot: z71.optional(z71.boolean())
19515
19786
  });
19516
19787
  var resolveIncludeLocalRoot = (options) => {
19517
19788
  if (!options) return true;
@@ -19954,7 +20225,7 @@ var RulesProcessor = class extends FeatureProcessor {
19954
20225
  }).relativeDirPath;
19955
20226
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
19956
20227
  const frontmatter = skill.getFrontmatter();
19957
- const relativePath = join135(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
20228
+ const relativePath = join136(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
19958
20229
  return {
19959
20230
  name: frontmatter.name,
19960
20231
  description: frontmatter.description,
@@ -20083,8 +20354,8 @@ var RulesProcessor = class extends FeatureProcessor {
20083
20354
  * Load and parse rulesync rule files from .rulesync/rules/ directory
20084
20355
  */
20085
20356
  async loadRulesyncFiles() {
20086
- const rulesyncBaseDir = join135(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
20087
- const files = await findFilesByGlobs(join135(rulesyncBaseDir, "**", "*.md"));
20357
+ const rulesyncBaseDir = join136(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
20358
+ const files = await findFilesByGlobs(join136(rulesyncBaseDir, "**", "*.md"));
20088
20359
  this.logger.debug(`Found ${files.length} rulesync files`);
20089
20360
  const rulesyncRules = await Promise.all(
20090
20361
  files.map((file) => {
@@ -20199,13 +20470,13 @@ var RulesProcessor = class extends FeatureProcessor {
20199
20470
  return [];
20200
20471
  }
20201
20472
  const uniqueRootFilePaths = await findFilesWithFallback(
20202
- join135(
20473
+ join136(
20203
20474
  this.baseDir,
20204
20475
  settablePaths.root.relativeDirPath ?? ".",
20205
20476
  settablePaths.root.relativeFilePath
20206
20477
  ),
20207
20478
  settablePaths.alternativeRoots,
20208
- (alt) => join135(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
20479
+ (alt) => join136(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
20209
20480
  );
20210
20481
  if (forDeletion) {
20211
20482
  return buildDeletionRulesFromPaths(uniqueRootFilePaths);
@@ -20236,7 +20507,7 @@ var RulesProcessor = class extends FeatureProcessor {
20236
20507
  return [];
20237
20508
  }
20238
20509
  const uniqueLocalRootFilePaths2 = await findFilesByGlobs(
20239
- join135(this.baseDir, "AGENTS.local.md")
20510
+ join136(this.baseDir, "AGENTS.local.md")
20240
20511
  );
20241
20512
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths2);
20242
20513
  }
@@ -20247,9 +20518,9 @@ var RulesProcessor = class extends FeatureProcessor {
20247
20518
  return [];
20248
20519
  }
20249
20520
  const uniqueLocalRootFilePaths = await findFilesWithFallback(
20250
- join135(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
20521
+ join136(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
20251
20522
  settablePaths.alternativeRoots,
20252
- (alt) => join135(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
20523
+ (alt) => join136(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
20253
20524
  );
20254
20525
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths);
20255
20526
  })();
@@ -20260,20 +20531,20 @@ var RulesProcessor = class extends FeatureProcessor {
20260
20531
  if (!forDeletion || this.toolTarget !== "rovodev" || this.global) {
20261
20532
  return [];
20262
20533
  }
20263
- const primaryPaths = await findFilesByGlobs(join135(this.baseDir, ".rovodev", "AGENTS.md"));
20534
+ const primaryPaths = await findFilesByGlobs(join136(this.baseDir, ".rovodev", "AGENTS.md"));
20264
20535
  if (primaryPaths.length === 0) {
20265
20536
  return [];
20266
20537
  }
20267
- const mirrorPaths = await findFilesByGlobs(join135(this.baseDir, "AGENTS.md"));
20538
+ const mirrorPaths = await findFilesByGlobs(join136(this.baseDir, "AGENTS.md"));
20268
20539
  return buildDeletionRulesFromPaths(mirrorPaths);
20269
20540
  })();
20270
20541
  const nonRootToolRules = await (async () => {
20271
20542
  if (!settablePaths.nonRoot) {
20272
20543
  return [];
20273
20544
  }
20274
- const nonRootBaseDir = join135(this.baseDir, settablePaths.nonRoot.relativeDirPath);
20545
+ const nonRootBaseDir = join136(this.baseDir, settablePaths.nonRoot.relativeDirPath);
20275
20546
  const nonRootFilePaths = await findFilesByGlobs(
20276
- join135(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
20547
+ join136(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
20277
20548
  );
20278
20549
  if (forDeletion) {
20279
20550
  return buildDeletionRulesFromPaths(nonRootFilePaths, {
@@ -20287,7 +20558,7 @@ var RulesProcessor = class extends FeatureProcessor {
20287
20558
  const ok = RovodevRule.isAllowedModularRulesRelativePath(relativeFilePath);
20288
20559
  if (!ok) {
20289
20560
  this.logger.warn(
20290
- `Skipping reserved Rovodev path under modular-rules (import): ${join135(modularRootRelative, relativeFilePath)}`
20561
+ `Skipping reserved Rovodev path under modular-rules (import): ${join136(modularRootRelative, relativeFilePath)}`
20291
20562
  );
20292
20563
  }
20293
20564
  return ok;
@@ -20413,14 +20684,14 @@ s/<command> [arguments]
20413
20684
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
20414
20685
  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
20686
 
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.` : "";
20687
+ 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
20688
  const subagentsSection = subagents ? `## Simulated Subagents
20418
20689
 
20419
20690
  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
20691
 
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.
20692
+ 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
20693
 
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.` : "";
20694
+ 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
20695
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
20425
20696
  const result = [
20426
20697
  overview,
@@ -20520,7 +20791,7 @@ function warnUnsupportedTargets(params) {
20520
20791
  }
20521
20792
  }
20522
20793
  async function checkRulesyncDirExists(params) {
20523
- return fileExists(join136(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
20794
+ return fileExists(join137(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
20524
20795
  }
20525
20796
  async function generate(params) {
20526
20797
  const { config, logger } = params;