OverbyteLabs CI commited on
Commit
1f287c7
Β·
1 Parent(s): 61a6cb2

deploy: 2026-05-18T21:06:46Z (5de82dd636d2eaeff18a191676b9291da12d3708)

Browse files
Files changed (6) hide show
  1. .gitattributes +0 -35
  2. Dockerfile +63 -0
  3. README.md +31 -10
  4. entrypoint.sh +99 -0
  5. tinyproxy-allowlist +47 -0
  6. tinyproxy.conf +30 -0
.gitattributes DELETED
@@ -1,35 +0,0 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Dockerfile ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1.7
2
+ #
3
+ # ZeroClaw β€” Hugging Face Spaces build
4
+ #
5
+ # Differences from the Proxmox/LXC build:
6
+ # - No Ollama service (no GPU on HF free tier) β†’ OpenRouter LLM backend
7
+ # - Port 7860 (HF Spaces default proxy port)
8
+ # - Runs as root (HF Spaces Docker SDK expectation)
9
+ # - config.toml is generated at runtime from environment variables
10
+ # by entrypoint.sh β€” no secrets baked into the image
11
+
12
+ FROM ghcr.io/zeroclaw-labs/zeroclaw:latest AS zeroclaw-base
13
+
14
+ FROM debian:trixie-slim
15
+
16
+ # Runtime dependencies + tinyproxy (outbound allowlist proxy)
17
+ RUN apt-get update && apt-get install -y \
18
+ ca-certificates \
19
+ curl \
20
+ python3 \
21
+ python3-venv \
22
+ tinyproxy \
23
+ && rm -rf /var/lib/apt/lists/*
24
+
25
+ # Node.js 22 LTS β€” needed by npx MCP servers (trello, hostinger)
26
+ RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
27
+ && apt-get install -y nodejs \
28
+ && rm -rf /var/lib/apt/lists/*
29
+
30
+ # Copy ZeroClaw binary and pre-built web UI
31
+ COPY --from=zeroclaw-base /usr/local/bin/zeroclaw /usr/local/bin/zeroclaw
32
+ COPY --from=zeroclaw-base /zeroclaw-data /zeroclaw-data
33
+
34
+ # GitHub MCP server
35
+ RUN curl -fsSL https://github.com/github/github-mcp-server/releases/download/v1.0.1/github-mcp-server_Linux_x86_64.tar.gz \
36
+ | tar -xz -C /usr/local/bin github-mcp-server \
37
+ && chmod +x /usr/local/bin/github-mcp-server
38
+
39
+ # Pre-warm npx cache for MCP servers so first invocation doesn't hit the network
40
+ # (HF Spaces has outbound internet; this just bakes the download into the layer)
41
+ RUN npx --yes mcp-server-trello --help 2>/dev/null || true
42
+ RUN npx --yes hostinger-api-mcp --help 2>/dev/null || true
43
+
44
+ # Entrypoint + tinyproxy config
45
+ COPY entrypoint.sh /entrypoint.sh
46
+ COPY tinyproxy.conf /etc/tinyproxy/tinyproxy.conf
47
+ COPY tinyproxy-allowlist /etc/tinyproxy/allowlist
48
+ RUN chmod +x /entrypoint.sh
49
+
50
+ ENV LANG=C.UTF-8
51
+ ENV ZEROCLAW_WORKSPACE=/zeroclaw-data/workspace
52
+ ENV HOME=/zeroclaw-data
53
+ # HF Spaces routes external traffic β†’ container port 7860
54
+ ENV ZEROCLAW_GATEWAY_PORT=7860
55
+
56
+ WORKDIR /zeroclaw-data
57
+
58
+ EXPOSE 7860
59
+
60
+ HEALTHCHECK --interval=60s --timeout=10s --retries=3 --start-period=20s \
61
+ CMD curl -sf http://localhost:7860/ || exit 1
62
+
63
+ ENTRYPOINT ["/entrypoint.sh"]
README.md CHANGED
@@ -1,10 +1,31 @@
1
- ---
2
- title: Zeroclaw
3
- emoji: πŸ‘
4
- colorFrom: pink
5
- colorTo: yellow
6
- sdk: docker
7
- pinned: false
8
- ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: ZeroClaw
3
+ emoji: 🦞
4
+ colorFrom: purple
5
+ colorTo: blue
6
+ sdk: docker
7
+ app_port: 7860
8
+ pinned: false
9
+ short_description: OverbyteLabs AI operations agent
10
+ ---
11
+
12
+ # ZeroClaw β€” OverbyteLabs AI Agent
13
+
14
+ Private AI coding and operations agent for OverbyteLabs.
15
+ Not intended for public use β€” access is controlled by the owner.
16
+
17
+ ## Required Secrets (set in Space Settings β†’ Variables and secrets)
18
+
19
+ | Secret | Description |
20
+ |---|---|
21
+ | `OPENROUTER_API_KEY` | OpenRouter API key β€” LLM backend |
22
+ | `GH_TOKEN` | GitHub PAT β€” for the GitHub MCP server |
23
+ | `TRELLO_API_KEY` | Trello API key |
24
+ | `TRELLO_TOKEN` | Trello user token |
25
+ | `HOSTINGER_API_TOKEN` | Hostinger API token |
26
+
27
+ ## Optional
28
+
29
+ | Variable | Default | Description |
30
+ |---|---|---|
31
+ | `ZEROCLAW_MODEL` | `meta-llama/llama-3.3-70b-instruct:free` | OpenRouter model ID |
entrypoint.sh ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # entrypoint.sh β€” start outbound proxy, write config, launch ZeroClaw
3
+ set -euo pipefail
4
+
5
+ # ── Defaults ──────────────────────────────────────────────────────────────────
6
+ ZEROCLAW_MODEL="${ZEROCLAW_MODEL:-meta-llama/llama-3.3-70b-instruct:free}"
7
+ OPENROUTER_API_KEY="${OPENROUTER_API_KEY:-}"
8
+ GH_TOKEN="${GH_TOKEN:-}"
9
+ TRELLO_API_KEY="${TRELLO_API_KEY:-}"
10
+ TRELLO_TOKEN="${TRELLO_TOKEN:-}"
11
+ HOSTINGER_API_TOKEN="${HOSTINGER_API_TOKEN:-}"
12
+
13
+ # ── 1. Start tinyproxy (outbound allowlist) ───────────────────────────────────
14
+ # tinyproxy.conf listens on 127.0.0.1:8888 with FilterDefaultDeny Yes.
15
+ # Only the hosts in /etc/tinyproxy/allowlist are reachable outbound.
16
+ tinyproxy -c /etc/tinyproxy/tinyproxy.conf
17
+ echo "[entrypoint] tinyproxy started (allowlist-only outbound filter)"
18
+
19
+ # Point all HTTP clients at the local proxy
20
+ export HTTP_PROXY="http://127.0.0.1:8888"
21
+ export HTTPS_PROXY="http://127.0.0.1:8888"
22
+ export http_proxy="http://127.0.0.1:8888"
23
+ export https_proxy="http://127.0.0.1:8888"
24
+ # Local traffic must bypass the proxy
25
+ export NO_PROXY="localhost,127.0.0.1"
26
+ export no_proxy="localhost,127.0.0.1"
27
+
28
+ # ── 2. Directories ─────────────────────────────────────────────────────────────
29
+ mkdir -p /zeroclaw-data/.zeroclaw /zeroclaw-data/workspace
30
+
31
+ # ── 3. Validate LLM backend ──────────────────────────────────────────────────
32
+ if [ -z "$OPENROUTER_API_KEY" ]; then
33
+ echo "WARN: OPENROUTER_API_KEY is not set β€” LLM calls will fail." >&2
34
+ fi
35
+
36
+ # ── 4. Write config.toml ──────────────────────────────────────────────────────
37
+ cat > /zeroclaw-data/.zeroclaw/config.toml << TOML
38
+ # Generated at container startup β€” edit via HF Space secrets.
39
+
40
+ workspace_dir = "/zeroclaw-data/workspace"
41
+ config_path = "/zeroclaw-data/.zeroclaw/config.toml"
42
+
43
+ default_provider = "openrouter"
44
+ api_url = "https://openrouter.ai/api/v1"
45
+ api_key = "${OPENROUTER_API_KEY}"
46
+ default_model = "${ZEROCLAW_MODEL}"
47
+ default_temperature = 0.7
48
+
49
+ [gateway]
50
+ port = 7860
51
+ host = "0.0.0.0"
52
+ allow_public_bind = true
53
+ # require_pairing = true means the web UI shows a pairing prompt.
54
+ # Nobody can use ZeroClaw without the one-time PIN displayed in the logs.
55
+ require_pairing = true
56
+ web_dist_dir = "/zeroclaw-data/web/dist"
57
+
58
+ [autonomy]
59
+ level = "supervised"
60
+ auto_approve = [
61
+ "file_read", "file_write", "file_edit",
62
+ "memory_recall", "memory_store",
63
+ "web_search_tool", "web_fetch",
64
+ "calculator", "glob_search", "content_search",
65
+ "image_info", "weather", "git_operations",
66
+ ]
67
+
68
+ [mcp]
69
+ enabled = true
70
+ deferred_loading = true
71
+
72
+ [[mcp.servers]]
73
+ name = "github"
74
+ transport = "stdio"
75
+ command = "/usr/local/bin/github-mcp-server"
76
+ args = ["stdio", "--toolsets=all"]
77
+ env = { "GITHUB_PERSONAL_ACCESS_TOKEN" = "${GH_TOKEN}" }
78
+
79
+ [[mcp.servers]]
80
+ name = "trello"
81
+ transport = "stdio"
82
+ command = "npx"
83
+ args = ["-y", "mcp-server-trello"]
84
+ env = { "TRELLO_API_KEY" = "${TRELLO_API_KEY}", "TRELLO_TOKEN" = "${TRELLO_TOKEN}" }
85
+
86
+ [[mcp.servers]]
87
+ name = "hostinger"
88
+ transport = "stdio"
89
+ command = "npx"
90
+ args = ["-y", "hostinger-api-mcp"]
91
+ env = { "API_TOKEN" = "${HOSTINGER_API_TOKEN}" }
92
+ TOML
93
+
94
+ echo "[entrypoint] config.toml written"
95
+ echo "[entrypoint] model : ${ZEROCLAW_MODEL}"
96
+ echo "[entrypoint] port : 7860"
97
+ echo "[entrypoint] pairing required β€” check logs for PIN"
98
+
99
+ exec zeroclaw daemon
tinyproxy-allowlist ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # tinyproxy allowlist β€” hosts ZeroClaw is permitted to reach outbound
2
+ # FilterDefaultDeny Yes means everything NOT listed here is BLOCKED.
3
+ # Lines are ERE regex matched against the Host header / CONNECT target.
4
+
5
+ # ── LLM backends ──────────────────────────────────────────────────────────────
6
+ openrouter\.ai
7
+ integrate\.api\.nvidia\.com
8
+ api-inference\.huggingface\.co
9
+
10
+ # ── Supabase (ideas database) ─────────────────────────────────────────────────
11
+ rhuvqxpdxcrdplmxzsdv\.supabase\.co
12
+
13
+ # ── GitHub (MCP server + GraphQL API) ────────────────────────────────────────
14
+ api\.github\.com
15
+ objects\.githubusercontent\.com
16
+ github\.com
17
+
18
+ # ── Trello (MCP server) ───────────────────────────────────────────────────────
19
+ api\.trello\.com
20
+ trello\.com
21
+
22
+ # ── Hostinger (MCP server) ────────────────────────────────────────────────────
23
+ api\.hostinger\.com
24
+ www\.hostinger\.com
25
+
26
+ # ── Scraping targets ──────────────────────────────────────────────────────────
27
+ # Reddit
28
+ (www\.)?reddit\.com
29
+ old\.reddit\.com
30
+ # Hacker News
31
+ hn\.algolia\.com
32
+ news\.ycombinator\.com
33
+ # LinkedIn
34
+ (www\.)?linkedin\.com
35
+ api\.linkedin\.com
36
+ # Product Hunt
37
+ www\.producthunt\.com
38
+
39
+ # ── npm registry β€” needed by npx MCP server cold starts ──────────────────────
40
+ registry\.npmjs\.org
41
+ cdn\.jsdelivr\.net
42
+
43
+ # ── OS / TLS certificate infrastructure ──────────────────────────────────────
44
+ # (required for HTTPS to work at all)
45
+ ocsp\.digicert\.com
46
+ crl\.digicert\.com
47
+ ocsp\.pki\.goog
tinyproxy.conf ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # tinyproxy.conf β€” outbound allowlist for ZeroClaw HF Space
2
+ #
3
+ # Only connections to explicitly listed hosts are permitted.
4
+ # All other CONNECT/HTTP requests are denied (DenyAllHosts default).
5
+ #
6
+ # Applied by setting HTTP_PROXY=http://127.0.0.1:8888 in the environment.
7
+ # Processes that respect the proxy env vars (curl, reqwest, node fetch, Python
8
+ # requests) will be filtered. Direct TCP bypasses are not possible without
9
+ # NET_ADMIN, which HF free tier does not grant.
10
+
11
+ User nobody
12
+ Group nogroup
13
+
14
+ Port 8888
15
+ Listen 127.0.0.1
16
+ MaxClients 32
17
+ MinSpareServers 2
18
+ MaxSpareServers 8
19
+ StartServers 2
20
+ Timeout 90
21
+ LogLevel Error
22
+ Logfile "/dev/stderr"
23
+
24
+ # ── Deny everything by default ────────────────────────────────────────────────
25
+ Filter "/etc/tinyproxy/allowlist"
26
+ FilterDefaultDeny Yes
27
+ FilterURLs Off # match by host, not full URL
28
+
29
+ # ── Content filtering β€” block everything then allow per-host ──────────────────
30
+ # (the allowlist file below is the source of truth)