agent-swarm-kit 1.1.83 → 1.1.85

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/build/index.cjs CHANGED
@@ -18662,9 +18662,9 @@ const METHOD_NAME$12 = "function.template.navigateToTriageAgent";
18662
18662
  * Will send tool output directly to the model without any additions
18663
18663
  */
18664
18664
  const DEFAULT_EXECUTE_MESSAGE$1 = "";
18665
- const DEFAULT_ACCEPT_FN = (_, defaultAgent) => `Successfully navigated to ${defaultAgent}. Please do not call the navigate tool to ${defaultAgent} during the next answer`;
18665
+ const DEFAULT_ACCEPT_FN = (_, defaultAgent) => `Successfully navigated to ${defaultAgent}. Continue conversation based on the last message.`;
18666
18666
  const DEFAULT_REJECT_FN = (_, defaultAgent) => `Already on ${defaultAgent}. No navigation needed. Continue conversation.`;
18667
- const DEFAULT_LAST_MESSAGE_FN$1 = (_, lastMessage, lastAgent) => `User changed conversation topic. The next message recieved: ${lastMessage}. Continue conversation`;
18667
+ const DEFAULT_LAST_MESSAGE_FN$1 = (_, lastMessage, defaultAgent) => `User changed conversation topic. The next message recieved: ${lastMessage}. Continue conversation based on the last message.`;
18668
18668
  /**
18669
18669
  * Creates a function to navigate to a triage agent for a specific client, handling navigation, message execution, and tool output.
18670
18670
  * The factory generates a handler that checks navigation state, commits tool outputs with accept/reject messages, and triggers execution or emission based on provided parameters.
@@ -18722,7 +18722,7 @@ const createNavigateToTriageAgent = ({ flushMessage, lastMessage: lastMessageFn
18722
18722
  await commitToolOutputForce(toolId, typeof toolOutputAccept === "string"
18723
18723
  ? toolOutputAccept
18724
18724
  : await toolOutputAccept(clientId, defaultAgent), clientId);
18725
- await executeForce(await lastMessageFn(clientId, lastMessage, lastAgent, defaultAgent), clientId);
18725
+ await executeForce(await lastMessageFn(clientId, lastMessage, defaultAgent, lastAgent), clientId);
18726
18726
  return;
18727
18727
  }
18728
18728
  if (flushMessage) {
@@ -18870,7 +18870,7 @@ const DEFAULT_FLUSH_MESSAGE = ({}, {}) => `Sorry, I missed that. Could you repea
18870
18870
  * @param {AgentName} lastAgent - The previous agent name (unused).
18871
18871
  * @returns {string} The last user message.
18872
18872
  */
18873
- const DEFAULT_LAST_MESSAGE_FN = (_, lastMessage, lastAgent) => `User changed conversation topic. The next message recieved: ${lastMessage}. Continue conversation`;
18873
+ const DEFAULT_LAST_MESSAGE_FN = (_, lastMessage, lastAgent) => `User changed conversation topic. The next message recieved: ${lastMessage}. Continue conversation without navigation to ${lastAgent}`;
18874
18874
  /**
18875
18875
  * Creates a function to navigate to a specified agent for a given client, handling navigation, message execution, emission, and tool output.
18876
18876
  * The factory generates a handler that checks navigation state, retrieves the last user message, commits tool outputs, and triggers execution or emission based on provided parameters.
package/build/index.mjs CHANGED
@@ -18660,9 +18660,9 @@ const METHOD_NAME$12 = "function.template.navigateToTriageAgent";
18660
18660
  * Will send tool output directly to the model without any additions
18661
18661
  */
18662
18662
  const DEFAULT_EXECUTE_MESSAGE$1 = "";
