antigravity-claude-proxy 3.0.0 → 3.0.1
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/cli.js +4 -11
- package/package.json +1 -1
- package/public/app.js +7 -4
- package/public/css/src/input.css +0 -7
- package/public/css/style.css +1 -1
- package/public/js/components/claude-config.js +0 -8
- package/public/js/components/dashboard/charts.js +8 -8
- package/public/js/components/dashboard/stats.js +1 -1
- package/public/js/components/logs-viewer.js +1 -1
- package/public/js/components/models.js +2 -3
- package/public/js/components/server-config.js +1 -9
- package/public/js/data-store.js +2 -2
- package/public/js/store.js +1 -1
- package/public/js/translations/en.js +0 -2
- package/public/js/translations/id.js +0 -1
- package/public/js/translations/pt.js +0 -1
- package/public/js/translations/tr.js +0 -2
- package/public/js/translations/zh.js +0 -2
- package/public/js/utils/error-handler.js +0 -2
- package/public/js/utils/ui-logger.js +4 -3
- package/src/account-manager/index.js +0 -4
- package/src/account-manager/rate-limits.js +0 -5
- package/src/account-manager/strategies/base-strategy.js +4 -4
- package/src/account-manager/strategies/hybrid-strategy.js +3 -3
- package/src/auth/database.js +1 -0
- package/src/auth/oauth.js +43 -41
- package/src/auth/token-extractor.js +1 -1
- package/src/cli/accounts.js +2 -1
- package/src/cloudcode/model-registry.js +0 -3
- package/src/cloudcode/rate-limit-state.js +1 -7
- package/src/config.js +1 -1
- package/src/constants.js +0 -2
- package/src/format/content-converter.js +0 -4
- package/src/format/request-converter.js +1 -6
- package/src/format/response-converter.js +0 -3
- package/src/format/schema-sanitizer.js +3 -22
- package/src/format/thinking-utils.js +1 -13
- package/src/index.js +1 -6
- package/src/modules/usage-stats.js +1 -1
- package/src/server.js +1 -28
- package/src/utils/claude-config.js +2 -6
- package/src/utils/native-module-helper.js +0 -4
- package/src/utils/proxy.js +1 -10
- package/src/utils/version-detector.js +14 -5
- package/src/webui/index.js +1 -37
package/src/webui/index.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import path from 'path';
|
|
16
16
|
import express from 'express';
|
|
17
17
|
import { getPublicConfig, saveConfig, config } from '../config.js';
|
|
18
|
-
import { DEFAULT_PORT, ACCOUNT_CONFIG_PATH, MAX_ACCOUNTS, DEFAULT_PRESETS
|
|
18
|
+
import { DEFAULT_PORT, ACCOUNT_CONFIG_PATH, MAX_ACCOUNTS, DEFAULT_PRESETS } from '../constants.js';
|
|
19
19
|
import { readClaudeConfig, updateClaudeConfig, replaceClaudeConfig, getClaudeConfigPath, readPresets, savePreset, deletePreset } from '../utils/claude-config.js';
|
|
20
20
|
import { readServerPresets, saveServerPreset, updateServerPreset, deleteServerPreset } from '../utils/server-presets.js';
|
|
21
21
|
import { logger } from '../utils/logger.js';
|
|
@@ -259,10 +259,6 @@ export function mountWebUI(app, dirname, accountManager) {
|
|
|
259
259
|
// Serve static files from public directory
|
|
260
260
|
app.use(express.static(path.join(dirname, '../public')));
|
|
261
261
|
|
|
262
|
-
// ==========================================
|
|
263
|
-
// Account Management API
|
|
264
|
-
// ==========================================
|
|
265
|
-
|
|
266
262
|
/**
|
|
267
263
|
* GET /api/accounts - List all accounts with status
|
|
268
264
|
*/
|
|
@@ -554,10 +550,6 @@ export function mountWebUI(app, dirname, accountManager) {
|
|
|
554
550
|
}
|
|
555
551
|
});
|
|
556
552
|
|
|
557
|
-
// ==========================================
|
|
558
|
-
// Configuration API
|
|
559
|
-
// ==========================================
|
|
560
|
-
|
|
561
553
|
/**
|
|
562
554
|
* GET /api/config - Get server configuration
|
|
563
555
|
*/
|
|
@@ -703,10 +695,6 @@ export function mountWebUI(app, dirname, accountManager) {
|
|
|
703
695
|
}
|
|
704
696
|
});
|
|
705
697
|
|
|
706
|
-
// ==========================================
|
|
707
|
-
// Claude CLI Configuration API
|
|
708
|
-
// ==========================================
|
|
709
|
-
|
|
710
698
|
/**
|
|
711
699
|
* GET /api/claude/config - Get Claude CLI configuration
|
|
712
700
|
*/
|
|
@@ -790,10 +778,6 @@ export function mountWebUI(app, dirname, accountManager) {
|
|
|
790
778
|
}
|
|
791
779
|
});
|
|
792
780
|
|
|
793
|
-
// ==========================================
|
|
794
|
-
// Claude CLI Mode Toggle API (Proxy/Paid)
|
|
795
|
-
// ==========================================
|
|
796
|
-
|
|
797
781
|
/**
|
|
798
782
|
* GET /api/claude/mode - Get current mode (proxy or paid)
|
|
799
783
|
* Returns 'proxy' if ANTHROPIC_BASE_URL is set to localhost, 'paid' otherwise
|
|
@@ -869,10 +853,6 @@ export function mountWebUI(app, dirname, accountManager) {
|
|
|
869
853
|
}
|
|
870
854
|
});
|
|
871
855
|
|
|
872
|
-
// ==========================================
|
|
873
|
-
// Claude CLI Presets API
|
|
874
|
-
// ==========================================
|
|
875
|
-
|
|
876
856
|
|
|
877
857
|
/**
|
|
878
858
|
* GET /api/claude/presets - Get all saved presets
|
|
@@ -923,10 +903,6 @@ export function mountWebUI(app, dirname, accountManager) {
|
|
|
923
903
|
}
|
|
924
904
|
});
|
|
925
905
|
|
|
926
|
-
// ==========================================
|
|
927
|
-
// Server Configuration Presets API
|
|
928
|
-
// ==========================================
|
|
929
|
-
|
|
930
906
|
/**
|
|
931
907
|
* GET /api/server/presets - List all server config presets
|
|
932
908
|
*/
|
|
@@ -1063,10 +1039,6 @@ export function mountWebUI(app, dirname, accountManager) {
|
|
|
1063
1039
|
}
|
|
1064
1040
|
});
|
|
1065
1041
|
|
|
1066
|
-
// ==========================================
|
|
1067
|
-
// Logs API
|
|
1068
|
-
// ==========================================
|
|
1069
|
-
|
|
1070
1042
|
/**
|
|
1071
1043
|
* GET /api/logs - Get log history
|
|
1072
1044
|
*/
|
|
@@ -1108,10 +1080,6 @@ export function mountWebUI(app, dirname, accountManager) {
|
|
|
1108
1080
|
});
|
|
1109
1081
|
});
|
|
1110
1082
|
|
|
1111
|
-
// ==========================================
|
|
1112
|
-
// Strategy Health API (Developer Mode)
|
|
1113
|
-
// ==========================================
|
|
1114
|
-
|
|
1115
1083
|
/**
|
|
1116
1084
|
* GET /api/strategy/health - Get strategy health data for the inspector panel
|
|
1117
1085
|
* Only available when devMode is enabled
|
|
@@ -1136,10 +1104,6 @@ export function mountWebUI(app, dirname, accountManager) {
|
|
|
1136
1104
|
}
|
|
1137
1105
|
});
|
|
1138
1106
|
|
|
1139
|
-
// ==========================================
|
|
1140
|
-
// OAuth API
|
|
1141
|
-
// ==========================================
|
|
1142
|
-
|
|
1143
1107
|
/**
|
|
1144
1108
|
* GET /api/auth/url - Get OAuth URL to start the flow
|
|
1145
1109
|
* Uses CLI's OAuth flow (localhost:51121) instead of WebUI's port
|