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

+9 -1
View File
@@ -5,6 +5,8 @@ import fs from 'fs'
interface AskpassRequest {
askpassType: 'https' | 'ssh'
argv: string[]
cwd?: string
repoId?: number
}
function fatal(err: unknown): never {
@@ -86,7 +88,13 @@ function main(argv: string[]): void {
process.exit(1)
})
const requestPayload: AskpassRequest = { askpassType, argv }
const repoId = process.env['OCM_GIT_REPO_ID'] ? Number(process.env['OCM_GIT_REPO_ID']) : undefined
const requestPayload: AskpassRequest = {
askpassType,
argv,
cwd: process.env['OCM_GIT_REPO_CWD'],
repoId: Number.isFinite(repoId) ? repoId : undefined,
}
console.error('[askpass-main] Sending request:', JSON.stringify(requestPayload))
req.write(JSON.stringify(requestPayload))
req.end()