fix(coding-agent,tui): drop typebox compiler shim and fix progress
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- Migrated Mom's TypeBox-based tool examples and runtime dependency from `@sinclair/typebox` 0.34.x to `typebox` 1.x. Install and import from `typebox` instead of `@sinclair/typebox` when authoring Mom tools and integrations ([#3112](https://github.com/badlogic/pi-mono/issues/3112))
|
||||
|
||||
## [0.68.1] - 2026-04-22
|
||||
|
||||
## [0.68.0] - 2026-04-20
|
||||
|
||||
@@ -646,7 +646,7 @@ Mom runs bash commands inside a sandbox (Docker container), but sometimes you ne
|
||||
```typescript
|
||||
// data/tools/gmail/index.ts
|
||||
import type { MomCustomTool, ToolAPI } from "@mariozechner/pi-mom";
|
||||
import { Type } from "@sinclair/typebox";
|
||||
import { Type } from "typebox";
|
||||
import { StringEnum } from "@mariozechner/pi-ai";
|
||||
|
||||
const tool: MomCustomTool = {
|
||||
@@ -691,7 +691,7 @@ export default tool;
|
||||
### MomCustomTool Type
|
||||
|
||||
```typescript
|
||||
import type { TSchema, Static } from "@sinclair/typebox";
|
||||
import type { TSchema, Static } from "typebox";
|
||||
|
||||
export interface MomToolResult<TDetails = any> {
|
||||
content: Array<{ type: "text"; text: string } | { type: "image"; data: string; mimeType: string }>;
|
||||
@@ -798,7 +798,7 @@ async function loadCustomTools(dataDir: string): Promise<LoadedTool[]> {
|
||||
Mom has a single `invoke_tool` tool that dispatches to custom tools:
|
||||
|
||||
```typescript
|
||||
import { Type } from "@sinclair/typebox";
|
||||
import { Type } from "typebox";
|
||||
|
||||
function createInvokeToolTool(loadedTools: LoadedTool[]): AgentTool {
|
||||
const toolMap = new Map(loadedTools.map(t => [t.tool.name, t.tool]));
|
||||
@@ -889,7 +889,7 @@ function schemaToSimpleJson(schema: TSchema): object {
|
||||
```typescript
|
||||
// data/tools/gmail/index.ts
|
||||
import type { MomCustomTool, ToolAPI } from "@mariozechner/pi-mom";
|
||||
import { Type } from "@sinclair/typebox";
|
||||
import { Type } from "typebox";
|
||||
import { StringEnum } from "@mariozechner/pi-ai";
|
||||
import Imap from "imap";
|
||||
import nodemailer from "nodemailer";
|
||||
|
||||
Reference in New Issue
Block a user