Repository navigation
postbag v1.2.0
A bag has a name. Named bags let two conversations use separate ledgers,
nothing is separated automatically, and every command an agent is handed
says which bag it belongs to.
Added
- Named bags.
defaultis~/.postbag/ledger.jsonl, any other name is
~/.postbag/bags/<name>.jsonl, and an absolute path is a bag too. A bag
name follows the peer name grammar, anddefaultis reserved. --bag NAMEbefore every verb:postbag --bag acceptance read. It
overridesPOSTBAG_LEDGER, and a bare command selects as before.opencreates a named bag that does not exist.join,sendandread
refuse one and say which command the human should run.- Every success line, every refusal after bag selection and every envelope
names the bag,defaultincluded: "@bob (claude) joined in bag default",
"exchange open: 12 letters in bag acceptance", "in bag acceptance: @ada
(claude), @bob (claude). exchange 3: 8 of 12 letters left." The constant
refusal of an invalid path carries no bag label. - Every command postbag generates carries the bag: the reply command in a
letter, thejoina refusal asks a restarted session to run, theopen
it asks the human for, and thereadit points to. An absolute path is
single-quoted for the shell.
Changed
- The envelope's first line is "Letter 4 of 12 from @ada to @bob via
postbag (exchange 3, bag acceptance)", for the last letter too. - The reply command inside a non-final letter is
postbag --bag acceptance send @ada -. join,open,sendandreadname the bag on their first line:
"letter 4 of 12 in exchange 3 delivered to @bob in bag acceptance, 8 left".
Compatibility
- The ledger format is unchanged. Old ledgers read without rewriting, and
no version gate was added. - A 1.1
sendrefuses--bag, which every 1.2 reply command carries, so
scoped commands need 1.2 at both ends, the default bag included. An older
CLI reaches a bag by path:POSTBAG_LEDGER='/abs/path' postbag send .... POSTBAG_LEDGERis unchanged: a path,~expanded, used when--bagis
absent.- A ledger path must contain only printable characters. A custom path
holding a control character or a line separator is now refused.