rulesync 16.24.0 → 16.24.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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const require_import = require("../import-C0WSCbU9.cjs");
2
+ const require_import = require("../import-CI0pN6s5.cjs");
3
3
  let commander = require("commander");
4
4
  let zod_mini = require("zod/mini");
5
5
  let node_fs_promises = require("node:fs/promises");
@@ -6386,16 +6386,18 @@ async function applySkillSelection(params) {
6386
6386
  }
6387
6387
  }
6388
6388
  selectedSkills = requestedSkills;
6389
- if (interactive) if (availableSkills.length === 0) {
6390
- logger.warn("No skills found in the source repository to select from.");
6391
- selectedSkills = [];
6392
- } else {
6393
- selectedSkills = await promptSkillSelection({
6394
- availableSkills,
6395
- preselectedSkills: requestedSkills,
6396
- localSkillNames
6397
- });
6398
- if (selectedSkills.length === 0) logger.warn("No skills were selected in the interactive prompt; skipping all skills.");
6389
+ if (interactive) {
6390
+ if (availableSkills.length === 0) {
6391
+ logger.warn("No skills found in the source repository to select from.");
6392
+ selectedSkills = [];
6393
+ } else {
6394
+ selectedSkills = await promptSkillSelection({
6395
+ availableSkills,
6396
+ preselectedSkills: requestedSkills,
6397
+ localSkillNames
6398
+ });
6399
+ if (selectedSkills.length === 0) logger.warn("No skills were selected in the interactive prompt; skipping all skills.");
6400
+ }
6399
6401
  }
6400
6402
  }
6401
6403
  const selectedSet = new Set(selectedSkills);
