Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@noble/ciphers": "^2.1.1",
"@noble/ciphers": "^2.2.0",
"@phosphor-icons/react": "^2.1.10",
"@solana/wallet-adapter-react": "^0.15.0",
"@solana/wallet-adapter-react-ui": "^0.9.0",
"@solana/wallet-adapter-wallets": "^0.19.0",
"@solana/wallet-adapter-wallets": "^0.19.38",
"@solana/web3.js": "^1.98.0",
"@tailwindcss/vite": "^4.2.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router-dom": "^7.15.0",
"@tailwindcss/vite": "^4.3.1",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"react-router-dom": "^7.18.0",
"reactflow": "^11.11.4",
"tailwindcss": "^4.2.2",
"zustand": "^5.0.12"
"tailwindcss": "^4.3.1",
"zustand": "^5.0.14"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/react": "^19.0.0",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.0",
"jsdom": "^29.1.1",
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"test:e2e:headed": "playwright test --headed"
},
"dependencies": {
"@anthropic-ai/claude-agent-sdk": "^0.2.31",
"@anthropic-ai/claude-agent-sdk": "^0.3.185",
"@noble/curves": "^1.8.2",
"@noble/hashes": "^2.2.0",
"@sip-protocol/sdk": "^0.11.0",
Expand All @@ -44,19 +44,19 @@
"bs58": "^6.0.0",
"compression": "^1.8.1",
"cors": "^2.8.5",
"envalid": "^8.1.1",
"envalid": "^8.2.0",
"express": "^5.1.0",
"express-rate-limit": "^8.2.1",
"helmet": "^8.1.0",
"ioredis": "^5.9.2",
"lru-cache": "^11.2.5",
"express-rate-limit": "^8.5.2",
"helmet": "^8.2.0",
"ioredis": "^5.11.1",
"lru-cache": "^11.5.1",
"pino": "^9.6.0",
"pino-http": "^10.4.0",
"swagger-ui-express": "^5.0.1",
"zod": "^4.4.3"
},
"devDependencies": {
"@playwright/test": "^1.59.1",
"@playwright/test": "^1.61.0",
"@sipher/sdk": "workspace:*",
"@types/compression": "^1.8.1",
"@types/cors": "^2.8.17",
Expand All @@ -65,14 +65,14 @@
"@types/node": "^25.2.0",
"@types/supertest": "^7.2.0",
"@types/swagger-ui-express": "^4.1.8",
"@typescript-eslint/parser": "^8.59.2",
"eslint": "^10.3.0",
"@typescript-eslint/parser": "^8.61.1",
"eslint": "^10.5.0",
"pino-pretty": "^13.0.0",
"supertest": "^7.1.0",
"tsup": "^8.3.6",
"tsx": "^4.19.2",
"tsx": "^4.22.4",
"typescript": "^5.7.3",
"typescript-eslint": "^8.59.2",
"typescript-eslint": "^8.61.1",
"vitest": "^4.1.9"
},
"keywords": [
Expand Down
14 changes: 7 additions & 7 deletions packages/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
"typecheck": "tsc -p tsconfig.test.json"
},
"dependencies": {
"@mariozechner/pi-agent-core": "^0.66.1",
"@mariozechner/pi-ai": "^0.66.1",
"@noble/ciphers": "^2.1.1",
"@mariozechner/pi-agent-core": "^0.73.1",
"@mariozechner/pi-ai": "^0.73.1",
"@noble/ciphers": "^2.2.0",
"@sinclair/typebox": "^0.34.49",
"@sip-protocol/sns-stealth": "^0.1.1",
"@sipher/sdk": "workspace:*",
"better-sqlite3": "^12.8.0",
"better-sqlite3": "^12.11.1",
"express": "^5.0.0",
"ioredis": "^5.9.2",
"ioredis": "^5.11.1",
"jsonwebtoken": "^9.0.3",
"twitter-api-v2": "^1.29.0",
"ulid": "^3.0.2",
"ws": "^8.18.0",
"ws": "^8.21.0",
"zod": "^3.24.2"
},
"devDependencies": {
Expand All @@ -34,7 +34,7 @@
"@types/ws": "^8.5.0",
"supertest": "^7.2.2",
"tsup": "^8.3.6",
"tsx": "^4.19.0",
"tsx": "^4.22.4",
"typescript": "^5.7.0",
"vitest": "^4.1.9"
}
Expand Down
29 changes: 20 additions & 9 deletions packages/agent/tests/pi/tool-adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ const samplePiTool: Tool = {
} as never,
}

// Pi 0.73 made Tool['parameters'] (TypeBox TSchema) opaque — the JSON-schema
// fields are no longer visible on the type. At runtime the adapter passes the
// Anthropic input_schema straight through, so `parameters` is still a plain
// {type, properties, required} object. Read it through a typed view for these
// shape assertions (the same cast pattern tool-adapter.ts uses internally).
type SchemaView = {
type: string
properties: Record<string, { description?: string }>
required: string[]
}
const schemaOf = (tool: { parameters: unknown }): SchemaView => tool.parameters as SchemaView

describe('adaptTool', () => {
it('converts Anthropic tool schema to Pi Tool', () => {
const piTool = adaptTool(depositTool)
Expand All @@ -44,28 +56,27 @@ describe('adaptTool', () => {

// Verify the schema structure
expect(piTool.parameters).toEqual(depositTool.input_schema)
expect(piTool.parameters.type).toBe('object')
expect(piTool.parameters.properties).toBeDefined()
expect(piTool.parameters.required).toContain('amount')
expect(piTool.parameters.required).toContain('token')
expect(schemaOf(piTool).type).toBe('object')
expect(schemaOf(piTool).required).toContain('amount')
expect(schemaOf(piTool).required).toContain('token')
})

it('converts read-only tool', () => {
const piTool = adaptTool(balanceTool)

expect(piTool.name).toBe('balance')
expect(piTool.description).toBe(balanceTool.description)
expect(piTool.parameters.required).toContain('token')
expect(piTool.parameters.required).toContain('wallet')
expect(schemaOf(piTool).required).toContain('token')
expect(schemaOf(piTool).required).toContain('wallet')
})

it('preserves property descriptions', () => {
const piTool = adaptTool(depositTool)

expect(piTool.parameters.properties.amount.description).toBe(
expect(schemaOf(piTool).properties.amount.description).toBe(
'Amount to deposit (in human-readable units, e.g. 1.5 SOL)'
)
expect(piTool.parameters.properties.token.description).toBe(
expect(schemaOf(piTool).properties.token.description).toBe(
'Token symbol — SOL, USDC, USDT, or any SPL token mint address'
)
})
Expand All @@ -87,7 +98,7 @@ describe('adaptTools', () => {
expect(tool.name).toBeDefined()
expect(tool.description).toBeDefined()
expect(tool.parameters).toBeDefined()
expect(tool.parameters.type).toBe('object')
expect(schemaOf(tool).type).toBe('object')
})
})

Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"dependencies": {
"@sip-protocol/sdk": "^0.11.0",
"@solana/web3.js": "^1.98.0",
"@coral-xyz/anchor": "^0.30.1",
"@coral-xyz/anchor": "^0.32.1",
"@solana/spl-token": "^0.4.9"
},
"devDependencies": {
Expand Down
Loading
Loading