Commit Graph

30 Commits

Author SHA1 Message Date
3915424d75 feat(wip): Phase 7.1 STT Service Layer - Architecture complète (ne compile pas)
Architecture Phase 7 STT implémentée mais bloquée par conflits de macros
entre GroveEngine (JsonDataNode.h) et spdlog/fmt.

## Nouveau contenu

### Interfaces & Services
- ISTTService.hpp: Interface service STT (modes passive/active, callbacks)
- STTService.{hpp,cpp}: Implémentation service STT avec factory pattern
- VoskSTTEngine.{hpp,cpp}: Engine STT local Vosk (~50MB model)

### Factory Pattern
- STTEngineFactory: Support multi-engines (Vosk, Whisper API, auto-select)
- Fallback automatique Vosk -> Whisper API

### Configuration
- config/voice.json: Config Phase 7 (passive_mode, active_mode, whisper_api)
- Support modèles Vosk locaux + fallback cloud

### Intégration
- VoiceService: Nouvelle méthode configureSTT(json) pour Phase 7
- main.cpp: Chargement config STT depuis voice.json
- CMakeLists.txt: Ajout fichiers + dépendance optionnelle Vosk

## Problème de Compilation

**Bloqué par conflits de macros**:
- JsonDataNode.h (GroveEngine) définit des macros qui polluent 'logger' et 'queue'
- Cause erreurs dans VoiceService.cpp et STTService.cpp
- Voir plans/PHASE7_COMPILATION_ISSUE.md pour diagnostic complet

## Fonctionnalités Implémentées

 Architecture STT complète (service layer + engines)
 Support Vosk local (modèles français)
 Factory pattern avec auto-selection
 Configuration JSON Phase 7
 Callbacks transcription/keywords
 Ne compile pas (macro conflicts)

## Prochaines Étapes

1. Résoudre conflits macros (fixer GroveEngine ou isolation namespace)
2. Phase 7.2: PocketSphinxEngine (keyword spotting "Celuna")
3. Tests intégration STT

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 09:01:26 +08:00
3c588a9f90 feat: Phase 6 - Interactive mode validated with TTS
 Validated AISSIA interactive mode with real conversations
- Claude Sonnet 4 agentic loops working perfectly
- espeak-ng TTS integration functional (French voice)
- 7 modules + 4 services + 18 tools operational
- Tested conversation with tool usage (get_current_time)
- 4298 tokens, 2 agentic iterations, TTS output

📝 Documentation:
- Added docs/PHASE6_VALIDATION.md (complete validation report)
- Updated README.md roadmap (Phase 6 complete)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 07:45:21 +08:00
1fe0b642f0 docs: Update integration tests status with Phase 5 complete
Comprehensive status report for integration tests system:
- 13/13 tests implemented and compiling
- 1/13 passing (IT_011), 12/13 failing (need API or modules)
- Detailed analysis of each test failure
- Clear next steps: Option A (fix module loading) or Option B (MCP debug)
- Full documentation of limitations and solutions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 21:14:46 +08:00
24810a7ce0 feat: Add Phase 5 module integration tests (IT_010-013)
4 nouveaux tests d'intégration pour valider les modules AISSIA :

**Nouveaux tests** :
- IT_010_SchedulerHyperfocus : Validation détection hyperfocus SchedulerModule
- IT_011_NotificationAlert : Test système notifications (3 types alertes)
- IT_012_MonitoringActivity : Test classification activité MonitoringModule
- IT_013_WebRequest : Test requêtes HTTP via WebModule (GitHub API)

**Modifications infrastructure** :
- TestRunnerModule.cpp : Fix chemin discovery tests (remove "build/" prefix)
- tests/CMakeLists.txt : Ajout des 4 nouveaux tests à la target
- tests/integration/README.md : Documentation Phase 4 ajoutée

**Total** : 13/13 tests d'intégration compilent et s'exécutent
Infrastructure modulaire "Un module = Un test" pleinement fonctionnelle

**Note** : Tests IT_010/012/013 nécessitent modules applicatifs chargés
(prochaine étape : charger modules en mode test)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 21:11:05 +08:00
93800ca6bb feat: Add IT_009 end-to-end conversation loop test
Ajout du test d'intégration le plus complet qui valide toute
la boucle conversationnelle AISSIA en conditions réelles.

