pi-post 0.6.2 → 0.6.3
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/README.md +5 -0
- package/extensions/pi-post.ts +4 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -145,6 +145,11 @@ sessions can read state; only one can consume a message.
|
|
|
145
145
|
| `PI_POST_FROM` | — | Default `--from` label for the CLI |
|
|
146
146
|
| `PI_POST_REPLY_TO` | — | Default `--reply-to` address for the CLI |
|
|
147
147
|
|
|
148
|
+
The extension also *sets* one variable: `PI_SESSION_ADDRESS`, the session's
|
|
149
|
+
own `s-…` address, exported at session start so child processes (bash tools,
|
|
150
|
+
spawned scripts) can capture a reply target without shelling out to
|
|
151
|
+
`pi-post whoami`.
|
|
152
|
+
|
|
148
153
|
The directory is created `0700` and messages `0600`.
|
|
149
154
|
|
|
150
155
|
## Limits
|
package/extensions/pi-post.ts
CHANGED
|
@@ -88,6 +88,10 @@ export default function (pi: ExtensionAPI) {
|
|
|
88
88
|
const canonical = canonicalPath(ctx.cwd);
|
|
89
89
|
selfAddress = sessionAddress(sessionId);
|
|
90
90
|
selfName = pi.getSessionName() ?? defaultSessionName(canonical, selfAddress);
|
|
91
|
+
// Expose the address to child processes (bash tools inherit process.env),
|
|
92
|
+
// so scripts can capture a send_message target without shelling out to
|
|
93
|
+
// `pi-post whoami` or re-deriving the hash from PI_SESSION_ID.
|
|
94
|
+
process.env.PI_SESSION_ADDRESS = selfAddress;
|
|
91
95
|
|
|
92
96
|
ensureDirs(root, selfAddress);
|
|
93
97
|
writeRecord(root, {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-post",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"description": "Messages between pi sessions — delivered mid-task or queued until they return.
|
|
3
|
+
"version": "0.6.3",
|
|
4
|
+
"description": "Messages between pi sessions — delivered mid-task or queued until they return.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
7
7
|
"pi-extension",
|