feat(cli): enforce minio ingestion extractor checks in setup and doctor
This commit is contained in:
@@ -6,6 +6,7 @@ import { homedir } from 'os';
|
||||
import { resolve, join } from 'path';
|
||||
import { parse } from 'yaml';
|
||||
import { configSchema } from '../config/schema.js';
|
||||
import { checkMinioExtractorStatus, summarizeMinioExtractorStatus } from './minioExtractors.js';
|
||||
|
||||
export interface CheckResult {
|
||||
status: 'pass' | 'fail' | 'warn' | 'skip';
|
||||
@@ -574,6 +575,28 @@ const checkGmail: Check = async (ctx) => {
|
||||
return { status: warnings.length > 0 ? 'warn' : 'pass', label: 'Gmail configured', detail: withWarnings };
|
||||
};
|
||||
|
||||
const checkMinioExtractors: Check = async (ctx) => {
|
||||
if (!ctx.config) {
|
||||
return { status: 'skip', label: 'MinIO ingest extractors', detail: '(config invalid)' };
|
||||
}
|
||||
|
||||
const status = await checkMinioExtractorStatus(ctx.config as unknown as Record<string, unknown>);
|
||||
if (!status.minioEnabled) {
|
||||
return { status: 'skip', label: 'MinIO ingest extractors', detail: '(backup.minio not enabled)' };
|
||||
}
|
||||
|
||||
const summary = summarizeMinioExtractorStatus(status);
|
||||
if (status.missingRequirements.length > 0) {
|
||||
return {
|
||||
status: 'warn',
|
||||
label: 'MinIO ingest extractors',
|
||||
detail: `${summary} — install missing extractors for PDF/DOCX ingestion`,
|
||||
};
|
||||
}
|
||||
|
||||
return { status: 'pass', label: 'MinIO ingest extractors', detail: summary };
|
||||
};
|
||||
|
||||
const allChecks: Check[] = [
|
||||
checkConfigExists,
|
||||
checkOverlayExists,
|
||||
@@ -586,6 +609,7 @@ const allChecks: Check[] = [
|
||||
checkModelConnectivity,
|
||||
checkTelegram,
|
||||
checkGmail,
|
||||
checkMinioExtractors,
|
||||
checkMcpServers,
|
||||
checkSkills,
|
||||
checkSkillsRegistry,
|
||||
|
||||
Reference in New Issue
Block a user