1syntax = "proto3";
2package zed.messages;
3
4message Timestamp {
5 uint64 seconds = 1;
6 uint32 nanos = 2;
7}
8
9message File {
10 uint64 worktree_id = 1;
11 optional uint64 entry_id = 2;
12 string path = 3;
13 Timestamp mtime = 4;
14 bool is_deleted = 5;
15 bool is_historic = 6;
16}
17
18message Entry {
19 uint64 id = 1;
20 bool is_dir = 2;
21 string path = 3;
22 uint64 inode = 4;
23 Timestamp mtime = 5;
24 bool is_ignored = 7;
25 bool is_external = 8;
26 reserved 6;
27 reserved 9;
28 bool is_fifo = 10;
29 optional uint64 size = 11;
30 optional string canonical_path = 12;
31 bool is_hidden = 13;
32}
33
34message AddWorktree {
35 string path = 1;
36 uint64 project_id = 2;
37 bool visible = 3;
38}
39
40message AddWorktreeResponse {
41 uint64 worktree_id = 1;
42 string canonicalized_path = 2;
43}
44
45message RemoveWorktree {
46 uint64 worktree_id = 1;
47}
48
49message GetPathMetadata {
50 uint64 project_id = 1;
51 string path = 2;
52}
53
54message GetPathMetadataResponse {
55 bool exists = 1;
56 string path = 2;
57 bool is_dir = 3;
58}
59
60message WorktreeMetadata {
61 uint64 id = 1;
62 string root_name = 2;
63 bool visible = 3;
64 string abs_path = 4;
65}
66
67message ProjectPath {
68 uint64 worktree_id = 1;
69 string path = 2;
70}
71
72message ListRemoteDirectoryConfig {
73 bool is_dir = 1;
74}
75
76message ListRemoteDirectory {
77 uint64 dev_server_id = 1;
78 string path = 2;
79 ListRemoteDirectoryConfig config = 3;
80}
81
82message EntryInfo {
83 bool is_dir = 1;
84}
85
86message ListRemoteDirectoryResponse {
87 repeated string entries = 1;
88 repeated EntryInfo entry_info = 2;
89}
90
91message CreateProjectEntry {
92 uint64 project_id = 1;
93 uint64 worktree_id = 2;
94 string path = 3;
95 bool is_directory = 4;
96 optional bytes content = 5;
97}
98
99message RenameProjectEntry {
100 uint64 project_id = 1;
101 uint64 entry_id = 2;
102 string new_path = 3;
103 uint64 new_worktree_id = 4;
104}
105
106message CopyProjectEntry {
107 uint64 project_id = 1;
108 uint64 entry_id = 2;
109 string new_path = 3;
110 uint64 new_worktree_id = 5;
111 reserved 4;
112}
113
114message DeleteProjectEntry {
115 uint64 project_id = 1;
116 uint64 entry_id = 2;
117 bool use_trash = 3;
118}
119
120message ExpandProjectEntry {
121 uint64 project_id = 1;
122 uint64 entry_id = 2;
123}
124
125message ExpandProjectEntryResponse {
126 uint64 worktree_scan_id = 1;
127}
128
129message ExpandAllForProjectEntry {
130 uint64 project_id = 1;
131 uint64 entry_id = 2;
132}
133
134message ExpandAllForProjectEntryResponse {
135 uint64 worktree_scan_id = 1;
136}
137
138message ProjectEntryResponse {
139 optional Entry entry = 1;
140 uint64 worktree_scan_id = 2;
141}
142
143message UpdateWorktreeSettings {
144 uint64 project_id = 1;
145 uint64 worktree_id = 2;
146 string path = 3;
147 optional string content = 4;
148 optional LocalSettingsKind kind = 5;
149}
150
151enum LocalSettingsKind {
152 Settings = 0;
153 Tasks = 1;
154 Editorconfig = 2;
155 Debug = 3;
156}
157
158message UpdateUserSettings {
159 uint64 project_id = 1;
160 string contents = 2;
161}
162
163message TrustWorktrees {
164 uint64 project_id = 1;
165 repeated PathTrust trusted_paths = 2;
166}
167
168message PathTrust {
169 oneof content {
170 uint64 worktree_id = 2;
171 string abs_path = 3;
172 }
173
174 reserved 1;
175}
176
177message RestrictWorktrees {
178 uint64 project_id = 1;
179 repeated uint64 worktree_ids = 3;
180
181 reserved 2;
182}