@arbol-ai/cli 1.20261019.5745 → 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.
Files changed (3) hide show
  1. package/README.md +29 -16
  2. package/dist/index.js +1 -1
  3. package/package.json +9 -3
package/README.md CHANGED
@@ -3,9 +3,9 @@
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). A release's version is
7
- the date and time it was built (`1.YYYYMMDD.HHMMSS`, UTC); `arbol --version` also names the API release
8
- its commands were generated from.
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
@@ -154,21 +154,34 @@ A release of the API flows through three repositories, each started by the one b
154
154
  1. **project-arbol-gateway** publishes the OpenAPI at `https://api.getarbol.com/openapi.json` and sends
155
155
  `openapi-release` to project-arbol-sdk-js.
156
156
  2. **project-arbol-sdk-js** regenerates `@arbol-ai/sdk` from it, publishes it to npm and sends
157
- `sdk-release` (`{ "version": "<release>" }`) here.
158
- 3. **Here**, [Generate](.github/workflows/generate.yml) releases only when the OpenAPI's content
159
- changed: the SHA-256 of its canonical JSON without `info.version` (keys sorted, no whitespace; see
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
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`. When it is equal, the run
162
- stops and nothing is committed or published. Otherwise Generate pins `@arbol-ai/sdk` to exactly the
163
- release sdk-js named, regenerates `src/generated/`, and when `bun run verify` passes commits
164
- `Release <release>` to main and runs [Publish](.github/workflows/publish.yml) on that commit.
165
-
166
- Generate also runs every 6 hours and by hand, with the same hash check, pinning the SDK release the
167
- OpenAPI names once it is on npm. Its push uses an installation token of the organization's GitHub App
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
168
171
  (Arbol Bot: the variable `ARBOL_BOT_APP_ID` and the secret `ARBOL_BOT_PRIVATE_KEY`), so the commit runs
169
- Verify like any other. A change to the CLI's own code, which the OpenAPI does not carry, is released by
170
- running Publish by hand on main. npm receives the package with the organization's `NPM_TOKEN` and a
171
- provenance statement.
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.
172
185
 
173
186
  ## License
174
187
 
package/dist/index.js CHANGED
@@ -78070,7 +78070,7 @@ ${name}`);
78070
78070
  }
78071
78071
 
78072
78072
  // src/index.ts
78073
- var VERSION = "1.20261019.5745";
78073
+ var VERSION = "2.1.0";
78074
78074
  var RELEASE = generation_default.release;
78075
78075
  var SDK_PATHS = new Map(Object.values(commands).map((command) => [command.operation, command.sdkPath]));
78076
78076
  var SERVICES = [...new Set(Object.keys(commands).map((name) => name.split(" ")[0]))].toSorted();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/cli",
3
- "version": "1.20261019.5745",
3
+ "version": "2.1.0",
4
4
  "description": "The Arbol CLI: the Arbol API from your terminal, with commands generated by Cloudflare Forge from the public OpenAPI.",
5
5
  "keywords": [
6
6
  "arbol",
@@ -44,7 +44,7 @@
44
44
  "verify": "bun run typecheck && bun run test && bun run build"
45
45
  },
46
46
  "dependencies": {
47
- "@arbol-ai/sdk": "1.20261019.4056",
47
+ "@arbol-ai/sdk": "2.1.0",
48
48
  "ajv": "8.20.0",
49
49
  "ajv-formats": "3.0.1",
50
50
  "oauth4webapi": "3.8.8"
@@ -56,5 +56,11 @@
56
56
  "@types/node": "^26.0.0",
57
57
  "typescript": "7.0.2"
58
58
  },
59
- "packageManager": "bun@1.4.3"
59
+ "packageManager": "bun@1.4.3",
60
+ "arbol": {
61
+ "openapi": {
62
+ "release": "1.20261019.4056",
63
+ "sha256": "a160f98ddd0944d6e78111d113869b22cac6caabc036bb47f7609c009c37e501"
64
+ }
65
+ }
60
66
  }