mirror of
https://github.com/affaan-m/ECC.git
synced 2026-10-30 20:35:18 +00:00
11 lines
437 B
TypeScript
11 lines
437 B
TypeScript
import { z } from "zod"
|
|
import type { tool as OpenCodeTool } from "@opencode-ai/plugin/tool"
|
|
|
|
export type { ToolDefinition } from "@opencode-ai/plugin/tool"
|
|
|
|
// OpenCode's tool helper returns the definition unchanged and exposes Zod as schema.
|
|
// Keep the runtime import local so packed installs use the audited Zod version.
|
|
export const tool = Object.assign(<T>(definition: T): T => definition, {
|
|
schema: z,
|
|
}) as typeof OpenCodeTool
|