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.
@@ -7142,6 +7142,12 @@ var CodexcliHooks = class CodexcliHooks extends ToolHooks {
7142
7142
  relativeFilePath: CODEXCLI_HOOKS_FILE_NAME
7143
7143
  };
7144
7144
  }
7145
+ static getExtraSharedWritePaths() {
7146
+ return [{
7147
+ relativeDirPath: CODEXCLI_DIR,
7148
+ relativeFilePath: CODEXCLI_MCP_FILE_NAME
7149
+ }];
7150
+ }
7145
7151
  static async fromFile({ outputRoot = process.cwd(), validate = true, global = false }) {
7146
7152
  const paths = CodexcliHooks.getSettablePaths({ global });
7147
7153
  const fileContent = await readFileContentOrNull(join(outputRoot, paths.relativeDirPath, paths.relativeFilePath)) ?? "{\"hooks\":{}}";
@@ -9732,6 +9738,12 @@ var VibeHooks = class VibeHooks extends ToolHooks {
9732
9738
  relativeFilePath: VIBE_HOOKS_FILE_NAME
9733
9739
  };
9734
9740
  }
9741
+ static getExtraSharedWritePaths() {
9742
+ return [{
9743
+ relativeDirPath: VIBE_DIR,
9744
+ relativeFilePath: VIBE_CONFIG_FILE_NAME
9745
+ }];
9746
+ }
9735
9747
  static async fromFile({ outputRoot = process.cwd(), validate = true, global = false }) {
9736
9748
  const paths = VibeHooks.getSettablePaths({ global });
9737
9749
  const fileContent = await readFileContentOrNull(join(outputRoot, paths.relativeDirPath, paths.relativeFilePath)) ?? smolToml.stringify({});
@@ -33761,6 +33773,9 @@ var KiloRule = class KiloRule extends ToolRule {
33761
33773
  nonRoot: { relativeDirPath: buildToolPath(KILO_DIR, KILO_RULES_DIR_NAME, excludeToolDir) }
33762
33774
  };
33763
33775
  }
33776
+ static getExtraSharedWritePaths({ global = false } = {}) {
33777
+ return global ? [] : [KiloMcp.getSettablePaths({ global: false })];
33778
+ }
33764
33779
  static async fromFile({ outputRoot = process.cwd(), relativeFilePath, validate = true, global = false }) {
33765
33780
  const paths = this.getSettablePaths({ global });
33766
33781
  if (relativeFilePath === paths.root.relativeFilePath) {
@@ -34022,6 +34037,9 @@ var OpenCodeRule = class OpenCodeRule extends ToolRule {
34022
34037
  nonRoot: { relativeDirPath: buildToolPath(OPENCODE_DIR, "memories", excludeToolDir) }
34023
34038
  };
34024
34039
  }
34040
+ static getExtraSharedWritePaths({ global = false } = {}) {
34041
+ return global ? [] : [OpencodeMcp.getSettablePaths({ global: false })];
34042
+ }
34025
34043
  static async fromFile({ outputRoot = process.cwd(), relativeFilePath, validate = true, global = false }) {
34026
34044
  const paths = this.getSettablePaths({ global });
34027
34045
  if (relativeFilePath === paths.root.relativeFilePath) {
@@ -34698,6 +34716,37 @@ var RovodevRule = class RovodevRule extends ToolRule {
34698
34716
  toolTarget: "rovodev"
34699
34717
  });
34700
34718
  }
34719
+ /**
34720
+ * Mirror the primary `.rovodev/AGENTS.md` root rule to `./AGENTS.md` so project
34721
+ * memory stays discoverable at the repo root. Empty when `rootRule` is not the primary root.
34722
+ */
34723
+ static getRootMirrorFiles({ outputRoot, rootRule, content }) {
34724
+ if (!(rootRule instanceof RovodevRule)) return [];
34725
+ const primary = this.getSettablePaths({ global: false }).root;
34726
+ if (rootRule.getRelativeDirPath() !== primary.relativeDirPath || rootRule.getRelativeFilePath() !== primary.relativeFilePath) return [];
34727
+ return [new RovodevRule({
34728
+ outputRoot,
34729
+ relativeDirPath: ".",
34730
+ relativeFilePath: ROVODEV_RULE_FILE_NAME,
34731
+ fileContent: content,
34732
+ validate: true,
34733
+ root: true
34734
+ })];
34735
+ }
34736
+ /**
34737
+ * Globs for mirror deletion: the `./AGENTS.md` mirror (`mirrorGlob`) is deleted
34738
+ * only when the primary `.rovodev/AGENTS.md` (`primaryGlob`) still exists.
34739
+ */
34740
+ static getRootMirrorDeletionGlobs({ outputRoot }) {
34741
+ return {
34742
+ primaryGlob: join(outputRoot, ROVODEV_DIR, ROVODEV_RULE_FILE_NAME),
34743
+ mirrorGlob: join(outputRoot, ROVODEV_RULE_FILE_NAME)
34744
+ };
34745
+ }
34746
+ /** Glob for the `separate-local-file` deletion; rovodev writes it at project root, not under `.rovodev/`. */
34747
+ static getLocalRootDeletionGlob({ outputRoot, fileName }) {
34748
+ return join(outputRoot, fileName);
34749
+ }
34701
34750
  };
