ADK for TypeScript: API Reference
    Preparing search index...

    Interface NodeContextOptions

    用于构建的选项 NodeContext.

    interface NodeContextOptions {
        actions?: EventActions;
        channel: AsyncQueue<Event>;
        invocationContext: InvocationContext;
        isolationScope?: string;
        nodePath: string;
        resumeInputs?: Record<string, unknown>;
        runId: string;
        stateSchema?: SchemaLike;
    }
    actions?: EventActions

    用于存储事件相关操作结果的缓存(例如状态变化等信息)。

    channel: AsyncQueue<Event>
    invocationContext: InvocationContext
    isolationScope?: string

    `Scope` 标签用于将此节点的事件与其他节点的事件区分开来(即确保这些事件仅属于当前节点,而不会影响到其他节点)。

    nodePath: string

    拥有该节点的节点的路径(对于根节点,路径为空字符串)。

    resumeInputs?: Record<string, unknown>

    用于恢复被中断的子节点的响应结果,这些响应结果按照中断事件的 ID 进行分类。

    runId: string

    拥有该节点的节点的确定性运行标识符(deterministic run id)。

    stateSchema?: SchemaLike

    声明该节点可以写入的数据键(即可以修改或访问的数据的标识符)。 ctx.state 以及它们的类型。 问题由运行程序(runner)解决:可以使用该节点自身的数据结构(schema),或者使用其父节点的数据结构。