@meetsmore-oss/use-ai-server 1.15.0 → 1.17.0

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.
Files changed (41) hide show
  1. package/dist/agents/AISDKAgent.d.ts +123 -144
  2. package/dist/agents/AISDKAgent.d.ts.map +1 -1
  3. package/dist/agents/index.d.ts +1 -1
  4. package/dist/agents/index.d.ts.map +1 -1
  5. package/dist/agents/testing/MockReasoningModel.d.ts +1 -1
  6. package/dist/agents/testing/MockReasoningModel.d.ts.map +1 -1
  7. package/dist/attachmentResolution.d.ts +22 -0
  8. package/dist/attachmentResolution.d.ts.map +1 -0
  9. package/dist/attachmentResolution.test.d.ts +2 -0
  10. package/dist/attachmentResolution.test.d.ts.map +1 -0
  11. package/dist/index.d.ts +3 -1
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +157 -59
  14. package/dist/plugins/FeedbackPlugin.d.ts +1 -1
  15. package/dist/server.d.ts +3 -2
  16. package/dist/server.d.ts.map +1 -1
  17. package/dist/src/agents/AISDKAgent.d.ts +123 -144
  18. package/dist/src/agents/AISDKAgent.d.ts.map +1 -1
  19. package/dist/src/agents/index.d.ts +1 -1
  20. package/dist/src/agents/index.d.ts.map +1 -1
  21. package/dist/src/agents/testing/MockReasoningModel.d.ts +1 -1
  22. package/dist/src/agents/testing/MockReasoningModel.d.ts.map +1 -1
  23. package/dist/src/attachmentResolution.d.ts +22 -0
  24. package/dist/src/attachmentResolution.d.ts.map +1 -0
  25. package/dist/src/attachmentResolution.test.d.ts +2 -0
  26. package/dist/src/attachmentResolution.test.d.ts.map +1 -0
  27. package/dist/src/index.d.ts +3 -1
  28. package/dist/src/index.d.ts.map +1 -1
  29. package/dist/src/plugins/FeedbackPlugin.d.ts +1 -1
  30. package/dist/src/server.d.ts +3 -2
  31. package/dist/src/server.d.ts.map +1 -1
  32. package/dist/src/types.d.ts +12 -1
  33. package/dist/src/types.d.ts.map +1 -1
  34. package/dist/src/utils/toolFilters.d.ts +5 -5
  35. package/dist/test/integration-test-utils.d.ts +2 -1
  36. package/dist/test/integration-test-utils.d.ts.map +1 -1
  37. package/dist/tsconfig.tsbuildinfo +1 -1
  38. package/dist/types.d.ts +12 -1
  39. package/dist/types.d.ts.map +1 -1
  40. package/dist/utils/toolFilters.d.ts +5 -5
  41. package/package.json +2 -2
@@ -3,81 +3,141 @@ import type { Agent, AgentInput, EventEmitter, AgentResult } from './types';
3
3
  import type { ToolDefinition } from '../types';
4
4
  import { type CacheBreakpointFn } from './anthropicCache';
5
5
  /**
6
- * Configuration for AISDKAgent.
6
+ * The generation configuration for a single run(), returned by
7
+ * {@link AISDKAgentHooks.loadConfig}.
8
+ *
9
+ * Because `loadConfig` is called once per run, returning different values here
10
+ * changes the model / parameters for the next run without a server restart
11
+ * (e.g. values fetched from Langfuse prompt config).
12
+ *
13
+ * Only `model` is required. Omitted optional fields use library defaults.
7
14
  */
