@botpress/adk 1.13.16 → 1.13.17
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/bot-generator/generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/bot-generator/generator.ts"],"names":[],"mappings":"AA8BA,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,CAAA;CACpD;AAkBD,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,UAAU,CAAQ;gBAEd,OAAO,EAAE,mBAAmB;YAK1B,kBAAkB;YAuBlB,sBAAsB;IAsB9B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YA+BjB,yBAAyB;YAkEzB,kBAAkB;YAKlB,oBAAoB;YAKpB,gBAAgB;YAKhB,kBAAkB;YAKlB,0BAA0B;YAK1B,kBAAkB;YAKlB,qBAAqB;YAKrB,yBAAyB;YAKzB,mBAAmB;YAMnB,8BAA8B;YAM9B,oBAAoB;YAyEpB,uBAAuB;YAkGvB,8BAA8B;YAiC9B,4BAA4B;YA2B5B,qBAAqB;YA6YrB,gBAAgB;YAyChB,mBAAmB;YAgBnB,gBAAgB;YAiChB,mBAAmB;YAyBnB,UAAU;YAWV,aAAa;IAgBrB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IA6ZnC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAOzC;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8CpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-types.d.ts","sourceRoot":"","sources":["../../src/generators/tag-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;
|
|
1
|
+
{"version":3,"file":"tag-types.d.ts","sourceRoot":"","sources":["../../src/generators/tag-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAsChE,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgE3E"}
|
package/dist/index.js
CHANGED
|
@@ -666,7 +666,7 @@ var PRETTIER_CONFIG, formatCode = async (code, filepath) => {
|
|
|
666
666
|
`));
|
|
667
667
|
return code;
|
|
668
668
|
}
|
|
669
|
-
}, ADK_VERSION = "1.13.
|
|
669
|
+
}, ADK_VERSION = "1.13.17", relative2 = (from, to) => {
|
|
670
670
|
const fromDir = path10.dirname(from);
|
|
671
671
|
const relative3 = path10.relative(fromDir, to);
|
|
672
672
|
return relative3.startsWith(".") ? relative3 : `./${relative3}`;
|
|
@@ -809,7 +809,7 @@ var init_integration_action_types = __esm(() => {
|
|
|
809
809
|
var require_package = __commonJS((exports, module) => {
|
|
810
810
|
module.exports = {
|
|
811
811
|
name: "@botpress/adk",
|
|
812
|
-
version: "1.13.
|
|
812
|
+
version: "1.13.17",
|
|
813
813
|
description: "Core ADK library for building AI agents on Botpress",
|
|
814
814
|
type: "module",
|
|
815
815
|
main: "dist/index.js",
|
|
@@ -856,7 +856,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
856
856
|
"@botpress/cli": "^5.2.0",
|
|
857
857
|
"@botpress/client": "^1.28.0",
|
|
858
858
|
"@botpress/cognitive": "^0.3.3",
|
|
859
|
-
"@botpress/runtime": "^1.13.
|
|
859
|
+
"@botpress/runtime": "^1.13.17",
|
|
860
860
|
"@botpress/sdk": "^5.1.0",
|
|
861
861
|
"@bpinternal/jex": "^1.2.4",
|
|
862
862
|
"@bpinternal/yargs-extra": "^0.0.21",
|
|
@@ -6347,7 +6347,7 @@ class AgentProjectGenerator {
|
|
|
6347
6347
|
deploy: "adk deploy"
|
|
6348
6348
|
},
|
|
6349
6349
|
dependencies: {
|
|
6350
|
-
"@botpress/runtime": `^${"1.13.
|
|
6350
|
+
"@botpress/runtime": `^${"1.13.17"}`
|
|
6351
6351
|
},
|
|
6352
6352
|
devDependencies: {
|
|
6353
6353
|
typescript: "^5.9.3"
|
|
@@ -7282,116 +7282,52 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
7282
7282
|
init_utils();
|
|
7283
7283
|
init_fs();
|
|
7284
7284
|
import path22 from "path";
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
let messageTagsType = "Record<string, string | undefined>";
|
|
7290
|
-
let workflowTagsType = "Record<string, string | undefined>";
|
|
7291
|
-
try {
|
|
7292
|
-
const configPath = path22.join(project.path, "agent.config.ts");
|
|
7293
|
-
const configModule = await import(`${configPath}?t=${Date.now()}`);
|
|
7294
|
-
const config = configModule.default;
|
|
7295
|
-
if (config?.bot?.tags) {
|
|
7296
|
-
const tagKeys = Object.keys(config.bot.tags);
|
|
7297
|
-
if (tagKeys.length > 0) {
|
|
7298
|
-
const tagProps = tagKeys.map((key) => {
|
|
7299
|
-
const tag = config.bot.tags[key];
|
|
7300
|
-
const jsdoc = tag.description ? `/**
|
|
7285
|
+
import { BUILT_IN_TAGS } from "@botpress/runtime/definition";
|
|
7286
|
+
function generateTagTypeString(builtInTags, configTags) {
|
|
7287
|
+
const builtInTagStrings = Object.entries(builtInTags).map(([key, tag]) => {
|
|
7288
|
+
const jsdoc = tag.description ? `/**
|
|
7301
7289
|
* ${tag.title}
|
|
7302
7290
|
*
|
|
7303
7291
|
* ${tag.description}
|
|
7304
7292
|
*/
|
|
7305
7293
|
` : `/** ${tag.title} */
|
|
7306
7294
|
`;
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
${tagProps}
|
|
7312
|
-
}`;
|
|
7313
|
-
}
|
|
7314
|
-
}
|
|
7315
|
-
if (config?.user?.tags) {
|
|
7316
|
-
const tagKeys = Object.keys(config.user.tags);
|
|
7317
|
-
if (tagKeys.length > 0) {
|
|
7318
|
-
const tagProps = tagKeys.map((key) => {
|
|
7319
|
-
const tag = config.user.tags[key];
|
|
7320
|
-
const jsdoc = tag.description ? `/**
|
|
7321
|
-
* ${tag.title}
|
|
7322
|
-
*
|
|
7323
|
-
* ${tag.description}
|
|
7324
|
-
*/
|
|
7325
|
-
` : `/** ${tag.title} */
|
|
7326
|
-
`;
|
|
7327
|
-
return `${jsdoc}${key}?: string | undefined`;
|
|
7328
|
-
}).join(`
|
|
7329
|
-
`);
|
|
7330
|
-
userTagsType = `{
|
|
7331
|
-
${tagProps}
|
|
7332
|
-
}`;
|
|
7333
|
-
}
|
|
7334
|
-
}
|
|
7335
|
-
if (config?.conversation?.tags) {
|
|
7336
|
-
const tagKeys = Object.keys(config.conversation.tags);
|
|
7337
|
-
if (tagKeys.length > 0) {
|
|
7338
|
-
const tagProps = tagKeys.map((key) => {
|
|
7339
|
-
const tag = config.conversation.tags[key];
|
|
7340
|
-
const jsdoc = tag.description ? `/**
|
|
7341
|
-
* ${tag.title}
|
|
7342
|
-
*
|
|
7343
|
-
* ${tag.description}
|
|
7344
|
-
*/
|
|
7345
|
-
` : `/** ${tag.title} */
|
|
7346
|
-
`;
|
|
7347
|
-
return `${jsdoc}${key}?: string | undefined`;
|
|
7348
|
-
}).join(`
|
|
7349
|
-
`);
|
|
7350
|
-
conversationTagsType = `{
|
|
7351
|
-
${tagProps}
|
|
7352
|
-
}`;
|
|
7353
|
-
}
|
|
7354
|
-
}
|
|
7355
|
-
if (config?.message?.tags) {
|
|
7356
|
-
const tagKeys = Object.keys(config.message.tags);
|
|
7357
|
-
if (tagKeys.length > 0) {
|
|
7358
|
-
const tagProps = tagKeys.map((key) => {
|
|
7359
|
-
const tag = config.message.tags[key];
|
|
7360
|
-
const jsdoc = tag.description ? `/**
|
|
7361
|
-
* ${tag.title}
|
|
7362
|
-
*
|
|
7363
|
-
* ${tag.description}
|
|
7364
|
-
*/
|
|
7365
|
-
` : `/** ${tag.title} */
|
|
7366
|
-
`;
|
|
7367
|
-
return `${jsdoc}${key}?: string | undefined`;
|
|
7368
|
-
}).join(`
|
|
7369
|
-
`);
|
|
7370
|
-
messageTagsType = `{
|
|
7371
|
-
${tagProps}
|
|
7372
|
-
}`;
|
|
7373
|
-
}
|
|
7374
|
-
}
|
|
7375
|
-
if (config?.workflow?.tags) {
|
|
7376
|
-
const tagKeys = Object.keys(config.workflow.tags);
|
|
7377
|
-
if (tagKeys.length > 0) {
|
|
7378
|
-
const tagProps = tagKeys.map((key) => {
|
|
7379
|
-
const tag = config.workflow.tags[key];
|
|
7380
|
-
const jsdoc = tag.description ? `/**
|
|
7295
|
+
return `${jsdoc}${key}?: string | undefined`;
|
|
7296
|
+
});
|
|
7297
|
+
const configTagStrings = configTags ? Object.entries(configTags).map(([key, tag]) => {
|
|
7298
|
+
const jsdoc = tag.description ? `/**
|
|
7381
7299
|
* ${tag.title}
|
|
7382
7300
|
*
|
|
7383
7301
|
* ${tag.description}
|
|
7384
7302
|
*/
|
|
7385
7303
|
` : `/** ${tag.title} */
|
|
7386
7304
|
`;
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7305
|
+
return `${jsdoc}${key}?: string | undefined`;
|
|
7306
|
+
}) : [];
|
|
7307
|
+
const allTags = [...builtInTagStrings, ...configTagStrings];
|
|
7308
|
+
if (allTags.length === 0) {
|
|
7309
|
+
return "Record<string, string | undefined>";
|
|
7310
|
+
}
|
|
7311
|
+
return `{
|
|
7312
|
+
${allTags.join(`
|
|
7313
|
+
`)}
|
|
7392
7314
|
}`;
|
|
7393
|
-
|
|
7394
|
-
|
|
7315
|
+
}
|
|
7316
|
+
async function generateTagTypes(project) {
|
|
7317
|
+
let botTagsType = "Record<string, string | undefined>";
|
|
7318
|
+
let userTagsType = "Record<string, string | undefined>";
|
|
7319
|
+
let conversationTagsType = "Record<string, string | undefined>";
|
|
7320
|
+
let messageTagsType = "Record<string, string | undefined>";
|
|
7321
|
+
let workflowTagsType = "Record<string, string | undefined>";
|
|
7322
|
+
try {
|
|
7323
|
+
const configPath = path22.join(project.path, "agent.config.ts");
|
|
7324
|
+
const configModule = await import(`${configPath}?t=${Date.now()}`);
|
|
7325
|
+
const config = configModule.default;
|
|
7326
|
+
botTagsType = generateTagTypeString(BUILT_IN_TAGS.bot, config?.bot?.tags);
|
|
7327
|
+
userTagsType = generateTagTypeString(BUILT_IN_TAGS.user, config?.user?.tags);
|
|
7328
|
+
conversationTagsType = generateTagTypeString(BUILT_IN_TAGS.conversation, config?.conversation?.tags);
|
|
7329
|
+
messageTagsType = generateTagTypeString(BUILT_IN_TAGS.message, config?.message?.tags);
|
|
7330
|
+
workflowTagsType = generateTagTypeString(BUILT_IN_TAGS.workflow, config?.workflow?.tags);
|
|
7395
7331
|
} catch (error) {
|
|
7396
7332
|
console.warn("Failed to load agent config for tag types:", error);
|
|
7397
7333
|
}
|
|
@@ -8105,6 +8041,7 @@ init_utils();
|
|
|
8105
8041
|
import { transforms as transforms3 } from "@botpress/sdk";
|
|
8106
8042
|
init_constants();
|
|
8107
8043
|
import { BuiltInActions as BuiltInActions2, BuiltInWorkflows as BuiltInWorkflows3, Primitives as Primitives3 } from "@botpress/runtime/internal";
|
|
8044
|
+
import { BUILT_IN_TAGS as BUILT_IN_TAGS2 } from "@botpress/runtime/definition";
|
|
8108
8045
|
function isBuiltinWorkflow2(name) {
|
|
8109
8046
|
return !!Object.values(BuiltInWorkflows3).find((x) => x.name === name);
|
|
8110
8047
|
}
|
|
@@ -8545,10 +8482,11 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
8545
8482
|
parts.push(`input: { schema: ${inputSchema} }`);
|
|
8546
8483
|
parts.push(`output: { schema: ${outputSchema} }`);
|
|
8547
8484
|
parts.push(`tags: {
|
|
8485
|
+
...BUILT_IN_TAGS.workflow,
|
|
8548
8486
|
key: {
|
|
8549
8487
|
title: "Workflow Key",
|
|
8550
8488
|
description: "Unique key for workflow deduplication"
|
|
8551
|
-
}
|
|
8489
|
+
},
|
|
8552
8490
|
}`);
|
|
8553
8491
|
workflowDefs.push(`"${definition.name}": {
|
|
8554
8492
|
${parts.join(`,
|
|
@@ -8592,6 +8530,7 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
8592
8530
|
import { BotDefinition, z } from "@botpress/sdk";
|
|
8593
8531
|
import {
|
|
8594
8532
|
BUILT_IN_STATES,
|
|
8533
|
+
BUILT_IN_TAGS,
|
|
8595
8534
|
TranscriptSchema,
|
|
8596
8535
|
TrackedStateSchema,
|
|
8597
8536
|
WorkflowCallbackEvent,
|
|
@@ -8618,38 +8557,33 @@ configuration: {
|
|
|
8618
8557
|
schema: ${configSchemaCode}
|
|
8619
8558
|
},
|
|
8620
8559
|
` : ""}
|
|
8621
|
-
|
|
8560
|
+
user: {
|
|
8622
8561
|
tags: {
|
|
8623
|
-
|
|
8562
|
+
...BUILT_IN_TAGS.user,
|
|
8563
|
+
${Object.entries(userTags).filter(([tag]) => !Object.keys(BUILT_IN_TAGS2.user).includes(tag)).map(([tag, meta]) => `// ${meta.title}
|
|
8624
8564
|
${meta.description ? `// ${meta.description}
|
|
8625
8565
|
` : ""}"${tag}": ${JSON.stringify(meta)}`).join(`,
|
|
8626
|
-
`)}
|
|
8566
|
+
`)}${Object.entries(userTags).filter(([tag]) => !Object.keys(BUILT_IN_TAGS2.user).includes(tag)).length > 0 ? "," : ""}
|
|
8627
8567
|
},
|
|
8628
|
-
}
|
|
8629
|
-
|
|
8568
|
+
},
|
|
8569
|
+
message: {
|
|
8630
8570
|
tags: {
|
|
8631
|
-
|
|
8571
|
+
...BUILT_IN_TAGS.message,
|
|
8572
|
+
${Object.entries(messageTags).filter(([tag]) => !Object.keys(BUILT_IN_TAGS2.message).includes(tag)).map(([tag, meta]) => `// ${meta.title}
|
|
8632
8573
|
${meta.description ? `// ${meta.description}
|
|
8633
8574
|
` : ""}"${tag}": ${JSON.stringify(meta)}`).join(`,
|
|
8634
|
-
`)}
|
|
8575
|
+
`)}${Object.entries(messageTags).filter(([tag]) => !Object.keys(BUILT_IN_TAGS2.message).includes(tag)).length > 0 ? "," : ""}
|
|
8635
8576
|
},
|
|
8636
|
-
}
|
|
8577
|
+
},
|
|
8637
8578
|
conversation: {
|
|
8638
8579
|
tags: {
|
|
8639
|
-
|
|
8580
|
+
...BUILT_IN_TAGS.conversation,
|
|
8581
|
+
${Object.entries(conversationTags).filter(([tag]) => !Object.keys(BUILT_IN_TAGS2.conversation).includes(tag)).map(([tag, meta]) => `// ${meta.title}
|
|
8640
8582
|
${meta.description ? `// ${meta.description}
|
|
8641
8583
|
` : ""}"${tag}": ${JSON.stringify(meta)}`).join(`,
|
|
8642
|
-
`)}${Object.
|
|
8584
|
+
`)}${Object.entries(conversationTags).filter(([tag]) => !Object.keys(BUILT_IN_TAGS2.conversation).includes(tag)).length > 0 ? "," : ""}
|
|
8643
8585
|
},
|
|
8644
8586
|
},
|
|
8645
|
-
${Object.keys(workflowTags).length > 0 ? `workflow: {
|
|
8646
|
-
tags: {
|
|
8647
|
-
${Object.entries(workflowTags).map(([tag, meta]) => `// ${meta.title}
|
|
8648
|
-
${meta.description ? `// ${meta.description}
|
|
8649
|
-
` : ""}"${tag}": ${JSON.stringify(meta)}`).join(`,
|
|
8650
|
-
`)}
|
|
8651
|
-
},
|
|
8652
|
-
},` : ""}
|
|
8653
8587
|
${workflowDefs.length > 0 ? `workflows: {
|
|
8654
8588
|
${workflowDefs.join(`,
|
|
8655
8589
|
`)}
|
|
@@ -11434,4 +11368,4 @@ export {
|
|
|
11434
11368
|
AgentProject
|
|
11435
11369
|
};
|
|
11436
11370
|
|
|
11437
|
-
//# debugId=
|
|
11371
|
+
//# debugId=9343C7F655A901E564756E2164756E21
|