@anvailabs/agentbrowser-mcp 1.9.1 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -24,8 +24,8 @@ __export(value_exports, {
24
24
  IsUint8Array: () => IsUint8Array,
25
25
  IsUndefined: () => IsUndefined
26
26
  });
27
- function HasPropertyKey(value, key) {
28
- return key in value;
27
+ function HasPropertyKey(value, key2) {
28
+ return key2 in value;
29
29
  }
30
30
  function IsAsyncIterator(value) {
31
31
  return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.asyncIterator in value;
@@ -88,11 +88,11 @@ function RegExpType(value) {
88
88
  }
89
89
  function ObjectType(value) {
90
90
  const result = {};
91
- for (const key of Object.getOwnPropertyNames(value)) {
92
- result[key] = Visit(value[key]);
91
+ for (const key2 of Object.getOwnPropertyNames(value)) {
92
+ result[key2] = Visit(value[key2]);
93
93
  }
94
- for (const key of Object.getOwnPropertySymbols(value)) {
95
- result[key] = Visit(value[key]);
94
+ for (const key2 of Object.getOwnPropertySymbols(value)) {
95
+ result[key2] = Visit(value[key2]);
96
96
  }
97
97
  return result;
98
98
  }
@@ -136,8 +136,8 @@ function IsTypedArray(value) {
136
136
  function IsUint8Array2(value) {
137
137
  return value instanceof globalThis.Uint8Array;
138
138
  }
139
- function HasPropertyKey2(value, key) {
140
- return key in value;
139
+ function HasPropertyKey2(value, key2) {
140
+ return key2 in value;
141
141
  }
142
142
  function IsObject2(value) {
143
143
  return value !== null && typeof value === "object";
@@ -184,8 +184,8 @@ var TypeSystemPolicy;
184
184
  TypeSystemPolicy2.AllowArrayObject = false;
185
185
  TypeSystemPolicy2.AllowNaN = false;
186
186
  TypeSystemPolicy2.AllowNullVoid = false;
187
- function IsExactOptionalProperty(value, key) {
188
- return TypeSystemPolicy2.ExactOptionalPropertyTypes ? key in value : value[key] !== void 0;
187
+ function IsExactOptionalProperty(value, key2) {
188
+ return TypeSystemPolicy2.ExactOptionalPropertyTypes ? key2 in value : value[key2] !== void 0;
189
189
  }
190
190
  TypeSystemPolicy2.IsExactOptionalProperty = IsExactOptionalProperty;
191
191
  function IsObjectLike(value) {
@@ -223,11 +223,11 @@ function ImmutableRegExp(value) {
223
223
  }
224
224
  function ImmutableObject(value) {
225
225
  const result = {};
226
- for (const key of Object.getOwnPropertyNames(value)) {
227
- result[key] = Immutable(value[key]);
226
+ for (const key2 of Object.getOwnPropertyNames(value)) {
227
+ result[key2] = Immutable(value[key2]);
228
228
  }
229
- for (const key of Object.getOwnPropertySymbols(value)) {
230
- result[key] = Immutable(value[key]);
229
+ for (const key2 of Object.getOwnPropertySymbols(value)) {
230
+ result[key2] = Immutable(value[key2]);
231
231
  }
232
232
  return globalThis.Object.freeze(result);
233
233
  }
@@ -573,7 +573,7 @@ function IsInteger3(value) {
573
573
  return IsKindOf2(value, "Integer") && value.type === "integer" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximum) && IsOptionalNumber(value.exclusiveMinimum) && IsOptionalNumber(value.maximum) && IsOptionalNumber(value.minimum) && IsOptionalNumber(value.multipleOf);
574
574
  }
575
575
  function IsProperties(value) {
576
- return IsObject(value) && Object.entries(value).every(([key, schema]) => IsControlCharacterFree(key) && IsSchema2(schema));
576
+ return IsObject(value) && Object.entries(value).every(([key2, schema]) => IsControlCharacterFree(key2) && IsSchema2(schema));
577
577
  }
578
578
  function IsIntersect2(value) {
579
579
  return IsKindOf2(value, "Intersect") && (IsString(value.type) && value.type !== "object" ? false : true) && IsArray(value.allOf) && value.allOf.every((schema) => IsSchema2(schema) && !IsTransform2(schema)) && IsOptionalString(value.type) && (IsOptionalBoolean(value.unevaluatedProperties) || IsOptionalSchema(value.unevaluatedProperties)) && IsOptionalString(value.$id);
@@ -600,7 +600,7 @@ function IsLiteralValue2(value) {
600
600
  return IsBoolean(value) || IsNumber(value) || IsString(value);
601
601
  }
602
602
  function IsMappedKey2(value) {
603
- return IsKindOf2(value, "MappedKey") && IsArray(value.keys) && value.keys.every((key) => IsNumber(key) || IsString(key));
603
+ return IsKindOf2(value, "MappedKey") && IsArray(value.keys) && value.keys.every((key2) => IsNumber(key2) || IsString(key2));
604
604
  }
605
605
  function IsMappedResult2(value) {
606
606
  return IsKindOf2(value, "MappedResult") && IsProperties(value.properties);
@@ -806,12 +806,12 @@ function Computed(target, parameters, options) {
806
806
  }
807
807
 
808
808
  // ../../node_modules/.pnpm/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/discard/discard.mjs
809
- function DiscardKey(value, key) {
810
- const { [key]: _, ...rest } = value;
809
+ function DiscardKey(value, key2) {
810
+ const { [key2]: _, ...rest } = value;
811
811
  return rest;
812
812
  }
813
813
  function Discard(value, keys) {
814
- return keys.reduce((acc, key) => DiscardKey(acc, key), value);
814
+ return keys.reduce((acc, key2) => DiscardKey(acc, key2), value);
815
815
  }
816
816
 
817
817
  // ../../node_modules/.pnpm/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/never/never.mjs
@@ -1140,7 +1140,7 @@ function TemplateLiteral(unresolved, options) {
1140
1140
  // ../../node_modules/.pnpm/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs
1141
1141
  function FromTemplateLiteral(templateLiteral) {
1142
1142
  const keys = TemplateLiteralGenerate(templateLiteral);
1143
- return keys.map((key) => key.toString());
1143
+ return keys.map((key2) => key2.toString());
1144
1144
  }
1145
1145
  function FromUnion2(types) {
1146
1146
  const result = [];
@@ -1172,26 +1172,26 @@ function IndexFromMappedResult(type, mappedResult, options) {
1172
1172
  }
1173
1173
 
1174
1174
  // ../../node_modules/.pnpm/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.mjs
1175
- function FromRest(types, key) {
1176
- return types.map((type) => IndexFromPropertyKey(type, key));
1175
+ function FromRest(types, key2) {
1176
+ return types.map((type) => IndexFromPropertyKey(type, key2));
1177
1177
  }
1178
1178
  function FromIntersectRest(types) {
1179
1179
  return types.filter((type) => !IsNever(type));
1180
1180
  }
1181
- function FromIntersect(types, key) {
1182
- return IntersectEvaluated(FromIntersectRest(FromRest(types, key)));
1181
+ function FromIntersect(types, key2) {
1182
+ return IntersectEvaluated(FromIntersectRest(FromRest(types, key2)));
1183
1183
  }
1184
1184
  function FromUnionRest(types) {
1185
1185
  return types.some((L) => IsNever(L)) ? [] : types;
1186
1186
  }
1187
- function FromUnion3(types, key) {
1188
- return UnionEvaluated(FromUnionRest(FromRest(types, key)));
1187
+ function FromUnion3(types, key2) {
1188
+ return UnionEvaluated(FromUnionRest(FromRest(types, key2)));
1189
1189
  }
1190
- function FromTuple(types, key) {
1191
- return key in types ? types[key] : key === "[number]" ? UnionEvaluated(types) : Never();
1190
+ function FromTuple(types, key2) {
1191
+ return key2 in types ? types[key2] : key2 === "[number]" ? UnionEvaluated(types) : Never();
1192
1192
  }
1193
- function FromArray(type, key) {
1194
- return key === "[number]" ? type : Never();
1193
+ function FromArray(type, key2) {
1194
+ return key2 === "[number]" ? type : Never();
1195
1195
  }
1196
1196
  function FromProperty(properties, propertyKey) {
1197
1197
  return propertyKey in properties ? properties[propertyKey] : Never();
@@ -1205,23 +1205,23 @@ function IndexFromPropertyKeys(type, propertyKeys) {
1205
1205
  function FromSchema(type, propertyKeys) {
1206
1206
  return UnionEvaluated(IndexFromPropertyKeys(type, propertyKeys));
1207
1207
  }
1208
- function Index(type, key, options) {
1209
- if (IsRef(type) || IsRef(key)) {
1208
+ function Index(type, key2, options) {
1209
+ if (IsRef(type) || IsRef(key2)) {
1210
1210
  const error2 = `Index types using Ref parameters require both Type and Key to be of TSchema`;
1211
- if (!IsSchema(type) || !IsSchema(key))
1211
+ if (!IsSchema(type) || !IsSchema(key2))
1212
1212
  throw new TypeBoxError(error2);
1213
- return Computed("Index", [type, key]);
1213
+ return Computed("Index", [type, key2]);
1214
1214
  }
1215
- if (IsMappedResult(key))
1216
- return IndexFromMappedResult(type, key, options);
1217
- if (IsMappedKey(key))
1218
- return IndexFromMappedKey(type, key, options);
1219
- return CreateType(IsSchema(key) ? FromSchema(type, IndexPropertyKeys(key)) : FromSchema(type, key), options);
1215
+ if (IsMappedResult(key2))
1216
+ return IndexFromMappedResult(type, key2, options);
1217
+ if (IsMappedKey(key2))
1218
+ return IndexFromMappedKey(type, key2, options);
1219
+ return CreateType(IsSchema(key2) ? FromSchema(type, IndexPropertyKeys(key2)) : FromSchema(type, key2), options);
1220
1220
  }
1221
1221
 
1222
1222
  // ../../node_modules/.pnpm/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs
1223
- function MappedIndexPropertyKey(type, key, options) {
1224
- return { [key]: Index(type, [key], Clone(options)) };
1223
+ function MappedIndexPropertyKey(type, key2, options) {
1224
+ return { [key2]: Index(type, [key2], Clone(options)) };
1225
1225
  }
1226
1226
  function MappedIndexPropertyKeys(type, propertyKeys, options) {
1227
1227
  return propertyKeys.reduce((result, left) => {
@@ -1243,7 +1243,7 @@ function Iterator(items, options) {
1243
1243
 
1244
1244
  // ../../node_modules/.pnpm/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/object/object.mjs
1245
1245
  function RequiredArray(properties) {
1246
- return globalThis.Object.keys(properties).filter((key) => !IsOptional(properties[key]));
1246
+ return globalThis.Object.keys(properties).filter((key2) => !IsOptional(properties[key2]));
1247
1247
  }
1248
1248
  function _Object_(properties, options) {
1249
1249
  const required = RequiredArray(properties);
@@ -1340,8 +1340,8 @@ function MappedFunctionReturnType(K, T) {
1340
1340
  Acc[L] = FromSchemaType(L, T);
1341
1341
  return Acc;
1342
1342
  }
1343
- function Mapped(key, map3, options) {
1344
- const K = IsSchema(key) ? IndexPropertyKeys(key) : key;
1343
+ function Mapped(key2, map3, options) {
1344
+ const K = IsSchema(key2) ? IndexPropertyKeys(key2) : key2;
1345
1345
  const RT = map3({ [Kind]: "MappedKey", keys: K });
1346
1346
  const R = MappedFunctionReturnType(K, RT);
1347
1347
  return Object2(R, options);
@@ -1479,8 +1479,8 @@ function FromPatternProperties(patternProperties) {
1479
1479
  if (!includePatternProperties)
1480
1480
  return [];
1481
1481
  const patternPropertyKeys = globalThis.Object.getOwnPropertyNames(patternProperties);
1482
- return patternPropertyKeys.map((key) => {
1483
- return key[0] === "^" && key[key.length - 1] === "$" ? key.slice(1, key.length - 1) : key;
1482
+ return patternPropertyKeys.map((key2) => {
1483
+ return key2[0] === "^" && key2[key2.length - 1] === "$" ? key2.slice(1, key2.length - 1) : key2;
1484
1484
  });
1485
1485
  }
1486
1486
  function KeyOfPropertyKeys(type) {
@@ -1491,7 +1491,7 @@ function KeyOfPattern(schema) {
1491
1491
  includePatternProperties = true;
1492
1492
  const keys = KeyOfPropertyKeys(schema);
1493
1493
  includePatternProperties = false;
1494
- const pattern = keys.map((key) => `(${key})`);
1494
+ const pattern = keys.map((key2) => `(${key2})`);
1495
1495
  return `^(${pattern.join("|")})$`;
1496
1496
  }
1497
1497
 
@@ -1626,7 +1626,7 @@ function ConstructorParameters(schema, options) {
1626
1626
  function Enum(item, options) {
1627
1627
  if (IsUndefined(item))
1628
1628
  throw new Error("Enum undefined or empty");
1629
- const values1 = globalThis.Object.getOwnPropertyNames(item).filter((key) => isNaN(key)).map((key) => item[key]);
1629
+ const values1 = globalThis.Object.getOwnPropertyNames(item).filter((key2) => isNaN(key2)).map((key2) => item[key2]);
1630
1630
  const values2 = [...new Set(values1)];
1631
1631
  const anyOf = values2.map((value) => Literal(value));
1632
1632
  return Union(anyOf, { ...options, [Hint]: "Enum" });
@@ -1783,14 +1783,14 @@ function FromObjectRight(left, right) {
1783
1783
  }
1784
1784
  function FromObject(left, right) {
1785
1785
  return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : !type_exports.IsObject(right) ? ExtendsResult.False : (() => {
1786
- for (const key of Object.getOwnPropertyNames(right.properties)) {
1787
- if (!(key in left.properties) && !type_exports.IsOptional(right.properties[key])) {
1786
+ for (const key2 of Object.getOwnPropertyNames(right.properties)) {
1787
+ if (!(key2 in left.properties) && !type_exports.IsOptional(right.properties[key2])) {
1788
1788
  return ExtendsResult.False;
1789
1789
  }
1790
- if (type_exports.IsOptional(right.properties[key])) {
1790
+ if (type_exports.IsOptional(right.properties[key2])) {
1791
1791
  return ExtendsResult.True;
1792
1792
  }
1793
- if (Property(left.properties[key], right.properties[key]) === ExtendsResult.False) {
1793
+ if (Property(left.properties[key2], right.properties[key2]) === ExtendsResult.False) {
1794
1794
  return ExtendsResult.False;
1795
1795
  }
1796
1796
  }
@@ -1809,8 +1809,8 @@ function RecordValue(schema) {
1809
1809
  function FromRecordRight(left, right) {
1810
1810
  const [Key, Value] = [RecordKey(right), RecordValue(right)];
1811
1811
  return type_exports.IsLiteralString(left) && type_exports.IsNumber(Key) && IntoBooleanResult(Visit3(left, Value)) === ExtendsResult.True ? ExtendsResult.True : type_exports.IsUint8Array(left) && type_exports.IsNumber(Key) ? Visit3(left, Value) : type_exports.IsString(left) && type_exports.IsNumber(Key) ? Visit3(left, Value) : type_exports.IsArray(left) && type_exports.IsNumber(Key) ? Visit3(left, Value) : type_exports.IsObject(left) ? (() => {
1812
- for (const key of Object.getOwnPropertyNames(left.properties)) {
1813
- if (Property(Value, left.properties[key]) === ExtendsResult.False) {
1812
+ for (const key2 of Object.getOwnPropertyNames(left.properties)) {
1813
+ if (Property(Value, left.properties[key2]) === ExtendsResult.False) {
1814
1814
  return ExtendsResult.False;
1815
1815
  }
1816
1816
  }
@@ -2029,17 +2029,17 @@ function RecordCreateFromKeys(K, T, options) {
2029
2029
  function FromTemplateLiteralKey(K, T, options) {
2030
2030
  return IsTemplateLiteralFinite(K) ? RecordCreateFromKeys(IndexPropertyKeys(K), T, options) : RecordCreateFromPattern(K.pattern, T, options);
2031
2031
  }
2032
- function FromUnionKey(key, type, options) {
2033
- return RecordCreateFromKeys(IndexPropertyKeys(Union(key)), type, options);
2032
+ function FromUnionKey(key2, type, options) {
2033
+ return RecordCreateFromKeys(IndexPropertyKeys(Union(key2)), type, options);
2034
2034
  }
2035
- function FromLiteralKey(key, type, options) {
2036
- return RecordCreateFromKeys([key.toString()], type, options);
2035
+ function FromLiteralKey(key2, type, options) {
2036
+ return RecordCreateFromKeys([key2.toString()], type, options);
2037
2037
  }
2038
- function FromRegExpKey(key, type, options) {
2039
- return RecordCreateFromPattern(key.source, type, options);
2038
+ function FromRegExpKey(key2, type, options) {
2039
+ return RecordCreateFromPattern(key2.source, type, options);
2040
2040
  }
2041
- function FromStringKey(key, type, options) {
2042
- const pattern = IsUndefined(key.pattern) ? PatternStringExact : key.pattern;
2041
+ function FromStringKey(key2, type, options) {
2042
+ const pattern = IsUndefined(key2.pattern) ? PatternStringExact : key2.pattern;
2043
2043
  return RecordCreateFromPattern(pattern, type, options);
2044
2044
  }
2045
2045
  function FromAnyKey(_, type, options) {
@@ -2057,8 +2057,8 @@ function FromIntegerKey(_key, type, options) {
2057
2057
  function FromNumberKey(_, type, options) {
2058
2058
  return RecordCreateFromPattern(PatternNumberExact, type, options);
2059
2059
  }
2060
- function Record(key, type, options = {}) {
2061
- return IsUnion(key) ? FromUnionKey(key.anyOf, type, options) : IsTemplateLiteral(key) ? FromTemplateLiteralKey(key, type, options) : IsLiteral(key) ? FromLiteralKey(key.const, type, options) : IsBoolean3(key) ? FromBooleanKey(key, type, options) : IsInteger2(key) ? FromIntegerKey(key, type, options) : IsNumber3(key) ? FromNumberKey(key, type, options) : IsRegExp2(key) ? FromRegExpKey(key, type, options) : IsString3(key) ? FromStringKey(key, type, options) : IsAny(key) ? FromAnyKey(key, type, options) : IsNever(key) ? FromNeverKey(key, type, options) : Never(options);
2060
+ function Record(key2, type, options = {}) {
2061
+ return IsUnion(key2) ? FromUnionKey(key2.anyOf, type, options) : IsTemplateLiteral(key2) ? FromTemplateLiteralKey(key2, type, options) : IsLiteral(key2) ? FromLiteralKey(key2.const, type, options) : IsBoolean3(key2) ? FromBooleanKey(key2, type, options) : IsInteger2(key2) ? FromIntegerKey(key2, type, options) : IsNumber3(key2) ? FromNumberKey(key2, type, options) : IsRegExp2(key2) ? FromRegExpKey(key2, type, options) : IsString3(key2) ? FromStringKey(key2, type, options) : IsAny(key2) ? FromAnyKey(key2, type, options) : IsNever(key2) ? FromNeverKey(key2, type, options) : Never(options);
2062
2062
  }
2063
2063
  function RecordPattern(record) {
2064
2064
  return globalThis.Object.getOwnPropertyNames(record.patternProperties)[0];
@@ -2132,8 +2132,8 @@ function FromProperty2(args, type) {
2132
2132
  return isReadonly && isOptional ? ReadonlyOptional(mapped) : isReadonly && !isOptional ? Readonly(mapped) : !isReadonly && isOptional ? Optional(mapped) : mapped;
2133
2133
  }
2134
2134
  function FromProperties11(args, properties) {
2135
- return globalThis.Object.getOwnPropertyNames(properties).reduce((result, key) => {
2136
- return { ...result, [key]: FromProperty2(args, properties[key]) };
2135
+ return globalThis.Object.getOwnPropertyNames(properties).reduce((result, key2) => {
2136
+ return { ...result, [key2]: FromProperty2(args, properties[key2]) };
2137
2137
  }, {});
2138
2138
  }
2139
2139
  function FromTypes(args, types) {
@@ -2258,8 +2258,8 @@ function FromIntersect6(types, propertyKeys) {
2258
2258
  function FromUnion8(types, propertyKeys) {
2259
2259
  return types.map((type) => OmitResolve(type, propertyKeys));
2260
2260
  }
2261
- function FromProperty3(properties, key) {
2262
- const { [key]: _, ...R } = properties;
2261
+ function FromProperty3(properties, key2) {
2262
+ const { [key2]: _, ...R } = properties;
2263
2263
  return R;
2264
2264
  }
2265
2265
  function FromProperties13(properties, propertyKeys) {
@@ -2271,23 +2271,23 @@ function FromObject3(type, propertyKeys, properties) {
2271
2271
  return Object2(mappedProperties, options);
2272
2272
  }
2273
2273
  function UnionFromPropertyKeys(propertyKeys) {
2274
- const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
2274
+ const result = propertyKeys.reduce((result2, key2) => IsLiteralValue(key2) ? [...result2, Literal(key2)] : result2, []);
2275
2275
  return Union(result);
2276
2276
  }
2277
2277
  function OmitResolve(type, propertyKeys) {
2278
2278
  return IsIntersect(type) ? Intersect(FromIntersect6(type.allOf, propertyKeys)) : IsUnion(type) ? Union(FromUnion8(type.anyOf, propertyKeys)) : IsObject3(type) ? FromObject3(type, propertyKeys, type.properties) : Object2({});
2279
2279
  }
2280
- function Omit(type, key, options) {
2281
- const typeKey = IsArray(key) ? UnionFromPropertyKeys(key) : key;
2282
- const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
2280
+ function Omit(type, key2, options) {
2281
+ const typeKey = IsArray(key2) ? UnionFromPropertyKeys(key2) : key2;
2282
+ const propertyKeys = IsSchema(key2) ? IndexPropertyKeys(key2) : key2;
2283
2283
  const isTypeRef = IsRef(type);
2284
- const isKeyRef = IsRef(key);
2285
- return IsMappedResult(type) ? OmitFromMappedResult(type, propertyKeys, options) : IsMappedKey(key) ? OmitFromMappedKey(type, key, options) : isTypeRef && isKeyRef ? Computed("Omit", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed("Omit", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed("Omit", [type, typeKey], options) : CreateType({ ...OmitResolve(type, propertyKeys), ...options });
2284
+ const isKeyRef = IsRef(key2);
2285
+ return IsMappedResult(type) ? OmitFromMappedResult(type, propertyKeys, options) : IsMappedKey(key2) ? OmitFromMappedKey(type, key2, options) : isTypeRef && isKeyRef ? Computed("Omit", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed("Omit", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed("Omit", [type, typeKey], options) : CreateType({ ...OmitResolve(type, propertyKeys), ...options });
2286
2286
  }
2287
2287
 
2288
2288
  // ../../node_modules/.pnpm/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs
2289
- function FromPropertyKey2(type, key, options) {
2290
- return { [key]: Omit(type, [key], Clone(options)) };
2289
+ function FromPropertyKey2(type, key2, options) {
2290
+ return { [key2]: Omit(type, [key2], Clone(options)) };
2291
2291
  }
2292
2292
  function FromPropertyKeys2(type, propertyKeys, options) {
2293
2293
  return propertyKeys.reduce((Acc, LK) => {
@@ -2337,24 +2337,24 @@ function FromObject4(Type2, keys, properties) {
2337
2337
  return Object2(mappedProperties, options);
2338
2338
  }
2339
2339
  function UnionFromPropertyKeys2(propertyKeys) {
2340
- const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
2340
+ const result = propertyKeys.reduce((result2, key2) => IsLiteralValue(key2) ? [...result2, Literal(key2)] : result2, []);
2341
2341
  return Union(result);
2342
2342
  }
2343
2343
  function PickResolve(type, propertyKeys) {
2344
2344
  return IsIntersect(type) ? Intersect(FromIntersect7(type.allOf, propertyKeys)) : IsUnion(type) ? Union(FromUnion9(type.anyOf, propertyKeys)) : IsObject3(type) ? FromObject4(type, propertyKeys, type.properties) : Object2({});
2345
2345
  }
2346
- function Pick(type, key, options) {
2347
- const typeKey = IsArray(key) ? UnionFromPropertyKeys2(key) : key;
2348
- const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
2346
+ function Pick(type, key2, options) {
2347
+ const typeKey = IsArray(key2) ? UnionFromPropertyKeys2(key2) : key2;
2348
+ const propertyKeys = IsSchema(key2) ? IndexPropertyKeys(key2) : key2;
2349
2349
  const isTypeRef = IsRef(type);
2350
- const isKeyRef = IsRef(key);
2351
- return IsMappedResult(type) ? PickFromMappedResult(type, propertyKeys, options) : IsMappedKey(key) ? PickFromMappedKey(type, key, options) : isTypeRef && isKeyRef ? Computed("Pick", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed("Pick", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed("Pick", [type, typeKey], options) : CreateType({ ...PickResolve(type, propertyKeys), ...options });
2350
+ const isKeyRef = IsRef(key2);
2351
+ return IsMappedResult(type) ? PickFromMappedResult(type, propertyKeys, options) : IsMappedKey(key2) ? PickFromMappedKey(type, key2, options) : isTypeRef && isKeyRef ? Computed("Pick", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed("Pick", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed("Pick", [type, typeKey], options) : CreateType({ ...PickResolve(type, propertyKeys), ...options });
2352
2352
  }
2353
2353
 
2354
2354
  // ../../node_modules/.pnpm/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs
2355
- function FromPropertyKey3(type, key, options) {
2355
+ function FromPropertyKey3(type, key2, options) {
2356
2356
  return {
2357
- [key]: Pick(type, [key], Clone(options))
2357
+ [key2]: Pick(type, [key2], Clone(options))
2358
2358
  };
2359
2359
  }
2360
2360
  function FromPropertyKeys3(type, propertyKeys, options) {
@@ -2535,8 +2535,8 @@ function FromIterator3(moduleProperties, type) {
2535
2535
  return Iterator(FromType2(moduleProperties, type));
2536
2536
  }
2537
2537
  function FromObject7(moduleProperties, properties) {
2538
- return Object2(globalThis.Object.keys(properties).reduce((result, key) => {
2539
- return { ...result, [key]: FromType2(moduleProperties, properties[key]) };
2538
+ return Object2(globalThis.Object.keys(properties).reduce((result, key2) => {
2539
+ return { ...result, [key2]: FromType2(moduleProperties, properties[key2]) };
2540
2540
  }, {}));
2541
2541
  }
2542
2542
  function FromRecord3(moduleProperties, type) {
@@ -2569,12 +2569,12 @@ function FromType2(moduleProperties, type) {
2569
2569
  )
2570
2570
  );
2571
2571
  }
2572
- function ComputeType(moduleProperties, key) {
2573
- return key in moduleProperties ? FromType2(moduleProperties, moduleProperties[key]) : Never();
2572
+ function ComputeType(moduleProperties, key2) {
2573
+ return key2 in moduleProperties ? FromType2(moduleProperties, moduleProperties[key2]) : Never();
2574
2574
  }
2575
2575
  function ComputeModuleProperties(moduleProperties) {
2576
- return globalThis.Object.getOwnPropertyNames(moduleProperties).reduce((result, key) => {
2577
- return { ...result, [key]: ComputeType(moduleProperties, key) };
2576
+ return globalThis.Object.getOwnPropertyNames(moduleProperties).reduce((result, key2) => {
2577
+ return { ...result, [key2]: ComputeType(moduleProperties, key2) };
2578
2578
  }, {});
2579
2579
  }
2580
2580
 
@@ -2586,14 +2586,14 @@ var TModule = class {
2586
2586
  this.$defs = identified;
2587
2587
  }
2588
2588
  /** `[Json]` Imports a Type by Key. */
2589
- Import(key, options) {
2590
- const $defs = { ...this.$defs, [key]: CreateType(this.$defs[key], options) };
2591
- return CreateType({ [Kind]: "Import", $defs, $ref: key });
2589
+ Import(key2, options) {
2590
+ const $defs = { ...this.$defs, [key2]: CreateType(this.$defs[key2], options) };
2591
+ return CreateType({ [Kind]: "Import", $defs, $ref: key2 });
2592
2592
  }
2593
2593
  // prettier-ignore
2594
2594
  WithIdentifiers($defs) {
2595
- return globalThis.Object.getOwnPropertyNames($defs).reduce((result, key) => {
2596
- return { ...result, [key]: { ...$defs[key], $id: key } };
2595
+ return globalThis.Object.getOwnPropertyNames($defs).reduce((result, key2) => {
2596
+ return { ...result, [key2]: { ...$defs[key2], $id: key2 } };
2597
2597
  }, {});
2598
2598
  }
2599
2599
  };
@@ -2989,9 +2989,9 @@ function NumberType(value) {
2989
2989
  }
2990
2990
  function ObjectType2(value) {
2991
2991
  FNV1A64(ByteMarker.Object);
2992
- for (const key of globalThis.Object.getOwnPropertyNames(value).sort()) {
2993
- Visit4(key);
2994
- Visit4(value[key]);
2992
+ for (const key2 of globalThis.Object.getOwnPropertyNames(value).sort()) {
2993
+ Visit4(key2);
2994
+ Visit4(value[key2]);
2995
2995
  }
2996
2996
  }
2997
2997
  function StringType(value) {
@@ -3193,12 +3193,12 @@ function FromInteger2(schema, references, value) {
3193
3193
  function FromIntersect9(schema, references, value) {
3194
3194
  const check1 = schema.allOf.every((schema2) => Visit5(schema2, references, value));
3195
3195
  if (schema.unevaluatedProperties === false) {
3196
- const keyPattern = new RegExp(KeyOfPattern(schema));
3197
- const check2 = Object.getOwnPropertyNames(value).every((key) => keyPattern.test(key));
3196
+ const keyPattern2 = new RegExp(KeyOfPattern(schema));
3197
+ const check2 = Object.getOwnPropertyNames(value).every((key2) => keyPattern2.test(key2));
3198
3198
  return check1 && check2;
3199
3199
  } else if (IsSchema(schema.unevaluatedProperties)) {
3200
3200
  const keyCheck = new RegExp(KeyOfPattern(schema));
3201
- const check2 = Object.getOwnPropertyNames(value).every((key) => keyCheck.test(key) || Visit5(schema.unevaluatedProperties, references, value[key]));
3201
+ const check2 = Object.getOwnPropertyNames(value).every((key2) => keyCheck.test(key2) || Visit5(schema.unevaluatedProperties, references, value[key2]));
3202
3202
  return check1 && check2;
3203
3203
  } else {
3204
3204
  return check1;
@@ -3273,7 +3273,7 @@ function FromObject8(schema, references, value) {
3273
3273
  }
3274
3274
  } else if (typeof schema.additionalProperties === "object") {
3275
3275
  const valueKeys = Object.getOwnPropertyNames(value);
3276
- return valueKeys.every((key) => knownKeys.includes(key) || Visit5(schema.additionalProperties, references, value[key]));
3276
+ return valueKeys.every((key2) => knownKeys.includes(key2) || Visit5(schema.additionalProperties, references, value[key2]));
3277
3277
  } else {
3278
3278
  return true;
3279
3279
  }
@@ -3293,14 +3293,14 @@ function FromRecord4(schema, references, value) {
3293
3293
  }
3294
3294
  const [patternKey, patternSchema] = Object.entries(schema.patternProperties)[0];
3295
3295
  const regex = new RegExp(patternKey);
3296
- const check1 = Object.entries(value).every(([key, value2]) => {
3297
- return regex.test(key) ? Visit5(patternSchema, references, value2) : true;
3296
+ const check1 = Object.entries(value).every(([key2, value2]) => {
3297
+ return regex.test(key2) ? Visit5(patternSchema, references, value2) : true;
3298
3298
  });
3299
- const check2 = typeof schema.additionalProperties === "object" ? Object.entries(value).every(([key, value2]) => {
3300
- return !regex.test(key) ? Visit5(schema.additionalProperties, references, value2) : true;
3299
+ const check2 = typeof schema.additionalProperties === "object" ? Object.entries(value).every(([key2, value2]) => {
3300
+ return !regex.test(key2) ? Visit5(schema.additionalProperties, references, value2) : true;
3301
3301
  }) : true;
3302
- const check3 = schema.additionalProperties === false ? Object.getOwnPropertyNames(value).every((key) => {
3303
- return regex.test(key);
3302
+ const check3 = schema.additionalProperties === false ? Object.getOwnPropertyNames(value).every((key2) => {
3303
+ return regex.test(key2);
3304
3304
  }) : true;
3305
3305
  return check1 && check2 && check3;
3306
3306
  }
@@ -3556,8 +3556,8 @@ var ValueErrorsUnknownTypeError = class extends TypeBoxError {
3556
3556
  this.schema = schema;
3557
3557
  }
3558
3558
  };
3559
- function EscapeKey(key) {
3560
- return key.replace(/~/g, "~0").replace(/\//g, "~1");
3559
+ function EscapeKey(key2) {
3560
+ return key2.replace(/~/g, "~0").replace(/\//g, "~1");
3561
3561
  }
3562
3562
  function IsDefined2(value) {
3563
3563
  return value !== void 0;
@@ -4086,11 +4086,11 @@ function Assert(...args) {
4086
4086
  // ../../node_modules/.pnpm/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/value/clone/clone.mjs
4087
4087
  function FromObject10(value) {
4088
4088
  const Acc = {};
4089
- for (const key of Object.getOwnPropertyNames(value)) {
4090
- Acc[key] = Clone2(value[key]);
4089
+ for (const key2 of Object.getOwnPropertyNames(value)) {
4090
+ Acc[key2] = Clone2(value[key2]);
4091
4091
  }
4092
- for (const key of Object.getOwnPropertySymbols(value)) {
4093
- Acc[key] = Clone2(value[key]);
4092
+ for (const key2 of Object.getOwnPropertySymbols(value)) {
4093
+ Acc[key2] = Clone2(value[key2]);
4094
4094
  }
4095
4095
  return Acc;
4096
4096
  }
@@ -4195,9 +4195,9 @@ function FromConstructor6(schema, references) {
4195
4195
  if (typeof value === "object" && !Array.isArray(value)) {
4196
4196
  return class {
4197
4197
  constructor() {
4198
- for (const [key, val] of Object.entries(value)) {
4198
+ for (const [key2, val] of Object.entries(value)) {
4199
4199
  const self = this;
4200
- self[key] = val;
4200
+ self[key2] = val;
4201
4201
  }
4202
4202
  }
4203
4203
  };
@@ -4301,10 +4301,10 @@ function FromObject11(schema, references) {
4301
4301
  } else {
4302
4302
  const required = new Set(schema.required);
4303
4303
  const Acc = {};
4304
- for (const [key, subschema] of Object.entries(schema.properties)) {
4305
- if (!required.has(key))
4304
+ for (const [key2, subschema] of Object.entries(schema.properties)) {
4305
+ if (!required.has(key2))
4306
4306
  continue;
4307
- Acc[key] = Visit7(subschema, references);
4307
+ Acc[key2] = Visit7(subschema, references);
4308
4308
  }
4309
4309
  return Acc;
4310
4310
  }
@@ -4538,10 +4538,10 @@ function ScoreUnion(schema, references, value) {
4538
4538
  const object = schema;
4539
4539
  const keys = Object.getOwnPropertyNames(value);
4540
4540
  const entries = Object.entries(object.properties);
4541
- return entries.reduce((acc, [key, schema2]) => {
4542
- const literal = schema2[Kind] === "Literal" && schema2.const === value[key] ? 100 : 0;
4543
- const checks = Check(schema2, references, value[key]) ? 10 : 0;
4544
- const exists = keys.includes(key) ? 1 : 0;
4541
+ return entries.reduce((acc, [key2, schema2]) => {
4542
+ const literal = schema2[Kind] === "Literal" && schema2.const === value[key2] ? 100 : 0;
4543
+ const checks = Check(schema2, references, value[key2]) ? 10 : 0;
4544
+ const exists = keys.includes(key2) ? 1 : 0;
4545
4545
  return acc + (literal + checks + exists);
4546
4546
  }, 0);
4547
4547
  } else if (schema[Kind] === "Union") {
@@ -4598,10 +4598,10 @@ function FromConstructor7(schema, references, value) {
4598
4598
  const required = new Set(schema.returns.required || []);
4599
4599
  const result = function() {
4600
4600
  };
4601
- for (const [key, property] of Object.entries(schema.returns.properties)) {
4602
- if (!required.has(key) && value.prototype[key] === void 0)
4601
+ for (const [key2, property] of Object.entries(schema.returns.properties)) {
4602
+ if (!required.has(key2) && value.prototype[key2] === void 0)
4603
4603
  continue;
4604
- result.prototype[key] = Visit8(property, references, value.prototype[key]);
4604
+ result.prototype[key2] = Visit8(property, references, value.prototype[key2]);
4605
4605
  }
4606
4606
  return result;
4607
4607
  }
@@ -4615,9 +4615,9 @@ function IntersectAssign(correct, value) {
4615
4615
  return correct;
4616
4616
  if (!IsObject2(correct) || !IsObject2(value))
4617
4617
  return value;
4618
- return globalThis.Object.getOwnPropertyNames(correct).reduce((result, key) => {
4619
- const property = key in value ? IntersectAssign(correct[key], value[key]) : correct[key];
4620
- return { ...result, [key]: property };
4618
+ return globalThis.Object.getOwnPropertyNames(correct).reduce((result, key2) => {
4619
+ const property = key2 in value ? IntersectAssign(correct[key2], value[key2]) : correct[key2];
4620
+ return { ...result, [key2]: property };
4621
4621
  }, {});
4622
4622
  }
4623
4623
  function FromIntersect12(schema, references, value) {
@@ -4637,10 +4637,10 @@ function FromObject12(schema, references, value) {
4637
4637
  return Create2(schema, references);
4638
4638
  const required = new Set(schema.required || []);
4639
4639
  const result = {};
4640
- for (const [key, property] of Object.entries(schema.properties)) {
4641
- if (!required.has(key) && value[key] === void 0)
4640
+ for (const [key2, property] of Object.entries(schema.properties)) {
4641
+ if (!required.has(key2) && value[key2] === void 0)
4642
4642
  continue;
4643
- result[key] = Visit8(property, references, value[key]);
4643
+ result[key2] = Visit8(property, references, value[key2]);
4644
4644
  }
4645
4645
  if (typeof schema.additionalProperties === "object") {
4646
4646
  const propertyNames = Object.getOwnPropertyNames(schema.properties);
@@ -4751,11 +4751,11 @@ function FromIntersect13(schema, references, value) {
4751
4751
  if (!IsObject2(value) || !IsObject2(composite) || !IsKind(unevaluatedProperties))
4752
4752
  return composite;
4753
4753
  const knownkeys = KeyOfPropertyKeys(schema);
4754
- for (const key of Object.getOwnPropertyNames(value)) {
4755
- if (knownkeys.includes(key))
4754
+ for (const key2 of Object.getOwnPropertyNames(value)) {
4755
+ if (knownkeys.includes(key2))
4756
4756
  continue;
4757
- if (Check(unevaluatedProperties, references, value[key])) {
4758
- composite[key] = Visit9(unevaluatedProperties, references, value[key]);
4757
+ if (Check(unevaluatedProperties, references, value[key2])) {
4758
+ composite[key2] = Visit9(unevaluatedProperties, references, value[key2]);
4759
4759
  }
4760
4760
  }
4761
4761
  return composite;
@@ -4764,16 +4764,16 @@ function FromObject13(schema, references, value) {
4764
4764
  if (!IsObject2(value) || IsArray2(value))
4765
4765
  return value;
4766
4766
  const additionalProperties = schema.additionalProperties;
4767
- for (const key of Object.getOwnPropertyNames(value)) {
4768
- if (HasPropertyKey2(schema.properties, key)) {
4769
- value[key] = Visit9(schema.properties[key], references, value[key]);
4767
+ for (const key2 of Object.getOwnPropertyNames(value)) {
4768
+ if (HasPropertyKey2(schema.properties, key2)) {
4769
+ value[key2] = Visit9(schema.properties[key2], references, value[key2]);
4770
4770
  continue;
4771
4771
  }
4772
- if (IsKind(additionalProperties) && Check(additionalProperties, references, value[key])) {
4773
- value[key] = Visit9(additionalProperties, references, value[key]);
4772
+ if (IsKind(additionalProperties) && Check(additionalProperties, references, value[key2])) {
4773
+ value[key2] = Visit9(additionalProperties, references, value[key2]);
4774
4774
  continue;
4775
4775
  }
4776
- delete value[key];
4776
+ delete value[key2];
4777
4777
  }
4778
4778
  return value;
4779
4779
  }
@@ -4784,16 +4784,16 @@ function FromRecord8(schema, references, value) {
4784
4784
  const propertyKeys = Object.getOwnPropertyNames(value);
4785
4785
  const [propertyKey, propertySchema] = Object.entries(schema.patternProperties)[0];
4786
4786
  const propertyKeyTest = new RegExp(propertyKey);
4787
- for (const key of propertyKeys) {
4788
- if (propertyKeyTest.test(key)) {
4789
- value[key] = Visit9(propertySchema, references, value[key]);
4787
+ for (const key2 of propertyKeys) {
4788
+ if (propertyKeyTest.test(key2)) {
4789
+ value[key2] = Visit9(propertySchema, references, value[key2]);
4790
4790
  continue;
4791
4791
  }
4792
- if (IsKind(additionalProperties) && Check(additionalProperties, references, value[key])) {
4793
- value[key] = Visit9(additionalProperties, references, value[key]);
4792
+ if (IsKind(additionalProperties) && Check(additionalProperties, references, value[key2])) {
4793
+ value[key2] = Visit9(additionalProperties, references, value[key2]);
4794
4794
  continue;
4795
4795
  }
4796
- delete value[key];
4796
+ delete value[key2];
4797
4797
  }
4798
4798
  return value;
4799
4799
  }
@@ -5108,9 +5108,9 @@ function FromIntersect15(schema, references, path, value) {
5108
5108
  const unknownKeys = Object.getOwnPropertyNames(knownProperties);
5109
5109
  const unevaluatedProperties = schema.unevaluatedProperties;
5110
5110
  const unknownProperties = { ...knownProperties };
5111
- for (const key of unknownKeys)
5112
- if (!knownKeys.includes(key)) {
5113
- unknownProperties[key] = Default3(unevaluatedProperties, `${path}/${key}`, unknownProperties[key]);
5111
+ for (const key2 of unknownKeys)
5112
+ if (!knownKeys.includes(key2)) {
5113
+ unknownProperties[key2] = Default3(unevaluatedProperties, `${path}/${key2}`, unknownProperties[key2]);
5114
5114
  }
5115
5115
  return Default3(schema, path, unknownProperties);
5116
5116
  }
@@ -5128,12 +5128,12 @@ function FromObject15(schema, references, path, value) {
5128
5128
  return Default3(schema, path, value);
5129
5129
  const knownKeys = KeyOfPropertyKeys(schema);
5130
5130
  const knownProperties = { ...value };
5131
- for (const key of knownKeys) {
5132
- if (!HasPropertyKey2(knownProperties, key))
5131
+ for (const key2 of knownKeys) {
5132
+ if (!HasPropertyKey2(knownProperties, key2))
5133
5133
  continue;
5134
- if (IsUndefined2(knownProperties[key]) && (!IsUndefined3(schema.properties[key]) || TypeSystemPolicy.IsExactOptionalProperty(knownProperties, key)))
5134
+ if (IsUndefined2(knownProperties[key2]) && (!IsUndefined3(schema.properties[key2]) || TypeSystemPolicy.IsExactOptionalProperty(knownProperties, key2)))
5135
5135
  continue;
5136
- knownProperties[key] = Visit11(schema.properties[key], references, `${path}/${key}`, knownProperties[key]);
5136
+ knownProperties[key2] = Visit11(schema.properties[key2], references, `${path}/${key2}`, knownProperties[key2]);
5137
5137
  }
5138
5138
  if (!IsSchema(schema.additionalProperties)) {
5139
5139
  return Default3(schema, path, knownProperties);
@@ -5141,9 +5141,9 @@ function FromObject15(schema, references, path, value) {
5141
5141
  const unknownKeys = Object.getOwnPropertyNames(knownProperties);
5142
5142
  const additionalProperties = schema.additionalProperties;
5143
5143
  const unknownProperties = { ...knownProperties };
5144
- for (const key of unknownKeys)
5145
- if (!knownKeys.includes(key)) {
5146
- unknownProperties[key] = Default3(additionalProperties, `${path}/${key}`, unknownProperties[key]);
5144
+ for (const key2 of unknownKeys)
5145
+ if (!knownKeys.includes(key2)) {
5146
+ unknownProperties[key2] = Default3(additionalProperties, `${path}/${key2}`, unknownProperties[key2]);
5147
5147
  }
5148
5148
  return Default3(schema, path, unknownProperties);
5149
5149
  }
@@ -5153,9 +5153,9 @@ function FromRecord10(schema, references, path, value) {
5153
5153
  const pattern = Object.getOwnPropertyNames(schema.patternProperties)[0];
5154
5154
  const knownKeys = new RegExp(pattern);
5155
5155
  const knownProperties = { ...value };
5156
- for (const key of Object.getOwnPropertyNames(value))
5157
- if (knownKeys.test(key)) {
5158
- knownProperties[key] = Visit11(schema.patternProperties[pattern], references, `${path}/${key}`, knownProperties[key]);
5156
+ for (const key2 of Object.getOwnPropertyNames(value))
5157
+ if (knownKeys.test(key2)) {
5158
+ knownProperties[key2] = Visit11(schema.patternProperties[pattern], references, `${path}/${key2}`, knownProperties[key2]);
5159
5159
  }
5160
5160
  if (!IsSchema(schema.additionalProperties)) {
5161
5161
  return Default3(schema, path, knownProperties);
@@ -5163,9 +5163,9 @@ function FromRecord10(schema, references, path, value) {
5163
5163
  const unknownKeys = Object.getOwnPropertyNames(knownProperties);
5164
5164
  const additionalProperties = schema.additionalProperties;
5165
5165
  const unknownProperties = { ...knownProperties };
5166
- for (const key of unknownKeys)
5167
- if (!knownKeys.test(key)) {
5168
- unknownProperties[key] = Default3(additionalProperties, `${path}/${key}`, unknownProperties[key]);
5166
+ for (const key2 of unknownKeys)
5167
+ if (!knownKeys.test(key2)) {
5168
+ unknownProperties[key2] = Default3(additionalProperties, `${path}/${key2}`, unknownProperties[key2]);
5169
5169
  }
5170
5170
  return Default3(schema, path, unknownProperties);
5171
5171
  }
@@ -5275,9 +5275,9 @@ function FromIntersect16(schema, references, path, value) {
5275
5275
  const unknownKeys = Object.getOwnPropertyNames(knownProperties);
5276
5276
  const unevaluatedProperties = schema.unevaluatedProperties;
5277
5277
  const properties = { ...knownProperties };
5278
- for (const key of unknownKeys)
5279
- if (!knownKeys.includes(key)) {
5280
- properties[key] = Default4(unevaluatedProperties, `${path}/${key}`, properties[key]);
5278
+ for (const key2 of unknownKeys)
5279
+ if (!knownKeys.includes(key2)) {
5280
+ properties[key2] = Default4(unevaluatedProperties, `${path}/${key2}`, properties[key2]);
5281
5281
  }
5282
5282
  return properties;
5283
5283
  }
@@ -5290,12 +5290,12 @@ function FromObject16(schema, references, path, value) {
5290
5290
  return defaulted;
5291
5291
  const knownKeys = KeyOfPropertyKeys(schema);
5292
5292
  const knownProperties = { ...defaulted };
5293
- for (const key of knownKeys) {
5294
- if (!HasPropertyKey2(knownProperties, key))
5293
+ for (const key2 of knownKeys) {
5294
+ if (!HasPropertyKey2(knownProperties, key2))
5295
5295
  continue;
5296
- if (IsUndefined2(knownProperties[key]) && (!IsUndefined3(schema.properties[key]) || TypeSystemPolicy.IsExactOptionalProperty(knownProperties, key)))
5296
+ if (IsUndefined2(knownProperties[key2]) && (!IsUndefined3(schema.properties[key2]) || TypeSystemPolicy.IsExactOptionalProperty(knownProperties, key2)))
5297
5297
  continue;
5298
- knownProperties[key] = Visit12(schema.properties[key], references, `${path}/${key}`, knownProperties[key]);
5298
+ knownProperties[key2] = Visit12(schema.properties[key2], references, `${path}/${key2}`, knownProperties[key2]);
5299
5299
  }
5300
5300
  if (!IsSchema(schema.additionalProperties)) {
5301
5301
  return knownProperties;
@@ -5303,9 +5303,9 @@ function FromObject16(schema, references, path, value) {
5303
5303
  const unknownKeys = Object.getOwnPropertyNames(knownProperties);
5304
5304
  const additionalProperties = schema.additionalProperties;
5305
5305
  const properties = { ...knownProperties };
5306
- for (const key of unknownKeys)
5307
- if (!knownKeys.includes(key)) {
5308
- properties[key] = Default4(additionalProperties, `${path}/${key}`, properties[key]);
5306
+ for (const key2 of unknownKeys)
5307
+ if (!knownKeys.includes(key2)) {
5308
+ properties[key2] = Default4(additionalProperties, `${path}/${key2}`, properties[key2]);
5309
5309
  }
5310
5310
  return properties;
5311
5311
  }
@@ -5316,9 +5316,9 @@ function FromRecord11(schema, references, path, value) {
5316
5316
  const pattern = Object.getOwnPropertyNames(schema.patternProperties)[0];
5317
5317
  const knownKeys = new RegExp(pattern);
5318
5318
  const knownProperties = { ...defaulted };
5319
- for (const key of Object.getOwnPropertyNames(value))
5320
- if (knownKeys.test(key)) {
5321
- knownProperties[key] = Visit12(schema.patternProperties[pattern], references, `${path}/${key}`, knownProperties[key]);
5319
+ for (const key2 of Object.getOwnPropertyNames(value))
5320
+ if (knownKeys.test(key2)) {
5321
+ knownProperties[key2] = Visit12(schema.patternProperties[pattern], references, `${path}/${key2}`, knownProperties[key2]);
5322
5322
  }
5323
5323
  if (!IsSchema(schema.additionalProperties)) {
5324
5324
  return knownProperties;
@@ -5326,9 +5326,9 @@ function FromRecord11(schema, references, path, value) {
5326
5326
  const unknownKeys = Object.getOwnPropertyNames(knownProperties);
5327
5327
  const additionalProperties = schema.additionalProperties;
5328
5328
  const properties = { ...knownProperties };
5329
- for (const key of unknownKeys)
5330
- if (!knownKeys.test(key)) {
5331
- properties[key] = Default4(additionalProperties, `${path}/${key}`, properties[key]);
5329
+ for (const key2 of unknownKeys)
5330
+ if (!knownKeys.test(key2)) {
5331
+ properties[key2] = Default4(additionalProperties, `${path}/${key2}`, properties[key2]);
5332
5332
  }
5333
5333
  return properties;
5334
5334
  }
@@ -5410,7 +5410,7 @@ function FromIntersect17(schema, references) {
5410
5410
  return IsTransform(schema) || IsTransform(schema.unevaluatedProperties) || schema.allOf.some((schema2) => Visit13(schema2, references));
5411
5411
  }
5412
5412
  function FromImport9(schema, references) {
5413
- const additional = globalThis.Object.getOwnPropertyNames(schema.$defs).reduce((result, key) => [...result, schema.$defs[key]], []);
5413
+ const additional = globalThis.Object.getOwnPropertyNames(schema.$defs).reduce((result, key2) => [...result, schema.$defs[key2]], []);
5414
5414
  const target = schema.$defs[schema.$ref];
5415
5415
  return IsTransform(schema) || Visit13(target, [...additional, ...references]);
5416
5416
  }
@@ -5547,18 +5547,18 @@ function FromObject18(schema, references, value) {
5547
5547
  if (!IsObject2(defaulted))
5548
5548
  return defaulted;
5549
5549
  const knownPropertyKeys = Object.getOwnPropertyNames(schema.properties);
5550
- for (const key of knownPropertyKeys) {
5551
- const propertyValue = Visit14(schema.properties[key], references, defaulted[key]);
5550
+ for (const key2 of knownPropertyKeys) {
5551
+ const propertyValue = Visit14(schema.properties[key2], references, defaulted[key2]);
5552
5552
  if (IsUndefined2(propertyValue))
5553
5553
  continue;
5554
- defaulted[key] = Visit14(schema.properties[key], references, defaulted[key]);
5554
+ defaulted[key2] = Visit14(schema.properties[key2], references, defaulted[key2]);
5555
5555
  }
5556
5556
  if (!HasDefaultProperty(schema.additionalProperties))
5557
5557
  return defaulted;
5558
- for (const key of Object.getOwnPropertyNames(defaulted)) {
5559
- if (knownPropertyKeys.includes(key))
5558
+ for (const key2 of Object.getOwnPropertyNames(defaulted)) {
5559
+ if (knownPropertyKeys.includes(key2))
5560
5560
  continue;
5561
- defaulted[key] = Visit14(schema.additionalProperties, references, defaulted[key]);
5561
+ defaulted[key2] = Visit14(schema.additionalProperties, references, defaulted[key2]);
5562
5562
  }
5563
5563
  return defaulted;
5564
5564
  }
@@ -5569,17 +5569,17 @@ function FromRecord13(schema, references, value) {
5569
5569
  const additionalPropertiesSchema = schema.additionalProperties;
5570
5570
  const [propertyKeyPattern, propertySchema] = Object.entries(schema.patternProperties)[0];
5571
5571
  const knownPropertyKey = new RegExp(propertyKeyPattern);
5572
- for (const key of Object.getOwnPropertyNames(defaulted)) {
5573
- if (!(knownPropertyKey.test(key) && HasDefaultProperty(propertySchema)))
5572
+ for (const key2 of Object.getOwnPropertyNames(defaulted)) {
5573
+ if (!(knownPropertyKey.test(key2) && HasDefaultProperty(propertySchema)))
5574
5574
  continue;
5575
- defaulted[key] = Visit14(propertySchema, references, defaulted[key]);
5575
+ defaulted[key2] = Visit14(propertySchema, references, defaulted[key2]);
5576
5576
  }
5577
5577
  if (!HasDefaultProperty(additionalPropertiesSchema))
5578
5578
  return defaulted;
5579
- for (const key of Object.getOwnPropertyNames(defaulted)) {
5580
- if (knownPropertyKey.test(key))
5579
+ for (const key2 of Object.getOwnPropertyNames(defaulted)) {
5580
+ if (knownPropertyKey.test(key2))
5581
5581
  continue;
5582
- defaulted[key] = Visit14(additionalPropertiesSchema, references, defaulted[key]);
5582
+ defaulted[key2] = Visit14(additionalPropertiesSchema, references, defaulted[key2]);
5583
5583
  }
5584
5584
  return defaulted;
5585
5585
  }
@@ -5694,46 +5694,46 @@ function* Format(pointer) {
5694
5694
  function Set4(value, pointer, update) {
5695
5695
  if (pointer === "")
5696
5696
  throw new ValuePointerRootSetError(value, pointer, update);
5697
- let [owner, next, key] = [null, value, ""];
5697
+ let [owner, next, key2] = [null, value, ""];
5698
5698
  for (const component of Format(pointer)) {
5699
5699
  if (next[component] === void 0)
5700
5700
  next[component] = {};
5701
5701
  owner = next;
5702
5702
  next = next[component];
5703
- key = component;
5703
+ key2 = component;
5704
5704
  }
5705
- owner[key] = update;
5705
+ owner[key2] = update;
5706
5706
  }
5707
5707
  function Delete3(value, pointer) {
5708
5708
  if (pointer === "")
5709
5709
  throw new ValuePointerRootDeleteError(value, pointer);
5710
- let [owner, next, key] = [null, value, ""];
5710
+ let [owner, next, key2] = [null, value, ""];
5711
5711
  for (const component of Format(pointer)) {
5712
5712
  if (next[component] === void 0 || next[component] === null)
5713
5713
  return;
5714
5714
  owner = next;
5715
5715
  next = next[component];
5716
- key = component;
5716
+ key2 = component;
5717
5717
  }
5718
5718
  if (Array.isArray(owner)) {
5719
- const index = parseInt(key);
5719
+ const index = parseInt(key2);
5720
5720
  owner.splice(index, 1);
5721
5721
  } else {
5722
- delete owner[key];
5722
+ delete owner[key2];
5723
5723
  }
5724
5724
  }
5725
5725
  function Has3(value, pointer) {
5726
5726
  if (pointer === "")
5727
5727
  return true;
5728
- let [owner, next, key] = [null, value, ""];
5728
+ let [owner, next, key2] = [null, value, ""];
5729
5729
  for (const component of Format(pointer)) {
5730
5730
  if (next[component] === void 0)
5731
5731
  return false;
5732
5732
  owner = next;
5733
5733
  next = next[component];
5734
- key = component;
5734
+ key2 = component;
5735
5735
  }
5736
- return Object.getOwnPropertyNames(owner).includes(key);
5736
+ return Object.getOwnPropertyNames(owner).includes(key2);
5737
5737
  }
5738
5738
  function Get3(value, pointer) {
5739
5739
  if (pointer === "")
@@ -5755,7 +5755,7 @@ function ObjectType3(left, right) {
5755
5755
  const rightKeys = [...Object.keys(right), ...Object.getOwnPropertySymbols(right)];
5756
5756
  if (leftKeys.length !== rightKeys.length)
5757
5757
  return false;
5758
- return leftKeys.every((key) => Equal(left[key], right[key]));
5758
+ return leftKeys.every((key2) => Equal(left[key2], right[key2]));
5759
5759
  }
5760
5760
  function DateType3(left, right) {
5761
5761
  return IsDate2(right) && left.getTime() === right.getTime();
@@ -5829,22 +5829,22 @@ function* ObjectType4(path, current, next) {
5829
5829
  return yield CreateUpdate(path, next);
5830
5830
  const currentKeys = globalThis.Object.getOwnPropertyNames(current);
5831
5831
  const nextKeys = globalThis.Object.getOwnPropertyNames(next);
5832
- for (const key of nextKeys) {
5833
- if (HasPropertyKey2(current, key))
5832
+ for (const key2 of nextKeys) {
5833
+ if (HasPropertyKey2(current, key2))
5834
5834
  continue;
5835
- yield CreateInsert(`${path}/${key}`, next[key]);
5835
+ yield CreateInsert(`${path}/${key2}`, next[key2]);
5836
5836
  }
5837
- for (const key of currentKeys) {
5838
- if (!HasPropertyKey2(next, key))
5837
+ for (const key2 of currentKeys) {
5838
+ if (!HasPropertyKey2(next, key2))
5839
5839
  continue;
5840
5840
  if (Equal(current, next))
5841
5841
  continue;
5842
- yield* Visit15(`${path}/${key}`, current[key], next[key]);
5842
+ yield* Visit15(`${path}/${key2}`, current[key2], next[key2]);
5843
5843
  }
5844
- for (const key of currentKeys) {
5845
- if (HasPropertyKey2(next, key))
5844
+ for (const key2 of currentKeys) {
5845
+ if (HasPropertyKey2(next, key2))
5846
5846
  continue;
5847
- yield CreateDelete(`${path}/${key}`);
5847
+ yield CreateDelete(`${path}/${key2}`);
5848
5848
  }
5849
5849
  }
5850
5850
  function* ArrayType4(path, current, next) {
@@ -6031,16 +6031,16 @@ var ParseRegistry;
6031
6031
  ["Default", (type, references, value) => Default5(type, references, value)],
6032
6032
  ["Encode", (type, references, value) => HasTransform(type, references) ? TransformEncode(type, references, value) : value]
6033
6033
  ]);
6034
- function Delete5(key) {
6035
- registry.delete(key);
6034
+ function Delete5(key2) {
6035
+ registry.delete(key2);
6036
6036
  }
6037
6037
  ParseRegistry2.Delete = Delete5;
6038
- function Set5(key, callback) {
6039
- registry.set(key, callback);
6038
+ function Set5(key2, callback) {
6039
+ registry.set(key2, callback);
6040
6040
  }
6041
6041
  ParseRegistry2.Set = Set5;
6042
- function Get4(key) {
6043
- return registry.get(key);
6042
+ function Get4(key2) {
6043
+ return registry.get(key2);
6044
6044
  }
6045
6045
  ParseRegistry2.Get = Get4;
6046
6046
  })(ParseRegistry || (ParseRegistry = {}));
@@ -6133,6 +6133,34 @@ var DELIVERED_WAIT_TYPES = [
6133
6133
  "minElements"
6134
6134
  ];
6135
6135
 
6136
+ // ../protocol/dist/upload.js
6137
+ var VERIFIED_UPLOAD_MAX_BYTES = 16 * 1024 * 1024;
6138
+ var UPLOAD_SHA256_PATTERN = "^[a-f0-9]{64}$";
6139
+ var UPLOAD_MIME_TYPE_PATTERN = "^[A-Za-z0-9!#$&^_.+-]+/[A-Za-z0-9!#$&^_.+-]+$";
6140
+ var UPLOAD_MIME_TYPE_MAX_LENGTH = 127;
6141
+ var digest = new RegExp(UPLOAD_SHA256_PATTERN);
6142
+ var mime = new RegExp(UPLOAD_MIME_TYPE_PATTERN);
6143
+ function validateUploadIntegrity(input) {
6144
+ if (typeof input !== "object" || input === null)
6145
+ return void 0;
6146
+ const action2 = input;
6147
+ if (action2.sha256 === void 0 && action2.mimeType === void 0)
6148
+ return void 0;
6149
+ if ((action2.type ?? action2.action) !== "upload") {
6150
+ return "sha256 and mimeType are only supported for upload";
6151
+ }
6152
+ if (typeof action2.sha256 !== "string" || !digest.test(action2.sha256)) {
6153
+ return "Checked upload requires a lowercase 64-character SHA-256 digest";
6154
+ }
6155
+ if (!Array.isArray(action2.paths) || action2.paths.length !== 1) {
6156
+ return "Checked upload requires exactly one file path";
6157
+ }
6158
+ if (action2.mimeType !== void 0 && (typeof action2.mimeType !== "string" || action2.mimeType.length > UPLOAD_MIME_TYPE_MAX_LENGTH || !mime.test(action2.mimeType))) {
6159
+ return "Checked upload MIME metadata must be a type/subtype of at most 127 characters";
6160
+ }
6161
+ return void 0;
6162
+ }
6163
+
6136
6164
  // ../protocol/dist/schemas.js
6137
6165
  var ErrorCodeEnum = Type.Union([
6138
6166
  Type.Literal("SESSION_BUSY"),
@@ -6185,6 +6213,7 @@ var EngineTypeSchema = Type.Union([
6185
6213
  Type.Literal("auto")
6186
6214
  ]);
6187
6215
  var ApprovalPolicySchema = Type.Object({
6216
+ review: Type.Optional(Type.Literal("operator")),
6188
6217
  transactions: Type.Optional(Type.Union([Type.Literal("allow"), Type.Literal("deny"), Type.Literal("required")])),
6189
6218
  externalMessages: Type.Optional(Type.Union([Type.Literal("allow"), Type.Literal("deny"), Type.Literal("required")]))
6190
6219
  });
@@ -6395,12 +6424,24 @@ var SelectActionSchema = Type.Object({
6395
6424
  target: ElementTargetSchema,
6396
6425
  values: Type.Array(Type.String(), { minItems: 1 })
6397
6426
  });
6427
+ var uploadIntegrityProperties = {
6428
+ sha256: Type.Optional(Type.String({
6429
+ pattern: UPLOAD_SHA256_PATTERN,
6430
+ description: "Opt-in integrity check of exactly one service-host regular file, at most 16 MiB; the verified bytes are uploaded."
6431
+ })),
6432
+ mimeType: Type.Optional(Type.String({
6433
+ pattern: UPLOAD_MIME_TYPE_PATTERN,
6434
+ maxLength: UPLOAD_MIME_TYPE_MAX_LENGTH,
6435
+ description: "Upload metadata only; requires sha256. Defaults to application/octet-stream; does not validate content type."
6436
+ }))
6437
+ };
6398
6438
  var UploadActionSchema = Type.Object({
6399
6439
  type: Type.Literal("upload"),
6400
6440
  // Optional: file inputs are hidden by design and get no ref from observe.
6401
6441
  // Without a target the engine requires exactly one file input on the page.
6402
6442
  target: Type.Optional(ElementTargetSchema),
6403
- paths: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 })
6443
+ paths: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }),
6444
+ ...uploadIntegrityProperties
6404
6445
  });
6405
6446
  var ScrollActionSchema = Type.Object({
6406
6447
  type: Type.Literal("scroll"),
@@ -6454,6 +6495,7 @@ var PlanStepSchema = Type.Object({
6454
6495
  value: Type.Optional(Type.String()),
6455
6496
  values: Type.Optional(Type.Array(Type.String(), { minItems: 1 })),
6456
6497
  paths: Type.Optional(Type.Array(Type.String({ minLength: 1 }), { minItems: 1 })),
6498
+ ...uploadIntegrityProperties,
6457
6499
  deltaX: Type.Optional(Type.Number()),
6458
6500
  deltaY: Type.Optional(Type.Number()),
6459
6501
  key: Type.Optional(Type.String()),
@@ -6695,8 +6737,8 @@ function StringConstant(value) {
6695
6737
  const escaped = canonical.replace(/'/g, "\\'");
6696
6738
  return `'${escaped}'`;
6697
6739
  }
6698
- function MemberExpression(value, key) {
6699
- return `${value}[${StringConstant(key)}]`;
6740
+ function MemberExpression(value, key2) {
6741
+ return `${value}[${StringConstant(key2)}]`;
6700
6742
  }
6701
6743
  var TypeCompilerUnknownTypeError = class extends TypeBoxError {
6702
6744
  constructor(schema) {
@@ -6712,8 +6754,8 @@ var TypeCompilerTypeGuardError = class extends TypeBoxError {
6712
6754
  };
6713
6755
  var Policy;
6714
6756
  (function(Policy2) {
6715
- function IsExactOptionalProperty(value, key, expression) {
6716
- return TypeSystemPolicy.ExactOptionalPropertyTypes ? `(${StringConstant(key)} in ${value} ? ${expression} : true)` : `(${MemberExpression(value, key)} !== undefined ? ${expression} : true)`;
6757
+ function IsExactOptionalProperty(value, key2, expression) {
6758
+ return TypeSystemPolicy.ExactOptionalPropertyTypes ? `(${StringConstant(key2)} in ${value} ? ${expression} : true)` : `(${MemberExpression(value, key2)} !== undefined ? ${expression} : true)`;
6717
6759
  }
6718
6760
  Policy2.IsExactOptionalProperty = IsExactOptionalProperty;
6719
6761
  function IsObjectLike(value) {
@@ -6807,8 +6849,8 @@ var TypeCompiler;
6807
6849
  yield `(typeof ${value} === 'function')`;
6808
6850
  }
6809
6851
  function* FromImport11(schema, references, value) {
6810
- const members = globalThis.Object.getOwnPropertyNames(schema.$defs).reduce((result, key) => {
6811
- return [...result, schema.$defs[key]];
6852
+ const members = globalThis.Object.getOwnPropertyNames(schema.$defs).reduce((result, key2) => {
6853
+ return [...result, schema.$defs[key2]];
6812
6854
  }, []);
6813
6855
  yield* Visit17(Ref(schema.$ref), [...references, ...members], value);
6814
6856
  }
@@ -6897,13 +6939,13 @@ var TypeCompiler;
6897
6939
  if (schema.required && schema.required.length === knownKeys.length) {
6898
6940
  yield `Object.getOwnPropertyNames(${value}).length === ${knownKeys.length}`;
6899
6941
  } else {
6900
- const keys = `[${knownKeys.map((key) => `${StringConstant(key)}`).join(", ")}]`;
6942
+ const keys = `[${knownKeys.map((key2) => `${StringConstant(key2)}`).join(", ")}]`;
6901
6943
  yield `Object.getOwnPropertyNames(${value}).every(key => ${keys}.includes(key))`;
6902
6944
  }
6903
6945
  }
6904
6946
  if (typeof schema.additionalProperties === "object") {
6905
6947
  const expression = CreateExpression(schema.additionalProperties, references, `${value}[key]`);
6906
- const keys = `[${knownKeys.map((key) => `${StringConstant(key)}`).join(", ")}]`;
6948
+ const keys = `[${knownKeys.map((key2) => `${StringConstant(key2)}`).join(", ")}]`;
6907
6949
  yield `(Object.getOwnPropertyNames(${value}).every(key => ${keys}.includes(key) || ${expression}))`;
6908
6950
  }
6909
6951
  }
@@ -7185,6 +7227,9 @@ var INTERACTION_GUIDANCE = Object.freeze({
7185
7227
  var sessionRequest = TypeCompiler.Compile(SessionRequestSchema);
7186
7228
  var action = TypeCompiler.Compile(ActionSchema);
7187
7229
  function validateAction(body) {
7230
+ const integrityError = validateUploadIntegrity(body);
7231
+ if (integrityError)
7232
+ return { ok: false, issues: [{ path: "/sha256", message: integrityError }] };
7188
7233
  if (action.Check(body)) {
7189
7234
  return { ok: true, value: body };
7190
7235
  }
@@ -7196,6 +7241,9 @@ function validateAction(body) {
7196
7241
  }
7197
7242
  var planStep = TypeCompiler.Compile(PlanStepSchema);
7198
7243
  function validatePlanStep(body) {
7244
+ const integrityError = validateUploadIntegrity(body);
7245
+ if (integrityError)
7246
+ return { ok: false, issues: [{ path: "/sha256", message: integrityError }] };
7199
7247
  if (typeof body === "object" && body !== null && "action" in body && typeof body.action !== "string") {
7200
7248
  return {
7201
7249
  ok: false,
@@ -7247,7 +7295,7 @@ function snapshotJsonValue(input, state, depth) {
7247
7295
  if (length.value > state.limits.maxNodes - state.nodes)
7248
7296
  throw new Error("unstable report");
7249
7297
  const keys = Reflect.ownKeys(input);
7250
- if (keys.length !== length.value + 1 || keys.some((key) => typeof key !== "string"))
7298
+ if (keys.length !== length.value + 1 || keys.some((key2) => typeof key2 !== "string"))
7251
7299
  throw new Error("unstable report");
7252
7300
  const snapshot2 = [];
7253
7301
  for (let index = 0; index < length.value; index++) {
@@ -7261,14 +7309,14 @@ function snapshotJsonValue(input, state, depth) {
7261
7309
  if (Object.getPrototypeOf(input) !== Object.prototype)
7262
7310
  throw new Error("unstable report");
7263
7311
  const snapshot = {};
7264
- for (const key of Reflect.ownKeys(input)) {
7265
- if (typeof key !== "string")
7312
+ for (const key2 of Reflect.ownKeys(input)) {
7313
+ if (typeof key2 !== "string")
7266
7314
  throw new Error("unstable report");
7267
- chargeString(key, state);
7268
- const descriptor = Object.getOwnPropertyDescriptor(input, key);
7315
+ chargeString(key2, state);
7316
+ const descriptor = Object.getOwnPropertyDescriptor(input, key2);
7269
7317
  if (!descriptor?.enumerable || !Object.hasOwn(descriptor, "value"))
7270
7318
  throw new Error("unstable report");
7271
- Object.defineProperty(snapshot, key, {
7319
+ Object.defineProperty(snapshot, key2, {
7272
7320
  value: snapshotJsonValue(descriptor.value, state, depth + 1),
7273
7321
  enumerable: true,
7274
7322
  writable: true,
@@ -7532,133 +7580,6 @@ var ControlGrantSchema = Type.Intersect([
7532
7580
  Type.Object({ token: Type.String(), mode: AgentModeSchema, cursor: RunCursorSchema })
7533
7581
  ]);
7534
7582
 
7535
- // ../protocol/dist/application.js
7536
- var strict2 = { additionalProperties: false };
7537
- var ID_SCHEMA = OperationIdSchema;
7538
- var ApplicationBindingSchema = Type.Object({ adapter: ID_SCHEMA, resource: ID_SCHEMA }, strict2);
7539
- var ApplicationOperationDescriptorSchema = Type.Object({
7540
- name: ID_SCHEMA,
7541
- mode: Type.Union([Type.Literal("read"), Type.Literal("write")])
7542
- }, strict2);
7543
- var ApplicationDiscoverySchema = Type.Object({
7544
- adapter: Type.String(),
7545
- resource: Type.String(),
7546
- operations: Type.Array(ApplicationOperationDescriptorSchema, { maxItems: 256 })
7547
- }, strict2);
7548
- var ApplicationExecuteRequestSchema = Type.Object({
7549
- operation: ID_SCHEMA,
7550
- input: Type.Unknown(),
7551
- operationId: Type.Optional(ID_SCHEMA),
7552
- expectedVersion: Type.Optional(Type.Integer({ minimum: 0 }))
7553
- }, strict2);
7554
- var ApplicationOperationResultSchema = Type.Union([
7555
- Type.Object({
7556
- status: Type.Union([Type.Literal("read"), Type.Literal("committed")]),
7557
- value: Type.Unknown()
7558
- }, strict2),
7559
- Type.Object({ status: Type.Literal("rejected"), reason: Type.String() }, strict2),
7560
- Type.Object({ replay: Type.Literal(true), operation: OperationRecordSchema }, strict2)
7561
- ]);
7562
- var binding = TypeCompiler.Compile(ApplicationBindingSchema);
7563
- var execute = TypeCompiler.Compile(ApplicationExecuteRequestSchema);
7564
-
7565
- // ../protocol/dist/autofill.js
7566
- var text = () => Type.String({ minLength: 1, maxLength: 512 });
7567
- var strict3 = { additionalProperties: false };
7568
- var AutofillMatchSchema = Type.Object({
7569
- role: Type.Optional(text()),
7570
- label: Type.Optional(text()),
7571
- labelRegex: Type.Optional(text()),
7572
- dataAutomationId: Type.Optional(text()),
7573
- block: Type.Optional(Type.Object({ id: Type.Optional(text()), label: Type.Optional(text()) }, { ...strict3, minProperties: 1 }))
7574
- }, { ...strict3, minProperties: 1 });
7575
- var AutofillRequestSchema = Type.Object({
7576
- fields: Type.Array(Type.Object({
7577
- match: AutofillMatchSchema,
7578
- value: Type.Optional(Type.String({ maxLength: 8192 })),
7579
- option: Type.Optional(Type.Object({ value: Type.String({ maxLength: 8192 }) }, strict3)),
7580
- verify: Type.Optional(Type.Union([Type.Literal("exact"), Type.Literal("none")])),
7581
- strategy: Type.Optional(Type.Union([
7582
- Type.Literal("native-input"),
7583
- Type.Literal("native-select"),
7584
- Type.Literal("react-select"),
7585
- Type.Literal("chip-multiselect")
7586
- ]))
7587
- }, strict3), { minItems: 1, maxItems: 50 }),
7588
- policy: Type.Optional(Type.Object({
7589
- onAmbiguous: Type.Optional(Type.Union([Type.Literal("fail"), Type.Literal("skip")])),
7590
- onVerifyFail: Type.Optional(Type.Union([Type.Literal("fail"), Type.Literal("skip"), Type.Literal("retry")])),
7591
- maxReobserve: Type.Optional(Type.Integer({ minimum: 0, maximum: 5 })),
7592
- settleMs: Type.Optional(Type.Integer({ minimum: 0, maximum: 2e3 })),
7593
- timeoutMs: Type.Optional(Type.Integer({ minimum: 1, maximum: 24e4 }))
7594
- }, strict3))
7595
- }, strict3);
7596
- var AutofillReceiptSchema = Type.Object({
7597
- field: Type.Integer({ minimum: 0, maximum: 49 }),
7598
- match: AutofillMatchSchema,
7599
- resolvedRef: Type.Optional(Type.String()),
7600
- blockIdentity: Type.Optional(Type.String()),
7601
- actionId: Type.Optional(Type.String()),
7602
- status: Type.Union(["verified", "unverified", "skipped", "failed", "uncertain", "not_attempted"].map((value) => Type.Literal(value))),
7603
- verified: Type.Boolean(),
7604
- actual: Type.Optional(Type.String({ maxLength: 512 })),
7605
- actualTruncated: Type.Optional(Type.Boolean()),
7606
- error: Type.Optional(Type.Object({ code: Type.String(), message: Type.String() }, strict3))
7607
- }, strict3);
7608
- var AutofillReportSchema = Type.Object({
7609
- ok: Type.Boolean(),
7610
- receipts: Type.Array(AutofillReceiptSchema, { maxItems: 50 }),
7611
- elapsedMs: Type.Number({ minimum: 0 }),
7612
- snapshot: Type.Optional(Type.Object({
7613
- artifactId: Type.String(),
7614
- contentType: Type.Optional(Type.String()),
7615
- sizeBytes: Type.Optional(Type.Integer({ minimum: 0 })),
7616
- warnings: Type.Optional(Type.Array(Type.String()))
7617
- }, strict3)),
7618
- snapshotError: Type.Optional(Type.String())
7619
- }, { ...strict3, $id: "urn:agentbrowser:autofill-report:v1" });
7620
- function labelPattern(pattern) {
7621
- const start = pattern.startsWith("^");
7622
- const end = pattern.endsWith("$");
7623
- const body = pattern.slice(start ? 1 : 0, end ? -1 : void 0);
7624
- const parts = body.split(".*");
7625
- if (parts.some((p) => /[\\[\]{}()+?*|.^$]/.test(p)))
7626
- throw new Error("labelRegex supports only literals, .* and optional ^/$ anchors");
7627
- return (label) => {
7628
- let offset = 0;
7629
- for (const [index, part] of parts.entries()) {
7630
- const at = label.indexOf(part, offset);
7631
- if (at < 0 || index === 0 && start && at !== 0)
7632
- return false;
7633
- offset = at + part.length;
7634
- }
7635
- if (!end)
7636
- return true;
7637
- const last = parts[parts.length - 1] ?? "";
7638
- return label.endsWith(last) && (parts.length > 1 || !start || offset === label.length);
7639
- };
7640
- }
7641
- function parseAutofillRequest(input) {
7642
- if (!value_exports2.Check(AutofillRequestSchema, input))
7643
- throw new Error("Invalid autofill request: bounded fields[] and policy required; unknown properties are rejected");
7644
- const request = structuredClone(input);
7645
- for (const field of request.fields) {
7646
- if (field.value === void 0 === (field.option === void 0))
7647
- throw new Error("Each autofill field requires exactly one of value or option.value");
7648
- const match = field.match;
7649
- if (!match.label && !match.labelRegex && !match.dataAutomationId)
7650
- throw new Error("Each autofill match requires label, labelRegex or dataAutomationId");
7651
- if (match.labelRegex !== void 0)
7652
- labelPattern(match.labelRegex);
7653
- if (field.strategy === "native-input" && field.value === void 0 || field.strategy === "native-select" && field.option === void 0)
7654
- throw new Error("Autofill strategy does not match value/option");
7655
- }
7656
- return request;
7657
- }
7658
- function parseAutofillReport(input, expectedFields) {
7659
- return parseExecutionReport(AutofillReportSchema, input, "autofill", (report) => !report.ok || report.receipts.length > 0 && (expectedFields === void 0 || report.receipts.length === expectedFields) && report.receipts.every((receipt, index) => receipt.field === index && receipt.error === void 0 && (receipt.status === "verified" && receipt.verified || receipt.status === "unverified" && !receipt.verified)));
7660
- }
7661
-
7662
7583
  // ../protocol/dist/plan.js
7663
7584
  var PlanActionsSchema = Type.Array(PlanStepSchema);
7664
7585
  var PlanRequestSchema = Type.Object({ actions: PlanActionsSchema });
@@ -7722,7 +7643,7 @@ function createPlanReportParser(actions) {
7722
7643
  }
7723
7644
 
7724
7645
  // ../protocol/dist/outcome.js
7725
- var strict4 = { additionalProperties: false };
7646
+ var strict2 = { additionalProperties: false };
7726
7647
  var identifier = () => Type.String({ minLength: 1, maxLength: 128, pattern: "^[A-Za-z0-9][A-Za-z0-9._-]*$" });
7727
7648
  var GROUNDING_LAYERS = Object.freeze(["G0", "G1", "G2", "G3", "G4", "G5", "G6"]);
7728
7649
  var GroundingLayerSchema = Type.Union([
@@ -7747,11 +7668,11 @@ var VerificationProjectionSchema = Type.Object({
7747
7668
  Type.Literal("unknown"),
7748
7669
  Type.Literal("not_requested")
7749
7670
  ]),
7750
- verifier: Type.Optional(Type.Object({ id: identifier(), version: identifier() }, strict4)),
7671
+ verifier: Type.Optional(Type.Object({ id: identifier(), version: identifier() }, strict2)),
7751
7672
  requiredLayer: GroundingLayerSchema,
7752
7673
  achievedLayer: Type.Optional(GroundingLayerSchema),
7753
7674
  evidenceRefIds: EvidenceReferenceIdsSchema
7754
- }, strict4);
7675
+ }, strict2);
7755
7676
  var OutcomeProjectionSchema = Type.Object({
7756
7677
  availability: Type.Union([
7757
7678
  Type.Literal("available"),
@@ -7778,7 +7699,7 @@ var OutcomeProjectionSchema = Type.Object({
7778
7699
  Type.Literal("application"),
7779
7700
  Type.Literal("agent_tool")
7780
7701
  ])
7781
- }, strict4);
7702
+ }, strict2);
7782
7703
  var evidenceCorrelationIdSchema = {
7783
7704
  ...OperationIdSchema,
7784
7705
  description: "Business receipt operation ID for an opted-in trusted evidence source; distinct from the service operation ID and conveys no authority."
@@ -7787,15 +7708,15 @@ var OutcomeRunRequestSchema = Type.Object({
7787
7708
  // A UI outcome must exercise the UI seam; an empty plan cannot attest it.
7788
7709
  actions: Type.Array(PlanStepSchema, { minItems: 1 }),
7789
7710
  verification: Type.Object({
7790
- verifier: Type.Object({ id: identifier(), version: identifier() }, strict4),
7711
+ verifier: Type.Object({ id: identifier(), version: identifier() }, strict2),
7791
7712
  input: Type.Unknown(),
7792
7713
  evidenceCorrelationId: Type.Optional(evidenceCorrelationIdSchema)
7793
- }, strict4)
7794
- }, { ...strict4, $id: "urn:agentbrowser:outcome-run-request:v1" });
7714
+ }, strict2)
7715
+ }, { ...strict2, $id: "urn:agentbrowser:outcome-run-request:v1" });
7795
7716
  var OutcomeRunReportSchema = Type.Object({
7796
7717
  plan: PlanReportSchema,
7797
7718
  outcome: OutcomeProjectionSchema
7798
- }, { ...strict4, $id: "urn:agentbrowser:outcome-run-report:v1" });
7719
+ }, { ...strict2, $id: "urn:agentbrowser:outcome-run-report:v1" });
7799
7720
  var TrustedVerifierDescriptorSchema = Type.Object({
7800
7721
  id: identifier(),
7801
7722
  version: identifier(),
@@ -7810,11 +7731,176 @@ var TrustedVerifierDescriptorSchema = Type.Object({
7810
7731
  pollIntervalMs: Type.Integer({ minimum: 1, maximum: 1e4 }),
7811
7732
  cleanupTimeoutMs: Type.Integer({ minimum: 1, maximum: 6e4 }),
7812
7733
  maxEvidenceRefs: Type.Integer({ minimum: 1, maximum: 32 })
7813
- }, strict4),
7734
+ }, strict2),
7814
7735
  redaction: Type.Literal("reference_only"),
7815
7736
  unsupported: Type.Array(Type.String({ minLength: 1, maxLength: 128 }), { maxItems: 16 }),
7816
7737
  cleanup: Type.Union([Type.Literal("not_needed"), Type.Literal("required")])
7738
+ }, strict2);
7739
+
7740
+ // ../protocol/dist/application.js
7741
+ var strict3 = { additionalProperties: false };
7742
+ var ID_SCHEMA = OperationIdSchema;
7743
+ var CONTRACT_ID_SCHEMA = Type.String({
7744
+ minLength: 1,
7745
+ maxLength: 128,
7746
+ pattern: "^[A-Za-z0-9][A-Za-z0-9._-]*$"
7747
+ });
7748
+ var ApplicationBindingSchema = Type.Object({ adapter: ID_SCHEMA, resource: ID_SCHEMA }, strict3);
7749
+ var ApplicationOperationDescriptorSchema = Type.Object({
7750
+ name: ID_SCHEMA,
7751
+ mode: Type.Union([Type.Literal("read"), Type.Literal("write")]),
7752
+ review: Type.Optional(Type.Literal("operator-submit"))
7753
+ }, strict3);
7754
+ var ApplicationDiscoverySchema = Type.Object({
7755
+ adapter: Type.String(),
7756
+ resource: Type.String(),
7757
+ operations: Type.Array(ApplicationOperationDescriptorSchema, { maxItems: 256 })
7758
+ }, strict3);
7759
+ var ApplicationExecuteRequestSchema = Type.Object({
7760
+ operation: ID_SCHEMA,
7761
+ input: Type.Unknown(),
7762
+ operationId: Type.Optional(ID_SCHEMA),
7763
+ expectedVersion: Type.Optional(Type.Integer({ minimum: 0 })),
7764
+ approvalToken: Type.Optional(Type.String({ minLength: 1, maxLength: 128 }))
7765
+ }, strict3);
7766
+ var ApplicationReviewRequestSchema = Type.Object({
7767
+ pageId: Type.String({ minLength: 1, maxLength: 255 }),
7768
+ source: Type.Object({
7769
+ ownerId: Type.String({ pattern: "^[!-~]{1,255}$" }),
7770
+ contract: Type.Object({ id: CONTRACT_ID_SCHEMA, version: CONTRACT_ID_SCHEMA }, strict3)
7771
+ }, strict3),
7772
+ request: Type.Object({
7773
+ operation: ID_SCHEMA,
7774
+ input: Type.Unknown(),
7775
+ operationId: ID_SCHEMA,
7776
+ expectedVersion: Type.Integer({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER })
7777
+ }, strict3)
7778
+ }, strict3);
7779
+ var ApplicationOperationResultSchema = Type.Union([
7780
+ Type.Object({
7781
+ status: Type.Union([Type.Literal("read"), Type.Literal("committed")]),
7782
+ value: Type.Unknown()
7783
+ }, strict3),
7784
+ Type.Object({ status: Type.Literal("rejected"), reason: Type.String() }, strict3),
7785
+ Type.Object({ replay: Type.Literal(true), operation: OperationRecordSchema }, strict3)
7786
+ ]);
7787
+ var binding = TypeCompiler.Compile(ApplicationBindingSchema);
7788
+ var execute = TypeCompiler.Compile(ApplicationExecuteRequestSchema);
7789
+ var review = TypeCompiler.Compile(ApplicationReviewRequestSchema);
7790
+ var operationDescriptors = TypeCompiler.Compile(ApplicationDiscoverySchema.properties.operations);
7791
+
7792
+ // ../protocol/dist/autofill.js
7793
+ var text = () => Type.String({ minLength: 1, maxLength: 512 });
7794
+ var strict4 = { additionalProperties: false };
7795
+ var AutofillMatchSchema = Type.Object({
7796
+ role: Type.Optional(text()),
7797
+ label: Type.Optional(text()),
7798
+ labelRegex: Type.Optional(text()),
7799
+ dataAutomationId: Type.Optional(text()),
7800
+ block: Type.Optional(Type.Object({ id: Type.Optional(text()), label: Type.Optional(text()) }, { ...strict4, minProperties: 1 }))
7801
+ }, { ...strict4, minProperties: 1 });
7802
+ var AutofillScopeSchema = Type.Object({ url: Type.String({ minLength: 1, maxLength: 2048 }) }, strict4);
7803
+ function validateAutofillScope(scope) {
7804
+ try {
7805
+ const url = new URL(scope.url);
7806
+ if (!["http:", "https:"].includes(url.protocol) || url.username || url.password || url.href !== scope.url)
7807
+ throw new Error();
7808
+ } catch {
7809
+ throw new Error("Autofill scope requires an exact canonical HTTP(S) URL without credentials");
7810
+ }
7811
+ }
7812
+ var AutofillRequestSchema = Type.Object({
7813
+ scope: Type.Optional(AutofillScopeSchema),
7814
+ fields: Type.Array(Type.Object({
7815
+ match: AutofillMatchSchema,
7816
+ value: Type.Optional(Type.String({ maxLength: 8192 })),
7817
+ option: Type.Optional(Type.Object({ value: Type.String({ maxLength: 8192 }) }, strict4)),
7818
+ verify: Type.Optional(Type.Union([Type.Literal("exact"), Type.Literal("none")])),
7819
+ strategy: Type.Optional(Type.Union([
7820
+ Type.Literal("native-input"),
7821
+ Type.Literal("native-select"),
7822
+ Type.Literal("react-select"),
7823
+ Type.Literal("chip-multiselect")
7824
+ ]))
7825
+ }, strict4), { minItems: 1, maxItems: 50 }),
7826
+ policy: Type.Optional(Type.Object({
7827
+ onAmbiguous: Type.Optional(Type.Union([Type.Literal("fail"), Type.Literal("skip")])),
7828
+ onVerifyFail: Type.Optional(Type.Union([Type.Literal("fail"), Type.Literal("skip"), Type.Literal("retry")])),
7829
+ maxReobserve: Type.Optional(Type.Integer({ minimum: 0, maximum: 5 })),
7830
+ settleMs: Type.Optional(Type.Integer({ minimum: 0, maximum: 2e3 })),
7831
+ timeoutMs: Type.Optional(Type.Integer({ minimum: 1, maximum: 24e4 }))
7832
+ }, strict4))
7833
+ }, strict4);
7834
+ var AutofillReceiptSchema = Type.Object({
7835
+ field: Type.Integer({ minimum: 0, maximum: 49 }),
7836
+ match: AutofillMatchSchema,
7837
+ resolvedRef: Type.Optional(Type.String()),
7838
+ blockIdentity: Type.Optional(Type.String()),
7839
+ actionId: Type.Optional(Type.String()),
7840
+ status: Type.Union(["verified", "unverified", "skipped", "failed", "uncertain", "not_attempted"].map((value) => Type.Literal(value))),
7841
+ verified: Type.Boolean(),
7842
+ actual: Type.Optional(Type.String({ maxLength: 512 })),
7843
+ actualTruncated: Type.Optional(Type.Boolean()),
7844
+ error: Type.Optional(Type.Object({ code: Type.String(), message: Type.String() }, strict4))
7817
7845
  }, strict4);
7846
+ var AutofillReportSchema = Type.Object({
7847
+ ok: Type.Boolean(),
7848
+ receipts: Type.Array(AutofillReceiptSchema, { maxItems: 50 }),
7849
+ elapsedMs: Type.Number({ minimum: 0 }),
7850
+ snapshot: Type.Optional(Type.Object({
7851
+ artifactId: Type.String(),
7852
+ contentType: Type.Optional(Type.String()),
7853
+ sizeBytes: Type.Optional(Type.Integer({ minimum: 0 })),
7854
+ warnings: Type.Optional(Type.Array(Type.String()))
7855
+ }, strict4)),
7856
+ snapshotError: Type.Optional(Type.String())
7857
+ }, { ...strict4, $id: "urn:agentbrowser:autofill-report:v1" });
7858
+ function labelPattern(pattern) {
7859
+ const start = pattern.startsWith("^");
7860
+ const end = pattern.endsWith("$");
7861
+ const body = pattern.slice(start ? 1 : 0, end ? -1 : void 0);
7862
+ const parts = body.split(".*");
7863
+ if (parts.some((p) => /[\\[\]{}()+?*|.^$]/.test(p)))
7864
+ throw new Error("labelRegex supports only literals, .* and optional ^/$ anchors");
7865
+ return (label) => {
7866
+ let offset = 0;
7867
+ for (const [index, part] of parts.entries()) {
7868
+ const at = label.indexOf(part, offset);
7869
+ if (at < 0 || index === 0 && start && at !== 0)
7870
+ return false;
7871
+ offset = at + part.length;
7872
+ }
7873
+ if (!end)
7874
+ return true;
7875
+ const last = parts[parts.length - 1] ?? "";
7876
+ return label.endsWith(last) && (parts.length > 1 || !start || offset === label.length);
7877
+ };
7878
+ }
7879
+ function parseAutofillRequest(input) {
7880
+ if (!value_exports2.Check(AutofillRequestSchema, input))
7881
+ throw new Error("Invalid autofill request: bounded fields[] and policy required; unknown properties are rejected");
7882
+ const request = structuredClone(input);
7883
+ if (request.scope) {
7884
+ validateAutofillScope(request.scope);
7885
+ if (request.fields.some((field) => field.verify === "none" || field.strategy === void 0) || request.policy?.onAmbiguous === "skip" || request.policy?.onVerifyFail === "skip")
7886
+ throw new Error("Scoped autofill requires explicit strategies, exact verification and cannot skip failures");
7887
+ }
7888
+ for (const field of request.fields) {
7889
+ if (field.value === void 0 === (field.option === void 0))
7890
+ throw new Error("Each autofill field requires exactly one of value or option.value");
7891
+ const match = field.match;
7892
+ if (!match.label && !match.labelRegex && !match.dataAutomationId)
7893
+ throw new Error("Each autofill match requires label, labelRegex or dataAutomationId");
7894
+ if (match.labelRegex !== void 0)
7895
+ labelPattern(match.labelRegex);
7896
+ if (field.strategy === "native-input" && field.value === void 0 || field.strategy === "native-select" && field.option === void 0)
7897
+ throw new Error("Autofill strategy does not match value/option");
7898
+ }
7899
+ return request;
7900
+ }
7901
+ function parseAutofillReport(input, expectedFields) {
7902
+ return parseExecutionReport(AutofillReportSchema, input, "autofill", (report) => !report.ok || report.receipts.length > 0 && (expectedFields === void 0 || report.receipts.length === expectedFields) && report.receipts.every((receipt, index) => receipt.field === index && receipt.error === void 0 && (receipt.status === "verified" && receipt.verified || receipt.status === "unverified" && !receipt.verified)));
7903
+ }
7818
7904
 
7819
7905
  // ../protocol/dist/test-run.js
7820
7906
  var strict5 = { additionalProperties: false };
@@ -7883,6 +7969,46 @@ var TestCaseEvaluationReportSchema = Type.Object({
7883
7969
  }, { ...strict5, $id: "urn:agentbrowser:test-case-evaluation-report:v1" });
7884
7970
  var AssertionInvocationsSchema = Type.Array(AssertionInvocationSchema, { maxItems: 16 });
7885
7971
 
7972
+ // ../protocol/dist/form-mapping.js
7973
+ var strict6 = { additionalProperties: false };
7974
+ var keyPattern = "^[A-Za-z][A-Za-z0-9_-]{0,63}$";
7975
+ var key = () => Type.String({ pattern: keyPattern, maxLength: 64 });
7976
+ var FormMappingSchema = Type.Object({
7977
+ schemaVersion: Type.Literal(1),
7978
+ id: key(),
7979
+ revision: Type.String({
7980
+ minLength: 1,
7981
+ maxLength: 64,
7982
+ pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
7983
+ }),
7984
+ scope: AutofillScopeSchema,
7985
+ fields: Type.Array(Type.Required(Type.Object({
7986
+ match: AutofillMatchSchema,
7987
+ strategy: AutofillRequestSchema.properties.fields.items.properties.strategy,
7988
+ input: Type.Union([Type.Literal("value"), Type.Literal("option")]),
7989
+ valueKey: key()
7990
+ }, strict6)), { minItems: 1, maxItems: 50 })
7991
+ }, { ...strict6, $id: "urn:agentbrowser:form-mapping:v1" });
7992
+ var FormValuesSchema = Type.Record(key(), Type.String({ maxLength: 8192 }), {
7993
+ ...strict6,
7994
+ minProperties: 1,
7995
+ maxProperties: 50,
7996
+ $id: "urn:agentbrowser:form-values:v1"
7997
+ });
7998
+
7999
+ // ../protocol/dist/operator-approval.js
8000
+ var OperatorApprovalDecisionSchema = Type.Object({
8001
+ decision: Type.Union([Type.Literal("approve"), Type.Literal("deny")])
8002
+ }, { additionalProperties: false });
8003
+ var OperatorApprovalViewSchema = Type.Object({
8004
+ tokenId: Type.String({ minLength: 1, maxLength: 128 }),
8005
+ status: Type.Union(["pending", "approved", "denied", "used", "expired"].map((value) => Type.Literal(value))),
8006
+ createdAt: Type.Integer({ minimum: 0 }),
8007
+ expiresAt: Type.Integer({ minimum: 0 }),
8008
+ approvedAt: Type.Optional(Type.Integer({ minimum: 0 })),
8009
+ action: Type.Record(Type.String(), Type.Unknown())
8010
+ }, { additionalProperties: false });
8011
+
7886
8012
  // dist/mcp-server.js
7887
8013
  var LEGACY_PROTOCOL_VERSION = "2024-11-05";
7888
8014
  var STRUCTURED_PROTOCOL_VERSION = "2025-06-18";
@@ -8025,7 +8151,7 @@ function buildTools(client) {
8025
8151
  requiredCapability: "page.form",
8026
8152
  outputSchema: AutofillReportSchema,
8027
8153
  annotations: { readOnlyHint: false, idempotentHint: false },
8028
- description: "Fill and verify structured fields in one serial server operation. Match labels within a unique fieldset block (id or legend label). Supports native text inputs and single selects; custom widgets are refused. Verification retries only read; uncertain writes stop the batch. Returns per-field receipts and an authorized raw HTML artifact. Performs no explicit submit action; page input/change handlers may commit effects. After a lost response, reconcile the operation under current authorization before any further write: use browser_operation in delegated mode or SDK/REST operation status otherwise.",
8154
+ description: "Fill and verify structured fields in one serial server operation. Match labels within a unique fieldset block (id or legend label). Supports native inputs/selects and explicitly selected qualified react-select/chip-multiselect shapes. Optional exact URL scope preflights all fields and pins stage identities. Verification retries only read; uncertain writes stop the batch. Returns per-field receipts and an authorized raw HTML artifact. Performs no explicit submit action; page input/change handlers may commit effects. After a lost response, reconcile the operation under current authorization before any further write: use browser_operation in delegated mode or SDK/REST operation status otherwise.",
8029
8155
  inputSchema: {
8030
8156
  type: "object",
8031
8157
  additionalProperties: false,
@@ -8044,6 +8170,7 @@ function buildTools(client) {
8044
8170
  try {
8045
8171
  payload = parseAutofillRequest({
8046
8172
  fields: args.fields,
8173
+ ...args.scope !== void 0 ? { scope: args.scope } : {},
8047
8174
  ...args.policy !== void 0 ? { policy: args.policy } : {}
8048
8175
  });
8049
8176
  } catch (error2) {
@@ -8413,6 +8540,9 @@ function buildMcpServer(deps) {
8413
8540
  } catch {
8414
8541
  return error(null, -32700, "Parse error");
8415
8542
  }
8543
+ if (message === null || typeof message !== "object" || Array.isArray(message)) {
8544
+ return error(null, -32600, "Invalid request");
8545
+ }
8416
8546
  if (message.id === void 0 || message.id === null) {
8417
8547
  return null;
8418
8548
  }