@khanglvm/relay 0.17.0 → 0.18.0

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/SETUP.md ADDED
@@ -0,0 +1,74 @@
1
+ # Relay setup
2
+
3
+ [Back to the README](../README.md)
4
+
5
+ ## Agent instructions
6
+
7
+ Install the CLI and bundled skill:
8
+
9
+ ```sh
10
+ npm i -g @khanglvm/relay
11
+ npx skills add khanglvm/relay --skill relay --all
12
+ ```
13
+
14
+ To add Relay usage rules to an agent's instruction file:
15
+
16
+ ```sh
17
+ rly install --target codex
18
+ ```
19
+
20
+ Run `rly install` to list supported targets and paths. Use `--all` for all
21
+ detected agents, `--scope project` for project instructions, or `--print`
22
+ to inspect the rules first.
23
+
24
+ `rly upgrade` updates the CLI and refreshes the skill, leaving open boards
25
+ running. It supports `--dry-run`, `--cli-only`, and `--skill-only`.
26
+
27
+ ## Boards inside a chat app
28
+
29
+ Relay can serve boards through MCP Apps. A host that supports MCP Apps can
30
+ render the board inside the conversation. Register the server for your client:
31
+
32
+ ```sh
33
+ claude mcp add relay -- rly mcp
34
+ rly mcp install --target claude
35
+ rly mcp install --target codex
36
+ ```
37
+
38
+ The first command configures Claude Code; the others write Claude Desktop
39
+ and Codex config respectively. Use `rly mcp config` to print config snippets.
40
+ The server exposes `relay_ask` for feedback and `relay_show` for display.
41
+
42
+ For remote clients, `rly mcp --http` serves Streamable HTTP. Run `rly help`
43
+ for host, port, token, and origin flags. The repo includes a `Dockerfile`.
44
+ See the [agent guide](AGENT.md) for board schemas, transport details,
45
+ and host requirements.
46
+
47
+ ## More commands
48
+
49
+ | Command | Use it to |
50
+ | --- | --- |
51
+ | `rly view <file.md>` | Read local Markdown, tables, or PDFs in a board |
52
+ | `rly diff --staged` | Review a staged Git diff |
53
+ | `rly git pick` / `rly git cherry-pick` | Choose commits and their order; add `--code` for per-hunk review |
54
+ | `rly git conflict [files…]` | Review conflict hunks and return resolved text |
55
+ | `rly share <board-id>` | Manage links for collaborators or reviewers on the same Wi-Fi |
56
+ | `rly show --file spec.json --display-only` | Display a board without requiring feedback |
57
+ | `rly rescue <board-id>` | Restore a disconnected board on its original port |
58
+ | `rly agent` | Read the full guide to blocks, annotations, and agent workflows |
59
+ | `rly schema` | Print the board JSON Schema |
60
+
61
+ Boards autosave answers and comments. Detached boards keep serving after
62
+ a wait times out, until submission or `rly stop <board-id>`. Multiple boards
63
+ can run at once.
64
+
65
+ Relay has no npm runtime dependencies. It bundles the browser libraries for
66
+ charts and diagrams and loads them only when a board needs them. Local
67
+ file links open referenced paths in the default app; `RLY_OPEN_CMD` overrides
68
+ the opener.
69
+
70
+ ## Migration from quest-board
71
+
72
+ relay was formerly `@khanglvm/quest-board` (CLI: `qbd`) — that package is
73
+ deprecated. Storage moved from `~/.quest-board` to `~/.relay` (override with
74
+ `RLY_HOME`); legacy `"html"` / `"htmlFile"` spec fields keep working.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanglvm/relay",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
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",
@@ -46,6 +46,6 @@
46
46
  "node": ">=18.3"
47
47
  },
48
48
  "scripts": {
49
- "test": "node test/smoke.mjs"
49
+ "test": "node test/smoke.mjs && node --test test/link.test.mjs test/a2ui.test.mjs"
50
50
  }
51
51
  }
@@ -66,6 +66,7 @@ Use `required:true` only for answers necessary to continue.
66
66
  | Mockups / before-after | `image`, `compare` |
67
67
  | Media / reports | `video`, `pdf` |
68
68
  | Design choices | `palette`, `typography` |
69
+ | Live status, quick actions, small forms | `a2ui` (grammar: `rly a2ui`) |
69
70
  | Custom interactive content | sandboxed `html` |
70
71
 
71
72
  | Answer shape | Question type |
@@ -81,6 +82,24 @@ in `blockEdits`. For image feedback, primary drag selects a region/crop;
81
82
  Space-drag or middle-drag pans. A compare divider moves only by its handle.
82
83
  `pins:true` adds image point comments.
83
84
 
85
+ ## Open a board on the user's other devices
86
+
87
+ When the user reads on a phone or another Mac, and `devlink` is installed, add
88
+ `--devlink` to `rly ask|show|view|diff` (or set it once with
89
+ `rly config link devlink`). The command prints a private https URL; give the user
90
+ that URL and never a localhost one. Without `devlink`, `--public-url
91
+ 'https://host:{port}'` takes any https URL that reaches the board. Answers still
92
+ come back through `rly wait` and `rly result`.
93
+
94
+ ## A2UI widgets
95
+
96
+ An `a2ui` block is a small live widget for state and quick actions: a status list,
97
+ numbers, a progress bar, buttons, a short form. Write it as A2UI Express in the
98
+ `express` field; run `rly a2ui` for the grammar and every component. Clicks and
99
+ input values return in `result.blockEdits[blockId]` as `{type:"a2ui", data,
100
+ events:[{name, context, at}]}`. A widget is never a substitute for a question you
101
+ need answered; use `single`, `yesno` or `text` for that.
102
+
84
103
  ## File references that open in a modal
85
104
 
86
105
  In the intro or a markdown block, use `[label](/absolute/path/file.js:98)`.