@mozaik-ai/core 3.13.1 → 4.0.0-beta.1

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/index.d.mts CHANGED
@@ -3,59 +3,23 @@ declare abstract class ContextItem {
3
3
  getType(): string;
4
4
  }
5
5
 
6
- declare class ModelContext {
7
- readonly id: string;
8
- readonly projectId: string;
9
- readonly items: ContextItem[];
10
- constructor(id: string, projectId: string, items: ContextItem[]);
11
- addContextItem(item: ContextItem): ModelContext;
12
- applyModelOutput(items: ContextItem[]): ModelContext;
13
- getItems(): ContextItem[];
14
- getLastItem(): ContextItem;
15
- static create(projectId: string): ModelContext;
6
+ declare class FunctionCallItem extends ContextItem {
7
+ readonly type = "function_call";
8
+ readonly callId: string;
9
+ readonly name: string;
10
+ readonly args: string;
11
+ private constructor();
16
12
  static rehydrate(data: {
17
- id: string;
18
- projectId: string;
19
- items: ContextItem[];
20
- }): ModelContext;
13
+ callId: string;
14
+ name: string;
15
+ args: string;
16
+ }): FunctionCallItem;
21
17
  }
22
18
 
23
19
  declare abstract class ItemContent {
24
20
  abstract readonly type: string;
25
21
  }
26
22
 
27
- declare class InputText extends ItemContent {
28
- readonly text: string;
29
- readonly type = "input_text";
30
- private constructor();
31
- static create(text: string): InputText;
32
- static rehydrate(data: {
33
- text: string;
34
- }): InputText;
35
- }
36
-
37
- declare class UserMessageItem extends ContextItem {
38
- readonly type = "message";
39
- readonly role = "user";
40
- readonly content: InputText;
41
- private constructor();
42
- static create(text: string): UserMessageItem;
43
- static rehydrate(data: {
44
- text: string;
45
- }): UserMessageItem;
46
- }
47
-
48
- declare class DeveloperMessageItem extends ContextItem {
49
- readonly type = "message";
50
- readonly role = "developer";
51
- readonly content: InputText;
52
- private constructor();
53
- static create(text: string): DeveloperMessageItem;
54
- static rehydrate(data: {
55
- text: string;
56
- }): DeveloperMessageItem;
57
- }
58
-
59
23
  declare class OutputText extends ItemContent {
60
24
  readonly text: string;
61
25
  readonly type = "output_text";
@@ -75,17 +39,14 @@ declare class ModelMessageItem extends ContextItem {
75
39
  }): ModelMessageItem;
76
40
  }
77
41
 
78
- declare class FunctionCallItem extends ContextItem {
79
- readonly type = "function_call";
80
- readonly callId: string;
81
- readonly name: string;
82
- readonly args: string;
42
+ declare class InputText extends ItemContent {
43
+ readonly text: string;
44
+ readonly type = "input_text";
83
45
  private constructor();
46
+ static create(text: string): InputText;
84
47
  static rehydrate(data: {
85
- callId: string;
86
- name: string;
87
- args: string;
88
- }): FunctionCallItem;
48
+ text: string;
49
+ }): InputText;
89
50
  }
90
51
 
91
52
  declare class SummaryText extends ItemContent {
@@ -110,15 +71,41 @@ declare class ReasoningItem extends ContextItem {
110
71
  }): ReasoningItem;
111
72
  }
112
73
 
113
- interface FunctionTool {
114
- type: "function";
115
- name: string;
116
- description: string;
117
- parameters: Record<string, any>;
118
- strict: boolean;
119
- invoke: (args: any) => Promise<any>;
74
+ declare class ModelContext {
75
+ readonly id: string;
76
+ readonly items: ContextItem[];
77
+ constructor(id: string, items: ContextItem[]);
78
+ getItems(): ContextItem[];
79
+ addContextItems(contextItems: ContextItem[]): ModelContext;
80
+ addItem(item: ContextItem): ModelContext;
81
+ static create(): ModelContext;
82
+ static rehydrate(data: {
83
+ id: string;
84
+ items: ContextItem[];
85
+ }): ModelContext;
86
+ }
87
+
88
+ declare class UserMessageItem extends ContextItem {
89
+ readonly type = "message";
90
+ readonly role = "user";
91
+ readonly content: InputText;
92
+ private constructor();
93
+ static create(text: string): UserMessageItem;
94
+ static rehydrate(data: {
95
+ text: string;
96
+ }): UserMessageItem;
97
+ }
98
+
99
+ declare class DeveloperMessageItem extends ContextItem {
100
+ readonly type = "message";
101
+ readonly role = "developer";
102
+ readonly content: InputText;
103
+ private constructor();
104
+ static create(text: string): DeveloperMessageItem;
105
+ static rehydrate(data: {
106
+ text: string;
107
+ }): DeveloperMessageItem;
120
108
  }
121
- type Tool = FunctionTool;
122
109
 
123
110
  declare class FunctionCallOutputItem extends ContextItem {
124
111
  readonly type = "function_call_output";
@@ -132,94 +119,86 @@ declare class FunctionCallOutputItem extends ContextItem {
132
119
  }): FunctionCallOutputItem;
133
120
  }
