rulesync 9.1.0 → 9.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7169,6 +7169,12 @@ var CodexcliHooks = class CodexcliHooks extends ToolHooks {
7169
7169
  relativeFilePath: CODEXCLI_HOOKS_FILE_NAME
7170
7170
  };
7171
7171
  }
7172
+ static getExtraSharedWritePaths() {
7173
+ return [{
7174
+ relativeDirPath: CODEXCLI_DIR,
7175
+ relativeFilePath: CODEXCLI_MCP_FILE_NAME
7176
+ }];
7177
+ }
7172
7178
  static async fromFile({ outputRoot = process.cwd(), validate = true, global = false }) {
7173
7179
  const paths = CodexcliHooks.getSettablePaths({ global });
7174
7180
  const fileContent = await readFileContentOrNull((0, node_path.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath)) ?? "{\"hooks\":{}}";
@@ -9759,6 +9765,12 @@ var VibeHooks = class VibeHooks extends ToolHooks {
9759
9765
  relativeFilePath: VIBE_HOOKS_FILE_NAME
9760
9766
  };
9761
9767
  }
9768
+ static getExtraSharedWritePaths() {
9769
+ return [{
9770
+ relativeDirPath: VIBE_DIR,
9771
+ relativeFilePath: VIBE_CONFIG_FILE_NAME
9772
+ }];
9773
+ }
9762
9774
  static async fromFile({ outputRoot = process.cwd(), validate = true, global = false }) {
9763
9775
  const paths = VibeHooks.getSettablePaths({ global });
9764
9776
  const fileContent = await readFileContentOrNull((0, node_path.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath)) ?? smol_toml.stringify({});
@@ -33788,6 +33800,9 @@ var KiloRule = class KiloRule extends ToolRule {
33788
33800
  nonRoot: { relativeDirPath: buildToolPath(KILO_DIR, KILO_RULES_DIR_NAME, excludeToolDir) }
33789
33801
  };
33790
33802
  }
33803
+ static getExtraSharedWritePaths({ global = false } = {}) {
33804
+ return global ? [] : [KiloMcp.getSettablePaths({ global: false })];
33805
+ }
33791
33806
  static async fromFile({ outputRoot = process.cwd(), relativeFilePath, validate = true, global = false }) {
33792
33807
  const paths = this.getSettablePaths({ global });
33793
33808
  if (relativeFilePath === paths.root.relativeFilePath) {
@@ -34049,6 +34064,9 @@ var OpenCodeRule = class OpenCodeRule extends ToolRule {
34049
34064
  nonRoot: { relativeDirPath: buildToolPath(OPENCODE_DIR, "memories", excludeToolDir) }
34050
34065
  };
34051
34066
  }
34067
+ static getExtraSharedWritePaths({ global = false } = {}) {
34068
+ return global ? [] : [OpencodeMcp.getSettablePaths({ global: false })];
34069
+ }
34052
34070
  static async fromFile({ outputRoot = process.cwd(), relativeFilePath, validate = true, global = false }) {
34053
34071
  const paths = this.getSettablePaths({ global });
34054
34072
  if (relativeFilePath === paths.root.relativeFilePath) {
@@ -34725,6 +34743,37 @@ var RovodevRule = class RovodevRule extends ToolRule {
34725
34743
  toolTarget: "rovodev"
34726
34744
  });
34727
34745
  }
34746
+ /**
34747
+ * Mirror the primary `.rovodev/AGENTS.md` root rule to `./AGENTS.md` so project
34748
+ * memory stays discoverable at the repo root. Empty when `rootRule` is not the primary root.
34749
+ */
34750
+ static getRootMirrorFiles({ outputRoot, rootRule, content }) {
34751
+ if (!(rootRule instanceof RovodevRule)) return [];
34752
+ const primary = this.getSettablePaths({ global: false }).root;
34753
+ if (rootRule.getRelativeDirPath() !== primary.relativeDirPath || rootRule.getRelativeFilePath() !== primary.relativeFilePath) return [];
34754
+ return [new RovodevRule({
34755
+ outputRoot,
34756
+ relativeDirPath: ".",
34757
+ relativeFilePath: ROVODEV_RULE_FILE_NAME,
34758
+ fileContent: content,
34759
+ validate: true,
34760
+ root: true
34761
+ })];
34762
+ }
34763
+ /**
34764
+ * Globs for mirror deletion: the `./AGENTS.md` mirror (`mirrorGlob`) is deleted
34765
+ * only when the primary `.rovodev/AGENTS.md` (`primaryGlob`) still exists.
34766
+ */
34767
+ static getRootMirrorDeletionGlobs({ outputRoot }) {
34768
+ return {
34769
+ primaryGlob: (0, node_path.join)(outputRoot, ROVODEV_DIR, ROVODEV_RULE_FILE_NAME),
34770
+ mirrorGlob: (0, node_path.join)(outputRoot, ROVODEV_RULE_FILE_NAME)
34771
+ };
34772
+ }
34773
+ /** Glob for the `separate-local-file` deletion; rovodev writes it at project root, not under `.rovodev/`. */
34774
+ static getLocalRootDeletionGlob({ outputRoot, fileName }) {
34775
+ return (0, node_path.join)(outputRoot, fileName);
34776
+ }
34728
34777
  };
