@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
30 lines • 1.37 kB
TypeScript
import type { StandardSchemaV1 } from '@standard-schema/spec';
import type { DevToolInputSchema } from './contract.js';
/**
* Check that `schema` stays inside the dev-tools JSON Schema subset. Returns the problem, or `null`.
* The subset is what a console query string can carry: scalars, string enums and arrays of strings.
*/
export declare function schemaProblem(schema: unknown): string | null;
type Issue = StandardSchemaV1.Issue;
/** Validate `input` against a subset schema. Extra properties are rejected. */
export declare function validateDevToolInput(schema: DevToolInputSchema, input: unknown): {
value: Record<string, unknown>;
} | {
issues: Issue[];
};
/** The JSON Schema MCP clients see in `tools/list`: the subset, closed to extra properties. */
export declare function devToolJsonSchema(schema: DevToolInputSchema): Record<string, unknown>;
/**
* Wrap a subset schema as a Standard Schema, so the agent's `ToolRegistry` and MCP server serve it
* unchanged: `validate` runs {@link validateDevToolInput}, and `jsonSchema.input()` is what
* `tools/list` shows.
*/
export declare function devToolStandardSchema(schema: DevToolInputSchema): StandardSchemaV1<Record<string, unknown>> & {
'~standard': {
jsonSchema: {
input(): Record<string, unknown>;
};
};
};
export {};
//# sourceMappingURL=schema.d.ts.map