BasePlugin surface structurally. ADK’s PluginManager
invokes every callback, so all are present even where a callback is a no-op.
ADK treats any non-undefined return as a short-circuit, so every callback
swallows its own errors and returns undefined.
Implements
BasePlugin
Table of contents
Constructors
Properties
Methods
- afterAgentCallback
- afterContextCompaction
- afterModelCallback
- afterRunCallback
- afterToolCallback
- beforeAgentCallback
- beforeContextCompaction
- beforeModelCallback
- beforeRunCallback
- beforeToolCallback
- beforeToolSelection
- finishInterruptedInvocation
- onEventCallback
- onModelErrorCallback
- onToolErrorCallback
- onUserMessageCallback
Constructors
constructor
• new WeaveAdkPlugin():WeaveAdkPlugin
Returns
WeaveAdkPlugin
Properties
name
•Readonly name: "weave"
Implementation of
AdkBasePlugin.nameDefined in
src/integrations/googleAdk.ts:590Methods
afterAgentCallback
▸ afterAgentCallback(params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
params | Object |
params.agent | BaseAgent |
params.callbackContext | Context |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.afterAgentCallbackDefined in
src/integrations/googleAdk.ts:779afterContextCompaction
▸ afterContextCompaction(_params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
_params | unknown |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.afterContextCompactionDefined in
src/integrations/googleAdk.ts:997afterModelCallback
▸ afterModelCallback(params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
params | Object |
params.callbackContext | Context |
params.llmResponse | LlmResponse |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.afterModelCallbackDefined in
src/integrations/googleAdk.ts:841afterRunCallback
▸ afterRunCallback(params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
params | Object |
params.invocationContext | InvocationContext |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.afterRunCallbackDefined in
src/integrations/googleAdk.ts:713afterToolCallback
▸ afterToolCallback(params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
params | Object |
params.result | null | Record<string, unknown> |
params.tool | BaseTool |
params.toolArgs | Record<string, unknown> |
params.toolContext | Context |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.afterToolCallbackDefined in
src/integrations/googleAdk.ts:965beforeAgentCallback
▸ beforeAgentCallback(params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
params | Object |
params.agent | BaseAgent |
params.callbackContext | Context |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.beforeAgentCallbackDefined in
src/integrations/googleAdk.ts:765beforeContextCompaction
▸ beforeContextCompaction(_params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
_params | unknown |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.beforeContextCompactionDefined in
src/integrations/googleAdk.ts:993beforeModelCallback
▸ beforeModelCallback(params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
params | Object |
params.callbackContext | Context |
params.llmRequest | LlmRequest |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.beforeModelCallbackDefined in
src/integrations/googleAdk.ts:804beforeRunCallback
▸ beforeRunCallback(params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
params | Object |
params.invocationContext | InvocationContext |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.beforeRunCallbackDefined in
src/integrations/googleAdk.ts:621beforeToolCallback
▸ beforeToolCallback(params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
params | Object |
params.tool | BaseTool |
params.toolArgs | Record<string, unknown> |
params.toolContext | Context |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.beforeToolCallbackDefined in
src/integrations/googleAdk.ts:918beforeToolSelection
▸ beforeToolSelection(_params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
_params | unknown |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.beforeToolSelectionDefined in
src/integrations/googleAdk.ts:914finishInterruptedInvocation
▸ finishInterruptedInvocation(invocationId): void
Finalizes a run that never reached afterRunCallback. ADK only dispatches
afterRunCallback after the event loop drains normally, so a consumer that
breaks out of runAsync early — or an aborted run — leaves the invocation
(and its spans) open. The auto-instrument runner wrapper calls this from a
finally to close them as interrupted. Idempotent: a no-op once the run
has already finished (the common, fully-consumed case).
Parameters
| Name | Type |
|---|---|
invocationId | string |
Returns
void
Defined in
src/integrations/googleAdk.ts:732onEventCallback
▸ onEventCallback(params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
params | Object |
params.event | Event |
params.invocationContext | InvocationContext |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.onEventCallbackDefined in
src/integrations/googleAdk.ts:693onModelErrorCallback
▸ onModelErrorCallback(params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
params | Object |
params.callbackContext | Context |
params.error | Error |
params.llmRequest | LlmRequest |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.onModelErrorCallbackDefined in
src/integrations/googleAdk.ts:884onToolErrorCallback
▸ onToolErrorCallback(params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
params | Object |
params.error | Error |
params.tool | BaseTool |
params.toolArgs | Record<string, unknown> |
params.toolContext | Context |
Returns
Promise<undefined>
Implementation of
AdkBasePlugin.onToolErrorCallbackDefined in
src/integrations/googleAdk.ts:977onUserMessageCallback
▸ onUserMessageCallback(_params): Promise<undefined>
Parameters
| Name | Type |
|---|---|
_params | Object |
_params.invocationContext | InvocationContext |
_params.userMessage | Content |
Returns
Promise<undefined>