Expand description
A host agent whose folder a container agent can write.
A container agent changes the files of its workspace and of every writable volume. A host agent that works in
one of those folders, or in a folder that holds one, runs what the container agent left there, as the person.
Where a host agent is opened or created, or a container agent’s workspace or volumes are saved, so that the two
share a folder, the person is asked and the choice is kept for that pair of agents. Nothing but the person’s
window records the choice (accept); a caller that is not the person is refused with refusal.
A choice is a file, and a file is not proof that the person made it: each go-ahead is also recorded as a row of
the audit log made by the window, written before the file, and a choice file with no such row does not count
(accepted): the pair asks again and says why (Overlap::untrusted).
The folders are those of the two agents’ definitions: a container agent’s workspace and its writable host
volumes (container::mounts::writable), a host agent’s working folder.
Structs§
- Overlap
- A host agent and a container agent whose folders overlap.
Constants§
- GO_
AHEAD_ ACTION - The audit action that records the person’s go-ahead for a pair.
- OPEN_
REFUSAL_ CODE - What an
agent.openrefusal for a shared folder starts with, so the window knows to ask the person and try again.
Functions§
- accept
- Keeps the person’s choice for the pair, naming both agents by their ids. Only the person’s window calls this
(
app_api::folder_overlap). - accept_
as accept, with the agents’ names (id, name) for the record. The audit row is written first and the file after, so a file is never kept without the record of who made it.- accepted
- Whether the person has gone ahead with this host agent and this container agent sharing a folder: a choice is kept and the audit log records that the person made it.
- check
Errwithrefusalwhendef, as saved or opened, shares a folder with an agent of the other kind that the person has not gone ahead with.- check_
open checkfor an agent being opened, inopen_folder, with the refusal markedOPEN_REFUSAL_CODE. A container agent is not refused here: it is asked when its own folders are saved.- folders_
changed - Whether a save of
newoveroldchanges a folder an agent works in or can write. - for_
host_ in - The container agents whose writable folders overlap
folder, the folder the host agenthostworks in. - forget_
agent - Forgets every choice the person made for a pair that includes agent
id: the agent is deleted. - is_
a_ pair - Whether
host_idnames a host agent andcontainer_ida container agent. - of
- The overlaps of
defas it is saved or opened: for a host agent, with the container agents; for a container agent, with the host agents.host_folderis the folder a host agent opens in when it is not the one its definition names (a blank one opens in the agent’s own folder). - open_
folder - The folder
agent.openruns a host agent in, expanded: the one it names, else its own folder. - refusal
- What the person is told, and what a caller that is not the person is refused with: both agents, what the shared folder means, and what to do instead.
- row_
note - The note of an audit row about a pair: the action and the two agents’ ids, which find the row (a name changes), then the names, for whoever reads the Audit view.
- unchosen
- The overlaps the person has not gone ahead with.
- untrusted
- Whether a choice is kept for the pair that the audit log has no record of: it does not count.
- waiting_
reason - Why the start of host agent
defwaits, for an agent that asks what its state is: the pairs it shares a folder with that the person has not gone ahead with.Nonewhen nothing waits.