@agentconnect.md/computer 2.8.0-rc.4 → 2.8.0-rc.6

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.
@@ -65844,12 +65844,12 @@ var ComputerRelayEntry = external_exports.object({
65844
65844
  });
65845
65845
  var COMPUTER_RELAYS_MAX = 64;
65846
65846
  var ComputerApprovalsSchema = external_exports.object({
65847
- // Ask before a session's first click, drag, type, key or launch; any allow covers the rest of the session.
65848
- firstInputPerSession: external_exports.boolean().default(true),
65849
- // `always` asks per launch until an approver answers "Allow for this session"; `session` asks once.
65850
- launchApp: external_exports.enum(["always", "session", "never-ask"]).default("always"),
65851
- // Ask before each Enter until an approver answers "Allow for this session".
65852
- submitLikeKeys: external_exports.boolean().default(true)
65847
+ // Ask before a session's first click, drag, type, key or launch; an allow covers the rest of the session.
65848
+ firstInputPerSession: external_exports.boolean().default(true)
65849
+ });
65850
+ var ComputerGrantApprovalsSchema = ComputerApprovalsSchema.extend({
65851
+ launchApp: external_exports.enum(["always", "session", "never-ask"]).optional(),
65852
+ submitLikeKeys: external_exports.boolean().optional()
65853
65853
  });
65854
65854
  var COMPUTER_CHANNEL_REFUSALS = ["denied", "unavailable"];
