agent-swarm-kit 1.0.207 → 1.0.209

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 CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Unleash the power of collaborative AI with `agent-swarm-kit`! This library empowers you to create intelligent, modular agent networks that work together seamlessly—perfect for automating workflows, solving complex problems, or designing next-gen AI systems. With a simple API, robust validation, and flexible architecture, it’s your toolkit for building smarter solutions, faster.
6
6
 
7
- 📚 **[Full Documentation](https://agent-swarm.github.io/documents/agent-swarm-kit.html)** | 🌟 **[Try It Now](https://github.com/tripolskypetr/agent-swarm-kit/blob/master/demo/repl-phone-seller/src/logic/agent/sales.agent.ts)**
7
+ 📚 **[Full Documentation](https://agent-swarm.github.io/documents/docs_agent-swarm-kit.html)** | 🌟 **[Try It Now](https://github.com/tripolskypetr/agent-swarm-kit/blob/master/demo/repl-phone-seller/src/logic/agent/sales.agent.ts)**
8
8
 
9
9
  ![Agent Swarm Schema](https://raw.githubusercontent.com/tripolskypetr/agent-swarm-kit/master/schema.png)
10
10
 
@@ -205,7 +205,7 @@ complete("I need a refund!").then(console.log);
205
205
  - **`addTool`**: Create reusable tools with validation and execution logic.
206
206
  - **`Storage.take`**: Search and retrieve data using embeddings (e.g., vector search, RAG).
207
207
 
208
- Check out the **[API Reference](https://agent-swarm.github.io/documents/agent-swarm-kit.html)** for more!
208
+ Check out the **[API Reference](https://agent-swarm.github.io/documents/docs_agent-swarm-kit.html)** for more!
209
209
 
210
210
  ---
211
211
 
package/build/index.cjs CHANGED
@@ -10609,6 +10609,16 @@ class DocService {
10609
10609
  swarmSchema,
10610
10610
  });
10611
10611
  const result = [];
10612
+ {
10613
+ result.push("---");
10614
+ result.push(`title: ${swarmSchema.swarmName}.md`);
10615
+ result.push(`children:`);
10616
+ swarmSchema.agentList.forEach((agentName) => {
10617
+ result.push(` - ./agent/${agentName}.md`);
10618
+ });
10619
+ result.push("---");
10620
+ result.push("");
10621
+ }
10612
10622
  {
10613
10623
  result.push(`# ${swarmSchema.swarmName}`);
10614
10624
  if (swarmSchema.docDescription) {
@@ -10702,6 +10712,12 @@ class DocService {
10702
10712
  agentSchema,
10703
10713
  });
10704
10714
  const result = [];
10715
+ {
10716
+ result.push("---");
10717
+ result.push(`title: ${agentSchema.agentName}.md`);
10718
+ result.push("---");
10719
+ result.push("");
10720
+ }
10705
10721
  {
10706
10722
  result.push(`# ${agentSchema.agentName}`);
10707
10723
  if (agentSchema.docDescription) {
@@ -17908,7 +17924,6 @@ const Utils = {
17908
17924
 
17909
17925
  exports.Adapter = Adapter;
17910
17926
  exports.Chat = Chat;
17911
- exports.ChatInstance = ChatInstance;
17912
17927
  exports.ExecutionContextService = ExecutionContextService;
17913
17928
  exports.History = History;
17914
17929
  exports.HistoryMemoryInstance = HistoryMemoryInstance;
package/build/index.mjs CHANGED
@@ -10607,6 +10607,16 @@ class DocService {
10607
10607
  swarmSchema,
10608
10608
  });
10609
10609
  const result = [];
10610
+ {
10611
+ result.push("---");
10612
+ result.push(`title: ${swarmSchema.swarmName}.md`);
10613
+ result.push(`children:`);
10614
+ swarmSchema.agentList.forEach((agentName) => {
10615
+ result.push(` - ./agent/${agentName}.md`);
10616
+ });
10617
+ result.push("---");
10618
+ result.push("");
10619
+ }
10610
10620
  {
10611
10621
  result.push(`# ${swarmSchema.swarmName}`);
10612
10622
  if (swarmSchema.docDescription) {
@@ -10700,6 +10710,12 @@ class DocService {
10700
10710
  agentSchema,
10701
10711
  });
10702
10712
  const result = [];
10713
+ {
10714
+ result.push("---");
10715
+ result.push(`title: ${agentSchema.agentName}.md`);
10716
+ result.push("---");
10717
+ result.push("");
10718
+ }
10703
10719
  {
10704
10720
  result.push(`# ${agentSchema.agentName}`);
10705
10721
  if (agentSchema.docDescription) {
@@ -17904,4 +17920,4 @@ const Utils = {
17904
17920
  PersistEmbeddingUtils,
17905
17921
  };
17906
17922
 
17907
- export { Adapter, Chat, ChatInstance, ExecutionContextService, History, HistoryMemoryInstance, HistoryPersistInstance, Logger, LoggerInstance, MethodContextService, PayloadContextService, PersistAlive, PersistBase, PersistEmbedding, PersistList, PersistMemory, PersistPolicy, PersistState, PersistStorage, PersistSwarm, Policy, RoundRobin, Schema, SharedState, SharedStorage, State, Storage, Utils, addAgent, addCompletion, addEmbedding, addPolicy, addState, addStorage, addSwarm, addTool, beginContext, cancelOutput, cancelOutputForce, changeToAgent, changeToDefaultAgent, changeToPrevAgent, commitAssistantMessage, commitAssistantMessageForce, commitFlush, commitFlushForce, commitStopTools, commitStopToolsForce, commitSystemMessage, commitSystemMessageForce, commitToolOutput, commitToolOutputForce, commitUserMessage, commitUserMessageForce, complete, disposeConnection, dumpAgent, dumpClientPerformance, dumpDocs, dumpPerfomance, dumpSwarm, emit, emitForce, event, execute, executeForce, getAgentHistory, getAgentName, getAssistantHistory, getLastAssistantMessage, getLastSystemMessage, getLastUserMessage, getPayload, getRawHistory, getSessionContext, getSessionMode, getUserHistory, hasSession, listenAgentEvent, listenAgentEventOnce, listenEvent, listenEventOnce, listenExecutionEvent, listenExecutionEventOnce, listenHistoryEvent, listenHistoryEventOnce, listenPolicyEvent, listenPolicyEventOnce, listenSessionEvent, listenSessionEventOnce, listenStateEvent, listenStateEventOnce, listenStorageEvent, listenStorageEventOnce, listenSwarmEvent, listenSwarmEventOnce, makeAutoDispose, makeConnection, markOffline, markOnline, runStateless, runStatelessForce, session, setConfig, swarm };
17923
+ export { Adapter, Chat, ExecutionContextService, History, HistoryMemoryInstance, HistoryPersistInstance, Logger, LoggerInstance, MethodContextService, PayloadContextService, PersistAlive, PersistBase, PersistEmbedding, PersistList, PersistMemory, PersistPolicy, PersistState, PersistStorage, PersistSwarm, Policy, RoundRobin, Schema, SharedState, SharedStorage, State, Storage, Utils, addAgent, addCompletion, addEmbedding, addPolicy, addState, addStorage, addSwarm, addTool, beginContext, cancelOutput, cancelOutputForce, changeToAgent, changeToDefaultAgent, changeToPrevAgent, commitAssistantMessage, commitAssistantMessageForce, commitFlush, commitFlushForce, commitStopTools, commitStopToolsForce, commitSystemMessage, commitSystemMessageForce, commitToolOutput, commitToolOutputForce, commitUserMessage, commitUserMessageForce, complete, disposeConnection, dumpAgent, dumpClientPerformance, dumpDocs, dumpPerfomance, dumpSwarm, emit, emitForce, event, execute, executeForce, getAgentHistory, getAgentName, getAssistantHistory, getLastAssistantMessage, getLastSystemMessage, getLastUserMessage, getPayload, getRawHistory, getSessionContext, getSessionMode, getUserHistory, hasSession, listenAgentEvent, listenAgentEventOnce, listenEvent, listenEventOnce, listenExecutionEvent, listenExecutionEventOnce, listenHistoryEvent, listenHistoryEventOnce, listenPolicyEvent, listenPolicyEventOnce, listenSessionEvent, listenSessionEventOnce, listenStateEvent, listenStateEventOnce, listenStorageEvent, listenStorageEventOnce, listenSwarmEvent, listenSwarmEventOnce, makeAutoDispose, makeConnection, markOffline, markOnline, runStateless, runStatelessForce, session, setConfig, swarm };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-swarm-kit",
3
- "version": "1.0.207",
3
+ "version": "1.0.209",
4
4
  "description": "A TypeScript library for building orchestrated framework-agnostic multi-agent AI systems",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",
@@ -43,7 +43,9 @@
43
43
  "build:docs": "rimraf docs && mkdir docs && node ./scripts/dts-docs.cjs ./types.d.ts ./docs",
44
44
  "docs:gpt": "npm run build && node ./scripts/gpt-docs.mjs",
45
45
  "docs:uml": "npm run build && node ./scripts/uml.mjs",
46
- "docs:www": "typedoc",
46
+ "docs:www": "rimraf docs/wwwroot && typedoc",
47
+ "docs:demo:win": ".\\scripts\\win\\build_demo_docs.bat",
48
+ "docs:demo": "sh ./scripts/linux/build_demo_docs.sh",
47
49
  "repl": "dotenv -e .env -- npm run build && node -e \"import('./scripts/repl.mjs')\" --interactive"
48
50
  },
49
51
  "main": "build/index.cjs",
package/types.d.ts CHANGED
@@ -10561,58 +10561,6 @@ interface IChatControl {
10561
10561
  * @typedef {new (clientId: SessionId, swarmName: SwarmName, callbacks: IChatInstanceCallbacks, onDispose: DisposeFn) => IChatInstance} TChatInstanceCtor
10562
10562
  */
10563
10563
  type TChatInstanceCtor = new (clientId: SessionId, swarmName: SwarmName, onDispose: DisposeFn, callbacks: IChatInstanceCallbacks) => IChatInstance;
10564
- /**
10565
- * @class ChatInstance
10566
- * @implements {IChatInstance}
10567
- * @description Implementation of a single chat instance
10568
- */
10569
- declare class ChatInstance implements IChatInstance {
10570
- private readonly clientId;
10571
- private readonly swarmName;
10572
- private readonly onDispose;
10573
- private readonly callbacks;
10574
- /** @private */
10575
- private _disposeSubject;
10576
- /** @private */
10577
- private _chatSession;
10578
- /** @private */
10579
- private _lastActivity;
10580
- /**
10581
- * @constructor
10582
- * @param {SessionId} clientId - Unique client identifier
10583
- * @param {SwarmName} swarmName - Name of the swarm
10584
- * @param {Partial<IChatInstanceCallbacks>} callbacks - Event callbacks
10585
- * @param {DisposeFn} onDispose - Dispose callback function
10586
- */
10587
- constructor(clientId: SessionId, swarmName: SwarmName, onDispose: DisposeFn, callbacks: Partial<IChatInstanceCallbacks>);
10588
- /**
10589
- * Checks if the chat has been active within the timeout period
10590
- * @param {number} now - Current timestamp
10591
- * @returns {boolean} Whether the chat is still active
10592
- */
10593
- checkLastActivity(now: number): Promise<boolean>;
10594
- /**
10595
- * Begins a chat session
10596
- * @returns {Promise<void>}
10597
- */
10598
- beginChat(): Promise<void>;
10599
- /**
10600
- * Sends a message in the chat
10601
- * @param {string} content - Message content to send
10602
- * @returns {Promise<string>} Response from the chat session
10603
- */
10604
- sendMessage(content: string): Promise<string>;
10605
- /**
10606
- * Disposes of the chat instance
10607
- * @returns {Promise<void>}
10608
- */
10609
- dispose(): Promise<void>;
10610
- /**
10611
- * Adds a listener for dispose events
10612
- * @param {(clientId: SessionId) => void} fn - Callback function to execute on dispose
10613
- */
10614
- listenDispose(fn: (clientId: SessionId) => void): () => void;
10615
- }
10616
10564
  /**
10617
10565
  * @class ChatUtils
10618
10566
  * @implements {IChatControl}
@@ -11049,4 +10997,4 @@ declare const Utils: {
11049
10997
  PersistEmbeddingUtils: typeof PersistEmbeddingUtils;
11050
10998
  };
11051
10999
 
11052
- export { Adapter, Chat, ChatInstance, type EventSource, ExecutionContextService, History, HistoryMemoryInstance, HistoryPersistInstance, type IAgentSchema, type IAgentTool, type IBaseEvent, type IBusEvent, type IBusEventContext, type IChatInstance, type IChatInstanceCallbacks, type ICompletionArgs, type ICompletionSchema, type ICustomEvent, type IEmbeddingSchema, type IGlobalConfig, type IHistoryAdapter, type IHistoryControl, type IHistoryInstance, type IHistoryInstanceCallbacks, type IIncomingMessage, type ILoggerAdapter, type ILoggerInstance, type ILoggerInstanceCallbacks, type IMakeConnectionConfig, type IMakeDisposeParams, type IModelMessage, type IOutgoingMessage, type IPersistActiveAgentData, type IPersistAliveData, type IPersistBase, type IPersistEmbeddingData, type IPersistMemoryData, type IPersistNavigationStackData, type IPersistPolicyData, type IPersistStateData, type IPersistStorageData, type IPolicySchema, type ISessionConfig, type IStateSchema, type IStorageData, type IStorageSchema, type ISwarmSchema, type ITool, type IToolCall, Logger, LoggerInstance, MethodContextService, PayloadContextService, PersistAlive, PersistBase, PersistEmbedding, PersistList, PersistMemory, PersistPolicy, PersistState, PersistStorage, PersistSwarm, Policy, type ReceiveMessageFn, RoundRobin, Schema, type SendMessageFn, SharedState, SharedStorage, State, Storage, type THistoryInstanceCtor, type THistoryMemoryInstance, type THistoryPersistInstance, type TLoggerInstance, type TPersistBase, type TPersistBaseCtor, type TPersistList, Utils, addAgent, addCompletion, addEmbedding, addPolicy, addState, addStorage, addSwarm, addTool, beginContext, cancelOutput, cancelOutputForce, changeToAgent, changeToDefaultAgent, changeToPrevAgent, commitAssistantMessage, commitAssistantMessageForce, commitFlush, commitFlushForce, commitStopTools, commitStopToolsForce, commitSystemMessage, commitSystemMessageForce, commitToolOutput, commitToolOutputForce, commitUserMessage, commitUserMessageForce, complete, disposeConnection, dumpAgent, dumpClientPerformance, dumpDocs, dumpPerfomance, dumpSwarm, emit, emitForce, event, execute, executeForce, getAgentHistory, getAgentName, getAssistantHistory, getLastAssistantMessage, getLastSystemMessage, getLastUserMessage, getPayload, getRawHistory, getSessionContext, getSessionMode, getUserHistory, hasSession, listenAgentEvent, listenAgentEventOnce, listenEvent, listenEventOnce, listenExecutionEvent, listenExecutionEventOnce, listenHistoryEvent, listenHistoryEventOnce, listenPolicyEvent, listenPolicyEventOnce, listenSessionEvent, listenSessionEventOnce, listenStateEvent, listenStateEventOnce, listenStorageEvent, listenStorageEventOnce, listenSwarmEvent, listenSwarmEventOnce, makeAutoDispose, makeConnection, markOffline, markOnline, runStateless, runStatelessForce, session, setConfig, swarm };
11000
+ export { Adapter, Chat, type EventSource, ExecutionContextService, History, HistoryMemoryInstance, HistoryPersistInstance, type IAgentSchema, type IAgentTool, type IBaseEvent, type IBusEvent, type IBusEventContext, type IChatInstance, type IChatInstanceCallbacks, type ICompletionArgs, type ICompletionSchema, type ICustomEvent, type IEmbeddingSchema, type IGlobalConfig, type IHistoryAdapter, type IHistoryControl, type IHistoryInstance, type IHistoryInstanceCallbacks, type IIncomingMessage, type ILoggerAdapter, type ILoggerInstance, type ILoggerInstanceCallbacks, type IMakeConnectionConfig, type IMakeDisposeParams, type IModelMessage, type IOutgoingMessage, type IPersistActiveAgentData, type IPersistAliveData, type IPersistBase, type IPersistEmbeddingData, type IPersistMemoryData, type IPersistNavigationStackData, type IPersistPolicyData, type IPersistStateData, type IPersistStorageData, type IPolicySchema, type ISessionConfig, type IStateSchema, type IStorageData, type IStorageSchema, type ISwarmSchema, type ITool, type IToolCall, Logger, LoggerInstance, MethodContextService, PayloadContextService, PersistAlive, PersistBase, PersistEmbedding, PersistList, PersistMemory, PersistPolicy, PersistState, PersistStorage, PersistSwarm, Policy, type ReceiveMessageFn, RoundRobin, Schema, type SendMessageFn, SharedState, SharedStorage, State, Storage, type THistoryInstanceCtor, type THistoryMemoryInstance, type THistoryPersistInstance, type TLoggerInstance, type TPersistBase, type TPersistBaseCtor, type TPersistList, Utils, addAgent, addCompletion, addEmbedding, addPolicy, addState, addStorage, addSwarm, addTool, beginContext, cancelOutput, cancelOutputForce, changeToAgent, changeToDefaultAgent, changeToPrevAgent, commitAssistantMessage, commitAssistantMessageForce, commitFlush, commitFlushForce, commitStopTools, commitStopToolsForce, commitSystemMessage, commitSystemMessageForce, commitToolOutput, commitToolOutputForce, commitUserMessage, commitUserMessageForce, complete, disposeConnection, dumpAgent, dumpClientPerformance, dumpDocs, dumpPerfomance, dumpSwarm, emit, emitForce, event, execute, executeForce, getAgentHistory, getAgentName, getAssistantHistory, getLastAssistantMessage, getLastSystemMessage, getLastUserMessage, getPayload, getRawHistory, getSessionContext, getSessionMode, getUserHistory, hasSession, listenAgentEvent, listenAgentEventOnce, listenEvent, listenEventOnce, listenExecutionEvent, listenExecutionEventOnce, listenHistoryEvent, listenHistoryEventOnce, listenPolicyEvent, listenPolicyEventOnce, listenSessionEvent, listenSessionEventOnce, listenStateEvent, listenStateEventOnce, listenStorageEvent, listenStorageEventOnce, listenSwarmEvent, listenSwarmEventOnce, makeAutoDispose, makeConnection, markOffline, markOnline, runStateless, runStatelessForce, session, setConfig, swarm };