rulesync 8.22.0 → 8.23.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.
@@ -10533,6 +10533,101 @@ var RovodevMcp = class _RovodevMcp extends ToolMcp {
10533
10533
  }
10534
10534
  };
10535
10535
 
10536
+ // src/features/mcp/zed-mcp.ts
10537
+ import { join as join69 } from "path";
10538
+ var ZedMcp = class _ZedMcp extends ToolMcp {
10539
+ json;
10540
+ constructor(params) {
10541
+ super(params);
10542
+ this.json = JSON.parse(this.fileContent || "{}");
10543
+ }
10544
+ getJson() {
10545
+ return this.json;
10546
+ }
10547
+ static getSettablePaths({ global } = {}) {
10548
+ if (global) {
10549
+ return {
10550
+ relativeDirPath: join69(".config", "zed"),
10551
+ relativeFilePath: "settings.json"
10552
+ };
10553
+ }
10554
+ return {
10555
+ relativeDirPath: ".zed",
10556
+ relativeFilePath: "settings.json"
10557
+ };
10558
+ }
10559
+ static async fromFile({
10560
+ outputRoot = process.cwd(),
10561
+ validate = true,
10562
+ global = false
10563
+ }) {
10564
+ const paths = this.getSettablePaths({ global });
10565
+ const fileContent = await readFileContentOrNull(
10566
+ join69(outputRoot, paths.relativeDirPath, paths.relativeFilePath)
10567
+ ) ?? "{}";
10568
+ const json = JSON.parse(fileContent);
10569
+ const newJson = { ...json, context_servers: json.context_servers ?? {} };
10570
+ return new _ZedMcp({
10571
+ outputRoot,
10572
+ relativeDirPath: paths.relativeDirPath,
10573
+ relativeFilePath: paths.relativeFilePath,
10574
+ fileContent: JSON.stringify(newJson, null, 2),
10575
+ validate
10576
+ });
10577
+ }
10578
+ static async fromRulesyncMcp({
10579
+ outputRoot = process.cwd(),
10580
+ rulesyncMcp,
10581
+ validate = true,
10582
+ global = false
10583
+ }) {
10584
+ const paths = this.getSettablePaths({ global });
10585
+ const fileContent = await readOrInitializeFileContent(
10586
+ join69(outputRoot, paths.relativeDirPath, paths.relativeFilePath),
10587
+ "{}"
10588
+ );
10589
+ const json = JSON.parse(fileContent);
10590
+ const newJson = { ...json, context_servers: rulesyncMcp.getMcpServers() };
10591
+ return new _ZedMcp({
10592
+ outputRoot,
10593
+ relativeDirPath: paths.relativeDirPath,
10594
+ relativeFilePath: paths.relativeFilePath,
10595
+ fileContent: JSON.stringify(newJson, null, 2),
10596
+ validate
10597
+ });
10598
+ }
10599
+ toRulesyncMcp() {
10600
+ return this.toRulesyncMcpDefault({
10601
+ fileContent: JSON.stringify({ mcpServers: this.json.context_servers ?? {} }, null, 2)
10602
+ });
10603
+ }
10604
+ validate() {
10605
+ return { success: true, error: null };
10606
+ }
10607
+ /**
10608
+ * settings.json is a user-managed file shared with other features
10609
+ * (e.g. ignore's `private_files`), so it must not be deleted.
10610
+ */
10611
+ isDeletable() {
10612
+ return false;
10613
+ }
10614
+ static forDeletion({
10615
+ outputRoot = process.cwd(),
10616
+ relativeDirPath,
10617
+ relativeFilePath,
10618
+ global = false
10619
+ }) {
10620
+ return new _ZedMcp({
10621
+ outputRoot,
10622
+ relativeDirPath,
10623
+ relativeFilePath,
10624
+ fileContent: "{}",
10625
+ validate: false,
10626
+ global
10627
+ });
10628
+ }
10629
+ };
10630
+
10536
10631
  // src/features/mcp/mcp-processor.ts
10537
10632
  var mcpProcessorToolTargetTuple = [
10538
10633
  "antigravity-cli",
@@ -10552,7 +10647,8 @@ var mcpProcessorToolTargetTuple = [
10552
10647
  "junie",
10553
10648
  "opencode",
10554
10649
  "roo",
10555
- "rovodev"
10650
+ "rovodev",
10651
+ "zed"
10556
10652
  ];
10557
10653
  var McpProcessorToolTargetSchema = z29.enum(mcpProcessorToolTargetTuple);
10558
10654
  var toolMcpFactories = /* @__PURE__ */ new Map([
@@ -10777,6 +10873,18 @@ var toolMcpFactories = /* @__PURE__ */ new Map([
10777
10873
  supportsDisabledTools: false
10778
10874
  }
10779
10875
  }
10876
+ ],
10877
+ [
10878
+ "zed",
10879
+ {
10880
+ class: ZedMcp,
10881
+ meta: {
10882
+ supportsProject: true,
10883
+ supportsGlobal: true,
10884
+ supportsEnabledTools: false,
10885
+ supportsDisabledTools: false
10886
+ }
10887
+ }
10780
10888
  ]
10781
10889
  ]);
10782
10890
  var allToolTargetKeys2 = [...toolMcpFactories.keys()];
