docs: clarify copilot schedule/profile switch wiring

This commit is contained in:
Matt Bruce 2026-02-19 12:42:01 -06:00
parent ce0ad50ac1
commit 93f97d0e81
2 changed files with 45 additions and 0 deletions

View File

@ -207,6 +207,45 @@ Default schedule behavior:
- Work hours (`08:00` to `18:00` local time): `paid` profile - Work hours (`08:00` to `18:00` local time): `paid` profile
- Off-hours (`18:00` to `08:00` local time): `free` profile - Off-hours (`18:00` to `08:00` local time): `free` profile
Schedule wiring (important):
- `config/model-schedule.config.json` controls time windows and which script applies profiles.
- `switchScript` should be `./scripts/model_profile_switch.sh`.
- `config/model-profiles.config.json` defines what `paid` and `free` actually mean (primary + fallbacks).
Expected schedule config shape:
```json
{
"enabled": true,
"dayProfile": "paid",
"nightProfile": "free",
"dayStartHour": 8,
"nightStartHour": 18,
"sessionKey": "agent:main:main",
"switchScript": "./scripts/model_profile_switch.sh",
"stateFile": "~/.openclaw/model-schedule-state.json"
}
```
Important behavior difference vs Max:
- Copilot `config/model-profiles.config.json` starts with empty model IDs in this template copy.
- `bash ./scripts/install_copilot_guardrails.sh` runs `configure_copilot_guardrails_defaults.sh`, detects available `github-copilot/*` models, and writes concrete `paid`/`free` models into `config/model-profiles.config.json`.
- Until that step runs on the target machine (after `copilot auth login`), schedule/profile switching has no concrete model IDs to apply.
Quick verify commands:
```bash
cat config/model-schedule.config.json
cat config/model-profiles.config.json
```
After installing guardrails, verify staged runtime files used by launchd:
```bash
cat ~/Library/Application\ Support/openclaw-copilot-guard/model-schedule.config.json
cat ~/Library/Application\ Support/openclaw-copilot-guard/model-profiles.config.json
```
Manual profile switch: Manual profile switch:
```bash ```bash

View File

@ -167,7 +167,9 @@ Checks:
launchctl print gui/$(id -u)/ai.openclaw.copilot-model-schedule-guard launchctl print gui/$(id -u)/ai.openclaw.copilot-model-schedule-guard
tail -n 100 /tmp/openclaw-copilot-model-schedule-guard.log /tmp/openclaw-copilot-model-schedule-guard.err.log tail -n 100 /tmp/openclaw-copilot-model-schedule-guard.log /tmp/openclaw-copilot-model-schedule-guard.err.log
cat config/model-schedule.config.json cat config/model-schedule.config.json
cat config/model-profiles.config.json
cat ~/Library/Application\ Support/openclaw-copilot-guard/model-schedule.config.json cat ~/Library/Application\ Support/openclaw-copilot-guard/model-schedule.config.json
cat ~/Library/Application\ Support/openclaw-copilot-guard/model-profiles.config.json
``` ```
Fixes: Fixes:
@ -176,6 +178,10 @@ Fixes:
- `bash ./scripts/install_copilot_guardrails.sh` - `bash ./scripts/install_copilot_guardrails.sh`
- For a quick manual switch without live push: - For a quick manual switch without live push:
- `bash ./scripts/model_profile_switch.sh free --no-live` - `bash ./scripts/model_profile_switch.sh free --no-live`
- If `profiles.paid.primary` / `profiles.free.primary` are empty, run:
- `copilot auth login`
- `bash ./scripts/install_copilot_guardrails.sh`
This populates `config/model-profiles.config.json` and restages launchd runtime configs.
## 12) Copilot auth watchdog alerting repeatedly ## 12) Copilot auth watchdog alerting repeatedly