Commit Graph

47 Commits

Author SHA1 Message Date
nogueiraguh
426bde563e refactor: reorganize project structure — frontend/, infra/, clean paths 2026-04-05 21:57:18 -03:00
nogueiraguh
03db9d6b8a feat: automated setup.sh, OCIR login helper with encrypted credentials, README updates 2026-04-03 17:51:53 -03:00
nogueiraguh
f22bb54e25 feat: Oracle IAM OIDC, force password change, security hardening
- OIDC: authorization code flow, JWKS validation, JIT provisioning, group-to-role mapping, dual auth (local/oidc/both)
- Force password change: random admin password on first install, modal blocks UI until changed
- APP_SECRET required in docker-compose (fail if missing), .env.example improved
- Login page: Oracle IAM button (conditional), hide form in oidc-only mode
- OracleIamPage: test connection via backend, masked client_secret handling
- UsersPage: OIDC badge, auth_provider in list
- i18n: login.oidcButton, login.or (pt/en/es)
- README v3.1: Terminal, User Management, Security, OIDC endpoints, versioning
2026-04-02 10:26:00 -03:00
nogueiraguh
1b3c02d10b feat: v3.0 — CIS PDF chunker, DOCX professional, RAG complete, progress bar, code cleanup
- CIS PDF chunker: segments by recommendation (54/54 complete with desc+rationale+rem), 7000 chars target, 500 overlap
- RAG: 60s timeout + retry, direct SQL fetch by recommendationNumber, concatenate all chunks
- Auto-detect embedding dimension from DDL (empty tables), auto-detect model per dimension
- DOCX: camo strip (Pillow), A4 centered cover, code blocks (Consolas), lists with hanging indent
- Compliance report: progress bar (RAG X/35 percentage), Audit/Verification bold
- Code cleanup: removed redundant imports (io, base64, time, Response, HTMLResponse), duplicate DB query
- EmbeddingsPage: auto-select ADB config fix
- ReportsPage: removed DOCX preview (docx-preview lib)
- README updated to v3.0 with all new features
2026-03-31 10:44:13 -03:00
nogueiraguh
21205cb093 docs: manual diagram alignment fix 2026-03-26 10:35:50 -03:00
nogueiraguh
eb9e3d3973 docs: fix diagram box alignment 2026-03-26 10:26:43 -03:00
nogueiraguh
ab41a7fbb1 docs: fix architecture diagram alignment (ASCII-safe box drawing) 2026-03-26 10:24:05 -03:00
nogueiraguh
b11cc44648 docs: modernized architecture diagram with full component detail 2026-03-26 10:16:57 -03:00
nogueiraguh
ee550b6632 docs: add ADB table creation SQL and detailed descriptions to README 2026-03-26 09:43:58 -03:00
nogueiraguh
fabb0e96b5 chore: cleanup git — remove IDE files, LESSONS_LEARNED, update README
- Removed from git: .idea/, .DS_Store, LESSONS_LEARNED.md, frontend-react/README.md
- Updated .gitignore: added LESSONS_LEARNED.md, dist/, .vscode/, **/.DS_Store
- Removed legacy frontend/ directory from disk
- README: updated thread pool 16→10, Terraform 1.7.5→1.14.7, i18n 625→700+ keys
- README: added RAG optimizations (single connection, smart skip, follow-up enrichment, source hierarchy)
- README: added embedding features (auto-map, per-section, CIS tagging, progress bar, background persistence)
- README: updated Dockerfile description (Chromium), stores description (app state persistence)
2026-03-26 09:38:50 -03:00
nogueiraguh
f972b4edf8 docs: remove scripts/ from README project structure 2026-03-21 13:49:23 -03:00
nogueiraguh
41252c5d2a docs: README accuracy update — fix counts, tech stack, remove stale references
- Chart.js → Recharts (actual library used)
- 15 chat models → 16
- app.py ~6700 → ~7700 lines
- 42 source files → 38, ~12500 → ~15500 lines
- 16 pages → 15 pages
- Downloads tab → integrated in Reports page
- Removed PDF template reference (file deleted)
- Scripts: clarified reportgenerator.js is reference only
- Project structure page count corrected
2026-03-21 13:48:42 -03:00
nogueiraguh
73c60212f7 feat: auto-mapped CIS report embedding, section embed, ADB RAW(16) fix
- Auto-embed report: maps each CSV to its ADB table (summaryreportcsvvector, identityandaccess, networking, etc.)
- Section embed: new endpoint POST /api/embeddings/report/{rid}/section with per-section button in UI
- Table validation: checks registered ADB tables before embedding, reports missing tables
- Auto-detect embedding dimension: reads table dim and selects correct model (3072→large, 1536→small)
- ADB RAW(16) ID fix: all vector inserts use HEXTORAW() for UUID (fixes ORA-01465)
- Float32 vectors: all inserts use array.array('f') for FLOAT32 compatibility
- Embedding status: real-time progress polling (Embedding X/Y — table: Z)
- Loading per section: spinner only on the section being embedded, not all
- Removed individual file embed buttons (only section + full report)
- Summary CSV chunking: groups by CIS section with tenancy + extract_date metadata
- Findings CSV chunking: each row becomes a document with structured content
- README: documented all 11 required ADB vector tables with descriptions
2026-03-21 00:10:50 -03:00
nogueiraguh
61fbb3861d feat: remove legacy frontend, root routing, compliance ZIP with Chromium PDF, chat markdown styling
- Legacy frontend removed: React SPA served at / (no /app/ prefix)
- Compliance report ZIP: Chromium headless --print-to-pdf (identical to browser) + CSV findings
- Server-side generation state: .compliance_generating marker survives page navigation
- RAG enriched: Description + Rationale + Remediation + Audit extracted from CIS vector chunks
- Chat markdown: syntax highlighting (Catppuccin), styled headings/lists/tables/blockquotes/code
- Default model auto-selected on Chat Agent load
2026-03-20 07:21:41 -03:00
nogueiraguh
442e710b9f feat: LAD A-Team CIS Compliance Report, React SPA, i18n, report management, explorer UX fixes
- Professional Oracle-format compliance report with RAG remediation from ADB vector store
- React 19 SPA at /app/ (16 pages, TypeScript, Vite, Zustand, i18n pt/en 625 keys)
- Report delete endpoint, embed individual report files into vector store
- Terraform ZIP download (client-side, pure JS)
- Explorer silent polling during start/stop (no flickering)
- HTML report and compliance report sections start minimized
- Token auth fix for compliance report CSV download links
2026-03-19 07:34:06 -03:00
nogueiraguh
baacc1ba21 feat: session token auth, workspace submenu, retry buttons, terraform fixes, app rename
- Rename app to "AI Agent - Infrastructure & Security Engineer"
- OCI session token authentication (SecurityTokenSigner, conditional form, type tags)
- Terraform Workspaces sidebar sub-tab (date-grouped accordion, INNER JOIN filter)
- Retry button on failed messages (Chat, Terraform, Prompt Generator)
- Fix f2 undefined in dedup, oci_core_services false validation, Re-plan tfCode sync
- Auto-fix button no longer requires pre-selected model
- DRG attachment rules added to Terraform system prompt
- Stuck workspace recovery on container restart
2026-03-12 18:39:35 -03:00
nogueiraguh
18fabec805 feat: Explorer KPI stats, enhanced views, start/stop expansion, Prompt Generator docs injection
- Explorer: KPI stats bar with cached counts (SQLite), background refresh,
  enhanced views for VCNs/Subnets/LBs/Buckets, start/stop for DB Systems,
  MySQL, Container Instances, dead state filtering across all 36 endpoints
