@botpress/runtime 1.0.1
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/_types/actions.d.ts +3 -0
- package/dist/_types/actions.d.ts.map +1 -0
- package/dist/_types/events.d.ts +5 -0
- package/dist/_types/events.d.ts.map +1 -0
- package/dist/_types/integration-actions.d.ts +3 -0
- package/dist/_types/integration-actions.d.ts.map +1 -0
- package/dist/_types/state.d.ts +4 -0
- package/dist/_types/state.d.ts.map +1 -0
- package/dist/_types/tables.d.ts +3 -0
- package/dist/_types/tables.d.ts.map +1 -0
- package/dist/_types/triggers.d.ts +3 -0
- package/dist/_types/triggers.d.ts.map +1 -0
- package/dist/_types/workflows.d.ts +12 -0
- package/dist/_types/workflows.d.ts.map +1 -0
- package/dist/constants.d.ts +58 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/consts.d.ts +8 -0
- package/dist/consts.d.ts.map +1 -0
- package/dist/debugging/node-inspector.d.ts +5 -0
- package/dist/debugging/node-inspector.d.ts.map +1 -0
- package/dist/define-config.d.ts +70 -0
- package/dist/define-config.d.ts.map +1 -0
- package/dist/definition.d.ts +10 -0
- package/dist/definition.d.ts.map +1 -0
- package/dist/definition.js +88 -0
- package/dist/definition.js.map +7 -0
- package/dist/environment.d.ts +60 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/errors.d.ts +36 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/globals.d.ts +21 -0
- package/dist/globals.d.ts.map +1 -0
- package/dist/internal.d.ts +15 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +46573 -0
- package/dist/internal.js.map +7 -0
- package/dist/library.d.ts +16 -0
- package/dist/library.d.ts.map +1 -0
- package/dist/library.js +45943 -0
- package/dist/library.js.map +7 -0
- package/dist/primitives/action.d.ts +37 -0
- package/dist/primitives/action.d.ts.map +1 -0
- package/dist/primitives/asset.d.ts +28 -0
- package/dist/primitives/asset.d.ts.map +1 -0
- package/dist/primitives/conversation.d.ts +104 -0
- package/dist/primitives/conversation.d.ts.map +1 -0
- package/dist/primitives/data-sources/index.d.ts +7 -0
- package/dist/primitives/data-sources/index.d.ts.map +1 -0
- package/dist/primitives/data-sources/source-base.d.ts +251 -0
- package/dist/primitives/data-sources/source-base.d.ts.map +1 -0
- package/dist/primitives/data-sources/source-directory.d.ts +119 -0
- package/dist/primitives/data-sources/source-directory.d.ts.map +1 -0
- package/dist/primitives/data-sources/source-table.d.ts +135 -0
- package/dist/primitives/data-sources/source-table.d.ts.map +1 -0
- package/dist/primitives/data-sources/source-website.d.ts +226 -0
- package/dist/primitives/data-sources/source-website.d.ts.map +1 -0
- package/dist/primitives/definition.d.ts +68 -0
- package/dist/primitives/definition.d.ts.map +1 -0
- package/dist/primitives/index.d.ts +149 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/knowledge.d.ts +36 -0
- package/dist/primitives/knowledge.d.ts.map +1 -0
- package/dist/primitives/table.d.ts +153 -0
- package/dist/primitives/table.d.ts.map +1 -0
- package/dist/primitives/trigger.d.ts +26 -0
- package/dist/primitives/trigger.d.ts.map +1 -0
- package/dist/primitives/workflow-instance.d.ts +80 -0
- package/dist/primitives/workflow-instance.d.ts.map +1 -0
- package/dist/primitives/workflow-step.d.ts +184 -0
- package/dist/primitives/workflow-step.d.ts.map +1 -0
- package/dist/primitives/workflow-utils.d.ts +36 -0
- package/dist/primitives/workflow-utils.d.ts.map +1 -0
- package/dist/primitives/workflow.d.ts +86 -0
- package/dist/primitives/workflow.d.ts.map +1 -0
- package/dist/runtime/actions.d.ts +6 -0
- package/dist/runtime/actions.d.ts.map +1 -0
- package/dist/runtime/adk.d.ts +54 -0
- package/dist/runtime/adk.d.ts.map +1 -0
- package/dist/runtime/agent-registry.d.ts +33 -0
- package/dist/runtime/agent-registry.d.ts.map +1 -0
- package/dist/runtime/assets.d.ts +48 -0
- package/dist/runtime/assets.d.ts.map +1 -0
- package/dist/runtime/autonomous.d.ts +86 -0
- package/dist/runtime/autonomous.d.ts.map +1 -0
- package/dist/runtime/chat/chat.d.ts +42 -0
- package/dist/runtime/chat/chat.d.ts.map +1 -0
- package/dist/runtime/chat/citations.d.ts +9 -0
- package/dist/runtime/chat/citations.d.ts.map +1 -0
- package/dist/runtime/chat/html.d.ts +2 -0
- package/dist/runtime/chat/html.d.ts.map +1 -0
- package/dist/runtime/chat/index.d.ts +5 -0
- package/dist/runtime/chat/index.d.ts.map +1 -0
- package/dist/runtime/chat/messages.d.ts +35 -0
- package/dist/runtime/chat/messages.d.ts.map +1 -0
- package/dist/runtime/chat/transcript.d.ts +75 -0
- package/dist/runtime/chat/transcript.d.ts.map +1 -0
- package/dist/runtime/chat/truncate-object.d.ts +12 -0
- package/dist/runtime/chat/truncate-object.d.ts.map +1 -0
- package/dist/runtime/chat/truncate-transcript.d.ts +6 -0
- package/dist/runtime/chat/truncate-transcript.d.ts.map +1 -0
- package/dist/runtime/config.d.ts +19 -0
- package/dist/runtime/config.d.ts.map +1 -0
- package/dist/runtime/context/cognitive.d.ts +7 -0
- package/dist/runtime/context/cognitive.d.ts.map +1 -0
- package/dist/runtime/context/context.d.ts +59 -0
- package/dist/runtime/context/context.d.ts.map +1 -0
- package/dist/runtime/context/handlers.d.ts +14 -0
- package/dist/runtime/context/handlers.d.ts.map +1 -0
- package/dist/runtime/context/http.d.ts +38 -0
- package/dist/runtime/context/http.d.ts.map +1 -0
- package/dist/runtime/context/inspector-handler.d.ts +59 -0
- package/dist/runtime/context/inspector-handler.d.ts.map +1 -0
- package/dist/runtime/context/promises.d.ts +36 -0
- package/dist/runtime/context/promises.d.ts.map +1 -0
- package/dist/runtime/events.d.ts +89 -0
- package/dist/runtime/events.d.ts.map +1 -0
- package/dist/runtime/handlers/conversation.d.ts +3 -0
- package/dist/runtime/handlers/conversation.d.ts.map +1 -0
- package/dist/runtime/handlers/event.d.ts +3 -0
- package/dist/runtime/handlers/event.d.ts.map +1 -0
- package/dist/runtime/handlers/index.d.ts +11 -0
- package/dist/runtime/handlers/index.d.ts.map +1 -0
- package/dist/runtime/handlers/trigger.d.ts +3 -0
- package/dist/runtime/handlers/trigger.d.ts.map +1 -0
- package/dist/runtime/handlers/workflow.d.ts +3 -0
- package/dist/runtime/handlers/workflow.d.ts.map +1 -0
- package/dist/runtime/heavy-imports.d.ts +10 -0
- package/dist/runtime/heavy-imports.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +13 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/interfaces.d.ts +16 -0
- package/dist/runtime/interfaces.d.ts.map +1 -0
- package/dist/runtime/singletons.d.ts +21 -0
- package/dist/runtime/singletons.d.ts.map +1 -0
- package/dist/runtime/state.d.ts +8 -0
- package/dist/runtime/state.d.ts.map +1 -0
- package/dist/runtime/tracked-state-schema.d.ts +36 -0
- package/dist/runtime/tracked-state-schema.d.ts.map +1 -0
- package/dist/runtime/tracked-state.d.ts +57 -0
- package/dist/runtime/tracked-state.d.ts.map +1 -0
- package/dist/runtime/workflows/index.d.ts +7 -0
- package/dist/runtime/workflows/index.d.ts.map +1 -0
- package/dist/runtime/workflows/knowledge-indexing.d.ts +109 -0
- package/dist/runtime/workflows/knowledge-indexing.d.ts.map +1 -0
- package/dist/runtime.d.ts +22 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +47545 -0
- package/dist/runtime.js.map +7 -0
- package/dist/telemetry/context-manager.d.ts +16 -0
- package/dist/telemetry/context-manager.d.ts.map +1 -0
- package/dist/telemetry/file-exporter.d.ts +11 -0
- package/dist/telemetry/file-exporter.d.ts.map +1 -0
- package/dist/telemetry/instrument-http.d.ts +4 -0
- package/dist/telemetry/instrument-http.d.ts.map +1 -0
- package/dist/telemetry/live-file-processor.d.ts +13 -0
- package/dist/telemetry/live-file-processor.d.ts.map +1 -0
- package/dist/telemetry/span-helpers.d.ts +30 -0
- package/dist/telemetry/span-helpers.d.ts.map +1 -0
- package/dist/telemetry/spans/factory.d.ts +44 -0
- package/dist/telemetry/spans/factory.d.ts.map +1 -0
- package/dist/telemetry/spans/index.d.ts +1009 -0
- package/dist/telemetry/spans/index.d.ts.map +1 -0
- package/dist/telemetry/spans/well-known-attributes.d.ts +78 -0
- package/dist/telemetry/spans/well-known-attributes.d.ts.map +1 -0
- package/dist/telemetry/structured-logging.d.ts +34 -0
- package/dist/telemetry/structured-logging.d.ts.map +1 -0
- package/dist/telemetry/tracing.d.ts +6 -0
- package/dist/telemetry/tracing.d.ts.map +1 -0
- package/dist/telemetry/utils.d.ts +3 -0
- package/dist/telemetry/utils.d.ts.map +1 -0
- package/dist/types.d.ts +17 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/ui.d.ts +10 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +749 -0
- package/dist/ui.js.map +7 -0
- package/dist/utilities/abort-signal.d.ts +41 -0
- package/dist/utilities/abort-signal.d.ts.map +1 -0
- package/dist/utilities/events.d.ts +10 -0
- package/dist/utilities/events.d.ts.map +1 -0
- package/dist/utilities/promises.d.ts +3 -0
- package/dist/utilities/promises.d.ts.map +1 -0
- package/dist/utilities/size.d.ts +12 -0
- package/dist/utilities/size.d.ts.map +1 -0
- package/dist/utilities/strings.d.ts +18 -0
- package/dist/utilities/strings.d.ts.map +1 -0
- package/dist/utilities/trigger-tags.d.ts +31 -0
- package/dist/utilities/trigger-tags.d.ts.map +1 -0
- package/dist/utilities/types.d.ts +2 -0
- package/dist/utilities/types.d.ts.map +1 -0
- package/dist/workers/dev_worker.d.ts +6 -0
- package/dist/workers/dev_worker.d.ts.map +1 -0
- package/dist/workers/index.d.ts +5 -0
- package/dist/workers/index.d.ts.map +1 -0
- package/dist/workers/parent_worker.d.ts +5 -0
- package/dist/workers/parent_worker.d.ts.map +1 -0
- package/dist/workers/worker_pool.d.ts +109 -0
- package/dist/workers/worker_pool.d.ts.map +1 -0
- package/package.json +109 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/_types/actions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,IAAI,EAAE,EAAE,MAAM,kCAAkC,CAAC;AAEzE,MAAM,MAAM,UAAU,GAAG,EAAE,SAAS,KAAK,GAAG,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Events as E, EventName as EN, EventPayload as EP } from "@botpress/runtime/_types/events";
|
|
2
|
+
export type Events = E extends never ? never : E;
|
|
3
|
+
export type EventName = EN extends never ? never : EN;
|
|
4
|
+
export type EventPayload<T extends EventName> = EP<T> extends never ? never : EP<T>;
|
|
5
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/_types/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,IAAI,CAAC,EACX,SAAS,IAAI,EAAE,EACf,YAAY,IAAI,EAAE,EAEnB,MAAM,iCAAiC,CAAC;AAGzC,MAAM,MAAM,MAAM,GAAG,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;AACjD,MAAM,MAAM,SAAS,GAAG,EAAE,SAAS,KAAK,GAAG,KAAK,GAAG,EAAE,CAAC;AACtD,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,IAC1C,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-actions.d.ts","sourceRoot":"","sources":["../../src/_types/integration-actions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,IAAI,EAAE,EAAE,MAAM,8CAA8C,CAAC;AAE7F,MAAM,MAAM,kBAAkB,GAAG,EAAE,SAAS,KAAK,GAAG,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/_types/state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,IAAI,EAAE,EAAE,SAAS,IAAI,EAAE,EAAC,MAAM,gCAAgC,CAAC;AAGrF,MAAM,MAAM,QAAQ,GAAG,EAAE,SAAS,KAAK,GAAG,KAAK,GAAG,EAAE,CAAC;AACrD,MAAM,MAAM,SAAS,GAAG,EAAE,SAAS,KAAK,GAAG,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../src/_types/tables.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,IAAI,EAAE,EAAE,MAAM,iCAAiC,CAAC;AAE9E,MAAM,MAAM,gBAAgB,GAAG,EAAE,SAAS,KAAK,GAAG,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../../src/_types/triggers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,IAAI,CAAC,EAEd,MAAM,mCAAmC,CAAC;AAG3C,MAAM,MAAM,QAAQ,GAAG,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { WorkflowDefinitions as WD } from "@botpress/runtime/_types/workflows";
|
|
2
|
+
export type WorkflowDefinitions = WD extends never ? never : WD;
|
|
3
|
+
export type WorkflowInputs = {
|
|
4
|
+
[K in keyof WorkflowDefinitions]: WorkflowDefinitions[K]["input"];
|
|
5
|
+
};
|
|
6
|
+
export type WorkflowOutputs = {
|
|
7
|
+
[K in keyof WorkflowDefinitions]: WorkflowDefinitions[K]["output"];
|
|
8
|
+
};
|
|
9
|
+
export type WorkflowStates = {
|
|
10
|
+
[K in keyof WorkflowDefinitions]: WorkflowDefinitions[K]["state"];
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=workflows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/_types/workflows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,IAAI,EAAE,EAAE,MAAM,oCAAoC,CAAC;AAEpF,MAAM,MAAM,mBAAmB,GAAG,EAAE,SAAS,KAAK,GAAG,KAAK,GAAG,EAAE,CAAC;AAEhE,MAAM,MAAM,cAAc,GAAG;KAC1B,CAAC,IAAI,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;CAClE,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;KAC3B,CAAC,IAAI,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;CACnE,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;KAC1B,CAAC,IAAI,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;CAClE,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare const Knowledge: {};
|
|
2
|
+
export declare const WellKnownTags: {
|
|
3
|
+
readonly knowledge: {
|
|
4
|
+
/**
|
|
5
|
+
* All knowledge base have this tag (with value "true") to identify them as knowledge-related records.
|
|
6
|
+
* @example "knowledge": "true"
|
|
7
|
+
*/
|
|
8
|
+
readonly KNOWLEDGE: "knowledge";
|
|
9
|
+
/**
|
|
10
|
+
* The ID of the knowledge base the record belongs to.
|
|
11
|
+
* This is the ID of the Knowledge Base primitive
|
|
12
|
+
* @example "kbId": "kb_01K6RT9T39KF7K0A7R7D71TDZ1"
|
|
13
|
+
* @deprecated Use KNOWLEDGE_BASE_NAME for now, as we will be moving to IDs later.
|
|
14
|
+
*/
|
|
15
|
+
readonly KNOWLEDGE_BASE_ID: "kbId";
|
|
16
|
+
/**
|
|
17
|
+
* The name of the knowledge base as defined in the Knowledge Base primitive by the user.
|
|
18
|
+
* @example "kbName": "My Files"
|
|
19
|
+
*/
|
|
20
|
+
readonly KNOWLEDGE_BASE_NAME: "kbName";
|
|
21
|
+
/**
|
|
22
|
+
* The ID of the Data Source the record was ingested from.
|
|
23
|
+
* @example "sourceId": "docs"
|
|
24
|
+
*/
|
|
25
|
+
readonly KNOWLEDGE_SOURCE_ID: "sourceId";
|
|
26
|
+
/**
|
|
27
|
+
* The type of the Data Source the record was ingested from.
|
|
28
|
+
* Possible values are: "directory", "table", "api", etc.
|
|
29
|
+
* @example "sourceType": "directory"
|
|
30
|
+
*/
|
|
31
|
+
readonly KNOWLEDGE_SOURCE_TYPE: "sourceType";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare const WellKnownMetadata: {
|
|
35
|
+
readonly knowledge: {
|
|
36
|
+
/**
|
|
37
|
+
* The title of the document or page.
|
|
38
|
+
* @example "title": "Getting Started Guide"
|
|
39
|
+
*/
|
|
40
|
+
readonly TITLE: "title";
|
|
41
|
+
/**
|
|
42
|
+
* The URL of the document or page.
|
|
43
|
+
* @example "url": "https://example.com/docs/getting-started"
|
|
44
|
+
*/
|
|
45
|
+
readonly URL: "url";
|
|
46
|
+
/**
|
|
47
|
+
* The favicon URL of the website.
|
|
48
|
+
* @example "favicon": "https://example.com/favicon.ico"
|
|
49
|
+
*/
|
|
50
|
+
readonly FAVICON: "favicon";
|
|
51
|
+
/**
|
|
52
|
+
* A brief description of the document or page.
|
|
53
|
+
* @example "description": "Learn how to get started with our platform"
|
|
54
|
+
*/
|
|
55
|
+
readonly DESCRIPTION: "description";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,IAAc,CAAC;AAErC,eAAO,MAAM,aAAa;;QAEtB;;;WAGG;;QAGH;;;;;WAKG;;QAGH;;;WAGG;;QAGH;;;WAGG;;QAGH;;;;WAIG;;;CAGG,CAAC;AAEX,eAAO,MAAM,iBAAiB;;QAE1B;;;WAGG;;QAGH;;;WAGG;;QAGH;;;WAGG;;QAGH;;;WAGG;;;CAGG,CAAC"}
|
package/dist/consts.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const BOT_ID_HEADER = "x-bot-id";
|
|
2
|
+
export declare const BOT_USER_ID_HEADER = "x-bot-user-id";
|
|
3
|
+
export declare const WEBHOOK_ID_HEADER = "x-webhook-id";
|
|
4
|
+
export declare const CONFIGURATION_TYPE_HEADER = "x-bp-configuration-type";
|
|
5
|
+
export declare const CONFIGURATION_PAYLOAD_HEADER = "x-bp-configuration";
|
|
6
|
+
export declare const OPERATION_TYPE_HEADER = "x-bp-operation";
|
|
7
|
+
export declare const OPERATION_SUBTYPE_HEADER = "x-bp-type";
|
|
8
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,aAAa,CAAC;AACxC,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAClD,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAChD,eAAO,MAAM,yBAAyB,4BAA4B,CAAC;AACnE,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AACjE,eAAO,MAAM,qBAAqB,mBAAmB,CAAC;AACtD,eAAO,MAAM,wBAAwB,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-inspector.d.ts","sourceRoot":"","sources":["../../src/debugging/node-inspector.ts"],"names":[],"mappings":"AAKA,wBAAsB,mBAAmB,CAAC,EACxC,IAAY,EACZ,IAAkB,GACnB;;;CAAK,iBAyBL"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Autonomous } from "./runtime";
|
|
2
|
+
import { z } from "@botpress/sdk";
|
|
3
|
+
declare const configSchema: import("@bpinternal/zui").ZodObject<{
|
|
4
|
+
name: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
5
|
+
description: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodString>;
|
|
6
|
+
user: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodObject<{
|
|
7
|
+
state: import("@bpinternal/zui").ZodOptional<z.Schema<z.Schema<any, import("@bpinternal/zui").ZodTypeDef, any>, import("@bpinternal/zui").ZodTypeDef, z.Schema<any, import("@bpinternal/zui").ZodTypeDef, any>>>;
|
|
8
|
+
}, "strip", {
|
|
9
|
+
state?: z.Schema<any, import("@bpinternal/zui").ZodTypeDef, any> | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
state?: z.Schema<any, import("@bpinternal/zui").ZodTypeDef, any> | undefined;
|
|
12
|
+
}>>;
|
|
13
|
+
bot: import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodObject<{
|
|
14
|
+
state: import("@bpinternal/zui").ZodOptional<z.Schema<z.Schema<any, import("@bpinternal/zui").ZodTypeDef, any>, import("@bpinternal/zui").ZodTypeDef, z.Schema<any, import("@bpinternal/zui").ZodTypeDef, any>>>;
|
|
15
|
+
}, "strip", {
|
|
16
|
+
state?: z.Schema<any, import("@bpinternal/zui").ZodTypeDef, any> | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
state?: z.Schema<any, import("@bpinternal/zui").ZodTypeDef, any> | undefined;
|
|
19
|
+
}>>;
|
|
20
|
+
defaultModels: z.ZodTransformer<import("@bpinternal/zui").ZodOptional<import("@bpinternal/zui").ZodObject<{
|
|
21
|
+
zai: z.Schema<Autonomous.Model | Autonomous.Model[], import("@bpinternal/zui").ZodTypeDef, Autonomous.Model | Autonomous.Model[]>;
|
|
22
|
+
autonomous: z.Schema<Autonomous.Model | Autonomous.Model[], import("@bpinternal/zui").ZodTypeDef, Autonomous.Model | Autonomous.Model[]>;
|
|
23
|
+
}, "strip", {
|
|
24
|
+
zai: Autonomous.Model | Autonomous.Model[];
|
|
25
|
+
autonomous: Autonomous.Model | Autonomous.Model[];
|
|
26
|
+
}, {
|
|
27
|
+
zai: Autonomous.Model | Autonomous.Model[];
|
|
28
|
+
autonomous: Autonomous.Model | Autonomous.Model[];
|
|
29
|
+
}>>, {
|
|
30
|
+
zai: Autonomous.Model | Autonomous.Model[];
|
|
31
|
+
autonomous: Autonomous.Model | Autonomous.Model[];
|
|
32
|
+
}, {
|
|
33
|
+
zai: Autonomous.Model | Autonomous.Model[];
|
|
34
|
+
autonomous: Autonomous.Model | Autonomous.Model[];
|
|
35
|
+
} | undefined>;
|
|
36
|
+
}, "strip", {
|
|
37
|
+
defaultModels: {
|
|
38
|
+
zai: Autonomous.Model | Autonomous.Model[];
|
|
39
|
+
autonomous: Autonomous.Model | Autonomous.Model[];
|
|
40
|
+
};
|
|
41
|
+
description?: string | undefined;
|
|
42
|
+
name?: string | undefined;
|
|
43
|
+
user?: {
|
|
44
|
+
state?: z.Schema<any, import("@bpinternal/zui").ZodTypeDef, any> | undefined;
|
|
45
|
+
} | undefined;
|
|
46
|
+
bot?: {
|
|
47
|
+
state?: z.Schema<any, import("@bpinternal/zui").ZodTypeDef, any> | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
description?: string | undefined;
|
|
51
|
+
name?: string | undefined;
|
|
52
|
+
user?: {
|
|
53
|
+
state?: z.Schema<any, import("@bpinternal/zui").ZodTypeDef, any> | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
bot?: {
|
|
56
|
+
state?: z.Schema<any, import("@bpinternal/zui").ZodTypeDef, any> | undefined;
|
|
57
|
+
} | undefined;
|
|
58
|
+
defaultModels?: {
|
|
59
|
+
zai: Autonomous.Model | Autonomous.Model[];
|
|
60
|
+
autonomous: Autonomous.Model | Autonomous.Model[];
|
|
61
|
+
} | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
type AgentConfigProps = z.input<typeof configSchema>;
|
|
64
|
+
export type AgentConfig = z.output<typeof configSchema> & {
|
|
65
|
+
__brand: "AgentConfig";
|
|
66
|
+
};
|
|
67
|
+
export declare const defineConfig: (config?: AgentConfigProps) => AgentConfig;
|
|
68
|
+
export declare const isAgentConfig: (value: unknown) => value is AgentConfig;
|
|
69
|
+
export {};
|
|
70
|
+
//# sourceMappingURL=define-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-config.d.ts","sourceRoot":"","sources":["../src/define-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,CAAC,EAAW,MAAM,eAAe,CAAC;AA0B3C,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBhB,CAAC;AAEH,KAAK,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACrD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,YAAY,CAAC,GAAG;IACxD,OAAO,EAAE,aAAa,CAAC;CACxB,CAAC;AAIF,eAAO,MAAM,YAAY,GAAI,SAAQ,gBAAqB,KAAG,WAO5D,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,WAOvD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bot definition exports - minimal, side-effect free exports for bot.definition.ts files
|
|
3
|
+
*
|
|
4
|
+
* This module provides only the schemas and types needed for bot definitions,
|
|
5
|
+
* without importing any heavy dependencies or causing side effects.
|
|
6
|
+
*/
|
|
7
|
+
export { TranscriptSchema } from "./runtime/chat/transcript";
|
|
8
|
+
export { TrackedStateSchema } from "./runtime/tracked-state-schema";
|
|
9
|
+
export { WorkflowCallbackEvent, WorkflowScheduleEvent, WorkflowContinueEvent, SubworkflowFinished, WorkflowDataRequestEvent, } from "./runtime/events";
|
|
10
|
+
//# sourceMappingURL=definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../src/definition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// src/runtime/chat/transcript.ts
|
|
2
|
+
import { z } from "@botpress/sdk";
|
|
3
|
+
var AttachmentSchema = z.object({
|
|
4
|
+
type: z.literal("image"),
|
|
5
|
+
url: z.string()
|
|
6
|
+
});
|
|
7
|
+
var TranscriptItemSchema = z.object({
|
|
8
|
+
id: z.string(),
|
|
9
|
+
role: z.union([
|
|
10
|
+
z.literal("assistant"),
|
|
11
|
+
z.literal("user"),
|
|
12
|
+
z.literal("event"),
|
|
13
|
+
z.literal("summary")
|
|
14
|
+
]),
|
|
15
|
+
name: z.string().optional(),
|
|
16
|
+
createdAt: z.string().optional(),
|
|
17
|
+
content: z.string().optional(),
|
|
18
|
+
attachments: z.array(AttachmentSchema).optional(),
|
|
19
|
+
payload: z.unknown().optional()
|
|
20
|
+
});
|
|
21
|
+
var TranscriptSchema = z.array(TranscriptItemSchema);
|
|
22
|
+
|
|
23
|
+
// src/runtime/tracked-state-schema.ts
|
|
24
|
+
import { z as z2 } from "@botpress/sdk";
|
|
25
|
+
var TrackedStateSchema = z2.object({
|
|
26
|
+
value: z2.any(),
|
|
27
|
+
location: z2.discriminatedUnion("type", [
|
|
28
|
+
z2.object({ type: z2.literal("state") }),
|
|
29
|
+
z2.object({ type: z2.literal("file"), key: z2.string() })
|
|
30
|
+
])
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// src/runtime/events.ts
|
|
34
|
+
import { z as z3 } from "@botpress/sdk";
|
|
35
|
+
var WorkflowCallbackEvent = {
|
|
36
|
+
name: "workflowCallback",
|
|
37
|
+
schema: z3.object({
|
|
38
|
+
workflow: z3.string(),
|
|
39
|
+
workflowId: z3.string(),
|
|
40
|
+
target: z3.union([
|
|
41
|
+
z3.object({
|
|
42
|
+
conversationId: z3.string()
|
|
43
|
+
}),
|
|
44
|
+
z3.object({
|
|
45
|
+
workflowId: z3.string()
|
|
46
|
+
})
|
|
47
|
+
]),
|
|
48
|
+
status: z3.enum(["completed", "failed", "canceled", "timed_out"]),
|
|
49
|
+
output: z3.any().optional(),
|
|
50
|
+
error: z3.string().optional()
|
|
51
|
+
})
|
|
52
|
+
};
|
|
53
|
+
var WorkflowScheduleEvent = {
|
|
54
|
+
name: "workflowSchedule",
|
|
55
|
+
schema: z3.object({
|
|
56
|
+
workflow: z3.string()
|
|
57
|
+
})
|
|
58
|
+
};
|
|
59
|
+
var WorkflowContinueEvent = {
|
|
60
|
+
name: "workflowContinue",
|
|
61
|
+
schema: z3.object({})
|
|
62
|
+
};
|
|
63
|
+
var SubworkflowFinished = {
|
|
64
|
+
name: "subworkflowFinished",
|
|
65
|
+
schema: z3.object({})
|
|
66
|
+
};
|
|
67
|
+
var WorkflowDataRequestEvent = {
|
|
68
|
+
name: "workflowDataRequest",
|
|
69
|
+
schema: z3.object({
|
|
70
|
+
workflowId: z3.string(),
|
|
71
|
+
workflowName: z3.string(),
|
|
72
|
+
stepName: z3.string(),
|
|
73
|
+
request: z3.string(),
|
|
74
|
+
message: z3.string(),
|
|
75
|
+
schema: z3.any()
|
|
76
|
+
// JSON Schema
|
|
77
|
+
})
|
|
78
|
+
};
|
|
79
|
+
export {
|
|
80
|
+
SubworkflowFinished,
|
|
81
|
+
TrackedStateSchema,
|
|
82
|
+
TranscriptSchema,
|
|
83
|
+
WorkflowCallbackEvent,
|
|
84
|
+
WorkflowContinueEvent,
|
|
85
|
+
WorkflowDataRequestEvent,
|
|
86
|
+
WorkflowScheduleEvent
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/runtime/chat/transcript.ts", "../src/runtime/tracked-state-schema.ts", "../src/runtime/events.ts"],
|
|
4
|
+
"sourcesContent": ["import { z } from \"@botpress/sdk\";\n\nexport type TranscriptAttachment = {\n type: \"image\";\n url: string;\n};\n\nexport type TranscriptAssistantMessage = {\n id: string;\n role: \"assistant\";\n name?: string;\n createdAt?: string;\n content: string;\n};\n\nexport type TranscriptUserMessage = {\n id: string;\n role: \"user\";\n createdAt?: string;\n name?: string;\n content: string;\n attachments?: Array<TranscriptAttachment>;\n};\n\nexport type TranscriptEventMessage = {\n id: string;\n role: \"event\";\n createdAt?: string;\n name: string;\n payload: unknown;\n attachments?: Array<TranscriptAttachment>;\n};\n\nexport type TranscriptSummaryMessage = {\n id: string;\n role: \"summary\";\n content: string;\n attachments?: Array<TranscriptAttachment>;\n};\n\nexport type TranscriptItem =\n | TranscriptAssistantMessage\n | TranscriptUserMessage\n | TranscriptEventMessage\n | TranscriptSummaryMessage;\n\nconst AttachmentSchema = z.object({\n type: z.literal(\"image\"),\n url: z.string(),\n});\n\n// There's a bug in the bridge, we can't use unions and discriminated unions.\n// The resulting type will be the lowest common denominator and attachments will be stripped\n// So instead we use a single schema that is flexible enough to handle all types of messages\nconst TranscriptItemSchema = z.object({\n id: z.string(),\n role: z.union([\n z.literal(\"assistant\"),\n z.literal(\"user\"),\n z.literal(\"event\"),\n z.literal(\"summary\"),\n ]),\n name: z.string().optional(),\n createdAt: z.string().optional(),\n content: z.string().optional(),\n attachments: z.array(AttachmentSchema).optional(),\n payload: z.unknown().optional(),\n});\n\nexport const TranscriptSchema = z.array(TranscriptItemSchema);\n", "import { z } from \"@botpress/sdk\";\n\nexport const TrackedStateSchema = z.object({\n value: z.any(),\n location: z.discriminatedUnion(\"type\", [\n z.object({ type: z.literal(\"state\") }),\n z.object({ type: z.literal(\"file\"), key: z.string() }),\n ]),\n});\n", "import { z } from \"@botpress/sdk\";\n\ntype EventDefinition<T extends string = string> = {\n name: T;\n description?: string;\n schema: z.ZodSchema;\n};\n\nexport const WorkflowCallbackEvent = {\n name: \"workflowCallback\" as const,\n schema: z.object({\n workflow: z.string(),\n workflowId: z.string(),\n target: z.union([\n z.object({\n conversationId: z.string(),\n }),\n z.object({\n workflowId: z.string(),\n }),\n ]),\n status: z.enum([\"completed\", \"failed\", \"canceled\", \"timed_out\"]),\n output: z.any().optional(),\n error: z.string().optional(),\n }),\n} satisfies EventDefinition;\n\nexport const WorkflowScheduleEvent = {\n name: \"workflowSchedule\" as const,\n schema: z.object({\n workflow: z.string(),\n }),\n} satisfies EventDefinition;\n\nexport const WorkflowContinueEvent = {\n name: \"workflowContinue\" as const,\n schema: z.object({}),\n};\n\nexport const SubworkflowFinished = {\n name: \"subworkflowFinished\" as const,\n schema: z.object({}),\n};\n\nexport const WorkflowDataRequestEvent = {\n name: \"workflowDataRequest\" as const,\n schema: z.object({\n workflowId: z.string(),\n workflowName: z.string(),\n stepName: z.string(),\n request: z.string(),\n message: z.string(),\n schema: z.any(), // JSON Schema\n }),\n} satisfies EventDefinition;\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,SAAS;AA8ClB,IAAM,mBAAmB,EAAE,OAAO;AAAA,EAChC,MAAM,EAAE,QAAQ,OAAO;AAAA,EACvB,KAAK,EAAE,OAAO;AAChB,CAAC;AAKD,IAAM,uBAAuB,EAAE,OAAO;AAAA,EACpC,IAAI,EAAE,OAAO;AAAA,EACb,MAAM,EAAE,MAAM;AAAA,IACZ,EAAE,QAAQ,WAAW;AAAA,IACrB,EAAE,QAAQ,MAAM;AAAA,IAChB,EAAE,QAAQ,OAAO;AAAA,IACjB,EAAE,QAAQ,SAAS;AAAA,EACrB,CAAC;AAAA,EACD,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,aAAa,EAAE,MAAM,gBAAgB,EAAE,SAAS;AAAA,EAChD,SAAS,EAAE,QAAQ,EAAE,SAAS;AAChC,CAAC;AAEM,IAAM,mBAAmB,EAAE,MAAM,oBAAoB;;;ACrE5D,SAAS,KAAAA,UAAS;AAEX,IAAM,qBAAqBA,GAAE,OAAO;AAAA,EACzC,OAAOA,GAAE,IAAI;AAAA,EACb,UAAUA,GAAE,mBAAmB,QAAQ;AAAA,IACrCA,GAAE,OAAO,EAAE,MAAMA,GAAE,QAAQ,OAAO,EAAE,CAAC;AAAA,IACrCA,GAAE,OAAO,EAAE,MAAMA,GAAE,QAAQ,MAAM,GAAG,KAAKA,GAAE,OAAO,EAAE,CAAC;AAAA,EACvD,CAAC;AACH,CAAC;;;ACRD,SAAS,KAAAC,UAAS;AAQX,IAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,QAAQA,GAAE,OAAO;AAAA,IACf,UAAUA,GAAE,OAAO;AAAA,IACnB,YAAYA,GAAE,OAAO;AAAA,IACrB,QAAQA,GAAE,MAAM;AAAA,MACdA,GAAE,OAAO;AAAA,QACP,gBAAgBA,GAAE,OAAO;AAAA,MAC3B,CAAC;AAAA,MACDA,GAAE,OAAO;AAAA,QACP,YAAYA,GAAE,OAAO;AAAA,MACvB,CAAC;AAAA,IACH,CAAC;AAAA,IACD,QAAQA,GAAE,KAAK,CAAC,aAAa,UAAU,YAAY,WAAW,CAAC;AAAA,IAC/D,QAAQA,GAAE,IAAI,EAAE,SAAS;AAAA,IACzB,OAAOA,GAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,CAAC;AACH;AAEO,IAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,QAAQA,GAAE,OAAO;AAAA,IACf,UAAUA,GAAE,OAAO;AAAA,EACrB,CAAC;AACH;AAEO,IAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,QAAQA,GAAE,OAAO,CAAC,CAAC;AACrB;AAEO,IAAM,sBAAsB;AAAA,EACjC,MAAM;AAAA,EACN,QAAQA,GAAE,OAAO,CAAC,CAAC;AACrB;AAEO,IAAM,2BAA2B;AAAA,EACtC,MAAM;AAAA,EACN,QAAQA,GAAE,OAAO;AAAA,IACf,YAAYA,GAAE,OAAO;AAAA,IACrB,cAAcA,GAAE,OAAO;AAAA,IACvB,UAAUA,GAAE,OAAO;AAAA,IACnB,SAASA,GAAE,OAAO;AAAA,IAClB,SAASA,GAAE,OAAO;AAAA,IAClB,QAAQA,GAAE,IAAI;AAAA;AAAA,EAChB,CAAC;AACH;",
|
|
6
|
+
"names": ["z", "z"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export type Development = {
|
|
2
|
+
type: "development";
|
|
3
|
+
adk: {
|
|
4
|
+
directory: string;
|
|
5
|
+
};
|
|
6
|
+
agent: {
|
|
7
|
+
directory: string;
|
|
8
|
+
};
|
|
9
|
+
local: {
|
|
10
|
+
/** The Personal Access Token of the user currently in dev mode */
|
|
11
|
+
PAT: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type Production = {
|
|
15
|
+
type: "production";
|
|
16
|
+
};
|
|
17
|
+
export type Command = {
|
|
18
|
+
type: "command";
|
|
19
|
+
command: "adk-dev" | "adk-build" | "adk-deploy";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Increment the global request counter
|
|
23
|
+
*/
|
|
24
|
+
export declare function incrementRequestCount(): number;
|
|
25
|
+
/**
|
|
26
|
+
* Get current request count
|
|
27
|
+
*/
|
|
28
|
+
export declare function getRequestCount(): number;
|
|
29
|
+
export declare const Environment: (Development | Production | Command) & {
|
|
30
|
+
isDevelopment(): this is Development;
|
|
31
|
+
isProduction(): this is Production;
|
|
32
|
+
isCommand(): this is Command;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Get environment information for telemetry
|
|
36
|
+
* Each property is individually fail-safe to prevent collection errors
|
|
37
|
+
*/
|
|
38
|
+
export declare function getEnvironmentInfo(): {
|
|
39
|
+
environment: "development" | "production";
|
|
40
|
+
"os.platform": "darwin" | "linux" | "win32" | undefined;
|
|
41
|
+
"os.arch": NodeJS.Architecture;
|
|
42
|
+
"node.version": string;
|
|
43
|
+
"adk.version": string;
|
|
44
|
+
"runtime.version": string;
|
|
45
|
+
"sdk.version": string;
|
|
46
|
+
"llmz.version": string;
|
|
47
|
+
"zai.version": string;
|
|
48
|
+
"cognitive.version": string;
|
|
49
|
+
uptime: number;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Get request-level metrics (memory, CPU, request count)
|
|
53
|
+
*/
|
|
54
|
+
export declare function getRequestMetrics(): {
|
|
55
|
+
"memory.rss": number | undefined;
|
|
56
|
+
"memory.heapTotal": number | undefined;
|
|
57
|
+
"cpu.count": number;
|
|
58
|
+
"requests.total": number;
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,GAAG,EAAE;QACH,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,KAAK,EAAE;QACL,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,KAAK,EAAE;QACL,kEAAkE;QAClE,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;CACjD,CAAC;AAwEF;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED,eAAO,MAAM,WAAW;qBACL,QAAQ,WAAW;oBAIpB,QAAQ,UAAU;iBAIrB,QAAQ,OAAO;CAG5B,CAAC;AAYH;;;GAGG;AACH,wBAAgB,kBAAkB;;;;;;;;;;;;EAyCjC;AAED;;GAEG;AACH,wBAAgB,iBAAiB;;;;;EAyBhC"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "@botpress/sdk";
|
|
2
|
+
export declare namespace Errors {
|
|
3
|
+
export enum ErrorLevel {
|
|
4
|
+
Warning = "warning",
|
|
5
|
+
Critical = "critical"
|
|
6
|
+
}
|
|
7
|
+
export enum ErrorType {
|
|
8
|
+
Definition = "definition",
|
|
9
|
+
Runtime = "runtime"
|
|
10
|
+
}
|
|
11
|
+
export enum ErrorCode {
|
|
12
|
+
InvalidPrimitiveDefinition = "INVALID_PRIMITIVE_DEFINITION"
|
|
13
|
+
}
|
|
14
|
+
export function toErrorString(e: unknown, includeStack?: boolean): string;
|
|
15
|
+
abstract class AbstractError<Code extends ErrorCode> extends Error {
|
|
16
|
+
static readonly code: ErrorCode;
|
|
17
|
+
static readonly level: ErrorLevel;
|
|
18
|
+
static readonly type: ErrorType;
|
|
19
|
+
constructor(messageOrError?: string | z.ZodError, zodError?: z.ZodError);
|
|
20
|
+
get code(): Code;
|
|
21
|
+
get level(): ErrorLevel;
|
|
22
|
+
get type(): ErrorType;
|
|
23
|
+
}
|
|
24
|
+
export class InvalidPrimitiveError extends AbstractError<ErrorCode.InvalidPrimitiveDefinition> {
|
|
25
|
+
static readonly level = ErrorLevel.Critical;
|
|
26
|
+
static readonly type = ErrorType.Definition;
|
|
27
|
+
static readonly code = ErrorCode.InvalidPrimitiveDefinition;
|
|
28
|
+
constructor(messageOrError?: string | z.ZodError, zodError?: z.ZodError);
|
|
29
|
+
}
|
|
30
|
+
export function isError<T extends new (...args: any[]) => AbstractError<any>>(error: unknown, errorClass: T): error is InstanceType<T>;
|
|
31
|
+
export function isAdkError(error: unknown): error is AbstractError<ErrorCode>;
|
|
32
|
+
export function isDefinitionError(error: unknown): error is AbstractError<ErrorCode>;
|
|
33
|
+
export function isRuntimeError(error: unknown): error is AbstractError<ErrorCode>;
|
|
34
|
+
export {};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,yBAAiB,MAAM,CAAC;IACtB,MAAM,MAAM,UAAU;QACpB,OAAO,YAAY;QACnB,QAAQ,aAAa;KACtB;IAED,MAAM,MAAM,SAAS;QACnB,UAAU,eAAe;QACzB,OAAO,YAAY;KACpB;IAED,MAAM,MAAM,SAAS;QACnB,0BAA0B,iCAAiC;KAC5D;IAED,MAAM,UAAU,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,UAAQ,GAAG,MAAM,CA6DtE;IAED,QAAQ,OAAO,aAAa,CAAC,IAAI,SAAS,SAAS,CAAE,SAAQ,KAAK;QAGhE,gBAAuB,IAAI,EAAE,SAAS,CAAC;QACvC,gBAAuB,KAAK,EAAE,UAAU,CAAC;QACzC,gBAAuB,IAAI,EAAE,SAAS,CAAC;oBAE3B,cAAc,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ;QAsBvE,IAAW,IAAI,IAAI,IAAI,CAEtB;QAED,IAAW,KAAK,IAAI,UAAU,CAE7B;QAED,IAAW,IAAI,IAAI,SAAS,CAE3B;KACF;IAWD,MAAM,OAAO,qBAAsB,SAAQ,aAAa,CAAC,SAAS,CAAC,0BAA0B,CAAC;QAC5F,gBAAuB,KAAK,uBAAuB;QACnD,gBAAuB,IAAI,wBAAwB;QACnD,gBAAuB,IAAI,wCAAwC;oBAEvD,cAAc,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ;KAQxE;IAED,MAAM,UAAU,OAAO,CAAC,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,aAAa,CAAC,GAAG,CAAC,EAC1E,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,CAAC,GACZ,KAAK,IAAI,YAAY,CAAC,CAAC,CAAC,CAK1B;IAED,MAAM,UAAU,UAAU,CACxB,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,aAAa,CAAC,SAAS,CAAC,CAmBnC;IAED,MAAM,UAAU,iBAAiB,CAC/B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,aAAa,CAAC,SAAS,CAAC,CAWnC;IAED,MAAM,UAAU,cAAc,CAC5B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,aAAa,CAAC,SAAS,CAAC,CAWnC;;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type PackageVersions = {
|
|
2
|
+
runtime: string;
|
|
3
|
+
adk: string;
|
|
4
|
+
sdk: string;
|
|
5
|
+
llmz: string;
|
|
6
|
+
zai: string;
|
|
7
|
+
cognitive: string;
|
|
8
|
+
};
|
|
9
|
+
export type BuildInfo = {
|
|
10
|
+
date: string;
|
|
11
|
+
};
|
|
12
|
+
export type Globals = {
|
|
13
|
+
__BUILD__: BuildInfo;
|
|
14
|
+
__PACKAGE_VERSIONS__: PackageVersions;
|
|
15
|
+
};
|
|
16
|
+
declare global {
|
|
17
|
+
const __BUILD__: BuildInfo;
|
|
18
|
+
const __PACKAGE_VERSIONS__: PackageVersions;
|
|
19
|
+
}
|
|
20
|
+
export declare const DefinedGlobalObjects: readonly ["__PACKAGE_VERSIONS__", "__BUILD__"];
|
|
21
|
+
//# sourceMappingURL=globals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../src/globals.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,SAAS,EAAE,SAAS,CAAC;IACrB,oBAAoB,EAAE,eAAe,CAAC;CACvC,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb,MAAM,SAAS,EAAE,SAAS,CAAC;IAC3B,MAAM,oBAAoB,EAAE,eAAe,CAAC;CAC7C;AAED,eAAO,MAAM,oBAAoB,gDAGc,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @botpress/runtime/internal
|
|
3
|
+
* @description This module provides internal functionalities for the Botpress runtime environment. It is intended for use only within the Botpress ADK monorepo, including the UI, ADK, and CLI components.
|
|
4
|
+
* @note This module is not meant for public consumption and should only be used by Botpress developers.
|
|
5
|
+
* @usage
|
|
6
|
+
* import * as internals from "@botpress/runtime/internal"
|
|
7
|
+
*/
|
|
8
|
+
export * from "./primitives";
|
|
9
|
+
export * from "./errors";
|
|
10
|
+
export * from "./telemetry/tracing";
|
|
11
|
+
export { BuiltInWorkflows } from "./runtime/workflows";
|
|
12
|
+
export { setAdkCommand } from "./environment";
|
|
13
|
+
export { isAgentConfig } from "./define-config";
|
|
14
|
+
export * from "./workers";
|
|
15
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,cAAc,WAAW,CAAC"}
|