18663
- const DEFAULT_ACCEPT_FN = (_, defaultAgent) => `Successfully navigated to ${defaultAgent}. Please do not call the navigate tool to ${defaultAgent} during the next answer`;
18663
+ const DEFAULT_ACCEPT_FN = (_, defaultAgent) => `Successfully navigated to ${defaultAgent}. Continue conversation based on the last message.`;
18664
18664
  const DEFAULT_REJECT_FN = (_, defaultAgent) => `Already on ${defaultAgent}. No navigation needed. Continue conversation.`;
18665
- const DEFAULT_LAST_MESSAGE_FN$1 = (_, lastMessage, lastAgent) => `User changed conversation topic. The next message recieved: ${lastMessage}. Continue conversation`;
18665
+ const DEFAULT_LAST_MESSAGE_FN$1 = (_, lastMessage, defaultAgent) => `User changed conversation topic. The next message recieved: ${lastMessage}. Continue conversation based on the last message.`;
18666
18666
  /**
18667
18667
  * Creates a function to navigate to a triage agent for a specific client, handling navigation, message execution, and tool output.
18668
18668
  * The factory generates a handler that checks navigation state, commits tool outputs with accept/reject messages, and triggers execution or emission based on provided parameters.
@@ -18720,7 +18720,7 @@ const createNavigateToTriageAgent = ({ flushMessage, lastMessage: lastMessageFn
18720
18720
  await commitToolOutputForce(toolId, typeof toolOutputAccept === "string"
18721
18721
  ? toolOutputAccept
18722
18722
  : await toolOutputAccept(clientId, defaultAgent), clientId);
18723
- await executeForce(await lastMessageFn(clientId, lastMessage, lastAgent, defaultAgent), clientId);
18723
+ await executeForce(await lastMessageFn(clientId, lastMessage, defaultAgent, lastAgent), clientId);
18724
18724
  return;
18725
18725
  }
18726
18726
  if (flushMessage) {
@@ -18868,7 +18868,7 @@ const DEFAULT_FLUSH_MESSAGE = ({}, {}) => `Sorry, I missed that. Could you repea
18868
18868
  * @param {AgentName} lastAgent - The previous agent name (unused).
18869
18869
  * @returns {string} The last user message.
18870
18870
  */
18871
- const DEFAULT_LAST_MESSAGE_FN = (_, lastMessage, lastAgent) => `User changed conversation topic. The next message recieved: ${lastMessage}. Continue conversation`;
18871
+ const DEFAULT_LAST_MESSAGE_FN = (_, lastMessage, lastAgent) => `User changed conversation topic. The next message recieved: ${lastMessage}. Continue conversation without navigation to ${lastAgent}`;
18872
18872
  /**
18873
18873
  * Creates a function to navigate to a specified agent for a given client, handling navigation, message execution, emission, and tool output.
18874
18874
  * The factory generates a handler that checks navigation state, retrieves the last user message, commits tool outputs, and triggers execution or emission based on provided parameters.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-swarm-kit",
3
- "version": "1.1.83",
3
+ "version": "1.1.85",
4
4
  "description": "A TypeScript library for building orchestrated framework-agnostic multi-agent AI systems",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",
package/types.d.ts CHANGED
@@ -11123,7 +11123,7 @@ declare const dumpClientPerformance: {
11123
11123
  * };
11124
11124
  */
11125
11125
  interface INavigateToTriageParams {
11126
- lastMessage?: (clientId: string, lastMessage: string | null, lastAgent: AgentName, defaultAgent: AgentName) => string | Promise<string>;
11126
+ lastMessage?: (clientId: string, lastMessage: string | null, defaultAgent: AgentName, lastAgent: AgentName) => string | Promise<string>;
11127
11127
  flushMessage?: string | ((clientId: string, defaultAgent: AgentName) => string | Promise<string>);
11128
11128
  executeMessage?: string | ((clientId: string, defaultAgent: AgentName) => string | Promise<string>);
11129
11129
  toolOutputAccept?: string | ((clientId: string, defaultAgent: AgentName) => string | Promise<string>);