@khanglvm/relay 0.8.0 → 0.8.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.
Files changed (3) hide show
  1. package/README.md +48 -24
  2. package/package.json +1 -1
  3. package/src/cli.js +10 -2
package/README.md CHANGED
@@ -25,42 +25,42 @@ npm i -g @khanglvm/relay
25
25
  # the agent skill → every detected agent (Claude Code, Codex, Cursor, …)
26
26
  npx skills add khanglvm/relay --skill relay --all
27
27
 
28
- # enforce it (recommended) — a skill alone is an ignorable hint; append relay's
29
- # short usage rules to your agent's global instructions (per-agent commands below)
30
- rly skill rules
28
+ # enforce it (recommended) — a skill alone is an ignorable hint. `rly install`
29
+ # writes relay's short usage rules into the right file for each agent (details below):
30
+ rly install --all # every agent detected on this machine
31
31
  ```
32
32
 
33
33
  That's it. Next time your agent needs a decision or wants to show you a plan,
34
34
  it opens a board like the ones above and waits for your Submit.
35
35
 
36
+ Keep relay current with **`rly upgrade`** — it installs the latest CLI and
37
+ refreshes the skill in one step, leaving any boards you have open untouched.
38
+
36
39
  ### Tell your agent to actually use it
37
40
 
38
- `rly skill rules` prints relay's short usage rules. A skill is just an ignorable
39
- hint — these rules in the file your agent *always* reads are what make it reach for
40
- relay. Append them to your agent's **global** instructions:
41
+ A skill is just an ignorable hint — relay's short usage rules in the file your
42
+ agent *always* reads are what make it reach for relay. **`rly install` writes
43
+ those rules into the right file for each agent**, cross-platform (macOS / Linux /
44
+ Windows):
41
45
 
42
46
  ```sh
