@notiamo/runner 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +97 -2
- package/dist/cli.js +62823 -0
- package/package.json +52 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Veziro SASU
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,98 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @notiamo/runner
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Runs your Notiamo agent runs on your own machine, with the Claude Code you already use there.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npx @notiamo/runner init
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
`init` asks for the runner token (made in Notiamo under Settings › Agent runs › Runners, shown once), Notiamo's host
|
|
10
|
+
and a name for the runner. It checks that `claude --version` works, runs `claude auth login` into the runner's own config
|
|
11
|
+
folder, then installs the service and starts it. When it ends, the runner is running and starts again by itself.
|
|
12
|
+
|
|
13
|
+
Needs Node.js 22 or later and [Claude Code](https://docs.claude.com/en/docs/claude-code) installed on the machine.
|
|
14
|
+
|
|
15
|
+
From a checkout of the Notiamo repository: `pnpm --filter @notiamo/runner build`, then
|
|
16
|
+
`node packages/runner/dist/cli.js init`.
|
|
17
|
+
|
|
18
|
+
## Commands
|
|
19
|
+
|
|
20
|
+
| Command | What |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| `notiamo-runner init` | Set up: token, Claude Code sign-in, install and start the service. |
|
|
23
|
+
| `notiamo-runner status` | Whether the service is installed and running, and the last log line. |
|
|
24
|
+
| `notiamo-runner logs` | The last 50 lines of the log. |
|
|
25
|
+
| `notiamo-runner stop` | Stop the service until the next login or boot. |
|
|
26
|
+
| `notiamo-runner uninstall` | Remove the service (the runner's folder stays). |
|
|
27
|
+
| `notiamo-runner start` | Run in the foreground. This is what the service runs; you rarely need it. |
|
|
28
|
+
|
|
29
|
+
The service is a launchd agent `com.notiamo.runner` on macOS, a Scheduled Task "Notiamo runner" (at logon) on
|
|
30
|
+
Windows, and a systemd user unit `notiamo-runner` on Linux. After `npx`, use `npx @notiamo/runner status` (or install
|
|
31
|
+
the package globally to have `notiamo-runner` on the path).
|
|
32
|
+
|
|
33
|
+
## What it is
|
|
34
|
+
|
|
35
|
+
A small program that waits for agent runs your organization queues in Notiamo, then does each run here: it clones
|
|
36
|
+
the repository (or connects to the WordPress site), starts Claude Code in print mode with the run's instructions and
|
|
37
|
+
Notiamo's MCP server, sends Notiamo what the agent does, and reports when it ends.
|
|
38
|
+
|
|
39
|
+
## What it is not
|
|
40
|
+
|
|
41
|
+
- **It holds no Claude credential.** It starts the `claude` program already on the machine. `notiamo-runner init`
|
|
42
|
+
runs Claude Code's own sign-in with the runner's own config folder, so the runner's sessions stay apart from yours;
|
|
43
|
+
the sign-in itself is Claude Code's, kept by Claude Code.
|
|
44
|
+
- **It is not a Claude login inside Notiamo.** Notiamo never sees or uses your Claude account. As Anthropic's Agent SDK
|
|
45
|
+
documentation puts it: "Unless previously approved, Anthropic does not allow third party developers to offer
|
|
46
|
+
claude.ai login or rate limits for their products." The runner only runs your own Claude Code, on your machine, for
|
|
47
|
+
your own work.
|
|
48
|
+
|
|
49
|
+
## WordPress sites
|
|
50
|
+
|
|
51
|
+
The connection is on the project's Website access card in Notiamo: an application password, and optionally SSH or
|
|
52
|
+
FTP. A run goes like this:
|
|
53
|
+
|
|
54
|
+
1. **Backup before.** With SSH the runner exports the database (`wp db export`, `mysqldump` as the fallback) and
|
|
55
|
+
uploads it gzipped to Notiamo (`runs/<id>/backup/db.sql.gz`, 200 MB at most). With FTP or the API only there is no
|
|
56
|
+
backup.
|
|
57
|
+
2. The agent works through the allow-list below.
|
|
58
|
+
3. **Site check after.** The runner opens the site and checks that it still answers.
|
|
59
|
+
4. **Restore on failure.** If the check fails, the runner restores the dump.
|
|
60
|
+
|
|
61
|
+
What the agent may run with wp-cli, per group (set on the project):
|
|
62
|
+
|
|
63
|
+
- **content:** `post *`, `term *`, `menu *`, `media import`, `option get`, `option update`
|
|
64
|
+
- **database:** `search-replace`, `cache flush`, `rewrite flush`, `transient delete`
|
|
65
|
+
- **plugins:** `plugin` and `theme` with `list`, `activate`, `deactivate`, `update`
|
|
66
|
+
- **info:** `core version`, `site list`, `db size`
|
|
67
|
+
- **files:** no wp-cli command (the file tools)
|
|
68
|
+
- **never, unless "Allow everything":** `eval`, `eval-file`, `shell`, `user *`, `db query|import|reset|drop|export`
|
|
69
|
+
(export is the runner's own backup), `plugin install`, `theme install`, `core update|download`
|
|
70
|
+
|
|
71
|
+
Without "Allow everything", wp-cli must not read or write a file on the server for the agent: `post` takes numeric ids
|
|
72
|
+
only, `media import` takes http(s) URLs only, flags that name a file (`--export*`, `--log`, `--file`, `--dir`,
|
|
73
|
+
`--exec`, `--require`) are refused, and `option get|update` works only for `blogname`, `blogdescription`, `timezone_string`, `date_format`, `time_format`, `posts_per_page`, `show_on_front`, `page_on_front`, `page_for_posts`, `blog_public` and `permalink_structure`. `--ssh`, `--path`,
|
|
74
|
+
`--url` and `--allow-root` are always refused, even with "Allow everything".
|
|
75
|
+
|
|
76
|
+
## What is stored where
|
|
77
|
+
|
|
78
|
+
Everything lives in `~/.notiamo-runner` (or the folder in `NOTIAMO_RUNNER_HOME`):
|
|
79
|
+
|
|
80
|
+
| Path | What |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| `config.json` | Notiamo's address, the runner's name and the runner token (`ntr_…`), nothing else. Readable by you only (mode 0600). |
|
|
83
|
+
| `claude/` | Claude Code's config folder for the runner (`CLAUDE_CONFIG_DIR`): its sign-in and sessions. |
|
|
84
|
+
| `projects/` | The working copies of your projects, one folder per project. |
|
|
85
|
+
| `runner.log` | What the runner did (no secrets), rotated at 10 MB. |
|
|
86
|
+
| `state.json` | The run in progress, so a restart can carry on. |
|
|
87
|
+
|
|
88
|
+
The secrets of a run (WordPress passwords, the run's MCP token) come from Notiamo with the run and
|
|
89
|
+
live only in memory: the agent gets them as environment variables (the MCP config on its command line only names them),
|
|
90
|
+
never in a file. The two MCP tokens are `NOTIAMO_RUN_TOKEN` and `NOTIAMO_WP_TOKEN`. What the agent prints is scrubbed
|
|
91
|
+
of them before the transcript is uploaded.
|
|
92
|
+
|
|
93
|
+
The runner never gets a GitHub token. The machine's own git credentials clone and push; Notiamo opens and merges the
|
|
94
|
+
pull request through its GitHub App.
|
|
95
|
+
|
|
96
|
+
The SSH host key of a WordPress server is not verified yet.
|
|
97
|
+
|
|
98
|
+
Revoke the runner in Notiamo and its token stops working at once.
|