@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
36 lines • 1.82 kB
TypeScript
import type { DevToolsFeature, DevToolsHub, DevToolsLib } from './contract.js';
/** A registered lib, with its tools already filtered by `exclude`. */
export interface RegisteredDevToolsLib extends DevToolsLib {
/** How many tools it registered before `exclude` (for the boot log). */
registered: number;
/** `'endpoint'`: registered without `authorize` (no console), gated by `devTools.authorize`. */
gate: 'own' | 'endpoint';
}
/**
* The hub `mcp_provider` binds at `'agora.devTools'`. It only stores descriptors: tools resolve their
* services when called. `exclude` (lib ids or full tool names) is applied here, so an excluded tool
* never reaches any registry.
*/
export declare class DevToolsHubImpl implements DevToolsHub {
#private;
readonly version: 1;
constructor(options?: {
exclude?: readonly string[];
});
register(lib: DevToolsLib): void;
supports(feature: DevToolsFeature): boolean;
/** Every registered lib, in registration order. A lib excluded whole is kept, with no tools. */
libs(): RegisteredDevToolsLib[];
/** The libs that still have tools after `exclude`. */
servedLibs(): RegisteredDevToolsLib[];
/** Served libs registered without `authorize` (no console): gated by `devTools.authorize`. */
endpointGatedLibs(): RegisteredDevToolsLib[];
/** The lib that owns `toolName`, or `undefined` for a name nobody registered (or one excluded). */
libOf(toolName: string): RegisteredDevToolsLib | undefined;
}
/**
* The one boot warning when libs without a console registered tools and `devTools.authorize` is not
* set. `undefined` when there is nothing to say.
*/
export declare function endpointAuthorizeWarning(libs: readonly string[], authorize: unknown): string | undefined;
//# sourceMappingURL=hub.d.ts.map