@botpress/adk 2.0.1-beta.0 → 2.0.1-beta.2

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 (43) hide show
  1. package/dist/agent0/capabilities/commands/adk-ship.md +3 -2
  2. package/dist/agent0/capabilities/commands/adk-validate.md +1 -1
  3. package/dist/agent0/capabilities/skills/adk/SKILL.md +19 -9
  4. package/dist/agent0/capabilities/skills/adk/references/actions.md +2 -0
  5. package/dist/agent0/capabilities/skills/adk/references/agent-config.md +25 -15
  6. package/dist/agent0/capabilities/skills/adk/references/cli.md +134 -41
  7. package/dist/agent0/capabilities/skills/adk/references/context-api.md +2 -0
  8. package/dist/agent0/capabilities/skills/adk/references/conversations.md +21 -0
  9. package/dist/agent0/capabilities/skills/adk/references/explain-config.md +2 -2
  10. package/dist/agent0/capabilities/skills/adk/references/integrations.md +39 -25
  11. package/dist/agent0/capabilities/skills/adk/references/interfaces.md +1 -1
  12. package/dist/agent0/capabilities/skills/adk/references/knowledge-bases.md +4 -4
  13. package/dist/agent0/capabilities/skills/adk/references/mcp-server.md +1 -1
  14. package/dist/agent0/capabilities/skills/adk/references/patterns-mistakes.md +16 -0
  15. package/dist/agent0/capabilities/skills/adk/references/plugins.md +28 -30
  16. package/dist/agent0/capabilities/skills/adk/references/tables.md +13 -26
  17. package/dist/agent0/capabilities/skills/adk/references/tools.md +2 -0
  18. package/dist/agent0/capabilities/skills/adk/references/triggers.md +16 -12
  19. package/dist/agent0/capabilities/skills/adk/references/workflows.md +2 -0
  20. package/dist/agent0/capabilities/skills/adk-debugger/references/common-failures.md +4 -4
  21. package/dist/agent0/capabilities/skills/adk-debugger/references/debug-workflow.md +11 -11
  22. package/dist/agent0/capabilities/skills/adk-dev-console/SKILL.md +5 -0
  23. package/dist/agent0/capabilities/skills/adk-dev-console/references/pages.md +14 -0
  24. package/dist/agent0/index.js +52 -14
  25. package/dist/agent0/index.js.map +6 -6
  26. package/dist/agent0/runtime/client.d.ts.map +1 -1
  27. package/dist/agent0/types.d.ts +5 -0
  28. package/dist/agent0/types.d.ts.map +1 -1
  29. package/dist/bot-generator/generator.d.ts.map +1 -1
  30. package/dist/commands/bp-dev-command.d.ts.map +1 -1
  31. package/dist/config/manager.d.ts.map +1 -1
  32. package/dist/dependencies/dependency-manager.d.ts +4 -0
  33. package/dist/dependencies/dependency-manager.d.ts.map +1 -1
  34. package/dist/dependencies/index.js +19 -3
  35. package/dist/dependencies/index.js.map +4 -4
  36. package/dist/deploy-manifest/index.d.ts.map +1 -1
  37. package/dist/generators/table-types.d.ts +1 -0
  38. package/dist/generators/table-types.d.ts.map +1 -1
  39. package/dist/index.js +54 -14
  40. package/dist/index.js.map +11 -10
  41. package/dist/utils/schema-serialization.d.ts +2 -0
  42. package/dist/utils/schema-serialization.d.ts.map +1 -0
  43. package/package.json +2 -2
@@ -15,6 +15,7 @@ The Dev Console is a **singleton shared dashboard**: one UI server per user, wit
15
15
  Activate when users ask about:
16
16
 
17
17
  - **UI concepts** — "What are Agent Steps?", "What does the Observe tab show?", "What is a turn?", "What is the component registry?", "What is the Agent Map?"
18
+ - **Agent(0) UI** — "What are the Tasks under Agent(0)?", "Where did the todo list come from?", "Why is Agent(0) showing task progress?"
18
19
  - **Dev Console navigation** — "What tabs are available?", "Where do I find traces?", "How do I test RAG?"
