feat(cli): `collie pack join bluefin` is a whole command
Joining a pack asked the operator for four things they had no way to know: the lead's full MagicDNS name, its port, `--insecure` for a scheme they never typed, and a token pasted through stdin. Every one of them has a sane default, and each default is still overridable by the flag or the spelling that always won. - An address with no scheme and no port now means `https://<host>:8787`. 8787 is the port a Collie binds, so it is the only thing a bare host can mean. A typed port or a typed scheme is taken as typed, so no existing spelling moves. - A lead that answers 8787 over plain HTTP fails the handshake, not the request. `join` recognises the shapes that failure takes (probed against Bun 1.4's fetch, plus the OpenSSL spellings every other runtime produces), asks once in a terminal whether to send the token over plain HTTP, and retries only on `y`. The question comes BEFORE the token is sent. No terminal, or any other answer, keeps exactly the refusal that shipped; an address spelled `http://` by hand still requires `--insecure` and is never asked about, so no script changes meaning. - No token argument, in a terminal, asks for one. The answer skips the `ps` warning on purpose: it was never in argv. - `--label` defaults to this machine's hostname, so a peer is named after its box instead of `collie-8f3a2b1c`. - The lead's stored address is now the origin that ANSWERED, not the string that was typed. A peer re-dials its lead on every poll, and a bare `bluefin` would have sent all of those to :443. - `pack invite` leads with `collie pack join <short-name>` and keeps the stdin form under it. The port is appended only when this lead moved off 8787. `pack join` and `pack leave` become the canonical spellings — every other pack verb is a `pack` sub-verb, and these two were the exception for no stated reason. `collie join` and `collie leave` stay as aliases onto the same two functions, so 1.0.0 docs and scripts keep working; a test pins that the two spellings are one code path. Also: the pointer to DEPLOYMENT.md becomes docs/deployment.md (7fe89b7). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A
Altan Sarisin committed
6e3dfca0289e8adbc6a81ade1a6c9a80a93212f1
Parent: 7fe89b7