Add sdk.md intro, update CHANGELOG for branch() change

This commit is contained in:
Mario Zechner 2025-12-31 13:48:22 +01:00
parent 8e1e99ca05
commit 8fb936853b
2 changed files with 3 additions and 0 deletions

View file

@ -57,6 +57,7 @@
- `CustomToolContext` provides `sessionManager: ReadonlySessionManager`, `modelRegistry`, and `model`
- `dispose()` method removed - use `onSession` with `reason: "shutdown"` for cleanup
- `CustomToolFactory` return type changed to `CustomTool<any, any>` for type compatibility
- **AgentSession.branch()**: Now takes `entryId: string` instead of `entryIndex: number`. `SessionBeforeBranchEvent.entryId` replaces `entryIndex`. `getUserMessagesForBranching()` returns `{ entryId, text }` instead of `{ entryIndex, text }`.
- **Renamed exports**:
- `messageTransformer``convertToLlm`
- `SessionContext` alias `LoadedSession` removed (use `SessionContext` directly)

View file

@ -1,3 +1,5 @@
> pi can help you use the SDK. Ask it to build an integration for your use case.
# SDK
The SDK provides programmatic access to pi's agent capabilities. Use it to embed pi in other applications, build custom interfaces, or integrate with automated workflows.