conductor-remote 1.19.0 → 1.20.0

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/dist/index.html CHANGED
@@ -11,7 +11,7 @@
11
11
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
12
12
  <link rel="icon" type="image/svg+xml" href="/icon.svg" />
13
13
  <title>Conductor Remote</title>
14
- <script type="module" crossorigin src="/assets/index-BCEPceVq.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-B0MBKSxt.js"></script>
15
15
  <link rel="stylesheet" crossorigin href="/assets/index-CZuhTf-G.css">
16
16
  <link rel="manifest" href="/manifest.webmanifest"></head>
17
17
  <body>
package/dist/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let e,i={};const n=(n,s)=>(n=new URL(n+".js",s).href,i[n]||new Promise(i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()}).then(()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(s,o)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(i[r])return;let t={};const c=e=>n(e,r),l={module:{uri:r},exports:t,require:c};i[r]=Promise.all(s.map(e=>l[e]||c(e))).then(e=>(o(...e),t))}}define(["./workbox-9c191d2f"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"index.html",revision:"96338721bbb009f99c32378af0855187"},{url:"assets/workbox-window.prod.es5-BBnX5xw4.js",revision:null},{url:"assets/index-CZuhTf-G.css",revision:null},{url:"assets/index-BCEPceVq.js",revision:null},{url:"apple-touch-icon.png",revision:"2b9301416b880d45d4bb655f2600d1f2"},{url:"icon-192.png",revision:"c5e01ac58768627e18ee7b8b6a9239ef"},{url:"icon-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon-maskable-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon.svg",revision:"c1aee186821798733dd477e69a0ef243"},{url:"manifest.webmanifest",revision:"cf88fbc5755108a7fe0616fa160a8a15"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/api\//]}))});
1
+ if(!self.define){let e,i={};const n=(n,s)=>(n=new URL(n+".js",s).href,i[n]||new Promise(i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()}).then(()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(s,o)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(i[r])return;let t={};const l=e=>n(e,r),c={module:{uri:r},exports:t,require:l};i[r]=Promise.all(s.map(e=>c[e]||l(e))).then(e=>(o(...e),t))}}define(["./workbox-9c191d2f"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"index.html",revision:"ea132fe2b1edd664b2c0bd414fdb51b4"},{url:"assets/workbox-window.prod.es5-BBnX5xw4.js",revision:null},{url:"assets/index-CZuhTf-G.css",revision:null},{url:"assets/index-B0MBKSxt.js",revision:null},{url:"apple-touch-icon.png",revision:"2b9301416b880d45d4bb655f2600d1f2"},{url:"icon-192.png",revision:"c5e01ac58768627e18ee7b8b6a9239ef"},{url:"icon-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon-maskable-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon.svg",revision:"c1aee186821798733dd477e69a0ef243"},{url:"manifest.webmanifest",revision:"cf88fbc5755108a7fe0616fa160a8a15"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/api\//]}))});
@@ -32,6 +32,7 @@ const FLAG_ENV = {
32
32
  '--token': 'RELAY_TOKEN',
33
33
  '--write-strategy': 'WRITE_STRATEGY',
34
34
  '--auto-update': 'AUTO_UPDATE',
35
+ '--auto-update-interval': 'AUTO_UPDATE_INTERVAL_MINUTES',
35
36
  '--db': 'CONDUCTOR_DB',
36
37
  '--workspaces': 'CONDUCTOR_WORKSPACES'
37
38
  };
@@ -134,6 +135,8 @@ function buildPlist() {
134
135
  envEntries.push(['RELAY_PORT', process.env.RELAY_PORT]);
135
136
  if (process.env.AUTO_UPDATE)
136
137
  envEntries.push(['AUTO_UPDATE', process.env.AUTO_UPDATE]);
138
+ if (process.env.AUTO_UPDATE_INTERVAL_MINUTES)
139
+ envEntries.push(['AUTO_UPDATE_INTERVAL_MINUTES', process.env.AUTO_UPDATE_INTERVAL_MINUTES]);
137
140
  if (process.env.CONDUCTOR_DB)
138
141
  envEntries.push(['CONDUCTOR_DB', process.env.CONDUCTOR_DB]);
139
142
  if (process.env.CONDUCTOR_WORKSPACES)
@@ -35,10 +35,20 @@ const execFileP = promisify(execFile);
35
35
  const NAME = 'conductor-remote';
36
36
  const projectDir = packageRoot(import.meta.dirname);
37
37
  const REGISTRY = process.env.NPM_REGISTRY ?? 'https://registry.npmjs.org';
38
- const CHECK_INTERVAL_MS = 6 * 60 * 60 * 1000;
38
+ // Registry poll cadence. The poll is a single cheap GET off npm's CDN, so a tight loop costs nothing;
39
+ // a coarse interval, by contrast, left the phone serving a stale build for hours when several versions
40
+ // ship in quick succession (the poll only fires ~90s after boot, then on this interval). 2 min keeps the
41
+ // phone within a couple minutes of `latest`. `AUTO_UPDATE_INTERVAL_MINUTES` retunes it with no code change;
42
+ // values are floored at 1 min (below that you're just racing the 60s disk-skew heal and the CDN's tag TTL).
43
+ function resolveIntervalMs() {
44
+ const raw = Number(process.env.AUTO_UPDATE_INTERVAL_MINUTES);
45
+ const minutes = Number.isFinite(raw) && raw > 0 ? raw : 2;
46
+ return Math.max(minutes, 1) * 60 * 1000;
47
+ }
48
+ const CHECK_INTERVAL_MS = resolveIntervalMs();
39
49
  const FIRST_DELAY_MS = 90 * 1000;
40
50
  // A local package.json read is free next to a network poll, so reconcile disk↔process skew often —
41
- // this heals an out-of-band upgrade in ~a minute instead of waiting up to 6h for the registry poll.
51
+ // this heals an out-of-band upgrade in ~a minute instead of waiting for the next registry poll.
42
52
  const DISK_CHECK_INTERVAL_MS = 60 * 1000;
43
53
  function readVersion() {
44
54
  try {
@@ -198,7 +208,8 @@ export function startAutoUpdate() {
198
208
  status.mode = mode;
199
209
  if (mode === 'off')
200
210
  return;
201
- log(`enabled (mode=${mode}, current=${CURRENT}); first check in ${FIRST_DELAY_MS / 1000}s, then every 6h.`);
211
+ const everyMin = Math.round(CHECK_INTERVAL_MS / 60_000);
212
+ log(`enabled (mode=${mode}, current=${CURRENT}); first check in ${FIRST_DELAY_MS / 1000}s, then every ${everyMin}m.`);
202
213
  setTimeout(() => void runCheck(mode), FIRST_DELAY_MS).unref();
203
214
  setInterval(() => void runCheck(mode), CHECK_INTERVAL_MS).unref();
204
215
  // Only `auto` may exit()→restart (KeepAlive is guaranteed there); `check` reports but never acts,
@@ -70,12 +70,17 @@ export class AppleScriptActuator {
70
70
  const navigate = navQuery ? FOCUS_WORKSPACE_STEPS : '';
71
71
  // Paste beats keystroke for long/multibyte prompts. Stash the clipboard,
72
72
  // focus the target workspace, paste, send, and restore.
73
+ // After the palette navigates to the workspace, focus lands on a button, not
74
+ // the composer — so Cmd+L (Conductor's "focus the composer" shortcut) is the
75
+ // load-bearing step that puts the caret in the prompt box before we paste.
73
76
  const script = `
74
77
  set savedClipboard to the clipboard
75
78
  tell application "Conductor" to activate
76
79
  delay 0.4
77
80
  tell application "System Events"${navigate}
78
81
  set the clipboard to (do shell script "cat" & " " & quoted form of (system attribute "RELAY_PROMPT_FILE"))
82
+ keystroke "l" using {command down}
83
+ delay 0.3
79
84
  keystroke "v" using {command down}
80
85
  delay 0.15
81
86
  key code 36
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-remote",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "type": "module",
5
5
  "packageManager": "yarn@4.15.0",
6
6
  "description": "Phone control panel for local Conductor agents. Reads ride SQLite + git; prompts ride Conductor's own dispatch path.",