peerband 0.2.5 → 0.2.6

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
@@ -318,6 +318,7 @@ cannot use these tools, even on a share that allows messages.
318
318
  | `agent.start` | `pane_id`, `name`, `kind` (for example `codex`, `claude`, `gemini`) |
319
319
  | `workspace.rename`, `tab.rename`, `pane.rename` | Matching ID and `label` |
320
320
  | `workspace.focus`, `tab.focus`, `pane.focus` | Matching ID |
321
+ | `workspace.close`, `tab.close`, `pane.close` | Matching ID. Closes it in Herdr, ending any agent or shell running there |
321
322
 
322
323
  `cwd` is an absolute path on the remote machine. Creation preserves the local
323
324
  user's focus. Start an agent only in an idle shell pane; Herdr checks whether the
package/dist/peerband.mjs CHANGED
@@ -11714,12 +11714,15 @@ var ENVIRONMENT_ACTIONS = [
11714
11714
  "workspace.create",
11715
11715
  "workspace.rename",
11716
11716
  "workspace.focus",
11717
+ "workspace.close",
11717
11718
  "tab.create",
11718
11719
  "tab.rename",
11719
11720
  "tab.focus",
11721
+ "tab.close",
11720
11722
  "pane.split",
11721
11723
  "pane.rename",
11722
11724
  "pane.focus",
11725
+ "pane.close",
11723
11726
  "agent.start",
11724
11727
  "agent.rename"
11725
11728
  ];
@@ -11727,12 +11730,15 @@ var FIELDS = {
11727
11730
  "workspace.create": ["cwd", "label"],
11728
11731
  "workspace.rename": ["workspaceId", "label"],
11729
11732
  "workspace.focus": ["workspaceId"],
11733
+ "workspace.close": ["workspaceId"],
11730
11734
  "tab.create": ["workspaceId", "cwd", "label"],
11731
11735
  "tab.rename": ["tabId", "label"],
11732
11736
  "tab.focus": ["tabId"],
11737
+ "tab.close": ["tabId"],
11733
11738
  "pane.split": ["paneId", "direction", "cwd"],
11734
11739
  "pane.rename": ["paneId", "label"],
11735
11740
  "pane.focus": ["paneId"],
11741
+ "pane.close": ["paneId"],
11736
11742
  "agent.start": ["paneId", "name", "kind"],
11737
11743
  "agent.rename": ["paneId", "name"]
11738
11744
  };
@@ -11740,12 +11746,15 @@ var REQUIRED = {
11740
11746
  "workspace.create": ["cwd"],
11741
11747
  "workspace.rename": ["workspaceId", "label"],
11742
11748
  "workspace.focus": ["workspaceId"],
11749
+ "workspace.close": ["workspaceId"],
11743
11750
  "tab.create": ["workspaceId", "cwd"],
11744
11751
  "tab.rename": ["tabId", "label"],
11745
11752
  "tab.focus": ["tabId"],
11753
+ "tab.close": ["tabId"],
11746
11754
  "pane.split": ["paneId", "direction", "cwd"],
11747
11755
  "pane.rename": ["paneId", "label"],
11748
11756
  "pane.focus": ["paneId"],
11757
+ "pane.close": ["paneId"],
11749
11758
  "agent.start": ["paneId", "name", "kind"],
11750
11759
  "agent.rename": ["paneId", "name"]
11751
11760
  };
