@openengio/cli 0.38.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -9
- package/bin/public/openeng.js +869 -154
- package/package.json +1 -1
- package/skill/conventions/SKILL.md +1 -1
- package/skill/openeng/SKILL.md +81 -9
package/bin/public/openeng.js
CHANGED
|
@@ -84,6 +84,29 @@ var FIX_REQUEST = { option: "Correct the request and send it again." };
|
|
|
84
84
|
var ASK_ADMINISTRATOR = { option: "Ask an administrator of the organisation to make the change or to grant the permission." };
|
|
85
85
|
var SIGN_IN_AGAIN = { option: "Sign in again." };
|
|
86
86
|
var RULE_ENTRIES = {
|
|
87
|
+
"engines-unavailable": entry("Builds are unavailable on this deployment. Ask your administrator.", ASK_ADMINISTRATOR),
|
|
88
|
+
"output-ambiguous": entry("An output is declared by more than one step.", FIX_REQUEST),
|
|
89
|
+
"build-cycle": entry("The upstream closure contains a cycle.", FIX_REQUEST),
|
|
90
|
+
"binding-mismatch": entry("An input binds an undeclared output or an output of another kind.", FIX_REQUEST),
|
|
91
|
+
"build-input-outside-project": entry("An input is outside the build's project.", FIX_REQUEST),
|
|
92
|
+
"case-invalid": entry("The case check has violations.", FIX_REQUEST),
|
|
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-limit-reached": entry("The build exceeds an organisation or closure limit.", FIX_REQUEST),
|
|
95
|
+
"engine-mismatch": entry("The registered engine fails a required engine check.", FIX_REQUEST),
|
|
96
|
+
"engine-image-changed": entry("The engine ran an image other than the one recorded when the step started.", ASK_ADMINISTRATOR),
|
|
97
|
+
"function-entry-unknown": entry("The engine image does not offer the requested entry.", FIX_REQUEST),
|
|
98
|
+
"step-outputs-missing": entry("The output objects do not fill the entry's output slots.", FIX_REQUEST),
|
|
99
|
+
"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
|
+
"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
|
+
"engine-invalid": entry("The engine properties, class or runtime are not admitted.", FIX_REQUEST),
|
|
103
|
+
"log-already-written": entry("The step run already has a log.", FIX_REQUEST),
|
|
104
|
+
"output-too-large": entry("The output exceeds its kind's byte limit.", FIX_REQUEST),
|
|
105
|
+
"output-digest-mismatch": entry("The uploaded bytes do not match the declared digest.", FIX_REQUEST),
|
|
106
|
+
"output-malformed": entry("The indexed output fails its format or declared-key check.", FIX_REQUEST),
|
|
107
|
+
"step-ill-formed": entry("The step names more than one function or more than one case.", FIX_REQUEST),
|
|
108
|
+
"output-missing": entry("The engine did not submit every output the step declares.", FIX_REQUEST),
|
|
109
|
+
"output-not-declared": entry("The step spec does not declare this output name.", FIX_REQUEST),
|
|
87
110
|
"draft-locked": entry("Another person holds this draft lock.", { option: "Wait for the lock to expire or ask its holder to release it." }),
|
|
88
111
|
"draft-lock-lost": entry("The draft lock is no longer held by you.", { option: "Acquire the draft again before saving." }),
|
|
89
112
|
"draft-not-flushed": entry("The draft has saves that were not confirmed.", { option: "Save and confirm the latest draft before publishing." }),
|
|
@@ -104,6 +127,10 @@ var RULE_ENTRIES = {
|
|
|
104
127
|
"too-many-links": entry("The review chain or aggregate exceeds 100 contributing objects or links.", { option: "Reduce the chain or the contributing links before reading or clearing again." }),
|
|
105
128
|
"unsupported-content": entry("The file's content or name is not an admitted attachment format.", FIX_REQUEST),
|
|
106
129
|
"too-large": entry("The attachment exceeds the per-file byte limit.", FIX_REQUEST),
|
|
130
|
+
"storage-limit-reached": entry("The organisation has no room left for a file of this size.", ASK_ADMINISTRATOR),
|
|
131
|
+
"upload-not-found": entry("No finished upload of yours matches this identifier.", { option: "Open a new upload and send the file again." }),
|
|
132
|
+
"upload-length-mismatch": entry("The stored file is not the length the upload declared.", { option: "Open a new upload and send the whole file again." }),
|
|
133
|
+
"attachment-collision": entry("A different file is already stored under this file's name in the store.", { option: "Open a new upload and send the file again; if it recurs, tell an administrator." }),
|
|
107
134
|
"not-an-attachment-property": entry("The object's stored type version does not declare this property as an attachment.", FIX_REQUEST),
|
|
108
135
|
"no-attachment": entry("The property holds no attachment."),
|
|
109
136
|
"attachment-unavailable": entry("The attachment's stored bytes are unavailable.", { option: "Ask an administrator to restore the attachment." }),
|
|
@@ -315,6 +342,7 @@ var SHIM_COLLIDING_API_RULES = Object.freeze(["write-refused"]);
|
|
|
315
342
|
|
|
316
343
|
// packages/api-contract/dist/route-docs.js
|
|
317
344
|
var ACTOR_LABELS = Object.freeze({
|
|
345
|
+
engine: "engine",
|
|
318
346
|
person: "person",
|
|
319
347
|
"agent:explore": "agent:explore",
|
|
320
348
|
"agent:apply": "agent:apply",
|
|
@@ -404,6 +432,35 @@ function doc(does, refuses) {
|
|
|
404
432
|
return Object.freeze({ does, refuses: Object.freeze([...refuses]) });
|
|
405
433
|
}
|
|
406
434
|
var ROUTE_DOCS = Object.freeze({
|
|
435
|
+
startBuild: doc('Start a build of the named targets on the selected ref; a wholly current selection returns current and stale counts on the first response, but its replay returns only { kind: "unchanged" } because the counts are not stored.', [
|
|
436
|
+
"output-ambiguous",
|
|
437
|
+
"build-cycle",
|
|
438
|
+
"binding-mismatch",
|
|
439
|
+
"build-input-outside-project",
|
|
440
|
+
"case-invalid",
|
|
441
|
+
"outputs-already-current",
|
|
442
|
+
"build-limit-reached",
|
|
443
|
+
"engine-mismatch",
|
|
444
|
+
"function-entry-unknown",
|
|
445
|
+
"step-outputs-missing",
|
|
446
|
+
"step-ill-formed",
|
|
447
|
+
"not-permitted",
|
|
448
|
+
"engines-unavailable"
|
|
449
|
+
]),
|
|
450
|
+
cancelBuild: doc("Cancel a build and end its live step tokens.", ["not-permitted", "not-found"]),
|
|
451
|
+
readBuildRun: doc("Read a build and its step states. The state is running while any step run is unfinished, then canceled if a person cancelled any, complete, partial or failed. A read ends step runs past their deadline, and a read by a caller who may start builds starts queued step runs no execution holds.", ["not-found"]),
|
|
452
|
+
listBuildRuns: doc("List the build runs that target an output or a case, or that hold a step run of a step, newest first, a page at a time. A list reads only; it ends no step run and starts none.", ["not-found"]),
|
|
453
|
+
readStepRun: doc("Read a step run and its immutable spec and provenance. The spec names each input and holds no input value. A step run waiting for its upstream shows as QUEUED.", ["not-found"]),
|
|
454
|
+
readOutputValues: doc("Read indexed output values and their freshness.", ["not-found"]),
|
|
455
|
+
readStepLog: doc("Read the step log as inert text and its truncation flag.", ["not-found"]),
|
|
456
|
+
checkCase: doc("Check a case and list its object and port violations.", ["not-found", "build-input-outside-project", "engines-unavailable"]),
|
|
457
|
+
registerEngine: doc("Register an ephemeral engine in the token organisation.", ["engine-invalid", "duplicate-name", "not-permitted"]),
|
|
458
|
+
listEngines: doc("List engines in the token organisation.", ["not-permitted"]),
|
|
459
|
+
claimStepRun: doc("Consume a verified execution claim and mint its engine token.", ["not-yet-bound", "claim-refused", "engines-unavailable"]),
|
|
460
|
+
readStepInput: doc("Stream the spec or a named input admitted to this step run.", ["not-found", "step-run-closed"]),
|
|
461
|
+
stageStepOutput: doc("Stream a declared output and check its digest and byte limit.", ["output-not-declared", "output-digest-mismatch", "output-too-large", "step-run-closed"]),
|
|
462
|
+
submitStepResult: doc("Accept one result for the admitted step run.", ["step-run-closed", "output-malformed", "output-missing", "engine-image-changed", "not-found"]),
|
|
463
|
+
postStepLog: doc("Keep the first MiB of the step log and mark truncation.", ["log-already-written", "step-run-closed"]),
|
|
407
464
|
createObjectSet: doc("Saves a named set of 1 to 200 object addresses in the caller's organisation. Concurrent retries with one key return the same saved set and revision.", [...SCOPED, "head-moved"]),
|
|
408
465
|
listObjectSets: doc("Lists the organisation's saved sets, newest update first, without members or counts.", SIGNED_IN),
|
|
409
466
|
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"]),
|
|
@@ -434,8 +491,9 @@ var ROUTE_DOCS = Object.freeze({
|
|
|
434
491
|
enterHumanMode: doc("Switches the presenting CLI session to human mode after one web confirmation. Already-human sessions return their current state without another write; web sessions are refused. CLI: openeng session human prints the confirm address, polls and retries once with unchanged bytes and key, then prints the stored state. Human mode lasts for this session; a new CLI sign-in starts in agent mode.", SIGNED_IN),
|
|
435
492
|
readSessionStatus: doc("Reads the presenting person's stored session channel, mode and sign-in time, without organisation attachment. CLI: openeng session status prints { channel, mode, issuedAt } under --json; it never reads a local mode.", SIGNED_IN),
|
|
436
493
|
readStepUpProof: doc("Polls as the requesting person session or run. Only that actor receives a confirmed live proof. Without an eligible confirmation it answers awaiting. No organisation attachment is required.", SIGNED_IN),
|
|
437
|
-
|
|
438
|
-
|
|
494
|
+
openAttachmentUpload: doc("Opens an upload session for a file of a declared length on an existing object after its guard admits the caller on the selected ref. The answer carries the upload identifier and a session address that accepts the bytes with no other credential. Admits person, service, app:client and agent:apply actors.", [...ATTACHMENT_SCOPED, "not-permitted", "frozen", "protected", "unsupported-content", "too-large", "storage-limit-reached"]),
|
|
495
|
+
completeAttachmentUpload: doc("Finishes an upload the caller opened: checks the stored file and stages it for the caller, then answers its descriptor. The object's guard is asked again. A repeated call for the same upload answers the same descriptor. Admits person, service, app:client and agent:apply actors.", [...ATTACHMENT_SCOPED, "not-permitted", "frozen", "protected", "unsupported-content", "upload-not-found", "upload-length-mismatch", "attachment-collision"]),
|
|
496
|
+
readAttachment: doc("Downloads the attachment held by an object's property at its stored type version. A file within the download threshold is streamed in the answer; a larger file is answered with a redirect whose Location is a short-lived link to the stored file. Admits person, service, app:client, agent:explore and agent:apply actors.", [...ATTACHMENT_SCOPED, "organisation-not-ready", "branch-needs-schema-update", "not-an-attachment-property", "no-attachment", "attachment-unavailable"]),
|
|
439
497
|
readObject: doc("Reads one object at a branch or baseline.", REF_READ),
|
|
440
498
|
queryObjects: doc(`Runs a filtered, ordered, paged query over the objects of a branch or baseline, or pages the union, intersection or difference of two plain object-set descriptions on that ref. A top-level type filter {kind:"type",op:"in",values:["part","system"]} selects any of 1 to 100 published type keys and may be combined with a text filter; continuation binds to the entire selection. ${QUERY_PROJECT_SCOPE}`, [
|
|
441
499
|
...REF_READ,
|
|
@@ -660,12 +718,16 @@ function deepFreeze(value) {
|
|
|
660
718
|
return value;
|
|
661
719
|
}
|
|
662
720
|
var BINARY_REQUESTS = {
|
|
663
|
-
|
|
721
|
+
stageStepOutput: {
|
|
664
722
|
"contentType": "application/octet-stream",
|
|
665
|
-
"
|
|
666
|
-
"
|
|
667
|
-
"
|
|
668
|
-
"
|
|
723
|
+
"nameHeader": "x-oe2-output-name",
|
|
724
|
+
"nameEncoding": "rfc8187",
|
|
725
|
+
"digestHeader": "x-oe2-output-digest",
|
|
726
|
+
"digestEncoding": "sha256-hex"
|
|
727
|
+
},
|
|
728
|
+
postStepLog: {
|
|
729
|
+
"contentType": "application/octet-stream",
|
|
730
|
+
"encoding": "utf8"
|
|
669
731
|
},
|
|
670
732
|
publishHostedVersion: {
|
|
671
733
|
"contentType": "application/octet-stream",
|
|
@@ -677,13 +739,64 @@ var BINARY_REQUESTS = {
|
|
|
677
739
|
};
|
|
678
740
|
var BINARY_REQUEST_INPUTS = deepFreeze(BINARY_REQUESTS);
|
|
679
741
|
var BINARY_RESPONSES = {
|
|
742
|
+
readStepInput: {
|
|
743
|
+
"contentType": "application/octet-stream",
|
|
744
|
+
"digestHeader": "x-oe2-input-digest",
|
|
745
|
+
"digestEncoding": "sha256-hex",
|
|
746
|
+
"byteLengthHeader": "content-length"
|
|
747
|
+
},
|
|
680
748
|
readAttachment: {
|
|
681
749
|
"contentType": "attachment",
|
|
682
|
-
"headers": "attachmentResponseHeaders"
|
|
750
|
+
"headers": "attachmentResponseHeaders",
|
|
751
|
+
"redirect": "see-other"
|
|
683
752
|
}
|
|
684
753
|
};
|
|
685
754
|
var BINARY_RESPONSE_OUTPUTS = deepFreeze(BINARY_RESPONSES);
|
|
686
755
|
var SCHEMAS = {
|
|
756
|
+
startBuild: { "type": "object", "properties": { "target": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "outputs" }, "outputIds": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "outputIds"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "case" }, "caseId": { "type": "string" } }, "required": ["kind", "caseId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "build" }, "buildId": { "type": "string" } }, "required": ["kind", "buildId"], "additionalProperties": false }] }, "choice": { "enum": ["run-all", "run-stale"] } }, "required": ["target"], "additionalProperties": false },
|
|
757
|
+
cancelBuild: { "type": "object", "properties": { "buildRunId": { "type": "string" } }, "required": ["buildRunId"], "additionalProperties": false },
|
|
758
|
+
readBuildRun: { "type": "object", "properties": { "buildRunId": { "type": "string" } }, "required": ["buildRunId"], "additionalProperties": false },
|
|
759
|
+
listBuildRuns: { "type": "object", "properties": { "objectId": { "type": "string" }, "continuation": { "oneOf": [{ "type": "string" }, { "type": "null" }] } }, "required": ["objectId", "continuation"], "additionalProperties": false },
|
|
760
|
+
readStepRun: { "type": "object", "properties": { "stepRunId": { "type": "string" } }, "required": ["stepRunId"], "additionalProperties": false },
|
|
761
|
+
readOutputValues: { "type": "object", "properties": { "outputId": { "type": "string" }, "keys": { "type": "array", "items": { "type": "object", "properties": { "sweep": { "type": "object", "additionalProperties": { "type": "number" } }, "componentId": { "type": "string" }, "variable": { "type": "string" } }, "required": ["sweep", "componentId", "variable"], "additionalProperties": false } }, "runRef": { "type": "string" } }, "required": ["outputId", "keys"], "additionalProperties": false },
|
|
762
|
+
readStepLog: { "type": "object", "properties": { "stepRunId": { "type": "string" } }, "required": ["stepRunId"], "additionalProperties": false },
|
|
763
|
+
checkCase: { "type": "object", "properties": { "caseId": { "type": "string" } }, "required": ["caseId"], "additionalProperties": false },
|
|
764
|
+
registerEngine: { "type": "object", "properties": { "name": { "type": "string" }, "isolation": { "const": "ephemeral" }, "properties": { "type": "object", "additionalProperties": { "type": "string" } }, "runtime": { "type": "object", "properties": { "image": { "type": "string" } }, "required": ["image"], "additionalProperties": false } }, "required": ["name", "isolation", "properties", "runtime"], "additionalProperties": false },
|
|
765
|
+
listEngines: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
766
|
+
claimStepRun: { "type": "object", "properties": { "googleIdentityToken": { "type": "string", "format": "password", "writeOnly": true }, "executionName": { "type": "string" }, "jobName": { "type": "string" }, "claimCode": { "type": "string", "format": "password", "writeOnly": true } }, "required": ["googleIdentityToken", "executionName", "jobName", "claimCode"], "additionalProperties": false },
|
|
767
|
+
readStepInput: {
|
|
768
|
+
"oneOf": [
|
|
769
|
+
{
|
|
770
|
+
"type": "object",
|
|
771
|
+
"properties": {
|
|
772
|
+
"kind": {
|
|
773
|
+
"const": "spec"
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
"required": [
|
|
777
|
+
"kind"
|
|
778
|
+
],
|
|
779
|
+
"additionalProperties": false
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"type": "object",
|
|
783
|
+
"properties": {
|
|
784
|
+
"kind": {
|
|
785
|
+
"const": "input"
|
|
786
|
+
},
|
|
787
|
+
"name": {
|
|
788
|
+
"type": "string"
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
"required": [
|
|
792
|
+
"kind",
|
|
793
|
+
"name"
|
|
794
|
+
],
|
|
795
|
+
"additionalProperties": false
|
|
796
|
+
}
|
|
797
|
+
]
|
|
798
|
+
},
|
|
799
|
+
submitStepResult: { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "complete" }, "outputs": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "digest": { "type": "string" } }, "required": ["name", "digest"], "additionalProperties": false } } }, "required": ["kind", "outputs"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "executor-error" }, "message": { "type": "string" } }, "required": ["kind", "message"], "additionalProperties": false }] },
|
|
687
800
|
createObjectSet: { "type": "object", "properties": { "name": { "type": "string" }, "members": { "type": "array", "items": { "type": "object", "properties": { "objectId": { "type": "string" }, "projectId": { "type": "string" } }, "required": ["objectId", "projectId"], "additionalProperties": false } } }, "required": ["name", "members"], "additionalProperties": false },
|
|
688
801
|
listObjectSets: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
689
802
|
readObjectSet: { "type": "object", "properties": { "setId": { "type": "string" } }, "required": ["setId"], "additionalProperties": false },
|
|
@@ -701,12 +814,12 @@ var SCHEMAS = {
|
|
|
701
814
|
attachOrganisation: { "type": "object", "properties": { "organisationId": { "type": "string" } }, "required": ["organisationId"], "additionalProperties": false },
|
|
702
815
|
detachOrganisation: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
703
816
|
listOrganisations: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
704
|
-
registerClient: { "type": "object", "properties": { "displayName": { "type": "string" }, "clientType": { "enum": ["public", "confidential"] }, "redirectUris": { "type": "array", "items": { "type": "string" } }, "scopes": { "type": "array", "items": { "enum": ["objects.read", "objects.write", "branches.read", "branches.write", "branches.manage", "offline_access"] } }, "publicKeySet": { "type": "object", "properties": { "keys": { "type": "array", "items": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] } } } }, "required": ["keys"], "additionalProperties": false } }, "required": ["displayName", "clientType", "redirectUris", "scopes"], "additionalProperties": false },
|
|
817
|
+
registerClient: { "type": "object", "properties": { "displayName": { "type": "string" }, "clientType": { "enum": ["public", "confidential"] }, "redirectUris": { "type": "array", "items": { "type": "string" } }, "scopes": { "type": "array", "items": { "enum": ["objects.read", "objects.write", "branches.read", "branches.write", "branches.manage", "builds.run", "offline_access"] } }, "publicKeySet": { "type": "object", "properties": { "keys": { "type": "array", "items": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] } } } }, "required": ["keys"], "additionalProperties": false } }, "required": ["displayName", "clientType", "redirectUris", "scopes"], "additionalProperties": false },
|
|
705
818
|
listClients: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
706
819
|
revokeClient: { "type": "object", "properties": { "clientId": { "type": "string" } }, "required": ["clientId"], "additionalProperties": false },
|
|
707
820
|
replaceClientKeys: { "type": "object", "properties": { "clientId": { "type": "string" }, "publicKeySet": { "type": "object", "properties": { "keys": { "type": "array", "items": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] } } } }, "required": ["keys"], "additionalProperties": false } }, "required": ["clientId", "publicKeySet"], "additionalProperties": false },
|
|
708
821
|
readConsentRequest: { "type": "object", "properties": { "interactionId": { "type": "string" } }, "required": ["interactionId"], "additionalProperties": false },
|
|
709
|
-
decideConsent: { "oneOf": [{ "type": "object", "properties": { "interactionId": { "type": "string" }, "decision": { "const": "approve" }, "approvedScopes": { "type": "array", "items": { "enum": ["objects.read", "objects.write", "branches.read", "branches.write", "branches.manage", "offline_access"] } } }, "required": ["interactionId", "decision", "approvedScopes"], "additionalProperties": false }, { "type": "object", "properties": { "interactionId": { "type": "string" }, "decision": { "const": "deny" } }, "required": ["interactionId", "decision"], "additionalProperties": false }] },
|
|
822
|
+
decideConsent: { "oneOf": [{ "type": "object", "properties": { "interactionId": { "type": "string" }, "decision": { "const": "approve" }, "approvedScopes": { "type": "array", "items": { "enum": ["objects.read", "objects.write", "branches.read", "branches.write", "branches.manage", "builds.run", "offline_access"] } } }, "required": ["interactionId", "decision", "approvedScopes"], "additionalProperties": false }, { "type": "object", "properties": { "interactionId": { "type": "string" }, "decision": { "const": "deny" } }, "required": ["interactionId", "decision"], "additionalProperties": false }] },
|
|
710
823
|
listConnectedApps: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
711
824
|
revokeConnectedApp: { "type": "object", "properties": { "clientId": { "type": "string" } }, "required": ["clientId"], "additionalProperties": false },
|
|
712
825
|
readStepUpRequest: { "type": "object", "properties": { "pendingId": { "type": "string" } }, "required": ["pendingId"], "additionalProperties": false },
|
|
@@ -714,6 +827,8 @@ var SCHEMAS = {
|
|
|
714
827
|
enterHumanMode: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
715
828
|
readSessionStatus: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
716
829
|
readStepUpProof: { "type": "object", "properties": { "pendingId": { "type": "string" } }, "required": ["pendingId"], "additionalProperties": false },
|
|
830
|
+
openAttachmentUpload: { "type": "object", "properties": { "name": { "type": "string" }, "declaredLength": { "type": "integer" } }, "required": ["name", "declaredLength"], "additionalProperties": false },
|
|
831
|
+
completeAttachmentUpload: { "type": "object", "properties": { "uploadId": { "type": "string" } }, "required": ["uploadId"], "additionalProperties": false },
|
|
717
832
|
readAttachment: {
|
|
718
833
|
"type": "object",
|
|
719
834
|
"properties": {
|
|
@@ -827,7 +942,7 @@ var SCHEMAS = {
|
|
|
827
942
|
readCurrentChangeSet: { "type": "object", "properties": {}, "required": [], "additionalProperties": false },
|
|
828
943
|
readChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" } }, "required": ["changeSetId"], "additionalProperties": false },
|
|
829
944
|
readChangeSetState: { "type": "object", "properties": { "changeSetId": { "type": "string" } }, "required": ["changeSetId"], "additionalProperties": false },
|
|
830
|
-
reviseChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "expectedRevision": { "type": "string" }, "changes": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "typeCategory": { "const": "object" }, "typeKey": { "type": "string" }, "version": { "type": "integer" }, "displayName": { "type": "string" }, "description": { "oneOf": [{ "type": "string" }, { "type": "null" }] }, "schemaLanguageVersion": { "type": "string" }, "propertyDefinitions": { "type": "object", "additionalProperties": {} }, "requiredPropertyKeys": { "type": "array", "items": { "type": "string" } }, "presentationBindings": { "type": "object", "properties": { "views": { "type": "object", "properties": { "object": { "type": "object", "properties": { "root": { "type": "string" }, "elements": { "type": "object", "additionalProperties": { "type": "object", "properties": { "type": { "type": "string" }, "props": { "type": "object", "additionalProperties": {} }, "children": { "type": "array", "items": { "type": "string" } }, "repeat": { "type": "object", "properties": { "statePath": { "type": "string" }, "key": { "type": "string" } }, "required": ["statePath"], "additionalProperties": false }, "on": { "type": "object", "properties": { "press": { "oneOf": [{ "type": "object", "properties": { "action": { "const": "set-properties" }, "params": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "object", "properties": { "$state": { "type": "string" } }, "required": ["$state"], "additionalProperties": false }] } } }, "required": ["properties"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }, { "type": "object", "properties": { "action": { "const": "run-verb" }, "params": { "type": "object", "properties": { "verb": { "type": "string" } }, "required": ["verb"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }] } }, "required": ["press"], "additionalProperties": false } }, "required": ["type", "props", "children"], "additionalProperties": false } } }, "required": ["root", "elements"], "additionalProperties": false }, "app": { "type": "object", "properties": { "root": { "type": "string" }, "elements": { "type": "object", "additionalProperties": { "type": "object", "properties": { "type": { "type": "string" }, "props": { "type": "object", "additionalProperties": {} }, "children": { "type": "array", "items": { "type": "string" } }, "repeat": { "type": "object", "properties": { "statePath": { "type": "string" }, "key": { "type": "string" } }, "required": ["statePath"], "additionalProperties": false }, "on": { "type": "object", "properties": { "press": { "oneOf": [{ "type": "object", "properties": { "action": { "const": "set-properties" }, "params": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "object", "properties": { "$state": { "type": "string" } }, "required": ["$state"], "additionalProperties": false }] } } }, "required": ["properties"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }, { "type": "object", "properties": { "action": { "const": "run-verb" }, "params": { "type": "object", "properties": { "verb": { "type": "string" } }, "required": ["verb"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }] } }, "required": ["press"], "additionalProperties": false } }, "required": ["type", "props", "children"], "additionalProperties": false } } }, "required": ["root", "elements"], "additionalProperties": false }, "card": { "type": "object", "properties": { "root": { "type": "string" }, "elements": { "type": "object", "additionalProperties": { "type": "object", "properties": { "type": { "type": "string" }, "props": { "type": "object", "additionalProperties": {} }, "children": { "type": "array", "items": { "type": "string" } }, "repeat": { "type": "object", "properties": { "statePath": { "type": "string" }, "key": { "type": "string" } }, "required": ["statePath"], "additionalProperties": false }, "on": { "type": "object", "properties": { "press": { "oneOf": [{ "type": "object", "properties": { "action": { "const": "set-properties" }, "params": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "object", "properties": { "$state": { "type": "string" } }, "required": ["$state"], "additionalProperties": false }] } } }, "required": ["properties"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }, { "type": "object", "properties": { "action": { "const": "run-verb" }, "params": { "type": "object", "properties": { "verb": { "type": "string" } }, "required": ["verb"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }] } }, "required": ["press"], "additionalProperties": false } }, "required": ["type", "props", "children"], "additionalProperties": false } } }, "required": ["root", "elements"], "additionalProperties": false } }, "required": [], "additionalProperties": false }, "title": { "type": "string" }, "summary": { "type": "string" }, "icon": { "type": "string" }, "typeIcon": { "type": "string" }, "propertyLabels": { "type": "object", "additionalProperties": { "type": "string" } }, "propertyOrder": { "type": "array", "items": { "type": "string" } }, "rail": { "type": "object", "properties": { "group": { "type": "string" }, "order": { "type": "number" } }, "required": ["group", "order"], "additionalProperties": false } }, "required": [], "additionalProperties": false }, "structureDeclaration": { "type": "object", "properties": { "relationships": { "type": "array", "items": { "type": "string" } }, "views": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" }, "steps": { "type": "array", "items": { "type": "string" } }, "decoration": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" } }, "required": ["key", "label"], "additionalProperties": false } } }, "required": ["key", "label", "steps"], "additionalProperties": false } } }, "required": [], "additionalProperties": false }, "bodyFormat": { "const": "markdown" }, "subscriptionRoles": { "type": "object", "properties": { "owner": { "type": "object", "properties": { "max": { "type": "number" } }, "required": [], "additionalProperties": false }, "approver": { "type": "object", "properties": { "max": { "type": "number" } }, "required": [], "additionalProperties": false }, "watcher": { "type": "object", "properties": { "max": { "type": "number" } }, "required": [], "additionalProperties": false } }, "required": [], "additionalProperties": false } }, "required": ["typeCategory", "typeKey", "version", "displayName", "description", "schemaLanguageVersion", "propertyDefinitions", "requiredPropertyKeys"], "additionalProperties": false }, { "type": "object", "properties": { "typeCategory": { "const": "edge" }, "typeKey": { "type": "string" }, "version": { "type": "integer" }, "displayName": { "type": "string" }, "sourceObjectType": { "type": "string" }, "targetObjectType": { "type": "string" }, "kind": { "enum": ["structural", "traceability"] }, "subjectEnd": { "enum": ["source", "target"] }, "parentEnd": { "oneOf": [{ "const": "source" }, { "const": "target" }, { "type": "null" }] }, "sourceLabel": { "type": "string" }, "targetLabel": { "type": "string" }, "schemaLanguageVersion": { "type": "string" }, "propertyDefinitions": { "type": "object", "additionalProperties": {} }, "requiredPropertyKeys": { "type": "array", "items": { "type": "string" } }, "readRule": { "enum": ["both-endpoints", "either-endpoint"] }, "writeRule": { "enum": ["both-endpoints", "either-endpoint"] }, "review": { "type": "object", "properties": { "upstream": { "enum": ["source", "target"] }, "significant": { "type": "array", "items": { "type": "string" } }, "newLinks": { "enum": ["cleared", "unreviewed"] }, "propagation": { "enum": ["direct", "chain"] }, "chainDepth": { "type": "number" } }, "required": ["upstream"], "additionalProperties": false } }, "required": ["typeCategory", "typeKey", "version", "displayName", "sourceObjectType", "targetObjectType", "kind", "subjectEnd", "parentEnd", "sourceLabel", "targetLabel", "schemaLanguageVersion", "propertyDefinitions", "requiredPropertyKeys", "readRule", "writeRule"], "additionalProperties": false }, { "type": "object", "properties": { "typeCategory": { "const": "verb" }, "typeKey": { "type": "string" }, "version": { "type": "integer" }, "displayName": { "type": "string" }, "description": { "oneOf": [{ "type": "string" }, { "type": "null" }] }, "allowedSubjectTypes": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "none" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "types" }, "types": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "types"], "additionalProperties": false }] }, "inputSchema": {}, "resultSchema": {}, "handlerKey": { "type": "string" }, "template": { "type": "object", "properties": { "query": { "type": "object", "properties": { "typeKey": { "type": "string" }, "filters": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "enum": ["=", ">", ">=", "<", "<="] }, "value": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }] } } }, "required": ["kind", "property", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "text" }, "term": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }] }, "properties": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "term"], "additionalProperties": false }] } }, "sort": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "direction": { "enum": ["asc", "desc"] } }, "required": ["kind", "property", "direction"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "identity" }, "direction": { "enum": ["asc", "desc"] } }, "required": ["kind", "direction"], "additionalProperties": false }] }, "limit": { "type": "integer" } }, "required": ["typeKey", "limit"], "additionalProperties": false }, "operations": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "create-object" }, "typeKey": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } } }, "required": ["kind", "typeKey", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-object" }, "typeKey": { "type": "string" }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "absent" } }, "required": ["slot"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "absent" } }, "required": ["slot"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "typeKey", "target", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-object" }, "typeKey": { "type": "string" }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } }, "required": ["kind", "typeKey", "target"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "create-edge" }, "typeKey": { "type": "string" }, "source": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] }, "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } } }, "required": ["kind", "typeKey", "source", "target", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-edge" }, "typeKey": { "type": "string" }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } }, "required": ["kind", "typeKey", "target"], "additionalProperties": false }] } } }, "required": ["operations"], "additionalProperties": false }, "schemaLanguageVersion": { "type": "string" } }, "required": ["typeCategory", "typeKey", "version", "displayName", "description", "allowedSubjectTypes", "inputSchema", "resultSchema", "schemaLanguageVersion"], "additionalProperties": false }] } }, "railGroups": { "type": "array", "items": { "type": "string" } } }, "required": ["changeSetId", "expectedRevision", "changes"], "additionalProperties": false },
|
|
945
|
+
reviseChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "expectedRevision": { "type": "string" }, "changes": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "instanceRule": { "enum": ["direct", "immutable"] }, "typeCategory": { "const": "object" }, "typeKey": { "type": "string" }, "version": { "type": "integer" }, "displayName": { "type": "string" }, "description": { "oneOf": [{ "type": "string" }, { "type": "null" }] }, "schemaLanguageVersion": { "type": "string" }, "propertyDefinitions": { "type": "object", "additionalProperties": {} }, "requiredPropertyKeys": { "type": "array", "items": { "type": "string" } }, "presentationBindings": { "type": "object", "properties": { "views": { "type": "object", "properties": { "object": { "type": "object", "properties": { "root": { "type": "string" }, "elements": { "type": "object", "additionalProperties": { "type": "object", "properties": { "type": { "type": "string" }, "props": { "type": "object", "additionalProperties": {} }, "children": { "type": "array", "items": { "type": "string" } }, "repeat": { "type": "object", "properties": { "statePath": { "type": "string" }, "key": { "type": "string" } }, "required": ["statePath"], "additionalProperties": false }, "on": { "type": "object", "properties": { "press": { "oneOf": [{ "type": "object", "properties": { "action": { "const": "set-properties" }, "params": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "object", "properties": { "$state": { "type": "string" } }, "required": ["$state"], "additionalProperties": false }] } } }, "required": ["properties"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }, { "type": "object", "properties": { "action": { "const": "run-verb" }, "params": { "type": "object", "properties": { "verb": { "type": "string" } }, "required": ["verb"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }] } }, "required": ["press"], "additionalProperties": false } }, "required": ["type", "props", "children"], "additionalProperties": false } } }, "required": ["root", "elements"], "additionalProperties": false }, "app": { "type": "object", "properties": { "root": { "type": "string" }, "elements": { "type": "object", "additionalProperties": { "type": "object", "properties": { "type": { "type": "string" }, "props": { "type": "object", "additionalProperties": {} }, "children": { "type": "array", "items": { "type": "string" } }, "repeat": { "type": "object", "properties": { "statePath": { "type": "string" }, "key": { "type": "string" } }, "required": ["statePath"], "additionalProperties": false }, "on": { "type": "object", "properties": { "press": { "oneOf": [{ "type": "object", "properties": { "action": { "const": "set-properties" }, "params": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "object", "properties": { "$state": { "type": "string" } }, "required": ["$state"], "additionalProperties": false }] } } }, "required": ["properties"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }, { "type": "object", "properties": { "action": { "const": "run-verb" }, "params": { "type": "object", "properties": { "verb": { "type": "string" } }, "required": ["verb"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }] } }, "required": ["press"], "additionalProperties": false } }, "required": ["type", "props", "children"], "additionalProperties": false } } }, "required": ["root", "elements"], "additionalProperties": false }, "card": { "type": "object", "properties": { "root": { "type": "string" }, "elements": { "type": "object", "additionalProperties": { "type": "object", "properties": { "type": { "type": "string" }, "props": { "type": "object", "additionalProperties": {} }, "children": { "type": "array", "items": { "type": "string" } }, "repeat": { "type": "object", "properties": { "statePath": { "type": "string" }, "key": { "type": "string" } }, "required": ["statePath"], "additionalProperties": false }, "on": { "type": "object", "properties": { "press": { "oneOf": [{ "type": "object", "properties": { "action": { "const": "set-properties" }, "params": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "object", "properties": { "$state": { "type": "string" } }, "required": ["$state"], "additionalProperties": false }] } } }, "required": ["properties"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }, { "type": "object", "properties": { "action": { "const": "run-verb" }, "params": { "type": "object", "properties": { "verb": { "type": "string" } }, "required": ["verb"], "additionalProperties": false } }, "required": ["action", "params"], "additionalProperties": false }] } }, "required": ["press"], "additionalProperties": false } }, "required": ["type", "props", "children"], "additionalProperties": false } } }, "required": ["root", "elements"], "additionalProperties": false } }, "required": [], "additionalProperties": false }, "title": { "type": "string" }, "summary": { "type": "string" }, "icon": { "type": "string" }, "typeIcon": { "type": "string" }, "propertyLabels": { "type": "object", "additionalProperties": { "type": "string" } }, "propertyOrder": { "type": "array", "items": { "type": "string" } }, "multiline": { "type": "array", "items": { "type": "string" } }, "rail": { "type": "object", "properties": { "group": { "type": "string" }, "order": { "type": "number" } }, "required": ["group", "order"], "additionalProperties": false } }, "required": [], "additionalProperties": false }, "structureDeclaration": { "type": "object", "properties": { "relationships": { "type": "array", "items": { "type": "string" } }, "views": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" }, "steps": { "type": "array", "items": { "type": "string" } }, "decoration": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" } }, "required": ["key", "label"], "additionalProperties": false } } }, "required": ["key", "label", "steps"], "additionalProperties": false } } }, "required": [], "additionalProperties": false }, "bodyFormat": { "const": "markdown" }, "subscriptionRoles": { "type": "object", "properties": { "owner": { "type": "object", "properties": { "max": { "type": "number" } }, "required": [], "additionalProperties": false }, "approver": { "type": "object", "properties": { "max": { "type": "number" } }, "required": [], "additionalProperties": false }, "watcher": { "type": "object", "properties": { "max": { "type": "number" } }, "required": [], "additionalProperties": false } }, "required": [], "additionalProperties": false } }, "required": ["typeCategory", "typeKey", "version", "displayName", "description", "schemaLanguageVersion", "propertyDefinitions", "requiredPropertyKeys"], "additionalProperties": false }, { "type": "object", "properties": { "typeCategory": { "const": "edge" }, "typeKey": { "type": "string" }, "version": { "type": "integer" }, "displayName": { "type": "string" }, "sourceObjectType": { "type": "string" }, "targetObjectType": { "type": "string" }, "kind": { "enum": ["structural", "traceability"] }, "subjectEnd": { "enum": ["source", "target"] }, "parentEnd": { "oneOf": [{ "const": "source" }, { "const": "target" }, { "type": "null" }] }, "sourceLabel": { "type": "string" }, "targetLabel": { "type": "string" }, "schemaLanguageVersion": { "type": "string" }, "propertyDefinitions": { "type": "object", "additionalProperties": {} }, "requiredPropertyKeys": { "type": "array", "items": { "type": "string" } }, "readRule": { "enum": ["both-endpoints", "either-endpoint"] }, "writeRule": { "enum": ["both-endpoints", "either-endpoint"] }, "editorHidden": { "type": "boolean" }, "review": { "type": "object", "properties": { "upstream": { "enum": ["source", "target"] }, "significant": { "type": "array", "items": { "type": "string" } }, "newLinks": { "enum": ["cleared", "unreviewed"] }, "propagation": { "enum": ["direct", "chain"] }, "chainDepth": { "type": "number" } }, "required": ["upstream"], "additionalProperties": false } }, "required": ["typeCategory", "typeKey", "version", "displayName", "sourceObjectType", "targetObjectType", "kind", "subjectEnd", "parentEnd", "sourceLabel", "targetLabel", "schemaLanguageVersion", "propertyDefinitions", "requiredPropertyKeys", "readRule", "writeRule"], "additionalProperties": false }, { "type": "object", "properties": { "typeCategory": { "const": "verb" }, "typeKey": { "type": "string" }, "version": { "type": "integer" }, "displayName": { "type": "string" }, "description": { "oneOf": [{ "type": "string" }, { "type": "null" }] }, "allowedSubjectTypes": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "none" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "types" }, "types": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "types"], "additionalProperties": false }] }, "inputSchema": {}, "resultSchema": {}, "handlerKey": { "type": "string" }, "template": { "type": "object", "properties": { "query": { "type": "object", "properties": { "typeKey": { "type": "string" }, "filters": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "enum": ["=", ">", ">=", "<", "<="] }, "value": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }] } }, "required": ["kind", "property", "op", "value"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "op": { "const": "in" }, "values": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }] } } }, "required": ["kind", "property", "op", "values"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "text" }, "term": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }] }, "properties": { "type": "array", "items": { "type": "string" } } }, "required": ["kind", "term"], "additionalProperties": false }] } }, "sort": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "property" }, "property": { "type": "string" }, "direction": { "enum": ["asc", "desc"] } }, "required": ["kind", "property", "direction"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "identity" }, "direction": { "enum": ["asc", "desc"] } }, "required": ["kind", "direction"], "additionalProperties": false }] }, "limit": { "type": "integer" } }, "required": ["typeKey", "limit"], "additionalProperties": false }, "operations": { "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "kind": { "const": "create-object" }, "typeKey": { "type": "string" }, "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } } }, "required": ["kind", "typeKey", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "update-object" }, "typeKey": { "type": "string" }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] }, "changes": { "type": "object", "additionalProperties": { "type": "object", "properties": { "from": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "absent" } }, "required": ["slot"], "additionalProperties": false }] }, "to": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "absent" } }, "required": ["slot"], "additionalProperties": false }] } }, "required": ["from", "to"], "additionalProperties": false } } }, "required": ["kind", "typeKey", "target", "changes"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-object" }, "typeKey": { "type": "string" }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } }, "required": ["kind", "typeKey", "target"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "create-edge" }, "typeKey": { "type": "string" }, "source": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] }, "properties": { "type": "object", "additionalProperties": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "literal" }, "value": {} }, "required": ["slot", "value"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" }, "property": { "type": "string" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } } }, "required": ["kind", "typeKey", "source", "target", "properties"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "const": "delete-edge" }, "typeKey": { "type": "string" }, "target": { "oneOf": [{ "type": "object", "properties": { "slot": { "const": "input" }, "key": { "type": "string" } }, "required": ["slot", "key"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "subject" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "item" } }, "required": ["slot"], "additionalProperties": false }, { "type": "object", "properties": { "slot": { "const": "step" }, "index": { "type": "integer" } }, "required": ["slot", "index"], "additionalProperties": false }] } }, "required": ["kind", "typeKey", "target"], "additionalProperties": false }] } } }, "required": ["operations"], "additionalProperties": false }, "schemaLanguageVersion": { "type": "string" } }, "required": ["typeCategory", "typeKey", "version", "displayName", "description", "allowedSubjectTypes", "inputSchema", "resultSchema", "schemaLanguageVersion"], "additionalProperties": false }] } }, "railGroups": { "type": "array", "items": { "type": "string" } } }, "required": ["changeSetId", "expectedRevision", "changes"], "additionalProperties": false },
|
|
831
946
|
validateChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "revision": { "type": "string" } }, "required": ["changeSetId", "revision"], "additionalProperties": false },
|
|
832
947
|
discardChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" } }, "required": ["changeSetId"], "additionalProperties": false },
|
|
833
948
|
acceptChangeSet: { "type": "object", "properties": { "changeSetId": { "type": "string" }, "revision": { "type": "string" }, "correlationId": { "type": "string" } }, "required": ["changeSetId", "revision"], "additionalProperties": false },
|
|
@@ -888,6 +1003,21 @@ var SELECTORS = {
|
|
|
888
1003
|
};
|
|
889
1004
|
var SELECTOR_SCHEMAS = deepFreeze(SELECTORS);
|
|
890
1005
|
var EXAMPLES = {
|
|
1006
|
+
startBuild: { "target": { "kind": "outputs", "outputIds": [] } },
|
|
1007
|
+
cancelBuild: { "buildRunId": "<buildRunId>" },
|
|
1008
|
+
readBuildRun: { "buildRunId": "<buildRunId>" },
|
|
1009
|
+
listBuildRuns: { "objectId": "<objectId>", "continuation": null },
|
|
1010
|
+
readStepRun: { "stepRunId": "<stepRunId>" },
|
|
1011
|
+
readOutputValues: { "outputId": "<outputId>", "keys": [] },
|
|
1012
|
+
readStepLog: { "stepRunId": "<stepRunId>" },
|
|
1013
|
+
checkCase: { "caseId": "<caseId>" },
|
|
1014
|
+
registerEngine: { "name": "<name>", "isolation": "ephemeral", "properties": {}, "runtime": { "image": "<image>" } },
|
|
1015
|
+
listEngines: {},
|
|
1016
|
+
claimStepRun: { "googleIdentityToken": "<googleIdentityToken>", "executionName": "<executionName>", "jobName": "<jobName>", "claimCode": "<claimCode>" },
|
|
1017
|
+
readStepInput: {
|
|
1018
|
+
"kind": "spec"
|
|
1019
|
+
},
|
|
1020
|
+
submitStepResult: { "kind": "complete", "outputs": [] },
|
|
891
1021
|
createObjectSet: { "name": "Saved set", "members": [{ "objectId": "obj_aaaaaaaaaaaaaaaaaaaaaaaaaa", "projectId": "<projectId>" }] },
|
|
892
1022
|
listObjectSets: {},
|
|
893
1023
|
readObjectSet: { "setId": "ost_aaaaaaaaaaaaaaaaaaaaaaaaaa" },
|
|
@@ -918,6 +1048,8 @@ var EXAMPLES = {
|
|
|
918
1048
|
enterHumanMode: {},
|
|
919
1049
|
readSessionStatus: {},
|
|
920
1050
|
readStepUpProof: { "pendingId": "<pendingId>" },
|
|
1051
|
+
openAttachmentUpload: { "name": "<name>", "declaredLength": 1 },
|
|
1052
|
+
completeAttachmentUpload: { "uploadId": "<uploadId>" },
|
|
921
1053
|
readAttachment: {
|
|
922
1054
|
"objectId": "<objectId>",
|
|
923
1055
|
"property": "<property>"
|
|
@@ -1075,7 +1207,7 @@ var ROUTE_INPUT_EXAMPLES = deepFreeze(EXAMPLES);
|
|
|
1075
1207
|
var DESCRIPTION_ROUTES = Object.freeze(["queryRows", "queryObjects", "aggregateObjects", "queryGraph", "readStructure", "findPaths"]);
|
|
1076
1208
|
|
|
1077
1209
|
// packages/api-contract/dist/routes.js
|
|
1078
|
-
var PROTOCOL_VERSION =
|
|
1210
|
+
var PROTOCOL_VERSION = 44;
|
|
1079
1211
|
var VERSION_HEADER = "oe2-protocol-version";
|
|
1080
1212
|
var TOKEN_HEADER = "authorization";
|
|
1081
1213
|
var IDEMPOTENCY_HEADER = "oe2-idempotency-key";
|
|
@@ -1083,8 +1215,15 @@ var STEP_UP_HEADER = "oe2-step-up";
|
|
|
1083
1215
|
var STEP_UP_KEY_HEADER = "oe2-step-up-key";
|
|
1084
1216
|
var IDEMPOTENCY_KEY_PATTERN = /^[A-Za-z0-9._~-]{1,128}$/;
|
|
1085
1217
|
var STREAMED_ROUTE_NAMES = Object.freeze(["sendMessageStreamed", "answerPlanStreamed"]);
|
|
1086
|
-
var BINARY_REQUEST_ROUTE_NAMES = Object.freeze([
|
|
1087
|
-
|
|
1218
|
+
var BINARY_REQUEST_ROUTE_NAMES = Object.freeze([
|
|
1219
|
+
"publishHostedVersion",
|
|
1220
|
+
"stageStepOutput",
|
|
1221
|
+
"postStepLog"
|
|
1222
|
+
]);
|
|
1223
|
+
var BINARY_RESPONSE_ROUTE_NAMES = Object.freeze([
|
|
1224
|
+
"readAttachment",
|
|
1225
|
+
"readStepInput"
|
|
1226
|
+
]);
|
|
1088
1227
|
function isBinaryRequestRoute(name) {
|
|
1089
1228
|
return BINARY_REQUEST_ROUTE_NAMES.some((binary) => binary === name);
|
|
1090
1229
|
}
|
|
@@ -1098,6 +1237,7 @@ var OMITTABLE_GROUPS = Object.freeze([
|
|
|
1098
1237
|
"agent"
|
|
1099
1238
|
]);
|
|
1100
1239
|
var ACTOR_TOKEN_KINDS = Object.freeze({
|
|
1240
|
+
engine: "engine",
|
|
1101
1241
|
person: "user",
|
|
1102
1242
|
"agent:explore": "agent:explore",
|
|
1103
1243
|
"agent:apply": "agent:apply",
|
|
@@ -1107,6 +1247,21 @@ var ACTOR_TOKEN_KINDS = Object.freeze({
|
|
|
1107
1247
|
service: "service"
|
|
1108
1248
|
});
|
|
1109
1249
|
var STEP_UP_ROUTE_GROUPS = Object.freeze({
|
|
1250
|
+
startBuild: "unmarked",
|
|
1251
|
+
cancelBuild: "unmarked",
|
|
1252
|
+
readBuildRun: "unmarked",
|
|
1253
|
+
listBuildRuns: "unmarked",
|
|
1254
|
+
readStepRun: "unmarked",
|
|
1255
|
+
readOutputValues: "unmarked",
|
|
1256
|
+
readStepLog: "unmarked",
|
|
1257
|
+
checkCase: "unmarked",
|
|
1258
|
+
registerEngine: "marked",
|
|
1259
|
+
listEngines: "unmarked",
|
|
1260
|
+
claimStepRun: "unmarked",
|
|
1261
|
+
readStepInput: "unmarked",
|
|
1262
|
+
stageStepOutput: "unmarked",
|
|
1263
|
+
submitStepResult: "unmarked",
|
|
1264
|
+
postStepLog: "unmarked",
|
|
1110
1265
|
createObjectSet: "unmarked",
|
|
1111
1266
|
listObjectSets: "unmarked",
|
|
1112
1267
|
readObjectSet: "unmarked",
|
|
@@ -1137,7 +1292,8 @@ var STEP_UP_ROUTE_GROUPS = Object.freeze({
|
|
|
1137
1292
|
readStepUpProof: "unmarked",
|
|
1138
1293
|
enterHumanMode: "marked",
|
|
1139
1294
|
readSessionStatus: "unmarked",
|
|
1140
|
-
|
|
1295
|
+
openAttachmentUpload: "unmarked",
|
|
1296
|
+
completeAttachmentUpload: "unmarked",
|
|
1141
1297
|
readAttachment: "unmarked",
|
|
1142
1298
|
readObject: "unmarked",
|
|
1143
1299
|
queryObjects: "unmarked",
|
|
@@ -1343,6 +1499,196 @@ function route(entry2) {
|
|
|
1343
1499
|
return Object.freeze({ ...entry2, policy, admittedTokenKinds: kinds, doc: documented });
|
|
1344
1500
|
}
|
|
1345
1501
|
var ROUTES = Object.freeze({
|
|
1502
|
+
startBuild: route({
|
|
1503
|
+
name: "startBuild",
|
|
1504
|
+
method: "POST",
|
|
1505
|
+
path: "/builds/start",
|
|
1506
|
+
group: "write",
|
|
1507
|
+
selector: "object",
|
|
1508
|
+
subject: "project",
|
|
1509
|
+
idempotent: true,
|
|
1510
|
+
policy: admittingActors("person", "agent:apply", "app:client"),
|
|
1511
|
+
versioned: true,
|
|
1512
|
+
module: "objects-sdk",
|
|
1513
|
+
capability: "objects.build"
|
|
1514
|
+
}),
|
|
1515
|
+
cancelBuild: route({
|
|
1516
|
+
name: "cancelBuild",
|
|
1517
|
+
method: "POST",
|
|
1518
|
+
path: "/builds/cancel",
|
|
1519
|
+
group: "write",
|
|
1520
|
+
selector: "project",
|
|
1521
|
+
subject: "project",
|
|
1522
|
+
idempotent: false,
|
|
1523
|
+
policy: admittingActors("person", "agent:apply", "app:client"),
|
|
1524
|
+
versioned: true,
|
|
1525
|
+
module: "objects-sdk",
|
|
1526
|
+
capability: "objects.build"
|
|
1527
|
+
}),
|
|
1528
|
+
readBuildRun: route({
|
|
1529
|
+
name: "readBuildRun",
|
|
1530
|
+
method: "POST",
|
|
1531
|
+
path: "/builds/read",
|
|
1532
|
+
group: "read",
|
|
1533
|
+
selector: "project",
|
|
1534
|
+
subject: "project",
|
|
1535
|
+
idempotent: false,
|
|
1536
|
+
policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"),
|
|
1537
|
+
versioned: true,
|
|
1538
|
+
module: "objects-sdk",
|
|
1539
|
+
capability: "objects.read"
|
|
1540
|
+
}),
|
|
1541
|
+
listBuildRuns: route({
|
|
1542
|
+
name: "listBuildRuns",
|
|
1543
|
+
method: "POST",
|
|
1544
|
+
path: "/builds/list",
|
|
1545
|
+
group: "read",
|
|
1546
|
+
selector: "project",
|
|
1547
|
+
subject: "project",
|
|
1548
|
+
idempotent: false,
|
|
1549
|
+
policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"),
|
|
1550
|
+
versioned: true,
|
|
1551
|
+
module: "objects-sdk",
|
|
1552
|
+
capability: "objects.read"
|
|
1553
|
+
}),
|
|
1554
|
+
readStepRun: route({
|
|
1555
|
+
name: "readStepRun",
|
|
1556
|
+
method: "POST",
|
|
1557
|
+
path: "/step-runs/read",
|
|
1558
|
+
group: "read",
|
|
1559
|
+
selector: "project",
|
|
1560
|
+
subject: "project",
|
|
1561
|
+
idempotent: false,
|
|
1562
|
+
policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"),
|
|
1563
|
+
versioned: true,
|
|
1564
|
+
module: "objects-sdk",
|
|
1565
|
+
capability: "objects.read"
|
|
1566
|
+
}),
|
|
1567
|
+
readOutputValues: route({
|
|
1568
|
+
name: "readOutputValues",
|
|
1569
|
+
method: "POST",
|
|
1570
|
+
path: "/outputs/values",
|
|
1571
|
+
group: "read",
|
|
1572
|
+
selector: "object",
|
|
1573
|
+
subject: "project",
|
|
1574
|
+
idempotent: false,
|
|
1575
|
+
policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"),
|
|
1576
|
+
versioned: true,
|
|
1577
|
+
module: "objects-sdk",
|
|
1578
|
+
capability: "objects.read"
|
|
1579
|
+
}),
|
|
1580
|
+
readStepLog: route({
|
|
1581
|
+
name: "readStepLog",
|
|
1582
|
+
method: "POST",
|
|
1583
|
+
path: "/step-runs/log",
|
|
1584
|
+
group: "read",
|
|
1585
|
+
selector: "project",
|
|
1586
|
+
subject: "project",
|
|
1587
|
+
idempotent: false,
|
|
1588
|
+
policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"),
|
|
1589
|
+
versioned: true,
|
|
1590
|
+
module: "objects-sdk",
|
|
1591
|
+
capability: "objects.read"
|
|
1592
|
+
}),
|
|
1593
|
+
checkCase: route({
|
|
1594
|
+
name: "checkCase",
|
|
1595
|
+
method: "POST",
|
|
1596
|
+
path: "/cases/check",
|
|
1597
|
+
group: "read",
|
|
1598
|
+
selector: "object",
|
|
1599
|
+
subject: "project",
|
|
1600
|
+
idempotent: false,
|
|
1601
|
+
policy: admittingActors("person", "service", "agent:explore", "agent:apply", "app:client", "app:hosted"),
|
|
1602
|
+
versioned: true,
|
|
1603
|
+
module: "objects-sdk",
|
|
1604
|
+
capability: "objects.read"
|
|
1605
|
+
}),
|
|
1606
|
+
registerEngine: route({
|
|
1607
|
+
name: "registerEngine",
|
|
1608
|
+
method: "POST",
|
|
1609
|
+
path: "/engines/register",
|
|
1610
|
+
group: "administration",
|
|
1611
|
+
selector: "none",
|
|
1612
|
+
subject: "none",
|
|
1613
|
+
idempotent: false,
|
|
1614
|
+
policy: admittingActors("person"),
|
|
1615
|
+
versioned: true,
|
|
1616
|
+
module: "admin-sdk",
|
|
1617
|
+
capability: "admin.engineRegistration"
|
|
1618
|
+
}),
|
|
1619
|
+
listEngines: route({
|
|
1620
|
+
name: "listEngines",
|
|
1621
|
+
method: "POST",
|
|
1622
|
+
path: "/engines/list",
|
|
1623
|
+
group: "read",
|
|
1624
|
+
selector: "none",
|
|
1625
|
+
subject: "none",
|
|
1626
|
+
idempotent: false,
|
|
1627
|
+
policy: admittingActors("person"),
|
|
1628
|
+
versioned: true,
|
|
1629
|
+
module: "admin-sdk",
|
|
1630
|
+
capability: "admin.engines"
|
|
1631
|
+
}),
|
|
1632
|
+
claimStepRun: route({
|
|
1633
|
+
name: "claimStepRun",
|
|
1634
|
+
method: "POST",
|
|
1635
|
+
path: "/engine/claim",
|
|
1636
|
+
group: "engine",
|
|
1637
|
+
selector: "none",
|
|
1638
|
+
subject: "platform",
|
|
1639
|
+
idempotent: false,
|
|
1640
|
+
policy: NO_ACTORS,
|
|
1641
|
+
versioned: true,
|
|
1642
|
+
module: "sdk-core"
|
|
1643
|
+
}),
|
|
1644
|
+
readStepInput: route({
|
|
1645
|
+
name: "readStepInput",
|
|
1646
|
+
method: "POST",
|
|
1647
|
+
path: "/engine/input",
|
|
1648
|
+
group: "engine",
|
|
1649
|
+
selector: "none",
|
|
1650
|
+
subject: "platform",
|
|
1651
|
+
idempotent: false,
|
|
1652
|
+
policy: admittingActors("engine"),
|
|
1653
|
+
versioned: true,
|
|
1654
|
+
module: "sdk-core"
|
|
1655
|
+
}),
|
|
1656
|
+
stageStepOutput: route({
|
|
1657
|
+
name: "stageStepOutput",
|
|
1658
|
+
method: "POST",
|
|
1659
|
+
path: "/engine/output",
|
|
1660
|
+
group: "engine",
|
|
1661
|
+
selector: "none",
|
|
1662
|
+
subject: "platform",
|
|
1663
|
+
idempotent: false,
|
|
1664
|
+
policy: admittingActors("engine"),
|
|
1665
|
+
versioned: true,
|
|
1666
|
+
module: "sdk-core"
|
|
1667
|
+
}),
|
|
1668
|
+
submitStepResult: route({
|
|
1669
|
+
name: "submitStepResult",
|
|
1670
|
+
method: "POST",
|
|
1671
|
+
path: "/engine/result",
|
|
1672
|
+
group: "engine",
|
|
1673
|
+
selector: "none",
|
|
1674
|
+
subject: "platform",
|
|
1675
|
+
idempotent: false,
|
|
1676
|
+
policy: admittingActors("engine"),
|
|
1677
|
+
versioned: true,
|
|
1678
|
+
module: "sdk-core"
|
|
1679
|
+
}),
|
|
1680
|
+
postStepLog: route({
|
|
1681
|
+
name: "postStepLog",
|
|
1682
|
+
method: "POST",
|
|
1683
|
+
path: "/engine/log",
|
|
1684
|
+
group: "engine",
|
|
1685
|
+
selector: "none",
|
|
1686
|
+
subject: "platform",
|
|
1687
|
+
idempotent: false,
|
|
1688
|
+
policy: admittingActors("engine"),
|
|
1689
|
+
versioned: true,
|
|
1690
|
+
module: "sdk-core"
|
|
1691
|
+
}),
|
|
1346
1692
|
createObjectSet: route({ name: "createObjectSet", method: "POST", path: "/object-sets", group: "write", selector: "object", subject: "project", idempotent: true, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.createObjectSet" }),
|
|
1347
1693
|
listObjectSets: route({ name: "listObjectSets", method: "POST", path: "/object-sets/list", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person", "app:hosted"), versioned: true, module: "objects-sdk", capability: "objects.listObjectSets" }),
|
|
1348
1694
|
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" }),
|
|
@@ -1445,10 +1791,23 @@ var ROUTES = Object.freeze({
|
|
|
1445
1791
|
module: "sdk-core",
|
|
1446
1792
|
capability: "core.sessionStatus"
|
|
1447
1793
|
}),
|
|
1448
|
-
|
|
1449
|
-
name: "
|
|
1794
|
+
openAttachmentUpload: route({
|
|
1795
|
+
name: "openAttachmentUpload",
|
|
1450
1796
|
method: "POST",
|
|
1451
|
-
path: "/attachments/
|
|
1797
|
+
path: "/attachments/upload/open",
|
|
1798
|
+
group: "write",
|
|
1799
|
+
selector: "existingObject",
|
|
1800
|
+
subject: "project",
|
|
1801
|
+
idempotent: false,
|
|
1802
|
+
policy: admittingActors("person", "service", "app:client", "agent:apply"),
|
|
1803
|
+
versioned: true,
|
|
1804
|
+
module: "objects-sdk",
|
|
1805
|
+
capability: "objects.write"
|
|
1806
|
+
}),
|
|
1807
|
+
completeAttachmentUpload: route({
|
|
1808
|
+
name: "completeAttachmentUpload",
|
|
1809
|
+
method: "POST",
|
|
1810
|
+
path: "/attachments/upload/complete",
|
|
1452
1811
|
group: "write",
|
|
1453
1812
|
selector: "existingObject",
|
|
1454
1813
|
subject: "project",
|
|
@@ -1886,6 +2245,21 @@ var ROUTES = Object.freeze({
|
|
|
1886
2245
|
listHostedOneWallGrants: route({ name: "listHostedOneWallGrants", method: "POST", path: "/hosted-one-wall-grants/list", group: "read", selector: "none", subject: "none", idempotent: false, policy: admittingActors("person"), versioned: true, module: "hosted-apps-sdk", capability: "hostedApps.oneWallGrants" })
|
|
1887
2246
|
});
|
|
1888
2247
|
var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
|
|
2248
|
+
startBuild: false,
|
|
2249
|
+
cancelBuild: false,
|
|
2250
|
+
readBuildRun: false,
|
|
2251
|
+
listBuildRuns: false,
|
|
2252
|
+
readStepRun: false,
|
|
2253
|
+
readOutputValues: false,
|
|
2254
|
+
readStepLog: false,
|
|
2255
|
+
checkCase: false,
|
|
2256
|
+
registerEngine: false,
|
|
2257
|
+
listEngines: false,
|
|
2258
|
+
claimStepRun: true,
|
|
2259
|
+
readStepInput: false,
|
|
2260
|
+
stageStepOutput: false,
|
|
2261
|
+
submitStepResult: false,
|
|
2262
|
+
postStepLog: false,
|
|
1889
2263
|
createObjectSet: false,
|
|
1890
2264
|
listObjectSets: false,
|
|
1891
2265
|
readObjectSet: false,
|
|
@@ -1916,7 +2290,8 @@ var ROUTE_CARRIES_CREDENTIAL = Object.freeze({
|
|
|
1916
2290
|
readStepUpProof: true,
|
|
1917
2291
|
enterHumanMode: false,
|
|
1918
2292
|
readSessionStatus: false,
|
|
1919
|
-
|
|
2293
|
+
openAttachmentUpload: true,
|
|
2294
|
+
completeAttachmentUpload: false,
|
|
1920
2295
|
readAttachment: false,
|
|
1921
2296
|
readObject: false,
|
|
1922
2297
|
queryObjects: false,
|
|
@@ -2134,15 +2509,19 @@ var CLIENT_SCOPES = Object.freeze({
|
|
|
2134
2509
|
consentLine: "Create and abandon branches, submit and refuse proposals, and read your branches, as you."
|
|
2135
2510
|
}),
|
|
2136
2511
|
"branches.manage": Object.freeze({ capabilities: Object.freeze(["branches.merge", "branches.disposal", "objects.recovery"]), consentLine: "Merge branches into the branches and trunks you may change, delete branches and other refs, and recover changes, as you." }),
|
|
2512
|
+
"builds.run": Object.freeze({
|
|
2513
|
+
capabilities: Object.freeze(["objects.build"]),
|
|
2514
|
+
consentLine: "Start and cancel builds in your projects, as you."
|
|
2515
|
+
}),
|
|
2137
2516
|
offline_access: Object.freeze({ capabilities: Object.freeze([]), consentLine: "Stay connected when you are away, until you disconnect it." })
|
|
2138
2517
|
});
|
|
2139
2518
|
|
|
2140
2519
|
// packages/api-contract/dist/attachment-headers.js
|
|
2141
2520
|
var ATTACHMENT_SELECTOR_HEADER = "x-oe2-selector";
|
|
2142
|
-
var ATTACHMENT_NAME_HEADER = "x-oe2-attachment-name";
|
|
2143
2521
|
function attachmentNameHeader(name) {
|
|
2144
2522
|
return `UTF-8''${encodeURIComponent(name).replace(/[!'()*]/g, (character) => `%${character.charCodeAt(0).toString(16).toUpperCase()}`)}`;
|
|
2145
2523
|
}
|
|
2524
|
+
var ATTACHMENT_NAME_HEADER = "x-oe2-attachment-name";
|
|
2146
2525
|
|
|
2147
2526
|
// packages/api-contract/dist/actor-kind-label.js
|
|
2148
2527
|
var ACTOR_KIND_LABELS = Object.freeze({
|
|
@@ -2154,63 +2533,6 @@ var ACTOR_KIND_LABELS = Object.freeze({
|
|
|
2154
2533
|
// packages/api-contract/dist/links.js
|
|
2155
2534
|
var MAX_CLEAR_ENTRIES = 100;
|
|
2156
2535
|
|
|
2157
|
-
// packages/sdk-dispatch/dist/response.js
|
|
2158
|
-
function responseOf(status, body, reason, headers = {}) {
|
|
2159
|
-
let read = false;
|
|
2160
|
-
const claim = () => {
|
|
2161
|
-
if (read)
|
|
2162
|
-
throw new Error("the response body has already been read");
|
|
2163
|
-
read = true;
|
|
2164
|
-
};
|
|
2165
|
-
const source = async function* () {
|
|
2166
|
-
if (typeof body === "string")
|
|
2167
|
-
yield Buffer.from(body, "utf8");
|
|
2168
|
-
else if (body instanceof Uint8Array)
|
|
2169
|
-
yield body;
|
|
2170
|
-
else
|
|
2171
|
-
yield* body;
|
|
2172
|
-
};
|
|
2173
|
-
const members = {
|
|
2174
|
-
status,
|
|
2175
|
-
...reason === void 0 || reason === "" ? {} : { reason },
|
|
2176
|
-
header: (name) => {
|
|
2177
|
-
const entry2 = Object.entries(headers).find(([key]) => key.toLowerCase() === name.toLowerCase());
|
|
2178
|
-
const value = entry2?.[1];
|
|
2179
|
-
return value === void 0 ? null : typeof value === "string" || typeof value === "number" ? String(value) : value.join(", ");
|
|
2180
|
-
},
|
|
2181
|
-
bytes: () => {
|
|
2182
|
-
claim();
|
|
2183
|
-
let iterated = false;
|
|
2184
|
-
return {
|
|
2185
|
-
async *[Symbol.asyncIterator]() {
|
|
2186
|
-
if (iterated)
|
|
2187
|
-
throw new Error("the response body has already been read");
|
|
2188
|
-
iterated = true;
|
|
2189
|
-
yield* source();
|
|
2190
|
-
}
|
|
2191
|
-
};
|
|
2192
|
-
},
|
|
2193
|
-
json: async () => {
|
|
2194
|
-
claim();
|
|
2195
|
-
const chunks = [];
|
|
2196
|
-
for await (const chunk of source())
|
|
2197
|
-
chunks.push(chunk);
|
|
2198
|
-
const value = JSON.parse(Buffer.concat(chunks).toString("utf8"));
|
|
2199
|
-
return value;
|
|
2200
|
-
}
|
|
2201
|
-
};
|
|
2202
|
-
return new Proxy(members, {
|
|
2203
|
-
get(target, member) {
|
|
2204
|
-
if (member === "status" || member === "reason" || member === "json" || member === "header" || member === "bytes") {
|
|
2205
|
-
return target[member];
|
|
2206
|
-
}
|
|
2207
|
-
if (member === "then" || typeof member === "symbol")
|
|
2208
|
-
return void 0;
|
|
2209
|
-
throw new Error(`the response member ${String(member)} is not implemented`);
|
|
2210
|
-
}
|
|
2211
|
-
});
|
|
2212
|
-
}
|
|
2213
|
-
|
|
2214
2536
|
// packages/sdk-dispatch/dist/step-up.js
|
|
2215
2537
|
function stepUpHeaders(route2, attempt) {
|
|
2216
2538
|
if (!owesStepUp(route2.policy)) {
|
|
@@ -2370,6 +2692,65 @@ function unauthenticatedEnvelope() {
|
|
|
2370
2692
|
|
|
2371
2693
|
// packages/sdk-dispatch/dist/socket-transport.js
|
|
2372
2694
|
import { request } from "node:http";
|
|
2695
|
+
|
|
2696
|
+
// packages/sdk-dispatch/dist/response.js
|
|
2697
|
+
function responseOf(status, body, reason, headers = {}) {
|
|
2698
|
+
let read = false;
|
|
2699
|
+
const claim = () => {
|
|
2700
|
+
if (read)
|
|
2701
|
+
throw new Error("the response body has already been read");
|
|
2702
|
+
read = true;
|
|
2703
|
+
};
|
|
2704
|
+
const source = async function* () {
|
|
2705
|
+
if (typeof body === "string")
|
|
2706
|
+
yield Buffer.from(body, "utf8");
|
|
2707
|
+
else if (body instanceof Uint8Array)
|
|
2708
|
+
yield body;
|
|
2709
|
+
else
|
|
2710
|
+
yield* body;
|
|
2711
|
+
};
|
|
2712
|
+
const members = {
|
|
2713
|
+
status,
|
|
2714
|
+
...reason === void 0 || reason === "" ? {} : { reason },
|
|
2715
|
+
header: (name) => {
|
|
2716
|
+
const entry2 = Object.entries(headers).find(([key]) => key.toLowerCase() === name.toLowerCase());
|
|
2717
|
+
const value = entry2?.[1];
|
|
2718
|
+
return value === void 0 ? null : typeof value === "string" || typeof value === "number" ? String(value) : value.join(", ");
|
|
2719
|
+
},
|
|
2720
|
+
bytes: () => {
|
|
2721
|
+
claim();
|
|
2722
|
+
let iterated = false;
|
|
2723
|
+
return {
|
|
2724
|
+
async *[Symbol.asyncIterator]() {
|
|
2725
|
+
if (iterated)
|
|
2726
|
+
throw new Error("the response body has already been read");
|
|
2727
|
+
iterated = true;
|
|
2728
|
+
yield* source();
|
|
2729
|
+
}
|
|
2730
|
+
};
|
|
2731
|
+
},
|
|
2732
|
+
json: async () => {
|
|
2733
|
+
claim();
|
|
2734
|
+
const chunks = [];
|
|
2735
|
+
for await (const chunk of source())
|
|
2736
|
+
chunks.push(chunk);
|
|
2737
|
+
const value = JSON.parse(Buffer.concat(chunks).toString("utf8"));
|
|
2738
|
+
return value;
|
|
2739
|
+
}
|
|
2740
|
+
};
|
|
2741
|
+
return new Proxy(members, {
|
|
2742
|
+
get(target, member) {
|
|
2743
|
+
if (member === "status" || member === "reason" || member === "json" || member === "header" || member === "bytes") {
|
|
2744
|
+
return target[member];
|
|
2745
|
+
}
|
|
2746
|
+
if (member === "then" || typeof member === "symbol")
|
|
2747
|
+
return void 0;
|
|
2748
|
+
throw new Error(`the response member ${String(member)} is not implemented`);
|
|
2749
|
+
}
|
|
2750
|
+
});
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
// packages/sdk-dispatch/dist/socket-transport.js
|
|
2373
2754
|
var REQUEST_DEADLINE_MS = 1e4;
|
|
2374
2755
|
function requestDeadlineOf(path, method, override) {
|
|
2375
2756
|
if (override !== void 0)
|
|
@@ -2411,7 +2792,7 @@ var HostStatusNotEnvelope = class extends Error {
|
|
|
2411
2792
|
};
|
|
2412
2793
|
var INIT_MEMBERS = Object.freeze(["method", "headers", "body", "signal"]);
|
|
2413
2794
|
function unsupported(member) {
|
|
2414
|
-
return new Error(`the
|
|
2795
|
+
return new Error(`the request function does not implement ${member}`);
|
|
2415
2796
|
}
|
|
2416
2797
|
function isPlainObject2(value) {
|
|
2417
2798
|
return typeof value === "object" && value !== null && Object.getPrototypeOf(value) === Object.prototype;
|
|
@@ -2542,6 +2923,13 @@ function createHostFetch(socketPath, deadlineMs) {
|
|
|
2542
2923
|
};
|
|
2543
2924
|
}
|
|
2544
2925
|
function createHostStreamFetch(socketPath, headDeadlineMs = REQUEST_DEADLINE_MS) {
|
|
2926
|
+
return streamFetchOver(headDeadlineMs, (url) => {
|
|
2927
|
+
if (url.protocol !== "http:") {
|
|
2928
|
+
throw unsupported(`the protocol ${url.protocol}`);
|
|
2929
|
+
}
|
|
2930
|
+
}, (url, checked, onResponse) => request({ socketPath, method: checked.method, path: `${url.pathname}${url.search}`, headers: checked.headers }, onResponse));
|
|
2931
|
+
}
|
|
2932
|
+
function streamFetchOver(headDeadlineMs, admit, open2) {
|
|
2545
2933
|
return async (input, init) => {
|
|
2546
2934
|
if (typeof input !== "string") {
|
|
2547
2935
|
throw unsupported("an input that is not a string URL");
|
|
@@ -2551,9 +2939,7 @@ function createHostStreamFetch(socketPath, headDeadlineMs = REQUEST_DEADLINE_MS)
|
|
|
2551
2939
|
throw unsupported("an input that is not a URL");
|
|
2552
2940
|
}
|
|
2553
2941
|
const url = new URL(input);
|
|
2554
|
-
|
|
2555
|
-
throw unsupported(`the protocol ${url.protocol}`);
|
|
2556
|
-
}
|
|
2942
|
+
admit(url);
|
|
2557
2943
|
const path = `${url.pathname}${url.search}`;
|
|
2558
2944
|
return new Promise((resolve, reject) => {
|
|
2559
2945
|
let headSettled = false;
|
|
@@ -2565,7 +2951,7 @@ function createHostStreamFetch(socketPath, headDeadlineMs = REQUEST_DEADLINE_MS)
|
|
|
2565
2951
|
outgoing.destroy();
|
|
2566
2952
|
reject(new HostOutcomeUnknown(path, "deadline", `the host did not answer the head of ${path} within the deadline of ${String(headDeadlineMs)} ms`));
|
|
2567
2953
|
}, headDeadlineMs);
|
|
2568
|
-
const outgoing =
|
|
2954
|
+
const outgoing = open2(url, checked, (incoming) => {
|
|
2569
2955
|
if (headSettled) {
|
|
2570
2956
|
return;
|
|
2571
2957
|
}
|
|
@@ -2824,14 +3210,14 @@ async function* callStreamed(transport, origin, route2, body, token, signal) {
|
|
|
2824
3210
|
yield JSON.parse(line);
|
|
2825
3211
|
}
|
|
2826
3212
|
}
|
|
2827
|
-
function
|
|
3213
|
+
function attachmentFactsOf(response, length) {
|
|
2828
3214
|
const fault = () => new Error("the host answered /attachments/read with invalid attachment headers");
|
|
2829
|
-
const
|
|
2830
|
-
const
|
|
2831
|
-
const
|
|
3215
|
+
const digest = response.header("x-oe2-attachment-digest");
|
|
3216
|
+
const sha256 = digest === null ? null : /^sha256:([0-9a-f]{64})$/.exec(digest);
|
|
3217
|
+
const md5 = digest === null ? null : /^md5:([0-9a-f]{32})$/.exec(digest);
|
|
2832
3218
|
const disposition = response.header("content-disposition");
|
|
2833
3219
|
const encodedName = disposition === null ? null : /;\s*filename\*=UTF-8''([^;]+)/i.exec(disposition)?.[1];
|
|
2834
|
-
if (sha256 === null
|
|
3220
|
+
if (sha256 === null && md5 === null || length === null || !/^(0|[1-9][0-9]*)$/.test(length) || !Number.isSafeInteger(Number(length)) || encodedName === null || encodedName === void 0)
|
|
2835
3221
|
throw fault();
|
|
2836
3222
|
let name;
|
|
2837
3223
|
try {
|
|
@@ -2841,13 +3227,94 @@ function attachmentDescriptorOf(response) {
|
|
|
2841
3227
|
throw error;
|
|
2842
3228
|
throw fault();
|
|
2843
3229
|
}
|
|
2844
|
-
|
|
3230
|
+
if (sha256 !== null)
|
|
3231
|
+
return { digest: { algorithm: "sha256", hex: sha256[1] }, bytes: Number(length), name };
|
|
3232
|
+
if (md5 !== null)
|
|
3233
|
+
return { digest: { algorithm: "md5", hex: md5[1] }, bytes: Number(length), name };
|
|
3234
|
+
throw fault();
|
|
3235
|
+
}
|
|
3236
|
+
function descriptorOf(facts, mediaType) {
|
|
3237
|
+
const { digest, name, bytes } = facts;
|
|
3238
|
+
return digest.algorithm === "sha256" ? { digest: "sha256", sha256: digest.hex, name, mediaType, bytes } : { digest: "md5", md5: digest.hex, name, mediaType, bytes };
|
|
3239
|
+
}
|
|
3240
|
+
function streamDescriptorOf(response) {
|
|
3241
|
+
const mediaType = response.header("content-type");
|
|
3242
|
+
if (mediaType === null || mediaType.length === 0) {
|
|
3243
|
+
throw new Error("the host answered /attachments/read with invalid attachment headers");
|
|
3244
|
+
}
|
|
3245
|
+
const contentLength = response.header("content-length");
|
|
3246
|
+
return descriptorOf(attachmentFactsOf(response, contentLength === null ? response.header("x-oe2-attachment-bytes") : contentLength), mediaType);
|
|
3247
|
+
}
|
|
3248
|
+
var DEFAULT_ATTACHMENT_DEADLINES = Object.freeze({ headerMs: 12e4, gapMs: 6e4 });
|
|
3249
|
+
async function cancelBody(response) {
|
|
3250
|
+
const iterator = response.bytes()[Symbol.asyncIterator]();
|
|
3251
|
+
try {
|
|
3252
|
+
await iterator.next();
|
|
3253
|
+
} finally {
|
|
3254
|
+
await iterator.return?.();
|
|
3255
|
+
}
|
|
2845
3256
|
}
|
|
2846
|
-
async function
|
|
3257
|
+
async function readWithin(reader, gapMs, controller) {
|
|
3258
|
+
return new Promise((resolve, reject) => {
|
|
3259
|
+
const timer = setTimeout(() => {
|
|
3260
|
+
controller.abort();
|
|
3261
|
+
reject(new Error("the stored file stopped sending"));
|
|
3262
|
+
}, gapMs);
|
|
3263
|
+
reader.read().then((piece) => {
|
|
3264
|
+
clearTimeout(timer);
|
|
3265
|
+
resolve(piece);
|
|
3266
|
+
}, (error) => {
|
|
3267
|
+
clearTimeout(timer);
|
|
3268
|
+
reject(error);
|
|
3269
|
+
});
|
|
3270
|
+
});
|
|
3271
|
+
}
|
|
3272
|
+
async function* storeBytes(body, gapMs, controller) {
|
|
3273
|
+
const reader = body.getReader();
|
|
3274
|
+
try {
|
|
3275
|
+
for (; ; ) {
|
|
3276
|
+
const piece = await readWithin(reader, gapMs, controller);
|
|
3277
|
+
if (piece.done)
|
|
3278
|
+
return;
|
|
3279
|
+
yield piece.value;
|
|
3280
|
+
}
|
|
3281
|
+
} finally {
|
|
3282
|
+
controller.abort();
|
|
3283
|
+
}
|
|
3284
|
+
}
|
|
3285
|
+
async function followLink(href, deadlines) {
|
|
3286
|
+
const controller = new AbortController();
|
|
3287
|
+
const headerTimer = setTimeout(() => controller.abort(), deadlines.headerMs);
|
|
3288
|
+
let redirected;
|
|
3289
|
+
try {
|
|
3290
|
+
redirected = await fetch(href, { redirect: "follow", credentials: "omit", signal: controller.signal });
|
|
3291
|
+
} catch (error) {
|
|
3292
|
+
if (!(error instanceof TypeError) && !controller.signal.aborted)
|
|
3293
|
+
throw error;
|
|
3294
|
+
throw new Error(controller.signal.aborted ? "the stored file did not answer in time" : "the stored file could not be fetched");
|
|
3295
|
+
} finally {
|
|
3296
|
+
clearTimeout(headerTimer);
|
|
3297
|
+
}
|
|
3298
|
+
if (redirected.status !== 200) {
|
|
3299
|
+
controller.abort();
|
|
3300
|
+
throw new Error(`the stored file answered with status ${String(redirected.status)}`);
|
|
3301
|
+
}
|
|
3302
|
+
const mediaType = redirected.headers.get("content-type");
|
|
3303
|
+
if (mediaType === null || mediaType.length === 0) {
|
|
3304
|
+
controller.abort();
|
|
3305
|
+
throw new Error("the stored file answered without a content type");
|
|
3306
|
+
}
|
|
3307
|
+
if (redirected.body === null) {
|
|
3308
|
+
throw new Error("the attachment redirect answered without a body");
|
|
3309
|
+
}
|
|
3310
|
+
return { mediaType, body: storeBytes(redirected.body, deadlines.gapMs, controller) };
|
|
3311
|
+
}
|
|
3312
|
+
async function callAttachment(transport, origin, selector, input, token, options = {}) {
|
|
2847
3313
|
if (token === null)
|
|
2848
3314
|
return unauthenticatedEnvelope();
|
|
3315
|
+
const deadlines = options.deadlines === void 0 ? DEFAULT_ATTACHMENT_DEADLINES : options.deadlines;
|
|
2849
3316
|
const entry2 = ROUTES.readAttachment;
|
|
2850
|
-
|
|
3317
|
+
const response = await transport(`${origin}${entry2.path}`, {
|
|
2851
3318
|
method: entry2.method,
|
|
2852
3319
|
headers: {
|
|
2853
3320
|
"content-type": "application/json",
|
|
@@ -2857,6 +3324,7 @@ async function callAttachment(transport, origin, selector, input, token) {
|
|
|
2857
3324
|
body: JSON.stringify({ selector, input })
|
|
2858
3325
|
});
|
|
2859
3326
|
if ([302, 303, 307].includes(response.status)) {
|
|
3327
|
+
await cancelBody(response);
|
|
2860
3328
|
const location = response.header("location");
|
|
2861
3329
|
if (location === null)
|
|
2862
3330
|
throw new Error("the host answered /attachments/read with a redirect without Location");
|
|
@@ -2864,19 +3332,16 @@ async function callAttachment(transport, origin, selector, input, token) {
|
|
|
2864
3332
|
if (target.origin === new URL(origin).origin) {
|
|
2865
3333
|
throw new Error("the host answered /attachments/read with a same-origin redirect");
|
|
2866
3334
|
}
|
|
2867
|
-
const
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
throw new Error("the attachment redirect answered without a body");
|
|
2874
|
-
response = responseOf(redirected.status, redirected.body, redirected.statusText, Object.fromEntries(redirected.headers));
|
|
3335
|
+
const facts = attachmentFactsOf(response, response.header("x-oe2-attachment-bytes"));
|
|
3336
|
+
if (options.follow === false) {
|
|
3337
|
+
return { version: PROTOCOL_VERSION, result: { kind: "link", link: target.href, ...facts } };
|
|
3338
|
+
}
|
|
3339
|
+
const stored = await followLink(target.href, deadlines);
|
|
3340
|
+
return { version: PROTOCOL_VERSION, result: { kind: "stream", descriptor: descriptorOf(facts, stored.mediaType), body: stored.body } };
|
|
2875
3341
|
}
|
|
2876
3342
|
if (response.status !== 200)
|
|
2877
3343
|
return explainedEnvelopeOf(await readEnvelope(response, entry2.path));
|
|
2878
|
-
|
|
2879
|
-
return { version: PROTOCOL_VERSION, result: { descriptor: descriptor2, body: response.bytes() } };
|
|
3344
|
+
return { version: PROTOCOL_VERSION, result: { kind: "stream", descriptor: streamDescriptorOf(response), body: response.bytes() } };
|
|
2880
3345
|
}
|
|
2881
3346
|
|
|
2882
3347
|
// packages/sdk-dispatch/dist/module-factory.js
|
|
@@ -2973,7 +3438,7 @@ function createHttpsTransport(origin, options = {}, deadlineMs) {
|
|
|
2973
3438
|
});
|
|
2974
3439
|
};
|
|
2975
3440
|
const outgoing = request2({
|
|
2976
|
-
hostname: url.hostname,
|
|
3441
|
+
hostname: url.hostname.replace(/^\[|\]$/g, ""),
|
|
2977
3442
|
port: url.port === "" ? 443 : Number(url.port),
|
|
2978
3443
|
path,
|
|
2979
3444
|
method: init.method,
|
|
@@ -3160,12 +3625,115 @@ function enterHumanMode(transport, origin, token, body, stepUp) {
|
|
|
3160
3625
|
return call(transport, origin, "enterHumanMode", body, token, null, stepUp);
|
|
3161
3626
|
}
|
|
3162
3627
|
|
|
3628
|
+
// packages/sdk-dispatch/dist/upload.js
|
|
3629
|
+
var ATTACHMENT_UPLOAD_PIECE_BYTES = 8 * 1024 * 1024;
|
|
3630
|
+
async function uploadPieces(sessionUri, source, fetchStore, onProgress) {
|
|
3631
|
+
if (!Number.isSafeInteger(source.size) || source.size <= 0) {
|
|
3632
|
+
throw new TypeError("an upload needs a positive safe integer size");
|
|
3633
|
+
}
|
|
3634
|
+
const failed = () => new Error("the stored file could not be uploaded");
|
|
3635
|
+
async function put(range, body) {
|
|
3636
|
+
try {
|
|
3637
|
+
const response = await fetchStore(sessionUri, {
|
|
3638
|
+
// Follow exposes a 308 without Location in both Node and browsers; manual hides it in browsers.
|
|
3639
|
+
method: "PUT",
|
|
3640
|
+
credentials: "omit",
|
|
3641
|
+
redirect: "follow",
|
|
3642
|
+
headers: { "Content-Range": range },
|
|
3643
|
+
...body === void 0 ? {} : { body: new Uint8Array(body) }
|
|
3644
|
+
});
|
|
3645
|
+
await response.body?.cancel();
|
|
3646
|
+
if (response.redirected)
|
|
3647
|
+
throw failed();
|
|
3648
|
+
return response;
|
|
3649
|
+
} catch (error) {
|
|
3650
|
+
if (!(error instanceof TypeError))
|
|
3651
|
+
throw failed();
|
|
3652
|
+
return null;
|
|
3653
|
+
}
|
|
3654
|
+
}
|
|
3655
|
+
async function read(offset2, end) {
|
|
3656
|
+
const piece = await source.read(offset2, end - offset2);
|
|
3657
|
+
if (piece.byteLength !== end - offset2)
|
|
3658
|
+
throw new Error("the upload source returned an incorrect piece length");
|
|
3659
|
+
return piece;
|
|
3660
|
+
}
|
|
3661
|
+
let offset = 0;
|
|
3662
|
+
let reported = 0;
|
|
3663
|
+
const pending = /* @__PURE__ */ new Map();
|
|
3664
|
+
while (offset < source.size) {
|
|
3665
|
+
const end = Math.min(offset + ATTACHMENT_UPLOAD_PIECE_BYTES, source.size);
|
|
3666
|
+
for (let ahead = offset; ahead < Math.min(end + ATTACHMENT_UPLOAD_PIECE_BYTES, source.size); ahead += ATTACHMENT_UPLOAD_PIECE_BYTES) {
|
|
3667
|
+
if (!pending.has(ahead)) {
|
|
3668
|
+
const piece2 = read(ahead, Math.min(ahead + ATTACHMENT_UPLOAD_PIECE_BYTES, source.size)).then((bytes) => ({ bytes }), (error) => ({ error }));
|
|
3669
|
+
pending.set(ahead, piece2);
|
|
3670
|
+
}
|
|
3671
|
+
}
|
|
3672
|
+
const ready = await pending.get(offset);
|
|
3673
|
+
pending.delete(offset);
|
|
3674
|
+
if ("error" in ready)
|
|
3675
|
+
throw ready.error;
|
|
3676
|
+
let piece = ready.bytes;
|
|
3677
|
+
let resumes = 0;
|
|
3678
|
+
while (offset < end) {
|
|
3679
|
+
const response = await put(`bytes ${String(offset)}-${String(end - 1)}/${String(source.size)}`, piece);
|
|
3680
|
+
let status = response;
|
|
3681
|
+
if (status === null || status.status >= 500) {
|
|
3682
|
+
if (resumes === 3)
|
|
3683
|
+
throw failed();
|
|
3684
|
+
resumes++;
|
|
3685
|
+
status = await put(`bytes */${String(source.size)}`);
|
|
3686
|
+
while (status === null || status.status >= 500) {
|
|
3687
|
+
if (resumes === 3)
|
|
3688
|
+
throw failed();
|
|
3689
|
+
resumes++;
|
|
3690
|
+
status = await put(`bytes */${String(source.size)}`);
|
|
3691
|
+
}
|
|
3692
|
+
if (status.status === 200 || status.status === 201) {
|
|
3693
|
+
offset = source.size;
|
|
3694
|
+
break;
|
|
3695
|
+
}
|
|
3696
|
+
if (status.status !== 308)
|
|
3697
|
+
throw failed();
|
|
3698
|
+
} else {
|
|
3699
|
+
if (end === source.size && (status.status === 200 || status.status === 201)) {
|
|
3700
|
+
offset = end;
|
|
3701
|
+
break;
|
|
3702
|
+
}
|
|
3703
|
+
if (status.status !== 308) {
|
|
3704
|
+
throw new Error(`the stored file answered with status ${String(status.status)}`);
|
|
3705
|
+
}
|
|
3706
|
+
}
|
|
3707
|
+
const range = status.headers.get("Range");
|
|
3708
|
+
const matched = range === null ? null : /^bytes=0-(\d+)$/.exec(range);
|
|
3709
|
+
if (range !== null && matched === null)
|
|
3710
|
+
throw failed();
|
|
3711
|
+
const committed = matched === null ? 0 : Number(matched[1]) + 1;
|
|
3712
|
+
if (!Number.isSafeInteger(committed) || committed < offset || committed > end)
|
|
3713
|
+
throw failed();
|
|
3714
|
+
if (status === response && committed === offset) {
|
|
3715
|
+
if (resumes === 3)
|
|
3716
|
+
throw failed();
|
|
3717
|
+
resumes++;
|
|
3718
|
+
}
|
|
3719
|
+
offset = committed;
|
|
3720
|
+
if (offset < end)
|
|
3721
|
+
piece = await read(offset, end);
|
|
3722
|
+
}
|
|
3723
|
+
for (; reported < offset; reported = Math.min(reported + ATTACHMENT_UPLOAD_PIECE_BYTES, source.size)) {
|
|
3724
|
+
onProgress?.(Math.min(reported + ATTACHMENT_UPLOAD_PIECE_BYTES, source.size), source.size);
|
|
3725
|
+
}
|
|
3726
|
+
}
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3163
3729
|
// packages/sdk-core/dist/index.js
|
|
3164
3730
|
var SDK_CORE_ROUTE_ENTRIES = routeEntriesOf("sdk-core");
|
|
3165
3731
|
|
|
3166
3732
|
// packages/admin-sdk/dist/index.js
|
|
3167
3733
|
var ADMIN_ROUTE_ENTRIES = routeEntriesOf("admin-sdk");
|
|
3168
3734
|
var ADMIN_ROUTE_NAMES = Object.freeze([
|
|
3735
|
+
"registerEngine",
|
|
3736
|
+
"listEngines",
|
|
3169
3737
|
"registerClient",
|
|
3170
3738
|
"listClients",
|
|
3171
3739
|
"revokeClient",
|
|
@@ -3502,10 +4070,36 @@ function displayPropertyValue(value, definition) {
|
|
|
3502
4070
|
return JSON.stringify(value);
|
|
3503
4071
|
}
|
|
3504
4072
|
|
|
4073
|
+
// packages/objects-sdk/dist/upload.js
|
|
4074
|
+
async function uploadAttachment(transport, origin, token, selector, source, options) {
|
|
4075
|
+
const opened = await call(transport, origin, "openAttachmentUpload", {
|
|
4076
|
+
selector,
|
|
4077
|
+
input: { name: source.name, declaredLength: source.size }
|
|
4078
|
+
}, token, null);
|
|
4079
|
+
if ("refusal" in opened)
|
|
4080
|
+
return opened;
|
|
4081
|
+
if (opened.replayed === true)
|
|
4082
|
+
throw new Error("the host replayed an upload open");
|
|
4083
|
+
await uploadPieces(opened.result.sessionUri, source, fetch, options?.onProgress);
|
|
4084
|
+
return call(transport, origin, "completeAttachmentUpload", {
|
|
4085
|
+
selector,
|
|
4086
|
+
input: { uploadId: opened.result.uploadId }
|
|
4087
|
+
}, token, null);
|
|
4088
|
+
}
|
|
4089
|
+
|
|
3505
4090
|
// packages/objects-sdk/dist/transport-client.js
|
|
3506
4091
|
var OBJECTS_ROUTE_ENTRIES = routeEntriesOf("objects-sdk");
|
|
3507
4092
|
var OBJECTS_ROUTE_NAMES = [
|
|
3508
|
-
"
|
|
4093
|
+
"startBuild",
|
|
4094
|
+
"cancelBuild",
|
|
4095
|
+
"readBuildRun",
|
|
4096
|
+
"listBuildRuns",
|
|
4097
|
+
"readStepRun",
|
|
4098
|
+
"readOutputValues",
|
|
4099
|
+
"readStepLog",
|
|
4100
|
+
"checkCase",
|
|
4101
|
+
"openAttachmentUpload",
|
|
4102
|
+
"completeAttachmentUpload",
|
|
3509
4103
|
"readAttachment",
|
|
3510
4104
|
"createObjectSet",
|
|
3511
4105
|
"listObjectSets",
|
|
@@ -3556,15 +4150,13 @@ function entries4() {
|
|
|
3556
4150
|
return JSON_OBJECTS_ROUTE_NAMES.map((name) => ROUTES[name]);
|
|
3557
4151
|
}
|
|
3558
4152
|
function createObjectsTransportClient(transport, origin, token) {
|
|
4153
|
+
function readAttachment(selector, input, options) {
|
|
4154
|
+
return options === void 0 ? callAttachment(transport, origin, selector, input, token) : callAttachment(transport, origin, selector, input, token, options);
|
|
4155
|
+
}
|
|
3559
4156
|
return Object.freeze({
|
|
3560
4157
|
...createTypedClient(JSON_OBJECTS_ROUTE_NAMES, entries4(), transport, origin, token),
|
|
3561
|
-
readAttachment
|
|
3562
|
-
|
|
3563
|
-
selector,
|
|
3564
|
-
input: { name: file.name, body: (async function* () {
|
|
3565
|
-
yield file.bytes;
|
|
3566
|
-
})() }
|
|
3567
|
-
}, token, null)
|
|
4158
|
+
readAttachment,
|
|
4159
|
+
uploadAttachment: (selector, source, options) => uploadAttachment(transport, origin, token, selector, source, options)
|
|
3568
4160
|
});
|
|
3569
4161
|
}
|
|
3570
4162
|
|
|
@@ -3771,7 +4363,7 @@ function walk(schema, value, path, violations, ownerProperties) {
|
|
|
3771
4363
|
return;
|
|
3772
4364
|
}
|
|
3773
4365
|
case "attachment": {
|
|
3774
|
-
if (!
|
|
4366
|
+
if (!isAttachmentWireDescriptor(value))
|
|
3775
4367
|
violations.push({ path, rule: "invalid-attachment" });
|
|
3776
4368
|
return;
|
|
3777
4369
|
}
|
|
@@ -3923,14 +4515,25 @@ function checkBoundReference(reference, count, path, violations, ownerProperties
|
|
|
3923
4515
|
violations.push({ path: [...path, "value"], rule: "count-bound-unit" });
|
|
3924
4516
|
}
|
|
3925
4517
|
}
|
|
3926
|
-
function
|
|
3927
|
-
if (
|
|
4518
|
+
function isAttachmentWireDescriptor(value) {
|
|
4519
|
+
if (!isRecord(value) || Object.keys(value).length !== 5 || !["digest", "name", "mediaType", "bytes"].every((key) => Object.hasOwn(value, key)))
|
|
4520
|
+
return false;
|
|
4521
|
+
if (value.digest === "sha256") {
|
|
4522
|
+
if (!Object.hasOwn(value, "sha256") || typeof value.sha256 !== "string" || value.sha256.length !== 64 || !/^[a-f0-9]{64}$/.test(value.sha256))
|
|
4523
|
+
return false;
|
|
4524
|
+
} else if (value.digest === "md5") {
|
|
4525
|
+
if (!Object.hasOwn(value, "md5") || typeof value.md5 !== "string" || value.md5.length !== 32 || !/^[a-f0-9]{32}$/.test(value.md5))
|
|
4526
|
+
return false;
|
|
4527
|
+
} else
|
|
3928
4528
|
return false;
|
|
3929
|
-
if (
|
|
4529
|
+
if (typeof value.name !== "string" || !attachmentNameRuleHolds(value.name) || typeof value.mediaType !== "string" || typeof value.bytes !== "number" || !Number.isSafeInteger(value.bytes) || value.bytes <= 0)
|
|
3930
4530
|
return false;
|
|
3931
4531
|
const name = value.name.toLowerCase();
|
|
3932
4532
|
return Object.values(ATTACHMENT_CLASSES).some((formats) => formats.some((format) => format.mediaType === value.mediaType && format.extensions.some((extension) => name.endsWith(extension))));
|
|
3933
4533
|
}
|
|
4534
|
+
function attachmentNameRuleHolds(name) {
|
|
4535
|
+
return name.length >= 1 && name.length <= 255 && !name.startsWith(".") && !hasForbiddenNameCharacter(name);
|
|
4536
|
+
}
|
|
3934
4537
|
function hasForbiddenNameCharacter(name) {
|
|
3935
4538
|
for (let index = 0; index < name.length; index++) {
|
|
3936
4539
|
const code = name.charCodeAt(index);
|
|
@@ -4602,6 +5205,15 @@ var VERB_TEMPLATE = deepFreeze3({
|
|
|
4602
5205
|
}
|
|
4603
5206
|
});
|
|
4604
5207
|
|
|
5208
|
+
// packages/schema-language/dist/attachment-viewer-limits.js
|
|
5209
|
+
var ATTACHMENT_VIEWER_LIMITS = Object.freeze({
|
|
5210
|
+
image: 52428800,
|
|
5211
|
+
pdf: 104857600,
|
|
5212
|
+
mesh: 67108864,
|
|
5213
|
+
step: 33554432,
|
|
5214
|
+
text: 33554432
|
|
5215
|
+
});
|
|
5216
|
+
|
|
4605
5217
|
// packages/objects-sdk/dist/validation.js
|
|
4606
5218
|
function validateLocally(schema, languageVersion, value, category) {
|
|
4607
5219
|
const checked = validateSchema(schema, languageVersion, category);
|
|
@@ -4704,6 +5316,7 @@ function edgeProspective(published) {
|
|
|
4704
5316
|
requiredPropertyKeys: stringListOf(published.requiredPropertyKeys, `${what} requiredPropertyKeys`),
|
|
4705
5317
|
readRule: oneOf(published.readRule, RULES, `${what} readRule`),
|
|
4706
5318
|
writeRule: oneOf(published.writeRule, RULES, `${what} writeRule`),
|
|
5319
|
+
...published.editorHidden ? { editorHidden: true } : {},
|
|
4707
5320
|
...published.review === void 0 || published.review === null ? {} : { review: published.review }
|
|
4708
5321
|
};
|
|
4709
5322
|
}
|
|
@@ -5095,11 +5708,21 @@ function withoutCorrelation(example) {
|
|
|
5095
5708
|
function schemaHelpLines(entry2) {
|
|
5096
5709
|
if (isBinaryRequestRoute(entry2.name)) {
|
|
5097
5710
|
const binary = BINARY_REQUEST_INPUTS[entry2.name];
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
`${binary.selectorHeader}: selector as JSON text
|
|
5101
|
-
|
|
5102
|
-
|
|
5711
|
+
const lines2 = [`content-type: ${binary.contentType}`];
|
|
5712
|
+
if ("selectorHeader" in binary) {
|
|
5713
|
+
lines2.push(`${binary.selectorHeader}: selector as JSON text`);
|
|
5714
|
+
}
|
|
5715
|
+
if ("nameHeader" in binary) {
|
|
5716
|
+
const name = binary.nameHeader === "x-oe2-attachment-name" ? "attachment name" : "output name";
|
|
5717
|
+
lines2.push(`${binary.nameHeader}: ${name} as an RFC 8187 ext-value`);
|
|
5718
|
+
}
|
|
5719
|
+
if ("digestHeader" in binary) {
|
|
5720
|
+
lines2.push(`${binary.digestHeader}: output digest encoded as ${binary.digestEncoding}`);
|
|
5721
|
+
}
|
|
5722
|
+
if ("encoding" in binary) {
|
|
5723
|
+
lines2.push(`body: ${binary.encoding} byte stream`);
|
|
5724
|
+
}
|
|
5725
|
+
return lines2;
|
|
5103
5726
|
}
|
|
5104
5727
|
const schemas = schemasOf(entry2);
|
|
5105
5728
|
const input = fieldLines(schemas.input, schemas.input, " ");
|
|
@@ -5228,6 +5851,12 @@ function refusalLines(refusal2, settle2, request3, host, reference) {
|
|
|
5228
5851
|
if (refusal2.kind === "refused" && refusal2.rule === "owned-type-not-presentation" && refusal2.detail !== void 0) {
|
|
5229
5852
|
lines.push(`type: ${refusal2.detail.typeKey}; field: ${refusal2.detail.field}`);
|
|
5230
5853
|
}
|
|
5854
|
+
if (refusal2.kind === "refused" && refusal2.rule === "outputs-already-current" && refusal2.outputs !== void 0) {
|
|
5855
|
+
lines.push(
|
|
5856
|
+
`current: ${refusal2.outputs.current}; stale: ${refusal2.outputs.stale}`,
|
|
5857
|
+
"Choose run-all or run-stale explicitly and send a new request."
|
|
5858
|
+
);
|
|
5859
|
+
}
|
|
5231
5860
|
const allowed = allowedFieldOf(refusal2, request3);
|
|
5232
5861
|
const allowedValues = allowed?.allowedValues ?? [];
|
|
5233
5862
|
if (request3 !== void 0 && allowed !== null && allowed.allowedKinds.length > 0 && allowed.discriminator !== void 0) {
|
|
@@ -5780,11 +6409,11 @@ var createFileStore = (configDirectory) => {
|
|
|
5780
6409
|
try {
|
|
5781
6410
|
mkdirSync(directory, { recursive: true, mode: 448 });
|
|
5782
6411
|
chmodSync(directory, 448);
|
|
5783
|
-
const
|
|
6412
|
+
const descriptor = openSync(temporary, "wx", 384);
|
|
5784
6413
|
try {
|
|
5785
|
-
writeSync(
|
|
6414
|
+
writeSync(descriptor, secretOf(hostKey, session, organisation));
|
|
5786
6415
|
} finally {
|
|
5787
|
-
closeSync(
|
|
6416
|
+
closeSync(descriptor);
|
|
5788
6417
|
}
|
|
5789
6418
|
renameSync(temporary, final);
|
|
5790
6419
|
} catch (error) {
|
|
@@ -5828,6 +6457,8 @@ var storedSummary = async (store, hostKey) => {
|
|
|
5828
6457
|
};
|
|
5829
6458
|
|
|
5830
6459
|
// packages/cli/src/host-binding.ts
|
|
6460
|
+
var DEFAULT_HOST = "https://api.openeng.io";
|
|
6461
|
+
var resolveHostSetting = (flag, environment) => flag ?? environment ?? DEFAULT_HOST;
|
|
5831
6462
|
var UNIX_PREFIX = "unix:";
|
|
5832
6463
|
var LOOPBACK_HOSTNAMES = ["127.0.0.1", "[::1]"];
|
|
5833
6464
|
var parseHost = (host, signInOrigin) => {
|
|
@@ -6164,11 +6795,11 @@ async function takeLock(path, deps) {
|
|
|
6164
6795
|
let unreadableSince = null;
|
|
6165
6796
|
for (; ; ) {
|
|
6166
6797
|
try {
|
|
6167
|
-
const
|
|
6798
|
+
const descriptor = openSync2(path, "wx", 384);
|
|
6168
6799
|
try {
|
|
6169
|
-
writeSync2(
|
|
6800
|
+
writeSync2(descriptor, text);
|
|
6170
6801
|
} finally {
|
|
6171
|
-
closeSync2(
|
|
6802
|
+
closeSync2(descriptor);
|
|
6172
6803
|
}
|
|
6173
6804
|
return () => {
|
|
6174
6805
|
if (readLockText(path) === text) {
|
|
@@ -6808,8 +7439,8 @@ var resolveAliases = (words) => {
|
|
|
6808
7439
|
return group === void 0 ? words : [group, ...rest];
|
|
6809
7440
|
};
|
|
6810
7441
|
var HOST_GUIDANCE = [
|
|
6811
|
-
"
|
|
6812
|
-
"
|
|
7442
|
+
"default host: https://api.openeng.io",
|
|
7443
|
+
"to use another host: --host <origin>, or set OPENENG_HOST=<origin>",
|
|
6813
7444
|
"agents: start with openeng skill, which prints how to work with the platform."
|
|
6814
7445
|
];
|
|
6815
7446
|
function wrapped(names) {
|
|
@@ -13467,7 +14098,8 @@ var typesDraftAccept = {
|
|
|
13467
14098
|
|
|
13468
14099
|
// packages/cli/src/commands/attachment.ts
|
|
13469
14100
|
import { createHash as createHash3, randomUUID as randomUUID5 } from "node:crypto";
|
|
13470
|
-
import {
|
|
14101
|
+
import { renameSync as renameSync2, rmSync } from "node:fs";
|
|
14102
|
+
import { open } from "node:fs/promises";
|
|
13471
14103
|
import { basename } from "node:path";
|
|
13472
14104
|
var usageAdd = "openeng attachment add <object> <property> <file> --project <id> --ref <ref>";
|
|
13473
14105
|
var usageGet = "openeng attachment get <object> <property> [--out <path>] --project <id> --ref <ref>";
|
|
@@ -13492,18 +14124,57 @@ function isSelector(value) {
|
|
|
13492
14124
|
function isRecord4(value) {
|
|
13493
14125
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
13494
14126
|
}
|
|
13495
|
-
function
|
|
13496
|
-
|
|
14127
|
+
async function writeAll(file, chunk) {
|
|
14128
|
+
let offset = 0;
|
|
14129
|
+
while (offset < chunk.byteLength) {
|
|
14130
|
+
const { bytesWritten } = await file.write(chunk, offset, chunk.byteLength - offset);
|
|
14131
|
+
if (bytesWritten === 0) throw new Error("the file system accepted no bytes of the download");
|
|
14132
|
+
offset += bytesWritten;
|
|
14133
|
+
}
|
|
14134
|
+
}
|
|
14135
|
+
var SHA256_HEX = /^[0-9a-f]{64}$/;
|
|
14136
|
+
var MD5_HEX = /^[0-9a-f]{32}$/;
|
|
14137
|
+
function wireDescriptor(value) {
|
|
14138
|
+
if (!isRecord4(value) || typeof value.name !== "string" || typeof value.mediaType !== "string" || typeof value.bytes !== "number" || !Number.isSafeInteger(value.bytes) || value.bytes < 0) return null;
|
|
14139
|
+
const { name, mediaType, bytes } = value;
|
|
14140
|
+
const digest = Object.hasOwn(value, "digest") ? value.digest : "sha256";
|
|
14141
|
+
if (digest === "sha256" && typeof value.sha256 === "string" && SHA256_HEX.test(value.sha256)) {
|
|
14142
|
+
return { digest, sha256: value.sha256, name, mediaType, bytes };
|
|
14143
|
+
}
|
|
14144
|
+
if (digest === "md5" && typeof value.md5 === "string" && MD5_HEX.test(value.md5)) {
|
|
14145
|
+
return { digest, md5: value.md5, name, mediaType, bytes };
|
|
14146
|
+
}
|
|
14147
|
+
return null;
|
|
13497
14148
|
}
|
|
13498
14149
|
async function saveDescriptor(context, selector, objectId, property, file) {
|
|
13499
|
-
const bytes = new Uint8Array(readFileSync6(file));
|
|
13500
14150
|
const name = basename(file);
|
|
13501
14151
|
const settle2 = `openeng attachment get ${objectId} ${property} --project ${selector.projectId} --ref ${selector.ref}`;
|
|
13502
14152
|
const run2 = await runAuthenticated(context.host, context.deps, async (clients) => {
|
|
13503
14153
|
const object = await clients.objects.readObject({ selector, input: { objectId } });
|
|
13504
14154
|
if ("refusal" in object) return { outcome: outcomeOfEnvelope(object, settle2, (value2) => JSON.stringify(value2)) };
|
|
13505
14155
|
if (object.replayed === true) return { outcome: outcomeOfEnvelope(object, settle2, (value2) => JSON.stringify(value2)) };
|
|
13506
|
-
const
|
|
14156
|
+
const handle = await open(file, "r");
|
|
14157
|
+
const staged = await (async () => {
|
|
14158
|
+
try {
|
|
14159
|
+
const { size } = await handle.stat();
|
|
14160
|
+
return await clients.objects.uploadAttachment({ ...selector, objectId }, {
|
|
14161
|
+
name,
|
|
14162
|
+
size,
|
|
14163
|
+
read: async (offset, length) => {
|
|
14164
|
+
const bytes = new Uint8Array(length);
|
|
14165
|
+
let read = 0;
|
|
14166
|
+
while (read < length) {
|
|
14167
|
+
const { bytesRead } = await handle.read(bytes, read, length - read, offset + read);
|
|
14168
|
+
if (bytesRead === 0) throw new Error("the upload file ended before its declared size");
|
|
14169
|
+
read += bytesRead;
|
|
14170
|
+
}
|
|
14171
|
+
return bytes;
|
|
14172
|
+
}
|
|
14173
|
+
}, { onProgress: (committed, total) => context.note(`uploaded ${committed}/${total} bytes`) });
|
|
14174
|
+
} finally {
|
|
14175
|
+
await handle.close();
|
|
14176
|
+
}
|
|
14177
|
+
})();
|
|
13507
14178
|
if ("refusal" in staged) return { outcome: outcomeOfEnvelope(staged, settle2, (value2) => JSON.stringify(value2)) };
|
|
13508
14179
|
if (staged.replayed === true) return { outcome: outcomeOfEnvelope(staged, settle2, (value2) => JSON.stringify(value2)) };
|
|
13509
14180
|
const catalogue = await clients.objects.readCatalogue({ selector: { projectId: selector.projectId }, input: {} });
|
|
@@ -13590,16 +14261,42 @@ var attachmentGet = {
|
|
|
13590
14261
|
const answer = await clients.objects.readAttachment(selector, { objectId, property });
|
|
13591
14262
|
if ("refusal" in answer) return { outcome: outcomeOfEnvelope(answer, settle2, (value) => JSON.stringify(value)) };
|
|
13592
14263
|
if (answer.replayed === true) return { outcome: outcomeOfEnvelope(answer, settle2, (value) => JSON.stringify(value)) };
|
|
13593
|
-
const
|
|
13594
|
-
|
|
13595
|
-
const
|
|
13596
|
-
const
|
|
13597
|
-
|
|
13598
|
-
|
|
13599
|
-
|
|
13600
|
-
|
|
13601
|
-
|
|
13602
|
-
|
|
14264
|
+
const stored = answer.result.descriptor;
|
|
14265
|
+
const algorithm = stored.digest === "sha256" ? "SHA-256" : "MD5";
|
|
14266
|
+
const expected = stored.digest === "sha256" ? stored.sha256 : stored.md5;
|
|
14267
|
+
const hash = createHash3(stored.digest);
|
|
14268
|
+
const path = context.options.out ?? stored.name;
|
|
14269
|
+
const partial = `${path}.part`;
|
|
14270
|
+
const file = await open(partial, "w");
|
|
14271
|
+
let finished = false;
|
|
14272
|
+
try {
|
|
14273
|
+
let committed = 0;
|
|
14274
|
+
let failure2 = null;
|
|
14275
|
+
try {
|
|
14276
|
+
for await (const chunk of answer.result.body) {
|
|
14277
|
+
hash.update(chunk);
|
|
14278
|
+
await writeAll(file, chunk);
|
|
14279
|
+
committed += chunk.byteLength;
|
|
14280
|
+
context.note(`downloaded ${committed}/${stored.bytes} bytes`);
|
|
14281
|
+
}
|
|
14282
|
+
} catch (error) {
|
|
14283
|
+
failure2 = { error };
|
|
14284
|
+
}
|
|
14285
|
+
try {
|
|
14286
|
+
await file.close();
|
|
14287
|
+
} catch (error) {
|
|
14288
|
+
failure2 ??= { error };
|
|
14289
|
+
}
|
|
14290
|
+
if (failure2 !== null) throw failure2.error;
|
|
14291
|
+
if (hash.digest("hex") !== expected) {
|
|
14292
|
+
const outcome2 = { kind: "internal-failure", message: `the downloaded attachment did not match its descriptor's ${algorithm}` };
|
|
14293
|
+
return { outcome: outcome2 };
|
|
14294
|
+
}
|
|
14295
|
+
renameSync2(partial, path);
|
|
14296
|
+
finished = true;
|
|
14297
|
+
} finally {
|
|
14298
|
+
if (!finished) rmSync(partial, { force: true });
|
|
14299
|
+
}
|
|
13603
14300
|
const outcome = { kind: "success", value: { path }, text: path };
|
|
13604
14301
|
return { outcome };
|
|
13605
14302
|
});
|
|
@@ -13613,8 +14310,8 @@ function attachmentProperties(object, propertyDefinitions) {
|
|
|
13613
14310
|
const entries7 = Object.entries(propertyDefinitions).flatMap(([property, definition]) => {
|
|
13614
14311
|
if (!isRecord4(definition) || definition.kind !== "attachment") return [];
|
|
13615
14312
|
const stored = properties[property];
|
|
13616
|
-
|
|
13617
|
-
return [{ property, descriptor:
|
|
14313
|
+
const read = isRecord4(stored) ? wireDescriptor(stored.value) : null;
|
|
14314
|
+
return read === null ? [] : [{ property, descriptor: read }];
|
|
13618
14315
|
});
|
|
13619
14316
|
return { ok: true, entries: entries7 };
|
|
13620
14317
|
}
|
|
@@ -13680,12 +14377,30 @@ function boundText(bound) {
|
|
|
13680
14377
|
function boundsText(bounds) {
|
|
13681
14378
|
return "bounds" in bounds ? `${bounds.state}; ${bounds.bounds.map(boundText).join("; ")}` : bounds.state;
|
|
13682
14379
|
}
|
|
14380
|
+
var RESULT_LABELS = {
|
|
14381
|
+
current: "Current",
|
|
14382
|
+
stale: "Stale",
|
|
14383
|
+
"no-result": "No result",
|
|
14384
|
+
"not-visible": "Not visible",
|
|
14385
|
+
"too-many-links": "Too many links",
|
|
14386
|
+
nonRepeatable: "Non-repeatable"
|
|
14387
|
+
};
|
|
14388
|
+
function resultText(result) {
|
|
14389
|
+
const label = RESULT_LABELS[result.state];
|
|
14390
|
+
if (result.state === "current" || result.state === "stale") {
|
|
14391
|
+
const value = displayPropertyValue(result.value, { kind: "number", unit: result.unit });
|
|
14392
|
+
return `${label}${result.nonRepeatable ? `; ${RESULT_LABELS.nonRepeatable}` : ""}; ${value}; ${result.ref}`;
|
|
14393
|
+
}
|
|
14394
|
+
if (result.state === "no-result") return `${label}; ${result.key.componentId}; ${result.key.variable}; ${JSON.stringify(result.key.sweep)}`;
|
|
14395
|
+
return label;
|
|
14396
|
+
}
|
|
13683
14397
|
function statusText(answer) {
|
|
13684
14398
|
return [
|
|
13685
14399
|
`head: ${answer.head}`,
|
|
13686
14400
|
...answer.links.length === 0 ? ["no tracked links"] : answer.links.map((link2) => `${link2.linkId} (${link2.typeKey}) ${link2.upstream.projectId}/${link2.upstream.objectId} -> ${link2.downstream.projectId}/${link2.downstream.objectId}
|
|
13687
14401
|
review: ${link2.review.state}${"upstreamVersion" in link2.review ? `; version ${link2.review.upstreamVersion}` : ""}
|
|
13688
|
-
bounds: ${boundsText(link2.bounds)}` + (link2.
|
|
14402
|
+
bounds: ${boundsText(link2.bounds)}` + (link2.result === null ? "" : `
|
|
14403
|
+
Result: ${resultText(link2.result)}`) + (link2.clearing === null ? "" : `
|
|
13689
14404
|
cleared by ${link2.clearing.clearedBy} at ${link2.clearing.clearedAt}`)),
|
|
13690
14405
|
...answer.aggregates.map((bound) => `aggregate ${boundText(bound)}`)
|
|
13691
14406
|
].join("\n");
|
|
@@ -13792,7 +14507,7 @@ var branchesImpact = {
|
|
|
13792
14507
|
};
|
|
13793
14508
|
|
|
13794
14509
|
// packages/cli/src/commands/hosted-app.ts
|
|
13795
|
-
import { readFileSync as
|
|
14510
|
+
import { readFileSync as readFileSync6 } from "node:fs";
|
|
13796
14511
|
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.";
|
|
13797
14512
|
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.";
|
|
13798
14513
|
var ONE_WALL_WARNING = `${ONE_WALL_WARNING_LEAD}
|
|
@@ -13841,7 +14556,7 @@ var hostedAppPublish = {
|
|
|
13841
14556
|
if (isOutcome2(file)) return file;
|
|
13842
14557
|
const key = context.options.key;
|
|
13843
14558
|
if (key === void 0 || key === "") return invalid2(`openeng hosted-app publish needs --key <app key>; usage: ${usagePublish}`);
|
|
13844
|
-
const bytes = new Uint8Array(
|
|
14559
|
+
const bytes = new Uint8Array(readFileSync6(file));
|
|
13845
14560
|
const settle2 = `openeng hosted-app versions ${key} --project ${project}, which only reads; publish again only if the version is absent`;
|
|
13846
14561
|
const run2 = await runAuthenticated(context.host, context.deps, async (clients) => {
|
|
13847
14562
|
const found = await appOfKey(clients, project, key, settle2);
|
|
@@ -13966,7 +14681,7 @@ var loginCommand = {
|
|
|
13966
14681
|
help: [
|
|
13967
14682
|
"openeng login [--no-open]",
|
|
13968
14683
|
"does: signs the person in through the browser and stores the session; --no-open prints the sign-in address instead of opening it",
|
|
13969
|
-
"example: openeng login
|
|
14684
|
+
"example: openeng login",
|
|
13970
14685
|
"output: one line naming the principal, the host, the store and the expiry; under --json an object with principalId, hostKey, store and expiresAt",
|
|
13971
14686
|
...HOST_GUIDANCE
|
|
13972
14687
|
],
|
|
@@ -14075,7 +14790,7 @@ var PUBLIC_COMMANDS = [
|
|
|
14075
14790
|
|
|
14076
14791
|
// packages/cli/src/main.ts
|
|
14077
14792
|
import { spawn } from "node:child_process";
|
|
14078
|
-
import { readFileSync as
|
|
14793
|
+
import { readFileSync as readFileSync8 } from "node:fs";
|
|
14079
14794
|
import { homedir } from "node:os";
|
|
14080
14795
|
import { parseArgs } from "node:util";
|
|
14081
14796
|
|
|
@@ -14149,7 +14864,7 @@ var createTransport = (host) => host.kind === "unix" ? createHostFetch(host.sock
|
|
|
14149
14864
|
|
|
14150
14865
|
// packages/cli/src/update-check.ts
|
|
14151
14866
|
import { randomUUID as randomUUID7 } from "node:crypto";
|
|
14152
|
-
import { existsSync, mkdirSync as mkdirSync3, readFileSync as
|
|
14867
|
+
import { existsSync, mkdirSync as mkdirSync3, readFileSync as readFileSync7, renameSync as renameSync3, unlinkSync as unlinkSync3, writeFileSync } from "node:fs";
|
|
14153
14868
|
import { join as join4 } from "node:path";
|
|
14154
14869
|
function versionParts(value) {
|
|
14155
14870
|
if (typeof value !== "string" || !/^\d+\.\d+\.\d+$/.test(value)) {
|
|
@@ -14162,7 +14877,7 @@ function readCache(file) {
|
|
|
14162
14877
|
if (!existsSync(file)) {
|
|
14163
14878
|
return null;
|
|
14164
14879
|
}
|
|
14165
|
-
const value = JSON.parse(
|
|
14880
|
+
const value = JSON.parse(readFileSync7(file, "utf8"));
|
|
14166
14881
|
if (typeof value !== "object" || value === null || !("latest" in value) || !("checkedAt" in value)) {
|
|
14167
14882
|
return null;
|
|
14168
14883
|
}
|
|
@@ -14195,8 +14910,8 @@ function writeCache(directory, file, cache) {
|
|
|
14195
14910
|
mkdirSync3(directory, { recursive: true, mode: 448 });
|
|
14196
14911
|
const temporary = `${file}.${randomUUID7()}.tmp`;
|
|
14197
14912
|
try {
|
|
14198
|
-
|
|
14199
|
-
|
|
14913
|
+
writeFileSync(temporary, JSON.stringify(cache), { flag: "wx", mode: 384 });
|
|
14914
|
+
renameSync3(temporary, file);
|
|
14200
14915
|
} finally {
|
|
14201
14916
|
if (existsSync(temporary)) {
|
|
14202
14917
|
unlinkSync3(temporary);
|
|
@@ -14418,7 +15133,7 @@ ${usageLines(commands).join("\n")}` : unknownCommandMessage(commands, invocation
|
|
|
14418
15133
|
return { outcome: await command.run(invocation.words.slice(command.words.length)), json: options.json, scope: null };
|
|
14419
15134
|
}
|
|
14420
15135
|
const environment = readEnvironment();
|
|
14421
|
-
const parsedHost = parseHost(invocation.host
|
|
15136
|
+
const parsedHost = parseHost(resolveHostSetting(invocation.host, environment.OPENENG_HOST), invocation.signInOrigin ?? environment.OPENENG_SIGN_IN_ORIGIN);
|
|
14422
15137
|
if (!parsedHost.ok) {
|
|
14423
15138
|
return { outcome: outcomeOfHostRefusal(parsedHost.refusal), json: options.json, scope: null };
|
|
14424
15139
|
}
|
|
@@ -14460,7 +15175,7 @@ ${usageLines(commands).join("\n")}` : unknownCommandMessage(commands, invocation
|
|
|
14460
15175
|
deps,
|
|
14461
15176
|
options,
|
|
14462
15177
|
args: invocation.words.slice(command.words.length),
|
|
14463
|
-
readStandardInput: () =>
|
|
15178
|
+
readStandardInput: () => readFileSync8(0, "utf8"),
|
|
14464
15179
|
promptSecret,
|
|
14465
15180
|
writeLine: (line) => process.stdout.write(`${line}
|
|
14466
15181
|
`),
|