8
- export interface AISDKAgentConfig {
15
+ export interface AISDKRunConfig {
9
16
  /**
10
- * AI SDK Language Model (works with any provider).
17
+ * AI SDK Language Model (works with any provider). Accepts a model instance
18
+ * or a gateway model ID string.
19
+ *
20
+ * Required: use-ai is provider-agnostic and cannot pick a default model.
11
21
  *
12
22
  * @example
13
23
  * ```typescript
14
24
  * import { anthropic } from '@ai-sdk/anthropic';
15
- * import { openai } from '@ai-sdk/openai';
16
- * import { google } from '@ai-sdk/google';
17
- *
18
- * // With Anthropic Claude
19
- * { model: anthropic('claude-3-5-sonnet-20241022') }
20
- *
21
- * // With OpenAI GPT
22
- * { model: openai('gpt-4-turbo') }
23
- *
24
- * // With Google Gemini
25
- * { model: google('gemini-pro') }
25
+ * { model: anthropic('claude-3-5-sonnet-20241022') } // model instance
26
+ * { model: 'anthropic/claude-3-5-sonnet-20241022' } // gateway model ID
26
27
  * ```
27
28
  */
28
29
  model: LanguageModel;
29
30
  /**
30
- * Agent name for identification (defaults to 'ai-sdk').
31
- * Use this to differentiate multiple AI SDK agents.
31
+ * System prompt for this run, set on the backend and not exposed to the
32
+ * frontend (suitable for sensitive instructions). An empty string is treated
33
+ * as absent. When the request also carries a system prompt (AgentInput), the
34
+ * two are sent as separate system messages with this one first.
32
35
  */
33
- name?: string;
36
+ systemPrompt?: string;
34
37
  /**
35
- * Optional annotation/description for the agent.
36
- * Displayed in the use-ai agent selector UI to help users understand
37
- * the agent's capabilities or purpose.
38
+ * Temperature for model responses. Lower (e.g. 0) is more deterministic.
39
+ * @default undefined (uses the model's default)
40
+ */
41
+ temperature?: number;
42
+ /**
43
+ * Maximum number of tokens the model can output per response.
44
+ * @default 4096
45
+ */
46
+ maxOutputTokens?: number;
47
+ /**
48
+ * Maximum number of model step iterations per run. Each iteration performs
49
+ * one model invocation and may include tool calls.
50
+ * @default 10
51
+ */
52
+ maxSteps?: number;
53
+ /**
54
+ * Provider-specific options passed directly to `streamText`.
55
+ * Used for AI Gateway features like model fallbacks and provider routing.
38
56
  *
39
57
  * @example
40
58
  * ```typescript
41
- * { annotation: 'Fast responses for simple tasks' }
42
- * { annotation: 'Deep thinking mode for complex reasoning' }
59
+ * {
60
+ * providerOptions: {
61
+ * gateway: {
62
+ * models: ['anthropic/claude-opus-4.6', 'google/gemini-3.1-pro-preview'],
63
+ * order: ['azure', 'openai'],
64
+ * },
65
+ * },
66
+ * }
43
67
  * ```
44
68
  */
45
- annotation?: string;
69
+ providerOptions?: Record<string, Record<string, JSONValue>>;
70
+ }
71
+ /**
72
+ * Function-valued configuration points for {@link AISDKAgent}.
73
+ *
74
+ * Anything that can change at runtime is supplied through a hook rather than a
75
+ * static config field, so there is a single source of truth and no "static
76
+ * value vs. override" ambiguity.
77
+ */
78
+ export interface AISDKAgentHooks {
46
79
  /**
47
- * Optional system prompt to configure the agent's behavior.
48
- * This prompt is set on the backend and not exposed to the frontend,
49
- * making it suitable for sensitive instructions.
80
+ * Loads the generation config for a run.
81
+ *
82
+ * Called once at the start of every run(), so a value fetched from an external
83
+ * source (e.g. Langfuse prompt config) takes effect on the next request
84
+ * without a server restart. The agent does not cache the result.
50
85
  *
51
- * Can be a string, a function returning a string, or an async function
52
- * returning a Promise<string>. Use a function when the prompt needs to
53
- * be dynamically resolved (e.g., fetched from Langfuse or other external
54
- * sources) so updates take effect immediately without server restart.
86
+ * Required, because it is the only source of the model. For a static setup,
87
+ * return a constant object.
55
88
  *
56
- * When both this and the runtime systemPrompt (from AgentInput) are provided,
57
- * they are combined with this config prompt coming first.
89
+ * If it throws, the run fails with RUN_ERROR there is no static fallback.
90
+ * Implement resilience (e.g. return a default on a Langfuse outage) inside the
91
+ * hook itself.
58
92
  *
59
93
  * @example
60
94
  * ```typescript
61
- * // Static prompt
62
- * {
63
- * systemPrompt: 'You are a helpful assistant.'
64
- * }
95
+ * // Static
96
+ * { loadConfig: () => ({ model: anthropic('claude-3-5-sonnet-20241022') }) }
65
97
  *
66
- * // Sync function (e.g., reading from cache)
98
+ * // Dynamic, fetched from Langfuse (with a fallback owned by the host)
67
99
  * {
68
- * systemPrompt: () => promptCache.get('my-prompt')
100
+ * loadConfig: async () => {
101
+ * try {
102
+ * const prompt = await langfuse.prompt.get('my-prompt', { type: 'text' });
103
+ * return { model: prompt.config.model, systemPrompt: prompt.prompt };
104
+ * } catch {
105
+ * return { model: 'anthropic/claude-3-5-sonnet-20241022' };
106
+ * }
107
+ * },
69
108
  * }
109
+ * ```
110
+ */
111
+ loadConfig: () => AISDKRunConfig | Promise<AISDKRunConfig>;
112
+ }
113
+ /**
114
+ * Configuration for AISDKAgent.
115
+ *
116
+ * Structural settings (name, tool filtering, cache breakpoints) live here;
117
+ * everything that can vary per run is supplied via {@link AISDKAgentHooks}.
118
+ */
119
+ export interface AISDKAgentConfig {
120
+ /**
121
+ * Function-valued configuration. `hooks.loadConfig` (required) supplies the
122
+ * model and generation parameters for each run.
123
+ */
124
+ hooks: AISDKAgentHooks;
125
+ /**
126
+ * Agent name for identification (defaults to 'ai-sdk').
127
+ * Use this to differentiate multiple AI SDK agents.
128
+ */
129
+ name?: string;
130
+ /**
131
+ * Optional annotation/description for the agent.
132
+ * Displayed in the use-ai agent selector UI to help users understand
133
+ * the agent's capabilities or purpose.
70
134
  *
71
- * // Async function (e.g., fetching from Langfuse)
72
- * {
73
- * systemPrompt: async () => {
74
- * const prompt = await langfuse.getPrompt('my-prompt');
75
- * return prompt.compile();
76
- * }
77
- * }
135
+ * @example
136
+ * ```typescript
137
+ * { annotation: 'Fast responses for simple tasks' }
78
138
  * ```
79
139
  */
80
- systemPrompt?: string | (() => string | Promise<string>);
140
+ annotation?: string;
81
141
  /**
82
142
  * Optional filter function for tools.
83
143
  * Use this to control which tools are available to this agent.
@@ -86,17 +146,7 @@ export interface AISDKAgentConfig {
86
146
  * @example
87
147
  * ```typescript
88
148
  * // Only allow MCP tools starting with 'db_'
89
- * {
90
- * toolFilter: (tool) =>
91
- * !tool._remote || tool.name.startsWith('db_')
92
- * }
93
- *
94
- * // Block dangerous MCP tools
95
- * {
96
- * toolFilter: (tool) =>
97
- * !tool._remote ||
98
- * (!tool.name.includes('delete') && !tool.name.includes('drop'))
99
- * }
149
+ * { toolFilter: (tool) => !tool._remote || tool.name.startsWith('db_') }
100
150
  * ```
101
151
  */
102
152
  toolFilter?: (tool: ToolDefinition) => boolean;
@@ -105,36 +155,16 @@ export interface AISDKAgentConfig {
105
155
  * Only applies when using Anthropic models (Claude).
106
156
  *
107
157
  * Prompt caching reduces costs and latency by caching message prefixes.
108
- * Cache breakpoints mark where the cacheable prefix ends.
109
- *
110
158
  * The function receives each message with positional context and returns
111
- * true to add a cache breakpoint after that message.
112
- *
113
- * System prompt is included as role: 'system' at index 0 when present.
159
+ * true to add a cache breakpoint after that message. System prompt is
160
+ * included as role: 'system' at index 0 when present.
114
161
  *
115
162
  * @see https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
116
163
  *
117
164
  * @example
118
165
  * ```typescript
119
166
  * // Cache system prompt + last message (most common pattern)
120
- * {
121
- * cacheBreakpoint: (msg) => msg.role === 'system' || msg.isLast
122
- * }
123
- *
124
- * // Cache only the last message
125
- * {
126
- * cacheBreakpoint: (msg) => msg.isLast
127
- * }
128
- *
129
- * // Cache system prompt only
130
- * {
131
- * cacheBreakpoint: (msg) => msg.role === 'system'
132
- * }
133
- *
134
- * // Cache first 3 messages + last
135
- * {
136
- * cacheBreakpoint: (msg) => msg.index < 3 || msg.isLast
137
- * }
167
+ * { cacheBreakpoint: (msg) => msg.role === 'system' || msg.isLast }
138
168
  *
139
169
  * // System prompt with 1h TTL, last message with 5m TTL
140
170
  * {
@@ -147,52 +177,6 @@ export interface AISDKAgentConfig {
147
177
  * ```
148
178
  */
149
179
  cacheBreakpoint?: CacheBreakpointFn;
150
- /**
151
- * Provider-specific options passed directly to `streamText`.
152
- * Can be used for AI Gateway features like model fallbacks, provider routing, etc.
153
- *
154
- * @example
155
- * ```typescript
156
- * // Model fallbacks via AI Gateway
157
- * {
158
- * providerOptions: {
159
- * gateway: {
160
- * models: ['anthropic/claude-opus-4.6', 'google/gemini-3.1-pro-preview'],
161
- * },
162
- * },
163
- * }
164
- *
165
- * // Model fallbacks + provider routing
166
- * {
167
- * providerOptions: {
168
- * gateway: {
169
- * models: ['openai/gpt-5-nano', 'anthropic/claude-opus-4.6'],
170
- * order: ['azure', 'openai'],
171
- * },
172
- * },
173
- * }
174
- * ```
175
- */
176
- providerOptions?: Record<string, Record<string, JSONValue>>;
177
- /**
178
- * Maximum number of tokens the model can output per response.
179
- * @default 4096
180
- */
181
- maxOutputTokens?: number;
182
- /**
183
- * Temperature for model responses.
184
- * Lower values (e.g., 0) make responses more deterministic.
185
- * Higher values (e.g., 1) make responses more creative/random.
186
- * Useful for testing where deterministic behavior is desired.
187
- * @default undefined (uses model's default)
188
- */
189
- temperature?: number;
190
- /**
191
- * Maximum number of model step iterations per run.
192
- * Each iteration performs one model invocation and may include tool calls.
193
- * @default 10
194
- */
195
- maxSteps?: number;
196
180
  }
197
181
  /**
198
182
  * Agent implementation for AI SDK models (Anthropic, OpenAI, Google, etc.).
@@ -226,12 +210,12 @@ export interface AISDKAgentConfig {
226
210
  * // With Claude
227
211
  * const anthropic = createAnthropic({ apiKey: process.env.ANTHROPIC_API_KEY });
228
212
  * const claudeAgent = new AISDKAgent({
229
- * model: anthropic('claude-3-5-sonnet-20241022'),
213
+ * hooks: { loadConfig: () => ({ model: anthropic('claude-3-5-sonnet-20241022') }) },
230
214
  * });
231
215
  *
232
216
  * // With GPT-4
233
217
  * const gptAgent = new AISDKAgent({
234
- * model: openai('gpt-4-turbo'),
218
+ * hooks: { loadConfig: () => ({ model: openai('gpt-4-turbo') }) },
235
219
  * });
236
220
  *
237
221
  * // Agent names come from agents object keys, not from agent config
@@ -245,16 +229,11 @@ export interface AISDKAgentConfig {
245
229
  * ```
246
230
  */
247
231
  export declare class AISDKAgent implements Agent {
248
- private model;
249
- private providerOptions?;
250
232
  private name;
251
233
  private annotation?;
252
234
  private toolFilter?;
253
- private systemPrompt?;
254
235
  private cacheBreakpoint?;
255
- private maxOutputTokens;
256
- private temperature?;
257
- private maxSteps;
236
+ private loadConfig;
258
237
  constructor(config: AISDKAgentConfig);
259
238
  getName(): string;
260
239
  getAnnotation(): string | undefined;
@@ -265,10 +244,17 @@ export declare class AISDKAgent implements Agent {
265
244
  flushTelemetry(): Promise<void>;
266
245
  run(input: AgentInput, events: EventEmitter): Promise<AgentResult>;
267
246
  /**
268
- * Creates the RunContext for a single run() invocation.
269
- * Resolves system prompt and initializes all mutable state.
247
+ * Creates the RunContext for a single run() invocation from the loaded run
248
+ * config. Builds the system messages and initializes all mutable state.
270
249
  */
271
250
  private createRunContext;
251
+ /**
252
+ * Handles a failure of the `hooks.loadConfig` hook, which runs before the
253
+ * RunContext exists. Emits a well-formed lifecycle (RUN_STARTED then
254
+ * RUN_ERROR) built from the input so the client is not left hanging, and
255
+ * returns a failed AgentResult.
256
+ */
257
+ private handleConfigLoadError;
272
258
  /**
273
259
  * Emits initial lifecycle events: RUN_STARTED, MESSAGES_SNAPSHOT, STATE_SNAPSHOT.
274
260
  */
@@ -359,18 +345,11 @@ export declare class AISDKAgent implements Agent {
359
345
  * emits RUN_ERROR, and returns the AgentResult.
360
346
  */
361
347
  private handleRunError;
362
- /**
363
- * Resolves the systemPrompt configuration value.
364
- * Handles string, sync function, and async function cases.
365
- *
366
- * @returns The resolved system prompt string, or undefined if not configured or empty
367
- */
368
- private resolveSystemPrompt;
369
348
  /**
370
349
  * Builds an array of static system messages from config and runtime prompts.
371
350
  * These are built once per run and remain constant across steps (cacheable prefix).
372
351
  *
373
- * @param configPrompt - Resolved system prompt from agent config (already resolved via resolveSystemPrompt)
352
+ * @param configPrompt - Resolved system prompt from the run config (empty string already normalized to undefined)
374
353
  * @param runtimePrompt - System prompt from AgentInput (static instructions from server)
375
354
  * @returns Array of SystemModelMessage objects, or undefined if both are empty
376
355
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AISDKAgent.d.ts","sourceRoot":"","sources":["../../../src/agents/AISDKAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,aAAa,EAA8G,KAAK,SAAS,EAAE,MAAM,IAAI,CAAC;AAMvL,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAiB,MAAM,SAAS,CAAC;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,UAAU,CAAC;AAgCpE,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AA0HjF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,EAAE,aAAa,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM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C,QAAQ,CAAC,aAAa,CAM1B;IAEX,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAqC;IAEhF;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;CAgBzB"}
@@ -3,7 +3,7 @@
3
3
  * Provides pluggable AI agent backends that emit AG-UI protocol events.
4
4
  */
5
5
  export type { Agent, AgentInput, EventEmitter, AgentResult, ClientSession } from './types';
6
- export { AISDKAgent, type AISDKAgentConfig } from './AISDKAgent';
6
+ export { AISDKAgent, type AISDKAgentConfig, type AISDKAgentHooks, type AISDKRunConfig } from './AISDKAgent';
7
7
  export { createMockReasoningModel } from './testing/MockReasoningModel';
8
8
  export { applyCacheBreakpoints, isAnthropicModel, type MessageWithCacheContext, type CacheTtl, type CacheBreakpointResult, type CacheBreakpointFn, } from './anthropicCache';
9
9
  export { toolNeedsApproval, createApprovalWrapper, waitForApproval, type ToolArguments, type ToolResult, type ToolExecutor, } from './toolApproval';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,QAAQ,EACb,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,QAAQ,EACb,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC"}
@@ -14,8 +14,8 @@
14
14
  * import { createMockReasoningModel, AISDKAgent } from '@meetsmore-oss/use-ai-server';
15
15
  *
16
16
  * const agent = new AISDKAgent({
17
- * model: createMockReasoningModel(),
18
17
  * name: 'Mock (Reasoning)',
18
+ * hooks: { loadConfig: () => ({ model: createMockReasoningModel() }) },
19
19
  * });
20
20
  *
21
21
  * Enable in server-app with: USE_AI_ENABLE_MOCK_AGENT=true
@@ -1 +1 @@
1
- {"version":3,"file":"MockReasoningModel.d.ts","sourceRoot":"","sources":["../../../../src/agents/testing/MockReasoningModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,mBAAmB,EAA0B,MAAM,SAAS,CAAC;AAuItE;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,IAAI,mBAAmB,CAqE9D"}
1
+ {"version":3,"file":"MockReasoningModel.d.ts","sourceRoot":"","sources":["../../../../src/agents/testing/MockReasoningModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAwI9C;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,IAAI,mBAAmB,CAqE9D"}
@@ -0,0 +1,22 @@
1
+ import type { Message, ResolveAttachments, ResolveAttachmentsContext } from '@meetsmore-oss/use-ai-core';
2
+ /**
3
+ * Counts the `image_ref` / `file_ref` parts left in the history, for observability.
4
+ * After resolution these become `image_url` / `file_url`; any that remain were not
5
+ * resolved and are dropped during conversion (the attachment never reaches the model).
6
+ */
7
+ export declare function countRefParts(messages: Message[]): number;
8
+ /**
9
+ * Collects ref-bearing attachment parts across the run's whole message history,
10
+ * calls the host's `resolve` once, and puts the returned parts back in place.
11
+ * The input is not mutated. See core's {@link ResolveAttachments} for the
12
+ * details of the resolve contract.
13
+ *
14
+ * Returns the original `messages` reference as-is when there are no refs. When
15
+ * there are, it returns a new array but clones only the messages and content
16
+ * arrays it actually touches, so the caller's input is left unchanged.
17
+ *
18
+ * @throws When `resolve` returns a different number of parts than it was given
19
+ * (a contract violation; the host must return one replacement per input).
20
+ */
21
+ export declare function resolveAttachmentParts(messages: Message[], resolve: ResolveAttachments, context: ResolveAttachmentsContext): Promise<Message[]>;
22
+ //# sourceMappingURL=attachmentResolution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachmentResolution.d.ts","sourceRoot":"","sources":["../../src/attachmentResolution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAEP,kBAAkB,EAClB,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AAkBpC;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,CAWzD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,OAAO,EAAE,CAAC,CA2CpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=attachmentResolution.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachmentResolution.test.d.ts","sourceRoot":"","sources":["../../src/attachmentResolution.test.ts"],"names":[],"mappings":""}
@@ -1,8 +1,10 @@
1
1
  export { UseAIServer } from './server';
2
2
  export type { UseAIServerConfig, McpEndpointConfig, ToolDefinition, CorsOptions } from './types';
3
3
  export type { ClientSession } from './server';
4
+ export { resolveAttachmentParts } from './attachmentResolution';
5
+ export type { ResolveAttachments, ResolveAttachmentsContext, MultimodalContent } from './types';
4
6
  export type { Agent, AgentInput, EventEmitter, AgentResult } from './agents';
5
- export { AISDKAgent, type AISDKAgentConfig, type MessageWithCacheContext, type CacheTtl, type CacheBreakpointResult, type CacheBreakpointFn, createMockReasoningModel } from './agents';
7
+ export { AISDKAgent, type AISDKAgentConfig, type AISDKAgentHooks, type AISDKRunConfig, type MessageWithCacheContext, type CacheTtl, type CacheBreakpointResult, type CacheBreakpointFn, createMockReasoningModel } from './agents';
6
8
  export type { UseAIServerPlugin, MessageHandler, BeforeRunAgentResult } from './plugins';
7
9
  export { FeedbackPlugin } from './plugins';
8
10
  export type { SpanProcessor } from './instrumentation';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACjG,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,KAAK,uBAAuB,EAAE,KAAK,QAAQ,EAAE,KA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AAM,UAAU,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,KAAK,uBAAuB,EAAE,KAAK,QAAQ,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGnO,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAGzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGzF,OAAO,EACL,uBAAuB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,yBAAyB,EACzB,KAAK,uBAAuB,GAC7B,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,GAAG,EACH,EAAE,EACF,GAAG,GACJ,MAAM,SAAS,CAAC"}
@@ -17,7 +17,7 @@ import type { ClientSession } from '../agents/types';
17
17
  * import { FeedbackPlugin } from '@meetsmore-oss/use-ai-server';
18
18
  *
19
19
  * const server = new UseAIServer({
20
- * agents: { claude: new AISDKAgent({ model }) },
20
+ * agents: { claude: new AISDKAgent({ hooks: { loadConfig: () => ({ model }) } }) },
21
21
  * defaultAgent: 'claude',
22
22
  * plugins: [
23
23
  * new FeedbackPlugin(),
@@ -26,7 +26,7 @@ export type { ClientSession } from './agents/types';
26
26
  * apiKey: process.env.ANTHROPIC_API_KEY,
27
27
  * });
28
28
  * const claudeAgent = new AISDKAgent({
29
- * model: anthropic('claude-sonnet-4-20250514'),
29
+ * hooks: { loadConfig: () => ({ model: anthropic('claude-sonnet-4-20250514') }) },
30
30
  * });
31
31
  * const server = new UseAIServer({
32
32
  * port: 8081,
@@ -36,7 +36,7 @@ export type { ClientSession } from './agents/types';
36
36
  *
37
37
  * // Multiple agents (Claude + OpenAI)
38
38
  * const gptAgent = new AISDKAgent({
39
- * model: openai('gpt-4-turbo'),
39
+ * hooks: { loadConfig: () => ({ model: openai('gpt-4-turbo') }) },
40
40
  * });
41
41
  * const multiServer = new UseAIServer({
42
42
  * port: 8081,
@@ -64,6 +64,7 @@ export declare class UseAIServer {
64
64
  private messageHandlers;
65
65
  private mcpEndpoints;
66
66
  private serverTools;
67
+ private resolveAttachments?;
67
68
  private clientIpTracker;
68
69
  /**
69
70
  * Creates a new UseAI server instance.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,EAYlB,MAAM,SAAS,CAAC;AAOjB,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAezE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,EAAE,CAAiB;IAC3B,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,YAAY,CAAoC;IACxD,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,MAAM,CAAwB;IACtC,OAAO,CAAC,OAAO,CAAyC;IACxD,OAAO,CAAC,MAAM,CAIZ;IACF,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,eAAe,CAAi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CAAC,YAAY,CAAoC;IACxD,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,MAAM,CAAwB;IACtC,OAAO,CAAC,OAAO,CAAyC;IACxD,OAAO,CAAC,MAAM,CAIZ;IACF,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,eAAe,CAAiB;IACxC,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,eAAe,CAA0C;IACjE,OAAO,CAAC,YAAY,CAAgC;IACpD,OAAO,CAAC,WAAW,CAA8B;IAEjD,OAAO,CAAC,kBAAkB,CAAC,CAAqB;IAEhD,OAAO,CAAC,eAAe,CAAkB;IAEzC;;;;;OAKG;gBACS,MAAM,EAAE,iBAAiB;IAsGrC;;;OAGG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAqBjC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAiBzB;;;;;;OAMG;IACI,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;IAS1E,OAAO,CAAC,mBAAmB;YAqGb,mBAAmB;YA8BnB,cAAc;IA6a5B,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,gBAAgB;IAiDxB,OAAO,CAAC,0BAA0B;IAqBlC,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,SAAS;IAMjB;;;;;;;;;;;OAWG;YACW,qBAAqB;IA+CnC;;;;;;;OAOG;IACH,OAAO,CAAC,oBAAoB;IAwC5B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAoBtB;;;;;;OAMG;IACH,OAAO,CAAC,yBAAyB;IAYjC;;;OAGG;IACU,KAAK;CAsBnB"}
@@ -158,7 +158,18 @@ export interface UseAIServerConfig<TAgents extends Record<string, import('./agen
158
158
  * ```
159
159
  */
160
160
  spanProcessors?: import('./instrumentation').SpanProcessor[];
161
+ /**
162
+ * Optional host seam that resolves attachment refs into content the model can read.
163
+ *
164
+ * The host converts each ref into a part use-ai understands (`{ type:'image_url', url }` /
165
+ * `{ type:'file_url', url, mimeType, name }` / a `{ type:'text', text }` fallback when
166
+ * the attachment is missing or unfetchable) and returns it.
167
+ * When omitted, ref-bearing parts pass through unresolved and are silently dropped
168
+ * during conversion (the attachment never reaches the model). See @see ResolveAttachments
169
+ * for the full contract.
170
+ */
171
+ resolveAttachments?: import('@meetsmore-oss/use-ai-core').ResolveAttachments;
161
172
  }
162
- export type { ToolDefinition, ClientMessage, Tool, Message, Context, RunAgentInput, State, RunAgentMessage, ToolResultMessage, AbortRunMessage, RunStartedEvent, RunFinishedEvent, RunErrorEvent, StepStartedEvent, StepFinishedEvent, TextMessageStartEvent, TextMessageContentEvent, TextMessageEndEvent, TextMessageChunkEvent, ToolCallStartEvent, ToolCallArgsEvent, ToolCallEndEvent, ToolCallChunkEvent, ToolCallResultEvent, StateSnapshotEvent, StateDeltaEvent, MessagesSnapshotEvent, RawEvent, CustomEvent, ActivitySnapshotEvent, ActivityDeltaEvent, AGUIEvent, ToolAnnotations, ToolCallStartExtensions, WorkflowStatus, UseAIClientMessage, RunWorkflowMessage, UseAIForwardedProps, ToolApprovalRequestEvent, ToolApprovalResponseMessage, ReasoningStartEvent, ReasoningMessageStartEvent, ReasoningMessageContentEvent, ReasoningMessageEndEvent, ReasoningEndEvent, ReasoningEncryptedValueEvent, ReasoningPart, } from '@meetsmore-oss/use-ai-core';
173
+ export type { ToolDefinition, ClientMessage, Tool, Message, Context, RunAgentInput, State, RunAgentMessage, ToolResultMessage, AbortRunMessage, RunStartedEvent, RunFinishedEvent, RunErrorEvent, StepStartedEvent, StepFinishedEvent, TextMessageStartEvent, TextMessageContentEvent, TextMessageEndEvent, TextMessageChunkEvent, ToolCallStartEvent, ToolCallArgsEvent, ToolCallEndEvent, ToolCallChunkEvent, ToolCallResultEvent, StateSnapshotEvent, StateDeltaEvent, MessagesSnapshotEvent, RawEvent, CustomEvent, ActivitySnapshotEvent, ActivityDeltaEvent, AGUIEvent, ToolAnnotations, ToolCallStartExtensions, WorkflowStatus, UseAIClientMessage, RunWorkflowMessage, UseAIForwardedProps, ToolApprovalRequestEvent, ToolApprovalResponseMessage, ReasoningStartEvent, ReasoningMessageStartEvent, ReasoningMessageContentEvent, ReasoningMessageEndEvent, ReasoningEndEvent, ReasoningEncryptedValueEvent, ReasoningPart, MultimodalContent, ResolveAttachments, ResolveAttachmentsContext, } from '@meetsmore-oss/use-ai-core';
163
174
  export { EventType, ErrorCode, TOOL_APPROVAL_REQUEST } from '@meetsmore-oss/use-ai-core';
164
175
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACzD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,6EAA6E;IAC7E,GAAG,EAAE,MAAM,CAAC;IACZ,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,gBAAgB,EAAE,KAAK,CAA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qB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,QAAQ,EACR,WAAW,EACX,qBAAqB,EACrB,kBAAkB,EAClB,SAAS,EAET,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EAEnB,wBAAwB,EACxB,2BAA2B,EAE3B,mBAAmB,EACnB,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,EACxB,iBAAiB,EACjB,4BAA4B,EAC5B,aAAa,EAEb,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -41,7 +41,7 @@ export declare function isServerTool(tool: ToolDefinition): tool is ServerToolDe
41
41
  * @example
42
42
  * ```typescript
43
43
  * const agent = new AISDKAgent({
44
- * model: anthropic('claude-3-5-sonnet-20241022'),
44
+ * hooks: { loadConfig: () => ({ model: anthropic('claude-3-5-sonnet-20241022') }) },
45
45
  * toolFilter: and(
46
46
  * createMcpGlobAllowFilter(['db_*']),
47
47
  * (tool) => tool.description.includes('read-only')
@@ -60,7 +60,7 @@ export declare function and(...filters: Array<(tool: ToolDefinition) => boolean>
60
60
  * @example
61
61
  * ```typescript
62
62
  * const agent = new AISDKAgent({
63
- * model: anthropic('claude-3-5-sonnet-20241022'),
63
+ * hooks: { loadConfig: () => ({ model: anthropic('claude-3-5-sonnet-20241022') }) },
64
64
  * toolFilter: or(
65
65
  * createMcpGlobAllowFilter(['db_*']),
66
66
  * createMcpGlobAllowFilter(['file_*'])
@@ -79,7 +79,7 @@ export declare function or(...filters: Array<(tool: ToolDefinition) => boolean>)
79
79
  * ```typescript
80
80
  * // Block MCP tools matching delete patterns (equivalent to disallow filter)
81
81
  * const agent = new AISDKAgent({
82
- * model: anthropic('claude-3-5-sonnet-20241022'),
82
+ * hooks: { loadConfig: () => ({ model: anthropic('claude-3-5-sonnet-20241022') }) },
83
83
  * toolFilter: and(
84
84
  * or(not(isRemoteTool), createMcpGlobAllowFilter(['db_*'])),
85
85
  * not(createMcpGlobAllowFilter(['*_delete']))
@@ -99,13 +99,13 @@ export declare function not(filter: (tool: ToolDefinition) => boolean): (tool: T
99
99
  * ```typescript
100
100
  * // Only allow database MCP tools (client tools always pass)
101
101
  * const agent = new AISDKAgent({
102
- * model: anthropic('claude-3-5-sonnet-20241022'),
102
+ * hooks: { loadConfig: () => ({ model: anthropic('claude-3-5-sonnet-20241022') }) },
103
103
  * toolFilter: or(not(isRemoteTool), createGlobFilter(['db_*']))
104
104
  * });
105
105
  *
106
106
  * // Allow db_* but exclude *_delete
107
107
  * const agent = new AISDKAgent({
108
- * model: anthropic('claude-3-5-sonnet-20241022'),
108
+ * hooks: { loadConfig: () => ({ model: anthropic('claude-3-5-sonnet-20241022') }) },
109
109
  * toolFilter: and(
110
110
  * or(not(isRemoteTool), createGlobFilter(['db_*'])),
111
111
  * not(createGlobFilter(['*_delete']))
@@ -4,7 +4,8 @@
4
4
  * Shared utilities for server integration tests to reduce code duplication.
5
5
  */
6
6
  import type { Socket } from 'socket.io-client';
7
- import { MockLanguageModelV3, simulateReadableStream } from 'ai/test';
7
+ import { MockLanguageModelV3 } from 'ai/test';
8
+ import { simulateReadableStream } from 'ai';
8
9
  import { AISDKAgent } from '../src/agents/AISDKAgent';
9
10
  import type { UseAIServerConfig } from '../src/types';
10
11
  import { UseAIServer } from '../src/server';
@@ -1 +1 @@
1
- {"version":3,"file":"integration-test-utils.d.ts","sourceRoot":"","sources":["../../test/integration-test-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE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