@notiamo/runner 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 +39 -0
- package/dist/cli.js +441 -259
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,10 +22,12 @@ From a checkout of the Notiamo repository: `pnpm --filter @notiamo/runner build`
|
|
|
22
22
|
| Command | What |
|
|
23
23
|
| --- | --- |
|
|
24
24
|
| `notiamo-runner init` | Set up: token, Claude Code sign-in, install and start the service. |
|
|
25
|
+
| `notiamo-runner update` | Move a runner that is set up to the version you run it from: the token, name and sign-in stay; the checks run again; the service starts the new version. `npx @notiamo/runner@latest update` (add `--profile <name>` for a named runner). |
|
|
25
26
|
| `notiamo-runner status` | Whether the service is installed and running, and the last log line. |
|
|
26
27
|
| `notiamo-runner logs` | The last 50 lines of the log. |
|
|
27
28
|
| `notiamo-runner stop` | Stop the service until the next login or boot. |
|
|
28
29
|
| `notiamo-runner uninstall` | Remove the service (the runner's folder stays). |
|
|
30
|
+
| `notiamo-runner env <projectId>` | Make or show the env file this machine gives the runs of one project (see "Your own projects" below). |
|
|
29
31
|
| `notiamo-runner start` | Run in the foreground. This is what the service runs; you rarely need it. |
|
|
30
32
|
|
|
31
33
|
The service is a launchd agent `com.notiamo.runner` on macOS, a Scheduled Task "Notiamo runner" (at logon) on
|
|
@@ -113,6 +115,43 @@ that arrives while the first still runs here).
|
|
|
113
115
|
Each run at the same time has its own slot folder, `projects/0`, `projects/1` or `projects/2`, made when the runner
|
|
114
116
|
starts: a run's sandbox cannot read the other slots at all, even a project cloned there after the run began.
|
|
115
117
|
|
|
118
|
+
## Your own projects: an environment for the runs
|
|
119
|
+
|
|
120
|
+
A run on a GitHub project gets a clean clone and nothing else. For a client's WordPress site that is all it needs.
|
|
121
|
+
For a SaaS project of your own, the agent also needs to run the tests, and those need a database, a file store, a
|
|
122
|
+
mail catcher and a `.env`. The runner machine gives them to the runs of one project with a plain file:
|
|
123
|
+
|
|
124
|
+
```sh
|
|
125
|
+
npx @notiamo/runner env <projectId> # add --profile <name> for a named runner
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`<projectId>` is the last part of the project page's address in Notiamo. The command makes
|
|
129
|
+
`~/.notiamo-runner/env/<projectId>.env` (or the profile's `env/` folder), readable by you only, and prints the path.
|
|
130
|
+
Put one `KEY=VALUE` per line (`#` comments, quotes and an `export ` prefix are fine; nothing is expanded). The next
|
|
131
|
+
run of that project gets the variables in its shell, and the agent is told their names (never the values). Remove
|
|
132
|
+
the file to take them away. The file never leaves the machine: Notiamo does not know it exists.
|
|
133
|
+
|
|
134
|
+
With the file present, the run's shell may also reach services on `127.0.0.1` on macOS: your Postgres, MinIO,
|
|
135
|
+
Mailpit, a dev server. You keep them running (Docker Desktop at login, say); the agent cannot start them, Docker
|
|
136
|
+
stays out of its reach. Point the variables at them, for example `DATABASE_URL=postgres://app:app@127.0.0.1:5450/app_test`.
|
|
137
|
+
On Linux the sandbox gives the shell its own network namespace, so `127.0.0.1` there is not the machine's: bind the
|
|
138
|
+
services to the machine's LAN address and add that host on the Runners card under "Extra hosts". Windows has no
|
|
139
|
+
shell sandbox, so there nothing stands between the shell and `127.0.0.1`.
|
|
140
|
+
|
|
141
|
+
Rules:
|
|
142
|
+
|
|
143
|
+
- **Dev and test values only.** The agent runs shell commands and can read every variable. Never a production key,
|
|
144
|
+
never a password you use elsewhere. Use the project's fake switches (`AI_FAKE=1`, `STRIPE_FAKE=1`…) instead of
|
|
145
|
+
real services where you can.
|
|
146
|
+
- `PATH`, `HOME`, the proxy and certificate variables (`HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY`, `NODE_EXTRA_CA_CERTS`,
|
|
147
|
+
`SSL_CERT_*`), `NODE_OPTIONS`, `NODE_TLS_REJECT_UNAUTHORIZED`, `NOTIAMO_*`, `GIT_*`, `CLAUDE_*` and `ANTHROPIC_*` are
|
|
148
|
+
ignored (the log says so), and the runner's own variables always win over the file: the file can change what the
|
|
149
|
+
agent's commands see, never how Claude Code itself talks to Anthropic and Notiamo.
|
|
150
|
+
- Values of 6 characters or more are masked as `[secret]` in the transcript Notiamo receives, like the run's tokens.
|
|
151
|
+
Short values (`1`, `true`) are not.
|
|
152
|
+
- Keep **Runs at once** at 1 on a runner whose projects share a database through their env file: two runs of one
|
|
153
|
+
project at the same time would run their tests on the same database.
|
|
154
|
+
|
|
116
155
|
## A runner for one client
|
|
117
156
|
|
|
118
157
|
When you make a runner in Notiamo, you can limit it to one client (workspace). It then takes only that client's runs.
|