pub(crate) const VAULT_TOOL: &str = r#"{
"name": "Vault",
"description": "The Vault: the person's secrets (SSN and other ID numbers, cards and bank accounts, API keys and tokens, logins, secret notes), kept in AgentMux's Vault (the Vault pane). You never see a value, and nothing you can call returns one. Every call takes an action. list: each entry's id, label, kind and section, its expiry date (expires) when it has one, and its machine copy (source: the kind of place, its location and key, and what the newest check of it found) when one is recorded; no values. A linked entry (source.link_only is true) holds no value: it records where a key lives that a service or a build reads (source), who reads it (source.readers), when it last changed (source.rotated) and where else it is kept (source.copies). A request, a fill or a command with a linked entry is refused with the place the key is kept at, and the person is not asked: use the access you already have there, or ask the person. A backed entry (source.backed is true) keeps no value in the Vault either, but unlike a linked one a fill or a command with it works: the Vault reads the key from AWS Secrets Manager at that use, and the person is asked as for any entry. request: ask the person to add an entry you need (kind, a label saying what it is, and why you need it); the Vault opens it for them to fill in, and you get back the new entry's id, declined, or pending if they haven't answered within wait_secs (the request stays open for an hour). Asking again with the same kind and label is safe, even after your session ended mid-wait: it opens no second form, and waits on the open request or returns the entry the person already saved (after a dismissal, it opens a new form). wait_secs 0 returns at once. generate: create an api-key, login or note entry whose value the Vault makes itself (a strong random value; for a login, its password), when you need a new secret nobody has chosen yet, e.g. a webhook signing secret or a password for an account you are setting up; you get back its id and how it was made, never the value, and the person isn't asked, since nobody has seen it. For a login, fields give its site (an exact https origin) and username; it is made for your own browser profile, which is where you sign in with it; realm and proxy may be given too, and a use of the login at that place never goes ahead on silence until the person has looked at it. share: ask the person to share a login (id, and a reason) with your own browser profile, so that Browser signin can use it there: they see which login, its site and what you say it is for, with Allow or Deny, and you get back shared with its label and site, or why not. You ask for yourself only; sharing with another agent or every agent is the person's, from the login's card in the Vault pane. You never see its user name or password, and each sign-in with it still asks the person. If it is shared with you already nothing is asked. A login for a site's HTTP sign-in prompt (the pane's notice names the site and realm) or a proxy is asked for the same way, and no signin is involved: once it is shared, load the page again in a tab of your own profile and the browser answers the prompt itself; the person is asked at each prompt unless they chose Always, and you are told what became of it. list and show say shared_with_you for a login shared with you. rotate: give an api-key, login or note entry (id) a new value the Vault makes, and set it at its service: set is the command that does it, with the new value in NEW_SECRET and the current one in OLD_SECRET; verify, if given, checks the new value works (NEW_SECRET). The new value becomes the entry's only if both succeed (exit code 0); otherwise the entry keeps its old value and the new one is kept 7 days as a version, marked with the step that failed. The person approves the rotation once (set and verify as written); you get each command's exit code and output (cleaned of both values), never a value. history: an entry's history, newest first (id; limit): each change to it and each use of it, with when, who (an agent's id or you), the machine, what was done, where, the version of the value it was made or used under, the outcome, the reason given and any references; never a value. Use it to see why and by whom an entry was last rotated before you rotate it again. You can read the history of entries in the Vaults you may use. import: copy a secret from AWS Secrets Manager into the Vault, so nobody types it and you never see it. source names it: aws_secret_id (its name or ARN), key (a field of a JSON secret, as a dotted path such as db.password; the whole secret when left out), user_key (for a new login: the field of the same secret that holds its user name, with key the password's field; both are read in one go and approved once, and a key that is missing or holds no text refuses the whole import before anything is written), region, and profile (a container agent: the AWS grant to read under, one of the names aws configure list-profiles shows; a native agent: a profile on this computer, or the default). Give kind and label to make a new entry (fields and vault as for generate; with user_key it is a login and its user name comes from the secret, not from fields), or id to replace that entry's value, the old one kept 7 days as a version. reason is required. Nobody is asked: the copy is made, and the entry's history line is the record (you, your reason, the secret, the key, the region and the Vault); the person sees it afterwards, can undo it, and the value stays unseen to them until they look, so a use of it never goes ahead on silence until they have (a login you ask to have shared with you, with share, is still asked about, as the share is a use). Each agent has a pace of 30 changes an hour (20 new entries, 6 replaced values). You get back {id, label, vault}, never the value; the entry's history records who copied it, from where and why. The value must be text: a string or a number. import_batch: copy up to 20 secrets from AWS Secrets Manager into one Vault under one approval, instead of calling import once for each. batch is a short name for the list as the person reads it (host passwords); source is the one profile and region every secret is read under (no aws_secret_id in it); vault is the one Vault they go into; items are the secrets, each with aws_secret_id and key as in import's source, and kind and label for a new entry (fields as for generate) or id to replace that entry's value; reason is required, once for the list. An item with link: true reads nothing: it makes a linked entry that records where the key lives (an api-key when kind is left out), and its fields may say readers (who or what reads the key, one line each, e.g. invoice-sync (lambda): at run time; up to 8), rotated (the date it last changed), copies (other places it is kept, one line each as kind: location#key; up to 4) and expires. An item with backed: true makes a backed entry, a link whose value the Vault reads from that AWS secret at each use (a Browser fill, a Terminal run, the person's reveal) with this computer's AWS login and keeps no copy: the secret in AWS stays the authority, so a rotation or change is made there, and rotate, capture, import into it and @previous are refused. It needs an AWS secret (key picks a field of a JSON one). The whole list is checked before anything is read, and the first thing wrong refuses it, naming the item. Nobody is asked: every row is made and each has its own history line, and each counts as one change against your pace of 30 an hour. You get {items: a row per secret, {label, id} or {label, error}; stored and failed: how many}, never a value. A row that fails does not stop the others and nothing is undone. Each stored secret is a line in its entry's history, and one more line records the batch. check: whether an entry's machine copy (the place list shows as its source, such as an AWS secret a service reads) still holds the entry's value (id, reason). AgentMux reads the other place with your own access and compares inside itself: you get same, different, or could not read with why, and when it was checked; neither value, and nothing about how they differ. A place that refuses the read is the answer: do not look for another way to read it. Only an aws-secret's value can be read back; an other place answers could not read. A github-secret (a CI secret) gives no value back: its check reads the secret's listing entry with the GitHub CLI signed in on this computer and answers present, changed since recorded, missing or could not read, with last_changed. For a linked entry there is no value to compare: check reads only the place's description, never the key, and answers present, changed since recorded (the place changed after the entry's rotated date), missing or could not read, with last_changed and rotation as the place gives them and the same for each of its copies (one in AWS under the entry's own AWS place, a CI secret anywhere). A container agent's check starts the read of a CI secret only for an entry the person answered Always for to its use; otherwise it answers not started, with the newest stored result (stored) when there is one, the reason and what to do. Each check is a line in the entry's history naming the place, and agents together get 6 checks of one entry an hour. show: one entry's kind, label, plain fields, tags, which secret parts are set (names only), expiry state, Vault, how many times its value was set, how many earlier values are kept and when it was last used; never a value. update: change an entry's label, plain fields (fields: a field's new value, empty to remove it) and tags (tags replaces them), with a reason; never a value, which is what rotate, generate, import with id and capture are for; a login's site, realm and proxy (fields site, realm, proxy; the site one exact origin) are set at once on a login you made, with your own browser profile where it has none; on any other login your change is recorded as a proposal for the person to accept, and the login stays as it is until they do. Whose browser may use a login is a share (Vault share), never an update. Each change is a line in the entry's history, and the details it replaced are kept 7 days. To record where an entry's machine copy is, set its source_* fields with update: source_kind (aws-secret, github-secret or other), source_location (an AWS secret's name or ARN; owner/repo or owner/repo@environment; or a line of text), source_key (a JSON secret's dotted key, or the CI secret's name), and for an aws-secret optionally source_region and source_profile (the AWS profile, or a container agent's grant, to read it under); empty values remove them, an empty source_kind removes the whole link, and a new source_kind drops a region and profile the new kind has no use for. readers, copies and a linked entry's rotated are set the same way, with no card either; whether an entry is a link is set when it is made (import_batch with link: true) and update can't change it. No value goes in them. The place decides what check reads, but nobody is asked before it changes: the history line names the change and your reason, and the person can put it back. verify: check an entry (id) or every entry you may use: the kind is known, the main secret part is set, the plain fields suit the kind, the expiry date is a date and not past, and the Vault key opens the entry and, when checking all entries, that the history's chain holds; you get a list of {id, problem}, never a value. health: the key store's state, counts of the entries and Vaults you may use (expiring within 14 days, expired, unused for 90 days), the history chain's state, your own requests still waiting and the Vault's schema revision; neither verify nor health needs a reason. After a rotation, Terminal run can name the old value as <id>@previous (to delete an old key at the service, say). rules shapes it: passwordrules as a site declares them (minlength: 16; required: lower; required: digit; allowed: [-_]), or length, or words for a value a person must type on a phone. expires, when you know how long the value lasts (a token's lifetime), has the person reminded before then and files a task for you to rotate it. Never ask the person to paste a secret into the chat: ask for a Vault entry instead. To use an entry: Browser fill with vault fills a web form field; Terminal run with secrets puts it in a command's environment, with stdin_secret on its stdin, and with secret_files in a file only it reads. To keep a value a command prints (gh auth token, aws iam create-access-key), run it with capture: the value goes into the Vault and the output shows [vault:<id>] in its place.",
"inputSchema": {
"type": "object",
"properties": {
"action": { "type": "string", "enum": ["list", "request", "generate", "share", "rotate", "history", "import", "import_batch", "check", "show", "update", "verify", "health"], "description": "What to do" },
"id": { "type": "string", "description": "rotate: the entry to give a new value; history: the entry whose history to read; import: the entry whose value to replace (leave out to make a new entry); check: the entry whose machine copy to check; share: the login to be given (list shows the logins you may use); show, update: the entry; verify: one entry (leave out to check them all)" },
"source": { "type": "object", "description": "import: the AWS secret to copy (aws_secret_id is required); import_batch: the region and profile every item is read under", "properties": { "aws_secret_id": { "type": "string", "description": "import: the secret's name or ARN" }, "key": { "type": "string", "description": "a field of a JSON secret, as a dotted path (db.password)" }, "user_key": { "type": "string", "description": "import, and an import_batch item: for a new login, the field of the same secret that holds its user name as a dotted path (db.user); needs key" }, "region": { "type": "string", "description": "an AWS region such as us-east-1 (the CLI's default when left out)" }, "profile": { "type": "string", "description": "a container agent: the AWS grant to read under; a native agent: a profile on this computer" } } },
"batch": { "type": "string", "description": "import_batch: a short name for the list, as the person reads it (host passwords), at most 60 characters" },
"items": { "type": "array", "maxItems": 20, "description": "import_batch: the secrets to copy, at most 20, all in the source's account and region and all into one Vault", "items": { "type": "object", "properties": { "aws_secret_id": { "type": "string", "description": "the secret's name or ARN" }, "key": { "type": "string", "description": "a field of a JSON secret, as a dotted path (db.password); the whole secret when left out" }, "user_key": { "type": "string", "description": "for a new login: the field of the same secret that holds its user name (db.user); needs key" }, "kind": { "type": "string", "description": "the kind of the new entry, one of kind's; not needed with id" }, "label": { "type": "string", "description": "what the new entry is; not needed with id" }, "fields": { "type": "object", "additionalProperties": { "type": "string" }, "description": "the new entry's plain fields" }, "id": { "type": "string", "description": "replace this entry's value instead of making a new entry" }, "link": { "type": "boolean", "description": "record where the key lives and read no value: a linked entry (not with id)" } }, "required": ["aws_secret_id"] } },
"refs": { "type": "array", "items": { "type": "string" }, "description": "import, import_batch: task numbers, PRs and the like to keep with the history lines" },
"share": { "type": "boolean", "description": "import: for a new login saved for a site (fields.site, an exact https origin), also ask for it to be shared with you, so Browser signin can use it: the card says so with a tick the person can remove, and the answer has shared true or false" },
"tags": { "type": "array", "items": { "type": "string" }, "description": "update: the entry's new tags (replaces the old ones)" },
"limit": { "type": "integer", "description": "history: the most rows to return, newest first (default 100, at most 1000)" },
"set": { "type": "string", "description": "rotate: the command that sets the new value at the service, reading NEW_SECRET (and OLD_SECRET, if the service needs the old one), e.g. gh secret set STRIPE_KEY --body \"$NEW_SECRET\"" },
"verify": { "type": "string", "description": "rotate: optional; a command that succeeds only if the new value (NEW_SECRET) works" },
"cwd": { "type": "string", "description": "rotate: the folder set and verify run in (default: your own)" },
"kind": { "type": "string", "enum": ["ssn", "itin", "tin", "ein", "date-of-birth", "passport", "drivers-licence", "other-id", "card", "bank-account", "api-key", "login", "note"], "description": "request, generate, import: the kind of entry (generate makes api-key, login and note only; import needs it for a new entry)" },
"label": { "type": "string", "description": "request, generate, import: what the entry is, e.g. Stripe test key; update: its new label" },
"reason": { "type": "string", "description": "request, generate, share, rotate, import, import_batch, check, update: why, in one line of 8 to 300 characters (what and why, for which task); required. The person sees it as what you say, and it is kept in the entry's history. It is your own statement and decides nothing" },
"why": { "type": "string", "description": "request, generate: the same as reason (the older name)" },
"fields": { "type": "object", "additionalProperties": { "type": "string" }, "description": "generate, import, update: the entry's plain fields (update: only the ones to change; an empty value removes one): a login's site and username, an api-key's service and env_name" },
"rules": { "type": "object", "description": "generate, rotate: how the value is made (default 20 characters from letters, digits and -_.!@#%^*, at least one of each, no look-alikes)", "properties": { "passwordrules": { "type": "string", "description": "a site's rules, e.g. minlength: 16; maxlength: 32; required: lower; required: digit; allowed: [-_]" }, "length": { "type": "integer", "description": "characters, 8 to 128" }, "maxlength": { "type": "integer", "description": "a field's maxlength, which caps the length; words are refused when they could run past it" }, "words": { "type": "integer", "description": "6 to 12 words instead of characters, for a value a person must type (not with passwordrules)" } } },
"expires": { "type": "string", "description": "generate: the date the value stops working, YYYY-MM-DD, if you know it" },
"wait_secs": { "type": "integer", "description": "request, share, import, import_batch, update of source_* fields, readers, rotated or copies: how long to wait for the person, in seconds (default 300, at most 600). request: 0 returns at once with the request's id. import, import_batch: nobody answering in time is a no, so 0 denies it at once" },
"vault": { "type": "string", "description": "request, generate, import, import_batch: the Vault to keep the entry in (import_batch: every entry of the list), by name (list shows each entry's Vault); default the first Vault you may use, or for an import_batch of links only the Vault named Fleet when the person made one you may use. On an import_batch card the person may send the list to another Vault you may use: the answer's vault says where it went. You see only the Vaults the person made open to you" }
},
"required": ["action"]
}
}"#;Expand description
Vault: the person’s secrets, which an agent names but never reads (docs/specs/SPEC_VAULT_PANE_AGENTS_USE_SECRETS_UNSEEN_2026_10_19.md §5.4).