Skip to content

Commit dbf4628

Browse files
fix: add npm publishing, relay update command, and fix dist path for global install
- Publish as `relayd` on npm; remove private flag; add files/engines fields - Move React deps to devDependencies (bundled by Vite, not needed at runtime) - Fix distDir to resolve from import.meta.dir so dashboard loads when installed globally - Read VERSION from package.json at runtime (semantic-release owns the bump) - Add `relay update` — checks npm registry, self-updates via bun/npm - Silent version check on `relay start` with one-line notice if behind - Add semantic-release config (.releaserc.json) and GitHub Actions release workflow - Update README with bunx/npm install instructions - Update roadmap and todo with distribution, releases, multi-dir, X.com launch Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9f4f77c commit dbf4628

27 files changed

Lines changed: 2866 additions & 1485 deletions

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
issues: write
10+
pull-requests: write
11+
id-token: write
12+
13+
jobs:
14+
release:
15+
name: Release
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- uses: oven-sh/setup-bun@v2
23+
with:
24+
bun-version: latest
25+
26+
- name: Install dependencies
27+
run: bun install
28+
29+
- name: Build dashboard
30+
run: bun run build
31+
32+
- name: Release
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
run: bunx semantic-release

.releaserc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
["@semantic-release/changelog", { "changelogFile": "CHANGELOG.md" }],
7+
"@semantic-release/npm",
8+
["@semantic-release/git", {
9+
"assets": ["CHANGELOG.md", "package.json"],
10+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
11+
}],
12+
"@semantic-release/github"
13+
]
14+
}

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Projects are grouped into **workspaces** (one per client/org). Each workspace op
6666

