@arbol-ai/cli 1.20261018.213455 → 2.1.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/README.md +34 -27
- package/dist/index.js +47964 -34938
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -3,25 +3,18 @@
|
|
|
3
3
|
`arbol`, the Arbol API from your terminal. Its commands are generated by
|
|
4
4
|
[Cloudflare Forge](https://github.com/cloudflare/forge) from the platform's public OpenAPI,
|
|
5
5
|
[`https://api.getarbol.com/openapi.json`](https://api.getarbol.com/openapi.json), and every request
|
|
6
|
-
goes through [`@arbol-ai/sdk`](https://www.npmjs.com/package/@arbol-ai/sdk).
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
goes through [`@arbol-ai/sdk`](https://www.npmjs.com/package/@arbol-ai/sdk). Its versions are semver,
|
|
7
|
+
from 2.1.0 on (see [Releases](#releases)); `arbol --version` also names the API release its commands
|
|
8
|
+
were generated from, as in `arbol 2.1.0 (Arbol API 1.20261019.4056)`.
|
|
9
9
|
|
|
10
10
|
```sh
|
|
11
11
|
npm install --global @arbol-ai/cli
|
|
12
12
|
arbol --version
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
It needs Node.js 26 or newer, whose `fetch` and `Temporal` the SDK uses.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
```sh
|
|
19
|
-
curl -fsSL https://cli.getarbol.com/install.sh | sh
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
[`install.sh`](site/public/install.sh) checks for Node.js 26 and runs
|
|
23
|
-
`npm install --global @arbol-ai/cli`, or prints that command when npm is missing. Run it again to
|
|
24
|
-
update; `ARBOL_VERSION=<version>` installs a given release.
|
|
15
|
+
It needs Node.js 26 or newer, whose `fetch` and `Temporal` the SDK uses. The same command updates it.
|
|
16
|
+
An `arbol` installed before the CLI was on npm comes first or blocks the install: remove it with
|
|
17
|
+
`npm uninstall --global @getarbol/cli`, or delete `~/.local/bin/arbol` and `~/.local/share/arbol`.
|
|
25
18
|
|
|
26
19
|
## Profiles
|
|
27
20
|
|
|
@@ -161,20 +154,34 @@ A release of the API flows through three repositories, each started by the one b
|
|
|
161
154
|
1. **project-arbol-gateway** publishes the OpenAPI at `https://api.getarbol.com/openapi.json` and sends
|
|
162
155
|
`openapi-release` to project-arbol-sdk-js.
|
|
163
156
|
2. **project-arbol-sdk-js** regenerates `@arbol-ai/sdk` from it, publishes it to npm and sends
|
|
164
|
-
`sdk-release`
|
|
165
|
-
3. **Here**, [Generate](.github/workflows/generate.yml)
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
157
|
+
`sdk-release` here: `{ "version": "<SDK version>", "openapi": { "release": "...", "sha256": "..." } }`.
|
|
158
|
+
3. **Here**, [Generate](.github/workflows/generate.yml) releases when the OpenAPI's content changed:
|
|
159
|
+
the SHA-256 of its canonical JSON without `info.version` (keys sorted, no whitespace; see
|
|
160
|
+
[`generation/openapi-hash.ts`](generation/openapi-hash.ts), the same hash sdk-js computes), compared
|
|
161
|
+
with `openapiContentSha256` in main's `src/generated/generation.json`. It also releases when the
|
|
162
|
+
`@arbol-ai/sdk` to pin is not the one main pins. Otherwise the run stops and nothing is committed or
|
|
163
|
+
published. A release pins `@arbol-ai/sdk` exactly, regenerates `src/generated/`, and when
|
|
164
|
+
`bun run verify` passes commits `Release Arbol API <release> with @arbol-ai/sdk <version>` to main and
|
|
165
|
+
runs [Publish](.github/workflows/publish.yml) on that commit with `bump: minor`.
|
|
166
|
+
|
|
167
|
+
The SDK Generate pins is the version `sdk-release` names. Every 6 hours and by hand, Generate runs the
|
|
168
|
+
same check and pins the highest `@arbol-ai/sdk` whose published `package.json` says it was generated
|
|
169
|
+
from the same OpenAPI content (`arbol.openapi.sha256`); while there is none, it stops with a notice,
|
|
170
|
+
since the SDK is released first. Its push uses an installation token of the organization's GitHub App
|
|
171
|
+
(Arbol Bot: the variable `ARBOL_BOT_APP_ID` and the secret `ARBOL_BOT_PRIVATE_KEY`), so the commit runs
|
|
172
|
+
Verify like any other.
|
|
173
|
+
|
|
174
|
+
Versions are semver, computed by Publish from the highest version on npm
|
|
175
|
+
([`generation/release.ts`](generation/release.ts)):
|
|
176
|
+
|
|
177
|
+
- A release from Generate raises the minor: 2.1.0, then 2.2.0. The first 2.x release is 2.1.0; before it
|
|
178
|
+
versions were the build's date and time (`1.YYYYMMDD.HHMMSS`).
|
|
179
|
+
- A change to the CLI's own code, which the OpenAPI does not carry, is released by running Publish by
|
|
180
|
+
hand on main. Its `bump` input raises the `patch` (the default), `minor` or `major`.
|
|
181
|
+
|
|
182
|
+
The published `package.json` records the OpenAPI the commands were generated from:
|
|
183
|
+
`"arbol": { "openapi": { "release": "<info.version>", "sha256": "<content hash>" } }`. npm receives the
|
|
184
|
+
package with the organization's `NPM_TOKEN` and a provenance statement.
|
|
178
185
|
|
|
179
186
|
## License
|
|
180
187
|
|