Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Merge remote-tracking branch 'origin/capy/gbra151-doctor-grading' into capy/gbra151-operability-wave
garrytan5fa5a159535e
diff --cc src/commands/doctor.tsindex 9203be9d34,3f083c3c91..cdc0ffa316--- a/src/commands/doctor.ts+++ b/src/commands/doctor.ts@@@ -398,7 -396,7 +398,7 @@@ export async function buildChecksconnectError?: unknown,// #6696: the run's deadline (started by the CLI before connecting) and a remote caller's readable sources.deadline: DoctorDeadline = startDoctorDeadline(args),- remoteScope: { sourceIds?: string[]; lastKnown?: 'cli' | 'refresh'; entryBudgetOverrideMs?: number; refreshOnly?: boolean } = {},- remoteScope: { sourceIds?: string[]; remote?: boolean } = {},++ remoteScope: { sourceIds?: string[]; remote?: boolean; lastKnown?: 'cli' | 'refresh'; entryBudgetOverrideMs?: number; refreshOnly?: boolean } = {},): Promise<Check[]> {const jsonOutput = args.includes('--json');const fastMode = args.includes('--fast');@@@ -475,12 -473,10 +475,12 @@@only: parseOnlyChecks(args),tier: parseDoctorTier(args),deadline,- ...(remoteScope.sourceIds ? { sourceIds: remoteScope.sourceIds } : {}),+ ...(remoteScope.sourceIds ? { sourceIds: remoteScope.sourceIds } : {}), ...(remoteScope.remote ? { remote: true } : {}),+ ...(remoteScope.lastKnown ? { lastKnown: remoteScope.lastKnown } : {}),+ ...(remoteScope.entryBudgetOverrideMs ? { entryBudgetOverrideMs: remoteScope.entryBudgetOverrideMs } : {}),};- return runDoctorRegistry(ctx);+ return runDoctorRegistry(ctx, remoteScope.refreshOnly ? doctorRefreshRegistry() : undefined);}/**diff --cc src/commands/doctor/context.tsindex 0bbae6f21b,bfb74fb83c..2dbfb32050--- a/src/commands/doctor/context.ts+++ b/src/commands/doctor/context.ts@@@ -85,12 -78,10 +85,14 @@@ export interface DoctorContextdeadline?: DoctorDeadline;/** #6696 B2: the remote caller's readable sources (run_doctor tier/only); undefined: brain-wide or `--source`. */sourceIds?: string[];+ /** #7146: the run serves a remote caller (run_doctor tier/only): checks that name pages or paths confine them. */+ remote?: boolean;/** #6803 C3: the running entry's absolute deadline (scans stop at it and report what they read); undefined: unbounded. */entryDeadlineAt?: number;+ /** #7142: a brain-wide local CLI run (or the background refresh) that reads and records last known results (./last-known.ts). */+ lastKnown?: 'cli' | 'refresh';+ /** #7142: the per-entry budget of the background refresh, instead of `doctor.entry_budget_ms`. */+ entryBudgetOverrideMs?: number;/** #6696 B1: one `getHealth()` per run, shared by every entry that reads it (`doctorHealth`). */healthMemo?: Promise<BrainHealth>;}