@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openengio/cli",
3
- "version": "0.37.0",
3
+ "version": "0.39.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "engines": {
@@ -146,9 +146,10 @@ for a lifecycle state. A wrong edge is replaced by a new edge type key and a rec
146
146
 
147
147
  - Data is written on a branch, submitted as a proposal, and merged. A merge names the branch and the
148
148
  hash the reviewer reviewed (the proposal's `reviewedHash`), and lands on the project's trunk.
149
- - An update is a compare-and-set per property: `{"<property>": {"from": {"value": <what it holds now>}, "to":
150
- {"value": <the new value>}}}`; `{"absent": true}` stands for no value on either side. A `from` that no
151
- longer matches is refused, so read the object first.
149
+ - An update is a compare-and-set per property: `{"<property>": {"from":
150
+ {"kind": "value", "value": <what it holds now>}, "to": {"kind": "value", "value": <the new value>}}}`;
151
+ `{"kind": "absent"}` stands for no value on either side. A `from` that no longer matches is refused,
152
+ so read the object first.
152
153
  - A `datetime` property takes an RFC 3339 date-time with an explicit offset and zero to three fraction digits
153
154
  (`2026-10-19T22:30:00+01:00`); a value with no offset, an impossible date or time, or four or more
154
155
  fraction digits is refused, never truncated. It is stored as `YYYY-MM-DDTHH:MM:SS.sssZ`, the same
@@ -237,7 +238,7 @@ classes: adding a class is compatible; removing one or changing the property's k
237
238
  The accepted classes are `image` (`.png`, `.jpg`, `.jpeg`, `.webp`, `.gif`), `pdf` (`.pdf`),
238
239
  `step` (`.step`, `.stp`), `mesh` (`.stl`) and `text` (`.txt`, `.md`, `.csv`, `.json`, `.yaml`,
239
240
  `.yml`, `.toml`, `.ini`, `.log`, `.xml`, `.ts`, `.tsx`, `.js`, `.py`, `.c`, `.h`, `.cpp`, `.hpp`,
240
- `.rs`, `.go`, `.java`, `.m`, `.sql`, `.sh`). The maximum file body is 26,214,400 bytes (25 MiB).
241
+ `.rs`, `.go`, `.java`, `.m`, `.sql`, `.sh`). Choose a file within the per-file limit (1 GiB in production).
241
242
  Use `openeng attachment add <object> <property> <file> --project <id> --ref <ref>` to attach a
242
243
  file, `openeng attachment list <object> --project <id> --ref <ref>` to list attachment properties,
243
244
  and `openeng attachment get <object> <property> [--out <path>] --project <id> --ref <ref>` to save
@@ -63,15 +63,27 @@ that step; do not construct a page address yourself. For example:
63
63
 
64
64
  ## Attachments
65
65
 
66
- Create the object first, then stage and save its attachment. Creation with a file is refused
66
+ Create the object first, then upload and save its attachment. Creation with a file is refused
67
67
  as `invalid-properties` with `attachment-requires-object` at each offending property.
68
68
 
69
+ The CLI and SDK upload file bytes directly to the file store in 8 MiB pieces, with at most
70
+ one following piece prefetched. Interrupted uploads query the committed offset and resume within
71
+ the same call, with at most three resumes per piece. The CLI prints upload and download progress
72
+ to standard error. The SDK accepts `{ onProgress: (committed, total) => void }` as the third
73
+ argument of `uploadAttachment(selector, source, options)`. An open refused as `storage-limit-reached` sends no
74
+ file bytes.
75
+ The upload uses `openAttachmentUpload` (`POST /attachments/upload/open`) and
76
+ `completeAttachmentUpload` (`POST /attachments/upload/complete`). `too-large` means the declared
77
+ file exceeds the host bound; `unsupported-content` means the extension or recognised content is
78
+ not admitted. `upload-not-found` means completion found no upload for this caller and object project;
79
+ start the upload again. These refusals are printed through the ordinary CLI refusal output.
80
+
69
81
  For a top-level object property declared with kind `attachment`, use
70
- `openeng attachment add <object> <property> <file> --project <id> --ref <ref>` to stage a file and
82
+ `openeng attachment add <object> <property> <file> --project <id> --ref <ref>` to upload a file and
71
83
  save its descriptor, `openeng attachment list <object> --project <id> --ref <ref>` to read its
72
84
  attachment properties, and `openeng attachment get <object> <property> [--out <path>]` with the
73
85
  project and ref flags to download it. The `get` command uses the descriptor's file name when `--out`
74
- is omitted. The accepted classes and file-size limit are in `openeng skill conventions`.
86
+ is omitted, writes the file as it arrives, and checks it against the descriptor's digest (SHA-256 or MD5), keeping no partial file on a mismatch. The accepted classes and file-size limit are in `openeng skill conventions`.
75
87
 
76
88
  ## Link review and impact
77
89
 
@@ -145,11 +157,11 @@ person asks. Hosted apps run only in Google Chrome.
145
157
  - `openeng help` lists every command. `openeng help <command words>` prints one command's help: what it
146
158
  does and an example. `openeng help <group>` lists a group's commands.
147
159
  `openeng --version` prints the published version.
