@mozaik-ai/core 4.0.0-beta.1 → 4.0.0-beta.3
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 +96 -1
- package/dist/index.d.ts +96 -1
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1953,6 +1953,18 @@ var DefaultFunctionCallRunner = class {
|
|
|
1953
1953
|
}
|
|
1954
1954
|
};
|
|
1955
1955
|
|
|
1956
|
+
// src/application/use-cases/send-event.ts
|
|
1957
|
+
function createSendEvent(resolveRuntime) {
|
|
1958
|
+
return function sendEvent(event, senderId) {
|
|
1959
|
+
const runtime = resolveRuntime();
|
|
1960
|
+
const participant = runtime.getParticipant(senderId);
|
|
1961
|
+
if (!participant) {
|
|
1962
|
+
throw new Error(`Participant ${senderId} not found`);
|
|
1963
|
+
}
|
|
1964
|
+
runtime.publish(event);
|
|
1965
|
+
};
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1956
1968
|
// src/define-runtime.ts
|
|
1957
1969
|
function defineRuntime() {
|
|
1958
1970
|
let runtime = null;
|
|
@@ -1989,6 +2001,7 @@ function defineRuntime() {
|
|
|
1989
2001
|
const join = createJoin(resolveRuntime);
|
|
1990
2002
|
const leave = createLeave(resolveRuntime);
|
|
1991
2003
|
const sendMessage = createSendMessage(resolveRuntime);
|
|
2004
|
+
const sendEvent = createSendEvent(resolveRuntime);
|
|
1992
2005
|
const runLoop = createRunLoop(resolveRuntime);
|
|
1993
2006
|
return {
|
|
1994
2007
|
initializeRuntime,
|
|
@@ -1997,19 +2010,24 @@ function defineRuntime() {
|
|
|
1997
2010
|
join,
|
|
1998
2011
|
leave,
|
|
1999
2012
|
sendMessage,
|
|
2013
|
+
sendEvent,
|
|
2000
2014
|
runLoop
|
|
2001
2015
|
};
|
|
2002
2016
|
}
|
|
2003
2017
|
export {
|
|
2018
|
+
AnthropicMessages,
|
|
2004
2019
|
ContextItem,
|
|
2005
2020
|
DeveloperMessageItem,
|
|
2006
2021
|
FunctionCallItem,
|
|
2007
2022
|
FunctionCallOutputItem,
|
|
2023
|
+
GeminiGenerateContent,
|
|
2008
2024
|
InputTokenDetails,
|
|
2009
2025
|
McpClient,
|
|
2010
2026
|
McpToolRegistry,
|
|
2011
2027
|
ModelContext,
|
|
2012
2028
|
ModelMessageItem,
|
|
2029
|
+
OpenAIChatCompletions,
|
|
2030
|
+
OpenAIResponses,
|
|
2013
2031
|
OutputTokenDetails,
|
|
2014
2032
|
Participant,
|
|
2015
2033
|
ReasoningItem,
|
|
@@ -2020,6 +2038,7 @@ export {
|
|
|
2020
2038
|
UserMessageItem,
|
|
2021
2039
|
createAgent,
|
|
2022
2040
|
createHuman,
|
|
2023
|
-
defineRuntime
|
|
2041
|
+
defineRuntime,
|
|
2042
|
+
supportedModels
|
|
2024
2043
|
};
|
|
2025
2044
|
//# sourceMappingURL=index.mjs.map
|