43
- rly skill rules >> ~/.claude/CLAUDE.md # Claude Code
44
- rly skill rules >> ~/.codex/AGENTS.md # Codex
45
- rly skill rules >> ~/.gemini/GEMINI.md # Gemini CLI
46
- rly skill rules >> ~/.config/opencode/AGENTS.md # OpenCode
47
+ rly install --all # every agent detected on this machine
48
+ rly install --target claude # ~/.claude/CLAUDE.md
49
+ rly install --target cursor # → .cursor/rules/relay.mdc (with frontmatter)
50
+ rly install --target copilot # → .github/copilot-instructions.md (+ JetBrains global)
51
+ rly install # no target: print the agent → file map for your OS
47
52
  ```
48
53
 
49
- Cursor and GitHub Copilot keep global rules in a settings panel, not a file — run
50
- `rly skill rules` and paste the output into Cursor's *Settings → Rules → User Rules*
51
- or Copilot's custom-instructions.
52
-
53
- <details>
54
- <summary>More agents</summary>
55
-
56
- ```sh
57
- rly skill rules >> ~/.codeium/windsurf/memories/global_rules.md # Windsurf
58
- rly skill rules >> ~/.factory/AGENTS.md # Droid (Factory)
59
- ```
54
+ Supported targets: `claude`, `codex`, `cursor`, `copilot` (VS Code / Visual Studio /
55
+ JetBrains), `kiro`, `windsurf`, `cline`, `gemini`, `opencode`, `droid` (Factory), and
56
+ the generic `agents` (`AGENTS.md`). Flags: `--scope global|project` (where the rules
57
+ land), `--print` (emit the text + resolved path for manual copy/paste), `--list`.
58
+ relay's block is marker-delimited and idempotent — re-running updates only that block
59
+ and leaves the rest of your file alone.
60
60
 
61
- Any other agent: run `rly skill rules` and paste the block into whatever file or
62
- settings panel it reads as global instructions.
63
- </details>
61
+ Using an agent that isn't listed? `rly skill rules` prints the block to paste into
62
+ whatever file or settings panel it reads e.g. Cursor's *Settings → Rules → User
63
+ Rules* or Copilot's custom instructions (their *user-level* rules aren't file-based).
64
64
 
65
65
  ## What it improves
66
66
 
@@ -82,6 +82,8 @@ Node ≥ 18; Chart.js / Mermaid / Graphviz are vendored and lazy-loaded offline.
82
82
  | | |
83
83
  |---|---|
84
84
  | `rly help` | every command at a glance |
85
+ | `rly install --target <agent>` | write relay's rules into an agent's instruction file — `claude` `codex` `cursor` `copilot` `kiro` `windsurf` `cline` `gemini` `opencode` `droid` `agents`; `--all`, `--scope`, `--print`, `--list` |
86
+ | `rly upgrade` | update the CLI **and** refresh the skill in one step (safe around open boards; `--dry-run`, `--cli-only`, `--skill-only`) |
85
87
  | `rly agent` | the full agent guide — spec format, all block types, annotations, patterns ([docs/AGENT.md](docs/AGENT.md)) |
86
88
  | `rly schema` | board spec JSON Schema |
87
89
  | [skills/relay/SKILL.md](skills/relay/SKILL.md) | the bundled skill |
@@ -94,6 +96,28 @@ npm test # zero-dep smoke tests (spawns real servers, fake-submits)
94
96
 
95
97
  ## Changelog
96
98
 
99
+ ### 0.8.1
100
+ - `rly install` adds **OpenCode** (`~/.config/opencode/AGENTS.md`) and **Droid /
101
+ Factory** (`~/.factory/AGENTS.md`) targets.
102
+ - README documents `rly install` and `rly upgrade`.
103
+
104
+ ### 0.8.0 — install into any agent
105
+ - **`rly install --target <agent>`** writes relay's usage rules into the right
106
+ file for Claude Code, Codex, Cursor, GitHub Copilot (VS Code / Visual Studio /
107
+ JetBrains), Kiro, Windsurf, Cline, Gemini, or the generic `AGENTS.md` —
108
+ cross-platform (macOS / Linux / Windows), idempotent, with `--all`, `--scope`,
109
+ and `--print`.
110
+ - Fixed `rly skill install` crashing when the target skill dir was a symlink.
111
+
112
+ ### 0.7.0 — sturdier boards, self-update
113
+ - **Markdown blocks render GFM tables**; element comments moved to an
114
+ Outline-style right sidebar with inline highlights on commented text.
115
+ - **Seamless timeouts** — a detached board that runs past its deadline keeps
116
+ serving so you can still submit (it lands as `submitted`); the page shows a
117
+ calm note instead of disconnecting.
118
+ - **`rly upgrade`** — install the latest CLI and refresh the skill in one step.
119
+ - Per-question notes are multi-line textboxes.
120
+
97
121
  ### 0.6.0 — comment on anything
98
122
  - **Comment on any part of a custom-HTML mockup.** Hover any element — a heading,
99
123
  a button, a card, the price — and a pin appears to leave an inline note. No
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanglvm/relay",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Browser-based question boards with rich blocks (markdown, charts, mermaid, tables, code, sandboxed HTML) and element-level annotations for AI coding agents (Claude Code, Codex, …): ask users structured questions, present interactive visuals, collect inline comments, wait for submit, read answers as JSON.",
5
5
  "keywords": [
6
6
  "ai-agents",
package/src/cli.js CHANGED
@@ -821,7 +821,7 @@ function platformDirs({ platform, home, env }) {
821
821
  const jetbrainsCopilot = platform === 'win32'
822
822
  ? path.join(localApp, 'github-copilot', 'intellij')
823
823
  : path.join(xdg, 'github-copilot', 'intellij');
824
- return { jetbrainsCopilot, documents: path.join(home, 'Documents') };
824
+ return { xdg, jetbrainsCopilot, documents: path.join(home, 'Documents') };
825
825
  }
826
826
 
827
827
  // The relay instruction registry. Each agent declares how to install relay's
@@ -877,6 +877,14 @@ export function agentRegistry({ platform = process.platform, home = os.homedir()
877
877
  detect: j(home, '.gemini'),
878
878
  global: { file: j(home, '.gemini', 'GEMINI.md'), style: 'shared' },
879
879
  project: { file: j(cwd, 'GEMINI.md'), style: 'shared' } },
880
+ { id: 'opencode', label: 'OpenCode',
881
+ detect: j(d.xdg, 'opencode'),
882
+ global: { file: j(d.xdg, 'opencode', 'AGENTS.md'), style: 'shared' },
883
+ project: { file: j(cwd, 'AGENTS.md'), style: 'shared' } },
884
+ { id: 'droid', label: 'Droid (Factory)',
885
+ detect: j(home, '.factory'),
886
+ global: { file: j(home, '.factory', 'AGENTS.md'), style: 'shared' },
887
+ project: { file: j(cwd, 'AGENTS.md'), style: 'shared' } },
880
888
  ];
881
889
  }
882
890
 
@@ -1144,7 +1152,7 @@ USAGE
1144
1152
  rly skill [install|rules|path] bundled universal agent skill (Claude Code, Codex, …)
1145
1153
  \`rly skill rules >> CLAUDE.md\` adds always-read usage rules
1146
1154
  rly install --target <agent> inject relay's rules into an agent's instruction file
1147
- agents: claude codex cursor copilot kiro windsurf cline gemini agents
1155
+ claude codex cursor copilot kiro windsurf cline gemini opencode droid agents
1148
1156
  --scope global|project · --print (copy/paste) · --all · --list (no flags)
1149
1157
  rly upgrade install the latest CLI globally + refresh the skill in one step
1150
1158
  --stop/--force handle running boards · --dry-run · --cli-only/--skill-only