feat: implement AI Workspace service manager with lifecycle control for local services

This commit is contained in:
2026-05-20 14:43:52 -06:00
parent eb11bb9442
commit 1121433db8
8 changed files with 627 additions and 0 deletions

37
scripts/aiw/README.md Normal file
View File

@@ -0,0 +1,37 @@
# AI Workspace Service Manager
The service manager is the local lifecycle layer for AI Workspace services.
It reads `profiles/<profile>/services.json`, starts/stops enabled services, records logs under `.aiw/runtime/logs/`, and keeps PID/state files under `.aiw/runtime/`.
## Common commands
```bash
python3 scripts/aiw/services.py status --profile fidelity
python3 scripts/aiw/services.py doctor --profile fidelity
python3 scripts/aiw/services.py start --profile fidelity
python3 scripts/aiw/services.py stop --profile fidelity
python3 scripts/aiw/services.py logs mattermost-proxy --profile fidelity
```
Start a subset by group:
```bash
python3 scripts/aiw/services.py start --profile fidelity --group communication
python3 scripts/aiw/services.py start --profile fidelity --group inbox
```
## Current Fidelity services
- `mattermost-proxy`: runs the local Mattermost proxy mirror.
- `mattermost-desktop`: launches Mattermost Desktop through the proxy.
- `photo-inbox`: runs the local HTTP photo receiver.
- `aiw-context-mcp`: reserved placeholder for the future read-only context MCP server.
The service manager unifies startup and status. It does not move capture behavior into the MCP.
## Tests
```bash
python3 scripts/aiw/test_services.py
```