peerband 0.2.5 → 0.2.7

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,8 @@ 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 |
322
+ | `pane.send_input` | `pane_id`, `text`: one line typed into that pane, followed by Enter. In a shell this runs a command |
321
323
 
322
324
  `cwd` is an absolute path on the remote machine. Creation preserves the local
323
325
  user's focus. Start an agent only in an idle shell pane; Herdr checks whether the
package/dist/peerband.mjs CHANGED
@@ -11714,12 +11714,16 @@ 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",
11726
+ "pane.send_input",
11723
11727
  "agent.start",
11724
11728
  "agent.rename"
11725
11729
  ];
@@ -11727,12 +11731,16 @@ var FIELDS = {
11727
11731
  "workspace.create": ["cwd", "label"],
11728
11732
  "workspace.rename": ["workspaceId", "label"],
11729
11733
  "workspace.focus": ["workspaceId"],
11734
+ "workspace.close": ["workspaceId"],
11730
11735
  "tab.create": ["workspaceId", "cwd", "label"],
11731
11736
  "tab.rename": ["tabId", "label"],
11732
11737
  "tab.focus": ["tabId"],
11738
+ "tab.close": ["tabId"],
11733
11739
  "pane.split": ["paneId", "direction", "cwd"],
11734
11740
  "pane.rename": ["paneId", "label"],
11735
11741
  "pane.focus": ["paneId"],
11742
+ "pane.close": ["paneId"],
11743
+ "pane.send_input": ["paneId", "text"],
11736
11744
  "agent.start": ["paneId", "name", "kind"],
11737
11745
  "agent.rename": ["paneId", "name"]
11738
11746
  };
@@ -11740,18 +11748,22 @@ var REQUIRED = {
11740
11748
  "workspace.create": ["cwd"],
11741
11749
  "workspace.rename": ["workspaceId", "label"],
11742
11750
  "workspace.focus": ["workspaceId"],
11751
+ "workspace.close": ["workspaceId"],
11743
11752
  "tab.create": ["workspaceId", "cwd"],
11744
11753
  "tab.rename": ["tabId", "label"],
11745
11754
  "tab.focus": ["tabId"],
11755
+ "tab.close": ["tabId"],
11746
11756
  "pane.split": ["paneId", "direction", "cwd"],
11747
11757
  "pane.rename": ["paneId", "label"],
11748
11758
  "pane.focus": ["paneId"],
11759
+ "pane.close": ["paneId"],
11760
+ "pane.send_input": ["paneId", "text"],
11749
11761
  "agent.start": ["paneId", "name", "kind"],
11750
11762
  "agent.rename": ["paneId", "name"]
11751
11763
  };
11752
11764
  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(" "));
11753
11765
  function invalid(message) {
11754
- throw new ConnectError("invalid_argument", message, "Use an action and explicit IDs from list_environment; no shell commands or native agent arguments are accepted.");
11766
+ throw new ConnectError("invalid_argument", message, "Use an action and explicit IDs from list_environment; native agent arguments are not accepted.");
11755
11767
  }
