refactor: extract CredentialProvider service and consolidate git-auth utilities (#283)

* refactor: extract CredentialProvider service and consolidate git-auth utilities

* refactor: add git-credentials route and gh env plugin, pass internal token to OpenCode

* refactor: update credential provider integration and git route

* refactor: integrate credential provider across git auth, routes, and IPC
This commit is contained in:
Chris Scott committed 2026-06-20 23:20:39 -04:00
1 parent ba08f5c24a
commit 7c8a4fe64c
31 files changed
+1136 -132

No files matched your search

@@ -179,7 +179,7 @@ describe('OpenCodeServerManager - server auth', () => {
function createPasswordDb(password: string | null) {
const encrypted = password ? encryptSecret(password) : null
return {
const db = {
prepare: vi.fn((sql: string) => ({
get: (key?: string) => {
if (key === 'opencode_server_password' && sql.includes('SELECT value FROM app_secrets') && encrypted) {
@@ -190,7 +190,10 @@ describe('OpenCodeServerManager - server auth', () => {
run: vi.fn(),
all: vi.fn(() => []),
})),
} as any
query: vi.fn((sql: string) => db.prepare(sql)),
}
return db as any
}
})