@openengio/cli 0.48.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 +2 -2
- package/bin/public/openeng.js +103 -26
- package/package.json +1 -1
- package/skill/openeng/SKILL.md +39 -11
package/README.md
CHANGED
|
@@ -21,8 +21,8 @@ person (a `user` token), `agent:apply` (an apply run token), `app:client` (a `cl
|
|
|
21
21
|
service (a `service` token); `agent:explore` and `agent:types` are refused at admission. There is no object-agent
|
|
22
22
|
clearing tool. An unknown outcome exits 5; recover by correlation before repeating a clear.
|
|
23
23
|
|
|
24
|
-
`--reason <text>` is required on `openeng attachment add`, `openeng links clear` and `openeng locks set`:
|
|
25
|
-
the change
|
|
24
|
+
`--reason <text>` is required on `openeng attachment add`, `openeng links clear` and `openeng locks set`: write the
|
|
25
|
+
commit message for the change: one line under 72 characters saying what changed and why, then, after a blank line, what changed, why, what it affects downstream and what a reviewer should check. The command refuses a missing flag, a reason that is empty after
|
|
26
26
|
trimming white space and a reason that holds a NUL character or a lone UTF-16 surrogate, before any call, as a client refusal that
|
|
27
27
|
exits 2. The host writes the reason first in the save's commit message. The generic route commands require
|
|
28
28
|
`reason` in their `--input` JSON (`mutate`, `mutateBatch`, `executeVerb`, `promoteDraft`, `clearLinks`, `setObjectLock`);
|
package/bin/public/openeng.js
CHANGED
|
@@ -5,6 +5,12 @@ function toCredential(value) {
|
|
|
5
5
|
return value;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
// packages/api-contract/dist/body.js
|
|
9
|
+
var BODY_FORMATS = Object.freeze(["markdown", "python", "json", "yaml", "typescript", "javascript", "plaintext", "modelica", "sysml", "starlark"]);
|
|
10
|
+
function isBodyFormatList(value) {
|
|
11
|
+
return Array.isArray(value) && value.length > 0 && new Set(value).size === value.length && Array.from(value).every((format) => BODY_FORMATS.some((allowed) => allowed === format));
|
|
12
|
+
}
|
|
13
|
+
|
|
8
14
|
// packages/api-contract/dist/connectors.js
|
|
9
15
|
var IMPORT_FAILURE_KINDS = Object.freeze([
|
|
10
16
|
"auth",
|
|
@@ -117,6 +123,7 @@ var RULE_ENTRIES = {
|
|
|
117
123
|
"object-not-found": entry("The object is absent from the destination branch.", FIX_REQUEST),
|
|
118
124
|
"not-a-saver": entry("Only a person who saved this draft may restore it.", { option: "Ask a person who saved the draft to restore it." }),
|
|
119
125
|
"ref-has-drafts": entry("The branch still has drafts.", { option: "Review its drafts and confirm their removal before disposing the branch." }),
|
|
126
|
+
"body-wrong-format": entry("The body holds a block of a format this type does not allow, or more blocks than its format allows.", FIX_REQUEST),
|
|
120
127
|
"body-not-declared": entry("The object's type version does not declare a body format.", FIX_REQUEST),
|
|
121
128
|
"body-changed": entry("The body changed since this draft was opened.", { option: "Read the object's current body, discard the draft and acquire it again.", read: "readObject" }),
|
|
122
129
|
"body-too-large": entry("The body exceeds the limit on blocks, bytes per block or total bytes.", FIX_REQUEST),
|
|
@@ -436,7 +443,7 @@ function doc(does, refuses) {
|
|
|
436
443
|
return Object.freeze({ does, refuses: Object.freeze([...refuses]) });
|
|
437
444
|
}
|
|
438
445
|
var ROUTE_DOCS = Object.freeze({
|
|
439
|
-
startBuild: doc(
|
|
446
|
+
startBuild: doc(`Start a build of the named targets on the selected ref; a wholly current selection returns current and stale counts on the first response, but its replay returns only { kind: "unchanged" } because the counts are not stored. Each step runs on the engine image its function's runtime names. A step whose function holds a Python body is checked against the body's typed signature: an unknown argument, a missing required one or a mismatched type is refused binding-mismatch.`, [
|
|
440
447
|
"output-ambiguous",
|
|
441
448
|
"build-cycle",
|
|
442
449
|
"binding-mismatch",
|
|
@@ -501,7 +508,7 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
501
508
|
openAttachmentUpload: doc("Opens an upload session for a file of a declared length on an existing object after its guard admits the caller on the selected ref. The answer carries the upload identifier and a session address that accepts the bytes with no other credential. Admits person, service, app:client and agent:apply actors.", [...ATTACHMENT_SCOPED, "not-permitted", "frozen", "protected", "unsupported-content", "too-large", "storage-limit-reached"]),
|
|
502
509
|
completeAttachmentUpload: doc("Finishes an upload the caller opened: checks the stored file and stages it for the caller, then answers its descriptor. The object's guard is asked again. A repeated call for the same upload answers the same descriptor. Admits person, service, app:client and agent:apply actors.", [...ATTACHMENT_SCOPED, "not-permitted", "frozen", "protected", "unsupported-content", "upload-not-found", "upload-length-mismatch", "attachment-collision"]),
|
|
503
510
|
readAttachment: doc("Downloads the attachment held by an object's property at its stored type version. A file within the download threshold is streamed in the answer; a larger file is answered with a redirect whose Location is a short-lived link to the stored file. Admits person, service, app:client, agent:explore and agent:apply actors.", [...ATTACHMENT_SCOPED, "organisation-not-ready", "branch-needs-schema-update", "not-an-attachment-property", "no-attachment", "attachment-unavailable"]),
|
|
504
|
-
readObject: doc("Reads one object at a branch or baseline.", REF_READ),
|
|
511
|
+
readObject: doc("Reads one object at a branch or baseline. bodyCheck is present exactly when the body holds a block of a checked format; it is absent otherwise.", REF_READ),
|
|
505
512
|
queryObjects: doc(`Runs a filtered, ordered, paged query over the objects of a branch or baseline, or pages the union, intersection or difference of two plain object-set descriptions on that ref. A top-level type filter {kind:"type",op:"in",values:["part","system"]} selects any of 1 to 100 published type keys and may be combined with a text filter; continuation binds to the entire selection. ${QUERY_PROJECT_SCOPE}`, [
|
|
506
513
|
...REF_READ,
|
|
507
514
|
"malformed-query",
|
|
@@ -515,7 +522,7 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
515
522
|
queryRows: doc("Answers rows of named cells over a start set and up to three hops, or groups with counts, sums, minimums, maximums and weighted sums. Each hop names edgeTypeKeys as any or 1 through 8 names; optional targetTypeKeys also takes 1 through 8 names. Empty lists are malformed-query; more than 8 names is over-bound. A final hop may repeat to depth 1 through 3, without filters or targetTypeKeys, and answers groups only; a depth above 3 is over-bound, while 0, non-integers and non-numbers are malformed-query. A parent group key may name a repeat alias and uses its own edgeTypeKeys and optional parents filter. Each parent edge contributes a membership; a child with no matching parent forms no group. Parent keys carry address and readable, including readable: false for unreadable parents; hidden reached objects are counted per level including project, never keyed. After a successful walk, parent reads batch 100 children, at most 60 statements per key or 120 for two keys; an overflowing walk runs none. A weighted sum requires a final repeat hop and names 1 through 8 contributing types in over, an edge weight property and per-path or distinct multiplicity; the start never contributes. On an ancestor return, count and per-path sum or weightedSum refuse cycle-in-reach naming the readable object; distinct measures, min and max admit cycles. Repeat answers carry deeper, unvalued and unweighted; missing values and weights are counted separately. Every measure over a path names ends: visible or all. With any all measure, hidden counts appear per hop, on each group when every key names start, and on the answer otherwise; values still measure readable objects. Hidden counts deduplicate far identities including project per hop. countDistinct cannot be combined with sum, min or max. A property group key cannot mix numeric and nonnumeric declarations across its alias types. Distinct-count answers ordered by a measure or filtered by having, and hidden start-group merges, require complete reads: truncation refuses over-bound instead of returning a bounded prefix. " + GRAPH_QUERY_PROJECT_SCOPE, [...REF_READ, "malformed-query", "over-bound", "search-too-wide", "invalid-continuation", "stale-continuation", "head-moved", "cycle-in-reach"]),
|
|
516
523
|
aggregateObjects: doc(`Deprecated: use queryRows for graph aggregates. Runs an aggregate over the objects of a branch or baseline: a count, or a minimum, maximum, sum or average of one numeric property, answered as one value (an average also carries its count), or, with groupBy, a count, sum or average grouped by type or by a property's value, or a count grouped by structural parent, answered as groups. ${QUERY_PROJECT_SCOPE}`, [...REF_READ, "malformed-query", "over-bound", "text-search-unavailable", "search-too-wide"]),
|
|
517
524
|
discoverVerbs: doc("Lists the verbs an object may be given.", REF_READ),
|
|
518
|
-
readHistory: doc("Reads one object's history of changes.", [...REF_READ, "invalid-continuation", "stale-continuation", "malformed-history-request"]),
|
|
525
|
+
readHistory: doc("Reads one object's history of changes. Each bodyChanges entry carries lines exactly when either compared side is not markdown.", [...REF_READ, "invalid-continuation", "stale-continuation", "malformed-history-request"]),
|
|
519
526
|
mutate: doc('Creates, changes or deletes an object on the selected writable branch. A protected refusal means the change needs a branch and a merge. For a property update, `from` is the value the caller expects now; a mismatch is refused as `conflict`, and `{"kind": "absent"}` clears the property; a present state is `{"kind": "value", "value": ...}`.' + SAVE_REASON, [...OBJECT_WRITE, "plan-closed"]),
|
|
520
527
|
mutateBatch: doc('Applies a list of object and edge operations in one save and commit, with one audit record. A batch with no change makes no commit; a refused batch writes no engineering data, but its refusal is audited. An edge may name an object created earlier in the same batch. A batch with more operations than the maximum is refused as invalid-request naming input.operations, before any write. For a property update, `from` is the value the caller expects now; a mismatch is refused as `conflict`, and `{"kind": "absent"}` clears the property; a present state is `{"kind": "value", "value": ...}`.' + SAVE_REASON, [...OBJECT_WRITE, "plan-closed"]),
|
|
521
528
|
createConnection: doc("Creates a connection to an external source system for the signed-in person: its mirror project and its service identity. The connection commits whether or not its types could be drafted, and the answer says which.", [...SIGNED_IN, "not-permitted", "organisation-not-active", "connection-exists"]),
|
|
@@ -567,7 +574,7 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
567
574
|
"approvals-required",
|
|
568
575
|
"token-kind-not-admitted"
|
|
569
576
|
]),
|
|
570
|
-
readMergeConflicts: doc("Reads conflicts for the source branch named in input.name, always comparing it with main. For each field, base is the common value before either side changed it, ours is main, and theirs is the source branch. If the merge targeted another branch, this read still compares with main and does not report that merge's conflicts.", REF_READ),
|
|
577
|
+
readMergeConflicts: doc("Reads conflicts for the source branch named in input.name, always comparing it with main. For each field, base is the common value before either side changed it, ours is main, and theirs is the source branch. If the merge targeted another branch, this read still compares with main and does not report that merge's conflicts. Body blocks carry oursLines from base to ours and theirsLines from base to theirs, each exactly when either side it compares is not markdown.", REF_READ),
|
|
571
578
|
disposeRef: doc("Disposes a project branch. A writer can dispose when no matching rule restricts deletions and no proposal is pending, or when no rule matches even with a pending proposal. Otherwise the caller must bypass every matching rule. Success discards the pending proposal after the engine disposal. Merge and disposal admit people, services and client apps; agents and hosted apps are refused. Only drafts in projects the caller can read and write block disposal: the call is refused ref-has-drafts and lists each draft's object and holder; send deleteDrafts true to consent, and the disposal then removes the drafts you may write and keeps each in the draft trash for the people who saved it.", [
|
|
572
579
|
...WRITE,
|
|
573
580
|
"concurrent-change",
|
|
@@ -604,7 +611,18 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
604
611
|
removeSubscriber: doc("Removes a person's subscription to an object in a role.", [...REF_READ, "subscription-absent", "not-permitted", "invalid-ref"]),
|
|
605
612
|
listComments: doc("Lists the comments on an object, oldest first, a page at a time.", [...REF_READ, "invalid-query"]),
|
|
606
613
|
acquireDraft: doc("Acquires the subject\u2019s draft and lock using the body and base hash read on the server from that object on the selected ref.", [...REF_WRITE, "ref-not-found", "frozen", "protected", "draft-locked", "body-not-declared"]),
|
|
607
|
-
saveDraft: doc("Saves draft blocks after comparing the current draft hash; the server mints an identifier for each added block and answers them in minted.
|
|
614
|
+
saveDraft: doc("Saves draft blocks after comparing the current draft hash; the server mints an identifier for each added block and answers them in minted. Refuses body-wrong-format when a kind is outside the type's body formats, kinds are mixed, or a non-markdown body has more than one block.", [
|
|
615
|
+
...REF_WRITE,
|
|
616
|
+
"ref-not-found",
|
|
617
|
+
"frozen",
|
|
618
|
+
"protected",
|
|
619
|
+
"draft-lock-lost",
|
|
620
|
+
"draft-changed",
|
|
621
|
+
"unknown-block",
|
|
622
|
+
"body-not-declared",
|
|
623
|
+
"body-wrong-format",
|
|
624
|
+
"body-too-large"
|
|
625
|
+
]),
|
|
608
626
|
promoteDraft: doc("Publishes a checked draft. A draft with no edits returns committed false and records no commit; a recovered promote returns committed true with the current head and makes no second save." + SAVE_REASON, [...REF_WRITE, "ref-not-found", "frozen", "protected", "draft-lock-lost", "draft-not-flushed", "body-changed", "body-not-declared", "body-too-large"]),
|
|
609
627
|
releaseDraft: doc("Releases an unchanged draft.", [...REF_WRITE, "ref-not-found", "draft-lock-lost", "draft-changed"]),
|
|
610
628
|
discardDraft: doc("Discards the holder\u2019s draft.", [...REF_WRITE, "ref-not-found", "draft-lock-lost"]),
|
|
@@ -647,7 +665,7 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
647
665
|
readProposal: doc("Reads one proposal.", SCOPED),
|
|
648
666
|
refuseProposal: doc("Refuses a proposal and returns its branch to its author.", [...SCOPED, "proposal-not-pending"]),
|
|
649
667
|
approveProposal: doc("Records the caller's approval of a pending proposal at the head hash the caller read; send that hash as headHash. Any person who reads the project and the proposal's target and is not an author may approve; a target the caller cannot read answers not-found. An approval counts toward a rule only while its hash is the branch's head and the approver holds the rule's approver role or is named on it.", [...SCOPED, "proposal-not-pending", "proposal-head-moved", "author-cannot-approve", "already-approved"]),
|
|
650
|
-
readBranchDiff: doc("Reads the objects and edges a proposal's branch changes against its target. While the proposal is pending the diff is taken at the branch's current head, and atHash names that head; a closed proposal reads at its reviewed head. A target the caller cannot read answers not-found.", REF_READ),
|
|
668
|
+
readBranchDiff: doc("Reads the objects and edges a proposal's branch changes against its target. While the proposal is pending the diff is taken at the branch's current head, and atHash names that head; a closed proposal reads at its reviewed head. A target the caller cannot read answers not-found. Each bodyChanges entry carries lines exactly when either compared side is not markdown.", REF_READ),
|
|
651
669
|
readLinkStatus: doc("Reads an object's tracked links at a stable head: review (cleared, suspect, unreviewed, not-visible or too-many-links), clearing attribution, link bounds and aggregate bounds with units and coverage. Only a readable upstream supplies its opaque upstreamVersion, the precondition for clearing.", [...REF_READ, "head-moved"]),
|
|
652
670
|
clearLinks: doc("Clears 1 to 100 links atomically on the named ref. Send each linkId with the upstreamVersion from readLinkStatus as a precondition; upstream-changed requires a fresh read and review. Records the clearer and time without changing bounds. Admits user, `agent:apply`, client and service; `agent:explore` and `agent:types` are refused at admission. An unknown outcome must be recovered by correlation before retrying." + SAVE_REASON, [...OBJECT_WRITE, "upstream-changed", "upstream-not-readable", "too-many-links"]),
|
|
653
671
|
readChangeImpact: doc("Reads review, link bounds and aggregate bounds state changes against the branch's merge base, plus downstream reach to depth three and hidden counts. Both ref and base are required. Includes added and removed states and pins both heads; over-bound and head-moved refuse the entire read without a partial answer.", [...REF_READ, "over-bound", "head-moved"]),
|
|
@@ -768,7 +786,7 @@ var SCHEMAS = {
|
|
|
768
786
|
readBuildRun: { "type": "object", "properties": { "buildRunId": { "type": "string" } }, "required": ["buildRunId"], "additionalProperties": false },
|
|
769
787
|
listBuildRuns: { "type": "object", "properties": { "objectId": { "type": "string" }, "continuation": { "oneOf": [{ "type": "string" }, { "type": "null" }] } }, "required": ["objectId", "continuation"], "additionalProperties": false },
|
|
770
788
|
readStepRun: { "type": "object", "properties": { "stepRunId": { "type": "string" } }, "required": ["stepRunId"], "additionalProperties": false },
|
|
771
|
-
readOutputValues: { "type": "object", "properties": { "outputId": { "type": "string" }, "keys": { "type": "array", "items": { "type": "object", "properties": { "sweep": { "type": "object", "additionalProperties": { "type": "number" } }, "componentId": { "type": "string" }, "variable": { "type": "string" } }, "required": ["sweep", "componentId", "variable"], "additionalProperties": false } }, "runRef": { "type": "string" } }, "required": ["outputId", "keys"], "additionalProperties": false },
|
|
789
|
+
readOutputValues: { "type": "object", "properties": { "outputId": { "type": "string" }, "keys": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "source": { "const": "component" }, "sweep": { "type": "object", "additionalProperties": { "type": "number" } }, "componentId": { "type": "string" }, "variable": { "type": "string" } }, "required": ["source", "sweep", "componentId", "variable"], "additionalProperties": false }, { "type": "object", "properties": { "source": { "const": "step" }, "sweep": { "type": "object", "additionalProperties": { "type": "number" } }, "variable": { "type": "string" } }, "required": ["source", "sweep", "variable"], "additionalProperties": false }] } }, "runRef": { "type": "string" } }, "required": ["outputId", "keys"], "additionalProperties": false },
|
|
772
790
|
readStepLog: { "type": "object", "properties": { "stepRunId": { "type": "string" } }, "required": ["stepRunId"], "additionalProperties": false },
|
|
773
791
|
checkCase: { "type": "object", "properties": { "caseId": { "type": "string" } }, "required": ["caseId"], "additionalProperties": false },
|
|
774
792
|
registerEngine: { "type": "object", "properties": { "name": { "type": "string" }, "isolation": { "const": "ephemeral" }, "properties": { "type": "object", "additionalProperties": { "type": "string" } }, "runtime": { "type": "object", "properties": { "image": { "type": "string" } }, "required": ["image"], "additionalProperties": false } }, "required": ["name", "isolation", "properties", "runtime"], "additionalProperties": false },
|
|
@@ -956,7 +974,7 @@ var SCHEMAS = {
|
|
|
956
974
|
readCurrentChangeSet: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
957
975
|
readChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" } }, "required": ["changeSetId"], "additionalProperties": false },
|
|
958
976
|
readChangeSetState: { "type": "object", "properties": { "changeSetId": { "type": "string" } }, "required": ["changeSetId"], "additionalProperties": false },
|
|
959
|
-
reviseChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "expectedRevision": { "type": "string" }, "changes": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "instanceRule": { "enum": ["direct", "immutable"] }, "typeCategory": { "const": "object" }, "typeKey": { "type": "string" }, "version": { "type": "integer" }, "displayName": { "type": "string" }, "description": { "oneOf": [{ "type": "string" }, { "type": "null" }] }, "schemaLanguageVersion": { "type": "string" }, "propertyDefinitions": { "type": "object", "additionalProperties": {} }, "requiredPropertyKeys": { "type": "array", "items": { "type": "string" } }, "presentationBindings": { "type": "object", "properties": { "views": { "type": "object", "properties": { "object": { "type": "object", "properties": { "root": { "type": "string" }, "elements": { "type": "object", "additionalProperties": { "type": "object", "properties": { "type": { "type": "string" }, "props": { "type": "object", "additionalProperties": {} }, "children": { "type": "array", "items": { "type": "string" } }, "repeat": { "type": "object", "properties": { "statePath": { "type": "string" }, "key": { "type": "string" } }, "required": ["statePath"], "additionalProperties": false }, "on": { "type": "object", "properties": { "press": { "oneOf": [{ "type": "object", "properties": { "action": { "const": "set-properties" }, "params": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "object", "properties": { "$state": { "type": "string" } }, "required": ["$state"], "additionalProperties": false }] } } }, "required": ["properties"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }, { "type": "object", "properties": { "action": { "const": "run-verb" }, "params": { "type": "object", "properties": { "verb": { "type": "string" } }, "required": ["verb"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }] } }, "required": ["press"], "additionalProperties": false } }, "required": ["type", "props", "children"], "additionalProperties": false } } }, "required": ["root", "elements"], "additionalProperties": false }, "app": { "type": "object", "properties": { "root": { "type": "string" }, "elements": { "type": "object", "additionalProperties": { "type": "object", "properties": { "type": { "type": "string" }, "props": { "type": "object", "additionalProperties": {} }, "children": { "type": "array", "items": { "type": "string" } }, "repeat": { "type": "object", "properties": { "statePath": { "type": "string" }, "key": { "type": "string" } }, "required": ["statePath"], "additionalProperties": false }, "on": { "type": "object", "properties": { "press": { "oneOf": [{ "type": "object", "properties": { "action": { "const": "set-properties" }, "params": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "object", "properties": { "$state": { "type": "string" } }, "required": ["$state"], "additionalProperties": false }] } } }, "required": ["properties"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }, { "type": "object", "properties": { "action": { "const": "run-verb" }, "params": { "type": "object", "properties": { "verb": { "type": "string" } }, "required": ["verb"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }] } }, "required": ["press"], "additionalProperties": false } }, "required": ["type", "props", "children"], "additionalProperties": false } } }, "required": ["root", "elements"], "additionalProperties": false }, "card": { "type": "object", "properties": { "root": { "type": "string" }, "elements": { "type": "object", "additionalProperties": { "type": "object", "properties": { "type": { "type": "string" }, "props": { "type": "object", "additionalProperties": {} }, "children": { "type": "array", "items": { "type": "string" } }, "repeat": { "type": "object", "properties": { "statePath": { "type": "string" }, "key": { "type": "string" } }, "required": ["statePath"], "additionalProperties": false }, "on": { "type": "object", "properties": { "press": { "oneOf": [{ "type": "object", "properties": { "action": { "const": "set-properties" }, "params": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "object", "properties": { "$state": { "type": "string" } }, "required": ["$state"], "additionalProperties": false }] } } }, "required": ["properties"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }, { "type": "object", "properties": { "action": { "const": "run-verb" }, "params": { "type": "object", "properties": { "verb": { "type": "string" } }, "required": ["verb"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }] } }, "required": ["press"], "additionalProperties": false } }, "required": ["type", "props", "children"], "additionalProperties": false } } }, "required": ["root", "elements"], "additionalProperties": false } }, "required": [], "additionalProperties": false }, "title": { "type": "string" }, "summary": { "type": "string" }, "icon": { "type": "string" }, "typeIcon": { "type": "string" }, "propertyLabels": { "type": "object", "additionalProperties": { "type": "string" } }, "propertyOrder": { "type": "array", "items": { "type": "string" } }, "multiline": { "type": "array", "items": { "type": "string" } }, "rail": { "type": "object", "properties": { "group": { "type": "string" }, "order": { "type": "number" } }, "required": ["group", "order"], "additionalProperties": false } }, "required": [], "additionalProperties": false }, "structureDeclaration": { "type": "object", "properties": { "relationships": { "type": "array", "items": { "type": "string" } }, "views": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" }, "steps": { "type": "array", "items": { "type": "string" } }, "decoration": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" } }, "required": ["key", "label"], "additionalProperties": false } } }, "required": ["key", "label", "steps"], "additionalProperties": false } } }, "required": [], "additionalProperties": false }, "bodyFormat": { "const": "markdown" }, "subscriptionRoles": { "type": "object", "properties": { "owner": { "type": "object", "properties": { "max": { "type": "number" } }, "required": [], "additionalProperties": false }, "approver": { "type": "object", "properties": { "max": { "type": "number" } }, "required": [], "additionalProperties": false }, "watcher": { "type": "object", "properties": { "max": { "type": "number" } }, "required": [], "additionalProperties": false } }, "required": [], "additionalProperties": false } }, "required": ["typeCategory", "typeKey", "version", "displayName", "description", "schemaLanguageVersion", "propertyDefinitions", "requiredPropertyKeys"], "additionalProperties": false }, { "type": "object", "properties": { "typeCategory": { "const": "edge" }, "typeKey": { "type": "string" }, "version": { "type": "integer" }, "displayName": { "type": "string" }, "sourceObjectType": { "type": "string" }, "targetObjectType": { "type": "string" }, "kind": { "enum": ["structural", "traceability"] }, "subjectEnd": { "enum": ["source", "target"] }, "parentEnd": { "oneOf": [{ "const": "source" }, { "const": "target" }, { "type": "null" }] }, "sourceLabel": { "type": "string" }, "targetLabel": { "type": "string" }, "schemaLanguageVersion": { "type": "string" }, "propertyDefinitions": { "type": "object", "additionalProperties": {} }, "requiredPropertyKeys": { "type": "array", "items": { "type": "string" } }, "readRule": { "enum": ["both-endpoints", "either-endpoint"] }, "writeRule": { "enum": ["both-endpoints", "either-endpoint"] }, "editorHidden": { "type": "boolean" }, "review": { "type": "object", "properties": { "upstream": { "enum": ["source", "target"] }, "significant": { "type": "array", "items": { "type": "string" } }, "newLinks": { "enum": ["cleared", "unreviewed"] }, "propagation": { "enum": ["direct", "chain"] }, "chainDepth": { "type": "number" } }, "required": ["upstream"], "additionalProperties": false } }, "required": ["typeCategory", "typeKey", "version", "displayName", "sourceObjectType", "targetObjectType", "kind", "subjectEnd", "parentEnd", "sourceLabel", "targetLabel", "schemaLanguageVersion", "propertyDefinitions", "requiredPropertyKeys", "readRule", "writeRule"], "additionalProperties": false }, { "type": "object", "properties": { "typeCategory": { "const": "verb" }, "typeKey": { "type": "string" }, "version": { "type": "integer" }, "displayName": { "type": "string" }, "description": { "oneOf": [{ "type": "string" }, { "type": "null" }] }, "allowedSubjectTypes": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "none" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "types" }, "types": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "types"], "additionalProperties": false }] }, "inputSchema": {}, "resultSchema": {}, "handlerKey": { "type": "string" }, "template": { "type": "object", "properties": { "query": { "type": "object", "properties": { "typeKey": { "type": "string" }, "filters": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "enum": ["=", ">", ">=", "<", "<="] }, "value": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }] } } }, "required": ["kind", "property", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "text" }, "term": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }] }, "properties": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "term"], "additionalProperties": false }] } }, "sort": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "direction": { "enum": ["asc", "desc"] } }, "required": ["kind", "property", "direction"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "identity" }, "direction": { "enum": ["asc", "desc"] } }, "required": ["kind", "direction"], "additionalProperties": false }] }, "limit": { "type": "integer" } }, "required": ["typeKey", "limit"], "additionalProperties": false }, "operations": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "create-object" }, "typeKey": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } } }, "required": ["kind", "typeKey", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-object" }, "typeKey": { "type": "string" }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "absent" } }, "required": ["slot"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "absent" } }, "required": ["slot"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "typeKey", "target", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-object" }, "typeKey": { "type": "string" }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } }, "required": ["kind", "typeKey", "target"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "create-edge" }, "typeKey": { "type": "string" }, "source": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] }, "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } } }, "required": ["kind", "typeKey", "source", "target", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-edge" }, "typeKey": { "type": "string" }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } }, "required": ["kind", "typeKey", "target"], "additionalProperties": false }] } } }, "required": ["operations"], "additionalProperties": false }, "schemaLanguageVersion": { "type": "string" } }, "required": ["typeCategory", "typeKey", "version", "displayName", "description", "allowedSubjectTypes", "inputSchema", "resultSchema", "schemaLanguageVersion"], "additionalProperties": false }] } }, "railGroups": { "type": "array", "items": { "type": "string" } } }, "required": ["changeSetId", "expectedRevision", "changes"], "additionalProperties": false },
|
|
977
|
+
reviseChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "expectedRevision": { "type": "string" }, "changes": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "instanceRule": { "enum": ["direct", "immutable"] }, "typeCategory": { "const": "object" }, "typeKey": { "type": "string" }, "version": { "type": "integer" }, "displayName": { "type": "string" }, "description": { "oneOf": [{ "type": "string" }, { "type": "null" }] }, "schemaLanguageVersion": { "type": "string" }, "propertyDefinitions": { "type": "object", "additionalProperties": {} }, "requiredPropertyKeys": { "type": "array", "items": { "type": "string" } }, "presentationBindings": { "type": "object", "properties": { "views": { "type": "object", "properties": { "object": { "type": "object", "properties": { "root": { "type": "string" }, "elements": { "type": "object", "additionalProperties": { "type": "object", "properties": { "type": { "type": "string" }, "props": { "type": "object", "additionalProperties": {} }, "children": { "type": "array", "items": { "type": "string" } }, "repeat": { "type": "object", "properties": { "statePath": { "type": "string" }, "key": { "type": "string" } }, "required": ["statePath"], "additionalProperties": false }, "on": { "type": "object", "properties": { "press": { "oneOf": [{ "type": "object", "properties": { "action": { "const": "set-properties" }, "params": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "object", "properties": { "$state": { "type": "string" } }, "required": ["$state"], "additionalProperties": false }] } } }, "required": ["properties"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }, { "type": "object", "properties": { "action": { "const": "run-verb" }, "params": { "type": "object", "properties": { "verb": { "type": "string" } }, "required": ["verb"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }] } }, "required": ["press"], "additionalProperties": false } }, "required": ["type", "props", "children"], "additionalProperties": false } } }, "required": ["root", "elements"], "additionalProperties": false }, "app": { "type": "object", "properties": { "root": { "type": "string" }, "elements": { "type": "object", "additionalProperties": { "type": "object", "properties": { "type": { "type": "string" }, "props": { "type": "object", "additionalProperties": {} }, "children": { "type": "array", "items": { "type": "string" } }, "repeat": { "type": "object", "properties": { "statePath": { "type": "string" }, "key": { "type": "string" } }, "required": ["statePath"], "additionalProperties": false }, "on": { "type": "object", "properties": { "press": { "oneOf": [{ "type": "object", "properties": { "action": { "const": "set-properties" }, "params": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "object", "properties": { "$state": { "type": "string" } }, "required": ["$state"], "additionalProperties": false }] } } }, "required": ["properties"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }, { "type": "object", "properties": { "action": { "const": "run-verb" }, "params": { "type": "object", "properties": { "verb": { "type": "string" } }, "required": ["verb"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }] } }, "required": ["press"], "additionalProperties": false } }, "required": ["type", "props", "children"], "additionalProperties": false } } }, "required": ["root", "elements"], "additionalProperties": false }, "card": { "type": "object", "properties": { "root": { "type": "string" }, "elements": { "type": "object", "additionalProperties": { "type": "object", "properties": { "type": { "type": "string" }, "props": { "type": "object", "additionalProperties": {} }, "children": { "type": "array", "items": { "type": "string" } }, "repeat": { "type": "object", "properties": { "statePath": { "type": "string" }, "key": { "type": "string" } }, "required": ["statePath"], "additionalProperties": false }, "on": { "type": "object", "properties": { "press": { "oneOf": [{ "type": "object", "properties": { "action": { "const": "set-properties" }, "params": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "object", "properties": { "$state": { "type": "string" } }, "required": ["$state"], "additionalProperties": false }] } } }, "required": ["properties"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }, { "type": "object", "properties": { "action": { "const": "run-verb" }, "params": { "type": "object", "properties": { "verb": { "type": "string" } }, "required": ["verb"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }] } }, "required": ["press"], "additionalProperties": false } }, "required": ["type", "props", "children"], "additionalProperties": false } } }, "required": ["root", "elements"], "additionalProperties": false } }, "required": [], "additionalProperties": false }, "title": { "type": "string" }, "summary": { "type": "string" }, "icon": { "type": "string" }, "typeIcon": { "type": "string" }, "propertyLabels": { "type": "object", "additionalProperties": { "type": "string" } }, "propertyOrder": { "type": "array", "items": { "type": "string" } }, "multiline": { "type": "array", "items": { "type": "string" } }, "rail": { "type": "object", "properties": { "group": { "type": "string" }, "order": { "type": "number" } }, "required": ["group", "order"], "additionalProperties": false } }, "required": [], "additionalProperties": false }, "structureDeclaration": { "type": "object", "properties": { "relationships": { "type": "array", "items": { "type": "string" } }, "views": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" }, "steps": { "type": "array", "items": { "type": "string" } }, "decoration": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" } }, "required": ["key", "label"], "additionalProperties": false } } }, "required": ["key", "label", "steps"], "additionalProperties": false } } }, "required": [], "additionalProperties": false }, "bodyFormats": { "type": "array", "items": { "enum": ["markdown", "python", "json", "yaml", "typescript", "javascript", "plaintext", "modelica", "sysml", "starlark"] } }, "subscriptionRoles": { "type": "object", "properties": { "owner": { "type": "object", "properties": { "max": { "type": "number" } }, "required": [], "additionalProperties": false }, "approver": { "type": "object", "properties": { "max": { "type": "number" } }, "required": [], "additionalProperties": false }, "watcher": { "type": "object", "properties": { "max": { "type": "number" } }, "required": [], "additionalProperties": false } }, "required": [], "additionalProperties": false } }, "required": ["typeCategory", "typeKey", "version", "displayName", "description", "schemaLanguageVersion", "propertyDefinitions", "requiredPropertyKeys"], "additionalProperties": false }, { "type": "object", "properties": { "typeCategory": { "const": "edge" }, "typeKey": { "type": "string" }, "version": { "type": "integer" }, "displayName": { "type": "string" }, "sourceObjectType": { "type": "string" }, "targetObjectType": { "type": "string" }, "kind": { "enum": ["structural", "traceability"] }, "subjectEnd": { "enum": ["source", "target"] }, "parentEnd": { "oneOf": [{ "const": "source" }, { "const": "target" }, { "type": "null" }] }, "sourceLabel": { "type": "string" }, "targetLabel": { "type": "string" }, "schemaLanguageVersion": { "type": "string" }, "propertyDefinitions": { "type": "object", "additionalProperties": {} }, "requiredPropertyKeys": { "type": "array", "items": { "type": "string" } }, "readRule": { "enum": ["both-endpoints", "either-endpoint"] }, "writeRule": { "enum": ["both-endpoints", "either-endpoint"] }, "editorHidden": { "type": "boolean" }, "review": { "type": "object", "properties": { "upstream": { "enum": ["source", "target"] }, "significant": { "type": "array", "items": { "type": "string" } }, "newLinks": { "enum": ["cleared", "unreviewed"] }, "propagation": { "enum": ["direct", "chain"] }, "chainDepth": { "type": "number" } }, "required": ["upstream"], "additionalProperties": false } }, "required": ["typeCategory", "typeKey", "version", "displayName", "sourceObjectType", "targetObjectType", "kind", "subjectEnd", "parentEnd", "sourceLabel", "targetLabel", "schemaLanguageVersion", "propertyDefinitions", "requiredPropertyKeys", "readRule", "writeRule"], "additionalProperties": false }, { "type": "object", "properties": { "typeCategory": { "const": "verb" }, "typeKey": { "type": "string" }, "version": { "type": "integer" }, "displayName": { "type": "string" }, "description": { "oneOf": [{ "type": "string" }, { "type": "null" }] }, "allowedSubjectTypes": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "none" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "types" }, "types": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "types"], "additionalProperties": false }] }, "inputSchema": {}, "resultSchema": {}, "handlerKey": { "type": "string" }, "template": { "type": "object", "properties": { "query": { "type": "object", "properties": { "typeKey": { "type": "string" }, "filters": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "enum": ["=", ">", ">=", "<", "<="] }, "value": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }] } } }, "required": ["kind", "property", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "text" }, "term": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }] }, "properties": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "term"], "additionalProperties": false }] } }, "sort": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "direction": { "enum": ["asc", "desc"] } }, "required": ["kind", "property", "direction"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "identity" }, "direction": { "enum": ["asc", "desc"] } }, "required": ["kind", "direction"], "additionalProperties": false }] }, "limit": { "type": "integer" } }, "required": ["typeKey", "limit"], "additionalProperties": false }, "operations": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "create-object" }, "typeKey": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } } }, "required": ["kind", "typeKey", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-object" }, "typeKey": { "type": "string" }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "absent" } }, "required": ["slot"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "absent" } }, "required": ["slot"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "typeKey", "target", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-object" }, "typeKey": { "type": "string" }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } }, "required": ["kind", "typeKey", "target"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "create-edge" }, "typeKey": { "type": "string" }, "source": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] }, "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } } }, "required": ["kind", "typeKey", "source", "target", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-edge" }, "typeKey": { "type": "string" }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } }, "required": ["kind", "typeKey", "target"], "additionalProperties": false }] } } }, "required": ["operations"], "additionalProperties": false }, "schemaLanguageVersion": { "type": "string" } }, "required": ["typeCategory", "typeKey", "version", "displayName", "description", "allowedSubjectTypes", "inputSchema", "resultSchema", "schemaLanguageVersion"], "additionalProperties": false }] } }, "railGroups": { "type": "array", "items": { "type": "string" } } }, "required": ["changeSetId", "expectedRevision", "changes"], "additionalProperties": false },
|
|
960
978
|
validateChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "revision": { "type": "string" } }, "required": ["changeSetId", "revision"], "additionalProperties": false },
|
|
961
979
|
discardChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" } }, "required": ["changeSetId"], "additionalProperties": false },
|
|
962
980
|
acceptChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "revision": { "type": "string" }, "correlationId": { "type": "string" } }, "required": ["changeSetId", "revision"], "additionalProperties": false },
|
|
@@ -975,7 +993,7 @@ var SCHEMAS = {
|
|
|
975
993
|
removeSubscriber: { "type": "object", "properties": { "objectId": { "type": "string" }, "role": { "enum": ["owner", "approver", "watcher"] }, "person": { "type": "object", "properties": { "kind": { "const": "person" }, "id": { "type": "string" } }, "required": ["kind", "id"], "additionalProperties": false } }, "required": ["objectId", "role", "person"], "additionalProperties": false },
|
|
976
994
|
listComments: { "type": "object", "properties": { "objectId": { "type": "string" }, "after": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
977
995
|
acquireDraft: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
978
|
-
saveDraft: { "type": "object", "properties": { "objectId": { "type": "string" }, "blocks": { "type": "object", "additionalProperties": { "type": "object", "properties": { "kind": { "const": "markdown" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false } }, "added": { "type": "array", "items": { "type": "object", "properties": { "kind": { "const": "markdown" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false } }, "draftHash": { "type": "string" } }, "required": ["objectId", "blocks", "added", "draftHash"], "additionalProperties": false },
|
|
996
|
+
saveDraft: { "type": "object", "properties": { "objectId": { "type": "string" }, "blocks": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "markdown" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "python" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "json" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "yaml" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "typescript" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "javascript" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "plaintext" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "modelica" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sysml" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "starlark" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }] } }, "added": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "markdown" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "python" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "json" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "yaml" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "typescript" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "javascript" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "plaintext" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "modelica" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sysml" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "starlark" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false }] } }, "draftHash": { "type": "string" } }, "required": ["objectId", "blocks", "added", "draftHash"], "additionalProperties": false },
|
|
979
997
|
promoteDraft: { "type": "object", "properties": { "objectId": { "type": "string" }, "draftHash": { "type": "string" }, "reason": { "type": "string" } }, "required": ["objectId", "draftHash", "reason"], "additionalProperties": false },
|
|
980
998
|
releaseDraft: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
981
999
|
discardDraft: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
@@ -1224,8 +1242,13 @@ var EXAMPLES = {
|
|
|
1224
1242
|
var ROUTE_INPUT_EXAMPLES = deepFreeze(EXAMPLES);
|
|
1225
1243
|
var DESCRIPTION_ROUTES = Object.freeze(["queryRows", "queryObjects", "aggregateObjects", "queryGraph", "readStructure", "findPaths"]);
|
|
1226
1244
|
|
|
1245
|
+
// packages/api-contract/dist/engine-protocol.js
|
|
1246
|
+
var ENGINE_PROTOCOL_DIGESTS = Object.freeze({
|
|
1247
|
+
1: "2bb420b4fefdb3cdffc97d372d0e171364c45afbd1393beac1ffdfeb1e56d5d6"
|
|
1248
|
+
});
|
|
1249
|
+
|
|
1227
1250
|
// packages/api-contract/dist/routes.js
|
|
1228
|
-
var PROTOCOL_VERSION =
|
|
1251
|
+
var PROTOCOL_VERSION = 50;
|
|
1229
1252
|
var VERSION_HEADER = "oe2-protocol-version";
|
|
1230
1253
|
var TOKEN_HEADER = "authorization";
|
|
1231
1254
|
var IDEMPOTENCY_HEADER = "oe2-idempotency-key";
|
|
@@ -2555,7 +2578,7 @@ var CLIENT_SCOPES = Object.freeze({
|
|
|
2555
2578
|
capabilities: Object.freeze(["objects.build"]),
|
|
2556
2579
|
consentLine: "Start and cancel builds in your projects, as you."
|
|
2557
2580
|
}),
|
|
2558
|
-
offline_access: Object.freeze({ capabilities: Object.freeze([]), consentLine: "Stay connected
|
|
2581
|
+
offline_access: Object.freeze({ capabilities: Object.freeze([]), consentLine: "Stay connected for up to seven days, until you disconnect it." })
|
|
2559
2582
|
});
|
|
2560
2583
|
|
|
2561
2584
|
// packages/api-contract/dist/attachment-headers.js
|
|
@@ -3546,6 +3569,9 @@ function createHttpsTransport(origin, options = {}, deadlineMs) {
|
|
|
3546
3569
|
// packages/sdk-dispatch/dist/step-up-road.js
|
|
3547
3570
|
var POLL_INTERVAL_MS = 2e3;
|
|
3548
3571
|
var POLL_LIMIT_MS = 31e4;
|
|
3572
|
+
var POLL_RETRY_LIMIT = 3;
|
|
3573
|
+
var POLL_REFRESH_LIMIT = 1;
|
|
3574
|
+
var POLL_BACKOFF_MS = 1e3;
|
|
3549
3575
|
function refusalOf(body) {
|
|
3550
3576
|
if (typeof body !== "object" || body === null || !("refusal" in body)) {
|
|
3551
3577
|
return null;
|
|
@@ -3577,10 +3603,36 @@ async function post(transport, origin, route2, token, input) {
|
|
|
3577
3603
|
async function pollForProof(transport, origin, token, pendingId, road, signal) {
|
|
3578
3604
|
const stopped = () => signal?.aborted === true;
|
|
3579
3605
|
const stop = road.clock.now() + POLL_LIMIT_MS;
|
|
3606
|
+
let retries = 0;
|
|
3607
|
+
let refreshes = 0;
|
|
3580
3608
|
while (road.clock.now() < stop) {
|
|
3581
3609
|
if (stopped())
|
|
3582
3610
|
return { state: "stopped" };
|
|
3583
|
-
const
|
|
3611
|
+
const entry2 = ROUTES.readStepUpProof;
|
|
3612
|
+
const response = await transport(`${origin}${entry2.path}`, {
|
|
3613
|
+
method: entry2.method,
|
|
3614
|
+
headers: { "content-type": "application/json", [VERSION_HEADER]: String(PROTOCOL_VERSION), [TOKEN_HEADER]: token },
|
|
3615
|
+
body: JSON.stringify({ input: { pendingId } })
|
|
3616
|
+
});
|
|
3617
|
+
if (response.status === 401 && road.refreshToken !== void 0) {
|
|
3618
|
+
if (refreshes >= POLL_REFRESH_LIMIT)
|
|
3619
|
+
return { state: "refresh-failed" };
|
|
3620
|
+
refreshes += 1;
|
|
3621
|
+
const fresh = await road.refreshToken();
|
|
3622
|
+
if (fresh === null)
|
|
3623
|
+
return { state: "refresh-failed" };
|
|
3624
|
+
token = fresh;
|
|
3625
|
+
await road.clock.wait(Math.min(POLL_BACKOFF_MS, Math.max(0, stop - road.clock.now())));
|
|
3626
|
+
continue;
|
|
3627
|
+
}
|
|
3628
|
+
if ((response.status === 502 || response.status === 503 || response.status === 504) && retries < POLL_RETRY_LIMIT) {
|
|
3629
|
+
const delay = POLL_BACKOFF_MS * 2 ** retries;
|
|
3630
|
+
retries += 1;
|
|
3631
|
+
await road.clock.wait(Math.min(delay, Math.max(0, stop - road.clock.now())));
|
|
3632
|
+
continue;
|
|
3633
|
+
}
|
|
3634
|
+
const envelope = await readEnvelope(response, entry2.path);
|
|
3635
|
+
retries = 0;
|
|
3584
3636
|
if (stopped())
|
|
3585
3637
|
return { state: "stopped" };
|
|
3586
3638
|
if ("refusal" in envelope) {
|
|
@@ -3590,7 +3642,7 @@ async function pollForProof(transport, origin, token, pendingId, road, signal) {
|
|
|
3590
3642
|
return { state: "timed-out" };
|
|
3591
3643
|
const result = envelope.result;
|
|
3592
3644
|
if (result.state === "confirmed" && typeof result.proof === "string") {
|
|
3593
|
-
return { state: "confirmed", proof: result.proof };
|
|
3645
|
+
return { state: "confirmed", proof: result.proof, token };
|
|
3594
3646
|
}
|
|
3595
3647
|
if (result.state !== "awaiting") {
|
|
3596
3648
|
throw new Error("the proof poll answered an unrecognised state");
|
|
@@ -3638,11 +3690,15 @@ function withStepUpRoad(transport, road) {
|
|
|
3638
3690
|
}
|
|
3639
3691
|
if (polled.state === "stopped")
|
|
3640
3692
|
return replayed(first, body);
|
|
3693
|
+
if (polled.state === "refresh-failed") {
|
|
3694
|
+
road.note("confirmation stopped because the session could not be refreshed; sign in and run the command again");
|
|
3695
|
+
return replayed(first, body);
|
|
3696
|
+
}
|
|
3641
3697
|
if (polled.state === "timed-out") {
|
|
3642
3698
|
road.note("the action was refused because nobody confirmed it in time; run the command again");
|
|
3643
3699
|
return replayed(first, body);
|
|
3644
3700
|
}
|
|
3645
|
-
return transport(input, { ...init, headers: { ...headers, [STEP_UP_HEADER]: polled.proof } });
|
|
3701
|
+
return transport(input, { ...init, headers: { ...headers, [STEP_UP_HEADER]: polled.proof, [TOKEN_HEADER]: polled.token } });
|
|
3646
3702
|
};
|
|
3647
3703
|
}
|
|
3648
3704
|
|
|
@@ -5286,6 +5342,12 @@ function checkSampleAgainstChanges(changes, typeKey, sample) {
|
|
|
5286
5342
|
}
|
|
5287
5343
|
|
|
5288
5344
|
// packages/ontology-sdk/dist/type-delta.js
|
|
5345
|
+
function bodyFormatsOf(value) {
|
|
5346
|
+
if (!isBodyFormatList(value)) {
|
|
5347
|
+
throw new Error("a published type version's bodyFormats is not a non-empty list of distinct body formats");
|
|
5348
|
+
}
|
|
5349
|
+
return value;
|
|
5350
|
+
}
|
|
5289
5351
|
var NOT_COMPARED = /* @__PURE__ */ new Set(["typeCategory", "typeKey", "version"]);
|
|
5290
5352
|
function isRecord2(value) {
|
|
5291
5353
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -5344,7 +5406,7 @@ function objectProspective(published) {
|
|
|
5344
5406
|
requiredPropertyKeys: stringListOf(published.requiredPropertyKeys, `${what} requiredPropertyKeys`),
|
|
5345
5407
|
presentationBindings: published.presentationBindings,
|
|
5346
5408
|
structureDeclaration: published.structureDeclaration,
|
|
5347
|
-
...published.
|
|
5409
|
+
...published.bodyFormats === void 0 || published.bodyFormats === null ? {} : { bodyFormats: bodyFormatsOf(published.bodyFormats) },
|
|
5348
5410
|
...published.subscriptionRoles === void 0 ? {} : { subscriptionRoles: published.subscriptionRoles }
|
|
5349
5411
|
};
|
|
5350
5412
|
}
|
|
@@ -5409,6 +5471,9 @@ function sameValue(left, right) {
|
|
|
5409
5471
|
function comparedFields(type) {
|
|
5410
5472
|
return Object.fromEntries(Object.entries(type).filter(([name]) => !NOT_COMPARED.has(name)));
|
|
5411
5473
|
}
|
|
5474
|
+
function prospectiveFieldDeltas(before, after) {
|
|
5475
|
+
return fieldDeltas(comparedFields(before), comparedFields(after));
|
|
5476
|
+
}
|
|
5412
5477
|
function publishedOf(catalogue, category, typeKey) {
|
|
5413
5478
|
switch (category) {
|
|
5414
5479
|
case "object":
|
|
@@ -5439,10 +5504,9 @@ function fieldDeltas(before, after) {
|
|
|
5439
5504
|
}
|
|
5440
5505
|
function typeDelta(catalogue, changes) {
|
|
5441
5506
|
return Object.entries(changes).map(([typeKey, type]) => {
|
|
5442
|
-
const after = comparedFields(type);
|
|
5443
5507
|
const published = publishedOf(catalogue, type.typeCategory, typeKey);
|
|
5444
5508
|
if (published === void 0) {
|
|
5445
|
-
return { typeCategory: type.typeCategory, typeKey, kind: "added", beforeVersion: null, afterVersion: 1, fields: fieldDeltas({},
|
|
5509
|
+
return { typeCategory: type.typeCategory, typeKey, kind: "added", beforeVersion: null, afterVersion: 1, fields: fieldDeltas({}, comparedFields(type)) };
|
|
5446
5510
|
}
|
|
5447
5511
|
return {
|
|
5448
5512
|
typeCategory: type.typeCategory,
|
|
@@ -5450,7 +5514,7 @@ function typeDelta(catalogue, changes) {
|
|
|
5450
5514
|
kind: "changed",
|
|
5451
5515
|
beforeVersion: published.version,
|
|
5452
5516
|
afterVersion: published.version + 1,
|
|
5453
|
-
fields:
|
|
5517
|
+
fields: prospectiveFieldDeltas(prospectiveOfPublished(published), type)
|
|
5454
5518
|
};
|
|
5455
5519
|
});
|
|
5456
5520
|
}
|
|
@@ -6903,6 +6967,14 @@ function removeLock(path) {
|
|
|
6903
6967
|
}
|
|
6904
6968
|
}
|
|
6905
6969
|
}
|
|
6970
|
+
var refreshedBearer = async (host, deps) => {
|
|
6971
|
+
const held = await deps.store.read(host.key);
|
|
6972
|
+
if (held === null) {
|
|
6973
|
+
return null;
|
|
6974
|
+
}
|
|
6975
|
+
const refreshed = await refreshSession(host, deps, held.session);
|
|
6976
|
+
return refreshed.ok ? `Bearer ${refreshed.session.accessToken}` : null;
|
|
6977
|
+
};
|
|
6906
6978
|
var freshSession = async (host, deps) => {
|
|
6907
6979
|
const stored = await readEntry(host, deps, "login");
|
|
6908
6980
|
if (!stored.ok) {
|
|
@@ -14626,7 +14698,10 @@ function resultText(result) {
|
|
|
14626
14698
|
const value = displayPropertyValue(result.value, { kind: "number", unit: result.unit });
|
|
14627
14699
|
return `${label}${result.nonRepeatable ? `; ${RESULT_LABELS.nonRepeatable}` : ""}; ${value}; ${result.ref}`;
|
|
14628
14700
|
}
|
|
14629
|
-
if (result.state === "no-result")
|
|
14701
|
+
if (result.state === "no-result") {
|
|
14702
|
+
const name = result.key.source === "component" ? `${result.key.componentId}; ${result.key.variable}` : result.key.variable;
|
|
14703
|
+
return `${label}; ${name}; ${JSON.stringify(result.key.sweep)}`;
|
|
14704
|
+
}
|
|
14630
14705
|
return label;
|
|
14631
14706
|
}
|
|
14632
14707
|
function statusText(answer) {
|
|
@@ -15340,14 +15415,16 @@ ${usageLines(commands).join("\n")}` : unknownCommandMessage(commands, invocation
|
|
|
15340
15415
|
if (!selection.ok) {
|
|
15341
15416
|
return { outcome: outcomeOfStoreRefusal(selection.refusal), json: options.json, scope: null };
|
|
15342
15417
|
}
|
|
15343
|
-
const
|
|
15344
|
-
|
|
15345
|
-
|
|
15346
|
-
|
|
15347
|
-
|
|
15348
|
-
|
|
15418
|
+
const stepUpRoad = {
|
|
15419
|
+
clock,
|
|
15420
|
+
refreshToken: () => refreshedBearer(parsedHost.host, deps),
|
|
15421
|
+
confirmAddress: (pendingId, webOrigin) => new URL(stepUpAddress(pendingId), webOrigin).href,
|
|
15422
|
+
announce: addressPrinter(options.json),
|
|
15423
|
+
note: (line) => process.stderr.write(`${line}
|
|
15349
15424
|
`)
|
|
15350
|
-
|
|
15425
|
+
};
|
|
15426
|
+
const deps = {
|
|
15427
|
+
transport: withStepUpRoad(createTransport(parsedHost.host), stepUpRoad),
|
|
15351
15428
|
store: selection.store,
|
|
15352
15429
|
clock,
|
|
15353
15430
|
configDirectory,
|
package/package.json
CHANGED
package/skill/openeng/SKILL.md
CHANGED
|
@@ -338,10 +338,22 @@ Send a `reason` with every save: in the `--input` JSON of `mutate`, `mutateBatch
|
|
|
338
338
|
reason before any call. A merge keeps its required `message`. The host writes the reason first in
|
|
339
339
|
the save's commit message, exactly as sent, so the history says why the change was made.
|
|
340
340
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
"update object" does not.
|
|
344
|
-
|
|
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
|
|
345
357
|
space, or that holds a NUL character or a lone UTF-16 surrogate, as `invalid-request` with the field `input.reason`.
|
|
346
358
|
|
|
347
359
|
### Draft and comment routes
|
|
@@ -352,6 +364,13 @@ The Objects SDK transport also exposes `acquireDraft`, `saveDraft`, `promoteDraf
|
|
|
352
364
|
`objectId`; `saveDraft` also takes the `draftHash` last read, `blocks` keyed by identifiers the
|
|
353
365
|
draft already holds, and `added`, a list of new blocks without identifiers; it answers the
|
|
354
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
|
+
|
|
355
374
|
`openeng objects-sdk acquireDraft` starts a draft of the object's body and answers its blocks and
|
|
356
375
|
`draftHash`; `openeng objects-sdk promoteDraft` publishes the draft as the body with the
|
|
357
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
|
|
@@ -368,8 +387,9 @@ on another branch and merge it; a caller without write access receives the ordin
|
|
|
368
387
|
Object history (`openeng objects-sdk readHistory`) and a branch comparison
|
|
369
388
|
(`openeng branches-sdk readBranchDiff`) carry a `bodyChanges` list on each version or changed object:
|
|
370
389
|
one entry per body block that differs, `{ blockId, kind, before, after }`, with `kind` one of `added`,
|
|
371
|
-
`removed`, `changed` or `moved
|
|
372
|
-
|
|
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.
|
|
373
393
|
|
|
374
394
|
`breakDraftLock` and `restoreDraft` require a person token and use `objects.draftAdmin`. No client
|
|
375
395
|
scope or run client holds this capability. `restoreDraft` takes `trashId` and `newRefName` and
|
|
@@ -414,8 +434,8 @@ grant access to its title, type or properties. Any cursor that is not a current
|
|
|
414
434
|
`openeng branches-sdk disposeRef` lets a branch writer dispose when no pending proposal exists
|
|
415
435
|
and no matching rule restricts deletions, or when no rule matches even with a pending proposal.
|
|
416
436
|
Otherwise the caller must be on every matching rule's bypass list. A bypass member may dispose
|
|
417
|
-
with or without a proposal, including under restricted deletions
|
|
418
|
-
|
|
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
|
|
419
439
|
agent-mode CLI session, or a session with no recorded channel, takes no bypass for a merge, a
|
|
420
440
|
disposal or a direct edit. Success discards the pending proposal after the engine disposal succeeds.
|
|
421
441
|
|
|
@@ -440,6 +460,8 @@ whose target was not `main`. A conflicting object also lists `blocks`: the body
|
|
|
440
460
|
differently, each `{ blockId, base, ours, theirs }` with the text of the common version, of `main` and of
|
|
441
461
|
the source branch (null where a side has no such block). Reconcile the changes on the source branch, then submit a new merge
|
|
442
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.
|
|
443
465
|
|
|
444
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.
|
|
445
467
|
|
|
@@ -751,9 +773,15 @@ of the data-input shape: from `build-step`, with exactly two properties, `name`
|
|
|
751
773
|
both required.
|
|
752
774
|
The pack names these types `reads-data-from-<type>` and hides them in the ontology editor.
|
|
753
775
|
The edge reads the named property of the object at the ref, and a bound value is at most 1 MiB.
|
|
754
|
-
|
|
755
|
-
`binding-mismatch
|
|
756
|
-
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".
|
|
757
785
|
|
|
758
786
|
```sh
|
|
759
787
|
openeng objects-sdk checkCase --selector '{"projectId":"p","ref":"main"}' --input '{"caseId":"case"}'
|