rulesync 16.26.1 → 16.27.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.
@@ -504,7 +504,8 @@ const rulesProcessorToolTargetTuple = [
504
504
  "devin",
505
505
  "zcode",
506
506
  "zed",
507
- "zoocode"
507
+ "zoocode",
508
+ "pool"
508
509
  ];
509
510
  const ignoreProcessorToolTargetTuple = [
510
511
  "aiassistant",
@@ -65771,6 +65772,132 @@ var PiRule = class PiRule extends ToolRule {
65771
65772
  }
65772
65773
  };
65773
65774
  //#endregion
65775
+ //#region src/constants/pool-paths.ts
65776
+ /**
65777
+ * Pool (Poolside's coding agent CLI) configuration-layout conventions.
65778
+ *
65779
+ * Pool reads `AGENTS.md` instruction files the same way the AGENTS.md standard
65780
+ * describes them: the personal `~/.config/poolside/AGENTS.md` (Pool itself
65781
+ * honours `XDG_CONFIG_HOME` upstream; rulesync writes only the XDG-default
65782
+ * path), the project-root `AGENTS.md`, and nested per-directory
65783
+ * `AGENTS.md` files from the repository root down through the working
65784
+ * directory, deeper files taking precedence. It skips ignored directories
65785
+ * (`.git/`, `node_modules/`, cache directories, repository ignore rules).
65786
+ *
65787
+ * @see https://docs.poolside.ai/agent-instructions
65788
+ * @see https://github.com/poolsideai/pool
65789
+ */
65790
+ /** Global config directory for Pool, relative to the home directory. */
65791
+ const POOL_GLOBAL_DIR = join(".config", "poolside");
65792
+ //#endregion
65793
+ //#region src/features/rules/pool-rule.ts
65794
+ var PoolRule = class PoolRule extends ToolRule {
65795
+ static getSettablePaths({ global = false } = {}) {
65796
+ if (global) return { root: {
65797
+ relativeDirPath: POOL_GLOBAL_DIR,
65798
+ relativeFilePath: AGENTSMD_RULE_FILE_NAME
65799
+ } };
65800
+ return { root: {
65801
+ relativeDirPath: ".",
65802
+ relativeFilePath: AGENTSMD_RULE_FILE_NAME
65803
+ } };
65804
+ }
65805
+ /**
65806
+ * Pool reads personal, project, and directory-level `AGENTS.md` files: inside
65807
+ * a git repository it loads every `AGENTS.md` from the repository root down
65808
+ * through the working directory (deeper files take precedence), skipping
65809
+ * ignored directories. Nested files are therefore a real scoping surface, not
65810
+ * just the root file's overflow.
65811
+ *
65812
+ * The scan mirrors the AGENTS.md standard's nested discovery — same file
65813
+ * name, same exclusions, import-only, project scope — because it discovers
65814
+ * literally the same files.
65815
+ * @see https://docs.poolside.ai/agent-instructions
65816
+ */
65817
+ static getNestedFilePatterns() {
65818
+ return this.buildNestedFilePatterns({ fileName: AGENTSMD_RULE_FILE_NAME });
65819
+ }
65820
+ /**
65821
+ * The subproject directory this rule scopes, or `undefined` for the root file
65822
+ * (project or global).
65823
+ */
65824
+ getSubprojectPath() {
65825
+ return this.getNestedSubprojectPath({ fileName: AGENTSMD_RULE_FILE_NAME });
65826
+ }
65827
+ static async fromFile({ outputRoot = process.cwd(), relativeFilePath: _relativeFilePath, relativeDirPath: overrideDirPath, validate = true, global = false }) {
65828
+ const { root } = this.getSettablePaths({ global });
65829
+ if (overrideDirPath !== void 0 && overrideDirPath !== root.relativeDirPath && overrideDirPath !== ".") {
65830
+ const fileContent = await readFileContent(join(outputRoot, overrideDirPath, AGENTSMD_RULE_FILE_NAME));
65831
+ return new PoolRule({
65832
+ outputRoot,
65833
+ relativeDirPath: overrideDirPath,
65834
+ relativeFilePath: AGENTSMD_RULE_FILE_NAME,
65835
+ fileContent,
65836
+ validate,
65837
+ root: false
65838
+ });
65839
+ }
65840
+ const fileContent = await readFileContent(join(outputRoot, root.relativeDirPath, root.relativeFilePath));
65841
+ return new PoolRule({
65842
+ outputRoot,
65843
+ relativeDirPath: root.relativeDirPath,
65844
+ relativeFilePath: root.relativeFilePath,
65845
+ fileContent,
65846
+ validate,
65847
+ root: true
65848
+ });
65849
+ }
65850
+ static fromRulesyncRule({ outputRoot = process.cwd(), rulesyncRule, validate = true, global = false }) {
65851
+ const { root } = this.getSettablePaths({ global });
65852
+ const frontmatter = rulesyncRule.getFrontmatter();
65853
+ const isRoot = frontmatter.root ?? false;
65854
+ const subprojectPath = frontmatter.agentsmd?.subprojectPath;
65855
+ if (!global && !isRoot && subprojectPath) return new PoolRule({
65856
+ outputRoot,
65857
+ relativeDirPath: join(subprojectPath),
65858
+ relativeFilePath: AGENTSMD_RULE_FILE_NAME,
65859
+ fileContent: rulesyncRule.getBody(),
65860
+ validate,
65861
+ root: false
65862
+ });
65863
+ return new PoolRule({
65864
+ outputRoot,
65865
+ relativeDirPath: root.relativeDirPath,
65866
+ relativeFilePath: root.relativeFilePath,
65867
+ fileContent: rulesyncRule.getBody(),
65868
+ validate,
65869
+ root: isRoot
65870
+ });
65871
+ }
65872
+ toRulesyncRule() {
65873
+ const subprojectPath = this.getSubprojectPath();
65874
+ if (subprojectPath === void 0) return this.toRulesyncRuleDefault();
65875
+ return this.toRulesyncRuleNestedAgentsmd({ subprojectPath });
65876
+ }
65877
+ validate() {
65878
+ return {
65879
+ success: true,
65880
+ error: null
65881
+ };
65882
+ }
65883
+ static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath }) {
65884
+ return new PoolRule({
65885
+ outputRoot,
65886
+ relativeDirPath,
65887
+ relativeFilePath,
65888
+ fileContent: "",
65889
+ validate: false,
65890
+ root: relativeFilePath === "AGENTS.md" && (relativeDirPath === "." || relativeDirPath === POOL_GLOBAL_DIR)
65891
+ });
65892
+ }
65893
+ static isTargetedByRulesyncRule(rulesyncRule) {
65894
+ return this.isTargetedByRulesyncRuleDefault({
65895
+ rulesyncRule,
65896
+ toolTarget: "pool"
65897
+ });
65898
+ }
65899
+ };
65900
+ //#endregion
65774
65901
  //#region src/features/rules/qwencode-rule.ts