34702
34751
  //#endregion
34703
34752
  //#region src/features/rules/takt-rule.ts
@@ -35420,7 +35469,7 @@ var RulesProcessor = class extends FeatureProcessor {
35420
35469
  });
35421
35470
  this.applyRootRuleSections({
35422
35471
  toolRules,
35423
- meta
35472
+ factory
35424
35473
  });
35425
35474
  return [...toolRules, ...extraFiles];
35426
35475
  }
@@ -35482,31 +35531,16 @@ var RulesProcessor = class extends FeatureProcessor {
35482
35531
  * reference and conventions sections to the root rule content. Mutates the
35483
35532
  * root rule in place.
35484
35533
  */
35485
- applyRootRuleSections({ toolRules, meta }) {
35534
+ applyRootRuleSections({ toolRules, factory }) {
35535
+ const { meta } = factory;
35486
35536
  const rootRule = toolRules.find((rule) => rule.isRoot());
35487
35537
  if (!rootRule) return;
35488
35538
  const newContent = this.generateReferenceSectionFromMeta(meta, toolRules) + (!meta.createsSeparateConventionsRule && meta.additionalConventions ? this.generateAdditionalConventionsSectionFromMeta(meta) : "") + rootRule.getFileContent();
35489
35539
  rootRule.setFileContent(newContent);
35490
- if (meta.mirrorsRootToAgentsMd && !this.global) this.mirrorRootRuleToAgentsMd({
35491
- toolRules,
35540
+ if (meta.mirrorsRootToAgentsMd && !this.global && factory.class.getRootMirrorFiles) toolRules.push(...factory.class.getRootMirrorFiles({
35541
+ outputRoot: this.outputRoot,
35492
35542
  rootRule,
35493
35543
  content: newContent
35494
- });
35495
- }
35496
- /**
35497
- * Mirror the primary root rule to a project-root `AGENTS.md` for tools whose
35498
- * primary root lives in a subdirectory (rovodev: `.rovodev/AGENTS.md`).
35499
- */
35500
- mirrorRootRuleToAgentsMd({ toolRules, rootRule, content }) {
35501
- if (!(rootRule instanceof RovodevRule)) return;
35502
- const primary = RovodevRule.getSettablePaths({ global: false }).root;
35503
- if (rootRule.getRelativeDirPath() === primary.relativeDirPath && rootRule.getRelativeFilePath() === primary.relativeFilePath) toolRules.push(new RovodevRule({
35504
- outputRoot: this.outputRoot,
35505
- relativeDirPath: ".",
35506
- relativeFilePath: "AGENTS.md",
35507
- fileContent: content,
35508
- validate: true,
35509
- root: true
35510
35544
  }));
35511
35545
  }
35512
35546
  buildSkillList(skillClass) {
@@ -35732,15 +35766,19 @@ As this project's AI coding tool, you must follow the additional conventions bel
35732
35766
  const localRootToolRules = await (async () => {
35733
35767
  if (!forDeletion || this.global || factory.meta.localRootMode !== "separate-local-file" || !factory.meta.localRootFileName) return [];
35734
35768
  const fileName = factory.meta.localRootFileName;
35735
- if (factory.class === RovodevRule) return buildDeletionRulesFromPaths(await findFilesByGlobs(join(this.outputRoot, fileName)));
35769
+ if (factory.class.getLocalRootDeletionGlob) return buildDeletionRulesFromPaths(await findFilesByGlobs(factory.class.getLocalRootDeletionGlob({
35770
+ outputRoot: this.outputRoot,
35771
+ fileName
35772
+ })));
35736
35773
  if (!settablePaths.root) return [];
35737
35774
  return buildDeletionRulesFromPaths(await findFilesWithFallback(join(this.outputRoot, settablePaths.root.relativeDirPath ?? ".", fileName), settablePaths.alternativeRoots, (alt) => join(this.outputRoot, alt.relativeDirPath, fileName)));
35738
35775
  })();
35739
35776
  this.logger.debug(`Found ${localRootToolRules.length} local root tool rule files for deletion`);
35740
35777
  const rootMirrorDeletionRules = await (async () => {
35741
- if (!forDeletion || this.global || !factory.meta.mirrorsRootToAgentsMd || factory.class !== RovodevRule) return [];
35742
- if ((await findFilesByGlobs(join(this.outputRoot, ".rovodev", "AGENTS.md"))).length === 0) return [];
35743
- return buildDeletionRulesFromPaths(await findFilesByGlobs(join(this.outputRoot, "AGENTS.md")));
35778
+ if (!forDeletion || this.global || !factory.meta.mirrorsRootToAgentsMd || !factory.class.getRootMirrorDeletionGlobs) return [];
35779
+ const { primaryGlob, mirrorGlob } = factory.class.getRootMirrorDeletionGlobs({ outputRoot: this.outputRoot });
35780
+ if ((await findFilesByGlobs(primaryGlob)).length === 0) return [];
35781
+ return buildDeletionRulesFromPaths(await findFilesByGlobs(mirrorGlob));
35744
35782
  })();
35745
35783
  const nonRootToolRules = await (async () => {
35746
35784
  if (!settablePaths.nonRoot) return [];
@@ -36254,22 +36292,29 @@ function resolveExecutionOrder(steps) {
36254
36292
  const GENERATION_STEP_GRAPH = [
36255
36293
  {
36256
36294
  id: "ignore",
36257
- writesSharedFile: ["claude-settings", "zed-settings"]
36295
+ writesSharedFile: [".claude/settings.json", ".zed/settings.json"]
36258
36296
  },
36259
36297
  {
36260
36298
  id: "mcp",
36261
36299
  writesSharedFile: [
36262
- "kilo-opencode-config",
36263
- "zed-settings",
36264
- "qwencode-settings",
36265
- "augmentcode-settings",
36266
- "hermesagent-config",
36267
- "amp-settings",
36268
- "codexcli-config",
36269
- "grokcli-config",
36270
- "vibe-config",
36271
- "devin-config",
36272
- "reasonix-config"
36300
+ ".amp/settings.json",
36301
+ ".augment/settings.json",
36302
+ ".codex/config.toml",
36303
+ ".config/amp/settings.json",
36304
+ ".config/devin/config.json",
36305
+ ".config/opencode/opencode.json",
36306
+ ".config/zed/settings.json",
36307
+ ".devin/config.json",
36308
+ ".grok/config.toml",
36309
+ ".hermes/config.yaml",
36310
+ ".qwen/settings.json",
36311
+ ".reasonix/config.toml",
36312
+ ".takt/config.yaml",
36313
+ ".vibe/config.toml",
36314
+ ".zed/settings.json",
36315
+ "kilo.json",
36316
+ "opencode.json",
36317
+ "reasonix.toml"
36273
36318
  ],
36274
36319
  dependsOn: ["ignore"]
36275
36320
  },
@@ -36279,33 +36324,39 @@ const GENERATION_STEP_GRAPH = [
36279
36324
  {
36280
36325
  id: "hooks",
36281
36326
  writesSharedFile: [
36282
- "claude-settings",
36283
- "qwencode-settings",
36284
- "augmentcode-settings",
36285
- "hermesagent-config",
36286
- "kiro-agent-config",
36287
- "codexcli-config",
36288
- "vibe-config",
36289
- "devin-config"
36327
+ ".augment/settings.json",
36328
+ ".claude/settings.json",
36329
+ ".codex/config.toml",
36330
+ ".config/devin/config.json",
36331
+ ".hermes/config.yaml",
36332
+ ".kiro/agents/default.json",
36333
+ ".qwen/settings.json",
36334
+ ".vibe/config.toml"
36290
36335
  ],
36291
36336
  dependsOn: ["ignore", "mcp"]
36292
36337
  },
36293
36338
  {
36294
36339
  id: "permissions",
36295
36340
  writesSharedFile: [
36296
- "claude-settings",
36297
- "kilo-opencode-config",
36298
- "zed-settings",
36299
- "qwencode-settings",
36300
- "augmentcode-settings",
36301
- "hermesagent-config",
36302
- "kiro-agent-config",
36303
- "amp-settings",
36304
- "codexcli-config",
36305
- "grokcli-config",
36306
- "vibe-config",
36307
- "devin-config",
36308
- "reasonix-config"
36341
+ ".amp/settings.json",
36342
+ ".augment/settings.json",
36343
+ ".claude/settings.json",
36344
+ ".codex/config.toml",
36345
+ ".config/amp/settings.json",
36346
+ ".config/devin/config.json",
36347
+ ".config/opencode/opencode.json",
36348
+ ".config/zed/settings.json",
36349
+ ".devin/config.json",
36350
+ ".grok/config.toml",
36351
+ ".hermes/config.yaml",
36352
+ ".kiro/agents/default.json",
36353
+ ".qwen/settings.json",
36354
+ ".reasonix/config.toml",
36355
+ ".takt/config.yaml",
36356
+ ".vibe/config.toml",
36357
+ ".zed/settings.json",
36358
+ "opencode.json",
36359
+ "reasonix.toml"
36309
36360
  ],
36310
36361
  dependsOn: [
36311
36362
  "ignore",
@@ -36315,7 +36366,7 @@ const GENERATION_STEP_GRAPH = [
36315
36366
  },
36316
36367
  {
36317
36368
  id: "rules",
36318
- writesSharedFile: ["kilo-opencode-config"],
36369
+ writesSharedFile: ["kilo.json", "opencode.json"],
36319
36370
  dependsOn: [
36320
36371
  "mcp",
36321
36372
  "skills",
@@ -37014,4 +37065,4 @@ async function importPermissionsCore(params) {
37014
37065
  //#endregion
37015
37066
  export { CLIError as $, IgnoreProcessor as A, RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH as At, toolCommandFactories as B, RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH as Bt, PermissionsProcessorToolTargetSchema as C, RULESYNC_COMMANDS_RELATIVE_DIR_PATH as Ct, McpProcessorToolTargetSchema as D, RULESYNC_HOOKS_FILE_NAME as Dt, McpProcessor as E, RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH as Et, HooksProcessorToolTargetSchema as F, RULESYNC_PERMISSIONS_FILE_NAME as Ft, CLAUDECODE_SKILLS_DIR_PATH as G, CLAUDECODE_LOCAL_RULE_FILE_NAME as H, formatError as Ht, toolHooksFactories as I, RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH as It, stringifyFrontmatter as J, RulesyncCommand as K, RulesyncHooks as L, RULESYNC_RELATIVE_DIR_PATH as Lt, toolIgnoreFactories as M, RULESYNC_MCP_RELATIVE_FILE_PATH as Mt, RulesyncIgnore as N, RULESYNC_MCP_SCHEMA_URL as Nt, toolMcpFactories as O, RULESYNC_HOOKS_RELATIVE_FILE_PATH as Ot, HooksProcessor as P, RULESYNC_OVERVIEW_FILE_NAME as Pt, JsonLogger as Q, CommandsProcessor as R, RULESYNC_RULES_RELATIVE_DIR_PATH as Rt, PermissionsProcessor as S, RULESYNC_AIIGNORE_RELATIVE_FILE_PATH as St, RulesyncPermissions as T, RULESYNC_CONFIG_SCHEMA_URL as Tt, CLAUDECODE_MEMORIES_DIR_NAME as U, ALL_FEATURES as Ut, CLAUDECODE_DIR as V, RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH as Vt, CLAUDECODE_SETTINGS_LOCAL_FILE_NAME as W, ALL_FEATURES_WITH_WILDCARD as Wt, findControlCharacter as X, ConfigResolver as Y, ConsoleLogger as Z, toolSkillFactories as _, ALL_TOOL_TARGETS as _t, RulesProcessor as a, fileExists as at, RulesyncSkillFrontmatterSchema as b, MAX_FILE_SIZE as bt, RulesyncRule as c, getHomeDirectory as ct, SubagentsProcessorToolTargetSchema as d, readFileContent as dt, ErrorCodes as et, toolSubagentFactories as f, removeDirectory as ft, SkillsProcessorToolTargetSchema as g, writeFileContent as gt, SkillsProcessor as h, toPosixPath as ht, convertFromTool as i, ensureDir as it, IgnoreProcessorToolTargetSchema as j, RULESYNC_MCP_FILE_NAME as jt, RulesyncMcp as k, RULESYNC_IGNORE_RELATIVE_FILE_PATH as kt, RulesyncRuleFrontmatterSchema as l, isSymlink as lt, RulesyncSubagentFrontmatterSchema as m, removeTempDirectory as mt, checkRulesyncDirExists as n, createTempDirectory as nt, RulesProcessorToolTargetSchema as o, findFilesByGlobs as ot, RulesyncSubagent as p, removeFile as pt, RulesyncCommandFrontmatterSchema as q, generate as r, directoryExists as rt, toolRuleFactories as s, getFileSize as st, importFromTool as t, checkPathTraversal as tt, SubagentsProcessor as u, listDirectoryFiles as ut, getLocalSkillDirNames as v, ALL_TOOL_TARGETS_WITH_WILDCARD as vt, toolPermissionsFactories as w, RULESYNC_CONFIG_RELATIVE_FILE_PATH as wt, SKILL_FILE_NAME as x, RULESYNC_AIIGNORE_FILE_NAME as xt, RulesyncSkill as y, ToolTargetSchema as yt, CommandsProcessorToolTargetSchema as z, RULESYNC_SKILLS_RELATIVE_DIR_PATH as zt };
37016
37067
 
37017
- //# sourceMappingURL=import-ylOvQDpE.js.map
37068
+ //# sourceMappingURL=import-DywcWsgJ.js.map