@omniralph/agent 0.0.0-stage → 0.3.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 CHANGED
@@ -1,3 +1,86 @@
1
- # Temporary Holding Version
1
+ # @omniralph/agent
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `omniralph-agent` is the Omniralph agent host daemon. It pulls review jobs from an Omniralph
4
+ control panel and runs them with the Claude Agent SDK. It needs Node 22 and git ≥ 2.40.
5
+
6
+ This README covers installing and releasing the package. To set up a host (a dedicated Unix user,
7
+ the Claude login, systemd, tmux or pm2), see
8
+ [docs/deploy-agent.md](https://github.com/mcm/omniralph/blob/main/docs/deploy-agent.md).
9
+
10
+ ## Install
11
+
12
+ The package is public on the npm registry: installing it needs no npm token. To install globally
13
+ without root, point npm's prefix at your home:
14
+
15
+ ```sh
16
+ npm config set prefix ~/.local # binaries go to ~/.local/bin; put it on PATH
17
+ npm install -g @omniralph/agent
18
+ omniralph-agent --version
19
+ ```
20
+
21
+ ## Enroll
22
+
23
+ As an admin, open **Agents › Enroll agent** in the control panel and run the command it shows on
24
+ the host, as the agent's user:
25
+
26
+ ```sh
27
+ omniralph-agent enroll --server https://omniralph.example.com --token <enrollment-token>
28
+ ```
29
+
30
+ This writes `~/.config/omniralph/agent.json`. Run `omniralph-agent --help` to see all the options.
31
+
32
+ ## Start
33
+
34
+ ```sh
35
+ omniralph-agent start --healthz-port 9310
36
+ ```
37
+
38
+ To run it as a service, see the systemd, tmux and pm2 sections in
39
+ [docs/deploy-agent.md](https://github.com/mcm/omniralph/blob/main/docs/deploy-agent.md).
40
+
41
+ ## Upgrade
42
+
43
+ Stop the agent, then:
44
+
45
+ ```sh
46
+ npm install -g @omniralph/agent@latest
47
+ omniralph-agent --version
48
+ ```
49
+
50
+ Start it again. Upgrading keeps the config and the repo cache. The version shows on the agent's
51
+ row on the **Agents** page after its next heartbeat.
52
+
53
+ ### From 0.3.0 or earlier (`@iamthemcmaster/omniralph-agent`)
54
+
55
+ Up to 0.3.0 the package was `@iamthemcmaster/omniralph-agent`; from 0.3.1 it's `@omniralph/agent`.
56
+ Agents on 0.3.0 or earlier can't self-update across the rename (they'd install the old package
57
+ name), so upgrade them by hand once. Both packages install the `omniralph-agent` binary, so remove
58
+ the old one first.
59
+
60
+ ```sh
61
+ npm uninstall -g @iamthemcmaster/omniralph-agent
62
+ npm install -g @omniralph/agent@latest
63
+ omniralph-agent --version
64
+ ```
65
+
66
+ Under pm2, run `pm2 restart omniralph-agent` afterwards. Self-update works again from 0.3.1 on.
67
+
68
+ ## Releasing
69
+
70
+ GitHub Actions (`.github/workflows/publish-agent.yml`) publishes releases through npm trusted
71
+ publishing. No npm publish token is stored anywhere.
72
+
73
+ 1. Bump `version` in `apps/agent/package.json` and merge the change to `main`.
74
+ 2. Tag that commit `agent-v<version>` and push the tag:
75
+
76
+ ```sh
77
+ git tag agent-v0.2.0 && git push origin agent-v0.2.0
78
+ ```
79
+
80
+ The workflow runs the quality gates and `scripts/smoke-agent-package.sh`, then publishes. It fails
81
+ if the tag version doesn't match `package.json`.
82
+
83
+ The build (`tsup`) inlines the workspace packages (`@omniralph/engine`, `@omniralph/shared`) into
84
+ `dist/cli.js`. Third-party packages stay external. A third-party package that the bundle imports
85
+ must be listed in this package's `dependencies`, or the installed binary won't start. The smoke
86
+ script catches this.