mirror of
https://github.com/different-ai/openwork
synced 2026-04-25 17:15:34 +02:00
* feat(plugin-system): add GitHub connector, discovery, marketplaces, and access UX End-to-end GitHub App connector flow and UI: - GitHub App connect: install start/callback/complete endpoints, connector account upsert from installation, selection state, and a dedicated Den Web setup page. - Repo discovery: GitHub tree + manifest inspection, Claude-compatible classification (marketplace/plugin-manifest), marketplace plugin metadata/component path parsing, discovery API + snapshot. - Apply pipeline: materialize plugins, connector mappings, config objects (with frontmatter-aware skill/agent parsing), memberships, and source bindings; create marketplaces with name/description from marketplace.json. - Auto-import on push: persist flag on connector instance, webhook-driven re-apply for new discoveries. - Cleanup: cascading disconnect on connector account removal and remove on connector instance. - Integrations UI: cleaner connected-account card, GitHub avatar, hover trash + confirm dialog, inline "Add new repo" action, per-account repo picker, manifest badges, configured/unconfigured sorting. - Discovery UI: cleaner loader, plugin cards with component chips, inline apply action, auto-import toggle default on. - Manage UI: instance configuration endpoint, auto-import toggle, remove repo danger zone with cascade confirmation. - Plugins & Marketplaces pages: dashboard nav entries, list + detail screens, per-plugin component counts, marketplace resolved endpoint with source + plugins, marketplace access section (org-wide/team/member grants). - Bitbucket card marked "Coming soon". - PRDs, GitHub setup instructions, and learnings docs added. * chore(docs): move GitHub-instructions.md into prds/new-plugin-arch/github-connection * fix(den-web): wrap github integration page in Suspense for useSearchParams * refactor(den-web): redirect GitHub post-install flow into the clean account selection phase After completing the GitHub App install, previously we rendered a separate GithubRepositorySelectionPhase with different styling. Now we call the install completion endpoint, then router.replace to ?connectorAccountId=... so the existing GithubConnectedAccountSelectionPhase renders the repo list. Removes the duplicate selection phase and its unused helpers/imports. * fix(den-web): drop Requires-scopes body and show GitHub description in integrations card Removes the empty-state Requires scopes: <code>… block from both provider cards and restores the provider description on the GitHub card so the empty state is consistent with Bitbucket. Drops the header's bottom border when no body follows. * fix(den-web): only show integration provider description in empty state Once a provider has connections, hide the description in the header so the card focuses on the connected accounts + repos list. --------- Co-authored-by: src-opn <src-opn@users.noreply.github.com>
Den API
Hono-based Den control plane implementation (den-api, formerly den-controller).
This package is the active Den control plane implementation.
It carries the full migrated Den API route surface in a foldered Hono structure so agents can navigate one area at a time without scanning the whole service.
Quick start
pnpm --filter @openwork-ee/den-api dev:local
Current routes
GET /->302 https://openworklabs.comGET /health- Better Auth mount at
/api/auth/* - desktop handoff routes under
/v1/auth/* - current user routes under
/v1/me* - organization routes under
/v1/orgs* - admin routes under
/v1/admin* - worker lifecycle and billing routes under
/v1/workers*
Folder map
src/routes/auth/: Better Auth mount + desktop handoff endpointssrc/routes/me/: current user and current user's org resolution routessrc/routes/org/: organization CRUD-ish surfaces, split by areasrc/routes/admin/: admin-only reporting endpointssrc/routes/workers/: worker lifecycle, billing, runtime, and heartbeat endpointssrc/middleware/: reusable Hono middleware for auth context, org context, teams, and validation
Each major folder also has its own README.md so future agents can inspect one area in isolation.
TypeID validation
- Shared Den TypeID validation lives in
ee/packages/utils/src/typeid.ts. - Use
typeId.schema("...")or the compatibility helpers likenormalizeDenTypeId("...", value)when an endpoint accepts or returns a Den TypeID. ee/apps/den-api/src/openapi.tsexposesdenTypeIdSchema(...)so path params, request bodies, and response fields all share the same validation rules and Swagger examples.- Swagger now documents Den IDs with their required prefix and fixed 26-character TypeID suffix, so invalid IDs fail request validation before route logic runs.
Migration approach
- Keep
den-api(formerlyden-controller) as the source of truth for Den control-plane behavior. - Add endpoints in focused Hono route groups one surface at a time.
- Reuse shared middleware and Zod validators instead of duplicating request/session/org plumbing.
- Leave a short README in each route area when the structure changes so later agents can recover context fast.