rulesync 3.33.0 → 3.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -102,7 +102,7 @@ var Logger = class {
102
102
  var logger = new Logger();
103
103
 
104
104
  // src/cli/commands/generate.ts
105
- var import_es_toolkit2 = require("es-toolkit");
105
+ var import_es_toolkit3 = require("es-toolkit");
106
106
 
107
107
  // src/config/config-resolver.ts
108
108
  var import_node_path2 = require("path");
@@ -113,6 +113,7 @@ var import_node_fs = require("fs");
113
113
  var import_promises = require("fs/promises");
114
114
  var import_node_os = __toESM(require("os"), 1);
115
115
  var import_node_path = require("path");
116
+ var import_es_toolkit = require("es-toolkit");
116
117
  async function ensureDir(dirPath) {
117
118
  try {
118
119
  await (0, import_promises.stat)(dirPath);
@@ -240,6 +241,13 @@ function validateBaseDir(baseDir) {
240
241
  }
241
242
  checkPathTraversal({ relativePath: baseDir, intendedRootDir: process.cwd() });
242
243
  }
244
+ function toKebabCaseFilename(filename) {
245
+ const lastDotIndex = filename.lastIndexOf(".");
246
+ const extension = lastDotIndex > 0 ? filename.slice(lastDotIndex) : "";
247
+ const nameWithoutExt = lastDotIndex > 0 ? filename.slice(0, lastDotIndex) : filename;
248
+ const kebabName = (0, import_es_toolkit.kebabCase)(nameWithoutExt);
249
+ return kebabName + extension;
250
+ }
243
251
 
244
252
  // src/config/config.ts
245
253
  var import_mini3 = require("zod/mini");
@@ -2347,7 +2355,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
2347
2355
 
2348
2356
  // src/features/ignore/claudecode-ignore.ts
2349
2357
  var import_node_path20 = require("path");
2350
- var import_es_toolkit = require("es-toolkit");
2358
+ var import_es_toolkit2 = require("es-toolkit");
2351
2359
  var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
2352
2360
  constructor(params) {
2353
2361
  super(params);
@@ -2397,11 +2405,19 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
2397
2405
  const exists = await fileExists(filePath);
2398
2406
  const existingFileContent = exists ? await readFileContent(filePath) : "{}";
2399
2407
  const existingJsonValue = JSON.parse(existingFileContent);
2408
+ const existingDenies = existingJsonValue.permissions?.deny ?? [];
2409
+ const preservedDenies = existingDenies.filter((deny) => {
2410
+ const isReadPattern = deny.startsWith("Read(") && deny.endsWith(")");
2411
+ if (isReadPattern) {
2412
+ return deniedValues.includes(deny);
2413
+ }
2414
+ return true;
2415
+ });
2400
2416
  const jsonValue = {
2401
2417
  ...existingJsonValue,
2402
2418
  permissions: {
2403
2419
  ...existingJsonValue.permissions,
2404
- deny: (0, import_es_toolkit.uniq)([...existingJsonValue.permissions?.deny ?? [], ...deniedValues].toSorted())
2420
+ deny: (0, import_es_toolkit2.uniq)([...preservedDenies, ...deniedValues].toSorted())
2405
2421
  }
2406
2422
  };
2407
2423
  return new _ClaudecodeIgnore({
@@ -4307,7 +4323,7 @@ var McpProcessor = class extends FeatureProcessor {
4307
4323
  // src/features/rules/rules-processor.ts
4308
4324
  var import_node_path84 = require("path");
4309
4325
  var import_toon = require("@toon-format/toon");
4310
- var import_mini33 = require("zod/mini");
4326
+ var import_mini34 = require("zod/mini");
4311
4327
 
4312
4328
  // src/constants/general.ts
4313
4329
  var SKILL_FILE_NAME = "SKILL.md";
@@ -6173,6 +6189,12 @@ var RulesyncRuleFrontmatterSchema = import_mini28.z.object({
6173
6189
  import_mini28.z.object({
6174
6190
  excludeAgent: import_mini28.z.optional(import_mini28.z.union([import_mini28.z.literal("code-review"), import_mini28.z.literal("coding-agent")]))
6175
6191
  })
6192
+ ),
6193
+ antigravity: import_mini28.z.optional(
6194
+ import_mini28.z.looseObject({
6195
+ trigger: import_mini28.z.optional(import_mini28.z.string()),
6196
+ globs: import_mini28.z.optional(import_mini28.z.array(import_mini28.z.string()))
6197
+ })
6176
6198
  )
6177
6199
  });
6178
6200
  var RulesyncRule = class _RulesyncRule extends RulesyncFile {
@@ -6542,7 +6564,176 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
6542
6564
 
6543
6565
  // src/features/rules/antigravity-rule.ts
6544
6566
  var import_node_path67 = require("path");
6567
+ var import_mini29 = require("zod/mini");
6568
+ var AntigravityRuleFrontmatterSchema = import_mini29.z.looseObject({
6569
+ trigger: import_mini29.z.optional(
6570
+ import_mini29.z.union([
6571
+ import_mini29.z.literal("always_on"),
6572
+ import_mini29.z.literal("glob"),
6573
+ import_mini29.z.literal("manual"),
6574
+ import_mini29.z.literal("model_decision"),
6575
+ import_mini29.z.string()
6576
+ // accepts any string for forward compatibility
6577
+ ])
6578
+ ),
6579
+ globs: import_mini29.z.optional(import_mini29.z.string()),
6580
+ description: import_mini29.z.optional(import_mini29.z.string())
6581
+ });
6582
+ function parseGlobsString(globs) {
6583
+ if (!globs) {
6584
+ return [];
6585
+ }
6586
+ if (Array.isArray(globs)) {
6587
+ return globs;
6588
+ }
6589
+ if (globs.trim() === "") {
6590
+ return [];
6591
+ }
6592
+ return globs.split(",").map((g) => g.trim());
6593
+ }
6594
+ function stringifyGlobs(globs) {
6595
+ if (!globs || globs.length === 0) {
6596
+ return void 0;
6597
+ }
6598
+ return globs.join(",");
6599
+ }
6600
+ function normalizeStoredAntigravity(stored) {
6601
+ if (!stored) {
6602
+ return void 0;
6603
+ }
6604
+ const { globs, ...rest } = stored;
6605
+ return {
6606
+ ...rest,
6607
+ globs: Array.isArray(globs) ? stringifyGlobs(globs) : globs
6608
+ };
6609
+ }
6610
+ var globStrategy = {
6611
+ canHandle: (trigger) => trigger === "glob",
6612
+ generateFrontmatter: (normalized, rulesyncFrontmatter) => {
6613
+ const effectiveGlobsArray = normalized?.globs ? parseGlobsString(normalized.globs) : rulesyncFrontmatter.globs ?? [];
6614
+ return {
6615
+ ...normalized,
6616
+ trigger: "glob",
6617
+ globs: stringifyGlobs(effectiveGlobsArray)
6618
+ };
6619
+ },
6620
+ exportRulesyncData: ({ description, ...frontmatter }) => ({
6621
+ globs: parseGlobsString(frontmatter.globs),
6622
+ description: description || "",
6623
+ antigravity: frontmatter
6624
+ })
6625
+ };
6626
+ var manualStrategy = {
6627
+ canHandle: (trigger) => trigger === "manual",
6628
+ generateFrontmatter: (normalized) => ({
6629
+ ...normalized,
6630
+ trigger: "manual"
6631
+ }),
6632
+ exportRulesyncData: ({ description, ...frontmatter }) => ({
6633
+ globs: [],
6634
+ description: description || "",
6635
+ antigravity: frontmatter
6636
+ })
6637
+ };
6638
+ var alwaysOnStrategy = {
6639
+ canHandle: (trigger) => trigger === "always_on",
6640
+ generateFrontmatter: (normalized) => ({
6641
+ ...normalized,
6642
+ trigger: "always_on"
6643
+ }),
6644
+ exportRulesyncData: ({ description, ...frontmatter }) => ({
6645
+ globs: ["**/*"],
6646
+ description: description || "",
6647
+ antigravity: frontmatter
6648
+ })
6649
+ };
6650
+ var modelDecisionStrategy = {
6651
+ canHandle: (trigger) => trigger === "model_decision",
6652
+ generateFrontmatter: (normalized, rulesyncFrontmatter) => ({
6653
+ ...normalized,
6654
+ trigger: "model_decision",
6655
+ description: rulesyncFrontmatter.description
6656
+ }),
6657
+ exportRulesyncData: ({ description, ...frontmatter }) => ({
6658
+ globs: [],
6659
+ description: description || "",
6660
+ antigravity: frontmatter
6661
+ })
6662
+ };
6663
+ var unknownStrategy = {
6664
+ canHandle: (trigger) => trigger !== void 0,
6665
+ generateFrontmatter: (normalized) => {
6666
+ const trigger = typeof normalized?.trigger === "string" ? normalized.trigger : "manual";
6667
+ return {
6668
+ ...normalized,
6669
+ trigger
6670
+ };
6671
+ },
6672
+ exportRulesyncData: ({ description, ...frontmatter }) => ({
6673
+ globs: frontmatter.globs ? parseGlobsString(frontmatter.globs) : ["**/*"],
6674
+ description: description || "",
6675
+ antigravity: frontmatter
6676
+ })
6677
+ };
6678
+ var inferenceStrategy = {
6679
+ canHandle: (trigger) => trigger === void 0,
6680
+ generateFrontmatter: (normalized, rulesyncFrontmatter) => {
6681
+ const effectiveGlobsArray = normalized?.globs ? parseGlobsString(normalized.globs) : rulesyncFrontmatter.globs ?? [];
6682
+ if (effectiveGlobsArray.length > 0 && !effectiveGlobsArray.includes("**/*") && !effectiveGlobsArray.includes("*")) {
6683
+ return {
6684
+ ...normalized,
6685
+ trigger: "glob",
6686
+ globs: stringifyGlobs(effectiveGlobsArray)
6687
+ };
6688
+ }
6689
+ return {
6690
+ ...normalized,
6691
+ trigger: "always_on"
6692
+ };
6693
+ },
6694
+ exportRulesyncData: ({ description, ...frontmatter }) => ({
6695
+ globs: frontmatter.globs ? parseGlobsString(frontmatter.globs) : ["**/*"],
6696
+ description: description || "",
6697
+ antigravity: frontmatter
6698
+ })
6699
+ };
6700
+ var STRATEGIES = [
6701
+ globStrategy,
6702
+ manualStrategy,
6703
+ alwaysOnStrategy,
6704
+ modelDecisionStrategy,
6705
+ unknownStrategy,
6706
+ inferenceStrategy
6707
+ ];
6545
6708
  var AntigravityRule = class _AntigravityRule extends ToolRule {
6709
+ frontmatter;
6710
+ body;
6711
+ /**
6712
+ * Creates an AntigravityRule instance.
6713
+ *
6714
+ * @param params - Rule parameters including frontmatter and body
6715
+ * @param params.frontmatter - Antigravity-specific frontmatter configuration
6716
+ * @param params.body - The markdown body content (without frontmatter)
6717
+ *
6718
+ * Note: Files without frontmatter will default to always_on trigger during fromFile().
6719
+ */
6720
+ constructor({ frontmatter, body, ...rest }) {
6721
+ if (rest.validate !== false) {
6722
+ const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
6723
+ if (!result.success) {
6724
+ throw new Error(
6725
+ `Invalid frontmatter in ${(0, import_node_path67.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
6726
+ );
6727
+ }
6728
+ }
6729
+ super({
6730
+ ...rest,
6731
+ // Ensure fileContent includes frontmatter when constructed directly
6732
+ fileContent: stringifyFrontmatter(body, frontmatter)
6733
+ });
6734
+ this.frontmatter = frontmatter;
6735
+ this.body = body;
6736
+ }
6546
6737
  static getSettablePaths() {
6547
6738
  return {
6548
6739
  nonRoot: {
@@ -6555,36 +6746,121 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
6555
6746
  relativeFilePath,
6556
6747
  validate = true
6557
6748
  }) {
6558
- const fileContent = await readFileContent(
6559
- (0, import_node_path67.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6749
+ const filePath = (0, import_node_path67.join)(
6750
+ baseDir,
6751
+ this.getSettablePaths().nonRoot.relativeDirPath,
6752
+ relativeFilePath
6560
6753
  );
6754
+ const fileContent = await readFileContent(filePath);
6755
+ const { frontmatter, body } = parseFrontmatter(fileContent);
6756
+ let parsedFrontmatter;
6757
+ if (validate) {
6758
+ const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
6759
+ if (result.success) {
6760
+ parsedFrontmatter = result.data;
6761
+ } else {
6762
+ throw new Error(`Invalid frontmatter in ${filePath}: ${formatError(result.error)}`);
6763
+ }
6764
+ } else {
6765
+ parsedFrontmatter = frontmatter;
6766
+ }
6561
6767
  return new _AntigravityRule({
6562
6768
  baseDir,
6563
6769
  relativeDirPath: this.getSettablePaths().nonRoot.relativeDirPath,
6564
6770
  relativeFilePath,
6565
- fileContent,
6771
+ body,
6772
+ frontmatter: parsedFrontmatter,
6566
6773
  validate,
6567
6774
  root: false
6568
6775
  });
6569
6776
  }
6777
+ /**
6778
+ * Converts a RulesyncRule to an AntigravityRule.
6779
+ *
6780
+ * Trigger inference:
6781
+ * - If antigravity.trigger is set, it's preserved
6782
+ * - If specific globs are set, infers "glob" trigger
6783
+ * - Otherwise, infers "always_on" trigger
6784
+ */
6570
6785
  static fromRulesyncRule({
6571
6786
  baseDir = process.cwd(),
6572
6787
  rulesyncRule,
6573
6788
  validate = true
6574
6789
  }) {
6575
- return new _AntigravityRule(
6576
- this.buildToolRuleParamsDefault({
6577
- baseDir,
6578
- rulesyncRule,
6579
- validate,
6580
- nonRootPath: this.getSettablePaths().nonRoot
6581
- })
6582
- );
6790
+ const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
6791
+ const storedAntigravity = rulesyncFrontmatter.antigravity;
6792
+ const normalized = normalizeStoredAntigravity(storedAntigravity);
6793
+ const storedTrigger = storedAntigravity?.trigger;
6794
+ const strategy = STRATEGIES.find((s) => s.canHandle(storedTrigger));
6795
+ if (!strategy) {
6796
+ throw new Error(`No strategy found for trigger: ${storedTrigger}`);
6797
+ }
6798
+ const frontmatter = strategy.generateFrontmatter(normalized, rulesyncFrontmatter);
6799
+ const paths = this.getSettablePaths();
6800
+ const kebabCaseFilename = toKebabCaseFilename(rulesyncRule.getRelativeFilePath());
6801
+ return new _AntigravityRule({
6802
+ baseDir,
6803
+ relativeDirPath: paths.nonRoot.relativeDirPath,
6804
+ relativeFilePath: kebabCaseFilename,
6805
+ frontmatter,
6806
+ body: rulesyncRule.getBody(),
6807
+ validate,
6808
+ root: false
6809
+ });
6583
6810
  }
6811
+ /**
6812
+ * Converts this AntigravityRule to a RulesyncRule.
6813
+ *
6814
+ * The Antigravity configuration is preserved in the RulesyncRule's
6815
+ * frontmatter.antigravity field for round-trip compatibility.
6816
+ *
6817
+ * Note: All Antigravity rules are treated as non-root (root: false),
6818
+ * as they are all placed in the .agent/rules directory.
6819
+ *
6820
+ * @returns RulesyncRule instance with Antigravity config preserved
6821
+ */
6584
6822
  toRulesyncRule() {
6585
- return this.toRulesyncRuleDefault();
6823
+ const strategy = STRATEGIES.find((s) => s.canHandle(this.frontmatter.trigger));
6824
+ let rulesyncData = {
6825
+ globs: [],
6826
+ description: "",
6827
+ antigravity: this.frontmatter
6828
+ };
6829
+ if (strategy) {
6830
+ rulesyncData = strategy.exportRulesyncData(this.frontmatter);
6831
+ }
6832
+ const antigravityForRulesync = {
6833
+ ...rulesyncData.antigravity,
6834
+ globs: this.frontmatter.globs ? parseGlobsString(this.frontmatter.globs) : void 0
6835
+ };
6836
+ return new RulesyncRule({
6837
+ baseDir: process.cwd(),
6838
+ relativeDirPath: RulesyncRule.getSettablePaths().recommended.relativeDirPath,
6839
+ relativeFilePath: this.getRelativeFilePath(),
6840
+ frontmatter: {
6841
+ root: false,
6842
+ targets: ["*"],
6843
+ ...rulesyncData,
6844
+ antigravity: antigravityForRulesync
6845
+ },
6846
+ // When converting back, we only want the body content
6847
+ body: this.body
6848
+ });
6849
+ }
6850
+ getBody() {
6851
+ return this.body;
6852
+ }
6853
+ // Helper to access raw file content including frontmatter is `this.fileContent` (from ToolFile)
6854
+ // But we might want `body` only for some operations?
6855
+ // ToolFile.getFileContent() returns the whole string.
6856
+ getFrontmatter() {
6857
+ return this.frontmatter;
6586
6858
  }
6587
6859
  validate() {
6860
+ const result = AntigravityRuleFrontmatterSchema.safeParse(this.frontmatter);
6861
+ if (!result.success) {
6862
+ return { success: false, error: new Error(formatError(result.error)) };
6863
+ }
6588
6864
  return { success: true, error: null };
6589
6865
  }
6590
6866
  static isTargetedByRulesyncRule(rulesyncRule) {
@@ -6818,9 +7094,9 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
6818
7094
 
6819
7095
  // src/features/rules/claudecode-rule.ts
6820
7096
  var import_node_path71 = require("path");
6821
- var import_mini29 = require("zod/mini");
6822
- var ClaudecodeRuleFrontmatterSchema = import_mini29.z.object({
6823
- paths: import_mini29.z.optional(import_mini29.z.string())
7097
+ var import_mini30 = require("zod/mini");
7098
+ var ClaudecodeRuleFrontmatterSchema = import_mini30.z.object({
7099
+ paths: import_mini30.z.optional(import_mini30.z.string())
6824
7100
  });
6825
7101
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
6826
7102
  frontmatter;
@@ -7010,9 +7286,9 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
7010
7286
 
7011
7287
  // src/features/rules/cline-rule.ts
7012
7288
  var import_node_path72 = require("path");
7013
- var import_mini30 = require("zod/mini");
7014
- var ClineRuleFrontmatterSchema = import_mini30.z.object({
7015
- description: import_mini30.z.string()
7289
+ var import_mini31 = require("zod/mini");
7290
+ var ClineRuleFrontmatterSchema = import_mini31.z.object({
7291
+ description: import_mini31.z.string()
7016
7292
  });
7017
7293
  var ClineRule = class _ClineRule extends ToolRule {
7018
7294
  static getSettablePaths() {
@@ -7159,11 +7435,11 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
7159
7435
 
7160
7436
  // src/features/rules/copilot-rule.ts
7161
7437
  var import_node_path74 = require("path");
7162
- var import_mini31 = require("zod/mini");
7163
- var CopilotRuleFrontmatterSchema = import_mini31.z.object({
7164
- description: import_mini31.z.optional(import_mini31.z.string()),
7165
- applyTo: import_mini31.z.optional(import_mini31.z.string()),
7166
- excludeAgent: import_mini31.z.optional(import_mini31.z.union([import_mini31.z.literal("code-review"), import_mini31.z.literal("coding-agent")]))
7438
+ var import_mini32 = require("zod/mini");
7439
+ var CopilotRuleFrontmatterSchema = import_mini32.z.object({
7440
+ description: import_mini32.z.optional(import_mini32.z.string()),
7441
+ applyTo: import_mini32.z.optional(import_mini32.z.string()),
7442
+ excludeAgent: import_mini32.z.optional(import_mini32.z.union([import_mini32.z.literal("code-review"), import_mini32.z.literal("coding-agent")]))
7167
7443
  });
7168
7444
  var CopilotRule = class _CopilotRule extends ToolRule {
7169
7445
  frontmatter;
@@ -7331,11 +7607,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
7331
7607
 
7332
7608
  // src/features/rules/cursor-rule.ts
7333
7609
  var import_node_path75 = require("path");
7334
- var import_mini32 = require("zod/mini");
7335
- var CursorRuleFrontmatterSchema = import_mini32.z.object({
7336
- description: import_mini32.z.optional(import_mini32.z.string()),
7337
- globs: import_mini32.z.optional(import_mini32.z.string()),
7338
- alwaysApply: import_mini32.z.optional(import_mini32.z.boolean())
7610
+ var import_mini33 = require("zod/mini");
7611
+ var CursorRuleFrontmatterSchema = import_mini33.z.object({
7612
+ description: import_mini33.z.optional(import_mini33.z.string()),
7613
+ globs: import_mini33.z.optional(import_mini33.z.string()),
7614
+ alwaysApply: import_mini33.z.optional(import_mini33.z.boolean())
7339
7615
  });
7340
7616
  var CursorRule = class _CursorRule extends ToolRule {
7341
7617
  frontmatter;
@@ -8053,7 +8329,7 @@ var rulesProcessorToolTargets = [
8053
8329
  "warp",
8054
8330
  "windsurf"
8055
8331
  ];
8056
- var RulesProcessorToolTargetSchema = import_mini33.z.enum(rulesProcessorToolTargets);
8332
+ var RulesProcessorToolTargetSchema = import_mini34.z.enum(rulesProcessorToolTargets);
8057
8333
  var toolRuleFactories = /* @__PURE__ */ new Map([
8058
8334
  [
8059
8335
  "agentsmd",
@@ -8653,7 +8929,7 @@ async function generateRules(config, options) {
8653
8929
  }
8654
8930
  let totalRulesOutputs = 0;
8655
8931
  logger.info("Generating rule files...");
8656
- const toolTargets = (0, import_es_toolkit2.intersection)(
8932
+ const toolTargets = (0, import_es_toolkit3.intersection)(
8657
8933
  config.getTargets(),
8658
8934
  RulesProcessor.getToolTargets({ global: config.getGlobal() })
8659
8935
  );
@@ -8695,7 +8971,7 @@ async function generateIgnore(config) {
8695
8971
  }
8696
8972
  let totalIgnoreOutputs = 0;
8697
8973
  logger.info("Generating ignore files...");
8698
- for (const toolTarget of (0, import_es_toolkit2.intersection)(config.getTargets(), IgnoreProcessor.getToolTargets())) {
8974
+ for (const toolTarget of (0, import_es_toolkit3.intersection)(config.getTargets(), IgnoreProcessor.getToolTargets())) {
8699
8975
  for (const baseDir of config.getBaseDirs()) {
8700
8976
  try {
8701
8977
  const processor = new IgnoreProcessor({
@@ -8734,7 +9010,7 @@ async function generateMcp(config) {
8734
9010
  if (config.getModularMcp()) {
8735
9011
  logger.info("\u2139\uFE0F Modular MCP support is experimental.");
8736
9012
  }
8737
- const toolTargets = (0, import_es_toolkit2.intersection)(
9013
+ const toolTargets = (0, import_es_toolkit3.intersection)(
8738
9014
  config.getTargets(),
8739
9015
  McpProcessor.getToolTargets({ global: config.getGlobal() })
8740
9016
  );
@@ -8766,7 +9042,7 @@ async function generateCommands(config) {
8766
9042
  }
8767
9043
  let totalCommandOutputs = 0;
8768
9044
  logger.info("Generating command files...");
8769
- const toolTargets = (0, import_es_toolkit2.intersection)(
9045
+ const toolTargets = (0, import_es_toolkit3.intersection)(
8770
9046
  config.getTargets(),
8771
9047
  CommandsProcessor.getToolTargets({
8772
9048
  global: config.getGlobal(),
@@ -8800,7 +9076,7 @@ async function generateSubagents(config) {
8800
9076
  }
8801
9077
  let totalSubagentOutputs = 0;
8802
9078
  logger.info("Generating subagent files...");
8803
- const toolTargets = (0, import_es_toolkit2.intersection)(
9079
+ const toolTargets = (0, import_es_toolkit3.intersection)(
8804
9080
  config.getTargets(),
8805
9081
  SubagentsProcessor.getToolTargets({
8806
9082
  global: config.getGlobal(),
@@ -8835,7 +9111,7 @@ async function generateSkills(config) {
8835
9111
  let totalSkillOutputs = 0;
8836
9112
  const allSkills = [];
8837
9113
  logger.info("Generating skill files...");
8838
- const toolTargets = (0, import_es_toolkit2.intersection)(
9114
+ const toolTargets = (0, import_es_toolkit3.intersection)(
8839
9115
  config.getTargets(),
8840
9116
  SkillsProcessor.getToolTargets({
8841
9117
  global: config.getGlobal(),
@@ -9402,7 +9678,7 @@ var import_fastmcp = require("fastmcp");
9402
9678
 
9403
9679
  // src/mcp/commands.ts
9404
9680
  var import_node_path87 = require("path");
9405
- var import_mini34 = require("zod/mini");
9681
+ var import_mini35 = require("zod/mini");
9406
9682
  var maxCommandSizeBytes = 1024 * 1024;
9407
9683
  var maxCommandsCount = 1e3;
9408
9684
  async function listCommands() {
@@ -9521,17 +9797,17 @@ async function deleteCommand({ relativePathFromCwd }) {
9521
9797
  }
9522
9798
  }
9523
9799
  var commandToolSchemas = {
9524
- listCommands: import_mini34.z.object({}),
9525
- getCommand: import_mini34.z.object({
9526
- relativePathFromCwd: import_mini34.z.string()
9800
+ listCommands: import_mini35.z.object({}),
9801
+ getCommand: import_mini35.z.object({
9802
+ relativePathFromCwd: import_mini35.z.string()
9527
9803
  }),
9528
- putCommand: import_mini34.z.object({
9529
- relativePathFromCwd: import_mini34.z.string(),
9804
+ putCommand: import_mini35.z.object({
9805
+ relativePathFromCwd: import_mini35.z.string(),
9530
9806
  frontmatter: RulesyncCommandFrontmatterSchema,
9531
- body: import_mini34.z.string()
9807
+ body: import_mini35.z.string()
9532
9808
  }),
9533
- deleteCommand: import_mini34.z.object({
9534
- relativePathFromCwd: import_mini34.z.string()
9809
+ deleteCommand: import_mini35.z.object({
9810
+ relativePathFromCwd: import_mini35.z.string()
9535
9811
  })
9536
9812
  };
9537
9813
  var commandTools = {
@@ -9580,7 +9856,7 @@ var commandTools = {
9580
9856
 
9581
9857
  // src/mcp/ignore.ts
9582
9858
  var import_node_path88 = require("path");
9583
- var import_mini35 = require("zod/mini");
9859
+ var import_mini36 = require("zod/mini");
9584
9860
  var maxIgnoreFileSizeBytes = 100 * 1024;
9585
9861
  async function getIgnoreFile() {
9586
9862
  const ignoreFilePath = (0, import_node_path88.join)(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
@@ -9637,11 +9913,11 @@ async function deleteIgnoreFile() {
9637
9913
  }
9638
9914
  }
9639
9915
  var ignoreToolSchemas = {
9640
- getIgnoreFile: import_mini35.z.object({}),
9641
- putIgnoreFile: import_mini35.z.object({
9642
- content: import_mini35.z.string()
9916
+ getIgnoreFile: import_mini36.z.object({}),
9917
+ putIgnoreFile: import_mini36.z.object({
9918
+ content: import_mini36.z.string()
9643
9919
  }),
9644
- deleteIgnoreFile: import_mini35.z.object({})
9920
+ deleteIgnoreFile: import_mini36.z.object({})
9645
9921
  };
9646
9922
  var ignoreTools = {
9647
9923
  getIgnoreFile: {
@@ -9675,7 +9951,7 @@ var ignoreTools = {
9675
9951
 
9676
9952
  // src/mcp/mcp.ts
9677
9953
  var import_node_path89 = require("path");
9678
- var import_mini36 = require("zod/mini");
9954
+ var import_mini37 = require("zod/mini");
9679
9955
  var maxMcpSizeBytes = 1024 * 1024;
9680
9956
  async function getMcpFile() {
9681
9957
  const config = await ConfigResolver.resolve({});
@@ -9765,11 +10041,11 @@ async function deleteMcpFile() {
9765
10041
  }
9766
10042
  }
9767
10043
  var mcpToolSchemas = {
9768
- getMcpFile: import_mini36.z.object({}),
9769
- putMcpFile: import_mini36.z.object({
9770
- content: import_mini36.z.string()
10044
+ getMcpFile: import_mini37.z.object({}),
10045
+ putMcpFile: import_mini37.z.object({
10046
+ content: import_mini37.z.string()
9771
10047
  }),
9772
- deleteMcpFile: import_mini36.z.object({})
10048
+ deleteMcpFile: import_mini37.z.object({})
9773
10049
  };
9774
10050
  var mcpTools = {
9775
10051
  getMcpFile: {
@@ -9803,7 +10079,7 @@ var mcpTools = {
9803
10079
 
9804
10080
  // src/mcp/rules.ts
9805
10081
  var import_node_path90 = require("path");
9806
- var import_mini37 = require("zod/mini");
10082
+ var import_mini38 = require("zod/mini");
9807
10083
  var maxRuleSizeBytes = 1024 * 1024;
9808
10084
  var maxRulesCount = 1e3;
9809
10085
  async function listRules() {
@@ -9922,17 +10198,17 @@ async function deleteRule({ relativePathFromCwd }) {
9922
10198
  }
9923
10199
  }
9924
10200
  var ruleToolSchemas = {
9925
- listRules: import_mini37.z.object({}),
9926
- getRule: import_mini37.z.object({
9927
- relativePathFromCwd: import_mini37.z.string()
10201
+ listRules: import_mini38.z.object({}),
10202
+ getRule: import_mini38.z.object({
10203
+ relativePathFromCwd: import_mini38.z.string()
9928
10204
  }),
9929
- putRule: import_mini37.z.object({
9930
- relativePathFromCwd: import_mini37.z.string(),
10205
+ putRule: import_mini38.z.object({
10206
+ relativePathFromCwd: import_mini38.z.string(),
9931
10207
  frontmatter: RulesyncRuleFrontmatterSchema,
9932
- body: import_mini37.z.string()
10208
+ body: import_mini38.z.string()
9933
10209
  }),
9934
- deleteRule: import_mini37.z.object({
9935
- relativePathFromCwd: import_mini37.z.string()
10210
+ deleteRule: import_mini38.z.object({
10211
+ relativePathFromCwd: import_mini38.z.string()
9936
10212
  })
9937
10213
  };
9938
10214
  var ruleTools = {
@@ -9981,7 +10257,7 @@ var ruleTools = {
9981
10257
 
9982
10258
  // src/mcp/skills.ts
9983
10259
  var import_node_path91 = require("path");
9984
- var import_mini38 = require("zod/mini");
10260
+ var import_mini39 = require("zod/mini");
9985
10261
  var maxSkillSizeBytes = 1024 * 1024;
9986
10262
  var maxSkillsCount = 1e3;
9987
10263
  function aiDirFileToMcpSkillFile(file) {
@@ -10149,23 +10425,23 @@ async function deleteSkill({
10149
10425
  );
10150
10426
  }
10151
10427
  }
10152
- var McpSkillFileSchema = import_mini38.z.object({
10153
- name: import_mini38.z.string(),
10154
- body: import_mini38.z.string()
10428
+ var McpSkillFileSchema = import_mini39.z.object({
10429
+ name: import_mini39.z.string(),
10430
+ body: import_mini39.z.string()
10155
10431
  });
10156
10432
  var skillToolSchemas = {
10157
- listSkills: import_mini38.z.object({}),
10158
- getSkill: import_mini38.z.object({
10159
- relativeDirPathFromCwd: import_mini38.z.string()
10433
+ listSkills: import_mini39.z.object({}),
10434
+ getSkill: import_mini39.z.object({
10435
+ relativeDirPathFromCwd: import_mini39.z.string()
10160
10436
  }),
10161
- putSkill: import_mini38.z.object({
10162
- relativeDirPathFromCwd: import_mini38.z.string(),
10437
+ putSkill: import_mini39.z.object({
10438
+ relativeDirPathFromCwd: import_mini39.z.string(),
10163
10439
  frontmatter: RulesyncSkillFrontmatterSchema,
10164
- body: import_mini38.z.string(),
10165
- otherFiles: import_mini38.z.optional(import_mini38.z.array(McpSkillFileSchema))
10440
+ body: import_mini39.z.string(),
10441
+ otherFiles: import_mini39.z.optional(import_mini39.z.array(McpSkillFileSchema))
10166
10442
  }),
10167
- deleteSkill: import_mini38.z.object({
10168
- relativeDirPathFromCwd: import_mini38.z.string()
10443
+ deleteSkill: import_mini39.z.object({
10444
+ relativeDirPathFromCwd: import_mini39.z.string()
10169
10445
  })
10170
10446
  };
10171
10447
  var skillTools = {
@@ -10215,7 +10491,7 @@ var skillTools = {
10215
10491
 
10216
10492
  // src/mcp/subagents.ts
10217
10493
  var import_node_path92 = require("path");
10218
- var import_mini39 = require("zod/mini");
10494
+ var import_mini40 = require("zod/mini");
10219
10495
  var maxSubagentSizeBytes = 1024 * 1024;
10220
10496
  var maxSubagentsCount = 1e3;
10221
10497
  async function listSubagents() {
@@ -10339,17 +10615,17 @@ async function deleteSubagent({ relativePathFromCwd }) {
10339
10615
  }
10340
10616
  }
10341
10617
  var subagentToolSchemas = {
10342
- listSubagents: import_mini39.z.object({}),
10343
- getSubagent: import_mini39.z.object({
10344
- relativePathFromCwd: import_mini39.z.string()
10618
+ listSubagents: import_mini40.z.object({}),
10619
+ getSubagent: import_mini40.z.object({
10620
+ relativePathFromCwd: import_mini40.z.string()
10345
10621
  }),
10346
- putSubagent: import_mini39.z.object({
10347
- relativePathFromCwd: import_mini39.z.string(),
10622
+ putSubagent: import_mini40.z.object({
10623
+ relativePathFromCwd: import_mini40.z.string(),
10348
10624
  frontmatter: RulesyncSubagentFrontmatterSchema,
10349
- body: import_mini39.z.string()
10625
+ body: import_mini40.z.string()
10350
10626
  }),
10351
- deleteSubagent: import_mini39.z.object({
10352
- relativePathFromCwd: import_mini39.z.string()
10627
+ deleteSubagent: import_mini40.z.object({
10628
+ relativePathFromCwd: import_mini40.z.string()
10353
10629
  })
10354
10630
  };
10355
10631
  var subagentTools = {
@@ -10433,7 +10709,7 @@ async function mcpCommand({ version }) {
10433
10709
  }
10434
10710
 
10435
10711
  // src/cli/index.ts
10436
- var getVersion = () => "3.33.0";
10712
+ var getVersion = () => "3.34.0";
10437
10713
  var main = async () => {
10438
10714
  const program = new import_commander.Command();
10439
10715
  const version = getVersion();