@fibteq/myrel-runner 0.12.0 → 0.14.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 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
- Gemini CLI.
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 `gemini` on your `PATH`, already signed in.
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 `gemini`.
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 (`service install` again also restarts it); `service status` shows its state and
48
- `service uninstall` removes it. On Linux it starts when you log in; to start at boot without logging in, run
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,17 @@ 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 | Gemini CLI |
95
+ | level | Claude Code | Codex | Antigravity CLI |
72
96
  |---|---|---|---|
73
- | `read` | `--permission-mode plan` | `--sandbox read-only` | `--approval-mode default` |
74
- | `edit` (default) | `--permission-mode acceptEdits` | `--sandbox workspace-write` | `--approval-mode auto_edit` |
75
- | `auto` | `--permission-mode auto` | `--sandbox workspace-write` | `--approval-mode auto_edit` |
76
- | `full` | `--permission-mode bypassPermissions` | `--sandbox danger-full-access` | `--approval-mode yolo` |
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
- Gemini CLI cannot ask mid-run, so for them `auto` is the same as `edit`.
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).
81
106
 
82
107
  With `edit`, the CLI can change files in the folder but cannot run commands that would need your approval. Use
83
108
  `full` only for folders and projects you trust: it lets the CLI run any command without asking.
@@ -85,7 +110,7 @@ With `edit`, the CLI can change files in the folder but cannot run commands that
85
110
  ### Project folders and asking first
86
111
 
87
112
  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` (Claude Code, Codex) or `--include-directories` (Gemini CLI).
113
+ computer too; the CLI gets them with `--add-dir`.
89
114
 
90
115
  When Claude Code runs as a thread's agent, its permission prompts go to Myrel (`--permission-prompt-tool
91
116
  mcp__myrel__approve_access`). If a step reaches a file outside the project's folders, Myrel asks you in the thread
@@ -94,7 +119,7 @@ level does not allow on its own (with `edit`: `git commit`, `git push`, tests) i
94
119
  Allow commands this turn, Don't run), so there is no need to restart the runner with `--access full` for one task. A
95
120
  file change inside the folders with `read` is declined as before. With `full`, Claude Code then runs with
96
121
  `acceptEdits` and commands and web tools pre-allowed instead of `bypassPermissions`, so only files outside the folders
97
- are asked about. Codex and Gemini CLI cannot ask mid-run, so they stay inside the folders.
122
+ are asked about. Codex and Antigravity CLI cannot ask mid-run, so they stay inside the folders.
98
123
 
99
124
  Tasks in the same Myrel thread continue the same Claude Code session (`--resume`), so follow-ups keep context.
100
125
 
@@ -108,16 +133,24 @@ decisions, artifacts, memory, routines) added over MCP:
108
133
  |---|---|
109
134
  | Claude Code | `--mcp-config <file>`, allowed with `--allowedTools mcp__myrel` |
110
135
  | Codex CLI | `-c mcp_servers.myrel.url=…` and `-c mcp_servers.myrel.bearer_token_env_var="MYREL_MCP_TOKEN"` |
111
- | Gemini CLI | its own settings file, through `GEMINI_CLI_SYSTEM_SETTINGS_PATH` |
136
+ | Antigravity CLI | `myrel-runner mcp-bridge` in `~/.gemini/config/mcp_config.json`, allowed with `mcp(myrel/*)` in `~/.gemini/antigravity-cli/settings.json` |
112
137
 
113
138
  The MCP endpoint is `<server>/api/agent-mcp/<thread>` and its token is valid only for that turn. Config files holding
114
139
  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 and Gemini CLI.
140
+ 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
141
+ for Antigravity CLI.
142
+
143
+ Antigravity CLI takes MCP servers only from its global config, never for one run. So the runner adds one fixed
144
+ server there, the bridge, and an allow rule for its tools; the rest of both files stays as it is. Each run hands the
145
+ bridge its thread's endpoint, token and connectors in a private file (`MYREL_MCP_BRIDGE`), deleted after the run, so
146
+ the global config never holds a token. When you start `agy` yourself, the bridge has no run and offers no tools.
147
+ Connectors' tools show up there as `<connector>__<tool>`. Sign in to `agy` once yourself; runs reuse that login.
116
148
  Projects without a local folder are worked in the cloud by OpenCode, in the thread's own sandbox.
117
149
 
118
150
  ### For apps that run it (the desktop app)
119
151
 
120
152
  - `MYREL_SERVER` and `MYREL_RUNNER_TOKEN` override the saved pairing, and an env token is never written to disk.
153
+ From runner 0.12.1 the token is also removed from the environment of every CLI and command the runner starts.
121
154
  An app that already has the user's session can pair without a code: `POST /api/runners/pairing` (as the user)
122
155
  returns a code, and `POST /api/runner/pair` trades it for the runner token.
123
156
  - `MYREL_RUNNER_HOME` moves the config folder.