@valon-technologies/gestalt
    Preparing search index...

    Agent is the authoritative agent data boundary. Read RPCs for sessions, turns, turn events, and interactions should use provider-owned control-plane state and should not require a live execution sandbox, pod-level transport, or cached tunnel.

    Index

    Constructors

    • Parameters

      • transport: Transport
      • Optionaloptions: { context?: RequestContext; timeoutMs?: number }

      Returns Agent

    Methods

    • Parameters

      • Optionaloptions: { name?: string; context?: RequestContext; timeoutMs?: number }

      Returns Agent

    • Parameters

      • idempotencyKey: string
      • model: string
      • Optionaloptions: {
            providerName?: string;
            clientRef?: string;
            metadata?: JsonObject;
            workspace?: {
                checkouts?: { url?: string; ref?: string; path?: string }[];
                cwd?: string;
            };
            tools?: {
                source?: | { case: undefined; value?: undefined }
                | { case: "none"; value: {} }
                | {
                    case: "catalog";
                    value: {
                        refs?: {
                            app?: (...) | (...);
                            operation?: (...) | (...);
                            connection?: (...) | (...);
                            instance?: (...) | (...);
                            title?: (...) | (...);
                            description?: (...) | (...);
                            credentialMode?: (...) | (...);
                            system?: (...) | (...);
                            runAs?: (...) | (...);
                        }[];
                        tools?: {
                            id?: (...)
                            | (...);
                            mcpName?: (...) | (...);
                            title?: (...) | (...);
                            description?: (...) | (...);
                            inputSchema?: (...) | (...);
                            outputSchema?: (...) | (...);
                            annotations?: (...) | (...);
                            ref?: (...) | (...);
                            tags?: (...) | (...);
                            searchText?: (...) | (...);
                        }[];
                    };
                };
            };
        }

      Returns Promise<AgentSession>

    • Parameters

      • request: {
            idempotencyKey?: string;
            model?: string;
            clientRef?: string;
            metadata?: {
                [key: string]:
                    | string
                    | number
                    | boolean
                    | (
                        { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                    )
                    | (
                        string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                    )[]
                    | null;
            };
            createdBySubjectId?: string;
            subject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            };
            sessionStart?: {
                hooks?: {
                    id?: string;
                    type?: string;
                    command?: string[];
                    cwd?: string;
                    timeout?: string;
                    env?: { [key: string]: string };
                    output?: { additionalContext?: boolean; metadata?: boolean };
                }[];
            };
            preparedWorkspace?: { root?: string; cwd?: string };
            providerName?: string;
            workspace?: {
                checkouts?: { url?: string; ref?: string; path?: string }[];
                cwd?: string;
            };
            context?: {
                subject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                credential?: {
                    mode?: string;
                    subjectId?: string;
                    connection?: string;
                    instance?: string;
                };
                access?: { policy?: string; role?: string };
                workflow?: {
                    [key: string]:
                        | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (
                            string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                        )[]
                        | null;
                };
                host?: { publicBaseUrl?: string };
                agentSubject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                caller?: { kind?: string; name?: string };
                invocation?: {
                    requestId?: string;
                    depth?: number;
                    callChain?: string[];
                    surface?: string;
                    internalConnectionAccess?: boolean;
                    connection?: string;
                };
                toolRefs?: {
                    app?: string;
                    operation?: string;
                    connection?: string;
                    instance?: string;
                    title?: string;
                    description?: string;
                    credentialMode?: string;
                    system?: string;
                    runAs?: {
                        id?: string;
                        credentialSubjectId?: string;
                        email?: string;
                        displayName?: string;
                        scopes?: string[];
                        permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                    };
                }[];
                toolRefsSet?: boolean;
                requestMeta?: {
                    clientIp?: string;
                    remoteAddr?: string;
                    userAgent?: string;
                };
                agent?: { providerName?: string; sessionId?: string; turnId?: string };
            };
            tools?: {
                source?: | { case: undefined; value?: undefined }
                | { case: "none"; value: {} }
                | {
                    case: "catalog";
                    value: {
                        refs?: {
                            app?: string;
                            operation?: string;
                            connection?: string;
                            instance?: string;
                            title?: string;
                            description?: string;
                            credentialMode?: string;
                            system?: string;
                            runAs?: {
                                id?: ...;
                                credentialSubjectId?: ...;
                                email?: ...;
                                displayName?: ...;
                                scopes?: ...;
                                permissions?: ...;
                            };
                        }[];
                        tools?: {
                            id?: string;
                            mcpName?: string;
                            title?: string;
                            description?: string;
                            inputSchema?: string;
                            outputSchema?: string;
                            annotations?: {
                                readOnlyHint?: ...;
                                idempotentHint?: ...;
                                destructiveHint?: ...;
                                openWorldHint?: ...;
                            };
                            ref?: {
                                app?: ...;
                                operation?: ...;
                                connection?: ...;
                                instance?: ...;
                                title?: ...;
                                description?: ...;
                                credentialMode?: ...;
                                system?: ...;
                                runAs?: ...;
                            };
                            tags?: (...)[];
                            searchText?: string;
                        }[];
                    };
                };
            };
        }
        • OptionalidempotencyKey?: string

          The provider mints the session id returned on AgentSession. Creation is idempotent on idempotency_key scoped per subject (created_by_subject_id): a replayed key returns the existing session, an empty key always creates. Idempotency is scoped to the provider's session store.

        • Optionalmodel?: string
        • OptionalclientRef?: string
        • Optionalmetadata?: {
              [key: string]:
                  | string
                  | number
                  | boolean
                  | (
                      { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                  )
                  | (
                      string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                  )[]
                  | null;
          }
        • OptionalcreatedBySubjectId?: string
        • Optionalsubject?: {
              id?: string;
              credentialSubjectId?: string;
              email?: string;
              displayName?: string;
              scopes?: string[];
              permissions?: {
                  app?: string;
                  operations?: string[];
                  allOperations?: boolean;
              }[];
          }
        • OptionalsessionStart?: {
              hooks?: {
                  id?: string;
                  type?: string;
                  command?: string[];
                  cwd?: string;
                  timeout?: string;
                  env?: { [key: string]: string };
                  output?: { additionalContext?: boolean; metadata?: boolean };
              }[];
          }
        • OptionalpreparedWorkspace?: { root?: string; cwd?: string }
        • OptionalproviderName?: string
        • Optionalworkspace?: { checkouts?: { url?: string; ref?: string; path?: string }[]; cwd?: string }
        • Optionalcontext?: {
              subject?: {
                  id?: string;
                  credentialSubjectId?: string;
                  email?: string;
                  displayName?: string;
                  scopes?: string[];
                  permissions?: {
                      app?: string;
                      operations?: string[];
                      allOperations?: boolean;
                  }[];
              };
              credential?: {
                  mode?: string;
                  subjectId?: string;
                  connection?: string;
                  instance?: string;
              };
              access?: { policy?: string; role?: string };
              workflow?: {
                  [key: string]:
                      | string
                      | number
                      | boolean
                      | (
                          { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                      )
                      | (
                          string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                      )[]
                      | null;
              };
              host?: { publicBaseUrl?: string };
              agentSubject?: {
                  id?: string;
                  credentialSubjectId?: string;
                  email?: string;
                  displayName?: string;
                  scopes?: string[];
                  permissions?: {
                      app?: string;
                      operations?: string[];
                      allOperations?: boolean;
                  }[];
              };
              caller?: { kind?: string; name?: string };
              invocation?: {
                  requestId?: string;
                  depth?: number;
                  callChain?: string[];
                  surface?: string;
                  internalConnectionAccess?: boolean;
                  connection?: string;
              };
              toolRefs?: {
                  app?: string;
                  operation?: string;
                  connection?: string;
                  instance?: string;
                  title?: string;
                  description?: string;
                  credentialMode?: string;
                  system?: string;
                  runAs?: {
                      id?: string;
                      credentialSubjectId?: string;
                      email?: string;
                      displayName?: string;
                      scopes?: string[];
                      permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                  };
              }[];
              toolRefsSet?: boolean;
              requestMeta?: {
                  clientIp?: string;
                  remoteAddr?: string;
                  userAgent?: string;
              };
              agent?: { providerName?: string; sessionId?: string; turnId?: string };
          }
          • Optionalsubject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            }
          • Optionalcredential?: { mode?: string; subjectId?: string; connection?: string; instance?: string }
          • Optionalaccess?: { policy?: string; role?: string }
          • Optionalworkflow?: {
                [key: string]:
                    | string
                    | number
                    | boolean
                    | (
                        { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                    )
                    | (
                        string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                    )[]
                    | null;
            }
          • Optionalhost?: { publicBaseUrl?: string }
          • OptionalagentSubject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            }

            Original agent caller when an agent tool executes with delegated run-as identity.

          • Optionalcaller?: { kind?: string; name?: string }
          • Optionalinvocation?: {
                requestId?: string;
                depth?: number;
                callChain?: string[];
                surface?: string;
                internalConnectionAccess?: boolean;
                connection?: string;
            }
          • OptionaltoolRefs?: {
                app?: string;
                operation?: string;
                connection?: string;
                instance?: string;
                title?: string;
                description?: string;
                credentialMode?: string;
                system?: string;
                runAs?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                };
            }[]

            Agent tool refs granted to the operation request, when the request is executing as an agent tool.

          • OptionaltoolRefsSet?: boolean

            Preserves the distinction between an omitted tool-ref context and an explicitly empty inherited tool-ref context.

          • OptionalrequestMeta?: { clientIp?: string; remoteAddr?: string; userAgent?: string }
          • Optionalagent?: { providerName?: string; sessionId?: string; turnId?: string }
        • Optionaltools?: {
              source?:
                  | { case: undefined; value?: undefined }
                  | { case: "none"; value: {} }
                  | {
                      case: "catalog";
                      value: {
                          refs?: {
                              app?: string;
                              operation?: string;
                              connection?: string;
                              instance?: string;
                              title?: string;
                              description?: string;
                              credentialMode?: string;
                              system?: string;
                              runAs?: {
                                  id?: ...;
                                  credentialSubjectId?: ...;
                                  email?: ...;
                                  displayName?: ...;
                                  scopes?: ...;
                                  permissions?: ...;
                              };
                          }[];
                          tools?: {
                              id?: string;
                              mcpName?: string;
                              title?: string;
                              description?: string;
                              inputSchema?: string;
                              outputSchema?: string;
                              annotations?: {
                                  readOnlyHint?: ...;
                                  idempotentHint?: ...;
                                  destructiveHint?: ...;
                                  openWorldHint?: ...;
                              };
                              ref?: {
                                  app?: ...;
                                  operation?: ...;
                                  connection?: ...;
                                  instance?: ...;
                                  title?: ...;
                                  description?: ...;
                                  credentialMode?: ...;
                                  system?: ...;
                                  runAs?: ...;
                              };
                              tags?: (...)[];
                              searchText?: string;
                          }[];
                      };
                  };
          }

      Returns Promise<AgentSession>

    • Parameters

      • sessionId: string
      • Optionaloptions: { providerName?: string }

      Returns Promise<AgentSession>

    • Parameters

      • request: {
            sessionId?: string;
            subject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            };
            context?: {
                subject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                credential?: {
                    mode?: string;
                    subjectId?: string;
                    connection?: string;
                    instance?: string;
                };
                access?: { policy?: string; role?: string };
                workflow?: {
                    [key: string]:
                        | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (
                            string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                        )[]
                        | null;
                };
                host?: { publicBaseUrl?: string };
                agentSubject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                caller?: { kind?: string; name?: string };
                invocation?: {
                    requestId?: string;
                    depth?: number;
                    callChain?: string[];
                    surface?: string;
                    internalConnectionAccess?: boolean;
                    connection?: string;
                };
                toolRefs?: {
                    app?: string;
                    operation?: string;
                    connection?: string;
                    instance?: string;
                    title?: string;
                    description?: string;
                    credentialMode?: string;
                    system?: string;
                    runAs?: {
                        id?: string;
                        credentialSubjectId?: string;
                        email?: string;
                        displayName?: string;
                        scopes?: string[];
                        permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                    };
                }[];
                toolRefsSet?: boolean;
                requestMeta?: {
                    clientIp?: string;
                    remoteAddr?: string;
                    userAgent?: string;
                };
                agent?: { providerName?: string; sessionId?: string; turnId?: string };
            };
            providerName?: string;
        }

      Returns Promise<AgentSession>

    • Parameters

      • Optionaloptions: {
            sessionIds?: string[];
            state?: number;
            limit?: number;
            summaryOnly?: boolean;
            providerName?: string;
        }

      Returns Promise<AgentSession[]>

    • Parameters

      • request: {
            subject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            };
            sessionIds?: string[];
            state?: number;
            limit?: number;
            summaryOnly?: boolean;
            providerName?: string;
            context?: {
                subject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                credential?: {
                    mode?: string;
                    subjectId?: string;
                    connection?: string;
                    instance?: string;
                };
                access?: { policy?: string; role?: string };
                workflow?: {
                    [key: string]:
                        | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (
                            string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                        )[]
                        | null;
                };
                host?: { publicBaseUrl?: string };
                agentSubject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                caller?: { kind?: string; name?: string };
                invocation?: {
                    requestId?: string;
                    depth?: number;
                    callChain?: string[];
                    surface?: string;
                    internalConnectionAccess?: boolean;
                    connection?: string;
                };
                toolRefs?: {
                    app?: string;
                    operation?: string;
                    connection?: string;
                    instance?: string;
                    title?: string;
                    description?: string;
                    credentialMode?: string;
                    system?: string;
                    runAs?: {
                        id?: string;
                        credentialSubjectId?: string;
                        email?: string;
                        displayName?: string;
                        scopes?: string[];
                        permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                    };
                }[];
                toolRefsSet?: boolean;
                requestMeta?: {
                    clientIp?: string;
                    remoteAddr?: string;
                    userAgent?: string;
                };
                agent?: { providerName?: string; sessionId?: string; turnId?: string };
            };
        }
        • Optionalsubject?: {
              id?: string;
              credentialSubjectId?: string;
              email?: string;
              displayName?: string;
              scopes?: string[];
              permissions?: {
                  app?: string;
                  operations?: string[];
                  allOperations?: boolean;
              }[];
          }
        • OptionalsessionIds?: string[]
        • Optionalstate?: number
        • Optionallimit?: number

          When non-zero and bounded_list_hydration is supported, cap results after ordering sessions newest-first by last_turn_at, updated_at, then created_at.

        • OptionalsummaryOnly?: boolean

          When true and bounded_list_hydration is supported, omit heavy fields such as metadata unless exact session_ids require direct lookup.

        • OptionalproviderName?: string
        • Optionalcontext?: {
              subject?: {
                  id?: string;
                  credentialSubjectId?: string;
                  email?: string;
                  displayName?: string;
                  scopes?: string[];
                  permissions?: {
                      app?: string;
                      operations?: string[];
                      allOperations?: boolean;
                  }[];
              };
              credential?: {
                  mode?: string;
                  subjectId?: string;
                  connection?: string;
                  instance?: string;
              };
              access?: { policy?: string; role?: string };
              workflow?: {
                  [key: string]:
                      | string
                      | number
                      | boolean
                      | (
                          { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                      )
                      | (
                          string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                      )[]
                      | null;
              };
              host?: { publicBaseUrl?: string };
              agentSubject?: {
                  id?: string;
                  credentialSubjectId?: string;
                  email?: string;
                  displayName?: string;
                  scopes?: string[];
                  permissions?: {
                      app?: string;
                      operations?: string[];
                      allOperations?: boolean;
                  }[];
              };
              caller?: { kind?: string; name?: string };
              invocation?: {
                  requestId?: string;
                  depth?: number;
                  callChain?: string[];
                  surface?: string;
                  internalConnectionAccess?: boolean;
                  connection?: string;
              };
              toolRefs?: {
                  app?: string;
                  operation?: string;
                  connection?: string;
                  instance?: string;
                  title?: string;
                  description?: string;
                  credentialMode?: string;
                  system?: string;
                  runAs?: {
                      id?: string;
                      credentialSubjectId?: string;
                      email?: string;
                      displayName?: string;
                      scopes?: string[];
                      permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                  };
              }[];
              toolRefsSet?: boolean;
              requestMeta?: {
                  clientIp?: string;
                  remoteAddr?: string;
                  userAgent?: string;
              };
              agent?: { providerName?: string; sessionId?: string; turnId?: string };
          }
          • Optionalsubject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            }
          • Optionalcredential?: { mode?: string; subjectId?: string; connection?: string; instance?: string }
          • Optionalaccess?: { policy?: string; role?: string }
          • Optionalworkflow?: {
                [key: string]:
                    | string
                    | number
                    | boolean
                    | (
                        { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                    )
                    | (
                        string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                    )[]
                    | null;
            }
          • Optionalhost?: { publicBaseUrl?: string }
          • OptionalagentSubject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            }

            Original agent caller when an agent tool executes with delegated run-as identity.

          • Optionalcaller?: { kind?: string; name?: string }
          • Optionalinvocation?: {
                requestId?: string;
                depth?: number;
                callChain?: string[];
                surface?: string;
                internalConnectionAccess?: boolean;
                connection?: string;
            }
          • OptionaltoolRefs?: {
                app?: string;
                operation?: string;
                connection?: string;
                instance?: string;
                title?: string;
                description?: string;
                credentialMode?: string;
                system?: string;
                runAs?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                };
            }[]

            Agent tool refs granted to the operation request, when the request is executing as an agent tool.

          • OptionaltoolRefsSet?: boolean

            Preserves the distinction between an omitted tool-ref context and an explicitly empty inherited tool-ref context.

          • OptionalrequestMeta?: { clientIp?: string; remoteAddr?: string; userAgent?: string }
          • Optionalagent?: { providerName?: string; sessionId?: string; turnId?: string }

      Returns Promise<ListAgentProviderSessionsResponse>

    • Parameters

      • sessionId: string
      • Optionaloptions: {
            clientRef?: string;
            state?: number;
            providerName?: string;
            metadata?: JsonObject;
        }

      Returns Promise<AgentSession>

    • Parameters

      • request: {
            sessionId?: string;
            clientRef?: string;
            state?: number;
            metadata?: {
                [key: string]:
                    | string
                    | number
                    | boolean
                    | (
                        { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                    )
                    | (
                        string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                    )[]
                    | null;
            };
            subject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            };
            context?: {
                subject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                credential?: {
                    mode?: string;
                    subjectId?: string;
                    connection?: string;
                    instance?: string;
                };
                access?: { policy?: string; role?: string };
                workflow?: {
                    [key: string]:
                        | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (
                            string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                        )[]
                        | null;
                };
                host?: { publicBaseUrl?: string };
                agentSubject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                caller?: { kind?: string; name?: string };
                invocation?: {
                    requestId?: string;
                    depth?: number;
                    callChain?: string[];
                    surface?: string;
                    internalConnectionAccess?: boolean;
                    connection?: string;
                };
                toolRefs?: {
                    app?: string;
                    operation?: string;
                    connection?: string;
                    instance?: string;
                    title?: string;
                    description?: string;
                    credentialMode?: string;
                    system?: string;
                    runAs?: {
                        id?: string;
                        credentialSubjectId?: string;
                        email?: string;
                        displayName?: string;
                        scopes?: string[];
                        permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                    };
                }[];
                toolRefsSet?: boolean;
                requestMeta?: {
                    clientIp?: string;
                    remoteAddr?: string;
                    userAgent?: string;
                };
                agent?: { providerName?: string; sessionId?: string; turnId?: string };
            };
            providerName?: string;
        }

      Returns Promise<AgentSession>

    • Parameters

      • sessionId: string
      • idempotencyKey: string
      • model: string
      • messages: {
            role?: string;
            text?: string;
            parts?: {
                type?: number;
                text?: string;
                json?: {
                    [key: string]:
                        | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (
                            string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                        )[]
                        | null;
                };
                toolCall?: {
                    id?: string;
                    toolId?: string;
                    arguments?: {
                        [key: string]: | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (...)[]
                        | null;
                    };
                };
                toolResult?: {
                    toolCallId?: string;
                    status?: number;
                    content?: string;
                    output?: {
                        [key: string]: | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (...)[]
                        | null;
                    };
                };
                imageRef?: { uri?: string; mimeType?: string };
            }[];
            metadata?: {
                [key: string]: | string
                | number
                | boolean
                | (
                    { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                )
                | (
                    string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                )[]
                | null;
            };
        }[]
      • Optionaloptions: {
            executionRef?: string;
            timeoutSeconds?: number;
            providerName?: string;
            metadata?: JsonObject;
            modelOptions?: JsonObject;
            output?: {
                kind?:
                    | { case: undefined; value?: undefined }
                    | { case: "text"; value: {} }
                    | {
                        case: "structured";
                        value: {
                            schema?: {
                                [key: string]:
                                    | string
                                    | number
                                    | boolean
                                    | (
                                        { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                                    )
                                    | (...)[]
                                    | null;
                            };
                        };
                    };
            };
        }

      Returns Promise<AgentTurn>

    • Parameters

      • request: {
            turnId?: string;
            sessionId?: string;
            idempotencyKey?: string;
            model?: string;
            messages?: {
                role?: string;
                text?: string;
                parts?: {
                    type?: number;
                    text?: string;
                    json?: {
                        [key: string]:
                            | string
                            | number
                            | boolean
                            | (
                                { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                            )
                            | (...)[]
                            | null;
                    };
                    toolCall?: {
                        id?: string;
                        toolId?: string;
                        arguments?: { [key: ...]: ... };
                    };
                    toolResult?: {
                        toolCallId?: string;
                        status?: number;
                        content?: string;
                        output?: { [key: ...]: ... };
                    };
                    imageRef?: { uri?: string; mimeType?: string };
                }[];
                metadata?: {
                    [key: string]: | string
                    | number
                    | boolean
                    | (
                        { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                    )
                    | (
                        string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                    )[]
                    | null;
                };
            }[];
            metadata?: {
                [key: string]: | string
                | number
                | boolean
                | (
                    { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                )
                | (
                    string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                )[]
                | null;
            };
            createdBySubjectId?: string;
            executionRef?: string;
            subject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            };
            modelOptions?: {
                [key: string]: | string
                | number
                | boolean
                | (
                    { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                )
                | (
                    string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                )[]
                | null;
            };
            timeoutSeconds?: number;
            output?: {
                kind?: | { case: undefined; value?: undefined }
                | { case: "text"; value: {} }
                | {
                    case: "structured";
                    value: {
                        schema?: {
                            [key: string]:
                                | string
                                | number
                                | boolean
                                | (
                                    { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                                )
                                | (
                                    string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                                )[]
                                | null;
                        };
                    };
                };
            };
            context?: {
                subject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                credential?: {
                    mode?: string;
                    subjectId?: string;
                    connection?: string;
                    instance?: string;
                };
                access?: { policy?: string; role?: string };
                workflow?: {
                    [key: string]:
                        | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (
                            string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                        )[]
                        | null;
                };
                host?: { publicBaseUrl?: string };
                agentSubject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                caller?: { kind?: string; name?: string };
                invocation?: {
                    requestId?: string;
                    depth?: number;
                    callChain?: string[];
                    surface?: string;
                    internalConnectionAccess?: boolean;
                    connection?: string;
                };
                toolRefs?: {
                    app?: string;
                    operation?: string;
                    connection?: string;
                    instance?: string;
                    title?: string;
                    description?: string;
                    credentialMode?: string;
                    system?: string;
                    runAs?: {
                        id?: string;
                        credentialSubjectId?: string;
                        email?: string;
                        displayName?: string;
                        scopes?: string[];
                        permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                    };
                }[];
                toolRefsSet?: boolean;
                requestMeta?: {
                    clientIp?: string;
                    remoteAddr?: string;
                    userAgent?: string;
                };
                agent?: { providerName?: string; sessionId?: string; turnId?: string };
            };
            providerName?: string;
        }
        • OptionalturnId?: string
        • OptionalsessionId?: string
        • OptionalidempotencyKey?: string
        • Optionalmodel?: string
        • Optionalmessages?: {
              role?: string;
              text?: string;
              parts?: {
                  type?: number;
                  text?: string;
                  json?: {
                      [key: string]:
                          | string
                          | number
                          | boolean
                          | (
                              { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                          )
                          | (...)[]
                          | null;
                  };
                  toolCall?: {
                      id?: string;
                      toolId?: string;
                      arguments?: { [key: ...]: ... };
                  };
                  toolResult?: {
                      toolCallId?: string;
                      status?: number;
                      content?: string;
                      output?: { [key: ...]: ... };
                  };
                  imageRef?: { uri?: string; mimeType?: string };
              }[];
              metadata?: {
                  [key: string]: | string
                  | number
                  | boolean
                  | (
                      { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                  )
                  | (
                      string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                  )[]
                  | null;
              };
          }[]
        • Optionalmetadata?: {
              [key: string]:
                  | string
                  | number
                  | boolean
                  | (
                      { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                  )
                  | (
                      string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                  )[]
                  | null;
          }
        • OptionalcreatedBySubjectId?: string
        • OptionalexecutionRef?: string
        • Optionalsubject?: {
              id?: string;
              credentialSubjectId?: string;
              email?: string;
              displayName?: string;
              scopes?: string[];
              permissions?: {
                  app?: string;
                  operations?: string[];
                  allOperations?: boolean;
              }[];
          }
        • OptionalmodelOptions?: {
              [key: string]:
                  | string
                  | number
                  | boolean
                  | (
                      { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                  )
                  | (
                      string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                  )[]
                  | null;
          }
        • OptionaltimeoutSeconds?: number

          Optional provider-owned turn execution budget, in seconds. If unset or zero, the provider chooses its own execution timeout. This does not control the CreateTurn RPC deadline.

        • Optionaloutput?: {
              kind?:
                  | { case: undefined; value?: undefined }
                  | { case: "text"; value: {} }
                  | {
                      case: "structured";
                      value: {
                          schema?: {
                              [key: string]:
                                  | string
                                  | number
                                  | boolean
                                  | (
                                      { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                                  )
                                  | (
                                      string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                                  )[]
                                  | null;
                          };
                      };
                  };
          }
        • Optionalcontext?: {
              subject?: {
                  id?: string;
                  credentialSubjectId?: string;
                  email?: string;
                  displayName?: string;
                  scopes?: string[];
                  permissions?: {
                      app?: string;
                      operations?: string[];
                      allOperations?: boolean;
                  }[];
              };
              credential?: {
                  mode?: string;
                  subjectId?: string;
                  connection?: string;
                  instance?: string;
              };
              access?: { policy?: string; role?: string };
              workflow?: {
                  [key: string]:
                      | string
                      | number
                      | boolean
                      | (
                          { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                      )
                      | (
                          string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                      )[]
                      | null;
              };
              host?: { publicBaseUrl?: string };
              agentSubject?: {
                  id?: string;
                  credentialSubjectId?: string;
                  email?: string;
                  displayName?: string;
                  scopes?: string[];
                  permissions?: {
                      app?: string;
                      operations?: string[];
                      allOperations?: boolean;
                  }[];
              };
              caller?: { kind?: string; name?: string };
              invocation?: {
                  requestId?: string;
                  depth?: number;
                  callChain?: string[];
                  surface?: string;
                  internalConnectionAccess?: boolean;
                  connection?: string;
              };
              toolRefs?: {
                  app?: string;
                  operation?: string;
                  connection?: string;
                  instance?: string;
                  title?: string;
                  description?: string;
                  credentialMode?: string;
                  system?: string;
                  runAs?: {
                      id?: string;
                      credentialSubjectId?: string;
                      email?: string;
                      displayName?: string;
                      scopes?: string[];
                      permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                  };
              }[];
              toolRefsSet?: boolean;
              requestMeta?: {
                  clientIp?: string;
                  remoteAddr?: string;
                  userAgent?: string;
              };
              agent?: { providerName?: string; sessionId?: string; turnId?: string };
          }
          • Optionalsubject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            }
          • Optionalcredential?: { mode?: string; subjectId?: string; connection?: string; instance?: string }
          • Optionalaccess?: { policy?: string; role?: string }
          • Optionalworkflow?: {
                [key: string]:
                    | string
                    | number
                    | boolean
                    | (
                        { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                    )
                    | (
                        string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                    )[]
                    | null;
            }
          • Optionalhost?: { publicBaseUrl?: string }
          • OptionalagentSubject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            }

            Original agent caller when an agent tool executes with delegated run-as identity.

          • Optionalcaller?: { kind?: string; name?: string }
          • Optionalinvocation?: {
                requestId?: string;
                depth?: number;
                callChain?: string[];
                surface?: string;
                internalConnectionAccess?: boolean;
                connection?: string;
            }
          • OptionaltoolRefs?: {
                app?: string;
                operation?: string;
                connection?: string;
                instance?: string;
                title?: string;
                description?: string;
                credentialMode?: string;
                system?: string;
                runAs?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                };
            }[]

            Agent tool refs granted to the operation request, when the request is executing as an agent tool.

          • OptionaltoolRefsSet?: boolean

            Preserves the distinction between an omitted tool-ref context and an explicitly empty inherited tool-ref context.

          • OptionalrequestMeta?: { clientIp?: string; remoteAddr?: string; userAgent?: string }
          • Optionalagent?: { providerName?: string; sessionId?: string; turnId?: string }
        • OptionalproviderName?: string

      Returns Promise<AgentTurn>

    • Parameters

      • turnId: string
      • Optionaloptions: { providerName?: string }

      Returns Promise<AgentTurn>

    • Parameters

      • request: {
            turnId?: string;
            subject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            };
            context?: {
                subject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                credential?: {
                    mode?: string;
                    subjectId?: string;
                    connection?: string;
                    instance?: string;
                };
                access?: { policy?: string; role?: string };
                workflow?: {
                    [key: string]:
                        | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (
                            string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                        )[]
                        | null;
                };
                host?: { publicBaseUrl?: string };
                agentSubject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                caller?: { kind?: string; name?: string };
                invocation?: {
                    requestId?: string;
                    depth?: number;
                    callChain?: string[];
                    surface?: string;
                    internalConnectionAccess?: boolean;
                    connection?: string;
                };
                toolRefs?: {
                    app?: string;
                    operation?: string;
                    connection?: string;
                    instance?: string;
                    title?: string;
                    description?: string;
                    credentialMode?: string;
                    system?: string;
                    runAs?: {
                        id?: string;
                        credentialSubjectId?: string;
                        email?: string;
                        displayName?: string;
                        scopes?: string[];
                        permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                    };
                }[];
                toolRefsSet?: boolean;
                requestMeta?: {
                    clientIp?: string;
                    remoteAddr?: string;
                    userAgent?: string;
                };
                agent?: { providerName?: string; sessionId?: string; turnId?: string };
            };
            providerName?: string;
        }

      Returns Promise<AgentTurn>

    • Parameters

      • sessionId: string
      • Optionaloptions: {
            turnIds?: string[];
            status?: number;
            limit?: number;
            summaryOnly?: boolean;
            providerName?: string;
        }

      Returns Promise<AgentTurn[]>

    • Parameters

      • request: {
            sessionId?: string;
            subject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            };
            turnIds?: string[];
            status?: number;
            limit?: number;
            summaryOnly?: boolean;
            context?: {
                subject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                credential?: {
                    mode?: string;
                    subjectId?: string;
                    connection?: string;
                    instance?: string;
                };
                access?: { policy?: string; role?: string };
                workflow?: {
                    [key: string]:
                        | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (
                            string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                        )[]
                        | null;
                };
                host?: { publicBaseUrl?: string };
                agentSubject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                caller?: { kind?: string; name?: string };
                invocation?: {
                    requestId?: string;
                    depth?: number;
                    callChain?: string[];
                    surface?: string;
                    internalConnectionAccess?: boolean;
                    connection?: string;
                };
                toolRefs?: {
                    app?: string;
                    operation?: string;
                    connection?: string;
                    instance?: string;
                    title?: string;
                    description?: string;
                    credentialMode?: string;
                    system?: string;
                    runAs?: {
                        id?: string;
                        credentialSubjectId?: string;
                        email?: string;
                        displayName?: string;
                        scopes?: string[];
                        permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                    };
                }[];
                toolRefsSet?: boolean;
                requestMeta?: {
                    clientIp?: string;
                    remoteAddr?: string;
                    userAgent?: string;
                };
                agent?: { providerName?: string; sessionId?: string; turnId?: string };
            };
            providerName?: string;
        }
        • OptionalsessionId?: string
        • Optionalsubject?: {
              id?: string;
              credentialSubjectId?: string;
              email?: string;
              displayName?: string;
              scopes?: string[];
              permissions?: {
                  app?: string;
                  operations?: string[];
                  allOperations?: boolean;
              }[];
          }
        • OptionalturnIds?: string[]
        • Optionalstatus?: number
        • Optionallimit?: number

          When non-zero and bounded_list_hydration is supported, cap results after ordering turns newest-first by created_at.

        • OptionalsummaryOnly?: boolean

          When true and bounded_list_hydration is supported, omit heavy fields such as messages, output text, and structured output unless exact turn_ids require direct lookup.

        • Optionalcontext?: {
              subject?: {
                  id?: string;
                  credentialSubjectId?: string;
                  email?: string;
                  displayName?: string;
                  scopes?: string[];
                  permissions?: {
                      app?: string;
                      operations?: string[];
                      allOperations?: boolean;
                  }[];
              };
              credential?: {
                  mode?: string;
                  subjectId?: string;
                  connection?: string;
                  instance?: string;
              };
              access?: { policy?: string; role?: string };
              workflow?: {
                  [key: string]:
                      | string
                      | number
                      | boolean
                      | (
                          { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                      )
                      | (
                          string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                      )[]
                      | null;
              };
              host?: { publicBaseUrl?: string };
              agentSubject?: {
                  id?: string;
                  credentialSubjectId?: string;
                  email?: string;
                  displayName?: string;
                  scopes?: string[];
                  permissions?: {
                      app?: string;
                      operations?: string[];
                      allOperations?: boolean;
                  }[];
              };
              caller?: { kind?: string; name?: string };
              invocation?: {
                  requestId?: string;
                  depth?: number;
                  callChain?: string[];
                  surface?: string;
                  internalConnectionAccess?: boolean;
                  connection?: string;
              };
              toolRefs?: {
                  app?: string;
                  operation?: string;
                  connection?: string;
                  instance?: string;
                  title?: string;
                  description?: string;
                  credentialMode?: string;
                  system?: string;
                  runAs?: {
                      id?: string;
                      credentialSubjectId?: string;
                      email?: string;
                      displayName?: string;
                      scopes?: string[];
                      permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                  };
              }[];
              toolRefsSet?: boolean;
              requestMeta?: {
                  clientIp?: string;
                  remoteAddr?: string;
                  userAgent?: string;
              };
              agent?: { providerName?: string; sessionId?: string; turnId?: string };
          }
          • Optionalsubject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            }
          • Optionalcredential?: { mode?: string; subjectId?: string; connection?: string; instance?: string }
          • Optionalaccess?: { policy?: string; role?: string }
          • Optionalworkflow?: {
                [key: string]:
                    | string
                    | number
                    | boolean
                    | (
                        { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                    )
                    | (
                        string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                    )[]
                    | null;
            }
          • Optionalhost?: { publicBaseUrl?: string }
          • OptionalagentSubject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            }

            Original agent caller when an agent tool executes with delegated run-as identity.

          • Optionalcaller?: { kind?: string; name?: string }
          • Optionalinvocation?: {
                requestId?: string;
                depth?: number;
                callChain?: string[];
                surface?: string;
                internalConnectionAccess?: boolean;
                connection?: string;
            }
          • OptionaltoolRefs?: {
                app?: string;
                operation?: string;
                connection?: string;
                instance?: string;
                title?: string;
                description?: string;
                credentialMode?: string;
                system?: string;
                runAs?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                };
            }[]

            Agent tool refs granted to the operation request, when the request is executing as an agent tool.

          • OptionaltoolRefsSet?: boolean

            Preserves the distinction between an omitted tool-ref context and an explicitly empty inherited tool-ref context.

          • OptionalrequestMeta?: { clientIp?: string; remoteAddr?: string; userAgent?: string }
          • Optionalagent?: { providerName?: string; sessionId?: string; turnId?: string }
        • OptionalproviderName?: string

      Returns Promise<ListAgentProviderTurnsResponse>

    • Parameters

      • turnId: string
      • Optionaloptions: { reason?: string; providerName?: string }

      Returns Promise<AgentTurn>

    • Parameters

      • request: {
            turnId?: string;
            reason?: string;
            subject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            };
            context?: {
                subject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                credential?: {
                    mode?: string;
                    subjectId?: string;
                    connection?: string;
                    instance?: string;
                };
                access?: { policy?: string; role?: string };
                workflow?: {
                    [key: string]:
                        | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (
                            string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                        )[]
                        | null;
                };
                host?: { publicBaseUrl?: string };
                agentSubject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                caller?: { kind?: string; name?: string };
                invocation?: {
                    requestId?: string;
                    depth?: number;
                    callChain?: string[];
                    surface?: string;
                    internalConnectionAccess?: boolean;
                    connection?: string;
                };
                toolRefs?: {
                    app?: string;
                    operation?: string;
                    connection?: string;
                    instance?: string;
                    title?: string;
                    description?: string;
                    credentialMode?: string;
                    system?: string;
                    runAs?: {
                        id?: string;
                        credentialSubjectId?: string;
                        email?: string;
                        displayName?: string;
                        scopes?: string[];
                        permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                    };
                }[];
                toolRefsSet?: boolean;
                requestMeta?: {
                    clientIp?: string;
                    remoteAddr?: string;
                    userAgent?: string;
                };
                agent?: { providerName?: string; sessionId?: string; turnId?: string };
            };
            providerName?: string;
        }

      Returns Promise<AgentTurn>

    • Parameters

      • turnId: string
      • Optionaloptions: { afterSeq?: bigint; limit?: number; providerName?: string }

      Returns Promise<AgentTurnEvent[]>

    • Parameters

      • request: {
            turnId?: string;
            afterSeq?: bigint;
            limit?: number;
            subject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            };
            context?: {
                subject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                credential?: {
                    mode?: string;
                    subjectId?: string;
                    connection?: string;
                    instance?: string;
                };
                access?: { policy?: string; role?: string };
                workflow?: {
                    [key: string]:
                        | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (
                            string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                        )[]
                        | null;
                };
                host?: { publicBaseUrl?: string };
                agentSubject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                caller?: { kind?: string; name?: string };
                invocation?: {
                    requestId?: string;
                    depth?: number;
                    callChain?: string[];
                    surface?: string;
                    internalConnectionAccess?: boolean;
                    connection?: string;
                };
                toolRefs?: {
                    app?: string;
                    operation?: string;
                    connection?: string;
                    instance?: string;
                    title?: string;
                    description?: string;
                    credentialMode?: string;
                    system?: string;
                    runAs?: {
                        id?: string;
                        credentialSubjectId?: string;
                        email?: string;
                        displayName?: string;
                        scopes?: string[];
                        permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                    };
                }[];
                toolRefsSet?: boolean;
                requestMeta?: {
                    clientIp?: string;
                    remoteAddr?: string;
                    userAgent?: string;
                };
                agent?: { providerName?: string; sessionId?: string; turnId?: string };
            };
            providerName?: string;
        }

      Returns Promise<ListAgentProviderTurnEventsResponse>

    • Parameters

      • request: {
            interactionId?: string;
            subject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            };
            context?: {
                subject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                credential?: {
                    mode?: string;
                    subjectId?: string;
                    connection?: string;
                    instance?: string;
                };
                access?: { policy?: string; role?: string };
                workflow?: {
                    [key: string]:
                        | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (
                            string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                        )[]
                        | null;
                };
                host?: { publicBaseUrl?: string };
                agentSubject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                caller?: { kind?: string; name?: string };
                invocation?: {
                    requestId?: string;
                    depth?: number;
                    callChain?: string[];
                    surface?: string;
                    internalConnectionAccess?: boolean;
                    connection?: string;
                };
                toolRefs?: {
                    app?: string;
                    operation?: string;
                    connection?: string;
                    instance?: string;
                    title?: string;
                    description?: string;
                    credentialMode?: string;
                    system?: string;
                    runAs?: {
                        id?: string;
                        credentialSubjectId?: string;
                        email?: string;
                        displayName?: string;
                        scopes?: string[];
                        permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                    };
                }[];
                toolRefsSet?: boolean;
                requestMeta?: {
                    clientIp?: string;
                    remoteAddr?: string;
                    userAgent?: string;
                };
                agent?: { providerName?: string; sessionId?: string; turnId?: string };
            };
        }

      Returns Promise<AgentInteraction>

    • Parameters

      • turnId: string
      • Optionaloptions: { providerName?: string }

      Returns Promise<AgentInteraction[]>

    • Parameters

      • request: {
            turnId?: string;
            subject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            };
            context?: {
                subject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                credential?: {
                    mode?: string;
                    subjectId?: string;
                    connection?: string;
                    instance?: string;
                };
                access?: { policy?: string; role?: string };
                workflow?: {
                    [key: string]:
                        | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (
                            string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                        )[]
                        | null;
                };
                host?: { publicBaseUrl?: string };
                agentSubject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                caller?: { kind?: string; name?: string };
                invocation?: {
                    requestId?: string;
                    depth?: number;
                    callChain?: string[];
                    surface?: string;
                    internalConnectionAccess?: boolean;
                    connection?: string;
                };
                toolRefs?: {
                    app?: string;
                    operation?: string;
                    connection?: string;
                    instance?: string;
                    title?: string;
                    description?: string;
                    credentialMode?: string;
                    system?: string;
                    runAs?: {
                        id?: string;
                        credentialSubjectId?: string;
                        email?: string;
                        displayName?: string;
                        scopes?: string[];
                        permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                    };
                }[];
                toolRefsSet?: boolean;
                requestMeta?: {
                    clientIp?: string;
                    remoteAddr?: string;
                    userAgent?: string;
                };
                agent?: { providerName?: string; sessionId?: string; turnId?: string };
            };
            providerName?: string;
        }

      Returns Promise<ListAgentProviderInteractionsResponse>

    • Parameters

      • interactionId: string
      • Optionalresolution: JsonObject
      • Optionaloptions: { turnId?: string; providerName?: string }

      Returns Promise<AgentInteraction>

    • Parameters

      • request: {
            interactionId?: string;
            resolution?: {
                [key: string]:
                    | string
                    | number
                    | boolean
                    | (
                        { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                    )
                    | (
                        string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                    )[]
                    | null;
            };
            subject?: {
                id?: string;
                credentialSubjectId?: string;
                email?: string;
                displayName?: string;
                scopes?: string[];
                permissions?: {
                    app?: string;
                    operations?: string[];
                    allOperations?: boolean;
                }[];
            };
            turnId?: string;
            context?: {
                subject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                credential?: {
                    mode?: string;
                    subjectId?: string;
                    connection?: string;
                    instance?: string;
                };
                access?: { policy?: string; role?: string };
                workflow?: {
                    [key: string]:
                        | string
                        | number
                        | boolean
                        | (
                            { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                        )
                        | (
                            string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                        )[]
                        | null;
                };
                host?: { publicBaseUrl?: string };
                agentSubject?: {
                    id?: string;
                    credentialSubjectId?: string;
                    email?: string;
                    displayName?: string;
                    scopes?: string[];
                    permissions?: {
                        app?: string;
                        operations?: string[];
                        allOperations?: boolean;
                    }[];
                };
                caller?: { kind?: string; name?: string };
                invocation?: {
                    requestId?: string;
                    depth?: number;
                    callChain?: string[];
                    surface?: string;
                    internalConnectionAccess?: boolean;
                    connection?: string;
                };
                toolRefs?: {
                    app?: string;
                    operation?: string;
                    connection?: string;
                    instance?: string;
                    title?: string;
                    description?: string;
                    credentialMode?: string;
                    system?: string;
                    runAs?: {
                        id?: string;
                        credentialSubjectId?: string;
                        email?: string;
                        displayName?: string;
                        scopes?: string[];
                        permissions?: { app?: ...; operations?: ...; allOperations?: ... }[];
                    };
                }[];
                toolRefsSet?: boolean;
                requestMeta?: {
                    clientIp?: string;
                    remoteAddr?: string;
                    userAgent?: string;
                };
                agent?: { providerName?: string; sessionId?: string; turnId?: string };
            };
            providerName?: string;
        }

      Returns Promise<AgentInteraction>