import { PromptModule, ModuleConfig } from './prompt-module.interface.js'; /** * Skills reference module — tells the agent how to discover and use skills. * * Consolidates skill references, role-based capability descriptions, * and catalog location into a single module. Capabilities are scoped * per-role to avoid blanket authorization (#225). * * Sources: Path A Step 1+6, Path B Section 8, Path C skill instructions. */ export declare class SkillsReferenceModule implements PromptModule { name: string; priority: number; maxTokens: number; compactable: boolean; /** * Always included — agents need to know how to use skills. */ shouldInclude(_config: ModuleConfig): boolean; /** * Build the skills reference section with catalog location, * role-scoped capabilities, and memory tool instructions. * * @param config - Module configuration with skill paths and role * @returns Formatted markdown skills reference section */ build(config: ModuleConfig): Promise; /** * Build the connector skills section. * * These existed for weeks and no agent knew about them. The prompt * described `remote-browser` at length as the way to reach anything * behind the owner's login, and said nothing about Drive, Docs, Sheets, * Slides, Gmail or Calendar — so an agent asked to read a Drive folder * reasonably reached for the browser, found the Chrome extension * disconnected, and reported that it could not do the job. The * capability was installed and the account was connected the whole time. * * Hence the ordering note: for Google content the connector is the * right tool and the browser is the fallback, not the other way round. * * @param config - Module configuration, for the skills path * @returns The formatted section */ private buildConnectors; /** * Build the "missing a capability" rule (specs/skill-auto-install.md). * * An owner sent a Slack voice message. One agent transcribed it; another, * on a machine without whisper.cpp, answered "can't transcribe, * whisper.cpp isn't installed" and stopped. The skill and its installer * existed — the agent just never looked. This rule makes looking the * first move: find-skill, tell the user in one line, install-skill in the * background, and pick the task back up when the completion message lands. * * @param config - Module configuration, for the skills path * @returns The formatted section */ private buildMissingCapability; /** * Build the core skills list — available to all roles. */ private buildCoreSkills; /** * Build role-scoped capabilities section (#225). * Workers get narrow read+execute scope; orchestrators get broader coordination scope. */ private buildCapabilities; /** * Build safe skill calling guide for runtimes with shell escaping issues. * * Gemini CLI's run_shell_command mangles JSON arguments containing quotes, * backticks, and parentheses, causing "unexpected EOF" shell errors. * This guide instructs the agent to write JSON to a temp file using heredoc * with a single-quoted delimiter, then pass --file . * * Uses `<< 'CREWLY_EOF'` instead of `printf '%s' '...'` because: * - Single-quoted heredoc delimiter prevents ALL shell interpretation * - Single quotes, double quotes, backticks, $, () all pass through literally * - The previous printf approach broke when JSON contained single quotes * (e.g., "it's working" or "don't forget") * * Only included for gemini-cli runtime type. * * @param config - Module configuration with runtime type * @returns Safe calling guide markdown, or null if not needed */ private buildSafeCallGuide; /** * Build communication and memory tool instructions. */ private buildCommunication; } //# sourceMappingURL=skills-reference.module.d.ts.map