@mozaik-ai/core 3.13.1 → 3.14.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.
- package/README.md +2 -2
- package/dist/index.d.mts +81 -16
- package/dist/index.d.ts +81 -16
- package/dist/index.js +111 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +109 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Mozaik
|
|
2
2
|
|
|
3
|
-
**Mozaik** is TypeScript framework for building
|
|
3
|
+
**Mozaik** is a TypeScript framework for building agentic teams. It enables AI agents to work in parallel, stay aware of each other, and collaborate through event-driven communication.
|
|
4
4
|
|
|
5
5
|
  
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Instead of forcing agents into sequential workflows, Mozaik makes collaboration a first-class concept — creating the foundation for moving from autonomous agents to autonomous teams of AI agents.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
package/dist/index.d.mts
CHANGED
|
@@ -269,6 +269,71 @@ interface ModelContextRepository {
|
|
|
269
269
|
getByProjectId(projectId: string): Promise<ModelContext[]>;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
+
interface McpServerConfig {
|
|
273
|
+
/** The MCP server URL, e.g. https://api.githubcopilot.com/mcp/ */
|
|
274
|
+
url: string;
|
|
275
|
+
/** Bearer token sent as `Authorization: Bearer <token>` (e.g. a GitHub token). */
|
|
276
|
+
authToken?: string;
|
|
277
|
+
/** Extra headers merged into every request (overridden by `authToken` for Authorization). */
|
|
278
|
+
headers?: Record<string, string>;
|
|
279
|
+
/** Client name reported to the server (defaults to "mozaik"). */
|
|
280
|
+
name?: string;
|
|
281
|
+
}
|
|
282
|
+
interface McpToolSpec {
|
|
283
|
+
name: string;
|
|
284
|
+
description: string;
|
|
285
|
+
/** JSON Schema for the tool's arguments (maps 1:1 to FunctionTool.parameters). */
|
|
286
|
+
inputSchema: Record<string, any>;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* A thin wrapper over the MCP TypeScript SDK using the Streamable HTTP transport — what
|
|
290
|
+
* remote MCP servers (e.g. GitHub's `api.githubcopilot.com/mcp/`) speak. One client per
|
|
291
|
+
* server; lazily connects on first use. Infrastructure-only: the domain never sees this.
|
|
292
|
+
*/
|
|
293
|
+
declare class McpClient {
|
|
294
|
+
private readonly config;
|
|
295
|
+
private readonly client;
|
|
296
|
+
private readonly transport;
|
|
297
|
+
private connected;
|
|
298
|
+
constructor(config: McpServerConfig);
|
|
299
|
+
connect(): Promise<void>;
|
|
300
|
+
/** The tools this server exposes. */
|
|
301
|
+
listTools(): Promise<McpToolSpec[]>;
|
|
302
|
+
/** Call a tool by name; returns its text output. Throws if the server flags an error. */
|
|
303
|
+
callTool(name: string, args: Record<string, any>): Promise<string>;
|
|
304
|
+
close(): Promise<void>;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/** The slice of an MCP client the registry needs — lets tests inject a fake. */
|
|
308
|
+
interface McpClientLike {
|
|
309
|
+
listTools(): Promise<Array<{
|
|
310
|
+
name: string;
|
|
311
|
+
description: string;
|
|
312
|
+
inputSchema: Record<string, any>;
|
|
313
|
+
}>>;
|
|
314
|
+
callTool(name: string, args: Record<string, any>): Promise<string>;
|
|
315
|
+
close(): Promise<void>;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Connects to one or more MCP servers and exposes their tools as mozaik `FunctionTool`s.
|
|
319
|
+
* Each tool's `invoke()` proxies the call back to its MCP server. Because they are plain
|
|
320
|
+
* FunctionTools, every provider mapper and the existing function-call loop handle them
|
|
321
|
+
* with no changes — MCP support adds no new tool type and touches no provider code.
|
|
322
|
+
*
|
|
323
|
+
* `strict` is false: MCP servers publish arbitrary JSON Schemas that won't always satisfy
|
|
324
|
+
* a provider's strict function-calling mode.
|
|
325
|
+
*/
|
|
326
|
+
declare class McpToolRegistry {
|
|
327
|
+
private readonly servers;
|
|
328
|
+
private readonly createClient;
|
|
329
|
+
private readonly clients;
|
|
330
|
+
constructor(servers: McpServerConfig[], createClient?: (config: McpServerConfig) => McpClientLike);
|
|
331
|
+
/** Discover every tool across the configured servers, as FunctionTools ready to pass to a model. */
|
|
332
|
+
discoverTools(): Promise<FunctionTool[]>;
|
|
333
|
+
/** Close all underlying MCP connections. */
|
|
334
|
+
close(): Promise<void>;
|
|
335
|
+
}
|
|
336
|
+
|
|
272
337
|
declare class InMemoryModelContextRepository implements ModelContextRepository {
|
|
273
338
|
private readonly store;
|
|
274
339
|
private readonly projectIndex;
|
|
@@ -290,27 +355,27 @@ declare class SystemMessageItem extends ContextItem {
|
|
|
290
355
|
}
|
|
291
356
|
|
|
292
357
|
declare class BaseParticipant extends Participant {
|
|
293
|
-
onFunctionCall(
|
|
294
|
-
onExternalFunctionCall(
|
|
295
|
-
onFunctionCallOutput(
|
|
296
|
-
onExternalFunctionCallOutput(
|
|
297
|
-
onReasoning(
|
|
298
|
-
onExternalReasoning(
|
|
299
|
-
onModelMessage(
|
|
300
|
-
onExternalModelMessage(
|
|
301
|
-
onMessage(
|
|
358
|
+
onFunctionCall(_item: FunctionCallItem): void;
|
|
359
|
+
onExternalFunctionCall(_source: Participant, _item: FunctionCallItem): void;
|
|
360
|
+
onFunctionCallOutput(_item: FunctionCallOutputItem): void;
|
|
361
|
+
onExternalFunctionCallOutput(_source: Participant, _item: FunctionCallOutputItem): void;
|
|
362
|
+
onReasoning(_item: ReasoningItem): void;
|
|
363
|
+
onExternalReasoning(_source: Participant, _item: ReasoningItem): void;
|
|
364
|
+
onModelMessage(_item: ModelMessageItem): void;
|
|
365
|
+
onExternalModelMessage(_source: Participant, _item: ModelMessageItem): void;
|
|
366
|
+
onMessage(_message: string): void;
|
|
302
367
|
onJoined(): void;
|
|
303
368
|
onLeft(): void;
|
|
304
|
-
onParticipantJoined(
|
|
305
|
-
onParticipantLeft(
|
|
306
|
-
onInternalEvent(
|
|
307
|
-
onExternalEvent(
|
|
308
|
-
onError(
|
|
309
|
-
onParticipantError(
|
|
369
|
+
onParticipantJoined(_participant: Participant): void;
|
|
370
|
+
onParticipantLeft(_participant: Participant): void;
|
|
371
|
+
onInternalEvent(_item: SemanticEvent<unknown>): void;
|
|
372
|
+
onExternalEvent(_source: Participant, _item: SemanticEvent<unknown>): void;
|
|
373
|
+
onError(_error: AgenticError): void;
|
|
374
|
+
onParticipantError(_source: Participant, _error: AgenticError): void;
|
|
310
375
|
}
|
|
311
376
|
|
|
312
377
|
declare const runInference: (inferenceParams: InferenceParams<ModelName>) => void;
|
|
313
378
|
declare const executeFunctionCall: (environment: AgenticEnvironment, functionCallItem: FunctionCallItem, tool: Tool, caller: Participant) => void;
|
|
314
379
|
declare const sendMessage: (environment: AgenticEnvironment, message: string, caller: Participant) => void;
|
|
315
380
|
|
|
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 };
|
|
381
|
+
export { AgenticEnvironment, AgenticError, BaseParticipant, ContextItem, DeveloperMessageItem, type Endpoint, FunctionCallItem, FunctionCallOutputItem, InMemoryModelContextRepository, type InferenceParams, InferenceResponse, InputTokenDetails, McpClient, type McpServerConfig, McpToolRegistry, type McpToolSpec, ModelContext, type ModelContextRepository, ModelMessageItem, type ModelName, OutputTokenDetails, Participant, ReasoningItem, SemanticEvent, type StructuredOutputFormat, SystemMessageItem, TokenUsage, type Tool, UserMessageItem, executeFunctionCall, runInference, sendMessage };
|
package/dist/index.d.ts
CHANGED
|
@@ -269,6 +269,71 @@ interface ModelContextRepository {
|
|
|
269
269
|
getByProjectId(projectId: string): Promise<ModelContext[]>;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
+
interface McpServerConfig {
|
|
273
|
+
/** The MCP server URL, e.g. https://api.githubcopilot.com/mcp/ */
|
|
274
|
+
url: string;
|
|
275
|
+
/** Bearer token sent as `Authorization: Bearer <token>` (e.g. a GitHub token). */
|
|
276
|
+
authToken?: string;
|
|
277
|
+
/** Extra headers merged into every request (overridden by `authToken` for Authorization). */
|
|
278
|
+
headers?: Record<string, string>;
|
|
279
|
+
/** Client name reported to the server (defaults to "mozaik"). */
|
|
280
|
+
name?: string;
|
|
281
|
+
}
|
|
282
|
+
interface McpToolSpec {
|
|
283
|
+
name: string;
|
|
284
|
+
description: string;
|
|
285
|
+
/** JSON Schema for the tool's arguments (maps 1:1 to FunctionTool.parameters). */
|
|
286
|
+
inputSchema: Record<string, any>;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* A thin wrapper over the MCP TypeScript SDK using the Streamable HTTP transport — what
|
|
290
|
+
* remote MCP servers (e.g. GitHub's `api.githubcopilot.com/mcp/`) speak. One client per
|
|
291
|
+
* server; lazily connects on first use. Infrastructure-only: the domain never sees this.
|
|
292
|
+
*/
|
|
293
|
+
declare class McpClient {
|
|
294
|
+
private readonly config;
|
|
295
|
+
private readonly client;
|
|
296
|
+
private readonly transport;
|
|
297
|
+
private connected;
|
|
298
|
+
constructor(config: McpServerConfig);
|
|
299
|
+
connect(): Promise<void>;
|
|
300
|
+
/** The tools this server exposes. */
|
|
301
|
+
listTools(): Promise<McpToolSpec[]>;
|
|
302
|
+
/** Call a tool by name; returns its text output. Throws if the server flags an error. */
|
|
303
|
+
callTool(name: string, args: Record<string, any>): Promise<string>;
|
|
304
|
+
close(): Promise<void>;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/** The slice of an MCP client the registry needs — lets tests inject a fake. */
|
|
308
|
+
interface McpClientLike {
|
|
309
|
+
listTools(): Promise<Array<{
|
|
310
|
+
name: string;
|
|
311
|
+
description: string;
|
|
312
|
+
inputSchema: Record<string, any>;
|
|
313
|
+
}>>;
|
|
314
|
+
callTool(name: string, args: Record<string, any>): Promise<string>;
|
|
315
|
+
close(): Promise<void>;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Connects to one or more MCP servers and exposes their tools as mozaik `FunctionTool`s.
|
|
319
|
+
* Each tool's `invoke()` proxies the call back to its MCP server. Because they are plain
|
|
320
|
+
* FunctionTools, every provider mapper and the existing function-call loop handle them
|
|
321
|
+
* with no changes — MCP support adds no new tool type and touches no provider code.
|
|
322
|
+
*
|
|
323
|
+
* `strict` is false: MCP servers publish arbitrary JSON Schemas that won't always satisfy
|
|
324
|
+
* a provider's strict function-calling mode.
|
|
325
|
+
*/
|
|
326
|
+
declare class McpToolRegistry {
|
|
327
|
+
private readonly servers;
|
|
328
|
+
private readonly createClient;
|
|
329
|
+
private readonly clients;
|
|
330
|
+
constructor(servers: McpServerConfig[], createClient?: (config: McpServerConfig) => McpClientLike);
|
|
331
|
+
/** Discover every tool across the configured servers, as FunctionTools ready to pass to a model. */
|
|
332
|
+
discoverTools(): Promise<FunctionTool[]>;
|
|
333
|
+
/** Close all underlying MCP connections. */
|
|
334
|
+
close(): Promise<void>;
|
|
335
|
+
}
|
|
336
|
+
|
|
272
337
|
declare class InMemoryModelContextRepository implements ModelContextRepository {
|
|
273
338
|
private readonly store;
|
|
274
339
|
private readonly projectIndex;
|
|
@@ -290,27 +355,27 @@ declare class SystemMessageItem extends ContextItem {
|
|
|
290
355
|
}
|
|
291
356
|
|
|
292
357
|
declare class BaseParticipant extends Participant {
|
|
293
|
-
onFunctionCall(
|
|
294
|
-
onExternalFunctionCall(
|
|
295
|
-
onFunctionCallOutput(
|
|
296
|
-
onExternalFunctionCallOutput(
|
|
297
|
-
onReasoning(
|
|
298
|
-
onExternalReasoning(
|
|
299
|
-
onModelMessage(
|
|
300
|
-
onExternalModelMessage(
|
|
301
|
-
onMessage(
|
|
358
|
+
onFunctionCall(_item: FunctionCallItem): void;
|
|
359
|
+
onExternalFunctionCall(_source: Participant, _item: FunctionCallItem): void;
|
|
360
|
+
onFunctionCallOutput(_item: FunctionCallOutputItem): void;
|
|
361
|
+
onExternalFunctionCallOutput(_source: Participant, _item: FunctionCallOutputItem): void;
|
|
362
|
+
onReasoning(_item: ReasoningItem): void;
|
|
363
|
+
onExternalReasoning(_source: Participant, _item: ReasoningItem): void;
|
|
364
|
+
onModelMessage(_item: ModelMessageItem): void;
|
|
365
|
+
onExternalModelMessage(_source: Participant, _item: ModelMessageItem): void;
|
|
366
|
+
onMessage(_message: string): void;
|
|
302
367
|
onJoined(): void;
|
|
303
368
|
onLeft(): void;
|
|
304
|
-
onParticipantJoined(
|
|
305
|
-
onParticipantLeft(
|
|
306
|
-
onInternalEvent(
|
|
307
|
-
onExternalEvent(
|
|
308
|
-
onError(
|
|
309
|
-
onParticipantError(
|
|
369
|
+
onParticipantJoined(_participant: Participant): void;
|
|
370
|
+
onParticipantLeft(_participant: Participant): void;
|
|
371
|
+
onInternalEvent(_item: SemanticEvent<unknown>): void;
|
|
372
|
+
onExternalEvent(_source: Participant, _item: SemanticEvent<unknown>): void;
|
|
373
|
+
onError(_error: AgenticError): void;
|
|
374
|
+
onParticipantError(_source: Participant, _error: AgenticError): void;
|
|
310
375
|
}
|
|
311
376
|
|
|
312
377
|
declare const runInference: (inferenceParams: InferenceParams<ModelName>) => void;
|
|
313
378
|
declare const executeFunctionCall: (environment: AgenticEnvironment, functionCallItem: FunctionCallItem, tool: Tool, caller: Participant) => void;
|
|
314
379
|
declare const sendMessage: (environment: AgenticEnvironment, message: string, caller: Participant) => void;
|
|
315
380
|
|
|
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 };
|
|
381
|
+
export { AgenticEnvironment, AgenticError, BaseParticipant, ContextItem, DeveloperMessageItem, type Endpoint, FunctionCallItem, FunctionCallOutputItem, InMemoryModelContextRepository, type InferenceParams, InferenceResponse, InputTokenDetails, McpClient, type McpServerConfig, McpToolRegistry, type McpToolSpec, ModelContext, type ModelContextRepository, ModelMessageItem, type ModelName, OutputTokenDetails, Participant, ReasoningItem, SemanticEvent, type StructuredOutputFormat, SystemMessageItem, TokenUsage, type Tool, UserMessageItem, executeFunctionCall, runInference, sendMessage };
|
package/dist/index.js
CHANGED
|
@@ -40,6 +40,8 @@ __export(index_exports, {
|
|
|
40
40
|
InMemoryModelContextRepository: () => InMemoryModelContextRepository,
|
|
41
41
|
InferenceResponse: () => InferenceResponse,
|
|
42
42
|
InputTokenDetails: () => InputTokenDetails,
|
|
43
|
+
McpClient: () => McpClient,
|
|
44
|
+
McpToolRegistry: () => McpToolRegistry,
|
|
43
45
|
ModelContext: () => ModelContext,
|
|
44
46
|
ModelMessageItem: () => ModelMessageItem,
|
|
45
47
|
OutputTokenDetails: () => OutputTokenDetails,
|
|
@@ -261,6 +263,98 @@ var TokenUsage = class {
|
|
|
261
263
|
}
|
|
262
264
|
};
|
|
263
265
|
|
|
266
|
+
// src/infrastructure/mcp/mcp-client.ts
|
|
267
|
+
var import_client = require("@modelcontextprotocol/sdk/client/index.js");
|
|
268
|
+
var import_streamableHttp = require("@modelcontextprotocol/sdk/client/streamableHttp.js");
|
|
269
|
+
var McpClient = class {
|
|
270
|
+
constructor(config) {
|
|
271
|
+
this.config = config;
|
|
272
|
+
this.connected = false;
|
|
273
|
+
var _a, _b;
|
|
274
|
+
const headers = { ...(_a = config.headers) != null ? _a : {} };
|
|
275
|
+
if (config.authToken) headers.Authorization = `Bearer ${config.authToken}`;
|
|
276
|
+
this.transport = new import_streamableHttp.StreamableHTTPClientTransport(
|
|
277
|
+
new URL(config.url),
|
|
278
|
+
Object.keys(headers).length > 0 ? { requestInit: { headers } } : void 0
|
|
279
|
+
);
|
|
280
|
+
this.client = new import_client.Client({ name: (_b = config.name) != null ? _b : "mozaik", version: "1.0.0" }, { capabilities: {} });
|
|
281
|
+
}
|
|
282
|
+
async connect() {
|
|
283
|
+
if (this.connected) return;
|
|
284
|
+
await this.client.connect(this.transport);
|
|
285
|
+
this.connected = true;
|
|
286
|
+
}
|
|
287
|
+
/** The tools this server exposes. */
|
|
288
|
+
async listTools() {
|
|
289
|
+
var _a;
|
|
290
|
+
await this.connect();
|
|
291
|
+
const res = await this.client.listTools();
|
|
292
|
+
return ((_a = res.tools) != null ? _a : []).map((t) => {
|
|
293
|
+
var _a2, _b;
|
|
294
|
+
return {
|
|
295
|
+
name: t.name,
|
|
296
|
+
description: (_a2 = t.description) != null ? _a2 : "",
|
|
297
|
+
inputSchema: (_b = t.inputSchema) != null ? _b : { type: "object", properties: {} }
|
|
298
|
+
};
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
/** Call a tool by name; returns its text output. Throws if the server flags an error. */
|
|
302
|
+
async callTool(name, args) {
|
|
303
|
+
await this.connect();
|
|
304
|
+
const res = await this.client.callTool({ name, arguments: args != null ? args : {} });
|
|
305
|
+
const text = extractText(res);
|
|
306
|
+
if (res.isError) {
|
|
307
|
+
throw new Error(`MCP tool "${name}" failed: ${text || "unknown error"}`);
|
|
308
|
+
}
|
|
309
|
+
return text;
|
|
310
|
+
}
|
|
311
|
+
async close() {
|
|
312
|
+
if (!this.connected) return;
|
|
313
|
+
try {
|
|
314
|
+
await this.client.close();
|
|
315
|
+
} catch (e) {
|
|
316
|
+
}
|
|
317
|
+
this.connected = false;
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
function extractText(res) {
|
|
321
|
+
const content = res.content;
|
|
322
|
+
if (!Array.isArray(content)) return "";
|
|
323
|
+
return content.filter((c) => (c == null ? void 0 : c.type) === "text" && typeof c.text === "string").map((c) => c.text).join("\n");
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// src/infrastructure/mcp/mcp-tool-registry.ts
|
|
327
|
+
var McpToolRegistry = class {
|
|
328
|
+
constructor(servers, createClient = (config) => new McpClient(config)) {
|
|
329
|
+
this.servers = servers;
|
|
330
|
+
this.createClient = createClient;
|
|
331
|
+
this.clients = [];
|
|
332
|
+
}
|
|
333
|
+
/** Discover every tool across the configured servers, as FunctionTools ready to pass to a model. */
|
|
334
|
+
async discoverTools() {
|
|
335
|
+
const tools = [];
|
|
336
|
+
for (const server of this.servers) {
|
|
337
|
+
const client = this.createClient(server);
|
|
338
|
+
this.clients.push(client);
|
|
339
|
+
for (const spec of await client.listTools()) {
|
|
340
|
+
tools.push({
|
|
341
|
+
type: "function",
|
|
342
|
+
name: spec.name,
|
|
343
|
+
description: spec.description,
|
|
344
|
+
parameters: spec.inputSchema,
|
|
345
|
+
strict: false,
|
|
346
|
+
invoke: (args) => client.callTool(spec.name, args != null ? args : {})
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return tools;
|
|
351
|
+
}
|
|
352
|
+
/** Close all underlying MCP connections. */
|
|
353
|
+
async close() {
|
|
354
|
+
await Promise.all(this.clients.map((c) => c.close()));
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
|
|
264
358
|
// src/infrastructure/repository/in-memory-model-context-repository.ts
|
|
265
359
|
var InMemoryModelContextRepository = class {
|
|
266
360
|
constructor() {
|
|
@@ -623,39 +717,39 @@ var FunctionCallRunner = class {
|
|
|
623
717
|
|
|
624
718
|
// src/application/participants/participant.ts
|
|
625
719
|
var BaseParticipant = class extends Participant {
|
|
626
|
-
onFunctionCall(
|
|
720
|
+
onFunctionCall(_item) {
|
|
627
721
|
}
|
|
628
|
-
onExternalFunctionCall(
|
|
722
|
+
onExternalFunctionCall(_source, _item) {
|
|
629
723
|
}
|
|
630
|
-
onFunctionCallOutput(
|
|
724
|
+
onFunctionCallOutput(_item) {
|
|
631
725
|
}
|
|
632
|
-
onExternalFunctionCallOutput(
|
|
726
|
+
onExternalFunctionCallOutput(_source, _item) {
|
|
633
727
|
}
|
|
634
|
-
onReasoning(
|
|
728
|
+
onReasoning(_item) {
|
|
635
729
|
}
|
|
636
|
-
onExternalReasoning(
|
|
730
|
+
onExternalReasoning(_source, _item) {
|
|
637
731
|
}
|
|
638
|
-
onModelMessage(
|
|
732
|
+
onModelMessage(_item) {
|
|
639
733
|
}
|
|
640
|
-
onExternalModelMessage(
|
|
734
|
+
onExternalModelMessage(_source, _item) {
|
|
641
735
|
}
|
|
642
|
-
onMessage(
|
|
736
|
+
onMessage(_message) {
|
|
643
737
|
}
|
|
644
738
|
onJoined() {
|
|
645
739
|
}
|
|
646
740
|
onLeft() {
|
|
647
741
|
}
|
|
648
|
-
onParticipantJoined(
|
|
742
|
+
onParticipantJoined(_participant) {
|
|
649
743
|
}
|
|
650
|
-
onParticipantLeft(
|
|
744
|
+
onParticipantLeft(_participant) {
|
|
651
745
|
}
|
|
652
|
-
onInternalEvent(
|
|
746
|
+
onInternalEvent(_item) {
|
|
653
747
|
}
|
|
654
|
-
onExternalEvent(
|
|
748
|
+
onExternalEvent(_source, _item) {
|
|
655
749
|
}
|
|
656
|
-
onError(
|
|
750
|
+
onError(_error) {
|
|
657
751
|
}
|
|
658
|
-
onParticipantError(
|
|
752
|
+
onParticipantError(_source, _error) {
|
|
659
753
|
}
|
|
660
754
|
};
|
|
661
755
|
|
|
@@ -1816,6 +1910,8 @@ var sendMessage = (environment, message, caller) => {
|
|
|
1816
1910
|
InMemoryModelContextRepository,
|
|
1817
1911
|
InferenceResponse,
|
|
1818
1912
|
InputTokenDetails,
|
|
1913
|
+
McpClient,
|
|
1914
|
+
McpToolRegistry,
|
|
1819
1915
|
ModelContext,
|
|
1820
1916
|
ModelMessageItem,
|
|
1821
1917
|
OutputTokenDetails,
|