import type { DomainEventBus } from '../shared/domainEvents.js';
import { type DomainError } from '../shared/errors.js';
import { type Result } from '../shared/result.js';
export type SkillCategory = 'language' | 'end' | 'persona' | 'workflow' | 'other';
export type SkillLinkState = 'absent' | 'linked' | 'frozen';
export interface SkillSummary {
    readonly name: string;
    readonly category: SkillCategory;
    readonly description: string;
    readonly origin: string;
    readonly linkedProjects: string[];
    /** 当 opts.project 提供时附 */
    readonly stateInProject?: SkillLinkState;
}
export interface SkillDetail extends Omit<SkillSummary, 'linkedProjects'> {
    readonly body: string;
    readonly references: Array<{
        name: string;
        lines: number;
    }>;
    /**
     * v0.50.21：detail 返回 enriched shape（state 标明 linked vs frozen）。
     * 之前返的是 string[]，导致前端 stateMap 全部读不到状态，所有项目显示 absent。
     */
    readonly linkedProjects: Array<{
        project: string;
        state: 'linked' | 'frozen';
    }>;
}
export interface SkillServiceDeps {
    readonly events: DomainEventBus;
}
export declare class SkillService {
    private readonly deps;
    constructor(deps: SkillServiceDeps);
    /** 列出 user-level skills。可选带 project 参数以得到 stateInProject。 */
    list(project?: string): Promise<Result<SkillSummary[], DomainError>>;
    get(name: string): Promise<Result<SkillDetail, DomainError>>;
    sync(): Promise<Result<void, DomainError>>;
    link(skill: string, project: string): Promise<Result<void, DomainError>>;
    unlink(skill: string, project: string): Promise<Result<void, DomainError>>;
    freeze(skill: string, project: string): Promise<Result<void, DomainError>>;
    unfreeze(skill: string, project: string): Promise<Result<void, DomainError>>;
}
//# sourceMappingURL=SkillService.d.ts.map