Commit Graph

44 Commits

Author SHA1 Message Date
nogueiraguh
8bccf9367e feat: chat history, inline file editor, split terminal, OCI resource actions, and layout fixes
- Add ChatGPT-style chat history for Chat Agent and Terraform Agent (sessions, rename, delete)
- Add inline .tf file editor with Tab support and auto-sync to workspace code
- Add split-panel terminal showing Plan/Apply/Destroy output alongside files/plan/resources
- Add OCI resource actions: start/stop Compute instances and Autonomous DBs from Resources panel
- Add multi-file Terraform generation via // filename: markers
- Fix GenAI empty response handling (GPT-5.2 fallback message)
- Fix compartment select visibility, Terraform code block light theme
- Fix page layout overflow (no more scroll beyond viewport)
- Add DB migration for terraform_workspaces.compartment_id column
- Update README with new features, API endpoints, and version notes
2026-03-08 00:15:10 -03:00
nogueiraguh
a05956a726 ui: modernize Downloads file list with compact rows, file-type icons, and hover states
Replace button-based file layout with a clean list view featuring colored
file-type badges (HTML/CSV/JSON/XLSX), formatted sizes, download icons,
hover highlights, and category headers with emoji icons. Collapsible
report cards now show file count and use chevron rotation animation.
2026-03-07 18:32:15 -03:00
nogueiraguh
c7c4ca1f1b feat: Terraform Agent, expanded OCI Explorer (40+ resources), and MCP improvements
Add Terraform Agent tab with AI-powered IaC generation (plan/apply/destroy lifecycle,
workspace management, compartment selection, Terraform CLI v1.7.5 in container).
Expand OCI Explorer from 6 to 40+ resource types across 8 categories with tree-view
navigation and resizable panels. Add compartment filtering and error tracking to MCP
CIS server, increase tool timeout to 30min with auto-retry. Add chat sidebar, chat
audit logs, and tune memory compaction (6K threshold, 20 recent messages). Trim model
catalog from 69 to 15 curated models. Update README for v2.1.
2026-03-07 12:39:20 -03:00
nogueiraguh
3e13cf4677 refactor: trim GenAI models from 69 to 15, set GPT-4.1 as default
Keep only the best model per provider family (Meta, Google, OpenAI, xAI).
Remove Codex variants, Image/Audio/Search models, ProtectAI, and redundant
versions. GPT-4.1 is now pre-selected when creating a new GenAI config.
2026-03-06 11:24:22 -03:00
nogueiraguh
2d024d3130 feat: async background chat, performance scaling, and dead code cleanup
Async chat processing eliminates 504 timeouts - POST returns immediately,
backend processes in background, frontend polls for results with timestamps.
Scale to ~12 simultaneous chats via 8 uvicorn workers + 16-thread executor.
Parallelized MCP data collection, 2h session cache, 5min tool timeout.
Full dead code cleanup across backend, frontend, MCP, docker, and nginx.
2026-03-06 11:06:21 -03:00
nogueiraguh
ef43eaa7ba feat: multimodal chat, region-specific MCP scanning, and resilience improvements
Add image/PDF/text file upload in chat via new /api/chat/upload endpoint
with OCI GenAI ImageContent and DocumentContent support. Frontend shows
attach button, file preview, and handles multipart upload seamlessly.

Add optional regions parameter to all CIS MCP scan tools for targeting
specific OCI regions instead of full tenancy. Session cache scoped by
config+regions for concurrent multi-region scans.

Add orphaned report auto-detection on progress poll (marks as failed if
process not found). Increase nginx proxy timeout to 15 minutes. Improve
$api error handling for non-JSON responses (504 HTML pages).

