agent-swarm-kit 1.0.180 → 1.0.182
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 +11 -1
- package/build/index.mjs +11 -1
- package/package.json +1 -1
- package/types.d.ts +1 -1
package/build/index.cjs
CHANGED
|
@@ -1464,7 +1464,17 @@ const PersistMemory = PersistMemoryAdapter;
|
|
|
1464
1464
|
class PersistAliveUtils {
|
|
1465
1465
|
constructor() {
|
|
1466
1466
|
/** @private Default constructor for alive status persistence, defaults to `PersistBase` */
|
|
1467
|
-
this.PersistAliveFactory = PersistBase
|
|
1467
|
+
this.PersistAliveFactory = class extends PersistBase {
|
|
1468
|
+
constructor() {
|
|
1469
|
+
super(...arguments);
|
|
1470
|
+
this.waitForInit = functoolsKit.singleshot(async (initial) => {
|
|
1471
|
+
await super.waitForInit(initial);
|
|
1472
|
+
for await (const entityKey of this.keys()) {
|
|
1473
|
+
await this.writeValue(entityKey, { online: false });
|
|
1474
|
+
}
|
|
1475
|
+
});
|
|
1476
|
+
}
|
|
1477
|
+
};
|
|
1468
1478
|
/**
|
|
1469
1479
|
* Memoized function to create or retrieve storage for a specific client’s alive status.
|
|
1470
1480
|
* Ensures a single persistence instance per client ID, optimizing resource use.
|
package/build/index.mjs
CHANGED
|
@@ -1462,7 +1462,17 @@ const PersistMemory = PersistMemoryAdapter;
|
|
|
1462
1462
|
class PersistAliveUtils {
|
|
1463
1463
|
constructor() {
|
|
1464
1464
|
/** @private Default constructor for alive status persistence, defaults to `PersistBase` */
|
|
1465
|
-
this.PersistAliveFactory = PersistBase
|
|
1465
|
+
this.PersistAliveFactory = class extends PersistBase {
|
|
1466
|
+
constructor() {
|
|
1467
|
+
super(...arguments);
|
|
1468
|
+
this.waitForInit = singleshot(async (initial) => {
|
|
1469
|
+
await super.waitForInit(initial);
|
|
1470
|
+
for await (const entityKey of this.keys()) {
|
|
1471
|
+
await this.writeValue(entityKey, { online: false });
|
|
1472
|
+
}
|
|
1473
|
+
});
|
|
1474
|
+
}
|
|
1475
|
+
};
|
|
1466
1476
|
/**
|
|
1467
1477
|
* Memoized function to create or retrieve storage for a specific client’s alive status.
|
|
1468
1478
|
* Ensures a single persistence instance per client ID, optimizing resource use.
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -10644,4 +10644,4 @@ declare const Utils: {
|
|
|
10644
10644
|
PersistPolicyUtils: typeof PersistPolicyUtils;
|
|
10645
10645
|
};
|
|
10646
10646
|
|
|
10647
|
-
export { Adapter, type EventSource, ExecutionContextService, History, HistoryMemoryInstance, HistoryPersistInstance, type IAgentSchema, type IAgentTool, type IBaseEvent, type IBusEvent, type IBusEventContext, 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 IPersistBase, type IPolicySchema, type ISessionConfig, type IStateSchema, type IStorageSchema, type ISwarmSchema, type ITool, type IToolCall, Logger, LoggerInstance, MethodContextService, PayloadContextService, PersistAlive, PersistBase, PersistList, PersistMemory, PersistPolicy, PersistState, PersistStorage, PersistSwarm, Policy, type ReceiveMessageFn, 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, 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 };
|
|
10647
|
+
export { Adapter, type EventSource, ExecutionContextService, History, HistoryMemoryInstance, HistoryPersistInstance, type IAgentSchema, type IAgentTool, type IBaseEvent, type IBusEvent, type IBusEventContext, 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 IPersistMemoryData, type IPersistNavigationStackData, type IPersistStateData, type IPersistStorageData, type IPolicySchema, type ISessionConfig, type IStateSchema, type IStorageSchema, type ISwarmSchema, type ITool, type IToolCall, Logger, LoggerInstance, MethodContextService, PayloadContextService, PersistAlive, PersistBase, PersistList, PersistMemory, PersistPolicy, PersistState, PersistStorage, PersistSwarm, Policy, type ReceiveMessageFn, 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, 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 };
|