rulesync 6.3.0 → 6.4.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
@@ -271,6 +271,7 @@ var ALL_TOOL_TARGETS = [
271
271
  "codexcli",
272
272
  "copilot",
273
273
  "cursor",
274
+ "factorydroid",
274
275
  "geminicli",
275
276
  "junie",
276
277
  "kilo",
@@ -512,10 +513,10 @@ function getBaseDirsInLightOfGlobal({
512
513
 
513
514
  // src/lib/generate.ts
514
515
  import { intersection } from "es-toolkit";
515
- import { join as join101 } from "path";
516
+ import { join as join106 } from "path";
516
517
 
517
518
  // src/features/commands/commands-processor.ts
518
- import { basename as basename15, join as join18 } from "path";
519
+ import { basename as basename16, join as join19 } from "path";
519
520
  import { z as z12 } from "zod/mini";
520
521
 
521
522
  // src/types/feature-processor.ts
@@ -1745,8 +1746,66 @@ var CursorCommand = class _CursorCommand extends ToolCommand {
1745
1746
  }
1746
1747
  };
1747
1748
 
1748
- // src/features/commands/geminicli-command.ts
1749
+ // src/features/commands/factorydroid-command.ts
1749
1750
  import { basename as basename10, join as join13 } from "path";
1751
+ var FactorydroidCommand = class _FactorydroidCommand extends SimulatedCommand {
1752
+ static getSettablePaths(_options) {
1753
+ return {
1754
+ relativeDirPath: join13(".factorydroid", "commands")
1755
+ };
1756
+ }
1757
+ static fromRulesyncCommand({
1758
+ baseDir = process.cwd(),
1759
+ rulesyncCommand,
1760
+ validate = true,
1761
+ global = false
1762
+ }) {
1763
+ return new _FactorydroidCommand(
1764
+ this.fromRulesyncCommandDefault({ baseDir, rulesyncCommand, validate, global })
1765
+ );
1766
+ }
1767
+ static async fromFile({
1768
+ baseDir = process.cwd(),
1769
+ relativeFilePath,
1770
+ validate = true,
1771
+ global = false
1772
+ }) {
1773
+ const paths = _FactorydroidCommand.getSettablePaths({ global });
1774
+ const filePath = join13(baseDir, paths.relativeDirPath, relativeFilePath);
1775
+ const fileContent = await readFileContent(filePath);
1776
+ const { frontmatter, body: content } = parseFrontmatter(fileContent);
1777
+ const result = SimulatedCommandFrontmatterSchema.safeParse(frontmatter);
1778
+ if (!result.success) {
1779
+ throw new Error(`Invalid frontmatter in ${filePath}: ${formatError(result.error)}`);
1780
+ }
1781
+ return new _FactorydroidCommand({
1782
+ baseDir,
1783
+ relativeDirPath: paths.relativeDirPath,
1784
+ relativeFilePath: basename10(relativeFilePath),
1785
+ frontmatter: result.data,
1786
+ body: content.trim(),
1787
+ validate
1788
+ });
1789
+ }
1790
+ static isTargetedByRulesyncCommand(rulesyncCommand) {
1791
+ return this.isTargetedByRulesyncCommandDefault({
1792
+ rulesyncCommand,
1793
+ toolTarget: "factorydroid"
1794
+ });
1795
+ }
1796
+ static forDeletion({
1797
+ baseDir = process.cwd(),
1798
+ relativeDirPath,
1799
+ relativeFilePath
1800
+ }) {
1801
+ return new _FactorydroidCommand(
1802
+ this.forDeletionDefault({ baseDir, relativeDirPath, relativeFilePath })
1803
+ );
1804
+ }
1805
+ };
1806
+
1807
+ // src/features/commands/geminicli-command.ts
1808
+ import { basename as basename11, join as join14 } from "path";
1750
1809
  import { parse as parseToml } from "smol-toml";
1751
1810
  import { z as z9 } from "zod/mini";
1752
1811
  var GeminiCliCommandFrontmatterSchema = z9.looseObject({
@@ -1764,7 +1823,7 @@ var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
1764
1823
  }
1765
1824
  static getSettablePaths(_options = {}) {
1766
1825
  return {
1767
- relativeDirPath: join13(".gemini", "commands")
1826
+ relativeDirPath: join14(".gemini", "commands")
1768
1827
  };
1769
1828
  }
1770
1829
  parseTomlContent(content) {
@@ -1846,12 +1905,12 @@ ${geminiFrontmatter.prompt}
1846
1905
  global = false
1847
1906
  }) {
1848
1907
  const paths = this.getSettablePaths({ global });
1849
- const filePath = join13(baseDir, paths.relativeDirPath, relativeFilePath);
1908
+ const filePath = join14(baseDir, paths.relativeDirPath, relativeFilePath);
1850
1909
  const fileContent = await readFileContent(filePath);
1851
1910
  return new _GeminiCliCommand({
1852
1911
  baseDir,
1853
1912
  relativeDirPath: paths.relativeDirPath,
1854
- relativeFilePath: basename10(relativeFilePath),
1913
+ relativeFilePath: basename11(relativeFilePath),
1855
1914
  fileContent,
1856
1915
  validate
1857
1916
  });
@@ -1888,11 +1947,11 @@ prompt = ""`;
1888
1947
  };
1889
1948
 
1890
1949
  // src/features/commands/kilo-command.ts
1891
- import { basename as basename11, join as join14 } from "path";
1950
+ import { basename as basename12, join as join15 } from "path";
1892
1951
  var KiloCommand = class _KiloCommand extends ToolCommand {
1893
1952
  static getSettablePaths(_options = {}) {
1894
1953
  return {
1895
- relativeDirPath: join14(".kilocode", "workflows")
1954
+ relativeDirPath: join15(".kilocode", "workflows")
1896
1955
  };
1897
1956
  }
1898
1957
  toRulesyncCommand() {
@@ -1942,13 +2001,13 @@ var KiloCommand = class _KiloCommand extends ToolCommand {
1942
2001
  validate = true
1943
2002
  }) {
1944
2003
  const paths = this.getSettablePaths();
1945
- const filePath = join14(baseDir, paths.relativeDirPath, relativeFilePath);
2004
+ const filePath = join15(baseDir, paths.relativeDirPath, relativeFilePath);
1946
2005
  const fileContent = await readFileContent(filePath);
1947
2006
  const { body: content } = parseFrontmatter(fileContent);
1948
2007
  return new _KiloCommand({
1949
2008
  baseDir,
1950
2009
  relativeDirPath: paths.relativeDirPath,
1951
- relativeFilePath: basename11(relativeFilePath),
2010
+ relativeFilePath: basename12(relativeFilePath),
1952
2011
  fileContent: content.trim(),
1953
2012
  validate
1954
2013
  });
@@ -1969,11 +2028,11 @@ var KiloCommand = class _KiloCommand extends ToolCommand {
1969
2028
  };
1970
2029
 
1971
2030
  // src/features/commands/kiro-command.ts
1972
- import { basename as basename12, join as join15 } from "path";
2031
+ import { basename as basename13, join as join16 } from "path";
1973
2032
  var KiroCommand = class _KiroCommand extends ToolCommand {
1974
2033
  static getSettablePaths(_options = {}) {
1975
2034
  return {
1976
- relativeDirPath: join15(".kiro", "prompts")
2035
+ relativeDirPath: join16(".kiro", "prompts")
1977
2036
  };
1978
2037
  }
1979
2038
  toRulesyncCommand() {
@@ -2023,13 +2082,13 @@ var KiroCommand = class _KiroCommand extends ToolCommand {
2023
2082
  validate = true
2024
2083
  }) {
2025
2084
  const paths = this.getSettablePaths();
2026
- const filePath = join15(baseDir, paths.relativeDirPath, relativeFilePath);
2085
+ const filePath = join16(baseDir, paths.relativeDirPath, relativeFilePath);
2027
2086
  const fileContent = await readFileContent(filePath);
2028
2087
  const { body: content } = parseFrontmatter(fileContent);
2029
2088
  return new _KiroCommand({
2030
2089
  baseDir,
2031
2090
  relativeDirPath: paths.relativeDirPath,
2032
- relativeFilePath: basename12(relativeFilePath),
2091
+ relativeFilePath: basename13(relativeFilePath),
2033
2092
  fileContent: content.trim(),
2034
2093
  validate
2035
2094
  });
@@ -2050,7 +2109,7 @@ var KiroCommand = class _KiroCommand extends ToolCommand {
2050
2109
  };
2051
2110
 
2052
2111
  // src/features/commands/opencode-command.ts
2053
- import { basename as basename13, join as join16 } from "path";
2112
+ import { basename as basename14, join as join17 } from "path";
2054
2113
  import { optional as optional2, z as z10 } from "zod/mini";
2055
2114
  var OpenCodeCommandFrontmatterSchema = z10.looseObject({
2056
2115
  description: z10.string(),
@@ -2066,7 +2125,7 @@ var OpenCodeCommand = class _OpenCodeCommand extends ToolCommand {
2066
2125
  const result = OpenCodeCommandFrontmatterSchema.safeParse(frontmatter);
2067
2126
  if (!result.success) {
2068
2127
  throw new Error(
2069
- `Invalid frontmatter in ${join16(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
2128
+ `Invalid frontmatter in ${join17(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
2070
2129
  );
2071
2130
  }
2072
2131
  }
@@ -2079,7 +2138,7 @@ var OpenCodeCommand = class _OpenCodeCommand extends ToolCommand {
2079
2138
  }
2080
2139
  static getSettablePaths({ global } = {}) {
2081
2140
  return {
2082
- relativeDirPath: global ? join16(".config", "opencode", "command") : join16(".opencode", "command")
2141
+ relativeDirPath: global ? join17(".config", "opencode", "command") : join17(".opencode", "command")
2083
2142
  };
2084
2143
  }
2085
2144
  getBody() {
@@ -2140,7 +2199,7 @@ var OpenCodeCommand = class _OpenCodeCommand extends ToolCommand {
2140
2199
  return {
2141
2200
  success: false,
2142
2201
  error: new Error(
2143
- `Invalid frontmatter in ${join16(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
2202
+ `Invalid frontmatter in ${join17(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
2144
2203
  )
2145
2204
  };
2146
2205
  }
@@ -2151,7 +2210,7 @@ var OpenCodeCommand = class _OpenCodeCommand extends ToolCommand {
2151
2210
  global = false
2152
2211
  }) {
2153
2212
  const paths = this.getSettablePaths({ global });
2154
- const filePath = join16(baseDir, paths.relativeDirPath, relativeFilePath);
2213
+ const filePath = join17(baseDir, paths.relativeDirPath, relativeFilePath);
2155
2214
  const fileContent = await readFileContent(filePath);
2156
2215
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
2157
2216
  const result = OpenCodeCommandFrontmatterSchema.safeParse(frontmatter);
@@ -2161,7 +2220,7 @@ var OpenCodeCommand = class _OpenCodeCommand extends ToolCommand {
2161
2220
  return new _OpenCodeCommand({
2162
2221
  baseDir,
2163
2222
  relativeDirPath: paths.relativeDirPath,
2164
- relativeFilePath: basename13(relativeFilePath),
2223
+ relativeFilePath: basename14(relativeFilePath),
2165
2224
  frontmatter: result.data,
2166
2225
  body: content.trim(),
2167
2226
  validate
@@ -2190,7 +2249,7 @@ var OpenCodeCommand = class _OpenCodeCommand extends ToolCommand {
2190
2249
  };
2191
2250
 
2192
2251
  // src/features/commands/roo-command.ts
2193
- import { basename as basename14, join as join17 } from "path";
2252
+ import { basename as basename15, join as join18 } from "path";
2194
2253
  import { optional as optional3, z as z11 } from "zod/mini";
2195
2254
  var RooCommandFrontmatterSchema = z11.looseObject({
2196
2255
  description: z11.string(),
@@ -2201,7 +2260,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
2201
2260
  body;
2202
2261
  static getSettablePaths() {
2203
2262
  return {
2204
- relativeDirPath: join17(".roo", "commands")
2263
+ relativeDirPath: join18(".roo", "commands")
2205
2264
  };
2206
2265
  }
2207
2266
  constructor({ frontmatter, body, ...rest }) {
@@ -2209,7 +2268,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
2209
2268
  const result = RooCommandFrontmatterSchema.safeParse(frontmatter);
2210
2269
  if (!result.success) {
2211
2270
  throw new Error(
2212
- `Invalid frontmatter in ${join17(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
2271
+ `Invalid frontmatter in ${join18(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
2213
2272
  );
2214
2273
  }
2215
2274
  }
@@ -2280,7 +2339,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
2280
2339
  return {
2281
2340
  success: false,
2282
2341
  error: new Error(
2283
- `Invalid frontmatter in ${join17(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
2342
+ `Invalid frontmatter in ${join18(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
2284
2343
  )
2285
2344
  };
2286
2345
  }
@@ -2296,7 +2355,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
2296
2355
  relativeFilePath,
2297
2356
  validate = true
2298
2357
  }) {
2299
- const filePath = join17(baseDir, _RooCommand.getSettablePaths().relativeDirPath, relativeFilePath);
2358
+ const filePath = join18(baseDir, _RooCommand.getSettablePaths().relativeDirPath, relativeFilePath);
2300
2359
  const fileContent = await readFileContent(filePath);
2301
2360
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
2302
2361
  const result = RooCommandFrontmatterSchema.safeParse(frontmatter);
@@ -2306,7 +2365,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
2306
2365
  return new _RooCommand({
2307
2366
  baseDir,
2308
2367
  relativeDirPath: _RooCommand.getSettablePaths().relativeDirPath,
2309
- relativeFilePath: basename14(relativeFilePath),
2368
+ relativeFilePath: basename15(relativeFilePath),
2310
2369
  frontmatter: result.data,
2311
2370
  body: content.trim(),
2312
2371
  fileContent,
@@ -2340,6 +2399,7 @@ var commandsProcessorToolTargetTuple = [
2340
2399
  "codexcli",
2341
2400
  "copilot",
2342
2401
  "cursor",
2402
+ "factorydroid",
2343
2403
  "geminicli",
2344
2404
  "kilo",
2345
2405
  "kiro",
@@ -2409,6 +2469,13 @@ var toolCommandFactories = /* @__PURE__ */ new Map([
2409
2469
  meta: { extension: "md", supportsProject: true, supportsGlobal: true, isSimulated: false }
2410
2470
  }
2411
2471
  ],
2472
+ [
2473
+ "factorydroid",
2474
+ {
2475
+ class: FactorydroidCommand,
2476
+ meta: { extension: "md", supportsProject: true, supportsGlobal: true, isSimulated: true }
2477
+ }
2478
+ ],
2412
2479
  [
2413
2480
  "geminicli",
2414
2481
  {
@@ -2520,11 +2587,11 @@ var CommandsProcessor = class extends FeatureProcessor {
2520
2587
  */
2521
2588
  async loadRulesyncFiles() {
2522
2589
  const rulesyncCommandPaths = await findFilesByGlobs(
2523
- join18(RulesyncCommand.getSettablePaths().relativeDirPath, "*.md")
2590
+ join19(RulesyncCommand.getSettablePaths().relativeDirPath, "*.md")
2524
2591
  );
2525
2592
  const rulesyncCommands = await Promise.all(
2526
2593
  rulesyncCommandPaths.map(
2527
- (path3) => RulesyncCommand.fromFile({ relativeFilePath: basename15(path3) })
2594
+ (path3) => RulesyncCommand.fromFile({ relativeFilePath: basename16(path3) })
2528
2595
  )
2529
2596
  );
2530
2597
  logger.info(`Successfully loaded ${rulesyncCommands.length} rulesync commands`);
@@ -2540,14 +2607,14 @@ var CommandsProcessor = class extends FeatureProcessor {
2540
2607
  const factory = this.getFactory(this.toolTarget);
2541
2608
  const paths = factory.class.getSettablePaths({ global: this.global });
2542
2609
  const commandFilePaths = await findFilesByGlobs(
2543
- join18(this.baseDir, paths.relativeDirPath, `*.${factory.meta.extension}`)
2610
+ join19(this.baseDir, paths.relativeDirPath, `*.${factory.meta.extension}`)
2544
2611
  );
2545
2612
  if (forDeletion) {
2546
2613
  const toolCommands2 = commandFilePaths.map(
2547
2614
  (path3) => factory.class.forDeletion({
2548
2615
  baseDir: this.baseDir,
2549
2616
  relativeDirPath: paths.relativeDirPath,
2550
- relativeFilePath: basename15(path3),
2617
+ relativeFilePath: basename16(path3),
2551
2618
  global: this.global
2552
2619
  })
2553
2620
  ).filter((cmd) => cmd.isDeletable());
@@ -2558,7 +2625,7 @@ var CommandsProcessor = class extends FeatureProcessor {
2558
2625
  commandFilePaths.map(
2559
2626
  (path3) => factory.class.fromFile({
2560
2627
  baseDir: this.baseDir,
2561
- relativeFilePath: basename15(path3),
2628
+ relativeFilePath: basename16(path3),
2562
2629
  global: this.global
2563
2630
  })
2564
2631
  )
@@ -2660,14 +2727,14 @@ var CLAUDE_TO_CURSOR_EVENT_NAMES = Object.fromEntries(
2660
2727
  );
2661
2728
 
2662
2729
  // src/features/hooks/claudecode-hooks.ts
2663
- import { join as join20 } from "path";
2730
+ import { join as join21 } from "path";
2664
2731
 
2665
2732
  // src/types/tool-file.ts
2666
2733
  var ToolFile = class extends AiFile {
2667
2734
  };
2668
2735
 
2669
2736
  // src/features/hooks/rulesync-hooks.ts
2670
- import { join as join19 } from "path";
2737
+ import { join as join20 } from "path";
2671
2738
  var RulesyncHooks = class _RulesyncHooks extends RulesyncFile {
2672
2739
  json;
2673
2740
  constructor(params) {
@@ -2698,7 +2765,7 @@ var RulesyncHooks = class _RulesyncHooks extends RulesyncFile {
2698
2765
  validate = true
2699
2766
  }) {
2700
2767
  const paths = _RulesyncHooks.getSettablePaths();
2701
- const filePath = join19(baseDir, paths.relativeDirPath, paths.relativeFilePath);
2768
+ const filePath = join20(baseDir, paths.relativeDirPath, paths.relativeFilePath);
2702
2769
  if (!await fileExists(filePath)) {
2703
2770
  throw new Error(`No ${RULESYNC_HOOKS_RELATIVE_FILE_PATH} found.`);
2704
2771
  }
@@ -2856,7 +2923,7 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
2856
2923
  global = false
2857
2924
  }) {
2858
2925
  const paths = _ClaudecodeHooks.getSettablePaths({ global });
2859
- const filePath = join20(baseDir, paths.relativeDirPath, paths.relativeFilePath);
2926
+ const filePath = join21(baseDir, paths.relativeDirPath, paths.relativeFilePath);
2860
2927
  const fileContent = await readOrInitializeFileContent(
2861
2928
  filePath,
2862
2929
  JSON.stringify({ hooks: {} }, null, 2)
@@ -2876,7 +2943,7 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
2876
2943
  global = false
2877
2944
  }) {
2878
2945
  const paths = _ClaudecodeHooks.getSettablePaths({ global });
2879
- const filePath = join20(baseDir, paths.relativeDirPath, paths.relativeFilePath);
2946
+ const filePath = join21(baseDir, paths.relativeDirPath, paths.relativeFilePath);
2880
2947
  const existingContent = await readOrInitializeFileContent(
2881
2948
  filePath,
2882
2949
  JSON.stringify({}, null, 2)
@@ -2935,7 +3002,7 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
2935
3002
  };
2936
3003
 
2937
3004
  // src/features/hooks/cursor-hooks.ts
2938
- import { join as join21 } from "path";
3005
+ import { join as join22 } from "path";
2939
3006
  var CursorHooks = class _CursorHooks extends ToolHooks {
2940
3007
  constructor(params) {
2941
3008
  const { rulesyncHooks: _r, ...rest } = params;
@@ -2956,7 +3023,7 @@ var CursorHooks = class _CursorHooks extends ToolHooks {
2956
3023
  }) {
2957
3024
  const paths = _CursorHooks.getSettablePaths();
2958
3025
  const fileContent = await readFileContent(
2959
- join21(baseDir, paths.relativeDirPath, paths.relativeFilePath)
3026
+ join22(baseDir, paths.relativeDirPath, paths.relativeFilePath)
2960
3027
  );
2961
3028
  return new _CursorHooks({
2962
3029
  baseDir,
@@ -3159,10 +3226,10 @@ var HooksProcessor = class extends FeatureProcessor {
3159
3226
  import { z as z15 } from "zod/mini";
3160
3227
 
3161
3228
  // src/features/ignore/augmentcode-ignore.ts
3162
- import { join as join23 } from "path";
3229
+ import { join as join24 } from "path";
3163
3230
 
3164
3231
  // src/features/ignore/rulesync-ignore.ts
3165
- import { join as join22 } from "path";
3232
+ import { join as join23 } from "path";
3166
3233
  var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
3167
3234
  validate() {
3168
3235
  return { success: true, error: null };
@@ -3182,12 +3249,12 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
3182
3249
  static async fromFile() {
3183
3250
  const baseDir = process.cwd();
3184
3251
  const paths = this.getSettablePaths();
3185
- const recommendedPath = join22(
3252
+ const recommendedPath = join23(
3186
3253
  baseDir,
3187
3254
  paths.recommended.relativeDirPath,
3188
3255
  paths.recommended.relativeFilePath
3189
3256
  );
3190
- const legacyPath = join22(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
3257
+ const legacyPath = join23(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
3191
3258
  if (await fileExists(recommendedPath)) {
3192
3259
  const fileContent2 = await readFileContent(recommendedPath);
3193
3260
  return new _RulesyncIgnore({
@@ -3303,7 +3370,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
3303
3370
  validate = true
3304
3371
  }) {
3305
3372
  const fileContent = await readFileContent(
3306
- join23(
3373
+ join24(
3307
3374
  baseDir,
3308
3375
  this.getSettablePaths().relativeDirPath,
3309
3376
  this.getSettablePaths().relativeFilePath
@@ -3334,7 +3401,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
3334
3401
 
3335
3402
  // src/features/ignore/claudecode-ignore.ts
3336
3403
  import { uniq } from "es-toolkit";
3337
- import { join as join24 } from "path";
3404
+ import { join as join25 } from "path";
3338
3405
  var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
3339
3406
  constructor(params) {
3340
3407
  super(params);
@@ -3376,7 +3443,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
3376
3443
  const fileContent = rulesyncIgnore.getFileContent();
3377
3444
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
3378
3445
  const deniedValues = patterns.map((pattern) => `Read(${pattern})`);
3379
- const filePath = join24(
3446
+ const filePath = join25(
3380
3447
  baseDir,
3381
3448
  this.getSettablePaths().relativeDirPath,
3382
3449
  this.getSettablePaths().relativeFilePath
@@ -3412,7 +3479,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
3412
3479
  validate = true
3413
3480
  }) {
3414
3481
  const fileContent = await readFileContent(
3415
- join24(
3482
+ join25(
3416
3483
  baseDir,
3417
3484
  this.getSettablePaths().relativeDirPath,
3418
3485
  this.getSettablePaths().relativeFilePath
@@ -3442,7 +3509,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
3442
3509
  };
3443
3510
 
3444
3511
  // src/features/ignore/cline-ignore.ts
3445
- import { join as join25 } from "path";
3512
+ import { join as join26 } from "path";
3446
3513
  var ClineIgnore = class _ClineIgnore extends ToolIgnore {
3447
3514
  static getSettablePaths() {
3448
3515
  return {
@@ -3479,7 +3546,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
3479
3546
  validate = true
3480
3547
  }) {
3481
3548
  const fileContent = await readFileContent(
3482
- join25(
3549
+ join26(
3483
3550
  baseDir,
3484
3551
  this.getSettablePaths().relativeDirPath,
3485
3552
  this.getSettablePaths().relativeFilePath
@@ -3509,7 +3576,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
3509
3576
  };
3510
3577
 
3511
3578
  // src/features/ignore/cursor-ignore.ts
3512
- import { join as join26 } from "path";
3579
+ import { join as join27 } from "path";
3513
3580
  var CursorIgnore = class _CursorIgnore extends ToolIgnore {
3514
3581
  static getSettablePaths() {
3515
3582
  return {
@@ -3542,7 +3609,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
3542
3609
  validate = true
3543
3610
  }) {
3544
3611
  const fileContent = await readFileContent(
3545
- join26(
3612
+ join27(
3546
3613
  baseDir,
3547
3614
  this.getSettablePaths().relativeDirPath,
3548
3615
  this.getSettablePaths().relativeFilePath
@@ -3572,7 +3639,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
3572
3639
  };
3573
3640
 
3574
3641
  // src/features/ignore/geminicli-ignore.ts
3575
- import { join as join27 } from "path";
3642
+ import { join as join28 } from "path";
3576
3643
  var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
3577
3644
  static getSettablePaths() {
3578
3645
  return {
@@ -3599,7 +3666,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
3599
3666
  validate = true
3600
3667
  }) {
3601
3668
  const fileContent = await readFileContent(
3602
- join27(
3669
+ join28(
3603
3670
  baseDir,
3604
3671
  this.getSettablePaths().relativeDirPath,
3605
3672
  this.getSettablePaths().relativeFilePath
@@ -3629,7 +3696,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
3629
3696
  };
3630
3697
 
3631
3698
  // src/features/ignore/junie-ignore.ts
3632
- import { join as join28 } from "path";
3699
+ import { join as join29 } from "path";
3633
3700
  var JunieIgnore = class _JunieIgnore extends ToolIgnore {
3634
3701
  static getSettablePaths() {
3635
3702
  return {
@@ -3656,7 +3723,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
3656
3723
  validate = true
3657
3724
  }) {
3658
3725
  const fileContent = await readFileContent(
3659
- join28(
3726
+ join29(
3660
3727
  baseDir,
3661
3728
  this.getSettablePaths().relativeDirPath,
3662
3729
  this.getSettablePaths().relativeFilePath
@@ -3686,7 +3753,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
3686
3753
  };
3687
3754
 
3688
3755
  // src/features/ignore/kilo-ignore.ts
3689
- import { join as join29 } from "path";
3756
+ import { join as join30 } from "path";
3690
3757
  var KiloIgnore = class _KiloIgnore extends ToolIgnore {
3691
3758
  static getSettablePaths() {
3692
3759
  return {
@@ -3723,7 +3790,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
3723
3790
  validate = true
3724
3791
  }) {
3725
3792
  const fileContent = await readFileContent(
3726
- join29(
3793
+ join30(
3727
3794
  baseDir,
3728
3795
  this.getSettablePaths().relativeDirPath,
3729
3796
  this.getSettablePaths().relativeFilePath
@@ -3753,7 +3820,7 @@ var KiloIgnore = class _KiloIgnore extends ToolIgnore {
3753
3820
  };
3754
3821
 
3755
3822
  // src/features/ignore/kiro-ignore.ts
3756
- import { join as join30 } from "path";
3823
+ import { join as join31 } from "path";
3757
3824
  var KiroIgnore = class _KiroIgnore extends ToolIgnore {
3758
3825
  static getSettablePaths() {
3759
3826
  return {
@@ -3780,7 +3847,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
3780
3847
  validate = true
3781
3848
  }) {
3782
3849
  const fileContent = await readFileContent(
3783
- join30(
3850
+ join31(
3784
3851
  baseDir,
3785
3852
  this.getSettablePaths().relativeDirPath,
3786
3853
  this.getSettablePaths().relativeFilePath
@@ -3810,7 +3877,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
3810
3877
  };
3811
3878
 
3812
3879
  // src/features/ignore/qwencode-ignore.ts
3813
- import { join as join31 } from "path";
3880
+ import { join as join32 } from "path";
3814
3881
  var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
3815
3882
  static getSettablePaths() {
3816
3883
  return {
@@ -3837,7 +3904,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
3837
3904
  validate = true
3838
3905
  }) {
3839
3906
  const fileContent = await readFileContent(
3840
- join31(
3907
+ join32(
3841
3908
  baseDir,
3842
3909
  this.getSettablePaths().relativeDirPath,
3843
3910
  this.getSettablePaths().relativeFilePath
@@ -3867,7 +3934,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
3867
3934
  };
3868
3935
 
3869
3936
  // src/features/ignore/roo-ignore.ts
3870
- import { join as join32 } from "path";
3937
+ import { join as join33 } from "path";
3871
3938
  var RooIgnore = class _RooIgnore extends ToolIgnore {
3872
3939
  static getSettablePaths() {
3873
3940
  return {
@@ -3894,7 +3961,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
3894
3961
  validate = true
3895
3962
  }) {
3896
3963
  const fileContent = await readFileContent(
3897
- join32(
3964
+ join33(
3898
3965
  baseDir,
3899
3966
  this.getSettablePaths().relativeDirPath,
3900
3967
  this.getSettablePaths().relativeFilePath
@@ -3924,7 +3991,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
3924
3991
  };
3925
3992
 
3926
3993
  // src/features/ignore/windsurf-ignore.ts
3927
- import { join as join33 } from "path";
3994
+ import { join as join34 } from "path";
3928
3995
  var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
3929
3996
  static getSettablePaths() {
3930
3997
  return {
@@ -3951,7 +4018,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
3951
4018
  validate = true
3952
4019
  }) {
3953
4020
  const fileContent = await readFileContent(
3954
- join33(
4021
+ join34(
3955
4022
  baseDir,
3956
4023
  this.getSettablePaths().relativeDirPath,
3957
4024
  this.getSettablePaths().relativeFilePath
@@ -3982,7 +4049,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
3982
4049
 
3983
4050
  // src/features/ignore/zed-ignore.ts
3984
4051
  import { uniq as uniq2 } from "es-toolkit";
3985
- import { join as join34 } from "path";
4052
+ import { join as join35 } from "path";
3986
4053
  var ZedIgnore = class _ZedIgnore extends ToolIgnore {
3987
4054
  constructor(params) {
3988
4055
  super(params);
@@ -4018,7 +4085,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
4018
4085
  }) {
4019
4086
  const fileContent = rulesyncIgnore.getFileContent();
4020
4087
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
4021
- const filePath = join34(
4088
+ const filePath = join35(
4022
4089
  baseDir,
4023
4090
  this.getSettablePaths().relativeDirPath,
4024
4091
  this.getSettablePaths().relativeFilePath
@@ -4045,7 +4112,7 @@ var ZedIgnore = class _ZedIgnore extends ToolIgnore {
4045
4112
  validate = true
4046
4113
  }) {
4047
4114
  const fileContent = await readFileContent(
4048
- join34(
4115
+ join35(
4049
4116
  baseDir,
4050
4117
  this.getSettablePaths().relativeDirPath,
4051
4118
  this.getSettablePaths().relativeFilePath
@@ -4227,10 +4294,10 @@ var IgnoreProcessor = class extends FeatureProcessor {
4227
4294
  import { z as z20 } from "zod/mini";
4228
4295
 
4229
4296
  // src/features/mcp/claudecode-mcp.ts
4230
- import { join as join37 } from "path";
4297
+ import { join as join38 } from "path";
4231
4298
 
4232
4299
  // src/features/mcp/modular-mcp.ts
4233
- import { join as join35 } from "path";
4300
+ import { join as join36 } from "path";
4234
4301
  import { z as z17 } from "zod/mini";
4235
4302
 
4236
4303
  // src/types/mcp.ts
@@ -4318,7 +4385,7 @@ var ModularMcp = class _ModularMcp extends AiFile {
4318
4385
  args: [
4319
4386
  "-y",
4320
4387
  "@kimuson/modular-mcp",
4321
- join35(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4388
+ join36(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4322
4389
  ],
4323
4390
  env: {}
4324
4391
  }
@@ -4356,7 +4423,7 @@ var ModularMcp = class _ModularMcp extends AiFile {
4356
4423
 
4357
4424
  // src/features/mcp/rulesync-mcp.ts
4358
4425
  import { omit } from "es-toolkit/object";
4359
- import { join as join36 } from "path";
4426
+ import { join as join37 } from "path";
4360
4427
  import { z as z18 } from "zod/mini";
4361
4428
  var RulesyncMcpServerSchema = z18.union([
4362
4429
  z18.extend(McpServerSchema, {
@@ -4412,12 +4479,12 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
4412
4479
  }) {
4413
4480
  const baseDir = process.cwd();
4414
4481
  const paths = this.getSettablePaths();
4415
- const recommendedPath = join36(
4482
+ const recommendedPath = join37(
4416
4483
  baseDir,
4417
4484
  paths.recommended.relativeDirPath,
4418
4485
  paths.recommended.relativeFilePath
4419
4486
  );
4420
- const legacyPath = join36(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
4487
+ const legacyPath = join37(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
4421
4488
  if (await fileExists(recommendedPath)) {
4422
4489
  const fileContent2 = await readFileContent(recommendedPath);
4423
4490
  return new _RulesyncMcp({
@@ -4561,7 +4628,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
4561
4628
  }) {
4562
4629
  const paths = this.getSettablePaths({ global });
4563
4630
  const fileContent = await readOrInitializeFileContent(
4564
- join37(baseDir, paths.relativeDirPath, paths.relativeFilePath),
4631
+ join38(baseDir, paths.relativeDirPath, paths.relativeFilePath),
4565
4632
  JSON.stringify({ mcpServers: {} }, null, 2)
4566
4633
  );
4567
4634
  const json = JSON.parse(fileContent);
@@ -4583,7 +4650,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
4583
4650
  }) {
4584
4651
  const paths = this.getSettablePaths({ global });
4585
4652
  const fileContent = await readOrInitializeFileContent(
4586
- join37(baseDir, paths.relativeDirPath, paths.relativeFilePath),
4653
+ join38(baseDir, paths.relativeDirPath, paths.relativeFilePath),
4587
4654
  JSON.stringify({ mcpServers: {} }, null, 2)
4588
4655
  );
4589
4656
  const json = JSON.parse(fileContent);
@@ -4633,7 +4700,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
4633
4700
  };
4634
4701
 
4635
4702
  // src/features/mcp/cline-mcp.ts
4636
- import { join as join38 } from "path";
4703
+ import { join as join39 } from "path";
4637
4704
  var ClineMcp = class _ClineMcp extends ToolMcp {
4638
4705
  json;
4639
4706
  constructor(params) {
@@ -4654,7 +4721,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
4654
4721
  validate = true
4655
4722
  }) {
4656
4723
  const fileContent = await readFileContent(
4657
- join38(
4724
+ join39(
4658
4725
  baseDir,
4659
4726
  this.getSettablePaths().relativeDirPath,
4660
4727
  this.getSettablePaths().relativeFilePath
@@ -4703,7 +4770,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
4703
4770
  };
4704
4771
 
4705
4772
  // src/features/mcp/codexcli-mcp.ts
4706
- import { join as join39 } from "path";
4773
+ import { join as join40 } from "path";
4707
4774
  import * as smolToml from "smol-toml";
4708
4775
  var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
4709
4776
  toml;
@@ -4739,7 +4806,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
4739
4806
  }) {
4740
4807
  const paths = this.getSettablePaths({ global });
4741
4808
  const fileContent = await readFileContent(
4742
- join39(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4809
+ join40(baseDir, paths.relativeDirPath, paths.relativeFilePath)
4743
4810
  );
4744
4811
  return new _CodexcliMcp({
4745
4812
  baseDir,
@@ -4756,7 +4823,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
4756
4823
  global = false
4757
4824
  }) {
4758
4825
  const paths = this.getSettablePaths({ global });
4759
- const configTomlFilePath = join39(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4826
+ const configTomlFilePath = join40(baseDir, paths.relativeDirPath, paths.relativeFilePath);
4760
4827
  const configTomlFileContent = await readOrInitializeFileContent(
4761
4828
  configTomlFilePath,
4762
4829
  smolToml.stringify({})
@@ -4810,7 +4877,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
4810
4877
  };
4811
4878
 
4812
4879
  // src/features/mcp/copilot-mcp.ts
4813
- import { join as join40 } from "path";
4880
+ import { join as join41 } from "path";
4814
4881
  function convertToCopilotFormat(mcpServers) {
4815
4882
  return { servers: mcpServers };
4816
4883
  }
@@ -4837,7 +4904,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
4837
4904
  validate = true
4838
4905
  }) {
4839
4906
  const fileContent = await readFileContent(
4840
- join40(
4907
+ join41(
4841
4908
  baseDir,
4842
4909
  this.getSettablePaths().relativeDirPath,
4843
4910
  this.getSettablePaths().relativeFilePath
@@ -4890,7 +4957,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
4890
4957
  };
4891
4958
 
4892
4959
  // src/features/mcp/cursor-mcp.ts
4893
- import { join as join41 } from "path";
4960
+ import { join as join42 } from "path";
4894
4961
  var CURSOR_ENV_VAR_PATTERN = /\$\{env:([^}]+)\}/g;
4895
4962
  function isMcpServers(value) {
4896
4963
  return value !== void 0 && value !== null && typeof value === "object";
@@ -4951,7 +5018,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
4951
5018
  validate = true
4952
5019
  }) {
4953
5020
  const fileContent = await readFileContent(
4954
- join41(
5021
+ join42(
4955
5022
  baseDir,
4956
5023
  this.getSettablePaths().relativeDirPath,
4957
5024
  this.getSettablePaths().relativeFilePath
@@ -5018,8 +5085,89 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
5018
5085
  }
5019
5086
  };
5020
5087
 
5088
+ // src/features/mcp/factorydroid-mcp.ts
5089
+ import { join as join43 } from "path";
5090
+ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
5091
+ json;
5092
+ constructor(params) {
5093
+ super(params);
5094
+ this.json = this.fileContent !== void 0 ? JSON.parse(this.fileContent) : {};
5095
+ }
5096
+ getJson() {
5097
+ return this.json;
5098
+ }
5099
+ static getSettablePaths() {
5100
+ return {
5101
+ relativeDirPath: ".factorydroid",
5102
+ relativeFilePath: "mcp.json"
5103
+ };
5104
+ }
5105
+ static async fromFile({
5106
+ baseDir = process.cwd(),
5107
+ validate = true
5108
+ }) {
5109
+ const fileContent = await readFileContent(
5110
+ join43(
5111
+ baseDir,
5112
+ this.getSettablePaths().relativeDirPath,
5113
+ this.getSettablePaths().relativeFilePath
5114
+ )
5115
+ );
5116
+ return new _FactorydroidMcp({
5117
+ baseDir,
5118
+ relativeDirPath: this.getSettablePaths().relativeDirPath,
5119
+ relativeFilePath: this.getSettablePaths().relativeFilePath,
5120
+ fileContent,
5121
+ validate
5122
+ });
5123
+ }
5124
+ static fromRulesyncMcp({
5125
+ baseDir = process.cwd(),
5126
+ rulesyncMcp,
5127
+ validate = true
5128
+ }) {
5129
+ const json = rulesyncMcp.getJson();
5130
+ const factorydroidConfig = {
5131
+ mcpServers: json.mcpServers || {}
5132
+ };
5133
+ const fileContent = JSON.stringify(factorydroidConfig, null, 2);
5134
+ return new _FactorydroidMcp({
5135
+ baseDir,
5136
+ relativeDirPath: this.getSettablePaths().relativeDirPath,
5137
+ relativeFilePath: this.getSettablePaths().relativeFilePath,
5138
+ fileContent,
5139
+ validate
5140
+ });
5141
+ }
5142
+ toRulesyncMcp() {
5143
+ return new RulesyncMcp({
5144
+ baseDir: this.baseDir,
5145
+ relativeDirPath: this.relativeDirPath,
5146
+ relativeFilePath: "rulesync.mcp.json",
5147
+ fileContent: JSON.stringify(this.json),
5148
+ validate: true
5149
+ });
5150
+ }
5151
+ validate() {
5152
+ return { success: true, error: null };
5153
+ }
5154
+ static forDeletion({
5155
+ baseDir = process.cwd(),
5156
+ relativeDirPath,
5157
+ relativeFilePath
5158
+ }) {
5159
+ return new _FactorydroidMcp({
5160
+ baseDir,
5161
+ relativeDirPath,
5162
+ relativeFilePath,
5163
+ fileContent: "{}",
5164
+ validate: false
5165
+ });
5166
+ }
5167
+ };
5168
+
5021
5169
  // src/features/mcp/geminicli-mcp.ts
5022
- import { join as join42 } from "path";
5170
+ import { join as join44 } from "path";
5023
5171
  var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
5024
5172
  json;
5025
5173
  constructor(params) {
@@ -5048,7 +5196,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
5048
5196
  }) {
5049
5197
  const paths = this.getSettablePaths({ global });
5050
5198
  const fileContent = await readOrInitializeFileContent(
5051
- join42(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5199
+ join44(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5052
5200
  JSON.stringify({ mcpServers: {} }, null, 2)
5053
5201
  );
5054
5202
  const json = JSON.parse(fileContent);
@@ -5069,7 +5217,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
5069
5217
  }) {
5070
5218
  const paths = this.getSettablePaths({ global });
5071
5219
  const fileContent = await readOrInitializeFileContent(
5072
- join42(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5220
+ join44(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5073
5221
  JSON.stringify({ mcpServers: {} }, null, 2)
5074
5222
  );
5075
5223
  const json = JSON.parse(fileContent);
@@ -5114,7 +5262,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
5114
5262
  };
5115
5263
 
5116
5264
  // src/features/mcp/junie-mcp.ts
5117
- import { join as join43 } from "path";
5265
+ import { join as join45 } from "path";
5118
5266
  var JunieMcp = class _JunieMcp extends ToolMcp {
5119
5267
  json;
5120
5268
  constructor(params) {
@@ -5126,7 +5274,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
5126
5274
  }
5127
5275
  static getSettablePaths() {
5128
5276
  return {
5129
- relativeDirPath: join43(".junie", "mcp"),
5277
+ relativeDirPath: join45(".junie", "mcp"),
5130
5278
  relativeFilePath: "mcp.json"
5131
5279
  };
5132
5280
  }
@@ -5135,7 +5283,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
5135
5283
  validate = true
5136
5284
  }) {
5137
5285
  const fileContent = await readFileContent(
5138
- join43(
5286
+ join45(
5139
5287
  baseDir,
5140
5288
  this.getSettablePaths().relativeDirPath,
5141
5289
  this.getSettablePaths().relativeFilePath
@@ -5184,7 +5332,7 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
5184
5332
  };
5185
5333
 
5186
5334
  // src/features/mcp/kilo-mcp.ts
5187
- import { join as join44 } from "path";
5335
+ import { join as join46 } from "path";
5188
5336
  var KiloMcp = class _KiloMcp extends ToolMcp {
5189
5337
  json;
5190
5338
  constructor(params) {
@@ -5206,7 +5354,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
5206
5354
  }) {
5207
5355
  const paths = this.getSettablePaths();
5208
5356
  const fileContent = await readOrInitializeFileContent(
5209
- join44(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5357
+ join46(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5210
5358
  JSON.stringify({ mcpServers: {} }, null, 2)
5211
5359
  );
5212
5360
  return new _KiloMcp({
@@ -5260,7 +5408,7 @@ var KiloMcp = class _KiloMcp extends ToolMcp {
5260
5408
  };
5261
5409
 
5262
5410
  // src/features/mcp/kiro-mcp.ts
5263
- import { join as join45 } from "path";
5411
+ import { join as join47 } from "path";
5264
5412
  var KiroMcp = class _KiroMcp extends ToolMcp {
5265
5413
  json;
5266
5414
  constructor(params) {
@@ -5272,7 +5420,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
5272
5420
  }
5273
5421
  static getSettablePaths() {
5274
5422
  return {
5275
- relativeDirPath: join45(".kiro", "settings"),
5423
+ relativeDirPath: join47(".kiro", "settings"),
5276
5424
  relativeFilePath: "mcp.json"
5277
5425
  };
5278
5426
  }
@@ -5282,7 +5430,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
5282
5430
  }) {
5283
5431
  const paths = this.getSettablePaths();
5284
5432
  const fileContent = await readOrInitializeFileContent(
5285
- join45(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5433
+ join47(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5286
5434
  JSON.stringify({ mcpServers: {} }, null, 2)
5287
5435
  );
5288
5436
  return new _KiroMcp({
@@ -5336,7 +5484,7 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
5336
5484
  };
5337
5485
 
5338
5486
  // src/features/mcp/opencode-mcp.ts
5339
- import { join as join46 } from "path";
5487
+ import { join as join48 } from "path";
5340
5488
  import { z as z19 } from "zod/mini";
5341
5489
  var OpencodeMcpLocalServerSchema = z19.object({
5342
5490
  type: z19.literal("local"),
@@ -5460,7 +5608,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
5460
5608
  }) {
5461
5609
  const paths = this.getSettablePaths({ global });
5462
5610
  const fileContent = await readOrInitializeFileContent(
5463
- join46(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5611
+ join48(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5464
5612
  JSON.stringify({ mcp: {} }, null, 2)
5465
5613
  );
5466
5614
  const json = JSON.parse(fileContent);
@@ -5481,7 +5629,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
5481
5629
  }) {
5482
5630
  const paths = this.getSettablePaths({ global });
5483
5631
  const fileContent = await readOrInitializeFileContent(
5484
- join46(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5632
+ join48(baseDir, paths.relativeDirPath, paths.relativeFilePath),
5485
5633
  JSON.stringify({ mcp: {} }, null, 2)
5486
5634
  );
5487
5635
  const json = JSON.parse(fileContent);
@@ -5527,7 +5675,7 @@ var OpencodeMcp = class _OpencodeMcp extends ToolMcp {
5527
5675
  };
5528
5676
 
5529
5677
  // src/features/mcp/roo-mcp.ts
5530
- import { join as join47 } from "path";
5678
+ import { join as join49 } from "path";
5531
5679
  function isRooMcpServers(value) {
5532
5680
  return value !== void 0 && value !== null && typeof value === "object";
5533
5681
  }
@@ -5579,7 +5727,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
5579
5727
  validate = true
5580
5728
  }) {
5581
5729
  const fileContent = await readFileContent(
5582
- join47(
5730
+ join49(
5583
5731
  baseDir,
5584
5732
  this.getSettablePaths().relativeDirPath,
5585
5733
  this.getSettablePaths().relativeFilePath
@@ -5642,6 +5790,7 @@ var mcpProcessorToolTargetTuple = [
5642
5790
  "codexcli",
5643
5791
  "copilot",
5644
5792
  "cursor",
5793
+ "factorydroid",
5645
5794
  "geminicli",
5646
5795
  "kilo",
5647
5796
  "kiro",
@@ -5693,6 +5842,13 @@ var toolMcpFactories = /* @__PURE__ */ new Map([
5693
5842
  meta: { supportsProject: true, supportsGlobal: false, supportsModular: false }
5694
5843
  }
5695
5844
  ],
5845
+ [
5846
+ "factorydroid",
5847
+ {
5848
+ class: FactorydroidMcp,
5849
+ meta: { supportsProject: true, supportsGlobal: true, supportsModular: false }
5850
+ }
5851
+ ],
5696
5852
  [
5697
5853
  "geminicli",
5698
5854
  {
@@ -5894,24 +6050,24 @@ var McpProcessor = class extends FeatureProcessor {
5894
6050
 
5895
6051
  // src/features/rules/rules-processor.ts
5896
6052
  import { encode } from "@toon-format/toon";
5897
- import { basename as basename22, join as join100, relative as relative4 } from "path";
6053
+ import { basename as basename23, join as join105, relative as relative4 } from "path";
5898
6054
  import { z as z48 } from "zod/mini";
5899
6055
 
5900
6056
  // src/constants/general.ts
5901
6057
  var SKILL_FILE_NAME = "SKILL.md";
5902
6058
 
5903
6059
  // src/features/skills/agentsmd-skill.ts
5904
- import { join as join51 } from "path";
6060
+ import { join as join53 } from "path";
5905
6061
 
5906
6062
  // src/features/skills/simulated-skill.ts
5907
- import { join as join50 } from "path";
6063
+ import { join as join52 } from "path";
5908
6064
  import { z as z21 } from "zod/mini";
5909
6065
 
5910
6066
  // src/features/skills/tool-skill.ts
5911
- import { join as join49 } from "path";
6067
+ import { join as join51 } from "path";
5912
6068
 
5913
6069
  // src/types/ai-dir.ts
5914
- import path2, { basename as basename16, join as join48, relative as relative3, resolve as resolve4 } from "path";
6070
+ import path2, { basename as basename17, join as join50, relative as relative3, resolve as resolve4 } from "path";
5915
6071
  var AiDir = class {
5916
6072
  /**
5917
6073
  * @example "."
@@ -6005,10 +6161,10 @@ var AiDir = class {
6005
6161
  * @returns Array of files with their relative paths and buffers
6006
6162
  */
6007
6163
  static async collectOtherFiles(baseDir, relativeDirPath, dirName, excludeFileName) {
6008
- const dirPath = join48(baseDir, relativeDirPath, dirName);
6009
- const glob = join48(dirPath, "**", "*");
6164
+ const dirPath = join50(baseDir, relativeDirPath, dirName);
6165
+ const glob = join50(dirPath, "**", "*");
6010
6166
  const filePaths = await findFilesByGlobs(glob, { type: "file" });
6011
- const filteredPaths = filePaths.filter((filePath) => basename16(filePath) !== excludeFileName);
6167
+ const filteredPaths = filePaths.filter((filePath) => basename17(filePath) !== excludeFileName);
6012
6168
  const files = await Promise.all(
6013
6169
  filteredPaths.map(async (filePath) => {
6014
6170
  const fileBuffer = await readFileBuffer(filePath);
@@ -6104,8 +6260,8 @@ var ToolSkill = class extends AiDir {
6104
6260
  }) {
6105
6261
  const settablePaths = getSettablePaths({ global });
6106
6262
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
6107
- const skillDirPath = join49(baseDir, actualRelativeDirPath, dirName);
6108
- const skillFilePath = join49(skillDirPath, SKILL_FILE_NAME);
6263
+ const skillDirPath = join51(baseDir, actualRelativeDirPath, dirName);
6264
+ const skillFilePath = join51(skillDirPath, SKILL_FILE_NAME);
6109
6265
  if (!await fileExists(skillFilePath)) {
6110
6266
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
6111
6267
  }
@@ -6163,7 +6319,7 @@ var SimulatedSkill = class extends ToolSkill {
6163
6319
  const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
6164
6320
  if (!result.success) {
6165
6321
  throw new Error(
6166
- `Invalid frontmatter in ${join50(relativeDirPath, dirName)}: ${formatError(result.error)}`
6322
+ `Invalid frontmatter in ${join52(relativeDirPath, dirName)}: ${formatError(result.error)}`
6167
6323
  );
6168
6324
  }
6169
6325
  }
@@ -6221,8 +6377,8 @@ var SimulatedSkill = class extends ToolSkill {
6221
6377
  }) {
6222
6378
  const settablePaths = this.getSettablePaths();
6223
6379
  const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
6224
- const skillDirPath = join50(baseDir, actualRelativeDirPath, dirName);
6225
- const skillFilePath = join50(skillDirPath, SKILL_FILE_NAME);
6380
+ const skillDirPath = join52(baseDir, actualRelativeDirPath, dirName);
6381
+ const skillFilePath = join52(skillDirPath, SKILL_FILE_NAME);
6226
6382
  if (!await fileExists(skillFilePath)) {
6227
6383
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
6228
6384
  }
@@ -6299,7 +6455,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
6299
6455
  throw new Error("AgentsmdSkill does not support global mode.");
6300
6456
  }
6301
6457
  return {
6302
- relativeDirPath: join51(".agents", "skills")
6458
+ relativeDirPath: join53(".agents", "skills")
6303
6459
  };
6304
6460
  }
6305
6461
  static async fromDir(params) {
@@ -6325,15 +6481,46 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
6325
6481
  }
6326
6482
  };
6327
6483
 
6484
+ // src/features/skills/factorydroid-skill.ts
6485
+ import { join as join54 } from "path";
6486
+ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
6487
+ static getSettablePaths(_options) {
6488
+ return {
6489
+ relativeDirPath: join54(".factorydroid", "skills")
6490
+ };
6491
+ }
6492
+ static async fromDir(params) {
6493
+ const baseParams = await this.fromDirDefault(params);
6494
+ return new _FactorydroidSkill(baseParams);
6495
+ }
6496
+ static fromRulesyncSkill(params) {
6497
+ const baseParams = {
6498
+ ...this.fromRulesyncSkillDefault(params),
6499
+ relativeDirPath: this.getSettablePaths().relativeDirPath
6500
+ };
6501
+ return new _FactorydroidSkill(baseParams);
6502
+ }
6503
+ static isTargetedByRulesyncSkill(rulesyncSkill) {
6504
+ return this.isTargetedByRulesyncSkillDefault({
6505
+ rulesyncSkill,
6506
+ toolTarget: "factorydroid"
6507
+ });
6508
+ }
6509
+ static forDeletion(params) {
6510
+ const baseParams = this.forDeletionDefault(params);
6511
+ return new _FactorydroidSkill(baseParams);
6512
+ }
6513
+ };
6514
+
6328
6515
  // src/features/skills/geminicli-skill.ts
6329
- import { join as join52 } from "path";
6516
+ import { join as join55 } from "path";
6330
6517
  var GeminiCliSkill = class _GeminiCliSkill extends SimulatedSkill {
6331
6518
  static getSettablePaths(options) {
6332
6519
  if (options?.global) {
6333
6520
  throw new Error("GeminiCliSkill does not support global mode.");
6334
6521
  }
6335
6522
  return {
6336
- relativeDirPath: join52(".gemini", "skills")
6523
+ relativeDirPath: join55(".gemini", "skills")
6337
6524
  };
6338
6525
  }
6339
6526
  static async fromDir(params) {
@@ -6360,11 +6547,11 @@ var GeminiCliSkill = class _GeminiCliSkill extends SimulatedSkill {
6360
6547
  };
6361
6548
 
6362
6549
  // src/features/skills/skills-processor.ts
6363
- import { basename as basename17, join as join65 } from "path";
6550
+ import { basename as basename18, join as join68 } from "path";
6364
6551
  import { z as z33 } from "zod/mini";
6365
6552
 
6366
6553
  // src/types/dir-feature-processor.ts
6367
- import { join as join53 } from "path";
6554
+ import { join as join56 } from "path";
6368
6555
  var DirFeatureProcessor = class {
6369
6556
  baseDir;
6370
6557
  constructor({ baseDir = process.cwd() }) {
@@ -6386,14 +6573,14 @@ var DirFeatureProcessor = class {
6386
6573
  await ensureDir(dirPath);
6387
6574
  const mainFile = aiDir.getMainFile();
6388
6575
  if (mainFile) {
6389
- const mainFilePath = join53(dirPath, mainFile.name);
6576
+ const mainFilePath = join56(dirPath, mainFile.name);
6390
6577
  const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter);
6391
6578
  const contentWithNewline = addTrailingNewline(content);
6392
6579
  await writeFileContent(mainFilePath, contentWithNewline);
6393
6580
  }
6394
6581
  const otherFiles = aiDir.getOtherFiles();
6395
6582
  for (const file of otherFiles) {
6396
- const filePath = join53(dirPath, file.relativeFilePathToDirPath);
6583
+ const filePath = join56(dirPath, file.relativeFilePathToDirPath);
6397
6584
  const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
6398
6585
  await writeFileContent(filePath, contentWithNewline);
6399
6586
  }
@@ -6408,11 +6595,11 @@ var DirFeatureProcessor = class {
6408
6595
  };
6409
6596
 
6410
6597
  // src/features/skills/antigravity-skill.ts
6411
- import { join as join55 } from "path";
6598
+ import { join as join58 } from "path";
6412
6599
  import { z as z23 } from "zod/mini";
6413
6600
 
6414
6601
  // src/features/skills/rulesync-skill.ts
6415
- import { join as join54 } from "path";
6602
+ import { join as join57 } from "path";
6416
6603
  import { z as z22 } from "zod/mini";
6417
6604
  var RulesyncSkillFrontmatterSchemaInternal = z22.looseObject({
6418
6605
  name: z22.string(),
@@ -6504,8 +6691,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
6504
6691
  dirName,
6505
6692
  global = false
6506
6693
  }) {
6507
- const skillDirPath = join54(baseDir, relativeDirPath, dirName);
6508
- const skillFilePath = join54(skillDirPath, SKILL_FILE_NAME);
6694
+ const skillDirPath = join57(baseDir, relativeDirPath, dirName);
6695
+ const skillFilePath = join57(skillDirPath, SKILL_FILE_NAME);
6509
6696
  if (!await fileExists(skillFilePath)) {
6510
6697
  throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
6511
6698
  }
@@ -6542,7 +6729,7 @@ var AntigravitySkillFrontmatterSchema = z23.looseObject({
6542
6729
  var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
6543
6730
  constructor({
6544
6731
  baseDir = process.cwd(),
6545
- relativeDirPath = join55(".agent", "skills"),
6732
+ relativeDirPath = join58(".agent", "skills"),
6546
6733
  dirName,
6547
6734
  frontmatter,
6548
6735
  body,
@@ -6574,11 +6761,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
6574
6761
  } = {}) {
6575
6762
  if (global) {
6576
6763
  return {
6577
- relativeDirPath: join55(".gemini", "antigravity", "skills")
6764
+ relativeDirPath: join58(".gemini", "antigravity", "skills")
6578
6765
  };
6579
6766
  }
6580
6767
  return {
6581
- relativeDirPath: join55(".agent", "skills")
6768
+ relativeDirPath: join58(".agent", "skills")
6582
6769
  };
6583
6770
  }
6584
6771
  getFrontmatter() {
@@ -6660,9 +6847,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
6660
6847
  });
6661
6848
  const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
6662
6849
  if (!result.success) {
6663
- const skillDirPath = join55(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
6850
+ const skillDirPath = join58(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
6664
6851
  throw new Error(
6665
- `Invalid frontmatter in ${join55(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
6852
+ `Invalid frontmatter in ${join58(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
6666
6853
  );
6667
6854
  }
6668
6855
  return new _AntigravitySkill({
@@ -6696,7 +6883,7 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
6696
6883
  };
6697
6884
 
6698
6885
  // src/features/skills/claudecode-skill.ts
6699
- import { join as join56 } from "path";
6886
+ import { join as join59 } from "path";
6700
6887
  import { z as z24 } from "zod/mini";
6701
6888
  var ClaudecodeSkillFrontmatterSchema = z24.looseObject({
6702
6889
  name: z24.string(),
@@ -6706,7 +6893,7 @@ var ClaudecodeSkillFrontmatterSchema = z24.looseObject({
6706
6893
  var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
6707
6894
  constructor({
6708
6895
  baseDir = process.cwd(),
6709
- relativeDirPath = join56(".claude", "skills"),
6896
+ relativeDirPath = join59(".claude", "skills"),
6710
6897
  dirName,
6711
6898
  frontmatter,
6712
6899
  body,
@@ -6737,7 +6924,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
6737
6924
  global: _global = false
6738
6925
  } = {}) {
6739
6926
  return {
6740
- relativeDirPath: join56(".claude", "skills")
6927
+ relativeDirPath: join59(".claude", "skills")
6741
6928
  };
6742
6929
  }
6743
6930
  getFrontmatter() {
@@ -6825,9 +7012,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
6825
7012
  });
6826
7013
  const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
6827
7014
  if (!result.success) {
6828
- const skillDirPath = join56(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7015
+ const skillDirPath = join59(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
6829
7016
  throw new Error(
6830
- `Invalid frontmatter in ${join56(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7017
+ `Invalid frontmatter in ${join59(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
6831
7018
  );
6832
7019
  }
6833
7020
  return new _ClaudecodeSkill({
@@ -6861,7 +7048,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
6861
7048
  };
6862
7049
 
6863
7050
  // src/features/skills/codexcli-skill.ts
6864
- import { join as join57 } from "path";
7051
+ import { join as join60 } from "path";
6865
7052
  import { z as z25 } from "zod/mini";
6866
7053
  var CodexCliSkillFrontmatterSchema = z25.looseObject({
6867
7054
  name: z25.string(),
@@ -6875,7 +7062,7 @@ var CodexCliSkillFrontmatterSchema = z25.looseObject({
6875
7062
  var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
6876
7063
  constructor({
6877
7064
  baseDir = process.cwd(),
6878
- relativeDirPath = join57(".codex", "skills"),
7065
+ relativeDirPath = join60(".codex", "skills"),
6879
7066
  dirName,
6880
7067
  frontmatter,
6881
7068
  body,
@@ -6906,7 +7093,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
6906
7093
  global: _global = false
6907
7094
  } = {}) {
6908
7095
  return {
6909
- relativeDirPath: join57(".codex", "skills")
7096
+ relativeDirPath: join60(".codex", "skills")
6910
7097
  };
6911
7098
  }
6912
7099
  getFrontmatter() {
@@ -6998,9 +7185,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
6998
7185
  });
6999
7186
  const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
7000
7187
  if (!result.success) {
7001
- const skillDirPath = join57(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7188
+ const skillDirPath = join60(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7002
7189
  throw new Error(
7003
- `Invalid frontmatter in ${join57(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7190
+ `Invalid frontmatter in ${join60(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7004
7191
  );
7005
7192
  }
7006
7193
  return new _CodexCliSkill({
@@ -7034,7 +7221,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
7034
7221
  };
7035
7222
 
7036
7223
  // src/features/skills/copilot-skill.ts
7037
- import { join as join58 } from "path";
7224
+ import { join as join61 } from "path";
7038
7225
  import { z as z26 } from "zod/mini";
7039
7226
  var CopilotSkillFrontmatterSchema = z26.looseObject({
7040
7227
  name: z26.string(),
@@ -7044,7 +7231,7 @@ var CopilotSkillFrontmatterSchema = z26.looseObject({
7044
7231
  var CopilotSkill = class _CopilotSkill extends ToolSkill {
7045
7232
  constructor({
7046
7233
  baseDir = process.cwd(),
7047
- relativeDirPath = join58(".github", "skills"),
7234
+ relativeDirPath = join61(".github", "skills"),
7048
7235
  dirName,
7049
7236
  frontmatter,
7050
7237
  body,
@@ -7076,7 +7263,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
7076
7263
  throw new Error("CopilotSkill does not support global mode.");
7077
7264
  }
7078
7265
  return {
7079
- relativeDirPath: join58(".github", "skills")
7266
+ relativeDirPath: join61(".github", "skills")
7080
7267
  };
7081
7268
  }
7082
7269
  getFrontmatter() {
@@ -7164,9 +7351,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
7164
7351
  });
7165
7352
  const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
7166
7353
  if (!result.success) {
7167
- const skillDirPath = join58(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7354
+ const skillDirPath = join61(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7168
7355
  throw new Error(
7169
- `Invalid frontmatter in ${join58(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7356
+ `Invalid frontmatter in ${join61(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7170
7357
  );
7171
7358
  }
7172
7359
  return new _CopilotSkill({
@@ -7201,7 +7388,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
7201
7388
  };
7202
7389
 
7203
7390
  // src/features/skills/cursor-skill.ts
7204
- import { join as join59 } from "path";
7391
+ import { join as join62 } from "path";
7205
7392
  import { z as z27 } from "zod/mini";
7206
7393
  var CursorSkillFrontmatterSchema = z27.looseObject({
7207
7394
  name: z27.string(),
@@ -7210,7 +7397,7 @@ var CursorSkillFrontmatterSchema = z27.looseObject({
7210
7397
  var CursorSkill = class _CursorSkill extends ToolSkill {
7211
7398
  constructor({
7212
7399
  baseDir = process.cwd(),
7213
- relativeDirPath = join59(".cursor", "skills"),
7400
+ relativeDirPath = join62(".cursor", "skills"),
7214
7401
  dirName,
7215
7402
  frontmatter,
7216
7403
  body,
@@ -7239,7 +7426,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
7239
7426
  }
7240
7427
  static getSettablePaths(_options) {
7241
7428
  return {
7242
- relativeDirPath: join59(".cursor", "skills")
7429
+ relativeDirPath: join62(".cursor", "skills")
7243
7430
  };
7244
7431
  }
7245
7432
  getFrontmatter() {
@@ -7321,9 +7508,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
7321
7508
  });
7322
7509
  const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
7323
7510
  if (!result.success) {
7324
- const skillDirPath = join59(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7511
+ const skillDirPath = join62(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7325
7512
  throw new Error(
7326
- `Invalid frontmatter in ${join59(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7513
+ `Invalid frontmatter in ${join62(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7327
7514
  );
7328
7515
  }
7329
7516
  return new _CursorSkill({
@@ -7358,7 +7545,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
7358
7545
  };
7359
7546
 
7360
7547
  // src/features/skills/kilo-skill.ts
7361
- import { join as join60 } from "path";
7548
+ import { join as join63 } from "path";
7362
7549
  import { z as z28 } from "zod/mini";
7363
7550
  var KiloSkillFrontmatterSchema = z28.looseObject({
7364
7551
  name: z28.string(),
@@ -7367,7 +7554,7 @@ var KiloSkillFrontmatterSchema = z28.looseObject({
7367
7554
  var KiloSkill = class _KiloSkill extends ToolSkill {
7368
7555
  constructor({
7369
7556
  baseDir = process.cwd(),
7370
- relativeDirPath = join60(".kilocode", "skills"),
7557
+ relativeDirPath = join63(".kilocode", "skills"),
7371
7558
  dirName,
7372
7559
  frontmatter,
7373
7560
  body,
@@ -7398,7 +7585,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
7398
7585
  global: _global = false
7399
7586
  } = {}) {
7400
7587
  return {
7401
- relativeDirPath: join60(".kilocode", "skills")
7588
+ relativeDirPath: join63(".kilocode", "skills")
7402
7589
  };
7403
7590
  }
7404
7591
  getFrontmatter() {
@@ -7488,13 +7675,13 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
7488
7675
  });
7489
7676
  const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
7490
7677
  if (!result.success) {
7491
- const skillDirPath = join60(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7678
+ const skillDirPath = join63(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7492
7679
  throw new Error(
7493
- `Invalid frontmatter in ${join60(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7680
+ `Invalid frontmatter in ${join63(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7494
7681
  );
7495
7682
  }
7496
7683
  if (result.data.name !== loaded.dirName) {
7497
- const skillFilePath = join60(
7684
+ const skillFilePath = join63(
7498
7685
  loaded.baseDir,
7499
7686
  loaded.relativeDirPath,
7500
7687
  loaded.dirName,
@@ -7535,7 +7722,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
7535
7722
  };
7536
7723
 
7537
7724
  // src/features/skills/kiro-skill.ts
7538
- import { join as join61 } from "path";
7725
+ import { join as join64 } from "path";
7539
7726
  import { z as z29 } from "zod/mini";
7540
7727
  var KiroSkillFrontmatterSchema = z29.looseObject({
7541
7728
  name: z29.string(),
@@ -7544,7 +7731,7 @@ var KiroSkillFrontmatterSchema = z29.looseObject({
7544
7731
  var KiroSkill = class _KiroSkill extends ToolSkill {
7545
7732
  constructor({
7546
7733
  baseDir = process.cwd(),
7547
- relativeDirPath = join61(".kiro", "skills"),
7734
+ relativeDirPath = join64(".kiro", "skills"),
7548
7735
  dirName,
7549
7736
  frontmatter,
7550
7737
  body,
@@ -7576,7 +7763,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
7576
7763
  throw new Error("KiroSkill does not support global mode.");
7577
7764
  }
7578
7765
  return {
7579
- relativeDirPath: join61(".kiro", "skills")
7766
+ relativeDirPath: join64(".kiro", "skills")
7580
7767
  };
7581
7768
  }
7582
7769
  getFrontmatter() {
@@ -7666,13 +7853,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
7666
7853
  });
7667
7854
  const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
7668
7855
  if (!result.success) {
7669
- const skillDirPath = join61(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7856
+ const skillDirPath = join64(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7670
7857
  throw new Error(
7671
- `Invalid frontmatter in ${join61(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7858
+ `Invalid frontmatter in ${join64(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7672
7859
  );
7673
7860
  }
7674
7861
  if (result.data.name !== loaded.dirName) {
7675
- const skillFilePath = join61(
7862
+ const skillFilePath = join64(
7676
7863
  loaded.baseDir,
7677
7864
  loaded.relativeDirPath,
7678
7865
  loaded.dirName,
@@ -7714,7 +7901,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
7714
7901
  };
7715
7902
 
7716
7903
  // src/features/skills/opencode-skill.ts
7717
- import { join as join62 } from "path";
7904
+ import { join as join65 } from "path";
7718
7905
  import { z as z30 } from "zod/mini";
7719
7906
  var OpenCodeSkillFrontmatterSchema = z30.looseObject({
7720
7907
  name: z30.string(),
@@ -7724,7 +7911,7 @@ var OpenCodeSkillFrontmatterSchema = z30.looseObject({
7724
7911
  var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
7725
7912
  constructor({
7726
7913
  baseDir = process.cwd(),
7727
- relativeDirPath = join62(".opencode", "skill"),
7914
+ relativeDirPath = join65(".opencode", "skill"),
7728
7915
  dirName,
7729
7916
  frontmatter,
7730
7917
  body,
@@ -7753,7 +7940,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
7753
7940
  }
7754
7941
  static getSettablePaths({ global = false } = {}) {
7755
7942
  return {
7756
- relativeDirPath: global ? join62(".config", "opencode", "skill") : join62(".opencode", "skill")
7943
+ relativeDirPath: global ? join65(".config", "opencode", "skill") : join65(".opencode", "skill")
7757
7944
  };
7758
7945
  }
7759
7946
  getFrontmatter() {
@@ -7841,9 +8028,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
7841
8028
  });
7842
8029
  const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
7843
8030
  if (!result.success) {
7844
- const skillDirPath = join62(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8031
+ const skillDirPath = join65(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
7845
8032
  throw new Error(
7846
- `Invalid frontmatter in ${join62(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8033
+ `Invalid frontmatter in ${join65(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
7847
8034
  );
7848
8035
  }
7849
8036
  return new _OpenCodeSkill({
@@ -7877,7 +8064,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
7877
8064
  };
7878
8065
 
7879
8066
  // src/features/skills/replit-skill.ts
7880
- import { join as join63 } from "path";
8067
+ import { join as join66 } from "path";
7881
8068
  import { z as z31 } from "zod/mini";
7882
8069
  var ReplitSkillFrontmatterSchema = z31.looseObject({
7883
8070
  name: z31.string(),
@@ -7886,7 +8073,7 @@ var ReplitSkillFrontmatterSchema = z31.looseObject({
7886
8073
  var ReplitSkill = class _ReplitSkill extends ToolSkill {
7887
8074
  constructor({
7888
8075
  baseDir = process.cwd(),
7889
- relativeDirPath = join63(".agent", "skills"),
8076
+ relativeDirPath = join66(".agent", "skills"),
7890
8077
  dirName,
7891
8078
  frontmatter,
7892
8079
  body,
@@ -7918,7 +8105,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
7918
8105
  throw new Error("ReplitSkill does not support global mode.");
7919
8106
  }
7920
8107
  return {
7921
- relativeDirPath: join63(".agent", "skills")
8108
+ relativeDirPath: join66(".agent", "skills")
7922
8109
  };
7923
8110
  }
7924
8111
  getFrontmatter() {
@@ -8000,9 +8187,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
8000
8187
  });
8001
8188
  const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8002
8189
  if (!result.success) {
8003
- const skillDirPath = join63(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8190
+ const skillDirPath = join66(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8004
8191
  throw new Error(
8005
- `Invalid frontmatter in ${join63(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8192
+ `Invalid frontmatter in ${join66(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8006
8193
  );
8007
8194
  }
8008
8195
  return new _ReplitSkill({
@@ -8037,7 +8224,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
8037
8224
  };
8038
8225
 
8039
8226
  // src/features/skills/roo-skill.ts
8040
- import { join as join64 } from "path";
8227
+ import { join as join67 } from "path";
8041
8228
  import { z as z32 } from "zod/mini";
8042
8229
  var RooSkillFrontmatterSchema = z32.looseObject({
8043
8230
  name: z32.string(),
@@ -8046,7 +8233,7 @@ var RooSkillFrontmatterSchema = z32.looseObject({
8046
8233
  var RooSkill = class _RooSkill extends ToolSkill {
8047
8234
  constructor({
8048
8235
  baseDir = process.cwd(),
8049
- relativeDirPath = join64(".roo", "skills"),
8236
+ relativeDirPath = join67(".roo", "skills"),
8050
8237
  dirName,
8051
8238
  frontmatter,
8052
8239
  body,
@@ -8077,7 +8264,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
8077
8264
  global: _global = false
8078
8265
  } = {}) {
8079
8266
  return {
8080
- relativeDirPath: join64(".roo", "skills")
8267
+ relativeDirPath: join67(".roo", "skills")
8081
8268
  };
8082
8269
  }
8083
8270
  getFrontmatter() {
@@ -8167,13 +8354,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
8167
8354
  });
8168
8355
  const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
8169
8356
  if (!result.success) {
8170
- const skillDirPath = join64(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8357
+ const skillDirPath = join67(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
8171
8358
  throw new Error(
8172
- `Invalid frontmatter in ${join64(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8359
+ `Invalid frontmatter in ${join67(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
8173
8360
  );
8174
8361
  }
8175
8362
  if (result.data.name !== loaded.dirName) {
8176
- const skillFilePath = join64(
8363
+ const skillFilePath = join67(
8177
8364
  loaded.baseDir,
8178
8365
  loaded.relativeDirPath,
8179
8366
  loaded.dirName,
@@ -8222,6 +8409,7 @@ var skillsProcessorToolTargetTuple = [
8222
8409
  "codexcli",
8223
8410
  "copilot",
8224
8411
  "cursor",
8412
+ "factorydroid",
8225
8413
  "geminicli",
8226
8414
  "kilo",
8227
8415
  "kiro",
@@ -8280,6 +8468,13 @@ var toolSkillFactories = /* @__PURE__ */ new Map([
8280
8468
  meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: true }
8281
8469
  }
8282
8470
  ],
8471
+ [
8472
+ "factorydroid",
8473
+ {
8474
+ class: FactorydroidSkill,
8475
+ meta: { supportsProject: true, supportsSimulated: true, supportsGlobal: true }
8476
+ }
8477
+ ],
8283
8478
  [
8284
8479
  "geminicli",
8285
8480
  {
@@ -8400,9 +8595,9 @@ var SkillsProcessor = class extends DirFeatureProcessor {
8400
8595
  */
8401
8596
  async loadRulesyncDirs() {
8402
8597
  const paths = RulesyncSkill.getSettablePaths();
8403
- const rulesyncSkillsDirPath = join65(this.baseDir, paths.relativeDirPath);
8404
- const dirPaths = await findFilesByGlobs(join65(rulesyncSkillsDirPath, "*"), { type: "dir" });
8405
- const dirNames = dirPaths.map((path3) => basename17(path3));
8598
+ const rulesyncSkillsDirPath = join68(this.baseDir, paths.relativeDirPath);
8599
+ const dirPaths = await findFilesByGlobs(join68(rulesyncSkillsDirPath, "*"), { type: "dir" });
8600
+ const dirNames = dirPaths.map((path3) => basename18(path3));
8406
8601
  const rulesyncSkills = await Promise.all(
8407
8602
  dirNames.map(
8408
8603
  (dirName) => RulesyncSkill.fromDir({ baseDir: this.baseDir, dirName, global: this.global })
@@ -8418,9 +8613,9 @@ var SkillsProcessor = class extends DirFeatureProcessor {
8418
8613
  async loadToolDirs() {
8419
8614
  const factory = this.getFactory(this.toolTarget);
8420
8615
  const paths = factory.class.getSettablePaths({ global: this.global });
8421
- const skillsDirPath = join65(this.baseDir, paths.relativeDirPath);
8422
- const dirPaths = await findFilesByGlobs(join65(skillsDirPath, "*"), { type: "dir" });
8423
- const dirNames = dirPaths.map((path3) => basename17(path3));
8616
+ const skillsDirPath = join68(this.baseDir, paths.relativeDirPath);
8617
+ const dirPaths = await findFilesByGlobs(join68(skillsDirPath, "*"), { type: "dir" });
8618
+ const dirNames = dirPaths.map((path3) => basename18(path3));
8424
8619
  const toolSkills = await Promise.all(
8425
8620
  dirNames.map(
8426
8621
  (dirName) => factory.class.fromDir({
@@ -8436,9 +8631,9 @@ var SkillsProcessor = class extends DirFeatureProcessor {
8436
8631
  async loadToolDirsToDelete() {
8437
8632
  const factory = this.getFactory(this.toolTarget);
8438
8633
  const paths = factory.class.getSettablePaths({ global: this.global });
8439
- const skillsDirPath = join65(this.baseDir, paths.relativeDirPath);
8440
- const dirPaths = await findFilesByGlobs(join65(skillsDirPath, "*"), { type: "dir" });
8441
- const dirNames = dirPaths.map((path3) => basename17(path3));
8634
+ const skillsDirPath = join68(this.baseDir, paths.relativeDirPath);
8635
+ const dirPaths = await findFilesByGlobs(join68(skillsDirPath, "*"), { type: "dir" });
8636
+ const dirNames = dirPaths.map((path3) => basename18(path3));
8442
8637
  const toolSkills = dirNames.map(
8443
8638
  (dirName) => factory.class.forDeletion({
8444
8639
  baseDir: this.baseDir,
@@ -8486,10 +8681,10 @@ var SkillsProcessor = class extends DirFeatureProcessor {
8486
8681
  };
8487
8682
 
8488
8683
  // src/features/subagents/agentsmd-subagent.ts
8489
- import { join as join67 } from "path";
8684
+ import { join as join70 } from "path";
8490
8685
 
8491
8686
  // src/features/subagents/simulated-subagent.ts
8492
- import { basename as basename18, join as join66 } from "path";
8687
+ import { basename as basename19, join as join69 } from "path";
8493
8688
  import { z as z34 } from "zod/mini";
8494
8689
 
8495
8690
  // src/features/subagents/tool-subagent.ts
@@ -8545,7 +8740,7 @@ var SimulatedSubagent = class extends ToolSubagent {
8545
8740
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
8546
8741
  if (!result.success) {
8547
8742
  throw new Error(
8548
- `Invalid frontmatter in ${join66(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
8743
+ `Invalid frontmatter in ${join69(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
8549
8744
  );
8550
8745
  }
8551
8746
  }
@@ -8596,7 +8791,7 @@ var SimulatedSubagent = class extends ToolSubagent {
8596
8791
  return {
8597
8792
  success: false,
8598
8793
  error: new Error(
8599
- `Invalid frontmatter in ${join66(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
8794
+ `Invalid frontmatter in ${join69(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
8600
8795
  )
8601
8796
  };
8602
8797
  }
@@ -8606,7 +8801,7 @@ var SimulatedSubagent = class extends ToolSubagent {
8606
8801
  relativeFilePath,
8607
8802
  validate = true
8608
8803
  }) {
8609
- const filePath = join66(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
8804
+ const filePath = join69(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
8610
8805
  const fileContent = await readFileContent(filePath);
8611
8806
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
8612
8807
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -8616,7 +8811,7 @@ var SimulatedSubagent = class extends ToolSubagent {
8616
8811
  return {
8617
8812
  baseDir,
8618
8813
  relativeDirPath: this.getSettablePaths().relativeDirPath,
8619
- relativeFilePath: basename18(relativeFilePath),
8814
+ relativeFilePath: basename19(relativeFilePath),
8620
8815
  frontmatter: result.data,
8621
8816
  body: content.trim(),
8622
8817
  validate
@@ -8642,7 +8837,7 @@ var SimulatedSubagent = class extends ToolSubagent {
8642
8837
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
8643
8838
  static getSettablePaths() {
8644
8839
  return {
8645
- relativeDirPath: join67(".agents", "subagents")
8840
+ relativeDirPath: join70(".agents", "subagents")
8646
8841
  };
8647
8842
  }
8648
8843
  static async fromFile(params) {
@@ -8665,11 +8860,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
8665
8860
  };
8666
8861
 
8667
8862
  // src/features/subagents/codexcli-subagent.ts
8668
- import { join as join68 } from "path";
8863
+ import { join as join71 } from "path";
8669
8864
  var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
8670
8865
  static getSettablePaths() {
8671
8866
  return {
8672
- relativeDirPath: join68(".codex", "subagents")
8867
+ relativeDirPath: join71(".codex", "subagents")
8673
8868
  };
8674
8869
  }
8675
8870
  static async fromFile(params) {
@@ -8691,12 +8886,39 @@ var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
8691
8886
  }
8692
8887
  };
8693
8888
 
8889
+ // src/features/subagents/factorydroid-subagent.ts
8890
+ import { join as join72 } from "path";
8891
+ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
8892
+ static getSettablePaths(_options) {
8893
+ return {
8894
+ relativeDirPath: join72(".factorydroid", "droids")
8895
+ };
8896
+ }
8897
+ static async fromFile(params) {
8898
+ const baseParams = await this.fromFileDefault(params);
8899
+ return new _FactorydroidSubagent(baseParams);
8900
+ }
8901
+ static fromRulesyncSubagent(params) {
8902
+ const baseParams = this.fromRulesyncSubagentDefault(params);
8903
+ return new _FactorydroidSubagent(baseParams);
8904
+ }
8905
+ static isTargetedByRulesyncSubagent(rulesyncSubagent) {
8906
+ return this.isTargetedByRulesyncSubagentDefault({
8907
+ rulesyncSubagent,
8908
+ toolTarget: "factorydroid"
8909
+ });
8910
+ }
8911
+ static forDeletion(params) {
8912
+ return new _FactorydroidSubagent(this.forDeletionDefault(params));
8913
+ }
8914
+ };
8915
+
8694
8916
  // src/features/subagents/geminicli-subagent.ts
8695
- import { join as join69 } from "path";
8917
+ import { join as join73 } from "path";
8696
8918
  var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
8697
8919
  static getSettablePaths() {
8698
8920
  return {
8699
- relativeDirPath: join69(".gemini", "subagents")
8921
+ relativeDirPath: join73(".gemini", "subagents")
8700
8922
  };
8701
8923
  }
8702
8924
  static async fromFile(params) {
@@ -8719,11 +8941,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
8719
8941
  };
8720
8942
 
8721
8943
  // src/features/subagents/roo-subagent.ts
8722
- import { join as join70 } from "path";
8944
+ import { join as join74 } from "path";
8723
8945
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
8724
8946
  static getSettablePaths() {
8725
8947
  return {
8726
- relativeDirPath: join70(".roo", "subagents")
8948
+ relativeDirPath: join74(".roo", "subagents")
8727
8949
  };
8728
8950
  }
8729
8951
  static async fromFile(params) {
@@ -8746,15 +8968,15 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
8746
8968
  };
8747
8969
 
8748
8970
  // src/features/subagents/subagents-processor.ts
8749
- import { basename as basename21, join as join77 } from "path";
8971
+ import { basename as basename22, join as join81 } from "path";
8750
8972
  import { z as z41 } from "zod/mini";
8751
8973
 
8752
8974
  // src/features/subagents/claudecode-subagent.ts
8753
- import { join as join72 } from "path";
8975
+ import { join as join76 } from "path";
8754
8976
  import { z as z36 } from "zod/mini";
8755
8977
 
8756
8978
  // src/features/subagents/rulesync-subagent.ts
8757
- import { basename as basename19, join as join71 } from "path";
8979
+ import { basename as basename20, join as join75 } from "path";
8758
8980
  import { z as z35 } from "zod/mini";
8759
8981
  var RulesyncSubagentFrontmatterSchema = z35.looseObject({
8760
8982
  targets: RulesyncTargetsSchema,
@@ -8769,7 +8991,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
8769
8991
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
8770
8992
  if (!result.success) {
8771
8993
  throw new Error(
8772
- `Invalid frontmatter in ${join71(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
8994
+ `Invalid frontmatter in ${join75(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
8773
8995
  );
8774
8996
  }
8775
8997
  }
@@ -8802,7 +9024,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
8802
9024
  return {
8803
9025
  success: false,
8804
9026
  error: new Error(
8805
- `Invalid frontmatter in ${join71(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
9027
+ `Invalid frontmatter in ${join75(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
8806
9028
  )
8807
9029
  };
8808
9030
  }
@@ -8811,14 +9033,14 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
8811
9033
  relativeFilePath
8812
9034
  }) {
8813
9035
  const fileContent = await readFileContent(
8814
- join71(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath)
9036
+ join75(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath)
8815
9037
  );
8816
9038
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
8817
9039
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
8818
9040
  if (!result.success) {
8819
9041
  throw new Error(`Invalid frontmatter in ${relativeFilePath}: ${formatError(result.error)}`);
8820
9042
  }
8821
- const filename = basename19(relativeFilePath);
9043
+ const filename = basename20(relativeFilePath);
8822
9044
  return new _RulesyncSubagent({
8823
9045
  baseDir: process.cwd(),
8824
9046
  relativeDirPath: this.getSettablePaths().relativeDirPath,
@@ -8846,7 +9068,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
8846
9068
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
8847
9069
  if (!result.success) {
8848
9070
  throw new Error(
8849
- `Invalid frontmatter in ${join72(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
9071
+ `Invalid frontmatter in ${join76(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
8850
9072
  );
8851
9073
  }
8852
9074
  }
@@ -8858,7 +9080,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
8858
9080
  }
8859
9081
  static getSettablePaths(_options = {}) {
8860
9082
  return {
8861
- relativeDirPath: join72(".claude", "agents")
9083
+ relativeDirPath: join76(".claude", "agents")
8862
9084
  };
8863
9085
  }
8864
9086
  getFrontmatter() {
@@ -8932,7 +9154,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
8932
9154
  return {
8933
9155
  success: false,
8934
9156
  error: new Error(
8935
- `Invalid frontmatter in ${join72(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
9157
+ `Invalid frontmatter in ${join76(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
8936
9158
  )
8937
9159
  };
8938
9160
  }
@@ -8950,7 +9172,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
8950
9172
  global = false
8951
9173
  }) {
8952
9174
  const paths = this.getSettablePaths({ global });
8953
- const filePath = join72(baseDir, paths.relativeDirPath, relativeFilePath);
9175
+ const filePath = join76(baseDir, paths.relativeDirPath, relativeFilePath);
8954
9176
  const fileContent = await readFileContent(filePath);
8955
9177
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
8956
9178
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -8985,7 +9207,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
8985
9207
  };
8986
9208
 
8987
9209
  // src/features/subagents/copilot-subagent.ts
8988
- import { join as join73 } from "path";
9210
+ import { join as join77 } from "path";
8989
9211
  import { z as z37 } from "zod/mini";
8990
9212
  var REQUIRED_TOOL = "agent/runSubagent";
8991
9213
  var CopilotSubagentFrontmatterSchema = z37.looseObject({
@@ -9011,7 +9233,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
9011
9233
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
9012
9234
  if (!result.success) {
9013
9235
  throw new Error(
9014
- `Invalid frontmatter in ${join73(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
9236
+ `Invalid frontmatter in ${join77(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
9015
9237
  );
9016
9238
  }
9017
9239
  }
@@ -9023,7 +9245,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
9023
9245
  }
9024
9246
  static getSettablePaths(_options = {}) {
9025
9247
  return {
9026
- relativeDirPath: join73(".github", "agents")
9248
+ relativeDirPath: join77(".github", "agents")
9027
9249
  };
9028
9250
  }
9029
9251
  getFrontmatter() {
@@ -9097,7 +9319,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
9097
9319
  return {
9098
9320
  success: false,
9099
9321
  error: new Error(
9100
- `Invalid frontmatter in ${join73(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
9322
+ `Invalid frontmatter in ${join77(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
9101
9323
  )
9102
9324
  };
9103
9325
  }
@@ -9115,7 +9337,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
9115
9337
  global = false
9116
9338
  }) {
9117
9339
  const paths = this.getSettablePaths({ global });
9118
- const filePath = join73(baseDir, paths.relativeDirPath, relativeFilePath);
9340
+ const filePath = join77(baseDir, paths.relativeDirPath, relativeFilePath);
9119
9341
  const fileContent = await readFileContent(filePath);
9120
9342
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
9121
9343
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -9151,7 +9373,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
9151
9373
  };
9152
9374
 
9153
9375
  // src/features/subagents/cursor-subagent.ts
9154
- import { join as join74 } from "path";
9376
+ import { join as join78 } from "path";
9155
9377
  import { z as z38 } from "zod/mini";
9156
9378
  var CursorSubagentFrontmatterSchema = z38.looseObject({
9157
9379
  name: z38.string(),
@@ -9165,7 +9387,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
9165
9387
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
9166
9388
  if (!result.success) {
9167
9389
  throw new Error(
9168
- `Invalid frontmatter in ${join74(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
9390
+ `Invalid frontmatter in ${join78(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
9169
9391
  );
9170
9392
  }
9171
9393
  }
@@ -9177,7 +9399,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
9177
9399
  }
9178
9400
  static getSettablePaths(_options = {}) {
9179
9401
  return {
9180
- relativeDirPath: join74(".cursor", "agents")
9402
+ relativeDirPath: join78(".cursor", "agents")
9181
9403
  };
9182
9404
  }
9183
9405
  getFrontmatter() {
@@ -9244,7 +9466,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
9244
9466
  return {
9245
9467
  success: false,
9246
9468
  error: new Error(
9247
- `Invalid frontmatter in ${join74(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
9469
+ `Invalid frontmatter in ${join78(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
9248
9470
  )
9249
9471
  };
9250
9472
  }
@@ -9262,7 +9484,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
9262
9484
  global = false
9263
9485
  }) {
9264
9486
  const paths = this.getSettablePaths({ global });
9265
- const filePath = join74(baseDir, paths.relativeDirPath, relativeFilePath);
9487
+ const filePath = join78(baseDir, paths.relativeDirPath, relativeFilePath);
9266
9488
  const fileContent = await readFileContent(filePath);
9267
9489
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
9268
9490
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -9298,7 +9520,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
9298
9520
  };
9299
9521
 
9300
9522
  // src/features/subagents/kiro-subagent.ts
9301
- import { join as join75 } from "path";
9523
+ import { join as join79 } from "path";
9302
9524
  import { z as z39 } from "zod/mini";
9303
9525
  var KiroCliSubagentJsonSchema = z39.looseObject({
9304
9526
  name: z39.string(),
@@ -9326,7 +9548,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
9326
9548
  }
9327
9549
  static getSettablePaths(_options = {}) {
9328
9550
  return {
9329
- relativeDirPath: join75(".kiro", "agents")
9551
+ relativeDirPath: join79(".kiro", "agents")
9330
9552
  };
9331
9553
  }
9332
9554
  getBody() {
@@ -9406,7 +9628,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
9406
9628
  global = false
9407
9629
  }) {
9408
9630
  const paths = this.getSettablePaths({ global });
9409
- const filePath = join75(baseDir, paths.relativeDirPath, relativeFilePath);
9631
+ const filePath = join79(baseDir, paths.relativeDirPath, relativeFilePath);
9410
9632
  const fileContent = await readFileContent(filePath);
9411
9633
  return new _KiroSubagent({
9412
9634
  baseDir,
@@ -9435,7 +9657,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
9435
9657
  };
9436
9658
 
9437
9659
  // src/features/subagents/opencode-subagent.ts
9438
- import { basename as basename20, join as join76 } from "path";
9660
+ import { basename as basename21, join as join80 } from "path";
9439
9661
  import { z as z40 } from "zod/mini";
9440
9662
  var OpenCodeSubagentFrontmatterSchema = z40.looseObject({
9441
9663
  description: z40.string(),
@@ -9450,7 +9672,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
9450
9672
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
9451
9673
  if (!result.success) {
9452
9674
  throw new Error(
9453
- `Invalid frontmatter in ${join76(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
9675
+ `Invalid frontmatter in ${join80(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
9454
9676
  );
9455
9677
  }
9456
9678
  }
@@ -9464,7 +9686,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
9464
9686
  global = false
9465
9687
  } = {}) {
9466
9688
  return {
9467
- relativeDirPath: global ? join76(".config", "opencode", "agent") : join76(".opencode", "agent")
9689
+ relativeDirPath: global ? join80(".config", "opencode", "agent") : join80(".opencode", "agent")
9468
9690
  };
9469
9691
  }
9470
9692
  getFrontmatter() {
@@ -9477,7 +9699,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
9477
9699
  const { description, mode, name, ...opencodeSection } = this.frontmatter;
9478
9700
  const rulesyncFrontmatter = {
9479
9701
  targets: ["*"],
9480
- name: name ?? basename20(this.getRelativeFilePath(), ".md"),
9702
+ name: name ?? basename21(this.getRelativeFilePath(), ".md"),
9481
9703
  description,
9482
9704
  opencode: { mode, ...opencodeSection }
9483
9705
  };
@@ -9530,7 +9752,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
9530
9752
  return {
9531
9753
  success: false,
9532
9754
  error: new Error(
9533
- `Invalid frontmatter in ${join76(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
9755
+ `Invalid frontmatter in ${join80(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
9534
9756
  )
9535
9757
  };
9536
9758
  }
@@ -9547,7 +9769,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
9547
9769
  global = false
9548
9770
  }) {
9549
9771
  const paths = this.getSettablePaths({ global });
9550
- const filePath = join76(baseDir, paths.relativeDirPath, relativeFilePath);
9772
+ const filePath = join80(baseDir, paths.relativeDirPath, relativeFilePath);
9551
9773
  const fileContent = await readFileContent(filePath);
9552
9774
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
9553
9775
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -9590,6 +9812,7 @@ var subagentsProcessorToolTargetTuple = [
9590
9812
  "codexcli",
9591
9813
  "copilot",
9592
9814
  "cursor",
9815
+ "factorydroid",
9593
9816
  "geminicli",
9594
9817
  "kiro",
9595
9818
  "opencode",
@@ -9639,6 +9862,13 @@ var toolSubagentFactories = /* @__PURE__ */ new Map([
9639
9862
  meta: { supportsSimulated: false, supportsGlobal: true, filePattern: "*.md" }
9640
9863
  }
9641
9864
  ],
9865
+ [
9866
+ "factorydroid",
9867
+ {
9868
+ class: FactorydroidSubagent,
9869
+ meta: { supportsSimulated: true, supportsGlobal: true, filePattern: "*.md" }
9870
+ }
9871
+ ],
9642
9872
  [
9643
9873
  "geminicli",
9644
9874
  {
@@ -9749,7 +9979,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
9749
9979
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
9750
9980
  */
9751
9981
  async loadRulesyncFiles() {
9752
- const subagentsDir = join77(this.baseDir, RulesyncSubagent.getSettablePaths().relativeDirPath);
9982
+ const subagentsDir = join81(this.baseDir, RulesyncSubagent.getSettablePaths().relativeDirPath);
9753
9983
  const dirExists = await directoryExists(subagentsDir);
9754
9984
  if (!dirExists) {
9755
9985
  logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -9764,7 +9994,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
9764
9994
  logger.info(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
9765
9995
  const rulesyncSubagents = [];
9766
9996
  for (const mdFile of mdFiles) {
9767
- const filepath = join77(subagentsDir, mdFile);
9997
+ const filepath = join81(subagentsDir, mdFile);
9768
9998
  try {
9769
9999
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
9770
10000
  relativeFilePath: mdFile,
@@ -9794,14 +10024,14 @@ var SubagentsProcessor = class extends FeatureProcessor {
9794
10024
  const factory = this.getFactory(this.toolTarget);
9795
10025
  const paths = factory.class.getSettablePaths({ global: this.global });
9796
10026
  const subagentFilePaths = await findFilesByGlobs(
9797
- join77(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
10027
+ join81(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
9798
10028
  );
9799
10029
  if (forDeletion) {
9800
10030
  const toolSubagents2 = subagentFilePaths.map(
9801
10031
  (path3) => factory.class.forDeletion({
9802
10032
  baseDir: this.baseDir,
9803
10033
  relativeDirPath: paths.relativeDirPath,
9804
- relativeFilePath: basename21(path3),
10034
+ relativeFilePath: basename22(path3),
9805
10035
  global: this.global
9806
10036
  })
9807
10037
  ).filter((subagent) => subagent.isDeletable());
@@ -9812,7 +10042,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
9812
10042
  subagentFilePaths.map(
9813
10043
  (path3) => factory.class.fromFile({
9814
10044
  baseDir: this.baseDir,
9815
- relativeFilePath: basename21(path3),
10045
+ relativeFilePath: basename22(path3),
9816
10046
  global: this.global
9817
10047
  })
9818
10048
  )
@@ -9844,13 +10074,13 @@ var SubagentsProcessor = class extends FeatureProcessor {
9844
10074
  };
9845
10075
 
9846
10076
  // src/features/rules/agentsmd-rule.ts
9847
- import { join as join80 } from "path";
10077
+ import { join as join84 } from "path";
9848
10078
 
9849
10079
  // src/features/rules/tool-rule.ts
9850
- import { join as join79 } from "path";
10080
+ import { join as join83 } from "path";
9851
10081
 
9852
10082
  // src/features/rules/rulesync-rule.ts
9853
- import { join as join78 } from "path";
10083
+ import { join as join82 } from "path";
9854
10084
  import { z as z42 } from "zod/mini";
9855
10085
  var RulesyncRuleFrontmatterSchema = z42.object({
9856
10086
  root: z42.optional(z42.boolean()),
@@ -9867,8 +10097,8 @@ var RulesyncRuleFrontmatterSchema = z42.object({
9867
10097
  claudecode: z42.optional(
9868
10098
  z42.object({
9869
10099
  // Glob patterns for conditional rules (takes precedence over globs)
9870
- // @example "src/**/*.ts, tests/**/*.test.ts"
9871
- paths: z42.optional(z42.string())
10100
+ // @example ["src/**/*.ts", "tests/**/*.test.ts"]
10101
+ paths: z42.optional(z42.array(z42.string()))
9872
10102
  })
9873
10103
  ),
9874
10104
  cursor: z42.optional(
@@ -9898,7 +10128,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
9898
10128
  const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
9899
10129
  if (!result.success) {
9900
10130
  throw new Error(
9901
- `Invalid frontmatter in ${join78(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10131
+ `Invalid frontmatter in ${join82(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
9902
10132
  );
9903
10133
  }
9904
10134
  }
@@ -9933,7 +10163,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
9933
10163
  return {
9934
10164
  success: false,
9935
10165
  error: new Error(
9936
- `Invalid frontmatter in ${join78(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10166
+ `Invalid frontmatter in ${join82(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
9937
10167
  )
9938
10168
  };
9939
10169
  }
@@ -9942,7 +10172,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
9942
10172
  relativeFilePath,
9943
10173
  validate = true
9944
10174
  }) {
9945
- const filePath = join78(
10175
+ const filePath = join82(
9946
10176
  process.cwd(),
9947
10177
  this.getSettablePaths().recommended.relativeDirPath,
9948
10178
  relativeFilePath
@@ -10044,7 +10274,7 @@ var ToolRule = class extends ToolFile {
10044
10274
  rulesyncRule,
10045
10275
  validate = true,
10046
10276
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
10047
- nonRootPath = { relativeDirPath: join79(".agents", "memories") }
10277
+ nonRootPath = { relativeDirPath: join83(".agents", "memories") }
10048
10278
  }) {
10049
10279
  const params = this.buildToolRuleParamsDefault({
10050
10280
  baseDir,
@@ -10055,7 +10285,7 @@ var ToolRule = class extends ToolFile {
10055
10285
  });
10056
10286
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
10057
10287
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
10058
- params.relativeDirPath = join79(rulesyncFrontmatter.agentsmd.subprojectPath);
10288
+ params.relativeDirPath = join83(rulesyncFrontmatter.agentsmd.subprojectPath);
10059
10289
  params.relativeFilePath = "AGENTS.md";
10060
10290
  }
10061
10291
  return params;
@@ -10120,7 +10350,7 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
10120
10350
  relativeFilePath: "AGENTS.md"
10121
10351
  },
10122
10352
  nonRoot: {
10123
- relativeDirPath: join80(".agents", "memories")
10353
+ relativeDirPath: join84(".agents", "memories")
10124
10354
  }
10125
10355
  };
10126
10356
  }
@@ -10130,8 +10360,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
10130
10360
  validate = true
10131
10361
  }) {
10132
10362
  const isRoot = relativeFilePath === "AGENTS.md";
10133
- const relativePath = isRoot ? "AGENTS.md" : join80(".agents", "memories", relativeFilePath);
10134
- const fileContent = await readFileContent(join80(baseDir, relativePath));
10363
+ const relativePath = isRoot ? "AGENTS.md" : join84(".agents", "memories", relativeFilePath);
10364
+ const fileContent = await readFileContent(join84(baseDir, relativePath));
10135
10365
  return new _AgentsMdRule({
10136
10366
  baseDir,
10137
10367
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -10186,7 +10416,7 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
10186
10416
  };
10187
10417
 
10188
10418
  // src/features/rules/antigravity-rule.ts
10189
- import { join as join81 } from "path";
10419
+ import { join as join85 } from "path";
10190
10420
  import { z as z43 } from "zod/mini";
10191
10421
  var AntigravityRuleFrontmatterSchema = z43.looseObject({
10192
10422
  trigger: z43.optional(
@@ -10345,7 +10575,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
10345
10575
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
10346
10576
  if (!result.success) {
10347
10577
  throw new Error(
10348
- `Invalid frontmatter in ${join81(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10578
+ `Invalid frontmatter in ${join85(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10349
10579
  );
10350
10580
  }
10351
10581
  }
@@ -10360,7 +10590,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
10360
10590
  static getSettablePaths() {
10361
10591
  return {
10362
10592
  nonRoot: {
10363
- relativeDirPath: join81(".agent", "rules")
10593
+ relativeDirPath: join85(".agent", "rules")
10364
10594
  }
10365
10595
  };
10366
10596
  }
@@ -10369,7 +10599,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
10369
10599
  relativeFilePath,
10370
10600
  validate = true
10371
10601
  }) {
10372
- const filePath = join81(
10602
+ const filePath = join85(
10373
10603
  baseDir,
10374
10604
  this.getSettablePaths().nonRoot.relativeDirPath,
10375
10605
  relativeFilePath
@@ -10510,7 +10740,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
10510
10740
  };
10511
10741
 
10512
10742
  // src/features/rules/augmentcode-legacy-rule.ts
10513
- import { join as join82 } from "path";
10743
+ import { join as join86 } from "path";
10514
10744
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
10515
10745
  toRulesyncRule() {
10516
10746
  const rulesyncFrontmatter = {
@@ -10536,7 +10766,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
10536
10766
  relativeFilePath: ".augment-guidelines"
10537
10767
  },
10538
10768
  nonRoot: {
10539
- relativeDirPath: join82(".augment", "rules")
10769
+ relativeDirPath: join86(".augment", "rules")
10540
10770
  }
10541
10771
  };
10542
10772
  }
@@ -10571,8 +10801,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
10571
10801
  }) {
10572
10802
  const settablePaths = this.getSettablePaths();
10573
10803
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
10574
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : join82(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
10575
- const fileContent = await readFileContent(join82(baseDir, relativePath));
10804
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : join86(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
10805
+ const fileContent = await readFileContent(join86(baseDir, relativePath));
10576
10806
  return new _AugmentcodeLegacyRule({
10577
10807
  baseDir,
10578
10808
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -10601,7 +10831,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
10601
10831
  };
10602
10832
 
10603
10833
  // src/features/rules/augmentcode-rule.ts
10604
- import { join as join83 } from "path";
10834
+ import { join as join87 } from "path";
10605
10835
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
10606
10836
  toRulesyncRule() {
10607
10837
  return this.toRulesyncRuleDefault();
@@ -10609,7 +10839,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
10609
10839
  static getSettablePaths() {
10610
10840
  return {
10611
10841
  nonRoot: {
10612
- relativeDirPath: join83(".augment", "rules")
10842
+ relativeDirPath: join87(".augment", "rules")
10613
10843
  }
10614
10844
  };
10615
10845
  }
@@ -10633,7 +10863,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
10633
10863
  validate = true
10634
10864
  }) {
10635
10865
  const fileContent = await readFileContent(
10636
- join83(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
10866
+ join87(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
10637
10867
  );
10638
10868
  const { body: content } = parseFrontmatter(fileContent);
10639
10869
  return new _AugmentcodeRule({
@@ -10669,7 +10899,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
10669
10899
  };
10670
10900
 
10671
10901
  // src/features/rules/claudecode-legacy-rule.ts
10672
- import { join as join84 } from "path";
10902
+ import { join as join88 } from "path";
10673
10903
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
10674
10904
  static getSettablePaths({
10675
10905
  global
@@ -10688,7 +10918,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
10688
10918
  relativeFilePath: "CLAUDE.md"
10689
10919
  },
10690
10920
  nonRoot: {
10691
- relativeDirPath: join84(".claude", "memories")
10921
+ relativeDirPath: join88(".claude", "memories")
10692
10922
  }
10693
10923
  };
10694
10924
  }
@@ -10703,7 +10933,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
10703
10933
  if (isRoot) {
10704
10934
  const relativePath2 = paths.root.relativeFilePath;
10705
10935
  const fileContent2 = await readFileContent(
10706
- join84(baseDir, paths.root.relativeDirPath, relativePath2)
10936
+ join88(baseDir, paths.root.relativeDirPath, relativePath2)
10707
10937
  );
10708
10938
  return new _ClaudecodeLegacyRule({
10709
10939
  baseDir,
@@ -10717,8 +10947,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
10717
10947
  if (!paths.nonRoot) {
10718
10948
  throw new Error("nonRoot path is not set");
10719
10949
  }
10720
- const relativePath = join84(paths.nonRoot.relativeDirPath, relativeFilePath);
10721
- const fileContent = await readFileContent(join84(baseDir, relativePath));
10950
+ const relativePath = join88(paths.nonRoot.relativeDirPath, relativeFilePath);
10951
+ const fileContent = await readFileContent(join88(baseDir, relativePath));
10722
10952
  return new _ClaudecodeLegacyRule({
10723
10953
  baseDir,
10724
10954
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -10777,10 +11007,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
10777
11007
  };
10778
11008
 
10779
11009
  // src/features/rules/claudecode-rule.ts
10780
- import { join as join85 } from "path";
11010
+ import { join as join89 } from "path";
10781
11011
  import { z as z44 } from "zod/mini";
10782
11012
  var ClaudecodeRuleFrontmatterSchema = z44.object({
10783
- paths: z44.optional(z44.string())
11013
+ paths: z44.optional(z44.array(z44.string()))
10784
11014
  });
10785
11015
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
10786
11016
  frontmatter;
@@ -10802,7 +11032,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
10802
11032
  relativeFilePath: "CLAUDE.md"
10803
11033
  },
10804
11034
  nonRoot: {
10805
- relativeDirPath: join85(".claude", "rules")
11035
+ relativeDirPath: join89(".claude", "rules")
10806
11036
  }
10807
11037
  };
10808
11038
  }
@@ -10811,7 +11041,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
10811
11041
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
10812
11042
  if (!result.success) {
10813
11043
  throw new Error(
10814
- `Invalid frontmatter in ${join85(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11044
+ `Invalid frontmatter in ${join89(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
10815
11045
  );
10816
11046
  }
10817
11047
  }
@@ -10839,7 +11069,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
10839
11069
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
10840
11070
  if (isRoot) {
10841
11071
  const fileContent2 = await readFileContent(
10842
- join85(baseDir, paths.root.relativeDirPath, paths.root.relativeFilePath)
11072
+ join89(baseDir, paths.root.relativeDirPath, paths.root.relativeFilePath)
10843
11073
  );
10844
11074
  return new _ClaudecodeRule({
10845
11075
  baseDir,
@@ -10854,13 +11084,13 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
10854
11084
  if (!paths.nonRoot) {
10855
11085
  throw new Error("nonRoot path is not set");
10856
11086
  }
10857
- const relativePath = join85(paths.nonRoot.relativeDirPath, relativeFilePath);
10858
- const fileContent = await readFileContent(join85(baseDir, relativePath));
11087
+ const relativePath = join89(paths.nonRoot.relativeDirPath, relativeFilePath);
11088
+ const fileContent = await readFileContent(join89(baseDir, relativePath));
10859
11089
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
10860
11090
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
10861
11091
  if (!result.success) {
10862
11092
  throw new Error(
10863
- `Invalid frontmatter in ${join85(baseDir, relativePath)}: ${formatError(result.error)}`
11093
+ `Invalid frontmatter in ${join89(baseDir, relativePath)}: ${formatError(result.error)}`
10864
11094
  );
10865
11095
  }
10866
11096
  return new _ClaudecodeRule({
@@ -10902,7 +11132,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
10902
11132
  const paths = this.getSettablePaths({ global });
10903
11133
  const claudecodePaths = rulesyncFrontmatter.claudecode?.paths;
10904
11134
  const globs = rulesyncFrontmatter.globs;
10905
- const pathsValue = claudecodePaths ?? (globs?.length ? globs.join(", ") : void 0);
11135
+ const pathsValue = claudecodePaths ?? (globs?.length ? globs : void 0);
10906
11136
  const claudecodeFrontmatter = {
10907
11137
  paths: root ? void 0 : pathsValue
10908
11138
  };
@@ -10936,7 +11166,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
10936
11166
  if (this.isRoot()) {
10937
11167
  globs = ["**/*"];
10938
11168
  } else if (this.frontmatter.paths) {
10939
- globs = this.frontmatter.paths.split(",").map((g) => g.trim());
11169
+ globs = this.frontmatter.paths;
10940
11170
  }
10941
11171
  const rulesyncFrontmatter = {
10942
11172
  targets: ["*"],
@@ -10967,7 +11197,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
10967
11197
  return {
10968
11198
  success: false,
10969
11199
  error: new Error(
10970
- `Invalid frontmatter in ${join85(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11200
+ `Invalid frontmatter in ${join89(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
10971
11201
  )
10972
11202
  };
10973
11203
  }
@@ -10987,7 +11217,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
10987
11217
  };
10988
11218
 
10989
11219
  // src/features/rules/cline-rule.ts
10990
- import { join as join86 } from "path";
11220
+ import { join as join90 } from "path";
10991
11221
  import { z as z45 } from "zod/mini";
10992
11222
  var ClineRuleFrontmatterSchema = z45.object({
10993
11223
  description: z45.string()
@@ -11032,7 +11262,7 @@ var ClineRule = class _ClineRule extends ToolRule {
11032
11262
  validate = true
11033
11263
  }) {
11034
11264
  const fileContent = await readFileContent(
11035
- join86(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
11265
+ join90(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
11036
11266
  );
11037
11267
  return new _ClineRule({
11038
11268
  baseDir,
@@ -11058,7 +11288,7 @@ var ClineRule = class _ClineRule extends ToolRule {
11058
11288
  };
11059
11289
 
11060
11290
  // src/features/rules/codexcli-rule.ts
11061
- import { join as join87 } from "path";
11291
+ import { join as join91 } from "path";
11062
11292
  var CodexcliRule = class _CodexcliRule extends ToolRule {
11063
11293
  static getSettablePaths({
11064
11294
  global
@@ -11077,7 +11307,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
11077
11307
  relativeFilePath: "AGENTS.md"
11078
11308
  },
11079
11309
  nonRoot: {
11080
- relativeDirPath: join87(".codex", "memories")
11310
+ relativeDirPath: join91(".codex", "memories")
11081
11311
  }
11082
11312
  };
11083
11313
  }
@@ -11092,7 +11322,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
11092
11322
  if (isRoot) {
11093
11323
  const relativePath2 = paths.root.relativeFilePath;
11094
11324
  const fileContent2 = await readFileContent(
11095
- join87(baseDir, paths.root.relativeDirPath, relativePath2)
11325
+ join91(baseDir, paths.root.relativeDirPath, relativePath2)
11096
11326
  );
11097
11327
  return new _CodexcliRule({
11098
11328
  baseDir,
@@ -11106,8 +11336,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
11106
11336
  if (!paths.nonRoot) {
11107
11337
  throw new Error("nonRoot path is not set");
11108
11338
  }
11109
- const relativePath = join87(paths.nonRoot.relativeDirPath, relativeFilePath);
11110
- const fileContent = await readFileContent(join87(baseDir, relativePath));
11339
+ const relativePath = join91(paths.nonRoot.relativeDirPath, relativeFilePath);
11340
+ const fileContent = await readFileContent(join91(baseDir, relativePath));
11111
11341
  return new _CodexcliRule({
11112
11342
  baseDir,
11113
11343
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -11166,7 +11396,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
11166
11396
  };
11167
11397
 
11168
11398
  // src/features/rules/copilot-rule.ts
11169
- import { join as join88 } from "path";
11399
+ import { join as join92 } from "path";
11170
11400
  import { z as z46 } from "zod/mini";
11171
11401
  var CopilotRuleFrontmatterSchema = z46.object({
11172
11402
  description: z46.optional(z46.string()),
@@ -11183,7 +11413,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
11183
11413
  relativeFilePath: "copilot-instructions.md"
11184
11414
  },
11185
11415
  nonRoot: {
11186
- relativeDirPath: join88(".github", "instructions")
11416
+ relativeDirPath: join92(".github", "instructions")
11187
11417
  }
11188
11418
  };
11189
11419
  }
@@ -11192,7 +11422,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
11192
11422
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
11193
11423
  if (!result.success) {
11194
11424
  throw new Error(
11195
- `Invalid frontmatter in ${join88(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11425
+ `Invalid frontmatter in ${join92(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11196
11426
  );
11197
11427
  }
11198
11428
  }
@@ -11274,11 +11504,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
11274
11504
  validate = true
11275
11505
  }) {
11276
11506
  const isRoot = relativeFilePath === "copilot-instructions.md";
11277
- const relativePath = isRoot ? join88(
11507
+ const relativePath = isRoot ? join92(
11278
11508
  this.getSettablePaths().root.relativeDirPath,
11279
11509
  this.getSettablePaths().root.relativeFilePath
11280
- ) : join88(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
11281
- const fileContent = await readFileContent(join88(baseDir, relativePath));
11510
+ ) : join92(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
11511
+ const fileContent = await readFileContent(join92(baseDir, relativePath));
11282
11512
  if (isRoot) {
11283
11513
  return new _CopilotRule({
11284
11514
  baseDir,
@@ -11294,7 +11524,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
11294
11524
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
11295
11525
  if (!result.success) {
11296
11526
  throw new Error(
11297
- `Invalid frontmatter in ${join88(baseDir, relativeFilePath)}: ${formatError(result.error)}`
11527
+ `Invalid frontmatter in ${join92(baseDir, relativeFilePath)}: ${formatError(result.error)}`
11298
11528
  );
11299
11529
  }
11300
11530
  return new _CopilotRule({
@@ -11334,7 +11564,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
11334
11564
  return {
11335
11565
  success: false,
11336
11566
  error: new Error(
11337
- `Invalid frontmatter in ${join88(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11567
+ `Invalid frontmatter in ${join92(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11338
11568
  )
11339
11569
  };
11340
11570
  }
@@ -11354,7 +11584,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
11354
11584
  };
11355
11585
 
11356
11586
  // src/features/rules/cursor-rule.ts
11357
- import { join as join89 } from "path";
11587
+ import { join as join93 } from "path";
11358
11588
  import { z as z47 } from "zod/mini";
11359
11589
  var CursorRuleFrontmatterSchema = z47.object({
11360
11590
  description: z47.optional(z47.string()),
@@ -11367,7 +11597,7 @@ var CursorRule = class _CursorRule extends ToolRule {
11367
11597
  static getSettablePaths() {
11368
11598
  return {
11369
11599
  nonRoot: {
11370
- relativeDirPath: join89(".cursor", "rules")
11600
+ relativeDirPath: join93(".cursor", "rules")
11371
11601
  }
11372
11602
  };
11373
11603
  }
@@ -11376,7 +11606,7 @@ var CursorRule = class _CursorRule extends ToolRule {
11376
11606
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
11377
11607
  if (!result.success) {
11378
11608
  throw new Error(
11379
- `Invalid frontmatter in ${join89(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11609
+ `Invalid frontmatter in ${join93(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
11380
11610
  );
11381
11611
  }
11382
11612
  }
@@ -11493,13 +11723,13 @@ var CursorRule = class _CursorRule extends ToolRule {
11493
11723
  validate = true
11494
11724
  }) {
11495
11725
  const fileContent = await readFileContent(
11496
- join89(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
11726
+ join93(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
11497
11727
  );
11498
11728
  const { frontmatter, body: content } = _CursorRule.parseCursorFrontmatter(fileContent);
11499
11729
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
11500
11730
  if (!result.success) {
11501
11731
  throw new Error(
11502
- `Invalid frontmatter in ${join89(baseDir, relativeFilePath)}: ${formatError(result.error)}`
11732
+ `Invalid frontmatter in ${join93(baseDir, relativeFilePath)}: ${formatError(result.error)}`
11503
11733
  );
11504
11734
  }
11505
11735
  return new _CursorRule({
@@ -11536,7 +11766,7 @@ var CursorRule = class _CursorRule extends ToolRule {
11536
11766
  return {
11537
11767
  success: false,
11538
11768
  error: new Error(
11539
- `Invalid frontmatter in ${join89(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11769
+ `Invalid frontmatter in ${join93(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
11540
11770
  )
11541
11771
  };
11542
11772
  }
@@ -11555,8 +11785,107 @@ var CursorRule = class _CursorRule extends ToolRule {
11555
11785
  }
11556
11786
  };
11557
11787
 
11788
+ // src/features/rules/factorydroid-rule.ts
11789
+ import { join as join94 } from "path";
11790
+ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
11791
+ constructor({ fileContent, root, ...rest }) {
11792
+ super({
11793
+ ...rest,
11794
+ fileContent,
11795
+ root: root ?? false
11796
+ });
11797
+ }
11798
+ static getSettablePaths(options) {
11799
+ if (options?.global) {
11800
+ return {
11801
+ root: {
11802
+ relativeDirPath: ".factorydroid",
11803
+ relativeFilePath: "AGENTS.md"
11804
+ },
11805
+ nonRoot: {
11806
+ relativeDirPath: join94(".factorydroid", "memories")
11807
+ }
11808
+ };
11809
+ }
11810
+ return {
11811
+ root: {
11812
+ relativeDirPath: ".factorydroid",
11813
+ relativeFilePath: "AGENTS.md"
11814
+ },
11815
+ nonRoot: {
11816
+ relativeDirPath: join94(".factorydroid", "memories")
11817
+ }
11818
+ };
11819
+ }
11820
+ static async fromFile({
11821
+ baseDir = process.cwd(),
11822
+ relativeFilePath,
11823
+ validate = true,
11824
+ global = false
11825
+ }) {
11826
+ const paths = this.getSettablePaths({ global });
11827
+ const isRoot = relativeFilePath === paths.root.relativeFilePath;
11828
+ const relativePath = isRoot ? join94(paths.root.relativeDirPath, paths.root.relativeFilePath) : join94(paths.nonRoot.relativeDirPath, relativeFilePath);
11829
+ const fileContent = await readFileContent(join94(baseDir, relativePath));
11830
+ return new _FactorydroidRule({
11831
+ baseDir,
11832
+ relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
11833
+ relativeFilePath: isRoot ? paths.root.relativeFilePath : relativeFilePath,
11834
+ fileContent,
11835
+ validate,
11836
+ root: isRoot
11837
+ });
11838
+ }
11839
+ static forDeletion({
11840
+ baseDir = process.cwd(),
11841
+ relativeDirPath,
11842
+ relativeFilePath,
11843
+ global = false
11844
+ }) {
11845
+ const paths = this.getSettablePaths({ global });
11846
+ const isRoot = relativeFilePath === "AGENTS.md" && relativeDirPath === paths.root.relativeDirPath;
11847
+ return new _FactorydroidRule({
11848
+ baseDir,
11849
+ relativeDirPath,
11850
+ relativeFilePath,
11851
+ fileContent: "",
11852
+ validate: false,
11853
+ root: isRoot
11854
+ });
11855
+ }
11856
+ static fromRulesyncRule({
11857
+ baseDir = process.cwd(),
11858
+ rulesyncRule,
11859
+ validate = true,
11860
+ global = false
11861
+ }) {
11862
+ const paths = this.getSettablePaths({ global });
11863
+ return new _FactorydroidRule(
11864
+ this.buildToolRuleParamsAgentsmd({
11865
+ baseDir,
11866
+ rulesyncRule,
11867
+ validate,
11868
+ rootPath: paths.root,
11869
+ nonRootPath: paths.nonRoot
11870
+ })
11871
+ );
11872
+ }
11873
+ toRulesyncRule() {
11874
+ return this.toRulesyncRuleDefault();
11875
+ }
11876
+ validate() {
11877
+ return { success: true, error: null };
11878
+ }
11879
+ static isTargetedByRulesyncRule(rulesyncRule) {
11880
+ return this.isTargetedByRulesyncRuleDefault({
11881
+ rulesyncRule,
11882
+ toolTarget: "factorydroid"
11883
+ });
11884
+ }
11885
+ };
11886
+
11558
11887
  // src/features/rules/geminicli-rule.ts
11559
- import { join as join90 } from "path";
11888
+ import { join as join95 } from "path";
11560
11889
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
11561
11890
  static getSettablePaths({
11562
11891
  global
@@ -11575,7 +11904,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
11575
11904
  relativeFilePath: "GEMINI.md"
11576
11905
  },
11577
11906
  nonRoot: {
11578
- relativeDirPath: join90(".gemini", "memories")
11907
+ relativeDirPath: join95(".gemini", "memories")
11579
11908
  }
11580
11909
  };
11581
11910
  }
@@ -11590,7 +11919,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
11590
11919
  if (isRoot) {
11591
11920
  const relativePath2 = paths.root.relativeFilePath;
11592
11921
  const fileContent2 = await readFileContent(
11593
- join90(baseDir, paths.root.relativeDirPath, relativePath2)
11922
+ join95(baseDir, paths.root.relativeDirPath, relativePath2)
11594
11923
  );
11595
11924
  return new _GeminiCliRule({
11596
11925
  baseDir,
@@ -11604,8 +11933,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
11604
11933
  if (!paths.nonRoot) {
11605
11934
  throw new Error("nonRoot path is not set");
11606
11935
  }
11607
- const relativePath = join90(paths.nonRoot.relativeDirPath, relativeFilePath);
11608
- const fileContent = await readFileContent(join90(baseDir, relativePath));
11936
+ const relativePath = join95(paths.nonRoot.relativeDirPath, relativeFilePath);
11937
+ const fileContent = await readFileContent(join95(baseDir, relativePath));
11609
11938
  return new _GeminiCliRule({
11610
11939
  baseDir,
11611
11940
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -11664,7 +11993,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
11664
11993
  };
11665
11994
 
11666
11995
  // src/features/rules/junie-rule.ts
11667
- import { join as join91 } from "path";
11996
+ import { join as join96 } from "path";
11668
11997
  var JunieRule = class _JunieRule extends ToolRule {
11669
11998
  static getSettablePaths() {
11670
11999
  return {
@@ -11673,7 +12002,7 @@ var JunieRule = class _JunieRule extends ToolRule {
11673
12002
  relativeFilePath: "guidelines.md"
11674
12003
  },
11675
12004
  nonRoot: {
11676
- relativeDirPath: join91(".junie", "memories")
12005
+ relativeDirPath: join96(".junie", "memories")
11677
12006
  }
11678
12007
  };
11679
12008
  }
@@ -11683,8 +12012,8 @@ var JunieRule = class _JunieRule extends ToolRule {
11683
12012
  validate = true
11684
12013
  }) {
11685
12014
  const isRoot = relativeFilePath === "guidelines.md";
11686
- const relativePath = isRoot ? "guidelines.md" : join91(".junie", "memories", relativeFilePath);
11687
- const fileContent = await readFileContent(join91(baseDir, relativePath));
12015
+ const relativePath = isRoot ? "guidelines.md" : join96(".junie", "memories", relativeFilePath);
12016
+ const fileContent = await readFileContent(join96(baseDir, relativePath));
11688
12017
  return new _JunieRule({
11689
12018
  baseDir,
11690
12019
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -11739,12 +12068,12 @@ var JunieRule = class _JunieRule extends ToolRule {
11739
12068
  };
11740
12069
 
11741
12070
  // src/features/rules/kilo-rule.ts
11742
- import { join as join92 } from "path";
12071
+ import { join as join97 } from "path";
11743
12072
  var KiloRule = class _KiloRule extends ToolRule {
11744
12073
  static getSettablePaths(_options = {}) {
11745
12074
  return {
11746
12075
  nonRoot: {
11747
- relativeDirPath: join92(".kilocode", "rules")
12076
+ relativeDirPath: join97(".kilocode", "rules")
11748
12077
  }
11749
12078
  };
11750
12079
  }
@@ -11754,7 +12083,7 @@ var KiloRule = class _KiloRule extends ToolRule {
11754
12083
  validate = true
11755
12084
  }) {
11756
12085
  const fileContent = await readFileContent(
11757
- join92(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
12086
+ join97(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
11758
12087
  );
11759
12088
  return new _KiloRule({
11760
12089
  baseDir,
@@ -11806,12 +12135,12 @@ var KiloRule = class _KiloRule extends ToolRule {
11806
12135
  };
11807
12136
 
11808
12137
  // src/features/rules/kiro-rule.ts
11809
- import { join as join93 } from "path";
12138
+ import { join as join98 } from "path";
11810
12139
  var KiroRule = class _KiroRule extends ToolRule {
11811
12140
  static getSettablePaths() {
11812
12141
  return {
11813
12142
  nonRoot: {
11814
- relativeDirPath: join93(".kiro", "steering")
12143
+ relativeDirPath: join98(".kiro", "steering")
11815
12144
  }
11816
12145
  };
11817
12146
  }
@@ -11821,7 +12150,7 @@ var KiroRule = class _KiroRule extends ToolRule {
11821
12150
  validate = true
11822
12151
  }) {
11823
12152
  const fileContent = await readFileContent(
11824
- join93(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
12153
+ join98(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
11825
12154
  );
11826
12155
  return new _KiroRule({
11827
12156
  baseDir,
@@ -11875,7 +12204,7 @@ var KiroRule = class _KiroRule extends ToolRule {
11875
12204
  };
11876
12205
 
11877
12206
  // src/features/rules/opencode-rule.ts
11878
- import { join as join94 } from "path";
12207
+ import { join as join99 } from "path";
11879
12208
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
11880
12209
  static getSettablePaths() {
11881
12210
  return {
@@ -11884,7 +12213,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
11884
12213
  relativeFilePath: "AGENTS.md"
11885
12214
  },
11886
12215
  nonRoot: {
11887
- relativeDirPath: join94(".opencode", "memories")
12216
+ relativeDirPath: join99(".opencode", "memories")
11888
12217
  }
11889
12218
  };
11890
12219
  }
@@ -11894,8 +12223,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
11894
12223
  validate = true
11895
12224
  }) {
11896
12225
  const isRoot = relativeFilePath === "AGENTS.md";
11897
- const relativePath = isRoot ? "AGENTS.md" : join94(".opencode", "memories", relativeFilePath);
11898
- const fileContent = await readFileContent(join94(baseDir, relativePath));
12226
+ const relativePath = isRoot ? "AGENTS.md" : join99(".opencode", "memories", relativeFilePath);
12227
+ const fileContent = await readFileContent(join99(baseDir, relativePath));
11899
12228
  return new _OpenCodeRule({
11900
12229
  baseDir,
11901
12230
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -11950,7 +12279,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
11950
12279
  };
11951
12280
 
11952
12281
  // src/features/rules/qwencode-rule.ts
11953
- import { join as join95 } from "path";
12282
+ import { join as join100 } from "path";
11954
12283
  var QwencodeRule = class _QwencodeRule extends ToolRule {
11955
12284
  static getSettablePaths() {
11956
12285
  return {
@@ -11959,7 +12288,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
11959
12288
  relativeFilePath: "QWEN.md"
11960
12289
  },
11961
12290
  nonRoot: {
11962
- relativeDirPath: join95(".qwen", "memories")
12291
+ relativeDirPath: join100(".qwen", "memories")
11963
12292
  }
11964
12293
  };
11965
12294
  }
@@ -11969,8 +12298,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
11969
12298
  validate = true
11970
12299
  }) {
11971
12300
  const isRoot = relativeFilePath === "QWEN.md";
11972
- const relativePath = isRoot ? "QWEN.md" : join95(".qwen", "memories", relativeFilePath);
11973
- const fileContent = await readFileContent(join95(baseDir, relativePath));
12301
+ const relativePath = isRoot ? "QWEN.md" : join100(".qwen", "memories", relativeFilePath);
12302
+ const fileContent = await readFileContent(join100(baseDir, relativePath));
11974
12303
  return new _QwencodeRule({
11975
12304
  baseDir,
11976
12305
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -12022,7 +12351,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
12022
12351
  };
12023
12352
 
12024
12353
  // src/features/rules/replit-rule.ts
12025
- import { join as join96 } from "path";
12354
+ import { join as join101 } from "path";
12026
12355
  var ReplitRule = class _ReplitRule extends ToolRule {
12027
12356
  static getSettablePaths() {
12028
12357
  return {
@@ -12044,7 +12373,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
12044
12373
  }
12045
12374
  const relativePath = paths.root.relativeFilePath;
12046
12375
  const fileContent = await readFileContent(
12047
- join96(baseDir, paths.root.relativeDirPath, relativePath)
12376
+ join101(baseDir, paths.root.relativeDirPath, relativePath)
12048
12377
  );
12049
12378
  return new _ReplitRule({
12050
12379
  baseDir,
@@ -12110,12 +12439,12 @@ var ReplitRule = class _ReplitRule extends ToolRule {
12110
12439
  };
12111
12440
 
12112
12441
  // src/features/rules/roo-rule.ts
12113
- import { join as join97 } from "path";
12442
+ import { join as join102 } from "path";
12114
12443
  var RooRule = class _RooRule extends ToolRule {
12115
12444
  static getSettablePaths() {
12116
12445
  return {
12117
12446
  nonRoot: {
12118
- relativeDirPath: join97(".roo", "rules")
12447
+ relativeDirPath: join102(".roo", "rules")
12119
12448
  }
12120
12449
  };
12121
12450
  }
@@ -12125,7 +12454,7 @@ var RooRule = class _RooRule extends ToolRule {
12125
12454
  validate = true
12126
12455
  }) {
12127
12456
  const fileContent = await readFileContent(
12128
- join97(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
12457
+ join102(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
12129
12458
  );
12130
12459
  return new _RooRule({
12131
12460
  baseDir,
@@ -12194,7 +12523,7 @@ var RooRule = class _RooRule extends ToolRule {
12194
12523
  };
12195
12524
 
12196
12525
  // src/features/rules/warp-rule.ts
12197
- import { join as join98 } from "path";
12526
+ import { join as join103 } from "path";
12198
12527
  var WarpRule = class _WarpRule extends ToolRule {
12199
12528
  constructor({ fileContent, root, ...rest }) {
12200
12529
  super({
@@ -12210,7 +12539,7 @@ var WarpRule = class _WarpRule extends ToolRule {
12210
12539
  relativeFilePath: "WARP.md"
12211
12540
  },
12212
12541
  nonRoot: {
12213
- relativeDirPath: join98(".warp", "memories")
12542
+ relativeDirPath: join103(".warp", "memories")
12214
12543
  }
12215
12544
  };
12216
12545
  }
@@ -12220,8 +12549,8 @@ var WarpRule = class _WarpRule extends ToolRule {
12220
12549
  validate = true
12221
12550
  }) {
12222
12551
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
12223
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join98(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
12224
- const fileContent = await readFileContent(join98(baseDir, relativePath));
12552
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join103(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
12553
+ const fileContent = await readFileContent(join103(baseDir, relativePath));
12225
12554
  return new _WarpRule({
12226
12555
  baseDir,
12227
12556
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -12276,12 +12605,12 @@ var WarpRule = class _WarpRule extends ToolRule {
12276
12605
  };
12277
12606
 
12278
12607
  // src/features/rules/windsurf-rule.ts
12279
- import { join as join99 } from "path";
12608
+ import { join as join104 } from "path";
12280
12609
  var WindsurfRule = class _WindsurfRule extends ToolRule {
12281
12610
  static getSettablePaths() {
12282
12611
  return {
12283
12612
  nonRoot: {
12284
- relativeDirPath: join99(".windsurf", "rules")
12613
+ relativeDirPath: join104(".windsurf", "rules")
12285
12614
  }
12286
12615
  };
12287
12616
  }
@@ -12291,7 +12620,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
12291
12620
  validate = true
12292
12621
  }) {
12293
12622
  const fileContent = await readFileContent(
12294
- join99(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
12623
+ join104(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
12295
12624
  );
12296
12625
  return new _WindsurfRule({
12297
12626
  baseDir,
@@ -12354,6 +12683,7 @@ var rulesProcessorToolTargets = [
12354
12683
  "codexcli",
12355
12684
  "copilot",
12356
12685
  "cursor",
12686
+ "factorydroid",
12357
12687
  "geminicli",
12358
12688
  "junie",
12359
12689
  "kilo",
@@ -12461,6 +12791,22 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
12461
12791
  }
12462
12792
  }
12463
12793
  ],
12794
+ [
12795
+ "factorydroid",
12796
+ {
12797
+ class: FactorydroidRule,
12798
+ meta: {
12799
+ extension: "md",
12800
+ supportsGlobal: true,
12801
+ ruleDiscoveryMode: "toon",
12802
+ additionalConventions: {
12803
+ commands: { commandClass: FactorydroidCommand },
12804
+ subagents: { subagentClass: FactorydroidSubagent },
12805
+ skills: { skillClass: FactorydroidSkill }
12806
+ }
12807
+ }
12808
+ }
12809
+ ],
12464
12810
  [
12465
12811
  "geminicli",
12466
12812
  {
@@ -12660,7 +13006,7 @@ var RulesProcessor = class extends FeatureProcessor {
12660
13006
  }).relativeDirPath;
12661
13007
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
12662
13008
  const frontmatter = skill.getFrontmatter();
12663
- const relativePath = join100(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
13009
+ const relativePath = join105(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
12664
13010
  return {
12665
13011
  name: frontmatter.name,
12666
13012
  description: frontmatter.description,
@@ -12771,8 +13117,8 @@ var RulesProcessor = class extends FeatureProcessor {
12771
13117
  * Load and parse rulesync rule files from .rulesync/rules/ directory
12772
13118
  */
12773
13119
  async loadRulesyncFiles() {
12774
- const rulesyncBaseDir = join100(this.baseDir, RULESYNC_RULES_RELATIVE_DIR_PATH);
12775
- const files = await findFilesByGlobs(join100(rulesyncBaseDir, "**", "*.md"));
13120
+ const rulesyncBaseDir = join105(this.baseDir, RULESYNC_RULES_RELATIVE_DIR_PATH);
13121
+ const files = await findFilesByGlobs(join105(rulesyncBaseDir, "**", "*.md"));
12776
13122
  logger.debug(`Found ${files.length} rulesync files`);
12777
13123
  const rulesyncRules = await Promise.all(
12778
13124
  files.map((file) => {
@@ -12830,7 +13176,7 @@ var RulesProcessor = class extends FeatureProcessor {
12830
13176
  return [];
12831
13177
  }
12832
13178
  const rootFilePaths = await findFilesByGlobs(
12833
- join100(
13179
+ join105(
12834
13180
  this.baseDir,
12835
13181
  settablePaths.root.relativeDirPath ?? ".",
12836
13182
  settablePaths.root.relativeFilePath
@@ -12841,7 +13187,7 @@ var RulesProcessor = class extends FeatureProcessor {
12841
13187
  (filePath) => factory.class.forDeletion({
12842
13188
  baseDir: this.baseDir,
12843
13189
  relativeDirPath: settablePaths.root?.relativeDirPath ?? ".",
12844
- relativeFilePath: basename22(filePath),
13190
+ relativeFilePath: basename23(filePath),
12845
13191
  global: this.global
12846
13192
  })
12847
13193
  ).filter((rule) => rule.isDeletable());
@@ -12850,7 +13196,7 @@ var RulesProcessor = class extends FeatureProcessor {
12850
13196
  rootFilePaths.map(
12851
13197
  (filePath) => factory.class.fromFile({
12852
13198
  baseDir: this.baseDir,
12853
- relativeFilePath: basename22(filePath),
13199
+ relativeFilePath: basename23(filePath),
12854
13200
  global: this.global
12855
13201
  })
12856
13202
  )
@@ -12868,13 +13214,13 @@ var RulesProcessor = class extends FeatureProcessor {
12868
13214
  return [];
12869
13215
  }
12870
13216
  const localRootFilePaths = await findFilesByGlobs(
12871
- join100(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md")
13217
+ join105(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md")
12872
13218
  );
12873
13219
  return localRootFilePaths.map(
12874
13220
  (filePath) => factory.class.forDeletion({
12875
13221
  baseDir: this.baseDir,
12876
13222
  relativeDirPath: settablePaths.root?.relativeDirPath ?? ".",
12877
- relativeFilePath: basename22(filePath),
13223
+ relativeFilePath: basename23(filePath),
12878
13224
  global: this.global
12879
13225
  })
12880
13226
  ).filter((rule) => rule.isDeletable());
@@ -12884,9 +13230,9 @@ var RulesProcessor = class extends FeatureProcessor {
12884
13230
  if (!settablePaths.nonRoot) {
12885
13231
  return [];
12886
13232
  }
12887
- const nonRootBaseDir = join100(this.baseDir, settablePaths.nonRoot.relativeDirPath);
13233
+ const nonRootBaseDir = join105(this.baseDir, settablePaths.nonRoot.relativeDirPath);
12888
13234
  const nonRootFilePaths = await findFilesByGlobs(
12889
- join100(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
13235
+ join105(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
12890
13236
  );
12891
13237
  if (forDeletion) {
12892
13238
  return nonRootFilePaths.map((filePath) => {
@@ -13002,14 +13348,14 @@ s/<command> [arguments]
13002
13348
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
13003
13349
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
13004
13350
 
13005
- When users call a custom slash command, you have to look for the markdown file, \`${join100(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
13351
+ When users call a custom slash command, you have to look for the markdown file, \`${join105(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
13006
13352
  const subagentsSection = subagents ? `## Simulated Subagents
13007
13353
 
13008
13354
  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.
13009
13355
 
13010
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${join100(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
13356
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${join105(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
13011
13357
 
13012
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join100(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
13358
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join105(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
13013
13359
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
13014
13360
  const result = [
13015
13361
  overview,
@@ -13038,7 +13384,7 @@ ${toonContent}`;
13038
13384
 
13039
13385
  // src/lib/generate.ts
13040
13386
  async function checkRulesyncDirExists(params) {
13041
- return fileExists(join101(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
13387
+ return fileExists(join106(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
13042
13388
  }
13043
13389
  async function generate(params) {
13044
13390
  const { config } = params;
@@ -13372,7 +13718,7 @@ async function generateCommand(options) {
13372
13718
  }
13373
13719
 
13374
13720
  // src/cli/commands/gitignore.ts
13375
- import { join as join102 } from "path";
13721
+ import { join as join107 } from "path";
13376
13722
  var RULESYNC_HEADER = "# Generated by Rulesync";
13377
13723
  var LEGACY_RULESYNC_HEADER = "# Generated by rulesync - AI tool configuration files";
13378
13724
  var RULESYNC_IGNORE_ENTRIES = [
@@ -13412,6 +13758,13 @@ var RULESYNC_IGNORE_ENTRIES = [
13412
13758
  // Cursor
13413
13759
  "**/.cursor/",
13414
13760
  "**/.cursorignore",
13761
+ // Factory Droid
13762
+ "**/.factorydroid/AGENTS.md",
13763
+ "**/.factorydroid/memories/",
13764
+ "**/.factorydroid/commands/",
13765
+ "**/.factorydroid/droids/",
13766
+ "**/.factorydroid/skills/",
13767
+ "**/.factorydroid/mcp.json",
13415
13768
  // Gemini
13416
13769
  "**/GEMINI.md",
13417
13770
  "**/.gemini/memories/",
@@ -13517,7 +13870,7 @@ var removeExistingRulesyncEntries = (content) => {
13517
13870
  return result;
13518
13871
  };
13519
13872
  var gitignoreCommand = async () => {
13520
- const gitignorePath = join102(process.cwd(), ".gitignore");
13873
+ const gitignorePath = join107(process.cwd(), ".gitignore");
13521
13874
  let gitignoreContent = "";
13522
13875
  if (await fileExists(gitignorePath)) {
13523
13876
  gitignoreContent = await readFileContent(gitignorePath);
@@ -13783,7 +14136,7 @@ async function importCommand(options) {
13783
14136
  }
13784
14137
 
13785
14138
  // src/cli/commands/init.ts
13786
- import { join as join103 } from "path";
14139
+ import { join as join108 } from "path";
13787
14140
  async function initCommand() {
13788
14141
  logger.info("Initializing rulesync...");
13789
14142
  await ensureDir(RULESYNC_RELATIVE_DIR_PATH);
@@ -13962,14 +14315,14 @@ Keep the summary concise and ready to reuse in future tasks.`
13962
14315
  await ensureDir(subagentPaths.relativeDirPath);
13963
14316
  await ensureDir(skillPaths.relativeDirPath);
13964
14317
  await ensureDir(ignorePaths.recommended.relativeDirPath);
13965
- const ruleFilepath = join103(rulePaths.recommended.relativeDirPath, sampleRuleFile.filename);
14318
+ const ruleFilepath = join108(rulePaths.recommended.relativeDirPath, sampleRuleFile.filename);
13966
14319
  if (!await fileExists(ruleFilepath)) {
13967
14320
  await writeFileContent(ruleFilepath, sampleRuleFile.content);
13968
14321
  logger.success(`Created ${ruleFilepath}`);
13969
14322
  } else {
13970
14323
  logger.info(`Skipped ${ruleFilepath} (already exists)`);
13971
14324
  }
13972
- const mcpFilepath = join103(
14325
+ const mcpFilepath = join108(
13973
14326
  mcpPaths.recommended.relativeDirPath,
13974
14327
  mcpPaths.recommended.relativeFilePath
13975
14328
  );
@@ -13979,30 +14332,30 @@ Keep the summary concise and ready to reuse in future tasks.`
13979
14332
  } else {
13980
14333
  logger.info(`Skipped ${mcpFilepath} (already exists)`);
13981
14334
  }
13982
- const commandFilepath = join103(commandPaths.relativeDirPath, sampleCommandFile.filename);
14335
+ const commandFilepath = join108(commandPaths.relativeDirPath, sampleCommandFile.filename);
13983
14336
  if (!await fileExists(commandFilepath)) {
13984
14337
  await writeFileContent(commandFilepath, sampleCommandFile.content);
13985
14338
  logger.success(`Created ${commandFilepath}`);
13986
14339
  } else {
13987
14340
  logger.info(`Skipped ${commandFilepath} (already exists)`);
13988
14341
  }
13989
- const subagentFilepath = join103(subagentPaths.relativeDirPath, sampleSubagentFile.filename);
14342
+ const subagentFilepath = join108(subagentPaths.relativeDirPath, sampleSubagentFile.filename);
13990
14343
  if (!await fileExists(subagentFilepath)) {
13991
14344
  await writeFileContent(subagentFilepath, sampleSubagentFile.content);
13992
14345
  logger.success(`Created ${subagentFilepath}`);
13993
14346
  } else {
13994
14347
  logger.info(`Skipped ${subagentFilepath} (already exists)`);
13995
14348
  }
13996
- const skillDirPath = join103(skillPaths.relativeDirPath, sampleSkillFile.dirName);
14349
+ const skillDirPath = join108(skillPaths.relativeDirPath, sampleSkillFile.dirName);
13997
14350
  await ensureDir(skillDirPath);
13998
- const skillFilepath = join103(skillDirPath, SKILL_FILE_NAME);
14351
+ const skillFilepath = join108(skillDirPath, SKILL_FILE_NAME);
13999
14352
  if (!await fileExists(skillFilepath)) {
14000
14353
  await writeFileContent(skillFilepath, sampleSkillFile.content);
14001
14354
  logger.success(`Created ${skillFilepath}`);
14002
14355
  } else {
14003
14356
  logger.info(`Skipped ${skillFilepath} (already exists)`);
14004
14357
  }
14005
- const ignoreFilepath = join103(
14358
+ const ignoreFilepath = join108(
14006
14359
  ignorePaths.recommended.relativeDirPath,
14007
14360
  ignorePaths.recommended.relativeFilePath
14008
14361
  );
@@ -14021,12 +14374,12 @@ import { FastMCP } from "fastmcp";
14021
14374
  import { z as z55 } from "zod/mini";
14022
14375
 
14023
14376
  // src/mcp/commands.ts
14024
- import { basename as basename23, join as join104 } from "path";
14377
+ import { basename as basename24, join as join109 } from "path";
14025
14378
  import { z as z49 } from "zod/mini";
14026
14379
  var maxCommandSizeBytes = 1024 * 1024;
14027
14380
  var maxCommandsCount = 1e3;
14028
14381
  async function listCommands() {
14029
- const commandsDir = join104(process.cwd(), RULESYNC_COMMANDS_RELATIVE_DIR_PATH);
14382
+ const commandsDir = join109(process.cwd(), RULESYNC_COMMANDS_RELATIVE_DIR_PATH);
14030
14383
  try {
14031
14384
  const files = await listDirectoryFiles(commandsDir);
14032
14385
  const mdFiles = files.filter((file) => file.endsWith(".md"));
@@ -14038,7 +14391,7 @@ async function listCommands() {
14038
14391
  });
14039
14392
  const frontmatter = command.getFrontmatter();
14040
14393
  return {
14041
- relativePathFromCwd: join104(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, file),
14394
+ relativePathFromCwd: join109(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, file),
14042
14395
  frontmatter
14043
14396
  };
14044
14397
  } catch (error) {
@@ -14058,13 +14411,13 @@ async function getCommand({ relativePathFromCwd }) {
14058
14411
  relativePath: relativePathFromCwd,
14059
14412
  intendedRootDir: process.cwd()
14060
14413
  });
14061
- const filename = basename23(relativePathFromCwd);
14414
+ const filename = basename24(relativePathFromCwd);
14062
14415
  try {
14063
14416
  const command = await RulesyncCommand.fromFile({
14064
14417
  relativeFilePath: filename
14065
14418
  });
14066
14419
  return {
14067
- relativePathFromCwd: join104(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, filename),
14420
+ relativePathFromCwd: join109(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, filename),
14068
14421
  frontmatter: command.getFrontmatter(),
14069
14422
  body: command.getBody()
14070
14423
  };
@@ -14083,7 +14436,7 @@ async function putCommand({
14083
14436
  relativePath: relativePathFromCwd,
14084
14437
  intendedRootDir: process.cwd()
14085
14438
  });
14086
- const filename = basename23(relativePathFromCwd);
14439
+ const filename = basename24(relativePathFromCwd);
14087
14440
  const estimatedSize = JSON.stringify(frontmatter).length + body.length;
14088
14441
  if (estimatedSize > maxCommandSizeBytes) {
14089
14442
  throw new Error(
@@ -14093,7 +14446,7 @@ async function putCommand({
14093
14446
  try {
14094
14447
  const existingCommands = await listCommands();
14095
14448
  const isUpdate = existingCommands.some(
14096
- (command2) => command2.relativePathFromCwd === join104(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, filename)
14449
+ (command2) => command2.relativePathFromCwd === join109(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, filename)
14097
14450
  );
14098
14451
  if (!isUpdate && existingCommands.length >= maxCommandsCount) {
14099
14452
  throw new Error(`Maximum number of commands (${maxCommandsCount}) reached`);
@@ -14108,11 +14461,11 @@ async function putCommand({
14108
14461
  fileContent,
14109
14462
  validate: true
14110
14463
  });
14111
- const commandsDir = join104(process.cwd(), RULESYNC_COMMANDS_RELATIVE_DIR_PATH);
14464
+ const commandsDir = join109(process.cwd(), RULESYNC_COMMANDS_RELATIVE_DIR_PATH);
14112
14465
  await ensureDir(commandsDir);
14113
14466
  await writeFileContent(command.getFilePath(), command.getFileContent());
14114
14467
  return {
14115
- relativePathFromCwd: join104(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, filename),
14468
+ relativePathFromCwd: join109(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, filename),
14116
14469
  frontmatter: command.getFrontmatter(),
14117
14470
  body: command.getBody()
14118
14471
  };
@@ -14127,12 +14480,12 @@ async function deleteCommand({ relativePathFromCwd }) {
14127
14480
  relativePath: relativePathFromCwd,
14128
14481
  intendedRootDir: process.cwd()
14129
14482
  });
14130
- const filename = basename23(relativePathFromCwd);
14131
- const fullPath = join104(process.cwd(), RULESYNC_COMMANDS_RELATIVE_DIR_PATH, filename);
14483
+ const filename = basename24(relativePathFromCwd);
14484
+ const fullPath = join109(process.cwd(), RULESYNC_COMMANDS_RELATIVE_DIR_PATH, filename);
14132
14485
  try {
14133
14486
  await removeFile(fullPath);
14134
14487
  return {
14135
- relativePathFromCwd: join104(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, filename)
14488
+ relativePathFromCwd: join109(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, filename)
14136
14489
  };
14137
14490
  } catch (error) {
14138
14491
  throw new Error(`Failed to delete command file ${relativePathFromCwd}: ${formatError(error)}`, {
@@ -14157,7 +14510,7 @@ var commandToolSchemas = {
14157
14510
  var commandTools = {
14158
14511
  listCommands: {
14159
14512
  name: "listCommands",
14160
- description: `List all commands from ${join104(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "*.md")} with their frontmatter.`,
14513
+ description: `List all commands from ${join109(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "*.md")} with their frontmatter.`,
14161
14514
  parameters: commandToolSchemas.listCommands,
14162
14515
  execute: async () => {
14163
14516
  const commands = await listCommands();
@@ -14199,11 +14552,11 @@ var commandTools = {
14199
14552
  };
14200
14553
 
14201
14554
  // src/mcp/ignore.ts
14202
- import { join as join105 } from "path";
14555
+ import { join as join110 } from "path";
14203
14556
  import { z as z50 } from "zod/mini";
14204
14557
  var maxIgnoreFileSizeBytes = 100 * 1024;
14205
14558
  async function getIgnoreFile() {
14206
- const ignoreFilePath = join105(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
14559
+ const ignoreFilePath = join110(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
14207
14560
  try {
14208
14561
  const content = await readFileContent(ignoreFilePath);
14209
14562
  return {
@@ -14217,7 +14570,7 @@ async function getIgnoreFile() {
14217
14570
  }
14218
14571
  }
14219
14572
  async function putIgnoreFile({ content }) {
14220
- const ignoreFilePath = join105(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
14573
+ const ignoreFilePath = join110(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
14221
14574
  const contentSizeBytes = Buffer.byteLength(content, "utf8");
14222
14575
  if (contentSizeBytes > maxIgnoreFileSizeBytes) {
14223
14576
  throw new Error(
@@ -14238,8 +14591,8 @@ async function putIgnoreFile({ content }) {
14238
14591
  }
14239
14592
  }
14240
14593
  async function deleteIgnoreFile() {
14241
- const aiignorePath = join105(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
14242
- const legacyIgnorePath = join105(process.cwd(), RULESYNC_IGNORE_RELATIVE_FILE_PATH);
14594
+ const aiignorePath = join110(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
14595
+ const legacyIgnorePath = join110(process.cwd(), RULESYNC_IGNORE_RELATIVE_FILE_PATH);
14243
14596
  try {
14244
14597
  await Promise.all([removeFile(aiignorePath), removeFile(legacyIgnorePath)]);
14245
14598
  return {
@@ -14294,7 +14647,7 @@ var ignoreTools = {
14294
14647
  };
14295
14648
 
14296
14649
  // src/mcp/mcp.ts
14297
- import { join as join106 } from "path";
14650
+ import { join as join111 } from "path";
14298
14651
  import { z as z51 } from "zod/mini";
14299
14652
  var maxMcpSizeBytes = 1024 * 1024;
14300
14653
  async function getMcpFile() {
@@ -14304,7 +14657,7 @@ async function getMcpFile() {
14304
14657
  validate: true,
14305
14658
  modularMcp: config.getModularMcp()
14306
14659
  });
14307
- const relativePathFromCwd = join106(
14660
+ const relativePathFromCwd = join111(
14308
14661
  rulesyncMcp.getRelativeDirPath(),
14309
14662
  rulesyncMcp.getRelativeFilePath()
14310
14663
  );
@@ -14337,7 +14690,7 @@ async function putMcpFile({ content }) {
14337
14690
  const paths = RulesyncMcp.getSettablePaths();
14338
14691
  const relativeDirPath = paths.recommended.relativeDirPath;
14339
14692
  const relativeFilePath = paths.recommended.relativeFilePath;
14340
- const fullPath = join106(baseDir, relativeDirPath, relativeFilePath);
14693
+ const fullPath = join111(baseDir, relativeDirPath, relativeFilePath);
14341
14694
  const rulesyncMcp = new RulesyncMcp({
14342
14695
  baseDir,
14343
14696
  relativeDirPath,
@@ -14346,9 +14699,9 @@ async function putMcpFile({ content }) {
14346
14699
  validate: true,
14347
14700
  modularMcp: config.getModularMcp()
14348
14701
  });
14349
- await ensureDir(join106(baseDir, relativeDirPath));
14702
+ await ensureDir(join111(baseDir, relativeDirPath));
14350
14703
  await writeFileContent(fullPath, content);
14351
- const relativePathFromCwd = join106(relativeDirPath, relativeFilePath);
14704
+ const relativePathFromCwd = join111(relativeDirPath, relativeFilePath);
14352
14705
  return {
14353
14706
  relativePathFromCwd,
14354
14707
  content: rulesyncMcp.getFileContent()
@@ -14363,15 +14716,15 @@ async function deleteMcpFile() {
14363
14716
  try {
14364
14717
  const baseDir = process.cwd();
14365
14718
  const paths = RulesyncMcp.getSettablePaths();
14366
- const recommendedPath = join106(
14719
+ const recommendedPath = join111(
14367
14720
  baseDir,
14368
14721
  paths.recommended.relativeDirPath,
14369
14722
  paths.recommended.relativeFilePath
14370
14723
  );
14371
- const legacyPath = join106(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
14724
+ const legacyPath = join111(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
14372
14725
  await removeFile(recommendedPath);
14373
14726
  await removeFile(legacyPath);
14374
- const relativePathFromCwd = join106(
14727
+ const relativePathFromCwd = join111(
14375
14728
  paths.recommended.relativeDirPath,
14376
14729
  paths.recommended.relativeFilePath
14377
14730
  );
@@ -14422,12 +14775,12 @@ var mcpTools = {
14422
14775
  };
14423
14776
 
14424
14777
  // src/mcp/rules.ts
14425
- import { basename as basename24, join as join107 } from "path";
14778
+ import { basename as basename25, join as join112 } from "path";
14426
14779
  import { z as z52 } from "zod/mini";
14427
14780
  var maxRuleSizeBytes = 1024 * 1024;
14428
14781
  var maxRulesCount = 1e3;
14429
14782
  async function listRules() {
14430
- const rulesDir = join107(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
14783
+ const rulesDir = join112(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
14431
14784
  try {
14432
14785
  const files = await listDirectoryFiles(rulesDir);
14433
14786
  const mdFiles = files.filter((file) => file.endsWith(".md"));
@@ -14440,7 +14793,7 @@ async function listRules() {
14440
14793
  });
14441
14794
  const frontmatter = rule.getFrontmatter();
14442
14795
  return {
14443
- relativePathFromCwd: join107(RULESYNC_RULES_RELATIVE_DIR_PATH, file),
14796
+ relativePathFromCwd: join112(RULESYNC_RULES_RELATIVE_DIR_PATH, file),
14444
14797
  frontmatter
14445
14798
  };
14446
14799
  } catch (error) {
@@ -14460,14 +14813,14 @@ async function getRule({ relativePathFromCwd }) {
14460
14813
  relativePath: relativePathFromCwd,
14461
14814
  intendedRootDir: process.cwd()
14462
14815
  });
14463
- const filename = basename24(relativePathFromCwd);
14816
+ const filename = basename25(relativePathFromCwd);
14464
14817
  try {
14465
14818
  const rule = await RulesyncRule.fromFile({
14466
14819
  relativeFilePath: filename,
14467
14820
  validate: true
14468
14821
  });
14469
14822
  return {
14470
- relativePathFromCwd: join107(RULESYNC_RULES_RELATIVE_DIR_PATH, filename),
14823
+ relativePathFromCwd: join112(RULESYNC_RULES_RELATIVE_DIR_PATH, filename),
14471
14824
  frontmatter: rule.getFrontmatter(),
14472
14825
  body: rule.getBody()
14473
14826
  };
@@ -14486,7 +14839,7 @@ async function putRule({
14486
14839
  relativePath: relativePathFromCwd,
14487
14840
  intendedRootDir: process.cwd()
14488
14841
  });
14489
- const filename = basename24(relativePathFromCwd);
14842
+ const filename = basename25(relativePathFromCwd);
14490
14843
  const estimatedSize = JSON.stringify(frontmatter).length + body.length;
14491
14844
  if (estimatedSize > maxRuleSizeBytes) {
14492
14845
  throw new Error(
@@ -14496,7 +14849,7 @@ async function putRule({
14496
14849
  try {
14497
14850
  const existingRules = await listRules();
14498
14851
  const isUpdate = existingRules.some(
14499
- (rule2) => rule2.relativePathFromCwd === join107(RULESYNC_RULES_RELATIVE_DIR_PATH, filename)
14852
+ (rule2) => rule2.relativePathFromCwd === join112(RULESYNC_RULES_RELATIVE_DIR_PATH, filename)
14500
14853
  );
14501
14854
  if (!isUpdate && existingRules.length >= maxRulesCount) {
14502
14855
  throw new Error(`Maximum number of rules (${maxRulesCount}) reached`);
@@ -14509,11 +14862,11 @@ async function putRule({
14509
14862
  body,
14510
14863
  validate: true
14511
14864
  });
14512
- const rulesDir = join107(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
14865
+ const rulesDir = join112(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
14513
14866
  await ensureDir(rulesDir);
14514
14867
  await writeFileContent(rule.getFilePath(), rule.getFileContent());
14515
14868
  return {
14516
- relativePathFromCwd: join107(RULESYNC_RULES_RELATIVE_DIR_PATH, filename),
14869
+ relativePathFromCwd: join112(RULESYNC_RULES_RELATIVE_DIR_PATH, filename),
14517
14870
  frontmatter: rule.getFrontmatter(),
14518
14871
  body: rule.getBody()
14519
14872
  };
@@ -14528,12 +14881,12 @@ async function deleteRule({ relativePathFromCwd }) {
14528
14881
  relativePath: relativePathFromCwd,
14529
14882
  intendedRootDir: process.cwd()
14530
14883
  });
14531
- const filename = basename24(relativePathFromCwd);
14532
- const fullPath = join107(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH, filename);
14884
+ const filename = basename25(relativePathFromCwd);
14885
+ const fullPath = join112(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH, filename);
14533
14886
  try {
14534
14887
  await removeFile(fullPath);
14535
14888
  return {
14536
- relativePathFromCwd: join107(RULESYNC_RULES_RELATIVE_DIR_PATH, filename)
14889
+ relativePathFromCwd: join112(RULESYNC_RULES_RELATIVE_DIR_PATH, filename)
14537
14890
  };
14538
14891
  } catch (error) {
14539
14892
  throw new Error(`Failed to delete rule file ${relativePathFromCwd}: ${formatError(error)}`, {
@@ -14558,7 +14911,7 @@ var ruleToolSchemas = {
14558
14911
  var ruleTools = {
14559
14912
  listRules: {
14560
14913
  name: "listRules",
14561
- description: `List all rules from ${join107(RULESYNC_RULES_RELATIVE_DIR_PATH, "*.md")} with their frontmatter.`,
14914
+ description: `List all rules from ${join112(RULESYNC_RULES_RELATIVE_DIR_PATH, "*.md")} with their frontmatter.`,
14562
14915
  parameters: ruleToolSchemas.listRules,
14563
14916
  execute: async () => {
14564
14917
  const rules = await listRules();
@@ -14600,7 +14953,7 @@ var ruleTools = {
14600
14953
  };
14601
14954
 
14602
14955
  // src/mcp/skills.ts
14603
- import { basename as basename25, dirname as dirname3, join as join108 } from "path";
14956
+ import { basename as basename26, dirname as dirname3, join as join113 } from "path";
14604
14957
  import { z as z53 } from "zod/mini";
14605
14958
  var maxSkillSizeBytes = 1024 * 1024;
14606
14959
  var maxSkillsCount = 1e3;
@@ -14617,19 +14970,19 @@ function mcpSkillFileToAiDirFile(file) {
14617
14970
  };
14618
14971
  }
14619
14972
  function extractDirName(relativeDirPathFromCwd) {
14620
- const dirName = basename25(relativeDirPathFromCwd);
14973
+ const dirName = basename26(relativeDirPathFromCwd);
14621
14974
  if (!dirName) {
14622
14975
  throw new Error(`Invalid path: ${relativeDirPathFromCwd}`);
14623
14976
  }
14624
14977
  return dirName;
14625
14978
  }
14626
14979
  async function listSkills() {
14627
- const skillsDir = join108(process.cwd(), RULESYNC_SKILLS_RELATIVE_DIR_PATH);
14980
+ const skillsDir = join113(process.cwd(), RULESYNC_SKILLS_RELATIVE_DIR_PATH);
14628
14981
  try {
14629
- const skillDirPaths = await findFilesByGlobs(join108(skillsDir, "*"), { type: "dir" });
14982
+ const skillDirPaths = await findFilesByGlobs(join113(skillsDir, "*"), { type: "dir" });
14630
14983
  const skills = await Promise.all(
14631
14984
  skillDirPaths.map(async (dirPath) => {
14632
- const dirName = basename25(dirPath);
14985
+ const dirName = basename26(dirPath);
14633
14986
  if (!dirName) return null;
14634
14987
  try {
14635
14988
  const skill = await RulesyncSkill.fromDir({
@@ -14637,7 +14990,7 @@ async function listSkills() {
14637
14990
  });
14638
14991
  const frontmatter = skill.getFrontmatter();
14639
14992
  return {
14640
- relativeDirPathFromCwd: join108(RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName),
14993
+ relativeDirPathFromCwd: join113(RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName),
14641
14994
  frontmatter
14642
14995
  };
14643
14996
  } catch (error) {
@@ -14663,7 +15016,7 @@ async function getSkill({ relativeDirPathFromCwd }) {
14663
15016
  dirName
14664
15017
  });
14665
15018
  return {
14666
- relativeDirPathFromCwd: join108(RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName),
15019
+ relativeDirPathFromCwd: join113(RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName),
14667
15020
  frontmatter: skill.getFrontmatter(),
14668
15021
  body: skill.getBody(),
14669
15022
  otherFiles: skill.getOtherFiles().map(aiDirFileToMcpSkillFile)
@@ -14697,7 +15050,7 @@ async function putSkill({
14697
15050
  try {
14698
15051
  const existingSkills = await listSkills();
14699
15052
  const isUpdate = existingSkills.some(
14700
- (skill2) => skill2.relativeDirPathFromCwd === join108(RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName)
15053
+ (skill2) => skill2.relativeDirPathFromCwd === join113(RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName)
14701
15054
  );
14702
15055
  if (!isUpdate && existingSkills.length >= maxSkillsCount) {
14703
15056
  throw new Error(`Maximum number of skills (${maxSkillsCount}) reached`);
@@ -14712,9 +15065,9 @@ async function putSkill({
14712
15065
  otherFiles: aiDirFiles,
14713
15066
  validate: true
14714
15067
  });
14715
- const skillDirPath = join108(process.cwd(), RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName);
15068
+ const skillDirPath = join113(process.cwd(), RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName);
14716
15069
  await ensureDir(skillDirPath);
14717
- const skillFilePath = join108(skillDirPath, SKILL_FILE_NAME);
15070
+ const skillFilePath = join113(skillDirPath, SKILL_FILE_NAME);
14718
15071
  const skillFileContent = stringifyFrontmatter(body, frontmatter);
14719
15072
  await writeFileContent(skillFilePath, skillFileContent);
14720
15073
  for (const file of otherFiles) {
@@ -14722,15 +15075,15 @@ async function putSkill({
14722
15075
  relativePath: file.name,
14723
15076
  intendedRootDir: skillDirPath
14724
15077
  });
14725
- const filePath = join108(skillDirPath, file.name);
14726
- const fileDir = join108(skillDirPath, dirname3(file.name));
15078
+ const filePath = join113(skillDirPath, file.name);
15079
+ const fileDir = join113(skillDirPath, dirname3(file.name));
14727
15080
  if (fileDir !== skillDirPath) {
14728
15081
  await ensureDir(fileDir);
14729
15082
  }
14730
15083
  await writeFileContent(filePath, file.body);
14731
15084
  }
14732
15085
  return {
14733
- relativeDirPathFromCwd: join108(RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName),
15086
+ relativeDirPathFromCwd: join113(RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName),
14734
15087
  frontmatter: skill.getFrontmatter(),
14735
15088
  body: skill.getBody(),
14736
15089
  otherFiles: skill.getOtherFiles().map(aiDirFileToMcpSkillFile)
@@ -14752,13 +15105,13 @@ async function deleteSkill({
14752
15105
  intendedRootDir: process.cwd()
14753
15106
  });
14754
15107
  const dirName = extractDirName(relativeDirPathFromCwd);
14755
- const skillDirPath = join108(process.cwd(), RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName);
15108
+ const skillDirPath = join113(process.cwd(), RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName);
14756
15109
  try {
14757
15110
  if (await directoryExists(skillDirPath)) {
14758
15111
  await removeDirectory(skillDirPath);
14759
15112
  }
14760
15113
  return {
14761
- relativeDirPathFromCwd: join108(RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName)
15114
+ relativeDirPathFromCwd: join113(RULESYNC_SKILLS_RELATIVE_DIR_PATH, dirName)
14762
15115
  };
14763
15116
  } catch (error) {
14764
15117
  throw new Error(
@@ -14791,7 +15144,7 @@ var skillToolSchemas = {
14791
15144
  var skillTools = {
14792
15145
  listSkills: {
14793
15146
  name: "listSkills",
14794
- description: `List all skills from ${join108(RULESYNC_SKILLS_RELATIVE_DIR_PATH, "*", SKILL_FILE_NAME)} with their frontmatter.`,
15147
+ description: `List all skills from ${join113(RULESYNC_SKILLS_RELATIVE_DIR_PATH, "*", SKILL_FILE_NAME)} with their frontmatter.`,
14795
15148
  parameters: skillToolSchemas.listSkills,
14796
15149
  execute: async () => {
14797
15150
  const skills = await listSkills();
@@ -14834,12 +15187,12 @@ var skillTools = {
14834
15187
  };
14835
15188
 
14836
15189
  // src/mcp/subagents.ts
14837
- import { basename as basename26, join as join109 } from "path";
15190
+ import { basename as basename27, join as join114 } from "path";
14838
15191
  import { z as z54 } from "zod/mini";
14839
15192
  var maxSubagentSizeBytes = 1024 * 1024;
14840
15193
  var maxSubagentsCount = 1e3;
14841
15194
  async function listSubagents() {
14842
- const subagentsDir = join109(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH);
15195
+ const subagentsDir = join114(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH);
14843
15196
  try {
14844
15197
  const files = await listDirectoryFiles(subagentsDir);
14845
15198
  const mdFiles = files.filter((file) => file.endsWith(".md"));
@@ -14852,7 +15205,7 @@ async function listSubagents() {
14852
15205
  });
14853
15206
  const frontmatter = subagent.getFrontmatter();
14854
15207
  return {
14855
- relativePathFromCwd: join109(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, file),
15208
+ relativePathFromCwd: join114(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, file),
14856
15209
  frontmatter
14857
15210
  };
14858
15211
  } catch (error) {
@@ -14874,14 +15227,14 @@ async function getSubagent({ relativePathFromCwd }) {
14874
15227
  relativePath: relativePathFromCwd,
14875
15228
  intendedRootDir: process.cwd()
14876
15229
  });
14877
- const filename = basename26(relativePathFromCwd);
15230
+ const filename = basename27(relativePathFromCwd);
14878
15231
  try {
14879
15232
  const subagent = await RulesyncSubagent.fromFile({
14880
15233
  relativeFilePath: filename,
14881
15234
  validate: true
14882
15235
  });
14883
15236
  return {
14884
- relativePathFromCwd: join109(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, filename),
15237
+ relativePathFromCwd: join114(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, filename),
14885
15238
  frontmatter: subagent.getFrontmatter(),
14886
15239
  body: subagent.getBody()
14887
15240
  };
@@ -14900,7 +15253,7 @@ async function putSubagent({
14900
15253
  relativePath: relativePathFromCwd,
14901
15254
  intendedRootDir: process.cwd()
14902
15255
  });
14903
- const filename = basename26(relativePathFromCwd);
15256
+ const filename = basename27(relativePathFromCwd);
14904
15257
  const estimatedSize = JSON.stringify(frontmatter).length + body.length;
14905
15258
  if (estimatedSize > maxSubagentSizeBytes) {
14906
15259
  throw new Error(
@@ -14910,7 +15263,7 @@ async function putSubagent({
14910
15263
  try {
14911
15264
  const existingSubagents = await listSubagents();
14912
15265
  const isUpdate = existingSubagents.some(
14913
- (subagent2) => subagent2.relativePathFromCwd === join109(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, filename)
15266
+ (subagent2) => subagent2.relativePathFromCwd === join114(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, filename)
14914
15267
  );
14915
15268
  if (!isUpdate && existingSubagents.length >= maxSubagentsCount) {
14916
15269
  throw new Error(`Maximum number of subagents (${maxSubagentsCount}) reached`);
@@ -14923,11 +15276,11 @@ async function putSubagent({
14923
15276
  body,
14924
15277
  validate: true
14925
15278
  });
14926
- const subagentsDir = join109(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH);
15279
+ const subagentsDir = join114(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH);
14927
15280
  await ensureDir(subagentsDir);
14928
15281
  await writeFileContent(subagent.getFilePath(), subagent.getFileContent());
14929
15282
  return {
14930
- relativePathFromCwd: join109(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, filename),
15283
+ relativePathFromCwd: join114(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, filename),
14931
15284
  frontmatter: subagent.getFrontmatter(),
14932
15285
  body: subagent.getBody()
14933
15286
  };
@@ -14942,12 +15295,12 @@ async function deleteSubagent({ relativePathFromCwd }) {
14942
15295
  relativePath: relativePathFromCwd,
14943
15296
  intendedRootDir: process.cwd()
14944
15297
  });
14945
- const filename = basename26(relativePathFromCwd);
14946
- const fullPath = join109(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, filename);
15298
+ const filename = basename27(relativePathFromCwd);
15299
+ const fullPath = join114(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, filename);
14947
15300
  try {
14948
15301
  await removeFile(fullPath);
14949
15302
  return {
14950
- relativePathFromCwd: join109(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, filename)
15303
+ relativePathFromCwd: join114(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, filename)
14951
15304
  };
14952
15305
  } catch (error) {
14953
15306
  throw new Error(
@@ -14975,7 +15328,7 @@ var subagentToolSchemas = {
14975
15328
  var subagentTools = {
14976
15329
  listSubagents: {
14977
15330
  name: "listSubagents",
14978
- description: `List all subagents from ${join109(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "*.md")} with their frontmatter.`,
15331
+ description: `List all subagents from ${join114(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "*.md")} with their frontmatter.`,
14979
15332
  parameters: subagentToolSchemas.listSubagents,
14980
15333
  execute: async () => {
14981
15334
  const subagents = await listSubagents();
@@ -15226,7 +15579,7 @@ async function mcpCommand({ version }) {
15226
15579
  }
15227
15580
 
15228
15581
  // src/cli/index.ts
15229
- var getVersion = () => "6.3.0";
15582
+ var getVersion = () => "6.4.0";
15230
15583
  var main = async () => {
15231
15584
  const program = new Command();
15232
15585
  const version = getVersion();