agent-swarm-kit 1.0.78 → 1.0.79
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 +1209 -832
- package/build/index.mjs +1210 -834
- package/package.json +3 -2
- package/types.d.ts +26 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-swarm-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.79",
|
|
4
4
|
"description": "A TypeScript library for building orchestrated framework-agnostic multi-agent AI systems",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Petr Tripolsky",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"benchmark": "npm run build && node ./benchmark/index.mjs",
|
|
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
|
+
"docs:uml": "npm run build && node ./scripts/uml.mjs",
|
|
45
46
|
"repl": "dotenv -e .env -- npm run build && node -e \"import('./scripts/repl.mjs')\" --interactive"
|
|
46
47
|
},
|
|
47
48
|
"main": "build/index.cjs",
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"typescript": "^5.0.0"
|
|
73
74
|
},
|
|
74
75
|
"dependencies": {
|
|
75
|
-
"di-kit": "^1.0.
|
|
76
|
+
"di-kit": "^1.0.14",
|
|
76
77
|
"di-scoped": "^1.0.12",
|
|
77
78
|
"functools-kit": "^1.0.74",
|
|
78
79
|
"lodash-es": "4.17.21",
|
package/types.d.ts
CHANGED
|
@@ -3122,7 +3122,7 @@ declare const makeConnection: {
|
|
|
3122
3122
|
* @param {Partial<IMakeConnectionConfig>} [config] - The configuration for scheduling.
|
|
3123
3123
|
* @returns {SendMessageFn} - A function to send scheduled messages to the swarm.
|
|
3124
3124
|
*/
|
|
3125
|
-
scheduled(connector: ReceiveMessageFn, clientId: string, swarmName: SwarmName, { delay
|
|
3125
|
+
scheduled(connector: ReceiveMessageFn, clientId: string, swarmName: SwarmName, { delay }?: Partial<IMakeConnectionConfig>): (content: string) => Promise<void>;
|
|
3126
3126
|
};
|
|
3127
3127
|
/**
|
|
3128
3128
|
* Configuration for scheduling messages.
|
|
@@ -3262,7 +3262,7 @@ declare const getSessionMode: (clientId: string) => Promise<SessionMode>;
|
|
|
3262
3262
|
declare const commitToolOutput: (toolId: string, content: string, clientId: string, agentName: AgentName) => Promise<void>;
|
|
3263
3263
|
|
|
3264
3264
|
/**
|
|
3265
|
-
* Commits a system message to the active agent in
|
|
3265
|
+
* Commits a system message to the active agent in the swarm.
|
|
3266
3266
|
*
|
|
3267
3267
|
* @param {string} content - The content of the system message.
|
|
3268
3268
|
* @param {string} clientId - The ID of the client.
|
|
@@ -3460,7 +3460,7 @@ interface IMakeDisposeParams {
|
|
|
3460
3460
|
* @param {Partial<IMakeDisposeParams>} [params={}] - Optional parameters for auto-dispose.
|
|
3461
3461
|
* @returns {Object} An object with tick and stop methods to control the auto-dispose.
|
|
3462
3462
|
*/
|
|
3463
|
-
declare const makeAutoDispose: (clientId: string, swarmName: SwarmName, { timeoutSeconds, onDestroy }?: Partial<IMakeDisposeParams>) => {
|
|
3463
|
+
declare const makeAutoDispose: (clientId: string, swarmName: SwarmName, { timeoutSeconds, onDestroy, }?: Partial<IMakeDisposeParams>) => {
|
|
3464
3464
|
/**
|
|
3465
3465
|
* Signals that the client is active, resetting the auto-dispose timer.
|
|
3466
3466
|
*/
|
|
@@ -3611,6 +3611,10 @@ declare const GLOBAL_CONFIG: {
|
|
|
3611
3611
|
CC_AGENT_DISALLOWED_SYMBOLS: string[];
|
|
3612
3612
|
CC_STORAGE_SEARCH_SIMILARITY: number;
|
|
3613
3613
|
CC_STORAGE_SEARCH_POOL: number;
|
|
3614
|
+
CC_LOGGER_ENABLE_INFO: boolean;
|
|
3615
|
+
CC_LOGGER_ENABLE_DEBUG: boolean;
|
|
3616
|
+
CC_LOGGER_ENABLE_LOG: boolean;
|
|
3617
|
+
CC_NAME_TO_TITLE: (name: string) => string;
|
|
3614
3618
|
};
|
|
3615
3619
|
declare const setConfig: (config: Partial<typeof GLOBAL_CONFIG>) => void;
|
|
3616
3620
|
|
|
@@ -3769,4 +3773,22 @@ declare class LoggerUtils {
|
|
|
3769
3773
|
*/
|
|
3770
3774
|
declare const Logger: LoggerUtils;
|
|
3771
3775
|
|
|
3772
|
-
|
|
3776
|
+
/**
|
|
3777
|
+
* Utility class for schema-related operations.
|
|
3778
|
+
*/
|
|
3779
|
+
declare class SchemaUtils {
|
|
3780
|
+
/**
|
|
3781
|
+
* Serializes an object or an array of objects into a formatted string.
|
|
3782
|
+
*
|
|
3783
|
+
* @template T - The type of the object.
|
|
3784
|
+
* @param {T[] | T} data - The data to serialize.
|
|
3785
|
+
* @returns {string} The serialized string.
|
|
3786
|
+
*/
|
|
3787
|
+
serialize: <T extends object = any>(data: T[] | T) => string;
|
|
3788
|
+
}
|
|
3789
|
+
/**
|
|
3790
|
+
* An instance of the SchemaUtils class.
|
|
3791
|
+
*/
|
|
3792
|
+
declare const Schema: SchemaUtils;
|
|
3793
|
+
|
|
3794
|
+
export { type EventSource, ExecutionContextService, History, HistoryAdapter, HistoryInstance, type IAgentSchema, type IAgentTool, type IBaseEvent, type IBusEvent, type IBusEventContext, type ICompletionArgs, type ICompletionSchema, type ICustomEvent, type IEmbeddingSchema, type IHistoryAdapter, type IHistoryInstance, type IHistoryInstanceCallbacks, type IIncomingMessage, type IMakeConnectionConfig, type IMakeDisposeParams, type IModelMessage, type IOutgoingMessage, type ISessionConfig, type IStateSchema, type IStorageSchema, type ISwarmSchema, type ITool, type IToolCall, Logger, MethodContextService, type ReceiveMessageFn, Schema, type SendMessageFn$1 as SendMessageFn, State, Storage, addAgent, addCompletion, addEmbedding, addState, addStorage, addSwarm, addTool, cancelOutput, cancelOutputForce, changeAgent, commitFlush, commitFlushForce, commitSystemMessage, commitSystemMessageForce, commitToolOutput, commitToolOutputForce, commitUserMessage, commitUserMessageForce, complete, disposeConnection, emit, emitForce, event, execute, executeForce, getAgentHistory, getAgentName, getAssistantHistory, getLastAssistantMessage, getLastSystemMessage, getLastUserMessage, getRawHistory, getSessionMode, getUserHistory, listenAgentEvent, listenAgentEventOnce, listenEvent, listenEventOnce, listenHistoryEvent, listenHistoryEventOnce, listenSessionEvent, listenSessionEventOnce, listenStateEvent, listenStateEventOnce, listenStorageEvent, listenStorageEventOnce, listenSwarmEvent, listenSwarmEventOnce, makeAutoDispose, makeConnection, session, setConfig, swarm };
|