relay-claude-channel 0.3.4 → 0.3.5

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.
@@ -8,7 +8,7 @@
8
8
  "plugins": [
9
9
  {
10
10
  "name": "relay",
11
- "version": "0.3.4",
11
+ "version": "0.3.5",
12
12
  "source": "./plugin",
13
13
  "description": "Send and receive Relay messages from Claude Code. Nothing is lost if a reply is sent twice.",
14
14
  "category": "productivity",
@@ -3,7 +3,7 @@
3
3
  "name": "relay",
4
4
  "displayName": "Relay Messenger",
5
5
  "description": "Relay Messenger channel for Claude Code with durable acknowledged delivery, explicit Read receipts, and retry-safe replies.",
6
- "version": "0.3.4",
6
+ "version": "0.3.5",
7
7
  "author": {
8
8
  "name": "Relay Messenger",
9
9
  "url": "https://relayapp.im"
@@ -36,8 +36,8 @@
36
36
  "allowed_senders": {
37
37
  "type": "string",
38
38
  "title": "Allowed Relay senders",
39
- "description": "Comma-separated Relay Contact UUIDs or exact Handles allowed to inject messages.",
40
- "required": true
39
+ "description": "Optional. Leave empty and anyone can message this agent. To allow only some people, list their handles separated by commas.",
40
+ "required": false
41
41
  },
42
42
  "base_url": {
43
43
  "type": "string",
@@ -8,9 +8,10 @@ print an Agent Token in chat.
8
8
 
9
9
  1. Prefer Claude Code plugin user configuration. Ask the user to open `/plugin`,
10
10
  select `relay@relay-messenger`, and enable/configure it. Claude Code stores
11
- the `agent_token` sensitive value in secure credential storage. They must
12
- also set `allowed_senders` to comma-separated exact Relay Contact UUIDs or
13
- Handles. Do not ask them to tell you either value.
11
+ the `agent_token` sensitive value in secure credential storage.
12
+ `allowed_senders` is optional: left empty, anyone can message this agent;
13
+ to allow only some people, they list those handles separated by commas.
14
+ Do not ask them to tell you either value.
14
15
 
15
16
  2. If plugin user configuration is unavailable, tell the user to create the
16
17
  platform equivalent of `~/.claude/channels/relay/.env` themselves with
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relay-claude-channel",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "Relay Messenger channel for Claude Code over Relay v1 WebSocket delivery.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -3,7 +3,7 @@
3
3
  "name": "relay",
4
4
  "displayName": "Relay Messenger",
5
5
  "description": "Relay Messenger channel for Claude Code with durable acknowledged delivery, explicit Read receipts, and retry-safe replies.",
6
- "version": "0.3.4",
6
+ "version": "0.3.5",
7
7
  "author": {
8
8
  "name": "Relay Messenger",
9
9
  "url": "https://relayapp.im"
@@ -36,8 +36,8 @@
36
36
  "allowed_senders": {
37
37
  "type": "string",
38
38
  "title": "Allowed Relay senders",
39
- "description": "Comma-separated Relay Contact UUIDs or exact Handles allowed to inject messages.",
40
- "required": true
39
+ "description": "Optional. Leave empty and anyone can message this agent. To allow only some people, list their handles separated by commas.",
40
+ "required": false
41
41
  },
42
42
  "base_url": {
43
43
  "type": "string",
@@ -8,9 +8,10 @@ print an Agent Token in chat.
8
8
 
9
9
  1. Prefer Claude Code plugin user configuration. Ask the user to open `/plugin`,
10
10
  select `relay@relay-messenger`, and enable/configure it. Claude Code stores
11
- the `agent_token` sensitive value in secure credential storage. They must
12
- also set `allowed_senders` to comma-separated exact Relay Contact UUIDs or
13
- Handles. Do not ask them to tell you either value.
11
+ the `agent_token` sensitive value in secure credential storage.
12
+ `allowed_senders` is optional: left empty, anyone can message this agent;
13
+ to allow only some people, they list those handles separated by commas.
14
+ Do not ask them to tell you either value.
14
15
 
15
16
  2. If plugin user configuration is unavailable, tell the user to create the
16
17
  platform equivalent of `~/.claude/channels/relay/.env` themselves with
@@ -22416,7 +22416,7 @@ function parseEnvFile(contents) {
22416
22416
  function parseAllowedSenders(value) {
22417
22417
  const configured = [...new Set(value.split(",").map((entry) => entry.trim()).filter(Boolean))];
22418
22418
  if (configured.length === 0) {
22419
- throw new Error("RELAY_ALLOWED_SENDERS must contain at least one Relay Contact UUID or exact Handle");
22419
+ return { ids: /* @__PURE__ */ new Set(), handles: /* @__PURE__ */ new Set(), configured, everyone: true };
22420
22420
  }
22421
22421
  if (configured.length > 64) {
22422
22422
  throw new Error("RELAY_ALLOWED_SENDERS accepts at most 64 entries");
@@ -22430,10 +22430,12 @@ function parseAllowedSenders(value) {
22430
22430
  if (UUID_PATTERN.test(sender)) ids.add(sender.toLowerCase());
22431
22431
  else handles.add(sender);
22432
22432
  }
22433
- return { ids, handles, configured };
22433
+ return { ids, handles, configured, everyone: false };
22434
22434
  }
22435
22435
  function senderIsAllowed(allowed, sender) {
22436
- return (sender.kind === "user" || sender.kind === "agent") && (allowed.ids.has(sender.id.toLowerCase()) || allowed.handles.has(sender.handle));
22436
+ if (sender.kind !== "user" && sender.kind !== "agent") return false;
22437
+ if (allowed.everyone) return true;
22438
+ return allowed.ids.has(sender.id.toLowerCase()) || allowed.handles.has(sender.handle);
22437
22439
  }
22438
22440
  function defaultChannelDir(env = process.env) {
22439
22441
  const configured = actualValue(env.RELAY_CHANNEL_DIR);
@@ -23850,7 +23852,7 @@ var RelayStateStore = class {
23850
23852
  };
23851
23853
 
23852
23854
  // server.ts
23853
- var VERSION = true ? "0.3.4" : createRequire(import.meta.url)("./package.json").version;
23855
+ var VERSION = true ? "0.3.5" : createRequire(import.meta.url)("./package.json").version;
23854
23856
  if (process.argv.includes("--version")) {
23855
23857
  process.stdout.write(`${VERSION}
23856
23858
  `);
@@ -23879,7 +23881,7 @@ if (process.argv.includes("--check")) {
23879
23881
  );
23880
23882
  }
23881
23883
  process.stdout.write(
23882
- `Relay channel configuration valid: token accepted, ${config2.allowedSenders.configured.length} allowed sender(s), no saved Webhook subscriptions.
23884
+ `Relay channel configuration valid: token accepted, ${config2.allowedSenders.everyone ? "anyone can message this agent" : `${config2.allowedSenders.configured.length} allowed sender(s)`}, no saved Webhook subscriptions.
23883
23885
  `
23884
23886
  );
23885
23887
  process.exit(0);
@@ -22416,7 +22416,7 @@ function parseEnvFile(contents) {
22416
22416
  function parseAllowedSenders(value) {
22417
22417
  const configured = [...new Set(value.split(",").map((entry) => entry.trim()).filter(Boolean))];
22418
22418
  if (configured.length === 0) {
22419
- throw new Error("RELAY_ALLOWED_SENDERS must contain at least one Relay Contact UUID or exact Handle");
22419
+ return { ids: /* @__PURE__ */ new Set(), handles: /* @__PURE__ */ new Set(), configured, everyone: true };
22420
22420
  }
22421
22421
  if (configured.length > 64) {
22422
22422
  throw new Error("RELAY_ALLOWED_SENDERS accepts at most 64 entries");
@@ -22430,10 +22430,12 @@ function parseAllowedSenders(value) {
22430
22430
  if (UUID_PATTERN.test(sender)) ids.add(sender.toLowerCase());
22431
22431
  else handles.add(sender);
22432
22432
  }
22433
- return { ids, handles, configured };
22433
+ return { ids, handles, configured, everyone: false };
22434
22434
  }
22435
22435
  function senderIsAllowed(allowed, sender) {
22436
- return (sender.kind === "user" || sender.kind === "agent") && (allowed.ids.has(sender.id.toLowerCase()) || allowed.handles.has(sender.handle));
22436
+ if (sender.kind !== "user" && sender.kind !== "agent") return false;
22437
+ if (allowed.everyone) return true;
22438
+ return allowed.ids.has(sender.id.toLowerCase()) || allowed.handles.has(sender.handle);
22437
22439
  }
22438
22440
  function defaultChannelDir(env = process.env) {
22439
22441
  const configured = actualValue(env.RELAY_CHANNEL_DIR);
@@ -23850,7 +23852,7 @@ var RelayStateStore = class {
23850
23852
  };
23851
23853
 
23852
23854
  // server.ts
23853
- var VERSION = true ? "0.3.4" : createRequire(import.meta.url)("./package.json").version;
23855
+ var VERSION = true ? "0.3.5" : createRequire(import.meta.url)("./package.json").version;
23854
23856
  if (process.argv.includes("--version")) {
23855
23857
  process.stdout.write(`${VERSION}
23856
23858
  `);
@@ -23879,7 +23881,7 @@ if (process.argv.includes("--check")) {
23879
23881
  );
23880
23882
  }
23881
23883
  process.stdout.write(
23882
- `Relay channel configuration valid: token accepted, ${config2.allowedSenders.configured.length} allowed sender(s), no saved Webhook subscriptions.
23884
+ `Relay channel configuration valid: token accepted, ${config2.allowedSenders.everyone ? "anyone can message this agent" : `${config2.allowedSenders.configured.length} allowed sender(s)`}, no saved Webhook subscriptions.
23883
23885
  `
23884
23886
  );
23885
23887
  process.exit(0);