superbee 0.4.4-pre.5 → 0.4.4-pre.6
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/dist/superbee.mjs +669 -447
- package/package.json +1 -1
- package/references/author-an-integration.md +9 -0
package/dist/superbee.mjs
CHANGED
|
@@ -44,7 +44,7 @@ var __toESM = (mod, isNodeMode, target3) => (target3 = mod != null ? __create(__
|
|
|
44
44
|
var define_SUPERBEE_BUILD_IDENTITY_default;
|
|
45
45
|
var init_define_SUPERBEE_BUILD_IDENTITY = __esm({
|
|
46
46
|
"<define:__SUPERBEE_BUILD_IDENTITY__>"() {
|
|
47
|
-
define_SUPERBEE_BUILD_IDENTITY_default = { schema: "superbee.build-identity.v1", package: { name: "superbee", version: "0.4.4-pre.
|
|
47
|
+
define_SUPERBEE_BUILD_IDENTITY_default = { schema: "superbee.build-identity.v1", package: { name: "superbee", version: "0.4.4-pre.6" }, source: { commit: "688d62a2e1395a6ca7dde52f08e0caf97b643d60", dirty: false }, artifact: { channel: "npm-package" }, compatibility_contracts: { skill: 1, hook: 1, mcp: 1 } };
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
|
|
@@ -473,8 +473,8 @@ var require_null = __commonJS({
|
|
|
473
473
|
function constructYamlNull() {
|
|
474
474
|
return null;
|
|
475
475
|
}
|
|
476
|
-
function isNull(
|
|
477
|
-
return
|
|
476
|
+
function isNull(object13) {
|
|
477
|
+
return object13 === null;
|
|
478
478
|
}
|
|
479
479
|
module.exports = new Type("tag:yaml.org,2002:null", {
|
|
480
480
|
kind: "scalar",
|
|
@@ -515,8 +515,8 @@ var require_bool = __commonJS({
|
|
|
515
515
|
function constructYamlBoolean(data) {
|
|
516
516
|
return data === "true" || data === "True" || data === "TRUE";
|
|
517
517
|
}
|
|
518
|
-
function isBoolean(
|
|
519
|
-
return Object.prototype.toString.call(
|
|
518
|
+
function isBoolean(object13) {
|
|
519
|
+
return Object.prototype.toString.call(object13) === "[object Boolean]";
|
|
520
520
|
}
|
|
521
521
|
module.exports = new Type("tag:yaml.org,2002:bool", {
|
|
522
522
|
kind: "scalar",
|
|
@@ -524,14 +524,14 @@ var require_bool = __commonJS({
|
|
|
524
524
|
construct: constructYamlBoolean,
|
|
525
525
|
predicate: isBoolean,
|
|
526
526
|
represent: {
|
|
527
|
-
lowercase: function(
|
|
528
|
-
return
|
|
527
|
+
lowercase: function(object13) {
|
|
528
|
+
return object13 ? "true" : "false";
|
|
529
529
|
},
|
|
530
|
-
uppercase: function(
|
|
531
|
-
return
|
|
530
|
+
uppercase: function(object13) {
|
|
531
|
+
return object13 ? "TRUE" : "FALSE";
|
|
532
532
|
},
|
|
533
|
-
camelcase: function(
|
|
534
|
-
return
|
|
533
|
+
camelcase: function(object13) {
|
|
534
|
+
return object13 ? "True" : "False";
|
|
535
535
|
}
|
|
536
536
|
},
|
|
537
537
|
defaultStyle: "lowercase"
|
|
@@ -640,8 +640,8 @@ var require_int = __commonJS({
|
|
|
640
640
|
}
|
|
641
641
|
return sign * parseInt(value, 10);
|
|
642
642
|
}
|
|
643
|
-
function isInteger(
|
|
644
|
-
return Object.prototype.toString.call(
|
|
643
|
+
function isInteger(object13) {
|
|
644
|
+
return Object.prototype.toString.call(object13) === "[object Number]" && (object13 % 1 === 0 && !common.isNegativeZero(object13));
|
|
645
645
|
}
|
|
646
646
|
module.exports = new Type("tag:yaml.org,2002:int", {
|
|
647
647
|
kind: "scalar",
|
|
@@ -722,9 +722,9 @@ var require_float = __commonJS({
|
|
|
722
722
|
return sign * parseFloat(value, 10);
|
|
723
723
|
}
|
|
724
724
|
var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
|
|
725
|
-
function representYamlFloat(
|
|
725
|
+
function representYamlFloat(object13, style) {
|
|
726
726
|
var res;
|
|
727
|
-
if (isNaN(
|
|
727
|
+
if (isNaN(object13)) {
|
|
728
728
|
switch (style) {
|
|
729
729
|
case "lowercase":
|
|
730
730
|
return ".nan";
|
|
@@ -733,7 +733,7 @@ var require_float = __commonJS({
|
|
|
733
733
|
case "camelcase":
|
|
734
734
|
return ".NaN";
|
|
735
735
|
}
|
|
736
|
-
} else if (Number.POSITIVE_INFINITY ===
|
|
736
|
+
} else if (Number.POSITIVE_INFINITY === object13) {
|
|
737
737
|
switch (style) {
|
|
738
738
|
case "lowercase":
|
|
739
739
|
return ".inf";
|
|
@@ -742,7 +742,7 @@ var require_float = __commonJS({
|
|
|
742
742
|
case "camelcase":
|
|
743
743
|
return ".Inf";
|
|
744
744
|
}
|
|
745
|
-
} else if (Number.NEGATIVE_INFINITY ===
|
|
745
|
+
} else if (Number.NEGATIVE_INFINITY === object13) {
|
|
746
746
|
switch (style) {
|
|
747
747
|
case "lowercase":
|
|
748
748
|
return "-.inf";
|
|
@@ -751,14 +751,14 @@ var require_float = __commonJS({
|
|
|
751
751
|
case "camelcase":
|
|
752
752
|
return "-.Inf";
|
|
753
753
|
}
|
|
754
|
-
} else if (common.isNegativeZero(
|
|
754
|
+
} else if (common.isNegativeZero(object13)) {
|
|
755
755
|
return "-0.0";
|
|
756
756
|
}
|
|
757
|
-
res =
|
|
757
|
+
res = object13.toString(10);
|
|
758
758
|
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
|
|
759
759
|
}
|
|
760
|
-
function isFloat(
|
|
761
|
-
return Object.prototype.toString.call(
|
|
760
|
+
function isFloat(object13) {
|
|
761
|
+
return Object.prototype.toString.call(object13) === "[object Number]" && (object13 % 1 !== 0 || common.isNegativeZero(object13));
|
|
762
762
|
}
|
|
763
763
|
module.exports = new Type("tag:yaml.org,2002:float", {
|
|
764
764
|
kind: "scalar",
|
|
@@ -857,8 +857,8 @@ var require_timestamp = __commonJS({
|
|
|
857
857
|
if (delta) date5.setTime(date5.getTime() - delta);
|
|
858
858
|
return date5;
|
|
859
859
|
}
|
|
860
|
-
function representYamlTimestamp(
|
|
861
|
-
return
|
|
860
|
+
function representYamlTimestamp(object13) {
|
|
861
|
+
return object13.toISOString();
|
|
862
862
|
}
|
|
863
863
|
module.exports = new Type("tag:yaml.org,2002:timestamp", {
|
|
864
864
|
kind: "scalar",
|
|
@@ -939,8 +939,8 @@ var require_binary = __commonJS({
|
|
|
939
939
|
}
|
|
940
940
|
return result3;
|
|
941
941
|
}
|
|
942
|
-
function representYamlBinary(
|
|
943
|
-
var result3 = "", bits = 0, idx, tail, max =
|
|
942
|
+
function representYamlBinary(object13) {
|
|
943
|
+
var result3 = "", bits = 0, idx, tail, max = object13.length, map2 = BASE64_MAP;
|
|
944
944
|
for (idx = 0; idx < max; idx++) {
|
|
945
945
|
if (idx % 3 === 0 && idx) {
|
|
946
946
|
result3 += map2[bits >> 18 & 63];
|
|
@@ -948,7 +948,7 @@ var require_binary = __commonJS({
|
|
|
948
948
|
result3 += map2[bits >> 6 & 63];
|
|
949
949
|
result3 += map2[bits & 63];
|
|
950
950
|
}
|
|
951
|
-
bits = (bits << 8) +
|
|
951
|
+
bits = (bits << 8) + object13[idx];
|
|
952
952
|
}
|
|
953
953
|
tail = max % 3;
|
|
954
954
|
if (tail === 0) {
|
|
@@ -969,8 +969,8 @@ var require_binary = __commonJS({
|
|
|
969
969
|
}
|
|
970
970
|
return result3;
|
|
971
971
|
}
|
|
972
|
-
function isBinary(
|
|
973
|
-
return NodeBuffer && NodeBuffer.isBuffer(
|
|
972
|
+
function isBinary(object13) {
|
|
973
|
+
return NodeBuffer && NodeBuffer.isBuffer(object13);
|
|
974
974
|
}
|
|
975
975
|
module.exports = new Type("tag:yaml.org,2002:binary", {
|
|
976
976
|
kind: "scalar",
|
|
@@ -993,9 +993,9 @@ var require_omap = __commonJS({
|
|
|
993
993
|
var _toString = Object.prototype.toString;
|
|
994
994
|
function resolveYamlOmap(data) {
|
|
995
995
|
if (data === null) return true;
|
|
996
|
-
var objectKeys = {}, index2, length, pair, pairKey, pairHasKey,
|
|
997
|
-
for (index2 = 0, length =
|
|
998
|
-
pair =
|
|
996
|
+
var objectKeys = {}, index2, length, pair, pairKey, pairHasKey, object13 = data;
|
|
997
|
+
for (index2 = 0, length = object13.length; index2 < length; index2 += 1) {
|
|
998
|
+
pair = object13[index2];
|
|
999
999
|
pairHasKey = false;
|
|
1000
1000
|
if (_toString.call(pair) !== "[object Object]") return false;
|
|
1001
1001
|
for (pairKey in pair) {
|
|
@@ -1031,10 +1031,10 @@ var require_pairs = __commonJS({
|
|
|
1031
1031
|
var _toString = Object.prototype.toString;
|
|
1032
1032
|
function resolveYamlPairs(data) {
|
|
1033
1033
|
if (data === null) return true;
|
|
1034
|
-
var index2, length, pair, keys2, result3,
|
|
1035
|
-
result3 = new Array(
|
|
1036
|
-
for (index2 = 0, length =
|
|
1037
|
-
pair =
|
|
1034
|
+
var index2, length, pair, keys2, result3, object13 = data;
|
|
1035
|
+
result3 = new Array(object13.length);
|
|
1036
|
+
for (index2 = 0, length = object13.length; index2 < length; index2 += 1) {
|
|
1037
|
+
pair = object13[index2];
|
|
1038
1038
|
if (_toString.call(pair) !== "[object Object]") return false;
|
|
1039
1039
|
keys2 = Object.keys(pair);
|
|
1040
1040
|
if (keys2.length !== 1) return false;
|
|
@@ -1044,10 +1044,10 @@ var require_pairs = __commonJS({
|
|
|
1044
1044
|
}
|
|
1045
1045
|
function constructYamlPairs(data) {
|
|
1046
1046
|
if (data === null) return [];
|
|
1047
|
-
var index2, length, pair, keys2, result3,
|
|
1048
|
-
result3 = new Array(
|
|
1049
|
-
for (index2 = 0, length =
|
|
1050
|
-
pair =
|
|
1047
|
+
var index2, length, pair, keys2, result3, object13 = data;
|
|
1048
|
+
result3 = new Array(object13.length);
|
|
1049
|
+
for (index2 = 0, length = object13.length; index2 < length; index2 += 1) {
|
|
1050
|
+
pair = object13[index2];
|
|
1051
1051
|
keys2 = Object.keys(pair);
|
|
1052
1052
|
result3[index2] = [keys2[0], pair[keys2[0]]];
|
|
1053
1053
|
}
|
|
@@ -1071,10 +1071,10 @@ var require_set = __commonJS({
|
|
|
1071
1071
|
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1072
1072
|
function resolveYamlSet(data) {
|
|
1073
1073
|
if (data === null) return true;
|
|
1074
|
-
var key4,
|
|
1075
|
-
for (key4 in
|
|
1076
|
-
if (_hasOwnProperty.call(
|
|
1077
|
-
if (
|
|
1074
|
+
var key4, object13 = data;
|
|
1075
|
+
for (key4 in object13) {
|
|
1076
|
+
if (_hasOwnProperty.call(object13, key4)) {
|
|
1077
|
+
if (object13[key4] !== null) return false;
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
1080
|
return true;
|
|
@@ -1131,8 +1131,8 @@ var require_undefined = __commonJS({
|
|
|
1131
1131
|
function representJavascriptUndefined() {
|
|
1132
1132
|
return "";
|
|
1133
1133
|
}
|
|
1134
|
-
function isUndefined(
|
|
1135
|
-
return typeof
|
|
1134
|
+
function isUndefined(object13) {
|
|
1135
|
+
return typeof object13 === "undefined";
|
|
1136
1136
|
}
|
|
1137
1137
|
module.exports = new Type("tag:yaml.org,2002:js/undefined", {
|
|
1138
1138
|
kind: "scalar",
|
|
@@ -1170,15 +1170,15 @@ var require_regexp = __commonJS({
|
|
|
1170
1170
|
}
|
|
1171
1171
|
return new RegExp(regexp, modifiers);
|
|
1172
1172
|
}
|
|
1173
|
-
function representJavascriptRegExp(
|
|
1174
|
-
var result3 = "/" +
|
|
1175
|
-
if (
|
|
1176
|
-
if (
|
|
1177
|
-
if (
|
|
1173
|
+
function representJavascriptRegExp(object13) {
|
|
1174
|
+
var result3 = "/" + object13.source + "/";
|
|
1175
|
+
if (object13.global) result3 += "g";
|
|
1176
|
+
if (object13.multiline) result3 += "m";
|
|
1177
|
+
if (object13.ignoreCase) result3 += "i";
|
|
1178
1178
|
return result3;
|
|
1179
1179
|
}
|
|
1180
|
-
function isRegExp(
|
|
1181
|
-
return Object.prototype.toString.call(
|
|
1180
|
+
function isRegExp(object13) {
|
|
1181
|
+
return Object.prototype.toString.call(object13) === "[object RegExp]";
|
|
1182
1182
|
}
|
|
1183
1183
|
module.exports = new Type("tag:yaml.org,2002:js/regexp", {
|
|
1184
1184
|
kind: "scalar",
|
|
@@ -1231,11 +1231,11 @@ var require_function = __commonJS({
|
|
|
1231
1231
|
}
|
|
1232
1232
|
return new Function(params, "return " + source2.slice(body[0], body[1]));
|
|
1233
1233
|
}
|
|
1234
|
-
function representJavascriptFunction(
|
|
1235
|
-
return
|
|
1234
|
+
function representJavascriptFunction(object13) {
|
|
1235
|
+
return object13.toString();
|
|
1236
1236
|
}
|
|
1237
|
-
function isFunction(
|
|
1238
|
-
return Object.prototype.toString.call(
|
|
1237
|
+
function isFunction(object13) {
|
|
1238
|
+
return Object.prototype.toString.call(object13) === "[object Function]";
|
|
1239
1239
|
}
|
|
1240
1240
|
module.exports = new Type("tag:yaml.org,2002:js/function", {
|
|
1241
1241
|
kind: "scalar",
|
|
@@ -1347,16 +1347,16 @@ var require_loader = __commonJS({
|
|
|
1347
1347
|
(c - 65536 & 1023) + 56320
|
|
1348
1348
|
);
|
|
1349
1349
|
}
|
|
1350
|
-
function setProperty2(
|
|
1350
|
+
function setProperty2(object13, key4, value) {
|
|
1351
1351
|
if (key4 === "__proto__") {
|
|
1352
|
-
Object.defineProperty(
|
|
1352
|
+
Object.defineProperty(object13, key4, {
|
|
1353
1353
|
configurable: true,
|
|
1354
1354
|
enumerable: true,
|
|
1355
1355
|
writable: true,
|
|
1356
1356
|
value
|
|
1357
1357
|
});
|
|
1358
1358
|
} else {
|
|
1359
|
-
|
|
1359
|
+
object13[key4] = value;
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
1362
|
var simpleEscapeCheck = new Array(256);
|
|
@@ -2723,10 +2723,10 @@ var require_dumper = __commonJS({
|
|
|
2723
2723
|
}
|
|
2724
2724
|
return result3;
|
|
2725
2725
|
}
|
|
2726
|
-
function writeFlowSequence(state, level2,
|
|
2726
|
+
function writeFlowSequence(state, level2, object13) {
|
|
2727
2727
|
var _result = "", _tag = state.tag, index2, length;
|
|
2728
|
-
for (index2 = 0, length =
|
|
2729
|
-
if (writeNode(state, level2,
|
|
2728
|
+
for (index2 = 0, length = object13.length; index2 < length; index2 += 1) {
|
|
2729
|
+
if (writeNode(state, level2, object13[index2], false, false)) {
|
|
2730
2730
|
if (index2 !== 0) _result += "," + (!state.condenseFlow ? " " : "");
|
|
2731
2731
|
_result += state.dump;
|
|
2732
2732
|
}
|
|
@@ -2734,10 +2734,10 @@ var require_dumper = __commonJS({
|
|
|
2734
2734
|
state.tag = _tag;
|
|
2735
2735
|
state.dump = "[" + _result + "]";
|
|
2736
2736
|
}
|
|
2737
|
-
function writeBlockSequence(state, level2,
|
|
2737
|
+
function writeBlockSequence(state, level2, object13, compact) {
|
|
2738
2738
|
var _result = "", _tag = state.tag, index2, length;
|
|
2739
|
-
for (index2 = 0, length =
|
|
2740
|
-
if (writeNode(state, level2 + 1,
|
|
2739
|
+
for (index2 = 0, length = object13.length; index2 < length; index2 += 1) {
|
|
2740
|
+
if (writeNode(state, level2 + 1, object13[index2], true, true)) {
|
|
2741
2741
|
if (!compact || index2 !== 0) {
|
|
2742
2742
|
_result += generateNextLine(state, level2);
|
|
2743
2743
|
}
|
|
@@ -2752,14 +2752,14 @@ var require_dumper = __commonJS({
|
|
|
2752
2752
|
state.tag = _tag;
|
|
2753
2753
|
state.dump = _result || "[]";
|
|
2754
2754
|
}
|
|
2755
|
-
function writeFlowMapping(state, level2,
|
|
2756
|
-
var _result = "", _tag = state.tag, objectKeyList = Object.keys(
|
|
2755
|
+
function writeFlowMapping(state, level2, object13) {
|
|
2756
|
+
var _result = "", _tag = state.tag, objectKeyList = Object.keys(object13), index2, length, objectKey, objectValue, pairBuffer;
|
|
2757
2757
|
for (index2 = 0, length = objectKeyList.length; index2 < length; index2 += 1) {
|
|
2758
2758
|
pairBuffer = "";
|
|
2759
2759
|
if (index2 !== 0) pairBuffer += ", ";
|
|
2760
2760
|
if (state.condenseFlow) pairBuffer += '"';
|
|
2761
2761
|
objectKey = objectKeyList[index2];
|
|
2762
|
-
objectValue =
|
|
2762
|
+
objectValue = object13[objectKey];
|
|
2763
2763
|
if (!writeNode(state, level2, objectKey, false, false)) {
|
|
2764
2764
|
continue;
|
|
2765
2765
|
}
|
|
@@ -2774,8 +2774,8 @@ var require_dumper = __commonJS({
|
|
|
2774
2774
|
state.tag = _tag;
|
|
2775
2775
|
state.dump = "{" + _result + "}";
|
|
2776
2776
|
}
|
|
2777
|
-
function writeBlockMapping(state, level2,
|
|
2778
|
-
var _result = "", _tag = state.tag, objectKeyList = Object.keys(
|
|
2777
|
+
function writeBlockMapping(state, level2, object13, compact) {
|
|
2778
|
+
var _result = "", _tag = state.tag, objectKeyList = Object.keys(object13), index2, length, objectKey, objectValue, explicitPair, pairBuffer;
|
|
2779
2779
|
if (state.sortKeys === true) {
|
|
2780
2780
|
objectKeyList.sort();
|
|
2781
2781
|
} else if (typeof state.sortKeys === "function") {
|
|
@@ -2789,7 +2789,7 @@ var require_dumper = __commonJS({
|
|
|
2789
2789
|
pairBuffer += generateNextLine(state, level2);
|
|
2790
2790
|
}
|
|
2791
2791
|
objectKey = objectKeyList[index2];
|
|
2792
|
-
objectValue =
|
|
2792
|
+
objectValue = object13[objectKey];
|
|
2793
2793
|
if (!writeNode(state, level2 + 1, objectKey, true, true, true)) {
|
|
2794
2794
|
continue;
|
|
2795
2795
|
}
|
|
@@ -2819,19 +2819,19 @@ var require_dumper = __commonJS({
|
|
|
2819
2819
|
state.tag = _tag;
|
|
2820
2820
|
state.dump = _result || "{}";
|
|
2821
2821
|
}
|
|
2822
|
-
function detectType(state,
|
|
2822
|
+
function detectType(state, object13, explicit) {
|
|
2823
2823
|
var _result, typeList, index2, length, type, style;
|
|
2824
2824
|
typeList = explicit ? state.explicitTypes : state.implicitTypes;
|
|
2825
2825
|
for (index2 = 0, length = typeList.length; index2 < length; index2 += 1) {
|
|
2826
2826
|
type = typeList[index2];
|
|
2827
|
-
if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof
|
|
2827
|
+
if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object13 === "object" && object13 instanceof type.instanceOf) && (!type.predicate || type.predicate(object13))) {
|
|
2828
2828
|
state.tag = explicit ? type.tag : "?";
|
|
2829
2829
|
if (type.represent) {
|
|
2830
2830
|
style = state.styleMap[type.tag] || type.defaultStyle;
|
|
2831
2831
|
if (_toString.call(type.represent) === "[object Function]") {
|
|
2832
|
-
_result = type.represent(
|
|
2832
|
+
_result = type.represent(object13, style);
|
|
2833
2833
|
} else if (_hasOwnProperty.call(type.represent, style)) {
|
|
2834
|
-
_result = type.represent[style](
|
|
2834
|
+
_result = type.represent[style](object13, style);
|
|
2835
2835
|
} else {
|
|
2836
2836
|
throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style');
|
|
2837
2837
|
}
|
|
@@ -2842,11 +2842,11 @@ var require_dumper = __commonJS({
|
|
|
2842
2842
|
}
|
|
2843
2843
|
return false;
|
|
2844
2844
|
}
|
|
2845
|
-
function writeNode(state, level2,
|
|
2845
|
+
function writeNode(state, level2, object13, block, compact, iskey) {
|
|
2846
2846
|
state.tag = null;
|
|
2847
|
-
state.dump =
|
|
2848
|
-
if (!detectType(state,
|
|
2849
|
-
detectType(state,
|
|
2847
|
+
state.dump = object13;
|
|
2848
|
+
if (!detectType(state, object13, false)) {
|
|
2849
|
+
detectType(state, object13, true);
|
|
2850
2850
|
}
|
|
2851
2851
|
var type = _toString.call(state.dump);
|
|
2852
2852
|
if (block) {
|
|
@@ -2854,7 +2854,7 @@ var require_dumper = __commonJS({
|
|
|
2854
2854
|
}
|
|
2855
2855
|
var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate;
|
|
2856
2856
|
if (objectOrArray) {
|
|
2857
|
-
duplicateIndex = state.duplicates.indexOf(
|
|
2857
|
+
duplicateIndex = state.duplicates.indexOf(object13);
|
|
2858
2858
|
duplicate = duplicateIndex !== -1;
|
|
2859
2859
|
}
|
|
2860
2860
|
if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level2 > 0) {
|
|
@@ -2905,32 +2905,32 @@ var require_dumper = __commonJS({
|
|
|
2905
2905
|
}
|
|
2906
2906
|
return true;
|
|
2907
2907
|
}
|
|
2908
|
-
function getDuplicateReferences(
|
|
2908
|
+
function getDuplicateReferences(object13, state) {
|
|
2909
2909
|
var objects = [], duplicatesIndexes = [], index2, length;
|
|
2910
|
-
inspectNode(
|
|
2910
|
+
inspectNode(object13, objects, duplicatesIndexes);
|
|
2911
2911
|
for (index2 = 0, length = duplicatesIndexes.length; index2 < length; index2 += 1) {
|
|
2912
2912
|
state.duplicates.push(objects[duplicatesIndexes[index2]]);
|
|
2913
2913
|
}
|
|
2914
2914
|
state.usedDuplicates = new Array(length);
|
|
2915
2915
|
}
|
|
2916
|
-
function inspectNode(
|
|
2916
|
+
function inspectNode(object13, objects, duplicatesIndexes) {
|
|
2917
2917
|
var objectKeyList, index2, length;
|
|
2918
|
-
if (
|
|
2919
|
-
index2 = objects.indexOf(
|
|
2918
|
+
if (object13 !== null && typeof object13 === "object") {
|
|
2919
|
+
index2 = objects.indexOf(object13);
|
|
2920
2920
|
if (index2 !== -1) {
|
|
2921
2921
|
if (duplicatesIndexes.indexOf(index2) === -1) {
|
|
2922
2922
|
duplicatesIndexes.push(index2);
|
|
2923
2923
|
}
|
|
2924
2924
|
} else {
|
|
2925
|
-
objects.push(
|
|
2926
|
-
if (Array.isArray(
|
|
2927
|
-
for (index2 = 0, length =
|
|
2928
|
-
inspectNode(
|
|
2925
|
+
objects.push(object13);
|
|
2926
|
+
if (Array.isArray(object13)) {
|
|
2927
|
+
for (index2 = 0, length = object13.length; index2 < length; index2 += 1) {
|
|
2928
|
+
inspectNode(object13[index2], objects, duplicatesIndexes);
|
|
2929
2929
|
}
|
|
2930
2930
|
} else {
|
|
2931
|
-
objectKeyList = Object.keys(
|
|
2931
|
+
objectKeyList = Object.keys(object13);
|
|
2932
2932
|
for (index2 = 0, length = objectKeyList.length; index2 < length; index2 += 1) {
|
|
2933
|
-
inspectNode(
|
|
2933
|
+
inspectNode(object13[objectKeyList[index2]], objects, duplicatesIndexes);
|
|
2934
2934
|
}
|
|
2935
2935
|
}
|
|
2936
2936
|
}
|
|
@@ -11980,8 +11980,8 @@ function isStandardDocumentSetField(field, okfVersion) {
|
|
|
11980
11980
|
function record2(value) {
|
|
11981
11981
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
11982
11982
|
}
|
|
11983
|
-
function has(
|
|
11984
|
-
return Object.prototype.hasOwnProperty.call(
|
|
11983
|
+
function has(object13, key4) {
|
|
11984
|
+
return Object.prototype.hasOwnProperty.call(object13, key4);
|
|
11985
11985
|
}
|
|
11986
11986
|
function sourceCandidates(rows) {
|
|
11987
11987
|
return {
|
|
@@ -12667,6 +12667,9 @@ function resolvePersistActor(opts) {
|
|
|
12667
12667
|
return opts.persistActor ?? opts.actor !== void 0;
|
|
12668
12668
|
}
|
|
12669
12669
|
async function mutateDocument(opts) {
|
|
12670
|
+
if (opts.requestId !== void 0 && (opts.mode !== "create-only" || typeof opts.requestId !== "string" || !isRequestIdentity(opts.requestId))) {
|
|
12671
|
+
throw new InvalidInputError("requestId requires create-only mode and a valid request identity.");
|
|
12672
|
+
}
|
|
12670
12673
|
if (opts.expectedVersion !== void 0 && opts.mode !== "patch" && opts.mode !== "replace-document") {
|
|
12671
12674
|
throw new InvalidInputError("expectedVersion requires patch or replace-document mode.");
|
|
12672
12675
|
}
|
|
@@ -12772,6 +12775,7 @@ async function mutateDocument(opts) {
|
|
|
12772
12775
|
const { candidate, warnings } = await prepare(void 0, decisionNow);
|
|
12773
12776
|
const { doc: doc2, version: version5 } = await writeDocVersionedForEdition2(opts.bundle, { id: opts.id, ...candidate }, okfVersion, {
|
|
12774
12777
|
expectedVersion: null,
|
|
12778
|
+
...opts.requestId !== void 0 ? { requestId: opts.requestId } : {},
|
|
12775
12779
|
actor: opts.actor,
|
|
12776
12780
|
bodyReplace: opts.bodyReplace
|
|
12777
12781
|
});
|
|
@@ -12867,6 +12871,7 @@ var init_document_mutation = __esm({
|
|
|
12867
12871
|
init_kind_field_mutation();
|
|
12868
12872
|
init_verification();
|
|
12869
12873
|
init_okf_authored_values();
|
|
12874
|
+
init_uncertain_write();
|
|
12870
12875
|
init_errors();
|
|
12871
12876
|
init_kind_deprecation();
|
|
12872
12877
|
init_kind_conformance_error();
|
|
@@ -17944,13 +17949,13 @@ function formatObjectValue(value, previouslySeenValues) {
|
|
|
17944
17949
|
function isJSONable(value) {
|
|
17945
17950
|
return typeof value.toJSON === "function";
|
|
17946
17951
|
}
|
|
17947
|
-
function formatObject(
|
|
17948
|
-
const entries = Object.entries(
|
|
17952
|
+
function formatObject(object13, seenValues) {
|
|
17953
|
+
const entries = Object.entries(object13);
|
|
17949
17954
|
if (entries.length === 0) {
|
|
17950
17955
|
return "{}";
|
|
17951
17956
|
}
|
|
17952
17957
|
if (seenValues.length > MAX_RECURSIVE_DEPTH) {
|
|
17953
|
-
return "[" + getObjectTag(
|
|
17958
|
+
return "[" + getObjectTag(object13) + "]";
|
|
17954
17959
|
}
|
|
17955
17960
|
const properties = entries.map(([key4, value]) => key4 + ": " + formatValue(value, seenValues));
|
|
17956
17961
|
return "{ " + properties.join(", ") + " }";
|
|
@@ -17975,10 +17980,10 @@ function formatArray(array2, seenValues) {
|
|
|
17975
17980
|
}
|
|
17976
17981
|
return "[" + items.join(", ") + "]";
|
|
17977
17982
|
}
|
|
17978
|
-
function getObjectTag(
|
|
17979
|
-
const tag = Object.prototype.toString.call(
|
|
17980
|
-
if (tag === "Object" && typeof
|
|
17981
|
-
const name =
|
|
17983
|
+
function getObjectTag(object13) {
|
|
17984
|
+
const tag = Object.prototype.toString.call(object13).replace(/^\[object /, "").replace(/]$/, "");
|
|
17985
|
+
if (tag === "Object" && typeof object13.constructor === "function") {
|
|
17986
|
+
const name = object13.constructor.name;
|
|
17982
17987
|
if (typeof name === "string" && name !== "") {
|
|
17983
17988
|
return name;
|
|
17984
17989
|
}
|
|
@@ -30028,21 +30033,70 @@ var init_guard = __esm({
|
|
|
30028
30033
|
}
|
|
30029
30034
|
});
|
|
30030
30035
|
|
|
30036
|
+
// ../core/src/source-engine/target-descriptor.ts
|
|
30037
|
+
function isSourceEstablishment(v) {
|
|
30038
|
+
if (!object2(v) || v.contract !== 1 || ![v.generation, v.group, v.target, v.observed_at].every((x) => typeof x === "string" && x.length > 0)) return false;
|
|
30039
|
+
try {
|
|
30040
|
+
assertSafeConceptId(v.target);
|
|
30041
|
+
} catch {
|
|
30042
|
+
return false;
|
|
30043
|
+
}
|
|
30044
|
+
if (v.kind === "adopt") return typeof v.expectedVersion === "string" && v.expectedVersion.length > 0 && v.intent === void 0;
|
|
30045
|
+
if (v.kind !== "create" || v.expectedVersion !== null || !object2(v.intent)) return false;
|
|
30046
|
+
const i = v.intent;
|
|
30047
|
+
return typeof i.requestId === "string" && isRequestIdentity(i.requestId) && i.kind === "document.write" && i.target === v.target && i.base === null && i.recreates === void 0 && typeof i.content === "string" && new TextEncoder().encode(JSON.stringify(i)).length <= 262144 && i.local === `sha256:${sha256Hex(i.content)}` && i.createdAt === v.observed_at && i.attempts === 0 && i.state === "pending";
|
|
30048
|
+
}
|
|
30049
|
+
var object2;
|
|
30050
|
+
var init_target_descriptor = __esm({
|
|
30051
|
+
"../core/src/source-engine/target-descriptor.ts"() {
|
|
30052
|
+
"use strict";
|
|
30053
|
+
init_define_SUPERBEE_BUILD_IDENTITY();
|
|
30054
|
+
init_define_SUPERBEE_UPDATE_POLICY();
|
|
30055
|
+
init_paths();
|
|
30056
|
+
init_uncertain_write();
|
|
30057
|
+
init_versioning();
|
|
30058
|
+
object2 = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
30059
|
+
}
|
|
30060
|
+
});
|
|
30061
|
+
|
|
30031
30062
|
// ../core/src/source-engine/machine-state.ts
|
|
30063
|
+
function hasProtectedSourcePending(state) {
|
|
30064
|
+
return state.pending_commit !== void 0 || Object.values(state.pending ?? {}).some((p) => p.establishment !== void 0);
|
|
30065
|
+
}
|
|
30066
|
+
function pendingCommitValid(state) {
|
|
30067
|
+
const context3 = state.pending_commit;
|
|
30068
|
+
if (context3 === void 0) return true;
|
|
30069
|
+
if (!record8(context3) || Object.keys(context3).some((k) => !["v", "order", "page", "baseline", "complete"].includes(k)) || context3.v !== 1 || !Array.isArray(context3.order) || context3.order.length < 1 || context3.order.length > 100 || !context3.order.every(scalarId) || new Set(context3.order).size !== context3.order.length || !Number.isSafeInteger(context3.page) || context3.page < 1 || typeof context3.baseline !== "boolean" || typeof context3.complete !== "boolean" || !record8(state.pending) || Object.keys(state.pending).length !== context3.order.length) return false;
|
|
30070
|
+
let at;
|
|
30071
|
+
for (const id of context3.order) {
|
|
30072
|
+
if (!Object.hasOwn(state.pending, id)) return false;
|
|
30073
|
+
const pending = state.pending[id];
|
|
30074
|
+
if (!record8(pending) || typeof pending.held_at !== "string" || parseIsoInstant(pending.held_at) === null || at !== void 0 && pending.held_at !== at) return false;
|
|
30075
|
+
if (pending.establishment !== void 0 && (!isSourceEstablishment(pending.establishment) || pending.establishment.observed_at !== pending.held_at)) return false;
|
|
30076
|
+
at = pending.held_at;
|
|
30077
|
+
}
|
|
30078
|
+
try {
|
|
30079
|
+
return new TextEncoder().encode(JSON.stringify(state)).length <= 4194304;
|
|
30080
|
+
} catch {
|
|
30081
|
+
return false;
|
|
30082
|
+
}
|
|
30083
|
+
}
|
|
30032
30084
|
function isSourceState(value) {
|
|
30033
30085
|
if (!record8(value) || value.v !== 1 || typeof value.open !== "boolean" || !record8(value.records)) return false;
|
|
30034
30086
|
if (!record8(value.profile) || typeof value.profile.id !== "string" || !Number.isInteger(value.profile.version)) return false;
|
|
30035
30087
|
if (!Number.isInteger(value.complete_observations)) return false;
|
|
30036
30088
|
if (value.validators !== void 0 && !record8(value.validators)) return false;
|
|
30037
|
-
if (value.pending !== void 0 && !(record8(value.pending) && Object.entries(value.pending).every(([id, pending]) => record8(pending) && isEntry(pending.entry) && typeof pending.held_at === "string" && record8(pending.change) && pending.change.external_id === id && typeof pending.change.change_kind === "string"))) return false;
|
|
30038
|
-
return Object.values(value.records).every(isEntry);
|
|
30089
|
+
if (value.pending !== void 0 && !(record8(value.pending) && Object.entries(value.pending).every(([id, pending]) => record8(pending) && isEntry(pending.entry) && typeof pending.held_at === "string" && record8(pending.change) && pending.change.external_id === id && typeof pending.change.change_kind === "string" && (pending.establishment === void 0 || isSourceEstablishment(pending.establishment))))) return false;
|
|
30090
|
+
return Object.values(value.records).every(isEntry) && pendingCommitValid(value);
|
|
30039
30091
|
}
|
|
30040
|
-
var MachineStateConflict, MemoryMachineState, record8, isEntry;
|
|
30092
|
+
var MachineStateConflict, MemoryMachineState, record8, isEntry, scalarId;
|
|
30041
30093
|
var init_machine_state = __esm({
|
|
30042
30094
|
"../core/src/source-engine/machine-state.ts"() {
|
|
30043
30095
|
"use strict";
|
|
30044
30096
|
init_define_SUPERBEE_BUILD_IDENTITY();
|
|
30045
30097
|
init_define_SUPERBEE_UPDATE_POLICY();
|
|
30098
|
+
init_verification();
|
|
30099
|
+
init_target_descriptor();
|
|
30046
30100
|
MachineStateConflict = class extends Error {
|
|
30047
30101
|
code = "MACHINE_STATE_CONFLICT";
|
|
30048
30102
|
constructor(key4) {
|
|
@@ -30071,6 +30125,36 @@ var init_machine_state = __esm({
|
|
|
30071
30125
|
};
|
|
30072
30126
|
record8 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
30073
30127
|
isEntry = (entry) => record8(entry) && record8(entry.after) && typeof entry.digest === "string" && Number.isInteger(entry.missing) && typeof entry.seen_at === "string";
|
|
30128
|
+
scalarId = (id) => typeof id === "string" && id.length > 0 && !/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/u.test(id);
|
|
30129
|
+
}
|
|
30130
|
+
});
|
|
30131
|
+
|
|
30132
|
+
// ../core/src/document-codec.ts
|
|
30133
|
+
var init_document_codec = __esm({
|
|
30134
|
+
"../core/src/document-codec.ts"() {
|
|
30135
|
+
"use strict";
|
|
30136
|
+
init_define_SUPERBEE_BUILD_IDENTITY();
|
|
30137
|
+
init_define_SUPERBEE_UPDATE_POLICY();
|
|
30138
|
+
init_frontmatter();
|
|
30139
|
+
init_remote_document_codec();
|
|
30140
|
+
}
|
|
30141
|
+
});
|
|
30142
|
+
|
|
30143
|
+
// ../core/src/source-engine/target-consumer.ts
|
|
30144
|
+
function isSourceTargetConsumer(prepare, commit) {
|
|
30145
|
+
return prepare !== void 0 && owners.get(commit)?.prepare === prepare;
|
|
30146
|
+
}
|
|
30147
|
+
function discardSourceTargetConsumer(prepare, commit) {
|
|
30148
|
+
const owner = owners.get(commit);
|
|
30149
|
+
if (prepare !== void 0 && owner?.prepare === prepare) owner.discard();
|
|
30150
|
+
}
|
|
30151
|
+
var owners;
|
|
30152
|
+
var init_target_consumer = __esm({
|
|
30153
|
+
"../core/src/source-engine/target-consumer.ts"() {
|
|
30154
|
+
"use strict";
|
|
30155
|
+
init_define_SUPERBEE_BUILD_IDENTITY();
|
|
30156
|
+
init_define_SUPERBEE_UPDATE_POLICY();
|
|
30157
|
+
owners = /* @__PURE__ */ new WeakMap();
|
|
30074
30158
|
}
|
|
30075
30159
|
});
|
|
30076
30160
|
|
|
@@ -30119,7 +30203,7 @@ function diffPage(state, page, bound2, observedAt) {
|
|
|
30119
30203
|
const changes = [];
|
|
30120
30204
|
const entries = /* @__PURE__ */ new Map();
|
|
30121
30205
|
for (const [id, mapped] of last) {
|
|
30122
|
-
const stored =
|
|
30206
|
+
const stored = ownEntry(state.records, id);
|
|
30123
30207
|
if (mapped.kind === "refused") {
|
|
30124
30208
|
if (stored) entries.set(id, { ...stored, missing: 0, seen_at: observedAt, first_missing_at: void 0 });
|
|
30125
30209
|
continue;
|
|
@@ -30169,6 +30253,7 @@ function commitResult(result3) {
|
|
|
30169
30253
|
async function driveObservation(options) {
|
|
30170
30254
|
const { bound: bound2, receipt: receipt5, observedAt, mode, resumed, signal, extraFindings } = options;
|
|
30171
30255
|
const key4 = bound2.policy.feed;
|
|
30256
|
+
const qualified = isSourceTargetConsumer(options.prepareCommit, options.commit);
|
|
30172
30257
|
let state = options.initial;
|
|
30173
30258
|
let version5 = options.version;
|
|
30174
30259
|
const baseline = version5 === null;
|
|
@@ -30180,6 +30265,8 @@ async function driveObservation(options) {
|
|
|
30180
30265
|
const errorText = (error51) => error51 instanceof Error ? error51.message : String(error51);
|
|
30181
30266
|
const store = async (next) => {
|
|
30182
30267
|
try {
|
|
30268
|
+
if ((qualified || options.prepareCommit || hasProtectedSourcePending(state)) && ((qualified ? Object.keys(next.pending ?? {}).length : Object.values(next.pending ?? {}).filter((p) => p.establishment).length) > 100 || new TextEncoder().encode(JSON.stringify(next)).length > 4194304)) throw new Error("source establishment state limit");
|
|
30269
|
+
if (!isSourceState(next)) throw new Error("invalid source state");
|
|
30183
30270
|
version5 = await options.state.write(key4, next, version5);
|
|
30184
30271
|
state = next;
|
|
30185
30272
|
receipt5.pending = Object.keys(next.pending ?? {}).length;
|
|
@@ -30191,18 +30278,76 @@ async function driveObservation(options) {
|
|
|
30191
30278
|
}
|
|
30192
30279
|
};
|
|
30193
30280
|
try {
|
|
30281
|
+
const retained = hasProtectedSourcePending(state);
|
|
30282
|
+
if (retained && !qualified) {
|
|
30283
|
+
stop = { outcome: "failed", reason: "establishment_consumer_required", retry: false };
|
|
30284
|
+
return;
|
|
30285
|
+
}
|
|
30286
|
+
if (retained && (Object.keys(state.pending ?? {}).length > 100 || new TextEncoder().encode(JSON.stringify(state)).length > 4194304)) {
|
|
30287
|
+
stop = { outcome: "failed", reason: "establishment_state_limit", retry: false };
|
|
30288
|
+
return;
|
|
30289
|
+
}
|
|
30290
|
+
if (retained && !signal.aborted) {
|
|
30291
|
+
const pending = state.pending;
|
|
30292
|
+
const context3 = state.pending_commit;
|
|
30293
|
+
const ids = context3?.order ?? Object.keys(pending).sort();
|
|
30294
|
+
const at = pending[ids[0]].held_at;
|
|
30295
|
+
const first = pending[ids[0]].establishment;
|
|
30296
|
+
if (!context3 && (!first || parseIsoInstant(at) === null || ids.some((id) => {
|
|
30297
|
+
const p = pending[id], e = p.establishment;
|
|
30298
|
+
return !e || e.group !== first.group || e.generation !== first.generation || e.observed_at !== at || p.held_at !== at;
|
|
30299
|
+
}))) {
|
|
30300
|
+
stop = { outcome: "failed", reason: "establishment_scope_changed", retry: false };
|
|
30301
|
+
return;
|
|
30302
|
+
}
|
|
30303
|
+
const records = idMap();
|
|
30304
|
+
for (const id of ids) records[id] = { fields: { ...pending[id].change.after ?? pending[id].change.before ?? {} } };
|
|
30305
|
+
let result3;
|
|
30306
|
+
try {
|
|
30307
|
+
const establishments = Object.fromEntries(ids.filter((id) => pending[id].establishment !== void 0).map((id) => [id, pending[id].establishment]));
|
|
30308
|
+
result3 = commitResult(await options.commit(structuredClone({
|
|
30309
|
+
feed: key4,
|
|
30310
|
+
provider: bound2.policy.provider,
|
|
30311
|
+
observed_at: at,
|
|
30312
|
+
page: context3?.page ?? 0,
|
|
30313
|
+
replay: true,
|
|
30314
|
+
changes: ids.map((id) => pending[id].change),
|
|
30315
|
+
records,
|
|
30316
|
+
baseline: context3?.baseline ?? false,
|
|
30317
|
+
complete: context3?.complete ?? false,
|
|
30318
|
+
...Object.keys(establishments).length ? { establishments } : {}
|
|
30319
|
+
})));
|
|
30320
|
+
} catch (error51) {
|
|
30321
|
+
receipt5.held += ids.length;
|
|
30322
|
+
stop = { outcome: "failed", reason: "establishment_pending", retry: true, detail: errorText(error51) };
|
|
30323
|
+
return;
|
|
30324
|
+
}
|
|
30325
|
+
if (ids.some((id) => result3.hold.has(id) || result3.retry.has(id))) {
|
|
30326
|
+
receipt5.held += ids.length;
|
|
30327
|
+
stop = { outcome: "failed", reason: "establishment_pending", retry: true };
|
|
30328
|
+
return;
|
|
30329
|
+
}
|
|
30330
|
+
const nextRecords = idMap(state.records);
|
|
30331
|
+
for (const id of ids) nextRecords[id] = entryJson(pending[id].entry);
|
|
30332
|
+
const next = { ...state, records: nextRecords };
|
|
30333
|
+
delete next.pending;
|
|
30334
|
+
delete next.pending_commit;
|
|
30335
|
+
if (!await store(next)) return;
|
|
30336
|
+
}
|
|
30194
30337
|
const pendingIds = signal.aborted ? [] : Object.keys(state.pending ?? {}).sort();
|
|
30195
30338
|
if (pendingIds.length) {
|
|
30196
30339
|
const pending = state.pending;
|
|
30197
|
-
const live = pendingIds.filter((id) => !state.records
|
|
30340
|
+
const live = pendingIds.filter((id) => pending[id].establishment !== void 0 || !ownEntry(state.records, id)?.gone || pending[id].change.change_kind === "new");
|
|
30341
|
+
const marked = live.filter((id) => pending[id].establishment !== void 0);
|
|
30342
|
+
const establishments = Object.fromEntries(marked.map((id) => [id, pending[id].establishment]));
|
|
30198
30343
|
const changes = live.map((id) => pending[id].change);
|
|
30199
|
-
const records =
|
|
30344
|
+
const records = idMap();
|
|
30200
30345
|
for (const change of changes) records[change.external_id] = { fields: { ...change.after ?? change.before ?? {} } };
|
|
30201
30346
|
let result3;
|
|
30202
30347
|
let failure3;
|
|
30203
30348
|
if (live.length) {
|
|
30204
30349
|
try {
|
|
30205
|
-
result3 = commitResult(await options.commit({
|
|
30350
|
+
result3 = commitResult(await options.commit(structuredClone({
|
|
30206
30351
|
feed: key4,
|
|
30207
30352
|
provider: bound2.policy.provider,
|
|
30208
30353
|
observed_at: observedAt,
|
|
@@ -30211,14 +30356,20 @@ async function driveObservation(options) {
|
|
|
30211
30356
|
changes,
|
|
30212
30357
|
records,
|
|
30213
30358
|
baseline: false,
|
|
30214
|
-
complete: false
|
|
30215
|
-
|
|
30359
|
+
complete: false,
|
|
30360
|
+
...marked.length ? { establishments } : {}
|
|
30361
|
+
})));
|
|
30216
30362
|
} catch (error51) {
|
|
30217
30363
|
failure3 = errorText(error51);
|
|
30218
30364
|
}
|
|
30219
30365
|
}
|
|
30220
|
-
|
|
30221
|
-
|
|
30366
|
+
if (marked.some((id) => failure3 !== void 0 || result3.retry.has(id) || result3.hold.has(id))) {
|
|
30367
|
+
receipt5.held += marked.length;
|
|
30368
|
+
stop = { outcome: "failed", reason: "establishment_pending", retry: true, ...failure3 ? { detail: failure3 } : {} };
|
|
30369
|
+
return;
|
|
30370
|
+
}
|
|
30371
|
+
const nextRecords = idMap(state.records);
|
|
30372
|
+
const nextPending = idMap();
|
|
30222
30373
|
const dropped = [];
|
|
30223
30374
|
for (const id of live) {
|
|
30224
30375
|
const entry = pending[id];
|
|
@@ -30229,7 +30380,7 @@ async function driveObservation(options) {
|
|
|
30229
30380
|
} else if (result3.retry.has(id)) {
|
|
30230
30381
|
nextPending[id] = entry;
|
|
30231
30382
|
} else if (!result3.hold.has(id)) {
|
|
30232
|
-
const current = state.records
|
|
30383
|
+
const current = ownEntry(state.records, id);
|
|
30233
30384
|
nextRecords[id] = entryJson(current?.gone ? entry.entry : { ...entry.entry, missing: current?.missing ?? 0, first_missing_at: current?.first_missing_at });
|
|
30234
30385
|
}
|
|
30235
30386
|
}
|
|
@@ -30257,6 +30408,10 @@ async function driveObservation(options) {
|
|
|
30257
30408
|
else delete next.pending;
|
|
30258
30409
|
if (!await store(next)) return;
|
|
30259
30410
|
}
|
|
30411
|
+
if (qualified && Object.keys(state.pending ?? {}).length) {
|
|
30412
|
+
stop = { outcome: "failed", reason: "establishment_pending", retry: true };
|
|
30413
|
+
return;
|
|
30414
|
+
}
|
|
30260
30415
|
if (signal.aborted) {
|
|
30261
30416
|
stop = { outcome: "deferred", reason: "deadline", retry: true };
|
|
30262
30417
|
return;
|
|
@@ -30314,7 +30469,7 @@ async function driveObservation(options) {
|
|
|
30314
30469
|
for (const id of diff.seen) seen.add(id);
|
|
30315
30470
|
const ended = !page.more;
|
|
30316
30471
|
const complete = ended && mode === "complete" && page.complete && sourceComplete;
|
|
30317
|
-
const merged =
|
|
30472
|
+
const merged = idMap(state.records);
|
|
30318
30473
|
for (const [id, entry] of diff.entries) merged[id] = entry;
|
|
30319
30474
|
const missing2 = complete ? missingAfterComplete(merged, seen, threshold, observedAt) : { changes: [], entries: /* @__PURE__ */ new Map() };
|
|
30320
30475
|
const changes = [...diff.changes, ...missing2.changes];
|
|
@@ -30322,18 +30477,18 @@ async function driveObservation(options) {
|
|
|
30322
30477
|
const unlisted = complete ? Object.keys(state.pending ?? {}).filter((id) => !seen.has(id)) : [];
|
|
30323
30478
|
const superseded = [.../* @__PURE__ */ new Set([...diff.seen, ...missing2.entries.keys(), ...unlisted])].filter((id) => state.pending !== void 0 && Object.hasOwn(state.pending, id));
|
|
30324
30479
|
if (superseded.length) {
|
|
30325
|
-
const remaining =
|
|
30480
|
+
const remaining = idMap(state.pending);
|
|
30326
30481
|
for (const id of superseded) delete remaining[id];
|
|
30327
30482
|
const pre = { ...state };
|
|
30328
30483
|
if (Object.keys(remaining).length) pre.pending = remaining;
|
|
30329
30484
|
else delete pre.pending;
|
|
30330
30485
|
if (!await store(pre)) break;
|
|
30331
30486
|
}
|
|
30332
|
-
const records =
|
|
30487
|
+
const records = idMap();
|
|
30333
30488
|
for (const change of changes) records[change.external_id] = { fields: { ...change.after ?? change.before ?? {} } };
|
|
30334
30489
|
let result3;
|
|
30335
30490
|
try {
|
|
30336
|
-
|
|
30491
|
+
const commitPage = JSON.parse(JSON.stringify({
|
|
30337
30492
|
feed: key4,
|
|
30338
30493
|
provider: bound2.policy.provider,
|
|
30339
30494
|
observed_at: observedAt,
|
|
@@ -30344,16 +30499,66 @@ async function driveObservation(options) {
|
|
|
30344
30499
|
baseline,
|
|
30345
30500
|
complete
|
|
30346
30501
|
}));
|
|
30502
|
+
if (options.prepareCommit) {
|
|
30503
|
+
const prepared2 = await options.prepareCommit(structuredClone(commitPage));
|
|
30504
|
+
if (!isJsonData(prepared2) || !record9(prepared2.establishments)) throw new Error("invalid source preparation");
|
|
30505
|
+
const descriptors = JSON.parse(JSON.stringify(prepared2.establishments));
|
|
30506
|
+
const ids = Object.keys(descriptors);
|
|
30507
|
+
if (ids.length > 100) throw new Error("source establishment page limit");
|
|
30508
|
+
const pending = idMap(state.pending);
|
|
30509
|
+
for (const id of ids) {
|
|
30510
|
+
const change = byId2.get(id), entry = diff.entries.get(id), e = descriptors[id];
|
|
30511
|
+
if (!change?.after || !entry || !isSourceEstablishment(e) || e.observed_at !== observedAt) throw new Error("invalid source establishment");
|
|
30512
|
+
if (e.intent) {
|
|
30513
|
+
const fm = parseMarkdown(e.intent.content, e.target).frontmatter;
|
|
30514
|
+
if (fm.type !== bound2.kind.governs || !Array.isArray(fm.sources) || fm.sources.length !== 1 || fm.sources[0]?.resource !== bound2.resource || fm.sources[0]?.id !== id) throw new Error("invalid source establishment identity");
|
|
30515
|
+
}
|
|
30516
|
+
pending[id] = { change: structuredClone(change), entry: entryJson(structuredClone(entry)), held_at: observedAt, establishment: e };
|
|
30517
|
+
}
|
|
30518
|
+
if (qualified && changes.length) {
|
|
30519
|
+
for (const change of changes) {
|
|
30520
|
+
const id = change.external_id, entry = diff.entries.get(id) ?? missing2.entries.get(id);
|
|
30521
|
+
if (!entry) throw new Error("source pending entry missing");
|
|
30522
|
+
pending[id] = {
|
|
30523
|
+
change: structuredClone(change),
|
|
30524
|
+
entry: entryJson(structuredClone(entry)),
|
|
30525
|
+
held_at: observedAt,
|
|
30526
|
+
...Object.hasOwn(descriptors, id) ? { establishment: descriptors[id] } : {}
|
|
30527
|
+
};
|
|
30528
|
+
}
|
|
30529
|
+
}
|
|
30530
|
+
if ((qualified ? Object.keys(pending).length : Object.values(pending).filter((p) => p.establishment).length) > 100) throw new Error("source establishment pending limit");
|
|
30531
|
+
if (ids.length || qualified && changes.length) {
|
|
30532
|
+
const pre = { ...state, pending, ...qualified ? { pending_commit: {
|
|
30533
|
+
v: 1,
|
|
30534
|
+
order: changes.map((change) => change.external_id),
|
|
30535
|
+
page: commitPage.page,
|
|
30536
|
+
baseline: commitPage.baseline,
|
|
30537
|
+
complete: commitPage.complete
|
|
30538
|
+
} } : {} };
|
|
30539
|
+
if (new TextEncoder().encode(JSON.stringify(pre)).length > 4194304) throw new Error("source establishment envelope limit");
|
|
30540
|
+
if (!await store(pre)) return;
|
|
30541
|
+
commitPage.establishments = structuredClone(descriptors);
|
|
30542
|
+
}
|
|
30543
|
+
}
|
|
30544
|
+
result3 = commitResult(await options.commit(commitPage));
|
|
30545
|
+
if ((qualified ? changes.map((c) => c.external_id) : Object.keys(commitPage.establishments ?? {})).some((id) => result3.hold.has(id) || result3.retry.has(id))) {
|
|
30546
|
+
stop = { outcome: "failed", reason: "establishment_pending", retry: true };
|
|
30547
|
+
return;
|
|
30548
|
+
}
|
|
30347
30549
|
} catch (error51) {
|
|
30348
30550
|
stop = { outcome: "failed", reason: "commit_failed", retry: true, detail: errorText(error51) };
|
|
30349
30551
|
break;
|
|
30350
30552
|
}
|
|
30351
30553
|
const notWritten = (id) => byId2.has(id) && (result3.hold.has(id) || result3.retry.has(id));
|
|
30352
|
-
const nextRecords =
|
|
30353
|
-
const nextPending =
|
|
30554
|
+
const nextRecords = idMap(state.records);
|
|
30555
|
+
const nextPending = idMap(state.pending);
|
|
30354
30556
|
for (const [id, entry] of [...diff.entries, ...missing2.entries]) {
|
|
30355
30557
|
if (byId2.has(id) && result3.retry.has(id)) nextPending[id] = { change: byId2.get(id), entry: entryJson(entry), held_at: observedAt };
|
|
30356
|
-
else if (!notWritten(id))
|
|
30558
|
+
else if (!notWritten(id)) {
|
|
30559
|
+
nextRecords[id] = entryJson(entry);
|
|
30560
|
+
delete nextPending[id];
|
|
30561
|
+
}
|
|
30357
30562
|
}
|
|
30358
30563
|
const next = {
|
|
30359
30564
|
...state,
|
|
@@ -30366,6 +30571,7 @@ async function driveObservation(options) {
|
|
|
30366
30571
|
};
|
|
30367
30572
|
if (Object.keys(nextPending).length) next.pending = nextPending;
|
|
30368
30573
|
else delete next.pending;
|
|
30574
|
+
delete next.pending_commit;
|
|
30369
30575
|
if (!await store(next)) break;
|
|
30370
30576
|
receipt5.pages += 1;
|
|
30371
30577
|
receipt5.cursor = nextCursor;
|
|
@@ -30392,10 +30598,13 @@ async function driveObservation(options) {
|
|
|
30392
30598
|
}
|
|
30393
30599
|
return;
|
|
30394
30600
|
} finally {
|
|
30395
|
-
if (stop)
|
|
30601
|
+
if (stop) {
|
|
30602
|
+
discardSourceTargetConsumer(options.prepareCommit, options.commit);
|
|
30603
|
+
options.stop(stop, stopUrl);
|
|
30604
|
+
}
|
|
30396
30605
|
}
|
|
30397
30606
|
}
|
|
30398
|
-
var DEFAULT_MISSING_THRESHOLD, MAX_CURSOR_CHARS, MAX_REPLAY_FAILURES, UNSUPPORTED_CONTENT, record9, clip2;
|
|
30607
|
+
var DEFAULT_MISSING_THRESHOLD, MAX_CURSOR_CHARS, MAX_REPLAY_FAILURES, UNSUPPORTED_CONTENT, record9, clip2, idMap, ownEntry;
|
|
30399
30608
|
var init_driver = __esm({
|
|
30400
30609
|
"../core/src/source-engine/driver.ts"() {
|
|
30401
30610
|
"use strict";
|
|
@@ -30403,13 +30612,20 @@ var init_driver = __esm({
|
|
|
30403
30612
|
init_define_SUPERBEE_UPDATE_POLICY();
|
|
30404
30613
|
init_connectors();
|
|
30405
30614
|
init_canonical();
|
|
30615
|
+
init_verification();
|
|
30616
|
+
init_document_codec();
|
|
30617
|
+
init_target_consumer();
|
|
30618
|
+
init_target_descriptor();
|
|
30406
30619
|
init_guard();
|
|
30620
|
+
init_machine_state();
|
|
30407
30621
|
DEFAULT_MISSING_THRESHOLD = 2;
|
|
30408
30622
|
MAX_CURSOR_CHARS = 8192;
|
|
30409
30623
|
MAX_REPLAY_FAILURES = 5;
|
|
30410
30624
|
UNSUPPORTED_CONTENT = "SOURCE_UNSUPPORTED_CONTENT";
|
|
30411
30625
|
record9 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
30412
30626
|
clip2 = (text6, n) => text6.length > n ? text6.slice(0, n - 1) + "\u2026" : text6;
|
|
30627
|
+
idMap = (entries) => Object.assign(/* @__PURE__ */ Object.create(null), entries);
|
|
30628
|
+
ownEntry = (entries, id) => Object.hasOwn(entries, id) ? entries[id] : void 0;
|
|
30413
30629
|
}
|
|
30414
30630
|
});
|
|
30415
30631
|
|
|
@@ -30567,6 +30783,10 @@ async function observeSource(options) {
|
|
|
30567
30783
|
receipt5.pending = Object.keys(state.pending ?? {}).length;
|
|
30568
30784
|
let mode = requestedMode;
|
|
30569
30785
|
if (state.profile.id !== profile.id || state.profile.version !== profile.version) {
|
|
30786
|
+
if (hasProtectedSourcePending(state)) {
|
|
30787
|
+
stop = { outcome: "failed", reason: "establishment_scope_changed", retry: false };
|
|
30788
|
+
return finish();
|
|
30789
|
+
}
|
|
30570
30790
|
if (!baseline) receipt5.cursor_reset = "profile_version";
|
|
30571
30791
|
state = { ...state, profile: { id: profile.id, version: profile.version }, cursor: null, open: false };
|
|
30572
30792
|
delete state.validators;
|
|
@@ -30631,6 +30851,7 @@ async function observeSource(options) {
|
|
|
30631
30851
|
stopUrl = url2;
|
|
30632
30852
|
},
|
|
30633
30853
|
extraFindings,
|
|
30854
|
+
prepareCommit: options.prepareCommit,
|
|
30634
30855
|
commit: options.commit
|
|
30635
30856
|
});
|
|
30636
30857
|
return finish();
|
|
@@ -31667,10 +31888,10 @@ var init_plan = __esm({
|
|
|
31667
31888
|
|
|
31668
31889
|
// ../core/src/source-engine/overlay.ts
|
|
31669
31890
|
function isSourceOverlaySnapshot(value) {
|
|
31670
|
-
if (!
|
|
31891
|
+
if (!object3(value) || value.v !== 1 || !Array.isArray(value.entries) || value.entries.length > MAX_SOURCE_OVERLAY_ENTRIES) return false;
|
|
31671
31892
|
const keys2 = /* @__PURE__ */ new Set();
|
|
31672
31893
|
return value.entries.every((entry) => {
|
|
31673
|
-
if (!
|
|
31894
|
+
if (!object3(entry) || ![entry.feed, entry.resource, entry.external_id, entry.target].every((v) => typeof v === "string" && v.length > 0) || !object3(entry.after)) return false;
|
|
31674
31895
|
const k = key(entry);
|
|
31675
31896
|
if (keys2.has(k)) return false;
|
|
31676
31897
|
keys2.add(k);
|
|
@@ -31768,7 +31989,7 @@ function createSourceOverlayAdapter(options) {
|
|
|
31768
31989
|
}
|
|
31769
31990
|
};
|
|
31770
31991
|
}
|
|
31771
|
-
var MAX_SOURCE_OVERLAY_ENTRIES,
|
|
31992
|
+
var MAX_SOURCE_OVERLAY_ENTRIES, object3, key;
|
|
31772
31993
|
var init_overlay = __esm({
|
|
31773
31994
|
"../core/src/source-engine/overlay.ts"() {
|
|
31774
31995
|
"use strict";
|
|
@@ -31780,7 +32001,7 @@ var init_overlay = __esm({
|
|
|
31780
32001
|
init_findings();
|
|
31781
32002
|
init_plan();
|
|
31782
32003
|
MAX_SOURCE_OVERLAY_ENTRIES = 1e4;
|
|
31783
|
-
|
|
32004
|
+
object3 = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
31784
32005
|
key = (e) => JSON.stringify([e.feed, e.resource, e.external_id, e.target]);
|
|
31785
32006
|
}
|
|
31786
32007
|
});
|
|
@@ -31790,12 +32011,12 @@ function parseSnapshotEvidence(value) {
|
|
|
31790
32011
|
const refuse3 = () => {
|
|
31791
32012
|
throw new SnapshotEvidenceRefusal();
|
|
31792
32013
|
};
|
|
31793
|
-
if (!
|
|
32014
|
+
if (!object4(value) || !closed(value, ["v", "association", "inputs", "settings_digest", "required_identities"]) || value.v !== 1 || value.association !== "caller_asserted") return refuse3();
|
|
31794
32015
|
const identities2 = (raw) => {
|
|
31795
32016
|
if (!Array.isArray(raw) || raw.length > 1e4) return refuse3();
|
|
31796
32017
|
const seen = /* @__PURE__ */ new Set();
|
|
31797
32018
|
return raw.map((row5) => {
|
|
31798
|
-
if (!
|
|
32019
|
+
if (!object4(row5) || !closed(row5, ["id", "sha256"]) || typeof row5.id !== "string" || !LABEL2.test(row5.id) || typeof row5.sha256 !== "string" || !SNAPSHOT_SHA256.test(row5.sha256) || seen.has(row5.id)) return refuse3();
|
|
31799
32020
|
seen.add(row5.id);
|
|
31800
32021
|
return { id: row5.id, sha256: row5.sha256 };
|
|
31801
32022
|
});
|
|
@@ -31835,7 +32056,7 @@ function assessSnapshotFreshness(expected, observed) {
|
|
|
31835
32056
|
rows
|
|
31836
32057
|
};
|
|
31837
32058
|
}
|
|
31838
|
-
var SNAPSHOT_SHA256, LABEL2,
|
|
32059
|
+
var SNAPSHOT_SHA256, LABEL2, object4, closed, SnapshotEvidenceRefusal;
|
|
31839
32060
|
var init_evidence = __esm({
|
|
31840
32061
|
"../core/src/source-engine/evidence.ts"() {
|
|
31841
32062
|
"use strict";
|
|
@@ -31843,7 +32064,7 @@ var init_evidence = __esm({
|
|
|
31843
32064
|
init_define_SUPERBEE_UPDATE_POLICY();
|
|
31844
32065
|
SNAPSHOT_SHA256 = /^sha256:[0-9a-f]{64}$/;
|
|
31845
32066
|
LABEL2 = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/;
|
|
31846
|
-
|
|
32067
|
+
object4 = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
31847
32068
|
closed = (v, keys2) => Object.keys(v).every((k) => keys2.includes(k));
|
|
31848
32069
|
SnapshotEvidenceRefusal = class extends Error {
|
|
31849
32070
|
code = "SNAPSHOT_EVIDENCE_INVALID";
|
|
@@ -31858,7 +32079,7 @@ var init_evidence = __esm({
|
|
|
31858
32079
|
// ../core/src/source-engine/snapshot.ts
|
|
31859
32080
|
function bindSnapshotSource(doc2, kinds2, options = {}) {
|
|
31860
32081
|
const fm = doc2.frontmatter ?? {};
|
|
31861
|
-
if (!resourceValid(fm.resource) || typeof fm.target_kind !== "string" || !
|
|
32082
|
+
if (!resourceValid(fm.resource) || typeof fm.target_kind !== "string" || !object5(fm.identity) || !closed2(fm.identity, ["id"]) || ["url", "connector", "source", "profile", "request", "auth", "domains", "credential"].some((k) => Object.hasOwn(fm, k)) || fm.scope !== void 0 && !scopeValid(fm.scope) || fm.completeness === "complete" && !scopeValid(fm.scope)) return refuse("SNAPSHOT_DECLARATION_INVALID");
|
|
31862
32083
|
const kind2 = kinds2.kinds.get(fm.target_kind);
|
|
31863
32084
|
if (!kind2) return refuse("SNAPSHOT_DECLARATION_INVALID");
|
|
31864
32085
|
const parsed2 = parseRecordSourceDeclaration({
|
|
@@ -31907,8 +32128,8 @@ function decodeSnapshot(input) {
|
|
|
31907
32128
|
} catch {
|
|
31908
32129
|
return refuse("SNAPSHOT_INPUT_INVALID");
|
|
31909
32130
|
}
|
|
31910
|
-
if (!isJsonData(value) || !
|
|
31911
|
-
if (value.diagnostics !== void 0 && (!Array.isArray(value.diagnostics) || value.diagnostics.length > 100 || !value.diagnostics.every((d) =>
|
|
32131
|
+
if (!isJsonData(value) || !object5(value) || !closed2(value, ["v", "resource", "generation", "complete", "scope", "records", "diagnostics", "evidence"]) || value.v !== 1 || !resourceValid(value.resource) || !Number.isSafeInteger(value.generation) || value.generation < 1 || typeof value.complete !== "boolean" || !Array.isArray(value.records) || value.records.length > SNAPSHOT_MAX_RECORDS || !value.records.every(object5) || value.scope !== void 0 && !scopeValid(value.scope)) return refuse("SNAPSHOT_INPUT_INVALID");
|
|
32132
|
+
if (value.diagnostics !== void 0 && (!Array.isArray(value.diagnostics) || value.diagnostics.length > 100 || !value.diagnostics.every((d) => object5(d) && closed2(d, ["code", "message", "count"]) && typeof d.code === "string" && /^[A-Z][A-Z0-9_]{0,63}$/.test(d.code) && typeof d.message === "string" && d.message.length <= 512 && (d.count === void 0 || Number.isSafeInteger(d.count) && d.count >= 0)))) return refuse("SNAPSHOT_INPUT_INVALID");
|
|
31912
32133
|
if (value.evidence !== void 0) value.evidence = parseSnapshotEvidence(value.evidence);
|
|
31913
32134
|
return { bytes: copy, sha256: blobVersion(copy), byteLength: copy.byteLength, data: value };
|
|
31914
32135
|
}
|
|
@@ -31971,14 +32192,14 @@ function capacityFacts(bound2, snapshot3, state, input) {
|
|
|
31971
32192
|
return facts;
|
|
31972
32193
|
}
|
|
31973
32194
|
function snapshotStateValid(value) {
|
|
31974
|
-
if (!isSourceState(value) || !isJsonData(value)) return false;
|
|
32195
|
+
if (!isSourceState(value) || !isJsonData(value) || value.pending_commit !== void 0) return false;
|
|
31975
32196
|
const count6 = (v) => Number.isSafeInteger(v) && v >= 0;
|
|
31976
32197
|
const idValid = (id) => id.length > 0 && id.length <= 2048 && !isPrototypeKey(id) && !/[\x00-\x1f\x7f]/.test(id);
|
|
31977
|
-
const entryValid = (entry) =>
|
|
32198
|
+
const entryValid = (entry) => object5(entry) && object5(entry.after) && typeof entry.digest === "string" && SNAPSHOT_SHA256.test(entry.digest) && count6(entry.missing) && typeof entry.seen_at === "string" && (entry.gone === void 0 || entry.gone === true) && (entry.first_missing_at === void 0 || typeof entry.first_missing_at === "string");
|
|
31978
32199
|
if (!count6(value.complete_observations) || value.last_complete_at !== void 0 && typeof value.last_complete_at !== "string" || !Object.entries(value.records).every(([id, entry]) => idValid(id) && entryValid(entry))) return false;
|
|
31979
32200
|
return Object.entries(value.pending ?? {}).every(([id, pending]) => {
|
|
31980
32201
|
const change = pending.change;
|
|
31981
|
-
return idValid(id) && entryValid(pending.entry) && typeof pending.held_at === "string" && (pending.replay_failures === void 0 || count6(pending.replay_failures)) && ["new", "changed", "disappeared"].includes(change.change_kind) && Array.isArray(change.changed_fields) && change.changed_fields.every((f) => typeof f === "string") && (change.before === null ||
|
|
32202
|
+
return idValid(id) && entryValid(pending.entry) && typeof pending.held_at === "string" && (pending.replay_failures === void 0 || count6(pending.replay_failures)) && ["new", "changed", "disappeared"].includes(change.change_kind) && Array.isArray(change.changed_fields) && change.changed_fields.every((f) => typeof f === "string") && (change.before === null || object5(change.before)) && (change.after === null || object5(change.after)) && typeof change.content_digest === "string" && SNAPSHOT_SHA256.test(change.content_digest) && (change.missing_count === void 0 || count6(change.missing_count)) && (change.first_missing_at === void 0 || typeof change.first_missing_at === "string");
|
|
31982
32203
|
});
|
|
31983
32204
|
}
|
|
31984
32205
|
function admitSnapshot(options) {
|
|
@@ -31990,7 +32211,7 @@ function admitSnapshot(options) {
|
|
|
31990
32211
|
let currentGeneration = null;
|
|
31991
32212
|
let observation2 = "new";
|
|
31992
32213
|
if (state !== null) {
|
|
31993
|
-
if (!snapshotStateValid(state) || state.profile.id !== SNAPSHOT_PROFILE.id || state.profile.version !== SNAPSHOT_PROFILE.version || !closed2(state.profile, ["id", "version"]) || state.open !== false || state.validators !== void 0 || !
|
|
32214
|
+
if (!snapshotStateValid(state) || state.profile.id !== SNAPSHOT_PROFILE.id || state.profile.version !== SNAPSHOT_PROFILE.version || !closed2(state.profile, ["id", "version"]) || state.open !== false || state.validators !== void 0 || !object5(state.cursor) || !closed2(state.cursor, ["v", "generation", "sha256"]) || state.cursor.v !== 1 || !Number.isSafeInteger(state.cursor.generation) || state.cursor.generation < 1 || typeof state.cursor.sha256 !== "string" || !SNAPSHOT_SHA256.test(state.cursor.sha256)) return refuse("SNAPSHOT_STATE_INVALID");
|
|
31994
32215
|
if (options.previousBindingDigest !== bound2.bindingDigest) return refuse("SNAPSHOT_BINDING_CHANGED");
|
|
31995
32216
|
currentGeneration = state.cursor.generation;
|
|
31996
32217
|
if (snapshot3.data.generation < currentGeneration) return refuse("SNAPSHOT_GENERATION_ROLLBACK");
|
|
@@ -32075,7 +32296,7 @@ async function observeSnapshot(options) {
|
|
|
32075
32296
|
receipt5.findings = [...extraFindings, ...findingsFor(receipt5.diagnostics, { source: bound2.source.name })];
|
|
32076
32297
|
return receipt5;
|
|
32077
32298
|
}
|
|
32078
|
-
var SNAPSHOT_MAX_BYTES, SNAPSHOT_MAX_RECORDS, SNAPSHOT_PROFILE, SnapshotRefusal, refuse,
|
|
32299
|
+
var SNAPSHOT_MAX_BYTES, SNAPSHOT_MAX_RECORDS, SNAPSHOT_PROFILE, SnapshotRefusal, refuse, object5, closed2, resourceValid, scopeValid, bytes;
|
|
32079
32300
|
var init_snapshot = __esm({
|
|
32080
32301
|
"../core/src/source-engine/snapshot.ts"() {
|
|
32081
32302
|
"use strict";
|
|
@@ -32103,7 +32324,7 @@ var init_snapshot = __esm({
|
|
|
32103
32324
|
refuse = (code3) => {
|
|
32104
32325
|
throw new SnapshotRefusal(code3);
|
|
32105
32326
|
};
|
|
32106
|
-
|
|
32327
|
+
object5 = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
32107
32328
|
closed2 = (v, keys2) => Object.keys(v).every((k) => keys2.includes(k));
|
|
32108
32329
|
resourceValid = (v) => typeof v === "string" && v.length <= 2048 && /^urn:[a-z0-9][a-z0-9-]{0,31}:[A-Za-z0-9][A-Za-z0-9._~:%-]*$/.test(v);
|
|
32109
32330
|
scopeValid = (v) => typeof v === "string" && /^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$/.test(v);
|
|
@@ -32245,7 +32466,7 @@ function put2(record19, path72, value) {
|
|
|
32245
32466
|
const names = path72.split(".");
|
|
32246
32467
|
let next = record19;
|
|
32247
32468
|
for (const name of names.slice(0, -1)) {
|
|
32248
|
-
if (!
|
|
32469
|
+
if (!object6(next[name])) next[name] = {};
|
|
32249
32470
|
next = next[name];
|
|
32250
32471
|
}
|
|
32251
32472
|
next[names[names.length - 1]] = value;
|
|
@@ -32286,7 +32507,7 @@ function transform(value, type) {
|
|
|
32286
32507
|
function getSourceProfile(id) {
|
|
32287
32508
|
return id === restJsonProfile.id ? restJsonProfile : void 0;
|
|
32288
32509
|
}
|
|
32289
|
-
var
|
|
32510
|
+
var object6, scalar4, restJsonProfile, SOURCE_PLUGIN_CORE_VERSION, SOURCE_PROFILES;
|
|
32290
32511
|
var init_source_profiles = __esm({
|
|
32291
32512
|
"../core/src/source-profiles/index.ts"() {
|
|
32292
32513
|
"use strict";
|
|
@@ -32295,14 +32516,14 @@ var init_source_profiles = __esm({
|
|
|
32295
32516
|
init_link_header();
|
|
32296
32517
|
init_connectors();
|
|
32297
32518
|
init_source_engine();
|
|
32298
|
-
|
|
32519
|
+
object6 = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
32299
32520
|
scalar4 = (v) => v === null || typeof v === "string" || typeof v === "boolean" || typeof v === "number" && Number.isFinite(v);
|
|
32300
32521
|
restJsonProfile = Object.freeze({
|
|
32301
32522
|
id: "rest-json",
|
|
32302
32523
|
version: 1,
|
|
32303
32524
|
kind: "generic",
|
|
32304
32525
|
validateSpec(value) {
|
|
32305
|
-
if (!
|
|
32526
|
+
if (!object6(value) || !object6(value.identity) || typeof value.identity.resource !== "string" || !object6(value.request)) return { ok: false, errors: [{ path: "/request", message: "rest-json requires a source with identity and request" }] };
|
|
32306
32527
|
const source2 = value;
|
|
32307
32528
|
const errors2 = validateConnectorRequest(source2);
|
|
32308
32529
|
if (source2.request?.graphql) errors2.push({ path: "/request/graphql", message: "use graphql-cursor for GraphQL" });
|
|
@@ -32314,7 +32535,7 @@ var init_source_profiles = __esm({
|
|
|
32314
32535
|
const r = spec.request;
|
|
32315
32536
|
const paging = r.paging;
|
|
32316
32537
|
const previous3 = ctx.cursor;
|
|
32317
|
-
const validCursor = (value) => value === null ||
|
|
32538
|
+
const validCursor = (value) => value === null || object6(value) && Object.entries(value).every(([key4, v]) => ["token", "url", "watermark", "since"].includes(key4) ? typeof v === "string" : ["page", "offset"].includes(key4) && typeof v === "number");
|
|
32318
32539
|
if (!validCursor(previous3)) unsupportedContent("invalid cursor");
|
|
32319
32540
|
const numeric = paging?.kind === "page-number" || paging?.kind === "offset";
|
|
32320
32541
|
const start = mode === "complete" && previous3 === null;
|
|
@@ -32355,7 +32576,7 @@ var init_source_profiles = __esm({
|
|
|
32355
32576
|
unsupportedContent("invalid_json");
|
|
32356
32577
|
}
|
|
32357
32578
|
const items = readPath(parsed2, r.items);
|
|
32358
|
-
if (!Array.isArray(items) || !items.every(
|
|
32579
|
+
if (!Array.isArray(items) || !items.every(object6)) unsupportedContent("items must be an array of records");
|
|
32359
32580
|
let watermark = previous3?.watermark;
|
|
32360
32581
|
let skipped = 0;
|
|
32361
32582
|
const records = [];
|
|
@@ -32403,7 +32624,7 @@ var init_source_profiles = __esm({
|
|
|
32403
32624
|
...watermark ? { watermark } : {},
|
|
32404
32625
|
...more ? { since: since ?? "" } : {}
|
|
32405
32626
|
};
|
|
32406
|
-
const declaredComplete = r.complete === "always" ||
|
|
32627
|
+
const declaredComplete = r.complete === "always" || object6(r.complete) && readPath(parsed2, r.complete.when_path) === r.complete.equals;
|
|
32407
32628
|
const validators = {};
|
|
32408
32629
|
if (response.headers.etag) validators["if-none-match"] = response.headers.etag;
|
|
32409
32630
|
if (response.headers["last-modified"]) validators["if-modified-since"] = response.headers["last-modified"];
|
|
@@ -32417,7 +32638,7 @@ var init_source_profiles = __esm({
|
|
|
32417
32638
|
};
|
|
32418
32639
|
}
|
|
32419
32640
|
});
|
|
32420
|
-
SOURCE_PLUGIN_CORE_VERSION = "0.2.0-pre.
|
|
32641
|
+
SOURCE_PLUGIN_CORE_VERSION = "0.2.0-pre.41";
|
|
32421
32642
|
SOURCE_PROFILES = Object.freeze([restJsonProfile].map((profile) => Object.freeze({ id: profile.id, version: profile.version, kind: profile.kind })));
|
|
32422
32643
|
}
|
|
32423
32644
|
});
|
|
@@ -37349,6 +37570,15 @@ var init_blob_write = __esm({
|
|
|
37349
37570
|
}
|
|
37350
37571
|
});
|
|
37351
37572
|
|
|
37573
|
+
// ../core/src/hosted-transport/document-backend.ts
|
|
37574
|
+
var init_document_backend = __esm({
|
|
37575
|
+
"../core/src/hosted-transport/document-backend.ts"() {
|
|
37576
|
+
"use strict";
|
|
37577
|
+
init_define_SUPERBEE_BUILD_IDENTITY();
|
|
37578
|
+
init_define_SUPERBEE_UPDATE_POLICY();
|
|
37579
|
+
}
|
|
37580
|
+
});
|
|
37581
|
+
|
|
37352
37582
|
// ../core/src/hosted-transport/index.ts
|
|
37353
37583
|
var init_hosted_transport = __esm({
|
|
37354
37584
|
"../core/src/hosted-transport/index.ts"() {
|
|
@@ -37365,6 +37595,7 @@ var init_hosted_transport = __esm({
|
|
|
37365
37595
|
init_root_write();
|
|
37366
37596
|
init_blob_reads();
|
|
37367
37597
|
init_blob_write();
|
|
37598
|
+
init_document_backend();
|
|
37368
37599
|
}
|
|
37369
37600
|
});
|
|
37370
37601
|
|
|
@@ -37741,17 +37972,17 @@ var init_write2 = __esm({
|
|
|
37741
37972
|
// ../core/src/blob-journal.ts
|
|
37742
37973
|
function captureBlobDeletionHold(value) {
|
|
37743
37974
|
const hold = captureJournalValue(value);
|
|
37744
|
-
if (!
|
|
37975
|
+
if (!object7(hold) || !only3(hold, ["deletions", "baseline"]) || !Number.isSafeInteger(hold.deletions) || hold.deletions < 1 || !Number.isSafeInteger(hold.baseline) || hold.baseline < 0) throw new TypeError("invalid blob deletion hold");
|
|
37745
37976
|
return hold;
|
|
37746
37977
|
}
|
|
37747
37978
|
function captureBlobNotDispatched(value) {
|
|
37748
37979
|
const evidence = captureJournalValue(value);
|
|
37749
|
-
if (!
|
|
37980
|
+
if (!object7(evidence) || !only3(evidence, ["code"]) || !BLOB_NOT_DISPATCHED_CODES.includes(evidence.code)) throw new TypeError("invalid blob not-dispatched evidence");
|
|
37750
37981
|
return evidence;
|
|
37751
37982
|
}
|
|
37752
37983
|
function captureInput(value) {
|
|
37753
37984
|
const v = captureJournalValue(value);
|
|
37754
|
-
if (!
|
|
37985
|
+
if (!object7(v) || !only3(v, ["scope", "intent", "identity", "createdAt"]) || !timestamp2(v.createdAt) || !object7(v.scope) || !only3(v.scope, ["origin", "prefix", "bundleId", "workspaceSlug"]) || !object7(v.identity) || !only3(v.identity, ["requestId", "binding", "via"])) throw new TypeError("invalid prepared blob input");
|
|
37755
37986
|
const { scope, identity } = v;
|
|
37756
37987
|
if (typeof scope.origin !== "string" || scope.origin.length > 2048 || typeof scope.prefix !== "string" || scope.prefix.length > 512 || !/^\/(?:[a-zA-Z0-9._~-]+\/)*[a-zA-Z0-9._~-]+$/.test(scope.prefix) || scope.prefix.split("/").some((part) => part === "." || part === "..") || typeof scope.bundleId !== "string" || !isHostedBundleId(scope.bundleId) || !(scope.workspaceSlug === null || typeof scope.workspaceSlug === "string" && /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/.test(scope.workspaceSlug))) throw new TypeError("invalid blob target scope");
|
|
37757
37988
|
let origin;
|
|
@@ -37805,7 +38036,7 @@ function decodePreparedBlobIntent(payload) {
|
|
|
37805
38036
|
function decodeUncachedPreparedBlobIntent(payload) {
|
|
37806
38037
|
if (typeof payload !== "string" || payload.length > BLOB_JOURNAL_BOUNDS.preparedBytes || new TextEncoder().encode(payload).byteLength > BLOB_JOURNAL_BOUNDS.preparedBytes) throw new TypeError("invalid prepared blob payload");
|
|
37807
38038
|
const value = JSON.parse(payload);
|
|
37808
|
-
if (!
|
|
38039
|
+
if (!object7(value) || !only3(value, ["schemaVersion", "scope", "intent", "identity", "createdAt", "bytesBase64"]) || value.schemaVersion !== 1) throw new TypeError("invalid prepared blob schema");
|
|
37809
38040
|
const { schemaVersion: _schema, bytesBase64, ...input } = value;
|
|
37810
38041
|
let bytes2;
|
|
37811
38042
|
if (bytesBase64 !== void 0) {
|
|
@@ -37829,7 +38060,7 @@ function blobReceipt(prepared2, raw) {
|
|
|
37829
38060
|
}
|
|
37830
38061
|
function captureBlobIntentRecord(value) {
|
|
37831
38062
|
const row5 = captureJournalValue(value);
|
|
37832
|
-
if (!
|
|
38063
|
+
if (!object7(row5) || !only3(row5, ["recordFamily", "requestId", "target", "prepared", "sequence", "attempts", "state", "updatedAt", "receipt", "notAppliedThrough", "deletionHold", "notDispatched"]) || row5.recordFamily !== "blob" || !Number.isSafeInteger(row5.sequence) || row5.sequence < 1 || !Number.isSafeInteger(row5.attempts) || row5.attempts < 0 || !timestamp2(row5.updatedAt) || !["pending", "in_flight", "acknowledged", "conflict", "refused", "unknown"].includes(row5.state)) throw new TypeError("invalid blob intent record");
|
|
37833
38064
|
const prepared2 = decodePreparedBlobIntent(row5.prepared);
|
|
37834
38065
|
if (row5.requestId !== prepared2.identity.requestId || row5.target !== prepared2.intent.key) throw new TypeError("blob record index does not match payload");
|
|
37835
38066
|
const prefix = row5.notAppliedThrough === void 0 ? 0 : row5.notAppliedThrough;
|
|
@@ -37853,7 +38084,7 @@ function captureBlobIntentRecord(value) {
|
|
|
37853
38084
|
}
|
|
37854
38085
|
function captureBlobJournalGuard(value) {
|
|
37855
38086
|
const guard = captureJournalValue(value);
|
|
37856
|
-
if (!
|
|
38087
|
+
if (!object7(guard) || !only3(guard, ["key", "intents", "meta"]) || !Array.isArray(guard.intents) || !Array.isArray(guard.meta)) throw new JournalGuardConflict("blob");
|
|
37857
38088
|
assertBlobKey(guard.key);
|
|
37858
38089
|
const ids = /* @__PURE__ */ new Set(), sequences = /* @__PURE__ */ new Set(), keys2 = /* @__PURE__ */ new Set();
|
|
37859
38090
|
for (const row5 of guard.intents) {
|
|
@@ -37863,7 +38094,7 @@ function captureBlobJournalGuard(value) {
|
|
|
37863
38094
|
sequences.add(row5.sequence);
|
|
37864
38095
|
}
|
|
37865
38096
|
for (const row5 of guard.meta) {
|
|
37866
|
-
if (!
|
|
38097
|
+
if (!object7(row5) || !only3(row5, ["key", "expected"]) || typeof row5.key !== "string" || keys2.has(row5.key)) throw new JournalGuardConflict(guard.key);
|
|
37867
38098
|
keys2.add(row5.key);
|
|
37868
38099
|
assertMetaExpectation(row5.expected);
|
|
37869
38100
|
}
|
|
@@ -37879,10 +38110,10 @@ function assertBlobJournalGuard(expected, actual) {
|
|
|
37879
38110
|
}
|
|
37880
38111
|
function captureBlobMutationOptions(options) {
|
|
37881
38112
|
const captured = captureJournalValue(options);
|
|
37882
|
-
if (!
|
|
38113
|
+
if (!object7(captured) || !only3(captured, ["guard", "meta", "removeMeta"])) throw new JournalGuardConflict("blob");
|
|
37883
38114
|
captured.guard = captureBlobJournalGuard(captured.guard);
|
|
37884
38115
|
const puts = captured.meta ?? [], removals = captured.removeMeta ?? [];
|
|
37885
|
-
if (!Array.isArray(puts) || !Array.isArray(removals) || puts.some((row5) => !
|
|
38116
|
+
if (!Array.isArray(puts) || !Array.isArray(removals) || puts.some((row5) => !object7(row5) || !only3(row5, ["key", "value"]) || typeof row5.key !== "string") || new Set(puts.map((row5) => row5.key)).size !== puts.length || new Set(removals).size !== removals.length || [...puts.map((row5) => row5.key), ...removals].some((key4) => typeof key4 !== "string" || !captured.guard.meta.some((row5) => row5.key === key4)) || removals.some((key4) => puts.some((row5) => row5.key === key4))) throw new JournalGuardConflict(captured.guard.key);
|
|
37886
38117
|
return captured;
|
|
37887
38118
|
}
|
|
37888
38119
|
function assertBlobGuardMatches(view2, guard) {
|
|
@@ -37922,8 +38153,8 @@ function assertBlobSameKeyAdmission(existing, prepared2, unsettled = []) {
|
|
|
37922
38153
|
}
|
|
37923
38154
|
function captureBlobAdmission(prepared2, options) {
|
|
37924
38155
|
const decoded = decodePreparedBlobIntent(prepared2);
|
|
37925
|
-
const { unsettled, ...rest } =
|
|
37926
|
-
const captured = captureBlobMutationOptions(
|
|
38156
|
+
const { unsettled, ...rest } = object7(options) ? options : {};
|
|
38157
|
+
const captured = captureBlobMutationOptions(object7(options) ? rest : options);
|
|
37927
38158
|
if (captured.guard.key !== decoded.intent.key) throw new JournalGuardConflict(decoded.intent.key);
|
|
37928
38159
|
let premise;
|
|
37929
38160
|
if (unsettled !== void 0) {
|
|
@@ -38052,7 +38283,7 @@ function createMemoryBlobJournal(state) {
|
|
|
38052
38283
|
let sequence = 0;
|
|
38053
38284
|
if (state !== void 0) {
|
|
38054
38285
|
const restored = captureJournalValue(state);
|
|
38055
|
-
if (!
|
|
38286
|
+
if (!object7(restored) || !only3(restored, ["intents", "meta", "sequence"]) || !Array.isArray(restored.intents) || !Array.isArray(restored.meta) || !Number.isSafeInteger(restored.sequence) || restored.sequence < 0) throw new TypeError("invalid memory blob journal state");
|
|
38056
38287
|
for (const row5 of restored.intents) {
|
|
38057
38288
|
const captured = captureBlobIntentRecord(row5);
|
|
38058
38289
|
if (intents.has(captured.requestId) || captured.sequence > restored.sequence) throw new TypeError("invalid memory blob journal state");
|
|
@@ -38125,7 +38356,7 @@ function createMemoryBlobJournal(state) {
|
|
|
38125
38356
|
exportState: () => ({ intents: [...intents.values()].sort((a, b) => a.sequence - b.sequence).map((row5) => structuredClone(row5)), meta: [...meta3].map(([key4, value]) => [key4, structuredClone(value)]), sequence })
|
|
38126
38357
|
};
|
|
38127
38358
|
}
|
|
38128
|
-
var BLOB_JOURNAL_BOUNDS, BLOB_NOT_DISPATCHED_CODES,
|
|
38359
|
+
var BLOB_JOURNAL_BOUNDS, BLOB_NOT_DISPATCHED_CODES, object7, only3, timestamp2, DECODED, DECODED_ENTRIES, DECODED_CHARS, decodedChars, BlobAdmissionConflict, NON_ORDINARY_ROOTS, PATCH_KEYS;
|
|
38129
38360
|
var init_blob_journal = __esm({
|
|
38130
38361
|
"../core/src/blob-journal.ts"() {
|
|
38131
38362
|
"use strict";
|
|
@@ -38149,7 +38380,7 @@ var init_blob_journal = __esm({
|
|
|
38149
38380
|
baselineBytes: 16 * 1024
|
|
38150
38381
|
});
|
|
38151
38382
|
BLOB_NOT_DISPATCHED_CODES = Object.freeze(["credentials_unavailable", "credentials_denied", "aborted", "invalid_identity", "precondition_failed"]);
|
|
38152
|
-
|
|
38383
|
+
object7 = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
38153
38384
|
only3 = (v, keys2) => Object.keys(v).every((key4) => keys2.includes(key4));
|
|
38154
38385
|
timestamp2 = (v) => typeof v === "string" && v.length <= 64 && /^\d{4}-\d\d-\d\dT.*(?:Z|[+-]\d\d:\d\d)$/.test(v) && Number.isFinite(Date.parse(v));
|
|
38155
38386
|
DECODED = /* @__PURE__ */ new Map();
|
|
@@ -42226,17 +42457,6 @@ var init_freshness2 = __esm({
|
|
|
42226
42457
|
}
|
|
42227
42458
|
});
|
|
42228
42459
|
|
|
42229
|
-
// ../core/src/document-codec.ts
|
|
42230
|
-
var init_document_codec = __esm({
|
|
42231
|
-
"../core/src/document-codec.ts"() {
|
|
42232
|
-
"use strict";
|
|
42233
|
-
init_define_SUPERBEE_BUILD_IDENTITY();
|
|
42234
|
-
init_define_SUPERBEE_UPDATE_POLICY();
|
|
42235
|
-
init_frontmatter();
|
|
42236
|
-
init_remote_document_codec();
|
|
42237
|
-
}
|
|
42238
|
-
});
|
|
42239
|
-
|
|
42240
42460
|
// ../browser-local/src/body-journal.ts
|
|
42241
42461
|
function jsonBytes(value) {
|
|
42242
42462
|
return new TextEncoder().encode(JSON.stringify(value)).length;
|
|
@@ -49002,12 +49222,12 @@ var init_via = __esm({
|
|
|
49002
49222
|
import path32 from "node:path";
|
|
49003
49223
|
function scopeOf(value) {
|
|
49004
49224
|
const scope = captureJournalValue(value);
|
|
49005
|
-
if (!
|
|
49225
|
+
if (!object8(scope) || !only4(scope, ["origin", "prefix", "bundleId", "workspaceSlug"]) || typeof scope.origin !== "string" || typeof scope.prefix !== "string" || typeof scope.bundleId !== "string" || !(scope.workspaceSlug === null || typeof scope.workspaceSlug === "string")) throw new TypeError("invalid blob sync scope");
|
|
49006
49226
|
return { origin: scope.origin, prefix: scope.prefix, bundleId: scope.bundleId, workspaceSlug: scope.workspaceSlug };
|
|
49007
49227
|
}
|
|
49008
49228
|
function entryOf2(value) {
|
|
49009
49229
|
const row5 = captureJournalValue(value);
|
|
49010
|
-
if (!
|
|
49230
|
+
if (!object8(row5) || !only4(row5, ["key", "head", "placedDigest", "desiredContentType", "placement"]) || typeof row5.key !== "string" || !(row5.placedDigest === null || isContentVersion(row5.placedDigest)) || row5.desiredContentType !== void 0 && !isBlobContentType(row5.desiredContentType)) throw new TypeError("invalid blob sync entry");
|
|
49011
49231
|
captureBlobHead({ key: row5.key, version: `sha256:${"0".repeat(64)}`, contentType: "application/octet-stream" });
|
|
49012
49232
|
const head2 = row5.head === void 0 ? void 0 : row5.head === null ? null : captureBlobHead(row5.head);
|
|
49013
49233
|
if (head2 && head2.key !== row5.key) throw new TypeError("blob sync head key mismatch");
|
|
@@ -49015,13 +49235,13 @@ function entryOf2(value) {
|
|
|
49015
49235
|
return { ...base, ...row5.placement === void 0 ? {} : { placement: placementOf(row5.placement, base) } };
|
|
49016
49236
|
}
|
|
49017
49237
|
function identityOf(value) {
|
|
49018
|
-
if (!
|
|
49238
|
+
if (!object8(value) || !only4(value, ["dev", "ino", "mtimeNs"]) || ![value.dev, value.ino].every((v) => typeof v === "string" && /^[1-9][0-9]{0,31}$/.test(v)) || typeof value.mtimeNs !== "string" || !/^-?[0-9]{1,32}$/.test(value.mtimeNs)) throw new TypeError("invalid placement identity");
|
|
49019
49239
|
return { dev: value.dev, ino: value.ino, mtimeNs: value.mtimeNs };
|
|
49020
49240
|
}
|
|
49021
49241
|
function placementOf(value, base) {
|
|
49022
49242
|
const v = captureJournalValue(value);
|
|
49023
|
-
if (!
|
|
49024
|
-
if (v.original !== null && (!
|
|
49243
|
+
if (!object8(v) || !only4(v, ["id", "operation", "state", "original", "intended", "install", "preimage"]) || typeof v.id !== "string" || !isWriteRequestId(v.id) || !["create", "replace", "delete"].includes(v.operation) || !["pending", "committed"].includes(v.state) || !object8(v.intended) || !only4(v.intended, ["head", "placedDigest"])) throw new TypeError("invalid placement descriptor");
|
|
49244
|
+
if (v.original !== null && (!object8(v.original) || Object.hasOwn(v.original, "placement"))) throw new TypeError("recursive placement original");
|
|
49025
49245
|
const original = v.original === null ? null : entryOf2(v.original);
|
|
49026
49246
|
const head2 = v.intended.head === null ? null : captureBlobHead(v.intended.head);
|
|
49027
49247
|
if (head2 ? head2.key !== base.key || v.intended.placedDigest !== head2.version : v.intended.placedDigest !== null) throw new TypeError("placement intended pins mismatch");
|
|
@@ -49037,7 +49257,7 @@ function placementOf(value, base) {
|
|
|
49037
49257
|
}
|
|
49038
49258
|
function captureBlobSyncMap(value, expectedScope) {
|
|
49039
49259
|
const input = captureJournalValue(value);
|
|
49040
|
-
if (!
|
|
49260
|
+
if (!object8(input) || !only4(input, ["schemaVersion", "scope", "entries", "refusal"]) || input.schemaVersion !== 1 || !Array.isArray(input.entries) || input.entries.length > 1e4) throw new TypeError("invalid blob sync map");
|
|
49041
49261
|
const scope = scopeOf(input.scope);
|
|
49042
49262
|
if (!equalJournalValue(scope, scopeOf(expectedScope))) throw new TypeError("blob sync scope mismatch");
|
|
49043
49263
|
const entries = input.entries.map(entryOf2).sort((a, b) => compareStorageKeys(a.key, b.key));
|
|
@@ -49046,7 +49266,7 @@ function captureBlobSyncMap(value, expectedScope) {
|
|
|
49046
49266
|
const ids = entries.flatMap((entry) => entry.placement ? [entry.placement.id] : []);
|
|
49047
49267
|
if (new Set(ids).size !== ids.length) throw new TypeError("duplicate placement id");
|
|
49048
49268
|
const refusal5 = input.refusal;
|
|
49049
|
-
if (refusal5 !== void 0 && (!
|
|
49269
|
+
if (refusal5 !== void 0 && (!object8(refusal5) || !only4(refusal5, ["deletions", "reason", "digest"]) || !Number.isSafeInteger(refusal5.deletions) || refusal5.deletions < 8 || refusal5.deletions > 1e4 || !["empty-listing", "over-half"].includes(refusal5.reason) || !isContentVersion(refusal5.digest))) throw new TypeError("invalid blob deletion refusal");
|
|
49050
49270
|
const map2 = { schemaVersion: 1, scope, entries, ...refusal5 === void 0 ? {} : { refusal: { deletions: refusal5.deletions, reason: refusal5.reason, digest: refusal5.digest } } };
|
|
49051
49271
|
if (Buffer.byteLength(JSON.stringify(map2), "utf8") > 32 * 1024 * 1024) throw new RangeError("blob sync metadata exceeds byte bound");
|
|
49052
49272
|
return map2;
|
|
@@ -49736,7 +49956,7 @@ async function blobCheckoutStates(folder, store, scope) {
|
|
|
49736
49956
|
}
|
|
49737
49957
|
return out;
|
|
49738
49958
|
}
|
|
49739
|
-
var BLOB_SYNC_META_KEY,
|
|
49959
|
+
var BLOB_SYNC_META_KEY, object8, only4;
|
|
49740
49960
|
var init_blob_sync = __esm({
|
|
49741
49961
|
"../cli/src/hosted/blob-sync.ts"() {
|
|
49742
49962
|
"use strict";
|
|
@@ -49753,7 +49973,7 @@ var init_blob_sync = __esm({
|
|
|
49753
49973
|
init_nofollow_read();
|
|
49754
49974
|
init_command_text();
|
|
49755
49975
|
BLOB_SYNC_META_KEY = "hosted.blob-sync.v1";
|
|
49756
|
-
|
|
49976
|
+
object8 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
49757
49977
|
only4 = (value, keys2) => Object.keys(value).every((key4) => keys2.includes(key4));
|
|
49758
49978
|
}
|
|
49759
49979
|
});
|
|
@@ -55983,8 +56203,8 @@ async function pushChanges(session2, deps2, acceptDeletes, heldSink = {}, public
|
|
|
55983
56203
|
const selectedStore = new Proxy(store, { get(inner, prop) {
|
|
55984
56204
|
if (prop === "listIntents") return async (states2) => {
|
|
55985
56205
|
const rows = await inner.listIntents(states2);
|
|
55986
|
-
const
|
|
55987
|
-
return rows.filter((row5) => !
|
|
56206
|
+
const owners2 = await Promise.all(publicationHolds.map((h) => initialArtifactOwner(store, session2.projection, h.publication)));
|
|
56207
|
+
return rows.filter((row5) => !owners2.some((owner) => owner && equalJournalValue(owner.intent, row5)));
|
|
55988
56208
|
};
|
|
55989
56209
|
const value = Reflect.get(inner, prop, inner);
|
|
55990
56210
|
return typeof value === "function" ? value.bind(inner) : value;
|
|
@@ -67454,8 +67674,8 @@ var require_react_production = __commonJS({
|
|
|
67454
67674
|
function cloneAndReplaceKey(oldElement, newKey) {
|
|
67455
67675
|
return ReactElement(oldElement.type, newKey, oldElement.props);
|
|
67456
67676
|
}
|
|
67457
|
-
function isValidElement(
|
|
67458
|
-
return "object" === typeof
|
|
67677
|
+
function isValidElement(object13) {
|
|
67678
|
+
return "object" === typeof object13 && null !== object13 && object13.$$typeof === REACT_ELEMENT_TYPE;
|
|
67459
67679
|
}
|
|
67460
67680
|
function escape2(key4) {
|
|
67461
67681
|
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
@@ -68031,8 +68251,8 @@ var require_react_development = __commonJS({
|
|
|
68031
68251
|
function validateChildKeys(node2) {
|
|
68032
68252
|
isValidElement(node2) ? node2._store && (node2._store.validated = 1) : "object" === typeof node2 && null !== node2 && node2.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node2._payload.status ? isValidElement(node2._payload.value) && node2._payload.value._store && (node2._payload.value._store.validated = 1) : node2._store && (node2._store.validated = 1));
|
|
68033
68253
|
}
|
|
68034
|
-
function isValidElement(
|
|
68035
|
-
return "object" === typeof
|
|
68254
|
+
function isValidElement(object13) {
|
|
68255
|
+
return "object" === typeof object13 && null !== object13 && object13.$$typeof === REACT_ELEMENT_TYPE;
|
|
68036
68256
|
}
|
|
68037
68257
|
function escape2(key4) {
|
|
68038
68258
|
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
@@ -69013,8 +69233,8 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
69013
69233
|
function validateChildKeys(node2) {
|
|
69014
69234
|
isValidElement(node2) ? node2._store && (node2._store.validated = 1) : "object" === typeof node2 && null !== node2 && node2.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node2._payload.status ? isValidElement(node2._payload.value) && node2._payload.value._store && (node2._payload.value._store.validated = 1) : node2._store && (node2._store.validated = 1));
|
|
69015
69235
|
}
|
|
69016
|
-
function isValidElement(
|
|
69017
|
-
return "object" === typeof
|
|
69236
|
+
function isValidElement(object13) {
|
|
69237
|
+
return "object" === typeof object13 && null !== object13 && object13.$$typeof === REACT_ELEMENT_TYPE;
|
|
69018
69238
|
}
|
|
69019
69239
|
var React = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty2 = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
69020
69240
|
return null;
|
|
@@ -80615,9 +80835,9 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
80615
80835
|
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
80616
80836
|
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
80617
80837
|
}
|
|
80618
|
-
function objectName(
|
|
80619
|
-
|
|
80620
|
-
return
|
|
80838
|
+
function objectName(object13) {
|
|
80839
|
+
object13 = Object.prototype.toString.call(object13);
|
|
80840
|
+
return object13.slice(8, object13.length - 1);
|
|
80621
80841
|
}
|
|
80622
80842
|
function describeKeyForErrorMessage(key4) {
|
|
80623
80843
|
var encodedKey = JSON.stringify(key4);
|
|
@@ -87728,9 +87948,9 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
87728
87948
|
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
87729
87949
|
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
87730
87950
|
}
|
|
87731
|
-
function objectName(
|
|
87732
|
-
|
|
87733
|
-
return
|
|
87951
|
+
function objectName(object13) {
|
|
87952
|
+
object13 = Object.prototype.toString.call(object13);
|
|
87953
|
+
return object13.slice(8, object13.length - 1);
|
|
87734
87954
|
}
|
|
87735
87955
|
function describeKeyForErrorMessage(key4) {
|
|
87736
87956
|
var encodedKey = JSON.stringify(key4);
|
|
@@ -101769,7 +101989,7 @@ function exactKeys3(value, required2, optional2 = []) {
|
|
|
101769
101989
|
const allowed = /* @__PURE__ */ new Set([...required2, ...optional2]);
|
|
101770
101990
|
return required2.every((key4) => Object.hasOwn(value, key4)) && Object.keys(value).every((key4) => allowed.has(key4));
|
|
101771
101991
|
}
|
|
101772
|
-
function
|
|
101992
|
+
function object9(value) {
|
|
101773
101993
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
101774
101994
|
}
|
|
101775
101995
|
function boundedString2(value, max = 4096) {
|
|
@@ -101781,7 +102001,7 @@ function managedUiAuthority(bundleRoot, actor, launchRoot = bundleRoot) {
|
|
|
101781
102001
|
return { key: key4, ...tuple2, launch_root: launchRoot, protocol: MANAGED_UI_PROTOCOL };
|
|
101782
102002
|
}
|
|
101783
102003
|
function validateAuthority(value) {
|
|
101784
|
-
if (!
|
|
102004
|
+
if (!object9(value) || !exactKeys3(value, ["key", "mode", "bundle_root", "launch_root", "actor", "protocol"])) return null;
|
|
101785
102005
|
if (!boundedString2(value.key, 64) || !/^[0-9a-f]{64}$/u.test(value.key)) return null;
|
|
101786
102006
|
if (value.mode !== "dir" || !boundedString2(value.bundle_root) || !path51.isAbsolute(value.bundle_root)) return null;
|
|
101787
102007
|
if (!boundedString2(value.launch_root) || !path51.isAbsolute(value.launch_root)) return null;
|
|
@@ -101799,7 +102019,7 @@ function parseManagedUiRecord(raw) {
|
|
|
101799
102019
|
}
|
|
101800
102020
|
const required2 = ["schema_version", "phase", "operation_id", "authority", "management_secret", "created_at"];
|
|
101801
102021
|
const optional2 = ["host", "port", "browser_token", "launch_nonce", "pid", "started_at"];
|
|
101802
|
-
if (!
|
|
102022
|
+
if (!object9(value) || !exactKeys3(value, required2, optional2)) throw new Error("managed UI record has an unsupported shape");
|
|
101803
102023
|
if (value.schema_version !== MANAGED_UI_RECORD_SCHEMA) throw new Error("managed UI record has an unsupported schema");
|
|
101804
102024
|
if (!(value.phase === "pending" || value.phase === "ready" || value.phase === "adopted" || value.phase === "stopping")) {
|
|
101805
102025
|
throw new Error("managed UI record has an invalid phase");
|
|
@@ -101972,9 +102192,9 @@ async function launchReceipt(state, authority, record19, target3, fetchImpl) {
|
|
|
101972
102192
|
});
|
|
101973
102193
|
if (!response.ok) throw new CliError("RUNTIME", "managed UI refused the one-use browser handoff; stop the exact authority and retry");
|
|
101974
102194
|
const value = response.value;
|
|
101975
|
-
const handoff =
|
|
102195
|
+
const handoff = object9(value) ? value.browser_launch : null;
|
|
101976
102196
|
const destination = browserLaunchDestination(target3);
|
|
101977
|
-
if (!
|
|
102197
|
+
if (!object9(value) || !exactKeys3(value, ["launch_nonce", "destination", "browser_launch"]) || value.launch_nonce !== record19.launch_nonce || value.destination !== destination || !object9(handoff) || !exactKeys3(handoff, ["path", "expires_at"]) || typeof handoff.path !== "string" || !/^\/__ui\/browser-launch#[A-Za-z0-9_-]{43}$/u.test(handoff.path) || typeof handoff.expires_at !== "number" || !Number.isSafeInteger(handoff.expires_at) || handoff.expires_at < 0) {
|
|
101978
102198
|
throw new CliError("RUNTIME", "managed UI returned an invalid one-use browser handoff");
|
|
101979
102199
|
}
|
|
101980
102200
|
return {
|
|
@@ -109953,7 +110173,7 @@ async function runLocalSnapshot(feed, options, deps2 = {}) {
|
|
|
109953
110173
|
}
|
|
109954
110174
|
}
|
|
109955
110175
|
function selectionMap(value) {
|
|
109956
|
-
if (!
|
|
110176
|
+
if (!object10(value) || Object.keys(value).length > 64 || !Object.entries(value).every(([id, file2]) => /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/.test(id) && typeof file2 === "string" && file2.length > 0 && file2.length <= 4096)) throw sourceRefusal("snapshot_selection_invalid");
|
|
109957
110177
|
return Object.fromEntries(Object.entries(value).map(([id, file2]) => [id, String(file2)]));
|
|
109958
110178
|
}
|
|
109959
110179
|
async function checkLocalSnapshot(file2, options, deps2 = {}) {
|
|
@@ -109966,7 +110186,7 @@ async function checkLocalSnapshot(file2, options, deps2 = {}) {
|
|
|
109966
110186
|
} catch {
|
|
109967
110187
|
throw sourceRefusal("snapshot_selection_invalid");
|
|
109968
110188
|
}
|
|
109969
|
-
if (!
|
|
110189
|
+
if (!object10(raw) || !Object.hasOwn(raw, "inputs") || !Object.keys(raw).every((k) => ["inputs", "required_identities"].includes(k))) throw sourceRefusal("snapshot_selection_invalid");
|
|
109970
110190
|
const inputs = selectionMap(raw.inputs), identities2 = raw.required_identities === void 0 ? {} : selectionMap(raw.required_identities);
|
|
109971
110191
|
for (const selected2 of [...Object.values(inputs), ...Object.values(identities2), ...options.settingsFile ? [options.settingsFile] : []]) await guardFile(selected2, home2);
|
|
109972
110192
|
let total = 0;
|
|
@@ -110002,7 +110222,7 @@ async function checkLocalSnapshot(file2, options, deps2 = {}) {
|
|
|
110002
110222
|
return safeError(error51);
|
|
110003
110223
|
}
|
|
110004
110224
|
}
|
|
110005
|
-
var
|
|
110225
|
+
var object10, SUMMARY_MAX_BYTES, SNAPSHOT_ORIGINAL_MAX_BYTES, SELECTION_MAX_BYTES;
|
|
110006
110226
|
var init_snapshot2 = __esm({
|
|
110007
110227
|
"../cli/src/source-local/snapshot.ts"() {
|
|
110008
110228
|
"use strict";
|
|
@@ -110021,7 +110241,7 @@ var init_snapshot2 = __esm({
|
|
|
110021
110241
|
init_private_state_bundle_boundary();
|
|
110022
110242
|
init_run();
|
|
110023
110243
|
init_state();
|
|
110024
|
-
|
|
110244
|
+
object10 = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
110025
110245
|
SUMMARY_MAX_BYTES = 16 * 1024;
|
|
110026
110246
|
SNAPSHOT_ORIGINAL_MAX_BYTES = LOCAL_OPERATION_PROFILES["comparison-v1"].inputBytes;
|
|
110027
110247
|
SELECTION_MAX_BYTES = 64 * 1024;
|
|
@@ -110473,7 +110693,9 @@ import path58 from "node:path";
|
|
|
110473
110693
|
import { pathToFileURL as pathToFileURL2 } from "node:url";
|
|
110474
110694
|
import { promises as fs18 } from "node:fs";
|
|
110475
110695
|
function parseFixture(value) {
|
|
110476
|
-
if (!record16(value) || !keysExactly(value, ["version", "connector", "source", "feed", "documents", "scenarios"], ["spec"]) || value.version !== 1) return void 0;
|
|
110696
|
+
if (!record16(value) || !keysExactly(value, ["version", "connector", "source", "feed", "documents", "scenarios"], ["spec", "readPolicyApproval"]) || value.version !== 1) return void 0;
|
|
110697
|
+
const approval = value.readPolicyApproval;
|
|
110698
|
+
if (approval !== void 0 && (!record16(approval) || !keysExactly(approval, ["contract", "digest"]) || approval.contract !== 1 || typeof approval.digest !== "string")) return void 0;
|
|
110477
110699
|
if (![value.connector, value.source, value.feed].every((v) => typeof v === "string" && v.length > 0 && v.length <= 256)) return void 0;
|
|
110478
110700
|
if (!Array.isArray(value.documents) || value.documents.length > 256 || !Array.isArray(value.scenarios) || value.scenarios.length === 0 || value.scenarios.length > SOURCE_TEST_LIMITS.scenarios) return void 0;
|
|
110479
110701
|
const ids = /* @__PURE__ */ new Set();
|
|
@@ -110572,7 +110794,7 @@ async function testSourceForAuthor(recipeFolder, fixtureFolder, options = {}) {
|
|
|
110572
110794
|
report.profile = { id: profile.id, version: profile.version, kind: profile.kind };
|
|
110573
110795
|
const documents = [...loaded.recipe.docs, ...fixture.documents];
|
|
110574
110796
|
if (new Set(documents.map((doc2) => doc2.id)).size !== documents.length) return fail4("SOURCE_FIXTURE_DUPLICATE_DOCUMENT", "fixture.json", "Fixture documents cannot shadow recipe definitions or each other.");
|
|
110575
|
-
const subject = { connector: selected2.connector, profile, spec: fixture.spec ?? source2, documents, feed: fixture.feed };
|
|
110797
|
+
const subject = { connector: selected2.connector, profile, spec: fixture.spec ?? source2, documents, feed: fixture.feed, readPolicyApproval: fixture.readPolicyApproval };
|
|
110576
110798
|
report.missing = missingScenarios(fixture.scenarios.map((scenario) => scenario.name));
|
|
110577
110799
|
for (const scenario of fixture.scenarios) {
|
|
110578
110800
|
const problems = [];
|
|
@@ -111757,9 +111979,9 @@ function floatSafeRemainder(val, step) {
|
|
|
111757
111979
|
return 0;
|
|
111758
111980
|
return ratio2 - roundedRatio;
|
|
111759
111981
|
}
|
|
111760
|
-
function defineLazy(
|
|
111982
|
+
function defineLazy(object13, key4, getter) {
|
|
111761
111983
|
let value = void 0;
|
|
111762
|
-
Object.defineProperty(
|
|
111984
|
+
Object.defineProperty(object13, key4, {
|
|
111763
111985
|
get() {
|
|
111764
111986
|
if (value === EVALUATING) {
|
|
111765
111987
|
return void 0;
|
|
@@ -111771,7 +111993,7 @@ function defineLazy(object12, key4, getter) {
|
|
|
111771
111993
|
return value;
|
|
111772
111994
|
},
|
|
111773
111995
|
set(v) {
|
|
111774
|
-
Object.defineProperty(
|
|
111996
|
+
Object.defineProperty(object13, key4, {
|
|
111775
111997
|
value: v
|
|
111776
111998
|
// configurable: true,
|
|
111777
111999
|
});
|
|
@@ -124620,7 +124842,7 @@ __export(schemas_exports2, {
|
|
|
124620
124842
|
nullable: () => nullable,
|
|
124621
124843
|
nullish: () => nullish2,
|
|
124622
124844
|
number: () => number2,
|
|
124623
|
-
object: () =>
|
|
124845
|
+
object: () => object11,
|
|
124624
124846
|
optional: () => optional,
|
|
124625
124847
|
partialRecord: () => partialRecord,
|
|
124626
124848
|
pipe: () => pipe,
|
|
@@ -124849,7 +125071,7 @@ function keyof(schema) {
|
|
|
124849
125071
|
const shape3 = schema._zod.def.shape;
|
|
124850
125072
|
return _enum2(Object.keys(shape3));
|
|
124851
125073
|
}
|
|
124852
|
-
function
|
|
125074
|
+
function object11(shape3, params) {
|
|
124853
125075
|
const def = {
|
|
124854
125076
|
type: "object",
|
|
124855
125077
|
shape: shape3 ?? {},
|
|
@@ -126696,7 +126918,7 @@ __export(external_exports, {
|
|
|
126696
126918
|
nullable: () => nullable,
|
|
126697
126919
|
nullish: () => nullish2,
|
|
126698
126920
|
number: () => number2,
|
|
126699
|
-
object: () =>
|
|
126921
|
+
object: () => object11,
|
|
126700
126922
|
optional: () => optional,
|
|
126701
126923
|
overwrite: () => _overwrite,
|
|
126702
126924
|
parse: () => parse5,
|
|
@@ -126834,20 +127056,20 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
126834
127056
|
JSONArraySchema = array(JSONValueSchema);
|
|
126835
127057
|
ProgressTokenSchema = union([string6(), number2().int()]);
|
|
126836
127058
|
CursorSchema = string6();
|
|
126837
|
-
TaskMetadataSchema =
|
|
126838
|
-
RelatedTaskMetadataSchema =
|
|
127059
|
+
TaskMetadataSchema = object11({ ttl: number2().optional() });
|
|
127060
|
+
RelatedTaskMetadataSchema = object11({ taskId: string6() });
|
|
126839
127061
|
RequestMetaSchema = looseObject({
|
|
126840
127062
|
progressToken: ProgressTokenSchema.optional(),
|
|
126841
127063
|
[RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
|
|
126842
127064
|
});
|
|
126843
|
-
BaseRequestParamsSchema =
|
|
127065
|
+
BaseRequestParamsSchema = object11({ _meta: RequestMetaSchema.optional() });
|
|
126844
127066
|
TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({ task: TaskMetadataSchema.optional() });
|
|
126845
|
-
RequestSchema =
|
|
127067
|
+
RequestSchema = object11({
|
|
126846
127068
|
method: string6(),
|
|
126847
127069
|
params: BaseRequestParamsSchema.loose().optional()
|
|
126848
127070
|
});
|
|
126849
|
-
NotificationsParamsSchema =
|
|
126850
|
-
NotificationSchema =
|
|
127071
|
+
NotificationsParamsSchema = object11({ _meta: RequestMetaSchema.optional() });
|
|
127072
|
+
NotificationSchema = object11({
|
|
126851
127073
|
method: string6(),
|
|
126852
127074
|
params: NotificationsParamsSchema.loose().optional()
|
|
126853
127075
|
});
|
|
@@ -126856,24 +127078,24 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
126856
127078
|
} });
|
|
126857
127079
|
ResultSchema = looseObject({ _meta: ResultMetaObjectSchema.optional() });
|
|
126858
127080
|
RequestIdSchema = union([string6(), number2().int()]);
|
|
126859
|
-
JSONRPCRequestSchema =
|
|
127081
|
+
JSONRPCRequestSchema = object11({
|
|
126860
127082
|
jsonrpc: literal(JSONRPC_VERSION),
|
|
126861
127083
|
id: RequestIdSchema,
|
|
126862
127084
|
...RequestSchema.shape
|
|
126863
127085
|
}).strict();
|
|
126864
|
-
JSONRPCNotificationSchema =
|
|
127086
|
+
JSONRPCNotificationSchema = object11({
|
|
126865
127087
|
jsonrpc: literal(JSONRPC_VERSION),
|
|
126866
127088
|
...NotificationSchema.shape
|
|
126867
127089
|
}).strict();
|
|
126868
|
-
JSONRPCResultResponseSchema =
|
|
127090
|
+
JSONRPCResultResponseSchema = object11({
|
|
126869
127091
|
jsonrpc: literal(JSONRPC_VERSION),
|
|
126870
127092
|
id: RequestIdSchema,
|
|
126871
127093
|
result: ResultSchema
|
|
126872
127094
|
}).strict();
|
|
126873
|
-
JSONRPCErrorResponseSchema =
|
|
127095
|
+
JSONRPCErrorResponseSchema = object11({
|
|
126874
127096
|
jsonrpc: literal(JSONRPC_VERSION),
|
|
126875
127097
|
id: RequestIdSchema.optional(),
|
|
126876
|
-
error:
|
|
127098
|
+
error: object11({
|
|
126877
127099
|
code: number2().int(),
|
|
126878
127100
|
message: string6(),
|
|
126879
127101
|
data: unknown2().optional()
|
|
@@ -126895,14 +127117,14 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
126895
127117
|
method: literal("notifications/cancelled"),
|
|
126896
127118
|
params: CancelledNotificationParamsSchema
|
|
126897
127119
|
});
|
|
126898
|
-
IconSchema =
|
|
127120
|
+
IconSchema = object11({
|
|
126899
127121
|
src: string6(),
|
|
126900
127122
|
mimeType: string6().optional(),
|
|
126901
127123
|
sizes: array(string6()).optional(),
|
|
126902
127124
|
theme: _enum2(["light", "dark"]).optional()
|
|
126903
127125
|
});
|
|
126904
|
-
IconsSchema =
|
|
126905
|
-
BaseMetadataSchema =
|
|
127126
|
+
IconsSchema = object11({ icons: array(IconSchema).optional() });
|
|
127127
|
+
BaseMetadataSchema = object11({
|
|
126906
127128
|
name: string6(),
|
|
126907
127129
|
title: string6().optional()
|
|
126908
127130
|
});
|
|
@@ -126913,11 +127135,11 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
126913
127135
|
websiteUrl: string6().optional(),
|
|
126914
127136
|
description: string6().optional()
|
|
126915
127137
|
});
|
|
126916
|
-
FormElicitationCapabilitySchema = intersection(
|
|
127138
|
+
FormElicitationCapabilitySchema = intersection(object11({ applyDefaults: boolean2().optional() }), JSONObjectSchema);
|
|
126917
127139
|
ElicitationCapabilitySchema = preprocess2((value) => {
|
|
126918
127140
|
if (value && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0) return { form: {} };
|
|
126919
127141
|
return value;
|
|
126920
|
-
}, intersection(
|
|
127142
|
+
}, intersection(object11({
|
|
126921
127143
|
form: FormElicitationCapabilitySchema.optional(),
|
|
126922
127144
|
url: JSONObjectSchema.optional()
|
|
126923
127145
|
}), JSONObjectSchema.optional()));
|
|
@@ -126934,14 +127156,14 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
126934
127156
|
cancel: JSONObjectSchema.optional(),
|
|
126935
127157
|
requests: looseObject({ tools: looseObject({ call: JSONObjectSchema.optional() }).optional() }).optional()
|
|
126936
127158
|
});
|
|
126937
|
-
ClientCapabilitiesSchema =
|
|
127159
|
+
ClientCapabilitiesSchema = object11({
|
|
126938
127160
|
experimental: record17(string6(), JSONObjectSchema).optional(),
|
|
126939
|
-
sampling:
|
|
127161
|
+
sampling: object11({
|
|
126940
127162
|
context: JSONObjectSchema.optional(),
|
|
126941
127163
|
tools: JSONObjectSchema.optional()
|
|
126942
127164
|
}).optional(),
|
|
126943
127165
|
elicitation: ElicitationCapabilitySchema.optional(),
|
|
126944
|
-
roots:
|
|
127166
|
+
roots: object11({ listChanged: boolean2().optional() }).optional(),
|
|
126945
127167
|
tasks: ClientTasksCapabilitySchema.optional(),
|
|
126946
127168
|
extensions: record17(string6(), JSONObjectSchema).optional()
|
|
126947
127169
|
});
|
|
@@ -126954,16 +127176,16 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
126954
127176
|
method: literal("initialize"),
|
|
126955
127177
|
params: InitializeRequestParamsSchema
|
|
126956
127178
|
});
|
|
126957
|
-
ServerCapabilitiesSchema =
|
|
127179
|
+
ServerCapabilitiesSchema = object11({
|
|
126958
127180
|
experimental: record17(string6(), JSONObjectSchema).optional(),
|
|
126959
127181
|
logging: JSONObjectSchema.optional(),
|
|
126960
127182
|
completions: JSONObjectSchema.optional(),
|
|
126961
|
-
prompts:
|
|
126962
|
-
resources:
|
|
127183
|
+
prompts: object11({ listChanged: boolean2().optional() }).optional(),
|
|
127184
|
+
resources: object11({
|
|
126963
127185
|
subscribe: boolean2().optional(),
|
|
126964
127186
|
listChanged: boolean2().optional()
|
|
126965
127187
|
}).optional(),
|
|
126966
|
-
tools:
|
|
127188
|
+
tools: object11({ listChanged: boolean2().optional() }).optional(),
|
|
126967
127189
|
tasks: ServerTasksCapabilitySchema.optional(),
|
|
126968
127190
|
extensions: record17(string6(), JSONObjectSchema).optional()
|
|
126969
127191
|
});
|
|
@@ -126990,12 +127212,12 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
126990
127212
|
method: literal("ping"),
|
|
126991
127213
|
params: BaseRequestParamsSchema.optional()
|
|
126992
127214
|
});
|
|
126993
|
-
ProgressSchema =
|
|
127215
|
+
ProgressSchema = object11({
|
|
126994
127216
|
progress: number2(),
|
|
126995
127217
|
total: optional(number2()),
|
|
126996
127218
|
message: optional(string6())
|
|
126997
127219
|
});
|
|
126998
|
-
ProgressNotificationParamsSchema =
|
|
127220
|
+
ProgressNotificationParamsSchema = object11({
|
|
126999
127221
|
...NotificationsParamsSchema.shape,
|
|
127000
127222
|
...ProgressSchema.shape,
|
|
127001
127223
|
progressToken: ProgressTokenSchema
|
|
@@ -127007,7 +127229,7 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127007
127229
|
PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({ cursor: CursorSchema.optional() });
|
|
127008
127230
|
PaginatedRequestSchema = RequestSchema.extend({ params: PaginatedRequestParamsSchema.optional() });
|
|
127009
127231
|
PaginatedResultSchema = ResultSchema.extend({ nextCursor: CursorSchema.optional() });
|
|
127010
|
-
ResourceContentsSchema =
|
|
127232
|
+
ResourceContentsSchema = object11({
|
|
127011
127233
|
uri: string6(),
|
|
127012
127234
|
mimeType: optional(string6()),
|
|
127013
127235
|
_meta: record17(string6(), unknown2()).optional()
|
|
@@ -127023,12 +127245,12 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127023
127245
|
}, { message: "Invalid Base64 string" });
|
|
127024
127246
|
BlobResourceContentsSchema = ResourceContentsSchema.extend({ blob: Base64Schema });
|
|
127025
127247
|
RoleSchema = _enum2(["user", "assistant"]);
|
|
127026
|
-
AnnotationsSchema =
|
|
127248
|
+
AnnotationsSchema = object11({
|
|
127027
127249
|
audience: array(RoleSchema).optional(),
|
|
127028
127250
|
priority: number2().min(0).max(1).optional(),
|
|
127029
127251
|
lastModified: iso_exports.datetime({ offset: true }).optional()
|
|
127030
127252
|
});
|
|
127031
|
-
ResourceSchema =
|
|
127253
|
+
ResourceSchema = object11({
|
|
127032
127254
|
...BaseMetadataSchema.shape,
|
|
127033
127255
|
...IconsSchema.shape,
|
|
127034
127256
|
uri: string6(),
|
|
@@ -127038,7 +127260,7 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127038
127260
|
annotations: AnnotationsSchema.optional(),
|
|
127039
127261
|
_meta: optional(looseObject({}))
|
|
127040
127262
|
});
|
|
127041
|
-
ResourceTemplateSchema =
|
|
127263
|
+
ResourceTemplateSchema = object11({
|
|
127042
127264
|
...BaseMetadataSchema.shape,
|
|
127043
127265
|
...IconsSchema.shape,
|
|
127044
127266
|
uriTemplate: string6(),
|
|
@@ -127072,7 +127294,7 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127072
127294
|
method: literal("resources/unsubscribe"),
|
|
127073
127295
|
params: UnsubscribeRequestParamsSchema
|
|
127074
127296
|
});
|
|
127075
|
-
SubscriptionFilterSchema =
|
|
127297
|
+
SubscriptionFilterSchema = object11({
|
|
127076
127298
|
toolsListChanged: boolean2().optional(),
|
|
127077
127299
|
promptsListChanged: boolean2().optional(),
|
|
127078
127300
|
resourcesListChanged: boolean2().optional(),
|
|
@@ -127095,12 +127317,12 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127095
127317
|
method: literal("notifications/resources/updated"),
|
|
127096
127318
|
params: ResourceUpdatedNotificationParamsSchema
|
|
127097
127319
|
});
|
|
127098
|
-
PromptArgumentSchema =
|
|
127320
|
+
PromptArgumentSchema = object11({
|
|
127099
127321
|
name: string6(),
|
|
127100
127322
|
description: optional(string6()),
|
|
127101
127323
|
required: optional(boolean2())
|
|
127102
127324
|
});
|
|
127103
|
-
PromptSchema =
|
|
127325
|
+
PromptSchema = object11({
|
|
127104
127326
|
...BaseMetadataSchema.shape,
|
|
127105
127327
|
...IconsSchema.shape,
|
|
127106
127328
|
description: optional(string6()),
|
|
@@ -127117,34 +127339,34 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127117
127339
|
method: literal("prompts/get"),
|
|
127118
127340
|
params: GetPromptRequestParamsSchema
|
|
127119
127341
|
});
|
|
127120
|
-
TextContentSchema =
|
|
127342
|
+
TextContentSchema = object11({
|
|
127121
127343
|
type: literal("text"),
|
|
127122
127344
|
text: string6(),
|
|
127123
127345
|
annotations: AnnotationsSchema.optional(),
|
|
127124
127346
|
_meta: record17(string6(), unknown2()).optional()
|
|
127125
127347
|
});
|
|
127126
|
-
ImageContentSchema =
|
|
127348
|
+
ImageContentSchema = object11({
|
|
127127
127349
|
type: literal("image"),
|
|
127128
127350
|
data: Base64Schema,
|
|
127129
127351
|
mimeType: string6(),
|
|
127130
127352
|
annotations: AnnotationsSchema.optional(),
|
|
127131
127353
|
_meta: record17(string6(), unknown2()).optional()
|
|
127132
127354
|
});
|
|
127133
|
-
AudioContentSchema =
|
|
127355
|
+
AudioContentSchema = object11({
|
|
127134
127356
|
type: literal("audio"),
|
|
127135
127357
|
data: Base64Schema,
|
|
127136
127358
|
mimeType: string6(),
|
|
127137
127359
|
annotations: AnnotationsSchema.optional(),
|
|
127138
127360
|
_meta: record17(string6(), unknown2()).optional()
|
|
127139
127361
|
});
|
|
127140
|
-
ToolUseContentSchema =
|
|
127362
|
+
ToolUseContentSchema = object11({
|
|
127141
127363
|
type: literal("tool_use"),
|
|
127142
127364
|
name: string6(),
|
|
127143
127365
|
id: string6(),
|
|
127144
127366
|
input: record17(string6(), unknown2()),
|
|
127145
127367
|
_meta: record17(string6(), unknown2()).optional()
|
|
127146
127368
|
});
|
|
127147
|
-
EmbeddedResourceSchema =
|
|
127369
|
+
EmbeddedResourceSchema = object11({
|
|
127148
127370
|
type: literal("resource"),
|
|
127149
127371
|
resource: union([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
127150
127372
|
annotations: AnnotationsSchema.optional(),
|
|
@@ -127158,7 +127380,7 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127158
127380
|
ResourceLinkSchema,
|
|
127159
127381
|
EmbeddedResourceSchema
|
|
127160
127382
|
]);
|
|
127161
|
-
PromptMessageSchema =
|
|
127383
|
+
PromptMessageSchema = object11({
|
|
127162
127384
|
role: RoleSchema,
|
|
127163
127385
|
content: ContentBlockSchema
|
|
127164
127386
|
});
|
|
@@ -127170,23 +127392,23 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127170
127392
|
method: literal("notifications/prompts/list_changed"),
|
|
127171
127393
|
params: NotificationsParamsSchema.optional()
|
|
127172
127394
|
});
|
|
127173
|
-
ToolAnnotationsSchema =
|
|
127395
|
+
ToolAnnotationsSchema = object11({
|
|
127174
127396
|
title: string6().optional(),
|
|
127175
127397
|
readOnlyHint: boolean2().optional(),
|
|
127176
127398
|
destructiveHint: boolean2().optional(),
|
|
127177
127399
|
idempotentHint: boolean2().optional(),
|
|
127178
127400
|
openWorldHint: boolean2().optional()
|
|
127179
127401
|
});
|
|
127180
|
-
ToolExecutionSchema =
|
|
127402
|
+
ToolExecutionSchema = object11({ taskSupport: _enum2([
|
|
127181
127403
|
"required",
|
|
127182
127404
|
"optional",
|
|
127183
127405
|
"forbidden"
|
|
127184
127406
|
]).optional() });
|
|
127185
|
-
ToolSchema =
|
|
127407
|
+
ToolSchema = object11({
|
|
127186
127408
|
...BaseMetadataSchema.shape,
|
|
127187
127409
|
...IconsSchema.shape,
|
|
127188
127410
|
description: string6().optional(),
|
|
127189
|
-
inputSchema:
|
|
127411
|
+
inputSchema: object11({
|
|
127190
127412
|
type: literal("object"),
|
|
127191
127413
|
properties: record17(string6(), JSONValueSchema).optional(),
|
|
127192
127414
|
required: array(string6()).optional()
|
|
@@ -127216,7 +127438,7 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127216
127438
|
method: literal("notifications/tools/list_changed"),
|
|
127217
127439
|
params: NotificationsParamsSchema.optional()
|
|
127218
127440
|
});
|
|
127219
|
-
ListChangedOptionsBaseSchema =
|
|
127441
|
+
ListChangedOptionsBaseSchema = object11({
|
|
127220
127442
|
autoRefresh: boolean2().default(true),
|
|
127221
127443
|
debounceMs: number2().int().nonnegative().default(300)
|
|
127222
127444
|
});
|
|
@@ -127244,19 +127466,19 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127244
127466
|
method: literal("notifications/message"),
|
|
127245
127467
|
params: LoggingMessageNotificationParamsSchema
|
|
127246
127468
|
});
|
|
127247
|
-
ModelHintSchema =
|
|
127248
|
-
ModelPreferencesSchema =
|
|
127469
|
+
ModelHintSchema = object11({ name: string6().optional() });
|
|
127470
|
+
ModelPreferencesSchema = object11({
|
|
127249
127471
|
hints: array(ModelHintSchema).optional(),
|
|
127250
127472
|
costPriority: number2().min(0).max(1).optional(),
|
|
127251
127473
|
speedPriority: number2().min(0).max(1).optional(),
|
|
127252
127474
|
intelligencePriority: number2().min(0).max(1).optional()
|
|
127253
127475
|
});
|
|
127254
|
-
ToolChoiceSchema =
|
|
127476
|
+
ToolChoiceSchema = object11({ mode: _enum2([
|
|
127255
127477
|
"auto",
|
|
127256
127478
|
"required",
|
|
127257
127479
|
"none"
|
|
127258
127480
|
]).optional() });
|
|
127259
|
-
ToolResultContentSchema =
|
|
127481
|
+
ToolResultContentSchema = object11({
|
|
127260
127482
|
type: literal("tool_result"),
|
|
127261
127483
|
toolUseId: string6().describe("The unique identifier for the corresponding tool call."),
|
|
127262
127484
|
content: array(ContentBlockSchema),
|
|
@@ -127276,7 +127498,7 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127276
127498
|
ToolUseContentSchema,
|
|
127277
127499
|
ToolResultContentSchema
|
|
127278
127500
|
]);
|
|
127279
|
-
SamplingMessageSchema =
|
|
127501
|
+
SamplingMessageSchema = object11({
|
|
127280
127502
|
role: RoleSchema,
|
|
127281
127503
|
content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)]),
|
|
127282
127504
|
_meta: record17(string6(), unknown2()).optional()
|
|
@@ -127322,13 +127544,13 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127322
127544
|
role: RoleSchema,
|
|
127323
127545
|
content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)])
|
|
127324
127546
|
});
|
|
127325
|
-
BooleanSchemaSchema =
|
|
127547
|
+
BooleanSchemaSchema = object11({
|
|
127326
127548
|
type: literal("boolean"),
|
|
127327
127549
|
title: string6().optional(),
|
|
127328
127550
|
description: string6().optional(),
|
|
127329
127551
|
default: boolean2().optional()
|
|
127330
127552
|
});
|
|
127331
|
-
StringSchemaSchema =
|
|
127553
|
+
StringSchemaSchema = object11({
|
|
127332
127554
|
type: literal("string"),
|
|
127333
127555
|
title: string6().optional(),
|
|
127334
127556
|
description: string6().optional(),
|
|
@@ -127342,7 +127564,7 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127342
127564
|
]).optional(),
|
|
127343
127565
|
default: string6().optional()
|
|
127344
127566
|
});
|
|
127345
|
-
NumberSchemaSchema =
|
|
127567
|
+
NumberSchemaSchema = object11({
|
|
127346
127568
|
type: _enum2(["number", "integer"]),
|
|
127347
127569
|
title: string6().optional(),
|
|
127348
127570
|
description: string6().optional(),
|
|
@@ -127350,24 +127572,24 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127350
127572
|
maximum: number2().optional(),
|
|
127351
127573
|
default: number2().optional()
|
|
127352
127574
|
});
|
|
127353
|
-
UntitledSingleSelectEnumSchemaSchema =
|
|
127575
|
+
UntitledSingleSelectEnumSchemaSchema = object11({
|
|
127354
127576
|
type: literal("string"),
|
|
127355
127577
|
title: string6().optional(),
|
|
127356
127578
|
description: string6().optional(),
|
|
127357
127579
|
enum: array(string6()),
|
|
127358
127580
|
default: string6().optional()
|
|
127359
127581
|
});
|
|
127360
|
-
TitledSingleSelectEnumSchemaSchema =
|
|
127582
|
+
TitledSingleSelectEnumSchemaSchema = object11({
|
|
127361
127583
|
type: literal("string"),
|
|
127362
127584
|
title: string6().optional(),
|
|
127363
127585
|
description: string6().optional(),
|
|
127364
|
-
oneOf: array(
|
|
127586
|
+
oneOf: array(object11({
|
|
127365
127587
|
const: string6(),
|
|
127366
127588
|
title: string6()
|
|
127367
127589
|
})),
|
|
127368
127590
|
default: string6().optional()
|
|
127369
127591
|
});
|
|
127370
|
-
LegacyTitledEnumSchemaSchema =
|
|
127592
|
+
LegacyTitledEnumSchemaSchema = object11({
|
|
127371
127593
|
type: literal("string"),
|
|
127372
127594
|
title: string6().optional(),
|
|
127373
127595
|
description: string6().optional(),
|
|
@@ -127376,25 +127598,25 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127376
127598
|
default: string6().optional()
|
|
127377
127599
|
});
|
|
127378
127600
|
SingleSelectEnumSchemaSchema = union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
|
|
127379
|
-
UntitledMultiSelectEnumSchemaSchema =
|
|
127601
|
+
UntitledMultiSelectEnumSchemaSchema = object11({
|
|
127380
127602
|
type: literal("array"),
|
|
127381
127603
|
title: string6().optional(),
|
|
127382
127604
|
description: string6().optional(),
|
|
127383
127605
|
minItems: number2().optional(),
|
|
127384
127606
|
maxItems: number2().optional(),
|
|
127385
|
-
items:
|
|
127607
|
+
items: object11({
|
|
127386
127608
|
type: literal("string"),
|
|
127387
127609
|
enum: array(string6())
|
|
127388
127610
|
}),
|
|
127389
127611
|
default: array(string6()).optional()
|
|
127390
127612
|
});
|
|
127391
|
-
TitledMultiSelectEnumSchemaSchema =
|
|
127613
|
+
TitledMultiSelectEnumSchemaSchema = object11({
|
|
127392
127614
|
type: literal("array"),
|
|
127393
127615
|
title: string6().optional(),
|
|
127394
127616
|
description: string6().optional(),
|
|
127395
127617
|
minItems: number2().optional(),
|
|
127396
127618
|
maxItems: number2().optional(),
|
|
127397
|
-
items:
|
|
127619
|
+
items: object11({ anyOf: array(object11({
|
|
127398
127620
|
const: string6(),
|
|
127399
127621
|
title: string6()
|
|
127400
127622
|
})) }),
|
|
@@ -127415,7 +127637,7 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127415
127637
|
ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
127416
127638
|
mode: literal("form").optional(),
|
|
127417
127639
|
message: string6(),
|
|
127418
|
-
requestedSchema:
|
|
127640
|
+
requestedSchema: object11({
|
|
127419
127641
|
type: literal("object"),
|
|
127420
127642
|
properties: record17(string6(), PrimitiveSchemaDefinitionSchema),
|
|
127421
127643
|
required: array(string6()).optional()
|
|
@@ -127450,21 +127672,21 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127450
127672
|
array(string6())
|
|
127451
127673
|
])).optional())
|
|
127452
127674
|
});
|
|
127453
|
-
ResourceTemplateReferenceSchema =
|
|
127675
|
+
ResourceTemplateReferenceSchema = object11({
|
|
127454
127676
|
type: literal("ref/resource"),
|
|
127455
127677
|
uri: string6()
|
|
127456
127678
|
});
|
|
127457
|
-
PromptReferenceSchema =
|
|
127679
|
+
PromptReferenceSchema = object11({
|
|
127458
127680
|
type: literal("ref/prompt"),
|
|
127459
127681
|
name: string6()
|
|
127460
127682
|
});
|
|
127461
127683
|
CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
127462
127684
|
ref: union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
|
|
127463
|
-
argument:
|
|
127685
|
+
argument: object11({
|
|
127464
127686
|
name: string6(),
|
|
127465
127687
|
value: string6()
|
|
127466
127688
|
}),
|
|
127467
|
-
context:
|
|
127689
|
+
context: object11({ arguments: record17(string6(), string6()).optional() }).optional()
|
|
127468
127690
|
});
|
|
127469
127691
|
CompleteRequestSchema = RequestSchema.extend({
|
|
127470
127692
|
method: literal("completion/complete"),
|
|
@@ -127475,7 +127697,7 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127475
127697
|
total: optional(number2().int()),
|
|
127476
127698
|
hasMore: optional(boolean2())
|
|
127477
127699
|
}) });
|
|
127478
|
-
RootSchema =
|
|
127700
|
+
RootSchema = object11({
|
|
127479
127701
|
uri: string6().startsWith("file://"),
|
|
127480
127702
|
name: string6().optional(),
|
|
127481
127703
|
_meta: record17(string6(), unknown2()).optional()
|
|
@@ -127500,7 +127722,7 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127500
127722
|
"failed",
|
|
127501
127723
|
"cancelled"
|
|
127502
127724
|
]);
|
|
127503
|
-
TaskSchema =
|
|
127725
|
+
TaskSchema = object11({
|
|
127504
127726
|
taskId: string6(),
|
|
127505
127727
|
status: TaskStatusSchema,
|
|
127506
127728
|
ttl: union([number2(), _null3()]),
|
|
@@ -127684,11 +127906,11 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127684
127906
|
client_id_metadata_document_supported: boolean2().optional(),
|
|
127685
127907
|
authorization_response_iss_parameter_supported: boolean2().optional().catch(void 0)
|
|
127686
127908
|
});
|
|
127687
|
-
OpenIdProviderDiscoveryMetadataSchema =
|
|
127909
|
+
OpenIdProviderDiscoveryMetadataSchema = object11({
|
|
127688
127910
|
...OpenIdProviderMetadataSchema.shape,
|
|
127689
127911
|
...OAuthMetadataSchema.pick({ code_challenge_methods_supported: true }).shape
|
|
127690
127912
|
});
|
|
127691
|
-
OAuthTokensSchema =
|
|
127913
|
+
OAuthTokensSchema = object11({
|
|
127692
127914
|
access_token: string6(),
|
|
127693
127915
|
id_token: string6().optional(),
|
|
127694
127916
|
token_type: string6(),
|
|
@@ -127697,20 +127919,20 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127697
127919
|
refresh_token: string6().optional(),
|
|
127698
127920
|
issuer: string6().optional().catch(void 0)
|
|
127699
127921
|
}).strip();
|
|
127700
|
-
IdJagTokenExchangeResponseSchema =
|
|
127922
|
+
IdJagTokenExchangeResponseSchema = object11({
|
|
127701
127923
|
issued_token_type: literal("urn:ietf:params:oauth:token-type:id-jag"),
|
|
127702
127924
|
access_token: string6(),
|
|
127703
127925
|
token_type: string6().optional(),
|
|
127704
127926
|
expires_in: number2().optional(),
|
|
127705
127927
|
scope: string6().optional()
|
|
127706
127928
|
}).strip();
|
|
127707
|
-
OAuthErrorResponseSchema =
|
|
127929
|
+
OAuthErrorResponseSchema = object11({
|
|
127708
127930
|
error: string6(),
|
|
127709
127931
|
error_description: string6().optional(),
|
|
127710
127932
|
error_uri: string6().optional()
|
|
127711
127933
|
});
|
|
127712
127934
|
OptionalSafeUrlSchema = SafeUrlSchema.optional().or(literal("").transform(() => void 0));
|
|
127713
|
-
OAuthClientMetadataSchema =
|
|
127935
|
+
OAuthClientMetadataSchema = object11({
|
|
127714
127936
|
redirect_uris: array(SafeUrlSchema),
|
|
127715
127937
|
token_endpoint_auth_method: string6().optional(),
|
|
127716
127938
|
grant_types: array(string6()).optional(),
|
|
@@ -127729,7 +127951,7 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127729
127951
|
software_version: string6().optional(),
|
|
127730
127952
|
software_statement: string6().optional()
|
|
127731
127953
|
}).strip();
|
|
127732
|
-
OAuthClientInformationSchema =
|
|
127954
|
+
OAuthClientInformationSchema = object11({
|
|
127733
127955
|
client_id: string6(),
|
|
127734
127956
|
client_secret: string6().optional(),
|
|
127735
127957
|
client_id_issued_at: number2().optional(),
|
|
@@ -127737,11 +127959,11 @@ var init_auth_BNDyLTqp = __esm({
|
|
|
127737
127959
|
issuer: string6().optional().catch(void 0)
|
|
127738
127960
|
}).strip();
|
|
127739
127961
|
OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
|
|
127740
|
-
OAuthClientRegistrationErrorSchema =
|
|
127962
|
+
OAuthClientRegistrationErrorSchema = object11({
|
|
127741
127963
|
error: string6(),
|
|
127742
127964
|
error_description: string6().optional()
|
|
127743
127965
|
}).strip();
|
|
127744
|
-
OAuthTokenRevocationRequestSchema =
|
|
127966
|
+
OAuthTokenRevocationRequestSchema = object11({
|
|
127745
127967
|
token: string6(),
|
|
127746
127968
|
token_type_hint: string6().optional()
|
|
127747
127969
|
}).strip();
|
|
@@ -127863,20 +128085,20 @@ function build$1() {
|
|
|
127863
128085
|
const JSONObjectSchema$1 = record17(string6(), JSONValueSchema$1);
|
|
127864
128086
|
const ProgressTokenSchema$1 = union([string6(), number2().int()]);
|
|
127865
128087
|
const CursorSchema$1 = string6();
|
|
127866
|
-
const TaskMetadataSchema$1 =
|
|
127867
|
-
const RelatedTaskMetadataSchema$1 =
|
|
128088
|
+
const TaskMetadataSchema$1 = object11({ ttl: number2().optional() });
|
|
128089
|
+
const RelatedTaskMetadataSchema$1 = object11({ taskId: string6() });
|
|
127868
128090
|
const RequestMetaSchema$1 = looseObject({
|
|
127869
128091
|
progressToken: ProgressTokenSchema$1.optional(),
|
|
127870
128092
|
"io.modelcontextprotocol/related-task": RelatedTaskMetadataSchema$1.optional()
|
|
127871
128093
|
});
|
|
127872
|
-
const BaseRequestParamsSchema$1 =
|
|
128094
|
+
const BaseRequestParamsSchema$1 = object11({ _meta: RequestMetaSchema$1.optional() });
|
|
127873
128095
|
const TaskAugmentedRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ task: TaskMetadataSchema$1.optional() });
|
|
127874
|
-
const RequestSchema$1 =
|
|
128096
|
+
const RequestSchema$1 = object11({
|
|
127875
128097
|
method: string6(),
|
|
127876
128098
|
params: BaseRequestParamsSchema$1.loose().optional()
|
|
127877
128099
|
});
|
|
127878
|
-
const NotificationsParamsSchema$1 =
|
|
127879
|
-
const NotificationSchema$1 =
|
|
128100
|
+
const NotificationsParamsSchema$1 = object11({ _meta: RequestMetaSchema$1.optional() });
|
|
128101
|
+
const NotificationSchema$1 = object11({
|
|
127880
128102
|
method: string6(),
|
|
127881
128103
|
params: NotificationsParamsSchema$1.loose().optional()
|
|
127882
128104
|
});
|
|
@@ -127891,14 +128113,14 @@ function build$1() {
|
|
|
127891
128113
|
method: literal("notifications/cancelled"),
|
|
127892
128114
|
params: CancelledNotificationParamsSchema$1
|
|
127893
128115
|
});
|
|
127894
|
-
const IconSchema$1 =
|
|
128116
|
+
const IconSchema$1 = object11({
|
|
127895
128117
|
src: string6(),
|
|
127896
128118
|
mimeType: string6().optional(),
|
|
127897
128119
|
sizes: array(string6()).optional(),
|
|
127898
128120
|
theme: _enum2(["light", "dark"]).optional()
|
|
127899
128121
|
});
|
|
127900
|
-
const IconsSchema$1 =
|
|
127901
|
-
const BaseMetadataSchema$1 =
|
|
128122
|
+
const IconsSchema$1 = object11({ icons: array(IconSchema$1).optional() });
|
|
128123
|
+
const BaseMetadataSchema$1 = object11({
|
|
127902
128124
|
name: string6(),
|
|
127903
128125
|
title: string6().optional()
|
|
127904
128126
|
});
|
|
@@ -127909,11 +128131,11 @@ function build$1() {
|
|
|
127909
128131
|
websiteUrl: string6().optional(),
|
|
127910
128132
|
description: string6().optional()
|
|
127911
128133
|
});
|
|
127912
|
-
const FormElicitationCapabilitySchema2 = intersection(
|
|
128134
|
+
const FormElicitationCapabilitySchema2 = intersection(object11({ applyDefaults: boolean2().optional() }), JSONObjectSchema$1);
|
|
127913
128135
|
const ElicitationCapabilitySchema2 = preprocess2((value) => {
|
|
127914
128136
|
if (value && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0) return { form: {} };
|
|
127915
128137
|
return value;
|
|
127916
|
-
}, intersection(
|
|
128138
|
+
}, intersection(object11({
|
|
127917
128139
|
form: FormElicitationCapabilitySchema2.optional(),
|
|
127918
128140
|
url: JSONObjectSchema$1.optional()
|
|
127919
128141
|
}), JSONObjectSchema$1.optional()));
|
|
@@ -127930,14 +128152,14 @@ function build$1() {
|
|
|
127930
128152
|
cancel: JSONObjectSchema$1.optional(),
|
|
127931
128153
|
requests: looseObject({ tools: looseObject({ call: JSONObjectSchema$1.optional() }).optional() }).optional()
|
|
127932
128154
|
});
|
|
127933
|
-
const ClientCapabilitiesSchema$1 =
|
|
128155
|
+
const ClientCapabilitiesSchema$1 = object11({
|
|
127934
128156
|
experimental: record17(string6(), JSONObjectSchema$1).optional(),
|
|
127935
|
-
sampling:
|
|
128157
|
+
sampling: object11({
|
|
127936
128158
|
context: JSONObjectSchema$1.optional(),
|
|
127937
128159
|
tools: JSONObjectSchema$1.optional()
|
|
127938
128160
|
}).optional(),
|
|
127939
128161
|
elicitation: ElicitationCapabilitySchema2.optional(),
|
|
127940
|
-
roots:
|
|
128162
|
+
roots: object11({ listChanged: boolean2().optional() }).optional(),
|
|
127941
128163
|
tasks: ClientTasksCapabilitySchema$1.optional(),
|
|
127942
128164
|
extensions: record17(string6(), JSONObjectSchema$1).optional()
|
|
127943
128165
|
});
|
|
@@ -127950,16 +128172,16 @@ function build$1() {
|
|
|
127950
128172
|
method: literal("initialize"),
|
|
127951
128173
|
params: InitializeRequestParamsSchema$1
|
|
127952
128174
|
});
|
|
127953
|
-
const ServerCapabilitiesSchema$1 =
|
|
128175
|
+
const ServerCapabilitiesSchema$1 = object11({
|
|
127954
128176
|
experimental: record17(string6(), JSONObjectSchema$1).optional(),
|
|
127955
128177
|
logging: JSONObjectSchema$1.optional(),
|
|
127956
128178
|
completions: JSONObjectSchema$1.optional(),
|
|
127957
|
-
prompts:
|
|
127958
|
-
resources:
|
|
128179
|
+
prompts: object11({ listChanged: boolean2().optional() }).optional(),
|
|
128180
|
+
resources: object11({
|
|
127959
128181
|
subscribe: boolean2().optional(),
|
|
127960
128182
|
listChanged: boolean2().optional()
|
|
127961
128183
|
}).optional(),
|
|
127962
|
-
tools:
|
|
128184
|
+
tools: object11({ listChanged: boolean2().optional() }).optional(),
|
|
127963
128185
|
tasks: ServerTasksCapabilitySchema$1.optional(),
|
|
127964
128186
|
extensions: record17(string6(), JSONObjectSchema$1).optional()
|
|
127965
128187
|
});
|
|
@@ -127977,12 +128199,12 @@ function build$1() {
|
|
|
127977
128199
|
method: literal("ping"),
|
|
127978
128200
|
params: BaseRequestParamsSchema$1.optional()
|
|
127979
128201
|
});
|
|
127980
|
-
const ProgressSchema$1 =
|
|
128202
|
+
const ProgressSchema$1 = object11({
|
|
127981
128203
|
progress: number2(),
|
|
127982
128204
|
total: optional(number2()),
|
|
127983
128205
|
message: optional(string6())
|
|
127984
128206
|
});
|
|
127985
|
-
const ProgressNotificationParamsSchema$1 =
|
|
128207
|
+
const ProgressNotificationParamsSchema$1 = object11({
|
|
127986
128208
|
...NotificationsParamsSchema$1.shape,
|
|
127987
128209
|
...ProgressSchema$1.shape,
|
|
127988
128210
|
progressToken: ProgressTokenSchema$1
|
|
@@ -127994,7 +128216,7 @@ function build$1() {
|
|
|
127994
128216
|
const PaginatedRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ cursor: CursorSchema$1.optional() });
|
|
127995
128217
|
const PaginatedRequestSchema$1 = RequestSchema$1.extend({ params: PaginatedRequestParamsSchema$1.optional() });
|
|
127996
128218
|
const PaginatedResultSchema$1 = ResultSchema$1.extend({ nextCursor: CursorSchema$1.optional() });
|
|
127997
|
-
const ResourceContentsSchema$1 =
|
|
128219
|
+
const ResourceContentsSchema$1 = object11({
|
|
127998
128220
|
uri: string6(),
|
|
127999
128221
|
mimeType: optional(string6()),
|
|
128000
128222
|
_meta: record17(string6(), unknown2()).optional()
|
|
@@ -128010,12 +128232,12 @@ function build$1() {
|
|
|
128010
128232
|
}, { message: "Invalid Base64 string" });
|
|
128011
128233
|
const BlobResourceContentsSchema$1 = ResourceContentsSchema$1.extend({ blob: Base64Schema2 });
|
|
128012
128234
|
const RoleSchema$1 = _enum2(["user", "assistant"]);
|
|
128013
|
-
const AnnotationsSchema$1 =
|
|
128235
|
+
const AnnotationsSchema$1 = object11({
|
|
128014
128236
|
audience: array(RoleSchema$1).optional(),
|
|
128015
128237
|
priority: number2().min(0).max(1).optional(),
|
|
128016
128238
|
lastModified: iso_exports.datetime({ offset: true }).optional()
|
|
128017
128239
|
});
|
|
128018
|
-
const ResourceSchema$1 =
|
|
128240
|
+
const ResourceSchema$1 = object11({
|
|
128019
128241
|
...BaseMetadataSchema$1.shape,
|
|
128020
128242
|
...IconsSchema$1.shape,
|
|
128021
128243
|
uri: string6(),
|
|
@@ -128025,7 +128247,7 @@ function build$1() {
|
|
|
128025
128247
|
annotations: AnnotationsSchema$1.optional(),
|
|
128026
128248
|
_meta: optional(looseObject({}))
|
|
128027
128249
|
});
|
|
128028
|
-
const ResourceTemplateSchema$1 =
|
|
128250
|
+
const ResourceTemplateSchema$1 = object11({
|
|
128029
128251
|
...BaseMetadataSchema$1.shape,
|
|
128030
128252
|
...IconsSchema$1.shape,
|
|
128031
128253
|
uriTemplate: string6(),
|
|
@@ -128064,12 +128286,12 @@ function build$1() {
|
|
|
128064
128286
|
method: literal("notifications/resources/updated"),
|
|
128065
128287
|
params: ResourceUpdatedNotificationParamsSchema$1
|
|
128066
128288
|
});
|
|
128067
|
-
const PromptArgumentSchema$1 =
|
|
128289
|
+
const PromptArgumentSchema$1 = object11({
|
|
128068
128290
|
name: string6(),
|
|
128069
128291
|
description: optional(string6()),
|
|
128070
128292
|
required: optional(boolean2())
|
|
128071
128293
|
});
|
|
128072
|
-
const PromptSchema$1 =
|
|
128294
|
+
const PromptSchema$1 = object11({
|
|
128073
128295
|
...BaseMetadataSchema$1.shape,
|
|
128074
128296
|
...IconsSchema$1.shape,
|
|
128075
128297
|
description: optional(string6()),
|
|
@@ -128086,34 +128308,34 @@ function build$1() {
|
|
|
128086
128308
|
method: literal("prompts/get"),
|
|
128087
128309
|
params: GetPromptRequestParamsSchema$1
|
|
128088
128310
|
});
|
|
128089
|
-
const TextContentSchema$1 =
|
|
128311
|
+
const TextContentSchema$1 = object11({
|
|
128090
128312
|
type: literal("text"),
|
|
128091
128313
|
text: string6(),
|
|
128092
128314
|
annotations: AnnotationsSchema$1.optional(),
|
|
128093
128315
|
_meta: record17(string6(), unknown2()).optional()
|
|
128094
128316
|
});
|
|
128095
|
-
const ImageContentSchema$1 =
|
|
128317
|
+
const ImageContentSchema$1 = object11({
|
|
128096
128318
|
type: literal("image"),
|
|
128097
128319
|
data: Base64Schema2,
|
|
128098
128320
|
mimeType: string6(),
|
|
128099
128321
|
annotations: AnnotationsSchema$1.optional(),
|
|
128100
128322
|
_meta: record17(string6(), unknown2()).optional()
|
|
128101
128323
|
});
|
|
128102
|
-
const AudioContentSchema$1 =
|
|
128324
|
+
const AudioContentSchema$1 = object11({
|
|
128103
128325
|
type: literal("audio"),
|
|
128104
128326
|
data: Base64Schema2,
|
|
128105
128327
|
mimeType: string6(),
|
|
128106
128328
|
annotations: AnnotationsSchema$1.optional(),
|
|
128107
128329
|
_meta: record17(string6(), unknown2()).optional()
|
|
128108
128330
|
});
|
|
128109
|
-
const ToolUseContentSchema$1 =
|
|
128331
|
+
const ToolUseContentSchema$1 = object11({
|
|
128110
128332
|
type: literal("tool_use"),
|
|
128111
128333
|
name: string6(),
|
|
128112
128334
|
id: string6(),
|
|
128113
128335
|
input: record17(string6(), unknown2()),
|
|
128114
128336
|
_meta: record17(string6(), unknown2()).optional()
|
|
128115
128337
|
});
|
|
128116
|
-
const EmbeddedResourceSchema$1 =
|
|
128338
|
+
const EmbeddedResourceSchema$1 = object11({
|
|
128117
128339
|
type: literal("resource"),
|
|
128118
128340
|
resource: union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]),
|
|
128119
128341
|
annotations: AnnotationsSchema$1.optional(),
|
|
@@ -128127,7 +128349,7 @@ function build$1() {
|
|
|
128127
128349
|
ResourceLinkSchema$1,
|
|
128128
128350
|
EmbeddedResourceSchema$1
|
|
128129
128351
|
]);
|
|
128130
|
-
const PromptMessageSchema$1 =
|
|
128352
|
+
const PromptMessageSchema$1 = object11({
|
|
128131
128353
|
role: RoleSchema$1,
|
|
128132
128354
|
content: ContentBlockSchema$1
|
|
128133
128355
|
});
|
|
@@ -128139,28 +128361,28 @@ function build$1() {
|
|
|
128139
128361
|
method: literal("notifications/prompts/list_changed"),
|
|
128140
128362
|
params: NotificationsParamsSchema$1.optional()
|
|
128141
128363
|
});
|
|
128142
|
-
const ToolAnnotationsSchema$1 =
|
|
128364
|
+
const ToolAnnotationsSchema$1 = object11({
|
|
128143
128365
|
title: string6().optional(),
|
|
128144
128366
|
readOnlyHint: boolean2().optional(),
|
|
128145
128367
|
destructiveHint: boolean2().optional(),
|
|
128146
128368
|
idempotentHint: boolean2().optional(),
|
|
128147
128369
|
openWorldHint: boolean2().optional()
|
|
128148
128370
|
});
|
|
128149
|
-
const ToolExecutionSchema$1 =
|
|
128371
|
+
const ToolExecutionSchema$1 = object11({ taskSupport: _enum2([
|
|
128150
128372
|
"required",
|
|
128151
128373
|
"optional",
|
|
128152
128374
|
"forbidden"
|
|
128153
128375
|
]).optional() });
|
|
128154
|
-
const ToolSchema$1 =
|
|
128376
|
+
const ToolSchema$1 = object11({
|
|
128155
128377
|
...BaseMetadataSchema$1.shape,
|
|
128156
128378
|
...IconsSchema$1.shape,
|
|
128157
128379
|
description: string6().optional(),
|
|
128158
|
-
inputSchema:
|
|
128380
|
+
inputSchema: object11({
|
|
128159
128381
|
type: literal("object"),
|
|
128160
128382
|
properties: record17(string6(), JSONValueSchema$1).optional(),
|
|
128161
128383
|
required: array(string6()).optional()
|
|
128162
128384
|
}).catchall(unknown2()),
|
|
128163
|
-
outputSchema:
|
|
128385
|
+
outputSchema: object11({
|
|
128164
128386
|
type: literal("object"),
|
|
128165
128387
|
properties: record17(string6(), JSONValueSchema$1).optional(),
|
|
128166
128388
|
required: array(string6()).optional()
|
|
@@ -128212,23 +128434,23 @@ function build$1() {
|
|
|
128212
128434
|
method: literal("notifications/message"),
|
|
128213
128435
|
params: LoggingMessageNotificationParamsSchema$1
|
|
128214
128436
|
});
|
|
128215
|
-
const ModelHintSchema$1 =
|
|
128216
|
-
const ModelPreferencesSchema$1 =
|
|
128437
|
+
const ModelHintSchema$1 = object11({ name: string6().optional() });
|
|
128438
|
+
const ModelPreferencesSchema$1 = object11({
|
|
128217
128439
|
hints: array(ModelHintSchema$1).optional(),
|
|
128218
128440
|
costPriority: number2().min(0).max(1).optional(),
|
|
128219
128441
|
speedPriority: number2().min(0).max(1).optional(),
|
|
128220
128442
|
intelligencePriority: number2().min(0).max(1).optional()
|
|
128221
128443
|
});
|
|
128222
|
-
const ToolChoiceSchema$1 =
|
|
128444
|
+
const ToolChoiceSchema$1 = object11({ mode: _enum2([
|
|
128223
128445
|
"auto",
|
|
128224
128446
|
"required",
|
|
128225
128447
|
"none"
|
|
128226
128448
|
]).optional() });
|
|
128227
|
-
const ToolResultContentSchema$1 =
|
|
128449
|
+
const ToolResultContentSchema$1 = object11({
|
|
128228
128450
|
type: literal("tool_result"),
|
|
128229
128451
|
toolUseId: string6().describe("The unique identifier for the corresponding tool call."),
|
|
128230
128452
|
content: array(ContentBlockSchema$1),
|
|
128231
|
-
structuredContent:
|
|
128453
|
+
structuredContent: object11({}).loose().optional(),
|
|
128232
128454
|
isError: boolean2().optional(),
|
|
128233
128455
|
_meta: record17(string6(), unknown2()).optional()
|
|
128234
128456
|
});
|
|
@@ -128244,7 +128466,7 @@ function build$1() {
|
|
|
128244
128466
|
ToolUseContentSchema$1,
|
|
128245
128467
|
ToolResultContentSchema$1
|
|
128246
128468
|
]);
|
|
128247
|
-
const SamplingMessageSchema$1 =
|
|
128469
|
+
const SamplingMessageSchema$1 = object11({
|
|
128248
128470
|
role: RoleSchema$1,
|
|
128249
128471
|
content: union([SamplingMessageContentBlockSchema$1, array(SamplingMessageContentBlockSchema$1)]),
|
|
128250
128472
|
_meta: record17(string6(), unknown2()).optional()
|
|
@@ -128290,13 +128512,13 @@ function build$1() {
|
|
|
128290
128512
|
role: RoleSchema$1,
|
|
128291
128513
|
content: union([SamplingMessageContentBlockSchema$1, array(SamplingMessageContentBlockSchema$1)])
|
|
128292
128514
|
});
|
|
128293
|
-
const BooleanSchemaSchema$1 =
|
|
128515
|
+
const BooleanSchemaSchema$1 = object11({
|
|
128294
128516
|
type: literal("boolean"),
|
|
128295
128517
|
title: string6().optional(),
|
|
128296
128518
|
description: string6().optional(),
|
|
128297
128519
|
default: boolean2().optional()
|
|
128298
128520
|
});
|
|
128299
|
-
const StringSchemaSchema$1 =
|
|
128521
|
+
const StringSchemaSchema$1 = object11({
|
|
128300
128522
|
type: literal("string"),
|
|
128301
128523
|
title: string6().optional(),
|
|
128302
128524
|
description: string6().optional(),
|
|
@@ -128310,7 +128532,7 @@ function build$1() {
|
|
|
128310
128532
|
]).optional(),
|
|
128311
128533
|
default: string6().optional()
|
|
128312
128534
|
});
|
|
128313
|
-
const NumberSchemaSchema$1 =
|
|
128535
|
+
const NumberSchemaSchema$1 = object11({
|
|
128314
128536
|
type: _enum2(["number", "integer"]),
|
|
128315
128537
|
title: string6().optional(),
|
|
128316
128538
|
description: string6().optional(),
|
|
@@ -128318,24 +128540,24 @@ function build$1() {
|
|
|
128318
128540
|
maximum: number2().optional(),
|
|
128319
128541
|
default: number2().optional()
|
|
128320
128542
|
});
|
|
128321
|
-
const UntitledSingleSelectEnumSchemaSchema$1 =
|
|
128543
|
+
const UntitledSingleSelectEnumSchemaSchema$1 = object11({
|
|
128322
128544
|
type: literal("string"),
|
|
128323
128545
|
title: string6().optional(),
|
|
128324
128546
|
description: string6().optional(),
|
|
128325
128547
|
enum: array(string6()),
|
|
128326
128548
|
default: string6().optional()
|
|
128327
128549
|
});
|
|
128328
|
-
const TitledSingleSelectEnumSchemaSchema$1 =
|
|
128550
|
+
const TitledSingleSelectEnumSchemaSchema$1 = object11({
|
|
128329
128551
|
type: literal("string"),
|
|
128330
128552
|
title: string6().optional(),
|
|
128331
128553
|
description: string6().optional(),
|
|
128332
|
-
oneOf: array(
|
|
128554
|
+
oneOf: array(object11({
|
|
128333
128555
|
const: string6(),
|
|
128334
128556
|
title: string6()
|
|
128335
128557
|
})),
|
|
128336
128558
|
default: string6().optional()
|
|
128337
128559
|
});
|
|
128338
|
-
const LegacyTitledEnumSchemaSchema$1 =
|
|
128560
|
+
const LegacyTitledEnumSchemaSchema$1 = object11({
|
|
128339
128561
|
type: literal("string"),
|
|
128340
128562
|
title: string6().optional(),
|
|
128341
128563
|
description: string6().optional(),
|
|
@@ -128344,25 +128566,25 @@ function build$1() {
|
|
|
128344
128566
|
default: string6().optional()
|
|
128345
128567
|
});
|
|
128346
128568
|
const SingleSelectEnumSchemaSchema$1 = union([UntitledSingleSelectEnumSchemaSchema$1, TitledSingleSelectEnumSchemaSchema$1]);
|
|
128347
|
-
const UntitledMultiSelectEnumSchemaSchema$1 =
|
|
128569
|
+
const UntitledMultiSelectEnumSchemaSchema$1 = object11({
|
|
128348
128570
|
type: literal("array"),
|
|
128349
128571
|
title: string6().optional(),
|
|
128350
128572
|
description: string6().optional(),
|
|
128351
128573
|
minItems: number2().optional(),
|
|
128352
128574
|
maxItems: number2().optional(),
|
|
128353
|
-
items:
|
|
128575
|
+
items: object11({
|
|
128354
128576
|
type: literal("string"),
|
|
128355
128577
|
enum: array(string6())
|
|
128356
128578
|
}),
|
|
128357
128579
|
default: array(string6()).optional()
|
|
128358
128580
|
});
|
|
128359
|
-
const TitledMultiSelectEnumSchemaSchema$1 =
|
|
128581
|
+
const TitledMultiSelectEnumSchemaSchema$1 = object11({
|
|
128360
128582
|
type: literal("array"),
|
|
128361
128583
|
title: string6().optional(),
|
|
128362
128584
|
description: string6().optional(),
|
|
128363
128585
|
minItems: number2().optional(),
|
|
128364
128586
|
maxItems: number2().optional(),
|
|
128365
|
-
items:
|
|
128587
|
+
items: object11({ anyOf: array(object11({
|
|
128366
128588
|
const: string6(),
|
|
128367
128589
|
title: string6()
|
|
128368
128590
|
})) }),
|
|
@@ -128383,7 +128605,7 @@ function build$1() {
|
|
|
128383
128605
|
const ElicitRequestFormParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({
|
|
128384
128606
|
mode: literal("form").optional(),
|
|
128385
128607
|
message: string6(),
|
|
128386
|
-
requestedSchema:
|
|
128608
|
+
requestedSchema: object11({
|
|
128387
128609
|
type: literal("object"),
|
|
128388
128610
|
properties: record17(string6(), PrimitiveSchemaDefinitionSchema$1),
|
|
128389
128611
|
required: array(string6()).optional()
|
|
@@ -128418,21 +128640,21 @@ function build$1() {
|
|
|
128418
128640
|
array(string6())
|
|
128419
128641
|
])).optional())
|
|
128420
128642
|
});
|
|
128421
|
-
const ResourceTemplateReferenceSchema$1 =
|
|
128643
|
+
const ResourceTemplateReferenceSchema$1 = object11({
|
|
128422
128644
|
type: literal("ref/resource"),
|
|
128423
128645
|
uri: string6()
|
|
128424
128646
|
});
|
|
128425
|
-
const PromptReferenceSchema$1 =
|
|
128647
|
+
const PromptReferenceSchema$1 = object11({
|
|
128426
128648
|
type: literal("ref/prompt"),
|
|
128427
128649
|
name: string6()
|
|
128428
128650
|
});
|
|
128429
128651
|
const CompleteRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({
|
|
128430
128652
|
ref: union([PromptReferenceSchema$1, ResourceTemplateReferenceSchema$1]),
|
|
128431
|
-
argument:
|
|
128653
|
+
argument: object11({
|
|
128432
128654
|
name: string6(),
|
|
128433
128655
|
value: string6()
|
|
128434
128656
|
}),
|
|
128435
|
-
context:
|
|
128657
|
+
context: object11({ arguments: record17(string6(), string6()).optional() }).optional()
|
|
128436
128658
|
});
|
|
128437
128659
|
const CompleteRequestSchema$1 = RequestSchema$1.extend({
|
|
128438
128660
|
method: literal("completion/complete"),
|
|
@@ -128443,7 +128665,7 @@ function build$1() {
|
|
|
128443
128665
|
total: optional(number2().int()),
|
|
128444
128666
|
hasMore: optional(boolean2())
|
|
128445
128667
|
}) });
|
|
128446
|
-
const RootSchema$1 =
|
|
128668
|
+
const RootSchema$1 = object11({
|
|
128447
128669
|
uri: string6().startsWith("file://"),
|
|
128448
128670
|
name: string6().optional(),
|
|
128449
128671
|
_meta: record17(string6(), unknown2()).optional()
|
|
@@ -128468,7 +128690,7 @@ function build$1() {
|
|
|
128468
128690
|
"failed",
|
|
128469
128691
|
"cancelled"
|
|
128470
128692
|
]);
|
|
128471
|
-
const TaskSchema$1 =
|
|
128693
|
+
const TaskSchema$1 = object11({
|
|
128472
128694
|
taskId: string6(),
|
|
128473
128695
|
status: TaskStatusSchema$1,
|
|
128474
128696
|
ttl: union([number2(), _null3()]),
|
|
@@ -128900,27 +129122,27 @@ function build() {
|
|
|
128900
129122
|
return false;
|
|
128901
129123
|
}
|
|
128902
129124
|
}, { message: "Invalid Base64 string" });
|
|
128903
|
-
const TaskMetadataSchema$1 =
|
|
128904
|
-
const RelatedTaskMetadataSchema$1 =
|
|
129125
|
+
const TaskMetadataSchema$1 = object11({ ttl: number2().optional() });
|
|
129126
|
+
const RelatedTaskMetadataSchema$1 = object11({ taskId: string6() });
|
|
128905
129127
|
const RequestMetaSchema$1 = looseObject({
|
|
128906
129128
|
progressToken: ProgressTokenSchema$1.optional(),
|
|
128907
129129
|
"io.modelcontextprotocol/related-task": RelatedTaskMetadataSchema$1.optional()
|
|
128908
129130
|
});
|
|
128909
|
-
const BaseRequestParamsSchema$1 =
|
|
129131
|
+
const BaseRequestParamsSchema$1 = object11({ _meta: RequestMetaSchema$1.optional() });
|
|
128910
129132
|
const TaskAugmentedRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ task: TaskMetadataSchema$1.optional() });
|
|
128911
|
-
const NotificationsParamsSchema$1 =
|
|
128912
|
-
const NotificationSchema$1 =
|
|
129133
|
+
const NotificationsParamsSchema$1 = object11({ _meta: RequestMetaSchema$1.optional() });
|
|
129134
|
+
const NotificationSchema$1 = object11({
|
|
128913
129135
|
method: string6(),
|
|
128914
129136
|
params: NotificationsParamsSchema$1.loose().optional()
|
|
128915
129137
|
});
|
|
128916
|
-
const IconSchema$1 =
|
|
129138
|
+
const IconSchema$1 = object11({
|
|
128917
129139
|
src: string6(),
|
|
128918
129140
|
mimeType: string6().optional(),
|
|
128919
129141
|
sizes: array(string6()).optional(),
|
|
128920
129142
|
theme: _enum2(["light", "dark"]).optional()
|
|
128921
129143
|
});
|
|
128922
|
-
const IconsSchema$1 =
|
|
128923
|
-
const BaseMetadataSchema$1 =
|
|
129144
|
+
const IconsSchema$1 = object11({ icons: array(IconSchema$1).optional() });
|
|
129145
|
+
const BaseMetadataSchema$1 = object11({
|
|
128924
129146
|
name: string6(),
|
|
128925
129147
|
title: string6().optional()
|
|
128926
129148
|
});
|
|
@@ -128931,11 +129153,11 @@ function build() {
|
|
|
128931
129153
|
websiteUrl: string6().optional(),
|
|
128932
129154
|
description: string6().optional()
|
|
128933
129155
|
});
|
|
128934
|
-
const FormElicitationCapabilitySchema2 = intersection(
|
|
129156
|
+
const FormElicitationCapabilitySchema2 = intersection(object11({ applyDefaults: boolean2().optional() }), JSONObjectSchema$1);
|
|
128935
129157
|
const ElicitationCapabilitySchema2 = preprocess2((value) => {
|
|
128936
129158
|
if (value && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0) return { form: {} };
|
|
128937
129159
|
return value;
|
|
128938
|
-
}, intersection(
|
|
129160
|
+
}, intersection(object11({
|
|
128939
129161
|
form: FormElicitationCapabilitySchema2.optional(),
|
|
128940
129162
|
url: JSONObjectSchema$1.optional()
|
|
128941
129163
|
}), JSONObjectSchema$1.optional()));
|
|
@@ -128952,36 +129174,36 @@ function build() {
|
|
|
128952
129174
|
cancel: JSONObjectSchema$1.optional(),
|
|
128953
129175
|
requests: looseObject({ tools: looseObject({ call: JSONObjectSchema$1.optional() }).optional() }).optional()
|
|
128954
129176
|
});
|
|
128955
|
-
const ClientCapabilitiesSchema$1 =
|
|
129177
|
+
const ClientCapabilitiesSchema$1 = object11({
|
|
128956
129178
|
experimental: record17(string6(), JSONObjectSchema$1).optional(),
|
|
128957
|
-
sampling:
|
|
129179
|
+
sampling: object11({
|
|
128958
129180
|
context: JSONObjectSchema$1.optional(),
|
|
128959
129181
|
tools: JSONObjectSchema$1.optional()
|
|
128960
129182
|
}).optional(),
|
|
128961
129183
|
elicitation: ElicitationCapabilitySchema2.optional(),
|
|
128962
|
-
roots:
|
|
129184
|
+
roots: object11({ listChanged: boolean2().optional() }).optional(),
|
|
128963
129185
|
tasks: ClientTasksCapabilitySchema$1.optional(),
|
|
128964
129186
|
extensions: record17(string6(), JSONObjectSchema$1).optional()
|
|
128965
129187
|
});
|
|
128966
|
-
const ServerCapabilitiesSchema$1 =
|
|
129188
|
+
const ServerCapabilitiesSchema$1 = object11({
|
|
128967
129189
|
experimental: record17(string6(), JSONObjectSchema$1).optional(),
|
|
128968
129190
|
logging: JSONObjectSchema$1.optional(),
|
|
128969
129191
|
completions: JSONObjectSchema$1.optional(),
|
|
128970
|
-
prompts:
|
|
128971
|
-
resources:
|
|
129192
|
+
prompts: object11({ listChanged: boolean2().optional() }).optional(),
|
|
129193
|
+
resources: object11({
|
|
128972
129194
|
subscribe: boolean2().optional(),
|
|
128973
129195
|
listChanged: boolean2().optional()
|
|
128974
129196
|
}).optional(),
|
|
128975
|
-
tools:
|
|
129197
|
+
tools: object11({ listChanged: boolean2().optional() }).optional(),
|
|
128976
129198
|
tasks: ServerTasksCapabilitySchema$1.optional(),
|
|
128977
129199
|
extensions: record17(string6(), JSONObjectSchema$1).optional()
|
|
128978
129200
|
});
|
|
128979
|
-
const ProgressSchema$1 =
|
|
129201
|
+
const ProgressSchema$1 = object11({
|
|
128980
129202
|
progress: number2(),
|
|
128981
129203
|
total: optional(number2()),
|
|
128982
129204
|
message: optional(string6())
|
|
128983
129205
|
});
|
|
128984
|
-
const ProgressNotificationParamsSchema$1 =
|
|
129206
|
+
const ProgressNotificationParamsSchema$1 = object11({
|
|
128985
129207
|
...NotificationsParamsSchema$1.shape,
|
|
128986
129208
|
...ProgressSchema$1.shape,
|
|
128987
129209
|
progressToken: ProgressTokenSchema$1
|
|
@@ -128999,19 +129221,19 @@ function build() {
|
|
|
128999
129221
|
method: literal("notifications/message"),
|
|
129000
129222
|
params: LoggingMessageNotificationParamsSchema$1
|
|
129001
129223
|
});
|
|
129002
|
-
const ResourceContentsSchema$1 =
|
|
129224
|
+
const ResourceContentsSchema$1 = object11({
|
|
129003
129225
|
uri: string6(),
|
|
129004
129226
|
mimeType: optional(string6()),
|
|
129005
129227
|
_meta: record17(string6(), unknown2()).optional()
|
|
129006
129228
|
});
|
|
129007
129229
|
const TextResourceContentsSchema$1 = ResourceContentsSchema$1.extend({ text: string6() });
|
|
129008
129230
|
const BlobResourceContentsSchema$1 = ResourceContentsSchema$1.extend({ blob: Base64Schema2 });
|
|
129009
|
-
const AnnotationsSchema$1 =
|
|
129231
|
+
const AnnotationsSchema$1 = object11({
|
|
129010
129232
|
audience: array(RoleSchema$1).optional(),
|
|
129011
129233
|
priority: number2().min(0).max(1).optional(),
|
|
129012
129234
|
lastModified: iso_exports.datetime({ offset: true }).optional()
|
|
129013
129235
|
});
|
|
129014
|
-
const ResourceSchema$1 =
|
|
129236
|
+
const ResourceSchema$1 = object11({
|
|
129015
129237
|
...BaseMetadataSchema$1.shape,
|
|
129016
129238
|
...IconsSchema$1.shape,
|
|
129017
129239
|
uri: string6(),
|
|
@@ -129021,7 +129243,7 @@ function build() {
|
|
|
129021
129243
|
annotations: AnnotationsSchema$1.optional(),
|
|
129022
129244
|
_meta: optional(looseObject({}))
|
|
129023
129245
|
});
|
|
129024
|
-
const ResourceTemplateSchema$1 =
|
|
129246
|
+
const ResourceTemplateSchema$1 = object11({
|
|
129025
129247
|
...BaseMetadataSchema$1.shape,
|
|
129026
129248
|
...IconsSchema$1.shape,
|
|
129027
129249
|
uriTemplate: string6(),
|
|
@@ -129039,12 +129261,12 @@ function build() {
|
|
|
129039
129261
|
method: literal("notifications/resources/updated"),
|
|
129040
129262
|
params: ResourceUpdatedNotificationParamsSchema$1
|
|
129041
129263
|
});
|
|
129042
|
-
const PromptArgumentSchema$1 =
|
|
129264
|
+
const PromptArgumentSchema$1 = object11({
|
|
129043
129265
|
name: string6(),
|
|
129044
129266
|
description: optional(string6()),
|
|
129045
129267
|
required: optional(boolean2())
|
|
129046
129268
|
});
|
|
129047
|
-
const PromptSchema$1 =
|
|
129269
|
+
const PromptSchema$1 = object11({
|
|
129048
129270
|
...BaseMetadataSchema$1.shape,
|
|
129049
129271
|
...IconsSchema$1.shape,
|
|
129050
129272
|
description: optional(string6()),
|
|
@@ -129055,34 +129277,34 @@ function build() {
|
|
|
129055
129277
|
method: literal("notifications/prompts/list_changed"),
|
|
129056
129278
|
params: NotificationsParamsSchema$1.optional()
|
|
129057
129279
|
});
|
|
129058
|
-
const TextContentSchema$1 =
|
|
129280
|
+
const TextContentSchema$1 = object11({
|
|
129059
129281
|
type: literal("text"),
|
|
129060
129282
|
text: string6(),
|
|
129061
129283
|
annotations: AnnotationsSchema$1.optional(),
|
|
129062
129284
|
_meta: record17(string6(), unknown2()).optional()
|
|
129063
129285
|
});
|
|
129064
|
-
const ImageContentSchema$1 =
|
|
129286
|
+
const ImageContentSchema$1 = object11({
|
|
129065
129287
|
type: literal("image"),
|
|
129066
129288
|
data: Base64Schema2,
|
|
129067
129289
|
mimeType: string6(),
|
|
129068
129290
|
annotations: AnnotationsSchema$1.optional(),
|
|
129069
129291
|
_meta: record17(string6(), unknown2()).optional()
|
|
129070
129292
|
});
|
|
129071
|
-
const AudioContentSchema$1 =
|
|
129293
|
+
const AudioContentSchema$1 = object11({
|
|
129072
129294
|
type: literal("audio"),
|
|
129073
129295
|
data: Base64Schema2,
|
|
129074
129296
|
mimeType: string6(),
|
|
129075
129297
|
annotations: AnnotationsSchema$1.optional(),
|
|
129076
129298
|
_meta: record17(string6(), unknown2()).optional()
|
|
129077
129299
|
});
|
|
129078
|
-
const ToolUseContentSchema$1 =
|
|
129300
|
+
const ToolUseContentSchema$1 = object11({
|
|
129079
129301
|
type: literal("tool_use"),
|
|
129080
129302
|
name: string6(),
|
|
129081
129303
|
id: string6(),
|
|
129082
129304
|
input: record17(string6(), unknown2()),
|
|
129083
129305
|
_meta: record17(string6(), unknown2()).optional()
|
|
129084
129306
|
});
|
|
129085
|
-
const EmbeddedResourceSchema$1 =
|
|
129307
|
+
const EmbeddedResourceSchema$1 = object11({
|
|
129086
129308
|
type: literal("resource"),
|
|
129087
129309
|
resource: union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]),
|
|
129088
129310
|
annotations: AnnotationsSchema$1.optional(),
|
|
@@ -129096,11 +129318,11 @@ function build() {
|
|
|
129096
129318
|
ResourceLinkSchema$1,
|
|
129097
129319
|
EmbeddedResourceSchema$1
|
|
129098
129320
|
]);
|
|
129099
|
-
const PromptMessageSchema$1 =
|
|
129321
|
+
const PromptMessageSchema$1 = object11({
|
|
129100
129322
|
role: RoleSchema$1,
|
|
129101
129323
|
content: ContentBlockSchema$1
|
|
129102
129324
|
});
|
|
129103
|
-
const ToolAnnotationsSchema$1 =
|
|
129325
|
+
const ToolAnnotationsSchema$1 = object11({
|
|
129104
129326
|
title: string6().optional(),
|
|
129105
129327
|
readOnlyHint: boolean2().optional(),
|
|
129106
129328
|
destructiveHint: boolean2().optional(),
|
|
@@ -129111,25 +129333,25 @@ function build() {
|
|
|
129111
129333
|
method: literal("notifications/tools/list_changed"),
|
|
129112
129334
|
params: NotificationsParamsSchema$1.optional()
|
|
129113
129335
|
});
|
|
129114
|
-
const ModelHintSchema$1 =
|
|
129115
|
-
const ModelPreferencesSchema$1 =
|
|
129336
|
+
const ModelHintSchema$1 = object11({ name: string6().optional() });
|
|
129337
|
+
const ModelPreferencesSchema$1 = object11({
|
|
129116
129338
|
hints: array(ModelHintSchema$1).optional(),
|
|
129117
129339
|
costPriority: number2().min(0).max(1).optional(),
|
|
129118
129340
|
speedPriority: number2().min(0).max(1).optional(),
|
|
129119
129341
|
intelligencePriority: number2().min(0).max(1).optional()
|
|
129120
129342
|
});
|
|
129121
|
-
const ToolChoiceSchema$1 =
|
|
129343
|
+
const ToolChoiceSchema$1 = object11({ mode: _enum2([
|
|
129122
129344
|
"auto",
|
|
129123
129345
|
"required",
|
|
129124
129346
|
"none"
|
|
129125
129347
|
]).optional() });
|
|
129126
|
-
const BooleanSchemaSchema$1 =
|
|
129348
|
+
const BooleanSchemaSchema$1 = object11({
|
|
129127
129349
|
type: literal("boolean"),
|
|
129128
129350
|
title: string6().optional(),
|
|
129129
129351
|
description: string6().optional(),
|
|
129130
129352
|
default: boolean2().optional()
|
|
129131
129353
|
});
|
|
129132
|
-
const StringSchemaSchema$1 =
|
|
129354
|
+
const StringSchemaSchema$1 = object11({
|
|
129133
129355
|
type: literal("string"),
|
|
129134
129356
|
title: string6().optional(),
|
|
129135
129357
|
description: string6().optional(),
|
|
@@ -129143,7 +129365,7 @@ function build() {
|
|
|
129143
129365
|
]).optional(),
|
|
129144
129366
|
default: string6().optional()
|
|
129145
129367
|
});
|
|
129146
|
-
const NumberSchemaSchema$1 =
|
|
129368
|
+
const NumberSchemaSchema$1 = object11({
|
|
129147
129369
|
type: _enum2(["number", "integer"]),
|
|
129148
129370
|
title: string6().optional(),
|
|
129149
129371
|
description: string6().optional(),
|
|
@@ -129151,24 +129373,24 @@ function build() {
|
|
|
129151
129373
|
maximum: number2().optional(),
|
|
129152
129374
|
default: number2().optional()
|
|
129153
129375
|
});
|
|
129154
|
-
const UntitledSingleSelectEnumSchemaSchema$1 =
|
|
129376
|
+
const UntitledSingleSelectEnumSchemaSchema$1 = object11({
|
|
129155
129377
|
type: literal("string"),
|
|
129156
129378
|
title: string6().optional(),
|
|
129157
129379
|
description: string6().optional(),
|
|
129158
129380
|
enum: array(string6()),
|
|
129159
129381
|
default: string6().optional()
|
|
129160
129382
|
});
|
|
129161
|
-
const TitledSingleSelectEnumSchemaSchema$1 =
|
|
129383
|
+
const TitledSingleSelectEnumSchemaSchema$1 = object11({
|
|
129162
129384
|
type: literal("string"),
|
|
129163
129385
|
title: string6().optional(),
|
|
129164
129386
|
description: string6().optional(),
|
|
129165
|
-
oneOf: array(
|
|
129387
|
+
oneOf: array(object11({
|
|
129166
129388
|
const: string6(),
|
|
129167
129389
|
title: string6()
|
|
129168
129390
|
})),
|
|
129169
129391
|
default: string6().optional()
|
|
129170
129392
|
});
|
|
129171
|
-
const LegacyTitledEnumSchemaSchema$1 =
|
|
129393
|
+
const LegacyTitledEnumSchemaSchema$1 = object11({
|
|
129172
129394
|
type: literal("string"),
|
|
129173
129395
|
title: string6().optional(),
|
|
129174
129396
|
description: string6().optional(),
|
|
@@ -129177,25 +129399,25 @@ function build() {
|
|
|
129177
129399
|
default: string6().optional()
|
|
129178
129400
|
});
|
|
129179
129401
|
const SingleSelectEnumSchemaSchema$1 = union([UntitledSingleSelectEnumSchemaSchema$1, TitledSingleSelectEnumSchemaSchema$1]);
|
|
129180
|
-
const UntitledMultiSelectEnumSchemaSchema$1 =
|
|
129402
|
+
const UntitledMultiSelectEnumSchemaSchema$1 = object11({
|
|
129181
129403
|
type: literal("array"),
|
|
129182
129404
|
title: string6().optional(),
|
|
129183
129405
|
description: string6().optional(),
|
|
129184
129406
|
minItems: number2().optional(),
|
|
129185
129407
|
maxItems: number2().optional(),
|
|
129186
|
-
items:
|
|
129408
|
+
items: object11({
|
|
129187
129409
|
type: literal("string"),
|
|
129188
129410
|
enum: array(string6())
|
|
129189
129411
|
}),
|
|
129190
129412
|
default: array(string6()).optional()
|
|
129191
129413
|
});
|
|
129192
|
-
const TitledMultiSelectEnumSchemaSchema$1 =
|
|
129414
|
+
const TitledMultiSelectEnumSchemaSchema$1 = object11({
|
|
129193
129415
|
type: literal("array"),
|
|
129194
129416
|
title: string6().optional(),
|
|
129195
129417
|
description: string6().optional(),
|
|
129196
129418
|
minItems: number2().optional(),
|
|
129197
129419
|
maxItems: number2().optional(),
|
|
129198
|
-
items:
|
|
129420
|
+
items: object11({ anyOf: array(object11({
|
|
129199
129421
|
const: string6(),
|
|
129200
129422
|
title: string6()
|
|
129201
129423
|
})) }),
|
|
@@ -129216,27 +129438,27 @@ function build() {
|
|
|
129216
129438
|
const ElicitRequestFormParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({
|
|
129217
129439
|
mode: literal("form").optional(),
|
|
129218
129440
|
message: string6(),
|
|
129219
|
-
requestedSchema:
|
|
129441
|
+
requestedSchema: object11({
|
|
129220
129442
|
type: literal("object"),
|
|
129221
129443
|
properties: record17(string6(), PrimitiveSchemaDefinitionSchema$1),
|
|
129222
129444
|
required: array(string6()).optional()
|
|
129223
129445
|
}).catchall(unknown2())
|
|
129224
129446
|
});
|
|
129225
|
-
const ResourceTemplateReferenceSchema$1 =
|
|
129447
|
+
const ResourceTemplateReferenceSchema$1 = object11({
|
|
129226
129448
|
type: literal("ref/resource"),
|
|
129227
129449
|
uri: string6()
|
|
129228
129450
|
});
|
|
129229
|
-
const PromptReferenceSchema$1 =
|
|
129451
|
+
const PromptReferenceSchema$1 = object11({
|
|
129230
129452
|
type: literal("ref/prompt"),
|
|
129231
129453
|
name: string6()
|
|
129232
129454
|
});
|
|
129233
|
-
const RootSchema$1 =
|
|
129455
|
+
const RootSchema$1 = object11({
|
|
129234
129456
|
uri: string6().startsWith("file://"),
|
|
129235
129457
|
name: string6().optional(),
|
|
129236
129458
|
_meta: record17(string6(), unknown2()).optional()
|
|
129237
129459
|
});
|
|
129238
129460
|
const sharedClientCapabilityShape = ClientCapabilitiesSchema$1.shape;
|
|
129239
|
-
const ClientCapabilities2026Schema =
|
|
129461
|
+
const ClientCapabilities2026Schema = object11({
|
|
129240
129462
|
experimental: sharedClientCapabilityShape.experimental,
|
|
129241
129463
|
sampling: sharedClientCapabilityShape.sampling,
|
|
129242
129464
|
elicitation: sharedClientCapabilityShape.elicitation,
|
|
@@ -129244,7 +129466,7 @@ function build() {
|
|
|
129244
129466
|
extensions: sharedClientCapabilityShape.extensions
|
|
129245
129467
|
});
|
|
129246
129468
|
const sharedServerCapabilityShape = ServerCapabilitiesSchema$1.shape;
|
|
129247
|
-
const ServerCapabilities2026Schema =
|
|
129469
|
+
const ServerCapabilities2026Schema = object11({
|
|
129248
129470
|
experimental: sharedServerCapabilityShape.experimental,
|
|
129249
129471
|
logging: sharedServerCapabilityShape.logging,
|
|
129250
129472
|
completions: sharedServerCapabilityShape.completions,
|
|
@@ -129260,7 +129482,7 @@ function build() {
|
|
|
129260
129482
|
[CLIENT_CAPABILITIES_META_KEY]: ClientCapabilities2026Schema,
|
|
129261
129483
|
[LOG_LEVEL_META_KEY]: LoggingLevelSchema$1.optional()
|
|
129262
129484
|
});
|
|
129263
|
-
const ToolSchema$1 =
|
|
129485
|
+
const ToolSchema$1 = object11({
|
|
129264
129486
|
...BaseMetadataSchema$1.shape,
|
|
129265
129487
|
...IconsSchema$1.shape,
|
|
129266
129488
|
description: string6().optional(),
|
|
@@ -129272,7 +129494,7 @@ function build() {
|
|
|
129272
129494
|
annotations: ToolAnnotationsSchema$1.optional(),
|
|
129273
129495
|
_meta: record17(string6(), unknown2()).optional()
|
|
129274
129496
|
});
|
|
129275
|
-
const ToolResultContentSchema$1 =
|
|
129497
|
+
const ToolResultContentSchema$1 = object11({
|
|
129276
129498
|
type: literal("tool_result"),
|
|
129277
129499
|
toolUseId: string6(),
|
|
129278
129500
|
content: array(ContentBlockSchema$1),
|
|
@@ -129287,7 +129509,7 @@ function build() {
|
|
|
129287
129509
|
ToolUseContentSchema$1,
|
|
129288
129510
|
ToolResultContentSchema$1
|
|
129289
129511
|
]);
|
|
129290
|
-
const SamplingMessageSchema$1 =
|
|
129512
|
+
const SamplingMessageSchema$1 = object11({
|
|
129291
129513
|
role: RoleSchema$1,
|
|
129292
129514
|
content: union([SamplingMessageContentBlockSchema$1, array(SamplingMessageContentBlockSchema$1)]),
|
|
129293
129515
|
_meta: record17(string6(), unknown2()).optional()
|
|
@@ -129342,7 +129564,7 @@ function build() {
|
|
|
129342
129564
|
cacheScope: _enum2(["public", "private"]),
|
|
129343
129565
|
contents: array(union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]))
|
|
129344
129566
|
});
|
|
129345
|
-
const CompleteResultSchema$1 = wireResult({ completion:
|
|
129567
|
+
const CompleteResultSchema$1 = wireResult({ completion: object11({
|
|
129346
129568
|
values: array(string6()).max(100),
|
|
129347
129569
|
total: number2().int().optional(),
|
|
129348
129570
|
hasMore: boolean2().optional()
|
|
@@ -129358,7 +129580,7 @@ function build() {
|
|
|
129358
129580
|
capabilities: ServerCapabilities2026Schema,
|
|
129359
129581
|
instructions: string6().optional()
|
|
129360
129582
|
});
|
|
129361
|
-
const CreateMessageRequestParamsSchema$1 =
|
|
129583
|
+
const CreateMessageRequestParamsSchema$1 = object11({
|
|
129362
129584
|
messages: array(SamplingMessageSchema$1),
|
|
129363
129585
|
modelPreferences: ModelPreferencesSchema$1.optional(),
|
|
129364
129586
|
systemPrompt: string6().optional(),
|
|
@@ -129374,21 +129596,21 @@ function build() {
|
|
|
129374
129596
|
tools: array(ToolSchema$1).optional(),
|
|
129375
129597
|
toolChoice: ToolChoiceSchema$1.optional()
|
|
129376
129598
|
});
|
|
129377
|
-
const CreateMessageRequestSchema$1 =
|
|
129599
|
+
const CreateMessageRequestSchema$1 = object11({
|
|
129378
129600
|
method: literal("sampling/createMessage"),
|
|
129379
129601
|
params: CreateMessageRequestParamsSchema$1
|
|
129380
129602
|
});
|
|
129381
|
-
const ListRootsRequestSchema$1 =
|
|
129603
|
+
const ListRootsRequestSchema$1 = object11({
|
|
129382
129604
|
method: literal("roots/list"),
|
|
129383
|
-
params:
|
|
129605
|
+
params: object11({ _meta: record17(string6(), unknown2()).optional() }).optional()
|
|
129384
129606
|
});
|
|
129385
|
-
const CreateMessageResultSchema$1 =
|
|
129607
|
+
const CreateMessageResultSchema$1 = object11({
|
|
129386
129608
|
...SamplingMessageSchema$1.shape,
|
|
129387
129609
|
model: string6(),
|
|
129388
129610
|
stopReason: string6().optional()
|
|
129389
129611
|
});
|
|
129390
|
-
const ListRootsResultSchema$1 =
|
|
129391
|
-
const ElicitResultSchema$1 =
|
|
129612
|
+
const ListRootsResultSchema$1 = object11({ roots: array(RootSchema$1) });
|
|
129613
|
+
const ElicitResultSchema$1 = object11({
|
|
129392
129614
|
action: _enum2([
|
|
129393
129615
|
"accept",
|
|
129394
129616
|
"decline",
|
|
@@ -129401,13 +129623,13 @@ function build() {
|
|
|
129401
129623
|
array(string6())
|
|
129402
129624
|
])).optional()
|
|
129403
129625
|
});
|
|
129404
|
-
const ElicitRequestURLParamsSchema$1 =
|
|
129626
|
+
const ElicitRequestURLParamsSchema$1 = object11({
|
|
129405
129627
|
mode: literal("url"),
|
|
129406
129628
|
message: string6(),
|
|
129407
129629
|
url: string6().url()
|
|
129408
129630
|
});
|
|
129409
129631
|
const ElicitRequestParamsSchema$1 = union([ElicitRequestFormParamsSchema$1, ElicitRequestURLParamsSchema$1]);
|
|
129410
|
-
const ElicitRequestSchema$1 =
|
|
129632
|
+
const ElicitRequestSchema$1 = object11({
|
|
129411
129633
|
method: literal("elicitation/create"),
|
|
129412
129634
|
params: ElicitRequestParamsSchema$1
|
|
129413
129635
|
});
|
|
@@ -129431,24 +129653,24 @@ function build() {
|
|
|
129431
129653
|
inputResponses: InputResponsesSchema.optional(),
|
|
129432
129654
|
requestState: string6().optional()
|
|
129433
129655
|
};
|
|
129434
|
-
const InputResponseRequestParamsSchema =
|
|
129656
|
+
const InputResponseRequestParamsSchema = object11({
|
|
129435
129657
|
_meta: RequestMetaEnvelopeSchema,
|
|
129436
129658
|
...retryParamsShape
|
|
129437
129659
|
});
|
|
129438
129660
|
const DispatchRequestMetaSchema = looseObject({ progressToken: ProgressTokenSchema$1.optional() });
|
|
129439
129661
|
function wireRequest(method, paramsShape) {
|
|
129440
|
-
return
|
|
129662
|
+
return object11({
|
|
129441
129663
|
method: literal(method),
|
|
129442
|
-
params:
|
|
129664
|
+
params: object11({
|
|
129443
129665
|
_meta: RequestMetaEnvelopeSchema,
|
|
129444
129666
|
...paramsShape
|
|
129445
129667
|
})
|
|
129446
129668
|
});
|
|
129447
129669
|
}
|
|
129448
129670
|
function dispatchRequest(method, paramsShape) {
|
|
129449
|
-
return
|
|
129671
|
+
return object11({
|
|
129450
129672
|
method: literal(method),
|
|
129451
|
-
params:
|
|
129673
|
+
params: object11({
|
|
129452
129674
|
_meta: DispatchRequestMetaSchema.optional(),
|
|
129453
129675
|
...paramsShape
|
|
129454
129676
|
}).optional()
|
|
@@ -129476,15 +129698,15 @@ function build() {
|
|
|
129476
129698
|
});
|
|
129477
129699
|
const completeParamsShape = {
|
|
129478
129700
|
ref: union([PromptReferenceSchema$1, ResourceTemplateReferenceSchema$1]),
|
|
129479
|
-
argument:
|
|
129701
|
+
argument: object11({
|
|
129480
129702
|
name: string6(),
|
|
129481
129703
|
value: string6()
|
|
129482
129704
|
}),
|
|
129483
|
-
context:
|
|
129705
|
+
context: object11({ arguments: record17(string6(), string6()).optional() }).optional()
|
|
129484
129706
|
};
|
|
129485
129707
|
const CompleteRequestSchema$1 = wireRequest("completion/complete", completeParamsShape);
|
|
129486
129708
|
const DiscoverRequestSchema$1 = wireRequest("server/discover", {});
|
|
129487
|
-
const SubscriptionFilterSchema$1 =
|
|
129709
|
+
const SubscriptionFilterSchema$1 = object11({
|
|
129488
129710
|
toolsListChanged: boolean2().optional(),
|
|
129489
129711
|
promptsListChanged: boolean2().optional(),
|
|
129490
129712
|
resourcesListChanged: boolean2().optional(),
|
|
@@ -129557,7 +129779,7 @@ function build() {
|
|
|
129557
129779
|
cacheScope: _enum2(["public", "private"]),
|
|
129558
129780
|
contents: array(union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]))
|
|
129559
129781
|
}),
|
|
129560
|
-
"completion/complete": liftedResult({ completion:
|
|
129782
|
+
"completion/complete": liftedResult({ completion: object11({
|
|
129561
129783
|
values: array(string6()).max(100),
|
|
129562
129784
|
total: number2().int().optional(),
|
|
129563
129785
|
hasMore: boolean2().optional()
|
|
@@ -129572,19 +129794,19 @@ function build() {
|
|
|
129572
129794
|
"subscriptions/listen": liftedResult({})
|
|
129573
129795
|
};
|
|
129574
129796
|
const NotificationMetaSchema = looseObject({ "io.modelcontextprotocol/subscriptionId": RequestIdSchema$1.optional() });
|
|
129575
|
-
const SubscriptionsAcknowledgedNotificationSchema$1 =
|
|
129797
|
+
const SubscriptionsAcknowledgedNotificationSchema$1 = object11({
|
|
129576
129798
|
method: literal("notifications/subscriptions/acknowledged"),
|
|
129577
|
-
params:
|
|
129799
|
+
params: object11({
|
|
129578
129800
|
_meta: NotificationMetaSchema.optional(),
|
|
129579
129801
|
notifications: SubscriptionFilterSchema$1
|
|
129580
129802
|
})
|
|
129581
129803
|
});
|
|
129582
|
-
const CancelledNotificationParamsSchema$1 =
|
|
129804
|
+
const CancelledNotificationParamsSchema$1 = object11({
|
|
129583
129805
|
_meta: NotificationMetaSchema.optional(),
|
|
129584
129806
|
requestId: RequestIdSchema$1,
|
|
129585
129807
|
reason: string6().optional()
|
|
129586
129808
|
});
|
|
129587
|
-
const CancelledNotificationSchema$1 =
|
|
129809
|
+
const CancelledNotificationSchema$1 = object11({
|
|
129588
129810
|
method: literal("notifications/cancelled"),
|
|
129589
129811
|
params: CancelledNotificationParamsSchema$1
|
|
129590
129812
|
});
|
|
@@ -129598,7 +129820,7 @@ function build() {
|
|
|
129598
129820
|
"notifications/prompts/list_changed": PromptListChangedNotificationSchema$1,
|
|
129599
129821
|
"notifications/subscriptions/acknowledged": SubscriptionsAcknowledgedNotificationSchema$1
|
|
129600
129822
|
};
|
|
129601
|
-
const wireResultResponse = (result3) =>
|
|
129823
|
+
const wireResultResponse = (result3) => object11({
|
|
129602
129824
|
jsonrpc: literal("2.0"),
|
|
129603
129825
|
id: union([string6(), number2().int()]),
|
|
129604
129826
|
result: result3
|
|
@@ -129837,15 +130059,15 @@ function inputSchemaMaps() {
|
|
|
129837
130059
|
const s = buildSchemas2026();
|
|
129838
130060
|
maps = {
|
|
129839
130061
|
request: {
|
|
129840
|
-
"elicitation/create":
|
|
130062
|
+
"elicitation/create": object11({
|
|
129841
130063
|
method: literal("elicitation/create"),
|
|
129842
130064
|
params: s.ElicitRequestParamsSchema
|
|
129843
130065
|
}),
|
|
129844
|
-
"sampling/createMessage":
|
|
130066
|
+
"sampling/createMessage": object11({
|
|
129845
130067
|
method: literal("sampling/createMessage"),
|
|
129846
130068
|
params: s.CreateMessageRequestParamsSchema
|
|
129847
130069
|
}),
|
|
129848
|
-
"roots/list":
|
|
130070
|
+
"roots/list": object11({
|
|
129849
130071
|
method: literal("roots/list"),
|
|
129850
130072
|
params: looseObject({}).optional()
|
|
129851
130073
|
})
|
|
@@ -130436,7 +130658,7 @@ function isZodRawShape(obj) {
|
|
|
130436
130658
|
}
|
|
130437
130659
|
function normalizeRawShapeSchema(schema) {
|
|
130438
130660
|
if (schema === void 0) return void 0;
|
|
130439
|
-
if (isZodRawShape(schema)) return
|
|
130661
|
+
if (isZodRawShape(schema)) return object11(schema);
|
|
130440
130662
|
if (typeof schema === "object" && schema !== null && !isStandardSchema(schema) && Object.values(schema).some((v) => looksLikeZodV3(v))) throw new TypeError("Raw-shape inputSchema/outputSchema/argsSchema fields must be Zod v4 schemas. Got a Zod v3 field schema. Import from `zod/v4` (or upgrade your zod import), or wrap with `z.object({...})` yourself.");
|
|
130441
130663
|
if (!isStandardSchema(schema)) throw new TypeError("inputSchema/outputSchema/argsSchema must be a Standard Schema (e.g. z.object({...})) or a raw Zod shape ({ field: z.string() }).");
|
|
130442
130664
|
return schema;
|
|
@@ -145088,14 +145310,14 @@ function inspectTarget(target3, deps2, codexCommand) {
|
|
|
145088
145310
|
});
|
|
145089
145311
|
}
|
|
145090
145312
|
}
|
|
145091
|
-
const
|
|
145092
|
-
if (
|
|
145313
|
+
const owners2 = selectedSources(sources);
|
|
145314
|
+
if (owners2.length > 1) {
|
|
145093
145315
|
throw new McpRegistrationError("the Superbee MCP name is declared by multiple OpenCode config sources", {
|
|
145094
145316
|
host: target3.id,
|
|
145095
|
-
configs:
|
|
145317
|
+
configs: owners2.map((source3) => collapseHomeDirectory(source3.path))
|
|
145096
145318
|
});
|
|
145097
145319
|
}
|
|
145098
|
-
let source2 =
|
|
145320
|
+
let source2 = owners2[0];
|
|
145099
145321
|
if (!source2) {
|
|
145100
145322
|
const configured = input.env.OPENCODE_CONFIG?.trim();
|
|
145101
145323
|
if (configured) {
|
|
@@ -155903,10 +156125,10 @@ function planDigest(body) {
|
|
|
155903
156125
|
return digest3(Buffer.from(JSON.stringify(body), "utf8"));
|
|
155904
156126
|
}
|
|
155905
156127
|
function stagedContent(plan) {
|
|
155906
|
-
const wire2 = (
|
|
156128
|
+
const wire2 = (object13) => ({ ...object13, frontmatter: JSON.parse(JSON.stringify(object13.frontmatter)) });
|
|
155907
156129
|
const objects = /* @__PURE__ */ new Map();
|
|
155908
|
-
const keep = (version5,
|
|
155909
|
-
if (!objects.has(version5)) objects.set(version5,
|
|
156130
|
+
const keep = (version5, object13) => {
|
|
156131
|
+
if (!objects.has(version5)) objects.set(version5, object13);
|
|
155910
156132
|
};
|
|
155911
156133
|
const stored = (text6) => ({ version: versionOfBytes(text6), bytes: Buffer.byteLength(text6, "utf8") });
|
|
155912
156134
|
const conventions = [];
|
|
@@ -155961,17 +156183,17 @@ function packParts(content3, versions) {
|
|
|
155961
156183
|
let size = 0;
|
|
155962
156184
|
const envelope3 = 512;
|
|
155963
156185
|
for (const version5 of new Set(versions)) {
|
|
155964
|
-
const
|
|
155965
|
-
if (!
|
|
155966
|
-
const bytes2 = Buffer.byteLength(JSON.stringify(
|
|
156186
|
+
const object13 = content3.objects.get(version5);
|
|
156187
|
+
if (!object13) continue;
|
|
156188
|
+
const bytes2 = Buffer.byteLength(JSON.stringify(object13.value)) + 1;
|
|
155967
156189
|
if (part === null || part.versions.length >= bounds.partObjects || size + bytes2 > bounds.partTargetBytes) {
|
|
155968
156190
|
part = { documents: [], reserved: [], history: [], versions: [] };
|
|
155969
156191
|
parts.push(part);
|
|
155970
156192
|
size = envelope3;
|
|
155971
156193
|
}
|
|
155972
|
-
if (
|
|
155973
|
-
else if (
|
|
155974
|
-
else part.history.push(
|
|
156194
|
+
if (object13.kind === "documents") part.documents.push(object13.value);
|
|
156195
|
+
else if (object13.kind === "reserved") part.reserved.push(object13.value);
|
|
156196
|
+
else part.history.push(object13.value);
|
|
155975
156197
|
part.versions.push(version5);
|
|
155976
156198
|
size += bytes2;
|
|
155977
156199
|
}
|
|
@@ -156058,7 +156280,7 @@ async function runStagedCreate(request4) {
|
|
|
156058
156280
|
let requests = 0;
|
|
156059
156281
|
let bytesSent = 0;
|
|
156060
156282
|
const objects = content3.objects.size + content3.blobBytes.size;
|
|
156061
|
-
const contentBytes = [...content3.objects.values()].reduce((sum,
|
|
156283
|
+
const contentBytes = [...content3.objects.values()].reduce((sum, object13) => sum + Buffer.byteLength(JSON.stringify(object13.value)), 0) + [...content3.blobBytes.values()].reduce((sum, blob) => sum + blob.bytes.byteLength, 0);
|
|
156062
156284
|
const maximumRequests = REQUEST_ALLOWANCE + REQUESTS_PER_OBJECT * objects;
|
|
156063
156285
|
const maximumBytes = BYTES_ALLOWANCE + BYTES_PER_CONTENT_BYTE * contentBytes;
|
|
156064
156286
|
const unknownOutcome = (why) => new CliError("TRANSIENT", `${why}; the bundle may be partly created`, {
|
|
@@ -157905,18 +158127,18 @@ __export(managed_worker_exports, {
|
|
|
157905
158127
|
import { stat as stat10, realpath as realpath19 } from "node:fs/promises";
|
|
157906
158128
|
import { randomUUID as randomUUID11 } from "node:crypto";
|
|
157907
158129
|
import path71 from "node:path";
|
|
157908
|
-
function
|
|
158130
|
+
function object12(value) {
|
|
157909
158131
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
157910
158132
|
}
|
|
157911
158133
|
function parseManagedUiWorkerInput(raw) {
|
|
157912
158134
|
if (Buffer.byteLength(raw) > INPUT_MAX_BYTES) throw new Error("managed UI startup input is too large");
|
|
157913
158135
|
const value = JSON.parse(raw);
|
|
157914
|
-
if (!
|
|
158136
|
+
if (!object12(value) || Object.keys(value).sort().join(",") !== "authority,launch_identity,management_secret,operation_id,port,schema_version,startup_deadline_at") {
|
|
157915
158137
|
throw new Error("managed UI startup input has an unsupported shape");
|
|
157916
158138
|
}
|
|
157917
158139
|
const authority = value.authority;
|
|
157918
158140
|
const launchIdentity = value.launch_identity;
|
|
157919
|
-
if (!
|
|
158141
|
+
if (!object12(authority) || Object.keys(authority).sort().join(",") !== "actor,bundle_root,key,launch_root,mode,protocol") {
|
|
157920
158142
|
throw new Error("managed UI startup authority has an unsupported shape");
|
|
157921
158143
|
}
|
|
157922
158144
|
if (value.schema_version !== 1) throw new Error("managed UI startup schema version is invalid");
|
|
@@ -157929,7 +158151,7 @@ function parseManagedUiWorkerInput(raw) {
|
|
|
157929
158151
|
if (typeof value.startup_deadline_at !== "string" || !Number.isFinite(Date.parse(value.startup_deadline_at))) {
|
|
157930
158152
|
throw new Error("managed UI startup deadline is invalid");
|
|
157931
158153
|
}
|
|
157932
|
-
if (!
|
|
158154
|
+
if (!object12(launchIdentity) || Object.keys(launchIdentity).sort().join(",") !== "canonical_root,dev,ino") {
|
|
157933
158155
|
throw new Error("managed UI startup launch identity has an unsupported shape");
|
|
157934
158156
|
}
|
|
157935
158157
|
if (typeof launchIdentity.canonical_root !== "string" || !path71.isAbsolute(launchIdentity.canonical_root)) {
|