Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,16 @@
- Keep the existing visual language: rounded cards, muted surfaces, Tailwind utility classes, and dashboard shell/sidebar patterns.
- Prefer small, direct component changes over new abstractions unless reuse is clear.

## API Routes
## API Routes and Dashboard Actions

- Always create internal app APIs under `/api/internal/**`.
- Use Server Actions and server-component loaders for dashboard and in-app usage. Do not create new `/api/internal/**` routes for dashboard-only flows.
- Always create agent/external-use APIs under `/api/agent/**`.
- Internal APIs are for dashboard and in-app usage.
- Agent APIs are for agent usage outside the app.
- API routes must use the Next.js App Router route format under `app/api/**/route.ts`.
- Internal API route files should live under `app/api/internal/**/route.ts`.
- Agent API route files should live under `app/api/agent/**/route.ts`.
- Always use OpenAPI and Swagger documentation for `/api/agent/**` routes.
- Only `/api/agent/**` routes should appear in OpenAPI/Swagger docs.
- Do not document `/api/internal/**` routes in OpenAPI/Swagger.
- Do not document dashboard Server Actions or any internal-only route in OpenAPI/Swagger.
- When adding or changing `/api/agent/**` routes, update the OpenAPI JSDoc comments beside the route handler.
- Add concrete JSON response examples to Swagger/OpenAPI for `/api/agent/**` routes.
- Use `app/api/agent/agents/route.ts` as the example pattern for agent API docs.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ corepack pnpm prisma:studio

## API conventions

- Dashboard-only APIs belong under `/api/internal/**`.
- Dashboard-only reads and mutations should use Server Actions or server-component loaders. Do not add new `/api/internal/**` routes for dashboard-only flows.
- External agent APIs belong under `/api/agent/**`.
- Agent API requests must use the company bearer token and an `AgentId` header.
- Never log, print, or expose bearer tokens.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Another fun detail: **Kaito is currently the most frequent code pusher in this r
- Task instructions (`job`), blocking reasons, and optional `note` fields for agent result notes, done summaries, or handoff notes.
- Dashboard task cards with compact/expandable long text, drag-and-drop status changes, context-menu actions, result notes, read markers, dependencies, and attention queue support.
- Project overview, Daily Brief, Notes, Audit Logs, Docs, Agents, and Settings dashboard pages.
- Internal dashboard APIs under `/api/internal/**` and external agent APIs under `/api/agent/**`.
- Server Actions and server-component loaders for dashboard flows, plus external agent APIs under `/api/agent/**`.
- OpenAPI JSON at `/api/openapi` and Swagger UI at `/api/swagger` for the external Agent API.
- Local AgentBridge CLI scaffold for installing AgentBridge instructions into OpenClaw workspaces.

Expand All @@ -60,7 +60,7 @@ AgentBridge does not currently include billing, public signup, or third-party in
- React and TypeScript
- Tailwind CSS and shadcn/ui-style components
- Prisma with PostgreSQL
- React Query for dashboard mutations and cached client data
- React Query for selected dashboard client state and action-backed lazy detail loading
- Swagger/OpenAPI documentation for `/api/agent/**`
- Local workspace CLI package for OpenClaw setup

Expand Down
44 changes: 0 additions & 44 deletions apps/web/app/api/internal/account/password/route.ts

This file was deleted.

48 changes: 0 additions & 48 deletions apps/web/app/api/internal/account/username/route.ts

This file was deleted.

135 changes: 0 additions & 135 deletions apps/web/app/api/internal/agents/[agentId]/route.ts

This file was deleted.

Loading