refactor(core): unify v2 tool architecture (#31168)
This commit is contained in:
parent
effd27b239
commit
660a00d317
46 changed files with 2297 additions and 2041 deletions
13
packages/core/src/tool/tools.ts
Normal file
13
packages/core/src/tool/tools.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
export * as Tools from "./tools"
|
||||
|
||||
import { Context, Effect, Scope } from "effect"
|
||||
import { Tool } from "./tool"
|
||||
|
||||
export interface Interface {
|
||||
readonly register: (
|
||||
tools: Readonly<Record<string, Tool.AnyTool>>,
|
||||
) => Effect.Effect<void, Tool.RegistrationError, Scope.Scope>
|
||||
}
|
||||
|
||||
/** Narrow registration-only Location capability. */
|
||||
export class Service extends Context.Service<Service, Interface>()("@opencode/v2/Tools") {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue