diff --git a/packages/coding-agent/docs/custom-tools.md b/packages/coding-agent/docs/custom-tools.md index 66beb71d..cb33133d 100644 --- a/packages/coding-agent/docs/custom-tools.md +++ b/packages/coding-agent/docs/custom-tools.md @@ -7,7 +7,7 @@ Custom tools extend pi with new capabilities beyond the built-in read/write/edit Create a file `~/.pi/agent/tools/hello.ts`: ```typescript -import { Type } from "@sinclair/typebox"; +import { Type } from "@mariozechner/pi-coding-agent"; import type { CustomToolFactory } from "@mariozechner/pi-coding-agent"; const factory: CustomToolFactory = (pi) => ({ @@ -47,7 +47,7 @@ The tool is automatically discovered and available in your next pi session. ## Tool Definition ```typescript -import { Type } from "@sinclair/typebox"; +import { Type } from "@mariozechner/pi-coding-agent"; import { StringEnum } from "@mariozechner/pi-ai"; import { Text } from "@mariozechner/pi-tui"; import type { CustomToolFactory, ToolSessionEvent } from "@mariozechner/pi-coding-agent"; diff --git a/packages/coding-agent/examples/custom-tools/README.md b/packages/coding-agent/examples/custom-tools/README.md index 522f193e..6c8aa08b 100644 --- a/packages/coding-agent/examples/custom-tools/README.md +++ b/packages/coding-agent/examples/custom-tools/README.md @@ -43,7 +43,7 @@ See [docs/custom-tools.md](../../docs/custom-tools.md) for full documentation. **Factory pattern:** ```typescript -import { Type } from "@sinclair/typebox"; +import { Type } from "@mariozechner/pi-coding-agent"; import { StringEnum } from "@mariozechner/pi-ai"; import { Text } from "@mariozechner/pi-tui"; import type { CustomToolFactory } from "@mariozechner/pi-coding-agent"; diff --git a/packages/coding-agent/examples/custom-tools/hello.ts b/packages/coding-agent/examples/custom-tools/hello.ts index a599e756..405ddd2d 100644 --- a/packages/coding-agent/examples/custom-tools/hello.ts +++ b/packages/coding-agent/examples/custom-tools/hello.ts @@ -1,4 +1,4 @@ -import { Type } from "@sinclair/typebox"; +import { Type } from "@mariozechner/pi-coding-agent"; import type { CustomToolFactory } from "@mariozechner/pi-coding-agent"; const factory: CustomToolFactory = (pi) => ({ diff --git a/packages/coding-agent/examples/custom-tools/question.ts b/packages/coding-agent/examples/custom-tools/question.ts index c21add67..d7787042 100644 --- a/packages/coding-agent/examples/custom-tools/question.ts +++ b/packages/coding-agent/examples/custom-tools/question.ts @@ -2,7 +2,7 @@ * Question Tool - Let the LLM ask the user a question with options */ -import { Type } from "@sinclair/typebox"; +import { Type } from "@mariozechner/pi-coding-agent"; import { Text } from "@mariozechner/pi-tui"; import type { CustomAgentTool, CustomToolFactory } from "@mariozechner/pi-coding-agent"; diff --git a/packages/coding-agent/examples/custom-tools/todo.ts b/packages/coding-agent/examples/custom-tools/todo.ts index aa14003e..e88dcf03 100644 --- a/packages/coding-agent/examples/custom-tools/todo.ts +++ b/packages/coding-agent/examples/custom-tools/todo.ts @@ -8,7 +8,7 @@ * The onSession callback reconstructs state by scanning past tool results. */ -import { Type } from "@sinclair/typebox"; +import { Type } from "@mariozechner/pi-coding-agent"; import { StringEnum } from "@mariozechner/pi-ai"; import { Text } from "@mariozechner/pi-tui"; import type { CustomAgentTool, CustomToolFactory, ToolSessionEvent } from "@mariozechner/pi-coding-agent"; diff --git a/packages/coding-agent/src/index.ts b/packages/coding-agent/src/index.ts index e35dd122..2fef905e 100644 --- a/packages/coding-agent/src/index.ts +++ b/packages/coding-agent/src/index.ts @@ -1,4 +1,7 @@ // Core session management + +// Re-export Type from typebox for custom tools +export { Type } from "@sinclair/typebox"; export { AgentSession, type AgentSessionConfig, @@ -86,7 +89,6 @@ export { type Skill, type SkillFrontmatter, } from "./core/skills.js"; - // Tools export { bashTool, codingTools, editTool, readTool, writeTool } from "./core/tools/index.js";