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

@@ -6,16 +6,22 @@ import { getUvMirrorEnv } from '../utils/uv-env';
import { isPythonReady, setupManagedPython } from '../utils/uv-setup';
import { logger } from '../utils/logger';
import { prependPathEntry } from '../utils/env-path';
import { buildDotnetEnv } from '../utils/dotnet-runtime';
import { probeGatewayReady } from './ws-client';
import { warmupOfficeSkillRuntimeReadiness } from '../utils/office-skill-runtime';
export function warmupManagedPythonReadiness(): void {
void isPythonReady().then((pythonReady) => {
if (!pythonReady) {
logger.info('Python environment missing or incomplete, attempting background repair...');
void setupManagedPython().catch((err) => {
logger.error('Background Python repair failed:', err);
});
void setupManagedPython()
.then(() => warmupOfficeSkillRuntimeReadiness())
.catch((err) => {
logger.error('Background Python repair failed:', err);
});
return;
}
warmupOfficeSkillRuntimeReadiness();
}).catch((err) => {
logger.error('Failed to check Python environment:', err);
});
@@ -283,6 +289,7 @@ export async function runOpenClawDoctorRepair(): Promise<boolean> {
const baseEnvPatched = binPathExists
? prependPathEntry(baseProcessEnv, binPath).env
: baseProcessEnv;
const baseEnvWithDotnet = buildDotnetEnv(baseEnvPatched);
const uvEnv = await getUvMirrorEnv();
const doctorArgs = ['doctor', '--fix', '--yes', '--non-interactive'];
@@ -292,7 +299,7 @@ export async function runOpenClawDoctorRepair(): Promise<boolean> {
return await new Promise<boolean>((resolve) => {
const forkEnv: Record<string, string | undefined> = {
...baseEnvPatched,
...baseEnvWithDotnet,
...uvEnv,
...(binPathExists && existsSync(bundledNodePath) && existsSync(bundledNpmCliPath)
? {