pi-lxmf 0.1.0 โ†’ 0.1.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [Unreleased]
9
+
10
+ ## [0.1.1] - 2026-09-24
11
+
12
+ ### Added
13
+
14
+ - Startup notification to the owner (work doc #5): once the daemon is
15
+ fully available (LXMF destination announcing, `pi --mode rpc` ready), it
16
+ sends `๐ŸŸข pi-lxmf ready โ€” listening for messages.` to the configured
17
+ owner โ€” plus a `Resuming session <file>.` line when a session pointer
18
+ was resumed. Best-effort: a failed delivery is noted and carried by the
19
+ next successful reply.
20
+
8
21
  ## [0.1.0] - 2026-09-24
9
22
 
10
23
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-lxmf",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Drive the Pi coding agent over LXMF messaging (Reticulum mesh) from a headless server.",
5
5
  "license": "EUPL-1.2",
6
6
  "author": "Henri Bergius <henri.bergius@iki.fi>",
package/src/bin.js CHANGED
@@ -210,6 +210,10 @@ async function main() {
210
210
  process.on("SIGINT", () => shutdown("SIGINT"));
211
211
  process.on("SIGTERM", () => shutdown("SIGTERM"));
212
212
 
213
+ // The daemon is fully available: tell the owner (they may be waiting on
214
+ // a restart). Delivery failures are noted, not fatal.
215
+ await bridge.notifyStartup(sessionPointer?.sessionFile ?? null);
216
+
213
217
  // Run until signalled or shut down over LXMF.
214
218
  await new Promise(() => {});
215
219
  }
package/src/bridge.js CHANGED
@@ -13,6 +13,7 @@
13
13
  * before falling back to a "done (no reply)" nudge.
14
14
  */
15
15
 
16
+ import { basename } from "node:path";
16
17
  import {
17
18
  bridgeCommands,
18
19
  EMPTY_REPLY_RECOVERY_PROMPT,
@@ -554,6 +555,23 @@ export class Bridge {
554
555
  }
555
556
  }
556
557
 
558
+ /**
559
+ * Tells the owner the bridge has started and is accepting messages
560
+ * (the startup case of SPEC ยง13 proactive notifications). Called by the
561
+ * daemon once the mesh side is announcing and the RPC child is ready.
562
+ * Best-effort via {@link deliver}: a failure is noted and carried by
563
+ * the next successful delivery instead of being lost.
564
+ *
565
+ * @param {string|null} [resumedSessionFile] - Absolute path of the
566
+ * session resumed from the persisted pointer, when one exists.
567
+ */
568
+ async notifyStartup(resumedSessionFile = null) {
569
+ const resumed = resumedSessionFile
570
+ ? `\nResuming session ${basename(resumedSessionFile)}.`
571
+ : "";
572
+ await this.deliver(`๐ŸŸข pi-lxmf ready โ€” listening for messages.${resumed}`);
573
+ }
574
+
557
575
  /**
558
576
  * @param {string} reason
559
577
  */