@agentconnect.md/computer 2.8.0-rc.5 → 2.8.0-rc.8

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.
@@ -84713,6 +84713,7 @@ var HelperTray = class _HelperTray {
84713
84713
  };
84714
84714
 
84715
84715
  // src/menu-bar.ts
84716
+ var FACTS_REFRESH_MS = 3e4;
84716
84717
  var CONTROL_PLANE = {
84717
84718
  connected: ["ok", "connected"],
84718
84719
  connecting: ["progress", "connecting\u2026"],
@@ -84726,48 +84727,52 @@ function menuBarMenu(tray, facts, busy = /* @__PURE__ */ new Set()) {
84726
84727
  const driver = busy.has("driver") ? { title: `Cua Driver ${facts.driver.version}: installing\u2026`, mark: "progress", enabled: false } : facts.driver.running ? { id: "cua-driver", title: `Cua Driver ${facts.driver.version}: running`, mark: "ok", enabled: false } : { id: "cua-driver", title: `Cua Driver ${facts.driver.version}: not running, click to reinstall`, mark: "fail" };
84727
84728
  const ffmpeg = busy.has("ffmpeg") || facts.ffmpeg.installing ? { title: `ffmpeg ${facts.ffmpeg.version}: downloading\u2026`, mark: "progress", enabled: false } : facts.ffmpeg.installed ? { id: "ffmpeg", title: `ffmpeg ${facts.ffmpeg.version}: installed`, mark: "ok", enabled: false } : facts.ffmpeg.installable ? { id: "ffmpeg", title: `ffmpeg ${facts.ffmpeg.version}: not installed, click to install`, mark: "fail" } : { title: "ffmpeg: not found, the viewer falls back to screenshots", mark: "warn", enabled: false };
84728
84729
  const version2 = facts.appVersion ? `Version ${facts.version} (app ${facts.appVersion})` : `Version ${facts.version}`;
84730
+ const items = [
84731
+ { title: facts.name ? `AgentConnect Computer \xB7 ${facts.name}` : "AgentConnect Computer", enabled: false },
84732
+ { title: `Agents: ${tray.status}`, enabled: false },
84733
+ tray.canResume ? { id: "resume", title: "Resume Agent Input" } : { id: "stop", title: "Stop All Agent Input", enabled: tray.canStop },
84734
+ { title: "", separator: true },
84735
+ {
84736
+ id: "control-plane",
84737
+ title: `Control Plane${facts.controlPlane.host ? ` (${facts.controlPlane.host})` : ""}: ${cpText}`,
84738
+ mark: cpMark,
84739
+ enabled: cpMark === "fail" && facts.controlPlane.state !== "revoked"
84740
+ },
84741
+ grant("Screen Recording", facts.screenRecording, "screen-recording"),
84742
+ grant("Device Control (Accessibility)", facts.accessibility, "accessibility"),
84743
+ driver,
84744
+ ffmpeg,
84745
+ { title: "", separator: true },
84746
+ { id: "start-at-login", title: "Start at Login", checked: facts.startAtLogin },
84747
+ { id: "logs", title: "Open Logs" },
84748
+ { title: version2, enabled: false },
84749
+ { title: "", separator: true },
84750
+ {
84751
+ id: "uninstall",
84752
+ title: "Uninstall\u2026",
84753
+ confirm: {
84754
+ title: "Uninstall AgentConnect Computer?",
84755
+ message: "Terminal opens and runs the uninstaller: it stops the service and removes the app. Your Computer key and settings stay unless you run it with --purge.",
84756
+ button: "Uninstall"
84757
+ }
84758
+ },
84759
+ {
84760
+ id: "quit",
84761
+ title: "Quit AgentConnect Computer",
84762
+ confirm: {
84763
+ title: "Quit AgentConnect Computer?",
84764
+ message: "Agents cannot use this Mac until it starts again at your next login.",
84765
+ button: "Quit"
84766
+ }
84767
+ }
84768
+ ];
84769
+ const failing = items.some((item) => item.mark === "fail");
84770
+ const badge = tray.tone === "paused" ? "paused" : tray.tone === "busy" ? "busy" : failing ? "error" : void 0;
84729
84771
  return {
84730
84772
  tone: tray.tone,
84731
- tooltip: `AgentConnect Computer: ${tray.status}`,
84732
- items: [
84733
- { title: facts.name ? `AgentConnect Computer \xB7 ${facts.name}` : "AgentConnect Computer", enabled: false },
84734
- { title: `Agents: ${tray.status}`, enabled: false },
84735
- tray.canResume ? { id: "resume", title: "Resume Agent Input" } : { id: "stop", title: "Stop All Agent Input", enabled: tray.canStop },
84736
- { title: "", separator: true },
84737
- {
84738
- id: "control-plane",
84739
- title: `Control Plane${facts.controlPlane.host ? ` (${facts.controlPlane.host})` : ""}: ${cpText}`,
84740
- mark: cpMark,
84741
- enabled: cpMark === "fail" && facts.controlPlane.state !== "revoked"
84742
- },
84743
- grant("Screen Recording", facts.screenRecording, "screen-recording"),
84744
- grant("Device Control (Accessibility)", facts.accessibility, "accessibility"),
84745
- driver,
84746
- ffmpeg,
84747
- { title: "", separator: true },
84748
- { id: "start-at-login", title: "Start at Login", checked: facts.startAtLogin },
84749
- { id: "logs", title: "Open Logs" },
84750
- { title: version2, enabled: false },
84751
- { title: "", separator: true },
84752
- {
84753
- id: "uninstall",
84754
- title: "Uninstall\u2026",
84755
- confirm: {
84756
- title: "Uninstall AgentConnect Computer?",
84757
- message: "Terminal opens and runs the uninstaller: it stops the service and removes the app. Your Computer key and settings stay unless you run it with --purge.",
84758
- button: "Uninstall"
84759
- }
84760
- },
84761
- {
84762
- id: "quit",
84763
- title: "Quit AgentConnect Computer",
84764
- confirm: {
84765
- title: "Quit AgentConnect Computer?",
84766
- message: "Agents cannot use this Mac until it starts again at your next login.",
84767
- button: "Quit"
84768
- }
84769
- }
84770
- ]
84773
+ ...badge ? { badge } : {},
84774
+ tooltip: `AgentConnect Computer: ${tray.status}${failing ? "; something needs attention, open the menu" : ""}`,
84775
+ items
84771
84776
  };
84772
84777
  }
84773
84778
  function startMenuBar(helper, host, initial, start = HelperTray.start) {
@@ -84777,13 +84782,18 @@ function startMenuBar(helper, host, initial, start = HelperTray.start) {
84777
84782
  const render = () => {
84778
84783
  if (facts) helperTray.update(menuBarMenu(tray, facts, busy));
84779
84784
  };
84780
- const refresh = () => host.facts().then(
84785
+ let reading;
84786
+ const refresh = () => reading ??= host.facts().then(
84781
84787
  (fresh) => {
84782
84788
  facts = fresh;
84783
84789
  render();
84784
84790
  },
84785
84791
  (error62) => host.log(`menu bar: cannot read the status: ${error62.message}`)
84786
- );
84792
+ ).finally(() => {
84793
+ reading = void 0;
84794
+ });
84795
+ const recheck = setInterval(() => void refresh(), FACTS_REFRESH_MS);
84796
+ recheck.unref();
84787
84797
  const task = (kind, run3) => {
84788
84798
  if (busy.has(kind)) return;
84789
84799
  busy.add(kind);
@@ -84852,7 +84862,10 @@ function startMenuBar(helper, host, initial, start = HelperTray.start) {
84852
84862
  } : { name: "tray", status: "ok", detail: "the menu bar icon shows agent control and can stop it" }
84853
84863
  ];
84854
84864
  },
84855
- close: () => helperTray.close()
84865
+ close() {
84866
+ clearInterval(recheck);
84867
+ helperTray.close();
84868
+ }
84856
84869
  };
84857
84870
  }
