You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a10bdfd
Browse filesBrowse the repository at this point in the historyBrowse files
throwComputerError("list_unavailable","No calendar has this id; call list_calendars.",dispatchState:"not_started")
196
+
}
197
+
calendar=found
198
+
}else{
199
+
guardletfallback=store.defaultCalendarForNewEventselse{throwComputerError("list_unavailable","Calendar has no default calendar; pass calendarId.",dispatchState:"not_started")}
200
+
calendar=fallback
201
+
}
202
+
guardcalendar.allowsContentModificationselse{throwComputerError("list_read_only","This calendar is read-only.",dispatchState:"not_started")}
<key>NSCalendarsFullAccessUsageDescription</key><string>Mothership adds calendar events you confirm and lists your calendars so it can file them correctly.</string>
15
+
<key>NSContactsUsageDescription</key><string>Mothership adds contacts and contact groups you confirm.</string>
14
16
<key>NSRemindersFullAccessUsageDescription</key><string>Mothership adds reminders you confirm and lists your reminder lists so it can file them correctly.</string>
15
17
<key>NSScreenCaptureUsageDescription</key><string>Mothership captures the app window you select to understand and verify computer-use actions.</string>
Copy file name to clipboardExpand all lines: apps/desktop/native/computer-use/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ Compile each architecture with `swiftc -parse-as-library -O -target arm64-apple-
6
6
7
7
## Protocol
8
8
9
-
Persistent newline-delimited JSON over stdin/stdout: `{id,method,params}` returns `{id,result}` or `{id,error:{code,message,dispatchState?}}`. The producer contract is `worker/packages/contracts/src/computer-use.ts` in mothership, copied into the desktop bridge by contract sync. `request_permission` is a local onboarding method, never a model tool; params are `{permission:"accessibility"|"screenCapture"|"reminders"}`. Status/preflight never triggers prompts; it reports `reminders` as `granted`, `denied` or `not_determined`.
9
+
Persistent newline-delimited JSON over stdin/stdout: `{id,method,params}` returns `{id,result}` or `{id,error:{code,message,dispatchState?}}`. The producer contract is `worker/packages/contracts/src/computer-use.ts` in mothership, copied into the desktop bridge by contract sync. `request_permission` is a local onboarding method, never a model tool; params are `{permission:"accessibility"|"screenCapture"|"reminders"|"calendars"|"contacts"}`. Status/preflight never triggers prompts; it reports `reminders`, `calendars` and `contacts` as `granted`, `denied` or `not_determined`.
10
10
11
-
`app_command` takes `{command:{name,...}}` and runs one allowlisted command through EventKit, never Apple Events or scripts: `list_reminder_lists` returns `{kind:"command",items:[{id,title,allowsModifications}]}`, and `create_reminder` (`title`, optional `notes`, `due` as `YYYY-MM-DD` or an ISO 8601 date-time with an offset, `listId`, `priority` 0/1/5/9) returns `{kind:"command",created:{id,title,list}}`. Without full Reminders access it fails with `reminders_permission_required` before touching anything. There is no update, delete or search. The desktop service confirms each create with the user before sending it. Errors go through the protocol, and stdout contains no logs.
11
+
`app_command` takes `{command:{name,...}}` and runs one allowlisted command through EventKit or Contacts, never Apple Events or scripts. Reads: `list_reminder_lists`, `list_calendars` and `list_contact_groups` return `{kind:"command",items:[{id,title,allowsModifications}]}`. Creates return `{kind:"command",created:{id,title,list}}`: `create_reminder` (`title`, `notes`, `due` as `YYYY-MM-DD` or ISO 8601 with an offset, `listId`, `priority` 0/1/5/9), `create_event` (`title`, `start`/`end` as ISO 8601 with offsets or `YYYY-MM-DD` with `allDay`, at most 31 days, `location`, `notes`, `calendarId`, `alertMinutesBefore`), `create_contact_group` (`title`; an existing group with that name is returned instead of a duplicate) and `create_contact` (`givenName`, `familyName`, `organization`, `jobTitle`, up to 5 `emails` and `phones`, `groupId`). Without the matching access a command fails with `reminders_permission_required`, `calendars_permission_required` or `contacts_permission_required` before touching anything. There is no update, delete or search. The desktop service confirms each create with the user before sending it.
12
12
13
13
The helper observes up to 2000 accessibility nodes (depth 64, queue 4000, traversal deadline 8 seconds, each AX call timeout 250ms). Selected-window and focused-element ancestry are prioritized. The menu bar and menus are read in place, so an open menu's items and their submenus come first; items of closed menus are read last, capped at 80 menu nodes. Electron accessibility is enabled using its documented `AXManualAccessibility` attribute. The helper observes 100 windows and 1000 apps. Requests are bounded to 128 KiB during ingestion. Text/value input is capped at 32000 UTF-16 units. State references are per-process, per-app, expire after 60 seconds, and are consumed by every action that reaches the app; a request that fails before sending anything reports `dispatchState: "not_started"` and keeps them valid. An Accessibility failure counts as sent unless Accessibility rejected the request before the app saw it (unsupported attribute or action, illegal argument). Restarts invalidate all references. Screen captures exclude window shadows, preserve the selected window’s coordinate geometry, and are capped to 1600 pixels on the longest side and 8 MiB encoded. Complete JSON replies are capped at 16 MiB: oversized observations omit screenshots first, then truncate accessibility nodes, while preserving action outcomes. Screenshots are optional and failure is reported in `screenshotError` without discarding accessibility state. macOS 26 uses the screenshot-specific capture API; the macOS 14/15 API path includes only the selected window in a display filter and crops its exact frame. That older path requires the window to fit within one display and reports `capture_geometry_unavailable` otherwise.
0 commit comments