@relaymessenger/cli 0.3.0 → 0.3.2
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 +5 -5
- package/claude-plugin/marketplace/plugins/relay/.claude-plugin/plugin.json +13 -4
- package/claude-plugin/marketplace/plugins/relay/runtime/server.mjs +117 -27
- package/dist/api.d.ts +40 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +33 -4
- package/dist/api.js.map +1 -1
- package/dist/claude-settings.js +1 -1
- package/dist/claude-settings.js.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/codex.js +5 -5
- package/dist/codex.js.map +1 -1
- package/dist/doctor.js +6 -6
- package/dist/doctor.js.map +1 -1
- package/dist/engine/acp.d.ts +6 -1
- package/dist/engine/acp.d.ts.map +1 -1
- package/dist/engine/acp.js +16 -5
- package/dist/engine/acp.js.map +1 -1
- package/dist/engine/catalog.d.ts.map +1 -1
- package/dist/install.d.ts +1 -1
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +5 -2
- package/dist/install.js.map +1 -1
- package/dist/mcp.js +1 -1
- package/dist/mcp.js.map +1 -1
- package/dist/permissions.d.ts +6 -0
- package/dist/permissions.d.ts.map +1 -1
- package/dist/permissions.js +20 -1
- package/dist/permissions.js.map +1 -1
- package/dist/receive.d.ts +51 -2
- package/dist/receive.d.ts.map +1 -1
- package/dist/receive.js +206 -15
- package/dist/receive.js.map +1 -1
- package/dist/store.d.ts +6 -0
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +1 -0
- package/dist/store.js.map +1 -1
- package/openclaw-plugin/relaymessenger-openclaw-plugin-0.1.0.tgz +0 -0
- package/package.json +12 -8
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ machine. It also installs native Relay channels for Claude Code and OpenClaw.
|
|
|
6
6
|
Texts become prompts, replies come back as messages, and tool approvals arrive
|
|
7
7
|
as Allow/Deny cards you answer with a tap.
|
|
8
8
|
|
|
9
|
-
Relay is
|
|
9
|
+
Relay is the messenger for AI agents: https://relayapp.im. API reference:
|
|
10
10
|
https://docs.relayapp.im.
|
|
11
11
|
|
|
12
12
|
## Quickstart
|
|
@@ -32,14 +32,14 @@ the engine works and posts one finalized reply per turn.
|
|
|
32
32
|
| --- | --- |
|
|
33
33
|
| `relaymessenger pair` | `POST /v1/pairings`, shows a terminal QR + code, long-polls until you claim it in the app, stores the Agent Token in `~/.relaymessenger/config.json` (chmod 600) and pins your user id as the bridge owner (from `GET /v1/agents/me`; override with `RELAY_OWNER_USER_ID`). If owner lookup is interrupted after the token is saved, running the command again resumes that saved token without creating another agent. The token never appears on the phone. |
|
|
34
34
|
| `relaymessenger start` | Receive loop: long-polls `GET /v1/events`, drives the engine over ACP, replies via `POST /v1/messages` with an `Idempotency-Key`. Flags: `--engine claude\|codex\|hermes`, `--dir <path>`. Claude and Codex adapters are bundled; Hermes must already be installed and pass `hermes acp --check`. |
|
|
35
|
-
| `relaymessenger install-codex` | Run from a project root to opt in that project only. Merges
|
|
35
|
+
| `relaymessenger install-codex` | Run from a project root to opt in that project only. Merges, never clobbers, `[mcp_servers.relay]` + `notify` into `~/.codex/config.toml` (comments preserved; a `.bak` of the original is kept) and a `PermissionRequest` hook into `~/.codex/hooks.json`. Other projects are suppressed until installed separately. Codex gates untrusted hook handlers: the first run may ask you to trust the relaymessenger handler. |
|
|
36
36
|
| `relaymessenger install-claude` | After pairing, strictly validates the Claude plugin bundled in the installed npm package, persists its local marketplace under the paired account's private runtime directory, installs `relay@relaymessenger-bundled`, and writes the token/API origin/owner pin to `~/.claude/channels/relay/.env` with mode 600 without printing the token. It refuses to overwrite a different configured identity. |
|
|
37
|
-
| `relaymessenger install-openclaw` | After pairing, persists
|
|
37
|
+
| `relaymessenger install-openclaw` | After pairing, persists the OpenClaw plugin archive bundled in the npm package and installs it through OpenClaw's managed `npm-pack:` path, adds only Relay's plugin/channel fields to `~/.openclaw/openclaw.json`, and writes the paired token to an owner-only file. Existing unrelated config is preserved and a different configured identity is refused. |
|
|
38
38
|
| `relaymessenger doctor` | Checks Node, pairing, token file permissions, API reachability, installed adapter pins, and durable-state health. |
|
|
39
39
|
|
|
40
40
|
## How the wire works
|
|
41
41
|
|
|
42
|
-
Everything rides Relay's public agent API
|
|
42
|
+
Everything rides Relay's public agent API, the same surface you can drive
|
|
43
43
|
with curl:
|
|
44
44
|
|
|
45
45
|
```sh
|
|
@@ -111,7 +111,7 @@ curl -X POST https://api.relayapp.im/v1/messages \
|
|
|
111
111
|
- `RELAY_API_ORIGIN` points `pair`, `start`, and `doctor` at a
|
|
112
112
|
non-production Relay API origin, e.g. a local dev server:
|
|
113
113
|
`RELAY_API_ORIGIN=http://127.0.0.1:8787 relaymessenger pair`. This is a
|
|
114
|
-
development/testing mechanism only
|
|
114
|
+
development/testing mechanism only, production
|
|
115
115
|
(`https://api.relayapp.im`) stays the default, the value must be an
|
|
116
116
|
origin with no path/query/credentials, and plain HTTP is accepted only
|
|
117
117
|
for loopback hosts (same rule as every other origin the bridge uses).
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "relay",
|
|
3
|
-
"description": "Relay channel for Claude Code
|
|
3
|
+
"description": "Relay channel for Claude Code. Message your Claude Code session from your Relay agent conversation, with remote Allow/Deny permission relay. Run /relay:configure to set up.",
|
|
4
4
|
"version": "0.2.0",
|
|
5
|
-
"author": {
|
|
6
|
-
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Relay"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [
|
|
9
|
+
"relay",
|
|
10
|
+
"messaging",
|
|
11
|
+
"channel",
|
|
12
|
+
"mcp"
|
|
13
|
+
],
|
|
7
14
|
"mcpServers": {
|
|
8
15
|
"relay": {
|
|
9
16
|
"command": "node",
|
|
10
|
-
"args": [
|
|
17
|
+
"args": [
|
|
18
|
+
"${CLAUDE_PLUGIN_ROOT}/runtime/server.mjs"
|
|
19
|
+
]
|
|
11
20
|
}
|
|
12
21
|
},
|
|
13
22
|
"channels": [
|
|
@@ -6,7 +6,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
-
|
|
9
|
+
try {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
+
} catch (e) {
|
|
12
|
+
throw mod = 0, e;
|
|
13
|
+
}
|
|
10
14
|
};
|
|
11
15
|
var __export = (target, all) => {
|
|
12
16
|
for (var name in all)
|
|
@@ -3640,7 +3644,12 @@ var require_fast_uri = __commonJS({
|
|
|
3640
3644
|
}
|
|
3641
3645
|
function resolve(baseURI, relativeURI, options) {
|
|
3642
3646
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
3643
|
-
const
|
|
3647
|
+
const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
|
|
3648
|
+
const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
|
|
3649
|
+
if (baseMalformed || relativeMalformed) {
|
|
3650
|
+
throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
|
|
3651
|
+
}
|
|
3652
|
+
const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
|
|
3644
3653
|
schemelessOptions.skipEscape = true;
|
|
3645
3654
|
return serialize(resolved, schemelessOptions);
|
|
3646
3655
|
}
|
|
@@ -3765,6 +3774,8 @@ var require_fast_uri = __commonJS({
|
|
|
3765
3774
|
return uriTokens.join("");
|
|
3766
3775
|
}
|
|
3767
3776
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
3777
|
+
var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
|
|
3778
|
+
var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
|
|
3768
3779
|
function getParseError(parsed, matches) {
|
|
3769
3780
|
if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
|
|
3770
3781
|
return 'URI path must start with "/" when authority is present.';
|
|
@@ -3794,6 +3805,25 @@ var require_fast_uri = __commonJS({
|
|
|
3794
3805
|
uri = "//" + uri;
|
|
3795
3806
|
}
|
|
3796
3807
|
}
|
|
3808
|
+
const authorityMatch = uri.match(AUTHORITY_PREFIX);
|
|
3809
|
+
if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
|
|
3810
|
+
parsed.error = "URI authority must not contain a literal backslash.";
|
|
3811
|
+
malformedAuthorityOrPort = true;
|
|
3812
|
+
}
|
|
3813
|
+
const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
|
|
3814
|
+
if (introducerMatch !== null) {
|
|
3815
|
+
const region = introducerMatch[1];
|
|
3816
|
+
const normalizedRegion = region.replace(/[\t\n\r]/g, "");
|
|
3817
|
+
if (normalizedRegion.length >= 2) {
|
|
3818
|
+
if (normalizedRegion.slice(0, 2) !== "//") {
|
|
3819
|
+
parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
|
|
3820
|
+
malformedAuthorityOrPort = true;
|
|
3821
|
+
} else if (region.length !== normalizedRegion.length) {
|
|
3822
|
+
parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
|
|
3823
|
+
malformedAuthorityOrPort = true;
|
|
3824
|
+
}
|
|
3825
|
+
}
|
|
3826
|
+
}
|
|
3797
3827
|
const matches = uri.match(URI_PARSE);
|
|
3798
3828
|
if (matches) {
|
|
3799
3829
|
parsed.scheme = matches[1];
|
|
@@ -7224,7 +7254,7 @@ function $constructor(name, initializer3, params) {
|
|
|
7224
7254
|
Object.defineProperty(_, "name", { value: name });
|
|
7225
7255
|
return _;
|
|
7226
7256
|
}
|
|
7227
|
-
var $brand = Symbol("zod_brand");
|
|
7257
|
+
var $brand = /* @__PURE__ */ Symbol("zod_brand");
|
|
7228
7258
|
var $ZodAsyncError = class extends Error {
|
|
7229
7259
|
constructor() {
|
|
7230
7260
|
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
@@ -16967,8 +16997,8 @@ function yo_default() {
|
|
|
16967
16997
|
|
|
16968
16998
|
// ../../node_modules/zod/v4/core/registries.js
|
|
16969
16999
|
var _a2;
|
|
16970
|
-
var $output = Symbol("ZodOutput");
|
|
16971
|
-
var $input = Symbol("ZodInput");
|
|
17000
|
+
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
17001
|
+
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
16972
17002
|
var $ZodRegistry = class {
|
|
16973
17003
|
constructor() {
|
|
16974
17004
|
this._map = /* @__PURE__ */ new WeakMap();
|
|
@@ -22989,9 +23019,6 @@ function isTerminal(status) {
|
|
|
22989
23019
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
22990
23020
|
}
|
|
22991
23021
|
|
|
22992
|
-
// ../../node_modules/zod-to-json-schema/dist/esm/Options.js
|
|
22993
|
-
var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
|
|
22994
|
-
|
|
22995
23022
|
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
22996
23023
|
var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
|
|
22997
23024
|
|
|
@@ -24352,16 +24379,7 @@ var Server = class extends Protocol {
|
|
|
24352
24379
|
if (!methodSchema) {
|
|
24353
24380
|
throw new Error("Schema is missing a method literal");
|
|
24354
24381
|
}
|
|
24355
|
-
|
|
24356
|
-
if (isZ4Schema(methodSchema)) {
|
|
24357
|
-
const v4Schema = methodSchema;
|
|
24358
|
-
const v4Def = v4Schema._zod?.def;
|
|
24359
|
-
methodValue = v4Def?.value ?? v4Schema.value;
|
|
24360
|
-
} else {
|
|
24361
|
-
const v3Schema = methodSchema;
|
|
24362
|
-
const legacyDef = v3Schema._def;
|
|
24363
|
-
methodValue = legacyDef?.value ?? v3Schema.value;
|
|
24364
|
-
}
|
|
24382
|
+
const methodValue = getLiteralValue(methodSchema);
|
|
24365
24383
|
if (typeof methodValue !== "string") {
|
|
24366
24384
|
throw new Error("Schema method literal must be a string");
|
|
24367
24385
|
}
|
|
@@ -24670,8 +24688,17 @@ var Server = class extends Protocol {
|
|
|
24670
24688
|
import process3 from "node:process";
|
|
24671
24689
|
|
|
24672
24690
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
24691
|
+
var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
24673
24692
|
var ReadBuffer = class {
|
|
24693
|
+
constructor(options) {
|
|
24694
|
+
this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
|
|
24695
|
+
}
|
|
24674
24696
|
append(chunk) {
|
|
24697
|
+
const newSize = (this._buffer?.length ?? 0) + chunk.length;
|
|
24698
|
+
if (newSize > this._maxBufferSize) {
|
|
24699
|
+
this.clear();
|
|
24700
|
+
throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
|
|
24701
|
+
}
|
|
24675
24702
|
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
24676
24703
|
}
|
|
24677
24704
|
readMessage() {
|
|
@@ -24699,18 +24726,24 @@ function serializeMessage(message) {
|
|
|
24699
24726
|
|
|
24700
24727
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
24701
24728
|
var StdioServerTransport = class {
|
|
24702
|
-
constructor(_stdin = process3.stdin, _stdout = process3.stdout) {
|
|
24729
|
+
constructor(_stdin = process3.stdin, _stdout = process3.stdout, options) {
|
|
24703
24730
|
this._stdin = _stdin;
|
|
24704
24731
|
this._stdout = _stdout;
|
|
24705
|
-
this._readBuffer = new ReadBuffer();
|
|
24706
24732
|
this._started = false;
|
|
24707
24733
|
this._ondata = (chunk) => {
|
|
24708
|
-
|
|
24709
|
-
|
|
24734
|
+
try {
|
|
24735
|
+
this._readBuffer.append(chunk);
|
|
24736
|
+
this.processReadBuffer();
|
|
24737
|
+
} catch (error51) {
|
|
24738
|
+
this.onerror?.(error51);
|
|
24739
|
+
this.close().catch(() => {
|
|
24740
|
+
});
|
|
24741
|
+
}
|
|
24710
24742
|
};
|
|
24711
24743
|
this._onerror = (error51) => {
|
|
24712
24744
|
this.onerror?.(error51);
|
|
24713
24745
|
};
|
|
24746
|
+
this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
|
|
24714
24747
|
}
|
|
24715
24748
|
/**
|
|
24716
24749
|
* Starts listening for messages on stdin.
|
|
@@ -24802,6 +24835,12 @@ function extractMessage(event) {
|
|
|
24802
24835
|
if (typeof m.sender !== "object" || m.sender === null) return null;
|
|
24803
24836
|
return m;
|
|
24804
24837
|
}
|
|
24838
|
+
function extractInvocationId(event) {
|
|
24839
|
+
const data = event.data;
|
|
24840
|
+
if (typeof data !== "object" || data === null) return void 0;
|
|
24841
|
+
const value = data.invocation_id;
|
|
24842
|
+
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
24843
|
+
}
|
|
24805
24844
|
function textOfMessage(message) {
|
|
24806
24845
|
const texts = message.parts.filter((part) => part.type === "text" && typeof part.text === "string" && part.text.length > 0).map((part) => part.text);
|
|
24807
24846
|
if (texts.length > 0) return texts.join("\n");
|
|
@@ -24846,12 +24885,18 @@ function classifyEvent(event, ownerUserId, isPendingRequest = () => false, canAc
|
|
|
24846
24885
|
return { kind: "verdict", verdict: textVerdict };
|
|
24847
24886
|
}
|
|
24848
24887
|
if (text.length === 0) return { kind: "ignore", reason: "empty message body" };
|
|
24888
|
+
const invocationId = extractInvocationId(event);
|
|
24849
24889
|
return {
|
|
24850
24890
|
kind: "message",
|
|
24851
24891
|
content: text,
|
|
24852
|
-
meta: {
|
|
24892
|
+
meta: {
|
|
24893
|
+
chat_id: message.conversation_id,
|
|
24894
|
+
sender: message.sender.id,
|
|
24895
|
+
...invocationId ? { invocation_id: invocationId } : {}
|
|
24896
|
+
},
|
|
24853
24897
|
conversationId: message.conversation_id,
|
|
24854
|
-
sender: message.sender.id
|
|
24898
|
+
sender: message.sender.id,
|
|
24899
|
+
...invocationId ? { invocationId } : {}
|
|
24855
24900
|
};
|
|
24856
24901
|
}
|
|
24857
24902
|
var MAX_DESCRIPTION_CHARS = 500;
|
|
@@ -24942,8 +24987,12 @@ function buildPermissionCard(request, conversationId) {
|
|
|
24942
24987
|
remoteAllowEnabled
|
|
24943
24988
|
};
|
|
24944
24989
|
}
|
|
24945
|
-
function buildReply(chatId, text) {
|
|
24946
|
-
return {
|
|
24990
|
+
function buildReply(chatId, text, invocationId) {
|
|
24991
|
+
return {
|
|
24992
|
+
conversation_id: chatId,
|
|
24993
|
+
parts: [{ type: "text", text }],
|
|
24994
|
+
...invocationId ? { invocation_id: invocationId } : {}
|
|
24995
|
+
};
|
|
24947
24996
|
}
|
|
24948
24997
|
|
|
24949
24998
|
// src/config.ts
|
|
@@ -25257,6 +25306,11 @@ var StateStore = class {
|
|
|
25257
25306
|
if (parsed.last_conversation_id !== void 0 && typeof parsed.last_conversation_id !== "string") {
|
|
25258
25307
|
throw new Error("invalid routing state");
|
|
25259
25308
|
}
|
|
25309
|
+
if (parsed.pending_invocations !== void 0 && (typeof parsed.pending_invocations !== "object" || parsed.pending_invocations === null || Array.isArray(parsed.pending_invocations) || Object.entries(parsed.pending_invocations).some(
|
|
25310
|
+
([conversationId, invocationId]) => !conversationId.startsWith("cnv_") || typeof invocationId !== "string"
|
|
25311
|
+
))) {
|
|
25312
|
+
throw new Error("invalid pending invocations");
|
|
25313
|
+
}
|
|
25260
25314
|
if (parsed.observed_conversation_ids !== void 0 && (!Array.isArray(parsed.observed_conversation_ids) || parsed.observed_conversation_ids.some(
|
|
25261
25315
|
(conversationId) => typeof conversationId !== "string" || !conversationId.startsWith("cnv_")
|
|
25262
25316
|
))) {
|
|
@@ -25339,6 +25393,32 @@ var StateStore = class {
|
|
|
25339
25393
|
hasObservedConversation(conversationId) {
|
|
25340
25394
|
return (this.routingState.observed_conversation_ids ?? []).includes(conversationId);
|
|
25341
25395
|
}
|
|
25396
|
+
/**
|
|
25397
|
+
* Remember the invocation a group message arrived under. A newer invocation
|
|
25398
|
+
* replaces an older unanswered one: the reply this session is about to send
|
|
25399
|
+
* answers the message Claude actually saw last.
|
|
25400
|
+
*/
|
|
25401
|
+
recordInvocation(conversationId, invocationId) {
|
|
25402
|
+
this.routingState = {
|
|
25403
|
+
...this.routingState,
|
|
25404
|
+
pending_invocations: {
|
|
25405
|
+
...this.routingState.pending_invocations ?? {},
|
|
25406
|
+
[conversationId]: invocationId
|
|
25407
|
+
}
|
|
25408
|
+
};
|
|
25409
|
+
writeJsonAtomic(this.sessionStatePath, this.routingState);
|
|
25410
|
+
}
|
|
25411
|
+
invocationFor(conversationId) {
|
|
25412
|
+
return this.routingState.pending_invocations?.[conversationId];
|
|
25413
|
+
}
|
|
25414
|
+
/** Spend the invocation once its reply is committed by Relay. */
|
|
25415
|
+
consumeInvocation(conversationId) {
|
|
25416
|
+
const pending = { ...this.routingState.pending_invocations ?? {} };
|
|
25417
|
+
if (!(conversationId in pending)) return;
|
|
25418
|
+
delete pending[conversationId];
|
|
25419
|
+
this.routingState = { ...this.routingState, pending_invocations: pending };
|
|
25420
|
+
writeJsonAtomic(this.sessionStatePath, this.routingState);
|
|
25421
|
+
}
|
|
25342
25422
|
/**
|
|
25343
25423
|
* Bind a permission notification to its only safe active destination.
|
|
25344
25424
|
* Claude's channel permission payload has no chat id. A pending delivery is
|
|
@@ -25802,7 +25882,7 @@ mcp.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
25802
25882
|
if (typeof send_id !== "string" || !/^[A-Za-z0-9._:-]{1,128}$/.test(send_id)) {
|
|
25803
25883
|
return toolError("send_id must be 1-128 letters, digits, dot, underscore, colon, or hyphen");
|
|
25804
25884
|
}
|
|
25805
|
-
const body = buildReply(chat_id, text);
|
|
25885
|
+
const body = buildReply(chat_id, text, state.invocationFor(chat_id));
|
|
25806
25886
|
const payloadHash = hashJson(body);
|
|
25807
25887
|
const idempotencyKey = `claude-reply-${createHash2("sha256").update(`${scope.baseUrl}
|
|
25808
25888
|
${scope.agentId}
|
|
@@ -25815,6 +25895,7 @@ ${send_id}`).digest("hex")}`;
|
|
|
25815
25895
|
}
|
|
25816
25896
|
await client.sendMessage(body, registered.idempotency_key);
|
|
25817
25897
|
state.confirmOutboundSend(send_id);
|
|
25898
|
+
if (body.invocation_id) state.consumeInvocation(chat_id);
|
|
25818
25899
|
return { content: [{ type: "text", text: "sent" }] };
|
|
25819
25900
|
} catch (error51) {
|
|
25820
25901
|
const detail = error51 instanceof RelayApiError ? `${error51.status} ${error51.code}: ${error51.message}` : String(error51);
|
|
@@ -25851,6 +25932,12 @@ mcp.setNotificationHandler(PermissionRequestSchema, async ({ params }) => {
|
|
|
25851
25932
|
);
|
|
25852
25933
|
return;
|
|
25853
25934
|
}
|
|
25935
|
+
if (state.invocationFor(conversationId)) {
|
|
25936
|
+
log(
|
|
25937
|
+
`permission request ${params.request_id} not relayed: ${conversationId} is a group invocation that owes its single message to the reply; review it at the local terminal`
|
|
25938
|
+
);
|
|
25939
|
+
return;
|
|
25940
|
+
}
|
|
25854
25941
|
const request = params;
|
|
25855
25942
|
const card = buildPermissionCard(request, conversationId);
|
|
25856
25943
|
try {
|
|
@@ -25934,6 +26021,9 @@ async function handleEvent(event) {
|
|
|
25934
26021
|
}
|
|
25935
26022
|
case "message": {
|
|
25936
26023
|
state.recordConversation(action.conversationId);
|
|
26024
|
+
if (action.invocationId) {
|
|
26025
|
+
state.recordInvocation(action.conversationId, action.invocationId);
|
|
26026
|
+
}
|
|
25937
26027
|
const delivery = {
|
|
25938
26028
|
event_id: event.event_id,
|
|
25939
26029
|
content: action.content,
|
package/dist/api.d.ts
CHANGED
|
@@ -20,7 +20,19 @@ export declare function resolveApiOrigin(fallback?: string): string;
|
|
|
20
20
|
export declare class RelayApiError extends Error {
|
|
21
21
|
readonly status: number;
|
|
22
22
|
readonly code: string | undefined;
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* `error.details` from the Relay error body. The cursor faults carry the
|
|
25
|
+
* recovery target there (`highest_delivered_cursor`, `latest_sequence`),
|
|
26
|
+
* so it has to survive the throw.
|
|
27
|
+
*/
|
|
28
|
+
readonly details?: Record<string, unknown> | undefined;
|
|
29
|
+
constructor(status: number, code: string | undefined, message: string,
|
|
30
|
+
/**
|
|
31
|
+
* `error.details` from the Relay error body. The cursor faults carry the
|
|
32
|
+
* recovery target there (`highest_delivered_cursor`, `latest_sequence`),
|
|
33
|
+
* so it has to survive the throw.
|
|
34
|
+
*/
|
|
35
|
+
details?: Record<string, unknown> | undefined);
|
|
24
36
|
}
|
|
25
37
|
export interface PairingCreated {
|
|
26
38
|
pairing_id: string;
|
|
@@ -40,6 +52,17 @@ export interface EventsPage {
|
|
|
40
52
|
events: RelayEvent[];
|
|
41
53
|
next_cursor: number;
|
|
42
54
|
}
|
|
55
|
+
export interface EventCursorReconciliation {
|
|
56
|
+
reconciled: true;
|
|
57
|
+
resume_cursor: number;
|
|
58
|
+
}
|
|
59
|
+
/** One row of GET /v1/conversations (AgentConversation in the OpenAPI contract). */
|
|
60
|
+
export interface RelayConversation {
|
|
61
|
+
id: string;
|
|
62
|
+
kind?: "direct" | "group";
|
|
63
|
+
last_sequence?: number;
|
|
64
|
+
last_message_at?: string | null;
|
|
65
|
+
}
|
|
43
66
|
export interface PostMessageBody {
|
|
44
67
|
conversation_id: string;
|
|
45
68
|
parts: Array<Record<string, unknown>>;
|
|
@@ -50,6 +73,12 @@ export interface PostMessageBody {
|
|
|
50
73
|
message_id: string;
|
|
51
74
|
part_index?: number;
|
|
52
75
|
};
|
|
76
|
+
/**
|
|
77
|
+
* Required in a group: the id Relay supplied on the invocation this message
|
|
78
|
+
* answers. The server rejects a group agent message without it, and consumes
|
|
79
|
+
* the invocation on commit, so exactly one message may carry a given id.
|
|
80
|
+
*/
|
|
81
|
+
invocation_id?: string;
|
|
53
82
|
}
|
|
54
83
|
export declare class RelayClient {
|
|
55
84
|
private readonly token?;
|
|
@@ -61,14 +90,23 @@ export declare class RelayClient {
|
|
|
61
90
|
waitPairing(pairingId: string, pollToken: string): Promise<PairingStatus>;
|
|
62
91
|
getMe(): Promise<Record<string, unknown>>;
|
|
63
92
|
getEvents(cursor: number, timeoutS?: number, limit?: number): Promise<EventsPage>;
|
|
93
|
+
reconcileEvents(expiredCursor: number): Promise<EventCursorReconciliation>;
|
|
64
94
|
postMessage(body: PostMessageBody, idempotencyKey: string): Promise<{
|
|
65
95
|
message_id: string;
|
|
66
96
|
message: RelayMessage;
|
|
67
97
|
}>;
|
|
98
|
+
/**
|
|
99
|
+
* Conversations this agent still participates in, newest activity first.
|
|
100
|
+
* The canonical inventory used to reconcile after a cursor fault, when the
|
|
101
|
+
* event log can no longer say which conversations moved.
|
|
102
|
+
*/
|
|
103
|
+
listConversations(limit?: number): Promise<{
|
|
104
|
+
conversations: RelayConversation[];
|
|
105
|
+
}>;
|
|
68
106
|
listMessages(conversationId: string, limit?: number): Promise<{
|
|
69
107
|
messages: RelayMessage[];
|
|
70
108
|
}>;
|
|
71
|
-
setTyping(conversationId: string, started: boolean, label?: string): Promise<void>;
|
|
109
|
+
setTyping(conversationId: string, started: boolean, label?: string, invocationId?: string): Promise<void>;
|
|
72
110
|
markRead(conversationId: string, messageId: string): Promise<void>;
|
|
73
111
|
}
|
|
74
112
|
//# sourceMappingURL=api.d.ts.map
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE3D,eAAO,MAAM,iBAAiB,4BAA4B,CAAC;AAO3D;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAcxD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,GAAE,MAA0B,GAAG,MAAM,CAI7E;AAED,qBAAa,aAAc,SAAQ,KAAK;IAEpC,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE3D,eAAO,MAAM,iBAAiB,4BAA4B,CAAC;AAO3D;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAcxD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,GAAE,MAA0B,GAAG,MAAM,CAI7E;AAED,qBAAa,aAAc,SAAQ,KAAK;IAEpC,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAT5C,YACW,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GAAG,SAAS,EACjC,OAAO,EAAE,MAAM;IACf;;;;OAIG;IACM,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA,EAI3C;CACF;AAED,MAAM,WA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AAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIjE;CACF"}
|
package/dist/api.js
CHANGED
|
@@ -38,10 +38,18 @@ export function resolveApiOrigin(fallback = PRODUCTION_ORIGIN) {
|
|
|
38
38
|
export class RelayApiError extends Error {
|
|
39
39
|
status;
|
|
40
40
|
code;
|
|
41
|
-
|
|
41
|
+
details;
|
|
42
|
+
constructor(status, code, message,
|
|
43
|
+
/**
|
|
44
|
+
* `error.details` from the Relay error body. The cursor faults carry the
|
|
45
|
+
* recovery target there (`highest_delivered_cursor`, `latest_sequence`),
|
|
46
|
+
* so it has to survive the throw.
|
|
47
|
+
*/
|
|
48
|
+
details) {
|
|
42
49
|
super(message);
|
|
43
50
|
this.status = status;
|
|
44
51
|
this.code = code;
|
|
52
|
+
this.details = details;
|
|
45
53
|
this.name = "RelayApiError";
|
|
46
54
|
}
|
|
47
55
|
}
|
|
@@ -82,7 +90,8 @@ export class RelayClient {
|
|
|
82
90
|
if (!okStatuses.includes(res.status)) {
|
|
83
91
|
const code = json?.error?.code ?? json?.code;
|
|
84
92
|
const message = json?.error?.message ?? json?.message ?? text.slice(0, 300) ?? res.statusText;
|
|
85
|
-
|
|
93
|
+
const details = json?.error?.details;
|
|
94
|
+
throw new RelayApiError(res.status, code, `${method} ${path} → ${res.status}: ${message}`, details && typeof details === "object" && !Array.isArray(details) ? details : undefined);
|
|
86
95
|
}
|
|
87
96
|
return json;
|
|
88
97
|
}
|
|
@@ -106,18 +115,38 @@ export class RelayClient {
|
|
|
106
115
|
const qs = `cursor=${cursor}&timeout=${timeoutS}&limit=${limit}`;
|
|
107
116
|
return this.request("GET", `/v1/events?${qs}`, { timeoutMs: (timeoutS + 15) * 1000 });
|
|
108
117
|
}
|
|
118
|
+
reconcileEvents(expiredCursor) {
|
|
119
|
+
return this.request("POST", "/v1/events/reconcile", {
|
|
120
|
+
body: { expired_cursor: expiredCursor, history_reconciled: true },
|
|
121
|
+
headers: { "idempotency-key": `event-cursor-reconcile:${expiredCursor}` },
|
|
122
|
+
});
|
|
123
|
+
}
|
|
109
124
|
postMessage(body, idempotencyKey) {
|
|
110
125
|
return this.request("POST", "/v1/messages", {
|
|
111
126
|
body,
|
|
112
127
|
headers: { "idempotency-key": idempotencyKey },
|
|
113
128
|
});
|
|
114
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Conversations this agent still participates in, newest activity first.
|
|
132
|
+
* The canonical inventory used to reconcile after a cursor fault, when the
|
|
133
|
+
* event log can no longer say which conversations moved.
|
|
134
|
+
*/
|
|
135
|
+
listConversations(limit = 50) {
|
|
136
|
+
return this.request("GET", `/v1/conversations?limit=${limit}`);
|
|
137
|
+
}
|
|
115
138
|
listMessages(conversationId, limit = 20) {
|
|
116
139
|
return this.request("GET", `/v1/conversations/${conversationId}/messages?limit=${limit}`);
|
|
117
140
|
}
|
|
118
|
-
setTyping(conversationId, started, label) {
|
|
141
|
+
setTyping(conversationId, started, label, invocationId) {
|
|
119
142
|
return this.request("POST", `/v1/conversations/${conversationId}/typing`, {
|
|
120
|
-
|
|
143
|
+
// Group typing is gated on a still-pending invocation, so the id has to
|
|
144
|
+
// ride along until the reply consumes it.
|
|
145
|
+
body: {
|
|
146
|
+
started,
|
|
147
|
+
...(label ? { label } : {}),
|
|
148
|
+
...(invocationId ? { invocation_id: invocationId } : {}),
|
|
149
|
+
},
|
|
121
150
|
});
|
|
122
151
|
}
|
|
123
152
|
markRead(conversationId, messageId) {
|
package/dist/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,iBAAiB,GAAG,yBAAyB,CAAC;AAE3D,SAAS,cAAc,CAAC,QAAgB;IACtC,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACpC,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,I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EAAE,CAAC,CAAC;IACjE,CAAC;IAED,YAAY,CAAC,cAAsB,EAAE,KAAK,GAAG,EAAE;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,qBAAqB,cAAc,mBAAmB,KAAK,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED,SAAS,CACP,cAAsB,EACtB,OAAgB,EAChB,KAAc,EACd,YAAqB;QAErB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,qBAAqB,cAAc,SAAS,EAAE;YACxE,wEAAwE;YACxE,0CAA0C;YAC1C,IAAI,EAAE;gBACJ,OAAO;gBACP,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC3B,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACzD;SACF,CAAC,CAAC;IACL,CAAC;IAED,QAAQ,CAAC,cAAsB,EAAE,SAAiB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,qBAAqB,cAAc,OAAO,EAAE;YACtE,IAAI,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;SAChC,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/claude-settings.js
CHANGED
|
@@ -41,7 +41,7 @@ export function claudeBypassWarning(projectDir, home) {
|
|
|
41
41
|
const resolved = resolveClaudeDefaultMode(projectDir, home);
|
|
42
42
|
if (resolved?.mode !== "bypassPermissions")
|
|
43
43
|
return undefined;
|
|
44
|
-
return (`Claude permissions.defaultMode=bypassPermissions (${resolved.source})
|
|
44
|
+
return (`Claude permissions.defaultMode=bypassPermissions (${resolved.source}). ` +
|
|
45
45
|
"the engine never asks for approval, so Relay's phone Allow/Deny cards will not appear");
|
|
46
46
|
}
|
|
47
47
|
//# sourceMappingURL=claude-settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-settings.js","sourceRoot":"","sources":["../src/claude-settings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAQjC,SAAS,eAAe,CAAC,IAAY;IACnC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;QACtD,MAAM,IAAI,GAAG,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC;QAC9C,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACrD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CACtC,
|
|
1
|
+
{"version":3,"file":"claude-settings.js","sourceRoot":"","sources":["../src/claude-settings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAQjC,SAAS,eAAe,CAAC,IAAY;IACnC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;QACtD,MAAM,IAAI,GAAG,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC;QAC9C,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACrD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CACtC,UAAU,GAAW,OAAO,CAAC,GAAG,EAAE,EAClC,IAAI,GAAW,OAAO,EAAE;IAExB,MAAM,UAAU,GAAG;QACjB,IAAI,CAAC,UAAU,EAAE,SAAS,EAAE,qBAAqB,CAAC;QAClD,IAAI,CAAC,UAAU,EAAE,SAAS,EAAE,eAAe,CAAC;QAC5C,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,eAAe,CAAC;KACvC,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACxD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,mBAAmB,CACjC,UAAmB,EACnB,IAAa;IAEb,MAAM,QAAQ,GAAG,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC5D,IAAI,QAAQ,EAAE,IAAI,KAAK,mBAAmB;QAAE,OAAO,SAAS,CAAC;IAC7D,OAAO,CACL,qDAAqD,QAAQ,CAAC,MAAM,KAAK;QACzE,uFAAuF,CACxF,CAAC;AACJ,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* relaymessenger
|
|
3
|
+
* relaymessenger: bridge your local coding agent to Relay.
|
|
4
4
|
*
|
|
5
5
|
* relaymessenger pair [--engine <preset>] [--name <device-name>]
|
|
6
6
|
* relaymessenger start [--engine <preset>] [--dir <path>]
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names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,EAAE,CAAC,CAAC;gBAC5D,OAAO,CAAC,CAAC;YACX,CAAC;YACD,OAAO,MAAM,qBAAqB,EAAE,CAAC;QACvC,CAAC;QACD,KAAK,SAAS,CAAC;QACf,KAAK,MAAM,CAAC;QACZ,KAAK,QAAQ,CAAC;QACd,KAAK,IAAI;YACP,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO,CAAC,CAAC;QACX;YACE,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,IAAI,CAAC,CAAC;YAC/C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO,CAAC,CAAC;IACb,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,IAAI,CACT,CAAC,IAAI,EAAE,EAAE;IACP,IAAI,IAAI,KAAK,CAAC;QAAE,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;AAC1C,CAAC,EACD,CAAC,KAAK,EAAE,EAAE;IACR,OAAO,CAAC,KAAK,CAAC,mBAAmB,KAAK,EAAE,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC;IAC5D,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CACF,CAAC"}
|
package/dist/codex.js
CHANGED
|
@@ -68,7 +68,7 @@ export async function notifyCommand(argv, out = console.log, dependencies = {})
|
|
|
68
68
|
return;
|
|
69
69
|
const projectRoot = (dependencies.policy ?? new CodexNotifyPolicyStore()).matchProject(payload.cwd);
|
|
70
70
|
if (!projectRoot) {
|
|
71
|
-
out("relaymessenger notify: suppressed
|
|
71
|
+
out("relaymessenger notify: suppressed; this project was not explicitly opted in.");
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
const config = dependencies.config ?? new ConfigStore();
|
|
@@ -78,7 +78,7 @@ export async function notifyCommand(argv, out = console.log, dependencies = {})
|
|
|
78
78
|
const conversationId = readStateSnapshot(runtimeHomeForConfig(loaded, dirname(config.path))).owner_conversation_id;
|
|
79
79
|
const client = dependencies.client ?? new RelayClient(loaded.api_origin, loaded.agent_token);
|
|
80
80
|
if (!conversationId) {
|
|
81
|
-
out("relaymessenger notify: no pinned owner conversation yet
|
|
81
|
+
out("relaymessenger notify: no pinned owner conversation yet; run `relaymessenger start` once and " +
|
|
82
82
|
"message the agent from the Relay app first.");
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
@@ -153,7 +153,7 @@ export async function permissionRequestHook(write = (json) => process.stdout.wri
|
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
catch (error) {
|
|
156
|
-
process.stderr.write(`relaymessenger: refusing concealed approval input (${error})
|
|
156
|
+
process.stderr.write(`relaymessenger: refusing concealed approval input (${error}); denying.\n`);
|
|
157
157
|
write(decisionJson(false));
|
|
158
158
|
return 0;
|
|
159
159
|
}
|
|
@@ -167,7 +167,7 @@ export async function permissionRequestHook(write = (json) => process.stdout.wri
|
|
|
167
167
|
}
|
|
168
168
|
catch (error) {
|
|
169
169
|
approvals.consume(requestId);
|
|
170
|
-
process.stderr.write(`relaymessenger: approval card could not be delivered (${error})
|
|
170
|
+
process.stderr.write(`relaymessenger: approval card could not be delivered (${error}); denying.\n`);
|
|
171
171
|
write(decisionJson(false));
|
|
172
172
|
return 0;
|
|
173
173
|
}
|
|
@@ -206,7 +206,7 @@ export async function permissionRequestHook(write = (json) => process.stdout.wri
|
|
|
206
206
|
// transient — keep polling until deadline
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
process.stderr.write("relaymessenger: no approval from Relay within the window
|
|
209
|
+
process.stderr.write("relaymessenger: no approval from Relay within the window; denying.\n");
|
|
210
210
|
return finish(false);
|
|
211
211
|
}
|
|
212
212
|
/**
|