/** * A skill that is managed externally (e.g. user-installed) and needs * permission grants but is NOT installed by this plugin's CLI. */ export interface PermissionOnlySkill { /** Skill name - must match the name OpenCode uses for permission checks */ name: string; /** List of agents that should auto-allow this skill */ allowedAgents: string[]; /** Human-readable description (for documentation only) */ description: string; } /** * Skills managed externally (not installed by this plugin's CLI). * Entries here only affect agent permission grants - nothing is installed. */ export declare const PERMISSION_ONLY_SKILLS: PermissionOnlySkill[]; /** * Names of the skills an agent is granted by default when no explicit * `skills` list is configured: bundled custom skills plus * externally-managed skills whose `allowedAgents` includes `'*'` or the * canonical agent name. Order follows the registries: CUSTOM_SKILLS first, * then PERMISSION_ONLY_SKILLS. */ export declare function getDefaultGrantedSkillNames(agentName: string): string[]; /** * Get permission presets for a specific agent based on bundled skills. * @param agentName - The name of the agent * @param skillList - Optional explicit list of skills to allow (overrides defaults) * @returns Permission rules for the skill permission type */ export declare function getSkillPermissionsForAgent(agentName: string, skillList?: readonly string[], disabledSkillNames?: readonly string[]): Record; /** * Fold per-agent skill directives into an effective skills list. * * 1. Without a base `skills` list the working base is the agent's default * grants (orchestrator defaults to allow-all, so its working base is * `['*']`), so `skills_add` alone keeps the defaults and appends, and * `skills_remove` alone prunes from the defaults. * 2. Explicit token removals are applied to the working base first. This * lets `skills_remove: ['!name']` lift an inherited exclusion before * additions are evaluated. * 3. Remaining exclusion (`'!name'`) tokens prevent `skills_add` from * re-granting the excluded skill. Plain-name removals also suppress an * addition of the same name, so removal wins over addition. * 4. If the result contains `'*'`, a plain-name removal is granted * implicitly by the wildcard, so it is made explicit by appending the * existing `'!name'` exclusion token - unless already present. * * The returned token list is consumed by the existing skill permission * resolver (`getSkillPermissionsForAgent`), which continues to interpret * `'*'` and `'!name'` as before. * * Returns `undefined` when nothing is configured to resolve (no base, no * additions, no removals) so the agent keeps its default skill behavior. */ export declare function resolveEffectiveSkills(agentName: string, base: readonly string[] | undefined, add: readonly string[] | undefined, remove: readonly string[] | undefined): string[] | undefined;