Spaces:
Paused
Paused
Commit History
-
chore: update startup script configuration for HuggingClip service
748bded -
fix: bypass gemini CLI relaunch mechanism using GEMINI_CLI_NO_RELAUNCH environment variable
4e5f895 -
fix: resolve Gemini CLI relaunch failure by invoking entry JS directly with node flags
d63dc26 -
fix: add explicit environment variables to gemini wrapper in Dockerfile to prevent sandbox and trust prompt failures
2ba784e -
chore: update startup script configuration for HuggingClip service
08ebfa3
-
fix: suppress deprecation warnings and node alerts by updating NODE_OPTIONS in Dockerfile and start.sh
bc525e1 -
chore: rename CLAUDE_API_KEY to ANTHROPIC_API_KEY and add GEMINI/OPENAI placeholders to configuration files
c465b41 -
chore: update startup script configuration for HuggingClip environment
f635d84 -
chore: update agent CLI wrappers to set max-old-space-size and clear existing NODE_OPTIONS
e79e3bc -
chore: unset NODE_OPTIONS for agent CLIs to prevent environment conflicts
e6dbd45 -
chore: remove unused CLOUDFLARE_ACCOUNT_ID from environment configuration and startup script
7c42a6c -
chore: update paperclip user UID to 1001 in Dockerfile
5015cf0 -
fix: remove recursive chown of /app in Dockerfile to preserve root ownership of files
c7255ef -
chore: create non-root user and update directory permissions in Dockerfile and start script
9946cfb -
chore: install additional agent CLIs and migrate sync status timestamp to timezone-aware datetime
9161677 -
chore: update startup script configuration for environment initialization
b17ba14 -
feat: redirect /invite paths to /app/invite to support SPA routing structure
608e075 -
chore: rename default backup dataset from paperclip-backup to huggingclip-backup
6e26197 -
chore: update environment configuration in start.sh
c979202
-
docs: update README with project showcase and donation info, and remove legacy links from health server UI
32ab05a -
refactor: optimize Docker build layers, consolidate dependency patches, and modernize documentation
6ad52e8 -
Restore dashboard at / with Paperclip at /app/ (proper fix)
Patch ui/src/main.tsx in the Dockerfile build to add basename="/app" to BrowserRouter. With this, React Router strips the /app prefix client-side before matching routes — /app/ becomes /, /app/ABC/issues becomes /ABC/issues — so the company-prefix extractor never sees "app". Health server: - / → HuggingClip dashboard (restored) - /app/* → proxy to Paperclip with /app prefix stripped - /api/* → proxy pass-through - /* catch-all → proxy pass-through (assets, sw.js, etc.) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>44ce938 -
Fix routing, ECONNREFUSED, and Cloudflare setup
- Move dashboard to /_status, proxy / root directly to Paperclip (fixes "Company not found APP" — SPA no longer sees /app/ prefix) - Hardcode PAPERCLIP_HOST to 127.0.0.1 instead of reading HOST env (fixes ECONNREFUSED 0.0.0.0:3100 — 0.0.0.0 is bind-only) - Remove CLOUDFLARE_ACCOUNT_ID requirement from setup condition (setup script already auto-discovers account ID) - Source CF proxy env file after setup so CLOUDFLARE_PROXY_URL/SECRET reach the Node process Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>eb3a3f8 -
Fix container exit when admin already configured
set -euo pipefail kills the script when the bootstrap-ceo grep pipeline returns no match (admin already exists). Previous fix covered bootstrap-ceo itself but not the grep pipeline. Add || true at the end of the pipeline so empty INVITE_URL is fine. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>6d97584 -
Make sed patch robust + verify with grep
Build failed silently. Add: file existence check, simpler sed pattern (just seen.has(current.id) → wrapped form), grep-verify the patch landed, dump file context if not for debugging. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>316b8d3 -
Patch Paperclip source to cap recovery chain depth at 500
Found the actual bug. Confirmed via @paperclipai/server npm tarball: firstBlockedChainFinding does proper cycle detection via Set.has, but the chain in user data is genuinely 1000+ deep (created by a runaway recovery-issue loop). Each recursive call also clones the Set into new Set(seen), so memory blows up too. Fix: sed-patch the if-check to also bail when seen.size > 500. This short-circuits deep linear chains without affecting normal graphs. Patch runs in the builder stage before pnpm build. Reverted SQL purge and --unhandled-rejections=none from start.sh — neither addressed the root cause. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>df96d5e -
Purge orphaned heartbeat run UUID from all tables before launch
The orphaned run 1fc2bf0e... triggers Paperclip's startup recovery which overflows the stack via firstBlockedChainFinding. Even when caught, downstream periodic checks crash Paperclip. Solution: delete the UUID from every UUID column across every public table before launch, so recovery has nothing to do. Foreign-key constraint failures are swallowed per-row. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>e77bcc1 -
Prevent crash from unhandled RangeError in periodic heartbeat
The startup heartbeat recovery catches the stack overflow and logs it. But the periodic heartbeat (30s) fires the same firstBlockedChainFinding recursion in an async context with no try/catch → unhandled rejection → process.exit(1). --unhandled-rejections=none silences these instead of crashing the process. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>4a30806 -
Revert --stack-size=65536; stack overflow was harmless
With larger stack, recovery code completes and triggers a crash in Paperclip's issue-graph traversal result handling (exit code 1). The RangeError was caught internally and the app continued fine. Reverting lets the stack overflow remain caught-and-logged, which is the working state. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>3ea6622 -
Increase Node.js stack size to fix startup recovery overflow
Deep issue dependency chains from stalled CEO tasks cause RangeError in firstBlockedChainFinding recursive DFS. --stack-size=65536 (64MB vs 1MB default) handles any realistic depth. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>009eec2 -
Reset stale agent runs before startup to prevent stack overflow
Paperclip's startup recovery does recursive DFS on the issue graph. Deeply nested stalled-task chains cause RangeError on restart. Marking orphaned running runs as failed before launch prevents the recovery code from firing entirely. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>863a768 -
Simplify logs to match Hugging8n style; fix Agent JWT missing
- start.sh: remove ANSI colors, ASCII art, step numbers; add simple box header + key-value config summary (Hugging8n style); silence pg_isready/psql stdout; generate and persist PAPERCLIP_AGENT_JWT_SECRET alongside BETTER_AUTH_SECRET so Paperclip startup shows "ready" - paperclip-sync.py: suppress httpx + huggingface_hub logger noise; remove === dividers from backup/restore log output Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>7c90063
-
Suppress psql restore noise and deprecation warnings
- stdout=DEVNULL on psql restore: eliminates CREATE TABLE/ALTER TABLE/COPY spam - warnings.filterwarnings: silences huggingface_hub local_dir_use_symlinks UserWarning - tar.extractall filter='data': fixes Python 3.14 DeprecationWarning Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>39d8167 -
Add WebSocket proxy and suppress events/ws log noise
- Proxy WebSocket upgrades (events/ws) through to Paperclip using raw net.connect — fixes persistent 403 reconnect spam in logs - Skip morgan logging for /events/ws paths - Switch from app.listen to http.createServer so upgrade events attach Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>c65d941 -
Reduce container log noise
- morgan: skip /health, /sw.js, /assets/*, /favicon.ico - morgan: switch from "combined" to "tiny" format (no UA/referrer noise) - Dashboard: poll every 30s instead of 5s Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>2d464ab -
Install gemini CLI in Docker image for gemini-local adapter
Paperclip's gemini-local adapter spawns 'gemini' as a subprocess. Add @google/gemini-cli globally so it resolves in PATH. Also export GEMINI_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY explicitly so all adapters and sub-processes inherit them from HF Space secrets. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>5c47206 -
Auto-create Paperclip instance config.json on first boot
bootstrap-ceo exits early with "No config found" when config.json is absent. Generate a minimal valid config at PAPERCLIP_CONFIG before launching Paperclip, using env vars for DB URL, public URL, and deployment mode. Skipped when config was already restored from HF Dataset backup. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>7a3506c -
Fix admin invite URL extraction and add setup banner to dashboard
- grep for 'Invite URL:' line specifically instead of any 'http' match, which was capturing corepack's npm registry download URL - Strip ANSI escape codes before extracting URL - Save invite URL to /tmp/invite-url.txt for dashboard to read - Add prominent orange setup banner on dashboard when invite URL exists - Expose setupUrl in /health JSON response Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>0502cce -
fix: bootstrap-ceo wait loop and missing PAPERCLIP_CONFIG env var
- Use 127.0.0.1 not localhost in curl health check (IPv6 resolution issue) - Remove file-existence check from wait condition (was always false) - Add PAPERCLIP_CONFIG env var from official Paperclip Dockerfile - bootstrap-ceo now runs when API is ready regardless of config file path Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>28c31b5 -
fix: bootstrap-ceo after Paperclip init, better startup error messages
- Start Paperclip in background, wait for config.json + /api/health (max 90s) - Run bootstrap-ceo after server is ready (config exists), not before - Print boxed admin invite URL to logs when bootstrap generates one - Proxy shows "starting up" message instead of generic error during boot - Cleanup handler now kills PAPERCLIP_PID on SIGTERM Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>a2c720b -
fix: 503 health check, backup dataset creation, auto bootstrap-ceo
- Fix nextSync: string+number concat caused Invalid Date -> toISOString throw -> 503 - Fix backup: always call create_repo(exist_ok=True) before uploading - Add bootstrap-ceo step to generate first admin invite URL at startup Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>dcedf5f -
fix: proxy /assets/* and all Paperclip static paths to port 3100
Add catch-all route so absolute asset URLs (/assets/*, /site.webmanifest, /favicon.*) generated by Paperclip's Vite build are forwarded correctly. Remove duplicate app.get("/") route. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>9cb2a61 -
fix: hostname allowlist via env var, correct first-boot DB status
- Use PAPERCLIP_ALLOWED_HOSTNAMES env var (no CLI/config.json required) - Set PAPERCLIP_PUBLIC_URL from SPACE_HOST for Better Auth base URL - Remove broken CLI-based allowed-hostname calls from step 7 - sync_from_hf returns None for no-backup (first boot) vs False for errors - First boot restore: write db_status=connected, not error Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>c1db737 -
fix: dashboard display bugs (Invalid Date, DB status, backup status)
- Add startTime to /health response (was missing, caused Invalid Date) - Show DB as green when status is unknown (pre-sync state is fine) - Backup status: show Disabled when no HF_TOKEN, Pending before first sync Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>e96aeec -
fix: allowlist hostnames and add missing Paperclip env vars
- Run pnpm paperclipai allowed-hostname for localhost/0.0.0.0/127.0.0.1 - Auto-allowlist SPACE_HOST (HF Spaces public URL env var) - Add PAPERCLIP_DEPLOYMENT_EXPOSURE=private (from official Dockerfile) - Add PAPERCLIP_INSTANCE_ID=default and OPENCODE_ALLOW_ALL_MODELS=true Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>c93ab66 -
fix: use corepack for pnpm version and add plugin-sdk build step
- corepack enable uses correct pnpm version from packageManager field - add @paperclipai/plugin-sdk build (matches official Paperclip Dockerfile) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>47b3c14 -
fix: three startup errors from build/runtime
- Remove HfFolder import (removed in huggingface_hub >= 0.20) - Build only ui + server packages (match official Paperclip Dockerfile) - Launch server with tsx loader so workspace .ts packages resolve at runtime Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>9e72cf8 -
feat: auto-generate BETTER_AUTH_SECRET on first boot
If not set via HF Space secrets: - First boot: generate with openssl rand -base64 32, save to /paperclip/.auth-secret - Subsequent restarts: reload from saved file (stable across restarts) - User-set secret always wins (checked before file lookup) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b8b0f98 -
fix: three runtime errors after PostgreSQL startup
- PostgreSQL: use su -postgres for ALTER USER / CREATE DATABASE (peer auth blocks root from connecting as postgres) - Health server: hardcode port 7861 — was reading PORT=3100 (Paperclip's port env var, caused conflict) - Paperclip launch: pnpm --filter @paperclipai/server start (root package has no start script, server package does) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>09af51a -
fix: initialize PostgreSQL cluster before starting
Use pg_createcluster + pg_ctlcluster (Debian way) instead of raw postgres -D. Auto-detect installed PG version. Initialize data dir on first boot, start cluster on every restart. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>0c60c15