refactor(agents): privatize auth planning types (#106756)

* refactor(agents): privatize auth planning types

* chore(deadcode): refresh export baseline
This commit is contained in:
Peter Steinberger
2026-07-13 12:31:28 -07:00
committed by GitHub
parent d2f4fdf8e6
commit bad37249f5
5 changed files with 9 additions and 18 deletions

View File

@@ -826,8 +826,6 @@ export const KNIP_UNUSED_EXPORT_BASELINE = [
"src/agents/auth-profiles/runtime-snapshots.ts: getRuntimeAuthProfileStoreCredentialMutationRevision",
"src/agents/auth-profiles/runtime-snapshots.ts: getRuntimeAuthProfileStoreStateMutationRevision",
"src/agents/auth-profiles/runtime-snapshots.ts: testing",
"src/agents/auth-profiles/store.ts: AuthProfileStorePersistenceSnapshot",
"src/agents/auth-profiles/store.ts: CommittedAuthProfileStoreSave",
"src/agents/auth-profiles/store.ts: testing",
"src/agents/auth-profiles/usage.ts: testing",
"src/agents/bash-process-registry.ts: resetProcessRegistryForTests",
@@ -979,8 +977,6 @@ export const KNIP_UNUSED_EXPORT_BASELINE = [
"src/agents/mcp-ui-resource.ts: testing",
"src/agents/media-generation-task-status-shared.ts: findRecentStartedMediaGenerationTaskForSession",
"src/agents/media-generation-task-status-shared.ts: resetRecentMediaGenerationDuplicateGuardsForTests",
"src/agents/model-auth-env.ts: ProviderDirectAuthPlanningEvidence",
"src/agents/model-auth-env.ts: ProviderEnvAuthEvidence",
"src/agents/model-catalog-route.ts: ModelCatalogLogicalIdentity",
"src/agents/model-catalog-route.ts: ModelCatalogLogicalOverrides",
"src/agents/model-catalog-route.ts: ModelCatalogRouteMatcher",
@@ -1013,11 +1009,6 @@ export const KNIP_UNUSED_EXPORT_BASELINE = [
"src/agents/provider-attribution.ts: listProviderAttributionPolicies",
"src/agents/provider-attribution.ts: resolveProviderAttributionIdentity",
"src/agents/provider-attribution.ts: resolveProviderAttributionPolicy",
"src/agents/provider-model-auth-source-plan.ts: ProviderModelAuthAutomaticProfiles",
"src/agents/provider-model-auth-source-plan.ts: ProviderModelAuthReadiness",
"src/agents/provider-model-auth-source-plan.ts: ProviderModelAuthRequiredReason",
"src/agents/provider-model-route-auth.ts: ProviderModelAuthLogicalAttempt",
"src/agents/provider-model-route-auth.ts: ProviderModelRouteAuthAttempt",
"src/agents/provider-request-config.ts: mergeProviderRequestOverrides",
"src/agents/provider-request-config.ts: sanitizeRuntimeProviderRequestOverrides",
"src/agents/provider-transport-stream.ts: isTransportAwareApiSupported",

View File

@@ -1320,7 +1320,7 @@ export function saveAuthProfileStore(
publishRuntimeSnapshotsAfterCommit(publishRuntimeSnapshots);
}
export type AuthProfileStorePersistenceSnapshot = {
type AuthProfileStorePersistenceSnapshot = {
credentialsRaw: unknown;
stateRaw: unknown;
runtimeCaptured: boolean;
@@ -1340,7 +1340,7 @@ export type AuthProfileStorePersistenceSnapshot = {
}>;
};
export type CommittedAuthProfileStoreSave = {
type CommittedAuthProfileStoreSave = {
owned: AuthProfileStorePersistenceSnapshot;
publishRuntimeSnapshots: () => boolean;
};

View File

@@ -20,13 +20,13 @@ export type EnvApiKeyResult = {
source: string;
};
export type ProviderEnvAuthEvidence = {
type ProviderEnvAuthEvidence = {
mode: "api-key" | "aws-sdk" | "oauth";
source: string;
};
/** Secret-free direct-auth fact retained for runtime credential resolution. */
export type ProviderDirectAuthPlanningEvidence =
type ProviderDirectAuthPlanningEvidence =
| ({ kind: "environment" } & ProviderEnvAuthEvidence)
| {
kind: "setup-provider";

View File

@@ -1,4 +1,4 @@
export type ProviderModelAuthReadiness = "ready" | "unknown" | "unavailable";
type ProviderModelAuthReadiness = "ready" | "unknown" | "unavailable";
export type ProviderModelAuthEvidence =
| "aws-sdk"
@@ -29,9 +29,9 @@ export type ProviderModelAuthSource =
| ProviderModelAuthProfileSource
| ProviderModelAuthDirectSource;
export type ProviderModelAuthRequiredReason = "configured-auth" | "provider-binding" | "user-lock";
type ProviderModelAuthRequiredReason = "configured-auth" | "provider-binding" | "user-lock";
export type ProviderModelAuthAutomaticProfiles =
type ProviderModelAuthAutomaticProfiles =
| { kind: "empty"; explicitOrder: boolean }
| {
kind: "usable";

View File

@@ -18,7 +18,7 @@ export type ProviderModelAuthSourceSelection =
| { kind: "unavailable"; source: ProviderModelAuthProfileSource }
| { kind: "none" };
export type ProviderModelAuthLogicalAttempt =
type ProviderModelAuthLogicalAttempt =
| { kind: "profile"; source: ProviderModelAuthProfileSource }
| {
kind: "direct";
@@ -26,7 +26,7 @@ export type ProviderModelAuthLogicalAttempt =
allowAuthProfileFallback: false;
};
export type ProviderModelRouteAuthAttempt =
type ProviderModelRouteAuthAttempt =
| {
kind: "profile";
source: ProviderModelAuthProfileSource;