From 1c748f1f2b16396ffd5fa60831f1d787dd5da228 Mon Sep 17 00:00:00 2001 From: gavrielc Date: Tue, 21 Apr 2026 22:18:08 +0300 Subject: [PATCH] refactor(setup): drop timezone step from setup:auto chain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The timezone step blocked the scripted flow on headless servers where the resolved TZ was UTC (interactive /setup confirms, setup:auto had to bail). Drop it from the chain — host TZ defaults to whatever the OS reports. Users who need an explicit override run the step on demand: `pnpm exec tsx setup/index.ts --step timezone -- --tz `. Co-Authored-By: Claude Opus 4.7 (1M context) --- nanoclaw.sh | 5 ++--- setup/auto.ts | 19 +++++-------------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/nanoclaw.sh b/nanoclaw.sh index 6a23558a3..2a98f9853 100755 --- a/nanoclaw.sh +++ b/nanoclaw.sh @@ -3,14 +3,13 @@ # NanoClaw — scripted end-to-end install. # # Runs `bash setup.sh` (bootstrap: Node check, pnpm install, native module -# verify), then `pnpm run setup:auto` (environment → timezone → container → -# onecli → auth → mounts → service → verify). +# verify), then `pnpm run setup:auto` (environment → container → onecli → +# auth → mounts → service → cli-agent → verify). # # Everything that can be scripted runs unattended; the one interactive pause # is the auth step (browser sign-in or paste token/API key). # # Config via env — passed through unchanged: -# NANOCLAW_TZ IANA zone override # NANOCLAW_SKIP comma-separated setup:auto step names to skip # SECRET_NAME OneCLI secret name (default: Anthropic) # HOST_PATTERN OneCLI host pattern (default: api.anthropic.com) diff --git a/setup/auto.ts b/setup/auto.ts index 8ef87d804..3945d8274 100644 --- a/setup/auto.ts +++ b/setup/auto.ts @@ -7,13 +7,16 @@ * module check). This driver picks up from there. * * Config via env: - * NANOCLAW_TZ IANA zone override (skip autodetect) * NANOCLAW_DISPLAY_NAME operator name for the CLI agent (default: $USER) * NANOCLAW_AGENT_NAME agent persona name (default: display name) * NANOCLAW_SKIP comma-separated step names to skip - * (environment|timezone|container|onecli|auth| + * (environment|container|onecli|auth| * mounts|service|cli-agent|verify) * + * Timezone is not configured here — it defaults to the host system's TZ. + * Run `pnpm exec tsx setup/index.ts --step timezone -- --tz ` later + * if autodetect is wrong (e.g. headless server with TZ=UTC). + * * Anthropic credential registration runs via setup/register-claude-token.sh * (the only step that truly requires human input — browser sign-in or a * pasted token/key). Channel auth and `/manage-channels` remain separate @@ -132,24 +135,12 @@ async function main(): Promise { .map((s) => s.trim()) .filter(Boolean), ); - const tz = process.env.NANOCLAW_TZ; if (!skip.has('environment')) { const env = await runStep('environment'); if (!env.ok) fail('environment check failed'); } - if (!skip.has('timezone')) { - const res = await runStep('timezone', tz ? ['--tz', tz] : []); - if (res.fields.NEEDS_USER_INPUT === 'true') { - fail( - 'Timezone could not be autodetected.', - 'Set NANOCLAW_TZ to an IANA zone (e.g. NANOCLAW_TZ=America/New_York).', - ); - } - if (!res.ok) fail('timezone step failed'); - } - if (!skip.has('container')) { const res = await runStep('container'); if (!res.ok) {