@openengio/cli 0.44.0 → 0.48.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.
@@ -91,13 +91,14 @@ var RULE_ENTRIES = {
91
91
  "build-input-outside-project": entry("An input is outside the build's project.", FIX_REQUEST),
92
92
  "case-invalid": entry("The case check has violations.", FIX_REQUEST),
93
93
  "outputs-already-current": entry("Some requested outputs are already current; nothing was started.", { option: "Choose run-all or run-stale and send the request again." }),
94
+ "build-too-large": entry("The build requests more step runs than one build may start (20). Split the request.", FIX_REQUEST),
94
95
  "build-limit-reached": entry("The build exceeds an organisation or closure limit.", FIX_REQUEST),
95
96
  "engine-mismatch": entry("The registered engine fails a required engine check.", FIX_REQUEST),
96
97
  "engine-image-changed": entry("The engine ran an image other than the one recorded when the step started.", ASK_ADMINISTRATOR),
97
98
  "function-entry-unknown": entry("The engine image does not offer the requested entry.", FIX_REQUEST),
98
99
  "step-outputs-missing": entry("The output objects do not fill the entry's output slots.", FIX_REQUEST),
99
100
  "step-run-closed": entry("The step run is terminal or its result was already accepted.", FIX_REQUEST),
100
- "claim-refused": entry("The execution claim was refused.", { option: "Stop this execution; a refused claim cannot supply an engine token." }),
101
+ "claim-refused": entry("The execution claim was refused.", { option: "Retry every two seconds for at most sixty seconds." }),
101
102
  "not-yet-bound": entry("The claim code is live and its execution binding is pending.", { option: "Retry every two seconds for at most sixty seconds." }),
102
103
  "engine-invalid": entry("The engine properties, class or runtime are not admitted.", FIX_REQUEST),
103
104
  "log-already-written": entry("The step run already has a log.", FIX_REQUEST),
@@ -177,7 +178,8 @@ var RULE_ENTRIES = {
177
178
  "plan-not-open": entry("The plan is not open.", { option: "Read the agent session.", read: "readAgentSession" }),
178
179
  "unknown-role": entry("The role key is unknown to this deployment.", { option: "Choose a role key from roleKeys and send the request again." }),
179
180
  "above-caller-role": entry("The request would give a role that is higher than your own, or change one.", ASK_ADMINISTRATOR),
180
- "last-administrator": entry("The change would leave no administrator.", { option: "Name another administrator first." }),
181
+ "membership-own-role": entry("A person cannot grant or change their own membership.", ASK_ADMINISTRATOR),
182
+ "last-administrator": entry("The organisation must keep at least one administrator.", { option: "Name another administrator first." }),
181
183
  "erasure-not-permitted": entry("The erasure is not permitted.", ASK_ADMINISTRATOR),
182
184
  "no-such-membership": entry("The membership the request names is not one you may change.", FIX_REQUEST),
183
185
  "capability-missing": entry("You do not have the permission this operation needs.", ASK_ADMINISTRATOR),
@@ -227,6 +229,7 @@ var RULE_ENTRIES = {
227
229
  protected: entry("A rule protects this record on this branch, so it changes only by a merge from another branch.", { option: "Make the change on another branch and merge it." }),
228
230
  "not-a-ref-head": entry("The commit is not the latest commit of a branch you can use.", { option: "Read the branches you can use and choose one." }),
229
231
  "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." }),
232
+ "merge-preview-approximate": entry("The merge's changes could not be read exactly, so nothing was merged.", { option: "Start a new branch from the target, make the changes there, and merge that branch." }),
230
233
  "branch-needs-schema-update": entry("This branch's schema differs from the platform's, so it must be updated before it can be read or written.", { option: "Request a schema update for the branch." }),
231
234
  "organisation-not-ready": entry("The organisation's trunk is not ready yet.", { option: "Try again shortly." }),
232
235
  "read-only-ref": entry("The branch is read-only, the write names a commit, or you cannot write to this branch.", { option: "Choose a branch you can write to." }),
@@ -428,6 +431,7 @@ var PUBLIC = ["invalid-request", "bound-exceeded", "internal"];
428
431
  var CHANGE_SET = [...SIGNED_IN, "not-permitted", "stale-revision", "not-open"];
429
432
  var QUERY_PROJECT_SCOPE = 'Without input.projects, it reads every project the caller can read on the selected branch or baseline; selector.projectId does not narrow the set. To limit it to one project, include "projects":["<projectId>"] in input.';
430
433
  var GRAPH_QUERY_PROJECT_SCOPE = 'Without input.start.projects, it reads every project the caller can read on the selected ref; selector.projectId does not narrow the set. To limit it to some projects, include "projects":["<projectId>"] in input.start.';
434
+ var SAVE_REASON = " The reason is required and is written first in the save's commit message, above the platform's lines, exactly as sent; it is refused as invalid-request when it is missing, empty after trimming white space, holds NUL or holds a lone UTF-16 surrogate.";
431
435
  function doc(does, refuses) {
432
436
  return Object.freeze({ does, refuses: Object.freeze([...refuses]) });
433
437
  }
@@ -440,6 +444,7 @@ var ROUTE_DOCS = Object.freeze({
440
444
  "case-invalid",
441
445
  "outputs-already-current",
442
446
  "build-limit-reached",
447
+ "build-too-large",
443
448
  "engine-mismatch",
444
449
  "function-entry-unknown",
445
450
  "step-outputs-missing",
@@ -466,6 +471,8 @@ var ROUTE_DOCS = Object.freeze({
466
471
  readObjectSet: doc("Reads a saved set's visible objects on the selected branch or baseline, a count of missing visible members and one bit for members outside the caller's scope.", [...SCOPED, "head-moved"]),
467
472
  updateObjectSet: doc("Renames a saved set or replaces its readable members at the expected revision. Members outside the caller's scope remain. A success raises the revision by one.", [...SCOPED, "stale-revision", "head-moved"]),
468
473
  deleteObjectSet: doc("Deletes a saved set and every member at the expected revision.", [...SCOPED, "stale-revision"]),
474
+ createFeedback: doc("Files one bug report or feature request in the organisation the session is attached to, answering its identifier and filing time. The title is 1 to 200 characters after trimming, the body 1 to 8,000 characters; an optional projectId names a project the caller reads, and an optional context carries routeName, correlationId, cliVersion and protocolVersion. A route name the host does not know is admitted and recorded as unknown. Not idempotent: a retry files a second entry. A call from an agent-mode session waits until the person confirms it in the browser. A filer may file 100 entries in any 24 hours in one organisation; the next is refused bound-exceeded naming feedback-per-filer.", [...SIGNED_IN, "not-permitted", "not-attached"]),
475
+ listFeedback: doc("Lists feedback entries of the organisation the session is attached to, newest first, at most limit (1 to 50, default 20) per page with an opaque continuation. An organisation administrator lists every entry; any other caller lists only the entries they filed.", [...SIGNED_IN, "not-attached"]),
469
476
  health: doc("Answers whether the host is running.", PUBLIC),
470
477
  webSignInStart: doc("Starts a confidential web sign-in with HTTP Basic authentication.", [...PUBLIC, "unauthenticated"]),
471
478
  webRedeem: doc("Redeems only a web-purpose handoff with HTTP Basic authentication.", [...PUBLIC, "unauthenticated"]),
@@ -509,8 +516,8 @@ var ROUTE_DOCS = Object.freeze({
509
516
  aggregateObjects: doc(`Deprecated: use queryRows for graph aggregates. Runs an aggregate over the objects of a branch or baseline: a count, or a minimum, maximum, sum or average of one numeric property, answered as one value (an average also carries its count), or, with groupBy, a count, sum or average grouped by type or by a property's value, or a count grouped by structural parent, answered as groups. ${QUERY_PROJECT_SCOPE}`, [...REF_READ, "malformed-query", "over-bound", "text-search-unavailable", "search-too-wide"]),
510
517
  discoverVerbs: doc("Lists the verbs an object may be given.", REF_READ),
511
518
  readHistory: doc("Reads one object's history of changes.", [...REF_READ, "invalid-continuation", "stale-continuation", "malformed-history-request"]),
512
- mutate: doc('Creates, changes or deletes an object on the selected writable branch. A protected refusal means the change needs a branch and a merge. For a property update, `from` is the value the caller expects now; a mismatch is refused as `conflict`, and `{"kind": "absent"}` clears the property; a present state is `{"kind": "value", "value": ...}`.', [...OBJECT_WRITE, "plan-closed"]),
513
- mutateBatch: doc('Applies a list of object and edge operations in one save and commit, with one audit record. A batch with no change makes no commit; a refused batch writes no engineering data, but its refusal is audited. An edge may name an object created earlier in the same batch. A batch with more operations than the maximum is refused as invalid-request naming input.operations, before any write. For a property update, `from` is the value the caller expects now; a mismatch is refused as `conflict`, and `{"kind": "absent"}` clears the property; a present state is `{"kind": "value", "value": ...}`.', [...OBJECT_WRITE, "plan-closed"]),
519
+ mutate: doc('Creates, changes or deletes an object on the selected writable branch. A protected refusal means the change needs a branch and a merge. For a property update, `from` is the value the caller expects now; a mismatch is refused as `conflict`, and `{"kind": "absent"}` clears the property; a present state is `{"kind": "value", "value": ...}`.' + SAVE_REASON, [...OBJECT_WRITE, "plan-closed"]),
520
+ mutateBatch: doc('Applies a list of object and edge operations in one save and commit, with one audit record. A batch with no change makes no commit; a refused batch writes no engineering data, but its refusal is audited. An edge may name an object created earlier in the same batch. A batch with more operations than the maximum is refused as invalid-request naming input.operations, before any write. For a property update, `from` is the value the caller expects now; a mismatch is refused as `conflict`, and `{"kind": "absent"}` clears the property; a present state is `{"kind": "value", "value": ...}`.' + SAVE_REASON, [...OBJECT_WRITE, "plan-closed"]),
514
521
  createConnection: doc("Creates a connection to an external source system for the signed-in person: its mirror project and its service identity. The connection commits whether or not its types could be drafted, and the answer says which.", [...SIGNED_IN, "not-permitted", "organisation-not-active", "connection-exists"]),
515
522
  listConnections: doc("Lists the connections whose mirror project the caller reads, each with its last run and whether the caller may start a run.", SIGNED_IN),
516
523
  setConnectionCredential: doc("Stores the credential the connection reads the source system with, after the source system accepts it, and answers the upstream account and the time it was stored. The credential is never answered.", [...SCOPED, "credential-not-valid"]),
@@ -537,7 +544,7 @@ var ROUTE_DOCS = Object.freeze({
537
544
  listHostedOneWallGrants: doc("Lists the organisation's one-wall permissions.", [...SCOPED]),
538
545
  previewDelete: doc("Previews deleting an object: the links the delete would remove, or the refusal it would meet. Changes nothing.", [...OBJECT_WRITE, "plan-closed"]),
539
546
  recover: doc("Finds what an interrupted mutation did and finishes its record.", REF_READ),
540
- executeVerb: doc("Runs a verb on an object and records its result.", [...OBJECT_WRITE, "plan-closed"]),
547
+ executeVerb: doc("Runs a verb on an object and records its result." + SAVE_REASON, [...OBJECT_WRITE, "plan-closed"]),
541
548
  createBranch: doc("Creates a project branch from a branch, a baseline or an admitted current head. The optional from is tagged kind ref with ref, or kind hash with hash.", [
542
549
  ...REF_WRITE,
543
550
  "plan-closed",
@@ -554,6 +561,7 @@ var ROUTE_DOCS = Object.freeze({
554
561
  "lock-unavailable",
555
562
  "not-a-ref-head",
556
563
  "stale-source",
564
+ "merge-preview-approximate",
557
565
  "protected",
558
566
  "proposal-required",
559
567
  "approvals-required",
@@ -573,20 +581,21 @@ var ROUTE_DOCS = Object.freeze({
573
581
  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"]),
574
582
  readCatalogue: doc("Reads the published catalogue of a project's namespace.", SCOPED),
575
583
  readPendingProposal: doc("Reads the proposal waiting for review on a branch, if any.", SCOPED),
576
- 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"]),
584
+ submitProposal: doc("Submits a branch for review. Optional target names main, a writable organisation ref or a project branch; it defaults to main. A client holding branches.proposalSubmit may submit within the person's project permissions. That grant alone permits no other branch write. 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"]),
577
585
  createServiceIdentity: doc("Creates a service identity in an organisation.", [...SIGNED_IN, "not-permitted", "capability-missing", "duplicate-name"]),
578
586
  revokeServiceIdentity: doc("Revokes a service identity.", [...SIGNED_IN, "not-permitted", "service_identity.revoke"]),
579
587
  issueServiceCredential: doc("Issues a credential for a service identity.", [...SIGNED_IN, "not-permitted", "capability-missing"]),
580
588
  revokeServiceCredential: doc("Revokes a service identity's credential.", [...SIGNED_IN, "not-permitted", "capability-missing"]),
581
- grantMembership: doc("Grants a principal a role in a scope. An unknown role answers unknown-role with the deployment's roleKeys.", [...SIGNED_IN, "not-permitted", "above-caller-role", "unknown-role", "membership-exists", "no-such-principal"]),
589
+ grantMembership: doc("Grants a principal a role in a scope. An unknown role answers unknown-role with the deployment's roleKeys.", [...SIGNED_IN, "not-permitted", "above-caller-role", "unknown-role", "membership-own-role", "membership-exists", "no-such-principal"]),
590
+ leaveMembership: doc("Leaves the caller's own membership of a scope; at organisation scope, also removes their project memberships and ends their work, run sessions and open launches. An ended project permits departure.", [...SIGNED_IN, "not-permitted", "last-administrator", "no-such-membership", "erasure-not-permitted"]),
582
591
  revokeMembership: doc("Revokes a principal's membership of a scope; at organisation scope, also revokes their memberships in its projects.", [...SIGNED_IN, "not-permitted", "last-administrator", "no-such-membership", "erasure-not-permitted"]),
583
592
  setModelConfiguration: doc("Sets the model configuration an organisation's agents use.", [...SIGNED_IN, "not-permitted", "capability-missing", "window-out-of-range", "max-session-out-of-range"]),
584
593
  setModelId: doc("Changes the model an organisation's agents use, keeping the key it holds, for a caller who administers agents.", [...SIGNED_IN, "not-permitted", "model-not-configured"]),
585
594
  readModelConfigurationStatus: doc("Reads whether the caller's organisation has a model configured, and its provider, model and the time it was set, for a caller who administers agents. The key is never answered.", [...SIGNED_IN, "not-permitted"]),
586
595
  readAccount: doc("Reads the caller's own principal identifier, display name and registered email.", SIGNED_IN),
587
596
  readDisplayNames: doc("Reads the display names of principals the caller may see.", SIGNED_IN),
588
- listMembers: doc("Lists the members of a project.", SCOPED),
589
- changeMembershipRole: doc("Changes a principal's role in a scope; missing membership administration answers `capability-missing`.", [...SIGNED_IN, "not-permitted", "above-caller-role", "unknown-role", "last-administrator", "no-such-membership"]),
597
+ listMembers: doc("Lists the members of a project and the role options, each with its capabilities sorted by name. An empty capabilities list means that the role grants no capability.", SCOPED),
598
+ changeMembershipRole: doc("Changes a principal's role in a scope; missing membership administration answers `capability-missing`.", [...SIGNED_IN, "not-permitted", "above-caller-role", "unknown-role", "membership-own-role", "last-administrator", "no-such-membership"]),
590
599
  listOrganisationMembers: doc("Lists the memberships of the caller's organisation and of the projects of it the caller may read.", SCOPED),
591
600
  searchPeople: doc("Finds people in the caller's organisation when every query word starts a word of their name.", [...SIGNED_IN, "invalid-query"]),
592
601
  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"]),
@@ -596,7 +605,7 @@ var ROUTE_DOCS = Object.freeze({
596
605
  listComments: doc("Lists the comments on an object, oldest first, a page at a time.", [...REF_READ, "invalid-query"]),
597
606
  acquireDraft: doc("Acquires the subject\u2019s draft and lock using the body and base hash read on the server from that object on the selected ref.", [...REF_WRITE, "ref-not-found", "frozen", "protected", "draft-locked", "body-not-declared"]),
598
607
  saveDraft: doc("Saves draft blocks after comparing the current draft hash; the server mints an identifier for each added block and answers them in minted.", [...REF_WRITE, "ref-not-found", "frozen", "protected", "draft-lock-lost", "draft-changed", "unknown-block", "body-not-declared", "body-too-large"]),
599
- 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"]),
608
+ promoteDraft: doc("Publishes a checked draft. A draft with no edits returns committed false and records no commit; a recovered promote returns committed true with the current head and makes no second save." + SAVE_REASON, [...REF_WRITE, "ref-not-found", "frozen", "protected", "draft-lock-lost", "draft-not-flushed", "body-changed", "body-not-declared", "body-too-large"]),
600
609
  releaseDraft: doc("Releases an unchanged draft.", [...REF_WRITE, "ref-not-found", "draft-lock-lost", "draft-changed"]),
601
610
  discardDraft: doc("Discards the holder\u2019s draft.", [...REF_WRITE, "ref-not-found", "draft-lock-lost"]),
602
611
  breakDraftLock: doc("Breaks a draft lock as a project administrator; person-only objects.draftAdmin capability.", [...REF_WRITE, "ref-not-found"]),
@@ -640,7 +649,7 @@ var ROUTE_DOCS = Object.freeze({
640
649
  approveProposal: doc("Records the caller's approval of a pending proposal at the head hash the caller read; send that hash as headHash. Any person who reads the project and the proposal's target and is not an author may approve; a target the caller cannot read answers not-found. An approval counts toward a rule only while its hash is the branch's head and the approver holds the rule's approver role or is named on it.", [...SCOPED, "proposal-not-pending", "proposal-head-moved", "author-cannot-approve", "already-approved"]),
641
650
  readBranchDiff: doc("Reads the objects and edges a proposal's branch changes against its target. While the proposal is pending the diff is taken at the branch's current head, and atHash names that head; a closed proposal reads at its reviewed head. A target the caller cannot read answers not-found.", REF_READ),
642
651
  readLinkStatus: doc("Reads an object's tracked links at a stable head: review (cleared, suspect, unreviewed, not-visible or too-many-links), clearing attribution, link bounds and aggregate bounds with units and coverage. Only a readable upstream supplies its opaque upstreamVersion, the precondition for clearing.", [...REF_READ, "head-moved"]),
643
- clearLinks: doc("Clears 1 to 100 links atomically on the named ref. Send each linkId with the upstreamVersion from readLinkStatus as a precondition; upstream-changed requires a fresh read and review. Records the clearer and time without changing bounds. Admits user, `agent:apply`, client and service; `agent:explore` and `agent:types` are refused at admission. An unknown outcome must be recovered by correlation before retrying.", [...OBJECT_WRITE, "upstream-changed", "upstream-not-readable", "too-many-links"]),
652
+ clearLinks: doc("Clears 1 to 100 links atomically on the named ref. Send each linkId with the upstreamVersion from readLinkStatus as a precondition; upstream-changed requires a fresh read and review. Records the clearer and time without changing bounds. Admits user, `agent:apply`, client and service; `agent:explore` and `agent:types` are refused at admission. An unknown outcome must be recovered by correlation before retrying." + SAVE_REASON, [...OBJECT_WRITE, "upstream-changed", "upstream-not-readable", "too-many-links"]),
644
653
  readChangeImpact: doc("Reads review, link bounds and aggregate bounds state changes against the branch's merge base, plus downstream reach to depth three and hidden counts. Both ref and base are required. Includes added and removed states and pins both heads; over-bound and head-moved refuse the entire read without a partial answer.", [...REF_READ, "over-bound", "head-moved"]),
645
654
  diffBranches: doc("Reads the objects and edges one branch or baseline changes against another.", REF_READ),
646
655
  readBranchHistory: doc("Reads a branch's history of commits.", [...SCOPED, "invalid-continuation", "stale-continuation", "malformed-history-request"]),
@@ -652,11 +661,11 @@ var ROUTE_DOCS = Object.freeze({
652
661
  ...WRITE,
653
662
  "not-in-this-release"
654
663
  ]),
655
- addRefRule: doc("Adds one of the selected project's rules with extent, pattern and settings, and answers the full rule. Extent is ref or rows; organisation rules take ref only. Settings include consequence (open, merge-only or locked-rows-only), requireProposal, requiredApprovals, approverMinRole, restrictDeletions, approvers and bypass. Omitted settings take the defaults. Only project ref rules may restrict deletions; approvals need a proposal and an approver. A repeated add returns the existing rule.", [...SCOPED, "invalid-rule-pattern", "invalid-rule-setting", "unknown-rule-member"]),
664
+ addRefRule: doc("Adds one of the selected project's rules with extent, pattern and settings, and answers the full rule. Extent is ref or rows; organisation rules take ref only. Settings include consequence (open, merge-only or locked-rows-only), requireProposal, requiredApprovals, approverMinRole, restrictDeletions, approvers and bypass. Omitted settings take the defaults. Only project ref rules may restrict deletions; approvals need a proposal and an approver. An add with the same owner, case-insensitive pattern, extent and consequence returns the existing rule without an audit write if its settings are identical; otherwise it is refused with duplicate-rule. A different consequence can create a separate rule.", [...SCOPED, "invalid-rule-pattern", "invalid-rule-setting", "unknown-rule-member", "duplicate-rule"]),
656
665
  listRefRules: doc("Lists the selected project's visible rules with each identifier, extent and pattern, and every setting and member list.", SCOPED),
657
666
  removeRefRule: doc("Removes one of the selected project's rules by identifier and answers its ruleId. An absent, unreadable or other owner's identifier answers not-found.", SCOPED),
658
667
  updateRefRule: doc("Changes one of the selected project's rules in place and answers the full rule. Send ruleId and settings only. Omitted settings keep their values; supplied lists replace their members. A consequence already held by another rule on this pattern is refused duplicate-rule. Extent and pattern cannot change. Every update requires step-up confirmation in an agent-mode session. An absent, unreadable or other owner's identifier answers not-found.", [...SCOPED, "invalid-rule-setting", "unknown-rule-member", "duplicate-rule"]),
659
- addOrganisationRule: doc("Adds one of the attached organisation's rules with extent, pattern and settings, and answers the full rule. Extent is ref or rows; organisation rules take ref only. Settings include consequence (open, merge-only or locked-rows-only), requireProposal, requiredApprovals, approverMinRole, restrictDeletions, approvers and bypass. Omitted settings take the defaults. Only project ref rules may restrict deletions; approvals need a proposal and an approver. A repeated add returns the existing rule.", [...SCOPED, "invalid-rule-pattern", "invalid-rule-setting", "unknown-rule-member"]),
668
+ addOrganisationRule: doc("Adds one of the attached organisation's rules with extent, pattern and settings, and answers the full rule. Extent is ref or rows; organisation rules take ref only. Settings include consequence (open, merge-only or locked-rows-only), requireProposal, requiredApprovals, approverMinRole, restrictDeletions, approvers and bypass. Omitted settings take the defaults. Only project ref rules may restrict deletions; approvals need a proposal and an approver. An add with the same owner, case-insensitive pattern, extent and consequence returns the existing rule without an audit write if its settings are identical; otherwise it is refused with duplicate-rule. A different consequence can create a separate rule.", [...SCOPED, "invalid-rule-pattern", "invalid-rule-setting", "unknown-rule-member", "duplicate-rule"]),
660
669
  listOrganisationRules: doc("Lists the attached organisation's visible rules with each identifier, extent and pattern, and every setting and member list; read on a project in the organisation is enough.", SCOPED),
661
670
  removeOrganisationRule: doc("Removes one of the attached organisation's rules by identifier and answers its ruleId. An absent, unreadable or other owner's identifier answers not-found.", SCOPED),
662
671
  updateOrganisationRule: doc("Changes one of the attached organisation's rules in place and answers the full rule. Send ruleId and settings only. Omitted settings keep their values; supplied lists replace their members. A consequence already held by another rule on this pattern is refused duplicate-rule. Extent and pattern cannot change. Every update requires step-up confirmation in an agent-mode session. An absent, unreadable or other owner's identifier answers not-found.", [...SCOPED, "invalid-rule-setting", "unknown-rule-member", "duplicate-rule"]),
@@ -664,8 +673,9 @@ var ROUTE_DOCS = Object.freeze({
664
673
  listOrganisationRefs: doc("Lists branches and baselines in the attached organisation, including each name, readOnly and creation attribution; read on a project in the organisation is enough.", SCOPED),
665
674
  deleteOrganisationRef: doc("Deletes a writable branch from the attached organisation and answers its name. A baseline cannot be deleted.", [...REF_WRITE, "read-only-ref"]),
666
675
  markOrganisationRefReadOnly: doc("Marks an organisation branch read-only as a baseline and answers its full record. An absent name answers not-found; an unauthorised caller answers not-permitted.", SCOPED),
667
- setObjectLock: doc("Sets an object's lock on the selected project branch to none, merge-only or frozen and answers objectId and lock. The lock also applies to its existing structural child edges in that project; none lifts the lock. New children on a writable branch are not thereby frozen. Use a baseline for a fixed snapshot. An unknown lock answers invalid-request at lock.", [...REF_WRITE, "read-only-ref", "concurrent-change", "lock-unavailable"]),
676
+ setObjectLock: doc("Sets an object's lock on the selected project branch to none, merge-only or frozen and answers objectId and lock. The lock also applies to its existing structural child edges in that project; none lifts the lock. New children on a writable branch are not thereby frozen. Use a baseline for a fixed snapshot. An unknown lock answers invalid-request at lock." + SAVE_REASON, [...REF_WRITE, "read-only-ref", "concurrent-change", "lock-unavailable"]),
668
677
  readAgentCeiling: doc("Reads the selected project's maximum agent role as { ceiling }: contributor or maintainer. An absent or unreadable project answers not-found.", SCOPED),
678
+ renameProject: doc("Changes the selected project's display name and answers its project id and name. An empty name answers invalid-request at name; whitespace is preserved. A reader's rename, an absent project and an unreadable project each answer not-found.", SCOPED),
669
679
  setAgentCeiling: doc("Sets the selected project's maximum agent role to contributor or maintainer and answers { ceiling }. An unknown role answers invalid-request at ceiling.", SCOPED),
670
680
  requestSchemaUpdate: doc("Records a schema update request for a project branch or organisation branch or baseline and answers its state and attribution. Project refs use `<projectId>/<branch>` with a one-segment branch name; the request may name a branch that does not exist. Organisation refs use one segment. The trunk `main` answers invalid-request at `ref`. Execution is separate.", SCOPED),
671
681
  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),
@@ -802,6 +812,8 @@ var SCHEMAS = {
802
812
  readObjectSet: { "type": "object", "properties": { "setId": { "type": "string" } }, "required": ["setId"], "additionalProperties": false },
803
813
  updateObjectSet: { "type": "object", "properties": { "setId": { "type": "string" }, "revision": { "type": "integer" }, "name": { "type": "string" }, "members": { "type": "array", "items": { "type": "object", "properties": { "objectId": { "type": "string" }, "projectId": { "type": "string" } }, "required": ["objectId", "projectId"], "additionalProperties": false } } }, "required": ["setId", "revision"], "additionalProperties": false },
804
814
  deleteObjectSet: { "type": "object", "properties": { "setId": { "type": "string" }, "revision": { "type": "integer" } }, "required": ["setId", "revision"], "additionalProperties": false },
815
+ createFeedback: { "type": "object", "properties": { "kind": { "enum": ["bug", "feature"] }, "title": { "type": "string" }, "body": { "type": "string" }, "projectId": { "type": "string" }, "context": { "type": "object", "properties": { "routeName": { "type": "string" }, "correlationId": { "type": "string" }, "cliVersion": { "type": "string" }, "protocolVersion": { "type": "integer" } }, "required": [], "additionalProperties": false } }, "required": ["kind", "title", "body"], "additionalProperties": false },
816
+ listFeedback: { "type": "object", "properties": { "limit": { "type": "integer" }, "continuation": { "type": "string" } }, "required": [], "additionalProperties": false },
805
817
  health: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
806
818
  webSignInStart: { "type": "object", "properties": { "state": { "type": "string" }, "loopback": { "type": "string" }, "code_challenge": { "type": "string" }, "code_challenge_method": { "const": "S256" } }, "required": ["state", "loopback", "code_challenge", "code_challenge_method"], "additionalProperties": false },
807
819
  webRedeem: { "type": "object", "properties": { "code": { "type": "string", "format": "password", "writeOnly": true }, "state": { "type": "string" }, "code_verifier": { "type": "string", "format": "password", "writeOnly": true }, "invitation_code": { "type": "string", "format": "password", "writeOnly": true } }, "required": ["code", "state", "code_verifier"], "additionalProperties": false },
@@ -851,11 +863,11 @@ var SCHEMAS = {
851
863
  aggregateObjects: { "type": "object", "properties": { "kind": { "const": "aggregate" }, "typeKey": { "oneOf": [{ "type": "string" }, { "type": "null" }] }, "projects": { "type": "array", "items": { "type": "string" } }, "filters": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "=" }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "enum": [">", ">=", "<", "<="] }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] } } }, "required": ["kind", "property", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "identity" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "edge" }, "edgeTypeKey": { "type": "string" }, "direction": { "enum": ["outgoing", "incoming", "to-children", "to-parent"] }, "has": { "type": "boolean" } }, "required": ["kind", "edgeTypeKey", "direction", "has"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "or" }, "filters": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "=" }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "enum": [">", ">=", "<", "<="] }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] } } }, "required": ["kind", "property", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "identity" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "edge" }, "edgeTypeKey": { "type": "string" }, "direction": { "enum": ["outgoing", "incoming", "to-children", "to-parent"] }, "has": { "type": "boolean" } }, "required": ["kind", "edgeTypeKey", "direction", "has"], "additionalProperties": false }] } } }, "required": ["kind", "filters"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "text" }, "term": { "type": "string" }, "properties": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "term"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "type" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "op", "values"], "additionalProperties": false }] } }, "steps": { "type": "array", "items": { "type": "object", "properties": { "edgeTypeKey": { "type": "string" }, "direction": { "enum": ["outgoing", "incoming", "to-children", "to-parent"] }, "targetTypeKey": { "type": "string" }, "filters": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "=" }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "enum": [">", ">=", "<", "<="] }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] } } }, "required": ["kind", "property", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "identity" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "edge" }, "edgeTypeKey": { "type": "string" }, "direction": { "enum": ["outgoing", "incoming", "to-children", "to-parent"] }, "has": { "type": "boolean" } }, "required": ["kind", "edgeTypeKey", "direction", "has"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "or" }, "filters": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "=" }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "enum": [">", ">=", "<", "<="] }, "value": { "oneOf": [{ "type": "string" }, { "type": "number" }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] } } }, "required": ["kind", "property", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "identity" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "edge" }, "edgeTypeKey": { "type": "string" }, "direction": { "enum": ["outgoing", "incoming", "to-children", "to-parent"] }, "has": { "type": "boolean" } }, "required": ["kind", "edgeTypeKey", "direction", "has"], "additionalProperties": false }] } } }, "required": ["kind", "filters"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "text" }, "term": { "type": "string" }, "properties": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "term"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "type" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "op", "values"], "additionalProperties": false }] } } }, "required": ["edgeTypeKey", "direction", "targetTypeKey"], "additionalProperties": false } }, "operation": { "enum": ["count", "min", "max", "sum", "average"] }, "property": { "type": "string" }, "groupBy": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "type" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" } }, "required": ["kind", "property"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "parent" }, "edgeTypeKeys": { "type": "array", "items": { "type": "string" } }, "multiplicity": { "enum": ["per-path", "distinct"] }, "ends": { "enum": ["visible", "all"] }, "parents": { "type": "array", "items": { "type": "object", "properties": { "objectId": { "type": "string" }, "projectId": { "type": "string" } }, "required": ["objectId", "projectId"], "additionalProperties": false } } }, "required": ["kind", "edgeTypeKeys", "multiplicity", "ends"], "additionalProperties": false }] } }, "required": ["kind", "typeKey", "operation"], "additionalProperties": false },
