Commit graph

120 commits

Author SHA1 Message Date
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
Ashwin Kumar Sivakumar
d66ef693e5 fix(ci): isolate gitops checkout dir 2026-06-16 03:29:00 +05:30
Ashwin Kumar Sivakumar
d132f957b4 fix(ci): retry gitops sync pushes 2026-06-16 01:26:32 +05:30
Ashwin Kumar Sivakumar
91d91481c8 fix(ci): run ai assistant deploys on self-hosted runners 2026-06-16 00:50:02 +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
Ashwin Kumar Sivakumar
510195ae24 fix(ci): deploy via gitops from github actions 2026-06-14 23:06:22 +05:30
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
Ashwin Kumar Sivakumar
eaec788b2f fix(ci): use lowercase ghcr image names 2026-06-14 22:58:24 +05:30
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
Ashwin Kumar Sivakumar
1a2781a85f ci: deploy ai assistant via github actions and ghcr 2026-06-14 22:52:50 +05:30
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
Ashwin Kumar Sivakumar
0be8bd65b5 fix(ci): deploy ai assistant via immutable gitops release 2026-06-14 05:52:49 +05:30
Ashwin Kumar Sivakumar
e5733a147b chore: rebuild all 2026-06-13 20:37:33 +05:30
Ashwin Kumar Sivakumar
983b766c07 fix: move cleanup to post-build job, keep 2 SHA tags 2026-06-12 04:20:52 +05:30
Ashwin Kumar Sivakumar
3866c66e5f fix: remove push preflight from forgejo mirror sync 2026-06-11 19:29:41 +05:30
Ashwin Kumar Sivakumar
3ccbdfb322 fix: trigger forgejo mirror sync via api 2026-06-11 19:14:46 +05:30
Ashwin Kumar Sivakumar
2f999dfe95 fix: use basic auth for forgejo sync 2026-06-11 18:56:39 +05:30
Ashwin Kumar Sivakumar
2c25a16402 fix: use existing forgejo mirror secrets 2026-06-11 18:19:10 +05:30
Ashwin Kumar Sivakumar
7407d6371e fix: point forgejo sync to ashwin namespace 2026-06-11 18:00:03 +05:30
Ashwin Kumar Sivakumar
4f7f475979 chore: align forgejo ci and main deployment 2026-06-11 17:17:42 +05:30
Tracewebstudio Dev
2876b45568 chore: trigger gitea pipeline 2026-05-05 20:27:09 +02:00
Tracewebstudio Dev
88427c715e chore: force rebuild to restore image tags after prune 2026-05-01 19:20:06 +02:00
Tracewebstudio Dev
b3729541f9 ci: skip gitops update if GITEOPS_REPO secret not set 2026-05-01 18:45:53 +02:00
Tracewebstudio Dev
86a2f15b0a chore: force rebuild to restore image tags after prune 2026-05-01 18:40:10 +02:00
Tracewebstudio Dev
a27301fe36 ci: update gitops with new SHA on each build (auto-deploy) 2026-05-01 11:04:27 +02:00
Tracewebstudio Dev
6e0339e6a1 ci: add post-push registry prune (keep latest 1 SHA build) 2026-05-01 10:10:33 +02:00
Tracewebstudio Dev
b0c32c8864 chore: trigger gitea pipeline 2026-05-01 00:17:44 +02:00
Tracewebstudio Dev
cc7e31c653 chore: trigger gitea pipeline 2026-05-01 00:14:33 +02:00
Tracewebstudio Dev
f44e7fa570 fix(ci): use docker socket instead of dind host 2026-04-30 22:54:24 +02:00
Tracewebstudio Dev
a84fe72ffe chore: trigger gitea pipeline 2026-04-30 22:51:27 +02:00
Tracewebstudio Dev
f4f5fd26b1 chore: trigger gitea pipeline 2026-04-30 22:47:33 +02:00
Tracewebstudio Dev
3b4d9f299a chore: trigger gitea pipeline 2026-04-30 22:41:36 +02:00
Tracewebstudio Dev
ef5f1c799b fix(ci): force http1.1 for gitea git transport 2026-04-30 22:32:37 +02:00
Tracewebstudio Dev
3570a4b0fb chore(ci): enable git trace for sync debugging 2026-04-30 22:27:16 +02:00
Tracewebstudio Dev
283b5c4ff4 fix(ci): use GITEA_SECRET in sync workflow 2026-04-30 22:18:11 +02:00
Tracewebstudio Dev
9f56639d55 fix(ci): enforce Admin basic auth sync flow 2026-04-30 22:03:23 +02:00
Tracewebstudio Dev
61b05326df fix(ci): always use token owner login for gitea auth 2026-04-30 21:45:03 +02:00
Tracewebstudio Dev
1f4ed1dafe fix(ci): use GITEA_SECRET for sync token 2026-04-30 21:40:10 +02:00
Tracewebstudio Dev
c52e8deff3 fix(ci): add preflight token check and static secret usage 2026-04-30 21:36:42 +02:00
Tracewebstudio Dev
c3ea8e8a70 fix(ci): use authenticated remote URL for gitea git ops 2026-04-30 21:23:06 +02:00
Tracewebstudio Dev
9d9f7cbffc chore(ci): log resolved gitea user and validate ls-remote 2026-04-30 21:03:52 +02:00
Tracewebstudio Dev
ee9aa3bb6f fix(ci): tolerate /user 401 and fallback to configured auth user 2026-04-30 20:59:10 +02:00
Tracewebstudio Dev
255bb4e0e7 fix(ci): use basic auth header with token-owner login 2026-04-30 20:56:11 +02:00
Tracewebstudio Dev
f64c714737 fix(ci): support GITEA_TOKEN secret with fallback 2026-04-30 20:48:06 +02:00
Tracewebstudio Dev
b2838ba32a fix(ci): hardcode admin gitea sync remote 2026-04-30 20:45:49 +02:00
Tracewebstudio Dev
345ebac4bf fix(ci): use basic auth header for gitea git operations 2026-04-30 20:38:18 +02:00
Tracewebstudio Dev
d2e856c2af fix(ci): prefer token owner login for gitea git auth 2026-04-30 20:33:51 +02:00