Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
8d49ea4
docs(mcp): implementation plan for HTTP+SSE transport (#258)
May 19, 2026
8517b05
review: plan review for HTTP+SSE transport (#258)
May 19, 2026
d919839
docs(mcp): revise plan per review -- transport decision, race fix, SE…
May 19, 2026
c0ba2df
feat(mcp): typed event bus for fleet pub/sub (#258)
May 19, 2026
9eca7d8
chore: update progress for T1 completion
May 19, 2026
947e27b
review: plan re-review for HTTP+SSE transport (#258)
May 19, 2026
8297272
feat(mcp): HTTP transport with multi-session support (#258)
May 19, 2026
3c02f58
test(mcp): verify HTTP transport in SEA binary (#258)
May 19, 2026
0b6e456
chore: mark VERIFY Phase 1 completed in progress.json
May 19, 2026
b4359ea
review: Phase 1 core abstractions (#258)
May 19, 2026
a7337d1
refactor(mcp): extract tool registration into shared module (#258)
May 19, 2026
2b1c00b
chore: mark task 5 completed in progress.json
May 19, 2026
174ddab
feat(mcp): --transport flag and dual startup paths (#258)
May 19, 2026
b8ff3b0
feat(mcp): singleton lifecycle detection with atomic claim (#258)
May 19, 2026
83fee44
chore: update progress.json -- task 5/6 complete, VERIFY Phase 2 done
May 19, 2026
226e2cd
chore: mark VERIFY server refactor + dual transport completed (#258)
May 19, 2026
1be68a0
chore: record VERIFY commit SHA in progress.json (#258)
May 19, 2026
e8ee7e3
review: Phase 2 server refactor and dual transport (#258)
May 19, 2026
96b5b05
feat(mcp): emit credential:stored event on OOB secret delivery (#258)
May 19, 2026
151bd04
chore: record T7 commit SHA in progress.json (#258)
May 19, 2026
14ee8de
feat(mcp): provider-specific HTTP transport install configs (#258)
May 19, 2026
f82eec9
chore: record T8 commit SHA in progress.json (#258)
May 19, 2026
cc2e495
test(mcp): transport integration tests + Gemini client verification (…
May 19, 2026
71d2bce
chore: record T9 commit SHA in progress.json (#258)
May 19, 2026
d3e0889
chore: mark VERIFY event wiring + client config completed (#258)
May 19, 2026
e218558
review: Phase 3 event wiring and client config (#258)
May 19, 2026
5839c61
docs(mcp): document HTTP+SSE transport, singleton model, event bus (#…
May 19, 2026
a37fcc1
chore: record T10 completion + VERIFY checkpoint results (#258)
May 19, 2026
428a389
review: Phase 4 docs + final sprint review (#258)
May 19, 2026
4745fa7
cleanup: remove fleet control files
May 19, 2026
d6a68d5
docs(service): OS service lifecycle implementation plan
May 19, 2026
0d86dd7
review: OS service lifecycle plan review
May 19, 2026
d339ecf
docs(service): revise plan per review -- dev-path, branch, macOS idem…
May 19, 2026
fdc1bbe
review: OS service lifecycle plan re-review
May 19, 2026
69adcea
feat(service): POST /shutdown endpoint and service constants (#258)
May 19, 2026
95f246c
progress: mark T1 complete (ef84f92)
May 19, 2026
5da9933
feat(service): T2 ServiceManager interface and factory
May 20, 2026
01d4b88
chore(service): add platform adapter stubs to unblock build
May 20, 2026
0e29208
feat(http-transport): declare claude/channel MCP capability
May 20, 2026
be619ab
docs(service): add T6.5 capability logging task, mark T1/T2 complete
May 20, 2026
62057a3
feat(service): Windows Scheduled Task adapter (#258)
May 20, 2026
a659074
feat(service): Linux systemd user unit adapter (#258)
May 20, 2026
95a956a
feat(service): macOS launchd LaunchAgent adapter (#258)
May 20, 2026
20db05e
test(service): service manager adapter unit tests (#258)
May 20, 2026
85f19d4
feat(http-transport): log MCP session init and close with client caps…
May 20, 2026
1a29ca2
progress: mark T6/T6.5 complete, update T3-T5 notes
May 20, 2026
b242d07
progress: VERIFY blocked on build/test approval
May 20, 2026
2d3b7d7
feat(service): service manager unit tests (#258)
May 20, 2026
6862718
progress: VERIFY passed -- 85 files, 1365 tests green
May 20, 2026
8c12101
progress: mark VERIFY id=8 completed
May 20, 2026
3d5a2c3
review: Phase 1 platform service foundation code review
May 20, 2026
9eacb65
feat(service): start and stop CLI commands (#258)
May 20, 2026
e6aa950
feat(service): restart CLI command (#258)
May 20, 2026
2a8f766
feat(service): status CLI command (#258)
May 20, 2026
eea6b0d
test(service): CLI verb tests and help update (#258)
May 20, 2026
8370562
progress: VERIFY P2 complete -- 86 files, 1376 passed, 18 new CLI ver…
May 20, 2026
d24befb
feat(service): CLI verb tests and --help update (#258)
May 20, 2026
901e425
feat(service): extend install/uninstall with service lifecycle (#258)
May 20, 2026
91c8c40
progress: VERIFY P2 final -- 86 files, 1383 passed, 0 failed
May 20, 2026
d54bd65
test(service): install/uninstall service integration tests (#258)
May 20, 2026
a4c6a1d
chore: VERIFY P3 -- install/uninstall integration complete
May 20, 2026
135b5b0
docs(readme): document service model and start/stop/restart/status ve…
May 20, 2026
57fd2e5
docs(arch): document service manager architecture (#258)
May 20, 2026
a050214
chore: VERIFY P4 -- documentation complete, 87 files 1396 passed
May 20, 2026
6cf93f1
fix(service): quote args in Windows bat wrapper to support paths with…
May 20, 2026
3f4d2bf
fix(service): always run gracefulStop before systemd check in LinuxSe…
May 20, 2026
d860a5d
fix(service): XML-escape path values in macOS plist builder (#258)
May 20, 2026
c330d43
fix(service): use SIGKILL not SIGTERM for force-kill fallback on Unix…
May 20, 2026
1c64439
fix(service): delegate stop to ServiceManager when service is install…
May 20, 2026
34f1a9b
fix(service): rollback register() if start() fails during install (#258)
May 20, 2026
5836328
test(service): update bat wrapper test to expect quoted args (#258)
May 20, 2026
d406ad8
ci(llms-full): regen after rebase on main
May 28, 2026
8d5547d
fix(service): address reviewer findings -- shutdown exit code, shared…
May 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
554 changes: 554 additions & 0 deletions PLAN.md

Large diffs are not rendered by default.

99 changes: 99 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,105 @@ reviewer Opus 4.7 final review
Provider strengths, role recommendations, and gotchas:
[docs/provider-guide.md](docs/provider-guide.md).

## Transport

Fleet runs as a singleton service on your machine. When you start it, the server
listens on port 7523 by default and multiple LLM clients (Claude Code, Gemini,
Copilot, Codex) connect concurrently to the same fleet instance.

### HTTP+SSE Transport (default)

By default, fleet uses the **HTTP+SSE transport** -- clients connect over HTTP and
receive server-push notifications over Server-Sent Events (SSE).

```bash
apra-fleet # Start HTTP server (default)
apra-fleet --transport http # Explicitly use HTTP
```

When the server starts, it writes a `server.json` file to `~/.apra-fleet/` containing:
```json
{
"pid": 12345,
"port": 7523,
"url": "http://localhost:7523/mcp",
"version": "x.y.z",
"startedAt": "2026-05-19T..."
}
```

If port 7523 is busy, the server falls back to port 0 (OS-assigned random port) and
records the actual port in `server.json`. You can override the default port with the
`APRA_FLEET_PORT` environment variable.

**Multiple clients, one server.** When a second LLM client starts, it reads
`server.json`, detects the running server, and connects to it. All clients share the
same fleet instance -- no restart needed. When you close all clients, the server
keeps running (as a singleton service on your machine). It shuts down on explicit
exit (`apra-fleet --shutdown` tool) or on system reboot.

**Re-register with HTTP.** When you upgrade or re-install Fleet, run:
```bash
apra-fleet install # Registers fleet with HTTP transport (default)
```

### Event Bus

The event bus is an internal notification system. When a subsystem (like credential
storage) completes an operation, it emits an event, and the HTTP server broadcasts
the notification to all connected clients via SSE. This lets clients respond
immediately to fleet events without polling.

### Backward Compatibility: stdio Transport

Existing fleets can continue using the stdio transport:

```bash
apra-fleet --transport stdio # Use legacy stdio transport
apra-fleet --stdio # Alias for --transport stdio
```

When you run `apra-fleet install --transport stdio`, the MCP config keeps the old
command-based format (no HTTP URL). The server's behavior is identical to pre-HTTP
versions: it reads JSON-RPC from stdin, writes responses to stdout, and communicates
with one client at a time via the stdio pipe.

If you want to stay on stdio for now, run:
```bash
apra-fleet install --transport stdio
```

If you later switch back to HTTP, re-run the default install:
```bash
apra-fleet install # Switches to HTTP transport
```

## Service Mode

Fleet keeps a singleton server running so all your LLM clients share one instance.
Registering it as an OS service keeps it alive across terminal sessions -- the server
survives terminal close and restarts automatically on login:

- Windows: a per-user Scheduled Task (Task Scheduler, OnLogon trigger)
- Linux: a systemd user unit (`systemctl --user`)
- macOS: a LaunchAgent in `~/Library/LaunchAgents/`

Four verbs manage the lifecycle directly:

```
apra-fleet start # start the server (idempotent -- exits cleanly if already running)
apra-fleet stop # graceful shutdown: POST /shutdown, poll, force-kill fallback
apra-fleet restart # stop then start
apra-fleet status # state, PID, port, uptime, version, and OS service status
```

`install` and `uninstall` include service registration. Running
`apra-fleet install` on a packaged binary with the HTTP transport (the default)
registers and starts the OS service automatically -- no extra step.
`apra-fleet uninstall` stops and deregisters the service before removing files.
Service registration failures are non-fatal: a warning is printed and the install
continues.

## The PM skill

The **PM skill** is Fleet's reference workflow for **software development**
Expand Down
265 changes: 210 additions & 55 deletions docs/architecture.md

Large diffs are not rendered by default.

Loading
Loading