Test IT_009_FullConversationLoop:
- Scénario en 3 étapes validant le flux complet
- Step 1: Voice "Prends note que j'aime le C++"
  → AI → LLM (appelle storage_save_note) → Storage sauvegarde
- Step 2: Voice "Qu'est-ce que j'aime ?"
  → AI → LLM (appelle storage_query_notes) → Storage récupère
- Step 3: Validation cohérence conversationnelle

Validations:
 Communication Voice → AI → LLM
 Exécution tools MCP (storage_save_note, storage_query_notes)
 Persistence et retrieval de données
 Cohérence conversation multi-tour
 Cleanup automatique des fichiers de test

Résultat final: 9/9 tests d'intégration opérationnels
- 4 tests MCP (tools)
- 4 tests flux (communications inter-modules)
- 1 test end-to-end (boucle complète)

Total: ~35s pour valider AISSIA en conditions réelles

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:43:37 +08:00
d5cbf3b994 feat: Add modular integration test system with 8 tests
Implémentation complète d'un système de tests d'intégration modulaire
pour valider AISSIA en conditions réelles.

Architecture "Un module = Un test":
- Chaque test est un module GroveEngine (.so) chargé dynamiquement
- TestRunnerModule orchestre l'exécution de tous les tests
- Rapports console + JSON avec détails complets
- Exit codes appropriés pour CI/CD (0=success, 1=failure)

Infrastructure:
- ITestModule: Interface de base pour tous les tests
- TestRunnerModule: Orchestrateur qui découvre/charge/exécute les tests
- Configuration globale: config/test_runner.json
- Flag --run-tests pour lancer les tests

Tests implémentés (8/8 passing):

Phase 1 - Tests MCP:
 IT_001_GetCurrentTime: Test tool get_current_time via AI
 IT_002_FileSystemWrite: Test tool filesystem_write
 IT_003_FileSystemRead: Test tool filesystem_read
 IT_004_MCPToolsList: Vérification inventaire tools (≥5)

Phase 2 - Tests Flux:
 IT_005_VoiceToAI: Communication Voice → AI
 IT_006_AIToLLM: Requête AI → Claude API (réelle)
 IT_007_StorageWrite: AI → Storage (sauvegarde note)
 IT_008_StorageRead: AI → Storage (lecture note)

Avantages:
🔥 Hot-reload ready: Tests modifiables sans recompiler
🌐 Conditions réelles: Vraies requêtes Claude API, vrais fichiers
🎯 Isolation: Chaque test indépendant, cleanup automatique
📊 Rapports complets: Console + JSON avec détails par test
 CI/CD ready: Exit codes, JSON output, automation-friendly

Usage:
  cmake --build build --target integration_tests
  cd build && ./aissia --run-tests

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:37:59 +08:00
18f4f16213 feat: Add WebModule for HTTP requests via IIO
Implements WebModule that allows other modules to make HTTP requests
through IIO pub/sub messaging system.

Features:
- HTTP GET/POST support via existing HttpClient
- Request/response via IIO topics (web:request/web:response)
- Security: blocks localhost and private IPs
- Statistics tracking (total, success, failed)
- Hot-reload state preservation
- Custom headers and timeout configuration

Module architecture:
- WebModule.h/cpp: 296 lines total (within 300 line limit)
- config/web.json: Configuration file
- 10 integration tests (TI_WEB_001 to TI_WEB_010)

Tests: 120/120 passing (110 existing + 10 new)

Protocol:
- Subscribe: web:request
- Publish: web:response
- Request fields: requestId, url, method, headers, body, timeoutMs
- Response fields: requestId, success, statusCode, body, error, durationMs

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 17:15:46 +08:00
5a95ab7233 docs: Add run.sh wrapper and update documentation
- Add run.sh script to automatically load .env before running
- Update README.md with interactive mode instructions
- Update PROMPT_SUCCESSEUR.md: mark all 110 tests as passing
- Document available run modes (interactive, MCP server, normal)

All tests now passing: 110/110 

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 14:22:04 +08:00
d56993a48e fix: Fix 8 failing module tests (now 110/110 passing)
Module fixes:
- MonitoringModule: Publish app_changed for first app (empty oldApp)
- MonitoringModule: Add appName and classification fields to events
- AIModule: Publish ai:suggestion in handleLLMResponse
- VoiceModule: Support flat config format (ttsEnabled/sttEnabled)
- StorageModule: Support both durationMinutes and duration fields

