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.
@@ -370,7 +370,7 @@
370
370
  "@types/should": "^11.2.0",
371
371
  "@types/sinon": "^17.0.4",
372
372
  "@types/turndown": "^5.0.5",
373
- "@types/vscode": "^1.84.0",
373
+ "@types/vscode": "1.84.0",
374
374
  "@vscode/test-cli": "^0.0.10",
375
375
  "@vscode/test-electron": "^2.5.2",
376
376
  "@vscode/vsce": "^3.6.0",
@@ -410,12 +410,25 @@
410
410
  "@grpc/reflection": "^1.0.4",
411
411
  "@mistralai/mistralai": "^1.5.0",
412
412
  "@modelcontextprotocol/sdk": "^1.11.1",
413
- "@opentelemetry/api": "^1.4.1",
414
- "@opentelemetry/exporter-trace-otlp-http": "^0.39.1",
413
+ "@opentelemetry/api": "^1.9.0",
414
+ "@opentelemetry/core": "^2.1.0",
415
+ "@opentelemetry/exporter-logs-otlp-grpc": "^0.56.0",
416
+ "@opentelemetry/exporter-logs-otlp-http": "^0.56.0",
417
+ "@opentelemetry/exporter-logs-otlp-proto": "^0.56.0",
418
+ "@opentelemetry/exporter-metrics-otlp-grpc": "^0.56.0",
419
+ "@opentelemetry/exporter-metrics-otlp-http": "^0.56.0",
420
+ "@opentelemetry/exporter-metrics-otlp-proto": "^0.56.0",
421
+ "@opentelemetry/exporter-prometheus": "^0.56.0",
422
+ "@opentelemetry/exporter-trace-otlp-http": "^0.56.0",
423
+ "@opentelemetry/instrumentation": "^0.205.0",
424
+ "@opentelemetry/instrumentation-http": "^0.205.0",
415
425
  "@opentelemetry/resources": "^1.30.1",
416
- "@opentelemetry/sdk-node": "^0.39.1",
426
+ "@opentelemetry/sdk-logs": "^0.56.0",
427
+ "@opentelemetry/sdk-metrics": "^1.30.1",
428
+ "@opentelemetry/sdk-node": "^0.56.0",
429
+ "@opentelemetry/sdk-trace-base": "^2.1.0",
417
430
  "@opentelemetry/sdk-trace-node": "^1.30.1",
418
- "@opentelemetry/semantic-conventions": "^1.30.0",
431
+ "@opentelemetry/semantic-conventions": "^1.37.0",
419
432
  "@playwright/test": "^1.53.2",
420
433
  "@sap-ai-sdk/ai-api": "^1.17.0",
421
434
  "@sap-ai-sdk/orchestration": "^1.17.0",
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "cline",
3
- "version": "1.0.0-nightly.6",
3
+ "version": "1.0.0-nightly.8",
4
4
  "description": "Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more",
5
5
  "main": "cline-core.js",
6
6
  "bin": {
7
7
  "cline": "./bin/cline",
8
8
  "cline-host": "./bin/cline-host"
9
9
  },
