feat(plugin): add v2 effect host (#33111)

This commit is contained in:
Dax 2026-06-21 14:05:49 +02:00 committed by GitHub
commit c780d7cee7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
139 changed files with 3740 additions and 1943 deletions

View file

@ -0,0 +1,18 @@
import type { SkillV2Info } from "@opencode-ai/sdk/v2/types"
import type { Effect } from "effect"
import type { Transformable } from "./registration.js"
export type SkillSource =
| { readonly type: "directory"; readonly path: string }
| { readonly type: "url"; readonly url: string }
| { readonly type: "embedded"; readonly skill: SkillV2Info }
export interface SkillDraft {
source(source: SkillSource): void
list(): readonly SkillSource[]
}
export interface Skill extends Transformable<SkillDraft> {
sources(): Effect.Effect<SkillSource[]>
list(): Effect.Effect<SkillV2Info[]>
}