feat: tool registration — brain tools for agent sessions (P2-004)

Register brain data layer as LLM-callable tools in Pi SDK agent
sessions. Agents can now query/create/update projects, tasks,
missions, and conversations through tool calls.

- 7 brain tools: list/get projects, list/create/update tasks,
  list missions, list conversations
- Tools registered via customTools in createAgentSession()
- Uses TypeBox schemas for parameter validation

Closes #22

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 22:18:09 -05:00
parent 7485f32e69
commit d0d3683651
5 changed files with 204 additions and 2 deletions

3
pnpm-lock.yaml generated
View File

@@ -95,6 +95,9 @@ importers:
'@opentelemetry/semantic-conventions':
specifier: ^1.40.0
version: 1.40.0
'@sinclair/typebox':
specifier: ^0.34.48
version: 0.34.48
better-auth:
specifier: ^1.5.5
version: 1.5.5(drizzle-kit@0.31.9)(drizzle-orm@0.45.1(@opentelemetry/api@1.9.0)(@types/pg@8.15.6)(kysely@0.28.11)(postgres@3.4.8))(mongodb@7.1.0(socks@2.8.7))(next@16.1.6(@opentelemetry/api@1.9.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(vitest@2.1.9(@types/node@22.19.15))