@botpress/adk 1.19.0-beta.9 → 2.0.0-alpha.1

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 (199) hide show
  1. package/dist/agent-init/agent-project-generator.d.ts +5 -1
  2. package/dist/agent-init/agent-project-generator.d.ts.map +1 -1
  3. package/dist/agent-project/agent-project.d.ts +3 -3
  4. package/dist/agent-project/agent-project.d.ts.map +1 -1
  5. package/dist/agent-project/agent-resolver.d.ts.map +1 -1
  6. package/dist/agent-project/config-writer.d.ts +1 -1
  7. package/dist/agent-project/dependency-state-to-dependencies.d.ts +11 -0
  8. package/dist/agent-project/dependency-state-to-dependencies.d.ts.map +1 -0
  9. package/dist/agent-project/types.d.ts +9 -4
  10. package/dist/agent-project/types.d.ts.map +1 -1
  11. package/dist/agent0/capabilities/commands/adk-build.md +6 -5
  12. package/dist/agent0/capabilities/commands/adk-debug.md +1 -1
  13. package/dist/agent0/capabilities/commands/adk-dev-console.md +1 -1
  14. package/dist/agent0/capabilities/commands/adk-document.md +10 -2
  15. package/dist/agent0/capabilities/commands/adk-eval.md +1 -1
  16. package/dist/agent0/capabilities/commands/adk-explain.md +2 -2
  17. package/dist/agent0/capabilities/commands/adk-init.md +2 -2
  18. package/dist/agent0/capabilities/commands/adk-ship.md +1 -1
  19. package/dist/agent0/capabilities/commands/adk-test.md +3 -3
  20. package/dist/agent0/capabilities/commands/adk-validate.md +3 -3
  21. package/dist/agent0/capabilities/skills/adk/SKILL.md +21 -21
  22. package/dist/agent0/capabilities/skills/adk/references/actions.md +245 -239
  23. package/dist/agent0/capabilities/skills/adk/references/advanced-patterns.md +185 -218
  24. package/dist/agent0/capabilities/skills/adk/references/agent-config.md +74 -71
  25. package/dist/agent0/capabilities/skills/adk/references/assets.md +45 -48
  26. package/dist/agent0/capabilities/skills/adk/references/autonomous-execution.md +40 -46
  27. package/dist/agent0/capabilities/skills/adk/references/cli.md +17 -7
  28. package/dist/agent0/capabilities/skills/adk/references/context-api.md +98 -94
  29. package/dist/agent0/capabilities/skills/adk/references/conversation-lifecycle.md +65 -62
  30. package/dist/agent0/capabilities/skills/adk/references/conversations.md +395 -385
  31. package/dist/agent0/capabilities/skills/adk/references/custom-components.md +1 -1
  32. package/dist/agent0/capabilities/skills/adk/references/desk.md +236 -234
  33. package/dist/agent0/capabilities/skills/adk/references/explain-config.md +54 -37
  34. package/dist/agent0/capabilities/skills/adk/references/files.md +301 -306
  35. package/dist/agent0/capabilities/skills/adk/references/integration-actions.md +211 -214
  36. package/dist/agent0/capabilities/skills/adk/references/integrations.md +33 -31
  37. package/dist/agent0/capabilities/skills/adk/references/interfaces.md +13 -12
  38. package/dist/agent0/capabilities/skills/adk/references/knowledge-bases.md +98 -111
  39. package/dist/agent0/capabilities/skills/adk/references/mcp-server.md +6 -0
  40. package/dist/agent0/capabilities/skills/adk/references/messages.md +280 -256
  41. package/dist/agent0/capabilities/skills/adk/references/model-configuration.md +52 -49
  42. package/dist/agent0/capabilities/skills/adk/references/patterns-mistakes.md +102 -101
  43. package/dist/agent0/capabilities/skills/adk/references/plugins.md +15 -15
  44. package/dist/agent0/capabilities/skills/adk/references/tables.md +204 -210
  45. package/dist/agent0/capabilities/skills/adk/references/tags.md +141 -143
  46. package/dist/agent0/capabilities/skills/adk/references/tools.md +191 -199
  47. package/dist/agent0/capabilities/skills/adk/references/triggers.md +331 -336
  48. package/dist/agent0/capabilities/skills/adk/references/workflow-steps.md +132 -96
  49. package/dist/agent0/capabilities/skills/adk/references/workflows.md +479 -464
  50. package/dist/agent0/capabilities/skills/adk/references/zai-agent-reference.md +127 -129
  51. package/dist/agent0/capabilities/skills/adk/references/zai-complete-guide.md +255 -276
  52. package/dist/agent0/capabilities/skills/adk-debugger/SKILL.md +21 -17
  53. package/dist/agent0/capabilities/skills/adk-debugger/references/common-failures.md +25 -25
  54. package/dist/agent0/capabilities/skills/adk-debugger/references/conversation-analysis.md +49 -41
  55. package/dist/agent0/capabilities/skills/adk-debugger/references/debug-workflow.md +20 -14
  56. package/dist/agent0/capabilities/skills/adk-debugger/references/llm-debugging.md +13 -13
  57. package/dist/agent0/capabilities/skills/adk-debugger/references/trace-summarization.md +18 -18
  58. package/dist/agent0/capabilities/skills/adk-debugger/references/traces-and-logs.md +67 -67
  59. package/dist/agent0/capabilities/skills/adk-dev-console/SKILL.md +36 -36
  60. package/dist/agent0/capabilities/skills/adk-dev-console/references/agent-steps.md +14 -6
  61. package/dist/agent0/capabilities/skills/adk-dev-console/references/multi-agent-dashboard.md +13 -13
  62. package/dist/agent0/capabilities/skills/adk-dev-console/references/pages.md +18 -0
  63. package/dist/agent0/capabilities/skills/adk-docs/SKILL.md +13 -13
  64. package/dist/agent0/capabilities/skills/adk-docs/references/doc-standards.md +15 -0
  65. package/dist/agent0/capabilities/skills/adk-evals/SKILL.md +29 -23
  66. package/dist/agent0/capabilities/skills/adk-evals/references/eval-format.md +31 -23
  67. package/dist/agent0/capabilities/skills/adk-evals/references/test-patterns.md +25 -36
  68. package/dist/agent0/capabilities/skills/adk-evals/references/testing-workflow.md +6 -4
  69. package/dist/agent0/index.js +41 -19
  70. package/dist/agent0/index.js.map +7 -7
  71. package/dist/agent0/runtime/client.d.ts +2 -0
  72. package/dist/agent0/runtime/client.d.ts.map +1 -1
  73. package/dist/agent0/runtime/engine.d.ts +2 -1
  74. package/dist/agent0/runtime/engine.d.ts.map +1 -1
  75. package/dist/agent0/runtime/process.d.ts +1 -0
  76. package/dist/agent0/runtime/process.d.ts.map +1 -1
  77. package/dist/assets/manager.d.ts +3 -0
  78. package/dist/assets/manager.d.ts.map +1 -1
  79. package/dist/auth/credentials.d.ts +1 -1
  80. package/dist/bot-generator/generator.d.ts +22 -0
  81. package/dist/bot-generator/generator.d.ts.map +1 -1
  82. package/dist/bot-generator/plugin-sync.d.ts.map +1 -1
  83. package/dist/commands/base-command.d.ts +1 -0
  84. package/dist/commands/base-command.d.ts.map +1 -1
  85. package/dist/commands/bp-dev-command.d.ts +1 -1
  86. package/dist/commands/bp-dev-command.d.ts.map +1 -1
  87. package/dist/commands/bp-dev-stderr.d.ts +9 -0
  88. package/dist/commands/bp-dev-stderr.d.ts.map +1 -1
  89. package/dist/commands/index.d.ts +1 -0
  90. package/dist/commands/index.d.ts.map +1 -1
  91. package/dist/dependencies/catalog/catalog-service.d.ts +53 -0
  92. package/dist/dependencies/catalog/catalog-service.d.ts.map +1 -0
  93. package/dist/dependencies/catalog/client-factory.d.ts +33 -0
  94. package/dist/dependencies/catalog/client-factory.d.ts.map +1 -0
  95. package/dist/dependencies/catalog/integration-source.d.ts +34 -0
  96. package/dist/dependencies/catalog/integration-source.d.ts.map +1 -0
  97. package/dist/dependencies/catalog/interface-source.d.ts +23 -0
  98. package/dist/dependencies/catalog/interface-source.d.ts.map +1 -0
  99. package/dist/dependencies/catalog/plugin-source.d.ts +49 -0
  100. package/dist/dependencies/catalog/plugin-source.d.ts.map +1 -0
  101. package/dist/dependencies/catalog/resolution-cache.d.ts +76 -0
  102. package/dist/dependencies/catalog/resolution-cache.d.ts.map +1 -0
  103. package/dist/dependencies/dependency-manager.d.ts +31 -16
  104. package/dist/dependencies/dependency-manager.d.ts.map +1 -1
  105. package/dist/dependencies/errors.d.ts +2 -2
  106. package/dist/dependencies/errors.d.ts.map +1 -1
  107. package/dist/dependencies/index.d.ts +5 -4
  108. package/dist/dependencies/index.d.ts.map +1 -1
  109. package/dist/dependencies/index.js +2089 -1670
  110. package/dist/dependencies/index.js.map +37 -30
  111. package/dist/dependencies/legacy-lock-file.d.ts +15 -0
  112. package/dist/dependencies/legacy-lock-file.d.ts.map +1 -0
  113. package/dist/dependencies/migration.d.ts +19 -0
  114. package/dist/dependencies/migration.d.ts.map +1 -1
  115. package/dist/dependencies/resolvers/integration-resolver.d.ts +4 -3
  116. package/dist/dependencies/resolvers/integration-resolver.d.ts.map +1 -1
  117. package/dist/dependencies/resolvers/plugin-resolver.d.ts +4 -4
  118. package/dist/dependencies/resolvers/plugin-resolver.d.ts.map +1 -1
  119. package/dist/dependencies/snapshot-store.d.ts +59 -0
  120. package/dist/dependencies/snapshot-store.d.ts.map +1 -0
  121. package/dist/dependencies/status-resolver.d.ts +36 -0
  122. package/dist/dependencies/status-resolver.d.ts.map +1 -0
  123. package/dist/dependencies/status.d.ts +214 -0
  124. package/dist/dependencies/status.d.ts.map +1 -0
  125. package/dist/dependencies/types.d.ts +380 -29
  126. package/dist/dependencies/types.d.ts.map +1 -1
  127. package/dist/file-watcher/watcher.d.ts +21 -5
  128. package/dist/file-watcher/watcher.d.ts.map +1 -1
  129. package/dist/generators/action-types.d.ts.map +1 -1
  130. package/dist/generators/client-wrapper.d.ts.map +1 -1
  131. package/dist/index.d.ts +4 -5
  132. package/dist/index.d.ts.map +1 -1
  133. package/dist/index.js +3134 -2226
  134. package/dist/index.js.map +55 -48
  135. package/dist/integrations/config-utils.d.ts +11 -7
  136. package/dist/integrations/config-utils.d.ts.map +1 -1
  137. package/dist/integrations/hub-cache.d.ts +0 -58
  138. package/dist/integrations/hub-cache.d.ts.map +1 -1
  139. package/dist/integrations/index.d.ts +1 -3
  140. package/dist/integrations/index.d.ts.map +1 -1
  141. package/dist/integrations/manager.d.ts +19 -53
  142. package/dist/integrations/manager.d.ts.map +1 -1
  143. package/dist/interfaces/enhanced-cache.d.ts +7 -7
  144. package/dist/interfaces/enhanced-cache.d.ts.map +1 -1
  145. package/dist/interfaces/manager.d.ts +11 -17
  146. package/dist/interfaces/manager.d.ts.map +1 -1
  147. package/dist/knowledge/manager.d.ts +3 -0
  148. package/dist/knowledge/manager.d.ts.map +1 -1
  149. package/dist/plugins/index.d.ts +0 -1
  150. package/dist/plugins/index.d.ts.map +1 -1
  151. package/dist/plugins/manager.d.ts +16 -48
  152. package/dist/plugins/manager.d.ts.map +1 -1
  153. package/dist/preflight/checker.d.ts +6 -1
  154. package/dist/preflight/checker.d.ts.map +1 -1
  155. package/dist/preflight/dependency-gate.d.ts +37 -0
  156. package/dist/preflight/dependency-gate.d.ts.map +1 -0
  157. package/dist/preflight/index.d.ts +2 -1
  158. package/dist/preflight/index.d.ts.map +1 -1
  159. package/dist/preflight/types.d.ts +18 -0
  160. package/dist/preflight/types.d.ts.map +1 -1
  161. package/dist/runner/script-runner.d.ts.map +1 -1
  162. package/dist/tables/table-manager.d.ts +3 -0
  163. package/dist/tables/table-manager.d.ts.map +1 -1
  164. package/dist/templates/README.md +23 -13
  165. package/dist/templates/blank/agent.config.ts +3 -3
  166. package/dist/templates/blank/src/triggers/index.ts +1 -1
  167. package/dist/templates/botpress-desk/evals/index.eval.ts +1 -1
  168. package/dist/templates/botpress-desk/src/triggers/index.ts +1 -1
  169. package/dist/templates/crm-enrichment/README.md +3 -3
  170. package/dist/templates/crm-enrichment/agent.config.ts +2 -2
  171. package/dist/templates/crm-enrichment/src/conversations/index.ts +1 -1
  172. package/dist/templates/hello-world/agent.config.ts +3 -3
  173. package/dist/templates/hello-world/src/triggers/index.ts +1 -1
  174. package/dist/templates/knowledge-assistant/src/triggers/index.ts +1 -1
  175. package/dist/templates/template.config.json +3 -3
  176. package/dist/utils/ids.d.ts +10 -0
  177. package/dist/utils/ids.d.ts.map +1 -1
  178. package/dist/workspace/workspace-cache.d.ts +2 -1
  179. package/dist/workspace/workspace-cache.d.ts.map +1 -1
  180. package/package.json +3 -3
  181. package/dist/agent-project/lock-to-dependencies.d.ts +0 -11
  182. package/dist/agent-project/lock-to-dependencies.d.ts.map +0 -1
  183. package/dist/dependencies/lock-file.d.ts +0 -15
  184. package/dist/dependencies/lock-file.d.ts.map +0 -1
  185. package/dist/integrations/enhanced-cache.d.ts +0 -53
  186. package/dist/integrations/enhanced-cache.d.ts.map +0 -1
  187. package/dist/plugins/enhanced-cache.d.ts +0 -53
  188. package/dist/plugins/enhanced-cache.d.ts.map +0 -1
  189. package/dist/templates/blank/package.json +0 -17
  190. package/dist/templates/blank/tsconfig.json +0 -25
  191. package/dist/templates/botpress-desk/package.json +0 -17
  192. package/dist/templates/crm-enrichment/package.json +0 -18
  193. package/dist/templates/crm-enrichment/tsconfig.json +0 -25
  194. package/dist/templates/hello-world/package.json +0 -18
  195. package/dist/templates/hello-world/tsconfig.json +0 -25
  196. package/dist/templates/knowledge-assistant/package.json +0 -18
  197. package/dist/templates/knowledge-assistant/tsconfig.json +0 -25
  198. package/dist/templates/slack-triage/package.json +0 -18
  199. package/dist/templates/slack-triage/tsconfig.json +0 -25
