@openengio/cli 0.37.0 → 0.39.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 CHANGED
@@ -39,9 +39,9 @@ Install the public npm package:
39
39
  npm install -g @openengio/cli
40
40
  ```
41
41
 
42
- `openeng` has no host built in. The production host is `https://api.openeng.io`. Pass `--host
43
- https://api.openeng.io` to a command, or set `OPENENG_HOST=https://api.openeng.io` once to make it the
44
- default. An agent starts with `openeng skill`, which prints how to work with the platform.
42
+ `openeng` defaults to `https://api.openeng.io`. Pass `--host <origin>` or set `OPENENG_HOST=<origin>`
43
+ to use another deployment. An empty `OPENENG_HOST` turns the default off.
44
+ An agent starts with `openeng skill`, which prints how to work with the platform.
45
45
 
46
46
  `openeng --version` prints the published version, `0.<protocol>.<patch>`. `openeng organisations` and
47
47
  `openeng orgs` run the commands of `openeng org`, and `openeng project` runs the commands of `openeng projects`.
@@ -83,7 +83,7 @@ The installed package contains the bundled command and the skill. It carries no
83
83
  | `openeng types draft try --type <key> --sample <file> [--change-set <id>]` | checks one sample instance, a JSON object of raw property values in the file, against the open change set's version of the type, with the check a write runs; it reads the open change set (the attached organisation's, or the one `--change-set` names) and writes nothing; exits 0 with `{ valid: true, violations: [] }` when the sample fits, and 4 with each violation's path and rule on standard output when it does not; a file that is unreadable, not JSON or not an object, no open change set, or a type key the change set does not hold or that names a verb type, is refused (exit 2) | two reads, one with `--change-set` |
84
84
  | `openeng types draft discard --change-set <id>` | discards the change set | one |
85
85
  | `openeng types draft accept --change-set <id> --revision <token>` | publishes the change set's types at the revision the person reviewed, under a minted idempotency key | one |
86
- | `openeng attachment add <object> <property> <file> --project <id> --ref <ref>` | stages, saves and prints the descriptor | four |
86
+ | `openeng attachment add <object> <property> <file> --project <id> --ref <ref>` | uploads and saves | five |
87
87
  | `openeng attachment get <object> <property> [--out <path>] --project <id> --ref <ref>` | downloads and prints the written path | one |
88
88
  | `openeng attachment list <object> --project <id> --ref <ref>` | prints attachment properties and descriptors | two |
89
89
  | `openeng hosted-app publish <bundle> --project <id> --key <app key>` | publishes the bundle file as the next version of the project's hosted app under the key, creating the app when the project has none; prints the version, its SHA-256 and size, and the reduced isolation warning for an app that holds the reduced isolation permission | three to four |
@@ -105,12 +105,13 @@ The installed package contains the bundled command and the skill. It carries no
105
105
  | `openeng schema-update show` | reads the latest visible request, or no request | one |
106
106
  | `openeng skill [<topic> \| playbook <name>]` | prints the main skill and lists topics, or prints one bundled topic; needs no host and no session | none |
107
107
 
108
- Create the object first, then stage and save its attachment. Creation with a file is refused
108
+ Create the object first, then upload and save its attachment. Creation with a file is refused
109
109
  as `invalid-properties` with `attachment-requires-object` at each offending property.
110
110
 
111
111
  Attachments are top-level properties declared with kind `attachment`. Accepted file classes are
112
112
  `image` (PNG, JPEG, WebP, GIF), `pdf`, `step` (STEP), `mesh` (STL) and `text` (plain text and the
113
- admitted text-file extensions). Each body is limited to 26,214,400 bytes (25 MiB).
113
+ admitted text-file extensions). The deployment sets the per-file limit, which is 1 GiB in production.
114
+ The organisation storage limit is checked before opening an upload.
114
115
 
115
116
  The hosted-app commands take `--project`, and `publish` also takes `--key`, an app key: lower-case
116
117
  letters, digits and hyphens, at most 63 characters. The parser refuses any other value (exit 2), so
@@ -122,11 +123,25 @@ beside the version. A publisher who may not read the organisation's reduced isol
122
123
  still publishes: the command adds one line saying this account cannot read whether the app may send
123
124
  data out of the browser, and `--json` carries `"oneWall": "unknown"`.
124
125
 
126
+ The CLI and SDK upload file bytes directly to the file store in 8 MiB pieces, with at most
127
+ one following piece prefetched. Interrupted uploads query the committed offset and resume within
128
+ the same call, with at most three resumes per piece. The CLI prints upload and download progress
129
+ to standard error. The SDK accepts `{ onProgress: (committed, total) => void }` as the third
130
+ argument of `uploadAttachment(selector, source, options)`. An open refused as `storage-limit-reached` sends no
131
+ file bytes.
132
+ The upload uses `openAttachmentUpload` (`POST /attachments/upload/open`) and
133
+ `completeAttachmentUpload` (`POST /attachments/upload/complete`). `too-large` means the declared
134
+ file exceeds the host bound; `unsupported-content` means the extension or recognised content is
135
+ not admitted. `upload-not-found` means completion found no upload for this caller and object project;
136
+ start the upload again. These refusals are printed through the ordinary CLI refusal output.
137
+
125
138
  All three attachment commands require explicit `--project` and `--ref` and an attached organisation.
126
- `add` uses the local file's basename, stages it, reads the object and catalogue, then saves; it prints
139
+ `add` reads the object, uploads the local file lazily using its basename, reads the catalogue, then saves;
140
+ it prints
127
141
  the descriptor only after a succeeded save. `add` and `list` use the catalogue's latest version of
128
142
  the object's type key, even when the object pins an older version. `get` verifies the downloaded
129
- SHA-256 before writing, uses the descriptor's name when `--out` is absent, and overwrites an existing
143
+ MD5 or SHA-256 before renaming the completed file, uses the descriptor's name when `--out` is absent,
144
+ and overwrites an existing
130
145
  destination. `list` prints one `{ property, descriptor }` JSON object per present attachment in text
131
146
  mode, or `no attachments` when empty; `--json` returns `{ scope, value: [...] }`.
132
147
  `get --json` returns `{ path }` with scope metadata; `add --json` returns the descriptor with it.
@@ -446,7 +461,7 @@ command that needs one it was not given refuses before any call (exit 2).
446
461
 
447
462
  | setting | flag | what it is |
448
463
  |---|---|---|
449
- | `OPENENG_HOST` | `--host` | `unix:<absolute socket path>` or an `https` origin. Every other form, `http:` included, is refused before any request (exit 2). The flag wins. |
464
+ | `OPENENG_HOST` | `--host` | `unix:<absolute socket path>` or an `https` origin. Every other form, `http:` included, is refused before any request (exit 2). Unset means `https://api.openeng.io`. The flag wins. |
450
465
  | `OPENENG_SIGN_IN_ORIGIN` | `--sign-in-origin` | for a `unix:` host, the network host's `http://127.0.0.1:<port>` or `http://[::1]:<port>` origin. Only the browser visits it; no credential is sent to it. Any non-loopback origin is refused. The flag wins. |
451
466
  | `OPENENG_SESSION_STORE` | none | `file` selects the file store. Unset selects the platform's credential store where its tool answers, else the file store. Any other value is refused. |
452
467
  | `XDG_CONFIG_HOME` | none | the configuration directory when it is an absolute path, else `~/.config`. |