@botpress/adk-cli 1.19.0-beta.3 → 1.19.0-beta.5

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.
Files changed (81) hide show
  1. package/assets/ui-dist/assets/{index-CSTz-oTK.js → index-B3b7PPgV.js} +4 -4
  2. package/{dist/index-DNqXHLNi-27nvpkee.js → assets/ui-dist/assets/index-BESZeTO5.js} +2 -2
  3. package/{dist/index-DAztRXeA-vr85xnxs.css → assets/ui-dist/assets/index-DIFGtVmI.css} +1 -1
  4. package/{dist/index-DfjXY3Oo-szsanhnt.js → assets/ui-dist/assets/index-a3ZL0_Jr.js} +2 -2
  5. package/assets/ui-dist/index.html +2 -2
  6. package/dist/{README-wjb7z7f0.md → README-824wa4jj.md} +1 -1
  7. package/dist/SKILL-75ym6tcj.md +257 -0
  8. package/dist/SKILL-chnwzmt1.md +548 -0
  9. package/dist/SKILL-d4bs53y3.md +244 -0
  10. package/dist/SKILL-h4b2f1n9.md +114 -0
  11. package/dist/SKILL-hbw5nt95.md +111 -0
  12. package/dist/actions-h7hxxvxr.md +823 -0
  13. package/dist/adk-build-emhwd0tg.md +39 -0
  14. package/dist/adk-debug-yrrdtpmb.md +23 -0
  15. package/dist/adk-dev-console-7z9rtjpy.md +17 -0
  16. package/dist/adk-document-ras6zzzh.md +68 -0
  17. package/dist/adk-eval-vx76dwq0.md +17 -0
  18. package/dist/adk-explain-fcsaw852.md +22 -0
  19. package/dist/adk-init-9kmxmbbe.md +30 -0
  20. package/dist/adk-ship-dybzn884.md +29 -0
  21. package/dist/adk-test-xq67savs.md +27 -0
  22. package/dist/adk-validate-1p4skv4m.md +31 -0
  23. package/dist/advanced-patterns-z86m9h1a.md +669 -0
  24. package/dist/agent-config-1aqvkrgf.md +450 -0
  25. package/dist/agent-steps-zj4c1n9t.md +115 -0
  26. package/dist/agent0-assets/skills/adk/SKILL.md +5 -5
  27. package/dist/agent0-assets/skills/adk/references/cli.md +265 -24
  28. package/dist/agent0-assets/skills/adk-debugger/SKILL.md +5 -5
  29. package/dist/agent0-assets/skills/adk-debugger/references/common-failures.md +1 -1
  30. package/dist/agent0-assets/skills/adk-debugger/references/debug-workflow.md +3 -3
  31. package/dist/agent0-assets/skills/adk-debugger/references/traces-and-logs.md +15 -7
  32. package/dist/assets-q7jt8r2q.md +237 -0
  33. package/dist/autonomous-execution-fymc12e5.md +747 -0
  34. package/dist/cli-c31e06yr.md +1334 -0
  35. package/dist/cli.js +963 -548
  36. package/dist/commands.json +24 -3
  37. package/dist/common-failures-ht29w2db.md +231 -0
  38. package/dist/component-registry-bbpw0see.md +43 -0
  39. package/dist/context-api-760cvh0h.md +461 -0
  40. package/dist/conversation-analysis-8ka4nrm4.md +420 -0
  41. package/dist/conversation-lifecycle-4seqqjc1.md +311 -0
  42. package/dist/conversations-gwfvxaee.md +1111 -0
  43. package/dist/custom-components-y5wdgpey.md +167 -0
  44. package/dist/debug-workflow-vz84q80v.md +239 -0
  45. package/dist/desk-k54ktvsd.md +852 -0
  46. package/dist/doc-standards-ck6ax2jd.md +124 -0
  47. package/dist/eval-format-7n9brja4.md +354 -0
  48. package/dist/evals-y1zcr1mc.md +11 -0
  49. package/dist/explain-config-1yaq3zzd.md +424 -0
  50. package/dist/files-dzt0wxn3.md +918 -0
  51. package/dist/{index-gqxgqnyz.html → index-3t354nbw.html} +2 -2
  52. package/dist/{index-CSTz-oTK-mdfh47r8.js → index-B3b7PPgV-zetkb01w.js} +4 -4
  53. package/{assets/ui-dist/assets/index-DNqXHLNi.js → dist/index-BESZeTO5-2rpmcefa.js} +2 -2
  54. package/{assets/ui-dist/assets/index-DAztRXeA.css → dist/index-DIFGtVmI-d4dhjg97.css} +1 -1
  55. package/{assets/ui-dist/assets/index-DfjXY3Oo.js → dist/index-a3ZL0_Jr-q145h35p.js} +2 -2
  56. package/dist/integration-actions-xang7tma.md +659 -0
  57. package/dist/integrations-k5ss07f4.md +266 -0
  58. package/dist/interfaces-6t0bpxs4.md +97 -0
  59. package/dist/knowledge-bases-20rg8p5c.md +456 -0
  60. package/dist/llm-debugging-76ng8rzm.md +209 -0
  61. package/dist/mcp-server-n1asyzhv.md +112 -0
  62. package/dist/messages-gkkg0b54.md +769 -0
  63. package/dist/model-configuration-f273kgd0.md +201 -0
  64. package/dist/multi-agent-dashboard-1mdfjdts.md +70 -0
  65. package/dist/pages-xn18xn73.md +273 -0
  66. package/dist/patterns-mistakes-5vb99dhf.md +469 -0
  67. package/dist/plugins-ttnx8f49.md +280 -0
  68. package/dist/tables-x45t36dd.md +1136 -0
  69. package/dist/tags-46td3qrg.md +516 -0
  70. package/dist/test-patterns-hj47w4nc.md +355 -0
  71. package/dist/testing-workflow-2vkp932f.md +225 -0
  72. package/dist/tools-wk7bq24z.md +581 -0
  73. package/dist/trace-summarization-hdyx1c2e.md +313 -0
  74. package/dist/traces-and-logs-f2kjfh19.md +203 -0
  75. package/dist/triggers-4j2cc86x.md +719 -0
  76. package/dist/ui-server-entry.js +977 -162
  77. package/dist/workflow-steps-mrdrf1c5.md +851 -0
  78. package/dist/workflows-gadx3s69.md +1408 -0
  79. package/dist/zai-agent-reference-e6644aad.md +454 -0
  80. package/dist/zai-complete-guide-mnna5d6f.md +1408 -0
  81. package/package.json +4 -4
