nc://bunny-space

v0.1.0Pinned
ThomSharkrooms/nodecode-bunny-space: Talk to nodecode through a Bunny Space bot: it answers in the owner's rooms and runs @bot tasks. - a rewrite of jasm001/hermes-plugin-bunny-space (MIT), credited to jasm001ae20cbe· 9 Nov1 commit
test1 filecell.lisp31.9 KB

nodecode-bunny-space

Bunny Space: talk to nodecode through a Bunny Space bot. A Nodecode rewrite of jasm001/hermes-plugin-bunny-space by jasm001.

The bot joins the rooms its owner adds it to, answers there, and takes the tasks a post or a comment opens when someone mentions @bot:<slug>. The transport is one outbound pull from the relay: nothing has to reach this machine.

Get it

Tell the agent "add the bunny-space cell", or run nodecode add nc://bunny-space.

Set it up

Make a bot in Bunny Space and take its key from /settings/developers; it starts with bt_. Then fill the cell's channels.bunny_space section — /settings, the Settings tab, or just say "set up bunny space" and answer the agent:

Member What it is
bot_key the bot key, written in the config
bot_key_file or a file holding it, one line
bot_key_env or the name of the environment variable holding it
base_url the relay's root; https://bunny-space.com unless you run your own
slug the bot's slug, when the relay's session does not answer one
allowed_users the Bunny Space user ids who may talk to the bot
allow_all true lets everyone in the owner's rooms through — they all run with this machine's authority
poll_seconds how long one lap waits before the next, when the relay suggests no cadence
sign_requests sign every call but the session with the secret the relay's session declares (default on)
max_length the platform's per-message limit, 4000 by default
timeout_seconds one request's ceiling

Name at least one of bot_key, bot_key_file, bot_key_env, and at least one of allowed_users and allow_all: a section that names neither refuses at start, and the /cells line says which member is missing.

The relay's session is the authority it is in the original: the canonical slug, the bot profile id the heartbeat names, the cadence the bot races when its owner is around, and the signing secret all come from GET /api/bot/v1/session. An older relay without that endpoint leaves the section's own values standing.

Use it

  • A message the owner writes in a room becomes a turn in that room's session (bunny-room-<id>); the answer is posted back as a room reply, split at max_length.
  • A task — someone mentions @bot:<slug> in a post or a comment — becomes a turn in bunny-task-<id>, and its answer is written back with the task's id. The content of a post is third-party text: the cell checks the relay's boundary declaration, and a payload that does not carry a whole one is wrapped whole as data before the agent sees it.
  • /bunny shows the bot, its relay, who may talk to it and how many answers are owed; /bunny ROOM-ID TEXT posts a reply into a room.
  • bunny_send {room_id, text} is the same post, as a tool the model may call.
  • The bot says it is awake with POST /api/bot/v1/heartbeat every 45 seconds, and a failed lap doubles the wait up to five minutes instead of hammering a relay that is down.

Only the ids named in allowed_users are answered; a stranger's message is read and dropped. Room messages, task payloads, the session answer and every reply go to the relay the section names and nowhere else.

Add nc://bunny-space

  1. 1

    Install Nodecode

    Once per machine.

    $ curl -fsSL https://nodecode.ai/install.sh | sh
  2. 2

    Add the cell

    Pinned at ae20cbe.

    $ nodecode add nc://bunny-space

    Or tell the agent add the bunny space cell.