rulesync 42.0.0 → 43.1.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.
@@ -382,36 +382,36 @@ function formatError(error) {
382
382
  return boundErrorMessage(String(error));
383
383
  }
384
384
  // src/constants/rulesync-paths.ts
385
- const { join: join$385 } = node_path.posix;
385
+ const { join: join$384 } = node_path.posix;
386
386
  const RULESYNC_CONFIG_RELATIVE_FILE_PATH = "rulesync.jsonc";
387
387
  const RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH = "rulesync.local.jsonc";
388
388
  const RULESYNC_USER_CONFIG_DIR_NAME = "rulesync";
389
389
  const RULESYNC_XDG_CONFIG_HOME_DEFAULT_DIR_NAME = ".config";
390
390
  const RULESYNC_RELATIVE_DIR_PATH = ".rulesync";
391
391
  const RULES_FEATURE_SUBDIR = "rules";
392
- const CURATED_RULES_FEATURE_SUBDIR = join$385(RULES_FEATURE_SUBDIR, ".curated");
392
+ const CURATED_RULES_FEATURE_SUBDIR = join$384(RULES_FEATURE_SUBDIR, ".curated");
393
393
  const COMMANDS_FEATURE_SUBDIR = "commands";
394
394
  const SUBAGENTS_FEATURE_SUBDIR = "subagents";
395
395
  const CHECKS_FEATURE_SUBDIR = "checks";
396
396
  const SKILLS_FEATURE_SUBDIR = "skills";
397
- const CURATED_SKILLS_FEATURE_SUBDIR = join$385(SKILLS_FEATURE_SUBDIR, ".curated");
398
- const RULESYNC_RULES_RELATIVE_DIR_PATH = join$385(RULESYNC_RELATIVE_DIR_PATH, RULES_FEATURE_SUBDIR);
399
- const RULESYNC_CURATED_RULES_RELATIVE_DIR_PATH = join$385(RULESYNC_RELATIVE_DIR_PATH, CURATED_RULES_FEATURE_SUBDIR);
400
- const RULESYNC_COMMANDS_RELATIVE_DIR_PATH = join$385(RULESYNC_RELATIVE_DIR_PATH, COMMANDS_FEATURE_SUBDIR);
401
- const RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH = join$385(RULESYNC_RELATIVE_DIR_PATH, SUBAGENTS_FEATURE_SUBDIR);
402
- const RULESYNC_CHECKS_RELATIVE_DIR_PATH = join$385(RULESYNC_RELATIVE_DIR_PATH, CHECKS_FEATURE_SUBDIR);
403
- const RULESYNC_MCP_RELATIVE_FILE_PATH = join$385(RULESYNC_RELATIVE_DIR_PATH, "mcp.jsonc");
404
- const RULESYNC_HOOKS_RELATIVE_FILE_PATH = join$385(RULESYNC_RELATIVE_DIR_PATH, "hooks.jsonc");
405
- const RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH = join$385(RULESYNC_RELATIVE_DIR_PATH, "permissions.jsonc");
406
- join$385(RULESYNC_RELATIVE_DIR_PATH, "mcp.json");
407
- const RULESYNC_HOOKS_LEGACY_RELATIVE_FILE_PATH = join$385(RULESYNC_RELATIVE_DIR_PATH, "hooks.json");
408
- const RULESYNC_PERMISSIONS_LEGACY_RELATIVE_FILE_PATH = join$385(RULESYNC_RELATIVE_DIR_PATH, "permissions.json");
397
+ const CURATED_SKILLS_FEATURE_SUBDIR = join$384(SKILLS_FEATURE_SUBDIR, ".curated");
398
+ const RULESYNC_RULES_RELATIVE_DIR_PATH = join$384(RULESYNC_RELATIVE_DIR_PATH, RULES_FEATURE_SUBDIR);
399
+ const RULESYNC_CURATED_RULES_RELATIVE_DIR_PATH = join$384(RULESYNC_RELATIVE_DIR_PATH, CURATED_RULES_FEATURE_SUBDIR);
400
+ const RULESYNC_COMMANDS_RELATIVE_DIR_PATH = join$384(RULESYNC_RELATIVE_DIR_PATH, COMMANDS_FEATURE_SUBDIR);
401
+ const RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH = join$384(RULESYNC_RELATIVE_DIR_PATH, SUBAGENTS_FEATURE_SUBDIR);
402
+ const RULESYNC_CHECKS_RELATIVE_DIR_PATH = join$384(RULESYNC_RELATIVE_DIR_PATH, CHECKS_FEATURE_SUBDIR);
403
+ const RULESYNC_MCP_RELATIVE_FILE_PATH = join$384(RULESYNC_RELATIVE_DIR_PATH, "mcp.jsonc");
404
+ const RULESYNC_HOOKS_RELATIVE_FILE_PATH = join$384(RULESYNC_RELATIVE_DIR_PATH, "hooks.jsonc");
405
+ const RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH = join$384(RULESYNC_RELATIVE_DIR_PATH, "permissions.jsonc");
406
+ join$384(RULESYNC_RELATIVE_DIR_PATH, "mcp.json");
407
+ const RULESYNC_HOOKS_LEGACY_RELATIVE_FILE_PATH = join$384(RULESYNC_RELATIVE_DIR_PATH, "hooks.json");
408
+ const RULESYNC_PERMISSIONS_LEGACY_RELATIVE_FILE_PATH = join$384(RULESYNC_RELATIVE_DIR_PATH, "permissions.json");
409
409
  const RULESYNC_AIIGNORE_FILE_NAME = ".aiignore";
