Skip to content

feat: add Cloudflare Worker Pages D1 deployment#38

Open
d97274247126 wants to merge 6 commits into
uluckyXH:mainfrom
d97274247126:feat/cloudflare-native
Open

feat: add Cloudflare Worker Pages D1 deployment#38
d97274247126 wants to merge 6 commits into
uluckyXH:mainfrom
d97274247126:feat/cloudflare-native

Conversation

@d97274247126

Copy link
Copy Markdown

Summary

Adds a Cloudflare-native OpenMOSS deployment target:

  • Cloudflare Worker API runtime under cloudflare/worker.js
  • Cloudflare D1 schema under cloudflare/schema.sql
  • Pages-style static admin UI under cloudflare/pages/
  • Wrangler config and deployment notes under cloudflare/

Deployed URLs

Verification

  • node --check cloudflare/worker.js
  • Local module smoke test for /api/health, /api/admin/login, /api/admin/dashboard/overview, and /
  • D1 schema applied to openmoss-prod
  • Worker deployed with D1 binding
  • Pages project created and deployed

Note: direct HTTP probing from the execution environment to *.workers.dev timed out due network egress routing, but Wrangler deployment succeeded and the Worker module smoke test passed locally.

@d97274247126

Copy link
Copy Markdown
Author

Updated the Cloudflare migration to match the original OpenMOSS WebUI direction:

Verification:

  • Built original WebUI with VITE_API_BASE_URL=https://openmoss-cloudflare.97274247.workers.dev/api.
  • node --check cloudflare/worker.js passed.
  • Local Worker module smoke test passed for login, health, setup status, webui version, dashboard overview/highlights/trends, agents/tasks lists, score summary/leaderboard, logs, review records, managed agents, prompt templates, and feed status.
  • Wrangler Worker and Pages deployments succeeded.

@d97274247126

Copy link
Copy Markdown
Author

Latest update:

  • Completed a broader API migration audit against the original FastAPI routes and the original WebUI API calls.
  • Added D1 tables for managed-agent host config, schedules, comm bindings, bootstrap tokens, and deployment snapshots.
  • Implemented missing WebUI/backend compatibility endpoints for:
    • managed-agent creation/detail/prompt asset/render preview
    • host config, schedules, comm bindings
    • deployment state, bootstrap script, onboarding message, deploy preview/script
    • prompt templates/agent prompts/compose/onboarding
    • rules CRUD
    • admin detail routes and runtime sub-task/score/feed gaps
  • Removed the previous stateless prompt placeholder behavior; prompt assets are now persisted in D1.
  • Re-deployed Worker and synced D1 schema.

Worker version deployed: 1cb23622-4642-4198-b2bf-3af92c02ce17

Verification:

  • node --check cloudflare/worker.js
  • local Worker smoke tests for login, managed-agent create/list, prompt asset, render preview, host config, schedules, comm bindings, deployment state, bootstrap/onboarding, prompt agents/compose, and rules CRUD
  • wrangler d1 execute openmoss-prod --file schema.sql --remote succeeded; D1 now has 18 tables
  • wrangler deploy succeeded

See cloudflare/API_MIGRATION_CHECKLIST.md for the route coverage checklist.

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