@mifune/agro 0.9.0 → 0.11.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/NOTICE +2 -2
- package/README.md +25 -51
- package/dist/agro.js +2023 -1682
- package/dist/oh.js +2023 -1682
- package/package.json +6 -6
package/NOTICE
CHANGED
|
@@ -9,9 +9,9 @@ of the License is included in the LICENSE file.
|
|
|
9
9
|
Third-Party Attributions
|
|
10
10
|
=========================
|
|
11
11
|
|
|
12
|
-
typescript (referenced in .
|
|
12
|
+
typescript (referenced in .agro/cli/package-lock.json) is the sole dependency
|
|
13
13
|
in this repository declaring "license": "Apache-2.0". It is a devDependency
|
|
14
|
-
(.
|
|
14
|
+
(.agro/cli/package.json, "devDependencies") used only for type-checking and is
|
|
15
15
|
excluded from the published package, whose "files" array is limited to
|
|
16
16
|
"dist" (bundled output produced by esbuild, not the typescript package
|
|
17
17
|
itself). It therefore carries no NOTICE obligation for consumers of this
|
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @mifune/agro
|
|
2
2
|
|
|
3
|
-
The **AGRO CLI** (`agro`) — create an [
|
|
3
|
+
The **AGRO CLI** (`agro`) — create an [AGRO](https://agro.mifune.dev)
|
|
4
4
|
Docker sandbox for coding agents and drive its lifecycle from the command line.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
AGRO is a portable harness for running coding agents (Claude Code, Codex, Pi,
|
|
7
7
|
and others) in an isolated Docker sandbox, with the agent's identity, skills, and crons
|
|
8
8
|
versioned in git. This package is the standalone `agro` CLI that creates sandboxes and
|
|
9
9
|
manages their lifecycle.
|
|
@@ -31,7 +31,7 @@ installs the prebuilt `agro` artifact from the latest GitHub release — it neve
|
|
|
31
31
|
clones or builds on your machine:
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
curl -fsSL https://
|
|
34
|
+
curl -fsSL https://agro.mifune.dev/get-agro.sh | bash
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### Requirements
|
|
@@ -48,7 +48,7 @@ contains no CLI code of its own: its only file imports the `agro` bundle from an
|
|
|
48
48
|
exact-pinned `@mifune/agro` dependency. The two packages expose disjoint executables
|
|
49
49
|
(`agro` and `oh`), can be installed together, and removing either never removes the
|
|
50
50
|
other's executable. `oh --help` ends with a line that names `agro` as the canonical
|
|
51
|
-
CLI; everything else about `oh` — the `.
|
|
51
|
+
CLI; everything else about `oh` — the `.agro/` control plane, `agro.json`, `OH_*`
|
|
52
52
|
variables, `~/.oh/sandboxes` — is unchanged, and `agro` reads and writes exactly the
|
|
53
53
|
same files.
|
|
54
54
|
|
|
@@ -57,19 +57,21 @@ same files.
|
|
|
57
57
|
Create a sandbox from any directory — no project checkout needed:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
agro sandbox install docker # wizard, then boot; writes ~/.
|
|
61
|
-
agro sandbox list # name, runtime, status,
|
|
60
|
+
agro sandbox install docker # wizard, then boot; writes ~/.agro/sandboxes/<name>/
|
|
61
|
+
agro sandbox list # name, runtime, status, checkout
|
|
62
62
|
agro shell <name> # open a zsh shell in the running container
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
To bind one of your own checkouts into the sandbox, equip it and pass `--
|
|
65
|
+
To bind one of your own checkouts into the sandbox, equip it and pass `--checkout`:
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
68
|
cd your-project
|
|
69
|
-
oh update # vendor .
|
|
70
|
-
agro sandbox install docker --
|
|
69
|
+
oh update # vendor .agro/ + crons/ — and nothing else (compatibility window)
|
|
70
|
+
agro sandbox install docker --checkout "$PWD" --name your-project
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
+
`--repo` remains a supported alias for `--checkout`.
|
|
74
|
+
|
|
73
75
|
Add an agent harness or a tool at any point — this needs no rebuild. The verb is
|
|
74
76
|
the only door; nothing installs at boot:
|
|
75
77
|
|
|
@@ -96,8 +98,8 @@ with `OH_EXECUTION_TARGET=local` or `OH_EXECUTION_TARGET=docker-compose`.
|
|
|
96
98
|
|
|
97
99
|
| Command | What it does |
|
|
98
100
|
|---|---|
|
|
99
|
-
| `agro sandbox install <runtime>` | Create a sandbox: run the wizard, write the registry entry under `${
|
|
100
|
-
| `agro sandbox list [--json]` | List the registry entries with name, runtime, container status, and bound
|
|
101
|
+
| `agro sandbox install <runtime>` | Create a sandbox: run the wizard, write the registry entry under `${AGRO_HOME:-~/.agro}/sandboxes/<name>/`, materialise the compose files and wrapper into it, and boot the container. Flags: `--name`, `--checkout <dir>` (alias `--repo <dir>`), `--home-mount <dir>`, `--yes`, `--image[=<ref>]`, `--no-build`, `--print-argv`. `docker` is provisionable; `microsandbox` is planned and refuses with a pointer at the runtime RFC. |
|
|
102
|
+
| `agro sandbox list [--json]` | List the registry entries with name, runtime, container status, and bound checkout. |
|
|
101
103
|
| `agro shell [name]` | Open a `zsh` shell in the running sandbox container. |
|
|
102
104
|
| `agro stop [name]` | Stop the sandbox, preserving volumes. |
|
|
103
105
|
| `agro restart [name]` | Restart the sandbox service. |
|
|
@@ -105,77 +107,49 @@ with `OH_EXECUTION_TARGET=local` or `OH_EXECUTION_TARGET=docker-compose`.
|
|
|
105
107
|
| `agro ps [name]` | Show sandbox service status. |
|
|
106
108
|
| `agro destroy [name] [--yes]` | Remove the sandbox, wipe its named volumes (`docker compose down -v`), then delete the registry entry. Names the volumes, then requires you to type the sandbox name; refuses without a TTY unless `--yes` is passed. |
|
|
107
109
|
| `agro update [--dry-run]` | Upgrade the installed `agro` executable and nothing else, through the mechanism that installed it: npm-managed (`npm view` + `npm install -g --prefix <owning prefix> @mifune/agro@<version>`) or standalone (download `AGRO_JS_URL`, falling back to `OH_JS_URL` and defaulting to the latest `agro.js` release asset; verify its shebang and `--version`; rename it over the file; keep `<path>.prev` until the new file verifies). Refuses image-shipped, source-checkout, legacy-package, unresolvable, read-only, PATH-shadowed, and downgrade cases with the supported procedure; never uses `sudo`; a no-op when current. Project payload vendoring is `oh update` — see the compatibility note below. |
|
|
108
|
-
| `agro config show [--sandbox <name>]` | Print the resolved `
|
|
109
|
-
| `agro config set <field> <value> [--sandbox <name>]` | Set one dotted `
|
|
110
|
+
| `agro config show [--sandbox <name>]` | Print the resolved `agro.json` — every non-secret setting. |
|
|
111
|
+
| `agro config set <field> <value> [--sandbox <name>]` | Set one dotted `agro.json` field (`access.sshPort 2200`), validated against the schema. A secret key is refused with a pointer at `agro secret set`. |
|
|
110
112
|
| `agro config repo` | Create a repo on your GitHub account, keep the cloned-from upstream as the `openharness` remote, point `origin` at yours, and push. Asks first and defaults to no; never runs without an interactive yes. |
|
|
111
113
|
| `agro config <integration>` | Configure an integration via an interactive wizard. |
|
|
112
114
|
| `agro secret set <KEY> [--sandbox <name>]` | Prompt for the value with the input hidden and write it to the gitignored `.env` (mode `0600`). The value is never taken from the command line, where shell history would keep it. |
|
|
113
115
|
| `agro secret list [--sandbox <name>]` | List the allow-listed keys that hold a value, with the values redacted. |
|
|
114
116
|
| `agro compose config` | Print the resolved compose configuration. |
|
|
115
|
-
| `agro harness <list\|install\|status>` | Install and inspect agent CLI harnesses. `install` is the only door: it probes the running sandbox, installs into the persistent home volume, and reports. It reads and writes no `
|
|
117
|
+
| `agro harness <list\|install\|status>` | Install and inspect agent CLI harnesses. `install` is the only door: it probes the running sandbox, installs into the persistent home volume, and reports. It reads and writes no `agro.json` field, and needs no rebuild. |
|
|
116
118
|
| `agro tool <list\|install\|status>` | Install and inspect sandbox tooling that is not an agent CLI. `herdr`, `cloudflared`, `agent-browser`, `microsandbox`, and `tailscale` are `installable`; `gh` and the Docker CLI are `baked-in` and cannot be installed. Nothing installs at boot. A large download is confirmed first, and `--yes` accepts it. |
|
|
117
119
|
| `agro gateway <args…>` | Manage a messaging client session (Slack bridge for `pi`/`hermes`). |
|
|
118
|
-
| `agro cloud <args…>` | Configure credentials and manage OpenHarness Cloud SSH keys and nodes. |
|
|
119
120
|
| `agro --version` | Print the CLI version. |
|
|
120
121
|
| `agro --help` | Show help; every subcommand also accepts `--help`. |
|
|
121
122
|
|
|
122
|
-
`
|
|
123
|
+
`agro.json` and the `.env` beside it are the only two configuration surfaces: `agro.json`
|
|
123
124
|
holds every non-secret setting, `.env` holds only the allow-listed secrets. Each has
|
|
124
125
|
two homes — a sandbox's registry entry (`--sandbox <name>`) and the project root
|
|
125
126
|
(no flag). See
|
|
126
|
-
[configuration](https://github.com/mifunedev/
|
|
127
|
+
[configuration](https://github.com/mifunedev/agro/blob/main/docs/configuration.md)
|
|
127
128
|
for the field reference.
|
|
128
129
|
|
|
129
130
|
`agro` (or `oh`) is the only lifecycle door, on the host and in the sandbox, and every verb
|
|
130
|
-
runs `.
|
|
131
|
-
[lifecycle commands](https://github.com/mifunedev/
|
|
131
|
+
runs `.agro/scripts/docker-compose.sh` — see
|
|
132
|
+
[lifecycle commands](https://github.com/mifunedev/agro/blob/main/docs/lifecycle-commands.md), which also
|
|
132
133
|
states the confirmation policy `agro destroy` carries.
|
|
133
134
|
|
|
134
135
|
`agro update` never touches a project. During the compatibility window `oh update` vendors
|
|
135
|
-
`.
|
|
136
|
+
`.agro/` + `crons/` into the current directory, equipping an empty checkout and upgrading an
|
|
136
137
|
equipped one (`--from <dir>` / `--from-remote [--ref <ref>]`, `--dry-run`, `--force`); it
|
|
137
138
|
writes nothing else and never prompts. `agro update` rejects those flags and points at
|
|
138
139
|
`oh update`. `oh update` prefers the payload bundled into the CLI itself; with `--from-remote`
|
|
139
140
|
(or no payload at all) it shallow-clones the public OpenHarness repo into a temp dir and
|
|
140
141
|
removes it after the run (`--ref <ref>` pins it). Root `docs/` remains project-owned and is
|
|
141
|
-
not part of that payload. Catalog and help output therefore links to the
|
|
142
|
+
not part of that payload. Catalog and help output therefore links to the AGRO source
|
|
142
143
|
documentation instead of a path inside the equipped project.
|
|
143
144
|
|
|
144
145
|
The CLI writes no scaffold. It creates no `AGENTS.md`, no provider configuration, and no
|
|
145
146
|
`.gitignore` line beyond the `.env` line `agro secret set` adds inside a git checkout.
|
|
146
147
|
|
|
147
|
-
## OpenHarness Cloud
|
|
148
|
-
|
|
149
|
-
`agro cloud` is an Apache-2.0 licensed client that talks to a proprietary hosted service.
|
|
150
|
-
Configure the Cloud API once, then use `agro cloud` instead of hand-writing authenticated HTTP
|
|
151
|
-
requests:
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
agro cloud config # securely prompts for the current provisioner key
|
|
155
|
-
agro cloud ssh-keys create --name laptop --public-key-file ~/.ssh/openharness_node.pub
|
|
156
|
-
agro cloud nodes create --name demo --ssh-key-id <ssh-key-id>
|
|
157
|
-
agro cloud nodes watch <node-id>
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Both settings are repository-local. `agro cloud config` writes the API base URL to `cloud.apiUrl`
|
|
161
|
-
in the tracked `oh.json` and, until OpenHarness Cloud issues user API tokens, stores the
|
|
162
|
-
user-provided provisioner key as `OH_CLOUD_PROVISION_KEY` in the gitignored root `.env`
|
|
163
|
-
(mode `0600`). The key is never printed; `agro cloud config show` redacts it. Nothing is written
|
|
164
|
-
under `$HOME`.
|
|
165
|
-
|
|
166
|
-
`OH_CLOUD_API_URL` and `OH_CLOUD_PROVISION_KEY` (`OH_PROVISION_KEY` and `PROVISION_KEY` are
|
|
167
|
-
still accepted) provide non-persistent overrides for automation. Because the settings live in
|
|
168
|
-
the repository, `agro cloud` runs inside an OpenHarness-equipped repo; outside one, pass
|
|
169
|
-
`--api-url` and `--provision-key`. On the first `agro cloud` run in a repo, a legacy
|
|
170
|
-
`~/.config/openharness/cloud.json` is migrated into these two homes and then reported as no
|
|
171
|
-
longer read — it is left on disk for you to delete. Run `agro cloud --help` for the complete
|
|
172
|
-
SSH-key and node lifecycle command set.
|
|
173
|
-
|
|
174
148
|
## Documentation
|
|
175
149
|
|
|
176
|
-
- **Docs:** https://
|
|
177
|
-
- **Installation guide:** https://
|
|
178
|
-
- **Source & issues:** https://github.com/mifunedev/
|
|
150
|
+
- **Docs:** https://agro.mifune.dev
|
|
151
|
+
- **Installation guide:** https://agro.mifune.dev/docs/installation
|
|
152
|
+
- **Source & issues:** https://github.com/mifunedev/agro
|
|
179
153
|
|
|
180
154
|
## License
|
|
181
155
|
|