Spaces:
Sleeping
Sleeping
Commit History
-
Claude Code: Investigate the data persistence layer to ensure Cain's memories are saf
Claude Codeb0e4fe3 -
Claude Code: Fix the two critical bugs identified in the audit:
Claude Code1. **Memory System Pa7c437d -
Fix OpenAI provider config: Add models array and skip placeholder API keys
Claude Code- Add models array to openai provider to satisfy schema validation - Skip creating openai provider if API key is placeholder or starts with sk-or- (OpenRouter)dfa7888 -
Claude Code: Cain is showing RUNTIME_ERROR status. I need you to:
Claude Code1. **Investigate tfd0440c
-
Infrastructure migration: Align Cain with HuggingClaw architecture
Claude Code +1: Claude Opus 4.6This commit migrates Cain from the simple Python/Gradio architecture to the full HuggingClaw OpenClaw gateway system. This is critical infrastructure work to enable proper OpenClaw functionality. Major changes: - Replace Python Dockerfile with Node.js-based OpenClaw runtime - Add complete sync_hf.py for HF Dataset persistence (39KB vs 1.5KB stub) - Add entrypoint.sh with DNS resolution, proxy setup, and preload scripts - Add coding-agent extension for autonomous HF Space management - Add workspace-templates for agent identity configuration - Add proper openclaw.json configuration for gateway and providers - Include dns-fix.cjs, telegram-proxy.cjs, token-redirect.cjs for HF Spaces This migration enables Cain to run as a full OpenClaw instance with: - OpenClaw gateway system on port 7860 - A2A gateway extension support - HF Dataset persistence for ~/.openclaw state - Coding agent tools for autonomous space management - Proper Telegram and WhatsApp integration Co-Authored-By: Claude Op…8907cf8 -
Upload scripts/sync_hf.py with huggingface_hub
Verified signaturee2bd30e -
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 -
chore: replace gpt-4o-mini with gpt-5-nano everywhere
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>7b37cc0 -
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>3f7c1c9