openrune 0.2.0 → 0.2.2
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 +113 -105
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,13 +19,14 @@
|
|
|
19
19
|
|
|
20
20
|
## What is Rune?
|
|
21
21
|
|
|
22
|
-
Rune
|
|
22
|
+
Rune is a file-based agent harness for [Claude Code](https://docs.anthropic.com/en/docs/claude-code). Each `.rune` file is an independent AI agent with its own role, memory, and context. Run it from the CLI, chain agents together, automate with triggers, or open the desktop UI.
|
|
23
23
|
|
|
24
24
|
- **File-based** — One `.rune` file = one agent. Move it, share it, version it with git.
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
25
|
+
- **Headless execution** — Run agents from the CLI or scripts. No GUI needed.
|
|
26
|
+
- **Agent chaining** — Pipe agents together in a pipeline. Output → input, automatically.
|
|
27
|
+
- **Automated triggers** — Run agents on file changes, git commits, or a cron schedule.
|
|
28
|
+
- **Node.js API** — Use agents programmatically with `require('openrune')`.
|
|
29
|
+
- **Desktop UI** — Chat interface with real-time activity monitoring and built-in terminal.
|
|
29
30
|
|
|
30
31
|
---
|
|
31
32
|
|
|
@@ -33,19 +34,15 @@ Rune turns any folder into an AI workspace. Each `.rune` file is an independent
|
|
|
33
34
|
|
|
34
35
|
Building a Claude Code harness usually means wiring up process management, I/O parsing, state handling, and a UI from scratch. Rune lets you skip all of that — just drop a file and go.
|
|
35
36
|
|
|
36
|
-
**No harness boilerplate** — No SDK wiring, no process management, no custom I/O parsing. One `.rune` file gives you a fully working
|
|
37
|
-
|
|
38
|
-
**Persistent context** — Your agent remembers everything. Close the app, reopen it next week — the conversation and context are right where you left off.
|
|
37
|
+
**No harness boilerplate** — No SDK wiring, no process management, no custom I/O parsing. One `.rune` file gives you a fully working agent you can run from CLI, scripts, or the desktop UI.
|
|
39
38
|
|
|
40
|
-
**
|
|
39
|
+
**Persistent context** — Role, memory, and chat history live in the `.rune` file. Close the app, reopen it next week — the agent picks up right where you left off.
|
|
41
40
|
|
|
42
|
-
**
|
|
41
|
+
**Portable & shareable** — The `.rune` file is just JSON. Commit it to git, share it with teammates, or move it to another machine. The agent goes wherever the file goes.
|
|
43
42
|
|
|
44
|
-
**
|
|
43
|
+
**Multiple agents per project** — A reviewer, a backend dev, a designer — each with its own role and history, working side by side in the same folder.
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
<img src="demo.gif" width="100%" alt="Rune demo" />
|
|
48
|
-
</p>
|
|
45
|
+
**Scriptable** — Chain agents, set up triggers, or call agents from your own code via the Node.js API. One file format, multiple ways to use it.
|
|
49
46
|
|
|
50
47
|
---
|
|
51
48
|
|
|
@@ -62,102 +59,57 @@ Building a Claude Code harness usually means wiring up process management, I/O p
|
|
|
62
59
|
npm install -g openrune
|
|
63
60
|
```
|
|
64
61
|
|
|
65
|
-
### 2. Create
|
|
62
|
+
### 2. Create an agent
|
|
66
63
|
|
|
67
64
|
```bash
|
|
68
65
|
cd ~/my-project
|
|
69
|
-
rune new
|
|
66
|
+
rune new reviewer --role "Code reviewer, security focused"
|
|
70
67
|
```
|
|
71
68
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<p align="center">
|
|
75
|
-
<img src="Screenshot.png" width="500" alt="Right-click to create a Rune agent" />
|
|
76
|
-
</p>
|
|
69
|
+
### 3. Run it
|
|
77
70
|
|
|
78
|
-
|
|
71
|
+
```bash
|
|
72
|
+
# Headless — run from CLI, get results in your terminal
|
|
73
|
+
rune run reviewer.rune "Review the latest commit"
|
|
79
74
|
|
|
80
|
-
|
|
75
|
+
# Pipe input from other commands
|
|
76
|
+
git diff | rune run reviewer.rune "Review this diff"
|
|
81
77
|
|
|
82
|
-
|
|
83
|
-
rune open
|
|
78
|
+
# Desktop UI — open the chat interface
|
|
79
|
+
rune open reviewer.rune
|
|
84
80
|
```
|
|
85
81
|
|
|
86
82
|
---
|
|
87
83
|
|
|
88
|
-
##
|
|
89
|
-
|
|
90
|
-
### Chat UI
|
|
91
|
-
|
|
92
|
-
- **Markdown rendering** — Code blocks, tables, lists with syntax highlighting.
|
|
93
|
-
- **File attachment** — Drag and drop files or click to attach. The agent reads them from your filesystem.
|
|
94
|
-
- **Stream cancellation** — Stop a response mid-stream.
|
|
95
|
-
- **Chat history** — Persisted in the `.rune` file. Clear anytime.
|
|
96
|
-
|
|
97
|
-
### Real-time Activity Monitoring
|
|
98
|
-
|
|
99
|
-
Rune uses [Claude Code hooks](https://docs.anthropic.com/en/docs/claude-code/hooks) to capture all agent activity in real-time:
|
|
100
|
-
|
|
101
|
-
- **Tool calls** — See when the agent reads files, edits code, runs commands.
|
|
102
|
-
- **Tool results** — See the output of each action.
|
|
103
|
-
- **Permission requests** — Get notified when the agent needs approval.
|
|
104
|
-
- **Session events** — Track when sessions start, stop, or encounter errors.
|
|
84
|
+
## Use Cases
|
|
105
85
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
### Built-in Terminal
|
|
109
|
-
|
|
110
|
-
Toggle the terminal panel to see raw Claude Code output or run your own commands alongside the agent.
|
|
111
|
-
|
|
112
|
-
### Agent Roles
|
|
86
|
+
**Solo dev workflow** — Create `reviewer.rune` and `coder.rune` in your project. Use one to write code, the other to review it. Each agent keeps its own context and history.
|
|
113
87
|
|
|
88
|
+
**Automated code review** — Set up a trigger to review every commit automatically:
|
|
114
89
|
```bash
|
|
115
|
-
|
|
116
|
-
rune new assistant
|
|
117
|
-
|
|
118
|
-
# Specialized agents
|
|
119
|
-
rune new designer --role "UI/UX design expert"
|
|
120
|
-
rune new backend --role "Backend developer, Node.js specialist"
|
|
121
|
-
rune new reviewer --role "Code reviewer, focused on security and performance"
|
|
90
|
+
rune watch reviewer.rune --on git-commit --prompt "Review this commit for bugs and security issues"
|
|
122
91
|
```
|
|
123
92
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
```json
|
|
129
|
-
{
|
|
130
|
-
"name": "myagent",
|
|
131
|
-
"role": "General assistant",
|
|
132
|
-
"icon": "bot",
|
|
133
|
-
"createdAt": "2025-01-01T00:00:00Z",
|
|
134
|
-
"history": []
|
|
135
|
-
}
|
|
93
|
+
**CI/CD integration** — Run agents headlessly in your pipeline:
|
|
94
|
+
```bash
|
|
95
|
+
rune run qa.rune "Run tests and report any failures" --output json
|
|
136
96
|
```
|
|
137
97
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
98
|
+
**Agent pipeline** — Chain specialized agents for complex tasks:
|
|
99
|
+
```bash
|
|
100
|
+
rune pipe architect.rune coder.rune reviewer.rune "Add OAuth2 login flow"
|
|
101
|
+
```
|
|
141
102
|
|
|
142
|
-
|
|
103
|
+
**Team collaboration** — Commit `.rune` files to git. Your teammates get the same agent with the same role and memory — no setup needed.
|
|
143
104
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
| `rune new <name> --role "..."` | Create with a custom role |
|
|
149
|
-
| `rune open <file.rune>` | Open a `.rune` file (desktop GUI) |
|
|
150
|
-
| `rune run <file.rune> "prompt"` | Run agent headlessly (no GUI) |
|
|
151
|
-
| `rune pipe <a.rune> <b.rune> "prompt"` | Chain agents in a pipeline |
|
|
152
|
-
| `rune watch <file.rune> --on <event>` | Set up automated triggers |
|
|
153
|
-
| `rune list` | List `.rune` files in the current directory |
|
|
154
|
-
| `rune uninstall` | Remove Rune integration (keeps your `.rune` files) |
|
|
105
|
+
**Monitoring** — Schedule an agent to check things periodically:
|
|
106
|
+
```bash
|
|
107
|
+
rune watch ops.rune --on cron --interval 10m --prompt "Check if the API is healthy"
|
|
108
|
+
```
|
|
155
109
|
|
|
156
110
|
---
|
|
157
111
|
|
|
158
|
-
## Harness
|
|
159
|
-
|
|
160
|
-
Rune isn't just a desktop app — it's a full agent harness. Use it from scripts, CI/CD, or your own tools.
|
|
112
|
+
## Harness
|
|
161
113
|
|
|
162
114
|
### Headless execution
|
|
163
115
|
|
|
@@ -218,24 +170,85 @@ const { finalOutput } = await rune.pipe(
|
|
|
218
170
|
|
|
219
171
|
---
|
|
220
172
|
|
|
173
|
+
## Desktop UI
|
|
174
|
+
|
|
175
|
+
Rune also includes a desktop app for interactive use. Double-click a `.rune` file or run `rune open`.
|
|
176
|
+
|
|
177
|
+
- **Chat interface** — Markdown rendering, file attachment, stream cancellation.
|
|
178
|
+
- **Real-time activity** — See every tool call, result, and permission request as it happens via [Claude Code hooks](https://docs.anthropic.com/en/docs/claude-code/hooks).
|
|
179
|
+
- **Built-in terminal** — Raw Claude Code output and your own commands, side by side.
|
|
180
|
+
- **Right-click to create** — macOS Quick Action lets you create agents from Finder.
|
|
181
|
+
|
|
182
|
+
<p align="center">
|
|
183
|
+
<img src="demo.gif" width="100%" alt="Rune demo" />
|
|
184
|
+
</p>
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## The `.rune` File
|
|
189
|
+
|
|
190
|
+
A `.rune` file is just JSON:
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"name": "reviewer",
|
|
195
|
+
"role": "Code reviewer, security focused",
|
|
196
|
+
"createdAt": "2025-01-01T00:00:00Z",
|
|
197
|
+
"history": [],
|
|
198
|
+
"memory": []
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Edit the `role` field anytime to change the agent's behavior. History and memory persist across sessions automatically.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## CLI Commands
|
|
207
|
+
|
|
208
|
+
| Command | Description |
|
|
209
|
+
|---------|-------------|
|
|
210
|
+
| `rune new <name>` | Create a `.rune` file in the current directory |
|
|
211
|
+
| `rune new <name> --role "..."` | Create with a custom role |
|
|
212
|
+
| `rune run <file.rune> "prompt"` | Run agent headlessly (no GUI) |
|
|
213
|
+
| `rune pipe <a.rune> <b.rune> "prompt"` | Chain agents in a pipeline |
|
|
214
|
+
| `rune watch <file.rune> --on <event>` | Set up automated triggers |
|
|
215
|
+
| `rune open <file.rune>` | Open a `.rune` file (desktop GUI) |
|
|
216
|
+
| `rune list` | List `.rune` files in the current directory |
|
|
217
|
+
| `rune install` | Build app, register file association, install Quick Action |
|
|
218
|
+
| `rune uninstall` | Remove Rune integration (keeps your `.rune` files) |
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
221
222
|
## Architecture
|
|
222
223
|
|
|
223
224
|
```
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
↕
|
|
228
|
-
|
|
229
|
-
↕
|
|
230
|
-
|
|
225
|
+
┌─────────────────────────┐
|
|
226
|
+
│ Desktop UI Mode │
|
|
227
|
+
│ User ↔ Chat UI (React) │
|
|
228
|
+
│ ↕ IPC │
|
|
229
|
+
│ Electron Main Process │
|
|
230
|
+
│ ↕ HTTP + SSE │
|
|
231
|
+
└────────────┬────────────┘
|
|
232
|
+
│
|
|
233
|
+
┌────────────┴────────────┐
|
|
234
|
+
│ MCP Channel │ Claude Code Hooks
|
|
235
|
+
│ (rune-channel) │ ↕ HTTP POST
|
|
236
|
+
│ ↕ MCP │←──── rune-channel /hook
|
|
237
|
+
└────────────┬────────────┘
|
|
238
|
+
│
|
|
239
|
+
┌────────────┴────────────┐
|
|
240
|
+
│ Claude Code CLI │
|
|
241
|
+
└─────────────────────────┘
|
|
242
|
+
|
|
243
|
+
Harness Mode (rune run / pipe / watch):
|
|
244
|
+
CLI → Claude Code CLI (-p) → stdout
|
|
245
|
+
No MCP channel, no Electron — direct execution
|
|
231
246
|
```
|
|
232
247
|
|
|
233
|
-
**Two
|
|
234
|
-
|
|
235
|
-
1. **Chat input** → MCP channel → Claude Code (user messages)
|
|
236
|
-
2. **Claude Code hooks** → rune-channel → SSE → Chat UI (activity monitoring)
|
|
248
|
+
**Two modes of operation:**
|
|
237
249
|
|
|
238
|
-
|
|
250
|
+
1. **Harness** — Direct CLI execution via `claude -p`. Agents run headlessly with context from the `.rune` file.
|
|
251
|
+
2. **Desktop UI** — Chat input → MCP channel → Claude Code, with hooks for real-time activity monitoring.
|
|
239
252
|
|
|
240
253
|
---
|
|
241
254
|
|
|
@@ -263,7 +276,8 @@ npm run build
|
|
|
263
276
|
|
|
264
277
|
```
|
|
265
278
|
Rune/
|
|
266
|
-
bin/rune.js # CLI
|
|
279
|
+
bin/rune.js # CLI (install, new, open, run, pipe, watch, list)
|
|
280
|
+
lib/index.js # Node.js API (require('openrune'))
|
|
267
281
|
src/
|
|
268
282
|
main.ts # Electron main process
|
|
269
283
|
preload.ts # Preload bridge (IPC security)
|
|
@@ -279,12 +293,6 @@ Rune/
|
|
|
279
293
|
lib/ # Utilities
|
|
280
294
|
```
|
|
281
295
|
|
|
282
|
-
### Hooks Configuration
|
|
283
|
-
|
|
284
|
-
Rune automatically sets up Claude Code hooks in `~/.claude/settings.json`. The hooks only fire when `RUNE_CHANNEL_PORT` is set, so they don't affect standalone Claude Code usage.
|
|
285
|
-
|
|
286
|
-
Captured events: `PreToolUse`, `PostToolUse`, `PermissionRequest`, `UserPromptSubmit`, `Stop`, `Notification`, `SessionStart`, `SessionEnd`.
|
|
287
|
-
|
|
288
296
|
---
|
|
289
297
|
|
|
290
298
|
## Important Notice
|
package/package.json
CHANGED