@@ -10928,11 +11036,11 @@ var McpProcessor = class extends FeatureProcessor {
10928
11036
  import { z as z38 } from "zod/mini";
10929
11037
 
10930
11038
  // src/features/permissions/antigravity-cli-permissions.ts
10931
- import { join as join70 } from "path";
11039
+ import { join as join71 } from "path";
10932
11040
  import { uniq as uniq3 } from "es-toolkit";
10933
11041
 
10934
11042
  // src/features/permissions/rulesync-permissions.ts
10935
- import { join as join69 } from "path";
11043
+ import { join as join70 } from "path";
10936
11044
 
10937
11045
  // src/types/permissions.ts
10938
11046
  import { z as z30 } from "zod/mini";
@@ -10977,7 +11085,7 @@ var RulesyncPermissions = class _RulesyncPermissions extends RulesyncFile {
10977
11085
  validate = true
10978
11086
  }) {
10979
11087
  const paths = _RulesyncPermissions.getSettablePaths();
10980
- const filePath = join69(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11088
+ const filePath = join70(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
10981
11089
  if (!await fileExists(filePath)) {
10982
11090
  throw new Error(`No ${RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH} found.`);
10983
11091
  }
@@ -11067,7 +11175,7 @@ var AntigravityCliPermissions = class _AntigravityCliPermissions extends ToolPer
11067
11175
  }
11068
11176
  static getSettablePaths() {
11069
11177
  return {
11070
- relativeDirPath: join70(".gemini", "antigravity-cli"),
11178
+ relativeDirPath: join71(".gemini", "antigravity-cli"),
11071
11179
  relativeFilePath: "settings.json"
11072
11180
  };
11073
11181
  }
@@ -11076,7 +11184,7 @@ var AntigravityCliPermissions = class _AntigravityCliPermissions extends ToolPer
11076
11184
  validate = true
11077
11185
  }) {
11078
11186
  const paths = _AntigravityCliPermissions.getSettablePaths();
11079
- const filePath = join70(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11187
+ const filePath = join71(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11080
11188
  const fileContent = await readFileContentOrNull(filePath) ?? '{"permissions":{}}';
11081
11189
  return new _AntigravityCliPermissions({
11082
11190
  outputRoot,
@@ -11092,7 +11200,7 @@ var AntigravityCliPermissions = class _AntigravityCliPermissions extends ToolPer
11092
11200
  rulesyncPermissions
11093
11201
  }) {
11094
11202
  const paths = _AntigravityCliPermissions.getSettablePaths();
11095
- const filePath = join70(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11203
+ const filePath = join71(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11096
11204
  const existingContent = await readOrInitializeFileContent(
11097
11205
  filePath,
11098
11206
  JSON.stringify({}, null, 2)
@@ -11159,7 +11267,7 @@ var AntigravityCliPermissions = class _AntigravityCliPermissions extends ToolPer
11159
11267
  settings = JSON.parse(this.getFileContent());
11160
11268
  } catch (error) {
11161
11269
  throw new Error(
11162
- `Failed to parse Antigravity CLI permissions content in ${join70(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
11270
+ `Failed to parse Antigravity CLI permissions content in ${join71(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
11163
11271
  { cause: error }
11164
11272
  );
11165
11273
  }
@@ -11233,7 +11341,7 @@ function convertAntigravityCliToRulesyncPermissions(params) {
11233
11341
  }
11234
11342
 
11235
11343
  // src/features/permissions/augmentcode-permissions.ts
11236
- import { join as join71 } from "path";
11344
+ import { join as join72 } from "path";
11237
11345
  import { z as z31 } from "zod/mini";
11238
11346
  var moduleLogger = new ConsoleLogger();
11239
11347
  var AugmentPermissionTypeSchema = z31.enum(["allow", "deny", "ask-user"]);
@@ -11383,7 +11491,7 @@ var AugmentcodePermissions = class _AugmentcodePermissions extends ToolPermissio
11383
11491
  global = false
11384
11492
  }) {
11385
11493
  const paths = _AugmentcodePermissions.getSettablePaths({ global });
11386
- const filePath = join71(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11494
+ const filePath = join72(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11387
11495
  const fileContent = await readFileContentOrNull(filePath) ?? '{"toolPermissions":[]}';
11388
11496
  return new _AugmentcodePermissions({
11389
11497
  outputRoot,
@@ -11400,7 +11508,7 @@ var AugmentcodePermissions = class _AugmentcodePermissions extends ToolPermissio
11400
11508
  logger
11401
11509
  }) {
11402
11510
  const paths = _AugmentcodePermissions.getSettablePaths({ global });
11403
- const filePath = join71(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11511
+ const filePath = join72(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11404
11512
  const existingContent = await readFileContentOrNull(filePath) ?? "{}";
11405
11513
  let settings;
11406
11514
  try {
@@ -11455,7 +11563,7 @@ var AugmentcodePermissions = class _AugmentcodePermissions extends ToolPermissio
11455
11563
  settings = result.data;
11456
11564
  } catch (error) {
11457
11565
  throw new Error(
11458
- `Failed to parse AugmentCode permissions content in ${join71(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
11566
+ `Failed to parse AugmentCode permissions content in ${join72(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
11459
11567
  { cause: error }
11460
11568
  );
11461
11569
  }
@@ -11623,7 +11731,7 @@ function convertAugmentToRulesyncPermissions({
11623
11731
  }
11624
11732
 
11625
11733
  // src/features/permissions/claudecode-permissions.ts
11626
- import { join as join72 } from "path";
11734
+ import { join as join73 } from "path";
11627
11735
  import { uniq as uniq4 } from "es-toolkit";
11628
11736
  var CANONICAL_TO_CLAUDE_TOOL_NAMES = {
11629
11737
  bash: "Bash",
@@ -11685,7 +11793,7 @@ var ClaudecodePermissions = class _ClaudecodePermissions extends ToolPermissions
11685
11793
  validate = true
11686
11794
  }) {
11687
11795
  const paths = _ClaudecodePermissions.getSettablePaths();
11688
- const filePath = join72(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11796
+ const filePath = join73(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11689
11797
  const fileContent = await readFileContentOrNull(filePath) ?? '{"permissions":{}}';
11690
11798
  return new _ClaudecodePermissions({
11691
11799
  outputRoot,
@@ -11701,7 +11809,7 @@ var ClaudecodePermissions = class _ClaudecodePermissions extends ToolPermissions
11701
11809
  logger
11702
11810
  }) {
11703
11811
  const paths = _ClaudecodePermissions.getSettablePaths();
11704
- const filePath = join72(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11812
+ const filePath = join73(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11705
11813
  const existingContent = await readOrInitializeFileContent(
11706
11814
  filePath,
11707
11815
  JSON.stringify({}, null, 2)
@@ -11778,7 +11886,7 @@ var ClaudecodePermissions = class _ClaudecodePermissions extends ToolPermissions
11778
11886
  settings = JSON.parse(this.getFileContent());
11779
11887
  } catch (error) {
11780
11888
  throw new Error(
11781
- `Failed to parse Claude permissions content in ${join72(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
11889
+ `Failed to parse Claude permissions content in ${join73(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
11782
11890
  { cause: error }
11783
11891
  );
11784
11892
  }
@@ -11851,7 +11959,7 @@ function convertClaudeToRulesyncPermissions(params) {
11851
11959
  }
11852
11960
 
11853
11961
  // src/features/permissions/cline-permissions.ts
11854
- import { join as join73 } from "path";
11962
+ import { join as join74 } from "path";
11855
11963
  import { uniq as uniq5 } from "es-toolkit";
11856
11964
  import { z as z32 } from "zod/mini";
11857
11965
  var ClineCommandPermissionsSchema = z32.looseObject({
@@ -11887,7 +11995,7 @@ var ClinePermissions = class _ClinePermissions extends ToolPermissions {
11887
11995
  global = false
11888
11996
  }) {
11889
11997
  const paths = _ClinePermissions.getSettablePaths({ global });
11890
- const filePath = join73(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11998
+ const filePath = join74(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11891
11999
  const fileContent = await readFileContentOrNull(filePath) ?? "{}";
11892
12000
  return new _ClinePermissions({
11893
12001
  outputRoot,
@@ -11904,7 +12012,7 @@ var ClinePermissions = class _ClinePermissions extends ToolPermissions {
11904
12012
  logger
11905
12013
  }) {
11906
12014
  const paths = _ClinePermissions.getSettablePaths({ global });
11907
- const filePath = join73(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
12015
+ const filePath = join74(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
11908
12016
  const existingContent = await readFileContentOrNull(filePath) ?? "{}";
11909
12017
  let existing;
11910
12018
  try {
@@ -11992,7 +12100,7 @@ var ClinePermissions = class _ClinePermissions extends ToolPermissions {
11992
12100
  parsed = result.data;
11993
12101
  } catch (error) {
11994
12102
  throw new Error(
11995
- `Failed to parse Cline permissions content in ${join73(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
12103
+ `Failed to parse Cline permissions content in ${join74(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
11996
12104
  { cause: error }
11997
12105
  );
11998
12106
  }
@@ -12039,11 +12147,11 @@ var ClinePermissions = class _ClinePermissions extends ToolPermissions {
12039
12147
  };
12040
12148
 
12041
12149
  // src/features/permissions/codexcli-permissions.ts
12042
- import { isAbsolute as isAbsolute3, join as join74 } from "path";
12150
+ import { isAbsolute as isAbsolute3, join as join75 } from "path";
12043
12151
  import * as smolToml4 from "smol-toml";
12044
12152
  var RULESYNC_PROFILE_NAME = "rulesync";
12045
12153
  var RULESYNC_BASH_RULES_FILE_NAME = "rulesync.rules";
12046
- var CODEX_PROJECT_ROOTS_KEY = ":project_roots";
12154
+ var CODEX_WORKSPACE_ROOTS_KEY = ":workspace_roots";
12047
12155
  var CODEX_GLOB_SCAN_MAX_DEPTH = 8;
12048
12156
  var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
12049
12157
  static getSettablePaths(_options = {}) {
@@ -12061,7 +12169,7 @@ var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
12061
12169
  global = false
12062
12170
  }) {
12063
12171
  const paths = this.getSettablePaths({ global });
12064
- const filePath = join74(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
12172
+ const filePath = join75(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
12065
12173
  const fileContent = await readFileContentOrNull(filePath) ?? smolToml4.stringify({});
12066
12174
  return new _CodexcliPermissions({
12067
12175
  outputRoot,
@@ -12079,7 +12187,7 @@ var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
12079
12187
  global = false
12080
12188
  }) {
12081
12189
  const paths = this.getSettablePaths({ global });
12082
- const filePath = join74(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
12190
+ const filePath = join75(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
12083
12191
  const existingContent = await readFileContentOrNull(filePath) ?? smolToml4.stringify({});
12084
12192
  const parsed = toMutableTable(smolToml4.parse(existingContent));
12085
12193
  const profile = convertRulesyncToCodexProfile({
@@ -12104,7 +12212,7 @@ var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
12104
12212
  parsed = smolToml4.parse(this.getFileContent());
12105
12213
  } catch (error) {
12106
12214
  throw new Error(
12107
- `Failed to parse Codex CLI permissions content in ${join74(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
12215
+ `Failed to parse Codex CLI permissions content in ${join75(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
12108
12216
  { cause: error }
12109
12217
  );
12110
12218
  }
@@ -12145,7 +12253,7 @@ function createCodexcliBashRulesFile({
12145
12253
  }) {
12146
12254
  return new CodexcliRulesFile({
12147
12255
  outputRoot,
12148
- relativeDirPath: join74(".codex", "rules"),
12256
+ relativeDirPath: join75(".codex", "rules"),
12149
12257
  relativeFilePath: RULESYNC_BASH_RULES_FILE_NAME,
12150
12258
  fileContent: buildCodexBashRulesContent(config)
12151
12259
  });
@@ -12155,14 +12263,14 @@ function convertRulesyncToCodexProfile({
12155
12263
  logger
12156
12264
  }) {
12157
12265
  const filesystem = {};
12158
- const projectRootFilesystem = {};
12266
+ const workspaceRootFilesystem = {};
12159
12267
  const domains = {};
12160
12268
  for (const [toolName, rules] of Object.entries(config.permission)) {
12161
12269
  if (toolName === "read") {
12162
12270
  for (const [pattern, action] of Object.entries(rules)) {
12163
12271
  addFilesystemRule({
12164
12272
  filesystem,
12165
- projectRootFilesystem,
12273
+ workspaceRootFilesystem,
12166
12274
  pattern,
12167
12275
  access: mapReadAction(action),
12168
12276
  logger
@@ -12174,7 +12282,7 @@ function convertRulesyncToCodexProfile({
12174
12282
  for (const [pattern, action] of Object.entries(rules)) {
12175
12283
  addFilesystemRule({
12176
12284
  filesystem,
12177
- projectRootFilesystem,
12285
+ workspaceRootFilesystem,
12178
12286
  pattern,
12179
12287
  access: mapWriteAction(action),
12180
12288
  logger
@@ -12198,16 +12306,16 @@ function convertRulesyncToCodexProfile({
12198
12306
  `Codex CLI permissions support only read/edit/write/webfetch categories. Skipping: ${toolName}`
12199
12307
  );
12200
12308
  }
12201
- if (Object.keys(projectRootFilesystem).length > 0) {
12202
- if (typeof filesystem[CODEX_PROJECT_ROOTS_KEY] === "string") {
12309
+ if (Object.keys(workspaceRootFilesystem).length > 0) {
12310
+ if (typeof filesystem[CODEX_WORKSPACE_ROOTS_KEY] === "string") {
12203
12311
  logger?.warn(
12204
- `"${CODEX_PROJECT_ROOTS_KEY}" is set as a direct filesystem access rule in the permissions, but it will be overwritten by project-root rules. Consider removing the direct "${CODEX_PROJECT_ROOTS_KEY}" entry.`
12312
+ `"${CODEX_WORKSPACE_ROOTS_KEY}" is set as a direct filesystem access rule in the permissions, but it will be overwritten by workspace-root rules. Consider removing the direct "${CODEX_WORKSPACE_ROOTS_KEY}" entry.`
12205
12313
  );
12206
12314
  }
12207
- if (Object.keys(projectRootFilesystem).some((pattern) => pattern.includes("**"))) {
12315
+ if (Object.keys(workspaceRootFilesystem).some((pattern) => pattern.includes("**"))) {
12208
12316
  filesystem.glob_scan_max_depth = CODEX_GLOB_SCAN_MAX_DEPTH;
12209
12317
  }
12210
- filesystem[CODEX_PROJECT_ROOTS_KEY] = projectRootFilesystem;
12318
+ filesystem[CODEX_WORKSPACE_ROOTS_KEY] = workspaceRootFilesystem;
12211
12319
  }
12212
12320
  return {
12213
12321
  ...Object.keys(filesystem).length > 0 ? { filesystem } : {},
@@ -12252,7 +12360,7 @@ function toCodexProfile(value) {
12252
12360
  }
12253
12361
  function addFilesystemRule({
12254
12362
  filesystem,
12255
- projectRootFilesystem,
12363
+ workspaceRootFilesystem,
12256
12364
  pattern,
12257
12365
  access,
12258
12366
  logger
@@ -12265,13 +12373,13 @@ function addFilesystemRule({
12265
12373
  filesystem[pattern] = access;
12266
12374
  return;
12267
12375
  }
12268
- projectRootFilesystem[pattern] = access;
12376
+ workspaceRootFilesystem[pattern] = access;
12269
12377
  }
12270
12378
  function canBeCodexFilesystemRoot(pattern) {
12271
12379
  return isAbsolute3(pattern) || /^[A-Za-z]:[\\/]/.test(pattern) || pattern.startsWith("~/") || pattern === "~" || pattern.startsWith(":");
12272
12380
  }
12273
12381
  function addRulesyncFilesystemRule(permission, pattern, access) {
12274
- if (access === "none") {
12382
+ if (access === "deny" || access === "none") {
12275
12383
  permission.read ??= {};
12276
12384
  permission.edit ??= {};
12277
12385
  permission.read[pattern] = "deny";
@@ -12310,7 +12418,7 @@ function toFilesystemRecord(value) {
12310
12418
  return Object.keys(result).length > 0 ? result : void 0;
12311
12419
  }
12312
12420
  function isCodexFilesystemAccess(value) {
12313
- return value === "read" || value === "write" || value === "none";
12421
+ return value === "read" || value === "write" || value === "deny" || value === "none";
12314
12422
  }
12315
12423
  function isCodexFilesystemRuleTable(value) {
12316
12424
  if (!value || typeof value !== "object" || Array.isArray(value)) return false;
@@ -12337,10 +12445,10 @@ function toDomainRecord(value) {
12337
12445
  return Object.keys(result).length > 0 ? result : void 0;
12338
12446
  }
12339
12447
  function mapReadAction(action) {
12340
- return action === "allow" ? "read" : "none";
12448
+ return action === "allow" ? "read" : "deny";
12341
12449
  }
12342
12450
  function mapWriteAction(action) {
12343
- return action === "allow" ? "write" : "none";
12451
+ return action === "allow" ? "write" : "deny";
12344
12452
  }
12345
12453
  function buildCodexBashRulesContent(config) {
12346
12454
  const bashRules = config.permission.bash ?? {};
@@ -12384,7 +12492,7 @@ function mapBashActionToDecision(action) {
12384
12492
  }
12385
12493
 
12386
12494
  // src/features/permissions/cursor-permissions.ts
12387
- import { join as join75 } from "path";
12495
+ import { join as join76 } from "path";
12388
12496
  import { uniq as uniq6 } from "es-toolkit";
12389
12497
  var CANONICAL_TO_CURSOR_TYPE = {
12390
12498
  bash: "Shell",
@@ -12502,7 +12610,7 @@ var CursorPermissions = class _CursorPermissions extends ToolPermissions {
12502
12610
  global = false
12503
12611
  }) {
12504
12612
  const paths = _CursorPermissions.getSettablePaths({ global });
12505
- const filePath = join75(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
12613
+ const filePath = join76(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
12506
12614
  const fileContent = await readFileContentOrNull(filePath) ?? '{"permissions":{}}';
12507
12615
  return new _CursorPermissions({
12508
12616
  outputRoot,
@@ -12519,7 +12627,7 @@ var CursorPermissions = class _CursorPermissions extends ToolPermissions {
12519
12627
  global = false
12520
12628
  }) {
12521
12629
  const paths = _CursorPermissions.getSettablePaths({ global });
12522
- const filePath = join75(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
12630
+ const filePath = join76(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
12523
12631
  const existingContent = await readOrInitializeFileContent(
12524
12632
  filePath,
12525
12633
  JSON.stringify({}, null, 2)
@@ -12595,7 +12703,7 @@ var CursorPermissions = class _CursorPermissions extends ToolPermissions {
12595
12703
  settings = asCursorCliConfig(JSON.parse(this.getFileContent()));
12596
12704
  } catch (error) {
12597
12705
  throw new Error(
12598
- `Failed to parse Cursor CLI permissions content in ${join75(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
12706
+ `Failed to parse Cursor CLI permissions content in ${join76(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
12599
12707
  { cause: error }
12600
12708
  );
12601
12709
  }
@@ -12670,10 +12778,10 @@ function convertCursorToRulesyncPermissions(params) {
12670
12778
  }
12671
12779
 
12672
12780
  // src/features/permissions/geminicli-permissions.ts
12673
- import { join as join76 } from "path";
12781
+ import { join as join77 } from "path";
12674
12782
  import * as smolToml5 from "smol-toml";
12675
12783
  import { z as z33 } from "zod/mini";
12676
- var GEMINICLI_POLICY_RELATIVE_DIR_PATH = join76(".gemini", "policies");
12784
+ var GEMINICLI_POLICY_RELATIVE_DIR_PATH = join77(".gemini", "policies");
12677
12785
  var GEMINICLI_POLICY_FILE_NAME = "rulesync.toml";
12678
12786
  var RULESYNC_TO_GEMINICLI_TOOL_NAME = {
12679
12787
  bash: "run_shell_command",
@@ -12714,7 +12822,7 @@ var GeminicliPermissions = class _GeminicliPermissions extends ToolPermissions {
12714
12822
  global = false
12715
12823
  }) {
12716
12824
  const paths = this.getSettablePaths({ global });
12717
- const filePath = join76(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
12825
+ const filePath = join77(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
12718
12826
  const fileContent = await readFileContentOrNull(filePath) ?? "";
12719
12827
  return new _GeminicliPermissions({
12720
12828
  outputRoot,
@@ -12750,7 +12858,7 @@ var GeminicliPermissions = class _GeminicliPermissions extends ToolPermissions {
12750
12858
  parsed = smolToml5.parse(fileContent);
12751
12859
  } catch (error) {
12752
12860
  throw new Error(
12753
- `Failed to parse Gemini CLI policy TOML in ${join76(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
12861
+ `Failed to parse Gemini CLI policy TOML in ${join77(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
12754
12862
  { cause: error }
12755
12863
  );
12756
12864
  }
@@ -13042,7 +13150,7 @@ function extractPattern(rule) {
13042
13150
  }
13043
13151
 
13044
13152
  // src/features/permissions/kilo-permissions.ts
13045
- import { join as join77 } from "path";
13153
+ import { join as join78 } from "path";
13046
13154
  import { parse as parseJsonc5, printParseErrorCode } from "jsonc-parser";
13047
13155
  import { z as z34 } from "zod/mini";
13048
13156
  var KiloPermissionSchema = z34.union([
@@ -13103,7 +13211,7 @@ var KiloPermissions = class _KiloPermissions extends ToolPermissions {
13103
13211
  static getSettablePaths({
13104
13212
  global = false
13105
13213
  } = {}) {
13106
- return global ? { relativeDirPath: join77(".config", "kilo"), relativeFilePath: KILO_FILE_NAME } : { relativeDirPath: ".", relativeFilePath: KILO_FILE_NAME };
13214
+ return global ? { relativeDirPath: join78(".config", "kilo"), relativeFilePath: KILO_FILE_NAME } : { relativeDirPath: ".", relativeFilePath: KILO_FILE_NAME };
13107
13215
  }
13108
13216
  static async fromFile({
13109
13217
  outputRoot = process.cwd(),
@@ -13111,7 +13219,7 @@ var KiloPermissions = class _KiloPermissions extends ToolPermissions {
13111
13219
  global = false
13112
13220
  }) {
13113
13221
  const basePaths = _KiloPermissions.getSettablePaths({ global });
13114
- const filePath = join77(outputRoot, basePaths.relativeDirPath, basePaths.relativeFilePath);
13222
+ const filePath = join78(outputRoot, basePaths.relativeDirPath, basePaths.relativeFilePath);
13115
13223
  const fileContent = await readFileContentOrNull(filePath);
13116
13224
  const parsed = parseKiloJsoncStrict(fileContent ?? "{}", filePath);
13117
13225
  const nextJson = { ...parsed, permission: parsed.permission ?? {} };
@@ -13130,7 +13238,7 @@ var KiloPermissions = class _KiloPermissions extends ToolPermissions {
13130
13238
  logger
13131
13239
  }) {
13132
13240
  const basePaths = _KiloPermissions.getSettablePaths({ global });
13133
- const filePath = join77(outputRoot, basePaths.relativeDirPath, basePaths.relativeFilePath);
13241
+ const filePath = join78(outputRoot, basePaths.relativeDirPath, basePaths.relativeFilePath);
13134
13242
  const fileContent = await readFileContentOrNull(filePath);
13135
13243
  const parsed = parseKiloJsoncStrict(fileContent ?? "{}", filePath);
13136
13244
  const parsedPermission = parsed.permission;
@@ -13216,7 +13324,7 @@ var KiloPermissions = class _KiloPermissions extends ToolPermissions {
13216
13324
  };
13217
13325
 
13218
13326
  // src/features/permissions/kiro-permissions.ts
13219
- import { join as join78 } from "path";
13327
+ import { join as join79 } from "path";
13220
13328
  import { z as z35 } from "zod/mini";
13221
13329
  var KiroAgentSchema = z35.looseObject({
13222
13330
  allowedTools: z35.optional(z35.array(z35.string())),
@@ -13226,7 +13334,7 @@ var UnknownRecordSchema = z35.record(z35.string(), z35.unknown());
13226
13334
  var KiroPermissions = class _KiroPermissions extends ToolPermissions {
13227
13335
  static getSettablePaths(_options = {}) {
13228
13336
  return {
13229
- relativeDirPath: join78(".kiro", "agents"),
13337
+ relativeDirPath: join79(".kiro", "agents"),
13230
13338
  relativeFilePath: "default.json"
13231
13339
  };
13232
13340
  }
@@ -13238,7 +13346,7 @@ var KiroPermissions = class _KiroPermissions extends ToolPermissions {
13238
13346
  validate = true
13239
13347
  }) {
13240
13348
  const paths = this.getSettablePaths();
13241
- const filePath = join78(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
13349
+ const filePath = join79(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
13242
13350
  const fileContent = await readFileContentOrNull(filePath) ?? JSON.stringify({}, null, 2);
13243
13351
  return new _KiroPermissions({
13244
13352
  outputRoot,
@@ -13255,7 +13363,7 @@ var KiroPermissions = class _KiroPermissions extends ToolPermissions {
13255
13363
  logger
13256
13364
  }) {
13257
13365
  const paths = this.getSettablePaths();
13258
- const filePath = join78(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
13366
+ const filePath = join79(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
13259
13367
  const existingContent = await readFileContentOrNull(filePath) ?? JSON.stringify({}, null, 2);
13260
13368
  const parsedResult = KiroAgentSchema.safeParse(JSON.parse(existingContent));
13261
13369
  if (!parsedResult.success) {
@@ -13279,7 +13387,7 @@ var KiroPermissions = class _KiroPermissions extends ToolPermissions {
13279
13387
  parsed = KiroAgentSchema.parse(JSON.parse(this.getFileContent()));
13280
13388
  } catch (error) {
13281
13389
  throw new Error(
13282
- `Failed to parse Kiro permissions content in ${join78(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
13390
+ `Failed to parse Kiro permissions content in ${join79(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
13283
13391
  { cause: error }
13284
13392
  );
13285
13393
  }
@@ -13404,7 +13512,7 @@ function asStringArray(value) {
13404
13512
  }
13405
13513
 
13406
13514
  // src/features/permissions/opencode-permissions.ts
13407
- import { join as join79 } from "path";
13515
+ import { join as join80 } from "path";
13408
13516
  import { parse as parseJsonc6 } from "jsonc-parser";
13409
13517
  import { z as z36 } from "zod/mini";
13410
13518
  var OpencodePermissionSchema = z36.union([
@@ -13429,7 +13537,7 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
13429
13537
  static getSettablePaths({
13430
13538
  global = false
13431
13539
  } = {}) {
13432
- return global ? { relativeDirPath: join79(".config", "opencode"), relativeFilePath: "opencode.json" } : { relativeDirPath: ".", relativeFilePath: "opencode.json" };
13540
+ return global ? { relativeDirPath: join80(".config", "opencode"), relativeFilePath: "opencode.json" } : { relativeDirPath: ".", relativeFilePath: "opencode.json" };
13433
13541
  }
13434
13542
  static async fromFile({
13435
13543
  outputRoot = process.cwd(),
@@ -13437,9 +13545,9 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
13437
13545
  global = false
13438
13546
  }) {
13439
13547
  const basePaths = _OpencodePermissions.getSettablePaths({ global });
13440
- const jsonDir = join79(outputRoot, basePaths.relativeDirPath);
13441
- const jsoncPath = join79(jsonDir, "opencode.jsonc");
13442
- const jsonPath = join79(jsonDir, "opencode.json");
13548
+ const jsonDir = join80(outputRoot, basePaths.relativeDirPath);
13549
+ const jsoncPath = join80(jsonDir, "opencode.jsonc");
13550
+ const jsonPath = join80(jsonDir, "opencode.json");
13443
13551
  let fileContent = await readFileContentOrNull(jsoncPath);
13444
13552
  let relativeFilePath = "opencode.jsonc";
13445
13553
  if (!fileContent) {
@@ -13464,9 +13572,9 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
13464
13572
  global = false
13465
13573
  }) {
13466
13574
  const basePaths = _OpencodePermissions.getSettablePaths({ global });
13467
- const jsonDir = join79(outputRoot, basePaths.relativeDirPath);
13468
- const jsoncPath = join79(jsonDir, "opencode.jsonc");
13469
- const jsonPath = join79(jsonDir, "opencode.json");
13575
+ const jsonDir = join80(outputRoot, basePaths.relativeDirPath);
13576
+ const jsoncPath = join80(jsonDir, "opencode.jsonc");
13577
+ const jsonPath = join80(jsonDir, "opencode.json");
13470
13578
  let fileContent = await readFileContentOrNull(jsoncPath);
13471
13579
  let relativeFilePath = "opencode.jsonc";
13472
13580
  if (!fileContent) {
@@ -13536,7 +13644,7 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
13536
13644
  };
13537
13645
 
13538
13646
  // src/features/permissions/qwencode-permissions.ts
13539
- import { join as join80 } from "path";
13647
+ import { join as join81 } from "path";
13540
13648
  import { uniq as uniq7 } from "es-toolkit";
13541
13649
  import { z as z37 } from "zod/mini";
13542
13650
  var QwenSettingsPermissionsSchema = z37.looseObject({
@@ -13624,7 +13732,7 @@ var QwencodePermissions = class _QwencodePermissions extends ToolPermissions {
13624
13732
  global = false
13625
13733
  }) {
13626
13734
  const paths = _QwencodePermissions.getSettablePaths({ global });
13627
- const filePath = join80(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
13735
+ const filePath = join81(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
13628
13736
  const fileContent = await readFileContentOrNull(filePath) ?? '{"permissions":{}}';
13629
13737
  return new _QwencodePermissions({
13630
13738
  outputRoot,
@@ -13641,7 +13749,7 @@ var QwencodePermissions = class _QwencodePermissions extends ToolPermissions {
13641
13749
  logger
13642
13750
  }) {
13643
13751
  const paths = _QwencodePermissions.getSettablePaths({ global });
13644
- const filePath = join80(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
13752
+ const filePath = join81(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
13645
13753
  const existingContent = await readFileContentOrNull(filePath) ?? "{}";
13646
13754
  let settings;
13647
13755
  try {
@@ -13714,7 +13822,7 @@ var QwencodePermissions = class _QwencodePermissions extends ToolPermissions {
13714
13822
  settings = result.data;
13715
13823
  } catch (error) {
13716
13824
  throw new Error(
13717
- `Failed to parse Qwen permissions content in ${join80(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
13825
+ `Failed to parse Qwen permissions content in ${join81(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
13718
13826
  { cause: error }
13719
13827
  );
13720
13828
  }
@@ -14057,25 +14165,25 @@ var PermissionsProcessor = class extends FeatureProcessor {
14057
14165
  };
14058
14166
 
14059
14167
  // src/features/rules/rules-processor.ts
14060
- import { basename as basename11, dirname as dirname3, join as join160, relative as relative6 } from "path";
14168
+ import { basename as basename11, dirname as dirname3, join as join163, relative as relative6 } from "path";
14061
14169
  import { encode } from "@toon-format/toon";
14062
- import { z as z81 } from "zod/mini";
14170
+ import { z as z82 } from "zod/mini";
14063
14171
 
14064
14172
  // src/constants/general.ts
14065
14173
  var SKILL_FILE_NAME = "SKILL.md";
14066
14174
 
14067
14175
  // src/features/skills/agentsmd-skill.ts
14068
- import { join as join84 } from "path";
14176
+ import { join as join85 } from "path";
14069
14177
 
14070
14178
  // src/features/skills/simulated-skill.ts
14071
- import { join as join83 } from "path";
14179
+ import { join as join84 } from "path";
14072
14180
  import { z as z39 } from "zod/mini";
14073
14181
 
14074
14182
  // src/features/skills/tool-skill.ts
14075
- import { join as join82 } from "path";
14183
+ import { join as join83 } from "path";
14076
14184
 
14077
14185
  // src/types/ai-dir.ts
14078
- import path2, { basename as basename4, join as join81, relative as relative4, resolve as resolve5 } from "path";
14186
+ import path2, { basename as basename4, join as join82, relative as relative4, resolve as resolve5 } from "path";
14079
14187
  var AiDir = class {
14080
14188
  /**
14081
14189
  * @example "."
@@ -14172,8 +14280,8 @@ var AiDir = class {
14172
14280
  * @returns Array of files with their relative paths and buffers
14173
14281
  */
14174
14282
  static async collectOtherFiles(outputRoot, relativeDirPath, dirName, excludeFileName) {
14175
- const dirPath = join81(outputRoot, relativeDirPath, dirName);
14176
- const glob = join81(dirPath, "**", "*");
14283
+ const dirPath = join82(outputRoot, relativeDirPath, dirName);
14284
+ const glob = join82(dirPath, "**", "*");
14177
14285
  const filePaths = await findFilesByGlobs(glob, { type: "file" });
14178
14286
  const filteredPaths = filePaths.filter((filePath) => basename4(filePath) !== excludeFileName);
14179
14287
  const files = await Promise.all(
@@ -14274,8 +14382,8 @@ var ToolSkill = class extends AiDir {
14274
14382
  }) {
14275
14383
  const settablePaths = getSettablePaths({ global });
14276
14384
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
14277
- const skillDirPath = join82(outputRoot, actualRelativeDirPath, dirName);
14278
- const skillFilePath = join82(skillDirPath, SKILL_FILE_NAME);
14385
+ const skillDirPath = join83(outputRoot, actualRelativeDirPath, dirName);
14386
+ const skillFilePath = join83(skillDirPath, SKILL_FILE_NAME);
14279
14387
  if (!await fileExists(skillFilePath)) {
14280
14388
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
14281
14389
  }
@@ -14299,7 +14407,7 @@ var ToolSkill = class extends AiDir {
14299
14407
  }
14300
14408
  requireMainFileFrontmatter() {
14301
14409
  if (!this.mainFile?.frontmatter) {
14302
- throw new Error(`Frontmatter is not defined in ${join82(this.relativeDirPath, this.dirName)}`);
14410
+ throw new Error(`Frontmatter is not defined in ${join83(this.relativeDirPath, this.dirName)}`);
14303
14411
  }
14304
14412
  return this.mainFile.frontmatter;
14305
14413
  }
@@ -14339,7 +14447,7 @@ var SimulatedSkill = class extends ToolSkill {
14339
14447
  const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
14340
14448
  if (!result.success) {
14341
14449
  throw new Error(
14342
- `Invalid frontmatter in ${join83(relativeDirPath, dirName)}: ${formatError(result.error)}`
14450
+ `Invalid frontmatter in ${join84(relativeDirPath, dirName)}: ${formatError(result.error)}`
14343
14451
  );
14344
14452
  }
14345
14453
  }
@@ -14398,8 +14506,8 @@ var SimulatedSkill = class extends ToolSkill {
14398
14506
  }) {
14399
14507
  const settablePaths = this.getSettablePaths();
14400
14508
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
14401
- const skillDirPath = join83(outputRoot, actualRelativeDirPath, dirName);
14402
- const skillFilePath = join83(skillDirPath, SKILL_FILE_NAME);
14509
+ const skillDirPath = join84(outputRoot, actualRelativeDirPath, dirName);
14510
+ const skillFilePath = join84(skillDirPath, SKILL_FILE_NAME);
14403
14511
  if (!await fileExists(skillFilePath)) {
14404
14512
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
14405
14513
  }
@@ -14476,7 +14584,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
14476
14584
  throw new Error("AgentsmdSkill does not support global mode.");
14477
14585
  }
14478
14586
  return {
14479
- relativeDirPath: join84(".agents", "skills")
14587
+ relativeDirPath: join85(".agents", "skills")
14480
14588
  };
14481
14589
  }
14482
14590
  static async fromDir(params) {
@@ -14503,11 +14611,11 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
14503
14611
  };
14504
14612
 
14505
14613
  // src/features/skills/factorydroid-skill.ts
14506
- import { join as join85 } from "path";
14614
+ import { join as join86 } from "path";
14507
14615
  var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
14508
14616
  static getSettablePaths(_options) {
14509
14617
  return {
14510
- relativeDirPath: join85(".factory", "skills")
14618
+ relativeDirPath: join86(".factory", "skills")
14511
14619
  };
14512
14620
  }
14513
14621
  static async fromDir(params) {
@@ -14534,11 +14642,11 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
14534
14642
  };
14535
14643
 
14536
14644
  // src/features/skills/rovodev-skill.ts
14537
- import { join as join87 } from "path";
14645
+ import { join as join88 } from "path";
14538
14646
  import { z as z41 } from "zod/mini";
14539
14647
 
14540
14648
  // src/features/skills/rulesync-skill.ts
14541
- import { join as join86 } from "path";
14649
+ import { join as join87 } from "path";
14542
14650
  import { z as z40 } from "zod/mini";
14543
14651
  var RulesyncSkillFrontmatterSchemaInternal = z40.looseObject({
14544
14652
  name: z40.string(),
@@ -14625,7 +14733,7 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
14625
14733
  }
14626
14734
  getFrontmatter() {
14627
14735
  if (!this.mainFile?.frontmatter) {
14628
- throw new Error(`Frontmatter is not defined in ${join86(this.relativeDirPath, this.dirName)}`);
14736
+ throw new Error(`Frontmatter is not defined in ${join87(this.relativeDirPath, this.dirName)}`);
14629
14737
  }
14630
14738
  const result = RulesyncSkillFrontmatterSchema.parse(this.mainFile.frontmatter);
14631
14739
  return result;
@@ -14651,8 +14759,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
14651
14759
  dirName,
14652
14760
  global = false
14653
14761
  }) {
14654
- const skillDirPath = join86(outputRoot, relativeDirPath, dirName);
14655
- const skillFilePath = join86(skillDirPath, SKILL_FILE_NAME);
14762
+ const skillDirPath = join87(outputRoot, relativeDirPath, dirName);
14763
+ const skillFilePath = join87(skillDirPath, SKILL_FILE_NAME);
14656
14764
  if (!await fileExists(skillFilePath)) {
14657
14765
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
14658
14766
  }
@@ -14689,7 +14797,7 @@ var RovodevSkillFrontmatterSchema = z41.looseObject({
14689
14797
  var RovodevSkill = class _RovodevSkill extends ToolSkill {
14690
14798
  constructor({
14691
14799
  outputRoot = process.cwd(),
14692
- relativeDirPath = join87(".rovodev", "skills"),
14800
+ relativeDirPath = join88(".rovodev", "skills"),
14693
14801
  dirName,
14694
14802
  frontmatter,
14695
14803
  body,
@@ -14718,8 +14826,8 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
14718
14826
  }
14719
14827
  static getSettablePaths(_options) {
14720
14828
  return {
14721
- relativeDirPath: join87(".rovodev", "skills"),
14722
- alternativeSkillRoots: [join87(".agents", "skills")]
14829
+ relativeDirPath: join88(".rovodev", "skills"),
14830
+ alternativeSkillRoots: [join88(".agents", "skills")]
14723
14831
  };
14724
14832
  }
14725
14833
  getFrontmatter() {
@@ -14807,13 +14915,13 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
14807
14915
  });
14808
14916
  const result = RovodevSkillFrontmatterSchema.safeParse(loaded.frontmatter);
14809
14917
  if (!result.success) {
14810
- const skillDirPath = join87(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
14918
+ const skillDirPath = join88(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
14811
14919
  throw new Error(
14812
- `Invalid frontmatter in ${join87(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
14920
+ `Invalid frontmatter in ${join88(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
14813
14921
  );
14814
14922
  }
14815
14923
  if (result.data.name !== loaded.dirName) {
14816
- const skillFilePath = join87(
14924
+ const skillFilePath = join88(
14817
14925
  loaded.outputRoot,
14818
14926
  loaded.relativeDirPath,
14819
14927
  loaded.dirName,
@@ -14855,11 +14963,11 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
14855
14963
  };
14856
14964
 
14857
14965
  // src/features/skills/skills-processor.ts
14858
- import { basename as basename6, join as join109 } from "path";
14859
- import { z as z59 } from "zod/mini";
14966
+ import { basename as basename6, join as join111 } from "path";
14967
+ import { z as z60 } from "zod/mini";
14860
14968
 
14861
14969
  // src/types/dir-feature-processor.ts
14862
- import { join as join88 } from "path";
14970
+ import { join as join89 } from "path";
14863
14971
  var DirFeatureProcessor = class {
14864
14972
  outputRoot;
14865
14973
  inputRoot;
@@ -14902,7 +15010,7 @@ var DirFeatureProcessor = class {
14902
15010
  const mainFile = aiDir.getMainFile();
14903
15011
  let mainFileContent;
14904
15012
  if (mainFile) {
14905
- const mainFilePath = join88(dirPath, mainFile.name);
15013
+ const mainFilePath = join89(dirPath, mainFile.name);
14906
15014
  const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter, {
14907
15015
  avoidBlockScalars: this.avoidBlockScalars
14908
15016
  });
@@ -14922,7 +15030,7 @@ var DirFeatureProcessor = class {
14922
15030
  const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
14923
15031
  otherFileContents.push(contentWithNewline);
14924
15032
  if (!dirHasChanges) {
14925
- const filePath = join88(dirPath, file.relativeFilePathToDirPath);
15033
+ const filePath = join89(dirPath, file.relativeFilePathToDirPath);
14926
15034
  const existingContent = await readFileContentOrNull(filePath);
14927
15035
  if (!fileContentsEquivalent({
14928
15036
  filePath,
@@ -14940,24 +15048,24 @@ var DirFeatureProcessor = class {
14940
15048
  if (this.dryRun) {
14941
15049
  this.logger.info(`[DRY RUN] Would create directory: ${dirPath}`);
14942
15050
  if (mainFile) {
14943
- this.logger.info(`[DRY RUN] Would write: ${join88(dirPath, mainFile.name)}`);
14944
- changedPaths.push(join88(relativeDir, mainFile.name));
15051
+ this.logger.info(`[DRY RUN] Would write: ${join89(dirPath, mainFile.name)}`);
15052
+ changedPaths.push(join89(relativeDir, mainFile.name));
14945
15053
  }
14946
15054
  for (const file of otherFiles) {
14947
15055
  this.logger.info(
14948
- `[DRY RUN] Would write: ${join88(dirPath, file.relativeFilePathToDirPath)}`
15056
+ `[DRY RUN] Would write: ${join89(dirPath, file.relativeFilePathToDirPath)}`
14949
15057
  );
14950
- changedPaths.push(join88(relativeDir, file.relativeFilePathToDirPath));
15058
+ changedPaths.push(join89(relativeDir, file.relativeFilePathToDirPath));
14951
15059
  }
14952
15060
  } else {
14953
15061
  await ensureDir(dirPath);
14954
15062
  if (mainFile && mainFileContent) {
14955
- const mainFilePath = join88(dirPath, mainFile.name);
15063
+ const mainFilePath = join89(dirPath, mainFile.name);
14956
15064
  await writeFileContent(mainFilePath, mainFileContent);
14957
- changedPaths.push(join88(relativeDir, mainFile.name));
15065
+ changedPaths.push(join89(relativeDir, mainFile.name));
14958
15066
  }
14959
15067
  for (const [i, file] of otherFiles.entries()) {
14960
- const filePath = join88(dirPath, file.relativeFilePathToDirPath);
15068
+ const filePath = join89(dirPath, file.relativeFilePathToDirPath);
14961
15069
  const content = otherFileContents[i];
14962
15070
  if (content === void 0) {
14963
15071
  throw new Error(
@@ -14965,7 +15073,7 @@ var DirFeatureProcessor = class {
14965
15073
  );
14966
15074
  }
14967
15075
  await writeFileContent(filePath, content);
14968
- changedPaths.push(join88(relativeDir, file.relativeFilePathToDirPath));
15076
+ changedPaths.push(join89(relativeDir, file.relativeFilePathToDirPath));
14969
15077
  }
14970
15078
  }
14971
15079
  changedCount++;
@@ -14997,7 +15105,7 @@ var DirFeatureProcessor = class {
14997
15105
  };
14998
15106
 
14999
15107
  // src/features/skills/agentsskills-skill.ts
15000
- import { join as join89 } from "path";
15108
+ import { join as join90 } from "path";
15001
15109
  import { z as z42 } from "zod/mini";
15002
15110
  var AgentsSkillsSkillFrontmatterSchema = z42.looseObject({
15003
15111
  name: z42.string(),
@@ -15006,7 +15114,7 @@ var AgentsSkillsSkillFrontmatterSchema = z42.looseObject({
15006
15114
  var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
15007
15115
  constructor({
15008
15116
  outputRoot = process.cwd(),
15009
- relativeDirPath = join89(".agents", "skills"),
15117
+ relativeDirPath = join90(".agents", "skills"),
15010
15118
  dirName,
15011
15119
  frontmatter,
15012
15120
  body,
@@ -15038,7 +15146,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
15038
15146
  throw new Error("AgentsSkillsSkill does not support global mode.");
15039
15147
  }
15040
15148
  return {
15041
- relativeDirPath: join89(".agents", "skills")
15149
+ relativeDirPath: join90(".agents", "skills")
15042
15150
  };
15043
15151
  }
15044
15152
  getFrontmatter() {
@@ -15118,9 +15226,9 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
15118
15226
  });
15119
15227
  const result = AgentsSkillsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
15120
15228
  if (!result.success) {
15121
- const skillDirPath = join89(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
15229
+ const skillDirPath = join90(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
15122
15230
  throw new Error(
15123
- `Invalid frontmatter in ${join89(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
15231
+ `Invalid frontmatter in ${join90(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
15124
15232
  );
15125
15233
  }
15126
15234
  return new _AgentsSkillsSkill({
@@ -15155,10 +15263,10 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
15155
15263
  };
15156
15264
 
15157
15265
  // src/features/skills/antigravity-shared-skill.ts
15158
- import { join as join91 } from "path";
15266
+ import { join as join92 } from "path";
15159
15267
 
15160
15268
  // src/features/skills/antigravity-skill.ts
15161
- import { join as join90 } from "path";
15269
+ import { join as join91 } from "path";
15162
15270
  import { z as z43 } from "zod/mini";
15163
15271
  var AntigravitySkillFrontmatterSchema = z43.looseObject({
15164
15272
  name: z43.string(),
@@ -15167,7 +15275,7 @@ var AntigravitySkillFrontmatterSchema = z43.looseObject({
15167
15275
  var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
15168
15276
  constructor({
15169
15277
  outputRoot = process.cwd(),
15170
- relativeDirPath = join90(".agent", "skills"),
15278
+ relativeDirPath = join91(".agent", "skills"),
15171
15279
  dirName,
15172
15280
  frontmatter,
15173
15281
  body,
@@ -15199,11 +15307,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
15199
15307
  } = {}) {
15200
15308
  if (global) {
15201
15309
  return {
15202
- relativeDirPath: join90(".gemini", "antigravity", "skills")
15310
+ relativeDirPath: join91(".gemini", "antigravity", "skills")
15203
15311
  };
15204
15312
  }
15205
15313
  return {
15206
- relativeDirPath: join90(".agent", "skills")
15314
+ relativeDirPath: join91(".agent", "skills")
15207
15315
  };
15208
15316
  }
15209
15317
  getFrontmatter() {
@@ -15283,9 +15391,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
15283
15391
  });
15284
15392
  const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
15285
15393
  if (!result.success) {
15286
- const skillDirPath = join90(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
15394
+ const skillDirPath = join91(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
15287
15395
  throw new Error(
15288
- `Invalid frontmatter in ${join90(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
15396
+ `Invalid frontmatter in ${join91(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
15289
15397
  );
15290
15398
  }
15291
15399
  return new _AntigravitySkill({
@@ -15322,7 +15430,7 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
15322
15430
  var AntigravitySharedSkill = class extends ToolSkill {
15323
15431
  constructor({
15324
15432
  outputRoot = process.cwd(),
15325
- relativeDirPath = join91(".agents", "skills"),
15433
+ relativeDirPath = join92(".agents", "skills"),
15326
15434
  dirName,
15327
15435
  frontmatter,
15328
15436
  body,
@@ -15362,11 +15470,11 @@ var AntigravitySharedSkill = class extends ToolSkill {
15362
15470
  } = {}) {
15363
15471
  if (global) {
15364
15472
  return {
15365
- relativeDirPath: join91(".gemini", this.getGlobalSubdir(), "skills")
15473
+ relativeDirPath: join92(".gemini", this.getGlobalSubdir(), "skills")
15366
15474
  };
15367
15475
  }
15368
15476
  return {
15369
- relativeDirPath: join91(".agents", "skills")
15477
+ relativeDirPath: join92(".agents", "skills")
15370
15478
  };
15371
15479
  }
15372
15480
  getFrontmatter() {
@@ -15446,9 +15554,9 @@ var AntigravitySharedSkill = class extends ToolSkill {
15446
15554
  });
15447
15555
  const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
15448
15556
  if (!result.success) {
15449
- const skillDirPath = join91(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
15557
+ const skillDirPath = join92(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
15450
15558
  throw new Error(
15451
- `Invalid frontmatter in ${join91(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
15559
+ `Invalid frontmatter in ${join92(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
15452
15560
  );
15453
15561
  }
15454
15562
  return new this({
@@ -15502,10 +15610,10 @@ var AntigravityIdeSkill = class extends AntigravitySharedSkill {
15502
15610
  };
15503
15611
 
15504
15612
  // src/features/skills/claudecode-skill.ts
15505
- import { join as join92 } from "path";
15613
+ import { join as join93 } from "path";
15506
15614
  import { z as z44 } from "zod/mini";
15507
- var CLAUDE_SKILLS_DIR_PATH = join92(".claude", "skills");
15508
- var CLAUDE_SCHEDULED_TASKS_DIR_PATH = join92(".claude", "scheduled-tasks");
15615
+ var CLAUDE_SKILLS_DIR_PATH = join93(".claude", "skills");
15616
+ var CLAUDE_SCHEDULED_TASKS_DIR_PATH = join93(".claude", "scheduled-tasks");
15509
15617
  var ClaudecodeSkillFrontmatterSchema = z44.looseObject({
15510
15618
  name: z44.string(),
15511
15619
  description: z44.string(),
@@ -15517,7 +15625,7 @@ var ClaudecodeSkillFrontmatterSchema = z44.looseObject({
15517
15625
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
15518
15626
  constructor({
15519
15627
  outputRoot = process.cwd(),
15520
- relativeDirPath = join92(".claude", "skills"),
15628
+ relativeDirPath = join93(".claude", "skills"),
15521
15629
  dirName,
15522
15630
  frontmatter,
15523
15631
  body,
@@ -15656,9 +15764,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
15656
15764
  });
15657
15765
  const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
15658
15766
  if (!result.success) {
15659
- const skillDirPath = join92(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
15767
+ const skillDirPath = join93(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
15660
15768
  throw new Error(
15661
- `Invalid frontmatter in ${join92(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
15769
+ `Invalid frontmatter in ${join93(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
15662
15770
  );
15663
15771
  }
15664
15772
  return new _ClaudecodeSkill({
@@ -15692,7 +15800,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
15692
15800
  };
15693
15801
 
15694
15802
  // src/features/skills/cline-skill.ts
15695
- import { join as join93 } from "path";
15803
+ import { join as join94 } from "path";
15696
15804
  import { z as z45 } from "zod/mini";
15697
15805
  var ClineSkillFrontmatterSchema = z45.looseObject({
15698
15806
  name: z45.string(),
@@ -15701,7 +15809,7 @@ var ClineSkillFrontmatterSchema = z45.looseObject({
15701
15809
  var ClineSkill = class _ClineSkill extends ToolSkill {
15702
15810
  constructor({
15703
15811
  outputRoot = process.cwd(),
15704
- relativeDirPath = join93(".cline", "skills"),
15812
+ relativeDirPath = join94(".cline", "skills"),
15705
15813
  dirName,
15706
15814
  frontmatter,
15707
15815
  body,
@@ -15730,7 +15838,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
15730
15838
  }
15731
15839
  static getSettablePaths(_options = {}) {
15732
15840
  return {
15733
- relativeDirPath: join93(".cline", "skills")
15841
+ relativeDirPath: join94(".cline", "skills")
15734
15842
  };
15735
15843
  }
15736
15844
  getFrontmatter() {
@@ -15818,13 +15926,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
15818
15926
  });
15819
15927
  const result = ClineSkillFrontmatterSchema.safeParse(loaded.frontmatter);
15820
15928
  if (!result.success) {
15821
- const skillDirPath = join93(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
15929
+ const skillDirPath = join94(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
15822
15930
  throw new Error(
15823
- `Invalid frontmatter in ${join93(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
15931
+ `Invalid frontmatter in ${join94(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
15824
15932
  );
15825
15933
  }
15826
15934
  if (result.data.name !== loaded.dirName) {
15827
- const skillFilePath = join93(
15935
+ const skillFilePath = join94(
15828
15936
  loaded.outputRoot,
15829
15937
  loaded.relativeDirPath,
15830
15938
  loaded.dirName,
@@ -15865,7 +15973,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
15865
15973
  };
15866
15974
 
15867
15975
  // src/features/skills/codexcli-skill.ts
15868
- import { join as join94 } from "path";
15976
+ import { join as join95 } from "path";
15869
15977
  import { z as z46 } from "zod/mini";
15870
15978
  var CodexCliSkillFrontmatterSchema = z46.looseObject({
15871
15979
  name: z46.string(),
@@ -15879,7 +15987,7 @@ var CodexCliSkillFrontmatterSchema = z46.looseObject({
15879
15987
  var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
15880
15988
  constructor({
15881
15989
  outputRoot = process.cwd(),
15882
- relativeDirPath = join94(".codex", "skills"),
15990
+ relativeDirPath = join95(".codex", "skills"),
15883
15991
  dirName,
15884
15992
  frontmatter,
15885
15993
  body,
@@ -15910,7 +16018,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
15910
16018
  global: _global = false
15911
16019
  } = {}) {
15912
16020
  return {
15913
- relativeDirPath: join94(".codex", "skills")
16021
+ relativeDirPath: join95(".codex", "skills")
15914
16022
  };
15915
16023
  }
15916
16024
  getFrontmatter() {
@@ -16000,9 +16108,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
16000
16108
  });
16001
16109
  const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
16002
16110
  if (!result.success) {
16003
- const skillDirPath = join94(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
16111
+ const skillDirPath = join95(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
16004
16112
  throw new Error(
16005
- `Invalid frontmatter in ${join94(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
16113
+ `Invalid frontmatter in ${join95(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
16006
16114
  );
16007
16115
  }
16008
16116
  return new _CodexCliSkill({
@@ -16036,7 +16144,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
16036
16144
  };
16037
16145
 
16038
16146
  // src/features/skills/copilot-skill.ts
16039
- import { join as join95 } from "path";
16147
+ import { join as join96 } from "path";
16040
16148
  import { z as z47 } from "zod/mini";
16041
16149
  var CopilotSkillFrontmatterSchema = z47.looseObject({
16042
16150
  name: z47.string(),
@@ -16046,7 +16154,7 @@ var CopilotSkillFrontmatterSchema = z47.looseObject({
16046
16154
  var CopilotSkill = class _CopilotSkill extends ToolSkill {
16047
16155
  constructor({
16048
16156
  outputRoot = process.cwd(),
16049
- relativeDirPath = join95(".github", "skills"),
16157
+ relativeDirPath = join96(".github", "skills"),
16050
16158
  dirName,
16051
16159
  frontmatter,
16052
16160
  body,
@@ -16078,7 +16186,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
16078
16186
  throw new Error("CopilotSkill does not support global mode.");
16079
16187
  }
16080
16188
  return {
16081
- relativeDirPath: join95(".github", "skills")
16189
+ relativeDirPath: join96(".github", "skills")
16082
16190
  };
16083
16191
  }
16084
16192
  getFrontmatter() {
@@ -16164,9 +16272,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
16164
16272
  });
16165
16273
  const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
16166
16274
  if (!result.success) {
16167
- const skillDirPath = join95(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
16275
+ const skillDirPath = join96(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
16168
16276
  throw new Error(
16169
- `Invalid frontmatter in ${join95(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
16277
+ `Invalid frontmatter in ${join96(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
16170
16278
  );
16171
16279
  }
16172
16280
  return new _CopilotSkill({
@@ -16201,7 +16309,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
16201
16309
  };
16202
16310
 
16203
16311
  // src/features/skills/cursor-skill.ts
16204
- import { join as join96 } from "path";
16312
+ import { join as join97 } from "path";
16205
16313
  import { z as z48 } from "zod/mini";
16206
16314
  var CursorSkillFrontmatterSchema = z48.looseObject({
16207
16315
  name: z48.string(),
@@ -16210,7 +16318,7 @@ var CursorSkillFrontmatterSchema = z48.looseObject({
16210
16318
  var CursorSkill = class _CursorSkill extends ToolSkill {
16211
16319
  constructor({
16212
16320
  outputRoot = process.cwd(),
16213
- relativeDirPath = join96(".cursor", "skills"),
16321
+ relativeDirPath = join97(".cursor", "skills"),
16214
16322
  dirName,
16215
16323
  frontmatter,
16216
16324
  body,
@@ -16239,7 +16347,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
16239
16347
  }
16240
16348
  static getSettablePaths(_options) {
16241
16349
  return {
16242
- relativeDirPath: join96(".cursor", "skills")
16350
+ relativeDirPath: join97(".cursor", "skills")
16243
16351
  };
16244
16352
  }
16245
16353
  getFrontmatter() {
@@ -16319,9 +16427,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
16319
16427
  });
16320
16428
  const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
16321
16429
  if (!result.success) {
16322
- const skillDirPath = join96(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
16430
+ const skillDirPath = join97(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
16323
16431
  throw new Error(
16324
- `Invalid frontmatter in ${join96(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
16432
+ `Invalid frontmatter in ${join97(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
16325
16433
  );
16326
16434
  }
16327
16435
  return new _CursorSkill({
@@ -16356,7 +16464,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
16356
16464
  };
16357
16465
 
16358
16466
  // src/features/skills/deepagents-skill.ts
16359
- import { join as join97 } from "path";
16467
+ import { join as join98 } from "path";
16360
16468
  import { z as z49 } from "zod/mini";
16361
16469
  var DeepagentsSkillFrontmatterSchema = z49.looseObject({
16362
16470
  name: z49.string(),
@@ -16366,7 +16474,7 @@ var DeepagentsSkillFrontmatterSchema = z49.looseObject({
16366
16474
  var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
16367
16475
  constructor({
16368
16476
  outputRoot = process.cwd(),
16369
- relativeDirPath = join97(".deepagents", "skills"),
16477
+ relativeDirPath = join98(".deepagents", "skills"),
16370
16478
  dirName,
16371
16479
  frontmatter,
16372
16480
  body,
@@ -16395,7 +16503,7 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
16395
16503
  }
16396
16504
  static getSettablePaths(_options) {
16397
16505
  return {
16398
- relativeDirPath: join97(".deepagents", "skills")
16506
+ relativeDirPath: join98(".deepagents", "skills")
16399
16507
  };
16400
16508
  }
16401
16509
  getFrontmatter() {
@@ -16481,9 +16589,9 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
16481
16589
  });
16482
16590
  const result = DeepagentsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
16483
16591
  if (!result.success) {
16484
- const skillDirPath = join97(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
16592
+ const skillDirPath = join98(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
16485
16593
  throw new Error(
16486
- `Invalid frontmatter in ${join97(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
16594
+ `Invalid frontmatter in ${join98(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
16487
16595
  );
16488
16596
  }
16489
16597
  return new _DeepagentsSkill({
@@ -16518,7 +16626,7 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
16518
16626
  };
16519
16627
 
16520
16628
  // src/features/skills/geminicli-skill.ts
16521
- import { join as join98 } from "path";
16629
+ import { join as join99 } from "path";
16522
16630
  import { z as z50 } from "zod/mini";
16523
16631
  var GeminiCliSkillFrontmatterSchema = z50.looseObject({
16524
16632
  name: z50.string(),
@@ -16558,7 +16666,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
16558
16666
  global: _global = false
16559
16667
  } = {}) {
16560
16668
  return {
16561
- relativeDirPath: join98(".gemini", "skills")
16669
+ relativeDirPath: join99(".gemini", "skills")
16562
16670
  };
16563
16671
  }
16564
16672
  getFrontmatter() {
@@ -16638,9 +16746,9 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
16638
16746
  });
16639
16747
  const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
16640
16748
  if (!result.success) {
16641
- const skillDirPath = join98(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
16749
+ const skillDirPath = join99(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
16642
16750
  throw new Error(
16643
- `Invalid frontmatter in ${join98(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
16751
+ `Invalid frontmatter in ${join99(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
16644
16752
  );
16645
16753
  }
16646
16754
  return new _GeminiCliSkill({
@@ -16675,7 +16783,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
16675
16783
  };
16676
16784
 
16677
16785
  // src/features/skills/junie-skill.ts
16678
- import { join as join99 } from "path";
16786
+ import { join as join100 } from "path";
16679
16787
  import { z as z51 } from "zod/mini";
16680
16788
  var JunieSkillFrontmatterSchema = z51.looseObject({
16681
16789
  name: z51.string(),
@@ -16684,7 +16792,7 @@ var JunieSkillFrontmatterSchema = z51.looseObject({
16684
16792
  var JunieSkill = class _JunieSkill extends ToolSkill {
16685
16793
  constructor({
16686
16794
  outputRoot = process.cwd(),
16687
- relativeDirPath = join99(".junie", "skills"),
16795
+ relativeDirPath = join100(".junie", "skills"),
16688
16796
  dirName,
16689
16797
  frontmatter,
16690
16798
  body,
@@ -16716,7 +16824,7 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
16716
16824
  throw new Error("JunieSkill does not support global mode.");
16717
16825
  }
16718
16826
  return {
16719
- relativeDirPath: join99(".junie", "skills")
16827
+ relativeDirPath: join100(".junie", "skills")
16720
16828
  };
16721
16829
  }
16722
16830
  getFrontmatter() {
@@ -16803,13 +16911,13 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
16803
16911
  });
16804
16912
  const result = JunieSkillFrontmatterSchema.safeParse(loaded.frontmatter);
16805
16913
  if (!result.success) {
16806
- const skillDirPath = join99(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
16914
+ const skillDirPath = join100(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
16807
16915
  throw new Error(
16808
- `Invalid frontmatter in ${join99(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
16916
+ `Invalid frontmatter in ${join100(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
16809
16917
  );
16810
16918
  }
16811
16919
  if (result.data.name !== loaded.dirName) {
16812
- const skillFilePath = join99(
16920
+ const skillFilePath = join100(
16813
16921
  loaded.outputRoot,
16814
16922
  loaded.relativeDirPath,
16815
16923
  loaded.dirName,
@@ -16851,7 +16959,7 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
16851
16959
  };
16852
16960
 
16853
16961
  // src/features/skills/kilo-skill.ts
16854
- import { join as join100 } from "path";
16962
+ import { join as join101 } from "path";
16855
16963
  import { z as z52 } from "zod/mini";
16856
16964
  var KiloSkillFrontmatterSchema = z52.looseObject({
16857
16965
  name: z52.string(),
@@ -16861,7 +16969,7 @@ var KiloSkillFrontmatterSchema = z52.looseObject({
16861
16969
  var KiloSkill = class _KiloSkill extends ToolSkill {
16862
16970
  constructor({
16863
16971
  outputRoot = process.cwd(),
16864
- relativeDirPath = join100(".kilo", "skills"),
16972
+ relativeDirPath = join101(".kilo", "skills"),
16865
16973
  dirName,
16866
16974
  frontmatter,
16867
16975
  body,
@@ -16890,7 +16998,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
16890
16998
  }
16891
16999
  static getSettablePaths({ global = false } = {}) {
16892
17000
  return {
16893
- relativeDirPath: global ? join100(".config", "kilo", "skills") : join100(".kilo", "skills")
17001
+ relativeDirPath: global ? join101(".config", "kilo", "skills") : join101(".kilo", "skills")
16894
17002
  };
16895
17003
  }
16896
17004
  getFrontmatter() {
@@ -16976,9 +17084,9 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
16976
17084
  });
16977
17085
  const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
16978
17086
  if (!result.success) {
16979
- const skillDirPath = join100(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
17087
+ const skillDirPath = join101(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
16980
17088
  throw new Error(
16981
- `Invalid frontmatter in ${join100(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
17089
+ `Invalid frontmatter in ${join101(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
16982
17090
  );
16983
17091
  }
16984
17092
  return new _KiloSkill({
@@ -17012,7 +17120,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
17012
17120
  };
17013
17121
 
17014
17122
  // src/features/skills/kiro-skill.ts
17015
- import { join as join101 } from "path";
17123
+ import { join as join102 } from "path";
17016
17124
  import { z as z53 } from "zod/mini";
17017
17125
  var KiroSkillFrontmatterSchema = z53.looseObject({
17018
17126
  name: z53.string(),
@@ -17021,7 +17129,7 @@ var KiroSkillFrontmatterSchema = z53.looseObject({
17021
17129
  var KiroSkill = class _KiroSkill extends ToolSkill {
17022
17130
  constructor({
17023
17131
  outputRoot = process.cwd(),
17024
- relativeDirPath = join101(".kiro", "skills"),
17132
+ relativeDirPath = join102(".kiro", "skills"),
17025
17133
  dirName,
17026
17134
  frontmatter,
17027
17135
  body,
@@ -17053,7 +17161,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
17053
17161
  throw new Error("KiroSkill does not support global mode.");
17054
17162
  }
17055
17163
  return {
17056
- relativeDirPath: join101(".kiro", "skills")
17164
+ relativeDirPath: join102(".kiro", "skills")
17057
17165
  };
17058
17166
  }
17059
17167
  getFrontmatter() {
@@ -17141,13 +17249,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
17141
17249
  });
17142
17250
  const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
17143
17251
  if (!result.success) {
17144
- const skillDirPath = join101(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
17252
+ const skillDirPath = join102(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
17145
17253
  throw new Error(
17146
- `Invalid frontmatter in ${join101(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
17254
+ `Invalid frontmatter in ${join102(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
17147
17255
  );
17148
17256
  }
17149
17257
  if (result.data.name !== loaded.dirName) {
17150
- const skillFilePath = join101(
17258
+ const skillFilePath = join102(
17151
17259
  loaded.outputRoot,
17152
17260
  loaded.relativeDirPath,
17153
17261
  loaded.dirName,
@@ -17189,7 +17297,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
17189
17297
  };
17190
17298
 
17191
17299
  // src/features/skills/opencode-skill.ts
17192
- import { join as join102 } from "path";
17300
+ import { join as join103 } from "path";
17193
17301
  import { z as z54 } from "zod/mini";
17194
17302
  var OpenCodeSkillFrontmatterSchema = z54.looseObject({
17195
17303
  name: z54.string(),
@@ -17199,7 +17307,7 @@ var OpenCodeSkillFrontmatterSchema = z54.looseObject({
17199
17307
  var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
17200
17308
  constructor({
17201
17309
  outputRoot = process.cwd(),
17202
- relativeDirPath = join102(".opencode", "skill"),
17310
+ relativeDirPath = join103(".opencode", "skill"),
17203
17311
  dirName,
17204
17312
  frontmatter,
17205
17313
  body,
@@ -17228,7 +17336,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
17228
17336
  }
17229
17337
  static getSettablePaths({ global = false } = {}) {
17230
17338
  return {
17231
- relativeDirPath: global ? join102(".config", "opencode", "skill") : join102(".opencode", "skill")
17339
+ relativeDirPath: global ? join103(".config", "opencode", "skill") : join103(".opencode", "skill")
17232
17340
  };
17233
17341
  }
17234
17342
  getFrontmatter() {
@@ -17314,9 +17422,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
17314
17422
  });
17315
17423
  const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
17316
17424
  if (!result.success) {
17317
- const skillDirPath = join102(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
17425
+ const skillDirPath = join103(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
17318
17426
  throw new Error(
17319
- `Invalid frontmatter in ${join102(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
17427
+ `Invalid frontmatter in ${join103(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
17320
17428
  );
17321
17429
  }
17322
17430
  return new _OpenCodeSkill({
@@ -17350,7 +17458,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
17350
17458
  };
17351
17459
 
17352
17460
  // src/features/skills/pi-skill.ts
17353
- import { join as join103 } from "path";
17461
+ import { join as join104 } from "path";
17354
17462
  import { z as z55 } from "zod/mini";
17355
17463
  var PiSkillFrontmatterSchema = z55.looseObject({
17356
17464
  name: z55.string(),
@@ -17390,11 +17498,11 @@ var PiSkill = class _PiSkill extends ToolSkill {
17390
17498
  static getSettablePaths({ global } = {}) {
17391
17499
  if (global) {
17392
17500
  return {
17393
- relativeDirPath: join103(".pi", "agent", "skills")
17501
+ relativeDirPath: join104(".pi", "agent", "skills")
17394
17502
  };
17395
17503
  }
17396
17504
  return {
17397
- relativeDirPath: join103(".pi", "skills")
17505
+ relativeDirPath: join104(".pi", "skills")
17398
17506
  };
17399
17507
  }
17400
17508
  getFrontmatter() {
@@ -17473,9 +17581,9 @@ var PiSkill = class _PiSkill extends ToolSkill {
17473
17581
  });
17474
17582
  const result = PiSkillFrontmatterSchema.safeParse(loaded.frontmatter);
17475
17583
  if (!result.success) {
17476
- const skillDirPath = join103(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
17584
+ const skillDirPath = join104(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
17477
17585
  throw new Error(
17478
- `Invalid frontmatter in ${join103(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
17586
+ `Invalid frontmatter in ${join104(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
17479
17587
  );
17480
17588
  }
17481
17589
  return new _PiSkill({
@@ -17510,7 +17618,7 @@ var PiSkill = class _PiSkill extends ToolSkill {
17510
17618
  };
17511
17619
 
17512
17620
  // src/features/skills/replit-skill.ts
17513
- import { join as join104 } from "path";
17621
+ import { join as join105 } from "path";
17514
17622
  import { z as z56 } from "zod/mini";
17515
17623
  var ReplitSkillFrontmatterSchema = z56.looseObject({
17516
17624
  name: z56.string(),
@@ -17519,7 +17627,7 @@ var ReplitSkillFrontmatterSchema = z56.looseObject({
17519
17627
  var ReplitSkill = class _ReplitSkill extends ToolSkill {
17520
17628
  constructor({
17521
17629
  outputRoot = process.cwd(),
17522
- relativeDirPath = join104(".agents", "skills"),
17630
+ relativeDirPath = join105(".agents", "skills"),
17523
17631
  dirName,
17524
17632
  frontmatter,
17525
17633
  body,
@@ -17551,7 +17659,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
17551
17659
  throw new Error("ReplitSkill does not support global mode.");
17552
17660
  }
17553
17661
  return {
17554
- relativeDirPath: join104(".agents", "skills")
17662
+ relativeDirPath: join105(".agents", "skills")
17555
17663
  };
17556
17664
  }
17557
17665
  getFrontmatter() {
@@ -17631,9 +17739,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
17631
17739
  });
17632
17740
  const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
17633
17741
  if (!result.success) {
17634
- const skillDirPath = join104(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
17742
+ const skillDirPath = join105(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
17635
17743
  throw new Error(
17636
- `Invalid frontmatter in ${join104(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
17744
+ `Invalid frontmatter in ${join105(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
17637
17745
  );
17638
17746
  }
17639
17747
  return new _ReplitSkill({
@@ -17668,7 +17776,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
17668
17776
  };
17669
17777
 
17670
17778
  // src/features/skills/roo-skill.ts
17671
- import { join as join105 } from "path";
17779
+ import { join as join106 } from "path";
17672
17780
  import { z as z57 } from "zod/mini";
17673
17781
  var RooSkillFrontmatterSchema = z57.looseObject({
17674
17782
  name: z57.string(),
@@ -17677,7 +17785,7 @@ var RooSkillFrontmatterSchema = z57.looseObject({
17677
17785
  var RooSkill = class _RooSkill extends ToolSkill {
17678
17786
  constructor({
17679
17787
  outputRoot = process.cwd(),
17680
- relativeDirPath = join105(".roo", "skills"),
17788
+ relativeDirPath = join106(".roo", "skills"),
17681
17789
  dirName,
17682
17790
  frontmatter,
17683
17791
  body,
@@ -17708,7 +17816,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
17708
17816
  global: _global = false
17709
17817
  } = {}) {
17710
17818
  return {
17711
- relativeDirPath: join105(".roo", "skills")
17819
+ relativeDirPath: join106(".roo", "skills")
17712
17820
  };
17713
17821
  }
17714
17822
  getFrontmatter() {
@@ -17796,13 +17904,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
17796
17904
  });
17797
17905
  const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
17798
17906
  if (!result.success) {
17799
- const skillDirPath = join105(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
17907
+ const skillDirPath = join106(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
17800
17908
  throw new Error(
17801
- `Invalid frontmatter in ${join105(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
17909
+ `Invalid frontmatter in ${join106(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
17802
17910
  );
17803
17911
  }
17804
17912
  if (result.data.name !== loaded.dirName) {
17805
- const skillFilePath = join105(
17913
+ const skillFilePath = join106(
17806
17914
  loaded.outputRoot,
17807
17915
  loaded.relativeDirPath,
17808
17916
  loaded.dirName,
@@ -17843,14 +17951,14 @@ var RooSkill = class _RooSkill extends ToolSkill {
17843
17951
  };
17844
17952
 
17845
17953
  // src/features/skills/skills-utils.ts
17846
- import { basename as basename5, join as join106 } from "path";
17954
+ import { basename as basename5, join as join107 } from "path";
17847
17955
  async function getLocalSkillDirNames(outputRoot) {
17848
- const skillsDir = join106(outputRoot, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
17956
+ const skillsDir = join107(outputRoot, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
17849
17957
  const names = /* @__PURE__ */ new Set();
17850
17958
  if (!await directoryExists(skillsDir)) {
17851
17959
  return names;
17852
17960
  }
17853
- const dirPaths = await findFilesByGlobs(join106(skillsDir, "*"), { type: "dir" });
17961
+ const dirPaths = await findFilesByGlobs(join107(skillsDir, "*"), { type: "dir" });
17854
17962
  for (const dirPath of dirPaths) {
17855
17963
  const name = basename5(dirPath);
17856
17964
  if (name === basename5(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
@@ -17860,7 +17968,7 @@ async function getLocalSkillDirNames(outputRoot) {
17860
17968
  }
17861
17969
 
17862
17970
  // src/features/skills/takt-skill.ts
17863
- import path3, { join as join107, relative as relative5, resolve as resolve6 } from "path";
17971
+ import path3, { join as join108, relative as relative5, resolve as resolve6 } from "path";
17864
17972
  var DEFAULT_TAKT_SKILL_DIR = "knowledge";
17865
17973
  var TaktSkill = class _TaktSkill extends ToolSkill {
17866
17974
  fileName;
@@ -17897,7 +18005,7 @@ var TaktSkill = class _TaktSkill extends ToolSkill {
17897
18005
  }
17898
18006
  static getSettablePaths(_options = {}) {
17899
18007
  return {
17900
- relativeDirPath: join107(".takt", "facets", DEFAULT_TAKT_SKILL_DIR)
18008
+ relativeDirPath: join108(".takt", "facets", DEFAULT_TAKT_SKILL_DIR)
17901
18009
  };
17902
18010
  }
17903
18011
  /**
@@ -17908,7 +18016,7 @@ var TaktSkill = class _TaktSkill extends ToolSkill {
17908
18016
  * malicious `relativeDirPath` cannot escape `outputRoot`.
17909
18017
  */
17910
18018
  getDirPath() {
17911
- const fullPath = join107(this.outputRoot, this.relativeDirPath);
18019
+ const fullPath = join108(this.outputRoot, this.relativeDirPath);
17912
18020
  const resolvedFull = resolve6(fullPath);
17913
18021
  const resolvedBase = resolve6(this.outputRoot);
17914
18022
  const rel = relative5(resolvedBase, resolvedFull);
@@ -17949,7 +18057,7 @@ var TaktSkill = class _TaktSkill extends ToolSkill {
17949
18057
  const stem = overrideName ?? rulesyncSkill.getDirName();
17950
18058
  assertSafeTaktName({ name: stem, featureLabel: "skill", sourceLabel });
17951
18059
  const fileName = `${stem}.md`;
17952
- const relativeDirPath = join107(".takt", "facets", DEFAULT_TAKT_SKILL_DIR);
18060
+ const relativeDirPath = join108(".takt", "facets", DEFAULT_TAKT_SKILL_DIR);
17953
18061
  return new _TaktSkill({
17954
18062
  outputRoot,
17955
18063
  relativeDirPath,
@@ -17999,7 +18107,7 @@ var TaktSkill = class _TaktSkill extends ToolSkill {
17999
18107
  };
18000
18108
 
18001
18109
  // src/features/skills/windsurf-skill.ts
18002
- import { join as join108 } from "path";
18110
+ import { join as join109 } from "path";
18003
18111
  import { z as z58 } from "zod/mini";
18004
18112
  var WindsurfSkillFrontmatterSchema = z58.looseObject({
18005
18113
  name: z58.string(),
@@ -18038,11 +18146,11 @@ var WindsurfSkill = class _WindsurfSkill extends ToolSkill {
18038
18146
  static getSettablePaths({ global = false } = {}) {
18039
18147
  if (global) {
18040
18148
  return {
18041
- relativeDirPath: join108(".codeium", "windsurf", "skills")
18149
+ relativeDirPath: join109(".codeium", "windsurf", "skills")
18042
18150
  };
18043
18151
  }
18044
18152
  return {
18045
- relativeDirPath: join108(".windsurf", "skills")
18153
+ relativeDirPath: join109(".windsurf", "skills")
18046
18154
  };
18047
18155
  }
18048
18156
  getFrontmatter() {
@@ -18122,9 +18230,9 @@ var WindsurfSkill = class _WindsurfSkill extends ToolSkill {
18122
18230
  });
18123
18231
  const result = WindsurfSkillFrontmatterSchema.safeParse(loaded.frontmatter);
18124
18232
  if (!result.success) {
18125
- const skillDirPath = join108(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
18233
+ const skillDirPath = join109(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
18126
18234
  throw new Error(
18127
- `Invalid frontmatter in ${join108(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
18235
+ `Invalid frontmatter in ${join109(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
18128
18236
  );
18129
18237
  }
18130
18238
  return new _WindsurfSkill({
@@ -18158,8 +18266,163 @@ var WindsurfSkill = class _WindsurfSkill extends ToolSkill {
18158
18266
  }
18159
18267
  };
18160
18268
 
18161
- // src/features/skills/skills-processor.ts
18162
- var skillsProcessorToolTargetTuple = [
18269
+ // src/features/skills/zed-skill.ts
18270
+ import { join as join110 } from "path";
18271
+ import { z as z59 } from "zod/mini";
18272
+ var ZedSkillFrontmatterSchema = z59.looseObject({
18273
+ name: z59.string(),
18274
+ description: z59.string(),
18275
+ "disable-model-invocation": z59.optional(z59.boolean())
18276
+ });
18277
+ var ZedSkill = class _ZedSkill extends ToolSkill {
18278
+ constructor({
18279
+ outputRoot = process.cwd(),
18280
+ relativeDirPath = join110(".agents", "skills"),
18281
+ dirName,
18282
+ frontmatter,
18283
+ body,
18284
+ otherFiles = [],
18285
+ validate = true,
18286
+ global = false
18287
+ }) {
18288
+ super({
18289
+ outputRoot,
18290
+ relativeDirPath,
18291
+ dirName,
18292
+ mainFile: {
18293
+ name: SKILL_FILE_NAME,
18294
+ body,
18295
+ frontmatter: { ...frontmatter }
18296
+ },
18297
+ otherFiles,
18298
+ global
18299
+ });
18300
+ if (validate) {
18301
+ const result = this.validate();
18302
+ if (!result.success) {
18303
+ throw result.error;
18304
+ }
18305
+ }
18306
+ }
18307
+ static getSettablePaths(_options) {
18308
+ return {
18309
+ relativeDirPath: join110(".agents", "skills")
18310
+ };
18311
+ }
18312
+ getFrontmatter() {
18313
+ return ZedSkillFrontmatterSchema.parse(this.requireMainFileFrontmatter());
18314
+ }
18315
+ getBody() {
18316
+ return this.mainFile?.body ?? "";
18317
+ }
18318
+ validate() {
18319
+ if (!this.mainFile) {
18320
+ return {
18321
+ success: false,
18322
+ error: new Error(`${this.getDirPath()}: ${SKILL_FILE_NAME} file does not exist`)
18323
+ };
18324
+ }
18325
+ const result = ZedSkillFrontmatterSchema.safeParse(this.mainFile.frontmatter);
18326
+ if (!result.success) {
18327
+ return {
18328
+ success: false,
18329
+ error: new Error(
18330
+ `Invalid frontmatter in ${this.getDirPath()}: ${formatError(result.error)}`
18331
+ )
18332
+ };
18333
+ }
18334
+ return { success: true, error: null };
18335
+ }
18336
+ toRulesyncSkill() {
18337
+ const frontmatter = this.getFrontmatter();
18338
+ const rulesyncFrontmatter = {
18339
+ name: frontmatter.name,
18340
+ description: frontmatter.description,
18341
+ targets: ["*"]
18342
+ };
18343
+ return new RulesyncSkill({
18344
+ outputRoot: this.outputRoot,
18345
+ relativeDirPath: RULESYNC_SKILLS_RELATIVE_DIR_PATH,
18346
+ dirName: this.getDirName(),
18347
+ frontmatter: rulesyncFrontmatter,
18348
+ body: this.getBody(),
18349
+ otherFiles: this.getOtherFiles(),
18350
+ validate: true,
18351
+ global: this.global
18352
+ });
18353
+ }
18354
+ static fromRulesyncSkill({
18355
+ outputRoot = process.cwd(),
18356
+ rulesyncSkill,
18357
+ validate = true,
18358
+ global = false
18359
+ }) {
18360
+ const settablePaths = _ZedSkill.getSettablePaths({ global });
18361
+ const rulesyncFrontmatter = rulesyncSkill.getFrontmatter();
18362
+ const zedFrontmatter = {
18363
+ name: rulesyncFrontmatter.name,
18364
+ description: rulesyncFrontmatter.description
18365
+ };
18366
+ return new _ZedSkill({
18367
+ outputRoot,
18368
+ relativeDirPath: settablePaths.relativeDirPath,
18369
+ dirName: rulesyncSkill.getDirName(),
18370
+ frontmatter: zedFrontmatter,
18371
+ body: rulesyncSkill.getBody(),
18372
+ otherFiles: rulesyncSkill.getOtherFiles(),
18373
+ validate,
18374
+ global
18375
+ });
18376
+ }
18377
+ static isTargetedByRulesyncSkill(rulesyncSkill) {
18378
+ const targets = rulesyncSkill.getFrontmatter().targets;
18379
+ return targets.includes("*") || targets.includes("zed");
18380
+ }
18381
+ static async fromDir(params) {
18382
+ const loaded = await this.loadSkillDirContent({
18383
+ ...params,
18384
+ getSettablePaths: _ZedSkill.getSettablePaths
18385
+ });
18386
+ const result = ZedSkillFrontmatterSchema.safeParse(loaded.frontmatter);
18387
+ if (!result.success) {
18388
+ const skillDirPath = join110(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
18389
+ throw new Error(
18390
+ `Invalid frontmatter in ${join110(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
18391
+ );
18392
+ }
18393
+ return new _ZedSkill({
18394
+ outputRoot: loaded.outputRoot,
18395
+ relativeDirPath: loaded.relativeDirPath,
18396
+ dirName: loaded.dirName,
18397
+ frontmatter: result.data,
18398
+ body: loaded.body,
18399
+ otherFiles: loaded.otherFiles,
18400
+ validate: true,
18401
+ global: loaded.global
18402
+ });
18403
+ }
18404
+ static forDeletion({
18405
+ outputRoot = process.cwd(),
18406
+ relativeDirPath,
18407
+ dirName,
18408
+ global = false
18409
+ }) {
18410
+ const settablePaths = _ZedSkill.getSettablePaths({ global });
18411
+ return new _ZedSkill({
18412
+ outputRoot,
18413
+ relativeDirPath: relativeDirPath ?? settablePaths.relativeDirPath,
18414
+ dirName,
18415
+ frontmatter: { name: "", description: "" },
18416
+ body: "",
18417
+ otherFiles: [],
18418
+ validate: false,
18419
+ global
18420
+ });
18421
+ }
18422
+ };
18423
+
18424
+ // src/features/skills/skills-processor.ts
18425
+ var skillsProcessorToolTargetTuple = [
18163
18426
  "agentsmd",
18164
18427
  "agentsskills",
18165
18428
  "antigravity",
@@ -18183,9 +18446,10 @@ var skillsProcessorToolTargetTuple = [
18183
18446
  "roo",
18184
18447
  "rovodev",
18185
18448
  "takt",
18186
- "windsurf"
18449
+ "windsurf",
18450
+ "zed"
18187
18451
  ];
18188
- var SkillsProcessorToolTargetSchema = z59.enum(skillsProcessorToolTargetTuple);
18452
+ var SkillsProcessorToolTargetSchema = z60.enum(skillsProcessorToolTargetTuple);
18189
18453
  var toolSkillFactories = /* @__PURE__ */ new Map([
18190
18454
  [
18191
18455
  "agentsmd",
@@ -18354,6 +18618,13 @@ var toolSkillFactories = /* @__PURE__ */ new Map([
18354
18618
  class: WindsurfSkill,
18355
18619
  meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: true }
18356
18620
  }
18621
+ ],
18622
+ [
18623
+ "zed",
18624
+ {
18625
+ class: ZedSkill,
18626
+ meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: true }
18627
+ }
18357
18628
  ]
18358
18629
  ]);
18359
18630
  var defaultGetFactory4 = (target) => {
@@ -18450,10 +18721,10 @@ var SkillsProcessor = class extends DirFeatureProcessor {
18450
18721
  )
18451
18722
  );
18452
18723
  const localSkillNames = new Set(localDirNames);
18453
- const curatedDirPath = join109(this.inputRoot, RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
18724
+ const curatedDirPath = join111(this.inputRoot, RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
18454
18725
  let curatedSkills = [];
18455
18726
  if (await directoryExists(curatedDirPath)) {
18456
- const curatedDirPaths = await findFilesByGlobs(join109(curatedDirPath, "*"), { type: "dir" });
18727
+ const curatedDirPaths = await findFilesByGlobs(join111(curatedDirPath, "*"), { type: "dir" });
18457
18728
  const curatedDirNames = curatedDirPaths.map((path4) => basename6(path4));
18458
18729
  const nonConflicting = curatedDirNames.filter((name) => {
18459
18730
  if (localSkillNames.has(name)) {
@@ -18491,11 +18762,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
18491
18762
  const seenDirNames = /* @__PURE__ */ new Set();
18492
18763
  const loadEntries = [];
18493
18764
  for (const root of roots) {
18494
- const skillsDirPath = join109(this.outputRoot, root);
18765
+ const skillsDirPath = join111(this.outputRoot, root);
18495
18766
  if (!await directoryExists(skillsDirPath)) {
18496
18767
  continue;
18497
18768
  }
18498
- const dirPaths = await findFilesByGlobs(join109(skillsDirPath, "*"), { type: "dir" });
18769
+ const dirPaths = await findFilesByGlobs(join111(skillsDirPath, "*"), { type: "dir" });
18499
18770
  for (const dirPath of dirPaths) {
18500
18771
  const dirName = basename6(dirPath);
18501
18772
  if (seenDirNames.has(dirName)) {
@@ -18526,11 +18797,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
18526
18797
  const roots = toolSkillSearchRoots(paths);
18527
18798
  const toolSkills = [];
18528
18799
  for (const root of roots) {
18529
- const skillsDirPath = join109(this.outputRoot, root);
18800
+ const skillsDirPath = join111(this.outputRoot, root);
18530
18801
  if (!await directoryExists(skillsDirPath)) {
18531
18802
  continue;
18532
18803
  }
18533
- const dirPaths = await findFilesByGlobs(join109(skillsDirPath, "*"), { type: "dir" });
18804
+ const dirPaths = await findFilesByGlobs(join111(skillsDirPath, "*"), { type: "dir" });
18534
18805
  for (const dirPath of dirPaths) {
18535
18806
  const dirName = basename6(dirPath);
18536
18807
  const toolSkill = factory.class.forDeletion({
@@ -18594,11 +18865,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
18594
18865
  };
18595
18866
 
18596
18867
  // src/features/subagents/agentsmd-subagent.ts
18597
- import { join as join111 } from "path";
18868
+ import { join as join113 } from "path";
18598
18869
 
18599
18870
  // src/features/subagents/simulated-subagent.ts
18600
- import { basename as basename7, join as join110 } from "path";
18601
- import { z as z60 } from "zod/mini";
18871
+ import { basename as basename7, join as join112 } from "path";
18872
+ import { z as z61 } from "zod/mini";
18602
18873
 
18603
18874
  // src/features/subagents/tool-subagent.ts
18604
18875
  var ToolSubagent = class extends ToolFile {
@@ -18650,9 +18921,9 @@ var ToolSubagent = class extends ToolFile {
18650
18921
  };
18651
18922
 
18652
18923
  // src/features/subagents/simulated-subagent.ts
18653
- var SimulatedSubagentFrontmatterSchema = z60.object({
18654
- name: z60.string(),
18655
- description: z60.optional(z60.string())
18924
+ var SimulatedSubagentFrontmatterSchema = z61.object({
18925
+ name: z61.string(),
18926
+ description: z61.optional(z61.string())
18656
18927
  });
18657
18928
  var SimulatedSubagent = class extends ToolSubagent {
18658
18929
  frontmatter;
@@ -18662,7 +18933,7 @@ var SimulatedSubagent = class extends ToolSubagent {
18662
18933
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
18663
18934
  if (!result.success) {
18664
18935
  throw new Error(
18665
- `Invalid frontmatter in ${join110(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18936
+ `Invalid frontmatter in ${join112(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18666
18937
  );
18667
18938
  }
18668
18939
  }
@@ -18713,7 +18984,7 @@ var SimulatedSubagent = class extends ToolSubagent {
18713
18984
  return {
18714
18985
  success: false,
18715
18986
  error: new Error(
18716
- `Invalid frontmatter in ${join110(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18987
+ `Invalid frontmatter in ${join112(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18717
18988
  )
18718
18989
  };
18719
18990
  }
@@ -18723,7 +18994,7 @@ var SimulatedSubagent = class extends ToolSubagent {
18723
18994
  relativeFilePath,
18724
18995
  validate = true
18725
18996
  }) {
18726
- const filePath = join110(outputRoot, this.getSettablePaths().relativeDirPath, relativeFilePath);
18997
+ const filePath = join112(outputRoot, this.getSettablePaths().relativeDirPath, relativeFilePath);
18727
18998
  const fileContent = await readFileContent(filePath);
18728
18999
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
18729
19000
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -18759,7 +19030,7 @@ var SimulatedSubagent = class extends ToolSubagent {
18759
19030
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
18760
19031
  static getSettablePaths() {
18761
19032
  return {
18762
- relativeDirPath: join111(".agents", "subagents")
19033
+ relativeDirPath: join113(".agents", "subagents")
18763
19034
  };
18764
19035
  }
18765
19036
  static async fromFile(params) {
@@ -18782,11 +19053,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
18782
19053
  };
18783
19054
 
18784
19055
  // src/features/subagents/factorydroid-subagent.ts
18785
- import { join as join112 } from "path";
19056
+ import { join as join114 } from "path";
18786
19057
  var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
18787
19058
  static getSettablePaths(_options) {
18788
19059
  return {
18789
- relativeDirPath: join112(".factory", "droids")
19060
+ relativeDirPath: join114(".factory", "droids")
18790
19061
  };
18791
19062
  }
18792
19063
  static async fromFile(params) {
@@ -18809,19 +19080,19 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
18809
19080
  };
18810
19081
 
18811
19082
  // src/features/subagents/geminicli-subagent.ts
18812
- import { join as join114 } from "path";
18813
- import { z as z62 } from "zod/mini";
19083
+ import { join as join116 } from "path";
19084
+ import { z as z63 } from "zod/mini";
18814
19085
 
18815
19086
  // src/features/subagents/rulesync-subagent.ts
18816
- import { basename as basename8, join as join113 } from "path";
18817
- import { z as z61 } from "zod/mini";
18818
- var RulesyncSubagentFrontmatterSchema = z61.looseObject({
18819
- targets: z61._default(RulesyncTargetsSchema, ["*"]),
18820
- name: z61.string(),
18821
- description: z61.optional(z61.string()),
18822
- takt: z61.optional(
18823
- z61.looseObject({
18824
- name: z61.optional(z61.string())
19087
+ import { basename as basename8, join as join115 } from "path";
19088
+ import { z as z62 } from "zod/mini";
19089
+ var RulesyncSubagentFrontmatterSchema = z62.looseObject({
19090
+ targets: z62._default(RulesyncTargetsSchema, ["*"]),
19091
+ name: z62.string(),
19092
+ description: z62.optional(z62.string()),
19093
+ takt: z62.optional(
19094
+ z62.looseObject({
19095
+ name: z62.optional(z62.string())
18825
19096
  })
18826
19097
  )
18827
19098
  });
@@ -18832,7 +19103,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
18832
19103
  const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
18833
19104
  if (!parseResult.success && rest.validate !== false) {
18834
19105
  throw new Error(
18835
- `Invalid frontmatter in ${join113(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
19106
+ `Invalid frontmatter in ${join115(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
18836
19107
  );
18837
19108
  }
18838
19109
  const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
@@ -18865,7 +19136,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
18865
19136
  return {
18866
19137
  success: false,
18867
19138
  error: new Error(
18868
- `Invalid frontmatter in ${join113(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
19139
+ `Invalid frontmatter in ${join115(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18869
19140
  )
18870
19141
  };
18871
19142
  }
@@ -18874,7 +19145,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
18874
19145
  outputRoot = process.cwd(),
18875
19146
  relativeFilePath
18876
19147
  }) {
18877
- const filePath = join113(outputRoot, RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
19148
+ const filePath = join115(outputRoot, RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
18878
19149
  const fileContent = await readFileContent(filePath);
18879
19150
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
18880
19151
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -18893,9 +19164,9 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
18893
19164
  };
18894
19165
 
18895
19166
  // src/features/subagents/geminicli-subagent.ts
18896
- var GeminiCliSubagentFrontmatterSchema = z62.looseObject({
18897
- name: z62.string(),
18898
- description: z62.optional(z62.string())
19167
+ var GeminiCliSubagentFrontmatterSchema = z63.looseObject({
19168
+ name: z63.string(),
19169
+ description: z63.optional(z63.string())
18899
19170
  });
18900
19171
  var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
18901
19172
  frontmatter;
@@ -18905,7 +19176,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
18905
19176
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
18906
19177
  if (!result.success) {
18907
19178
  throw new Error(
18908
- `Invalid frontmatter in ${join114(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
19179
+ `Invalid frontmatter in ${join116(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18909
19180
  );
18910
19181
  }
18911
19182
  }
@@ -18918,7 +19189,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
18918
19189
  }
18919
19190
  static getSettablePaths(_options = {}) {
18920
19191
  return {
18921
- relativeDirPath: join114(".gemini", "agents")
19192
+ relativeDirPath: join116(".gemini", "agents")
18922
19193
  };
18923
19194
  }
18924
19195
  getFrontmatter() {
@@ -18986,7 +19257,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
18986
19257
  return {
18987
19258
  success: false,
18988
19259
  error: new Error(
18989
- `Invalid frontmatter in ${join114(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
19260
+ `Invalid frontmatter in ${join116(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18990
19261
  )
18991
19262
  };
18992
19263
  }
@@ -19004,7 +19275,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
19004
19275
  global = false
19005
19276
  }) {
19006
19277
  const paths = this.getSettablePaths({ global });
19007
- const filePath = join114(outputRoot, paths.relativeDirPath, relativeFilePath);
19278
+ const filePath = join116(outputRoot, paths.relativeDirPath, relativeFilePath);
19008
19279
  const fileContent = await readFileContent(filePath);
19009
19280
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
19010
19281
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -19040,11 +19311,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
19040
19311
  };
19041
19312
 
19042
19313
  // src/features/subagents/roo-subagent.ts
19043
- import { join as join115 } from "path";
19314
+ import { join as join117 } from "path";
19044
19315
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
19045
19316
  static getSettablePaths() {
19046
19317
  return {
19047
- relativeDirPath: join115(".roo", "subagents")
19318
+ relativeDirPath: join117(".roo", "subagents")
19048
19319
  };
19049
19320
  }
19050
19321
  static async fromFile(params) {
@@ -19067,11 +19338,11 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
19067
19338
  };
19068
19339
 
19069
19340
  // src/features/subagents/rovodev-subagent.ts
19070
- import { join as join116 } from "path";
19071
- import { z as z63 } from "zod/mini";
19072
- var RovodevSubagentFrontmatterSchema = z63.looseObject({
19073
- name: z63.string(),
19074
- description: z63.optional(z63.string())
19341
+ import { join as join118 } from "path";
19342
+ import { z as z64 } from "zod/mini";
19343
+ var RovodevSubagentFrontmatterSchema = z64.looseObject({
19344
+ name: z64.string(),
19345
+ description: z64.optional(z64.string())
19075
19346
  });
19076
19347
  var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
19077
19348
  frontmatter;
@@ -19081,7 +19352,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
19081
19352
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
19082
19353
  if (!result.success) {
19083
19354
  throw new Error(
19084
- `Invalid frontmatter in ${join116(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
19355
+ `Invalid frontmatter in ${join118(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
19085
19356
  );
19086
19357
  }
19087
19358
  }
@@ -19093,7 +19364,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
19093
19364
  }
19094
19365
  static getSettablePaths(_options = {}) {
19095
19366
  return {
19096
- relativeDirPath: join116(".rovodev", "subagents")
19367
+ relativeDirPath: join118(".rovodev", "subagents")
19097
19368
  };
19098
19369
  }
19099
19370
  getFrontmatter() {
@@ -19156,7 +19427,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
19156
19427
  return {
19157
19428
  success: false,
19158
19429
  error: new Error(
19159
- `Invalid frontmatter in ${join116(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
19430
+ `Invalid frontmatter in ${join118(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
19160
19431
  )
19161
19432
  };
19162
19433
  }
@@ -19173,7 +19444,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
19173
19444
  global = false
19174
19445
  }) {
19175
19446
  const paths = this.getSettablePaths({ global });
19176
- const filePath = join116(outputRoot, paths.relativeDirPath, relativeFilePath);
19447
+ const filePath = join118(outputRoot, paths.relativeDirPath, relativeFilePath);
19177
19448
  const fileContent = await readFileContent(filePath);
19178
19449
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
19179
19450
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -19212,19 +19483,19 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
19212
19483
  };
19213
19484
 
19214
19485
  // src/features/subagents/subagents-processor.ts
19215
- import { basename as basename10, join as join129 } from "path";
19216
- import { z as z74 } from "zod/mini";
19486
+ import { basename as basename10, join as join131 } from "path";
19487
+ import { z as z75 } from "zod/mini";
19217
19488
 
19218
19489
  // src/features/subagents/claudecode-subagent.ts
19219
- import { join as join117 } from "path";
19220
- import { z as z64 } from "zod/mini";
19221
- var ClaudecodeSubagentFrontmatterSchema = z64.looseObject({
19222
- name: z64.string(),
19223
- description: z64.optional(z64.string()),
19224
- model: z64.optional(z64.string()),
19225
- tools: z64.optional(z64.union([z64.string(), z64.array(z64.string())])),
19226
- permissionMode: z64.optional(z64.string()),
19227
- skills: z64.optional(z64.union([z64.string(), z64.array(z64.string())]))
19490
+ import { join as join119 } from "path";
19491
+ import { z as z65 } from "zod/mini";
19492
+ var ClaudecodeSubagentFrontmatterSchema = z65.looseObject({
19493
+ name: z65.string(),
19494
+ description: z65.optional(z65.string()),
19495
+ model: z65.optional(z65.string()),
19496
+ tools: z65.optional(z65.union([z65.string(), z65.array(z65.string())])),
19497
+ permissionMode: z65.optional(z65.string()),
19498
+ skills: z65.optional(z65.union([z65.string(), z65.array(z65.string())]))
19228
19499
  });
19229
19500
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
19230
19501
  frontmatter;
@@ -19234,7 +19505,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
19234
19505
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
19235
19506
  if (!result.success) {
19236
19507
  throw new Error(
19237
- `Invalid frontmatter in ${join117(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
19508
+ `Invalid frontmatter in ${join119(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
19238
19509
  );
19239
19510
  }
19240
19511
  }
@@ -19246,7 +19517,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
19246
19517
  }
19247
19518
  static getSettablePaths(_options = {}) {
19248
19519
  return {
19249
- relativeDirPath: join117(".claude", "agents")
19520
+ relativeDirPath: join119(".claude", "agents")
19250
19521
  };
19251
19522
  }
19252
19523
  getFrontmatter() {
@@ -19325,7 +19596,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
19325
19596
  return {
19326
19597
  success: false,
19327
19598
  error: new Error(
19328
- `Invalid frontmatter in ${join117(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
19599
+ `Invalid frontmatter in ${join119(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
19329
19600
  )
19330
19601
  };
19331
19602
  }
@@ -19343,7 +19614,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
19343
19614
  global = false
19344
19615
  }) {
19345
19616
  const paths = this.getSettablePaths({ global });
19346
- const filePath = join117(outputRoot, paths.relativeDirPath, relativeFilePath);
19617
+ const filePath = join119(outputRoot, paths.relativeDirPath, relativeFilePath);
19347
19618
  const fileContent = await readFileContent(filePath);
19348
19619
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
19349
19620
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -19378,16 +19649,16 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
19378
19649
  };
19379
19650
 
19380
19651
  // src/features/subagents/codexcli-subagent.ts
19381
- import { join as join118 } from "path";
19652
+ import { join as join120 } from "path";
19382
19653
  import * as smolToml6 from "smol-toml";
19383
- import { z as z65 } from "zod/mini";
19384
- var CodexCliSubagentTomlSchema = z65.looseObject({
19385
- name: z65.string(),
19386
- description: z65.optional(z65.string()),
19387
- developer_instructions: z65.optional(z65.string()),
19388
- model: z65.optional(z65.string()),
19389
- model_reasoning_effort: z65.optional(z65.string()),
19390
- sandbox_mode: z65.optional(z65.string())
19654
+ import { z as z66 } from "zod/mini";
19655
+ var CodexCliSubagentTomlSchema = z66.looseObject({
19656
+ name: z66.string(),
19657
+ description: z66.optional(z66.string()),
19658
+ developer_instructions: z66.optional(z66.string()),
19659
+ model: z66.optional(z66.string()),
19660
+ model_reasoning_effort: z66.optional(z66.string()),
19661
+ sandbox_mode: z66.optional(z66.string())
19391
19662
  });
19392
19663
  function stringifyCodexCliSubagentToml(tomlObj) {
19393
19664
  const { developer_instructions, ...restFields } = tomlObj;
@@ -19409,7 +19680,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
19409
19680
  CodexCliSubagentTomlSchema.parse(parsed);
19410
19681
  } catch (error) {
19411
19682
  throw new Error(
19412
- `Invalid TOML in ${join118(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
19683
+ `Invalid TOML in ${join120(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
19413
19684
  { cause: error }
19414
19685
  );
19415
19686
  }
@@ -19421,7 +19692,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
19421
19692
  }
19422
19693
  static getSettablePaths(_options = {}) {
19423
19694
  return {
19424
- relativeDirPath: join118(".codex", "agents")
19695
+ relativeDirPath: join120(".codex", "agents")
19425
19696
  };
19426
19697
  }
19427
19698
  getBody() {
@@ -19433,7 +19704,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
19433
19704
  parsed = CodexCliSubagentTomlSchema.parse(smolToml6.parse(this.body));
19434
19705
  } catch (error) {
19435
19706
  throw new Error(
19436
- `Failed to parse TOML in ${join118(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
19707
+ `Failed to parse TOML in ${join120(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
19437
19708
  { cause: error }
19438
19709
  );
19439
19710
  }
@@ -19514,7 +19785,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
19514
19785
  global = false
19515
19786
  }) {
19516
19787
  const paths = this.getSettablePaths({ global });
19517
- const filePath = join118(outputRoot, paths.relativeDirPath, relativeFilePath);
19788
+ const filePath = join120(outputRoot, paths.relativeDirPath, relativeFilePath);
19518
19789
  const fileContent = await readFileContent(filePath);
19519
19790
  const subagent = new _CodexCliSubagent({
19520
19791
  outputRoot,
@@ -19552,13 +19823,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
19552
19823
  };
19553
19824
 
19554
19825
  // src/features/subagents/copilot-subagent.ts
19555
- import { join as join119 } from "path";
19556
- import { z as z66 } from "zod/mini";
19826
+ import { join as join121 } from "path";
19827
+ import { z as z67 } from "zod/mini";
19557
19828
  var REQUIRED_TOOL = "agent/runSubagent";
19558
- var CopilotSubagentFrontmatterSchema = z66.looseObject({
19559
- name: z66.string(),
19560
- description: z66.optional(z66.string()),
19561
- tools: z66.optional(z66.union([z66.string(), z66.array(z66.string())]))
19829
+ var CopilotSubagentFrontmatterSchema = z67.looseObject({
19830
+ name: z67.string(),
19831
+ description: z67.optional(z67.string()),
19832
+ tools: z67.optional(z67.union([z67.string(), z67.array(z67.string())]))
19562
19833
  });
19563
19834
  var normalizeTools = (tools) => {
19564
19835
  if (!tools) {
@@ -19593,7 +19864,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
19593
19864
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
19594
19865
  if (!result.success) {
19595
19866
  throw new Error(
19596
- `Invalid frontmatter in ${join119(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
19867
+ `Invalid frontmatter in ${join121(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
19597
19868
  );
19598
19869
  }
19599
19870
  }
@@ -19605,7 +19876,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
19605
19876
  }
19606
19877
  static getSettablePaths(_options = {}) {
19607
19878
  return {
19608
- relativeDirPath: join119(".github", "agents")
19879
+ relativeDirPath: join121(".github", "agents")
19609
19880
  };
19610
19881
  }
19611
19882
  getFrontmatter() {
@@ -19679,7 +19950,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
19679
19950
  return {
19680
19951
  success: false,
19681
19952
  error: new Error(
19682
- `Invalid frontmatter in ${join119(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
19953
+ `Invalid frontmatter in ${join121(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
19683
19954
  )
19684
19955
  };
19685
19956
  }
@@ -19697,7 +19968,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
19697
19968
  global = false
19698
19969
  }) {
19699
19970
  const paths = this.getSettablePaths({ global });
19700
- const filePath = join119(outputRoot, paths.relativeDirPath, relativeFilePath);
19971
+ const filePath = join121(outputRoot, paths.relativeDirPath, relativeFilePath);
19701
19972
  const fileContent = await readFileContent(filePath);
19702
19973
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
19703
19974
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -19733,18 +20004,18 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
19733
20004
  };
19734
20005
 
19735
20006
  // src/features/subagents/copilotcli-subagent.ts
19736
- import { join as join120 } from "path";
19737
- import { z as z67 } from "zod/mini";
19738
- var CopilotCliSubagentFrontmatterSchema = z67.looseObject({
19739
- description: z67.string(),
19740
- name: z67.optional(z67.string()),
19741
- target: z67.optional(z67.string()),
19742
- tools: z67.optional(z67.union([z67.string(), z67.array(z67.string())])),
19743
- model: z67.optional(z67.string()),
19744
- "disable-model-invocation": z67.optional(z67.boolean()),
19745
- "user-invocable": z67.optional(z67.boolean()),
19746
- "mcp-servers": z67.optional(z67.record(z67.string(), z67.unknown())),
19747
- metadata: z67.optional(z67.record(z67.string(), z67.unknown()))
20007
+ import { join as join122 } from "path";
20008
+ import { z as z68 } from "zod/mini";
20009
+ var CopilotCliSubagentFrontmatterSchema = z68.looseObject({
20010
+ description: z68.string(),
20011
+ name: z68.optional(z68.string()),
20012
+ target: z68.optional(z68.string()),
20013
+ tools: z68.optional(z68.union([z68.string(), z68.array(z68.string())])),
20014
+ model: z68.optional(z68.string()),
20015
+ "disable-model-invocation": z68.optional(z68.boolean()),
20016
+ "user-invocable": z68.optional(z68.boolean()),
20017
+ "mcp-servers": z68.optional(z68.record(z68.string(), z68.unknown())),
20018
+ metadata: z68.optional(z68.record(z68.string(), z68.unknown()))
19748
20019
  });
19749
20020
  var toCopilotCliAgentFilePath = (relativeFilePath) => {
19750
20021
  if (relativeFilePath.endsWith(".agent.md")) {
@@ -19769,7 +20040,7 @@ var CopilotcliSubagent = class _CopilotcliSubagent extends ToolSubagent {
19769
20040
  const result = CopilotCliSubagentFrontmatterSchema.safeParse(frontmatter);
19770
20041
  if (!result.success) {
19771
20042
  throw new Error(
19772
- `Invalid frontmatter in ${join120(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
20043
+ `Invalid frontmatter in ${join122(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
19773
20044
  );
19774
20045
  }
19775
20046
  }
@@ -19781,9 +20052,9 @@ var CopilotcliSubagent = class _CopilotcliSubagent extends ToolSubagent {
19781
20052
  global = false
19782
20053
  } = {}) {
19783
20054
  if (global) {
19784
- return { relativeDirPath: join120(".copilot", "agents") };
20055
+ return { relativeDirPath: join122(".copilot", "agents") };
19785
20056
  }
19786
- return { relativeDirPath: join120(".github", "agents") };
20057
+ return { relativeDirPath: join122(".github", "agents") };
19787
20058
  }
19788
20059
  getFrontmatter() {
19789
20060
  return this.frontmatter;
@@ -19861,7 +20132,7 @@ var CopilotcliSubagent = class _CopilotcliSubagent extends ToolSubagent {
19861
20132
  return {
19862
20133
  success: false,
19863
20134
  error: new Error(
19864
- `Invalid frontmatter in ${join120(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
20135
+ `Invalid frontmatter in ${join122(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
19865
20136
  )
19866
20137
  };
19867
20138
  }
@@ -19878,7 +20149,7 @@ var CopilotcliSubagent = class _CopilotcliSubagent extends ToolSubagent {
19878
20149
  global = false
19879
20150
  }) {
19880
20151
  const paths = this.getSettablePaths({ global });
19881
- const filePath = join120(outputRoot, paths.relativeDirPath, relativeFilePath);
20152
+ const filePath = join122(outputRoot, paths.relativeDirPath, relativeFilePath);
19882
20153
  const fileContent = await readFileContent(filePath);
19883
20154
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
19884
20155
  const result = CopilotCliSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -19914,11 +20185,11 @@ var CopilotcliSubagent = class _CopilotcliSubagent extends ToolSubagent {
19914
20185
  };
19915
20186
 
19916
20187
  // src/features/subagents/cursor-subagent.ts
19917
- import { join as join121 } from "path";
19918
- import { z as z68 } from "zod/mini";
19919
- var CursorSubagentFrontmatterSchema = z68.looseObject({
19920
- name: z68.string(),
19921
- description: z68.optional(z68.string())
20188
+ import { join as join123 } from "path";
20189
+ import { z as z69 } from "zod/mini";
20190
+ var CursorSubagentFrontmatterSchema = z69.looseObject({
20191
+ name: z69.string(),
20192
+ description: z69.optional(z69.string())
19922
20193
  });
19923
20194
  var CursorSubagent = class _CursorSubagent extends ToolSubagent {
19924
20195
  frontmatter;
@@ -19928,7 +20199,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
19928
20199
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
19929
20200
  if (!result.success) {
19930
20201
  throw new Error(
19931
- `Invalid frontmatter in ${join121(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
20202
+ `Invalid frontmatter in ${join123(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
19932
20203
  );
19933
20204
  }
19934
20205
  }
@@ -19940,7 +20211,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
19940
20211
  }
19941
20212
  static getSettablePaths(_options = {}) {
19942
20213
  return {
19943
- relativeDirPath: join121(".cursor", "agents")
20214
+ relativeDirPath: join123(".cursor", "agents")
19944
20215
  };
19945
20216
  }
19946
20217
  getFrontmatter() {
@@ -20007,7 +20278,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
20007
20278
  return {
20008
20279
  success: false,
20009
20280
  error: new Error(
20010
- `Invalid frontmatter in ${join121(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
20281
+ `Invalid frontmatter in ${join123(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
20011
20282
  )
20012
20283
  };
20013
20284
  }
@@ -20025,7 +20296,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
20025
20296
  global = false
20026
20297
  }) {
20027
20298
  const paths = this.getSettablePaths({ global });
20028
- const filePath = join121(outputRoot, paths.relativeDirPath, relativeFilePath);
20299
+ const filePath = join123(outputRoot, paths.relativeDirPath, relativeFilePath);
20029
20300
  const fileContent = await readFileContent(filePath);
20030
20301
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
20031
20302
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -20061,12 +20332,12 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
20061
20332
  };
20062
20333
 
20063
20334
  // src/features/subagents/deepagents-subagent.ts
20064
- import { join as join122 } from "path";
20065
- import { z as z69 } from "zod/mini";
20066
- var DeepagentsSubagentFrontmatterSchema = z69.looseObject({
20067
- name: z69.string(),
20068
- description: z69.optional(z69.string()),
20069
- model: z69.optional(z69.string())
20335
+ import { join as join124 } from "path";
20336
+ import { z as z70 } from "zod/mini";
20337
+ var DeepagentsSubagentFrontmatterSchema = z70.looseObject({
20338
+ name: z70.string(),
20339
+ description: z70.optional(z70.string()),
20340
+ model: z70.optional(z70.string())
20070
20341
  });
20071
20342
  var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
20072
20343
  frontmatter;
@@ -20076,7 +20347,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
20076
20347
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
20077
20348
  if (!result.success) {
20078
20349
  throw new Error(
20079
- `Invalid frontmatter in ${join122(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
20350
+ `Invalid frontmatter in ${join124(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
20080
20351
  );
20081
20352
  }
20082
20353
  }
@@ -20086,7 +20357,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
20086
20357
  }
20087
20358
  static getSettablePaths(_options = {}) {
20088
20359
  return {
20089
- relativeDirPath: join122(".deepagents", "agents")
20360
+ relativeDirPath: join124(".deepagents", "agents")
20090
20361
  };
20091
20362
  }
20092
20363
  getFrontmatter() {
@@ -20161,7 +20432,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
20161
20432
  return {
20162
20433
  success: false,
20163
20434
  error: new Error(
20164
- `Invalid frontmatter in ${join122(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
20435
+ `Invalid frontmatter in ${join124(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
20165
20436
  )
20166
20437
  };
20167
20438
  }
@@ -20179,7 +20450,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
20179
20450
  global = false
20180
20451
  }) {
20181
20452
  const paths = this.getSettablePaths({ global });
20182
- const filePath = join122(outputRoot, paths.relativeDirPath, relativeFilePath);
20453
+ const filePath = join124(outputRoot, paths.relativeDirPath, relativeFilePath);
20183
20454
  const fileContent = await readFileContent(filePath);
20184
20455
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
20185
20456
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -20214,11 +20485,11 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
20214
20485
  };
20215
20486
 
20216
20487
  // src/features/subagents/junie-subagent.ts
20217
- import { join as join123 } from "path";
20218
- import { z as z70 } from "zod/mini";
20219
- var JunieSubagentFrontmatterSchema = z70.looseObject({
20220
- name: z70.optional(z70.string()),
20221
- description: z70.string()
20488
+ import { join as join125 } from "path";
20489
+ import { z as z71 } from "zod/mini";
20490
+ var JunieSubagentFrontmatterSchema = z71.looseObject({
20491
+ name: z71.optional(z71.string()),
20492
+ description: z71.string()
20222
20493
  });
20223
20494
  var JunieSubagent = class _JunieSubagent extends ToolSubagent {
20224
20495
  frontmatter;
@@ -20228,7 +20499,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
20228
20499
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
20229
20500
  if (!result.success) {
20230
20501
  throw new Error(
20231
- `Invalid frontmatter in ${join123(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
20502
+ `Invalid frontmatter in ${join125(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
20232
20503
  );
20233
20504
  }
20234
20505
  }
@@ -20243,7 +20514,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
20243
20514
  throw new Error("JunieSubagent does not support global mode.");
20244
20515
  }
20245
20516
  return {
20246
- relativeDirPath: join123(".junie", "agents")
20517
+ relativeDirPath: join125(".junie", "agents")
20247
20518
  };
20248
20519
  }
20249
20520
  getFrontmatter() {
@@ -20319,7 +20590,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
20319
20590
  return {
20320
20591
  success: false,
20321
20592
  error: new Error(
20322
- `Invalid frontmatter in ${join123(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
20593
+ `Invalid frontmatter in ${join125(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
20323
20594
  )
20324
20595
  };
20325
20596
  }
@@ -20337,7 +20608,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
20337
20608
  global = false
20338
20609
  }) {
20339
20610
  const paths = this.getSettablePaths({ global });
20340
- const filePath = join123(outputRoot, paths.relativeDirPath, relativeFilePath);
20611
+ const filePath = join125(outputRoot, paths.relativeDirPath, relativeFilePath);
20341
20612
  const fileContent = await readFileContent(filePath);
20342
20613
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
20343
20614
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -20372,16 +20643,16 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
20372
20643
  };
20373
20644
 
20374
20645
  // src/features/subagents/kilo-subagent.ts
20375
- import { join as join125 } from "path";
20376
- import { z as z72 } from "zod/mini";
20646
+ import { join as join127 } from "path";
20647
+ import { z as z73 } from "zod/mini";
20377
20648
 
20378
20649
  // src/features/subagents/opencode-style-subagent.ts
20379
- import { basename as basename9, join as join124 } from "path";
20380
- import { z as z71 } from "zod/mini";
20381
- var OpenCodeStyleSubagentFrontmatterSchema = z71.looseObject({
20382
- description: z71.optional(z71.string()),
20383
- mode: z71._default(z71.string(), "subagent"),
20384
- name: z71.optional(z71.string())
20650
+ import { basename as basename9, join as join126 } from "path";
20651
+ import { z as z72 } from "zod/mini";
20652
+ var OpenCodeStyleSubagentFrontmatterSchema = z72.looseObject({
20653
+ description: z72.optional(z72.string()),
20654
+ mode: z72._default(z72.string(), "subagent"),
20655
+ name: z72.optional(z72.string())
20385
20656
  });
20386
20657
  var OpenCodeStyleSubagent = class extends ToolSubagent {
20387
20658
  frontmatter;
@@ -20391,7 +20662,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
20391
20662
  const result = OpenCodeStyleSubagentFrontmatterSchema.safeParse(frontmatter);
20392
20663
  if (!result.success) {
20393
20664
  throw new Error(
20394
- `Invalid frontmatter in ${join124(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
20665
+ `Invalid frontmatter in ${join126(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
20395
20666
  );
20396
20667
  }
20397
20668
  }
@@ -20433,31 +20704,31 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
20433
20704
  return {
20434
20705
  success: false,
20435
20706
  error: new Error(
20436
- `Invalid frontmatter in ${join124(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
20707
+ `Invalid frontmatter in ${join126(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
20437
20708
  )
20438
20709
  };
20439
20710
  }
20440
20711
  };
20441
20712
 
20442
20713
  // src/features/subagents/kilo-subagent.ts
20443
- var KiloSubagentFrontmatterSchema = z72.looseObject({
20444
- description: z72.optional(z72.string()),
20445
- mode: z72._default(z72.string(), "all"),
20446
- name: z72.optional(z72.string()),
20447
- displayName: z72.optional(z72.string()),
20448
- deprecated: z72.optional(z72.boolean()),
20449
- native: z72.optional(z72.boolean()),
20450
- hidden: z72.optional(z72.boolean()),
20451
- top_p: z72.optional(z72.number()),
20452
- temperature: z72.optional(z72.number()),
20453
- color: z72.optional(z72.string()),
20454
- permission: z72.optional(z72.string()),
20455
- model: z72.optional(z72.string()),
20456
- variant: z72.optional(z72.string()),
20457
- prompt: z72.optional(z72.string()),
20458
- options: z72.optional(z72.looseObject({})),
20459
- steps: z72.optional(z72.array(z72.looseObject({}))),
20460
- disable: z72.optional(z72.boolean())
20714
+ var KiloSubagentFrontmatterSchema = z73.looseObject({
20715
+ description: z73.optional(z73.string()),
20716
+ mode: z73._default(z73.string(), "all"),
20717
+ name: z73.optional(z73.string()),
20718
+ displayName: z73.optional(z73.string()),
20719
+ deprecated: z73.optional(z73.boolean()),
20720
+ native: z73.optional(z73.boolean()),
20721
+ hidden: z73.optional(z73.boolean()),
20722
+ top_p: z73.optional(z73.number()),
20723
+ temperature: z73.optional(z73.number()),
20724
+ color: z73.optional(z73.string()),
20725
+ permission: z73.optional(z73.string()),
20726
+ model: z73.optional(z73.string()),
20727
+ variant: z73.optional(z73.string()),
20728
+ prompt: z73.optional(z73.string()),
20729
+ options: z73.optional(z73.looseObject({})),
20730
+ steps: z73.optional(z73.array(z73.looseObject({}))),
20731
+ disable: z73.optional(z73.boolean())
20461
20732
  });
20462
20733
  var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
20463
20734
  constructor(params) {
@@ -20484,7 +20755,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
20484
20755
  return {
20485
20756
  success: false,
20486
20757
  error: new Error(
20487
- `Invalid frontmatter in ${join125(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
20758
+ `Invalid frontmatter in ${join127(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
20488
20759
  )
20489
20760
  };
20490
20761
  }
@@ -20492,7 +20763,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
20492
20763
  global = false
20493
20764
  } = {}) {
20494
20765
  return {
20495
- relativeDirPath: global ? join125(".config", "kilo", "agent") : join125(".kilo", "agent")
20766
+ relativeDirPath: global ? join127(".config", "kilo", "agent") : join127(".kilo", "agent")
20496
20767
  };
20497
20768
  }
20498
20769
  static fromRulesyncSubagent({
@@ -20541,7 +20812,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
20541
20812
  global = false
20542
20813
  }) {
20543
20814
  const paths = this.getSettablePaths({ global });
20544
- const filePath = join125(outputRoot, paths.relativeDirPath, relativeFilePath);
20815
+ const filePath = join127(outputRoot, paths.relativeDirPath, relativeFilePath);
20545
20816
  const fileContent = await readFileContent(filePath);
20546
20817
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
20547
20818
  const result = KiloSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -20579,23 +20850,23 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
20579
20850
  };
20580
20851
 
20581
20852
  // src/features/subagents/kiro-subagent.ts
20582
- import { join as join126 } from "path";
20583
- import { z as z73 } from "zod/mini";
20584
- var KiroCliSubagentJsonSchema = z73.looseObject({
20585
- name: z73.string(),
20586
- description: z73.optional(z73.nullable(z73.string())),
20587
- prompt: z73.optional(z73.nullable(z73.string())),
20588
- tools: z73.optional(z73.nullable(z73.array(z73.string()))),
20589
- toolAliases: z73.optional(z73.nullable(z73.record(z73.string(), z73.string()))),
20590
- toolSettings: z73.optional(z73.nullable(z73.unknown())),
20591
- toolSchema: z73.optional(z73.nullable(z73.unknown())),
20592
- hooks: z73.optional(z73.nullable(z73.record(z73.string(), z73.array(z73.unknown())))),
20593
- model: z73.optional(z73.nullable(z73.string())),
20594
- mcpServers: z73.optional(z73.nullable(z73.record(z73.string(), z73.unknown()))),
20595
- useLegacyMcpJson: z73.optional(z73.nullable(z73.boolean())),
20596
- resources: z73.optional(z73.nullable(z73.array(z73.string()))),
20597
- allowedTools: z73.optional(z73.nullable(z73.array(z73.string()))),
20598
- includeMcpJson: z73.optional(z73.nullable(z73.boolean()))
20853
+ import { join as join128 } from "path";
20854
+ import { z as z74 } from "zod/mini";
20855
+ var KiroCliSubagentJsonSchema = z74.looseObject({
20856
+ name: z74.string(),
20857
+ description: z74.optional(z74.nullable(z74.string())),
20858
+ prompt: z74.optional(z74.nullable(z74.string())),
20859
+ tools: z74.optional(z74.nullable(z74.array(z74.string()))),
20860
+ toolAliases: z74.optional(z74.nullable(z74.record(z74.string(), z74.string()))),
20861
+ toolSettings: z74.optional(z74.nullable(z74.unknown())),
20862
+ toolSchema: z74.optional(z74.nullable(z74.unknown())),
20863
+ hooks: z74.optional(z74.nullable(z74.record(z74.string(), z74.array(z74.unknown())))),
20864
+ model: z74.optional(z74.nullable(z74.string())),
20865
+ mcpServers: z74.optional(z74.nullable(z74.record(z74.string(), z74.unknown()))),
20866
+ useLegacyMcpJson: z74.optional(z74.nullable(z74.boolean())),
20867
+ resources: z74.optional(z74.nullable(z74.array(z74.string()))),
20868
+ allowedTools: z74.optional(z74.nullable(z74.array(z74.string()))),
20869
+ includeMcpJson: z74.optional(z74.nullable(z74.boolean()))
20599
20870
  });
20600
20871
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
20601
20872
  body;
@@ -20606,7 +20877,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
20606
20877
  KiroCliSubagentJsonSchema.parse(parsed);
20607
20878
  } catch (error) {
20608
20879
  throw new Error(
20609
- `Invalid JSON in ${join126(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
20880
+ `Invalid JSON in ${join128(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
20610
20881
  { cause: error }
20611
20882
  );
20612
20883
  }
@@ -20618,7 +20889,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
20618
20889
  }
20619
20890
  static getSettablePaths(_options = {}) {
20620
20891
  return {
20621
- relativeDirPath: join126(".kiro", "agents")
20892
+ relativeDirPath: join128(".kiro", "agents")
20622
20893
  };
20623
20894
  }
20624
20895
  getBody() {
@@ -20630,7 +20901,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
20630
20901
  parsed = JSON.parse(this.body);
20631
20902
  } catch (error) {
20632
20903
  throw new Error(
20633
- `Failed to parse JSON in ${join126(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
20904
+ `Failed to parse JSON in ${join128(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
20634
20905
  { cause: error }
20635
20906
  );
20636
20907
  }
@@ -20711,7 +20982,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
20711
20982
  global = false
20712
20983
  }) {
20713
20984
  const paths = this.getSettablePaths({ global });
20714
- const filePath = join126(outputRoot, paths.relativeDirPath, relativeFilePath);
20985
+ const filePath = join128(outputRoot, paths.relativeDirPath, relativeFilePath);
20715
20986
  const fileContent = await readFileContent(filePath);
20716
20987
  const subagent = new _KiroSubagent({
20717
20988
  outputRoot,
@@ -20749,7 +21020,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
20749
21020
  };
20750
21021
 
20751
21022
  // src/features/subagents/opencode-subagent.ts
20752
- import { join as join127 } from "path";
21023
+ import { join as join129 } from "path";
20753
21024
  var OpenCodeSubagentFrontmatterSchema = OpenCodeStyleSubagentFrontmatterSchema;
20754
21025
  var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
20755
21026
  getToolTarget() {
@@ -20759,7 +21030,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
20759
21030
  global = false
20760
21031
  } = {}) {
20761
21032
  return {
20762
- relativeDirPath: global ? join127(".config", "opencode", "agent") : join127(".opencode", "agent")
21033
+ relativeDirPath: global ? join129(".config", "opencode", "agent") : join129(".opencode", "agent")
20763
21034
  };
20764
21035
  }
20765
21036
  static fromRulesyncSubagent({
@@ -20803,7 +21074,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
20803
21074
  global = false
20804
21075
  }) {
20805
21076
  const paths = this.getSettablePaths({ global });
20806
- const filePath = join127(outputRoot, paths.relativeDirPath, relativeFilePath);
21077
+ const filePath = join129(outputRoot, paths.relativeDirPath, relativeFilePath);
20807
21078
  const fileContent = await readFileContent(filePath);
20808
21079
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
20809
21080
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -20841,7 +21112,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
20841
21112
  };
20842
21113
 
20843
21114
  // src/features/subagents/takt-subagent.ts
20844
- import { join as join128 } from "path";
21115
+ import { join as join130 } from "path";
20845
21116
  var DEFAULT_TAKT_SUBAGENT_DIR = "personas";
20846
21117
  var TaktSubagent = class _TaktSubagent extends ToolSubagent {
20847
21118
  body;
@@ -20853,7 +21124,7 @@ var TaktSubagent = class _TaktSubagent extends ToolSubagent {
20853
21124
  }
20854
21125
  static getSettablePaths(_options = {}) {
20855
21126
  return {
20856
- relativeDirPath: join128(".takt", "facets", DEFAULT_TAKT_SUBAGENT_DIR)
21127
+ relativeDirPath: join130(".takt", "facets", DEFAULT_TAKT_SUBAGENT_DIR)
20857
21128
  };
20858
21129
  }
20859
21130
  getBody() {
@@ -20915,7 +21186,7 @@ var TaktSubagent = class _TaktSubagent extends ToolSubagent {
20915
21186
  global = false
20916
21187
  }) {
20917
21188
  const paths = this.getSettablePaths({ global });
20918
- const filePath = join128(outputRoot, paths.relativeDirPath, relativeFilePath);
21189
+ const filePath = join130(outputRoot, paths.relativeDirPath, relativeFilePath);
20919
21190
  const fileContent = await readFileContent(filePath);
20920
21191
  const { body } = parseFrontmatter(fileContent, filePath);
20921
21192
  return new _TaktSubagent({
@@ -20963,7 +21234,7 @@ var subagentsProcessorToolTargetTuple = [
20963
21234
  "rovodev",
20964
21235
  "takt"
20965
21236
  ];
20966
- var SubagentsProcessorToolTargetSchema = z74.enum(subagentsProcessorToolTargetTuple);
21237
+ var SubagentsProcessorToolTargetSchema = z75.enum(subagentsProcessorToolTargetTuple);
20967
21238
  var toolSubagentFactories = /* @__PURE__ */ new Map([
20968
21239
  [
20969
21240
  "agentsmd",
@@ -21172,7 +21443,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
21172
21443
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
21173
21444
  */
21174
21445
  async loadRulesyncFiles() {
21175
- const subagentsDir = join129(this.inputRoot, RulesyncSubagent.getSettablePaths().relativeDirPath);
21446
+ const subagentsDir = join131(this.inputRoot, RulesyncSubagent.getSettablePaths().relativeDirPath);
21176
21447
  const dirExists = await directoryExists(subagentsDir);
21177
21448
  if (!dirExists) {
21178
21449
  this.logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -21187,7 +21458,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
21187
21458
  this.logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
21188
21459
  const rulesyncSubagents = [];
21189
21460
  for (const mdFile of mdFiles) {
21190
- const filepath = join129(subagentsDir, mdFile);
21461
+ const filepath = join131(subagentsDir, mdFile);
21191
21462
  try {
21192
21463
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
21193
21464
  outputRoot: this.inputRoot,
@@ -21218,7 +21489,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
21218
21489
  const factory = this.getFactory(this.toolTarget);
21219
21490
  const paths = factory.class.getSettablePaths({ global: this.global });
21220
21491
  const subagentFilePaths = await findFilesByGlobs(
21221
- join129(this.outputRoot, paths.relativeDirPath, factory.meta.filePattern)
21492
+ join131(this.outputRoot, paths.relativeDirPath, factory.meta.filePattern)
21222
21493
  );
21223
21494
  if (forDeletion) {
21224
21495
  const toolSubagents2 = subagentFilePaths.map(
@@ -21285,55 +21556,55 @@ var SubagentsProcessor = class extends FeatureProcessor {
21285
21556
  };
21286
21557
 
21287
21558
  // src/features/rules/agentsmd-rule.ts
21288
- import { join as join132 } from "path";
21559
+ import { join as join134 } from "path";
21289
21560
 
21290
21561
  // src/features/rules/tool-rule.ts
21291
- import { join as join131 } from "path";
21562
+ import { join as join133 } from "path";
21292
21563
 
21293
21564
  // src/features/rules/rulesync-rule.ts
21294
- import { join as join130 } from "path";
21295
- import { z as z75 } from "zod/mini";
21296
- var RulesyncRuleFrontmatterSchema = z75.object({
21297
- root: z75.optional(z75.boolean()),
21298
- localRoot: z75.optional(z75.boolean()),
21299
- targets: z75._default(RulesyncTargetsSchema, ["*"]),
21300
- description: z75.optional(z75.string()),
21301
- globs: z75.optional(z75.array(z75.string())),
21302
- agentsmd: z75.optional(
21303
- z75.looseObject({
21565
+ import { join as join132 } from "path";
21566
+ import { z as z76 } from "zod/mini";
21567
+ var RulesyncRuleFrontmatterSchema = z76.object({
21568
+ root: z76.optional(z76.boolean()),
21569
+ localRoot: z76.optional(z76.boolean()),
21570
+ targets: z76._default(RulesyncTargetsSchema, ["*"]),
21571
+ description: z76.optional(z76.string()),
21572
+ globs: z76.optional(z76.array(z76.string())),
21573
+ agentsmd: z76.optional(
21574
+ z76.looseObject({
21304
21575
  // @example "path/to/subproject"
21305
- subprojectPath: z75.optional(z75.string())
21576
+ subprojectPath: z76.optional(z76.string())
21306
21577
  })
21307
21578
  ),
21308
- claudecode: z75.optional(
21309
- z75.looseObject({
21579
+ claudecode: z76.optional(
21580
+ z76.looseObject({
21310
21581
  // Glob patterns for conditional rules (takes precedence over globs)
21311
21582
  // @example ["src/**/*.ts", "tests/**/*.test.ts"]
21312
- paths: z75.optional(z75.array(z75.string()))
21583
+ paths: z76.optional(z76.array(z76.string()))
21313
21584
  })
21314
21585
  ),
21315
- cursor: z75.optional(
21316
- z75.looseObject({
21317
- alwaysApply: z75.optional(z75.boolean()),
21318
- description: z75.optional(z75.string()),
21319
- globs: z75.optional(z75.array(z75.string()))
21586
+ cursor: z76.optional(
21587
+ z76.looseObject({
21588
+ alwaysApply: z76.optional(z76.boolean()),
21589
+ description: z76.optional(z76.string()),
21590
+ globs: z76.optional(z76.array(z76.string()))
21320
21591
  })
21321
21592
  ),
21322
- copilot: z75.optional(
21323
- z75.looseObject({
21324
- excludeAgent: z75.optional(z75.union([z75.literal("code-review"), z75.literal("coding-agent")]))
21593
+ copilot: z76.optional(
21594
+ z76.looseObject({
21595
+ excludeAgent: z76.optional(z76.union([z76.literal("code-review"), z76.literal("coding-agent")]))
21325
21596
  })
21326
21597
  ),
21327
- antigravity: z75.optional(
21328
- z75.looseObject({
21329
- trigger: z75.optional(z75.string()),
21330
- globs: z75.optional(z75.array(z75.string()))
21598
+ antigravity: z76.optional(
21599
+ z76.looseObject({
21600
+ trigger: z76.optional(z76.string()),
21601
+ globs: z76.optional(z76.array(z76.string()))
21331
21602
  })
21332
21603
  ),
21333
- takt: z75.optional(
21334
- z75.looseObject({
21604
+ takt: z76.optional(
21605
+ z76.looseObject({
21335
21606
  // Rename the emitted file stem (e.g. "coder.md" → "{name}.md").
21336
- name: z75.optional(z75.string())
21607
+ name: z76.optional(z76.string())
21337
21608
  })
21338
21609
  )
21339
21610
  });
@@ -21344,7 +21615,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
21344
21615
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
21345
21616
  if (!parseResult.success && rest.validate !== false) {
21346
21617
  throw new Error(
21347
- `Invalid frontmatter in ${join130(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
21618
+ `Invalid frontmatter in ${join132(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
21348
21619
  );
21349
21620
  }
21350
21621
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -21379,7 +21650,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
21379
21650
  return {
21380
21651
  success: false,
21381
21652
  error: new Error(
21382
- `Invalid frontmatter in ${join130(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
21653
+ `Invalid frontmatter in ${join132(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
21383
21654
  )
21384
21655
  };
21385
21656
  }
@@ -21389,7 +21660,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
21389
21660
  relativeFilePath,
21390
21661
  validate = true
21391
21662
  }) {
21392
- const filePath = join130(
21663
+ const filePath = join132(
21393
21664
  outputRoot,
21394
21665
  this.getSettablePaths().recommended.relativeDirPath,
21395
21666
  relativeFilePath
@@ -21488,7 +21759,7 @@ var ToolRule = class extends ToolFile {
21488
21759
  rulesyncRule,
21489
21760
  validate = true,
21490
21761
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
21491
- nonRootPath = { relativeDirPath: join131(".agents", "memories") }
21762
+ nonRootPath = { relativeDirPath: join133(".agents", "memories") }
21492
21763
  }) {
21493
21764
  const params = this.buildToolRuleParamsDefault({
21494
21765
  outputRoot,
@@ -21499,7 +21770,7 @@ var ToolRule = class extends ToolFile {
21499
21770
  });
21500
21771
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
21501
21772
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
21502
- params.relativeDirPath = join131(rulesyncFrontmatter.agentsmd.subprojectPath);
21773
+ params.relativeDirPath = join133(rulesyncFrontmatter.agentsmd.subprojectPath);
21503
21774
  params.relativeFilePath = "AGENTS.md";
21504
21775
  }
21505
21776
  return params;
@@ -21548,7 +21819,7 @@ var ToolRule = class extends ToolFile {
21548
21819
  }
21549
21820
  };
21550
21821
  function buildToolPath(toolDir, subDir, excludeToolDir) {
21551
- return excludeToolDir ? subDir : join131(toolDir, subDir);
21822
+ return excludeToolDir ? subDir : join133(toolDir, subDir);
21552
21823
  }
21553
21824
 
21554
21825
  // src/features/rules/agentsmd-rule.ts
@@ -21577,8 +21848,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
21577
21848
  validate = true
21578
21849
  }) {
21579
21850
  const isRoot = relativeFilePath === "AGENTS.md";
21580
- const relativePath = isRoot ? "AGENTS.md" : join132(".agents", "memories", relativeFilePath);
21581
- const fileContent = await readFileContent(join132(outputRoot, relativePath));
21851
+ const relativePath = isRoot ? "AGENTS.md" : join134(".agents", "memories", relativeFilePath);
21852
+ const fileContent = await readFileContent(join134(outputRoot, relativePath));
21582
21853
  return new _AgentsMdRule({
21583
21854
  outputRoot,
21584
21855
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -21633,7 +21904,7 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
21633
21904
  };
21634
21905
 
21635
21906
  // src/features/rules/antigravity-cli-rule.ts
21636
- import { join as join133 } from "path";
21907
+ import { join as join135 } from "path";
21637
21908
  var AntigravityCliRule = class _AntigravityCliRule extends ToolRule {
21638
21909
  static getSettablePaths({
21639
21910
  global,
@@ -21668,7 +21939,7 @@ var AntigravityCliRule = class _AntigravityCliRule extends ToolRule {
21668
21939
  if (isRoot) {
21669
21940
  const relativePath2 = paths.root.relativeFilePath;
21670
21941
  const fileContent2 = await readFileContent(
21671
- join133(outputRoot, paths.root.relativeDirPath, relativePath2)
21942
+ join135(outputRoot, paths.root.relativeDirPath, relativePath2)
21672
21943
  );
21673
21944
  return new _AntigravityCliRule({
21674
21945
  outputRoot,
@@ -21682,8 +21953,8 @@ var AntigravityCliRule = class _AntigravityCliRule extends ToolRule {
21682
21953
  if (!paths.nonRoot) {
21683
21954
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
21684
21955
  }
21685
- const relativePath = join133(paths.nonRoot.relativeDirPath, relativeFilePath);
21686
- const fileContent = await readFileContent(join133(outputRoot, relativePath));
21956
+ const relativePath = join135(paths.nonRoot.relativeDirPath, relativeFilePath);
21957
+ const fileContent = await readFileContent(join135(outputRoot, relativePath));
21687
21958
  return new _AntigravityCliRule({
21688
21959
  outputRoot,
21689
21960
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -21742,24 +22013,24 @@ var AntigravityCliRule = class _AntigravityCliRule extends ToolRule {
21742
22013
  };
21743
22014
 
21744
22015
  // src/features/rules/antigravity-ide-rule.ts
21745
- import { join as join135 } from "path";
22016
+ import { join as join137 } from "path";
21746
22017
 
21747
22018
  // src/features/rules/antigravity-rule.ts
21748
- import { join as join134 } from "path";
21749
- import { z as z76 } from "zod/mini";
21750
- var AntigravityRuleFrontmatterSchema = z76.looseObject({
21751
- trigger: z76.optional(
21752
- z76.union([
21753
- z76.literal("always_on"),
21754
- z76.literal("glob"),
21755
- z76.literal("manual"),
21756
- z76.literal("model_decision"),
21757
- z76.string()
22019
+ import { join as join136 } from "path";
22020
+ import { z as z77 } from "zod/mini";
22021
+ var AntigravityRuleFrontmatterSchema = z77.looseObject({
22022
+ trigger: z77.optional(
22023
+ z77.union([
22024
+ z77.literal("always_on"),
22025
+ z77.literal("glob"),
22026
+ z77.literal("manual"),
22027
+ z77.literal("model_decision"),
22028
+ z77.string()
21758
22029
  // accepts any string for forward compatibility
21759
22030
  ])
21760
22031
  ),
21761
- globs: z76.optional(z76.string()),
21762
- description: z76.optional(z76.string())
22032
+ globs: z77.optional(z77.string()),
22033
+ description: z77.optional(z77.string())
21763
22034
  });
21764
22035
  function parseGlobsString(globs) {
21765
22036
  if (!globs) {
@@ -21904,7 +22175,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
21904
22175
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
21905
22176
  if (!result.success) {
21906
22177
  throw new Error(
21907
- `Invalid frontmatter in ${join134(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
22178
+ `Invalid frontmatter in ${join136(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
21908
22179
  );
21909
22180
  }
21910
22181
  }
@@ -21928,7 +22199,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
21928
22199
  relativeFilePath,
21929
22200
  validate = true
21930
22201
  }) {
21931
- const filePath = join134(
22202
+ const filePath = join136(
21932
22203
  outputRoot,
21933
22204
  this.getSettablePaths().nonRoot.relativeDirPath,
21934
22205
  relativeFilePath
@@ -22076,7 +22347,7 @@ var AntigravityIdeRule = class _AntigravityIdeRule extends ToolRule {
22076
22347
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
22077
22348
  if (!result.success) {
22078
22349
  throw new Error(
22079
- `Invalid frontmatter in ${join135(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
22350
+ `Invalid frontmatter in ${join137(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
22080
22351
  );
22081
22352
  }
22082
22353
  }
@@ -22119,7 +22390,7 @@ var AntigravityIdeRule = class _AntigravityIdeRule extends ToolRule {
22119
22390
  if (global) {
22120
22391
  const rootPath = _AntigravityIdeRule.getGlobalRootPath();
22121
22392
  const fileContent2 = await readFileContent(
22122
- join135(outputRoot, rootPath.relativeDirPath, rootPath.relativeFilePath)
22393
+ join137(outputRoot, rootPath.relativeDirPath, rootPath.relativeFilePath)
22123
22394
  );
22124
22395
  return new _AntigravityIdeRule({
22125
22396
  outputRoot,
@@ -22132,7 +22403,7 @@ var AntigravityIdeRule = class _AntigravityIdeRule extends ToolRule {
22132
22403
  });
22133
22404
  }
22134
22405
  const nonRootDirPath = buildToolPath(".agents", "rules");
22135
- const filePath = join135(outputRoot, nonRootDirPath, relativeFilePath);
22406
+ const filePath = join137(outputRoot, nonRootDirPath, relativeFilePath);
22136
22407
  const fileContent = await readFileContent(filePath);
22137
22408
  const { frontmatter, body } = parseFrontmatter(fileContent, filePath);
22138
22409
  let parsedFrontmatter;
@@ -22261,7 +22532,7 @@ var AntigravityIdeRule = class _AntigravityIdeRule extends ToolRule {
22261
22532
  };
22262
22533
 
22263
22534
  // src/features/rules/augmentcode-legacy-rule.ts
22264
- import { join as join136 } from "path";
22535
+ import { join as join138 } from "path";
22265
22536
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
22266
22537
  toRulesyncRule() {
22267
22538
  const rulesyncFrontmatter = {
@@ -22321,8 +22592,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
22321
22592
  }) {
22322
22593
  const settablePaths = this.getSettablePaths();
22323
22594
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
22324
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : join136(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
22325
- const fileContent = await readFileContent(join136(outputRoot, relativePath));
22595
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : join138(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
22596
+ const fileContent = await readFileContent(join138(outputRoot, relativePath));
22326
22597
  return new _AugmentcodeLegacyRule({
22327
22598
  outputRoot,
22328
22599
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -22351,7 +22622,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
22351
22622
  };
22352
22623
 
22353
22624
  // src/features/rules/augmentcode-rule.ts
22354
- import { join as join137 } from "path";
22625
+ import { join as join139 } from "path";
22355
22626
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
22356
22627
  toRulesyncRule() {
22357
22628
  return this.toRulesyncRuleDefault();
@@ -22382,7 +22653,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
22382
22653
  relativeFilePath,
22383
22654
  validate = true
22384
22655
  }) {
22385
- const filePath = join137(
22656
+ const filePath = join139(
22386
22657
  outputRoot,
22387
22658
  this.getSettablePaths().nonRoot.relativeDirPath,
22388
22659
  relativeFilePath
@@ -22422,7 +22693,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
22422
22693
  };
22423
22694
 
22424
22695
  // src/features/rules/claudecode-legacy-rule.ts
22425
- import { join as join138 } from "path";
22696
+ import { join as join140 } from "path";
22426
22697
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
22427
22698
  static getSettablePaths({
22428
22699
  global,
@@ -22464,7 +22735,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
22464
22735
  if (isRoot) {
22465
22736
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
22466
22737
  const fileContent2 = await readFileContent(
22467
- join138(outputRoot, rootDirPath, paths.root.relativeFilePath)
22738
+ join140(outputRoot, rootDirPath, paths.root.relativeFilePath)
22468
22739
  );
22469
22740
  return new _ClaudecodeLegacyRule({
22470
22741
  outputRoot,
@@ -22478,8 +22749,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
22478
22749
  if (!paths.nonRoot) {
22479
22750
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
22480
22751
  }
22481
- const relativePath = join138(paths.nonRoot.relativeDirPath, relativeFilePath);
22482
- const fileContent = await readFileContent(join138(outputRoot, relativePath));
22752
+ const relativePath = join140(paths.nonRoot.relativeDirPath, relativeFilePath);
22753
+ const fileContent = await readFileContent(join140(outputRoot, relativePath));
22483
22754
  return new _ClaudecodeLegacyRule({
22484
22755
  outputRoot,
22485
22756
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -22538,10 +22809,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
22538
22809
  };
22539
22810
 
22540
22811
  // src/features/rules/claudecode-rule.ts
22541
- import { join as join139 } from "path";
22542
- import { z as z77 } from "zod/mini";
22543
- var ClaudecodeRuleFrontmatterSchema = z77.object({
22544
- paths: z77.optional(z77.array(z77.string()))
22812
+ import { join as join141 } from "path";
22813
+ import { z as z78 } from "zod/mini";
22814
+ var ClaudecodeRuleFrontmatterSchema = z78.object({
22815
+ paths: z78.optional(z78.array(z78.string()))
22545
22816
  });
22546
22817
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
22547
22818
  frontmatter;
@@ -22579,7 +22850,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
22579
22850
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
22580
22851
  if (!result.success) {
22581
22852
  throw new Error(
22582
- `Invalid frontmatter in ${join139(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
22853
+ `Invalid frontmatter in ${join141(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
22583
22854
  );
22584
22855
  }
22585
22856
  }
@@ -22609,7 +22880,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
22609
22880
  if (isRoot) {
22610
22881
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
22611
22882
  const fileContent2 = await readFileContent(
22612
- join139(outputRoot, rootDirPath, paths.root.relativeFilePath)
22883
+ join141(outputRoot, rootDirPath, paths.root.relativeFilePath)
22613
22884
  );
22614
22885
  return new _ClaudecodeRule({
22615
22886
  outputRoot,
@@ -22624,8 +22895,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
22624
22895
  if (!paths.nonRoot) {
22625
22896
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
22626
22897
  }
22627
- const relativePath = join139(paths.nonRoot.relativeDirPath, relativeFilePath);
22628
- const filePath = join139(outputRoot, relativePath);
22898
+ const relativePath = join141(paths.nonRoot.relativeDirPath, relativeFilePath);
22899
+ const filePath = join141(outputRoot, relativePath);
22629
22900
  const fileContent = await readFileContent(filePath);
22630
22901
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
22631
22902
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
@@ -22736,7 +23007,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
22736
23007
  return {
22737
23008
  success: false,
22738
23009
  error: new Error(
22739
- `Invalid frontmatter in ${join139(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
23010
+ `Invalid frontmatter in ${join141(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
22740
23011
  )
22741
23012
  };
22742
23013
  }
@@ -22756,10 +23027,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
22756
23027
  };
22757
23028
 
22758
23029
  // src/features/rules/cline-rule.ts
22759
- import { join as join140 } from "path";
22760
- import { z as z78 } from "zod/mini";
22761
- var ClineRuleFrontmatterSchema = z78.object({
22762
- description: z78.string()
23030
+ import { join as join142 } from "path";
23031
+ import { z as z79 } from "zod/mini";
23032
+ var ClineRuleFrontmatterSchema = z79.object({
23033
+ description: z79.string()
22763
23034
  });
22764
23035
  var ClineRule = class _ClineRule extends ToolRule {
22765
23036
  static getSettablePaths(_options = {}) {
@@ -22802,7 +23073,7 @@ var ClineRule = class _ClineRule extends ToolRule {
22802
23073
  validate = true
22803
23074
  }) {
22804
23075
  const fileContent = await readFileContent(
22805
- join140(outputRoot, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
23076
+ join142(outputRoot, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
22806
23077
  );
22807
23078
  return new _ClineRule({
22808
23079
  outputRoot,
@@ -22828,7 +23099,7 @@ var ClineRule = class _ClineRule extends ToolRule {
22828
23099
  };
22829
23100
 
22830
23101
  // src/features/rules/codexcli-rule.ts
22831
- import { join as join141 } from "path";
23102
+ import { join as join143 } from "path";
22832
23103
  var CodexcliRule = class _CodexcliRule extends ToolRule {
22833
23104
  static getSettablePaths({
22834
23105
  global,
@@ -22863,7 +23134,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
22863
23134
  if (isRoot) {
22864
23135
  const relativePath2 = paths.root.relativeFilePath;
22865
23136
  const fileContent2 = await readFileContent(
22866
- join141(outputRoot, paths.root.relativeDirPath, relativePath2)
23137
+ join143(outputRoot, paths.root.relativeDirPath, relativePath2)
22867
23138
  );
22868
23139
  return new _CodexcliRule({
22869
23140
  outputRoot,
@@ -22877,8 +23148,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
22877
23148
  if (!paths.nonRoot) {
22878
23149
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
22879
23150
  }
22880
- const relativePath = join141(paths.nonRoot.relativeDirPath, relativeFilePath);
22881
- const fileContent = await readFileContent(join141(outputRoot, relativePath));
23151
+ const relativePath = join143(paths.nonRoot.relativeDirPath, relativeFilePath);
23152
+ const fileContent = await readFileContent(join143(outputRoot, relativePath));
22882
23153
  return new _CodexcliRule({
22883
23154
  outputRoot,
22884
23155
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -22937,15 +23208,15 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
22937
23208
  };
22938
23209
 
22939
23210
  // src/features/rules/copilot-rule.ts
22940
- import { join as join142 } from "path";
22941
- import { z as z79 } from "zod/mini";
22942
- var CopilotRuleFrontmatterSchema = z79.object({
22943
- description: z79.optional(z79.string()),
22944
- applyTo: z79.optional(z79.string()),
22945
- excludeAgent: z79.optional(z79.union([z79.literal("code-review"), z79.literal("coding-agent")]))
23211
+ import { join as join144 } from "path";
23212
+ import { z as z80 } from "zod/mini";
23213
+ var CopilotRuleFrontmatterSchema = z80.object({
23214
+ description: z80.optional(z80.string()),
23215
+ applyTo: z80.optional(z80.string()),
23216
+ excludeAgent: z80.optional(z80.union([z80.literal("code-review"), z80.literal("coding-agent")]))
22946
23217
  });
22947
23218
  var normalizeRelativePath = (p) => toPosixPath(p).replace(/\/+/g, "/");
22948
- var sameRelativePath = (left, right) => normalizeRelativePath(join142(left.dir, left.file)) === normalizeRelativePath(join142(right.dir, right.file));
23219
+ var sameRelativePath = (left, right) => normalizeRelativePath(join144(left.dir, left.file)) === normalizeRelativePath(join144(right.dir, right.file));
22949
23220
  var CopilotRule = class _CopilotRule extends ToolRule {
22950
23221
  frontmatter;
22951
23222
  body;
@@ -22976,7 +23247,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
22976
23247
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
22977
23248
  if (!result.success) {
22978
23249
  throw new Error(
22979
- `Invalid frontmatter in ${join142(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
23250
+ `Invalid frontmatter in ${join144(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
22980
23251
  );
22981
23252
  }
22982
23253
  }
@@ -23069,8 +23340,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
23069
23340
  ) : relativeFilePath === paths.root.relativeFilePath;
23070
23341
  const resolvedRelativeDirPath = relativeDirPath ?? (isRoot ? paths.root.relativeDirPath : paths.nonRoot?.relativeDirPath ?? paths.root.relativeDirPath);
23071
23342
  if (isRoot) {
23072
- const relativePath2 = join142(paths.root.relativeDirPath, paths.root.relativeFilePath);
23073
- const filePath2 = join142(outputRoot, relativePath2);
23343
+ const relativePath2 = join144(paths.root.relativeDirPath, paths.root.relativeFilePath);
23344
+ const filePath2 = join144(outputRoot, relativePath2);
23074
23345
  const fileContent2 = await readFileContent(filePath2);
23075
23346
  return new _CopilotRule({
23076
23347
  outputRoot,
@@ -23085,8 +23356,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
23085
23356
  if (!paths.nonRoot) {
23086
23357
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
23087
23358
  }
23088
- const relativePath = join142(resolvedRelativeDirPath, relativeFilePath);
23089
- const filePath = join142(outputRoot, relativePath);
23359
+ const relativePath = join144(resolvedRelativeDirPath, relativeFilePath);
23360
+ const filePath = join144(outputRoot, relativePath);
23090
23361
  const fileContent = await readFileContent(filePath);
23091
23362
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
23092
23363
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
@@ -23135,7 +23406,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
23135
23406
  return {
23136
23407
  success: false,
23137
23408
  error: new Error(
23138
- `Invalid frontmatter in ${join142(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
23409
+ `Invalid frontmatter in ${join144(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
23139
23410
  )
23140
23411
  };
23141
23412
  }
@@ -23191,12 +23462,12 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
23191
23462
  };
23192
23463
 
23193
23464
  // src/features/rules/cursor-rule.ts
23194
- import { join as join143 } from "path";
23195
- import { z as z80 } from "zod/mini";
23196
- var CursorRuleFrontmatterSchema = z80.object({
23197
- description: z80.optional(z80.string()),
23198
- globs: z80.optional(z80.string()),
23199
- alwaysApply: z80.optional(z80.boolean())
23465
+ import { join as join145 } from "path";
23466
+ import { z as z81 } from "zod/mini";
23467
+ var CursorRuleFrontmatterSchema = z81.object({
23468
+ description: z81.optional(z81.string()),
23469
+ globs: z81.optional(z81.string()),
23470
+ alwaysApply: z81.optional(z81.boolean())
23200
23471
  });
23201
23472
  var CursorRule = class _CursorRule extends ToolRule {
23202
23473
  frontmatter;
@@ -23213,7 +23484,7 @@ var CursorRule = class _CursorRule extends ToolRule {
23213
23484
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
23214
23485
  if (!result.success) {
23215
23486
  throw new Error(
23216
- `Invalid frontmatter in ${join143(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
23487
+ `Invalid frontmatter in ${join145(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
23217
23488
  );
23218
23489
  }
23219
23490
  }
@@ -23329,7 +23600,7 @@ var CursorRule = class _CursorRule extends ToolRule {
23329
23600
  relativeFilePath,
23330
23601
  validate = true
23331
23602
  }) {
23332
- const filePath = join143(
23603
+ const filePath = join145(
23333
23604
  outputRoot,
23334
23605
  this.getSettablePaths().nonRoot.relativeDirPath,
23335
23606
  relativeFilePath
@@ -23339,7 +23610,7 @@ var CursorRule = class _CursorRule extends ToolRule {
23339
23610
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
23340
23611
  if (!result.success) {
23341
23612
  throw new Error(
23342
- `Invalid frontmatter in ${join143(outputRoot, relativeFilePath)}: ${formatError(result.error)}`
23613
+ `Invalid frontmatter in ${join145(outputRoot, relativeFilePath)}: ${formatError(result.error)}`
23343
23614
  );
23344
23615
  }
23345
23616
  return new _CursorRule({
@@ -23376,7 +23647,7 @@ var CursorRule = class _CursorRule extends ToolRule {
23376
23647
  return {
23377
23648
  success: false,
23378
23649
  error: new Error(
23379
- `Invalid frontmatter in ${join143(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
23650
+ `Invalid frontmatter in ${join145(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
23380
23651
  )
23381
23652
  };
23382
23653
  }
@@ -23396,7 +23667,7 @@ var CursorRule = class _CursorRule extends ToolRule {
23396
23667
  };
23397
23668
 
23398
23669
  // src/features/rules/deepagents-rule.ts
23399
- import { join as join144 } from "path";
23670
+ import { join as join146 } from "path";
23400
23671
  var DeepagentsRule = class _DeepagentsRule extends ToolRule {
23401
23672
  constructor({ fileContent, root, ...rest }) {
23402
23673
  super({
@@ -23423,8 +23694,8 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
23423
23694
  }) {
23424
23695
  const settablePaths = this.getSettablePaths();
23425
23696
  const isRoot = relativeFilePath === "AGENTS.md";
23426
- const relativePath = isRoot ? join144(".deepagents", "AGENTS.md") : join144(".deepagents", "memories", relativeFilePath);
23427
- const fileContent = await readFileContent(join144(outputRoot, relativePath));
23697
+ const relativePath = isRoot ? join146(".deepagents", "AGENTS.md") : join146(".deepagents", "memories", relativeFilePath);
23698
+ const fileContent = await readFileContent(join146(outputRoot, relativePath));
23428
23699
  return new _DeepagentsRule({
23429
23700
  outputRoot,
23430
23701
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -23479,7 +23750,7 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
23479
23750
  };
23480
23751
 
23481
23752
  // src/features/rules/factorydroid-rule.ts
23482
- import { join as join145 } from "path";
23753
+ import { join as join147 } from "path";
23483
23754
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
23484
23755
  constructor({ fileContent, root, ...rest }) {
23485
23756
  super({
@@ -23519,8 +23790,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
23519
23790
  const paths = this.getSettablePaths({ global });
23520
23791
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
23521
23792
  if (isRoot) {
23522
- const relativePath2 = join145(paths.root.relativeDirPath, paths.root.relativeFilePath);
23523
- const fileContent2 = await readFileContent(join145(outputRoot, relativePath2));
23793
+ const relativePath2 = join147(paths.root.relativeDirPath, paths.root.relativeFilePath);
23794
+ const fileContent2 = await readFileContent(join147(outputRoot, relativePath2));
23524
23795
  return new _FactorydroidRule({
23525
23796
  outputRoot,
23526
23797
  relativeDirPath: paths.root.relativeDirPath,
@@ -23533,8 +23804,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
23533
23804
  if (!paths.nonRoot) {
23534
23805
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
23535
23806
  }
23536
- const relativePath = join145(paths.nonRoot.relativeDirPath, relativeFilePath);
23537
- const fileContent = await readFileContent(join145(outputRoot, relativePath));
23807
+ const relativePath = join147(paths.nonRoot.relativeDirPath, relativeFilePath);
23808
+ const fileContent = await readFileContent(join147(outputRoot, relativePath));
23538
23809
  return new _FactorydroidRule({
23539
23810
  outputRoot,
23540
23811
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -23593,7 +23864,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
23593
23864
  };
23594
23865
 
23595
23866
  // src/features/rules/geminicli-rule.ts
23596
- import { join as join146 } from "path";
23867
+ import { join as join148 } from "path";
23597
23868
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
23598
23869
  static getSettablePaths({
23599
23870
  global,
@@ -23628,7 +23899,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
23628
23899
  if (isRoot) {
23629
23900
  const relativePath2 = paths.root.relativeFilePath;
23630
23901
  const fileContent2 = await readFileContent(
23631
- join146(outputRoot, paths.root.relativeDirPath, relativePath2)
23902
+ join148(outputRoot, paths.root.relativeDirPath, relativePath2)
23632
23903
  );
23633
23904
  return new _GeminiCliRule({
23634
23905
  outputRoot,
@@ -23642,8 +23913,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
23642
23913
  if (!paths.nonRoot) {
23643
23914
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
23644
23915
  }
23645
- const relativePath = join146(paths.nonRoot.relativeDirPath, relativeFilePath);
23646
- const fileContent = await readFileContent(join146(outputRoot, relativePath));
23916
+ const relativePath = join148(paths.nonRoot.relativeDirPath, relativeFilePath);
23917
+ const fileContent = await readFileContent(join148(outputRoot, relativePath));
23647
23918
  return new _GeminiCliRule({
23648
23919
  outputRoot,
23649
23920
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -23702,7 +23973,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
23702
23973
  };
23703
23974
 
23704
23975
  // src/features/rules/goose-rule.ts
23705
- import { join as join147 } from "path";
23976
+ import { join as join149 } from "path";
23706
23977
  var GooseRule = class _GooseRule extends ToolRule {
23707
23978
  static getSettablePaths({
23708
23979
  global,
@@ -23737,7 +24008,7 @@ var GooseRule = class _GooseRule extends ToolRule {
23737
24008
  if (isRoot) {
23738
24009
  const relativePath2 = paths.root.relativeFilePath;
23739
24010
  const fileContent2 = await readFileContent(
23740
- join147(outputRoot, paths.root.relativeDirPath, relativePath2)
24011
+ join149(outputRoot, paths.root.relativeDirPath, relativePath2)
23741
24012
  );
23742
24013
  return new _GooseRule({
23743
24014
  outputRoot,
@@ -23751,8 +24022,8 @@ var GooseRule = class _GooseRule extends ToolRule {
23751
24022
  if (!paths.nonRoot) {
23752
24023
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
23753
24024
  }
23754
- const relativePath = join147(paths.nonRoot.relativeDirPath, relativeFilePath);
23755
- const fileContent = await readFileContent(join147(outputRoot, relativePath));
24025
+ const relativePath = join149(paths.nonRoot.relativeDirPath, relativeFilePath);
24026
+ const fileContent = await readFileContent(join149(outputRoot, relativePath));
23756
24027
  return new _GooseRule({
23757
24028
  outputRoot,
23758
24029
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -23811,7 +24082,7 @@ var GooseRule = class _GooseRule extends ToolRule {
23811
24082
  };
23812
24083
 
23813
24084
  // src/features/rules/junie-rule.ts
23814
- import { join as join148 } from "path";
24085
+ import { join as join150 } from "path";
23815
24086
  var JunieRule = class _JunieRule extends ToolRule {
23816
24087
  static getSettablePaths(_options = {}) {
23817
24088
  return {
@@ -23840,8 +24111,8 @@ var JunieRule = class _JunieRule extends ToolRule {
23840
24111
  }) {
23841
24112
  const isRoot = _JunieRule.isRootRelativeFilePath(relativeFilePath);
23842
24113
  const settablePaths = this.getSettablePaths();
23843
- const relativePath = isRoot ? join148(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : join148(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
23844
- const fileContent = await readFileContent(join148(outputRoot, relativePath));
24114
+ const relativePath = isRoot ? join150(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : join150(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
24115
+ const fileContent = await readFileContent(join150(outputRoot, relativePath));
23845
24116
  return new _JunieRule({
23846
24117
  outputRoot,
23847
24118
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -23896,7 +24167,7 @@ var JunieRule = class _JunieRule extends ToolRule {
23896
24167
  };
23897
24168
 
23898
24169
  // src/features/rules/kilo-rule.ts
23899
- import { join as join149 } from "path";
24170
+ import { join as join151 } from "path";
23900
24171
  var KiloRule = class _KiloRule extends ToolRule {
23901
24172
  static getSettablePaths({
23902
24173
  global,
@@ -23931,7 +24202,7 @@ var KiloRule = class _KiloRule extends ToolRule {
23931
24202
  if (isRoot) {
23932
24203
  const relativePath2 = paths.root.relativeFilePath;
23933
24204
  const fileContent2 = await readFileContent(
23934
- join149(outputRoot, paths.root.relativeDirPath, relativePath2)
24205
+ join151(outputRoot, paths.root.relativeDirPath, relativePath2)
23935
24206
  );
23936
24207
  return new _KiloRule({
23937
24208
  outputRoot,
@@ -23945,8 +24216,8 @@ var KiloRule = class _KiloRule extends ToolRule {
23945
24216
  if (!paths.nonRoot) {
23946
24217
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
23947
24218
  }
23948
- const relativePath = join149(paths.nonRoot.relativeDirPath, relativeFilePath);
23949
- const fileContent = await readFileContent(join149(outputRoot, relativePath));
24219
+ const relativePath = join151(paths.nonRoot.relativeDirPath, relativeFilePath);
24220
+ const fileContent = await readFileContent(join151(outputRoot, relativePath));
23950
24221
  return new _KiloRule({
23951
24222
  outputRoot,
23952
24223
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -24005,7 +24276,7 @@ var KiloRule = class _KiloRule extends ToolRule {
24005
24276
  };
24006
24277
 
24007
24278
  // src/features/rules/kiro-rule.ts
24008
- import { join as join150 } from "path";
24279
+ import { join as join152 } from "path";
24009
24280
  var KiroRule = class _KiroRule extends ToolRule {
24010
24281
  static getSettablePaths(_options = {}) {
24011
24282
  return {
@@ -24020,7 +24291,7 @@ var KiroRule = class _KiroRule extends ToolRule {
24020
24291
  validate = true
24021
24292
  }) {
24022
24293
  const fileContent = await readFileContent(
24023
- join150(outputRoot, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
24294
+ join152(outputRoot, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
24024
24295
  );
24025
24296
  return new _KiroRule({
24026
24297
  outputRoot,
@@ -24074,7 +24345,7 @@ var KiroRule = class _KiroRule extends ToolRule {
24074
24345
  };
24075
24346
 
24076
24347
  // src/features/rules/opencode-rule.ts
24077
- import { join as join151 } from "path";
24348
+ import { join as join153 } from "path";
24078
24349
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
24079
24350
  static getSettablePaths({
24080
24351
  global,
@@ -24109,7 +24380,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
24109
24380
  if (isRoot) {
24110
24381
  const relativePath2 = paths.root.relativeFilePath;
24111
24382
  const fileContent2 = await readFileContent(
24112
- join151(outputRoot, paths.root.relativeDirPath, relativePath2)
24383
+ join153(outputRoot, paths.root.relativeDirPath, relativePath2)
24113
24384
  );
24114
24385
  return new _OpenCodeRule({
24115
24386
  outputRoot,
@@ -24123,8 +24394,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
24123
24394
  if (!paths.nonRoot) {
24124
24395
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
24125
24396
  }
24126
- const relativePath = join151(paths.nonRoot.relativeDirPath, relativeFilePath);
24127
- const fileContent = await readFileContent(join151(outputRoot, relativePath));
24397
+ const relativePath = join153(paths.nonRoot.relativeDirPath, relativeFilePath);
24398
+ const fileContent = await readFileContent(join153(outputRoot, relativePath));
24128
24399
  return new _OpenCodeRule({
24129
24400
  outputRoot,
24130
24401
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -24183,7 +24454,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
24183
24454
  };
24184
24455
 
24185
24456
  // src/features/rules/pi-rule.ts
24186
- import { join as join152 } from "path";
24457
+ import { join as join154 } from "path";
24187
24458
  var PiRule = class _PiRule extends ToolRule {
24188
24459
  static getSettablePaths({
24189
24460
  global,
@@ -24217,7 +24488,7 @@ var PiRule = class _PiRule extends ToolRule {
24217
24488
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
24218
24489
  if (isRoot) {
24219
24490
  const fileContent2 = await readFileContent(
24220
- join152(outputRoot, paths.root.relativeDirPath, paths.root.relativeFilePath)
24491
+ join154(outputRoot, paths.root.relativeDirPath, paths.root.relativeFilePath)
24221
24492
  );
24222
24493
  return new _PiRule({
24223
24494
  outputRoot,
@@ -24233,8 +24504,8 @@ var PiRule = class _PiRule extends ToolRule {
24233
24504
  `PiRule does not support non-root rules in global mode; expected '${paths.root.relativeFilePath}' but got '${relativeFilePath}'`
24234
24505
  );
24235
24506
  }
24236
- const relativePath = join152(paths.nonRoot.relativeDirPath, relativeFilePath);
24237
- const fileContent = await readFileContent(join152(outputRoot, relativePath));
24507
+ const relativePath = join154(paths.nonRoot.relativeDirPath, relativeFilePath);
24508
+ const fileContent = await readFileContent(join154(outputRoot, relativePath));
24238
24509
  return new _PiRule({
24239
24510
  outputRoot,
24240
24511
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -24298,7 +24569,7 @@ var PiRule = class _PiRule extends ToolRule {
24298
24569
  };
24299
24570
 
24300
24571
  // src/features/rules/qwencode-rule.ts
24301
- import { join as join153 } from "path";
24572
+ import { join as join155 } from "path";
24302
24573
  var QwencodeRule = class _QwencodeRule extends ToolRule {
24303
24574
  static getSettablePaths(_options = {}) {
24304
24575
  return {
@@ -24317,8 +24588,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
24317
24588
  validate = true
24318
24589
  }) {
24319
24590
  const isRoot = relativeFilePath === "QWEN.md";
24320
- const relativePath = isRoot ? "QWEN.md" : join153(".qwen", "memories", relativeFilePath);
24321
- const fileContent = await readFileContent(join153(outputRoot, relativePath));
24591
+ const relativePath = isRoot ? "QWEN.md" : join155(".qwen", "memories", relativeFilePath);
24592
+ const fileContent = await readFileContent(join155(outputRoot, relativePath));
24322
24593
  return new _QwencodeRule({
24323
24594
  outputRoot,
24324
24595
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -24370,7 +24641,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
24370
24641
  };
24371
24642
 
24372
24643
  // src/features/rules/replit-rule.ts
24373
- import { join as join154 } from "path";
24644
+ import { join as join156 } from "path";
24374
24645
  var ReplitRule = class _ReplitRule extends ToolRule {
24375
24646
  static getSettablePaths(_options = {}) {
24376
24647
  return {
@@ -24392,7 +24663,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
24392
24663
  }
24393
24664
  const relativePath = paths.root.relativeFilePath;
24394
24665
  const fileContent = await readFileContent(
24395
- join154(outputRoot, paths.root.relativeDirPath, relativePath)
24666
+ join156(outputRoot, paths.root.relativeDirPath, relativePath)
24396
24667
  );
24397
24668
  return new _ReplitRule({
24398
24669
  outputRoot,
@@ -24458,7 +24729,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
24458
24729
  };
24459
24730
 
24460
24731
  // src/features/rules/roo-rule.ts
24461
- import { join as join155 } from "path";
24732
+ import { join as join157 } from "path";
24462
24733
  var RooRule = class _RooRule extends ToolRule {
24463
24734
  static getSettablePaths(_options = {}) {
24464
24735
  return {
@@ -24473,7 +24744,7 @@ var RooRule = class _RooRule extends ToolRule {
24473
24744
  validate = true
24474
24745
  }) {
24475
24746
  const fileContent = await readFileContent(
24476
- join155(outputRoot, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
24747
+ join157(outputRoot, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
24477
24748
  );
24478
24749
  return new _RooRule({
24479
24750
  outputRoot,
@@ -24542,7 +24813,7 @@ var RooRule = class _RooRule extends ToolRule {
24542
24813
  };
24543
24814
 
24544
24815
  // src/features/rules/rovodev-rule.ts
24545
- import { join as join156 } from "path";
24816
+ import { join as join158 } from "path";
24546
24817
  var DISALLOWED_ROVODEV_MODULAR_RULE_BASENAMES = /* @__PURE__ */ new Set(["agents.md", "agents.local.md"]);
24547
24818
  var RovodevRule = class _RovodevRule extends ToolRule {
24548
24819
  /**
@@ -24586,7 +24857,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
24586
24857
  root: rovodevAgents,
24587
24858
  alternativeRoots: [{ relativeDirPath: ".", relativeFilePath: "AGENTS.md" }],
24588
24859
  nonRoot: {
24589
- relativeDirPath: join156(".rovodev", ".rulesync", "modular-rules")
24860
+ relativeDirPath: join158(".rovodev", ".rulesync", "modular-rules")
24590
24861
  }
24591
24862
  };
24592
24863
  }
@@ -24625,10 +24896,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
24625
24896
  }) {
24626
24897
  if (!this.isAllowedModularRulesRelativePath(relativeFilePath)) {
24627
24898
  throw new Error(
24628
- `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${join156(relativeDirPath, relativeFilePath)}`
24899
+ `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${join158(relativeDirPath, relativeFilePath)}`
24629
24900
  );
24630
24901
  }
24631
- const fileContent = await readFileContent(join156(outputRoot, relativeDirPath, relativeFilePath));
24902
+ const fileContent = await readFileContent(join158(outputRoot, relativeDirPath, relativeFilePath));
24632
24903
  return new _RovodevRule({
24633
24904
  outputRoot,
24634
24905
  relativeDirPath,
@@ -24648,10 +24919,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
24648
24919
  paths
24649
24920
  }) {
24650
24921
  const relativeDirPath = overrideDirPath ?? paths.root.relativeDirPath;
24651
- const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${join156(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : join156(paths.root.relativeDirPath, paths.root.relativeFilePath);
24922
+ const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${join158(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : join158(paths.root.relativeDirPath, paths.root.relativeFilePath);
24652
24923
  if (relativeFilePath !== "AGENTS.md") {
24653
24924
  throw new Error(
24654
- `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${join156(relativeDirPath, relativeFilePath)}`
24925
+ `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${join158(relativeDirPath, relativeFilePath)}`
24655
24926
  );
24656
24927
  }
24657
24928
  const allowed = relativeDirPath === paths.root.relativeDirPath || "alternativeRoots" in paths && paths.alternativeRoots?.some(
@@ -24659,10 +24930,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
24659
24930
  );
24660
24931
  if (!allowed) {
24661
24932
  throw new Error(
24662
- `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${join156(relativeDirPath, relativeFilePath)}`
24933
+ `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${join158(relativeDirPath, relativeFilePath)}`
24663
24934
  );
24664
24935
  }
24665
- const fileContent = await readFileContent(join156(outputRoot, relativeDirPath, relativeFilePath));
24936
+ const fileContent = await readFileContent(join158(outputRoot, relativeDirPath, relativeFilePath));
24666
24937
  return new _RovodevRule({
24667
24938
  outputRoot,
24668
24939
  relativeDirPath,
@@ -24776,7 +25047,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
24776
25047
  };
24777
25048
 
24778
25049
  // src/features/rules/takt-rule.ts
24779
- import { join as join157 } from "path";
25050
+ import { join as join159 } from "path";
24780
25051
  var DEFAULT_TAKT_RULE_DIR = "policies";
24781
25052
  var TaktRule = class _TaktRule extends ToolRule {
24782
25053
  static getSettablePaths({
@@ -24788,7 +25059,7 @@ var TaktRule = class _TaktRule extends ToolRule {
24788
25059
  root: {
24789
25060
  relativeDirPath: buildToolPath(
24790
25061
  ".takt",
24791
- join157("facets", DEFAULT_TAKT_RULE_DIR),
25062
+ join159("facets", DEFAULT_TAKT_RULE_DIR),
24792
25063
  excludeToolDir
24793
25064
  ),
24794
25065
  relativeFilePath: "overview.md"
@@ -24799,7 +25070,7 @@ var TaktRule = class _TaktRule extends ToolRule {
24799
25070
  nonRoot: {
24800
25071
  relativeDirPath: buildToolPath(
24801
25072
  ".takt",
24802
- join157("facets", DEFAULT_TAKT_RULE_DIR),
25073
+ join159("facets", DEFAULT_TAKT_RULE_DIR),
24803
25074
  excludeToolDir
24804
25075
  )
24805
25076
  }
@@ -24817,8 +25088,8 @@ var TaktRule = class _TaktRule extends ToolRule {
24817
25088
  validate = true,
24818
25089
  relativeDirPath: overrideDirPath
24819
25090
  }) {
24820
- const dirPath = overrideDirPath ?? join157(".takt", "facets", DEFAULT_TAKT_RULE_DIR);
24821
- const filePath = join157(outputRoot, dirPath, relativeFilePath);
25091
+ const dirPath = overrideDirPath ?? join159(".takt", "facets", DEFAULT_TAKT_RULE_DIR);
25092
+ const filePath = join159(outputRoot, dirPath, relativeFilePath);
24822
25093
  const fileContent = await readFileContent(filePath);
24823
25094
  const { body } = parseFrontmatter(fileContent, filePath);
24824
25095
  return new _TaktRule({
@@ -24857,7 +25128,7 @@ var TaktRule = class _TaktRule extends ToolRule {
24857
25128
  const stem = overrideName ?? sourceStem;
24858
25129
  assertSafeTaktName({ name: stem, featureLabel: "rule", sourceLabel });
24859
25130
  const relativeFilePath = `${stem}.md`;
24860
- const relativeDirPath = join157(".takt", "facets", DEFAULT_TAKT_RULE_DIR);
25131
+ const relativeDirPath = join159(".takt", "facets", DEFAULT_TAKT_RULE_DIR);
24861
25132
  return new _TaktRule({
24862
25133
  outputRoot,
24863
25134
  relativeDirPath,
@@ -24882,7 +25153,7 @@ var TaktRule = class _TaktRule extends ToolRule {
24882
25153
  };
24883
25154
 
24884
25155
  // src/features/rules/warp-rule.ts
24885
- import { join as join158 } from "path";
25156
+ import { join as join160 } from "path";
24886
25157
  var WarpRule = class _WarpRule extends ToolRule {
24887
25158
  constructor({ fileContent, root, ...rest }) {
24888
25159
  super({
@@ -24908,8 +25179,8 @@ var WarpRule = class _WarpRule extends ToolRule {
24908
25179
  validate = true
24909
25180
  }) {
24910
25181
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
24911
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join158(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
24912
- const fileContent = await readFileContent(join158(outputRoot, relativePath));
25182
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join160(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
25183
+ const fileContent = await readFileContent(join160(outputRoot, relativePath));
24913
25184
  return new _WarpRule({
24914
25185
  outputRoot,
24915
25186
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -24964,7 +25235,7 @@ var WarpRule = class _WarpRule extends ToolRule {
24964
25235
  };
24965
25236
 
24966
25237
  // src/features/rules/windsurf-rule.ts
24967
- import { join as join159 } from "path";
25238
+ import { join as join161 } from "path";
24968
25239
  var WindsurfRule = class _WindsurfRule extends ToolRule {
24969
25240
  static getSettablePaths(_options = {}) {
24970
25241
  return {
@@ -24979,7 +25250,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
24979
25250
  validate = true
24980
25251
  }) {
24981
25252
  const fileContent = await readFileContent(
24982
- join159(outputRoot, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
25253
+ join161(outputRoot, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
24983
25254
  );
24984
25255
  return new _WindsurfRule({
24985
25256
  outputRoot,
@@ -25049,6 +25320,107 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
25049
25320
  }
25050
25321
  };
25051
25322
 
25323
+ // src/features/rules/zed-rule.ts
25324
+ import { join as join162 } from "path";
25325
+ var ZedRule = class _ZedRule extends ToolRule {
25326
+ static getSettablePaths({
25327
+ global,
25328
+ excludeToolDir
25329
+ } = {}) {
25330
+ if (global) {
25331
+ return {
25332
+ root: {
25333
+ relativeDirPath: buildToolPath(join162(".config", "zed"), ".", excludeToolDir),
25334
+ relativeFilePath: "AGENTS.md"
25335
+ }
25336
+ };
25337
+ }
25338
+ return {
25339
+ root: {
25340
+ relativeDirPath: ".",
25341
+ relativeFilePath: ".rules"
25342
+ }
25343
+ };
25344
+ }
25345
+ static async fromFile({
25346
+ outputRoot = process.cwd(),
25347
+ relativeFilePath,
25348
+ validate = true,
25349
+ global = false
25350
+ }) {
25351
+ const paths = this.getSettablePaths({ global });
25352
+ const isRoot = relativeFilePath === paths.root.relativeFilePath;
25353
+ if (!isRoot) {
25354
+ throw new Error(`ZedRule only supports root rules: ${relativeFilePath}`);
25355
+ }
25356
+ const fileContent = await readFileContent(
25357
+ join162(outputRoot, paths.root.relativeDirPath, paths.root.relativeFilePath)
25358
+ );
25359
+ return new _ZedRule({
25360
+ outputRoot,
25361
+ relativeDirPath: paths.root.relativeDirPath,
25362
+ relativeFilePath: paths.root.relativeFilePath,
25363
+ fileContent,
25364
+ validate,
25365
+ root: true
25366
+ });
25367
+ }
25368
+ static fromRulesyncRule({
25369
+ outputRoot = process.cwd(),
25370
+ rulesyncRule,
25371
+ validate = true,
25372
+ global = false
25373
+ }) {
25374
+ const paths = this.getSettablePaths({ global });
25375
+ const isRoot = rulesyncRule.getFrontmatter().root ?? false;
25376
+ if (!isRoot) {
25377
+ throw new Error(`ZedRule only supports root rules: ${rulesyncRule.getRelativeFilePath()}`);
25378
+ }
25379
+ return new _ZedRule(
25380
+ this.buildToolRuleParamsDefault({
25381
+ outputRoot,
25382
+ rulesyncRule,
25383
+ validate,
25384
+ rootPath: paths.root,
25385
+ nonRootPath: void 0
25386
+ })
25387
+ );
25388
+ }
25389
+ toRulesyncRule() {
25390
+ return this.toRulesyncRuleDefault();
25391
+ }
25392
+ validate() {
25393
+ return { success: true, error: null };
25394
+ }
25395
+ static forDeletion({
25396
+ outputRoot = process.cwd(),
25397
+ relativeDirPath,
25398
+ relativeFilePath,
25399
+ global = false
25400
+ }) {
25401
+ const paths = this.getSettablePaths({ global });
25402
+ const isRoot = relativeFilePath === paths.root.relativeFilePath;
25403
+ return new _ZedRule({
25404
+ outputRoot,
25405
+ relativeDirPath,
25406
+ relativeFilePath,
25407
+ fileContent: "",
25408
+ validate: false,
25409
+ root: isRoot
25410
+ });
25411
+ }
25412
+ static isTargetedByRulesyncRule(rulesyncRule) {
25413
+ const isRoot = rulesyncRule.getFrontmatter().root ?? false;
25414
+ if (!isRoot) {
25415
+ return false;
25416
+ }
25417
+ return this.isTargetedByRulesyncRuleDefault({
25418
+ rulesyncRule,
25419
+ toolTarget: "zed"
25420
+ });
25421
+ }
25422
+ };
25423
+
25052
25424
  // src/features/rules/rules-processor.ts
25053
25425
  var rulesProcessorToolTargets = [
25054
25426
  "agentsmd",
@@ -25079,13 +25451,14 @@ var rulesProcessorToolTargets = [
25079
25451
  "rovodev",
25080
25452
  "takt",
25081
25453
  "warp",
25082
- "windsurf"
25454
+ "windsurf",
25455
+ "zed"
25083
25456
  ];
25084
- var RulesProcessorToolTargetSchema = z81.enum(rulesProcessorToolTargets);
25085
- var formatRulePaths = (rules) => rules.map((r) => join160(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
25086
- var RulesFeatureOptionsSchema = z81.looseObject({
25087
- ruleDiscoveryMode: z81.optional(z81.enum(["none", "explicit"])),
25088
- includeLocalRoot: z81.optional(z81.boolean())
25457
+ var RulesProcessorToolTargetSchema = z82.enum(rulesProcessorToolTargets);
25458
+ var formatRulePaths = (rules) => rules.map((r) => join163(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
25459
+ var RulesFeatureOptionsSchema = z82.looseObject({
25460
+ ruleDiscoveryMode: z82.optional(z82.enum(["none", "explicit"])),
25461
+ includeLocalRoot: z82.optional(z82.boolean())
25089
25462
  });
25090
25463
  var resolveRuleDiscoveryMode = ({
25091
25464
  defaultMode,
@@ -25106,8 +25479,8 @@ var resolveRuleDiscoveryMode = ({
25106
25479
  }
25107
25480
  return parsed.data.ruleDiscoveryMode === "none" ? "auto" : "toon";
25108
25481
  };
25109
- var IncludeLocalRootSchema = z81.looseObject({
25110
- includeLocalRoot: z81.optional(z81.boolean())
25482
+ var IncludeLocalRootSchema = z82.looseObject({
25483
+ includeLocalRoot: z82.optional(z82.boolean())
25111
25484
  });
25112
25485
  var resolveIncludeLocalRoot = (options) => {
25113
25486
  if (!options) return true;
@@ -25468,6 +25841,20 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
25468
25841
  // skills from .windsurf/skills/ and ~/.codeium/windsurf/skills/ directories.
25469
25842
  }
25470
25843
  }
25844
+ ],
25845
+ [
25846
+ "zed",
25847
+ {
25848
+ class: ZedRule,
25849
+ meta: {
25850
+ // Zed reads a single project rules file (`.rules`) and a single global
25851
+ // file (`~/.config/zed/AGENTS.md`). It is root-only with auto discovery,
25852
+ // so there is no non-root location to render a conventions block into.
25853
+ extension: "md",
25854
+ supportsGlobal: true,
25855
+ ruleDiscoveryMode: "auto"
25856
+ }
25857
+ }
25471
25858
  ]
25472
25859
  ]);
25473
25860
  var rulesProcessorToolTargetsGlobal = Array.from(toolRuleFactories.entries()).filter(([_, factory]) => factory.meta.supportsGlobal).map(([target]) => target);
@@ -25604,7 +25991,7 @@ var RulesProcessor = class extends FeatureProcessor {
25604
25991
  }).relativeDirPath;
25605
25992
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
25606
25993
  const frontmatter = skill.getFrontmatter();
25607
- const relativePath = join160(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
25994
+ const relativePath = join163(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
25608
25995
  return {
25609
25996
  name: frontmatter.name,
25610
25997
  description: frontmatter.description,
@@ -25733,8 +26120,8 @@ var RulesProcessor = class extends FeatureProcessor {
25733
26120
  * Load and parse rulesync rule files from .rulesync/rules/ directory
25734
26121
  */
25735
26122
  async loadRulesyncFiles() {
25736
- const rulesyncOutputRoot = join160(this.inputRoot, RULESYNC_RULES_RELATIVE_DIR_PATH);
25737
- const files = await findFilesByGlobs(join160(rulesyncOutputRoot, "**", "*.md"));
26123
+ const rulesyncOutputRoot = join163(this.inputRoot, RULESYNC_RULES_RELATIVE_DIR_PATH);
26124
+ const files = await findFilesByGlobs(join163(rulesyncOutputRoot, "**", "*.md"));
25738
26125
  this.logger.debug(`Found ${files.length} rulesync files`);
25739
26126
  const rulesyncRules = await Promise.all(
25740
26127
  files.map((file) => {
@@ -25850,13 +26237,13 @@ var RulesProcessor = class extends FeatureProcessor {
25850
26237
  return [];
25851
26238
  }
25852
26239
  const uniqueRootFilePaths = await findFilesWithFallback(
25853
- join160(
26240
+ join163(
25854
26241
  this.outputRoot,
25855
26242
  settablePaths.root.relativeDirPath ?? ".",
25856
26243
  settablePaths.root.relativeFilePath
25857
26244
  ),
25858
26245
  settablePaths.alternativeRoots,
25859
- (alt) => join160(this.outputRoot, alt.relativeDirPath, alt.relativeFilePath)
26246
+ (alt) => join163(this.outputRoot, alt.relativeDirPath, alt.relativeFilePath)
25860
26247
  );
25861
26248
  if (forDeletion) {
25862
26249
  return buildDeletionRulesFromPaths(uniqueRootFilePaths);
@@ -25887,7 +26274,7 @@ var RulesProcessor = class extends FeatureProcessor {
25887
26274
  return [];
25888
26275
  }
25889
26276
  const uniqueLocalRootFilePaths2 = await findFilesByGlobs(
25890
- join160(this.outputRoot, "AGENTS.local.md")
26277
+ join163(this.outputRoot, "AGENTS.local.md")
25891
26278
  );
25892
26279
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths2);
25893
26280
  }
@@ -25898,9 +26285,9 @@ var RulesProcessor = class extends FeatureProcessor {
25898
26285
  return [];
25899
26286
  }
25900
26287
  const uniqueLocalRootFilePaths = await findFilesWithFallback(
25901
- join160(this.outputRoot, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
26288
+ join163(this.outputRoot, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
25902
26289
  settablePaths.alternativeRoots,
25903
- (alt) => join160(this.outputRoot, alt.relativeDirPath, "CLAUDE.local.md")
26290
+ (alt) => join163(this.outputRoot, alt.relativeDirPath, "CLAUDE.local.md")
25904
26291
  );
25905
26292
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths);
25906
26293
  })();
@@ -25911,20 +26298,20 @@ var RulesProcessor = class extends FeatureProcessor {
25911
26298
  if (!forDeletion || this.toolTarget !== "rovodev" || this.global) {
25912
26299
  return [];
25913
26300
  }
25914
- const primaryPaths = await findFilesByGlobs(join160(this.outputRoot, ".rovodev", "AGENTS.md"));
26301
+ const primaryPaths = await findFilesByGlobs(join163(this.outputRoot, ".rovodev", "AGENTS.md"));
25915
26302
  if (primaryPaths.length === 0) {
25916
26303
  return [];
25917
26304
  }
25918
- const mirrorPaths = await findFilesByGlobs(join160(this.outputRoot, "AGENTS.md"));
26305
+ const mirrorPaths = await findFilesByGlobs(join163(this.outputRoot, "AGENTS.md"));
25919
26306
  return buildDeletionRulesFromPaths(mirrorPaths);
25920
26307
  })();
25921
26308
  const nonRootToolRules = await (async () => {
25922
26309
  if (!settablePaths.nonRoot) {
25923
26310
  return [];
25924
26311
  }
25925
- const nonRootOutputRoot = join160(this.outputRoot, settablePaths.nonRoot.relativeDirPath);
26312
+ const nonRootOutputRoot = join163(this.outputRoot, settablePaths.nonRoot.relativeDirPath);
25926
26313
  const nonRootFilePaths = await findFilesByGlobs(
25927
- join160(nonRootOutputRoot, "**", `*.${factory.meta.extension}`)
26314
+ join163(nonRootOutputRoot, "**", `*.${factory.meta.extension}`)
25928
26315
  );
25929
26316
  if (forDeletion) {
25930
26317
  return buildDeletionRulesFromPaths(nonRootFilePaths, {
@@ -25938,7 +26325,7 @@ var RulesProcessor = class extends FeatureProcessor {
25938
26325
  const ok = RovodevRule.isAllowedModularRulesRelativePath(relativeFilePath);
25939
26326
  if (!ok) {
25940
26327
  this.logger.warn(
25941
- `Skipping reserved Rovodev path under modular-rules (import): ${join160(modularRootRelative, relativeFilePath)}`
26328
+ `Skipping reserved Rovodev path under modular-rules (import): ${join163(modularRootRelative, relativeFilePath)}`
25942
26329
  );
25943
26330
  }
25944
26331
  return ok;
@@ -26064,14 +26451,14 @@ s/<command> [arguments]
26064
26451
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
26065
26452
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
26066
26453
 
26067
- When users call a custom slash command, you have to look for the markdown file, \`${join160(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
26454
+ When users call a custom slash command, you have to look for the markdown file, \`${join163(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
26068
26455
  const subagentsSection = subagents ? `## Simulated Subagents
26069
26456
 
26070
26457
  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.
26071
26458
 
26072
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${join160(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
26459
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${join163(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
26073
26460
 
26074
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join160(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
26461
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join163(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
26075
26462
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
26076
26463
  const result = [
26077
26464
  overview,
@@ -26329,7 +26716,7 @@ function buildPermissionsStrategy(ctx) {
26329
26716
  }
26330
26717
 
26331
26718
  // src/lib/generate.ts
26332
- import { join as join161 } from "path";
26719
+ import { join as join164 } from "path";
26333
26720
  import { intersection } from "es-toolkit";
26334
26721
  async function processFeatureGeneration(params) {
26335
26722
  const { config, processor, toolFiles } = params;
@@ -26403,7 +26790,7 @@ function warnUnsupportedTargets(params) {
26403
26790
  }
26404
26791
  }
26405
26792
  async function checkRulesyncDirExists(params) {
26406
- return fileExists(join161(params.inputRoot, RULESYNC_RELATIVE_DIR_PATH));
26793
+ return fileExists(join164(params.inputRoot, RULESYNC_RELATIVE_DIR_PATH));
26407
26794
  }
26408
26795
  async function generate(params) {
26409
26796
  const { config, logger } = params;