11756
11768
  function environmentCommand(args) {
11757
11769
  const action = args.action;
@@ -11759,7 +11771,7 @@ function environmentCommand(args) {
11759
11771
  for (const key of Object.keys(args)) {
11760
11772
  if (key !== "action" && !FIELDS[action].includes(key)) invalid(`Unexpected argument: ${key}.`);
11761
11773
  const value = args[key];
11762
- const max = key === "cwd" ? 2048 : key === "label" ? 128 : 256;
11774
+ const max = key === "cwd" ? 2048 : key === "text" ? 4096 : key === "label" ? 128 : 256;
11763
11775
  if (typeof value !== "string" || !value.trim() || value.length > max || /[\u0000-\u001f\u007f-\u009f]/.test(value)) invalid(`Invalid ${key}.`);
11764
11776
  if (key.endsWith("Id") && !/^[A-Za-z0-9][A-Za-z0-9:_-]{0,255}$/.test(value)) invalid(`Invalid ${key}.`);
11765
11777
  }
@@ -12019,6 +12031,8 @@ var ConnectorCore = class {
12019
12031
  return await this.adapter.listEnvironment();
12020
12032
  case "control_environment":
12021
12033
  return await this.controlEnvironment(args, principal);
12034
+ case "read_pane":
12035
+ return await this.readPane(args, principal);
12022
12036
  case "list_agents":
12023
12037
  return await this.listAgents(args, principal);
12024
12038
  case "get_agent_status":
@@ -12116,6 +12130,20 @@ var ConnectorCore = class {
12116
12130
  const safe = sanitizeOutput(result.text, options);
12117
12131
  return { ...safe, ...result.source === "visible" ? { source: result.source } : {}, observedAt: result.observedAt, truncated: safe.truncated || result.truncated, ...result.nextCursor ? { nextCursor: result.nextCursor } : {} };
12118
12132
  }
12133
+ /** Owner-only read of any pane in the layout, so plain shells can be followed like agents. */
12134
+ async readPane(args, principal) {
12135
+ assertKeys(args, ["paneId", "lines", "bytes"]);
12136
+ this.authorizeEnvironment(principal);
12137
+ if (typeof args.paneId !== "string" || !/^[A-Za-z0-9][A-Za-z0-9:_-]{0,255}$/.test(args.paneId)) throw new ConnectError("invalid_argument", "paneId is required.", "Use a pane ID returned by list_environment.");
12138
+ if (!this.adapter.readPane) throw new ConnectError("unsupported_capability", "This runtime cannot read panes.", "Use a compatible Herdr runtime.");
12139
+ const options = {
12140
+ lines: safeInteger(args.lines, 100, 1, MAX_OUTPUT_LINES, "lines"),
12141
+ bytes: safeInteger(args.bytes, 8 * 1024, 1, MAX_OUTPUT_BYTES, "bytes")
12142
+ };
12143
+ const result = await this.adapter.readPane(args.paneId, options);
12144
+ const safe = sanitizeOutput(result.text, options);
12145
+ return { ...safe, observedAt: result.observedAt, truncated: safe.truncated || result.truncated };
12146
+ }
12119
12147
  async sendMessage(args, principal) {
12120
12148
  assertKeys(args, ["agentId", "message", "idempotencyKey"]);
12121
12149
  if (!this.writesEnabled) throw new ConnectError("write_disabled", "Message sending is disabled.", 'This machine is read-only. To allow messages, remove --read-only or set "enableWrites": true in connector.json on that machine.');
@@ -12897,14 +12925,17 @@ async function runRemoteClient(core, credentials, options = {}) {
12897
12925
  if (socket.readyState !== wrapper_default.OPEN) reject(error);
12898
12926
  });
12899
12927
  socket.once("unexpected-response", (_request, response) => {
12900
- if (response.statusCode === 401 || response.statusCode === 403) {
12928
+ const code = response.statusCode ?? 0;
12929
+ response.resume();
12930
+ if (code === 401 || code === 403) {
12901
12931
  stopped = true;
12902
12932
  setConnectionState("revoked");
12903
12933
  status(
12904
- `remote authentication was rejected (${response.statusCode}); re-enroll this installation if it was revoked.`
12934
+ `remote authentication was rejected (${code}); re-enroll this installation if it was revoked.`
12905
12935
  );
12906
12936
  }
12907
- response.resume();
12937
+ reject(new Error(`the server answered HTTP ${code || "error"} instead of connecting`));
12938
+ socket.terminate();
12908
12939
  });
12909
12940
  socket.once("close", (code, reason) => {
12910
12941
  if (heartbeatTimer) clearInterval(heartbeatTimer);
@@ -12921,7 +12952,7 @@ async function runRemoteClient(core, credentials, options = {}) {
12921
12952
  });
12922
12953
  });
12923
12954
  } catch (error) {
12924
- setConnectionState("remote-unavailable");
12955
+ if (!stopped) setConnectionState("remote-unavailable");
12925
12956
  status(`remote connection failed: ${error.message}`);
12926
12957
  }
12927
12958
  if (stopped) break;
@@ -14340,6 +14371,7 @@ function environmentParams(input) {
14340
14371
  delete params.pane_id;
14341
14372
  }
14342
14373
  if (command.action === "agent.start") params.timeout_ms = 8e3;
14374
+ if (command.action === "pane.send_input") params.keys = ["Enter"];
14343
14375
  return params;
14344
14376
  }
14345
14377
 
@@ -15056,6 +15088,14 @@ var HerdrAdapter = class {
15056
15088
  await this.getAgent(id);
15057
15089
  return { ...output, ...visibleOnly ? { source: "visible" } : {}, truncated: visibleOnly || output.truncated || result.read.truncated === true, observedAt: (/* @__PURE__ */ new Date()).toISOString(), untrusted: true };
15058
15090
  }
15091
+ async readPane(paneId, options = {}) {
15092
+ const lines = clampInteger(options.lines, 80, 1, 500);
15093
+ const { client } = await this.initialize();
15094
+ const result = asObject(await client.request("pane.read", { pane_id: paneId, source: "recent", format: "text", lines, strip_ansi: true }));
15095
+ if (result.type !== "pane_read" || !result.read || typeof result.read !== "object" || typeof result.read.text !== "string") throw this.schemaMismatch("pane.read returned an unexpected result type");
15096
+ const output = sanitizeOutput(result.read.text, { ...options, lines, bytes: clampInteger(options.bytes, 16384, 1, 32768) });
15097
+ return { ...output, truncated: output.truncated || result.read.truncated === true, observedAt: (/* @__PURE__ */ new Date()).toISOString(), untrusted: true };
15098
+ }
15059
15099
  async sendMessage(id, message) {
15060
15100
  if (typeof message !== "string" || message.length === 0 || Buffer.byteLength(message, "utf8") > 16384) {
15061
15101
  throw new ConnectError("invalid_argument", "Message must contain 1 to 16384 UTF-8 bytes.", "Shorten the message and try again.");
@@ -15085,6 +15125,10 @@ var HerdrAdapter = class {
15085
15125
  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
15126
  const result = asObject(await client.request(command.action, params));
15087
15127
  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;
15128
+ if (command.action.endsWith(".close")) {
15129
+ if (!["ok", "workspace_closed", "tab_closed", "pane_closed"].includes(result.type)) throw this.schemaMismatch(`${command.action} returned an unexpected result type`);
15130
+ return environmentMetadata(result);
15131
+ }
15088
15132
  if (expected && result.type !== expected) throw this.schemaMismatch(`${command.action} returned an unexpected result type`);
15089
15133
  if (!expected && !["workspace_info", "tab_info", "pane_info", "ok"].includes(result.type)) throw this.schemaMismatch(`${command.action} returned an unexpected result type`);
15090
15134
  return environmentMetadata(result);
@@ -17133,7 +17177,7 @@ function herdrGroupHelp(s) {
17133
17177
  }
17134
17178
 
17135
17179
  // src/cli/cli.ts
17136
- var VERSION = true ? "0.2.5" : "0.0.0-dev";
17180
+ var VERSION = true ? "0.2.7" : "0.0.0-dev";
17137
17181
  function createContext(overrides = {}) {
17138
17182
  const env = overrides.env ?? process.env;
17139
17183
  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.7"
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.7",
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,18 @@ 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.
81
+ Clients should require `pane.send_input` before offering to type into a pane. It
82
+ takes `{paneId, text, idempotencyKey}`: one line of at most 4096 characters with
83
+ no control characters, which the connector types into that pane followed by Enter.
84
+ In a plain shell this runs a command, so servers should expose it only where the
85
+ owner types it themselves (the dashboard), not to remote agents by default.
86
+
87
+ `read_pane` takes `{paneId, lines?, bytes?}` and returns the pane's recent text in
88
+ the same shape as `get_agent_output` (`text`, `truncated`, `observedAt`,
89
+ `untrusted`), for any pane in the layout, agents and plain shells alike. It needs
90
+ the same owner role, scope and local opt-in as the other environment tools.
91
+ Connectors without it answer `unsupported_capability`.
78
92
  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, implicit targets, agent stop or env overrides; close actions remove the explicitly named space, tab or pane; pane.send_input types one line into the named pane and presses Enter. 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,11 @@
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}$"}}},
31
+ {"type": "object", "required": ["action", "idempotencyKey", "paneId", "text"], "additionalProperties": false, "properties": {"action": {"const": "pane.send_input"}, "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}$"}, "text": {"type": "string", "minLength": 1, "maxLength": 4096, "description": "One line, no control characters. The connector types it into the pane and presses Enter."}}}
28
32
  ]
29
33
  },
30
34
  "agentStatus": { "enum": ["idle", "working", "blocked", "done", "unknown"] },
@@ -93,17 +97,17 @@
93
97
  },