410
- const RULESYNC_AIIGNORE_RELATIVE_FILE_PATH = join$385(RULESYNC_RELATIVE_DIR_PATH, ".aiignore");
410
+ const RULESYNC_AIIGNORE_RELATIVE_FILE_PATH = join$384(RULESYNC_RELATIVE_DIR_PATH, ".aiignore");
411
411
  const RULESYNC_IGNORE_RELATIVE_FILE_PATH = ".rulesyncignore";
412
412
  const RULESYNC_OVERVIEW_FILE_NAME = "overview.md";
413
- const RULESYNC_SKILLS_RELATIVE_DIR_PATH = join$385(RULESYNC_RELATIVE_DIR_PATH, SKILLS_FEATURE_SUBDIR);
414
- const RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH = join$385(RULESYNC_RELATIVE_DIR_PATH, CURATED_SKILLS_FEATURE_SUBDIR);
413
+ const RULESYNC_SKILLS_RELATIVE_DIR_PATH = join$384(RULESYNC_RELATIVE_DIR_PATH, SKILLS_FEATURE_SUBDIR);
414
+ const RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH = join$384(RULESYNC_RELATIVE_DIR_PATH, CURATED_SKILLS_FEATURE_SUBDIR);
415
415
  const RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH = "rulesync.lock";
416
416
  const RULESYNC_NPM_SOURCES_LOCK_RELATIVE_FILE_PATH = "rulesync-npm.lock.json";
417
417
  const RULESYNC_MCP_FILE_NAME = "mcp.jsonc";
@@ -15874,6 +15874,7 @@ const AMP_GLOBAL_DIR = (0, node_path.join)(".config", "amp");
15874
15874
  const AMP_AGENTS_DIR = ".agents";
15875
15875
  const AMP_SKILLS_PROJECT_DIR = (0, node_path.join)(AMP_AGENTS_DIR, "skills");
15876
15876
  const AMP_SKILLS_GLOBAL_DIR = (0, node_path.join)(".config", "agents", "skills");
15877
+ const AMP_SKILLS_NATIVE_GLOBAL_DIR = (0, node_path.join)(AMP_GLOBAL_DIR, "skills");
15877
15878
  const AMP_CHECKS_PROJECT_DIR = (0, node_path.join)(AMP_AGENTS_DIR, "checks");
15878
15879
  const AMP_CHECKS_GLOBAL_DIR = (0, node_path.join)(AMP_GLOBAL_DIR, "checks");
15879
15880
  const AMP_PLUGINS_PROJECT_DIR = (0, node_path.join)(AMP_DIR, "plugins");
