rulesync 8.7.0 → 8.8.1

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.
package/dist/index.cjs CHANGED
@@ -308,6 +308,7 @@ var ALL_TOOL_TARGETS = [
308
308
  "replit",
309
309
  "roo",
310
310
  "rovodev",
311
+ "takt",
311
312
  "warp",
312
313
  "windsurf",
313
314
  "zed"
@@ -875,11 +876,11 @@ function getBaseDirsInLightOfGlobal({
875
876
  }
876
877
 
877
878
  // src/lib/generate.ts
878
- var import_node_path141 = require("path");
879
+ var import_node_path145 = require("path");
879
880
  var import_es_toolkit5 = require("es-toolkit");
880
881
 
881
882
  // src/features/commands/commands-processor.ts
882
- var import_node_path23 = require("path");
883
+ var import_node_path24 = require("path");
883
884
  var import_mini15 = require("zod/mini");
884
885
 
885
886
  // src/utils/content-equivalence.ts
@@ -1503,7 +1504,12 @@ var RulesyncFile = class extends AiFile {
1503
1504
  // src/features/commands/rulesync-command.ts
1504
1505
  var RulesyncCommandFrontmatterSchema = import_mini5.z.looseObject({
1505
1506
  targets: import_mini5.z._default(RulesyncTargetsSchema, ["*"]),
1506
- description: import_mini5.z.optional(import_mini5.z.string())
1507
+ description: import_mini5.z.optional(import_mini5.z.string()),
1508
+ takt: import_mini5.z.optional(
1509
+ import_mini5.z.looseObject({
1510
+ name: import_mini5.z.optional(import_mini5.z.string())
1511
+ })
1512
+ )
1507
1513
  });
1508
1514
  var RulesyncCommand = class _RulesyncCommand extends RulesyncFile {
1509
1515
  frontmatter;
@@ -3210,6 +3216,124 @@ var RooCommand = class _RooCommand extends ToolCommand {
3210
3216
  }
3211
3217
  };
3212
3218
 
3219
+ // src/features/commands/takt-command.ts
3220
+ var import_node_path23 = require("path");
3221
+
3222
+ // src/features/takt-shared.ts
3223
+ var TAKT_NAME_PATTERN = /^[A-Za-z0-9_.-]+$/u;
3224
+ function assertSafeTaktName({
3225
+ name,
3226
+ featureLabel,
3227
+ sourceLabel
3228
+ }) {
3229
+ if (!TAKT_NAME_PATTERN.test(name) || name === "." || name === ".." || name.split(/[.]/u).some((segment) => segment === "..")) {
3230
+ throw new Error(
3231
+ `Invalid takt.name "${name}" for ${featureLabel} "${sourceLabel}": filename stems may not contain path separators or ".." segments.`
3232
+ );
3233
+ }
3234
+ }
3235
+
3236
+ // src/features/commands/takt-command.ts
3237
+ var DEFAULT_TAKT_COMMAND_DIR = "instructions";
3238
+ var TaktCommand = class _TaktCommand extends ToolCommand {
3239
+ body;
3240
+ constructor({ body, ...rest }) {
3241
+ super({
3242
+ ...rest,
3243
+ fileContent: body
3244
+ });
3245
+ this.body = body;
3246
+ }
3247
+ static getSettablePaths(_options = {}) {
3248
+ return {
3249
+ relativeDirPath: (0, import_node_path23.join)(".takt", "facets", DEFAULT_TAKT_COMMAND_DIR)
3250
+ };
3251
+ }
3252
+ getBody() {
3253
+ return this.body;
3254
+ }
3255
+ getFrontmatter() {
3256
+ return {};
3257
+ }
3258
+ toRulesyncCommand() {
3259
+ const rulesyncFrontmatter = {
3260
+ targets: ["*"]
3261
+ };
3262
+ return new RulesyncCommand({
3263
+ baseDir: ".",
3264
+ frontmatter: rulesyncFrontmatter,
3265
+ body: this.body,
3266
+ relativeDirPath: RulesyncCommand.getSettablePaths().relativeDirPath,
3267
+ relativeFilePath: this.relativeFilePath,
3268
+ fileContent: this.body,
3269
+ validate: true
3270
+ });
3271
+ }
3272
+ static fromRulesyncCommand({
3273
+ baseDir = process.cwd(),
3274
+ rulesyncCommand,
3275
+ validate = true,
3276
+ global = false
3277
+ }) {
3278
+ const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
3279
+ const taktSection = rulesyncFrontmatter.takt;
3280
+ const sourceLabel = rulesyncCommand.getRelativeFilePath();
3281
+ const overrideName = typeof taktSection?.name === "string" ? taktSection.name : void 0;
3282
+ const sourceStem = rulesyncCommand.getRelativeFilePath().replace(/\.md$/u, "");
3283
+ const stem = overrideName ?? sourceStem;
3284
+ assertSafeTaktName({ name: stem, featureLabel: "command", sourceLabel });
3285
+ const relativeFilePath = `${stem}.md`;
3286
+ const paths = this.getSettablePaths({ global });
3287
+ return new _TaktCommand({
3288
+ baseDir,
3289
+ body: rulesyncCommand.getBody(),
3290
+ relativeDirPath: paths.relativeDirPath,
3291
+ relativeFilePath,
3292
+ validate
3293
+ });
3294
+ }
3295
+ validate() {
3296
+ return { success: true, error: null };
3297
+ }
3298
+ static isTargetedByRulesyncCommand(rulesyncCommand) {
3299
+ return this.isTargetedByRulesyncCommandDefault({
3300
+ rulesyncCommand,
3301
+ toolTarget: "takt"
3302
+ });
3303
+ }
3304
+ static async fromFile({
3305
+ baseDir = process.cwd(),
3306
+ relativeFilePath,
3307
+ validate = true,
3308
+ global = false
3309
+ }) {
3310
+ const paths = this.getSettablePaths({ global });
3311
+ const filePath = (0, import_node_path23.join)(baseDir, paths.relativeDirPath, relativeFilePath);
3312
+ const fileContent = await readFileContent(filePath);
3313
+ const { body } = parseFrontmatter(fileContent, filePath);
3314
+ return new _TaktCommand({
3315
+ baseDir,
3316
+ relativeDirPath: paths.relativeDirPath,
3317
+ relativeFilePath,
3318
+ body: body.trim(),
3319
+ validate
3320
+ });
3321
+ }
3322
+ static forDeletion({
3323
+ baseDir = process.cwd(),
3324
+ relativeDirPath,
3325
+ relativeFilePath
3326
+ }) {
3327
+ return new _TaktCommand({
3328
+ baseDir,
3329
+ relativeDirPath,
3330
+ relativeFilePath,
3331
+ body: "",
3332
+ validate: false
3333
+ });
3334
+ }
3335
+ };
3336
+
3213
3337
  // src/features/commands/commands-processor.ts
3214
3338
  var commandsProcessorToolTargetTuple = [
3215
3339
  "agentsmd",
@@ -3226,7 +3350,8 @@ var commandsProcessorToolTargetTuple = [
3226
3350
  "kilo",
3227
3351
  "kiro",
3228
3352
  "opencode",
3229
- "roo"
3353
+ "roo",
3354
+ "takt"
3230
3355
  ];
3231
3356
  var CommandsProcessorToolTargetSchema = import_mini15.z.enum(commandsProcessorToolTargetTuple);
3232
3357
  var toolCommandFactories = /* @__PURE__ */ new Map([
@@ -3424,6 +3549,19 @@ var toolCommandFactories = /* @__PURE__ */ new Map([
3424
3549
  supportsSubdirectory: true
3425
3550
  }
3426
3551
  }
3552
+ ],
3553
+ [
3554
+ "takt",
3555
+ {
3556
+ class: TaktCommand,
3557
+ meta: {
3558
+ extension: "md",
3559
+ supportsProject: true,
3560
+ supportsGlobal: true,
3561
+ isSimulated: false,
3562
+ supportsSubdirectory: false
3563
+ }
3564
+ }
3427
3565
  ]
3428
3566
  ]);
3429
3567
  var defaultGetFactory = (target) => {
@@ -3512,12 +3650,12 @@ var CommandsProcessor = class extends FeatureProcessor {
3512
3650
  return rulesyncCommands;
3513
3651
  }
3514
3652
  flattenRelativeFilePath(rulesyncCommand) {
3515
- const flatPath = (0, import_node_path23.basename)(rulesyncCommand.getRelativeFilePath());
3653
+ const flatPath = (0, import_node_path24.basename)(rulesyncCommand.getRelativeFilePath());
3516
3654
  if (flatPath === rulesyncCommand.getRelativeFilePath()) return rulesyncCommand;
3517
3655
  return rulesyncCommand.withRelativeFilePath(flatPath);
3518
3656
  }
3519
3657
  safeRelativePath(basePath, fullPath) {
3520
- const rel = (0, import_node_path23.relative)(basePath, fullPath);
3658
+ const rel = (0, import_node_path24.relative)(basePath, fullPath);
3521
3659
  checkPathTraversal({ relativePath: rel, intendedRootDir: basePath });
3522
3660
  return rel;
3523
3661
  }
@@ -3527,10 +3665,10 @@ var CommandsProcessor = class extends FeatureProcessor {
3527
3665
  */
3528
3666
  async loadRulesyncFiles() {
3529
3667
  const basePath = RulesyncCommand.getSettablePaths().relativeDirPath;
3530
- const rulesyncCommandPaths = await findFilesByGlobs((0, import_node_path23.join)(basePath, "**", "*.md"));
3668
+ const rulesyncCommandPaths = await findFilesByGlobs((0, import_node_path24.join)(basePath, "**", "*.md"));
3531
3669
  const rulesyncCommands = await Promise.all(
3532
3670
  rulesyncCommandPaths.map(
3533
- (path3) => RulesyncCommand.fromFile({ relativeFilePath: this.safeRelativePath(basePath, path3) })
3671
+ (path4) => RulesyncCommand.fromFile({ relativeFilePath: this.safeRelativePath(basePath, path4) })
3534
3672
  )
3535
3673
  );
3536
3674
  this.logger.debug(`Successfully loaded ${rulesyncCommands.length} rulesync commands`);
@@ -3545,15 +3683,15 @@ var CommandsProcessor = class extends FeatureProcessor {
3545
3683
  } = {}) {
3546
3684
  const factory = this.getFactory(this.toolTarget);
3547
3685
  const paths = factory.class.getSettablePaths({ global: this.global });
3548
- const baseDirFull = (0, import_node_path23.join)(this.baseDir, paths.relativeDirPath);
3549
- const globPattern = factory.meta.supportsSubdirectory ? (0, import_node_path23.join)(baseDirFull, "**", `*.${factory.meta.extension}`) : (0, import_node_path23.join)(baseDirFull, `*.${factory.meta.extension}`);
3686
+ const baseDirFull = (0, import_node_path24.join)(this.baseDir, paths.relativeDirPath);
3687
+ const globPattern = factory.meta.supportsSubdirectory ? (0, import_node_path24.join)(baseDirFull, "**", `*.${factory.meta.extension}`) : (0, import_node_path24.join)(baseDirFull, `*.${factory.meta.extension}`);
3550
3688
  const commandFilePaths = await findFilesByGlobs(globPattern);
3551
3689
  if (forDeletion) {
3552
3690
  const toolCommands2 = commandFilePaths.map(
3553
- (path3) => factory.class.forDeletion({
3691
+ (path4) => factory.class.forDeletion({
3554
3692
  baseDir: this.baseDir,
3555
3693
  relativeDirPath: paths.relativeDirPath,
3556
- relativeFilePath: this.safeRelativePath(baseDirFull, path3),
3694
+ relativeFilePath: this.safeRelativePath(baseDirFull, path4),
3557
3695
  global: this.global
3558
3696
  })
3559
3697
  ).filter((cmd) => cmd.isDeletable());
@@ -3564,9 +3702,9 @@ var CommandsProcessor = class extends FeatureProcessor {
3564
3702
  }
3565
3703
  const toolCommands = await Promise.all(
3566
3704
  commandFilePaths.map(
3567
- (path3) => factory.class.fromFile({
3705
+ (path4) => factory.class.fromFile({
3568
3706
  baseDir: this.baseDir,
3569
- relativeFilePath: this.safeRelativePath(baseDirFull, path3),
3707
+ relativeFilePath: this.safeRelativePath(baseDirFull, path4),
3570
3708
  global: this.global
3571
3709
  })
3572
3710
  )
@@ -3867,7 +4005,7 @@ var DEEPAGENTS_TO_CANONICAL_EVENT_NAMES = Object.fromEntries(
3867
4005
  );
3868
4006
 
3869
4007
  // src/features/hooks/claudecode-hooks.ts
3870
- var import_node_path25 = require("path");
4008
+ var import_node_path26 = require("path");
3871
4009
 
3872
4010
  // src/features/hooks/tool-hooks-converter.ts
3873
4011
  function isToolMatcherEntry(x) {
@@ -3997,7 +4135,7 @@ var ToolFile = class extends AiFile {
3997
4135
  };
3998
4136
 
3999
4137
  // src/features/hooks/rulesync-hooks.ts
4000
- var import_node_path24 = require("path");
4138
+ var import_node_path25 = require("path");
4001
4139
  var RulesyncHooks = class _RulesyncHooks extends RulesyncFile {
4002
4140
  json;
4003
4141
  constructor(params) {
@@ -4028,7 +4166,7 @@ var RulesyncHooks = class _RulesyncHooks extends RulesyncFile {
4028
4166
  validate = true
4029
4167
  }) {
4030
4168
  const paths = _RulesyncHooks.getSettablePaths();
4031
- const filePath = (0, import_node_path24.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4169
+ const filePath = (0, import_node_path25.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4032
4170
  if (!await fileExists(filePath)) {
4033
4171
  throw new Error(`No ${RULESYNC_HOOKS_RELATIVE_FILE_PATH} found.`);
4034
4172
  }
@@ -4113,7 +4251,7 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
4113
4251
  global = false
4114
4252
  }) {
4115
4253
  const paths = _ClaudecodeHooks.getSettablePaths({ global });
4116
- const filePath = (0, import_node_path25.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4254
+ const filePath = (0, import_node_path26.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4117
4255
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4118
4256
  return new _ClaudecodeHooks({
4119
4257
  baseDir,
@@ -4131,7 +4269,7 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
4131
4269
  logger
4132
4270
  }) {
4133
4271
  const paths = _ClaudecodeHooks.getSettablePaths({ global });
4134
- const filePath = (0, import_node_path25.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4272
+ const filePath = (0, import_node_path26.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4135
4273
  const existingContent = await readOrInitializeFileContent(
4136
4274
  filePath,
4137
4275
  JSON.stringify({}, null, 2)
@@ -4168,7 +4306,7 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
4168
4306
  settings = JSON.parse(this.getFileContent());
4169
4307
  } catch (error) {
4170
4308
  throw new Error(
4171
- `Failed to parse Claude hooks content in ${(0, import_node_path25.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4309
+ `Failed to parse Claude hooks content in ${(0, import_node_path26.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4172
4310
  {
4173
4311
  cause: error
4174
4312
  }
@@ -4201,7 +4339,7 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
4201
4339
  };
4202
4340
 
4203
4341
  // src/features/hooks/codexcli-hooks.ts
4204
- var import_node_path26 = require("path");
4342
+ var import_node_path27 = require("path");
4205
4343
  var smolToml2 = __toESM(require("smol-toml"), 1);
4206
4344
  var CODEXCLI_CONVERTER_CONFIG = {
4207
4345
  supportedEvents: CODEXCLI_HOOK_EVENTS,
@@ -4212,7 +4350,7 @@ var CODEXCLI_CONVERTER_CONFIG = {
4212
4350
  passthroughFields: ["name", "description"]
4213
4351
  };
4214
4352
  async function buildCodexConfigTomlContent({ baseDir }) {
4215
- const configPath = (0, import_node_path26.join)(baseDir, ".codex", "config.toml");
4353
+ const configPath = (0, import_node_path27.join)(baseDir, ".codex", "config.toml");
4216
4354
  const existingContent = await readFileContentOrNull(configPath) ?? smolToml2.stringify({});
4217
4355
  let configToml;
4218
4356
  try {
@@ -4261,7 +4399,7 @@ var CodexcliHooks = class _CodexcliHooks extends ToolHooks {
4261
4399
  global = false
4262
4400
  }) {
4263
4401
  const paths = _CodexcliHooks.getSettablePaths({ global });
4264
- const filePath = (0, import_node_path26.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4402
+ const filePath = (0, import_node_path27.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4265
4403
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4266
4404
  return new _CodexcliHooks({
4267
4405
  baseDir,
@@ -4299,7 +4437,7 @@ var CodexcliHooks = class _CodexcliHooks extends ToolHooks {
4299
4437
  parsed = JSON.parse(this.getFileContent());
4300
4438
  } catch (error) {
4301
4439
  throw new Error(
4302
- `Failed to parse Codex CLI hooks content in ${(0, import_node_path26.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4440
+ `Failed to parse Codex CLI hooks content in ${(0, import_node_path27.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4303
4441
  {
4304
4442
  cause: error
4305
4443
  }
@@ -4337,7 +4475,7 @@ var CodexcliHooks = class _CodexcliHooks extends ToolHooks {
4337
4475
  };
4338
4476
 
4339
4477
  // src/features/hooks/copilot-hooks.ts
4340
- var import_node_path27 = require("path");
4478
+ var import_node_path28 = require("path");
4341
4479
  var import_mini17 = require("zod/mini");
4342
4480
  var CopilotHookEntrySchema = import_mini17.z.looseObject({
4343
4481
  type: import_mini17.z.string(),
@@ -4440,7 +4578,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
4440
4578
  }
4441
4579
  static getSettablePaths(_options = {}) {
4442
4580
  return {
4443
- relativeDirPath: (0, import_node_path27.join)(".github", "hooks"),
4581
+ relativeDirPath: (0, import_node_path28.join)(".github", "hooks"),
4444
4582
  relativeFilePath: "copilot-hooks.json"
4445
4583
  };
4446
4584
  }
@@ -4450,7 +4588,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
4450
4588
  global = false
4451
4589
  }) {
4452
4590
  const paths = _CopilotHooks.getSettablePaths({ global });
4453
- const filePath = (0, import_node_path27.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4591
+ const filePath = (0, import_node_path28.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4454
4592
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4455
4593
  return new _CopilotHooks({
4456
4594
  baseDir,
@@ -4483,7 +4621,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
4483
4621
  parsed = JSON.parse(this.getFileContent());
4484
4622
  } catch (error) {
4485
4623
  throw new Error(
4486
- `Failed to parse Copilot hooks content in ${(0, import_node_path27.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4624
+ `Failed to parse Copilot hooks content in ${(0, import_node_path28.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4487
4625
  {
4488
4626
  cause: error
4489
4627
  }
@@ -4513,7 +4651,7 @@ var CopilotHooks = class _CopilotHooks extends ToolHooks {
4513
4651
  };
4514
4652
 
4515
4653
  // src/features/hooks/cursor-hooks.ts
4516
- var import_node_path28 = require("path");
4654
+ var import_node_path29 = require("path");
4517
4655
  var CursorHooks = class _CursorHooks extends ToolHooks {
4518
4656
  constructor(params) {
4519
4657
  const { rulesyncHooks: _r, ...rest } = params;
@@ -4534,7 +4672,7 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
4534
4672
  }) {
4535
4673
  const paths = _CursorHooks.getSettablePaths();
4536
4674
  const fileContent = await readFileContent(
4537
- (0, import_node_path28.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4675
+ (0, import_node_path29.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4538
4676
  );
4539
4677
  return new _CursorHooks({
4540
4678
  baseDir,
@@ -4621,7 +4759,7 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
4621
4759
  };
4622
4760
 
4623
4761
  // src/features/hooks/deepagents-hooks.ts
4624
- var import_node_path29 = require("path");
4762
+ var import_node_path30 = require("path");
4625
4763
  function isDeepagentsHooksFile(val) {
4626
4764
  if (typeof val !== "object" || val === null || !("hooks" in val)) return false;
4627
4765
  return Array.isArray(val.hooks);
@@ -4696,7 +4834,7 @@ var DeepagentsHooks = class _DeepagentsHooks extends ToolHooks {
4696
4834
  global = false
4697
4835
  }) {
4698
4836
  const paths = _DeepagentsHooks.getSettablePaths({ global });
4699
- const filePath = (0, import_node_path29.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4837
+ const filePath = (0, import_node_path30.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4700
4838
  const fileContent = await readFileContentOrNull(filePath) ?? JSON.stringify({ hooks: [] }, null, 2);
4701
4839
  return new _DeepagentsHooks({
4702
4840
  baseDir,
@@ -4730,7 +4868,7 @@ var DeepagentsHooks = class _DeepagentsHooks extends ToolHooks {
4730
4868
  parsed = JSON.parse(this.getFileContent());
4731
4869
  } catch (error) {
4732
4870
  throw new Error(
4733
- `Failed to parse deepagents hooks content in ${(0, import_node_path29.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4871
+ `Failed to parse deepagents hooks content in ${(0, import_node_path30.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4734
4872
  { cause: error }
4735
4873
  );
4736
4874
  }
@@ -4759,7 +4897,7 @@ var DeepagentsHooks = class _DeepagentsHooks extends ToolHooks {
4759
4897
  };
4760
4898
 
4761
4899
  // src/features/hooks/factorydroid-hooks.ts
4762
- var import_node_path30 = require("path");
4900
+ var import_node_path31 = require("path");
4763
4901
  var FACTORYDROID_CONVERTER_CONFIG = {
4764
4902
  supportedEvents: FACTORYDROID_HOOK_EVENTS,
4765
4903
  canonicalToToolEventNames: CANONICAL_TO_FACTORYDROID_EVENT_NAMES,
@@ -4785,7 +4923,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4785
4923
  global = false
4786
4924
  }) {
4787
4925
  const paths = _FactorydroidHooks.getSettablePaths({ global });
4788
- const filePath = (0, import_node_path30.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4926
+ const filePath = (0, import_node_path31.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4789
4927
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4790
4928
  return new _FactorydroidHooks({
4791
4929
  baseDir,
@@ -4803,7 +4941,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4803
4941
  logger
4804
4942
  }) {
4805
4943
  const paths = _FactorydroidHooks.getSettablePaths({ global });
4806
- const filePath = (0, import_node_path30.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4944
+ const filePath = (0, import_node_path31.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4807
4945
  const existingContent = await readOrInitializeFileContent(
4808
4946
  filePath,
4809
4947
  JSON.stringify({}, null, 2)
@@ -4840,7 +4978,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4840
4978
  settings = JSON.parse(this.getFileContent());
4841
4979
  } catch (error) {
4842
4980
  throw new Error(
4843
- `Failed to parse Factory Droid hooks content in ${(0, import_node_path30.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4981
+ `Failed to parse Factory Droid hooks content in ${(0, import_node_path31.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
4844
4982
  {
4845
4983
  cause: error
4846
4984
  }
@@ -4873,7 +5011,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
4873
5011
  };
4874
5012
 
4875
5013
  // src/features/hooks/geminicli-hooks.ts
4876
- var import_node_path31 = require("path");
5014
+ var import_node_path32 = require("path");
4877
5015
  var import_mini18 = require("zod/mini");
4878
5016
  function canonicalToGeminicliHooks(config) {
4879
5017
  const geminiSupported = new Set(GEMINICLI_HOOK_EVENTS);
@@ -4982,7 +5120,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4982
5120
  global = false
4983
5121
  }) {
4984
5122
  const paths = _GeminicliHooks.getSettablePaths({ global });
4985
- const filePath = (0, import_node_path31.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
5123
+ const filePath = (0, import_node_path32.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4986
5124
  const fileContent = await readFileContentOrNull(filePath) ?? '{"hooks":{}}';
4987
5125
  return new _GeminicliHooks({
4988
5126
  baseDir,
@@ -4999,7 +5137,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
4999
5137
  global = false
5000
5138
  }) {
5001
5139
  const paths = _GeminicliHooks.getSettablePaths({ global });
5002
- const filePath = (0, import_node_path31.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
5140
+ const filePath = (0, import_node_path32.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
5003
5141
  const existingContent = await readOrInitializeFileContent(
5004
5142
  filePath,
5005
5143
  JSON.stringify({}, null, 2)
@@ -5031,7 +5169,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
5031
5169
  settings = JSON.parse(this.getFileContent());
5032
5170
  } catch (error) {
5033
5171
  throw new Error(
5034
- `Failed to parse Gemini CLI hooks content in ${(0, import_node_path31.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
5172
+ `Failed to parse Gemini CLI hooks content in ${(0, import_node_path32.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
5035
5173
  {
5036
5174
  cause: error
5037
5175
  }
@@ -5061,7 +5199,7 @@ var GeminicliHooks = class _GeminicliHooks extends ToolHooks {
5061
5199
  };
5062
5200
 
5063
5201
  // src/features/hooks/kilo-hooks.ts
5064
- var import_node_path32 = require("path");
5202
+ var import_node_path33 = require("path");
5065
5203
 
5066
5204
  // src/features/hooks/opencode-style-generator.ts
5067
5205
  var NAMED_HOOKS = /* @__PURE__ */ new Set(["tool.execute.before", "tool.execute.after"]);
@@ -5160,7 +5298,7 @@ var KiloHooks = class _KiloHooks extends ToolHooks {
5160
5298
  }
5161
5299
  static getSettablePaths(options) {
5162
5300
  return {
5163
- relativeDirPath: options?.global ? (0, import_node_path32.join)(".config", "kilo", "plugins") : (0, import_node_path32.join)(".kilo", "plugins"),
5301
+ relativeDirPath: options?.global ? (0, import_node_path33.join)(".config", "kilo", "plugins") : (0, import_node_path33.join)(".kilo", "plugins"),
5164
5302
  relativeFilePath: "rulesync-hooks.js"
5165
5303
  };
5166
5304
  }
@@ -5171,7 +5309,7 @@ var KiloHooks = class _KiloHooks extends ToolHooks {
5171
5309
  }) {
5172
5310
  const paths = _KiloHooks.getSettablePaths({ global });
5173
5311
  const fileContent = await readFileContent(
5174
- (0, import_node_path32.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
5312
+ (0, import_node_path33.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
5175
5313
  );
5176
5314
  return new _KiloHooks({
5177
5315
  baseDir,
@@ -5225,7 +5363,7 @@ var KiloHooks = class _KiloHooks extends ToolHooks {
5225
5363
  };
5226
5364
 
5227
5365
  // src/features/hooks/opencode-hooks.ts
5228
- var import_node_path33 = require("path");
5366
+ var import_node_path34 = require("path");
5229
5367
  var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
5230
5368
  constructor(params) {
5231
5369
  super({
@@ -5235,7 +5373,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
5235
5373
  }
5236
5374
  static getSettablePaths(options) {
5237
5375
  return {
5238
- relativeDirPath: options?.global ? (0, import_node_path33.join)(".config", "opencode", "plugins") : (0, import_node_path33.join)(".opencode", "plugins"),
5376
+ relativeDirPath: options?.global ? (0, import_node_path34.join)(".config", "opencode", "plugins") : (0, import_node_path34.join)(".opencode", "plugins"),
5239
5377
  relativeFilePath: "rulesync-hooks.js"
5240
5378
  };
5241
5379
  }
@@ -5246,7 +5384,7 @@ var OpencodeHooks = class _OpencodeHooks extends ToolHooks {
5246
5384
  }) {
5247
5385
  const paths = _OpencodeHooks.getSettablePaths({ global });
5248
5386
  const fileContent = await readFileContent(
5249
- (0, import_node_path33.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
5387
+ (0, import_node_path34.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
5250
5388
  );
5251
5389
  return new _OpencodeHooks({
5252
5390
  baseDir,
@@ -5598,10 +5736,10 @@ var HooksProcessor = class extends FeatureProcessor {
5598
5736
  var import_mini21 = require("zod/mini");
5599
5737
 
5600
5738
  // src/features/ignore/augmentcode-ignore.ts
5601
- var import_node_path35 = require("path");
5739
+ var import_node_path36 = require("path");
5602
5740
 
5603
5741
  // src/features/ignore/rulesync-ignore.ts
5604
- var import_node_path34 = require("path");
5742
+ var import_node_path35 = require("path");
5605
5743
  var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
5606
5744
  validate() {
5607
5745
  return { success: true, error: null };
@@ -5621,12 +5759,12 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
5621
5759
  static async fromFile() {
5622
5760
  const baseDir = process.cwd();
5623
5761
  const paths = this.getSettablePaths();
5624
- const recommendedPath = (0, import_node_path34.join)(
5762
+ const recommendedPath = (0, import_node_path35.join)(
5625
5763
  baseDir,
5626
5764
  paths.recommended.relativeDirPath,
5627
5765
  paths.recommended.relativeFilePath
5628
5766
  );
5629
- const legacyPath = (0, import_node_path34.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5767
+ const legacyPath = (0, import_node_path35.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
5630
5768
  if (await fileExists(recommendedPath)) {
5631
5769
  const fileContent2 = await readFileContent(recommendedPath);
5632
5770
  return new _RulesyncIgnore({
@@ -5742,7 +5880,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
5742
5880
  validate = true
5743
5881
  }) {
5744
5882
  const fileContent = await readFileContent(
5745
- (0, import_node_path35.join)(
5883
+ (0, import_node_path36.join)(
5746
5884
  baseDir,
5747
5885
  this.getSettablePaths().relativeDirPath,
5748
5886
  this.getSettablePaths().relativeFilePath
@@ -5772,7 +5910,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
5772
5910
  };
5773
5911
 
5774
5912
  // src/features/ignore/claudecode-ignore.ts
5775
- var import_node_path36 = require("path");
5913
+ var import_node_path37 = require("path");
5776
5914
  var import_es_toolkit2 = require("es-toolkit");
5777
5915
  var import_mini20 = require("zod/mini");
5778
5916
  var SHARED_SETTINGS_FILE = "settings.json";
@@ -5843,7 +5981,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
5843
5981
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
5844
5982
  const deniedValues = patterns.map((pattern) => `Read(${pattern})`);
5845
5983
  const paths = this.getSettablePaths({ options });
5846
- const filePath = (0, import_node_path36.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
5984
+ const filePath = (0, import_node_path37.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
5847
5985
  const exists = await fileExists(filePath);
5848
5986
  const existingFileContent = exists ? await readFileContent(filePath) : "{}";
5849
5987
  const existingJsonValue = JSON.parse(existingFileContent);
@@ -5877,7 +6015,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
5877
6015
  }) {
5878
6016
  const fileMode = resolveFileMode(options);
5879
6017
  const paths = this.getSettablePaths({ options });
5880
- const filePath = (0, import_node_path36.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
6018
+ const filePath = (0, import_node_path37.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
5881
6019
  const exists = await fileExists(filePath);
5882
6020
  if (!exists && fileMode === "shared") {
5883
6021
  throw new Error(`File not found: ${filePath}`);
@@ -5907,7 +6045,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
5907
6045
  };
5908
6046
 
5909
6047
  // src/features/ignore/cline-ignore.ts
5910
- var import_node_path37 = require("path");
6048
+ var import_node_path38 = require("path");
5911
6049
  var ClineIgnore = class _ClineIgnore extends ToolIgnore {
5912
6050
  static getSettablePaths() {
5913
6051
  return {
@@ -5944,7 +6082,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
5944
6082
  validate = true
5945
6083
  }) {
5946
6084
  const fileContent = await readFileContent(
5947
- (0, import_node_path37.join)(
6085
+ (0, import_node_path38.join)(
5948
6086
  baseDir,
5949
6087
  this.getSettablePaths().relativeDirPath,
5950
6088
  this.getSettablePaths().relativeFilePath
@@ -5974,7 +6112,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
5974
6112
  };
5975
6113
 
5976
6114
  // src/features/ignore/cursor-ignore.ts
5977
- var import_node_path38 = require("path");
6115
+ var import_node_path39 = require("path");
5978
6116
  var CursorIgnore = class _CursorIgnore extends ToolIgnore {
5979
6117
  static getSettablePaths() {
5980
6118
  return {
@@ -6007,7 +6145,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
6007
6145
  validate = true
6008
6146
  }) {
6009
6147
  const fileContent = await readFileContent(
6010
- (0, import_node_path38.join)(
6148
+ (0, import_node_path39.join)(
6011
6149
  baseDir,
6012
6150
  this.getSettablePaths().relativeDirPath,
6013
6151
  this.getSettablePaths().relativeFilePath
@@ -6037,7 +6175,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
6037
6175
  };
6038
6176
 
6039
6177
  // src/features/ignore/geminicli-ignore.ts
6040
- var import_node_path39 = require("path");
6178
+ var import_node_path40 = require("path");
6041
6179
  var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
6042
6180
  static getSettablePaths() {
6043
6181
  return {
@@ -6064,7 +6202,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
6064
6202
  validate = true
6065
6203
  }) {
6066
6204
  const fileContent = await readFileContent(
6067
- (0, import_node_path39.join)(
6205
+ (0, import_node_path40.join)(
6068
6206
  baseDir,
6069
6207
  this.getSettablePaths().relativeDirPath,
6070
6208
  this.getSettablePaths().relativeFilePath
@@ -6094,7 +6232,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
6094
6232
  };
6095
6233
 
6096
6234
  // src/features/ignore/goose-ignore.ts
6097
- var import_node_path40 = require("path");
6235
+ var import_node_path41 = require("path");
6098
6236
  var GooseIgnore = class _GooseIgnore extends ToolIgnore {
6099
6237
  static getSettablePaths() {
6100
6238
  return {
@@ -6131,7 +6269,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
6131
6269
  validate = true
6132
6270
  }) {
6133
6271
  const fileContent = await readFileContent(
6134
- (0, import_node_path40.join)(
6272
+ (0, import_node_path41.join)(
6135
6273
  baseDir,
6136
6274
  this.getSettablePaths().relativeDirPath,
6137
6275
  this.getSettablePaths().relativeFilePath
@@ -6161,7 +6299,7 @@ var GooseIgnore = class _GooseIgnore extends ToolIgnore {
6161
6299
  };
6162
6300
 
6163
6301
  // src/features/ignore/junie-ignore.ts
6164
- var import_node_path41 = require("path");
6302
+ var import_node_path42 = require("path");
6165
6303
  var JunieIgnore = class _JunieIgnore extends ToolIgnore {
6166
6304
  static getSettablePaths() {
6167
6305
  return {
@@ -6188,7 +6326,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
6188
6326
  validate = true
6189
6327
  }) {
6190
6328
  const fileContent = await readFileContent(
6191
- (0, import_node_path41.join)(
6329
+ (0, import_node_path42.join)(
6192
6330
  baseDir,
6193
6331
  this.getSettablePaths().relativeDirPath,
6194
6332
  this.getSettablePaths().relativeFilePath
@@ -6218,7 +6356,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
6218
6356
  };
6219
6357
 
6220
6358
  // src/features/ignore/kilo-ignore.ts
6221
- var import_node_path42 = require("path");
6359
+ var import_node_path43 = require("path");
6222
6360
  var KiloIgnore = class _KiloIgnore extends ToolIgnore {
6223
6361
  static getSettablePaths() {
6224
6362
  return {
@@ -6255,7 +6393,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
6255
6393
  validate = true
6256
6394
  }) {
6257
6395
  const fileContent = await readFileContent(
6258
- (0, import_node_path42.join)(
6396
+ (0, import_node_path43.join)(
6259
6397
  baseDir,
6260
6398
  this.getSettablePaths().relativeDirPath,
6261
6399
  this.getSettablePaths().relativeFilePath
@@ -6285,7 +6423,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
6285
6423
  };
6286
6424
 
6287
6425
  // src/features/ignore/kiro-ignore.ts
6288
- var import_node_path43 = require("path");
6426
+ var import_node_path44 = require("path");
6289
6427
  var KiroIgnore = class _KiroIgnore extends ToolIgnore {
6290
6428
  static getSettablePaths() {
6291
6429
  return {
@@ -6312,7 +6450,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
6312
6450
  validate = true
6313
6451
  }) {
6314
6452
  const fileContent = await readFileContent(
6315
- (0, import_node_path43.join)(
6453
+ (0, import_node_path44.join)(
6316
6454
  baseDir,
6317
6455
  this.getSettablePaths().relativeDirPath,
6318
6456
  this.getSettablePaths().relativeFilePath
@@ -6342,7 +6480,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
6342
6480
  };
6343
6481
 
6344
6482
  // src/features/ignore/qwencode-ignore.ts
6345
- var import_node_path44 = require("path");
6483
+ var import_node_path45 = require("path");
6346
6484
  var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
6347
6485
  static getSettablePaths() {
6348
6486
  return {
@@ -6369,7 +6507,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
6369
6507
  validate = true
6370
6508
  }) {
6371
6509
  const fileContent = await readFileContent(
6372
- (0, import_node_path44.join)(
6510
+ (0, import_node_path45.join)(
6373
6511
  baseDir,
6374
6512
  this.getSettablePaths().relativeDirPath,
6375
6513
  this.getSettablePaths().relativeFilePath
@@ -6399,7 +6537,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
6399
6537
  };
6400
6538
 
6401
6539
  // src/features/ignore/roo-ignore.ts
6402
- var import_node_path45 = require("path");
6540
+ var import_node_path46 = require("path");
6403
6541
  var RooIgnore = class _RooIgnore extends ToolIgnore {
6404
6542
  static getSettablePaths() {
6405
6543
  return {
@@ -6426,7 +6564,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
6426
6564
  validate = true
6427
6565
  }) {
6428
6566
  const fileContent = await readFileContent(
6429
- (0, import_node_path45.join)(
6567
+ (0, import_node_path46.join)(
6430
6568
  baseDir,
6431
6569
  this.getSettablePaths().relativeDirPath,
6432
6570
  this.getSettablePaths().relativeFilePath
@@ -6456,7 +6594,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
6456
6594
  };
6457
6595
 
6458
6596
  // src/features/ignore/windsurf-ignore.ts
6459
- var import_node_path46 = require("path");
6597
+ var import_node_path47 = require("path");
6460
6598
  var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
6461
6599
  static getSettablePaths() {
6462
6600
  return {
@@ -6483,7 +6621,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
6483
6621
  validate = true
6484
6622
  }) {
6485
6623
  const fileContent = await readFileContent(
6486
- (0, import_node_path46.join)(
6624
+ (0, import_node_path47.join)(
6487
6625
  baseDir,
6488
6626
  this.getSettablePaths().relativeDirPath,
6489
6627
  this.getSettablePaths().relativeFilePath
@@ -6513,7 +6651,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
6513
6651
  };
6514
6652
 
6515
6653
  // src/features/ignore/zed-ignore.ts
6516
- var import_node_path47 = require("path");
6654
+ var import_node_path48 = require("path");
6517
6655
  var import_es_toolkit3 = require("es-toolkit");
6518
6656
  var ZedIgnore = class _ZedIgnore extends ToolIgnore {
6519
6657
  constructor(params) {
@@ -6550,7 +6688,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
6550
6688
  }) {
6551
6689
  const fileContent = rulesyncIgnore.getFileContent();
6552
6690
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
6553
- const filePath = (0, import_node_path47.join)(
6691
+ const filePath = (0, import_node_path48.join)(
6554
6692
  baseDir,
6555
6693
  this.getSettablePaths().relativeDirPath,
6556
6694
  this.getSettablePaths().relativeFilePath
@@ -6577,7 +6715,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
6577
6715
  validate = true
6578
6716
  }) {
6579
6717
  const fileContent = await readFileContent(
6580
- (0, import_node_path47.join)(
6718
+ (0, import_node_path48.join)(
6581
6719
  baseDir,
6582
6720
  this.getSettablePaths().relativeDirPath,
6583
6721
  this.getSettablePaths().relativeFilePath
@@ -6769,10 +6907,10 @@ var IgnoreProcessor = class extends FeatureProcessor {
6769
6907
  var import_mini26 = require("zod/mini");
6770
6908
 
6771
6909
  // src/features/mcp/claudecode-mcp.ts
6772
- var import_node_path49 = require("path");
6910
+ var import_node_path50 = require("path");
6773
6911
 
6774
6912
  // src/features/mcp/rulesync-mcp.ts
6775
- var import_node_path48 = require("path");
6913
+ var import_node_path49 = require("path");
6776
6914
  var import_object = require("es-toolkit/object");
6777
6915
  var import_mini23 = require("zod/mini");
6778
6916
 
@@ -6854,12 +6992,12 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
6854
6992
  }) {
6855
6993
  const baseDir = process.cwd();
6856
6994
  const paths = this.getSettablePaths();
6857
- const recommendedPath = (0, import_node_path48.join)(
6995
+ const recommendedPath = (0, import_node_path49.join)(
6858
6996
  baseDir,
6859
6997
  paths.recommended.relativeDirPath,
6860
6998
  paths.recommended.relativeFilePath
6861
6999
  );
6862
- const legacyPath = (0, import_node_path48.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
7000
+ const legacyPath = (0, import_node_path49.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
6863
7001
  if (await fileExists(recommendedPath)) {
6864
7002
  const fileContent2 = await readFileContent(recommendedPath);
6865
7003
  return new _RulesyncMcp({
@@ -7013,7 +7151,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
7013
7151
  global = false
7014
7152
  }) {
7015
7153
  const paths = this.getSettablePaths({ global });
7016
- const fileContent = await readFileContentOrNull((0, import_node_path49.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7154
+ const fileContent = await readFileContentOrNull((0, import_node_path50.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7017
7155
  const json = JSON.parse(fileContent);
7018
7156
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
7019
7157
  return new _ClaudecodeMcp({
@@ -7033,7 +7171,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
7033
7171
  }) {
7034
7172
  const paths = this.getSettablePaths({ global });
7035
7173
  const fileContent = await readOrInitializeFileContent(
7036
- (0, import_node_path49.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7174
+ (0, import_node_path50.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7037
7175
  JSON.stringify({ mcpServers: {} }, null, 2)
7038
7176
  );
7039
7177
  const json = JSON.parse(fileContent);
@@ -7073,7 +7211,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
7073
7211
  };
7074
7212
 
7075
7213
  // src/features/mcp/cline-mcp.ts
7076
- var import_node_path50 = require("path");
7214
+ var import_node_path51 = require("path");
7077
7215
  var ClineMcp = class _ClineMcp extends ToolMcp {
7078
7216
  json;
7079
7217
  constructor(params) {
@@ -7094,7 +7232,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
7094
7232
  validate = true
7095
7233
  }) {
7096
7234
  const fileContent = await readFileContent(
7097
- (0, import_node_path50.join)(
7235
+ (0, import_node_path51.join)(
7098
7236
  baseDir,
7099
7237
  this.getSettablePaths().relativeDirPath,
7100
7238
  this.getSettablePaths().relativeFilePath
@@ -7143,7 +7281,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
7143
7281
  };
7144
7282
 
7145
7283
  // src/features/mcp/codexcli-mcp.ts
7146
- var import_node_path51 = require("path");
7284
+ var import_node_path52 = require("path");
7147
7285
  var smolToml3 = __toESM(require("smol-toml"), 1);
7148
7286
  function convertFromCodexFormat(codexMcp) {
7149
7287
  const result = {};
@@ -7226,7 +7364,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
7226
7364
  global = false
7227
7365
  }) {
7228
7366
  const paths = this.getSettablePaths({ global });
7229
- const fileContent = await readFileContentOrNull((0, import_node_path51.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml3.stringify({});
7367
+ const fileContent = await readFileContentOrNull((0, import_node_path52.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml3.stringify({});
7230
7368
  return new _CodexcliMcp({
7231
7369
  baseDir,
7232
7370
  relativeDirPath: paths.relativeDirPath,
@@ -7242,7 +7380,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
7242
7380
  global = false
7243
7381
  }) {
7244
7382
  const paths = this.getSettablePaths({ global });
7245
- const configTomlFilePath = (0, import_node_path51.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
7383
+ const configTomlFilePath = (0, import_node_path52.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
7246
7384
  const configTomlFileContent = await readOrInitializeFileContent(
7247
7385
  configTomlFilePath,
7248
7386
  smolToml3.stringify({})
@@ -7296,7 +7434,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
7296
7434
  };
7297
7435
 
7298
7436
  // src/features/mcp/copilot-mcp.ts
7299
- var import_node_path52 = require("path");
7437
+ var import_node_path53 = require("path");
7300
7438
  function convertToCopilotFormat(mcpServers) {
7301
7439
  return { servers: mcpServers };
7302
7440
  }
@@ -7323,7 +7461,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
7323
7461
  validate = true
7324
7462
  }) {
7325
7463
  const fileContent = await readFileContent(
7326
- (0, import_node_path52.join)(
7464
+ (0, import_node_path53.join)(
7327
7465
  baseDir,
7328
7466
  this.getSettablePaths().relativeDirPath,
7329
7467
  this.getSettablePaths().relativeFilePath
@@ -7376,7 +7514,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
7376
7514
  };
7377
7515
 
7378
7516
  // src/features/mcp/copilotcli-mcp.ts
7379
- var import_node_path53 = require("path");
7517
+ var import_node_path54 = require("path");
7380
7518
  var isRemoteServerType = (type) => {
7381
7519
  return type === "http" || type === "sse";
7382
7520
  };
@@ -7474,7 +7612,7 @@ var CopilotcliMcp = class _CopilotcliMcp extends ToolMcp {
7474
7612
  global = false
7475
7613
  }) {
7476
7614
  const paths = this.getSettablePaths({ global });
7477
- const fileContent = await readFileContentOrNull((0, import_node_path53.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7615
+ const fileContent = await readFileContentOrNull((0, import_node_path54.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7478
7616
  const json = JSON.parse(fileContent);
7479
7617
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
7480
7618
  return new _CopilotcliMcp({
@@ -7494,7 +7632,7 @@ var CopilotcliMcp = class _CopilotcliMcp extends ToolMcp {
7494
7632
  }) {
7495
7633
  const paths = this.getSettablePaths({ global });
7496
7634
  const fileContent = await readOrInitializeFileContent(
7497
- (0, import_node_path53.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7635
+ (0, import_node_path54.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7498
7636
  JSON.stringify({ mcpServers: {} }, null, 2)
7499
7637
  );
7500
7638
  const json = JSON.parse(fileContent);
@@ -7536,7 +7674,7 @@ var CopilotcliMcp = class _CopilotcliMcp extends ToolMcp {
7536
7674
  };
7537
7675
 
7538
7676
  // src/features/mcp/cursor-mcp.ts
7539
- var import_node_path54 = require("path");
7677
+ var import_node_path55 = require("path");
7540
7678
  var CURSOR_ENV_VAR_PATTERN = /\$\{env:([^}]+)\}/g;
7541
7679
  function convertEnvFromCursorFormat(mcpServers) {
7542
7680
  return Object.fromEntries(
@@ -7583,7 +7721,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7583
7721
  this.json = JSON.parse(this.fileContent);
7584
7722
  } catch (error) {
7585
7723
  throw new Error(
7586
- `Failed to parse Cursor MCP config at ${(0, import_node_path54.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(error)}`,
7724
+ `Failed to parse Cursor MCP config at ${(0, import_node_path55.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(error)}`,
7587
7725
  { cause: error }
7588
7726
  );
7589
7727
  }
@@ -7609,14 +7747,14 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7609
7747
  global = false
7610
7748
  }) {
7611
7749
  const paths = this.getSettablePaths({ global });
7612
- const filePath = (0, import_node_path54.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
7750
+ const filePath = (0, import_node_path55.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
7613
7751
  const fileContent = await readFileContentOrNull(filePath) ?? '{"mcpServers":{}}';
7614
7752
  let json;
7615
7753
  try {
7616
7754
  json = JSON.parse(fileContent);
7617
7755
  } catch (error) {
7618
7756
  throw new Error(
7619
- `Failed to parse Cursor MCP config at ${(0, import_node_path54.join)(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
7757
+ `Failed to parse Cursor MCP config at ${(0, import_node_path55.join)(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
7620
7758
  { cause: error }
7621
7759
  );
7622
7760
  }
@@ -7638,7 +7776,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7638
7776
  }) {
7639
7777
  const paths = this.getSettablePaths({ global });
7640
7778
  const fileContent = await readOrInitializeFileContent(
7641
- (0, import_node_path54.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7779
+ (0, import_node_path55.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7642
7780
  JSON.stringify({ mcpServers: {} }, null, 2)
7643
7781
  );
7644
7782
  let json;
@@ -7646,7 +7784,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7646
7784
  json = JSON.parse(fileContent);
7647
7785
  } catch (error) {
7648
7786
  throw new Error(
7649
- `Failed to parse Cursor MCP config at ${(0, import_node_path54.join)(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
7787
+ `Failed to parse Cursor MCP config at ${(0, import_node_path55.join)(paths.relativeDirPath, paths.relativeFilePath)}: ${formatError(error)}`,
7650
7788
  { cause: error }
7651
7789
  );
7652
7790
  }
@@ -7695,7 +7833,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
7695
7833
  };
7696
7834
 
7697
7835
  // src/features/mcp/deepagents-mcp.ts
7698
- var import_node_path55 = require("path");
7836
+ var import_node_path56 = require("path");
7699
7837
  var DeepagentsMcp = class _DeepagentsMcp extends ToolMcp {
7700
7838
  json;
7701
7839
  constructor(params) {
@@ -7720,7 +7858,7 @@ var DeepagentsMcp = class _DeepagentsMcp extends ToolMcp {
7720
7858
  global = false
7721
7859
  }) {
7722
7860
  const paths = this.getSettablePaths({ global });
7723
- const fileContent = await readFileContentOrNull((0, import_node_path55.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7861
+ const fileContent = await readFileContentOrNull((0, import_node_path56.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7724
7862
  const json = JSON.parse(fileContent);
7725
7863
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
7726
7864
  return new _DeepagentsMcp({
@@ -7739,7 +7877,7 @@ var DeepagentsMcp = class _DeepagentsMcp extends ToolMcp {
7739
7877
  }) {
7740
7878
  const paths = this.getSettablePaths({ global });
7741
7879
  const fileContent = await readOrInitializeFileContent(
7742
- (0, import_node_path55.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7880
+ (0, import_node_path56.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7743
7881
  JSON.stringify({ mcpServers: {} }, null, 2)
7744
7882
  );
7745
7883
  const json = JSON.parse(fileContent);
@@ -7778,7 +7916,7 @@ var DeepagentsMcp = class _DeepagentsMcp extends ToolMcp {
7778
7916
  };
7779
7917
 
7780
7918
  // src/features/mcp/factorydroid-mcp.ts
7781
- var import_node_path56 = require("path");
7919
+ var import_node_path57 = require("path");
7782
7920
  var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
7783
7921
  json;
7784
7922
  constructor(params) {
@@ -7799,7 +7937,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
7799
7937
  validate = true
7800
7938
  }) {
7801
7939
  const fileContent = await readFileContent(
7802
- (0, import_node_path56.join)(
7940
+ (0, import_node_path57.join)(
7803
7941
  baseDir,
7804
7942
  this.getSettablePaths().relativeDirPath,
7805
7943
  this.getSettablePaths().relativeFilePath
@@ -7853,7 +7991,7 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
7853
7991
  };
7854
7992
 
7855
7993
  // src/features/mcp/geminicli-mcp.ts
7856
- var import_node_path57 = require("path");
7994
+ var import_node_path58 = require("path");
7857
7995
  var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
7858
7996
  json;
7859
7997
  constructor(params) {
@@ -7881,7 +8019,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
7881
8019
  global = false
7882
8020
  }) {
7883
8021
  const paths = this.getSettablePaths({ global });
7884
- const fileContent = await readFileContentOrNull((0, import_node_path57.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
8022
+ const fileContent = await readFileContentOrNull((0, import_node_path58.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
7885
8023
  const json = JSON.parse(fileContent);
7886
8024
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
7887
8025
  return new _GeminiCliMcp({
@@ -7900,7 +8038,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
7900
8038
  }) {
7901
8039
  const paths = this.getSettablePaths({ global });
7902
8040
  const fileContent = await readOrInitializeFileContent(
7903
- (0, import_node_path57.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
8041
+ (0, import_node_path58.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
7904
8042
  JSON.stringify({ mcpServers: {} }, null, 2)
7905
8043
  );
7906
8044
  const json = JSON.parse(fileContent);
@@ -7945,7 +8083,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
7945
8083
  };
7946
8084
 
7947
8085
  // src/features/mcp/junie-mcp.ts
7948
- var import_node_path58 = require("path");
8086
+ var import_node_path59 = require("path");
7949
8087
  var JunieMcp = class _JunieMcp extends ToolMcp {
7950
8088
  json;
7951
8089
  constructor(params) {
@@ -7957,7 +8095,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
7957
8095
  }
7958
8096
  static getSettablePaths() {
7959
8097
  return {
7960
- relativeDirPath: (0, import_node_path58.join)(".junie", "mcp"),
8098
+ relativeDirPath: (0, import_node_path59.join)(".junie", "mcp"),
7961
8099
  relativeFilePath: "mcp.json"
7962
8100
  };
7963
8101
  }
@@ -7966,7 +8104,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
7966
8104
  validate = true
7967
8105
  }) {
7968
8106
  const fileContent = await readFileContent(
7969
- (0, import_node_path58.join)(
8107
+ (0, import_node_path59.join)(
7970
8108
  baseDir,
7971
8109
  this.getSettablePaths().relativeDirPath,
7972
8110
  this.getSettablePaths().relativeFilePath
@@ -8015,7 +8153,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
8015
8153
  };
8016
8154
 
8017
8155
  // src/features/mcp/kilo-mcp.ts
8018
- var import_node_path59 = require("path");
8156
+ var import_node_path60 = require("path");
8019
8157
  var import_jsonc_parser3 = require("jsonc-parser");
8020
8158
  var import_mini24 = require("zod/mini");
8021
8159
  var KiloMcpLocalServerSchema = import_mini24.z.object({
@@ -8153,7 +8291,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
8153
8291
  static getSettablePaths({ global } = {}) {
8154
8292
  if (global) {
8155
8293
  return {
8156
- relativeDirPath: (0, import_node_path59.join)(".config", "kilo"),
8294
+ relativeDirPath: (0, import_node_path60.join)(".config", "kilo"),
8157
8295
  relativeFilePath: "kilo.json"
8158
8296
  };
8159
8297
  }
@@ -8168,11 +8306,11 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
8168
8306
  global = false
8169
8307
  }) {
8170
8308
  const basePaths = this.getSettablePaths({ global });
8171
- const jsonDir = (0, import_node_path59.join)(baseDir, basePaths.relativeDirPath);
8309
+ const jsonDir = (0, import_node_path60.join)(baseDir, basePaths.relativeDirPath);
8172
8310
  let fileContent = null;
8173
8311
  let relativeFilePath = "kilo.jsonc";
8174
- const jsoncPath = (0, import_node_path59.join)(jsonDir, "kilo.jsonc");
8175
- const jsonPath = (0, import_node_path59.join)(jsonDir, "kilo.json");
8312
+ const jsoncPath = (0, import_node_path60.join)(jsonDir, "kilo.jsonc");
8313
+ const jsonPath = (0, import_node_path60.join)(jsonDir, "kilo.json");
8176
8314
  fileContent = await readFileContentOrNull(jsoncPath);
8177
8315
  if (!fileContent) {
8178
8316
  fileContent = await readFileContentOrNull(jsonPath);
@@ -8198,11 +8336,11 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
8198
8336
  global = false
8199
8337
  }) {
8200
8338
  const basePaths = this.getSettablePaths({ global });
8201
- const jsonDir = (0, import_node_path59.join)(baseDir, basePaths.relativeDirPath);
8339
+ const jsonDir = (0, import_node_path60.join)(baseDir, basePaths.relativeDirPath);
8202
8340
  let fileContent = null;
8203
8341
  let relativeFilePath = "kilo.jsonc";
8204
- const jsoncPath = (0, import_node_path59.join)(jsonDir, "kilo.jsonc");
8205
- const jsonPath = (0, import_node_path59.join)(jsonDir, "kilo.json");
8342
+ const jsoncPath = (0, import_node_path60.join)(jsonDir, "kilo.jsonc");
8343
+ const jsonPath = (0, import_node_path60.join)(jsonDir, "kilo.json");
8206
8344
  fileContent = await readFileContentOrNull(jsoncPath);
8207
8345
  if (!fileContent) {
8208
8346
  fileContent = await readFileContentOrNull(jsonPath);
@@ -8261,7 +8399,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
8261
8399
  };
8262
8400
 
8263
8401
  // src/features/mcp/kiro-mcp.ts
8264
- var import_node_path60 = require("path");
8402
+ var import_node_path61 = require("path");
8265
8403
  var KiroMcp = class _KiroMcp extends ToolMcp {
8266
8404
  json;
8267
8405
  constructor(params) {
@@ -8273,7 +8411,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
8273
8411
  }
8274
8412
  static getSettablePaths() {
8275
8413
  return {
8276
- relativeDirPath: (0, import_node_path60.join)(".kiro", "settings"),
8414
+ relativeDirPath: (0, import_node_path61.join)(".kiro", "settings"),
8277
8415
  relativeFilePath: "mcp.json"
8278
8416
  };
8279
8417
  }
@@ -8282,7 +8420,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
8282
8420
  validate = true
8283
8421
  }) {
8284
8422
  const paths = this.getSettablePaths();
8285
- const fileContent = await readFileContentOrNull((0, import_node_path60.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
8423
+ const fileContent = await readFileContentOrNull((0, import_node_path61.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)) ?? '{"mcpServers":{}}';
8286
8424
  return new _KiroMcp({
8287
8425
  baseDir,
8288
8426
  relativeDirPath: paths.relativeDirPath,
@@ -8330,7 +8468,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
8330
8468
  };
8331
8469
 
8332
8470
  // src/features/mcp/opencode-mcp.ts
8333
- var import_node_path61 = require("path");
8471
+ var import_node_path62 = require("path");
8334
8472
  var import_jsonc_parser4 = require("jsonc-parser");
8335
8473
  var import_mini25 = require("zod/mini");
8336
8474
  var OpencodeMcpLocalServerSchema = import_mini25.z.object({
@@ -8471,7 +8609,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
8471
8609
  static getSettablePaths({ global } = {}) {
8472
8610
  if (global) {
8473
8611
  return {
8474
- relativeDirPath: (0, import_node_path61.join)(".config", "opencode"),
8612
+ relativeDirPath: (0, import_node_path62.join)(".config", "opencode"),
8475
8613
  relativeFilePath: "opencode.json"
8476
8614
  };
8477
8615
  }
@@ -8486,11 +8624,11 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
8486
8624
  global = false
8487
8625
  }) {
8488
8626
  const basePaths = this.getSettablePaths({ global });
8489
- const jsonDir = (0, import_node_path61.join)(baseDir, basePaths.relativeDirPath);
8627
+ const jsonDir = (0, import_node_path62.join)(baseDir, basePaths.relativeDirPath);
8490
8628
  let fileContent = null;
8491
8629
  let relativeFilePath = "opencode.jsonc";
8492
- const jsoncPath = (0, import_node_path61.join)(jsonDir, "opencode.jsonc");
8493
- const jsonPath = (0, import_node_path61.join)(jsonDir, "opencode.json");
8630
+ const jsoncPath = (0, import_node_path62.join)(jsonDir, "opencode.jsonc");
8631
+ const jsonPath = (0, import_node_path62.join)(jsonDir, "opencode.json");
8494
8632
  fileContent = await readFileContentOrNull(jsoncPath);
8495
8633
  if (!fileContent) {
8496
8634
  fileContent = await readFileContentOrNull(jsonPath);
@@ -8516,11 +8654,11 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
8516
8654
  global = false
8517
8655
  }) {
8518
8656
  const basePaths = this.getSettablePaths({ global });
8519
- const jsonDir = (0, import_node_path61.join)(baseDir, basePaths.relativeDirPath);
8657
+ const jsonDir = (0, import_node_path62.join)(baseDir, basePaths.relativeDirPath);
8520
8658
  let fileContent = null;
8521
8659
  let relativeFilePath = "opencode.jsonc";
8522
- const jsoncPath = (0, import_node_path61.join)(jsonDir, "opencode.jsonc");
8523
- const jsonPath = (0, import_node_path61.join)(jsonDir, "opencode.json");
8660
+ const jsoncPath = (0, import_node_path62.join)(jsonDir, "opencode.jsonc");
8661
+ const jsonPath = (0, import_node_path62.join)(jsonDir, "opencode.json");
8524
8662
  fileContent = await readFileContentOrNull(jsoncPath);
8525
8663
  if (!fileContent) {
8526
8664
  fileContent = await readFileContentOrNull(jsonPath);
@@ -8581,7 +8719,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
8581
8719
  };
8582
8720
 
8583
8721
  // src/features/mcp/roo-mcp.ts
8584
- var import_node_path62 = require("path");
8722
+ var import_node_path63 = require("path");
8585
8723
  function convertToRooFormat(mcpServers) {
8586
8724
  return Object.fromEntries(
8587
8725
  Object.entries(mcpServers).map(([serverName, serverConfig]) => {
@@ -8633,7 +8771,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
8633
8771
  validate = true
8634
8772
  }) {
8635
8773
  const fileContent = await readFileContent(
8636
- (0, import_node_path62.join)(
8774
+ (0, import_node_path63.join)(
8637
8775
  baseDir,
8638
8776
  this.getSettablePaths().relativeDirPath,
8639
8777
  this.getSettablePaths().relativeFilePath
@@ -8688,9 +8826,9 @@ var RooMcp = class _RooMcp extends ToolMcp {
8688
8826
  };
8689
8827
 
8690
8828
  // src/features/mcp/rovodev-mcp.ts
8691
- var import_node_path63 = require("path");
8829
+ var import_node_path64 = require("path");
8692
8830
  function parseRovodevMcpJson(fileContent, relativeDirPath, relativeFilePath) {
8693
- const configPath = (0, import_node_path63.join)(relativeDirPath, relativeFilePath);
8831
+ const configPath = (0, import_node_path64.join)(relativeDirPath, relativeFilePath);
8694
8832
  let parsed;
8695
8833
  try {
8696
8834
  parsed = JSON.parse(fileContent);
@@ -8739,7 +8877,7 @@ var RovodevMcp = class _RovodevMcp extends ToolMcp {
8739
8877
  throw new Error("Rovodev MCP is global-only; use --global to sync ~/.rovodev/mcp.json");
8740
8878
  }
8741
8879
  const paths = this.getSettablePaths({ global });
8742
- const filePath = (0, import_node_path63.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
8880
+ const filePath = (0, import_node_path64.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
8743
8881
  const fileContent = await readFileContentOrNull(filePath) ?? '{"mcpServers":{}}';
8744
8882
  const json = parseRovodevMcpJson(fileContent, paths.relativeDirPath, paths.relativeFilePath);
8745
8883
  const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
@@ -8763,7 +8901,7 @@ var RovodevMcp = class _RovodevMcp extends ToolMcp {
8763
8901
  }
8764
8902
  const paths = this.getSettablePaths({ global });
8765
8903
  const fileContent = await readOrInitializeFileContent(
8766
- (0, import_node_path63.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
8904
+ (0, import_node_path64.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
8767
8905
  JSON.stringify({ mcpServers: {} }, null, 2)
8768
8906
  );
8769
8907
  const json = parseRovodevMcpJson(fileContent, paths.relativeDirPath, paths.relativeFilePath);
@@ -9166,11 +9304,11 @@ var McpProcessor = class extends FeatureProcessor {
9166
9304
  var import_mini31 = require("zod/mini");
9167
9305
 
9168
9306
  // src/features/permissions/claudecode-permissions.ts
9169
- var import_node_path65 = require("path");
9307
+ var import_node_path66 = require("path");
9170
9308
  var import_es_toolkit4 = require("es-toolkit");
9171
9309
 
9172
9310
  // src/features/permissions/rulesync-permissions.ts
9173
- var import_node_path64 = require("path");
9311
+ var import_node_path65 = require("path");
9174
9312
 
9175
9313
  // src/types/permissions.ts
9176
9314
  var import_mini27 = require("zod/mini");
@@ -9215,7 +9353,7 @@ var RulesyncPermissions = class _RulesyncPermissions extends RulesyncFile {
9215
9353
  validate = true
9216
9354
  }) {
9217
9355
  const paths = _RulesyncPermissions.getSettablePaths();
9218
- const filePath = (0, import_node_path64.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9356
+ const filePath = (0, import_node_path65.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9219
9357
  if (!await fileExists(filePath)) {
9220
9358
  throw new Error(`No ${RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH} found.`);
9221
9359
  }
@@ -9323,7 +9461,7 @@ var ClaudecodePermissions = class _ClaudecodePermissions extends ToolPermissions
9323
9461
  validate = true
9324
9462
  }) {
9325
9463
  const paths = _ClaudecodePermissions.getSettablePaths();
9326
- const filePath = (0, import_node_path65.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9464
+ const filePath = (0, import_node_path66.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9327
9465
  const fileContent = await readFileContentOrNull(filePath) ?? '{"permissions":{}}';
9328
9466
  return new _ClaudecodePermissions({
9329
9467
  baseDir,
@@ -9339,7 +9477,7 @@ var ClaudecodePermissions = class _ClaudecodePermissions extends ToolPermissions
9339
9477
  logger
9340
9478
  }) {
9341
9479
  const paths = _ClaudecodePermissions.getSettablePaths();
9342
- const filePath = (0, import_node_path65.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9480
+ const filePath = (0, import_node_path66.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9343
9481
  const existingContent = await readOrInitializeFileContent(
9344
9482
  filePath,
9345
9483
  JSON.stringify({}, null, 2)
@@ -9416,7 +9554,7 @@ var ClaudecodePermissions = class _ClaudecodePermissions extends ToolPermissions
9416
9554
  settings = JSON.parse(this.getFileContent());
9417
9555
  } catch (error) {
9418
9556
  throw new Error(
9419
- `Failed to parse Claude permissions content in ${(0, import_node_path65.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
9557
+ `Failed to parse Claude permissions content in ${(0, import_node_path66.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
9420
9558
  { cause: error }
9421
9559
  );
9422
9560
  }
@@ -9489,7 +9627,7 @@ function convertClaudeToRulesyncPermissions(params) {
9489
9627
  }
9490
9628
 
9491
9629
  // src/features/permissions/codexcli-permissions.ts
9492
- var import_node_path66 = require("path");
9630
+ var import_node_path67 = require("path");
9493
9631
  var smolToml4 = __toESM(require("smol-toml"), 1);
9494
9632
  var RULESYNC_PROFILE_NAME = "rulesync";
9495
9633
  var RULESYNC_BASH_RULES_FILE_NAME = "rulesync.rules";
@@ -9509,7 +9647,7 @@ var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
9509
9647
  global = false
9510
9648
  }) {
9511
9649
  const paths = this.getSettablePaths({ global });
9512
- const filePath = (0, import_node_path66.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9650
+ const filePath = (0, import_node_path67.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9513
9651
  const fileContent = await readFileContentOrNull(filePath) ?? smolToml4.stringify({});
9514
9652
  return new _CodexcliPermissions({
9515
9653
  baseDir,
@@ -9527,7 +9665,7 @@ var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
9527
9665
  global = false
9528
9666
  }) {
9529
9667
  const paths = this.getSettablePaths({ global });
9530
- const filePath = (0, import_node_path66.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9668
+ const filePath = (0, import_node_path67.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9531
9669
  const existingContent = await readFileContentOrNull(filePath) ?? smolToml4.stringify({});
9532
9670
  const parsed = toMutableTable(smolToml4.parse(existingContent));
9533
9671
  const profile = convertRulesyncToCodexProfile({
@@ -9552,7 +9690,7 @@ var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
9552
9690
  parsed = smolToml4.parse(this.getFileContent());
9553
9691
  } catch (error) {
9554
9692
  throw new Error(
9555
- `Failed to parse Codex CLI permissions content in ${(0, import_node_path66.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
9693
+ `Failed to parse Codex CLI permissions content in ${(0, import_node_path67.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
9556
9694
  { cause: error }
9557
9695
  );
9558
9696
  }
@@ -9593,7 +9731,7 @@ function createCodexcliBashRulesFile({
9593
9731
  }) {
9594
9732
  return new CodexcliRulesFile({
9595
9733
  baseDir,
9596
- relativeDirPath: (0, import_node_path66.join)(".codex", "rules"),
9734
+ relativeDirPath: (0, import_node_path67.join)(".codex", "rules"),
9597
9735
  relativeFilePath: RULESYNC_BASH_RULES_FILE_NAME,
9598
9736
  fileContent: buildCodexBashRulesContent(config)
9599
9737
  });
@@ -9748,7 +9886,7 @@ function mapBashActionToDecision(action) {
9748
9886
  }
9749
9887
 
9750
9888
  // src/features/permissions/geminicli-permissions.ts
9751
- var import_node_path67 = require("path");
9889
+ var import_node_path68 = require("path");
9752
9890
  var smolToml5 = __toESM(require("smol-toml"), 1);
9753
9891
  var import_mini28 = require("zod/mini");
9754
9892
 
@@ -9819,7 +9957,7 @@ var ConsoleLogger = class extends BaseLogger {
9819
9957
  };
9820
9958
 
9821
9959
  // src/features/permissions/geminicli-permissions.ts
9822
- var GEMINICLI_POLICY_RELATIVE_DIR_PATH = (0, import_node_path67.join)(".gemini", "policies");
9960
+ var GEMINICLI_POLICY_RELATIVE_DIR_PATH = (0, import_node_path68.join)(".gemini", "policies");
9823
9961
  var GEMINICLI_POLICY_FILE_NAME = "rulesync.toml";
9824
9962
  var RULESYNC_TO_GEMINICLI_TOOL_NAME = {
9825
9963
  bash: "run_shell_command",
@@ -9860,7 +9998,7 @@ var GeminicliPermissions = class _GeminicliPermissions extends ToolPermissions {
9860
9998
  global = false
9861
9999
  }) {
9862
10000
  const paths = this.getSettablePaths({ global });
9863
- const filePath = (0, import_node_path67.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
10001
+ const filePath = (0, import_node_path68.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
9864
10002
  const fileContent = await readFileContentOrNull(filePath) ?? "";
9865
10003
  return new _GeminicliPermissions({
9866
10004
  baseDir,
@@ -9896,7 +10034,7 @@ var GeminicliPermissions = class _GeminicliPermissions extends ToolPermissions {
9896
10034
  parsed = smolToml5.parse(fileContent);
9897
10035
  } catch (error) {
9898
10036
  throw new Error(
9899
- `Failed to parse Gemini CLI policy TOML in ${(0, import_node_path67.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
10037
+ `Failed to parse Gemini CLI policy TOML in ${(0, import_node_path68.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
9900
10038
  { cause: error }
9901
10039
  );
9902
10040
  }
@@ -10188,7 +10326,7 @@ function extractPattern(rule) {
10188
10326
  }
10189
10327
 
10190
10328
  // src/features/permissions/kiro-permissions.ts
10191
- var import_node_path68 = require("path");
10329
+ var import_node_path69 = require("path");
10192
10330
  var import_mini29 = require("zod/mini");
10193
10331
  var KiroAgentSchema = import_mini29.z.looseObject({
10194
10332
  allowedTools: import_mini29.z.optional(import_mini29.z.array(import_mini29.z.string())),
@@ -10198,7 +10336,7 @@ var UnknownRecordSchema = import_mini29.z.record(import_mini29.z.string(), impor
10198
10336
  var KiroPermissions = class _KiroPermissions extends ToolPermissions {
10199
10337
  static getSettablePaths(_options = {}) {
10200
10338
  return {
10201
- relativeDirPath: (0, import_node_path68.join)(".kiro", "agents"),
10339
+ relativeDirPath: (0, import_node_path69.join)(".kiro", "agents"),
10202
10340
  relativeFilePath: "default.json"
10203
10341
  };
10204
10342
  }
@@ -10210,7 +10348,7 @@ var KiroPermissions = class _KiroPermissions extends ToolPermissions {
10210
10348
  validate = true
10211
10349
  }) {
10212
10350
  const paths = this.getSettablePaths();
10213
- const filePath = (0, import_node_path68.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
10351
+ const filePath = (0, import_node_path69.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
10214
10352
  const fileContent = await readFileContentOrNull(filePath) ?? JSON.stringify({}, null, 2);
10215
10353
  return new _KiroPermissions({
10216
10354
  baseDir,
@@ -10227,7 +10365,7 @@ var KiroPermissions = class _KiroPermissions extends ToolPermissions {
10227
10365
  logger
10228
10366
  }) {
10229
10367
  const paths = this.getSettablePaths();
10230
- const filePath = (0, import_node_path68.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
10368
+ const filePath = (0, import_node_path69.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
10231
10369
  const existingContent = await readFileContentOrNull(filePath) ?? JSON.stringify({}, null, 2);
10232
10370
  const parsedResult = KiroAgentSchema.safeParse(JSON.parse(existingContent));
10233
10371
  if (!parsedResult.success) {
@@ -10251,7 +10389,7 @@ var KiroPermissions = class _KiroPermissions extends ToolPermissions {
10251
10389
  parsed = KiroAgentSchema.parse(JSON.parse(this.getFileContent()));
10252
10390
  } catch (error) {
10253
10391
  throw new Error(
10254
- `Failed to parse Kiro permissions content in ${(0, import_node_path68.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
10392
+ `Failed to parse Kiro permissions content in ${(0, import_node_path69.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
10255
10393
  { cause: error }
10256
10394
  );
10257
10395
  }
@@ -10376,7 +10514,7 @@ function asStringArray(value) {
10376
10514
  }
10377
10515
 
10378
10516
  // src/features/permissions/opencode-permissions.ts
10379
- var import_node_path69 = require("path");
10517
+ var import_node_path70 = require("path");
10380
10518
  var import_jsonc_parser5 = require("jsonc-parser");
10381
10519
  var import_mini30 = require("zod/mini");
10382
10520
  var OpencodePermissionSchema = import_mini30.z.union([
@@ -10401,7 +10539,7 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
10401
10539
  static getSettablePaths({
10402
10540
  global = false
10403
10541
  } = {}) {
10404
- return global ? { relativeDirPath: (0, import_node_path69.join)(".config", "opencode"), relativeFilePath: "opencode.json" } : { relativeDirPath: ".", relativeFilePath: "opencode.json" };
10542
+ return global ? { relativeDirPath: (0, import_node_path70.join)(".config", "opencode"), relativeFilePath: "opencode.json" } : { relativeDirPath: ".", relativeFilePath: "opencode.json" };
10405
10543
  }
10406
10544
  static async fromFile({
10407
10545
  baseDir = process.cwd(),
@@ -10409,9 +10547,9 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
10409
10547
  global = false
10410
10548
  }) {
10411
10549
  const basePaths = _OpencodePermissions.getSettablePaths({ global });
10412
- const jsonDir = (0, import_node_path69.join)(baseDir, basePaths.relativeDirPath);
10413
- const jsoncPath = (0, import_node_path69.join)(jsonDir, "opencode.jsonc");
10414
- const jsonPath = (0, import_node_path69.join)(jsonDir, "opencode.json");
10550
+ const jsonDir = (0, import_node_path70.join)(baseDir, basePaths.relativeDirPath);
10551
+ const jsoncPath = (0, import_node_path70.join)(jsonDir, "opencode.jsonc");
10552
+ const jsonPath = (0, import_node_path70.join)(jsonDir, "opencode.json");
10415
10553
  let fileContent = await readFileContentOrNull(jsoncPath);
10416
10554
  let relativeFilePath = "opencode.jsonc";
10417
10555
  if (!fileContent) {
@@ -10436,9 +10574,9 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
10436
10574
  global = false
10437
10575
  }) {
10438
10576
  const basePaths = _OpencodePermissions.getSettablePaths({ global });
10439
- const jsonDir = (0, import_node_path69.join)(baseDir, basePaths.relativeDirPath);
10440
- const jsoncPath = (0, import_node_path69.join)(jsonDir, "opencode.jsonc");
10441
- const jsonPath = (0, import_node_path69.join)(jsonDir, "opencode.json");
10577
+ const jsonDir = (0, import_node_path70.join)(baseDir, basePaths.relativeDirPath);
10578
+ const jsoncPath = (0, import_node_path70.join)(jsonDir, "opencode.jsonc");
10579
+ const jsonPath = (0, import_node_path70.join)(jsonDir, "opencode.json");
10442
10580
  let fileContent = await readFileContentOrNull(jsoncPath);
10443
10581
  let relativeFilePath = "opencode.jsonc";
10444
10582
  if (!fileContent) {
@@ -10678,7 +10816,7 @@ var PermissionsProcessor = class extends FeatureProcessor {
10678
10816
  };
10679
10817
 
10680
10818
  // src/features/rules/rules-processor.ts
10681
- var import_node_path140 = require("path");
10819
+ var import_node_path144 = require("path");
10682
10820
  var import_toon = require("@toon-format/toon");
10683
10821
  var import_mini71 = require("zod/mini");
10684
10822
 
@@ -10686,17 +10824,17 @@ var import_mini71 = require("zod/mini");
10686
10824
  var SKILL_FILE_NAME = "SKILL.md";
10687
10825
 
10688
10826
  // src/features/skills/agentsmd-skill.ts
10689
- var import_node_path73 = require("path");
10827
+ var import_node_path74 = require("path");
10690
10828
 
10691
10829
  // src/features/skills/simulated-skill.ts
10692
- var import_node_path72 = require("path");
10830
+ var import_node_path73 = require("path");
10693
10831
  var import_mini32 = require("zod/mini");
10694
10832
 
10695
10833
  // src/features/skills/tool-skill.ts
10696
- var import_node_path71 = require("path");
10834
+ var import_node_path72 = require("path");
10697
10835
 
10698
10836
  // src/types/ai-dir.ts
10699
- var import_node_path70 = __toESM(require("path"), 1);
10837
+ var import_node_path71 = __toESM(require("path"), 1);
10700
10838
  var AiDir = class {
10701
10839
  /**
10702
10840
  * @example "."
@@ -10730,7 +10868,7 @@ var AiDir = class {
10730
10868
  otherFiles = [],
10731
10869
  global = false
10732
10870
  }) {
10733
- if (dirName.includes(import_node_path70.default.sep) || dirName.includes("/") || dirName.includes("\\")) {
10871
+ if (dirName.includes(import_node_path71.default.sep) || dirName.includes("/") || dirName.includes("\\")) {
10734
10872
  throw new Error(`Directory name cannot contain path separators: dirName="${dirName}"`);
10735
10873
  }
10736
10874
  this.baseDir = baseDir;
@@ -10753,11 +10891,11 @@ var AiDir = class {
10753
10891
  return this.dirName;
10754
10892
  }
10755
10893
  getDirPath() {
10756
- const fullPath = import_node_path70.default.join(this.baseDir, this.relativeDirPath, this.dirName);
10757
- const resolvedFull = (0, import_node_path70.resolve)(fullPath);
10758
- const resolvedBase = (0, import_node_path70.resolve)(this.baseDir);
10759
- const rel = (0, import_node_path70.relative)(resolvedBase, resolvedFull);
10760
- if (rel.startsWith("..") || import_node_path70.default.isAbsolute(rel)) {
10894
+ const fullPath = import_node_path71.default.join(this.baseDir, this.relativeDirPath, this.dirName);
10895
+ const resolvedFull = (0, import_node_path71.resolve)(fullPath);
10896
+ const resolvedBase = (0, import_node_path71.resolve)(this.baseDir);
10897
+ const rel = (0, import_node_path71.relative)(resolvedBase, resolvedFull);
10898
+ if (rel.startsWith("..") || import_node_path71.default.isAbsolute(rel)) {
10761
10899
  throw new Error(
10762
10900
  `Path traversal detected: Final path escapes baseDir. baseDir="${this.baseDir}", relativeDirPath="${this.relativeDirPath}", dirName="${this.dirName}"`
10763
10901
  );
@@ -10774,7 +10912,7 @@ var AiDir = class {
10774
10912
  * Returns the relative path from CWD with POSIX separators for consistent cross-platform output.
10775
10913
  */
10776
10914
  getRelativePathFromCwd() {
10777
- return toPosixPath(import_node_path70.default.join(this.relativeDirPath, this.dirName));
10915
+ return toPosixPath(import_node_path71.default.join(this.relativeDirPath, this.dirName));
10778
10916
  }
10779
10917
  getGlobal() {
10780
10918
  return this.global;
@@ -10793,15 +10931,15 @@ var AiDir = class {
10793
10931
  * @returns Array of files with their relative paths and buffers
10794
10932
  */
10795
10933
  static async collectOtherFiles(baseDir, relativeDirPath, dirName, excludeFileName) {
10796
- const dirPath = (0, import_node_path70.join)(baseDir, relativeDirPath, dirName);
10797
- const glob = (0, import_node_path70.join)(dirPath, "**", "*");
10934
+ const dirPath = (0, import_node_path71.join)(baseDir, relativeDirPath, dirName);
10935
+ const glob = (0, import_node_path71.join)(dirPath, "**", "*");
10798
10936
  const filePaths = await findFilesByGlobs(glob, { type: "file" });
10799
- const filteredPaths = filePaths.filter((filePath) => (0, import_node_path70.basename)(filePath) !== excludeFileName);
10937
+ const filteredPaths = filePaths.filter((filePath) => (0, import_node_path71.basename)(filePath) !== excludeFileName);
10800
10938
  const files = await Promise.all(
10801
10939
  filteredPaths.map(async (filePath) => {
10802
10940
  const fileBuffer = await readFileBuffer(filePath);
10803
10941
  return {
10804
- relativeFilePathToDirPath: (0, import_node_path70.relative)(dirPath, filePath),
10942
+ relativeFilePathToDirPath: (0, import_node_path71.relative)(dirPath, filePath),
10805
10943
  fileBuffer
10806
10944
  };
10807
10945
  })
@@ -10895,8 +11033,8 @@ var ToolSkill = class extends AiDir {
10895
11033
  }) {
10896
11034
  const settablePaths = getSettablePaths({ global });
10897
11035
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
10898
- const skillDirPath = (0, import_node_path71.join)(baseDir, actualRelativeDirPath, dirName);
10899
- const skillFilePath = (0, import_node_path71.join)(skillDirPath, SKILL_FILE_NAME);
11036
+ const skillDirPath = (0, import_node_path72.join)(baseDir, actualRelativeDirPath, dirName);
11037
+ const skillFilePath = (0, import_node_path72.join)(skillDirPath, SKILL_FILE_NAME);
10900
11038
  if (!await fileExists(skillFilePath)) {
10901
11039
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
10902
11040
  }
@@ -10920,7 +11058,7 @@ var ToolSkill = class extends AiDir {
10920
11058
  }
10921
11059
  requireMainFileFrontmatter() {
10922
11060
  if (!this.mainFile?.frontmatter) {
10923
- throw new Error(`Frontmatter is not defined in ${(0, import_node_path71.join)(this.relativeDirPath, this.dirName)}`);
11061
+ throw new Error(`Frontmatter is not defined in ${(0, import_node_path72.join)(this.relativeDirPath, this.dirName)}`);
10924
11062
  }
10925
11063
  return this.mainFile.frontmatter;
10926
11064
  }
@@ -10960,7 +11098,7 @@ var SimulatedSkill = class extends ToolSkill {
10960
11098
  const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
10961
11099
  if (!result.success) {
10962
11100
  throw new Error(
10963
- `Invalid frontmatter in ${(0, import_node_path72.join)(relativeDirPath, dirName)}: ${formatError(result.error)}`
11101
+ `Invalid frontmatter in ${(0, import_node_path73.join)(relativeDirPath, dirName)}: ${formatError(result.error)}`
10964
11102
  );
10965
11103
  }
10966
11104
  }
@@ -11019,8 +11157,8 @@ var SimulatedSkill = class extends ToolSkill {
11019
11157
  }) {
11020
11158
  const settablePaths = this.getSettablePaths();
11021
11159
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
11022
- const skillDirPath = (0, import_node_path72.join)(baseDir, actualRelativeDirPath, dirName);
11023
- const skillFilePath = (0, import_node_path72.join)(skillDirPath, SKILL_FILE_NAME);
11160
+ const skillDirPath = (0, import_node_path73.join)(baseDir, actualRelativeDirPath, dirName);
11161
+ const skillFilePath = (0, import_node_path73.join)(skillDirPath, SKILL_FILE_NAME);
11024
11162
  if (!await fileExists(skillFilePath)) {
11025
11163
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
11026
11164
  }
@@ -11097,7 +11235,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
11097
11235
  throw new Error("AgentsmdSkill does not support global mode.");
11098
11236
  }
11099
11237
  return {
11100
- relativeDirPath: (0, import_node_path73.join)(".agents", "skills")
11238
+ relativeDirPath: (0, import_node_path74.join)(".agents", "skills")
11101
11239
  };
11102
11240
  }
11103
11241
  static async fromDir(params) {
@@ -11124,11 +11262,11 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
11124
11262
  };
11125
11263
 
11126
11264
  // src/features/skills/factorydroid-skill.ts
11127
- var import_node_path74 = require("path");
11265
+ var import_node_path75 = require("path");
11128
11266
  var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
11129
11267
  static getSettablePaths(_options) {
11130
11268
  return {
11131
- relativeDirPath: (0, import_node_path74.join)(".factory", "skills")
11269
+ relativeDirPath: (0, import_node_path75.join)(".factory", "skills")
11132
11270
  };
11133
11271
  }
11134
11272
  static async fromDir(params) {
@@ -11155,11 +11293,11 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
11155
11293
  };
11156
11294
 
11157
11295
  // src/features/skills/rovodev-skill.ts
11158
- var import_node_path76 = require("path");
11296
+ var import_node_path77 = require("path");
11159
11297
  var import_mini34 = require("zod/mini");
11160
11298
 
11161
11299
  // src/features/skills/rulesync-skill.ts
11162
- var import_node_path75 = require("path");
11300
+ var import_node_path76 = require("path");
11163
11301
  var import_mini33 = require("zod/mini");
11164
11302
  var RulesyncSkillFrontmatterSchemaInternal = import_mini33.z.looseObject({
11165
11303
  name: import_mini33.z.string(),
@@ -11198,7 +11336,13 @@ var RulesyncSkillFrontmatterSchemaInternal = import_mini33.z.looseObject({
11198
11336
  })
11199
11337
  ),
11200
11338
  cline: import_mini33.z.optional(import_mini33.z.looseObject({})),
11201
- roo: import_mini33.z.optional(import_mini33.z.looseObject({}))
11339
+ roo: import_mini33.z.optional(import_mini33.z.looseObject({})),
11340
+ takt: import_mini33.z.optional(
11341
+ import_mini33.z.looseObject({
11342
+ // Rename the emitted file stem (e.g. "test-skill.md" → "{name}.md").
11343
+ name: import_mini33.z.optional(import_mini33.z.string())
11344
+ })
11345
+ )
11202
11346
  });
11203
11347
  var RulesyncSkillFrontmatterSchema = RulesyncSkillFrontmatterSchemaInternal;
11204
11348
  var RulesyncSkill = class _RulesyncSkill extends AiDir {
@@ -11238,7 +11382,7 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
11238
11382
  }
11239
11383
  getFrontmatter() {
11240
11384
  if (!this.mainFile?.frontmatter) {
11241
- throw new Error(`Frontmatter is not defined in ${(0, import_node_path75.join)(this.relativeDirPath, this.dirName)}`);
11385
+ throw new Error(`Frontmatter is not defined in ${(0, import_node_path76.join)(this.relativeDirPath, this.dirName)}`);
11242
11386
  }
11243
11387
  const result = RulesyncSkillFrontmatterSchema.parse(this.mainFile.frontmatter);
11244
11388
  return result;
@@ -11264,8 +11408,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
11264
11408
  dirName,
11265
11409
  global = false
11266
11410
  }) {
11267
- const skillDirPath = (0, import_node_path75.join)(baseDir, relativeDirPath, dirName);
11268
- const skillFilePath = (0, import_node_path75.join)(skillDirPath, SKILL_FILE_NAME);
11411
+ const skillDirPath = (0, import_node_path76.join)(baseDir, relativeDirPath, dirName);
11412
+ const skillFilePath = (0, import_node_path76.join)(skillDirPath, SKILL_FILE_NAME);
11269
11413
  if (!await fileExists(skillFilePath)) {
11270
11414
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
11271
11415
  }
@@ -11302,7 +11446,7 @@ var RovodevSkillFrontmatterSchema = import_mini34.z.looseObject({
11302
11446
  var RovodevSkill = class _RovodevSkill extends ToolSkill {
11303
11447
  constructor({
11304
11448
  baseDir = process.cwd(),
11305
- relativeDirPath = (0, import_node_path76.join)(".rovodev", "skills"),
11449
+ relativeDirPath = (0, import_node_path77.join)(".rovodev", "skills"),
11306
11450
  dirName,
11307
11451
  frontmatter,
11308
11452
  body,
@@ -11331,8 +11475,8 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
11331
11475
  }
11332
11476
  static getSettablePaths(_options) {
11333
11477
  return {
11334
- relativeDirPath: (0, import_node_path76.join)(".rovodev", "skills"),
11335
- alternativeSkillRoots: [(0, import_node_path76.join)(".agents", "skills")]
11478
+ relativeDirPath: (0, import_node_path77.join)(".rovodev", "skills"),
11479
+ alternativeSkillRoots: [(0, import_node_path77.join)(".agents", "skills")]
11336
11480
  };
11337
11481
  }
11338
11482
  getFrontmatter() {
@@ -11420,13 +11564,13 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
11420
11564
  });
11421
11565
  const result = RovodevSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11422
11566
  if (!result.success) {
11423
- const skillDirPath = (0, import_node_path76.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11567
+ const skillDirPath = (0, import_node_path77.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11424
11568
  throw new Error(
11425
- `Invalid frontmatter in ${(0, import_node_path76.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11569
+ `Invalid frontmatter in ${(0, import_node_path77.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11426
11570
  );
11427
11571
  }
11428
11572
  if (result.data.name !== loaded.dirName) {
11429
- const skillFilePath = (0, import_node_path76.join)(
11573
+ const skillFilePath = (0, import_node_path77.join)(
11430
11574
  loaded.baseDir,
11431
11575
  loaded.relativeDirPath,
11432
11576
  loaded.dirName,
@@ -11468,11 +11612,11 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
11468
11612
  };
11469
11613
 
11470
11614
  // src/features/skills/skills-processor.ts
11471
- var import_node_path95 = require("path");
11615
+ var import_node_path97 = require("path");
11472
11616
  var import_mini51 = require("zod/mini");
11473
11617
 
11474
11618
  // src/types/dir-feature-processor.ts
11475
- var import_node_path77 = require("path");
11619
+ var import_node_path78 = require("path");
11476
11620
  var DirFeatureProcessor = class {
11477
11621
  baseDir;
11478
11622
  dryRun;
@@ -11512,7 +11656,7 @@ var DirFeatureProcessor = class {
11512
11656
  const mainFile = aiDir.getMainFile();
11513
11657
  let mainFileContent;
11514
11658
  if (mainFile) {
11515
- const mainFilePath = (0, import_node_path77.join)(dirPath, mainFile.name);
11659
+ const mainFilePath = (0, import_node_path78.join)(dirPath, mainFile.name);
11516
11660
  const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter, {
11517
11661
  avoidBlockScalars: this.avoidBlockScalars
11518
11662
  });
@@ -11532,7 +11676,7 @@ var DirFeatureProcessor = class {
11532
11676
  const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
11533
11677
  otherFileContents.push(contentWithNewline);
11534
11678
  if (!dirHasChanges) {
11535
- const filePath = (0, import_node_path77.join)(dirPath, file.relativeFilePathToDirPath);
11679
+ const filePath = (0, import_node_path78.join)(dirPath, file.relativeFilePathToDirPath);
11536
11680
  const existingContent = await readFileContentOrNull(filePath);
11537
11681
  if (!fileContentsEquivalent({
11538
11682
  filePath,
@@ -11550,24 +11694,24 @@ var DirFeatureProcessor = class {
11550
11694
  if (this.dryRun) {
11551
11695
  this.logger.info(`[DRY RUN] Would create directory: ${dirPath}`);
11552
11696
  if (mainFile) {
11553
- this.logger.info(`[DRY RUN] Would write: ${(0, import_node_path77.join)(dirPath, mainFile.name)}`);
11554
- changedPaths.push((0, import_node_path77.join)(relativeDir, mainFile.name));
11697
+ this.logger.info(`[DRY RUN] Would write: ${(0, import_node_path78.join)(dirPath, mainFile.name)}`);
11698
+ changedPaths.push((0, import_node_path78.join)(relativeDir, mainFile.name));
11555
11699
  }
11556
11700
  for (const file of otherFiles) {
11557
11701
  this.logger.info(
11558
- `[DRY RUN] Would write: ${(0, import_node_path77.join)(dirPath, file.relativeFilePathToDirPath)}`
11702
+ `[DRY RUN] Would write: ${(0, import_node_path78.join)(dirPath, file.relativeFilePathToDirPath)}`
11559
11703
  );
11560
- changedPaths.push((0, import_node_path77.join)(relativeDir, file.relativeFilePathToDirPath));
11704
+ changedPaths.push((0, import_node_path78.join)(relativeDir, file.relativeFilePathToDirPath));
11561
11705
  }
11562
11706
  } else {
11563
11707
  await ensureDir(dirPath);
11564
11708
  if (mainFile && mainFileContent) {
11565
- const mainFilePath = (0, import_node_path77.join)(dirPath, mainFile.name);
11709
+ const mainFilePath = (0, import_node_path78.join)(dirPath, mainFile.name);
11566
11710
  await writeFileContent(mainFilePath, mainFileContent);
11567
- changedPaths.push((0, import_node_path77.join)(relativeDir, mainFile.name));
11711
+ changedPaths.push((0, import_node_path78.join)(relativeDir, mainFile.name));
11568
11712
  }
11569
11713
  for (const [i, file] of otherFiles.entries()) {
11570
- const filePath = (0, import_node_path77.join)(dirPath, file.relativeFilePathToDirPath);
11714
+ const filePath = (0, import_node_path78.join)(dirPath, file.relativeFilePathToDirPath);
11571
11715
  const content = otherFileContents[i];
11572
11716
  if (content === void 0) {
11573
11717
  throw new Error(
@@ -11575,7 +11719,7 @@ var DirFeatureProcessor = class {
11575
11719
  );
11576
11720
  }
11577
11721
  await writeFileContent(filePath, content);
11578
- changedPaths.push((0, import_node_path77.join)(relativeDir, file.relativeFilePathToDirPath));
11722
+ changedPaths.push((0, import_node_path78.join)(relativeDir, file.relativeFilePathToDirPath));
11579
11723
  }
11580
11724
  }
11581
11725
  changedCount++;
@@ -11607,7 +11751,7 @@ var DirFeatureProcessor = class {
11607
11751
  };
11608
11752
 
11609
11753
  // src/features/skills/agentsskills-skill.ts
11610
- var import_node_path78 = require("path");
11754
+ var import_node_path79 = require("path");
11611
11755
  var import_mini35 = require("zod/mini");
11612
11756
  var AgentsSkillsSkillFrontmatterSchema = import_mini35.z.looseObject({
11613
11757
  name: import_mini35.z.string(),
@@ -11616,7 +11760,7 @@ var AgentsSkillsSkillFrontmatterSchema = import_mini35.z.looseObject({
11616
11760
  var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
11617
11761
  constructor({
11618
11762
  baseDir = process.cwd(),
11619
- relativeDirPath = (0, import_node_path78.join)(".agents", "skills"),
11763
+ relativeDirPath = (0, import_node_path79.join)(".agents", "skills"),
11620
11764
  dirName,
11621
11765
  frontmatter,
11622
11766
  body,
@@ -11648,7 +11792,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
11648
11792
  throw new Error("AgentsSkillsSkill does not support global mode.");
11649
11793
  }
11650
11794
  return {
11651
- relativeDirPath: (0, import_node_path78.join)(".agents", "skills")
11795
+ relativeDirPath: (0, import_node_path79.join)(".agents", "skills")
11652
11796
  };
11653
11797
  }
11654
11798
  getFrontmatter() {
@@ -11728,9 +11872,9 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
11728
11872
  });
11729
11873
  const result = AgentsSkillsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
11730
11874
  if (!result.success) {
11731
- const skillDirPath = (0, import_node_path78.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11875
+ const skillDirPath = (0, import_node_path79.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11732
11876
  throw new Error(
11733
- `Invalid frontmatter in ${(0, import_node_path78.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11877
+ `Invalid frontmatter in ${(0, import_node_path79.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11734
11878
  );
11735
11879
  }
11736
11880
  return new _AgentsSkillsSkill({
@@ -11765,7 +11909,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
11765
11909
  };
11766
11910
 
11767
11911
  // src/features/skills/antigravity-skill.ts
11768
- var import_node_path79 = require("path");
11912
+ var import_node_path80 = require("path");
11769
11913
  var import_mini36 = require("zod/mini");
11770
11914
  var AntigravitySkillFrontmatterSchema = import_mini36.z.looseObject({
11771
11915
  name: import_mini36.z.string(),
@@ -11774,7 +11918,7 @@ var AntigravitySkillFrontmatterSchema = import_mini36.z.looseObject({
11774
11918
  var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
11775
11919
  constructor({
11776
11920
  baseDir = process.cwd(),
11777
- relativeDirPath = (0, import_node_path79.join)(".agent", "skills"),
11921
+ relativeDirPath = (0, import_node_path80.join)(".agent", "skills"),
11778
11922
  dirName,
11779
11923
  frontmatter,
11780
11924
  body,
@@ -11806,11 +11950,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
11806
11950
  } = {}) {
11807
11951
  if (global) {
11808
11952
  return {
11809
- relativeDirPath: (0, import_node_path79.join)(".gemini", "antigravity", "skills")
11953
+ relativeDirPath: (0, import_node_path80.join)(".gemini", "antigravity", "skills")
11810
11954
  };
11811
11955
  }
11812
11956
  return {
11813
- relativeDirPath: (0, import_node_path79.join)(".agent", "skills")
11957
+ relativeDirPath: (0, import_node_path80.join)(".agent", "skills")
11814
11958
  };
11815
11959
  }
11816
11960
  getFrontmatter() {
@@ -11890,9 +12034,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
11890
12034
  });
11891
12035
  const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
11892
12036
  if (!result.success) {
11893
- const skillDirPath = (0, import_node_path79.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12037
+ const skillDirPath = (0, import_node_path80.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
11894
12038
  throw new Error(
11895
- `Invalid frontmatter in ${(0, import_node_path79.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12039
+ `Invalid frontmatter in ${(0, import_node_path80.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
11896
12040
  );
11897
12041
  }
11898
12042
  return new _AntigravitySkill({
@@ -11926,7 +12070,7 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
11926
12070
  };
11927
12071
 
11928
12072
  // src/features/skills/claudecode-skill.ts
11929
- var import_node_path80 = require("path");
12073
+ var import_node_path81 = require("path");
11930
12074
  var import_mini37 = require("zod/mini");
11931
12075
  var ClaudecodeSkillFrontmatterSchema = import_mini37.z.looseObject({
11932
12076
  name: import_mini37.z.string(),
@@ -11938,7 +12082,7 @@ var ClaudecodeSkillFrontmatterSchema = import_mini37.z.looseObject({
11938
12082
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
11939
12083
  constructor({
11940
12084
  baseDir = process.cwd(),
11941
- relativeDirPath = (0, import_node_path80.join)(".claude", "skills"),
12085
+ relativeDirPath = (0, import_node_path81.join)(".claude", "skills"),
11942
12086
  dirName,
11943
12087
  frontmatter,
11944
12088
  body,
@@ -11969,7 +12113,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
11969
12113
  global: _global = false
11970
12114
  } = {}) {
11971
12115
  return {
11972
- relativeDirPath: (0, import_node_path80.join)(".claude", "skills")
12116
+ relativeDirPath: (0, import_node_path81.join)(".claude", "skills")
11973
12117
  };
11974
12118
  }
11975
12119
  getFrontmatter() {
@@ -12066,9 +12210,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
12066
12210
  });
12067
12211
  const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12068
12212
  if (!result.success) {
12069
- const skillDirPath = (0, import_node_path80.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12213
+ const skillDirPath = (0, import_node_path81.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12070
12214
  throw new Error(
12071
- `Invalid frontmatter in ${(0, import_node_path80.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12215
+ `Invalid frontmatter in ${(0, import_node_path81.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12072
12216
  );
12073
12217
  }
12074
12218
  return new _ClaudecodeSkill({
@@ -12102,7 +12246,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
12102
12246
  };
12103
12247
 
12104
12248
  // src/features/skills/cline-skill.ts
12105
- var import_node_path81 = require("path");
12249
+ var import_node_path82 = require("path");
12106
12250
  var import_mini38 = require("zod/mini");
12107
12251
  var ClineSkillFrontmatterSchema = import_mini38.z.looseObject({
12108
12252
  name: import_mini38.z.string(),
@@ -12111,7 +12255,7 @@ var ClineSkillFrontmatterSchema = import_mini38.z.looseObject({
12111
12255
  var ClineSkill = class _ClineSkill extends ToolSkill {
12112
12256
  constructor({
12113
12257
  baseDir = process.cwd(),
12114
- relativeDirPath = (0, import_node_path81.join)(".cline", "skills"),
12258
+ relativeDirPath = (0, import_node_path82.join)(".cline", "skills"),
12115
12259
  dirName,
12116
12260
  frontmatter,
12117
12261
  body,
@@ -12140,7 +12284,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
12140
12284
  }
12141
12285
  static getSettablePaths(_options = {}) {
12142
12286
  return {
12143
- relativeDirPath: (0, import_node_path81.join)(".cline", "skills")
12287
+ relativeDirPath: (0, import_node_path82.join)(".cline", "skills")
12144
12288
  };
12145
12289
  }
12146
12290
  getFrontmatter() {
@@ -12228,13 +12372,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
12228
12372
  });
12229
12373
  const result = ClineSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12230
12374
  if (!result.success) {
12231
- const skillDirPath = (0, import_node_path81.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12375
+ const skillDirPath = (0, import_node_path82.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12232
12376
  throw new Error(
12233
- `Invalid frontmatter in ${(0, import_node_path81.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12377
+ `Invalid frontmatter in ${(0, import_node_path82.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12234
12378
  );
12235
12379
  }
12236
12380
  if (result.data.name !== loaded.dirName) {
12237
- const skillFilePath = (0, import_node_path81.join)(
12381
+ const skillFilePath = (0, import_node_path82.join)(
12238
12382
  loaded.baseDir,
12239
12383
  loaded.relativeDirPath,
12240
12384
  loaded.dirName,
@@ -12275,7 +12419,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
12275
12419
  };
12276
12420
 
12277
12421
  // src/features/skills/codexcli-skill.ts
12278
- var import_node_path82 = require("path");
12422
+ var import_node_path83 = require("path");
12279
12423
  var import_mini39 = require("zod/mini");
12280
12424
  var CodexCliSkillFrontmatterSchema = import_mini39.z.looseObject({
12281
12425
  name: import_mini39.z.string(),
@@ -12289,7 +12433,7 @@ var CodexCliSkillFrontmatterSchema = import_mini39.z.looseObject({
12289
12433
  var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
12290
12434
  constructor({
12291
12435
  baseDir = process.cwd(),
12292
- relativeDirPath = (0, import_node_path82.join)(".codex", "skills"),
12436
+ relativeDirPath = (0, import_node_path83.join)(".codex", "skills"),
12293
12437
  dirName,
12294
12438
  frontmatter,
12295
12439
  body,
@@ -12320,7 +12464,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
12320
12464
  global: _global = false
12321
12465
  } = {}) {
12322
12466
  return {
12323
- relativeDirPath: (0, import_node_path82.join)(".codex", "skills")
12467
+ relativeDirPath: (0, import_node_path83.join)(".codex", "skills")
12324
12468
  };
12325
12469
  }
12326
12470
  getFrontmatter() {
@@ -12410,9 +12554,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
12410
12554
  });
12411
12555
  const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12412
12556
  if (!result.success) {
12413
- const skillDirPath = (0, import_node_path82.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12557
+ const skillDirPath = (0, import_node_path83.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12414
12558
  throw new Error(
12415
- `Invalid frontmatter in ${(0, import_node_path82.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12559
+ `Invalid frontmatter in ${(0, import_node_path83.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12416
12560
  );
12417
12561
  }
12418
12562
  return new _CodexCliSkill({
@@ -12446,7 +12590,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
12446
12590
  };
12447
12591
 
12448
12592
  // src/features/skills/copilot-skill.ts
12449
- var import_node_path83 = require("path");
12593
+ var import_node_path84 = require("path");
12450
12594
  var import_mini40 = require("zod/mini");
12451
12595
  var CopilotSkillFrontmatterSchema = import_mini40.z.looseObject({
12452
12596
  name: import_mini40.z.string(),
@@ -12456,7 +12600,7 @@ var CopilotSkillFrontmatterSchema = import_mini40.z.looseObject({
12456
12600
  var CopilotSkill = class _CopilotSkill extends ToolSkill {
12457
12601
  constructor({
12458
12602
  baseDir = process.cwd(),
12459
- relativeDirPath = (0, import_node_path83.join)(".github", "skills"),
12603
+ relativeDirPath = (0, import_node_path84.join)(".github", "skills"),
12460
12604
  dirName,
12461
12605
  frontmatter,
12462
12606
  body,
@@ -12488,7 +12632,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
12488
12632
  throw new Error("CopilotSkill does not support global mode.");
12489
12633
  }
12490
12634
  return {
12491
- relativeDirPath: (0, import_node_path83.join)(".github", "skills")
12635
+ relativeDirPath: (0, import_node_path84.join)(".github", "skills")
12492
12636
  };
12493
12637
  }
12494
12638
  getFrontmatter() {
@@ -12574,9 +12718,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
12574
12718
  });
12575
12719
  const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12576
12720
  if (!result.success) {
12577
- const skillDirPath = (0, import_node_path83.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12721
+ const skillDirPath = (0, import_node_path84.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12578
12722
  throw new Error(
12579
- `Invalid frontmatter in ${(0, import_node_path83.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12723
+ `Invalid frontmatter in ${(0, import_node_path84.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12580
12724
  );
12581
12725
  }
12582
12726
  return new _CopilotSkill({
@@ -12611,7 +12755,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
12611
12755
  };
12612
12756
 
12613
12757
  // src/features/skills/cursor-skill.ts
12614
- var import_node_path84 = require("path");
12758
+ var import_node_path85 = require("path");
12615
12759
  var import_mini41 = require("zod/mini");
12616
12760
  var CursorSkillFrontmatterSchema = import_mini41.z.looseObject({
12617
12761
  name: import_mini41.z.string(),
@@ -12620,7 +12764,7 @@ var CursorSkillFrontmatterSchema = import_mini41.z.looseObject({
12620
12764
  var CursorSkill = class _CursorSkill extends ToolSkill {
12621
12765
  constructor({
12622
12766
  baseDir = process.cwd(),
12623
- relativeDirPath = (0, import_node_path84.join)(".cursor", "skills"),
12767
+ relativeDirPath = (0, import_node_path85.join)(".cursor", "skills"),
12624
12768
  dirName,
12625
12769
  frontmatter,
12626
12770
  body,
@@ -12649,7 +12793,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
12649
12793
  }
12650
12794
  static getSettablePaths(_options) {
12651
12795
  return {
12652
- relativeDirPath: (0, import_node_path84.join)(".cursor", "skills")
12796
+ relativeDirPath: (0, import_node_path85.join)(".cursor", "skills")
12653
12797
  };
12654
12798
  }
12655
12799
  getFrontmatter() {
@@ -12729,9 +12873,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
12729
12873
  });
12730
12874
  const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12731
12875
  if (!result.success) {
12732
- const skillDirPath = (0, import_node_path84.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12876
+ const skillDirPath = (0, import_node_path85.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12733
12877
  throw new Error(
12734
- `Invalid frontmatter in ${(0, import_node_path84.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12878
+ `Invalid frontmatter in ${(0, import_node_path85.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12735
12879
  );
12736
12880
  }
12737
12881
  return new _CursorSkill({
@@ -12766,7 +12910,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
12766
12910
  };
12767
12911
 
12768
12912
  // src/features/skills/deepagents-skill.ts
12769
- var import_node_path85 = require("path");
12913
+ var import_node_path86 = require("path");
12770
12914
  var import_mini42 = require("zod/mini");
12771
12915
  var DeepagentsSkillFrontmatterSchema = import_mini42.z.looseObject({
12772
12916
  name: import_mini42.z.string(),
@@ -12776,7 +12920,7 @@ var DeepagentsSkillFrontmatterSchema = import_mini42.z.looseObject({
12776
12920
  var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
12777
12921
  constructor({
12778
12922
  baseDir = process.cwd(),
12779
- relativeDirPath = (0, import_node_path85.join)(".deepagents", "skills"),
12923
+ relativeDirPath = (0, import_node_path86.join)(".deepagents", "skills"),
12780
12924
  dirName,
12781
12925
  frontmatter,
12782
12926
  body,
@@ -12805,7 +12949,7 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
12805
12949
  }
12806
12950
  static getSettablePaths(_options) {
12807
12951
  return {
12808
- relativeDirPath: (0, import_node_path85.join)(".deepagents", "skills")
12952
+ relativeDirPath: (0, import_node_path86.join)(".deepagents", "skills")
12809
12953
  };
12810
12954
  }
12811
12955
  getFrontmatter() {
@@ -12891,9 +13035,9 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
12891
13035
  });
12892
13036
  const result = DeepagentsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
12893
13037
  if (!result.success) {
12894
- const skillDirPath = (0, import_node_path85.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13038
+ const skillDirPath = (0, import_node_path86.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
12895
13039
  throw new Error(
12896
- `Invalid frontmatter in ${(0, import_node_path85.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13040
+ `Invalid frontmatter in ${(0, import_node_path86.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
12897
13041
  );
12898
13042
  }
12899
13043
  return new _DeepagentsSkill({
@@ -12928,7 +13072,7 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
12928
13072
  };
12929
13073
 
12930
13074
  // src/features/skills/geminicli-skill.ts
12931
- var import_node_path86 = require("path");
13075
+ var import_node_path87 = require("path");
12932
13076
  var import_mini43 = require("zod/mini");
12933
13077
  var GeminiCliSkillFrontmatterSchema = import_mini43.z.looseObject({
12934
13078
  name: import_mini43.z.string(),
@@ -12968,7 +13112,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
12968
13112
  global: _global = false
12969
13113
  } = {}) {
12970
13114
  return {
12971
- relativeDirPath: (0, import_node_path86.join)(".gemini", "skills")
13115
+ relativeDirPath: (0, import_node_path87.join)(".gemini", "skills")
12972
13116
  };
12973
13117
  }
12974
13118
  getFrontmatter() {
@@ -13048,9 +13192,9 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
13048
13192
  });
13049
13193
  const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
13050
13194
  if (!result.success) {
13051
- const skillDirPath = (0, import_node_path86.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13195
+ const skillDirPath = (0, import_node_path87.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13052
13196
  throw new Error(
13053
- `Invalid frontmatter in ${(0, import_node_path86.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13197
+ `Invalid frontmatter in ${(0, import_node_path87.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13054
13198
  );
13055
13199
  }
13056
13200
  return new _GeminiCliSkill({
@@ -13085,7 +13229,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
13085
13229
  };
13086
13230
 
13087
13231
  // src/features/skills/junie-skill.ts
13088
- var import_node_path87 = require("path");
13232
+ var import_node_path88 = require("path");
13089
13233
  var import_mini44 = require("zod/mini");
13090
13234
  var JunieSkillFrontmatterSchema = import_mini44.z.looseObject({
13091
13235
  name: import_mini44.z.string(),
@@ -13094,7 +13238,7 @@ var JunieSkillFrontmatterSchema = import_mini44.z.looseObject({
13094
13238
  var JunieSkill = class _JunieSkill extends ToolSkill {
13095
13239
  constructor({
13096
13240
  baseDir = process.cwd(),
13097
- relativeDirPath = (0, import_node_path87.join)(".junie", "skills"),
13241
+ relativeDirPath = (0, import_node_path88.join)(".junie", "skills"),
13098
13242
  dirName,
13099
13243
  frontmatter,
13100
13244
  body,
@@ -13126,7 +13270,7 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
13126
13270
  throw new Error("JunieSkill does not support global mode.");
13127
13271
  }
13128
13272
  return {
13129
- relativeDirPath: (0, import_node_path87.join)(".junie", "skills")
13273
+ relativeDirPath: (0, import_node_path88.join)(".junie", "skills")
13130
13274
  };
13131
13275
  }
13132
13276
  getFrontmatter() {
@@ -13213,13 +13357,13 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
13213
13357
  });
13214
13358
  const result = JunieSkillFrontmatterSchema.safeParse(loaded.frontmatter);
13215
13359
  if (!result.success) {
13216
- const skillDirPath = (0, import_node_path87.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13360
+ const skillDirPath = (0, import_node_path88.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13217
13361
  throw new Error(
13218
- `Invalid frontmatter in ${(0, import_node_path87.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13362
+ `Invalid frontmatter in ${(0, import_node_path88.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13219
13363
  );
13220
13364
  }
13221
13365
  if (result.data.name !== loaded.dirName) {
13222
- const skillFilePath = (0, import_node_path87.join)(
13366
+ const skillFilePath = (0, import_node_path88.join)(
13223
13367
  loaded.baseDir,
13224
13368
  loaded.relativeDirPath,
13225
13369
  loaded.dirName,
@@ -13261,7 +13405,7 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
13261
13405
  };
13262
13406
 
13263
13407
  // src/features/skills/kilo-skill.ts
13264
- var import_node_path88 = require("path");
13408
+ var import_node_path89 = require("path");
13265
13409
  var import_mini45 = require("zod/mini");
13266
13410
  var KiloSkillFrontmatterSchema = import_mini45.z.looseObject({
13267
13411
  name: import_mini45.z.string(),
@@ -13271,7 +13415,7 @@ var KiloSkillFrontmatterSchema = import_mini45.z.looseObject({
13271
13415
  var KiloSkill = class _KiloSkill extends ToolSkill {
13272
13416
  constructor({
13273
13417
  baseDir = process.cwd(),
13274
- relativeDirPath = (0, import_node_path88.join)(".kilo", "skills"),
13418
+ relativeDirPath = (0, import_node_path89.join)(".kilo", "skills"),
13275
13419
  dirName,
13276
13420
  frontmatter,
13277
13421
  body,
@@ -13300,7 +13444,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
13300
13444
  }
13301
13445
  static getSettablePaths({ global = false } = {}) {
13302
13446
  return {
13303
- relativeDirPath: global ? (0, import_node_path88.join)(".config", "kilo", "skills") : (0, import_node_path88.join)(".kilo", "skills")
13447
+ relativeDirPath: global ? (0, import_node_path89.join)(".config", "kilo", "skills") : (0, import_node_path89.join)(".kilo", "skills")
13304
13448
  };
13305
13449
  }
13306
13450
  getFrontmatter() {
@@ -13386,9 +13530,9 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
13386
13530
  });
13387
13531
  const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
13388
13532
  if (!result.success) {
13389
- const skillDirPath = (0, import_node_path88.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13533
+ const skillDirPath = (0, import_node_path89.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13390
13534
  throw new Error(
13391
- `Invalid frontmatter in ${(0, import_node_path88.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13535
+ `Invalid frontmatter in ${(0, import_node_path89.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13392
13536
  );
13393
13537
  }
13394
13538
  return new _KiloSkill({
@@ -13422,7 +13566,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
13422
13566
  };
13423
13567
 
13424
13568
  // src/features/skills/kiro-skill.ts
13425
- var import_node_path89 = require("path");
13569
+ var import_node_path90 = require("path");
13426
13570
  var import_mini46 = require("zod/mini");
13427
13571
  var KiroSkillFrontmatterSchema = import_mini46.z.looseObject({
13428
13572
  name: import_mini46.z.string(),
@@ -13431,7 +13575,7 @@ var KiroSkillFrontmatterSchema = import_mini46.z.looseObject({
13431
13575
  var KiroSkill = class _KiroSkill extends ToolSkill {
13432
13576
  constructor({
13433
13577
  baseDir = process.cwd(),
13434
- relativeDirPath = (0, import_node_path89.join)(".kiro", "skills"),
13578
+ relativeDirPath = (0, import_node_path90.join)(".kiro", "skills"),
13435
13579
  dirName,
13436
13580
  frontmatter,
13437
13581
  body,
@@ -13463,7 +13607,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
13463
13607
  throw new Error("KiroSkill does not support global mode.");
13464
13608
  }
13465
13609
  return {
13466
- relativeDirPath: (0, import_node_path89.join)(".kiro", "skills")
13610
+ relativeDirPath: (0, import_node_path90.join)(".kiro", "skills")
13467
13611
  };
13468
13612
  }
13469
13613
  getFrontmatter() {
@@ -13551,13 +13695,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
13551
13695
  });
13552
13696
  const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
13553
13697
  if (!result.success) {
13554
- const skillDirPath = (0, import_node_path89.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13698
+ const skillDirPath = (0, import_node_path90.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13555
13699
  throw new Error(
13556
- `Invalid frontmatter in ${(0, import_node_path89.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13700
+ `Invalid frontmatter in ${(0, import_node_path90.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13557
13701
  );
13558
13702
  }
13559
13703
  if (result.data.name !== loaded.dirName) {
13560
- const skillFilePath = (0, import_node_path89.join)(
13704
+ const skillFilePath = (0, import_node_path90.join)(
13561
13705
  loaded.baseDir,
13562
13706
  loaded.relativeDirPath,
13563
13707
  loaded.dirName,
@@ -13599,7 +13743,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
13599
13743
  };
13600
13744
 
13601
13745
  // src/features/skills/opencode-skill.ts
13602
- var import_node_path90 = require("path");
13746
+ var import_node_path91 = require("path");
13603
13747
  var import_mini47 = require("zod/mini");
13604
13748
  var OpenCodeSkillFrontmatterSchema = import_mini47.z.looseObject({
13605
13749
  name: import_mini47.z.string(),
@@ -13609,7 +13753,7 @@ var OpenCodeSkillFrontmatterSchema = import_mini47.z.looseObject({
13609
13753
  var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
13610
13754
  constructor({
13611
13755
  baseDir = process.cwd(),
13612
- relativeDirPath = (0, import_node_path90.join)(".opencode", "skill"),
13756
+ relativeDirPath = (0, import_node_path91.join)(".opencode", "skill"),
13613
13757
  dirName,
13614
13758
  frontmatter,
13615
13759
  body,
@@ -13638,7 +13782,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
13638
13782
  }
13639
13783
  static getSettablePaths({ global = false } = {}) {
13640
13784
  return {
13641
- relativeDirPath: global ? (0, import_node_path90.join)(".config", "opencode", "skill") : (0, import_node_path90.join)(".opencode", "skill")
13785
+ relativeDirPath: global ? (0, import_node_path91.join)(".config", "opencode", "skill") : (0, import_node_path91.join)(".opencode", "skill")
13642
13786
  };
13643
13787
  }
13644
13788
  getFrontmatter() {
@@ -13724,9 +13868,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
13724
13868
  });
13725
13869
  const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
13726
13870
  if (!result.success) {
13727
- const skillDirPath = (0, import_node_path90.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13871
+ const skillDirPath = (0, import_node_path91.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13728
13872
  throw new Error(
13729
- `Invalid frontmatter in ${(0, import_node_path90.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13873
+ `Invalid frontmatter in ${(0, import_node_path91.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13730
13874
  );
13731
13875
  }
13732
13876
  return new _OpenCodeSkill({
@@ -13760,7 +13904,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
13760
13904
  };
13761
13905
 
13762
13906
  // src/features/skills/replit-skill.ts
13763
- var import_node_path91 = require("path");
13907
+ var import_node_path92 = require("path");
13764
13908
  var import_mini48 = require("zod/mini");
13765
13909
  var ReplitSkillFrontmatterSchema = import_mini48.z.looseObject({
13766
13910
  name: import_mini48.z.string(),
@@ -13769,7 +13913,7 @@ var ReplitSkillFrontmatterSchema = import_mini48.z.looseObject({
13769
13913
  var ReplitSkill = class _ReplitSkill extends ToolSkill {
13770
13914
  constructor({
13771
13915
  baseDir = process.cwd(),
13772
- relativeDirPath = (0, import_node_path91.join)(".agents", "skills"),
13916
+ relativeDirPath = (0, import_node_path92.join)(".agents", "skills"),
13773
13917
  dirName,
13774
13918
  frontmatter,
13775
13919
  body,
@@ -13801,7 +13945,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
13801
13945
  throw new Error("ReplitSkill does not support global mode.");
13802
13946
  }
13803
13947
  return {
13804
- relativeDirPath: (0, import_node_path91.join)(".agents", "skills")
13948
+ relativeDirPath: (0, import_node_path92.join)(".agents", "skills")
13805
13949
  };
13806
13950
  }
13807
13951
  getFrontmatter() {
@@ -13881,9 +14025,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
13881
14025
  });
13882
14026
  const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
13883
14027
  if (!result.success) {
13884
- const skillDirPath = (0, import_node_path91.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
14028
+ const skillDirPath = (0, import_node_path92.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13885
14029
  throw new Error(
13886
- `Invalid frontmatter in ${(0, import_node_path91.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
14030
+ `Invalid frontmatter in ${(0, import_node_path92.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13887
14031
  );
13888
14032
  }
13889
14033
  return new _ReplitSkill({
@@ -13918,7 +14062,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
13918
14062
  };
13919
14063
 
13920
14064
  // src/features/skills/roo-skill.ts
13921
- var import_node_path92 = require("path");
14065
+ var import_node_path93 = require("path");
13922
14066
  var import_mini49 = require("zod/mini");
13923
14067
  var RooSkillFrontmatterSchema = import_mini49.z.looseObject({
13924
14068
  name: import_mini49.z.string(),
@@ -13927,7 +14071,7 @@ var RooSkillFrontmatterSchema = import_mini49.z.looseObject({
13927
14071
  var RooSkill = class _RooSkill extends ToolSkill {
13928
14072
  constructor({
13929
14073
  baseDir = process.cwd(),
13930
- relativeDirPath = (0, import_node_path92.join)(".roo", "skills"),
14074
+ relativeDirPath = (0, import_node_path93.join)(".roo", "skills"),
13931
14075
  dirName,
13932
14076
  frontmatter,
13933
14077
  body,
@@ -13958,7 +14102,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
13958
14102
  global: _global = false
13959
14103
  } = {}) {
13960
14104
  return {
13961
- relativeDirPath: (0, import_node_path92.join)(".roo", "skills")
14105
+ relativeDirPath: (0, import_node_path93.join)(".roo", "skills")
13962
14106
  };
13963
14107
  }
13964
14108
  getFrontmatter() {
@@ -14046,13 +14190,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
14046
14190
  });
14047
14191
  const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
14048
14192
  if (!result.success) {
14049
- const skillDirPath = (0, import_node_path92.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
14193
+ const skillDirPath = (0, import_node_path93.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
14050
14194
  throw new Error(
14051
- `Invalid frontmatter in ${(0, import_node_path92.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
14195
+ `Invalid frontmatter in ${(0, import_node_path93.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
14052
14196
  );
14053
14197
  }
14054
14198
  if (result.data.name !== loaded.dirName) {
14055
- const skillFilePath = (0, import_node_path92.join)(
14199
+ const skillFilePath = (0, import_node_path93.join)(
14056
14200
  loaded.baseDir,
14057
14201
  loaded.relativeDirPath,
14058
14202
  loaded.dirName,
@@ -14093,24 +14237,163 @@ var RooSkill = class _RooSkill extends ToolSkill {
14093
14237
  };
14094
14238
 
14095
14239
  // src/features/skills/skills-utils.ts
14096
- var import_node_path93 = require("path");
14240
+ var import_node_path94 = require("path");
14097
14241
  async function getLocalSkillDirNames(baseDir) {
14098
- const skillsDir = (0, import_node_path93.join)(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
14242
+ const skillsDir = (0, import_node_path94.join)(baseDir, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
14099
14243
  const names = /* @__PURE__ */ new Set();
14100
14244
  if (!await directoryExists(skillsDir)) {
14101
14245
  return names;
14102
14246
  }
14103
- const dirPaths = await findFilesByGlobs((0, import_node_path93.join)(skillsDir, "*"), { type: "dir" });
14247
+ const dirPaths = await findFilesByGlobs((0, import_node_path94.join)(skillsDir, "*"), { type: "dir" });
14104
14248
  for (const dirPath of dirPaths) {
14105
- const name = (0, import_node_path93.basename)(dirPath);
14106
- if (name === (0, import_node_path93.basename)(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
14249
+ const name = (0, import_node_path94.basename)(dirPath);
14250
+ if (name === (0, import_node_path94.basename)(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
14107
14251
  names.add(name);
14108
14252
  }
14109
14253
  return names;
14110
14254
  }
14111
14255
 
14256
+ // src/features/skills/takt-skill.ts
14257
+ var import_node_path95 = __toESM(require("path"), 1);
14258
+ var DEFAULT_TAKT_SKILL_DIR = "knowledge";
14259
+ var TaktSkill = class _TaktSkill extends ToolSkill {
14260
+ fileName;
14261
+ constructor({
14262
+ baseDir = process.cwd(),
14263
+ relativeDirPath,
14264
+ dirName,
14265
+ fileName,
14266
+ body,
14267
+ otherFiles = [],
14268
+ validate = true,
14269
+ global = false
14270
+ }) {
14271
+ super({
14272
+ baseDir,
14273
+ relativeDirPath,
14274
+ dirName,
14275
+ mainFile: {
14276
+ name: fileName,
14277
+ body,
14278
+ // Frontmatter is intentionally undefined — TAKT files are plain Markdown.
14279
+ frontmatter: void 0
14280
+ },
14281
+ otherFiles,
14282
+ global
14283
+ });
14284
+ this.fileName = fileName;
14285
+ if (validate) {
14286
+ const result = this.validate();
14287
+ if (!result.success) {
14288
+ throw result.error;
14289
+ }
14290
+ }
14291
+ }
14292
+ static getSettablePaths(_options = {}) {
14293
+ return {
14294
+ relativeDirPath: (0, import_node_path95.join)(".takt", "facets", DEFAULT_TAKT_SKILL_DIR)
14295
+ };
14296
+ }
14297
+ /**
14298
+ * Override: TAKT skills emit a single flat file under `relativeDirPath`,
14299
+ * not a nested directory keyed by `dirName`. Drop `dirName` from the path.
14300
+ *
14301
+ * Preserves the same path-traversal guard as `AiDir.getDirPath` so a
14302
+ * malicious `relativeDirPath` cannot escape `baseDir`.
14303
+ */
14304
+ getDirPath() {
14305
+ const fullPath = (0, import_node_path95.join)(this.baseDir, this.relativeDirPath);
14306
+ const resolvedFull = (0, import_node_path95.resolve)(fullPath);
14307
+ const resolvedBase = (0, import_node_path95.resolve)(this.baseDir);
14308
+ const rel = (0, import_node_path95.relative)(resolvedBase, resolvedFull);
14309
+ if (rel.startsWith("..") || import_node_path95.default.isAbsolute(rel)) {
14310
+ throw new Error(
14311
+ `Path traversal detected: Final path escapes baseDir. baseDir="${this.baseDir}", relativeDirPath="${this.relativeDirPath}"`
14312
+ );
14313
+ }
14314
+ return fullPath;
14315
+ }
14316
+ getRelativePathFromCwd() {
14317
+ return toPosixPath(this.relativeDirPath);
14318
+ }
14319
+ getBody() {
14320
+ return this.mainFile?.body ?? "";
14321
+ }
14322
+ getFileName() {
14323
+ return this.fileName;
14324
+ }
14325
+ validate() {
14326
+ return { success: true, error: null };
14327
+ }
14328
+ toRulesyncSkill() {
14329
+ throw new Error(
14330
+ "Importing existing TAKT facet files into rulesync is not supported: TAKT files are plain Markdown and the original skill metadata cannot be recovered."
14331
+ );
14332
+ }
14333
+ static fromRulesyncSkill({
14334
+ baseDir = process.cwd(),
14335
+ rulesyncSkill,
14336
+ validate = true,
14337
+ global = false
14338
+ }) {
14339
+ const rulesyncFrontmatter = rulesyncSkill.getFrontmatter();
14340
+ const taktSection = rulesyncFrontmatter.takt;
14341
+ const sourceLabel = rulesyncSkill.getDirName();
14342
+ const overrideName = typeof taktSection?.name === "string" ? taktSection.name : void 0;
14343
+ const stem = overrideName ?? rulesyncSkill.getDirName();
14344
+ assertSafeTaktName({ name: stem, featureLabel: "skill", sourceLabel });
14345
+ const fileName = `${stem}.md`;
14346
+ const relativeDirPath = (0, import_node_path95.join)(".takt", "facets", DEFAULT_TAKT_SKILL_DIR);
14347
+ return new _TaktSkill({
14348
+ baseDir,
14349
+ relativeDirPath,
14350
+ dirName: stem,
14351
+ fileName,
14352
+ body: rulesyncSkill.getBody(),
14353
+ otherFiles: rulesyncSkill.getOtherFiles(),
14354
+ validate,
14355
+ global
14356
+ });
14357
+ }
14358
+ static isTargetedByRulesyncSkill(rulesyncSkill) {
14359
+ const targets = rulesyncSkill.getFrontmatter().targets;
14360
+ return targets.includes("*") || targets.includes("takt");
14361
+ }
14362
+ /**
14363
+ * Importing existing TAKT facet files into rulesync is not supported.
14364
+ *
14365
+ * TAKT emits flat plain-Markdown files (no `SKILL.md` directory layout, no
14366
+ * frontmatter). The reverse import would have to invent a skill name and
14367
+ * description out of the file stem alone, which silently produces a stub
14368
+ * that round-trips badly. Throwing makes the limitation explicit at the
14369
+ * call site rather than letting bad data sneak through.
14370
+ */
14371
+ static async fromDir(_params) {
14372
+ throw new Error(
14373
+ "Importing existing TAKT facet files into rulesync is not supported: TAKT files are plain Markdown and the original skill metadata cannot be recovered."
14374
+ );
14375
+ }
14376
+ static forDeletion({
14377
+ baseDir = process.cwd(),
14378
+ relativeDirPath,
14379
+ dirName,
14380
+ global = false
14381
+ }) {
14382
+ return new _TaktSkill({
14383
+ baseDir,
14384
+ relativeDirPath,
14385
+ dirName,
14386
+ fileName: `${dirName}.md`,
14387
+ body: "",
14388
+ otherFiles: [],
14389
+ validate: false,
14390
+ global
14391
+ });
14392
+ }
14393
+ };
14394
+
14112
14395
  // src/features/skills/windsurf-skill.ts
14113
- var import_node_path94 = require("path");
14396
+ var import_node_path96 = require("path");
14114
14397
  var import_mini50 = require("zod/mini");
14115
14398
  var WindsurfSkillFrontmatterSchema = import_mini50.z.looseObject({
14116
14399
  name: import_mini50.z.string(),
@@ -14149,11 +14432,11 @@ var WindsurfSkill = class _WindsurfSkill extends ToolSkill {
14149
14432
  static getSettablePaths({ global = false } = {}) {
14150
14433
  if (global) {
14151
14434
  return {
14152
- relativeDirPath: (0, import_node_path94.join)(".codeium", "windsurf", "skills")
14435
+ relativeDirPath: (0, import_node_path96.join)(".codeium", "windsurf", "skills")
14153
14436
  };
14154
14437
  }
14155
14438
  return {
14156
- relativeDirPath: (0, import_node_path94.join)(".windsurf", "skills")
14439
+ relativeDirPath: (0, import_node_path96.join)(".windsurf", "skills")
14157
14440
  };
14158
14441
  }
14159
14442
  getFrontmatter() {
@@ -14233,9 +14516,9 @@ var WindsurfSkill = class _WindsurfSkill extends ToolSkill {
14233
14516
  });
14234
14517
  const result = WindsurfSkillFrontmatterSchema.safeParse(loaded.frontmatter);
14235
14518
  if (!result.success) {
14236
- const skillDirPath = (0, import_node_path94.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
14519
+ const skillDirPath = (0, import_node_path96.join)(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
14237
14520
  throw new Error(
14238
- `Invalid frontmatter in ${(0, import_node_path94.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
14521
+ `Invalid frontmatter in ${(0, import_node_path96.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
14239
14522
  );
14240
14523
  }
14241
14524
  return new _WindsurfSkill({
@@ -14290,6 +14573,7 @@ var skillsProcessorToolTargetTuple = [
14290
14573
  "replit",
14291
14574
  "roo",
14292
14575
  "rovodev",
14576
+ "takt",
14293
14577
  "windsurf"
14294
14578
  ];
14295
14579
  var SkillsProcessorToolTargetSchema = import_mini51.z.enum(skillsProcessorToolTargetTuple);
@@ -14427,6 +14711,13 @@ var toolSkillFactories = /* @__PURE__ */ new Map([
14427
14711
  meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: true }
14428
14712
  }
14429
14713
  ],
14714
+ [
14715
+ "takt",
14716
+ {
14717
+ class: TaktSkill,
14718
+ meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: true }
14719
+ }
14720
+ ],
14430
14721
  [
14431
14722
  "windsurf",
14432
14723
  {
@@ -14523,11 +14814,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
14523
14814
  )
14524
14815
  );
14525
14816
  const localSkillNames = new Set(localDirNames);
14526
- const curatedDirPath = (0, import_node_path95.join)(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
14817
+ const curatedDirPath = (0, import_node_path97.join)(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
14527
14818
  let curatedSkills = [];
14528
14819
  if (await directoryExists(curatedDirPath)) {
14529
- const curatedDirPaths = await findFilesByGlobs((0, import_node_path95.join)(curatedDirPath, "*"), { type: "dir" });
14530
- const curatedDirNames = curatedDirPaths.map((path3) => (0, import_node_path95.basename)(path3));
14820
+ const curatedDirPaths = await findFilesByGlobs((0, import_node_path97.join)(curatedDirPath, "*"), { type: "dir" });
14821
+ const curatedDirNames = curatedDirPaths.map((path4) => (0, import_node_path97.basename)(path4));
14531
14822
  const nonConflicting = curatedDirNames.filter((name) => {
14532
14823
  if (localSkillNames.has(name)) {
14533
14824
  this.logger.debug(`Skipping curated skill "${name}": local skill takes precedence.`);
@@ -14564,13 +14855,13 @@ var SkillsProcessor = class extends DirFeatureProcessor {
14564
14855
  const seenDirNames = /* @__PURE__ */ new Set();
14565
14856
  const loadEntries = [];
14566
14857
  for (const root of roots) {
14567
- const skillsDirPath = (0, import_node_path95.join)(this.baseDir, root);
14858
+ const skillsDirPath = (0, import_node_path97.join)(this.baseDir, root);
14568
14859
  if (!await directoryExists(skillsDirPath)) {
14569
14860
  continue;
14570
14861
  }
14571
- const dirPaths = await findFilesByGlobs((0, import_node_path95.join)(skillsDirPath, "*"), { type: "dir" });
14862
+ const dirPaths = await findFilesByGlobs((0, import_node_path97.join)(skillsDirPath, "*"), { type: "dir" });
14572
14863
  for (const dirPath of dirPaths) {
14573
- const dirName = (0, import_node_path95.basename)(dirPath);
14864
+ const dirName = (0, import_node_path97.basename)(dirPath);
14574
14865
  if (seenDirNames.has(dirName)) {
14575
14866
  continue;
14576
14867
  }
@@ -14599,13 +14890,13 @@ var SkillsProcessor = class extends DirFeatureProcessor {
14599
14890
  const roots = toolSkillSearchRoots(paths);
14600
14891
  const toolSkills = [];
14601
14892
  for (const root of roots) {
14602
- const skillsDirPath = (0, import_node_path95.join)(this.baseDir, root);
14893
+ const skillsDirPath = (0, import_node_path97.join)(this.baseDir, root);
14603
14894
  if (!await directoryExists(skillsDirPath)) {
14604
14895
  continue;
14605
14896
  }
14606
- const dirPaths = await findFilesByGlobs((0, import_node_path95.join)(skillsDirPath, "*"), { type: "dir" });
14897
+ const dirPaths = await findFilesByGlobs((0, import_node_path97.join)(skillsDirPath, "*"), { type: "dir" });
14607
14898
  for (const dirPath of dirPaths) {
14608
- const dirName = (0, import_node_path95.basename)(dirPath);
14899
+ const dirName = (0, import_node_path97.basename)(dirPath);
14609
14900
  const toolSkill = factory.class.forDeletion({
14610
14901
  baseDir: this.baseDir,
14611
14902
  relativeDirPath: root,
@@ -14667,10 +14958,10 @@ var SkillsProcessor = class extends DirFeatureProcessor {
14667
14958
  };
14668
14959
 
14669
14960
  // src/features/subagents/agentsmd-subagent.ts
14670
- var import_node_path97 = require("path");
14961
+ var import_node_path99 = require("path");
14671
14962
 
14672
14963
  // src/features/subagents/simulated-subagent.ts
14673
- var import_node_path96 = require("path");
14964
+ var import_node_path98 = require("path");
14674
14965
  var import_mini52 = require("zod/mini");
14675
14966
 
14676
14967
  // src/features/subagents/tool-subagent.ts
@@ -14735,7 +15026,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14735
15026
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
14736
15027
  if (!result.success) {
14737
15028
  throw new Error(
14738
- `Invalid frontmatter in ${(0, import_node_path96.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15029
+ `Invalid frontmatter in ${(0, import_node_path98.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14739
15030
  );
14740
15031
  }
14741
15032
  }
@@ -14786,7 +15077,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14786
15077
  return {
14787
15078
  success: false,
14788
15079
  error: new Error(
14789
- `Invalid frontmatter in ${(0, import_node_path96.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15080
+ `Invalid frontmatter in ${(0, import_node_path98.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14790
15081
  )
14791
15082
  };
14792
15083
  }
@@ -14796,7 +15087,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14796
15087
  relativeFilePath,
14797
15088
  validate = true
14798
15089
  }) {
14799
- const filePath = (0, import_node_path96.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
15090
+ const filePath = (0, import_node_path98.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
14800
15091
  const fileContent = await readFileContent(filePath);
14801
15092
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14802
15093
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14806,7 +15097,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14806
15097
  return {
14807
15098
  baseDir,
14808
15099
  relativeDirPath: this.getSettablePaths().relativeDirPath,
14809
- relativeFilePath: (0, import_node_path96.basename)(relativeFilePath),
15100
+ relativeFilePath: (0, import_node_path98.basename)(relativeFilePath),
14810
15101
  frontmatter: result.data,
14811
15102
  body: content.trim(),
14812
15103
  validate
@@ -14832,7 +15123,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14832
15123
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
14833
15124
  static getSettablePaths() {
14834
15125
  return {
14835
- relativeDirPath: (0, import_node_path97.join)(".agents", "subagents")
15126
+ relativeDirPath: (0, import_node_path99.join)(".agents", "subagents")
14836
15127
  };
14837
15128
  }
14838
15129
  static async fromFile(params) {
@@ -14855,11 +15146,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
14855
15146
  };
14856
15147
 
14857
15148
  // src/features/subagents/factorydroid-subagent.ts
14858
- var import_node_path98 = require("path");
15149
+ var import_node_path100 = require("path");
14859
15150
  var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
14860
15151
  static getSettablePaths(_options) {
14861
15152
  return {
14862
- relativeDirPath: (0, import_node_path98.join)(".factory", "droids")
15153
+ relativeDirPath: (0, import_node_path100.join)(".factory", "droids")
14863
15154
  };
14864
15155
  }
14865
15156
  static async fromFile(params) {
@@ -14882,16 +15173,21 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
14882
15173
  };
14883
15174
 
14884
15175
  // src/features/subagents/geminicli-subagent.ts
14885
- var import_node_path100 = require("path");
15176
+ var import_node_path102 = require("path");
14886
15177
  var import_mini54 = require("zod/mini");
14887
15178
 
14888
15179
  // src/features/subagents/rulesync-subagent.ts
14889
- var import_node_path99 = require("path");
15180
+ var import_node_path101 = require("path");
14890
15181
  var import_mini53 = require("zod/mini");
14891
15182
  var RulesyncSubagentFrontmatterSchema = import_mini53.z.looseObject({
14892
15183
  targets: import_mini53.z._default(RulesyncTargetsSchema, ["*"]),
14893
15184
  name: import_mini53.z.string(),
14894
- description: import_mini53.z.optional(import_mini53.z.string())
15185
+ description: import_mini53.z.optional(import_mini53.z.string()),
15186
+ takt: import_mini53.z.optional(
15187
+ import_mini53.z.looseObject({
15188
+ name: import_mini53.z.optional(import_mini53.z.string())
15189
+ })
15190
+ )
14895
15191
  });
14896
15192
  var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14897
15193
  frontmatter;
@@ -14900,7 +15196,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14900
15196
  const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
14901
15197
  if (!parseResult.success && rest.validate !== false) {
14902
15198
  throw new Error(
14903
- `Invalid frontmatter in ${(0, import_node_path99.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
15199
+ `Invalid frontmatter in ${(0, import_node_path101.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
14904
15200
  );
14905
15201
  }
14906
15202
  const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
@@ -14933,7 +15229,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14933
15229
  return {
14934
15230
  success: false,
14935
15231
  error: new Error(
14936
- `Invalid frontmatter in ${(0, import_node_path99.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15232
+ `Invalid frontmatter in ${(0, import_node_path101.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14937
15233
  )
14938
15234
  };
14939
15235
  }
@@ -14941,14 +15237,14 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14941
15237
  static async fromFile({
14942
15238
  relativeFilePath
14943
15239
  }) {
14944
- const filePath = (0, import_node_path99.join)(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
15240
+ const filePath = (0, import_node_path101.join)(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
14945
15241
  const fileContent = await readFileContent(filePath);
14946
15242
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14947
15243
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
14948
15244
  if (!result.success) {
14949
15245
  throw new Error(`Invalid frontmatter in ${relativeFilePath}: ${formatError(result.error)}`);
14950
15246
  }
14951
- const filename = (0, import_node_path99.basename)(relativeFilePath);
15247
+ const filename = (0, import_node_path101.basename)(relativeFilePath);
14952
15248
  return new _RulesyncSubagent({
14953
15249
  baseDir: process.cwd(),
14954
15250
  relativeDirPath: this.getSettablePaths().relativeDirPath,
@@ -14972,7 +15268,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14972
15268
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
14973
15269
  if (!result.success) {
14974
15270
  throw new Error(
14975
- `Invalid frontmatter in ${(0, import_node_path100.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15271
+ `Invalid frontmatter in ${(0, import_node_path102.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14976
15272
  );
14977
15273
  }
14978
15274
  }
@@ -14985,7 +15281,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14985
15281
  }
14986
15282
  static getSettablePaths(_options = {}) {
14987
15283
  return {
14988
- relativeDirPath: (0, import_node_path100.join)(".gemini", "agents")
15284
+ relativeDirPath: (0, import_node_path102.join)(".gemini", "agents")
14989
15285
  };
14990
15286
  }
14991
15287
  getFrontmatter() {
@@ -15053,7 +15349,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
15053
15349
  return {
15054
15350
  success: false,
15055
15351
  error: new Error(
15056
- `Invalid frontmatter in ${(0, import_node_path100.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15352
+ `Invalid frontmatter in ${(0, import_node_path102.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15057
15353
  )
15058
15354
  };
15059
15355
  }
@@ -15071,7 +15367,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
15071
15367
  global = false
15072
15368
  }) {
15073
15369
  const paths = this.getSettablePaths({ global });
15074
- const filePath = (0, import_node_path100.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15370
+ const filePath = (0, import_node_path102.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15075
15371
  const fileContent = await readFileContent(filePath);
15076
15372
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15077
15373
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15107,11 +15403,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
15107
15403
  };
15108
15404
 
15109
15405
  // src/features/subagents/roo-subagent.ts
15110
- var import_node_path101 = require("path");
15406
+ var import_node_path103 = require("path");
15111
15407
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
15112
15408
  static getSettablePaths() {
15113
15409
  return {
15114
- relativeDirPath: (0, import_node_path101.join)(".roo", "subagents")
15410
+ relativeDirPath: (0, import_node_path103.join)(".roo", "subagents")
15115
15411
  };
15116
15412
  }
15117
15413
  static async fromFile(params) {
@@ -15134,7 +15430,7 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
15134
15430
  };
15135
15431
 
15136
15432
  // src/features/subagents/rovodev-subagent.ts
15137
- var import_node_path102 = require("path");
15433
+ var import_node_path104 = require("path");
15138
15434
  var import_mini55 = require("zod/mini");
15139
15435
  var RovodevSubagentFrontmatterSchema = import_mini55.z.looseObject({
15140
15436
  name: import_mini55.z.string(),
@@ -15148,7 +15444,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
15148
15444
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
15149
15445
  if (!result.success) {
15150
15446
  throw new Error(
15151
- `Invalid frontmatter in ${(0, import_node_path102.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15447
+ `Invalid frontmatter in ${(0, import_node_path104.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15152
15448
  );
15153
15449
  }
15154
15450
  }
@@ -15160,7 +15456,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
15160
15456
  }
15161
15457
  static getSettablePaths(_options = {}) {
15162
15458
  return {
15163
- relativeDirPath: (0, import_node_path102.join)(".rovodev", "subagents")
15459
+ relativeDirPath: (0, import_node_path104.join)(".rovodev", "subagents")
15164
15460
  };
15165
15461
  }
15166
15462
  getFrontmatter() {
@@ -15223,7 +15519,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
15223
15519
  return {
15224
15520
  success: false,
15225
15521
  error: new Error(
15226
- `Invalid frontmatter in ${(0, import_node_path102.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15522
+ `Invalid frontmatter in ${(0, import_node_path104.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15227
15523
  )
15228
15524
  };
15229
15525
  }
@@ -15240,7 +15536,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
15240
15536
  global = false
15241
15537
  }) {
15242
15538
  const paths = this.getSettablePaths({ global });
15243
- const filePath = (0, import_node_path102.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15539
+ const filePath = (0, import_node_path104.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15244
15540
  const fileContent = await readFileContent(filePath);
15245
15541
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15246
15542
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15279,11 +15575,11 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
15279
15575
  };
15280
15576
 
15281
15577
  // src/features/subagents/subagents-processor.ts
15282
- var import_node_path113 = require("path");
15578
+ var import_node_path116 = require("path");
15283
15579
  var import_mini64 = require("zod/mini");
15284
15580
 
15285
15581
  // src/features/subagents/claudecode-subagent.ts
15286
- var import_node_path103 = require("path");
15582
+ var import_node_path105 = require("path");
15287
15583
  var import_mini56 = require("zod/mini");
15288
15584
  var ClaudecodeSubagentFrontmatterSchema = import_mini56.z.looseObject({
15289
15585
  name: import_mini56.z.string(),
@@ -15301,7 +15597,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
15301
15597
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
15302
15598
  if (!result.success) {
15303
15599
  throw new Error(
15304
- `Invalid frontmatter in ${(0, import_node_path103.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15600
+ `Invalid frontmatter in ${(0, import_node_path105.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15305
15601
  );
15306
15602
  }
15307
15603
  }
@@ -15313,7 +15609,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
15313
15609
  }
15314
15610
  static getSettablePaths(_options = {}) {
15315
15611
  return {
15316
- relativeDirPath: (0, import_node_path103.join)(".claude", "agents")
15612
+ relativeDirPath: (0, import_node_path105.join)(".claude", "agents")
15317
15613
  };
15318
15614
  }
15319
15615
  getFrontmatter() {
@@ -15392,7 +15688,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
15392
15688
  return {
15393
15689
  success: false,
15394
15690
  error: new Error(
15395
- `Invalid frontmatter in ${(0, import_node_path103.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15691
+ `Invalid frontmatter in ${(0, import_node_path105.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15396
15692
  )
15397
15693
  };
15398
15694
  }
@@ -15410,7 +15706,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
15410
15706
  global = false
15411
15707
  }) {
15412
15708
  const paths = this.getSettablePaths({ global });
15413
- const filePath = (0, import_node_path103.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15709
+ const filePath = (0, import_node_path105.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15414
15710
  const fileContent = await readFileContent(filePath);
15415
15711
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15416
15712
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15445,7 +15741,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
15445
15741
  };
15446
15742
 
15447
15743
  // src/features/subagents/codexcli-subagent.ts
15448
- var import_node_path104 = require("path");
15744
+ var import_node_path106 = require("path");
15449
15745
  var smolToml6 = __toESM(require("smol-toml"), 1);
15450
15746
  var import_mini57 = require("zod/mini");
15451
15747
  var CodexCliSubagentTomlSchema = import_mini57.z.looseObject({
@@ -15476,7 +15772,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15476
15772
  CodexCliSubagentTomlSchema.parse(parsed);
15477
15773
  } catch (error) {
15478
15774
  throw new Error(
15479
- `Invalid TOML in ${(0, import_node_path104.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15775
+ `Invalid TOML in ${(0, import_node_path106.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15480
15776
  { cause: error }
15481
15777
  );
15482
15778
  }
@@ -15488,7 +15784,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15488
15784
  }
15489
15785
  static getSettablePaths(_options = {}) {
15490
15786
  return {
15491
- relativeDirPath: (0, import_node_path104.join)(".codex", "agents")
15787
+ relativeDirPath: (0, import_node_path106.join)(".codex", "agents")
15492
15788
  };
15493
15789
  }
15494
15790
  getBody() {
@@ -15500,7 +15796,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15500
15796
  parsed = CodexCliSubagentTomlSchema.parse(smolToml6.parse(this.body));
15501
15797
  } catch (error) {
15502
15798
  throw new Error(
15503
- `Failed to parse TOML in ${(0, import_node_path104.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15799
+ `Failed to parse TOML in ${(0, import_node_path106.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15504
15800
  { cause: error }
15505
15801
  );
15506
15802
  }
@@ -15581,7 +15877,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15581
15877
  global = false
15582
15878
  }) {
15583
15879
  const paths = this.getSettablePaths({ global });
15584
- const filePath = (0, import_node_path104.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15880
+ const filePath = (0, import_node_path106.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15585
15881
  const fileContent = await readFileContent(filePath);
15586
15882
  const subagent = new _CodexCliSubagent({
15587
15883
  baseDir,
@@ -15619,7 +15915,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15619
15915
  };
15620
15916
 
15621
15917
  // src/features/subagents/copilot-subagent.ts
15622
- var import_node_path105 = require("path");
15918
+ var import_node_path107 = require("path");
15623
15919
  var import_mini58 = require("zod/mini");
15624
15920
  var REQUIRED_TOOL = "agent/runSubagent";
15625
15921
  var CopilotSubagentFrontmatterSchema = import_mini58.z.looseObject({
@@ -15660,7 +15956,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15660
15956
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
15661
15957
  if (!result.success) {
15662
15958
  throw new Error(
15663
- `Invalid frontmatter in ${(0, import_node_path105.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15959
+ `Invalid frontmatter in ${(0, import_node_path107.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15664
15960
  );
15665
15961
  }
15666
15962
  }
@@ -15672,7 +15968,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15672
15968
  }
15673
15969
  static getSettablePaths(_options = {}) {
15674
15970
  return {
15675
- relativeDirPath: (0, import_node_path105.join)(".github", "agents")
15971
+ relativeDirPath: (0, import_node_path107.join)(".github", "agents")
15676
15972
  };
15677
15973
  }
15678
15974
  getFrontmatter() {
@@ -15746,7 +16042,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15746
16042
  return {
15747
16043
  success: false,
15748
16044
  error: new Error(
15749
- `Invalid frontmatter in ${(0, import_node_path105.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16045
+ `Invalid frontmatter in ${(0, import_node_path107.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15750
16046
  )
15751
16047
  };
15752
16048
  }
@@ -15764,7 +16060,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15764
16060
  global = false
15765
16061
  }) {
15766
16062
  const paths = this.getSettablePaths({ global });
15767
- const filePath = (0, import_node_path105.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16063
+ const filePath = (0, import_node_path107.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15768
16064
  const fileContent = await readFileContent(filePath);
15769
16065
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15770
16066
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15800,7 +16096,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15800
16096
  };
15801
16097
 
15802
16098
  // src/features/subagents/cursor-subagent.ts
15803
- var import_node_path106 = require("path");
16099
+ var import_node_path108 = require("path");
15804
16100
  var import_mini59 = require("zod/mini");
15805
16101
  var CursorSubagentFrontmatterSchema = import_mini59.z.looseObject({
15806
16102
  name: import_mini59.z.string(),
@@ -15814,7 +16110,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15814
16110
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
15815
16111
  if (!result.success) {
15816
16112
  throw new Error(
15817
- `Invalid frontmatter in ${(0, import_node_path106.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16113
+ `Invalid frontmatter in ${(0, import_node_path108.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15818
16114
  );
15819
16115
  }
15820
16116
  }
@@ -15826,7 +16122,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15826
16122
  }
15827
16123
  static getSettablePaths(_options = {}) {
15828
16124
  return {
15829
- relativeDirPath: (0, import_node_path106.join)(".cursor", "agents")
16125
+ relativeDirPath: (0, import_node_path108.join)(".cursor", "agents")
15830
16126
  };
15831
16127
  }
15832
16128
  getFrontmatter() {
@@ -15893,7 +16189,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15893
16189
  return {
15894
16190
  success: false,
15895
16191
  error: new Error(
15896
- `Invalid frontmatter in ${(0, import_node_path106.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16192
+ `Invalid frontmatter in ${(0, import_node_path108.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15897
16193
  )
15898
16194
  };
15899
16195
  }
@@ -15911,7 +16207,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15911
16207
  global = false
15912
16208
  }) {
15913
16209
  const paths = this.getSettablePaths({ global });
15914
- const filePath = (0, import_node_path106.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16210
+ const filePath = (0, import_node_path108.join)(baseDir, paths.relativeDirPath, relativeFilePath);
15915
16211
  const fileContent = await readFileContent(filePath);
15916
16212
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15917
16213
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15947,7 +16243,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15947
16243
  };
15948
16244
 
15949
16245
  // src/features/subagents/deepagents-subagent.ts
15950
- var import_node_path107 = require("path");
16246
+ var import_node_path109 = require("path");
15951
16247
  var import_mini60 = require("zod/mini");
15952
16248
  var DeepagentsSubagentFrontmatterSchema = import_mini60.z.looseObject({
15953
16249
  name: import_mini60.z.string(),
@@ -15962,7 +16258,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15962
16258
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
15963
16259
  if (!result.success) {
15964
16260
  throw new Error(
15965
- `Invalid frontmatter in ${(0, import_node_path107.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16261
+ `Invalid frontmatter in ${(0, import_node_path109.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15966
16262
  );
15967
16263
  }
15968
16264
  }
@@ -15972,7 +16268,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15972
16268
  }
15973
16269
  static getSettablePaths(_options = {}) {
15974
16270
  return {
15975
- relativeDirPath: (0, import_node_path107.join)(".deepagents", "agents")
16271
+ relativeDirPath: (0, import_node_path109.join)(".deepagents", "agents")
15976
16272
  };
15977
16273
  }
15978
16274
  getFrontmatter() {
@@ -16047,7 +16343,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
16047
16343
  return {
16048
16344
  success: false,
16049
16345
  error: new Error(
16050
- `Invalid frontmatter in ${(0, import_node_path107.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16346
+ `Invalid frontmatter in ${(0, import_node_path109.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16051
16347
  )
16052
16348
  };
16053
16349
  }
@@ -16065,7 +16361,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
16065
16361
  global = false
16066
16362
  }) {
16067
16363
  const paths = this.getSettablePaths({ global });
16068
- const filePath = (0, import_node_path107.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16364
+ const filePath = (0, import_node_path109.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16069
16365
  const fileContent = await readFileContent(filePath);
16070
16366
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
16071
16367
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -16100,7 +16396,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
16100
16396
  };
16101
16397
 
16102
16398
  // src/features/subagents/junie-subagent.ts
16103
- var import_node_path108 = require("path");
16399
+ var import_node_path110 = require("path");
16104
16400
  var import_mini61 = require("zod/mini");
16105
16401
  var JunieSubagentFrontmatterSchema = import_mini61.z.looseObject({
16106
16402
  name: import_mini61.z.optional(import_mini61.z.string()),
@@ -16114,7 +16410,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
16114
16410
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
16115
16411
  if (!result.success) {
16116
16412
  throw new Error(
16117
- `Invalid frontmatter in ${(0, import_node_path108.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16413
+ `Invalid frontmatter in ${(0, import_node_path110.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16118
16414
  );
16119
16415
  }
16120
16416
  }
@@ -16129,7 +16425,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
16129
16425
  throw new Error("JunieSubagent does not support global mode.");
16130
16426
  }
16131
16427
  return {
16132
- relativeDirPath: (0, import_node_path108.join)(".junie", "agents")
16428
+ relativeDirPath: (0, import_node_path110.join)(".junie", "agents")
16133
16429
  };
16134
16430
  }
16135
16431
  getFrontmatter() {
@@ -16205,7 +16501,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
16205
16501
  return {
16206
16502
  success: false,
16207
16503
  error: new Error(
16208
- `Invalid frontmatter in ${(0, import_node_path108.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16504
+ `Invalid frontmatter in ${(0, import_node_path110.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16209
16505
  )
16210
16506
  };
16211
16507
  }
@@ -16223,7 +16519,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
16223
16519
  global = false
16224
16520
  }) {
16225
16521
  const paths = this.getSettablePaths({ global });
16226
- const filePath = (0, import_node_path108.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16522
+ const filePath = (0, import_node_path110.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16227
16523
  const fileContent = await readFileContent(filePath);
16228
16524
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
16229
16525
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -16258,10 +16554,10 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
16258
16554
  };
16259
16555
 
16260
16556
  // src/features/subagents/kilo-subagent.ts
16261
- var import_node_path110 = require("path");
16557
+ var import_node_path112 = require("path");
16262
16558
 
16263
16559
  // src/features/subagents/opencode-style-subagent.ts
16264
- var import_node_path109 = require("path");
16560
+ var import_node_path111 = require("path");
16265
16561
  var import_mini62 = require("zod/mini");
16266
16562
  var OpenCodeStyleSubagentFrontmatterSchema = import_mini62.z.looseObject({
16267
16563
  description: import_mini62.z.optional(import_mini62.z.string()),
@@ -16276,7 +16572,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
16276
16572
  const result = OpenCodeStyleSubagentFrontmatterSchema.safeParse(frontmatter);
16277
16573
  if (!result.success) {
16278
16574
  throw new Error(
16279
- `Invalid frontmatter in ${(0, import_node_path109.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16575
+ `Invalid frontmatter in ${(0, import_node_path111.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16280
16576
  );
16281
16577
  }
16282
16578
  }
@@ -16296,7 +16592,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
16296
16592
  const { description, mode, name, ...toolSection } = this.frontmatter;
16297
16593
  const rulesyncFrontmatter = {
16298
16594
  targets: ["*"],
16299
- name: name ?? (0, import_node_path109.basename)(this.getRelativeFilePath(), ".md"),
16595
+ name: name ?? (0, import_node_path111.basename)(this.getRelativeFilePath(), ".md"),
16300
16596
  description,
16301
16597
  [this.getToolTarget()]: { mode, ...toolSection }
16302
16598
  };
@@ -16318,7 +16614,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
16318
16614
  return {
16319
16615
  success: false,
16320
16616
  error: new Error(
16321
- `Invalid frontmatter in ${(0, import_node_path109.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16617
+ `Invalid frontmatter in ${(0, import_node_path111.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16322
16618
  )
16323
16619
  };
16324
16620
  }
@@ -16334,7 +16630,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
16334
16630
  global = false
16335
16631
  } = {}) {
16336
16632
  return {
16337
- relativeDirPath: global ? (0, import_node_path110.join)(".config", "kilo", "agent") : (0, import_node_path110.join)(".kilo", "agent")
16633
+ relativeDirPath: global ? (0, import_node_path112.join)(".config", "kilo", "agent") : (0, import_node_path112.join)(".kilo", "agent")
16338
16634
  };
16339
16635
  }
16340
16636
  static fromRulesyncSubagent({
@@ -16378,7 +16674,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
16378
16674
  global = false
16379
16675
  }) {
16380
16676
  const paths = this.getSettablePaths({ global });
16381
- const filePath = (0, import_node_path110.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16677
+ const filePath = (0, import_node_path112.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16382
16678
  const fileContent = await readFileContent(filePath);
16383
16679
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
16384
16680
  const result = KiloSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -16414,7 +16710,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
16414
16710
  };
16415
16711
 
16416
16712
  // src/features/subagents/kiro-subagent.ts
16417
- var import_node_path111 = require("path");
16713
+ var import_node_path113 = require("path");
16418
16714
  var import_mini63 = require("zod/mini");
16419
16715
  var KiroCliSubagentJsonSchema = import_mini63.z.looseObject({
16420
16716
  name: import_mini63.z.string(),
@@ -16441,7 +16737,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
16441
16737
  KiroCliSubagentJsonSchema.parse(parsed);
16442
16738
  } catch (error) {
16443
16739
  throw new Error(
16444
- `Invalid JSON in ${(0, import_node_path111.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
16740
+ `Invalid JSON in ${(0, import_node_path113.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
16445
16741
  { cause: error }
16446
16742
  );
16447
16743
  }
@@ -16453,7 +16749,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
16453
16749
  }
16454
16750
  static getSettablePaths(_options = {}) {
16455
16751
  return {
16456
- relativeDirPath: (0, import_node_path111.join)(".kiro", "agents")
16752
+ relativeDirPath: (0, import_node_path113.join)(".kiro", "agents")
16457
16753
  };
16458
16754
  }
16459
16755
  getBody() {
@@ -16465,7 +16761,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
16465
16761
  parsed = JSON.parse(this.body);
16466
16762
  } catch (error) {
16467
16763
  throw new Error(
16468
- `Failed to parse JSON in ${(0, import_node_path111.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
16764
+ `Failed to parse JSON in ${(0, import_node_path113.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
16469
16765
  { cause: error }
16470
16766
  );
16471
16767
  }
@@ -16546,7 +16842,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
16546
16842
  global = false
16547
16843
  }) {
16548
16844
  const paths = this.getSettablePaths({ global });
16549
- const filePath = (0, import_node_path111.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16845
+ const filePath = (0, import_node_path113.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16550
16846
  const fileContent = await readFileContent(filePath);
16551
16847
  const subagent = new _KiroSubagent({
16552
16848
  baseDir,
@@ -16584,7 +16880,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
16584
16880
  };
16585
16881
 
16586
16882
  // src/features/subagents/opencode-subagent.ts
16587
- var import_node_path112 = require("path");
16883
+ var import_node_path114 = require("path");
16588
16884
  var OpenCodeSubagentFrontmatterSchema = OpenCodeStyleSubagentFrontmatterSchema;
16589
16885
  var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
16590
16886
  getToolTarget() {
@@ -16594,7 +16890,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
16594
16890
  global = false
16595
16891
  } = {}) {
16596
16892
  return {
16597
- relativeDirPath: global ? (0, import_node_path112.join)(".config", "opencode", "agent") : (0, import_node_path112.join)(".opencode", "agent")
16893
+ relativeDirPath: global ? (0, import_node_path114.join)(".config", "opencode", "agent") : (0, import_node_path114.join)(".opencode", "agent")
16598
16894
  };
16599
16895
  }
16600
16896
  static fromRulesyncSubagent({
@@ -16638,7 +16934,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
16638
16934
  global = false
16639
16935
  }) {
16640
16936
  const paths = this.getSettablePaths({ global });
16641
- const filePath = (0, import_node_path112.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16937
+ const filePath = (0, import_node_path114.join)(baseDir, paths.relativeDirPath, relativeFilePath);
16642
16938
  const fileContent = await readFileContent(filePath);
16643
16939
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
16644
16940
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -16673,6 +16969,109 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
16673
16969
  }
16674
16970
  };
16675
16971
 
16972
+ // src/features/subagents/takt-subagent.ts
16973
+ var import_node_path115 = require("path");
16974
+ var DEFAULT_TAKT_SUBAGENT_DIR = "personas";
16975
+ var TaktSubagent = class _TaktSubagent extends ToolSubagent {
16976
+ body;
16977
+ constructor({ body, ...rest }) {
16978
+ super({
16979
+ ...rest
16980
+ });
16981
+ this.body = body;
16982
+ }
16983
+ static getSettablePaths(_options = {}) {
16984
+ return {
16985
+ relativeDirPath: (0, import_node_path115.join)(".takt", "facets", DEFAULT_TAKT_SUBAGENT_DIR)
16986
+ };
16987
+ }
16988
+ getBody() {
16989
+ return this.body;
16990
+ }
16991
+ toRulesyncSubagent() {
16992
+ const stem = this.getRelativeFilePath().replace(/\.md$/u, "");
16993
+ const rulesyncFrontmatter = {
16994
+ targets: ["*"],
16995
+ name: stem
16996
+ };
16997
+ return new RulesyncSubagent({
16998
+ baseDir: ".",
16999
+ frontmatter: rulesyncFrontmatter,
17000
+ body: this.body,
17001
+ relativeDirPath: RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH,
17002
+ relativeFilePath: this.getRelativeFilePath(),
17003
+ validate: true
17004
+ });
17005
+ }
17006
+ static fromRulesyncSubagent({
17007
+ baseDir = process.cwd(),
17008
+ rulesyncSubagent,
17009
+ validate = true,
17010
+ global = false
17011
+ }) {
17012
+ const rulesyncFrontmatter = rulesyncSubagent.getFrontmatter();
17013
+ const taktSection = rulesyncFrontmatter.takt;
17014
+ const sourceLabel = rulesyncSubagent.getRelativeFilePath();
17015
+ const overrideName = typeof taktSection?.name === "string" ? taktSection.name : void 0;
17016
+ const sourceStem = rulesyncSubagent.getRelativeFilePath().replace(/\.md$/u, "");
17017
+ const stem = overrideName ?? sourceStem;
17018
+ assertSafeTaktName({ name: stem, featureLabel: "subagent", sourceLabel });
17019
+ const relativeFilePath = `${stem}.md`;
17020
+ const paths = this.getSettablePaths({ global });
17021
+ const body = rulesyncSubagent.getBody();
17022
+ return new _TaktSubagent({
17023
+ baseDir,
17024
+ body,
17025
+ relativeDirPath: paths.relativeDirPath,
17026
+ relativeFilePath,
17027
+ fileContent: body,
17028
+ validate
17029
+ });
17030
+ }
17031
+ validate() {
17032
+ return { success: true, error: null };
17033
+ }
17034
+ static isTargetedByRulesyncSubagent(rulesyncSubagent) {
17035
+ return this.isTargetedByRulesyncSubagentDefault({
17036
+ rulesyncSubagent,
17037
+ toolTarget: "takt"
17038
+ });
17039
+ }
17040
+ static async fromFile({
17041
+ baseDir = process.cwd(),
17042
+ relativeFilePath,
17043
+ validate = true,
17044
+ global = false
17045
+ }) {
17046
+ const paths = this.getSettablePaths({ global });
17047
+ const filePath = (0, import_node_path115.join)(baseDir, paths.relativeDirPath, relativeFilePath);
17048
+ const fileContent = await readFileContent(filePath);
17049
+ const { body } = parseFrontmatter(fileContent, filePath);
17050
+ return new _TaktSubagent({
17051
+ baseDir,
17052
+ relativeDirPath: paths.relativeDirPath,
17053
+ relativeFilePath,
17054
+ body: body.trim(),
17055
+ fileContent,
17056
+ validate
17057
+ });
17058
+ }
17059
+ static forDeletion({
17060
+ baseDir = process.cwd(),
17061
+ relativeDirPath,
17062
+ relativeFilePath
17063
+ }) {
17064
+ return new _TaktSubagent({
17065
+ baseDir,
17066
+ relativeDirPath,
17067
+ relativeFilePath,
17068
+ body: "",
17069
+ fileContent: "",
17070
+ validate: false
17071
+ });
17072
+ }
17073
+ };
17074
+
16676
17075
  // src/features/subagents/subagents-processor.ts
16677
17076
  var subagentsProcessorToolTargetTuple = [
16678
17077
  "kilo",
@@ -16689,7 +17088,8 @@ var subagentsProcessorToolTargetTuple = [
16689
17088
  "kiro",
16690
17089
  "opencode",
16691
17090
  "roo",
16692
- "rovodev"
17091
+ "rovodev",
17092
+ "takt"
16693
17093
  ];
16694
17094
  var SubagentsProcessorToolTargetSchema = import_mini64.z.enum(subagentsProcessorToolTargetTuple);
16695
17095
  var toolSubagentFactories = /* @__PURE__ */ new Map([
@@ -16797,6 +17197,13 @@ var toolSubagentFactories = /* @__PURE__ */ new Map([
16797
17197
  class: RovodevSubagent,
16798
17198
  meta: { supportsSimulated: false, supportsGlobal: true, filePattern: "*.md" }
16799
17199
  }
17200
+ ],
17201
+ [
17202
+ "takt",
17203
+ {
17204
+ class: TaktSubagent,
17205
+ meta: { supportsSimulated: false, supportsGlobal: true, filePattern: "*.md" }
17206
+ }
16800
17207
  ]
16801
17208
  ]);
16802
17209
  var defaultGetFactory5 = (target) => {
@@ -16882,7 +17289,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16882
17289
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
16883
17290
  */
16884
17291
  async loadRulesyncFiles() {
16885
- const subagentsDir = (0, import_node_path113.join)(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
17292
+ const subagentsDir = (0, import_node_path116.join)(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
16886
17293
  const dirExists = await directoryExists(subagentsDir);
16887
17294
  if (!dirExists) {
16888
17295
  this.logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -16897,7 +17304,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16897
17304
  this.logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
16898
17305
  const rulesyncSubagents = [];
16899
17306
  for (const mdFile of mdFiles) {
16900
- const filepath = (0, import_node_path113.join)(subagentsDir, mdFile);
17307
+ const filepath = (0, import_node_path116.join)(subagentsDir, mdFile);
16901
17308
  try {
16902
17309
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
16903
17310
  relativeFilePath: mdFile,
@@ -16927,14 +17334,14 @@ var SubagentsProcessor = class extends FeatureProcessor {
16927
17334
  const factory = this.getFactory(this.toolTarget);
16928
17335
  const paths = factory.class.getSettablePaths({ global: this.global });
16929
17336
  const subagentFilePaths = await findFilesByGlobs(
16930
- (0, import_node_path113.join)(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
17337
+ (0, import_node_path116.join)(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
16931
17338
  );
16932
17339
  if (forDeletion) {
16933
17340
  const toolSubagents2 = subagentFilePaths.map(
16934
- (path3) => factory.class.forDeletion({
17341
+ (path4) => factory.class.forDeletion({
16935
17342
  baseDir: this.baseDir,
16936
17343
  relativeDirPath: paths.relativeDirPath,
16937
- relativeFilePath: (0, import_node_path113.basename)(path3),
17344
+ relativeFilePath: (0, import_node_path116.basename)(path4),
16938
17345
  global: this.global
16939
17346
  })
16940
17347
  ).filter((subagent) => subagent.isDeletable());
@@ -16945,9 +17352,9 @@ var SubagentsProcessor = class extends FeatureProcessor {
16945
17352
  }
16946
17353
  const toolSubagents = await Promise.all(
16947
17354
  subagentFilePaths.map(
16948
- (path3) => factory.class.fromFile({
17355
+ (path4) => factory.class.fromFile({
16949
17356
  baseDir: this.baseDir,
16950
- relativeFilePath: (0, import_node_path113.basename)(path3),
17357
+ relativeFilePath: (0, import_node_path116.basename)(path4),
16951
17358
  global: this.global
16952
17359
  })
16953
17360
  )
@@ -16994,13 +17401,13 @@ var SubagentsProcessor = class extends FeatureProcessor {
16994
17401
  };
16995
17402
 
16996
17403
  // src/features/rules/agentsmd-rule.ts
16997
- var import_node_path116 = require("path");
17404
+ var import_node_path119 = require("path");
16998
17405
 
16999
17406
  // src/features/rules/tool-rule.ts
17000
- var import_node_path115 = require("path");
17407
+ var import_node_path118 = require("path");
17001
17408
 
17002
17409
  // src/features/rules/rulesync-rule.ts
17003
- var import_node_path114 = require("path");
17410
+ var import_node_path117 = require("path");
17004
17411
  var import_mini65 = require("zod/mini");
17005
17412
  var RulesyncRuleFrontmatterSchema = import_mini65.z.object({
17006
17413
  root: import_mini65.z.optional(import_mini65.z.boolean()),
@@ -17038,6 +17445,12 @@ var RulesyncRuleFrontmatterSchema = import_mini65.z.object({
17038
17445
  trigger: import_mini65.z.optional(import_mini65.z.string()),
17039
17446
  globs: import_mini65.z.optional(import_mini65.z.array(import_mini65.z.string()))
17040
17447
  })
17448
+ ),
17449
+ takt: import_mini65.z.optional(
17450
+ import_mini65.z.looseObject({
17451
+ // Rename the emitted file stem (e.g. "coder.md" → "{name}.md").
17452
+ name: import_mini65.z.optional(import_mini65.z.string())
17453
+ })
17041
17454
  )
17042
17455
  });
17043
17456
  var RulesyncRule = class _RulesyncRule extends RulesyncFile {
@@ -17047,7 +17460,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
17047
17460
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
17048
17461
  if (!parseResult.success && rest.validate !== false) {
17049
17462
  throw new Error(
17050
- `Invalid frontmatter in ${(0, import_node_path114.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
17463
+ `Invalid frontmatter in ${(0, import_node_path117.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
17051
17464
  );
17052
17465
  }
17053
17466
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -17082,7 +17495,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
17082
17495
  return {
17083
17496
  success: false,
17084
17497
  error: new Error(
17085
- `Invalid frontmatter in ${(0, import_node_path114.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17498
+ `Invalid frontmatter in ${(0, import_node_path117.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17086
17499
  )
17087
17500
  };
17088
17501
  }
@@ -17091,7 +17504,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
17091
17504
  relativeFilePath,
17092
17505
  validate = true
17093
17506
  }) {
17094
- const filePath = (0, import_node_path114.join)(
17507
+ const filePath = (0, import_node_path117.join)(
17095
17508
  process.cwd(),
17096
17509
  this.getSettablePaths().recommended.relativeDirPath,
17097
17510
  relativeFilePath
@@ -17190,7 +17603,7 @@ var ToolRule = class extends ToolFile {
17190
17603
  rulesyncRule,
17191
17604
  validate = true,
17192
17605
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
17193
- nonRootPath = { relativeDirPath: (0, import_node_path115.join)(".agents", "memories") }
17606
+ nonRootPath = { relativeDirPath: (0, import_node_path118.join)(".agents", "memories") }
17194
17607
  }) {
17195
17608
  const params = this.buildToolRuleParamsDefault({
17196
17609
  baseDir,
@@ -17201,7 +17614,7 @@ var ToolRule = class extends ToolFile {
17201
17614
  });
17202
17615
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
17203
17616
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
17204
- params.relativeDirPath = (0, import_node_path115.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
17617
+ params.relativeDirPath = (0, import_node_path118.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
17205
17618
  params.relativeFilePath = "AGENTS.md";
17206
17619
  }
17207
17620
  return params;
@@ -17250,7 +17663,7 @@ var ToolRule = class extends ToolFile {
17250
17663
  }
17251
17664
  };
17252
17665
  function buildToolPath(toolDir, subDir, excludeToolDir) {
17253
- return excludeToolDir ? subDir : (0, import_node_path115.join)(toolDir, subDir);
17666
+ return excludeToolDir ? subDir : (0, import_node_path118.join)(toolDir, subDir);
17254
17667
  }
17255
17668
 
17256
17669
  // src/features/rules/agentsmd-rule.ts
@@ -17279,8 +17692,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
17279
17692
  validate = true
17280
17693
  }) {
17281
17694
  const isRoot = relativeFilePath === "AGENTS.md";
17282
- const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path116.join)(".agents", "memories", relativeFilePath);
17283
- const fileContent = await readFileContent((0, import_node_path116.join)(baseDir, relativePath));
17695
+ const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path119.join)(".agents", "memories", relativeFilePath);
17696
+ const fileContent = await readFileContent((0, import_node_path119.join)(baseDir, relativePath));
17284
17697
  return new _AgentsMdRule({
17285
17698
  baseDir,
17286
17699
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -17335,7 +17748,7 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
17335
17748
  };
17336
17749
 
17337
17750
  // src/features/rules/antigravity-rule.ts
17338
- var import_node_path117 = require("path");
17751
+ var import_node_path120 = require("path");
17339
17752
  var import_mini66 = require("zod/mini");
17340
17753
  var AntigravityRuleFrontmatterSchema = import_mini66.z.looseObject({
17341
17754
  trigger: import_mini66.z.optional(
@@ -17494,7 +17907,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
17494
17907
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
17495
17908
  if (!result.success) {
17496
17909
  throw new Error(
17497
- `Invalid frontmatter in ${(0, import_node_path117.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17910
+ `Invalid frontmatter in ${(0, import_node_path120.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17498
17911
  );
17499
17912
  }
17500
17913
  }
@@ -17518,7 +17931,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
17518
17931
  relativeFilePath,
17519
17932
  validate = true
17520
17933
  }) {
17521
- const filePath = (0, import_node_path117.join)(
17934
+ const filePath = (0, import_node_path120.join)(
17522
17935
  baseDir,
17523
17936
  this.getSettablePaths().nonRoot.relativeDirPath,
17524
17937
  relativeFilePath
@@ -17658,7 +18071,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
17658
18071
  };
17659
18072
 
17660
18073
  // src/features/rules/augmentcode-legacy-rule.ts
17661
- var import_node_path118 = require("path");
18074
+ var import_node_path121 = require("path");
17662
18075
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
17663
18076
  toRulesyncRule() {
17664
18077
  const rulesyncFrontmatter = {
@@ -17718,8 +18131,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
17718
18131
  }) {
17719
18132
  const settablePaths = this.getSettablePaths();
17720
18133
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
17721
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path118.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
17722
- const fileContent = await readFileContent((0, import_node_path118.join)(baseDir, relativePath));
18134
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path121.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
18135
+ const fileContent = await readFileContent((0, import_node_path121.join)(baseDir, relativePath));
17723
18136
  return new _AugmentcodeLegacyRule({
17724
18137
  baseDir,
17725
18138
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -17748,7 +18161,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
17748
18161
  };
17749
18162
 
17750
18163
  // src/features/rules/augmentcode-rule.ts
17751
- var import_node_path119 = require("path");
18164
+ var import_node_path122 = require("path");
17752
18165
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
17753
18166
  toRulesyncRule() {
17754
18167
  return this.toRulesyncRuleDefault();
@@ -17779,7 +18192,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
17779
18192
  relativeFilePath,
17780
18193
  validate = true
17781
18194
  }) {
17782
- const filePath = (0, import_node_path119.join)(
18195
+ const filePath = (0, import_node_path122.join)(
17783
18196
  baseDir,
17784
18197
  this.getSettablePaths().nonRoot.relativeDirPath,
17785
18198
  relativeFilePath
@@ -17819,7 +18232,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
17819
18232
  };
17820
18233
 
17821
18234
  // src/features/rules/claudecode-legacy-rule.ts
17822
- var import_node_path120 = require("path");
18235
+ var import_node_path123 = require("path");
17823
18236
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17824
18237
  static getSettablePaths({
17825
18238
  global,
@@ -17861,7 +18274,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17861
18274
  if (isRoot) {
17862
18275
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
17863
18276
  const fileContent2 = await readFileContent(
17864
- (0, import_node_path120.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
18277
+ (0, import_node_path123.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
17865
18278
  );
17866
18279
  return new _ClaudecodeLegacyRule({
17867
18280
  baseDir,
@@ -17875,8 +18288,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17875
18288
  if (!paths.nonRoot) {
17876
18289
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17877
18290
  }
17878
- const relativePath = (0, import_node_path120.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
17879
- const fileContent = await readFileContent((0, import_node_path120.join)(baseDir, relativePath));
18291
+ const relativePath = (0, import_node_path123.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18292
+ const fileContent = await readFileContent((0, import_node_path123.join)(baseDir, relativePath));
17880
18293
  return new _ClaudecodeLegacyRule({
17881
18294
  baseDir,
17882
18295
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17935,7 +18348,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17935
18348
  };
17936
18349
 
17937
18350
  // src/features/rules/claudecode-rule.ts
17938
- var import_node_path121 = require("path");
18351
+ var import_node_path124 = require("path");
17939
18352
  var import_mini67 = require("zod/mini");
17940
18353
  var ClaudecodeRuleFrontmatterSchema = import_mini67.z.object({
17941
18354
  paths: import_mini67.z.optional(import_mini67.z.array(import_mini67.z.string()))
@@ -17976,7 +18389,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17976
18389
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
17977
18390
  if (!result.success) {
17978
18391
  throw new Error(
17979
- `Invalid frontmatter in ${(0, import_node_path121.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18392
+ `Invalid frontmatter in ${(0, import_node_path124.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17980
18393
  );
17981
18394
  }
17982
18395
  }
@@ -18006,7 +18419,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
18006
18419
  if (isRoot) {
18007
18420
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
18008
18421
  const fileContent2 = await readFileContent(
18009
- (0, import_node_path121.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
18422
+ (0, import_node_path124.join)(baseDir, rootDirPath, paths.root.relativeFilePath)
18010
18423
  );
18011
18424
  return new _ClaudecodeRule({
18012
18425
  baseDir,
@@ -18021,8 +18434,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
18021
18434
  if (!paths.nonRoot) {
18022
18435
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18023
18436
  }
18024
- const relativePath = (0, import_node_path121.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18025
- const filePath = (0, import_node_path121.join)(baseDir, relativePath);
18437
+ const relativePath = (0, import_node_path124.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18438
+ const filePath = (0, import_node_path124.join)(baseDir, relativePath);
18026
18439
  const fileContent = await readFileContent(filePath);
18027
18440
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
18028
18441
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
@@ -18133,7 +18546,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
18133
18546
  return {
18134
18547
  success: false,
18135
18548
  error: new Error(
18136
- `Invalid frontmatter in ${(0, import_node_path121.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18549
+ `Invalid frontmatter in ${(0, import_node_path124.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18137
18550
  )
18138
18551
  };
18139
18552
  }
@@ -18153,7 +18566,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
18153
18566
  };
18154
18567
 
18155
18568
  // src/features/rules/cline-rule.ts
18156
- var import_node_path122 = require("path");
18569
+ var import_node_path125 = require("path");
18157
18570
  var import_mini68 = require("zod/mini");
18158
18571
  var ClineRuleFrontmatterSchema = import_mini68.z.object({
18159
18572
  description: import_mini68.z.string()
@@ -18199,7 +18612,7 @@ var ClineRule = class _ClineRule extends ToolRule {
18199
18612
  validate = true
18200
18613
  }) {
18201
18614
  const fileContent = await readFileContent(
18202
- (0, import_node_path122.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18615
+ (0, import_node_path125.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18203
18616
  );
18204
18617
  return new _ClineRule({
18205
18618
  baseDir,
@@ -18225,7 +18638,7 @@ var ClineRule = class _ClineRule extends ToolRule {
18225
18638
  };
18226
18639
 
18227
18640
  // src/features/rules/codexcli-rule.ts
18228
- var import_node_path123 = require("path");
18641
+ var import_node_path126 = require("path");
18229
18642
  var CodexcliRule = class _CodexcliRule extends ToolRule {
18230
18643
  static getSettablePaths({
18231
18644
  global,
@@ -18260,7 +18673,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
18260
18673
  if (isRoot) {
18261
18674
  const relativePath2 = paths.root.relativeFilePath;
18262
18675
  const fileContent2 = await readFileContent(
18263
- (0, import_node_path123.join)(baseDir, paths.root.relativeDirPath, relativePath2)
18676
+ (0, import_node_path126.join)(baseDir, paths.root.relativeDirPath, relativePath2)
18264
18677
  );
18265
18678
  return new _CodexcliRule({
18266
18679
  baseDir,
@@ -18274,8 +18687,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
18274
18687
  if (!paths.nonRoot) {
18275
18688
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18276
18689
  }
18277
- const relativePath = (0, import_node_path123.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18278
- const fileContent = await readFileContent((0, import_node_path123.join)(baseDir, relativePath));
18690
+ const relativePath = (0, import_node_path126.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18691
+ const fileContent = await readFileContent((0, import_node_path126.join)(baseDir, relativePath));
18279
18692
  return new _CodexcliRule({
18280
18693
  baseDir,
18281
18694
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18334,7 +18747,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
18334
18747
  };
18335
18748
 
18336
18749
  // src/features/rules/copilot-rule.ts
18337
- var import_node_path124 = require("path");
18750
+ var import_node_path127 = require("path");
18338
18751
  var import_mini69 = require("zod/mini");
18339
18752
  var CopilotRuleFrontmatterSchema = import_mini69.z.object({
18340
18753
  description: import_mini69.z.optional(import_mini69.z.string()),
@@ -18371,7 +18784,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
18371
18784
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
18372
18785
  if (!result.success) {
18373
18786
  throw new Error(
18374
- `Invalid frontmatter in ${(0, import_node_path124.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18787
+ `Invalid frontmatter in ${(0, import_node_path127.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18375
18788
  );
18376
18789
  }
18377
18790
  }
@@ -18461,8 +18874,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
18461
18874
  const paths = this.getSettablePaths({ global });
18462
18875
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
18463
18876
  if (isRoot) {
18464
- const relativePath2 = (0, import_node_path124.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
18465
- const filePath2 = (0, import_node_path124.join)(baseDir, relativePath2);
18877
+ const relativePath2 = (0, import_node_path127.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
18878
+ const filePath2 = (0, import_node_path127.join)(baseDir, relativePath2);
18466
18879
  const fileContent2 = await readFileContent(filePath2);
18467
18880
  return new _CopilotRule({
18468
18881
  baseDir,
@@ -18477,8 +18890,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
18477
18890
  if (!paths.nonRoot) {
18478
18891
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18479
18892
  }
18480
- const relativePath = (0, import_node_path124.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18481
- const filePath = (0, import_node_path124.join)(baseDir, relativePath);
18893
+ const relativePath = (0, import_node_path127.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18894
+ const filePath = (0, import_node_path127.join)(baseDir, relativePath);
18482
18895
  const fileContent = await readFileContent(filePath);
18483
18896
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
18484
18897
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
@@ -18524,7 +18937,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
18524
18937
  return {
18525
18938
  success: false,
18526
18939
  error: new Error(
18527
- `Invalid frontmatter in ${(0, import_node_path124.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18940
+ `Invalid frontmatter in ${(0, import_node_path127.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18528
18941
  )
18529
18942
  };
18530
18943
  }
@@ -18580,7 +18993,7 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
18580
18993
  };
18581
18994
 
18582
18995
  // src/features/rules/cursor-rule.ts
18583
- var import_node_path125 = require("path");
18996
+ var import_node_path128 = require("path");
18584
18997
  var import_mini70 = require("zod/mini");
18585
18998
  var CursorRuleFrontmatterSchema = import_mini70.z.object({
18586
18999
  description: import_mini70.z.optional(import_mini70.z.string()),
@@ -18602,7 +19015,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18602
19015
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
18603
19016
  if (!result.success) {
18604
19017
  throw new Error(
18605
- `Invalid frontmatter in ${(0, import_node_path125.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
19018
+ `Invalid frontmatter in ${(0, import_node_path128.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18606
19019
  );
18607
19020
  }
18608
19021
  }
@@ -18718,7 +19131,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18718
19131
  relativeFilePath,
18719
19132
  validate = true
18720
19133
  }) {
18721
- const filePath = (0, import_node_path125.join)(
19134
+ const filePath = (0, import_node_path128.join)(
18722
19135
  baseDir,
18723
19136
  this.getSettablePaths().nonRoot.relativeDirPath,
18724
19137
  relativeFilePath
@@ -18728,7 +19141,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18728
19141
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
18729
19142
  if (!result.success) {
18730
19143
  throw new Error(
18731
- `Invalid frontmatter in ${(0, import_node_path125.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
19144
+ `Invalid frontmatter in ${(0, import_node_path128.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
18732
19145
  );
18733
19146
  }
18734
19147
  return new _CursorRule({
@@ -18765,7 +19178,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18765
19178
  return {
18766
19179
  success: false,
18767
19180
  error: new Error(
18768
- `Invalid frontmatter in ${(0, import_node_path125.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
19181
+ `Invalid frontmatter in ${(0, import_node_path128.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18769
19182
  )
18770
19183
  };
18771
19184
  }
@@ -18785,7 +19198,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18785
19198
  };
18786
19199
 
18787
19200
  // src/features/rules/deepagents-rule.ts
18788
- var import_node_path126 = require("path");
19201
+ var import_node_path129 = require("path");
18789
19202
  var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18790
19203
  constructor({ fileContent, root, ...rest }) {
18791
19204
  super({
@@ -18812,8 +19225,8 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18812
19225
  }) {
18813
19226
  const settablePaths = this.getSettablePaths();
18814
19227
  const isRoot = relativeFilePath === "AGENTS.md";
18815
- const relativePath = isRoot ? (0, import_node_path126.join)(".deepagents", "AGENTS.md") : (0, import_node_path126.join)(".deepagents", "memories", relativeFilePath);
18816
- const fileContent = await readFileContent((0, import_node_path126.join)(baseDir, relativePath));
19228
+ const relativePath = isRoot ? (0, import_node_path129.join)(".deepagents", "AGENTS.md") : (0, import_node_path129.join)(".deepagents", "memories", relativeFilePath);
19229
+ const fileContent = await readFileContent((0, import_node_path129.join)(baseDir, relativePath));
18817
19230
  return new _DeepagentsRule({
18818
19231
  baseDir,
18819
19232
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -18868,7 +19281,7 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18868
19281
  };
18869
19282
 
18870
19283
  // src/features/rules/factorydroid-rule.ts
18871
- var import_node_path127 = require("path");
19284
+ var import_node_path130 = require("path");
18872
19285
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18873
19286
  constructor({ fileContent, root, ...rest }) {
18874
19287
  super({
@@ -18908,8 +19321,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18908
19321
  const paths = this.getSettablePaths({ global });
18909
19322
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
18910
19323
  if (isRoot) {
18911
- const relativePath2 = (0, import_node_path127.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
18912
- const fileContent2 = await readFileContent((0, import_node_path127.join)(baseDir, relativePath2));
19324
+ const relativePath2 = (0, import_node_path130.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
19325
+ const fileContent2 = await readFileContent((0, import_node_path130.join)(baseDir, relativePath2));
18913
19326
  return new _FactorydroidRule({
18914
19327
  baseDir,
18915
19328
  relativeDirPath: paths.root.relativeDirPath,
@@ -18922,8 +19335,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18922
19335
  if (!paths.nonRoot) {
18923
19336
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18924
19337
  }
18925
- const relativePath = (0, import_node_path127.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
18926
- const fileContent = await readFileContent((0, import_node_path127.join)(baseDir, relativePath));
19338
+ const relativePath = (0, import_node_path130.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
19339
+ const fileContent = await readFileContent((0, import_node_path130.join)(baseDir, relativePath));
18927
19340
  return new _FactorydroidRule({
18928
19341
  baseDir,
18929
19342
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18982,7 +19395,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18982
19395
  };
18983
19396
 
18984
19397
  // src/features/rules/geminicli-rule.ts
18985
- var import_node_path128 = require("path");
19398
+ var import_node_path131 = require("path");
18986
19399
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18987
19400
  static getSettablePaths({
18988
19401
  global,
@@ -19017,7 +19430,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
19017
19430
  if (isRoot) {
19018
19431
  const relativePath2 = paths.root.relativeFilePath;
19019
19432
  const fileContent2 = await readFileContent(
19020
- (0, import_node_path128.join)(baseDir, paths.root.relativeDirPath, relativePath2)
19433
+ (0, import_node_path131.join)(baseDir, paths.root.relativeDirPath, relativePath2)
19021
19434
  );
19022
19435
  return new _GeminiCliRule({
19023
19436
  baseDir,
@@ -19031,8 +19444,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
19031
19444
  if (!paths.nonRoot) {
19032
19445
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
19033
19446
  }
19034
- const relativePath = (0, import_node_path128.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
19035
- const fileContent = await readFileContent((0, import_node_path128.join)(baseDir, relativePath));
19447
+ const relativePath = (0, import_node_path131.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
19448
+ const fileContent = await readFileContent((0, import_node_path131.join)(baseDir, relativePath));
19036
19449
  return new _GeminiCliRule({
19037
19450
  baseDir,
19038
19451
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -19091,7 +19504,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
19091
19504
  };
19092
19505
 
19093
19506
  // src/features/rules/goose-rule.ts
19094
- var import_node_path129 = require("path");
19507
+ var import_node_path132 = require("path");
19095
19508
  var GooseRule = class _GooseRule extends ToolRule {
19096
19509
  static getSettablePaths({
19097
19510
  global,
@@ -19126,7 +19539,7 @@ var GooseRule = class _GooseRule extends ToolRule {
19126
19539
  if (isRoot) {
19127
19540
  const relativePath2 = paths.root.relativeFilePath;
19128
19541
  const fileContent2 = await readFileContent(
19129
- (0, import_node_path129.join)(baseDir, paths.root.relativeDirPath, relativePath2)
19542
+ (0, import_node_path132.join)(baseDir, paths.root.relativeDirPath, relativePath2)
19130
19543
  );
19131
19544
  return new _GooseRule({
19132
19545
  baseDir,
@@ -19140,8 +19553,8 @@ var GooseRule = class _GooseRule extends ToolRule {
19140
19553
  if (!paths.nonRoot) {
19141
19554
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
19142
19555
  }
19143
- const relativePath = (0, import_node_path129.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
19144
- const fileContent = await readFileContent((0, import_node_path129.join)(baseDir, relativePath));
19556
+ const relativePath = (0, import_node_path132.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
19557
+ const fileContent = await readFileContent((0, import_node_path132.join)(baseDir, relativePath));
19145
19558
  return new _GooseRule({
19146
19559
  baseDir,
19147
19560
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -19200,7 +19613,7 @@ var GooseRule = class _GooseRule extends ToolRule {
19200
19613
  };
19201
19614
 
19202
19615
  // src/features/rules/junie-rule.ts
19203
- var import_node_path130 = require("path");
19616
+ var import_node_path133 = require("path");
19204
19617
  var JunieRule = class _JunieRule extends ToolRule {
19205
19618
  static getSettablePaths(_options = {}) {
19206
19619
  return {
@@ -19229,8 +19642,8 @@ var JunieRule = class _JunieRule extends ToolRule {
19229
19642
  }) {
19230
19643
  const isRoot = _JunieRule.isRootRelativeFilePath(relativeFilePath);
19231
19644
  const settablePaths = this.getSettablePaths();
19232
- const relativePath = isRoot ? (0, import_node_path130.join)(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : (0, import_node_path130.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
19233
- const fileContent = await readFileContent((0, import_node_path130.join)(baseDir, relativePath));
19645
+ const relativePath = isRoot ? (0, import_node_path133.join)(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : (0, import_node_path133.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
19646
+ const fileContent = await readFileContent((0, import_node_path133.join)(baseDir, relativePath));
19234
19647
  return new _JunieRule({
19235
19648
  baseDir,
19236
19649
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -19285,7 +19698,7 @@ var JunieRule = class _JunieRule extends ToolRule {
19285
19698
  };
19286
19699
 
19287
19700
  // src/features/rules/kilo-rule.ts
19288
- var import_node_path131 = require("path");
19701
+ var import_node_path134 = require("path");
19289
19702
  var KiloRule = class _KiloRule extends ToolRule {
19290
19703
  static getSettablePaths({
19291
19704
  global,
@@ -19320,7 +19733,7 @@ var KiloRule = class _KiloRule extends ToolRule {
19320
19733
  if (isRoot) {
19321
19734
  const relativePath2 = paths.root.relativeFilePath;
19322
19735
  const fileContent2 = await readFileContent(
19323
- (0, import_node_path131.join)(baseDir, paths.root.relativeDirPath, relativePath2)
19736
+ (0, import_node_path134.join)(baseDir, paths.root.relativeDirPath, relativePath2)
19324
19737
  );
19325
19738
  return new _KiloRule({
19326
19739
  baseDir,
@@ -19334,8 +19747,8 @@ var KiloRule = class _KiloRule extends ToolRule {
19334
19747
  if (!paths.nonRoot) {
19335
19748
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
19336
19749
  }
19337
- const relativePath = (0, import_node_path131.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
19338
- const fileContent = await readFileContent((0, import_node_path131.join)(baseDir, relativePath));
19750
+ const relativePath = (0, import_node_path134.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
19751
+ const fileContent = await readFileContent((0, import_node_path134.join)(baseDir, relativePath));
19339
19752
  return new _KiloRule({
19340
19753
  baseDir,
19341
19754
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -19394,7 +19807,7 @@ var KiloRule = class _KiloRule extends ToolRule {
19394
19807
  };
19395
19808
 
19396
19809
  // src/features/rules/kiro-rule.ts
19397
- var import_node_path132 = require("path");
19810
+ var import_node_path135 = require("path");
19398
19811
  var KiroRule = class _KiroRule extends ToolRule {
19399
19812
  static getSettablePaths(_options = {}) {
19400
19813
  return {
@@ -19409,7 +19822,7 @@ var KiroRule = class _KiroRule extends ToolRule {
19409
19822
  validate = true
19410
19823
  }) {
19411
19824
  const fileContent = await readFileContent(
19412
- (0, import_node_path132.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19825
+ (0, import_node_path135.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19413
19826
  );
19414
19827
  return new _KiroRule({
19415
19828
  baseDir,
@@ -19463,7 +19876,7 @@ var KiroRule = class _KiroRule extends ToolRule {
19463
19876
  };
19464
19877
 
19465
19878
  // src/features/rules/opencode-rule.ts
19466
- var import_node_path133 = require("path");
19879
+ var import_node_path136 = require("path");
19467
19880
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
19468
19881
  static getSettablePaths({
19469
19882
  global,
@@ -19498,7 +19911,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
19498
19911
  if (isRoot) {
19499
19912
  const relativePath2 = paths.root.relativeFilePath;
19500
19913
  const fileContent2 = await readFileContent(
19501
- (0, import_node_path133.join)(baseDir, paths.root.relativeDirPath, relativePath2)
19914
+ (0, import_node_path136.join)(baseDir, paths.root.relativeDirPath, relativePath2)
19502
19915
  );
19503
19916
  return new _OpenCodeRule({
19504
19917
  baseDir,
@@ -19512,8 +19925,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
19512
19925
  if (!paths.nonRoot) {
19513
19926
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
19514
19927
  }
19515
- const relativePath = (0, import_node_path133.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
19516
- const fileContent = await readFileContent((0, import_node_path133.join)(baseDir, relativePath));
19928
+ const relativePath = (0, import_node_path136.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
19929
+ const fileContent = await readFileContent((0, import_node_path136.join)(baseDir, relativePath));
19517
19930
  return new _OpenCodeRule({
19518
19931
  baseDir,
19519
19932
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -19572,7 +19985,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
19572
19985
  };
19573
19986
 
19574
19987
  // src/features/rules/qwencode-rule.ts
19575
- var import_node_path134 = require("path");
19988
+ var import_node_path137 = require("path");
19576
19989
  var QwencodeRule = class _QwencodeRule extends ToolRule {
19577
19990
  static getSettablePaths(_options = {}) {
19578
19991
  return {
@@ -19591,8 +20004,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
19591
20004
  validate = true
19592
20005
  }) {
19593
20006
  const isRoot = relativeFilePath === "QWEN.md";
19594
- const relativePath = isRoot ? "QWEN.md" : (0, import_node_path134.join)(".qwen", "memories", relativeFilePath);
19595
- const fileContent = await readFileContent((0, import_node_path134.join)(baseDir, relativePath));
20007
+ const relativePath = isRoot ? "QWEN.md" : (0, import_node_path137.join)(".qwen", "memories", relativeFilePath);
20008
+ const fileContent = await readFileContent((0, import_node_path137.join)(baseDir, relativePath));
19596
20009
  return new _QwencodeRule({
19597
20010
  baseDir,
19598
20011
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -19644,7 +20057,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
19644
20057
  };
19645
20058
 
19646
20059
  // src/features/rules/replit-rule.ts
19647
- var import_node_path135 = require("path");
20060
+ var import_node_path138 = require("path");
19648
20061
  var ReplitRule = class _ReplitRule extends ToolRule {
19649
20062
  static getSettablePaths(_options = {}) {
19650
20063
  return {
@@ -19666,7 +20079,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
19666
20079
  }
19667
20080
  const relativePath = paths.root.relativeFilePath;
19668
20081
  const fileContent = await readFileContent(
19669
- (0, import_node_path135.join)(baseDir, paths.root.relativeDirPath, relativePath)
20082
+ (0, import_node_path138.join)(baseDir, paths.root.relativeDirPath, relativePath)
19670
20083
  );
19671
20084
  return new _ReplitRule({
19672
20085
  baseDir,
@@ -19732,7 +20145,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
19732
20145
  };
19733
20146
 
19734
20147
  // src/features/rules/roo-rule.ts
19735
- var import_node_path136 = require("path");
20148
+ var import_node_path139 = require("path");
19736
20149
  var RooRule = class _RooRule extends ToolRule {
19737
20150
  static getSettablePaths(_options = {}) {
19738
20151
  return {
@@ -19747,7 +20160,7 @@ var RooRule = class _RooRule extends ToolRule {
19747
20160
  validate = true
19748
20161
  }) {
19749
20162
  const fileContent = await readFileContent(
19750
- (0, import_node_path136.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
20163
+ (0, import_node_path139.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19751
20164
  );
19752
20165
  return new _RooRule({
19753
20166
  baseDir,
@@ -19816,7 +20229,7 @@ var RooRule = class _RooRule extends ToolRule {
19816
20229
  };
19817
20230
 
19818
20231
  // src/features/rules/rovodev-rule.ts
19819
- var import_node_path137 = require("path");
20232
+ var import_node_path140 = require("path");
19820
20233
  var DISALLOWED_ROVODEV_MODULAR_RULE_BASENAMES = /* @__PURE__ */ new Set(["agents.md", "agents.local.md"]);
19821
20234
  var RovodevRule = class _RovodevRule extends ToolRule {
19822
20235
  /**
@@ -19860,7 +20273,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19860
20273
  root: rovodevAgents,
19861
20274
  alternativeRoots: [{ relativeDirPath: ".", relativeFilePath: "AGENTS.md" }],
19862
20275
  nonRoot: {
19863
- relativeDirPath: (0, import_node_path137.join)(".rovodev", ".rulesync", "modular-rules")
20276
+ relativeDirPath: (0, import_node_path140.join)(".rovodev", ".rulesync", "modular-rules")
19864
20277
  }
19865
20278
  };
19866
20279
  }
@@ -19899,10 +20312,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19899
20312
  }) {
19900
20313
  if (!this.isAllowedModularRulesRelativePath(relativeFilePath)) {
19901
20314
  throw new Error(
19902
- `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${(0, import_node_path137.join)(relativeDirPath, relativeFilePath)}`
20315
+ `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${(0, import_node_path140.join)(relativeDirPath, relativeFilePath)}`
19903
20316
  );
19904
20317
  }
19905
- const fileContent = await readFileContent((0, import_node_path137.join)(baseDir, relativeDirPath, relativeFilePath));
20318
+ const fileContent = await readFileContent((0, import_node_path140.join)(baseDir, relativeDirPath, relativeFilePath));
19906
20319
  return new _RovodevRule({
19907
20320
  baseDir,
19908
20321
  relativeDirPath,
@@ -19922,10 +20335,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19922
20335
  paths
19923
20336
  }) {
19924
20337
  const relativeDirPath = overrideDirPath ?? paths.root.relativeDirPath;
19925
- const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${(0, import_node_path137.join)(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : (0, import_node_path137.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
20338
+ const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${(0, import_node_path140.join)(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : (0, import_node_path140.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
19926
20339
  if (relativeFilePath !== "AGENTS.md") {
19927
20340
  throw new Error(
19928
- `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path137.join)(relativeDirPath, relativeFilePath)}`
20341
+ `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path140.join)(relativeDirPath, relativeFilePath)}`
19929
20342
  );
19930
20343
  }
19931
20344
  const allowed = relativeDirPath === paths.root.relativeDirPath || "alternativeRoots" in paths && paths.alternativeRoots?.some(
@@ -19933,10 +20346,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19933
20346
  );
19934
20347
  if (!allowed) {
19935
20348
  throw new Error(
19936
- `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path137.join)(relativeDirPath, relativeFilePath)}`
20349
+ `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path140.join)(relativeDirPath, relativeFilePath)}`
19937
20350
  );
19938
20351
  }
19939
- const fileContent = await readFileContent((0, import_node_path137.join)(baseDir, relativeDirPath, relativeFilePath));
20352
+ const fileContent = await readFileContent((0, import_node_path140.join)(baseDir, relativeDirPath, relativeFilePath));
19940
20353
  return new _RovodevRule({
19941
20354
  baseDir,
19942
20355
  relativeDirPath,
@@ -20049,8 +20462,114 @@ var RovodevRule = class _RovodevRule extends ToolRule {
20049
20462
  }
20050
20463
  };
20051
20464
 
20465
+ // src/features/rules/takt-rule.ts
20466
+ var import_node_path141 = require("path");
20467
+ var DEFAULT_TAKT_RULE_DIR = "policies";
20468
+ var TaktRule = class _TaktRule extends ToolRule {
20469
+ static getSettablePaths({
20470
+ global,
20471
+ excludeToolDir
20472
+ } = {}) {
20473
+ if (global) {
20474
+ return {
20475
+ root: {
20476
+ relativeDirPath: buildToolPath(
20477
+ ".takt",
20478
+ (0, import_node_path141.join)("facets", DEFAULT_TAKT_RULE_DIR),
20479
+ excludeToolDir
20480
+ ),
20481
+ relativeFilePath: "overview.md"
20482
+ }
20483
+ };
20484
+ }
20485
+ return {
20486
+ nonRoot: {
20487
+ relativeDirPath: buildToolPath(
20488
+ ".takt",
20489
+ (0, import_node_path141.join)("facets", DEFAULT_TAKT_RULE_DIR),
20490
+ excludeToolDir
20491
+ )
20492
+ }
20493
+ };
20494
+ }
20495
+ constructor({ body, ...rest }) {
20496
+ super({
20497
+ ...rest,
20498
+ fileContent: body
20499
+ });
20500
+ }
20501
+ static async fromFile({
20502
+ baseDir = process.cwd(),
20503
+ relativeFilePath,
20504
+ validate = true,
20505
+ relativeDirPath: overrideDirPath
20506
+ }) {
20507
+ const dirPath = overrideDirPath ?? (0, import_node_path141.join)(".takt", "facets", DEFAULT_TAKT_RULE_DIR);
20508
+ const filePath = (0, import_node_path141.join)(baseDir, dirPath, relativeFilePath);
20509
+ const fileContent = await readFileContent(filePath);
20510
+ const { body } = parseFrontmatter(fileContent, filePath);
20511
+ return new _TaktRule({
20512
+ baseDir,
20513
+ relativeDirPath: dirPath,
20514
+ relativeFilePath,
20515
+ body: body.trim(),
20516
+ validate,
20517
+ root: false
20518
+ });
20519
+ }
20520
+ static forDeletion({
20521
+ baseDir = process.cwd(),
20522
+ relativeDirPath,
20523
+ relativeFilePath
20524
+ }) {
20525
+ return new _TaktRule({
20526
+ baseDir,
20527
+ relativeDirPath,
20528
+ relativeFilePath,
20529
+ body: "",
20530
+ validate: false,
20531
+ root: false
20532
+ });
20533
+ }
20534
+ static fromRulesyncRule({
20535
+ baseDir = process.cwd(),
20536
+ rulesyncRule,
20537
+ validate = true
20538
+ }) {
20539
+ const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
20540
+ const taktSection = rulesyncFrontmatter.takt;
20541
+ const sourceLabel = rulesyncRule.getRelativeFilePath();
20542
+ const overrideName = typeof taktSection?.name === "string" ? taktSection.name : void 0;
20543
+ const sourceStem = rulesyncRule.getRelativeFilePath().replace(/\.md$/u, "");
20544
+ const stem = overrideName ?? sourceStem;
20545
+ assertSafeTaktName({ name: stem, featureLabel: "rule", sourceLabel });
20546
+ const relativeFilePath = `${stem}.md`;
20547
+ const relativeDirPath = (0, import_node_path141.join)(".takt", "facets", DEFAULT_TAKT_RULE_DIR);
20548
+ return new _TaktRule({
20549
+ baseDir,
20550
+ relativeDirPath,
20551
+ relativeFilePath,
20552
+ body: rulesyncRule.getBody(),
20553
+ validate,
20554
+ root: false
20555
+ });
20556
+ }
20557
+ toRulesyncRule() {
20558
+ return this.toRulesyncRuleDefault();
20559
+ }
20560
+ validate() {
20561
+ return { success: true, error: null };
20562
+ }
20563
+ static isTargetedByRulesyncRule(rulesyncRule) {
20564
+ return this.isTargetedByRulesyncRuleDefault({
20565
+ rulesyncRule,
20566
+ toolTarget: "takt"
20567
+ });
20568
+ }
20569
+ };
20570
+
20052
20571
  // src/features/rules/warp-rule.ts
20053
- var import_node_path138 = require("path");
20572
+ var import_node_path142 = require("path");
20054
20573
  var WarpRule = class _WarpRule extends ToolRule {
20055
20574
  constructor({ fileContent, root, ...rest }) {
20056
20575
  super({
@@ -20076,8 +20595,8 @@ var WarpRule = class _WarpRule extends ToolRule {
20076
20595
  validate = true
20077
20596
  }) {
20078
20597
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
20079
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path138.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
20080
- const fileContent = await readFileContent((0, import_node_path138.join)(baseDir, relativePath));
20598
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path142.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
20599
+ const fileContent = await readFileContent((0, import_node_path142.join)(baseDir, relativePath));
20081
20600
  return new _WarpRule({
20082
20601
  baseDir,
20083
20602
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -20132,7 +20651,7 @@ var WarpRule = class _WarpRule extends ToolRule {
20132
20651
  };
20133
20652
 
20134
20653
  // src/features/rules/windsurf-rule.ts
20135
- var import_node_path139 = require("path");
20654
+ var import_node_path143 = require("path");
20136
20655
  var WindsurfRule = class _WindsurfRule extends ToolRule {
20137
20656
  static getSettablePaths(_options = {}) {
20138
20657
  return {
@@ -20147,7 +20666,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
20147
20666
  validate = true
20148
20667
  }) {
20149
20668
  const fileContent = await readFileContent(
20150
- (0, import_node_path139.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
20669
+ (0, import_node_path143.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
20151
20670
  );
20152
20671
  return new _WindsurfRule({
20153
20672
  baseDir,
@@ -20242,11 +20761,12 @@ var rulesProcessorToolTargets = [
20242
20761
  "replit",
20243
20762
  "roo",
20244
20763
  "rovodev",
20764
+ "takt",
20245
20765
  "warp",
20246
20766
  "windsurf"
20247
20767
  ];
20248
20768
  var RulesProcessorToolTargetSchema = import_mini71.z.enum(rulesProcessorToolTargets);
20249
- var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path140.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
20769
+ var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path144.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
20250
20770
  var RulesFeatureOptionsSchema = import_mini71.z.looseObject({
20251
20771
  ruleDiscoveryMode: import_mini71.z.optional(import_mini71.z.enum(["none", "explicit"])),
20252
20772
  includeLocalRoot: import_mini71.z.optional(import_mini71.z.boolean())
@@ -20558,6 +21078,20 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
20558
21078
  }
20559
21079
  }
20560
21080
  ],
21081
+ [
21082
+ "takt",
21083
+ {
21084
+ class: TaktRule,
21085
+ meta: {
21086
+ extension: "md",
21087
+ supportsGlobal: true,
21088
+ ruleDiscoveryMode: "auto"
21089
+ // No `additionalConventions` here: TAKT does not synthesize a root
21090
+ // overview rule (TaktRule.fromRulesyncRule always emits non-root files),
21091
+ // so the conventions block would never be rendered anywhere.
21092
+ }
21093
+ }
21094
+ ],
20561
21095
  [
20562
21096
  "warp",
20563
21097
  {
@@ -20716,7 +21250,7 @@ var RulesProcessor = class extends FeatureProcessor {
20716
21250
  }).relativeDirPath;
20717
21251
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
20718
21252
  const frontmatter = skill.getFrontmatter();
20719
- const relativePath = (0, import_node_path140.join)(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
21253
+ const relativePath = (0, import_node_path144.join)(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
20720
21254
  return {
20721
21255
  name: frontmatter.name,
20722
21256
  description: frontmatter.description,
@@ -20845,12 +21379,12 @@ var RulesProcessor = class extends FeatureProcessor {
20845
21379
  * Load and parse rulesync rule files from .rulesync/rules/ directory
20846
21380
  */
20847
21381
  async loadRulesyncFiles() {
20848
- const rulesyncBaseDir = (0, import_node_path140.join)(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
20849
- const files = await findFilesByGlobs((0, import_node_path140.join)(rulesyncBaseDir, "**", "*.md"));
21382
+ const rulesyncBaseDir = (0, import_node_path144.join)(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
21383
+ const files = await findFilesByGlobs((0, import_node_path144.join)(rulesyncBaseDir, "**", "*.md"));
20850
21384
  this.logger.debug(`Found ${files.length} rulesync files`);
20851
21385
  const rulesyncRules = await Promise.all(
20852
21386
  files.map((file) => {
20853
- const relativeFilePath = (0, import_node_path140.relative)(rulesyncBaseDir, file);
21387
+ const relativeFilePath = (0, import_node_path144.relative)(rulesyncBaseDir, file);
20854
21388
  checkPathTraversal({
20855
21389
  relativePath: relativeFilePath,
20856
21390
  intendedRootDir: rulesyncBaseDir
@@ -20925,7 +21459,7 @@ var RulesProcessor = class extends FeatureProcessor {
20925
21459
  global: this.global
20926
21460
  });
20927
21461
  const resolveRelativeDirPath = (filePath) => {
20928
- const dirName = (0, import_node_path140.dirname)((0, import_node_path140.relative)(this.baseDir, filePath));
21462
+ const dirName = (0, import_node_path144.dirname)((0, import_node_path144.relative)(this.baseDir, filePath));
20929
21463
  return dirName === "" ? "." : dirName;
20930
21464
  };
20931
21465
  const buildDeletionRulesFromPaths = (filePaths, opts) => {
@@ -20933,7 +21467,7 @@ var RulesProcessor = class extends FeatureProcessor {
20933
21467
  const effectiveBaseDir = isNonRoot ? opts.baseDirOverride : this.baseDir;
20934
21468
  return filePaths.map((filePath) => {
20935
21469
  const relativeDirPath = isNonRoot ? opts.relativeDirPathOverride : resolveRelativeDirPath(filePath);
20936
- const relativeFilePath = isNonRoot ? (0, import_node_path140.relative)(effectiveBaseDir, filePath) : (0, import_node_path140.basename)(filePath);
21470
+ const relativeFilePath = isNonRoot ? (0, import_node_path144.relative)(effectiveBaseDir, filePath) : (0, import_node_path144.basename)(filePath);
20937
21471
  checkPathTraversal({
20938
21472
  relativePath: isNonRoot ? relativeFilePath : relativeDirPath,
20939
21473
  intendedRootDir: effectiveBaseDir
@@ -20961,13 +21495,13 @@ var RulesProcessor = class extends FeatureProcessor {
20961
21495
  return [];
20962
21496
  }
20963
21497
  const uniqueRootFilePaths = await findFilesWithFallback(
20964
- (0, import_node_path140.join)(
21498
+ (0, import_node_path144.join)(
20965
21499
  this.baseDir,
20966
21500
  settablePaths.root.relativeDirPath ?? ".",
20967
21501
  settablePaths.root.relativeFilePath
20968
21502
  ),
20969
21503
  settablePaths.alternativeRoots,
20970
- (alt) => (0, import_node_path140.join)(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
21504
+ (alt) => (0, import_node_path144.join)(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
20971
21505
  );
20972
21506
  if (forDeletion) {
20973
21507
  return buildDeletionRulesFromPaths(uniqueRootFilePaths);
@@ -20981,7 +21515,7 @@ var RulesProcessor = class extends FeatureProcessor {
20981
21515
  });
20982
21516
  return factory.class.fromFile({
20983
21517
  baseDir: this.baseDir,
20984
- relativeFilePath: (0, import_node_path140.basename)(filePath),
21518
+ relativeFilePath: (0, import_node_path144.basename)(filePath),
20985
21519
  relativeDirPath,
20986
21520
  global: this.global
20987
21521
  });
@@ -20998,7 +21532,7 @@ var RulesProcessor = class extends FeatureProcessor {
20998
21532
  return [];
20999
21533
  }
21000
21534
  const uniqueLocalRootFilePaths2 = await findFilesByGlobs(
21001
- (0, import_node_path140.join)(this.baseDir, "AGENTS.local.md")
21535
+ (0, import_node_path144.join)(this.baseDir, "AGENTS.local.md")
21002
21536
  );
21003
21537
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths2);
21004
21538
  }
@@ -21009,9 +21543,9 @@ var RulesProcessor = class extends FeatureProcessor {
21009
21543
  return [];
21010
21544
  }
21011
21545
  const uniqueLocalRootFilePaths = await findFilesWithFallback(
21012
- (0, import_node_path140.join)(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
21546
+ (0, import_node_path144.join)(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
21013
21547
  settablePaths.alternativeRoots,
21014
- (alt) => (0, import_node_path140.join)(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
21548
+ (alt) => (0, import_node_path144.join)(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
21015
21549
  );
21016
21550
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths);
21017
21551
  })();
@@ -21022,20 +21556,20 @@ var RulesProcessor = class extends FeatureProcessor {
21022
21556
  if (!forDeletion || this.toolTarget !== "rovodev" || this.global) {
21023
21557
  return [];
21024
21558
  }
21025
- const primaryPaths = await findFilesByGlobs((0, import_node_path140.join)(this.baseDir, ".rovodev", "AGENTS.md"));
21559
+ const primaryPaths = await findFilesByGlobs((0, import_node_path144.join)(this.baseDir, ".rovodev", "AGENTS.md"));
21026
21560
  if (primaryPaths.length === 0) {
21027
21561
  return [];
21028
21562
  }
21029
- const mirrorPaths = await findFilesByGlobs((0, import_node_path140.join)(this.baseDir, "AGENTS.md"));
21563
+ const mirrorPaths = await findFilesByGlobs((0, import_node_path144.join)(this.baseDir, "AGENTS.md"));
21030
21564
  return buildDeletionRulesFromPaths(mirrorPaths);
21031
21565
  })();
21032
21566
  const nonRootToolRules = await (async () => {
21033
21567
  if (!settablePaths.nonRoot) {
21034
21568
  return [];
21035
21569
  }
21036
- const nonRootBaseDir = (0, import_node_path140.join)(this.baseDir, settablePaths.nonRoot.relativeDirPath);
21570
+ const nonRootBaseDir = (0, import_node_path144.join)(this.baseDir, settablePaths.nonRoot.relativeDirPath);
21037
21571
  const nonRootFilePaths = await findFilesByGlobs(
21038
- (0, import_node_path140.join)(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
21572
+ (0, import_node_path144.join)(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
21039
21573
  );
21040
21574
  if (forDeletion) {
21041
21575
  return buildDeletionRulesFromPaths(nonRootFilePaths, {
@@ -21045,18 +21579,18 @@ var RulesProcessor = class extends FeatureProcessor {
21045
21579
  }
21046
21580
  const modularRootRelative = settablePaths.nonRoot.relativeDirPath;
21047
21581
  const nonRootPathsForImport = this.toolTarget === "rovodev" ? nonRootFilePaths.filter((filePath) => {
21048
- const relativeFilePath = (0, import_node_path140.relative)(nonRootBaseDir, filePath);
21582
+ const relativeFilePath = (0, import_node_path144.relative)(nonRootBaseDir, filePath);
21049
21583
  const ok = RovodevRule.isAllowedModularRulesRelativePath(relativeFilePath);
21050
21584
  if (!ok) {
21051
21585
  this.logger.warn(
21052
- `Skipping reserved Rovodev path under modular-rules (import): ${(0, import_node_path140.join)(modularRootRelative, relativeFilePath)}`
21586
+ `Skipping reserved Rovodev path under modular-rules (import): ${(0, import_node_path144.join)(modularRootRelative, relativeFilePath)}`
21053
21587
  );
21054
21588
  }
21055
21589
  return ok;
21056
21590
  }) : nonRootFilePaths;
21057
21591
  return await Promise.all(
21058
21592
  nonRootPathsForImport.map((filePath) => {
21059
- const relativeFilePath = (0, import_node_path140.relative)(nonRootBaseDir, filePath);
21593
+ const relativeFilePath = (0, import_node_path144.relative)(nonRootBaseDir, filePath);
21060
21594
  checkPathTraversal({
21061
21595
  relativePath: relativeFilePath,
21062
21596
  intendedRootDir: nonRootBaseDir
@@ -21175,14 +21709,14 @@ s/<command> [arguments]
21175
21709
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
21176
21710
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
21177
21711
 
21178
- When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path140.join)(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
21712
+ When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path144.join)(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
21179
21713
  const subagentsSection = subagents ? `## Simulated Subagents
21180
21714
 
21181
21715
  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.
21182
21716
 
21183
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path140.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
21717
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path144.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
21184
21718
 
21185
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path140.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
21719
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path144.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
21186
21720
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
21187
21721
  const result = [
21188
21722
  overview,
@@ -21282,7 +21816,7 @@ function warnUnsupportedTargets(params) {
21282
21816
  }
21283
21817
  }
21284
21818
  async function checkRulesyncDirExists(params) {
21285
- return fileExists((0, import_node_path141.join)(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
21819
+ return fileExists((0, import_node_path145.join)(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
21286
21820
  }
21287
21821
  async function generate(params) {
21288
21822
  const { config, logger } = params;
@@ -21457,7 +21991,11 @@ async function generateCommandsCore(params) {
21457
21991
  logger
21458
21992
  });
21459
21993
  const rulesyncFiles = await processor.loadRulesyncFiles();
21460
- const result = await processFeatureWithRulesyncFiles({ config, processor, rulesyncFiles });
21994
+ const result = await processFeatureWithRulesyncFiles({
21995
+ config,
21996
+ processor,
21997
+ rulesyncFiles
21998
+ });
21461
21999
  totalCount += result.count;
21462
22000
  allPaths.push(...result.paths);
21463
22001
  if (result.hasDiff) hasDiff = true;