Test fixes:
- AIModuleTests: Simulate LLM responses for hyperfocus/break tests

All 110 tests now pass (252 assertions)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 13:44:41 +08:00
58d7ca4355 fix: Enable HTTPS for Claude API and fix interactive mode IIO routing
- HttpClient: Use full URL with scheme (https://) for proper SSL support
- main.cpp: Create separate InteractiveClient IO to avoid self-delivery skip
- main.cpp: Process llm:response messages in main loop for terminal display
- ClaudeProvider: Add debug logging for request details

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 07:27:56 +08:00
ac230b195d feat: Add MCP server mode (--mcp-server)
AISSIA can now run as an MCP server, exposing tools via JSON-RPC over stdio.
This allows external clients (like Claude Code) to use AISSIA's tools.

- Add MCPServer.hpp/cpp implementing MCP protocol
- Add --mcp-server flag to main.cpp
- Currently exposes 6 FileSystem tools
- Update documentation (CLAUDE.md, SUCCESSION.md)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 19:38:32 +08:00
09fc32386e chore: Add .env to .gitignore 2025-11-27 14:27:43 +08:00
f06c13c195 fix: Auto-detect modules path (./modules/ or ./build/modules/)
- main.cpp now checks for modules in ./modules/ first, falls back to
  ./build/modules/ if not found or empty
- Allows running from project root: ./build/aissia
- Update SUCCESSION.md with current state and FileSystem tools docs

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 14:20:56 +08:00
37b62b55e8 feat: Implement FileSystem tools for agentic LLM
Add Claude Code style file manipulation tools:
- read_file: Read file content with line numbers (offset/limit support)
- write_file: Create or overwrite files
- edit_file: Replace exact string in file (unique match or replace_all)
- list_directory: List directory contents with type/size
- glob_files: Search files by pattern (**/*.cpp)
- grep_files: Search content with regex

Features:
- Security: configurable allowed paths, blocked patterns (*.env, *.key)
- Size limits: 1MB read, 10MB write
- Path canonicalization to prevent traversal attacks
- Integrated into LLMService tool registry

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 14:01:25 +08:00
64d485729b fix: Fix test fixtures JsonDataNode constructor calls
- Add 'servers' key to mock_mcp.json (MCPClient expects this structure)
- Add 'servers' wrapper to MCPClientTests.cpp test configs
- Fix JsonDataNode constructor calls in test fixtures:
  - JsonDataNode(json) -> JsonDataNode("name", json)
  - Affected: AIModuleTests, MonitoringModuleTests, StorageModuleTests,
    VoiceModuleTests, TimeSimulator

Test results:
- Module tests: 52/60 passing (87%)
- MCP Types tests: 15/15 passing (100%)
- MCP Transport/Client: Require Python server integration fixes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 13:49:50 +08:00
83d901aaab test: Implement 20 integration tests for Scheduler and Notification modules
- Add Catch2 test framework with MockIO and TimeSimulator utilities
- Implement 10 TI for SchedulerModule (task lifecycle, hyperfocus, breaks)
- Implement 10 TI for NotificationModule (queue, priority, silent mode)
- Fix SchedulerModule: update m_lastActivityTime in process()
- Add AISSIA_TEST_BUILD guards to avoid symbol conflicts
- All 20 tests passing (69 assertions total)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 09:49:08 +08:00
92fb0b7b28 docs: Add plan for FileSystem tools (read/write/edit)
Tools planned: read_file, write_file, edit_file, list_directory,
glob_files, grep_files - Claude Code style file manipulation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 22:27:06 +08:00
1f6f95a3a0 docs: Update succession document for MCP integration session
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 17:17:03 +08:00
059709cd0d feat: Implement MCP client and internal tools for agentic LLM
Add complete tool calling infrastructure for Claude Code-like functionality:

Internal Tools (via GroveEngine IIO):
- Scheduler: get_current_task, list_tasks, start_task, complete_task, start_break
- Monitoring: get_focus_stats, get_current_app
- Storage: save_note, query_notes, get_session_history
- Voice: speak

MCP Client (for external servers):
- StdioTransport for fork/exec JSON-RPC communication
- MCPClient for multi-server orchestration
- Support for filesystem, brave-search, fetch servers

Architecture:
- IOBridge for sync request/response over async IIO pub/sub
- Tool handlers added to all modules (SchedulerModule, MonitoringModule, StorageModule, VoiceModule)
- LLMService unifies internal tools + MCP tools in ToolRegistry

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 16:50:30 +08:00
9c1e168d4f fix: Restore GroveEngine symlink removed during refactor
The symlink was accidentally deleted but CMakeLists.txt still references it.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 13:49:32 +08:00
26a5d3438b refactor: Services architecture for GroveEngine compliance
- Create 4 infrastructure services (LLM, Storage, Platform, Voice)
- Refactor all modules to pure business logic (no HTTP/SQLite/Win32)
- Add bundled SQLite amalgamation for MinGW compatibility
- Make OpenSSL optional in CMake configuration
- Fix topic naming convention (colon format)
- Add succession documentation

Build status: CMake config needs SQLite C language fix (documented)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 11:57:53 +08:00
bc3b6cbaba feat: Implement Phase 1 complete - All 6 core modules
## New Modules
- StorageModule: SQLite persistence for sessions, app usage, conversations
- MonitoringModule: Cross-platform window tracking (Win32/X11)
- AIModule: Multi-provider LLM integration with agentic tool loop
- VoiceModule: TTS/STT coordination with speak queue

## Shared Libraries
- AissiaLLM: ILLMProvider abstraction (Claude + OpenAI providers)
- AissiaPlatform: IWindowTracker abstraction (Win32 + X11)
- AissiaAudio: ITTSEngine (SAPI/espeak) + ISTTEngine (Whisper API)
- HttpClient: Header-only HTTP client with OpenSSL

## Configuration
- Added JSON configs for all modules (storage, monitoring, ai, voice)
- Multi-provider LLM config with Claude and OpenAI support

## Dependencies
- SQLite3, OpenSSL, cpp-httplib (FetchContent)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 00:42:18 +08:00
0dfb5f1535 chore: Normalize line endings and update project documentation
- Normalize CRLF to LF across all source files
- Replace CLAUDE.md.old with updated CLAUDE.md
- Standardize configuration file formatting
- Update module source files with consistent line endings

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 22:13:16 +08:00
439b55b176 docs: Add GroveEngine documentation and project overview
- Add comprehensive README.md explaining Aissia is built on GroveEngine
- Add GROVEENGINE_GUIDE.md with complete user guide
- Add docs/project-overview.md
- Archive old CLAUDE.md to CLAUDE.md.old

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 12:00:01 +08:00
f6f4813d8f Remove build artifacts from tracking and update retrieval doc
- Add .gitignore for build artifacts
- Update intelligent-document-retrieval.md

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 21:40:08 +08:00
80f26aea54 Add infrastructure foundation and intelligent document retrieval
- CMakeLists.txt: build configuration
- src/: initial infrastructure structure
- config/: application configuration
- external/: third-party dependencies
- docs/GROVEENGINE_GUIDE.md: GroveEngine reference guide
- docs/architecture/intelligent-document-retrieval.md: agentic retrieval for AIAssistantModule

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 21:34:16 +08:00
f231188880 Refactor documentation structure and add language learning
- Reorganize docs/ (flatten to architecture/ and implementation/)
- Remove MonitoringModule from MVP (no app detection)
- Add LanguageLearningModule to MVP
- Create CLAUDE.md (concise project overview)
- Add language learning to README and architecture
- Update all examples to use SchedulerModule instead of MonitoringModule

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 07:28:34 +08:00
ba42b6d9c7 Update CDC with hybrid architecture (WarFactory + multi-target)
- Add hybrid deployment modes: local_dev (MVP) and production_pwa (optional)
- Integrate WarFactory engine reuse with hot-reload 0.4ms
- Define multi-target compilation strategy (DLL/SO/WASM)
- Detail both deployment modes with cost analysis
- Add progressive roadmap: Phase 1 (local), Phase 2 (POC WASM), Phase 3 (cloud)
- Budget clarified: $10-20/mois (local) vs $13-25/mois (cloud)
- Document open questions for technical validation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 11:49:09 +08:00
1ad9bef4c0 Initial commit: AissiA setup 2025-07-31 15:32:16 +08:00
6ba3f42208 Initial commit 2025-07-31 07:24:41 +00:00