@boxes-dev/dvb-runtime 1.0.767 → 1.0.769
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/dist/bin/dvb.cjs +55 -127
- package/dist/bin/dvb.cjs.map +1 -1
- package/dist/bin/dvbd.cjs +6 -6
- package/package.json +2 -2
package/dist/bin/dvb.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="258881c6-605d-5da3-b54e-37b34fc185b7")}catch(e){}}();
|
|
4
4
|
|
|
5
5
|
var __create = Object.create;
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
@@ -74562,8 +74562,8 @@ var init_otel = __esm({
|
|
|
74562
74562
|
return trimmed && trimmed.length > 0 ? trimmed : void 0;
|
|
74563
74563
|
};
|
|
74564
74564
|
readBuildMetadata = () => {
|
|
74565
|
-
const rawPackageVersion = "1.0.
|
|
74566
|
-
const rawGitSha = "
|
|
74565
|
+
const rawPackageVersion = "1.0.769";
|
|
74566
|
+
const rawGitSha = "d15a733e9abfa0290d8832830e194eff44945138";
|
|
74567
74567
|
const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
|
|
74568
74568
|
const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
|
|
74569
74569
|
return { packageVersion, gitSha };
|
|
@@ -112523,9 +112523,9 @@ var init_sentry = __esm({
|
|
|
112523
112523
|
uncaughtExceptionMonitorInstalled = false;
|
|
112524
112524
|
currentDevboxSentryUser = null;
|
|
112525
112525
|
readBuildMetadata2 = () => {
|
|
112526
|
-
const rawPackageVersion = "1.0.
|
|
112527
|
-
const rawGitSha = "
|
|
112528
|
-
const rawSentryRelease = "boxes-dev-dvb@1.0.
|
|
112526
|
+
const rawPackageVersion = "1.0.769";
|
|
112527
|
+
const rawGitSha = "d15a733e9abfa0290d8832830e194eff44945138";
|
|
112528
|
+
const rawSentryRelease = "boxes-dev-dvb@1.0.769+d15a733e9abfa0290d8832830e194eff44945138";
|
|
112529
112529
|
const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
|
|
112530
112530
|
const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
|
|
112531
112531
|
const sentryRelease = typeof rawSentryRelease === "string" ? rawSentryRelease : void 0;
|
|
@@ -119058,7 +119058,7 @@ var init_packageVersion = __esm({
|
|
|
119058
119058
|
return import_node_path18.default.join(process.cwd(), "dvb");
|
|
119059
119059
|
};
|
|
119060
119060
|
readEmbeddedPackageVersion = () => {
|
|
119061
|
-
const raw = "1.0.
|
|
119061
|
+
const raw = "1.0.769";
|
|
119062
119062
|
return trimVersion(raw);
|
|
119063
119063
|
};
|
|
119064
119064
|
readNearestPackageMetadata = (basePath) => {
|
|
@@ -133904,7 +133904,7 @@ var init_index_node = __esm({
|
|
|
133904
133904
|
});
|
|
133905
133905
|
|
|
133906
133906
|
// src/devbox/controlPlane.ts
|
|
133907
|
-
var import_node_http, import_node_crypto7, MANAGED_DAEMON_NOT_READY_CODE, CONVEX_INFLIGHT_ACTION_DISCONNECTED_MESSAGE, CONTROL_PLANE_ACTION_RETRY_MAX_ATTEMPTS, CONTROL_PLANE_ACTION_RETRY_BASE_DELAY_MS, CONTROL_PLANE_CHECKPOINT_RECOVERY_MAX_ATTEMPTS, CONTROL_PLANE_CHECKPOINT_RECOVERY_POLL_MS, ManagedDaemonNotReadyError, isManagedDaemonNotReadyError, sleep2, isRetryableTransientConvexActionError, buildTransientConvexActionRetryMessage, announceTransientConvexActionRetry, retryTransientConvexAction, normalizeStringRecord, E2B_DEVBOX_ALIAS_EXISTS_CODE, isRecord, maybeMapE2bProvisionControlPlaneError, mapE2bProvisionControlPlaneError, resolveControlPlaneUrl, resolveConvexUrl, escapeHtml, CALLBACK_LOGO_MARK, CALLBACK_FULL_LOGO, renderCallbackPage, requestJson, startCallbackServer, getControlPlaneUrl, getConvexUrl, createDefaultBrowserSignInDeps, signInWithBrowser, claudeTokenGet, claudeTokenSet,
|
|
133907
|
+
var import_node_http, import_node_crypto7, MANAGED_DAEMON_NOT_READY_CODE, CONVEX_INFLIGHT_ACTION_DISCONNECTED_MESSAGE, CONTROL_PLANE_ACTION_RETRY_MAX_ATTEMPTS, CONTROL_PLANE_ACTION_RETRY_BASE_DELAY_MS, CONTROL_PLANE_CHECKPOINT_RECOVERY_MAX_ATTEMPTS, CONTROL_PLANE_CHECKPOINT_RECOVERY_POLL_MS, ManagedDaemonNotReadyError, isManagedDaemonNotReadyError, sleep2, isRetryableTransientConvexActionError, buildTransientConvexActionRetryMessage, announceTransientConvexActionRetry, retryTransientConvexAction, normalizeStringRecord, E2B_DEVBOX_ALIAS_EXISTS_CODE, isRecord, maybeMapE2bProvisionControlPlaneError, mapE2bProvisionControlPlaneError, resolveControlPlaneUrl, resolveConvexUrl, escapeHtml, CALLBACK_LOGO_MARK, CALLBACK_FULL_LOGO, renderCallbackPage, requestJson, startCallbackServer, getControlPlaneUrl, getConvexUrl, createDefaultBrowserSignInDeps, signInWithBrowser, claudeTokenGet, claudeTokenSet, claudeTokenClear, codexAuthCacheGet, codexAuthCacheSet, codexAuthCacheClear, claudeTokenReportRuntimeAuthFailureForViewer, claudeTokenReportRuntimeValidatedForViewer, e2bTokenResolvedGet, userSettingsGet, userSettingsSet, e2bDevboxRemove, e2bDevboxGet, e2bDevboxStatusesList, e2bDevboxDestroy, e2bDevboxProvision, e2bDevboxRestoreLatestSnapshot, e2bDevboxPause, e2bDevboxEnsureActive, e2bDevboxKeepAlive, e2bDevboxReset, e2bDevboxIssueBootstrapConnectInfo, e2bDevboxSetDaemonBootstrapState, managedDevboxIssueDaemonConnectInfo, managedDevboxCreateCheckpoint, managedDevboxListRemoteStates, spriteDaemonReleaseGet, spriteDaemonTokenIssue, clientThreadsListForPrimaryInstance, threadTitleGenerationStatesListForPrimaryInstance, spriteDaemonSessionsList, clientThreadsUpsertRemoteInitCodexThread, clientThreadsDiscardRemoteInitCodexThread, projectInitJobsGetActiveForProject, instancesList, helloViewerGet, billingSummaryGet, convexBrowserModulePromise, loadConvexBrowserModule, buildConvexClientOptions, withConvexClient, resolveInstanceIdForAlias, resolveSpriteInstanceId, fetchClaudeTokenStatus, fetchResolvedE2bCredentials, fetchViewerIdentity, BILLING_ACTIVATION_STATES, readBillingActivationBoolean, parseBillingActivationDecision, parseBillingActivationSummary, fetchTeamBillingActivationForViewer, fetchActiveDesktopInitJobForProject, storeViewerCodingAgentPreference, storeClaudeCodeOauthToken, clearClaudeCodeOauthToken, reportClaudeRuntimeAuthFailureForViewer, reportClaudeRuntimeValidatedForViewer, fetchCodexAuthCacheStatus, storeCodexAuthCache, clearCodexAuthCache, normalizeE2bDevboxRecord, fetchE2bDevboxLifecycle, listE2bDevboxStatuses, destroyE2bDevbox, provisionE2bDevbox, restoreLatestSnapshotForE2bDevbox, pauseE2bDevbox, ensureE2bDevboxActive, keepAliveE2bDevbox, resetE2bDevbox, setE2bDaemonBootstrapState, markE2bDaemonBootstrapReady, markE2bDaemonBootstrapFailed, throwManagedDaemonNotReady, normalizeOptionalString2, normalizeAliasForLookup, normalizeManagedCheckpointResponse, buildRecoveredManagedCheckpointResponse, readManagedCheckpointRecoveryState, recoverManagedCheckpointAfterDisconnect, buildManagedDaemonConnectInfoResponseSummary, buildManagedDaemonConnectInfoUnexpectedMessage, buildManagedDaemonConnectInfoSleepingMessage, logManagedDaemonConnectInfoResponse, fetchManagedDaemonConnectInfo, fetchE2bBootstrapConnectInfo, createManagedCheckpoint, listManagedRemoteStates, listViewerInstances, fetchSpriteDaemonRelease, issueSpriteDaemonToken, listClientThreadsForPrimaryInstance, listThreadTitleGenerationStatesForPrimaryInstance, listSpriteDaemonSessions, upsertRemoteInitCodexThread, discardRemoteInitCodexThread, signOutControlPlane, refreshControlPlaneSession, createCliInitResponsesRelayTokenForViewer;
|
|
133908
133908
|
var init_controlPlane = __esm({
|
|
133909
133909
|
"src/devbox/controlPlane.ts"() {
|
|
133910
133910
|
"use strict";
|
|
@@ -134413,7 +134413,6 @@ var init_controlPlane = __esm({
|
|
|
134413
134413
|
};
|
|
134414
134414
|
claudeTokenGet = makeFunctionReference("claudeTokens:getForViewer");
|
|
134415
134415
|
claudeTokenSet = makeFunctionReference("claudeTokens:setForViewer");
|
|
134416
|
-
claudeLoginCredentialSet = makeFunctionReference("claudeTokens:setLoginCredentialForViewer");
|
|
134417
134416
|
claudeTokenClear = makeFunctionReference("claudeTokens:clearForViewer");
|
|
134418
134417
|
codexAuthCacheGet = makeFunctionReference("codexAuthCaches:getForViewer");
|
|
134419
134418
|
codexAuthCacheSet = makeFunctionReference("codexAuthCaches:setForViewer");
|
|
@@ -134639,18 +134638,6 @@ var init_controlPlane = __esm({
|
|
|
134639
134638
|
};
|
|
134640
134639
|
});
|
|
134641
134640
|
};
|
|
134642
|
-
storeClaudeLoginCredential = async (token, credential) => {
|
|
134643
|
-
return await withConvexClient(token, async (client) => {
|
|
134644
|
-
const response = await client.mutation(
|
|
134645
|
-
claudeLoginCredentialSet,
|
|
134646
|
-
credential
|
|
134647
|
-
);
|
|
134648
|
-
return {
|
|
134649
|
-
expiresAt: typeof response?.expiresAt === "number" ? response.expiresAt : 0,
|
|
134650
|
-
updatedAt: typeof response?.updatedAt === "number" ? response.updatedAt : 0
|
|
134651
|
-
};
|
|
134652
|
-
});
|
|
134653
|
-
};
|
|
134654
134641
|
clearClaudeCodeOauthToken = async (token) => {
|
|
134655
134642
|
await withConvexClient(token, async (client) => {
|
|
134656
134643
|
await client.mutation(claudeTokenClear, {});
|
|
@@ -198475,7 +198462,7 @@ var init_claudeSetupDiscovery = __esm({
|
|
|
198475
198462
|
});
|
|
198476
198463
|
|
|
198477
198464
|
// src/devbox/commands/claudeSetupOauth.ts
|
|
198478
|
-
var import_node_crypto25, import_node_http4, import_node_https, import_node_zlib2, CLAUDE_SETUP_CALLBACK_HOST, CLAUDE_SETUP_CALLBACK_PATH,
|
|
198465
|
+
var import_node_crypto25, import_node_http4, import_node_https, import_node_zlib2, CLAUDE_SETUP_CALLBACK_HOST, CLAUDE_SETUP_CALLBACK_PATH, CLAUDE_SETUP_TOKEN_SCOPE, CLAUDE_SETUP_TOKEN_EXPIRES_IN_SECONDS, CLAUDE_SETUP_AUTOMATIC_CALLBACK_TIMEOUT_MS, CLAUDE_SETUP_CAPTURED_HTTP_USER_AGENT, CLAUDE_SETUP_REQUEST_TIMEOUT_MS, CLAUDE_SETUP_ERROR_BODY_PREVIEW_CHARS, isRecord6, asString4, getHeaderValue, collapseWhitespace, summarizeTextPreview, requireNonEmptyString2, requireNullableString, requirePositiveInteger, base64UrlEncode, generateClaudeSetupCodeVerifier, generateClaudeSetupCodeChallenge, generateClaudeSetupState, buildClaudeSetupAuthorizeUrls, parseClaudeManualOauthCode, createDeferred, renderCallbackPage2, startClaudeSetupCallbackServer, decodeResponseBody, buildExplicitJsonRequestHeaders, sendClaudeSetupJsonRequest, exchangeClaudeSetupOauthCode, fetchClaudeSetupOauthProfile, prepareClaudeSetupAuthorizeUrls, collectClaudeSetupManualInput, launchClaudeSetupBrowserFlow, launchClaudeSetupManualCodeFlow;
|
|
198479
198466
|
var init_claudeSetupOauth = __esm({
|
|
198480
198467
|
"src/devbox/commands/claudeSetupOauth.ts"() {
|
|
198481
198468
|
"use strict";
|
|
@@ -198488,14 +198475,8 @@ var init_claudeSetupOauth = __esm({
|
|
|
198488
198475
|
init_copyableUrl();
|
|
198489
198476
|
CLAUDE_SETUP_CALLBACK_HOST = "localhost";
|
|
198490
198477
|
CLAUDE_SETUP_CALLBACK_PATH = "/callback";
|
|
198491
|
-
|
|
198492
|
-
|
|
198493
|
-
"user:profile",
|
|
198494
|
-
"user:inference",
|
|
198495
|
-
"user:sessions:claude_code",
|
|
198496
|
-
"user:mcp_servers",
|
|
198497
|
-
"user:file_upload"
|
|
198498
|
-
].join(" ");
|
|
198478
|
+
CLAUDE_SETUP_TOKEN_SCOPE = "user:inference";
|
|
198479
|
+
CLAUDE_SETUP_TOKEN_EXPIRES_IN_SECONDS = 365 * 24 * 60 * 60;
|
|
198499
198480
|
CLAUDE_SETUP_AUTOMATIC_CALLBACK_TIMEOUT_MS = 9e4;
|
|
198500
198481
|
CLAUDE_SETUP_CAPTURED_HTTP_USER_AGENT = "axios/1.13.6";
|
|
198501
198482
|
CLAUDE_SETUP_REQUEST_TIMEOUT_MS = 15e3;
|
|
@@ -198554,7 +198535,7 @@ var init_claudeSetupOauth = __esm({
|
|
|
198554
198535
|
automaticUrl.searchParams.set("client_id", discovery.clientId);
|
|
198555
198536
|
automaticUrl.searchParams.set("response_type", "code");
|
|
198556
198537
|
automaticUrl.searchParams.set("redirect_uri", automaticRedirectUrl);
|
|
198557
|
-
automaticUrl.searchParams.set("scope",
|
|
198538
|
+
automaticUrl.searchParams.set("scope", CLAUDE_SETUP_TOKEN_SCOPE);
|
|
198558
198539
|
automaticUrl.searchParams.set("code_challenge", codeChallenge);
|
|
198559
198540
|
automaticUrl.searchParams.set("code_challenge_method", "S256");
|
|
198560
198541
|
automaticUrl.searchParams.set("state", state);
|
|
@@ -198563,7 +198544,7 @@ var init_claudeSetupOauth = __esm({
|
|
|
198563
198544
|
manualUrl.searchParams.set("client_id", discovery.clientId);
|
|
198564
198545
|
manualUrl.searchParams.set("response_type", "code");
|
|
198565
198546
|
manualUrl.searchParams.set("redirect_uri", discovery.manualRedirectUrl);
|
|
198566
|
-
manualUrl.searchParams.set("scope",
|
|
198547
|
+
manualUrl.searchParams.set("scope", CLAUDE_SETUP_TOKEN_SCOPE);
|
|
198567
198548
|
manualUrl.searchParams.set("code_challenge", codeChallenge);
|
|
198568
198549
|
manualUrl.searchParams.set("code_challenge_method", "S256");
|
|
198569
198550
|
manualUrl.searchParams.set("state", state);
|
|
@@ -198845,7 +198826,8 @@ var init_claudeSetupOauth = __esm({
|
|
|
198845
198826
|
redirect_uri: redirectUrl,
|
|
198846
198827
|
client_id: discovery.clientId,
|
|
198847
198828
|
code_verifier: codeVerifier,
|
|
198848
|
-
state
|
|
198829
|
+
state,
|
|
198830
|
+
expires_in: CLAUDE_SETUP_TOKEN_EXPIRES_IN_SECONDS
|
|
198849
198831
|
});
|
|
198850
198832
|
const response = await sendClaudeSetupJsonRequest({
|
|
198851
198833
|
url: tokenUrl,
|
|
@@ -198878,10 +198860,6 @@ var init_claudeSetupOauth = __esm({
|
|
|
198878
198860
|
parsed.access_token,
|
|
198879
198861
|
"access_token"
|
|
198880
198862
|
);
|
|
198881
|
-
const refreshToken = requireNonEmptyString2(
|
|
198882
|
-
parsed.refresh_token,
|
|
198883
|
-
"refresh_token"
|
|
198884
|
-
);
|
|
198885
198863
|
const expiresInSeconds = requirePositiveInteger(
|
|
198886
198864
|
parsed.expires_in,
|
|
198887
198865
|
"expires_in"
|
|
@@ -198891,12 +198869,9 @@ var init_claudeSetupOauth = __esm({
|
|
|
198891
198869
|
const organization = isRecord6(parsed.organization) ? parsed.organization : null;
|
|
198892
198870
|
return {
|
|
198893
198871
|
accessToken,
|
|
198894
|
-
refreshToken,
|
|
198895
|
-
accountUuid: account ? requireNullableString(account.uuid) : null,
|
|
198896
198872
|
emailAddress: account ? requireNullableString(account.email_address) : null,
|
|
198897
198873
|
expiresInSeconds,
|
|
198898
198874
|
organizationUuid: organization ? requireNullableString(organization.uuid) : null,
|
|
198899
|
-
organizationName: organization ? requireNullableString(organization.name) : null,
|
|
198900
198875
|
scope
|
|
198901
198876
|
};
|
|
198902
198877
|
};
|
|
@@ -198918,24 +198893,44 @@ var init_claudeSetupOauth = __esm({
|
|
|
198918
198893
|
["User-Agent", CLAUDE_SETUP_CAPTURED_HTTP_USER_AGENT]
|
|
198919
198894
|
]
|
|
198920
198895
|
});
|
|
198921
|
-
if (response.statusCode !== 200) {
|
|
198922
|
-
logger2.warn("claude_setup_oauth_profile_unavailable", {
|
|
198923
|
-
host: profileUrl.host,
|
|
198924
|
-
path: profileUrl.pathname,
|
|
198925
|
-
status: response.statusCode
|
|
198926
|
-
});
|
|
198927
|
-
throw new Error(
|
|
198928
|
-
`Claude profile request failed (HTTP ${String(response.statusCode)}): ${summarizeTextPreview(response.body) || "<empty body>"}`
|
|
198929
|
-
);
|
|
198930
|
-
}
|
|
198931
198896
|
let parsed = null;
|
|
198932
198897
|
try {
|
|
198933
198898
|
parsed = JSON.parse(response.body);
|
|
198934
198899
|
} catch (error2) {
|
|
198900
|
+
if (response.statusCode !== 200) {
|
|
198901
|
+
logger2.warn("claude_setup_oauth_profile_unavailable", {
|
|
198902
|
+
host: profileUrl.host,
|
|
198903
|
+
path: profileUrl.pathname,
|
|
198904
|
+
status: response.statusCode
|
|
198905
|
+
});
|
|
198906
|
+
return {
|
|
198907
|
+
accountUuid: null,
|
|
198908
|
+
displayName: null,
|
|
198909
|
+
email: null,
|
|
198910
|
+
organizationType: null,
|
|
198911
|
+
organizationUuid: null,
|
|
198912
|
+
rateLimitTier: null
|
|
198913
|
+
};
|
|
198914
|
+
}
|
|
198935
198915
|
throw new Error(
|
|
198936
198916
|
`Claude profile response returned invalid JSON (${error2 instanceof Error ? error2.message : String(error2)}).`
|
|
198937
198917
|
);
|
|
198938
198918
|
}
|
|
198919
|
+
if (response.statusCode !== 200) {
|
|
198920
|
+
logger2.warn("claude_setup_oauth_profile_unavailable", {
|
|
198921
|
+
host: profileUrl.host,
|
|
198922
|
+
path: profileUrl.pathname,
|
|
198923
|
+
status: response.statusCode
|
|
198924
|
+
});
|
|
198925
|
+
return {
|
|
198926
|
+
accountUuid: null,
|
|
198927
|
+
displayName: null,
|
|
198928
|
+
email: null,
|
|
198929
|
+
organizationType: null,
|
|
198930
|
+
organizationUuid: null,
|
|
198931
|
+
rateLimitTier: null
|
|
198932
|
+
};
|
|
198933
|
+
}
|
|
198939
198934
|
if (!isRecord6(parsed)) {
|
|
198940
198935
|
throw new Error("Claude profile response must be an object.");
|
|
198941
198936
|
}
|
|
@@ -198946,43 +198941,10 @@ var init_claudeSetupOauth = __esm({
|
|
|
198946
198941
|
displayName: account ? requireNullableString(account.display_name) : null,
|
|
198947
198942
|
email: account ? requireNullableString(account.email) : null,
|
|
198948
198943
|
organizationType: organization ? requireNullableString(organization.organization_type) : null,
|
|
198949
|
-
organizationName: organization ? requireNullableString(organization.name) : null,
|
|
198950
198944
|
organizationUuid: organization ? requireNullableString(organization.uuid) : null,
|
|
198951
198945
|
rateLimitTier: organization ? requireNullableString(organization.rate_limit_tier) : null
|
|
198952
198946
|
};
|
|
198953
198947
|
};
|
|
198954
|
-
claudeSubscriptionTypeFromOrganizationType = (organizationType) => {
|
|
198955
|
-
switch (organizationType) {
|
|
198956
|
-
case "claude_max":
|
|
198957
|
-
return "max";
|
|
198958
|
-
case "claude_pro":
|
|
198959
|
-
return "pro";
|
|
198960
|
-
case "claude_enterprise":
|
|
198961
|
-
return "enterprise";
|
|
198962
|
-
case "claude_team":
|
|
198963
|
-
return "team";
|
|
198964
|
-
default:
|
|
198965
|
-
return null;
|
|
198966
|
-
}
|
|
198967
|
-
};
|
|
198968
|
-
buildClaudeSetupLoginCredential = ({
|
|
198969
|
-
tokenExchange,
|
|
198970
|
-
profile
|
|
198971
|
-
}) => ({
|
|
198972
|
-
accessToken: tokenExchange.accessToken,
|
|
198973
|
-
refreshToken: tokenExchange.refreshToken,
|
|
198974
|
-
expiresAt: Date.now() + tokenExchange.expiresInSeconds * 1e3,
|
|
198975
|
-
scopes: tokenExchange.scope ?? CLAUDE_SETUP_LOGIN_SCOPE,
|
|
198976
|
-
subscriptionType: claudeSubscriptionTypeFromOrganizationType(
|
|
198977
|
-
profile.organizationType
|
|
198978
|
-
),
|
|
198979
|
-
rateLimitTier: profile.rateLimitTier,
|
|
198980
|
-
accountUuid: profile.accountUuid ?? tokenExchange.accountUuid,
|
|
198981
|
-
accountEmailAddress: profile.email ?? tokenExchange.emailAddress,
|
|
198982
|
-
accountDisplayName: profile.displayName,
|
|
198983
|
-
organizationUuid: profile.organizationUuid ?? tokenExchange.organizationUuid,
|
|
198984
|
-
organizationName: profile.organizationName ?? tokenExchange.organizationName
|
|
198985
|
-
});
|
|
198986
198948
|
prepareClaudeSetupAuthorizeUrls = ({
|
|
198987
198949
|
discovery,
|
|
198988
198950
|
automaticRedirectUrl
|
|
@@ -199148,12 +199110,11 @@ var init_claudeSetupOauth = __esm({
|
|
|
199148
199110
|
logger2.info("claude_setup_oauth_profile", {
|
|
199149
199111
|
accountUuid: profile.accountUuid,
|
|
199150
199112
|
organizationUuid: profile.organizationUuid,
|
|
199151
|
-
organizationType: profile.organizationType,
|
|
199152
199113
|
rateLimitTier: profile.rateLimitTier
|
|
199153
199114
|
});
|
|
199154
199115
|
return {
|
|
199155
|
-
|
|
199156
|
-
|
|
199116
|
+
accessToken: tokenExchange.accessToken,
|
|
199117
|
+
source: "oauth"
|
|
199157
199118
|
};
|
|
199158
199119
|
} finally {
|
|
199159
199120
|
await callbackServer.close().catch(() => void 0);
|
|
@@ -199204,12 +199165,11 @@ var init_claudeSetupOauth = __esm({
|
|
|
199204
199165
|
logger2.info("claude_setup_oauth_profile", {
|
|
199205
199166
|
accountUuid: profile.accountUuid,
|
|
199206
199167
|
organizationUuid: profile.organizationUuid,
|
|
199207
|
-
organizationType: profile.organizationType,
|
|
199208
199168
|
rateLimitTier: profile.rateLimitTier
|
|
199209
199169
|
});
|
|
199210
199170
|
return {
|
|
199211
|
-
|
|
199212
|
-
|
|
199171
|
+
accessToken: tokenExchange.accessToken,
|
|
199172
|
+
source: "oauth"
|
|
199213
199173
|
};
|
|
199214
199174
|
};
|
|
199215
199175
|
}
|
|
@@ -199459,7 +199419,7 @@ var init_setupClaude = __esm({
|
|
|
199459
199419
|
if (result2.source === "oauth") {
|
|
199460
199420
|
logSuccess("Claude Code signed in.");
|
|
199461
199421
|
}
|
|
199462
|
-
return result2;
|
|
199422
|
+
return result2.accessToken;
|
|
199463
199423
|
}
|
|
199464
199424
|
const result = await launchClaudeSetupManualCodeFlowFn({
|
|
199465
199425
|
claudeCliVersion: preflight.claudeCliVersion,
|
|
@@ -199470,7 +199430,7 @@ var init_setupClaude = __esm({
|
|
|
199470
199430
|
if (result.source === "oauth") {
|
|
199471
199431
|
logSuccess("Claude Code signed in.");
|
|
199472
199432
|
}
|
|
199473
|
-
return result;
|
|
199433
|
+
return result.accessToken;
|
|
199474
199434
|
};
|
|
199475
199435
|
ensureManagedClaudeAuth = async ({
|
|
199476
199436
|
controlPlaneToken,
|
|
@@ -199481,7 +199441,6 @@ var init_setupClaude = __esm({
|
|
|
199481
199441
|
canPromptInteractively,
|
|
199482
199442
|
fetchClaudeTokenStatusFn,
|
|
199483
199443
|
storeClaudeCodeOauthTokenFn,
|
|
199484
|
-
storeClaudeLoginCredentialFn,
|
|
199485
199444
|
collectClaudeCodeOauthTokenInteractivelyFn = collectClaudeCodeOauthTokenInteractively,
|
|
199486
199445
|
onStatusStage,
|
|
199487
199446
|
onInteractivePromptStart,
|
|
@@ -199543,30 +199502,6 @@ var init_setupClaude = __esm({
|
|
|
199543
199502
|
didUpdateClaudeAuth = true;
|
|
199544
199503
|
await refreshClaudeStatus();
|
|
199545
199504
|
};
|
|
199546
|
-
const storeClaudeLoginCredential2 = async (credential) => {
|
|
199547
|
-
onStatusStage?.("Updating Claude auth");
|
|
199548
|
-
const stored = await storeClaudeLoginCredentialFn(controlPlaneToken, {
|
|
199549
|
-
token: credential.accessToken,
|
|
199550
|
-
refreshToken: credential.refreshToken,
|
|
199551
|
-
expiresAt: credential.expiresAt,
|
|
199552
|
-
scopes: credential.scopes,
|
|
199553
|
-
subscriptionType: credential.subscriptionType,
|
|
199554
|
-
rateLimitTier: credential.rateLimitTier,
|
|
199555
|
-
accountUuid: credential.accountUuid,
|
|
199556
|
-
accountEmailAddress: credential.accountEmailAddress,
|
|
199557
|
-
accountDisplayName: credential.accountDisplayName,
|
|
199558
|
-
organizationUuid: credential.organizationUuid,
|
|
199559
|
-
organizationName: credential.organizationName
|
|
199560
|
-
});
|
|
199561
|
-
await onStoredToken?.({
|
|
199562
|
-
authMode: "oauth",
|
|
199563
|
-
claudeCodeOauthToken: credential.accessToken,
|
|
199564
|
-
expiresAt: stored.expiresAt,
|
|
199565
|
-
updatedAt: stored.updatedAt
|
|
199566
|
-
});
|
|
199567
|
-
didUpdateClaudeAuth = true;
|
|
199568
|
-
await refreshClaudeStatus();
|
|
199569
|
-
};
|
|
199570
199505
|
await refreshClaudeStatus();
|
|
199571
199506
|
if (didProvideClaudeCodeOauthToken) {
|
|
199572
199507
|
await storeClaudeToken(trim4(providedClaudeCodeOauthToken ?? ""));
|
|
@@ -199576,14 +199511,12 @@ var init_setupClaude = __esm({
|
|
|
199576
199511
|
if (shouldOfferInteractiveClaudeSetup && (forceReplace || needsClaudeSetupAttention(claudeAuthState))) {
|
|
199577
199512
|
const interactiveState = forceReplace ? "healthy" : claudeAuthState;
|
|
199578
199513
|
onInteractivePromptStart?.();
|
|
199579
|
-
const
|
|
199514
|
+
const collectedToken = await collectClaudeCodeOauthTokenInteractivelyFn({
|
|
199580
199515
|
state: interactiveState,
|
|
199581
199516
|
requireSetupConfirmation
|
|
199582
199517
|
});
|
|
199583
|
-
if (
|
|
199584
|
-
await
|
|
199585
|
-
} else if (collected?.source === "existing_token") {
|
|
199586
|
-
await storeClaudeToken(collected.accessToken);
|
|
199518
|
+
if (collectedToken) {
|
|
199519
|
+
await storeClaudeToken(collectedToken);
|
|
199587
199520
|
} else {
|
|
199588
199521
|
claudeAuthState = "skipped";
|
|
199589
199522
|
}
|
|
@@ -200275,7 +200208,6 @@ var init_setupAgents = __esm({
|
|
|
200275
200208
|
ensureManagedClaudeAuthFn = ensureManagedClaudeAuth,
|
|
200276
200209
|
fetchClaudeTokenStatusFn = fetchClaudeTokenStatus,
|
|
200277
200210
|
storeClaudeCodeOauthTokenFn = storeClaudeCodeOauthToken,
|
|
200278
|
-
storeClaudeLoginCredentialFn = storeClaudeLoginCredential,
|
|
200279
200211
|
clearClaudeCodeOauthTokenFn = clearClaudeCodeOauthToken,
|
|
200280
200212
|
ensureControlPlaneTokenFn = ensureControlPlaneToken,
|
|
200281
200213
|
validateManagedCodexAuthFn = validateManagedCodexAuth,
|
|
@@ -200366,7 +200298,6 @@ var init_setupAgents = __esm({
|
|
|
200366
200298
|
canPromptInteractively,
|
|
200367
200299
|
fetchClaudeTokenStatusFn,
|
|
200368
200300
|
storeClaudeCodeOauthTokenFn,
|
|
200369
|
-
storeClaudeLoginCredentialFn,
|
|
200370
200301
|
...onStatusStage ? { onStatusStage } : {},
|
|
200371
200302
|
...onInteractivePromptStart ? { onInteractivePromptStart } : {}
|
|
200372
200303
|
});
|
|
@@ -205081,7 +205012,6 @@ var init_agentsSection = __esm({
|
|
|
205081
205012
|
syncRemoteCodexAuthToManagedLocalCacheFn = syncRemoteCodexAuthToManagedLocalCache,
|
|
205082
205013
|
fetchClaudeTokenStatusFn = fetchClaudeTokenStatus,
|
|
205083
205014
|
storeClaudeCodeOauthTokenFn = storeClaudeCodeOauthToken,
|
|
205084
|
-
storeClaudeLoginCredentialFn = storeClaudeLoginCredential,
|
|
205085
205015
|
probeRemoteClaudeAuthFn = probeRemoteClaudeAuth,
|
|
205086
205016
|
bootstrapRemoteClaudeConfigFn = bootstrapRemoteClaudeConfig,
|
|
205087
205017
|
reportClaudeRuntimeValidatedForViewerFn = reportClaudeRuntimeValidatedForViewer,
|
|
@@ -205123,7 +205053,6 @@ var init_agentsSection = __esm({
|
|
|
205123
205053
|
canPromptInteractively,
|
|
205124
205054
|
fetchClaudeTokenStatusFn,
|
|
205125
205055
|
storeClaudeCodeOauthTokenFn,
|
|
205126
|
-
storeClaudeLoginCredentialFn,
|
|
205127
205056
|
onStoredToken: (value) => {
|
|
205128
205057
|
nextPendingManagedClaudeTokenUpdate = value;
|
|
205129
205058
|
},
|
|
@@ -206024,7 +205953,6 @@ var init_init = __esm({
|
|
|
206024
205953
|
canPromptInteractively,
|
|
206025
205954
|
fetchClaudeTokenStatusFn: fetchClaudeTokenStatus,
|
|
206026
205955
|
storeClaudeCodeOauthTokenFn: storeClaudeCodeOauthToken,
|
|
206027
|
-
storeClaudeLoginCredentialFn: storeClaudeLoginCredential,
|
|
206028
205956
|
onStoredToken: (value) => {
|
|
206029
205957
|
pendingManagedClaudeTokenUpdate = value;
|
|
206030
205958
|
},
|
|
@@ -211050,4 +210978,4 @@ smol-toml/dist/index.js:
|
|
|
211050
210978
|
*/
|
|
211051
210979
|
//# sourceMappingURL=dvb.cjs.map
|
|
211052
210980
|
|
|
211053
|
-
//# debugId=
|
|
210981
|
+
//# debugId=258881c6-605d-5da3-b54e-37b34fc185b7
|