852
864
  discoverVerbs: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
853
865
  readHistory: { "type": "object", "properties": { "objectId": { "type": "string" }, "limit": { "type": "integer" }, "continuation": { "oneOf": [{ "type": "string" }, { "type": "null" }] } }, "required": ["objectId", "limit", "continuation"], "additionalProperties": false },
854
- mutate: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "operation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "create-object" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-object" }, "objectId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "objectId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-object" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "create-edge" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "sourceObjectId": { "type": "string" }, "targetObjectId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "sourceObjectId", "targetObjectId", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-edge" }, "edgeId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "edgeId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-edge" }, "edgeId": { "type": "string" } }, "required": ["kind", "edgeId"], "additionalProperties": false }] } }, "required": ["correlation", "operation"], "additionalProperties": false },
855
- mutateBatch: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "operations": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "create-object" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-object" }, "objectId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "objectId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-object" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "create-edge" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "source": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "existing" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "created" }, "operation": { "type": "integer" } }, "required": ["kind", "operation"], "additionalProperties": false }] }, "target": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "existing" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "created" }, "operation": { "type": "integer" } }, "required": ["kind", "operation"], "additionalProperties": false }] }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "source", "target", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-edge" }, "edgeId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "edgeId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-edge" }, "edgeId": { "type": "string" } }, "required": ["kind", "edgeId"], "additionalProperties": false }] } } }, "required": ["correlation", "operations"], "additionalProperties": false },
866
+ mutate: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "operation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "create-object" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-object" }, "objectId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "objectId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-object" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "create-edge" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "sourceObjectId": { "type": "string" }, "targetObjectId": { "type": "string" }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "sourceObjectId", "targetObjectId", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-edge" }, "edgeId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "edgeId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-edge" }, "edgeId": { "type": "string" } }, "required": ["kind", "edgeId"], "additionalProperties": false }] }, "reason": { "type": "string" } }, "required": ["correlation", "operation", "reason"], "additionalProperties": false },
867
+ mutateBatch: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "operations": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "create-object" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-object" }, "objectId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "objectId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-object" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "create-edge" }, "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" }, "source": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "existing" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "created" }, "operation": { "type": "integer" } }, "required": ["kind", "operation"], "additionalProperties": false }] }, "target": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "existing" }, "objectId": { "type": "string" } }, "required": ["kind", "objectId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "created" }, "operation": { "type": "integer" } }, "required": ["kind", "operation"], "additionalProperties": false }] }, "properties": { "type": "object", "additionalProperties": {} } }, "required": ["kind", "typeKey", "typeVersion", "source", "target", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-edge" }, "edgeId": { "type": "string" }, "typeVersion": { "type": "integer" }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "absent" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "value" }, "value": {} }, "required": ["kind", "value"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "edgeId", "typeVersion", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-edge" }, "edgeId": { "type": "string" } }, "required": ["kind", "edgeId"], "additionalProperties": false }] } }, "reason": { "type": "string" } }, "required": ["correlation", "operations", "reason"], "additionalProperties": false },
856
868
  previewDelete: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
857
869
  recover: { "type": "object", "properties": { "correlationId": { "type": "string" } }, "required": ["correlationId"], "additionalProperties": false },
858
- executeVerb: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "verb": { "type": "object", "properties": { "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" } }, "required": ["typeKey", "typeVersion"], "additionalProperties": false }, "subjectIds": { "type": "array", "items": { "type": "string" } }, "input": {} }, "required": ["correlation", "verb", "subjectIds", "input"], "additionalProperties": false },
870
+ executeVerb: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "verb": { "type": "object", "properties": { "typeKey": { "type": "string" }, "typeVersion": { "type": "integer" } }, "required": ["typeKey", "typeVersion"], "additionalProperties": false }, "subjectIds": { "type": "array", "items": { "type": "string" } }, "input": {}, "reason": { "type": "string" } }, "required": ["correlation", "verb", "subjectIds", "input", "reason"], "additionalProperties": false },
859
871
  createBranch: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "name": { "type": "string" }, "from": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "ref" }, "ref": { "type": "string" } }, "required": ["kind", "ref"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "hash" }, "hash": { "type": "string" } }, "required": ["kind", "hash"], "additionalProperties": false }] } }, "required": ["correlation", "name"], "additionalProperties": false },
