centy 0.2.1 → 0.2.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.
Files changed (89) hide show
  1. package/dist/commands/get/issue.d.ts +0 -1
  2. package/dist/commands/get/issue.d.ts.map +1 -1
  3. package/dist/commands/get/issue.js +1 -38
  4. package/dist/commands/get/issue.js.map +1 -1
  5. package/dist/commands/info.d.ts.map +1 -1
  6. package/dist/commands/info.js +0 -3
  7. package/dist/commands/info.js.map +1 -1
  8. package/dist/commands/install/all.d.ts +1 -0
  9. package/dist/commands/install/all.d.ts.map +1 -1
  10. package/dist/commands/install/all.js +10 -1
  11. package/dist/commands/install/all.js.map +1 -1
  12. package/dist/commands/install/daemon.d.ts +1 -0
  13. package/dist/commands/install/daemon.d.ts.map +1 -1
  14. package/dist/commands/install/daemon.js +14 -1
  15. package/dist/commands/install/daemon.js.map +1 -1
  16. package/dist/commands/install/tui.d.ts +1 -0
  17. package/dist/commands/install/tui.d.ts.map +1 -1
  18. package/dist/commands/install/tui.js +7 -0
  19. package/dist/commands/install/tui.js.map +1 -1
  20. package/dist/commands/start.d.ts.map +1 -1
  21. package/dist/commands/start.js +1 -1
  22. package/dist/commands/start.js.map +1 -1
  23. package/dist/commands/workspace/open.d.ts +0 -1
  24. package/dist/commands/workspace/open.d.ts.map +1 -1
  25. package/dist/commands/workspace/open.js +10 -9
  26. package/dist/commands/workspace/open.js.map +1 -1
  27. package/dist/daemon/load-proto.d.ts +1 -3
  28. package/dist/daemon/load-proto.d.ts.map +1 -1
  29. package/dist/daemon/load-proto.js.map +1 -1
  30. package/dist/daemon/types.d.ts +2 -22
  31. package/dist/daemon/types.d.ts.map +1 -1
  32. package/dist/lib/install-binary/download.d.ts.map +1 -1
  33. package/dist/lib/install-binary/download.js +11 -2
  34. package/dist/lib/install-binary/download.js.map +1 -1
  35. package/dist/lib/install-binary/get-installed-version.d.ts +2 -0
  36. package/dist/lib/install-binary/get-installed-version.d.ts.map +1 -0
  37. package/dist/lib/install-binary/get-installed-version.js +27 -0
  38. package/dist/lib/install-binary/get-installed-version.js.map +1 -0
  39. package/dist/lib/install-binary/github-release.d.ts +3 -3
  40. package/dist/lib/install-binary/github-release.d.ts.map +1 -1
  41. package/dist/lib/install-binary/github-release.js +14 -5
  42. package/dist/lib/install-binary/github-release.js.map +1 -1
  43. package/dist/lib/install-binary/install-daemon.d.ts.map +1 -1
  44. package/dist/lib/install-binary/install-daemon.js +33 -1
  45. package/dist/lib/install-binary/install-daemon.js.map +1 -1
  46. package/dist/lib/install-binary/install-tui.d.ts.map +1 -1
  47. package/dist/lib/install-binary/install-tui.js +2 -1
  48. package/dist/lib/install-binary/install-tui.js.map +1 -1
  49. package/dist/lib/install-binary/prerelease.d.ts +22 -0
  50. package/dist/lib/install-binary/prerelease.d.ts.map +1 -0
  51. package/dist/lib/install-binary/prerelease.js +82 -0
  52. package/dist/lib/install-binary/prerelease.js.map +1 -0
  53. package/dist/lib/install-binary/types.d.ts +2 -0
  54. package/dist/lib/install-binary/types.d.ts.map +1 -1
  55. package/dist/lib/launch-tui/launch-tui.d.ts +1 -1
  56. package/dist/lib/launch-tui/launch-tui.d.ts.map +1 -1
  57. package/dist/lib/launch-tui/launch-tui.js +23 -36
  58. package/dist/lib/launch-tui/launch-tui.js.map +1 -1
  59. package/dist/lib/launch-tui-manager/launch-tui-manager.d.ts +1 -1
  60. package/dist/lib/launch-tui-manager/launch-tui-manager.d.ts.map +1 -1
  61. package/dist/lib/launch-tui-manager/launch-tui-manager.js +27 -36
  62. package/dist/lib/launch-tui-manager/launch-tui-manager.js.map +1 -1
  63. package/dist/utils/get-missing-binary-msg.d.ts +2 -0
  64. package/dist/utils/get-missing-binary-msg.d.ts.map +1 -0
  65. package/dist/utils/get-missing-binary-msg.js +7 -0
  66. package/dist/utils/get-missing-binary-msg.js.map +1 -0
  67. package/dist/utils/get-permission-denied-msg.d.ts +2 -0
  68. package/dist/utils/get-permission-denied-msg.d.ts.map +1 -0
  69. package/dist/utils/get-permission-denied-msg.js +12 -0
  70. package/dist/utils/get-permission-denied-msg.js.map +1 -0
  71. package/oclif.manifest.json +509 -585
  72. package/package.json +1 -1
  73. package/proto/centy.proto +485 -154
  74. package/dist/commands/update.d.ts +0 -14
  75. package/dist/commands/update.d.ts.map +0 -1
  76. package/dist/commands/update.js +0 -82
  77. package/dist/commands/update.js.map +0 -1
  78. package/dist/commands/version.d.ts +0 -14
  79. package/dist/commands/version.d.ts.map +0 -1
  80. package/dist/commands/version.js +0 -65
  81. package/dist/commands/version.js.map +0 -1
  82. package/dist/daemon/daemon-get-project-version.d.ts +0 -6
  83. package/dist/daemon/daemon-get-project-version.d.ts.map +0 -1
  84. package/dist/daemon/daemon-get-project-version.js +0 -9
  85. package/dist/daemon/daemon-get-project-version.js.map +0 -1
  86. package/dist/daemon/daemon-update-version.d.ts +0 -6
  87. package/dist/daemon/daemon-update-version.d.ts.map +0 -1
  88. package/dist/daemon/daemon-update-version.js +0 -9
  89. package/dist/daemon/daemon-update-version.js.map +0 -1
