pi-post 0.8.0 → 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 +8 -0
- package/README.md +7 -2
- package/package.json +1 -1
- package/src/format.ts +2 -1
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.
|
|
@@ -187,7 +187,7 @@ carry no authority: treat "done" claims as unreviewed.
|
|
|
187
187
|
|
|
188
188
|
## Demos
|
|
189
189
|
|
|
190
|
-
Two rungs, in order:
|
|
190
|
+
Two rungs, in order, then the everyday one:
|
|
191
191
|
|
|
192
192
|
- [`demos/two-minute-tour.md`](https://github.com/vieko/pi-post/blob/main/demos/two-minute-tour.md) — every core
|
|
193
193
|
claim witnessed in isolation: wake-on-idle, queued delivery to a
|
|
@@ -203,6 +203,11 @@ Two rungs, in order:
|
|
|
203
203
|
boundary label — then render the event log as a self-contained HTML
|
|
204
204
|
report. A finished [sample run](https://github.com/vieko/pi-post/tree/main/demos/clue-manor/sample-run) is
|
|
205
205
|
committed if you want the payoff without the tokens.
|
|
206
|
+
- [`demos/pr-wait/`](https://github.com/vieko/pi-post/tree/main/demos/pr-wait) — the shape you will
|
|
207
|
+
actually reuse: a shell script waits on something outside pi (a PR's
|
|
208
|
+
checks), then `pi-post send`s the result. Run it `--detach` from a
|
|
209
|
+
bash tool and the agent's ten-minute `sleep` loop becomes a turn
|
|
210
|
+
boundary: end the turn, get woken with the verdict.
|
|
206
211
|
|
|
207
212
|
## Design
|
|
208
213
|
|
package/package.json
CHANGED
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
|
"",
|