Skip to main content

Module secret_shape

Module secret_shape 

Source
Expand description

The shape of a secret in text a page held, for the places that hand page text to an agent (#47628, #47656).

The Browser reads (agentmux-cef’s hidden_secrets) withhold hidden text that has this shape, and so does every string that comes back with an answer: a click’s name in the waiting notice, a line of the pane’s Log, the state an action reports. One rule, here, so they agree.

Constants§

UNREAD
What an agent reads in place of a secret the page shows in plain sight, in a row named like one: it is there, and Browser capture saves it, but its text stays out of the agent’s context.
WITHHELD
What an agent reads in place of withheld text.

Functions§

has_key_shape
Whether text holds something shaped like a secret: what a page shows once, a key with a known prefix, an access key id or a PEM header.
scrub
text with every word that has a secret’s shape replaced by WITHHELD, and the rest as it was (line breaks and spacing too); the text itself when no word has one.
token_like
One long word with a digit and a letter in it, which words are not: an odd-shaped value (an id, a key a page makes up).