19
20
  - **Reading execution data** — "What do the steps mean?", "Why is my step red?", "What's the cost shown?"
20
21
  - **Component registry** — "Where do I find custom components?", "How do I install a component?", "What components are available?"
@@ -57,6 +58,10 @@ Match depth to the question:
57
58
  | **Observe** | Conversations, Traces, Logs | View conversation history, execution traces, runtime logs |
58
59
  | **Config** | Settings, Integrations | Agent config, secrets, LLM settings, integration management |
59
60
 
61
+ ### Agent(0) Task Dock
62
+
63
+ When Agent(0) uses its todo tool, the panel shows a compact **Tasks** dock with completed/total count, the active task, and an expandable task list. Status icons map to pending, in progress, completed, and cancelled; priorities are shown as low/medium/high chips.
64
+
60
65
  ### Multi-Agent Sidebar
61
66
 
62
67
  The sidebar header shows the currently selected agent with a status indicator and mode pill (dev/prod/cloud). Clicking it opens the **Agent Selector** dropdown:
@@ -26,6 +26,7 @@ Real-time conversation interface for testing the agent.
26
26
  - Conversation picker dropdown (filters to webchat conversations)
27
27
  - "Open conversation traces" link to jump to full Traces view
28
28
  - Download transcript button
29
+ - Agent(0) side panel can show a **Tasks** dock when Agent(0) emits todo-tool updates: collapsed progress count, active task text, and an expandable list with status and priority.
29
30
 
30
31
  ---
31
32
 
@@ -279,6 +280,19 @@ Install, configure, and manage integrations.
279
280
  - Configuration editing via UI
280
281
  - Installation status per integration
281
282
  - Configured integrations' actions appear on the Actions page
283
+ - Dependency actions for comparing dev/prod state and promoting reviewed changes
284
+ - In Cloud Console mode, install/uninstall/upgrade controls are disabled; finish config/auth in the Hub or disable/remove the dependency from the owning environment.
285
+
286
+ ### Deploy Dialog
287
+
288
+ The deploy dialog computes the same deploy plan as `adk deploy`.
289
+
290
+ **Warnings and blockers:**
291
+
292
+ - Missing required secrets block deploy until values are provided.
293
+ - Enabled dependencies that are unavailable, unconfigured, or unresolved block deploy.
294
+ - 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
+ - Destructive table, KB, or asset changes require explicit confirmation.
282
296
 
283
297
  ---
284
298
 
@@ -99,7 +99,7 @@ A developer building an AI agent with the ADK. They're running \`adk dev\` and h
99
99
  ## What you know
100
100
  The ADK is a high-level framework built on Botpress. An agent project has:
101
101
  - /actions — strongly-typed callable functions (Action from @botpress/runtime)
102
- - /tools — LLM-callable interfaces with natural language descriptions (Tool from @botpress/runtime)
102
+ - /tools — LLM-callable interfaces with natural language descriptions (Autonomous.Tool from @botpress/runtime)
103
103
  - /workflows — step-based, resumable long-running processes (Workflow from @botpress/runtime)
104
104
  - /conversations — channel-specific interaction handlers (Conversation from @botpress/runtime)
105
105
  - /tables — schema-validated data storage with semantic search (Table from @botpress/runtime)
@@ -111,9 +111,12 @@ The ADK compiles these high-level primitives down to Botpress SDK primitives. De
111
111
 