@@ -0,0 +1,266 @@
1
+ # Integration Management
2
+
3
+ Integrations connect your agent to external platforms and services. Manage them entirely through the CLI — never hand-edit lock files.
4
+
5
+ ## CLI Commands
6
+
7
+ All integration management uses the `adk integrations` subcommand family. Every mutation command supports `--target <env>` (dev or prod, default: dev) and `--format <format>` (text or json).
8
+
9
+ > **Deprecated aliases:** The old flat commands (`adk add`, `adk remove`, `adk search`, `adk list`, `adk info`, `adk upgrade`) still work as shims but emit deprecation warnings. Use the `adk integrations` subcommands instead.
10
+
11
+ ### Discovery
12
+
13
+ | Command | Description | Key Flags |
14
+ |---------|-------------|-----------|
15
+ | `adk integrations search <query>` | Search by keyword | `--format json`, `--limit <n>` (default: 20) |
16
+ | `adk integrations list --available` | Browse all Hub integrations | `--format json`, `--limit <n>` (default: 50) |
17
+ | `adk integrations list` | Show installed dependencies | `--format json`, `--verbose` |
18
+ | `adk integrations info <name>` | Full integration details | `--actions`, `--channels`, `--events`, `--full`, `--format json` |
19
+
20
+ Use `--format json` for programmatic inspection of config schemas, action shapes, and event payloads.
21
+
22
+ ### Mutations
23
+
24
+ | Command | Description | Key Flags |
25
+ |---------|-------------|-----------|
26
+ | `adk integrations add <name>@<version>` | Install an integration | `--alias <name>`, `--target <env>`, `--config key=value` |
27
+ | `adk integrations remove <alias>` | Uninstall an integration | `--target <env>` |
28
+ | `adk integrations upgrade <alias>` | Upgrade to latest (or specific) version | `--to <version>`, `--target <env>` |
29
+ | `adk integrations enable <alias>` | Enable a disabled integration | `--target <env>` |
30
+ | `adk integrations disable <alias>` | Disable without removing | `--target <env>` |
31
+ | `adk integrations configure <alias>` | Set or unset config values | `--set key=value`, `--unset key`, `--target <env>` |
32
+
33
+ ### State Management
34
+
35
+ | Command | Description | Key Flags |
36
+ |---------|-------------|-----------|
37
+ | `adk integrations pull-lock` | Pull cloud state into lock file | `--target <env>`, `--dry-run` |
38
+ | `adk integrations push-lock` | Push lock file to cloud | `--target <env>`, `--dry-run`, `--yes` |
39
+ | `adk integrations copy` | Copy integration state between environments | `--from <env>`, `--to <env>` |
40
+ | `adk integrations diff` | Show differences between lock file and cloud | `--target <env>` |
41
+
42
+ ## Lock File System
43
+
44
+ Integration state lives in per-environment lock files at the project root:
45
+
46
+ - `dependencies.dev.lock.json` — development environment
47
+ - `dependencies.prod.lock.json` — production environment
48
+
49
+ ```json
50
+ {
51
+ "version": 1,
52
+ "env": "dev",
53
+ "integrations": {
54
+ "slack": {
55
+ "name": "slack",
56
+ "version": "3.0.0",
57
+ "enabled": true,
58
+ "config": {
59
+ "replyBehaviour": "start-conversation",
60
+ "apiSecret": "${env:SLACK_SECRET}"
61
+ }
62
+ },
63
+ "browser": {
64
+ "name": "browser",
65
+ "version": "0.8.6",
66
+ "enabled": true,
67
+ "config": {}
68
+ }
69
+ },
70
+ "plugins": {}
71
+ }
72
+ ```
73
+
74
+ **Key principles:**
75
+ - Cloud is the source of truth. The lock file is a local reflection refreshed after every mutation.
76
+ - Never edit lock files by hand — use `adk integrations` commands.
77
+ - The `--target` flag controls which environment (dev/prod) a command operates on.
78
+ - Config values support env substitution: `${env:API_KEY}` resolves to `process.env.API_KEY` at apply time.
79
+
80
+ **Migration from agent.config.ts:** Projects with a legacy `dependencies` block in `agent.config.ts` are auto-migrated to lock files on the first CLI command. The migration is one-shot and skipped if lock files already exist.
81
+
82
+ ## Integration Lifecycle
83
+
84
+ ### 1. Discover
85
+
86
+ ```bash
87
+ adk integrations search slack
88
+ adk integrations list --available
89
+ adk integrations info slack --format json
90
+ ```
91
+
92
+ ### 2. Add
93
+
94
+ ```bash
95
+ adk integrations add slack@3.0.0
96
+ adk integrations add openai@1.0.0 --alias ai
97
+ adk integrations add agi/linear@2.0.0
98
+ ```
99
+
100
+ Always pin to a specific version. Without `--alias`, the integration name becomes the alias.
101
+
102
+ What happens: the integration is resolved, an entry is written to the lock file, and the integration starts **disabled** with status `registration_pending`.
103
+
104
+ ### 3. Configure
105
+
106
+ ```bash
107
+ adk integrations configure slack --set replyBehaviour=start-conversation
108
+ adk integrations configure slack --set apiSecret='${env:SLACK_SECRET}'
109
+ adk integrations configure slack --unset optionalField
110
+ ```
111
+
112
+ For OAuth integrations, complete the authorization flow in the Botpress Dev Console (`localhost:3001` during dev).
113
+
114
+ ### 4. Enable
115
+
116
+ ```bash
117
+ adk integrations enable slack
118
+ ```
119
+
120
+ After enabling, the integration registers with Botpress Cloud:
121
+
122
+ ```
123
+ registration_pending → registered (success)
124
+ → registration_failed (error)
125
+ ```
126
+
127
+ Check status with `adk integrations list`.
128
+
129
+ ### 5. Use in Code
130
+
131
+ ```typescript
132
+ import { actions } from '@botpress/runtime'
133
+
134
+ await actions.slack.sendMessage({ channel: '#general', text: 'Hello!' })
135
+ await actions.browser.webSearch({ query: 'Botpress ADK' })
136
+ ```
137
+
138
+ The alias determines the accessor: `actions.<alias>.<actionName>()`. See **[Integration Actions](./integration-actions.md)** for the full API reference.
139
+
140
+ ### 6. Remove / Upgrade
141
+
142
+ ```bash
143
+ adk integrations remove slack
144
+ adk integrations upgrade slack
145
+ ```
146
+
147
+ After upgrading, check for breaking changes in the new version, then re-deploy with `adk deploy`.
148
+
149
+ ## Configuration Types
150
+
151
+ Use `adk integrations info <name> --format json` to inspect an integration's configuration schema.
152
+
153
+ ### No Config
154
+
155
+ Zero configuration properties. Just enable it.
156
+
157
+ **Example:** `browser` — add, enable, done.
158
+
159
+ ### Optional Config Only
160
+
161
+ Has configuration properties but none are required. Works out of the box.
162
+
163
+ **Examples:**
164
+ - `chat` — optional `encryptionKey`, `webhookUrl`, `webhookSecret`
165
+ - `webchat` — ~38 optional theming/behavior props (`primaryColor`, `fontFamily`, `allowFileUpload`, etc.)
166
+ - `webhook` — optional `secret` and `allowedOrigins`
167
+
168
+ ### OAuth (Link-Based)
169
+
170
+ Default configuration includes an `identifier` with a `linkTemplateScript`. User clicks a generated URL in the Dev Console to authorize.
171
+
172
+ **Examples:** `whatsapp` (default config), `linear` (default config)
173
+
174
+ ### OAuth + Required Fields
175
+
176
+ OAuth authorization plus required configuration fields.
177
+
178
+ **Example:** `slack` — requires `replyBehaviour` in addition to OAuth. Alternative configs: `manifestAppCredentials`, `refreshToken`.
179
+
180
+ ### API Key / Manual
181
+
182
+ Configuration schema has required string fields, often marked `x-zui.secret: true`. User enters values in the Dev Console or via `adk integrations configure --set`.
183
+
184
+ **Examples:** `linear` (apiKey config), `whatsapp` (manual config)
185
+
186
+ ### Sandbox
187
+
188
+ Testing mode using a shared Botpress account. The integration provides a sandbox configuration with a VRL script.
189
+
190
+ **Example:** `whatsapp` sandbox config (shared test phone number: +1-581-701-9840)
191
+
192
+ ### Detecting Config Type from CLI
193
+
194
+ Inspect `adk integrations info <name> --format json`:
195
+
196
+ | JSON Key | What It Tells You |
197
+ |----------|-------------------|
198
+ | `configuration.schema` | Default config schema (properties, required fields) |
199
+ | `configuration.identifier` | Whether OAuth/link-based auth is used |
200
+ | `configurations` | Alternative configuration types (if any) |
201
+
202
+ If `configuration.schema.properties` is empty or all optional → no manual config needed.
203
+ If `configuration.identifier.linkTemplateScript` exists → OAuth.
204
+ If `configurations` has multiple entries → multiple modes available.
205
+
206
+ ## Common Integrations Quick Reference
207
+
208
+ ### chat
209
+
210
+ **Config:** Optional only (none required)
211
+ **Actions:** 1 (sendEvent) | **Channels:** 1 | **Events:** 1 (custom)
212
+
213
+ Used internally by `adk chat` CLI command. Good default for basic messaging during development.
214
+
215
+ ### webchat
216
+
217
+ **Config:** Optional only (~38 theming/behavior props, none required)
218
+ **Actions:** 9 (configWebchat, showWebchat, hideWebchat, etc.) | **Channels:** 1 | **Events:** 2
219
+
220
+ Embeddable web chat widget. Works out of the box.
221
+
222
+ ### browser
223
+
224
+ **Config:** None (zero properties)
225
+ **Actions:** 5 (browsePages, webSearch, discoverUrls, captureScreenshot, getWebsiteLogo) | **Channels:** 0 | **Events:** 0
226
+
227
+ Most commonly used for RAG, web search, and page scraping. No configuration needed.
228
+
229
+ ### slack
230
+
231
+ **Config:** OAuth + required `replyBehaviour`
232
+ **Actions:** Multiple | **Channels:** 3 (channel, dm, thread) | **Events:** 6
233
+
234
+ After adding: enable in Dev Console, set `replyBehaviour`, complete OAuth. Alternative configs: `manifestAppCredentials`, `refreshToken`.
235
+
236
+ ### whatsapp
237
+
238
+ **Config:** 3 modes (OAuth, sandbox, manual)
239
+ **Actions:** Multiple | **Channels:** 1 | **Events:** Multiple
240
+
241
+ Sandbox mode is useful for quick testing without a WhatsApp Business account.
242
+
243
+ ### linear
244
+
245
+ **Name:** `agi/linear` (private, workspace-scoped) | **Config:** OAuth or API key
246
+ **Actions:** Multiple | **Channels:** Multiple | **Events:** Multiple
247
+
248
+ Use full name when searching: `adk integrations info agi/linear`.
249
+
250
+ ### webhook
251
+
252
+ **Config:** Optional only (none required)
253
+ **Actions:** 0 | **Channels:** 0 | **Events:** 1
254
+
255
+ Receives external HTTP webhooks. Only fires events when a payload arrives.
256
+
257
+ ## Name Resolution
258
+
259
+ | Format | Example | Meaning |
260
+ |--------|---------|---------|
261
+ | Plain name | `slack` | Official/public integration, latest version |
262
+ | `name@version` | `slack@3.0.0` | Specific version |
263
+ | `workspace/name` | `agi/linear` | Private (workspace-scoped) integration |
264
+ | `intver_<ULID>` | `intver_01KM6EB027NRCST3M696XT0GTW` | Exact integration version ID |
265
+
266
+ Official integrations use just the name. Private integrations are prefixed with the workspace slug and are only visible to workspace members.
@@ -0,0 +1,97 @@
1
+ # Interfaces
2
+
3
+ Interfaces are an abstraction layer over integrations. They define a standard contract (a set of actions) that multiple integrations can implement. The ADK uses interfaces to call the same logical action across different integrations without writing integration-specific code.
4
+
5
+ ## Key Concepts
6
+
7
+ - **Interfaces are built-in.** The ADK automatically includes a fixed set of interfaces in every project. Interfaces are provided by the ADK — they are resolved automatically based on installed integrations.
8
+ - **Interfaces map to integration actions.** At build time, the ADK discovers which installed integrations implement each interface and generates a mapping from interface actions to concrete integration actions.
9
+ - **The runtime resolves calls automatically.** When code calls an interface action (e.g., `startTypingIndicator`), the runtime looks up the correct integration action for the current conversation's integration.
10
+
11
+ ## Built-in Interfaces
12
+
13
+ Every ADK project includes these interfaces (defined in `@botpress/adk` constants):
14
+
15
+ | Interface | Version | Purpose |
16
+ |-----------|---------|---------|
17
+ | `typing-indicator` | `0.0.3` | Start/stop typing indicators across messaging integrations |
18
+ | `llm` | `9.0.0` | Standard LLM operations |
19
+ | `listable` | `0.0.2` | List operations on integration resources |
20
+
21
+ These are hard-coded in the ADK and synced automatically during `adk dev` and `adk build`. Users cannot modify this list.
22
+
23
+ > **Naming:** Interface package names use kebab-case (`typing-indicator`), but the runtime uses camelCase (`typingIndicator`). The ADK handles this translation automatically.
24
+
25
+ ## What Interfaces Enable
26
+
27
+ ### Typing Indicators in Conversation Handlers
28
+
29
+ The `typing-indicator` interface powers `conversation.startTyping()` and `conversation.stopTyping()`. These work automatically for any integration that implements the interface (webchat, Slack, etc.) with no integration-specific code needed:
30
+
31
+ ```typescript
32
+ import { Conversation } from "@botpress/runtime";
33
+
34
+ export const Chat = new Conversation({
35
+ channel: "webchat.channel",
36
+
37
+ async handler({ conversation, execute }) {
38
+ await conversation.startTyping();
39
+
40
+ // Do work...
41
+
42
+ await execute({
43
+ instructions: "Help the user",
44
+ });
45
+ // Typing stops automatically when a message is sent
46
+ }
47
+ });
48
+ ```
49
+
50
+ If the conversation's integration does not implement `typing-indicator`, the calls silently no-op (errors are caught and swallowed).
51
+
52
+ ### CLI Commands
53
+
54
+ ```bash
55
+ # List built-in interfaces
56
+ adk interfaces list
57
+
58
+ # Show details about a specific interface
59
+ adk interfaces info llm
60
+
61
+ # Both commands support --format json
62
+ adk interfaces list --format json
63
+ ```
64
+
65
+ ### Generated Type Files
66
+
67
+ The ADK generates interface types in `.adk/interfaces/`. Each interface gets:
68
+
69
+ - `<interface_name>/index.ts` - Type and const exports
70
+ - `<interface_name>/actions.ts` - Per-integration action types and mapping constants
71
+
72
+ These are aggregated in:
73
+ - `.adk/interfaces.d.ts` - Global `Interfaces` type declaration
74
+ - `.adk/interfaces.ts` - Runtime `Interfaces` const (the mapping object)
75
+
76
+ ## Relationship to Integrations
77
+
78
+ Interfaces and integrations are complementary. See **[integrations.md](./integrations.md)** for integration management.
79
+
80
+ - **Integrations** are concrete connections to external services (Slack, webchat, Linear). You add them with `adk add`.
81
+ - **Interfaces** are abstract contracts. An integration *implements* an interface by declaring compatible actions with matching schemas.
82
+ - When you add an integration that implements an interface, the ADK automatically detects this and generates the mapping. No user action is required.
83
+
84
+ ## Scope and Limitations
85
+
86
+ - Interfaces are **not user-configurable** in the current ADK. The set of built-in interfaces is fixed.
87
+ - Users cannot define custom interfaces or map integrations to interfaces manually.
88
+ - Interface resolution is **per-integration** at the conversation level. The runtime determines which integration a conversation belongs to and resolves interface actions accordingly.
89
+ - If no installed integration implements an interface, the generated mapping for that interface will be empty (no actions).
90
+ - The `llm` and `listable` interfaces may have empty mappings if no installed integration declares support for them.
91
+ - Plugins can depend on interfaces for runtime resolution. See [plugins.md](./plugins.md) for how plugin interface dependencies are wired.
92
+
93
+ ## See Also
94
+
95
+ - [Integrations](./integrations.md) — Integration management overview
96
+ - [Integration Actions](./integration-actions.md) — Calling integration actions from code
97
+ - [Plugins](./plugins.md) — Plugins that depend on interfaces for runtime resolution