package/proto/centy.proto CHANGED
@@ -17,10 +17,10 @@ service CentyDaemon {
17
17
  rpc CreateIssue(CreateIssueRequest) returns (CreateIssueResponse);
18
18
 
19
19
  // Get a single issue by ID (UUID or legacy number)
20
- rpc GetIssue(GetIssueRequest) returns (Issue);
20
+ rpc GetIssue(GetIssueRequest) returns (GetIssueResponse);
21
21
 
22
22
  // Get a single issue by display number (human-readable number like 1, 2, 3)
23
- rpc GetIssueByDisplayNumber(GetIssueByDisplayNumberRequest) returns (Issue);
23
+ rpc GetIssueByDisplayNumber(GetIssueByDisplayNumberRequest) returns (GetIssueResponse);
24
24
 
25
25
  // Get issues by UUID across all tracked projects (global search)
26
26
  rpc GetIssuesByUuid(GetIssuesByUuidRequest) returns (GetIssuesByUuidResponse);
@@ -34,9 +34,15 @@ service CentyDaemon {
34
34
  // Update an existing issue
35
35
  rpc UpdateIssue(UpdateIssueRequest) returns (UpdateIssueResponse);
36
36
 
37
- // Delete an issue
37
+ // Delete an issue (hard delete - permanent removal)
38
38
  rpc DeleteIssue(DeleteIssueRequest) returns (DeleteIssueResponse);
39
39
 
40
+ // Soft-delete an issue (set deleted_at timestamp - recoverable)
41
+ rpc SoftDeleteIssue(SoftDeleteIssueRequest) returns (SoftDeleteIssueResponse);
42
+
43
+ // Restore a soft-deleted issue (clear deleted_at timestamp)
44
+ rpc RestoreIssue(RestoreIssueRequest) returns (RestoreIssueResponse);
45
+
40
46
  // Move an issue to another project
41
47
  rpc MoveIssue(MoveIssueRequest) returns (MoveIssueResponse);
42
48
 
@@ -47,10 +53,10 @@ service CentyDaemon {
47
53
  rpc GetNextIssueNumber(GetNextIssueNumberRequest) returns (GetNextIssueNumberResponse);
48
54
 
49
55
  // Read the manifest
50
- rpc GetManifest(GetManifestRequest) returns (Manifest);
56
+ rpc GetManifest(GetManifestRequest) returns (GetManifestResponse);
51
57
 
52
58
  // Read configuration
53
- rpc GetConfig(GetConfigRequest) returns (Config);
59
+ rpc GetConfig(GetConfigRequest) returns (GetConfigResponse);
54
60
 
55
61
  // Update configuration
56
62
  rpc UpdateConfig(UpdateConfigRequest) returns (UpdateConfigResponse);
@@ -64,7 +70,7 @@ service CentyDaemon {
64
70
  rpc CreateDoc(CreateDocRequest) returns (CreateDocResponse);
65
71
 
66
72
  // Get a single doc by slug
67
- rpc GetDoc(GetDocRequest) returns (Doc);
73
+ rpc GetDoc(GetDocRequest) returns (GetDocResponse);
68
74
 
69
75
  // Get docs by slug across all tracked projects (global search)
70
76
  rpc GetDocsBySlug(GetDocsBySlugRequest) returns (GetDocsBySlugResponse);
@@ -75,9 +81,15 @@ service CentyDaemon {
75
81
  // Update an existing doc
76
82
  rpc UpdateDoc(UpdateDocRequest) returns (UpdateDocResponse);
77
83
 
78
- // Delete a doc
84
+ // Delete a doc (hard delete - permanent removal)
79
85
  rpc DeleteDoc(DeleteDocRequest) returns (DeleteDocResponse);
80
86
 
87
+ // Soft-delete a doc (set deleted_at timestamp - recoverable)
88
+ rpc SoftDeleteDoc(SoftDeleteDocRequest) returns (SoftDeleteDocResponse);
89
+
90
+ // Restore a soft-deleted doc (clear deleted_at timestamp)
91
+ rpc RestoreDoc(RestoreDocRequest) returns (RestoreDocResponse);
92
+
81
93
  // Move a doc to another project
82
94
  rpc MoveDoc(MoveDocRequest) returns (MoveDocResponse);
83
95
 
@@ -152,22 +164,16 @@ service CentyDaemon {
152
164
  // Get daemon version info
153
165
  rpc GetDaemonInfo(GetDaemonInfoRequest) returns (DaemonInfo);
154
166
 
155
- // Get project version info and comparison with daemon
156
- rpc GetProjectVersion(GetProjectVersionRequest) returns (ProjectVersionInfo);
157
-
158
- // Update project to target version (runs migrations)
159
- rpc UpdateVersion(UpdateVersionRequest) returns (UpdateVersionResponse);
160
-
161
167
  // ============ PR RPCs ============
162
168
 
163
169
  // Create a new pull request
164
170
  rpc CreatePr(CreatePrRequest) returns (CreatePrResponse);
165
171
 
166
172
  // Get a single PR by ID (UUID)
167
- rpc GetPr(GetPrRequest) returns (PullRequest);
173
+ rpc GetPr(GetPrRequest) returns (GetPrResponse);
168
174
 
169
175
  // Get a single PR by display number (human-readable number like 1, 2, 3)
170
- rpc GetPrByDisplayNumber(GetPrByDisplayNumberRequest) returns (PullRequest);
176
+ rpc GetPrByDisplayNumber(GetPrByDisplayNumberRequest) returns (GetPrResponse);
171
177
 
172
178
  // Get PRs by UUID across all tracked projects (global search)
173
179
  rpc GetPrsByUuid(GetPrsByUuidRequest) returns (GetPrsByUuidResponse);
@@ -178,9 +184,15 @@ service CentyDaemon {
178
184
  // Update an existing PR
179
185
  rpc UpdatePr(UpdatePrRequest) returns (UpdatePrResponse);
180
186
 
181
- // Delete a PR
187
+ // Delete a PR (hard delete - permanent removal)
182
188
  rpc DeletePr(DeletePrRequest) returns (DeletePrResponse);
183
189
 
190
+ // Soft-delete a PR (set deleted_at timestamp - recoverable)
191
+ rpc SoftDeletePr(SoftDeletePrRequest) returns (SoftDeletePrResponse);
192
+
193
+ // Restore a soft-deleted PR (clear deleted_at timestamp)
194
+ rpc RestorePr(RestorePrRequest) returns (RestorePrResponse);
195
+
184
196
  // Get the next PR number
185
197
  rpc GetNextPrNumber(GetNextPrNumberRequest) returns (GetNextPrNumberResponse);
186
198
 
@@ -215,27 +227,25 @@ service CentyDaemon {
215
227
  // Mark multiple issues as compacted
216
228
  rpc MarkIssuesCompacted(MarkIssuesCompactedRequest) returns (MarkIssuesCompactedResponse);
217
229
 
218
- // ============ LLM Agent RPCs ============
230
+ // ============ Temp Workspace RPCs ============
219
231
 
220
- // Spawn an LLM agent to work on an issue
221
- rpc SpawnAgent(SpawnAgentRequest) returns (SpawnAgentResponse);
232
+ // Get list of supported workspace editors
233
+ rpc GetSupportedEditors(GetSupportedEditorsRequest) returns (GetSupportedEditorsResponse);
222
234
 
223
- // Get current LLM work session for a project
224
- rpc GetLlmWork(GetLlmWorkRequest) returns (GetLlmWorkResponse);
235
+ // Open a project in a temporary VS Code workspace
236
+ rpc OpenInTempVscode(OpenInTempWorkspaceRequest) returns (OpenInTempWorkspaceResponse);
225
237
 
226
- // Clear the active LLM work tracking
227
- rpc ClearLlmWork(ClearLlmWorkRequest) returns (ClearLlmWorkResponse);
238
+ // Open a project in a temporary terminal workspace
239
+ rpc OpenInTempTerminal(OpenInTempWorkspaceRequest) returns (OpenInTempWorkspaceResponse);
228
240
 
229
- // Get local LLM configuration (config.local.json)
230
- rpc GetLocalLlmConfig(GetLocalLlmConfigRequest) returns (GetLocalLlmConfigResponse);
241
+ // Open an agent in a terminal for working on an issue
242
+ rpc OpenAgentInTerminal(OpenAgentInTerminalRequest) returns (OpenAgentInTerminalResponse);
231
243
 
232
- // Update local LLM configuration
233
- rpc UpdateLocalLlmConfig(UpdateLocalLlmConfigRequest) returns (UpdateLocalLlmConfigResponse);
244
+ // Open a standalone workspace in VS Code (not tied to an issue)
245
+ rpc OpenStandaloneWorkspaceVscode(OpenStandaloneWorkspaceRequest) returns (OpenStandaloneWorkspaceResponse);
234
246
 
235
- // ============ Temp Workspace RPCs ============
236
-
237
- // Open a project in a temporary VS Code workspace
238
- rpc OpenInTempVscode(OpenInTempVscodeRequest) returns (OpenInTempVscodeResponse);
247
+ // Open a standalone workspace in terminal (not tied to an issue)
248
+ rpc OpenStandaloneWorkspaceTerminal(OpenStandaloneWorkspaceRequest) returns (OpenStandaloneWorkspaceResponse);
239
249
 
240
250
  // List all temp workspaces
241
251
  rpc ListTempWorkspaces(ListTempWorkspacesRequest) returns (ListTempWorkspacesResponse);
@@ -266,7 +276,7 @@ service CentyDaemon {
266
276
  rpc CreateUser(CreateUserRequest) returns (CreateUserResponse);
267
277
 
268
278
  // Get a single user by ID
269
- rpc GetUser(GetUserRequest) returns (User);
279
+ rpc GetUser(GetUserRequest) returns (GetUserResponse);
270
280
 
271
281
  // List all users
272
282
  rpc ListUsers(ListUsersRequest) returns (ListUsersResponse);
@@ -274,11 +284,42 @@ service CentyDaemon {
274
284
  // Update an existing user
275
285
  rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse);
276
286
 
277
- // Delete a user
287
+ // Delete a user (hard delete - permanent removal)
278
288
  rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse);
279
289
 
290
+ // Soft-delete a user (set deleted_at timestamp - recoverable)
291
+ rpc SoftDeleteUser(SoftDeleteUserRequest) returns (SoftDeleteUserResponse);
292
+
293
+ // Restore a soft-deleted user (clear deleted_at timestamp)
294
+ rpc RestoreUser(RestoreUserRequest) returns (RestoreUserResponse);
295
+
280
296
  // Sync users from git history
281
297
  rpc SyncUsers(SyncUsersRequest) returns (SyncUsersResponse);
298
+
299
+ // ============ Entity Actions RPCs ============
300
+
301
+ // Get available actions for an entity (contextual based on entity state)
302
+ rpc GetEntityActions(GetEntityActionsRequest) returns (GetEntityActionsResponse);
303
+
304
+ // ============ Sync RPCs ============
305
+
306
+ // List all sync conflicts for a project
307
+ rpc ListSyncConflicts(ListSyncConflictsRequest) returns (ListSyncConflictsResponse);
308
+
309
+ // Get a specific sync conflict by ID
310
+ rpc GetSyncConflict(GetSyncConflictRequest) returns (GetSyncConflictResponse);
311
+
312
+ // Resolve a sync conflict
313
+ rpc ResolveSyncConflict(ResolveSyncConflictRequest) returns (ResolveSyncConflictResponse);
314
+
315
+ // Get sync status for a project
316
+ rpc GetSyncStatus(GetSyncStatusRequest) returns (GetSyncStatusResponse);
317
+
318
+ // Manually trigger a sync pull
319
+ rpc SyncPull(SyncPullRequest) returns (SyncPullResponse);
320
+
321
+ // Manually trigger a sync push
322
+ rpc SyncPush(SyncPushRequest) returns (SyncPushResponse);
282
323
  }
283
324
 
284
325
  // ============ Init Messages ============
@@ -359,6 +400,7 @@ message CreateIssueRequest {
359
400
  map<string, string> custom_fields = 6;
360
401
  string template = 7; // Optional template name (without .md extension)
361
402
  bool draft = 8; // Create as draft (default: false)
403
+ bool is_org_issue = 9; // Create as organization-wide issue (syncs to all org projects)
362
404
  }
363
405
 
364
406
  message CreateIssueResponse {
@@ -379,6 +421,12 @@ message CreateIssueResponse {
379
421
 
380
422
  // The updated manifest
381
423
  Manifest manifest = 7;
424
+
425
+ // Org-level display number (only for org issues, 0 if not an org issue)
426
+ uint32 org_display_number = 8;
427
+
428
+ // Results from syncing to other org projects (org issues only)
429
+ repeated OrgDocSyncResult sync_results = 9;
382
430
  }
383
431
 
384
432
  message GetNextIssueNumberRequest {
@@ -417,6 +465,10 @@ message IssueMetadata {
417
465
  bool compacted = 8; // Whether issue has been compacted into features
418
466
  string compacted_at = 9; // ISO timestamp when compacted (empty if not)
419
467
  bool draft = 10; // Whether this issue is a draft
468
+ string deleted_at = 11; // ISO timestamp when soft-deleted (empty if not deleted)
469
+ bool is_org_issue = 12; // Whether this is an organization-level issue
470
+ string org_slug = 13; // Organization slug (empty if not org issue)
471
+ uint32 org_display_number = 14; // Org-scoped display number (0 if not org issue)
420
472
  }
421
473
 
422
474
  message GetIssueRequest {
@@ -429,6 +481,13 @@ message GetIssueByDisplayNumberRequest {
429
481
  uint32 display_number = 2; // Human-readable number (1, 2, 3...)
430
482
  }
431
483
 
484
+ // Wrapper response for GetIssue and GetIssueByDisplayNumber RPCs
485
+ message GetIssueResponse {
486
+ bool success = 1;
487
+ string error = 2;
488
+ Issue issue = 3;
489
+ }
490
+
432
491
  // ============ Global Issue Search Messages ============
433
492
 
434
493
  message GetIssuesByUuidRequest {
@@ -456,6 +515,7 @@ message ListIssuesRequest {
456
515
  string status = 2; // Filter by status (empty = all)
457
516
  int32 priority = 3; // Filter by priority (0 = all)
458
517
  optional bool draft = 4; // Filter by draft status (absent = all, true = drafts only, false = non-drafts only)
518
+ bool include_deleted = 5; // Include soft-deleted issues (default: false)
459
519
  }
460
520
 
461
521
  message ListIssuesResponse {
@@ -507,6 +567,7 @@ message UpdateIssueResponse {
507
567
  string error = 2;
508
568
  Issue issue = 3; // The updated issue
509
569
  Manifest manifest = 4;
570
+ repeated OrgDocSyncResult sync_results = 5; // Results from syncing to other org projects (org issues only)
510
571
  }
511
572
 
512
573
  message DeleteIssueRequest {
@@ -520,6 +581,32 @@ message DeleteIssueResponse {
520
581
  Manifest manifest = 3; // Updated manifest after deletion
521
582
  }
522
583
 
584
+ // Soft-delete an issue (set deleted_at timestamp)
585
+ message SoftDeleteIssueRequest {
586
+ string project_path = 1;
587
+ string issue_id = 2; // UUID or legacy issue number
588
+ }
589
+
590
+ message SoftDeleteIssueResponse {
591
+ bool success = 1;
592
+ string error = 2;
593
+ Issue issue = 3; // The soft-deleted issue (with deleted_at set)
594
+ Manifest manifest = 4; // Updated manifest
595
+ }
596
+
597
+ // Restore a soft-deleted issue (clear deleted_at timestamp)
598
+ message RestoreIssueRequest {
599
+ string project_path = 1;
600
+ string issue_id = 2; // UUID or legacy issue number
601
+ }
602
+
603
+ message RestoreIssueResponse {
604
+ bool success = 1;
605
+ string error = 2;
606
+ Issue issue = 3; // The restored issue (with deleted_at cleared)
607
+ Manifest manifest = 4; // Updated manifest
608
+ }
609
+
523
610
  // ============ Issue Move/Duplicate Messages ============
524
611
 
525
612
  message MoveIssueRequest {
@@ -558,6 +645,13 @@ message GetManifestRequest {
558
645
  string project_path = 1;
559
646
  }
560
647
 
648
+ // Wrapper response for GetManifest RPC
649
+ message GetManifestResponse {
650
+ bool success = 1;
651
+ string error = 2;
652
+ Manifest manifest = 3;
653
+ }
654
+
561
655
  message Manifest {
562
656
  int32 schema_version = 1;
563
657
  string centy_version = 2;
@@ -584,6 +678,13 @@ message GetConfigRequest {
584
678
  string project_path = 1;
585
679
  }
586
680
 
681
+ // Wrapper response for GetConfig RPC
682
+ message GetConfigResponse {
683
+ bool success = 1;
684
+ string error = 2;
685
+ Config config = 3;
686
+ }
687
+
587
688
  message Config {
588
689
  repeated CustomFieldDefinition custom_fields = 1;
589
690
  map<string, string> defaults = 2;
@@ -607,8 +708,9 @@ message CustomFieldDefinition {
607
708
 
608
709
  message LlmConfig {
609
710
  bool auto_close_on_complete = 1; // Auto-close issues when marked complete by LLM
610
- bool update_status_on_start = 2; // Update status to in-progress when LLM starts work
711
+ optional bool update_status_on_start = 2; // Update status to in-progress when LLM starts work (null = prompt user)
611
712
  bool allow_direct_edits = 3; // Allow LLM to directly edit issue files
713
+ WorkspaceMode default_workspace_mode = 4; // Default workspace mode for agent operations
612
714
  }
613
715
 
614
716
  // Custom link type definition (for custom relationship types)
@@ -648,6 +750,14 @@ message CreateDocRequest {
648
750
  string content = 3; // Markdown content
649
751
  string slug = 4; // Optional custom slug (auto-generated from title if empty)
650
752
  string template = 5; // Optional template name (without .md extension)
753
+ bool is_org_doc = 6; // Create as organization-wide doc (syncs to all org projects)
754
+ }
755
+
756
+ // Result of syncing an org doc to a project
757
+ message OrgDocSyncResult {
758
+ string project_path = 1; // Path of target project
759
+ bool success = 2; // Whether sync succeeded
760
+ string error = 3; // Error message if failed
651
761
  }
652
762
 
653
763
  message CreateDocResponse {
@@ -656,6 +766,7 @@ message CreateDocResponse {
656
766
  string slug = 3; // The created doc slug
657
767
  string created_file = 4; // Path to created file
658
768
  Manifest manifest = 5;
769
+ repeated OrgDocSyncResult sync_results = 6; // Results from syncing to other org projects
659
770
  }
660
771
 
661
772
  message GetDocRequest {
@@ -663,6 +774,13 @@ message GetDocRequest {
663
774
  string slug = 2; // e.g., "getting-started"
664
775
  }
665
776
 
777
+ // Wrapper response for GetDoc RPC
778
+ message GetDocResponse {
779
+ bool success = 1;
780
+ string error = 2;
781
+ Doc doc = 3;
782
+ }
783
+
666
784
  // ============ Global Doc Search Messages ============
667
785
 
668
786
  message GetDocsBySlugRequest {
@@ -685,6 +803,7 @@ message GetDocsBySlugResponse {
685
803
 
686
804
  message ListDocsRequest {
687
805
  string project_path = 1;
806
+ bool include_deleted = 2; // Include soft-deleted docs (default: false)
688
807
  }
689
808
 
690
809
  message ListDocsResponse {
@@ -703,6 +822,9 @@ message Doc {
703
822
  message DocMetadata {
704
823
  string created_at = 1; // ISO timestamp
705
824
  string updated_at = 2; // ISO timestamp
825
+ string deleted_at = 3; // ISO timestamp when soft-deleted (empty if not deleted)
826
+ bool is_org_doc = 4; // Whether this is an organization-level doc
827
+ string org_slug = 5; // Organization slug (for org docs)
706
828
  }
707
829
 
708
830
  message UpdateDocRequest {
@@ -720,6 +842,7 @@ message UpdateDocResponse {
720
842
  string error = 2;
721
843
  Doc doc = 3; // The updated doc
722
844
  Manifest manifest = 4;
845
+ repeated OrgDocSyncResult sync_results = 5; // Results from syncing to other org projects (org docs only)
723
846
  }
724
847
 
725
848
  message DeleteDocRequest {
@@ -733,6 +856,32 @@ message DeleteDocResponse {
733
856
  Manifest manifest = 3;
734
857
  }
735
858
 
859
+ // Soft-delete a doc (set deleted_at timestamp)
860
+ message SoftDeleteDocRequest {
861
+ string project_path = 1;
862
+ string slug = 2;
863
+ }
864
+
865
+ message SoftDeleteDocResponse {
866
+ bool success = 1;
867
+ string error = 2;
868
+ Doc doc = 3; // The soft-deleted doc (with deleted_at set)
869
+ Manifest manifest = 4;
870
+ }
871
+
872
+ // Restore a soft-deleted doc (clear deleted_at timestamp)
873
+ message RestoreDocRequest {
874
+ string project_path = 1;
875
+ string slug = 2;
876
+ }
877
+
878
+ message RestoreDocResponse {
879
+ bool success = 1;
880
+ string error = 2;
881
+ Doc doc = 3; // The restored doc (with deleted_at cleared)
882
+ Manifest manifest = 4;
883
+ }
884
+
736
885
  // ============ Doc Move/Duplicate Messages ============
737
886
 
738
887
  message MoveDocRequest {
@@ -1035,35 +1184,10 @@ message GetDaemonInfoRequest {}
1035
1184
 
1036
1185
  message DaemonInfo {
1037
1186
  string version = 1; // Current daemon version (e.g., "0.1.0")
1038
- repeated string available_versions = 2; // All versions we can migrate to
1039
1187
  string binary_path = 3; // Absolute path to the running daemon binary
1040
1188
  bool vscode_available = 4; // Whether VS Code is installed and accessible
1041
1189
  }
1042
1190
 
1043
- message GetProjectVersionRequest {
1044
- string project_path = 1;
1045
- }
1046
-
1047
- message ProjectVersionInfo {
1048
- string project_version = 1; // Version from config (or default)
1049
- string daemon_version = 2; // Current daemon version
1050
- string comparison = 3; // "equal", "project_behind", "project_ahead"
1051
- bool degraded_mode = 4; // True if project > daemon
1052
- }
1053
-
1054
- message UpdateVersionRequest {
1055
- string project_path = 1;
1056
- string target_version = 2; // Target version to migrate to
1057
- }
1058
-
1059
- message UpdateVersionResponse {
1060
- bool success = 1;
1061
- string error = 2;
1062
- string from_version = 3;
1063
- string to_version = 4;
1064
- repeated string migrations_applied = 5;
1065
- }
1066
-
1067
1191
  // ============ Daemon Control Messages ============
1068
1192
 
1069
1193
  message ShutdownRequest {
@@ -1158,6 +1282,7 @@ message PrMetadata {
1158
1282
  string merged_at = 11; // ISO timestamp (empty if not merged)
1159
1283
  string closed_at = 12; // ISO timestamp (empty if not closed)
1160
1284
  map<string, string> custom_fields = 13;
1285
+ string deleted_at = 14; // ISO timestamp when soft-deleted (empty if not deleted)
1161
1286
  }
1162
1287
 
1163
1288
  message GetPrRequest {
@@ -1170,6 +1295,13 @@ message GetPrByDisplayNumberRequest {
1170
1295
  uint32 display_number = 2; // Human-readable number (1, 2, 3...)
1171
1296
  }
1172
1297
 
1298
+ // Wrapper response for GetPr and GetPrByDisplayNumber RPCs
1299
+ message GetPrResponse {
1300
+ bool success = 1;
1301
+ string error = 2;
1302
+ PullRequest pr = 3;
1303
+ }
1304
+
1173
1305
  // ============ Global PR Search Messages ============
1174
1306
 
1175
1307
  message GetPrsByUuidRequest {
@@ -1198,6 +1330,7 @@ message ListPrsRequest {
1198
1330
  string source_branch = 3; // Filter by source branch (empty = all)
1199
1331
  string target_branch = 4; // Filter by target branch (empty = all)
1200
1332
  int32 priority = 5; // Filter by priority (0 = all)
1333
+ bool include_deleted = 6; // Include soft-deleted PRs (default: false)
1201
1334
  }
1202
1335
 
1203
1336
  message ListPrsResponse {
@@ -1239,6 +1372,32 @@ message DeletePrResponse {
1239
1372
  Manifest manifest = 3; // Updated manifest after deletion
1240
1373
  }
1241
1374
 
1375
+ // Soft-delete a PR (set deleted_at timestamp)
1376
+ message SoftDeletePrRequest {
1377
+ string project_path = 1;
1378
+ string pr_id = 2; // UUID or display number
1379
+ }
1380
+
1381
+ message SoftDeletePrResponse {
1382
+ bool success = 1;
1383
+ string error = 2;
1384
+ PullRequest pr = 3; // The soft-deleted PR (with deleted_at set)
1385
+ Manifest manifest = 4;
1386
+ }
1387
+
1388
+ // Restore a soft-deleted PR (clear deleted_at timestamp)
1389
+ message RestorePrRequest {
1390
+ string project_path = 1;
1391
+ string pr_id = 2; // UUID or display number
1392
+ }
1393
+
1394
+ message RestorePrResponse {
1395
+ bool success = 1;
1396
+ string error = 2;
1397
+ PullRequest pr = 3; // The restored PR (with deleted_at cleared)
1398
+ Manifest manifest = 4;
1399
+ }
1400
+
1242
1401
  // ============ Features Messages ============
1243
1402
 
1244
1403
  message GetFeatureStatusRequest {
@@ -1249,7 +1408,6 @@ message GetFeatureStatusResponse {
1249
1408
  bool initialized = 1; // features/ folder exists
1250
1409
  bool has_compact = 2; // compact.md exists
1251
1410
  bool has_instruction = 3; // instruction.md exists
1252
- uint32 migration_count = 4; // Number of migration files
1253
1411
  uint32 uncompacted_count = 5; // Number of uncompacted issues
1254
1412
  }
1255
1413
 
@@ -1312,145 +1470,127 @@ message MarkIssuesCompactedResponse {
1312
1470
  uint32 marked_count = 3; // Number of issues successfully marked
1313
1471
  }
1314
1472
 
1315
- // ============ LLM Agent Messages ============
1316
-
1317
- // Predefined agent types
1318
- enum AgentType {
1319
- AGENT_TYPE_UNSPECIFIED = 0;
1320
- AGENT_TYPE_CLAUDE = 1;
1321
- AGENT_TYPE_GEMINI = 2;
1322
- AGENT_TYPE_CODEX = 3;
1323
- AGENT_TYPE_OPENCODE = 4;
1324
- AGENT_TYPE_CUSTOM = 5;
1325
- }
1473
+ // ============ Temp Workspace Messages ============
1326
1474
 
1327
- // Action types for LLM agents
1475
+ // Action types for workspace operations
1328
1476
  enum LlmAction {
1329
1477
  LLM_ACTION_UNSPECIFIED = 0;
1330
1478
  LLM_ACTION_PLAN = 1;
1331
1479
  LLM_ACTION_IMPLEMENT = 2;
1480
+ LLM_ACTION_DEEPDIVE = 3;
1332
1481
  }
1333
1482
 
1334
- // Agent configuration (stored in config.local.json)
1335
- message AgentConfig {
1336
- AgentType agent_type = 1;
1337
- string name = 2; // Display name (e.g., "claude", "my-agent")
1338
- string command = 3; // CLI command (e.g., "claude", "/path/to/agent")
1339
- repeated string default_args = 4; // Default arguments for the CLI
1340
- string plan_template = 5; // Template name for "plan" action
1341
- string implement_template = 6; // Template name for "implement" action
1483
+ // Workspace mode for agent operations
1484
+ enum WorkspaceMode {
1485
+ WORKSPACE_MODE_UNSPECIFIED = 0; // Use project default or prompt user
1486
+ WORKSPACE_MODE_TEMP = 1; // Create temporary worktree
1487
+ WORKSPACE_MODE_CURRENT = 2; // Use current project directory
1342
1488
  }
1343
1489
 
1344
- // Local LLM configuration (config.local.json - not version controlled)
1345
- message LocalLlmConfig {
1346
- string default_agent = 1; // Name of default agent to use
1347
- repeated AgentConfig agents = 2; // Available agents
1348
- map<string, string> env_vars = 3; // Environment variables for agents
1490
+ // Editor type for opening workspaces
1491
+ enum EditorType {
1492
+ EDITOR_TYPE_UNSPECIFIED = 0;
1493
+ EDITOR_TYPE_VSCODE = 1; // VS Code editor
1494
+ EDITOR_TYPE_TERMINAL = 2; // OS terminal
1349
1495
  }
1350
1496
 
1351
- // Request to spawn an LLM agent
1352
- message SpawnAgentRequest {
1353
- string project_path = 1;
1354
- string issue_id = 2; // UUID or display number of issue to work on
1355
- LlmAction action = 3; // "plan" or "implement"
1356
- string agent_name = 4; // Agent to use (empty = default)
1357
- repeated string extra_args = 5; // Additional CLI arguments
1358
- }
1497
+ // Request to get supported editors (empty request)
1498
+ message GetSupportedEditorsRequest {}
1359
1499
 
1360
- message SpawnAgentResponse {
1361
- bool success = 1;
1362
- string error = 2;
1363
- string agent_name = 3; // Which agent was spawned
1364
- string issue_id = 4; // Resolved issue UUID
1365
- uint32 display_number = 5; // Issue display number
1366
- string prompt_preview = 6; // First 500 chars of generated prompt
1500
+ // Information about a supported editor
1501
+ message EditorInfo {
1502
+ EditorType editor_type = 1; // Editor type enum value
1503
+ string name = 2; // Display name (e.g., "VS Code", "Terminal")
1504
+ string description = 3; // Brief description
1505
+ bool available = 4; // Whether this editor is available on the current system
1367
1506
  }
1368
1507
 
1369
- // Get active LLM work for a project
1370
- message GetLlmWorkRequest {
1371
- string project_path = 1;
1508
+ // Response with list of supported editors
1509
+ message GetSupportedEditorsResponse {
1510
+ repeated EditorInfo editors = 1; // List of supported editors
1372
1511
  }
1373
1512
 
1374
- message LlmWorkSession {
1375
- string issue_id = 1;
1376
- uint32 display_number = 2;
1377
- string issue_title = 3;
1378
- string agent_name = 4;
1379
- LlmAction action = 5;
1380
- string started_at = 6; // ISO timestamp
1381
- uint32 pid = 7; // Process ID (0 if unknown/exited)
1382
- }
1383
-
1384
- message GetLlmWorkResponse {
1385
- bool has_active_work = 1;
1386
- LlmWorkSession session = 2; // Current session (if any)
1387
- }
1388
-
1389
- // Clear active work tracking
1390
- message ClearLlmWorkRequest {
1391
- string project_path = 1;
1513
+ // Shared request for OpenInTempVscode and OpenInTempTerminal
1514
+ message OpenInTempWorkspaceRequest {
1515
+ string project_path = 1; // Source project path
1516
+ string issue_id = 2; // Issue UUID or display number
1517
+ LlmAction action = 3; // Plan or Implement
1518
+ string agent_name = 4; // Agent to use (empty = default)
1519
+ uint32 ttl_hours = 5; // Custom TTL in hours (0 = use default 12h)
1392
1520
  }
1393
1521
 
1394
- message ClearLlmWorkResponse {
1522
+ // Shared response for OpenInTempVscode and OpenInTempTerminal
1523
+ message OpenInTempWorkspaceResponse {
1395
1524
  bool success = 1;
1396
1525
  string error = 2;
1526
+ string workspace_path = 3; // Path to the temp workspace
1527
+ string issue_id = 4; // Resolved issue UUID
1528
+ uint32 display_number = 5; // Issue display number
1529
+ string expires_at = 6; // ISO timestamp when workspace expires
1530
+ bool editor_opened = 7; // Whether the editor (VS Code or Terminal) was successfully opened
1531
+ bool requires_status_config = 8; // True if user must configure update_status_on_start setting
1532
+ bool workspace_reused = 9; // True if an existing workspace was reopened instead of creating new
1533
+ string original_created_at = 10; // Original creation timestamp (only set if workspace_reused is true)
1397
1534
  }
1398
1535
 
1399
- // Get local LLM config
1400
- message GetLocalLlmConfigRequest {
1401
- string project_path = 1; // Empty = global config only
1402
- }
1403
-
1404
- message GetLocalLlmConfigResponse {
1405
- LocalLlmConfig config = 1;
1406
- bool has_project_config = 2;
1407
- bool has_global_config = 3;
1408
- }
1409
-
1410
- // Update local LLM config
1411
- message UpdateLocalLlmConfigRequest {
1412
- string project_path = 1; // Empty = update global config
1413
- LocalLlmConfig config = 2;
1536
+ // Request to open an agent in a terminal
1537
+ message OpenAgentInTerminalRequest {
1538
+ string project_path = 1; // Source project path
1539
+ string issue_id = 2; // Issue UUID or display number
1540
+ string agent_name = 3; // Agent to use (empty = default)
1541
+ WorkspaceMode workspace_mode = 4; // Temp worktree or current project
1542
+ uint32 ttl_hours = 5; // Custom TTL in hours (0 = default, only for temp mode)
1414
1543
  }
1415
1544
 
1416
- message UpdateLocalLlmConfigResponse {
1545
+ message OpenAgentInTerminalResponse {
1417
1546
  bool success = 1;
1418
1547
  string error = 2;
1419
- LocalLlmConfig config = 3;
1548
+ string working_directory = 3; // Path where agent was launched
1549
+ string issue_id = 4; // Resolved issue UUID
1550
+ uint32 display_number = 5; // Issue display number
1551
+ string agent_command = 6; // The agent command that was executed
1552
+ bool terminal_opened = 7; // Whether terminal was successfully opened
1553
+ string expires_at = 8; // ISO timestamp (only for temp mode)
1554
+ bool requires_status_config = 9; // True if user must configure update_status_on_start setting
1420
1555
  }
1421
1556
 
1422
- // ============ Temp Workspace Messages ============
1423
-
1424
- // Request to open a project in a temporary VS Code workspace
1425
- message OpenInTempVscodeRequest {
1557
+ // Request to open a standalone workspace (not tied to an issue)
1558
+ message OpenStandaloneWorkspaceRequest {
1426
1559
  string project_path = 1; // Source project path
1427
- string issue_id = 2; // Issue UUID or display number
1428
- LlmAction action = 3; // Plan or Implement
1429
- string agent_name = 4; // Agent to use (empty = default)
1430
- uint32 ttl_hours = 5; // Custom TTL in hours (0 = use default 12h)
1560
+ string name = 2; // Optional custom name for the workspace
1561
+ string description = 3; // Optional description/goals for this workspace
1562
+ uint32 ttl_hours = 4; // Custom TTL in hours (0 = use default 12h)
1563
+ string agent_name = 5; // Agent to use (empty = default)
1431
1564
  }
1432
1565
 
1433
- message OpenInTempVscodeResponse {
1566
+ // Response for opening a standalone workspace
1567
+ message OpenStandaloneWorkspaceResponse {
1434
1568
  bool success = 1;
1435
1569
  string error = 2;
1436
1570
  string workspace_path = 3; // Path to the temp workspace
1437
- string issue_id = 4; // Resolved issue UUID
1438
- uint32 display_number = 5; // Issue display number
1571
+ string workspace_id = 4; // Unique workspace identifier (UUID)
1572
+ string name = 5; // Workspace name (provided or generated)
1439
1573
  string expires_at = 6; // ISO timestamp when workspace expires
1440
- bool vscode_opened = 7; // Whether VS Code was successfully opened
1574
+ bool editor_opened = 7; // Whether the editor was successfully opened
1575
+ bool workspace_reused = 8; // True if an existing workspace was reopened
1576
+ string original_created_at = 9; // Original creation timestamp (only set if workspace_reused)
1441
1577
  }
1442
1578
 
1443
1579
  // A temporary workspace entry
1444
1580
  message TempWorkspace {
1445
1581
  string workspace_path = 1; // Absolute path to temp workspace
1446
1582
  string source_project_path = 2; // Original project path
1447
- string issue_id = 3; // Issue UUID
1448
- uint32 issue_display_number = 4; // Issue display number
1449
- string issue_title = 5; // Issue title
1583
+ string issue_id = 3; // Issue UUID (empty for standalone workspaces)
1584
+ uint32 issue_display_number = 4; // Issue display number (0 for standalone)
1585
+ string issue_title = 5; // Issue title (empty for standalone)
1450
1586
  string agent_name = 6; // Agent being used
1451
1587
  LlmAction action = 7; // Plan or Implement
1452
1588
  string created_at = 8; // ISO timestamp
1453
1589
  string expires_at = 9; // ISO timestamp when workspace expires
1590
+ bool is_standalone = 10; // True if this is a standalone workspace (not tied to an issue)
1591
+ string workspace_id = 11; // Unique workspace ID (UUID, used for standalone workspaces)
1592
+ string workspace_name = 12; // Custom workspace name (for standalone)
1593
+ string workspace_description = 13; // Custom workspace description (for standalone)
1454
1594
  }
1455
1595
 
1456
1596
  message ListTempWorkspacesRequest {
@@ -1576,6 +1716,7 @@ message User {
1576
1716
  repeated string git_usernames = 4; // Git usernames (e.g., GitHub handles)
1577
1717
  string created_at = 5; // ISO timestamp
1578
1718
  string updated_at = 6; // ISO timestamp
1719
+ string deleted_at = 7; // ISO timestamp when soft-deleted (empty if not deleted)
1579
1720
  }
1580
1721
 
1581
1722
  message CreateUserRequest {
@@ -1598,9 +1739,17 @@ message GetUserRequest {
1598
1739
  string user_id = 2; // User ID (slug format)
1599
1740
  }
1600
1741
 
1742
+ // Wrapper response for GetUser RPC
1743
+ message GetUserResponse {
1744
+ bool success = 1;
1745
+ string error = 2;
1746
+ User user = 3;
1747
+ }
1748
+
1601
1749
  message ListUsersRequest {
1602
1750
  string project_path = 1;
1603
1751
  string git_username = 2; // Optional: filter by git username
1752
+ bool include_deleted = 3; // Include soft-deleted users (default: false)
1604
1753
  }
1605
1754
 
1606
1755
  message ListUsersResponse {
@@ -1634,6 +1783,32 @@ message DeleteUserResponse {
1634
1783
  Manifest manifest = 3;
1635
1784
  }
1636
1785
 
1786
+ // Soft-delete a user (set deleted_at timestamp)
1787
+ message SoftDeleteUserRequest {
1788
+ string project_path = 1;
1789
+ string user_id = 2; // User ID (slug format)
1790
+ }
1791
+
1792
+ message SoftDeleteUserResponse {
1793
+ bool success = 1;
1794
+ string error = 2;
1795
+ User user = 3; // The soft-deleted user (with deleted_at set)
1796
+ Manifest manifest = 4;
1797
+ }
1798
+
1799
+ // Restore a soft-deleted user (clear deleted_at timestamp)
1800
+ message RestoreUserRequest {
1801
+ string project_path = 1;
1802
+ string user_id = 2; // User ID (slug format)
1803
+ }
1804
+
1805
+ message RestoreUserResponse {
1806
+ bool success = 1;
1807
+ string error = 2;
1808
+ User user = 3; // The restored user (with deleted_at cleared)
1809
+ Manifest manifest = 4;
1810
+ }
1811
+
1637
1812
  // Git contributor found in history
1638
1813
  message GitContributor {
1639
1814
  string name = 1;
@@ -1655,3 +1830,159 @@ message SyncUsersResponse {
1655
1830
  repeated GitContributor would_skip = 7; // For dry run: users that would be skipped
1656
1831
  Manifest manifest = 8;
1657
1832
  }
1833
+
1834
+ // ============ Entity Actions Messages ============
1835
+
1836
+ // Entity type for actions
1837
+ enum EntityType {
1838
+ ENTITY_TYPE_UNSPECIFIED = 0;
1839
+ ENTITY_TYPE_ISSUE = 1;
1840
+ ENTITY_TYPE_PR = 2;
1841
+ ENTITY_TYPE_DOC = 3;
1842
+ }
1843
+
1844
+ // Action category for grouping in UI
1845
+ enum ActionCategory {
1846
+ ACTION_CATEGORY_UNSPECIFIED = 0;
1847
+ ACTION_CATEGORY_CRUD = 1; // Create, Delete, Duplicate, Move
1848
+ ACTION_CATEGORY_MODE = 2; // Plan, Implement (LLM actions)
1849
+ ACTION_CATEGORY_STATUS = 3; // Status/state changes
1850
+ ACTION_CATEGORY_EXTERNAL = 4; // Open in VSCode, external tools
1851
+ }
1852
+
1853
+ // An action that can be performed on an entity
1854
+ message EntityAction {
1855
+ string id = 1; // Action identifier (e.g., "delete", "duplicate", "status:closed")
1856
+ string label = 2; // Human-readable label (e.g., "Delete", "Mark as Closed")
1857
+ ActionCategory category = 3; // Category for grouping in UI
1858
+ bool enabled = 4; // Whether action is available for current entity state
1859
+ string disabled_reason = 5; // Explanation if action is disabled
1860
+ bool destructive = 6; // UI hint: show in red, require confirmation
1861
+ string keyboard_shortcut = 7; // Optional keyboard shortcut (e.g., "d" for delete)
1862
+ }
1863
+
1864
+ // Request to get available actions for an entity
1865
+ message GetEntityActionsRequest {
1866
+ string project_path = 1; // Project path for config/state lookup
1867
+ EntityType entity_type = 2; // Type of entity (issue, PR, doc)
1868
+ string entity_id = 3; // Optional: entity ID for contextual actions (empty = general actions like "create")
1869
+ }
1870
+
1871
+ // Response with available actions
1872
+ message GetEntityActionsResponse {
1873
+ repeated EntityAction actions = 1; // Available actions, ordered by category then priority
1874
+ bool success = 2;
1875
+ string error = 3;
1876
+ }
1877
+
1878
+ // ============ Sync Messages ============
1879
+
1880
+ // Sync conflict information
1881
+ message SyncConflict {
1882
+ string id = 1; // Unique conflict ID
1883
+ string item_type = 2; // Type of item (issue, doc, pr)
1884
+ string item_id = 3; // ID of the item with conflict
1885
+ string file_path = 4; // Relative file path within .centy
1886
+ string created_at = 5; // When the conflict was detected
1887
+ string description = 6; // Description of the conflict
1888
+ string base_content = 7; // Base content (common ancestor)
1889
+ string ours_content = 8; // Our version of the content
1890
+ string theirs_content = 9; // Their version of the content
1891
+ }
1892
+
1893
+ // Sync mode enum
1894
+ enum SyncMode {
1895
+ SYNC_MODE_UNSPECIFIED = 0;
1896
+ SYNC_MODE_FULL = 1; // Full sync with remote
1897
+ SYNC_MODE_LOCAL_ONLY = 2; // Local-only mode (no remote)
1898
+ SYNC_MODE_DISABLED = 3; // Sync disabled (not a git repo)
1899
+ }
1900
+
1901
+ // Request to list sync conflicts
1902
+ message ListSyncConflictsRequest {
1903
+ string project_path = 1;
1904
+ }
1905
+
1906
+ // Response with list of sync conflicts
1907
+ message ListSyncConflictsResponse {
1908
+ repeated SyncConflict conflicts = 1;
1909
+ bool success = 2;
1910
+ string error = 3;
1911
+ }
1912
+
1913
+ // Request to get a specific sync conflict
1914
+ message GetSyncConflictRequest {
1915
+ string project_path = 1;
1916
+ string conflict_id = 2;
1917
+ }
1918
+
1919
+ // Response with sync conflict details
1920
+ message GetSyncConflictResponse {
1921
+ SyncConflict conflict = 1;
1922
+ bool success = 2;
1923
+ string error = 3;
1924
+ }
1925
+
1926
+ // Conflict resolution type
1927
+ enum ConflictResolutionType {
1928
+ CONFLICT_RESOLUTION_UNSPECIFIED = 0;
1929
+ CONFLICT_RESOLUTION_TAKE_OURS = 1;
1930
+ CONFLICT_RESOLUTION_TAKE_THEIRS = 2;
1931
+ CONFLICT_RESOLUTION_MERGE = 3;
1932
+ }
1933
+
1934
+ // Request to resolve a sync conflict
1935
+ message ResolveSyncConflictRequest {
1936
+ string project_path = 1;
1937
+ string conflict_id = 2;
1938
+ ConflictResolutionType resolution = 3;
1939
+ string merged_content = 4; // Only used when resolution is MERGE
1940
+ }
1941
+
1942
+ // Response after resolving a conflict
1943
+ message ResolveSyncConflictResponse {
1944
+ bool success = 1;
1945
+ string error = 2;
1946
+ }
1947
+
1948
+ // Request to get sync status
1949
+ message GetSyncStatusRequest {
1950
+ string project_path = 1;
1951
+ }
1952
+
1953
+ // Response with sync status
1954
+ message GetSyncStatusResponse {
1955
+ SyncMode mode = 1; // Current sync mode
1956
+ bool has_pending_changes = 2; // Whether there are uncommitted changes
1957
+ bool has_pending_push = 3; // Whether there are unpushed commits
1958
+ int32 conflict_count = 4; // Number of unresolved conflicts
1959
+ string last_sync_time = 5; // Last successful sync timestamp
1960
+ bool success = 6;
1961
+ string error = 7;
1962
+ }
1963
+
1964
+ // Request to manually trigger sync pull
1965
+ message SyncPullRequest {
1966
+ string project_path = 1;
1967
+ }
1968
+
1969
+ // Response from sync pull
1970
+ message SyncPullResponse {
1971
+ bool success = 1;
1972
+ string error = 2;
1973
+ bool had_changes = 3; // Whether any changes were pulled
1974
+ repeated string conflict_files = 4; // Files with conflicts (if any)
1975
+ }
1976
+
1977
+ // Request to manually trigger sync push
1978
+ message SyncPushRequest {
1979
+ string project_path = 1;
1980
+ string commit_message = 2; // Optional custom commit message
1981
+ }
1982
+
1983
+ // Response from sync push
1984
+ message SyncPushResponse {
1985
+ bool success = 1;
1986
+ string error = 2;
1987
+ bool had_changes = 3; // Whether any changes were pushed
1988
+ }