Skip to content

postbag v1.2.0

Choose a tag to compare

@github-actions github-actions released this 09 Sep 08:31
· 93 commits to main since this release
e19c954

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. default is ~/.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, and default is reserved.
  • --bag NAME before every verb: postbag --bag acceptance read. It
    overrides POSTBAG_LEDGER, and a bare command selects as before.
  • open creates a named bag that does not exist. join, send and read
    refuse one and say which command the human should run.
  • Every success line, every refusal after bag selection and every envelope
    names the bag, default included: "@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, the join a refusal asks a restarted session to run, the open
    it asks the human for, and the read it 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, send and read name 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 send refuses --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_LEDGER is unchanged: a path, ~ expanded, used when --bag is
    absent.
  • A ledger path must contain only printable characters. A custom path
    holding a control character or a line separator is now refused.