feat(plugin): add v2 effect host (#33111)
This commit is contained in:
parent
7a9337da8a
commit
c780d7cee7
139 changed files with 3740 additions and 1943 deletions
18
packages/plugin/src/v2/effect/skill.ts
Normal file
18
packages/plugin/src/v2/effect/skill.ts
Normal 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[]>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue