import type { TaskCommand } from './task';
import type { Role } from './auth';
export type SkillFramework = 'openclaw' | 'hermes' | 'native';
export type SkillVisibility = 'private' | 'tenant' | 'public';
export type SkillSource = 'local' | 'cloud' | 'cache';
export type SkillModule = 'gateway' | 'model' | 'planner' | 'guard' | 'runtime' | 'memory' | 'policy' | 'executor' | 'audit' | 'realtime';
export interface SkillRetryPolicy {
    maxAttempts: number;
    backoffMs: number;
}
export interface SkillExecutionPolicy {
    timeoutMs: number;
    retry: SkillRetryPolicy;
}
export interface SkillDefinition {
    skillId: string;
    version: string;
    name: string;
    module: SkillModule;
    framework: SkillFramework;
    description: string;
    dependencies: string[];
    executionPolicy: SkillExecutionPolicy;
    supportedActions: Array<TaskCommand['action']>;
    supportedTargets: Array<'agv' | 'arm' | 'both'>;
    entrypoint: string;
    inputSchema: Record<string, string>;
    outputSchema: Record<string, string>;
    tags: string[];
    enabled: boolean;
    tenantId?: string;
    visibility?: SkillVisibility;
    ownerId?: string;
    source?: SkillSource;
    checksum?: string;
    publishedAt?: string;
    deprecatedAt?: string;
    createdAt?: string;
    updatedAt?: string;
}
export interface SkillResolveReq {
    framework?: SkillFramework;
    command: TaskCommand;
    tenantId?: string;
    userId?: string;
    userRole?: Role;
    visibility?: SkillVisibility;
}
export interface SkillResolveResp {
    framework: SkillFramework;
    command: Pick<TaskCommand, 'sessionId' | 'action' | 'target' | 'targetType'>;
    skills: SkillDefinition[];
    dag: SkillDagNode[];
    catalogSource?: SkillSource;
    tenantId?: string;
}
export interface SkillDagNode {
    skillId: string;
    module: SkillModule;
    version: string;
    dependencies: string[];
    timeoutMs: number;
    maxAttempts: number;
}
export interface SkillCatalogSnapshot {
    tenantId: string;
    version: string;
    source: SkillSource;
    fetchedAt: string;
    skills: SkillDefinition[];
}