860
872
  merge: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "sourceHash": { "type": "string" }, "message": { "type": "string" }, "name": { "type": "string" }, "source": { "type": "string" }, "target": { "type": "string" } }, "required": ["correlation", "sourceHash", "message"], "additionalProperties": false },
861
873
  readMergeConflicts: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
@@ -871,6 +883,7 @@ var SCHEMAS = {
871
883
  revokeServiceCredential: { "type": "object", "properties": { "credentialId": { "type": "string" } }, "required": ["credentialId"], "additionalProperties": false },
872
884
  grantMembership: { "type": "object", "properties": { "principalId": { "type": "string" }, "scopeKind": { "enum": ["organisation", "project"] }, "scopeId": { "type": "string" }, "roleKey": { "type": "string" } }, "required": ["principalId", "scopeKind", "scopeId", "roleKey"], "additionalProperties": false },
873
885
  revokeMembership: { "type": "object", "properties": { "principalId": { "type": "string" }, "scopeKind": { "enum": ["organisation", "project"] }, "scopeId": { "type": "string" } }, "required": ["principalId", "scopeKind", "scopeId"], "additionalProperties": false },
886
+ leaveMembership: { "type": "object", "properties": { "scopeKind": { "enum": ["organisation", "project"] }, "scopeId": { "type": "string" } }, "required": ["scopeKind", "scopeId"], "additionalProperties": false },
874
887
  setModelConfiguration: { "type": "object", "properties": { "model": { "type": "string" }, "apiKey": { "type": "string", "format": "password", "writeOnly": true } }, "required": ["model", "apiKey"], "additionalProperties": false },
875
888
  setModelId: { "type": "object", "properties": { "model": { "type": "string" } }, "required": ["model"], "additionalProperties": false },
876
889
  readDisplayNames: { "type": "object", "properties": { "principalIds": { "type": "array", "items": { "type": "string" } } }, "required": ["principalIds"], "additionalProperties": false },
@@ -901,7 +914,7 @@ var SCHEMAS = {
901
914
  approveProposal: { "type": "object", "properties": { "proposalId": { "type": "string" }, "headHash": { "type": "string" } }, "required": ["proposalId", "headHash"], "additionalProperties": false },
902
915
  readBranchDiff: { "type": "object", "properties": { "proposalId": { "type": "string" }, "cursor": { "type": "string" } }, "required": ["proposalId"], "additionalProperties": false },
903
916
  readLinkStatus: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
904
- clearLinks: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "ref": { "type": "string" }, "entries": { "type": "array", "items": { "type": "object", "properties": { "linkId": { "type": "string" }, "upstreamVersion": { "type": "string" } }, "required": ["linkId", "upstreamVersion"], "additionalProperties": false }, "minItems": 1, "maxItems": 100 } }, "required": ["correlation", "ref", "entries"], "additionalProperties": false },
917
+ clearLinks: { "type": "object", "properties": { "correlation": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "mint" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "sent" }, "correlationId": { "type": "string" } }, "required": ["kind", "correlationId"], "additionalProperties": false }] }, "ref": { "type": "string" }, "entries": { "type": "array", "items": { "type": "object", "properties": { "linkId": { "type": "string" }, "upstreamVersion": { "type": "string" } }, "required": ["linkId", "upstreamVersion"], "additionalProperties": false }, "minItems": 1, "maxItems": 100 }, "reason": { "type": "string" } }, "required": ["correlation", "ref", "entries", "reason"], "additionalProperties": false },
905
918
  readChangeImpact: { "type": "object", "properties": { "ref": { "type": "string" }, "base": { "type": "string" } }, "required": ["ref", "base"], "additionalProperties": false },