94
98
  "request": {
95
99
  "title": "server -> client: tool request",
96
- "allOf": [{"if": {"properties": {"tool": {"const": "control_environment"}}}, "then": {"properties": {"args": {"$ref": "#/$defs/environmentControlArgs"}}}}, {"if": {"properties": {"tool": {"const": "list_environment"}}}, "then": {"properties": {"args": {"type": "object", "maxProperties": 0}}}}],
100
+ "allOf": [{"if": {"properties": {"tool": {"const": "control_environment"}}}, "then": {"properties": {"args": {"$ref": "#/$defs/environmentControlArgs"}}}}, {"if": {"properties": {"tool": {"const": "list_environment"}}}, "then": {"properties": {"args": {"type": "object", "maxProperties": 0}}}}, {"if": {"properties": {"tool": {"const": "read_pane"}}}, "then": {"properties": {"args": {"type": "object", "required": ["paneId"], "additionalProperties": false, "properties": {"paneId": {"type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[A-Za-z0-9][A-Za-z0-9:_-]{0,255}$"}, "lines": {"type": "integer", "minimum": 1}, "bytes": {"type": "integer", "minimum": 1}}}}}}],
97
101
  "description": "At most 32 outstanding per connection; the client answers within 15 seconds. Requests are never replayed.",
98
102
  "type": "object",
99
103
  "required": ["type", "id", "tool", "args", "principal"],
100
104
  "properties": {
101
105
  "type": { "const": "request" },
102
106
  "id": { "type": "string", "minLength": 1, "maxLength": 256 },
103
- "tool": { "enum": ["list_agents", "get_agent_status", "get_agent_output", "get_request_status", "send_agent_message", "list_environment", "control_environment"] },
107
+ "tool": { "enum": ["list_agents", "get_agent_status", "get_agent_output", "get_request_status", "send_agent_message", "list_environment", "control_environment", "read_pane"] },
104
108
  "args": {
105
109
  "type": "object",
106
- "description": "camelCase arguments: list_agents {machine, workspace, status, cursor, limit}; get_agent_status {agentId}; get_agent_output {agentId, lines, bytes, cursor}; send_agent_message {agentId, message, idempotencyKey}; get_request_status {requestId}; list_environment {}; control_environment {action, idempotencyKey, workspaceId?, tabId?, paneId?, cwd?, label?, direction?, name?, kind?}. Environment tools require the environment-control upgrade feature, owner role and environment:control scope."
110
+ "description": "camelCase arguments: list_agents {machine, workspace, status, cursor, limit}; get_agent_status {agentId}; get_agent_output {agentId, lines, bytes, cursor}; send_agent_message {agentId, message, idempotencyKey}; get_request_status {requestId}; list_environment {}; control_environment {action, idempotencyKey, workspaceId?, tabId?, paneId?, cwd?, label?, direction?, name?, kind?, text?}; read_pane {paneId, lines?, bytes?}. Environment tools (including read_pane) require the environment-control upgrade feature, owner role and environment:control scope."
107
111
  },
108
112
  "principal": {
109
113
  "type": "object",
@@ -109,8 +109,12 @@ 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.
114
+ `pane.send_input` types a line into a pane and presses Enter; in a shell that runs
115
+ a command. Use it only for a command the owner gave you for that exact pane.
112
116
 
113
117
  Each control needs a fresh random idempotency key; reuse that key for retries of
114
118
  the identical operation. Inspect receipts before continuing a dependent action.
115
119
  `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.
120
+ No shell, raw keys, agent flags or permission approvals are exposed.