@openengio/cli 0.45.0 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -8
- package/bin/public/openeng.js +404 -139
- package/package.json +1 -1
- package/skill/openeng/SKILL.md +107 -15
package/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",
|
|
@@ -91,13 +97,14 @@ var RULE_ENTRIES = {
|
|
|
91
97
|
"build-input-outside-project": entry("An input is outside the build's project.", FIX_REQUEST),
|
|
92
98
|
"case-invalid": entry("The case check has violations.", FIX_REQUEST),
|
|
93
99
|
"outputs-already-current": entry("Some requested outputs are already current; nothing was started.", { option: "Choose run-all or run-stale and send the request again." }),
|
|
100
|
+
"build-too-large": entry("The build requests more step runs than one build may start (20). Split the request.", FIX_REQUEST),
|
|
94
101
|
"build-limit-reached": entry("The build exceeds an organisation or closure limit.", FIX_REQUEST),
|
|
95
102
|
"engine-mismatch": entry("The registered engine fails a required engine check.", FIX_REQUEST),
|
|
96
103
|
"engine-image-changed": entry("The engine ran an image other than the one recorded when the step started.", ASK_ADMINISTRATOR),
|
|
97
104
|
"function-entry-unknown": entry("The engine image does not offer the requested entry.", FIX_REQUEST),
|
|
98
105
|
"step-outputs-missing": entry("The output objects do not fill the entry's output slots.", FIX_REQUEST),
|
|
99
106
|
"step-run-closed": entry("The step run is terminal or its result was already accepted.", FIX_REQUEST),
|
|
100
|
-
"claim-refused": entry("The execution claim was refused.", { option: "
|
|
107
|
+
"claim-refused": entry("The execution claim was refused.", { option: "Retry every two seconds for at most sixty seconds." }),
|
|
101
108
|
"not-yet-bound": entry("The claim code is live and its execution binding is pending.", { option: "Retry every two seconds for at most sixty seconds." }),
|
|
102
109
|
"engine-invalid": entry("The engine properties, class or runtime are not admitted.", FIX_REQUEST),
|
|
103
110
|
"log-already-written": entry("The step run already has a log.", FIX_REQUEST),
|
|
@@ -116,6 +123,7 @@ var RULE_ENTRIES = {
|
|
|
116
123
|
"object-not-found": entry("The object is absent from the destination branch.", FIX_REQUEST),
|
|
117
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." }),
|
|
118
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),
|
|
119
127
|
"body-not-declared": entry("The object's type version does not declare a body format.", FIX_REQUEST),
|
|
120
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" }),
|
|
121
129
|
"body-too-large": entry("The body exceeds the limit on blocks, bytes per block or total bytes.", FIX_REQUEST),
|
|
@@ -177,7 +185,8 @@ var RULE_ENTRIES = {
|
|
|
177
185
|
"plan-not-open": entry("The plan is not open.", { option: "Read the agent session.", read: "readAgentSession" }),
|
|
178
186
|
"unknown-role": entry("The role key is unknown to this deployment.", { option: "Choose a role key from roleKeys and send the request again." }),
|
|
179
187
|
"above-caller-role": entry("The request would give a role that is higher than your own, or change one.", ASK_ADMINISTRATOR),
|
|
180
|
-
"
|
|
188
|
+
"membership-own-role": entry("A person cannot grant or change their own membership.", ASK_ADMINISTRATOR),
|
|
189
|
+
"last-administrator": entry("The organisation must keep at least one administrator.", { option: "Name another administrator first." }),
|
|
181
190
|
"erasure-not-permitted": entry("The erasure is not permitted.", ASK_ADMINISTRATOR),
|
|
182
191
|
"no-such-membership": entry("The membership the request names is not one you may change.", FIX_REQUEST),
|
|
183
192
|
"capability-missing": entry("You do not have the permission this operation needs.", ASK_ADMINISTRATOR),
|
|
@@ -227,6 +236,7 @@ var RULE_ENTRIES = {
|
|
|
227
236
|
protected: entry("A rule protects this record on this branch, so it changes only by a merge from another branch.", { option: "Make the change on another branch and merge it." }),
|
|
228
237
|
"not-a-ref-head": entry("The commit is not the latest commit of a branch you can use.", { option: "Read the branches you can use and choose one." }),
|
|
229
238
|
"stale-source": entry("The source commit is not the current commit on the named branch.", { option: "Read a branch you can use and merge its current commit." }),
|
|
239
|
+
"merge-preview-approximate": entry("The merge's changes could not be read exactly, so nothing was merged.", { option: "Start a new branch from the target, make the changes there, and merge that branch." }),
|
|
230
240
|
"branch-needs-schema-update": entry("This branch's schema differs from the platform's, so it must be updated before it can be read or written.", { option: "Request a schema update for the branch." }),
|
|
231
241
|
"organisation-not-ready": entry("The organisation's trunk is not ready yet.", { option: "Try again shortly." }),
|
|
232
242
|
"read-only-ref": entry("The branch is read-only, the write names a commit, or you cannot write to this branch.", { option: "Choose a branch you can write to." }),
|
|
@@ -428,11 +438,12 @@ var PUBLIC = ["invalid-request", "bound-exceeded", "internal"];
|
|
|
428
438
|
var CHANGE_SET = [...SIGNED_IN, "not-permitted", "stale-revision", "not-open"];
|
|
429
439
|
var QUERY_PROJECT_SCOPE = 'Without input.projects, it reads every project the caller can read on the selected branch or baseline; selector.projectId does not narrow the set. To limit it to one project, include "projects":["<projectId>"] in input.';
|
|
430
440
|
var GRAPH_QUERY_PROJECT_SCOPE = 'Without input.start.projects, it reads every project the caller can read on the selected ref; selector.projectId does not narrow the set. To limit it to some projects, include "projects":["<projectId>"] in input.start.';
|
|
441
|
+
var SAVE_REASON = " The reason is required and is written first in the save's commit message, above the platform's lines, exactly as sent; it is refused as invalid-request when it is missing, empty after trimming white space, holds NUL or holds a lone UTF-16 surrogate.";
|
|
431
442
|
function doc(does, refuses) {
|
|
432
443
|
return Object.freeze({ does, refuses: Object.freeze([...refuses]) });
|
|
433
444
|
}
|
|
434
445
|
var ROUTE_DOCS = Object.freeze({
|
|
435
|
-
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.`, [
|
|
436
447
|
"output-ambiguous",
|
|
437
448
|
"build-cycle",
|
|
438
449
|
"binding-mismatch",
|
|
@@ -440,6 +451,7 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
440
451
|
"case-invalid",
|
|
441
452
|
"outputs-already-current",
|
|
442
453
|
"build-limit-reached",
|
|
454
|
+
"build-too-large",
|
|
443
455
|
"engine-mismatch",
|
|
444
456
|
"function-entry-unknown",
|
|
445
457
|
"step-outputs-missing",
|
|
@@ -466,6 +478,8 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
466
478
|
readObjectSet: doc("Reads a saved set's visible objects on the selected branch or baseline, a count of missing visible members and one bit for members outside the caller's scope.", [...SCOPED, "head-moved"]),
|
|
467
479
|
updateObjectSet: doc("Renames a saved set or replaces its readable members at the expected revision. Members outside the caller's scope remain. A success raises the revision by one.", [...SCOPED, "stale-revision", "head-moved"]),
|
|
468
480
|
deleteObjectSet: doc("Deletes a saved set and every member at the expected revision.", [...SCOPED, "stale-revision"]),
|
|
481
|
+
createFeedback: doc("Files one bug report or feature request in the organisation the session is attached to, answering its identifier and filing time. The title is 1 to 200 characters after trimming, the body 1 to 8,000 characters; an optional projectId names a project the caller reads, and an optional context carries routeName, correlationId, cliVersion and protocolVersion. A route name the host does not know is admitted and recorded as unknown. Not idempotent: a retry files a second entry. A call from an agent-mode session waits until the person confirms it in the browser. A filer may file 100 entries in any 24 hours in one organisation; the next is refused bound-exceeded naming feedback-per-filer.", [...SIGNED_IN, "not-permitted", "not-attached"]),
|
|
482
|
+
listFeedback: doc("Lists feedback entries of the organisation the session is attached to, newest first, at most limit (1 to 50, default 20) per page with an opaque continuation. An organisation administrator lists every entry; any other caller lists only the entries they filed.", [...SIGNED_IN, "not-attached"]),
|
|
469
483
|
health: doc("Answers whether the host is running.", PUBLIC),
|
|
470
484
|
webSignInStart: doc("Starts a confidential web sign-in with HTTP Basic authentication.", [...PUBLIC, "unauthenticated"]),
|
|
471
485
|
webRedeem: doc("Redeems only a web-purpose handoff with HTTP Basic authentication.", [...PUBLIC, "unauthenticated"]),
|
|
@@ -494,7 +508,7 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
494
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"]),
|
|
495
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"]),
|
|
496
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"]),
|
|
497
|
-
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),
|
|
498
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}`, [
|
|
499
513
|
...REF_READ,
|
|
500
514
|
"malformed-query",
|
|
@@ -508,9 +522,9 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
508
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"]),
|
|
509
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"]),
|
|
510
524
|
discoverVerbs: doc("Lists the verbs an object may be given.", REF_READ),
|
|
511
|
-
readHistory: doc("Reads one object's history of changes.", [...REF_READ, "invalid-continuation", "stale-continuation", "malformed-history-request"]),
|
|
512
|
-
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": ...}`.', [...OBJECT_WRITE, "plan-closed"]),
|
|
513
|
-
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": ...}`.', [...OBJECT_WRITE, "plan-closed"]),
|
|
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"]),
|
|
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"]),
|
|
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"]),
|
|
514
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"]),
|
|
515
529
|
listConnections: doc("Lists the connections whose mirror project the caller reads, each with its last run and whether the caller may start a run.", SIGNED_IN),
|
|
516
530
|
setConnectionCredential: doc("Stores the credential the connection reads the source system with, after the source system accepts it, and answers the upstream account and the time it was stored. The credential is never answered.", [...SCOPED, "credential-not-valid"]),
|
|
@@ -537,7 +551,7 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
537
551
|
listHostedOneWallGrants: doc("Lists the organisation's one-wall permissions.", [...SCOPED]),
|
|
538
552
|
previewDelete: doc("Previews deleting an object: the links the delete would remove, or the refusal it would meet. Changes nothing.", [...OBJECT_WRITE, "plan-closed"]),
|
|
539
553
|
recover: doc("Finds what an interrupted mutation did and finishes its record.", REF_READ),
|
|
540
|
-
executeVerb: doc("Runs a verb on an object and records its result.", [...OBJECT_WRITE, "plan-closed"]),
|
|
554
|
+
executeVerb: doc("Runs a verb on an object and records its result." + SAVE_REASON, [...OBJECT_WRITE, "plan-closed"]),
|
|
541
555
|
createBranch: doc("Creates a project branch from a branch, a baseline or an admitted current head. The optional from is tagged kind ref with ref, or kind hash with hash.", [
|
|
542
556
|
...REF_WRITE,
|
|
543
557
|
"plan-closed",
|
|
@@ -554,12 +568,13 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
554
568
|
"lock-unavailable",
|
|
555
569
|
"not-a-ref-head",
|
|
556
570
|
"stale-source",
|
|
571
|
+
"merge-preview-approximate",
|
|
557
572
|
"protected",
|
|
558
573
|
"proposal-required",
|
|
559
574
|
"approvals-required",
|
|
560
575
|
"token-kind-not-admitted"
|
|
561
576
|
]),
|
|
562
|
-
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),
|
|
563
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.", [
|
|
564
579
|
...WRITE,
|
|
565
580
|
"concurrent-change",
|
|
@@ -578,15 +593,16 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
578
593
|
revokeServiceIdentity: doc("Revokes a service identity.", [...SIGNED_IN, "not-permitted", "service_identity.revoke"]),
|
|
579
594
|
issueServiceCredential: doc("Issues a credential for a service identity.", [...SIGNED_IN, "not-permitted", "capability-missing"]),
|
|
580
595
|
revokeServiceCredential: doc("Revokes a service identity's credential.", [...SIGNED_IN, "not-permitted", "capability-missing"]),
|
|
581
|
-
grantMembership: doc("Grants a principal a role in a scope. An unknown role answers unknown-role with the deployment's roleKeys.", [...SIGNED_IN, "not-permitted", "above-caller-role", "unknown-role", "membership-exists", "no-such-principal"]),
|
|
596
|
+
grantMembership: doc("Grants a principal a role in a scope. An unknown role answers unknown-role with the deployment's roleKeys.", [...SIGNED_IN, "not-permitted", "above-caller-role", "unknown-role", "membership-own-role", "membership-exists", "no-such-principal"]),
|
|
597
|
+
leaveMembership: doc("Leaves the caller's own membership of a scope; at organisation scope, also removes their project memberships and ends their work, run sessions and open launches. An ended project permits departure.", [...SIGNED_IN, "not-permitted", "last-administrator", "no-such-membership", "erasure-not-permitted"]),
|
|
582
598
|
revokeMembership: doc("Revokes a principal's membership of a scope; at organisation scope, also revokes their memberships in its projects.", [...SIGNED_IN, "not-permitted", "last-administrator", "no-such-membership", "erasure-not-permitted"]),
|
|
583
599
|
setModelConfiguration: doc("Sets the model configuration an organisation's agents use.", [...SIGNED_IN, "not-permitted", "capability-missing", "window-out-of-range", "max-session-out-of-range"]),
|
|
584
600
|
setModelId: doc("Changes the model an organisation's agents use, keeping the key it holds, for a caller who administers agents.", [...SIGNED_IN, "not-permitted", "model-not-configured"]),
|
|
585
601
|
readModelConfigurationStatus: doc("Reads whether the caller's organisation has a model configured, and its provider, model and the time it was set, for a caller who administers agents. The key is never answered.", [...SIGNED_IN, "not-permitted"]),
|
|
586
602
|
readAccount: doc("Reads the caller's own principal identifier, display name and registered email.", SIGNED_IN),
|
|
587
603
|
readDisplayNames: doc("Reads the display names of principals the caller may see.", SIGNED_IN),
|
|
588
|
-
listMembers: doc("Lists the members of a project.", SCOPED),
|
|
589
|
-
changeMembershipRole: doc("Changes a principal's role in a scope; missing membership administration answers `capability-missing`.", [...SIGNED_IN, "not-permitted", "above-caller-role", "unknown-role", "last-administrator", "no-such-membership"]),
|
|
604
|
+
listMembers: doc("Lists the members of a project and the role options, each with its capabilities sorted by name. An empty capabilities list means that the role grants no capability.", SCOPED),
|
|
605
|
+
changeMembershipRole: doc("Changes a principal's role in a scope; missing membership administration answers `capability-missing`.", [...SIGNED_IN, "not-permitted", "above-caller-role", "unknown-role", "membership-own-role", "last-administrator", "no-such-membership"]),
|
|
590
606
|
listOrganisationMembers: doc("Lists the memberships of the caller's organisation and of the projects of it the caller may read.", SCOPED),
|
|
591
607
|
searchPeople: doc("Finds people in the caller's organisation when every query word starts a word of their name.", [...SIGNED_IN, "invalid-query"]),
|
|
592
608
|
searchObjectReaders: doc("Finds the people who can read an object on a branch or baseline, by a name prefix.", [...REF_READ, "invalid-query", "invalid-ref"]),
|
|
@@ -595,8 +611,19 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
595
611
|
removeSubscriber: doc("Removes a person's subscription to an object in a role.", [...REF_READ, "subscription-absent", "not-permitted", "invalid-ref"]),
|
|
596
612
|
listComments: doc("Lists the comments on an object, oldest first, a page at a time.", [...REF_READ, "invalid-query"]),
|
|
597
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"]),
|
|
598
|
-
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.
|
|
599
|
-
|
|
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
|
+
]),
|
|
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"]),
|
|
600
627
|
releaseDraft: doc("Releases an unchanged draft.", [...REF_WRITE, "ref-not-found", "draft-lock-lost", "draft-changed"]),
|
|
601
628
|
discardDraft: doc("Discards the holder\u2019s draft.", [...REF_WRITE, "ref-not-found", "draft-lock-lost"]),
|
|
602
629
|
breakDraftLock: doc("Breaks a draft lock as a project administrator; person-only objects.draftAdmin capability.", [...REF_WRITE, "ref-not-found"]),
|
|
@@ -638,9 +665,9 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
638
665
|
readProposal: doc("Reads one proposal.", SCOPED),
|
|
639
666
|
refuseProposal: doc("Refuses a proposal and returns its branch to its author.", [...SCOPED, "proposal-not-pending"]),
|
|
640
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"]),
|
|
641
|
-
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),
|
|
642
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"]),
|
|
643
|
-
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.", [...OBJECT_WRITE, "upstream-changed", "upstream-not-readable", "too-many-links"]),
|
|
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"]),
|
|
644
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"]),
|
|
645
672
|
diffBranches: doc("Reads the objects and edges one branch or baseline changes against another.", REF_READ),
|
|
646
673
|
readBranchHistory: doc("Reads a branch's history of commits.", [...SCOPED, "invalid-continuation", "stale-continuation", "malformed-history-request"]),
|
|
@@ -652,11 +679,11 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
652
679
|
...WRITE,
|
|
653
680
|
"not-in-this-release"
|
|
654
681
|
]),
|
|
655
|
-
addRefRule: doc("Adds one of the selected project's rules with extent, pattern and settings, and answers the full rule. Extent is ref or rows; organisation rules take ref only. Settings include consequence (open, merge-only or locked-rows-only), requireProposal, requiredApprovals, approverMinRole, restrictDeletions, approvers and bypass. Omitted settings take the defaults. Only project ref rules may restrict deletions; approvals need a proposal and an approver.
|
|
682
|
+
addRefRule: doc("Adds one of the selected project's rules with extent, pattern and settings, and answers the full rule. Extent is ref or rows; organisation rules take ref only. Settings include consequence (open, merge-only or locked-rows-only), requireProposal, requiredApprovals, approverMinRole, restrictDeletions, approvers and bypass. Omitted settings take the defaults. Only project ref rules may restrict deletions; approvals need a proposal and an approver. An add with the same owner, case-insensitive pattern, extent and consequence returns the existing rule without an audit write if its settings are identical; otherwise it is refused with duplicate-rule. A different consequence can create a separate rule.", [...SCOPED, "invalid-rule-pattern", "invalid-rule-setting", "unknown-rule-member", "duplicate-rule"]),
|
|
656
683
|
listRefRules: doc("Lists the selected project's visible rules with each identifier, extent and pattern, and every setting and member list.", SCOPED),
|
|
657
684
|
removeRefRule: doc("Removes one of the selected project's rules by identifier and answers its ruleId. An absent, unreadable or other owner's identifier answers not-found.", SCOPED),
|
|
658
685
|
updateRefRule: doc("Changes one of the selected project's rules in place and answers the full rule. Send ruleId and settings only. Omitted settings keep their values; supplied lists replace their members. A consequence already held by another rule on this pattern is refused duplicate-rule. Extent and pattern cannot change. Every update requires step-up confirmation in an agent-mode session. An absent, unreadable or other owner's identifier answers not-found.", [...SCOPED, "invalid-rule-setting", "unknown-rule-member", "duplicate-rule"]),
|
|
659
|
-
addOrganisationRule: doc("Adds one of the attached organisation's rules with extent, pattern and settings, and answers the full rule. Extent is ref or rows; organisation rules take ref only. Settings include consequence (open, merge-only or locked-rows-only), requireProposal, requiredApprovals, approverMinRole, restrictDeletions, approvers and bypass. Omitted settings take the defaults. Only project ref rules may restrict deletions; approvals need a proposal and an approver.
|
|
686
|
+
addOrganisationRule: doc("Adds one of the attached organisation's rules with extent, pattern and settings, and answers the full rule. Extent is ref or rows; organisation rules take ref only. Settings include consequence (open, merge-only or locked-rows-only), requireProposal, requiredApprovals, approverMinRole, restrictDeletions, approvers and bypass. Omitted settings take the defaults. Only project ref rules may restrict deletions; approvals need a proposal and an approver. An add with the same owner, case-insensitive pattern, extent and consequence returns the existing rule without an audit write if its settings are identical; otherwise it is refused with duplicate-rule. A different consequence can create a separate rule.", [...SCOPED, "invalid-rule-pattern", "invalid-rule-setting", "unknown-rule-member", "duplicate-rule"]),
|
|
660
687
|
listOrganisationRules: doc("Lists the attached organisation's visible rules with each identifier, extent and pattern, and every setting and member list; read on a project in the organisation is enough.", SCOPED),
|
|
661
688
|
removeOrganisationRule: doc("Removes one of the attached organisation's rules by identifier and answers its ruleId. An absent, unreadable or other owner's identifier answers not-found.", SCOPED),
|
|
662
689
|
updateOrganisationRule: doc("Changes one of the attached organisation's rules in place and answers the full rule. Send ruleId and settings only. Omitted settings keep their values; supplied lists replace their members. A consequence already held by another rule on this pattern is refused duplicate-rule. Extent and pattern cannot change. Every update requires step-up confirmation in an agent-mode session. An absent, unreadable or other owner's identifier answers not-found.", [...SCOPED, "invalid-rule-setting", "unknown-rule-member", "duplicate-rule"]),
|
|
@@ -664,8 +691,9 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
664
691
|
listOrganisationRefs: doc("Lists branches and baselines in the attached organisation, including each name, readOnly and creation attribution; read on a project in the organisation is enough.", SCOPED),
|
|
665
692
|
deleteOrganisationRef: doc("Deletes a writable branch from the attached organisation and answers its name. A baseline cannot be deleted.", [...REF_WRITE, "read-only-ref"]),
|
|
666
693
|
markOrganisationRefReadOnly: doc("Marks an organisation branch read-only as a baseline and answers its full record. An absent name answers not-found; an unauthorised caller answers not-permitted.", SCOPED),
|
|
667
|
-
setObjectLock: doc("Sets an object's lock on the selected project branch to none, merge-only or frozen and answers objectId and lock. The lock also applies to its existing structural child edges in that project; none lifts the lock. New children on a writable branch are not thereby frozen. Use a baseline for a fixed snapshot. An unknown lock answers invalid-request at lock.", [...REF_WRITE, "read-only-ref", "concurrent-change", "lock-unavailable"]),
|
|
694
|
+
setObjectLock: doc("Sets an object's lock on the selected project branch to none, merge-only or frozen and answers objectId and lock. The lock also applies to its existing structural child edges in that project; none lifts the lock. New children on a writable branch are not thereby frozen. Use a baseline for a fixed snapshot. An unknown lock answers invalid-request at lock." + SAVE_REASON, [...REF_WRITE, "read-only-ref", "concurrent-change", "lock-unavailable"]),
|
|
668
695
|
readAgentCeiling: doc("Reads the selected project's maximum agent role as { ceiling }: contributor or maintainer. An absent or unreadable project answers not-found.", SCOPED),
|
|
696
|
+
renameProject: doc("Changes the selected project's display name and answers its project id and name. An empty name answers invalid-request at name; whitespace is preserved. A reader's rename, an absent project and an unreadable project each answer not-found.", SCOPED),
|
|
669
697
|
setAgentCeiling: doc("Sets the selected project's maximum agent role to contributor or maintainer and answers { ceiling }. An unknown role answers invalid-request at ceiling.", SCOPED),
|
|
670
698
|
requestSchemaUpdate: doc("Records a schema update request for a project branch or organisation branch or baseline and answers its state and attribution. Project refs use `<projectId>/<branch>` with a one-segment branch name; the request may name a branch that does not exist. Organisation refs use one segment. The trunk `main` answers invalid-request at `ref`. Execution is separate.", SCOPED),
|
|
671
699
|
readSchemaUpdateRequest: doc("Reads the caller's latest schema update request for the branch or baseline in the token's organisation, or null. Project read access is not required. Project refs use `<projectId>/<branch>` with a one-segment branch name; organisation refs use one segment. The trunk `main` answers invalid-request at `ref`.", SCOPED),
|
|
@@ -758,7 +786,7 @@ var SCHEMAS = {
|
|
|
758
786
|
readBuildRun: { "type": "object", "properties": { "buildRunId": { "type": "string" } }, "required": ["buildRunId"], "additionalProperties": false },
|
|
759
787
|
listBuildRuns: { "type": "object", "properties": { "objectId": { "type": "string" }, "continuation": { "oneOf": [{ "type": "string" }, { "type": "null" }] } }, "required": ["objectId", "continuation"], "additionalProperties": false },
|
|
760
788
|
readStepRun: { "type": "object", "properties": { "stepRunId": { "type": "string" } }, "required": ["stepRunId"], "additionalProperties": false },
|
|
761
|
-
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 },
|
|
762
790
|
readStepLog: { "type": "object", "properties": { "stepRunId": { "type": "string" } }, "required": ["stepRunId"], "additionalProperties": false },
|
|
763
791
|
checkCase: { "type": "object", "properties": { "caseId": { "type": "string" } }, "required": ["caseId"], "additionalProperties": false },
|
|
764
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 },
|
|
@@ -802,6 +830,8 @@ var SCHEMAS = {
|
|
|
802
830
|
readObjectSet: { "type": "object", "properties": { "setId": { "type": "string" } }, "required": ["setId"], "additionalProperties": false },
|
|
803
831
|
updateObjectSet: { "type": "object", "properties": { "setId": { "type": "string" }, "revision": { "type": "integer" }, "name": { "type": "string" }, "members": { "type": "array", "items": { "type": "object", "properties": { "objectId": { "type": "string" }, "projectId": { "type": "string" } }, "required": ["objectId", "projectId"], "additionalProperties": false } } }, "required": ["setId", "revision"], "additionalProperties": false },
|
|
804
832
|
deleteObjectSet: { "type": "object", "properties": { "setId": { "type": "string" }, "revision": { "type": "integer" } }, "required": ["setId", "revision"], "additionalProperties": false },
|
|
833
|
+
createFeedback: { "type": "object", "properties": { "kind": { "enum": ["bug", "feature"] }, "title": { "type": "string" }, "body": { "type": "string" }, "projectId": { "type": "string" }, "context": { "type": "object", "properties": { "routeName": { "type": "string" }, "correlationId": { "type": "string" }, "cliVersion": { "type": "string" }, "protocolVersion": { "type": "integer" } }, "required": [], "additionalProperties": false } }, "required": ["kind", "title", "body"], "additionalProperties": false },
|
|
834
|
+
listFeedback: { "type": "object", "properties": { "limit": { "type": "integer" }, "continuation": { "type": "string" } }, "required": [], "additionalProperties": false },
|
|
805
835
|
health: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
806
836
|
webSignInStart: { "type": "object", "properties": { "state": { "type": "string" }, "loopback": { "type": "string" }, "code_challenge": { "type": "string" }, "code_challenge_method": { "const": "S256" } }, "required": ["state", "loopback", "code_challenge", "code_challenge_method"], "additionalProperties": false },
|
|
807
837
|
webRedeem: { "type": "object", "properties": { "code": { "type": "string", "format": "password", "writeOnly": true }, "state": { "type": "string" }, "code_verifier": { "type": "string", "format": "password", "writeOnly": true }, "invitation_code": { "type": "string", "format": "password", "writeOnly": true } }, "required": ["code", "state", "code_verifier"], "additionalProperties": false },
|
|
@@ -851,11 +881,11 @@ var SCHEMAS = {
|
|
|
851
881
|
aggregateObjects: { "type": "object", "properties": { "kind": { "const": "aggregate" }, "typeKey": { "oneOf": [{ "type": "string" }, { "type": "null" }] }, "projects": { "type": "array", "items": { "type": "string" } }, "filters": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "=" }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "enum": [">", ">=", "<", "<="] }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }] } }, "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": "string" }, { "type": "number" }, { "type": "boolean" }] } } }, "required": ["kind", "property", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "identity" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "edge" }, "edgeTypeKey": { "type": "string" }, "direction": { "enum": ["outgoing", "incoming", "to-children", "to-parent"] }, "has": { "type": "boolean" } }, "required": ["kind", "edgeTypeKey", "direction", "has"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "or" }, "filters": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "=" }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "enum": [">", ">=", "<", "<="] }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }] } }, "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": "string" }, { "type": "number" }, { "type": "boolean" }] } } }, "required": ["kind", "property", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "identity" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "edge" }, "edgeTypeKey": { "type": "string" }, "direction": { "enum": ["outgoing", "incoming", "to-children", "to-parent"] }, "has": { "type": "boolean" } }, "required": ["kind", "edgeTypeKey", "direction", "has"], "additionalProperties": false }] } } }, "required": ["kind", "filters"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "text" }, "term": { "type": "string" }, "properties": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "term"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "type" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "op", "values"], "additionalProperties": false }] } }, "steps": { "type": "array", "items": { "type": "object", "properties": { "edgeTypeKey": { "type": "string" }, "direction": { "enum": ["outgoing", "incoming", "to-children", "to-parent"] }, "targetTypeKey": { "type": "string" }, "filters": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "=" }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "enum": [">", ">=", "<", "<="] }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }] } }, "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": "string" }, { "type": "number" }, { "type": "boolean" }] } } }, "required": ["kind", "property", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "identity" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "edge" }, "edgeTypeKey": { "type": "string" }, "direction": { "enum": ["outgoing", "incoming", "to-children", "to-parent"] }, "has": { "type": "boolean" } }, "required": ["kind", "edgeTypeKey", "direction", "has"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "or" }, "filters": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "=" }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "enum": [">", ">=", "<", "<="] }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }] } }, "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": "string" }, { "type": "number" }, { "type": "boolean" }] } } }, "required": ["kind", "property", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "identity" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "edge" }, "edgeTypeKey": { "type": "string" }, "direction": { "enum": ["outgoing", "incoming", "to-children", "to-parent"] }, "has": { "type": "boolean" } }, "required": ["kind", "edgeTypeKey", "direction", "has"], "additionalProperties": false }] } } }, "required": ["kind", "filters"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "text" }, "term": { "type": "string" }, "properties": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "term"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "type" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "op", "values"], "additionalProperties": false }] } } }, "required": ["edgeTypeKey", "direction", "targetTypeKey"], "additionalProperties": false } }, "operation": { "enum": ["count", "min", "max", "sum", "average"] }, "property": { "type": "string" }, "groupBy": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "type" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" } }, "required": ["kind", "property"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "parent" }, "edgeTypeKeys": { "type": "array", "items": { "type": "string" } }, "multiplicity": { "enum": ["per-path", "distinct"] }, "ends": { "enum": ["visible", "all"] }, "parents": { "type": "array", "items": { "type": "object", "properties": { "objectId": { "type": "string" }, "projectId": { "type": "string" } }, "required": ["objectId", "projectId"], "additionalProperties": false } } }, "required": ["kind", "edgeTypeKeys", "multiplicity", "ends"], "additionalProperties": false }] } }, "required": ["kind", "typeKey", "operation"], "additionalProperties": false },
|
|
852
882
|
discoverVerbs: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
853
883
|
readHistory: { "type": "object", "properties": { "objectId": { "type": "string" }, "limit": { "type": "integer" }, "continuation": { "oneOf": [{ "type": "string" }, { "type": "null" }] } }, "required": ["objectId", "limit", "continuation"], "additionalProperties": false },
|
|
854
|
-
mutate: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "operation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "create-object" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-object" }, "objectId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "objectId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-object" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "create-edge" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "sourceObjectId": { "type": "string" }, "targetObjectId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "sourceObjectId", "targetObjectId", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-edge" }, "edgeId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "edgeId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-edge" }, "edgeId": { "type": "string" } }, "required": ["kind", "edgeId"], "additionalProperties": false }] } }, "required": ["correlation", "operation"], "additionalProperties": false },
|
|
855
|
-
mutateBatch: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "operations": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "create-object" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-object" }, "objectId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "objectId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-object" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "create-edge" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "source": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "existing" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "created" }, "operation": { "type": "integer" } }, "required": ["kind", "operation"], "additionalProperties": false }] }, "target": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "existing" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "created" }, "operation": { "type": "integer" } }, "required": ["kind", "operation"], "additionalProperties": false }] }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "source", "target", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-edge" }, "edgeId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "edgeId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-edge" }, "edgeId": { "type": "string" } }, "required": ["kind", "edgeId"], "additionalProperties": false }] } } }, "required": ["correlation", "operations"], "additionalProperties": false },
|
|
884
|
+
mutate: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "operation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "create-object" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-object" }, "objectId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "objectId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-object" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "create-edge" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "sourceObjectId": { "type": "string" }, "targetObjectId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "sourceObjectId", "targetObjectId", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-edge" }, "edgeId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "edgeId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-edge" }, "edgeId": { "type": "string" } }, "required": ["kind", "edgeId"], "additionalProperties": false }] }, "reason": { "type": "string" } }, "required": ["correlation", "operation", "reason"], "additionalProperties": false },
|
|
885
|
+
mutateBatch: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "operations": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "create-object" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-object" }, "objectId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "objectId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-object" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "create-edge" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "source": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "existing" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "created" }, "operation": { "type": "integer" } }, "required": ["kind", "operation"], "additionalProperties": false }] }, "target": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "existing" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "created" }, "operation": { "type": "integer" } }, "required": ["kind", "operation"], "additionalProperties": false }] }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "source", "target", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-edge" }, "edgeId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "edgeId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-edge" }, "edgeId": { "type": "string" } }, "required": ["kind", "edgeId"], "additionalProperties": false }] } }, "reason": { "type": "string" } }, "required": ["correlation", "operations", "reason"], "additionalProperties": false },
|
|
856
886
|
previewDelete: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
857
887
|
recover: { "type": "object", "properties": { "correlationId": { "type": "string" } }, "required": ["correlationId"], "additionalProperties": false },
|
|
858
|
-
executeVerb: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "verb": { "type": "object", "properties": { "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" } }, "required": ["typeKey", "typeVersion"], "additionalProperties": false }, "subjectIds": { "type": "array", "items": { "type": "string" } }, "input": {} }, "required": ["correlation", "verb", "subjectIds", "input"], "additionalProperties": false },
|
|
888
|
+
executeVerb: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "verb": { "type": "object", "properties": { "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" } }, "required": ["typeKey", "typeVersion"], "additionalProperties": false }, "subjectIds": { "type": "array", "items": { "type": "string" } }, "input": {}, "reason": { "type": "string" } }, "required": ["correlation", "verb", "subjectIds", "input", "reason"], "additionalProperties": false },
|
|
859
889
|
createBranch: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "name": { "type": "string" }, "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "ref" }, "ref": { "type": "string" } }, "required": ["kind", "ref"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "hash" }, "hash": { "type": "string" } }, "required": ["kind", "hash"], "additionalProperties": false }] } }, "required": ["correlation", "name"], "additionalProperties": false },
|
|
860
890
|
merge: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "sourceHash": { "type": "string" }, "message": { "type": "string" }, "name": { "type": "string" }, "source": { "type": "string" }, "target": { "type": "string" } }, "required": ["correlation", "sourceHash", "message"], "additionalProperties": false },
|
|
861
891
|
readMergeConflicts: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
|
|
@@ -871,6 +901,7 @@ var SCHEMAS = {
|
|
|
871
901
|
revokeServiceCredential: { "type": "object", "properties": { "credentialId": { "type": "string" } }, "required": ["credentialId"], "additionalProperties": false },
|
|
872
902
|
grantMembership: { "type": "object", "properties": { "principalId": { "type": "string" }, "scopeKind": { "enum": ["organisation", "project"] }, "scopeId": { "type": "string" }, "roleKey": { "type": "string" } }, "required": ["principalId", "scopeKind", "scopeId", "roleKey"], "additionalProperties": false },
|
|
873
903
|
revokeMembership: { "type": "object", "properties": { "principalId": { "type": "string" }, "scopeKind": { "enum": ["organisation", "project"] }, "scopeId": { "type": "string" } }, "required": ["principalId", "scopeKind", "scopeId"], "additionalProperties": false },
|
|
904
|
+
leaveMembership: { "type": "object", "properties": { "scopeKind": { "enum": ["organisation", "project"] }, "scopeId": { "type": "string" } }, "required": ["scopeKind", "scopeId"], "additionalProperties": false },
|
|
874
905
|
setModelConfiguration: { "type": "object", "properties": { "model": { "type": "string" }, "apiKey": { "type": "string", "format": "password", "writeOnly": true } }, "required": ["model", "apiKey"], "additionalProperties": false },
|
|
875
906
|
setModelId: { "type": "object", "properties": { "model": { "type": "string" } }, "required": ["model"], "additionalProperties": false },
|
|
876
907
|
readDisplayNames: { "type": "object", "properties": { "principalIds": { "type": "array", "items": { "type": "string" } } }, "required": ["principalIds"], "additionalProperties": false },
|
|
@@ -901,7 +932,7 @@ var SCHEMAS = {
|
|
|
901
932
|
approveProposal: { "type": "object", "properties": { "proposalId": { "type": "string" }, "headHash": { "type": "string" } }, "required": ["proposalId", "headHash"], "additionalProperties": false },
|
|
902
933
|
readBranchDiff: { "type": "object", "properties": { "proposalId": { "type": "string" }, "cursor": { "type": "string" } }, "required": ["proposalId"], "additionalProperties": false },
|
|
903
934
|
readLinkStatus: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
904
|
-
clearLinks: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "ref": { "type": "string" }, "entries": { "type": "array", "items": { "type": "object", "properties": { "linkId": { "type": "string" }, "upstreamVersion": { "type": "string" } }, "required": ["linkId", "upstreamVersion"], "additionalProperties": false }, "minItems": 1, "maxItems": 100 } }, "required": ["correlation", "ref", "entries"], "additionalProperties": false },
|
|
935
|
+
clearLinks: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "ref": { "type": "string" }, "entries": { "type": "array", "items": { "type": "object", "properties": { "linkId": { "type": "string" }, "upstreamVersion": { "type": "string" } }, "required": ["linkId", "upstreamVersion"], "additionalProperties": false }, "minItems": 1, "maxItems": 100 }, "reason": { "type": "string" } }, "required": ["correlation", "ref", "entries", "reason"], "additionalProperties": false },
|
|
905
936
|
readChangeImpact: { "type": "object", "properties": { "ref": { "type": "string" }, "base": { "type": "string" } }, "required": ["ref", "base"], "additionalProperties": false },
|
|
906
937
|
diffBranches: { "type": "object", "properties": { "ref": { "type": "string" }, "base": { "type": "string" }, "cursor": { "type": "string" } }, "required": ["ref", "base"], "additionalProperties": false },
|
|
907
938
|
readBranchHistory: { "type": "object", "properties": { "name": { "type": "string" }, "cursor": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
|
|
@@ -922,9 +953,10 @@ var SCHEMAS = {
|
|
|
922
953
|
listOrganisationRefs: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
923
954
|
deleteOrganisationRef: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
|
|
924
955
|
markOrganisationRefReadOnly: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
|
|
925
|
-
setObjectLock: { "type": "object", "properties": { "objectId": { "type": "string" }, "lock": { "enum": ["none", "merge-only", "frozen"] } }, "required": ["objectId", "lock"], "additionalProperties": false },
|
|
956
|
+
setObjectLock: { "type": "object", "properties": { "objectId": { "type": "string" }, "lock": { "enum": ["none", "merge-only", "frozen"] }, "reason": { "type": "string" } }, "required": ["objectId", "lock", "reason"], "additionalProperties": false },
|
|
926
957
|
readAgentCeiling: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
927
958
|
setAgentCeiling: { "type": "object", "properties": { "ceiling": { "enum": ["contributor", "maintainer"] } }, "required": ["ceiling"], "additionalProperties": false },
|
|
959
|
+
renameProject: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
|
|
928
960
|
requestSchemaUpdate: { "type": "object", "properties": { "ref": { "type": "string" } }, "required": ["ref"], "additionalProperties": false },
|
|
929
961
|
readSchemaUpdateRequest: { "type": "object", "properties": { "ref": { "type": "string" } }, "required": ["ref"], "additionalProperties": false },
|
|
930
962
|
openAgentSession: { "type": "object", "properties": { "agent": { "enum": ["object", "ontology"] } }, "required": ["agent"], "additionalProperties": false },
|
|
@@ -942,7 +974,7 @@ var SCHEMAS = {
|
|
|
942
974
|
readCurrentChangeSet: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
943
975
|
readChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" } }, "required": ["changeSetId"], "additionalProperties": false },
|
|
944
976
|
readChangeSetState: { "type": "object", "properties": { "changeSetId": { "type": "string" } }, "required": ["changeSetId"], "additionalProperties": false },
|
|
945
|
-
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 },
|
|
946
978
|
validateChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "revision": { "type": "string" } }, "required": ["changeSetId", "revision"], "additionalProperties": false },
|
|
947
979
|
discardChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" } }, "required": ["changeSetId"], "additionalProperties": false },
|
|
948
980
|
acceptChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "revision": { "type": "string" }, "correlationId": { "type": "string" } }, "required": ["changeSetId", "revision"], "additionalProperties": false },
|
|
@@ -961,8 +993,8 @@ var SCHEMAS = {
|
|
|
961
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 },
|
|
962
994
|
listComments: { "type": "object", "properties": { "objectId": { "type": "string" }, "after": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
963
995
|
acquireDraft: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
964
|
-
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 },
|
|
965
|
-
promoteDraft: { "type": "object", "properties": { "objectId": { "type": "string" }, "draftHash": { "type": "string" } }, "required": ["objectId", "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 },
|
|
997
|
+
promoteDraft: { "type": "object", "properties": { "objectId": { "type": "string" }, "draftHash": { "type": "string" }, "reason": { "type": "string" } }, "required": ["objectId", "draftHash", "reason"], "additionalProperties": false },
|
|
966
998
|
releaseDraft: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
967
999
|
discardDraft: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
968
1000
|
breakDraftLock: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
@@ -1023,6 +1055,8 @@ var EXAMPLES = {
|
|
|
1023
1055
|
readObjectSet: { "setId": "ost_aaaaaaaaaaaaaaaaaaaaaaaaaa" },
|
|
1024
1056
|
updateObjectSet: { "setId": "ost_aaaaaaaaaaaaaaaaaaaaaaaaaa", "revision": 1, "name": "Renamed set" },
|
|
1025
1057
|
deleteObjectSet: { "setId": "ost_aaaaaaaaaaaaaaaaaaaaaaaaaa", "revision": 1 },
|
|
1058
|
+
createFeedback: { "kind": "bug", "title": "<title>", "body": "<body>" },
|
|
1059
|
+
listFeedback: {},
|
|
1026
1060
|
health: {},
|
|
1027
1061
|
webSignInStart: { "state": "<state>", "loopback": "<loopback>", "code_challenge": "<code_challenge>", "code_challenge_method": "S256" },
|
|
1028
1062
|
webRedeem: { "code": "<code>", "state": "<state>", "code_verifier": "<code_verifier>" },
|
|
@@ -1060,11 +1094,11 @@ var EXAMPLES = {
|
|
|
1060
1094
|
aggregateObjects: { "kind": "aggregate", "typeKey": null, "operation": "count" },
|
|
1061
1095
|
discoverVerbs: { "objectId": "<objectId>" },
|
|
1062
1096
|
readHistory: { "objectId": "<objectId>", "limit": 1, "continuation": null },
|
|
1063
|
-
mutate: { "correlation": { "kind": "mint" }, "operation": { "kind": "create-object", "typeKey": "<typeKey>", "typeVersion": 1, "properties": {} } },
|
|
1064
|
-
mutateBatch: { "correlation": { "kind": "mint" }, "operations": [] },
|
|
1097
|
+
mutate: { "correlation": { "kind": "mint" }, "operation": { "kind": "create-object", "typeKey": "<typeKey>", "typeVersion": 1, "properties": {} }, "reason": "<reason>" },
|
|
1098
|
+
mutateBatch: { "correlation": { "kind": "mint" }, "operations": [], "reason": "<reason>" },
|
|
1065
1099
|
previewDelete: { "objectId": "<objectId>" },
|
|
1066
1100
|
recover: { "correlationId": "<correlationId>" },
|
|
1067
|
-
executeVerb: { "correlation": { "kind": "mint" }, "verb": { "typeKey": "<typeKey>", "typeVersion": 1 }, "subjectIds": [], "input": null },
|
|
1101
|
+
executeVerb: { "correlation": { "kind": "mint" }, "verb": { "typeKey": "<typeKey>", "typeVersion": 1 }, "subjectIds": [], "input": null, "reason": "<reason>" },
|
|
1068
1102
|
createBranch: { "correlation": { "kind": "mint" }, "name": "<name>" },
|
|
1069
1103
|
merge: { "correlation": { "kind": "mint" }, "sourceHash": "<sourceHash>", "message": "<message>", "name": "feature" },
|
|
1070
1104
|
readMergeConflicts: { "name": "<name>" },
|
|
@@ -1080,6 +1114,7 @@ var EXAMPLES = {
|
|
|
1080
1114
|
revokeServiceCredential: { "credentialId": "<credentialId>" },
|
|
1081
1115
|
grantMembership: { "principalId": "<principalId>", "scopeKind": "organisation", "scopeId": "<scopeId>", "roleKey": "<roleKey>" },
|
|
1082
1116
|
revokeMembership: { "principalId": "<principalId>", "scopeKind": "organisation", "scopeId": "<scopeId>" },
|
|
1117
|
+
leaveMembership: { "scopeKind": "organisation", "scopeId": "<scopeId>" },
|
|
1083
1118
|
setModelConfiguration: { "model": "<model>", "apiKey": "<apiKey>" },
|
|
1084
1119
|
setModelId: { "model": "<model>" },
|
|
1085
1120
|
readDisplayNames: { "principalIds": [] },
|
|
@@ -1110,7 +1145,7 @@ var EXAMPLES = {
|
|
|
1110
1145
|
approveProposal: { "proposalId": "<proposalId>", "headHash": "<headHash>" },
|
|
1111
1146
|
readBranchDiff: { "proposalId": "<proposalId>" },
|
|
1112
1147
|
readLinkStatus: { "objectId": "<objectId>" },
|
|
1113
|
-
clearLinks: { "correlation": { "kind": "mint" }, "ref": "main", "entries": [{ "linkId": "<linkId>", "upstreamVersion": "<upstreamVersion>" }] },
|
|
1148
|
+
clearLinks: { "correlation": { "kind": "mint" }, "ref": "main", "entries": [{ "linkId": "<linkId>", "upstreamVersion": "<upstreamVersion>" }], "reason": "<reason>" },
|
|
1114
1149
|
readChangeImpact: { "ref": "project/branch", "base": "main" },
|
|
1115
1150
|
diffBranches: { "ref": "<ref>", "base": "<base>" },
|
|
1116
1151
|
readBranchHistory: { "name": "<name>" },
|
|
@@ -1131,9 +1166,10 @@ var EXAMPLES = {
|
|
|
1131
1166
|
listOrganisationRefs: {},
|
|
1132
1167
|
deleteOrganisationRef: { "name": "<name>" },
|
|
1133
1168
|
markOrganisationRefReadOnly: { "name": "<name>" },
|
|
1134
|
-
setObjectLock: { "objectId": "<objectId>", "lock": "none" },
|
|
1169
|
+
setObjectLock: { "objectId": "<objectId>", "lock": "none", "reason": "<reason>" },
|
|
1135
1170
|
readAgentCeiling: {},
|
|
1136
1171
|
setAgentCeiling: { "ceiling": "contributor" },
|
|
1172
|
+
renameProject: { "name": "<name>" },
|
|
1137
1173
|
requestSchemaUpdate: { "ref": "<ref>" },
|
|
1138
1174
|
readSchemaUpdateRequest: { "ref": "<ref>" },
|
|
1139
1175
|
openAgentSession: { "agent": "object" },
|
|
@@ -1171,7 +1207,7 @@ var EXAMPLES = {
|
|
|
1171
1207
|
listComments: { "objectId": "<objectId>" },
|
|
1172
1208
|
acquireDraft: { "objectId": "<objectId>" },
|
|
1173
1209
|
saveDraft: { "objectId": "<objectId>", "blocks": {}, "added": [], "draftHash": "<draftHash>" },
|
|
1174
|
-
promoteDraft: { "objectId": "<objectId>", "draftHash": "<draftHash>" },
|
|
1210
|
+
promoteDraft: { "objectId": "<objectId>", "draftHash": "<draftHash>", "reason": "<reason>" },
|
|
1175
1211
|
releaseDraft: { "objectId": "<objectId>" },
|
|
1176
1212
|
discardDraft: { "objectId": "<objectId>" },
|
|
1177
1213
|
breakDraftLock: { "objectId": "<objectId>" },
|
|
@@ -1206,8 +1242,13 @@ var EXAMPLES = {
|
|
|
1206
1242
|
var ROUTE_INPUT_EXAMPLES = deepFreeze(EXAMPLES);
|
|
1207
1243
|
var DESCRIPTION_ROUTES = Object.freeze(["queryRows", "queryObjects", "aggregateObjects", "queryGraph", "readStructure", "findPaths"]);
|
|
1208
1244
|
|
|
1245
|
+
// packages/api-contract/dist/engine-protocol.js
|
|
1246
|
+
var ENGINE_PROTOCOL_DIGESTS = Object.freeze({
|
|
1247
|
+
1: "2bb420b4fefdb3cdffc97d372d0e171364c45afbd1393beac1ffdfeb1e56d5d6"
|
|
1248
|
+
});
|
|
1249
|
+
|
|
1209
1250
|
// packages/api-contract/dist/routes.js
|
|
1210
|
-
var PROTOCOL_VERSION =
|
|
1251
|
+
var PROTOCOL_VERSION = 50;
|
|
1211
1252
|
var VERSION_HEADER = "oe2-protocol-version";
|
|
1212
1253
|
var TOKEN_HEADER = "authorization";
|
|
1213
1254
|
var IDEMPOTENCY_HEADER = "oe2-idempotency-key";
|
|
@@ -1267,6 +1308,8 @@ var STEP_UP_ROUTE_GROUPS = Object.freeze({
|
|
|
1267
1308
|
readObjectSet: "unmarked",
|
|
1268
1309
|
updateObjectSet: "unmarked",
|
|
1269
1310
|
deleteObjectSet: "unmarked",
|
|
1311
|
+
createFeedback: "marked",
|
|
1312
|
+
listFeedback: "unmarked",
|
|
1270
1313
|
health: "unmarked",
|
|
1271
1314
|
webSignInStart: "unmarked",
|
|
1272
1315
|
signInStart: "unmarked",
|
|
@@ -1321,6 +1364,7 @@ var STEP_UP_ROUTE_GROUPS = Object.freeze({
|
|
|
1321
1364
|
revokeServiceCredential: "unmarked",
|
|
1322
1365
|
grantMembership: "marked-refused-to-agents",
|
|
1323
1366
|
revokeMembership: "unmarked",
|
|
1367
|
+
leaveMembership: "unmarked",
|
|
1324
1368
|
setModelConfiguration: "marked",
|
|
1325
1369
|
setModelId: "unmarked",
|
|
1326
1370
|
readModelConfigurationStatus: "unmarked",
|
|
@@ -1375,6 +1419,7 @@ var STEP_UP_ROUTE_GROUPS = Object.freeze({
|
|
|
1375
1419
|
setObjectLock: "marked",
|
|
1376
1420
|
readAgentCeiling: "unmarked",
|
|
1377
1421
|
setAgentCeiling: "marked-refused-to-agents",
|
|
1422
|
+
renameProject: "marked-refused-to-agents",
|
|
1378
1423
|
requestSchemaUpdate: "unmarked",
|
|
1379
1424
|
readSchemaUpdateRequest: "unmarked",
|
|
1380
1425
|
openAgentSession: "unmarked",
|
|
@@ -1694,6 +1739,8 @@ var ROUTES = Object.freeze({
|
|
|
1694
1739
|
readObjectSet: route({ name: "readObjectSet", method: "POST", path: "/object-sets/read", group: "read", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.readObjectSet" }),
|
|
1695
1740
|
updateObjectSet: route({ name: "updateObjectSet", method: "POST", path: "/object-sets/update", group: "write", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.updateObjectSet" }),
|
|
1696
1741
|
deleteObjectSet: route({ name: "deleteObjectSet", method: "POST", path: "/object-sets/delete", group: "write", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.deleteObjectSet" }),
|
|
1742
|
+
createFeedback: route({ name: "createFeedback", method: "POST", path: "/feedback", group: "write", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "service"), versioned: true, module: "admin-sdk", capability: "admin.feedback" }),
|
|
1743
|
+
listFeedback: route({ name: "listFeedback", method: "POST", path: "/feedback/list", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "service"), versioned: true, module: "admin-sdk", capability: "admin.feedbackList" }),
|
|
1697
1744
|
health: route({ name: "health", method: "GET", path: "/health", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: NO_ACTORS, versioned: false, module: "sdk-core", capability: "core.health" }),
|
|
1698
1745
|
webSignInStart: route({ name: "webSignInStart", method: "POST", path: "/auth/web/sign-in", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: NO_ACTORS, versioned: true, module: "sdk-core", capability: "core.webSignInStart" }),
|
|
1699
1746
|
signInStart: route({ name: "signInStart", method: "GET", path: "/auth/sign-in", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: NO_ACTORS, versioned: false, module: "sdk-core", capability: "core.signInStart" }),
|
|
@@ -1928,6 +1975,7 @@ var ROUTES = Object.freeze({
|
|
|
1928
1975
|
capability: "admin.membership"
|
|
1929
1976
|
}),
|
|
1930
1977
|
revokeMembership: route({ name: "revokeMembership", method: "POST", path: "/membership-revocations", group: "administration", selector: "none", subject: "membership-scope", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.membershipRevocation" }),
|
|
1978
|
+
leaveMembership: route({ name: "leaveMembership", method: "POST", path: "/memberships/leave", group: "administration", selector: "none", subject: "membership-scope", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.membershipRevocation" }),
|
|
1931
1979
|
setModelConfiguration: route({
|
|
1932
1980
|
name: "setModelConfiguration",
|
|
1933
1981
|
method: "POST",
|
|
@@ -2149,6 +2197,19 @@ var ROUTES = Object.freeze({
|
|
|
2149
2197
|
capability: "objects.locks"
|
|
2150
2198
|
}),
|
|
2151
2199
|
readAgentCeiling: route({ name: "readAgentCeiling", method: "POST", path: "/projects/agent-ceiling", group: "read", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.agent-ceiling" }),
|
|
2200
|
+
renameProject: route({
|
|
2201
|
+
name: "renameProject",
|
|
2202
|
+
method: "POST",
|
|
2203
|
+
path: "/projects/rename",
|
|
2204
|
+
group: "administration",
|
|
2205
|
+
selector: "project",
|
|
2206
|
+
subject: "project",
|
|
2207
|
+
idempotent: false,
|
|
2208
|
+
policy: admittingActors("person"),
|
|
2209
|
+
versioned: true,
|
|
2210
|
+
module: "admin-sdk",
|
|
2211
|
+
capability: "admin.projectRename"
|
|
2212
|
+
}),
|
|
2152
2213
|
setAgentCeiling: route({
|
|
2153
2214
|
name: "setAgentCeiling",
|
|
2154
2215
|
method: "POST",
|
|
@@ -2265,6 +2326,8 @@ var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
|
|
|
2265
2326
|
readObjectSet: false,
|
|
2266
2327
|
updateObjectSet: false,
|
|
2267
2328
|
deleteObjectSet: false,
|
|
2329
|
+
createFeedback: false,
|
|
2330
|
+
listFeedback: false,
|
|
2268
2331
|
health: false,
|
|
2269
2332
|
webSignInStart: false,
|
|
2270
2333
|
webRedeem: true,
|
|
@@ -2319,6 +2382,7 @@ var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
|
|
|
2319
2382
|
revokeServiceCredential: false,
|
|
2320
2383
|
grantMembership: false,
|
|
2321
2384
|
revokeMembership: false,
|
|
2385
|
+
leaveMembership: false,
|
|
2322
2386
|
setModelConfiguration: true,
|
|
2323
2387
|
setModelId: false,
|
|
2324
2388
|
readModelConfigurationStatus: false,
|
|
@@ -2373,6 +2437,7 @@ var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
|
|
|
2373
2437
|
setObjectLock: false,
|
|
2374
2438
|
readAgentCeiling: false,
|
|
2375
2439
|
setAgentCeiling: false,
|
|
2440
|
+
renameProject: false,
|
|
2376
2441
|
requestSchemaUpdate: false,
|
|
2377
2442
|
readSchemaUpdateRequest: false,
|
|
2378
2443
|
openAgentSession: false,
|
|
@@ -2513,7 +2578,7 @@ var CLIENT_SCOPES = Object.freeze({
|
|
|
2513
2578
|
capabilities: Object.freeze(["objects.build"]),
|
|
2514
2579
|
consentLine: "Start and cancel builds in your projects, as you."
|
|
2515
2580
|
}),
|
|
2516
|
-
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." })
|
|
2517
2582
|
});
|
|
2518
2583
|
|
|
2519
2584
|
// packages/api-contract/dist/attachment-headers.js
|
|
@@ -2567,7 +2632,8 @@ var BOUND_LABEL = {
|
|
|
2567
2632
|
"rate-per-address": "the request-rate limit per address",
|
|
2568
2633
|
"resolve-in-flight": "the concurrent name-resolution limit",
|
|
2569
2634
|
"pending-sign-ins": "the pending sign-in limit",
|
|
2570
|
-
"request-duration": "the time limit on one request"
|
|
2635
|
+
"request-duration": "the time limit on one request",
|
|
2636
|
+
"feedback-per-filer": "the limit of 100 feedback entries per filer per organisation in any 24 hours"
|
|
2571
2637
|
};
|
|
2572
2638
|
function explainKind(kind) {
|
|
2573
2639
|
if (!Object.hasOwn(BY_KIND, kind)) {
|
|
@@ -3503,6 +3569,9 @@ function createHttpsTransport(origin, options = {}, deadlineMs) {
|
|
|
3503
3569
|
// packages/sdk-dispatch/dist/step-up-road.js
|
|
3504
3570
|
var POLL_INTERVAL_MS = 2e3;
|
|
3505
3571
|
var POLL_LIMIT_MS = 31e4;
|
|
3572
|
+
var POLL_RETRY_LIMIT = 3;
|
|
3573
|
+
var POLL_REFRESH_LIMIT = 1;
|
|
3574
|
+
var POLL_BACKOFF_MS = 1e3;
|
|
3506
3575
|
function refusalOf(body) {
|
|
3507
3576
|
if (typeof body !== "object" || body === null || !("refusal" in body)) {
|
|
3508
3577
|
return null;
|
|
@@ -3534,10 +3603,36 @@ async function post(transport, origin, route2, token, input) {
|
|
|
3534
3603
|
async function pollForProof(transport, origin, token, pendingId, road, signal) {
|
|
3535
3604
|
const stopped = () => signal?.aborted === true;
|
|
3536
3605
|
const stop = road.clock.now() + POLL_LIMIT_MS;
|
|
3606
|
+
let retries = 0;
|
|
3607
|
+
let refreshes = 0;
|
|
3537
3608
|
while (road.clock.now() < stop) {
|
|
3538
3609
|
if (stopped())
|
|
3539
3610
|
return { state: "stopped" };
|
|
3540
|
-
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;
|
|
3541
3636
|
if (stopped())
|
|
3542
3637
|
return { state: "stopped" };
|
|
3543
3638
|
if ("refusal" in envelope) {
|
|
@@ -3547,7 +3642,7 @@ async function pollForProof(transport, origin, token, pendingId, road, signal) {
|
|
|
3547
3642
|
return { state: "timed-out" };
|
|
3548
3643
|
const result = envelope.result;
|
|
3549
3644
|
if (result.state === "confirmed" && typeof result.proof === "string") {
|
|
3550
|
-
return { state: "confirmed", proof: result.proof };
|
|
3645
|
+
return { state: "confirmed", proof: result.proof, token };
|
|
3551
3646
|
}
|
|
3552
3647
|
if (result.state !== "awaiting") {
|
|
3553
3648
|
throw new Error("the proof poll answered an unrecognised state");
|
|
@@ -3595,11 +3690,15 @@ function withStepUpRoad(transport, road) {
|
|
|
3595
3690
|
}
|
|
3596
3691
|
if (polled.state === "stopped")
|
|
3597
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
|
+
}
|
|
3598
3697
|
if (polled.state === "timed-out") {
|
|
3599
3698
|
road.note("the action was refused because nobody confirmed it in time; run the command again");
|
|
3600
3699
|
return replayed(first, body);
|
|
3601
3700
|
}
|
|
3602
|
-
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 } });
|
|
3603
3702
|
};
|
|
3604
3703
|
}
|
|
3605
3704
|
|
|
@@ -3748,6 +3847,7 @@ var ADMIN_ROUTE_NAMES = Object.freeze([
|
|
|
3748
3847
|
"revokeServiceCredential",
|
|
3749
3848
|
"grantMembership",
|
|
3750
3849
|
"revokeMembership",
|
|
3850
|
+
"leaveMembership",
|
|
3751
3851
|
"setModelConfiguration",
|
|
3752
3852
|
"setModelId",
|
|
3753
3853
|
"readModelConfigurationStatus",
|
|
@@ -3787,6 +3887,7 @@ var ADMIN_ROUTE_NAMES = Object.freeze([
|
|
|
3787
3887
|
"markOrganisationRefReadOnly",
|
|
3788
3888
|
"readAgentCeiling",
|
|
3789
3889
|
"setAgentCeiling",
|
|
3890
|
+
"renameProject",
|
|
3790
3891
|
"createConnection",
|
|
3791
3892
|
"listConnections",
|
|
3792
3893
|
"setConnectionCredential",
|
|
@@ -3795,7 +3896,9 @@ var ADMIN_ROUTE_NAMES = Object.freeze([
|
|
|
3795
3896
|
"revokeConnection",
|
|
3796
3897
|
"startImportRun",
|
|
3797
3898
|
"listImportRuns",
|
|
3798
|
-
"closeImportRun"
|
|
3899
|
+
"closeImportRun",
|
|
3900
|
+
"createFeedback",
|
|
3901
|
+
"listFeedback"
|
|
3799
3902
|
]);
|
|
3800
3903
|
function entries() {
|
|
3801
3904
|
return ADMIN_ROUTE_NAMES.map((name) => ROUTES[name]);
|
|
@@ -5239,6 +5342,12 @@ function checkSampleAgainstChanges(changes, typeKey, sample) {
|
|
|
5239
5342
|
}
|
|
5240
5343
|
|
|
5241
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
|
+
}
|
|
5242
5351
|
var NOT_COMPARED = /* @__PURE__ */ new Set(["typeCategory", "typeKey", "version"]);
|
|
5243
5352
|
function isRecord2(value) {
|
|
5244
5353
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -5297,7 +5406,7 @@ function objectProspective(published) {
|
|
|
5297
5406
|
requiredPropertyKeys: stringListOf(published.requiredPropertyKeys, `${what} requiredPropertyKeys`),
|
|
5298
5407
|
presentationBindings: published.presentationBindings,
|
|
5299
5408
|
structureDeclaration: published.structureDeclaration,
|
|
5300
|
-
...published.
|
|
5409
|
+
...published.bodyFormats === void 0 || published.bodyFormats === null ? {} : { bodyFormats: bodyFormatsOf(published.bodyFormats) },
|
|
5301
5410
|
...published.subscriptionRoles === void 0 ? {} : { subscriptionRoles: published.subscriptionRoles }
|
|
5302
5411
|
};
|
|
5303
5412
|
}
|
|
@@ -5362,6 +5471,9 @@ function sameValue(left, right) {
|
|
|
5362
5471
|
function comparedFields(type) {
|
|
5363
5472
|
return Object.fromEntries(Object.entries(type).filter(([name]) => !NOT_COMPARED.has(name)));
|
|
5364
5473
|
}
|
|
5474
|
+
function prospectiveFieldDeltas(before, after) {
|
|
5475
|
+
return fieldDeltas(comparedFields(before), comparedFields(after));
|
|
5476
|
+
}
|
|
5365
5477
|
function publishedOf(catalogue, category, typeKey) {
|
|
5366
5478
|
switch (category) {
|
|
5367
5479
|
case "object":
|
|
@@ -5392,10 +5504,9 @@ function fieldDeltas(before, after) {
|
|
|
5392
5504
|
}
|
|
5393
5505
|
function typeDelta(catalogue, changes) {
|
|
5394
5506
|
return Object.entries(changes).map(([typeKey, type]) => {
|
|
5395
|
-
const after = comparedFields(type);
|
|
5396
5507
|
const published = publishedOf(catalogue, type.typeCategory, typeKey);
|
|
5397
5508
|
if (published === void 0) {
|
|
5398
|
-
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)) };
|
|
5399
5510
|
}
|
|
5400
5511
|
return {
|
|
5401
5512
|
typeCategory: type.typeCategory,
|
|
@@ -5403,7 +5514,7 @@ function typeDelta(catalogue, changes) {
|
|
|
5403
5514
|
kind: "changed",
|
|
5404
5515
|
beforeVersion: published.version,
|
|
5405
5516
|
afterVersion: published.version + 1,
|
|
5406
|
-
fields:
|
|
5517
|
+
fields: prospectiveFieldDeltas(prospectiveOfPublished(published), type)
|
|
5407
5518
|
};
|
|
5408
5519
|
});
|
|
5409
5520
|
}
|
|
@@ -6856,6 +6967,14 @@ function removeLock(path) {
|
|
|
6856
6967
|
}
|
|
6857
6968
|
}
|
|
6858
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
|
+
};
|
|
6859
6978
|
var freshSession = async (host, deps) => {
|
|
6860
6979
|
const stored = await readEntry(host, deps, "login");
|
|
6861
6980
|
if (!stored.ok) {
|
|
@@ -12282,6 +12401,16 @@ async function publishDemoTypes(ontology, organisationId) {
|
|
|
12282
12401
|
}
|
|
12283
12402
|
resultOf(await ontology.acceptChangeSet({ input: { changeSetId, revision } }, `${IDEMPOTENCY_PREFIX}.${organisationId}.accept.${changeSetId}`), "acceptChangeSet");
|
|
12284
12403
|
}
|
|
12404
|
+
function rootSystemNameOf(data) {
|
|
12405
|
+
const roots = data.systemTree.filter((system) => system.parent === null);
|
|
12406
|
+
if (roots.length !== 1) {
|
|
12407
|
+
throw new Error(`the demo world's system tree has ${String(roots.length)} root systems, and the world is named by exactly one`);
|
|
12408
|
+
}
|
|
12409
|
+
return roots[0].name;
|
|
12410
|
+
}
|
|
12411
|
+
function demoStepReason(worldName, stepKind, ref) {
|
|
12412
|
+
return `Demo world ${worldName}: ${stepKind} ${ref}`;
|
|
12413
|
+
}
|
|
12285
12414
|
async function playDemoWorld(clients, target, size, data) {
|
|
12286
12415
|
const firstObjectType = DEMO_OBJECT_TYPES[0];
|
|
12287
12416
|
if (firstObjectType === void 0) {
|
|
@@ -12311,8 +12440,10 @@ async function playDemoWorld(clients, target, size, data) {
|
|
|
12311
12440
|
let created = 0;
|
|
12312
12441
|
let replayed2 = 0;
|
|
12313
12442
|
const selector = { projectId: target.projectId, ref: TRUNK_REF };
|
|
12443
|
+
const worldName = rootSystemNameOf(data);
|
|
12314
12444
|
const mutate = async (ref, operation) => {
|
|
12315
|
-
const
|
|
12445
|
+
const reason = demoStepReason(worldName, operation.kind, ref);
|
|
12446
|
+
const outcome = succeededEnvelope(await clients.objects.mutate({ selector, input: { correlation: { kind: "mint" }, operation, reason } }, idempotencyKeyOf(target.projectId, ref)), `mutate ${ref}`);
|
|
12316
12447
|
if (outcome.replayed) {
|
|
12317
12448
|
replayed2 += 1;
|
|
12318
12449
|
} else {
|
|
@@ -12471,6 +12602,77 @@ var sessionStatus = sessionCommand(
|
|
|
12471
12602
|
"reads this session's channel, mode and sign-in time from the server; needs no organisation attachment"
|
|
12472
12603
|
);
|
|
12473
12604
|
|
|
12605
|
+
// packages/cli/src/commands/feedback.ts
|
|
12606
|
+
import { readFileSync as readFileSync5 } from "node:fs";
|
|
12607
|
+
|
|
12608
|
+
// packages/cli/src/cli-version.ts
|
|
12609
|
+
var PATCH_VERSION = 0;
|
|
12610
|
+
var CLI_VERSION = `0.${PROTOCOL_VERSION}.${PATCH_VERSION}`;
|
|
12611
|
+
|
|
12612
|
+
// packages/cli/src/commands/feedback.ts
|
|
12613
|
+
var SETTLE3 = "list your feedback with openeng admin-sdk listFeedback before filing again, so you do not file it twice";
|
|
12614
|
+
var UNREADABLE_CODES = ["ENOENT", "EISDIR", "EACCES"];
|
|
12615
|
+
function readBodyFile(path) {
|
|
12616
|
+
try {
|
|
12617
|
+
return { ok: true, text: readFileSync5(path, "utf8") };
|
|
12618
|
+
} catch (error) {
|
|
12619
|
+
if (error instanceof Error && "code" in error && UNREADABLE_CODES.includes(String(error.code))) {
|
|
12620
|
+
const message = `--body-file ${JSON.stringify(path)} could not be read: ${String(error.code)}`;
|
|
12621
|
+
return { ok: false, outcome: { kind: "client-refusal", message } };
|
|
12622
|
+
}
|
|
12623
|
+
throw error;
|
|
12624
|
+
}
|
|
12625
|
+
}
|
|
12626
|
+
function feedbackCommand(kind) {
|
|
12627
|
+
const usage = `openeng feedback ${kind} --title <text> (--body <text> | --body-file <path|->) [context]`;
|
|
12628
|
+
return {
|
|
12629
|
+
words: ["feedback", kind],
|
|
12630
|
+
organisation: "required",
|
|
12631
|
+
usage,
|
|
12632
|
+
help: [
|
|
12633
|
+
usage,
|
|
12634
|
+
"context: --project <id> --route <name> --correlation <id>, each optional",
|
|
12635
|
+
`does: files a ${kind} feedback entry; --body-file - reads the body from standard input`,
|
|
12636
|
+
`example: openeng feedback ${kind} --title "..." --body-file - --route createFeedback`,
|
|
12637
|
+
"output: entry identifier and filing time"
|
|
12638
|
+
],
|
|
12639
|
+
run: async ({ host, deps, options, readStandardInput }) => {
|
|
12640
|
+
const { title, body, bodyFile, project, route: route2, correlation } = options;
|
|
12641
|
+
if (title === void 0) {
|
|
12642
|
+
return { kind: "client-refusal", message: "--title <text> is required" };
|
|
12643
|
+
}
|
|
12644
|
+
let text;
|
|
12645
|
+
if (body !== void 0 && bodyFile === void 0) {
|
|
12646
|
+
text = body;
|
|
12647
|
+
} else if (body === void 0 && bodyFile === "-") {
|
|
12648
|
+
text = readStandardInput();
|
|
12649
|
+
} else if (body === void 0 && bodyFile !== void 0) {
|
|
12650
|
+
const read = readBodyFile(bodyFile);
|
|
12651
|
+
if (!read.ok) return read.outcome;
|
|
12652
|
+
text = read.text;
|
|
12653
|
+
} else {
|
|
12654
|
+
return { kind: "client-refusal", message: "give exactly one of --body <text> and --body-file <path>" };
|
|
12655
|
+
}
|
|
12656
|
+
const input = {
|
|
12657
|
+
kind,
|
|
12658
|
+
title,
|
|
12659
|
+
body: text,
|
|
12660
|
+
...project === void 0 ? {} : { projectId: project },
|
|
12661
|
+
context: {
|
|
12662
|
+
...route2 === void 0 ? {} : { routeName: route2 },
|
|
12663
|
+
...correlation === void 0 ? {} : { correlationId: correlation },
|
|
12664
|
+
cliVersion: CLI_VERSION,
|
|
12665
|
+
protocolVersion: PROTOCOL_VERSION
|
|
12666
|
+
}
|
|
12667
|
+
};
|
|
12668
|
+
const run2 = await runAuthenticated(host, deps, (clients) => clients.admin.createFeedback({ input }));
|
|
12669
|
+
return run2.ok ? outcomeOfEnvelope(run2.answer, SETTLE3, (value) => `${value.entryId} ${value.filedAt}`) : outcomeOfSessionFailure(run2.failure, SETTLE3);
|
|
12670
|
+
}
|
|
12671
|
+
};
|
|
12672
|
+
}
|
|
12673
|
+
var feedbackBug = feedbackCommand("bug");
|
|
12674
|
+
var feedbackFeature = feedbackCommand("feature");
|
|
12675
|
+
|
|
12474
12676
|
// packages/cli/src/commands/whoami.ts
|
|
12475
12677
|
var whoami = async (host, store) => {
|
|
12476
12678
|
const summary = await storedSummary(store, host.key);
|
|
@@ -12766,7 +12968,7 @@ var connectorRuns = {
|
|
|
12766
12968
|
};
|
|
12767
12969
|
|
|
12768
12970
|
// packages/cli/src/commands/link.ts
|
|
12769
|
-
var
|
|
12971
|
+
var SETTLE4 = "repeat openeng link, which only reads";
|
|
12770
12972
|
var IDENTIFIER_FIELD = Object.freeze({
|
|
12771
12973
|
object: "objectId",
|
|
12772
12974
|
type: "typeKey",
|
|
@@ -12965,7 +13167,7 @@ async function link(context) {
|
|
|
12965
13167
|
return { kind: "link-ready", webOrigin: origin.result.webOrigin, path };
|
|
12966
13168
|
});
|
|
12967
13169
|
if (!run2.ok) {
|
|
12968
|
-
return outcomeOfSessionFailure(run2.failure,
|
|
13170
|
+
return outcomeOfSessionFailure(run2.failure, SETTLE4);
|
|
12969
13171
|
}
|
|
12970
13172
|
const { answer } = run2;
|
|
12971
13173
|
if ("kind" in answer) {
|
|
@@ -12977,7 +13179,7 @@ async function link(context) {
|
|
|
12977
13179
|
const href = new URL(path, webOrigin).href;
|
|
12978
13180
|
return { kind: "success", value: { link: href }, text: href };
|
|
12979
13181
|
}
|
|
12980
|
-
return outcomeOfEnvelope(answer,
|
|
13182
|
+
return outcomeOfEnvelope(answer, SETTLE4, (result) => JSON.stringify(result));
|
|
12981
13183
|
}
|
|
12982
13184
|
var BARE_USAGE = "openeng link <kind> ... (openeng link --help)";
|
|
12983
13185
|
var spec = (argumentCount, usage) => ({
|
|
@@ -13017,7 +13219,7 @@ var linkBare = spec(0, BARE_USAGE);
|
|
|
13017
13219
|
|
|
13018
13220
|
// packages/cli/src/commands/projects.ts
|
|
13019
13221
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
13020
|
-
var
|
|
13222
|
+
var SETTLE5 = "repeat openeng projects list, which only reads";
|
|
13021
13223
|
function listText(listings) {
|
|
13022
13224
|
if (listings.length === 0) {
|
|
13023
13225
|
return "no projects";
|
|
@@ -13036,7 +13238,7 @@ var projectsList = {
|
|
|
13036
13238
|
],
|
|
13037
13239
|
run: async ({ host, deps }) => {
|
|
13038
13240
|
const run2 = await runAuthenticated(host, deps, (clients) => clients.objects.listProjects({ input: {} }));
|
|
13039
|
-
return run2.ok ? outcomeOfEnvelope(run2.answer,
|
|
13241
|
+
return run2.ok ? outcomeOfEnvelope(run2.answer, SETTLE5, listText) : outcomeOfSessionFailure(run2.failure, SETTLE5);
|
|
13040
13242
|
}
|
|
13041
13243
|
};
|
|
13042
13244
|
var projectsCreate = {
|
|
@@ -13056,7 +13258,31 @@ var projectsCreate = {
|
|
|
13056
13258
|
}
|
|
13057
13259
|
const key = randomUUID3();
|
|
13058
13260
|
const run2 = await runAuthenticated(host, deps, (clients) => clients.admin.createProject({ input: { name } }, key));
|
|
13059
|
-
return run2.ok ? outcomeOfEnvelope(run2.answer,
|
|
13261
|
+
return run2.ok ? outcomeOfEnvelope(run2.answer, SETTLE5, (created) => `created project ${created.projectId} with namespace ${created.namespaceId}`) : outcomeOfSessionFailure(run2.failure, SETTLE5);
|
|
13262
|
+
}
|
|
13263
|
+
};
|
|
13264
|
+
var projectsRename = {
|
|
13265
|
+
words: ["projects", "rename"],
|
|
13266
|
+
organisation: "required",
|
|
13267
|
+
usage: "openeng projects rename --project <id> --name <text>",
|
|
13268
|
+
help: [
|
|
13269
|
+
"openeng projects rename --project <id> --name <text>",
|
|
13270
|
+
"does: renames the project; the name is sent as typed, and only an empty name is refused",
|
|
13271
|
+
"capability: administer projects on the selected project; a caller without it is told the project was not found",
|
|
13272
|
+
'example: openeng projects rename --project project-one --name "Rover"',
|
|
13273
|
+
"output: one line with the project id and its new name; under --json an object with projectId and name"
|
|
13274
|
+
],
|
|
13275
|
+
run: async ({ host, deps, options }) => {
|
|
13276
|
+
const { project, name } = options;
|
|
13277
|
+
if (project === void 0 || name === void 0) {
|
|
13278
|
+
return { kind: "client-refusal", message: "openeng projects rename needs --project <id> and --name <text>" };
|
|
13279
|
+
}
|
|
13280
|
+
const settle2 = "repeat openeng projects list, which only reads";
|
|
13281
|
+
const run2 = await runAuthenticated(host, deps, (clients) => clients.admin.renameProject({
|
|
13282
|
+
selector: { projectId: project },
|
|
13283
|
+
input: { name }
|
|
13284
|
+
}));
|
|
13285
|
+
return run2.ok ? outcomeOfEnvelope(run2.answer, settle2, (renamed) => `renamed project ${renamed.projectId} to ${renamed.name}`) : outcomeOfSessionFailure(run2.failure, settle2);
|
|
13060
13286
|
}
|
|
13061
13287
|
};
|
|
13062
13288
|
|
|
@@ -13380,18 +13606,87 @@ var orgRefsMarkReadOnly = {
|
|
|
13380
13606
|
}
|
|
13381
13607
|
};
|
|
13382
13608
|
|
|
13609
|
+
// packages/cli/src/cli-options.ts
|
|
13610
|
+
var CLI_OPTIONS = {
|
|
13611
|
+
"object-set": { type: "string" },
|
|
13612
|
+
host: { type: "string" },
|
|
13613
|
+
"sign-in-origin": { type: "string" },
|
|
13614
|
+
json: { type: "boolean" },
|
|
13615
|
+
"no-open": { type: "boolean" },
|
|
13616
|
+
project: { type: "string" },
|
|
13617
|
+
title: { type: "string" },
|
|
13618
|
+
body: { type: "string" },
|
|
13619
|
+
"body-file": { type: "string" },
|
|
13620
|
+
route: { type: "string" },
|
|
13621
|
+
correlation: { type: "string" },
|
|
13622
|
+
organisation: { type: "boolean" },
|
|
13623
|
+
"read-only": { type: "boolean" },
|
|
13624
|
+
object: { type: "string" },
|
|
13625
|
+
lock: { type: "string" },
|
|
13626
|
+
ceiling: { type: "string" },
|
|
13627
|
+
pattern: { type: "string" },
|
|
13628
|
+
consequence: { type: "string" },
|
|
13629
|
+
"extent": { type: "string" },
|
|
13630
|
+
"require-proposal": { type: "string" },
|
|
13631
|
+
"required-approvals": { type: "string" },
|
|
13632
|
+
"approver-min-role": { type: "string" },
|
|
13633
|
+
"restrict-deletions": { type: "string" },
|
|
13634
|
+
"approvers": { type: "string" },
|
|
13635
|
+
"bypass": { type: "string" },
|
|
13636
|
+
"rule-id": { type: "string" },
|
|
13637
|
+
ref: { type: "string" },
|
|
13638
|
+
base: { type: "string" },
|
|
13639
|
+
name: { type: "string" },
|
|
13640
|
+
"change-set": { type: "string" },
|
|
13641
|
+
revision: { type: "string" },
|
|
13642
|
+
from: { type: "string" },
|
|
13643
|
+
"rail-groups": { type: "string" },
|
|
13644
|
+
type: { type: "string" },
|
|
13645
|
+
sample: { type: "string" },
|
|
13646
|
+
size: { type: "string" },
|
|
13647
|
+
world: { type: "string" },
|
|
13648
|
+
selector: { type: "string" },
|
|
13649
|
+
input: { type: "string" },
|
|
13650
|
+
"input-file": { type: "string" },
|
|
13651
|
+
"idempotency-key": { type: "string" },
|
|
13652
|
+
system: { type: "string" },
|
|
13653
|
+
stack: { type: "string" },
|
|
13654
|
+
company: { type: "string" },
|
|
13655
|
+
team: { type: "string" },
|
|
13656
|
+
owner: { type: "string" },
|
|
13657
|
+
label: { type: "string" },
|
|
13658
|
+
out: { type: "string" },
|
|
13659
|
+
key: { type: "string" },
|
|
13660
|
+
reason: { type: "string" },
|
|
13661
|
+
help: { type: "boolean", short: "h" },
|
|
13662
|
+
version: { type: "boolean" }
|
|
13663
|
+
};
|
|
13664
|
+
var APP_KEY_FORM = /^[a-z0-9][a-z0-9-]{0,62}$/;
|
|
13665
|
+
var BLANK = new RegExp("^\\p{White_Space}*$", "u");
|
|
13666
|
+
var LONE_SURROGATE = new RegExp("\\p{Surrogate}", "u");
|
|
13667
|
+
function readReason(reason) {
|
|
13668
|
+
if (reason === void 0) {
|
|
13669
|
+
return { ok: false, message: "--reason <text> is required: say why the change is made" };
|
|
13670
|
+
}
|
|
13671
|
+
if (BLANK.test(reason) || reason.includes("\0") || LONE_SURROGATE.test(reason)) {
|
|
13672
|
+
return { ok: false, message: "--reason must say why the change is made: it cannot be empty, only white space, or hold a NUL character or a lone surrogate" };
|
|
13673
|
+
}
|
|
13674
|
+
return { ok: true, reason };
|
|
13675
|
+
}
|
|
13676
|
+
|
|
13383
13677
|
// packages/cli/src/commands/locks.ts
|
|
13384
13678
|
var LOCKS = ["none", "merge-only", "frozen"];
|
|
13385
13679
|
var lockOutcome = (outcome) => outcome.kind === "success" ? { ...outcome, value: { value: outcome.value } } : outcome;
|
|
13386
13680
|
var locksSet = {
|
|
13387
13681
|
words: ["locks", "set"],
|
|
13388
13682
|
organisation: "required",
|
|
13389
|
-
usage: "openeng locks set --project <id> --ref <ref> --object <
|
|
13683
|
+
usage: "openeng locks set --project <id> --ref <ref> --object <id> --lock <lock> --reason <text>",
|
|
13390
13684
|
help: [
|
|
13391
|
-
"openeng locks set --project <id> --ref <ref> --object <
|
|
13392
|
-
"does: sets or lifts an object's lock on the selected project ref",
|
|
13685
|
+
"openeng locks set --project <id> --ref <ref> --object <id> --lock <lock> --reason <text>",
|
|
13686
|
+
"does: sets or lifts an object's lock on the selected project ref; --lock is none, merge-only or frozen",
|
|
13687
|
+
"reason: required; say why the lock changes, written first in the save commit message",
|
|
13393
13688
|
protectionCapabilityHelp("setObjectLock"),
|
|
13394
|
-
|
|
13689
|
+
'example: openeng locks set --project project-one --ref main --object object-one --lock frozen --reason "Freeze the released drawing"',
|
|
13395
13690
|
"output: the object identifier and lock; under --json { scope, value }, with { objectId, lock } in value"
|
|
13396
13691
|
],
|
|
13397
13692
|
run: async ({ host, deps, options }) => {
|
|
@@ -13402,13 +13697,17 @@ var locksSet = {
|
|
|
13402
13697
|
message: "openeng locks set needs --project <id>, --ref <ref>, --object <objectId> and --lock <none|merge-only|frozen>"
|
|
13403
13698
|
};
|
|
13404
13699
|
}
|
|
13700
|
+
const reason = readReason(options.reason);
|
|
13701
|
+
if (!reason.ok) {
|
|
13702
|
+
return { kind: "client-refusal", message: reason.message };
|
|
13703
|
+
}
|
|
13405
13704
|
const lock = LOCKS.find((value) => value === options.lock);
|
|
13406
13705
|
if (lock === void 0) {
|
|
13407
13706
|
return { kind: "client-refusal", message: "--lock must be none, merge-only or frozen" };
|
|
13408
13707
|
}
|
|
13409
13708
|
const selector = { projectId: project, ref };
|
|
13410
|
-
const input = { objectId: object, lock };
|
|
13411
|
-
const settle2 = `repeat openeng locks set --project ${project} --ref ${ref} --object ${object} --lock ${lock}
|
|
13709
|
+
const input = { objectId: object, lock, reason: reason.reason };
|
|
13710
|
+
const settle2 = `repeat openeng locks set --project ${project} --ref ${ref} --object ${object} --lock ${lock} --reason <text>, which sets the same lock again`;
|
|
13412
13711
|
const run2 = await runAuthenticated(host, deps, (clients) => clients.objects.setObjectLock({ selector, input }));
|
|
13413
13712
|
return run2.ok ? lockOutcome(outcomeOfEnvelope(run2.answer, settle2, (value) => `object ${value.objectId} lock ${value.lock}`)) : outcomeOfSessionFailure(run2.failure, settle2);
|
|
13414
13713
|
}
|
|
@@ -13532,7 +13831,7 @@ var schemaUpdateShow = {
|
|
|
13532
13831
|
|
|
13533
13832
|
// packages/cli/src/commands/types.ts
|
|
13534
13833
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
13535
|
-
import { readFileSync as
|
|
13834
|
+
import { readFileSync as readFileSync6 } from "node:fs";
|
|
13536
13835
|
|
|
13537
13836
|
// packages/cli/src/commands/type-revise-help.ts
|
|
13538
13837
|
var TYPE_REVISE_EXAMPLE_KEYS = {
|
|
@@ -13871,7 +14170,7 @@ var typesDraftState = {
|
|
|
13871
14170
|
function objectOfFile(path, shape) {
|
|
13872
14171
|
let text;
|
|
13873
14172
|
try {
|
|
13874
|
-
text =
|
|
14173
|
+
text = readFileSync6(path, "utf8");
|
|
13875
14174
|
} catch (error) {
|
|
13876
14175
|
if (error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "EISDIR" || error.code === "EACCES")) {
|
|
13877
14176
|
return { ok: false, outcome: { kind: "client-refusal", message: `the file ${JSON.stringify(path)} could not be read: ${error.code}` } };
|
|
@@ -14105,7 +14404,7 @@ import { createHash as createHash3, randomUUID as randomUUID5 } from "node:crypt
|
|
|
14105
14404
|
import { renameSync as renameSync2, rmSync } from "node:fs";
|
|
14106
14405
|
import { open } from "node:fs/promises";
|
|
14107
14406
|
import { basename } from "node:path";
|
|
14108
|
-
var usageAdd = "openeng attachment add <object> <property> <file> --project <id> --ref <ref>";
|
|
14407
|
+
var usageAdd = "openeng attachment add <object> <property> <file> --project <id> --ref <ref> --reason <text>";
|
|
14109
14408
|
var usageGet = "openeng attachment get <object> <property> [--out <path>] --project <id> --ref <ref>";
|
|
14110
14409
|
var usageList = "openeng attachment list <object> --project <id> --ref <ref>";
|
|
14111
14410
|
var invalid = (message) => ({ kind: "client-refusal", message });
|
|
@@ -14150,7 +14449,7 @@ function wireDescriptor(value) {
|
|
|
14150
14449
|
}
|
|
14151
14450
|
return null;
|
|
14152
14451
|
}
|
|
14153
|
-
async function saveDescriptor(context, selector, objectId, property, file) {
|
|
14452
|
+
async function saveDescriptor(context, selector, objectId, property, file, reason) {
|
|
14154
14453
|
const name = basename(file);
|
|
14155
14454
|
const settle2 = `openeng attachment get ${objectId} ${property} --project ${selector.projectId} --ref ${selector.ref}`;
|
|
14156
14455
|
const run2 = await runAuthenticated(context.host, context.deps, async (clients) => {
|
|
@@ -14195,7 +14494,8 @@ async function saveDescriptor(context, selector, objectId, property, file) {
|
|
|
14195
14494
|
const previous = isRecord4(current) && "value" in current ? { kind: "value", value: current.value } : { kind: "absent" };
|
|
14196
14495
|
const saved = await clients.objects.mutate({ selector, input: {
|
|
14197
14496
|
correlation: { kind: "mint" },
|
|
14198
|
-
operation: { kind: "update-object", objectId, typeVersion: type.version, changes: { [property]: { from: previous, to: { kind: "value", value: staged.result } } } }
|
|
14497
|
+
operation: { kind: "update-object", objectId, typeVersion: type.version, changes: { [property]: { from: previous, to: { kind: "value", value: staged.result } } } },
|
|
14498
|
+
reason
|
|
14199
14499
|
} }, randomUUID5());
|
|
14200
14500
|
if ("refusal" in saved) return { outcome: outcomeOfEnvelope(saved, settle2, (value2) => JSON.stringify(value2)) };
|
|
14201
14501
|
if (saved.replayed === true) return { outcome: outcomeOfEnvelope(saved, settle2, (value2) => JSON.stringify(value2)) };
|
|
@@ -14229,7 +14529,8 @@ var attachmentAdd = {
|
|
|
14229
14529
|
help: [
|
|
14230
14530
|
usageAdd,
|
|
14231
14531
|
"does: stages a file and saves its descriptor on the object's attachment property",
|
|
14232
|
-
"
|
|
14532
|
+
"reason: required; say why the file is attached, written first in the save commit message",
|
|
14533
|
+
'example: openeng attachment add obj_abc drawing ./drawing.pdf --project proj_abc --ref main --reason "Attach the released drawing"',
|
|
14233
14534
|
"output: the attachment descriptor as JSON"
|
|
14234
14535
|
],
|
|
14235
14536
|
run: async (context) => {
|
|
@@ -14239,7 +14540,9 @@ var attachmentAdd = {
|
|
|
14239
14540
|
if (!isSelector(selector)) return selector;
|
|
14240
14541
|
const [objectId, property, file] = args;
|
|
14241
14542
|
if (objectId === void 0 || property === void 0 || file === void 0) return invalid(`usage: ${usageAdd}`);
|
|
14242
|
-
|
|
14543
|
+
const reason = readReason(context.options.reason);
|
|
14544
|
+
if (!reason.ok) return invalid(reason.message);
|
|
14545
|
+
return saveDescriptor(context, selector, objectId, property, file, reason.reason);
|
|
14243
14546
|
}
|
|
14244
14547
|
};
|
|
14245
14548
|
var attachmentGet = {
|
|
@@ -14395,7 +14698,10 @@ function resultText(result) {
|
|
|
14395
14698
|
const value = displayPropertyValue(result.value, { kind: "number", unit: result.unit });
|
|
14396
14699
|
return `${label}${result.nonRepeatable ? `; ${RESULT_LABELS.nonRepeatable}` : ""}; ${value}; ${result.ref}`;
|
|
14397
14700
|
}
|
|
14398
|
-
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
|
+
}
|
|
14399
14705
|
return label;
|
|
14400
14706
|
}
|
|
14401
14707
|
function statusText(answer) {
|
|
@@ -14438,11 +14744,12 @@ var linksClear = {
|
|
|
14438
14744
|
words: ["links", "clear"],
|
|
14439
14745
|
arguments: "rest",
|
|
14440
14746
|
organisation: "required",
|
|
14441
|
-
usage: "openeng links clear <link>... --version <v>... --project <id> --ref <ref>",
|
|
14747
|
+
usage: "openeng links clear <link>... --version <v>... --project <id> --ref <ref> --reason <text>",
|
|
14442
14748
|
help: [
|
|
14443
|
-
"openeng links clear <link>... --version <v>... --project <id> --ref <ref>",
|
|
14749
|
+
"openeng links clear <link>... --version <v>... --project <id> --ref <ref> --reason <text>",
|
|
14444
14750
|
"does: clears 1 to 100 links atomically; supply one upstream version from links status per link, in the same order",
|
|
14445
|
-
"
|
|
14751
|
+
"reason: required; say why the links are cleared, written first in the save commit message",
|
|
14752
|
+
'example: openeng links clear edg_abc --version <upstream-version> --project proj_abc --ref main --reason "Reviewed the upstream change"',
|
|
14446
14753
|
"output: the clearing commit and correlation; upstream-changed requires reading the status and reviewing again"
|
|
14447
14754
|
],
|
|
14448
14755
|
run: async ({ host, deps, options, args }) => {
|
|
@@ -14450,6 +14757,8 @@ var linksClear = {
|
|
|
14450
14757
|
if (project === void 0 || ref === void 0 || upstreamVersions === void 0 || args.length < 1 || args.length > MAX_CLEAR_ENTRIES || upstreamVersions.length !== args.length || args.some((link2) => link2.length === 0) || upstreamVersions.some((version) => version.length === 0)) {
|
|
14451
14758
|
return { kind: "client-refusal", message: "links clear needs 1 to 100 links, one --version per link, --project <id> and --ref <ref>" };
|
|
14452
14759
|
}
|
|
14760
|
+
const reason = readReason(options.reason);
|
|
14761
|
+
if (!reason.ok) return { kind: "client-refusal", message: reason.message };
|
|
14453
14762
|
const entries7 = args.map((linkId, index) => {
|
|
14454
14763
|
const upstreamVersion = upstreamVersions[index];
|
|
14455
14764
|
if (upstreamVersion === void 0) throw new Error("a clearing entry has no upstream version");
|
|
@@ -14458,7 +14767,7 @@ var linksClear = {
|
|
|
14458
14767
|
const settle2 = `read link status on ref ${ref} or recover the clearing by its correlation id`;
|
|
14459
14768
|
const run2 = await runAuthenticated(host, deps, (clients) => clients.objects.clearLinks({
|
|
14460
14769
|
selector: { projectId: project },
|
|
14461
|
-
input: { correlation: { kind: "mint" }, ref, entries: entries7 }
|
|
14770
|
+
input: { correlation: { kind: "mint" }, ref, entries: entries7, reason: reason.reason }
|
|
14462
14771
|
}, randomUUID6()));
|
|
14463
14772
|
if (!run2.ok) return outcomeOfSessionFailure(run2.failure, settle2);
|
|
14464
14773
|
if ("result" in run2.answer && run2.answer.result.kind === "unknown") {
|
|
@@ -14511,7 +14820,7 @@ var branchesImpact = {
|
|
|
14511
14820
|
};
|
|
14512
14821
|
|
|
14513
14822
|
// packages/cli/src/commands/hosted-app.ts
|
|
14514
|
-
import { readFileSync as
|
|
14823
|
+
import { readFileSync as readFileSync7 } from "node:fs";
|
|
14515
14824
|
var ONE_WALL_WARNING_LEAD = "Reduced isolation lets an app use React in the normal way, so agents can build better apps. One browser feature, WebRTC, cannot be blocked which creates a security risk if used by a hosted app.";
|
|
14516
14825
|
var ONE_WALL_WARNING_DETAIL = "WebRTC lets a web page connect directly to other computers on the internet, for example for video calls. An app with reduced isolation could use WebRTC to send data out of the viewer's browser. The app runs with the access of each person who opens it, so this data could be anything that person can read. Use of WebRTC in an app with reduced isolation is a security risk. Review the app's code for WebRTC use before you allow it, and again for each new version. A coding agent can do the review. If you remove this permission, the app stops at its next request, but data it already read cannot be recalled.";
|
|
14517
14826
|
var ONE_WALL_WARNING = `${ONE_WALL_WARNING_LEAD}
|
|
@@ -14560,7 +14869,7 @@ var hostedAppPublish = {
|
|
|
14560
14869
|
if (isOutcome2(file)) return file;
|
|
14561
14870
|
const key = context.options.key;
|
|
14562
14871
|
if (key === void 0 || key === "") return invalid2(`openeng hosted-app publish needs --key <app key>; usage: ${usagePublish}`);
|
|
14563
|
-
const bytes = new Uint8Array(
|
|
14872
|
+
const bytes = new Uint8Array(readFileSync7(file));
|
|
14564
14873
|
const settle2 = `openeng hosted-app versions ${key} --project ${project}, which only reads; publish again only if the version is absent`;
|
|
14565
14874
|
const run2 = await runAuthenticated(context.host, context.deps, async (clients) => {
|
|
14566
14875
|
const found = await appOfKey(clients, project, key, settle2);
|
|
@@ -14741,6 +15050,7 @@ var PUBLIC_HAND_WRITTEN_COMMANDS = [
|
|
|
14741
15050
|
orgCurrent,
|
|
14742
15051
|
projectsList,
|
|
14743
15052
|
projectsCreate,
|
|
15053
|
+
projectsRename,
|
|
14744
15054
|
rulesAdd,
|
|
14745
15055
|
rulesUpdate,
|
|
14746
15056
|
rulesList,
|
|
@@ -14754,6 +15064,8 @@ var PUBLIC_HAND_WRITTEN_COMMANDS = [
|
|
|
14754
15064
|
ceilingSet,
|
|
14755
15065
|
schemaUpdateRequest,
|
|
14756
15066
|
schemaUpdateShow,
|
|
15067
|
+
feedbackBug,
|
|
15068
|
+
feedbackFeature,
|
|
14757
15069
|
attachmentAdd,
|
|
14758
15070
|
attachmentGet,
|
|
14759
15071
|
attachmentList,
|
|
@@ -14794,65 +15106,10 @@ var PUBLIC_COMMANDS = [
|
|
|
14794
15106
|
|
|
14795
15107
|
// packages/cli/src/main.ts
|
|
14796
15108
|
import { spawn } from "node:child_process";
|
|
14797
|
-
import { readFileSync as
|
|
15109
|
+
import { readFileSync as readFileSync9 } from "node:fs";
|
|
14798
15110
|
import { homedir } from "node:os";
|
|
14799
15111
|
import { parseArgs } from "node:util";
|
|
14800
15112
|
|
|
14801
|
-
// packages/cli/src/cli-options.ts
|
|
14802
|
-
var CLI_OPTIONS = {
|
|
14803
|
-
"object-set": { type: "string" },
|
|
14804
|
-
host: { type: "string" },
|
|
14805
|
-
"sign-in-origin": { type: "string" },
|
|
14806
|
-
json: { type: "boolean" },
|
|
14807
|
-
"no-open": { type: "boolean" },
|
|
14808
|
-
project: { type: "string" },
|
|
14809
|
-
organisation: { type: "boolean" },
|
|
14810
|
-
"read-only": { type: "boolean" },
|
|
14811
|
-
object: { type: "string" },
|
|
14812
|
-
lock: { type: "string" },
|
|
14813
|
-
ceiling: { type: "string" },
|
|
14814
|
-
pattern: { type: "string" },
|
|
14815
|
-
consequence: { type: "string" },
|
|
14816
|
-
"extent": { type: "string" },
|
|
14817
|
-
"require-proposal": { type: "string" },
|
|
14818
|
-
"required-approvals": { type: "string" },
|
|
14819
|
-
"approver-min-role": { type: "string" },
|
|
14820
|
-
"restrict-deletions": { type: "string" },
|
|
14821
|
-
"approvers": { type: "string" },
|
|
14822
|
-
"bypass": { type: "string" },
|
|
14823
|
-
"rule-id": { type: "string" },
|
|
14824
|
-
ref: { type: "string" },
|
|
14825
|
-
base: { type: "string" },
|
|
14826
|
-
name: { type: "string" },
|
|
14827
|
-
"change-set": { type: "string" },
|
|
14828
|
-
revision: { type: "string" },
|
|
14829
|
-
from: { type: "string" },
|
|
14830
|
-
"rail-groups": { type: "string" },
|
|
14831
|
-
type: { type: "string" },
|
|
14832
|
-
sample: { type: "string" },
|
|
14833
|
-
size: { type: "string" },
|
|
14834
|
-
world: { type: "string" },
|
|
14835
|
-
selector: { type: "string" },
|
|
14836
|
-
input: { type: "string" },
|
|
14837
|
-
"input-file": { type: "string" },
|
|
14838
|
-
"idempotency-key": { type: "string" },
|
|
14839
|
-
system: { type: "string" },
|
|
14840
|
-
stack: { type: "string" },
|
|
14841
|
-
company: { type: "string" },
|
|
14842
|
-
team: { type: "string" },
|
|
14843
|
-
owner: { type: "string" },
|
|
14844
|
-
label: { type: "string" },
|
|
14845
|
-
out: { type: "string" },
|
|
14846
|
-
key: { type: "string" },
|
|
14847
|
-
help: { type: "boolean", short: "h" },
|
|
14848
|
-
version: { type: "boolean" }
|
|
14849
|
-
};
|
|
14850
|
-
var APP_KEY_FORM = /^[a-z0-9][a-z0-9-]{0,62}$/;
|
|
14851
|
-
|
|
14852
|
-
// packages/cli/src/cli-version.ts
|
|
14853
|
-
var PATCH_VERSION = 0;
|
|
14854
|
-
var CLI_VERSION = `0.${PROTOCOL_VERSION}.${PATCH_VERSION}`;
|
|
14855
|
-
|
|
14856
15113
|
// packages/cli/src/environment.ts
|
|
14857
15114
|
var readEnvironment = () => Object.freeze({
|
|
14858
15115
|
OPENENG_HOST: process.env.OPENENG_HOST,
|
|
@@ -14868,7 +15125,7 @@ var createTransport = (host) => host.kind === "unix" ? createHostFetch(host.sock
|
|
|
14868
15125
|
|
|
14869
15126
|
// packages/cli/src/update-check.ts
|
|
14870
15127
|
import { randomUUID as randomUUID7 } from "node:crypto";
|
|
14871
|
-
import { existsSync, mkdirSync as mkdirSync3, readFileSync as
|
|
15128
|
+
import { existsSync, mkdirSync as mkdirSync3, readFileSync as readFileSync8, renameSync as renameSync3, unlinkSync as unlinkSync3, writeFileSync } from "node:fs";
|
|
14872
15129
|
import { join as join4 } from "node:path";
|
|
14873
15130
|
function versionParts(value) {
|
|
14874
15131
|
if (typeof value !== "string" || !/^\d+\.\d+\.\d+$/.test(value)) {
|
|
@@ -14881,7 +15138,7 @@ function readCache(file) {
|
|
|
14881
15138
|
if (!existsSync(file)) {
|
|
14882
15139
|
return null;
|
|
14883
15140
|
}
|
|
14884
|
-
const value = JSON.parse(
|
|
15141
|
+
const value = JSON.parse(readFileSync8(file, "utf8"));
|
|
14885
15142
|
if (typeof value !== "object" || value === null || !("latest" in value) || !("checkedAt" in value)) {
|
|
14886
15143
|
return null;
|
|
14887
15144
|
}
|
|
@@ -15061,6 +15318,11 @@ function parseInvocation(argv) {
|
|
|
15061
15318
|
json: values.json === true,
|
|
15062
15319
|
open: values["no-open"] !== true,
|
|
15063
15320
|
project: values.project,
|
|
15321
|
+
title: values.title,
|
|
15322
|
+
body: values.body,
|
|
15323
|
+
bodyFile: values["body-file"],
|
|
15324
|
+
route: values.route,
|
|
15325
|
+
correlation: values.correlation,
|
|
15064
15326
|
objectSet: values["object-set"],
|
|
15065
15327
|
organisation: values.organisation === true,
|
|
15066
15328
|
readOnly: values["read-only"] === true,
|
|
@@ -15100,7 +15362,8 @@ function parseInvocation(argv) {
|
|
|
15100
15362
|
owner: values.owner,
|
|
15101
15363
|
label: values.label,
|
|
15102
15364
|
out: values.out,
|
|
15103
|
-
key: values.key
|
|
15365
|
+
key: values.key,
|
|
15366
|
+
reason: values.reason
|
|
15104
15367
|
}
|
|
15105
15368
|
};
|
|
15106
15369
|
} catch (error) {
|
|
@@ -15152,14 +15415,16 @@ ${usageLines(commands).join("\n")}` : unknownCommandMessage(commands, invocation
|
|
|
15152
15415
|
if (!selection.ok) {
|
|
15153
15416
|
return { outcome: outcomeOfStoreRefusal(selection.refusal), json: options.json, scope: null };
|
|
15154
15417
|
}
|
|
15155
|
-
const
|
|
15156
|
-
|
|
15157
|
-
|
|
15158
|
-
|
|
15159
|
-
|
|
15160
|
-
|
|
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}
|
|
15161
15424
|
`)
|
|
15162
|
-
|
|
15425
|
+
};
|
|
15426
|
+
const deps = {
|
|
15427
|
+
transport: withStepUpRoad(createTransport(parsedHost.host), stepUpRoad),
|
|
15163
15428
|
store: selection.store,
|
|
15164
15429
|
clock,
|
|
15165
15430
|
configDirectory,
|
|
@@ -15179,7 +15444,7 @@ ${usageLines(commands).join("\n")}` : unknownCommandMessage(commands, invocation
|
|
|
15179
15444
|
deps,
|
|
15180
15445
|
options,
|
|
15181
15446
|
args: invocation.words.slice(command.words.length),
|
|
15182
|
-
readStandardInput: () =>
|
|
15447
|
+
readStandardInput: () => readFileSync9(0, "utf8"),
|
|
15183
15448
|
promptSecret,
|
|
15184
15449
|
writeLine: (line) => process.stdout.write(`${line}
|
|
15185
15450
|
`),
|