export const DASHBOARD_API_VERSION = '4';
export const DASHBOARD_REQUIRED_CAPABILITIES = [
    'runs',
    'memory',
    'pod',
    'clients',
    'events',
    'stream',
    'specialists',
    'crews',
    'planner',
    'hooks',
    'automations',
    'federation',
    'orchestration',
    'tokens',
    'tokenSources',
    'instructionPacket',
    'orchestrationLedger',
    'knowledgeFabric',
    'ragCollections',
    'patterns',
    'modelTiers',
    'workerPlan',
    'artifactOutcomes',
    'memoryTrace',
    'memoryShared',
    'worktreeHealth',
    'featureRegistry',
    'synapse',
    'architects',
    'dashboardSummary',
    'dashboardSurfaces',
    'nexusLayer',
    'skillDistribution',
];
export function listMissingDashboardCapabilities(capabilities, required = DASHBOARD_REQUIRED_CAPABILITIES) {
    return required.filter((capability) => capabilities?.[capability] !== true);
}
export function isCompatibleDashboardHealth(payload) {
    if (!payload || payload.dashboardApiVersion !== DASHBOARD_API_VERSION) {
        return false;
    }
    const required = Array.isArray(payload.compatibility?.requiredCapabilities) && payload.compatibility.requiredCapabilities.length
        ? payload.compatibility.requiredCapabilities
        : [...DASHBOARD_REQUIRED_CAPABILITIES];
    return listMissingDashboardCapabilities(payload.capabilities, required).length === 0;
}
