agent-swarm-kit 1.1.170 → 1.1.172
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 +7 -6
- package/build/index.mjs +7 -6
- package/package.json +1 -1
- package/types.d.ts +781 -782
package/build/index.cjs
CHANGED
|
@@ -18737,7 +18737,7 @@ const mapCompletionSchema = ({ getCompletion, ...schema }) => removeUndefined({
|
|
|
18737
18737
|
const METHOD_NAME$1e = "function.setup.addCompletion";
|
|
18738
18738
|
/**
|
|
18739
18739
|
* Function implementation
|
|
18740
|
-
*/
|
|
18740
|
+
*/
|
|
18741
18741
|
const addCompletionInternal = beginContext((completionPublicSchema) => {
|
|
18742
18742
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
18743
18743
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
@@ -18766,7 +18766,7 @@ const addCompletionInternal = beginContext((completionPublicSchema) => {
|
|
|
18766
18766
|
* const completionSchema = { completionName: "OpenAI", model: "gpt-3.5-turbo" };
|
|
18767
18767
|
* const completionName = addCompletion(completionSchema);
|
|
18768
18768
|
* console.log(completionName); // Outputs "OpenAI"
|
|
18769
|
-
*/
|
|
18769
|
+
*/
|
|
18770
18770
|
function addCompletion(completionSchema) {
|
|
18771
18771
|
return addCompletionInternal(completionSchema);
|
|
18772
18772
|
}
|
|
@@ -20186,7 +20186,7 @@ const MAX_ATTEMPTS = 5;
|
|
|
20186
20186
|
* Provides methods to append, clear, and retrieve messages for tracking interactions in an outline process.
|
|
20187
20187
|
* @class
|
|
20188
20188
|
* @implements {IOutlineHistory }
|
|
20189
|
-
*/
|
|
20189
|
+
*/
|
|
20190
20190
|
class OutlineHistory {
|
|
20191
20191
|
constructor() {
|
|
20192
20192
|
/** @private*/
|
|
@@ -20220,7 +20220,7 @@ class OutlineHistory {
|
|
|
20220
20220
|
* Attempts to produce a valid structured data based on the outline schema, handling validations and retries up to a configurable maximum.
|
|
20221
20221
|
* @private
|
|
20222
20222
|
* @async
|
|
20223
|
-
*/
|
|
20223
|
+
*/
|
|
20224
20224
|
const jsonInternal = beginContext(async (outlineName, param) => {
|
|
20225
20225
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20226
20226
|
swarm$1.loggerService.log(METHOD_NAME$F, {});
|
|
@@ -20357,7 +20357,7 @@ const jsonInternal = beginContext(async (outlineName, param) => {
|
|
|
20357
20357
|
* // Example usage
|
|
20358
20358
|
* const result = await json<"MyOutline", { query: string }>("MyOutline", { query: "example" });
|
|
20359
20359
|
* console.log(result.isValid, result.data); // Logs validation status and data
|
|
20360
|
-
*/
|
|
20360
|
+
*/
|
|
20361
20361
|
async function json(outlineName, param = {}) {
|
|
20362
20362
|
return await jsonInternal(outlineName, param);
|
|
20363
20363
|
}
|
|
@@ -20389,7 +20389,8 @@ const chatInternal = beginContext(async (completionName, messages) => {
|
|
|
20389
20389
|
});
|
|
20390
20390
|
const { content } = await getCompletion({
|
|
20391
20391
|
clientId,
|
|
20392
|
-
messages,
|
|
20392
|
+
messages: messages,
|
|
20393
|
+
agentName: "chat",
|
|
20393
20394
|
mode: "user",
|
|
20394
20395
|
});
|
|
20395
20396
|
unError();
|
package/build/index.mjs
CHANGED
|
@@ -18717,7 +18717,7 @@ const mapCompletionSchema = ({ getCompletion, ...schema }) => removeUndefined({
|
|
|
18717
18717
|
const METHOD_NAME$1e = "function.setup.addCompletion";
|
|
18718
18718
|
/**
|
|
18719
18719
|
* Function implementation
|
|
18720
|
-
*/
|
|
18720
|
+
*/
|
|
18721
18721
|
const addCompletionInternal = beginContext((completionPublicSchema) => {
|
|
18722
18722
|
// Log the operation details if logging is enabled in GLOBAL_CONFIG
|
|
18723
18723
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
@@ -18746,7 +18746,7 @@ const addCompletionInternal = beginContext((completionPublicSchema) => {
|
|
|
18746
18746
|
* const completionSchema = { completionName: "OpenAI", model: "gpt-3.5-turbo" };
|
|
18747
18747
|
* const completionName = addCompletion(completionSchema);
|
|
18748
18748
|
* console.log(completionName); // Outputs "OpenAI"
|
|
18749
|
-
*/
|
|
18749
|
+
*/
|
|
18750
18750
|
function addCompletion(completionSchema) {
|
|
18751
18751
|
return addCompletionInternal(completionSchema);
|
|
18752
18752
|
}
|
|
@@ -20166,7 +20166,7 @@ const MAX_ATTEMPTS = 5;
|
|
|
20166
20166
|
* Provides methods to append, clear, and retrieve messages for tracking interactions in an outline process.
|
|
20167
20167
|
* @class
|
|
20168
20168
|
* @implements {IOutlineHistory }
|
|
20169
|
-
*/
|
|
20169
|
+
*/
|
|
20170
20170
|
class OutlineHistory {
|
|
20171
20171
|
constructor() {
|
|
20172
20172
|
/** @private*/
|
|
@@ -20200,7 +20200,7 @@ class OutlineHistory {
|
|
|
20200
20200
|
* Attempts to produce a valid structured data based on the outline schema, handling validations and retries up to a configurable maximum.
|
|
20201
20201
|
* @private
|
|
20202
20202
|
* @async
|
|
20203
|
-
*/
|
|
20203
|
+
*/
|
|
20204
20204
|
const jsonInternal = beginContext(async (outlineName, param) => {
|
|
20205
20205
|
GLOBAL_CONFIG.CC_LOGGER_ENABLE_LOG &&
|
|
20206
20206
|
swarm$1.loggerService.log(METHOD_NAME$F, {});
|
|
@@ -20337,7 +20337,7 @@ const jsonInternal = beginContext(async (outlineName, param) => {
|
|
|
20337
20337
|
* // Example usage
|
|
20338
20338
|
* const result = await json<"MyOutline", { query: string }>("MyOutline", { query: "example" });
|
|
20339
20339
|
* console.log(result.isValid, result.data); // Logs validation status and data
|
|
20340
|
-
*/
|
|
20340
|
+
*/
|
|
20341
20341
|
async function json(outlineName, param = {}) {
|
|
20342
20342
|
return await jsonInternal(outlineName, param);
|
|
20343
20343
|
}
|
|
@@ -20369,7 +20369,8 @@ const chatInternal = beginContext(async (completionName, messages) => {
|
|
|
20369
20369
|
});
|
|
20370
20370
|
const { content } = await getCompletion({
|
|
20371
20371
|
clientId,
|
|
20372
|
-
messages,
|
|
20372
|
+
messages: messages,
|
|
20373
|
+
agentName: "chat",
|
|
20373
20374
|
mode: "user",
|
|
20374
20375
|
});
|
|
20375
20376
|
unError();
|