Ashwin Kumar Sivakumar
6decf8dce2
Fix panic-on-missing-env in auth middleware and ticket provider
...
require_auth and NxtgaugeTicketProvider::create_ticket both called
env::var(...).expect(...) on every request, crashing instead of
returning a proper error when JWT_SECRET/AI_SERVICE_KEY were unset.
Both are now loaded once into AppConfig at startup and checked with
a graceful 401/500 response.
2026-07-02 18:31:35 +05:30
Tracewebstudio Dev
2e0b986e20
feat: JWT auth middleware, env-var CORS origins, real user_id in confirm_action
...
- Add src/auth.rs with require_auth middleware extracting user_id from Bearer token
- Wire auth middleware onto all /api/* routes
- Replace CorsLayer::permissive() with env-driven FRONTEND_URL/ADMIN_URL origins
- Pass real auth_user.user_id to confirm_action instead of conversation_id
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 13:51:41 +02:00
Ashwin Kumar Sivakumar
e33ed2192c
Update workflows and source files
2026-07-02 06:51:03 +05:30
Tracewebstudio Dev
4505d8987e
feat: add Ask Ash AI assistant implementation
...
- Add LiteLLM provider with LLM_PROVIDER env var support
- Add Fake LLM provider for testing
- Add action registry with 17 AI actions
- Add permission checker with role verification
- Add UI events in chat responses (fill_form, open_preview, etc)
- Add versioned prompt files system
- Add confirm action endpoint
- Add 80 unit tests
New endpoints:
- POST /api/ai/actions/confirm
New files:
- src/handlers/actions.rs
- src/handlers/confirm_action.rs
- src/services/action_confirmation.rs
- src/prompts.rs
- src/tests.rs
- prompts/v1/*.txt
2026-06-14 20:28:17 +02:00
Tracewebstudio Dev
89e4809f0b
feat: add permission checker module
...
Checks:
- User is logged in
- Role is allowed for action
- Verification status
- Account status
Includes unit tests.
2026-06-14 19:29:09 +02:00
Tracewebstudio Dev
fced248dfc
feat: add action registry with code-based action definitions
...
Includes 17 actions with:
- Allowed roles
- Required/optional fields
- AI action costs
- Backend handlers
- Confirmation requirements
2026-06-14 19:28:12 +02:00
Tracewebstudio Dev
e947e248e2
feat: add fake LLM provider for testing
...
Set LLM_PROVIDER=fake to use mock responses without calling real LLM.
Useful for API flow tests, action engine tests, UI event tests.
2026-06-14 19:24:10 +02:00
Tracewebstudio Dev
7d31d1a2bd
feat: add LiteLLM provider and cover letter generation
...
- Add LiteLLM provider implementing AiProvider trait
- Support both Ollama and LiteLLM via LLM_PROVIDER env var
- Add cover letter generation endpoint
- Improve chat orchestrator with better intent detection
- Add search_kb, explain_plan_limits, check_ai_pack_balance intents
- Add LiteLLM config env vars
2026-06-14 18:00:33 +02:00
Tracewebstudio Dev
42d5053259
fix: use cluster Ollama URL and gemma3:270m model defaults
2026-04-15 19:55:03 +02:00
Tracewebstudio Dev
72d44bbd63
feat: wire NxtgaugeTicketProvider and NxtgaugeHelpCenterProvider to real backend APIs
...
- Add NxtgaugeTicketProvider: calls /api/support/tickets/ai/create with service key auth
- Add NxtgaugeHelpCenterProvider: calls /api/kb/articles for help search
- Add ExternalService error variant for HTTP call failures
- Add NXTGAUGE_USERS_URL config env var
2026-04-15 18:18:39 +02:00
Ashwin Kumar
dbba72478c
feat(ai-assistant): bootstrap rust axum backend with providers, routes, and db scaffolding
2026-04-11 15:04:14 +02:00