conductor-remote 1.24.0 → 1.24.2
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 +12 -29
- package/bin/cli.js +7 -0
- package/dist/assets/{index-CKMPOrHs.js → index-Cc72wJyy.js} +2 -2
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/dist-node/scripts/nosleep.js +17 -8
- package/dist-node/scripts/service.js +75 -5
- package/dist-node/src/server.js +9 -0
- package/dist-node/src/tailscale.js +50 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -254,37 +254,19 @@ lives at the root `pmset` layer no assertion can touch. Running those tools with
|
|
|
254
254
|
no assertion for the standby layer. (Note: lid *closed* on Apple Silicon forces
|
|
255
255
|
sleep regardless — keep the lid open, or attach an external display **and** power.)
|
|
256
256
|
|
|
257
|
-
**Fix —
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
alone does not survive a restart, which is why this is a daemon, not a one-off):
|
|
257
|
+
**Fix — `conductor-remote nosleep`.** It blocks sleep at the root `pmset` layer (the
|
|
258
|
+
one no assertion reaches) for a bounded window and **auto-reverts** on exit, Ctrl-C, or
|
|
259
|
+
the timeout — nothing permanent, nothing left on your machine:
|
|
261
260
|
|
|
262
261
|
```bash
|
|
263
|
-
|
|
264
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
265
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
266
|
-
<plist version="1.0"><dict>
|
|
267
|
-
<key>Label</key><string>dev.conductor-remote.nosleep</string>
|
|
268
|
-
<key>ProgramArguments</key>
|
|
269
|
-
<array><string>/usr/bin/pmset</string><string>-b</string><string>disablesleep</string><string>1</string></array>
|
|
270
|
-
<key>RunAtLoad</key><true/>
|
|
271
|
-
</dict></plist>
|
|
272
|
-
PLIST
|
|
273
|
-
sudo launchctl bootstrap system /Library/LaunchDaemons/dev.conductor-remote.nosleep.plist
|
|
262
|
+
conductor-remote nosleep 2h # also 90m, 30s, bare seconds; no arg = until Ctrl-C
|
|
274
263
|
```
|
|
275
264
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
local a="${1:-1h}" s
|
|
282
|
-
case "$a" in *h) s=$(( ${a%h} * 3600 ));; *m) s=$(( ${a%m} * 60 ));; *s) s=${a%s};; *) s=$a;; esac
|
|
283
|
-
sudo sh -c "pmset -b standby 0 powernap 0 disablesleep 1
|
|
284
|
-
trap 'pmset -b standby 1 powernap 1 disablesleep 0' EXIT INT TERM
|
|
285
|
-
sleep $s"
|
|
286
|
-
}
|
|
287
|
-
```
|
|
265
|
+
It prompts for `sudo` once and runs in the foreground (the background LaunchAgent has no
|
|
266
|
+
terminal to prompt on, so it can't self-arm). Since sending from the phone already means
|
|
267
|
+
manually turning on your hotspot, flipping this on for the session is the same kind of
|
|
268
|
+
deliberate, revertable switch — no boot daemon, no permanent change. Simplest of all: keep
|
|
269
|
+
the Mac on **AC power**, where it never maintenance-sleeps.
|
|
288
270
|
|
|
289
271
|
**Check / undo:**
|
|
290
272
|
|
|
@@ -293,8 +275,9 @@ pmset -g | grep -i sleepdisabled # 1 = sleep blocked
|
|
|
293
275
|
sudo pmset -b standby 1 powernap 1 disablesleep 0 # restore defaults
|
|
294
276
|
```
|
|
295
277
|
|
|
296
|
-
|
|
297
|
-
the idle layer, which was never the problem.
|
|
278
|
+
While `nosleep` is running you can quit any keep-awake app — those only ever asserted
|
|
279
|
+
on the idle layer, which was never the problem. It restores on its own; the manual undo
|
|
280
|
+
above is only for the rare case where it was killed hard.
|
|
298
281
|
|
|
299
282
|
## Disclaimer
|
|
300
283
|
|
package/bin/cli.js
CHANGED
|
@@ -60,6 +60,7 @@ function usage() {
|
|
|
60
60
|
' conductor-remote [start] run the relay (default)',
|
|
61
61
|
' conductor-remote service <subcommand> manage the login LaunchAgent',
|
|
62
62
|
' install | uninstall | restart | status',
|
|
63
|
+
' conductor-remote logs [-n N] [--no-follow] tail the running relay’s logs (follows by default)',
|
|
63
64
|
' conductor-remote nosleep [duration] keep this Mac awake (incl. lid-closed) until',
|
|
64
65
|
' Ctrl-C or the duration (e.g. 1h, 90m); needs sudo',
|
|
65
66
|
' conductor-remote --version print the installed version',
|
|
@@ -68,6 +69,7 @@ function usage() {
|
|
|
68
69
|
' --expose public|tailnet reachability: public Funnel (default) or tailnet-only [EXPOSE]',
|
|
69
70
|
' --port <n> listen port (default 8787) [RELAY_PORT]',
|
|
70
71
|
' --host <addr> bind address (default 127.0.0.1) [RELAY_HOST]',
|
|
72
|
+
' --hostname <name> pin the Tailscale device name so the phone URL never drifts [RELAY_HOSTNAME]',
|
|
71
73
|
' --token <secret> pin the shared secret (default: generated + persisted) [RELAY_TOKEN]',
|
|
72
74
|
' --write-strategy <s> applescript (default) | sidecar [WRITE_STRATEGY]',
|
|
73
75
|
' --auto-update <mode> auto (default) | check | off [AUTO_UPDATE]',
|
|
@@ -94,6 +96,11 @@ switch (cmd) {
|
|
|
94
96
|
process.argv = [process.argv[0], process.argv[1], ...rest]
|
|
95
97
|
await import(resolveEntry('../dist-node/scripts/nosleep.js', '../scripts/nosleep.ts'))
|
|
96
98
|
break
|
|
99
|
+
case 'logs':
|
|
100
|
+
// `logs` is a service.ts subcommand; re-shape argv so its argv[2] is `logs` (mirrors the `service` case).
|
|
101
|
+
process.argv = [process.argv[0], process.argv[1], 'logs', ...rest]
|
|
102
|
+
await import(resolveEntry('../dist-node/scripts/service.js', '../scripts/service.ts'))
|
|
103
|
+
break
|
|
97
104
|
case '-v':
|
|
98
105
|
case '--version':
|
|
99
106
|
case 'version':
|