michaelmelanson / michaelmelanson/panda-os
Service manager step 8: Manager API crate and svcctl CLI
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
Create a `service-manager-api` crate with typed `ManagerRequest`/`ManagerResponse`/`ManagerEvent` messages and a `svcctl` CLI tool for runtime service management. Integrates with structured Value pipelines.
This is step 8 of the service manager implementation (#26). Depends on steps 3 (#29) and 7 (#33).
## Desired behaviour
### API crate (`service-manager-api`)
- `ManagerRequest`: Start, Stop, Restart, Status, List, ListByProtocol
- `ManagerResponse`: Ok, Error, ServiceStatus, ServiceList
- `ManagerEvent`: ServiceStarted, ServiceStopped, ServiceFailed
- Uses the protocol framework from #29 with a `Manager` protocol UUID
- `ServiceClient` typed wrapper for connecting to the manager
### `svcctl` CLI
- `svcctl status [name]` — show service status (or all services)
- `svcctl start ` — start a service
- `svcctl stop ` — stop a service
- `svcctl restart ` — restart a service
- `svcctl list` — list all services with status
- `svcctl list --protocol ` — list services implementing a protocol
- Output uses structured `Value` types for pipeline integration (e.g., `svcctl list | where status == running`)
## Key files
- `service-manager-api/` — new crate with message types
- `userspace/svcctl/` — new CLI binary
- `userspace/init/src/manager.rs` — handle incoming management requests
## Testing
- Unit tests for request/response serialization
- Integration test: `svcctl list` returns all configured services
- Integration test: `svcctl stop ` + `svcctl start ` round-trip
- Integration test: `svcctl status ` shows correct state after start/stop
- Test pipeline integration: `svcctl list` output is valid structured data
## Documentation
- Doc comments on all API types with usage examples
- Document `svcctl` commands and flags
- Add to `docs/SERVICES.md`
Part of #26
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the protocol framework from #29 and service-manager work from #33, then inspect service-manager-api/, userspace/svcctl/, and userspace/init/src/manager.rs. Use the listed serialization, CLI, round-trip, state, and pipeline integration tests to define completion, and add API comments, command documentation, and docs/SERVICES.md updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100