@@ -15894,10 +15895,15 @@ function toolSkillSearchRoots(paths) {
15894
15895
  * non-conformant — skills are the most likely to live here, so every tool that
15895
15896
  * scans one of these roots imports it leniently (skip-and-warn per skill), per
15896
15897
  * the Agent Skills client-implementation guide, while keeping fail-fast
15897
- * behavior for its own native root.
15898
+ * behavior for its own native root. Amp's read-only global discovery root
15899
+ * `~/.config/amp/skills/` follows the same skip-and-warn rule.
15898
15900
  * https://agentskills.io/client-implementation/adding-skills-support
15899
15901
  */
15900
- const AGENT_SKILLS_INTEROP_ROOTS = /* @__PURE__ */ new Set([toPosixPath(AGENTSMD_SKILLS_DIR_PATH), toPosixPath(AMP_SKILLS_GLOBAL_DIR)]);
15902
+ const AGENT_SKILLS_INTEROP_ROOTS = /* @__PURE__ */ new Set([
15903
+ toPosixPath(AGENTSMD_SKILLS_DIR_PATH),
15904
+ toPosixPath(AMP_SKILLS_GLOBAL_DIR),
15905
+ toPosixPath(AMP_SKILLS_NATIVE_GLOBAL_DIR)
15906
+ ]);
15901
15907
  /**
15902
15908
  * The one spec violation both sides of the conversion report. Generation warns
15903
15909
  * about it before writing the file; import warns about it because a conformant
@@ -25007,7 +25013,9 @@ const AmpSkillFrontmatterSchema = zod_mini.z.looseObject({
25007
25013
  *
25008
25014
  * Amp natively reads Agent Skills following the open standard: a directory with a
25009
25015
  * `SKILL.md` carrying `name`/`description` frontmatter, scoped to the project
25010
- * (`.agents/skills/`) and user-wide (`~/.config/agents/skills/`).
25016
+ * (`.agents/skills/`) and user-wide (`~/.config/agents/skills/`). Global import
25017
+ * also reads `~/.agents/skills/` and `~/.config/amp/skills/`, in that order,
25018
+ * without managing either discovery root on generation or deletion.
25011
25019
  * @see https://ampcode.com/docs/customize/skills
25012
25020
  */
25013
25021
  var AmpSkill = class AmpSkill extends ToolSkill {
@@ -25032,7 +25040,7 @@ var AmpSkill = class AmpSkill extends ToolSkill {
25032
25040
  static getSettablePaths({ global = false } = {}) {
25033
25041
  return {
25034
25042
  relativeDirPath: global ? AMP_SKILLS_GLOBAL_DIR : AMP_SKILLS_PROJECT_DIR,
25035
- ...global && { importOnlySkillRoots: [AGENTSMD_SKILLS_DIR_PATH, (0, node_path.join)(AMP_GLOBAL_DIR, "skills")] }
25043
+ ...global && { importOnlySkillRoots: [AGENTSMD_SKILLS_DIR_PATH, AMP_SKILLS_NATIVE_GLOBAL_DIR] }
25036
25044
  };
25037
25045
  }
25038
25046
  getFrontmatter() {
@@ -15852,6 +15852,7 @@ const AMP_GLOBAL_DIR = join(".config", "amp");
15852
15852
  const AMP_AGENTS_DIR = ".agents";
15853
15853
  const AMP_SKILLS_PROJECT_DIR = join(AMP_AGENTS_DIR, "skills");
15854
15854
  const AMP_SKILLS_GLOBAL_DIR = join(".config", "agents", "skills");
15855
+ const AMP_SKILLS_NATIVE_GLOBAL_DIR = join(AMP_GLOBAL_DIR, "skills");
15855
15856
  const AMP_CHECKS_PROJECT_DIR = join(AMP_AGENTS_DIR, "checks");
15856
15857
  const AMP_CHECKS_GLOBAL_DIR = join(AMP_GLOBAL_DIR, "checks");
15857
15858
  const AMP_PLUGINS_PROJECT_DIR = join(AMP_DIR, "plugins");
@@ -15872,10 +15873,15 @@ function toolSkillSearchRoots(paths) {
15872
15873
  * non-conformant — skills are the most likely to live here, so every tool that
15873
15874
  * scans one of these roots imports it leniently (skip-and-warn per skill), per
15874
15875
  * the Agent Skills client-implementation guide, while keeping fail-fast
15875
- * behavior for its own native root.
15876
+ * behavior for its own native root. Amp's read-only global discovery root
15877
+ * `~/.config/amp/skills/` follows the same skip-and-warn rule.
15876
15878
  * https://agentskills.io/client-implementation/adding-skills-support
15877
15879
  */
15878
- const AGENT_SKILLS_INTEROP_ROOTS = /* @__PURE__ */ new Set([toPosixPath(AGENTSMD_SKILLS_DIR_PATH), toPosixPath(AMP_SKILLS_GLOBAL_DIR)]);
15880
+ const AGENT_SKILLS_INTEROP_ROOTS = /* @__PURE__ */ new Set([
15881
+ toPosixPath(AGENTSMD_SKILLS_DIR_PATH),
15882
+ toPosixPath(AMP_SKILLS_GLOBAL_DIR),
15883
+ toPosixPath(AMP_SKILLS_NATIVE_GLOBAL_DIR)
15884
+ ]);
15879
15885
  /**
15880
15886
  * The one spec violation both sides of the conversion report. Generation warns
15881
15887
  * about it before writing the file; import warns about it because a conformant
@@ -24985,7 +24991,9 @@ const AmpSkillFrontmatterSchema = z.looseObject({
24985
24991
  *
24986
24992
  * Amp natively reads Agent Skills following the open standard: a directory with a
24987
24993
  * `SKILL.md` carrying `name`/`description` frontmatter, scoped to the project
24988
- * (`.agents/skills/`) and user-wide (`~/.config/agents/skills/`).
24994
+ * (`.agents/skills/`) and user-wide (`~/.config/agents/skills/`). Global import
24995
+ * also reads `~/.agents/skills/` and `~/.config/amp/skills/`, in that order,
24996
+ * without managing either discovery root on generation or deletion.
24989
24997
  * @see https://ampcode.com/docs/customize/skills
24990
24998
  */
24991
24999
  var AmpSkill = class AmpSkill extends ToolSkill {
@@ -25010,7 +25018,7 @@ var AmpSkill = class AmpSkill extends ToolSkill {
25010
25018
  static getSettablePaths({ global = false } = {}) {
25011
25019
  return {
25012
25020
  relativeDirPath: global ? AMP_SKILLS_GLOBAL_DIR : AMP_SKILLS_PROJECT_DIR,
25013
- ...global && { importOnlySkillRoots: [AGENTSMD_SKILLS_DIR_PATH, join(AMP_GLOBAL_DIR, "skills")] }
25021
+ ...global && { importOnlySkillRoots: [AGENTSMD_SKILLS_DIR_PATH, AMP_SKILLS_NATIVE_GLOBAL_DIR] }
25014
25022
  };
25015
25023
  }
25016
25024
  getFrontmatter() {
@@ -106424,4 +106432,4 @@ async function importChecksCore(params) {
106424
106432
  }
106425
106433
  export { RulesyncPermissions as $, formatError as $n, isSymlink as $t, CODEBUDDY_DIR as A, MAX_FILE_SIZE as An, withFallbackLoggerTarget as At, CLAUDECODE_LOCAL_RULE_FILE_NAME as B, RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH as Bn, assertTreeContainsNoSymlinks as Bt, QWENCODE_LOCAL_RULE_FILE_NAME as C, PACKAGING_TOOL_TARGETS as Cn, getSourceTransport as Ct, FACTORYDROID_SETTINGS_LOCAL_FILE_NAME as D, DEPRECATED_FEATURE_REPLACEMENTS as Dn, WarningCollectingLogger as Dt, FACTORYDROID_DIR as E, ALL_FEATURES_WITH_WILDCARD as En, JsonLogger as Et, groupSpellingsByCaseFoldedIdentity as F, RULESYNC_CONFIG_SCHEMA_URL as Fn, PathOutsideRootError as Ft, toInstructionBudgetFile as G, RULESYNC_PERMISSIONS_SCHEMA_URL as Gn, ensureDir as Gt, CLAUDECODE_SETTINGS_LOCAL_FILE_NAME as H, RULESYNC_MCP_SCHEMA_URL as Hn, checkPathTraversal as Ht, CODEXCLI_BASH_RULES_FILE_NAME as I, RULESYNC_CURATED_RULES_RELATIVE_DIR_PATH as In, applyFileMode as It, RulesyncSubagentFrontmatterSchema as J, RULESYNC_SKILLS_RELATIVE_DIR_PATH as Jn, findFilesByGlobs as Jt, getLocalSkillDirNames as K, RULESYNC_RELATIVE_DIR_PATH as Kn, fileExists as Kt, CODEXCLI_DIR as L, RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH as Ln, assertDirectoryIfExists as Lt, AUGMENTCODE_DIR as M, RULESYNC_CHECKS_RELATIVE_DIR_PATH as Mn, withWarnOnceScope as Mt, AUGMENTCODE_SETTINGS_LOCAL_FILE_NAME as N, RULESYNC_COMMANDS_RELATIVE_DIR_PATH as Nn, CLIError as Nt, COMMANDCODE_DIR as O, CURATED_RULES_FEATURE_SUBDIR as On, fallbackLogger as Ot, caseFoldIdentity as P, RULESYNC_CONFIG_RELATIVE_FILE_PATH as Pn, ErrorCodes as Pt, RulesyncRuleFrontmatterSchema as Q, RULESYNC_XDG_CONFIG_HOME_DEFAULT_DIR_NAME as Qn, isFileSystemError as Qt, CLAUDECODE_AGENT_MEMORY_LOCAL_DIR_NAME as R, RULESYNC_HOOKS_RELATIVE_FILE_PATH as Rn, assertNoSymlinkBelowRoot as Rt, QWENCODE_DIR as S, ALL_TOOL_TARGETS_WITH_WILDCARD as Sn, assertTargetsFeaturesExclusive as St, LETTACODE_SETTINGS_LOCAL_FILE_NAME as T, ALL_FEATURES as Tn, ConsoleLogger as Tt, CLAUDECODE_SKILLS_DIR_PATH as U, RULESYNC_NPM_SOURCES_LOCK_RELATIVE_FILE_PATH as Un, createTempDirectory as Ut, CLAUDECODE_MEMORIES_DIR_NAME as V, RULESYNC_MCP_RELATIVE_FILE_PATH as Vn, assertWritablePathInsideRoot as Vt, findProjectInstructionBudgetFindings as W, RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH as Wn, directoryExists as Wt, RulesyncSkillFrontmatterSchema as X, RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH as Xn, getHomeDirectory as Xt, RulesyncSkill as Y, RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH as Yn, getFileSizeAndExecutableBit as Yt, RulesyncRule as Z, RULESYNC_USER_CONFIG_DIR_NAME as Zn, isFileNotFoundError as Zt, SubagentsProcessor as _, toPosixPath as _n, resolveEffectiveInputRoots as _t, convertFromTool as a, readFileContent as an, stripControlCharactersKeepingLineFeeds as ar, parseJsonc as at, CommandsProcessor as b, mapWithConcurrency as bn, GITIGNORE_DESTINATION_KEY as bt, parseCommaSeparatedList as c, removeDirectoryStrict as cn, RulesyncCheck as ct, shortenToWidth as d, removeFileWithoutFollowingSymlinks as dn, loadYaml as dt, listDirectoryEntryNames as en, truncateText as er, RulesyncMcp as et, McpProcessor as f, removeTempDirectory as fn, isRecord as ft, RulesProcessor as g, splitPathSegments as gn, mergeInputRootConfigs as gt, ChecksProcessor as h, runWithDirectoryRollback as hn, ConfigResolver as ht, inspectInputRoots as i, posixRelativePathEscapesRoot as in, stripControlCharacters as ir, resolveRulesyncSourceWritePath as it, CODEBUDDY_LOCAL_RULE_FILE_NAME as j, RULESYNC_AIIGNORE_RELATIVE_FILE_PATH as jn, resetRunWarningState as jt, COMMANDCODE_SETTINGS_LOCAL_FILE_NAME as k, FEATURE_SOURCE_TREE_ENTRIES as kn, warnOnConflictingFlags as kt, ELLIPSIS_WIDTH as l, removeFile as ln, RulesyncCheckFrontmatterSchema as lt, HooksProcessor as m, resolvedRelativePath as mn, SKILL_FILE_NAME as mt, formatSourceLoadFailure as n, listSubdirectoryNames as nn, hasEnclosingMarkOutsideKeycap as nr, RulesyncHooks as nt, isPackagingToolTarget as o, readFileContentOrNull as on, stripControlCharactersKeepingLineFeedsAndTabs as or, RulesyncCommand as ot, IgnoreProcessor as p, resolvePath as pn, SHARED_USER_MANAGED_CONFIG_PATHS as pt, RulesyncSubagent as q, RULESYNC_RULES_RELATIVE_DIR_PATH as qn, fileExistsStrict as qt, generate as r, pathEscapesRoot as rn, quoteForLog as rr, getRulesyncSourceCandidates as rt, getProcessorRegistryEntry as s, removeDirectory as sn, stripHiddenCharacters as sr, RulesyncCommandFrontmatterSchema as st, importFromTool as t, listFilePathsRecursively as tn, hasDeceptiveHiddenCharacters as tr, RulesyncIgnore as tt, displayWidthOf as u, removeFileStrict as un, stringifyFrontmatter as ut, SkillsProcessor as v, writeFileBuffer as vn, CONFLICTING_TARGET_PAIRS as vt, LETTACODE_DIR as w, ToolTargetSchema as wn, findControlCharacter as wt, REASONIX_LOCAL_RULE_FILE_NAME as x, ALL_TOOL_TARGETS as xn, SourceEntrySchema as xt, CRUSH_LOCAL_RULE_FILE_NAME as y, writeFileContent as yn, ConfigFileSchema as yt, CLAUDECODE_DIR as z, RULESYNC_IGNORE_RELATIVE_FILE_PATH as zn, assertPathResolvesInsideRoot as zt };
106426
106434
 
106427
- //# sourceMappingURL=import-CZ3fV0IY.js.map
106435
+ //# sourceMappingURL=import-DdmJUW78.js.map