@openengio/cli 0.27.0 → 0.33.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 +84 -24
- package/bin/public/openeng.js +1621 -216
- package/package.json +1 -1
- package/skill/build-ui/SKILL.md +1 -1
- package/skill/conventions/SKILL.md +78 -1
- package/skill/demo/SKILL.md +22 -9
- package/skill/openeng/SKILL.md +177 -35
- package/skill/playbooks/product-lifecycle.md +1 -1
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ The installed package contains the bundled command and the skill. It carries no
|
|
|
41
41
|
| `openeng org current` | prints the organisation the stored session is attached to, or none (`{ "organisation": null }` under `--json`); sends no request | none |
|
|
42
42
|
| `openeng projects list` | lists the projects the signed-in person may list | one |
|
|
43
43
|
| `openeng demo seed --project <id> [--size standard\|full]` | plays a generic open-cycle gas turbine plant into a project the person may list; `standard` is the default size, and a repeat completes what is left | one listing, one catalogue read, four to publish the types when they are not yet published, then one per object and edge |
|
|
44
|
-
| `openeng link <
|
|
44
|
+
| `openeng link <branch-diff\|project> --project <id> --ref <ref>`, `openeng link explore --project <id> --ref <ref> (--object <id> \| --object-set <id>)`, `openeng link <ontology\|change-set> --ref <ref>`, `openeng link <object\|type\|proposal\|app> <identifier> --project <id> --ref <ref>`, `openeng link app-page <appKey> <pageKey> --project <id> --ref <ref>`, `openeng link app-draft <appKey> --ref <ref>`, `openeng link organisation-page <page>` | prints the address of a page of the web application: the host's web origin joined to the page's path, built for the attached organisation; `--json` answers `{ link }`; a flag the page does not read or a branch or baseline outside `main` and `<projectId>/<branch>` is refused (exit 2) before any call; a branch must match `--project` when given. The command reads the branch or baseline and the page's object, catalogue type, app page or proposal before printing, and refuses a missing subject with no address; a host with no web origin is refused too. `openeng link --help` prints every form | one `readWebOrigin`, plus a branch or baseline read for a branch or a project page on main, plus the subject read for object, type, app, app-page, proposal or Explore’s seed; the reads run in parallel |
|
|
45
45
|
| `openeng types draft open` | opens a change set on the attached organisation's namespace | one |
|
|
46
46
|
| `openeng projects create --name <text>` | creates a project in the organisation the session is attached to, under a minted idempotency key | one |
|
|
47
47
|
| `openeng types list --project <id>` | lists the project's published types | one |
|
|
@@ -51,26 +51,73 @@ The installed package contains the bundled command and the skill. It carries no
|
|
|
51
51
|
| `openeng types draft state --change-set <id>` | whether the change set is open, accepted or discarded | one |
|
|
52
52
|
| `openeng types draft revise --change-set <id> --revision <token> --from <file> [--rail-groups <json>]` | replaces the change set's delta with the JSON object in the file, keyed by type key; a type's rail placement is `presentationBindings.rail` inside its document; `--rail-groups` carries the organisation's whole list of rail groups as a JSON array of strings, and without it the change set keeps the groups its last revision held; a file that is unreadable, not JSON or not an object, or a flag that is not a JSON array of strings, is refused (exit 2) before any call; the host validates the delta | one |
|
|
53
53
|
| `openeng types draft validate --change-set <id> --revision <token>` | the host's violations for that revision, printed with their count; exits 4 when there is one or more and 0 when there are none, so a script can gate `accept` on the exit code | one |
|
|
54
|
+
| `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` |
|
|
54
55
|
| `openeng types draft discard --change-set <id>` | discards the change set | one |
|
|
55
56
|
| `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 |
|
|
56
|
-
| `openeng
|
|
57
|
+
| `openeng attachment add <object> <property> <file> --project <id> --ref <ref>` | stages, saves and prints the descriptor | four |
|
|
58
|
+
| `openeng attachment get <object> <property> [--out <path>] --project <id> --ref <ref>` | downloads and prints the written path | one |
|
|
59
|
+
| `openeng attachment list <object> --project <id> --ref <ref>` | prints attachment properties and descriptors | two |
|
|
60
|
+
| `openeng rules add` | adds a project or organisation branch rule | one |
|
|
57
61
|
| `openeng rules list` | lists the selected project's or organisation's rules | one |
|
|
58
62
|
| `openeng rules remove` | removes a rule by identifier | one |
|
|
59
|
-
| `openeng org-refs create` | creates an organisation
|
|
60
|
-
| `openeng org-refs list` | lists visible organisation
|
|
61
|
-
| `openeng org-refs delete` | deletes a writable organisation
|
|
62
|
-
| `openeng org-refs mark-read-only` | marks an organisation
|
|
63
|
-
| `openeng locks set` | sets or lifts an object's lock on a project
|
|
63
|
+
| `openeng org-refs create` | creates an organisation branch or baseline, optionally read-only | one |
|
|
64
|
+
| `openeng org-refs list` | lists visible organisation branches and baselines | one |
|
|
65
|
+
| `openeng org-refs delete` | deletes a writable organisation branch | one |
|
|
66
|
+
| `openeng org-refs mark-read-only` | marks an organisation branch or baseline read-only | one |
|
|
67
|
+
| `openeng locks set` | sets or lifts an object's lock on a project branch | one |
|
|
64
68
|
| `openeng ceiling show` | reads a project's maximum agent role | one |
|
|
65
69
|
| `openeng ceiling set` | sets a project's maximum agent role | one |
|
|
66
70
|
| `openeng schema-update request` | records a schema update request | one |
|
|
67
71
|
| `openeng schema-update show` | reads the latest visible request, or no request | one |
|
|
68
72
|
| `openeng skill [<topic> \| playbook <name>]` | prints the main skill and lists topics, or prints one bundled topic; needs no host and no session | none |
|
|
69
73
|
|
|
74
|
+
Attachments are top-level properties declared with kind `attachment`. Accepted file classes are
|
|
75
|
+
`image` (PNG, JPEG, WebP, GIF), `pdf`, `step` (STEP), `mesh` (STL) and `text` (plain text and the
|
|
76
|
+
admitted text-file extensions). Each body is limited to 26,214,400 bytes (25 MiB).
|
|
77
|
+
|
|
78
|
+
All three attachment commands require explicit `--project` and `--ref` and an attached organisation.
|
|
79
|
+
`add` uses the local file's basename, stages it, reads the object and catalogue, then saves; it prints
|
|
80
|
+
the descriptor only after a succeeded save. `add` and `list` use the catalogue's latest version of
|
|
81
|
+
the object's type key, even when the object pins an older version. `get` verifies the downloaded
|
|
82
|
+
SHA-256 before writing, uses the descriptor's name when `--out` is absent, and overwrites an existing
|
|
83
|
+
destination. `list` prints one `{ property, descriptor }` JSON object per present attachment in text
|
|
84
|
+
mode, or `no attachments` when empty; `--json` returns `{ scope, value: [...] }`.
|
|
85
|
+
`get --json` returns `{ path }` with scope metadata; `add --json` returns the descriptor with it.
|
|
86
|
+
|
|
87
|
+
The common exit codes apply: 0 for success, 2 for local usage refusals, 3 for authentication or a
|
|
88
|
+
moved session, 4 for a platform refusal, 5 for an unknown save outcome, 6 for invalid requests,
|
|
89
|
+
missing subjects or exceeded bounds, and 7 for host, transport, file I/O or integrity failures.
|
|
90
|
+
An unknown save outcome prints its correlation and recovery trailer instead of a descriptor.
|
|
91
|
+
|
|
70
92
|
An object type's `subscriptionRoles` field declares which roles it admits: owner, approver or watcher.
|
|
71
93
|
Owner is limited to one; approver and watcher may have optional maxima. Without the field, only
|
|
72
94
|
watchers are admitted.
|
|
73
95
|
|
|
96
|
+
## Link destinations
|
|
97
|
+
|
|
98
|
+
| kind | destination |
|
|
99
|
+
|---|---|
|
|
100
|
+
| `object <id>` | The object's type page with the object open; the type comes from its read. |
|
|
101
|
+
| `type <key>` | The type's page. |
|
|
102
|
+
| `explore` | Explore with exactly one `--object <id>` or `--object-set <id>` seed. |
|
|
103
|
+
| `branch-diff` | The branch comparison page. |
|
|
104
|
+
| `project` | The project page. |
|
|
105
|
+
| `proposal <id>` | The proposal review page. |
|
|
106
|
+
| `ontology` | The organisation's Types workspace. |
|
|
107
|
+
| `change-set` | The organisation's Change set workspace. |
|
|
108
|
+
| `app <key>` | The published app's first page. |
|
|
109
|
+
| `app-page <appKey> <pageKey>` | The named page of a published app. |
|
|
110
|
+
| `app-draft <key>` | The app's draft screen in the Types workspace. |
|
|
111
|
+
| `organisation-page <page>` | The named organisation administration page or settings. |
|
|
112
|
+
|
|
113
|
+
`explore` is the only kind that opens Explore. Giving neither seed flag or both refuses before a
|
|
114
|
+
host call (exit 2). The seed flags are only for `explore`. The other forms and their scope flags are in
|
|
115
|
+
`openeng link --help`.
|
|
116
|
+
|
|
117
|
+
An object link reads the object once and takes its type key from that answer. Explore reads its
|
|
118
|
+
selected object or saved set before printing the link. The subject, ref and web-origin reads run
|
|
119
|
+
in parallel; a refused read prints no link.
|
|
120
|
+
|
|
74
121
|
## The rules commands
|
|
75
122
|
|
|
76
123
|
These commands use the Admin SDK. Choose exactly one of `--project <id>` and `--organisation`.
|
|
@@ -95,7 +142,7 @@ and `projectId: null`; project rules keep `scope: "project"`. That scope stays i
|
|
|
95
142
|
Missing flags or a consequence other than the two spellings above refuse before any host call (exit 2).
|
|
96
143
|
The host validates the pattern.
|
|
97
144
|
|
|
98
|
-
A project rule's pattern is `main` or a
|
|
145
|
+
A project rule's pattern is `main` or a branch or baseline under that project's identifier, exactly or ending
|
|
99
146
|
in `/*` to match the prefix. A matching `merge-only` rule requires changes through a branch and
|
|
100
147
|
merge. A `locked-rows-only` rule binds merge-only row locks while leaving unlocked rows direct.
|
|
101
148
|
Adding or removing rules needs a person's `administer projects` capability on the selected
|
|
@@ -105,30 +152,30 @@ capability; read that help line to find what the person needs. A change takes ef
|
|
|
105
152
|
request. A `protected` write refusal means to use the branch and review workflow.
|
|
106
153
|
Agents must ask a person to manage rules.
|
|
107
154
|
|
|
108
|
-
## Organisation
|
|
155
|
+
## Organisation branches and baselines, locks, agent ceilings and schema requests
|
|
109
156
|
|
|
110
157
|
All these commands need an attached organisation, make one host call (plus a refresh when needed),
|
|
111
158
|
and send no idempotency key. Text output is described below; `--json` always returns `{ scope, value }`
|
|
112
159
|
with the full route response in `value`, including null. A host refusal uses the standard explanation
|
|
113
|
-
and next step. Changing rules,
|
|
160
|
+
and next step. Changing rules, branches and baselines and locks is a person's action, never a way for an agent to bypass
|
|
114
161
|
protection.
|
|
115
162
|
|
|
116
|
-
Creating, deleting or marking organisation
|
|
163
|
+
Creating, deleting or marking organisation branches and baselines needs `administer projects` in the attached
|
|
117
164
|
organisation. Setting a ceiling needs `administer projects` on the selected project; setting
|
|
118
165
|
or lifting a lock needs `lock objects` there. Requesting a schema update needs `write ref` on
|
|
119
|
-
a branch's home project, or `administer projects` for an organisation
|
|
166
|
+
a branch's home project, or `administer projects` for an organisation branch or baseline. Rule and organisation branch or baseline
|
|
120
167
|
lists and ceiling reads need `read`. Schema-update show reads only the caller's own requests in the
|
|
121
168
|
token's organisation, without requiring project read access. Each command's `--help` names its requirement.
|
|
122
169
|
A branch whose name contains `/` cannot request or show a schema update today.
|
|
123
170
|
|
|
124
171
|
- `openeng org-refs create --name <name> [--read-only]` calls `createOrganisationRef` and prints
|
|
125
172
|
`ref <name> read-only` or `ref <name> writable`. It creates from the organisation's trunk head.
|
|
126
|
-
The name is one non-reserved
|
|
127
|
-
- `openeng org-refs list` calls `listOrganisationRefs` and prints each
|
|
173
|
+
The name is one non-reserved name segment, such as `release-v1`; without the flag it is writable.
|
|
174
|
+
- `openeng org-refs list` calls `listOrganisationRefs` and prints each branch or baseline in that form, or `no refs`.
|
|
128
175
|
- `openeng org-refs delete --name <name>` calls `deleteOrganisationRef` and prints `deleted ref <name>`.
|
|
129
|
-
A
|
|
176
|
+
A baseline cannot be deleted.
|
|
130
177
|
- `openeng org-refs mark-read-only --name <name>` calls `markOrganisationRefReadOnly` and prints the
|
|
131
|
-
|
|
178
|
+
branch or baseline's name and read-only state. All four organisation branch or baseline calls have no selector.
|
|
132
179
|
- `openeng locks set --project <id> --ref <ref> --object <objectId> --lock <none|merge-only|frozen>`
|
|
133
180
|
calls the Objects client's `setObjectLock` with selector `{ projectId, ref }` and input
|
|
134
181
|
`{ objectId, lock }`. It prints `object <objectId> lock <lock>`. `none` lifts the lock;
|
|
@@ -140,11 +187,11 @@ A branch whose name contains `/` cannot request or show a schema update today.
|
|
|
140
187
|
and prints `schema update <ref> <state>`. It records a request; execution is separate.
|
|
141
188
|
- `openeng schema-update show --ref <ref>` calls `readSchemaUpdateRequest` and prints that same
|
|
142
189
|
form, or `no request` for null. Schema calls have no selector and act in the attached organisation.
|
|
143
|
-
The
|
|
190
|
+
The branch or baseline is a project branch or a bare organisation branch or baseline name; `main` is refused by the host.
|
|
144
191
|
|
|
145
192
|
Missing required flags and unknown lock or ceiling spellings refuse before any call (exit 2).
|
|
146
|
-
For an uncertain outcome, rules, organisation
|
|
147
|
-
command: list the rules or organisation
|
|
193
|
+
For an uncertain outcome, rules, organisation branches and baselines, ceiling and schema requests name a read-only
|
|
194
|
+
command: list the rules or organisation branches and baselines, or show the ceiling or schema request. Inspect that
|
|
148
195
|
answer before acting again. The lock command instead names the same idempotent `openeng locks set`
|
|
149
196
|
command with the same arguments, which sets the same lock again.
|
|
150
197
|
|
|
@@ -216,7 +263,7 @@ reach; the stored organisation decides only what the CLI prints and whether it r
|
|
|
216
263
|
failure the host did not answer carries no scope. A command with no scope has no `scope` field.
|
|
217
264
|
- **The hint.** Every `not-found` the host answers to a gated command prints, after the refusal,
|
|
218
265
|
"not found in organisation <name>: check that you are attached to the correct organisation (openeng org
|
|
219
|
-
current)", and one line more when the command named a
|
|
266
|
+
current)", and one line more when the command named a branch or baseline: `ref forms: the trunk is the bare "main";
|
|
220
267
|
a branch is "<project id>/<name>"`. The hint goes to standard error with or without `--json`.
|
|
221
268
|
|
|
222
269
|
A command that reaches the host with a session whose access token has expired sends one `refresh`
|
|
@@ -315,9 +362,17 @@ command that needs one it was not given refuses before any call (exit 2).
|
|
|
315
362
|
| `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. |
|
|
316
363
|
| `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. |
|
|
317
364
|
| `XDG_CONFIG_HOME` | none | the configuration directory when it is an absolute path, else `~/.config`. |
|
|
365
|
+
| `OPENENG_NO_UPDATE_CHECK` | none | set to `1` to disable the daily npm update check and notice. |
|
|
366
|
+
| `CI` | none | when set (even empty), disables the update check and notice. |
|
|
318
367
|
|
|
319
368
|
`openeng` reads no other environment variable.
|
|
320
369
|
|
|
370
|
+
After printing a command's result, `openeng` checks for a newer published CLI and writes any notice to
|
|
371
|
+
standard error. It caches the version and check time in `<config directory>/openeng/update-check.json`
|
|
372
|
+
for 24 hours. A stale or missing cache makes one anonymous GET to the npm registry, bounded to 1.5 seconds
|
|
373
|
+
including the response body; a failed check is silent and preserves the command's output, exit code and
|
|
374
|
+
previous cache. Help and `--version` skip the check. Update with `npm install -g @openengio/cli@latest`.
|
|
375
|
+
|
|
321
376
|
`openeng login` writes one waiting line to standard error while it waits for the browser, so under
|
|
322
377
|
`--json` standard output stays one JSON value. A loopback listener the system refuses to open, and a
|
|
323
378
|
session store that cannot be read, written or deleted, each print one line (exit 2) and no stack: the
|
|
@@ -334,7 +389,7 @@ for the client that asked for it.
|
|
|
334
389
|
## Output and exit codes
|
|
335
390
|
|
|
336
391
|
Text goes to standard output on success and to standard error on every failure, with one
|
|
337
|
-
exception: the violations `openeng types draft validate`
|
|
392
|
+
exception: the violations `openeng types draft validate` and `openeng types draft try` answer go to standard output with exit 4. A refusal the host
|
|
338
393
|
answered prints its kind or rule and class, then the refusal catalogue's meaning, then each next
|
|
339
394
|
option on its own line, naming the command for an option's read where `openeng` has one. When the text
|
|
340
395
|
is the refusal class's and not the rule's own, the output says so. With `--json` a refusal prints
|
|
@@ -386,14 +441,15 @@ built for that host. Otherwise it says the host did not read this `openeng`'s pr
|
|
|
386
441
|
the version it read, or `none`. The catalogue explanation also prints. Under `--json`, the refusal
|
|
387
442
|
carries the host's key as `host` and this client's version as `clientVersion`. The host's `versions`
|
|
388
443
|
are unchanged: `versions.client` is the version the host read, or null, and `versions.host` is the
|
|
389
|
-
host's version.
|
|
444
|
+
host's version. The text also prints `Update with: npm install -g @openengio/cli@latest`, and JSON adds
|
|
445
|
+
`update: "npm install -g @openengio/cli@latest"`.
|
|
390
446
|
|
|
391
447
|
| exit code | meaning |
|
|
392
448
|
|---|---|
|
|
393
449
|
| 0 | success |
|
|
394
450
|
| 2 | the client's own refusal: configuration, host form, store, a missing flag |
|
|
395
451
|
| 3 | `unauthenticated`: not signed in, a sign-in that was cancelled, timed out or whose state differed, or a logout with nothing stored |
|
|
396
|
-
| 4 | a platform refusal (`refused`), a route result whose arm is `refused`, or the violations `openeng types draft validate` answers (printed on standard output) |
|
|
452
|
+
| 4 | a platform refusal (`refused`), a route result whose arm is `refused`, or the violations `openeng types draft validate` or `openeng types draft try` answers (printed on standard output) |
|
|
397
453
|
| 5 | `unknown-outcome`, from the host or from a transport that lost the answer; also a non-envelope answer with status 500 to 599 |
|
|
398
454
|
| 6 | `invalid-request`, `not-found` or `bound-exceeded` |
|
|
399
455
|
| 7 | `internal`, `in-flight`, `protocol-mismatch`, a transport failure with no answer, a non-envelope answer with status 400 to 499, or an internal failure of the client |
|
|
@@ -404,7 +460,11 @@ The session of one host is stored under that host's key: `unix:` and the canonic
|
|
|
404
460
|
path for a socket host, the origin for an `https` host. A read never falls back to another host's
|
|
405
461
|
entry. The stores:
|
|
406
462
|
|
|
407
|
-
- macOS: the keychain, through `security -i` with the command on standard input.
|
|
463
|
+
- macOS: the keychain, through `security -i` with the command on standard input. The value is UTF-8 JSON
|
|
464
|
+
encoded as base64 with an `openeng-session:v1:` marker, so organisation names remain printable
|
|
465
|
+
ASCII in the keychain command. Each write reads back and compares the stored value before it
|
|
466
|
+
succeeds. Reads also accept legacy plain JSON and the hexadecimal output of `security -w`,
|
|
467
|
+
so existing sessions remain usable.
|
|
408
468
|
- Linux: `secret-tool store`, the secret on standard input.
|
|
409
469
|
- Otherwise, or with `OPENENG_SESSION_STORE=file`: one file per host in
|
|
410
470
|
`$XDG_CONFIG_HOME/openeng/sessions/` (else `~/.config/openeng/sessions/`), mode `0600` in a directory of
|