mergejudge-runner 0.1.0 → 0.2.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.
Files changed (3) hide show
  1. package/README.md +16 -2
  2. package/dist/cli.js +14214 -13857
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # mergejudge-runner
2
2
 
3
- Runs the model step of a MergeJudge review on **your own machine**, with your own Claude Code login. MergeJudge Cloud keeps handling GitHub events, lanes, the panel and posting; the runner connects **out** over HTTPS (protocol `/runner/v1`), takes review jobs, and sends back a result. No inbound ports.
3
+ Runs the model step of a MergeJudge review on **your own machine**, with your own Claude Code or Codex (ChatGPT) login, or a GLM (z.ai) API key. MergeJudge Cloud keeps handling GitHub events, lanes, the panel and posting; the runner connects **out** over HTTPS (protocol `/runner/v1`), takes review jobs, and sends back a result. No inbound ports.
4
4
 
5
5
  Status: MVP. Design: [docs/RUNNERS_DESIGN.md](../../docs/RUNNERS_DESIGN.md).
6
6
 
@@ -10,7 +10,7 @@ Status: MVP. Design: [docs/RUNNERS_DESIGN.md](../../docs/RUNNERS_DESIGN.md).
10
10
  npx mergejudge-runner setup <code> # code from the panel: Runners > Add runner
11
11
  ```
12
12
 
13
- Registers the runner, checks that `claude` is signed in, and offers to start it at login (launchd / systemd user unit). Flags: `--yes`, `--no-autostart`, `--print-unit`; `MERGEJUDGE_URL` overrides the server. See the [guide](https://mergejudge.si/guide/run-on-your-machine).
13
+ Registers the runner, detects which of `claude` and `codex` are installed and signed in (`claude auth status`, `codex login status`; Codex counts only when signed in **with ChatGPT**, an API-key login is warned about and codex is not offered), asks yes/no about a GLM (z.ai) API key, and offers to start it at login (launchd / systemd user unit). Flags: `--yes`, `--no-autostart`, `--print-unit`, `--engine <claude-code|codex|glm>`, `--model [engine=]<model>` (repeatable), `--glm-key-env NAME`, `--no-glm`; `MERGEJUDGE_URL` overrides the server. See the [guide](https://mergejudge.si/guide/run-on-your-machine).
14
14
 
15
15
  ## Install (from source)
16
16
 
@@ -35,6 +35,20 @@ mergejudge-runner register --code mjr_e_... --url https://app.mergejudge.si --na
35
35
 
36
36
  This stores the runner id and token in `$XDG_CONFIG_HOME/mergejudge-runner/config.json` (default `~/.config/...`). The directory is `0700`, the file `0600`, written atomically. The runner **refuses to start** if the file is readable by group or others. Only `https://` URLs are accepted (`http://` only for localhost). Use `--force` to replace an existing registration, `--claude-bin /path/to/claude` to pin the binary.
37
37
 
38
+ ## Engines and models
39
+
40
+ | Engine | What runs | Billing |
41
+ |---|---|---|
42
+ | `claude-code` | `claude -p --tools ""` on your subscription | subscription |
43
+ | `codex` | `codex exec --sandbox read-only --skip-git-repo-check --ephemeral --color never --ignore-user-config [-m MODEL] --output-schema <file> -o <file> -` (prompt on stdin, ChatGPT login) | subscription |
44
+ | `glm` | `claude -p` with `ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic` and `ANTHROPIC_AUTH_TOKEN=<your key>` set only in the child env | **API key (billed per use)** |
45
+
46
+ - The runner declares its engines, billing and models when it registers and on the runner heartbeat at every start. The config keeps `engine` (default), `engines: { name: { model, models } }` and, for GLM, `glmApiKey` (config is `0600`; `ZAI_API_KEY` in the environment works too). `models: ["*"]` offers any model.
47
+ - A repo can ask for an engine/model in the panel or in `.mergejudge.yml` (`runner.engine`, `runner.model`; the panel wins). If this runner does not offer it, the job is nacked with `code: "unsupported"` and a reason, no attempt is used, and it stays queued for other runners.
48
+ - A 0.1.0 config (no `engines`) keeps working as `claude-code` with the default model.
49
+ - Codex needs a ChatGPT sign-in: at startup the runner runs `codex login status` and drops codex from its capabilities on an API-key login or no login; a codex job that still arrives is nacked `unsupported` with that reason.
50
+ - Never passed to any engine: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `CODEX_API_KEY`, the runner token. The z.ai key is only in the GLM child's env and is masked in logs.
51
+
38
52
  ## Run
39
53
 
40
54
  ```sh