34729
34778
  //#endregion
34730
34779
  //#region src/features/rules/takt-rule.ts
@@ -35447,7 +35496,7 @@ var RulesProcessor = class extends FeatureProcessor {
35447
35496
  });
35448
35497
  this.applyRootRuleSections({
35449
35498
  toolRules,
35450
- meta
35499
+ factory
35451
35500
  });
35452
35501
  return [...toolRules, ...extraFiles];
35453
35502
  }
@@ -35509,31 +35558,16 @@ var RulesProcessor = class extends FeatureProcessor {
35509
35558
  * reference and conventions sections to the root rule content. Mutates the
35510
35559
  * root rule in place.
35511
35560
  */
35512
- applyRootRuleSections({ toolRules, meta }) {
35561
+ applyRootRuleSections({ toolRules, factory }) {
35562
+ const { meta } = factory;
35513
35563
  const rootRule = toolRules.find((rule) => rule.isRoot());
35514
35564
  if (!rootRule) return;
35515
35565
  const newContent = this.generateReferenceSectionFromMeta(meta, toolRules) + (!meta.createsSeparateConventionsRule && meta.additionalConventions ? this.generateAdditionalConventionsSectionFromMeta(meta) : "") + rootRule.getFileContent();
35516
35566
  rootRule.setFileContent(newContent);
35517
- if (meta.mirrorsRootToAgentsMd && !this.global) this.mirrorRootRuleToAgentsMd({
35518
- toolRules,
35567
+ if (meta.mirrorsRootToAgentsMd && !this.global && factory.class.getRootMirrorFiles) toolRules.push(...factory.class.getRootMirrorFiles({
35568
+ outputRoot: this.outputRoot,
35519
35569
  rootRule,
35520
35570
  content: newContent
35521
- });
35522
- }
35523
- /**
35524
- * Mirror the primary root rule to a project-root `AGENTS.md` for tools whose
35525
- * primary root lives in a subdirectory (rovodev: `.rovodev/AGENTS.md`).
35526
- */
35527
- mirrorRootRuleToAgentsMd({ toolRules, rootRule, content }) {
35528
- if (!(rootRule instanceof RovodevRule)) return;
35529
- const primary = RovodevRule.getSettablePaths({ global: false }).root;
35530
- if (rootRule.getRelativeDirPath() === primary.relativeDirPath && rootRule.getRelativeFilePath() === primary.relativeFilePath) toolRules.push(new RovodevRule({
35531
- outputRoot: this.outputRoot,
35532
- relativeDirPath: ".",
35533
- relativeFilePath: "AGENTS.md",
35534
- fileContent: content,
35535
- validate: true,
35536
- root: true
35537
35571
  }));
35538
35572
  }
35539
35573
  buildSkillList(skillClass) {
@@ -35759,15 +35793,19 @@ As this project's AI coding tool, you must follow the additional conventions bel
35759
35793
  const localRootToolRules = await (async () => {
35760
35794
  if (!forDeletion || this.global || factory.meta.localRootMode !== "separate-local-file" || !factory.meta.localRootFileName) return [];
35761
35795
  const fileName = factory.meta.localRootFileName;
35762
- if (factory.class === RovodevRule) return buildDeletionRulesFromPaths(await findFilesByGlobs((0, node_path.join)(this.outputRoot, fileName)));
35796
+ if (factory.class.getLocalRootDeletionGlob) return buildDeletionRulesFromPaths(await findFilesByGlobs(factory.class.getLocalRootDeletionGlob({
35797
+ outputRoot: this.outputRoot,
35798
+ fileName
35799
+ })));
35763
35800
  if (!settablePaths.root) return [];
35764
35801
  return buildDeletionRulesFromPaths(await findFilesWithFallback((0, node_path.join)(this.outputRoot, settablePaths.root.relativeDirPath ?? ".", fileName), settablePaths.alternativeRoots, (alt) => (0, node_path.join)(this.outputRoot, alt.relativeDirPath, fileName)));
35765
35802
  })();
35766
35803
  this.logger.debug(`Found ${localRootToolRules.length} local root tool rule files for deletion`);
35767
35804
  const rootMirrorDeletionRules = await (async () => {
35768
- if (!forDeletion || this.global || !factory.meta.mirrorsRootToAgentsMd || factory.class !== RovodevRule) return [];
35769
- if ((await findFilesByGlobs((0, node_path.join)(this.outputRoot, ".rovodev", "AGENTS.md"))).length === 0) return [];
35770
- return buildDeletionRulesFromPaths(await findFilesByGlobs((0, node_path.join)(this.outputRoot, "AGENTS.md")));
35805
+ if (!forDeletion || this.global || !factory.meta.mirrorsRootToAgentsMd || !factory.class.getRootMirrorDeletionGlobs) return [];
35806
+ const { primaryGlob, mirrorGlob } = factory.class.getRootMirrorDeletionGlobs({ outputRoot: this.outputRoot });
35807
+ if ((await findFilesByGlobs(primaryGlob)).length === 0) return [];
35808
+ return buildDeletionRulesFromPaths(await findFilesByGlobs(mirrorGlob));
35771
35809
  })();
35772
35810
  const nonRootToolRules = await (async () => {
35773
35811
  if (!settablePaths.nonRoot) return [];
@@ -36281,22 +36319,29 @@ function resolveExecutionOrder(steps) {
36281
36319
  const GENERATION_STEP_GRAPH = [
36282
36320
  {
36283
36321
  id: "ignore",
36284
- writesSharedFile: ["claude-settings", "zed-settings"]
36322
+ writesSharedFile: [".claude/settings.json", ".zed/settings.json"]
36285
36323
  },
36286
36324
  {
36287
36325
  id: "mcp",
36288
36326
  writesSharedFile: [
36289
- "kilo-opencode-config",
36290
- "zed-settings",
36291
- "qwencode-settings",
36292
- "augmentcode-settings",
36293
- "hermesagent-config",
36294
- "amp-settings",
36295
- "codexcli-config",
36296
- "grokcli-config",
36297
- "vibe-config",
36298
- "devin-config",
36299
- "reasonix-config"
36327
+ ".amp/settings.json",
36328
+ ".augment/settings.json",
36329
+ ".codex/config.toml",
36330
+ ".config/amp/settings.json",
36331
+ ".config/devin/config.json",
36332
+ ".config/opencode/opencode.json",
36333
+ ".config/zed/settings.json",
36334
+ ".devin/config.json",
36335
+ ".grok/config.toml",
36336
+ ".hermes/config.yaml",
36337
+ ".qwen/settings.json",
36338
+ ".reasonix/config.toml",
36339
+ ".takt/config.yaml",
36340
+ ".vibe/config.toml",
36341
+ ".zed/settings.json",
36342
+ "kilo.json",
36343
+ "opencode.json",
36344
+ "reasonix.toml"
36300
36345
  ],
36301
36346
  dependsOn: ["ignore"]
36302
36347
  },
@@ -36306,33 +36351,39 @@ const GENERATION_STEP_GRAPH = [
36306
36351
  {
36307
36352
  id: "hooks",
36308
36353
  writesSharedFile: [
36309
- "claude-settings",
36310
- "qwencode-settings",
36311
- "augmentcode-settings",
36312
- "hermesagent-config",
36313
- "kiro-agent-config",
36314
- "codexcli-config",
36315
- "vibe-config",
36316
- "devin-config"
36354
+ ".augment/settings.json",
36355
+ ".claude/settings.json",
36356
+ ".codex/config.toml",
36357
+ ".config/devin/config.json",
36358
+ ".hermes/config.yaml",
36359
+ ".kiro/agents/default.json",
36360
+ ".qwen/settings.json",
36361
+ ".vibe/config.toml"
36317
36362
  ],
36318
36363
  dependsOn: ["ignore", "mcp"]
36319
36364
  },
36320
36365
  {
36321
36366
  id: "permissions",
36322
36367
  writesSharedFile: [
36323
- "claude-settings",
36324
- "kilo-opencode-config",
36325
- "zed-settings",
36326
- "qwencode-settings",
36327
- "augmentcode-settings",
36328
- "hermesagent-config",
36329
- "kiro-agent-config",
36330
- "amp-settings",
36331
- "codexcli-config",
36332
- "grokcli-config",
36333
- "vibe-config",
36334
- "devin-config",
36335
- "reasonix-config"
36368
+ ".amp/settings.json",
36369
+ ".augment/settings.json",
36370
+ ".claude/settings.json",
36371
+ ".codex/config.toml",
36372
+ ".config/amp/settings.json",
36373
+ ".config/devin/config.json",
36374
+ ".config/opencode/opencode.json",
36375
+ ".config/zed/settings.json",
36376
+ ".devin/config.json",
36377
+ ".grok/config.toml",
36378
+ ".hermes/config.yaml",
36379
+ ".kiro/agents/default.json",
36380
+ ".qwen/settings.json",
36381
+ ".reasonix/config.toml",
36382
+ ".takt/config.yaml",
36383
+ ".vibe/config.toml",
36384
+ ".zed/settings.json",
36385
+ "opencode.json",
36386
+ "reasonix.toml"
36336
36387
  ],
36337
36388
  dependsOn: [
36338
36389
  "ignore",
@@ -36342,7 +36393,7 @@ const GENERATION_STEP_GRAPH = [
36342
36393
  },
36343
36394
  {
36344
36395
  id: "rules",
36345
- writesSharedFile: ["kilo-opencode-config"],
36396
+ writesSharedFile: ["kilo.json", "opencode.json"],
36346
36397
  dependsOn: [
36347
36398
  "mcp",
36348
36399
  "skills",
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_import = require("./import-CNtfs80W.cjs");
2
+ const require_import = require("./import-cNqo0ZxT.cjs");
3
3
  //#region src/index.ts
4
4
  async function generate(options = {}) {
5
5
  const { silent = true, verbose = false, ...rest } = options;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Ut as ALL_FEATURES, Y as ConfigResolver, Z as ConsoleLogger, _t as ALL_TOOL_TARGETS, i as convertFromTool$1, n as checkRulesyncDirExists, r as generate$1, t as importFromTool$1 } from "./import-ylOvQDpE.js";
1
+ import { Ut as ALL_FEATURES, Y as ConfigResolver, Z as ConsoleLogger, _t as ALL_TOOL_TARGETS, i as convertFromTool$1, n as checkRulesyncDirExists, r as generate$1, t as importFromTool$1 } from "./import-DywcWsgJ.js";
2
2
  //#region src/index.ts
3
3
  async function generate(options = {}) {
4
4
  const { silent = true, verbose = false, ...rest } = options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulesync",
3
- "version": "9.1.0",
3
+ "version": "9.1.1",
4
4
  "description": "Unified AI rules management CLI tool that generates configuration files for various AI development tools",
5
5
  "keywords": [
6
6
  "ai",