agent add names --home in its shim hint when Spectra is on another machine 813b6330f3ad
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Author
- Andy McCall @andymccall <[email protected]>
- via
- agent
agent:claude@andymccall <[email protected]> · keyless, under your grant for changes,refs,seal · key 3a78945d7f70
- When
- · 2026-11-03 14:45 UTC
- Signature
- ◈ sealed by agent:claude@andymccall
- Hash
813b6330f3adca892e18cc1021f7d162c44b752a5b32c099d07b5dcc056ac7d8- Depends on
- 09752034b5a8 258bb3824813 5d695d869fbf aa72eb904932
- Depended on by
- 98a0fb9f0948
- In bookmarks
- main
- In tags
- v0.1.0
- Edits
- 3 atoms, 0 tree operations, 2 files
Browse the tree at this change
modified CHANGELOG.md +1 −0
| … | 1 unchanged lines |
||
| 2 | 2 | ||
| 3 | 3 | ## Unreleased |
|
| 4 | 4 | ||
| 5 | + | - **Fixed: `agent add` printed a shim line without `--home` when Spectra is on another machine,** where the shim needs it. |
|
| 5 | 6 | - **Added: `make install-server HOST=user@host` (#25).** Builds a release, copies a stripped binary and the systemd user unit over SSH, and enables the service. The unit now waits until a Spectra exists instead of failing in a loop. `make install` copies the binary rather than linking into the build tree, so cleaning a build directory no longer breaks an installed service. The README describes setting up the daemon on another machine. |
|
| 6 | 7 | - **Added: Radar from another machine (#24).** With a server configured, `spectra open` serves Radar on `http://127.0.0.1:7350` (`--port` to change it) through a proxy to the pinned server, and signs you in through it; pages, forms and the live stream all pass through. The proxy answers only its own loopback host and origin, so no other site can reach the server through it. Ctrl-C stops it. |
|
| 7 | 8 | - **Changed: the command line works from another machine (#23).** With a server configured by `spectra connect`, every command goes through the JSON API and the workstation needs no ledger file: `identity show`, `agent add`, `list` and `disable`, `project add` and `list`, `say`, `inbox`, `search`, `api` and `admin verify`, which the server runs on its own ledger (`GET /api/v1/admin/verify`). `admin check` and `rebuild` say they run on the server. Locally, commands read through the daemon whenever it is serving, so the same path is exercised on one machine and on two. The API's agents now carry their delegation state and expiry, projects their agents, and inbox items and search hits their author's display name. |
|
| … | 18 unchanged lines |
modified src/cli/agent.rs +7 −1
| … | 113 unchanged lines |
||
| 114 | 114 | println!("{}", ui::kv("key", ui::hash(agent.key.to_hex()))); |
|
| 115 | 115 | let until = d.expires.map(|e| format!(" until {}", super::format::when(e))).unwrap_or_default(); |
|
| 116 | 116 | println!("{}", ui::kv("delegated", format!("{}{until}", d.scope.names().join(",")))); |
|
| 117 | - | println!(" {} {} {}", ui::note(), ui::dim("connect its client with"), ui::id(format!("spectra mcp --agent {}", a.name))); |
|
| 117 | + | // With Spectra on another machine the shim cannot look the home up. |
|
| 118 | + | let shim = if ctx.remote()?.is_some() { |
|
| 119 | + | format!("spectra mcp --agent {} --home {}", a.name, a.home.display()) |
|
| 120 | + | } else { |
|
| 121 | + | format!("spectra mcp --agent {}", a.name) |
|
| 122 | + | }; |
|
| 123 | + | println!(" {} {} {}", ui::note(), ui::dim("connect its client with"), ui::id(shim)); |
|
| 118 | 124 | Ok(0) |
|
| 119 | 125 | } |
|
| 120 | 126 | ||
| … | 116 unchanged lines |