65855
65855
  var ComputerChannelGrantRequest = external_exports.object({
@@ -65867,7 +65867,9 @@ var ComputerChannelGrantResult = external_exports.discriminatedUnion("granted",
65867
65867
  // What the approval cards name and whom they also reach (§4.2); an older CP sends none, and every approval is asked.
65868
65868
  name: external_exports.string().min(1).max(200).optional(),
65869
65869
  ownerUserId: external_exports.string().min(1).max(128).optional(),
65870
- approvals: ComputerApprovalsSchema.optional()
65870
+ approvals: ComputerGrantApprovalsSchema.optional(),
65871
+ // The console users who may answer its approvals: the Computer's allowed members; an older CP sends none.
65872
+ approvers: external_exports.array(external_exports.string().min(1).max(128)).max(500).optional()
65871
65873
  }),
65872
65874
  external_exports.object({
65873
65875
  granted: external_exports.literal(false),
@@ -66067,11 +66069,7 @@ var ComputerAgentAccess = external_exports.object({
66067
66069
  var ComputerPolicySchema = external_exports.object({
66068
66070
  allowedMembers: external_exports.array(external_exports.string().min(1).max(128)).max(500).default([]),
66069
66071
  agentMode: external_exports.enum(["view", "control"]).default("control"),
66070
- approvals: ComputerApprovalsSchema.default({
66071
- firstInputPerSession: true,
66072
- launchApp: "always",
66073
- submitLikeKeys: true
66074
- }),
66072
+ approvals: ComputerApprovalsSchema.default({ firstInputPerSession: true }),
66075
66073
  appAllowlist: external_exports.array(AppId).max(200).optional(),
66076
66074
  redactApps: external_exports.array(AppId).max(200).default([]),
66077
66075
  exposeDriverTools: external_exports.boolean().default(false),
@@ -84715,6 +84713,7 @@ var HelperTray = class _HelperTray {
84715
84713
  };
84716
84714
 
84717
84715
  // src/menu-bar.ts
84716
+ var FACTS_REFRESH_MS = 3e4;
84718
84717
  var CONTROL_PLANE = {
84719
84718
  connected: ["ok", "connected"],
84720
84719
  connecting: ["progress", "connecting\u2026"],
@@ -84728,48 +84727,52 @@ function menuBarMenu(tray, facts, busy = /* @__PURE__ */ new Set()) {
84728
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" };
84729
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 };
84730
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;
84731
84771
  return {
84732
84772
  tone: tray.tone,
84733
- tooltip: `AgentConnect Computer: ${tray.status}`,
84734
- items: [
84735
- { title: facts.name ? `AgentConnect Computer \xB7 ${facts.name}` : "AgentConnect Computer", enabled: false },
84736
- { title: `Agents: ${tray.status}`, enabled: false },
84737
- tray.canResume ? { id: "resume", title: "Resume Agent Input" } : { id: "stop", title: "Stop All Agent Input", enabled: tray.canStop },
84738
- { title: "", separator: true },
84739
- {
84740
- id: "control-plane",
84741
- title: `Control Plane${facts.controlPlane.host ? ` (${facts.controlPlane.host})` : ""}: ${cpText}`,
84742
- mark: cpMark,
84743
- enabled: cpMark === "fail" && facts.controlPlane.state !== "revoked"
84744
- },
84745
- grant("Screen Recording", facts.screenRecording, "screen-recording"),
84746
- grant("Device Control (Accessibility)", facts.accessibility, "accessibility"),
84747
- driver,
84748
- ffmpeg,
84749
- { title: "", separator: true },
84750
- { id: "start-at-login", title: "Start at Login", checked: facts.startAtLogin },
84751
- { id: "logs", title: "Open Logs" },
84752
- { title: version2, enabled: false },
84753
- { title: "", separator: true },
84754
- {
84755
- id: "uninstall",
84756
- title: "Uninstall\u2026",
84757
- confirm: {
84758
- title: "Uninstall AgentConnect Computer?",
84759
- 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.",
84760
- button: "Uninstall"
84761
- }
84762
- },
84763
- {
84764
- id: "quit",
84765
- title: "Quit AgentConnect Computer",
84766
- confirm: {
84767
- title: "Quit AgentConnect Computer?",
84768
- message: "Agents cannot use this Mac until it starts again at your next login.",
84769
- button: "Quit"
84770
- }
84771
- }
84772
- ]
84773
+ ...badge ? { badge } : {},
84774
+ tooltip: `AgentConnect Computer: ${tray.status}${failing ? "; something needs attention, open the menu" : ""}`,
84775
+ items
84773
84776
  };
84774
84777
  }
84775
84778
  function startMenuBar(helper, host, initial, start = HelperTray.start) {
@@ -84779,13 +84782,18 @@ function startMenuBar(helper, host, initial, start = HelperTray.start) {
84779
84782
  const render = () => {
84780
84783
  if (facts) helperTray.update(menuBarMenu(tray, facts, busy));
84781
84784
  };
84782
- const refresh = () => host.facts().then(
84785
+ let reading;
84786
+ const refresh = () => reading ??= host.facts().then(
84783
84787
  (fresh) => {
84784
84788
  facts = fresh;
84785
84789
  render();
84786
84790
  },
84787
84791
  (error62) => host.log(`menu bar: cannot read the status: ${error62.message}`)
84788
- );
84792
+ ).finally(() => {
84793
+ reading = void 0;
84794
+ });
84795
+ const recheck = setInterval(() => void refresh(), FACTS_REFRESH_MS);
84796
+ recheck.unref();
84789
84797
  const task = (kind, run3) => {
84790
84798
  if (busy.has(kind)) return;
84791
84799
  busy.add(kind);
@@ -84854,7 +84862,10 @@ function startMenuBar(helper, host, initial, start = HelperTray.start) {
84854
84862
  } : { name: "tray", status: "ok", detail: "the menu bar icon shows agent control and can stop it" }
84855
84863
  ];
84856
84864
  },
84857
- close: () => helperTray.close()
84865
+ close() {
84866
+ clearInterval(recheck);
84867
+ helperTray.close();
84868
+ }
84858
84869
  };
84859
84870
  }
84860
84871
 
@@ -85044,7 +85055,7 @@ var managedEntry = () => process.env[SERVICE_ENTRY_ENV]?.trim() || void 0;
85044
85055
  var serviceEntry = () => managedEntry() ?? resolve(process.argv[1]);
85045
85056
 
85046
85057
  // src/version.ts
85047
- var COMPUTER_DAEMON_VERSION = true ? "2.8.0-rc.4" : JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
85058
+ var COMPUTER_DAEMON_VERSION = true ? "2.8.0-rc.6" : JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
85048
85059
 
85049
85060
  // src/http-server.ts
85050
85061
  var CONTROL_HEADER = "x-agentconnect-computer";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentconnect.md/computer",
3
- "version": "2.8.0-rc.4",
3
+ "version": "2.8.0-rc.6",
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",