mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 06:00:44 +00:00
* fix(bootstrap): workspace bootstrap prompt routing * Fix bootstrap routing edge cases * Refine bootstrap mode routing and reset prompts * Fix bootstrap workspace routing for embedded runs * Fix embedded bootstrap compile follow-up * Align bare reset bootstrap file access * Honor reset override model for bootstrap gating * Align chat reset bootstrap topology
25 lines
690 B
TypeScript
25 lines
690 B
TypeScript
export type BootstrapMode = "full" | "limited" | "none";
|
|
|
|
export function resolveBootstrapMode(params: {
|
|
bootstrapPending: boolean;
|
|
runKind?: "default" | "heartbeat" | "cron";
|
|
isInteractiveUserFacing: boolean;
|
|
isPrimaryRun: boolean;
|
|
isCanonicalWorkspace: boolean;
|
|
hasBootstrapFileAccess: boolean;
|
|
}): BootstrapMode {
|
|
if (!params.bootstrapPending) {
|
|
return "none";
|
|
}
|
|
if (params.runKind === "heartbeat" || params.runKind === "cron") {
|
|
return "none";
|
|
}
|
|
if (!params.isPrimaryRun || !params.isInteractiveUserFacing) {
|
|
return "none";
|
|
}
|
|
if (!params.hasBootstrapFileAccess) {
|
|
return "none";
|
|
}
|
|
return params.isCanonicalWorkspace ? "full" : "limited";
|
|
}
|