@@ -15085,6 +15094,10 @@ var HerdrAdapter = class {
15085
15094
  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.");
15086
15095
  const result = asObject(await client.request(command.action, params));
15087
15096
  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;
15097
+ if (command.action.endsWith(".close")) {
15098
+ if (!["ok", "workspace_closed", "tab_closed", "pane_closed"].includes(result.type)) throw this.schemaMismatch(`${command.action} returned an unexpected result type`);
15099
+ return environmentMetadata(result);
15100
+ }
15088
15101
  if (expected && result.type !== expected) throw this.schemaMismatch(`${command.action} returned an unexpected result type`);
15089
15102
  if (!expected && !["workspace_info", "tab_info", "pane_info", "ok"].includes(result.type)) throw this.schemaMismatch(`${command.action} returned an unexpected result type`);
15090
15103
  return environmentMetadata(result);
@@ -17133,7 +17146,7 @@ function herdrGroupHelp(s) {
17133
17146
  }
17134
17147
 
17135
17148
  // src/cli/cli.ts
17136
- var VERSION = true ? "0.2.5" : "0.0.0-dev";
17149
+ var VERSION = true ? "0.2.6" : "0.0.0-dev";
17137
17150
  function createContext(overrides = {}) {
17138
17151
  const env = overrides.env ?? process.env;
17139
17152
  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.5"
3
+ version = "0.2.6"
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.5",
3
+ "version": "0.2.6",
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",
@@ -75,4 +75,7 @@ Connectors may additionally return an `actions` array from `list_environment`.
75
75
  Clients should require `agent.rename` in that list before offering agent-name
76
76
  changes. This action takes `{paneId, name, idempotencyKey}` and addresses Herdr
77
77
  by the explicit pane ID. Pane metadata includes the agent live `name` when known.
78
+ Clients should likewise require `workspace.close`, `tab.close` or `pane.close`
79
+ before offering to delete a space, tab or pane. Each takes only the matching
80
+ explicit ID and closes it in Herdr, ending whatever runs there.
78
81
  Older connectors omit `actions` and keep their existing environment controls.
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "$defs": {
14
14
  "environmentControlArgs": {
15
- "description": "Owner-only actions (on unless the machine turns them off); 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.",
15
+ "description": "Owner-only actions (on unless the machine turns them off); no native args, shell, implicit targets, agent stop or env overrides; close actions remove the explicitly named space, tab or pane. cwd must be an absolute path on the remote machine. See README for supported agent kinds.",
16
16
  "oneOf": [
17
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}$"}}},
18
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}}},
@@ -24,7 +24,10 @@
24
24
  {"type": "object", "required": ["action", "idempotencyKey", "tabId"], "additionalProperties": false, "properties": {"action": {"const": "tab.focus"}, "idempotencyKey": {"type": "string", "minLength": 16, "maxLength": 256}, "tabId": {"type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[A-Za-z0-9][A-Za-z0-9:_-]{0,255}$"}}},
25
25
  {"type": "object", "required": ["action", "idempotencyKey", "tabId", "label"], "additionalProperties": false, "properties": {"action": {"const": "tab.rename"}, "idempotencyKey": {"type": "string", "minLength": 16, "maxLength": 256}, "tabId": {"type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[A-Za-z0-9][A-Za-z0-9:_-]{0,255}$"}, "label": {"type": "string", "minLength": 1, "maxLength": 128}}},
26
26
  {"type": "object", "required": ["action", "idempotencyKey", "paneId"], "additionalProperties": false, "properties": {"action": {"const": "pane.focus"}, "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}$"}}},
27
- {"type": "object", "required": ["action", "idempotencyKey", "paneId", "label"], "additionalProperties": false, "properties": {"action": {"const": "pane.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}$"}, "label": {"type": "string", "minLength": 1, "maxLength": 128}}}
27
+ {"type": "object", "required": ["action", "idempotencyKey", "paneId", "label"], "additionalProperties": false, "properties": {"action": {"const": "pane.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}$"}, "label": {"type": "string", "minLength": 1, "maxLength": 128}}},
28
+ {"type": "object", "required": ["action", "idempotencyKey", "workspaceId"], "additionalProperties": false, "properties": {"action": {"const": "workspace.close"}, "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}$"}}},
29
+ {"type": "object", "required": ["action", "idempotencyKey", "tabId"], "additionalProperties": false, "properties": {"action": {"const": "tab.close"}, "idempotencyKey": {"type": "string", "minLength": 16, "maxLength": 256}, "tabId": {"type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[A-Za-z0-9][A-Za-z0-9:_-]{0,255}$"}}},
30
+ {"type": "object", "required": ["action", "idempotencyKey", "paneId"], "additionalProperties": false, "properties": {"action": {"const": "pane.close"}, "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}$"}}}
28
31
  ]
29
32
  },
30
33
  "agentStatus": { "enum": ["idle", "working", "blocked", "done", "unknown"] },
@@ -109,8 +109,10 @@ with `get_request_status`, then `agent.start` in its `result.rootPane.paneId`
109
109
  (`pane_id`, `name`, `kind`). Next call `list_agents` for a PeerBand agent ID and
110
110
  `send_agent_message` for its task. Other supported actions create workspaces,
111
111
  split panes, and rename or focus workspaces/tabs/panes. Creation preserves focus.
112
+ `workspace.close`, `tab.close` and `pane.close` end everything running there:
113
+ use them only when the owner explicitly asks to close that exact item.
112
114
 
113
115
  Each control needs a fresh random idempotency key; reuse that key for retries of
114
116
  the identical operation. Inspect receipts before continuing a dependent action.
115
117
  `delivery_unknown` requires inspection, never an automatic retry with a new key.
116
- No shell, raw keys, agent flags, stop/close or permission approvals are exposed.
118
+ No shell, raw keys, agent flags or permission approvals are exposed.