@botpress/runtime 1.10.1 → 1.10.2
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/dist/definition.js +25 -16
- package/dist/definition.js.map +3 -3
- package/dist/internal.js +25 -16
- package/dist/internal.js.map +3 -3
- package/dist/library.js +22 -13
- package/dist/library.js.map +2 -2
- package/dist/primitives/conversation-instance.d.ts.map +1 -1
- package/dist/primitives/workflow-instance.d.ts +5 -0
- package/dist/primitives/workflow-instance.d.ts.map +1 -1
- package/dist/runtime.js +30 -21
- package/dist/runtime.js.map +3 -3
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -48,7 +48,7 @@ var init_define_BUILD = __esm({
|
|
|
48
48
|
var define_PACKAGE_VERSIONS_default;
|
|
49
49
|
var init_define_PACKAGE_VERSIONS = __esm({
|
|
50
50
|
"<define:__PACKAGE_VERSIONS__>"() {
|
|
51
|
-
define_PACKAGE_VERSIONS_default = { runtime: "1.10.
|
|
51
|
+
define_PACKAGE_VERSIONS_default = { runtime: "1.10.2", adk: "1.10.2", sdk: "4.20.2", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -36329,6 +36329,13 @@ var init_workflow_instance = __esm({
|
|
|
36329
36329
|
if (!adk.project.workflows.find((w) => w.name === workflow.name)) {
|
|
36330
36330
|
throw new Error(`No ADK Workflow definition found for "${workflow.name}"`);
|
|
36331
36331
|
}
|
|
36332
|
+
TrackedTags.create({
|
|
36333
|
+
type: "workflow",
|
|
36334
|
+
client: client._inner,
|
|
36335
|
+
id: workflow.id,
|
|
36336
|
+
initialTags: workflow.tags
|
|
36337
|
+
});
|
|
36338
|
+
await TrackedTags.loadAll();
|
|
36332
36339
|
return new _BaseWorkflowInstance(workflow, client);
|
|
36333
36340
|
}
|
|
36334
36341
|
/**
|
|
@@ -36342,11 +36349,16 @@ var init_workflow_instance = __esm({
|
|
|
36342
36349
|
});
|
|
36343
36350
|
return executeFunc(props);
|
|
36344
36351
|
}
|
|
36352
|
+
/**
|
|
36353
|
+
* Cancel the workflow execution.
|
|
36354
|
+
* Note: This should be called from within a proper bot handler context.
|
|
36355
|
+
* If calling from a conversation handler, ensure TrackedTags.loadAll() has been called.
|
|
36356
|
+
*/
|
|
36345
36357
|
async cancel() {
|
|
36358
|
+
await TrackedTags.loadAll();
|
|
36346
36359
|
const { workflow } = await updateWorkflow({
|
|
36347
36360
|
id: this.id,
|
|
36348
|
-
status: "cancelled"
|
|
36349
|
-
failureReason: "Cancelled by user"
|
|
36361
|
+
status: "cancelled"
|
|
36350
36362
|
});
|
|
36351
36363
|
Object.assign(this.workflow, workflow);
|
|
36352
36364
|
}
|
|
@@ -37898,16 +37910,13 @@ var init_conversation_instance = __esm({
|
|
|
37898
37910
|
);
|
|
37899
37911
|
}
|
|
37900
37912
|
this.TrackedState = existingState;
|
|
37901
|
-
const tags =
|
|
37902
|
-
|
|
37903
|
-
|
|
37904
|
-
|
|
37905
|
-
|
|
37906
|
-
|
|
37907
|
-
|
|
37908
|
-
);
|
|
37909
|
-
}
|
|
37910
|
-
this.TrackedTags = existingTags;
|
|
37913
|
+
const tags = TrackedTags.create({
|
|
37914
|
+
type: "conversation",
|
|
37915
|
+
id: conversation.id,
|
|
37916
|
+
client: client._inner,
|
|
37917
|
+
initialTags: conversation.tags
|
|
37918
|
+
});
|
|
37919
|
+
this.TrackedTags = tags;
|
|
37911
37920
|
}
|
|
37912
37921
|
get tags() {
|
|
37913
37922
|
return this.TrackedTags.tags;
|