The command line
Every command of placket: what it does, its usage, its arguments and flags, what its --json object follows, and the exit codes it ends with. A command prints prose for a person on standard error, and JSON or a body on standard output. A command that is refused or fails ends standard error with one line: rejected <code> when the window refused the call, rejected founding <code> when it refused an acceptance, door <code> when the window's door refused it, and error <code> for any other, with any detail after the code. Errors gives each code's cause and fix.
With --json, every command but mcp and watch prints its result as one JSON object and a line feed on standard output instead; its exit code and standard error stay the same. watch, which runs until it is stopped, prints one object per question, each on a line of its own as the question opens, and then its own object. mcp, whose standard output carries the MCP protocol, takes no --json. Each command's object holds the members section 11 of the protocol gives it, under the requirement ids each command below cites.
In a usage, <socket flags> stands for --key <file> --socket <path> --accord <id>, or --label <label> in their place, and then [--state <dir>]: the flags of every command that calls a window. A flag in square brackets is optional, | separates flags of which one is given, and ... after a flag means it may be given more than once.
placket <command> --help prints a command's flags on standard output, each with the sentence this page gives it, and exits 0 (commands-1).
Exit codes
| Code | What it means |
|---|---|
0 | A pass, or a command that did what it was asked. |
1 | A block on give, answer or change; a release that blocked; a give --wait or result whose question closed any way but an accept that passed and was released; a comment that did not cross; a file, or a value inside it, that no release matches; a log that does not conform, or a body that is not its receipt's part, in verify. |
2 | A rejection: the window refused the call, and standard error ends rejected and its code. |
3 | A tool or door error: standard error ends error, or door, and its code. |
4 | An ask still open: the question's id is on standard output. |
Commands
| Command | What it does |
|---|---|
init | Found an example Accord for one person, who holds every key, and print what to run next. |
key | Make a key file, or print a key file's actor reference. |
key new | Write a new key file, mode 0600, and print its actor reference; it never prints the seed. |
key ref | Print the actor reference of a key file. |
declare | Sign the key's declaration of its terms and print it. |
seal | Seal the key's own signed declaration: print the seal entry for founding, and write the opening for whoever runs the window. |
bind | Sign, as a principal, a binding that gives an actor its roles under one mediator and one policy until a time, and print it. |
founding | Put a policy, a mediator, a card, the seals and the bindings in one founding set, check that it founds, and print it with its Accord id and card hash. |
card | Print this build's card, with the judges' configs given, and its card hash and the module it names. |
window | Run the mediator of an Accord behind its door, on a unix socket, with its journal, until it is interrupted. |
window close | Close the Accord of a stopped window's journal: close each open question, write the close receipt last, and with --socket serve the closed Accord. |
view | Ask the window for the key's own view of a proposed Accord, keep it in the state directory, and print it. |
accept | Sign the key's acceptance of the view its state directory keeps, hand it to the window, and say whether the Accord is now founded. |
give | Give another member one part, and print the outcome: pass, block, or ask, with the question's id. |
questions | Print the open questions this key may answer, one JSON object per line. |
watch | Wait on the questions of one or more mediators and print each new question once, as it opens, with the lines that answer it; it never answers. |
answer | Accept a question, asking for release unless --no-release, and print the answer's outcome, then the release's. |
change | Answer a question with a changed version, which passes on and goes back to the asker, and print both outcomes. |
decline | Decline a question, then give the asker the comment, and say whether the comment crossed. |
cancel | Cancel, as its asker, a question of the key's own, and print the outcome. |
result | Print how a question the key asked closed, its release, and the answer or version it fetched, as give --wait does. |
get | Fetch the next delivery queued for the key, or every one with --all, and print its body or the file it was written to. |
mediators | Print the labels config's entries, one JSON object per line, in the order the file lists them. |
mcp | Serve the mediators of the labels given to an agent as MCP tools, on standard input and output, as one party's client. |
verify | Check a journal's receipts for validity under the mediator's key and, with a founding set, for conformance to the Accord, and print what was checked and what is not claimed. |
show | Decode one receipt without verifying it, and print what it says and what it claims. |
log | Export a verified journal as a log, one row per question, and with --all one for every crossing. |
reconcile | Reconcile a journal's receipts with what each state directory kept, and print what was removed, unrecorded or missing. |
released | Say whether a file, a value inside it, or a part the key kept, is a part that crossed to the state directory's key, and under which receipt. |
version | Print which build the binary is: its version, commit, Go release and decision module. |
init
Found an example Accord for one person, who holds every key, and print what to run next.
Usage: placket init <example> [--dir <dir>] [--label <label>]
| Argument | Values | What it is |
|---|---|---|
<example> | approve, merge, handoff | The entry point to set up: approve before apply, the out-gate of a merge, or an agent handoff. |
| Flag | Required | Default | What it is |
|---|---|---|---|
--dir <dir> | no | The directory to write the example in, empty or new; by default <placket config dir>/<label>/. | |
--label <label> | no | <example> | The label the example's entries of the labels config start with; by default the example's name. |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1.
Exit codes: 0, 3.
key
Make a key file, or print a key file's actor reference.
Usage: placket key <subcommand>
Its subcommands: key new, key ref.
| Argument | Values | What it is |
|---|---|---|
<subcommand> | new, ref | What to do: key new or key ref. |
| Flag | Required | Default | What it is |
|---|---|---|---|
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1.
Exit codes: 0, 3.
key new
Write a new key file, mode 0600, and print its actor reference; it never prints the seed.
Usage: placket key new --out <file>
| Flag | Required | Default | What it is |
|---|---|---|---|
--out <file> | yes | The key file to write; a file already there is never replaced. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-3.
Exit codes: 0, 3.
key ref
Print the actor reference of a key file.
Usage: placket key ref --key <file>
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | yes | The key file to read. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-3.
Exit codes: 0, 3.
declare
Sign the key's declaration of its terms and print it.
Usage: placket declare --key <file> --terms <file>
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | yes | The key file of the party that declares. | |
--terms <file> | yes | A file holding the terms, one JSON object; founding checks the terms themselves. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-3.
Exit codes: 0, 3.
seal
Seal the key's own signed declaration: print the seal entry for founding, and write the opening for whoever runs the window.
Usage: placket seal --key <file> --declaration <file> [--out <dir>]
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | yes | The key file that signed the declaration. | |
--declaration <file> | yes | The signed declaration, as declare prints it. | |
--out <dir> | no | . | The directory the opening is written to, as <hex of the actor reference>.opening.json, mode 0600; a file already there is never replaced. |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-3.
Exit codes: 0, 3.
bind
Sign, as a principal, a binding that gives an actor its roles under one mediator and one policy until a time, and print it.
Usage: placket bind --key <file> --actor <actor> --mediator <actor> --until <time> --role <role>... --policy <file>
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | yes | The principal's key file, which signs the binding. | |
--actor <actor> | yes | The actor reference the binding is for, as key ref prints it. | |
--mediator <actor> | yes | The mediator's actor reference, which the binding names. | |
--until <time> | yes | When the binding ends: a timestamp in whole seconds, such as 2099-01-01T00:00:00Z. | |
--role <role> | yes | A role the binding gives, such as decider; given once per role. | |
--policy <file> | yes | The founding set's policy, whose typed hash the binding names. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-3.
Exit codes: 0, 3.
founding
Put a policy, a mediator, a card, the seals and the bindings in one founding set, check that it founds, and print it with its Accord id and card hash.
Usage: placket founding --policy <file> --mediator <file> --card <file> --seal <file>... --binding <file>...
| Flag | Required | Default | What it is |
|---|---|---|---|
--policy <file> | yes | The policy: which roles each principal may grant. | |
--mediator <file> | yes | A file holding the mediator: its actor reference, its operator and how it runs. | |
--card <file> | yes | The card, as card prints it. | |
--seal <file> | yes | A declaration's seal entry, as seal prints it; given once per party. | |
--binding <file> | yes | A binding, as bind prints it; given once per binding. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-3.
Exit codes: 0, 3.
card
Print this build's card, with the judges' configs given, and its card hash and the module it names.
Usage: placket card --default [--judge <file>]...
| Flag | Required | Default | What it is |
|---|---|---|---|
--default | yes | Print this build's card, the one card the command line builds. | |
--judge <file> | no | A judge's config, given once per judge; the card lists them in this order. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1.
Exit codes: 0, 3.
window
Run the mediator of an Accord behind its door, on a unix socket, with its journal, until it is interrupted.
Usage: placket window --key <file> --founding <file> --openings <dir> [--acceptances <file>] [--socket <path>] [--journal <dir>] [--judge <file>]...
Its subcommands: window close.
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | yes | The mediator's key file. | |
--founding <file> | yes | The founding set, as founding prints it. | |
--openings <dir> | yes | The directory of every member's opening, each as seal writes it. | |
--socket <path> | no | The socket to listen on; by default the Accord's own under the runtime directory. | |
--journal <dir> | no | The journal's directory; by default the Accord's own under placket's state directory. | |
--acceptances <file> | no | The members' acceptances; by default the acceptances.json beside the founding set, which the window writes once every member has accepted. | |
--judge <file> | no | A judge's config the card lists, given once per judge; a window needs exactly the card's. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-3.
Exit codes: 0, 3.
window close
Close the Accord of a stopped window's journal: close each open question, write the close receipt last, and with --socket serve the closed Accord.
Usage: placket window close --key <file> --founding <file> --journal <dir> --accord <id> [--acceptances <file>] [--openings <dir>] [--socket <path>]
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | yes | The mediator's key file. | |
--founding <file> | yes | The founding set of the Accord to close. | |
--journal <dir> | yes | The journal to close, of a window that is stopped. | |
--accord <id> | yes | The founding set's Accord id, given as a guard, since a close cannot be undone. | |
--socket <path> | no | Serve the closed Accord on this socket until interrupted; without it, the command exits once the close is written. | |
--openings <dir> | no | The directory of the members' openings; a close decides nothing, so it needs none. | |
--acceptances <file> | no | The members' acceptances, as window takes them. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-3.
Exit codes: 0, 3.
view
Ask the window for the key's own view of a proposed Accord, keep it in the state directory, and print it.
Usage: placket view <socket flags>
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | unless --label | The key file of the member the command speaks for; needed unless --label is given. | |
--socket <path> | unless --label | The window's socket; needed unless --label is given. | |
--accord <id> | unless --label | The Accord id the window serves; needed unless --label is given. | |
--label <label> | no | A mediator of the labels config, by its label, or by its Accord id when it has none, in place of --key, --socket and --accord. | |
--state <dir> | no | The member's state directory; by default <key file>.state/<the Accord id's hex>/. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-3.
Exit codes: 0, 2, 3.
accept
Sign the key's acceptance of the view its state directory keeps, hand it to the window, and say whether the Accord is now founded.
Usage: placket accept <socket flags>
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | unless --label | The key file of the member the command speaks for; needed unless --label is given. | |
--socket <path> | unless --label | The window's socket; needed unless --label is given. | |
--accord <id> | unless --label | The Accord id the window serves; needed unless --label is given. | |
--label <label> | no | A mediator of the labels config, by its label, or by its Accord id when it has none, in place of --key, --socket and --accord. | |
--state <dir> | no | The member's state directory; by default <key file>.state/<the Accord id's hex>/. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-3.
Exit codes: 0, 2, 3.
give
Give another member one part, and print the outcome: pass, block, or ask, with the question's id.
Usage: placket give <socket flags> --to <actor> --kind <kind> (--text <text> | --file <file> [--as <form>]) [--re <id>] [--topic <topic>] [--keep] [--wait]
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | unless --label | The key file of the member the command speaks for; needed unless --label is given. | |
--socket <path> | unless --label | The window's socket; needed unless --label is given. | |
--accord <id> | unless --label | The Accord id the window serves; needed unless --label is given. | |
--label <label> | no | A mediator of the labels config, by its label, or by its Accord id when it has none, in place of --key, --socket and --accord. | |
--state <dir> | no | The member's state directory; by default <key file>.state/<the Accord id's hex>/. | |
--to <actor> | yes | The receiver: a member's actor reference. | |
--kind <kind> | yes | The part's kind, which the terms select on. | |
--text <text> | no | The body, as text; one of --text and --file is needed. | |
--file <file> | no | A file holding the body, read as --as says. | |
--as <form> | no | text | How --file is read: text, raw or data, data being one JSON value in canonical form. |
--re <id> | no | What the part is about, such as a question's id. | |
--topic <topic> | no | The part's topic. | |
--keep | no | Keep the part given in the state directory's kept.jsonl. | |
--wait | no | When the part is asked about, wait until its question closes, holding no lock, and print what result prints. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-2.
Exit codes: 0, 1, 2, 3, 4.
questions
Print the open questions this key may answer, one JSON object per line.
Usage: placket questions <socket flags> [--wait <seconds>]
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | unless --label | The key file of the member the command speaks for; needed unless --label is given. | |
--socket <path> | unless --label | The window's socket; needed unless --label is given. | |
--accord <id> | unless --label | The Accord id the window serves; needed unless --label is given. | |
--label <label> | no | A mediator of the labels config, by its label, or by its Accord id when it has none, in place of --key, --socket and --accord. | |
--state <dir> | no | The member's state directory; by default <key file>.state/<the Accord id's hex>/. | |
--wait <seconds> | no | Wait at most this many seconds, up to 60, until there is a question to show. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1.
Exit codes: 0, 2, 3.
watch
Wait on the questions of one or more mediators and print each new question once, as it opens, with the lines that answer it; it never answers.
Usage: placket watch --label <label>... [--count <n>]
| Flag | Required | Default | What it is |
|---|---|---|---|
--label <label> | yes | A mediator of the labels config to watch, given once per mediator; at least one is needed. | |
--count <n> | no | Exit once this many questions are printed; without it, run until interrupted. | |
--json | no | Print one JSON object per question on standard output, each on a line of its own as the question opens, and then the result as one object. |
Its --json object follows commands-1.
Exit codes: 0, 2, 3.
answer
Accept a question, asking for release unless --no-release, and print the answer's outcome, then the release's.
Usage: placket answer <socket flags> --question <id> [--text <text>] [--no-release] [--keep]
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | unless --label | The key file of the member the command speaks for; needed unless --label is given. | |
--socket <path> | unless --label | The window's socket; needed unless --label is given. | |
--accord <id> | unless --label | The Accord id the window serves; needed unless --label is given. | |
--label <label> | no | A mediator of the labels config, by its label, or by its Accord id when it has none, in place of --key, --socket and --accord. | |
--state <dir> | no | The member's state directory; by default <key file>.state/<the Accord id's hex>/. | |
--question <id> | yes | The question's id: the receipt id of its ask. | |
--text <text> | no | accepted | The answer's text. |
--no-release | no | Accept with no release: the part does not pass on. | |
--keep | no | Keep the answer call signed, and the salt minted, in kept.jsonl. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-2.
Exit codes: 0, 1, 2, 3.
change
Answer a question with a changed version, which passes on and goes back to the asker, and print both outcomes.
Usage: placket change <socket flags> --question <id> (--text <text> | --file <file>) [--comment <text>] [--keep] [--no-release]
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | unless --label | The key file of the member the command speaks for; needed unless --label is given. | |
--socket <path> | unless --label | The window's socket; needed unless --label is given. | |
--accord <id> | unless --label | The Accord id the window serves; needed unless --label is given. | |
--label <label> | no | A mediator of the labels config, by its label, or by its Accord id when it has none, in place of --key, --socket and --accord. | |
--state <dir> | no | The member's state directory; by default <key file>.state/<the Accord id's hex>/. | |
--question <id> | yes | The question's id: the receipt id of its ask. | |
--text <text> | no | The version, as text; one of --text and --file is needed. | |
--file <file> | no | A file holding the version, as UTF-8 text. | |
--comment <text> | no | A comment given to the asker after the change. | |
--keep | no | Keep the answer call signed, the salt minted and the version in kept.jsonl. | |
--no-release | no | Change with no release: the version goes back to the asker alone. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-2.
Exit codes: 0, 1, 2, 3.
decline
Decline a question, then give the asker the comment, and say whether the comment crossed.
Usage: placket decline <socket flags> --question <id> --comment <text>
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | unless --label | The key file of the member the command speaks for; needed unless --label is given. | |
--socket <path> | unless --label | The window's socket; needed unless --label is given. | |
--accord <id> | unless --label | The Accord id the window serves; needed unless --label is given. | |
--label <label> | no | A mediator of the labels config, by its label, or by its Accord id when it has none, in place of --key, --socket and --accord. | |
--state <dir> | no | The member's state directory; by default <key file>.state/<the Accord id's hex>/. | |
--question <id> | yes | The question's id: the receipt id of its ask. | |
--comment <text> | yes | The comment a decline needs: why, for the asker. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-2.
Exit codes: 0, 1, 2, 3.
cancel
Cancel, as its asker, a question of the key's own, and print the outcome.
Usage: placket cancel <socket flags> --question <id>
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | unless --label | The key file of the member the command speaks for; needed unless --label is given. | |
--socket <path> | unless --label | The window's socket; needed unless --label is given. | |
--accord <id> | unless --label | The Accord id the window serves; needed unless --label is given. | |
--label <label> | no | A mediator of the labels config, by its label, or by its Accord id when it has none, in place of --key, --socket and --accord. | |
--state <dir> | no | The member's state directory; by default <key file>.state/<the Accord id's hex>/. | |
--question <id> | yes | The question's id: the receipt id of its ask. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-2.
Exit codes: 0, 2, 3.
result
Print how a question the key asked closed, its release, and the answer or version it fetched, as give --wait does.
Usage: placket result <socket flags> --question <id> [--wait <seconds>]
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | unless --label | The key file of the member the command speaks for; needed unless --label is given. | |
--socket <path> | unless --label | The window's socket; needed unless --label is given. | |
--accord <id> | unless --label | The Accord id the window serves; needed unless --label is given. | |
--label <label> | no | A mediator of the labels config, by its label, or by its Accord id when it has none, in place of --key, --socket and --accord. | |
--state <dir> | no | The member's state directory; by default <key file>.state/<the Accord id's hex>/. | |
--question <id> | yes | The question's id: the receipt id of its ask. | |
--wait <seconds> | no | Wait at most this many seconds, up to 60, holding no lock, while the question is open. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-2.
Exit codes: 0, 1, 2, 3, 4.
get
Fetch the next delivery queued for the key, or every one with --all, and print its body or the file it was written to.
Usage: placket get <socket flags> [--all] [--out <dir>] [--keep] [--wait <seconds>]
| Flag | Required | Default | What it is |
|---|---|---|---|
--key <file> | unless --label | The key file of the member the command speaks for; needed unless --label is given. | |
--socket <path> | unless --label | The window's socket; needed unless --label is given. | |
--accord <id> | unless --label | The Accord id the window serves; needed unless --label is given. | |
--label <label> | no | A mediator of the labels config, by its label, or by its Accord id when it has none, in place of --key, --socket and --accord. | |
--state <dir> | no | The member's state directory; by default <key file>.state/<the Accord id's hex>/. | |
--out <dir> | no | Write each body to a file of this directory, and print its path in place of the body. | |
--keep | no | Keep each delivery in kept.jsonl. | |
--all | no | Fetch every delivery waiting, in order, under one state lock. | |
--wait <seconds> | no | Wait at most this many seconds, up to 60, holding no lock, until a delivery is queued. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-3.
Exit codes: 0, 2, 3.
mediators
Print the labels config's entries, one JSON object per line, in the order the file lists them.
Usage: placket mediators
| Flag | Required | Default | What it is |
|---|---|---|---|
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1.
Exit codes: 0, 3.
mcp
Serve the mediators of the labels given to an agent as MCP tools, on standard input and output, as one party's client.
Usage: placket mcp [--label <label>]... [--allow-answering]
| Flag | Required | Default | What it is |
|---|---|---|---|
--label <label> | no | A mediator of the labels config to serve, given once per mediator. | |
--allow-answering | no | Serve a label whose key answers questions too; by default such a label is refused. |
It takes no --json: its standard output carries the MCP protocol.
Exit codes: 0, 3.
verify
Check a journal's receipts for validity under the mediator's key and, with a founding set, for conformance to the Accord, and print what was checked and what is not claimed.
Usage: placket verify --receipts <dir> (--mediator <actor> | --accord <id> --founding <file>) [--founding <file>] [--acceptances <file>] [--answers <file>] [--subset] [--delivery <file>] [--superseded-by <file>] [--open <file>]... [--view <file>]
| Flag | Required | Default | What it is |
|---|---|---|---|
--receipts <dir> | yes | The journal's directory, whose receipts.jsonl is checked. | |
--mediator <actor> | no | The mediator's actor reference, under which the receipts are checked; one of --mediator and --accord is needed. | |
--accord <id> | no | The Accord id, the one value given out of band: the mediator's reference comes from the founding set whose typed hash it is. | |
--founding <file> | no | The founding set, for conformance to the Accord; needed with --accord. | |
--acceptances <file> | no | The founding set's acceptances; by default the acceptances.json beside it. | |
--answers <file> | no | A file of answer calls, one a line, read beside the journal's answers.jsonl to witness answers. | |
--subset | no | The receipts are a subset, whose chains may start late; completeness is then not claimed. | |
--delivery <file> | no | A delivery, as get --json saved it, whose body and salt are checked against its receipt. | |
--superseded-by <file> | no | The founding set of the Accord that supersedes this one, whose supersedes must pin this journal's close; it needs --accord and --founding. | |
--open <file> | no | A member's opening, given once per opening, so its seal and its terms are checked. | |
--view <file> | no | One member's own view, as it kept it, to check that member's receipts against; it needs --founding. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-4, commands-8.
Exit codes: 0, 1, 3.
show
Decode one receipt without verifying it, and print what it says and what it claims.
Usage: placket show --receipt <file>
| Flag | Required | Default | What it is |
|---|---|---|---|
--receipt <file> | yes | A file holding one receipt. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-4.
Exit codes: 0, 3.
log
Export a verified journal as a log, one row per question, and with --all one for every crossing.
Usage: placket log --mediator <actor> --receipts <dir> [--kept <dir>]... [--format <format>] [--words | --no-words] [--all]
| Flag | Required | Default | What it is |
|---|---|---|---|
--mediator <actor> | yes | The mediator's actor reference, under which the receipts are checked. | |
--receipts <dir> | yes | The journal's directory. | |
--format <format> | no | json | How the log is printed: json or csv. |
--words | no | Add the texts of the parts the state directories kept. | |
--no-words | no | Empty the comments. | |
--all | no | A row for every crossing, besides one per question. | |
--kept <dir> | no | A state directory whose kept parts the log reads, given once per directory. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-4.
Exit codes: 0, 3.
reconcile
Reconcile a journal's receipts with what each state directory kept, and print what was removed, unrecorded or missing.
Usage: placket reconcile --mediator <actor> --accord <id> --card <hash> --receipts <dir> --kept <dir>...
| Flag | Required | Default | What it is |
|---|---|---|---|
--mediator <actor> | yes | The mediator's actor reference, under which the receipts are checked. | |
--accord <id> | yes | The Accord id. | |
--card <hash> | yes | The card hash. | |
--receipts <dir> | yes | The journal's directory. | |
--kept <dir> | yes | A state directory, given once per directory. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-4.
Exit codes: 0, 3.
released
Say whether a file, a value inside it, or a part the key kept, is a part that crossed to the state directory's key, and under which receipt.
Usage: placket released --state <dir> [--file <file>] [--kind <kind>]... [--at <pointer> (--value-file <file> | --value <text>)] [--re <id>] [--from <actor>] [--every]
| Flag | Required | Default | What it is |
|---|---|---|---|
--state <dir> | yes | The state directory of the key the part crossed to. | |
--file <file> | no | A file whose bytes are checked; without it, every part the key kept is tried. | |
--at <pointer> | no | A JSON Pointer into the body, where the value is checked; it needs one of --value-file and --value. | |
--value-file <file> | no | A file holding the value's bytes. | |
--value <text> | no | The value, as text. | |
--re <id> | no | Match only a kept part whose re is this; without --file only. | |
--from <actor> | no | Match only a receipt from this sender. | |
--every | no | Print every match, in fetch order, not only the first; without --file only. | |
--kind <kind> | no | Match only a receipt of this kind, given once per kind. | |
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1, commands-5, commands-6, commands-7.
Exit codes: 0, 1, 3.
version
Print which build the binary is: its version, commit, Go release and decision module.
Usage: placket version
| Flag | Required | Default | What it is |
|---|---|---|---|
--json | no | Print the result as one JSON object on standard output. |
Its --json object follows commands-1.
Exit codes: 0, 3.
Errors
Every code the command line prints, by where it comes from: its own codes under adapters/cli; the journal's under adapters/journal; a code in the window's reply by its member, door, rejection or error; and any other by the package that declares it. The same code under two keys has two sentences, each saying what it means there. placket mcp's own codes are in the mediator API's errors.
Two kinds of code follow another and are not listed here. After error verify, the verifier's code is the protocol's (verify-1). After error judge, a judge config's code is the one docs/adr/0023-judges.md names. A founding code after founding is the protocol's too.
| From | Code | Cause and fix |
|---|---|---|
adapters/cli | body | A give names no body or two; give exactly one of --text and --file. |
adapters/cli | card | The card could not be built with the judges given; check each --judge file. |
adapters/cli | changed | A change has no version, an empty one, or a file that is not UTF-8; give the version with --text or --file. |
adapters/cli | comment | A decline has no comment, or a comment is not UTF-8; give a comment in UTF-8. |
adapters/cli | data | A file given with --as data is not one JSON value in a form the canonical form takes; fix the file, or give it with --as raw. |
adapters/cli | delivery | The --delivery file is not a delivery, or its receipt is none of the receipts; give a delivery of this journal, as get --json saved it. |
adapters/cli | dir-not-empty | The directory init would write in holds something already, and init wrote nothing; give --dir an empty or new directory. |
adapters/cli | file | A file or directory the command reads or writes could not be read or written, or is not a regular file, and the detail names which, or kept when a fetched body could not be written and was kept in kept.jsonl instead; check the path, and take a kept body from kept.jsonl. |
adapters/cli | format | The log's --format is neither json nor csv, --words and --no-words were both given, or --json was given with --format csv; give one format, and --json only with json. |
adapters/cli | founding | The founding set, an opening or the acceptances do not found the Accord, and the detail names the founding code, kernel for a card of another module than this build's, or judge for judge configs that are not the card's; fix the file the detail names, or run the build the card names. |
adapters/cli | internal | The command failed in a way no other code names; run it again, and report it if it persists. |
adapters/cli | judge | A --judge file is not a judge's config, and the detail names its code; fix the config as docs/adr/0023-judges.md says. |
adapters/cli | path | The --at path is not a JSON Pointer; write it empty, or with a slash before each token. |
adapters/cli | seal | The declaration is not one object signed by the key whose actor it names, or its opening could not be made; seal a declaration this key signed. |
adapters/cli | terms | The terms are not one JSON object a declaration can carry, or could not be signed; fix the terms file. |
adapters/cli | text | A text given on the command line, or a file read as text, is not UTF-8; give UTF-8, or give the file with --as raw. |
adapters/cli | until | The binding's --until is not a timestamp in whole seconds; write it as 2099-01-01T00:00:00Z is written. |
adapters/cli | usage | The command, an argument or a flag is not one it takes, a flag's value is not of its form, or a flag it needs is missing, as the line before says; run it as its usage in the CLI reference says. |
adapters/cli | verify | The receipts do not verify, and the detail names the verifier's code with the file and the line, accord or card for a journal of more than one Accord or card, or superseded for a successor that does not pin this log's close; restore the journal, or give the successor that supersedes this Accord. |
adapters/client | asked | What the window shows of the question is not the part its ask's receipt names, so nothing was signed; list the questions again. |
adapters/client | bad-config | The labels config is not in its format; fix mediators.json against api/config/mediators.json. |
adapters/client | envelope | The envelope could not be signed; check the key file holds a key. |
adapters/client | label-taken | Two entries of the labels config have one label; give each entry its own label. |
adapters/client | mediator-collision | Two entries of the labels config use one socket for two Accords, one state directory, or one Accord id with no label; give each its own socket, key or label. |
adapters/client | rand | The source of randomness failed; call again. |
adapters/client | reply | The window's reply is not what the call asked for; check the socket reaches this Accord's window. |
adapters/client | unknown-mediator | No mediator served has that name; name one by its label, or by its Accord id when it has none, as mediators lists them. |
adapters/client | view | The key keeps no view of this Accord to accept; run placket view first. |
adapters/journal | journal | A file of the journal is not what a window wrote, or could not be read or written, and the detail names the file, its line and the core's code; restore the journal, or finish a cut close with placket window close. |
adapters/journal | journal-locked | Another window holds the journal; stop that window, or give this one another journal. |
adapters/keyfile | key | The key file does not hold a key; give the path of a key placket key new made. |
adapters/keyfile | key-exists | A file is already at the key's path; choose another path. |
adapters/keyfile | key-mode | The key file can be read by others; make it mode 0600. |
adapters/keyfile | key-read | The key file could not be read; check its path and its owner. |
adapters/keyfile | key-write | The key file could not be written; check the directory. |
adapters/local | cursor | The window could not draw its cursors' key; start it again. |
adapters/local | judge | The window's judge configs are not the ones its card lists; start it with the card's judges. |
adapters/local | reply | What the window sent is not a reply; check the socket is a placket window's. |
adapters/local | socket | The window could not be reached, or went away before it replied; start the window, or check the socket path. |
adapters/local | socket-path | The socket path is longer than the system takes; use a shorter one. |
adapters/state | state | A file of the state directory could not be read or written, or is not in its format; check the directory and its files. |
adapters/state | state-actor | The state directory belongs to another key; give each key its own state directory. |
door | bad-call | The call is not in the door's format, or its wait is not a whole number from 0 to 60; check the call against the mediator API. |
door | bad-signature | The call's signature does not verify under its caller's key; sign it with the key it names. |
door | door-internal | The window failed after the call passed its checks; call again, and see the window's log if it fails again. |
door | judge-busy | The caller's last give is still with a judge; wait for its reply, then give again. |
door | not-founded | The Accord is proposed, not founded: every member must view and accept its view first; run placket view and placket accept. |
door | replayed | The window has seen the call's nonce already; call again with a fresh nonce. |
door | stale | The call's time is more than 60 seconds from the window's clock; set the clock right and call again. |
door | too-large | The call is longer than the door reads; send a smaller part. |
door | wrong-accord | The window serves another Accord than the call names; check the mediator's Accord id. |
error | at | A time does not keep the timestamp rule; the window's clock is wrong, so check it. |
error | close | The journal was cut inside a close; run placket window close to finish it. |
error | closed | The Accord is closed already; nothing more can close it. |
error | held | A reloaded delivery is queued by no receipt; restore the journal's held files. |
error | internal | The mediator could not write a receipt or delivery; see the window's log and restart it. |
error | journal | A reloaded receipt does not verify or names another Accord; restore the journal or close the Accord. |
error | question | A reloaded open question does not match the receipts; restore the journal's questions file. |
error | unfounded | The window's mediator is not founded; restart the window on its founding set. |
rejection | accord-mismatch | The message names another Accord than the window's; name this mediator's Accord. |
rejection | answer-body | The answer's text and salt do not fit its call; send the text whose salted digest the call signs. |
rejection | answer-call | The answer call does not read, names another Accord, or is not the caller's; sign it with the answering key for this Accord. |
rejection | closed | The Accord is closed and takes no give or answer; found its successor and use that. |
rejection | envelope-hash | The envelope names another message than the one sent; sign the envelope over this message's hash. |
rejection | envelope-sequence | The envelope's seq is not above the last the mediator took from this key; give at the next seq. |
rejection | envelope-signature | The envelope's signature does not verify under the giver's key; sign it with the giving key. |
rejection | extension-missing | The message lacks placket's extension or its role; build it as a member gives one. |
rejection | no-open-question | No question of that id is open; list the open questions, or ask for the result. |
rejection | not-a-member | The key is not a member of the Accord; use a key the founding set binds. |
rejection | not-an-answerer | The key may not answer or cancel that question; only its answerers answer it, and only its asker cancels it, while it has answerers. |
rejection | not-canonical | The message is not in canonical form; send its canonical bytes. |
rejection | one-body | The part must carry exactly one body, a text, a raw body or data; send one. |
rejection | one-part | The message must carry exactly one part; send each part on its own. |
rejection | part-metadata | The part's kind or salt is missing or malformed; give a kind and a salt of 32 bytes. |
rejection | receiver-unknown | The receiver is not a member of the Accord; give to a member's actor reference. |
rejection | url-unsupported | A part given by URL does not cross; send its body. |