- Prompt Generator: same knowledge pipeline as Terraform Agent — resource
  type detection + official docs from GitHub + compact resource reference
- Fix: NetworkFirewallPolicySummaryCollection not iterable (.items accessor)
2026-03-12 11:24:38 -03:00
nogueiraguh
e4ba2cfaab feat: region safety guard, rollback button, SSH key support, split-panel layout
- Block terraform plan if model omits variable "region" (prevents wrong-region provisioning)
- Rollback button on apply failure with ROLLBACK confirmation modal
- SSH public key field in OCI configs, auto-injected into terraform.tfvars
- Split-panel layout: terminal right (40%), files/plan/resources below chat (60%)
- reasoning_effort uppercase fix for OCI SDK
- Plan button persists after destroy status
2026-03-12 00:26:13 -03:00
nogueiraguh
58d430c904 feat: terraform prompt generator, provider parameter matrix, and model penalties
- Add Terraform Prompt Generator: AI-powered structured prompt generation
  with dedicated chat UI, curated model selection (7 models), conversation
  history with persistent sessions, and OCI TF resource reference context
- Provider parameter matrix: segment API params per model/provider,
  explicitly null unsupported params (freq/pres penalty, temperature)
  to prevent OCI SDK serialization errors
- Add penalties flag to model catalog: only GPT-4.1/4.1-mini/4o support
  frequency_penalty and presence_penalty
- Flat workspace enforcement: prohibit module blocks and duplicate
  variable declarations in Terraform system prompt
- Prompt Generator history: sidebar panel with session persistence,
  restore, rename/delete (agent_type tf-prompt)
