conductor-remote 1.46.2 → 1.46.3

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.
package/README.md CHANGED
@@ -41,9 +41,8 @@ Manage the service with `conductor-remote service status|restart|uninstall`.
41
41
 
42
42
  `conductor-remote config` prints what the daemon is **actually** configured with and
43
43
  where each value came from, then cross-checks the configured reachability against what
44
- Tailscale is really doing. Read-only. Reach for it first when the relay is behaving like
45
- a setting you thought you changed never took, because the values it reports come from the
46
- daemon's own environment rather than your shell's.
44
+ Tailscale is doing. Change one value with `conductor-remote config set <setting> <value>`.
45
+ The setter preserves the other values in the LaunchAgent plist and restarts the relay.
47
46
 
48
47
  **Install flags.** `service install` takes flags for the install-time knobs (each
49
48
  also settable via the env var in brackets — the flag wins when both are given).
@@ -55,6 +54,7 @@ Run `conductor-remote --help` for the full list. The common ones:
55
54
  | `--port <n>` | `RELAY_PORT` | Listen port (default `8787`) |
56
55
  | `--token <secret>` | `RELAY_TOKEN` | Pin the shared secret (default: generated + persisted) |
57
56
  | `--write-strategy <s>` | `WRITE_STRATEGY` | `applescript` (default) or `sidecar` |
57
+ | `--prevent-screen-lock on\|off` | `PREVENT_SCREEN_LOCK` | Block the automatic lock during nosleep windows (default `on`) |
58
58
 
59
59
  **Reachability (`--expose`).** By default the URL is exposed publicly via
