Shares

Links to a port, a file or a folder that open on your other signed-in devices.

Cua.share(target, access, ttl_seconds, name) makes a link the cua daemon owns and serves, shares lists them, stop_share and stop_all_shares end them and check_share opens a link once as its owner. See Share a link to anything you run.

Share record#

One share.

Returned by Cua.share, Cua.shares.

FieldTypeDefaultDescription
idStringHandle for Shares.stop (share-...).
urlStringThe link.
nameOption<String>Name for lists.
accessShareAccessWho may open it.
kindStringport, space_port, file or dir.
targetStringWhat it serves (port 3000, space:dev:3000, a path).
ownerStringThe account that made it.
created_at_unix / createdAtUnixOption<i64>When it was made (unix seconds).
expires_at_unix / expiresAtUnixOption<i64>When it ends (unix seconds); none: until stopped.
noticesVec<String>Limits of this link worth showing next to it (for example that browsers cannot open it yet).

ShareAccess enum#

Who may open a share.

ShareAccess.PRIVATE
ShareAccess.TEAM
ShareAccess.PUBLIC
VariantDescription
PrivateOnly the owner's cua.ai account, on any of the owner's devices.
TeamMembers of the owner's team.
PublicAnyone with the link, until it expires or is stopped.

ShareCheck record#

What opening a link once returned.

Returned by Cua.check_share.

FieldTypeDefaultDescription
okbool2xx.
statusu32HTTP status (0: the link could not be opened).
viaStringlink (the real link, through the relay, as the owner) or local.
detailStringA short human line.