Skip to content

Commit fa364fc

Browse files
theo-learnerclaude
andcommitted
fix: allow autonomous plan/execute/verify/rollback in read-only mode
All four endpoints were missing from safeEndpoints, causing 403 on Plan click. Write safety is enforced within each route handler (dry-run default). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 199c86c commit fa364fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/middleware.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ export function middleware(request: NextRequest) {
147147
'/api/goal-manager/dispatch', // Dry-run dispatch allowed; write blocked in route
148148
'/api/mcp', // MCP invocation (write safety enforced in MCP handler)
149149
'/api/metrics/seed', // Demo scenario injection (no real infra changes)
150+
'/api/autonomous/plan', // Autonomous plan (dry-run, no infra write)
151+
'/api/autonomous/execute', // Autonomous execute (write safety enforced in handler)
152+
'/api/autonomous/verify', // Autonomous verify (read-only)
153+
'/api/autonomous/rollback', // Autonomous rollback (write safety enforced in handler)
150154
];
151155

152156
if (allowScalerWriteInReadOnlyMode()) {

0 commit comments

Comments
 (0)