@openengio/cli 0.45.0 → 0.50.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 +29 -8
- package/bin/public/openeng.js +404 -139
- package/package.json +1 -1
- package/skill/openeng/SKILL.md +107 -15
package/package.json
CHANGED
package/skill/openeng/SKILL.md
CHANGED
|
@@ -21,6 +21,18 @@ their own. Before you send a generated command (`objects-sdk`, `branches-sdk` an
|
|
|
21
21
|
`<module> <method>` commands), run `openeng help <module> <method>`. It prints the fields, the kinds a
|
|
22
22
|
field may take, the selector keys and one example input, and needs no sign-in.
|
|
23
23
|
|
|
24
|
+
## File feedback
|
|
25
|
+
|
|
26
|
+
File feedback when a route fails in a way its docs do not explain, a refusal is unclear, help or docs are missing or wrong, a request shape is unknown, or a feature is missing. Include the route name, correlation id, an outline of what was sent, what came back, what you expected, and the project when applicable. Never include secrets, tokens or credentials. The title is 1 to 200 characters after trimming and the body 1 to 8,000. A filing is not idempotent, so a retry files a second entry. A filer may file 100 entries in any 24 hours in one organisation; the next is refused `bound-exceeded` naming `feedback-per-filer`. An agent-mode filing waits for the person to confirm it in the browser.
|
|
27
|
+
|
|
28
|
+
Use `openeng feedback bug --title <text> --body-file -` or `openeng feedback feature`; `openeng admin-sdk listFeedback` lists entries.
|
|
29
|
+
|
|
30
|
+
`listFeedback` returns one page of up to 20 entries by default (a `limit` from 1 to 50 is available) and a continuation token. Pass the token to the next request and repeat until it is null.
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
openeng admin-sdk listFeedback --input '{"continuation":"<token from the previous answer>"}'
|
|
34
|
+
```
|
|
35
|
+
|
|
24
36
|
## Read a route's policy
|
|
25
37
|
|
|
26
38
|
Generated route help prints `actors` (the caller categories allowed) and `step-up` (whether user confirmation is required) from the route table's current `policy` (access rules).
|
|
@@ -79,7 +91,7 @@ not admitted. `upload-not-found` means completion found no upload for this calle
|
|
|
79
91
|
start the upload again. These refusals are printed through the ordinary CLI refusal output.
|
|
80
92
|
|
|
81
93
|
For a top-level object property declared with kind `attachment`, use
|
|
82
|
-
`openeng attachment add <object> <property> <file> --project <id> --ref <ref>` to upload a file and
|
|
94
|
+
`openeng attachment add <object> <property> <file> --project <id> --ref <ref> --reason <text>` to upload a file and
|
|
83
95
|
save its descriptor, `openeng attachment list <object> --project <id> --ref <ref>` to read its
|
|
84
96
|
attachment properties, and `openeng attachment get <object> <property> [--out <path>]` with the
|
|
85
97
|
project and ref flags to download it. The `get` command uses the descriptor's file name when `--out`
|
|
@@ -95,7 +107,7 @@ read) and `too-many-links` (the chain exceeds its bound). Bounds have their own
|
|
|
95
107
|
Aggregates also show coverage and hidden or missing counts. Numeric output shows its unit.
|
|
96
108
|
|
|
97
109
|
After reviewing the upstream, run `openeng links clear <link> --version <upstreamVersion>
|
|
98
|
-
--project <id> --ref <ref>`. Take the opaque version from the status answer. For an atomic batch,
|
|
110
|
+
--project <id> --ref <ref> --reason <text>`. Take the opaque version from the status answer. For an atomic batch,
|
|
99
111
|
list up to 100 link ids and repeat `--version` once per link in the same order. On
|
|
100
112
|
`upstream-changed`, read status and review before sending its new version; do not replace the
|
|
101
113
|
precondition blindly. `upstream-not-readable` requires upstream read access. There is no
|
|
@@ -287,7 +299,7 @@ project's `main`. Use a branch and review when a rule protects the branch or the
|
|
|
287
299
|
selector keys and an example each.
|
|
288
300
|
2. When a branch is needed, `openeng branches-sdk createBranch` makes one in the project. It
|
|
289
301
|
answers the branch's full name, written `<project id>/<name>`.
|
|
290
|
-
3. `openeng objects-sdk mutate` creates, changes or deletes an object or an edge on that branch. The `ref` field in
|
|
302
|
+
3. `openeng objects-sdk mutate` creates, changes or deletes an object or an edge on that branch. Every save carries a `reason`; see "The save reason" below. The `ref` field in
|
|
291
303
|
a selector takes one of three forms: the organisation trunk is the bare `main`; a project
|
|
292
304
|
branch is its full name, `<project id>/<name>`; an organisation branch or baseline is its bare name.
|
|
293
305
|
`--ref` takes a branch (`main` or `<projectId>/<branch>`) or a baseline for commands that admit organisation names.
|
|
@@ -318,6 +330,32 @@ In `--input` JSON, a branch's optional `from` is `{ "kind": "ref", "ref": "main"
|
|
|
318
330
|
A mutation, batch, verb or merge answers a commit with `kind` `committed` and its `hash`, or
|
|
319
331
|
`kind` `no-change`. Read the generated help before constructing these values.
|
|
320
332
|
|
|
333
|
+
### The save reason
|
|
334
|
+
|
|
335
|
+
Send a `reason` with every save: in the `--input` JSON of `mutate`, `mutateBatch`, `executeVerb`,
|
|
336
|
+
`promoteDraft`, `clearLinks` and `setObjectLock`, and with `--reason <text>` on
|
|
337
|
+
`openeng attachment add`, `openeng links clear` and `openeng locks set`, which refuse a missing
|
|
338
|
+
reason before any call. A merge keeps its required `message`. The host writes the reason first in
|
|
339
|
+
the save's commit message, exactly as sent, so the history says why the change was made.
|
|
340
|
+
|
|
341
|
+
The save reason is the commit message for your change. Write it as you would a good commit message.
|
|
342
|
+
Start with one line, under 72 characters, that says what changed and why: "Raise brake requirement REQ-12 after design review" says
|
|
343
|
+
why; "update object" does not. Then, after a blank line, write as much as the change needs: what you
|
|
344
|
+
changed and where, why (the requirement, review, finding or test result behind it), what it affects
|
|
345
|
+
downstream (links, calculations, other parts), and anything a reviewer should check. Name the
|
|
346
|
+
objects, requirements or results by their identifiers. A batch's reason covers every change in the
|
|
347
|
+
batch, because the batch is one commit with one message. An agent writes the same standard of reason
|
|
348
|
+
as a person, and never a placeholder such as "update object". Draw on your conversation with the
|
|
349
|
+
person: what they decided, and why.
|
|
350
|
+
|
|
351
|
+
A merge message summarises the branch for the target's history. Merges are true merges, not squashes,
|
|
352
|
+
so the branch's own save reasons are kept in history and the merge's own message adds "Operation:
|
|
353
|
+
merge". The merge message adds what the save reasons cannot: what the branch achieved as a whole,
|
|
354
|
+
why it is ready, and who reviewed it.
|
|
355
|
+
|
|
356
|
+
The host refuses a reason that is empty after trimming white
|
|
357
|
+
space, or that holds a NUL character or a lone UTF-16 surrogate, as `invalid-request` with the field `input.reason`.
|
|
358
|
+
|
|
321
359
|
### Draft and comment routes
|
|
322
360
|
|
|
323
361
|
The Objects SDK transport also exposes `acquireDraft`, `saveDraft`, `promoteDraft`, `releaseDraft`,
|
|
@@ -326,6 +364,13 @@ The Objects SDK transport also exposes `acquireDraft`, `saveDraft`, `promoteDraf
|
|
|
326
364
|
`objectId`; `saveDraft` also takes the `draftHash` last read, `blocks` keyed by identifiers the
|
|
327
365
|
draft already holds, and `added`, a list of new blocks without identifiers; it answers the
|
|
328
366
|
identifiers the server minted for them in `minted`.
|
|
367
|
+
|
|
368
|
+
Each block is `{ kind, text, position }`. Choose a kind from the type's `bodyFormats`.
|
|
369
|
+
All blocks in a body must have the same kind. A non-Markdown body holds at most one block.
|
|
370
|
+
A save that breaks these rules is refused `body-wrong-format`. Syntax errors do not block saving
|
|
371
|
+
or promoting. `readObject` returns `bodyCheck` exactly when the body holds a block of a checked
|
|
372
|
+
format (Python, JavaScript, TypeScript, JSON or YAML); it is absent otherwise.
|
|
373
|
+
|
|
329
374
|
`openeng objects-sdk acquireDraft` starts a draft of the object's body and answers its blocks and
|
|
330
375
|
`draftHash`; `openeng objects-sdk promoteDraft` publishes the draft as the body with the
|
|
331
376
|
`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
|
|
@@ -342,8 +387,9 @@ on another branch and merge it; a caller without write access receives the ordin
|
|
|
342
387
|
Object history (`openeng objects-sdk readHistory`) and a branch comparison
|
|
343
388
|
(`openeng branches-sdk readBranchDiff`) carry a `bodyChanges` list on each version or changed object:
|
|
344
389
|
one entry per body block that differs, `{ blockId, kind, before, after }`, with `kind` one of `added`,
|
|
345
|
-
`removed`, `changed` or `moved
|
|
346
|
-
|
|
390
|
+
`removed`, `changed` or `moved`. Each entry carries `lines` exactly when either compared side is
|
|
391
|
+
not Markdown. Each line has `kind` (`same`, `added` or `removed`) and `text`.
|
|
392
|
+
Read it to describe a body change; the property fields do not show one.
|
|
347
393
|
|
|
348
394
|
`breakDraftLock` and `restoreDraft` require a person token and use `objects.draftAdmin`. No client
|
|
349
395
|
scope or run client holds this capability. `restoreDraft` takes `trashId` and `newRefName` and
|
|
@@ -388,8 +434,8 @@ grant access to its title, type or properties. Any cursor that is not a current
|
|
|
388
434
|
`openeng branches-sdk disposeRef` lets a branch writer dispose when no pending proposal exists
|
|
389
435
|
and no matching rule restricts deletions, or when no rule matches even with a pending proposal.
|
|
390
436
|
Otherwise the caller must be on every matching rule's bypass list. A bypass member may dispose
|
|
391
|
-
with or without a proposal, including under restricted deletions
|
|
392
|
-
|
|
437
|
+
with or without a proposal, including under restricted deletions. A branch that changed a row of any
|
|
438
|
+
project other than its own is refused `write-refused`, whatever the caller's rights there. A person's bypass counts only from a web session or a CLI session in human mode: an
|
|
393
439
|
agent-mode CLI session, or a session with no recorded channel, takes no bypass for a merge, a
|
|
394
440
|
disposal or a direct edit. Success discards the pending proposal after the engine disposal succeeds.
|
|
395
441
|
|
|
@@ -414,6 +460,10 @@ whose target was not `main`. A conflicting object also lists `blocks`: the body
|
|
|
414
460
|
differently, each `{ blockId, base, ours, theirs }` with the text of the common version, of `main` and of
|
|
415
461
|
the source branch (null where a side has no such block). Reconcile the changes on the source branch, then submit a new merge
|
|
416
462
|
with the reviewed head; reading conflicts makes no changes.
|
|
463
|
+
`oursLines` compares base to ours; `theirsLines` compares base to theirs. Each field is present
|
|
464
|
+
exactly when either side it compares is not Markdown. Merging still works at block level.
|
|
465
|
+
|
|
466
|
+
A merge is refused `merge-preview-approximate` when the branch's history criss-crosses its target, in either direction. Nothing is merged. Start a new branch from the target, redo the change there, and merge that branch. A branch that an earlier release left criss-crossed cannot be merged.
|
|
417
467
|
|
|
418
468
|
A rule has extent `ref` for every row on a matching ref or `rows` for its project's rows.
|
|
419
469
|
Project `ref` rules are `<project>/` and a glob; `rows` may also name `main`. In a glob `*` stops at
|
|
@@ -445,8 +495,11 @@ no named approvers and Owner/Maintainer bypass. Deletion restriction defaults to
|
|
|
445
495
|
`ref` rules only; only those rules may enable it. Positive approvals need a proposal and either
|
|
446
496
|
a minimum role or a named approver. The server validates named members without revealing identities
|
|
447
497
|
outside the home. Refusals are `invalid-rule-pattern`, `invalid-rule-setting` and `unknown-rule-member`.
|
|
448
|
-
|
|
449
|
-
|
|
498
|
+
An add with the same owner, case-insensitive pattern, extent and consequence returns the existing rule without
|
|
499
|
+
an audit write if its settings are identical; otherwise it is refused with duplicate-rule. A different
|
|
500
|
+
consequence can create a separate rule.
|
|
501
|
+
Changing a rule’s consequence to one another rule on that pattern already has is also refused
|
|
502
|
+
`duplicate-rule`.
|
|
450
503
|
|
|
451
504
|
## Organisation rules, branches and baselines, locks and agent ceilings
|
|
452
505
|
|
|
@@ -469,10 +522,13 @@ capability; read the help line before asking the person to seek permission.
|
|
|
469
522
|
Creating, deleting and marking need `administer projects` in the attached organisation;
|
|
470
523
|
listing needs read on a project in the organisation.
|
|
471
524
|
- The person sets or lifts an object's lock with
|
|
472
|
-
`openeng locks set --project <id> --ref <ref> --object <objectId> --lock <none|merge-only|frozen>`.
|
|
525
|
+
`openeng locks set --project <id> --ref <ref> --object <objectId> --lock <none|merge-only|frozen> --reason <text>`.
|
|
473
526
|
`none` lifts it. The lock also applies to its existing structural child edges in the selected
|
|
474
527
|
project. New children on a writable branch are not thereby frozen. Use a baseline
|
|
475
528
|
to preserve a fixed snapshot. This needs `lock objects` on the selected project.
|
|
529
|
+
- The person renames a project with `openeng projects rename --project <id> --name <text>`. It needs
|
|
530
|
+
`administer projects` on the project, and the route is refused to agents, so never rename a project yourself.
|
|
531
|
+
Check the project id in `openeng projects list` before asking.
|
|
476
532
|
- `openeng ceiling show --project <id>` reads the maximum agent role. The person sets it with
|
|
477
533
|
`openeng ceiling set --project <id> --ceiling <contributor|maintainer>`.
|
|
478
534
|
Showing needs `read`; setting needs `administer projects` on the selected project.
|
|
@@ -647,23 +703,52 @@ project roles. Re-issuing keeps the roles; revoking removes the invitation from
|
|
|
647
703
|
Acceptance skips and audits a project role when the project ended, the person already holds an
|
|
648
704
|
equal or higher project role, or the inviter lost the required standing. Sign-in continues.
|
|
649
705
|
|
|
650
|
-
Membership roles are `owner`, `maintainer`,
|
|
706
|
+
Membership roles are read from the deployment ladder. Its built-in roles are `owner`, `maintainer`,
|
|
707
|
+
`contributor`, `reader` and `none`. They grant, respectively:
|
|
651
708
|
|
|
652
709
|
- `owner`: administer members, projects and service identities; write refs and read.
|
|
653
710
|
- `maintainer`: write refs and read.
|
|
654
711
|
- `contributor`: write refs and read, including direct merges where no rule matches the target.
|
|
655
712
|
Matching rules and bypass entries decide how each ref may change.
|
|
656
713
|
- `reader`: read.
|
|
714
|
+
- `none` (No role): organisation standing with no capability. Use a project role for project access.
|
|
657
715
|
|
|
658
716
|
A membership can be scoped to an organisation or a project. An organisation role supplies its
|
|
659
717
|
capabilities in each project of that organisation too; a project role applies to its named project.
|
|
660
718
|
For a project-specific exception, grant the role on that project rather than assuming a membership
|
|
661
|
-
in one project applies to another.
|
|
719
|
+
in one project applies to another. Every project membership requires an organisation membership;
|
|
720
|
+
use `none` when the person needs only specific projects. Invite them with that organisation role
|
|
721
|
+
before granting a project role. A new service identity already holds an organisation row at `none`;
|
|
722
|
+
change that row with `changeMembershipRole` for organisation access, or grant a project role.
|
|
723
|
+
The role options returned by `listMembers` include sorted capabilities; an empty list means no capability.
|
|
662
724
|
|
|
663
725
|
An unknown role on an invitation or membership grant answers `unknown-role` with `roleKeys`, the
|
|
664
726
|
deployment's role keys. Choose one of those keys. A known role above your own answers
|
|
665
727
|
`above-caller-role`.
|
|
666
728
|
|
|
729
|
+
### Change or leave membership
|
|
730
|
+
|
|
731
|
+
Use `openeng admin-sdk grantMembership` with `principalId`, `scopeKind`, `scopeId` and `roleKey`.
|
|
732
|
+
`changeMembershipRole` takes those same four fields; `revokeMembership` takes the first three.
|
|
733
|
+
Use `leaveMembership` for the signed-in person's departure, with only the scope:
|
|
734
|
+
|
|
735
|
+
```sh
|
|
736
|
+
openeng admin-sdk leaveMembership --input \
|
|
737
|
+
'{"scopeKind":"project","scopeId":"<project-id>"}' --json
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
`scopeKind` is `organisation` or `project`. Granting or changing another person's role and
|
|
741
|
+
revoking another membership require `administer members`. A person may lower their own role or
|
|
742
|
+
leave using their membership alone. Self-grants and own-role raises are refused as
|
|
743
|
+
`membership-own-role` (P3608); equal-rank grants to another person are allowed.
|
|
744
|
+
|
|
745
|
+
A hidden or absent scope answers `not-found` (database OE067), identically in both cases.
|
|
746
|
+
A missing membership at a visible scope answers `no-such-membership` (OE006).
|
|
747
|
+
`last-administrator` (OE004) protects the organisation's last eligible administrator, not a
|
|
748
|
+
separate administrator in every project. Removing an organisation membership also removes that
|
|
749
|
+
person's project memberships in that organisation and ends their work there. Leaving an ended
|
|
750
|
+
project is allowed. These membership writes take no idempotency key and have no recovery route.
|
|
751
|
+
|
|
667
752
|
## Recover an interrupted operation
|
|
668
753
|
|
|
669
754
|
`openeng objects-sdk recover` checks the record of a mutation or verb whose result was unknown. Give
|
|
@@ -688,9 +773,15 @@ of the data-input shape: from `build-step`, with exactly two properties, `name`
|
|
|
688
773
|
both required.
|
|
689
774
|
The pack names these types `reads-data-from-<type>` and hides them in the ontology editor.
|
|
690
775
|
The edge reads the named property of the object at the ref, and a bound value is at most 1 MiB.
|
|
691
|
-
|
|
692
|
-
`binding-mismatch
|
|
693
|
-
Functions name a runtime key and entry. The server derives image pins,
|
|
776
|
+
An entry that declares no property input, such as `modelica-compile`, answers such a binding
|
|
777
|
+
`binding-mismatch`. Do not retry by silently dropping the property.
|
|
778
|
+
Functions name a runtime key, the engine image's key, and an entry. The server derives image pins,
|
|
779
|
+
scope and content keys. A function whose runtime is `python-sci` holds a Python body and uses the
|
|
780
|
+
entry `python-run`: its one module-level function decorated with `@step` (`from oe2_engine import
|
|
781
|
+
step`) is called with the step's arguments by keyword, and it returns a dict from each declared
|
|
782
|
+
output's name to its value. The server checks each step's arguments against that function's typed
|
|
783
|
+
signature before anything runs. To add an engine image, see the public docs page "Add an engine
|
|
784
|
+
image".
|
|
694
785
|
|
|
695
786
|
```sh
|
|
696
787
|
openeng objects-sdk checkCase --selector '{"projectId":"p","ref":"main"}' --input '{"caseId":"case"}'
|
|
@@ -733,6 +824,7 @@ A step run's log is plain text; show it as text and never as markup.
|
|
|
733
824
|
|
|
734
825
|
An `outputs-already-current` refusal includes current/stale counts and writes nothing. Ask the user
|
|
735
826
|
which explicit choice to send; the notice grants no permission to choose `run-all` or `run-stale`.
|
|
827
|
+
A start is refused `build-too-large` when the plan would create more than 20 new step runs; the limit is fixed for each request, so split it. A start is refused `build-limit-reached` when the organisation is at its limit.
|
|
736
828
|
A start returns `kind: started` with identifiers, or `kind: unchanged` with counts and no build ID.
|
|
737
829
|
`run-all` reruns upstream work too; `run-stale` reuses complete upstream work with source-run/output
|
|
738
830
|
provenance. Compile can run once while simulation expands sweep points. Engine registration is an
|