ServerEnv was imported inside load_hermes_web_cli() but used by all
other functions (get_all_services, create_service, etc.), causing
'ServerEnv is not defined' NameError at runtime.
- Add orgid field (str32, not nullable) to hermes_services table
- Replace user_id with orgid in all service CRUD operations (SQL + functions)
- Update function signatures: get_all_services, create_service, delete_service,
get_service_by_id, test_service_connection, create_session,
send_message_to_service, get_session_messages all use orgid
- Add orgid indexes: idx_hermes_services_orgid, idx_hermes_services_orgid_status
- Add logined_userorgid filtering to CRUD definition for automatic framework-level isolation
- Update all .dspy files to use get_userorgid() for org-scoped service queries
- Update init/data.json and db_tables.py to reflect orgid field
Cleaned up 426 lines of dead code and unresolved conflict markers
(<<<<<<< HEAD, =======, >>>>>>>) left over from rebase.
File reduced from 1102 to 676 lines.
- Add missing core module files: crud_ops.py, db_tables.py, init_db.py, user_context.py
- Ensure all .dspy scripts properly use get_user() for user_id acquisition
- Fix user context handling in module functions via get_current_user_id()
- Maintain proper async/await patterns throughout the codebase
- Complete module implementation following module-development-spec
- All database operations use sqlor framework with proper user isolation
- Replace all requests HTTP calls with aiohttp async client
- Update test_service_connection to accept service_id and use aiohttp
- Ensure all database operations use sqlor framework (already implemented)
- Add proper async/await patterns for HTTP operations
- Maintain compatibility with existing API contracts
- Follows module-development-spec and production requirements
- Replace 'select' uitype with 'code' uitype
- Use data_url instead of options.url for dynamic data loading
- Add valueField and textField to map backend response fields
- Fix URL path to /hermes-web-cli/hermes_services/list/
- Complies with module-development-spec and bricks-framework requirements
- Added jinja2 set statement to fetch settings data from /hermes-web-cli/settings/ API
- Updated Form fields to use value/checked properties with proper fallbacks
- Implemented settings API endpoint to return current configuration
- Removed incorrect load event binding and template variable references