@khanglvm/relay 0.25.0 → 0.25.1
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/docs/AGENT.md +2 -2
- package/package.json +1 -1
- package/skills/relay/SKILL.md +1 -1
- package/src/mcp/boards.js +1 -1
- package/src/mcp/constants.js +6 -3
- package/src/mcp/schemas.js +1 -1
- package/types/mcp/constants.d.ts +1 -1
package/docs/AGENT.md
CHANGED
|
@@ -142,11 +142,11 @@ Everything outside this section is the CLI surface: you run `rly` and read JSON
|
|
|
142
142
|
|
|
143
143
|
Tools:
|
|
144
144
|
- `relay_board`: takes the spec this guide describes. A spec with `questions` collects answers; one without is display-only. The result is a short summary with the `boardId`, never the spec.
|
|
145
|
-
- `relay_result {boardId, wait_seconds}`: the answers, notes, comment, annotations and blockEdits, or the draft while the person is still filling the board in. `wait_seconds` blocks until they submit, up to
|
|
145
|
+
- `relay_result {boardId, wait_seconds}`: the answers, notes, comment, annotations and blockEdits, or the draft while the person is still filling the board in. `wait_seconds` blocks until they submit, up to 50, which stays under the roughly 60-second tool timeout of MCP clients. A status of `open` is not an answer: call it again.
|
|
146
146
|
- `relay_help {topic}` or `relay_help {schema}`: a part of this guide, or the exact fields of one block or question type.
|
|
147
147
|
- `relay_ask` and `relay_show`: the old names, kept as aliases for one more minor version. Use `relay_board`.
|
|
148
148
|
|
|
149
|
-
The flow: call `relay_board`, tell the person the board is on screen, then call `relay_result {boardId, wait_seconds:
|
|
149
|
+
The flow: call `relay_board`, tell the person the board is on screen, then call `relay_result {boardId, wait_seconds: 50}` and call it again while it says `open`. When an agent is waiting like this, the board hands it the answers directly. Otherwise the board posts a one-line message naming the board to wake the agent, and some hosts (T3 Code) ask the person to confirm that message. Do not ask the same questions again in chat.
|
|
150
150
|
|
|
151
151
|
`rly mcp` speaks stdio to a local desktop host. `rly mcp --http [--port N] [--token-file PATH] [--allow-origin ORIGIN]` serves Streamable HTTP at `/mcp` for hosts that connect over a network. The bearer token comes from `--token-file`, `RLY_MCP_TOKEN` or `--token`; the flag shows in `ps`, so prefer the file or the variable. Boards are stored in the relay home of the machine that runs the server, so `codeFile` and local images resolve there and nowhere else, and only under the server's file roots: none over HTTP unless the operator passes `--root PATH` (repeatable) or `RLY_FILE_ROOTS`, the working directory over stdio (but not when it is `/` or the home directory, where desktop hosts often start it). `--retention-days N` (or `RLY_RETENTION_DAYS`, `off` to keep every board) sets how long unchanged boards stay in the relay home; the default is 30. A host that draws A2UI can show the whole board natively instead of the iframe. It declares the board catalog, `https://github.com/khanglvm/relay/a2ui/catalog/board/v1`, under `extensions.a2ui["1.0"].supportedCatalogIds` when it connects, or per call in `_meta.a2ui`; the call wins over the connection. `relay_view` then returns the board as A2UI messages (`application/a2ui+json`, `application/json+a2ui` is accepted when declared) and the host sends button events to `a2ui_action` with the surface's data model. The catalog is `src/a2ui/board-catalog.json`; `toA2ui(spec)` and `fromA2ui(dataModel, spec)` from `@khanglvm/relay/a2ui-board` convert in both directions, and the result matches what the web board stores. Hosts that did not declare it keep the iframe.
|
|
152
152
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanglvm/relay",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.1",
|
|
4
4
|
"description": "Question boards with rich blocks (markdown, charts, mermaid, tables, code, diffs, video, sandboxed HTML), clickable local file-links, and element-level annotations for AI coding agents (Claude Code, Codex, …): ask users structured questions, present interactive visuals, collect inline comments, read answers as JSON — in a local browser board OR rendered INLINE inside the Claude & Codex apps as an MCP App (SEP-1865).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
package/skills/relay/SKILL.md
CHANGED
|
@@ -15,7 +15,7 @@ If your host app has its own way to ask the user or show results (native questio
|
|
|
15
15
|
3. Give the person the url. To get the result: `rly wait <boardId> --timeout 1800 --while-active --idle-grace 300` (blocks until submit) or `rly result <boardId>` (now). A timeout is not an answer: run `rly result` before you decide.
|
|
16
16
|
4. Read `answers`, `notes`, `comment`, `annotations` and `blockEdits` together; any of them can qualify an answer. When stdout is cut short, read the `resultFile` it names.
|
|
17
17
|
|
|
18
|
-
If Relay MCP tools are connected, call `relay_board` with the same spec (questions make it collect answers, none make it display-only) and the board renders inline. Then call `relay_result {boardId, wait_seconds:
|
|
18
|
+
If Relay MCP tools are connected, call `relay_board` with the same spec (questions make it collect answers, none make it display-only) and the board renders inline. Then call `relay_result {boardId, wait_seconds: 50}` and repeat while it says `open`: answers collected that way need no chat message, which some hosts make the person confirm; `relay_help` gives exact fields. Embed file content with `mdFile`, `codeFile` or an image block, because inline boards cannot open local file links.
|
|
19
19
|
|
|
20
20
|
## Spec in one screen
|
|
21
21
|
```json
|
package/src/mcp/boards.js
CHANGED
|
@@ -53,7 +53,7 @@ export function questionList(spec, labelMax = 80) {
|
|
|
53
53
|
export function boardResult(record, spec, mode) {
|
|
54
54
|
const title = limit(spec.title, 120);
|
|
55
55
|
const text = mode === 'ask'
|
|
56
|
-
? `Board "${title}" (${record.id}) is on screen${spec.questions.length ? ` with ${spec.questions.length} question${spec.questions.length === 1 ? '' : 's'}` : ' for the person to acknowledge'}. They answer there. Call relay_result {boardId, wait_seconds:
|
|
56
|
+
? `Board "${title}" (${record.id}) is on screen${spec.questions.length ? ` with ${spec.questions.length} question${spec.questions.length === 1 ? '' : 's'}` : ' for the person to acknowledge'}. They answer there. Call relay_result {boardId, wait_seconds: 50} now and again while it says open: answers collected that way arrive without a chat message the person must confirm. Do not re-ask them in chat.`
|
|
57
57
|
: `Board "${title}" (${record.id}) is on screen, display-only. Continue without waiting.`;
|
|
58
58
|
for (const labelMax of [80, 40, 20, 0]) {
|
|
59
59
|
const structuredContent = { boardId: record.id, mode, title, questions: questionList(spec, labelMax) };
|
package/src/mcp/constants.js
CHANGED
|
@@ -12,9 +12,12 @@ export const DEFAULT_HTTP_PORT = 4319;
|
|
|
12
12
|
// well under the size a host will pass to an iframe.
|
|
13
13
|
export const VENDOR_CHUNK_BYTES = 768 * 1024;
|
|
14
14
|
|
|
15
|
-
// The longest relay_result may block.
|
|
16
|
-
//
|
|
17
|
-
|
|
15
|
+
// The longest relay_result may block. MCP clients give up on a tool call after
|
|
16
|
+
// about 60 seconds (Claude Code and the Agent SDK measured on M6; Codex's
|
|
17
|
+
// default tool_timeout_sec is 60), and a wait the client abandoned fails the
|
|
18
|
+
// agent and could count as a pickup. 50 seconds returns "open" in time for the
|
|
19
|
+
// agent to call again.
|
|
20
|
+
export const MAX_WAIT_SECONDS = 50;
|
|
18
21
|
|
|
19
22
|
// relay_board results stay under this size so a model reading it pays for a summary, not the spec.
|
|
20
23
|
export const RESULT_BUDGET_BYTES = 2048;
|
package/src/mcp/schemas.js
CHANGED
|
@@ -41,5 +41,5 @@ export const helpInput = z.object({
|
|
|
41
41
|
|
|
42
42
|
export const resultInput = z.object({
|
|
43
43
|
boardId,
|
|
44
|
-
wait_seconds: z.number().min(0).optional().describe('Block up to this
|
|
44
|
+
wait_seconds: z.number().min(0).optional().describe('Block up to this many seconds (at most 50) for the submission; default 0 returns now. Call again while the status is open.'),
|
|
45
45
|
});
|
package/types/mcp/constants.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const VENDOR_URI_PREFIX = "ui://relay/vendor/";
|
|
|
5
5
|
export declare const HTTP_PATH = "/mcp";
|
|
6
6
|
export declare const DEFAULT_HTTP_PORT = 4319;
|
|
7
7
|
export declare const VENDOR_CHUNK_BYTES: number;
|
|
8
|
-
export declare const MAX_WAIT_SECONDS =
|
|
8
|
+
export declare const MAX_WAIT_SECONDS = 50;
|
|
9
9
|
export declare const RESULT_BUDGET_BYTES = 2048;
|
|
10
10
|
export declare const TOOL: {
|
|
11
11
|
board: string;
|