cline 1.0.0-nightly.6 → 1.0.0-nightly.8
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/bin/cline +0 -0
- package/bin/cline-darwin-amd64 +0 -0
- package/{cline-1.0.0-nightly.5.tgz → bin/cline-darwin-arm64} +0 -0
- package/bin/cline-host +0 -0
- package/bin/cline-host-darwin-amd64 +0 -0
- package/bin/cline-host-darwin-arm64 +0 -0
- package/bin/cline-host-linux-amd64 +0 -0
- package/bin/cline-host-linux-arm64 +0 -0
- package/bin/cline-linux-amd64 +0 -0
- package/bin/cline-linux-arm64 +0 -0
- package/cline-core.js +157142 -101496
- package/extension/package.json +18 -5
- package/package.json +4 -1
- package/postinstall.js +120 -0
- package/proto/cline/account.proto +136 -0
- package/proto/cline/browser.proto +56 -0
- package/proto/cline/checkpoints.proto +45 -0
- package/proto/cline/commands.proto +30 -0
- package/proto/cline/common.proto +99 -0
- package/proto/cline/dictation.proto +42 -0
- package/proto/cline/file.proto +189 -0
- package/proto/cline/hooks.proto +49 -0
- package/proto/cline/mcp.proto +133 -0
- package/proto/cline/models.proto +419 -0
- package/proto/cline/oca_account.proto +37 -0
- package/proto/cline/slash.proto +14 -0
- package/proto/cline/state.proto +505 -0
- package/proto/cline/task.proto +119 -0
- package/proto/cline/ui.proto +262 -0
- package/proto/cline/web.proto +27 -0
- package/proto/descriptor_set.pb +0 -0
- package/proto/host/diff.proto +108 -0
- package/proto/host/env.proto +61 -0
- package/proto/host/testing.proto +18 -0
- package/proto/host/window.proto +164 -0
- package/proto/host/workspace.proto +96 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package cline;
|
|
4
|
+
import "cline/common.proto";
|
|
5
|
+
option go_package = "github.com/cline/grpc-go/cline";
|
|
6
|
+
option java_package = "bot.cline.proto";
|
|
7
|
+
option java_multiple_files = true;
|
|
8
|
+
|
|
9
|
+
// Enum for ClineMessage type
|
|
10
|
+
enum ClineMessageType {
|
|
11
|
+
ASK = 0;
|
|
12
|
+
SAY = 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Enum for ClineAsk types
|
|
16
|
+
enum ClineAsk {
|
|
17
|
+
FOLLOWUP = 0;
|
|
18
|
+
PLAN_MODE_RESPOND = 1;
|
|
19
|
+
COMMAND = 2;
|
|
20
|
+
COMMAND_OUTPUT = 3;
|
|
21
|
+
COMPLETION_RESULT = 4;
|
|
22
|
+
TOOL = 5;
|
|
23
|
+
API_REQ_FAILED = 6;
|
|
24
|
+
RESUME_TASK = 7;
|
|
25
|
+
RESUME_COMPLETED_TASK = 8;
|
|
26
|
+
MISTAKE_LIMIT_REACHED = 9;
|
|
27
|
+
AUTO_APPROVAL_MAX_REQ_REACHED = 10;
|
|
28
|
+
BROWSER_ACTION_LAUNCH = 11;
|
|
29
|
+
USE_MCP_SERVER = 12;
|
|
30
|
+
NEW_TASK = 13;
|
|
31
|
+
CONDENSE = 14;
|
|
32
|
+
REPORT_BUG = 15;
|
|
33
|
+
SUMMARIZE_TASK = 16;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Enum for ClineSay types
|
|
37
|
+
enum ClineSay {
|
|
38
|
+
TASK = 0;
|
|
39
|
+
ERROR = 1;
|
|
40
|
+
API_REQ_STARTED = 2;
|
|
41
|
+
API_REQ_FINISHED = 3;
|
|
42
|
+
TEXT = 4;
|
|
43
|
+
REASONING = 5;
|
|
44
|
+
COMPLETION_RESULT_SAY = 6;
|
|
45
|
+
USER_FEEDBACK = 7;
|
|
46
|
+
USER_FEEDBACK_DIFF = 8;
|
|
47
|
+
API_REQ_RETRIED = 9;
|
|
48
|
+
COMMAND_SAY = 10;
|
|
49
|
+
COMMAND_OUTPUT_SAY = 11;
|
|
50
|
+
TOOL_SAY = 12;
|
|
51
|
+
SHELL_INTEGRATION_WARNING = 13;
|
|
52
|
+
BROWSER_ACTION_LAUNCH_SAY = 14;
|
|
53
|
+
BROWSER_ACTION = 15;
|
|
54
|
+
BROWSER_ACTION_RESULT = 16;
|
|
55
|
+
MCP_SERVER_REQUEST_STARTED = 17;
|
|
56
|
+
MCP_SERVER_RESPONSE = 18;
|
|
57
|
+
MCP_NOTIFICATION = 19;
|
|
58
|
+
USE_MCP_SERVER_SAY = 20;
|
|
59
|
+
DIFF_ERROR = 21;
|
|
60
|
+
DELETED_API_REQS = 22;
|
|
61
|
+
CLINEIGNORE_ERROR = 23;
|
|
62
|
+
CHECKPOINT_CREATED = 24;
|
|
63
|
+
LOAD_MCP_DOCUMENTATION = 25;
|
|
64
|
+
INFO = 26;
|
|
65
|
+
TASK_PROGRESS = 27;
|
|
66
|
+
ERROR_RETRY = 28;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Enum for ClineSayTool tool types
|
|
70
|
+
enum ClineSayToolType {
|
|
71
|
+
EDITED_EXISTING_FILE = 0;
|
|
72
|
+
NEW_FILE_CREATED = 1;
|
|
73
|
+
READ_FILE = 2;
|
|
74
|
+
LIST_FILES_TOP_LEVEL = 3;
|
|
75
|
+
LIST_FILES_RECURSIVE = 4;
|
|
76
|
+
LIST_CODE_DEFINITION_NAMES = 5;
|
|
77
|
+
SEARCH_FILES = 6;
|
|
78
|
+
WEB_FETCH = 7;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Enum for browser actions
|
|
82
|
+
enum BrowserAction {
|
|
83
|
+
LAUNCH = 0;
|
|
84
|
+
CLICK = 1;
|
|
85
|
+
TYPE = 2;
|
|
86
|
+
SCROLL_DOWN = 3;
|
|
87
|
+
SCROLL_UP = 4;
|
|
88
|
+
CLOSE = 5;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Enum for MCP server request types
|
|
92
|
+
enum McpServerRequestType {
|
|
93
|
+
USE_MCP_TOOL = 0;
|
|
94
|
+
ACCESS_MCP_RESOURCE = 1;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Enum for API request cancel reasons
|
|
98
|
+
enum ClineApiReqCancelReason {
|
|
99
|
+
STREAMING_FAILED = 0;
|
|
100
|
+
USER_CANCELLED = 1;
|
|
101
|
+
RETRIES_EXHAUSTED = 2;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Message for conversation history deleted range
|
|
105
|
+
message ConversationHistoryDeletedRange {
|
|
106
|
+
int32 start_index = 1;
|
|
107
|
+
int32 end_index = 2;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Message for ClineSayTool
|
|
111
|
+
message ClineSayTool {
|
|
112
|
+
ClineSayToolType tool = 1;
|
|
113
|
+
string path = 2;
|
|
114
|
+
string diff = 3;
|
|
115
|
+
string content = 4;
|
|
116
|
+
string regex = 5;
|
|
117
|
+
string file_pattern = 6;
|
|
118
|
+
bool operation_is_located_in_workspace = 7;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Message for ClineSayBrowserAction
|
|
122
|
+
message ClineSayBrowserAction {
|
|
123
|
+
BrowserAction action = 1;
|
|
124
|
+
string coordinate = 2;
|
|
125
|
+
string text = 3;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Message for BrowserActionResult
|
|
129
|
+
message BrowserActionResult {
|
|
130
|
+
string screenshot = 1;
|
|
131
|
+
string logs = 2;
|
|
132
|
+
string current_url = 3;
|
|
133
|
+
string current_mouse_position = 4;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Message for ClineAskUseMcpServer
|
|
137
|
+
message ClineAskUseMcpServer {
|
|
138
|
+
string server_name = 1;
|
|
139
|
+
McpServerRequestType type = 2;
|
|
140
|
+
string tool_name = 3;
|
|
141
|
+
string arguments = 4;
|
|
142
|
+
string uri = 5;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Message for ClinePlanModeResponse
|
|
146
|
+
message ClinePlanModeResponse {
|
|
147
|
+
string response = 1;
|
|
148
|
+
repeated string options = 2;
|
|
149
|
+
string selected = 3;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Message for ClineAskQuestion
|
|
153
|
+
message ClineAskQuestion {
|
|
154
|
+
string question = 1;
|
|
155
|
+
repeated string options = 2;
|
|
156
|
+
string selected = 3;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Message for ClineAskNewTask
|
|
160
|
+
message ClineAskNewTask {
|
|
161
|
+
string context = 1;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Message for API request retry status
|
|
165
|
+
message ApiReqRetryStatus {
|
|
166
|
+
int32 attempt = 1;
|
|
167
|
+
int32 max_attempts = 2;
|
|
168
|
+
int32 delay_sec = 3;
|
|
169
|
+
string error_snippet = 4;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Message for ClineApiReqInfo
|
|
173
|
+
message ClineApiReqInfo {
|
|
174
|
+
string request = 1;
|
|
175
|
+
int32 tokens_in = 2;
|
|
176
|
+
int32 tokens_out = 3;
|
|
177
|
+
int32 cache_writes = 4;
|
|
178
|
+
int32 cache_reads = 5;
|
|
179
|
+
double cost = 6;
|
|
180
|
+
ClineApiReqCancelReason cancel_reason = 7;
|
|
181
|
+
string streaming_failed_message = 8;
|
|
182
|
+
ApiReqRetryStatus retry_status = 9;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Main ClineMessage type
|
|
186
|
+
message ClineMessage {
|
|
187
|
+
int64 ts = 1;
|
|
188
|
+
ClineMessageType type = 2;
|
|
189
|
+
ClineAsk ask = 3;
|
|
190
|
+
ClineSay say = 4;
|
|
191
|
+
string text = 5;
|
|
192
|
+
string reasoning = 6;
|
|
193
|
+
repeated string images = 7;
|
|
194
|
+
repeated string files = 8;
|
|
195
|
+
bool partial = 9;
|
|
196
|
+
string last_checkpoint_hash = 10;
|
|
197
|
+
bool is_checkpoint_checked_out = 11;
|
|
198
|
+
bool is_operation_outside_workspace = 12;
|
|
199
|
+
int32 conversation_history_index = 13;
|
|
200
|
+
ConversationHistoryDeletedRange conversation_history_deleted_range = 14;
|
|
201
|
+
|
|
202
|
+
// Additional fields for specific ask/say types
|
|
203
|
+
ClineSayTool say_tool = 15;
|
|
204
|
+
ClineSayBrowserAction say_browser_action = 16;
|
|
205
|
+
BrowserActionResult browser_action_result = 17;
|
|
206
|
+
ClineAskUseMcpServer ask_use_mcp_server = 18;
|
|
207
|
+
ClinePlanModeResponse plan_mode_response = 19;
|
|
208
|
+
ClineAskQuestion ask_question = 20;
|
|
209
|
+
ClineAskNewTask ask_new_task = 21;
|
|
210
|
+
ClineApiReqInfo api_req_info = 22;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// UiService provides methods for managing UI interactions
|
|
214
|
+
service UiService {
|
|
215
|
+
// Scrolls to a specific settings section in the settings view
|
|
216
|
+
rpc scrollToSettings(StringRequest) returns (KeyValuePair);
|
|
217
|
+
|
|
218
|
+
// Marks the current announcement as shown and returns whether an announcement should still be shown
|
|
219
|
+
rpc onDidShowAnnouncement(EmptyRequest) returns (Boolean);
|
|
220
|
+
|
|
221
|
+
// Subscribe to addToInput events (when user adds content via context menu)
|
|
222
|
+
rpc subscribeToAddToInput(EmptyRequest) returns (stream String);
|
|
223
|
+
|
|
224
|
+
// Subscribe to MCP button clicked events
|
|
225
|
+
rpc subscribeToMcpButtonClicked(EmptyRequest) returns (stream Empty);
|
|
226
|
+
|
|
227
|
+
// Subscribe to history button click events
|
|
228
|
+
rpc subscribeToHistoryButtonClicked(EmptyRequest) returns (stream Empty);
|
|
229
|
+
|
|
230
|
+
// Subscribe to chat button clicked events (when the chat button is clicked in VSCode)
|
|
231
|
+
rpc subscribeToChatButtonClicked(EmptyRequest) returns (stream Empty);
|
|
232
|
+
|
|
233
|
+
// Subscribe to account button click events
|
|
234
|
+
rpc subscribeToAccountButtonClicked(EmptyRequest) returns (stream Empty);
|
|
235
|
+
|
|
236
|
+
// Subscribe to settings button clicked events
|
|
237
|
+
rpc subscribeToSettingsButtonClicked(EmptyRequest) returns (stream Empty);
|
|
238
|
+
|
|
239
|
+
// Subscribe to partial message updates (streaming Cline messages as they're built)
|
|
240
|
+
rpc subscribeToPartialMessage(EmptyRequest) returns (stream ClineMessage);
|
|
241
|
+
|
|
242
|
+
// Initialize webview when it launches
|
|
243
|
+
rpc initializeWebview(EmptyRequest) returns (Empty);
|
|
244
|
+
|
|
245
|
+
// Subscribe to relinquish control events
|
|
246
|
+
rpc subscribeToRelinquishControl(EmptyRequest) returns (stream Empty);
|
|
247
|
+
|
|
248
|
+
// Subscribe to focus chat input events
|
|
249
|
+
rpc subscribeToFocusChatInput(EmptyRequest) returns (stream Empty);
|
|
250
|
+
|
|
251
|
+
// Subscribe to webview visibility change events
|
|
252
|
+
rpc subscribeToDidBecomeVisible(EmptyRequest) returns (stream Empty);
|
|
253
|
+
|
|
254
|
+
// Returns the HTML for the webview index page. This is only used by external clients, not by the vscode webview.
|
|
255
|
+
rpc getWebviewHtml(EmptyRequest) returns (String);
|
|
256
|
+
|
|
257
|
+
// Opens a URL in the default browser
|
|
258
|
+
rpc openUrl(StringRequest) returns (Empty);
|
|
259
|
+
|
|
260
|
+
// Opens the Cline walkthrough
|
|
261
|
+
rpc openWalkthrough(EmptyRequest) returns (Empty);
|
|
262
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package cline;
|
|
4
|
+
import "cline/common.proto";
|
|
5
|
+
option go_package = "github.com/cline/grpc-go/cline";
|
|
6
|
+
option java_package = "bot.cline.proto";
|
|
7
|
+
option java_multiple_files = true;
|
|
8
|
+
|
|
9
|
+
service WebService {
|
|
10
|
+
rpc checkIsImageUrl(StringRequest) returns (IsImageUrl);
|
|
11
|
+
rpc fetchOpenGraphData(StringRequest) returns (OpenGraphData);
|
|
12
|
+
rpc openInBrowser(StringRequest) returns (Empty);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message IsImageUrl {
|
|
16
|
+
bool is_image = 1;
|
|
17
|
+
string url = 2;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
message OpenGraphData {
|
|
21
|
+
string title = 1;
|
|
22
|
+
string description = 2;
|
|
23
|
+
string image = 3;
|
|
24
|
+
string url = 4;
|
|
25
|
+
string site_name = 5;
|
|
26
|
+
string type = 6;
|
|
27
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package host;
|
|
4
|
+
option go_package = "github.com/cline/grpc-go/host";
|
|
5
|
+
option java_package = "bot.cline.host.proto";
|
|
6
|
+
option java_multiple_files = true;
|
|
7
|
+
|
|
8
|
+
import "cline/common.proto";
|
|
9
|
+
|
|
10
|
+
// Provides methods for diff views.
|
|
11
|
+
service DiffService {
|
|
12
|
+
// Open the diff view/editor.
|
|
13
|
+
rpc openDiff(OpenDiffRequest) returns (OpenDiffResponse);
|
|
14
|
+
|
|
15
|
+
// Get the contents of the diff view.
|
|
16
|
+
rpc getDocumentText(GetDocumentTextRequest) returns (GetDocumentTextResponse);
|
|
17
|
+
|
|
18
|
+
// Replace a text selection in the diff.
|
|
19
|
+
rpc replaceText(ReplaceTextRequest) returns (ReplaceTextResponse);
|
|
20
|
+
|
|
21
|
+
rpc scrollDiff(ScrollDiffRequest) returns (ScrollDiffResponse);
|
|
22
|
+
|
|
23
|
+
// Truncate the diff document.
|
|
24
|
+
rpc truncateDocument(TruncateDocumentRequest) returns (TruncateDocumentResponse);
|
|
25
|
+
|
|
26
|
+
// Save the diff document.
|
|
27
|
+
rpc saveDocument(SaveDocumentRequest) returns (SaveDocumentResponse);
|
|
28
|
+
|
|
29
|
+
// Close all the diff editor windows/tabs.
|
|
30
|
+
// Any diff editors with unsaved content should not be closed.
|
|
31
|
+
rpc closeAllDiffs(CloseAllDiffsRequest) returns (CloseAllDiffsResponse);
|
|
32
|
+
|
|
33
|
+
// Display a diff view comparing before/after states for multiple files.
|
|
34
|
+
// Content is passed as in-memory data, not read from the file system.
|
|
35
|
+
rpc openMultiFileDiff(OpenMultiFileDiffRequest) returns (OpenMultiFileDiffResponse);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message OpenDiffRequest {
|
|
39
|
+
optional cline.Metadata metadata = 1;
|
|
40
|
+
// The absolute path of the document being edited.
|
|
41
|
+
optional string path = 2;
|
|
42
|
+
// The new content for the file.
|
|
43
|
+
optional string content = 3;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
message OpenDiffResponse {
|
|
47
|
+
// A unique identifier for the diff view that was opened.
|
|
48
|
+
optional string diff_id = 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
message GetDocumentTextRequest {
|
|
52
|
+
optional cline.Metadata metadata = 1;
|
|
53
|
+
optional string diff_id = 2;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
message GetDocumentTextResponse {
|
|
57
|
+
optional string content = 1;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
message ReplaceTextRequest {
|
|
61
|
+
optional cline.Metadata metadata = 1;
|
|
62
|
+
optional string diff_id = 2;
|
|
63
|
+
optional string content = 3;
|
|
64
|
+
optional int32 start_line = 4;
|
|
65
|
+
optional int32 end_line = 5;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
message ReplaceTextResponse {}
|
|
69
|
+
|
|
70
|
+
message ScrollDiffRequest {
|
|
71
|
+
optional string diff_id = 1;
|
|
72
|
+
optional int32 line = 2;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message ScrollDiffResponse {}
|
|
76
|
+
|
|
77
|
+
message TruncateDocumentRequest {
|
|
78
|
+
optional cline.Metadata metadata = 1;
|
|
79
|
+
optional string diff_id = 2;
|
|
80
|
+
optional int32 end_line = 3;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
message TruncateDocumentResponse {}
|
|
84
|
+
|
|
85
|
+
message CloseAllDiffsRequest {}
|
|
86
|
+
|
|
87
|
+
message CloseAllDiffsResponse {}
|
|
88
|
+
|
|
89
|
+
message SaveDocumentRequest {
|
|
90
|
+
optional cline.Metadata metadata = 1;
|
|
91
|
+
optional string diff_id = 2;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
message SaveDocumentResponse {}
|
|
95
|
+
|
|
96
|
+
message OpenMultiFileDiffRequest {
|
|
97
|
+
optional string title = 1;
|
|
98
|
+
repeated ContentDiff diffs = 2;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
message ContentDiff {
|
|
102
|
+
// The absolute file path.
|
|
103
|
+
optional string file_path = 1;
|
|
104
|
+
optional string left_content = 2;
|
|
105
|
+
optional string right_content = 3;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
message OpenMultiFileDiffResponse {}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package host;
|
|
4
|
+
option go_package = "github.com/cline/grpc-go/host";
|
|
5
|
+
option java_package = "bot.cline.host.proto";
|
|
6
|
+
option java_multiple_files = true;
|
|
7
|
+
|
|
8
|
+
import "cline/common.proto";
|
|
9
|
+
|
|
10
|
+
// Provides methods for working with the user's environment.
|
|
11
|
+
service EnvService {
|
|
12
|
+
// Writes text to the system clipboard.
|
|
13
|
+
rpc clipboardWriteText(cline.StringRequest) returns (cline.Empty);
|
|
14
|
+
|
|
15
|
+
// Reads text from the system clipboard.
|
|
16
|
+
rpc clipboardReadText(cline.EmptyRequest) returns (cline.String);
|
|
17
|
+
|
|
18
|
+
// Returns the name and version of the host IDE or environment.
|
|
19
|
+
rpc getHostVersion(cline.EmptyRequest) returns (GetHostVersionResponse);
|
|
20
|
+
|
|
21
|
+
// Returns a URI that will redirect to the host environment.
|
|
22
|
+
// e.g. vscode://saoudrizwan.claude-dev, idea://, pycharm://, etc.
|
|
23
|
+
// If the host does not support URIs it should return empty.
|
|
24
|
+
rpc getIdeRedirectUri(cline.EmptyRequest) returns (cline.String);
|
|
25
|
+
|
|
26
|
+
// Returns the telemetry settings of the host environment. This may return UNSUPPORTED
|
|
27
|
+
// if the host does not specify telemetry settings for the plugin.
|
|
28
|
+
rpc getTelemetrySettings(cline.EmptyRequest) returns (GetTelemetrySettingsResponse);
|
|
29
|
+
|
|
30
|
+
// Returns events when the telemetry settings change.
|
|
31
|
+
rpc subscribeToTelemetrySettings(cline.EmptyRequest) returns (stream TelemetrySettingsEvent);
|
|
32
|
+
|
|
33
|
+
// Initiates a graceful shutdown of the host bridge service.
|
|
34
|
+
rpc shutdown(cline.EmptyRequest) returns (cline.Empty);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message GetHostVersionResponse {
|
|
38
|
+
// The name of the host platform, e.g VSCode, IntelliJ Ultimate Edition, etc.
|
|
39
|
+
optional string platform = 1;
|
|
40
|
+
// The version of the host platform, e.g. 1.103.0 for VSCode, or 2025.1.1.1 for JetBrains IDEs.
|
|
41
|
+
optional string version = 2;
|
|
42
|
+
// The type of the cline host environment, e.g. 'VSCode Extension', 'Cline for JetBrains', 'CLI'
|
|
43
|
+
// This is different from the platform because there are many JetBrains IDEs, but they all use the same
|
|
44
|
+
// plugin.
|
|
45
|
+
optional string cline_type = 3;
|
|
46
|
+
// The version of the cline host environment, e.g. 33.2.10 for extension, or 1.0.6 for JetBrains.
|
|
47
|
+
optional string cline_version = 4;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
enum Setting {
|
|
51
|
+
UNSUPPORTED = 0; // This host does not support this setting.
|
|
52
|
+
ENABLED = 1;
|
|
53
|
+
DISABLED = 2;
|
|
54
|
+
}
|
|
55
|
+
message GetTelemetrySettingsResponse {
|
|
56
|
+
Setting is_enabled = 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message TelemetrySettingsEvent {
|
|
60
|
+
Setting is_enabled = 1;
|
|
61
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package host;
|
|
4
|
+
option go_package = "github.com/cline/grpc-go/host";
|
|
5
|
+
option java_package = "bot.cline.host.proto";
|
|
6
|
+
option java_multiple_files = true;
|
|
7
|
+
|
|
8
|
+
// This is for use in integration tests to get the contents of the webview.
|
|
9
|
+
service TestingService {
|
|
10
|
+
rpc getWebviewHtml(GetWebviewHtmlRequest) returns (GetWebviewHtmlResponse);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
message GetWebviewHtmlRequest {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message GetWebviewHtmlResponse {
|
|
17
|
+
optional string html = 1;
|
|
18
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package host;
|
|
4
|
+
option go_package = "github.com/cline/grpc-go/host";
|
|
5
|
+
option java_package = "bot.cline.host.proto";
|
|
6
|
+
option java_multiple_files = true;
|
|
7
|
+
|
|
8
|
+
// Provides methods for working with IDE windows and editors.
|
|
9
|
+
service WindowService {
|
|
10
|
+
// Opens a text document in the IDE editor and returns editor information.
|
|
11
|
+
rpc showTextDocument(ShowTextDocumentRequest) returns (TextEditorInfo);
|
|
12
|
+
|
|
13
|
+
// Shows the open file dialogue / file picker.
|
|
14
|
+
rpc showOpenDialogue(ShowOpenDialogueRequest) returns (SelectedResources);
|
|
15
|
+
|
|
16
|
+
// Shows a notification.
|
|
17
|
+
rpc showMessage(ShowMessageRequest) returns (SelectedResponse);
|
|
18
|
+
|
|
19
|
+
// Prompts the user for input and returns the response.
|
|
20
|
+
rpc showInputBox(ShowInputBoxRequest) returns (ShowInputBoxResponse);
|
|
21
|
+
|
|
22
|
+
// Shows the file save dialogue / file picker.
|
|
23
|
+
rpc showSaveDialog(ShowSaveDialogRequest) returns (ShowSaveDialogResponse);
|
|
24
|
+
|
|
25
|
+
// Opens a file in the IDE.
|
|
26
|
+
rpc openFile(OpenFileRequest) returns (OpenFileResponse);
|
|
27
|
+
|
|
28
|
+
// Opens the host settings UI, optionally focusing a specific query/section.
|
|
29
|
+
rpc openSettings(OpenSettingsRequest) returns (OpenSettingsResponse);
|
|
30
|
+
|
|
31
|
+
// Returns the open tabs.
|
|
32
|
+
rpc getOpenTabs(GetOpenTabsRequest) returns (GetOpenTabsResponse);
|
|
33
|
+
|
|
34
|
+
// Returns the visible tabs.
|
|
35
|
+
rpc getVisibleTabs(GetVisibleTabsRequest) returns (GetVisibleTabsResponse);
|
|
36
|
+
|
|
37
|
+
// Returns information about the current editor
|
|
38
|
+
rpc getActiveEditor(GetActiveEditorRequest) returns (GetActiveEditorResponse);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message ShowTextDocumentRequest {
|
|
42
|
+
string path = 2;
|
|
43
|
+
optional ShowTextDocumentOptions options = 3;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// See https://code.visualstudio.com/api/references/vscode-api#TextDocumentShowOptions
|
|
47
|
+
message ShowTextDocumentOptions {
|
|
48
|
+
optional bool preview = 1;
|
|
49
|
+
optional bool preserve_focus = 2;
|
|
50
|
+
optional int32 view_column = 3;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message TextEditorInfo {
|
|
54
|
+
string document_path = 1;
|
|
55
|
+
optional int32 view_column = 2;
|
|
56
|
+
bool is_active = 3;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message ShowOpenDialogueRequest {
|
|
60
|
+
optional bool can_select_many = 2;
|
|
61
|
+
optional string open_label = 3;
|
|
62
|
+
optional ShowOpenDialogueFilterOption filters = 4;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message ShowOpenDialogueFilterOption {
|
|
66
|
+
repeated string files = 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message SelectedResources {
|
|
70
|
+
repeated string paths = 1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
enum ShowMessageType {
|
|
74
|
+
ERROR = 0;
|
|
75
|
+
INFORMATION = 1;
|
|
76
|
+
WARNING = 2;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
message ShowMessageRequest {
|
|
80
|
+
ShowMessageType type = 1;
|
|
81
|
+
string message = 2;
|
|
82
|
+
optional ShowMessageRequestOptions options = 3;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
message ShowMessageRequestOptions {
|
|
86
|
+
repeated string items = 1;
|
|
87
|
+
optional bool modal = 2;
|
|
88
|
+
optional string detail = 3;
|
|
89
|
+
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
message SelectedResponse {
|
|
93
|
+
optional string selected_option = 1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
message ShowSaveDialogRequest {
|
|
97
|
+
optional ShowSaveDialogOptions options = 1;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
message ShowSaveDialogOptions {
|
|
101
|
+
optional string default_path = 1;
|
|
102
|
+
// A map of file types to extensions, e.g
|
|
103
|
+
// "Text Files": { "extensions": ["txt", "md"] }
|
|
104
|
+
map<string, FileExtensionList> filters = 2;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
message FileExtensionList {
|
|
108
|
+
// A list of file extension (without the dot).
|
|
109
|
+
repeated string extensions = 1;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
message ShowSaveDialogResponse {
|
|
113
|
+
// If the user cancelled the dialog, this will be empty.
|
|
114
|
+
optional string selected_path = 1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
message ShowInputBoxRequest {
|
|
118
|
+
string title = 1;
|
|
119
|
+
optional string prompt = 2;
|
|
120
|
+
optional string value = 3;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message ShowInputBoxResponse {
|
|
124
|
+
optional string response = 1;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
message OpenFileRequest {
|
|
128
|
+
string file_path = 1;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
message OpenFileResponse {}
|
|
132
|
+
|
|
133
|
+
message OpenSettingsRequest {
|
|
134
|
+
// Optional query to focus a particular settings section/key.
|
|
135
|
+
// This value is host-specific. In VS Code, it is passed directly as the
|
|
136
|
+
// Settings search query to the "workbench.action.openSettings" command.
|
|
137
|
+
// Examples (VS Code, see - https://code.visualstudio.com/docs/getstarted/settings#settings-editor-filters.):
|
|
138
|
+
// - "telemetry.telemetryLevel" → focuses the Telemetry Level setting
|
|
139
|
+
// - "@id:telemetry.telemetryLevel" → navigates by exact setting id
|
|
140
|
+
// - "@modified", "@ext:publisher.extension"
|
|
141
|
+
// - Plain keywords/categories
|
|
142
|
+
// If not provided the host opens the settings UI without specific focus.
|
|
143
|
+
optional string query = 1;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
message OpenSettingsResponse {}
|
|
147
|
+
|
|
148
|
+
message GetOpenTabsRequest {}
|
|
149
|
+
|
|
150
|
+
message GetOpenTabsResponse {
|
|
151
|
+
repeated string paths = 1;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
message GetVisibleTabsRequest {}
|
|
155
|
+
|
|
156
|
+
message GetVisibleTabsResponse {
|
|
157
|
+
repeated string paths = 1;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
message GetActiveEditorRequest {}
|
|
161
|
+
|
|
162
|
+
message GetActiveEditorResponse {
|
|
163
|
+
optional string file_path = 1;
|
|
164
|
+
}
|