@khanglvm/relay 0.16.0 → 0.17.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/README.md +20 -1
- package/docs/AGENT.md +45 -37
- package/package.json +1 -1
- package/skills/relay/SKILL.md +125 -592
- package/src/cli.js +20 -66
- package/src/file-preview.js +61 -0
- package/src/server.js +18 -5
- package/src/ui/annotate.js +12 -4
- package/src/ui/blocks.css +88 -5
- package/src/ui/blocks.js +297 -61
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ unchanged; pick whichever surface fits.
|
|
|
78
78
|
| "Here's the diff — paste it in your editor" | Side-by-side **diff** blocks, syntax-highlighted **code**, **video** walkthroughs, and **file paths you click to open** in the default app |
|
|
79
79
|
| "Which commits should I pick? Resolve this conflict manually." | `rly git pick` / `rly git cherry-pick` boards and color-coded `git-conflict` resolvers with ours/theirs/custom hunk choices |
|
|
80
80
|
| "Type *done* when finished reviewing" | A Submit button; answers, notes, and inline comments returned as JSON |
|
|
81
|
-
| Feedback = another wall of text | Click any chart point, diagram node, table cell, or sentence;
|
|
81
|
+
| Feedback = another wall of text | Click any chart point, diagram node, table cell, or sentence; drag an image region to attach a local crop — the agent replies and the thread grows on the board |
|
|
82
82
|
|
|
83
83
|
Everything autosaves in real time, detached board links keep serving after
|
|
84
84
|
agent timeouts, multiple boards run at once, and the package has **zero npm
|
|
@@ -111,6 +111,25 @@ npm test # smoke tests with no external services (spawns real servers, fake-
|
|
|
111
111
|
|
|
112
112
|
## Changelog
|
|
113
113
|
|
|
114
|
+
### 0.16.1 — reliable area-comment zones
|
|
115
|
+
|
|
116
|
+
- Primary drag now draws a comment area directly on image and comparison views;
|
|
117
|
+
**Area** remains as a visible one-shot lock. Image pan uses Space-drag or the
|
|
118
|
+
middle button, while the comparison divider moves only from its handle.
|
|
119
|
+
- The selected rectangle remains visible while its comment is composed. Saved
|
|
120
|
+
zones carry a comment icon plus count, reopen for add/edit/delete, and disappear
|
|
121
|
+
automatically when their final comment is removed.
|
|
122
|
+
|
|
123
|
+
### 0.17.0 — file reference previews
|
|
124
|
+
|
|
125
|
+
- Local source references now resolve `:line[:column]` and `#Lstart-Lend` and
|
|
126
|
+
open in a keyboard-accessible modal at the cited lines.
|
|
127
|
+
- Preview Markdown, source/config/logs, CSV/TSV, static sandboxed HTML, images,
|
|
128
|
+
PDFs, and browser-compatible audio/video. Text is bounded to 1 MiB/20,000
|
|
129
|
+
lines; unsupported files retain an explicit **Open in app** fallback.
|
|
130
|
+
- Shorter agent skill and installed instructions, with clear display-only,
|
|
131
|
+
feedback, file-preview, and existing-board workflows.
|
|
132
|
+
|
|
114
133
|
### 0.16.0 — native viewer chrome, area comments, and durable agent waits
|
|
115
134
|
|
|
116
135
|
- Viewer toolbars now use browser-native sticky positioning instead of a
|
package/docs/AGENT.md
CHANGED
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
# relay (`rly`) — agent guide
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
than monospace — or is a file/visual the user should look at — show it in relay
|
|
14
|
-
instead of printing it. Fast paths: `rly view file.md` (or `data.csv`), `rly diff`,
|
|
15
|
-
`rly git pick` / `rly git conflict`, or an `image`/`chart`/`table` block on a board.
|
|
16
|
-
|
|
17
|
-
**Use relay even in plan mode** — for any clarifying or decision question (Claude
|
|
18
|
-
Code / Codex), route it through a relay board, **not** the native
|
|
19
|
-
`AskUserQuestion` / ask-user tool: that tool is **not** a substitute, even though
|
|
20
|
-
plan-mode guidance suggests it. Do NOT ask in plain terminal text and do NOT
|
|
21
|
-
reach for the native ask tool for anything beyond one trivial yes/no — open a
|
|
22
|
-
board. Reserve the harness's `ExitPlanMode` strictly for the final plan-approval
|
|
23
|
-
gate (it's a mode transition, not a question).
|
|
3
|
+
Use Relay to present files, visuals, substantial plans, diffs, and related user
|
|
4
|
+
questions. Choose purpose-built blocks so users can inspect the content and
|
|
5
|
+
leave precise feedback. Keep short answers and progress updates in chat.
|
|
6
|
+
Respect the user’s existing authorization; boards do not add approval gates.
|
|
7
|
+
For a concise workflow, read the bundled skill (`rly skill path`). This guide is
|
|
8
|
+
a reference for fields and less common operations.
|
|
9
|
+
|
|
10
|
+
Use `rly show --file spec.json --display-only` when no response is needed. Use
|
|
11
|
+
`rly ask --file spec.json --detach` and a waiter for answers or comments.
|
|
12
|
+
Fast paths include `rly view`, `rly diff`, and `rly git`.
|
|
24
13
|
|
|
25
14
|
**Tell the user** at the start of your intro text that they can hover chart
|
|
26
15
|
points, diagram nodes, table cells, and any element of a custom-HTML block to
|
|
@@ -495,15 +484,28 @@ Rules of thumb:
|
|
|
495
484
|
// tagTone (optional pill color): warm | cool | neutral | nature | bold | digital
|
|
496
485
|
```
|
|
497
486
|
|
|
498
|
-
### Local file links —
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
487
|
+
### Local file links — preview in a board modal
|
|
488
|
+
|
|
489
|
+
Write `[source](/absolute/path/app.js:98)` in the intro or a markdown block.
|
|
490
|
+
Bare/backtick paths, `./`, `../`, `~/`, and `file://` URLs also work. Encode spaces
|
|
491
|
+
in file URLs (`file:///tmp/My%20Report.md`). The browser board previews supported
|
|
492
|
+
files in a modal and restores focus/scroll when closed. `:line`, `:line:column`,
|
|
493
|
+
and `#Lstart-Lend` select source lines; columns are accepted but not highlighted.
|
|
494
|
+
|
|
495
|
+
UTF-8 source/config/log files show numbered source. Markdown renders as a
|
|
496
|
+
document, CSV/TSV as a table, and HTML as a static sandboxed page; these have a
|
|
497
|
+
Source toggle. Images, PDFs, and browser-compatible audio/video render directly.
|
|
498
|
+
HTML scripts, forms, and external resources are disabled. Text previews are
|
|
499
|
+
limited to 1 MiB and 20,000 lines. Unsupported/binary/oversized files and
|
|
500
|
+
folders offer an explicit **Open in app** action; missing files show an error.
|
|
501
|
+
|
|
502
|
+
Preview/open access is restricted to paths explicitly referenced on the board,
|
|
503
|
+
for owner/collaborator browser sessions only. A preview’s nested links do not
|
|
504
|
+
extend the allowlist. These are live disk views without annotations; use content
|
|
505
|
+
blocks for snapshots or feedback. For inline MCP or reviewer/read-only shares,
|
|
506
|
+
embed the file content using `mdFile`, `codeFile`, or media blocks instead.
|
|
507
|
+
Running boards retain their old UI/server snapshot after upgrade; reconnect the
|
|
508
|
+
same board using the upgraded CLI to activate the viewer.
|
|
507
509
|
|
|
508
510
|
### When to use which block
|
|
509
511
|
|
|
@@ -536,7 +538,7 @@ the question-types section above.
|
|
|
536
538
|
| `diff` | proposed code changes / before-after — a unified diff rendered as a colored git-style comparison (no git needed) |
|
|
537
539
|
| `video` | demos, screen recordings, walkthroughs — YouTube/Vimeo embeds, a media URL, or a local video file (streamed) |
|
|
538
540
|
| `pdf` | quotes, reports, exports, forms — local `.pdf` files or PDF URLs rendered inline; local files stream from the board server |
|
|
539
|
-
| `image` | screenshots, mockup exports, photos — local files embed and work offline;
|
|
541
|
+
| `image` | screenshots, mockup exports, photos — local files embed and work offline; drag to comment on exact pixels |
|
|
540
542
|
| `palette` | color palettes / themes — swatch cards with hover-hex + click-to-copy; pair with a `color` question to let the user pick |
|
|
541
543
|
| `kpi` | big-number metric cards (`items:[{label,value,delta?,dir?,sub?}]`) with up/down/flat-tinted deltas — at-a-glance numbers without a chart |
|
|
542
544
|
| `typography` | type specimens (`specimens:[{label?,size?,weight?,font?,text?}]`) — react to type choices like a palette |
|
|
@@ -550,12 +552,18 @@ click-to-drop coordinate pin-comments. `table` blocks take `"rowsFile"` (load
|
|
|
550
552
|
rows from .csv/.tsv/.json), `"filterable"`, and `"exportable"` (CSV download).
|
|
551
553
|
|
|
552
554
|
Every interactive `image` and `compare` block also supports area feedback:
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
the
|
|
557
|
-
|
|
558
|
-
|
|
555
|
+
primary drag draws a rectangle directly; the viewer's **Area** control remains a
|
|
556
|
+
discoverable one-shot lock for the same gesture. On images, Space-drag or the
|
|
557
|
+
middle mouse button pans. In comparisons, only dragging the divider handle moves
|
|
558
|
+
the split. The provisional rectangle remains visible while the comment is
|
|
559
|
+
composed; a saved zone shows a comment icon plus count and reopens for
|
|
560
|
+
add/edit/delete. Removing its final comment removes the zone. Relay saves a pixel
|
|
561
|
+
crop beside the board record and returns its local path with the annotation, so
|
|
562
|
+
the agent can open the exact pixels instead of inferring from a whole-image
|
|
563
|
+
comment. In a comparison, the visible side where drawing began is recorded as
|
|
564
|
+
`before` or `after` and the crop comes from that source image. Remote images that
|
|
565
|
+
prevent browser canvas access still return coordinates and a `cropUnavailable`
|
|
566
|
+
marker.
|
|
559
567
|
|
|
560
568
|
### Height rules
|
|
561
569
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanglvm/relay",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.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",
|