@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,280 @@
1
+ # Plugins
2
+
3
+ Plugins are pre-built, reusable capabilities published on the Botpress Hub that you install into your agent. Unlike integrations (which connect to external platforms), plugins add self-contained behavior -- tools, actions, data sources, or components -- that run inside your bot.
4
+
5
+ Users consume plugins. They do not author them.
6
+
7
+ ## Plugin vs Integration
8
+
9
+ | | Plugin | Integration |
10
+ |--|--------|-------------|
11
+ | **Purpose** | Adds behavior/logic to your bot | Connects to an external platform |
12
+ | **Installed via** | `adk plugins add <name>` | `adk add <name>` or `adk integrations add <name>` |
13
+ | **May depend on** | Integrations (via interface wiring) | Nothing |
14
+ | **Lock file key** | `plugins` | `integrations` |
15
+ | **Action call format** | `plugins.<alias>.actions.<action>(input)` | `actions.<alias>.<action>(input)` |
16
+
17
+ ## CLI Commands
18
+
19
+ All plugin management goes through the `adk plugins` subcommand group. Every command supports `--format json` for scripted output.
20
+
21
+ ### Discovery
22
+
23
+ ```bash
24
+ # Search the Hub for plugins
25
+ adk plugins search <query>
26
+
27
+ # Inspect a plugin before installing (shows config, actions, dependencies)
28
+ adk plugins info <name>
29
+ adk plugins info <name>@<version>
30
+ ```
31
+
32
+ ### Adding and Removing
33
+
34
+ ```bash
35
+ # Add a plugin (latest version, alias defaults to plugin name)
36
+ adk plugins add <name>
37
+
38
+ # Add a specific version
39
+ adk plugins add <name>@<version>
40
+
41
+ # Add with a custom alias
42
+ adk plugins add <name> --alias <alias>
43
+
44
+ # Add with configuration values
45
+ adk plugins add <name> --config key1=value1 --config key2=value2
46
+
47
+ # Wire interface dependencies explicitly
48
+ adk plugins add <name> --dep <interface-alias>=<integration-alias>
49
+
50
+ # Target a specific environment (default: dev)
51
+ adk plugins add <name> --target prod
52
+
53
+ # Remove a plugin by alias
54
+ adk plugins remove <alias>
55
+ adk plugins remove <alias> --target prod
56
+ ```
57
+
58
+ ### Listing and Inspection
59
+
60
+ ```bash
61
+ # List installed plugins
62
+ adk plugins list
63
+
64
+ # Show config and dependency details
65
+ adk plugins list --verbose
66
+
67
+ # Target a specific environment
68
+ adk plugins list --target prod
69
+ ```
70
+
71
+ ### Configuration
72
+
73
+ ```bash
74
+ # Set config values on an installed plugin
75
+ adk plugins configure <alias> --set key=value
76
+
77
+ # Remove config keys
78
+ adk plugins configure <alias> --unset key1 key2
79
+
80
+ # Rewire interface dependencies
81
+ adk plugins configure <alias> --map <interface-alias>=<integration-alias>
82
+
83
+ # Target a specific environment (default: dev)
84
+ adk plugins configure <alias> --set key=value --target prod
85
+ ```
86
+
87
+ ### Lifecycle
88
+
89
+ ```bash
90
+ # Enable / disable a plugin without removing it
91
+ adk plugins enable <alias>
92
+ adk plugins disable <alias>
93
+
94
+ # Target a specific environment (default: dev)
95
+ adk plugins enable <alias> --target prod
96
+ adk plugins disable <alias> --target prod
97
+
98
+ # Upgrade to latest or a specific version
99
+ adk plugins upgrade <alias>
100
+ adk plugins upgrade <alias> --to <version>
101
+ adk plugins upgrade <alias> --target prod
102
+ ```
103
+
104
+ ### Lock File Management
105
+
106
+ Plugin state is tracked in `dependencies.<env>.lock.json` alongside integrations. These commands manage the lock file:
107
+
108
+ ```bash
109
+ # Pull cloud state into the local lock file
110
+ adk plugins sync
111
+ adk plugins sync --target prod
112
+ adk plugins sync --dry-run # preview without writing
113
+
114
+ # Push lock file state to cloud
115
+ adk plugins apply
116
+ adk plugins apply --target prod
117
+ adk plugins apply --dry-run # preview without writing
118
+ adk plugins apply --yes # allow destructive changes without confirmation
119
+
120
+ # Show differences between lock and cloud
121
+ adk plugins diff
122
+ adk plugins diff --target prod
123
+
124
+ # Copy plugin state between environments
125
+ adk plugins copy --from dev --to prod
126
+ adk plugins copy --from dev --to prod --dry-run
127
+ adk plugins copy --from dev --to prod --yes # allow destructive changes without confirmation
128
+ ```
129
+
130
+ ## Interface Dependencies
131
+
132
+ Plugins often depend on [interfaces](./interfaces.md) -- abstract contracts that integrations implement. When you add a plugin, the CLI resolves these dependencies:
133
+
134
+ 1. **Auto-resolved** -- If exactly one installed integration implements the required interface, it is wired automatically.
135
+ 2. **Ambiguous** -- If multiple installed integrations implement the same interface, the CLI errors and asks you to disambiguate with `--dep`.
136
+ 3. **Missing** -- If no installed integration implements the interface, the CLI errors and suggests Hub integrations you can install first.
137
+
138
+ **Example: adding a plugin that requires the `hitl` interface**
139
+
140
+ ```bash
141
+ # If you already have exactly one integration implementing hitl:
142
+ adk plugins add desk-hitl
143
+ # CLI auto-resolves the interface dependency
144
+
145
+ # If multiple integrations implement hitl, disambiguate:
146
+ adk plugins add desk-hitl --dep hitlService=zendesk
147
+
148
+ # If no integration implements hitl, install one first:
149
+ adk integrations add zendesk
150
+ adk plugins add desk-hitl
151
+ ```
152
+
153
+ After installation, you can re-wire dependencies any time:
154
+
155
+ ```bash
156
+ adk plugins configure desk-hitl --map hitlService=freshdesk
157
+ ```
158
+
159
+ ## Using Plugin Actions in Code
160
+
161
+ Installed plugins expose typed actions via the `plugins` proxy from `@botpress/runtime`. The ADK generates types automatically so you get full autocompletion.
162
+
163
+ ```typescript
164
+ import { plugins } from "@botpress/runtime";
165
+
166
+ // Call a plugin action: plugins.<alias>.actions.<actionName>(input)
167
+ const result = await plugins.myPlugin.actions.doSomething({ key: "value" });
168
+ ```
169
+
170
+ The call format is `plugins.<alias>.actions.<action>()`. This differs from integration actions, which use `actions.<alias>.<action>()`. See [Integration Actions](./integration-actions.md) for comparison.
171
+
172
+ Plugin actions are routed through the Botpress client internally -- the runtime proxy calls `client.callAction()` with the format `<alias>#<actionName>`, so you never need to construct this yourself.
173
+
174
+ ## Lock File Structure
175
+
176
+ Plugins live in `dependencies.dev.lock.json` (or `dependencies.prod.lock.json`) under the `plugins` key:
177
+
178
+ ```json
179
+ {
180
+ "version": 1,
181
+ "env": "dev",
182
+ "integrations": { ... },
183
+ "plugins": {
184
+ "desk-hitl": {
185
+ "name": "desk-hitl",
186
+ "version": "1.0.0",
187
+ "enabled": true,
188
+ "config": {
189
+ "apiKey": "${env:HITL_API_KEY}"
190
+ },
191
+ "dependencies": {
192
+ "hitlService": {
193
+ "integrationAlias": "zendesk"
194
+ }
195
+ }
196
+ }
197
+ }
198
+ }
199
+ ```
200
+
201
+ Each plugin entry has:
202
+
203
+ | Field | Description |
204
+ |-------|-------------|
205
+ | `name` | Plugin name on the Hub |
206
+ | `version` | Installed version |
207
+ | `enabled` | Whether the plugin is active |
208
+ | `config` | Configuration key-value pairs |
209
+ | `dependencies` | Map of interface alias to integration alias |
210
+
211
+ ## Environment Variable References
212
+
213
+ Plugin config values support `${env:VAR_NAME}` syntax. The CLI substitutes these from the process environment at apply time while preserving the reference in the lock file. This keeps secrets out of version control.
214
+
215
+ ```bash
216
+ # Set a config value that references an env var
217
+ adk plugins configure my-plugin --set apiKey='${env:MY_API_KEY}'
218
+ ```
219
+
220
+ ## Common Patterns
221
+
222
+ ### Add a Plugin with All Dependencies
223
+
224
+ ```bash
225
+ # 1. Install the required integration first
226
+ adk integrations add zendesk@2.0.0
227
+
228
+ # 2. Add the plugin (interface dependency auto-resolves)
229
+ adk plugins add desk-hitl@1.0.0
230
+
231
+ # 3. Verify
232
+ adk plugins list --verbose
233
+ ```
234
+
235
+ ### Promote Plugins from Dev to Prod
236
+
237
+ ```bash
238
+ # Copy all plugin (and integration) state from dev to prod
239
+ adk plugins copy --from dev --to prod --dry-run # preview first
240
+ adk plugins copy --from dev --to prod --yes # apply
241
+ ```
242
+
243
+ ### Temporarily Disable a Plugin
244
+
245
+ ```bash
246
+ adk plugins disable my-plugin
247
+ # Later:
248
+ adk plugins enable my-plugin
249
+ ```
250
+
251
+ ### Sync After Manual Cloud Changes
252
+
253
+ If someone changed plugin state through the Botpress dashboard:
254
+
255
+ ```bash
256
+ adk plugins sync # pull cloud state into lock file
257
+ adk plugins diff # verify lock matches cloud
258
+ ```
259
+
260
+ ## Pitfalls
261
+
262
+ 1. **Interface dependency errors on add** -- The most common failure. Always ensure the required integration is installed _before_ adding the plugin. Run `adk plugins info <name>` to see what interfaces a plugin needs.
263
+
264
+ 2. **Ambiguous dependencies** -- If you have multiple integrations implementing the same interface (e.g., two different HITL providers), you must pass `--dep` to disambiguate. The CLI will not guess.
265
+
266
+ 3. **Plugin actions vs integration actions** -- Plugin actions use `plugins.<alias>.actions.<name>()`, not `actions.<alias>.<name>()`. Mixing these up gives runtime errors.
267
+
268
+ 4. **Lock file drift** -- If someone adds or removes plugins via the Botpress dashboard, your local lock file becomes stale. Run `adk plugins sync` to reconcile.
269
+
270
+ 5. **Prod requires confirmation** -- `adk plugins apply --target prod` and destructive operations (uninstalls) require `--yes` to proceed. This is intentional.
271
+
272
+ 6. **Old `adk add plugin:` syntax** -- The legacy `adk add plugin:<name>` command still works but routes through the older dependency path. Prefer `adk plugins add <name>` for the full feature set (config, deps, enable/disable).
273
+
274
+ ## See Also
275
+
276
+ - [Interfaces](./interfaces.md) -- Built-in interface abstraction layer over integrations
277
+ - [Integrations](./integrations.md) -- Integration management overview
278
+ - [Integration Actions](./integration-actions.md) -- Calling integration actions from code
279
+ - [CLI](./cli.md) -- Complete CLI command reference
280
+ - [Agent Config](./agent-config.md) -- Bot configuration and state management