EU-Utility/docs
LemonNexus 3311edf4e5 feat: Three-tier API Architecture (v2.2.0)
NEW: core/api/ directory with comprehensive three-tier API

PluginAPI (core/api/plugin_api.py):
- 12 core service integrations (Log, Window, OCR, Screenshot, Nexus, HTTP, Audio, Notifications, Clipboard, Event Bus, Data Store, Tasks)
- Full docstrings with examples for every method
- Thread-safe design with Qt signal marshaling
- Proper error handling with custom exceptions
- Service availability checking

WidgetAPI (core/api/widget_api.py):
- Widget creation and management
- WidgetConfig dataclass for configuration
- WidgetType enum (MINI, CONTROL, CHART, ALERT, CUSTOM)
- WidgetAnchor enum for positioning
- Event system (moved, resized, closing, closed, update)
- Layout helpers (grid, horizontal, vertical, cascade)
- Persistence (save/load widget states)
- Widget presets for reuse

ExternalAPI (core/api/external_api.py):
- REST API server with aiohttp
- API endpoint registration (decorator and programmatic)
- Incoming webhooks with HMAC verification
- Outgoing webhook POST support
- API key authentication
- IPC (inter-process communication)
- File watcher for config changes
- Server-Sent Events (SSE) support
- CORS configuration
- Webhook history tracking

core/api/__init__.py:
- Unified imports for all three APIs
- Version tracking (2.2.0)
- Clean namespace exports

docs/API_REFERENCE.md:
- Comprehensive 12,000+ word reference
- Quick start examples for each API
- Service-by-service documentation
- Error handling guide
- Integration examples (Discord, custom widget)

Integration:
- Updated core/main.py to import from new API structure
- All three APIs available via: from core.api import get_api, get_widget_api, get_external_api

Benefits:
- Clear separation of concerns (plugins vs widgets vs external)
- Well-documented APIs for developers
- Easy to extend with new services
- Type hints throughout
- Production-ready error handling
- Third-party integration support out of the box
2026-02-15 18:07:06 +00:00
..
API_COOKBOOK.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
API_REFERENCE.md feat: Three-tier API Architecture (v2.2.0) 2026-02-15 18:07:06 +00:00
COMPLETE_DEVELOPMENT_SUMMARY.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
DEVELOPMENT_PLAN_PHASE2.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
FAQ.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
FEATURE_PACK.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
FINAL_REPORT.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
MIGRATION_GUIDE.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
NEXUS_API_REFERENCE.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
NEXUS_DOCUMENTATION_SUMMARY.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
NEXUS_LINKTREE.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
NEXUS_USAGE_EXAMPLES.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
PHASE2_PLAN.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
PHASE3_4_EXECUTION_PLAN.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
PLUGINS.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
PLUGIN_DEVELOPMENT.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
PLUGIN_DEVELOPMENT_GUIDE.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
SECURITY_HARDENING_GUIDE.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
SWARM_RUN_1_RESULTS.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
SWARM_RUN_2_RESULTS.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
SWARM_RUN_3_RESULTS.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
SWARM_RUN_4_RESULTS.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
SWARM_RUN_5_6_RESULTS.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
TASK_SERVICE.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
TROUBLESHOOTING.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
UI_CONSISTENCY_REPORT.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
USER_MANUAL.md fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00
task_example_plugin.py fix: Clean repository - remove workspace pollution 2026-02-14 03:34:04 +00:00