12 Commits
Author SHA1 Message Date
Stephen M Abbott 8422092dca Merge pull request #1 from stevologic/agent/upgrade-actions-node24
Upgrade GitHub Actions to Node 24
2026-07-30 09:29:27 -07:00
Stephen M AbbottandClaude Fable 5 cf8a0de322 README: complete droplet deployment guide (create -> DNS -> one-liner -> first run -> day-2 ops)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 13:44:26 -07:00
Stephen M AbbottandClaude Fable 5 8d126ad2e7 gitattributes: force LF for shell scripts, Dockerfiles, Caddyfile
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 13:35:54 -07:00
Stephen M AbbottandClaude Fable 5 fc2faf8b22 Droplet deployment: server image + compose stack with auto-update
- Dockerfile.server: python:3.12-slim + FastAPI app + web UI, non-root,
  SQLite in /data volume, container healthcheck against /api/health,
  uvicorn with proxy headers for running behind Caddy
- docker.yml workflow now publishes both images (matrix):
  ghcr.io/stevologic/spare-cycles (node) and spare-cycles-server (pool)
- deploy/: docker-compose.yml (server + Caddy auto-HTTPS + Watchtower
  pulling latest every 5 min, restart: unless-stopped throughout),
  Caddyfile (DOMAIN set -> Let's Encrypt; empty -> plain :80),
  .env.example, setup-droplet.sh (idempotent bootstrap: Docker install,
  ufw, stack files, .env, pull + up -d), update.sh (manual pull+up)
- DEPLOY.md: compose is now Option A with a one-command bootstrap;
  bare-metal systemd demoted to Option B; volume-safe backup recipe
- README: production deploy one-liner + deploy/ in the repo map

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 13:35:38 -07:00
Stephen M AbbottandClaude Fable 5 4c623975a8 Docker image (GHCR) + simplified three-ways donor docs
- Dockerfile: python:3.12-slim + the one-file connector; non-root user;
  SPARECYCLES_HOME=/data volume so pairing survives restarts
- .github/workflows/docker.yml publishes ghcr.io/stevologic/spare-cycles
  (linux/amd64 + arm64) on pushes touching the connector or Dockerfile
- README: donor sections rewritten as "Become a donor - three ways"
  (your machine / Docker / GitHub Action), each 2-3 copy-paste steps

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 13:17:06 -07:00
Stephen M AbbottandClaude Fable 5 636bd623f2 GitHub Action: donate CI minutes as a SpareCycles check-in node
- action.yml (composite, repo root): uses: stevologic/spare-cycles@main
  with server/node-token/models/runners/minutes/idle-exit inputs; provider
  keys arrive as plain env secrets and never leave the runner
- Connector: SPARECYCLES_SERVER/SPARECYCLES_NODE_TOKEN env credentials
  (ephemeral hosts, no config file), --max-seconds time-boxed check-ins
  with deadline-aware long-poll, --idle-exit to stop burning minutes on an
  empty queue, per-session served-jobs summary
- examples/donate.yml: copy-paste nightly cron + manual-trigger workflow
- README: "Donate your CI minutes" section

Verified end to end locally exactly as the Action invokes it: env-only
creds, job claimed and completed, idle-exit after the queue emptied, exit 0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 13:08:37 -07:00
Stephen M AbbottandClaude Fable 5 8fa297b885 README: link the GitHub Pages promo site
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 12:56:55 -07:00
Stephen M AbbottandClaude Fable 5 530cecfa1a Surface MIT license: README badge + section, site footer link
Repo is now public; license was already MIT (GitHub detects it).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 12:50:22 -07:00
Stephen M AbbottandClaude Fable 5 9e995a4dcc Tests + CI, rate limiting, karma v1, owner tools, instant realtime, deploy guide
Foundation:
- 52-test pytest suite: API flows, queue protocol, model matching, recovery
  paths, karma ordering, node revocation, plus integration tests that run a
  real uvicorn process for the OpenAI-compatible round-trip (incl. SSE
  streaming) and drive the actual node_connector.py script end to end
- GitHub Actions CI on ubuntu 3.11/3.12 + windows 3.12; front-end syntax
  check and byte-compile included; README badge
- The suite immediately caught a real bug: empty `messages` on
  /v1/chat/completions slipped past the prompt guard and hung the request
  for the full 180s timeout instead of returning 400 - fixed

Security & fairness:
- Sliding-window rate limits on /api/register and /api/recover (recovery
  codes were brute-forceable at wire speed before); X-Forwarded-For aware,
  SPARECYCLES_RATELIMIT=off escape hatch
- Karma v1: projects whose owners have completed donations are claimed
  before non-donors at equal tier - boolean, never starves newcomers.
  Donor badge on marketplace cards.

Operability:
- Owner tools: PATCH /api/projects/<slug> (edit everything), rotate
  inference key, cancel queued jobs from the feed
- Node revocation (DELETE /api/nodes/<id>) - token dies instantly, donation
  attribution is preserved via soft delete
- /api/health with real DB round-trip for uptime monitors
- DEPLOY.md: droplet + systemd + Caddy/nginx (long-poll timeouts), backups,
  tunnel alternative, connector-as-a-service
- MIT LICENSE (swap if you prefer another)

Latency & robustness:
- Realtime pipeline now wakes on asyncio.Events when jobs arrive/finish
  instead of 0.4-1s poll ticks; DB remains source of truth with poll
  fallback - job pickup and answer delivery are effectively instant
- Connector: clean SIGTERM shutdown (systemd/docker), UTF-8 stdout on
  Windows pipes, model select keeps unlisted current values when editing

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 12:40:55 -07:00
Stephen M AbbottandClaude Opus 4.8 098a4aa366 Brand assets, link previews, iOS icon, supporter profiles, node --status
Branding & sharing:
- Generated brand mark (cycle arrow around a coin) rendered by a committed,
  reproducible script: favicon.svg/.ico + 16/32/48, apple-touch-icon (180px,
  opaque as iOS requires), 192/512 + maskable PWA icons, 1200x630 OG card
- index.html is now templated so og:image/og:url are absolute (scrapers
  ignore relative URLs); SPARECYCLES_PUBLIC_URL overrides behind a proxy
- site.webmanifest + apple-mobile-web-app-* meta so "Add to Home Screen"
  picks up the icon and name; theme-color per colour scheme
- Assets also served from / (favicon.ico, apple-touch-icon.png, ...) and
  answer HEAD, which link scrapers and uptime checks use
- Static JS/CSS are cache-busted by mtime so a deploy can't leave visitors
  running stale JS against a new API

Supporters & profiles:
- Supporter count is now a button opening a modal listing supporters, their
  node status, and their contribution to that project
- New GET /api/projects/<slug>/supporters and GET /api/accounts/<name>
- Public profile pages at #/u/<name>: submitted apps, donation totals,
  projects supported. Usernames link there from the supporters modal, the
  donor leaderboard, and project bylines. Node names/tokens stay private.

Node visibility:
- node_connector.py --status shows detected runners, pool-side online state,
  served queues and recent jobs; read-only, safe beside a running connector
- New GET /api/nodes/me backs it; Connect page documents backgrounding the
  connector and tailing its log on macOS/Linux/Windows

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 23:55:08 -07:00
Stephen M AbbottandClaude Fable 5 49b5acc417 Rename to SpareCycles + dynamic catalogs, local models, docs, key recovery
- Rename PromptPool -> SpareCycles everywhere (brand, key prefixes
  sck_/sci_/scn_, ~/.sparecycles, SPARECYCLES_* env vars, DB name)
- New-project model fields are vendor-grouped dropdowns fed by
  /api/models/catalog, which queries Anthropic/OpenAI/xAI model APIs
  with server env keys (metadata only) and falls back to bundled lists
- Offline model serving: connector auto-detects Ollama (:11434) and
  LM Studio (:1234), advertises installed models by name; catalog
  gains a live "Local nodes" group
- Grok support: grok CLI runner + xAI API runner
- "How it works" docs page with inline SVG diagrams (architecture,
  realtime sequence, donor onboarding), trust notes, glossary
- Account key recovery: five one-time recovery codes at registration
  (regenerable), /api/recover, and node-based recovery via
  node_connector.py --recover

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 12:28:02 -07:00
Stephen M AbbottandClaude Fable 5 82d4a37af1 PromptPool MVP: token-donation marketplace for vibe-coding projects
Vetted vision (VISION.md) + working implementation:
- FastAPI + SQLite server: accounts, project marketplace, supports,
  AI Donor leaderboards, batch queue, node pairing/claim protocol
- OpenAI-compatible /v1/chat/completions realtime proxy (incl. SSE)
  backed by volunteer nodes; model preference + fallback matching
- Stdlib-only node connector: pairing-code onboarding, auto-detected
  runners (claude/codex/gemini/cursor CLIs, direct Anthropic/OpenAI
  APIs, echo test runner); provider keys never leave the node
- Zero-build vanilla JS web UI

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 10:28:56 -07:00