Spaces:
Runtime error
Runtime error
Commit History
-
fix: stop overriding OpenClaw provider config — pass all env vars through
sync_hf.py was hardcoding a provider registry and overwriting models.providers on every startup, blocking OpenClaw's native env var support. Users setting NVIDIA_API_KEY or other provider keys got no effect because the code didn't know about them. Now HuggingClaw acts as a transparent deployment layer: - Removed PROVIDER_REGISTRY and all per-provider if/else blocks - Removed redundant env var pass-through (os.environ.copy() already includes everything) - Only clean up stale providers from dataset backup (keys no longer in environment) - Let OpenClaw handle provider discovery from env vars natively Fixes #2 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>29370f7
-
refactor: separate orchestrator from frontend — RUN_ORCHESTRATOR env var
conversation-loop.py is now launched by RUN_ORCHESTRATOR=1 (not OFFICE_MODE). - Home Space: OFFICE_MODE=1 (frontend only, no orchestrator) - God Space: RUN_ORCHESTRATOR=1 (runs conversation-loop.py) This means Home no longer self-modifies — God Space pushes to Home from the outside, which should not trigger abuse detection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>6a122fb
-
feat: migrate all Claude Code invocations to ACP protocol via acpx
All Claude Code calls now go through ACP (Agent Client Protocol) using acpx as the backend, replacing direct CLI invocations. This includes conversation-loop.py, coding-agent extension, and infrastructure config. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>9d3acbc
-
fix: use --user flag for pip install (non-root container)
Container runs as node user, not root. pip install without --user can't write to system site-packages. Also log pip result for debugging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>5c981dd -
fix: install requests at runtime before launching conversation-loop
Dockerfile layer cache may not pick up the new dependency. Install requests via pip at runtime as a fallback to guarantee availability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>f532fc8 -
feat: run conversation-loop on Home Space cloud + CONFIG_ERROR fixes
- sync_hf.py: auto-launch conversation-loop.py on OFFICE_MODE=1 (Home Space) with 60s startup delay, auto-restart on crash, graceful shutdown - conversation-loop.py: add claude_code action for Claude Code CLI integration - conversation-loop.py: fix CONFIG_ERROR not clearing write dedup, cooldown, and state transitions (was only handling RUNTIME_ERROR/BUILD_ERROR) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>acab3db -
feat: integrate Claude Code as coding-agent backend (z.ai/Zhipu GLM)
Replace custom HF API tools with Claude Code CLI sub-agent. The extension now spawns `claude -p` with ANTHROPIC_BASE_URL=api.z.ai to autonomously clone, analyze, fix, and push code changes to HF Spaces. - Dockerfile: install @anthropic-ai/claude-code globally - index.ts: 3 tools (claude_code, hf_space_status, hf_restart_space) - sync_hf.py: add ZAI_API_KEY env var passthrough - plugin.json: add zaiApiKey config field, bump to v2.0.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d653b4e -
feat: add coding-agent OpenClaw extension with 8 HF Space tools
New extension at extensions/coding-agent/ that registers tools directly into OpenClaw's agent runtime, giving Adam & Eve real coding capabilities: Tools registered: - hf_read_file: Read files from Space/Dataset - hf_write_file: Write files with auto Python syntax validation - hf_delete_file: Delete files from repos - hf_list_files: List all files in a repo - hf_space_status: Check Space health/stage - hf_restart_space: Restart the target Space - hf_search_code: Grep-like regex search across code files - python_syntax_check: Validate Python syntax before committing Key features: - Python .py files are syntax-checked BEFORE writing (prevents the blind-write-then-wait-for-build-failure loop) - Configured via CODING_AGENT_TARGET_SPACE/DATASET env vars - Follows A2A gateway extension pattern (registerTool API) Also adds: - workspace-templates/ with IDENTITY.md and SOUL.md for coding agent behavior (deployed on first boot if workspace files are default) - Dockerfile updated to COPY ex…b44dfca -
fix: delete devices dir to force fresh auto-pair, skip error replies
- Delete ~/.openclaw/devices/ on startup to force fresh auto-pair with operator.write/read scopes (fixes A2A dispatch error) - Conversation loop now checks task state=failed and skips errors - Force rebuild (v3.9) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1e3d376 -
fix: patch paired device scopes for OpenClaw 2026.2.19+ compatibility
- Add operator.write and operator.read to paired devices on startup - Fixes 'missing scope: operator.write' A2A dispatch error - Known OpenClaw bug: auto-pair doesn't grant new scopes (issue #23006) - Force rebuild (v3.8) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d865e6e -
fix: clean up invalid auth.defaultScope from persisted config
- Remove auth.defaultScope and gateway.auth.scope on startup - These keys were synced to dataset backup and crash OpenClaw - Force rebuild (v3.7) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>b17d83b -
fix: revert invalid OpenClaw config keys causing RUNTIME_ERROR
- Remove auth.defaultScope and gateway.auth.scope (unrecognized by OpenClaw) - Remove security.scope from A2A gateway config - These caused "Config invalid" crash on all Spaces - Force rebuild (v3.6) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>9da0d8a -
fix: add operator scope to gateway auth and A2A security config
- Add scope: operator to gateway.auth to fix 'missing scope: operator.write' - Add scope: operator to A2A gateway security.scope - Add auth.defaultScope: operator for fallback - Force Docker rebuild (v3.5) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ff25d4f -
fix: reduce verbose logging to prevent HF Spaces log viewer crashes
- Suppress huggingface_hub progress bars and verbose download logs - Remove per-file upload listing (just show summary count) - Remove per-file dataset verification listing - Reduce file tree debug to count only - Filter OpenClaw process output: skip download/progress noise, forward key lines only - All output still goes to log file for debugging2f79e09
-
Upload scripts/sync_hf.py with huggingface_hub
Verified signature2778fda -
Upload scripts/sync_hf.py with huggingface_hub
Verified signaturef18a4b6 -
feat: add A2A gateway support (activated by A2A_PEERS env var)
- Add openclaw-a2a-gateway extension to Dockerfile - Add a2a-proxy.cjs for port routing (7860 proxy → 7861 OpenClaw, 18800 A2A) - Modify sync_hf.py: port 7861, A2A config only when A2A_PEERS is set - No impact when A2A_PEERS is not set (proxy transparently forwards)8ee58f9 -
Revert "feat: add pixel animation homepage with Express proxy layer"
This reverts commit 6cf74294015c25e76d77e66dfb929c3fb8ed5a2d.86b44f8
-
feat: add pixel animation homepage with Express proxy layer
- Add Star-Office-UI pixel animation as the default homepage (/) - Create Express proxy (proxy.cjs) on port 7860, OpenClaw moves to 7861 - Admin panel accessible via /admin with auto token injection - State bridge maps OpenClaw status to animation states - Frontend assets cloned from Star-Office-UI during Docker build - Add A2A gateway plugin support in Dockerfile and config - Prepare multi-agent infrastructure (peer polling, guest rendering) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>6cf7429
-
fix: switch Zhipu provider to Anthropic-compatible endpoint
The OpenAI-compatible endpoint (paas/v4) returns "insufficient balance" but the Anthropic-compatible endpoint (open.bigmodel.cn/api/anthropic) works. Updated api type to "anthropic-messages" and new API key set. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>3227ad9 -
fix: update Zhipu AI model IDs to current API lineup
Replace deprecated glm-4-flash/plus/long with actual available models: glm-4.5-air, glm-4.5, glm-4.6, glm-4.7, glm-5 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ae76fba -
fix: add required models array to zhipu provider config
df4b021 -
fix: rebuild providers from scratch on each startup
Prevents stale providers (e.g. openrouter with deleted key) from persisting via dataset backup. Also removes hardcoded model list from zhipu provider — let OpenClaw discover models dynamically. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>e3478dc -
feat: add Zhipu AI (z.ai) as a native LLM provider
- Read ZHIPU_API_KEY from environment - Configure Zhipu provider with GLM-4 models (flash/plus/long) - Auto-select glm-4-flash as default when Zhipu is the only provider - Pass ZHIPU_API_KEY through to OpenClaw process Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>306fbc6
-
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>750878a -
test: revert dataset derivation to observe linked spaces behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>8c4d233 -
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>7728a08 -
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>419ff91 -
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>5a096f1 -
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>3f16497 -
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>8f454de -
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>99d42f4 -
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>d2e3735 -
config: set hardcoded gateway token "huggingclaw" as default
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>a18f6b8 -
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>8814392 -
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>7a3a430 -
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>342dacc -
fix: always force dmPolicy=open + allowFrom=["*"] on every startup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1be188a -
fix: add allowFrom=["*"] required by dmPolicy=open
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>3c50513 -
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>27fc3a4 -
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>d88aa6c -
fix: validate Telegram bot token format before probe (skip junk tokens)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>af9334d -
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>55bff24 -
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>b1888ca -
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>556360b -
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>99e2a15 -
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>cf93629 -
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>3ff709d -
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>66d172d -
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>082f8f4