Skip to content

Commit 595725a

Browse files
wddwyccclaude
andcommitted
Rename release assets: phantom-agent-install.sh, phantom-cli-admin (PHANTOM-5)
The installer asset gains the phantom- prefix so it reads unambiguously outside the repo's context, and the admin CLI sorts next to phantom-cli. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent bcba547 commit 595725a

10 files changed

Lines changed: 27 additions & 26 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ jobs:
187187
mkdir release
188188
cp dist-agent release/phantom-agent
189189
cp dist-phantom release/phantom-cli
190-
cp dist-phantom-admin release/phantom-admin-cli
190+
cp dist-phantom-admin release/phantom-cli-admin
191191
cp dist-phantom-app.zip release/phantom-daemon.zip
192192
phantom-agent/make-install-script.sh dist-agent \
193193
"https://github.com/${{ github.repository }}/releases/download/${{ needs.cut.outputs.tag }}/phantom-agent" \

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ cd phantom-cli
8080
bun run src/main.ts health
8181
```
8282

83-
**Deploy guest agent**: VMs bootstrap it from the published `agent-install.sh`
83+
**Deploy guest agent**: VMs bootstrap it from the published `phantom-agent-install.sh`
8484
release asset; see [phantom-agent/README.md](phantom-agent/README.md) for the
8585
dev override.
8686

docs/authoring-images.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Setup Assistant is driven with no guest-side software: the daemon serves the VM'
4141
framebuffer from the host via `_VZVNCServer` (a private API, invoked by
4242
reflection) and a Swift VNC client injects keystrokes and clicks on-screen text
4343
located with Vision.framework OCR. The agent is bootstrapped by one VNC-typed
44-
Terminal command that fetches the published `agent-install.sh` release asset
44+
Terminal command that fetches the published `phantom-agent-install.sh` release asset
4545
over the guest's NAT network and runs it as root — the installer verifies the
4646
binary against a SHA-256 pinned into it at release time. Everything after that
4747
runs through `vm.exec` over vsock — no SSH. To build with an unreleased agent,
@@ -135,9 +135,9 @@ changed wording.
135135
5. **Install the agent** — in the guest's Terminal:
136136

137137
```bash
138-
curl -fsSL https://github.com/phantom-vm/phantom/releases/latest/download/agent-install.sh \
139-
-o /tmp/agent-install.sh
140-
sudo sh /tmp/agent-install.sh
138+
curl -fsSL https://github.com/phantom-vm/phantom/releases/latest/download/phantom-agent-install.sh \
139+
-o /tmp/phantom-agent-install.sh
140+
sudo sh /tmp/phantom-agent-install.sh
141141
```
142142

143143
It downloads `/usr/local/bin/phantom-agent`, verifies its pinned SHA-256,

docs/design.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ Daemon Guest Agent Shell
282282
- `HardwareModel` - CPU/hardware configuration
283283

284284
VMs get no host directory share: everything the guest needs arrives over the
285-
network (the agent bootstrap fetches the published `agent-install.sh` release
285+
network (the agent bootstrap fetches the published `phantom-agent-install.sh` release
286286
asset; a local `--xcode` .xip is served over an ephemeral HTTP server) or over
287287
vsock. A VirtioFS share would expose a host directory read-write to CI VMs
288288
running untrusted code.
@@ -598,7 +598,7 @@ The OCI config blob is: `{"architecture":"arm64","os":"darwin"}`
598598

599599
1. **Resolve IPSW**`ipsw.list`; use `--ipsw` or the single downloaded IPSW
600600
2. **Install**`vm.create` (returns `vmId` immediately), poll `vm.list` until `running`
601-
3. **Setup Assistant**`vm.bootScript` with `provision/setup-tahoe.txt`, poll `vm.bootScript.status` until `completed`; this also bootstraps the agent inside the guest via one VNC-typed Terminal command that fetches the published `agent-install.sh` release asset and runs it as root (the installer checks the binary against a SHA-256 pinned at release time). `--agent-url` rewrites that fetch to a dev-served installer, so agent development doesn't require cutting a release
601+
3. **Setup Assistant**`vm.bootScript` with `provision/setup-tahoe.txt`, poll `vm.bootScript.status` until `completed`; this also bootstraps the agent inside the guest via one VNC-typed Terminal command that fetches the published `phantom-agent-install.sh` release asset and runs it as root (the installer checks the binary against a SHA-256 pinned at release time). `--agent-url` rewrites that fetch to a dev-served installer, so agent development doesn't require cutting a release
602602
4. **Provision**`vm.exec` runs `provision/provision.sh` over vsock (passwordless sudo, auto-login, no sleep)
603603
5. **Install gitlab-runner** (unless `--no-gitlab-runner`) — see below
604604
6. **Install Xcode** (optional `--xcode <url|path>`) — see below

docs/releasing.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ never fire.
2525
| Asset | What |
2626
| --- | --- |
2727
| `phantom-cli` | user CLI (arm64, `bun --compile`) |
28-
| `phantom-admin-cli` | admin CLI — adds image authoring/publishing commands |
28+
| `phantom-cli-admin` | admin CLI — adds image authoring/publishing commands |
2929
| `phantom-agent` | guest agent (arm64), what the guest bootstrap fetches |
30+
| `phantom-agent-install.sh` | guest bootstrap installer — fetches `phantom-agent` from this release's versioned URL and verifies its pinned SHA-256 |
3031
| `phantom-daemon.zip` | the daemon app, Developer ID signed and notarized |
3132

3233
Each asset's SHA-256 is computed by GitHub at upload and served as

phantom-agent/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ asset that downloads the binary, verifies it against a SHA-256 pinned at
99
release time, and loads the launchd daemon. Inside the guest:
1010

1111
```bash
12-
curl -fsSL https://github.com/phantom-vm/phantom/releases/latest/download/agent-install.sh \
13-
-o /tmp/agent-install.sh
14-
sudo sh /tmp/agent-install.sh
12+
curl -fsSL https://github.com/phantom-vm/phantom/releases/latest/download/phantom-agent-install.sh \
13+
-o /tmp/phantom-agent-install.sh
14+
sudo sh /tmp/phantom-agent-install.sh
1515
```
1616

1717
This is exactly what `provision/setup-tahoe.txt` types into the guest during
@@ -38,7 +38,7 @@ release publishes can be generated locally:
3838

3939
```bash
4040
swift build -c release
41-
./make-install-script.sh .build/release/phantom-agent <url-you-will-serve-the-binary-at> > agent-install.sh
41+
./make-install-script.sh .build/release/phantom-agent <url-you-will-serve-the-binary-at> > phantom-agent-install.sh
4242
```
4343

4444
To get a dev build into a VM:
@@ -66,10 +66,10 @@ To get a dev build into a VM:
6666
mkdir -p /tmp/agent-serve
6767
cp .build/release/phantom-agent /tmp/agent-serve/
6868
./make-install-script.sh /tmp/agent-serve/phantom-agent \
69-
http://192.168.64.1:8642/phantom-agent > /tmp/agent-serve/agent-install.sh
69+
http://192.168.64.1:8642/phantom-agent > /tmp/agent-serve/phantom-agent-install.sh
7070
python3 -m http.server 8642 --directory /tmp/agent-serve &
7171

72-
phantom image build my-base --agent-url http://192.168.64.1:8642/agent-install.sh
72+
phantom image build my-base --agent-url http://192.168.64.1:8642/phantom-agent-install.sh
7373
```
7474

