agents
Version:
A home for your AI agents
37 lines (35 loc) • 1.24 kB
TypeScript
import { n as SkillCatalog } from "../../catalog-BpiVV1OF.js";
import { a as SkillScriptRunner } from "../../script-CFDLTk5b.js";
import { ToolSet } from "ai";
//#region src/skills/tools/ai-sdk.d.ts
/**
* AI SDK tools for Agent Skills, exported as `agents/skills/tools/ai-sdk`.
*
* Kept out of the `agents/skills` entry so the parser and sources do not
* pull in `ai` or `zod`.
*
* @module
*/
/** Options for {@link createSkillTools}. */
interface SkillToolsOptions {
/** Enables `run_skill_script`. Experimental. */
readonly scriptRunner?: SkillScriptRunner | null;
}
/**
* Build AI SDK tools for a catalog: `activate_skill`, `read_skill_resource`,
* and, with a script runner, `run_skill_script`.
*
* Failures (an unknown skill, a missing file) are thrown, so the AI SDK
* returns them to the model as tool errors.
*
* @param catalog - The catalog to expose. Build tools again after reloading it.
* @param options - Optional script runner.
* @returns The tools, or an empty set when the catalog has no skills.
*/
declare function createSkillTools(
catalog: SkillCatalog,
options?: SkillToolsOptions
): ToolSet;
//#endregion
export { SkillToolsOptions, createSkillTools };
//# sourceMappingURL=ai-sdk.d.ts.map