Update README to v1.9.
2026-03-05 13:27:17 -03:00
nogueiraguh
1d52234b1a refactor: reorganize Reports and Downloads tabs, update README
Move report history/status table to Reports tab. Simplify Downloads tab
to show only completed reports with expandable file browser grouped by
category. Add CIS Level description tooltip and fix log expand persisting
during report generation polling.
2026-03-05 11:55:05 -03:00
nogueiraguh
3cef21b6dd feat: add CIS Level description tooltip in Reports form
Show dynamic informational text below the CIS Level selector explaining
what Level 1 and Level 2 mean, updating as the user changes selection.
2026-03-05 11:29:04 -03:00
nogueiraguh
973ff65989 feat: Oracle CIS report engine, CIS engine auto-update, and granular report params
Replace lightweight cis_runner.py with Oracle's official cis_reports.py engine
(6660 lines, 48 CIS + 11 OBP checks). Add granular execution parameters (Level,
OBP, Raw Data, Redact), per-report file storage with category browser, tenancy
filter in Downloads, and individual file download.

Add CIS Engine auto-update: check/download latest cis_reports.py from Oracle's
GitHub repo with automatic patch reapplication (admin UI card + 3 new endpoints).
Save engine version to app_settings on startup.

Update README to v1.8 with new features, API endpoints, and versioning table.
2026-03-05 11:11:31 -03:00
nogueiraguh
5038403d08 feat: granular CIS MCP server, chat memory compaction, and UX improvements
- Rewrite mcp_cis_server.py with per-section scan tools (IAM, Networking,
  Compute, Logging/Monitoring, Storage, Asset Management) instead of
  monolithic full-tenancy scan — 12 granular tools
- Add cis_reports.py (Oracle CIS Benchmark checker) to backend
- Add chat memory compaction: auto-summarize old messages when history
  exceeds ~8000 tokens, keeping 6 recent messages intact
- Fix GenAI tool use loop: accumulate assistant+tool messages across
  iterations for proper conversation flow (Generic format)
- Remove tenancy confirmation section from system prompt
- Add thinking indicator and button disable in chat UI while waiting
- Add requests dependency for cis_reports.py
- Fix NoneType error in cis_reports.py region filtering
2026-03-05 08:26:43 -03:00
nogueiraguh
f259239a17 docs: update README for v1.5 with MCP Tool Use and multi-table ADB features 2026-03-04 23:24:13 -03:00
nogueiraguh
0f5c805601 feat: integrate MCP servers as tools in Chat Agent with function calling
Add MCP tool discovery (auto + manual), tool execution via MCP SDK,
and GenAI function calling loop (Cohere + Generic formats) so the
chat agent can invoke MCP server tools during conversations.

- Add mcp SDK dependency
- New endpoints: discover-tools, update tools
- Modify _call_genai to support tools/tool_results and return (text, tool_calls)
- Tool use loop in chat endpoint (max 5 iterations)
- Frontend: tools management in MCP cards, chat toggle, tools_used display
- Multi-table ADB vector search, enriched embeddings, preview chunks
- Orphaned report cleanup on container restart
- Nginx no-cache headers, searchable dropdowns, editable vector tables
2026-03-04 23:15:27 -03:00
nogueiraguh
7448f98ce0 fix: remove dated OpenAI model variants and GPT-5.2 Pro from catalog
Remove 18 duplicate OpenAI models with date suffixes (e.g. 2025-04-14)
and GPT-5.2 Pro (Responses API only) to keep the model list clean.
2026-03-04 14:58:39 -03:00
nogueiraguh
2071fa037a fix: remove unavailable Cohere models and fix xAI Grok param support
- Remove 5 Cohere chat models (not available in us-ashburn-1)
- Remove 9 legacy Cohere embedding models (v3.0), keep embed-v4.0
- Update default embedding model to cohere.embed-v4.0
- Skip presence_penalty, frequency_penalty, top_k for xAI models
- Remove Cohere from chat provider order in frontend
2026-03-04 13:53:57 -03:00
nogueiraguh
904d5c4cd7 fix: filter GPT-5.2 Pro from chat (Responses API only, not chat)
GPT-5.2 Pro and its dated variant only support the Responses API,
not Chat Completions. OCI GenAI uses chat/completions internally,
causing a 400 error. Also trim debug log to a shorter format.
2026-03-04 07:54:56 -03:00
nogueiraguh
84f35a50fe feat: replace model select with searchable dropdown in Chat tab
Custom dropdown with search filter and max-height scroll (220px).
Models grouped by provider with sticky group headers. Click outside
to close. Handles 60+ models without overwhelming the UI.
2026-03-04 07:38:31 -03:00
nogueiraguh
4de5852430 fix: filter non-chat models (Codex, Image, Audio, GPT-oss) from Chat dropdown
These models use the completions endpoint, not chat/completions,
and return 400 errors when used via the chat API.
2026-03-03 23:43:29 -03:00
nogueiraguh
749875a3cd refactor: move GenAI parameters to Chat tab, simplify GenAI Config
Remove temperature, max_tokens, top_p, top_k, frequency/presence
penalty fields from the GenAI Config tab. That tab is now focused
on adding custom models not in the catalog.

