export class HubResourceLoader {
    delegate;
    peerContributions = [];
    constructor(delegate) {
        this.delegate = delegate;
    }
    static wrap(resourceLoader) {
        return resourceLoader instanceof HubResourceLoader ? resourceLoader : new HubResourceLoader(resourceLoader);
    }
    getExtensions() {
        return this.delegate.getExtensions();
    }
    getSkills() {
        return this.delegate.getSkills();
    }
    getPrompts() {
        return this.delegate.getPrompts();
    }
    getThemes() {
        return this.delegate.getThemes();
    }
    getAgentsFiles() {
        return this.delegate.getAgentsFiles();
    }
    getSystemPrompt() {
        return this.delegate.getSystemPrompt();
    }
    getAppendSystemPrompt() {
        return this.delegate.getAppendSystemPrompt();
    }
    extendResources(paths) {
        this.delegate.extendResources(paths);
    }
    async reload() {
        await this.delegate.reload();
    }
    getAggregationState() {
        return {
            mode: "local-only",
            peerContributions: [...this.peerContributions],
        };
    }
    getSummary() {
        const extensions = this.getExtensions();
        const skills = this.getSkills();
        const prompts = this.getPrompts();
        const themes = this.getThemes();
        return {
            extensions: extensions.extensions.length,
            skills: skills.skills.length,
            prompts: prompts.prompts.length,
            themes: themes.themes.length,
            agentsFiles: this.getAgentsFiles().agentsFiles.length,
            hasSystemPrompt: this.getSystemPrompt() !== undefined,
            appendSystemPromptCount: this.getAppendSystemPrompt().length,
            diagnostics: [
                ...extensions.errors.map(({ path, error }) => ({
                    type: "error",
                    message: error,
                    path,
                })),
                ...skills.diagnostics,
                ...prompts.diagnostics,
                ...themes.diagnostics,
            ],
        };
    }
    getDelegate() {
        return this.delegate;
    }
}
//# sourceMappingURL=hub-resource-loader.js.map