10
+ "scripts": {
11
+ "postinstall": "node postinstall.js"
12
+ },
10
13
  "bundleDependencies": [
11
14
  "@grpc/grpc-js",
12
15
  "@grpc/reflection",
package/postinstall.js ADDED
@@ -0,0 +1,120 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const os = require('os');
6
+
7
+ // Detect current platform and architecture
8
+ function getPlatformInfo() {
9
+ const platform = os.platform();
10
+ const arch = os.arch();
11
+
12
+ // Map Node.js arch names to Go arch names
13
+ let goArch = arch;
14
+ if (arch === 'x64') {
15
+ goArch = 'amd64';
16
+ }
17
+
18
+ let goPlatform = platform;
19
+
20
+ return { platform: goPlatform, arch: goArch };
21
+ }
22
+
23
+ // Setup platform-specific binaries
24
+ function setupBinaries() {
25
+ const { platform, arch } = getPlatformInfo();
26
+ const platformSuffix = `${platform}-${arch}`;
27
+
28
+ console.log(`Setting up Cline CLI for ${platformSuffix}...`);
29
+
30
+ const binDir = path.join(__dirname, 'bin');
31
+
32
+ // Check if platform-specific binaries exist
33
+ const clineSource = path.join(binDir, `cline-${platformSuffix}`);
34
+ const clineHostSource = path.join(binDir, `cline-host-${platformSuffix}`);
35
+
36
+ if (!fs.existsSync(clineSource)) {
37
+ console.error(`Error: Binary not found for platform ${platformSuffix}`);
38
+ console.error(`Expected: ${clineSource}`);
39
+ console.error(`Supported platforms: darwin-arm64, darwin-amd64, linux-amd64, linux-arm64`);
40
+ process.exit(1);
41
+ }
42
+
43
+ if (!fs.existsSync(clineHostSource)) {
44
+ console.error(`Error: Binary not found for platform ${platformSuffix}`);
45
+ console.error(`Expected: ${clineHostSource}`);
46
+ process.exit(1);
47
+ }
48
+
49
+ // Create symlinks or copies to the generic names
50
+ const clineTarget = path.join(binDir, 'cline');
51
+ const clineHostTarget = path.join(binDir, 'cline-host');
52
+
53
+ // Remove existing files if they exist
54
+ [clineTarget, clineHostTarget].forEach(target => {
55
+ if (fs.existsSync(target)) {
56
+ try {
57
+ fs.unlinkSync(target);
58
+ } catch (e) {
59
+ console.warn(`Warning: Could not remove existing file ${target}: ${e.message}`);
60
+ }
61
+ }
62
+ });
63
+
64
+ // On Unix, create symlinks; on Windows, copy files
65
+ if (platform === 'win32') {
66
+ // Windows: copy files
67
+ fs.copyFileSync(clineSource, clineTarget);
68
+ fs.copyFileSync(clineHostSource, clineHostTarget);
69
+ console.log('✓ Copied platform-specific binaries');
70
+ } else {
71
+ // Unix: create symlinks
72
+ fs.symlinkSync(path.basename(clineSource), clineTarget);
73
+ fs.symlinkSync(path.basename(clineHostSource), clineHostTarget);
74
+ console.log('✓ Created symlinks to platform-specific binaries');
75
+
76
+ // Make binaries executable
77
+ try {
78
+ fs.chmodSync(clineSource, 0o755);
79
+ fs.chmodSync(clineHostSource, 0o755);
80
+ fs.chmodSync(clineTarget, 0o755);
81
+ fs.chmodSync(clineHostTarget, 0o755);
82
+ } catch (error) {
83
+ console.warn(`Warning: Could not set executable permissions: ${error.message}`);
84
+ }
85
+ }
86
+
87
+ // Check ripgrep binary
88
+ const rgBinary = platform === 'win32' ? 'rg.exe' : 'rg';
89
+ const rgPath = path.join(__dirname, rgBinary);
90
+
91
+ if (!fs.existsSync(rgPath)) {
92
+ console.error(`Error: ripgrep binary not found at ${rgPath}`);
93
+ process.exit(1);
94
+ }
95
+
96
+ // Make ripgrep executable (Unix only)
97
+ if (platform !== 'win32') {
98
+ try {
99
+ fs.chmodSync(rgPath, 0o755);
100
+ } catch (error) {
101
+ console.warn(`Warning: Could not set ripgrep executable permissions: ${error.message}`);
102
+ }
103
+ }
104
+
105
+ console.log('✓ Cline CLI installation complete');
106
+ console.log('');
107
+ console.log('Usage:');
108
+ console.log(' cline - Start Cline CLI');
109
+ console.log(' cline-host - Start Cline host service');
110
+ console.log('');
111
+ console.log('Documentation: https://docs.cline.bot');
112
+ }
113
+
114
+ try {
115
+ setupBinaries();
116
+ } catch (error) {
117
+ console.error(`Installation failed: ${error.message}`);
118
+ console.error('Please report this issue at: https://github.com/cline/cline/issues');
119
+ process.exit(1);
120
+ }
@@ -0,0 +1,136 @@
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 for account-related operations
10
+ service AccountService {
11
+ // Handles the user clicking the login link in the UI.
12
+ // Generates a secure nonce for state validation, stores it in secrets,
13
+ // and opens the authentication URL in the external browser.
14
+ rpc accountLoginClicked(EmptyRequest) returns (String);
15
+
16
+ // Handles the user clicking the logout button in the UI.
17
+ // Clears API keys and user state.
18
+ rpc accountLogoutClicked(EmptyRequest) returns (Empty);
19
+
20
+ // Subscribe to auth status update events (when authentication state changes)
21
+ rpc subscribeToAuthStatusUpdate(EmptyRequest)
22
+ returns (stream AuthState);
23
+
24
+ // Handles authentication state changes from the Firebase context.
25
+ // Updates the user info in global state and returns the updated value.
26
+ rpc authStateChanged(AuthStateChangedRequest)
27
+ returns (AuthState);
28
+
29
+ // Fetches all user credits data
30
+ // (balance, usage transactions, payment transactions)
31
+ rpc getUserCredits(EmptyRequest) returns (UserCreditsData);
32
+
33
+ rpc getOrganizationCredits(GetOrganizationCreditsRequest) returns (OrganizationCreditsData);
34
+
35
+ // Fetches all user organizations data
36
+ // Returns a list of UserOrganization objects
37
+ rpc getUserOrganizations(EmptyRequest) returns (UserOrganizationsResponse);
38
+
39
+ rpc setUserOrganization(UserOrganizationUpdateRequest) returns (Empty);
40
+
41
+ rpc openrouterAuthClicked(EmptyRequest) returns (Empty);
42
+
43
+ // Returns a link the webview can use to redirect back to the user's IDE.
44
+ rpc getRedirectUrl(EmptyRequest) returns (String);
45
+ }
46
+
47
+ message AuthStateChangedRequest {
48
+ Metadata metadata = 1;
49
+ UserInfo user = 2;
50
+ }
51
+
52
+ message AuthState {
53
+ optional UserInfo user = 1;
54
+ }
55
+
56
+ // User's information
57
+ message UserInfo {
58
+ string uid = 1;
59
+ optional string display_name = 2;
60
+ optional string email = 3;
61
+ optional string photo_url = 4;
62
+ optional string app_base_url = 5; // Cline app base URL
63
+ }
64
+
65
+ message UserOrganization {
66
+ bool active = 1;
67
+ string member_id = 2;
68
+ string name = 3;
69
+ string organization_id = 4;
70
+ repeated string roles = 5; // ["admin", "member", "owner"]
71
+ }
72
+
73
+ message UserOrganizationsResponse {
74
+ repeated UserOrganization organizations = 1;
75
+ }
76
+
77
+ message UserOrganizationUpdateRequest {
78
+ optional string organization_id = 1;
79
+ }
80
+
81
+ message UserCreditsData {
82
+ UserCreditsBalance balance = 1;
83
+ repeated UsageTransaction usage_transactions = 2;
84
+ repeated PaymentTransaction payment_transactions = 3;
85
+ }
86
+
87
+ message GetOrganizationCreditsRequest {
88
+ string organization_id = 1;
89
+ }
90
+
91
+ message OrganizationCreditsData {
92
+ UserCreditsBalance balance = 1;
93
+ string organization_id = 2;
94
+ repeated OrganizationUsageTransaction usage_transactions = 3;
95
+ }
96
+
97
+ message UserCreditsBalance {
98
+ double current_balance = 1;
99
+ }
100
+
101
+ message UsageTransaction {
102
+ string ai_inference_provider_name = 1;
103
+ string ai_model_name = 2;
104
+ string ai_model_type_name = 3;
105
+ int32 completion_tokens = 4;
106
+ double cost_usd = 5;
107
+ string created_at = 6;
108
+ double credits_used = 7;
109
+ string generation_id = 8;
110
+ string organization_id = 9;
111
+ int32 prompt_tokens = 10;
112
+ int32 total_tokens = 11;
113
+ string user_id = 12;
114
+ }
115
+
116
+ message PaymentTransaction {
117
+ string paid_at = 1;
118
+ string creator_id = 2;
119
+ int32 amount_cents = 3;
120
+ double credits = 4;
121
+ }
122
+
123
+ message OrganizationUsageTransaction {
124
+ string ai_inference_provider_name = 1;
125
+ string ai_model_name = 2;
126
+ string ai_model_type_name = 3;
127
+ int32 completion_tokens = 4;
128
+ double cost_usd = 5;
129
+ string created_at = 6;
130
+ double credits_used = 7;
131
+ string generation_id = 8;
132
+ string organization_id = 9;
133
+ int32 prompt_tokens = 10;
134
+ int32 total_tokens = 11;
135
+ string user_id = 12;
136
+ }
@@ -0,0 +1,56 @@
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 BrowserService {
10
+ rpc getBrowserConnectionInfo(EmptyRequest) returns (BrowserConnectionInfo);
11
+ rpc testBrowserConnection(StringRequest) returns (BrowserConnection);
12
+ rpc discoverBrowser(EmptyRequest) returns (BrowserConnection);
13
+ rpc getDetectedChromePath(EmptyRequest) returns (ChromePath);
14
+ rpc relaunchChromeDebugMode(EmptyRequest) returns (String);
15
+ }
16
+
17
+ message BrowserConnectionInfo {
18
+ bool is_connected = 1;
19
+ bool is_remote = 2;
20
+ optional string host = 3;
21
+ }
22
+
23
+ message BrowserConnection {
24
+ bool success = 1;
25
+ string message = 2;
26
+ optional string endpoint = 3;
27
+ }
28
+
29
+ message ChromePath {
30
+ string path = 1;
31
+ bool is_bundled = 2;
32
+ }
33
+
34
+ message Viewport {
35
+ int32 width = 1;
36
+ int32 height = 2;
37
+ }
38
+
39
+ message BrowserSettings {
40
+ Viewport viewport = 1;
41
+ optional string remote_browser_host = 2;
42
+ optional bool remote_browser_enabled = 3;
43
+ optional string chrome_executable_path = 4;
44
+ optional bool disable_tool_use = 5;
45
+ optional string custom_args = 6;
46
+ }
47
+
48
+ message UpdateBrowserSettingsRequest {
49
+ Metadata metadata = 1;
50
+ Viewport viewport = 2;
51
+ optional string remote_browser_host = 3;
52
+ optional bool remote_browser_enabled = 4;
53
+ optional string chrome_executable_path = 5;
54
+ optional bool disable_tool_use = 6;
55
+ optional string custom_args = 7;
56
+ }
@@ -0,0 +1,45 @@
1
+ syntax = "proto3";
2
+
3
+ package cline;
4
+ import "cline/common.proto";
5
+ import "google/protobuf/timestamp.proto";
6
+ option go_package = "github.com/cline/grpc-go/cline";
7
+ option java_package = "bot.cline.proto";
8
+ option java_multiple_files = true;
9
+
10
+ service CheckpointsService {
11
+ rpc checkpointDiff(Int64Request) returns (Empty);
12
+ rpc checkpointRestore(CheckpointRestoreRequest) returns (Empty);
13
+ rpc subscribeToCheckpoints(CheckpointSubscriptionRequest) returns (stream CheckpointEvent);
14
+ rpc getCwdHash(StringArrayRequest) returns (PathHashMap);
15
+ }
16
+
17
+ message CheckpointRestoreRequest {
18
+ Metadata metadata = 1;
19
+ int64 number = 2;
20
+ string restore_type = 3;
21
+ optional int64 offset = 4;
22
+ }
23
+
24
+ message CheckpointSubscriptionRequest {
25
+ string cwd_hash = 1;
26
+ }
27
+
28
+ message CheckpointEvent {
29
+ enum OperationType {
30
+ CHECKPOINT_INIT = 0;
31
+ CHECKPOINT_COMMIT = 1;
32
+ CHECKPOINT_RESTORE = 2;
33
+ }
34
+
35
+ OperationType operation = 1;
36
+ string cwd_hash = 2;
37
+ bool is_active = 3;
38
+ google.protobuf.Timestamp timestamp = 4;
39
+ optional string task_id = 5;
40
+ optional string commit_hash = 6;
41
+ }
42
+
43
+ message PathHashMap {
44
+ map<string, string> path_hash = 1;
45
+ }
@@ -0,0 +1,30 @@
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 for running IDE commands, for example context menu actions,
10
+ // commands, etc.
11
+ // In contrast to the rest of the ProtoBus services, these are
12
+ // intended to be called by the IDE directly instead of through the webview,
13
+ // because they are triggered by interactions in the IDE.
14
+ service CommandsService {
15
+ rpc addToCline(CommandContext) returns (Empty);
16
+ rpc fixWithCline(CommandContext) returns (Empty);
17
+ rpc explainWithCline(CommandContext) returns (Empty);
18
+ rpc improveWithCline(CommandContext) returns (Empty);
19
+ }
20
+
21
+ message CommandContext {
22
+ // The absolute path of the current file.
23
+ optional string file_path = 1;
24
+ // The selected source text.
25
+ optional string selected_text = 2;
26
+ // The language identifier for the current file.
27
+ optional string language = 3;
28
+ // Any diagnostic problems for the current file.
29
+ repeated cline.Diagnostic diagnostics = 4;
30
+ }
@@ -0,0 +1,99 @@
1
+ syntax = "proto3";
2
+
3
+ package cline;
4
+ option go_package = "github.com/cline/grpc-go/cline";
5
+ option java_package = "bot.cline.proto";
6
+ option java_multiple_files = true;
7
+
8
+ message Metadata {
9
+ }
10
+
11
+ message EmptyRequest {
12
+ }
13
+
14
+ message Empty {
15
+ }
16
+
17
+ message StringRequest {
18
+ string value = 2;
19
+ }
20
+
21
+ message StringArrayRequest {
22
+ repeated string value = 2;
23
+ }
24
+
25
+ message String {
26
+ string value = 1;
27
+ }
28
+
29
+ message Int64Request {
30
+ int64 value = 2;
31
+ }
32
+
33
+ message Int64 {
34
+ int64 value = 1;
35
+ }
36
+
37
+ message BytesRequest {
38
+ bytes value = 2;
39
+ }
40
+
41
+ message Bytes {
42
+ bytes value = 1;
43
+ }
44
+
45
+ message BooleanRequest {
46
+ bool value = 2;
47
+ }
48
+
49
+ message Boolean {
50
+ bool value = 1;
51
+ }
52
+
53
+ // the same as Boolean, but avoiding name conflicts
54
+ message BooleanResponse {
55
+ bool value = 1;
56
+ }
57
+
58
+ message StringArray {
59
+ repeated string values = 1;
60
+ }
61
+
62
+ message StringArrays {
63
+ repeated string values1 = 1;
64
+ repeated string values2 = 2;
65
+ }
66
+
67
+ message KeyValuePair {
68
+ string key = 1;
69
+ string value = 2;
70
+ }
71
+
72
+ message FileDiagnostics {
73
+ string file_path = 1;
74
+ repeated Diagnostic diagnostics = 2;
75
+ }
76
+
77
+ message Diagnostic {
78
+ string message = 1;
79
+ DiagnosticRange range = 2;
80
+ DiagnosticSeverity severity = 3;
81
+ optional string source = 4;
82
+ }
83
+
84
+ message DiagnosticRange {
85
+ DiagnosticPosition start = 1;
86
+ DiagnosticPosition end = 2;
87
+ }
88
+
89
+ message DiagnosticPosition {
90
+ int32 line = 1;
91
+ int32 character = 2;
92
+ }
93
+
94
+ enum DiagnosticSeverity {
95
+ DIAGNOSTIC_ERROR = 0;
96
+ DIAGNOSTIC_WARNING = 1;
97
+ DIAGNOSTIC_INFORMATION = 2;
98
+ DIAGNOSTIC_HINT = 3;
99
+ }
@@ -0,0 +1,42 @@
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 DictationService {
10
+ rpc startRecording(EmptyRequest) returns (RecordingResult);
11
+ rpc stopRecording(EmptyRequest) returns (RecordedAudio);
12
+ rpc cancelRecording(EmptyRequest) returns (RecordingResult);
13
+ rpc getRecordingStatus(EmptyRequest) returns (RecordingStatus);
14
+ rpc transcribeAudio(TranscribeAudioRequest) returns (Transcription);
15
+ }
16
+
17
+ message TranscribeAudioRequest {
18
+ string audio_base64 = 2;
19
+ string language = 3;
20
+ }
21
+
22
+ message RecordingResult {
23
+ bool success = 1;
24
+ string error = 2;
25
+ }
26
+
27
+ message RecordedAudio {
28
+ bool success = 1;
29
+ string audio_base64 = 2;
30
+ string error = 3;
31
+ }
32
+
33
+ message RecordingStatus {
34
+ bool is_recording = 1;
35
+ double duration_seconds = 2;
36
+ string error = 3;
37
+ }
38
+
39
+ message Transcription {
40
+ string text = 1;
41
+ string error = 2;
42
+ }