Parameters are now managed exclusively in the Chat tab via the
collapsible gear panel, available for both direct models and saved
configs. Inline params override stored defaults when using presets.
2026-03-03 20:22:47 -03:00
nogueiraguh
13b98209d5 feat: direct model selection in Chat tab without pre-configuration
Users can now pick any model from the full catalog directly in the Chat
tab using optgroups by provider (OpenAI, Google, Meta, Cohere, xAI),
without needing to pre-configure it in GenAI Config. OCI credentials,
region, and compartment auto-fill from the selected credential.

A collapsible parameters panel (temperature, max_tokens, top_p, top_k,
frequency/presence penalty) is available via the gear icon.

Saved GenAI configs still appear at the top of the dropdown as presets.
2026-03-03 20:12:26 -03:00
nogueiraguh
04e35dc681 fix: use max_completion_tokens for OpenAI models on OCI GenAI
OpenAI models reject 'max_tokens' and require 'max_completion_tokens'.
Also skip 'top_k' for OpenAI as it is unsupported. Detection is based
on the provider field in the model catalog.
2026-03-03 20:02:22 -03:00
nogueiraguh
dcd2685671 feat: add OCID resolution for all GenAI models (fixes 404 on OpenAI)
Models like OpenAI GPT-5.2 require the full OCID rather than the short
model_id. The catalog now maps model IDs to OCIDs per region (us-ashburn-1).
_call_genai and _embed_text resolve the OCID for the configured region
at runtime, falling back to short model_id for unmapped regions.

