Skip to content

Interface: AgentToolkit

Defined in: agent-tools.ts:60

Properties

ns

readonly ns: string

Defined in: agent-tools.ts:63

The toolkit's namespace — the <ns> of window.__<ns>, and the prefix the shared registry publishes tools under (<ns>/<tool>).

Methods

handle()

handle(): AgentToolkitHandle

Defined in: agent-tools.ts:75

Returns

AgentToolkitHandle


registerReporter()

registerReporter(name, reporter): void

Defined in: agent-tools.ts:67

Register (or replace, by name) one section of report().

Parameters

name

string

reporter

() => unknown

Returns

void


registerTool()

registerTool(tool): void

Defined in: agent-tools.ts:65

Register (or replace, by name) one tool. HMR-safe.

Parameters

tool

AgentTool

Returns

void


setActive()

setActive(active): void

Defined in: agent-tools.ts:74

Flip this namespace's ACTIVITY bit on the shared registry (see AiuiToolsRegistry.setActive). For apps that drive their own client-side routing; pages mounted by a shell declare toolsNs on their SitePage and let the shell flip it.

Parameters

active

boolean

Returns

void