@khanglvm/relay 0.16.1 → 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 +10 -0
- package/docs/AGENT.md +32 -30
- package/package.json +1 -1
- package/skills/relay/SKILL.md +125 -596
- package/src/cli.js +20 -66
- package/src/file-preview.js +61 -0
- package/src/server.js +18 -5
- package/src/ui/blocks.css +52 -0
- package/src/ui/blocks.js +126 -7
package/README.md
CHANGED
|
@@ -120,6 +120,16 @@ npm test # smoke tests with no external services (spawns real servers, fake-
|
|
|
120
120
|
zones carry a comment icon plus count, reopen for add/edit/delete, and disappear
|
|
121
121
|
automatically when their final comment is removed.
|
|
122
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
|
+
|
|
123
133
|
### 0.16.0 — native viewer chrome, area comments, and durable agent waits
|
|
124
134
|
|
|
125
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
|
|
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",
|