Skip to content

agentOS / Rivet VPS rewrite foundation - #17

Draft
Vercantez wants to merge 14 commits into
mainfrom
cursor/agentos-full-rewrite-8610
Draft

agentOS / Rivet VPS rewrite foundation#17
Vercantez wants to merge 14 commits into
mainfrom
cursor/agentos-full-rewrite-8610

Conversation

@Vercantez

@Vercantez Vercantez commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Starts the full rewrite of camelAI’s chat/agent plane off Cloudflare Workers + Agents SDK onto Rivet Actors + agentOS for VPS hosting — through Phase 3 (platform hardening).

New package: agentos-platform/ (production CF stack is untouched).

Phases 0–2 (runtime)

  • Rivet actors: chatThread (mock), chatThreadAgentOs (Pi via @rivet-dev/agentos), org, workspace
  • Platform services: identity, ledger billing, project filesystem, usage
  • Camel host bindings + ACP → ChatEvent mapper
  • React SPA + useRivetChat (no Agents SDK)
  • HMAC tickets, slash commands
  • VPS Docker / dual-runner drain (RIVET_ENVOY_VERSION)

Phase 3 (this update)

  • Session auth: password (scrypt), GitHub/Google OAuth, CF Access / Pomerium proxy headers; cookie sessions on AUTH_HTTP_PORT (default :6422)
  • Stripe billing: plan limits parity, Checkout (subscription + credits), webhook HMAC, idempotent included/purchased grants, STRIPE_MODE key prefix checks
  • Metering / credits: UsageService, hosted-turn gate on chatThread, BYOK bypass (AGENT_BYOK / byok: model)
  • Observability: structured JSON stdout events, counters, ring buffer, GET /health, GET /api/metrics

Verification

bun run test:agentos          # 82 tests
bun run typecheck:agentos
bun --cwd agentos-platform run smoke
bun --cwd agentos-platform run test:live-smoke

Still TODO (Phase 4+)

Dispatcher / user-app deploys, builds/notebooks/SQL runners, R2/uploads, admin MCP, production data migration, live Pi e2e with API keys on a VPS.

See agentos-platform/README.md and plans/agentos-full-rewrite.md.

Open in Web Open in Cursor 

cursoragent and others added 14 commits July 31, 2026 00:36
Defines ContentBlock/ChatMessage/UiPart message shapes, ThreadState and
AskUserQuestion, ChatEvent wire union, and camelAI slash commands under
agentos-platform/src/shared for server and web reuse.

Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
Replace OrgDO/WorkspaceDO/FilesystemDO for the rewrite foundation with a
JSON-file Store plus Identity, ProjectFilesystem, and Billing services,
wired through createPlatform(), with focused Vitest coverage.

Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
- Dockerfile (Bun app + nginx web stage) with RIVET_ENVOY_VERSION build-arg
- docker-compose: embedded Rivetkit app + canary runner + web proxy
- .env.example, README with architecture, VPS deploy, and migration map
- plans/agentos-full-rewrite.md cross-cutting rewrite plan
- Root dev/test/typecheck:agentos scripts and AGENTS.md map entry
- scripts/smoke.sh for CI (typecheck + unit tests)

Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
Use registry.start() for embedded Rivetkit, correct getOrCreate keys in the
React transport, and verify end-to-end sendMessage against a real engine.

Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
Mark platform-hardening items complete in the rewrite plan and README, and
surface AGENT_BYOK / TOKEN_SIGNING_SECRET in the env example.

Co-authored-by: Miguel Salinas <Vercantez@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants