pi-post 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/DESIGN.md CHANGED
@@ -114,6 +114,14 @@ actions, change configuration, or close out review; slash commands in it
114
114
  are inert text. A "done" message is a claim, not an approval — the
115
115
  review pipeline is unchanged by this channel existing.
116
116
 
117
+ For session senders, the bracketed address in the delivery label is the
118
+ sender's own address. The extension sets it from the session id, and
119
+ `send_message` has no parameter to set it. Receivers granting scope to one
120
+ sender should match this address, not the reply line, which the sender
121
+ chooses. This protects against a confused session, not a hostile local
122
+ process: the mailbox is a directory, and any process that can write there
123
+ can forge any field.
124
+
117
125
  ## Invariants
118
126
 
119
127
  Each is pinned by a test.
package/README.md CHANGED
@@ -15,7 +15,7 @@ The receiving session gets the text at a safe point in its turn, marked as
15
15
  coming from another session rather than from you:
16
16
 
17
17
  ```
18
- Message from pi session gtm-summoner (~/dev/gtm):
18
+ Message from pi session gtm-summoner [s-…] (~/dev/gtm):
19
19
 
20
20
  db-migrate has two rotting jobs; evidence in the message below. Not urgent,
21
21
  but fix before the next migration merges.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-post",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Messages between pi sessions — delivered mid-task or queued until they return.",
5
5
  "keywords": [
6
6
  "pi-package",
package/src/format.ts CHANGED
@@ -9,11 +9,12 @@ import { presence, type SessionRecord } from "./registry.ts";
9
9
  export function formatDelivery(message: Message): string {
10
10
  const where = message.from.cwd ? ` (${message.from.cwd})` : "";
11
11
  const kind = message.from.kind === "process" ? "process" : "pi session";
12
+ const address = message.from.kind === "session" && message.from.address ? ` [${message.from.address}]` : "";
12
13
  const reply = message.replyTo
13
14
  ? `Reply with send_message to ${message.replyTo}.`
14
15
  : "This message carries no reply address.";
15
16
  return [
16
- `Message from ${kind} ${message.from.name}${where}:`,
17
+ `Message from ${kind} ${message.from.name}${address}${where}:`,
17
18
  "",
18
19
  message.body,
19
20
  "",