peerband 0.2.3 → 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 CHANGED
@@ -313,6 +313,7 @@ cannot use these tools, even on a share that allows messages.
313
313
  | `workspace.create` | `cwd`, optional `label` |
314
314
  | `tab.create` | `workspace_id`, `cwd`, optional `label` |
315
315
  | `pane.split` | `pane_id`, `cwd`, `direction` (`right`, `down`, `left`, `up`) |
316
+ | `agent.rename` | `pane_id`, `name` (a lowercase Herdr agent name) |
316
317
  | `agent.start` | `pane_id`, `name`, `kind` (for example `codex`, `claude`, `gemini`) |
317
318
  | `workspace.rename`, `tab.rename`, `pane.rename` | Matching ID and `label` |
318
319
  | `workspace.focus`, `tab.focus`, `pane.focus` | Matching ID |
package/dist/peerband.mjs CHANGED
@@ -11720,7 +11720,8 @@ var ENVIRONMENT_ACTIONS = [
11720
11720
  "pane.split",
11721
11721
  "pane.rename",
11722
11722
  "pane.focus",
11723
- "agent.start"
11723
+ "agent.start",
11724
+ "agent.rename"
11724
11725
  ];
11725
11726
  var FIELDS = {
11726
11727
  "workspace.create": ["cwd", "label"],
@@ -11732,7 +11733,8 @@ var FIELDS = {
11732
11733
  "pane.split": ["paneId", "direction", "cwd"],
11733
11734
  "pane.rename": ["paneId", "label"],
11734
11735
  "pane.focus": ["paneId"],
11735
- "agent.start": ["paneId", "name", "kind"]
11736
+ "agent.start": ["paneId", "name", "kind"],
11737
+ "agent.rename": ["paneId", "name"]
11736
11738
  };
11737
11739
  var REQUIRED = {
11738
11740
  "workspace.create": ["cwd"],
@@ -11744,7 +11746,8 @@ var REQUIRED = {
11744
11746
  "pane.split": ["paneId", "direction", "cwd"],
11745
11747
  "pane.rename": ["paneId", "label"],
11746
11748
  "pane.focus": ["paneId"],
11747
- "agent.start": ["paneId", "name", "kind"]
11749
+ "agent.start": ["paneId", "name", "kind"],
11750
+ "agent.rename": ["paneId", "name"]
11748
11751
  };
11749
11752
  var KINDS = new Set("pi claude codex gemini cursor devin agy cline omp mastracode opencode copilot kimi kiro droid amp grok hermes kilo qodercli qwen letta maki muse".split(" "));
11750
11753
  function invalid(message) {
@@ -14300,11 +14303,16 @@ function environmentMetadata(value) {
14300
14303
  return result;
14301
14304
  }
14302
14305
  async function listEnvironment(client) {
14303
- const result = {};
14306
+ const result = { actions: [...ENVIRONMENT_ACTIONS] };
14304
14307
  for (const [method, key] of [["workspace.list", "workspaces"], ["tab.list", "tabs"], ["pane.list", "panes"]]) {
14305
14308
  const response = await client.request(method, {});
14306
14309
  if (!Array.isArray(response[key])) throw new ConnectError("schema_mismatch", `Unexpected ${method} response.`, "Check the installed Herdr schema.");
14307
- result[key] = response[key].slice(0, 50).map(metadata);
14310
+ let rows = response[key];
14311
+ if (key === "panes") {
14312
+ const listed = await client.request("agent.list", {});
14313
+ rows = rows.map((pane) => ({ ...pane, name: listed.agents?.find((agent) => agent.pane_id === pane.pane_id)?.name }));
14314
+ }
14315
+ result[key] = rows.slice(0, 50).map(metadata);
14308
14316
  result[`${key}Truncated`] = response[key].length > 50;
14309
14317
  }
14310
14318
  if (Buffer.byteLength(JSON.stringify(result), "utf8") > 48 * 1024) throw new ConnectError("response_too_large", "The environment metadata exceeds the frame budget.", "Reduce the session layout before listing it remotely.");
@@ -14322,6 +14330,10 @@ function environmentParams(input) {
14322
14330
  params.target_pane_id = params.pane_id;
14323
14331
  delete params.pane_id;
14324
14332
  }
14333
+ if (command.action === "agent.rename") {
14334
+ params.target = params.pane_id;
14335
+ delete params.pane_id;
14336
+ }
14325
14337
  if (command.action === "agent.start") params.timeout_ms = 8e3;
14326
14338
  return params;
14327
14339
  }
@@ -15067,7 +15079,7 @@ var HerdrAdapter = class {
15067
15079
  const request = { id: randomUUID7(), method: command.action, params };
15068
15080
  if (!schema.validateRequest(request)) throw new ConnectError("unsupported_capability", "The installed Herdr API does not support this environment action.", "Update Herdr and use its matching schema.");
15069
15081
  const result = asObject(await client.request(command.action, params));
15070
- const expected = command.action === "workspace.create" ? "workspace_created" : command.action === "tab.create" ? "tab_created" : command.action === "agent.start" ? "agent_started" : void 0;
15082
+ const expected = command.action === "workspace.create" ? "workspace_created" : command.action === "tab.create" ? "tab_created" : command.action === "agent.start" ? "agent_started" : command.action === "agent.rename" ? "agent_info" : void 0;
15071
15083
  if (expected && result.type !== expected) throw this.schemaMismatch(`${command.action} returned an unexpected result type`);
15072
15084
  if (!expected && !["workspace_info", "tab_info", "pane_info", "ok"].includes(result.type)) throw this.schemaMismatch(`${command.action} returned an unexpected result type`);
15073
15085
  return environmentMetadata(result);
@@ -17106,7 +17118,7 @@ function herdrGroupHelp(s) {
17106
17118
  }
17107
17119
 
17108
17120
  // src/cli/cli.ts
17109
- var VERSION = true ? "0.2.3" : "0.0.0-dev";
17121
+ var VERSION = true ? "0.2.4" : "0.0.0-dev";
17110
17122
  function createContext(overrides = {}) {
17111
17123
  const env = overrides.env ?? process.env;
17112
17124
  const stdout = overrides.stdout ?? process.stdout;
package/herdr-plugin.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  id = "peerband"
2
2
  name = "PeerBand"
3
- version = "0.2.3"
3
+ version = "0.2.4"
4
4
  min_herdr_version = "0.9.3"
5
5
  description = "Reach your Herdr agents from any MCP client through your PeerBand account"
6
6
  platforms = ["linux", "macos", "windows"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peerband",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "PeerBand CLI and Herdr plugin: reach your local coding agents from any MCP client through your PeerBand account",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -70,3 +70,9 @@ A write returns a durable receipt, queried through `get_request_status`; success
70
70
  receipts include bounded metadata in `result`, with camelCase result IDs. Receipt
71
71
  states and uncertainty rules match message delivery. Neither the relay nor the
72
72
  connector retries a mutation after disconnection or startup reconciliation.
73
+
74
+ Connectors may additionally return an `actions` array from `list_environment`.
75
+ Clients should require `agent.rename` in that list before offering agent-name
76
+ changes. This action takes `{paneId, name, idempotencyKey}` and addresses Herdr
77
+ by the explicit pane ID. Pane metadata includes the agent live `name` when known.
78
+ Older connectors omit `actions` and keep their existing environment controls.
@@ -14,6 +14,7 @@
14
14
  "environmentControlArgs": {
15
15
  "description": "Owner-only, opt-in actions; no native args, shell, implicit targets, close/stop or env overrides. cwd must be an absolute path on the remote machine. See README for supported agent kinds.",
16
16
  "oneOf": [
17
+ {"type": "object", "required": ["action", "idempotencyKey", "paneId", "name"], "additionalProperties": false, "properties": {"action": {"const": "agent.rename"}, "idempotencyKey": {"type": "string", "minLength": 16, "maxLength": 256}, "paneId": {"type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[A-Za-z0-9][A-Za-z0-9:_-]{0,255}$"}, "name": {"type": "string", "minLength": 1, "maxLength": 32, "pattern": "^[a-z][a-z0-9_-]{0,31}$"}}},
17
18
  {"type": "object", "required": ["action", "idempotencyKey", "cwd"], "additionalProperties": false, "properties": {"action": {"const": "workspace.create"}, "idempotencyKey": {"type": "string", "minLength": 16, "maxLength": 256}, "cwd": {"type": "string", "minLength": 1, "maxLength": 2048}, "label": {"type": "string", "minLength": 1, "maxLength": 128}}},
18
19
  {"type": "object", "required": ["action", "idempotencyKey", "workspaceId", "cwd"], "additionalProperties": false, "properties": {"action": {"const": "tab.create"}, "idempotencyKey": {"type": "string", "minLength": 16, "maxLength": 256}, "workspaceId": {"type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[A-Za-z0-9][A-Za-z0-9:_-]{0,255}$"}, "cwd": {"type": "string", "minLength": 1, "maxLength": 2048}, "label": {"type": "string", "minLength": 1, "maxLength": 128}}},
19
20
  {"type": "object", "required": ["action", "idempotencyKey", "paneId", "cwd", "direction"], "additionalProperties": false, "properties": {"action": {"const": "pane.split"}, "idempotencyKey": {"type": "string", "minLength": 16, "maxLength": 256}, "paneId": {"type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[A-Za-z0-9][A-Za-z0-9:_-]{0,255}$"}, "cwd": {"type": "string", "minLength": 1, "maxLength": 2048}, "direction": {"enum": ["right", "down", "left", "up"]}}},