@botpress/adk 2.0.1 → 2.0.3
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/agent-project/agent-project.d.ts +1 -0
- package/dist/agent-project/agent-project.d.ts.map +1 -1
- package/dist/agent0/capabilities/commands/adk-ship.md +2 -1
- package/dist/agent0/capabilities/commands/adk-validate.md +1 -1
- package/dist/agent0/capabilities/skills/adk/references/agent-config.md +35 -4
- package/dist/agent0/capabilities/skills/adk/references/cli.md +38 -3
- package/dist/agent0/capabilities/skills/adk/references/explain-config.md +2 -2
- package/dist/agent0/capabilities/skills/adk/references/files.md +6 -1
- package/dist/agent0/capabilities/skills/adk/references/knowledge-bases.md +7 -3
- package/dist/agent0/capabilities/skills/adk/references/tables.md +2 -0
- package/dist/agent0/capabilities/skills/adk-dev-console/references/pages.md +6 -4
- package/dist/bot-generator/generator.d.ts +1 -0
- package/dist/bot-generator/generator.d.ts.map +1 -1
- package/dist/bot-generator/integration-sync.d.ts +5 -1
- package/dist/bot-generator/integration-sync.d.ts.map +1 -1
- package/dist/bot-generator/plugin-sync.d.ts +5 -1
- package/dist/bot-generator/plugin-sync.d.ts.map +1 -1
- package/dist/commands/bp-cli.js +2 -2
- package/dist/commands/bp-cli.js.map +1 -1
- package/dist/dependencies/index.js +16 -5
- package/dist/dependencies/index.js.map +3 -3
- package/dist/index.js +54 -33
- package/dist/index.js.map +6 -6
- package/package.json +3 -3
|
@@ -52,6 +52,7 @@ export declare class AgentProject {
|
|
|
52
52
|
private _tools;
|
|
53
53
|
constructor(projectPath: string, options?: AgentProjectOptions);
|
|
54
54
|
static load(projectPath: string, options?: AgentProjectOptions): Promise<AgentProject>;
|
|
55
|
+
private static _getCacheKey;
|
|
55
56
|
static clearCache(): void;
|
|
56
57
|
static clearCacheForPath(projectPath: string): void;
|
|
57
58
|
get path(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-project.d.ts","sourceRoot":"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KlC;IAGK,eAAe,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAkBzC,mBAAmB,IAAI,OAAO,CAAC,aAAa,CAAC;IAa7C,UAAU,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAchE,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC;IAI5C,IAAI,aAAa,IAAI,aAAa,CAEjC;IAGK,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAY/C,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IA0B3D,oBAAoB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IA4BzD,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IA4D3E,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;YAc5B,UAAU;YAuJV,aAAa;YAkBb,oBAAoB;YAapB,kBAAkB;YAclB,2BAA2B;IAkCzC;;;;OAIG;IACH;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAuBxB,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,0BAA0B;IAOlC,OAAO,CAAC,eAAe;YAUT,mBAAmB;CA0VlC"}
|
|
@@ -14,6 +14,7 @@ This is a deploy-to-production command — treat it as destructive-by-default. C
|
|
|
14
14
|
- `adk evals --format json` — must pass if any evals exist; if none exist, surface that as a warning and offer `/adk-eval` before shipping.
|
|
15
15
|
- `git status` — surface uncommitted changes; ask whether to ship the working tree as-is or commit first.
|
|
16
16
|
- `adk status --format json` — confirm the project is linked to the intended workspace and bot.
|
|
17
|
+
- `adk secret --prod --format json` — surface unset required prod secrets as warnings unless the user wants CI-strict deploy with `adk deploy --require-secrets`.
|
|
17
18
|
- `adk integrations status --target prod --format json` and `adk plugins status --target prod --format json` — block on unavailable/unconfigured enabled dependencies. Check `agent.config.ts` for missing models.
|
|
18
19
|
- If a project command reports an ADK runtime/package mismatch, run `adk project upgrade --dry-run`, show the plan, and get approval before `adk project upgrade`.
|
|
19
20
|
|
|
@@ -21,7 +22,7 @@ This is a deploy-to-production command — treat it as destructive-by-default. C
|
|
|
21
22
|
|
|
22
23
|
3. **Confirm.** Always ask before deploying — the original `/adk-ship` invocation is not consent. If there are blockers, stop and offer to fix each. Otherwise (warnings or fully green), ask: _"Ship to <bot>? (yes / no)"_.
|
|
23
24
|
|
|
24
|
-
4. **Deploy.** Run `adk deploy`. Stream output. If `adk deploy` prompts for preflight approval, surface the prompt to the user — do not auto-approve. If deploy warns that integration versions differ between dev and prod, show the warning and recommend `adk integrations copy --from dev --to prod --dry-run` before any promotion.
|
|
25
|
+
4. **Deploy.** Run `adk deploy`. Stream output. If `adk deploy` prompts for preflight approval, surface the prompt to the user — do not auto-approve. If deploy warns that required prod secrets are unset, show the `adk secret:set <KEY> <value> --prod` commands. If deploy warns that integration versions differ between dev and prod, show the warning and recommend `adk integrations copy --from dev --to prod --dry-run` before any promotion.
|
|
25
26
|
|
|
26
27
|
5. **Verify.** After deploy, run `adk status --format json` to confirm the deployed version. Report deployed version and any post-deploy warnings. Note: `adk chat` runs against the local dev bot, not the deployed one — do not use it as a production smoke test. Direct the user to the Dev Console for live verification.
|
|
27
28
|
|
|
@@ -27,5 +27,5 @@ This is the proactive counterpart to `/adk-debug`: nothing is necessarily broken
|
|
|
27
27
|
- Any referenced model is available in the project's model config.
|
|
28
28
|
- Any referenced sibling primitive (table, action, tool) actually exists in `src/`.
|
|
29
29
|
- **Feature-level only:** the primitives in the set actually wire together — e.g., the workflow's action calls resolve to existing actions, the table the workflow writes to matches the schema the action reads.
|
|
30
|
-
- No hardcoded secrets, tokens, or API keys.
|
|
30
|
+
- No hardcoded secrets, tokens, or API keys. Bot runtime credentials should be declared in `agent.config.ts`, set with `adk secret:set`, and read through `secrets.KEY`.
|
|
31
31
|
6. **Report.** Group findings as ❌ Errors → ⚠️ Warnings → ✅ Passed, with each finding tagged by file. For a feature target, also include a short "wiring" subsection that summarizes how the primitives connect. End with one line: _"Run `/adk-test <name>` to actually invoke it."_ Do not apply fixes from this command — let the user decide which to take.
|
|
@@ -54,6 +54,16 @@ export default defineConfig({
|
|
|
54
54
|
}),
|
|
55
55
|
},
|
|
56
56
|
|
|
57
|
+
secrets: {
|
|
58
|
+
OPENAI_API_KEY: {
|
|
59
|
+
description: 'OpenAI API key used by custom model calls',
|
|
60
|
+
},
|
|
61
|
+
OPTIONAL_WEBHOOK_SECRET: {
|
|
62
|
+
optional: true,
|
|
63
|
+
description: 'Shared secret for optional webhook verification',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
|
|
57
67
|
// Cloud is the source of truth; .adk/dependencies/ stores generated snapshots.
|
|
58
68
|
// Use `adk integrations add/remove/configure` to manage them — see integrations.md
|
|
59
69
|
})
|
|
@@ -97,6 +107,18 @@ if (configuration.featureFlags.enableBetaFeatures) {
|
|
|
97
107
|
|
|
98
108
|
See **[Context API](./context-api.md)** for details on accessing other runtime values.
|
|
99
109
|
|
|
110
|
+
#### Secrets
|
|
111
|
+
|
|
112
|
+
Declare secret names in `agent.config.ts`, then read values at runtime with the typed `secrets` proxy:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import { secrets } from '@botpress/runtime'
|
|
116
|
+
|
|
117
|
+
const apiKey = secrets.OPENAI_API_KEY
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Secret names must be `SCREAMING_SNAKE_CASE` and cannot use reserved prefixes such as `SECRET_`, `BP_`, or `BOTPRESS_`. Values are set separately with `adk secret:set <KEY> <value>` for dev or `adk secret:set <KEY> <value> --prod` for prod. Dev values live in `.adk/secrets.json`. Prod values live on the remote bot and are write-only; ADK can show set/unset status, but cannot read values back.
|
|
121
|
+
|
|
100
122
|
### Model Configuration
|
|
101
123
|
|
|
102
124
|
**Default Models:**
|
|
@@ -323,7 +345,7 @@ export const Chat = new Conversation({
|
|
|
323
345
|
|
|
324
346
|
## Best Practices
|
|
325
347
|
|
|
326
|
-
### 1. Use
|
|
348
|
+
### 1. Use Declared Secrets for Runtime Credentials
|
|
327
349
|
|
|
328
350
|
```typescript
|
|
329
351
|
// ❌ Bad - hardcoded secrets
|
|
@@ -331,12 +353,21 @@ config: {
|
|
|
331
353
|
apiKey: 'sk-abc123def456'
|
|
332
354
|
}
|
|
333
355
|
|
|
334
|
-
// ✅ Good -
|
|
335
|
-
|
|
336
|
-
|
|
356
|
+
// ✅ Good - declared in agent.config.ts
|
|
357
|
+
secrets: {
|
|
358
|
+
OPENAI_API_KEY: {
|
|
359
|
+
description: 'OpenAI API key'
|
|
360
|
+
}
|
|
337
361
|
}
|
|
362
|
+
|
|
363
|
+
// ✅ Good - read in runtime code
|
|
364
|
+
import { secrets } from '@botpress/runtime'
|
|
365
|
+
|
|
366
|
+
const apiKey = secrets.OPENAI_API_KEY
|
|
338
367
|
```
|
|
339
368
|
|
|
369
|
+
Use `${env:VAR_NAME}` only for integration or plugin configuration values that the CLI applies to Cloud. For credentials read by bot code, declare a secret and access it through `secrets.KEY`.
|
|
370
|
+
|
|
340
371
|
### 2. Validate Configuration
|
|
341
372
|
|
|
342
373
|
```typescript
|
|
@@ -205,6 +205,7 @@ adk dev [options]
|
|
|
205
205
|
- `-p, --port <port>` - Bot port (default: 3000)
|
|
206
206
|
- `--port-console <port>` - UI console port (default: 3001)
|
|
207
207
|
- `--non-interactive` - Emit structured NDJSON events to stdout without the Ink/TUI (CI/agent-friendly)
|
|
208
|
+
- `--no-watch` - Disable file watching and hot reload
|
|
208
209
|
- `-v, --verbose` - Show additional details (project path, log file)
|
|
209
210
|
- `--otlp` - Enable OTLP trace export to an external collector (default port 4318)
|
|
210
211
|
- `--port-otlp <port>` - Port for the OTLP collector endpoint (Jaeger, otel-tui, etc.)
|
|
@@ -257,6 +258,7 @@ adk deploy [options]
|
|
|
257
258
|
- `--confirm-storage-changes` - Explicitly confirm destructive table/KB/asset deletions
|
|
258
259
|
- `--dry-run` - Compute the deploy plan without applying changes
|
|
259
260
|
- `--allow-unconfigured` - Deploy with enabled unconfigured/unresolved dependencies inert instead of blocking
|
|
261
|
+
- `--require-secrets` - Fail when required prod secrets are unset on the remote bot
|
|
260
262
|
- `--format <format>` - Output format (`json`; requires `--yes` or `--dry-run`)
|
|
261
263
|
|
|
262
264
|
**What it does:**
|
|
@@ -292,6 +294,7 @@ adk deploy --dry-run --format json
|
|
|
292
294
|
- `--yes` auto-approves non-destructive deploy-plan changes.
|
|
293
295
|
- Destructive table, KB, or asset deletions still require `--confirm-storage-changes`.
|
|
294
296
|
- Enabled dependencies that are unavailable, unconfigured, or unresolved block real deploys unless the user explicitly chooses `--allow-unconfigured`.
|
|
297
|
+
- Missing required prod secrets warn by default. Deploy never sends secret values. Set them on the remote bot with `adk secret:set <KEY> <value> --prod`, or use `--require-secrets` to make missing prod secrets a hard CI failure.
|
|
295
298
|
- If dev and prod have the same integration alias/name but different versions, deploy prints a non-blocking warning. Preview promotion with `adk integrations copy --from dev --to prod --dry-run` before applying `--yes`.
|
|
296
299
|
- JSON output requires either `--yes` or `--dry-run`.
|
|
297
300
|
- Deploy still validates configuration and may require interaction if config values are missing.
|
|
@@ -671,6 +674,38 @@ adk conversations show <id> --include-llm --format json
|
|
|
671
674
|
|
|
672
675
|
**Requires:** `adk dev` run at least once (populates the local trace store).
|
|
673
676
|
|
|
677
|
+
### adk tables
|
|
678
|
+
|
|
679
|
+
Read a bot's tables from the terminal. Defaults to the dev bot; pass `--prod` for production. Both subcommands accept `--format json`.
|
|
680
|
+
|
|
681
|
+
- `adk tables list` — list the bot's tables
|
|
682
|
+
- `adk tables rows <Table>` — print a table's rows
|
|
683
|
+
|
|
684
|
+
#### adk tables list
|
|
685
|
+
|
|
686
|
+
```bash
|
|
687
|
+
adk tables # list (default)
|
|
688
|
+
adk tables list --prod --format json
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
#### adk tables rows
|
|
692
|
+
|
|
693
|
+
```bash
|
|
694
|
+
adk tables rows <Table> [limit=<n>] [offset=<n>] [--filter <json>] [--search <term>] [--prod] [--format json]
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
- `limit=<n>` / `offset=<n>` — pagination tokens
|
|
698
|
+
- `--filter <json>` — MongoDB-style filter, e.g. `'{"status":{"$eq":"open"}}'`
|
|
699
|
+
- `--search <term>` — semantic search over the table's searchable columns
|
|
700
|
+
|
|
701
|
+
**Examples:**
|
|
702
|
+
|
|
703
|
+
```bash
|
|
704
|
+
adk tables rows ContactsTable limit=20 offset=40
|
|
705
|
+
adk tables rows ContactsTable --filter '{"status":{"$eq":"open"}}'
|
|
706
|
+
adk tables rows ContactsTable --search "billing issue" --format json
|
|
707
|
+
```
|
|
708
|
+
|
|
674
709
|
### adk evals
|
|
675
710
|
|
|
676
711
|
Run automated conversation tests defined under `evals/`.
|
|
@@ -1109,7 +1144,7 @@ adk config:get botId --prod
|
|
|
1109
1144
|
|
|
1110
1145
|
### adk secret
|
|
1111
1146
|
|
|
1112
|
-
Manage
|
|
1147
|
+
Manage declared bot secrets. `adk secret` (no subcommand) shows the declared secrets and whether each is set in dev and prod.
|
|
1113
1148
|
|
|
1114
1149
|
```bash
|
|
1115
1150
|
adk secret [options] # show declared secrets + status
|
|
@@ -1122,7 +1157,7 @@ adk secret:delete <key> [options] # delete a secret
|
|
|
1122
1157
|
- `--prod` - Target the production bot (default: dev)
|
|
1123
1158
|
- `--format <format>` - Output format (`json`)
|
|
1124
1159
|
|
|
1125
|
-
`<key>` is `SCREAMING_SNAKE_CASE`. `secret:set` never echoes the value back.
|
|
1160
|
+
`<key>` is `SCREAMING_SNAKE_CASE` and must be declared in `agent.config.ts`. Dev values live in `.adk/secrets.json`. Prod values live on the remote bot and are write-only: ADK can list names/status but cannot read values. `secret:set` never echoes the value back.
|
|
1126
1161
|
|
|
1127
1162
|
```bash
|
|
1128
1163
|
adk secret # list declared secrets and set/unset status
|
|
@@ -1316,7 +1351,7 @@ adk integrations remove slack
|
|
|
1316
1351
|
|
|
1317
1352
|
- Use `adk dev` for development (hot reload)
|
|
1318
1353
|
- Keep `agent.config.ts` in git
|
|
1319
|
-
- Use
|
|
1354
|
+
- Use declared ADK secrets for bot runtime credentials
|
|
1320
1355
|
- Run `adk chat` for quick testing
|
|
1321
1356
|
|
|
1322
1357
|
**DON'T:**
|
|
@@ -301,11 +301,11 @@ Check the `secrets` block in `agent.config.ts` for declared secrets, and look fo
|
|
|
301
301
|
> - `SLACK_BOT_TOKEN` — Used to authenticate the Slack integration
|
|
302
302
|
> - `LINEAR_API_KEY` — Used to authenticate the Linear integration
|
|
303
303
|
>
|
|
304
|
-
> Secrets are managed via `adk
|
|
304
|
+
> Secrets are managed via `adk secret` and injected at runtime. Make sure they're set for both dev and production environments.
|
|
305
305
|
|
|
306
306
|
**Potential issues:**
|
|
307
307
|
|
|
308
|
-
- Hardcoded secrets in `agent.config.ts`
|
|
308
|
+
- Hardcoded secrets in `agent.config.ts` or source code. Declare them in `agent.config.ts`, set values with `adk secret:set`, and read them through `secrets.KEY`.
|
|
309
309
|
- Declared secrets that aren't set — the integration won't work at runtime.
|
|
310
310
|
|
|
311
311
|
### Registered Primitives
|
|
@@ -508,18 +508,21 @@ const { file } = await client.copyFile({
|
|
|
508
508
|
|
|
509
509
|
### Indexable Formats
|
|
510
510
|
|
|
511
|
-
These file types support semantic search indexing:
|
|
511
|
+
These file types support semantic search indexing in knowledge bases:
|
|
512
512
|
|
|
513
513
|
```typescript
|
|
514
514
|
const INDEXABLE_TYPES = {
|
|
515
515
|
// Documents
|
|
516
516
|
pdf: 'application/pdf',
|
|
517
|
+
doc: 'application/msword',
|
|
517
518
|
docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
518
519
|
|
|
519
520
|
// Text
|
|
520
521
|
txt: 'text/plain',
|
|
521
522
|
md: 'text/markdown',
|
|
523
|
+
mdx: 'text/markdown',
|
|
522
524
|
html: 'text/html',
|
|
525
|
+
htm: 'text/html',
|
|
523
526
|
|
|
524
527
|
// Images (with vision processing)
|
|
525
528
|
jpg: 'image/jpeg',
|
|
@@ -528,6 +531,8 @@ const INDEXABLE_TYPES = {
|
|
|
528
531
|
}
|
|
529
532
|
```
|
|
530
533
|
|
|
534
|
+
The Dev Console knowledge connector picker uses file extensions as its only signal. It accepts `.pdf`, `.html`, `.htm`, `.txt`, `.doc`, `.docx`, `.md`, `.mdx`, plus extensionless provider files such as native Google Docs. It rejects other extensions before sync and lets the backend decide on extensionless files.
|
|
535
|
+
|
|
531
536
|
### Vision Processing
|
|
532
537
|
|
|
533
538
|
For images and PDFs with vision enabled:
|
|
@@ -41,7 +41,7 @@ export const DocsKnowledgeBase = new Knowledge({
|
|
|
41
41
|
|
|
42
42
|
### 1. Local Files (Directory)
|
|
43
43
|
|
|
44
|
-
Index local
|
|
44
|
+
Index local PDF, HTML, Word, markdown, and text files:
|
|
45
45
|
|
|
46
46
|
```typescript
|
|
47
47
|
const docsSource = DataSource.Directory.fromPath('src/knowledge', {
|
|
@@ -49,12 +49,16 @@ const docsSource = DataSource.Directory.fromPath('src/knowledge', {
|
|
|
49
49
|
|
|
50
50
|
// Filter specific file types
|
|
51
51
|
filter: (path) => {
|
|
52
|
-
return
|
|
52
|
+
return /\.(pdf|html?|docx?|mdx?|txt)$/i.test(path)
|
|
53
53
|
},
|
|
54
54
|
})
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
**Note**: Local file sources are for development only and won't work in production.
|
|
57
|
+
**Note**: Local file sources are for development only and won't work in production. Pass a project-root-relative, non-empty path like `src/knowledge/docs`; `DataSource.Directory.fromPath()` rejects empty/non-string paths and paths that escape the agent directory. Do not use `import.meta.dirname` for the directory path because it is undefined in the compiled bundle.
|
|
58
|
+
|
|
59
|
+
### Connector Knowledge Base
|
|
60
|
+
|
|
61
|
+
The Dev Console Knowledge page can bootstrap a dev-only connector target when the project has no knowledge bases. Clicking **Add knowledge connector** creates `src/knowledge/connectors.ts` with a `connectors` knowledge base, waits for hot reload to pick it up, then syncs it to the dev bot so provider files can be attached. This is not available for prod targets; declare the knowledge base in source and redeploy for production.
|
|
58
62
|
|
|
59
63
|
### 2. Website Crawling
|
|
60
64
|
|
|
@@ -270,6 +270,8 @@ await UsersTable.createRows({
|
|
|
270
270
|
|
|
271
271
|
### Finding Rows
|
|
272
272
|
|
|
273
|
+
> To read rows from the terminal, use `adk tables rows <Table>` ([CLI reference](./cli.md#adk-tables)). The API below runs inside the agent.
|
|
274
|
+
|
|
273
275
|
```typescript
|
|
274
276
|
// Find by condition
|
|
275
277
|
const { rows } = await UsersTable.findRows({
|
|
@@ -172,6 +172,8 @@ Manage knowledge bases and uploaded files.
|
|
|
172
172
|
- Sort by name, date, or size
|
|
173
173
|
- File detail drawer: metadata, embedding status, delete/sync/copy path
|
|
174
174
|
- KB sync dialog to upload and sync files
|
|
175
|
+
- "Add knowledge connector" opens the connector panel. In dev, if the project has no KBs yet, the empty state can create `src/knowledge/connectors.ts` and sync a `connectors` KB first.
|
|
176
|
+
- Connector file selection accepts `.pdf`, `.html`, `.htm`, `.txt`, `.doc`, `.docx`, `.md`, `.mdx`, and extensionless provider files.
|
|
175
177
|
- Pagination for large file lists
|
|
176
178
|
|
|
177
179
|
### Tables (`/tables`)
|
|
@@ -212,14 +214,14 @@ Browse agent files.
|
|
|
212
214
|
|
|
213
215
|
View all conversations with the agent.
|
|
214
216
|
|
|
215
|
-
**Layout:**
|
|
217
|
+
**Layout:** Conversation table + read-only detail viewer
|
|
216
218
|
|
|
217
219
|
**Features:**
|
|
218
220
|
|
|
219
221
|
- Table columns: ID, Integration → Channel, Created, Updated, Preview
|
|
220
222
|
- Sortable columns
|
|
221
223
|
- Real-time polling for new conversations
|
|
222
|
-
- Click row to inspect
|
|
224
|
+
- Click row to inspect a live transcript without sending messages
|
|
223
225
|
|
|
224
226
|
### Traces (`/traces`) — dev only
|
|
225
227
|
|
|
@@ -265,7 +267,7 @@ Agent configuration management.
|
|
|
265
267
|
|
|
266
268
|
1. **Overview** — Agent metadata: name, Bot ID, Workspace ID, file path, created/updated dates. Copy buttons for IDs.
|
|
267
269
|
2. **Configuration Variables** (dev only) — Runtime config schema and values. Add/edit/delete variables.
|
|
268
|
-
3. **Secrets**
|
|
270
|
+
3. **Secrets** — Secret schema and set/unset status for the selected target. Dev values are local; prod values are remote and write-only. Add/edit/delete declared secret values.
|
|
269
271
|
4. **LLM Config** (dev only) — Model selection and parameters.
|
|
270
272
|
|
|
271
273
|
### Integrations (`/integrations`)
|
|
@@ -289,7 +291,7 @@ The deploy dialog computes the same deploy plan as `adk deploy`.
|
|
|
289
291
|
|
|
290
292
|
**Warnings and blockers:**
|
|
291
293
|
|
|
292
|
-
- Missing required secrets
|
|
294
|
+
- Missing required prod secrets warn by default. Deploy does not write secret values; use `adk secret:set <KEY> <value> --prod` or Settings -> Secrets to set them. CI can require them with `adk deploy --require-secrets`.
|
|
293
295
|
- Enabled dependencies that are unavailable, unconfigured, or unresolved block deploy.
|
|
294
296
|
- Integration version mismatches are non-blocking: if dev and prod have the same alias/name but different versions, the dialog shows a warning and points to Integrations dependency actions for Compare Dev vs Prod and Promote Dev to Prod.
|
|
295
297
|
- Destructive table, KB, or asset changes require explicit confirmation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/bot-generator/generator.ts"],"names":[],"mappings":"AAuBA,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAiCD,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU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AAO,CAAC,kBAAkB;YAmBZ,8BAA8B;YA8C9B,yBAAyB;YA2CzB,4BAA4B;IA2B1C;;;;;;OAMG;IACH,OAAO,CAAC,sBAAsB;YAiDhB,qBAAqB;YAgoBrB,gBAAgB;YA4ChB,mBAAmB;YAenB,gBAAgB;YAmChB,mBAAmB;YAyBnB,UAAU;YAWV,aAAa;IAgBrB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;YA8f3B,0BAA0B;IAgBlC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAqBzC;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgGpF"}
|
|
@@ -11,12 +11,16 @@ export interface SyncResult {
|
|
|
11
11
|
error: string;
|
|
12
12
|
}>;
|
|
13
13
|
}
|
|
14
|
+
export interface IntegrationSyncOptions {
|
|
15
|
+
adkCommand?: 'adk-dev' | 'adk-build' | 'adk-deploy';
|
|
16
|
+
}
|
|
14
17
|
export declare class IntegrationSync {
|
|
15
18
|
private projectPath;
|
|
16
19
|
private botProjectPath;
|
|
17
20
|
private bpModulesPath;
|
|
21
|
+
private adkCommand?;
|
|
18
22
|
private credentialsPromise;
|
|
19
|
-
constructor(projectPath: string, botProjectPath: string);
|
|
23
|
+
constructor(projectPath: string, botProjectPath: string, options?: IntegrationSyncOptions);
|
|
20
24
|
private getCredentials;
|
|
21
25
|
/**
|
|
22
26
|
* Parse agent.config.ts dependencies integrations into IntegrationInfo objects
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-sync.d.ts","sourceRoot":"","sources":["../../src/bot-generator/integration-sync.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM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CAAC,UAAU,CAAC;CAuC9C"}
|
|
@@ -11,12 +11,16 @@ export interface PluginSyncResult {
|
|
|
11
11
|
error: string;
|
|
12
12
|
}>;
|
|
13
13
|
}
|
|
14
|
+
export interface PluginSyncOptions {
|
|
15
|
+
adkCommand?: 'adk-dev' | 'adk-build' | 'adk-deploy';
|
|
16
|
+
}
|
|
14
17
|
export declare class PluginSync {
|
|
15
18
|
private projectPath;
|
|
16
19
|
private botProjectPath;
|
|
17
20
|
private bpModulesPath;
|
|
21
|
+
private adkCommand?;
|
|
18
22
|
private credentialsPromise;
|
|
19
|
-
constructor(projectPath: string, botProjectPath: string);
|
|
23
|
+
constructor(projectPath: string, botProjectPath: string, options?: PluginSyncOptions);
|
|
20
24
|
private getCredentials;
|
|
21
25
|
/**
|
|
22
26
|
* Parse agent.config.ts dependencies plugins into PluginInfo objects
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-sync.d.ts","sourceRoot":"","sources":["../../src/bot-generator/plugin-sync.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,UAAU,EAAE,CAAA;IACpB,MAAM,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAChD;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,aAAa,CAAQ;
|
|
1
|
+
{"version":3,"file":"plugin-sync.d.ts","sourceRoot":"","sources":["../../src/bot-generator/plugin-sync.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,UAAU,EAAE,CAAA;IACpB,MAAM,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAChD;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,CAAA;CACpD;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,UAAU,CAAC,CAAiC;IAGpD,OAAO,CAAC,kBAAkB,CAA8D;gBAE5E,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB;IAOxF,OAAO,CAAC,cAAc;IAatB;;OAEG;YACW,YAAY;IA0B1B;;OAEG;YACW,cAAc;IA4B5B;;OAEG;YACW,aAAa;IAiB3B;;OAEG;YACW,kBAAkB;IAmBhC;;OAEG;YACW,kBAAkB;IAQhC;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAsC/C"}
|
package/dist/commands/bp-cli.js
CHANGED
|
@@ -89,7 +89,7 @@ import os from "os";
|
|
|
89
89
|
import path from "path";
|
|
90
90
|
import createDebug from "debug";
|
|
91
91
|
var debug = createDebug("adk:bp-cli");
|
|
92
|
-
var BP_CLI_VERSION = "6.8.
|
|
92
|
+
var BP_CLI_VERSION = "6.8.10";
|
|
93
93
|
var BP_CLI_INSTALL_ALL = path.join(os.homedir(), ".adk", `bp-cli`);
|
|
94
94
|
var BP_CLI_INSTALL_DIR = path.join(BP_CLI_INSTALL_ALL, BP_CLI_VERSION);
|
|
95
95
|
var BP_CLI_BIN_PATH = path.join(BP_CLI_INSTALL_DIR, "node_modules", "@botpress", "cli", "bin.js");
|
|
@@ -144,4 +144,4 @@ export {
|
|
|
144
144
|
BP_CLI_BIN_PATH
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
-
//# debugId=
|
|
147
|
+
//# debugId=E1C77DD23F077A1664756E2164756E21
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
"import { existsSync } from 'fs'\nimport os from 'os'\nimport path from 'path'\nimport createDebug from 'debug'\nimport { AdkError } from '@botpress/analytics'\n\nconst debug = createDebug('adk:bp-cli')\n\nexport interface BpCliInfo {\n path: string\n version: string\n}\n\n// This constant is injected at build time by esbuild's define\ndeclare const __BP_CLI_VERSION__: string\n\nexport const BP_CLI_VERSION = __BP_CLI_VERSION__\nexport const BP_CLI_INSTALL_ALL = path.join(os.homedir(), '.adk', `bp-cli`)\nexport const BP_CLI_INSTALL_DIR = path.join(BP_CLI_INSTALL_ALL, BP_CLI_VERSION)\nexport const BP_CLI_BIN_PATH = path.join(BP_CLI_INSTALL_DIR, 'node_modules', '@botpress', 'cli', 'bin.js')\n\nconst BP_CLIENT_ENV_KEYS = [\n 'BP_API_URL',\n 'BP_TOKEN',\n 'BP_WORKSPACE_ID',\n 'BP_BOT_ID',\n 'BP_INTEGRATION_ID',\n 'BP_INTEGRATION_ALIAS',\n] as const\n\ndebug('BP_CLI_VERSION=%s (injected at build time)', BP_CLI_VERSION)\ndebug('BP_CLI_INSTALL_ALL=%s', BP_CLI_INSTALL_ALL)\ndebug('BP_CLI_INSTALL_DIR=%s', BP_CLI_INSTALL_DIR)\ndebug('BP_CLI_BIN_PATH=%s', BP_CLI_BIN_PATH)\n\n/**\n * Get bp CLI info (path and version)\n */\nexport function getBpCli(): BpCliInfo {\n debug('getBpCli() called')\n debug('checking if BP_CLI_BIN_PATH exists: %s', BP_CLI_BIN_PATH)\n\n const exists = existsSync(BP_CLI_BIN_PATH)\n debug('BP_CLI_BIN_PATH exists=%s', exists)\n\n if (!exists) {\n debug('ERROR: bp CLI not found at expected path')\n throw new AdkError({\n code: 'INTERNAL_BP_CLI_MISSING',\n message: `@botpress/cli version ${BP_CLI_VERSION} is not installed in the ADK directory \"${BP_CLI_INSTALL_DIR}\". This is a bug, please report it to the Botpress team.`,\n expected: false,\n })\n }\n\n const info = {\n path: BP_CLI_BIN_PATH,\n version: BP_CLI_VERSION,\n }\n\n debug('returning BpCliInfo: %O', info)\n return info\n}\n\nexport function getBpCliEnvironment(overrides: Record<string, string | undefined> = {}): NodeJS.ProcessEnv {\n // Callers must pass this with execa's extendEnv: false; otherwise execa merges\n // process.env back in after these stale Botpress client keys are removed.\n const env = { ...process.env }\n\n for (const key of BP_CLIENT_ENV_KEYS) {\n delete env[key]\n }\n\n return {\n ...env,\n ...overrides,\n }\n}\n"
|
|
8
8
|
],
|
|
9
9
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEO,SAAS,UAAU,CAAC,OAAmC;AAAA,EAC5D,IAAI,iBAAiB;AAAA,IAAU,OAAO;AAAA,EACtC,IAAI,EAAE,iBAAiB;AAAA,IAAQ,OAAO;AAAA,EACtC,OAAQ,MAAM,aAAgE,wBAAwB;AAAA;AAAA,IA3D3F;AAAA;AAAA,aAAN,MAAM,iBAA+C,MAAM;AAAA,WAMzC,sBAAsB;AAAA,IAQpC;AAAA,IAMA;AAAA,IAEA;AAAA,IAEA;AAAA,IAET,WAAW,CAAC,MAOT;AAAA,MACD,MAAM,KAAK,SAAS,KAAK,UAAU,YAAY,EAAE,OAAO,KAAK,MAAM,IAAI,SAAS;AAAA,MAChF,KAAK,OAAO,KAAK,YAAY;AAAA,MAC7B,KAAK,OAAO,KAAK;AAAA,MACjB,KAAK,WAAW,KAAK,YAAY;AAAA,MAGjC,IAAI,KAAK,YAAY,WAAW;AAAA,QAC9B,KAAK,UAAU,KAAK;AAAA,MACtB;AAAA,MACA,IAAI,KAAK,eAAe,WAAW;AAAA,QACjC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10
|
-
"debugId": "
|
|
10
|
+
"debugId": "E1C77DD23F077A1664756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
|
@@ -3868,8 +3868,9 @@ var init_agent_project = __esm(() => {
|
|
|
3868
3868
|
}
|
|
3869
3869
|
static async load(projectPath, options = {}) {
|
|
3870
3870
|
const resolvedPath = path10.resolve(projectPath);
|
|
3871
|
+
const cacheKey = AgentProject._getCacheKey(resolvedPath, options);
|
|
3871
3872
|
if (!options.noCache) {
|
|
3872
|
-
const cached = AgentProject._projectCache.get(
|
|
3873
|
+
const cached = AgentProject._projectCache.get(cacheKey);
|
|
3873
3874
|
if (cached) {
|
|
3874
3875
|
return cached;
|
|
3875
3876
|
}
|
|
@@ -3877,16 +3878,26 @@ var init_agent_project = __esm(() => {
|
|
|
3877
3878
|
const project = new AgentProject(resolvedPath, options);
|
|
3878
3879
|
await project.reload();
|
|
3879
3880
|
if (!options.noCache) {
|
|
3880
|
-
AgentProject._projectCache.set(
|
|
3881
|
+
AgentProject._projectCache.set(cacheKey, project);
|
|
3881
3882
|
}
|
|
3882
3883
|
return project;
|
|
3883
3884
|
}
|
|
3885
|
+
static _getCacheKey(resolvedPath, options) {
|
|
3886
|
+
const adkCommand = options.adkCommand ?? "default";
|
|
3887
|
+
const offline = options.offline ? "offline" : "online";
|
|
3888
|
+
return `${resolvedPath}\x00${adkCommand}\x00${offline}`;
|
|
3889
|
+
}
|
|
3884
3890
|
static clearCache() {
|
|
3885
3891
|
AgentProject._projectCache.clear();
|
|
3886
3892
|
}
|
|
3887
3893
|
static clearCacheForPath(projectPath) {
|
|
3888
3894
|
const resolvedPath = path10.resolve(projectPath);
|
|
3889
|
-
|
|
3895
|
+
const prefix = `${resolvedPath}\x00`;
|
|
3896
|
+
for (const key of AgentProject._projectCache.keys()) {
|
|
3897
|
+
if (key.startsWith(prefix)) {
|
|
3898
|
+
AgentProject._projectCache.delete(key);
|
|
3899
|
+
}
|
|
3900
|
+
}
|
|
3890
3901
|
}
|
|
3891
3902
|
get path() {
|
|
3892
3903
|
return this._path;
|
|
@@ -4801,7 +4812,7 @@ var _format = null, _formatLoaded = false, formatCode = async (code, filepath) =
|
|
|
4801
4812
|
`));
|
|
4802
4813
|
return code;
|
|
4803
4814
|
}
|
|
4804
|
-
}, ADK_VERSION = "2.0.
|
|
4815
|
+
}, ADK_VERSION = "2.0.3", relative = (from, to) => {
|
|
4805
4816
|
const fromDir = path13.dirname(from);
|
|
4806
4817
|
const relative2 = path13.relative(fromDir, to);
|
|
4807
4818
|
return relative2.startsWith(".") ? relative2 : `./${relative2}`;
|
|
@@ -6657,4 +6668,4 @@ export {
|
|
|
6657
6668
|
DEPENDENCY_ERROR_CODES
|
|
6658
6669
|
};
|
|
6659
6670
|
|
|
6660
|
-
//# debugId=
|
|
6671
|
+
//# debugId=06103A7DF6040DFA64756E2164756E21
|