agent-swarm-kit 1.1.82 → 1.1.83

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,7 +18662,7 @@ 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}. IMPORTANT NOT TO CALL NAVIGATIONS DURING THE NEXT ANSWER`;
18665
+ const DEFAULT_ACCEPT_FN = (_, defaultAgent) => `Successfully navigated to ${defaultAgent}. Please do not call the navigate tool to ${defaultAgent} during the next answer`;
18666
18666
  const DEFAULT_REJECT_FN = (_, defaultAgent) => `Already on ${defaultAgent}. No navigation needed. Continue conversation.`;
18667
18667
  const DEFAULT_LAST_MESSAGE_FN$1 = (_, lastMessage, lastAgent) => `User changed conversation topic. The next message recieved: ${lastMessage}. Continue conversation`;
18668
18668
  /**
@@ -18852,7 +18852,7 @@ const DEFAULT_EXECUTE_MESSAGE = "";
18852
18852
  * @param {AgentName} agentName - The name of the agent navigated to.
18853
18853
  * @returns {string} A message confirming navigation to the agent.
18854
18854
  */
18855
- const DEFAULT_TOOL_OUTPUT = (_, agentName) => `Successfully navigated to ${agentName}. IMPORTANT NOT TO CALL NAVIGATIONS DURING THE NEXT ANSWER`;
18855
+ const DEFAULT_TOOL_OUTPUT = (_, lastAgent, agentName) => `Successfully navigated from ${lastAgent} to ${agentName}. Please do not call the navigate tool to ${lastAgent} during the next answer`;
18856
18856
  /**
18857
18857
  * Default flush message prompting the user to repeat their input.
18858
18858
  *
@@ -18926,7 +18926,7 @@ const createNavigateToAgent = ({ lastMessage: lastMessageFn = DEFAULT_LAST_MESSA
18926
18926
  if (await functoolsKit.and(functoolsKit.not(hasNavigation(clientId, agentName)), Promise.resolve(!emitMessage))) {
18927
18927
  await commitToolOutputForce(toolId, typeof toolOutput === "string"
18928
18928
  ? toolOutput
18929
- : await toolOutput(clientId, agentName), clientId);
18929
+ : await toolOutput(clientId, lastAgent, agentName), clientId);
18930
18930
  await changeToAgent(agentName, clientId);
18931
18931
  await executeForce(typeof executeMessage === "string"
18932
18932
  ? executeMessage
@@ -18936,7 +18936,7 @@ const createNavigateToAgent = ({ lastMessage: lastMessageFn = DEFAULT_LAST_MESSA
18936
18936
  if (await functoolsKit.and(functoolsKit.not(hasNavigation(clientId, agentName)), Promise.resolve(!!emitMessage))) {
18937
18937
  await commitToolOutputForce(toolId, typeof toolOutput === "string"
18938
18938
  ? toolOutput
18939
- : await toolOutput(clientId, agentName), clientId);
18939
+ : await toolOutput(clientId, lastAgent, agentName), clientId);
18940
18940
  await changeToAgent(agentName, clientId);
18941
18941
  await emitForce(typeof emitMessage === "string"
18942
18942
  ? emitMessage
package/build/index.mjs CHANGED
@@ -18660,7 +18660,7 @@ 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}. IMPORTANT NOT TO CALL NAVIGATIONS DURING THE NEXT ANSWER`;
18663
+ const DEFAULT_ACCEPT_FN = (_, defaultAgent) => `Successfully navigated to ${defaultAgent}. Please do not call the navigate tool to ${defaultAgent} during the next answer`;
18664
18664
  const DEFAULT_REJECT_FN = (_, defaultAgent) => `Already on ${defaultAgent}. No navigation needed. Continue conversation.`;
18665
18665
  const DEFAULT_LAST_MESSAGE_FN$1 = (_, lastMessage, lastAgent) => `User changed conversation topic. The next message recieved: ${lastMessage}. Continue conversation`;
18666
18666
  /**
@@ -18850,7 +18850,7 @@ const DEFAULT_EXECUTE_MESSAGE = "";
18850
18850
  * @param {AgentName} agentName - The name of the agent navigated to.
18851
18851
  * @returns {string} A message confirming navigation to the agent.
18852
18852
  */
18853
- const DEFAULT_TOOL_OUTPUT = (_, agentName) => `Successfully navigated to ${agentName}. IMPORTANT NOT TO CALL NAVIGATIONS DURING THE NEXT ANSWER`;
18853
+ const DEFAULT_TOOL_OUTPUT = (_, lastAgent, agentName) => `Successfully navigated from ${lastAgent} to ${agentName}. Please do not call the navigate tool to ${lastAgent} during the next answer`;
18854
18854
  /**
18855
18855
  * Default flush message prompting the user to repeat their input.
18856
18856
  *
@@ -18924,7 +18924,7 @@ const createNavigateToAgent = ({ lastMessage: lastMessageFn = DEFAULT_LAST_MESSA
18924
18924
  if (await and(not(hasNavigation(clientId, agentName)), Promise.resolve(!emitMessage))) {
18925
18925
  await commitToolOutputForce(toolId, typeof toolOutput === "string"
18926
18926
  ? toolOutput
18927
- : await toolOutput(clientId, agentName), clientId);
18927
+ : await toolOutput(clientId, lastAgent, agentName), clientId);
18928
18928
  await changeToAgent(agentName, clientId);
18929
18929
  await executeForce(typeof executeMessage === "string"
18930
18930
  ? executeMessage
@@ -18934,7 +18934,7 @@ const createNavigateToAgent = ({ lastMessage: lastMessageFn = DEFAULT_LAST_MESSA
18934
18934
  if (await and(not(hasNavigation(clientId, agentName)), Promise.resolve(!!emitMessage))) {
18935
18935
  await commitToolOutputForce(toolId, typeof toolOutput === "string"
18936
18936
  ? toolOutput
18937
- : await toolOutput(clientId, agentName), clientId);
18937
+ : await toolOutput(clientId, lastAgent, agentName), clientId);
18938
18938
  await changeToAgent(agentName, clientId);
18939
18939
  await emitForce(typeof emitMessage === "string"
18940
18940
  ? emitMessage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-swarm-kit",
3
- "version": "1.1.82",
3
+ "version": "1.1.83",
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
@@ -11189,7 +11189,7 @@ declare const createNavigateToTriageAgent: ({ flushMessage, lastMessage: lastMes
11189
11189
  */
11190
11190
  interface INavigateToAgentParams {
11191
11191
  flushMessage?: string | ((clientId: string, defaultAgent: AgentName) => string | Promise<string>);
11192
- toolOutput?: string | ((clientId: string, agentName: AgentName) => string | Promise<string>);
11192
+ toolOutput?: string | ((clientId: string, lastAgent: AgentName, agentName: AgentName) => string | Promise<string>);
11193
11193
  lastMessage?: (clientId: string, lastMessage: string | null, lastAgent: AgentName, agentName: AgentName) => string | Promise<string>;
11194
11194
  emitMessage?: string | ((clientId: string, lastMessage: string, lastAgent: string, agentName: AgentName) => string | Promise<string>);
11195
11195
  executeMessage?: string | ((clientId: string, lastMessage: string, lastAgent: string, agentName: AgentName) => string | Promise<string>);