feat(core): add connector authentication (#31837)

This commit is contained in:
Dax 2026-06-11 02:31:17 -04:00 committed by GitHub
commit dac0dd5309
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
47 changed files with 5433 additions and 862 deletions

View file

@ -1,6 +1,7 @@
import { describe, expect } from "bun:test"
import { DateTime, Effect, Layer, Option } from "effect"
import { Catalog } from "@opencode-ai/core/catalog"
import { Credential } from "@opencode-ai/core/credential"
import { EventV2 } from "@opencode-ai/core/event"
import { Location } from "@opencode-ai/core/location"
import { ModelV2 } from "@opencode-ai/core/model"
@ -161,7 +162,9 @@ describe("OpencodePlugin", () => {
yield* plugin.add(OpencodePlugin)
const transform = yield* catalog.transform()
yield* transform((catalog) => {
const item = provider("opencode", { enabled: { via: "account", service: "opencode" } })
const item = provider("opencode", {
enabled: { via: "credential", credentialID: Credential.ID.make("credential") },
})
catalog.provider.update(item.id, (draft) => {
draft.enabled = item.enabled
})