@gorlitzer-labs/apiary 1.13.8 → 1.14.0

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.
Files changed (36) hide show
  1. package/README.md +15 -3
  2. package/dist/agent/index.d.ts +7 -0
  3. package/dist/agent/index.js +2 -2
  4. package/dist/chunk-36WX2UAF.js +663 -0
  5. package/dist/chunk-36WX2UAF.js.map +1 -0
  6. package/dist/{chunk-3O76FESR.js → chunk-LNSDH2V5.js} +7 -7
  7. package/dist/{chunk-FTN3D6WM.js → chunk-LOONM4G3.js} +8 -177
  8. package/dist/chunk-LOONM4G3.js.map +1 -0
  9. package/dist/{chunk-63Q3KJ4W.js → chunk-N2LPKMPO.js} +186 -3
  10. package/dist/chunk-N2LPKMPO.js.map +1 -0
  11. package/dist/{chunk-YP4K2A7G.js → chunk-TMXQDGMN.js} +30 -30
  12. package/dist/chunk-TMXQDGMN.js.map +1 -0
  13. package/dist/{chunk-LN6ATWE3.js → chunk-WJD5EKO6.js} +158 -158
  14. package/dist/chunk-WJD5EKO6.js.map +1 -0
  15. package/dist/{chunk-J3T2PS3M.js → chunk-XP5F5NCQ.js} +2 -2
  16. package/dist/cli/index.js +38 -380
  17. package/dist/cli/index.js.map +1 -1
  18. package/dist/{invites-YZWCUC67.js → invites-ID5SRM3D.js} +5 -5
  19. package/dist/{join-FSKOS5BO.js → join-W53OPEHR.js} +5 -5
  20. package/dist/{room-MAUAV2XD.js → room-XC546NTX.js} +11 -11
  21. package/dist/run-6JRFWMAQ.js +164 -0
  22. package/dist/run-6JRFWMAQ.js.map +1 -0
  23. package/package.json +1 -1
  24. package/dist/chunk-63Q3KJ4W.js.map +0 -1
  25. package/dist/chunk-FTN3D6WM.js.map +0 -1
  26. package/dist/chunk-LN6ATWE3.js.map +0 -1
  27. package/dist/chunk-XKFWEK7W.js +0 -288
  28. package/dist/chunk-XKFWEK7W.js.map +0 -1
  29. package/dist/chunk-YP4K2A7G.js.map +0 -1
  30. package/dist/run-4EJB2KC3.js +0 -90
  31. package/dist/run-4EJB2KC3.js.map +0 -1
  32. /package/dist/{chunk-3O76FESR.js.map → chunk-LNSDH2V5.js.map} +0 -0
  33. /package/dist/{chunk-J3T2PS3M.js.map → chunk-XP5F5NCQ.js.map} +0 -0
  34. /package/dist/{invites-YZWCUC67.js.map → invites-ID5SRM3D.js.map} +0 -0
  35. /package/dist/{join-FSKOS5BO.js.map → join-W53OPEHR.js.map} +0 -0
  36. /package/dist/{room-MAUAV2XD.js.map → room-XC546NTX.js.map} +0 -0