134
121
 
135
- declare class SemanticEvent<T> {
136
- readonly type: string;
137
- readonly data: T;
138
- constructor(type: string, data: T);
139
- getType(): string;
122
+ interface FunctionTool {
123
+ type: "function";
124
+ name: string;
125
+ description: string;
126
+ parameters: Record<string, any>;
127
+ strict: boolean;
128
+ invoke: (args: any) => Promise<any>;
140
129
  }
130
+ type Tool = FunctionTool;
141
131
 
142
- interface AgenticErrorOpts {
143
- message: string;
144
- stack?: string;
145
- source?: Participant;
146
- enviornment?: AgenticEnvironment;
132
+ declare class SemanticEvent<TType extends string = string, TPayload = unknown> {
133
+ readonly type: TType;
134
+ readonly producerId: string;
135
+ readonly occurredAt: Date;
136
+ readonly payload: TPayload;
137
+ constructor(type: TType, producerId: string, occurredAt: Date, payload: TPayload);
138
+ static create<TType extends string = string, TPayload = unknown>(type: TType, producerId: string, payload: TPayload): SemanticEvent<TType, TPayload>;
147
139
  }
148
- declare class AgenticError extends Error {
149
- private source?;
150
- private environment?;
151
- constructor({ message, stack, source, enviornment }: AgenticErrorOpts);
152
- getSource(): Participant | undefined;
153
- getEnvironment(): AgenticEnvironment | undefined;
140
+
141
+ interface FunctionCallRunner {
142
+ run(call: FunctionCallItem, tool: Tool): Promise<FunctionCallOutputItem>;
154
143
  }
155
144
 
156
- type ParticipantClassConstructor = new (...args: any[]) => Participant;
157
- declare abstract class Participant {
158
- private environments;
159
- protected listens: ParticipantClassConstructor[];
160
- private active;
161
- join(environment: AgenticEnvironment): void;
162
- leave(environment: AgenticEnvironment): void;
163
- isJoinedTo(environment: AgenticEnvironment): boolean;
164
- getEnvironments(): AgenticEnvironment[];
165
- getListeners(): ParticipantClassConstructor[];
166
- getEnvironmentState(environment: AgenticEnvironment): boolean | undefined;
167
- markInactive(environment: AgenticEnvironment): void;
168
- markActive(environment: AgenticEnvironment): void;
169
- abstract onParticipantJoined(participant: Participant): Promise<void> | void;
170
- abstract onParticipantLeft(participant: Participant): Promise<void> | void;
171
- abstract onJoined(): Promise<void> | void;
172
- abstract onLeft(): Promise<void> | void;
173
- abstract onFunctionCall(item: FunctionCallItem): Promise<void> | void;
174
- abstract onExternalFunctionCall(source: Participant, item: FunctionCallItem): Promise<void> | void;
175
- abstract onFunctionCallOutput(item: FunctionCallOutputItem): Promise<void> | void;
176
- abstract onExternalFunctionCallOutput(source: Participant, item: FunctionCallOutputItem): Promise<void> | void;
177
- abstract onReasoning(item: ReasoningItem): Promise<void> | void;
178
- abstract onExternalReasoning(source: Participant, item: ReasoningItem): Promise<void> | void;
179
- abstract onModelMessage(item: ModelMessageItem): Promise<void> | void;
180
- abstract onExternalModelMessage(source: Participant, item: ModelMessageItem): Promise<void> | void;
181
- abstract onMessage(message: string): Promise<void> | void;
182
- abstract onInternalEvent(item: SemanticEvent<unknown>): Promise<void> | void;
183
- abstract onExternalEvent(source: Participant, item: SemanticEvent<unknown>): Promise<void> | void;
184
- abstract onError(error: AgenticError): void;
185
- abstract onParticipantError(source: Participant, error: AgenticError): void;
186
- }
187
-
188
- interface AgenticEnvironmentOptions {
189
- silent?: boolean;
190
- }
191
- declare class AgenticEnvironment {
192
- protected subscribers: Participant[];
193
- private name?;
194
- private options?;
195
- private showLogs?;
196
- constructor(name?: string, opts?: AgenticEnvironmentOptions);
197
- subscribe(participant: Participant): void;
198
- unsubscribe(participant: Participant): void;
199
- deliverFunctionCall(source: Participant, item: FunctionCallItem): void;
200
- deliverModelMessage(source: Participant, item: ModelMessageItem): void;
201
- deliverReasoning(source: Participant, item: ReasoningItem): void;
202
- deliverFunctionCallOutput(source: Participant, item: FunctionCallOutputItem): void;
203
- deliverMessage(source: Participant, message: string): void;
204
- deliverSemanticEvent(source: Participant, item: SemanticEvent<unknown>): void;
205
- deliverError(source: Participant, error: AgenticError): void;
206
- private getListeningParticipants;
207
- private deliverToSubscribers;
208
- private handleError;
209
- }
210
-
211
- type InferenceParams<TModel extends string> = {
212
- model: TModel;
145
+ type InferenceInput = {
146
+ model: string;
213
147
  maxOutputTokens?: number;
214
148
  reasoningEffort?: string;
215
149
  tools?: Tool[];
216
150
  streaming?: boolean;
217
151
  structuredOutput?: StructuredOutputFormat;
218
152
  context: ModelContext;
219
- caller: Participant;
220
- environment: AgenticEnvironment;
221
- signal?: AbortSignal;
222
153
  };
154
+ type InferenceItem = FunctionCallItem | ReasoningItem | ModelMessageItem;
155
+ type InferenceOutput = {
156
+ items: InferenceItem[];
157
+ rowResponse: any;
158
+ };
159
+ interface InferenceRunner {
160
+ run(request: InferenceInput): Promise<InferenceOutput>;
161
+ }
162
+
163
+ interface InferenceEndpointMapper {
164
+ toRequest(inferenceInput: InferenceInput): any;
165
+ toResponse(response: any): InferenceOutput;
166
+ }
167
+
168
+ interface Endpoint {
169
+ endpointMapper: InferenceEndpointMapper;
170
+ infer(requestParams: InferenceInput): Promise<InferenceOutput>;
171
+ stream(requestParams: InferenceInput): AsyncIterable<SemanticEvent>;
172
+ }
173
+
174
+ type GenerativeModel = {
175
+ endpoint: Endpoint;
176
+ specification: ModelSpecification;
177
+ };
178
+ type ModelSpecification = {
179
+ name: string;
180
+ provider: string;
181
+ supportsReasoningEffort: boolean;
182
+ supportedReasoningEfforts: string[];
183
+ supportsStreaming: boolean;
184
+ contextWindowSize: number;
185
+ supportedContextItemTypes: string[];
186
+ maxOutputTokens: number;
187
+ supportsFunctionCalling: boolean;
188
+ supportsStructuredOutput: boolean;
189
+ };
190
+
191
+ type StructuredOutputFormat = {
192
+ name?: string;
193
+ schema: Record<string, any>;
194
+ strict?: boolean;
195
+ };
196
+
197
+ interface ModelContextRepository {
198
+ save(context: ModelContext): Promise<void>;
199
+ get(id: string): Promise<ModelContext>;
200
+ getByProjectId(projectId: string): Promise<ModelContext[]>;
201
+ }
223
202
 
224
203
  declare class InputTokenDetails {
225
204
  readonly cached_tokens: number;
@@ -238,44 +217,69 @@ declare class TokenUsage {
238
217
  constructor(inputTokens: number, outputTokens: number, totalTokens: number, inputTokenDetails: InputTokenDetails, outputTokenDetails: OutputTokenDetails);
239
218
  }
240
219
 
241
- declare class InferenceResponse {
242
- readonly contextItems: ContextItem[];
243
- readonly tokenUsage?: TokenUsage;
244
- constructor(contextItems: ContextItem[], tokenUsage: TokenUsage | undefined);
220
+ interface McpServerConfig {
221
+ /** The MCP server URL, e.g. https://api.githubcopilot.com/mcp/ */
222
+ url: string;
223
+ /** Bearer token sent as `Authorization: Bearer <token>` (e.g. a GitHub token). */
224
+ authToken?: string;
225
+ /** Extra headers merged into every request (overridden by `authToken` for Authorization). */
226
+ headers?: Record<string, string>;
227
+ /** Client name reported to the server (defaults to "mozaik"). */
228
+ name?: string;
245
229
  }
246
-
247
- interface InferenceEndpointMapper {
248
- toRequest(inferenceParams: InferenceParams<ModelName>): any;
249
- toResponse(response: any): InferenceResponse;
230
+ interface McpToolSpec {
231
+ name: string;
232
+ description: string;
233
+ /** JSON Schema for the tool's arguments (maps 1:1 to FunctionTool.parameters). */
234
+ inputSchema: Record<string, any>;
250
235
  }
251
-
252
- interface Endpoint {
253
- endpointMapper: InferenceEndpointMapper;
254
- infer(requestParams: InferenceParams<ModelName>): Promise<InferenceResponse>;
255
- stream(requestParams: InferenceParams<ModelName>, signal?: AbortSignal): AsyncIterable<SemanticEvent<unknown>>;
236
+ /**
237
+ * A thin wrapper over the MCP TypeScript SDK using the Streamable HTTP transport — what
238
+ * remote MCP servers (e.g. GitHub's `api.githubcopilot.com/mcp/`) speak. One client per
239
+ * server; lazily connects on first use. Infrastructure-only: the domain never sees this.
240
+ */
241
+ declare class McpClient {
242
+ private readonly config;
243
+ private readonly client;
244
+ private readonly transport;
245
+ private connected;
246
+ constructor(config: McpServerConfig);
247
+ connect(): Promise<void>;
248
+ /** The tools this server exposes. */
249
+ listTools(): Promise<McpToolSpec[]>;
250
+ /** Call a tool by name; returns its text output. Throws if the server flags an error. */
251
+ callTool(name: string, args: Record<string, any>): Promise<string>;
252
+ close(): Promise<void>;
256
253
  }
257
254
 
258
- type ModelName = "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.4-nano" | "gpt-5.5" | "claude-haiku-4-5" | "claude-sonnet-4-6" | "claude-opus-4-7" | "claude-opus-4-8" | "gemini-3.5-flash" | "gemini-3.1-pro-preview" | "deepseek-v4-flash" | "deepseek-v4-pro";
259
-
260
- type StructuredOutputFormat = {
261
- name?: string;
262
- schema: Record<string, any>;
263
- strict?: boolean;
264
- };
265
-
266
- interface ModelContextRepository {
267
- save(context: ModelContext): Promise<void>;
268
- get(id: string): Promise<ModelContext>;
269
- getByProjectId(projectId: string): Promise<ModelContext[]>;
255
+ /** The slice of an MCP client the registry needs — lets tests inject a fake. */
256
+ interface McpClientLike {
257
+ listTools(): Promise<Array<{
258
+ name: string;
259
+ description: string;
260
+ inputSchema: Record<string, any>;
261
+ }>>;
262
+ callTool(name: string, args: Record<string, any>): Promise<string>;
263
+ close(): Promise<void>;
270
264
  }
271
-
272
- declare class InMemoryModelContextRepository implements ModelContextRepository {
273
- private readonly store;
274
- private readonly projectIndex;
275
- save(context: ModelContext): Promise<void>;
276
- get(id: string): Promise<ModelContext>;
277
- getByProjectId(projectId: string): Promise<ModelContext[]>;
278
- private clone;
265
+ /**
266
+ * Connects to one or more MCP servers and exposes their tools as mozaik `FunctionTool`s.
267
+ * Each tool's `invoke()` proxies the call back to its MCP server. Because they are plain
268
+ * FunctionTools, every provider mapper and the existing function-call loop handle them
269
+ * with no changes — MCP support adds no new tool type and touches no provider code.
270
+ *
271
+ * `strict` is false: MCP servers publish arbitrary JSON Schemas that won't always satisfy
272
+ * a provider's strict function-calling mode.
273
+ */
274
+ declare class McpToolRegistry {
275
+ private readonly servers;
276
+ private readonly createClient;
277
+ private readonly clients;
278
+ constructor(servers: McpServerConfig[], createClient?: (config: McpServerConfig) => McpClientLike);
279
+ /** Discover every tool across the configured servers, as FunctionTools ready to pass to a model. */
280
+ discoverTools(): Promise<FunctionTool[]>;
281
+ /** Close all underlying MCP connections. */
282
+ close(): Promise<void>;
279
283
  }
280
284
 
281
285
  declare class SystemMessageItem extends ContextItem {
@@ -289,28 +293,133 @@ declare class SystemMessageItem extends ContextItem {
289
293
  }): SystemMessageItem;
290
294
  }
291
295
 
292
- declare class BaseParticipant extends Participant {
293
- onFunctionCall(item: FunctionCallItem): void;
294
- onExternalFunctionCall(source: Participant, item: FunctionCallItem): void;
295
- onFunctionCallOutput(item: FunctionCallOutputItem): void;
296
- onExternalFunctionCallOutput(source: Participant, item: FunctionCallOutputItem): void;
297
- onReasoning(item: ReasoningItem): void;
298
- onExternalReasoning(source: Participant, item: ReasoningItem): void;
299
- onModelMessage(item: ModelMessageItem): void;
300
- onExternalModelMessage(source: Participant, item: ModelMessageItem): void;
301
- onMessage(message: string): void;
302
- onJoined(): void;
303
- onLeft(): void;
304
- onParticipantJoined(participant: Participant): void;
305
- onParticipantLeft(participant: Participant): void;
306
- onInternalEvent(item: SemanticEvent<unknown>): void;
307
- onExternalEvent(source: Participant, item: SemanticEvent<unknown>): void;
308
- onError(error: AgenticError): void;
309
- onParticipantError(source: Participant, error: AgenticError): void;
310
- }
311
-
312
- declare const runInference: (inferenceParams: InferenceParams<ModelName>) => void;
313
- declare const executeFunctionCall: (environment: AgenticEnvironment, functionCallItem: FunctionCallItem, tool: Tool, caller: Participant) => void;
314
- declare const sendMessage: (environment: AgenticEnvironment, message: string, caller: Participant) => void;
315
-
316
- export { AgenticEnvironment, AgenticError, BaseParticipant, ContextItem, DeveloperMessageItem, type Endpoint, FunctionCallItem, FunctionCallOutputItem, InMemoryModelContextRepository, type InferenceParams, InferenceResponse, InputTokenDetails, ModelContext, type ModelContextRepository, ModelMessageItem, type ModelName, OutputTokenDetails, Participant, ReasoningItem, SemanticEvent, type StructuredOutputFormat, SystemMessageItem, TokenUsage, type Tool, UserMessageItem, executeFunctionCall, runInference, sendMessage };
296
+ type SituationContext$1<TEvent extends SemanticEvent = SemanticEvent> = {
297
+ readonly event: TEvent;
298
+ readonly participant: Participant;
299
+ };
300
+ declare abstract class SituationSpecification<TEvent extends SemanticEvent = SemanticEvent> {
301
+ abstract isSatisfiedBy(situationContext: SituationContext$1<TEvent>): boolean;
302
+ and(other: SituationSpecification<TEvent>): SituationSpecification<TEvent>;
303
+ or(other: SituationSpecification<TEvent>): SituationSpecification<TEvent>;
304
+ not(): SituationSpecification<TEvent>;
305
+ }
306
+
307
+ interface SituationHandler {
308
+ readonly specification: SituationSpecification;
309
+ readonly processor: SituationProcessor;
310
+ }
311
+ type SituationContext<TEvent extends SemanticEvent = SemanticEvent> = {
312
+ readonly event: TEvent;
313
+ readonly participant: Participant;
314
+ };
315
+ interface SituationProcessor {
316
+ apply(context: SituationContext): void | Promise<void>;
317
+ }
318
+
319
+ type ParticipantRole = "agent" | "human";
320
+ type ParticipantManifest = {
321
+ readonly id: string;
322
+ readonly name: string;
323
+ readonly role: ParticipantRole;
324
+ readonly capabilities?: readonly string[];
325
+ };
326
+ declare abstract class Participant {
327
+ private readonly manifest;
328
+ private handlers;
329
+ protected constructor(manifest: ParticipantManifest, handlers: SituationHandler[]);
330
+ getManifest(): ParticipantManifest;
331
+ getId(): string;
332
+ getHandlers(): SituationHandler[];
333
+ }
334
+
335
+ declare class Memory {
336
+ private readonly context;
337
+ private constructor();
338
+ getContext(): ModelContext;
339
+ static create(): Memory;
340
+ }
341
+
342
+ declare class Agent extends Participant {
343
+ private memory;
344
+ private developerMessage;
345
+ private tools;
346
+ constructor(manifest: ParticipantManifest, developerMessage: string, tools: Tool[], memory: Memory, handlers: SituationHandler[]);
347
+ static create({ name, instruction, tools, capabilities, handlers, }: {
348
+ instruction: string;
349
+ tools: Tool[];
350
+ name: string;
351
+ capabilities: readonly string[];
352
+ handlers: SituationHandler[];
353
+ }): Agent;
354
+ getTools(): Tool[];
355
+ getDeveloperMessage(): string;
356
+ getMemory(): Memory;
357
+ }
358
+
359
+ declare function createAgent({ name, capabilities, instruction, tools, handlers, }: {
360
+ name: string;
361
+ capabilities: readonly string[];
362
+ instruction: string;
363
+ tools: Tool[];
364
+ handlers: SituationHandler[];
365
+ }): Agent;
366
+
367
+ declare class Human extends Participant {
368
+ constructor(manifest: ParticipantManifest, handlers: SituationHandler[]);
369
+ static create({ name, capabilities, handlers, }: {
370
+ name: string;
371
+ capabilities: readonly string[];
372
+ handlers: SituationHandler[];
373
+ }): Human;
374
+ }
375
+
376
+ declare function createHuman({ name, capabilities, handlers, }: {
377
+ name: string;
378
+ capabilities: readonly string[];
379
+ handlers: SituationHandler[];
380
+ }): Human;
381
+
382
+ declare abstract class RuntimeState {
383
+ participants: Map<string, Participant>;
384
+ addParticipant(participant: Participant): void;
385
+ removeParticipant(participant: Participant): void;
386
+ getParticipant(id: string): Participant | undefined;
387
+ getParticipants(): readonly Participant[];
388
+ }
389
+
390
+ declare class EventProcessor {
391
+ process(event: SemanticEvent, consumer: Participant): void;
392
+ }
393
+
394
+ declare class RuntimeService<TRuntimeState extends RuntimeState> {
395
+ readonly state: TRuntimeState;
396
+ private readonly processor;
397
+ private readonly inferenceRunner;
398
+ private readonly functionCallRunner;
399
+ constructor(state: TRuntimeState, processor: EventProcessor, inferenceRunner: InferenceRunner, functionCallRunner: FunctionCallRunner);
400
+ join(participant: Participant): void;
401
+ leave(participant: Participant): void;
402
+ publish(event: SemanticEvent): void;
403
+ getParticipant(id: string): Participant | undefined;
404
+ getInferenceRunner(): InferenceRunner;
405
+ getFunctionCallRunner(): FunctionCallRunner;
406
+ }
407
+
408
+ type InferenceRunnerConfig = {
409
+ supportedModels: GenerativeModel[];
410
+ runner: InferenceRunner;
411
+ };
412
+ declare function defineRuntime<TRuntimeState extends RuntimeState>(): {
413
+ initializeRuntime: (config: {
414
+ state: TRuntimeState;
415
+ inferenceRunnerConfig?: InferenceRunnerConfig;
416
+ }) => RuntimeService<TRuntimeState>;
417
+ resolveRuntime: () => RuntimeService<TRuntimeState>;
418
+ resolveParticipant: (id: string) => Participant;
419
+ join: (participant: Participant) => void;
420
+ leave: (participant: Participant) => void;
421
+ sendMessage: (message: string, senderId: string) => void;
422
+ runLoop: (agentId: string, message: string, inferenceInput: InferenceInput) => void;
423
+ };
424
+
425
+ export { ContextItem, DeveloperMessageItem, type Endpoint, FunctionCallItem, FunctionCallOutputItem, type InferenceInput, type InferenceOutput, InputTokenDetails, McpClient, type McpServerConfig, McpToolRegistry, type McpToolSpec, ModelContext, type ModelContextRepository, ModelMessageItem, OutputTokenDetails, Participant, ReasoningItem, RuntimeState, SemanticEvent, type StructuredOutputFormat, SystemMessageItem, TokenUsage, type Tool, UserMessageItem, createAgent, createHuman, defineRuntime };