chore: stabilize Zhinian pilot delivery

This commit is contained in:
inman
2026-05-12 19:44:44 +08:00
parent 45389855e1
commit 20b5aff4ad
174 changed files with 41428 additions and 784 deletions

View File

@@ -5,6 +5,7 @@ import { logger } from '../../utils/logger';
import { getOpenClawConfigDir } from '../../utils/paths';
import { buildGatewayHealthSummary } from '../../utils/gateway-health';
import { buildYinianModelConfigDiagnostics, ensureYinianModelRuntimeConfigured } from '../../utils/model-diagnostics';
import { buildOfficeSkillRuntimeDiagnostics, ensureOfficeSkillRuntimeReady } from '../../utils/office-skill-runtime';
import type { HostApiContext } from '../context';
import { sendJson } from '../route-utils';
import { buildChannelAccountsView, getChannelStatusDiagnostics } from './channels';
@@ -95,5 +96,17 @@ export async function handleDiagnosticsRoutes(
return true;
}
if (url.pathname === '/api/diagnostics/office-runtime' && req.method === 'GET') {
try {
const diagnostics = url.searchParams.get('repair') === '1'
? await ensureOfficeSkillRuntimeReady()
: await buildOfficeSkillRuntimeDiagnostics();
sendJson(res, 200, diagnostics);
} catch (error) {
sendJson(res, 500, { success: false, error: String(error) });
}
return true;
}
return false;
}