antigravity-claude-proxy 2.2.1 → 2.2.2
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/package.json
CHANGED
|
@@ -220,17 +220,13 @@ export async function discoverProject(token, projectId = undefined) {
|
|
|
220
220
|
let gotSuccessfulResponse = false;
|
|
221
221
|
let loadCodeAssistData = null;
|
|
222
222
|
|
|
223
|
-
// Build metadata matching reference: only set duetProject if projectId is truthy
|
|
224
|
-
// For loadCodeAssist, reference passes projectId ?? fallbackProjectId
|
|
225
|
-
// Reference: opencode-antigravity-auth/src/plugin/project.ts buildMetadata()
|
|
226
|
-
const projectIdForLoad = projectId ?? DEFAULT_PROJECT_ID;
|
|
227
223
|
const metadata = {
|
|
228
224
|
ideType: 'IDE_UNSPECIFIED',
|
|
229
225
|
platform: 'PLATFORM_UNSPECIFIED',
|
|
230
226
|
pluginType: 'GEMINI'
|
|
231
227
|
};
|
|
232
|
-
if (
|
|
233
|
-
metadata.duetProject =
|
|
228
|
+
if (projectId) {
|
|
229
|
+
metadata.duetProject = projectId;
|
|
234
230
|
}
|
|
235
231
|
|
|
236
232
|
for (const endpoint of LOAD_CODE_ASSIST_ENDPOINTS) {
|
|
@@ -282,23 +278,11 @@ export async function discoverProject(token, projectId = undefined) {
|
|
|
282
278
|
|
|
283
279
|
// If we got a successful response but no project, try onboarding
|
|
284
280
|
if (gotSuccessfulResponse && loadCodeAssistData) {
|
|
285
|
-
//
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
tierId = loadCodeAssistData.paidTier.id;
|
|
291
|
-
tierSource = 'paidTier';
|
|
292
|
-
} else if (loadCodeAssistData.currentTier?.id) {
|
|
293
|
-
tierId = loadCodeAssistData.currentTier.id;
|
|
294
|
-
tierSource = 'currentTier';
|
|
295
|
-
} else {
|
|
296
|
-
tierId = getDefaultTierId(loadCodeAssistData.allowedTiers);
|
|
297
|
-
tierSource = 'allowedTiers';
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
tierId = tierId || 'free-tier';
|
|
301
|
-
logger.info(`[AccountManager] Onboarding user with tier: ${tierId} (source: ${tierSource})`);
|
|
281
|
+
// Only use allowedTiers for onboarding (matching opencode-antigravity-auth and oauth.js)
|
|
282
|
+
// Note: paidTier (g1-pro-tier, g1-ultra-tier) is NOT valid for onboardUser API
|
|
283
|
+
// The paidTier is used for subscription detection only, not for onboarding
|
|
284
|
+
const tierId = getDefaultTierId(loadCodeAssistData.allowedTiers) || 'free-tier';
|
|
285
|
+
logger.info(`[AccountManager] Onboarding user with tier: ${tierId}`);
|
|
302
286
|
|
|
303
287
|
// Pass projectId for metadata.duetProject (without fallback, matching reference)
|
|
304
288
|
// Reference: opencode-antigravity-auth passes parts.projectId (not fallback) to onboardManagedProject
|