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.js CHANGED
@@ -90,6 +90,7 @@ import { globSync } from "fs";
90
90
  import { mkdir, readdir, readFile, rm, stat, writeFile } from "fs/promises";
91
91
  import os from "os";
92
92
  import { basename, dirname, join, relative, resolve } from "path";
93
+ import { kebabCase } from "es-toolkit";
93
94
  async function ensureDir(dirPath) {
94
95
  try {
95
96
  await stat(dirPath);
@@ -217,6 +218,13 @@ function validateBaseDir(baseDir) {
217
218
  }
218
219
  checkPathTraversal({ relativePath: baseDir, intendedRootDir: process.cwd() });
219
220
  }
221
+ function toKebabCaseFilename(filename) {
222
+ const lastDotIndex = filename.lastIndexOf(".");
223
+ const extension = lastDotIndex > 0 ? filename.slice(lastDotIndex) : "";
224
+ const nameWithoutExt = lastDotIndex > 0 ? filename.slice(0, lastDotIndex) : filename;
225
+ const kebabName = kebabCase(nameWithoutExt);
226
+ return kebabName + extension;
227
+ }
220
228
 
221
229
  // src/config/config.ts
222
230
  import { optional, z as z3 } from "zod/mini";
@@ -2374,11 +2382,19 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
2374
2382
  const exists = await fileExists(filePath);
2375
2383
  const existingFileContent = exists ? await readFileContent(filePath) : "{}";
2376
2384
  const existingJsonValue = JSON.parse(existingFileContent);
2385
+ const existingDenies = existingJsonValue.permissions?.deny ?? [];
2386
+ const preservedDenies = existingDenies.filter((deny) => {
2387
+ const isReadPattern = deny.startsWith("Read(") && deny.endsWith(")");
2388
+ if (isReadPattern) {
2389
+ return deniedValues.includes(deny);
2390
+ }
2391
+ return true;
2392
+ });
2377
2393
  const jsonValue = {
2378
2394
  ...existingJsonValue,
2379
2395
  permissions: {
2380
2396
  ...existingJsonValue.permissions,
2381
- deny: uniq([...existingJsonValue.permissions?.deny ?? [], ...deniedValues].toSorted())
2397
+ deny: uniq([...preservedDenies, ...deniedValues].toSorted())
2382
2398
  }
2383
2399
  };
2384
2400
  return new _ClaudecodeIgnore({
@@ -4284,7 +4300,7 @@ var McpProcessor = class extends FeatureProcessor {
4284
4300
  // src/features/rules/rules-processor.ts
4285
4301
  import { basename as basename21, join as join82 } from "path";
4286
4302
  import { encode } from "@toon-format/toon";
4287
- import { z as z33 } from "zod/mini";
4303
+ import { z as z34 } from "zod/mini";
4288
4304
 
4289
4305
  // src/constants/general.ts
4290
4306
  var SKILL_FILE_NAME = "SKILL.md";
@@ -6150,6 +6166,12 @@ var RulesyncRuleFrontmatterSchema = z28.object({
6150
6166
  z28.object({
6151
6167
  excludeAgent: z28.optional(z28.union([z28.literal("code-review"), z28.literal("coding-agent")]))
6152
6168
  })
6169
+ ),
6170
+ antigravity: z28.optional(
6171
+ z28.looseObject({
6172
+ trigger: z28.optional(z28.string()),
6173
+ globs: z28.optional(z28.array(z28.string()))
6174
+ })
6153
6175
  )
6154
6176
  });
6155
6177
  var RulesyncRule = class _RulesyncRule extends RulesyncFile {
@@ -6519,7 +6541,176 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
6519
6541
 
6520
6542
  // src/features/rules/antigravity-rule.ts
6521
6543
  import { join as join65 } from "path";
6544
+ import { z as z29 } from "zod/mini";
6545
+ var AntigravityRuleFrontmatterSchema = z29.looseObject({
6546
+ trigger: z29.optional(
6547
+ z29.union([
6548
+ z29.literal("always_on"),
6549
+ z29.literal("glob"),
6550
+ z29.literal("manual"),
6551
+ z29.literal("model_decision"),
6552
+ z29.string()
6553
+ // accepts any string for forward compatibility
6554
+ ])
6555
+ ),
6556
+ globs: z29.optional(z29.string()),
6557
+ description: z29.optional(z29.string())
6558
+ });
6559
+ function parseGlobsString(globs) {
6560
+ if (!globs) {
6561
+ return [];
6562
+ }
6563
+ if (Array.isArray(globs)) {
6564
+ return globs;
6565
+ }
6566
+ if (globs.trim() === "") {
6567
+ return [];
6568
+ }
6569
+ return globs.split(",").map((g) => g.trim());
6570
+ }
6571
+ function stringifyGlobs(globs) {
6572
+ if (!globs || globs.length === 0) {
6573
+ return void 0;
6574
+ }
6575
+ return globs.join(",");
6576
+ }
6577
+ function normalizeStoredAntigravity(stored) {
6578
+ if (!stored) {
6579
+ return void 0;
6580
+ }
6581
+ const { globs, ...rest } = stored;
6582
+ return {
6583
+ ...rest,
6584
+ globs: Array.isArray(globs) ? stringifyGlobs(globs) : globs
6585
+ };
6586
+ }
6587
+ var globStrategy = {
6588
+ canHandle: (trigger) => trigger === "glob",
6589
+ generateFrontmatter: (normalized, rulesyncFrontmatter) => {
6590
+ const effectiveGlobsArray = normalized?.globs ? parseGlobsString(normalized.globs) : rulesyncFrontmatter.globs ?? [];
6591
+ return {
6592
+ ...normalized,
6593
+ trigger: "glob",
6594
+ globs: stringifyGlobs(effectiveGlobsArray)
6595
+ };
6596
+ },
6597
+ exportRulesyncData: ({ description, ...frontmatter }) => ({
6598
+ globs: parseGlobsString(frontmatter.globs),
6599
+ description: description || "",
6600
+ antigravity: frontmatter
6601
+ })
6602
+ };
6603
+ var manualStrategy = {
6604
+ canHandle: (trigger) => trigger === "manual",
6605
+ generateFrontmatter: (normalized) => ({
6606
+ ...normalized,
6607
+ trigger: "manual"
6608
+ }),
6609
+ exportRulesyncData: ({ description, ...frontmatter }) => ({
6610
+ globs: [],
6611
+ description: description || "",
6612
+ antigravity: frontmatter
6613
+ })
6614
+ };
6615
+ var alwaysOnStrategy = {
6616
+ canHandle: (trigger) => trigger === "always_on",
6617
+ generateFrontmatter: (normalized) => ({
6618
+ ...normalized,
6619
+ trigger: "always_on"
6620
+ }),
6621
+ exportRulesyncData: ({ description, ...frontmatter }) => ({
6622
+ globs: ["**/*"],
6623
+ description: description || "",
6624
+ antigravity: frontmatter
6625
+ })
6626
+ };
6627
+ var modelDecisionStrategy = {
6628
+ canHandle: (trigger) => trigger === "model_decision",
6629
+ generateFrontmatter: (normalized, rulesyncFrontmatter) => ({
6630
+ ...normalized,
6631
+ trigger: "model_decision",
6632
+ description: rulesyncFrontmatter.description
6633
+ }),
6634
+ exportRulesyncData: ({ description, ...frontmatter }) => ({
6635
+ globs: [],
6636
+ description: description || "",
6637
+ antigravity: frontmatter
6638
+ })
6639
+ };
6640
+ var unknownStrategy = {
6641
+ canHandle: (trigger) => trigger !== void 0,
6642
+ generateFrontmatter: (normalized) => {
6643
+ const trigger = typeof normalized?.trigger === "string" ? normalized.trigger : "manual";
6644
+ return {
6645
+ ...normalized,
6646
+ trigger
6647
+ };
6648
+ },
6649
+ exportRulesyncData: ({ description, ...frontmatter }) => ({
6650
+ globs: frontmatter.globs ? parseGlobsString(frontmatter.globs) : ["**/*"],
6651
+ description: description || "",
6652
+ antigravity: frontmatter
6653
+ })
6654
+ };
6655
+ var inferenceStrategy = {
6656
+ canHandle: (trigger) => trigger === void 0,
6657
+ generateFrontmatter: (normalized, rulesyncFrontmatter) => {
6658
+ const effectiveGlobsArray = normalized?.globs ? parseGlobsString(normalized.globs) : rulesyncFrontmatter.globs ?? [];
6659
+ if (effectiveGlobsArray.length > 0 && !effectiveGlobsArray.includes("**/*") && !effectiveGlobsArray.includes("*")) {
6660
+ return {
6661
+ ...normalized,
6662
+ trigger: "glob",
6663
+ globs: stringifyGlobs(effectiveGlobsArray)
6664
+ };
6665
+ }
6666
+ return {
6667
+ ...normalized,
6668
+ trigger: "always_on"
6669
+ };
6670
+ },
6671
+ exportRulesyncData: ({ description, ...frontmatter }) => ({
6672
+ globs: frontmatter.globs ? parseGlobsString(frontmatter.globs) : ["**/*"],
6673
+ description: description || "",
6674
+ antigravity: frontmatter
6675
+ })
6676
+ };
6677
+ var STRATEGIES = [
6678
+ globStrategy,
6679
+ manualStrategy,
6680
+ alwaysOnStrategy,
6681
+ modelDecisionStrategy,
6682
+ unknownStrategy,
6683
+ inferenceStrategy
6684
+ ];
6522
6685
  var AntigravityRule = class _AntigravityRule extends ToolRule {
6686
+ frontmatter;
6687
+ body;
6688
+ /**
6689
+ * Creates an AntigravityRule instance.
6690
+ *
6691
+ * @param params - Rule parameters including frontmatter and body
6692
+ * @param params.frontmatter - Antigravity-specific frontmatter configuration
6693
+ * @param params.body - The markdown body content (without frontmatter)
6694
+ *
6695
+ * Note: Files without frontmatter will default to always_on trigger during fromFile().
6696
+ */
6697
+ constructor({ frontmatter, body, ...rest }) {
6698
+ if (rest.validate !== false) {
6699
+ const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
6700
+ if (!result.success) {
6701
+ throw new Error(
6702
+ `Invalid frontmatter in ${join65(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
6703
+ );
6704
+ }
6705
+ }
6706
+ super({
6707
+ ...rest,
6708
+ // Ensure fileContent includes frontmatter when constructed directly
6709
+ fileContent: stringifyFrontmatter(body, frontmatter)
6710
+ });
6711
+ this.frontmatter = frontmatter;
6712
+ this.body = body;
6713
+ }
6523
6714
  static getSettablePaths() {
6524
6715
  return {
6525
6716
  nonRoot: {
@@ -6532,36 +6723,121 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
6532
6723
  relativeFilePath,
6533
6724
  validate = true
6534
6725
  }) {
6535
- const fileContent = await readFileContent(
6536
- join65(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6726
+ const filePath = join65(
6727
+ baseDir,
6728
+ this.getSettablePaths().nonRoot.relativeDirPath,
6729
+ relativeFilePath
6537
6730
  );
6731
+ const fileContent = await readFileContent(filePath);
6732
+ const { frontmatter, body } = parseFrontmatter(fileContent);
6733
+ let parsedFrontmatter;
6734
+ if (validate) {
6735
+ const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
6736
+ if (result.success) {
6737
+ parsedFrontmatter = result.data;
6738
+ } else {
6739
+ throw new Error(`Invalid frontmatter in ${filePath}: ${formatError(result.error)}`);
6740
+ }
6741
+ } else {
6742
+ parsedFrontmatter = frontmatter;
6743
+ }
6538
6744
  return new _AntigravityRule({
6539
6745
  baseDir,
6540
6746
  relativeDirPath: this.getSettablePaths().nonRoot.relativeDirPath,
6541
6747
  relativeFilePath,
6542
- fileContent,
6748
+ body,
6749
+ frontmatter: parsedFrontmatter,
6543
6750
  validate,
6544
6751
  root: false
6545
6752
  });
6546
6753
  }
6754
+ /**
6755
+ * Converts a RulesyncRule to an AntigravityRule.
6756
+ *
6757
+ * Trigger inference:
6758
+ * - If antigravity.trigger is set, it's preserved
6759
+ * - If specific globs are set, infers "glob" trigger
6760
+ * - Otherwise, infers "always_on" trigger
6761
+ */
6547
6762
  static fromRulesyncRule({
6548
6763
  baseDir = process.cwd(),
6549
6764
  rulesyncRule,
6550
6765
  validate = true
6551
6766
  }) {
6552
- return new _AntigravityRule(
6553
- this.buildToolRuleParamsDefault({
6554
- baseDir,
6555
- rulesyncRule,
6556
- validate,
6557
- nonRootPath: this.getSettablePaths().nonRoot
6558
- })
6559
- );
6767
+ const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
6768
+ const storedAntigravity = rulesyncFrontmatter.antigravity;
6769
+ const normalized = normalizeStoredAntigravity(storedAntigravity);
6770
+ const storedTrigger = storedAntigravity?.trigger;
6771
+ const strategy = STRATEGIES.find((s) => s.canHandle(storedTrigger));
6772
+ if (!strategy) {
6773
+ throw new Error(`No strategy found for trigger: ${storedTrigger}`);
6774
+ }
6775
+ const frontmatter = strategy.generateFrontmatter(normalized, rulesyncFrontmatter);
6776
+ const paths = this.getSettablePaths();
6777
+ const kebabCaseFilename = toKebabCaseFilename(rulesyncRule.getRelativeFilePath());
6778
+ return new _AntigravityRule({
6779
+ baseDir,
6780
+ relativeDirPath: paths.nonRoot.relativeDirPath,
6781
+ relativeFilePath: kebabCaseFilename,
6782
+ frontmatter,
6783
+ body: rulesyncRule.getBody(),
6784
+ validate,
6785
+ root: false
6786
+ });
6560
6787
  }
6788
+ /**
6789
+ * Converts this AntigravityRule to a RulesyncRule.
6790
+ *
6791
+ * The Antigravity configuration is preserved in the RulesyncRule's
6792
+ * frontmatter.antigravity field for round-trip compatibility.
6793
+ *
6794
+ * Note: All Antigravity rules are treated as non-root (root: false),
6795
+ * as they are all placed in the .agent/rules directory.
6796
+ *
6797
+ * @returns RulesyncRule instance with Antigravity config preserved
6798
+ */
6561
6799
  toRulesyncRule() {
6562
- return this.toRulesyncRuleDefault();
6800
+ const strategy = STRATEGIES.find((s) => s.canHandle(this.frontmatter.trigger));
6801
+ let rulesyncData = {
6802
+ globs: [],
6803
+ description: "",
6804
+ antigravity: this.frontmatter
6805
+ };
6806
+ if (strategy) {
6807
+ rulesyncData = strategy.exportRulesyncData(this.frontmatter);
6808
+ }
6809
+ const antigravityForRulesync = {
6810
+ ...rulesyncData.antigravity,
6811
+ globs: this.frontmatter.globs ? parseGlobsString(this.frontmatter.globs) : void 0
6812
+ };
6813
+ return new RulesyncRule({
6814
+ baseDir: process.cwd(),
6815
+ relativeDirPath: RulesyncRule.getSettablePaths().recommended.relativeDirPath,
6816
+ relativeFilePath: this.getRelativeFilePath(),
6817
+ frontmatter: {
6818
+ root: false,
6819
+ targets: ["*"],
6820
+ ...rulesyncData,
6821
+ antigravity: antigravityForRulesync
6822
+ },
6823
+ // When converting back, we only want the body content
6824
+ body: this.body
6825
+ });
6826
+ }
6827
+ getBody() {
6828
+ return this.body;
6829
+ }
6830
+ // Helper to access raw file content including frontmatter is `this.fileContent` (from ToolFile)
6831
+ // But we might want `body` only for some operations?
6832
+ // ToolFile.getFileContent() returns the whole string.
6833
+ getFrontmatter() {
6834
+ return this.frontmatter;
6563
6835
  }
6564
6836
  validate() {
6837
+ const result = AntigravityRuleFrontmatterSchema.safeParse(this.frontmatter);
6838
+ if (!result.success) {
6839
+ return { success: false, error: new Error(formatError(result.error)) };
6840
+ }
6565
6841
  return { success: true, error: null };
6566
6842
  }
6567
6843
  static isTargetedByRulesyncRule(rulesyncRule) {
@@ -6795,9 +7071,9 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
6795
7071
 
6796
7072
  // src/features/rules/claudecode-rule.ts
6797
7073
  import { join as join69 } from "path";
6798
- import { z as z29 } from "zod/mini";
6799
- var ClaudecodeRuleFrontmatterSchema = z29.object({
6800
- paths: z29.optional(z29.string())
7074
+ import { z as z30 } from "zod/mini";
7075
+ var ClaudecodeRuleFrontmatterSchema = z30.object({
7076
+ paths: z30.optional(z30.string())
6801
7077
  });
6802
7078
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
6803
7079
  frontmatter;
@@ -6987,9 +7263,9 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
6987
7263
 
6988
7264
  // src/features/rules/cline-rule.ts
6989
7265
  import { join as join70 } from "path";
6990
- import { z as z30 } from "zod/mini";
6991
- var ClineRuleFrontmatterSchema = z30.object({
6992
- description: z30.string()
7266
+ import { z as z31 } from "zod/mini";
7267
+ var ClineRuleFrontmatterSchema = z31.object({
7268
+ description: z31.string()
6993
7269
  });
6994
7270
  var ClineRule = class _ClineRule extends ToolRule {
6995
7271
  static getSettablePaths() {
@@ -7136,11 +7412,11 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
7136
7412
 
7137
7413
  // src/features/rules/copilot-rule.ts
7138
7414
  import { join as join72 } from "path";
7139
- import { z as z31 } from "zod/mini";
7140
- var CopilotRuleFrontmatterSchema = z31.object({
7141
- description: z31.optional(z31.string()),
7142
- applyTo: z31.optional(z31.string()),
7143
- excludeAgent: z31.optional(z31.union([z31.literal("code-review"), z31.literal("coding-agent")]))
7415
+ import { z as z32 } from "zod/mini";
7416
+ var CopilotRuleFrontmatterSchema = z32.object({
7417
+ description: z32.optional(z32.string()),
7418
+ applyTo: z32.optional(z32.string()),
7419
+ excludeAgent: z32.optional(z32.union([z32.literal("code-review"), z32.literal("coding-agent")]))
7144
7420
  });
7145
7421
  var CopilotRule = class _CopilotRule extends ToolRule {
7146
7422
  frontmatter;
@@ -7308,11 +7584,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
7308
7584
 
7309
7585
  // src/features/rules/cursor-rule.ts
7310
7586
  import { basename as basename20, join as join73 } from "path";
7311
- import { z as z32 } from "zod/mini";
7312
- var CursorRuleFrontmatterSchema = z32.object({
7313
- description: z32.optional(z32.string()),
7314
- globs: z32.optional(z32.string()),
7315
- alwaysApply: z32.optional(z32.boolean())
7587
+ import { z as z33 } from "zod/mini";
7588
+ var CursorRuleFrontmatterSchema = z33.object({
7589
+ description: z33.optional(z33.string()),
7590
+ globs: z33.optional(z33.string()),
7591
+ alwaysApply: z33.optional(z33.boolean())
7316
7592
  });
7317
7593
  var CursorRule = class _CursorRule extends ToolRule {
7318
7594
  frontmatter;
@@ -8030,7 +8306,7 @@ var rulesProcessorToolTargets = [
8030
8306
  "warp",
8031
8307
  "windsurf"
8032
8308
  ];
8033
- var RulesProcessorToolTargetSchema = z33.enum(rulesProcessorToolTargets);
8309
+ var RulesProcessorToolTargetSchema = z34.enum(rulesProcessorToolTargets);
8034
8310
  var toolRuleFactories = /* @__PURE__ */ new Map([
8035
8311
  [
8036
8312
  "agentsmd",
@@ -9379,7 +9655,7 @@ import { FastMCP } from "fastmcp";
9379
9655
 
9380
9656
  // src/mcp/commands.ts
9381
9657
  import { basename as basename22, join as join85 } from "path";
9382
- import { z as z34 } from "zod/mini";
9658
+ import { z as z35 } from "zod/mini";
9383
9659
  var maxCommandSizeBytes = 1024 * 1024;
9384
9660
  var maxCommandsCount = 1e3;
9385
9661
  async function listCommands() {
@@ -9498,17 +9774,17 @@ async function deleteCommand({ relativePathFromCwd }) {
9498
9774
  }
9499
9775
  }
9500
9776
  var commandToolSchemas = {
9501
- listCommands: z34.object({}),
9502
- getCommand: z34.object({
9503
- relativePathFromCwd: z34.string()
9777
+ listCommands: z35.object({}),
9778
+ getCommand: z35.object({
9779
+ relativePathFromCwd: z35.string()
9504
9780
  }),
9505
- putCommand: z34.object({
9506
- relativePathFromCwd: z34.string(),
9781
+ putCommand: z35.object({
9782
+ relativePathFromCwd: z35.string(),
9507
9783
  frontmatter: RulesyncCommandFrontmatterSchema,
9508
- body: z34.string()
9784
+ body: z35.string()
9509
9785
  }),
9510
- deleteCommand: z34.object({
9511
- relativePathFromCwd: z34.string()
9786
+ deleteCommand: z35.object({
9787
+ relativePathFromCwd: z35.string()
9512
9788
  })
9513
9789
  };
9514
9790
  var commandTools = {
@@ -9557,7 +9833,7 @@ var commandTools = {
9557
9833
 
9558
9834
  // src/mcp/ignore.ts
9559
9835
  import { join as join86 } from "path";
9560
- import { z as z35 } from "zod/mini";
9836
+ import { z as z36 } from "zod/mini";
9561
9837
  var maxIgnoreFileSizeBytes = 100 * 1024;
9562
9838
  async function getIgnoreFile() {
9563
9839
  const ignoreFilePath = join86(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
@@ -9614,11 +9890,11 @@ async function deleteIgnoreFile() {
9614
9890
  }
9615
9891
  }
9616
9892
  var ignoreToolSchemas = {
9617
- getIgnoreFile: z35.object({}),
9618
- putIgnoreFile: z35.object({
9619
- content: z35.string()
9893
+ getIgnoreFile: z36.object({}),
9894
+ putIgnoreFile: z36.object({
9895
+ content: z36.string()
9620
9896
  }),
9621
- deleteIgnoreFile: z35.object({})
9897
+ deleteIgnoreFile: z36.object({})
9622
9898
  };
9623
9899
  var ignoreTools = {
9624
9900
  getIgnoreFile: {
@@ -9652,7 +9928,7 @@ var ignoreTools = {
9652
9928
 
9653
9929
  // src/mcp/mcp.ts
9654
9930
  import { join as join87 } from "path";
9655
- import { z as z36 } from "zod/mini";
9931
+ import { z as z37 } from "zod/mini";
9656
9932
  var maxMcpSizeBytes = 1024 * 1024;
9657
9933
  async function getMcpFile() {
9658
9934
  const config = await ConfigResolver.resolve({});
@@ -9742,11 +10018,11 @@ async function deleteMcpFile() {
9742
10018
  }
9743
10019
  }
9744
10020
  var mcpToolSchemas = {
9745
- getMcpFile: z36.object({}),
9746
- putMcpFile: z36.object({
9747
- content: z36.string()
10021
+ getMcpFile: z37.object({}),
10022
+ putMcpFile: z37.object({
10023
+ content: z37.string()
9748
10024
  }),
9749
- deleteMcpFile: z36.object({})
10025
+ deleteMcpFile: z37.object({})
9750
10026
  };
9751
10027
  var mcpTools = {
9752
10028
  getMcpFile: {
@@ -9780,7 +10056,7 @@ var mcpTools = {
9780
10056
 
9781
10057
  // src/mcp/rules.ts
9782
10058
  import { basename as basename23, join as join88 } from "path";
9783
- import { z as z37 } from "zod/mini";
10059
+ import { z as z38 } from "zod/mini";
9784
10060
  var maxRuleSizeBytes = 1024 * 1024;
9785
10061
  var maxRulesCount = 1e3;
9786
10062
  async function listRules() {
@@ -9899,17 +10175,17 @@ async function deleteRule({ relativePathFromCwd }) {
9899
10175
  }
9900
10176
  }
9901
10177
  var ruleToolSchemas = {
9902
- listRules: z37.object({}),
9903
- getRule: z37.object({
9904
- relativePathFromCwd: z37.string()
10178
+ listRules: z38.object({}),
10179
+ getRule: z38.object({
10180
+ relativePathFromCwd: z38.string()
9905
10181
  }),
9906
- putRule: z37.object({
9907
- relativePathFromCwd: z37.string(),
10182
+ putRule: z38.object({
10183
+ relativePathFromCwd: z38.string(),
9908
10184
  frontmatter: RulesyncRuleFrontmatterSchema,
9909
- body: z37.string()
10185
+ body: z38.string()
9910
10186
  }),
9911
- deleteRule: z37.object({
9912
- relativePathFromCwd: z37.string()
10187
+ deleteRule: z38.object({
10188
+ relativePathFromCwd: z38.string()
9913
10189
  })
9914
10190
  };
9915
10191
  var ruleTools = {
@@ -9958,7 +10234,7 @@ var ruleTools = {
9958
10234
 
9959
10235
  // src/mcp/skills.ts
9960
10236
  import { basename as basename24, dirname as dirname2, join as join89 } from "path";
9961
- import { z as z38 } from "zod/mini";
10237
+ import { z as z39 } from "zod/mini";
9962
10238
  var maxSkillSizeBytes = 1024 * 1024;
9963
10239
  var maxSkillsCount = 1e3;
9964
10240
  function aiDirFileToMcpSkillFile(file) {
@@ -10126,23 +10402,23 @@ async function deleteSkill({
10126
10402
  );
10127
10403
  }
10128
10404
  }
10129
- var McpSkillFileSchema = z38.object({
10130
- name: z38.string(),
10131
- body: z38.string()
10405
+ var McpSkillFileSchema = z39.object({
10406
+ name: z39.string(),
10407
+ body: z39.string()
10132
10408
  });
10133
10409
  var skillToolSchemas = {
10134
- listSkills: z38.object({}),
10135
- getSkill: z38.object({
10136
- relativeDirPathFromCwd: z38.string()
10410
+ listSkills: z39.object({}),
10411
+ getSkill: z39.object({
10412
+ relativeDirPathFromCwd: z39.string()
10137
10413
  }),
10138
- putSkill: z38.object({
10139
- relativeDirPathFromCwd: z38.string(),
10414
+ putSkill: z39.object({
10415
+ relativeDirPathFromCwd: z39.string(),
10140
10416
  frontmatter: RulesyncSkillFrontmatterSchema,
10141
- body: z38.string(),
10142
- otherFiles: z38.optional(z38.array(McpSkillFileSchema))
10417
+ body: z39.string(),
10418
+ otherFiles: z39.optional(z39.array(McpSkillFileSchema))
10143
10419
  }),
10144
- deleteSkill: z38.object({
10145
- relativeDirPathFromCwd: z38.string()
10420
+ deleteSkill: z39.object({
10421
+ relativeDirPathFromCwd: z39.string()
10146
10422
  })
10147
10423
  };
10148
10424
  var skillTools = {
@@ -10192,7 +10468,7 @@ var skillTools = {
10192
10468
 
10193
10469
  // src/mcp/subagents.ts
10194
10470
  import { basename as basename25, join as join90 } from "path";
10195
- import { z as z39 } from "zod/mini";
10471
+ import { z as z40 } from "zod/mini";
10196
10472
  var maxSubagentSizeBytes = 1024 * 1024;
10197
10473
  var maxSubagentsCount = 1e3;
10198
10474
  async function listSubagents() {
@@ -10316,17 +10592,17 @@ async function deleteSubagent({ relativePathFromCwd }) {
10316
10592
  }
10317
10593
  }
10318
10594
  var subagentToolSchemas = {
10319
- listSubagents: z39.object({}),
10320
- getSubagent: z39.object({
10321
- relativePathFromCwd: z39.string()
10595
+ listSubagents: z40.object({}),
10596
+ getSubagent: z40.object({
10597
+ relativePathFromCwd: z40.string()
10322
10598
  }),
10323
- putSubagent: z39.object({
10324
- relativePathFromCwd: z39.string(),
10599
+ putSubagent: z40.object({
10600
+ relativePathFromCwd: z40.string(),
10325
10601
  frontmatter: RulesyncSubagentFrontmatterSchema,
10326
- body: z39.string()
10602
+ body: z40.string()
10327
10603
  }),
10328
- deleteSubagent: z39.object({
10329
- relativePathFromCwd: z39.string()
10604
+ deleteSubagent: z40.object({
10605
+ relativePathFromCwd: z40.string()
10330
10606
  })
10331
10607
  };
10332
10608
  var subagentTools = {
@@ -10410,7 +10686,7 @@ async function mcpCommand({ version }) {
10410
10686
  }
10411
10687
 
10412
10688
  // src/cli/index.ts
10413
- var getVersion = () => "3.33.0";
10689
+ var getVersion = () => "3.34.0";
10414
10690
  var main = async () => {
10415
10691
  const program = new Command();
10416
10692
  const version = getVersion();