@@ -19,21 +19,27 @@ Choose the appropriate style based on what you're documenting:
19
19
  Brief introduction (1-2 sentences)
20
20
 
21
21
  ## Quick Start
22
+
22
23
  5-10 line essential usage example from actual project
23
24
 
24
25
  ## Commands / Endpoints
26
+
25
27
  ### command-name / GET /endpoint
28
+
26
29
  Brief description
27
30
  **Options:** (if applicable)
28
31
  **Example:** (one example from project code)
29
32
 
30
33
  ## Common Workflows
34
+
31
35
  Only 3-4 workflows verified from actual project code
32
36
 
33
37
  ## Quick Reference
38
+
34
39
  Command summary table or list
35
40
 
36
41
  ## See Also
42
+
37
43
  Links to related docs
38
44
  ```
39
45
 
@@ -57,20 +63,26 @@ Links to related docs
57
63
  Brief introduction (2-3 sentences)
58
64
 
59
65
  ## Table of Contents
66
+
60
67
  - Clear links to major sections
61
68
  - Include subsection highlights
62
69
 
63
70
  ## Core Concepts
71
+
64
72
  Basic understanding needed
65
73
 
66
74
  ## [Main Feature 1]
75
+
67
76
  ### Basic Usage (example from actual project code)
77
+
68
78
  ### Edge Cases (only if critical and seen in project)
69
79
 
70
80
  ## [Main Feature 2]
81
+
71
82
  ...
72
83
 
73
84
  ## Quick Reference
85
+
74
86
  Essential patterns at a glance (if helpful)
75
87
  ```
