@openengio/cli 0.38.0 → 0.44.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 +24 -9
- package/bin/public/openeng.js +869 -154
- package/package.json +1 -1
- package/skill/conventions/SKILL.md +1 -1
- package/skill/openeng/SKILL.md +81 -9
package/package.json
CHANGED
|
@@ -238,7 +238,7 @@ classes: adding a class is compatible; removing one or changing the property's k
|
|
|
238
238
|
The accepted classes are `image` (`.png`, `.jpg`, `.jpeg`, `.webp`, `.gif`), `pdf` (`.pdf`),
|
|
239
239
|
`step` (`.step`, `.stp`), `mesh` (`.stl`) and `text` (`.txt`, `.md`, `.csv`, `.json`, `.yaml`,
|
|
240
240
|
`.yml`, `.toml`, `.ini`, `.log`, `.xml`, `.ts`, `.tsx`, `.js`, `.py`, `.c`, `.h`, `.cpp`, `.hpp`,
|
|
241
|
-
`.rs`, `.go`, `.java`, `.m`, `.sql`, `.sh`).
|
|
241
|
+
`.rs`, `.go`, `.java`, `.m`, `.sql`, `.sh`). Choose a file within the per-file limit (1 GiB in production).
|
|
242
242
|
Use `openeng attachment add <object> <property> <file> --project <id> --ref <ref>` to attach a
|
|
243
243
|
file, `openeng attachment list <object> --project <id> --ref <ref>` to list attachment properties,
|
|
244
244
|
and `openeng attachment get <object> <property> [--out <path>] --project <id> --ref <ref>` to save
|
package/skill/openeng/SKILL.md
CHANGED
|
@@ -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
|
|
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
|
|
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`
|
|
149
|
-
|
|
150
|
-
`OPENENG_HOST
|
|
151
|
-
an agent's shell or a Claude Code `!` shell. In zsh, persist
|
|
152
|
-
|
|
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
|
|
@@ -355,7 +367,7 @@ the confirmed write and replace the placeholders below. One start address and on
|
|
|
355
367
|
read that object's connections, including the edges in the answer:
|
|
356
368
|
|
|
357
369
|
```sh
|
|
358
|
-
openeng objects-sdk queryGraph --
|
|
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
|
|
359
371
|
```
|
|
360
372
|
|
|
361
373
|
Check the returned hops against the relationships you wrote. Use `findPaths` for paths across
|
|
@@ -662,3 +674,63 @@ openeng objects-sdk recover --selector '{"projectId":"<project-id>","ref":"<proj
|
|
|
662
674
|
Recovery can report a committed change and its hash, and finish the recovery record. It never sends
|
|
663
675
|
the original mutation again. If the saved evidence still cannot establish an outcome, it returns
|
|
664
676
|
`unknown`; it cannot undo a successful write, restore a deleted object, or retry a failed operation.
|
|
677
|
+
|
|
678
|
+
## Builds
|
|
679
|
+
|
|
680
|
+
Save a step and its immutable output declarations with the objects SDK's `saveStep`, then check
|
|
681
|
+
its case before starting. Named inputs bind a case or an output by object identifier.
|
|
682
|
+
A property binding is a data-input edge from the step to the object, of a published edge type
|
|
683
|
+
of the data-input shape: from `build-step`, with exactly two properties, `name` and `property`,
|
|
684
|
+
both required.
|
|
685
|
+
The pack names these types `reads-data-from-<type>` and hides them in the ontology editor.
|
|
686
|
+
The edge reads the named property of the object at the ref, and a bound value is at most 1 MiB.
|
|
687
|
+
The shipped engine entry `modelica-compile` declares no property input, so such a binding answers
|
|
688
|
+
`binding-mismatch` until an entry declares one. Do not retry by silently dropping the property.
|
|
689
|
+
Functions name a runtime key and entry. The server derives image pins, scope and content keys.
|
|
690
|
+
|
|
691
|
+
```sh
|
|
692
|
+
openeng objects-sdk checkCase --selector '{"projectId":"p","ref":"main"}' --input '{"caseId":"case"}'
|
|
693
|
+
openeng objects-sdk startBuild --selector '{"projectId":"p","ref":"main"}' --input '{"target":{"kind":"outputs","outputIds":["out"]}}'
|
|
694
|
+
openeng objects-sdk startBuild --selector '{"projectId":"p","ref":"main"}' --input '{"target":{"kind":"case","caseId":"case"},"choice":"run-stale"}'
|
|
695
|
+
openeng objects-sdk startBuild --selector '{"projectId":"p","ref":"main"}' --input '{"target":{"kind":"build","buildId":"build"},"choice":"run-all"}'
|
|
696
|
+
openeng objects-sdk cancelBuild --selector '{"projectId":"p"}' --input '{"buildRunId":"run"}'
|
|
697
|
+
openeng admin-sdk registerEngine --input '{"name":"engine","isolation":"ephemeral","properties":{},"runtime":{"image":"openmodelica"}}'
|
|
698
|
+
openeng admin-sdk listEngines --input '{}'
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
```sh
|
|
702
|
+
openeng objects-sdk readBuildRun --selector '{"projectId":"p"}' --input '{"buildRunId":"run"}'
|
|
703
|
+
openeng objects-sdk readStepRun --selector '{"projectId":"p"}' --input '{"stepRunId":"step-run"}'
|
|
704
|
+
openeng objects-sdk readStepLog --selector '{"projectId":"p"}' --input '{"stepRunId":"step-run"}'
|
|
705
|
+
openeng objects-sdk listBuildRuns --selector '{"projectId":"p"}' --input '{"objectId":"out","continuation":null}'
|
|
706
|
+
openeng objects-sdk readOutputValues --selector '{"projectId":"p","ref":"main"}' --input '{"outputId":"out","keys":[{"sweep":{},"componentId":"component","variable":"temperature"}]}'
|
|
707
|
+
```
|
|
708
|
+
|
|
709
|
+
`listBuildRuns` takes `{ objectId, continuation }` and the project from
|
|
710
|
+
`selector: { projectId }`. It lists runs that target an output or case, or contain a step run of
|
|
711
|
+
that step, newest start first (ties by build-run identifier ascending), at most 20 per page.
|
|
712
|
+
The result is `{ runs, continuation }`; begin with `continuation: null`, pass the returned token
|
|
713
|
+
unchanged for the next page, and stop when it is null. Each run includes its ref, target, state,
|
|
714
|
+
start time, starter and step summaries. Listing ends no step run and starts none.
|
|
715
|
+
|
|
716
|
+
`readOutputValues` takes `{ outputId, keys, runRef? }` with
|
|
717
|
+
`selector: { projectId, ref }`; the project comes from the selector. Each key is
|
|
718
|
+
`{ sweep, componentId, variable }`, where `sweep` maps parameter names to numbers. `runRef`
|
|
719
|
+
optionally restricts stored runs to that ref. The result is `{ values }`, one entry per requested
|
|
720
|
+
key: `current` or `stale` with the key, numeric value, unit, step-run identifier, ref, engine
|
|
721
|
+
identifier and `nonRepeatable` flag, or `no-result` with the key when no value matches.
|
|
722
|
+
Freshness compares the stored content key with the current one for the selector's ref;
|
|
723
|
+
`nonRepeatable` reports differing digests for the same content key. Missing runs or unavailable
|
|
724
|
+
indexed output answer `not-found`; opaque output cannot be read through this route.
|
|
725
|
+
|
|
726
|
+
An unfinished build reads `running`. A cancel by a person reads `canceled`; a step run cancelled because its
|
|
727
|
+
upstream failed names that upstream in its error. A `not-found` answer means the row is hidden or absent.
|
|
728
|
+
A step run's log is plain text; show it as text and never as markup.
|
|
729
|
+
|
|
730
|
+
An `outputs-already-current` refusal includes current/stale counts and writes nothing. Ask the user
|
|
731
|
+
which explicit choice to send; the notice grants no permission to choose `run-all` or `run-stale`.
|
|
732
|
+
A start returns `kind: started` with identifiers, or `kind: unchanged` with counts and no build ID.
|
|
733
|
+
`run-all` reruns upstream work too; `run-stale` reuses complete upstream work with source-run/output
|
|
734
|
+
provenance. Compile can run once while simulation expands sweep points. Engine registration is an
|
|
735
|
+
administrator operation in the authenticated organisation and follows the marked-route step-up.
|
|
736
|
+
When builds are unavailable, ask the administrator about engine registration and compute setup.
|