148
- - `openeng` has no host built in. The production host is `https://api.openeng.io`: pass
149
- `--host https://api.openeng.io` on every command, or prefix it as
150
- `OPENENG_HOST=https://api.openeng.io openeng ...`. An export in `~/.zshrc` does not reach
151
- an agent's shell or a Claude Code `!` shell. In zsh, persist it in `~/.zshenv`.
152
- Fix `no-host` by adding the flag or prefix.
160
+ - `openeng` defaults to `https://api.openeng.io`; no host setting is needed for production.
161
+ For another deployment, pass `--host <origin>` or prefix the command as
162
+ `OPENENG_HOST=<origin> openeng ...`. An export in `~/.zshrc` does not reach
163
+ an agent's shell or a Claude Code `!` shell. In zsh, persist the override in `~/.zshenv`.
164
+ An explicitly empty host turns the default off and causes `no-host`.
153
165
  - `openeng orgs list` and `openeng organisations list` mean `openeng org list`; `openeng project list` means
154
166
  `openeng projects list`.
155
167
  - A mutation or a branch command that needs a `correlation` mints it for you when your input has
@@ -299,6 +311,13 @@ project's `main`. Use a branch and review when a rule protects the branch or the
299
311
  `headHash`, the `atHash` of the `readBranchDiff` they read. An approval from a CLI session in agent mode is confirmed
300
312
  on the web. A moved head requires reading and reviewing again. An agent proposes and never approves.
301
313
 
314
+ In `--input` JSON, a branch's optional `from` is `{ "kind": "ref", "ref": "main" }` or
315
+ `{ "kind": "hash", "hash": "<current head>" }`. A property's `from` and `to` each carry
316
+ `{ "kind": "absent" }` or `{ "kind": "value", "value": <JSON value> }`. A draft lookup carries
317
+ `{ "kind": "draft", "appDraftId": "<draft id>" }` or `{ "kind": "app", "appKey": "<app key>" }`.
318
+ A mutation, batch, verb or merge answers a commit with `kind` `committed` and its `hash`, or
319
+ `kind` `no-change`. Read the generated help before constructing these values.
320
+
302
321
  ### Draft and comment routes
303
322
 
304
323
  The Objects SDK transport also exposes `acquireDraft`, `saveDraft`, `promoteDraft`, `releaseDraft`,
@@ -312,8 +331,9 @@ identifiers the server minted for them in `minted`.
312
331
  `draftHash` last read. If the body already equals the draft, promotion makes no commit; `body-changed` means it moved since the draft was acquired. Each takes `--selector` and `--input` as JSON, as the other routes here do. A save renews
313
332
  the five-minute lock. Release only releases an
314
333
  unchanged draft; discard removes the holder's draft, while breaking a lock leaves its draft text
315
- in place and is a project-administrator action. `readDraftLock` reports the holder and expiry or
316
- that no lock is live, never the draft contents.
334
+ in place and is a project-administrator action. `readDraftLock` answers
335
+ `{ kind: "held", holderDisplayName: string, expiresAt: string }` for a live lock, or
336
+ `{ kind: "free" }` when no lock is live, never the draft contents.
317
337
 
318
338
  A draft write blocked by a rule answers `protected`, with the same optional
319
339
  `protection: { ref, patterns }` as a property save. Only readable patterns appear. Make the change
@@ -347,7 +367,7 @@ the confirmed write and replace the placeholders below. One start address and on
347
367
  read that object's connections, including the edges in the answer:
348
368
 
349
369
  ```sh
350
- openeng objects-sdk queryGraph --host https://api.openeng.io --selector '{"projectId":"<project-id>","ref":"<project-id>/<branch>"}' --input '{"kind":"graph","start":{"kind":"objects","objects":[{"projectId":"<project-id>","objectId":"<object-id>"}]},"steps":[{"depth":1}]}' --json
370
+ openeng objects-sdk queryGraph --selector '{"projectId":"<project-id>","ref":"<project-id>/<branch>"}' --input '{"kind":"graph","start":{"kind":"objects","objects":[{"projectId":"<project-id>","objectId":"<object-id>"}]},"steps":[{"depth":1}]}' --json
351
371
  ```
352
372
 
353
373
  Check the returned hops against the relationships you wrote. Use `findPaths` for paths across
@@ -483,6 +503,10 @@ When a command returns one of these rules, follow its action and do not repeat t
483
503
  `write ref` on the branch's home project, or `administer projects` for an organisation branch or baseline;
484
504
  showing reads only the requester's records in the token organisation and needs no project read
485
505
  access. A branch whose name contains `/` cannot request or show a schema update today.
506
+ When the operator runs the update, it merges the organisation trunk into the branch only if
507
+ the branch lacks the trunk's latest schema change, bringing both the schema and rows saved
508
+ on the trunk since the branch was cut. If the branch and trunk changed the same row, the
509
+ request ends `failed` with `merge-conflict`, the branch stays unchanged, and the next update tries again.
486
510
  - `organisation-not-ready`: the organisation's trunk is not ready. Try again shortly.
487
511
  - `read-only-ref`: this caller cannot write or merge into this ref; it does not mean nobody can. Choose a ref in your writable scope.
488
512