7575
## Management

phantom-agent/make-install-script.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#!/bin/sh
22
# Emits a self-contained phantom-agent installer to stdout.
33
#
4-
# make-install-script.sh <binary> <binary-url> > agent-install.sh
4+
# make-install-script.sh <binary> <binary-url> > phantom-agent-install.sh
55
#
6-
# The emitted script is what ships as the `agent-install.sh` release asset:
6+
# The emitted script is what ships as the `phantom-agent-install.sh` release asset:
77
# it downloads <binary-url>, verifies it against the SHA-256 of <binary>
88
# (pinned here at generation time — the installer runs as root from a network
99
# download, so it must not take the bytes on faith), installs it to
1010
# /usr/local/bin and loads the launchd daemon. Inside the guest:
1111
#
12-
# curl -fsSL <url-to>/agent-install.sh -o /tmp/agent-install.sh
13-
# sudo sh /tmp/agent-install.sh
12+
# curl -fsSL <url-to>/phantom-agent-install.sh -o /tmp/phantom-agent-install.sh
13+
# sudo sh /tmp/phantom-agent-install.sh
1414
#
1515
# The release workflow generates the published asset; for local agent
1616
# development, generate one against a binary you serve yourself and point

phantom-cli/src/commands/build.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { waitForVMRunning } from "../lib/wait";
55
//
66
// Two ways in, one way out. From scratch:
77
// ipsw → vm.create → boot-script (Setup Assistant + agent bootstrap via
8-
// curl | sudo sh of the published agent-install.sh) → provision (vsock)
8+
// curl | sudo sh of the published phantom-agent-install.sh) → provision (vsock)
99
// → gitlab-runner → [install Xcode] → vm.stop → image.save
1010
//
1111
// Or on top of an image built that way — the fast path for layering a toolchain
@@ -68,7 +68,7 @@ const isURL = (s: string) => /^https?:\/\//.test(s);
6868

6969
// The installer URL setup-tahoe.txt fetches; --agent-url rewrites it in place.
7070
const RELEASE_AGENT_INSTALL_URL =
71-
"https://github.com/phantom-vm/phantom/releases/latest/download/agent-install.sh";
71+
"https://github.com/phantom-vm/phantom/releases/latest/download/phantom-agent-install.sh";
7272

7373
const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
7474

@@ -96,7 +96,7 @@ export async function imageBuild(...args: string[]) {
9696
console.error(" (skips Setup Assistant and provisioning)");
9797
console.error(" --boot-script <path> Setup Assistant script (default: provision/setup-tahoe.txt)");
9898
console.error(" --provision <path> Provision script (default: provision/provision.sh)");
99-
console.error(" --agent-url <url> agent-install.sh for the boot script to fetch, instead of");
99+
console.error(" --agent-url <url> phantom-agent-install.sh for the boot script to fetch, instead of");
100100
console.error(" the latest GitHub release asset (for agent development)");
101101
console.error(" --xcode <url|path> Install Xcode from this .xip (URL fetched inside the guest,");
102102
console.error(" local path served to the guest over HTTP)");
@@ -133,7 +133,7 @@ async function run(opts: BuildOptions) {
133133
let bootCommands = opts.fromImage ? [] : await readScriptLines(opts.bootScript);
134134

135135
// Agent development override: retarget the boot script's installer fetch
136-
// from the published release asset to a dev-served agent-install.sh.
136+
// from the published release asset to a dev-served phantom-agent-install.sh.
137137
if (opts.agentUrl && !opts.fromImage) {
138138
const before = bootCommands;
139139
bootCommands = bootCommands.map((l) =>

provision/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ IPSW ─▶ vm.create (headless install) ─▶ setup-tahoe.txt (VNC) ─▶ pro
1313
2. **Setup Assistant**`phantom vm boot-script <vm-id> --file provision/setup-tahoe.txt`
1414
drives Setup Assistant over VNC (keystrokes + OCR clicks): creates a local
1515
admin account `admin`/`admin`, skips every online step, reaches the
16-
desktop, and installs the agent by fetching the published `agent-install.sh`
16+
desktop, and installs the agent by fetching the published `phantom-agent-install.sh`
1717
release asset over the guest's NAT network (the installer checks the
1818
binary against a SHA-256 pinned at release time). After this the agent
1919
answers on vsock. For a dev agent, see `image build --agent-url` in

provision/setup-tahoe.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# phantom vm boot-script <vm-id> --file provision/setup-tahoe.txt
99
#
1010
# No host-side prerequisite: the agent is installed by fetching the published
11-
# agent-install.sh release asset over the guest's NAT network (the installer
11+
# phantom-agent-install.sh release asset over the guest's NAT network (the installer
1212
# verifies the binary against a SHA-256 pinned inside it at release time).
1313
# When iterating on the agent locally, point the fetch at a dev-served
1414
# installer instead with `image build --agent-url` (see phantom-agent/README.md).
@@ -83,7 +83,7 @@
8383
# binary, checks the pinned SHA-256, and loads the launchd daemon. sudo reads
8484
# the password from stdin. The retries wait out a NAT link that is still
8585
# settling on first use.
86-
curl -fsSL --retry 5 --retry-connrefused --retry-all-errors -o /tmp/agent-install.sh https://github.com/phantom-vm/phantom/releases/latest/download/agent-install.sh && echo admin | sudo -S sh /tmp/agent-install.sh<enter><wait20s>
86+
curl -fsSL --retry 5 --retry-connrefused --retry-all-errors -o /tmp/phantom-agent-install.sh https://github.com/phantom-vm/phantom/releases/latest/download/phantom-agent-install.sh && echo admin | sudo -S sh /tmp/phantom-agent-install.sh<enter><wait20s>
8787

8888
# Quit Terminal so the saved image boots to a clean desktop (Alt = Command in
8989
# the guest). The shell is idle now, so Cmd+Q closes it without a prompt.

0 commit comments

Comments
 (0)