mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 07:04:45 +00:00
chore(agent): rename package references from pi-agent to pi-agent-core (#1149)
Update all documentation and changelog references to use the new package name @mariozechner/pi-agent-core. https://claude.ai/code/session_019KyWMa1gGypeHxM4N3eu44 Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5893cd092c
commit
507639c760
2 changed files with 7 additions and 7 deletions
|
|
@ -167,7 +167,7 @@
|
|||
|
||||
- **`UserMessageWithAttachments` and `Attachment` types removed**: Attachment handling is now the responsibility of the `convertToLlm` function.
|
||||
|
||||
- **Agent loop moved from `@mariozechner/pi-ai`**: The `agentLoop`, `agentLoopContinue`, and related types have moved to this package. Import from `@mariozechner/pi-agent` instead.
|
||||
- **Agent loop moved from `@mariozechner/pi-ai`**: The `agentLoop`, `agentLoopContinue`, and related types have moved to this package. Import from `@mariozechner/pi-agent-core` instead.
|
||||
|
||||
### Added
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
# @mariozechner/pi-agent
|
||||
# @mariozechner/pi-agent-core
|
||||
|
||||
Stateful agent with tool execution and event streaming. Built on `@mariozechner/pi-ai`.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install @mariozechner/pi-agent
|
||||
npm install @mariozechner/pi-agent-core
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
```typescript
|
||||
import { Agent } from "@mariozechner/pi-agent";
|
||||
import { Agent } from "@mariozechner/pi-agent-core";
|
||||
import { getModel } from "@mariozechner/pi-ai";
|
||||
|
||||
const agent = new Agent({
|
||||
|
|
@ -293,7 +293,7 @@ Follow-up messages are checked only when there are no more tool calls and no ste
|
|||
Extend `AgentMessage` via declaration merging:
|
||||
|
||||
```typescript
|
||||
declare module "@mariozechner/pi-agent" {
|
||||
declare module "@mariozechner/pi-agent-core" {
|
||||
interface CustomAgentMessages {
|
||||
notification: { role: "notification"; text: string; timestamp: number };
|
||||
}
|
||||
|
|
@ -365,7 +365,7 @@ Thrown errors are caught by the agent and reported to the LLM as tool errors wit
|
|||
For browser apps that proxy through a backend:
|
||||
|
||||
```typescript
|
||||
import { Agent, streamProxy } from "@mariozechner/pi-agent";
|
||||
import { Agent, streamProxy } from "@mariozechner/pi-agent-core";
|
||||
|
||||
const agent = new Agent({
|
||||
streamFn: (model, context, options) =>
|
||||
|
|
@ -382,7 +382,7 @@ const agent = new Agent({
|
|||
For direct control without the Agent class:
|
||||
|
||||
```typescript
|
||||
import { agentLoop, agentLoopContinue } from "@mariozechner/pi-agent";
|
||||
import { agentLoop, agentLoopContinue } from "@mariozechner/pi-agent-core";
|
||||
|
||||
const context: AgentContext = {
|
||||
systemPrompt: "You are helpful.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue