rulesync 6.1.1 → 6.2.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
@@ -5324,7 +5324,7 @@ var McpProcessor = class extends FeatureProcessor {
5324
5324
  // src/features/rules/rules-processor.ts
5325
5325
  import { encode } from "@toon-format/toon";
5326
5326
  import { basename as basename22, join as join96, relative as relative4 } from "path";
5327
- import { z as z44 } from "zod/mini";
5327
+ import { z as z45 } from "zod/mini";
5328
5328
 
5329
5329
  // src/constants/general.ts
5330
5330
  var SKILL_FILE_NAME = "SKILL.md";
@@ -7955,39 +7955,12 @@ var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
7955
7955
  }
7956
7956
  };
7957
7957
 
7958
- // src/features/subagents/cursor-subagent.ts
7959
- import { join as join65 } from "path";
7960
- var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
7961
- static getSettablePaths() {
7962
- return {
7963
- relativeDirPath: join65(".cursor", "subagents")
7964
- };
7965
- }
7966
- static async fromFile(params) {
7967
- const baseParams = await this.fromFileDefault(params);
7968
- return new _CursorSubagent(baseParams);
7969
- }
7970
- static fromRulesyncSubagent(params) {
7971
- const baseParams = this.fromRulesyncSubagentDefault(params);
7972
- return new _CursorSubagent(baseParams);
7973
- }
7974
- static isTargetedByRulesyncSubagent(rulesyncSubagent) {
7975
- return this.isTargetedByRulesyncSubagentDefault({
7976
- rulesyncSubagent,
7977
- toolTarget: "cursor"
7978
- });
7979
- }
7980
- static forDeletion(params) {
7981
- return new _CursorSubagent(this.forDeletionDefault(params));
7982
- }
7983
- };
7984
-
7985
7958
  // src/features/subagents/geminicli-subagent.ts
7986
- import { join as join66 } from "path";
7959
+ import { join as join65 } from "path";
7987
7960
  var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
7988
7961
  static getSettablePaths() {
7989
7962
  return {
7990
- relativeDirPath: join66(".gemini", "subagents")
7963
+ relativeDirPath: join65(".gemini", "subagents")
7991
7964
  };
7992
7965
  }
7993
7966
  static async fromFile(params) {
@@ -8010,11 +7983,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
8010
7983
  };
8011
7984
 
8012
7985
  // src/features/subagents/roo-subagent.ts
8013
- import { join as join67 } from "path";
7986
+ import { join as join66 } from "path";
8014
7987
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
8015
7988
  static getSettablePaths() {
8016
7989
  return {
8017
- relativeDirPath: join67(".roo", "subagents")
7990
+ relativeDirPath: join66(".roo", "subagents")
8018
7991
  };
8019
7992
  }
