@openengio/cli 0.36.0 → 0.37.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 +88 -37
- package/bin/public/openeng.js +1357 -269
- package/package.json +1 -1
- package/skill/build-ui/SKILL.md +4 -4
- package/skill/conventions/SKILL.md +6 -3
- package/skill/demo/SKILL.md +2 -3
- package/skill/new-use-case/SKILL.md +2 -2
- package/skill/openeng/SKILL.md +171 -55
- package/skill/playbooks/engineering-requirements.md +0 -2
- package/skill/playbooks/product-lifecycle.md +2 -2
package/bin/public/openeng.js
CHANGED
|
@@ -58,6 +58,11 @@ var LINK_DIRECTIONS = Object.freeze(["outgoing", "incoming", "to-children", "to-
|
|
|
58
58
|
var SET_OPERATORS = Object.freeze(["union", "intersection", "difference"]);
|
|
59
59
|
var AGGREGATE_OPERATIONS = Object.freeze(["count", "min", "max", "sum", "average"]);
|
|
60
60
|
|
|
61
|
+
// packages/api-contract/dist/branch-rules.js
|
|
62
|
+
var RULE_EXTENTS = Object.freeze(["ref", "rows"]);
|
|
63
|
+
var RULE_CONSEQUENCES = Object.freeze(["open", "merge-only", "locked-rows-only"]);
|
|
64
|
+
var RULE_ROLES = Object.freeze(["contributor", "maintainer", "owner"]);
|
|
65
|
+
|
|
61
66
|
// packages/api-contract/dist/entry-form.js
|
|
62
67
|
function verbEntry(type) {
|
|
63
68
|
const subjects = type.allowedSubjectTypes;
|
|
@@ -79,6 +84,18 @@ var FIX_REQUEST = { option: "Correct the request and send it again." };
|
|
|
79
84
|
var ASK_ADMINISTRATOR = { option: "Ask an administrator of the organisation to make the change or to grant the permission." };
|
|
80
85
|
var SIGN_IN_AGAIN = { option: "Sign in again." };
|
|
81
86
|
var RULE_ENTRIES = {
|
|
87
|
+
"draft-locked": entry("Another person holds this draft lock.", { option: "Wait for the lock to expire or ask its holder to release it." }),
|
|
88
|
+
"draft-lock-lost": entry("The draft lock is no longer held by you.", { option: "Acquire the draft again before saving." }),
|
|
89
|
+
"draft-not-flushed": entry("The draft has saves that were not confirmed.", { option: "Save and confirm the latest draft before publishing." }),
|
|
90
|
+
"draft-changed": entry("The draft changed since it was read, or its saved base no longer matches.", { option: "Acquire the draft again before saving." }),
|
|
91
|
+
"unknown-block": entry("The save names a block identifier the draft does not hold.", { option: "Send a new block in added, without an identifier; the server mints it." }),
|
|
92
|
+
"ref-not-found": entry("The branch no longer exists.", { option: "Choose an existing branch." }),
|
|
93
|
+
"object-not-found": entry("The object is absent from the destination branch.", FIX_REQUEST),
|
|
94
|
+
"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." }),
|
|
95
|
+
"ref-has-drafts": entry("The branch still has drafts.", { option: "Review its drafts and confirm their removal before disposing the branch." }),
|
|
96
|
+
"body-not-declared": entry("The object's type version does not declare a body format.", FIX_REQUEST),
|
|
97
|
+
"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" }),
|
|
98
|
+
"body-too-large": entry("The body exceeds the limit on blocks, bytes per block or total bytes.", FIX_REQUEST),
|
|
82
99
|
"upstream-changed": entry("The upstream content changed since the link was reviewed; no link was cleared.", {
|
|
83
100
|
option: "Read the link status, review the upstream content and clear against its new version.",
|
|
84
101
|
read: "readLinkStatus"
|
|
@@ -99,11 +116,23 @@ var RULE_ENTRIES = {
|
|
|
99
116
|
"no-commits": entry("The branch holds no change of its own yet."),
|
|
100
117
|
"proposal-open": entry("A proposal for this branch is already waiting for review.", { option: "Read the pending proposal.", read: "readPendingProposal" }),
|
|
101
118
|
"proposal-not-pending": entry("The proposal is no longer waiting for review.", { option: "Read the proposal.", read: "readProposal" }),
|
|
119
|
+
"proposal-required": entry("A rule on the target requires a proposal from this branch to the target before it merges, and none is pending.", { option: "Submit a proposal for the branch, have it approved, then merge it.", read: "readPendingProposal" }),
|
|
120
|
+
"approvals-required": entry("A rule on the target requires more approvals of the branch's latest commit than the proposal has.", { option: "Read the proposal's approvals and ask an approver to review its latest commit.", read: "readProposal" }),
|
|
121
|
+
"deletion-restricted": entry("A rule restricts deleting this branch, and you are not on its bypass list.", { option: "Ask someone on the rule's bypass list to delete the branch.", read: "listRefRules" }),
|
|
122
|
+
"bypass-required": entry("The branch has a pending proposal and a rule matches it, so only someone on the bypass list of each matching rule may delete it.", { option: "Refuse the proposal first, or ask someone on the rule's bypass list to delete the branch.", read: "readPendingProposal" }),
|
|
123
|
+
"proposal-head-moved": entry("The branch's latest commit is not the one the approval names, so nothing was recorded.", { option: "Read the branch's latest commit, review it and approve that commit.", read: "readRefHead" }),
|
|
124
|
+
"author-cannot-approve": entry("An author of the proposal cannot approve it.", { option: "Ask another person who reads the project to approve it." }),
|
|
125
|
+
"already-approved": entry("You have already approved the proposal at this commit, so nothing was recorded.", { option: "Read the proposal's approvals.", read: "readProposal" }),
|
|
126
|
+
"invalid-rule-pattern": entry("The rule's pattern is not one its owner and extent take: a project's branch rule names its own branches, an organisation's rule names main or organisation branches and baselines, and a rows rule names main or its project's own branches.", FIX_REQUEST),
|
|
127
|
+
"invalid-rule-setting": entry("The rule's settings do not fit together or do not fit the rule: approvals need a proposal and an approver, and only a project's branch rule restricts deletions.", FIX_REQUEST),
|
|
128
|
+
"unknown-rule-member": entry("The rule names a person, service or application that it may not name; the answer is the same whether the member is absent or outside the rule's home.", FIX_REQUEST),
|
|
129
|
+
"duplicate-rule": entry("Another rule on this pattern and extent already has that consequence; the rule is unchanged.", FIX_REQUEST),
|
|
130
|
+
"invalid-proposal-target": entry("The proposal's target is not one a proposal may name: main, a writable organisation branch, or a project branch.", FIX_REQUEST),
|
|
102
131
|
"change-set-open": entry("The organisation already has an open change set.", { option: "Read the open change set and continue with it.", read: "readCurrentChangeSet" }),
|
|
103
|
-
"stale-revision": entry("The change set or app draft has changed since it was read, so nothing was applied.", { option: "Read the change set again, apply your change to what it now holds and send it again.", read: "readChangeSet" }, { option: "Read the app draft again, apply your change to what it now holds and send it again.", read: "readAppDraft" }),
|
|
132
|
+
"stale-revision": entry("The change set or app draft has changed since it was read, so nothing was applied.", { option: "Read the change set again, apply your change to what it now holds and send it again.", read: "readChangeSet" }, { option: "Read the object set again and retry with its current revision.", read: "readObjectSet" }, { option: "Read the app draft again, apply your change to what it now holds and send it again.", read: "readAppDraft" }),
|
|
104
133
|
"not-open": entry("The change set or app draft is accepted or discarded and takes no further change.", { option: "Read the change set's state.", read: "readChangeSetState" }, { option: "Read the app draft's state.", read: "readAppDraft" }),
|
|
105
134
|
"app-draft-open": entry("The app already has an open draft.", { option: "Read the open draft and continue with it.", read: "readAppDraft" }),
|
|
106
|
-
"invalid-app": entry("The app
|
|
135
|
+
"invalid-app": entry("The app key or document is invalid; document violations say where.", { option: "Use a valid app key." }, { option: "Correct the document at the paths the violations name and save it again.", read: "readAppDraft" }),
|
|
107
136
|
"invalid-catalogue": entry("The change set does not pass the checks on types; the violations say where.", {
|
|
108
137
|
option: "Read the change set, correct it at the paths the violations name and revise it. For typeIcon, use a Material Symbols Rounded name from @material-symbols/font-400, such as memory or developer_board. openeng types icons <text> lists valid names and needs no sign-in; the full list is at https://docs.openeng.io/reference/icons/.",
|
|
109
138
|
read: "readChangeSet"
|
|
@@ -132,7 +161,7 @@ var RULE_ENTRIES = {
|
|
|
132
161
|
"no-such-client": entry("The client the request names is not an active client of your organisation.", { option: "List the organisation's clients.", read: "listClients" }),
|
|
133
162
|
"no-such-invitation": entry("The invitation the request names is not one of your organisation.", { option: "List the pending invitations.", read: "listInvitations" }),
|
|
134
163
|
"invitation-not-pending": entry("The invitation was already accepted or revoked.", { option: "List the pending invitations.", read: "listInvitations" }),
|
|
135
|
-
"invalid-domain": entry("
|
|
164
|
+
"invalid-domain": entry("The rule lacks its switch or list, or a domain is not valid: it needs letters, digits, hyphens and at least one dot.", FIX_REQUEST),
|
|
136
165
|
"domain-not-allowed": entry("The organisation invites only addresses on its allowed domains, and this address is not on the list.", { option: "Use an address on an allowed domain, or ask an owner to change the list.", read: "readInvitationDomainRule" }),
|
|
137
166
|
"membership-exists": entry("The membership already exists.", { option: "List the members.", read: "listMembers" }),
|
|
138
167
|
"no-such-principal": entry("The request names someone who cannot hold the membership.", FIX_REQUEST),
|
|
@@ -151,7 +180,7 @@ var RULE_ENTRIES = {
|
|
|
151
180
|
signature: entry("The sign-in token was not accepted.", SIGN_IN_AGAIN),
|
|
152
181
|
issuer: entry("The sign-in token was not accepted.", SIGN_IN_AGAIN),
|
|
153
182
|
audience: entry("The sign-in token was not accepted.", SIGN_IN_AGAIN),
|
|
154
|
-
expiry: entry("The sign-in token
|
|
183
|
+
expiry: entry("The sign-in token is expired or not yet valid.", SIGN_IN_AGAIN),
|
|
155
184
|
algorithm: entry("The sign-in token was not accepted.", SIGN_IN_AGAIN),
|
|
156
185
|
claims: entry("The sign-in token was not accepted.", SIGN_IN_AGAIN),
|
|
157
186
|
"malformed-query": entry("The query is not one the platform can run; the refusal identifies the path of the invalid field.", FIX_REQUEST),
|
|
@@ -164,16 +193,16 @@ var RULE_ENTRIES = {
|
|
|
164
193
|
"cycle-in-reach": entry("A per-path repeat reach returned to an object already in that path's ancestors; the refusal names the readable object.", { option: "Remove the cycle, or use distinct multiplicity, which admits cycles." }),
|
|
165
194
|
"over-bound": entry("The request exceeds a graph, structure, path, or query limit.", FIX_REQUEST),
|
|
166
195
|
"malformed-history-request": entry("The history request is not one the platform can run.", FIX_REQUEST),
|
|
167
|
-
"protected-ref": entry("This branch is protected, so
|
|
196
|
+
"protected-ref": entry("This branch is protected, so this write cannot proceed.", { option: "Write to another branch." }),
|
|
168
197
|
immutable: entry("The record's type is immutable, so it cannot be changed or deleted on any branch.", { option: "Leave the record unchanged." }),
|
|
169
198
|
owned: entry("The record belongs to a connected system, which alone can write it.", { option: "Ask the connected system to make the change." }),
|
|
170
199
|
frozen: entry("The record is locked; it cannot be changed until someone allowed to lock records lifts the lock.", { option: "Ask someone allowed to lock records to lift the lock." }),
|
|
171
200
|
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." }),
|
|
172
201
|
"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." }),
|
|
173
202
|
"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." }),
|
|
174
|
-
"branch-needs-schema-update": entry("This branch's schema
|
|
203
|
+
"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." }),
|
|
175
204
|
"organisation-not-ready": entry("The organisation's trunk is not ready yet.", { option: "Try again shortly." }),
|
|
176
|
-
"read-only-ref": entry("The branch is read-only,
|
|
205
|
+
"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." }),
|
|
177
206
|
"ref-exists": entry("An organisation branch or baseline of that name already exists.", { option: "List the organisation's branches and baselines.", read: "listOrganisationRefs" }),
|
|
178
207
|
"concurrent-change": entry("Another write changed the record first, so nothing was applied.", { option: "Try again shortly." }),
|
|
179
208
|
"lock-unavailable": entry("The lock could not be taken now, so nothing was applied.", { option: "Try again shortly." }),
|
|
@@ -190,27 +219,31 @@ var RULE_ENTRIES = {
|
|
|
190
219
|
"subscription-absent": entry("The object has no such subscription to remove.", { option: "Read the object's subscribers to see who is subscribed." }),
|
|
191
220
|
"invalid-body": entry("The comment text is empty or longer than the platform allows.", FIX_REQUEST),
|
|
192
221
|
"invalid-mention": entry("A mention points outside the comment text, overlaps another, or cuts a character in two, or the comment holds too many mentions.", FIX_REQUEST),
|
|
222
|
+
"anchor-invalid": entry("The comment anchor has invalid offsets, quote length or context length, names a block the object does not have, or quotes text that the block does not hold.", FIX_REQUEST),
|
|
193
223
|
"invalid-ref": entry("The branch the request names is not in a form the platform takes for this operation.", FIX_REQUEST),
|
|
194
224
|
"invalid-query": entry("The search text, or the page the request continues from, is outside what the platform takes.", FIX_REQUEST),
|
|
195
225
|
"invalid-project-id": entry("The project could not be created under the identifier the platform made for it.", { option: "Send it again as a new request." }),
|
|
196
226
|
"import-running": entry("A run of this connection is already running.", { option: "List the connection's runs.", read: "listImportRuns" }),
|
|
197
|
-
"connection-exists": entry("The organisation already has a live connection
|
|
198
|
-
"run-not-running": entry("The run
|
|
227
|
+
"connection-exists": entry("The organisation already has a live connection for this stack and company.", { option: "List the connections.", read: "listConnections" }),
|
|
228
|
+
"run-not-running": entry("The run is missing, not running, or belongs to someone else.", { option: "List the connection's runs.", read: "listImportRuns" }),
|
|
199
229
|
"connection-revoked": entry("The connection is revoked, so it takes no further change or run."),
|
|
200
230
|
"credential-not-valid": entry("The upstream system did not accept the credential, and nothing was stored.", { option: "Check the credential and send it again." }),
|
|
201
|
-
"types-not-approved": entry("This connector's types
|
|
202
|
-
"connector-template-missing": entry("This deployment holds no type template for the connector's system.")
|
|
231
|
+
"types-not-approved": entry("This connector's types are not approved for this system and template version; a person who holds the permission to administer types in the organisation accepts them.", { option: "Ask such a person to review and accept the connector's change set.", read: "readCurrentChangeSet" }),
|
|
232
|
+
"connector-template-missing": entry("This deployment holds no type template for the connector's system."),
|
|
233
|
+
"step-up-required": entry("This operation needs the person's own confirmation and none stands for this request. Where the refusal carries a pending request, the request now awaits that confirmation.", { option: "Have the person confirm the pending request, then send the same request again with the same key and the proof." }),
|
|
234
|
+
"step-up-mismatch": entry("The confirmation presented was given for another request or another person, or for a request that differs in its target, key or body.", { option: "Send the request again without the confirmation to start a new one." }),
|
|
235
|
+
"step-up-capacity": entry("The person already has the most confirmations waiting that the platform allows.", { option: "Confirm the waiting requests, or wait for them to lapse, then send the request again." })
|
|
203
236
|
};
|
|
204
237
|
var KIND_ENTRIES = {
|
|
205
238
|
unauthenticated: entry("The request carried no sign-in it can use: none, or an invalid or expired one.", { option: "Sign in and send the request again." }),
|
|
206
239
|
"not-found": entry("What the request names does not exist, or you may not reach it; the answer is the same either way.", { option: "Check the identifiers; list what you may read.", read: "listProjects" }, { option: "If the request names a verb, list the verbs available for the object.", read: "discoverVerbs" }),
|
|
207
|
-
"session-moved": entry("Your sign-in
|
|
240
|
+
"session-moved": entry("Your sign-in moved to another organisation or was detached after this token was issued.", { option: "Sign in again and attach the organisation you want." }),
|
|
208
241
|
"not-attached": entry("Your sign-in is attached to no organisation, and this request acts inside one.", { option: "Attach your sign-in to an organisation, then send the request again." }),
|
|
209
242
|
"invalid-request": entry("The request is not in the shape the call takes.", FIX_REQUEST),
|
|
210
243
|
"bound-exceeded": entry("The request went past a limit the platform sets.", { option: "Make the request smaller, or wait before sending the next." }),
|
|
211
244
|
"in-flight": entry("A request with this key is still being handled.", { option: "Wait, then send the same request with the same key again." }),
|
|
212
245
|
internal: entry("The platform failed while handling the request.", { option: "Send the request again later, and give support the reference code the refusal carries if it persists." }),
|
|
213
|
-
"protocol-mismatch": entry("
|
|
246
|
+
"protocol-mismatch": entry("The version header is missing, repeated, malformed or does not match the platform.", { option: "Send one valid version header or update the client." }),
|
|
214
247
|
"unknown-outcome": entry("The platform cannot tell whether the operation took effect.", { option: "Read the state the operation changes before sending it again; the refusal's reference code names the attempt." })
|
|
215
248
|
};
|
|
216
249
|
var CLASS_ENTRIES = {
|
|
@@ -229,7 +262,7 @@ var API_RULE_ENTRIES = {
|
|
|
229
262
|
"branch-needs-schema-update": RULE_ENTRIES["branch-needs-schema-update"],
|
|
230
263
|
conflict: entry("A property's current value differs from the 'from' value the request expected; the refusal names each such property and its current value.", { option: "Read the current properties, reconcile the changes and send the update again with the from values you now expect." }),
|
|
231
264
|
"unknown-type": entry("The requested type is not a current object or edge type in this namespace.", { option: "Read the current types and use an object or edge type they contain.", read: "readCatalogue" }, { option: "If looking for a verb, list the verbs available for the object.", read: "discoverVerbs" }),
|
|
232
|
-
"unknown-verb": entry("
|
|
265
|
+
"unknown-verb": entry("There is no current verb with that name.", { option: "List the verbs available for the object.", read: "discoverVerbs" }),
|
|
233
266
|
"type-version-precondition": entry("The type version the request expected differs from the type's current version.", { option: "Read the type's current version and send the request with that version." }),
|
|
234
267
|
"invalid-properties": entry("The property document failed validation; the violations name each offending path and rule.", { option: "Correct the properties at the paths the violations name and send the request again." }),
|
|
235
268
|
"blocked-by-edge": entry("The object has a link you may not remove, so nothing was deleted.", { option: "Remove that link first, or ask someone who may to remove it." }),
|
|
@@ -281,6 +314,31 @@ var API_REFUSAL_RULES = Object.freeze([
|
|
|
281
314
|
var SHIM_COLLIDING_API_RULES = Object.freeze(["write-refused"]);
|
|
282
315
|
|
|
283
316
|
// packages/api-contract/dist/route-docs.js
|
|
317
|
+
var ACTOR_LABELS = Object.freeze({
|
|
318
|
+
person: "person",
|
|
319
|
+
"agent:explore": "agent:explore",
|
|
320
|
+
"agent:apply": "agent:apply",
|
|
321
|
+
"agent:types": "agent:types",
|
|
322
|
+
"app:client": "app:client",
|
|
323
|
+
"app:hosted": "app:hosted",
|
|
324
|
+
service: "service"
|
|
325
|
+
});
|
|
326
|
+
var STEP_UP_LABELS = Object.freeze({ none: "none", "person-present": "person-present" });
|
|
327
|
+
var PREDICATE_LABELS = Object.freeze({
|
|
328
|
+
unlocks: 'person-present when unlocks (lock is "none")'
|
|
329
|
+
});
|
|
330
|
+
function stepUpLabel(stepUp) {
|
|
331
|
+
return typeof stepUp === "string" ? STEP_UP_LABELS[stepUp] : PREDICATE_LABELS[stepUp.personPresentWhen];
|
|
332
|
+
}
|
|
333
|
+
function routePolicyDoc(policy) {
|
|
334
|
+
if ("none" in policy)
|
|
335
|
+
return Object.freeze({ actors: "none", stepUp: "none" });
|
|
336
|
+
const entries7 = Object.entries(policy.actors);
|
|
337
|
+
return Object.freeze({
|
|
338
|
+
actors: entries7.map(([actor]) => ACTOR_LABELS[actor]).join(", "),
|
|
339
|
+
stepUp: entries7.map(([actor, stepUp]) => `${ACTOR_LABELS[actor]}: ${stepUpLabel(stepUp)}`).join("; ")
|
|
340
|
+
});
|
|
341
|
+
}
|
|
284
342
|
function need(capability, scope) {
|
|
285
343
|
return Object.freeze({ capability, scope });
|
|
286
344
|
}
|
|
@@ -288,9 +346,11 @@ var PROTECTION_ROUTE_CAPABILITIES = Object.freeze({
|
|
|
288
346
|
addRefRule: Object.freeze([need("administer projects", "project")]),
|
|
289
347
|
listRefRules: Object.freeze([need("read", "project")]),
|
|
290
348
|
removeRefRule: Object.freeze([need("administer projects", "project")]),
|
|
349
|
+
updateRefRule: Object.freeze([need("administer projects", "project")]),
|
|
291
350
|
addOrganisationRule: Object.freeze([need("administer projects", "organisation")]),
|
|
292
351
|
listOrganisationRules: Object.freeze([need("read", "organisation")]),
|
|
293
352
|
removeOrganisationRule: Object.freeze([need("administer projects", "organisation")]),
|
|
353
|
+
updateOrganisationRule: Object.freeze([need("administer projects", "organisation")]),
|
|
294
354
|
createOrganisationRef: Object.freeze([need("administer projects", "organisation")]),
|
|
295
355
|
listOrganisationRefs: Object.freeze([need("read", "organisation")]),
|
|
296
356
|
deleteOrganisationRef: Object.freeze([need("administer projects", "organisation")]),
|
|
@@ -350,6 +410,8 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
350
410
|
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"]),
|
|
351
411
|
deleteObjectSet: doc("Deletes a saved set and every member at the expected revision.", [...SCOPED, "stale-revision"]),
|
|
352
412
|
health: doc("Answers whether the host is running.", PUBLIC),
|
|
413
|
+
webSignInStart: doc("Starts a confidential web sign-in with HTTP Basic authentication.", [...PUBLIC, "unauthenticated"]),
|
|
414
|
+
webRedeem: doc("Redeems only a web-purpose handoff with HTTP Basic authentication.", [...PUBLIC, "unauthenticated"]),
|
|
353
415
|
signInStart: doc("Starts a sign-in with the identity provider and redirects the browser to it.", PUBLIC),
|
|
354
416
|
signInCallback: doc("Receives the identity provider's answer and returns a one-time code for the client.", [...PUBLIC, "kind", "lifecycle", "invitation", "token-shape", "signature", "issuer", "audience", "expiry", "algorithm", "claims"]),
|
|
355
417
|
redeem: doc("Exchanges a one-time sign-in code for the session's access and refresh tokens.", [...PUBLIC, "unauthenticated"]),
|
|
@@ -367,8 +429,13 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
367
429
|
decideConsent: doc("Approves or denies a pending authorization request.", SCOPED),
|
|
368
430
|
listConnectedApps: doc("Lists the applications the caller has connected.", SIGNED_IN),
|
|
369
431
|
revokeConnectedApp: doc("Disconnects an application: every grant the caller holds for it stops.", SCOPED),
|
|
370
|
-
|
|
371
|
-
|
|
432
|
+
readStepUpRequest: doc("Reads the person's pending request, body digest, secret-free summary and requesting actor facts. It explains human-mode duration and unknown-session classification. No organisation attachment is required.", [...SCOPED, "session-moved"]),
|
|
433
|
+
confirmStepUp: doc("Confirms the person's pending request from a live web session and answers an empty acknowledgement. Only the requesting actor's separate proof poll releases a proof.", [...SCOPED, "session-moved"]),
|
|
434
|
+
enterHumanMode: doc("Switches the presenting CLI session to human mode after one web confirmation. Already-human sessions return their current state without another write; web sessions are refused. CLI: openeng session human prints the confirm address, polls and retries once with unchanged bytes and key, then prints the stored state. Human mode lasts for this session; a new CLI sign-in starts in agent mode.", SIGNED_IN),
|
|
435
|
+
readSessionStatus: doc("Reads the presenting person's stored session channel, mode and sign-in time, without organisation attachment. CLI: openeng session status prints { channel, mode, issuedAt } under --json; it never reads a local mode.", SIGNED_IN),
|
|
436
|
+
readStepUpProof: doc("Polls as the requesting person session or run. Only that actor receives a confirmed live proof. Without an eligible confirmation it answers awaiting. No organisation attachment is required.", SIGNED_IN),
|
|
437
|
+
stageAttachment: doc("Stages attachment bytes for an existing object after its guard admits the caller on the selected ref. Admits person, service, app:client and agent:apply actors.", [...ATTACHMENT_SCOPED, "not-permitted", "frozen", "protected", "unsupported-content", "too-large"]),
|
|
438
|
+
readAttachment: doc("Downloads the attachment held by an object's property at its stored type version. 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"]),
|
|
372
439
|
readObject: doc("Reads one object at a branch or baseline.", REF_READ),
|
|
373
440
|
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}`, [
|
|
374
441
|
...REF_READ,
|
|
@@ -385,7 +452,7 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
385
452
|
discoverVerbs: doc("Lists the verbs an object may be given.", REF_READ),
|
|
386
453
|
readHistory: doc("Reads one object's history of changes.", [...REF_READ, "invalid-continuation", "stale-continuation", "malformed-history-request"]),
|
|
387
454
|
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 `{"absent": true}` clears the property.', [...OBJECT_WRITE, "plan-closed"]),
|
|
388
|
-
mutateBatch: doc('Applies a list of object and edge operations
|
|
455
|
+
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 `{"absent": true}` clears the property.', [...OBJECT_WRITE, "plan-closed"]),
|
|
389
456
|
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"]),
|
|
390
457
|
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),
|
|
391
458
|
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"]),
|
|
@@ -422,14 +489,33 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
422
489
|
"lock-unavailable",
|
|
423
490
|
"not-a-ref-head"
|
|
424
491
|
]),
|
|
425
|
-
merge: doc("Merges a reviewed head of a project branch or an organisation branch or baseline source into main, or into the writable branch the optional target names; absent target means main. For a proposal, send
|
|
492
|
+
merge: doc("Merges a reviewed head of a project branch or an organisation branch or baseline source into main, or into the writable branch the optional target names; absent target means main. For a proposal, send the source branch's current head as sourceHash. Success closes only that source ref's pending proposal for this target. Matching rules may require a proposal and current approvals unless bypassed; approvals-required carries approvals.counted and approvals.required for the subject project. A merge that changes rows a rule protects in another project the caller writes is refused protected, with protection naming the patterns. With no matching rule, writers of every affected project can merge, including Contributors. A merge names exactly one of name and source. name is checked against the source branch's bound head and is refused stale-source when it differs.", [
|
|
493
|
+
...REF_WRITE,
|
|
494
|
+
"read-only-ref",
|
|
495
|
+
"concurrent-change",
|
|
496
|
+
"lock-unavailable",
|
|
497
|
+
"not-a-ref-head",
|
|
498
|
+
"stale-source",
|
|
499
|
+
"protected",
|
|
500
|
+
"proposal-required",
|
|
501
|
+
"approvals-required",
|
|
502
|
+
"token-kind-not-admitted"
|
|
503
|
+
]),
|
|
426
504
|
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),
|
|
427
|
-
disposeRef: doc("Disposes a branch
|
|
505
|
+
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.", [
|
|
506
|
+
...WRITE,
|
|
507
|
+
"concurrent-change",
|
|
508
|
+
"lock-unavailable",
|
|
509
|
+
"deletion-restricted",
|
|
510
|
+
"bypass-required",
|
|
511
|
+
"token-kind-not-admitted",
|
|
512
|
+
"ref-has-drafts"
|
|
513
|
+
]),
|
|
428
514
|
listProjects: doc("Lists every project the caller may read in the organisation the session is attached to, with its namespace.", SIGNED_IN),
|
|
429
|
-
listRefs: doc("Lists the branches of a project, each with its head: readable with a hash, withheld when the caller may not read the branch, or unread
|
|
515
|
+
listRefs: doc("Lists the branches of a project, each with its head: readable with a hash, withheld when the caller may not read the branch, or unread after the first 50 refs, including main (so at most 49 branch heads are read). Each row also carries a schema state as a convenience hint; the branch-needs-schema-update refusal on use remains the guard.", [...SCOPED, "organisation-not-ready"]),
|
|
430
516
|
readCatalogue: doc("Reads the published catalogue of a project's namespace.", SCOPED),
|
|
431
517
|
readPendingProposal: doc("Reads the proposal waiting for review on a branch, if any.", SCOPED),
|
|
432
|
-
submitProposal: doc("Submits a branch for review.", [...REF_READ, "proposal-open", "no-commits"]),
|
|
518
|
+
submitProposal: doc("Submits a branch for review. Optional target names main, a writable organisation ref or a project branch; it defaults to main. An apply run that names any ref other than its plan's is refused write-refused.", [...REF_READ, "proposal-open", "no-commits", "invalid-proposal-target"]),
|
|
433
519
|
createServiceIdentity: doc("Creates a service identity in an organisation.", [...SIGNED_IN, "not-permitted", "capability-missing", "duplicate-name"]),
|
|
434
520
|
revokeServiceIdentity: doc("Revokes a service identity.", [...SIGNED_IN, "not-permitted", "service_identity.revoke"]),
|
|
435
521
|
issueServiceCredential: doc("Issues a credential for a service identity.", [...SIGNED_IN, "not-permitted", "capability-missing"]),
|
|
@@ -442,15 +528,24 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
442
528
|
readAccount: doc("Reads the caller's own principal identifier, display name and registered email.", SIGNED_IN),
|
|
443
529
|
readDisplayNames: doc("Reads the display names of principals the caller may see.", SIGNED_IN),
|
|
444
530
|
listMembers: doc("Lists the members of a project.", SCOPED),
|
|
445
|
-
changeMembershipRole: doc("Changes a principal's role in a scope
|
|
531
|
+
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"]),
|
|
446
532
|
listOrganisationMembers: doc("Lists the memberships of the caller's organisation and of the projects of it the caller may read.", SCOPED),
|
|
447
|
-
searchPeople: doc("Finds
|
|
533
|
+
searchPeople: doc("Finds people in the caller's organisation when every query word starts a word of their name.", [...SIGNED_IN, "invalid-query"]),
|
|
448
534
|
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"]),
|
|
449
535
|
listSubscribers: doc("Lists the subscriptions on an object.", REF_READ),
|
|
450
536
|
addSubscriber: doc("Adds a person to an object's subscriptions as owner, approver or watcher, when the type's `subscriptionRoles` admits that role. The declaration may set maxima; owner is limited to one. With no declaration, only watchers are admitted.", [...REF_READ, "limit-reached", "role-not-admitted", "unknown-person", "not-permitted", "invalid-ref"]),
|
|
451
537
|
removeSubscriber: doc("Removes a person's subscription to an object in a role.", [...REF_READ, "subscription-absent", "not-permitted", "invalid-ref"]),
|
|
452
538
|
listComments: doc("Lists the comments on an object, oldest first, a page at a time.", [...REF_READ, "invalid-query"]),
|
|
453
|
-
|
|
539
|
+
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"]),
|
|
540
|
+
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.", [...REF_WRITE, "ref-not-found", "frozen", "protected", "draft-lock-lost", "draft-changed", "unknown-block", "body-not-declared", "body-too-large"]),
|
|
541
|
+
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.", [...REF_WRITE, "ref-not-found", "frozen", "protected", "draft-lock-lost", "draft-not-flushed", "body-changed", "body-not-declared", "body-too-large"]),
|
|
542
|
+
releaseDraft: doc("Releases an unchanged draft.", [...REF_WRITE, "ref-not-found", "draft-lock-lost", "draft-changed"]),
|
|
543
|
+
discardDraft: doc("Discards the holder\u2019s draft.", [...REF_WRITE, "ref-not-found", "draft-lock-lost"]),
|
|
544
|
+
breakDraftLock: doc("Breaks a draft lock as a project administrator; person-only objects.draftAdmin capability.", [...REF_WRITE, "ref-not-found"]),
|
|
545
|
+
readDraftLock: doc("Reads only the holder name and lock expiry.", [...REF_READ, "ref-not-found"]),
|
|
546
|
+
restoreDraft: doc("Restores a saved draft onto a new branch using its saved body; person-only objects.draftAdmin capability.", [...REF_WRITE, "plan-closed", "ref-exists", "read-only-ref", "concurrent-change", "lock-unavailable", "ref-not-found", "frozen", "protected", "not-a-saver", "draft-locked", "draft-changed", "object-not-found", "body-not-declared"]),
|
|
547
|
+
setCommentResolved: doc("Resolves or reopens a comment.", WRITE),
|
|
548
|
+
addComment: doc("Adds a comment to an object, naming the people it mentions and optionally anchoring a quoted block.", [...REF_WRITE, "invalid-body", "invalid-mention", "unknown-person", "invalid-ref", "anchor-invalid"]),
|
|
454
549
|
listServiceIdentities: doc("Lists the service identities of the caller's organisation, for a caller who administers them.", SCOPED),
|
|
455
550
|
createInvitation: doc("Invites an address in an organisation role with up to 50 optional projectRoles, each a projectId and roleKey. Every project must belong to the invitation's organisation. The caller must administer members there and on each project. An unknown role answers unknown-role with the deployment's roleKeys; a known role above the caller's answers above-caller-role.", [
|
|
456
551
|
...SIGNED_IN,
|
|
@@ -472,7 +567,7 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
472
567
|
reissuePlatformInvitation: doc("Replaces the code and the expiry of a pending platform invitation and answers the new link, for a platform administrator.", [...SIGNED_IN, "capability-missing", "no-such-invitation", "invitation-not-pending"]),
|
|
473
568
|
readWebOrigin: doc("Reads the origin of the deployment's web application, or null when the host is given none.", SIGNED_IN),
|
|
474
569
|
readCallerCapabilities: doc("Lists the capabilities the caller holds in the token's organisation and its projects, and the platform capability for a platform administrator.", [...SIGNED_IN]),
|
|
475
|
-
queryGraph: doc(`Walks the edges from a start of addresses or an object set, and answers the objects reached with every hop among them. Example: one start address and one hop step of depth 1 reads that object's connections, with a marker for each kind of connection whose far object the caller cannot read. A start takes at most 200 addresses or set members; a walk takes at most 3 steps and 3 total levels. An explicit edgeTypeKeys list holds at most 8 edge types per step; when edgeTypeKeys is absent, the step traverses every edge type. objectLimit is at most 200 and hopLimit at most 400. A continuation reads the next page in the one-object form. For an object-set start, omitting input.start.set.projects 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.start.set.`, [...REF_READ, "malformed-query", "over-bound", "text-search-unavailable", "search-too-wide", "invalid-continuation", "stale-continuation", "head-moved"]),
|
|
570
|
+
queryGraph: doc(`Walks the edges from a start of addresses or an object set, and answers the objects reached with every hop among them. Hops follow closeOver or the step's edge types, up to hopLimit. Example: one start address and one hop step of depth 1 reads that object's connections, with a marker for each kind of connection whose far object the caller cannot read. A start takes at most 200 addresses or set members; a walk takes at most 3 steps and 3 total levels. An explicit edgeTypeKeys list holds at most 8 edge types per step; when edgeTypeKeys is absent, the step traverses every edge type. objectLimit is at most 200 and hopLimit at most 400. A continuation reads the next page in the one-object form. For an object-set start, omitting input.start.set.projects 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.start.set.`, [...REF_READ, "malformed-query", "over-bound", "text-search-unavailable", "search-too-wide", "invalid-continuation", "stale-continuation", "head-moved"]),
|
|
476
571
|
readStructure: doc("Reads the structure of a type's objects as a tree: every root, one object's subtree or one object's ancestors, each placement an occurrence. Example: a forest anchor with maxDepth 1 reads its roots and their children. maxDepth is at most 32 and occurrenceLimit at most 2000. The answer reports whether it is complete or bounded, and a bounded answer says whether the limit was occurrences, depth or level rows; the route does not page. Narrow the walk with maxDepth and occurrenceLimit. A chosen relationship or one-step view places the type itself, and the types above it follow their own declared relationships.", [
|
|
477
572
|
...REF_READ,
|
|
478
573
|
"malformed-query",
|
|
@@ -480,41 +575,44 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
480
575
|
"over-bound",
|
|
481
576
|
"head-moved"
|
|
482
577
|
]),
|
|
483
|
-
findPaths: doc("Finds
|
|
578
|
+
findPaths: doc("Finds shortest paths between two objects within a length, up to maxPaths; the answer may be bounded.", [...REF_READ, "malformed-query", "over-bound", "head-moved"]),
|
|
484
579
|
listProposals: doc("Lists the proposals of a project.", SCOPED),
|
|
485
580
|
readProposal: doc("Reads one proposal.", SCOPED),
|
|
486
581
|
refuseProposal: doc("Refuses a proposal and returns its branch to its author.", [...SCOPED, "proposal-not-pending"]),
|
|
487
|
-
|
|
582
|
+
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"]),
|
|
583
|
+
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),
|
|
488
584
|
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"]),
|
|
489
|
-
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,
|
|
585
|
+
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"]),
|
|
490
586
|
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"]),
|
|
491
587
|
diffBranches: doc("Reads the objects and edges one branch or baseline changes against another.", REF_READ),
|
|
492
588
|
readBranchHistory: doc("Reads a branch's history of commits.", [...SCOPED, "invalid-continuation", "stale-continuation", "malformed-history-request"]),
|
|
493
589
|
listAudit: doc("Lists the audit records of a project.", [...SCOPED, "invalid-continuation"]),
|
|
494
590
|
listOrganisationAudit: doc("Lists the organisation-level actions the caller may read.", [...SCOPED, "invalid-continuation"]),
|
|
495
591
|
readRefHead: doc("Reads the head of a branch or baseline.", REF_READ),
|
|
496
|
-
inspectBranchOperation: doc("Reads the
|
|
592
|
+
inspectBranchOperation: doc("Reads any branch operation record the caller may read; only the caller that started it may settle it.", SCOPED),
|
|
497
593
|
abandonBranch: doc("Refuses branch abandonment because this operation is not available in this release.", [
|
|
498
594
|
...WRITE,
|
|
499
595
|
"not-in-this-release"
|
|
500
596
|
]),
|
|
501
|
-
addRefRule: doc("Adds
|
|
502
|
-
listRefRules: doc("Lists
|
|
503
|
-
removeRefRule: doc("Removes
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
597
|
+
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. A repeated add returns the existing rule.", [...SCOPED, "invalid-rule-pattern", "invalid-rule-setting", "unknown-rule-member"]),
|
|
598
|
+
listRefRules: doc("Lists the selected project's visible rules with each identifier, extent and pattern, and every setting and member list.", SCOPED),
|
|
599
|
+
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),
|
|
600
|
+
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"]),
|
|
601
|
+
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. A repeated add returns the existing rule.", [...SCOPED, "invalid-rule-pattern", "invalid-rule-setting", "unknown-rule-member"]),
|
|
602
|
+
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),
|
|
603
|
+
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),
|
|
604
|
+
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"]),
|
|
507
605
|
createOrganisationRef: doc("Creates a branch or baseline at the organisation's trunk head and answers its name, readOnly and creation attribution. The optional readOnly flag defaults to false; the name is one non-reserved name segment.", [...WRITE, "ref-exists", "read-only-ref", "organisation-not-ready"]),
|
|
508
|
-
listOrganisationRefs: doc("Lists
|
|
606
|
+
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),
|
|
509
607
|
deleteOrganisationRef: doc("Deletes a writable branch from the attached organisation and answers its name. A baseline cannot be deleted.", [...REF_WRITE, "read-only-ref"]),
|
|
510
|
-
markOrganisationRefReadOnly: doc("Marks an organisation branch read-only as a baseline and answers its full record. An absent
|
|
608
|
+
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),
|
|
511
609
|
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"]),
|
|
512
610
|
readAgentCeiling: doc("Reads the selected project's maximum agent role as { ceiling }: contributor or maintainer. An absent or unreadable project answers not-found.", SCOPED),
|
|
513
611
|
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),
|
|
514
|
-
requestSchemaUpdate: doc("Records a schema update request for a project branch or organisation branch or baseline and answers its state and attribution.
|
|
515
|
-
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.
|
|
612
|
+
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),
|
|
613
|
+
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),
|
|
516
614
|
openAgentSession: doc("Opens an agent session on a project.", [...SCOPED, "invalid-configuration"]),
|
|
517
|
-
listAgentSessions: doc("Lists the
|
|
615
|
+
listAgentSessions: doc("Lists every session of the selected agent in the project.", SCOPED),
|
|
518
616
|
readAgentSession: doc("Reads one agent session and its runs.", SCOPED),
|
|
519
617
|
sendMessage: doc("Sends a message to an agent session and starts a run.", [...SCOPED, "run-in-flight", "invalid-configuration", "model-not-configured"]),
|
|
520
618
|
answerPlan: doc("Answers the plan a run proposed.", [...SCOPED, "plan-not-proposed", "plan-answered", "plan-superseded", "plan-closed"]),
|
|
@@ -592,6 +690,8 @@ var SCHEMAS = {
|
|
|
592
690
|
updateObjectSet: { "type": "object", "properties": { "setId": { "type": "string" }, "revision": { "type": "number" }, "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 },
|
|
593
691
|
deleteObjectSet: { "type": "object", "properties": { "setId": { "type": "string" }, "revision": { "type": "number" } }, "required": ["setId", "revision"], "additionalProperties": false },
|
|
594
692
|
health: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
693
|
+
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 },
|
|
694
|
+
webRedeem: { "type": "object", "properties": { "code": { "type": "string" }, "state": { "type": "string" }, "code_verifier": { "type": "string" }, "invitation_code": { "type": "string" } }, "required": ["code", "state", "code_verifier"], "additionalProperties": false },
|
|
595
695
|
signInStart: { "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 },
|
|
596
696
|
signInCallback: { "oneOf": [{ "type": "object", "properties": { "state": { "type": "string" }, "code": { "type": "string" } }, "required": ["state", "code"], "additionalProperties": false }, { "type": "object", "properties": { "state": { "type": "string" }, "error": { "type": "string" } }, "required": ["state", "error"], "additionalProperties": false }] },
|
|
597
697
|
redeem: { "type": "object", "properties": { "code": { "type": "string" }, "state": { "type": "string" }, "code_verifier": { "type": "string" }, "invitation_code": { "type": "string" } }, "required": ["code", "state", "code_verifier"], "additionalProperties": false },
|
|
@@ -609,6 +709,11 @@ var SCHEMAS = {
|
|
|
609
709
|
decideConsent: { "oneOf": [{ "type": "object", "properties": { "interactionId": { "type": "string" }, "decision": { "const": "approve" }, "approvedScopes": { "type": "array", "items": { "enum": ["objects.read", "objects.write", "branches.read", "branches.write", "branches.manage", "offline_access"] } } }, "required": ["interactionId", "decision", "approvedScopes"], "additionalProperties": false }, { "type": "object", "properties": { "interactionId": { "type": "string" }, "decision": { "const": "deny" } }, "required": ["interactionId", "decision"], "additionalProperties": false }] },
|
|
610
710
|
listConnectedApps: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
611
711
|
revokeConnectedApp: { "type": "object", "properties": { "clientId": { "type": "string" } }, "required": ["clientId"], "additionalProperties": false },
|
|
712
|
+
readStepUpRequest: { "type": "object", "properties": { "pendingId": { "type": "string" } }, "required": ["pendingId"], "additionalProperties": false },
|
|
713
|
+
confirmStepUp: { "type": "object", "properties": { "pendingId": { "type": "string" } }, "required": ["pendingId"], "additionalProperties": false },
|
|
714
|
+
enterHumanMode: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
715
|
+
readSessionStatus: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
716
|
+
readStepUpProof: { "type": "object", "properties": { "pendingId": { "type": "string" } }, "required": ["pendingId"], "additionalProperties": false },
|
|
612
717
|
readAttachment: {
|
|
613
718
|
"type": "object",
|
|
614
719
|
"properties": {
|
|
@@ -639,12 +744,12 @@ var SCHEMAS = {
|
|
|
639
744
|
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": { "ref": { "type": "string" } }, "required": ["ref"], "additionalProperties": false }, { "type": "object", "properties": { "hash": { "type": "string" } }, "required": ["hash"], "additionalProperties": false }] } }, "required": ["correlation", "name"], "additionalProperties": false },
|
|
640
745
|
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 },
|
|
641
746
|
readMergeConflicts: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
|
|
642
|
-
disposeRef: { "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" }, "atHash": { "type": "string" } }, "required": ["correlation", "name", "atHash"], "additionalProperties": false },
|
|
747
|
+
disposeRef: { "type": "object", "properties": { "deleteDrafts": { "type": "boolean" }, "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" }, "atHash": { "type": "string" } }, "required": ["correlation", "name", "atHash"], "additionalProperties": false },
|
|
643
748
|
listProjects: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
644
749
|
listRefs: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
645
750
|
readCatalogue: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
646
751
|
readPendingProposal: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
|
|
647
|
-
submitProposal: { "type": "object", "properties": { "name": { "type": "string" }, "title": { "type": "string" }, "summary": { "type": "string" } }, "required": ["name", "title", "summary"], "additionalProperties": false },
|
|
752
|
+
submitProposal: { "type": "object", "properties": { "name": { "type": "string" }, "title": { "type": "string" }, "summary": { "type": "string" }, "target": { "type": "string" } }, "required": ["name", "title", "summary"], "additionalProperties": false },
|
|
648
753
|
createServiceIdentity: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
|
|
649
754
|
revokeServiceIdentity: { "type": "object", "properties": { "principalId": { "type": "string" } }, "required": ["principalId"], "additionalProperties": false },
|
|
650
755
|
issueServiceCredential: { "type": "object", "properties": { "principalId": { "type": "string" } }, "required": ["principalId"], "additionalProperties": false },
|
|
@@ -678,6 +783,7 @@ var SCHEMAS = {
|
|
|
678
783
|
listProposals: { "type": "object", "properties": { "state": { "enum": ["pending", "merged", "refused", "discarded", "all"] }, "cursor": { "type": "string" } }, "required": ["state"], "additionalProperties": false },
|
|
679
784
|
readProposal: { "type": "object", "properties": { "proposalId": { "type": "string" } }, "required": ["proposalId"], "additionalProperties": false },
|
|
680
785
|
refuseProposal: { "type": "object", "properties": { "proposalId": { "type": "string" }, "reason": { "type": "string" } }, "required": ["proposalId", "reason"], "additionalProperties": false },
|
|
786
|
+
approveProposal: { "type": "object", "properties": { "proposalId": { "type": "string" }, "headHash": { "type": "string" } }, "required": ["proposalId", "headHash"], "additionalProperties": false },
|
|
681
787
|
readBranchDiff: { "type": "object", "properties": { "proposalId": { "type": "string" }, "cursor": { "type": "string" } }, "required": ["proposalId"], "additionalProperties": false },
|
|
682
788
|
readLinkStatus: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
683
789
|
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 },
|
|
@@ -689,12 +795,14 @@ var SCHEMAS = {
|
|
|
689
795
|
readRefHead: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
|
|
690
796
|
inspectBranchOperation: { "type": "object", "properties": { "correlationId": { "type": "string" } }, "required": ["correlationId"], "additionalProperties": false },
|
|
691
797
|
abandonBranch: { "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" }, "atHash": { "type": "string" } }, "required": ["correlation", "name", "atHash"], "additionalProperties": false },
|
|
692
|
-
addRefRule: { "type": "object", "properties": { "pattern": { "type": "string" }, "consequence": { "enum": ["merge-only", "locked-rows-only"] } }, "required": ["
|
|
798
|
+
addRefRule: { "type": "object", "properties": { "extent": { "enum": ["ref", "rows"] }, "pattern": { "type": "string" }, "settings": { "type": "object", "properties": { "consequence": { "enum": ["open", "merge-only", "locked-rows-only"] }, "requireProposal": { "type": "boolean" }, "requiredApprovals": { "type": "number" }, "approverMinRole": { "oneOf": [{ "const": "contributor" }, { "const": "maintainer" }, { "const": "owner" }, { "type": "null" }] }, "restrictDeletions": { "type": "boolean" }, "approvers": { "type": "array", "items": { "type": "string" } }, "bypass": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "role" }, "roleKey": { "enum": ["contributor", "maintainer", "owner"] } }, "required": ["kind", "roleKey"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "person" }, "personId": { "type": "string" } }, "required": ["kind", "personId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "service" }, "serviceIdentityId": { "type": "string" } }, "required": ["kind", "serviceIdentityId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "client" }, "clientId": { "type": "string" } }, "required": ["kind", "clientId"], "additionalProperties": false }] } } }, "required": [], "additionalProperties": false } }, "required": ["extent", "pattern"], "additionalProperties": false },
|
|
693
799
|
listRefRules: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
694
800
|
removeRefRule: { "type": "object", "properties": { "ruleId": { "type": "string" } }, "required": ["ruleId"], "additionalProperties": false },
|
|
695
|
-
|
|
801
|
+
updateRefRule: { "type": "object", "properties": { "ruleId": { "type": "string" }, "settings": { "type": "object", "properties": { "consequence": { "enum": ["open", "merge-only", "locked-rows-only"] }, "requireProposal": { "type": "boolean" }, "requiredApprovals": { "type": "number" }, "approverMinRole": { "oneOf": [{ "const": "contributor" }, { "const": "maintainer" }, { "const": "owner" }, { "type": "null" }] }, "restrictDeletions": { "type": "boolean" }, "approvers": { "type": "array", "items": { "type": "string" } }, "bypass": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "role" }, "roleKey": { "enum": ["contributor", "maintainer", "owner"] } }, "required": ["kind", "roleKey"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "person" }, "personId": { "type": "string" } }, "required": ["kind", "personId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "service" }, "serviceIdentityId": { "type": "string" } }, "required": ["kind", "serviceIdentityId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "client" }, "clientId": { "type": "string" } }, "required": ["kind", "clientId"], "additionalProperties": false }] } } }, "required": [], "additionalProperties": false } }, "required": ["ruleId", "settings"], "additionalProperties": false },
|
|
802
|
+
addOrganisationRule: { "type": "object", "properties": { "extent": { "enum": ["ref", "rows"] }, "pattern": { "type": "string" }, "settings": { "type": "object", "properties": { "consequence": { "enum": ["open", "merge-only", "locked-rows-only"] }, "requireProposal": { "type": "boolean" }, "requiredApprovals": { "type": "number" }, "approverMinRole": { "oneOf": [{ "const": "contributor" }, { "const": "maintainer" }, { "const": "owner" }, { "type": "null" }] }, "restrictDeletions": { "type": "boolean" }, "approvers": { "type": "array", "items": { "type": "string" } }, "bypass": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "role" }, "roleKey": { "enum": ["contributor", "maintainer", "owner"] } }, "required": ["kind", "roleKey"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "person" }, "personId": { "type": "string" } }, "required": ["kind", "personId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "service" }, "serviceIdentityId": { "type": "string" } }, "required": ["kind", "serviceIdentityId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "client" }, "clientId": { "type": "string" } }, "required": ["kind", "clientId"], "additionalProperties": false }] } } }, "required": [], "additionalProperties": false } }, "required": ["extent", "pattern"], "additionalProperties": false },
|
|
696
803
|
listOrganisationRules: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
697
804
|
removeOrganisationRule: { "type": "object", "properties": { "ruleId": { "type": "string" } }, "required": ["ruleId"], "additionalProperties": false },
|
|
805
|
+
updateOrganisationRule: { "type": "object", "properties": { "ruleId": { "type": "string" }, "settings": { "type": "object", "properties": { "consequence": { "enum": ["open", "merge-only", "locked-rows-only"] }, "requireProposal": { "type": "boolean" }, "requiredApprovals": { "type": "number" }, "approverMinRole": { "oneOf": [{ "const": "contributor" }, { "const": "maintainer" }, { "const": "owner" }, { "type": "null" }] }, "restrictDeletions": { "type": "boolean" }, "approvers": { "type": "array", "items": { "type": "string" } }, "bypass": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "role" }, "roleKey": { "enum": ["contributor", "maintainer", "owner"] } }, "required": ["kind", "roleKey"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "person" }, "personId": { "type": "string" } }, "required": ["kind", "personId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "service" }, "serviceIdentityId": { "type": "string" } }, "required": ["kind", "serviceIdentityId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "client" }, "clientId": { "type": "string" } }, "required": ["kind", "clientId"], "additionalProperties": false }] } } }, "required": [], "additionalProperties": false } }, "required": ["ruleId", "settings"], "additionalProperties": false },
|
|
698
806
|
createOrganisationRef: { "type": "object", "properties": { "name": { "type": "string" }, "readOnly": { "type": "boolean" } }, "required": ["name"], "additionalProperties": false },
|
|
699
807
|
listOrganisationRefs: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
700
808
|
deleteOrganisationRef: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
|
|
@@ -719,7 +827,7 @@ var SCHEMAS = {
|
|
|
719
827
|
readCurrentChangeSet: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
720
828
|
readChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" } }, "required": ["changeSetId"], "additionalProperties": false },
|
|
721
829
|
readChangeSetState: { "type": "object", "properties": { "changeSetId": { "type": "string" } }, "required": ["changeSetId"], "additionalProperties": false },
|
|
722
|
-
reviseChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "expectedRevision": { "type": "string" }, "changes": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "typeCategory": { "const": "object" }, "typeKey": { "type": "string" }, "version": { "type": "number" }, "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" } }, "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 }, "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": "number" }, "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"] }, "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": "number" }, "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": { "oneOf": [{ "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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 },
|
|
830
|
+
reviseChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "expectedRevision": { "type": "string" }, "changes": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "typeCategory": { "const": "object" }, "typeKey": { "type": "string" }, "version": { "type": "number" }, "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" } }, "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": "number" }, "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"] }, "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": "number" }, "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": { "oneOf": [{ "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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": "number" } }, "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 },
|
|
723
831
|
validateChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "revision": { "type": "string" } }, "required": ["changeSetId", "revision"], "additionalProperties": false },
|
|
724
832
|
discardChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" } }, "required": ["changeSetId"], "additionalProperties": false },
|
|
725
833
|
acceptChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "revision": { "type": "string" }, "correlationId": { "type": "string" } }, "required": ["changeSetId", "revision"], "additionalProperties": false },
|
|
@@ -737,7 +845,16 @@ var SCHEMAS = {
|
|
|
737
845
|
addSubscriber: { "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 },
|
|
738
846
|
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 },
|
|
739
847
|
listComments: { "type": "object", "properties": { "objectId": { "type": "string" }, "after": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
740
|
-
|
|
848
|
+
acquireDraft: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
849
|
+
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 },
|
|
850
|
+
promoteDraft: { "type": "object", "properties": { "objectId": { "type": "string" }, "draftHash": { "type": "string" } }, "required": ["objectId", "draftHash"], "additionalProperties": false },
|
|
851
|
+
releaseDraft: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
852
|
+
discardDraft: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
853
|
+
breakDraftLock: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
854
|
+
readDraftLock: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
|
|
855
|
+
restoreDraft: { "type": "object", "properties": { "trashId": { "type": "string" }, "newRefName": { "type": "string" } }, "required": ["trashId", "newRefName"], "additionalProperties": false },
|
|
856
|
+
setCommentResolved: { "type": "object", "properties": { "commentId": { "type": "string" }, "resolved": { "type": "boolean" } }, "required": ["commentId", "resolved"], "additionalProperties": false },
|
|
857
|
+
addComment: { "type": "object", "properties": { "objectId": { "type": "string" }, "body": { "type": "string" }, "mentions": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "number" }, "to": { "type": "number" }, "person": { "type": "object", "properties": { "kind": { "const": "person" }, "id": { "type": "string" } }, "required": ["kind", "id"], "additionalProperties": false } }, "required": ["from", "to", "person"], "additionalProperties": false } }, "anchor": { "type": "object", "properties": { "blockId": { "type": "string" }, "from": { "type": "number" }, "to": { "type": "number" }, "exact": { "type": "string" }, "prefix": { "type": "string" }, "suffix": { "type": "string" } }, "required": ["blockId", "from", "to", "exact", "prefix", "suffix"], "additionalProperties": false }, "correlationId": { "type": "string" } }, "required": ["objectId", "body", "mentions"], "additionalProperties": false },
|
|
741
858
|
createConnection: { "type": "object", "properties": { "name": { "type": "string" }, "system": { "const": "onshape" }, "stack": { "type": "string" }, "companyId": { "oneOf": [{ "type": "string" }, { "type": "null" }] }, "selection": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "company" }, "label": { "type": "string" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "team" }, "teamId": { "type": "string" }, "label": { "type": "string" } }, "required": ["kind", "teamId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "owner" }, "ownerId": { "type": "string" }, "label": { "type": "string" } }, "required": ["kind", "ownerId"], "additionalProperties": false }] } }, "required": ["name", "system", "stack", "companyId", "selection"], "additionalProperties": false },
|
|
742
859
|
listConnections: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
743
860
|
setConnectionCredential: { "type": "object", "properties": { "credential": { "type": "object", "properties": { "kind": { "const": "api-key" }, "accessKey": { "type": "string" }, "secretKey": { "type": "string" } }, "required": ["kind", "accessKey", "secretKey"], "additionalProperties": false } }, "required": ["credential"], "additionalProperties": false },
|
|
@@ -765,6 +882,7 @@ var SCHEMAS = {
|
|
|
765
882
|
var ROUTE_INPUT_SCHEMAS = deepFreeze(SCHEMAS);
|
|
766
883
|
var SELECTORS = {
|
|
767
884
|
object: { "type": "object", "properties": { "projectId": { "type": "string" }, "ref": { "type": "string" } }, "required": ["projectId", "ref"], "additionalProperties": false },
|
|
885
|
+
existingObject: { "type": "object", "properties": { "projectId": { "type": "string" }, "ref": { "type": "string" }, "objectId": { "type": "string" } }, "required": ["projectId", "ref", "objectId"], "additionalProperties": false },
|
|
768
886
|
project: { "type": "object", "properties": { "projectId": { "type": "string" } }, "required": ["projectId"], "additionalProperties": false },
|
|
769
887
|
connection: { "type": "object", "properties": { "connectionId": { "type": "string" } }, "required": ["connectionId"], "additionalProperties": false }
|
|
770
888
|
};
|
|
@@ -776,6 +894,8 @@ var EXAMPLES = {
|
|
|
776
894
|
updateObjectSet: { "setId": "ost_aaaaaaaaaaaaaaaaaaaaaaaaaa", "revision": 1, "name": "Renamed set" },
|
|
777
895
|
deleteObjectSet: { "setId": "ost_aaaaaaaaaaaaaaaaaaaaaaaaaa", "revision": 1 },
|
|
778
896
|
health: {},
|
|
897
|
+
webSignInStart: { "state": "<state>", "loopback": "<loopback>", "code_challenge": "<code_challenge>", "code_challenge_method": "S256" },
|
|
898
|
+
webRedeem: { "code": "<code>", "state": "<state>", "code_verifier": "<code_verifier>" },
|
|
779
899
|
signInStart: { "state": "<state>", "loopback": "<loopback>", "code_challenge": "<code_challenge>", "code_challenge_method": "S256" },
|
|
780
900
|
signInCallback: { "state": "<state>", "code": "<code>" },
|
|
781
901
|
redeem: { "code": "<code>", "state": "<state>", "code_verifier": "<code_verifier>" },
|
|
@@ -785,14 +905,19 @@ var EXAMPLES = {
|
|
|
785
905
|
attachOrganisation: { "organisationId": "<organisationId>" },
|
|
786
906
|
detachOrganisation: {},
|
|
787
907
|
listOrganisations: {},
|
|
788
|
-
registerClient: { "displayName": "
|
|
908
|
+
registerClient: { "displayName": "Example client", "clientType": "public", "redirectUris": ["https://example.com/callback"], "scopes": [] },
|
|
789
909
|
listClients: {},
|
|
790
910
|
revokeClient: { "clientId": "<clientId>" },
|
|
791
|
-
replaceClientKeys: { "clientId": "<clientId>", "publicKeySet": { "keys": [] } },
|
|
911
|
+
replaceClientKeys: { "clientId": "<clientId>", "publicKeySet": { "keys": [{ "kty": "EC", "crv": "P-256", "x": "axfR8uEsQkf4vOblY6RA8ncDfYEt6zOg9KE5RdiYwpY", "y": "T-NC4v4af5uO5-tKfA-eFivOM1drMV7Oy7ZAaDe_UfU" }] } },
|
|
792
912
|
readConsentRequest: { "interactionId": "<interactionId>" },
|
|
793
913
|
decideConsent: { "interactionId": "<interactionId>", "decision": "approve", "approvedScopes": [] },
|
|
794
914
|
listConnectedApps: {},
|
|
795
915
|
revokeConnectedApp: { "clientId": "<clientId>" },
|
|
916
|
+
readStepUpRequest: { "pendingId": "<pendingId>" },
|
|
917
|
+
confirmStepUp: { "pendingId": "<pendingId>" },
|
|
918
|
+
enterHumanMode: {},
|
|
919
|
+
readSessionStatus: {},
|
|
920
|
+
readStepUpProof: { "pendingId": "<pendingId>" },
|
|
796
921
|
readAttachment: {
|
|
797
922
|
"objectId": "<objectId>",
|
|
798
923
|
"property": "<property>"
|
|
@@ -809,7 +934,7 @@ var EXAMPLES = {
|
|
|
809
934
|
recover: { "correlationId": "<correlationId>" },
|
|
810
935
|
executeVerb: { "correlation": { "kind": "mint" }, "verb": { "typeKey": "<typeKey>", "typeVersion": 1 }, "subjectIds": [], "input": null },
|
|
811
936
|
createBranch: { "correlation": { "kind": "mint" }, "name": "<name>" },
|
|
812
|
-
merge: { "correlation": { "kind": "mint" }, "sourceHash": "<sourceHash>", "message": "<message>" },
|
|
937
|
+
merge: { "correlation": { "kind": "mint" }, "sourceHash": "<sourceHash>", "message": "<message>", "name": "feature" },
|
|
813
938
|
readMergeConflicts: { "name": "<name>" },
|
|
814
939
|
disposeRef: { "correlation": { "kind": "mint" }, "name": "<name>", "atHash": "<atHash>" },
|
|
815
940
|
listProjects: {},
|
|
@@ -850,6 +975,7 @@ var EXAMPLES = {
|
|
|
850
975
|
listProposals: { "state": "pending" },
|
|
851
976
|
readProposal: { "proposalId": "<proposalId>" },
|
|
852
977
|
refuseProposal: { "proposalId": "<proposalId>", "reason": "<reason>" },
|
|
978
|
+
approveProposal: { "proposalId": "<proposalId>", "headHash": "<headHash>" },
|
|
853
979
|
readBranchDiff: { "proposalId": "<proposalId>" },
|
|
854
980
|
readLinkStatus: { "objectId": "<objectId>" },
|
|
855
981
|
clearLinks: { "correlation": { "kind": "mint" }, "ref": "main", "entries": [{ "linkId": "<linkId>", "upstreamVersion": "<upstreamVersion>" }] },
|
|
@@ -861,12 +987,14 @@ var EXAMPLES = {
|
|
|
861
987
|
readRefHead: { "name": "<name>" },
|
|
862
988
|
inspectBranchOperation: { "correlationId": "<correlationId>" },
|
|
863
989
|
abandonBranch: { "correlation": { "kind": "mint" }, "name": "<name>", "atHash": "<atHash>" },
|
|
864
|
-
addRefRule: { "
|
|
990
|
+
addRefRule: { "extent": "ref", "pattern": "<pattern>" },
|
|
865
991
|
listRefRules: {},
|
|
866
992
|
removeRefRule: { "ruleId": "<ruleId>" },
|
|
867
|
-
|
|
993
|
+
updateRefRule: { "ruleId": "<ruleId>", "settings": {} },
|
|
994
|
+
addOrganisationRule: { "extent": "ref", "pattern": "<pattern>" },
|
|
868
995
|
listOrganisationRules: {},
|
|
869
996
|
removeOrganisationRule: { "ruleId": "<ruleId>" },
|
|
997
|
+
updateOrganisationRule: { "ruleId": "<ruleId>", "settings": {} },
|
|
870
998
|
createOrganisationRef: { "name": "<name>" },
|
|
871
999
|
listOrganisationRefs: {},
|
|
872
1000
|
deleteOrganisationRef: { "name": "<name>" },
|
|
@@ -898,7 +1026,7 @@ var EXAMPLES = {
|
|
|
898
1026
|
readApp: { "appKey": "<appKey>" },
|
|
899
1027
|
openAppDraft: { "appKey": "<appKey>" },
|
|
900
1028
|
readAppDraft: { "appDraftId": "<appDraftId>" },
|
|
901
|
-
reviseAppDraft: { "appDraftId": "<appDraftId>", "revision": 1, "document": { "title": "
|
|
1029
|
+
reviseAppDraft: { "appDraftId": "<appDraftId>", "revision": 1, "document": { "title": "Example app", "pages": [{ "key": "home", "title": "Home", "view": { "root": "root", "elements": { "root": { "type": "AppBody", "props": {}, "children": ["text"] }, "text": { "type": "Text", "props": { "text": "Example page" }, "children": [] } } } }] } },
|
|
902
1030
|
acceptAppDraft: { "appDraftId": "<appDraftId>", "revision": 1 },
|
|
903
1031
|
listApps: {},
|
|
904
1032
|
validateAppDraft: { "appDraftId": "<appDraftId>", "revision": 1 },
|
|
@@ -909,6 +1037,15 @@ var EXAMPLES = {
|
|
|
909
1037
|
addSubscriber: { "objectId": "<objectId>", "role": "owner", "person": { "kind": "person", "id": "<id>" } },
|
|
910
1038
|
removeSubscriber: { "objectId": "<objectId>", "role": "owner", "person": { "kind": "person", "id": "<id>" } },
|
|
911
1039
|
listComments: { "objectId": "<objectId>" },
|
|
1040
|
+
acquireDraft: { "objectId": "<objectId>" },
|
|
1041
|
+
saveDraft: { "objectId": "<objectId>", "blocks": {}, "added": [], "draftHash": "<draftHash>" },
|
|
1042
|
+
promoteDraft: { "objectId": "<objectId>", "draftHash": "<draftHash>" },
|
|
1043
|
+
releaseDraft: { "objectId": "<objectId>" },
|
|
1044
|
+
discardDraft: { "objectId": "<objectId>" },
|
|
1045
|
+
breakDraftLock: { "objectId": "<objectId>" },
|
|
1046
|
+
readDraftLock: { "objectId": "<objectId>" },
|
|
1047
|
+
restoreDraft: { "trashId": "<trashId>", "newRefName": "<newRefName>" },
|
|
1048
|
+
setCommentResolved: { "commentId": "<commentId>", "resolved": false },
|
|
912
1049
|
addComment: { "objectId": "<objectId>", "body": "<body>", "mentions": [] },
|
|
913
1050
|
createConnection: { "name": "<name>", "system": "onshape", "stack": "<stack>", "companyId": null, "selection": { "kind": "company" } },
|
|
914
1051
|
listConnections: {},
|
|
@@ -937,10 +1074,13 @@ var EXAMPLES = {
|
|
|
937
1074
|
var ROUTE_INPUT_EXAMPLES = deepFreeze(EXAMPLES);
|
|
938
1075
|
|
|
939
1076
|
// packages/api-contract/dist/routes.js
|
|
940
|
-
var PROTOCOL_VERSION =
|
|
1077
|
+
var PROTOCOL_VERSION = 37;
|
|
941
1078
|
var VERSION_HEADER = "oe2-protocol-version";
|
|
942
1079
|
var TOKEN_HEADER = "authorization";
|
|
943
1080
|
var IDEMPOTENCY_HEADER = "oe2-idempotency-key";
|
|
1081
|
+
var STEP_UP_HEADER = "oe2-step-up";
|
|
1082
|
+
var STEP_UP_KEY_HEADER = "oe2-step-up-key";
|
|
1083
|
+
var IDEMPOTENCY_KEY_PATTERN = /^[A-Za-z0-9._~-]{1,128}$/;
|
|
944
1084
|
var STREAMED_ROUTE_NAMES = Object.freeze(["sendMessageStreamed", "answerPlanStreamed"]);
|
|
945
1085
|
var BINARY_REQUEST_ROUTE_NAMES = Object.freeze(["stageAttachment", "publishHostedVersion"]);
|
|
946
1086
|
var BINARY_RESPONSE_ROUTE_NAMES = Object.freeze(["readAttachment"]);
|
|
@@ -956,50 +1096,363 @@ var OMITTABLE_GROUPS = Object.freeze([
|
|
|
956
1096
|
"administration",
|
|
957
1097
|
"agent"
|
|
958
1098
|
]);
|
|
959
|
-
var
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
1099
|
+
var ACTOR_TOKEN_KINDS = Object.freeze({
|
|
1100
|
+
person: "user",
|
|
1101
|
+
"agent:explore": "agent:explore",
|
|
1102
|
+
"agent:apply": "agent:apply",
|
|
1103
|
+
"agent:types": "agent:types",
|
|
1104
|
+
"app:client": "client",
|
|
1105
|
+
"app:hosted": "hosted-app",
|
|
1106
|
+
service: "service"
|
|
1107
|
+
});
|
|
1108
|
+
var STEP_UP_ROUTE_GROUPS = Object.freeze({
|
|
1109
|
+
createObjectSet: "unmarked",
|
|
1110
|
+
listObjectSets: "unmarked",
|
|
1111
|
+
readObjectSet: "unmarked",
|
|
1112
|
+
updateObjectSet: "unmarked",
|
|
1113
|
+
deleteObjectSet: "unmarked",
|
|
1114
|
+
health: "unmarked",
|
|
1115
|
+
webSignInStart: "unmarked",
|
|
1116
|
+
signInStart: "unmarked",
|
|
1117
|
+
signInCallback: "unmarked",
|
|
1118
|
+
webRedeem: "unmarked",
|
|
1119
|
+
redeem: "unmarked",
|
|
1120
|
+
refresh: "unmarked",
|
|
1121
|
+
logout: "unmarked",
|
|
1122
|
+
serviceCredential: "unmarked",
|
|
1123
|
+
attachOrganisation: "unmarked",
|
|
1124
|
+
detachOrganisation: "unmarked",
|
|
1125
|
+
listOrganisations: "unmarked",
|
|
1126
|
+
registerClient: "marked",
|
|
1127
|
+
listClients: "unmarked",
|
|
1128
|
+
revokeClient: "unmarked",
|
|
1129
|
+
replaceClientKeys: "marked",
|
|
1130
|
+
readConsentRequest: "unmarked",
|
|
1131
|
+
decideConsent: "marked-refused-to-agents",
|
|
1132
|
+
listConnectedApps: "unmarked",
|
|
1133
|
+
revokeConnectedApp: "unmarked",
|
|
1134
|
+
readStepUpRequest: "unmarked",
|
|
1135
|
+
confirmStepUp: "unmarked",
|
|
1136
|
+
readStepUpProof: "unmarked",
|
|
1137
|
+
enterHumanMode: "marked",
|
|
1138
|
+
readSessionStatus: "unmarked",
|
|
1139
|
+
stageAttachment: "unmarked",
|
|
1140
|
+
readAttachment: "unmarked",
|
|
1141
|
+
readObject: "unmarked",
|
|
1142
|
+
queryObjects: "unmarked",
|
|
1143
|
+
queryRows: "unmarked",
|
|
1144
|
+
aggregateObjects: "unmarked",
|
|
1145
|
+
discoverVerbs: "unmarked",
|
|
1146
|
+
readHistory: "unmarked",
|
|
1147
|
+
mutate: "unmarked",
|
|
1148
|
+
mutateBatch: "unmarked",
|
|
1149
|
+
previewDelete: "unmarked",
|
|
1150
|
+
recover: "unmarked",
|
|
1151
|
+
executeVerb: "unmarked",
|
|
1152
|
+
createBranch: "unmarked",
|
|
1153
|
+
merge: "marked",
|
|
1154
|
+
readMergeConflicts: "unmarked",
|
|
1155
|
+
disposeRef: "marked",
|
|
1156
|
+
listProjects: "unmarked",
|
|
1157
|
+
listRefs: "unmarked",
|
|
1158
|
+
readCatalogue: "unmarked",
|
|
1159
|
+
readPendingProposal: "unmarked",
|
|
1160
|
+
submitProposal: "unmarked",
|
|
1161
|
+
createServiceIdentity: "marked-refused-to-agents",
|
|
1162
|
+
revokeServiceIdentity: "unmarked",
|
|
1163
|
+
issueServiceCredential: "marked-refused-to-agents",
|
|
1164
|
+
revokeServiceCredential: "unmarked",
|
|
1165
|
+
grantMembership: "marked-refused-to-agents",
|
|
1166
|
+
revokeMembership: "unmarked",
|
|
1167
|
+
setModelConfiguration: "marked",
|
|
1168
|
+
setModelId: "unmarked",
|
|
1169
|
+
readModelConfigurationStatus: "unmarked",
|
|
1170
|
+
readAccount: "unmarked",
|
|
1171
|
+
readDisplayNames: "unmarked",
|
|
1172
|
+
listMembers: "unmarked",
|
|
1173
|
+
changeMembershipRole: "marked-refused-to-agents",
|
|
1174
|
+
listOrganisationMembers: "unmarked",
|
|
1175
|
+
listServiceIdentities: "unmarked",
|
|
1176
|
+
createInvitation: "marked-refused-to-agents",
|
|
1177
|
+
listInvitations: "unmarked",
|
|
1178
|
+
revokeInvitation: "unmarked",
|
|
1179
|
+
readInvitationDomainRule: "unmarked",
|
|
1180
|
+
setInvitationDomainRule: "marked",
|
|
1181
|
+
reissueInvitation: "marked-refused-to-agents",
|
|
1182
|
+
createPlatformInvitation: "marked-refused-to-agents",
|
|
1183
|
+
listPlatformInvitations: "unmarked",
|
|
1184
|
+
revokePlatformInvitation: "unmarked",
|
|
1185
|
+
reissuePlatformInvitation: "marked-refused-to-agents",
|
|
1186
|
+
readWebOrigin: "unmarked",
|
|
1187
|
+
readCallerCapabilities: "unmarked",
|
|
1188
|
+
queryGraph: "unmarked",
|
|
1189
|
+
readStructure: "unmarked",
|
|
1190
|
+
findPaths: "unmarked",
|
|
1191
|
+
listProposals: "unmarked",
|
|
1192
|
+
readProposal: "unmarked",
|
|
1193
|
+
refuseProposal: "unmarked",
|
|
1194
|
+
approveProposal: "marked",
|
|
1195
|
+
readBranchDiff: "unmarked",
|
|
1196
|
+
readLinkStatus: "unmarked",
|
|
1197
|
+
clearLinks: "unmarked",
|
|
1198
|
+
readChangeImpact: "unmarked",
|
|
1199
|
+
diffBranches: "unmarked",
|
|
1200
|
+
readBranchHistory: "unmarked",
|
|
1201
|
+
listAudit: "unmarked",
|
|
1202
|
+
listOrganisationAudit: "unmarked",
|
|
1203
|
+
readRefHead: "unmarked",
|
|
1204
|
+
inspectBranchOperation: "unmarked",
|
|
1205
|
+
abandonBranch: "unmarked",
|
|
1206
|
+
addRefRule: "unmarked",
|
|
1207
|
+
listRefRules: "unmarked",
|
|
1208
|
+
removeRefRule: "marked",
|
|
1209
|
+
updateRefRule: "marked",
|
|
1210
|
+
addOrganisationRule: "unmarked",
|
|
1211
|
+
listOrganisationRules: "unmarked",
|
|
1212
|
+
removeOrganisationRule: "marked",
|
|
1213
|
+
updateOrganisationRule: "marked",
|
|
1214
|
+
createOrganisationRef: "unmarked",
|
|
1215
|
+
listOrganisationRefs: "unmarked",
|
|
1216
|
+
deleteOrganisationRef: "marked",
|
|
1217
|
+
markOrganisationRefReadOnly: "unmarked",
|
|
1218
|
+
setObjectLock: "marked",
|
|
1219
|
+
readAgentCeiling: "unmarked",
|
|
1220
|
+
setAgentCeiling: "marked-refused-to-agents",
|
|
1221
|
+
requestSchemaUpdate: "unmarked",
|
|
1222
|
+
readSchemaUpdateRequest: "unmarked",
|
|
1223
|
+
openAgentSession: "unmarked",
|
|
1224
|
+
listAgentSessions: "unmarked",
|
|
1225
|
+
readAgentSession: "unmarked",
|
|
1226
|
+
sendMessage: "unmarked",
|
|
1227
|
+
answerPlan: "unmarked",
|
|
1228
|
+
stopRun: "unmarked",
|
|
1229
|
+
closePlan: "unmarked",
|
|
1230
|
+
sendMessageStreamed: "unmarked",
|
|
1231
|
+
answerPlanStreamed: "unmarked",
|
|
1232
|
+
createProject: "unmarked",
|
|
1233
|
+
createOrganisation: "unmarked",
|
|
1234
|
+
openChangeSet: "unmarked",
|
|
1235
|
+
readCurrentChangeSet: "unmarked",
|
|
1236
|
+
readChangeSet: "unmarked",
|
|
1237
|
+
readChangeSetState: "unmarked",
|
|
1238
|
+
reviseChangeSet: "unmarked",
|
|
1239
|
+
validateChangeSet: "unmarked",
|
|
1240
|
+
discardChangeSet: "unmarked",
|
|
1241
|
+
acceptChangeSet: "unmarked",
|
|
1242
|
+
readApp: "unmarked",
|
|
1243
|
+
openAppDraft: "unmarked",
|
|
1244
|
+
readAppDraft: "unmarked",
|
|
1245
|
+
reviseAppDraft: "unmarked",
|
|
1246
|
+
acceptAppDraft: "unmarked",
|
|
1247
|
+
listApps: "unmarked",
|
|
1248
|
+
validateAppDraft: "unmarked",
|
|
1249
|
+
discardAppDraft: "unmarked",
|
|
1250
|
+
searchPeople: "unmarked",
|
|
1251
|
+
searchObjectReaders: "unmarked",
|
|
1252
|
+
listSubscribers: "unmarked",
|
|
1253
|
+
addSubscriber: "unmarked",
|
|
1254
|
+
removeSubscriber: "unmarked",
|
|
1255
|
+
listComments: "unmarked",
|
|
1256
|
+
acquireDraft: "unmarked",
|
|
1257
|
+
saveDraft: "unmarked",
|
|
1258
|
+
promoteDraft: "unmarked",
|
|
1259
|
+
releaseDraft: "unmarked",
|
|
1260
|
+
discardDraft: "unmarked",
|
|
1261
|
+
breakDraftLock: "marked",
|
|
1262
|
+
readDraftLock: "unmarked",
|
|
1263
|
+
restoreDraft: "unmarked",
|
|
1264
|
+
setCommentResolved: "unmarked",
|
|
1265
|
+
addComment: "unmarked",
|
|
1266
|
+
createConnection: "unmarked",
|
|
1267
|
+
listConnections: "unmarked",
|
|
1268
|
+
setConnectionCredential: "marked",
|
|
1269
|
+
readConnectionIdentity: "unmarked",
|
|
1270
|
+
draftConnectorTypes: "unmarked",
|
|
1271
|
+
revokeConnection: "unmarked",
|
|
1272
|
+
startImportRun: "unmarked",
|
|
1273
|
+
listImportRuns: "unmarked",
|
|
1274
|
+
closeImportRun: "unmarked",
|
|
1275
|
+
createHostedApp: "unmarked",
|
|
1276
|
+
publishHostedVersion: "unmarked",
|
|
1277
|
+
readHostedBundle: "unmarked",
|
|
1278
|
+
listHostedApps: "unmarked",
|
|
1279
|
+
listHostedVersions: "unmarked",
|
|
1280
|
+
revokeHostedApp: "unmarked",
|
|
1281
|
+
revokeHostedVersion: "unmarked",
|
|
1282
|
+
openHostedApp: "unmarked",
|
|
1283
|
+
endHostedLaunch: "unmarked",
|
|
1284
|
+
mintHostedAppToken: "unmarked",
|
|
1285
|
+
setHostedOneWallSwitch: "unmarked",
|
|
1286
|
+
readHostedOneWallSwitch: "unmarked",
|
|
1287
|
+
grantHostedOneWall: "unmarked",
|
|
1288
|
+
withdrawHostedOneWall: "unmarked",
|
|
1289
|
+
listHostedOneWallGrants: "unmarked"
|
|
1290
|
+
});
|
|
1291
|
+
var POLICY_PREDICATES = Object.freeze({
|
|
1292
|
+
unlocks: (input) => typeof input === "object" && input !== null && "lock" in input && input.lock === "none"
|
|
1293
|
+
});
|
|
1294
|
+
var NO_ACTORS = Object.freeze({ none: true });
|
|
1295
|
+
function admittingActors(first, ...rest) {
|
|
1296
|
+
const actors = Object.fromEntries([first, ...rest].map((actorClass) => [actorClass, "none"]));
|
|
1297
|
+
return Object.freeze({ actors: Object.freeze(actors) });
|
|
1298
|
+
}
|
|
1299
|
+
function policyFor(name, admission) {
|
|
1300
|
+
const group = STEP_UP_ROUTE_GROUPS[name];
|
|
1301
|
+
if (group === "unmarked")
|
|
1302
|
+
return admission;
|
|
1303
|
+
if (group !== "marked" && group !== "marked-refused-to-agents") {
|
|
1304
|
+
throw new Error(`route ${name}: no step-up group is declared`);
|
|
1305
|
+
}
|
|
1306
|
+
if (!("actors" in admission) || !("person" in admission.actors)) {
|
|
1307
|
+
throw new Error(`route ${name}: a marked route must admit the person`);
|
|
1308
|
+
}
|
|
1309
|
+
const person = name === "setObjectLock" ? Object.freeze({ personPresentWhen: "unlocks" }) : "person-present";
|
|
1310
|
+
return Object.freeze({ actors: Object.freeze({ ...admission.actors, person }) });
|
|
1311
|
+
}
|
|
1312
|
+
function admittedKinds(policy) {
|
|
1313
|
+
if ("none" in policy)
|
|
1314
|
+
return "none";
|
|
1315
|
+
const classes = Object.keys(policy.actors);
|
|
1316
|
+
if (classes.length === 0)
|
|
1317
|
+
throw new Error("an actors policy must name at least one actor class");
|
|
1318
|
+
const kinds = classes.map((actorClass) => {
|
|
1319
|
+
if (!Object.hasOwn(ACTOR_TOKEN_KINDS, actorClass))
|
|
1320
|
+
throw new Error(`unknown actor class ${actorClass}`);
|
|
1321
|
+
return ACTOR_TOKEN_KINDS[actorClass];
|
|
1322
|
+
});
|
|
1323
|
+
return Object.freeze(kinds);
|
|
963
1324
|
}
|
|
1325
|
+
function owesStepUp(policy) {
|
|
1326
|
+
return "actors" in policy && Object.values(policy.actors).some((stepUp) => stepUp !== "none");
|
|
1327
|
+
}
|
|
1328
|
+
var STEP_UP_REFUSALS = Object.freeze(["step-up-required", "step-up-mismatch", "step-up-capacity"]);
|
|
964
1329
|
function route(entry2) {
|
|
965
1330
|
const doc2 = ROUTE_DOCS[entry2.name];
|
|
966
|
-
const
|
|
967
|
-
const
|
|
968
|
-
|
|
1331
|
+
const policy = policyFor(entry2.name, entry2.policy);
|
|
1332
|
+
const kinds = admittedKinds(policy);
|
|
1333
|
+
const admitsClient = kinds !== "none" && kinds.includes("client");
|
|
1334
|
+
const withGrantScope = admitsClient && !doc2.refuses.includes("grant-scope") ? Object.freeze({ does: doc2.does, refuses: Object.freeze([...doc2.refuses, "grant-scope"]) }) : doc2;
|
|
1335
|
+
const documented = owesStepUp(policy) ? Object.freeze({
|
|
1336
|
+
does: withGrantScope.does,
|
|
1337
|
+
refuses: Object.freeze([
|
|
1338
|
+
...withGrantScope.refuses,
|
|
1339
|
+
...STEP_UP_REFUSALS.filter((refusal2) => !withGrantScope.refuses.includes(refusal2))
|
|
1340
|
+
])
|
|
1341
|
+
}) : withGrantScope;
|
|
1342
|
+
return Object.freeze({ ...entry2, policy, admittedTokenKinds: kinds, doc: documented });
|
|
969
1343
|
}
|
|
970
1344
|
var ROUTES = Object.freeze({
|
|
971
|
-
createObjectSet: route({ name: "createObjectSet", method: "POST", path: "/object-sets", group: "write", selector: "object", subject: "project", idempotent: true,
|
|
972
|
-
listObjectSets: route({ name: "listObjectSets", method: "POST", path: "/object-sets/list", group: "read", selector: "none", subject: "none", idempotent: false,
|
|
973
|
-
readObjectSet: route({ name: "readObjectSet", method: "POST", path: "/object-sets/read", group: "read", selector: "object", subject: "project", idempotent: false,
|
|
974
|
-
updateObjectSet: route({ name: "updateObjectSet", method: "POST", path: "/object-sets/update", group: "write", selector: "object", subject: "project", idempotent: false,
|
|
975
|
-
deleteObjectSet: route({ name: "deleteObjectSet", method: "POST", path: "/object-sets/delete", group: "write", selector: "none", subject: "none", idempotent: false,
|
|
976
|
-
health: route({ name: "health", method: "GET", path: "/health", group: "platform", selector: "none", subject: "platform", idempotent: false,
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1345
|
+
createObjectSet: route({ name: "createObjectSet", method: "POST", path: "/object-sets", group: "write", selector: "object", subject: "project", idempotent: true, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.createObjectSet" }),
|
|
1346
|
+
listObjectSets: route({ name: "listObjectSets", method: "POST", path: "/object-sets/list", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.listObjectSets" }),
|
|
1347
|
+
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" }),
|
|
1348
|
+
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" }),
|
|
1349
|
+
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" }),
|
|
1350
|
+
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" }),
|
|
1351
|
+
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" }),
|
|
1352
|
+
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" }),
|
|
1353
|
+
signInCallback: route({ name: "signInCallback", method: "GET", path: "/auth/callback", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: NO_ACTORS, versioned: false, module: "sdk-core", capability: "core.signInCallback" }),
|
|
1354
|
+
webRedeem: route({ name: "webRedeem", method: "POST", path: "/auth/web/redeem", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: NO_ACTORS, versioned: true, module: "sdk-core", capability: "core.webRedeem" }),
|
|
1355
|
+
redeem: route({ name: "redeem", method: "POST", path: "/auth/redeem", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: NO_ACTORS, versioned: true, module: "sdk-core", capability: "core.redeem" }),
|
|
1356
|
+
refresh: route({ name: "refresh", method: "POST", path: "/auth/refresh", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: NO_ACTORS, versioned: true, module: "sdk-core", capability: "core.refresh" }),
|
|
1357
|
+
logout: route({ name: "logout", method: "POST", path: "/auth/logout", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: admittingActors("person", "service"), versioned: true, module: "sdk-core", capability: "core.logout" }),
|
|
1358
|
+
serviceCredential: route({ name: "serviceCredential", method: "POST", path: "/auth/service", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: NO_ACTORS, versioned: true, module: "sdk-core", capability: "core.serviceCredential" }),
|
|
1359
|
+
attachOrganisation: route({ name: "attachOrganisation", method: "POST", path: "/auth/organisation", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: admittingActors("person"), versioned: true, module: "sdk-core", capability: "core.attachOrganisation" }),
|
|
1360
|
+
detachOrganisation: route({ name: "detachOrganisation", method: "POST", path: "/auth/organisation/detach", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: admittingActors("person"), versioned: true, module: "sdk-core", capability: "core.detachOrganisation" }),
|
|
1361
|
+
listOrganisations: route({ name: "listOrganisations", method: "POST", path: "/auth/organisations", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: admittingActors("person", "service"), versioned: true, module: "sdk-core", capability: "core.listOrganisations" }),
|
|
1362
|
+
registerClient: route({
|
|
1363
|
+
name: "registerClient",
|
|
1364
|
+
method: "POST",
|
|
1365
|
+
path: "/clients",
|
|
1366
|
+
group: "administration",
|
|
1367
|
+
selector: "none",
|
|
1368
|
+
subject: "none",
|
|
1369
|
+
idempotent: false,
|
|
1370
|
+
policy: admittingActors("person"),
|
|
1371
|
+
versioned: true,
|
|
1372
|
+
module: "admin-sdk",
|
|
1373
|
+
capability: "admin.clientRegistration"
|
|
1374
|
+
}),
|
|
1375
|
+
listClients: route({ name: "listClients", method: "POST", path: "/clients/list", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.clients" }),
|
|
1376
|
+
revokeClient: route({ name: "revokeClient", method: "POST", path: "/client-revocations", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.clientRevocation" }),
|
|
1377
|
+
replaceClientKeys: route({
|
|
1378
|
+
name: "replaceClientKeys",
|
|
1379
|
+
method: "POST",
|
|
1380
|
+
path: "/client-keys",
|
|
1381
|
+
group: "administration",
|
|
1382
|
+
selector: "none",
|
|
1383
|
+
subject: "none",
|
|
1384
|
+
idempotent: false,
|
|
1385
|
+
policy: admittingActors("person"),
|
|
1386
|
+
versioned: true,
|
|
1387
|
+
module: "admin-sdk",
|
|
1388
|
+
capability: "admin.clientKeys"
|
|
1389
|
+
}),
|
|
1390
|
+
readConsentRequest: route({ name: "readConsentRequest", method: "POST", path: "/consent/read", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: admittingActors("person"), versioned: true, module: "web-sdk", capability: "web.consentRead" }),
|
|
1391
|
+
decideConsent: route({
|
|
1392
|
+
name: "decideConsent",
|
|
1393
|
+
method: "POST",
|
|
1394
|
+
path: "/consent-decisions",
|
|
1395
|
+
group: "platform",
|
|
1396
|
+
selector: "none",
|
|
1397
|
+
subject: "platform",
|
|
1398
|
+
idempotent: false,
|
|
1399
|
+
policy: admittingActors("person"),
|
|
1400
|
+
versioned: true,
|
|
1401
|
+
module: "web-sdk",
|
|
1402
|
+
capability: "web.consentDecision"
|
|
1403
|
+
}),
|
|
1404
|
+
listConnectedApps: route({ name: "listConnectedApps", method: "POST", path: "/connected-apps", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: admittingActors("person"), versioned: true, module: "web-sdk", capability: "web.connectedApps" }),
|
|
1405
|
+
revokeConnectedApp: route({ name: "revokeConnectedApp", method: "POST", path: "/connected-app-revocations", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: admittingActors("person"), versioned: true, module: "web-sdk", capability: "web.connectedAppRevocation" }),
|
|
1406
|
+
readStepUpRequest: route({ name: "readStepUpRequest", method: "POST", path: "/step-up/read", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: admittingActors("person"), versioned: true, module: "web-sdk", capability: "web.stepUpRead" }),
|
|
1407
|
+
confirmStepUp: route({ name: "confirmStepUp", method: "POST", path: "/step-up/confirmations", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: admittingActors("person"), versioned: true, module: "web-sdk", capability: "web.stepUpConfirmation" }),
|
|
1408
|
+
readStepUpProof: route({
|
|
1409
|
+
name: "readStepUpProof",
|
|
1410
|
+
method: "POST",
|
|
1411
|
+
path: "/step-up/proofs",
|
|
1412
|
+
group: "platform",
|
|
1413
|
+
selector: "none",
|
|
1414
|
+
subject: "platform",
|
|
1415
|
+
idempotent: false,
|
|
1416
|
+
policy: admittingActors("person", "agent:explore", "agent:apply", "agent:types"),
|
|
1417
|
+
versioned: true,
|
|
1418
|
+
module: "sdk-core",
|
|
1419
|
+
capability: "core.stepUpProof"
|
|
1420
|
+
}),
|
|
1421
|
+
enterHumanMode: route({
|
|
1422
|
+
name: "enterHumanMode",
|
|
1423
|
+
method: "POST",
|
|
1424
|
+
path: "/session/human",
|
|
1425
|
+
group: "platform",
|
|
1426
|
+
selector: "none",
|
|
1427
|
+
subject: "platform",
|
|
1428
|
+
idempotent: false,
|
|
1429
|
+
policy: admittingActors("person"),
|
|
1430
|
+
versioned: true,
|
|
1431
|
+
module: "sdk-core",
|
|
1432
|
+
capability: "core.enterHumanMode"
|
|
1433
|
+
}),
|
|
1434
|
+
readSessionStatus: route({
|
|
1435
|
+
name: "readSessionStatus",
|
|
1436
|
+
method: "POST",
|
|
1437
|
+
path: "/session/status",
|
|
1438
|
+
group: "platform",
|
|
1439
|
+
selector: "none",
|
|
1440
|
+
subject: "platform",
|
|
1441
|
+
idempotent: false,
|
|
1442
|
+
policy: admittingActors("person"),
|
|
1443
|
+
versioned: true,
|
|
1444
|
+
module: "sdk-core",
|
|
1445
|
+
capability: "core.sessionStatus"
|
|
1446
|
+
}),
|
|
994
1447
|
stageAttachment: route({
|
|
995
1448
|
name: "stageAttachment",
|
|
996
1449
|
method: "POST",
|
|
997
1450
|
path: "/attachments/stage",
|
|
998
1451
|
group: "write",
|
|
999
|
-
selector: "
|
|
1452
|
+
selector: "existingObject",
|
|
1000
1453
|
subject: "project",
|
|
1001
1454
|
idempotent: false,
|
|
1002
|
-
|
|
1455
|
+
policy: admittingActors("person", "service", "app:client", "agent:apply"),
|
|
1003
1456
|
versioned: true,
|
|
1004
1457
|
module: "objects-sdk",
|
|
1005
1458
|
capability: "objects.write"
|
|
@@ -1012,13 +1465,13 @@ var ROUTES = Object.freeze({
|
|
|
1012
1465
|
selector: "object",
|
|
1013
1466
|
subject: "project",
|
|
1014
1467
|
idempotent: false,
|
|
1015
|
-
|
|
1468
|
+
policy: admittingActors("person", "service", "app:client", "agent:explore", "agent:apply"),
|
|
1016
1469
|
versioned: true,
|
|
1017
1470
|
module: "objects-sdk",
|
|
1018
1471
|
capability: "objects.read"
|
|
1019
1472
|
}),
|
|
1020
|
-
readObject: route({ name: "readObject", method: "POST", path: "/objects/read", group: "read", selector: "object", subject: "project", idempotent: false,
|
|
1021
|
-
queryObjects: route({ name: "queryObjects", method: "POST", path: "/objects/query", group: "read", selector: "object", subject: "project", idempotent: false,
|
|
1473
|
+
readObject: route({ name: "readObject", method: "POST", path: "/objects/read", group: "read", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.read" }),
|
|
1474
|
+
queryObjects: route({ name: "queryObjects", method: "POST", path: "/objects/query", group: "read", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "agent:types", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.query" }),
|
|
1022
1475
|
queryRows: route({
|
|
1023
1476
|
name: "queryRows",
|
|
1024
1477
|
method: "POST",
|
|
@@ -1027,62 +1480,207 @@ var ROUTES = Object.freeze({
|
|
|
1027
1480
|
selector: "object",
|
|
1028
1481
|
subject: "project",
|
|
1029
1482
|
idempotent: false,
|
|
1030
|
-
|
|
1483
|
+
policy: admittingActors("person", "service", "agent:explore", "agent:apply", "agent:types", "app:client", "app:hosted"),
|
|
1031
1484
|
versioned: true,
|
|
1032
1485
|
module: "objects-sdk",
|
|
1033
1486
|
capability: "objects.query"
|
|
1034
1487
|
}),
|
|
1035
|
-
aggregateObjects: route({ name: "aggregateObjects", method: "POST", path: "/objects/aggregate", group: "read", selector: "object", subject: "project", idempotent: false,
|
|
1036
|
-
discoverVerbs: route({ name: "discoverVerbs", method: "POST", path: "/objects/verbs", group: "read", selector: "object", subject: "project", idempotent: false,
|
|
1037
|
-
readHistory: route({ name: "readHistory", method: "POST", path: "/objects/history", group: "history", selector: "object", subject: "project", idempotent: false,
|
|
1038
|
-
mutate: route({ name: "mutate", method: "POST", path: "/mutations", group: "write", selector: "object", subject: "project", idempotent: true,
|
|
1039
|
-
mutateBatch: route({ name: "mutateBatch", method: "POST", path: "/mutations/batch", group: "write", selector: "object", subject: "project", idempotent: true,
|
|
1040
|
-
previewDelete: route({ name: "previewDelete", method: "POST", path: "/objects/delete-preview", group: "write", selector: "object", subject: "project", idempotent: false,
|
|
1041
|
-
recover: route({ name: "recover", method: "POST", path: "/recoveries", group: "write", selector: "object", subject: "project", idempotent: false,
|
|
1042
|
-
executeVerb: route({ name: "executeVerb", method: "POST", path: "/verb-executions", group: "verb", selector: "object", subject: "project", idempotent: true,
|
|
1043
|
-
createBranch: route({ name: "createBranch", method: "POST", path: "/branches", group: "branch", selector: "project", subject: "project", idempotent: true,
|
|
1044
|
-
merge: route({
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1488
|
+
aggregateObjects: route({ name: "aggregateObjects", method: "POST", path: "/objects/aggregate", group: "read", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "service", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.aggregate" }),
|
|
1489
|
+
discoverVerbs: route({ name: "discoverVerbs", method: "POST", path: "/objects/verbs", group: "read", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.read" }),
|
|
1490
|
+
readHistory: route({ name: "readHistory", method: "POST", path: "/objects/history", group: "history", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.history" }),
|
|
1491
|
+
mutate: route({ name: "mutate", method: "POST", path: "/mutations", group: "write", selector: "object", subject: "project", idempotent: true, policy: admittingActors("person", "service", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.write" }),
|
|
1492
|
+
mutateBatch: route({ name: "mutateBatch", method: "POST", path: "/mutations/batch", group: "write", selector: "object", subject: "project", idempotent: true, policy: admittingActors("person", "service", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.write" }),
|
|
1493
|
+
previewDelete: route({ name: "previewDelete", method: "POST", path: "/objects/delete-preview", group: "write", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.write" }),
|
|
1494
|
+
recover: route({ name: "recover", method: "POST", path: "/recoveries", group: "write", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "service", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.recovery" }),
|
|
1495
|
+
executeVerb: route({ name: "executeVerb", method: "POST", path: "/verb-executions", group: "verb", selector: "object", subject: "project", idempotent: true, policy: admittingActors("person", "service", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.verb" }),
|
|
1496
|
+
createBranch: route({ name: "createBranch", method: "POST", path: "/branches", group: "branch", selector: "project", subject: "project", idempotent: true, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client"), versioned: true, module: "branches-sdk", capability: "branches.create" }),
|
|
1497
|
+
merge: route({
|
|
1498
|
+
name: "merge",
|
|
1499
|
+
method: "POST",
|
|
1500
|
+
path: "/merges",
|
|
1501
|
+
group: "branch",
|
|
1502
|
+
selector: "project",
|
|
1503
|
+
subject: "project",
|
|
1504
|
+
idempotent: true,
|
|
1505
|
+
policy: admittingActors("person", "service", "app:client"),
|
|
1506
|
+
versioned: true,
|
|
1507
|
+
module: "branches-sdk",
|
|
1508
|
+
capability: "branches.merge"
|
|
1509
|
+
}),
|
|
1510
|
+
readMergeConflicts: route({ name: "readMergeConflicts", method: "POST", path: "/branches/conflicts", group: "branch", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "service", "app:client", "app:hosted"), versioned: true, module: "branches-sdk", capability: "branches.conflicts" }),
|
|
1511
|
+
disposeRef: route({
|
|
1512
|
+
name: "disposeRef",
|
|
1513
|
+
method: "POST",
|
|
1514
|
+
path: "/branch-disposals",
|
|
1515
|
+
group: "branch",
|
|
1516
|
+
selector: "project",
|
|
1517
|
+
subject: "project",
|
|
1518
|
+
idempotent: true,
|
|
1519
|
+
policy: admittingActors("person", "service", "app:client"),
|
|
1520
|
+
versioned: true,
|
|
1521
|
+
module: "branches-sdk",
|
|
1522
|
+
capability: "branches.disposal"
|
|
1523
|
+
}),
|
|
1524
|
+
listProjects: route({ name: "listProjects", method: "POST", path: "/projects", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "service", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.projects" }),
|
|
1525
|
+
listRefs: route({ name: "listRefs", method: "POST", path: "/projects/refs", group: "read", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "branches.list" }),
|
|
1526
|
+
readCatalogue: route({ name: "readCatalogue", method: "POST", path: "/projects/catalogue", group: "read", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "agent:types", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.catalogue" }),
|
|
1527
|
+
readPendingProposal: route({ name: "readPendingProposal", method: "POST", path: "/proposals/pending", group: "read", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "app:client", "app:hosted"), versioned: true, module: "branches-sdk", capability: "branches.pendingProposal" }),
|
|
1528
|
+
submitProposal: route({ name: "submitProposal", method: "POST", path: "/proposals", group: "branch", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "app:client", "agent:apply"), versioned: true, module: "branches-sdk", capability: "branches.proposalSubmit" }),
|
|
1529
|
+
createServiceIdentity: route({
|
|
1530
|
+
name: "createServiceIdentity",
|
|
1531
|
+
method: "POST",
|
|
1532
|
+
path: "/service-identities",
|
|
1533
|
+
group: "administration",
|
|
1534
|
+
selector: "none",
|
|
1535
|
+
subject: "none",
|
|
1536
|
+
idempotent: false,
|
|
1537
|
+
policy: admittingActors("person"),
|
|
1538
|
+
versioned: true,
|
|
1539
|
+
module: "admin-sdk",
|
|
1540
|
+
capability: "admin.serviceIdentity"
|
|
1541
|
+
}),
|
|
1542
|
+
revokeServiceIdentity: route({ name: "revokeServiceIdentity", method: "POST", path: "/service-identities/revocation", group: "administration", selector: "none", subject: "service-identity", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.serviceIdentityRevocation" }),
|
|
1543
|
+
issueServiceCredential: route({
|
|
1544
|
+
name: "issueServiceCredential",
|
|
1545
|
+
method: "POST",
|
|
1546
|
+
path: "/service-credentials",
|
|
1547
|
+
group: "administration",
|
|
1548
|
+
selector: "none",
|
|
1549
|
+
subject: "service-identity",
|
|
1550
|
+
idempotent: false,
|
|
1551
|
+
policy: admittingActors("person"),
|
|
1552
|
+
versioned: true,
|
|
1553
|
+
module: "admin-sdk",
|
|
1554
|
+
capability: "admin.serviceCredential"
|
|
1555
|
+
}),
|
|
1556
|
+
revokeServiceCredential: route({ name: "revokeServiceCredential", method: "POST", path: "/service-credentials/revocation", group: "administration", selector: "none", subject: "service-identity", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.serviceCredentialRevocation" }),
|
|
1557
|
+
grantMembership: route({
|
|
1558
|
+
name: "grantMembership",
|
|
1559
|
+
method: "POST",
|
|
1560
|
+
path: "/memberships",
|
|
1561
|
+
group: "administration",
|
|
1562
|
+
selector: "none",
|
|
1563
|
+
subject: "membership-scope",
|
|
1564
|
+
idempotent: false,
|
|
1565
|
+
policy: admittingActors("person"),
|
|
1566
|
+
versioned: true,
|
|
1567
|
+
module: "admin-sdk",
|
|
1568
|
+
capability: "admin.membership"
|
|
1569
|
+
}),
|
|
1570
|
+
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" }),
|
|
1571
|
+
setModelConfiguration: route({
|
|
1572
|
+
name: "setModelConfiguration",
|
|
1573
|
+
method: "POST",
|
|
1574
|
+
path: "/model-configuration",
|
|
1575
|
+
group: "administration",
|
|
1576
|
+
selector: "none",
|
|
1577
|
+
subject: "none",
|
|
1578
|
+
idempotent: false,
|
|
1579
|
+
policy: admittingActors("person"),
|
|
1580
|
+
versioned: true,
|
|
1581
|
+
module: "admin-sdk",
|
|
1582
|
+
capability: "admin.modelConfiguration"
|
|
1583
|
+
}),
|
|
1584
|
+
setModelId: route({ name: "setModelId", method: "POST", path: "/model-configuration/model", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.modelId" }),
|
|
1585
|
+
readModelConfigurationStatus: route({ name: "readModelConfigurationStatus", method: "POST", path: "/model-configuration/status", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.modelConfigurationStatus" }),
|
|
1586
|
+
readAccount: route({ name: "readAccount", method: "POST", path: "/account", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.account" }),
|
|
1587
|
+
readDisplayNames: route({ name: "readDisplayNames", method: "POST", path: "/principals/names", group: "read", selector: "none", subject: "display-names", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "admin-sdk", capability: "admin.displayNames" }),
|
|
1588
|
+
listMembers: route({ name: "listMembers", method: "POST", path: "/projects/members", group: "read", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "admin-sdk", capability: "admin.members" }),
|
|
1589
|
+
changeMembershipRole: route({
|
|
1590
|
+
name: "changeMembershipRole",
|
|
1591
|
+
method: "POST",
|
|
1592
|
+
path: "/membership-roles",
|
|
1593
|
+
group: "administration",
|
|
1594
|
+
selector: "none",
|
|
1595
|
+
subject: "membership-scope",
|
|
1596
|
+
idempotent: false,
|
|
1597
|
+
policy: admittingActors("person"),
|
|
1598
|
+
versioned: true,
|
|
1599
|
+
module: "admin-sdk",
|
|
1600
|
+
capability: "admin.membershipRole"
|
|
1601
|
+
}),
|
|
1602
|
+
listOrganisationMembers: route({ name: "listOrganisationMembers", method: "POST", path: "/organisation/members", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "admin-sdk", capability: "admin.organisationMembers" }),
|
|
1603
|
+
listServiceIdentities: route({ name: "listServiceIdentities", method: "POST", path: "/organisation/service-identities", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.serviceIdentities" }),
|
|
1604
|
+
createInvitation: route({
|
|
1605
|
+
name: "createInvitation",
|
|
1606
|
+
method: "POST",
|
|
1607
|
+
path: "/invitations",
|
|
1608
|
+
group: "administration",
|
|
1609
|
+
selector: "none",
|
|
1610
|
+
subject: "none",
|
|
1611
|
+
idempotent: false,
|
|
1612
|
+
policy: admittingActors("person"),
|
|
1613
|
+
versioned: true,
|
|
1614
|
+
module: "admin-sdk",
|
|
1615
|
+
capability: "admin.invitation"
|
|
1616
|
+
}),
|
|
1617
|
+
listInvitations: route({ name: "listInvitations", method: "POST", path: "/invitations/list", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.invitationList" }),
|
|
1618
|
+
revokeInvitation: route({ name: "revokeInvitation", method: "POST", path: "/invitation-revocations", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.invitationRevocation" }),
|
|
1619
|
+
readInvitationDomainRule: route({ name: "readInvitationDomainRule", method: "POST", path: "/invitation-domain-rule/read", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.invitationDomainRuleRead" }),
|
|
1620
|
+
setInvitationDomainRule: route({
|
|
1621
|
+
name: "setInvitationDomainRule",
|
|
1622
|
+
method: "POST",
|
|
1623
|
+
path: "/invitation-domain-rule",
|
|
1624
|
+
group: "administration",
|
|
1625
|
+
selector: "none",
|
|
1626
|
+
subject: "none",
|
|
1627
|
+
idempotent: false,
|
|
1628
|
+
policy: admittingActors("person"),
|
|
1629
|
+
versioned: true,
|
|
1630
|
+
module: "admin-sdk",
|
|
1631
|
+
capability: "admin.invitationDomainRule"
|
|
1632
|
+
}),
|
|
1633
|
+
reissueInvitation: route({
|
|
1634
|
+
name: "reissueInvitation",
|
|
1635
|
+
method: "POST",
|
|
1636
|
+
path: "/invitation-reissues",
|
|
1637
|
+
group: "administration",
|
|
1638
|
+
selector: "none",
|
|
1639
|
+
subject: "none",
|
|
1640
|
+
idempotent: false,
|
|
1641
|
+
policy: admittingActors("person"),
|
|
1642
|
+
versioned: true,
|
|
1643
|
+
module: "admin-sdk",
|
|
1644
|
+
capability: "admin.invitationReissue"
|
|
1645
|
+
}),
|
|
1646
|
+
createPlatformInvitation: route({
|
|
1647
|
+
name: "createPlatformInvitation",
|
|
1648
|
+
method: "POST",
|
|
1649
|
+
path: "/platform-invitations",
|
|
1650
|
+
group: "administration",
|
|
1651
|
+
selector: "none",
|
|
1652
|
+
subject: "none",
|
|
1653
|
+
idempotent: false,
|
|
1654
|
+
policy: admittingActors("person"),
|
|
1655
|
+
versioned: true,
|
|
1656
|
+
module: "admin-sdk",
|
|
1657
|
+
capability: "admin.platformInvitation"
|
|
1658
|
+
}),
|
|
1659
|
+
listPlatformInvitations: route({ name: "listPlatformInvitations", method: "POST", path: "/platform-invitations/list", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.platformInvitationList" }),
|
|
1660
|
+
revokePlatformInvitation: route({ name: "revokePlatformInvitation", method: "POST", path: "/platform-invitation-revocations", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.platformInvitationRevocation" }),
|
|
1661
|
+
reissuePlatformInvitation: route({
|
|
1662
|
+
name: "reissuePlatformInvitation",
|
|
1663
|
+
method: "POST",
|
|
1664
|
+
path: "/platform-invitation-reissues",
|
|
1665
|
+
group: "administration",
|
|
1666
|
+
selector: "none",
|
|
1667
|
+
subject: "none",
|
|
1668
|
+
idempotent: false,
|
|
1669
|
+
policy: admittingActors("person"),
|
|
1670
|
+
versioned: true,
|
|
1671
|
+
module: "admin-sdk",
|
|
1672
|
+
capability: "admin.platformInvitationReissue"
|
|
1673
|
+
}),
|
|
1674
|
+
readWebOrigin: route({ name: "readWebOrigin", method: "POST", path: "/web-origin/read", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "service"), versioned: true, module: "admin-sdk", capability: "admin.webOrigin" }),
|
|
1675
|
+
readCallerCapabilities: route({ name: "readCallerCapabilities", method: "POST", path: "/caller-capabilities/read", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "admin-sdk", capability: "admin.callerCapabilities" }),
|
|
1676
|
+
queryGraph: route({ name: "queryGraph", method: "POST", path: "/objects/graph", group: "read", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.traverse" }),
|
|
1677
|
+
readStructure: route({ name: "readStructure", method: "POST", path: "/objects/structure", group: "read", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.traverse" }),
|
|
1678
|
+
findPaths: route({ name: "findPaths", method: "POST", path: "/objects/paths", group: "read", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.traverse" }),
|
|
1679
|
+
listProposals: route({ name: "listProposals", method: "POST", path: "/proposals/list", group: "read", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "app:client", "app:hosted"), versioned: true, module: "branches-sdk", capability: "branches.proposalList" }),
|
|
1680
|
+
readProposal: route({ name: "readProposal", method: "POST", path: "/proposals/read", group: "read", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "app:client", "app:hosted"), versioned: true, module: "branches-sdk", capability: "branches.proposalRead" }),
|
|
1681
|
+
refuseProposal: route({ name: "refuseProposal", method: "POST", path: "/proposal-refusals", group: "branch", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "app:client"), versioned: true, module: "branches-sdk", capability: "branches.proposalRefusal" }),
|
|
1682
|
+
approveProposal: route({ name: "approveProposal", method: "POST", path: "/proposal-approvals", group: "branch", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "branches-sdk", capability: "branches.proposalApproval" }),
|
|
1683
|
+
readBranchDiff: route({ name: "readBranchDiff", method: "POST", path: "/branches/diff", group: "read", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "service", "app:client", "app:hosted"), versioned: true, module: "branches-sdk", capability: "branches.proposalDiff" }),
|
|
1086
1684
|
readLinkStatus: route({
|
|
1087
1685
|
name: "readLinkStatus",
|
|
1088
1686
|
method: "POST",
|
|
@@ -1091,7 +1689,7 @@ var ROUTES = Object.freeze({
|
|
|
1091
1689
|
selector: "object",
|
|
1092
1690
|
subject: "project",
|
|
1093
1691
|
idempotent: false,
|
|
1094
|
-
|
|
1692
|
+
policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"),
|
|
1095
1693
|
versioned: true,
|
|
1096
1694
|
module: "objects-sdk",
|
|
1097
1695
|
capability: "links.status"
|
|
@@ -1104,7 +1702,7 @@ var ROUTES = Object.freeze({
|
|
|
1104
1702
|
selector: "project",
|
|
1105
1703
|
subject: "project",
|
|
1106
1704
|
idempotent: true,
|
|
1107
|
-
|
|
1705
|
+
policy: admittingActors("person", "agent:apply", "app:client", "service"),
|
|
1108
1706
|
versioned: true,
|
|
1109
1707
|
module: "objects-sdk",
|
|
1110
1708
|
capability: "links.clear"
|
|
@@ -1117,91 +1715,174 @@ var ROUTES = Object.freeze({
|
|
|
1117
1715
|
selector: "project",
|
|
1118
1716
|
subject: "project",
|
|
1119
1717
|
idempotent: false,
|
|
1120
|
-
|
|
1718
|
+
policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"),
|
|
1121
1719
|
versioned: true,
|
|
1122
1720
|
module: "branches-sdk",
|
|
1123
1721
|
capability: "branches.impact"
|
|
1124
1722
|
}),
|
|
1125
|
-
diffBranches: route({ name: "diffBranches", method: "POST", path: "/branches/difference", group: "read", selector: "project", subject: "project", idempotent: false,
|
|
1126
|
-
readBranchHistory: route({ name: "readBranchHistory", method: "POST", path: "/branches/history", group: "history", selector: "project", subject: "project", idempotent: false,
|
|
1127
|
-
listAudit: route({ name: "listAudit", method: "POST", path: "/audit", group: "history", selector: "project", subject: "project", idempotent: false,
|
|
1128
|
-
listOrganisationAudit: route({ name: "listOrganisationAudit", method: "POST", path: "/organisation-audit", group: "history", selector: "none", subject: "none", idempotent: false,
|
|
1129
|
-
readRefHead: route({ name: "readRefHead", method: "POST", path: "/branches/head", group: "read", selector: "project", subject: "project", idempotent: false,
|
|
1130
|
-
inspectBranchOperation: route({ name: "inspectBranchOperation", method: "POST", path: "/branch-inspections", group: "branch", selector: "project", subject: "project", idempotent: false,
|
|
1131
|
-
abandonBranch: route({ name: "abandonBranch", method: "POST", path: "/branch-abandonments", group: "branch", selector: "project", subject: "project", idempotent: true,
|
|
1132
|
-
addRefRule: route({ name: "addRefRule", method: "POST", path: "/ref-rules", group: "administration", selector: "project", subject: "project", idempotent: false,
|
|
1133
|
-
listRefRules: route({ name: "listRefRules", method: "POST", path: "/projects/ref-rules", group: "read", selector: "project", subject: "project", idempotent: false,
|
|
1134
|
-
removeRefRule: route({
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1723
|
+
diffBranches: route({ name: "diffBranches", method: "POST", path: "/branches/difference", group: "read", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "branches-sdk", capability: "branches.diff" }),
|
|
1724
|
+
readBranchHistory: route({ name: "readBranchHistory", method: "POST", path: "/branches/history", group: "history", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "branches-sdk", capability: "branches.history" }),
|
|
1725
|
+
listAudit: route({ name: "listAudit", method: "POST", path: "/audit", group: "history", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "agent:explore", "agent:apply", "agent:types"), versioned: true, module: "admin-sdk", capability: "admin.audit" }),
|
|
1726
|
+
listOrganisationAudit: route({ name: "listOrganisationAudit", method: "POST", path: "/organisation-audit", group: "history", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.organisationAudit" }),
|
|
1727
|
+
readRefHead: route({ name: "readRefHead", method: "POST", path: "/branches/head", group: "read", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "agent:types", "app:client", "app:hosted"), versioned: true, module: "branches-sdk", capability: "branches.head" }),
|
|
1728
|
+
inspectBranchOperation: route({ name: "inspectBranchOperation", method: "POST", path: "/branch-inspections", group: "branch", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person", "service", "app:client"), versioned: true, module: "branches-sdk", capability: "branches.inspection" }),
|
|
1729
|
+
abandonBranch: route({ name: "abandonBranch", method: "POST", path: "/branch-abandonments", group: "branch", selector: "project", subject: "project", idempotent: true, policy: admittingActors("person", "service", "app:client"), versioned: true, module: "branches-sdk", capability: "branches.abandonment" }),
|
|
1730
|
+
addRefRule: route({ name: "addRefRule", method: "POST", path: "/ref-rules", group: "administration", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.ref-rules" }),
|
|
1731
|
+
listRefRules: route({ name: "listRefRules", method: "POST", path: "/projects/ref-rules", group: "read", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.ref-rules" }),
|
|
1732
|
+
removeRefRule: route({
|
|
1733
|
+
name: "removeRefRule",
|
|
1734
|
+
method: "POST",
|
|
1735
|
+
path: "/ref-rule-removals",
|
|
1736
|
+
group: "administration",
|
|
1737
|
+
selector: "project",
|
|
1738
|
+
subject: "project",
|
|
1739
|
+
idempotent: false,
|
|
1740
|
+
policy: admittingActors("person"),
|
|
1741
|
+
versioned: true,
|
|
1742
|
+
module: "admin-sdk",
|
|
1743
|
+
capability: "admin.ref-rules"
|
|
1744
|
+
}),
|
|
1745
|
+
updateRefRule: route({ name: "updateRefRule", method: "POST", path: "/ref-rule-updates", group: "administration", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.ref-rules" }),
|
|
1746
|
+
addOrganisationRule: route({ name: "addOrganisationRule", method: "POST", path: "/organisation-ref-rules", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.organisation-ref-rules" }),
|
|
1747
|
+
listOrganisationRules: route({ name: "listOrganisationRules", method: "POST", path: "/organisation-ref-rules/list", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.organisation-ref-rules" }),
|
|
1748
|
+
removeOrganisationRule: route({
|
|
1749
|
+
name: "removeOrganisationRule",
|
|
1750
|
+
method: "POST",
|
|
1751
|
+
path: "/organisation-ref-rule-removals",
|
|
1752
|
+
group: "administration",
|
|
1753
|
+
selector: "none",
|
|
1754
|
+
subject: "none",
|
|
1755
|
+
idempotent: false,
|
|
1756
|
+
policy: admittingActors("person"),
|
|
1757
|
+
versioned: true,
|
|
1758
|
+
module: "admin-sdk",
|
|
1759
|
+
capability: "admin.organisation-ref-rules"
|
|
1760
|
+
}),
|
|
1761
|
+
updateOrganisationRule: route({ name: "updateOrganisationRule", method: "POST", path: "/organisation-ref-rule-updates", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.organisation-ref-rules" }),
|
|
1762
|
+
createOrganisationRef: route({ name: "createOrganisationRef", method: "POST", path: "/organisation-refs", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.organisation-refs" }),
|
|
1763
|
+
listOrganisationRefs: route({ name: "listOrganisationRefs", method: "POST", path: "/organisation-refs/list", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.organisation-refs" }),
|
|
1764
|
+
deleteOrganisationRef: route({
|
|
1765
|
+
name: "deleteOrganisationRef",
|
|
1766
|
+
method: "POST",
|
|
1767
|
+
path: "/organisation-ref-deletions",
|
|
1768
|
+
group: "administration",
|
|
1769
|
+
selector: "none",
|
|
1770
|
+
subject: "none",
|
|
1771
|
+
idempotent: false,
|
|
1772
|
+
policy: admittingActors("person"),
|
|
1773
|
+
versioned: true,
|
|
1774
|
+
module: "admin-sdk",
|
|
1775
|
+
capability: "admin.organisation-refs"
|
|
1776
|
+
}),
|
|
1777
|
+
markOrganisationRefReadOnly: route({ name: "markOrganisationRefReadOnly", method: "POST", path: "/organisation-ref-read-only", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.organisation-refs" }),
|
|
1778
|
+
setObjectLock: route({
|
|
1779
|
+
name: "setObjectLock",
|
|
1780
|
+
method: "POST",
|
|
1781
|
+
path: "/object-locks",
|
|
1782
|
+
group: "write",
|
|
1783
|
+
selector: "object",
|
|
1784
|
+
subject: "project",
|
|
1785
|
+
idempotent: false,
|
|
1786
|
+
policy: admittingActors("person"),
|
|
1787
|
+
versioned: true,
|
|
1788
|
+
module: "objects-sdk",
|
|
1789
|
+
capability: "objects.locks"
|
|
1790
|
+
}),
|
|
1791
|
+
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" }),
|
|
1792
|
+
setAgentCeiling: route({
|
|
1793
|
+
name: "setAgentCeiling",
|
|
1794
|
+
method: "POST",
|
|
1795
|
+
path: "/agent-ceiling",
|
|
1796
|
+
group: "administration",
|
|
1797
|
+
selector: "project",
|
|
1798
|
+
subject: "project",
|
|
1799
|
+
idempotent: false,
|
|
1800
|
+
policy: admittingActors("person"),
|
|
1801
|
+
versioned: true,
|
|
1802
|
+
module: "admin-sdk",
|
|
1803
|
+
capability: "admin.agent-ceiling"
|
|
1804
|
+
}),
|
|
1805
|
+
requestSchemaUpdate: route({ name: "requestSchemaUpdate", method: "POST", path: "/schema-update-requests", group: "branch", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "branches-sdk", capability: "branches.schema-update" }),
|
|
1806
|
+
readSchemaUpdateRequest: route({ name: "readSchemaUpdateRequest", method: "POST", path: "/schema-update-requests/read", group: "branch", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "branches-sdk", capability: "branches.schema-update" }),
|
|
1807
|
+
openAgentSession: route({ name: "openAgentSession", method: "POST", path: "/agent-sessions", group: "agent", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "agents-sdk", capability: "agents.session" }),
|
|
1808
|
+
listAgentSessions: route({ name: "listAgentSessions", method: "POST", path: "/agent-sessions/list", group: "agent", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "agents-sdk", capability: "agents.sessionList" }),
|
|
1809
|
+
readAgentSession: route({ name: "readAgentSession", method: "POST", path: "/agent-sessions/read", group: "agent", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "agents-sdk", capability: "agents.sessionRead" }),
|
|
1810
|
+
sendMessage: route({ name: "sendMessage", method: "POST", path: "/agent-messages", group: "agent", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "agents-sdk", capability: "agents.message" }),
|
|
1811
|
+
answerPlan: route({ name: "answerPlan", method: "POST", path: "/agent-plan-answers", group: "agent", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "agents-sdk", capability: "agents.planAnswer" }),
|
|
1812
|
+
stopRun: route({ name: "stopRun", method: "POST", path: "/agent-run-stops", group: "agent", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "agents-sdk", capability: "agents.runStop" }),
|
|
1813
|
+
closePlan: route({ name: "closePlan", method: "POST", path: "/agent-plan-closes", group: "agent", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "agents-sdk", capability: "agents.planClose" }),
|
|
1814
|
+
sendMessageStreamed: route({ name: "sendMessageStreamed", method: "POST", path: "/agent-messages/stream", group: "agent", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "agents-sdk", capability: "agents.messageStreamed" }),
|
|
1815
|
+
answerPlanStreamed: route({ name: "answerPlanStreamed", method: "POST", path: "/agent-plan-answers/stream", group: "agent", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "agents-sdk", capability: "agents.planAnswerStreamed" }),
|
|
1816
|
+
createProject: route({ name: "createProject", method: "POST", path: "/project-creations", group: "administration", selector: "none", subject: "none", idempotent: true, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.projects" }),
|
|
1817
|
+
createOrganisation: route({ name: "createOrganisation", method: "POST", path: "/organisation-creations", group: "administration", selector: "none", subject: "creating", idempotent: true, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.organisations" }),
|
|
1818
|
+
openChangeSet: route({ name: "openChangeSet", method: "POST", path: "/change-sets", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "agent:types"), versioned: true, module: "ontology-sdk", capability: "ontology.draft" }),
|
|
1819
|
+
readCurrentChangeSet: route({ name: "readCurrentChangeSet", method: "POST", path: "/change-sets/current", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "agent:types"), versioned: true, module: "ontology-sdk", capability: "ontology.draft" }),
|
|
1820
|
+
readChangeSet: route({ name: "readChangeSet", method: "POST", path: "/change-sets/read", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "agent:types"), versioned: true, module: "ontology-sdk", capability: "ontology.draft" }),
|
|
1821
|
+
readChangeSetState: route({ name: "readChangeSetState", method: "POST", path: "/change-sets/state", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "agent:types"), versioned: true, module: "ontology-sdk", capability: "ontology.draft" }),
|
|
1822
|
+
reviseChangeSet: route({ name: "reviseChangeSet", method: "POST", path: "/change-sets/revisions", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "agent:types"), versioned: true, module: "ontology-sdk", capability: "ontology.draft" }),
|
|
1823
|
+
validateChangeSet: route({ name: "validateChangeSet", method: "POST", path: "/change-sets/validation", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "agent:types"), versioned: true, module: "ontology-sdk", capability: "ontology.draft" }),
|
|
1824
|
+
discardChangeSet: route({ name: "discardChangeSet", method: "POST", path: "/change-set-discards", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "ontology-sdk", capability: "ontology.publish" }),
|
|
1825
|
+
acceptChangeSet: route({ name: "acceptChangeSet", method: "POST", path: "/change-set-acceptances", group: "administration", selector: "none", subject: "none", idempotent: true, policy: admittingActors("person"), versioned: true, module: "ontology-sdk", capability: "ontology.publish" }),
|
|
1826
|
+
readApp: route({ name: "readApp", method: "POST", path: "/apps/read", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "agent:types", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.catalogue" }),
|
|
1827
|
+
openAppDraft: route({ name: "openAppDraft", method: "POST", path: "/app-drafts", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "agent:types"), versioned: true, module: "ontology-sdk", capability: "ontology.draft" }),
|
|
1828
|
+
readAppDraft: route({ name: "readAppDraft", method: "POST", path: "/app-drafts/read", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "agent:types"), versioned: true, module: "ontology-sdk", capability: "ontology.draft" }),
|
|
1829
|
+
reviseAppDraft: route({ name: "reviseAppDraft", method: "POST", path: "/app-drafts/revisions", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "agent:types"), versioned: true, module: "ontology-sdk", capability: "ontology.draft" }),
|
|
1830
|
+
acceptAppDraft: route({ name: "acceptAppDraft", method: "POST", path: "/app-draft-acceptances", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "ontology-sdk", capability: "ontology.publish" }),
|
|
1831
|
+
listApps: route({ name: "listApps", method: "POST", path: "/apps", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "agent:types", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.catalogue" }),
|
|
1832
|
+
validateAppDraft: route({ name: "validateAppDraft", method: "POST", path: "/app-drafts/validation", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "agent:types"), versioned: true, module: "ontology-sdk", capability: "ontology.draft" }),
|
|
1833
|
+
discardAppDraft: route({ name: "discardAppDraft", method: "POST", path: "/app-draft-discards", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "ontology-sdk", capability: "ontology.publish" }),
|
|
1834
|
+
searchPeople: route({ name: "searchPeople", method: "POST", path: "/people/search", group: "read", selector: "none", subject: "display-names", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "people.search" }),
|
|
1835
|
+
searchObjectReaders: route({ name: "searchObjectReaders", method: "POST", path: "/objects/readers", group: "read", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "people.objectReaders" }),
|
|
1836
|
+
listSubscribers: route({ name: "listSubscribers", method: "POST", path: "/objects/subscribers", group: "read", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "discussion.subscribers" }),
|
|
1837
|
+
addSubscriber: route({ name: "addSubscriber", method: "POST", path: "/objects/subscribers/add", group: "write", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "discussion.subscriberChange" }),
|
|
1838
|
+
removeSubscriber: route({ name: "removeSubscriber", method: "POST", path: "/objects/subscribers/remove", group: "write", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "discussion.subscriberChange" }),
|
|
1839
|
+
listComments: route({ name: "listComments", method: "POST", path: "/objects/comments", group: "read", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "discussion.comments" }),
|
|
1840
|
+
acquireDraft: route({ name: "acquireDraft", method: "POST", path: "/objects/drafts/acquire", group: "write", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "agent:apply", "app:client"), versioned: true, module: "objects-sdk", capability: "objects.write" }),
|
|
1841
|
+
saveDraft: route({ name: "saveDraft", method: "POST", path: "/objects/drafts/save", group: "write", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "agent:apply", "app:client"), versioned: true, module: "objects-sdk", capability: "objects.write" }),
|
|
1842
|
+
promoteDraft: route({ name: "promoteDraft", method: "POST", path: "/objects/drafts/promote", group: "write", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "agent:apply", "app:client"), versioned: true, module: "objects-sdk", capability: "objects.write" }),
|
|
1843
|
+
releaseDraft: route({ name: "releaseDraft", method: "POST", path: "/objects/drafts/release", group: "write", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "agent:apply", "app:client"), versioned: true, module: "objects-sdk", capability: "objects.write" }),
|
|
1844
|
+
discardDraft: route({ name: "discardDraft", method: "POST", path: "/objects/drafts/discard", group: "write", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "agent:apply", "app:client"), versioned: true, module: "objects-sdk", capability: "objects.write" }),
|
|
1845
|
+
breakDraftLock: route({ name: "breakDraftLock", method: "POST", path: "/objects/drafts/break", group: "write", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "objects-sdk", capability: "objects.draftAdmin" }),
|
|
1846
|
+
readDraftLock: route({ name: "readDraftLock", method: "POST", path: "/objects/drafts/lock", group: "read", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.read" }),
|
|
1847
|
+
restoreDraft: route({ name: "restoreDraft", method: "POST", path: "/draft-restorations", group: "write", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "objects-sdk", capability: "objects.draftAdmin" }),
|
|
1848
|
+
setCommentResolved: route({ name: "setCommentResolved", method: "POST", path: "/objects/comments/resolve", group: "write", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "objects-sdk", capability: "discussion.commentWrite" }),
|
|
1849
|
+
addComment: route({ name: "addComment", method: "POST", path: "/objects/comments/add", group: "write", selector: "object", subject: "project", idempotent: true, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "discussion.commentWrite" }),
|
|
1850
|
+
createConnection: route({ name: "createConnection", method: "POST", path: "/connections", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.connectionCreation" }),
|
|
1851
|
+
listConnections: route({ name: "listConnections", method: "POST", path: "/connections/list", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.connections" }),
|
|
1852
|
+
setConnectionCredential: route({
|
|
1853
|
+
name: "setConnectionCredential",
|
|
1854
|
+
method: "POST",
|
|
1855
|
+
path: "/connections/credential",
|
|
1856
|
+
group: "administration",
|
|
1857
|
+
selector: "connection",
|
|
1858
|
+
subject: "connection",
|
|
1859
|
+
idempotent: false,
|
|
1860
|
+
policy: admittingActors("person"),
|
|
1861
|
+
versioned: true,
|
|
1862
|
+
module: "admin-sdk",
|
|
1863
|
+
capability: "admin.connectionCredential"
|
|
1864
|
+
}),
|
|
1865
|
+
readConnectionIdentity: route({ name: "readConnectionIdentity", method: "POST", path: "/connections/identity", group: "read", selector: "connection", subject: "connection", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.connectionIdentity" }),
|
|
1866
|
+
draftConnectorTypes: route({ name: "draftConnectorTypes", method: "POST", path: "/connections/types", group: "administration", selector: "connection", subject: "connection", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.connectorTypes" }),
|
|
1867
|
+
revokeConnection: route({ name: "revokeConnection", method: "POST", path: "/connection-revocations", group: "administration", selector: "connection", subject: "connection", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.connectionRevocation" }),
|
|
1868
|
+
startImportRun: route({ name: "startImportRun", method: "POST", path: "/import-runs", group: "write", selector: "connection", subject: "connection", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.importRunStart" }),
|
|
1869
|
+
listImportRuns: route({ name: "listImportRuns", method: "POST", path: "/import-runs/list", group: "read", selector: "connection", subject: "connection", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.importRuns" }),
|
|
1870
|
+
closeImportRun: route({ name: "closeImportRun", method: "POST", path: "/import-run-closes", group: "write", selector: "connection", subject: "connection", idempotent: false, policy: admittingActors("service", "person"), versioned: true, module: "admin-sdk", capability: "admin.importRunClose" }),
|
|
1871
|
+
createHostedApp: route({ name: "createHostedApp", method: "POST", path: "/hosted-apps", group: "administration", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.app" }),
|
|
1872
|
+
publishHostedVersion: route({ name: "publishHostedVersion", method: "POST", path: "/hosted-apps/versions", group: "administration", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.publish" }),
|
|
1873
|
+
readHostedBundle: route({ name: "readHostedBundle", method: "POST", path: "/hosted-apps/bundle", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.bundle" }),
|
|
1874
|
+
listHostedApps: route({ name: "listHostedApps", method: "POST", path: "/hosted-apps/list", group: "read", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.apps" }),
|
|
1875
|
+
listHostedVersions: route({ name: "listHostedVersions", method: "POST", path: "/hosted-apps/versions/list", group: "read", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.versions" }),
|
|
1876
|
+
revokeHostedApp: route({ name: "revokeHostedApp", method: "POST", path: "/hosted-app-revocations", group: "administration", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.appRevocation" }),
|
|
1877
|
+
revokeHostedVersion: route({ name: "revokeHostedVersion", method: "POST", path: "/hosted-version-revocations", group: "administration", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.versionRevocation" }),
|
|
1878
|
+
openHostedApp: route({ name: "openHostedApp", method: "POST", path: "/hosted-app-launches", group: "administration", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.launch" }),
|
|
1879
|
+
endHostedLaunch: route({ name: "endHostedLaunch", method: "POST", path: "/hosted-app-launch-ends", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.launchEnd" }),
|
|
1880
|
+
mintHostedAppToken: route({ name: "mintHostedAppToken", method: "POST", path: "/hosted-app-tokens", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.token" }),
|
|
1881
|
+
setHostedOneWallSwitch: route({ name: "setHostedOneWallSwitch", method: "POST", path: "/hosted-one-wall-switch", group: "administration", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.oneWallSwitch" }),
|
|
1882
|
+
readHostedOneWallSwitch: route({ name: "readHostedOneWallSwitch", method: "POST", path: "/hosted-one-wall-switch/read", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.oneWallSwitchRead" }),
|
|
1883
|
+
grantHostedOneWall: route({ name: "grantHostedOneWall", method: "POST", path: "/hosted-one-wall-grants", group: "administration", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.oneWallGrant" }),
|
|
1884
|
+
withdrawHostedOneWall: route({ name: "withdrawHostedOneWall", method: "POST", path: "/hosted-one-wall-withdrawals", group: "administration", selector: "project", subject: "project", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.oneWallWithdrawal" }),
|
|
1885
|
+
listHostedOneWallGrants: route({ name: "listHostedOneWallGrants", method: "POST", path: "/hosted-one-wall-grants/list", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.oneWallGrants" })
|
|
1205
1886
|
});
|
|
1206
1887
|
var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
|
|
1207
1888
|
createObjectSet: false,
|
|
@@ -1210,6 +1891,8 @@ var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
|
|
|
1210
1891
|
updateObjectSet: false,
|
|
1211
1892
|
deleteObjectSet: false,
|
|
1212
1893
|
health: false,
|
|
1894
|
+
webSignInStart: false,
|
|
1895
|
+
webRedeem: true,
|
|
1213
1896
|
signInStart: false,
|
|
1214
1897
|
signInCallback: true,
|
|
1215
1898
|
redeem: true,
|
|
@@ -1227,6 +1910,11 @@ var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
|
|
|
1227
1910
|
decideConsent: false,
|
|
1228
1911
|
listConnectedApps: false,
|
|
1229
1912
|
revokeConnectedApp: false,
|
|
1913
|
+
readStepUpRequest: false,
|
|
1914
|
+
confirmStepUp: false,
|
|
1915
|
+
readStepUpProof: true,
|
|
1916
|
+
enterHumanMode: false,
|
|
1917
|
+
readSessionStatus: false,
|
|
1230
1918
|
stageAttachment: false,
|
|
1231
1919
|
readAttachment: false,
|
|
1232
1920
|
readObject: false,
|
|
@@ -1282,6 +1970,7 @@ var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
|
|
|
1282
1970
|
listProposals: false,
|
|
1283
1971
|
readProposal: false,
|
|
1284
1972
|
refuseProposal: false,
|
|
1973
|
+
approveProposal: false,
|
|
1285
1974
|
readBranchDiff: false,
|
|
1286
1975
|
readLinkStatus: false,
|
|
1287
1976
|
clearLinks: false,
|
|
@@ -1296,9 +1985,11 @@ var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
|
|
|
1296
1985
|
addRefRule: false,
|
|
1297
1986
|
listRefRules: false,
|
|
1298
1987
|
removeRefRule: false,
|
|
1988
|
+
updateRefRule: false,
|
|
1299
1989
|
addOrganisationRule: false,
|
|
1300
1990
|
listOrganisationRules: false,
|
|
1301
1991
|
removeOrganisationRule: false,
|
|
1992
|
+
updateOrganisationRule: false,
|
|
1302
1993
|
createOrganisationRef: false,
|
|
1303
1994
|
listOrganisationRefs: false,
|
|
1304
1995
|
deleteOrganisationRef: false,
|
|
@@ -1341,6 +2032,15 @@ var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
|
|
|
1341
2032
|
addSubscriber: false,
|
|
1342
2033
|
removeSubscriber: false,
|
|
1343
2034
|
listComments: false,
|
|
2035
|
+
acquireDraft: false,
|
|
2036
|
+
saveDraft: false,
|
|
2037
|
+
promoteDraft: false,
|
|
2038
|
+
releaseDraft: false,
|
|
2039
|
+
discardDraft: false,
|
|
2040
|
+
breakDraftLock: false,
|
|
2041
|
+
readDraftLock: false,
|
|
2042
|
+
restoreDraft: false,
|
|
2043
|
+
setCommentResolved: false,
|
|
1344
2044
|
addComment: false,
|
|
1345
2045
|
createConnection: false,
|
|
1346
2046
|
listConnections: false,
|
|
@@ -1443,6 +2143,13 @@ function attachmentNameHeader(name) {
|
|
|
1443
2143
|
return `UTF-8''${encodeURIComponent(name).replace(/[!'()*]/g, (character) => `%${character.charCodeAt(0).toString(16).toUpperCase()}`)}`;
|
|
1444
2144
|
}
|
|
1445
2145
|
|
|
2146
|
+
// packages/api-contract/dist/actor-kind-label.js
|
|
2147
|
+
var ACTOR_KIND_LABELS = Object.freeze({
|
|
2148
|
+
"run-explore": "agent:explore",
|
|
2149
|
+
"run-apply": "agent:apply",
|
|
2150
|
+
"run-types": "agent:types"
|
|
2151
|
+
});
|
|
2152
|
+
|
|
1446
2153
|
// packages/api-contract/dist/links.js
|
|
1447
2154
|
var MAX_CLEAR_ENTRIES = 100;
|
|
1448
2155
|
|
|
@@ -1503,6 +2210,31 @@ function responseOf(status, body, reason, headers = {}) {
|
|
|
1503
2210
|
});
|
|
1504
2211
|
}
|
|
1505
2212
|
|
|
2213
|
+
// packages/sdk-dispatch/dist/step-up.js
|
|
2214
|
+
function stepUpHeaders(route2, attempt) {
|
|
2215
|
+
if (!owesStepUp(route2.policy)) {
|
|
2216
|
+
throw new Error(`the route ${route2.name} owes no step-up and takes no step-up attempt`);
|
|
2217
|
+
}
|
|
2218
|
+
const headers = {};
|
|
2219
|
+
if (route2.idempotent) {
|
|
2220
|
+
if (attempt.key !== null) {
|
|
2221
|
+
throw new Error(`the route ${route2.name} is idempotent and its idempotency key is its step-up key`);
|
|
2222
|
+
}
|
|
2223
|
+
} else {
|
|
2224
|
+
if (attempt.key === null) {
|
|
2225
|
+
throw new Error(`the route ${route2.name} is not idempotent and a step-up attempt on it carries a key`);
|
|
2226
|
+
}
|
|
2227
|
+
if (!IDEMPOTENCY_KEY_PATTERN.test(attempt.key)) {
|
|
2228
|
+
throw new Error("a step-up key is one to 128 characters of letters, numerals, '.', '_', '~' and '-'");
|
|
2229
|
+
}
|
|
2230
|
+
headers[STEP_UP_KEY_HEADER] = attempt.key;
|
|
2231
|
+
}
|
|
2232
|
+
if (attempt.proof !== null) {
|
|
2233
|
+
headers[STEP_UP_HEADER] = attempt.proof;
|
|
2234
|
+
}
|
|
2235
|
+
return headers;
|
|
2236
|
+
}
|
|
2237
|
+
|
|
1506
2238
|
// packages/sdk-dispatch/dist/explain.js
|
|
1507
2239
|
var BOUND_LABEL = {
|
|
1508
2240
|
"request-body": "the request-body size",
|
|
@@ -1529,7 +2261,21 @@ function withMeaning(explanation, detail) {
|
|
|
1529
2261
|
function explainClass(refusalClass) {
|
|
1530
2262
|
return Object.freeze({ explanation: BY_CLASS[refusalClass], explains: "class" });
|
|
1531
2263
|
}
|
|
1532
|
-
function
|
|
2264
|
+
function attachmentCreationExplanation(rule, violations) {
|
|
2265
|
+
if (rule !== "invalid-properties" || !Array.isArray(violations) || !violations.some((value) => typeof value === "object" && value !== null && "rule" in value && value.rule === "attachment-requires-object"))
|
|
2266
|
+
return void 0;
|
|
2267
|
+
return Object.freeze({
|
|
2268
|
+
explanation: {
|
|
2269
|
+
meaning: "An attachment needs an existing object.",
|
|
2270
|
+
next: [{ option: "Create the object first, then stage and save its attachment." }]
|
|
2271
|
+
},
|
|
2272
|
+
explains: "rule"
|
|
2273
|
+
});
|
|
2274
|
+
}
|
|
2275
|
+
function explainResultRefusal(rule, refusalClass, violations) {
|
|
2276
|
+
const attachment = attachmentCreationExplanation(rule, violations);
|
|
2277
|
+
if (attachment !== void 0)
|
|
2278
|
+
return attachment;
|
|
1533
2279
|
if (Object.hasOwn(BY_API_RULE, rule)) {
|
|
1534
2280
|
return Object.freeze({ explanation: BY_API_RULE[rule], explains: "rule" });
|
|
1535
2281
|
}
|
|
@@ -1549,6 +2295,9 @@ function explainRefused(refusal2, request3) {
|
|
|
1549
2295
|
return Object.freeze({ explanation: withMeaning(explanation, `The requested ref name is ${JSON.stringify(name)}.`), explains: hasRuleExplanation ? "rule" : "class" });
|
|
1550
2296
|
}
|
|
1551
2297
|
}
|
|
2298
|
+
const attachment = attachmentCreationExplanation(refusal2.rule, refusal2.violations);
|
|
2299
|
+
if (attachment !== void 0)
|
|
2300
|
+
return attachment;
|
|
1552
2301
|
if (refusal2.rule === "malformed-query" && refusal2.violations.length > 0) {
|
|
1553
2302
|
const paths = refusal2.violations.map((violation) => violation.path.join(".") || "the request").join(", ");
|
|
1554
2303
|
return Object.freeze({ explanation: withMeaning(explanation, `Invalid field path: ${paths}.`), explains: hasRuleExplanation ? "rule" : "class" });
|
|
@@ -1612,7 +2361,7 @@ function explainedEnvelopeOf(envelope, request3) {
|
|
|
1612
2361
|
if (!("rule" in result) || typeof result.rule !== "string") {
|
|
1613
2362
|
throw new Error("a refused result arm named no rule, which the host records for every refusal");
|
|
1614
2363
|
}
|
|
1615
|
-
return { version: envelope.version, result: Object.freeze({ ...result, ...explainResultRefusal(result.rule, result.class) }) };
|
|
2364
|
+
return { version: envelope.version, result: Object.freeze({ ...result, ...explainResultRefusal(result.rule, result.class, "violations" in result ? result.violations : void 0) }) };
|
|
1616
2365
|
}
|
|
1617
2366
|
function unauthenticatedEnvelope() {
|
|
1618
2367
|
return { version: PROTOCOL_VERSION, refusal: explainedRefusalOf({ kind: "unauthenticated" }), correlationId: null };
|
|
@@ -2001,7 +2750,7 @@ async function requestBodyOf(route2, body, headers) {
|
|
|
2001
2750
|
}
|
|
2002
2751
|
return bytes;
|
|
2003
2752
|
}
|
|
2004
|
-
async function call(transport, origin, route2, body, token, idempotencyKey) {
|
|
2753
|
+
async function call(transport, origin, route2, body, token, idempotencyKey, stepUp = null) {
|
|
2005
2754
|
const entry2 = ROUTES[route2];
|
|
2006
2755
|
if (entry2.idempotent !== (idempotencyKey !== null)) {
|
|
2007
2756
|
throw new Error(entry2.idempotent ? `the route ${route2} is idempotent and takes an idempotency key` : `the route ${route2} is not idempotent and takes no idempotency key`);
|
|
@@ -2010,7 +2759,7 @@ async function call(transport, origin, route2, body, token, idempotencyKey) {
|
|
|
2010
2759
|
"content-type": "application/json",
|
|
2011
2760
|
[VERSION_HEADER]: String(PROTOCOL_VERSION)
|
|
2012
2761
|
};
|
|
2013
|
-
if (entry2.
|
|
2762
|
+
if ("actors" in entry2.policy) {
|
|
2014
2763
|
if (token === null) {
|
|
2015
2764
|
return unauthenticatedEnvelope();
|
|
2016
2765
|
}
|
|
@@ -2019,6 +2768,9 @@ async function call(transport, origin, route2, body, token, idempotencyKey) {
|
|
|
2019
2768
|
if (idempotencyKey !== null) {
|
|
2020
2769
|
headers[IDEMPOTENCY_HEADER] = idempotencyKey;
|
|
2021
2770
|
}
|
|
2771
|
+
if (stepUp !== null) {
|
|
2772
|
+
Object.assign(headers, stepUpHeaders(entry2, stepUp));
|
|
2773
|
+
}
|
|
2022
2774
|
const sent = await requestBodyOf(route2, body, headers);
|
|
2023
2775
|
const response = await transport(`${origin}${entry2.path}`, { method: entry2.method, headers, body: sent });
|
|
2024
2776
|
return explainedEnvelopeOf(await readEnvelope(response, entry2.path), body);
|
|
@@ -2039,7 +2791,7 @@ function isEnvelopeShaped(value) {
|
|
|
2039
2791
|
}
|
|
2040
2792
|
async function* callStreamed(transport, origin, route2, body, token, signal) {
|
|
2041
2793
|
const entry2 = ROUTES[route2];
|
|
2042
|
-
if (
|
|
2794
|
+
if ("none" in entry2.policy) {
|
|
2043
2795
|
throw new Error(`the streamed route ${route2} admits no token, which no streamed route does today`);
|
|
2044
2796
|
}
|
|
2045
2797
|
if (token === null) {
|
|
@@ -2131,7 +2883,7 @@ function freezeDoc(doc2) {
|
|
|
2131
2883
|
return Object.freeze({ does: doc2.does, refuses: Object.freeze([...doc2.refuses]) });
|
|
2132
2884
|
}
|
|
2133
2885
|
function methodOf(entry2, transport, origin, token) {
|
|
2134
|
-
const send = async (body, idempotencyKey = null) => {
|
|
2886
|
+
const send = async (body, idempotencyKey = null, stepUp = null) => {
|
|
2135
2887
|
if (entry2.idempotent !== (idempotencyKey !== null)) {
|
|
2136
2888
|
throw new Error(entry2.idempotent ? `the entry ${entry2.name} is idempotent and takes an idempotency key` : `the entry ${entry2.name} is not idempotent and takes no idempotency key`);
|
|
2137
2889
|
}
|
|
@@ -2139,7 +2891,7 @@ function methodOf(entry2, transport, origin, token) {
|
|
|
2139
2891
|
"content-type": "application/json",
|
|
2140
2892
|
[VERSION_HEADER]: String(PROTOCOL_VERSION)
|
|
2141
2893
|
};
|
|
2142
|
-
if (entry2.
|
|
2894
|
+
if ("actors" in entry2.policy) {
|
|
2143
2895
|
if (token === null) {
|
|
2144
2896
|
return unauthenticatedEnvelope();
|
|
2145
2897
|
}
|
|
@@ -2148,6 +2900,9 @@ function methodOf(entry2, transport, origin, token) {
|
|
|
2148
2900
|
if (idempotencyKey !== null) {
|
|
2149
2901
|
headers[IDEMPOTENCY_HEADER] = idempotencyKey;
|
|
2150
2902
|
}
|
|
2903
|
+
if (stepUp !== null) {
|
|
2904
|
+
Object.assign(headers, stepUpHeaders(entry2, stepUp));
|
|
2905
|
+
}
|
|
2151
2906
|
const response = await transport(`${origin}${entry2.path}`, { method: entry2.method, headers, body: JSON.stringify(body) });
|
|
2152
2907
|
return explainedEnvelopeOf(await readEnvelope(response, entry2.path), body);
|
|
2153
2908
|
};
|
|
@@ -2275,6 +3030,109 @@ function createHttpsTransport(origin, options = {}, deadlineMs) {
|
|
|
2275
3030
|
};
|
|
2276
3031
|
}
|
|
2277
3032
|
|
|
3033
|
+
// packages/sdk-dispatch/dist/step-up-road.js
|
|
3034
|
+
var POLL_INTERVAL_MS = 2e3;
|
|
3035
|
+
var POLL_LIMIT_MS = 31e4;
|
|
3036
|
+
function refusalOf(body) {
|
|
3037
|
+
if (typeof body !== "object" || body === null || !("refusal" in body)) {
|
|
3038
|
+
return null;
|
|
3039
|
+
}
|
|
3040
|
+
const refusal2 = body.refusal;
|
|
3041
|
+
return typeof refusal2 === "object" && refusal2 !== null ? refusal2 : null;
|
|
3042
|
+
}
|
|
3043
|
+
function replayed(first, body) {
|
|
3044
|
+
return {
|
|
3045
|
+
status: first.status,
|
|
3046
|
+
...first.reason === void 0 ? {} : { reason: first.reason },
|
|
3047
|
+
header: (name) => first.header(name),
|
|
3048
|
+
bytes: () => first.bytes(),
|
|
3049
|
+
json: async () => body
|
|
3050
|
+
};
|
|
3051
|
+
}
|
|
3052
|
+
function freshKey() {
|
|
3053
|
+
return `cli-${crypto.randomUUID()}`;
|
|
3054
|
+
}
|
|
3055
|
+
async function post(transport, origin, route2, token, input) {
|
|
3056
|
+
const entry2 = ROUTES[route2];
|
|
3057
|
+
const response = await transport(`${origin}${entry2.path}`, {
|
|
3058
|
+
method: entry2.method,
|
|
3059
|
+
headers: { "content-type": "application/json", [VERSION_HEADER]: String(PROTOCOL_VERSION), [TOKEN_HEADER]: token },
|
|
3060
|
+
body: JSON.stringify({ input })
|
|
3061
|
+
});
|
|
3062
|
+
return { response, envelope: await readEnvelope(response, entry2.path) };
|
|
3063
|
+
}
|
|
3064
|
+
async function pollForProof(transport, origin, token, pendingId, road, signal) {
|
|
3065
|
+
const stopped = () => signal?.aborted === true;
|
|
3066
|
+
const stop = road.clock.now() + POLL_LIMIT_MS;
|
|
3067
|
+
while (road.clock.now() < stop) {
|
|
3068
|
+
if (stopped())
|
|
3069
|
+
return { state: "stopped" };
|
|
3070
|
+
const { response, envelope } = await post(transport, origin, "readStepUpProof", token, { pendingId });
|
|
3071
|
+
if (stopped())
|
|
3072
|
+
return { state: "stopped" };
|
|
3073
|
+
if ("refusal" in envelope) {
|
|
3074
|
+
return { state: "refused", response: replayed(response, envelope) };
|
|
3075
|
+
}
|
|
3076
|
+
if (road.clock.now() >= stop)
|
|
3077
|
+
return { state: "timed-out" };
|
|
3078
|
+
const result = envelope.result;
|
|
3079
|
+
if (result.state === "confirmed" && typeof result.proof === "string") {
|
|
3080
|
+
return { state: "confirmed", proof: result.proof };
|
|
3081
|
+
}
|
|
3082
|
+
if (result.state !== "awaiting") {
|
|
3083
|
+
throw new Error("the proof poll answered an unrecognised state");
|
|
3084
|
+
}
|
|
3085
|
+
await road.clock.wait(POLL_INTERVAL_MS);
|
|
3086
|
+
}
|
|
3087
|
+
return { state: "timed-out" };
|
|
3088
|
+
}
|
|
3089
|
+
function withStepUpRoad(transport, road) {
|
|
3090
|
+
return async (input, init) => {
|
|
3091
|
+
const path = new URL(input).pathname;
|
|
3092
|
+
const entry2 = Object.values(ROUTES).find((candidate) => candidate.path === path && candidate.method === init.method);
|
|
3093
|
+
if (entry2 === void 0 || !owesStepUp(entry2.policy)) {
|
|
3094
|
+
return transport(input, init);
|
|
3095
|
+
}
|
|
3096
|
+
const headers = { ...init.headers };
|
|
3097
|
+
if (!entry2.idempotent && headers[STEP_UP_KEY_HEADER] === void 0) {
|
|
3098
|
+
headers[STEP_UP_KEY_HEADER] = freshKey();
|
|
3099
|
+
}
|
|
3100
|
+
const first = await transport(input, { ...init, headers });
|
|
3101
|
+
if (first.status !== 403) {
|
|
3102
|
+
return first;
|
|
3103
|
+
}
|
|
3104
|
+
const body = await first.json();
|
|
3105
|
+
const refusal2 = refusalOf(body);
|
|
3106
|
+
if (refusal2 === null || refusal2.kind !== "refused" || refusal2.rule !== "step-up-required" || refusal2.pending === void 0) {
|
|
3107
|
+
return replayed(first, body);
|
|
3108
|
+
}
|
|
3109
|
+
const origin = new URL(input).origin;
|
|
3110
|
+
const token = headers[TOKEN_HEADER];
|
|
3111
|
+
const discovery = await post(transport, origin, "readWebOrigin", token, {});
|
|
3112
|
+
if ("refusal" in discovery.envelope) {
|
|
3113
|
+
return replayed(discovery.response, discovery.envelope);
|
|
3114
|
+
}
|
|
3115
|
+
const webOrigin = discovery.envelope.result.webOrigin;
|
|
3116
|
+
if (typeof webOrigin !== "string") {
|
|
3117
|
+
road.note("this action needs your confirmation in a browser, and this host has no web application configured to ask it in");
|
|
3118
|
+
return replayed(first, body);
|
|
3119
|
+
}
|
|
3120
|
+
road.announce(road.confirmAddress(refusal2.pending, webOrigin));
|
|
3121
|
+
road.note("this action needs your confirmation: open the address above and confirm; waiting");
|
|
3122
|
+
const polled = await pollForProof(transport, origin, token, refusal2.pending, road);
|
|
3123
|
+
if (polled.state === "refused") {
|
|
3124
|
+
return polled.response;
|
|
3125
|
+
}
|
|
3126
|
+
if (polled.state === "stopped")
|
|
3127
|
+
return replayed(first, body);
|
|
3128
|
+
if (polled.state === "timed-out") {
|
|
3129
|
+
road.note("the action was refused because nobody confirmed it in time; run the command again");
|
|
3130
|
+
return replayed(first, body);
|
|
3131
|
+
}
|
|
3132
|
+
return transport(input, { ...init, headers: { ...headers, [STEP_UP_HEADER]: polled.proof } });
|
|
3133
|
+
};
|
|
3134
|
+
}
|
|
3135
|
+
|
|
2278
3136
|
// packages/sdk-dispatch/dist/token-routes.js
|
|
2279
3137
|
async function redeem(transport, origin, body) {
|
|
2280
3138
|
return call(transport, origin, "redeem", body, null, null);
|
|
@@ -2294,6 +3152,12 @@ async function detachOrganisation(transport, origin, token, body) {
|
|
|
2294
3152
|
async function listOrganisations(transport, origin, token, body) {
|
|
2295
3153
|
return call(transport, origin, "listOrganisations", body, token, null);
|
|
2296
3154
|
}
|
|
3155
|
+
function readSessionStatus(transport, origin, token, body) {
|
|
3156
|
+
return call(transport, origin, "readSessionStatus", body, token, null);
|
|
3157
|
+
}
|
|
3158
|
+
function enterHumanMode(transport, origin, token, body, stepUp) {
|
|
3159
|
+
return call(transport, origin, "enterHumanMode", body, token, null, stepUp);
|
|
3160
|
+
}
|
|
2297
3161
|
|
|
2298
3162
|
// packages/sdk-core/dist/index.js
|
|
2299
3163
|
var SDK_CORE_ROUTE_ENTRIES = routeEntriesOf("sdk-core");
|
|
@@ -2339,9 +3203,11 @@ var ADMIN_ROUTE_NAMES = Object.freeze([
|
|
|
2339
3203
|
"addRefRule",
|
|
2340
3204
|
"listRefRules",
|
|
2341
3205
|
"removeRefRule",
|
|
3206
|
+
"updateRefRule",
|
|
2342
3207
|
"addOrganisationRule",
|
|
2343
3208
|
"listOrganisationRules",
|
|
2344
3209
|
"removeOrganisationRule",
|
|
3210
|
+
"updateOrganisationRule",
|
|
2345
3211
|
"createOrganisationRef",
|
|
2346
3212
|
"listOrganisationRefs",
|
|
2347
3213
|
"deleteOrganisationRef",
|
|
@@ -2401,6 +3267,7 @@ var BRANCHES_ROUTE_NAMES = Object.freeze([
|
|
|
2401
3267
|
"listProposals",
|
|
2402
3268
|
"readProposal",
|
|
2403
3269
|
"refuseProposal",
|
|
3270
|
+
"approveProposal",
|
|
2404
3271
|
"readBranchDiff",
|
|
2405
3272
|
"diffBranches",
|
|
2406
3273
|
"readChangeImpact",
|
|
@@ -2521,6 +3388,9 @@ function withViewState(address, state) {
|
|
|
2521
3388
|
function branchDiffAddress(organisationId, projectId, ref) {
|
|
2522
3389
|
return withSubject(`${projectBase(organisationId, projectId)}/branches/diff`, { ref, q: null });
|
|
2523
3390
|
}
|
|
3391
|
+
function stepUpAddress(pendingId) {
|
|
3392
|
+
return `/step-up?${new URLSearchParams({ pending: pendingId }).toString()}`;
|
|
3393
|
+
}
|
|
2524
3394
|
|
|
2525
3395
|
// packages/addresses/dist/links.js
|
|
2526
3396
|
var ORGANISATION_PAGES = Object.freeze([...ORGANISATION_ADMIN_PAGES, "settings"]);
|
|
@@ -2667,6 +3537,15 @@ var OBJECTS_ROUTE_NAMES = [
|
|
|
2667
3537
|
"removeSubscriber",
|
|
2668
3538
|
"listComments",
|
|
2669
3539
|
"addComment",
|
|
3540
|
+
"acquireDraft",
|
|
3541
|
+
"saveDraft",
|
|
3542
|
+
"promoteDraft",
|
|
3543
|
+
"releaseDraft",
|
|
3544
|
+
"discardDraft",
|
|
3545
|
+
"breakDraftLock",
|
|
3546
|
+
"readDraftLock",
|
|
3547
|
+
"restoreDraft",
|
|
3548
|
+
"setCommentResolved",
|
|
2670
3549
|
"readApp",
|
|
2671
3550
|
"listApps",
|
|
2672
3551
|
"setObjectLock"
|
|
@@ -3801,6 +4680,7 @@ function objectProspective(published) {
|
|
|
3801
4680
|
requiredPropertyKeys: stringListOf(published.requiredPropertyKeys, `${what} requiredPropertyKeys`),
|
|
3802
4681
|
presentationBindings: published.presentationBindings,
|
|
3803
4682
|
structureDeclaration: published.structureDeclaration,
|
|
4683
|
+
...published.bodyFormat === "markdown" ? { bodyFormat: published.bodyFormat } : {},
|
|
3804
4684
|
...published.subscriptionRoles === void 0 ? {} : { subscriptionRoles: published.subscriptionRoles }
|
|
3805
4685
|
};
|
|
3806
4686
|
}
|
|
@@ -4370,17 +5250,28 @@ function refusalLines(refusal2, settle2, request3, host, reference) {
|
|
|
4370
5250
|
}
|
|
4371
5251
|
}
|
|
4372
5252
|
if (refusal2.kind === "protocol-mismatch") {
|
|
4373
|
-
lines.push(
|
|
5253
|
+
lines.push(protocolUpdate(refusal2.versions.host).text);
|
|
4374
5254
|
}
|
|
4375
5255
|
if (reference !== void 0) {
|
|
4376
5256
|
lines.push(`reference: ${reference}`);
|
|
4377
5257
|
}
|
|
4378
5258
|
return lines;
|
|
4379
5259
|
}
|
|
5260
|
+
function protocolUpdate(hostProtocol) {
|
|
5261
|
+
if (hostProtocol > PROTOCOL_VERSION) {
|
|
5262
|
+
const command2 = "npm install -g @openengio/cli@latest";
|
|
5263
|
+
return { command: command2, text: `Update with: ${command2} (the CLI for protocol ${hostProtocol} is version 0.${hostProtocol}.x)` };
|
|
5264
|
+
}
|
|
5265
|
+
const command = `npm install -g @openengio/cli@0.${hostProtocol}`;
|
|
5266
|
+
return {
|
|
5267
|
+
command,
|
|
5268
|
+
text: `The host has not been updated to protocol ${PROTOCOL_VERSION} yet. Wait for it, or install the CLI built for its protocol: ${command}`
|
|
5269
|
+
};
|
|
5270
|
+
}
|
|
4380
5271
|
function refusalValue(refusal2, settle2, request3, host, reference) {
|
|
4381
5272
|
const referenced = reference === void 0 ? {} : { reference };
|
|
4382
5273
|
if (refusal2.kind === "protocol-mismatch") {
|
|
4383
|
-
return { ...refusal2, clientVersion: PROTOCOL_VERSION, update:
|
|
5274
|
+
return { ...refusal2, clientVersion: PROTOCOL_VERSION, update: protocolUpdate(refusal2.versions.host).command, ...host === void 0 ? {} : { host }, ...referenced };
|
|
4384
5275
|
}
|
|
4385
5276
|
const allowed = allowedFieldOf(refusal2, request3);
|
|
4386
5277
|
const settled = refusal2.kind === "unknown-outcome" ? { ...refusal2, settle: settle2 } : refusal2;
|
|
@@ -5028,6 +5919,10 @@ var buildClients = async (host, store, transport, streamTransport) => {
|
|
|
5028
5919
|
detach: () => detachOrganisation(transport, origin, token, { input: {} })
|
|
5029
5920
|
},
|
|
5030
5921
|
ontology: createOntologyClient(transport, origin, token),
|
|
5922
|
+
session: {
|
|
5923
|
+
human: () => enterHumanMode(transport, origin, token, { input: {} }),
|
|
5924
|
+
status: () => readSessionStatus(transport, origin, token, { input: {} })
|
|
5925
|
+
},
|
|
5031
5926
|
streamed: stream === null ? null : {
|
|
5032
5927
|
sendMessageStreamed: (body, signal) => sendMessageStreamed(stream, origin, body, token, signal),
|
|
5033
5928
|
answerPlanStreamed: (body, signal) => answerPlanStreamed(stream, origin, body, token, signal)
|
|
@@ -5635,13 +6530,14 @@ function usageOf(entry2) {
|
|
|
5635
6530
|
return `openeng ${entry2.module} ${entry2.name}${selector} [--input <json> | --input - | --input-file <path>]${key}`;
|
|
5636
6531
|
}
|
|
5637
6532
|
function helpOf(entry2) {
|
|
5638
|
-
const
|
|
6533
|
+
const policy = routePolicyDoc(entry2.policy);
|
|
5639
6534
|
return [
|
|
5640
6535
|
usageOf(entry2),
|
|
5641
6536
|
`route: ${entry2.name} (${entry2.method} ${entry2.path})`,
|
|
5642
6537
|
`module: ${entry2.module}`,
|
|
5643
6538
|
`capability: ${entry2.capability}`,
|
|
5644
|
-
`
|
|
6539
|
+
`actors: ${policy.actors}`,
|
|
6540
|
+
`step-up: ${policy.stepUp}`,
|
|
5645
6541
|
`idempotent: ${entry2.idempotent ? "yes; a key is minted and printed when --idempotency-key is absent" : "no"}`,
|
|
5646
6542
|
`selector: ${entry2.selector === "none" ? "none" : `${entry2.selector}, given as --selector <json>`}`,
|
|
5647
6543
|
`input: a JSON object, given as --input <json>, --input - (standard input) or --input-file <path>; {} when none is given`,
|
|
@@ -5722,11 +6618,11 @@ async function runGenerated(entry2, context) {
|
|
|
5722
6618
|
if ("streamed" in answer && answer.streamed === true) {
|
|
5723
6619
|
return { kind: "streamed" };
|
|
5724
6620
|
}
|
|
5725
|
-
const
|
|
5726
|
-
if (
|
|
6621
|
+
const replayed2 = "replayed" in answer && answer.replayed === true && !key.minted;
|
|
6622
|
+
if (replayed2) {
|
|
5727
6623
|
context.note("the host answered a replay of an earlier request that carried this idempotency key");
|
|
5728
6624
|
}
|
|
5729
|
-
return outcomeOfEnvelope(
|
|
6625
|
+
return outcomeOfEnvelope(replayed2 ? withoutReplay(answer) : answer, settle2, (result) => displayedObject === void 0 ? JSON.stringify(result, null, 2) : displayedObject, {
|
|
5730
6626
|
command: `openeng ${entry2.module} ${entry2.name}`,
|
|
5731
6627
|
schemas: schemasOf(entry2),
|
|
5732
6628
|
sent: body.body
|
|
@@ -10776,12 +11672,12 @@ async function playDemoWorld(clients, target, size, data) {
|
|
|
10776
11672
|
}
|
|
10777
11673
|
const objectIdByRef = /* @__PURE__ */ new Map();
|
|
10778
11674
|
let created = 0;
|
|
10779
|
-
let
|
|
11675
|
+
let replayed2 = 0;
|
|
10780
11676
|
const selector = { projectId: target.projectId, ref: TRUNK_REF };
|
|
10781
11677
|
const mutate = async (ref, operation) => {
|
|
10782
11678
|
const outcome = succeededEnvelope(await clients.objects.mutate({ selector, input: { correlation: { kind: "mint" }, operation } }, idempotencyKeyOf(target.projectId, ref)), `mutate ${ref}`);
|
|
10783
11679
|
if (outcome.replayed) {
|
|
10784
|
-
|
|
11680
|
+
replayed2 += 1;
|
|
10785
11681
|
} else {
|
|
10786
11682
|
created += 1;
|
|
10787
11683
|
}
|
|
@@ -10808,7 +11704,7 @@ async function playDemoWorld(clients, target, size, data) {
|
|
|
10808
11704
|
subjectIdOf(outcome, step.edge.ref);
|
|
10809
11705
|
}
|
|
10810
11706
|
}
|
|
10811
|
-
return { created, replayed };
|
|
11707
|
+
return { created, replayed: replayed2 };
|
|
10812
11708
|
}
|
|
10813
11709
|
|
|
10814
11710
|
// packages/cli/src/commands/demo-shared.ts
|
|
@@ -10902,6 +11798,42 @@ var publicDemoSeed = {
|
|
|
10902
11798
|
}
|
|
10903
11799
|
};
|
|
10904
11800
|
|
|
11801
|
+
// packages/cli/src/commands/session.ts
|
|
11802
|
+
var CHANNEL_LABELS = { cli: "CLI", web: "web" };
|
|
11803
|
+
var MODE_LABELS = { agent: "agent", human: "human" };
|
|
11804
|
+
var SETTLE2 = "read openeng session status before trying again";
|
|
11805
|
+
function sessionText(status) {
|
|
11806
|
+
const channel = status.channel === null ? "unclassified" : CHANNEL_LABELS[status.channel];
|
|
11807
|
+
const mode = status.mode === null ? "none" : MODE_LABELS[status.mode];
|
|
11808
|
+
return `channel ${channel} mode ${mode} signed in ${status.issuedAt}`;
|
|
11809
|
+
}
|
|
11810
|
+
function sessionCommand(action, description) {
|
|
11811
|
+
const usage = `openeng session ${action}`;
|
|
11812
|
+
return {
|
|
11813
|
+
words: ["session", action],
|
|
11814
|
+
organisation: "none",
|
|
11815
|
+
usage,
|
|
11816
|
+
help: [
|
|
11817
|
+
usage,
|
|
11818
|
+
`does: ${description}`,
|
|
11819
|
+
`example: ${usage} --json`,
|
|
11820
|
+
"output: server-stored channel, mode and sign-in time; under --json { channel, mode, issuedAt }"
|
|
11821
|
+
],
|
|
11822
|
+
run: async ({ host, deps }) => {
|
|
11823
|
+
const run2 = await runAuthenticated(host, deps, (clients) => clients.session[action]());
|
|
11824
|
+
return run2.ok ? outcomeOfEnvelope(run2.answer, SETTLE2, sessionText) : outcomeOfSessionFailure(run2.failure, SETTLE2);
|
|
11825
|
+
}
|
|
11826
|
+
};
|
|
11827
|
+
}
|
|
11828
|
+
var sessionHuman = sessionCommand(
|
|
11829
|
+
"human",
|
|
11830
|
+
"asks once for web confirmation, then uses human mode for this CLI session; already-human sessions are unchanged"
|
|
11831
|
+
);
|
|
11832
|
+
var sessionStatus = sessionCommand(
|
|
11833
|
+
"status",
|
|
11834
|
+
"reads this session's channel, mode and sign-in time from the server; needs no organisation attachment"
|
|
11835
|
+
);
|
|
11836
|
+
|
|
10905
11837
|
// packages/cli/src/commands/whoami.ts
|
|
10906
11838
|
var whoami = async (host, store) => {
|
|
10907
11839
|
const summary = await storedSummary(store, host.key);
|
|
@@ -11159,7 +12091,7 @@ var connectorRun = {
|
|
|
11159
12091
|
"example: openeng connector run conn_abc123",
|
|
11160
12092
|
"output: one line with the run id; under --json an object with runId",
|
|
11161
12093
|
" starts a run that imports the connection's source into its mirror project, and answers the run's identifier once its row has committed",
|
|
11162
|
-
" needs:
|
|
12094
|
+
" needs: write ref on the mirror project"
|
|
11163
12095
|
],
|
|
11164
12096
|
run: async (context) => {
|
|
11165
12097
|
const selector = selectorOf(context);
|
|
@@ -11197,7 +12129,7 @@ var connectorRuns = {
|
|
|
11197
12129
|
};
|
|
11198
12130
|
|
|
11199
12131
|
// packages/cli/src/commands/link.ts
|
|
11200
|
-
var
|
|
12132
|
+
var SETTLE3 = "repeat openeng link, which only reads";
|
|
11201
12133
|
var IDENTIFIER_FIELD = Object.freeze({
|
|
11202
12134
|
object: "objectId",
|
|
11203
12135
|
type: "typeKey",
|
|
@@ -11396,7 +12328,7 @@ async function link(context) {
|
|
|
11396
12328
|
return { kind: "link-ready", webOrigin: origin.result.webOrigin, path };
|
|
11397
12329
|
});
|
|
11398
12330
|
if (!run2.ok) {
|
|
11399
|
-
return outcomeOfSessionFailure(run2.failure,
|
|
12331
|
+
return outcomeOfSessionFailure(run2.failure, SETTLE3);
|
|
11400
12332
|
}
|
|
11401
12333
|
const { answer } = run2;
|
|
11402
12334
|
if ("kind" in answer) {
|
|
@@ -11408,7 +12340,7 @@ async function link(context) {
|
|
|
11408
12340
|
const href = new URL(path, webOrigin).href;
|
|
11409
12341
|
return { kind: "success", value: { link: href }, text: href };
|
|
11410
12342
|
}
|
|
11411
|
-
return outcomeOfEnvelope(answer,
|
|
12343
|
+
return outcomeOfEnvelope(answer, SETTLE3, (result) => JSON.stringify(result));
|
|
11412
12344
|
}
|
|
11413
12345
|
var BARE_USAGE = "openeng link <kind> ... (openeng link --help)";
|
|
11414
12346
|
var spec = (argumentCount, usage) => ({
|
|
@@ -11448,7 +12380,7 @@ var linkBare = spec(0, BARE_USAGE);
|
|
|
11448
12380
|
|
|
11449
12381
|
// packages/cli/src/commands/projects.ts
|
|
11450
12382
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
11451
|
-
var
|
|
12383
|
+
var SETTLE4 = "repeat openeng projects list, which only reads";
|
|
11452
12384
|
function listText(listings) {
|
|
11453
12385
|
if (listings.length === 0) {
|
|
11454
12386
|
return "no projects";
|
|
@@ -11467,7 +12399,7 @@ var projectsList = {
|
|
|
11467
12399
|
],
|
|
11468
12400
|
run: async ({ host, deps }) => {
|
|
11469
12401
|
const run2 = await runAuthenticated(host, deps, (clients) => clients.objects.listProjects({ input: {} }));
|
|
11470
|
-
return run2.ok ? outcomeOfEnvelope(run2.answer,
|
|
12402
|
+
return run2.ok ? outcomeOfEnvelope(run2.answer, SETTLE4, listText) : outcomeOfSessionFailure(run2.failure, SETTLE4);
|
|
11471
12403
|
}
|
|
11472
12404
|
};
|
|
11473
12405
|
var projectsCreate = {
|
|
@@ -11487,11 +12419,18 @@ var projectsCreate = {
|
|
|
11487
12419
|
}
|
|
11488
12420
|
const key = randomUUID3();
|
|
11489
12421
|
const run2 = await runAuthenticated(host, deps, (clients) => clients.admin.createProject({ input: { name } }, key));
|
|
11490
|
-
return run2.ok ? outcomeOfEnvelope(run2.answer,
|
|
12422
|
+
return run2.ok ? outcomeOfEnvelope(run2.answer, SETTLE4, (created) => `created project ${created.projectId} with namespace ${created.namespaceId}`) : outcomeOfSessionFailure(run2.failure, SETTLE4);
|
|
11491
12423
|
}
|
|
11492
12424
|
};
|
|
11493
12425
|
|
|
11494
12426
|
// packages/cli/src/commands/protection-help.ts
|
|
12427
|
+
var RULE_SETTINGS_HELP = [
|
|
12428
|
+
"settings: --consequence <open|merge-only|locked-rows-only> --require-proposal <true|false>",
|
|
12429
|
+
" --required-approvals <0..10> --approver-min-role <contributor|maintainer|owner|null>",
|
|
12430
|
+
" --restrict-deletions <true|false> --approvers '<JSON person-id array>' --bypass '<JSON member array>'",
|
|
12431
|
+
'bypass: [{"kind":"role","roleKey":"owner"},{"kind":"person","personId":"person-id"},',
|
|
12432
|
+
' {"kind":"service","serviceIdentityId":"service-id"},{"kind":"client","clientId":"client-id"}]'
|
|
12433
|
+
];
|
|
11495
12434
|
var SCOPE_LABELS = Object.freeze({
|
|
11496
12435
|
project: "on the selected project",
|
|
11497
12436
|
organisation: "in the attached organisation",
|
|
@@ -11504,21 +12443,113 @@ function protectionCapabilityHelp(...routes) {
|
|
|
11504
12443
|
return `capability: ${[...new Set(requirements)].join(" or ")}`;
|
|
11505
12444
|
}
|
|
11506
12445
|
|
|
12446
|
+
// packages/cli/src/commands/rule-settings.ts
|
|
12447
|
+
var RuleFlagRefusal = class extends Error {
|
|
12448
|
+
};
|
|
12449
|
+
function jsonFlag(value, flag) {
|
|
12450
|
+
try {
|
|
12451
|
+
return JSON.parse(value);
|
|
12452
|
+
} catch (error) {
|
|
12453
|
+
if (error instanceof SyntaxError) throw new RuleFlagRefusal(`${flag} must be JSON`);
|
|
12454
|
+
throw error;
|
|
12455
|
+
}
|
|
12456
|
+
}
|
|
12457
|
+
function booleanFlag(value, flag) {
|
|
12458
|
+
if (value === "true") return true;
|
|
12459
|
+
if (value === "false") return false;
|
|
12460
|
+
throw new RuleFlagRefusal(`${flag} must be true or false`);
|
|
12461
|
+
}
|
|
12462
|
+
function role(value) {
|
|
12463
|
+
return value === "contributor" || value === "maintainer" || value === "owner";
|
|
12464
|
+
}
|
|
12465
|
+
function bypassEntry(input) {
|
|
12466
|
+
if (typeof input !== "object" || input === null || Array.isArray(input)) {
|
|
12467
|
+
throw new RuleFlagRefusal("--bypass must hold member objects");
|
|
12468
|
+
}
|
|
12469
|
+
const entry2 = input;
|
|
12470
|
+
if (Object.keys(entry2).length === 2) {
|
|
12471
|
+
switch (entry2.kind) {
|
|
12472
|
+
case "role":
|
|
12473
|
+
if (role(entry2.roleKey)) return { kind: "role", roleKey: entry2.roleKey };
|
|
12474
|
+
break;
|
|
12475
|
+
case "person":
|
|
12476
|
+
if (typeof entry2.personId === "string" && entry2.personId.length > 0) {
|
|
12477
|
+
return { kind: "person", personId: entry2.personId };
|
|
12478
|
+
}
|
|
12479
|
+
break;
|
|
12480
|
+
case "service":
|
|
12481
|
+
if (typeof entry2.serviceIdentityId === "string" && entry2.serviceIdentityId.length > 0) {
|
|
12482
|
+
return { kind: "service", serviceIdentityId: entry2.serviceIdentityId };
|
|
12483
|
+
}
|
|
12484
|
+
break;
|
|
12485
|
+
case "client":
|
|
12486
|
+
if (typeof entry2.clientId === "string" && entry2.clientId.length > 0) {
|
|
12487
|
+
return { kind: "client", clientId: entry2.clientId };
|
|
12488
|
+
}
|
|
12489
|
+
break;
|
|
12490
|
+
}
|
|
12491
|
+
}
|
|
12492
|
+
throw new RuleFlagRefusal("--bypass entries name a role, person, service or client with its identifier");
|
|
12493
|
+
}
|
|
12494
|
+
function ruleSettings(options) {
|
|
12495
|
+
const settings = {};
|
|
12496
|
+
if (options.consequence !== void 0) {
|
|
12497
|
+
const value = options.consequence;
|
|
12498
|
+
if (value !== "open" && value !== "merge-only" && value !== "locked-rows-only") {
|
|
12499
|
+
throw new RuleFlagRefusal("--consequence must be open, merge-only or locked-rows-only");
|
|
12500
|
+
}
|
|
12501
|
+
settings.consequence = value;
|
|
12502
|
+
}
|
|
12503
|
+
if (options.requireProposal !== void 0) {
|
|
12504
|
+
settings.requireProposal = booleanFlag(options.requireProposal, "--require-proposal");
|
|
12505
|
+
}
|
|
12506
|
+
if (options.restrictDeletions !== void 0) {
|
|
12507
|
+
settings.restrictDeletions = booleanFlag(options.restrictDeletions, "--restrict-deletions");
|
|
12508
|
+
}
|
|
12509
|
+
if (options.requiredApprovals !== void 0) {
|
|
12510
|
+
const value = Number(options.requiredApprovals);
|
|
12511
|
+
if (!/^\d+$/.test(options.requiredApprovals) || !Number.isInteger(value) || value > 10) {
|
|
12512
|
+
throw new RuleFlagRefusal("--required-approvals must be an integer from 0 to 10");
|
|
12513
|
+
}
|
|
12514
|
+
settings.requiredApprovals = value;
|
|
12515
|
+
}
|
|
12516
|
+
if (options.approverMinRole !== void 0) {
|
|
12517
|
+
const value = options.approverMinRole;
|
|
12518
|
+
if (value !== "null" && !role(value)) {
|
|
12519
|
+
throw new RuleFlagRefusal("--approver-min-role must be contributor, maintainer, owner or null");
|
|
12520
|
+
}
|
|
12521
|
+
settings.approverMinRole = value === "null" ? null : value;
|
|
12522
|
+
}
|
|
12523
|
+
if (options.approvers !== void 0) {
|
|
12524
|
+
const value = jsonFlag(options.approvers, "--approvers");
|
|
12525
|
+
if (!Array.isArray(value) || !value.every((item) => typeof item === "string" && item.length > 0)) {
|
|
12526
|
+
throw new RuleFlagRefusal("--approvers must be a JSON array of person identifiers");
|
|
12527
|
+
}
|
|
12528
|
+
settings.approvers = value;
|
|
12529
|
+
}
|
|
12530
|
+
if (options.bypass !== void 0) {
|
|
12531
|
+
const value = jsonFlag(options.bypass, "--bypass");
|
|
12532
|
+
if (!Array.isArray(value)) throw new RuleFlagRefusal("--bypass must be a JSON array");
|
|
12533
|
+
settings.bypass = value.map(bypassEntry);
|
|
12534
|
+
}
|
|
12535
|
+
return settings;
|
|
12536
|
+
}
|
|
12537
|
+
|
|
11507
12538
|
// packages/cli/src/commands/rules.ts
|
|
11508
|
-
var CONSEQUENCES = ["merge-only", "locked-rows-only"];
|
|
11509
12539
|
var settleWith = (project) => project === void 0 ? "repeat openeng rules list --organisation, which only reads" : `repeat openeng rules list --project ${project}, which only reads`;
|
|
11510
|
-
var ruleText = (rule) => `rule ${rule.ruleId} ${rule.pattern} ${rule.consequence}`;
|
|
12540
|
+
var ruleText = (rule) => `rule ${rule.ruleId} ${rule.pattern} ${rule.settings.consequence}`;
|
|
11511
12541
|
var rulesOutcome = (outcome) => outcome.kind === "success" ? { ...outcome, value: { value: outcome.value } } : outcome;
|
|
11512
12542
|
var scopeMessage = "choose exactly one of --project <id> or --organisation";
|
|
11513
12543
|
var rulesAdd = {
|
|
11514
12544
|
words: ["rules", "add"],
|
|
11515
12545
|
organisation: "required",
|
|
11516
|
-
usage: "openeng rules add (--project <id>|--organisation) --
|
|
12546
|
+
usage: "openeng rules add (--project <id>|--organisation) --extent <extent> --pattern <pattern> [settings]",
|
|
11517
12547
|
help: [
|
|
11518
|
-
"openeng rules add (--project <id>|--organisation) --
|
|
11519
|
-
|
|
12548
|
+
"openeng rules add (--project <id>|--organisation) --extent <ref|rows> --pattern <pattern> [settings]",
|
|
12549
|
+
...RULE_SETTINGS_HELP,
|
|
12550
|
+
"does: adds a project or organisation rule with the supplied settings and defaults for omitted fields",
|
|
11520
12551
|
protectionCapabilityHelp("addRefRule", "addOrganisationRule"),
|
|
11521
|
-
"example: openeng rules add --organisation --pattern release-v1 --consequence merge-only",
|
|
12552
|
+
"example: openeng rules add --organisation --extent ref --pattern release-v1 --consequence merge-only",
|
|
11522
12553
|
"output: the rule id, pattern and consequence; under --json { scope, value }, with the full RefRule in value"
|
|
11523
12554
|
],
|
|
11524
12555
|
run: async ({ host, deps, options }) => {
|
|
@@ -11526,18 +12557,48 @@ var rulesAdd = {
|
|
|
11526
12557
|
if (project !== void 0 === organisation) {
|
|
11527
12558
|
return { kind: "client-refusal", message: scopeMessage };
|
|
11528
12559
|
}
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
message: "openeng rules add needs --pattern <pattern> and --consequence <merge-only|locked-rows-only>"
|
|
11533
|
-
};
|
|
12560
|
+
const extent = options.extent;
|
|
12561
|
+
if (pattern === void 0 || extent !== "ref" && extent !== "rows") {
|
|
12562
|
+
return { kind: "client-refusal", message: "rules add needs --pattern <pattern> and --extent <ref|rows>" };
|
|
11534
12563
|
}
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
12564
|
+
let settings;
|
|
12565
|
+
try {
|
|
12566
|
+
settings = ruleSettings(options);
|
|
12567
|
+
} catch (error) {
|
|
12568
|
+
if (error instanceof RuleFlagRefusal) return { kind: "client-refusal", message: error.message };
|
|
12569
|
+
throw error;
|
|
12570
|
+
}
|
|
12571
|
+
const settle2 = settleWith(project);
|
|
12572
|
+
const run2 = await runAuthenticated(host, deps, (clients) => project === void 0 ? clients.admin.addOrganisationRule({ input: { extent, pattern, settings } }) : clients.admin.addRefRule({ selector: { projectId: project }, input: { extent, pattern, settings } }));
|
|
12573
|
+
return run2.ok ? rulesOutcome(outcomeOfEnvelope(run2.answer, settle2, ruleText)) : outcomeOfSessionFailure(run2.failure, settle2);
|
|
12574
|
+
}
|
|
12575
|
+
};
|
|
12576
|
+
var rulesUpdate = {
|
|
12577
|
+
words: ["rules", "update"],
|
|
12578
|
+
organisation: "required",
|
|
12579
|
+
usage: "openeng rules update (--project <id>|--organisation) --rule-id <id> [settings]",
|
|
12580
|
+
help: [
|
|
12581
|
+
"openeng rules update (--project <id>|--organisation) --rule-id <id> [settings]",
|
|
12582
|
+
...RULE_SETTINGS_HELP,
|
|
12583
|
+
"does: changes settings in place; omitted fields keep their values; lists replace their members",
|
|
12584
|
+
protectionCapabilityHelp("updateRefRule", "updateOrganisationRule"),
|
|
12585
|
+
"example: openeng rules update --project project-one --rule-id rule-one --required-approvals 2",
|
|
12586
|
+
"output: the full rule under --json; every update asks an agent-mode session to confirm"
|
|
12587
|
+
],
|
|
12588
|
+
run: async ({ host, deps, options }) => {
|
|
12589
|
+
const { project, organisation, ruleId } = options;
|
|
12590
|
+
if (project !== void 0 === organisation) return { kind: "client-refusal", message: scopeMessage };
|
|
12591
|
+
if (ruleId === void 0) return { kind: "client-refusal", message: "rules update needs --rule-id <id>" };
|
|
12592
|
+
let settings;
|
|
12593
|
+
try {
|
|
12594
|
+
settings = ruleSettings(options);
|
|
12595
|
+
} catch (error) {
|
|
12596
|
+
if (error instanceof RuleFlagRefusal) return { kind: "client-refusal", message: error.message };
|
|
12597
|
+
throw error;
|
|
11538
12598
|
}
|
|
11539
12599
|
const settle2 = settleWith(project);
|
|
11540
|
-
const
|
|
12600
|
+
const input = { ruleId, settings };
|
|
12601
|
+
const run2 = await runAuthenticated(host, deps, (clients) => project === void 0 ? clients.admin.updateOrganisationRule({ input }) : clients.admin.updateRefRule({ selector: { projectId: project }, input }));
|
|
11541
12602
|
return run2.ok ? rulesOutcome(outcomeOfEnvelope(run2.answer, settle2, ruleText)) : outcomeOfSessionFailure(run2.failure, settle2);
|
|
11542
12603
|
}
|
|
11543
12604
|
};
|
|
@@ -12437,12 +13498,12 @@ async function saveDescriptor(context, selector, objectId, property, file) {
|
|
|
12437
13498
|
const name = basename(file);
|
|
12438
13499
|
const settle2 = `openeng attachment get ${objectId} ${property} --project ${selector.projectId} --ref ${selector.ref}`;
|
|
12439
13500
|
const run2 = await runAuthenticated(context.host, context.deps, async (clients) => {
|
|
12440
|
-
const staged = await clients.objects.stageAttachment(selector, { name, bytes });
|
|
12441
|
-
if ("refusal" in staged) return { outcome: outcomeOfEnvelope(staged, settle2, (value2) => JSON.stringify(value2)) };
|
|
12442
|
-
if (staged.replayed === true) return { outcome: outcomeOfEnvelope(staged, settle2, (value2) => JSON.stringify(value2)) };
|
|
12443
13501
|
const object = await clients.objects.readObject({ selector, input: { objectId } });
|
|
12444
13502
|
if ("refusal" in object) return { outcome: outcomeOfEnvelope(object, settle2, (value2) => JSON.stringify(value2)) };
|
|
12445
13503
|
if (object.replayed === true) return { outcome: outcomeOfEnvelope(object, settle2, (value2) => JSON.stringify(value2)) };
|
|
13504
|
+
const staged = await clients.objects.stageAttachment({ ...selector, objectId }, { name, bytes });
|
|
13505
|
+
if ("refusal" in staged) return { outcome: outcomeOfEnvelope(staged, settle2, (value2) => JSON.stringify(value2)) };
|
|
13506
|
+
if (staged.replayed === true) return { outcome: outcomeOfEnvelope(staged, settle2, (value2) => JSON.stringify(value2)) };
|
|
12446
13507
|
const catalogue = await clients.objects.readCatalogue({ selector: { projectId: selector.projectId }, input: {} });
|
|
12447
13508
|
if ("refusal" in catalogue) return { outcome: outcomeOfEnvelope(catalogue, settle2, (value2) => JSON.stringify(value2)) };
|
|
12448
13509
|
if (catalogue.replayed === true) return { outcome: outcomeOfEnvelope(catalogue, settle2, (value2) => JSON.stringify(value2)) };
|
|
@@ -12730,8 +13791,12 @@ var branchesImpact = {
|
|
|
12730
13791
|
|
|
12731
13792
|
// packages/cli/src/commands/hosted-app.ts
|
|
12732
13793
|
import { readFileSync as readFileSync7 } from "node:fs";
|
|
12733
|
-
var
|
|
12734
|
-
var
|
|
13794
|
+
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.";
|
|
13795
|
+
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.";
|
|
13796
|
+
var ONE_WALL_WARNING = `${ONE_WALL_WARNING_LEAD}
|
|
13797
|
+
|
|
13798
|
+
${ONE_WALL_WARNING_DETAIL}`;
|
|
13799
|
+
var ONE_WALL_UNKNOWN = "This account cannot read whether the app may send data out of the browser. An administrator can check its reduced isolation permission.";
|
|
12735
13800
|
var usagePublish = "openeng hosted-app publish <bundle> --project <id> --key <app key>";
|
|
12736
13801
|
var usageList2 = "openeng hosted-app list --project <id>";
|
|
12737
13802
|
var usageVersions = "openeng hosted-app versions <app key> --project <id>";
|
|
@@ -12765,7 +13830,7 @@ var hostedAppPublish = {
|
|
|
12765
13830
|
usagePublish,
|
|
12766
13831
|
"does: publishes a bundle file as the next version of the project's hosted app under the key, creating the app when the project has none under that key",
|
|
12767
13832
|
"example: openeng hosted-app publish ./dist/app.js --project proj_abc --key rover-dashboard",
|
|
12768
|
-
"output: the version id, its SHA-256 and its size; for an app that holds the
|
|
13833
|
+
"output: the version id, its SHA-256 and its size; for an app that holds the reduced isolation permission, the reduced isolation warning as well"
|
|
12769
13834
|
],
|
|
12770
13835
|
run: async (context) => {
|
|
12771
13836
|
const project = projectOf(context, "publish");
|
|
@@ -12946,6 +14011,8 @@ var PUBLIC_HAND_WRITTEN_COMMANDS = [
|
|
|
12946
14011
|
loginCommand,
|
|
12947
14012
|
logoutCommand,
|
|
12948
14013
|
whoamiCommand,
|
|
14014
|
+
sessionHuman,
|
|
14015
|
+
sessionStatus,
|
|
12949
14016
|
orgList,
|
|
12950
14017
|
orgAttach,
|
|
12951
14018
|
orgCreate,
|
|
@@ -12954,6 +14021,7 @@ var PUBLIC_HAND_WRITTEN_COMMANDS = [
|
|
|
12954
14021
|
projectsList,
|
|
12955
14022
|
projectsCreate,
|
|
12956
14023
|
rulesAdd,
|
|
14024
|
+
rulesUpdate,
|
|
12957
14025
|
rulesList,
|
|
12958
14026
|
rulesRemove,
|
|
12959
14027
|
orgRefsCreate,
|
|
@@ -13024,6 +14092,13 @@ var CLI_OPTIONS = {
|
|
|
13024
14092
|
ceiling: { type: "string" },
|
|
13025
14093
|
pattern: { type: "string" },
|
|
13026
14094
|
consequence: { type: "string" },
|
|
14095
|
+
"extent": { type: "string" },
|
|
14096
|
+
"require-proposal": { type: "string" },
|
|
14097
|
+
"required-approvals": { type: "string" },
|
|
14098
|
+
"approver-min-role": { type: "string" },
|
|
14099
|
+
"restrict-deletions": { type: "string" },
|
|
14100
|
+
"approvers": { type: "string" },
|
|
14101
|
+
"bypass": { type: "string" },
|
|
13027
14102
|
"rule-id": { type: "string" },
|
|
13028
14103
|
ref: { type: "string" },
|
|
13029
14104
|
base: { type: "string" },
|
|
@@ -13273,6 +14348,13 @@ function parseInvocation(argv) {
|
|
|
13273
14348
|
ceiling: values.ceiling,
|
|
13274
14349
|
pattern: values.pattern,
|
|
13275
14350
|
consequence: values.consequence,
|
|
14351
|
+
extent: values["extent"],
|
|
14352
|
+
requireProposal: values["require-proposal"],
|
|
14353
|
+
requiredApprovals: values["required-approvals"],
|
|
14354
|
+
approverMinRole: values["approver-min-role"],
|
|
14355
|
+
restrictDeletions: values["restrict-deletions"],
|
|
14356
|
+
approvers: values["approvers"],
|
|
14357
|
+
bypass: values["bypass"],
|
|
13276
14358
|
ruleId: values["rule-id"],
|
|
13277
14359
|
ref: values.ref,
|
|
13278
14360
|
base: values.base,
|
|
@@ -13350,7 +14432,13 @@ ${usageLines(commands).join("\n")}` : unknownCommandMessage(commands, invocation
|
|
|
13350
14432
|
return { outcome: outcomeOfStoreRefusal(selection.refusal), json: options.json, scope: null };
|
|
13351
14433
|
}
|
|
13352
14434
|
const deps = {
|
|
13353
|
-
transport: createTransport(parsedHost.host),
|
|
14435
|
+
transport: withStepUpRoad(createTransport(parsedHost.host), {
|
|
14436
|
+
clock,
|
|
14437
|
+
confirmAddress: (pendingId, webOrigin) => new URL(stepUpAddress(pendingId), webOrigin).href,
|
|
14438
|
+
announce: addressPrinter(options.json),
|
|
14439
|
+
note: (line) => process.stderr.write(`${line}
|
|
14440
|
+
`)
|
|
14441
|
+
}),
|
|
13354
14442
|
store: selection.store,
|
|
13355
14443
|
clock,
|
|
13356
14444
|
configDirectory,
|