centy 0.0.12 → 0.0.14

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.
Files changed (127) hide show
  1. package/README.md +1 -1
  2. package/dist/commands/compact.d.ts +21 -0
  3. package/dist/commands/compact.d.ts.map +1 -0
  4. package/dist/commands/compact.js +194 -0
  5. package/dist/commands/compact.js.map +1 -0
  6. package/dist/commands/create/pr.d.ts +20 -0
  7. package/dist/commands/create/pr.d.ts.map +1 -0
  8. package/dist/commands/create/pr.js +96 -0
  9. package/dist/commands/create/pr.js.map +1 -0
  10. package/dist/commands/delete/pr.d.ts +16 -0
  11. package/dist/commands/delete/pr.d.ts.map +1 -0
  12. package/dist/commands/delete/pr.js +59 -0
  13. package/dist/commands/delete/pr.js.map +1 -0
  14. package/dist/commands/get/pr.d.ts +16 -0
  15. package/dist/commands/get/pr.d.ts.map +1 -0
  16. package/dist/commands/get/pr.js +76 -0
  17. package/dist/commands/get/pr.js.map +1 -0
  18. package/dist/commands/list/projects.d.ts +1 -0
  19. package/dist/commands/list/projects.d.ts.map +1 -1
  20. package/dist/commands/list/projects.js +6 -0
  21. package/dist/commands/list/projects.js.map +1 -1
  22. package/dist/commands/list/prs.d.ts +17 -0
  23. package/dist/commands/list/prs.d.ts.map +1 -0
  24. package/dist/commands/list/prs.js +74 -0
  25. package/dist/commands/list/prs.js.map +1 -0
  26. package/dist/commands/project/archive.d.ts +16 -0
  27. package/dist/commands/project/archive.d.ts.map +1 -0
  28. package/dist/commands/project/archive.js +39 -0
  29. package/dist/commands/project/archive.js.map +1 -0
  30. package/dist/commands/update/pr.d.ts +20 -0
  31. package/dist/commands/update/pr.d.ts.map +1 -0
  32. package/dist/commands/update/pr.js +96 -0
  33. package/dist/commands/update/pr.js.map +1 -0
  34. package/dist/daemon/daemon-create-pr.d.ts +6 -0
  35. package/dist/daemon/daemon-create-pr.d.ts.map +1 -0
  36. package/dist/daemon/daemon-create-pr.js +17 -0
  37. package/dist/daemon/daemon-create-pr.js.map +1 -0
  38. package/dist/daemon/daemon-delete-pr.d.ts +6 -0
  39. package/dist/daemon/daemon-delete-pr.d.ts.map +1 -0
  40. package/dist/daemon/daemon-delete-pr.js +17 -0
  41. package/dist/daemon/daemon-delete-pr.js.map +1 -0
  42. package/dist/daemon/daemon-get-compact.d.ts +6 -0
  43. package/dist/daemon/daemon-get-compact.d.ts.map +1 -0
  44. package/dist/daemon/daemon-get-compact.js +17 -0
  45. package/dist/daemon/daemon-get-compact.js.map +1 -0
  46. package/dist/daemon/daemon-get-feature-status.d.ts +6 -0
  47. package/dist/daemon/daemon-get-feature-status.d.ts.map +1 -0
  48. package/dist/daemon/daemon-get-feature-status.js +17 -0
  49. package/dist/daemon/daemon-get-feature-status.js.map +1 -0
  50. package/dist/daemon/daemon-get-instruction.d.ts +6 -0
  51. package/dist/daemon/daemon-get-instruction.d.ts.map +1 -0
  52. package/dist/daemon/daemon-get-instruction.js +17 -0
  53. package/dist/daemon/daemon-get-instruction.js.map +1 -0
  54. package/dist/daemon/daemon-get-pr-by-display-number.d.ts +6 -0
  55. package/dist/daemon/daemon-get-pr-by-display-number.d.ts.map +1 -0
  56. package/dist/daemon/daemon-get-pr-by-display-number.js +17 -0
  57. package/dist/daemon/daemon-get-pr-by-display-number.js.map +1 -0
  58. package/dist/daemon/daemon-get-pr.d.ts +6 -0
  59. package/dist/daemon/daemon-get-pr.d.ts.map +1 -0
  60. package/dist/daemon/daemon-get-pr.js +17 -0
  61. package/dist/daemon/daemon-get-pr.js.map +1 -0
  62. package/dist/daemon/daemon-list-prs.d.ts +6 -0
  63. package/dist/daemon/daemon-list-prs.d.ts.map +1 -0
  64. package/dist/daemon/daemon-list-prs.js +17 -0
  65. package/dist/daemon/daemon-list-prs.js.map +1 -0
  66. package/dist/daemon/daemon-list-uncompacted-issues.d.ts +6 -0
  67. package/dist/daemon/daemon-list-uncompacted-issues.d.ts.map +1 -0
  68. package/dist/daemon/daemon-list-uncompacted-issues.js +17 -0
  69. package/dist/daemon/daemon-list-uncompacted-issues.js.map +1 -0
  70. package/dist/daemon/daemon-mark-issues-compacted.d.ts +6 -0
  71. package/dist/daemon/daemon-mark-issues-compacted.d.ts.map +1 -0
  72. package/dist/daemon/daemon-mark-issues-compacted.js +17 -0
  73. package/dist/daemon/daemon-mark-issues-compacted.js.map +1 -0
  74. package/dist/daemon/daemon-save-migration.d.ts +6 -0
  75. package/dist/daemon/daemon-save-migration.d.ts.map +1 -0
  76. package/dist/daemon/daemon-save-migration.js +17 -0
  77. package/dist/daemon/daemon-save-migration.js.map +1 -0
  78. package/dist/daemon/daemon-set-project-archived.d.ts +6 -0
  79. package/dist/daemon/daemon-set-project-archived.d.ts.map +1 -0
  80. package/dist/daemon/daemon-set-project-archived.js +17 -0
  81. package/dist/daemon/daemon-set-project-archived.js.map +1 -0
  82. package/dist/daemon/daemon-update-compact.d.ts +6 -0
  83. package/dist/daemon/daemon-update-compact.d.ts.map +1 -0
  84. package/dist/daemon/daemon-update-compact.js +17 -0
  85. package/dist/daemon/daemon-update-compact.js.map +1 -0
  86. package/dist/daemon/daemon-update-pr.d.ts +6 -0
  87. package/dist/daemon/daemon-update-pr.d.ts.map +1 -0
  88. package/dist/daemon/daemon-update-pr.js +17 -0
  89. package/dist/daemon/daemon-update-pr.js.map +1 -0
  90. package/dist/daemon/load-proto.d.ts +16 -1
  91. package/dist/daemon/load-proto.d.ts.map +1 -1
  92. package/dist/daemon/load-proto.js.map +1 -1
  93. package/dist/daemon/types.d.ts +168 -0
  94. package/dist/daemon/types.d.ts.map +1 -1
  95. package/dist/tui/App.d.ts.map +1 -1
  96. package/dist/tui/App.js +18 -11
  97. package/dist/tui/App.js.map +1 -1
  98. package/dist/tui/components/domain/ConfigPanel.js +1 -1
  99. package/dist/tui/components/domain/ConfigPanel.js.map +1 -1
  100. package/dist/tui/components/domain/IssueList.js +1 -1
  101. package/dist/tui/components/domain/IssueList.js.map +1 -1
  102. package/dist/tui/components/domain/ProjectList.d.ts.map +1 -1
  103. package/dist/tui/components/domain/ProjectList.js +44 -6
  104. package/dist/tui/components/domain/ProjectList.js.map +1 -1
  105. package/dist/tui/components/layout/Sidebar.d.ts +2 -1
  106. package/dist/tui/components/layout/Sidebar.d.ts.map +1 -1
  107. package/dist/tui/components/layout/Sidebar.js +3 -3
  108. package/dist/tui/components/layout/Sidebar.js.map +1 -1
  109. package/dist/tui/hooks/useProjects.d.ts +2 -0
  110. package/dist/tui/hooks/useProjects.d.ts.map +1 -1
  111. package/dist/tui/hooks/useProjects.js +27 -1
  112. package/dist/tui/hooks/useProjects.js.map +1 -1
  113. package/dist/tui/services/daemon-service.d.ts +7 -1
  114. package/dist/tui/services/daemon-service.d.ts.map +1 -1
  115. package/dist/tui/services/daemon-service.js +45 -2
  116. package/dist/tui/services/daemon-service.js.map +1 -1
  117. package/dist/tui/state/app-state.d.ts +3 -0
  118. package/dist/tui/state/app-state.d.ts.map +1 -1
  119. package/dist/tui/state/app-state.js +5 -0
  120. package/dist/tui/state/app-state.js.map +1 -1
  121. package/dist/tui/types/views.d.ts +4 -0
  122. package/dist/tui/types/views.d.ts.map +1 -1
  123. package/dist/tui/types/views.js +14 -0
  124. package/dist/tui/types/views.js.map +1 -1
  125. package/oclif.manifest.json +474 -23
  126. package/package.json +1 -1
  127. package/proto/centy.proto +271 -0
