@claw-link/gateway-host 0.4.1 → 0.4.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claw-link/gateway-host",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "ClawLink Host Gateway — a secure, outbound-only worker that bridges a local agent CLI (OpenClaw, Hermes, Claude, Codex, Cursor) to your ClawLink agents. No inbound ports; authenticated per-agent by a Host Token.",
5
5
  "homepage": "https://claw-link.co",
6
6
  "bin": {
@@ -29,5 +29,8 @@ module.exports = makeCliAdapter({
29
29
  ? (profile === 'trusted'
30
30
  ? ['--permission-mode', 'bypassPermissions']
31
31
  : ['--permission-mode', 'acceptEdits'])
32
- : ['--disallowedTools', 'Write Edit MultiEdit NotebookEdit Bash'],
32
+ // Read-only (customer) turns: deny every write/exec tool. NOTE: each name must be a tool the
33
+ // installed CLI knows — an unknown name (e.g. the removed `MultiEdit`) makes the CLI reject the
34
+ // WHOLE run ("deny rule matches no known tool"), which broke every read-only turn on CLI ≥ 2.1.x.
35
+ : ['--disallowedTools', 'Write Edit NotebookEdit Bash'],
33
36
  });
@@ -179,9 +179,14 @@ function makeCliAdapter(cfg) {
179
179
  // Harness nodes do collaborative work (write code/files, run commands), so they get
180
180
  // workspace-write like an admin "configure" turn — even though they're carried on the
181
181
  // 'customer' scope. Real customer chats stay read-only.
182
- const writable = !!job.harness || job.scope === 'configure' || job.scope === 'sub_configure';
183
- // 'trusted' profile only ever applies to WRITABLE turns (harness/configure) customer
184
- // chats stay read-only regardless, so a public conversation can never run shell commands.
182
+ // A validated OWNER testing their OWN agent (chat tags the job config_type='admin_writable' only
183
+ // for an authenticated admin_test) is WRITABLE tooso tool-agents can run their pipeline from
184
+ // the test chat. Double-gated: this branch requires the agent to be `trusted`, so a real/anon
185
+ // customer chat can NEVER become writable (they can't set the tag AND aren't trusted).
186
+ const adminWritable = job.config_type === 'admin_writable' && (agent.permission_profile || null) === 'trusted';
187
+ const writable = !!job.harness || job.scope === 'configure' || job.scope === 'sub_configure' || adminWritable;
188
+ // 'trusted' profile only ever applies to WRITABLE turns (harness/configure/owner-admin) — real
189
+ // customer chats stay read-only regardless, so a public conversation can never run shell commands.
185
190
  const permArgs = (!Array.isArray(agent.args_template) && cfg.permissions)
186
191
  ? cfg.permissions(writable ? 'configure' : (job.scope || 'customer'), agent.permission_profile || null)
187
192
  : [];