From 272c88cb9f8cb70bc5d17eaeb86b033570f6d8d9 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Tue, 27 Oct 2026 11:59:55 -0500 Subject: [PATCH] docs(home): preserve quotas and gateway edits --- home/openclaw/default.nix | 51 +++++++++++++++++++++++++++---- home/openclaw/workspace/QUOTAS.md | 2 +- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/home/openclaw/default.nix b/home/openclaw/default.nix index 6b1103e821..e02c78567a 100644 --- a/home/openclaw/default.nix +++ b/home/openclaw/default.nix @@ -78,6 +78,8 @@ in # the token itself never enters the store. environment = { OPENCLAW_GATEWAY_TOKEN = "${homeDir}/.secrets/openclaw/gateway-token"; + OPENCLAW_SLACK_BOT_TOKEN = "/home/user/.secrets/openclaw/slack-bot-token"; + OPENCLAW_SLACK_APP_TOKEN = "/home/user/.secrets/openclaw/slack-app-token"; }; # Extra binaries on the gateway's PATH (not the login shell's): @@ -105,11 +107,7 @@ in # nix-openclaw tool plugins (CLI tools + skills, packaged in Nix). bundledPlugins = { - # summarize.enable = true; # summarize URLs / PDFs / videos — - # disabled 2026-10-26: its ~780-package pnpm deps fetch kept dying - # on the laptop's flaky route to registry.npmjs.org (timeouts / - # HTTP2 framing errors). Re-enable and rebuild when the route is - # healthy; nothing else depends on it. + summarize.enable = true; # summarize URLs / PDFs / videos gogcli.enable = true; # Google Workspace CLI (gog) goplaces.enable = true; # Google Places CLI # peekaboo / poltergeist are macOS-only in the nix-openclaw @@ -141,6 +139,9 @@ in "firecrawl" "perplexity" "duckduckgo" + "searxng" # keyless web search (added 2026-10-26, Drew: more plugins) + "lobster" # typed workflow runtime for resumable automations + "diffs" # diff rendering for code review in chat "tokenjuice" # context compression ]; @@ -224,6 +225,30 @@ in }; }; + # Chat channels. Slack wired 2026-10-26: app A0CD7L3S81W, bot + # @openclaw (U0CC72H7KA7); tokens via env SecretRefs fed from + # laptop files (interim home for sops-managed secrets). DMs from + # Drew only; channel access gets allowlisted per channel later. + channels = { + slack = { + enabled = true; + mode = "socket"; + botToken = { + source = "env"; + provider = "default"; + id = "OPENCLAW_SLACK_BOT_TOKEN"; + }; + appToken = { + source = "env"; + provider = "default"; + id = "OPENCLAW_SLACK_APP_TOKEN"; + }; + dmPolicy = "allowlist"; + allowFrom = [ "U0CBX163G8Z" ]; # Drew + groupPolicy = "allowlist"; + }; + }; + # Model routing: local plan proxies only (see QUOTAS.md). Primary is # DeepSeek Flash on the CommandCode plan; fallbacks stay on plan # routes; the Codex/OpenAI proxy is registered for explicit use as @@ -255,6 +280,12 @@ in }; }; + # One DM session per channel+peer, so a future second channel + # never shares a transcript with Slack DMs. + session = { + dmScope = "per-channel-peer"; + }; + agents = { defaults = { model = { @@ -265,7 +296,15 @@ in "commandcode/moonshotai/kimi-k2.6" ]; }; - heartbeat.every = "1h"; + heartbeat = { + every = "30m"; + lightContext = true; + isolatedSession = true; + activeHours = { + start = "07:00"; + end = "23:00"; + }; + }; }; ownership = "explicit"; entries = { diff --git a/home/openclaw/workspace/QUOTAS.md b/home/openclaw/workspace/QUOTAS.md index a4e25294fa..c57ac8a415 100644 --- a/home/openclaw/workspace/QUOTAS.md +++ b/home/openclaw/workspace/QUOTAS.md @@ -4,7 +4,7 @@ Drew's rule, verbatim in spirit: **"Use the plans. Measure the quotas."** 1. **Plans only, never funds.** Every model call must ride a subscription plan. PAYG balances (e.g. a raw DeepSeek API balance, OpenAI API billing, Zen funds) are emergency reserves Drew controls — an agent never falls back to them. A 402/quota error is a wall: at most ONE retry on the same pool, then rotate pools or stop and report. 2. **Burn by expiry.** Prefer the pool whose window expires soonest. **OpenAI is the final reserve** — do not drain it while other pools have capacity. (This is why this gateway's default is DeepSeek Flash on the CommandCode plan, with the Design-plan DeepSeek as fallback, and the Codex/OpenAI proxy is registered but _not_ in the fallback chain.) -3. **Measure before and during.** Before starting heavy work on a pool, check its quota if a checker exists (OpenChamber's quota view / the provider registry in the keep-the-four-repos-healthy goal files). Above ~85% of a window: only small work that finishes inside the window. +3. **Measure before and during.** Before starting heavy work on a pool, check its quota if a checker exists (OpenChamber's quota view / the provider registry in the keep-the-four-repos-healthy goal files). Pools are used all the way to 100% (the old ~85% caution zone is retired, Drew 2026-10-27). At a known 100% the pool is closed — no new work, no continued calls — until its reset time, or until a fresh check shows it has dropped below 100% (some providers reset early). 4. **Model + effort is one decision, per task.** Defaults: DeepSeek Flash (high effort) for routine work; Haiku/Sonnet-class for standard Claude work; Luna-class at max effort for cheap OpenAI-side work; flagship models (Sol/Opus-class) right-sized at medium, only for genuinely hard problems. Never leave model or effort at "default" by accident. 5. **One Meta pool, one door.** The Meta High Usage plan is reached through the fleet's `meta` provider route (muse-proxy, :18747). It is a plan pool like the others — not "Muse's subscription" (that's Drew's separate assistant product and not a pool at all). This gateway does not use it by default; OpenCode sessions route to it under their own discipline. 6. **Cloudflare gateway:** at most one unimportant session at a time. Not a routine route.