New models added from OCI portal: GPT-5.3/5.2/5.1/5 Codex, GPT Image
1/1.5, Llama Guard 4, ProtectAI DeBERTa, OpenAI Text Embedding 3
Large/Small. Total: 69 chat + 11 embedding models.
2026-03-03 19:50:55 -03:00
nogueiraguh
408ca45ee3 feat: expand GenAI catalog to 63 chat models from OCI portal
Add all models available in OCI GenAI Ashburn region including
OpenAI GPT-5.2/5.1/5/4.1/4o, o1/o3/o4-mini, GPT Audio,
xAI Grok 4.1/4 reasoning/non-reasoning variants, and update
README with complete model table and Model IDs.
2026-03-03 19:28:54 -03:00
nogueiraguh
ea71dff699 feat: improve custom model OCID support for GenAI config
- Add "Personalizado (usar OCID)" option in model select dropdown
- Validate OCID is required when custom model is selected
- Improve Model OCID field hint text explaining portal usage
- Show "OCID Personalizado" label in config table for custom models
- Allows using any OCI GenAI model via OCID from the portal
2026-03-03 19:23:50 -03:00
nogueiraguh
723e2a47a1 feat: add all OCI GenAI models — 26 chat models and 9 embedding models
Complete model catalog from Oracle Cloud Infrastructure GenAI docs:
- Cohere: Command A Reasoning, Vision, A, R+, R
- Meta: Llama 4 Maverick/Scout, 3.3 70B, 3.2 90B/11B Vision, 3.1 405B
- Google: Gemini 2.5 Pro, Flash, Flash-Lite
- xAI: Grok Code Fast 1, 4.1 Fast, 4 Fast, 4, 3, 3 Mini, 3 Fast, 3 Mini Fast
- OpenAI: GPT-oss 120B, 20B
- Embeddings: Cohere Embed v4.0, English/Multilingual v3.0 + Light + Image variants
- Updated model IDs to match official OCI SDK format
2026-03-03 19:07:38 -03:00
nogueiraguh
09371cb675 feat: add in-place config editing, OpenAI GPT-oss models, and Cohere Embed v4.0
- Add PUT endpoints for editing OCI, GenAI, ADB, and MCP configurations
- Add edit buttons in all config tables with inline form pre-fill
- Add OpenAI GPT-oss 120B and 20B models to GenAI catalog
- Add Cohere Embed v4.0 (Multimodal, 1536d) to embedding catalog
- Update OCI list endpoint to return user_ocid and fingerprint for editing
- Add S.editing state management with cancel support
- Bump version to 1.4
2026-03-03 19:02:26 -03:00
nogueiraguh
d71ed4e08a docs: update README with key passphrase support and Docker troubleshooting 2026-03-03 17:15:10 -03:00
nogueiraguh
880c26530c fix: prevent passphrase prompt hang in Docker by closing stdin and detecting encrypted keys
Added stdin=subprocess.DEVNULL to OCI CLI subprocess call so it fails fast
instead of hanging when a passphrase prompt would occur. Added detection of
encrypted PEM keys at upload time — rejects with clear error message if
passphrase is missing. Improved error message when passphrase-related
errors are detected during test.
2026-03-03 16:09:45 -03:00
nogueiraguh
0ca60fb017 fix: add key passphrase support for encrypted OCI private keys
Private keys with passphrase caused EOFError in Docker containers since
getpass cannot prompt without a TTY. Added optional "Key Passphrase" field
to OCI credentials form. When provided, pass_phrase is written to the OCI
config file so both the CLI and SDK can read the key without prompting.
2026-03-03 16:01:18 -03:00
nogueiraguh
336766dae2 docs: update README for v1.3 with config logs and GenAI auto-fill
Added Config Logs section to features, updated GenAI setup guide to reflect
auto-fill from OCI credentials, added config-logs API endpoints to reference,
and added v1.3 to versioning table. Bumped version badge to 1.3.
2026-03-03 15:49:18 -03:00
nogueiraguh
5a28f0d56f feat: add persistent config logs panel and auto-fill GenAI from OCI credentials
Backend: new config_logs table with _config_log() helper, instrumented across
all test/save/upload/report/ingest endpoints (OCI, GenAI, ADB, MCP). Added
GET/DELETE /api/config-logs with filtering by type, severity, and auto-cleanup
of logs older than 30 days.