112
112
  Schemas use \`z\` from @botpress/sdk (a Zod fork) — never import Zod directly.
113
113
 
114
+ Standalone tools use \`Autonomous.Tool\`: \`import { Autonomous, z } from '@botpress/runtime'\`, then
115
+ \`new Autonomous.Tool({...})\`. There is no top-level \`Tool\` export from \`@botpress/runtime\`.
116
+
114
117
  ## How you work
115
118
 
116
- **Working directory.** Your shell is already set to the agent project root. Run all commands directly — never prepend \`cd\` to change into the project directory.
119
+ **Working directory.** Your shell is already set to the agent project root — an existing ADK project you build into; never scaffold a new or nested project (no \`adk init\`). Run all commands directly — never prepend \`cd\` to change into the project directory.
117
120
 
118
121
  **CLI-first.** Use the \`adk\` CLI with \`--format json\` for everything you can — status, logs, traces, integrations, workflows, chat, evals. The only MCP tool you have is \`adk_take_screenshot\` (see below), because it requires direct browser access the CLI can't provide.
119
122
 
@@ -129,18 +132,18 @@ Schemas use \`z\` from @botpress/sdk (a Zod fork) — never import Zod directly.
129
132
 
130
133
  **Conceptual vs. project questions.** Conceptual questions about ADK, Botpress, or TypeScript — answer from knowledge immediately. Questions about their project (why something fails, what a file does, how to change behavior) — inspect first. If in doubt, answer what you can immediately and inspect in parallel.
131
134
 
132
- **Read freely, write carefully.** Inspecting files, querying traces and logs via CLI, and reading documentation are always safe — do them without asking. But actions that modify the project (adding integrations, editing files, executing workflows, sending messages) should be confirmed first unless the developer explicitly asked you to do it.
135
+ **Read freely, write carefully.** Inspecting files, querying traces and logs via CLI, and reading documentation are always safe — do them without asking. But actions that modify the project (adding third-party integrations, editing files, executing workflows, sending messages) should be confirmed first unless the developer explicitly asked you to do it. Installing a chat channel to test your own bot is part of testing — see below — not a change that needs confirmation.
133
136
 
134
137
  **Debug by matching the approach to the problem:**
135
138
  - Developer gives you an error message → start from the error, don't begin at "step 1"
136
- - Build or type error → run \`adk check --format json\` for offline validation, then check the file and generated types. Traces won't help.
139
+ - Build or type error → run \`adk check --format json\` for offline validation AND \`tsc --noEmit\` for type errors (\`adk check\` does NOT typecheck); run \`tsc --noEmit\` before considering any task done. Then check the file and generated types. Traces won't help.
137
140
  - Runtime behavior is wrong ("it responds wrong") → reproduce with \`adk chat --single "<relevant message>" --format json\`, then inspect traces with \`adk traces --format json\`
138
141
  - Nothing happens → check \`adk logs error --format json\` for silent failures, then check if the handler is registered
139
142
  - When in doubt → start with \`adk check --format json\`, then \`adk logs error --format json\`, then traces
140
143
 
141
144
  **Integrations.** First check if the integration already exists with \`adk integrations list\`. Only search the hub (\`adk integrations search <query>\`) when adding a new integration. Get details with \`adk integrations info <name>\` to understand actions, events, channels, and config requirements. Add it with \`adk integrations add <name>\` after the developer confirms.
142
145
 
143
- **Test iteratively.** To send messages, use \`adk chat --single "<message>" --format json\`. Pass the \`conversationId\` (--conversation-id "<id>") from the previous response to continue. Only test against the local dev bot.
146
+ **Test iteratively.** To send messages, use \`adk chat --single "<message>" --format json\`. Pass the \`conversationId\` (--conversation-id "<id>") from the previous response to continue. Only test against the local dev bot. Sends need a channel: if none is installed, run \`adk integrations add chat\` first and don't wait for confirmation — installing the test channel is part of testing. Don't treat conversational changes as done until \`adk chat --single\` actually replies.
144
147
 
145
148
  **Workflows.** Use \`adk workflows list --format json\` to discover available workflows. Use \`adk workflows inspect <name> --format json\` to get the input schema. Use \`adk workflows run <name> '{"key": "value"}' --format json\` to execute. For workflows with no required input, pass \`'{}'\` as the payload.
146
149
 
@@ -318,7 +321,19 @@ Warm, direct, and efficient. No filler. Bias to action over questions; when you
318
321
 
319
322
  // src/agent0/capabilities/builtins.ts
320
323
  var AGENT0_DEFAULT_AGENT = "default";
321
- var AGENT0_PRIMARY_AGENT_STEPS = 64;
324
+ var AGENT0_DEFAULT_PRIMARY_AGENT_STEPS = 64;
325
+ var AGENT0_PRIMARY_AGENT_STEPS_ENV = "ADK_AGENT0_MAX_STEPS";
326
+ function resolveAgent0PrimaryAgentSteps(env = process.env) {
327
+ const raw = env[AGENT0_PRIMARY_AGENT_STEPS_ENV];
328
+ if (raw === undefined || raw.trim() === "")
329
+ return AGENT0_DEFAULT_PRIMARY_AGENT_STEPS;
330
+ const parsed = Number(raw);
331
+ if (Number.isInteger(parsed) && parsed > 0)
332
+ return parsed;
333
+ process.stderr.write(`[adk] Ignoring invalid ${AGENT0_PRIMARY_AGENT_STEPS_ENV}=${JSON.stringify(raw)}: ` + `expected a positive integer of agentic steps. Falling back to ${AGENT0_DEFAULT_PRIMARY_AGENT_STEPS}.
334
+ `);
335
+ return AGENT0_DEFAULT_PRIMARY_AGENT_STEPS;
336
+ }
322
337
  var AGENT0_PROJECT_DIR = ".agent0";
323
338
  var AGENT0_PROJECT_CAPABILITIES_DIR = "capabilities";
324
339
  var AGENT0_PROJECT_SKILLS_DIR = "skills";
@@ -329,6 +344,7 @@ var AGENT0_SCREENSHOT_RAW_TOOL_PERMISSION = "adk_take_screenshot";
329
344
  function buildAgent0BuiltInCapabilities(options) {
330
345
  const skillsRoot = resolveAgent0ProjectSkillsRoot(options.agentPath);
331
346
  const commandsRoot = resolveAgent0ProjectPlaybooksRoot(options.agentPath);
347
+ const primaryAgentSteps = resolveAgent0PrimaryAgentSteps();
332
348
  return {
333
349
  mcp: {
334
350
  adk: {
@@ -348,13 +364,13 @@ function buildAgent0BuiltInCapabilities(options) {
348
364
  description: "Agent(0) - helps build and debug Botpress ADK agents",
349
365
  prompt: AGENT0_DEFAULT_PROMPT,
350
366
  mode: "primary",
351
- steps: AGENT0_PRIMARY_AGENT_STEPS
367
+ steps: primaryAgentSteps
352
368
  },
353
369
  guided: {
354
370
  description: "ADK guided setup - interviews the developer and scaffolds a new agent",
355
371
  prompt: GUIDED_SETUP_PROMPT,
356
372
  mode: "primary",
357
- steps: AGENT0_PRIMARY_AGENT_STEPS,
373
+ steps: primaryAgentSteps,
358
374
  permission: {
359
375
  [AGENT0_SCREENSHOT_MCP_TOOL_PERMISSION]: "deny",
360
376
  [AGENT0_SCREENSHOT_RAW_TOOL_PERMISSION]: "deny"
@@ -362,11 +378,11 @@ function buildAgent0BuiltInCapabilities(options) {
362
378
  },
363
379
  build: {
364
380
  mode: "primary",
365
- steps: AGENT0_PRIMARY_AGENT_STEPS
381
+ steps: primaryAgentSteps
366
382
  },
367
383
  plan: {
368
384
  mode: "primary",
369
- steps: AGENT0_PRIMARY_AGENT_STEPS
385
+ steps: primaryAgentSteps
370
386
  }
371
387
  },
372
388
  defaultAgent: AGENT0_DEFAULT_AGENT
@@ -2488,7 +2504,7 @@ function normalizeOpenCodeEvent(value) {
2488
2504
  ...id ? { id } : {},
2489
2505
  type: "session.error",
2490
2506
  ...typeof properties.sessionID === "string" ? { sessionId: properties.sessionID } : {},
2491
- error: { message: normalizeErrorMessage(properties.error) }
2507
+ error: normalizeAgent0Error(properties.error)
2492
2508
  };
2493
2509
  }
2494
2510
  case "question.asked": {
@@ -2663,7 +2679,7 @@ function normalizeAgent0MessageInfo(info) {
2663
2679
  ...mode ? { mode } : {},
2664
2680
  ...model ? { model } : {},
2665
2681
  ...usage ? { usage } : {},
2666
- ...isRecord2(info.error) ? { error: { message: normalizeErrorMessage(info.error) } } : {}
2682
+ ...isRecord2(info.error) ? { error: normalizeAgent0Error(info.error) } : {}
2667
2683
  };
2668
2684
  }
2669
2685
  var EMPTY_COMPLETION_MAX_RETRIES = 1;
@@ -2811,7 +2827,7 @@ function normalizeAgent0MessagePart(part) {
2811
2827
  status: "error",
2812
2828
  ...typeof part.attempt === "number" && Number.isFinite(part.attempt) ? { attempt: part.attempt } : {},
2813
2829
  ...normalizeAgent0PartTime(part.time) ? { time: normalizeAgent0PartTime(part.time) } : {},
2814
- ...isRecord2(part.error) ? { error: { message: normalizeErrorMessage(part.error) } } : {}
2830
+ ...isRecord2(part.error) ? { error: normalizeAgent0Error(part.error) } : {}
2815
2831
  }
2816
2832
  ];
2817
2833
  case "snapshot":
@@ -2945,6 +2961,26 @@ function normalizePartSource(value) {
2945
2961
  function normalizeErrorMessage(value) {
2946
2962
  return typeof value.message === "string" && value.message.trim().length > 0 ? value.message : "Agent(0) message failed.";
2947
2963
  }
2964
+ var MAX_ERROR_DATA_STRING = 2000;
2965
+ function truncateErrorData(data) {
2966
+ const out = {};
2967
+ for (const [key, value] of Object.entries(data)) {
2968
+ out[key] = typeof value === "string" && value.length > MAX_ERROR_DATA_STRING ? value.slice(0, MAX_ERROR_DATA_STRING) : value;
2969
+ }
2970
+ return out;
2971
+ }
2972
+ function normalizeAgent0Error(value) {
2973
+ const error = { message: normalizeErrorMessage(value) };
2974
+ if (typeof value.name === "string")
2975
+ error.name = value.name;
2976
+ if (typeof value.code === "string")
2977
+ error.code = value.code;
2978
+ if (typeof value.status === "number")
2979
+ error.status = value.status;
2980
+ if (isRecord2(value.data))
2981
+ error.data = truncateErrorData(value.data);
2982
+ return error;
2983
+ }
2948
2984
  function normalizeAgent0MessageUsage(value) {
2949
2985
  const usage = {};
2950
2986
  if (typeof value.cost === "number" && Number.isFinite(value.cost))
@@ -3330,6 +3366,7 @@ export {
3330
3366
  sanitizeAgent0OpenCodeBaseEnv,
3331
3367
  resolveAgent0ProjectSkillsRoot,
3332
3368
  resolveAgent0ProjectPlaybooksRoot,
3369
+ resolveAgent0PrimaryAgentSteps,
3333
3370
  resolveAgent0OpenCodeBinary,
3334
3371
  resolveAgent0BuiltInSkillsRootCandidates,
3335
3372
  resolveAgent0BuiltInSkillsRoot,
@@ -3395,9 +3432,10 @@ export {
3395
3432
  AGENT0_PROJECT_DIR,
3396
3433
  AGENT0_PROJECT_CAPABILITIES_MANIFEST,
3397
3434
  AGENT0_PROJECT_CAPABILITIES_DIR,
3435
+ AGENT0_PRIMARY_AGENT_STEPS_ENV,
3398
3436
  AGENT0_HIDDEN_OPENCODE_SKILL,
3399
3437
  AGENT0_CONFIG_SCHEMA_VERSION,
3400
3438
  AGENT0_BUILT_IN_MCP_PERMISSION
3401
3439
  };
3402
3440
 
3403
- //# debugId=D54D2C6D79749EC864756E2164756E21
3441
+ //# debugId=40B39330E6C0780D64756E2164756E21