@moikapy/origen 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter-DruYlWW-.d.ts +204 -0
- package/dist/adapter.d.ts +5 -204
- package/dist/chunk-QF3XSUMT.js +333 -0
- package/dist/chunk-QF3XSUMT.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/soul.js +4 -327
- package/dist/soul.js.map +1 -1
- package/package.json +10 -6
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { Model, Api, Message, Context } from '@mariozechner/pi-ai';
|
|
2
|
+
import { AgentTool, AgentEvent } from '@mariozechner/pi-agent-core';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { ModelId } from './models.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Origen types — no runtime deps, safe for client + server.
|
|
8
|
+
*/
|
|
9
|
+
/** D1-compatible database interface for tool execution */
|
|
10
|
+
interface D1Like {
|
|
11
|
+
prepare(sql: string): {
|
|
12
|
+
bind(...params: unknown[]): {
|
|
13
|
+
all(): Promise<{
|
|
14
|
+
results?: Record<string, unknown>[];
|
|
15
|
+
}>;
|
|
16
|
+
first(): Promise<Record<string, unknown> | null>;
|
|
17
|
+
run(): Promise<{
|
|
18
|
+
meta?: {
|
|
19
|
+
changes: number;
|
|
20
|
+
last_row_id: number;
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/** Function that provides a D1 instance to tool executors */
|
|
27
|
+
type D1Provider = () => Promise<D1Like>;
|
|
28
|
+
/** Chat context passed from the UI (what the user is reading) */
|
|
29
|
+
interface ReadingContext {
|
|
30
|
+
translation: string;
|
|
31
|
+
bookCode: string;
|
|
32
|
+
chapter: number;
|
|
33
|
+
selectedVerses?: number[];
|
|
34
|
+
}
|
|
35
|
+
interface Citation {
|
|
36
|
+
book: string;
|
|
37
|
+
chapter: number;
|
|
38
|
+
verse: number;
|
|
39
|
+
}
|
|
40
|
+
interface UsageInfo {
|
|
41
|
+
promptTokens?: number;
|
|
42
|
+
completionTokens?: number;
|
|
43
|
+
totalCost?: number;
|
|
44
|
+
}
|
|
45
|
+
/** Model configuration entry */
|
|
46
|
+
interface ModelConfig {
|
|
47
|
+
name: string;
|
|
48
|
+
description: string;
|
|
49
|
+
free: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Origen — Agent Engine (v0.3)
|
|
54
|
+
*
|
|
55
|
+
* Multi-provider agent harness built on pi-ai + pi-agent-core.
|
|
56
|
+
* Supports OpenRouter, Ollama, Anthropic, Google, and any OpenAI-compatible API.
|
|
57
|
+
* Soul.md personas, streaming, parallel tool execution, abort support.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* A tool that the host app registers with Origen.
|
|
62
|
+
* Simple interface: name, description, JSON schema, and an execute function
|
|
63
|
+
* that receives (args, getD1). The adapter wraps this into pi-agent-core's AgentTool.
|
|
64
|
+
*/
|
|
65
|
+
interface OrigenTool {
|
|
66
|
+
name: string;
|
|
67
|
+
description: string;
|
|
68
|
+
/** OpenAI function-calling parameter schema (JSON) */
|
|
69
|
+
parameters: Record<string, unknown>;
|
|
70
|
+
/** Zod schema for runtime validation (optional) */
|
|
71
|
+
inputSchema?: z.ZodType;
|
|
72
|
+
execute: (args: Record<string, unknown>, getD1: D1Provider) => Promise<string>;
|
|
73
|
+
}
|
|
74
|
+
interface AgentConfig {
|
|
75
|
+
appName?: string;
|
|
76
|
+
systemPrompt?: string;
|
|
77
|
+
tools: OrigenTool[];
|
|
78
|
+
getD1: D1Provider;
|
|
79
|
+
model?: ModelId;
|
|
80
|
+
maxSteps?: number;
|
|
81
|
+
/** Custom citation extractor */
|
|
82
|
+
extractCitations?: (text: string) => Citation[];
|
|
83
|
+
/** Dynamic API key resolution per provider (e.g., for expiring OAuth tokens) */
|
|
84
|
+
getApiKey?: (provider: string) => Promise<string | undefined>;
|
|
85
|
+
/** Ollama base URL override (default: http://localhost:11434/v1) */
|
|
86
|
+
ollamaBaseUrl?: string;
|
|
87
|
+
/** Tool execution mode: "parallel" (default) or "sequential" */
|
|
88
|
+
toolExecution?: "sequential" | "parallel";
|
|
89
|
+
/** Abort signal for cancellation */
|
|
90
|
+
signal?: AbortSignal;
|
|
91
|
+
/** Reasoning/thinking level for models that support it */
|
|
92
|
+
thinkingLevel?: "off" | "minimal" | "low" | "medium" | "high";
|
|
93
|
+
}
|
|
94
|
+
interface AuthCheckResult {
|
|
95
|
+
authenticated: boolean;
|
|
96
|
+
apiKey: string | null;
|
|
97
|
+
provider?: string;
|
|
98
|
+
error?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Provider-aware auth check. Tests key availability for each provider.
|
|
102
|
+
* If no provider argument, checks OpenRouter + Ollama availability.
|
|
103
|
+
*/
|
|
104
|
+
declare function checkAuth(getApiKey: ((provider: string) => Promise<string | undefined>) | (() => Promise<string | null>)): Promise<AuthCheckResult>;
|
|
105
|
+
/** Convenience: check OpenRouter auth only (backward compat). */
|
|
106
|
+
declare function checkOpenRouterAuth(getApiKey: () => Promise<string | null>): Promise<AuthCheckResult>;
|
|
107
|
+
type StreamEvent = {
|
|
108
|
+
type: "reasoning";
|
|
109
|
+
content: string;
|
|
110
|
+
} | {
|
|
111
|
+
type: "tool_call";
|
|
112
|
+
name: string;
|
|
113
|
+
args: Record<string, unknown>;
|
|
114
|
+
} | {
|
|
115
|
+
type: "tool_result";
|
|
116
|
+
name: string;
|
|
117
|
+
result: string;
|
|
118
|
+
} | {
|
|
119
|
+
type: "text";
|
|
120
|
+
content: string;
|
|
121
|
+
} | {
|
|
122
|
+
type: "done";
|
|
123
|
+
message: string;
|
|
124
|
+
citations: Citation[];
|
|
125
|
+
usage?: UsageInfo;
|
|
126
|
+
} | {
|
|
127
|
+
type: "error";
|
|
128
|
+
message: string;
|
|
129
|
+
};
|
|
130
|
+
declare function streamOrigen(messages: Array<{
|
|
131
|
+
role: "user" | "assistant";
|
|
132
|
+
content: string;
|
|
133
|
+
}>, context: Record<string, unknown> | undefined, config: AgentConfig, apiKey?: string): AsyncGenerator<StreamEvent>;
|
|
134
|
+
interface AgentResponse {
|
|
135
|
+
message: string;
|
|
136
|
+
citations: Citation[];
|
|
137
|
+
usage?: UsageInfo;
|
|
138
|
+
}
|
|
139
|
+
declare function callOrigen(messages: Array<{
|
|
140
|
+
role: "user" | "assistant";
|
|
141
|
+
content: string;
|
|
142
|
+
}>, context: Record<string, unknown> | undefined, config: AgentConfig, apiKey?: string): Promise<AgentResponse>;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Adapter: bridges Origen's simple types to pi-agent-core/pi-ai types.
|
|
146
|
+
*
|
|
147
|
+
* - OrigenTool → AgentTool (injects D1Provider)
|
|
148
|
+
* - pi-ai Model resolution (OpenRouter, Ollama, Anthropic, Google)
|
|
149
|
+
* - StreamEvent translation (AgentEvent → Origen's StreamEvent)
|
|
150
|
+
*/
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Convert an OrigenTool into a pi-agent-core AgentTool.
|
|
154
|
+
* The D1Provider is captured in closure so the tool's execute gets it.
|
|
155
|
+
*/
|
|
156
|
+
declare function adaptTool(tool: OrigenTool, getD1: D1Provider): AgentTool;
|
|
157
|
+
/** Adapt all OrigenTools for an Agent instance. */
|
|
158
|
+
declare function adaptTools(tools: OrigenTool[], getD1: D1Provider): AgentTool[];
|
|
159
|
+
interface ModelResolutionOptions {
|
|
160
|
+
/** Ollama base URL, e.g. "http://localhost:11434/v1" */
|
|
161
|
+
ollamaBaseUrl?: string;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Resolve a model ID string to a pi-ai Model object.
|
|
165
|
+
* Tries pi-ai's registry first, then falls back to built-in Ollama definitions.
|
|
166
|
+
*/
|
|
167
|
+
declare function resolveModel(modelId: string, options?: ModelResolutionOptions): Model<Api>;
|
|
168
|
+
/** Convert Origen's simple messages to pi-ai Message format. */
|
|
169
|
+
declare function convertMessages(messages: Array<{
|
|
170
|
+
role: "user" | "assistant";
|
|
171
|
+
content: string;
|
|
172
|
+
}>): Message[];
|
|
173
|
+
/** Build a pi-ai Context from Origen's config. */
|
|
174
|
+
declare function buildContext(systemPrompt: string, messages: Message[], adaptedTools: AgentTool[]): Context;
|
|
175
|
+
/** Translate a pi-agent-core AgentEvent into an Origen StreamEvent. */
|
|
176
|
+
declare function translateEvent(event: AgentEvent, extractCitations?: (text: string) => Citation[]): StreamEvent | null;
|
|
177
|
+
/**
|
|
178
|
+
* Eagerly subscribe to an Agent and return an async iterable of Origen StreamEvents.
|
|
179
|
+
*
|
|
180
|
+
* CRITICAL: The subscription is created synchronously when this function is called,
|
|
181
|
+
* BEFORE agent.prompt() starts. This avoids the race condition where events
|
|
182
|
+
* emitted during prompt() are missed if subscription happens after.
|
|
183
|
+
*
|
|
184
|
+
* Usage:
|
|
185
|
+
* const { stream, unsubscribe } = createEventStream(agent, extractCitations);
|
|
186
|
+
* agent.prompt(messages); // events flow into stream via active subscription
|
|
187
|
+
* for await (const event of stream) { ... }
|
|
188
|
+
*/
|
|
189
|
+
declare function createEventStream(agent: any, // Agent from pi-agent-core
|
|
190
|
+
extractCitations?: (text: string) => Citation[]): {
|
|
191
|
+
stream: AsyncGenerator<StreamEvent>;
|
|
192
|
+
unsubscribe: () => void;
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* Subscribe to an Agent and yield Origen StreamEvents.
|
|
196
|
+
* Handles the full lifecycle from agent_start to agent_end.
|
|
197
|
+
*
|
|
198
|
+
* @deprecated Use createEventStream() instead to avoid race conditions.
|
|
199
|
+
* This function subscribes lazily (on first iteration) which can miss events
|
|
200
|
+
* if the agent has already started emitting.
|
|
201
|
+
*/
|
|
202
|
+
declare function agentToStreamEvents(agent: any, extractCitations?: (text: string) => Citation[]): AsyncGenerator<StreamEvent>;
|
|
203
|
+
|
|
204
|
+
export { type AgentConfig as A, type Citation as C, type D1Like as D, type ModelResolutionOptions as M, type OrigenTool as O, type ReadingContext as R, type StreamEvent as S, type UsageInfo as U, type AgentResponse as a, type AuthCheckResult as b, type D1Provider as c, type ModelConfig as d, callOrigen as e, checkAuth as f, checkOpenRouterAuth as g, createEventStream as h, adaptTool as i, adaptTools as j, agentToStreamEvents as k, buildContext as l, convertMessages as m, resolveModel as r, streamOrigen as s, translateEvent as t };
|
package/dist/adapter.d.ts
CHANGED
|
@@ -1,204 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Origen types — no runtime deps, safe for client + server.
|
|
8
|
-
*/
|
|
9
|
-
/** D1-compatible database interface for tool execution */
|
|
10
|
-
interface D1Like {
|
|
11
|
-
prepare(sql: string): {
|
|
12
|
-
bind(...params: unknown[]): {
|
|
13
|
-
all(): Promise<{
|
|
14
|
-
results?: Record<string, unknown>[];
|
|
15
|
-
}>;
|
|
16
|
-
first(): Promise<Record<string, unknown> | null>;
|
|
17
|
-
run(): Promise<{
|
|
18
|
-
meta?: {
|
|
19
|
-
changes: number;
|
|
20
|
-
last_row_id: number;
|
|
21
|
-
};
|
|
22
|
-
}>;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
/** Function that provides a D1 instance to tool executors */
|
|
27
|
-
type D1Provider = () => Promise<D1Like>;
|
|
28
|
-
/** Chat context passed from the UI (what the user is reading) */
|
|
29
|
-
interface ReadingContext {
|
|
30
|
-
translation: string;
|
|
31
|
-
bookCode: string;
|
|
32
|
-
chapter: number;
|
|
33
|
-
selectedVerses?: number[];
|
|
34
|
-
}
|
|
35
|
-
interface Citation {
|
|
36
|
-
book: string;
|
|
37
|
-
chapter: number;
|
|
38
|
-
verse: number;
|
|
39
|
-
}
|
|
40
|
-
interface UsageInfo {
|
|
41
|
-
promptTokens?: number;
|
|
42
|
-
completionTokens?: number;
|
|
43
|
-
totalCost?: number;
|
|
44
|
-
}
|
|
45
|
-
/** Model configuration entry */
|
|
46
|
-
interface ModelConfig {
|
|
47
|
-
name: string;
|
|
48
|
-
description: string;
|
|
49
|
-
free: boolean;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Origen — Agent Engine (v0.3)
|
|
54
|
-
*
|
|
55
|
-
* Multi-provider agent harness built on pi-ai + pi-agent-core.
|
|
56
|
-
* Supports OpenRouter, Ollama, Anthropic, Google, and any OpenAI-compatible API.
|
|
57
|
-
* Soul.md personas, streaming, parallel tool execution, abort support.
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* A tool that the host app registers with Origen.
|
|
62
|
-
* Simple interface: name, description, JSON schema, and an execute function
|
|
63
|
-
* that receives (args, getD1). The adapter wraps this into pi-agent-core's AgentTool.
|
|
64
|
-
*/
|
|
65
|
-
interface OrigenTool {
|
|
66
|
-
name: string;
|
|
67
|
-
description: string;
|
|
68
|
-
/** OpenAI function-calling parameter schema (JSON) */
|
|
69
|
-
parameters: Record<string, unknown>;
|
|
70
|
-
/** Zod schema for runtime validation (optional) */
|
|
71
|
-
inputSchema?: z.ZodType;
|
|
72
|
-
execute: (args: Record<string, unknown>, getD1: D1Provider) => Promise<string>;
|
|
73
|
-
}
|
|
74
|
-
interface AgentConfig {
|
|
75
|
-
appName?: string;
|
|
76
|
-
systemPrompt?: string;
|
|
77
|
-
tools: OrigenTool[];
|
|
78
|
-
getD1: D1Provider;
|
|
79
|
-
model?: ModelId;
|
|
80
|
-
maxSteps?: number;
|
|
81
|
-
/** Custom citation extractor */
|
|
82
|
-
extractCitations?: (text: string) => Citation[];
|
|
83
|
-
/** Dynamic API key resolution per provider (e.g., for expiring OAuth tokens) */
|
|
84
|
-
getApiKey?: (provider: string) => Promise<string | undefined>;
|
|
85
|
-
/** Ollama base URL override (default: http://localhost:11434/v1) */
|
|
86
|
-
ollamaBaseUrl?: string;
|
|
87
|
-
/** Tool execution mode: "parallel" (default) or "sequential" */
|
|
88
|
-
toolExecution?: "sequential" | "parallel";
|
|
89
|
-
/** Abort signal for cancellation */
|
|
90
|
-
signal?: AbortSignal;
|
|
91
|
-
/** Reasoning/thinking level for models that support it */
|
|
92
|
-
thinkingLevel?: "off" | "minimal" | "low" | "medium" | "high";
|
|
93
|
-
}
|
|
94
|
-
interface AuthCheckResult {
|
|
95
|
-
authenticated: boolean;
|
|
96
|
-
apiKey: string | null;
|
|
97
|
-
provider?: string;
|
|
98
|
-
error?: string;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Provider-aware auth check. Tests key availability for each provider.
|
|
102
|
-
* If no provider argument, checks OpenRouter + Ollama availability.
|
|
103
|
-
*/
|
|
104
|
-
declare function checkAuth(getApiKey: ((provider: string) => Promise<string | undefined>) | (() => Promise<string | null>)): Promise<AuthCheckResult>;
|
|
105
|
-
/** Convenience: check OpenRouter auth only (backward compat). */
|
|
106
|
-
declare function checkOpenRouterAuth(getApiKey: () => Promise<string | null>): Promise<AuthCheckResult>;
|
|
107
|
-
type StreamEvent = {
|
|
108
|
-
type: "reasoning";
|
|
109
|
-
content: string;
|
|
110
|
-
} | {
|
|
111
|
-
type: "tool_call";
|
|
112
|
-
name: string;
|
|
113
|
-
args: Record<string, unknown>;
|
|
114
|
-
} | {
|
|
115
|
-
type: "tool_result";
|
|
116
|
-
name: string;
|
|
117
|
-
result: string;
|
|
118
|
-
} | {
|
|
119
|
-
type: "text";
|
|
120
|
-
content: string;
|
|
121
|
-
} | {
|
|
122
|
-
type: "done";
|
|
123
|
-
message: string;
|
|
124
|
-
citations: Citation[];
|
|
125
|
-
usage?: UsageInfo;
|
|
126
|
-
} | {
|
|
127
|
-
type: "error";
|
|
128
|
-
message: string;
|
|
129
|
-
};
|
|
130
|
-
declare function streamOrigen(messages: Array<{
|
|
131
|
-
role: "user" | "assistant";
|
|
132
|
-
content: string;
|
|
133
|
-
}>, context: Record<string, unknown> | undefined, config: AgentConfig, apiKey?: string): AsyncGenerator<StreamEvent>;
|
|
134
|
-
interface AgentResponse {
|
|
135
|
-
message: string;
|
|
136
|
-
citations: Citation[];
|
|
137
|
-
usage?: UsageInfo;
|
|
138
|
-
}
|
|
139
|
-
declare function callOrigen(messages: Array<{
|
|
140
|
-
role: "user" | "assistant";
|
|
141
|
-
content: string;
|
|
142
|
-
}>, context: Record<string, unknown> | undefined, config: AgentConfig, apiKey?: string): Promise<AgentResponse>;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Adapter: bridges Origen's simple types to pi-agent-core/pi-ai types.
|
|
146
|
-
*
|
|
147
|
-
* - OrigenTool → AgentTool (injects D1Provider)
|
|
148
|
-
* - pi-ai Model resolution (OpenRouter, Ollama, Anthropic, Google)
|
|
149
|
-
* - StreamEvent translation (AgentEvent → Origen's StreamEvent)
|
|
150
|
-
*/
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Convert an OrigenTool into a pi-agent-core AgentTool.
|
|
154
|
-
* The D1Provider is captured in closure so the tool's execute gets it.
|
|
155
|
-
*/
|
|
156
|
-
declare function adaptTool(tool: OrigenTool, getD1: D1Provider): AgentTool;
|
|
157
|
-
/** Adapt all OrigenTools for an Agent instance. */
|
|
158
|
-
declare function adaptTools(tools: OrigenTool[], getD1: D1Provider): AgentTool[];
|
|
159
|
-
interface ModelResolutionOptions {
|
|
160
|
-
/** Ollama base URL, e.g. "http://localhost:11434/v1" */
|
|
161
|
-
ollamaBaseUrl?: string;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Resolve a model ID string to a pi-ai Model object.
|
|
165
|
-
* Tries pi-ai's registry first, then falls back to built-in Ollama definitions.
|
|
166
|
-
*/
|
|
167
|
-
declare function resolveModel(modelId: string, options?: ModelResolutionOptions): Model<Api>;
|
|
168
|
-
/** Convert Origen's simple messages to pi-ai Message format. */
|
|
169
|
-
declare function convertMessages(messages: Array<{
|
|
170
|
-
role: "user" | "assistant";
|
|
171
|
-
content: string;
|
|
172
|
-
}>): Message[];
|
|
173
|
-
/** Build a pi-ai Context from Origen's config. */
|
|
174
|
-
declare function buildContext(systemPrompt: string, messages: Message[], adaptedTools: AgentTool[]): Context;
|
|
175
|
-
/** Translate a pi-agent-core AgentEvent into an Origen StreamEvent. */
|
|
176
|
-
declare function translateEvent(event: AgentEvent, extractCitations?: (text: string) => Citation[]): StreamEvent | null;
|
|
177
|
-
/**
|
|
178
|
-
* Eagerly subscribe to an Agent and return an async iterable of Origen StreamEvents.
|
|
179
|
-
*
|
|
180
|
-
* CRITICAL: The subscription is created synchronously when this function is called,
|
|
181
|
-
* BEFORE agent.prompt() starts. This avoids the race condition where events
|
|
182
|
-
* emitted during prompt() are missed if subscription happens after.
|
|
183
|
-
*
|
|
184
|
-
* Usage:
|
|
185
|
-
* const { stream, unsubscribe } = createEventStream(agent, extractCitations);
|
|
186
|
-
* agent.prompt(messages); // events flow into stream via active subscription
|
|
187
|
-
* for await (const event of stream) { ... }
|
|
188
|
-
*/
|
|
189
|
-
declare function createEventStream(agent: any, // Agent from pi-agent-core
|
|
190
|
-
extractCitations?: (text: string) => Citation[]): {
|
|
191
|
-
stream: AsyncGenerator<StreamEvent>;
|
|
192
|
-
unsubscribe: () => void;
|
|
193
|
-
};
|
|
194
|
-
/**
|
|
195
|
-
* Subscribe to an Agent and yield Origen StreamEvents.
|
|
196
|
-
* Handles the full lifecycle from agent_start to agent_end.
|
|
197
|
-
*
|
|
198
|
-
* @deprecated Use createEventStream() instead to avoid race conditions.
|
|
199
|
-
* This function subscribes lazily (on first iteration) which can miss events
|
|
200
|
-
* if the agent has already started emitting.
|
|
201
|
-
*/
|
|
202
|
-
declare function agentToStreamEvents(agent: any, extractCitations?: (text: string) => Citation[]): AsyncGenerator<StreamEvent>;
|
|
203
|
-
|
|
204
|
-
export { type AgentConfig as A, type Citation as C, type D1Like as D, type ModelConfig as M, type ModelResolutionOptions, type OrigenTool as O, type ReadingContext as R, type StreamEvent as S, type UsageInfo as U, type AgentResponse as a, adaptTool, adaptTools, agentToStreamEvents, type AuthCheckResult as b, buildContext, type D1Provider as c, convertMessages, createEventStream, callOrigen as d, checkAuth as e, checkOpenRouterAuth as f, resolveModel, streamOrigen as s, translateEvent };
|
|
1
|
+
import '@mariozechner/pi-ai';
|
|
2
|
+
import '@mariozechner/pi-agent-core';
|
|
3
|
+
export { M as ModelResolutionOptions, i as adaptTool, j as adaptTools, k as agentToStreamEvents, l as buildContext, m as convertMessages, h as createEventStream, r as resolveModel, t as translateEvent } from './adapter-DruYlWW-.js';
|
|
4
|
+
import 'zod';
|
|
5
|
+
import './models.js';
|