60
60
  [Tailscale Funnel](https://tailscale.com/kb/1223/funnel) — reachable from any
@@ -164,8 +164,7 @@ Each knob is an env var (honored by `yarn start` and `service install`) and, for
164
164
  env. `EXPOSE`/`--expose` is documented under Install above.
165
165
 
166
166
  `service install` bakes these into the LaunchAgent plist, so that plist is the daemon's
167
- environment and re-running `service install --<flag> <value>` is how you change one.
168
- `conductor-remote config` reads them back:
167
+ environment. Use `config set` for later changes. `conductor-remote config` reads them back:
169
168
 
170
169
  ```
171
170
  $ conductor-remote config
@@ -182,12 +181,18 @@ daemon: running (pid 85882)
182
181
  ✓ tailscale agrees: serve only (tailnet)
183
182
  ```
184
183
 
184
+ ```bash
185
+ conductor-remote config set port 9000
186
+ conductor-remote config set write-strategy sidecar
187
+ ```
188
+
185
189
  | Var | Flag | Default | Purpose |
186
190
  | --- | --- | --- | --- |
187
191
  | `RELAY_PORT` | `--port` | `8787` | Listen port |
188
192
  | `RELAY_HOST` | `--host` | auto (Tailscale `100.x`, else `127.0.0.1`) | Bind address |
189
193
  | `RELAY_TOKEN` | `--token` | persisted (auto-generated, reused across restarts) | Override the shared secret |
190
194
  | `WRITE_STRATEGY` | `--write-strategy` | `applescript` | `applescript` (focused session) or `sidecar` (precise per-session — see below) |
195
+ | `PREVENT_SCREEN_LOCK` | `--prevent-screen-lock` | `on` | Block the automatic lock during nosleep windows |
191
196
  | `AUTO_UPDATE` | `--auto-update` | `auto` | Self-update mode: `auto` / `check` / `off` |
192
197
  | `CONDUCTOR_DB` | `--db` | `~/Library/Application Support/com.conductor.app/conductor.db` | State DB |
193
198
  | `CONDUCTOR_WORKSPACES` | `--workspaces` | `~/conductor/workspaces` | Worktree root |
@@ -459,10 +464,11 @@ lives at the root `pmset` layer no assertion can touch. Running those tools with
459
464
  no assertion for the standby layer. Closing the lid is the same story one level
460
465
  down: it sleeps an Apple Silicon Mac immediately and no assertion stops that
461
466
  either, so a keep-awake app plus a shut lid is still a sleeping Mac. The root
462
- `disablesleep` flag *does* hold it awake lid-closed, which is the lever `nosleep`
463
- pulls below (in use on an M5 Pro). Awake is not the same as drivable, though: the
464
- lock screen still blocks every UI write, so a lid-closed Mac serves reads and
465
- notifications while sends park until you unlock (#87).
467
+ `disablesleep` flag *does* hold it awake lid-closed, which is one lever `nosleep`
468
+ pulls below (in use on an M5 Pro). The other is a bounded `caffeinate -d` display
469
+ assertion. ScreenSaverDaemon checks it before starting the idle screen saver, so
470
+ the automatic screen lock stays off while the window runs. A manual lock or lid
471
+ close can still lock the session; sends then park until you unlock (#87).
466
472
 
467
473
  **Fix — `conductor-remote nosleep`.** It blocks sleep at the root `pmset` layer (the
468
474
  one no assertion reaches) for a bounded window and **auto-reverts** on exit, Ctrl-C, or
@@ -473,7 +479,23 @@ conductor-remote nosleep 2h # also 90m, 30s, bare seconds; no arg = until Ct
473
479
  ```
474
480
 
475
481
  The confirmation carries the wall-clock **expiry**, measured from when your password lands
476
- rather than when you typed the command `✓ Sleep disabled until 21:45 (2h, incl. lid closed).`
482
+ rather than when you typed the command. It also warns that the automatic lock is off:
483
+
484
+ ```text
485
+ ✓ Sleep disabled until 21:45 (2h, incl. lid closed). Ctrl-C to restore.
486
+ ⚠ Automatic screen lock is disabled for this window. Anyone with physical access can use this Mac.
487
+ ```
488
+
489
+ This is on by default because the AppleScript write path needs an unlocked session. Configure
490
+ it from the Mac CLI. The value applies to terminal and phone-armed windows:
491
+
492
+ ```bash
493
+ conductor-remote config set prevent-screen-lock off
494
+ conductor-remote config # reports prevent-screen-lock off from the plist
495
+ ```
496
+
497
+ Use `on` to restore the default. `PREVENT_SCREEN_LOCK=off` remains available as an
498
+ environment override for direct relay runs.
477
499
 
478
500
  Out of the box it prompts for `sudo` and runs in the foreground. Since sending from the
479
501
  phone already means manually turning on your hotspot, flipping this on for the session is
@@ -505,7 +527,8 @@ bad `/etc/sudoers.d` entry can cost you `sudo` altogether.
505
527
 
506
528
  **From the phone.** Once the rule is installed, the Connect sheet grows a **Mac** section:
507
529
  tap 1h / 4h / 8h to hold the Mac awake, or "Let it sleep" to end the window early
508
- (`GET`/`POST`/`DELETE /api/nosleep`, capped at 12h). The armed window is spawned
530
+ (`GET`/`POST`/`DELETE /api/nosleep`, capped at 12h). It reports whether the active
531
+ window blocks the screen lock. The armed window is spawned
509
532
  *detached*, because the relay restarts itself on every self-update and a plain child would
510
533
  die with it and quietly restore sleep at the worst moment; the relay finds it again after a
511
534
  restart by reading `/var/run/conductor-remote-nosleep.pid`. Only one window may be armed —
package/bin/cli.js CHANGED
@@ -62,11 +62,10 @@ function usage() {
62
62
  ' read transcripts and drive workspaces via the relay',
63
63
  ' conductor-remote service <subcommand> manage the login LaunchAgent',
64
64
  ' install | uninstall | restart | status',
65
- ' conductor-remote config what the daemon is actually configured with, and',
66
- ' where each value came from (read-only)',
65
+ ' conductor-remote config show the daemon configuration and each value source',
66
+ ' config set <setting> <value> persist one setting and restart the relay',
67
67
  ' conductor-remote logs [-n N] [--no-follow] tail the running relay’s logs (follows by default)',
68
- ' conductor-remote nosleep [duration] keep this Mac awake (incl. lid-closed) until',
69
- ' Ctrl-C or the duration (e.g. 1h, 90m)',
68
+ ' conductor-remote nosleep [duration] keep this Mac awake until Ctrl-C or the duration',
70
69
  ' nosleep setup [--uninstall] one-time install so it stops asking for a',
71
70
  ' password (root helper + scoped sudoers rule)',
72
71
  ' nosleep status what is installed, and is sleep blocked now',
@@ -79,6 +78,7 @@ function usage() {
79
78
  ' --hostname <name> pin the Tailscale device name so the phone URL never drifts [RELAY_HOSTNAME]',
80
79
  ' --token <secret> pin the shared secret (default: generated + persisted) [RELAY_TOKEN]',
81
80
  ' --write-strategy <s> applescript (default) | sidecar [WRITE_STRATEGY]',
81
+ ' --prevent-screen-lock <s> on (default) | off [PREVENT_SCREEN_LOCK]',
82
82
  ' --auto-update <mode> auto (default) | check | off [AUTO_UPDATE]',
83
83
  ' --db <path> Conductor state DB [CONDUCTOR_DB]',
84
84
  ' --workspaces <path> worktree root [CONDUCTOR_WORKSPACES]',
@@ -109,9 +109,9 @@ switch (cmd) {
109
109
  await import(resolveEntry('../dist-node/scripts/nosleep.js', '../scripts/nosleep.ts'))
110
110
  break
111
111
  case 'config':
112
- // Read-only view of the daemon's effective configuration. A service.ts subcommand, re-shaped the
113
- // same way `logs` is, because the answer lives in the plist that script writes.
114
- process.argv = [process.argv[0], process.argv[1], 'config']
112
+ // Configuration lives in the LaunchAgent plist managed by service.ts. Pass through
113
+ // `set <name> <value>` when present so reads and writes use the same source.
114
+ process.argv = [process.argv[0], process.argv[1], 'config', ...rest]
115
115
  await import(resolveEntry('../dist-node/scripts/service.js', '../scripts/service.ts'))
116
116
  break
117
117
  case 'logs':