feat: add environment-based local auth mode for ai-delegate

Summary

  • Add isLocalAuthEnabled() utility function to control allowLocalMode for ai-delegate initialization
  • Support explicit override via NEXT_PUBLIC_AI_DELEGATE_LOCAL_AUTH environment variable
  • Default to development mode (NODE_ENV === 'development') when no override is set
  • Add console logging showing local auth mode status on initialization

Environment Variable Behavior

Condition Result
NEXT_PUBLIC_AI_DELEGATE_LOCAL_AUTH=true Enabled
NEXT_PUBLIC_AI_DELEGATE_LOCAL_AUTH=false Disabled
Env var not set + development Enabled
Env var not set + production Disabled

Test Plan

  • Logic unit tests pass (6/6)
  • Development build passes
  • Production build passes

Closes #136 (closed)

🤖 Generated with Claude Code

Merge request reports

Loading