fix: keep provider normalization on local sync paths

This commit is contained in:
Peter Steinberger
2026-03-28 10:19:31 +00:00
parent cec1703734
commit ff01d749fc
7 changed files with 74 additions and 78 deletions

View File

@@ -1,5 +1,4 @@
import fs from "node:fs";
import type { OAuthCredentials } from "@mariozechner/pi-ai";
import { resolveOAuthPath } from "../../config/paths.js";
import { withFileLock } from "../../infra/file-lock.js";
import { loadJsonFile, saveJsonFile } from "../../infra/json-file.js";
@@ -11,7 +10,12 @@ import {
} from "./constants.js";
import { syncExternalCliCredentials } from "./external-cli-sync.js";
import { ensureAuthStoreFile, resolveAuthStorePath, resolveLegacyAuthStorePath } from "./paths.js";
import type { AuthProfileCredential, AuthProfileStore, ProfileUsageStats } from "./types.js";
import type {
AuthProfileCredential,
AuthProfileStore,
OAuthCredentials,
ProfileUsageStats,
} from "./types.js";
type LegacyAuthStore = Record<string, AuthProfileCredential>;
type CredentialRejectReason = "non_object" | "invalid_type" | "missing_provider";