33 */
44
55/**
6- * Routes that don't require authentication by default
7- * These are typically used by VoltOps and management tools
6+ * Routes that don't require authentication by default (legacy auth)
87 */
9- export const DEFAULT_PUBLIC_ROUTES = [
8+ export const DEFAULT_LEGACY_PUBLIC_ROUTES = [
109 // Agent management endpoints (VoltOps uses these)
1110 "GET /agents" , // List all agents
1211 "GET /agents/:id" , // Get agent details
@@ -32,6 +31,51 @@ export const DEFAULT_PUBLIC_ROUTES = [
3231 "GET /agents/:id/card" ,
3332] ;
3433
34+ // Backward compatibility alias
35+ export const DEFAULT_PUBLIC_ROUTES = DEFAULT_LEGACY_PUBLIC_ROUTES ;
36+
37+ /**
38+ * Routes that require console access when authNext is enabled
39+ */
40+ export const DEFAULT_CONSOLE_ROUTES = [
41+ // Agent management endpoints (VoltOps uses these)
42+ "GET /agents" , // List all agents
43+ "GET /agents/:id" , // Get agent details
44+
45+ // Workflow management endpoints
46+ "GET /workflows" , // List all workflows
47+ "GET /workflows/:id" , // Get workflow details
48+
49+ // Tool management endpoints
50+ "GET /tools" , // List all tools
51+
52+ // API documentation
53+ "GET /doc" , // OpenAPI spec
54+ "GET /ui" , // Swagger UI
55+ "GET /" , // Landing page
56+
57+ // MCP (public discovery)
58+ "GET /mcp/servers" ,
59+ "GET /mcp/servers/:serverId" ,
60+ "GET /mcp/servers/:serverId/tools" ,
61+
62+ // A2A (agent-to-agent discovery)
63+ "GET /agents/:id/card" ,
64+
65+ "GET /agents/:id/history" ,
66+ "GET /workflows/executions" ,
67+ "GET /workflows/:id/executions/:executionId/state" ,
68+ "GET /api/logs" ,
69+ "POST /setup-observability" ,
70+ "/observability/*" ,
71+ "GET /updates" ,
72+ "POST /updates" ,
73+ "POST /updates/:packageName" ,
74+ "WS /ws" ,
75+ "WS /ws/logs" ,
76+ "WS /ws/observability/**" ,
77+ ] ;
78+
3579/**
3680 * Routes that require authentication by default
3781 * These endpoints execute operations, modify state, or access sensitive data
@@ -171,7 +215,7 @@ export function requiresAuth(
171215 defaultPrivate ?: boolean ,
172216) : boolean {
173217 // Check if it's a default public route
174- for ( const publicRoute of DEFAULT_PUBLIC_ROUTES ) {
218+ for ( const publicRoute of DEFAULT_LEGACY_PUBLIC_ROUTES ) {
175219 if ( publicRoute . includes ( " " ) ) {
176220 // Route with method specified
177221 const [ routeMethod , routePath ] = publicRoute . split ( " " ) ;
0 commit comments