6767
| Module | Purpose |
6868
|--------|---------|
69-
| `src/cli.ts` | CLI entrypoint — `start`, `stop`, `version`, `help`. Flags: `--config`, `--log-level` |
69+
| `src/cli.ts` | CLI entrypoint — `start`, `stop`, `update`, `version`, `help`. Flags: `--config`, `--log-level`. Version read from `package.json` at runtime. `update` checks npm registry and self-updates via `bun install -g relayd` |
7070
| `src/constants.ts` | Shared constants: `FAILURE_HINTS`, `CallbackAction`, `CallbackData` — used by telegram, dashboard, and daemon |
7171
| `src/dashboard.ts` | `DashboardServer` — Hono + `Bun.serve()` at `localhost:7842`, serves React dashboard from `dist/`, WebSocket `/ws` for live updates, SPA fallback |
7272
| `src/api/router.ts` | Hono app combining all API routes |

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,16 @@ Optional Telegram integration with forum topics — each task gets its own threa
7272
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI (`claude` in PATH)
7373
- [GitHub CLI](https://cli.github.com) (`gh auth login` completed)
7474

75-
### Install and run
75+
### Install
7676

7777
```sh
78-
bun install
79-
bun run build
80-
relay start
78+
# Try without installing
79+
bunx relayd
80+
81+
# Install globally
82+
bun install -g relayd
83+
# or
84+
npm install -g relayd
8185
```
8286

8387
Your browser opens to `localhost:7842/setup`. Connect your integrations, point Relay at a project, and you're live.
@@ -94,6 +98,7 @@ bash scripts/uninstall-service.sh # stop and remove
9498
```
9599
relay start Start the daemon (opens dashboard)
96100
relay stop Stop the daemon
101+
relay update Update to the latest version
97102
relay version Show version
98103
```
99104

ROADMAP.md

Lines changed: 57 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -273,17 +273,34 @@ When a reviewer comments on an Relay PR, feed those comments back to Claude to a
273273

274274
Do this when Phase 1+2 are solid. Goal: someone can find Relay, install it, and have it running in under 10 minutes.
275275

276-
### 3.1 Installation
276+
### 3.1 Distribution
277277

278-
- `npm install -g relay` or `bunx relay init`
279-
- `brew install adriandmitroca/tap/relay` (Homebrew formula)
280-
- Single binary via `bun build --compile` — no Bun runtime required on the user's machine
278+
Multiple install paths to minimise friction:
281279

282-
### 3.2 Linux + Docker Support
280+
- `bunx relay` — zero-install try without committing to a global install
281+
- `bun build --compile` — single self-contained binary, no Bun runtime required
282+
- `brew install adriandmitroca/tap/relay` — Homebrew formula for macOS
283+
- `docker-compose.yml` — containerised deployment (mounts repo dirs as volumes)
284+
- systemd unit file for Linux (parallel to the existing macOS LaunchAgent script)
283285

284-
- Replace `scripts/install-service.sh` (macOS LaunchAgent) with a systemd unit file for Linux
285-
- Add `docker-compose.yml` for containerised deployment
286-
- Remove any macOS-specific path assumptions
286+
### 3.2 Multi-Directory Projects
287+
288+
Many real projects are monorepos or have separate repos per layer (e.g., `api/` in one repo, `frontend/` in another). Support this in project config:
289+
290+
```json
291+
{
292+
"key": "acme-web",
293+
"dirs": [
294+
{ "path": "/Users/dev/acme/api", "baseBranch": "main" },
295+
{ "path": "/Users/dev/acme/frontend", "baseBranch": "main" }
296+
]
297+
}
298+
```
299+
300+
- Claude gets context from all configured directories
301+
- Triage and fix run with access to the full multi-dir scope
302+
- Commits and PRs go to the correct repo per changed file
303+
- Worktrees created per repo that has changes
287304

288305
### 3.3 Better Onboarding
289306

@@ -302,6 +319,38 @@ Allow sources and notification channels to be added without modifying core:
302319

303320
Telegram is niche — Slack is where most dev teams operate. Implement as the second notification channel (and first plugin) to validate the plugin architecture.
304321

322+
### 3.6 Releases & Updates
323+
324+
**Release automation:**
325+
- Conventional commits → semantic-release on every merge to `main`
326+
- Auto-bumps version in `package.json`, generates `CHANGELOG.md`, creates GitHub Release with release notes
327+
- CI attaches compiled binaries to the GitHub Release as assets (macOS arm64, macOS x64, Linux x64)
328+
- Homebrew formula auto-updated via a `homebrew-tap` repo triggered by the release
329+
330+
**Update handling per distribution path:**
331+
332+
| Method | How updates work |
333+
|--------|-----------------|
334+
| `bunx relay` | Always pulls latest — no action needed |
335+
| Binary | `relay update` checks GitHub Releases API, downloads new binary, replaces itself |
336+
| Homebrew | `brew upgrade relay` — formula points to latest release tarball |
337+
| Docker | User pulls new image tag; `latest` tag always points to newest release |
338+
| npm global | `npm install -g relay@latest` |
339+
340+
**`relay update` command:**
341+
- Checks `https://api.github.com/repos/adriandmitroca/relay/releases/latest` against current version
342+
- If newer: downloads the appropriate binary for the current platform, verifies checksum, replaces the running binary
343+
- If already latest: prints current version and exits
344+
- On start: silent background check, prints one-line notice if a new version is available ("Relay v1.2.0 is available — run `relay update`")
345+
346+
### 3.7 X.com Launch Announcement
347+
348+
Public launch post positioning Relay as an autonomous dev agent, not just a bug-fixer:
349+
- Lead with the demo (GIF of dashboard + Telegram callback → merged PR)
350+
- Core message: "your issues, automatically triaged, fixed, and PR'd — you just review"
351+
- Cover: sources (Sentry, Asana, Linear, Jira), full web dashboard, optional Telegram
352+
- Thread format: hook → demo → how it works → how to install → what's next
353+
305354
---
306355

307356
## Open Questions

TODO.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@ See `ROADMAP.md` for full context and rationale behind each item.
1313

1414
---
1515

16-
## Phase 1.5 — Web UI as Primary Interface
17-
18-
- [ ] **Make Telegram optional** — remove hard requirement for `telegram.botToken` and `telegram.chatId` in config validation; guard all Telegram calls behind `if (telegram)` checks in daemon; run dashboard by default without any notification connector
19-
- [ ] **Web UI action buttons** — add Start Fix / Skip / Accept / Discard / Retry buttons to issue detail view; wire them to new REST endpoints (`POST /api/issues/:id/actions`) that call the same callback handler as Telegram
20-
- [ ] **Web UI streaming progress** — push `tool_use` events over WebSocket during triage/fix; show live tool name, call count, elapsed time, and running cost in issue detail
21-
- [ ] **Web UI triage result view** — display verdict, confidence score, plan, and estimated scope inline; Start Fix / Skip buttons below the plan
22-
- [ ] **Web UI approval view** — show fix summary, diff viewer with syntax highlighting, cost/token stats; Accept / Discard buttons
23-
- [ ] **Web UI failure view** — show failure reason with human-readable hint (reuse `FAILURE_HINTS`), Retry button
24-
- [ ] **Integrations status page** — new `/api/config/status` endpoint returning connected sources per workspace (Sentry, Asana, Telegram) with health/auth status; render as a settings/integrations panel in the dashboard
25-
- [ ] **Toast notifications** — browser `Notification` API for status transitions (issue picked up, triage done, fix ready for approval, failed); opt-in via dashboard settings
26-
- [ ] **Keep existing debugging** — preserve `relay logs`, `relay show`, CLI `--follow`/`--pretty` flags; web UI log viewer is additive, not a replacement
16+
## Phase 1.5 — Web UI as Primary Interface ✅
17+
18+
- [x] **Make Telegram optional**`WorkspaceConfig.telegram` is optional; all Telegram calls guarded behind `ws.telegram?`
19+
- [x] **Web UI action buttons** — Start Fix / Skip / Accept / Discard / Retry; `POST /api/issues/:id/action`; shared `executeAction()` handler used by both Telegram and REST
20+
- [x] **Web UI streaming progress**`stream_progress` WS events; live tool name, call count, elapsed time, cost in issue detail
21+
- [x] **Web UI triage result view** — verdict, confidence, plan, Start Fix / Skip buttons
22+
- [x] **Web UI approval view** — diff viewer, cost/token stats, Accept / Discard buttons
23+
- [x] **Web UI failure view** — failure reason badge, human-readable hint from `FAILURE_HINTS`, Retry button
24+
- [x] **Integrations / settings pages** — workspaces, projects, notifications, setup wizard (5-step)
25+
- [x] **Preserve CLI debugging**`relay logs`, `relay show`, `--follow`/`--pretty` flags intact
2726

2827
---
2928

@@ -37,11 +36,13 @@ See `ROADMAP.md` for full context and rationale behind each item.
3736

3837
## Phase 3 — Open Source Readiness
3938

40-
- [ ] **Single binary / easy install**`bun build --compile` for a self-contained binary; Homebrew formula; `bunx relay` fallback
41-
- [ ] **Linux + Docker support** — systemd unit file; `docker-compose.yml`; remove macOS-only assumptions
39+
- [ ] **Distribution**`bunx relay` (zero-install try); `bun build --compile` single binary; Homebrew tap; `docker-compose.yml` for containerised setups; systemd unit for Linux
40+
- [ ] **Releases & updates** — semantic-release on merge to `main`; CI builds and attaches binaries to GitHub Releases; `relay update` self-update command; version check on daemon start; Homebrew formula auto-updated from release
41+
- [ ] **Multi-directory projects** — single project config can point to multiple directories (e.g., `api/`, `frontend/`); Claude gets context from all dirs; commits and PRs go to the right repo
4242
- [ ] **`relay doctor` command** — validate entire setup (Bun, claude CLI, gh auth, config, bot token, repo paths) and report what's broken with fix instructions
4343
- [ ] **Plugin architecture** — sources and notification channels as pluggable npm packages; validate with a reference implementation
4444
- [ ] **Slack notification channel** — implement as first plugin; validates the plugin architecture works end-to-end
45+
- [ ] **X.com launch announcement** — write and publish announcement thread positioning Relay as autonomous dev agent; include demo GIF or screenshot of dashboard + Telegram in action
4546

4647
---
4748

@@ -53,4 +54,5 @@ Ideas worth revisiting later, not prioritised now.
5354
- Auto-accept for high-confidence small diffs (opt-in)
5455
- Issue batching (multiple errors → one fix)
5556
- Scheduled batch runs (overnight mode)
56-
- New source integrations (Linear, GitHub Issues, Jira)
57+
- New source integrations (GitHub Issues)
58+
- Browser toast notifications via `Notification` API

0 commit comments

Comments
 (0)