@fibteq/myrel-runner 0.12.1 → 0.14.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.
- package/README.md +57 -17
- package/dist/cli.js +67 -53
- package/dist/index.js +56 -51
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Connects your computer to a Myrel server, so a project can work in one of your
|
|
4
4
|
local folders with the coding CLI you already use: Claude Code, Codex CLI or
|
|
5
|
-
|
|
5
|
+
Antigravity CLI.
|
|
6
6
|
|
|
7
7
|
- It opens an **outbound** WebSocket to the server. No port is opened, and it works behind NAT.
|
|
8
8
|
- The server sends a task (a folder, a CLI and a prompt). The runner starts the CLI in that folder, streams its
|
|
@@ -15,12 +15,12 @@ Gemini CLI.
|
|
|
15
15
|
|
|
16
16
|
## Use
|
|
17
17
|
|
|
18
|
-
Requires Node 22+ and at least one of `claude`, `codex` or `
|
|
18
|
+
Requires Node 22+ and at least one of `claude`, `codex` or `agy` (Antigravity CLI) on your `PATH`, already signed in.
|
|
19
19
|
|
|
20
20
|
```sh
|
|
21
21
|
npx myrel-runner pair ABCD-1234 --server https://myrel.example.com # code from Myrel > Devices
|
|
22
22
|
npx myrel-runner service install # runs now and at every login
|
|
23
|
-
npx myrel-runner@latest update # later: update and restart it
|
|
23
|
+
npx myrel-runner@latest update # later: update and restart it (waits for running tasks)
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Then add folders in Myrel > Devices with **Add folder**: it browses this computer's folders through the runner
|
|
@@ -41,12 +41,36 @@ cache) and registers it to start at login:
|
|
|
41
41
|
| Linux | systemd user service `myrel-runner.service` | `journalctl --user -u myrel-runner` |
|
|
42
42
|
| Windows | `myrel-runner.vbs` in the Startup folder | `~/.myrel-runner/runner.log` |
|
|
43
43
|
|
|
44
|
-
It keeps the `PATH` of the terminal you install it from, which is where it finds `claude`, `codex` and `
|
|
44
|
+
It keeps the `PATH` of the terminal you install it from, which is where it finds `claude`, `codex` and `agy`.
|
|
45
45
|
On macOS and Linux it restarts after a crash, but not after a clean stop (the computer was removed in Myrel, or
|
|
46
46
|
`myrel-runner start` was run somewhere else with the same pairing). `myrel-runner update` installs the newest version
|
|
47
|
-
from npm and restarts the background runner on it
|
|
48
|
-
`service
|
|
49
|
-
`loginctl enable-linger`.
|
|
47
|
+
from npm and restarts the background runner on it once its running tasks finish (at most 10 minutes; `--now` restarts
|
|
48
|
+
right away). `service install` again also restarts it; `service status` shows its state and `service uninstall`
|
|
49
|
+
removes it. On Linux it starts when you log in; to start at boot without logging in, run `loginctl enable-linger`.
|
|
50
|
+
|
|
51
|
+
### Updating and settings from Myrel
|
|
52
|
+
|
|
53
|
+
From runner 0.14.0 the background runner can be updated and set up from **Myrel > Devices**, without a terminal:
|
|
54
|
+
|
|
55
|
+
- **Update** shows when npm has a newer version. The runner waits for its running tasks (at most 10 minutes; **Update
|
|
56
|
+
now** stops them, and Myrel continues them), downloads the package from npm, checks it against npm's integrity
|
|
57
|
+
hash, runs the new copy once (`--version`) and only then puts it in place of `~/.myrel-runner/bin/myrel-runner.mjs`,
|
|
58
|
+
keeping the old one as `myrel-runner.prev.mjs`. It then exits with code 75, so launchd or systemd starts the new
|
|
59
|
+
copy (on Windows it starts the Startup entry itself). If the new version is refused by the server, or does not
|
|
60
|
+
connect within 2 minutes while the server is reachable, it puts the previous copy back and restarts on it; the card
|
|
61
|
+
says so. The state across the restart is in `~/.myrel-runner/update.json`.
|
|
62
|
+
- **Settings**: the access level, worktrees and **Update by itself** (auto-update: looks for a newer version every
|
|
63
|
+
6 hours and installs it when no task is running). They are saved in `config.json` on the computer.
|
|
64
|
+
`myrel-runner settings` shows and changes the same ones here, and `myrel-runner settings remote off` stops Myrel from
|
|
65
|
+
changing them (only this computer can turn it back on).
|
|
66
|
+
|
|
67
|
+
A runner started with `myrel-runner start` in a terminal cannot restart itself, so the card shows the command
|
|
68
|
+
instead; the desktop app's runner updates with the app. Runners before 0.14.0 need `npx myrel-runner@latest update`
|
|
69
|
+
once.
|
|
70
|
+
|
|
71
|
+
If the runner shuts down while a task is running (an update or a restart of the service), it notes the task in
|
|
72
|
+
`~/.myrel-runner/interrupted.json` and tells the server when it reconnects. From runner 0.12.0, Myrel then continues
|
|
73
|
+
that turn on its own a few times, with growing waits, and says so in the thread instead of reporting a failure.
|
|
50
74
|
|
|
51
75
|
### Threads working at the same time
|
|
52
76
|
|
|
@@ -68,16 +92,24 @@ Read-only tasks (`--access read`) always run in the folder itself.
|
|
|
68
92
|
`myrel-runner start --access <level>`, or for the background runner `myrel-runner service install --access <level>` or
|
|
69
93
|
`myrel-runner update --access <level>` (both restart it). The level is saved for next time:
|
|
70
94
|
|
|
71
|
-
| level | Claude Code | Codex |
|
|
95
|
+
| level | Claude Code | Codex | Antigravity CLI |
|
|
72
96
|
|---|---|---|---|
|
|
73
|
-
| `read` | `--permission-mode plan` | `--sandbox read-only` | `--
|
|
74
|
-
| `edit` (default) | `--permission-mode acceptEdits` | `--sandbox workspace-write` | `--
|
|
75
|
-
| `auto` | `--permission-mode auto` | `--sandbox workspace-write` | `--
|
|
76
|
-
| `full` | `--permission-mode bypassPermissions` | `--sandbox danger-full-access` | `--
|
|
97
|
+
| `read` | `--permission-mode plan` | `--sandbox read-only` | `--mode plan` |
|
|
98
|
+
| `edit` (default) | `--permission-mode acceptEdits` | `--sandbox workspace-write` | `--mode accept-edits` |
|
|
99
|
+
| `auto` | `--permission-mode auto` | `--sandbox workspace-write` | `--mode accept-edits` |
|
|
100
|
+
| `full` | `--permission-mode bypassPermissions` | `--sandbox danger-full-access` | `--dangerously-skip-permissions` |
|
|
77
101
|
|
|
78
102
|
With `auto`, Claude Code's auto mode decides which steps are safe to run (tests, git commit, builds) and runs them;
|
|
79
103
|
the ones it would ask about come to you as a card in the thread. Your Claude account must have auto mode; Codex and
|
|
80
|
-
|
|
104
|
+
Antigravity CLI cannot ask mid-run, so for them `auto` is the same as `edit` (Antigravity's own auto mode needs its
|
|
105
|
+
terminal sandbox and is missing on business accounts).
|
|
106
|
+
|
|
107
|
+
Antigravity CLI is stricter than Codex below `full`: there is no sandbox where its commands run on their own. A
|
|
108
|
+
command, a web page or a file outside the folders needs approval, which it cannot ask for when Myrel runs it, and
|
|
109
|
+
being declined ends the whole run with no answer. So with `read`, `edit` and `auto` it is told to keep to the files
|
|
110
|
+
and Myrel's tools, and a run that still stops says which permission stopped it. Give it `full` to let it run
|
|
111
|
+
commands, or allow single ones under `permissions.allow` in `~/.gemini/antigravity-cli/settings.json` (e.g.
|
|
112
|
+
`command(git)`).
|
|
81
113
|
|
|
82
114
|
With `edit`, the CLI can change files in the folder but cannot run commands that would need your approval. Use
|
|
83
115
|
`full` only for folders and projects you trust: it lets the CLI run any command without asking.
|
|
@@ -85,7 +117,7 @@ With `edit`, the CLI can change files in the folder but cannot run commands that
|
|
|
85
117
|
### Project folders and asking first
|
|
86
118
|
|
|
87
119
|
A project can list other folders besides its main one (Project settings > Folders). They must be shared on this
|
|
88
|
-
computer too; the CLI gets them with `--add-dir
|
|
120
|
+
computer too; the CLI gets them with `--add-dir`.
|
|
89
121
|
|
|
90
122
|
When Claude Code runs as a thread's agent, its permission prompts go to Myrel (`--permission-prompt-tool
|
|
91
123
|
mcp__myrel__approve_access`). If a step reaches a file outside the project's folders, Myrel asks you in the thread
|
|
@@ -94,7 +126,7 @@ level does not allow on its own (with `edit`: `git commit`, `git push`, tests) i
|
|
|
94
126
|
Allow commands this turn, Don't run), so there is no need to restart the runner with `--access full` for one task. A
|
|
95
127
|
file change inside the folders with `read` is declined as before. With `full`, Claude Code then runs with
|
|
96
128
|
`acceptEdits` and commands and web tools pre-allowed instead of `bypassPermissions`, so only files outside the folders
|
|
97
|
-
are asked about. Codex and
|
|
129
|
+
are asked about. Codex and Antigravity CLI cannot ask mid-run, so they stay inside the folders.
|
|
98
130
|
|
|
99
131
|
Tasks in the same Myrel thread continue the same Claude Code session (`--resume`), so follow-ups keep context.
|
|
100
132
|
|
|
@@ -108,16 +140,24 @@ decisions, artifacts, memory, routines) added over MCP:
|
|
|
108
140
|
|---|---|
|
|
109
141
|
| Claude Code | `--mcp-config <file>`, allowed with `--allowedTools mcp__myrel` |
|
|
110
142
|
| Codex CLI | `-c mcp_servers.myrel.url=…` and `-c mcp_servers.myrel.bearer_token_env_var="MYREL_MCP_TOKEN"` |
|
|
111
|
-
|
|
|
143
|
+
| Antigravity CLI | `myrel-runner mcp-bridge` in `~/.gemini/config/mcp_config.json`, allowed with `mcp(myrel/*)` in `~/.gemini/antigravity-cli/settings.json` |
|
|
112
144
|
|
|
113
145
|
The MCP endpoint is `<server>/api/agent-mcp/<thread>` and its token is valid only for that turn. Config files holding
|
|
114
146
|
it are readable only by you and deleted when the run ends; Codex gets it in its environment instead. The whole turn
|
|
115
|
-
uses your own CLI login. Needs myrel-runner 0.4.0 or later for Claude Code, 0.5.0 or later for Codex
|
|
147
|
+
uses your own CLI login. Needs myrel-runner 0.4.0 or later for Claude Code, 0.5.0 or later for Codex, 0.13.0 or later
|
|
148
|
+
for Antigravity CLI.
|
|
149
|
+
|
|
150
|
+
Antigravity CLI takes MCP servers only from its global config, never for one run. So the runner adds one fixed
|
|
151
|
+
server there, the bridge, and an allow rule for its tools; the rest of both files stays as it is. Each run hands the
|
|
152
|
+
bridge its thread's endpoint, token and connectors in a private file (`MYREL_MCP_BRIDGE`), deleted after the run, so
|
|
153
|
+
the global config never holds a token. When you start `agy` yourself, the bridge has no run and offers no tools.
|
|
154
|
+
Connectors' tools show up there as `<connector>__<tool>`. Sign in to `agy` once yourself; runs reuse that login.
|
|
116
155
|
Projects without a local folder are worked in the cloud by OpenCode, in the thread's own sandbox.
|
|
117
156
|
|
|
118
157
|
### For apps that run it (the desktop app)
|
|
119
158
|
|
|
120
159
|
- `MYREL_SERVER` and `MYREL_RUNNER_TOKEN` override the saved pairing, and an env token is never written to disk.
|
|
160
|
+
From runner 0.12.1 the token is also removed from the environment of every CLI and command the runner starts.
|
|
121
161
|
An app that already has the user's session can pair without a code: `POST /api/runners/pairing` (as the user)
|
|
122
162
|
returns a code, and `POST /api/runner/pair` trades it for the runner token.
|
|
123
163
|
- `MYREL_RUNNER_HOME` moves the config folder.
|