fix: reset dev gateway setup

This commit is contained in:
Peter Steinberger
2026-01-09 15:11:32 +01:00
parent 3e400ff9f2
commit adb3bc2577
4 changed files with 16 additions and 11 deletions

View File

@@ -8,6 +8,7 @@
- Commands: accept /models as an alias for /model. - Commands: accept /models as an alias for /model.
- Models/Auth: show per-agent auth candidates in `/model status`, and add `clawdbot models auth order {get,set,clear}` (per-agent auth rotation overrides). — thanks @steipete - Models/Auth: show per-agent auth candidates in `/model status`, and add `clawdbot models auth order {get,set,clear}` (per-agent auth rotation overrides). — thanks @steipete
- Debugging: add raw model stream logging flags and document gateway watch mode. - Debugging: add raw model stream logging flags and document gateway watch mode.
- Gateway: decode dns-sd escaped UTF-8 in discovery output and show scan progress immediately. — thanks @steipete
- Agent: add claude-cli/opus-4.5 runner via Claude CLI with resume support (tools disabled). - Agent: add claude-cli/opus-4.5 runner via Claude CLI with resume support (tools disabled).
- CLI: move `clawdbot message` to subcommands (`message send|poll|…`), fold Discord/Slack/Telegram/WhatsApp tools into `message`, and require `--provider` unless only one provider is configured. - CLI: move `clawdbot message` to subcommands (`message send|poll|…`), fold Discord/Slack/Telegram/WhatsApp tools into `message`, and require `--provider` unless only one provider is configured.
- CLI: improve `logs` output (pretty/plain/JSONL), add gateway unreachable hint, and document logging. - CLI: improve `logs` output (pretty/plain/JSONL), add gateway unreachable hint, and document logging.
@@ -93,7 +94,7 @@
- Gateway/Discovery: include `gatewayPort`/`sshPort`/`cliPath` in wide-area Bonjour records, and add a tailnet DNS fallback for `gateway discover` when split DNS isnt configured. — thanks @steipete - Gateway/Discovery: include `gatewayPort`/`sshPort`/`cliPath` in wide-area Bonjour records, and add a tailnet DNS fallback for `gateway discover` when split DNS isnt configured. — thanks @steipete
- CLI: add global `--no-color` (and respect `NO_COLOR=1`) to disable ANSI output. — thanks @steipete - CLI: add global `--no-color` (and respect `NO_COLOR=1`) to disable ANSI output. — thanks @steipete
- CLI: centralize lobster palette + apply it to onboarding/config prompts. — thanks @steipete - CLI: centralize lobster palette + apply it to onboarding/config prompts. — thanks @steipete
- Gateway/CLI: add `clawdbot gateway --dev/--reset` to auto-create a dev config/workspace with a robot identity (no BOOTSTRAP.md). — thanks @steipete - Gateway/CLI: add `clawdbot gateway --dev/--reset` to auto-create a dev config/workspace with a robot identity (no BOOTSTRAP.md), and reset wipes config/creds/sessions/workspace. — thanks @steipete
- Config: fix Minimax hosted onboarding to write `agents.defaults` and allow `msteams` as a heartbeat target. — thanks @steipete - Config: fix Minimax hosted onboarding to write `agents.defaults` and allow `msteams` as a heartbeat target. — thanks @steipete
## 2026.1.8 ## 2026.1.8

View File

@@ -40,7 +40,7 @@ Notes:
- `--tailscale <off|serve|funnel>`: expose the Gateway via Tailscale. - `--tailscale <off|serve|funnel>`: expose the Gateway via Tailscale.
- `--tailscale-reset-on-exit`: reset Tailscale serve/funnel config on shutdown. - `--tailscale-reset-on-exit`: reset Tailscale serve/funnel config on shutdown.
- `--dev`: create a dev config + workspace if missing (skips BOOTSTRAP.md). - `--dev`: create a dev config + workspace if missing (skips BOOTSTRAP.md).
- `--reset`: recreate the dev config (requires `--dev`). - `--reset`: reset dev config + credentials + sessions + workspace (requires `--dev`).
- `--force`: kill any existing listener on the selected port before starting. - `--force`: kill any existing listener on the selected port before starting.
- `--verbose`: verbose logs. - `--verbose`: verbose logs.
- `--claude-cli-logs`: only show claude-cli logs in the console (and enable its stdout/stderr). - `--claude-cli-logs`: only show claude-cli logs in the console (and enable its stdout/stderr).

View File

@@ -411,7 +411,7 @@ Options:
- `--tailscale-reset-on-exit` - `--tailscale-reset-on-exit`
- `--allow-unconfigured` - `--allow-unconfigured`
- `--dev` - `--dev`
- `--reset` - `--reset` (reset dev config + credentials + sessions + workspace)
- `--force` (kill existing listener on port) - `--force` (kill existing listener on port)
- `--verbose` - `--verbose`
- `--ws-log <auto|full|compact>` - `--ws-log <auto|full|compact>`

View File

@@ -5,7 +5,7 @@ import path from "node:path";
import type { Command } from "commander"; import type { Command } from "commander";
import { resolveDefaultAgentWorkspaceDir } from "../agents/workspace.js"; import { resolveDefaultAgentWorkspaceDir } from "../agents/workspace.js";
import { gatewayStatusCommand } from "../commands/gateway-status.js"; import { gatewayStatusCommand } from "../commands/gateway-status.js";
import { moveToTrash } from "../commands/onboard-helpers.js"; import { handleReset } from "../commands/onboard-helpers.js";
import { import {
CONFIG_PATH_CLAWDBOT, CONFIG_PATH_CLAWDBOT,
type GatewayAuthMode, type GatewayAuthMode,
@@ -165,15 +165,14 @@ async function ensureDevWorkspace(dir: string) {
} }
async function ensureDevGatewayConfig(opts: { reset?: boolean }) { async function ensureDevGatewayConfig(opts: { reset?: boolean }) {
const configExists = fs.existsSync(CONFIG_PATH_CLAWDBOT); const workspace = resolveDevWorkspaceDir();
if (opts.reset && configExists) { if (opts.reset) {
await moveToTrash(CONFIG_PATH_CLAWDBOT, defaultRuntime); await handleReset("full", workspace, defaultRuntime);
} }
const shouldWrite = opts.reset || !configExists; const configExists = fs.existsSync(CONFIG_PATH_CLAWDBOT);
if (!shouldWrite) return; if (!opts.reset && configExists) return;
const workspace = resolveDevWorkspaceDir();
await writeConfigFile({ await writeConfigFile({
gateway: { gateway: {
mode: "local", mode: "local",
@@ -814,7 +813,11 @@ function addGatewayRunCommand(
"Create a dev config + workspace if missing (no BOOTSTRAP.md)", "Create a dev config + workspace if missing (no BOOTSTRAP.md)",
false, false,
) )
.option("--reset", "Recreate dev config (requires --dev)", false) .option(
"--reset",
"Reset dev config + credentials + sessions + workspace (requires --dev)",
false,
)
.option( .option(
"--force", "--force",
"Kill any existing listener on the target port before starting", "Kill any existing listener on the target port before starting",
@@ -986,6 +989,7 @@ export function registerGatewayCli(program: Command) {
label: "Scanning for gateways…", label: "Scanning for gateways…",
indeterminate: true, indeterminate: true,
enabled: opts.json !== true, enabled: opts.json !== true,
delayMs: 0,
}, },
async () => await discoverGatewayBeacons({ timeoutMs }), async () => await discoverGatewayBeacons({ timeoutMs }),
); );