/** * Skill Tool — agent-initiated skill chaining. * * Lets the agent hand off to another available skill in the current turn. The * callee's SKILL.md is dispatched through the same custom-message path used by * `/skill:` typing, as a user-attribution message delivered same-turn * (without `deliverAs: "nextTurn"`). When the caller is one of the canonical * workflow skills, the tool first runs the native state handoff so workflow * mode-state and `skill-active-state.json` transition atomically. Runtime * project/user skills have no native workflow mode-state, so they are dispatched * directly and tracked by the prompt observer instead. * * Canonical workflow chaining is refused unless the caller's phase permits it: * the generic terminal set `{complete, completed, handoff, failed, cancelled, * canceled, inactive}`, the caller's manifest-declared terminal states (e.g. * ralplan `final`), or — for autoresearch only — any phase with a declared * handoff edge (`intake`/`research`/`verdict`): a research mission never * mutates and guards no approval gate, its mission state is durable, so an * ongoing or verdict-complete mission may hand off to planning at any point. * ralplan/ultragoal keep the explicit write-to-handoff step for live phases: * their mid-flight chaining is exactly what the approval-gate guard blocks. */ import type { AgentTool, AgentToolResult } from "@gajae-code/agent-core"; import * as z from "zod/v4"; import type { ToolSession } from "."; declare const skillSchema: z.ZodObject<{ name: z.ZodString; args: z.ZodOptional; }, z.core.$strip>; type SkillToolInput = z.infer; export interface SkillToolDetails { name: string; path: string; args?: string; lineCount: number; } export declare class SkillTool implements AgentTool { #private; readonly name = "skill"; readonly label = "Skill"; readonly summary = "Chain into another available skill in the current turn"; readonly loadMode = "essential"; readonly description: string; readonly parameters: z.ZodObject<{ name: z.ZodString; args: z.ZodOptional; }, z.core.$strip>; readonly strict = true; constructor(session: ToolSession); static createIf(session: ToolSession): SkillTool | null; execute(_toolCallId: string, input: SkillToolInput, signal?: AbortSignal): Promise>; } export {};