@botpress/adk 1.19.0-beta.7 → 2.0.0-alpha.0
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-init/agent-project-generator.d.ts +5 -1
- package/dist/agent-init/agent-project-generator.d.ts.map +1 -1
- package/dist/agent-project/agent-project.d.ts +3 -3
- package/dist/agent-project/agent-project.d.ts.map +1 -1
- package/dist/agent-project/agent-resolver.d.ts.map +1 -1
- package/dist/agent-project/config-writer.d.ts +1 -1
- package/dist/agent-project/config-writer.d.ts.map +1 -1
- package/dist/agent-project/dependencies-parser.d.ts.map +1 -1
- package/dist/agent-project/dependency-state-to-dependencies.d.ts +11 -0
- package/dist/agent-project/dependency-state-to-dependencies.d.ts.map +1 -0
- package/dist/agent-project/file-watcher.d.ts.map +1 -1
- package/dist/agent-project/types.d.ts +9 -4
- package/dist/agent-project/types.d.ts.map +1 -1
- package/dist/agent0/capabilities/commands/adk-build.md +6 -5
- package/dist/agent0/capabilities/commands/adk-debug.md +1 -1
- package/dist/agent0/capabilities/commands/adk-dev-console.md +1 -1
- package/dist/agent0/capabilities/commands/adk-document.md +10 -2
- package/dist/agent0/capabilities/commands/adk-eval.md +1 -1
- package/dist/agent0/capabilities/commands/adk-explain.md +2 -2
- package/dist/agent0/capabilities/commands/adk-init.md +2 -2
- package/dist/agent0/capabilities/commands/adk-ship.md +1 -1
- package/dist/agent0/capabilities/commands/adk-test.md +3 -3
- package/dist/agent0/capabilities/commands/adk-validate.md +3 -3
- package/dist/agent0/capabilities/skills/adk/SKILL.md +21 -21
- package/dist/agent0/capabilities/skills/adk/references/actions.md +245 -239
- package/dist/agent0/capabilities/skills/adk/references/advanced-patterns.md +185 -218
- package/dist/agent0/capabilities/skills/adk/references/agent-config.md +74 -71
- package/dist/agent0/capabilities/skills/adk/references/assets.md +45 -48
- package/dist/agent0/capabilities/skills/adk/references/autonomous-execution.md +40 -46
- package/dist/agent0/capabilities/skills/adk/references/cli.md +17 -7
- package/dist/agent0/capabilities/skills/adk/references/context-api.md +98 -94
- package/dist/agent0/capabilities/skills/adk/references/conversation-lifecycle.md +65 -62
- package/dist/agent0/capabilities/skills/adk/references/conversations.md +395 -385
- package/dist/agent0/capabilities/skills/adk/references/custom-components.md +1 -1
- package/dist/agent0/capabilities/skills/adk/references/desk.md +236 -234
- package/dist/agent0/capabilities/skills/adk/references/explain-config.md +54 -37
- package/dist/agent0/capabilities/skills/adk/references/files.md +301 -306
- package/dist/agent0/capabilities/skills/adk/references/integration-actions.md +211 -214
- package/dist/agent0/capabilities/skills/adk/references/integrations.md +33 -31
- package/dist/agent0/capabilities/skills/adk/references/interfaces.md +13 -12
- package/dist/agent0/capabilities/skills/adk/references/knowledge-bases.md +98 -111
- package/dist/agent0/capabilities/skills/adk/references/mcp-server.md +6 -0
- package/dist/agent0/capabilities/skills/adk/references/messages.md +280 -256
- package/dist/agent0/capabilities/skills/adk/references/model-configuration.md +52 -49
- package/dist/agent0/capabilities/skills/adk/references/patterns-mistakes.md +102 -101
- package/dist/agent0/capabilities/skills/adk/references/plugins.md +15 -15
- package/dist/agent0/capabilities/skills/adk/references/tables.md +204 -210
- package/dist/agent0/capabilities/skills/adk/references/tags.md +141 -143
- package/dist/agent0/capabilities/skills/adk/references/tools.md +191 -199
- package/dist/agent0/capabilities/skills/adk/references/triggers.md +331 -336
- package/dist/agent0/capabilities/skills/adk/references/workflow-steps.md +132 -96
- package/dist/agent0/capabilities/skills/adk/references/workflows.md +479 -464
- package/dist/agent0/capabilities/skills/adk/references/zai-agent-reference.md +127 -129
- package/dist/agent0/capabilities/skills/adk/references/zai-complete-guide.md +255 -276
- package/dist/agent0/capabilities/skills/adk-debugger/SKILL.md +21 -17
- package/dist/agent0/capabilities/skills/adk-debugger/references/common-failures.md +25 -25
- package/dist/agent0/capabilities/skills/adk-debugger/references/conversation-analysis.md +49 -41
- package/dist/agent0/capabilities/skills/adk-debugger/references/debug-workflow.md +20 -14
- package/dist/agent0/capabilities/skills/adk-debugger/references/llm-debugging.md +13 -13
- package/dist/agent0/capabilities/skills/adk-debugger/references/trace-summarization.md +18 -18
- package/dist/agent0/capabilities/skills/adk-debugger/references/traces-and-logs.md +67 -67
- package/dist/agent0/capabilities/skills/adk-dev-console/SKILL.md +36 -36
- package/dist/agent0/capabilities/skills/adk-dev-console/references/agent-steps.md +14 -6
- package/dist/agent0/capabilities/skills/adk-dev-console/references/multi-agent-dashboard.md +13 -13
- package/dist/agent0/capabilities/skills/adk-dev-console/references/pages.md +18 -0
- package/dist/agent0/capabilities/skills/adk-docs/SKILL.md +13 -13
- package/dist/agent0/capabilities/skills/adk-docs/references/doc-standards.md +15 -0
- package/dist/agent0/capabilities/skills/adk-evals/SKILL.md +29 -23
- package/dist/agent0/capabilities/skills/adk-evals/references/eval-format.md +31 -23
- package/dist/agent0/capabilities/skills/adk-evals/references/test-patterns.md +25 -36
- package/dist/agent0/capabilities/skills/adk-evals/references/testing-workflow.md +6 -4
- package/dist/agent0/config/schema.d.ts.map +1 -1
- package/dist/agent0/config/store.d.ts +8 -3
- package/dist/agent0/config/store.d.ts.map +1 -1
- package/dist/agent0/index.js +214 -59
- package/dist/agent0/index.js.map +17 -15
- package/dist/agent0/providers/catalog.d.ts.map +1 -1
- package/dist/agent0/providers/registry.d.ts.map +1 -1
- package/dist/agent0/providers/source.d.ts +8 -3
- package/dist/agent0/providers/source.d.ts.map +1 -1
- package/dist/agent0/runtime/client.d.ts +4 -3
- package/dist/agent0/runtime/client.d.ts.map +1 -1
- package/dist/agent0/runtime/engine.d.ts +7 -1
- package/dist/agent0/runtime/engine.d.ts.map +1 -1
- package/dist/agent0/runtime/manager.d.ts +2 -3
- package/dist/agent0/runtime/manager.d.ts.map +1 -1
- package/dist/agent0/runtime/process.d.ts +10 -0
- package/dist/agent0/runtime/process.d.ts.map +1 -1
- package/dist/assets/manager.d.ts +3 -0
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/auth/credentials.d.ts +1 -1
- package/dist/auth/credentials.d.ts.map +1 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/service.d.ts.map +1 -1
- package/dist/bot-generator/generator.d.ts +22 -0
- package/dist/bot-generator/generator.d.ts.map +1 -1
- package/dist/bot-generator/integration-sync.d.ts +2 -0
- package/dist/bot-generator/integration-sync.d.ts.map +1 -1
- package/dist/bot-generator/interface-sync.d.ts +2 -0
- package/dist/bot-generator/interface-sync.d.ts.map +1 -1
- package/dist/bot-generator/plugin-sync.d.ts +2 -0
- package/dist/bot-generator/plugin-sync.d.ts.map +1 -1
- package/dist/cognitive/models.d.ts.map +1 -1
- package/dist/commands/base-command.d.ts +1 -0
- package/dist/commands/base-command.d.ts.map +1 -1
- package/dist/commands/bp-cli.d.ts.map +1 -1
- package/dist/commands/bp-cli.js +147 -0
- package/dist/commands/bp-cli.js.map +12 -0
- package/dist/commands/bp-dev-command.d.ts +3 -1
- package/dist/commands/bp-dev-command.d.ts.map +1 -1
- package/dist/commands/bp-dev-stderr.d.ts +9 -0
- package/dist/commands/bp-dev-stderr.d.ts.map +1 -1
- package/dist/commands/bp-dev-worker-env.d.ts +7 -0
- package/dist/commands/bp-dev-worker-env.d.ts.map +1 -0
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/config/manager.d.ts.map +1 -1
- package/dist/dependencies/catalog/catalog-service.d.ts +53 -0
- package/dist/dependencies/catalog/catalog-service.d.ts.map +1 -0
- package/dist/dependencies/catalog/client-factory.d.ts +33 -0
- package/dist/dependencies/catalog/client-factory.d.ts.map +1 -0
- package/dist/dependencies/catalog/integration-source.d.ts +34 -0
- package/dist/dependencies/catalog/integration-source.d.ts.map +1 -0
- package/dist/dependencies/catalog/interface-source.d.ts +23 -0
- package/dist/dependencies/catalog/interface-source.d.ts.map +1 -0
- package/dist/dependencies/catalog/plugin-source.d.ts +49 -0
- package/dist/dependencies/catalog/plugin-source.d.ts.map +1 -0
- package/dist/dependencies/catalog/resolution-cache.d.ts +76 -0
- package/dist/dependencies/catalog/resolution-cache.d.ts.map +1 -0
- package/dist/dependencies/dependency-manager.d.ts +31 -16
- package/dist/dependencies/dependency-manager.d.ts.map +1 -1
- package/dist/dependencies/errors.d.ts +9 -6
- package/dist/dependencies/errors.d.ts.map +1 -1
- package/dist/dependencies/index.d.ts +5 -4
- package/dist/dependencies/index.d.ts.map +1 -1
- package/dist/dependencies/index.js +2309 -1697
- package/dist/dependencies/index.js.map +41 -32
- package/dist/dependencies/legacy-lock-file.d.ts +15 -0
- package/dist/dependencies/legacy-lock-file.d.ts.map +1 -0
- package/dist/dependencies/migration.d.ts +19 -0
- package/dist/dependencies/migration.d.ts.map +1 -1
- package/dist/dependencies/resolvers/integration-resolver.d.ts +4 -3
- package/dist/dependencies/resolvers/integration-resolver.d.ts.map +1 -1
- package/dist/dependencies/resolvers/plugin-resolver.d.ts +4 -4
- package/dist/dependencies/resolvers/plugin-resolver.d.ts.map +1 -1
- package/dist/dependencies/snapshot-store.d.ts +59 -0
- package/dist/dependencies/snapshot-store.d.ts.map +1 -0
- package/dist/dependencies/status-resolver.d.ts +36 -0
- package/dist/dependencies/status-resolver.d.ts.map +1 -0
- package/dist/dependencies/status.d.ts +214 -0
- package/dist/dependencies/status.d.ts.map +1 -0
- package/dist/dependencies/types.d.ts +388 -37
- package/dist/dependencies/types.d.ts.map +1 -1
- package/dist/file-watcher/watcher.d.ts +21 -5
- package/dist/file-watcher/watcher.d.ts.map +1 -1
- package/dist/generators/action-types.d.ts.map +1 -1
- package/dist/generators/client-wrapper.d.ts.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3643 -2345
- package/dist/index.js.map +68 -58
- package/dist/integrations/config-utils.d.ts +11 -7
- package/dist/integrations/config-utils.d.ts.map +1 -1
- package/dist/integrations/hub-cache.d.ts +0 -58
- package/dist/integrations/hub-cache.d.ts.map +1 -1
- package/dist/integrations/index.d.ts +1 -3
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/manager.d.ts +19 -53
- package/dist/integrations/manager.d.ts.map +1 -1
- package/dist/interfaces/enhanced-cache.d.ts +7 -7
- package/dist/interfaces/enhanced-cache.d.ts.map +1 -1
- package/dist/interfaces/manager.d.ts +11 -17
- package/dist/interfaces/manager.d.ts.map +1 -1
- package/dist/interfaces/parser.d.ts.map +1 -1
- package/dist/knowledge/manager.d.ts +3 -0
- package/dist/knowledge/manager.d.ts.map +1 -1
- package/dist/plugins/index.d.ts +0 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/manager.d.ts +16 -48
- package/dist/plugins/manager.d.ts.map +1 -1
- package/dist/preflight/checker.d.ts +6 -1
- package/dist/preflight/checker.d.ts.map +1 -1
- package/dist/preflight/dependency-gate.d.ts +37 -0
- package/dist/preflight/dependency-gate.d.ts.map +1 -0
- package/dist/preflight/index.d.ts +2 -1
- package/dist/preflight/index.d.ts.map +1 -1
- package/dist/preflight/types.d.ts +18 -0
- package/dist/preflight/types.d.ts.map +1 -1
- package/dist/runner/script-runner.d.ts.map +1 -1
- package/dist/secrets/manager.d.ts.map +1 -1
- package/dist/tables/table-manager.d.ts +3 -0
- package/dist/tables/table-manager.d.ts.map +1 -1
- package/dist/templates/README.md +23 -13
- package/dist/templates/blank/agent.config.ts +3 -3
- package/dist/templates/blank/src/triggers/index.ts +1 -1
- package/dist/templates/botpress-desk/evals/index.eval.ts +1 -1
- package/dist/templates/botpress-desk/src/triggers/index.ts +1 -1
- package/dist/templates/crm-enrichment/README.md +3 -3
- package/dist/templates/crm-enrichment/agent.config.ts +2 -2
- package/dist/templates/crm-enrichment/src/conversations/index.ts +1 -1
- package/dist/templates/hello-world/agent.config.ts +3 -3
- package/dist/templates/hello-world/src/triggers/index.ts +1 -1
- package/dist/templates/knowledge-assistant/src/triggers/index.ts +1 -1
- package/dist/templates/template.config.json +3 -3
- package/dist/test-utils/mock-module.d.ts +29 -0
- package/dist/test-utils/mock-module.d.ts.map +1 -0
- package/dist/utils/ids.d.ts +10 -0
- package/dist/utils/ids.d.ts.map +1 -1
- package/dist/utils/require-chat.d.ts.map +1 -1
- package/dist/utils/source-map-optimizer.d.ts +10 -11
- package/dist/utils/source-map-optimizer.d.ts.map +1 -1
- package/dist/workspace/workspace-cache.d.ts +2 -1
- package/dist/workspace/workspace-cache.d.ts.map +1 -1
- package/package.json +8 -4
- package/dist/agent-project/lock-to-dependencies.d.ts +0 -11
- package/dist/agent-project/lock-to-dependencies.d.ts.map +0 -1
- package/dist/dependencies/lock-file.d.ts +0 -15
- package/dist/dependencies/lock-file.d.ts.map +0 -1
- package/dist/integrations/enhanced-cache.d.ts +0 -53
- package/dist/integrations/enhanced-cache.d.ts.map +0 -1
- package/dist/plugins/enhanced-cache.d.ts +0 -53
- package/dist/plugins/enhanced-cache.d.ts.map +0 -1
- package/dist/templates/blank/package.json +0 -17
- package/dist/templates/blank/tsconfig.json +0 -25
- package/dist/templates/botpress-desk/package.json +0 -17
- package/dist/templates/crm-enrichment/package.json +0 -18
- package/dist/templates/crm-enrichment/tsconfig.json +0 -25
- package/dist/templates/hello-world/package.json +0 -18
- package/dist/templates/hello-world/tsconfig.json +0 -25
- package/dist/templates/knowledge-assistant/package.json +0 -18
- package/dist/templates/knowledge-assistant/tsconfig.json +0 -25
- package/dist/templates/slack-triage/package.json +0 -18
- package/dist/templates/slack-triage/tsconfig.json +0 -25
|
@@ -156,11 +156,11 @@ if (result.is(Approved)) {
|
|
|
156
156
|
|
|
157
157
|
Three exits are built into the runtime. Do not redefine them.
|
|
158
158
|
|
|
159
|
-
| Exit
|
|
160
|
-
|
|
161
|
-
| **ListenExit**
|
|
162
|
-
| **ThinkExit**
|
|
163
|
-
| **DefaultExit** | Worker mode, when no custom exits provided | `done`
|
|
159
|
+
| Exit | When Available | Action Name | Purpose |
|
|
160
|
+
| --------------- | ------------------------------------------ | ----------- | -------------------------------------------------------------------------------------------------- |
|
|
161
|
+
| **ListenExit** | Chat mode (conversation handlers) | `listen` | Pauses execution, returns control to the user. Auto-added when `execute()` runs in a conversation. |
|
|
162
|
+
| **ThinkExit** | Always | `think` | LLM pauses to reflect. Triggers another iteration (does not end execution). |
|
|
163
|
+
| **DefaultExit** | Worker mode, when no custom exits provided | `done` | Returns `{ success: true, result? }` or `{ success: false, error }`. |
|
|
164
164
|
|
|
165
165
|
```typescript
|
|
166
166
|
import { Autonomous } from '@botpress/runtime'
|
|
@@ -238,9 +238,9 @@ The LLM sees this as:
|
|
|
238
238
|
|
|
239
239
|
```typescript
|
|
240
240
|
export namespace user {
|
|
241
|
-
const name: Writable<string> =
|
|
241
|
+
const name: Writable<string> = 'John Doe'
|
|
242
242
|
const email: Writable<string | null> = null
|
|
243
|
-
const id: Readonly<string> =
|
|
243
|
+
const id: Readonly<string> = 'user_123'
|
|
244
244
|
}
|
|
245
245
|
```
|
|
246
246
|
|
|
@@ -260,11 +260,11 @@ new Autonomous.Object({
|
|
|
260
260
|
|
|
261
261
|
```typescript
|
|
262
262
|
type ObjectProperty = {
|
|
263
|
-
name: string
|
|
264
|
-
value: any
|
|
265
|
-
type?: ZuiType
|
|
266
|
-
description?: string
|
|
267
|
-
writable?: boolean
|
|
263
|
+
name: string // Valid TypeScript identifier.
|
|
264
|
+
value: any // Current value.
|
|
265
|
+
type?: ZuiType // Zod schema for validation on write.
|
|
266
|
+
description?: string // Helps the LLM understand the property.
|
|
267
|
+
writable?: boolean // Default: false. If true, LLM can assign new values.
|
|
268
268
|
}
|
|
269
269
|
```
|
|
270
270
|
|
|
@@ -362,19 +362,13 @@ type Hooks = {
|
|
|
362
362
|
) => Promise<void | Partial<Iteration>> | void | Partial<Iteration>
|
|
363
363
|
|
|
364
364
|
/** BLOCKING. Called after each iteration. Good for logging and cleanup. */
|
|
365
|
-
onIterationEnd?: (
|
|
366
|
-
iteration: Iteration,
|
|
367
|
-
controller: IterationController
|
|
368
|
-
) => void | Promise<void>
|
|
365
|
+
onIterationEnd?: (iteration: Iteration, controller: IterationController) => void | Promise<void>
|
|
369
366
|
|
|
370
367
|
/** BLOCKING. Called when an exit is reached. Throw to reject the exit. */
|
|
371
368
|
onExit?: <T = unknown>(result: ExitResult<T>) => Promise<void> | void
|
|
372
369
|
|
|
373
370
|
/** BLOCKING, MUTATION. Called after LLM generates code, before execution. */
|
|
374
|
-
onBeforeExecution?: (
|
|
375
|
-
iteration: Iteration,
|
|
376
|
-
controller: AbortController
|
|
377
|
-
) => Promise<{ code?: string } | void>
|
|
371
|
+
onBeforeExecution?: (iteration: Iteration, controller: AbortController) => Promise<{ code?: string } | void>
|
|
378
372
|
|
|
379
373
|
/** BLOCKING, MUTATION. Called before any tool executes. Can modify input. */
|
|
380
374
|
onBeforeTool?: (event: {
|
|
@@ -397,11 +391,11 @@ type Hooks = {
|
|
|
397
391
|
|
|
398
392
|
### Hook Categories
|
|
399
393
|
|
|
400
|
-
| Category
|
|
401
|
-
|
|
402
|
-
| **Non-blocking**
|
|
403
|
-
| **Blocking, mutation**
|
|
404
|
-
| **Blocking, non-mutation** | `onIterationEnd`, `onExit`
|
|
394
|
+
| Category | Hooks | Behavior |
|
|
395
|
+
| -------------------------- | ---------------------------------------------------------------------- | ----------------------------------------------------- |
|
|
396
|
+
| **Non-blocking** | `onTrace` | Fire-and-forget. Cannot delay execution. |
|
|
397
|
+
| **Blocking, mutation** | `onIterationStart`, `onBeforeTool`, `onAfterTool`, `onBeforeExecution` | Block until resolved. Can return modified values. |
|
|
398
|
+
| **Blocking, non-mutation** | `onIterationEnd`, `onExit` | Block until resolved. Cannot change tool I/O or code. |
|
|
405
399
|
|
|
406
400
|
### Common Hook Patterns
|
|
407
401
|
|
|
@@ -490,18 +484,18 @@ hooks: {
|
|
|
490
484
|
const result = await execute({ instructions: '...' })
|
|
491
485
|
|
|
492
486
|
// Status checks
|
|
493
|
-
result.isSuccess()
|
|
494
|
-
result.isError()
|
|
487
|
+
result.isSuccess() // Completed with an exit
|
|
488
|
+
result.isError() // Failed (aborted, iterations exhausted)
|
|
495
489
|
result.isInterrupted() // Paused with a snapshot (SnapshotSignal)
|
|
496
490
|
|
|
497
491
|
// Exit type-narrowing
|
|
498
|
-
result.is(MyExit)
|
|
492
|
+
result.is(MyExit) // true if exited via MyExit, narrows result.output type
|
|
499
493
|
|
|
500
494
|
// Access execution data
|
|
501
|
-
result.iteration
|
|
502
|
-
result.iterations
|
|
503
|
-
result.output
|
|
504
|
-
result.context
|
|
495
|
+
result.iteration // Last iteration (or null)
|
|
496
|
+
result.iterations // All iterations
|
|
497
|
+
result.output // Exit data (if success), null otherwise
|
|
498
|
+
result.context // Full execution context
|
|
505
499
|
```
|
|
506
500
|
|
|
507
501
|
### Success Result
|
|
@@ -551,18 +545,18 @@ if (result.isInterrupted()) {
|
|
|
551
545
|
```typescript
|
|
552
546
|
await execute({
|
|
553
547
|
instructions: '...',
|
|
554
|
-
model: 'openai:gpt-4o',
|
|
548
|
+
model: 'openai:gpt-4o', // Single model
|
|
555
549
|
})
|
|
556
550
|
|
|
557
551
|
await execute({
|
|
558
552
|
instructions: '...',
|
|
559
|
-
model: ['openai:gpt-4o', 'anthropic:claude-3-5-sonnet'],
|
|
553
|
+
model: ['openai:gpt-4o', 'anthropic:claude-3-5-sonnet'], // Fallback chain
|
|
560
554
|
})
|
|
561
555
|
|
|
562
556
|
// Dynamic model per iteration
|
|
563
557
|
await execute({
|
|
564
558
|
instructions: '...',
|
|
565
|
-
model: (ctx) => ctx.iteration > 2 ? 'openai:gpt-4o' : 'openai:gpt-4o-mini',
|
|
559
|
+
model: (ctx) => (ctx.iteration > 2 ? 'openai:gpt-4o' : 'openai:gpt-4o-mini'),
|
|
566
560
|
})
|
|
567
561
|
```
|
|
568
562
|
|
|
@@ -573,7 +567,7 @@ If `model` is omitted, the `defaultModels.autonomous` value from `agent.config.t
|
|
|
573
567
|
```typescript
|
|
574
568
|
await execute({
|
|
575
569
|
instructions: '...',
|
|
576
|
-
temperature: 0.1,
|
|
570
|
+
temperature: 0.1, // Low = deterministic. Default: 0.7. Range: 0-2.
|
|
577
571
|
})
|
|
578
572
|
```
|
|
579
573
|
|
|
@@ -582,12 +576,12 @@ await execute({
|
|
|
582
576
|
```typescript
|
|
583
577
|
await execute({
|
|
584
578
|
instructions: '...',
|
|
585
|
-
reasoningEffort: 'high',
|
|
579
|
+
reasoningEffort: 'high', // 'none' | 'low' | 'medium' | 'high' | 'dynamic'
|
|
586
580
|
})
|
|
587
581
|
```
|
|
588
582
|
|
|
589
583
|
- `'none'` disables reasoning for models with optional reasoning.
|
|
590
|
-
- `'dynamic'` lets the provider decide.
|
|
584
|
+
- `'dynamic'` lets the provider decide.
|
|
591
585
|
- Omitting this field disables reasoning for optional-reasoning models.
|
|
592
586
|
|
|
593
587
|
### Iteration Limit
|
|
@@ -595,7 +589,7 @@ await execute({
|
|
|
595
589
|
```typescript
|
|
596
590
|
await execute({
|
|
597
591
|
instructions: '...',
|
|
598
|
-
iterations: 20,
|
|
592
|
+
iterations: 20, // Default: 10. Clamped to 1-100.
|
|
599
593
|
})
|
|
600
594
|
```
|
|
601
595
|
|
|
@@ -644,13 +638,13 @@ This pattern applies to `instructions`, `tools`, `objects`, `exits`, `temperatur
|
|
|
644
638
|
|
|
645
639
|
`execute()` behaves differently depending on where it runs:
|
|
646
640
|
|
|
647
|
-
| Aspect
|
|
648
|
-
|
|
649
|
-
| Transcript
|
|
650
|
-
| ListenExit
|
|
651
|
-
| DefaultExit
|
|
652
|
-
| Components
|
|
653
|
-
| Typical pattern | Open-ended conversation
|
|
641
|
+
| Aspect | Chat Mode (Conversations) | Worker Mode (Workflows, Actions) |
|
|
642
|
+
| --------------- | ---------------------------------- | ------------------------------------ |
|
|
643
|
+
| Transcript | LLM sees conversation history | No transcript |
|
|
644
|
+
| ListenExit | Auto-added | Not available |
|
|
645
|
+
| DefaultExit | Not auto-added when exits provided | Auto-added when no exits provided |
|
|
646
|
+
| Components | Can yield UI components | No component rendering |
|
|
647
|
+
| Typical pattern | Open-ended conversation | Task completion with structured exit |
|
|
654
648
|
|
|
655
649
|
In conversation handlers, `execute()` is provided as a parameter and runs in chat mode by default:
|
|
656
650
|
|
|
@@ -464,7 +464,7 @@ adk logs warning since=1h # last hour of warnings
|
|
|
464
464
|
|
|
465
465
|
### adk traces
|
|
466
466
|
|
|
467
|
-
Read execution traces — tool calls, action invocations, LLM steps, error context — for understanding
|
|
467
|
+
Read execution traces — tool calls, action invocations, LLM steps, error context — for understanding _what happened_ during a turn, beyond what `adk logs` reports. Reads from the local SQLite trace store under `.adk/`.
|
|
468
468
|
|
|
469
469
|
```bash
|
|
470
470
|
adk traces [tokens...] [options]
|
|
@@ -652,16 +652,19 @@ adk integrations info <name> # Full integration details
|
|
|
652
652
|
```
|
|
653
653
|
|
|
654
654
|
**`adk integrations search` options:**
|
|
655
|
+
|
|
655
656
|
- `--format json` - Machine-readable output
|
|
656
657
|
- `--limit <n>` - Max results (default: 20)
|
|
657
658
|
|
|
658
659
|
**`adk integrations list` options:**
|
|
660
|
+
|
|
659
661
|
- `--available` - Browse Hub instead of installed
|
|
660
662
|
- `--format json` - Machine-readable output
|
|
661
663
|
- `--verbose` - Show config details
|
|
662
664
|
- `--limit <n>` - Max results (default: 50)
|
|
663
665
|
|
|
664
666
|
**`adk integrations info` options:**
|
|
667
|
+
|
|
665
668
|
- `--actions` - Show only actions
|
|
666
669
|
- `--channels` - Show only channels
|
|
667
670
|
- `--events` - Show only events
|
|
@@ -680,12 +683,14 @@ adk integrations configure <alias> # Set/unset config values
|
|
|
680
683
|
```
|
|
681
684
|
|
|
682
685
|
**`adk integrations add` options:**
|
|
686
|
+
|
|
683
687
|
- `--alias <name>` - Custom alias for code access
|
|
684
688
|
- `--target <env>` - Environment (dev/prod)
|
|
685
689
|
- `--config key=value` - Set config at install time (repeatable)
|
|
686
690
|
- `--format json`
|
|
687
691
|
|
|
688
692
|
**`adk integrations configure` options:**
|
|
693
|
+
|
|
689
694
|
- `--set key=value` - Set config values (repeatable)
|
|
690
695
|
- `--unset key` - Remove config keys (repeatable)
|
|
691
696
|
- `--target <env>` - Environment (dev/prod)
|
|
@@ -724,9 +729,11 @@ adk integrations diff # Show lock vs cloud differences
|
|
|
724
729
|
`adk pull-lock` and `adk push-lock` (no subcommand) run pull/push for both integrations and plugins at once.
|
|
725
730
|
|
|
726
731
|
**`adk integrations pull-lock` options:**
|
|
732
|
+
|
|
727
733
|
- `--dry-run` - Preview without writing the lock file
|
|
728
734
|
|
|
729
735
|
**`adk integrations push-lock` options:**
|
|
736
|
+
|
|
730
737
|
- `--dry-run` - Preview without applying
|
|
731
738
|
- `--yes` - Skip confirmation
|
|
732
739
|
|
|
@@ -751,10 +758,12 @@ adk plugins diff # Show lock vs cloud differences
|
|
|
751
758
|
```
|
|
752
759
|
|
|
753
760
|
**Plugin-specific flags:**
|
|
761
|
+
|
|
754
762
|
- `adk plugins add --dep iface=alias` - Wire interface dependency (repeatable)
|
|
755
763
|
- `adk plugins configure --map iface=alias` - Remap interface dependency
|
|
756
764
|
|
|
757
765
|
**Shared with `adk integrations upgrade`:**
|
|
766
|
+
|
|
758
767
|
- `--to <version>` - Target specific version
|
|
759
768
|
|
|
760
769
|
Plugins require interfaces implemented by installed integrations. The CLI auto-resolves dependencies when unambiguous. See **[Plugins](./plugins.md)** for details.
|
|
@@ -1087,6 +1096,7 @@ adk run <script> [args...] [options]
|
|
|
1087
1096
|
**Description:**
|
|
1088
1097
|
|
|
1089
1098
|
Executes a TypeScript script with access to the full ADK runtime, including:
|
|
1099
|
+
|
|
1090
1100
|
- Bot client with authentication
|
|
1091
1101
|
- All tables, workflows, and actions from your project
|
|
1092
1102
|
- Type-safe access to your bot's configuration
|
|
@@ -1102,18 +1112,18 @@ Executes a TypeScript script with access to the full ADK runtime, including:
|
|
|
1102
1112
|
|
|
1103
1113
|
```typescript
|
|
1104
1114
|
// scripts/migrate-users.ts
|
|
1105
|
-
import { UsersTable } from
|
|
1115
|
+
import { UsersTable } from '../src/tables/Users'
|
|
1106
1116
|
|
|
1107
|
-
const { rows } = await UsersTable.findRows({ limit: 100 })
|
|
1117
|
+
const { rows } = await UsersTable.findRows({ limit: 100 })
|
|
1108
1118
|
|
|
1109
1119
|
for (const user of rows) {
|
|
1110
1120
|
await UsersTable.updateRows({
|
|
1111
|
-
rows: [{ id: user.id, migrated: true }]
|
|
1112
|
-
})
|
|
1113
|
-
console.log(`Migrated user: ${user.id}`)
|
|
1121
|
+
rows: [{ id: user.id, migrated: true }],
|
|
1122
|
+
})
|
|
1123
|
+
console.log(`Migrated user: ${user.id}`)
|
|
1114
1124
|
}
|
|
1115
1125
|
|
|
1116
|
-
console.log(`✅ Migrated ${rows.length} users`)
|
|
1126
|
+
console.log(`✅ Migrated ${rows.length} users`)
|
|
1117
1127
|
```
|
|
1118
1128
|
|
|
1119
1129
|
**Examples:**
|