8020
7993
  static async fromFile(params) {
@@ -8038,14 +8011,14 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
8038
8011
 
8039
8012
  // src/features/subagents/subagents-processor.ts
8040
8013
  import { basename as basename21, join as join73 } from "path";
8041
- import { z as z37 } from "zod/mini";
8014
+ import { z as z38 } from "zod/mini";
8042
8015
 
8043
8016
  // src/features/subagents/claudecode-subagent.ts
8044
- import { join as join69 } from "path";
8017
+ import { join as join68 } from "path";
8045
8018
  import { z as z33 } from "zod/mini";
8046
8019
 
8047
8020
  // src/features/subagents/rulesync-subagent.ts
8048
- import { basename as basename19, join as join68 } from "path";
8021
+ import { basename as basename19, join as join67 } from "path";
8049
8022
  import { z as z32 } from "zod/mini";
8050
8023
  var RulesyncSubagentFrontmatterSchema = z32.looseObject({
8051
8024
  targets: RulesyncTargetsSchema,
@@ -8060,7 +8033,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
8060
8033
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
8061
8034
  if (!result.success) {
8062
8035
  throw new Error(
8063
- `Invalid frontmatter in ${join68(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
8036
+ `Invalid frontmatter in ${join67(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
8064
8037
  );
8065
8038
  }
8066
8039
  }
@@ -8093,7 +8066,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
8093
8066
  return {
8094
8067
  success: false,
8095
8068
  error: new Error(
8096
- `Invalid frontmatter in ${join68(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
8069
+ `Invalid frontmatter in ${join67(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
8097
8070
  )
8098
8071
  };
8099
8072
  }
@@ -8102,7 +8075,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
8102
8075
  relativeFilePath
8103
8076
  }) {
8104
8077
  const fileContent = await readFileContent(
8105
- join68(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath)
8078
+ join67(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath)
8106
8079
  );
8107
8080
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
8108
8081
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -8137,7 +8110,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
8137
8110
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
8138
8111
  if (!result.success) {
8139
8112
  throw new Error(
8140
- `Invalid frontmatter in ${join69(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
8113
+ `Invalid frontmatter in ${join68(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
8141
8114
  );
8142
8115
  }
8143
8116
  }
@@ -8149,7 +8122,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
8149
8122
  }
8150
8123
  static getSettablePaths(_options = {}) {
8151
8124
  return {
8152
- relativeDirPath: join69(".claude", "agents")
8125
+ relativeDirPath: join68(".claude", "agents")
8153
8126
  };
8154
8127
  }
8155
8128
  getFrontmatter() {
@@ -8223,7 +8196,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
8223
8196
  return {
8224
8197
  success: false,
8225
8198
  error: new Error(
8226
- `Invalid frontmatter in ${join69(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
8199
+ `Invalid frontmatter in ${join68(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
8227
8200
  )
8228
8201
  };
8229
8202
  }
@@ -8241,7 +8214,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
8241
8214
  global = false
8242
8215
  }) {
8243
8216
  const paths = this.getSettablePaths({ global });
8244
- const filePath = join69(baseDir, paths.relativeDirPath, relativeFilePath);
8217
+ const filePath = join68(baseDir, paths.relativeDirPath, relativeFilePath);
8245
8218
  const fileContent = await readFileContent(filePath);
8246
8219
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
8247
8220
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -8276,7 +8249,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
8276
8249
  };
8277
8250
 
8278
8251
  // src/features/subagents/copilot-subagent.ts
8279
- import { join as join70 } from "path";
8252
+ import { join as join69 } from "path";
8280
8253
  import { z as z34 } from "zod/mini";
8281
8254
  var REQUIRED_TOOL = "agent/runSubagent";
8282
8255
  var CopilotSubagentFrontmatterSchema = z34.looseObject({
@@ -8302,7 +8275,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
8302
8275
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
8303
8276
  if (!result.success) {
8304
8277
  throw new Error(
8305
- `Invalid frontmatter in ${join70(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
8278
+ `Invalid frontmatter in ${join69(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
8306
8279
  );
8307
8280
  }
8308
8281
  }
@@ -8314,7 +8287,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
8314
8287
  }
8315
8288
  static getSettablePaths(_options = {}) {
8316
8289
  return {
8317
- relativeDirPath: join70(".github", "agents")
8290
+ relativeDirPath: join69(".github", "agents")
8318
8291
  };
8319
8292
  }
8320
8293
  getFrontmatter() {
@@ -8388,7 +8361,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
8388
8361
  return {
8389
8362
  success: false,
8390
8363
  error: new Error(
8391
- `Invalid frontmatter in ${join70(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
8364
+ `Invalid frontmatter in ${join69(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
8392
8365
  )
8393
8366
  };
8394
8367
  }
@@ -8406,7 +8379,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
8406
8379
  global = false
8407
8380
  }) {
8408
8381
  const paths = this.getSettablePaths({ global });
8409
- const filePath = join70(baseDir, paths.relativeDirPath, relativeFilePath);
8382
+ const filePath = join69(baseDir, paths.relativeDirPath, relativeFilePath);
8410
8383
  const fileContent = await readFileContent(filePath);
8411
8384
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
8412
8385
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -8441,24 +8414,171 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
8441
8414
  }
8442
8415
  };
8443
8416
 
8444
- // src/features/subagents/kiro-subagent.ts
8445
- import { join as join71 } from "path";
8417
+ // src/features/subagents/cursor-subagent.ts
8418
+ import { join as join70 } from "path";
8446
8419
  import { z as z35 } from "zod/mini";
8447
- var KiroCliSubagentJsonSchema = z35.looseObject({
8420
+ var CursorSubagentFrontmatterSchema = z35.looseObject({
8448
8421
  name: z35.string(),
8449
- description: z35.optional(z35.nullable(z35.string())),
8450
- prompt: z35.optional(z35.nullable(z35.string())),
8451
- tools: z35.optional(z35.nullable(z35.array(z35.string()))),
8452
- toolAliases: z35.optional(z35.nullable(z35.record(z35.string(), z35.string()))),
8453
- toolSettings: z35.optional(z35.nullable(z35.unknown())),
8454
- toolSchema: z35.optional(z35.nullable(z35.unknown())),
8455
- hooks: z35.optional(z35.nullable(z35.record(z35.string(), z35.array(z35.unknown())))),
8456
- model: z35.optional(z35.nullable(z35.string())),
8457
- mcpServers: z35.optional(z35.nullable(z35.record(z35.string(), z35.unknown()))),
8458
- useLegacyMcpJson: z35.optional(z35.nullable(z35.boolean())),
8459
- resources: z35.optional(z35.nullable(z35.array(z35.string()))),
8460
- allowedTools: z35.optional(z35.nullable(z35.array(z35.string()))),
8461
- includeMcpJson: z35.optional(z35.nullable(z35.boolean()))
8422
+ description: z35.string()
8423
+ });
8424
+ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
8425
+ frontmatter;
8426
+ body;
8427
+ constructor({ frontmatter, body, ...rest }) {
8428
+ if (rest.validate !== false) {
8429
+ const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
8430
+ if (!result.success) {
8431
+ throw new Error(
8432
+ `Invalid frontmatter in ${join70(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
8433
+ );
8434
+ }
8435
+ }
8436
+ super({
8437
+ ...rest
8438
+ });
8439
+ this.frontmatter = frontmatter;
8440
+ this.body = body;
8441
+ }
8442
+ static getSettablePaths(_options = {}) {
8443
+ return {
8444
+ relativeDirPath: join70(".cursor", "agents")
8445
+ };
8446
+ }
8447
+ getFrontmatter() {
8448
+ return this.frontmatter;
8449
+ }
8450
+ getBody() {
8451
+ return this.body;
8452
+ }
8453
+ toRulesyncSubagent() {
8454
+ const { name, description, ...rest } = this.frontmatter;
8455
+ const rulesyncFrontmatter = {
8456
+ targets: ["*"],
8457
+ name,
8458
+ description,
8459
+ cursor: {
8460
+ ...rest
8461
+ }
8462
+ };
8463
+ return new RulesyncSubagent({
8464
+ baseDir: ".",
8465
+ // RulesyncSubagent baseDir is always the project root directory
8466
+ frontmatter: rulesyncFrontmatter,
8467
+ body: this.body,
8468
+ relativeDirPath: RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH,
8469
+ relativeFilePath: this.getRelativeFilePath(),
8470
+ validate: true
8471
+ });
8472
+ }
8473
+ static fromRulesyncSubagent({
8474
+ baseDir = process.cwd(),
8475
+ rulesyncSubagent,
8476
+ validate = true,
8477
+ global = false
8478
+ }) {
8479
+ const rulesyncFrontmatter = rulesyncSubagent.getFrontmatter();
8480
+ const cursorSection = rulesyncFrontmatter.cursor ?? {};
8481
+ const cursorFrontmatter = {
8482
+ name: rulesyncFrontmatter.name,
8483
+ description: rulesyncFrontmatter.description,
8484
+ ...cursorSection
8485
+ };
8486
+ const body = rulesyncSubagent.getBody();
8487
+ const fileContent = stringifyFrontmatter(body, cursorFrontmatter);
8488
+ const paths = this.getSettablePaths({ global });
8489
+ return new _CursorSubagent({
8490
+ baseDir,
8491
+ frontmatter: cursorFrontmatter,
8492
+ body,
8493
+ relativeDirPath: paths.relativeDirPath,
8494
+ relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
8495
+ fileContent,
8496
+ validate,
8497
+ global
8498
+ });
8499
+ }
8500
+ validate() {
8501
+ if (!this.frontmatter) {
8502
+ return { success: true, error: null };
8503
+ }
8504
+ const result = CursorSubagentFrontmatterSchema.safeParse(this.frontmatter);
8505
+ if (result.success) {
8506
+ return { success: true, error: null };
8507
+ } else {
8508
+ return {
8509
+ success: false,
8510
+ error: new Error(
8511
+ `Invalid frontmatter in ${join70(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
8512
+ )
8513
+ };
8514
+ }
8515
+ }
8516
+ static isTargetedByRulesyncSubagent(rulesyncSubagent) {
8517
+ return this.isTargetedByRulesyncSubagentDefault({
8518
+ rulesyncSubagent,
8519
+ toolTarget: "cursor"
8520
+ });
8521
+ }
8522
+ static async fromFile({
8523
+ baseDir = process.cwd(),
8524
+ relativeFilePath,
8525
+ validate = true,
8526
+ global = false
8527
+ }) {
8528
+ const paths = this.getSettablePaths({ global });
8529
+ const filePath = join70(baseDir, paths.relativeDirPath, relativeFilePath);
8530
+ const fileContent = await readFileContent(filePath);
8531
+ const { frontmatter, body: content } = parseFrontmatter(fileContent);
8532
+ const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
8533
+ if (!result.success) {
8534
+ throw new Error(`Invalid frontmatter in ${filePath}: ${formatError(result.error)}`);
8535
+ }
8536
+ return new _CursorSubagent({
8537
+ baseDir,
8538
+ relativeDirPath: paths.relativeDirPath,
8539
+ relativeFilePath,
8540
+ frontmatter: result.data,
8541
+ body: content.trim(),
8542
+ fileContent,
8543
+ validate,
8544
+ global
8545
+ });
8546
+ }
8547
+ static forDeletion({
8548
+ baseDir = process.cwd(),
8549
+ relativeDirPath,
8550
+ relativeFilePath
8551
+ }) {
8552
+ return new _CursorSubagent({
8553
+ baseDir,
8554
+ relativeDirPath,
8555
+ relativeFilePath,
8556
+ frontmatter: { name: "", description: "" },
8557
+ body: "",
8558
+ fileContent: "",
8559
+ validate: false
8560
+ });
8561
+ }
8562
+ };
8563
+
8564
+ // src/features/subagents/kiro-subagent.ts
8565
+ import { join as join71 } from "path";
8566
+ import { z as z36 } from "zod/mini";
8567
+ var KiroCliSubagentJsonSchema = z36.looseObject({
8568
+ name: z36.string(),
8569
+ description: z36.optional(z36.nullable(z36.string())),
8570
+ prompt: z36.optional(z36.nullable(z36.string())),
8571
+ tools: z36.optional(z36.nullable(z36.array(z36.string()))),
8572
+ toolAliases: z36.optional(z36.nullable(z36.record(z36.string(), z36.string()))),
8573
+ toolSettings: z36.optional(z36.nullable(z36.unknown())),
8574
+ toolSchema: z36.optional(z36.nullable(z36.unknown())),
8575
+ hooks: z36.optional(z36.nullable(z36.record(z36.string(), z36.array(z36.unknown())))),
8576
+ model: z36.optional(z36.nullable(z36.string())),
8577
+ mcpServers: z36.optional(z36.nullable(z36.record(z36.string(), z36.unknown()))),
8578
+ useLegacyMcpJson: z36.optional(z36.nullable(z36.boolean())),
8579
+ resources: z36.optional(z36.nullable(z36.array(z36.string()))),
8580
+ allowedTools: z36.optional(z36.nullable(z36.array(z36.string()))),
8581
+ includeMcpJson: z36.optional(z36.nullable(z36.boolean()))
8462
8582
  });
8463
8583
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
8464
8584
  body;
@@ -8580,11 +8700,11 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
8580
8700
 
8581
8701
  // src/features/subagents/opencode-subagent.ts
8582
8702
  import { basename as basename20, join as join72 } from "path";
8583
- import { z as z36 } from "zod/mini";
8584
- var OpenCodeSubagentFrontmatterSchema = z36.looseObject({
8585
- description: z36.string(),
8586
- mode: z36.literal("subagent"),
8587
- name: z36.optional(z36.string())
8703
+ import { z as z37 } from "zod/mini";
8704
+ var OpenCodeSubagentFrontmatterSchema = z37.looseObject({
8705
+ description: z37.string(),
8706
+ mode: z37.literal("subagent"),
8707
+ name: z37.optional(z37.string())
8588
8708
  });
8589
8709
  var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
8590
8710
  frontmatter;
@@ -8739,7 +8859,7 @@ var subagentsProcessorToolTargetTuple = [
8739
8859
  "opencode",
8740
8860
  "roo"
8741
8861
  ];
8742
- var SubagentsProcessorToolTargetSchema = z37.enum(subagentsProcessorToolTargetTuple);
8862
+ var SubagentsProcessorToolTargetSchema = z38.enum(subagentsProcessorToolTargetTuple);
8743
8863
  var toolSubagentFactories = /* @__PURE__ */ new Map([
8744
8864
  [
8745
8865
  "agentsmd",
@@ -8780,7 +8900,7 @@ var toolSubagentFactories = /* @__PURE__ */ new Map([
8780
8900
  "cursor",
8781
8901
  {
8782
8902
  class: CursorSubagent,
8783
- meta: { supportsSimulated: true, supportsGlobal: false, filePattern: "*.md" }
8903
+ meta: { supportsSimulated: false, supportsGlobal: false, filePattern: "*.md" }
8784
8904
  }
8785
8905
  ],
8786
8906
  [
@@ -8995,42 +9115,42 @@ import { join as join75 } from "path";
8995
9115
 
8996
9116
  // src/features/rules/rulesync-rule.ts
8997
9117
  import { join as join74 } from "path";
8998
- import { z as z38 } from "zod/mini";
8999
- var RulesyncRuleFrontmatterSchema = z38.object({
9000
- root: z38.optional(z38.boolean()),
9001
- localRoot: z38.optional(z38.boolean()),
9002
- targets: z38.optional(RulesyncTargetsSchema),
9003
- description: z38.optional(z38.string()),
9004
- globs: z38.optional(z38.array(z38.string())),
9005
- agentsmd: z38.optional(
9006
- z38.object({
9118
+ import { z as z39 } from "zod/mini";
9119
+ var RulesyncRuleFrontmatterSchema = z39.object({
9120
+ root: z39.optional(z39.boolean()),
9121
+ localRoot: z39.optional(z39.boolean()),
9122
+ targets: z39.optional(RulesyncTargetsSchema),
9123
+ description: z39.optional(z39.string()),
9124
+ globs: z39.optional(z39.array(z39.string())),
9125
+ agentsmd: z39.optional(
9126
+ z39.object({
9007
9127
  // @example "path/to/subproject"
9008
- subprojectPath: z38.optional(z38.string())
9128
+ subprojectPath: z39.optional(z39.string())
9009
9129
  })
9010
9130
  ),
9011
- claudecode: z38.optional(
9012
- z38.object({
9131
+ claudecode: z39.optional(
9132
+ z39.object({
9013
9133
  // Glob patterns for conditional rules (takes precedence over globs)
9014
9134
  // @example "src/**/*.ts, tests/**/*.test.ts"
9015
- paths: z38.optional(z38.string())
9135
+ paths: z39.optional(z39.string())
9016
9136
  })
9017
9137
  ),
9018
- cursor: z38.optional(
9019
- z38.object({
9020
- alwaysApply: z38.optional(z38.boolean()),
9021
- description: z38.optional(z38.string()),
9022
- globs: z38.optional(z38.array(z38.string()))
9138
+ cursor: z39.optional(
9139
+ z39.object({
9140
+ alwaysApply: z39.optional(z39.boolean()),
9141
+ description: z39.optional(z39.string()),
9142
+ globs: z39.optional(z39.array(z39.string()))
9023
9143
  })
9024
9144
  ),
9025
- copilot: z38.optional(
9026
- z38.object({
9027
- excludeAgent: z38.optional(z38.union([z38.literal("code-review"), z38.literal("coding-agent")]))
9145
+ copilot: z39.optional(
9146
+ z39.object({
9147
+ excludeAgent: z39.optional(z39.union([z39.literal("code-review"), z39.literal("coding-agent")]))
9028
9148
  })
9029
9149
  ),
9030
- antigravity: z38.optional(
9031
- z38.looseObject({
9032
- trigger: z38.optional(z38.string()),
9033
- globs: z38.optional(z38.array(z38.string()))
9150
+ antigravity: z39.optional(
9151
+ z39.looseObject({
9152
+ trigger: z39.optional(z39.string()),
9153
+ globs: z39.optional(z39.array(z39.string()))
9034
9154
  })
9035
9155
  )
9036
9156
  });
@@ -9331,20 +9451,20 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
9331
9451
 
9332
9452
  // src/features/rules/antigravity-rule.ts
9333
9453
  import { join as join77 } from "path";
9334
- import { z as z39 } from "zod/mini";
9335
- var AntigravityRuleFrontmatterSchema = z39.looseObject({
9336
- trigger: z39.optional(
9337
- z39.union([
9338
- z39.literal("always_on"),
9339
- z39.literal("glob"),
9340
- z39.literal("manual"),
9341
- z39.literal("model_decision"),
9342
- z39.string()
9454
+ import { z as z40 } from "zod/mini";
9455
+ var AntigravityRuleFrontmatterSchema = z40.looseObject({
9456
+ trigger: z40.optional(
9457
+ z40.union([
9458
+ z40.literal("always_on"),
9459
+ z40.literal("glob"),
9460
+ z40.literal("manual"),
9461
+ z40.literal("model_decision"),
9462
+ z40.string()
9343
9463
  // accepts any string for forward compatibility
9344
9464
  ])
9345
9465
  ),
9346
- globs: z39.optional(z39.string()),
9347
- description: z39.optional(z39.string())
9466
+ globs: z40.optional(z40.string()),
9467
+ description: z40.optional(z40.string())
9348
9468
  });
9349
9469
  function parseGlobsString(globs) {
9350
9470
  if (!globs) {
@@ -9922,9 +10042,9 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
9922
10042
 
9923
10043
  // src/features/rules/claudecode-rule.ts
9924
10044
  import { join as join81 } from "path";
9925
- import { z as z40 } from "zod/mini";
9926
- var ClaudecodeRuleFrontmatterSchema = z40.object({
9927
- paths: z40.optional(z40.string())
10045
+ import { z as z41 } from "zod/mini";
10046
+ var ClaudecodeRuleFrontmatterSchema = z41.object({
10047
+ paths: z41.optional(z41.string())
9928
10048
  });
9929
10049
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
9930
10050
  frontmatter;
@@ -10132,9 +10252,9 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
10132
10252
 
10133
10253
  // src/features/rules/cline-rule.ts
10134
10254
  import { join as join82 } from "path";
10135
- import { z as z41 } from "zod/mini";
10136
- var ClineRuleFrontmatterSchema = z41.object({
10137
- description: z41.string()
10255
+ import { z as z42 } from "zod/mini";
10256
+ var ClineRuleFrontmatterSchema = z42.object({
10257
+ description: z42.string()
10138
10258
  });
10139
10259
  var ClineRule = class _ClineRule extends ToolRule {
10140
10260
  static getSettablePaths() {
@@ -10311,11 +10431,11 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
10311
10431
 
10312
10432
  // src/features/rules/copilot-rule.ts
10313
10433
  import { join as join84 } from "path";
10314
- import { z as z42 } from "zod/mini";
10315
- var CopilotRuleFrontmatterSchema = z42.object({
10316
- description: z42.optional(z42.string()),
10317
- applyTo: z42.optional(z42.string()),
10318
- excludeAgent: z42.optional(z42.union([z42.literal("code-review"), z42.literal("coding-agent")]))
10434
+ import { z as z43 } from "zod/mini";
10435
+ var CopilotRuleFrontmatterSchema = z43.object({
10436
+ description: z43.optional(z43.string()),
10437
+ applyTo: z43.optional(z43.string()),
10438
+ excludeAgent: z43.optional(z43.union([z43.literal("code-review"), z43.literal("coding-agent")]))
10319
10439
  });
10320
10440
  var CopilotRule = class _CopilotRule extends ToolRule {
10321
10441
  frontmatter;
@@ -10499,11 +10619,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
10499
10619
 
10500
10620
  // src/features/rules/cursor-rule.ts
10501
10621
  import { join as join85 } from "path";
10502
- import { z as z43 } from "zod/mini";
10503
- var CursorRuleFrontmatterSchema = z43.object({
10504
- description: z43.optional(z43.string()),
10505
- globs: z43.optional(z43.string()),
10506
- alwaysApply: z43.optional(z43.boolean())
10622
+ import { z as z44 } from "zod/mini";
10623
+ var CursorRuleFrontmatterSchema = z44.object({
10624
+ description: z44.optional(z44.string()),
10625
+ globs: z44.optional(z44.string()),
10626
+ alwaysApply: z44.optional(z44.boolean())
10507
10627
  });
10508
10628
  var CursorRule = class _CursorRule extends ToolRule {
10509
10629
  frontmatter;
@@ -11509,7 +11629,7 @@ var rulesProcessorToolTargets = [
11509
11629
  "warp",
11510
11630
  "windsurf"
11511
11631
  ];
11512
- var RulesProcessorToolTargetSchema = z44.enum(rulesProcessorToolTargets);
11632
+ var RulesProcessorToolTargetSchema = z45.enum(rulesProcessorToolTargets);
11513
11633
  var toolRuleFactories = /* @__PURE__ */ new Map([
11514
11634
  [
11515
11635
  "agentsmd",
@@ -11601,11 +11721,7 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
11601
11721
  meta: {
11602
11722
  extension: "mdc",
11603
11723
  supportsGlobal: false,
11604
- ruleDiscoveryMode: "auto",
11605
- additionalConventions: {
11606
- subagents: { subagentClass: CursorSubagent }
11607
- },
11608
- createsSeparateConventionsRule: true
11724
+ ruleDiscoveryMode: "auto"
11609
11725
  }
11610
11726
  }
11611
11727
  ],
@@ -13061,11 +13177,11 @@ Keep the summary concise and ready to reuse in future tasks.`
13061
13177
  import { FastMCP } from "fastmcp";
13062
13178
 
13063
13179
  // src/mcp/tools.ts
13064
- import { z as z51 } from "zod/mini";
13180
+ import { z as z52 } from "zod/mini";
13065
13181
 
13066
13182
  // src/mcp/commands.ts
13067
13183
  import { basename as basename23, join as join100 } from "path";
13068
- import { z as z45 } from "zod/mini";
13184
+ import { z as z46 } from "zod/mini";
13069
13185
  var maxCommandSizeBytes = 1024 * 1024;
13070
13186
  var maxCommandsCount = 1e3;
13071
13187
  async function listCommands() {
@@ -13184,17 +13300,17 @@ async function deleteCommand({ relativePathFromCwd }) {
13184
13300
  }
13185
13301
  }
13186
13302
  var commandToolSchemas = {
13187
- listCommands: z45.object({}),
13188
- getCommand: z45.object({
13189
- relativePathFromCwd: z45.string()
13303
+ listCommands: z46.object({}),
13304
+ getCommand: z46.object({
13305
+ relativePathFromCwd: z46.string()
13190
13306
  }),
13191
- putCommand: z45.object({
13192
- relativePathFromCwd: z45.string(),
13307
+ putCommand: z46.object({
13308
+ relativePathFromCwd: z46.string(),
13193
13309
  frontmatter: RulesyncCommandFrontmatterSchema,
13194
- body: z45.string()
13310
+ body: z46.string()
13195
13311
  }),
13196
- deleteCommand: z45.object({
13197
- relativePathFromCwd: z45.string()
13312
+ deleteCommand: z46.object({
13313
+ relativePathFromCwd: z46.string()
13198
13314
  })
13199
13315
  };
13200
13316
  var commandTools = {
@@ -13243,7 +13359,7 @@ var commandTools = {
13243
13359
 
13244
13360
  // src/mcp/ignore.ts
13245
13361
  import { join as join101 } from "path";
13246
- import { z as z46 } from "zod/mini";
13362
+ import { z as z47 } from "zod/mini";
13247
13363
  var maxIgnoreFileSizeBytes = 100 * 1024;
13248
13364
  async function getIgnoreFile() {
13249
13365
  const ignoreFilePath = join101(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
@@ -13300,11 +13416,11 @@ async function deleteIgnoreFile() {
13300
13416
  }
13301
13417
  }
13302
13418
  var ignoreToolSchemas = {
13303
- getIgnoreFile: z46.object({}),
13304
- putIgnoreFile: z46.object({
13305
- content: z46.string()
13419
+ getIgnoreFile: z47.object({}),
13420
+ putIgnoreFile: z47.object({
13421
+ content: z47.string()
13306
13422
  }),
13307
- deleteIgnoreFile: z46.object({})
13423
+ deleteIgnoreFile: z47.object({})
13308
13424
  };
13309
13425
  var ignoreTools = {
13310
13426
  getIgnoreFile: {
@@ -13338,7 +13454,7 @@ var ignoreTools = {
13338
13454
 
13339
13455
  // src/mcp/mcp.ts
13340
13456
  import { join as join102 } from "path";
13341
- import { z as z47 } from "zod/mini";
13457
+ import { z as z48 } from "zod/mini";
13342
13458
  var maxMcpSizeBytes = 1024 * 1024;
13343
13459
  async function getMcpFile() {
13344
13460
  const config = await ConfigResolver.resolve({});
@@ -13428,11 +13544,11 @@ async function deleteMcpFile() {
13428
13544
  }
13429
13545
  }
13430
13546
  var mcpToolSchemas = {
13431
- getMcpFile: z47.object({}),
13432
- putMcpFile: z47.object({
13433
- content: z47.string()
13547
+ getMcpFile: z48.object({}),
13548
+ putMcpFile: z48.object({
13549
+ content: z48.string()
13434
13550
  }),
13435
- deleteMcpFile: z47.object({})
13551
+ deleteMcpFile: z48.object({})
13436
13552
  };
13437
13553
  var mcpTools = {
13438
13554
  getMcpFile: {
@@ -13466,7 +13582,7 @@ var mcpTools = {
13466
13582
 
13467
13583
  // src/mcp/rules.ts
13468
13584
  import { basename as basename24, join as join103 } from "path";
13469
- import { z as z48 } from "zod/mini";
13585
+ import { z as z49 } from "zod/mini";
13470
13586
  var maxRuleSizeBytes = 1024 * 1024;
13471
13587
  var maxRulesCount = 1e3;
13472
13588
  async function listRules() {
@@ -13585,17 +13701,17 @@ async function deleteRule({ relativePathFromCwd }) {
13585
13701
  }
13586
13702
  }
13587
13703
  var ruleToolSchemas = {
13588
- listRules: z48.object({}),
13589
- getRule: z48.object({
13590
- relativePathFromCwd: z48.string()
13704
+ listRules: z49.object({}),
13705
+ getRule: z49.object({
13706
+ relativePathFromCwd: z49.string()
13591
13707
  }),
13592
- putRule: z48.object({
13593
- relativePathFromCwd: z48.string(),
13708
+ putRule: z49.object({
13709
+ relativePathFromCwd: z49.string(),
13594
13710
  frontmatter: RulesyncRuleFrontmatterSchema,
13595
- body: z48.string()
13711
+ body: z49.string()
13596
13712
  }),
13597
- deleteRule: z48.object({
13598
- relativePathFromCwd: z48.string()
13713
+ deleteRule: z49.object({
13714
+ relativePathFromCwd: z49.string()
13599
13715
  })
13600
13716
  };
13601
13717
  var ruleTools = {
@@ -13644,7 +13760,7 @@ var ruleTools = {
13644
13760
 
13645
13761
  // src/mcp/skills.ts
13646
13762
  import { basename as basename25, dirname as dirname3, join as join104 } from "path";
13647
- import { z as z49 } from "zod/mini";
13763
+ import { z as z50 } from "zod/mini";
13648
13764
  var maxSkillSizeBytes = 1024 * 1024;
13649
13765
  var maxSkillsCount = 1e3;
13650
13766
  function aiDirFileToMcpSkillFile(file) {
@@ -13812,23 +13928,23 @@ async function deleteSkill({
13812
13928
  );
13813
13929
  }
13814
13930
  }
13815
- var McpSkillFileSchema = z49.object({
13816
- name: z49.string(),
13817
- body: z49.string()
13931
+ var McpSkillFileSchema = z50.object({
13932
+ name: z50.string(),
13933
+ body: z50.string()
13818
13934
  });
13819
13935
  var skillToolSchemas = {
13820
- listSkills: z49.object({}),
13821
- getSkill: z49.object({
13822
- relativeDirPathFromCwd: z49.string()
13936
+ listSkills: z50.object({}),
13937
+ getSkill: z50.object({
13938
+ relativeDirPathFromCwd: z50.string()
13823
13939
  }),
13824
- putSkill: z49.object({
13825
- relativeDirPathFromCwd: z49.string(),
13940
+ putSkill: z50.object({
13941
+ relativeDirPathFromCwd: z50.string(),
13826
13942
  frontmatter: RulesyncSkillFrontmatterSchema,
13827
- body: z49.string(),
13828
- otherFiles: z49.optional(z49.array(McpSkillFileSchema))
13943
+ body: z50.string(),
13944
+ otherFiles: z50.optional(z50.array(McpSkillFileSchema))
13829
13945
  }),
13830
- deleteSkill: z49.object({
13831
- relativeDirPathFromCwd: z49.string()
13946
+ deleteSkill: z50.object({
13947
+ relativeDirPathFromCwd: z50.string()
13832
13948
  })
13833
13949
  };
13834
13950
  var skillTools = {
@@ -13878,7 +13994,7 @@ var skillTools = {
13878
13994
 
13879
13995
  // src/mcp/subagents.ts
13880
13996
  import { basename as basename26, join as join105 } from "path";
13881
- import { z as z50 } from "zod/mini";
13997
+ import { z as z51 } from "zod/mini";
13882
13998
  var maxSubagentSizeBytes = 1024 * 1024;
13883
13999
  var maxSubagentsCount = 1e3;
13884
14000
  async function listSubagents() {
@@ -14002,17 +14118,17 @@ async function deleteSubagent({ relativePathFromCwd }) {
14002
14118
  }
14003
14119
  }
14004
14120
  var subagentToolSchemas = {
14005
- listSubagents: z50.object({}),
14006
- getSubagent: z50.object({
14007
- relativePathFromCwd: z50.string()
14121
+ listSubagents: z51.object({}),
14122
+ getSubagent: z51.object({
14123
+ relativePathFromCwd: z51.string()
14008
14124
  }),
14009
- putSubagent: z50.object({
14010
- relativePathFromCwd: z50.string(),
14125
+ putSubagent: z51.object({
14126
+ relativePathFromCwd: z51.string(),
14011
14127
  frontmatter: RulesyncSubagentFrontmatterSchema,
14012
- body: z50.string()
14128
+ body: z51.string()
14013
14129
  }),
14014
- deleteSubagent: z50.object({
14015
- relativePathFromCwd: z50.string()
14130
+ deleteSubagent: z51.object({
14131
+ relativePathFromCwd: z51.string()
14016
14132
  })
14017
14133
  };
14018
14134
  var subagentTools = {
@@ -14060,20 +14176,20 @@ var subagentTools = {
14060
14176
  };
14061
14177
 
14062
14178
  // src/mcp/tools.ts
14063
- var rulesyncFeatureSchema = z51.enum(["rule", "command", "subagent", "skill", "ignore", "mcp"]);
14064
- var rulesyncOperationSchema = z51.enum(["list", "get", "put", "delete"]);
14065
- var skillFileSchema = z51.object({
14066
- name: z51.string(),
14067
- body: z51.string()
14179
+ var rulesyncFeatureSchema = z52.enum(["rule", "command", "subagent", "skill", "ignore", "mcp"]);
14180
+ var rulesyncOperationSchema = z52.enum(["list", "get", "put", "delete"]);
14181
+ var skillFileSchema = z52.object({
14182
+ name: z52.string(),
14183
+ body: z52.string()
14068
14184
  });
14069
- var rulesyncToolSchema = z51.object({
14185
+ var rulesyncToolSchema = z52.object({
14070
14186
  feature: rulesyncFeatureSchema,
14071
14187
  operation: rulesyncOperationSchema,
14072
- targetPathFromCwd: z51.optional(z51.string()),
14073
- frontmatter: z51.optional(z51.unknown()),
14074
- body: z51.optional(z51.string()),
14075
- otherFiles: z51.optional(z51.array(skillFileSchema)),
14076
- content: z51.optional(z51.string())
14188
+ targetPathFromCwd: z52.optional(z52.string()),
14189
+ frontmatter: z52.optional(z52.unknown()),
14190
+ body: z52.optional(z52.string()),
14191
+ otherFiles: z52.optional(z52.array(skillFileSchema)),
14192
+ content: z52.optional(z52.string())
14077
14193
  });
14078
14194
  var supportedOperationsByFeature = {
14079
14195
  rule: ["list", "get", "put", "delete"],
@@ -14269,7 +14385,7 @@ async function mcpCommand({ version }) {
14269
14385
  }
14270
14386
 
14271
14387
  // src/cli/index.ts
14272
- var getVersion = () => "6.1.1";
14388
+ var getVersion = () => "6.2.0";
14273
14389
  var main = async () => {
14274
14390
  const program = new Command();
14275
14391
  const version = getVersion();
@@ -14336,7 +14452,7 @@ var main = async () => {
14336
14452
  "Generate simulated commands. This feature is only available for copilot, cursor and codexcli."
14337
14453
  ).option(
14338
14454
  "--simulate-subagents",
14339
- "Generate simulated subagents. This feature is only available for copilot, cursor and codexcli."
14455
+ "Generate simulated subagents. This feature is only available for copilot and codexcli."
14340
14456
  ).option(
14341
14457
  "--simulate-skills",
14342
14458
  "Generate simulated skills. This feature is only available for copilot, cursor and codexcli."