App core: agents, drive, notifications
The Agents page (persistent agents, memory, routines, computer access), the Drive page and the notifications the apps post.
The Agents page (persistent agents, memory, routines, computer access), the Drive page and the notifications the apps post.
These APIs are part of the Cua Spaces app export for building Spaces UIs. They are source-available under FSL-1.1-MIT and ship for Swift only (import CuaSpacesFFI); the Rust tab shows the cua-spaces-ffi crate they come from. The open source SDK packages for Python, TypeScript and Kotlin do not include them.
app_agents_reduce and app_agents_view drive the Agents page from the daemon's persistent-agent, drive and routine tools; app_drive_* the Drive page; app_notifications_plan says which feed entries to post as system notifications (each once, none of the backlog on first run) and app_notifications_view draws the list.
AppLineView record#| Field | Type | Default | Description |
|---|---|---|---|
id | String | ||
text | String | ||
trailing | String | Right-aligned secondary text. | |
action_label / actionLabel | Option<String> | ||
secondary_label / secondaryLabel | Option<String> | A second action (Deny next to Approve). | |
on | Option<bool> |
AppDriveEntryInput record#| Field | Type | Default | Description |
|---|---|---|---|
path | String | ||
name | String | ||
folder | bool | ||
size | u64 |
AppSystemNote record#| Field | Type | Default | Description |
|---|---|---|---|
id | String | ||
title | String | ||
body | String |
app_agent_rows#A Space's agent rows from its run records (Space.agent_list()'s
json, one record each): attention first, then newest. The same mapping
the Tauri app uses.
func appAgentRows(runsJson: [String]) -> [AppSpaceAgentRun]| Parameter | Type | Default |
|---|---|---|
runs_json | Vec<String> | required |
Returns Vec<AppSpaceAgentRun>
app_agent_status_label#A run's status word ("Running", "Idle", ...).
func appAgentStatusLabel(status: AppAgentStatus) -> String| Parameter | Type | Default |
|---|---|---|
status | AppAgentStatus | required |
Returns String
app_agent_subtitle#The line under an agent's name.
func appAgentSubtitle(run: AppSpaceAgentRun) -> String| Parameter | Type | Default |
|---|---|---|
run | AppSpaceAgentRun | required |
Returns String
AppAccessAuditInput record#| Field | Type | Default | Description |
|---|---|---|---|
ts_ms / tsMs | u64 | ||
action | String | grant, revoke, use, denied. | |
principal | String | agent:ada or user. | |
path | String | The machine. | |
detail | String |
AppAgentDetailView record#| Field | Type | Default | Description |
|---|---|---|---|
name | String | ||
subtitle | String | Home: agents/ada/ · saved 5m ago (one line). | |
tabs | Vec<AppTabView> | ||
memory | Vec<AppLineView> | ||
memory_empty / memoryEmpty | String | ||
file | Option<AppFileView> | ||
routines | Vec<AppLineView> | ||
routines_empty / routinesEmpty | String | ||
form | AppRoutineForm | ||
schedules | Vec<AppLineView> | ||
can_add_routine / canAddRoutine | bool | ||
add_routine_label / addRoutineLabel | String | ||
access | Vec<AppLineView> | ||
access_empty / accessEmpty | String | ||
allow_this_machine_label / allowThisMachineLabel | Option<String> | Allow on this Mac when this machine is set up and not granted. | |
audit | Vec<AppLineView> | ||
error | Option<String> |
AppAgentRowView record#| Field | Type | Default | Description |
|---|---|---|---|
name | String | ||
detail | String | Hermes in local:dev. | |
state | String | Running, Idle, Paused. | |
action_label / actionLabel | String | Pause or Resume. | |
selected | bool |
AppAgentsInput record#Returned by app_agents_input_from_json.
| Field | Type | Default | Description |
|---|---|---|---|
agents | Vec<AppPersistentAgentInput> | ||
home | Vec<AppDriveEntryInput> | The selected agent's home, agents/<name>/, recursively (files only). | |
file | Option<AppOpenFileInput> | The file the shell loaded for the open path. | |
routines | Vec<AppRoutineInput> | The selected agent's routines. | |
grants | Vec<AppComputerGrantInput> | Every computer grant. | |
audit | Vec<AppAccessAuditInput> | Recent computer-access audit lines, newest first. | |
this_machine / thisMachine | Option<String> | This machine's Space id when it is set up for access (relay:<id>). |
AppAgentsState record#Returned by app_agents_initial, app_agents_reduce.
| Field | Type | Default | Description |
|---|---|---|---|
selected | Option<String> | ||
tab | AppAgentTab | ||
open_path / openPath | Option<String> | The memory file open in the detail. | |
form | AppRoutineForm | ||
busy | bool | ||
error | Option<String> | ||
request | Option<AppAgentsRequest> |
AppAgentsView record#Returned by app_agents_view.
| Field | Type | Default | Description |
|---|---|---|---|
title | String | ||
rows | Vec<AppAgentRowView> | ||
empty_text / emptyText | String | ||
detail | Option<AppAgentDetailView> | ||
busy | bool | ||
error | Option<String> | ||
request | Option<AppAgentsRequest> | ||
request_text / requestText | Option<String> | AgentsRequest.text of request. |
AppComputerGrantInput record#| Field | Type | Default | Description |
|---|---|---|---|
agent | String | ||
machine | String | ||
revoked | bool |
AppDriveGrantInput record#| Field | Type | Default | Description |
|---|---|---|---|
id | String | ||
principal | String | ||
prefix | String | ||
mode | String | ||
revoked | bool |
AppDriveInput record#Returned by app_drive_input_from_json.
| Field | Type | Default | Description |
|---|---|---|---|
requests | Vec<AppDriveRequestInput> | ||
grants | Vec<AppDriveGrantInput> | ||
now_ms / nowMs | u64 | Now (Unix ms), for "synced 5m ago". | |
mount | Option<AppDriveMountInput> | volume_mount_status, once read. | |
sync | Option<AppDriveSyncInput> | volume_sync_status, once read. | |
home | Option<String> | The home folder, to show the mount point as ~/.... |
AppDriveRequestInput record#| Field | Type | Default | Description |
|---|---|---|---|
id | String | ||
principal | String | agent:ada. | |
prefix | String | ||
mode | String | r or rw. | |
reason | String |
AppDriveState record#Returned by app_drive_initial, app_drive_reduce.
| Field | Type | Default | Description |
|---|---|---|---|
busy | bool | ||
error | Option<String> | ||
request | Option<AppDriveRequest> |
AppDriveView record#Returned by app_drive_view.
| Field | Type | Default | Description |
|---|---|---|---|
title | String | ||
requests_title / requestsTitle | String | ||
requests | Vec<AppLineView> | ||
grants_title / grantsTitle | String | ||
grants | Vec<AppLineView> | ||
grants_empty / grantsEmpty | String | ||
busy | bool | ||
error | Option<String> | ||
request | Option<AppDriveRequest> | ||
request_text / requestText | Option<String> | DriveRequest.text of request. | |
open_label / openLabel | Option<String> | "Open in Finder" (Linux: "Open folder"): mounts first when the volume is not mounted. None where it cannot mount. | |
mount_path / mountPath | Option<String> | The mount point, when mounted. | |
mount_line / mountLine | Option<String> | One quiet line: where it is mounted ("In Finder at ~/Cua Volume"), or that it is not. | |
devices_title / devicesTitle | String | "Devices". | |
devices | Vec<AppLineView> | One line per device, this one first: when it last synced, what is pending. | |
sync_note / syncNote | Option<String> | Why nothing syncs, or the feed's error. | |
sync_error / syncError | bool | The note is an error. | |
conflicts_title / conflictsTitle | String | "Conflicts". | |
conflicts | Vec<AppConflictView> |
AppFileVersionInput record#| Field | Type | Default | Description |
|---|---|---|---|
version | String | ||
modified_ms / modifiedMs | u64 | ||
deleted | bool | ||
latest | bool |
AppFileView record#| Field | Type | Default | Description |
|---|---|---|---|
path | String | ||
text | String | ||
versions | Vec<AppLineView> | ||
close_label / closeLabel | String |
AppNotificationInput record#Returned by app_notifications_from_json.
| Field | Type | Default | Description |
|---|---|---|---|
id | String | ||
at_ms / atMs | u64 | ||
agent | Option<String> | ||
kind | String | turn_ended, message, approval, error. | |
title | String | ||
body | String | ||
read | bool |
AppNotificationsPlan record#Returned by app_notifications_plan.
| Field | Type | Default | Description |
|---|---|---|---|
post | Vec<AppSystemNote> | ||
seen_ms / seenMs | u64 | The new notifications_seen_ms (unchanged when nothing is newer). |
AppNotificationsView record#Returned by app_notifications_view.
| Field | Type | Default | Description |
|---|---|---|---|
title | String | ||
rows | Vec<AppLineView> | One line each: title: body, the time on the right; on is unread. | |
empty_text / emptyText | String | ||
unread | u32 | ||
mark_all_label / markAllLabel | Option<String> |
AppOpenFileInput record#| Field | Type | Default | Description |
|---|---|---|---|
path | String | ||
text | String | The text (empty for a binary file). | |
binary | bool | ||
versions | Vec<AppFileVersionInput> |
AppPersistentAgentInput record#| Field | Type | Default | Description |
|---|---|---|---|
name | String | ||
harness | String | Harness id (claude-code, hermes, ...). | |
space | String | The Space it works in. | |
paused | bool | ||
space_state / spaceState | String | running, suspended or released. | |
run_id / runId | Option<String> | Its current run, if any. | |
saved_ms / savedMs | u64 | Unix ms of the last home save (0: never). | |
last_error / lastError | Option<String> |
AppRoutineForm record#| Field | Type | Default | Description |
|---|---|---|---|
title | String | ||
prompt | String | ||
schedule | AppRoutineScheduleKind | ||
minutes | u32 | Minutes for every. | |
time | String | HH:MM for daily and weekly. | |
weekday | String | mon ... sun for weekly. |
AppRoutineInput record#| Field | Type | Default | Description |
|---|---|---|---|
id | String | ||
title | String | ||
label | String | Every day at 8:00 AM. | |
enabled | bool |
AppTabView record#| Field | Type | Default | Description |
|---|---|---|---|
tab | AppAgentTab | ||
label | String | ||
selected | bool |
AppAgentTab enum#.memory
.routines
.access| Variant | Description |
|---|---|
Memory | |
Routines | |
Access |
AppAgentsAction enum#.select(name: String)
.setTab(tab: AppAgentTab)
.openFile(path: String)
.closeFile
.pause(name: String)
.resume(name: String)
.restore(version: String)
.setTitle(title: String)
.setPrompt(prompt: String)
.setSchedule(schedule: AppRoutineScheduleKind)
.setMinutes(minutes: UInt32)
.setTime(time: String)
.setWeekday(weekday: String)
.addRoutine
.toggleRoutine(id: String)
.removeRoutine(id: String)
.allowComputer(machine: String)
.revokeComputer(machine: String)
.done
.failed(error: String)| Variant | Description |
|---|---|
Select | Fields: name: String |
SetTab | Fields: tab: AppAgentTab |
OpenFile | Fields: path: String |
CloseFile | |
Pause | Fields: name: String |
Resume | Fields: name: String |
Restore | Fields: version: String |
SetTitle | Fields: title: String |
SetPrompt | Fields: prompt: String |
SetSchedule | Fields: schedule: AppRoutineScheduleKind |
SetMinutes | Fields: minutes: u32 |
SetTime | Fields: time: String |
SetWeekday | Fields: weekday: String |
AddRoutine | |
ToggleRoutine | Fields: id: String |
RemoveRoutine | Fields: id: String |
AllowComputer | Fields: machine: String |
RevokeComputer | Fields: machine: String |
Done | |
Failed | Fields: error: String |
AppAgentsRequest enum#.pause(name: String)
.resume(name: String)
.load(name: String)
.readFile(path: String)
.restore(path: String, version: String)
.addRoutine(agent: String, title: String, prompt: String, everyMinutes: UInt32?, dailyAt: String?, weeklyOn: String?)
.setRoutine(id: String, enabled: Bool)
.removeRoutine(id: String)
.allow(agent: String, machine: String)
.revoke(agent: String, machine: String)| Variant | Description |
|---|---|
Pause | agent_pause. Fields: name: String |
Resume | agent_resume. Fields: name: String |
Load | Load the selected agent's home, routines and grants. Fields: name: String |
ReadFile | volume_read + volume_history of a home file. Fields: path: String |
Restore | volume_restore. Fields: path: String, version: String |
AddRoutine | routine_add (one of the schedule fields is set). Fields: agent: String, title: String, prompt: String, every_minutes: Option<u32>, daily_at: Option<String>, weekly_on: Option<String> |
SetRoutine | routine_set_enabled. Fields: id: String, enabled: bool |
RemoveRoutine | routine_remove. Fields: id: String |
Allow | computer_access_grant (the daemon asks for presence). Fields: agent: String, machine: String |
Revoke | computer_access_revoke. Fields: agent: String, machine: String |
AppDriveAction enum#.openVolume(mounted: String?)
.approve(id: String)
.deny(id: String)
.revoke(id: String)
.reveal(path: String)
.resolve(path: String)
.done
.failed(error: String)| Variant | Description |
|---|---|
OpenVolume | The page's main button: show the mount point in the file manager, mounting first when the volume is not mounted (mounted: the mount point, when mounted). Fields: mounted: Option<String> |
Approve | Fields: id: String |
Deny | Fields: id: String |
Revoke | Fields: id: String |
Reveal | "Open in Finder" (the mount), or a conflict's Open. Fields: path: String |
Resolve | A conflict's Resolve (the files stay). Fields: path: String |
Done | |
Failed | Fields: error: String |
AppDriveRequest enum#.load
.mountAndReveal
.approve(id: String)
.deny(id: String)
.revoke(id: String)
.reveal(path: String)
.resolve(path: String)| Variant | Description |
|---|---|
Load | Read the page: volume_requests, volume_grants, volume_mount_status, volume_sync_status. |
MountAndReveal | volume_mount, then show the mount point in the file manager. |
Approve | volume_approve (the daemon asks for presence). Fields: id: String |
Deny | volume_deny. Fields: id: String |
Revoke | volume_revoke. Fields: id: String |
Reveal | Show a path in the file manager (the shell's own call). Fields: path: String |
Resolve | volume_sync_resolve. Fields: path: String |
AppRoutineScheduleKind enum#.every
.daily
.weekly| Variant | Description |
|---|---|
Every | |
Daily | |
Weekly |
app_agents_action_from_json#An Agents page action from JSON (parity flows).
func appAgentsActionFromJson(json: String) throws -> AppAgentsAction| Parameter | Type | Default |
|---|---|---|
json | String | required |
Returns AppAgentsAction · Raises CuaError
app_agents_initial#A new Agents page.
func appAgentsInitial() -> AppAgentsStateReturns AppAgentsState
app_agents_input_from_json#Agents page input from JSON (tool results, fixtures, parity flows).
func appAgentsInputFromJson(json: String) throws -> AppAgentsInput| Parameter | Type | Default |
|---|---|---|
json | String | required |
Returns AppAgentsInput · Raises CuaError
app_agents_reduce#Advances the Agents page.
func appAgentsReduce(input: AppAgentsInput, state: AppAgentsState, action: AppAgentsAction) -> AppAgentsState| Parameter | Type | Default |
|---|---|---|
input | AppAgentsInput | required |
state | AppAgentsState | required |
action | AppAgentsAction | required |
Returns AppAgentsState
app_agents_view#The Agents page as drawn at now_ms.
func appAgentsView(input: AppAgentsInput, state: AppAgentsState, nowMs: UInt64) -> AppAgentsView| Parameter | Type | Default |
|---|---|---|
input | AppAgentsInput | required |
state | AppAgentsState | required |
now_ms | u64 | required |
Returns AppAgentsView
app_drive_action_from_json#A Drive page action from JSON (parity flows).
func appDriveActionFromJson(json: String) throws -> AppDriveAction| Parameter | Type | Default |
|---|---|---|
json | String | required |
Returns AppDriveAction · Raises CuaError
app_drive_initial#A new Drive page (at the root, listing it).
func appDriveInitial() -> AppDriveStateReturns AppDriveState
app_drive_input_from_json#Drive page input from JSON.
func appDriveInputFromJson(json: String) throws -> AppDriveInput| Parameter | Type | Default |
|---|---|---|
json | String | required |
Returns AppDriveInput · Raises CuaError
app_drive_reduce#Advances the Drive page.
func appDriveReduce(state: AppDriveState, action: AppDriveAction) -> AppDriveState| Parameter | Type | Default |
|---|---|---|
state | AppDriveState | required |
action | AppDriveAction | required |
Returns AppDriveState
app_drive_view#The Drive page as drawn.
func appDriveView(input: AppDriveInput, state: AppDriveState) -> AppDriveView| Parameter | Type | Default |
|---|---|---|
input | AppDriveInput | required |
state | AppDriveState | required |
Returns AppDriveView
app_notifications_from_json#Feed entries from JSON (the notifications_list result's array).
func appNotificationsFromJson(json: String) throws -> [AppNotificationInput]| Parameter | Type | Default |
|---|---|---|
json | String | required |
Returns Vec<AppNotificationInput> · Raises CuaError
app_notifications_plan#Which feed entries to post now, and the marker to save
(AppSettings.notifications_seen_ms; 0 on the first run).
func appNotificationsPlan(feed: [AppNotificationInput], seenMs: UInt64) -> AppNotificationsPlan| Parameter | Type | Default |
|---|---|---|
feed | Vec<AppNotificationInput> | required |
seen_ms | u64 | required |
Returns AppNotificationsPlan
app_notifications_view#The notifications list at now_ms.
func appNotificationsView(feed: [AppNotificationInput], nowMs: UInt64) -> AppNotificationsView| Parameter | Type | Default |
|---|---|---|
feed | Vec<AppNotificationInput> | required |
now_ms | u64 | required |
Returns AppNotificationsView
47 items, across this page and its subpages, grouped by page. Methods are listed on their object.
App core: agents, drive, notifications: app_agent_rows, app_agent_status_label, app_agent_subtitle, app_agents_action_from_json, app_agents_initial, app_agents_input_from_json, app_agents_reduce, app_agents_view, app_drive_action_from_json, app_drive_initial, app_drive_input_from_json, app_drive_reduce, app_drive_view, app_notifications_from_json, app_notifications_plan, app_notifications_view, AppAccessAuditInput, AppAgentDetailView, AppAgentRowView, AppAgentsAction, AppAgentsInput, AppAgentsRequest, AppAgentsState, AppAgentsView, AppAgentTab, AppComputerGrantInput, AppDriveAction, AppDriveEntryInput, AppDriveGrantInput, AppDriveInput, AppDriveRequest, AppDriveRequestInput, AppDriveState, AppDriveView, AppFileVersionInput, AppFileView, AppLineView, AppNotificationInput, AppNotificationsPlan, AppNotificationsView, AppOpenFileInput, AppPersistentAgentInput, AppRoutineForm, AppRoutineInput, AppRoutineScheduleKind, AppSystemNote, AppTabView