76
88
 
@@ -102,14 +114,17 @@ Essential patterns at a glance (if helpful)
102
114
  ## Document Health Metrics
103
115
 
104
116
  **Reference Docs (CLI, API):**
117
+
105
118
  - Good: 400-500 lines, Quick Start at top, one example per command, 3-4 workflows
106
119
  - Warning: >600 lines, multiple examples per command, separate best practices section
107
120
 
108
121
  **Conceptual Guides:**
122
+
109
123
  - Good: 500-700 lines, progressive examples, verified workflows
110
124
  - Warning: >800 lines, vague sections, missing patterns
111
125
 
112
126
  **All Documents:**
127
+
113
128
  - Good: Every concept has code example, clear `##` headers, searchable section names
114
129
  - Warning: Vague section names ("Advanced", "Other"), no table of contents
115
130
 
@@ -26,6 +26,7 @@ Use this skill when the developer asks about:
26
26
  Or when you are developing an ADK bot and need to write the equivalent of unit/end-to-end tests.
27
27
 
28
28
  **Trigger questions:**
29
+
29
30
  - "How do I write an eval?"
30
31
  - "How do I test my workflow?"
31
32
  - "How do I assert that a tool was called with specific params?"
@@ -37,11 +38,11 @@ Or when you are developing an ADK bot and need to write the equivalent of unit/e
37
38
 
