Interface ToolsetCreateOptions

Options accepted by Toolset.create() — id + tools plus optional setup/teardown hooks.

interface ToolsetCreateOptions {
    aclose?: (() => Promise<void>);
    id: string;
    setup?: ((ctx) => Promise<void>);
    tools: readonly ToolContextEntry<any>[];
}

Hierarchy (view full)

Properties

Properties

aclose?: (() => Promise<void>)

Invoked when the toolset is being torn down. Release awaitable resources here.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

id: string
setup?: ((ctx) => Promise<void>)

One-time async initialization run when the toolset activates — e.g. connecting to a server and wiring listeners. Push a changed tool list via ToolsetContext.updateTools.

Type declaration

    • (ctx): Promise<void>
    • Parameters

      Returns Promise<void>

tools: readonly ToolContextEntry<any>[]

The toolset's initial tools.