chore: specs for unimplemented work (#70)

This commit is contained in:
Nathan Flurry 2026-02-04 13:45:31 -08:00 committed by GitHub
parent ef3e811c94
commit 8a31519786
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 367 additions and 0 deletions

View file

@ -0,0 +1,26 @@
# Spec: Provider Auth Lifecycle
**Proposed API Changes**
- Add provider credential management to the core session manager (integrated with existing credentials store).
- Expose OAuth and direct credential set/remove operations.
**Summary**
OpenCode expects provider auth and OAuth endpoints. We need a real provider registry and credential storage that ties to agent configuration.
**OpenCode Endpoints (Reference)**
- `GET /opencode/provider`
- `GET /opencode/provider/auth`
- `POST /opencode/provider/{providerID}/oauth/authorize`
- `POST /opencode/provider/{providerID}/oauth/callback`
- `PUT /opencode/auth/{providerID}`
- `DELETE /opencode/auth/{providerID}`
**Core Functionality Required**
- Provider registry with models, capabilities, and connection state.
- OAuth initiation/callback handling with credential storage.
- Direct credential setting/removal.
- Mapping to agent manager credentials and environment.
**OpenCode Compat Wiring + Tests**
- Replace stubs for `/provider`, `/provider/auth`, `/provider/{providerID}/oauth/*`, `/auth/{providerID}`.
- Add E2E tests for credential set/remove and provider list reflecting auth state.