prjct-cli 0.55.3 → 0.55.4

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.55.4] - 2026-02-05
4
+
5
+ ### Bug Fixes
6
+
7
+ - remove legacy p.*.md commands on sync
8
+
9
+
3
10
  ## [0.55.3] - 2026-02-05
4
11
 
5
12
  ### Bug Fixes
@@ -569,6 +569,36 @@ export class CommandInstaller {
569
569
  }
570
570
  }
571
571
 
572
+ /**
573
+ * Remove legacy p.*.md files from commands root directory
574
+ * These were replaced by the p/ subdirectory structure in v0.50+
575
+ */
576
+ async removeLegacyCommands(): Promise<number> {
577
+ const aiProvider = require('./ai-provider')
578
+ const activeProvider = aiProvider.getActiveProvider()
579
+ const commandsRoot = path.join(activeProvider.configDir, 'commands')
580
+
581
+ let removed = 0
582
+
583
+ try {
584
+ const files = await fs.readdir(commandsRoot)
585
+ const legacyFiles = files.filter((f) => f.startsWith('p.') && f.endsWith('.md'))
586
+
587
+ for (const file of legacyFiles) {
588
+ try {
589
+ await fs.unlink(path.join(commandsRoot, file))
590
+ removed++
591
+ } catch {
592
+ // Ignore errors removing individual files
593
+ }
594
+ }
595
+ } catch {
596
+ // Ignore errors if directory doesn't exist
597
+ }
598
+
599
+ return removed
600
+ }
601
+
572
602
  /**
573
603
  * Sync commands - intelligent update that detects and removes orphans
574
604
  */
@@ -639,9 +669,9 @@ export class CommandInstaller {
639
669
  }
640
670
  }
641
671
 
642
- // Note: We do NOT remove orphaned files
643
- // Legacy commands from older versions are preserved
644
- // to avoid breaking existing workflows
672
+ // Remove legacy p.*.md files from commands root (old naming convention)
673
+ // These were replaced by p/ subdirectory structure
674
+ await this.removeLegacyCommands()
645
675
 
646
676
  return results
647
677
  } catch (error) {
@@ -5952,6 +5952,29 @@ var init_command_installer = __esm({
5952
5952
  throw error;
5953
5953
  }
5954
5954
  }
5955
+ /**
5956
+ * Remove legacy p.*.md files from commands root directory
5957
+ * These were replaced by the p/ subdirectory structure in v0.50+
5958
+ */
5959
+ async removeLegacyCommands() {
5960
+ const aiProvider = (init_ai_provider(), __toCommonJS(ai_provider_exports));
5961
+ const activeProvider = aiProvider.getActiveProvider();
5962
+ const commandsRoot = path16.join(activeProvider.configDir, "commands");
5963
+ let removed = 0;
5964
+ try {
5965
+ const files = await fs16.readdir(commandsRoot);
5966
+ const legacyFiles = files.filter((f) => f.startsWith("p.") && f.endsWith(".md"));
5967
+ for (const file of legacyFiles) {
5968
+ try {
5969
+ await fs16.unlink(path16.join(commandsRoot, file));
5970
+ removed++;
5971
+ } catch {
5972
+ }
5973
+ }
5974
+ } catch {
5975
+ }
5976
+ return removed;
5977
+ }
5955
5978
  /**
5956
5979
  * Sync commands - intelligent update that detects and removes orphans
5957
5980
  */
@@ -6004,6 +6027,7 @@ var init_command_installer = __esm({
6004
6027
  results.errors.push({ file, error: error.message });
6005
6028
  }
6006
6029
  }
6030
+ await this.removeLegacyCommands();
6007
6031
  return results;
6008
6032
  } catch (error) {
6009
6033
  return {
@@ -25197,7 +25221,7 @@ var require_package = __commonJS({
25197
25221
  "package.json"(exports, module) {
25198
25222
  module.exports = {
25199
25223
  name: "prjct-cli",
25200
- version: "0.55.3",
25224
+ version: "0.55.4",
25201
25225
  description: "Context layer for AI agents. Project context for Claude Code, Gemini CLI, and more.",
25202
25226
  main: "core/index.ts",
25203
25227
  bin: {
@@ -873,6 +873,29 @@ var CommandInstaller = class {
873
873
  throw error;
874
874
  }
875
875
  }
876
+ /**
877
+ * Remove legacy p.*.md files from commands root directory
878
+ * These were replaced by the p/ subdirectory structure in v0.50+
879
+ */
880
+ async removeLegacyCommands() {
881
+ const aiProvider = (init_ai_provider(), __toCommonJS(ai_provider_exports));
882
+ const activeProvider = aiProvider.getActiveProvider();
883
+ const commandsRoot = import_node_path3.default.join(activeProvider.configDir, "commands");
884
+ let removed = 0;
885
+ try {
886
+ const files = await import_promises.default.readdir(commandsRoot);
887
+ const legacyFiles = files.filter((f) => f.startsWith("p.") && f.endsWith(".md"));
888
+ for (const file of legacyFiles) {
889
+ try {
890
+ await import_promises.default.unlink(import_node_path3.default.join(commandsRoot, file));
891
+ removed++;
892
+ } catch {
893
+ }
894
+ }
895
+ } catch {
896
+ }
897
+ return removed;
898
+ }
876
899
  /**
877
900
  * Sync commands - intelligent update that detects and removes orphans
878
901
  */
@@ -925,6 +948,7 @@ var CommandInstaller = class {
925
948
  results.errors.push({ file, error: error.message });
926
949
  }
927
950
  }
951
+ await this.removeLegacyCommands();
928
952
  return results;
929
953
  } catch (error) {
930
954
  return {
@@ -876,6 +876,29 @@ var CommandInstaller = class {
876
876
  throw error;
877
877
  }
878
878
  }
879
+ /**
880
+ * Remove legacy p.*.md files from commands root directory
881
+ * These were replaced by the p/ subdirectory structure in v0.50+
882
+ */
883
+ async removeLegacyCommands() {
884
+ const aiProvider = (init_ai_provider(), __toCommonJS(ai_provider_exports));
885
+ const activeProvider = aiProvider.getActiveProvider();
886
+ const commandsRoot = import_node_path3.default.join(activeProvider.configDir, "commands");
887
+ let removed = 0;
888
+ try {
889
+ const files = await import_promises.default.readdir(commandsRoot);
890
+ const legacyFiles = files.filter((f) => f.startsWith("p.") && f.endsWith(".md"));
891
+ for (const file of legacyFiles) {
892
+ try {
893
+ await import_promises.default.unlink(import_node_path3.default.join(commandsRoot, file));
894
+ removed++;
895
+ } catch {
896
+ }
897
+ }
898
+ } catch {
899
+ }
900
+ return removed;
901
+ }
879
902
  /**
880
903
  * Sync commands - intelligent update that detects and removes orphans
881
904
  */
@@ -928,6 +951,7 @@ var CommandInstaller = class {
928
951
  results.errors.push({ file, error: error.message });
929
952
  }
930
953
  }
954
+ await this.removeLegacyCommands();
931
955
  return results;
932
956
  } catch (error) {
933
957
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prjct-cli",
3
- "version": "0.55.3",
3
+ "version": "0.55.4",
4
4
  "description": "Context layer for AI agents. Project context for Claude Code, Gemini CLI, and more.",
5
5
  "main": "core/index.ts",
6
6
  "bin": {