84858
84871
 
@@ -85042,7 +85055,7 @@ var managedEntry = () => process.env[SERVICE_ENTRY_ENV]?.trim() || void 0;
85042
85055
  var serviceEntry = () => managedEntry() ?? resolve(process.argv[1]);
85043
85056
 
85044
85057
  // src/version.ts
85045
- var COMPUTER_DAEMON_VERSION = true ? "2.8.0-rc.5" : JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
85058
+ var COMPUTER_DAEMON_VERSION = true ? "2.8.0-rc.8" : JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
85046
85059
 
85047
85060
  // src/http-server.ts
85048
85061
  var CONTROL_HEADER = "x-agentconnect-computer";
@@ -110395,6 +110408,7 @@ function macMenuBarHost(deps) {
110395
110408
  log40(`resetting the ${grant2} grant held for an earlier build of the app, from the menu bar`);
110396
110409
  const reset = spawnSync7("tccutil", ["reset", TCC_SERVICE[grant2], APP_ID], { encoding: "utf8" });
110397
110410
  if (reset.status !== 0) log40(`tccutil reset failed: ${`${reset.stdout}${reset.stderr}`.trim()}`);
110411
+ if (grant2 === "screenRecording") return deps.shutdown(1);
110398
110412
  void runSelf(["permissions", "--json", "--prompt"], 2e5).catch(() => void 0);
110399
110413
  },
110400
110414
  setStartAtLogin(on) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentconnect.md/computer",
3
- "version": "2.8.0-rc.5",
3
+ "version": "2.8.0-rc.8",
4
4
  "description": "AgentConnect computer daemon: drives a desktop through Cua Driver and serves the computer_* tools over MCP; installed and upgraded by agentconnect computer",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -39,8 +39,8 @@
39
39
  "access": "public"
40
40
  },
41
41
  "optionalDependencies": {
42
- "@agentconnect.md/computer-darwin-arm64": "2.8.0-rc.4",
43
- "@agentconnect.md/computer-darwin-x64": "2.8.0-rc.4"
42
+ "@agentconnect.md/computer-darwin-arm64": "2.8.0-rc.6",
43
+ "@agentconnect.md/computer-darwin-x64": "2.8.0-rc.6"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "pnpm --filter \"{.}...\" build:package",