38
39
  ## Available Documentation
39
40
 
40
- | File | Contents |
41
- |------|----------|
42
- | `references/eval-format.md` | Complete file format — all fields, turn types, assertion categories, match operators, setup, outcome, options |
43
- | `references/testing-workflow.md` | Running evals, interpreting output, using traces, the write → test → iterate loop, CI integration |
44
- | `references/test-patterns.md` | Per-primitive patterns for actions, tools, workflows, conversations, and state |
41
+ | File | Contents |
42
+ | -------------------------------- | ------------------------------------------------------------------------------------------------------------- |
43
+ | `references/eval-format.md` | Complete file format — all fields, turn types, assertion categories, match operators, setup, outcome, options |
44
+ | `references/testing-workflow.md` | Running evals, interpreting output, using traces, the write → test → iterate loop, CI integration |
45
+ | `references/test-patterns.md` | Per-primitive patterns for actions, tools, workflows, conversations, and state |
45
46
 
46
47
  ## How to Answer
47
48
 
@@ -73,10 +74,7 @@ export default new Eval({
73
74
  {
74
75
  user: 'Hi!',
75
76
  assert: {
76
- response: [
77
- { not_contains: 'error' },
78
- { llm_judge: 'Response is friendly and offers to help' },
79
- ],
77
+ response: [{ not_contains: 'error' }, { llm_judge: 'Response is friendly and offers to help' }],
80
78
  tools: [{ not_called: 'createTicket' }],
81
79
  state: [{ path: 'conversation.greeted', equals: true }],
82
80
  },
@@ -96,21 +94,21 @@ export default new Eval({
96
94
 
97
95
  ### Turn types
98
96
 
99
- | Turn | When to use |
100
- |------|------------|
101
- | `user: 'message'` | Standard user message |
97
+ | Turn | When to use |
98
+ | -------------------------- | ------------------------------------------------ |
99
+ | `user: 'message'` | Standard user message |
102
100
  | `event: { type, payload }` | Non-message trigger (webhook, integration event) |
103
- | `expectSilence: true` | Assert bot does NOT respond |
101
+ | `expectSilence: true` | Assert bot does NOT respond |
104
102
 
105
103
  ### Assertion categories
106
104
 
107
- | Category | What it checks |
108
- |----------|---------------|
105
+ | Category | What it checks |
106
+ | ---------- | ----------------------------------------------------------- |
109
107
  | `response` | Bot reply text (contains, not_contains, matches, llm_judge) |
110
- | `tools` | Tool calls (called, not_called, call_order, params) |
111
- | `state` | Bot/user/conversation state (equals, changed) |
112
- | `workflow` | Workflow execution (entered, completed) |
113
- | `timing` | Response time in ms (lte, gte) |
108
+ | `tools` | Tool calls (called, not_called, call_order, params) |
109
+ | `state` | Bot/user/conversation state (equals, changed) |
110
+ | `workflow` | Workflow execution (entered, completed) |
111
+ | `timing` | Response time in ms (lte, gte) |
114
112
 
115
113
  ### CLI commands
116
114
 
@@ -143,7 +141,9 @@ adk evals runs --latest -v # with full details
143
141
 
144
142
  ```typescript
145
143
  // WRONG — missing user or event
146
- { expectSilence: true }
144
+ {
145
+ expectSilence: true
146
+ }
147
147
  ```
148
148
 
149
149
  ---
@@ -159,7 +159,9 @@ adk evals runs --latest -v # with full details
159
159
 
160
160
  ```typescript
161
161
  // INCOMPLETE — doesn't verify params were correct
162
- { called: 'createTicket' }
162
+ {
163
+ called: 'createTicket'
164
+ }
163
165
  ```
164
166
 
165
167
  ---
@@ -193,8 +195,8 @@ setup: {
193
195
  ```typescript
194
196
  // WRONG — depends on the bot correctly processing setup turns
195
197
  conversation: [
196
- { user: 'I am on the pro plan' }, // hoping bot sets user.plan
197
- { user: 'I need help with billing' }, // actual test turn
198
+ { user: 'I am on the pro plan' }, // hoping bot sets user.plan
199
+ { user: 'I need help with billing' }, // actual test turn
198
200
  ]
199
201
  ```
200
202
 
@@ -203,20 +205,24 @@ conversation: [
203
205
  ## Example Questions
204
206
 
205
207
  **Writing evals:**
208
+
206
209
  - "Write an eval that tests my createTicket tool is called with the right priority"
207
210
  - "How do I assert that the bot stays silent after an internal event?"
208
211
  - "How do I test a multi-turn conversation where context is retained?"
209
212
 
210
213
  **Running evals:**
214
+
211
215
  - "How do I run only regression evals?"
212
216
  - "How do I see which assertions failed and why?"
213
217
  - "How do I integrate evals into GitHub Actions?"
214
218
 
215
219
  **Debugging:**
220
+
216
221
  - "My eval says the tool wasn't called but I think it was — how do I check?"
217
222
  - "How do I inspect what the bot actually did during an eval?"
218
223
 
219
224
  **Per-primitive:**
225
+
220
226
  - "How do I test a workflow that uses step.sleep()?"
221
227
  - "How do I test that state changed from the seeded value?"
222
228
 
@@ -26,10 +26,10 @@ my-agent/
26
26
  import { Eval } from '@botpress/evals'
27
27
 
28
28
  export default new Eval({
29
- name: 'my-eval', // unique identifier (required)
29
+ name: 'my-eval', // unique identifier (required)
30
30
  description: 'What this tests', // optional
31
- type: 'regression', // 'capability' or 'regression' — optional, for filtering
32
- tags: ['tools', 'multi-turn'], // optional, for filtering
31
+ type: 'regression', // 'capability' or 'regression' — optional, for filtering
32
+ tags: ['tools', 'multi-turn'], // optional, for filtering
33
33
 
34
34
  setup: {
35
35
  // Seed state or trigger a workflow before the conversation (optional)
@@ -38,21 +38,27 @@ export default new Eval({
38
38
  conversation: [
39
39
  {
40
40
  user: 'message from user', // or: event, expectSilence
41
- assert: { /* per-turn assertions */ },
41
+ assert: {
42
+ /* per-turn assertions */
43
+ },
42
44
  },
43
45
  ],
44
46
 
45
- outcome: { /* post-conversation assertions (optional) */ },
47
+ outcome: {
48
+ /* post-conversation assertions (optional) */
49
+ },
46
50
 
47
- options: { /* per-eval overrides (optional) */ },
51
+ options: {
52
+ /* per-eval overrides (optional) */
53
+ },
48
54
  })
49
55
  ```
50
56
 
51
57
  ## Types
52
58
 
53
- | Type | Purpose |
54
- |------|---------|
55
- | `capability` | Verify the bot can do something new |
59
+ | Type | Purpose |
60
+ | ------------ | -------------------------------------- |
61
+ | `capability` | Verify the bot can do something new |
56
62
  | `regression` | Verify the bot still does it correctly |
57
63
 
58
64
  ## Multiple Evals Per File
@@ -190,21 +196,21 @@ assert: {
190
196
 
191
197
  Used in tool params, state values, and workflow params:
192
198
 
193
- | Operator | Example | Description |
194
- |----------|---------|-------------|
195
- | `equals` | `{ equals: 'urgent' }` | Exact match |
196
- | `contains` | `{ contains: 'HR' }` | Substring |
197
- | `not_contains` | `{ not_contains: 'test' }` | Excludes substring |
198
- | `matches` | `{ matches: '\\d+' }` | Regex |
199
- | `in` | `{ in: ['high', 'urgent'] }` | One of |
200
- | `exists` | `{ exists: true }` | Property exists |
199
+ | Operator | Example | Description |
200
+ | -------------- | ---------------------------- | ------------------ |
201
+ | `equals` | `{ equals: 'urgent' }` | Exact match |
202
+ | `contains` | `{ contains: 'HR' }` | Substring |
203
+ | `not_contains` | `{ not_contains: 'test' }` | Excludes substring |
204
+ | `matches` | `{ matches: '\\d+' }` | Regex |
205
+ | `in` | `{ in: ['high', 'urgent'] }` | One of |
206
+ | `exists` | `{ exists: true }` | Property exists |
201
207
 
202
208
  **Numeric-only operators** (for `timing` and numeric state values):
203
209
 
204
- | Operator | Example | Description |
205
- |----------|---------|-------------|
206
- | `gte` | `{ gte: 100 }` | Greater than or equal |
207
- | `lte` | `{ lte: 5000 }` | Less than or equal |
210
+ | Operator | Example | Description |
211
+ | -------- | --------------- | --------------------- |
212
+ | `gte` | `{ gte: 100 }` | Greater than or equal |
213
+ | `lte` | `{ lte: 5000 }` | Less than or equal |
208
214
 
209
215
  ---
210
216
 
@@ -294,7 +300,7 @@ export default defineConfig({
294
300
  evals: {
295
301
  idleTimeout: 20000,
296
302
  judgePassThreshold: 3,
297
- judgeModel: 'fast', // 'fast', 'best', or a model ref like 'openai:gpt-4o'
303
+ judgeModel: 'fast', // 'fast', 'best', or a model ref like 'openai:gpt-4o'
298
304
  },
299
305
  })
300
306
  ```
@@ -307,7 +313,9 @@ export default defineConfig({
307
313
 
308
314
  ```typescript
309
315
  // WRONG — every turn needs a trigger
310
- { expectSilence: true }
316
+ {
317
+ expectSilence: true
318
+ }
311
319
  ```
312
320
 
313
321
  ✅ **Correct**
@@ -19,13 +19,8 @@ export default new Eval({
19
19
  {
20
20
  user: 'What is the status of order ORD-123?',
21
21
  assert: {
22
- response: [
23
- { contains: 'ORD-123' },
24
- { llm_judge: 'Response includes order status information' },
25
- ],
26
- tools: [
27
- { called: 'lookupOrder', params: { orderId: { equals: 'ORD-123' } } },
28
- ],
22
+ response: [{ contains: 'ORD-123' }, { llm_judge: 'Response includes order status information' }],
23
+ tools: [{ called: 'lookupOrder', params: { orderId: { equals: 'ORD-123' } } }],
29
24
  },
30
25
  },
31
26
  ],
@@ -33,6 +28,7 @@ export default new Eval({
33
28
  ```
34
29
 
35
30
  **What to assert:**
31
+
36
32
  - `tools.called` with expected params — verify the action was invoked correctly
37
33
  - `response.contains` — verify the bot surfaced the action's result
38
34
  - `state` — if the action writes to state, verify the write
@@ -59,10 +55,13 @@ export default new Eval({
59
55
  user: 'Yes, please create a ticket for this',
60
56
  assert: {
61
57
  tools: [
62
- { called: 'createTicket', params: {
58
+ {
59
+ called: 'createTicket',
60
+ params: {
63
61
  category: { equals: 'billing' },
64
62
  priority: { in: ['normal', 'high'] },
65
- }},
63
+ },
64
+ },
66
65
  ],
67
66
  response: [{ contains: 'ticket' }],
68
67
  },
@@ -72,6 +71,7 @@ export default new Eval({
72
71
  ```
73
72
 
74
73
  **What to assert:**
74
+
75
75
  - `tools.called` with `params` — verify inputs are correctly extracted from the conversation
76
76
  - `tools.not_called` — verify tools are NOT called prematurely or inappropriately
77
77
  - `tools.call_order` — verify the correct sequence when multiple tools are involved
@@ -108,23 +108,15 @@ export default new Eval({
108
108
  {
109
109
  user: 'What happens next?',
110
110
  assert: {
111
- workflow: [
112
- { name: 'onboarding', entered: true },
113
- ],
114
- response: [
115
- { llm_judge: 'Response explains the onboarding next steps' },
116
- ],
111
+ workflow: [{ name: 'onboarding', entered: true }],
112
+ response: [{ llm_judge: 'Response explains the onboarding next steps' }],
117
113
  },
118
114
  },
119
115
  ],
120
116
 
121
117
  outcome: {
122
- workflow: [
123
- { name: 'onboarding', completed: true },
124
- ],
125
- state: [
126
- { path: 'user.onboardingComplete', equals: true },
127
- ],
118
+ workflow: [{ name: 'onboarding', completed: true }],
119
+ state: [{ path: 'user.onboardingComplete', equals: true }],
128
120
  },
129
121
  })
130
122
  ```
@@ -156,6 +148,7 @@ setup: {
156
148
  ```
157
149
 
158
150
  **What to assert:**
151
+
159
152
  - `workflow.entered` — workflow was triggered
160
153
  - `workflow.completed` — workflow ran to completion (use in `outcome`)
161
154
  - `state` — final state after the workflow completes
@@ -203,9 +196,7 @@ export default new Eval({
203
196
  payload: { amount: 99.99, currency: 'USD', customerId: 'cust-001' },
204
197
  },
205
198
  assert: {
206
- response: [
207
- { llm_judge: 'Bot notifies about the failed payment and offers help' },
208
- ],
199
+ response: [{ llm_judge: 'Bot notifies about the failed payment and offers help' }],
209
200
  tools: [{ called: 'lookupCustomer' }],
210
201
  },
211
202
  },
@@ -246,9 +237,7 @@ export default new Eval({
246
237
  {
247
238
  user: 'I prefer to be contacted by email',
248
239
  assert: {
249
- state: [
250
- { path: 'user.contactPreference', equals: 'email' },
251
- ],
240
+ state: [{ path: 'user.contactPreference', equals: 'email' }],
252
241
  },
253
242
  },
254
243
  ],
@@ -296,13 +285,13 @@ outcome: {
296
285
 
297
286
  ## Quick Reference: What to Assert Per Primitive
298
287
 
299
- | Primitive | Primary assertions | Secondary assertions |
300
- |-----------|-------------------|---------------------|
301
- | Actions | `tools.called` + params | `response`, `state` |
302
- | Tools | `tools.called/not_called/call_order` | `response` |
303
- | Workflows | `workflow.entered/completed` | `state`, `outcome` |
304
- | Conversations | `response` (multi-turn) | `tools`, `state` |
305
- | State | `state.equals/changed` | `outcome.state` |
288
+ | Primitive | Primary assertions | Secondary assertions |
289
+ | ------------- | ------------------------------------ | -------------------- |
290
+ | Actions | `tools.called` + params | `response`, `state` |
291
+ | Tools | `tools.called/not_called/call_order` | `response` |
292
+ | Workflows | `workflow.entered/completed` | `state`, `outcome` |
293
+ | Conversations | `response` (multi-turn) | `tools`, `state` |
294
+ | State | `state.equals/changed` | `outcome.state` |
306
295
 
307
296
  ---
308
297
 
@@ -313,11 +302,11 @@ Always test what the bot should NOT do, not just what it should do.
313
302
  ```typescript
314
303
  conversation: [
315
304
  {
316
- user: 'Show me all users in the system', // unauthorized request
305
+ user: 'Show me all users in the system', // unauthorized request
317
306
  assert: {
318
307
  tools: [{ not_called: 'listAllUsers' }], // should not call admin tool
319
308
  response: [
320
- { not_contains: 'user@example.com' }, // should not leak data
309
+ { not_contains: 'user@example.com' }, // should not leak data
321
310
  { llm_judge: 'Response politely declines the request' },
322
311
  ],
323
312
  },
@@ -53,10 +53,10 @@ adk evals --format json # machine-readable JSON output (for CI)
53
53
 
54
54
  ### Exit codes
55
55
 
56
- | Code | Meaning |
57
- |------|---------|
58
- | `0` | All evals passed |
59
- | `1` | One or more evals failed |
56
+ | Code | Meaning |
57
+ | ---- | ------------------------ |
58
+ | `0` | All evals passed |
59
+ | `1` | One or more evals failed |
60
60
 
61
61
  Use this in CI to gate merges on eval results.
62
62
 
@@ -120,6 +120,7 @@ adk chat
120
120
  ```
121
121
 
122
122
  This opens an interactive chat session with your dev bot. Use it to:
123
+
123
124
  - Manually test a flow before formalizing it as an eval
124
125
  - Quickly verify a fix after a failing eval
125
126
  - Explore edge cases interactively
@@ -146,6 +147,7 @@ adk logs # browse recent logs
146
147
  ```
147
148
 
148
149
  Use traces to verify:
150
+
149
151
  - Which tools were called (and with what inputs/outputs)
150
152
  - Whether a workflow was entered or completed
151
153
  - Where the bot spent its time (latency analysis)
@@ -138,7 +138,7 @@ Schemas use \`z\` from @botpress/sdk (a Zod fork) — never import Zod directly.
138
138
  - Nothing happens → check \`adk logs error --format json\` for silent failures, then check if the handler is registered
139
139
  - When in doubt → start with \`adk check --format json\`, then \`adk logs error --format json\`, then traces
140
140
 
141
- **Integrations.** First check if the integration already exists with \`adk list\`. Only search the hub (\`adk search <query>\`) when adding a new integration. Get details with \`adk info <name>\` to understand actions, events, channels, and config requirements. Add it with \`adk add <name>\` after the developer confirms.
141
+ **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
142
 
143
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.
144
144
 
@@ -286,7 +286,7 @@ Your shell is already set to the agent project root. Run all commands directly
286
286
  Before planning or writing, inspect enough local context:
287
287
  - Run \`adk status --format json\` if available to learn project state.
288
288
  - Read \`agent.config.ts\`.
289
- - Run \`adk list --format json\` before deciding integrations.
289
+ - Run \`adk integrations list --format json\` before deciding integrations.
290
290
  - Glob \`src/\` and skim existing primitives if the project is not empty.
291
291
  - For conversation changes, read every \`src/conversations/*.ts\` file and check channel overlap. Extend an existing overlapping handler; only create a new conversation file when channels are disjoint or the developer explicitly asks.
292
292
 
@@ -294,7 +294,7 @@ Never read or display \`.env\` files or credentials. If a secret/config value is
294
294
 
295
295
  ## Building Rules
296
296
 
297
- - Use \`adk info <integration> --format json\` before adding an integration when possible. Pin the version when you know it.
297
+ - Use \`adk integrations info <integration> --format json\` before adding an integration when possible. Pin the version when you know it.
298
298
  - Write files in dependency order: tables/knowledge first, actions/tools next, workflows next, conversations/triggers last.
299
299
  - Add seed/demo data only when useful and clearly placeholder.
300
300
  - Use static imports. Avoid dynamic imports except for documented ADK-safe cases.
@@ -1500,6 +1500,7 @@ import { pipeline } from "node:stream/promises";
1500
1500
 
1501
1501
  // src/agent0/runtime/engine.ts
1502
1502
  init_src();
1503
+ import { createHash as createHash2 } from "node:crypto";
1503
1504
 
1504
1505
  // src/agent0/runtime/permissions.ts
1505
1506
  var AGENT0_BUILT_IN_MCP_PERMISSION = "adk_*";
@@ -1683,14 +1684,15 @@ function buildAgent0CognitiveProvider(options) {
1683
1684
  models
1684
1685
  };
1685
1686
  }
1686
- function buildAgent0OpenCodeEnv(paths2, config, authContent = {}) {
1687
+ function buildAgent0OpenCodeEnv(paths2, configOrContent, authContent = {}) {
1688
+ const configContent = typeof configOrContent === "string" ? configOrContent : JSON.stringify(configOrContent);
1687
1689
  return {
1688
1690
  XDG_CONFIG_HOME: paths2.xdgConfigHome,
1689
1691
  XDG_DATA_HOME: paths2.xdgDataHome,
1690
1692
  XDG_CACHE_HOME: paths2.xdgCacheHome,
1691
1693
  XDG_STATE_HOME: paths2.xdgStateHome,
1692
1694
  OPENCODE_CONFIG_DIR: paths2.engineConfigDir,
1693
- OPENCODE_CONFIG_CONTENT: JSON.stringify(config),
1695
+ OPENCODE_CONFIG_CONTENT: configContent,
1694
1696
  OPENCODE_AUTH_CONTENT: JSON.stringify(authContent),
1695
1697
  OPENCODE_TEST_HOME: paths2.fakeHomeDir,
1696
1698
  OPENCODE_PURE: "1",
@@ -1707,11 +1709,13 @@ function buildAgent0OpenCodeEnv(paths2, config, authContent = {}) {
1707
1709
  }
1708
1710
  function renderAgent0OpenCodeRuntime(options) {
1709
1711
  const config = buildAgent0OpenCodeConfig(options);
1712
+ const configContent = JSON.stringify(config);
1710
1713
  const authContent = options.agent0Config ? buildAgent0OpenCodeAuthContent(options.agent0Config) : {};
1711
1714
  return {
1712
1715
  config,
1713
1716
  authContent,
1714
- env: buildAgent0OpenCodeEnv(options.paths, config, authContent)
1717
+ renderedOpenCodeConfigHash: sha256(configContent),
1718
+ env: buildAgent0OpenCodeEnv(options.paths, configContent, authContent)
1715
1719
  };
1716
1720
  }
1717
1721
  async function prepareAgent0OpenCodeRuntime(options) {
@@ -1756,6 +1760,9 @@ function renderCognitiveModelCostAndLimits(model) {
1756
1760
  }
1757
1761
  };
1758
1762
  }
1763
+ function sha256(content) {
1764
+ return createHash2("sha256").update(content).digest("hex");
1765
+ }
1759
1766
  function renderCognitiveModelModalities(model) {
1760
1767
  if (!model.tags?.includes("vision"))
1761
1768
  return {};
@@ -1955,6 +1962,7 @@ async function startAgent0OpenCodeProcess(options) {
1955
1962
  return {
1956
1963
  baseURL,
1957
1964
  authHeaders: buildAgent0OpenCodeAuthHeaders(serverAuth),
1965
+ renderedOpenCodeConfigHash: runtime.renderedOpenCodeConfigHash,
1958
1966
  pid: child.pid,
1959
1967
  stop: () => stopAgent0OpenCodeProcess(child)
1960
1968
  };
@@ -2083,7 +2091,7 @@ function createAgent0RuntimeClient(options) {
2083
2091
  path: "/path",
2084
2092
  searchParams: { directory: options.projectPath }
2085
2093
  });
2086
- return normalizeAgent0RuntimeStatus(pathInfo, options.projectPath);
2094
+ return normalizeAgent0RuntimeStatus(pathInfo, options.projectPath, options.engine.renderedOpenCodeConfigHash);
2087
2095
  },
2088
2096
  async listSessions() {
2089
2097
  const sessions = await fetchAgent0OpenCodeJson({
@@ -2127,15 +2135,23 @@ function createAgent0RuntimeClient(options) {
2127
2135
  };
2128
2136
  },
2129
2137
  async sendMessage(sessionId, input) {
2130
- const message = await fetchAgent0OpenCodeJson({
2131
- engine: options.engine,
2132
- fetch: fetchImpl,
2133
- path: `/session/${encodeURIComponent(sessionId)}/message`,
2134
- method: "POST",
2135
- searchParams: { directory: options.projectPath },
2136
- body: toOpenCodePromptInput(input)
2137
- });
2138
- return normalizeAgent0Message(message);
2138
+ const send = async () => {
2139
+ const message2 = await fetchAgent0OpenCodeJson({
2140
+ engine: options.engine,
2141
+ fetch: fetchImpl,
2142
+ path: `/session/${encodeURIComponent(sessionId)}/message`,
2143
+ method: "POST",
2144
+ searchParams: { directory: options.projectPath },
2145
+ body: toOpenCodePromptInput(input)
2146
+ });
2147
+ return normalizeAgent0Message(message2);
2148
+ };
2149
+ let message = await send();
2150
+ for (let retry = 0;retry < EMPTY_COMPLETION_MAX_RETRIES && input.generateReply !== false && isEmptyCompletion(message); retry++) {
2151
+ await new Promise((resolve3) => setTimeout(resolve3, EMPTY_COMPLETION_RETRY_DELAY_MS));
2152
+ message = await send();
2153
+ }
2154
+ return message;
2139
2155
  },
2140
2156
  async abortSession(sessionId) {
2141
2157
  const result = await fetchAgent0OpenCodeJson({
@@ -2650,6 +2666,11 @@ function normalizeAgent0MessageInfo(info) {
2650
2666
  ...isRecord2(info.error) ? { error: { message: normalizeErrorMessage(info.error) } } : {}
2651
2667
  };
2652
2668
  }
2669
+ var EMPTY_COMPLETION_MAX_RETRIES = 1;
2670
+ var EMPTY_COMPLETION_RETRY_DELAY_MS = 500;
2671
+ function isEmptyCompletion(message) {
2672
+ return message.role === "assistant" && message.completed && message.error === undefined && message.parts.length === 0 && (message.usage?.outputTokens ?? 0) === 0;
2673
+ }
2653
2674
  function normalizeAgent0Message(value) {
2654
2675
  if (!isRecord2(value) || !isRecord2(value.info) || !Array.isArray(value.parts)) {
2655
2676
  throw new Agent0RuntimeClientError("ENGINE_INVALID_RESPONSE", "Agent(0) private runtime returned an invalid message response");
@@ -3059,14 +3080,15 @@ function toOpenCodeCreateSessionInput(input) {
3059
3080
  }
3060
3081
  };
3061
3082
  }
3062
- function normalizeAgent0RuntimeStatus(value, projectPath) {
3083
+ function normalizeAgent0RuntimeStatus(value, projectPath, renderedOpenCodeConfigHash) {
3063
3084
  if (!isRecord2(value) || typeof value.directory !== "string" || typeof value.worktree !== "string") {
3064
3085
  throw new Agent0RuntimeClientError("ENGINE_INVALID_RESPONSE", "Agent(0) private runtime returned an invalid path response");
3065
3086
  }
3066
3087
  return {
3067
3088
  state: "running",
3068
3089
  projectPath,
3069
- worktreePath: value.worktree
3090
+ worktreePath: value.worktree,
3091
+ ...renderedOpenCodeConfigHash === undefined ? {} : { renderedOpenCodeConfigHash }
3070
3092
  };
3071
3093
  }
3072
3094
  function isRecord2(value) {
@@ -3378,4 +3400,4 @@ export {
3378
3400
  AGENT0_BUILT_IN_MCP_PERMISSION
3379
3401
  };
3380
3402
 
3381
- //# debugId=10FBA9A02201263864756E2164756E21
3403
+ //# debugId=D54D2C6D79749EC864756E2164756E21