agent-swarm-kit 1.0.216 → 1.0.217
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 +4 -24
- package/build/index.mjs +4 -24
- package/package.json +1 -1
- package/types.d.ts +0 -10
package/build/index.cjs
CHANGED
|
@@ -17385,7 +17385,7 @@ const METHOD_NAME_GET$1 = "StorageUtils.get";
|
|
|
17385
17385
|
/** @private Constant for logging the list method in StorageUtils */
|
|
17386
17386
|
const METHOD_NAME_LIST$1 = "StorageUtils.list";
|
|
17387
17387
|
/** @private Constant for logging the createNumericIndex method in SharedStorageUtils */
|
|
17388
|
-
const METHOD_NAME_CREATE_NUMERIC_INDEX
|
|
17388
|
+
const METHOD_NAME_CREATE_NUMERIC_INDEX = "StorageUtils.createNumericIndex";
|
|
17389
17389
|
/** @private Constant for logging the clear method in StorageUtils */
|
|
17390
17390
|
const METHOD_NAME_CLEAR$1 = "StorageUtils.clear";
|
|
17391
17391
|
/**
|
|
@@ -17545,15 +17545,15 @@ class StorageUtils {
|
|
|
17545
17545
|
*/
|
|
17546
17546
|
this.createNumericIndex = beginContext(async (payload) => {
|
|
17547
17547
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
17548
|
-
swarm$1.loggerService.log(METHOD_NAME_CREATE_NUMERIC_INDEX
|
|
17548
|
+
swarm$1.loggerService.log(METHOD_NAME_CREATE_NUMERIC_INDEX, {
|
|
17549
17549
|
clientId: payload.clientId,
|
|
17550
17550
|
storageName: payload.storageName,
|
|
17551
17551
|
});
|
|
17552
|
-
swarm$1.storageValidationService.validate(payload.storageName, METHOD_NAME_CREATE_NUMERIC_INDEX
|
|
17552
|
+
swarm$1.storageValidationService.validate(payload.storageName, METHOD_NAME_CREATE_NUMERIC_INDEX);
|
|
17553
17553
|
if (!swarm$1.agentValidationService.hasStorage(payload.agentName, payload.storageName)) {
|
|
17554
17554
|
throw new Error(`agent-swarm StorageUtils ${payload.storageName} not registered in ${payload.agentName} (createNumericIndex)`);
|
|
17555
17555
|
}
|
|
17556
|
-
const { length } = await swarm$1.storagePublicService.list(METHOD_NAME_CREATE_NUMERIC_INDEX
|
|
17556
|
+
const { length } = await swarm$1.storagePublicService.list(METHOD_NAME_CREATE_NUMERIC_INDEX, payload.clientId, payload.storageName);
|
|
17557
17557
|
return length + 1;
|
|
17558
17558
|
});
|
|
17559
17559
|
/**
|
|
@@ -17597,8 +17597,6 @@ const METHOD_NAME_REMOVE = "SharedStorageUtils.remove";
|
|
|
17597
17597
|
const METHOD_NAME_GET = "SharedStorageUtils.get";
|
|
17598
17598
|
/** @private Constant for logging the list method in SharedStorageUtils */
|
|
17599
17599
|
const METHOD_NAME_LIST = "SharedStorageUtils.list";
|
|
17600
|
-
/** @private Constant for logging the createNumericIndex method in SharedStorageUtils */
|
|
17601
|
-
const METHOD_NAME_CREATE_NUMERIC_INDEX = "SharedStorageUtils.createNumericIndex";
|
|
17602
17600
|
/** @private Constant for logging the clear method in SharedStorageUtils */
|
|
17603
17601
|
const METHOD_NAME_CLEAR = "SharedStorageUtils.clear";
|
|
17604
17602
|
/**
|
|
@@ -17701,24 +17699,6 @@ class SharedStorageUtils {
|
|
|
17701
17699
|
swarm$1.storageValidationService.validate(storageName, METHOD_NAME_LIST);
|
|
17702
17700
|
return await swarm$1.sharedStoragePublicService.list(METHOD_NAME_LIST, storageName, filter);
|
|
17703
17701
|
});
|
|
17704
|
-
/**
|
|
17705
|
-
* Creates a new numeric index for the specified storage.
|
|
17706
|
-
* Executes within a context for logging and validation, ensuring the storage name is valid.
|
|
17707
|
-
* The numeric index is determined based on the current number of items in the storage.
|
|
17708
|
-
*
|
|
17709
|
-
* @param {StorageName} storageName - The name of the storage for which to create the numeric index.
|
|
17710
|
-
* @returns {Promise<number>} A promise resolving to the newly created numeric index.
|
|
17711
|
-
* @throws {Error} If storage validation fails or the shared storage service encounters an error.
|
|
17712
|
-
*/
|
|
17713
|
-
this.createNumericIndex = beginContext(async (storageName) => {
|
|
17714
|
-
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
17715
|
-
swarm$1.loggerService.log(METHOD_NAME_CREATE_NUMERIC_INDEX, {
|
|
17716
|
-
storageName,
|
|
17717
|
-
});
|
|
17718
|
-
swarm$1.storageValidationService.validate(storageName, METHOD_NAME_CREATE_NUMERIC_INDEX);
|
|
17719
|
-
const { length } = await swarm$1.sharedStoragePublicService.list(METHOD_NAME_CREATE_NUMERIC_INDEX, storageName);
|
|
17720
|
-
return length + 1;
|
|
17721
|
-
});
|
|
17722
17702
|
/**
|
|
17723
17703
|
* Clears all items from the storage.
|
|
17724
17704
|
* Executes within a context for logging and validation, ensuring the storage name is valid.
|
package/build/index.mjs
CHANGED
|
@@ -17383,7 +17383,7 @@ const METHOD_NAME_GET$1 = "StorageUtils.get";
|
|
|
17383
17383
|
/** @private Constant for logging the list method in StorageUtils */
|
|
17384
17384
|
const METHOD_NAME_LIST$1 = "StorageUtils.list";
|
|
17385
17385
|
/** @private Constant for logging the createNumericIndex method in SharedStorageUtils */
|
|
17386
|
-
const METHOD_NAME_CREATE_NUMERIC_INDEX
|
|
17386
|
+
const METHOD_NAME_CREATE_NUMERIC_INDEX = "StorageUtils.createNumericIndex";
|
|
17387
17387
|
/** @private Constant for logging the clear method in StorageUtils */
|
|
17388
17388
|
const METHOD_NAME_CLEAR$1 = "StorageUtils.clear";
|
|
17389
17389
|
/**
|
|
@@ -17543,15 +17543,15 @@ class StorageUtils {
|
|
|
17543
17543
|
*/
|
|
17544
17544
|
this.createNumericIndex = beginContext(async (payload) => {
|
|
17545
17545
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
17546
|
-
swarm$1.loggerService.log(METHOD_NAME_CREATE_NUMERIC_INDEX
|
|
17546
|
+
swarm$1.loggerService.log(METHOD_NAME_CREATE_NUMERIC_INDEX, {
|
|
17547
17547
|
clientId: payload.clientId,
|
|
17548
17548
|
storageName: payload.storageName,
|
|
17549
17549
|
});
|
|
17550
|
-
swarm$1.storageValidationService.validate(payload.storageName, METHOD_NAME_CREATE_NUMERIC_INDEX
|
|
17550
|
+
swarm$1.storageValidationService.validate(payload.storageName, METHOD_NAME_CREATE_NUMERIC_INDEX);
|
|
17551
17551
|
if (!swarm$1.agentValidationService.hasStorage(payload.agentName, payload.storageName)) {
|
|
17552
17552
|
throw new Error(`agent-swarm StorageUtils ${payload.storageName} not registered in ${payload.agentName} (createNumericIndex)`);
|
|
17553
17553
|
}
|
|
17554
|
-
const { length } = await swarm$1.storagePublicService.list(METHOD_NAME_CREATE_NUMERIC_INDEX
|
|
17554
|
+
const { length } = await swarm$1.storagePublicService.list(METHOD_NAME_CREATE_NUMERIC_INDEX, payload.clientId, payload.storageName);
|
|
17555
17555
|
return length + 1;
|
|
17556
17556
|
});
|
|
17557
17557
|
/**
|
|
@@ -17595,8 +17595,6 @@ const METHOD_NAME_REMOVE = "SharedStorageUtils.remove";
|
|
|
17595
17595
|
const METHOD_NAME_GET = "SharedStorageUtils.get";
|
|
17596
17596
|
/** @private Constant for logging the list method in SharedStorageUtils */
|
|
17597
17597
|
const METHOD_NAME_LIST = "SharedStorageUtils.list";
|
|
17598
|
-
/** @private Constant for logging the createNumericIndex method in SharedStorageUtils */
|
|
17599
|
-
const METHOD_NAME_CREATE_NUMERIC_INDEX = "SharedStorageUtils.createNumericIndex";
|
|
17600
17598
|
/** @private Constant for logging the clear method in SharedStorageUtils */
|
|
17601
17599
|
const METHOD_NAME_CLEAR = "SharedStorageUtils.clear";
|
|
17602
17600
|
/**
|
|
@@ -17699,24 +17697,6 @@ class SharedStorageUtils {
|
|
|
17699
17697
|
swarm$1.storageValidationService.validate(storageName, METHOD_NAME_LIST);
|
|
17700
17698
|
return await swarm$1.sharedStoragePublicService.list(METHOD_NAME_LIST, storageName, filter);
|
|
17701
17699
|
});
|
|
17702
|
-
/**
|
|
17703
|
-
* Creates a new numeric index for the specified storage.
|
|
17704
|
-
* Executes within a context for logging and validation, ensuring the storage name is valid.
|
|
17705
|
-
* The numeric index is determined based on the current number of items in the storage.
|
|
17706
|
-
*
|
|
17707
|
-
* @param {StorageName} storageName - The name of the storage for which to create the numeric index.
|
|
17708
|
-
* @returns {Promise<number>} A promise resolving to the newly created numeric index.
|
|
17709
|
-
* @throws {Error} If storage validation fails or the shared storage service encounters an error.
|
|
17710
|
-
*/
|
|
17711
|
-
this.createNumericIndex = beginContext(async (storageName) => {
|
|
17712
|
-
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
17713
|
-
swarm$1.loggerService.log(METHOD_NAME_CREATE_NUMERIC_INDEX, {
|
|
17714
|
-
storageName,
|
|
17715
|
-
});
|
|
17716
|
-
swarm$1.storageValidationService.validate(storageName, METHOD_NAME_CREATE_NUMERIC_INDEX);
|
|
17717
|
-
const { length } = await swarm$1.sharedStoragePublicService.list(METHOD_NAME_CREATE_NUMERIC_INDEX, storageName);
|
|
17718
|
-
return length + 1;
|
|
17719
|
-
});
|
|
17720
17700
|
/**
|
|
17721
17701
|
* Clears all items from the storage.
|
|
17722
17702
|
* Executes within a context for logging and validation, ensuring the storage name is valid.
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -11164,16 +11164,6 @@ declare class SharedStorageUtils implements TSharedStorage {
|
|
|
11164
11164
|
* @throws {Error} If storage validation fails or the shared storage service encounters an error.
|
|
11165
11165
|
*/
|
|
11166
11166
|
list: <T extends IStorageData = IStorageData>(storageName: StorageName, filter?: (item: T) => boolean) => Promise<T[]>;
|
|
11167
|
-
/**
|
|
11168
|
-
* Creates a new numeric index for the specified storage.
|
|
11169
|
-
* Executes within a context for logging and validation, ensuring the storage name is valid.
|
|
11170
|
-
* The numeric index is determined based on the current number of items in the storage.
|
|
11171
|
-
*
|
|
11172
|
-
* @param {StorageName} storageName - The name of the storage for which to create the numeric index.
|
|
11173
|
-
* @returns {Promise<number>} A promise resolving to the newly created numeric index.
|
|
11174
|
-
* @throws {Error} If storage validation fails or the shared storage service encounters an error.
|
|
11175
|
-
*/
|
|
11176
|
-
createNumericIndex: (storageName: string) => Promise<number>;
|
|
11177
11167
|
/**
|
|
11178
11168
|
* Clears all items from the storage.
|
|
11179
11169
|
* Executes within a context for logging and validation, ensuring the storage name is valid.
|