2026-03-11 13:55:59 -03:00
nogueiraguh
749f4e479b feat: consult embeddings UI, vector search FLOAT32 fix, and base64 compartment decode
- Add Consult Embeddings sub-menu with chat-like Q&A interface
- Fix VECTOR_DISTANCE FLOAT32/FLOAT64 mismatch (array 'd' → 'f')
- Decode base64 compartment_id in _resolve_embed_config
- Sidebar sub-item navigation for Embeddings hierarchy
- Fallback to raw document display when no GenAI config available
2026-03-11 03:06:53 -03:00
nogueiraguh
4a802c8e64 feat: knowledge base with URL import, ADB case-sensitivity fix, and RAG enhancements
- Add Knowledge Base (Base de Conhecimento) with file upload + URL import
- URL content extraction: HTML stripping, remote PDF parsing
- Auto-resolve embedding config from OCI credentials
- Case-insensitive ADB table matching with quoted identifiers
- Table validation endpoint, report_date metadata, purge & re-embed flow
- Embeddings tab cleanup, PyPDF2 dependency, README updated to v2.3
2026-03-11 02:02:31 -03:00
nogueiraguh
851def30b6 feat: Terraform intelligence, anti-flickering, and v2.2 release
- Official resource docs injection from registry.terraform.io (on-demand fetch + SQLite cache)
- Smart tfvars auto-generation from declared variables (tenancy_ocid, user_ocid, etc.)
- Multi-region provider: use var.region instead of hardcoded OCI config region
- RPC anti-cycle rule in system prompt
- System prompt auto-sync to DB on restart
- Fix UI flickering: animations scoped to tab switch only (tab-enter class)
- Terraform polling timeout increased to 60 min
- Terminal output updates without full page re-render
- Fix ${IC.bot} literal rendering in chat empty state
- Chat empty state icon scaled to 48px
- README updated to v2.2 with all changes
2026-03-10 14:29:38 -03:00
nogueiraguh
0877744cd1 docs: update README with UI modernization, fix chat icon rendering
- Update README: KPI dashboard, SVG icon system, Chart.js, report summary endpoint, ADB wallet fix, updated file sizes
- Fix ${IC.bot} rendering literally in chat empty state (single quotes → template literal)
- Scale up chat empty state SVG icon to 48px
2026-03-10 09:42:58 -03:00
nogueiraguh
f205f819ab feat: light/dark theme toggle, export/import config, and UI modernization
- Add light/dark mode toggle with localStorage persistence
- Oracle-branded dark mode: deep backgrounds, vibrant status colors
- Original light mode preserved as default
- All hardcoded colors replaced with CSS custom properties
- Add full config export/import (OCI creds+keys, GenAI, MCP, prompts, settings)
- Add Terraform inline prompt editor with auto-save
- Add ADB Update Network Access and ACL display in Explorer
- Add auto-refresh after Start/Stop resource actions
- Update README with new features
2026-03-09 15:43:32 -03:00
nogueiraguh
01fe037cd0 docs: update README with auto-split pipeline, resource validation, and simplified prompt 2026-03-09 01:26:31 -03:00
nogueiraguh
6065ba7b12 docs: remove external tool reference from README 2026-03-08 19:02:20 -03:00
nogueiraguh
7f64b043d6 docs: update README with smart file correction, validation checklist, and Explorer actions 2026-03-08 02:10:43 -03:00
nogueiraguh
805286c05f feat: add TF reference refresh button to Terraform Agent menu
- Add dropdown menu (⋮) in Terraform toolbar with "Atualizar Referência TF" button
- Remove standalone reference-status API endpoint, keep only refresh-reference
- Button triggers `terraform providers schema -json` regeneration with progress feedback
- Shows line count and update timestamp after successful refresh
- Update README with new line counts
2026-03-08 01:05:18 -03:00
nogueiraguh
19e481275d feat: Terraform resource reference from provider schema, provider alias fixes, and timestamps
- Add gen_tf_reference.py to generate OCI Terraform provider resource catalog (~937 resources) from `terraform providers schema -json`
- Auto-inject categorized resource reference into Terraform Agent system prompt to prevent invalid resource type names
- Build-time reference generation in Dockerfile, refreshable via POST /api/terraform/refresh-reference
- Provider alias detection with brace-matching parser for multi-region deployments
- Clean old .tf files before writing new ones on Re-plan
- Message timestamps in terraform chat and history
- Partial DOM rendering to eliminate screen flickering
- Layout overflow fix (no scroll beyond viewport)
2026-03-08 01:00:47 -03:00
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
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
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
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
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
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
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
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
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
028df6773a docs: add logo to README 2026-02-27 20:24:02 -03:00
nogueiraguh
3b5b0c7c2a docs: add comprehensive README for v1.1 2026-02-27 19:47:16 -03:00
nogueiragustavo
aa561a87f3 Add files via upload 2026-02-26 19:47:52 -03:00
nogueiragustavo
86ee587be7 Initial commit 2026-02-26 19:37:07 -03:00