Commit Graph

4 Commits

  • Add automatic session migration for v0.30.0 bug
    - Create migrations.ts with consolidated migrations
    - Move auth migration from AuthStorage.migrateLegacy() to migrations.ts
    - Add migrateSessionsFromAgentRoot() to fix misplaced sessions
    - Sessions in ~/.pi/agent/*.jsonl are auto-migrated on startup
    
    fixes #320
  • Refactor OAuth/API key handling: AuthStorage and ModelRegistry
    - Add AuthStorage class for credential storage (auth.json)
    - Add ModelRegistry class for model management with API key resolution
    - Add discoverAuthStorage() and discoverModels() discovery functions
    - Add migration from legacy oauth.json and settings.json apiKeys to auth.json
    - Remove configureOAuthStorage, defaultGetApiKey, findModel, discoverAvailableModels
    - Remove apiKeys from Settings type and SettingsManager methods
    - Rename getOAuthPath to getAuthPath
    - Update SDK, examples, docs, tests, and mom package
    
    Fixes #296
  • WIP: Add auth-storage.ts for credential management
    - AuthStorage class for reading/writing auth.json
    - Supports both api_key and oauth credential types
    - getApiKey() priority: auth.json api_key > auth.json oauth > env var