Commit graph

30 commits

Author SHA1 Message Date
nickviljoen
7445c30caf Document UI & brand conventions in CLAUDE.md
Adds a "UI & Brand (2026-05)" section covering the OLIVER design tokens
(yellow #FFCB05, near-black #1A1A1A, Montserrat), signature motifs
(.page-title highlight, .stat-tile, card-header accent), and the two
gotchas to avoid re-introducing (don't override .navbar position in
nav.html; tabs must use button data-bs-target, not a href).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 10:26:39 +02:00
nickviljoen
08038b066f Rebrand UI to OLIVER template: Montserrat, yellow accents, sticky nav, tab fixes
Swap the muddy #f3ae3e palette for the real OLIVER brand pulled from the master
PPT template: yellow #FFCB05 + near-black #1A1A1A + off-white #F6F7F7, Montserrat
font. White-first page with a brand-yellow highlight rectangle behind page titles,
stat tiles with yellow left-strip, and a short yellow accent line under each
card section title — picks up the template's "01" chapter-marker rhythm.

Fixes two production bugs along the way:
- Nav stays pinned at top while page scrolls. The conflicting
  `.navbar { position: relative !important }` rule was removed from nav.html
  so the `position: fixed` from style.css can take effect.
- Clicking admin tabs no longer scrolls the page. Converted
  `<a href="#users">` to `<button data-bs-target="#users">` (Bootstrap 5's
  recommended pattern), so the anchor jump can't happen.

Other refinements: table padding loosened, `transform: scale` row hover
removed (jittery on dense rows), modal headers switched to near-black,
Chart.js palette aligned with brand tokens.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 10:12:18 +02:00
nickviljoen
938691e598 Add filtered XLSX export, fix completion reminders, consolidate admin UI
Export & filtering
- Replace /api/admin/agents/export/csv with /api/admin/agents/export/xlsx
  (openpyxl). Multi-line system prompts stay inside one cell instead of
  fragmenting into thousands of rows when opened in Excel.
- Accept filter query params on export: status, discipline, audit,
  business_entity, agent_classification, autonomy_level, risks_only, search.
- Move Export/Import CSV/Delete by CSV buttons into the Agents Management
  tab, drop the duplicate links from the top nav, and rebuild the cramped
  filter row as a wrappable two-row layout.
- Add a Discipline dropdown to the Agents Management filter row to match
  the Prompt Audit tab.

Completion-reminder emails (fix for the broken Complete-button links)
- Add h:Reply-To header to every Mailgun send so users can reply to a real
  mailbox instead of noreply@. Default Nick.Viljoen@oliver.agency, overridable
  via NOTIFICATION_REPLY_TO env var.
- send_completion_reminders now skips with an error log when
  AGENTHUB_PUBLIC_URL is unset instead of mailing relative links email
  clients can't follow.

UI polish
- Restrict the 5-second alert auto-hide to .alert-dismissible so the
  load-bearing 'unresolved owner' banner stays visible until acted on.
- Move the orange brand gradient to a fixed body::before pseudo-element so
  it can't be covered by the white content card or scrolled out of view.
- Lock the navbar to viewport top (position: fixed) and reserve body
  padding-top so content doesn't sit beneath it.

Audit polish (carried over from previous WIP)
- Add batch-state tracking to audit_analyzer for in-flight progress visibility.
- Update PLAN-prompt-audit.md to match the shipped behaviour.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 22:45:29 +02:00
nickviljoen
54ecd31bdd Add registration form redesign with completion flow for LibreChat-synced agents
Rebuilds the agent registration form into 7 governance sections (Identity,
Classification, Autonomy, IP, Tech Stack, Data Safety, Performance, Declarations)
and introduces a completion flow for agents that come in via the LibreChat
collector without the new required fields.

- New form fields: business_entity, client_scope, agent_classification,
  autonomy_level, ip_ownership, foundation_model, validated_by/date, evals_method,
  plus nested safety / pii / declarations objects and a registration_complete flag.
- registration_complete defaults to true for form-submitted agents and false for
  collector-created ones; existing agents are grandfathered via a startup migration.
- Owner-by-email lookup so LibreChat-synced agents surface in the user's "My Agents"
  view with an Incomplete badge and Complete CTA. Submitting the completion form
  reassigns created_by from the collector marker to the user.
- Daily APScheduler job sends a digest reminder email per owner with a 7-day
  cooldown and 4-nudge cap (configurable). Manual trigger via
  POST /api/admin/completion-reminders/send.
- Admin banner + modal for collector agents whose contact email doesn't match an
  active user, with one-click reassignment.
- Gemini audit extended to also return agent_classification and an autonomy hint;
  applied to agents on next batch run alongside discipline/department.
- New filter dimensions on agent management + admin dashboard: Business Entity,
  Agent Type, Autonomy, plus a Compliance Risks quick toggle.
- CSV export/import gains 21 columns covering all governance fields.
- Discipline 'Optimization' renamed to 'Optimisation' with idempotent startup
  migration; Gemini system prompt and template dropdowns updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 18:26:55 +02:00
nickviljoen
32b08f8b0c Add Prompt Audit & Auto-Classification feature with Gemini integration
Adds Gemini-powered agent classification system that analyzes agent instructions
to determine category, risk level, discipline, and client detection. Includes
admin Prompt Audit tab, audit review workflow, and auto-classification on sync.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 18:29:35 +02:00
nickviljoen
a979b32193 Exclude placeholder @agenthub.com emails from notification recipients
The default admin@agenthub.com account is not a real email address,
causing delivery failures when notifications are sent. Filter it out
from both threshold alerts and weekly digest recipient queries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 08:46:10 +02:00
nickviljoen
d609abe606 Tidy agent description display: truncate on home cards, scrollable box on admin table
- Home page agent cards show truncated purpose (max 100 chars) instead of full description
- Admin dashboard table shows description in a scrollable container (max 80px)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:00:45 +02:00
nickviljoen
0ba77d9b99 Remove .env from git tracking (already in .gitignore)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 10:42:23 +02:00
nickviljoen
f7e88513b1 Change token usage alert to 7-day rolling window and convert daily digest to weekly Monday digest
- High token usage notification now sums usage_timeline tokens over last 7 days instead of checking lifetime total
- Daily agent digest converted to weekly digest, scheduled for Monday mornings
- Email subjects and templates updated to reflect weekly timeframes
- Env var DAILY_DIGEST_HOUR renamed to WEEKLY_DIGEST_HOUR

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 10:41:09 +02:00
nickviljoen
6c231cb094 Add read-only admin role, client verification workflow, and email notifications
- Three-tier role system: user, admin, readonly_admin with dashboard gating
- Client field (Yes/No) on registration with conditional Client Name and Studio Name
- Auto-tag client agents as "needs_verification" with Verification tab on admin dashboard
- Client agent email notification via Mailgun to configured recipients
- Daily agent digest email scheduled via APScheduler (configurable hour)
- Manual digest trigger endpoint: POST /api/admin/digest/send
- Role dropdown replaces is_admin checkbox in user edit modal
- Registration form reordered: Name, Description, Purpose, Client, Client Name, Studio, Tool
- Stat card CSS fix for text truncation on admin dashboard
- Updated CLAUDE.md documentation and PLAN file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:47:02 +02:00
nickviljoen
3bc757b99c Add star rating display on agent cards and rating filter
Show inline star icons on agent listing cards so ratings are visible
without opening the detail modal. Add rating filter dropdown (5, 4+,
3+, 2+, 1+, Unrated) alongside existing filters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:16:49 +02:00
nickviljoen
cba9e57db9 Add prompt_tokens and completion_tokens to collector API and UI
Supports the token breakdown (prompt/completion) now sent by agent-sync
from LibreChat's transactions collection. Updates models, collector
endpoint, usage stats, CSV export, and agent card/modal display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:35:26 +02:00
nickviljoen
62138e9142 Add per-user rating system, rating framework modal, and Pencil Agents discipline
- Replace single-owner rating with per-user ratings stored in agent_ratings collection
- Any authenticated user can now rate any agent; average is computed and stored on agent doc
- Add GET /api/agents/{id}/my-rating endpoint for fetching user's own rating
- Add rating framework info modal showing 1-5 scale definitions and 4 performance areas
- Add "Pencil Agents" discipline with auto-tagging for agents with "pencil" in name
- Run Pencil migration on startup and auto-tag in collector API
- Remove star rating from edit modals (rating is now per-user, not admin-set)
- Add rating_count field to AiAgentResponse and CSV export

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:34:41 +02:00
nickviljoen
a50ef3ec64 Add discipline field, star rating system, and dashboard filtering
- Add discipline (business category) and rating (1-5 stars) fields to agent models
- Discipline dropdown on registration form (required) and edit modals (both user and admin)
- Interactive star rating widget with immediate save via PUT /api/agents/{id}/rating
- Discipline filter and rating sort on agent management dashboard
- Purple discipline badge and gold star badge on agent cards
- CSV export/import support for discipline, rating, and total_tokens
- Initialize total_tokens on manually-created agents for consistent CSV exports
- Search agents by discipline field

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 21:38:53 +02:00
nickviljoen
0e7940801b Fix cryptography package version to 41.0.7
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 21:49:17 +02:00
nickviljoen
1e926da807 Add token tracking, audit filter, and high usage email notifications
- Add audit status filter (Audited/Not Audited) to agent management and admin dashboard
- Add token usage tracking: token_count per timeline entry, total_tokens on agents
- Token badge on agent cards, Total Tokens stat in usage modal, dual-axis chart
- Sort by Total Tokens option, total_tokens in CSV export
- Mailgun email notifications for high token usage (optional, non-blocking)
- Cooldown-based notification tracking in MongoDB token_notifications collection
- Add promote_admin.py utility script for user promotion
- Update CLAUDE.md documentation for all new features

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 21:48:04 +02:00
michael
1d53c33d07 Fix route order for POST /api/admin/users endpoint
Move POST /api/admin/users before PUT /api/admin/users/{email}
to fix "Method Not Allowed" error when creating users.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 07:24:58 -06:00
michael
48db28b8fb Add local user login alongside Microsoft SSO
- Show both Microsoft SSO and local login options on login page
- Add admin user management: create local users with password
- Add admin password reset for local users only
- Add self-service password change on profile page for local users
- Display auth provider (Local/SSO) in admin user table
- New API endpoints: POST /api/admin/users, POST /api/admin/users/{email}/reset-password, POST /api/users/change-password
- SSO and local auth remain separate (no dual-auth)
- Minimum 8 character password requirement

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 06:58:45 -06:00
michael
3c32064c23 Skip 5-minute duplicate check during CSV import 2025-11-19 16:15:13 -06:00
michael
56ae3f41a4 Update CSV import to append location for duplicate agents 2025-11-19 16:04:38 -06:00
michael
30a1c4ab46 Implement Delete by CSV functionality 2025-11-19 15:55:10 -06:00
michael
21544ab529 Implement CSV import functionality 2025-11-19 15:36:43 -06:00
michael
d160b1bc90 added URL property to agents (link to agent) and fixed redirect base paths 2025-10-28 14:51:26 -05:00
michael
cebc1cf649 added sorting by usage and users, added usage and users to card display, and enabled serach for tags 2025-10-22 08:43:13 -05:00
michael
50e0daf4c4 fixed display of conversations and unique users in UI 2025-10-21 09:33:04 -05:00
michael
80e2885747 adjusted API to accommodate usage tracking from sync app on librechat server 2025-10-21 08:27:24 -05:00
michael
48ee1298e9 added risk factor to quality audit functionality - risk factor is required when cheking quality audit box - both these fields are admin only 2025-09-05 14:04:18 -05:00
michael
f811854198 added Quality Audit and fixed various bugs 2025-09-05 13:41:33 -05:00
michael
db62e2d92d updated README 2025-08-17 07:29:50 -05:00
michael
99e8f0aaa9 initial commit 2025-08-17 07:23:53 -05:00