peerband 0.2.2 → 0.2.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.
- package/README.md +58 -0
- package/dist/peerband.mjs +440 -227
- package/herdr-plugin.toml +1 -1
- package/package.json +33 -7
- package/protocol/README.md +35 -0
- package/protocol/relay-messages.schema.json +19 -2
- package/skills/peerband/SKILL.md +20 -0
package/README.md
CHANGED
|
@@ -277,3 +277,61 @@ JSON Schemas for the relay WebSocket messages, the enrollment API and browser de
|
|
|
277
277
|
## License
|
|
278
278
|
|
|
279
279
|
Apache-2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE). Contributions: [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
280
|
+
|
|
281
|
+
## Control Herdr remotely
|
|
282
|
+
|
|
283
|
+
The MCP tools `list_environment` and `control_environment` let the machine owner
|
|
284
|
+
open a workspace or tab, split a pane, rename or focus layout items, and start an
|
|
285
|
+
agent without messaging an existing agent first. They require a separate
|
|
286
|
+
`environment:control` OAuth grant and explicit machine opt-in. Existing read and
|
|
287
|
+
message grants do not gain this permission; reconnect an MCP client that requests
|
|
288
|
+
the new scope and approve its consent screen. Legacy personal MCP tokens do not
|
|
289
|
+
have environment-control access.
|
|
290
|
+
|
|
291
|
+
Set `"enableEnvironmentControl": true` in your `connector.json` and restart the
|
|
292
|
+
PeerBand Relay tab. For a foreground connection, use
|
|
293
|
+
`peerband connect --enable-environment-control`. `--read-only` or
|
|
294
|
+
`"enableWrites": false` disables all environment controls. Environment controls
|
|
295
|
+
are unavailable when `allowedAgents` or `allowedWorkspaces` is configured, since
|
|
296
|
+
those allowlists cannot authorize creating new layout targets. Shared users
|
|
297
|
+
cannot use these tools, even on a share that allows messages.
|
|
298
|
+
|
|
299
|
+
1. Call `list_machines` and select an owned `installation_id` explicitly.
|
|
300
|
+
2. Call `list_environment` with that installation to find workspace, tab and pane
|
|
301
|
+
IDs, including panes with no agent. Labels are untrusted user text. Each list
|
|
302
|
+
is bounded to 50 entries and reports truncation.
|
|
303
|
+
3. Call `control_environment` with the installation, an action, its fields below,
|
|
304
|
+
and a random `idempotency_key` of 16?256 characters.
|
|
305
|
+
4. Use `get_request_status` on the same installation with the returned
|
|
306
|
+
`requestId` (as `request_id`) until the receipt settles. A completed creation
|
|
307
|
+
returns IDs in `result.workspace`, `result.tab`, `result.rootPane` or
|
|
308
|
+
`result.pane`. `delivered` confirms the Herdr action was acknowledged; it does
|
|
309
|
+
not mean an agent has finished a task.
|
|
310
|
+
|
|
311
|
+
| Action | Fields |
|
|
312
|
+
| --- | --- |
|
|
313
|
+
| `workspace.create` | `cwd`, optional `label` |
|
|
314
|
+
| `tab.create` | `workspace_id`, `cwd`, optional `label` |
|
|
315
|
+
| `pane.split` | `pane_id`, `cwd`, `direction` (`right`, `down`, `left`, `up`) |
|
|
316
|
+
| `agent.rename` | `pane_id`, `name` (a lowercase Herdr agent name) |
|
|
317
|
+
| `agent.start` | `pane_id`, `name`, `kind` (for example `codex`, `claude`, `gemini`) |
|
|
318
|
+
| `workspace.rename`, `tab.rename`, `pane.rename` | Matching ID and `label` |
|
|
319
|
+
| `workspace.focus`, `tab.focus`, `pane.focus` | Matching ID |
|
|
320
|
+
|
|
321
|
+
`cwd` is an absolute path on the remote machine. Creation preserves the local
|
|
322
|
+
user's focus. Start an agent only in an idle shell pane; Herdr checks whether the
|
|
323
|
+
pane can accept it. To start in a new tab, create the tab first, check its receipt,
|
|
324
|
+
and pass `result.rootPane.paneId` to `agent.start`. Then call `list_agents` for its
|
|
325
|
+
PeerBand agent ID and use `send_agent_message` to provide the task.
|
|
326
|
+
|
|
327
|
+
Reuse a key only for the same operation. Receipts survive connector restarts and
|
|
328
|
+
retain only hashes, delivery metadata and bounded result metadata. A lost
|
|
329
|
+
acknowledgement or interrupted write becomes `delivery_unknown` and is never
|
|
330
|
+
replayed automatically. Inspect the environment before deciding what to do next;
|
|
331
|
+
a fresh key can duplicate an uncertain action. Receipts expire after seven days,
|
|
332
|
+
so keys are not a permanent operation history.
|
|
333
|
+
|
|
334
|
+
The API does not accept shell commands, raw keystrokes, native agent arguments,
|
|
335
|
+
environment-variable overrides, close/stop actions or permission-dialog responses.
|
|
336
|
+
Older servers can ignore the new capability header; older connectors are detected
|
|
337
|
+
before the server routes environment tools.
|