Spaces:
Runtime error
Runtime error
Commit History
-
feat: auto-fill gateway token via URL redirect
tao-shen +1: Claude Opus 4.6Add token-redirect.cjs preload script that redirects "/" to "/?token=GATEWAY_TOKEN". The Control UI reads token from URL params and auto-fills it, so users don't need to manually enter the token. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>f3b479d -
fix: remove tao-shen/HuggingClaw-data refs to prevent unwanted linked spaces
tao-shen +1: Claude Opus 4.6HF scans README content to detect dataset references, causing duplicated Spaces to appear as "linked" to the original dataset. Replace all specific dataset repo names with generic examples and remove huggingface-dataset tag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>4da041a -
test: revert dataset derivation to observe linked spaces behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>b0f06a1 -
fix: restore OPENCLAW_DATASET_REPO priority over SPACE_ID derivation
Revert to original logic: user-specified OPENCLAW_DATASET_REPO takes priority. SPACE_ID auto-derivation is only used as fallback. This restores the linked-spaces association on the dataset page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>a902a81 -
fix: always derive dataset from SPACE_ID, ignore OPENCLAW_DATASET_REPO on HF
When running on HF Spaces (SPACE_ID is set), always use {SPACE_ID}-data as the dataset name. This prevents duplicated Spaces from inheriting the original's dataset via copied secrets. OPENCLAW_DATASET_REPO is only used for local Docker without SPACE_ID. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>5d56a07 -
fix: revert to token auth with default "huggingclaw"
auth.mode=none crashes on non-loopback bind. Revert to token mode with GATEWAY_TOKEN env var (default: huggingclaw). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>0d8eee8 -
feat: default to no-auth mode — Control UI connects instantly
Use gateway auth.mode="none" by default so the Control UI auto-connects without any token. Users who want access control can set GATEWAY_TOKEN env var to require a token. Also restore AUTO_CREATE_DATASET check for dataset creation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ad7936d -
fix: auto-derive dataset name from SPACE_ID, not HF_TOKEN username
Always use {SPACE_ID}-data (e.g. tao-shen/HuggingClaw-data) so duplicated Spaces automatically get their own dataset repo. No longer requires AUTO_CREATE_DATASET for name derivation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>8f44b56 -
feat: add GATEWAY_TOKEN env var (default: huggingclaw)
Users can override the gateway token via the GATEWAY_TOKEN environment variable in HF Spaces secrets. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>b38f1ec -
fix: restore dangerouslyDisableDeviceAuth for HF Spaces
HF Spaces has no CLI access, so device pairing approval is impossible. Must keep dangerouslyDisableDeviceAuth=true; access control relies on the gateway token instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>f9ba624 -
config: set hardcoded gateway token "huggingclaw" as default
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>08ec8c2 -
remove: drop gateway password/token auth entirely — device auth only
Access is now controlled purely by device pairing. Only browsers paired via the owner's HuggingFace profile page can connect. Removed OPENCLAW_PASSWORD from config, sync_hf.py, and README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>483945f -
security: enforce device auth — only paired browsers can access Control UI
Remove dangerouslyDisableDeviceAuth: true so that device pairing is enforced. Users must pair via the owner's HF profile page; incognito or third-party browsers will be denied access. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>cad8196 -
feat: switch auth from password to token mode (persists in browser)
Token auth stores the credential in localStorage so user only needs to enter it once. Password auth requires re-entry on every page refresh. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>cb4193b -
fix: always force dmPolicy=open + allowFrom=["*"] on every startup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>0e39bfb -
fix: add allowFrom=["*"] required by dmPolicy=open
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>f214515 -
fix: set Telegram dmPolicy=open and configWrites=true for HF Spaces
Personal bot — no need for strict pairing. Fixes "not authorized" error when user sends commands after pairing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>3371c9c -
feat: telegram-proxy.cjs intercepts fetch() to bypass HF DNS block
HF Spaces blocks DNS for api.telegram.org. grammY uses Node 22's built-in fetch (undici) which bypasses dns.lookup monkey-patching. New approach: 1. sync_hf.py probes Telegram API endpoints at startup (no bot token needed) 2. If official API unreachable, selects first working mirror 3. Sets TELEGRAM_API_ROOT env var for the Node process 4. telegram-proxy.cjs (loaded via --require) intercepts globalThis.fetch() and rewrites api.telegram.org URLs to the working mirror Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>95579c1 -
fix: validate Telegram bot token format before probe (skip junk tokens)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>4fb4a97 -
fix: revert auth to password mode, add Telegram API auto-probe, background DNS
1. Revert auth from token back to password (fixes token_mismatch on Control UI) 2. Add Telegram API base auto-probe: probes api.telegram.org, mirrors, and Cloudflare Pages proxy at startup; selects first working endpoint 3. Revert DNS resolution from blocking (141s delay) to background 4. Add TELEGRAM_BOT_TOKEN and TELEGRAM_API_BASE env vars to README Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>e01d625 -
fix: remove chmod /etc/hosts (read-only in build), run DNS sync before app
Removed chmod 666 /etc/hosts from Dockerfile (HF build filesystem is read-only). Changed DNS resolution from background to blocking so /tmp/dns-resolved.json and /etc/hosts entries are ready before OpenClaw starts — needed for undici/fetch which bypasses dns.lookup patching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ebf240b -
feat: switch auth from password to token for browser persistence
Token auth is persisted in the browser's localStorage by OpenClaw's Control UI, so users only need to enter it once. Password auth required re-entry on every page refresh. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ac5bf04 -
feat: derive dataset name from Space repo name to avoid conflicts
When AUTO_CREATE_DATASET=true, the auto-derived dataset name now uses the Space's repo name (from SPACE_ID) instead of a fixed "HuggingClaw". E.g. Space "tao-shen/MyBot" → dataset "tao-shen/MyBot-data". This prevents multiple duplicated Spaces from sharing the same dataset. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>760b46b -
fix: write DNS results to /etc/hosts for undici/fetch compatibility
Telegram's grammY library uses undici (Node 22 built-in fetch) which bypasses dns.lookup monkey-patching. Writing resolved IPs to /etc/hosts ensures all DNS clients (including undici) can reach api.telegram.org. Also chmod 666 /etc/hosts in Dockerfile so the node user can write to it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>dad02c1 -
fix: add Telegram domains to DNS-over-HTTPS pre-resolution
Telegram Bot API (api.telegram.org) was failing with network errors on HF Spaces due to DNS resolution issues. Added api.telegram.org to the DoH pre-resolve list alongside WhatsApp domains. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>12594f7 -
fix: remove leftover _ensure_telegram_credentials() call causing RUNTIME_ERROR
The method was removed earlier but a call at line 206 remained, causing AttributeError on startup when dataset has existing data. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>e78b82b -
fix: patch config when dataset exists but is empty
When the dataset repo is newly created and has no .openclaw/ folder, _patch_config() was not called, leaving password/model placeholders unresolved. Now properly patches config in this code path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>e516099 -
feat: auto-derive dataset repo name from HF_TOKEN when AUTO_CREATE_DATASET=true
When AUTO_CREATE_DATASET=true and OPENCLAW_DATASET_REPO is not set, HuggingClaw now uses HfApi.whoami() to get the username from HF_TOKEN and derives the repo name as "username/HuggingClaw-data". - Add auto-derive logic in sync_hf.py - Update README with Data Persistence section (Manual vs Auto mode) - Update .env.example with detailed documentation for both modes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>092c6d8 -
security: change AUTO_CREATE_DATASET default to false
Default is now false for security — users must create the Dataset repo manually or explicitly set AUTO_CREATE_DATASET=true. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>11d18c7 -
docs: add detailed env var table with examples, change sync interval to 60s
- Add Example column to secrets table with sample values - Add Environment Variables section with AUTO_CREATE_DATASET, SYNC_INTERVAL, NODE_MEMORY_LIMIT, TZ — detailed descriptions and defaults - Expand Configuration section with categorized OpenClaw env var list - Change SYNC_INTERVAL default from 120 to 60 seconds Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d61c242 -
chore: replace gpt-4o-mini with gpt-5-nano everywhere
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>a477e02 -
chore: default model → openai/gpt-oss-20b:free (OpenAI open-source)
Apache 2.0 licensed, 21B MoE (3.6B active), free on OpenRouter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>3606260 -
chore: default repo → HuggingClaw-data, default model → DeepSeek V3 (free)
- Example dataset repo: your-name/HuggingClaw-data - Default model: openrouter/deepseek/deepseek-chat:free (open-source) - DeepSeek V3 listed first in OpenRouter provider models Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>7317cd7 -
fix: IndentationError in sync_hf.py line 161
Fix extra indent on `return` inside load_from_repo() that caused RUNTIME_ERROR on HF Space startup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>fcd4893 -
Remove Telegram env vars, clean up README and .env.example
- Remove TELEGRAM_BOT_TOKEN/BOT_NAME/ALLOW_USER from sync_hf.py (can be configured in Control UI instead) - Remove duplicate Configuration table and Local Development section - Add OpenClaw full env var support statement in README and .env.example - Remove CSP headers claim from Security section Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>63ca3f6
-
feat: add AUTO_CREATE_DATASET env var to control dataset auto-creation
tao-shen +1: Claude Opus 4.6When set to false, HuggingClaw will not auto-create the dataset repo and will prompt the user to create it manually on HuggingFace. Default: true (existing behavior preserved). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>553c78c -
fix: only set NODE_MEMORY_LIMIT when explicitly configured
tao-shen +1: Claude Opus 4.6The default 512MB limit was too restrictive for OpenClaw startup. Now NODE_MEMORY_LIMIT only applies if the env var is explicitly set. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>fa6d97f -
feat: professional README, .env.example, architecture diagram
tao-shen +1: Claude Opus 4.6- New .env.example with documented environment variables (required/recommended/optional, with descriptions) - Architecture SVG diagram as project logo - Professional README with quick start, config reference, data flow - Dynamic SPACE_HOST for allowedOrigins (auto-detected by HF runtime) - OPENCLAW_DEFAULT_MODEL env var for configurable default model - NODE_MEMORY_LIMIT env var for tuning Node.js heap size - Remove hardcoded tao-shen-huggingclaw.hf.space from config - Clean up Telegram env vars (prefer Control UI configuration) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>25ff55e -
fix: ensure password auth is set in all startup paths
tao-shen +1: Claude Opus 4.6_patch_config() was only called after dataset restore, not on fresh installs or when persistence is disabled. This caused the literal placeholder __OPENCLAW_PASSWORD__ to be used as the actual password. Now _patch_config() is called in all code paths, and _ensure_default_config() also replaces the password placeholder. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>bce2d13 -
feat: switch to password auth + project README
tao-shen +1: Claude Opus 4.6- Auth: password mode (default: "huggingclaw", override via OPENCLAW_PASSWORD secret) - Removed: inject-token.sh, global-token-fallback patch (no longer needed) - CSP: reverted script-src to 'self' (no inline scripts) - README: project intro, quick start, architecture, security docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>201eb72 -
fix: use global variable for token injection (works in incognito iframe)
tao-shen +1: Claude Opus 4.6When HF Spaces embeds the Control UI in an iframe, Chrome incognito blocks third-party localStorage access. The token injection via localStorage silently fails, leaving the UI unable to authenticate. Changes: - Add source patch: storage.ts reads window.__OPENCLAW_AUTH_TOKEN__ as fallback when localStorage token is empty/unavailable - inject-token.sh: set window.__OPENCLAW_AUTH_TOKEN__ global variable in addition to localStorage (global always works) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>7b4c5b7 -
fix: always overwrite token in localStorage (not only when empty)
tao-shen3925157 -
fix: set OPENCLAW_VERSION from package.json for correct version display
tao-shene685ad2 -
fix: add dangerouslyDisableDeviceAuth for remote WS connections
tao-shen8d47c2c -
fix: use fixed auth token + python-based token injection + restore entrypoint inject
tao-shencb0513d -
fix: disable auth (mode:none) + patch CSP frame-ancestors for HF iframe embedding
tao-shen331869d -
fix: use auth:{} instead of auth:false (object required)
tao-shenc8f0255 -
fix: disable gateway auth (HF provides access control), remove token inject hack
tao-shenb4b523f -
fix: move inject-token to runtime entrypoint (build-time injection ignored by OpenClaw)
tao-shen7aeba6e -
fix: remove empty apiKey (config invalid), add HF origins to CSP allowedOrigins
tao-shene6c8a11