package/proto/centy.proto CHANGED
@@ -97,6 +97,9 @@ service CentyDaemon {
97
97
  // Set project favorite status
98
98
  rpc SetProjectFavorite(SetProjectFavoriteRequest) returns (SetProjectFavoriteResponse);
99
99
 
100
+ // Set project archived status
101
+ rpc SetProjectArchived(SetProjectArchivedRequest) returns (SetProjectArchivedResponse);
102
+
100
103
  // ============ Version RPCs ============
101
104
 
102
105
  // Get daemon version info
@@ -108,6 +111,29 @@ service CentyDaemon {
108
111
  // Update project to target version (runs migrations)
109
112
  rpc UpdateVersion(UpdateVersionRequest) returns (UpdateVersionResponse);
110
113
 
114
+ // ============ PR RPCs ============
115
+
116
+ // Create a new pull request
117
+ rpc CreatePr(CreatePrRequest) returns (CreatePrResponse);
118
+
119
+ // Get a single PR by ID (UUID)
120
+ rpc GetPr(GetPrRequest) returns (PullRequest);
121
+
122
+ // Get a single PR by display number (human-readable number like 1, 2, 3)
123
+ rpc GetPrByDisplayNumber(GetPrByDisplayNumberRequest) returns (PullRequest);
124
+
125
+ // List all PRs with optional filtering
126
+ rpc ListPrs(ListPrsRequest) returns (ListPrsResponse);
127
+
128
+ // Update an existing PR
129
+ rpc UpdatePr(UpdatePrRequest) returns (UpdatePrResponse);
130
+
131
+ // Delete a PR
132
+ rpc DeletePr(DeletePrRequest) returns (DeletePrResponse);
133
+
134
+ // Get the next PR number
135
+ rpc GetNextPrNumber(GetNextPrNumberRequest) returns (GetNextPrNumberResponse);
136
+
111
137
  // ============ Daemon Control RPCs ============
112
138
 
113
139
  // Shutdown the daemon gracefully
@@ -115,6 +141,29 @@ service CentyDaemon {
115
141
 
116
142
  // Restart the daemon
117
143
  rpc Restart(RestartRequest) returns (RestartResponse);
144
+
145
+ // ============ Features RPCs ============
146
+
147
+ // Get the status of the features system
148
+ rpc GetFeatureStatus(GetFeatureStatusRequest) returns (GetFeatureStatusResponse);
149
+
150
+ // List all uncompacted issues
151
+ rpc ListUncompactedIssues(ListUncompactedIssuesRequest) returns (ListUncompactedIssuesResponse);
152
+
153
+ // Get the instruction.md content
154
+ rpc GetInstruction(GetInstructionRequest) returns (GetInstructionResponse);
155
+
156
+ // Get the current compact.md content
157
+ rpc GetCompact(GetCompactRequest) returns (GetCompactResponse);
158
+
159
+ // Update the compact.md content
160
+ rpc UpdateCompact(UpdateCompactRequest) returns (UpdateCompactResponse);
161
+
162
+ // Save a new migration file
163
+ rpc SaveMigration(SaveMigrationRequest) returns (SaveMigrationResponse);
164
+
165
+ // Mark multiple issues as compacted
166
+ rpc MarkIssuesCompacted(MarkIssuesCompactedRequest) returns (MarkIssuesCompactedResponse);
118
167
  }
119
168
 
120
169
  // ============ Init Messages ============
@@ -246,6 +295,8 @@ message IssueMetadata {
246
295
  string updated_at = 5; // ISO timestamp
247
296
  map<string, string> custom_fields = 6;
248
297
  string priority_label = 7; // Human-readable label (e.g., "high", "P1")
298
+ bool compacted = 8; // Whether issue has been compacted into features
299
+ string compacted_at = 9; // ISO timestamp when compacted (empty if not)
249
300
  }
250
301
 
251
302
  message GetIssueRequest {
@@ -538,10 +589,13 @@ message ProjectInfo {
538
589
  bool initialized = 6; // Fetched live (manifest exists)
539
590
  string name = 7; // Fetched live (directory name)
540
591
  bool is_favorite = 8; // User-marked favorite status
592
+ bool is_archived = 9; // User-marked archived status
541
593
  }
542
594
 
543
595
  message ListProjectsRequest {
544
596
  bool include_stale = 1; // Include projects where path no longer exists
597
+ bool include_uninitialized = 2; // Include projects without .centy manifest
598
+ bool include_archived = 3; // Include archived projects (default: false)
545
599
  }
546
600
 
547
601
  message ListProjectsResponse {
@@ -588,6 +642,17 @@ message SetProjectFavoriteResponse {
588
642
  ProjectInfo project = 3; // The updated project info
589
643
  }
590
644
 
645
+ message SetProjectArchivedRequest {
646
+ string project_path = 1;
647
+ bool is_archived = 2;
648
+ }
649
+
650
+ message SetProjectArchivedResponse {
651
+ bool success = 1;
652
+ string error = 2;
653
+ ProjectInfo project = 3; // The updated project info
654
+ }
655
+
591
656
  // ============ Version Messages ============
592
657
 
593
658
  message GetDaemonInfoRequest {}
@@ -643,3 +708,209 @@ message RestartResponse {
643
708
  bool success = 1;
644
709
  string message = 2;
645
710
  }
711
+
712
+ // ============ PR Messages ============
713
+
714
+ message CreatePrRequest {
715
+ string project_path = 1;
716
+ string title = 2;
717
+ string description = 3;
718
+ string source_branch = 4; // Source branch name (auto-detected if empty)
719
+ string target_branch = 5; // Target branch name (default: "main")
720
+ repeated string linked_issues = 6; // Linked issue IDs or display numbers
721
+ repeated string reviewers = 7; // Reviewer usernames/identifiers
722
+ int32 priority = 8; // 1 = highest priority, 0 = use default
723
+ string status = 9; // default: "draft"
724
+ map<string, string> custom_fields = 10;
725
+ string template = 11; // Optional template name (without .md extension)
726
+ }
727
+
728
+ message CreatePrResponse {
729
+ bool success = 1;
730
+ string error = 2;
731
+
732
+ // The created PR ID (UUID)
733
+ string id = 3;
734
+
735
+ // Human-readable display number (1, 2, 3...)
736
+ uint32 display_number = 4;
737
+
738
+ // Paths to created files
739
+ repeated string created_files = 5;
740
+
741
+ // The updated manifest
742
+ Manifest manifest = 6;
743
+
744
+ // Git info
745
+ string detected_source_branch = 7; // The source branch that was used
746
+ }
747
+
748
+ message GetNextPrNumberRequest {
749
+ string project_path = 1;
750
+ }
751
+
752
+ message GetNextPrNumberResponse {
753
+ uint32 next_number = 1;
754
+ }
755
+
756
+ // PullRequest represents a full PR with all its data
757
+ message PullRequest {
758
+ // UUID-based PR ID (folder name)
759
+ string id = 1;
760
+
761
+ // Human-readable display number (1, 2, 3...)
762
+ uint32 display_number = 2;
763
+
764
+ string title = 3;
765
+ string description = 4;
766
+ PrMetadata metadata = 5;
767
+ }
768
+
769
+ message PrMetadata {
770
+ // Human-readable display number (1, 2, 3...)
771
+ uint32 display_number = 1;
772
+ string status = 2; // e.g., "draft", "open", "merged", "closed"
773
+ string source_branch = 3;
774
+ string target_branch = 4;
775
+ repeated string linked_issues = 5;
776
+ repeated string reviewers = 6;
777
+ int32 priority = 7; // 1 = highest priority, N = lowest
778
+ string priority_label = 8; // Human-readable label (e.g., "high", "P1")
779
+ string created_at = 9; // ISO timestamp
780
+ string updated_at = 10; // ISO timestamp
781
+ string merged_at = 11; // ISO timestamp (empty if not merged)
782
+ string closed_at = 12; // ISO timestamp (empty if not closed)
783
+ map<string, string> custom_fields = 13;
784
+ }
785
+
786
+ message GetPrRequest {
787
+ string project_path = 1;
788
+ string pr_id = 2; // UUID
789
+ }
790
+
791
+ message GetPrByDisplayNumberRequest {
792
+ string project_path = 1;
793
+ uint32 display_number = 2; // Human-readable number (1, 2, 3...)
794
+ }
795
+
796
+ message ListPrsRequest {
797
+ string project_path = 1;
798
+
799
+ // Optional filters
800
+ string status = 2; // Filter by status (empty = all)
801
+ string source_branch = 3; // Filter by source branch (empty = all)
802
+ string target_branch = 4; // Filter by target branch (empty = all)
803
+ int32 priority = 5; // Filter by priority (0 = all)
804
+ }
805
+
806
+ message ListPrsResponse {
807
+ repeated PullRequest prs = 1;
808
+ int32 total_count = 2;
809
+ }
810
+
811
+ message UpdatePrRequest {
812
+ string project_path = 1;
813
+ string pr_id = 2; // UUID or display number
814
+
815
+ // Fields to update (empty string = don't update, 0 = don't update priority)
816
+ string title = 3;
817
+ string description = 4;
818
+ string status = 5;
819
+ string source_branch = 6;
820
+ string target_branch = 7;
821
+ repeated string linked_issues = 8;
822
+ repeated string reviewers = 9;
823
+ int32 priority = 10; // 0 = don't update, otherwise 1-N
824
+ map<string, string> custom_fields = 11;
825
+ }
826
+
827
+ message UpdatePrResponse {
828
+ bool success = 1;
829
+ string error = 2;
830
+ PullRequest pr = 3; // The updated PR
831
+ Manifest manifest = 4;
832
+ }
833
+
834
+ message DeletePrRequest {
835
+ string project_path = 1;
836
+ string pr_id = 2; // UUID or display number
837
+ }
838
+
839
+ message DeletePrResponse {
840
+ bool success = 1;
841
+ string error = 2;
842
+ Manifest manifest = 3; // Updated manifest after deletion
843
+ }
844
+
845
+ // ============ Features Messages ============
846
+
847
+ message GetFeatureStatusRequest {
848
+ string project_path = 1;
849
+ }
850
+
851
+ message GetFeatureStatusResponse {
852
+ bool initialized = 1; // features/ folder exists
853
+ bool has_compact = 2; // compact.md exists
854
+ bool has_instruction = 3; // instruction.md exists
855
+ uint32 migration_count = 4; // Number of migration files
856
+ uint32 uncompacted_count = 5; // Number of uncompacted issues
857
+ }
858
+
859
+ message ListUncompactedIssuesRequest {
860
+ string project_path = 1;
861
+ }
862
+
863
+ message ListUncompactedIssuesResponse {
864
+ repeated Issue issues = 1;
865
+ int32 total_count = 2;
866
+ }
867
+
868
+ message GetInstructionRequest {
869
+ string project_path = 1;
870
+ }
871
+
872
+ message GetInstructionResponse {
873
+ string content = 1; // instruction.md content
874
+ }
875
+
876
+ message GetCompactRequest {
877
+ string project_path = 1;
878
+ }
879
+
880
+ message GetCompactResponse {
881
+ bool exists = 1; // Whether compact.md exists
882
+ string content = 2; // compact.md content (empty if not exists)
883
+ }
884
+
885
+ message UpdateCompactRequest {
886
+ string project_path = 1;
887
+ string content = 2; // New compact.md content
888
+ }
889
+
890
+ message UpdateCompactResponse {
891
+ bool success = 1;
892
+ string error = 2;
893
+ }
894
+
895
+ message SaveMigrationRequest {
896
+ string project_path = 1;
897
+ string content = 2; // Migration file content (markdown with YAML frontmatter)
898
+ }
899
+
900
+ message SaveMigrationResponse {
901
+ bool success = 1;
902
+ string error = 2;
903
+ string filename = 3; // Created migration filename (e.g., "2025-12-06T19-30-00.md")
904
+ string path = 4; // Full relative path to migration file
905
+ }
906
+
907
+ message MarkIssuesCompactedRequest {
908
+ string project_path = 1;
909
+ repeated string issue_ids = 2; // UUIDs of issues to mark as compacted
910
+ }
911
+
912
+ message MarkIssuesCompactedResponse {
913
+ bool success = 1;
914
+ string error = 2;
915
+ uint32 marked_count = 3; // Number of issues successfully marked
916
+ }