import { Tool } from "../../common"; import type { SkillRecord } from "./manager"; import type { SkillOutputKind, SkillTrustTier } from "./output"; import type { SpooledArtifactConstructor } from "../../common"; import type { ToolGateFn } from "../tools/_shared/index"; /** * Rebuild every imported tool; the original tool is never mutated. * * Error containment intentionally follows Tool.executor() on both sides. Error throws have the * four-level downstream/failed/downstream/original chain; non-Error throws have three levels and * an unrecoverable payload because the inner executor attaches no cause. This wrapper does not * race an in-process handler against ctx.abortSignal: a handler that never settles hangs the turn; * skills needing cancellation should ship a script. */ export declare const rewrapSkillTool: (o: { /** The third-party tool exactly as the descriptor supplied it. */ original: Tool; /** Identity of the owning skill; becomes `meta.skill` / `meta.skillVersion`. */ skill: { readonly id: string; readonly version: string; readonly trustTier?: SkillTrustTier; }; /** The loaded record. The wrapper closes over it for the liveness check (retired + refcount). */ record: SkillRecord; /** Undefined only when `unsafe.ungatedSkillTools` is set. */ gate: ToolGateFn | undefined; /** Resolves this tool's artifact kind. */ resolveArtifact: (skillId: string, toolName: string) => SpooledArtifactConstructor; /** Descriptor-declared output kind for this tool; enforced against the runtime shape when set. */ declaredOutput?: SkillOutputKind; }) => Tool; /** * Check imported and generated names before reservations or registration. Artifact readers are * derived from core's live method registries, including the mandatory raw and markdown kinds. */ export declare const assertSkillToolNames: (o: { candidates: readonly string[]; reserved: ReadonlySet; registryNames: readonly string[]; registryOwners: ReadonlyMap; skillId: string; artifactKinds: readonly unknown[]; }) => void;