refactor(core): consolidate tool architecture
This commit is contained in:
parent
0fd73a2976
commit
8db7487c89
466 changed files with 9405 additions and 11071 deletions
15
packages/plugin/src/effect/reference.ts
Normal file
15
packages/plugin/src/effect/reference.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import type { ReferenceGitSource, ReferenceLocalSource } from "@opencode-ai/client"
|
||||
import type { ReferenceApi } from "@opencode-ai/client/effect/api"
|
||||
import type { Effect } from "effect"
|
||||
import type { Transform } from "./registration.js"
|
||||
|
||||
export interface ReferenceDraft {
|
||||
add(name: string, source: ReferenceLocalSource | ReferenceGitSource): void
|
||||
remove(name: string): void
|
||||
list(): readonly (readonly [string, ReferenceLocalSource | ReferenceGitSource])[]
|
||||
}
|
||||
|
||||
export interface ReferenceDomain extends ReferenceApi<unknown> {
|
||||
readonly transform: Transform<ReferenceDraft>
|
||||
readonly reload: () => Effect.Effect<void>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue