@puddle-code/cli 0.0.12 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +41 -77
  2. package/README.md +4 -4
  3. package/dist/index.js +446 -166
  4. package/dist/public/assets/Dashboard-Ct5exI8s.js +1 -0
  5. package/dist/public/assets/{EditorTabClose-C3OCj0Ia.js → EditorTabClose-BhFjRoCZ.js} +1 -1
  6. package/dist/public/assets/{LazyTerminal-BihPI9J1.js → LazyTerminal-B0xYs2ul.js} +2 -2
  7. package/dist/public/assets/{ModelRefcount-wkKpjkKn.js → ModelRefcount-BY5Ul0p3.js} +1 -1
  8. package/dist/public/assets/{PaneEditorBody-DRR16vdx.js → PaneEditorBody-DLMtDiov.js} +1 -1
  9. package/dist/public/assets/SettingsDialog-WhQXNCmS.js +1 -0
  10. package/dist/public/assets/{Terminal-Ci3-2jXt.js → Terminal-DA8zjtmU.js} +1 -1
  11. package/dist/public/assets/Workspace-B0FDl771.js +6 -0
  12. package/dist/public/assets/{buffer-store-mErJ-u_7.js → buffer-store-BHJ82Nh3.js} +2 -2
  13. package/dist/public/assets/context-menu--H5GoapF.js +1 -0
  14. package/dist/public/assets/{cssMode-BxSU83en.js → cssMode-Ctq00nXG.js} +1 -1
  15. package/dist/public/assets/{htmlMode-BI3Fg8wV.js → htmlMode-pYCLPiZ_.js} +1 -1
  16. package/dist/public/assets/index-CjgsCY-C.css +2 -0
  17. package/dist/public/assets/index-RvCLpi9M.js +10 -0
  18. package/dist/public/assets/{jsonMode-Bsh_R96t.js → jsonMode-Ch5UticT.js} +1 -1
  19. package/dist/public/assets/{session-seed-BbO3y4XI.js → session-seed-DBxHPYBK.js} +1 -1
  20. package/dist/public/assets/ssh-mode-eNTVum_C.js +1 -0
  21. package/dist/public/assets/{tsMode-CV6x0W8w.js → tsMode-CeXrzlPn.js} +1 -1
  22. package/dist/public/index.html +3 -3
  23. package/package.json +1 -1
  24. package/dist/public/assets/Dashboard-DOKOSPsG.js +0 -1
  25. package/dist/public/assets/SettingsDialog-CpnehH60.js +0 -1
  26. package/dist/public/assets/Workspace-D1XOZzcy.js +0 -6
  27. package/dist/public/assets/context-menu-DyvGbiNT.js +0 -1
  28. package/dist/public/assets/index-DIgA5eoW.js +0 -10
  29. package/dist/public/assets/index-WMJ9gBck.css +0 -2
  30. package/dist/public/assets/ssh-mode-BuFhqbL1.js +0 -1
package/CHANGELOG.md CHANGED
@@ -7,89 +7,53 @@ Past releases: see docs/changelogs/.
7
7
 
8
8
  # Changelog
9
9
 
10
- ## [0.0.12] — 2026-07-28
10
+ ## [0.0.14] — 2026-07-28
11
11
 
12
12
  ### Added
13
13
 
14
- - Notifications actually fire now: when an agent flips to waiting for input,
15
- puddle shows a desktop notification (while the window is unfocused; clicking
16
- it opens the session), plays the optional sound, and badges the tab title
17
- with the count of waiting agents honouring the Notifications settings and
18
- per-project mutes. Enabling the desktop toggle asks for browser permission.
19
-
20
- - A `running` agent that has recorded no transcript activity for over an hour
21
- is flagged `stale_running` (computed on read, protocol **10.1** — additive):
22
- the UI fades its status dot, drops the ripple, and hints "possibly stalled".
23
- Advisory only the daemon never interrupts an agent over it.
24
-
25
- - Desktop shell (`packages/desktop`): puddle now also builds as a standalone
26
- Electron app. The main process drives the exact same cockpit engine as the
27
- `puddle` CLI (`startLocal` from the new embedder surface
28
- `@puddle-code/cli/lib`) and opens a window on the embedded cockpit — one
29
- codebase, two downstream builds. External links and editor deep links open
30
- via the OS, the connection banner's refresh restarts the cockpit
31
- in-process, notification clicks raise the window, and quitting never
32
- touches the daemon or running agents. `pnpm --filter @puddle/desktop start`
33
- to run, `… dist` to package (dmg/zip/AppImage).
34
- - Desktop remote hosts: File → "Connect to SSH Host…" (⌘⇧O, with a Recent
35
- Hosts submenu) drives the CLI's `connectRemote` — one window per host,
36
- closing it stops only that cockpit's tunnel/UI server. Key-authenticated
37
- hosts only (no TTY for ssh prompts); the dialogue points password/2FA
38
- hosts at `puddle connect`.
39
- - Desktop release packaging: tags now also build the app (dmg/zip on macOS
40
- arm64, AppImage on linux x64) and attach it to the GitHub release with
41
- checksums in SHA256SUMS. macOS signing + notarisation switch on when the
42
- `MAC_CERT_P12`/`MAC_CERT_PASSWORD` and `APPLE_ID`/`APPLE_APP_SPECIFIC_PASSWORD`/
43
- `APPLE_TEAM_ID` secrets exist; unsigned otherwise — the accepted default,
44
- with the Gatekeeper "Open Anyway"/`xattr` path documented in the README.
45
- - Desktop app icon: the puddle mark in dark-theme gold on a navy squircle
46
- (icon.svg → committed png/icns via `packages/desktop/scripts/render-icon.sh`).
14
+ - Desktop self-update, no code signing required: the app polls GitHub
15
+ releases, downloads and SHA256SUMS-verifies the new build into
16
+ `~/.puddle/cache/desktop/`, and offers a "Restart to update" banner; a
17
+ detached helper swaps the install after quit and relaunches (SPEC §10
18
+ the CLI-style alternative to Squirrel, which refuses unsigned bundles).
19
+ The helper strips `com.apple.quarantine` from the swapped bundle as
20
+ defence in depth, and a Linux AppImage updates in place at `$APPIMAGE`,
21
+ wherever the user keeps it.
22
+ - `puddle upgrade` now names its subject: `puddle upgrade daemon [user@host]`
23
+ (the previous behaviour), `puddle upgrade cli` (npm under the hood), and
24
+ `puddle upgrade desktop` (the app's update pipeline, run while the app is
25
+ closed). `cli`/`desktop` refuse remote targets only the daemon lives on
26
+ remote hosts.
47
27
 
48
28
  ### Fixed
49
29
 
50
- - Battery: the web UI now idles properly. Terminals detach from their PTY
51
- stream while hidden (background tab of a pane, or the whole browser tab
52
- hidden) and repaint from the daemon's replay when shown again a hidden
53
- terminal no longer receives and parses every output byte. Visible terminals
54
- render on the GPU (`@xterm/addon-webgl`, DOM-renderer fallback). The status
55
- ripples/pulses are finite (~30 s / ~1 min after a status change) instead of
56
- animating forever, and the ports/env (5 s) and git status/diff (10 s) polls
57
- stretch 12× while the window is unfocused, snapping back on refocus. Agent
58
- processes and PTYs are untouched by all of this — pausing is viewer-side
59
- only.
60
- - Battery, daemon-side: the 3 s agent-title refresh stat-guards the transcript
61
- and skips the 128 KiB read when unchanged; PTY log writes coalesce on a
62
- 100 ms flush instead of one synchronous write per output chunk; session logs
63
- are now actually capped at `logMaxBytes` (the config existed but was never
64
- enforced — logs grew without bound), rotating to the newest half; the status
65
- detector compiles its regexes once instead of per chunk; and the WS gateway
66
- stops JSON-encoding output for streams whose last viewer detached.
67
- - Replayed terminal history no longer re-executes OSC side effects: a stale
68
- OSC 52 copy can't clobber the clipboard and stale colour-query replies are
69
- never written into a working agent's stdin; a re-attach also repaints the
70
- buffer from scratch instead of appending the replay to what it showed.
71
- - Status detection no longer sticks on green: agent status is now driven by
72
- the agent's own hooks instead of scraping the terminal. For Claude Code the
73
- daemon installs Stop / Notification(permission_prompt, idle_prompt) /
74
- UserPromptSubmit / PreToolUse hooks (verified against 2.1.219) whose helper
75
- reports to a new nonce-gated `POST /agent-signal` endpoint (protocol 9.4);
76
- the old regex detection remains as a fallback until a session's first
77
- signal. Existing accounts pick the hooks up at the next daemon boot.
78
- - Desktop Linux packaging: the AppImage build failed because electron-builder derived the executable name from the package name (`@puddle/desktop` → `@puddledesktop`, rejected for the `@`); set `linux.executableName: puddle-desktop` explicitly, plus `desktopName` + `linux.syncDesktopName` so the `.desktop` entry, `StartupWMClass`, and Electron's app_id all match for window association.
30
+ - Battery: the file explorer no longer pins a CPU core for as long as it is
31
+ mounted. Its query-cache subscription reacted to *observer* events which
32
+ fire during React renders themselves so every workspace window sat in a
33
+ permanent render cache-event re-render loop (the "Puddle is using
34
+ significant energy" report). The subscription now only reacts to query-state
35
+ events (data landing, cache add/remove). Measured on an idle workspace
36
+ (file tree + attached terminal): 83–112% CPU per window before, 0–1.2%
37
+ after; whole app now idles at ~1–2% of one core total, below macOS's
38
+ significant-energy threshold. Full write-up with methodology in
39
+ `docs/reports/2026-07-28-explorer-render-loop.md`.
79
40
 
80
41
  ### Changed
81
42
 
82
- - `PROTOCOL_VERSION` **10.0**: a deliberate major bump (the 6.0/8.0
83
- pattern) so every connected daemon auto-upgrades at the next handshake
84
- this release's hook-driven status detection and archive-kills-live
85
- behaviour live daemon-side, and a 9.x daemon would leave sessions stuck
86
- green. Rolls up the unreleased 9.3/9.4 additions (`POST /agent-signal`,
87
- archive accepting live sessions).
88
-
89
- - Archiving is one gesture for any session: the ⋯/right-click menu offers
90
- Archive on live agents and terminals too the daemon kills the session as
91
- part of archiving (still a reversible hide; unarchive brings it back
92
- resumable), so there is no kill-first dance and no confirmation dialog.
93
- Protocol 9.3.
94
- - Kill lost its confirmation dialog too: it only stops the agent process (the
95
- conversation stays resumable), so the menu action now fires immediately.
43
+ - `puddle start` and `puddle connect` are unified into
44
+ `puddle launch [local | user@host]` no target means local, and every flag
45
+ from both verbs (`--port`, `--prefer-port`, `--remote-port`, `--no-browser`,
46
+ `--no-upgrade`, `--tarball`, `--foreground`) rides along. The old verbs
47
+ error with the exact replacement.
48
+ - Desktop: new windows no longer default to local. Launching the app, ⌘N,
49
+ Window → New Window, and the macOS dock icon's right-click New Window all
50
+ open a host picker "This machine" on top, then recent hosts, then
51
+ "Other SSH host…" and nothing connects until you pick.
52
+ - Desktop: recent hosts moved from the app's userData dir to
53
+ `~/.puddle/recent-hosts.json` (migrated automatically), so they survive
54
+ app updates and reinstalls.
55
+ - Desktop (macOS): the merged title bar is a little slimmer (44 40px, traffic
56
+ lights re-centred), so the workspace chrome sits closer to the lights.
57
+
58
+ - Light theme: exited/idle status dots are neutral grey instead of warm bark brown (matching the 2026-07-16 muted-text re-grey; dark theme was already grey).
59
+ - Desktop (macOS): more breathing room between the traffic lights and the host name in the merged title bar.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  Puddle is an open-source, multi-account coding agent orchestrator with first-class SSH support and a lightweight GUI. With a single command,
7
7
 
8
8
  ```bash
9
- puddle connect <user>@<host>
9
+ puddle launch <user>@<host>
10
10
  ```
11
11
 
12
12
  Puddle manages parallel agents anywhere you SSH into, insulates agents in dedicated worktrees, and keeps your agents alive across disconnects and restarts.
@@ -22,7 +22,7 @@ npm install -g @puddle-code/cli
22
22
  **To launch agents on a remote host:**
23
23
 
24
24
  ```sh
25
- puddle connect <user>@<host>
25
+ puddle launch <user>@<host>
26
26
  ```
27
27
 
28
28
  This connects Puddle to the remote host over SSH, bootstrapping the Puddle daemon on first contact and enabling you to begin development.
@@ -32,7 +32,7 @@ Puddle works using your system `ssh`, so `~/.ssh/config`, agents, and jump hosts
32
32
  **For development on your own machine:**
33
33
 
34
34
  ```sh
35
- puddle start
35
+ puddle launch
36
36
  ```
37
37
 
38
38
  This installs the Puddle daemon under `~/.puddle` and serves the GUI at `http://localhost:7433`.
@@ -106,7 +106,7 @@ systemctl --user disable --now puddled # Linux (systemd user unit)
106
106
  kill "$(cat ~/.puddle/puddled.pid)" # nohup fallback (no supervisor)
107
107
  ```
108
108
 
109
- **Restore the production daemon.** When you're done testing, put the release build back over your dev one: stop the daemon (above), clear the installed binaries with `rm -rf ~/.puddle/bin` (your `~/.puddle` state — profiles, sessions, worktrees — is untouched), then run the production `puddle start`, which refetches the daemon from GitHub Releases. (Clearing `bin` is what forces the refetch: the installer skips a version whose files are already present, so a dev build sharing the release's version number would otherwise stay put.)
109
+ **Restore the production daemon.** When you're done testing, put the release build back over your dev one: stop the daemon (above), clear the installed binaries with `rm -rf ~/.puddle/bin` (your `~/.puddle` state — profiles, sessions, worktrees — is untouched), then run the production `puddle launch`, which refetches the daemon from GitHub Releases. (Clearing `bin` is what forces the refetch: the installer skips a version whose files are already present, so a dev build sharing the release's version number would otherwise stay put.)
110
110
 
111
111
  **Uninstall.** Removing the CLI alone leaves the daemon installed and running — a full teardown stops the daemon, then removes its state, its service file, and the production CLI:
112
112