package/README.md CHANGED
@@ -13,6 +13,16 @@ Shared rooms for AI agents. Forked from [stoops-cli](https://github.com/stoops-i
13
13
 
14
14
  Agents are bees, rooms are hives. Put them to work — they don't need sleep, benefits, or encouragement.
15
15
 
16
+ | | |
17
+ |---|---|
18
+ | **Do you need it?** | Only when agents must **talk to each other**: hand off work, ask a question, wait for a review. To just run agents and watch them, [seldon](../../tools/seldon) is enough. Rooms are an add-on. |
19
+ | **Requires** | Node 20+, tmux (for terminal agents), an agent CLI (`claude`, `codex` or `opencode`); `cloudflared` only to share a room over the internet |
20
+ | **Install** | `npm i -g @gorlitzer-labs/apiary` (or `seldon install apiary`) |
21
+ | **Try it** | [Quick start](#quick-start) below: a room and two agents in it, in three commands |
22
+
23
+ **Cost to know about:** every message in a room wakes every agent listening, and each wake
24
+ re-reads that agent's context. Keep rooms small and quiet.
25
+
16
26
  ## Setup
17
27
 
18
28
  Apiary is one module of the [seldon](https://github.com/gorlitzer-labs/seldon/tree/main/modules/apiary) monorepo, published as the npm package `@gorlitzer-labs/apiary`.
@@ -29,7 +39,7 @@ That gives you the global `apiary` command, usable from anywhere — `@gorlitzer
29
39
 
30
40
  ```bash
31
41
  npm i -g @gorlitzer-labs/seldon
32
- seldon install apiary # or run `seldon` for the interactive picker
42
+ seldon install apiary # or `seldon install` for the checklist
33
43
  ```
34
44
 
35
45
  **From source** (for development):
@@ -86,10 +96,12 @@ Both put an agent in a room. They differ in who wakes it up:
86
96
  | | MCP client (`apiary mcp`) | tmux wrapper (`apiary claude` / `codex`) |
87
97
  |---|---|---|
88
98
  | Setup | Any session you already have — Claude Code, Cursor, Windsurf | Apiary launches the CLI in its own `apiary_<name>` tmux session |
89
- | Room messages | **Pulled** — seen only when the agent calls `catch_up()` | **Pushed** into the session, even while it's idle |
90
- | Idle agent | Sleeps at the prompt until you type | Woken by a mention or a message |
99
+ | Room messages | **Pulled** via `catch_up()`; inside tmux, an @mention, whisper or ping also nudges the session | **Pushed** into the session, even while it's idle |
100
+ | Idle agent | Inside tmux: woken by a mention, whisper or ping. Outside tmux: sleeps until you type | Woken by a mention or a message |
91
101
  | `apiary stop`, factory, supervisor | Not managed — just a participant | Tracked by pid; factory can staff it |
92
102
 
103
+ **How the MCP client wakes a session.** Claude Code passes `$TMUX_PANE` to its MCP servers, so `apiary mcp` knows which pane it lives in. When the room addresses the agent it types one fixed line there — `apiary: <sender> mentioned you in room "<room>". Read it with apiary__catch_up("<room>") …` — never the message itself, so nobody in the room can put words in your prompt. It waits for an empty composer (your draft is never touched) and never types into a permission prompt. `APIARY_MCP_WAKE=off` disables it.
104
+
93
105
  Use the MCP client for agents **you're driving** — "join the room, post what you found, ask X" — and for adding agents on the fly. Use the wrapper for agents that must **run unattended**: a coordinator, workers, anything that should react while nobody is at the keyboard.
94
106
 
95
107
  **Remote?** If you use Tailscale (or any VPN), bind the room to it instead of opening a public tunnel:
@@ -349,6 +349,13 @@ interface EventProcessorOptions {
349
349
  onModeChange?: (roomId: string, roomName: string, mode: EngagementMode) => void;
350
350
  /** Called before each delivery. Return false to skip. */
351
351
  preQuery?: () => Promise<boolean>;
352
+ /**
353
+ * Nothing is pushed to the agent — it pulls with catch_up() (standalone
354
+ * `apiary mcp`). Arriving events are classified and buffered but NOT marked
355
+ * delivered: delivery there is a no-op, so marking them would hide every
356
+ * message from catch_up(), which only returns what hasn't been delivered.
357
+ */
358
+ pullOnly?: boolean;
352
359
  }
353
360
  /**
354
361
  * What an agent runtime observed on its CLI's screen, as reported to the room.
@@ -8,13 +8,13 @@ import {
8
8
  StoopsEngagement,
9
9
  classifyEvent,
10
10
  createRuntimeMcpServer
11
- } from "../chunk-LN6ATWE3.js";
11
+ } from "../chunk-WJD5EKO6.js";
12
12
  import {
13
13
  contentPartsToString,
14
14
  formatEvent,
15
15
  messageRef,
16
16
  participantLabel
17
- } from "../chunk-YP4K2A7G.js";
17
+ } from "../chunk-TMXQDGMN.js";
18
18
  import "../chunk-BZ4VDWC2.js";
19
19
  export {
20
20
  EventMultiplexer,