Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T06:08:32.361Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

git.proto

799 lines · 15.5 KB · text
1syntax = "proto3";
2package zed.messages;
3
4import "buffer.proto";
5import "worktree.proto";
6
7message GitBranchesResponse {
8  repeated Branch branches = 1;
9  optional string error = 2;
10}
11
12message UpdateDiffBases {
13  uint64 project_id = 1;
14  uint64 buffer_id = 2;
15
16  enum Mode {
17    // No collaborator is using the unstaged diff.
18    HEAD_ONLY = 0;
19    // No collaborator is using the diff from HEAD.
20    INDEX_ONLY = 1;
21    // Both the unstaged and uncommitted diffs are demanded,
22    // and the contents of the index and HEAD are the same for this path.
23    INDEX_MATCHES_HEAD = 2;
24    // Both the unstaged and uncommitted diffs are demanded,
25    // and the contents of the index and HEAD differ for this path,
26    // where None means the path doesn't exist in that state of the repo.
27    INDEX_AND_HEAD = 3;
28    // The contents of the index and HEAD are unchanged. Sent so that
29    // remote clients still recalculate their diffs in response to git
30    // events, just as the host does, even when an index write ends up
31    // changing nothing (e.g. writing content identical to what's there).
32    UNCHANGED = 4;
33  }
34
35  optional string staged_text = 3;
36  optional string committed_text = 4;
37  Mode mode = 5;
38}
39
40message OpenUnstagedDiff {
41  uint64 project_id = 1;
42  uint64 buffer_id = 2;
43}
44
45message OpenUnstagedDiffResponse {
46  optional string staged_text = 1;
47}
48
49message OpenUncommittedDiff {
50  uint64 project_id = 1;
51  uint64 buffer_id = 2;
52}
53
54message OpenUncommittedDiffResponse {
55  enum Mode {
56    INDEX_MATCHES_HEAD = 0;
57    INDEX_AND_HEAD = 1;
58  }
59  optional string staged_text = 1;
60  optional string committed_text = 2;
61  Mode mode = 3;
62}
63
64message SetIndexText {
65  uint64 project_id = 1;
66  reserved 2;
67  uint64 repository_id = 3;
68  string path = 4;
69  optional string text = 5;
70}
71
72message GetPermalinkToLine {
73  uint64 project_id = 1;
74  uint64 buffer_id = 2;
75  Range selection = 3;
76}
77
78message GetPermalinkToLineResponse {
79  string permalink = 1;
80}
81
82message Branch {
83  bool is_head = 1;
84  string ref_name = 2;
85  optional uint64 unix_timestamp = 3;
86  optional GitUpstream upstream = 4;
87  optional CommitSummary most_recent_commit = 5;
88}
89
90message GitUpstream {
91  string ref_name = 1;
92  optional UpstreamTracking tracking = 2;
93}
94
95message UpstreamTracking {
96  uint64 ahead = 1;
97  uint64 behind = 2;
98}
99
100message CommitSummary {
101  string sha = 1;
102  string subject = 2;
103  int64 commit_timestamp = 3;
104  string author_name = 4;
105}
106
107message GitBranches {
108  uint64 project_id = 1;
109  ProjectPath repository = 2;
110}
111
112message UpdateGitBranch {
113  uint64 project_id = 1;
114  string branch_name = 2;
115  ProjectPath repository = 3;
116}
117
118message UpdateRepository {
119  uint64 project_id = 1;
120  uint64 id = 2;
121  string abs_path = 3;
122  repeated uint64 entry_ids = 4;
123  optional Branch branch_summary = 5;
124  repeated StatusEntry updated_statuses = 6;
125  repeated string removed_statuses = 7;
126  repeated string current_merge_conflicts = 8;
127  uint64 scan_id = 9;
128  bool is_last_update = 10;
129  optional GitCommitDetails head_commit_details = 11;
130  optional string merge_message = 12;
131  repeated StashEntry stash_entries = 13;
132  optional string remote_upstream_url = 14;
133  optional string remote_origin_url = 15;
134  reserved 16;
135  repeated Worktree linked_worktrees = 17;
136  repeated Branch branch_list = 18;
137  optional string repository_dir_abs_path = 19;
138  optional string common_dir_abs_path = 20;
139  optional string branch_list_error = 21;
140}
141
142message RemoveRepository {
143  uint64 project_id = 1;
144  uint64 id = 2;
145}
146
147enum GitStatus {
148  Added = 0;
149  Modified = 1;
150  Conflict = 2;
151  Deleted = 3;
152  Updated = 4;
153  TypeChanged = 5;
154  Renamed = 6;
155  Copied = 7;
156  Unmodified = 8;
157}
158
159message GitFileStatus {
160  oneof variant {
161    Untracked untracked = 1;
162    Ignored ignored = 2;
163    Unmerged unmerged = 3;
164    Tracked tracked = 4;
165  }
166
167  message Untracked {}
168  message Ignored {}
169  message Unmerged {
170    GitStatus first_head = 1;
171    GitStatus second_head = 2;
172  }
173  message Tracked {
174    GitStatus index_status = 1;
175    GitStatus worktree_status = 2;
176  }
177}
178
179message GitGetBranches {
180  uint64 project_id = 1;
181  reserved 2;
182  uint64 repository_id = 3;
183}
184
185message GitCreateBranch {
186  uint64 project_id = 1;
187  reserved 2;
188  uint64 repository_id = 3;
189  string branch_name = 4;
190  optional string base_branch = 5;
191}
192
193message GitChangeBranch {
194  uint64 project_id = 1;
195  reserved 2;
196  uint64 repository_id = 3;
197  string branch_name = 4;
198}
199
200message GitRenameBranch {
201  uint64 project_id = 1;
202  uint64 repository_id = 2;
203  string branch = 3;
204  string new_name = 4;
205}
206
207message GitCreateRemote {
208  uint64 project_id = 1;
209  uint64 repository_id = 2;
210  string remote_name = 3;
211  string remote_url = 4;
212}
213
214message GitRemoveRemote {
215  uint64 project_id = 1;
216  uint64 repository_id = 2;
217  string remote_name = 3;
218}
219
220message GitDeleteBranch {
221  uint64 project_id = 1;
222  uint64 repository_id = 2;
223  string branch_name = 3;
224  bool is_remote = 4;
225  bool force = 5;
226}
227
228message GitDiff {
229  uint64 project_id = 1;
230  reserved 2;
231  uint64 repository_id = 3;
232  DiffType diff_type = 4;
233  optional string merge_base_ref = 5;
234
235  enum DiffType {
236    HEAD_TO_WORKTREE = 0;
237    HEAD_TO_INDEX = 1;
238    MERGE_BASE = 2;
239  }
240}
241
242message GitDiffResponse {
243  string diff = 1;
244}
245
246message GitInit {
247  uint64 project_id = 1;
248  string abs_path = 2;
249  string fallback_branch_name = 3;
250}
251
252message GitClone {
253  uint64 project_id = 1;
254  string abs_path = 2;
255  string remote_repo = 3;
256}
257
258message GitCloneResponse {
259  bool success = 1;
260}
261
262message CheckForPushedCommits {
263  uint64 project_id = 1;
264  reserved 2;
265  uint64 repository_id = 3;
266}
267
268message CheckForPushedCommitsResponse {
269  repeated string pushed_to = 1;
270}
271
272message GitShow {
273  uint64 project_id = 1;
274  reserved 2;
275  uint64 repository_id = 3;
276  string commit = 4;
277}
278
279message GitCommitDetails {
280  string sha = 1;
281  string message = 2;
282  int64 commit_timestamp = 3;
283  string author_email = 4;
284  string author_name = 5;
285}
286
287message LoadCommitDiff {
288  uint64 project_id = 1;
289  reserved 2;
290  uint64 repository_id = 3;
291  string commit = 4;
292}
293
294message LoadCommitDiffResponse {
295  repeated CommitFile files = 1;
296}
297
298message CommitFile {
299  string path = 1;
300  optional string old_text = 2;
301  optional string new_text = 3;
302  bool is_binary = 4;
303}
304
305message GitReset {
306  uint64 project_id = 1;
307  reserved 2;
308  uint64 repository_id = 3;
309  string commit = 4;
310  ResetMode mode = 5;
311  enum ResetMode {
312    SOFT = 0;
313    MIXED = 1;
314  }
315}
316
317message GitCheckoutFiles {
318  uint64 project_id = 1;
319  reserved 2;
320  uint64 repository_id = 3;
321  string commit = 4;
322  repeated string paths = 5;
323}
324
325message GitAddPathToGitignore {
326  uint64 project_id = 1;
327  reserved 2;
328  uint64 repository_id = 3;
329  string path = 4;
330  bool is_dir = 5;
331}
332
333message GitAddPathToGitInfoExclude {
334  uint64 project_id = 1;
335  reserved 2;
336  uint64 repository_id = 3;
337  string path = 4;
338  bool is_dir = 5;
339}
340
341// Move to `git.proto` once collab's min version is >=0.171.0.
342message StatusEntry {
343  string repo_path = 1;
344  // Can be removed once collab's min version is >=0.171.0.
345  GitStatus simple_status = 2;
346  GitFileStatus status = 3;
347  optional uint32 diff_stat_added = 4;
348  optional uint32 diff_stat_deleted = 5;
349  optional uint32 staged_diff_stat_added = 6;
350  optional uint32 staged_diff_stat_deleted = 7;
351  optional uint32 unstaged_diff_stat_added = 8;
352  optional uint32 unstaged_diff_stat_deleted = 9;
353}
354
355message StashEntry {
356  bytes oid = 1;
357  string message = 2;
358  optional string branch = 3;
359  uint64 index = 4;
360  int64 timestamp = 5;
361}
362
363message Stage {
364  uint64 project_id = 1;
365  reserved 2;
366  uint64 repository_id = 3;
367  repeated string paths = 4;
368}
369
370message Unstage {
371  uint64 project_id = 1;
372  reserved 2;
373  uint64 repository_id = 3;
374  repeated string paths = 4;
375}
376
377message Stash {
378  uint64 project_id = 1;
379  uint64 repository_id = 2;
380  repeated string paths = 3;
381}
382
383message StashPop {
384  uint64 project_id = 1;
385  uint64 repository_id = 2;
386  optional uint64 stash_index = 3;
387}
388
389message StashApply {
390  uint64 project_id = 1;
391  uint64 repository_id = 2;
392  optional uint64 stash_index = 3;
393}
394
395message StashDrop {
396  uint64 project_id = 1;
397  uint64 repository_id = 2;
398  optional uint64 stash_index = 3;
399}
400
401message Commit {
402  uint64 project_id = 1;
403  reserved 2;
404  uint64 repository_id = 3;
405  optional string name = 4;
406  optional string email = 5;
407  string message = 6;
408  optional CommitOptions options = 7;
409  reserved 8;
410  uint64 askpass_id = 9;
411
412  message CommitOptions {
413    bool amend = 1;
414    bool signoff = 2;
415    bool allow_empty = 3;
416    bool no_verify = 4;
417  }
418}
419
420message OpenCommitMessageBuffer {
421  uint64 project_id = 1;
422  reserved 2;
423  uint64 repository_id = 3;
424}
425
426message Push {
427  uint64 project_id = 1;
428  reserved 2;
429  uint64 repository_id = 3;
430  string remote_name = 4;
431  string branch_name = 5;
432  optional PushOptions options = 6;
433  uint64 askpass_id = 7;
434  string remote_branch_name = 8;
435
436  enum PushOptions {
437    SET_UPSTREAM = 0;
438    FORCE = 1;
439  }
440}
441
442message Fetch {
443  uint64 project_id = 1;
444  reserved 2;
445  uint64 repository_id = 3;
446  uint64 askpass_id = 4;
447  optional string remote = 5;
448}
449
450message GetRemotes {
451  uint64 project_id = 1;
452  reserved 2;
453  uint64 repository_id = 3;
454  optional string branch_name = 4;
455  bool is_push = 5;
456}
457
458message GetRemotesResponse {
459  repeated Remote remotes = 1;
460
461  message Remote {
462    string name = 1;
463    optional string url = 2;
464  }
465}
466
467message Pull {
468  uint64 project_id = 1;
469  reserved 2;
470  uint64 repository_id = 3;
471  string remote_name = 4;
472  optional string branch_name = 5;
473  uint64 askpass_id = 6;
474  bool rebase = 7;
475}
476
477message RemoteMessageResponse {
478  string stdout = 1;
479  string stderr = 2;
480}
481
482message BlameBuffer {
483  uint64 project_id = 1;
484  uint64 buffer_id = 2;
485  repeated VectorClockEntry version = 3;
486}
487
488message BlameEntry {
489  bytes sha = 1;
490
491  uint32 start_line = 2;
492  uint32 end_line = 3;
493  uint32 original_line_number = 4;
494
495  optional string author = 5;
496  optional string author_mail = 6;
497  optional int64 author_time = 7;
498  optional string author_tz = 8;
499
500  optional string committer = 9;
501  optional string committer_mail = 10;
502  optional int64 committer_time = 11;
503  optional string committer_tz = 12;
504
505  optional string summary = 13;
506  optional string previous = 14;
507
508  string filename = 15;
509}
510
511message CommitMessage {
512  bytes oid = 1;
513  string message = 2;
514}
515
516message CommitPermalink {
517  bytes oid = 1;
518  string permalink = 2;
519}
520
521message BlameBufferResponse {
522  message BlameResponse {
523    repeated BlameEntry entries = 1;
524    repeated CommitMessage messages = 2;
525    reserved 3;
526    reserved 4;
527  }
528
529  optional BlameResponse blame_response = 5;
530
531  reserved 1 to 4;
532}
533
534message GetDefaultBranch {
535  uint64 project_id = 1;
536  uint64 repository_id = 2;
537  bool include_remote_name = 3;
538}
539
540message GetDefaultBranchResponse {
541  optional string branch = 1;
542}
543
544message GetTreeDiff {
545  uint64 project_id = 1;
546  uint64 repository_id = 2;
547  bool is_merge = 3;
548  string base = 4;
549  string head = 5;
550}
551
552message GetTreeDiffResponse {
553  repeated TreeDiffStatus entries = 1;
554}
555
556message TreeDiffStatus {
557  enum Status {
558    ADDED = 0;
559    MODIFIED = 1;
560    DELETED = 2;
561  }
562
563  Status status = 1;
564  string path = 2;
565  optional string oid = 3;
566}
567
568message GetBlobContent {
569  uint64 project_id = 1;
570  uint64 repository_id = 2;
571  string oid = 3;
572}
573
574message GetBlobContentResponse {
575  string content = 1;
576}
577
578message LoadCommitTemplate {
579  uint64 project_id = 1;
580  uint64 repository_id = 2;
581}
582
583message LoadCommitTemplateResponse {
584  optional string template = 1;
585}
586
587message GitGetWorktrees {
588  uint64 project_id = 1;
589  uint64 repository_id = 2;
590}
591
592message GitGetHeadSha {
593  uint64 project_id = 1;
594  uint64 repository_id = 2;
595}
596
597message GitGetHeadShaResponse {
598  optional string sha = 1;
599}
600
601message GitEditRef {
602  uint64 project_id = 1;
603  uint64 repository_id = 2;
604  string ref_name = 3;
605  oneof action {
606    string update_to_commit = 4;
607    DeleteRef delete = 5;
608  }
609  message DeleteRef {}
610}
611
612message GitRepairWorktrees {
613  uint64 project_id = 1;
614  uint64 repository_id = 2;
615}
616
617message GitWorktreesResponse {
618  repeated Worktree worktrees = 1;
619}
620
621message Worktree {
622  string path = 1;
623  string ref_name = 2;
624  string sha = 3;
625  bool is_main = 4;
626  bool is_bare = 5;
627}
628
629message GitCreateWorktree {
630  uint64 project_id = 1;
631  uint64 repository_id = 2;
632  string name = 3;
633  string directory = 4;
634  optional string commit = 5;
635  bool use_existing_branch = 6;
636}
637
638message GitCreateCheckpoint {
639  uint64 project_id = 1;
640  uint64 repository_id = 2;
641}
642
643message GitCreateCheckpointResponse {
644  bytes commit_sha = 1;
645}
646
647message GitCreateArchiveCheckpoint {
648  uint64 project_id = 1;
649  uint64 repository_id = 2;
650}
651
652message GitCreateArchiveCheckpointResponse {
653  string staged_commit_sha = 1;
654  string unstaged_commit_sha = 2;
655}
656
657message GitRestoreCheckpoint {
658  uint64 project_id = 1;
659  uint64 repository_id = 2;
660  bytes commit_sha = 3;
661}
662
663message GitRestoreArchiveCheckpoint {
664  uint64 project_id = 1;
665  uint64 repository_id = 2;
666  string staged_commit_sha = 3;
667  string unstaged_commit_sha = 4;
668}
669
670message GitCompareCheckpoints {
671  uint64 project_id = 1;
672  uint64 repository_id = 2;
673  bytes left_commit_sha = 3;
674  bytes right_commit_sha = 4;
675}
676
677message GitCompareCheckpointsResponse {
678  bool equal = 1;
679}
680
681message GitDiffCheckpoints {
682  uint64 project_id = 1;
683  uint64 repository_id = 2;
684  bytes base_commit_sha = 3;
685  bytes target_commit_sha = 4;
686}
687
688message GitDiffCheckpointsResponse {
689  string diff = 1;
690}
691
692message GitRemoveWorktree {
693  uint64 project_id = 1;
694  uint64 repository_id = 2;
695  string path = 3;
696  bool force = 4;
697}
698
699message GitRenameWorktree {
700  uint64 project_id = 1;
701  uint64 repository_id = 2;
702  string old_path = 3;
703  string new_path = 4;
704}
705
706message GitWorktreeCreatedAt {
707  uint64 project_id = 1;
708  uint64 repository_id = 2;
709  string worktree_path = 3;
710}
711
712message GitWorktreeCreatedAtResponse {
713  optional Timestamp created_at = 1;
714}
715
716// Deprecated: newer clients let `git commit` run hooks natively instead of
717// requesting them explicitly.
718//
719// TODO: once all supported peers commit without sending `RunGitHook`, remove
720// this message (and its handlers) and replace its tag in the Envelope payload
721// oneof with `reserved 399;` so the tag is never reused.
722message RunGitHook {
723  enum GitHook {
724    PRE_COMMIT = 0;
725    reserved 1;
726  }
727
728  uint64 project_id = 1;
729  uint64 repository_id = 2;
730  GitHook hook = 3;
731}
732
733message GetCommitData {
734  uint64 project_id = 1;
735  uint64 repository_id = 2;
736  repeated string shas = 3;
737}
738
739message CommitData {
740  string sha = 1;
741  repeated string parents = 2;
742  string author_name = 3;
743  string author_email = 4;
744  int64 commit_timestamp = 5;
745  string subject = 6;
746  string message = 7;
747}
748
749message GetCommitDataResponse {
750  repeated CommitData commits = 1;
751}
752
753message GitLogSourceAll {}
754
755message GitLogSource {
756  oneof source {
757    GitLogSourceAll all = 1;
758    string branch = 2;
759    string sha = 3;
760    string path = 4;
761  }
762}
763
764message GetInitialGraphData {
765  uint64 project_id = 1;
766  uint64 repository_id = 2;
767  GitLogSource log_source = 3;
768
769  enum LogOrder {
770    DATE_ORDER = 0;
771    TOPO_ORDER = 1;
772    AUTHOR_DATE_ORDER = 2;
773    REVERSE_CHRONOLOGICAL = 3;
774  }
775  LogOrder log_order = 4;
776}
777
778message InitialGraphCommit {
779  string sha = 1;
780  repeated string parents = 2;
781  repeated string ref_names = 3;
782}
783
784message GetInitialGraphDataResponse {
785  repeated InitialGraphCommit commits = 1;
786}
787
788message SearchCommits {
789  uint64 project_id = 1;
790  uint64 repository_id = 2;
791  GitLogSource log_source = 3;
792  string query = 4;
793  bool case_sensitive = 5;
794}
795
796message SearchCommitsResponse {
797  repeated string shas = 1;
798}
799
Served at tenant.openagents/omega Member data and write actions are omitted.