65775
65902
  /**
65776
65903
  * Frontmatter schema for Qwen Code path-based context rules (`.qwen/rules/*.md`).
@@ -67410,6 +67537,15 @@ const toolRuleFactories = /* @__PURE__ */ new Map([
67410
67537
  supportsGlobal: true,
67411
67538
  ruleDiscoveryMode: "auto"
67412
67539
  }
67540
+ }],
67541
+ ["pool", {
67542
+ class: PoolRule,
67543
+ meta: {
67544
+ extension: "md",
67545
+ supportsGlobal: true,
67546
+ ruleDiscoveryMode: "auto",
67547
+ collisionPolicy: "fold"
67548
+ }
67413
67549
  }]
67414
67550
  ]);
67415
67551
  const allToolTargetKeys = [...toolRuleFactories.keys()];
@@ -70508,4 +70644,4 @@ async function importChecksCore(params) {
70508
70644
  //#endregion
70509
70645
  export { RulesyncCheck as $, ALL_TOOL_TARGETS as $t, CLAUDECODE_SKILLS_DIR_PATH as A, RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH as An, ensureDir as At, RulesyncSkill as B, quoteForLog as Bn, pathEscapesRoot as Bt, ChecksProcessor as C, RULESYNC_PERMISSIONS_FILE_NAME as Cn, applyFileMode as Ct, CLAUDECODE_LOCAL_RULE_FILE_NAME as D, RULESYNC_RELATIVE_DIR_PATH as Dn, checkPathTraversal as Dt, CLAUDECODE_DIR as E, RULESYNC_PERMISSIONS_SCHEMA_URL as En, assertWritablePathInsideRoot as Et, AUGMENTCODE_DIR as F, DEPRECATED_FEATURE_REPLACEMENTS as Fn, isFileSystemError as Ft, RulesyncMcp as G, removeFile as Gt, RulesyncRule as H, stripControlCharactersKeepingLineFeeds as Hn, readFileContentOrNull as Ht, AUGMENTCODE_SETTINGS_LOCAL_FILE_NAME as I, formatError as In, isSymlink as It, getRulesyncSourceCandidates as J, resolvePath as Jt, RulesyncIgnore as K, removeFileStrict as Kt, getLocalSkillDirNames as L, truncateText as Ln, listDirectoryEntryNames as Lt, FACTORYDROID_SETTINGS_LOCAL_FILE_NAME as M, parseCommaSeparatedList as Mn, getFileSize as Mt, caseFoldIdentity as N, ALL_FEATURES as Nn, getHomeDirectory as Nt, CLAUDECODE_MEMORIES_DIR_NAME as O, RULESYNC_RULES_RELATIVE_DIR_PATH as On, createTempDirectory as Ot, groupSpellingsByCaseFoldedIdentity as P, ALL_FEATURES_WITH_WILDCARD as Pn, isFileNotFoundError as Pt, RulesyncCommandFrontmatterSchema as Q, writeFileContent as Qt, RulesyncSubagent as R, hasDeceptiveHiddenCharacters as Rn, listFilePathsRecursively as Rt, QWENCODE_LOCAL_RULE_FILE_NAME as S, RULESYNC_NPM_SOURCES_LOCK_RELATIVE_FILE_PATH as Sn, ErrorCodes as St, CODEXCLI_DIR as T, RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH as Tn, assertTreeContainsNoSymlinks as Tt, RulesyncRuleFrontmatterSchema as U, stripHiddenCharacters as Un, removeDirectory as Ut, RulesyncSkillFrontmatterSchema as V, stripControlCharacters as Vn, readFileContent as Vt, RulesyncPermissions as W, removeDirectoryStrict as Wt, parseJsonc as X, toPosixPath as Xt, resolveRulesyncSourceWritePath as Y, runWithDirectoryRollback as Yt, RulesyncCommand as Z, writeFileBuffer as Zt, IgnoreProcessor as _, RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH as _n, warnOnConflictingFlags as _t, getProcessorRegistryEntry as a, RULESYNC_AIIGNORE_FILE_NAME as an, ConfigResolver as at, CommandsProcessor as b, RULESYNC_MCP_RELATIVE_FILE_PATH as bn, withWarnOnceScope as bt, RulesProcessor as c, RULESYNC_COMMANDS_RELATIVE_DIR_PATH as cn, CONFLICTING_TARGET_PAIRS as ct, CODEBUDDY_DIR as d, RULESYNC_CURATED_RULES_RELATIVE_DIR_PATH as dn, SourceEntrySchema as dt, ALL_TOOL_TARGETS_WITH_WILDCARD as en, RulesyncCheckFrontmatterSchema as et, CODEBUDDY_LOCAL_RULE_FILE_NAME as f, RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH as fn, findControlCharacter as ft, McpProcessor as g, RULESYNC_IGNORE_RELATIVE_FILE_PATH as gn, fallbackLogger as gt, shortenToWidth as h, RULESYNC_HOOKS_RELATIVE_FILE_PATH as hn, WarningCollectingLogger as ht, inspectInputRoots as i, MAX_FILE_SIZE as in, SKILL_FILE_NAME as it, FACTORYDROID_DIR as j, RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH as jn, fileExists as jt, CLAUDECODE_SETTINGS_LOCAL_FILE_NAME as k, RULESYNC_SKILLS_RELATIVE_DIR_PATH as kn, directoryExists as kt, SubagentsProcessor as l, RULESYNC_CONFIG_RELATIVE_FILE_PATH as ln, ConfigFileSchema as lt, displayWidthOf as m, RULESYNC_HOOKS_LEGACY_FILE_NAME as mn, JsonLogger as mt, formatSourceLoadFailure as n, ToolTargetSchema as nn, loadYaml as nt, convertFromTool as o, RULESYNC_AIIGNORE_RELATIVE_FILE_PATH as on, mergeInputRootConfigs as ot, ELLIPSIS_WIDTH as p, RULESYNC_HOOKS_FILE_NAME as pn, ConsoleLogger as pt, RulesyncHooks as q, removeTempDirectory as qt, generate as r, CURATED_RULES_FEATURE_SUBDIR as rn, SHARED_USER_MANAGED_CONFIG_PATHS as rt, isPackagingToolTarget as s, RULESYNC_CHECKS_RELATIVE_DIR_PATH as sn, resolveEffectiveInputRoots as st, importFromTool as t, PACKAGING_TOOL_TARGETS as tn, stringifyFrontmatter as tt, SkillsProcessor as u, RULESYNC_CONFIG_SCHEMA_URL as un, GITIGNORE_DESTINATION_KEY as ut, CRUSH_LOCAL_RULE_FILE_NAME as v, RULESYNC_MCP_FILE_NAME as vn, withFallbackLoggerTarget as vt, CODEXCLI_BASH_RULES_FILE_NAME as w, RULESYNC_PERMISSIONS_LEGACY_FILE_NAME as wn, assertDirectoryIfExists as wt, QWENCODE_DIR as x, RULESYNC_MCP_SCHEMA_URL as xn, CLIError as xt, HooksProcessor as y, RULESYNC_MCP_LEGACY_FILE_NAME as yn, resetRunWarningState as yt, RulesyncSubagentFrontmatterSchema as z, hasEnclosingMarkOutsideKeycap as zn, listSubdirectoryNames as zt };
70510
70646
 
70511
- //# sourceMappingURL=import-BNh_gCUr.js.map
70647
+ //# sourceMappingURL=import-B4xSMKr-.js.map