@@ -9399,9 +9401,11 @@ async function collectPrimitiveDeployments(params) {
9399
9401
  */
9400
9402
  function assertFrozenContentHashMatches(params) {
9401
9403
  const { frozen, locked, contentHash, repoUrl, logger } = params;
9402
- if (frozen && locked?.content_hash) if (RULESYNC_CONTENT_HASH_REGEX$1.test(locked.content_hash)) {
9403
- if (locked.content_hash !== contentHash) throw new Error(`content_hash mismatch for ${repoUrl}: lock=${locked.content_hash} computed=${contentHash}. Refuse to trust the deployment under --frozen.`);
9404
- } else logger.debug(`Skipping content_hash integrity check for ${repoUrl}: recorded hash "${locked.content_hash}" was not written by rulesync.`);
9404
+ if (frozen && locked?.content_hash) {
9405
+ if (RULESYNC_CONTENT_HASH_REGEX$1.test(locked.content_hash)) {
9406
+ if (locked.content_hash !== contentHash) throw new Error(`content_hash mismatch for ${repoUrl}: lock=${locked.content_hash} computed=${contentHash}. Refuse to trust the deployment under --frozen.`);
9407
+ } else logger.debug(`Skipping content_hash integrity check for ${repoUrl}: recorded hash "${locked.content_hash}" was not written by rulesync.`);
9408
+ }
9405
9409
  }
9406
9410
  /**
9407
9411
  * SHA-256 over a canonical, order-independent representation of the deployed
@@ -10107,9 +10111,11 @@ async function buildSkillDeployment(params) {
10107
10111
  */
10108
10112
  function assertFrozenSkillIntegrity(params) {
10109
10113
  const { frozen, locked, contentHash, sourceKey, skillName, agent, scope, logger } = params;
10110
- if (frozen && locked?.content_hash) if (RULESYNC_CONTENT_HASH_REGEX.test(locked.content_hash)) {
10111
- if (locked.content_hash !== contentHash) throw new Error(`content_hash mismatch for ${sourceKey} skill "${skillName}" (agent=${agent}, scope=${scope}): lock=${locked.content_hash} computed=${contentHash}. Refuse to trust the deployment under --frozen.`);
10112
- } else logger.debug(`Skipping content_hash integrity check for ${sourceKey} skill "${skillName}": recorded hash "${locked.content_hash}" was not written by rulesync.`);
10114
+ if (frozen && locked?.content_hash) {
10115
+ if (RULESYNC_CONTENT_HASH_REGEX.test(locked.content_hash)) {
10116
+ if (locked.content_hash !== contentHash) throw new Error(`content_hash mismatch for ${sourceKey} skill "${skillName}" (agent=${agent}, scope=${scope}): lock=${locked.content_hash} computed=${contentHash}. Refuse to trust the deployment under --frozen.`);
10117
+ } else logger.debug(`Skipping content_hash integrity check for ${sourceKey} skill "${skillName}": recorded hash "${locked.content_hash}" was not written by rulesync.`);
10118
+ }
10113
10119
  }
10114
10120
  async function removeStaleFile(params) {
10115
10121
  const { relativePath, scope, projectRoot, logger } = params;
@@ -12803,7 +12809,7 @@ function wrapCommand$1({ name, errorCode, handler, getVersion, loggerFactory = c
12803
12809
  }
12804
12810
  //#endregion
12805
12811
  //#region src/cli/program.ts
12806
- const getVersion = () => "16.24.0";
12812
+ const getVersion = () => "16.24.1";
12807
12813
  const FEATURES_HELP = `${require_import.ALL_FEATURES.join(",")}; ignore is deprecated, use permissions`;
12808
12814
  function wrapCommand(name, errorCode, handler) {
12809
12815
  return wrapCommand$1({
package/dist/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $ as RulesyncCheckFrontmatterSchema, $t as ALL_TOOL_TARGETS_WITH_WILDCARD, A as FACTORYDROID_DIR, An as RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, At as fileExists, B as RulesyncSkillFrontmatterSchema, Bn as stripControlCharacters, Bt as readFileContent, C as CODEXCLI_BASH_RULES_FILE_NAME, Cn as RULESYNC_PERMISSIONS_LEGACY_FILE_NAME, Ct as assertDirectoryIfExists, D as CLAUDECODE_MEMORIES_DIR_NAME, Dn as RULESYNC_RULES_RELATIVE_DIR_PATH, Dt as createTempDirectory, E as CLAUDECODE_LOCAL_RULE_FILE_NAME, En as RULESYNC_RELATIVE_DIR_PATH, Et as checkPathTraversal, F as AUGMENTCODE_SETTINGS_LOCAL_FILE_NAME, Fn as formatError, Ft as isSymlink, G as RulesyncIgnore, Gt as removeFileStrict, H as RulesyncRuleFrontmatterSchema, Hn as stripHiddenCharacters, Ht as removeDirectory, I as getLocalSkillDirNames, In as truncateText, It as listDirectoryEntryNames, J as resolveRulesyncSourceWritePath, Jt as runWithDirectoryRollback, K as RulesyncHooks, Kt as removeTempDirectory, L as RulesyncSubagent, Ln as hasDeceptiveHiddenCharacters, Lt as listFilePathsRecursively, M as caseFoldIdentity, Mn as ALL_FEATURES, Mt as getHomeDirectory, N as groupSpellingsByCaseFoldedIdentity, Nn as ALL_FEATURES_WITH_WILDCARD, Nt as isFileNotFoundError, O as CLAUDECODE_SETTINGS_LOCAL_FILE_NAME, On as RULESYNC_SKILLS_RELATIVE_DIR_PATH, Ot as directoryExists, P as AUGMENTCODE_DIR, Pn as DEPRECATED_FEATURE_REPLACEMENTS, Pt as isFileSystemError, Q as RulesyncCheck, Qt as ALL_TOOL_TARGETS, R as RulesyncSubagentFrontmatterSchema, Rn as hasEnclosingMarkOutsideKeycap, Rt as listSubdirectoryNames, S as ChecksProcessor, Sn as RULESYNC_PERMISSIONS_FILE_NAME, St as applyFileMode, T as CLAUDECODE_DIR, Tn as RULESYNC_PERMISSIONS_SCHEMA_URL, Tt as assertWritablePathInsideRoot, U as RulesyncPermissions, Ut as removeDirectoryStrict, V as RulesyncRule, Vn as stripControlCharactersKeepingLineFeeds, Vt as readFileContentOrNull, W as RulesyncMcp, Wt as removeFile, X as RulesyncCommand, Xt as writeFileBuffer, Y as parseJsonc, Yt as toPosixPath, Z as RulesyncCommandFrontmatterSchema, Zt as writeFileContent, _ as IgnoreProcessor, _n as RULESYNC_MCP_FILE_NAME, _t as withFallbackLoggerTarget, a as getProcessorRegistryEntry, an as RULESYNC_AIIGNORE_RELATIVE_FILE_PATH, at as mergeInputRootConfigs, b as QWENCODE_DIR, bn as RULESYNC_MCP_SCHEMA_URL, bt as CLIError, c as RulesProcessor, cn as RULESYNC_CONFIG_RELATIVE_FILE_PATH, ct as ConfigFileSchema, d as CODEBUDDY_DIR, dn as RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH, dt as findControlCharacter, en as PACKAGING_TOOL_TARGETS, et as stringifyFrontmatter, f as CODEBUDDY_LOCAL_RULE_FILE_NAME, fn as RULESYNC_HOOKS_FILE_NAME, ft as ConsoleLogger, g as McpProcessor, gn as RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH, gt as warnOnConflictingFlags, h as shortenToWidth, hn as RULESYNC_IGNORE_RELATIVE_FILE_PATH, ht as fallbackLogger, i as inspectInputRoots, in as RULESYNC_AIIGNORE_FILE_NAME, it as ConfigResolver, j as FACTORYDROID_SETTINGS_LOCAL_FILE_NAME, jn as parseCommaSeparatedList, jt as getFileSize, k as CLAUDECODE_SKILLS_DIR_PATH, kn as RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH, kt as ensureDir, l as SubagentsProcessor, ln as RULESYNC_CONFIG_SCHEMA_URL, lt as GITIGNORE_DESTINATION_KEY, m as displayWidthOf, mn as RULESYNC_HOOKS_RELATIVE_FILE_PATH, mt as WarningCollectingLogger, n as formatSourceLoadFailure, nn as CURATED_RULES_FEATURE_SUBDIR, nt as SHARED_USER_MANAGED_CONFIG_PATHS, o as convertFromTool, on as RULESYNC_CHECKS_RELATIVE_DIR_PATH, ot as resolveEffectiveInputRoots, p as ELLIPSIS_WIDTH, pn as RULESYNC_HOOKS_LEGACY_FILE_NAME, pt as JsonLogger, q as getRulesyncSourceCandidates, qt as resolvePath, r as generate, rn as MAX_FILE_SIZE, rt as SKILL_FILE_NAME$1, s as isPackagingToolTarget, sn as RULESYNC_COMMANDS_RELATIVE_DIR_PATH, st as CONFLICTING_TARGET_PAIRS, t as importFromTool, tn as ToolTargetSchema, tt as loadYaml, u as SkillsProcessor, un as RULESYNC_CURATED_RULES_RELATIVE_DIR_PATH, ut as SourceEntrySchema, v as HooksProcessor, vn as RULESYNC_MCP_LEGACY_FILE_NAME, vt as resetRunWarningState, w as CODEXCLI_DIR, wn as RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH, wt as assertTreeContainsNoSymlinks, x as QWENCODE_LOCAL_RULE_FILE_NAME, xn as RULESYNC_NPM_SOURCES_LOCK_RELATIVE_FILE_PATH, xt as ErrorCodes, y as CommandsProcessor, yn as RULESYNC_MCP_RELATIVE_FILE_PATH, yt as withWarnOnceScope, z as RulesyncSkill, zn as quoteForLog, zt as pathEscapesRoot } from "../import-DyWRanf6.js";
2
+ import { $ as RulesyncCheckFrontmatterSchema, $t as ALL_TOOL_TARGETS_WITH_WILDCARD, A as FACTORYDROID_DIR, An as RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, At as fileExists, B as RulesyncSkillFrontmatterSchema, Bn as stripControlCharacters, Bt as readFileContent, C as CODEXCLI_BASH_RULES_FILE_NAME, Cn as RULESYNC_PERMISSIONS_LEGACY_FILE_NAME, Ct as assertDirectoryIfExists, D as CLAUDECODE_MEMORIES_DIR_NAME, Dn as RULESYNC_RULES_RELATIVE_DIR_PATH, Dt as createTempDirectory, E as CLAUDECODE_LOCAL_RULE_FILE_NAME, En as RULESYNC_RELATIVE_DIR_PATH, Et as checkPathTraversal, F as AUGMENTCODE_SETTINGS_LOCAL_FILE_NAME, Fn as formatError, Ft as isSymlink, G as RulesyncIgnore, Gt as removeFileStrict, H as RulesyncRuleFrontmatterSchema, Hn as stripHiddenCharacters, Ht as removeDirectory, I as getLocalSkillDirNames, In as truncateText, It as listDirectoryEntryNames, J as resolveRulesyncSourceWritePath, Jt as runWithDirectoryRollback, K as RulesyncHooks, Kt as removeTempDirectory, L as RulesyncSubagent, Ln as hasDeceptiveHiddenCharacters, Lt as listFilePathsRecursively, M as caseFoldIdentity, Mn as ALL_FEATURES, Mt as getHomeDirectory, N as groupSpellingsByCaseFoldedIdentity, Nn as ALL_FEATURES_WITH_WILDCARD, Nt as isFileNotFoundError, O as CLAUDECODE_SETTINGS_LOCAL_FILE_NAME, On as RULESYNC_SKILLS_RELATIVE_DIR_PATH, Ot as directoryExists, P as AUGMENTCODE_DIR, Pn as DEPRECATED_FEATURE_REPLACEMENTS, Pt as isFileSystemError, Q as RulesyncCheck, Qt as ALL_TOOL_TARGETS, R as RulesyncSubagentFrontmatterSchema, Rn as hasEnclosingMarkOutsideKeycap, Rt as listSubdirectoryNames, S as ChecksProcessor, Sn as RULESYNC_PERMISSIONS_FILE_NAME, St as applyFileMode, T as CLAUDECODE_DIR, Tn as RULESYNC_PERMISSIONS_SCHEMA_URL, Tt as assertWritablePathInsideRoot, U as RulesyncPermissions, Ut as removeDirectoryStrict, V as RulesyncRule, Vn as stripControlCharactersKeepingLineFeeds, Vt as readFileContentOrNull, W as RulesyncMcp, Wt as removeFile, X as RulesyncCommand, Xt as writeFileBuffer, Y as parseJsonc, Yt as toPosixPath, Z as RulesyncCommandFrontmatterSchema, Zt as writeFileContent, _ as IgnoreProcessor, _n as RULESYNC_MCP_FILE_NAME, _t as withFallbackLoggerTarget, a as getProcessorRegistryEntry, an as RULESYNC_AIIGNORE_RELATIVE_FILE_PATH, at as mergeInputRootConfigs, b as QWENCODE_DIR, bn as RULESYNC_MCP_SCHEMA_URL, bt as CLIError, c as RulesProcessor, cn as RULESYNC_CONFIG_RELATIVE_FILE_PATH, ct as ConfigFileSchema, d as CODEBUDDY_DIR, dn as RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH, dt as findControlCharacter, en as PACKAGING_TOOL_TARGETS, et as stringifyFrontmatter, f as CODEBUDDY_LOCAL_RULE_FILE_NAME, fn as RULESYNC_HOOKS_FILE_NAME, ft as ConsoleLogger, g as McpProcessor, gn as RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH, gt as warnOnConflictingFlags, h as shortenToWidth, hn as RULESYNC_IGNORE_RELATIVE_FILE_PATH, ht as fallbackLogger, i as inspectInputRoots, in as RULESYNC_AIIGNORE_FILE_NAME, it as ConfigResolver, j as FACTORYDROID_SETTINGS_LOCAL_FILE_NAME, jn as parseCommaSeparatedList, jt as getFileSize, k as CLAUDECODE_SKILLS_DIR_PATH, kn as RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH, kt as ensureDir, l as SubagentsProcessor, ln as RULESYNC_CONFIG_SCHEMA_URL, lt as GITIGNORE_DESTINATION_KEY, m as displayWidthOf, mn as RULESYNC_HOOKS_RELATIVE_FILE_PATH, mt as WarningCollectingLogger, n as formatSourceLoadFailure, nn as CURATED_RULES_FEATURE_SUBDIR, nt as SHARED_USER_MANAGED_CONFIG_PATHS, o as convertFromTool, on as RULESYNC_CHECKS_RELATIVE_DIR_PATH, ot as resolveEffectiveInputRoots, p as ELLIPSIS_WIDTH, pn as RULESYNC_HOOKS_LEGACY_FILE_NAME, pt as JsonLogger, q as getRulesyncSourceCandidates, qt as resolvePath, r as generate, rn as MAX_FILE_SIZE, rt as SKILL_FILE_NAME$1, s as isPackagingToolTarget, sn as RULESYNC_COMMANDS_RELATIVE_DIR_PATH, st as CONFLICTING_TARGET_PAIRS, t as importFromTool, tn as ToolTargetSchema, tt as loadYaml, u as SkillsProcessor, un as RULESYNC_CURATED_RULES_RELATIVE_DIR_PATH, ut as SourceEntrySchema, v as HooksProcessor, vn as RULESYNC_MCP_LEGACY_FILE_NAME, vt as resetRunWarningState, w as CODEXCLI_DIR, wn as RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH, wt as assertTreeContainsNoSymlinks, x as QWENCODE_LOCAL_RULE_FILE_NAME, xn as RULESYNC_NPM_SOURCES_LOCK_RELATIVE_FILE_PATH, xt as ErrorCodes, y as CommandsProcessor, yn as RULESYNC_MCP_RELATIVE_FILE_PATH, yt as withWarnOnceScope, z as RulesyncSkill, zn as quoteForLog, zt as pathEscapesRoot } from "../import-DL8paEMP.js";
3
3
  import { Command } from "commander";
4
4
  import { nonnegative, optional, refine, z } from "zod/mini";
5
5
  import { cp, lstat, mkdtemp, readdir, realpath, rm, rmdir, stat } from "node:fs/promises";
@@ -6383,16 +6383,18 @@ async function applySkillSelection(params) {
6383
6383
  }
6384
6384
  }
6385
6385
  selectedSkills = requestedSkills;
6386
- if (interactive) if (availableSkills.length === 0) {
6387
- logger.warn("No skills found in the source repository to select from.");
6388
- selectedSkills = [];
6389
- } else {
6390
- selectedSkills = await promptSkillSelection({
6391
- availableSkills,
6392
- preselectedSkills: requestedSkills,
6393
- localSkillNames
6394
- });
6395
- if (selectedSkills.length === 0) logger.warn("No skills were selected in the interactive prompt; skipping all skills.");
6386
+ if (interactive) {
6387
+ if (availableSkills.length === 0) {
6388
+ logger.warn("No skills found in the source repository to select from.");
6389
+ selectedSkills = [];
6390
+ } else {
6391
+ selectedSkills = await promptSkillSelection({
6392
+ availableSkills,
6393
+ preselectedSkills: requestedSkills,
6394
+ localSkillNames
6395
+ });
6396
+ if (selectedSkills.length === 0) logger.warn("No skills were selected in the interactive prompt; skipping all skills.");
6397
+ }
6396
6398
  }
6397
6399
  }
6398
6400
  const selectedSet = new Set(selectedSkills);
@@ -9396,9 +9398,11 @@ async function collectPrimitiveDeployments(params) {
9396
9398
  */
9397
9399
  function assertFrozenContentHashMatches(params) {
9398
9400
  const { frozen, locked, contentHash, repoUrl, logger } = params;
9399
- if (frozen && locked?.content_hash) if (RULESYNC_CONTENT_HASH_REGEX$1.test(locked.content_hash)) {
9400
- if (locked.content_hash !== contentHash) throw new Error(`content_hash mismatch for ${repoUrl}: lock=${locked.content_hash} computed=${contentHash}. Refuse to trust the deployment under --frozen.`);
9401
- } else logger.debug(`Skipping content_hash integrity check for ${repoUrl}: recorded hash "${locked.content_hash}" was not written by rulesync.`);
9401
+ if (frozen && locked?.content_hash) {
9402
+ if (RULESYNC_CONTENT_HASH_REGEX$1.test(locked.content_hash)) {
9403
+ if (locked.content_hash !== contentHash) throw new Error(`content_hash mismatch for ${repoUrl}: lock=${locked.content_hash} computed=${contentHash}. Refuse to trust the deployment under --frozen.`);
9404
+ } else logger.debug(`Skipping content_hash integrity check for ${repoUrl}: recorded hash "${locked.content_hash}" was not written by rulesync.`);
9405
+ }
9402
9406
  }
9403
9407
  /**
9404
9408
  * SHA-256 over a canonical, order-independent representation of the deployed
@@ -10104,9 +10108,11 @@ async function buildSkillDeployment(params) {
10104
10108
  */
10105
10109
  function assertFrozenSkillIntegrity(params) {
10106
10110
  const { frozen, locked, contentHash, sourceKey, skillName, agent, scope, logger } = params;
10107
- if (frozen && locked?.content_hash) if (RULESYNC_CONTENT_HASH_REGEX.test(locked.content_hash)) {
10108
- if (locked.content_hash !== contentHash) throw new Error(`content_hash mismatch for ${sourceKey} skill "${skillName}" (agent=${agent}, scope=${scope}): lock=${locked.content_hash} computed=${contentHash}. Refuse to trust the deployment under --frozen.`);
10109
- } else logger.debug(`Skipping content_hash integrity check for ${sourceKey} skill "${skillName}": recorded hash "${locked.content_hash}" was not written by rulesync.`);
10111
+ if (frozen && locked?.content_hash) {
10112
+ if (RULESYNC_CONTENT_HASH_REGEX.test(locked.content_hash)) {
10113
+ if (locked.content_hash !== contentHash) throw new Error(`content_hash mismatch for ${sourceKey} skill "${skillName}" (agent=${agent}, scope=${scope}): lock=${locked.content_hash} computed=${contentHash}. Refuse to trust the deployment under --frozen.`);
10114
+ } else logger.debug(`Skipping content_hash integrity check for ${sourceKey} skill "${skillName}": recorded hash "${locked.content_hash}" was not written by rulesync.`);
10115
+ }
10110
10116
  }
10111
10117
  async function removeStaleFile(params) {
10112
10118
  const { relativePath, scope, projectRoot, logger } = params;
@@ -12800,7 +12806,7 @@ function wrapCommand$1({ name, errorCode, handler, getVersion, loggerFactory = c
12800
12806
  }
12801
12807
  //#endregion
12802
12808
  //#region src/cli/program.ts
12803
- const getVersion = () => "16.24.0";
12809
+ const getVersion = () => "16.24.1";
12804
12810
  const FEATURES_HELP = `${ALL_FEATURES.join(",")}; ignore is deprecated, use permissions`;
12805
12811
  function wrapCommand(name, errorCode, handler) {
12806
12812
  return wrapCommand$1({