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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +3 -3
- package/commands/configure.md +4 -3
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +3 -3
- package/plugin/commands/configure.md +4 -3
- package/plugin/runtime/server.mjs +7 -5
- package/runtime/server.mjs +7 -5
|
@@ -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.
|
|
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": "
|
|
40
|
-
"required":
|
|
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",
|
package/commands/configure.md
CHANGED
|
@@ -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.
|
|
12
|
-
|
|
13
|
-
|
|
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
|
@@ -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.
|
|
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": "
|
|
40
|
-
"required":
|
|
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.
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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);
|
package/runtime/server.mjs
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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.
|
|
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);
|