@botpress/cli 4.17.10 → 4.17.12

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,32 +1,32 @@
1
1
 
2
- > @botpress/cli@4.17.10 build /home/runner/work/botpress/botpress/packages/cli
2
+ > @botpress/cli@4.17.12 build /home/runner/work/botpress/botpress/packages/cli
3
3
  > pnpm run bundle && pnpm run template:gen
4
4
 
5
5
 
6
- > @botpress/cli@4.17.10 bundle /home/runner/work/botpress/botpress/packages/cli
6
+ > @botpress/cli@4.17.12 bundle /home/runner/work/botpress/botpress/packages/cli
7
7
  > ts-node -T build.ts
8
8
 
9
9
 
10
- > @botpress/cli@4.17.10 template:gen /home/runner/work/botpress/botpress/packages/cli
10
+ > @botpress/cli@4.17.12 template:gen /home/runner/work/botpress/botpress/packages/cli
11
11
  > pnpm -r --stream -F @bp-templates/* exec bp gen
12
12
 
13
- 🤖 Botpress CLI v4.17.10
14
- 🤖 Botpress CLI v4.17.10
15
- 🤖 Botpress CLI v4.17.10
16
- 🤖 Botpress CLI v4.17.10
17
- ○ Generating typings for integration hello-world...
18
- ○ Generating typings for integration empty-integration...
13
+ 🤖 Botpress CLI v4.17.12
14
+ 🤖 Botpress CLI v4.17.12
15
+ 🤖 Botpress CLI v4.17.12
16
+ 🤖 Botpress CLI v4.17.12
17
+ ○ Generating typings for bot...
19
18
  ✓ Typings available at .botpress
20
19
 
20
+ ○ Generating typings for integration hello-world...
21
+ ○ Generating typings for plugin empty-plugin...
21
22
  ✓ Typings available at .botpress
22
23
 
23
- ○ Generating typings for plugin empty-plugin...
24
- ○ Generating typings for bot...
25
24
  ✓ Typings available at .botpress
26
25
 
26
+ ○ Generating typings for integration empty-integration...
27
27
  ✓ Typings available at .botpress
28
28
 
29
- 🤖 Botpress CLI v4.17.10
29
+ 🤖 Botpress CLI v4.17.12
30
30
  ○ Generating typings for integration webhook-message...
31
31
  ✓ Typings available at .botpress
32
32
 
@@ -117,6 +117,9 @@ class TunnelSupervisor {
117
117
  });
118
118
  tunnel.events.on("close", ({ code, reason, target, type, wasClean }) => {
119
119
  this._logger.error(`Tunnel closed: ${code} ${reason}`);
120
+ if (code === import_tunnel.errors.CLOSE_CODES.TUNNEL_ID_CONFLICT) {
121
+ throw new Error("Cannot start: Tunnel Id is already used, choose a different tunnel id.");
122
+ }
120
123
  this._reconnectSync({ type: "close", ev: { code, reason, target, type, wasClean } });
121
124
  });
122
125
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/tunnel-utils.ts"],
4
- "sourcesContent": ["import { TunnelTail, ClientCloseEvent, ClientErrorEvent } from '@bpinternal/tunnel'\nimport { Logger } from '../logger'\nimport { EventEmitter } from './event-emitter'\n\nexport type ReconnectionTriggerEvent =\n | {\n type: 'init'\n ev: null\n }\n | {\n type: 'error'\n ev: ClientErrorEvent\n }\n | {\n type: 'close'\n ev: ClientCloseEvent\n }\n\nexport type ReconnectedEvent = {\n tunnel: TunnelTail\n ev: ReconnectionTriggerEvent\n}\n\nexport class ReconnectionFailedError extends Error {\n public constructor(public readonly event: ReconnectionTriggerEvent) {\n const reason = ReconnectionFailedError._reason(event)\n super(`Reconnection failed: ${reason}`)\n }\n\n private static _reason(event: ReconnectionTriggerEvent): string {\n if (event.type === 'error') {\n return 'error'\n }\n\n if (event.type === 'close') {\n return `${event.ev.code} ${event.ev.reason}`\n }\n\n return 'init'\n }\n}\n\nexport class TunnelSupervisor {\n private _tunnel?: TunnelTail\n private _closed = false\n private _started = false\n\n public readonly events = new EventEmitter<{\n connectionFailed: ReconnectionTriggerEvent\n manuallyClosed: null\n connected: {\n tunnel: TunnelTail\n ev: ReconnectionTriggerEvent\n }\n }>()\n\n public constructor(\n private _tunnelUrl: string,\n private _tunnelId: string,\n private _logger: Logger\n ) {}\n\n public async start(): Promise<void> {\n if (this._closed) {\n throw new Error('Cannot start: Tunnel is closed')\n }\n if (this._started) {\n throw new Error('Cannot start: Tunnel is already started')\n }\n\n this._started = true\n const tunnel = await this._reconnect({ type: 'init', ev: null })\n this._tunnel = tunnel\n }\n\n public get closed(): boolean {\n return this._closed\n }\n\n /**\n * @returns Promise that rejects when a reconnection attempt fails and resolves when the tunnel is closed manually\n */\n public async wait(): Promise<void> {\n if (this._closed) {\n throw new Error('Cannot wait: Tunnel is closed')\n }\n\n return new Promise((resolve, reject) => {\n this.events.on('connectionFailed', (ev) => {\n reject(new ReconnectionFailedError(ev))\n })\n\n this.events.on('manuallyClosed', () => {\n resolve()\n })\n })\n }\n\n public close(): void {\n if (this._closed) {\n return\n }\n\n this._closed = true\n this._tunnel?.close()\n this.events.emit('manuallyClosed', null)\n }\n\n private _reconnectSync(ev: ReconnectionTriggerEvent): void {\n void this._reconnect(ev)\n .then((t) => {\n this._tunnel = t\n })\n .catch(() => this.events.emit('connectionFailed', ev))\n }\n\n private async _reconnect(ev: ReconnectionTriggerEvent): Promise<TunnelTail> {\n const newTunnel = async () => {\n const tunnel = await TunnelTail.new(this._tunnelUrl, this._tunnelId)\n this._registerListeners(tunnel)\n this.events.emit('connected', { tunnel, ev })\n return tunnel\n }\n\n if (ev.type === 'init') {\n // skip logging on the first connection attempt\n return newTunnel()\n }\n\n const line = this._logger.line()\n line.started('Reconnecting tunnel...')\n const tunnel = await newTunnel()\n line.success('Reconnected')\n line.commit()\n return tunnel\n }\n\n private _registerListeners(tunnel: TunnelTail) {\n tunnel.events.on('error', ({ target, type }) => {\n this._logger.error(`Tunnel error: ${type}`)\n this._reconnectSync({ type: 'error', ev: { target, type } })\n })\n tunnel.events.on('close', ({ code, reason, target, type, wasClean }) => {\n this._logger.error(`Tunnel closed: ${code} ${reason}`)\n this._reconnectSync({ type: 'close', ev: { code, reason, target, type, wasClean } })\n })\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA+D;AAE/D,2BAA6B;AAqBtB,MAAM,gCAAgC,MAA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sourcesContent": ["import { TunnelTail, ClientCloseEvent, ClientErrorEvent, errors } from '@bpinternal/tunnel'\nimport { Logger } from '../logger'\nimport { EventEmitter } from './event-emitter'\n\nexport type ReconnectionTriggerEvent =\n | {\n type: 'init'\n ev: null\n }\n | {\n type: 'error'\n ev: ClientErrorEvent\n }\n | {\n type: 'close'\n ev: ClientCloseEvent\n }\n\nexport type ReconnectedEvent = {\n tunnel: TunnelTail\n ev: ReconnectionTriggerEvent\n}\n\nexport class ReconnectionFailedError extends Error {\n public constructor(public readonly event: ReconnectionTriggerEvent) {\n const reason = ReconnectionFailedError._reason(event)\n super(`Reconnection failed: ${reason}`)\n }\n\n private static _reason(event: ReconnectionTriggerEvent): string {\n if (event.type === 'error') {\n return 'error'\n }\n\n if (event.type === 'close') {\n return `${event.ev.code} ${event.ev.reason}`\n }\n\n return 'init'\n }\n}\n\nexport class TunnelSupervisor {\n private _tunnel?: TunnelTail\n private _closed = false\n private _started = false\n\n public readonly events = new EventEmitter<{\n connectionFailed: ReconnectionTriggerEvent\n manuallyClosed: null\n connected: {\n tunnel: TunnelTail\n ev: ReconnectionTriggerEvent\n }\n }>()\n\n public constructor(\n private _tunnelUrl: string,\n private _tunnelId: string,\n private _logger: Logger\n ) {}\n\n public async start(): Promise<void> {\n if (this._closed) {\n throw new Error('Cannot start: Tunnel is closed')\n }\n if (this._started) {\n throw new Error('Cannot start: Tunnel is already started')\n }\n\n this._started = true\n const tunnel = await this._reconnect({ type: 'init', ev: null })\n this._tunnel = tunnel\n }\n\n public get closed(): boolean {\n return this._closed\n }\n\n /**\n * @returns Promise that rejects when a reconnection attempt fails and resolves when the tunnel is closed manually\n */\n public async wait(): Promise<void> {\n if (this._closed) {\n throw new Error('Cannot wait: Tunnel is closed')\n }\n\n return new Promise((resolve, reject) => {\n this.events.on('connectionFailed', (ev) => {\n reject(new ReconnectionFailedError(ev))\n })\n\n this.events.on('manuallyClosed', () => {\n resolve()\n })\n })\n }\n\n public close(): void {\n if (this._closed) {\n return\n }\n\n this._closed = true\n this._tunnel?.close()\n this.events.emit('manuallyClosed', null)\n }\n\n private _reconnectSync(ev: ReconnectionTriggerEvent): void {\n void this._reconnect(ev)\n .then((t) => {\n this._tunnel = t\n })\n .catch(() => this.events.emit('connectionFailed', ev))\n }\n\n private async _reconnect(ev: ReconnectionTriggerEvent): Promise<TunnelTail> {\n const newTunnel = async () => {\n const tunnel = await TunnelTail.new(this._tunnelUrl, this._tunnelId)\n this._registerListeners(tunnel)\n this.events.emit('connected', { tunnel, ev })\n return tunnel\n }\n\n if (ev.type === 'init') {\n // skip logging on the first connection attempt\n return newTunnel()\n }\n\n const line = this._logger.line()\n line.started('Reconnecting tunnel...')\n const tunnel = await newTunnel()\n line.success('Reconnected')\n line.commit()\n return tunnel\n }\n\n private _registerListeners(tunnel: TunnelTail) {\n tunnel.events.on('error', ({ target, type }) => {\n this._logger.error(`Tunnel error: ${type}`)\n this._reconnectSync({ type: 'error', ev: { target, type } })\n })\n tunnel.events.on('close', ({ code, reason, target, type, wasClean }) => {\n this._logger.error(`Tunnel closed: ${code} ${reason}`)\n\n if (code === errors.CLOSE_CODES.TUNNEL_ID_CONFLICT) {\n throw new Error('Cannot start: Tunnel Id is already used, choose a different tunnel id.')\n }\n\n this._reconnectSync({ type: 'close', ev: { code, reason, target, type, wasClean } })\n })\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuE;AAEvE,2BAA6B;AAqBtB,MAAM,gCAAgC,MAAM;AAAA,EAC1C,YAA4B,OAAiC;AAClE,UAAM,SAAS,wBAAwB,QAAQ,KAAK;AACpD,UAAM,wBAAwB,QAAQ;AAFL;AAAA,EAGnC;AAAA,EAEA,OAAe,QAAQ,OAAyC;AAC9D,QAAI,MAAM,SAAS,SAAS;AAC1B,aAAO;AAAA,IACT;AAEA,QAAI,MAAM,SAAS,SAAS;AAC1B,aAAO,GAAG,MAAM,GAAG,QAAQ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,EACzD;AAAA,EAEA,MAAc,WAAW,IAAmD;AAC1E,UAAM,YAAY,YAAY;AAC5B,YAAMA,UAAS,MAAM,yBAAW,IAAI,KAAK,YAAY,KAAK,SAAS;AACnE,WAAK,mBAAmBA,OAAM;AAC9B,WAAK,OAAO,KAAK,aAAa,EAAE,QAAAA,SAAQ,GAAG,CAAC;AAC5C,aAAOA;AAAA,IACT;AAEA,QAAI,GAAG,SAAS,QAAQ;AAEtB,aAAO,UAAU;AAAA,IACnB;AAEA,UAAM,OAAO,KAAK,QAAQ,KAAK;AAC/B,SAAK,QAAQ,wBAAwB;AACrC,UAAM,SAAS,MAAM,UAAU;AAC/B,SAAK,QAAQ,aAAa;AAC1B,SAAK,OAAO;AACZ,WAAO;AAAA,EACT;AAAA,EAEQ,mBAAmB,QAAoB;AAC7C,WAAO,OAAO,GAAG,SAAS,CAAC,EAAE,QAAQ,KAAK,MAAM;AAC9C,WAAK,QAAQ,MAAM,iBAAiB,MAAM;AAC1C,WAAK,eAAe,EAAE,MAAM,SAAS,IAAI,EAAE,QAAQ,KAAK,EAAE,CAAC;AAAA,IAC7D,CAAC;AACD,WAAO,OAAO,GAAG,SAAS,CAAC,EAAE,MAAM,QAAQ,QAAQ,MAAM,SAAS,MAAM;AACtE,WAAK,QAAQ,MAAM,kBAAkB,QAAQ,QAAQ;AAErD,UAAI,SAAS,qBAAO,YAAY,oBAAoB;AAClD,cAAM,IAAI,MAAM,wEAAwE;AAAA,MAC1F;AAEA,WAAK,eAAe,EAAE,MAAM,SAAS,IAAI,EAAE,MAAM,QAAQ,QAAQ,MAAM,SAAS,EAAE,CAAC;AAAA,IACrF,CAAC;AAAA,EACH;AACF;",
6
6
  "names": ["tunnel"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/cli",
3
- "version": "4.17.10",
3
+ "version": "4.17.12",
4
4
  "description": "Botpress CLI",
5
5
  "scripts": {
6
6
  "build": "pnpm run bundle && pnpm run template:gen",
@@ -22,7 +22,7 @@
22
22
  "@apidevtools/json-schema-ref-parser": "^11.7.0",
23
23
  "@botpress/chat": "0.5.1",
24
24
  "@botpress/client": "1.24.2",
25
- "@botpress/sdk": "4.15.7",
25
+ "@botpress/sdk": "4.15.8",
26
26
  "@bpinternal/const": "^0.1.0",
27
27
  "@bpinternal/tunnel": "^0.1.1",
28
28
  "@bpinternal/yargs-extra": "^0.0.3",
@@ -6,7 +6,7 @@
6
6
  "private": true,
7
7
  "dependencies": {
8
8
  "@botpress/client": "1.24.2",
9
- "@botpress/sdk": "4.15.7"
9
+ "@botpress/sdk": "4.15.8"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@types/node": "^22.16.4",
@@ -1 +1,33 @@
1
- # Empty Integration
1
+ # Integration Title
2
+
3
+ > Describe the integration's purpose.
4
+
5
+ ## Configuration
6
+
7
+ > Explain how to configure your integration and list prerequisites `ex: accounts, etc.`.
8
+ > You might also want to add configuration details for specific use cases.
9
+
10
+ ## Usage
11
+
12
+ > Explain how to use your integration.
13
+ > You might also want to include an example if there is a specific use case.
14
+
15
+ ## Limitations
16
+
17
+ > List the known bugs.
18
+ > List known limits `ex: rate-limiting, payload sizes, etc.`
19
+ > List unsupported use cases.
20
+
21
+ ## Changelog
22
+
23
+ > If some versions of your integration introduce changes worth mentionning (breaking changes, bug fixes), describe them here. This will help users to know what to expect when updating the integration.
24
+
25
+ ### Integration publication checklist
26
+
27
+ - [ ] The register handler is implemented and validates the configuration.
28
+ - [ ] Title and descriptions for all schemas are present in `integration.definition.ts`.
29
+ - [ ] Events store `conversationId`, `userId` and `messageId` when available.
30
+ - [ ] Implement events & actions that are related to `channels`, `entities`, `user`, `conversations` and `messages`.
31
+ - [ ] Events related to messages are implemented as messages.
32
+ - [ ] When an action is required by the bot developer, a `RuntimeError` is thrown with instructions to fix the problem.
33
+ - [ ] Bot name and bot avatar URL fields are available in the integration configuration.
@@ -7,7 +7,7 @@
7
7
  "private": true,
8
8
  "dependencies": {
9
9
  "@botpress/client": "1.24.2",
10
- "@botpress/sdk": "4.15.7"
10
+ "@botpress/sdk": "4.15.8"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/node": "^22.16.4",
@@ -0,0 +1,33 @@
1
+ # Plugin Title
2
+
3
+ > Describe the plugin's purpose.
4
+
5
+ ## Configuration
6
+
7
+ > Explain how to configure your plugin and list prerequisites `ex: accounts, etc.`.
8
+ > You might also want to add configuration details for specific use cases.
9
+
10
+ ## Usage
11
+
12
+ > Explain how to use your plugin.
13
+ > You might also want to include an example if there is a specific use case.
14
+
15
+ ## Limitations
16
+
17
+ > List the known bugs.
18
+ > List known limits `ex: rate-limiting, payload sizes, etc.`
19
+ > List unsupported use cases.
20
+
21
+ ## Changelog
22
+
23
+ > If some versions of your plugin introduce changes worth mentionning (breaking changes, bug fixes), describe them here. This will help users to know what to expect when updating the plugin.
24
+
25
+ ### Plugin publication checklist
26
+
27
+ - [ ] The register handler is implemented and validates the configuration.
28
+ - [ ] Title and descriptions for all schemas are present in `plugin.definition.ts`.
29
+ - [ ] Events store `conversationId`, `userId` and `messageId` when available.
30
+ - [ ] Implement events & actions that are related to `channels`, `entities`, `user`, `conversations` and `messages`.
31
+ - [ ] Events related to messages are implemented as messages.
32
+ - [ ] When an action is required by the bot developer, a `RuntimeError` is thrown with instructions to fix the problem.
33
+ - [ ] Bot name and bot avatar URL fields are available in the plugin configuration.
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "private": true,
8
8
  "dependencies": {
9
- "@botpress/sdk": "4.15.7"
9
+ "@botpress/sdk": "4.15.8"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@types/node": "^22.16.4",
@@ -1 +1,43 @@
1
1
  # Hello World
2
+
3
+ This integration is a template with a single action.
4
+
5
+ > Describe the integration's purpose.
6
+
7
+ ## Configuration
8
+
9
+ This integration does not need a configuration.
10
+
11
+ > Explain how to configure your integration and list prerequisites `ex: accounts, etc.`.
12
+ > You might also want to add configuration details for specific use cases.
13
+
14
+ ## Usage
15
+
16
+ To use, call the action `helloWorld`. This action will greet the user.
17
+
18
+ > Explain how to use your integration.
19
+ > You might also want to include an example if there is a specific use case.
20
+
21
+ ## Limitations
22
+
23
+ The `helloWorld` action has a max name size limit of 2^28 - 16 characters (the max javascript string size).
24
+
25
+ > List the known bugs.
26
+ > List known limits `ex: rate-limiting, payload sizes, etc.`
27
+ > List unsupported use cases.
28
+
29
+ ## Changelog
30
+
31
+ - 0.1.0: Implemented `helloWorld` action.
32
+
33
+ > If some versions of your integration introduce changes worth mentionning (breaking changes, bug fixes), describe them here. This will help users to know what to expect when updating the integration.
34
+
35
+ ### Integration publication checklist
36
+
37
+ - [ ] The register handler is implemented and validates the configuration.
38
+ - [ ] Title and descriptions for all schemas are present in `integration.definition.ts`.
39
+ - [ ] Events store `conversationId`, `userId` and `messageId` when available.
40
+ - [ ] Implement events & actions that are related to `channels`, `entities`, `user`, `conversations` and `messages`.
41
+ - [ ] Events related to messages are implemented as messages.
42
+ - [ ] When an action is required by the bot developer, a `RuntimeError` is thrown with instructions to fix the problem.
43
+ - [ ] Bot name and bot avatar URL fields are available in the integration configuration.
@@ -7,7 +7,7 @@
7
7
  "private": true,
8
8
  "dependencies": {
9
9
  "@botpress/client": "1.24.2",
10
- "@botpress/sdk": "4.15.7"
10
+ "@botpress/sdk": "4.15.8"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/node": "^22.16.4",
@@ -1 +1,51 @@
1
1
  # Webhook Message
2
+
3
+ This integration serves as a template for receiving events through a webhook and creating messages for them, as well as sending messages through an external API.
4
+
5
+ > Describe the integration's purpose.
6
+
7
+ ## Configuration
8
+
9
+ To use this integration, you will need to manually subscribe your integration to an external service webhook.
10
+ You will also have to provide a webhookUrl configuration to send outgoing messages to.
11
+
12
+ > Explain how to configure your integration and list prerequisites `ex: accounts, etc.`.
13
+ > You might also want to add configuration details for specific use cases.
14
+
15
+ ## Usage
16
+
17
+ Send messages through the `webhook` channel to send them through the external webhookUrl you configured.
18
+ Receive messages through the integration's incoming webhook handler. Received messages have to contain:
19
+
20
+ ```typescript
21
+ userId: string
22
+ conversationId: string
23
+ text: string
24
+ ```
25
+
26
+ > Explain how to use your integration.
27
+ > You might also want to include an example if there is a specific use case.
28
+
29
+ ## Limitations
30
+
31
+ Only text messages are supported for outgoing messages.
32
+
33
+ > List the known bugs.
34
+ > List known limits `ex: rate-limiting, payload sizes, etc.`
35
+ > List unsupported use cases.
36
+
37
+ ## Changelog
38
+
39
+ - 0.1.0: Incoming webhook and outgoing channel.
40
+
41
+ > If some versions of your integration introduce changes worth mentionning (breaking changes, bug fixes), describe them here. This will help users to know what to expect when updating the integration.
42
+
43
+ ### Integration publication checklist
44
+
45
+ - [ ] The register handler is implemented and validates the configuration.
46
+ - [ ] Title and descriptions for all schemas are present in `integration.definition.ts`.
47
+ - [ ] Events store `conversationId`, `userId` and `messageId` when available.
48
+ - [ ] Implement events & actions that are related to `channels`, `entities`, `user`, `conversations` and `messages`.
49
+ - [ ] Events related to messages are implemented as messages.
50
+ - [ ] When an action is required by the bot developer, a `RuntimeError` is thrown with instructions to fix the problem.
51
+ - [ ] Bot name and bot avatar URL fields are available in the integration configuration.
@@ -7,7 +7,7 @@
7
7
  "private": true,
8
8
  "dependencies": {
9
9
  "@botpress/client": "1.24.2",
10
- "@botpress/sdk": "4.15.7",
10
+ "@botpress/sdk": "4.15.8",
11
11
  "axios": "^1.6.8"
12
12
  },
13
13
  "devDependencies": {