rulesync 7.3.0 → 7.4.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.
@@ -12175,14 +12175,22 @@ var CopilotRuleFrontmatterSchema = import_mini46.z.object({
12175
12175
  var CopilotRule = class _CopilotRule extends ToolRule {
12176
12176
  frontmatter;
12177
12177
  body;
12178
- static getSettablePaths(_options = {}) {
12178
+ static getSettablePaths(options = {}) {
12179
+ if (options.global) {
12180
+ return {
12181
+ root: {
12182
+ relativeDirPath: buildToolPath(".copilot", ".", options.excludeToolDir),
12183
+ relativeFilePath: "copilot-instructions.md"
12184
+ }
12185
+ };
12186
+ }
12179
12187
  return {
12180
12188
  root: {
12181
- relativeDirPath: buildToolPath(".github", ".", _options.excludeToolDir),
12189
+ relativeDirPath: buildToolPath(".github", ".", options.excludeToolDir),
12182
12190
  relativeFilePath: "copilot-instructions.md"
12183
12191
  },
12184
12192
  nonRoot: {
12185
- relativeDirPath: buildToolPath(".github", "instructions", _options.excludeToolDir)
12193
+ relativeDirPath: buildToolPath(".github", "instructions", options.excludeToolDir)
12186
12194
  }
12187
12195
  };
12188
12196
  }
@@ -12233,10 +12241,12 @@ var CopilotRule = class _CopilotRule extends ToolRule {
12233
12241
  static fromRulesyncRule({
12234
12242
  baseDir = process.cwd(),
12235
12243
  rulesyncRule,
12236
- validate = true
12244
+ validate = true,
12245
+ global = false
12237
12246
  }) {
12238
12247
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
12239
12248
  const root = rulesyncFrontmatter.root;
12249
+ const paths = this.getSettablePaths({ global });
12240
12250
  const copilotFrontmatter = {
12241
12251
  description: rulesyncFrontmatter.description,
12242
12252
  applyTo: rulesyncFrontmatter.globs?.length ? rulesyncFrontmatter.globs.join(",") : void 0,
@@ -12248,12 +12258,15 @@ var CopilotRule = class _CopilotRule extends ToolRule {
12248
12258
  baseDir,
12249
12259
  frontmatter: copilotFrontmatter,
12250
12260
  body,
12251
- relativeDirPath: this.getSettablePaths().root.relativeDirPath,
12252
- relativeFilePath: this.getSettablePaths().root.relativeFilePath,
12261
+ relativeDirPath: paths.root.relativeDirPath,
12262
+ relativeFilePath: paths.root.relativeFilePath,
12253
12263
  validate,
12254
12264
  root
12255
12265
  });
12256
12266
  }
12267
+ if (!paths.nonRoot) {
12268
+ throw new Error(`nonRoot path is not set for ${rulesyncRule.getRelativeFilePath()}`);
12269
+ }
12257
12270
  const originalFileName = rulesyncRule.getRelativeFilePath();
12258
12271
  const nameWithoutExt = originalFileName.replace(/\.md$/, "");
12259
12272
  const newFileName = `${nameWithoutExt}.instructions.md`;
@@ -12261,7 +12274,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
12261
12274
  baseDir,
12262
12275
  frontmatter: copilotFrontmatter,
12263
12276
  body,
12264
- relativeDirPath: this.getSettablePaths().nonRoot.relativeDirPath,
12277
+ relativeDirPath: paths.nonRoot.relativeDirPath,
12265
12278
  relativeFilePath: newFileName,
12266
12279
  validate,
12267
12280
  root
@@ -12270,25 +12283,29 @@ var CopilotRule = class _CopilotRule extends ToolRule {
12270
12283
  static async fromFile({
12271
12284
  baseDir = process.cwd(),
12272
12285
  relativeFilePath,
12273
- validate = true
12286
+ validate = true,
12287
+ global = false
12274
12288
  }) {
12275
- const isRoot = relativeFilePath === "copilot-instructions.md";
12276
- const relativePath = isRoot ? (0, import_node_path95.join)(
12277
- this.getSettablePaths().root.relativeDirPath,
12278
- this.getSettablePaths().root.relativeFilePath
12279
- ) : (0, import_node_path95.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
12280
- const fileContent = await readFileContent((0, import_node_path95.join)(baseDir, relativePath));
12289
+ const paths = this.getSettablePaths({ global });
12290
+ const isRoot = relativeFilePath === paths.root.relativeFilePath;
12281
12291
  if (isRoot) {
12292
+ const relativePath2 = (0, import_node_path95.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
12293
+ const fileContent2 = await readFileContent((0, import_node_path95.join)(baseDir, relativePath2));
12282
12294
  return new _CopilotRule({
12283
12295
  baseDir,
12284
- relativeDirPath: this.getSettablePaths().root.relativeDirPath,
12285
- relativeFilePath: this.getSettablePaths().root.relativeFilePath,
12296
+ relativeDirPath: paths.root.relativeDirPath,
12297
+ relativeFilePath: paths.root.relativeFilePath,
12286
12298
  frontmatter: {},
12287
- body: fileContent.trim(),
12299
+ body: fileContent2.trim(),
12288
12300
  validate,
12289
12301
  root: isRoot
12290
12302
  });
12291
12303
  }
12304
+ if (!paths.nonRoot) {
12305
+ throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
12306
+ }
12307
+ const relativePath = (0, import_node_path95.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
12308
+ const fileContent = await readFileContent((0, import_node_path95.join)(baseDir, relativePath));
12292
12309
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
12293
12310
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
12294
12311
  if (!result.success) {
@@ -12298,7 +12315,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
12298
12315
  }
12299
12316
  return new _CopilotRule({
12300
12317
  baseDir,
12301
- relativeDirPath: this.getSettablePaths().nonRoot.relativeDirPath,
12318
+ relativeDirPath: paths.nonRoot.relativeDirPath,
12302
12319
  relativeFilePath: relativeFilePath.endsWith(".instructions.md") ? relativeFilePath : relativeFilePath.replace(/\.md$/, ".instructions.md"),
12303
12320
  frontmatter: result.data,
12304
12321
  body: content.trim(),
@@ -12309,9 +12326,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
12309
12326
  static forDeletion({
12310
12327
  baseDir = process.cwd(),
12311
12328
  relativeDirPath,
12312
- relativeFilePath
12329
+ relativeFilePath,
12330
+ global = false
12313
12331
  }) {
12314
- const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
12332
+ const paths = this.getSettablePaths({ global });
12333
+ const isRoot = relativeFilePath === paths.root.relativeFilePath;
12315
12334
  return new _CopilotRule({
12316
12335
  baseDir,
12317
12336
  relativeDirPath,
@@ -12991,46 +13010,78 @@ var KiroRule = class _KiroRule extends ToolRule {
12991
13010
  // src/features/rules/opencode-rule.ts
12992
13011
  var import_node_path102 = require("path");
12993
13012
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
12994
- static getSettablePaths(_options = {}) {
13013
+ static getSettablePaths({
13014
+ global,
13015
+ excludeToolDir
13016
+ } = {}) {
13017
+ if (global) {
13018
+ return {
13019
+ root: {
13020
+ relativeDirPath: buildToolPath(".config/opencode", ".", excludeToolDir),
13021
+ relativeFilePath: "AGENTS.md"
13022
+ }
13023
+ };
13024
+ }
12995
13025
  return {
12996
13026
  root: {
12997
13027
  relativeDirPath: ".",
12998
13028
  relativeFilePath: "AGENTS.md"
12999
13029
  },
13000
13030
  nonRoot: {
13001
- relativeDirPath: buildToolPath(".opencode", "memories", _options.excludeToolDir)
13031
+ relativeDirPath: buildToolPath(".opencode", "memories", excludeToolDir)
13002
13032
  }
13003
13033
  };
13004
13034
  }
13005
13035
  static async fromFile({
13006
13036
  baseDir = process.cwd(),
13007
13037
  relativeFilePath,
13008
- validate = true
13038
+ validate = true,
13039
+ global = false
13009
13040
  }) {
13010
- const isRoot = relativeFilePath === "AGENTS.md";
13011
- const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path102.join)(".opencode", "memories", relativeFilePath);
13041
+ const paths = this.getSettablePaths({ global });
13042
+ const isRoot = relativeFilePath === paths.root.relativeFilePath;
13043
+ if (isRoot) {
13044
+ const relativePath2 = paths.root.relativeFilePath;
13045
+ const fileContent2 = await readFileContent(
13046
+ (0, import_node_path102.join)(baseDir, paths.root.relativeDirPath, relativePath2)
13047
+ );
13048
+ return new _OpenCodeRule({
13049
+ baseDir,
13050
+ relativeDirPath: paths.root.relativeDirPath,
13051
+ relativeFilePath: paths.root.relativeFilePath,
13052
+ fileContent: fileContent2,
13053
+ validate,
13054
+ root: true
13055
+ });
13056
+ }
13057
+ if (!paths.nonRoot) {
13058
+ throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
13059
+ }
13060
+ const relativePath = (0, import_node_path102.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
13012
13061
  const fileContent = await readFileContent((0, import_node_path102.join)(baseDir, relativePath));
13013
13062
  return new _OpenCodeRule({
13014
13063
  baseDir,
13015
- relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
13016
- relativeFilePath: isRoot ? "AGENTS.md" : relativeFilePath,
13064
+ relativeDirPath: paths.nonRoot.relativeDirPath,
13065
+ relativeFilePath,
13066
+ fileContent,
13017
13067
  validate,
13018
- root: isRoot,
13019
- fileContent
13068
+ root: false
13020
13069
  });
13021
13070
  }
13022
13071
  static fromRulesyncRule({
13023
13072
  baseDir = process.cwd(),
13024
13073
  rulesyncRule,
13025
- validate = true
13074
+ validate = true,
13075
+ global = false
13026
13076
  }) {
13077
+ const paths = this.getSettablePaths({ global });
13027
13078
  return new _OpenCodeRule(
13028
13079
  this.buildToolRuleParamsDefault({
13029
13080
  baseDir,
13030
13081
  rulesyncRule,
13031
13082
  validate,
13032
- rootPath: this.getSettablePaths().root,
13033
- nonRootPath: this.getSettablePaths().nonRoot
13083
+ rootPath: paths.root,
13084
+ nonRootPath: paths.nonRoot
13034
13085
  })
13035
13086
  );
13036
13087
  }
@@ -13043,9 +13094,11 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
13043
13094
  static forDeletion({
13044
13095
  baseDir = process.cwd(),
13045
13096
  relativeDirPath,
13046
- relativeFilePath
13097
+ relativeFilePath,
13098
+ global = false
13047
13099
  }) {
13048
- const isRoot = relativeFilePath === "AGENTS.md" && relativeDirPath === ".";
13100
+ const paths = this.getSettablePaths({ global });
13101
+ const isRoot = relativeFilePath === paths.root.relativeFilePath;
13049
13102
  return new _OpenCodeRule({
13050
13103
  baseDir,
13051
13104
  relativeDirPath,
@@ -13503,42 +13556,66 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
13503
13556
  "antigravity",
13504
13557
  {
13505
13558
  class: AntigravityRule,
13506
- meta: { extension: "md", supportsGlobal: false, ruleDiscoveryMode: "auto" }
13559
+ meta: {
13560
+ extension: "md",
13561
+ supportsGlobal: false,
13562
+ ruleDiscoveryMode: "auto"
13563
+ }
13507
13564
  }
13508
13565
  ],
13509
13566
  [
13510
13567
  "augmentcode",
13511
13568
  {
13512
13569
  class: AugmentcodeRule,
13513
- meta: { extension: "md", supportsGlobal: false, ruleDiscoveryMode: "auto" }
13570
+ meta: {
13571
+ extension: "md",
13572
+ supportsGlobal: false,
13573
+ ruleDiscoveryMode: "auto"
13574
+ }
13514
13575
  }
13515
13576
  ],
13516
13577
  [
13517
13578
  "augmentcode-legacy",
13518
13579
  {
13519
13580
  class: AugmentcodeLegacyRule,
13520
- meta: { extension: "md", supportsGlobal: false, ruleDiscoveryMode: "toon" }
13581
+ meta: {
13582
+ extension: "md",
13583
+ supportsGlobal: false,
13584
+ ruleDiscoveryMode: "toon"
13585
+ }
13521
13586
  }
13522
13587
  ],
13523
13588
  [
13524
13589
  "claudecode",
13525
13590
  {
13526
13591
  class: ClaudecodeRule,
13527
- meta: { extension: "md", supportsGlobal: true, ruleDiscoveryMode: "auto" }
13592
+ meta: {
13593
+ extension: "md",
13594
+ supportsGlobal: true,
13595
+ ruleDiscoveryMode: "auto"
13596
+ }
13528
13597
  }
13529
13598
  ],
13530
13599
  [
13531
13600
  "claudecode-legacy",
13532
13601
  {
13533
13602
  class: ClaudecodeLegacyRule,
13534
- meta: { extension: "md", supportsGlobal: true, ruleDiscoveryMode: "claudecode-legacy" }
13603
+ meta: {
13604
+ extension: "md",
13605
+ supportsGlobal: true,
13606
+ ruleDiscoveryMode: "claudecode-legacy"
13607
+ }
13535
13608
  }
13536
13609
  ],
13537
13610
  [
13538
13611
  "cline",
13539
13612
  {
13540
13613
  class: ClineRule,
13541
- meta: { extension: "md", supportsGlobal: false, ruleDiscoveryMode: "auto" }
13614
+ meta: {
13615
+ extension: "md",
13616
+ supportsGlobal: false,
13617
+ ruleDiscoveryMode: "auto"
13618
+ }
13542
13619
  }
13543
13620
  ],
13544
13621
  [
@@ -13561,7 +13638,7 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
13561
13638
  class: CopilotRule,
13562
13639
  meta: {
13563
13640
  extension: "md",
13564
- supportsGlobal: false,
13641
+ supportsGlobal: true,
13565
13642
  ruleDiscoveryMode: "auto"
13566
13643
  }
13567
13644
  }
@@ -13611,42 +13688,66 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
13611
13688
  "junie",
13612
13689
  {
13613
13690
  class: JunieRule,
13614
- meta: { extension: "md", supportsGlobal: false, ruleDiscoveryMode: "toon" }
13691
+ meta: {
13692
+ extension: "md",
13693
+ supportsGlobal: false,
13694
+ ruleDiscoveryMode: "toon"
13695
+ }
13615
13696
  }
13616
13697
  ],
13617
13698
  [
13618
13699
  "kilo",
13619
13700
  {
13620
13701
  class: KiloRule,
13621
- meta: { extension: "md", supportsGlobal: true, ruleDiscoveryMode: "auto" }
13702
+ meta: {
13703
+ extension: "md",
13704
+ supportsGlobal: true,
13705
+ ruleDiscoveryMode: "auto"
13706
+ }
13622
13707
  }
13623
13708
  ],
13624
13709
  [
13625
13710
  "kiro",
13626
13711
  {
13627
13712
  class: KiroRule,
13628
- meta: { extension: "md", supportsGlobal: false, ruleDiscoveryMode: "toon" }
13713
+ meta: {
13714
+ extension: "md",
13715
+ supportsGlobal: false,
13716
+ ruleDiscoveryMode: "toon"
13717
+ }
13629
13718
  }
13630
13719
  ],
13631
13720
  [
13632
13721
  "opencode",
13633
13722
  {
13634
13723
  class: OpenCodeRule,
13635
- meta: { extension: "md", supportsGlobal: false, ruleDiscoveryMode: "toon" }
13724
+ meta: {
13725
+ extension: "md",
13726
+ supportsGlobal: true,
13727
+ ruleDiscoveryMode: "toon"
13728
+ }
13636
13729
  }
13637
13730
  ],
13638
13731
  [
13639
13732
  "qwencode",
13640
13733
  {
13641
13734
  class: QwencodeRule,
13642
- meta: { extension: "md", supportsGlobal: false, ruleDiscoveryMode: "toon" }
13735
+ meta: {
13736
+ extension: "md",
13737
+ supportsGlobal: false,
13738
+ ruleDiscoveryMode: "toon"
13739
+ }
13643
13740
  }
13644
13741
  ],
13645
13742
  [
13646
13743
  "replit",
13647
13744
  {
13648
13745
  class: ReplitRule,
13649
- meta: { extension: "md", supportsGlobal: false, ruleDiscoveryMode: "auto" }
13746
+ meta: {
13747
+ extension: "md",
13748
+ supportsGlobal: false,
13749
+ ruleDiscoveryMode: "auto"
13750
+ }
13650
13751
  }
13651
13752
  ],
13652
13753
  [
@@ -13668,14 +13769,22 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
13668
13769
  "warp",
13669
13770
  {
13670
13771
  class: WarpRule,
13671
- meta: { extension: "md", supportsGlobal: false, ruleDiscoveryMode: "toon" }
13772
+ meta: {
13773
+ extension: "md",
13774
+ supportsGlobal: false,
13775
+ ruleDiscoveryMode: "toon"
13776
+ }
13672
13777
  }
13673
13778
  ],
13674
13779
  [
13675
13780
  "windsurf",
13676
13781
  {
13677
13782
  class: WindsurfRule,
13678
- meta: { extension: "md", supportsGlobal: false, ruleDiscoveryMode: "auto" }
13783
+ meta: {
13784
+ extension: "md",
13785
+ supportsGlobal: false,
13786
+ ruleDiscoveryMode: "auto"
13787
+ }
13679
13788
  }
13680
13789
  ]
13681
13790
  ]);
@@ -13823,7 +13932,9 @@ var RulesProcessor = class extends FeatureProcessor {
13823
13932
  })
13824
13933
  );
13825
13934
  } else if (this.toolTarget === "claudecode-legacy") {
13826
- const paths = ClaudecodeLegacyRule.getSettablePaths({ global: this.global });
13935
+ const paths = ClaudecodeLegacyRule.getSettablePaths({
13936
+ global: this.global
13937
+ });
13827
13938
  toolRules.push(
13828
13939
  new ClaudecodeLegacyRule({
13829
13940
  baseDir: this.baseDir,
@@ -13909,7 +14020,10 @@ var RulesProcessor = class extends FeatureProcessor {
13909
14020
  const rulesyncRules = await Promise.all(
13910
14021
  files.map((file) => {
13911
14022
  const relativeFilePath = (0, import_node_path108.relative)(rulesyncBaseDir, file);
13912
- checkPathTraversal({ relativePath: relativeFilePath, intendedRootDir: rulesyncBaseDir });
14023
+ checkPathTraversal({
14024
+ relativePath: relativeFilePath,
14025
+ intendedRootDir: rulesyncBaseDir
14026
+ });
13913
14027
  return RulesyncRule.fromFile({
13914
14028
  relativeFilePath
13915
14029
  });
@@ -13960,7 +14074,9 @@ var RulesProcessor = class extends FeatureProcessor {
13960
14074
  } = {}) {
13961
14075
  try {
13962
14076
  const factory = this.getFactory(this.toolTarget);
13963
- const settablePaths = factory.class.getSettablePaths({ global: this.global });
14077
+ const settablePaths = factory.class.getSettablePaths({
14078
+ global: this.global
14079
+ });
13964
14080
  const rootToolRules = await (async () => {
13965
14081
  if (!settablePaths.root) {
13966
14082
  return [];
@@ -14042,7 +14158,10 @@ var RulesProcessor = class extends FeatureProcessor {
14042
14158
  return await Promise.all(
14043
14159
  nonRootFilePaths.map((filePath) => {
14044
14160
  const relativeFilePath = (0, import_node_path108.relative)(nonRootBaseDir, filePath);
14045
- checkPathTraversal({ relativePath: relativeFilePath, intendedRootDir: nonRootBaseDir });
14161
+ checkPathTraversal({
14162
+ relativePath: relativeFilePath,
14163
+ intendedRootDir: nonRootBaseDir
14164
+ });
14046
14165
  return factory.class.fromFile({
14047
14166
  baseDir: this.baseDir,
14048
14167
  relativeFilePath,
@@ -16737,19 +16856,10 @@ async function resolveAndFetchSources(params) {
16737
16856
  let lock = options.updateSources ? createEmptyLock() : await readLockFile({ baseDir });
16738
16857
  if (options.frozen) {
16739
16858
  const missingKeys = [];
16740
- const missingSkills = [];
16741
- const curatedDir = (0, import_node_path115.join)(baseDir, RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
16742
16859
  for (const source of sources) {
16743
16860
  const locked = getLockedSource(lock, source.source);
16744
16861
  if (!locked) {
16745
16862
  missingKeys.push(source.source);
16746
- continue;
16747
- }
16748
- const skillNames = getLockedSkillNames(locked);
16749
- for (const skillName of skillNames) {
16750
- if (!await directoryExists((0, import_node_path115.join)(curatedDir, skillName))) {
16751
- missingSkills.push(`${source.source}:${skillName}`);
16752
- }
16753
16863
  }
16754
16864
  }
16755
16865
  if (missingKeys.length > 0) {
@@ -16757,11 +16867,6 @@ async function resolveAndFetchSources(params) {
16757
16867
  `Frozen install failed: lockfile is missing entries for: ${missingKeys.join(", ")}. Run 'rulesync install' to update the lockfile.`
16758
16868
  );
16759
16869
  }
16760
- if (missingSkills.length > 0) {
16761
- throw new Error(
16762
- `Frozen install failed: locked skills missing from disk: ${missingSkills.join(", ")}. Run 'rulesync install' to fetch missing skills.`
16763
- );
16764
- }
16765
16870
  }
16766
16871
  const originalLockJson = JSON.stringify(lock);
16767
16872
  const token = GitHubClient.resolveToken(options.token);
@@ -18782,7 +18887,7 @@ async function updateCommand(currentVersion, options) {
18782
18887
  }
18783
18888
 
18784
18889
  // src/cli/index.ts
18785
- var getVersion = () => "7.3.0";
18890
+ var getVersion = () => "7.4.0";
18786
18891
  var main = async () => {
18787
18892
  const program = new import_commander.Command();
18788
18893
  const version = getVersion();
@@ -18855,7 +18960,10 @@ var main = async () => {
18855
18960
  process.exit(1);
18856
18961
  }
18857
18962
  });
18858
- program.command("install").description("Install skills from declarative sources in rulesync.jsonc").option("--update", "Force re-resolve all source refs, ignoring lockfile").option("--frozen", "Fail if lockfile is missing or out of sync (for CI)").option("--token <token>", "GitHub token for private repos").option("-c, --config <path>", "Path to configuration file").option("-V, --verbose", "Verbose output").option("-s, --silent", "Suppress all output").action(async (options) => {
18963
+ program.command("install").description("Install skills from declarative sources in rulesync.jsonc").option("--update", "Force re-resolve all source refs, ignoring lockfile").option(
18964
+ "--frozen",
18965
+ "Fail if lockfile is missing or out of sync (for CI); fetches missing skills using locked refs"
18966
+ ).option("--token <token>", "GitHub token for private repos").option("-c, --config <path>", "Path to configuration file").option("-V, --verbose", "Verbose output").option("-s, --silent", "Suppress all output").action(async (options) => {
18859
18967
  try {
18860
18968
  await installCommand({
18861
18969
  update: options.update,
package/dist/cli/index.js CHANGED
@@ -60,7 +60,7 @@ import {
60
60
  removeTempDirectory,
61
61
  stringifyFrontmatter,
62
62
  writeFileContent
63
- } from "../chunk-NRNUPCXY.js";
63
+ } from "../chunk-UCC3WPDL.js";
64
64
 
65
65
  // src/cli/index.ts
66
66
  import { Command } from "commander";
@@ -1759,19 +1759,10 @@ async function resolveAndFetchSources(params) {
1759
1759
  let lock = options.updateSources ? createEmptyLock() : await readLockFile({ baseDir });
1760
1760
  if (options.frozen) {
1761
1761
  const missingKeys = [];
1762
- const missingSkills = [];
1763
- const curatedDir = join5(baseDir, RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
1764
1762
  for (const source of sources) {
1765
1763
  const locked = getLockedSource(lock, source.source);
1766
1764
  if (!locked) {
1767
1765
  missingKeys.push(source.source);
1768
- continue;
1769
- }
1770
- const skillNames = getLockedSkillNames(locked);
1771
- for (const skillName of skillNames) {
1772
- if (!await directoryExists(join5(curatedDir, skillName))) {
1773
- missingSkills.push(`${source.source}:${skillName}`);
1774
- }
1775
1766
  }
1776
1767
  }
1777
1768
  if (missingKeys.length > 0) {
@@ -1779,11 +1770,6 @@ async function resolveAndFetchSources(params) {
1779
1770
  `Frozen install failed: lockfile is missing entries for: ${missingKeys.join(", ")}. Run 'rulesync install' to update the lockfile.`
1780
1771
  );
1781
1772
  }
1782
- if (missingSkills.length > 0) {
1783
- throw new Error(
1784
- `Frozen install failed: locked skills missing from disk: ${missingSkills.join(", ")}. Run 'rulesync install' to fetch missing skills.`
1785
- );
1786
- }
1787
1773
  }
1788
1774
  const originalLockJson = JSON.stringify(lock);
1789
1775
  const token = GitHubClient.resolveToken(options.token);
@@ -3804,7 +3790,7 @@ async function updateCommand(currentVersion, options) {
3804
3790
  }
3805
3791
 
3806
3792
  // src/cli/index.ts
3807
- var getVersion = () => "7.3.0";
3793
+ var getVersion = () => "7.4.0";
3808
3794
  var main = async () => {
3809
3795
  const program = new Command();
3810
3796
  const version = getVersion();
@@ -3877,7 +3863,10 @@ var main = async () => {
3877
3863
  process.exit(1);
3878
3864
  }
3879
3865
  });
3880
- program.command("install").description("Install skills from declarative sources in rulesync.jsonc").option("--update", "Force re-resolve all source refs, ignoring lockfile").option("--frozen", "Fail if lockfile is missing or out of sync (for CI)").option("--token <token>", "GitHub token for private repos").option("-c, --config <path>", "Path to configuration file").option("-V, --verbose", "Verbose output").option("-s, --silent", "Suppress all output").action(async (options) => {
3866
+ program.command("install").description("Install skills from declarative sources in rulesync.jsonc").option("--update", "Force re-resolve all source refs, ignoring lockfile").option(
3867
+ "--frozen",
3868
+ "Fail if lockfile is missing or out of sync (for CI); fetches missing skills using locked refs"
3869
+ ).option("--token <token>", "GitHub token for private repos").option("-c, --config <path>", "Path to configuration file").option("-V, --verbose", "Verbose output").option("-s, --silent", "Suppress all output").action(async (options) => {
3881
3870
  try {
3882
3871
  await installCommand({
3883
3872
  update: options.update,