906
919
  diffBranches: { "type": "object", "properties": { "ref": { "type": "string" }, "base": { "type": "string" }, "cursor": { "type": "string" } }, "required": ["ref", "base"], "additionalProperties": false },
907
920
  readBranchHistory: { "type": "object", "properties": { "name": { "type": "string" }, "cursor": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
@@ -922,9 +935,10 @@ var SCHEMAS = {
922
935
  listOrganisationRefs: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
923
936
  deleteOrganisationRef: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
924
937
  markOrganisationRefReadOnly: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
925
- setObjectLock: { "type": "object", "properties": { "objectId": { "type": "string" }, "lock": { "enum": ["none", "merge-only", "frozen"] } }, "required": ["objectId", "lock"], "additionalProperties": false },
938
+ setObjectLock: { "type": "object", "properties": { "objectId": { "type": "string" }, "lock": { "enum": ["none", "merge-only", "frozen"] }, "reason": { "type": "string" } }, "required": ["objectId", "lock", "reason"], "additionalProperties": false },
926
939
  readAgentCeiling: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
927
940
  setAgentCeiling: { "type": "object", "properties": { "ceiling": { "enum": ["contributor", "maintainer"] } }, "required": ["ceiling"], "additionalProperties": false },
941
+ renameProject: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], "additionalProperties": false },
928
942
  requestSchemaUpdate: { "type": "object", "properties": { "ref": { "type": "string" } }, "required": ["ref"], "additionalProperties": false },
929
943
  readSchemaUpdateRequest: { "type": "object", "properties": { "ref": { "type": "string" } }, "required": ["ref"], "additionalProperties": false },
930
944
  openAgentSession: { "type": "object", "properties": { "agent": { "enum": ["object", "ontology"] } }, "required": ["agent"], "additionalProperties": false },
@@ -962,7 +976,7 @@ var SCHEMAS = {
962
976
  listComments: { "type": "object", "properties": { "objectId": { "type": "string" }, "after": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
963
977
  acquireDraft: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
964
978
  saveDraft: { "type": "object", "properties": { "objectId": { "type": "string" }, "blocks": { "type": "object", "additionalProperties": { "type": "object", "properties": { "kind": { "const": "markdown" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false } }, "added": { "type": "array", "items": { "type": "object", "properties": { "kind": { "const": "markdown" }, "text": { "type": "string" }, "position": { "type": "string" } }, "required": ["kind", "text", "position"], "additionalProperties": false } }, "draftHash": { "type": "string" } }, "required": ["objectId", "blocks", "added", "draftHash"], "additionalProperties": false },
965
- promoteDraft: { "type": "object", "properties": { "objectId": { "type": "string" }, "draftHash": { "type": "string" } }, "required": ["objectId", "draftHash"], "additionalProperties": false },
979
+ promoteDraft: { "type": "object", "properties": { "objectId": { "type": "string" }, "draftHash": { "type": "string" }, "reason": { "type": "string" } }, "required": ["objectId", "draftHash", "reason"], "additionalProperties": false },
966
980
  releaseDraft: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
967
981
  discardDraft: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
968
982
  breakDraftLock: { "type": "object", "properties": { "objectId": { "type": "string" } }, "required": ["objectId"], "additionalProperties": false },
@@ -1023,6 +1037,8 @@ var EXAMPLES = {
1023
1037
  readObjectSet: { "setId": "ost_aaaaaaaaaaaaaaaaaaaaaaaaaa" },
1024
1038
  updateObjectSet: { "setId": "ost_aaaaaaaaaaaaaaaaaaaaaaaaaa", "revision": 1, "name": "Renamed set" },
1025
1039
  deleteObjectSet: { "setId": "ost_aaaaaaaaaaaaaaaaaaaaaaaaaa", "revision": 1 },
1040
+ createFeedback: { "kind": "bug", "title": "<title>", "body": "<body>" },
1041
+ listFeedback: {},
1026
1042
  health: {},
1027
1043
  webSignInStart: { "state": "<state>", "loopback": "<loopback>", "code_challenge": "<code_challenge>", "code_challenge_method": "S256" },
1028
1044
  webRedeem: { "code": "<code>", "state": "<state>", "code_verifier": "<code_verifier>" },
@@ -1060,11 +1076,11 @@ var EXAMPLES = {
1060
1076
  aggregateObjects: { "kind": "aggregate", "typeKey": null, "operation": "count" },
1061
1077
  discoverVerbs: { "objectId": "<objectId>" },
1062
1078
  readHistory: { "objectId": "<objectId>", "limit": 1, "continuation": null },
1063
- mutate: { "correlation": { "kind": "mint" }, "operation": { "kind": "create-object", "typeKey": "<typeKey>", "typeVersion": 1, "properties": {} } },
1064
- mutateBatch: { "correlation": { "kind": "mint" }, "operations": [] },
1079
+ mutate: { "correlation": { "kind": "mint" }, "operation": { "kind": "create-object", "typeKey": "<typeKey>", "typeVersion": 1, "properties": {} }, "reason": "<reason>" },
1080
+ mutateBatch: { "correlation": { "kind": "mint" }, "operations": [], "reason": "<reason>" },
1065
1081
  previewDelete: { "objectId": "<objectId>" },
1066
1082
  recover: { "correlationId": "<correlationId>" },
1067
- executeVerb: { "correlation": { "kind": "mint" }, "verb": { "typeKey": "<typeKey>", "typeVersion": 1 }, "subjectIds": [], "input": null },
1083
+ executeVerb: { "correlation": { "kind": "mint" }, "verb": { "typeKey": "<typeKey>", "typeVersion": 1 }, "subjectIds": [], "input": null, "reason": "<reason>" },
1068
1084
  createBranch: { "correlation": { "kind": "mint" }, "name": "<name>" },
1069
1085
  merge: { "correlation": { "kind": "mint" }, "sourceHash": "<sourceHash>", "message": "<message>", "name": "feature" },
1070
1086
  readMergeConflicts: { "name": "<name>" },
@@ -1080,6 +1096,7 @@ var EXAMPLES = {
1080
1096
  revokeServiceCredential: { "credentialId": "<credentialId>" },
1081
1097
  grantMembership: { "principalId": "<principalId>", "scopeKind": "organisation", "scopeId": "<scopeId>", "roleKey": "<roleKey>" },
1082
1098
  revokeMembership: { "principalId": "<principalId>", "scopeKind": "organisation", "scopeId": "<scopeId>" },
1099
+ leaveMembership: { "scopeKind": "organisation", "scopeId": "<scopeId>" },
1083
1100
  setModelConfiguration: { "model": "<model>", "apiKey": "<apiKey>" },
1084
1101
  setModelId: { "model": "<model>" },
1085
1102
  readDisplayNames: { "principalIds": [] },
@@ -1110,7 +1127,7 @@ var EXAMPLES = {
1110
1127
  approveProposal: { "proposalId": "<proposalId>", "headHash": "<headHash>" },
1111
1128
  readBranchDiff: { "proposalId": "<proposalId>" },
1112
1129
  readLinkStatus: { "objectId": "<objectId>" },
1113
- clearLinks: { "correlation": { "kind": "mint" }, "ref": "main", "entries": [{ "linkId": "<linkId>", "upstreamVersion": "<upstreamVersion>" }] },
1130
+ clearLinks: { "correlation": { "kind": "mint" }, "ref": "main", "entries": [{ "linkId": "<linkId>", "upstreamVersion": "<upstreamVersion>" }], "reason": "<reason>" },
1114
1131
  readChangeImpact: { "ref": "project/branch", "base": "main" },
1115
1132
  diffBranches: { "ref": "<ref>", "base": "<base>" },
1116
1133
  readBranchHistory: { "name": "<name>" },
@@ -1131,9 +1148,10 @@ var EXAMPLES = {
1131
1148
  listOrganisationRefs: {},
1132
1149
  deleteOrganisationRef: { "name": "<name>" },
1133
1150
  markOrganisationRefReadOnly: { "name": "<name>" },
1134
- setObjectLock: { "objectId": "<objectId>", "lock": "none" },
1151
+ setObjectLock: { "objectId": "<objectId>", "lock": "none", "reason": "<reason>" },
1135
1152
  readAgentCeiling: {},
1136
1153
  setAgentCeiling: { "ceiling": "contributor" },
1154
+ renameProject: { "name": "<name>" },
1137
1155
  requestSchemaUpdate: { "ref": "<ref>" },
1138
1156
  readSchemaUpdateRequest: { "ref": "<ref>" },
1139
1157
  openAgentSession: { "agent": "object" },
@@ -1171,7 +1189,7 @@ var EXAMPLES = {
1171
1189
  listComments: { "objectId": "<objectId>" },
1172
1190
  acquireDraft: { "objectId": "<objectId>" },
1173
1191
  saveDraft: { "objectId": "<objectId>", "blocks": {}, "added": [], "draftHash": "<draftHash>" },
1174
- promoteDraft: { "objectId": "<objectId>", "draftHash": "<draftHash>" },
1192
+ promoteDraft: { "objectId": "<objectId>", "draftHash": "<draftHash>", "reason": "<reason>" },
1175
1193
  releaseDraft: { "objectId": "<objectId>" },
1176
1194
  discardDraft: { "objectId": "<objectId>" },
1177
1195
  breakDraftLock: { "objectId": "<objectId>" },
@@ -1207,7 +1225,7 @@ var ROUTE_INPUT_EXAMPLES = deepFreeze(EXAMPLES);
1207
1225
  var DESCRIPTION_ROUTES = Object.freeze(["queryRows", "queryObjects", "aggregateObjects", "queryGraph", "readStructure", "findPaths"]);
1208
1226
 
1209
1227
  // packages/api-contract/dist/routes.js
1210
- var PROTOCOL_VERSION = 44;
1228
+ var PROTOCOL_VERSION = 48;
1211
1229
  var VERSION_HEADER = "oe2-protocol-version";
1212
1230
  var TOKEN_HEADER = "authorization";
1213
1231
  var IDEMPOTENCY_HEADER = "oe2-idempotency-key";
@@ -1267,6 +1285,8 @@ var STEP_UP_ROUTE_GROUPS = Object.freeze({
1267
1285
  readObjectSet: "unmarked",
1268
1286
  updateObjectSet: "unmarked",
1269
1287
  deleteObjectSet: "unmarked",
1288
+ createFeedback: "marked",
1289
+ listFeedback: "unmarked",
1270
1290
  health: "unmarked",
1271
1291
  webSignInStart: "unmarked",
1272
1292
  signInStart: "unmarked",
@@ -1321,6 +1341,7 @@ var STEP_UP_ROUTE_GROUPS = Object.freeze({
1321
1341
  revokeServiceCredential: "unmarked",
1322
1342
  grantMembership: "marked-refused-to-agents",
1323
1343
  revokeMembership: "unmarked",
1344
+ leaveMembership: "unmarked",
1324
1345
  setModelConfiguration: "marked",
1325
1346
  setModelId: "unmarked",
1326
1347
  readModelConfigurationStatus: "unmarked",
@@ -1375,6 +1396,7 @@ var STEP_UP_ROUTE_GROUPS = Object.freeze({
1375
1396
  setObjectLock: "marked",
1376
1397
  readAgentCeiling: "unmarked",
1377
1398
  setAgentCeiling: "marked-refused-to-agents",
1399
+ renameProject: "marked-refused-to-agents",
1378
1400
  requestSchemaUpdate: "unmarked",
1379
1401
  readSchemaUpdateRequest: "unmarked",
1380
1402
  openAgentSession: "unmarked",
@@ -1694,6 +1716,8 @@ var ROUTES = Object.freeze({
1694
1716
  readObjectSet: route({ name: "readObjectSet", method: "POST", path: "/object-sets/read", group: "read", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.readObjectSet" }),
1695
1717
  updateObjectSet: route({ name: "updateObjectSet", method: "POST", path: "/object-sets/update", group: "write", selector: "object", subject: "project", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.updateObjectSet" }),
1696
1718
  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" }),
1719
+ createFeedback: route({ name: "createFeedback", method: "POST", path: "/feedback", group: "write", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "service"), versioned: true, module: "admin-sdk", capability: "admin.feedback" }),
1720
+ listFeedback: route({ name: "listFeedback", method: "POST", path: "/feedback/list", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "service"), versioned: true, module: "admin-sdk", capability: "admin.feedbackList" }),
1697
1721
  health: route({ name: "health", method: "GET", path: "/health", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: NO_ACTORS, versioned: false, module: "sdk-core", capability: "core.health" }),
1698
1722
  webSignInStart: route({ name: "webSignInStart", method: "POST", path: "/auth/web/sign-in", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: NO_ACTORS, versioned: true, module: "sdk-core", capability: "core.webSignInStart" }),
1699
1723
  signInStart: route({ name: "signInStart", method: "GET", path: "/auth/sign-in", group: "platform", selector: "none", subject: "platform", idempotent: false, policy: NO_ACTORS, versioned: false, module: "sdk-core", capability: "core.signInStart" }),
@@ -1928,6 +1952,7 @@ var ROUTES = Object.freeze({
1928
1952
  capability: "admin.membership"
1929
1953
  }),
1930
1954
  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" }),
1955
+ leaveMembership: route({ name: "leaveMembership", method: "POST", path: "/memberships/leave", group: "administration", selector: "none", subject: "membership-scope", idempotent: false, policy: admittingActors("person"), versioned: true, module: "admin-sdk", capability: "admin.membershipRevocation" }),
1931
1956
  setModelConfiguration: route({
1932
1957
  name: "setModelConfiguration",
1933
1958
  method: "POST",
@@ -2149,6 +2174,19 @@ var ROUTES = Object.freeze({
2149
2174
  capability: "objects.locks"
2150
2175
  }),
2151
2176
  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" }),
2177
+ renameProject: route({
2178
+ name: "renameProject",
2179
+ method: "POST",
2180
+ path: "/projects/rename",
2181
+ group: "administration",
2182
+ selector: "project",
2183
+ subject: "project",
2184
+ idempotent: false,
2185
+ policy: admittingActors("person"),
2186
+ versioned: true,
2187
+ module: "admin-sdk",
2188
+ capability: "admin.projectRename"
2189
+ }),
2152
2190
  setAgentCeiling: route({
2153
2191
  name: "setAgentCeiling",
2154
2192
  method: "POST",
@@ -2265,6 +2303,8 @@ var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
2265
2303
  readObjectSet: false,
2266
2304
  updateObjectSet: false,
2267
2305
  deleteObjectSet: false,
2306
+ createFeedback: false,
2307
+ listFeedback: false,
2268
2308
  health: false,
2269
2309
  webSignInStart: false,
2270
2310
  webRedeem: true,
@@ -2319,6 +2359,7 @@ var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
2319
2359
  revokeServiceCredential: false,
2320
2360
  grantMembership: false,
2321
2361
  revokeMembership: false,
2362
+ leaveMembership: false,
2322
2363
  setModelConfiguration: true,
2323
2364
  setModelId: false,
2324
2365
  readModelConfigurationStatus: false,
@@ -2373,6 +2414,7 @@ var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
2373
2414
  setObjectLock: false,
2374
2415
  readAgentCeiling: false,
2375
2416
  setAgentCeiling: false,
2417
+ renameProject: false,
2376
2418
  requestSchemaUpdate: false,
2377
2419
  readSchemaUpdateRequest: false,
2378
2420
  openAgentSession: false,
@@ -2566,7 +2608,9 @@ var BOUND_LABEL = {
2566
2608
  "rate-per-principal": "the request-rate limit per principal",
2567
2609
  "rate-per-address": "the request-rate limit per address",
2568
2610
  "resolve-in-flight": "the concurrent name-resolution limit",
2569
- "pending-sign-ins": "the pending sign-in limit"
2611
+ "pending-sign-ins": "the pending sign-in limit",
2612
+ "request-duration": "the time limit on one request",
2613
+ "feedback-per-filer": "the limit of 100 feedback entries per filer per organisation in any 24 hours"
2570
2614
  };
2571
2615
  function explainKind(kind) {
2572
2616
  if (!Object.hasOwn(BY_KIND, kind)) {
@@ -2576,7 +2620,10 @@ function explainKind(kind) {
2576
2620
  if (kind !== "bound-exceeded") {
2577
2621
  return Object.freeze({ explanation, explains: "kind" });
2578
2622
  }
2579
- return Object.freeze({ explanation: withMeaning(explanation, "The exceeded limit is the request-body, query-page, concurrency, request-rate, address-rate, resolve-capacity or pending-sign-in limit."), explains: "kind" });
2623
+ return Object.freeze({
2624
+ explanation: withMeaning(explanation, "The exceeded limit is the request-body, query-page, concurrency, request-rate, address-rate, resolve-capacity, pending-sign-in or request-duration limit."),
2625
+ explains: "kind"
2626
+ });
2580
2627
  }
2581
2628
  function withMeaning(explanation, detail) {
2582
2629
  return Object.freeze({ meaning: `${explanation.meaning} ${detail}`, next: explanation.next });
@@ -3744,6 +3791,7 @@ var ADMIN_ROUTE_NAMES = Object.freeze([
3744
3791
  "revokeServiceCredential",
3745
3792
  "grantMembership",
3746
3793
  "revokeMembership",
3794
+ "leaveMembership",
3747
3795
  "setModelConfiguration",
3748
3796
  "setModelId",
3749
3797
  "readModelConfigurationStatus",
@@ -3783,6 +3831,7 @@ var ADMIN_ROUTE_NAMES = Object.freeze([
3783
3831
  "markOrganisationRefReadOnly",
3784
3832
  "readAgentCeiling",
3785
3833
  "setAgentCeiling",
3834
+ "renameProject",
3786
3835
  "createConnection",
3787
3836
  "listConnections",
3788
3837
  "setConnectionCredential",
@@ -3791,7 +3840,9 @@ var ADMIN_ROUTE_NAMES = Object.freeze([
3791
3840
  "revokeConnection",
3792
3841
  "startImportRun",
3793
3842
  "listImportRuns",
3794
- "closeImportRun"
3843
+ "closeImportRun",
3844
+ "createFeedback",
3845
+ "listFeedback"
3795
3846
  ]);
3796
3847
  function entries() {
3797
3848
  return ADMIN_ROUTE_NAMES.map((name) => ROUTES[name]);
@@ -12278,6 +12329,16 @@ async function publishDemoTypes(ontology, organisationId) {
12278
12329
  }
12279
12330
  resultOf(await ontology.acceptChangeSet({ input: { changeSetId, revision } }, `${IDEMPOTENCY_PREFIX}.${organisationId}.accept.${changeSetId}`), "acceptChangeSet");
12280
12331
  }
12332
+ function rootSystemNameOf(data) {
12333
+ const roots = data.systemTree.filter((system) => system.parent === null);
12334
+ if (roots.length !== 1) {
12335
+ throw new Error(`the demo world's system tree has ${String(roots.length)} root systems, and the world is named by exactly one`);
12336
+ }
12337
+ return roots[0].name;
12338
+ }
12339
+ function demoStepReason(worldName, stepKind, ref) {
12340
+ return `Demo world ${worldName}: ${stepKind} ${ref}`;
12341
+ }
12281
12342
  async function playDemoWorld(clients, target, size, data) {
12282
12343
  const firstObjectType = DEMO_OBJECT_TYPES[0];
12283
12344
  if (firstObjectType === void 0) {
@@ -12307,8 +12368,10 @@ async function playDemoWorld(clients, target, size, data) {
12307
12368
  let created = 0;
12308
12369
  let replayed2 = 0;
12309
12370
  const selector = { projectId: target.projectId, ref: TRUNK_REF };
12371
+ const worldName = rootSystemNameOf(data);
12310
12372
  const mutate = async (ref, operation) => {
12311
- const outcome = succeededEnvelope(await clients.objects.mutate({ selector, input: { correlation: { kind: "mint" }, operation } }, idempotencyKeyOf(target.projectId, ref)), `mutate ${ref}`);
12373
+ const reason = demoStepReason(worldName, operation.kind, ref);
12374
+ const outcome = succeededEnvelope(await clients.objects.mutate({ selector, input: { correlation: { kind: "mint" }, operation, reason } }, idempotencyKeyOf(target.projectId, ref)), `mutate ${ref}`);
12312
12375
  if (outcome.replayed) {
12313
12376
  replayed2 += 1;
12314
12377
  } else {
@@ -12467,6 +12530,77 @@ var sessionStatus = sessionCommand(
12467
12530
  "reads this session's channel, mode and sign-in time from the server; needs no organisation attachment"
12468
12531
  );
12469
12532
 
12533
+ // packages/cli/src/commands/feedback.ts
12534
+ import { readFileSync as readFileSync5 } from "node:fs";
12535
+
12536
+ // packages/cli/src/cli-version.ts
12537
+ var PATCH_VERSION = 0;
12538
+ var CLI_VERSION = `0.${PROTOCOL_VERSION}.${PATCH_VERSION}`;
12539
+
12540
+ // packages/cli/src/commands/feedback.ts
12541
+ var SETTLE3 = "list your feedback with openeng admin-sdk listFeedback before filing again, so you do not file it twice";
12542
+ var UNREADABLE_CODES = ["ENOENT", "EISDIR", "EACCES"];
12543
+ function readBodyFile(path) {
12544
+ try {
12545
+ return { ok: true, text: readFileSync5(path, "utf8") };
12546
+ } catch (error) {
12547
+ if (error instanceof Error && "code" in error && UNREADABLE_CODES.includes(String(error.code))) {
12548
+ const message = `--body-file ${JSON.stringify(path)} could not be read: ${String(error.code)}`;
12549
+ return { ok: false, outcome: { kind: "client-refusal", message } };
12550
+ }
12551
+ throw error;
12552
+ }
12553
+ }
12554
+ function feedbackCommand(kind) {
12555
+ const usage = `openeng feedback ${kind} --title <text> (--body <text> | --body-file <path|->) [context]`;
12556
+ return {
12557
+ words: ["feedback", kind],
12558
+ organisation: "required",
12559
+ usage,
12560
+ help: [
12561
+ usage,
12562
+ "context: --project <id> --route <name> --correlation <id>, each optional",
12563
+ `does: files a ${kind} feedback entry; --body-file - reads the body from standard input`,
12564
+ `example: openeng feedback ${kind} --title "..." --body-file - --route createFeedback`,
12565
+ "output: entry identifier and filing time"
12566
+ ],
12567
+ run: async ({ host, deps, options, readStandardInput }) => {
12568
+ const { title, body, bodyFile, project, route: route2, correlation } = options;
12569
+ if (title === void 0) {
12570
+ return { kind: "client-refusal", message: "--title <text> is required" };
12571
+ }
12572
+ let text;
12573
+ if (body !== void 0 && bodyFile === void 0) {
12574
+ text = body;
12575
+ } else if (body === void 0 && bodyFile === "-") {
12576
+ text = readStandardInput();
12577
+ } else if (body === void 0 && bodyFile !== void 0) {
12578
+ const read = readBodyFile(bodyFile);
12579
+ if (!read.ok) return read.outcome;
12580
+ text = read.text;
12581
+ } else {
12582
+ return { kind: "client-refusal", message: "give exactly one of --body <text> and --body-file <path>" };
12583
+ }
12584
+ const input = {
12585
+ kind,
12586
+ title,
12587
+ body: text,
12588
+ ...project === void 0 ? {} : { projectId: project },
12589
+ context: {
12590
+ ...route2 === void 0 ? {} : { routeName: route2 },
12591
+ ...correlation === void 0 ? {} : { correlationId: correlation },
12592
+ cliVersion: CLI_VERSION,
12593
+ protocolVersion: PROTOCOL_VERSION
12594
+ }
12595
+ };
12596
+ const run2 = await runAuthenticated(host, deps, (clients) => clients.admin.createFeedback({ input }));
12597
+ return run2.ok ? outcomeOfEnvelope(run2.answer, SETTLE3, (value) => `${value.entryId} ${value.filedAt}`) : outcomeOfSessionFailure(run2.failure, SETTLE3);
12598
+ }
12599
+ };
12600
+ }
12601
+ var feedbackBug = feedbackCommand("bug");
12602
+ var feedbackFeature = feedbackCommand("feature");
12603
+
12470
12604
  // packages/cli/src/commands/whoami.ts
12471
12605
  var whoami = async (host, store) => {
12472
12606
  const summary = await storedSummary(store, host.key);
@@ -12762,7 +12896,7 @@ var connectorRuns = {
12762
12896
  };
12763
12897
 
12764
12898
  // packages/cli/src/commands/link.ts
12765
- var SETTLE3 = "repeat openeng link, which only reads";
12899
+ var SETTLE4 = "repeat openeng link, which only reads";
12766
12900
  var IDENTIFIER_FIELD = Object.freeze({
12767
12901
  object: "objectId",
12768
12902
  type: "typeKey",
@@ -12961,7 +13095,7 @@ async function link(context) {
12961
13095
  return { kind: "link-ready", webOrigin: origin.result.webOrigin, path };
12962
13096
  });
12963
13097
  if (!run2.ok) {
12964
- return outcomeOfSessionFailure(run2.failure, SETTLE3);
13098
+ return outcomeOfSessionFailure(run2.failure, SETTLE4);
12965
13099
  }
12966
13100
  const { answer } = run2;
12967
13101
  if ("kind" in answer) {
@@ -12973,7 +13107,7 @@ async function link(context) {
12973
13107
  const href = new URL(path, webOrigin).href;
12974
13108
  return { kind: "success", value: { link: href }, text: href };
12975
13109
  }
12976
- return outcomeOfEnvelope(answer, SETTLE3, (result) => JSON.stringify(result));
13110
+ return outcomeOfEnvelope(answer, SETTLE4, (result) => JSON.stringify(result));
12977
13111
  }
12978
13112
  var BARE_USAGE = "openeng link <kind> ... (openeng link --help)";
12979
13113
  var spec = (argumentCount, usage) => ({
@@ -13013,7 +13147,7 @@ var linkBare = spec(0, BARE_USAGE);
13013
13147
 
13014
13148
  // packages/cli/src/commands/projects.ts
13015
13149
  import { randomUUID as randomUUID3 } from "node:crypto";
13016
- var SETTLE4 = "repeat openeng projects list, which only reads";
13150
+ var SETTLE5 = "repeat openeng projects list, which only reads";
13017
13151
  function listText(listings) {
13018
13152
  if (listings.length === 0) {
13019
13153
  return "no projects";
@@ -13032,7 +13166,7 @@ var projectsList = {
13032
13166
  ],
13033
13167
  run: async ({ host, deps }) => {
13034
13168
  const run2 = await runAuthenticated(host, deps, (clients) => clients.objects.listProjects({ input: {} }));
13035
- return run2.ok ? outcomeOfEnvelope(run2.answer, SETTLE4, listText) : outcomeOfSessionFailure(run2.failure, SETTLE4);
13169
+ return run2.ok ? outcomeOfEnvelope(run2.answer, SETTLE5, listText) : outcomeOfSessionFailure(run2.failure, SETTLE5);
13036
13170
  }
13037
13171
  };
13038
13172
  var projectsCreate = {
@@ -13052,7 +13186,31 @@ var projectsCreate = {
13052
13186
  }
13053
13187
  const key = randomUUID3();
13054
13188
  const run2 = await runAuthenticated(host, deps, (clients) => clients.admin.createProject({ input: { name } }, key));
13055
- return run2.ok ? outcomeOfEnvelope(run2.answer, SETTLE4, (created) => `created project ${created.projectId} with namespace ${created.namespaceId}`) : outcomeOfSessionFailure(run2.failure, SETTLE4);
13189
+ return run2.ok ? outcomeOfEnvelope(run2.answer, SETTLE5, (created) => `created project ${created.projectId} with namespace ${created.namespaceId}`) : outcomeOfSessionFailure(run2.failure, SETTLE5);
13190
+ }
13191
+ };
13192
+ var projectsRename = {
13193
+ words: ["projects", "rename"],
13194
+ organisation: "required",
13195
+ usage: "openeng projects rename --project <id> --name <text>",
13196
+ help: [
13197
+ "openeng projects rename --project <id> --name <text>",
13198
+ "does: renames the project; the name is sent as typed, and only an empty name is refused",
13199
+ "capability: administer projects on the selected project; a caller without it is told the project was not found",
13200
+ 'example: openeng projects rename --project project-one --name "Rover"',
13201
+ "output: one line with the project id and its new name; under --json an object with projectId and name"
13202
+ ],
13203
+ run: async ({ host, deps, options }) => {
13204
+ const { project, name } = options;
13205
+ if (project === void 0 || name === void 0) {
13206
+ return { kind: "client-refusal", message: "openeng projects rename needs --project <id> and --name <text>" };
13207
+ }
13208
+ const settle2 = "repeat openeng projects list, which only reads";
13209
+ const run2 = await runAuthenticated(host, deps, (clients) => clients.admin.renameProject({
13210
+ selector: { projectId: project },
13211
+ input: { name }
13212
+ }));
13213
+ return run2.ok ? outcomeOfEnvelope(run2.answer, settle2, (renamed) => `renamed project ${renamed.projectId} to ${renamed.name}`) : outcomeOfSessionFailure(run2.failure, settle2);
13056
13214
  }
13057
13215
  };
13058
13216
 
@@ -13376,18 +13534,87 @@ var orgRefsMarkReadOnly = {
13376
13534
  }
13377
13535
  };
13378
13536
 
13537
+ // packages/cli/src/cli-options.ts
13538
+ var CLI_OPTIONS = {
13539
+ "object-set": { type: "string" },
13540
+ host: { type: "string" },
13541
+ "sign-in-origin": { type: "string" },
13542
+ json: { type: "boolean" },
13543
+ "no-open": { type: "boolean" },
13544
+ project: { type: "string" },
13545
+ title: { type: "string" },
13546
+ body: { type: "string" },
13547
+ "body-file": { type: "string" },
13548
+ route: { type: "string" },
13549
+ correlation: { type: "string" },
13550
+ organisation: { type: "boolean" },
13551
+ "read-only": { type: "boolean" },
13552
+ object: { type: "string" },
13553
+ lock: { type: "string" },
13554
+ ceiling: { type: "string" },
13555
+ pattern: { type: "string" },
13556
+ consequence: { type: "string" },
13557
+ "extent": { type: "string" },
13558
+ "require-proposal": { type: "string" },
13559
+ "required-approvals": { type: "string" },
13560
+ "approver-min-role": { type: "string" },
13561
+ "restrict-deletions": { type: "string" },
13562
+ "approvers": { type: "string" },
13563
+ "bypass": { type: "string" },
13564
+ "rule-id": { type: "string" },
13565
+ ref: { type: "string" },
13566
+ base: { type: "string" },
13567
+ name: { type: "string" },
13568
+ "change-set": { type: "string" },
13569
+ revision: { type: "string" },
13570
+ from: { type: "string" },
13571
+ "rail-groups": { type: "string" },
13572
+ type: { type: "string" },
13573
+ sample: { type: "string" },
13574
+ size: { type: "string" },
13575
+ world: { type: "string" },
13576
+ selector: { type: "string" },
13577
+ input: { type: "string" },
13578
+ "input-file": { type: "string" },
13579
+ "idempotency-key": { type: "string" },
13580
+ system: { type: "string" },
13581
+ stack: { type: "string" },
13582
+ company: { type: "string" },
13583
+ team: { type: "string" },
13584
+ owner: { type: "string" },
13585
+ label: { type: "string" },
13586
+ out: { type: "string" },
13587
+ key: { type: "string" },
13588
+ reason: { type: "string" },
13589
+ help: { type: "boolean", short: "h" },
13590
+ version: { type: "boolean" }
13591
+ };
13592
+ var APP_KEY_FORM = /^[a-z0-9][a-z0-9-]{0,62}$/;
13593
+ var BLANK = new RegExp("^\\p{White_Space}*$", "u");
13594
+ var LONE_SURROGATE = new RegExp("\\p{Surrogate}", "u");
13595
+ function readReason(reason) {
13596
+ if (reason === void 0) {
13597
+ return { ok: false, message: "--reason <text> is required: say why the change is made" };
13598
+ }
13599
+ if (BLANK.test(reason) || reason.includes("\0") || LONE_SURROGATE.test(reason)) {
13600
+ return { ok: false, message: "--reason must say why the change is made: it cannot be empty, only white space, or hold a NUL character or a lone surrogate" };
13601
+ }
13602
+ return { ok: true, reason };
13603
+ }
13604
+
13379
13605
  // packages/cli/src/commands/locks.ts
13380
13606
  var LOCKS = ["none", "merge-only", "frozen"];
13381
13607
  var lockOutcome = (outcome) => outcome.kind === "success" ? { ...outcome, value: { value: outcome.value } } : outcome;
13382
13608
  var locksSet = {
13383
13609
  words: ["locks", "set"],
13384
13610
  organisation: "required",
13385
- usage: "openeng locks set --project <id> --ref <ref> --object <objectId> --lock <none|merge-only|frozen>",
13611
+ usage: "openeng locks set --project <id> --ref <ref> --object <id> --lock <lock> --reason <text>",
13386
13612
  help: [
13387
- "openeng locks set --project <id> --ref <ref> --object <objectId> --lock <none|merge-only|frozen>",
13388
- "does: sets or lifts an object's lock on the selected project ref",
13613
+ "openeng locks set --project <id> --ref <ref> --object <id> --lock <lock> --reason <text>",
13614
+ "does: sets or lifts an object's lock on the selected project ref; --lock is none, merge-only or frozen",
13615
+ "reason: required; say why the lock changes, written first in the save commit message",
13389
13616
  protectionCapabilityHelp("setObjectLock"),
13390
- "example: openeng locks set --project project-one --ref main --object object-one --lock frozen",
13617
+ 'example: openeng locks set --project project-one --ref main --object object-one --lock frozen --reason "Freeze the released drawing"',
13391
13618
  "output: the object identifier and lock; under --json { scope, value }, with { objectId, lock } in value"
13392
13619
  ],
13393
13620
  run: async ({ host, deps, options }) => {
@@ -13398,13 +13625,17 @@ var locksSet = {
13398
13625
  message: "openeng locks set needs --project <id>, --ref <ref>, --object <objectId> and --lock <none|merge-only|frozen>"
13399
13626
  };
13400
13627
  }
13628
+ const reason = readReason(options.reason);
13629
+ if (!reason.ok) {
13630
+ return { kind: "client-refusal", message: reason.message };
13631
+ }
13401
13632
  const lock = LOCKS.find((value) => value === options.lock);
13402
13633
  if (lock === void 0) {
13403
13634
  return { kind: "client-refusal", message: "--lock must be none, merge-only or frozen" };
13404
13635
  }
13405
13636
  const selector = { projectId: project, ref };
13406
- const input = { objectId: object, lock };
13407
- const settle2 = `repeat openeng locks set --project ${project} --ref ${ref} --object ${object} --lock ${lock}, which sets the same lock again`;
13637
+ const input = { objectId: object, lock, reason: reason.reason };
13638
+ const settle2 = `repeat openeng locks set --project ${project} --ref ${ref} --object ${object} --lock ${lock} --reason <text>, which sets the same lock again`;
13408
13639
  const run2 = await runAuthenticated(host, deps, (clients) => clients.objects.setObjectLock({ selector, input }));
13409
13640
  return run2.ok ? lockOutcome(outcomeOfEnvelope(run2.answer, settle2, (value) => `object ${value.objectId} lock ${value.lock}`)) : outcomeOfSessionFailure(run2.failure, settle2);
13410
13641
  }
@@ -13528,7 +13759,7 @@ var schemaUpdateShow = {
13528
13759
 
13529
13760
  // packages/cli/src/commands/types.ts
13530
13761
  import { randomUUID as randomUUID4 } from "node:crypto";
13531
- import { readFileSync as readFileSync5 } from "node:fs";
13762
+ import { readFileSync as readFileSync6 } from "node:fs";
13532
13763
 
13533
13764
  // packages/cli/src/commands/type-revise-help.ts
13534
13765
  var TYPE_REVISE_EXAMPLE_KEYS = {
@@ -13867,7 +14098,7 @@ var typesDraftState = {
13867
14098
  function objectOfFile(path, shape) {
13868
14099
  let text;
13869
14100
  try {
13870
- text = readFileSync5(path, "utf8");
14101
+ text = readFileSync6(path, "utf8");
13871
14102
  } catch (error) {
13872
14103
  if (error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "EISDIR" || error.code === "EACCES")) {
13873
14104
  return { ok: false, outcome: { kind: "client-refusal", message: `the file ${JSON.stringify(path)} could not be read: ${error.code}` } };
@@ -14101,7 +14332,7 @@ import { createHash as createHash3, randomUUID as randomUUID5 } from "node:crypt
14101
14332
  import { renameSync as renameSync2, rmSync } from "node:fs";
14102
14333
  import { open } from "node:fs/promises";
14103
14334
  import { basename } from "node:path";
14104
- var usageAdd = "openeng attachment add <object> <property> <file> --project <id> --ref <ref>";
14335
+ var usageAdd = "openeng attachment add <object> <property> <file> --project <id> --ref <ref> --reason <text>";
14105
14336
  var usageGet = "openeng attachment get <object> <property> [--out <path>] --project <id> --ref <ref>";
14106
14337
  var usageList = "openeng attachment list <object> --project <id> --ref <ref>";
14107
14338
  var invalid = (message) => ({ kind: "client-refusal", message });
@@ -14146,7 +14377,7 @@ function wireDescriptor(value) {
14146
14377
  }
14147
14378
  return null;
14148
14379
  }
14149
- async function saveDescriptor(context, selector, objectId, property, file) {
14380
+ async function saveDescriptor(context, selector, objectId, property, file, reason) {
14150
14381
  const name = basename(file);
14151
14382
  const settle2 = `openeng attachment get ${objectId} ${property} --project ${selector.projectId} --ref ${selector.ref}`;
14152
14383
  const run2 = await runAuthenticated(context.host, context.deps, async (clients) => {
@@ -14191,7 +14422,8 @@ async function saveDescriptor(context, selector, objectId, property, file) {
14191
14422
  const previous = isRecord4(current) && "value" in current ? { kind: "value", value: current.value } : { kind: "absent" };
14192
14423
  const saved = await clients.objects.mutate({ selector, input: {
14193
14424
  correlation: { kind: "mint" },
14194
- operation: { kind: "update-object", objectId, typeVersion: type.version, changes: { [property]: { from: previous, to: { kind: "value", value: staged.result } } } }
14425
+ operation: { kind: "update-object", objectId, typeVersion: type.version, changes: { [property]: { from: previous, to: { kind: "value", value: staged.result } } } },
14426
+ reason
14195
14427
  } }, randomUUID5());
14196
14428
  if ("refusal" in saved) return { outcome: outcomeOfEnvelope(saved, settle2, (value2) => JSON.stringify(value2)) };
14197
14429
  if (saved.replayed === true) return { outcome: outcomeOfEnvelope(saved, settle2, (value2) => JSON.stringify(value2)) };
@@ -14225,7 +14457,8 @@ var attachmentAdd = {
14225
14457
  help: [
14226
14458
  usageAdd,
14227
14459
  "does: stages a file and saves its descriptor on the object's attachment property",
14228
- "example: openeng attachment add obj_abc drawing ./drawing.pdf --project proj_abc --ref main",
14460
+ "reason: required; say why the file is attached, written first in the save commit message",
14461
+ 'example: openeng attachment add obj_abc drawing ./drawing.pdf --project proj_abc --ref main --reason "Attach the released drawing"',
14229
14462
  "output: the attachment descriptor as JSON"
14230
14463
  ],
14231
14464
  run: async (context) => {
@@ -14235,7 +14468,9 @@ var attachmentAdd = {
14235
14468
  if (!isSelector(selector)) return selector;
14236
14469
  const [objectId, property, file] = args;
14237
14470
  if (objectId === void 0 || property === void 0 || file === void 0) return invalid(`usage: ${usageAdd}`);
14238
- return saveDescriptor(context, selector, objectId, property, file);
14471
+ const reason = readReason(context.options.reason);
14472
+ if (!reason.ok) return invalid(reason.message);
14473
+ return saveDescriptor(context, selector, objectId, property, file, reason.reason);
14239
14474
  }
14240
14475
  };
14241
14476
  var attachmentGet = {
@@ -14434,11 +14669,12 @@ var linksClear = {
14434
14669
  words: ["links", "clear"],
14435
14670
  arguments: "rest",
14436
14671
  organisation: "required",
14437
- usage: "openeng links clear <link>... --version <v>... --project <id> --ref <ref>",
14672
+ usage: "openeng links clear <link>... --version <v>... --project <id> --ref <ref> --reason <text>",
14438
14673
  help: [
14439
- "openeng links clear <link>... --version <v>... --project <id> --ref <ref>",
14674
+ "openeng links clear <link>... --version <v>... --project <id> --ref <ref> --reason <text>",
14440
14675
  "does: clears 1 to 100 links atomically; supply one upstream version from links status per link, in the same order",
14441
- "example: openeng links clear edg_abc --version <upstream-version> --project proj_abc --ref main",
14676
+ "reason: required; say why the links are cleared, written first in the save commit message",
14677
+ 'example: openeng links clear edg_abc --version <upstream-version> --project proj_abc --ref main --reason "Reviewed the upstream change"',
14442
14678
  "output: the clearing commit and correlation; upstream-changed requires reading the status and reviewing again"
14443
14679
  ],
14444
14680
  run: async ({ host, deps, options, args }) => {
@@ -14446,6 +14682,8 @@ var linksClear = {
14446
14682
  if (project === void 0 || ref === void 0 || upstreamVersions === void 0 || args.length < 1 || args.length > MAX_CLEAR_ENTRIES || upstreamVersions.length !== args.length || args.some((link2) => link2.length === 0) || upstreamVersions.some((version) => version.length === 0)) {
14447
14683
  return { kind: "client-refusal", message: "links clear needs 1 to 100 links, one --version per link, --project <id> and --ref <ref>" };
14448
14684
  }
14685
+ const reason = readReason(options.reason);
14686
+ if (!reason.ok) return { kind: "client-refusal", message: reason.message };
14449
14687
  const entries7 = args.map((linkId, index) => {
14450
14688
  const upstreamVersion = upstreamVersions[index];
14451
14689
  if (upstreamVersion === void 0) throw new Error("a clearing entry has no upstream version");
@@ -14454,7 +14692,7 @@ var linksClear = {
14454
14692
  const settle2 = `read link status on ref ${ref} or recover the clearing by its correlation id`;
14455
14693
  const run2 = await runAuthenticated(host, deps, (clients) => clients.objects.clearLinks({
14456
14694
  selector: { projectId: project },
14457
- input: { correlation: { kind: "mint" }, ref, entries: entries7 }
14695
+ input: { correlation: { kind: "mint" }, ref, entries: entries7, reason: reason.reason }
14458
14696
  }, randomUUID6()));
14459
14697
  if (!run2.ok) return outcomeOfSessionFailure(run2.failure, settle2);
14460
14698
  if ("result" in run2.answer && run2.answer.result.kind === "unknown") {
@@ -14507,7 +14745,7 @@ var branchesImpact = {
14507
14745
  };
14508
14746
 
14509
14747
  // packages/cli/src/commands/hosted-app.ts
14510
- import { readFileSync as readFileSync6 } from "node:fs";
14748
+ import { readFileSync as readFileSync7 } from "node:fs";
14511
14749
  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.";
14512
14750
  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.";
14513
14751
  var ONE_WALL_WARNING = `${ONE_WALL_WARNING_LEAD}
@@ -14556,7 +14794,7 @@ var hostedAppPublish = {
14556
14794
  if (isOutcome2(file)) return file;
14557
14795
  const key = context.options.key;
14558
14796
  if (key === void 0 || key === "") return invalid2(`openeng hosted-app publish needs --key <app key>; usage: ${usagePublish}`);
14559
- const bytes = new Uint8Array(readFileSync6(file));
14797
+ const bytes = new Uint8Array(readFileSync7(file));
14560
14798
  const settle2 = `openeng hosted-app versions ${key} --project ${project}, which only reads; publish again only if the version is absent`;
14561
14799
  const run2 = await runAuthenticated(context.host, context.deps, async (clients) => {
14562
14800
  const found = await appOfKey(clients, project, key, settle2);
@@ -14737,6 +14975,7 @@ var PUBLIC_HAND_WRITTEN_COMMANDS = [
14737
14975
  orgCurrent,
14738
14976
  projectsList,
14739
14977
  projectsCreate,
14978
+ projectsRename,
14740
14979
  rulesAdd,
14741
14980
  rulesUpdate,
14742
14981
  rulesList,
@@ -14750,6 +14989,8 @@ var PUBLIC_HAND_WRITTEN_COMMANDS = [
14750
14989
  ceilingSet,
14751
14990
  schemaUpdateRequest,
14752
14991
  schemaUpdateShow,
14992
+ feedbackBug,
14993
+ feedbackFeature,
14753
14994
  attachmentAdd,
14754
14995
  attachmentGet,
14755
14996
  attachmentList,
@@ -14790,65 +15031,10 @@ var PUBLIC_COMMANDS = [
14790
15031
 
14791
15032
  // packages/cli/src/main.ts
14792
15033
  import { spawn } from "node:child_process";
14793
- import { readFileSync as readFileSync8 } from "node:fs";
15034
+ import { readFileSync as readFileSync9 } from "node:fs";
14794
15035
  import { homedir } from "node:os";
14795
15036
  import { parseArgs } from "node:util";
14796
15037
 
14797
- // packages/cli/src/cli-options.ts
14798
- var CLI_OPTIONS = {
14799
- "object-set": { type: "string" },
14800
- host: { type: "string" },
14801
- "sign-in-origin": { type: "string" },
14802
- json: { type: "boolean" },
14803
- "no-open": { type: "boolean" },
14804
- project: { type: "string" },
14805
- organisation: { type: "boolean" },
14806
- "read-only": { type: "boolean" },
14807
- object: { type: "string" },
14808
- lock: { type: "string" },
14809
- ceiling: { type: "string" },
14810
- pattern: { type: "string" },
14811
- consequence: { type: "string" },
14812
- "extent": { type: "string" },
14813
- "require-proposal": { type: "string" },
14814
- "required-approvals": { type: "string" },
14815
- "approver-min-role": { type: "string" },
14816
- "restrict-deletions": { type: "string" },
14817
- "approvers": { type: "string" },
14818
- "bypass": { type: "string" },
14819
- "rule-id": { type: "string" },
14820
- ref: { type: "string" },
14821
- base: { type: "string" },
14822
- name: { type: "string" },
14823
- "change-set": { type: "string" },
14824
- revision: { type: "string" },
14825
- from: { type: "string" },
14826
- "rail-groups": { type: "string" },
14827
- type: { type: "string" },
14828
- sample: { type: "string" },
14829
- size: { type: "string" },
14830
- world: { type: "string" },
14831
- selector: { type: "string" },
14832
- input: { type: "string" },
14833
- "input-file": { type: "string" },
14834
- "idempotency-key": { type: "string" },
14835
- system: { type: "string" },
14836
- stack: { type: "string" },
14837
- company: { type: "string" },
14838
- team: { type: "string" },
14839
- owner: { type: "string" },
14840
- label: { type: "string" },
14841
- out: { type: "string" },
14842
- key: { type: "string" },
14843
- help: { type: "boolean", short: "h" },
14844
- version: { type: "boolean" }
14845
- };
14846
- var APP_KEY_FORM = /^[a-z0-9][a-z0-9-]{0,62}$/;
14847
-
14848
- // packages/cli/src/cli-version.ts
14849
- var PATCH_VERSION = 0;
14850
- var CLI_VERSION = `0.${PROTOCOL_VERSION}.${PATCH_VERSION}`;
14851
-
14852
15038
  // packages/cli/src/environment.ts
14853
15039
  var readEnvironment = () => Object.freeze({
14854
15040
  OPENENG_HOST: process.env.OPENENG_HOST,
@@ -14864,7 +15050,7 @@ var createTransport = (host) => host.kind === "unix" ? createHostFetch(host.sock
14864
15050
 
14865
15051
  // packages/cli/src/update-check.ts
14866
15052
  import { randomUUID as randomUUID7 } from "node:crypto";
14867
- import { existsSync, mkdirSync as mkdirSync3, readFileSync as readFileSync7, renameSync as renameSync3, unlinkSync as unlinkSync3, writeFileSync } from "node:fs";
15053
+ import { existsSync, mkdirSync as mkdirSync3, readFileSync as readFileSync8, renameSync as renameSync3, unlinkSync as unlinkSync3, writeFileSync } from "node:fs";
14868
15054
  import { join as join4 } from "node:path";
14869
15055
  function versionParts(value) {
14870
15056
  if (typeof value !== "string" || !/^\d+\.\d+\.\d+$/.test(value)) {
@@ -14877,7 +15063,7 @@ function readCache(file) {
14877
15063
  if (!existsSync(file)) {
14878
15064
  return null;
14879
15065
  }
14880
- const value = JSON.parse(readFileSync7(file, "utf8"));
15066
+ const value = JSON.parse(readFileSync8(file, "utf8"));
14881
15067
  if (typeof value !== "object" || value === null || !("latest" in value) || !("checkedAt" in value)) {
14882
15068
  return null;
14883
15069
  }
@@ -15057,6 +15243,11 @@ function parseInvocation(argv) {
15057
15243
  json: values.json === true,
15058
15244
  open: values["no-open"] !== true,
15059
15245
  project: values.project,
15246
+ title: values.title,
15247
+ body: values.body,
15248
+ bodyFile: values["body-file"],
15249
+ route: values.route,
15250
+ correlation: values.correlation,
15060
15251
  objectSet: values["object-set"],
15061
15252
  organisation: values.organisation === true,
15062
15253
  readOnly: values["read-only"] === true,
@@ -15096,7 +15287,8 @@ function parseInvocation(argv) {
15096
15287
  owner: values.owner,
15097
15288
  label: values.label,
15098
15289
  out: values.out,
15099
- key: values.key
15290
+ key: values.key,
15291
+ reason: values.reason
15100
15292
  }
15101
15293
  };
15102
15294
  } catch (error) {
@@ -15175,7 +15367,7 @@ ${usageLines(commands).join("\n")}` : unknownCommandMessage(commands, invocation
15175
15367
  deps,
15176
15368
  options,
15177
15369
  args: invocation.words.slice(command.words.length),
15178
- readStandardInput: () => readFileSync8(0, "utf8"),
15370
+ readStandardInput: () => readFileSync9(0, "utf8"),
15179
15371
  promptSecret,
15180
15372
  writeLine: (line) => process.stdout.write(`${line}
15181
15373
  `),