@automagik/genie 4.260407.2 → 4.260407.4

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.
@@ -10,7 +10,7 @@
10
10
  "plugins": [
11
11
  {
12
12
  "name": "genie",
13
- "version": "4.260407.2",
13
+ "version": "4.260407.4",
14
14
  "source": "./plugins/genie",
15
15
  "description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, wish them into plans, make with parallel agents, ship as one team. A coding genie that grows with your project."
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automagik/genie",
3
- "version": "4.260407.2",
3
+ "version": "4.260407.4",
4
4
  "description": "Collaborative terminal toolkit for human + AI workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genie",
3
- "version": "4.260407.2",
3
+ "version": "4.260407.4",
4
4
  "description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, turn them into wishes, execute with /work, validate with /review, and ship as one team.",
5
5
  "author": {
6
6
  "name": "Namastex Labs"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genie-plugin",
3
- "version": "4.260407.2",
3
+ "version": "4.260407.4",
4
4
  "private": true,
5
5
  "description": "Runtime dependencies for genie bundled CLIs",
6
6
  "type": "module",
@@ -1,13 +1,30 @@
1
1
  /**
2
2
  * Mailbox — Durable message store with unread/read semantics.
3
3
  *
4
+ * ## Migration note (commit 44a153a3)
5
+ *
6
+ * Previously messages were written to `.genie/mailbox/<worker>.json` files and
7
+ * delivered by a polling loop that woke up every few seconds to check for new
8
+ * entries. This introduced latency proportional to the poll interval and made
9
+ * cross-process coordination fragile.
10
+ *
11
+ * The current implementation replaced file-based polling with PostgreSQL:
12
+ * - Messages are persisted to the `mailbox` table (durable, queryable).
13
+ * - A `AFTER INSERT` trigger fires `pg_notify('genie_mailbox_delivery', …)`
14
+ * with payload `<to_worker>:<message_id>`.
15
+ * - `subscribeDelivery()` calls `sql.listen('genie_mailbox_delivery', …)` so
16
+ * the scheduler daemon receives the notification instantly — no polling.
17
+ * - A 30-second fallback poll catches any notifications missed during
18
+ * reconnects or daemon restarts.
19
+ *
20
+ * `.genie/mailbox/` JSON files are no longer written or read; references to
21
+ * that path in older docs are outdated.
22
+ *
4
23
  * Messages persist to PostgreSQL `mailbox` table before any push delivery
5
24
  * attempt. This ensures durability (DEC-7).
6
25
  *
7
26
  * Delivery is state-aware: messages are queued and pushed to tmux
8
27
  * panes only when the worker is idle (not mid-turn).
9
- *
10
- * PG LISTEN/NOTIFY triggers instant delivery notification on new inserts.
11
28
  */
12
29
 
13
30
  import { v4 as uuidv4 } from 'uuid';