Frontend: inline "Log de Atividades" panel at the bottom of each config tab
(OCI, GenAI, ADB, MCP) with severity filter dropdown. Replaced all remaining
alert() calls in test functions with inline sm() messages. GenAI config now
auto-fills Region and Compartment OCID when selecting an OCI credential.
2026-03-03 15:21:38 -03:00
nogueiraguh
edc4652b35 fix: resolve MCP type field switching bug and improve UX feedback across all forms
mcpTypeFields() used getElementById('mt') but radio buttons only had name="mt",
causing all fields to disappear when switching server types. Replaced with
querySelector for checked radio. Also added loading spinners, inline messages
(replacing alert()), and state refresh after async operations in uWallet, uMcp,
lnkMcp, sOci, sGenai, sAdb, sMcp, embedFile, and embedReport.
2026-03-03 14:44:46 -03:00
nogueiraguh
7e69ad8685 refactor: redesign MCP Servers menu for clearer layout
Replace confusing table+upload card layout with individual server cards,
radio button type selector with dynamic fields, and inline actions per server.
2026-03-03 10:19:37 -03:00
nogueiraguh
77a4824907 docs: update README for v1.2 with RAG and Embeddings features
- Update version badge to 1.2
- Add RAG description to AI Chat Agent section
- Add Embeddings Management section with feature details
- Add RAG Pipeline to architecture diagram
- Add Embeddings API endpoints to API Reference
- Add Embedding Models table (Cohere Embed v3.0/light)
- Update ADB Vector setup guide with GenAI config and embedding model
- Add Step 5 for Embeddings workflow
- Update project structure line counts
- Add v1.2 to version history
2026-03-02 20:13:01 -03:00
nogueiraguh
b7991d7200 feat: add dedicated Embeddings tab with report chunking and file upload
Add a new Embeddings menu in the sidebar for managing vector embeddings
separately from ADB config. Supports embedding CIS reports (chunked by
section) and uploading .txt files (chunked by paragraphs). Includes
listing and deleting individual embeddings from the ADB vector store.

- Add _chunk_report_by_section() for CIS report sectional chunking
- Add _chunk_text_file() for paragraph-based text chunking
- Add POST /api/embeddings/report/{rid} endpoint
- Add POST /api/embeddings/upload endpoint (multipart)
- Add GET /api/embeddings/{vid}/list with pagination
- Add DELETE /api/embeddings/{vid}/{doc_id}
- Add Embeddings tab in frontend with 3 cards (list, report, upload)
- Remove ingestion section from ADB Vector tab
2026-03-02 20:07:19 -03:00
nogueiraguh
2c3fb724bf feat: add RAG pipeline with OCI GenAI embeddings and ADB vector search
Integrate Retrieval-Augmented Generation into the chat flow using OCI
GenAI embed_text API and Oracle Autonomous Database vector storage.
The chat automatically queries ADB for relevant context when an active
ADB config with a linked GenAI config exists.

- Add EMBEDDING_MODELS catalog (Cohere Embed v3.0/light)
- Add _embed_text() using OCI GenAI SDK embed endpoint
- Add _vector_search() with VECTOR_DISTANCE cosine similarity
- Add _get_adb_connection(), _ensure_embeddings_table(), _build_rag_context()
- Add document ingestion endpoint (POST /api/adb/{vid}/ingest)
- Add table creation endpoint (POST /api/adb/{vid}/ensure-table)
- Modify chat endpoint with automatic RAG augmentation (non-fatal)
- Add GenAI config and embedding model selectors to ADB UI
- Add RAG status indicator in chat toolbar
- Add document ingestion section in ADB tab
2026-03-02 19:48:53 -03:00
nogueiraguh
11343af59a add new front 2026-02-27 23:17:40 -03:00
nogueiraguh
028df6773a docs: add logo to README 2026-02-27 20:24:02 -03:00
nogueiraguh
3c1d87dde3 feat: custom Oracle AI robot logo 2026-02-27 20:20:22 -03:00
nogueiraguh
3b5b0c7c2a docs: add comprehensive README for v1.1 2026-02-27 19:47:16 -03:00
nogueiraguh
c759d0f06d feat: v2 - OCI light theme, GenAI integration, MCP servers, ADB vector 2026-02-27 18:54:38 -03:00
nogueiraguh
faf54ec611 fix: organize project structure into backend/frontend/nginx folders 2026-02-27 18:22:50 -03:00
nogueiragustavo
aa561a87f3 Add files via upload 2026-02-26 19:47:52 -03:00
nogueiragustavo
3a8e8a5d54 Add docker-compose configuration for backend and frontend 2026-02-26 19:41:27 -03:00
nogueiragustavo
86ee587be7 Initial commit 2026-02-26 19:37:07 -03:00