mc8yp 2.7.3 → 2.8.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/cli.mjs
CHANGED
|
@@ -7,7 +7,6 @@ import * as tty from "node:tty";
|
|
|
7
7
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
8
8
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
9
9
|
import { lookup } from "node:dns";
|
|
10
|
-
import { lookup as lookup$1 } from "node:dns/promises";
|
|
11
10
|
import { createSandbox } from "@iso4/sandbox";
|
|
12
11
|
import { Bash } from "just-bash";
|
|
13
12
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -1824,7 +1823,7 @@ const consola = createConsola();
|
|
|
1824
1823
|
//#endregion
|
|
1825
1824
|
//#region package.json
|
|
1826
1825
|
var name = "mc8yp";
|
|
1827
|
-
var version = "2.
|
|
1826
|
+
var version = "2.8.0";
|
|
1828
1827
|
var description$1 = "Cumulocity IoT MCP Server - Model Context Protocol integration for IoT device management";
|
|
1829
1828
|
//#endregion
|
|
1830
1829
|
//#region \0virtual:core-openapi
|
|
@@ -1870,7 +1869,7 @@ const specs = Object.freeze([
|
|
|
1870
1869
|
},
|
|
1871
1870
|
{
|
|
1872
1871
|
"name": "Bulk operations",
|
|
1873
|
-
"description": "The bulk operations API allows to schedule an operation on a group of devices to
|
|
1872
|
+
"description": "The bulk operations API allows you to schedule an operation on a group of devices.\nIt is required to specify the delay between the creation of subsequent operations.\n\nBulk operations are an asynchronous, best-effort mechanism to distribute an operation to a group of devices. They are not a precision scheduling tool. The platform starts creating the individual operations at the configured start date, but the exact creation and delivery times of the individual operations can vary. If devices must execute an operation at a precise time, deliver the operation to the devices ahead of time and include the desired execution time in the operation payload. The devices then trigger the execution locally at the specified time.\nWhen the bulk operation is created, it has the status ACTIVE.\nWhen all operations are created, the bulk operation has the status COMPLETED.\nIt is also possible to cancel an already created bulk operation by deleting it.\n\nWhen you create a bulk operation, you can run it in two modes:\n\n* If `groupId` is passed, it works the standard way, that means, it takes devices from a group and schedules operations on them.\n* If `failedParentId` is passed, it takes the already processed bulk operation by that ID, and schedules operations on devices for which the previous operations failed.\n\nNote that passing both `groupId` and `failedParentId` will not work, and a bulk operation works with groups of type `static` and `dynamic`.\n\n> **ⓘ Info:** The bulk operations API requires different roles than the rest of the device control API: `BULK_OPERATION_READ` and `BULK_OPERATION_ADMIN`.\n>\n> The Accept header should be provided in all POST/PUT requests, otherwise an empty response body will be returned.\n"
|
|
1874
1873
|
},
|
|
1875
1874
|
{
|
|
1876
1875
|
"name": "Device credentials",
|
|
@@ -3132,7 +3131,7 @@ const specs = Object.freeze([
|
|
|
3132
3131
|
"operationId": "getCurrentApplicationResourceSettings",
|
|
3133
3132
|
"tags": ["Current application"],
|
|
3134
3133
|
"summary": "Retrieve the current application settings",
|
|
3135
|
-
"description": "Retrieve the current application settings.\nThis only works inside an application, for example, a microservice.\n\n<section><h5>Required roles</h5>\nMicroservice bootstrap user <b>OR</b> microservice service user required.\n</section>\n",
|
|
3134
|
+
"description": "Retrieve the current application settings.\nThis only works inside an application, for example, a microservice.\n\nThe application settings are the [tenant options](#tag/Options) stored under the application's own category.\nThe category is determined based on the first non-blank value from the following, in order of priority:\n * the `settingsCategory` defined in the microservice manifest\n * the microservice's context path\n * the microservice name\n\nOptions whose key carries the `credentials.` prefix are returned with the prefix removed and the value decrypted, provided the application owns the option. See [Create an option](#operation/postOptionCollectionResource) for details on encrypted credentials.\n\n<section><h5>Required roles</h5>\nMicroservice bootstrap user <b>OR</b> microservice service user required.\n</section>\n",
|
|
3136
3135
|
"responses": { "200": {
|
|
3137
3136
|
"description": "The request has succeeded and the current application settings are sent in the response.",
|
|
3138
3137
|
"content": { "application/vnd.com.nsn.cumulocity.option+json": { "schema": { "$ref": "#/components/schemas/application_settings" } } }
|
|
@@ -4454,13 +4453,15 @@ const specs = Object.freeze([
|
|
|
4454
4453
|
{ "$ref": "#/components/parameters/queryParam_pageSize" },
|
|
4455
4454
|
{ "$ref": "#/components/parameters/queryParam_users_username" },
|
|
4456
4455
|
{ "$ref": "#/components/parameters/queryParam_users_usernameContains" },
|
|
4456
|
+
{ "$ref": "#/components/parameters/queryParam_users_withApps" },
|
|
4457
|
+
{ "$ref": "#/components/parameters/queryParam_users_withGroups" },
|
|
4457
4458
|
{ "$ref": "#/components/parameters/queryParam_users_withSubusersCount" },
|
|
4458
4459
|
{ "$ref": "#/components/parameters/queryParam_withTotalElements" },
|
|
4459
4460
|
{ "$ref": "#/components/parameters/queryParam_withTotalPages" }
|
|
4460
4461
|
],
|
|
4461
4462
|
"tags": ["Users"],
|
|
4462
4463
|
"summary": "Retrieve all users for a specific tenant",
|
|
4463
|
-
"description": "Retrieve all users for a specific tenant (by a given tenant ID).\n\n<section><h5>Required roles</h5>\nROLE_USER_MANAGEMENT_READ <b>OR</b> ROLE_USER_MANAGEMENT_CREATE\n</section>\n",
|
|
4464
|
+
"description": "Retrieve all users for a specific tenant (by a given tenant ID).\n\nOn tenants with complex user objects, this request can be slow. Set `withApps=false` and/or `withGroups=false`\nto reduce the response payload and improve response times.\n<section><h5>Required roles</h5>\nROLE_USER_MANAGEMENT_READ <b>OR</b> ROLE_USER_MANAGEMENT_CREATE\n</section>\n",
|
|
4464
4465
|
"responses": { "200": {
|
|
4465
4466
|
"description": "The request has succeeded and all users are sent in the response.",
|
|
4466
4467
|
"content": { "application/vnd.com.nsn.cumulocity.usercollection+json": { "schema": { "$ref": "#/components/schemas/UserCollection" } } }
|
|
@@ -4712,11 +4713,13 @@ const specs = Object.freeze([
|
|
|
4712
4713
|
"parameters": [
|
|
4713
4714
|
{ "$ref": "#/components/parameters/queryParam_currentPage" },
|
|
4714
4715
|
{ "$ref": "#/components/parameters/queryParam_pageSize" },
|
|
4716
|
+
{ "$ref": "#/components/parameters/queryParam_users_withApps" },
|
|
4717
|
+
{ "$ref": "#/components/parameters/queryParam_users_withGroups" },
|
|
4715
4718
|
{ "$ref": "#/components/parameters/queryParam_withTotalElements" }
|
|
4716
4719
|
],
|
|
4717
4720
|
"tags": ["Users"],
|
|
4718
4721
|
"summary": "Retrieve the users of a specific user group of a specific tenant",
|
|
4719
|
-
"description": "Retrieve the users of a specific user group (by a given user group ID) of a specific tenant (by a given tenant ID).\n\n<section><h5>Required roles</h5>\nROLE_USER_MANAGEMENT_READ <b>OR</b> (ROLE_USER_MANAGEMENT_CREATE <b>AND</b> has access to the user group)\n</section>\n",
|
|
4722
|
+
"description": "Retrieve the users of a specific user group (by a given user group ID) of a specific tenant (by a given tenant ID).\n\nOn tenants with complex user objects, this request can be slow. Set `withApps=false` and/or `withGroups=false`\nto reduce the response payload and improve response times.\n<section><h5>Required roles</h5>\nROLE_USER_MANAGEMENT_READ <b>OR</b> (ROLE_USER_MANAGEMENT_CREATE <b>AND</b> has access to the user group)\n</section>\n",
|
|
4720
4723
|
"responses": { "200": {
|
|
4721
4724
|
"description": "The request has succeeded and the users are sent in the response.",
|
|
4722
4725
|
"content": { "application/vnd.com.nsn.cumulocity.userreferencecollection+json": { "schema": { "$ref": "#/components/schemas/UserReferenceCollection" } } }
|
|
@@ -4915,7 +4918,7 @@ const specs = Object.freeze([
|
|
|
4915
4918
|
"parameters": [{ "$ref": "#/components/parameters/acceptHeader" }, { "$ref": "#/components/parameters/processingModeHeader" }],
|
|
4916
4919
|
"tags": ["Measurements"],
|
|
4917
4920
|
"summary": "Create a measurement",
|
|
4918
|
-
"description": "A measurement must be associated with a source (managed object) identified by ID, and must specify the type of measurement and the time when it was measured by the device (for example, a thermometer).\n\nEach measurement fragment is an object (for example, `c8y_Steam`) containing the actual measurements as properties. The property name represents the name of the measurement (for example, `Temperature`) and it contains two properties:\n\n* `value` - The value of the individual measurement. The maximum precision for floating point numbers is 64-bit IEEE 754. For integers it's a 64-bit two's complement integer. The `value` is mandatory for a fragment.\n* `unit` - The unit of the measurements. This field is optional in the request body; however, if it is provided, it must be a non-empty string and must not be null.\n\nReview the [System of units](#section/System-of-units) section for details about the conversions of units. Also review [Getting started > Technical concepts > Cumulocity's domain model > Inventory > Fragments > Naming conventions of fragments](https://www.cumulocity.com/docs/concepts/domain-model/#naming-conventions-of-fragments) in the Cumulocity user documentation.\n\nThe example below uses `c8y_SteamFragment` in the request body to illustrate recording two measurements called `Temperature` and `Humidity`.\n\n ```json\n {\n \"source\": { \"id\": \"681200\" },\n \"time\": \"2020-03-19T12:03:27.845Z\",\n \"type\": \"temperatureMeasurement\",\n \"c8y_SteamFragment\": {\n \"Temperature\": { \"value\": 42.7, \"unit\": \"C\" },\n \"Humidity\": { \"value\": 13.37, \"unit\": \"%RH\" }\n }\n }\n ```\n\n> **⚠️ Important:** Property names used for fragment and series must not contain whitespaces nor the special characters `. , * [ ] ( ) @ $`. This is required to ensure a correct processing
|
|
4921
|
+
"description": "A measurement must be associated with a source (managed object) identified by ID, and must specify the type of measurement and the time when it was measured by the device (for example, a thermometer).\n\nEach measurement fragment is an object (for example, `c8y_Steam`) containing the actual measurements as properties. The property name represents the name of the measurement (for example, `Temperature`) and it contains two properties:\n\n* `value` - The value of the individual measurement. The maximum precision for floating point numbers is 64-bit IEEE 754. For integers it's a 64-bit two's complement integer. The `value` is mandatory for a fragment.\n* `unit` - The unit of the measurements. This field is optional in the request body; however, if it is provided, it must be a non-empty string and must not be null.\n\nReview the [System of units](#section/System-of-units) section for details about the conversions of units. Also review [Getting started > Technical concepts > Cumulocity's domain model > Inventory > Fragments > Naming conventions of fragments](https://www.cumulocity.com/docs/concepts/domain-model/#naming-conventions-of-fragments) in the Cumulocity user documentation.\n\nThe example below uses `c8y_SteamFragment` in the request body to illustrate recording two measurements called `Temperature` and `Humidity`.\n\n ```json\n {\n \"source\": { \"id\": \"681200\" },\n \"time\": \"2020-03-19T12:03:27.845Z\",\n \"type\": \"temperatureMeasurement\",\n \"c8y_SteamFragment\": {\n \"Temperature\": { \"value\": 42.7, \"unit\": \"C\" },\n \"Humidity\": { \"value\": 13.37, \"unit\": \"%RH\" }\n }\n }\n ```\n\n> **⚠️ Important:** Property names used for fragment and series must not contain whitespaces nor the special characters `. , * [ ] ( ) @ $`. This is required to ensure a correct processing.\n\n**Legacy compatibility:**\n\nFor legacy compatibility reasons, a measurement can contain custom fragments. The platform's behavior will vary based on whether the series in the custom fragment are valid or not:\n\n1. ***Mixed Series Fragments:***\n\nWhen creating a measurement with a fragment containing both valid and invalid series:\n - Valid series (those with numeric value fields) are processed and persisted.\n - Invalid series (e.g., Booleans, Lists, Strings, Structs) are silently ignored and are not included in the resulting measurement.\n - The measurement is created successfully (HTTP 201 Created), but the invalid series are removed.\n\n**Example:**\n ```json\n {\n \"source\": { \"id\": \"681200\" },\n \"time\": \"2020-03-19T12:03:27.845Z\",\n \"type\": \"temperatureMeasurement\",\n \"c8y_SteamFragment\": {\n \"validSeries_DOUBLE\": { \"value\": 3.141592653589793, \"unit\": \"RAD\" },\n \"validSeries_INTEGER\": { \"value\": 42, \"unit\": \"C\" },\n \"ignoredField_BOOLEAN\": { \"value\": false, \"unit\": \"t/f\" },\n \"ignoredField_LIST\": { \"value\": [42, 43, 44] },\n \"ignoredField_STRUCT\": { \"value\": { \"a\": 1, \"b\": 2 }, \"unit\": \"C\" },\n \"ignoredField0\": 42,\n \"ignoredField1\": { \"value\": { \"a\": 1, \"b\": 2 }, \"unit\": \"C\" },\n \"ignoredField2\": { \"unit\": \"C\" },\n \"ignoredField3\": { \"val\": 42 },\n \"ignoredField4\": { \"subseries\": { \"value\": 42 } }\n }\n }\n ```\n\n **Response:**\n ```json\n {\n \"self\": \"https://example.cumulocity.com/measurement/measurements/124\",\n \"id\": \"124\",\n \"type\": \"temperatureMeasurement\",\n \"source\": { \"id\": \"681200\" },\n \"time\": \"2020-03-19T12:03:27.845Z\",\n \"c8y_SteamFragment\": {\n \"validSeries_DOUBLE\": { \"value\": 3.141592653589793, \"unit\": \"RAD\" },\n \"validSeries_INTEGER\": { \"value\": 42, \"unit\": \"C\" }\n }\n }\n ```\n\n2. ***Fragments with Only Invalid Series:***\n\nIf a measurement fragment contains only invalid series, the entire fragment is preserved as a plain object, and no fields are removed or validated further. This means that such fragments are treated as normal document properties rather than as series fragments. As a result:\n - These objects are not included in series fragment aggregation.\n - They are not treated as part of the measurement's series data but remain accessible as regular property within the measurement document.\n\n**Example:**\n ```json\n {\n \"source\": { \"id\": \"681200\" },\n \"time\": \"2020-03-19T12:03:27.845Z\",\n \"type\": \"temperatureMeasurement\",\n \"c8y_SteamFragment\": {\n \"invalidSeries_BOOLEAN\": { \"value\": false, \"unit\": \"t/f\" },\n \"invalidSeries_LIST\": { \"value\": [1, 2, 3], \"unit\": \"list\" }\n }\n }\n ```\n\n **Response:**\n ```json\n {\n \"self\": \"https://example.cumulocity.com/measurement/measurements/125\",\n \"id\": \"125\",\n \"type\": \"temperatureMeasurement\",\n \"source\": { \"id\": \"681200\" },\n \"time\": \"2020-03-19T12:03:27.845Z\",\n \"c8y_SteamFragment\": {\n \"invalidSeries_BOOLEAN\": { \"value\": false, \"unit\": \"t/f\" },\n \"invalidSeries_LIST\": { \"value\": [1, 2, 3], \"unit\": \"list\" }\n }\n }\n ```\n\nTo ensure data integrity, custom fragments should be used only with valid series.\n\n**Create multiple measurements**\n\nUsing the same API request, it is also possible to create multiple measurements by sending a `measurements` array containing all the measurements to be created. The content type must be `application/vnd.com.nsn.cumulocity.measurementcollection+json`.\n\n> **ⓘ Info:** For more details about fragments with specific meanings, refer to [Device management & connectivity > Device integration > Fragment library](https://www.cumulocity.com/docs/device-integration/fragment-library/) in the Cumulocity user documentation.\n\n<section><h5>Required roles</h5>\nROLE_MEASUREMENT_ADMIN <b>OR</b> owner of the source <b>OR</b> MEASUREMENT_ADMIN permission on the source\n</section>\n",
|
|
4919
4922
|
"requestBody": {
|
|
4920
4923
|
"required": true,
|
|
4921
4924
|
"content": {
|
|
@@ -6264,7 +6267,7 @@ const specs = Object.freeze([
|
|
|
6264
6267
|
"parameters": [{ "$ref": "#/components/parameters/acceptHeader" }],
|
|
6265
6268
|
"tags": ["Options"],
|
|
6266
6269
|
"summary": "Create an option",
|
|
6267
|
-
"description": "Create an option on your tenant.\n\nOptions are category-key-value tuples which store tenant configurations. Some categories of options allow the creation of new ones, while others are limited to predefined set of keys.\n\nAny option of any tenant can be defined as \"non-editable\" by the \"management\" tenant; once done, any PUT or DELETE requests made on that option by the tenant owner will result in a 403 error (Unauthorized). \n\n> **⚠️ Important:** Category names must not contain whitespaces nor the special characters ``` $ & + , / : ; = ? @ \" < > # % { } | \\ ^ ~ [ ] ` ```. This is necessary to ensure the new tenant option is processed correctly and saved successfully.\n\n### Default option categories\n\n**access.control**\n\n| Key | Default value | Predefined | Description |\n|--|--|--|--|\n| allow.origin | * | Yes | Comma separated list of domains allowed for execution of CORS. Wildcards are allowed (for example, `*.cumulocity.com`) |\n\n**alarm.type.mapping**\n\n| Key | Predefined | Description |\n|--|--|--|\n| <ALARM_TYPE> | No | Overrides the severity and alarm text for the alarm with type <ALARM_TYPE>. The severity and text are specified as `<ALARM_SEVERITY>\\|<ALARM_TEXT>`. If either part is empty, the value will not be overridden. If the severity is NONE, the alarm will be suppressed. Example: `\"CRITICAL\\|temperature too high\"`|\n\n### Encrypted credentials\n\nAdding a `credentials.` prefix to the key causes the value of the option to be stored in an encrypted form. When the option is retrieved from a microservice, the `credentials.` prefix is removed, and the value is decrypted only if the microservice is the owner of the option. A microservice is considered the owner when the tenant option category matches its own category, which is determined based on the first non-blank value from the following, in order of priority:\n * the `settingsCategory` defined in the microservice manifest\n * the microservice
|
|
6270
|
+
"description": "Create an option on your tenant.\n\nOptions are category-key-value tuples which store tenant configurations. Some categories of options allow the creation of new ones, while others are limited to predefined set of keys.\n\nAny option of any tenant can be defined as \"non-editable\" by the \"management\" tenant; once done, any PUT or DELETE requests made on that option by the tenant owner will result in a 403 error (Unauthorized). \n\n> **⚠️ Important:** Category names must not contain whitespaces nor the special characters ``` $ & + , / : ; = ? @ \" < > # % { } | \\ ^ ~ [ ] ` ```. This is necessary to ensure the new tenant option is processed correctly and saved successfully.\n\n### Default option categories\n\n**access.control**\n\n| Key | Default value | Predefined | Description |\n|--|--|--|--|\n| allow.origin | * | Yes | Comma separated list of domains allowed for execution of CORS. Wildcards are allowed (for example, `*.cumulocity.com`) |\n\n**alarm.type.mapping**\n\n| Key | Predefined | Description |\n|--|--|--|\n| <ALARM_TYPE> | No | Overrides the severity and alarm text for the alarm with type <ALARM_TYPE>. The severity and text are specified as `<ALARM_SEVERITY>\\|<ALARM_TEXT>`. If either part is empty, the value will not be overridden. If the severity is NONE, the alarm will be suppressed. Example: `\"CRITICAL\\|temperature too high\"`|\n\n### Encrypted credentials\n\nAdding a `credentials.` prefix to the key causes the value of the option to be stored in an encrypted form. When the option is retrieved from a microservice, the `credentials.` prefix is removed, and the value is decrypted only if the microservice is the owner of the option. A microservice is considered the owner when the tenant option category matches its own category, which is determined based on the first non-blank value from the following, in order of priority:\n * the `settingsCategory` defined in the microservice manifest\n * the microservice's context path\n * the microservice name\n\nA microservice can retrieve all the options of its own category at once through [Retrieve the current application settings](#operation/getCurrentApplicationResourceSettings).\n\nDecryption is performed only for system users (such as service users or the bootstrap user) who are the owners of the option. For example: \n```json\n{\n \"category\": \"microservice1\",\n \"key\": \"secret\",\n \"value\": \"secret-content\"\n}\n```\n\nIf the tenant option category does not match any of these values, the encrypted value will not be decrypted, and static string will be returned. For example:\n\n```json\n{\n \"category\": \"microservice2\",\n \"key\": \"credentials.secret\",\n \"value\": \"<<Encrypted>>\"\n}\n```\n<section><h5>Required roles</h5>\nROLE_OPTION_MANAGEMENT_ADMIN\n</section>\n",
|
|
6268
6271
|
"requestBody": {
|
|
6269
6272
|
"required": true,
|
|
6270
6273
|
"content": { "application/vnd.com.nsn.cumulocity.option+json": {
|
|
@@ -6300,7 +6303,7 @@ const specs = Object.freeze([
|
|
|
6300
6303
|
"operationId": "getCategoryOptionResource",
|
|
6301
6304
|
"tags": ["Options"],
|
|
6302
6305
|
"summary": "Retrieve all options by category",
|
|
6303
|
-
"description": "Retrieve all the options (by a specified category) on your tenant.\n> **⚠️ Important:** Note that Enterprise Tenants are also allowed to read inherited tenant options from the management tenant.\n\n<section><h5>Required roles</h5>\nROLE_OPTION_MANAGEMENT_READ\n</section>\n",
|
|
6306
|
+
"description": "Retrieve all the options (by a specified category) on your tenant.\n> **⚠️ Important:** Note that Enterprise Tenants are also allowed to read inherited tenant options from the management tenant.\n\nA microservice can read the options of its own category through [Retrieve the current application settings](#operation/getCurrentApplicationResourceSettings).\n\n<section><h5>Required roles</h5>\nROLE_OPTION_MANAGEMENT_READ\n</section>\n",
|
|
6304
6307
|
"responses": { "200": { "$ref": "#/components/responses/categoryOptionsFound" } }
|
|
6305
6308
|
},
|
|
6306
6309
|
"put": {
|
|
@@ -8120,6 +8123,26 @@ const specs = Object.freeze([
|
|
|
8120
8123
|
"example": true
|
|
8121
8124
|
}
|
|
8122
8125
|
},
|
|
8126
|
+
"queryParam_users_withApps": {
|
|
8127
|
+
"name": "withApps",
|
|
8128
|
+
"in": "query",
|
|
8129
|
+
"description": "If set to `false`, the applications of each returned user are reduced to references containing only `id` and `self`,\ninstead of the full application objects. Use it to speed up the request when the application details are not needed.\n",
|
|
8130
|
+
"schema": {
|
|
8131
|
+
"type": "boolean",
|
|
8132
|
+
"default": true,
|
|
8133
|
+
"example": false
|
|
8134
|
+
}
|
|
8135
|
+
},
|
|
8136
|
+
"queryParam_users_withGroups": {
|
|
8137
|
+
"name": "withGroups",
|
|
8138
|
+
"in": "query",
|
|
8139
|
+
"description": "If set to `false`, the applications assigned to the user groups of each returned user are omitted.\nThe groups themselves and their roles are still returned. Use it to reduce the response payload.\n",
|
|
8140
|
+
"schema": {
|
|
8141
|
+
"type": "boolean",
|
|
8142
|
+
"default": true,
|
|
8143
|
+
"example": false
|
|
8144
|
+
}
|
|
8145
|
+
},
|
|
8123
8146
|
"queryParam_tenant_dateFrom": {
|
|
8124
8147
|
"name": "dateFrom",
|
|
8125
8148
|
"in": "query",
|
|
@@ -9985,7 +10008,7 @@ const specs = Object.freeze([
|
|
|
9985
10008
|
}
|
|
9986
10009
|
},
|
|
9987
10010
|
"application_settings": {
|
|
9988
|
-
"description": "A map of settings for this microservice application
|
|
10011
|
+
"description": "A map of settings for this microservice application.\nThe settings are stored as tenant options in the application's settings category.\n",
|
|
9989
10012
|
"type": "object",
|
|
9990
10013
|
"additionalProperties": { "type": "string" },
|
|
9991
10014
|
"example": {
|
|
@@ -10096,7 +10119,7 @@ const specs = Object.freeze([
|
|
|
10096
10119
|
"type": "string"
|
|
10097
10120
|
},
|
|
10098
10121
|
"startDate": {
|
|
10099
|
-
"description": "Date and time when the operations of this bulk operation
|
|
10122
|
+
"description": "Date and time when the platform starts creating the operations of this bulk operation on a best-effort basis.\nThe exact creation and delivery times of the individual operations can vary.\n",
|
|
10100
10123
|
"type": "string",
|
|
10101
10124
|
"format": "date-time"
|
|
10102
10125
|
},
|
|
@@ -15722,7 +15745,7 @@ const specs = Object.freeze([
|
|
|
15722
15745
|
},
|
|
15723
15746
|
"SSO": {
|
|
15724
15747
|
"type": "oauth2",
|
|
15725
|
-
"description": "The login with SSO requires a correct configuration on the [Cumulocity side](https://www.cumulocity.com/docs/authentication/sso/). With the configuration, an additional button is available on the Login page. After clicking the button, the user is redirected to authenticate with the configured authorization server. On successful login, the user is redirected to Cumulocity.\n\nAuthentication details are exchanged using cookies. There are two parts to it, the first is the authentication cookie that is handled automatically by the Cumulocity platform. The second is the XSRF-TOKEN cookie. When a client receives the cookie, it should take the value and put it in the X-XSRF-TOKEN request header in all subsequent requests.\n\nThe flow of authenticating with authentication code grant is as follows:\n\n\n\nThe first request executed by the browser is:\n\n```http\
|
|
15748
|
+
"description": "The login with SSO requires a correct configuration on the [Cumulocity side](https://www.cumulocity.com/docs/authentication/sso/). With the configuration, an additional button is available on the Login page. After clicking the button, the user is redirected to authenticate with the configured authorization server. On successful login, the user is redirected to Cumulocity.\n\nAuthentication details are exchanged using cookies. There are two parts to it, the first is the authentication cookie that is handled automatically by the Cumulocity platform. The second is the XSRF-TOKEN cookie. When a client receives the cookie, it should take the value and put it in the X-XSRF-TOKEN request header in all subsequent requests.\n\nThe flow of authenticating with authentication code grant is as follows:\n\n\n\nThe first request executed by the browser is:\n\n```http\nGET /tenant/loginOptions\nHost: https://<TENANT_DOMAIN>\nAccept: application/vnd.com.nsn.cumulocity.loginoptioncollection+json\n```\n\nResponse sample:\n\n```json\n{\n \"loginOptions\": [\n {\n \"buttonName\": \"Login with oauth\",\n \"grantType\": \"<AUTHORIZATION_CODE>\",\n \"initRequest\": \"https://<TENANT_DOMAIN>/tenant/oauth?response_type=code&tenant_id=<TENANT_ID>\",\n \"self\": \"https://<TENANT_DOMAIN>/tenant/loginOptions/oauth2\",\n \"type\": \"oauth2\"\n },\n ...\n ],\n \"self\": \"http://<TENANT_DOMAIN>/tenant/loginOptions/\"\n}\n```\n\nThe browser must invoke the request provided in the initRequest parameter.\n\nThe initRequest initiates the redirect, in which the user is prompted for credentials. After successful login, the user is redirected back to the browser, where it must capture the code request parameter. Then the request to exchange the code for the token is as follows:\n\n```http\nPOST /tenant/oauth?grant_type=authorization_code&code=<CODE>\nHost: https://<TENANT_DOMAIN>\n```\n\nA successful response will have no body but the following response headers:\n\n```\nSet-Cookie: authorization=<TOKEN>;\nSet-Cookie: XSRF-TOKEN=<XSRF-TOKEN>;\n```\n\nThe authorization cookie is valid for two weeks.\n",
|
|
15726
15749
|
"flows": { "clientCredentials": {
|
|
15727
15750
|
"tokenUrl": "/tenant/oauth?grant_type=authorization_code&code=<CODE>",
|
|
15728
15751
|
"scopes": {}
|
|
@@ -54096,12 +54119,12 @@ var require_client$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
54096
54119
|
},
|
|
54097
54120
|
trys: [],
|
|
54098
54121
|
ops: []
|
|
54099
|
-
}, f, y, t, g
|
|
54100
|
-
return g = {
|
|
54122
|
+
}, f, y, t, g = {
|
|
54101
54123
|
next: verb(0),
|
|
54102
54124
|
"throw": verb(1),
|
|
54103
54125
|
"return": verb(2)
|
|
54104
|
-
}
|
|
54126
|
+
};
|
|
54127
|
+
return typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
54105
54128
|
return this;
|
|
54106
54129
|
}), g;
|
|
54107
54130
|
function verb(n) {
|
|
@@ -54361,12 +54384,12 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
54361
54384
|
},
|
|
54362
54385
|
trys: [],
|
|
54363
54386
|
ops: []
|
|
54364
|
-
}, f, y, t, g
|
|
54365
|
-
return g = {
|
|
54387
|
+
}, f, y, t, g = {
|
|
54366
54388
|
next: verb(0),
|
|
54367
54389
|
"throw": verb(1),
|
|
54368
54390
|
"return": verb(2)
|
|
54369
|
-
}
|
|
54391
|
+
};
|
|
54392
|
+
return typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
54370
54393
|
return this;
|
|
54371
54394
|
}), g;
|
|
54372
54395
|
function verb(n) {
|
|
@@ -54645,12 +54668,12 @@ var require_server_and_client = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
54645
54668
|
},
|
|
54646
54669
|
trys: [],
|
|
54647
54670
|
ops: []
|
|
54648
|
-
}, f, y, t, g
|
|
54649
|
-
return g = {
|
|
54671
|
+
}, f, y, t, g = {
|
|
54650
54672
|
next: verb(0),
|
|
54651
54673
|
"throw": verb(1),
|
|
54652
54674
|
"return": verb(2)
|
|
54653
|
-
}
|
|
54675
|
+
};
|
|
54676
|
+
return typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
54654
54677
|
return this;
|
|
54655
54678
|
}), g;
|
|
54656
54679
|
function verb(n) {
|
|
@@ -55330,9 +55353,9 @@ var UriTemplateMatcher = class {
|
|
|
55330
55353
|
}
|
|
55331
55354
|
};
|
|
55332
55355
|
//#endregion
|
|
55333
|
-
//#region node_modules/.pnpm/valibot@1.4.
|
|
55356
|
+
//#region node_modules/.pnpm/valibot@1.4.2_typescript@6.0.3/node_modules/valibot/dist/index.mjs
|
|
55334
55357
|
var import_dist = require_dist();
|
|
55335
|
-
const DEFAULT_CONFIG
|
|
55358
|
+
const DEFAULT_CONFIG = {
|
|
55336
55359
|
lang: void 0,
|
|
55337
55360
|
message: void 0,
|
|
55338
55361
|
abortEarly: void 0,
|
|
@@ -55346,8 +55369,8 @@ const DEFAULT_CONFIG$1 = {
|
|
|
55346
55369
|
* @returns The configuration.
|
|
55347
55370
|
*/
|
|
55348
55371
|
/* @__NO_SIDE_EFFECTS__ */
|
|
55349
|
-
function getGlobalConfig
|
|
55350
|
-
if (!config$1 && true) return DEFAULT_CONFIG
|
|
55372
|
+
function getGlobalConfig(config$1) {
|
|
55373
|
+
if (!config$1 && true) return DEFAULT_CONFIG;
|
|
55351
55374
|
return {
|
|
55352
55375
|
lang: config$1?.lang ?? void 0,
|
|
55353
55376
|
message: config$1?.message,
|
|
@@ -55365,7 +55388,7 @@ function getGlobalConfig$1(config$1) {
|
|
|
55365
55388
|
* @internal
|
|
55366
55389
|
*/
|
|
55367
55390
|
/* @__NO_SIDE_EFFECTS__ */
|
|
55368
|
-
function _stringify
|
|
55391
|
+
function _stringify(input) {
|
|
55369
55392
|
const type = typeof input;
|
|
55370
55393
|
if (type === "string") return `"${input}"`;
|
|
55371
55394
|
if (type === "number" || type === "bigint" || type === "boolean") return `${input}`;
|
|
@@ -55383,10 +55406,10 @@ function _stringify$1(input) {
|
|
|
55383
55406
|
*
|
|
55384
55407
|
* @internal
|
|
55385
55408
|
*/
|
|
55386
|
-
function _addIssue
|
|
55409
|
+
function _addIssue(context, label, dataset, config$1, other) {
|
|
55387
55410
|
const input = other && "input" in other ? other.input : dataset.value;
|
|
55388
55411
|
const expected = other?.expected ?? context.expects ?? null;
|
|
55389
|
-
const received = other?.received ?? /* @__PURE__ */ _stringify
|
|
55412
|
+
const received = other?.received ?? /* @__PURE__ */ _stringify(input);
|
|
55390
55413
|
const issue = {
|
|
55391
55414
|
kind: context.kind,
|
|
55392
55415
|
type: context.type,
|
|
@@ -55408,7 +55431,7 @@ function _addIssue$1(context, label, dataset, config$1, other) {
|
|
|
55408
55431
|
if (dataset.issues) dataset.issues.push(issue);
|
|
55409
55432
|
else dataset.issues = [issue];
|
|
55410
55433
|
}
|
|
55411
|
-
const _standardCache
|
|
55434
|
+
const _standardCache = /* @__PURE__ */ new WeakMap();
|
|
55412
55435
|
/**
|
|
55413
55436
|
* Returns the Standard Schema properties.
|
|
55414
55437
|
*
|
|
@@ -55417,17 +55440,17 @@ const _standardCache$1 = /* @__PURE__ */ new WeakMap();
|
|
|
55417
55440
|
* @returns The Standard Schema properties.
|
|
55418
55441
|
*/
|
|
55419
55442
|
/* @__NO_SIDE_EFFECTS__ */
|
|
55420
|
-
function _getStandardProps
|
|
55421
|
-
let cached = _standardCache
|
|
55443
|
+
function _getStandardProps(context) {
|
|
55444
|
+
let cached = _standardCache.get(context);
|
|
55422
55445
|
if (!cached) {
|
|
55423
55446
|
cached = {
|
|
55424
55447
|
version: 1,
|
|
55425
55448
|
vendor: "valibot",
|
|
55426
55449
|
validate(value$1) {
|
|
55427
|
-
return context["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig
|
|
55450
|
+
return context["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig());
|
|
55428
55451
|
}
|
|
55429
55452
|
};
|
|
55430
|
-
_standardCache
|
|
55453
|
+
_standardCache.set(context, cached);
|
|
55431
55454
|
}
|
|
55432
55455
|
return cached;
|
|
55433
55456
|
}
|
|
@@ -55465,7 +55488,7 @@ function _joinExpects(values$1, separator) {
|
|
|
55465
55488
|
/**
|
|
55466
55489
|
* A Valibot error with useful information.
|
|
55467
55490
|
*/
|
|
55468
|
-
var ValiError
|
|
55491
|
+
var ValiError = class extends Error {
|
|
55469
55492
|
/**
|
|
55470
55493
|
* Creates a Valibot error with useful information.
|
|
55471
55494
|
*
|
|
@@ -55492,11 +55515,27 @@ function base64(message$1) {
|
|
|
55492
55515
|
requirement: BASE64_REGEX,
|
|
55493
55516
|
message: message$1,
|
|
55494
55517
|
"~run"(dataset, config$1) {
|
|
55495
|
-
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue
|
|
55518
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "Base64", dataset, config$1);
|
|
55496
55519
|
return dataset;
|
|
55497
55520
|
}
|
|
55498
55521
|
};
|
|
55499
55522
|
}
|
|
55523
|
+
/**
|
|
55524
|
+
* Creates a description metadata action.
|
|
55525
|
+
*
|
|
55526
|
+
* @param description_ The description text.
|
|
55527
|
+
*
|
|
55528
|
+
* @returns A description action.
|
|
55529
|
+
*/
|
|
55530
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
55531
|
+
function description(description_) {
|
|
55532
|
+
return {
|
|
55533
|
+
kind: "metadata",
|
|
55534
|
+
type: "description",
|
|
55535
|
+
reference: description,
|
|
55536
|
+
description: description_
|
|
55537
|
+
};
|
|
55538
|
+
}
|
|
55500
55539
|
/* @__NO_SIDE_EFFECTS__ */
|
|
55501
55540
|
function integer(message$1) {
|
|
55502
55541
|
return {
|
|
@@ -55508,7 +55547,7 @@ function integer(message$1) {
|
|
|
55508
55547
|
requirement: Number.isInteger,
|
|
55509
55548
|
message: message$1,
|
|
55510
55549
|
"~run"(dataset, config$1) {
|
|
55511
|
-
if (dataset.typed && !this.requirement(dataset.value)) _addIssue
|
|
55550
|
+
if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "integer", dataset, config$1);
|
|
55512
55551
|
return dataset;
|
|
55513
55552
|
}
|
|
55514
55553
|
};
|
|
@@ -55524,7 +55563,7 @@ function maxLength(requirement, message$1) {
|
|
|
55524
55563
|
requirement,
|
|
55525
55564
|
message: message$1,
|
|
55526
55565
|
"~run"(dataset, config$1) {
|
|
55527
|
-
if (dataset.typed && dataset.value.length > this.requirement) _addIssue
|
|
55566
|
+
if (dataset.typed && dataset.value.length > this.requirement) _addIssue(this, "length", dataset, config$1, { received: `${dataset.value.length}` });
|
|
55528
55567
|
return dataset;
|
|
55529
55568
|
}
|
|
55530
55569
|
};
|
|
@@ -55536,11 +55575,27 @@ function maxValue(requirement, message$1) {
|
|
|
55536
55575
|
type: "max_value",
|
|
55537
55576
|
reference: maxValue,
|
|
55538
55577
|
async: false,
|
|
55539
|
-
expects: `<=${requirement instanceof Date ? requirement.toJSON() : /* @__PURE__ */ _stringify
|
|
55578
|
+
expects: `<=${requirement instanceof Date ? requirement.toJSON() : /* @__PURE__ */ _stringify(requirement)}`,
|
|
55579
|
+
requirement,
|
|
55580
|
+
message: message$1,
|
|
55581
|
+
"~run"(dataset, config$1) {
|
|
55582
|
+
if (dataset.typed && !(dataset.value <= this.requirement)) _addIssue(this, "value", dataset, config$1, { received: dataset.value instanceof Date ? dataset.value.toJSON() : /* @__PURE__ */ _stringify(dataset.value) });
|
|
55583
|
+
return dataset;
|
|
55584
|
+
}
|
|
55585
|
+
};
|
|
55586
|
+
}
|
|
55587
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
55588
|
+
function minLength(requirement, message$1) {
|
|
55589
|
+
return {
|
|
55590
|
+
kind: "validation",
|
|
55591
|
+
type: "min_length",
|
|
55592
|
+
reference: minLength,
|
|
55593
|
+
async: false,
|
|
55594
|
+
expects: `>=${requirement}`,
|
|
55540
55595
|
requirement,
|
|
55541
55596
|
message: message$1,
|
|
55542
55597
|
"~run"(dataset, config$1) {
|
|
55543
|
-
if (dataset.typed &&
|
|
55598
|
+
if (dataset.typed && dataset.value.length < this.requirement) _addIssue(this, "length", dataset, config$1, { received: `${dataset.value.length}` });
|
|
55544
55599
|
return dataset;
|
|
55545
55600
|
}
|
|
55546
55601
|
};
|
|
@@ -55552,21 +55607,21 @@ function minValue(requirement, message$1) {
|
|
|
55552
55607
|
type: "min_value",
|
|
55553
55608
|
reference: minValue,
|
|
55554
55609
|
async: false,
|
|
55555
|
-
expects: `>=${requirement instanceof Date ? requirement.toJSON() : /* @__PURE__ */ _stringify
|
|
55610
|
+
expects: `>=${requirement instanceof Date ? requirement.toJSON() : /* @__PURE__ */ _stringify(requirement)}`,
|
|
55556
55611
|
requirement,
|
|
55557
55612
|
message: message$1,
|
|
55558
55613
|
"~run"(dataset, config$1) {
|
|
55559
|
-
if (dataset.typed && !(dataset.value >= this.requirement)) _addIssue
|
|
55614
|
+
if (dataset.typed && !(dataset.value >= this.requirement)) _addIssue(this, "value", dataset, config$1, { received: dataset.value instanceof Date ? dataset.value.toJSON() : /* @__PURE__ */ _stringify(dataset.value) });
|
|
55560
55615
|
return dataset;
|
|
55561
55616
|
}
|
|
55562
55617
|
};
|
|
55563
55618
|
}
|
|
55564
55619
|
/* @__NO_SIDE_EFFECTS__ */
|
|
55565
|
-
function url
|
|
55620
|
+
function url(message$1) {
|
|
55566
55621
|
return {
|
|
55567
55622
|
kind: "validation",
|
|
55568
55623
|
type: "url",
|
|
55569
|
-
reference: url
|
|
55624
|
+
reference: url,
|
|
55570
55625
|
async: false,
|
|
55571
55626
|
expects: null,
|
|
55572
55627
|
requirement(input) {
|
|
@@ -55579,7 +55634,7 @@ function url$1(message$1) {
|
|
|
55579
55634
|
},
|
|
55580
55635
|
message: message$1,
|
|
55581
55636
|
"~run"(dataset, config$1) {
|
|
55582
|
-
if (dataset.typed && !this.requirement(dataset.value)) _addIssue
|
|
55637
|
+
if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "URL", dataset, config$1);
|
|
55583
55638
|
return dataset;
|
|
55584
55639
|
}
|
|
55585
55640
|
};
|
|
@@ -55595,7 +55650,7 @@ const ABORT_EARLY_CONFIG = { abortEarly: true };
|
|
|
55595
55650
|
* @returns The fallback value.
|
|
55596
55651
|
*/
|
|
55597
55652
|
/* @__NO_SIDE_EFFECTS__ */
|
|
55598
|
-
function getFallback
|
|
55653
|
+
function getFallback(schema, dataset, config$1) {
|
|
55599
55654
|
return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
|
|
55600
55655
|
}
|
|
55601
55656
|
/**
|
|
@@ -55608,7 +55663,7 @@ function getFallback$1(schema, dataset, config$1) {
|
|
|
55608
55663
|
* @returns The default value.
|
|
55609
55664
|
*/
|
|
55610
55665
|
/* @__NO_SIDE_EFFECTS__ */
|
|
55611
|
-
function getDefault
|
|
55666
|
+
function getDefault(schema, dataset, config$1) {
|
|
55612
55667
|
return typeof schema.default === "function" ? schema.default(dataset, config$1) : schema.default;
|
|
55613
55668
|
}
|
|
55614
55669
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -55622,7 +55677,7 @@ function array(item, message$1) {
|
|
|
55622
55677
|
item,
|
|
55623
55678
|
message: message$1,
|
|
55624
55679
|
get "~standard"() {
|
|
55625
|
-
return /* @__PURE__ */ _getStandardProps
|
|
55680
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
55626
55681
|
},
|
|
55627
55682
|
"~run"(dataset, config$1) {
|
|
55628
55683
|
const input = dataset.value;
|
|
@@ -55654,26 +55709,26 @@ function array(item, message$1) {
|
|
|
55654
55709
|
if (!itemDataset.typed) dataset.typed = false;
|
|
55655
55710
|
dataset.value.push(itemDataset.value);
|
|
55656
55711
|
}
|
|
55657
|
-
} else _addIssue
|
|
55712
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
55658
55713
|
return dataset;
|
|
55659
55714
|
}
|
|
55660
55715
|
};
|
|
55661
55716
|
}
|
|
55662
55717
|
/* @__NO_SIDE_EFFECTS__ */
|
|
55663
|
-
function boolean
|
|
55718
|
+
function boolean(message$1) {
|
|
55664
55719
|
return {
|
|
55665
55720
|
kind: "schema",
|
|
55666
55721
|
type: "boolean",
|
|
55667
|
-
reference: boolean
|
|
55722
|
+
reference: boolean,
|
|
55668
55723
|
expects: "boolean",
|
|
55669
55724
|
async: false,
|
|
55670
55725
|
message: message$1,
|
|
55671
55726
|
get "~standard"() {
|
|
55672
|
-
return /* @__PURE__ */ _getStandardProps
|
|
55727
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
55673
55728
|
},
|
|
55674
55729
|
"~run"(dataset, config$1) {
|
|
55675
55730
|
if (typeof dataset.value === "boolean") dataset.typed = true;
|
|
55676
|
-
else _addIssue
|
|
55731
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
55677
55732
|
return dataset;
|
|
55678
55733
|
}
|
|
55679
55734
|
};
|
|
@@ -55689,11 +55744,11 @@ function custom(check$1, message$1) {
|
|
|
55689
55744
|
check: check$1,
|
|
55690
55745
|
message: message$1,
|
|
55691
55746
|
get "~standard"() {
|
|
55692
|
-
return /* @__PURE__ */ _getStandardProps
|
|
55747
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
55693
55748
|
},
|
|
55694
55749
|
"~run"(dataset, config$1) {
|
|
55695
55750
|
if (this.check(dataset.value)) dataset.typed = true;
|
|
55696
|
-
else _addIssue
|
|
55751
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
55697
55752
|
return dataset;
|
|
55698
55753
|
}
|
|
55699
55754
|
};
|
|
@@ -55704,16 +55759,16 @@ function literal(literal_, message$1) {
|
|
|
55704
55759
|
kind: "schema",
|
|
55705
55760
|
type: "literal",
|
|
55706
55761
|
reference: literal,
|
|
55707
|
-
expects: /* @__PURE__ */ _stringify
|
|
55762
|
+
expects: /* @__PURE__ */ _stringify(literal_),
|
|
55708
55763
|
async: false,
|
|
55709
55764
|
literal: literal_,
|
|
55710
55765
|
message: message$1,
|
|
55711
55766
|
get "~standard"() {
|
|
55712
|
-
return /* @__PURE__ */ _getStandardProps
|
|
55767
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
55713
55768
|
},
|
|
55714
55769
|
"~run"(dataset, config$1) {
|
|
55715
55770
|
if (dataset.value === this.literal) dataset.typed = true;
|
|
55716
|
-
else _addIssue
|
|
55771
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
55717
55772
|
return dataset;
|
|
55718
55773
|
}
|
|
55719
55774
|
};
|
|
@@ -55729,7 +55784,7 @@ function looseObject(entries$1, message$1) {
|
|
|
55729
55784
|
entries: entries$1,
|
|
55730
55785
|
message: message$1,
|
|
55731
55786
|
get "~standard"() {
|
|
55732
|
-
return /* @__PURE__ */ _getStandardProps
|
|
55787
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
55733
55788
|
},
|
|
55734
55789
|
"~run"(dataset, config$1) {
|
|
55735
55790
|
const input = dataset.value;
|
|
@@ -55739,7 +55794,7 @@ function looseObject(entries$1, message$1) {
|
|
|
55739
55794
|
for (const key in this.entries) {
|
|
55740
55795
|
const valueSchema = this.entries[key];
|
|
55741
55796
|
if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
|
|
55742
|
-
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault
|
|
55797
|
+
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
|
|
55743
55798
|
const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
|
|
55744
55799
|
if (valueDataset.issues) {
|
|
55745
55800
|
const pathItem = {
|
|
@@ -55762,9 +55817,9 @@ function looseObject(entries$1, message$1) {
|
|
|
55762
55817
|
}
|
|
55763
55818
|
if (!valueDataset.typed) dataset.typed = false;
|
|
55764
55819
|
dataset.value[key] = valueDataset.value;
|
|
55765
|
-
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback
|
|
55820
|
+
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
|
|
55766
55821
|
else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
|
|
55767
|
-
_addIssue
|
|
55822
|
+
_addIssue(this, "key", dataset, config$1, {
|
|
55768
55823
|
input: void 0,
|
|
55769
55824
|
expected: `"${key}"`,
|
|
55770
55825
|
path: [{
|
|
@@ -55781,112 +55836,28 @@ function looseObject(entries$1, message$1) {
|
|
|
55781
55836
|
if (!dataset.issues || !config$1.abortEarly) {
|
|
55782
55837
|
for (const key in input) if (/* @__PURE__ */ _isValidObjectKey(input, key) && !(key in this.entries)) dataset.value[key] = input[key];
|
|
55783
55838
|
}
|
|
55784
|
-
} else _addIssue
|
|
55785
|
-
return dataset;
|
|
55786
|
-
}
|
|
55787
|
-
};
|
|
55788
|
-
}
|
|
55789
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
55790
|
-
function number(message$1) {
|
|
55791
|
-
return {
|
|
55792
|
-
kind: "schema",
|
|
55793
|
-
type: "number",
|
|
55794
|
-
reference: number,
|
|
55795
|
-
expects: "number",
|
|
55796
|
-
async: false,
|
|
55797
|
-
message: message$1,
|
|
55798
|
-
get "~standard"() {
|
|
55799
|
-
return /* @__PURE__ */ _getStandardProps$1(this);
|
|
55800
|
-
},
|
|
55801
|
-
"~run"(dataset, config$1) {
|
|
55802
|
-
if (typeof dataset.value === "number" && !isNaN(dataset.value)) dataset.typed = true;
|
|
55803
|
-
else _addIssue$1(this, "type", dataset, config$1);
|
|
55804
|
-
return dataset;
|
|
55805
|
-
}
|
|
55806
|
-
};
|
|
55807
|
-
}
|
|
55808
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
55809
|
-
function object$2(entries$1, message$1) {
|
|
55810
|
-
return {
|
|
55811
|
-
kind: "schema",
|
|
55812
|
-
type: "object",
|
|
55813
|
-
reference: object$2,
|
|
55814
|
-
expects: "Object",
|
|
55815
|
-
async: false,
|
|
55816
|
-
entries: entries$1,
|
|
55817
|
-
message: message$1,
|
|
55818
|
-
get "~standard"() {
|
|
55819
|
-
return /* @__PURE__ */ _getStandardProps$1(this);
|
|
55820
|
-
},
|
|
55821
|
-
"~run"(dataset, config$1) {
|
|
55822
|
-
const input = dataset.value;
|
|
55823
|
-
if (input && typeof input === "object") {
|
|
55824
|
-
dataset.typed = true;
|
|
55825
|
-
dataset.value = {};
|
|
55826
|
-
for (const key in this.entries) {
|
|
55827
|
-
const valueSchema = this.entries[key];
|
|
55828
|
-
if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
|
|
55829
|
-
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault$1(valueSchema);
|
|
55830
|
-
const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
|
|
55831
|
-
if (valueDataset.issues) {
|
|
55832
|
-
const pathItem = {
|
|
55833
|
-
type: "object",
|
|
55834
|
-
origin: "value",
|
|
55835
|
-
input,
|
|
55836
|
-
key,
|
|
55837
|
-
value: value$1
|
|
55838
|
-
};
|
|
55839
|
-
for (const issue of valueDataset.issues) {
|
|
55840
|
-
if (issue.path) issue.path.unshift(pathItem);
|
|
55841
|
-
else issue.path = [pathItem];
|
|
55842
|
-
dataset.issues?.push(issue);
|
|
55843
|
-
}
|
|
55844
|
-
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
55845
|
-
if (config$1.abortEarly) {
|
|
55846
|
-
dataset.typed = false;
|
|
55847
|
-
break;
|
|
55848
|
-
}
|
|
55849
|
-
}
|
|
55850
|
-
if (!valueDataset.typed) dataset.typed = false;
|
|
55851
|
-
dataset.value[key] = valueDataset.value;
|
|
55852
|
-
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback$1(valueSchema);
|
|
55853
|
-
else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
|
|
55854
|
-
_addIssue$1(this, "key", dataset, config$1, {
|
|
55855
|
-
input: void 0,
|
|
55856
|
-
expected: `"${key}"`,
|
|
55857
|
-
path: [{
|
|
55858
|
-
type: "object",
|
|
55859
|
-
origin: "key",
|
|
55860
|
-
input,
|
|
55861
|
-
key,
|
|
55862
|
-
value: input[key]
|
|
55863
|
-
}]
|
|
55864
|
-
});
|
|
55865
|
-
if (config$1.abortEarly) break;
|
|
55866
|
-
}
|
|
55867
|
-
}
|
|
55868
|
-
} else _addIssue$1(this, "type", dataset, config$1);
|
|
55839
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
55869
55840
|
return dataset;
|
|
55870
55841
|
}
|
|
55871
55842
|
};
|
|
55872
55843
|
}
|
|
55873
55844
|
/* @__NO_SIDE_EFFECTS__ */
|
|
55874
|
-
function
|
|
55845
|
+
function nullable(wrapped, default_) {
|
|
55875
55846
|
return {
|
|
55876
55847
|
kind: "schema",
|
|
55877
|
-
type: "
|
|
55878
|
-
reference:
|
|
55879
|
-
expects: `(${wrapped.expects} |
|
|
55848
|
+
type: "nullable",
|
|
55849
|
+
reference: nullable,
|
|
55850
|
+
expects: `(${wrapped.expects} | null)`,
|
|
55880
55851
|
async: false,
|
|
55881
55852
|
wrapped,
|
|
55882
55853
|
default: default_,
|
|
55883
55854
|
get "~standard"() {
|
|
55884
|
-
return /* @__PURE__ */ _getStandardProps
|
|
55855
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
55885
55856
|
},
|
|
55886
55857
|
"~run"(dataset, config$1) {
|
|
55887
|
-
if (dataset.value ===
|
|
55888
|
-
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault
|
|
55889
|
-
if (dataset.value ===
|
|
55858
|
+
if (dataset.value === null) {
|
|
55859
|
+
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
55860
|
+
if (dataset.value === null) {
|
|
55890
55861
|
dataset.typed = true;
|
|
55891
55862
|
return dataset;
|
|
55892
55863
|
}
|
|
@@ -55896,105 +55867,36 @@ function optional$1(wrapped, default_) {
|
|
|
55896
55867
|
};
|
|
55897
55868
|
}
|
|
55898
55869
|
/* @__NO_SIDE_EFFECTS__ */
|
|
55899
|
-
function
|
|
55900
|
-
return {
|
|
55901
|
-
kind: "schema",
|
|
55902
|
-
type: "picklist",
|
|
55903
|
-
reference: picklist,
|
|
55904
|
-
expects: /* @__PURE__ */ _joinExpects(options.map(_stringify$1), "|"),
|
|
55905
|
-
async: false,
|
|
55906
|
-
options,
|
|
55907
|
-
message: message$1,
|
|
55908
|
-
get "~standard"() {
|
|
55909
|
-
return /* @__PURE__ */ _getStandardProps$1(this);
|
|
55910
|
-
},
|
|
55911
|
-
"~run"(dataset, config$1) {
|
|
55912
|
-
if (this.options.includes(dataset.value)) dataset.typed = true;
|
|
55913
|
-
else _addIssue$1(this, "type", dataset, config$1);
|
|
55914
|
-
return dataset;
|
|
55915
|
-
}
|
|
55916
|
-
};
|
|
55917
|
-
}
|
|
55918
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
55919
|
-
function record(key, value$1, message$1) {
|
|
55870
|
+
function number(message$1) {
|
|
55920
55871
|
return {
|
|
55921
55872
|
kind: "schema",
|
|
55922
|
-
type: "
|
|
55923
|
-
reference:
|
|
55924
|
-
expects: "
|
|
55873
|
+
type: "number",
|
|
55874
|
+
reference: number,
|
|
55875
|
+
expects: "number",
|
|
55925
55876
|
async: false,
|
|
55926
|
-
key,
|
|
55927
|
-
value: value$1,
|
|
55928
55877
|
message: message$1,
|
|
55929
55878
|
get "~standard"() {
|
|
55930
|
-
return /* @__PURE__ */ _getStandardProps
|
|
55879
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
55931
55880
|
},
|
|
55932
55881
|
"~run"(dataset, config$1) {
|
|
55933
|
-
|
|
55934
|
-
|
|
55935
|
-
dataset.typed = true;
|
|
55936
|
-
dataset.value = {};
|
|
55937
|
-
for (const entryKey in input) if (/* @__PURE__ */ _isValidObjectKey(input, entryKey)) {
|
|
55938
|
-
const entryValue = input[entryKey];
|
|
55939
|
-
const keyDataset = this.key["~run"]({ value: entryKey }, config$1);
|
|
55940
|
-
if (keyDataset.issues) {
|
|
55941
|
-
const pathItem = {
|
|
55942
|
-
type: "object",
|
|
55943
|
-
origin: "key",
|
|
55944
|
-
input,
|
|
55945
|
-
key: entryKey,
|
|
55946
|
-
value: entryValue
|
|
55947
|
-
};
|
|
55948
|
-
for (const issue of keyDataset.issues) {
|
|
55949
|
-
issue.path = [pathItem];
|
|
55950
|
-
dataset.issues?.push(issue);
|
|
55951
|
-
}
|
|
55952
|
-
if (!dataset.issues) dataset.issues = keyDataset.issues;
|
|
55953
|
-
if (config$1.abortEarly) {
|
|
55954
|
-
dataset.typed = false;
|
|
55955
|
-
break;
|
|
55956
|
-
}
|
|
55957
|
-
}
|
|
55958
|
-
const valueDataset = this.value["~run"]({ value: entryValue }, config$1);
|
|
55959
|
-
if (valueDataset.issues) {
|
|
55960
|
-
const pathItem = {
|
|
55961
|
-
type: "object",
|
|
55962
|
-
origin: "value",
|
|
55963
|
-
input,
|
|
55964
|
-
key: entryKey,
|
|
55965
|
-
value: entryValue
|
|
55966
|
-
};
|
|
55967
|
-
for (const issue of valueDataset.issues) {
|
|
55968
|
-
if (issue.path) issue.path.unshift(pathItem);
|
|
55969
|
-
else issue.path = [pathItem];
|
|
55970
|
-
dataset.issues?.push(issue);
|
|
55971
|
-
}
|
|
55972
|
-
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
55973
|
-
if (config$1.abortEarly) {
|
|
55974
|
-
dataset.typed = false;
|
|
55975
|
-
break;
|
|
55976
|
-
}
|
|
55977
|
-
}
|
|
55978
|
-
if (!keyDataset.typed || !valueDataset.typed) dataset.typed = false;
|
|
55979
|
-
if (keyDataset.typed) dataset.value[keyDataset.value] = valueDataset.value;
|
|
55980
|
-
}
|
|
55981
|
-
} else _addIssue$1(this, "type", dataset, config$1);
|
|
55882
|
+
if (typeof dataset.value === "number" && !isNaN(dataset.value)) dataset.typed = true;
|
|
55883
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
55982
55884
|
return dataset;
|
|
55983
55885
|
}
|
|
55984
55886
|
};
|
|
55985
55887
|
}
|
|
55986
55888
|
/* @__NO_SIDE_EFFECTS__ */
|
|
55987
|
-
function
|
|
55889
|
+
function object(entries$1, message$1) {
|
|
55988
55890
|
return {
|
|
55989
55891
|
kind: "schema",
|
|
55990
|
-
type: "
|
|
55991
|
-
reference:
|
|
55892
|
+
type: "object",
|
|
55893
|
+
reference: object,
|
|
55992
55894
|
expects: "Object",
|
|
55993
55895
|
async: false,
|
|
55994
55896
|
entries: entries$1,
|
|
55995
55897
|
message: message$1,
|
|
55996
55898
|
get "~standard"() {
|
|
55997
|
-
return /* @__PURE__ */ _getStandardProps
|
|
55899
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
55998
55900
|
},
|
|
55999
55901
|
"~run"(dataset, config$1) {
|
|
56000
55902
|
const input = dataset.value;
|
|
@@ -56004,7 +55906,7 @@ function strictObject(entries$1, message$1) {
|
|
|
56004
55906
|
for (const key in this.entries) {
|
|
56005
55907
|
const valueSchema = this.entries[key];
|
|
56006
55908
|
if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
|
|
56007
|
-
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault
|
|
55909
|
+
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
|
|
56008
55910
|
const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
|
|
56009
55911
|
if (valueDataset.issues) {
|
|
56010
55912
|
const pathItem = {
|
|
@@ -56027,9 +55929,187 @@ function strictObject(entries$1, message$1) {
|
|
|
56027
55929
|
}
|
|
56028
55930
|
if (!valueDataset.typed) dataset.typed = false;
|
|
56029
55931
|
dataset.value[key] = valueDataset.value;
|
|
56030
|
-
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback
|
|
55932
|
+
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
|
|
56031
55933
|
else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
|
|
56032
|
-
_addIssue
|
|
55934
|
+
_addIssue(this, "key", dataset, config$1, {
|
|
55935
|
+
input: void 0,
|
|
55936
|
+
expected: `"${key}"`,
|
|
55937
|
+
path: [{
|
|
55938
|
+
type: "object",
|
|
55939
|
+
origin: "key",
|
|
55940
|
+
input,
|
|
55941
|
+
key,
|
|
55942
|
+
value: input[key]
|
|
55943
|
+
}]
|
|
55944
|
+
});
|
|
55945
|
+
if (config$1.abortEarly) break;
|
|
55946
|
+
}
|
|
55947
|
+
}
|
|
55948
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
55949
|
+
return dataset;
|
|
55950
|
+
}
|
|
55951
|
+
};
|
|
55952
|
+
}
|
|
55953
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
55954
|
+
function optional(wrapped, default_) {
|
|
55955
|
+
return {
|
|
55956
|
+
kind: "schema",
|
|
55957
|
+
type: "optional",
|
|
55958
|
+
reference: optional,
|
|
55959
|
+
expects: `(${wrapped.expects} | undefined)`,
|
|
55960
|
+
async: false,
|
|
55961
|
+
wrapped,
|
|
55962
|
+
default: default_,
|
|
55963
|
+
get "~standard"() {
|
|
55964
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
55965
|
+
},
|
|
55966
|
+
"~run"(dataset, config$1) {
|
|
55967
|
+
if (dataset.value === void 0) {
|
|
55968
|
+
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
55969
|
+
if (dataset.value === void 0) {
|
|
55970
|
+
dataset.typed = true;
|
|
55971
|
+
return dataset;
|
|
55972
|
+
}
|
|
55973
|
+
}
|
|
55974
|
+
return this.wrapped["~run"](dataset, config$1);
|
|
55975
|
+
}
|
|
55976
|
+
};
|
|
55977
|
+
}
|
|
55978
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
55979
|
+
function picklist(options, message$1) {
|
|
55980
|
+
return {
|
|
55981
|
+
kind: "schema",
|
|
55982
|
+
type: "picklist",
|
|
55983
|
+
reference: picklist,
|
|
55984
|
+
expects: /* @__PURE__ */ _joinExpects(options.map(_stringify), "|"),
|
|
55985
|
+
async: false,
|
|
55986
|
+
options,
|
|
55987
|
+
message: message$1,
|
|
55988
|
+
get "~standard"() {
|
|
55989
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
55990
|
+
},
|
|
55991
|
+
"~run"(dataset, config$1) {
|
|
55992
|
+
if (this.options.includes(dataset.value)) dataset.typed = true;
|
|
55993
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
55994
|
+
return dataset;
|
|
55995
|
+
}
|
|
55996
|
+
};
|
|
55997
|
+
}
|
|
55998
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
55999
|
+
function record(key, value$1, message$1) {
|
|
56000
|
+
return {
|
|
56001
|
+
kind: "schema",
|
|
56002
|
+
type: "record",
|
|
56003
|
+
reference: record,
|
|
56004
|
+
expects: "Object",
|
|
56005
|
+
async: false,
|
|
56006
|
+
key,
|
|
56007
|
+
value: value$1,
|
|
56008
|
+
message: message$1,
|
|
56009
|
+
get "~standard"() {
|
|
56010
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
56011
|
+
},
|
|
56012
|
+
"~run"(dataset, config$1) {
|
|
56013
|
+
const input = dataset.value;
|
|
56014
|
+
if (input && typeof input === "object") {
|
|
56015
|
+
dataset.typed = true;
|
|
56016
|
+
dataset.value = {};
|
|
56017
|
+
for (const entryKey in input) if (/* @__PURE__ */ _isValidObjectKey(input, entryKey)) {
|
|
56018
|
+
const entryValue = input[entryKey];
|
|
56019
|
+
const keyDataset = this.key["~run"]({ value: entryKey }, config$1);
|
|
56020
|
+
if (keyDataset.issues) {
|
|
56021
|
+
const pathItem = {
|
|
56022
|
+
type: "object",
|
|
56023
|
+
origin: "key",
|
|
56024
|
+
input,
|
|
56025
|
+
key: entryKey,
|
|
56026
|
+
value: entryValue
|
|
56027
|
+
};
|
|
56028
|
+
for (const issue of keyDataset.issues) {
|
|
56029
|
+
issue.path = [pathItem];
|
|
56030
|
+
dataset.issues?.push(issue);
|
|
56031
|
+
}
|
|
56032
|
+
if (!dataset.issues) dataset.issues = keyDataset.issues;
|
|
56033
|
+
if (config$1.abortEarly) {
|
|
56034
|
+
dataset.typed = false;
|
|
56035
|
+
break;
|
|
56036
|
+
}
|
|
56037
|
+
}
|
|
56038
|
+
const valueDataset = this.value["~run"]({ value: entryValue }, config$1);
|
|
56039
|
+
if (valueDataset.issues) {
|
|
56040
|
+
const pathItem = {
|
|
56041
|
+
type: "object",
|
|
56042
|
+
origin: "value",
|
|
56043
|
+
input,
|
|
56044
|
+
key: entryKey,
|
|
56045
|
+
value: entryValue
|
|
56046
|
+
};
|
|
56047
|
+
for (const issue of valueDataset.issues) {
|
|
56048
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
56049
|
+
else issue.path = [pathItem];
|
|
56050
|
+
dataset.issues?.push(issue);
|
|
56051
|
+
}
|
|
56052
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
56053
|
+
if (config$1.abortEarly) {
|
|
56054
|
+
dataset.typed = false;
|
|
56055
|
+
break;
|
|
56056
|
+
}
|
|
56057
|
+
}
|
|
56058
|
+
if (!keyDataset.typed || !valueDataset.typed) dataset.typed = false;
|
|
56059
|
+
if (keyDataset.typed) dataset.value[keyDataset.value] = valueDataset.value;
|
|
56060
|
+
}
|
|
56061
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
56062
|
+
return dataset;
|
|
56063
|
+
}
|
|
56064
|
+
};
|
|
56065
|
+
}
|
|
56066
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
56067
|
+
function strictObject(entries$1, message$1) {
|
|
56068
|
+
return {
|
|
56069
|
+
kind: "schema",
|
|
56070
|
+
type: "strict_object",
|
|
56071
|
+
reference: strictObject,
|
|
56072
|
+
expects: "Object",
|
|
56073
|
+
async: false,
|
|
56074
|
+
entries: entries$1,
|
|
56075
|
+
message: message$1,
|
|
56076
|
+
get "~standard"() {
|
|
56077
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
56078
|
+
},
|
|
56079
|
+
"~run"(dataset, config$1) {
|
|
56080
|
+
const input = dataset.value;
|
|
56081
|
+
if (input && typeof input === "object") {
|
|
56082
|
+
dataset.typed = true;
|
|
56083
|
+
dataset.value = {};
|
|
56084
|
+
for (const key in this.entries) {
|
|
56085
|
+
const valueSchema = this.entries[key];
|
|
56086
|
+
if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
|
|
56087
|
+
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
|
|
56088
|
+
const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
|
|
56089
|
+
if (valueDataset.issues) {
|
|
56090
|
+
const pathItem = {
|
|
56091
|
+
type: "object",
|
|
56092
|
+
origin: "value",
|
|
56093
|
+
input,
|
|
56094
|
+
key,
|
|
56095
|
+
value: value$1
|
|
56096
|
+
};
|
|
56097
|
+
for (const issue of valueDataset.issues) {
|
|
56098
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
56099
|
+
else issue.path = [pathItem];
|
|
56100
|
+
dataset.issues?.push(issue);
|
|
56101
|
+
}
|
|
56102
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
56103
|
+
if (config$1.abortEarly) {
|
|
56104
|
+
dataset.typed = false;
|
|
56105
|
+
break;
|
|
56106
|
+
}
|
|
56107
|
+
}
|
|
56108
|
+
if (!valueDataset.typed) dataset.typed = false;
|
|
56109
|
+
dataset.value[key] = valueDataset.value;
|
|
56110
|
+
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
|
|
56111
|
+
else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
|
|
56112
|
+
_addIssue(this, "key", dataset, config$1, {
|
|
56033
56113
|
input: void 0,
|
|
56034
56114
|
expected: `"${key}"`,
|
|
56035
56115
|
path: [{
|
|
@@ -56045,7 +56125,7 @@ function strictObject(entries$1, message$1) {
|
|
|
56045
56125
|
}
|
|
56046
56126
|
if (!dataset.issues || !config$1.abortEarly) {
|
|
56047
56127
|
for (const key in input) if (!(key in this.entries)) {
|
|
56048
|
-
_addIssue
|
|
56128
|
+
_addIssue(this, "key", dataset, config$1, {
|
|
56049
56129
|
input: key,
|
|
56050
56130
|
expected: "never",
|
|
56051
56131
|
path: [{
|
|
@@ -56059,26 +56139,26 @@ function strictObject(entries$1, message$1) {
|
|
|
56059
56139
|
break;
|
|
56060
56140
|
}
|
|
56061
56141
|
}
|
|
56062
|
-
} else _addIssue
|
|
56142
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
56063
56143
|
return dataset;
|
|
56064
56144
|
}
|
|
56065
56145
|
};
|
|
56066
56146
|
}
|
|
56067
56147
|
/* @__NO_SIDE_EFFECTS__ */
|
|
56068
|
-
function string
|
|
56148
|
+
function string(message$1) {
|
|
56069
56149
|
return {
|
|
56070
56150
|
kind: "schema",
|
|
56071
56151
|
type: "string",
|
|
56072
|
-
reference: string
|
|
56152
|
+
reference: string,
|
|
56073
56153
|
expects: "string",
|
|
56074
56154
|
async: false,
|
|
56075
56155
|
message: message$1,
|
|
56076
56156
|
get "~standard"() {
|
|
56077
|
-
return /* @__PURE__ */ _getStandardProps
|
|
56157
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
56078
56158
|
},
|
|
56079
56159
|
"~run"(dataset, config$1) {
|
|
56080
56160
|
if (typeof dataset.value === "string") dataset.typed = true;
|
|
56081
|
-
else _addIssue
|
|
56161
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
56082
56162
|
return dataset;
|
|
56083
56163
|
}
|
|
56084
56164
|
};
|
|
@@ -56110,7 +56190,7 @@ function union(options, message$1) {
|
|
|
56110
56190
|
options,
|
|
56111
56191
|
message: message$1,
|
|
56112
56192
|
get "~standard"() {
|
|
56113
|
-
return /* @__PURE__ */ _getStandardProps
|
|
56193
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
56114
56194
|
},
|
|
56115
56195
|
"~run"(dataset, config$1) {
|
|
56116
56196
|
let validDataset;
|
|
@@ -56130,10 +56210,10 @@ function union(options, message$1) {
|
|
|
56130
56210
|
if (validDataset) return validDataset;
|
|
56131
56211
|
if (typedDatasets) {
|
|
56132
56212
|
if (typedDatasets.length === 1) return typedDatasets[0];
|
|
56133
|
-
_addIssue
|
|
56213
|
+
_addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });
|
|
56134
56214
|
dataset.typed = true;
|
|
56135
56215
|
} else if (untypedDatasets?.length === 1) return untypedDatasets[0];
|
|
56136
|
-
else _addIssue
|
|
56216
|
+
else _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
|
|
56137
56217
|
return dataset;
|
|
56138
56218
|
}
|
|
56139
56219
|
};
|
|
@@ -56152,7 +56232,7 @@ function unknown() {
|
|
|
56152
56232
|
expects: "unknown",
|
|
56153
56233
|
async: false,
|
|
56154
56234
|
get "~standard"() {
|
|
56155
|
-
return /* @__PURE__ */ _getStandardProps
|
|
56235
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
56156
56236
|
},
|
|
56157
56237
|
"~run"(dataset) {
|
|
56158
56238
|
dataset.typed = true;
|
|
@@ -56172,7 +56252,7 @@ function variant(key, options, message$1) {
|
|
|
56172
56252
|
options,
|
|
56173
56253
|
message: message$1,
|
|
56174
56254
|
get "~standard"() {
|
|
56175
|
-
return /* @__PURE__ */ _getStandardProps
|
|
56255
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
56176
56256
|
},
|
|
56177
56257
|
"~run"(dataset, config$1) {
|
|
56178
56258
|
const input = dataset.value;
|
|
@@ -56214,7 +56294,7 @@ function variant(key, options, message$1) {
|
|
|
56214
56294
|
};
|
|
56215
56295
|
parseOptions(this, /* @__PURE__ */ new Set([this.key]));
|
|
56216
56296
|
if (outputDataset) return outputDataset;
|
|
56217
|
-
_addIssue
|
|
56297
|
+
_addIssue(this, "type", dataset, config$1, {
|
|
56218
56298
|
input: input[invalidDiscriminatorKey],
|
|
56219
56299
|
expected: /* @__PURE__ */ _joinExpects(expectedDiscriminators, "|"),
|
|
56220
56300
|
path: [{
|
|
@@ -56225,7 +56305,7 @@ function variant(key, options, message$1) {
|
|
|
56225
56305
|
value: input[invalidDiscriminatorKey]
|
|
56226
56306
|
}]
|
|
56227
56307
|
});
|
|
56228
|
-
} else _addIssue
|
|
56308
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
56229
56309
|
return dataset;
|
|
56230
56310
|
}
|
|
56231
56311
|
};
|
|
@@ -56239,18 +56319,18 @@ function variant(key, options, message$1) {
|
|
|
56239
56319
|
*
|
|
56240
56320
|
* @returns The parsed input.
|
|
56241
56321
|
*/
|
|
56242
|
-
function parse$
|
|
56243
|
-
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig
|
|
56244
|
-
if (dataset.issues) throw new ValiError
|
|
56322
|
+
function parse$3(schema, input, config$1) {
|
|
56323
|
+
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));
|
|
56324
|
+
if (dataset.issues) throw new ValiError(dataset.issues);
|
|
56245
56325
|
return dataset.value;
|
|
56246
56326
|
}
|
|
56247
56327
|
/* @__NO_SIDE_EFFECTS__ */
|
|
56248
|
-
function pipe
|
|
56328
|
+
function pipe(...pipe$1) {
|
|
56249
56329
|
return {
|
|
56250
56330
|
...pipe$1[0],
|
|
56251
56331
|
pipe: pipe$1,
|
|
56252
56332
|
get "~standard"() {
|
|
56253
|
-
return /* @__PURE__ */ _getStandardProps
|
|
56333
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
56254
56334
|
},
|
|
56255
56335
|
"~run"(dataset, config$1) {
|
|
56256
56336
|
for (const item of pipe$1) if (item.kind !== "metadata") {
|
|
@@ -56275,7 +56355,7 @@ function pipe$2(...pipe$1) {
|
|
|
56275
56355
|
*/
|
|
56276
56356
|
/* @__NO_SIDE_EFFECTS__ */
|
|
56277
56357
|
function safeParse(schema, input, config$1) {
|
|
56278
|
-
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig
|
|
56358
|
+
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));
|
|
56279
56359
|
return {
|
|
56280
56360
|
typed: dataset.typed,
|
|
56281
56361
|
success: !dataset.issues,
|
|
@@ -56398,7 +56478,7 @@ function unsupported_protocol_version_error(supported, requested) {
|
|
|
56398
56478
|
/**
|
|
56399
56479
|
* A uniquely identifying ID for a request in JSON-RPC.
|
|
56400
56480
|
*/
|
|
56401
|
-
const RequestIdSchema = /* @__PURE__ */ union([/* @__PURE__ */ string
|
|
56481
|
+
const RequestIdSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer())]);
|
|
56402
56482
|
/**
|
|
56403
56483
|
* The severity of a log message.
|
|
56404
56484
|
*/
|
|
@@ -56415,44 +56495,44 @@ const LoggingLevelSchema = /* @__PURE__ */ picklist([
|
|
|
56415
56495
|
/**
|
|
56416
56496
|
* A progress token, used to associate progress notifications with the original request.
|
|
56417
56497
|
*/
|
|
56418
|
-
const ProgressTokenSchema = /* @__PURE__ */ union([/* @__PURE__ */ string
|
|
56498
|
+
const ProgressTokenSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer())]);
|
|
56419
56499
|
/**
|
|
56420
56500
|
* An opaque token used to represent a cursor for pagination.
|
|
56421
56501
|
*/
|
|
56422
|
-
const CursorSchema = /* @__PURE__ */ string
|
|
56502
|
+
const CursorSchema = /* @__PURE__ */ string();
|
|
56423
56503
|
const RequestMetaSchema = /* @__PURE__ */ looseObject({
|
|
56424
56504
|
/**
|
|
56425
56505
|
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
56426
56506
|
*/
|
|
56427
|
-
progressToken: /* @__PURE__ */ optional
|
|
56428
|
-
const BaseRequestParamsSchema = /* @__PURE__ */ looseObject({ _meta: /* @__PURE__ */ optional
|
|
56429
|
-
const RequestSchema = /* @__PURE__ */ object
|
|
56430
|
-
method: /* @__PURE__ */ string
|
|
56431
|
-
params: /* @__PURE__ */ optional
|
|
56507
|
+
progressToken: /* @__PURE__ */ optional(ProgressTokenSchema) });
|
|
56508
|
+
const BaseRequestParamsSchema = /* @__PURE__ */ looseObject({ _meta: /* @__PURE__ */ optional(RequestMetaSchema) });
|
|
56509
|
+
const RequestSchema = /* @__PURE__ */ object({
|
|
56510
|
+
method: /* @__PURE__ */ string(),
|
|
56511
|
+
params: /* @__PURE__ */ optional(BaseRequestParamsSchema)
|
|
56432
56512
|
});
|
|
56433
56513
|
const NotificationMetaSchema = /* @__PURE__ */ looseObject({});
|
|
56434
|
-
const SubscriptionNotificationMetaSchema = /* @__PURE__ */ looseObject({ [SUBSCRIPTION_ID_META_KEY]: /* @__PURE__ */ optional
|
|
56514
|
+
const SubscriptionNotificationMetaSchema = /* @__PURE__ */ looseObject({ [SUBSCRIPTION_ID_META_KEY]: /* @__PURE__ */ optional(RequestIdSchema) });
|
|
56435
56515
|
const BaseNotificationParamsSchema = /* @__PURE__ */ looseObject({
|
|
56436
56516
|
/**
|
|
56437
56517
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
56438
56518
|
* for notes on _meta usage.
|
|
56439
56519
|
*/
|
|
56440
|
-
_meta: /* @__PURE__ */ optional
|
|
56441
|
-
const SubscriptionNotificationParamsSchema = /* @__PURE__ */ looseObject({ _meta: /* @__PURE__ */ optional
|
|
56442
|
-
const NotificationSchema = /* @__PURE__ */ object
|
|
56443
|
-
method: /* @__PURE__ */ string
|
|
56444
|
-
params: /* @__PURE__ */ optional
|
|
56520
|
+
_meta: /* @__PURE__ */ optional(NotificationMetaSchema) });
|
|
56521
|
+
const SubscriptionNotificationParamsSchema = /* @__PURE__ */ looseObject({ _meta: /* @__PURE__ */ optional(SubscriptionNotificationMetaSchema) });
|
|
56522
|
+
const NotificationSchema = /* @__PURE__ */ object({
|
|
56523
|
+
method: /* @__PURE__ */ string(),
|
|
56524
|
+
params: /* @__PURE__ */ optional(BaseNotificationParamsSchema)
|
|
56445
56525
|
});
|
|
56446
56526
|
const ResultSchema = /* @__PURE__ */ looseObject({
|
|
56447
56527
|
/**
|
|
56448
56528
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
56449
56529
|
* for notes on _meta usage.
|
|
56450
56530
|
*/
|
|
56451
|
-
_meta: /* @__PURE__ */ optional
|
|
56531
|
+
_meta: /* @__PURE__ */ optional(/* @__PURE__ */ looseObject({})) });
|
|
56452
56532
|
/**
|
|
56453
56533
|
* A request that expects a response.
|
|
56454
56534
|
*/
|
|
56455
|
-
const JSONRPCRequestSchema = /* @__PURE__ */ object
|
|
56535
|
+
const JSONRPCRequestSchema = /* @__PURE__ */ object({
|
|
56456
56536
|
jsonrpc: /* @__PURE__ */ literal("2.0"),
|
|
56457
56537
|
id: RequestIdSchema,
|
|
56458
56538
|
...RequestSchema.entries
|
|
@@ -56460,7 +56540,7 @@ const JSONRPCRequestSchema = /* @__PURE__ */ object$2({
|
|
|
56460
56540
|
/**
|
|
56461
56541
|
* A notification which does not expect a response.
|
|
56462
56542
|
*/
|
|
56463
|
-
const JSONRPCNotificationSchema = /* @__PURE__ */ object
|
|
56543
|
+
const JSONRPCNotificationSchema = /* @__PURE__ */ object({
|
|
56464
56544
|
jsonrpc: /* @__PURE__ */ literal("2.0"),
|
|
56465
56545
|
...NotificationSchema.entries
|
|
56466
56546
|
});
|
|
@@ -56478,19 +56558,19 @@ const JSONRPCResponseSchema = /* @__PURE__ */ strictObject({
|
|
|
56478
56558
|
const JSONRPCErrorSchema = /* @__PURE__ */ strictObject({
|
|
56479
56559
|
jsonrpc: /* @__PURE__ */ literal("2.0"),
|
|
56480
56560
|
id: RequestIdSchema,
|
|
56481
|
-
error: /* @__PURE__ */ object
|
|
56561
|
+
error: /* @__PURE__ */ object({
|
|
56482
56562
|
/**
|
|
56483
56563
|
* The error type that occurred.
|
|
56484
56564
|
*/
|
|
56485
|
-
code: /* @__PURE__ */ pipe
|
|
56565
|
+
code: /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer()),
|
|
56486
56566
|
/**
|
|
56487
56567
|
* A short description of the error. The message SHOULD be limited to a concise single sentence.
|
|
56488
56568
|
*/
|
|
56489
|
-
message: /* @__PURE__ */ string
|
|
56569
|
+
message: /* @__PURE__ */ string(),
|
|
56490
56570
|
/**
|
|
56491
56571
|
* Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
|
|
56492
56572
|
*/
|
|
56493
|
-
data: /* @__PURE__ */ optional
|
|
56573
|
+
data: /* @__PURE__ */ optional(/* @__PURE__ */ unknown())
|
|
56494
56574
|
})
|
|
56495
56575
|
});
|
|
56496
56576
|
({ ...ResultSchema.entries });
|
|
@@ -56503,10 +56583,10 @@ const JSONRPCErrorSchema = /* @__PURE__ */ strictObject({
|
|
|
56503
56583
|
*
|
|
56504
56584
|
* A client MUST NOT attempt to cancel its `initialize` request.
|
|
56505
56585
|
*/
|
|
56506
|
-
const CancelledNotificationSchema = /* @__PURE__ */ object
|
|
56586
|
+
const CancelledNotificationSchema = /* @__PURE__ */ object({
|
|
56507
56587
|
...NotificationSchema.entries,
|
|
56508
56588
|
method: /* @__PURE__ */ literal("notifications/cancelled"),
|
|
56509
|
-
params: /* @__PURE__ */ object
|
|
56589
|
+
params: /* @__PURE__ */ object({
|
|
56510
56590
|
...BaseNotificationParamsSchema.entries,
|
|
56511
56591
|
/**
|
|
56512
56592
|
* The ID of the request to cancel.
|
|
@@ -56517,15 +56597,15 @@ const CancelledNotificationSchema = /* @__PURE__ */ object$2({
|
|
|
56517
56597
|
/**
|
|
56518
56598
|
* An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
|
|
56519
56599
|
*/
|
|
56520
|
-
reason: /* @__PURE__ */ optional
|
|
56600
|
+
reason: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
56521
56601
|
})
|
|
56522
56602
|
});
|
|
56523
56603
|
/**
|
|
56524
56604
|
* Base metadata interface for common properties across resources, tools, prompts, and implementations.
|
|
56525
56605
|
*/
|
|
56526
|
-
const BaseMetadataSchema = /* @__PURE__ */ object
|
|
56606
|
+
const BaseMetadataSchema = /* @__PURE__ */ object({
|
|
56527
56607
|
/** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
|
|
56528
|
-
name: /* @__PURE__ */ string
|
|
56608
|
+
name: /* @__PURE__ */ string(),
|
|
56529
56609
|
/**
|
|
56530
56610
|
* Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
|
|
56531
56611
|
* even by those unfamiliar with domain-specific terminology.
|
|
@@ -56534,9 +56614,9 @@ const BaseMetadataSchema = /* @__PURE__ */ object$2({
|
|
|
56534
56614
|
* where `annotations.title` should be given precedence over using `name`,
|
|
56535
56615
|
* if present).
|
|
56536
56616
|
*/
|
|
56537
|
-
title: /* @__PURE__ */ optional
|
|
56617
|
+
title: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
56538
56618
|
});
|
|
56539
|
-
const IconsSchema = /* @__PURE__ */ object
|
|
56619
|
+
const IconsSchema = /* @__PURE__ */ object({
|
|
56540
56620
|
/**
|
|
56541
56621
|
* Optional set of sized icons that the client can display in a user interface.
|
|
56542
56622
|
*
|
|
@@ -56548,30 +56628,30 @@ const IconsSchema = /* @__PURE__ */ object$2({
|
|
|
56548
56628
|
* - `image/svg+xml` - SVG images (scalable but requires security precautions)
|
|
56549
56629
|
* - `image/webp` - WebP images (modern, efficient format)
|
|
56550
56630
|
*/
|
|
56551
|
-
icons: /* @__PURE__ */ optional
|
|
56631
|
+
icons: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ object({
|
|
56552
56632
|
/**
|
|
56553
56633
|
* URL or data URI for the icon.
|
|
56554
56634
|
*/
|
|
56555
|
-
src: /* @__PURE__ */ string
|
|
56635
|
+
src: /* @__PURE__ */ string(),
|
|
56556
56636
|
/**
|
|
56557
56637
|
* Optional MIME type for the icon.
|
|
56558
56638
|
*/
|
|
56559
|
-
mimeType: /* @__PURE__ */ optional
|
|
56639
|
+
mimeType: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
56560
56640
|
/**
|
|
56561
56641
|
* Optional array of strings that specify sizes at which the icon can be used.
|
|
56562
56642
|
* Each string should be in WxH format (e.g., `"48x48"`, `"96x96"`) or `"any"` for scalable formats like SVG.
|
|
56563
56643
|
*
|
|
56564
56644
|
* If not provided, the client should assume that the icon can be used at any size.
|
|
56565
56645
|
*/
|
|
56566
|
-
sizes: /* @__PURE__ */ optional
|
|
56646
|
+
sizes: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string()))
|
|
56567
56647
|
}))) });
|
|
56568
56648
|
/**
|
|
56569
56649
|
* Describes the name and version of an MCP implementation.
|
|
56570
56650
|
*/
|
|
56571
|
-
const ImplementationSchema = /* @__PURE__ */ object
|
|
56651
|
+
const ImplementationSchema = /* @__PURE__ */ object({
|
|
56572
56652
|
...BaseMetadataSchema.entries,
|
|
56573
|
-
version: /* @__PURE__ */ string
|
|
56574
|
-
websiteUrl: /* @__PURE__ */ optional
|
|
56653
|
+
version: /* @__PURE__ */ string(),
|
|
56654
|
+
websiteUrl: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
56575
56655
|
...IconsSchema.entries
|
|
56576
56656
|
});
|
|
56577
56657
|
/**
|
|
@@ -56581,40 +56661,40 @@ const ClientCapabilitiesSchema = /* @__PURE__ */ looseObject({
|
|
|
56581
56661
|
/**
|
|
56582
56662
|
* Experimental, non-standard capabilities that the client supports.
|
|
56583
56663
|
*/
|
|
56584
|
-
experimental: /* @__PURE__ */ optional
|
|
56664
|
+
experimental: /* @__PURE__ */ optional(/* @__PURE__ */ looseObject({})),
|
|
56585
56665
|
/**
|
|
56586
56666
|
* Present if the client supports sampling from an LLM.
|
|
56587
56667
|
* @deprecated in the per-request (2026-07-28) protocol; still fully supported for session-negotiated clients.
|
|
56588
56668
|
*/
|
|
56589
|
-
sampling: /* @__PURE__ */ optional
|
|
56669
|
+
sampling: /* @__PURE__ */ optional(/* @__PURE__ */ looseObject({})),
|
|
56590
56670
|
/**
|
|
56591
56671
|
* Present if the client supports eliciting user input.
|
|
56592
56672
|
* Accepts both the legacy bare `{}` shape and the modern `{ form?, url? }` sub-shapes.
|
|
56593
56673
|
*/
|
|
56594
|
-
elicitation: /* @__PURE__ */ optional
|
|
56595
|
-
form: /* @__PURE__ */ optional
|
|
56596
|
-
url: /* @__PURE__ */ optional
|
|
56674
|
+
elicitation: /* @__PURE__ */ optional(/* @__PURE__ */ looseObject({
|
|
56675
|
+
form: /* @__PURE__ */ optional(/* @__PURE__ */ looseObject({})),
|
|
56676
|
+
url: /* @__PURE__ */ optional(/* @__PURE__ */ looseObject({}))
|
|
56597
56677
|
})),
|
|
56598
56678
|
/**
|
|
56599
56679
|
* Extensions supported by the client, keyed by prefixed extension identifier.
|
|
56600
56680
|
*/
|
|
56601
|
-
extensions: /* @__PURE__ */ optional
|
|
56681
|
+
extensions: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ looseObject({}))),
|
|
56602
56682
|
/**
|
|
56603
56683
|
* Present if the client supports listing roots.
|
|
56604
56684
|
* @deprecated in the per-request (2026-07-28) protocol; still fully supported for session-negotiated clients.
|
|
56605
56685
|
*/
|
|
56606
|
-
roots: /* @__PURE__ */ optional
|
|
56686
|
+
roots: /* @__PURE__ */ optional(/* @__PURE__ */ looseObject({
|
|
56607
56687
|
/**
|
|
56608
56688
|
* Whether the client supports issuing notifications for changes to the roots list.
|
|
56609
56689
|
*/
|
|
56610
|
-
listChanged: /* @__PURE__ */ optional
|
|
56690
|
+
listChanged: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()) }))
|
|
56611
56691
|
});
|
|
56612
|
-
const InitializeRequestParamsSchema = /* @__PURE__ */ object
|
|
56692
|
+
const InitializeRequestParamsSchema = /* @__PURE__ */ object({
|
|
56613
56693
|
...BaseRequestParamsSchema.entries,
|
|
56614
56694
|
/**
|
|
56615
56695
|
* The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
|
|
56616
56696
|
*/
|
|
56617
|
-
protocolVersion: /* @__PURE__ */ string
|
|
56697
|
+
protocolVersion: /* @__PURE__ */ string(),
|
|
56618
56698
|
capabilities: ClientCapabilitiesSchema,
|
|
56619
56699
|
clientInfo: ImplementationSchema
|
|
56620
56700
|
});
|
|
@@ -56625,7 +56705,7 @@ const InitializeRequestParamsSchema = /* @__PURE__ */ object$2({
|
|
|
56625
56705
|
({ ...ResultSchema.entries });
|
|
56626
56706
|
({ ...NotificationSchema.entries });
|
|
56627
56707
|
({ ...RequestSchema.entries });
|
|
56628
|
-
const ProgressSchema = /* @__PURE__ */ object
|
|
56708
|
+
const ProgressSchema = /* @__PURE__ */ object({
|
|
56629
56709
|
/**
|
|
56630
56710
|
* The progress thus far. This should increase every time progress is made, even if the total is unknown.
|
|
56631
56711
|
*/
|
|
@@ -56633,11 +56713,11 @@ const ProgressSchema = /* @__PURE__ */ object$2({
|
|
|
56633
56713
|
/**
|
|
56634
56714
|
* Total number of items to process (or total progress required), if known.
|
|
56635
56715
|
*/
|
|
56636
|
-
total: /* @__PURE__ */ optional
|
|
56716
|
+
total: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
56637
56717
|
/**
|
|
56638
56718
|
* An optional message describing the current progress.
|
|
56639
56719
|
*/
|
|
56640
|
-
message: /* @__PURE__ */ optional
|
|
56720
|
+
message: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
56641
56721
|
});
|
|
56642
56722
|
({ ...NotificationSchema.entries }), (
|
|
56643
56723
|
/**
|
|
@@ -56647,81 +56727,81 @@ const ProgressSchema = /* @__PURE__ */ object$2({
|
|
|
56647
56727
|
...BaseNotificationParamsSchema.entries,
|
|
56648
56728
|
...ProgressSchema.entries
|
|
56649
56729
|
});
|
|
56650
|
-
const PaginatedRequestSchema = /* @__PURE__ */ object
|
|
56730
|
+
const PaginatedRequestSchema = /* @__PURE__ */ object({
|
|
56651
56731
|
...RequestSchema.entries,
|
|
56652
|
-
params: /* @__PURE__ */ optional
|
|
56732
|
+
params: /* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
56653
56733
|
...BaseRequestParamsSchema.entries,
|
|
56654
56734
|
/**
|
|
56655
56735
|
* An opaque token representing the current pagination position.
|
|
56656
56736
|
* If provided, the server should return results starting after this cursor.
|
|
56657
56737
|
*/
|
|
56658
|
-
cursor: /* @__PURE__ */ optional
|
|
56738
|
+
cursor: /* @__PURE__ */ optional(CursorSchema)
|
|
56659
56739
|
}))
|
|
56660
56740
|
});
|
|
56661
|
-
const PaginatedResultSchema = /* @__PURE__ */ object
|
|
56741
|
+
const PaginatedResultSchema = /* @__PURE__ */ object({
|
|
56662
56742
|
...ResultSchema.entries,
|
|
56663
56743
|
/**
|
|
56664
56744
|
* An opaque token representing the pagination position after the last returned result.
|
|
56665
56745
|
* If present, there may be more results available.
|
|
56666
56746
|
*/
|
|
56667
|
-
nextCursor: /* @__PURE__ */ optional
|
|
56747
|
+
nextCursor: /* @__PURE__ */ optional(CursorSchema)
|
|
56668
56748
|
});
|
|
56669
56749
|
/**
|
|
56670
56750
|
* The contents of a specific resource or sub-resource.
|
|
56671
56751
|
*/
|
|
56672
|
-
const ResourceContentsSchema = /* @__PURE__ */ object
|
|
56752
|
+
const ResourceContentsSchema = /* @__PURE__ */ object({
|
|
56673
56753
|
/**
|
|
56674
56754
|
* The URI of this resource.
|
|
56675
56755
|
*/
|
|
56676
|
-
uri: /* @__PURE__ */ string
|
|
56756
|
+
uri: /* @__PURE__ */ string(),
|
|
56677
56757
|
/**
|
|
56678
56758
|
* The MIME type of this resource, if known.
|
|
56679
56759
|
*/
|
|
56680
|
-
mimeType: /* @__PURE__ */ optional
|
|
56760
|
+
mimeType: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
56681
56761
|
/**
|
|
56682
56762
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
56683
56763
|
* for notes on _meta usage.
|
|
56684
56764
|
*/
|
|
56685
|
-
_meta: /* @__PURE__ */ optional
|
|
56765
|
+
_meta: /* @__PURE__ */ optional(/* @__PURE__ */ looseObject({}))
|
|
56686
56766
|
});
|
|
56687
|
-
const TextResourceContentsSchema = /* @__PURE__ */ object
|
|
56767
|
+
const TextResourceContentsSchema = /* @__PURE__ */ object({
|
|
56688
56768
|
...ResourceContentsSchema.entries,
|
|
56689
56769
|
/**
|
|
56690
56770
|
* The text of the item. This must only be set if the item can actually be represented as text (not binary data).
|
|
56691
56771
|
*/
|
|
56692
|
-
text: /* @__PURE__ */ string
|
|
56772
|
+
text: /* @__PURE__ */ string()
|
|
56693
56773
|
});
|
|
56694
|
-
const BlobResourceContentsSchema = /* @__PURE__ */ object
|
|
56774
|
+
const BlobResourceContentsSchema = /* @__PURE__ */ object({
|
|
56695
56775
|
...ResourceContentsSchema.entries,
|
|
56696
56776
|
/**
|
|
56697
56777
|
* A base64-encoded string representing the binary data of the item.
|
|
56698
56778
|
*/
|
|
56699
|
-
blob: /* @__PURE__ */ pipe
|
|
56779
|
+
blob: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ base64())
|
|
56700
56780
|
});
|
|
56701
56781
|
/**
|
|
56702
56782
|
* A known resource that the server is capable of reading.
|
|
56703
56783
|
*/
|
|
56704
|
-
const ResourceSchema = /* @__PURE__ */ object
|
|
56784
|
+
const ResourceSchema = /* @__PURE__ */ object({
|
|
56705
56785
|
...BaseMetadataSchema.entries,
|
|
56706
56786
|
/**
|
|
56707
56787
|
* The URI of this resource.
|
|
56708
56788
|
*/
|
|
56709
|
-
uri: /* @__PURE__ */ string
|
|
56789
|
+
uri: /* @__PURE__ */ string(),
|
|
56710
56790
|
/**
|
|
56711
56791
|
* A description of what this resource represents.
|
|
56712
56792
|
*
|
|
56713
56793
|
* This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
|
|
56714
56794
|
*/
|
|
56715
|
-
description: /* @__PURE__ */ optional
|
|
56795
|
+
description: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
56716
56796
|
/**
|
|
56717
56797
|
* The MIME type of this resource, if known.
|
|
56718
56798
|
*/
|
|
56719
|
-
mimeType: /* @__PURE__ */ optional
|
|
56799
|
+
mimeType: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
56720
56800
|
/**
|
|
56721
56801
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
56722
56802
|
* for notes on _meta usage.
|
|
56723
56803
|
*/
|
|
56724
|
-
_meta: /* @__PURE__ */ optional
|
|
56804
|
+
_meta: /* @__PURE__ */ optional(/* @__PURE__ */ looseObject({})),
|
|
56725
56805
|
...IconsSchema.entries
|
|
56726
56806
|
});
|
|
56727
56807
|
(
|
|
@@ -56750,23 +56830,23 @@ const ReadResourceResultSchema = /* @__PURE__ */ looseObject({
|
|
|
56750
56830
|
* Notification types requested on a per-request subscription stream. Every field
|
|
56751
56831
|
* is opt-in.
|
|
56752
56832
|
*/
|
|
56753
|
-
const SubscriptionFilterSchema = /* @__PURE__ */ object
|
|
56754
|
-
toolsListChanged: /* @__PURE__ */ optional
|
|
56755
|
-
promptsListChanged: /* @__PURE__ */ optional
|
|
56756
|
-
resourcesListChanged: /* @__PURE__ */ optional
|
|
56757
|
-
resourceSubscriptions: /* @__PURE__ */ optional
|
|
56833
|
+
const SubscriptionFilterSchema = /* @__PURE__ */ object({
|
|
56834
|
+
toolsListChanged: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
56835
|
+
promptsListChanged: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
56836
|
+
resourcesListChanged: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
56837
|
+
resourceSubscriptions: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string()))
|
|
56758
56838
|
});
|
|
56759
56839
|
const PerRequestMetaSchema = /* @__PURE__ */ looseObject({
|
|
56760
56840
|
...RequestMetaSchema.entries,
|
|
56761
|
-
"io.modelcontextprotocol/protocolVersion": /* @__PURE__ */ string
|
|
56841
|
+
"io.modelcontextprotocol/protocolVersion": /* @__PURE__ */ string(),
|
|
56762
56842
|
"io.modelcontextprotocol/clientCapabilities": ClientCapabilitiesSchema,
|
|
56763
|
-
"io.modelcontextprotocol/clientInfo": /* @__PURE__ */ optional
|
|
56764
|
-
"io.modelcontextprotocol/logLevel": /* @__PURE__ */ optional
|
|
56843
|
+
"io.modelcontextprotocol/clientInfo": /* @__PURE__ */ optional(ImplementationSchema),
|
|
56844
|
+
"io.modelcontextprotocol/logLevel": /* @__PURE__ */ optional(LoggingLevelSchema)
|
|
56765
56845
|
});
|
|
56766
56846
|
/**
|
|
56767
56847
|
* Open a long-lived stream for server notifications.
|
|
56768
56848
|
*/
|
|
56769
|
-
const SubscriptionsListenRequestParamsSchema = /* @__PURE__ */ object
|
|
56849
|
+
const SubscriptionsListenRequestParamsSchema = /* @__PURE__ */ object({
|
|
56770
56850
|
...BaseRequestParamsSchema.entries,
|
|
56771
56851
|
_meta: PerRequestMetaSchema,
|
|
56772
56852
|
notifications: SubscriptionFilterSchema
|
|
@@ -56804,67 +56884,67 @@ const SubscriptionsListenRequestParamsSchema = /* @__PURE__ */ object$2({
|
|
|
56804
56884
|
/**
|
|
56805
56885
|
* Text provided to or from an LLM.
|
|
56806
56886
|
*/
|
|
56807
|
-
const TextContentSchema = /* @__PURE__ */ object
|
|
56887
|
+
const TextContentSchema = /* @__PURE__ */ object({
|
|
56808
56888
|
type: /* @__PURE__ */ literal("text"),
|
|
56809
56889
|
/**
|
|
56810
56890
|
* The text content of the message.
|
|
56811
56891
|
*/
|
|
56812
|
-
text: /* @__PURE__ */ string
|
|
56892
|
+
text: /* @__PURE__ */ string(),
|
|
56813
56893
|
/**
|
|
56814
56894
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
56815
56895
|
* for notes on _meta usage.
|
|
56816
56896
|
*/
|
|
56817
|
-
_meta: /* @__PURE__ */ optional
|
|
56897
|
+
_meta: /* @__PURE__ */ optional(/* @__PURE__ */ looseObject({}))
|
|
56818
56898
|
});
|
|
56819
56899
|
/**
|
|
56820
56900
|
* An image provided to or from an LLM.
|
|
56821
56901
|
*/
|
|
56822
|
-
const ImageContentSchema = /* @__PURE__ */ object
|
|
56902
|
+
const ImageContentSchema = /* @__PURE__ */ object({
|
|
56823
56903
|
type: /* @__PURE__ */ literal("image"),
|
|
56824
56904
|
/**
|
|
56825
56905
|
* The base64-encoded image data.
|
|
56826
56906
|
*/
|
|
56827
|
-
data: /* @__PURE__ */ pipe
|
|
56907
|
+
data: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ base64()),
|
|
56828
56908
|
/**
|
|
56829
56909
|
* The MIME type of the image. Different providers may support different image types.
|
|
56830
56910
|
*/
|
|
56831
|
-
mimeType: /* @__PURE__ */ string
|
|
56911
|
+
mimeType: /* @__PURE__ */ string(),
|
|
56832
56912
|
/**
|
|
56833
56913
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
56834
56914
|
* for notes on _meta usage.
|
|
56835
56915
|
*/
|
|
56836
|
-
_meta: /* @__PURE__ */ optional
|
|
56916
|
+
_meta: /* @__PURE__ */ optional(/* @__PURE__ */ looseObject({}))
|
|
56837
56917
|
});
|
|
56838
56918
|
/**
|
|
56839
56919
|
* An Audio provided to or from an LLM.
|
|
56840
56920
|
*/
|
|
56841
|
-
const AudioContentSchema = /* @__PURE__ */ object
|
|
56921
|
+
const AudioContentSchema = /* @__PURE__ */ object({
|
|
56842
56922
|
type: /* @__PURE__ */ literal("audio"),
|
|
56843
56923
|
/**
|
|
56844
56924
|
* The base64-encoded audio data.
|
|
56845
56925
|
*/
|
|
56846
|
-
data: /* @__PURE__ */ pipe
|
|
56926
|
+
data: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ base64()),
|
|
56847
56927
|
/**
|
|
56848
56928
|
* The MIME type of the audio. Different providers may support different audio types.
|
|
56849
56929
|
*/
|
|
56850
|
-
mimeType: /* @__PURE__ */ string
|
|
56930
|
+
mimeType: /* @__PURE__ */ string(),
|
|
56851
56931
|
/**
|
|
56852
56932
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
56853
56933
|
* for notes on _meta usage.
|
|
56854
56934
|
*/
|
|
56855
|
-
_meta: /* @__PURE__ */ optional
|
|
56935
|
+
_meta: /* @__PURE__ */ optional(/* @__PURE__ */ looseObject({}))
|
|
56856
56936
|
});
|
|
56857
56937
|
/**
|
|
56858
56938
|
* The contents of a resource, embedded into a prompt or tool call result.
|
|
56859
56939
|
*/
|
|
56860
|
-
const EmbeddedResourceSchema = /* @__PURE__ */ object
|
|
56940
|
+
const EmbeddedResourceSchema = /* @__PURE__ */ object({
|
|
56861
56941
|
type: /* @__PURE__ */ literal("resource"),
|
|
56862
56942
|
resource: /* @__PURE__ */ union([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
56863
56943
|
/**
|
|
56864
56944
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
56865
56945
|
* for notes on _meta usage.
|
|
56866
56946
|
*/
|
|
56867
|
-
_meta: /* @__PURE__ */ optional
|
|
56947
|
+
_meta: /* @__PURE__ */ optional(/* @__PURE__ */ looseObject({}))
|
|
56868
56948
|
});
|
|
56869
56949
|
/**
|
|
56870
56950
|
* A content block that can be used in prompts and tool results.
|
|
@@ -56873,7 +56953,7 @@ const ContentBlockSchema = /* @__PURE__ */ union([
|
|
|
56873
56953
|
TextContentSchema,
|
|
56874
56954
|
ImageContentSchema,
|
|
56875
56955
|
AudioContentSchema,
|
|
56876
|
-
/* @__PURE__ */ object
|
|
56956
|
+
/* @__PURE__ */ object({
|
|
56877
56957
|
...ResourceSchema.entries,
|
|
56878
56958
|
type: /* @__PURE__ */ literal("resource_link")
|
|
56879
56959
|
}),
|
|
@@ -56882,7 +56962,7 @@ const ContentBlockSchema = /* @__PURE__ */ union([
|
|
|
56882
56962
|
/**
|
|
56883
56963
|
* Describes a message returned as part of a prompt.
|
|
56884
56964
|
*/
|
|
56885
|
-
const PromptMessageSchema = /* @__PURE__ */ object
|
|
56965
|
+
const PromptMessageSchema = /* @__PURE__ */ object({
|
|
56886
56966
|
role: /* @__PURE__ */ picklist(["user", "assistant"]),
|
|
56887
56967
|
content: ContentBlockSchema
|
|
56888
56968
|
});
|
|
@@ -56894,7 +56974,7 @@ const GetPromptResultSchema = /* @__PURE__ */ looseObject({
|
|
|
56894
56974
|
/**
|
|
56895
56975
|
* An optional description for the prompt.
|
|
56896
56976
|
*/
|
|
56897
|
-
description: /* @__PURE__ */ optional
|
|
56977
|
+
description: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
56898
56978
|
messages: /* @__PURE__ */ array(PromptMessageSchema)
|
|
56899
56979
|
});
|
|
56900
56980
|
({ ...NotificationSchema.entries });
|
|
@@ -56916,13 +56996,13 @@ const CallToolResultSchema = /* @__PURE__ */ looseObject({
|
|
|
56916
56996
|
* If the Tool does not define an outputSchema, this field MUST be present in the result.
|
|
56917
56997
|
* For backwards compatibility, this field is always present, but it may be empty.
|
|
56918
56998
|
*/
|
|
56919
|
-
content: /* @__PURE__ */ optional
|
|
56999
|
+
content: /* @__PURE__ */ optional(/* @__PURE__ */ array(ContentBlockSchema), []),
|
|
56920
57000
|
/**
|
|
56921
57001
|
* Structured tool output. May be ANY JSON value, not only objects.
|
|
56922
57002
|
*
|
|
56923
57003
|
* If the Tool defines an outputSchema, this field MUST be present in the result and match the schema.
|
|
56924
57004
|
*/
|
|
56925
|
-
structuredContent: /* @__PURE__ */ optional
|
|
57005
|
+
structuredContent: /* @__PURE__ */ optional(/* @__PURE__ */ unknown()),
|
|
56926
57006
|
/**
|
|
56927
57007
|
* Whether the tool call ended in an error.
|
|
56928
57008
|
*
|
|
@@ -56937,7 +57017,7 @@ const CallToolResultSchema = /* @__PURE__ */ looseObject({
|
|
|
56937
57017
|
* server does not support tool calls, or any other exceptional conditions,
|
|
56938
57018
|
* should be reported as an MCP error response.
|
|
56939
57019
|
*/
|
|
56940
|
-
isError: /* @__PURE__ */ optional
|
|
57020
|
+
isError: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
56941
57021
|
});
|
|
56942
57022
|
({ ...ResultSchema.entries });
|
|
56943
57023
|
({ ...RequestSchema.entries }), { ...BaseRequestParamsSchema.entries };
|
|
@@ -56955,32 +57035,32 @@ const CallToolResultSchema = /* @__PURE__ */ looseObject({
|
|
|
56955
57035
|
/**
|
|
56956
57036
|
* The server's preferences for model selection, requested of the client during sampling.
|
|
56957
57037
|
*/
|
|
56958
|
-
const ModelPreferencesSchema = /* @__PURE__ */ object
|
|
57038
|
+
const ModelPreferencesSchema = /* @__PURE__ */ object({
|
|
56959
57039
|
/**
|
|
56960
57040
|
* Optional hints to use for model selection.
|
|
56961
57041
|
*/
|
|
56962
|
-
hints: /* @__PURE__ */ optional
|
|
57042
|
+
hints: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ object({
|
|
56963
57043
|
/**
|
|
56964
57044
|
* A hint for a model name.
|
|
56965
57045
|
*/
|
|
56966
|
-
name: /* @__PURE__ */ optional
|
|
57046
|
+
name: /* @__PURE__ */ optional(/* @__PURE__ */ string()) }))),
|
|
56967
57047
|
/**
|
|
56968
57048
|
* How much to prioritize cost when selecting a model.
|
|
56969
57049
|
*/
|
|
56970
|
-
costPriority: /* @__PURE__ */ optional
|
|
57050
|
+
costPriority: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ minValue(0), /* @__PURE__ */ maxValue(1))),
|
|
56971
57051
|
/**
|
|
56972
57052
|
* How much to prioritize sampling speed (latency) when selecting a model.
|
|
56973
57053
|
*/
|
|
56974
|
-
speedPriority: /* @__PURE__ */ optional
|
|
57054
|
+
speedPriority: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ minValue(0), /* @__PURE__ */ maxValue(1))),
|
|
56975
57055
|
/**
|
|
56976
57056
|
* How much to prioritize intelligence and capabilities when selecting a model.
|
|
56977
57057
|
*/
|
|
56978
|
-
intelligencePriority: /* @__PURE__ */ optional
|
|
57058
|
+
intelligencePriority: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ minValue(0), /* @__PURE__ */ maxValue(1)))
|
|
56979
57059
|
});
|
|
56980
57060
|
/**
|
|
56981
57061
|
* Describes a message issued to or received from an LLM API.
|
|
56982
57062
|
*/
|
|
56983
|
-
const SamplingMessageSchema = /* @__PURE__ */ object
|
|
57063
|
+
const SamplingMessageSchema = /* @__PURE__ */ object({
|
|
56984
57064
|
role: /* @__PURE__ */ picklist(["user", "assistant"]),
|
|
56985
57065
|
content: /* @__PURE__ */ union([
|
|
56986
57066
|
TextContentSchema,
|
|
@@ -56988,54 +57068,54 @@ const SamplingMessageSchema = /* @__PURE__ */ object$2({
|
|
|
56988
57068
|
AudioContentSchema
|
|
56989
57069
|
])
|
|
56990
57070
|
});
|
|
56991
|
-
const CreateMessageRequestParamsSchema = /* @__PURE__ */ object
|
|
57071
|
+
const CreateMessageRequestParamsSchema = /* @__PURE__ */ object({
|
|
56992
57072
|
...BaseRequestParamsSchema.entries,
|
|
56993
57073
|
messages: /* @__PURE__ */ array(SamplingMessageSchema),
|
|
56994
57074
|
/**
|
|
56995
57075
|
* An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
|
|
56996
57076
|
*/
|
|
56997
|
-
systemPrompt: /* @__PURE__ */ optional
|
|
57077
|
+
systemPrompt: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
56998
57078
|
/**
|
|
56999
57079
|
* A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
|
|
57000
57080
|
*/
|
|
57001
|
-
includeContext: /* @__PURE__ */ optional
|
|
57081
|
+
includeContext: /* @__PURE__ */ optional(/* @__PURE__ */ picklist([
|
|
57002
57082
|
"none",
|
|
57003
57083
|
"thisServer",
|
|
57004
57084
|
"allServers"
|
|
57005
57085
|
])),
|
|
57006
|
-
temperature: /* @__PURE__ */ optional
|
|
57086
|
+
temperature: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
57007
57087
|
/**
|
|
57008
57088
|
* The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested.
|
|
57009
57089
|
*/
|
|
57010
|
-
maxTokens: /* @__PURE__ */ pipe
|
|
57011
|
-
stopSequences: /* @__PURE__ */ optional
|
|
57090
|
+
maxTokens: /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer()),
|
|
57091
|
+
stopSequences: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
57012
57092
|
/**
|
|
57013
57093
|
* Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
|
|
57014
57094
|
*/
|
|
57015
|
-
metadata: /* @__PURE__ */ optional
|
|
57095
|
+
metadata: /* @__PURE__ */ optional(/* @__PURE__ */ object({})),
|
|
57016
57096
|
/**
|
|
57017
57097
|
* The server's preferences for which model to select.
|
|
57018
57098
|
*/
|
|
57019
|
-
modelPreferences: /* @__PURE__ */ optional
|
|
57099
|
+
modelPreferences: /* @__PURE__ */ optional(ModelPreferencesSchema)
|
|
57020
57100
|
});
|
|
57021
57101
|
({ ...RequestSchema.entries });
|
|
57022
57102
|
/**
|
|
57023
57103
|
* The client's response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it.
|
|
57024
57104
|
*/
|
|
57025
|
-
const CreateMessageResultSchema = /* @__PURE__ */ object
|
|
57105
|
+
const CreateMessageResultSchema = /* @__PURE__ */ object({
|
|
57026
57106
|
...ResultSchema.entries,
|
|
57027
57107
|
/**
|
|
57028
57108
|
* The name of the model that generated the message.
|
|
57029
57109
|
*/
|
|
57030
|
-
model: /* @__PURE__ */ string
|
|
57110
|
+
model: /* @__PURE__ */ string(),
|
|
57031
57111
|
/**
|
|
57032
57112
|
* The reason why sampling stopped.
|
|
57033
57113
|
*/
|
|
57034
|
-
stopReason: /* @__PURE__ */ optional
|
|
57114
|
+
stopReason: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ picklist([
|
|
57035
57115
|
"endTurn",
|
|
57036
57116
|
"stopSequence",
|
|
57037
57117
|
"maxTokens"
|
|
57038
|
-
]), /* @__PURE__ */ string
|
|
57118
|
+
]), /* @__PURE__ */ string()])),
|
|
57039
57119
|
role: /* @__PURE__ */ picklist(["user", "assistant"]),
|
|
57040
57120
|
content: /* @__PURE__ */ variant("type", [
|
|
57041
57121
|
TextContentSchema,
|
|
@@ -57046,46 +57126,46 @@ const CreateMessageResultSchema = /* @__PURE__ */ object$2({
|
|
|
57046
57126
|
/**
|
|
57047
57127
|
* Primitive schema definition for boolean fields.
|
|
57048
57128
|
*/
|
|
57049
|
-
const BooleanSchemaSchema = /* @__PURE__ */ object
|
|
57129
|
+
const BooleanSchemaSchema = /* @__PURE__ */ object({
|
|
57050
57130
|
type: /* @__PURE__ */ literal("boolean"),
|
|
57051
|
-
title: /* @__PURE__ */ optional
|
|
57052
|
-
description: /* @__PURE__ */ optional
|
|
57053
|
-
default: /* @__PURE__ */ optional
|
|
57131
|
+
title: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57132
|
+
description: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57133
|
+
default: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
57054
57134
|
});
|
|
57055
57135
|
/**
|
|
57056
57136
|
* Primitive schema definition for string fields.
|
|
57057
57137
|
*/
|
|
57058
|
-
const StringSchemaSchema = /* @__PURE__ */ object
|
|
57138
|
+
const StringSchemaSchema = /* @__PURE__ */ object({
|
|
57059
57139
|
type: /* @__PURE__ */ literal("string"),
|
|
57060
|
-
title: /* @__PURE__ */ optional
|
|
57061
|
-
description: /* @__PURE__ */ optional
|
|
57062
|
-
minLength: /* @__PURE__ */ optional
|
|
57063
|
-
maxLength: /* @__PURE__ */ optional
|
|
57064
|
-
format: /* @__PURE__ */ optional
|
|
57140
|
+
title: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57141
|
+
description: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57142
|
+
minLength: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
57143
|
+
maxLength: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
57144
|
+
format: /* @__PURE__ */ optional(/* @__PURE__ */ picklist([
|
|
57065
57145
|
"email",
|
|
57066
57146
|
"uri",
|
|
57067
57147
|
"date",
|
|
57068
57148
|
"date-time"
|
|
57069
57149
|
])),
|
|
57070
|
-
default: /* @__PURE__ */ optional
|
|
57150
|
+
default: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
57071
57151
|
});
|
|
57072
57152
|
/**
|
|
57073
57153
|
* Primitive schema definition for number fields.
|
|
57074
57154
|
*/
|
|
57075
|
-
const NumberSchemaSchema = /* @__PURE__ */ object
|
|
57155
|
+
const NumberSchemaSchema = /* @__PURE__ */ object({
|
|
57076
57156
|
type: /* @__PURE__ */ picklist(["number", "integer"]),
|
|
57077
|
-
title: /* @__PURE__ */ optional
|
|
57078
|
-
description: /* @__PURE__ */ optional
|
|
57079
|
-
minimum: /* @__PURE__ */ optional
|
|
57080
|
-
maximum: /* @__PURE__ */ optional
|
|
57081
|
-
default: /* @__PURE__ */ optional
|
|
57157
|
+
title: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57158
|
+
description: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57159
|
+
minimum: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
57160
|
+
maximum: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
57161
|
+
default: /* @__PURE__ */ optional(/* @__PURE__ */ number())
|
|
57082
57162
|
});
|
|
57083
57163
|
/**
|
|
57084
57164
|
* An enum option with a wire value and a display title.
|
|
57085
57165
|
*/
|
|
57086
|
-
const TitledEnumOptionSchema = /* @__PURE__ */ object
|
|
57087
|
-
const: /* @__PURE__ */ string
|
|
57088
|
-
title: /* @__PURE__ */ string
|
|
57166
|
+
const TitledEnumOptionSchema = /* @__PURE__ */ object({
|
|
57167
|
+
const: /* @__PURE__ */ string(),
|
|
57168
|
+
title: /* @__PURE__ */ string()
|
|
57089
57169
|
});
|
|
57090
57170
|
/**
|
|
57091
57171
|
* Union of all primitive schema definitions.
|
|
@@ -57094,48 +57174,48 @@ const PrimitiveSchemaDefinitionSchema = /* @__PURE__ */ union([
|
|
|
57094
57174
|
BooleanSchemaSchema,
|
|
57095
57175
|
NumberSchemaSchema,
|
|
57096
57176
|
/* @__PURE__ */ union([
|
|
57097
|
-
/* @__PURE__ */ object
|
|
57177
|
+
/* @__PURE__ */ object({
|
|
57098
57178
|
type: /* @__PURE__ */ literal("string"),
|
|
57099
|
-
title: /* @__PURE__ */ optional
|
|
57100
|
-
description: /* @__PURE__ */ optional
|
|
57101
|
-
enum: /* @__PURE__ */ array(/* @__PURE__ */ string
|
|
57102
|
-
enumNames: /* @__PURE__ */ optional
|
|
57103
|
-
default: /* @__PURE__ */ optional
|
|
57179
|
+
title: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57180
|
+
description: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57181
|
+
enum: /* @__PURE__ */ array(/* @__PURE__ */ string()),
|
|
57182
|
+
enumNames: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
57183
|
+
default: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
57104
57184
|
}),
|
|
57105
|
-
/* @__PURE__ */ object
|
|
57185
|
+
/* @__PURE__ */ object({
|
|
57106
57186
|
type: /* @__PURE__ */ literal("string"),
|
|
57107
|
-
title: /* @__PURE__ */ optional
|
|
57108
|
-
description: /* @__PURE__ */ optional
|
|
57109
|
-
enum: /* @__PURE__ */ array(/* @__PURE__ */ string
|
|
57110
|
-
default: /* @__PURE__ */ optional
|
|
57187
|
+
title: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57188
|
+
description: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57189
|
+
enum: /* @__PURE__ */ array(/* @__PURE__ */ string()),
|
|
57190
|
+
default: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
57111
57191
|
}),
|
|
57112
|
-
/* @__PURE__ */ object
|
|
57192
|
+
/* @__PURE__ */ object({
|
|
57113
57193
|
type: /* @__PURE__ */ literal("string"),
|
|
57114
|
-
title: /* @__PURE__ */ optional
|
|
57115
|
-
description: /* @__PURE__ */ optional
|
|
57194
|
+
title: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57195
|
+
description: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57116
57196
|
oneOf: /* @__PURE__ */ array(TitledEnumOptionSchema),
|
|
57117
|
-
default: /* @__PURE__ */ optional
|
|
57197
|
+
default: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
57118
57198
|
}),
|
|
57119
|
-
/* @__PURE__ */ object
|
|
57199
|
+
/* @__PURE__ */ object({
|
|
57120
57200
|
type: /* @__PURE__ */ literal("array"),
|
|
57121
|
-
title: /* @__PURE__ */ optional
|
|
57122
|
-
description: /* @__PURE__ */ optional
|
|
57123
|
-
minItems: /* @__PURE__ */ optional
|
|
57124
|
-
maxItems: /* @__PURE__ */ optional
|
|
57125
|
-
items: /* @__PURE__ */ object
|
|
57201
|
+
title: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57202
|
+
description: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57203
|
+
minItems: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
57204
|
+
maxItems: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
57205
|
+
items: /* @__PURE__ */ object({
|
|
57126
57206
|
type: /* @__PURE__ */ literal("string"),
|
|
57127
|
-
enum: /* @__PURE__ */ array(/* @__PURE__ */ string
|
|
57207
|
+
enum: /* @__PURE__ */ array(/* @__PURE__ */ string())
|
|
57128
57208
|
}),
|
|
57129
|
-
default: /* @__PURE__ */ optional
|
|
57209
|
+
default: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string()))
|
|
57130
57210
|
}),
|
|
57131
|
-
/* @__PURE__ */ object
|
|
57211
|
+
/* @__PURE__ */ object({
|
|
57132
57212
|
type: /* @__PURE__ */ literal("array"),
|
|
57133
|
-
title: /* @__PURE__ */ optional
|
|
57134
|
-
description: /* @__PURE__ */ optional
|
|
57135
|
-
minItems: /* @__PURE__ */ optional
|
|
57136
|
-
maxItems: /* @__PURE__ */ optional
|
|
57137
|
-
items: /* @__PURE__ */ object
|
|
57138
|
-
default: /* @__PURE__ */ optional
|
|
57213
|
+
title: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57214
|
+
description: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57215
|
+
minItems: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
57216
|
+
maxItems: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
57217
|
+
items: /* @__PURE__ */ object({ anyOf: /* @__PURE__ */ array(TitledEnumOptionSchema) }),
|
|
57218
|
+
default: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string()))
|
|
57139
57219
|
})
|
|
57140
57220
|
]),
|
|
57141
57221
|
StringSchemaSchema
|
|
@@ -57144,30 +57224,30 @@ const PrimitiveSchemaDefinitionSchema = /* @__PURE__ */ union([
|
|
|
57144
57224
|
* A request from the server to elicit user input via the client.
|
|
57145
57225
|
* The client should present the message and form fields to the user.
|
|
57146
57226
|
*/
|
|
57147
|
-
const ElicitRequestFormParamsSchema = /* @__PURE__ */ object
|
|
57227
|
+
const ElicitRequestFormParamsSchema = /* @__PURE__ */ object({
|
|
57148
57228
|
...BaseRequestParamsSchema.entries,
|
|
57149
|
-
mode: /* @__PURE__ */ optional
|
|
57229
|
+
mode: /* @__PURE__ */ optional(/* @__PURE__ */ literal("form")),
|
|
57150
57230
|
/**
|
|
57151
57231
|
* The message to present to the user.
|
|
57152
57232
|
*/
|
|
57153
|
-
message: /* @__PURE__ */ string
|
|
57233
|
+
message: /* @__PURE__ */ string(),
|
|
57154
57234
|
/**
|
|
57155
57235
|
* The schema for the requested user input.
|
|
57156
57236
|
*/
|
|
57157
|
-
requestedSchema: /* @__PURE__ */ object
|
|
57158
|
-
$schema: /* @__PURE__ */ optional
|
|
57237
|
+
requestedSchema: /* @__PURE__ */ object({
|
|
57238
|
+
$schema: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
57159
57239
|
type: /* @__PURE__ */ literal("object"),
|
|
57160
|
-
properties: /* @__PURE__ */ record(/* @__PURE__ */ string
|
|
57161
|
-
required: /* @__PURE__ */ optional
|
|
57240
|
+
properties: /* @__PURE__ */ record(/* @__PURE__ */ string(), PrimitiveSchemaDefinitionSchema),
|
|
57241
|
+
required: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string()))
|
|
57162
57242
|
})
|
|
57163
57243
|
});
|
|
57164
|
-
const ElicitRequestURLParamsSchema = /* @__PURE__ */ object
|
|
57244
|
+
const ElicitRequestURLParamsSchema = /* @__PURE__ */ object({
|
|
57165
57245
|
...BaseRequestParamsSchema.entries,
|
|
57166
57246
|
mode: /* @__PURE__ */ literal("url"),
|
|
57167
|
-
message: /* @__PURE__ */ string
|
|
57168
|
-
url: /* @__PURE__ */ pipe
|
|
57247
|
+
message: /* @__PURE__ */ string(),
|
|
57248
|
+
url: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ url())
|
|
57169
57249
|
});
|
|
57170
|
-
const ElicitRequestSchema = /* @__PURE__ */ object
|
|
57250
|
+
const ElicitRequestSchema = /* @__PURE__ */ object({
|
|
57171
57251
|
...RequestSchema.entries,
|
|
57172
57252
|
method: /* @__PURE__ */ literal("elicitation/create"),
|
|
57173
57253
|
params: /* @__PURE__ */ union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema])
|
|
@@ -57175,7 +57255,7 @@ const ElicitRequestSchema = /* @__PURE__ */ object$2({
|
|
|
57175
57255
|
/**
|
|
57176
57256
|
* The client's response to an elicitation/create request from the server.
|
|
57177
57257
|
*/
|
|
57178
|
-
const ElicitResultSchema = /* @__PURE__ */ object
|
|
57258
|
+
const ElicitResultSchema = /* @__PURE__ */ object({
|
|
57179
57259
|
...ResultSchema.entries,
|
|
57180
57260
|
/**
|
|
57181
57261
|
* The user's response action.
|
|
@@ -57188,7 +57268,7 @@ const ElicitResultSchema = /* @__PURE__ */ object$2({
|
|
|
57188
57268
|
/**
|
|
57189
57269
|
* The collected user input content (only present if action is "accept").
|
|
57190
57270
|
*/
|
|
57191
|
-
content: /* @__PURE__ */ optional
|
|
57271
|
+
content: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ unknown()))
|
|
57192
57272
|
});
|
|
57193
57273
|
({ ...RequestSchema.entries }), { ...BaseRequestParamsSchema.entries };
|
|
57194
57274
|
/**
|
|
@@ -57196,19 +57276,19 @@ const ElicitResultSchema = /* @__PURE__ */ object$2({
|
|
|
57196
57276
|
*/
|
|
57197
57277
|
const CompleteResultSchema = /* @__PURE__ */ looseObject({
|
|
57198
57278
|
...ResultSchema.entries,
|
|
57199
|
-
completion: /* @__PURE__ */ object
|
|
57279
|
+
completion: /* @__PURE__ */ object({
|
|
57200
57280
|
/**
|
|
57201
57281
|
* An array of completion values. Must not exceed 100 items.
|
|
57202
57282
|
*/
|
|
57203
|
-
values: /* @__PURE__ */ pipe
|
|
57283
|
+
values: /* @__PURE__ */ pipe(/* @__PURE__ */ array(/* @__PURE__ */ string()), /* @__PURE__ */ maxLength(100)),
|
|
57204
57284
|
/**
|
|
57205
57285
|
* The total number of completion options available. This can exceed the number of values actually sent in the response.
|
|
57206
57286
|
*/
|
|
57207
|
-
total: /* @__PURE__ */ optional
|
|
57287
|
+
total: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer())),
|
|
57208
57288
|
/**
|
|
57209
57289
|
* Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
|
|
57210
57290
|
*/
|
|
57211
|
-
hasMore: /* @__PURE__ */ optional
|
|
57291
|
+
hasMore: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
57212
57292
|
})
|
|
57213
57293
|
});
|
|
57214
57294
|
({ ...RequestSchema.entries });
|
|
@@ -57461,10 +57541,10 @@ function event(type, detail) {
|
|
|
57461
57541
|
* excessively large value.
|
|
57462
57542
|
*/
|
|
57463
57543
|
const MAX_ENCODED_REQUEST_STATE_LENGTH = 262144;
|
|
57464
|
-
const RequestStateEnvelopeSchema = /* @__PURE__ */ object
|
|
57544
|
+
const RequestStateEnvelopeSchema = /* @__PURE__ */ object({
|
|
57465
57545
|
version: /* @__PURE__ */ literal(1),
|
|
57466
57546
|
inputResponses: InputResponsesSchema,
|
|
57467
|
-
state: /* @__PURE__ */ optional
|
|
57547
|
+
state: /* @__PURE__ */ optional(/* @__PURE__ */ unknown())
|
|
57468
57548
|
});
|
|
57469
57549
|
/**
|
|
57470
57550
|
* Private error used to stop a handler when it needs input from the client.
|
|
@@ -57681,7 +57761,7 @@ var McpServer = class {
|
|
|
57681
57761
|
};
|
|
57682
57762
|
this.#server.addMethod("initialize", (initialize_request) => {
|
|
57683
57763
|
try {
|
|
57684
|
-
const validated_initialize = parse$
|
|
57764
|
+
const validated_initialize = parse$3(InitializeRequestParamsSchema, initialize_request);
|
|
57685
57765
|
if (should_version_negotiation_fail(validated_initialize.protocolVersion)) throw new McpError(-32602, "Invalid protocol version format");
|
|
57686
57766
|
const negotiated_version = negotiate_protocol_version(validated_initialize.protocolVersion);
|
|
57687
57767
|
this.#event_target.dispatchEvent(event("initialize", validated_initialize));
|
|
@@ -57855,7 +57935,7 @@ var McpServer = class {
|
|
|
57855
57935
|
validated_args = validation_result.value;
|
|
57856
57936
|
}
|
|
57857
57937
|
const tool_result = tool.schema ? await tool.execute(validated_args) : await tool.execute();
|
|
57858
|
-
const parsed_result = parse$
|
|
57938
|
+
const parsed_result = parse$3(CallToolResultSchema, tool_result);
|
|
57859
57939
|
if (tool.outputSchema && parsed_result.structuredContent !== void 0) {
|
|
57860
57940
|
let output_validation = tool.outputSchema["~standard"].validate(parsed_result.structuredContent);
|
|
57861
57941
|
if (output_validation instanceof Promise) output_validation = await output_validation;
|
|
@@ -57918,11 +57998,11 @@ var McpServer = class {
|
|
|
57918
57998
|
const prompt = this.#prompts.get(name);
|
|
57919
57999
|
if (!prompt) throw new McpError(-32602, `Prompt ${name} not found`);
|
|
57920
58000
|
this.#mark_mrtr_registration("prompt", name, prompt.replayable);
|
|
57921
|
-
if (!prompt.schema) return parse$
|
|
58001
|
+
if (!prompt.schema) return parse$3(GetPromptResultSchema, await prompt.execute());
|
|
57922
58002
|
let validated_args = prompt.schema["~standard"].validate(args);
|
|
57923
58003
|
if (validated_args instanceof Promise) validated_args = await validated_args;
|
|
57924
58004
|
if (validated_args.issues) throw new McpError(-32602, `Invalid arguments for prompt ${name}: ${JSON.stringify(validated_args.issues)}`);
|
|
57925
|
-
return parse$
|
|
58005
|
+
return parse$3(GetPromptResultSchema, await prompt.execute(validated_args.value));
|
|
57926
58006
|
});
|
|
57927
58007
|
}
|
|
57928
58008
|
/**
|
|
@@ -58003,9 +58083,9 @@ var McpServer = class {
|
|
|
58003
58083
|
this.#mark_mrtr_registration(resource.template ? "template" : "resource", resource.name, resource.replayable);
|
|
58004
58084
|
if (resource.template) {
|
|
58005
58085
|
if (!params) throw new McpError(-32602, "Missing parameters for template resource");
|
|
58006
|
-
return parse$
|
|
58086
|
+
return parse$3(ReadResourceResultSchema, await resource.execute(uri, params));
|
|
58007
58087
|
}
|
|
58008
|
-
return parse$
|
|
58088
|
+
return parse$3(ReadResourceResultSchema, await resource.execute(uri));
|
|
58009
58089
|
});
|
|
58010
58090
|
}
|
|
58011
58091
|
/**
|
|
@@ -58039,7 +58119,7 @@ var McpServer = class {
|
|
|
58039
58119
|
if (!complete) return null;
|
|
58040
58120
|
const actual_complete = complete[argument.name];
|
|
58041
58121
|
if (!actual_complete) return null;
|
|
58042
|
-
return parse$
|
|
58122
|
+
return parse$3(CompleteResultSchema, await actual_complete(argument.value, context));
|
|
58043
58123
|
});
|
|
58044
58124
|
}
|
|
58045
58125
|
#init_logging() {
|
|
@@ -58646,7 +58726,7 @@ var McpServer = class {
|
|
|
58646
58726
|
return response;
|
|
58647
58727
|
});
|
|
58648
58728
|
}
|
|
58649
|
-
const validated_response = parse$
|
|
58729
|
+
const validated_response = parse$3(/* @__PURE__ */ union([JSONRPCResponseSchema, JSONRPCErrorSchema]), message);
|
|
58650
58730
|
this.#lazyily_create_client();
|
|
58651
58731
|
return this.#ctx_storage.run(ctx ?? {}, async () => this.#client?.receive(validated_response));
|
|
58652
58732
|
}
|
|
@@ -58909,7 +58989,7 @@ var McpServer = class {
|
|
|
58909
58989
|
this.#lazyily_create_client();
|
|
58910
58990
|
const request = await this.#create_elicitation_request(message, schema_or_url);
|
|
58911
58991
|
const result = await this.#client?.request(request.method, request.params, "standalone");
|
|
58912
|
-
const elicit_result = parse$
|
|
58992
|
+
const elicit_result = parse$3(ElicitResultSchema, result);
|
|
58913
58993
|
return typeof schema_or_url !== "string" ? this.#validate_elicit_result(elicit_result, schema_or_url) : this.#without_elicit_content(elicit_result);
|
|
58914
58994
|
}
|
|
58915
58995
|
/**
|
|
@@ -58956,7 +59036,7 @@ var McpServer = class {
|
|
|
58956
59036
|
*/
|
|
58957
59037
|
async message(request, options = {}) {
|
|
58958
59038
|
this.#assert_client_request_allowed("sampling", "sampling");
|
|
58959
|
-
const validated_request = parse$
|
|
59039
|
+
const validated_request = parse$3(CreateMessageRequestParamsSchema, request);
|
|
58960
59040
|
const mrtr = this.#mrtr;
|
|
58961
59041
|
if (mrtr !== void 0) {
|
|
58962
59042
|
this.#assert_replayable(mrtr, "sampling");
|
|
@@ -58979,7 +59059,7 @@ var McpServer = class {
|
|
|
58979
59059
|
}
|
|
58980
59060
|
this.#lazyily_create_client();
|
|
58981
59061
|
const response = await this.#client?.request("sampling/createMessage", validated_request, "standalone");
|
|
58982
|
-
return parse$
|
|
59062
|
+
return parse$3(CreateMessageResultSchema, response);
|
|
58983
59063
|
}
|
|
58984
59064
|
/**
|
|
58985
59065
|
* Send a progress notification to the client. This is useful for long-running operations where you want to inform the user about the progress.
|
|
@@ -60197,388 +60277,6 @@ function defineTool(options, execute) {
|
|
|
60197
60277
|
execute
|
|
60198
60278
|
};
|
|
60199
60279
|
}
|
|
60200
|
-
const DEFAULT_CONFIG = {
|
|
60201
|
-
lang: void 0,
|
|
60202
|
-
message: void 0,
|
|
60203
|
-
abortEarly: void 0,
|
|
60204
|
-
abortPipeEarly: void 0
|
|
60205
|
-
};
|
|
60206
|
-
/**
|
|
60207
|
-
* Returns the global configuration.
|
|
60208
|
-
*
|
|
60209
|
-
* @param config The config to merge.
|
|
60210
|
-
*
|
|
60211
|
-
* @returns The configuration.
|
|
60212
|
-
*/
|
|
60213
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60214
|
-
function getGlobalConfig(config$1) {
|
|
60215
|
-
if (!config$1 && true) return DEFAULT_CONFIG;
|
|
60216
|
-
return {
|
|
60217
|
-
lang: config$1?.lang ?? void 0,
|
|
60218
|
-
message: config$1?.message,
|
|
60219
|
-
abortEarly: config$1?.abortEarly ?? void 0,
|
|
60220
|
-
abortPipeEarly: config$1?.abortPipeEarly ?? void 0
|
|
60221
|
-
};
|
|
60222
|
-
}
|
|
60223
|
-
/**
|
|
60224
|
-
* Stringifies an unknown input to a literal or type string.
|
|
60225
|
-
*
|
|
60226
|
-
* @param input The unknown input.
|
|
60227
|
-
*
|
|
60228
|
-
* @returns A literal or type string.
|
|
60229
|
-
*
|
|
60230
|
-
* @internal
|
|
60231
|
-
*/
|
|
60232
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60233
|
-
function _stringify(input) {
|
|
60234
|
-
const type = typeof input;
|
|
60235
|
-
if (type === "string") return `"${input}"`;
|
|
60236
|
-
if (type === "number" || type === "bigint" || type === "boolean") return `${input}`;
|
|
60237
|
-
if (type === "object" || type === "function") return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? "null";
|
|
60238
|
-
return type;
|
|
60239
|
-
}
|
|
60240
|
-
/**
|
|
60241
|
-
* Adds an issue to the dataset.
|
|
60242
|
-
*
|
|
60243
|
-
* @param context The issue context.
|
|
60244
|
-
* @param label The issue label.
|
|
60245
|
-
* @param dataset The input dataset.
|
|
60246
|
-
* @param config The configuration.
|
|
60247
|
-
* @param other The optional props.
|
|
60248
|
-
*
|
|
60249
|
-
* @internal
|
|
60250
|
-
*/
|
|
60251
|
-
function _addIssue(context, label, dataset, config$1, other) {
|
|
60252
|
-
const input = other && "input" in other ? other.input : dataset.value;
|
|
60253
|
-
const expected = other?.expected ?? context.expects ?? null;
|
|
60254
|
-
const received = other?.received ?? /* @__PURE__ */ _stringify(input);
|
|
60255
|
-
const issue = {
|
|
60256
|
-
kind: context.kind,
|
|
60257
|
-
type: context.type,
|
|
60258
|
-
input,
|
|
60259
|
-
expected,
|
|
60260
|
-
received,
|
|
60261
|
-
message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : "R"}eceived ${received}`,
|
|
60262
|
-
requirement: context.requirement,
|
|
60263
|
-
path: other?.path,
|
|
60264
|
-
issues: other?.issues,
|
|
60265
|
-
lang: config$1.lang,
|
|
60266
|
-
abortEarly: config$1.abortEarly,
|
|
60267
|
-
abortPipeEarly: config$1.abortPipeEarly
|
|
60268
|
-
};
|
|
60269
|
-
const isSchema = context.kind === "schema";
|
|
60270
|
-
const message$1 = other?.message ?? context.message ?? (context.reference, issue.lang, void 0) ?? (isSchema ? (issue.lang, void 0) : null) ?? config$1.message ?? (issue.lang, void 0);
|
|
60271
|
-
if (message$1 !== void 0) issue.message = typeof message$1 === "function" ? message$1(issue) : message$1;
|
|
60272
|
-
if (isSchema) dataset.typed = false;
|
|
60273
|
-
if (dataset.issues) dataset.issues.push(issue);
|
|
60274
|
-
else dataset.issues = [issue];
|
|
60275
|
-
}
|
|
60276
|
-
const _standardCache = /* @__PURE__ */ new WeakMap();
|
|
60277
|
-
/**
|
|
60278
|
-
* Returns the Standard Schema properties.
|
|
60279
|
-
*
|
|
60280
|
-
* @param context The schema context.
|
|
60281
|
-
*
|
|
60282
|
-
* @returns The Standard Schema properties.
|
|
60283
|
-
*/
|
|
60284
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60285
|
-
function _getStandardProps(context) {
|
|
60286
|
-
let cached = _standardCache.get(context);
|
|
60287
|
-
if (!cached) {
|
|
60288
|
-
cached = {
|
|
60289
|
-
version: 1,
|
|
60290
|
-
vendor: "valibot",
|
|
60291
|
-
validate(value$1) {
|
|
60292
|
-
return context["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig());
|
|
60293
|
-
}
|
|
60294
|
-
};
|
|
60295
|
-
_standardCache.set(context, cached);
|
|
60296
|
-
}
|
|
60297
|
-
return cached;
|
|
60298
|
-
}
|
|
60299
|
-
/**
|
|
60300
|
-
* A Valibot error with useful information.
|
|
60301
|
-
*/
|
|
60302
|
-
var ValiError = class extends Error {
|
|
60303
|
-
/**
|
|
60304
|
-
* Creates a Valibot error with useful information.
|
|
60305
|
-
*
|
|
60306
|
-
* @param issues The error issues.
|
|
60307
|
-
*/
|
|
60308
|
-
constructor(issues) {
|
|
60309
|
-
super(issues[0].message);
|
|
60310
|
-
this.name = "ValiError";
|
|
60311
|
-
this.issues = issues;
|
|
60312
|
-
}
|
|
60313
|
-
};
|
|
60314
|
-
/**
|
|
60315
|
-
* Creates a description metadata action.
|
|
60316
|
-
*
|
|
60317
|
-
* @param description_ The description text.
|
|
60318
|
-
*
|
|
60319
|
-
* @returns A description action.
|
|
60320
|
-
*/
|
|
60321
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60322
|
-
function description(description_) {
|
|
60323
|
-
return {
|
|
60324
|
-
kind: "metadata",
|
|
60325
|
-
type: "description",
|
|
60326
|
-
reference: description,
|
|
60327
|
-
description: description_
|
|
60328
|
-
};
|
|
60329
|
-
}
|
|
60330
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60331
|
-
function minLength(requirement, message$1) {
|
|
60332
|
-
return {
|
|
60333
|
-
kind: "validation",
|
|
60334
|
-
type: "min_length",
|
|
60335
|
-
reference: minLength,
|
|
60336
|
-
async: false,
|
|
60337
|
-
expects: `>=${requirement}`,
|
|
60338
|
-
requirement,
|
|
60339
|
-
message: message$1,
|
|
60340
|
-
"~run"(dataset, config$1) {
|
|
60341
|
-
if (dataset.typed && dataset.value.length < this.requirement) _addIssue(this, "length", dataset, config$1, { received: `${dataset.value.length}` });
|
|
60342
|
-
return dataset;
|
|
60343
|
-
}
|
|
60344
|
-
};
|
|
60345
|
-
}
|
|
60346
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60347
|
-
function url(message$1) {
|
|
60348
|
-
return {
|
|
60349
|
-
kind: "validation",
|
|
60350
|
-
type: "url",
|
|
60351
|
-
reference: url,
|
|
60352
|
-
async: false,
|
|
60353
|
-
expects: null,
|
|
60354
|
-
requirement(input) {
|
|
60355
|
-
try {
|
|
60356
|
-
new URL(input);
|
|
60357
|
-
return true;
|
|
60358
|
-
} catch {
|
|
60359
|
-
return false;
|
|
60360
|
-
}
|
|
60361
|
-
},
|
|
60362
|
-
message: message$1,
|
|
60363
|
-
"~run"(dataset, config$1) {
|
|
60364
|
-
if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "URL", dataset, config$1);
|
|
60365
|
-
return dataset;
|
|
60366
|
-
}
|
|
60367
|
-
};
|
|
60368
|
-
}
|
|
60369
|
-
/**
|
|
60370
|
-
* Returns the fallback value of the schema.
|
|
60371
|
-
*
|
|
60372
|
-
* @param schema The schema to get it from.
|
|
60373
|
-
* @param dataset The output dataset if available.
|
|
60374
|
-
* @param config The config if available.
|
|
60375
|
-
*
|
|
60376
|
-
* @returns The fallback value.
|
|
60377
|
-
*/
|
|
60378
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60379
|
-
function getFallback(schema, dataset, config$1) {
|
|
60380
|
-
return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
|
|
60381
|
-
}
|
|
60382
|
-
/**
|
|
60383
|
-
* Returns the default value of the schema.
|
|
60384
|
-
*
|
|
60385
|
-
* @param schema The schema to get it from.
|
|
60386
|
-
* @param dataset The input dataset if available.
|
|
60387
|
-
* @param config The config if available.
|
|
60388
|
-
*
|
|
60389
|
-
* @returns The default value.
|
|
60390
|
-
*/
|
|
60391
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60392
|
-
function getDefault(schema, dataset, config$1) {
|
|
60393
|
-
return typeof schema.default === "function" ? schema.default(dataset, config$1) : schema.default;
|
|
60394
|
-
}
|
|
60395
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60396
|
-
function boolean(message$1) {
|
|
60397
|
-
return {
|
|
60398
|
-
kind: "schema",
|
|
60399
|
-
type: "boolean",
|
|
60400
|
-
reference: boolean,
|
|
60401
|
-
expects: "boolean",
|
|
60402
|
-
async: false,
|
|
60403
|
-
message: message$1,
|
|
60404
|
-
get "~standard"() {
|
|
60405
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
60406
|
-
},
|
|
60407
|
-
"~run"(dataset, config$1) {
|
|
60408
|
-
if (typeof dataset.value === "boolean") dataset.typed = true;
|
|
60409
|
-
else _addIssue(this, "type", dataset, config$1);
|
|
60410
|
-
return dataset;
|
|
60411
|
-
}
|
|
60412
|
-
};
|
|
60413
|
-
}
|
|
60414
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60415
|
-
function nullable(wrapped, default_) {
|
|
60416
|
-
return {
|
|
60417
|
-
kind: "schema",
|
|
60418
|
-
type: "nullable",
|
|
60419
|
-
reference: nullable,
|
|
60420
|
-
expects: `(${wrapped.expects} | null)`,
|
|
60421
|
-
async: false,
|
|
60422
|
-
wrapped,
|
|
60423
|
-
default: default_,
|
|
60424
|
-
get "~standard"() {
|
|
60425
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
60426
|
-
},
|
|
60427
|
-
"~run"(dataset, config$1) {
|
|
60428
|
-
if (dataset.value === null) {
|
|
60429
|
-
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
60430
|
-
if (dataset.value === null) {
|
|
60431
|
-
dataset.typed = true;
|
|
60432
|
-
return dataset;
|
|
60433
|
-
}
|
|
60434
|
-
}
|
|
60435
|
-
return this.wrapped["~run"](dataset, config$1);
|
|
60436
|
-
}
|
|
60437
|
-
};
|
|
60438
|
-
}
|
|
60439
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60440
|
-
function object(entries$1, message$1) {
|
|
60441
|
-
return {
|
|
60442
|
-
kind: "schema",
|
|
60443
|
-
type: "object",
|
|
60444
|
-
reference: object,
|
|
60445
|
-
expects: "Object",
|
|
60446
|
-
async: false,
|
|
60447
|
-
entries: entries$1,
|
|
60448
|
-
message: message$1,
|
|
60449
|
-
get "~standard"() {
|
|
60450
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
60451
|
-
},
|
|
60452
|
-
"~run"(dataset, config$1) {
|
|
60453
|
-
const input = dataset.value;
|
|
60454
|
-
if (input && typeof input === "object") {
|
|
60455
|
-
dataset.typed = true;
|
|
60456
|
-
dataset.value = {};
|
|
60457
|
-
for (const key in this.entries) {
|
|
60458
|
-
const valueSchema = this.entries[key];
|
|
60459
|
-
if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
|
|
60460
|
-
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
|
|
60461
|
-
const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
|
|
60462
|
-
if (valueDataset.issues) {
|
|
60463
|
-
const pathItem = {
|
|
60464
|
-
type: "object",
|
|
60465
|
-
origin: "value",
|
|
60466
|
-
input,
|
|
60467
|
-
key,
|
|
60468
|
-
value: value$1
|
|
60469
|
-
};
|
|
60470
|
-
for (const issue of valueDataset.issues) {
|
|
60471
|
-
if (issue.path) issue.path.unshift(pathItem);
|
|
60472
|
-
else issue.path = [pathItem];
|
|
60473
|
-
dataset.issues?.push(issue);
|
|
60474
|
-
}
|
|
60475
|
-
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
60476
|
-
if (config$1.abortEarly) {
|
|
60477
|
-
dataset.typed = false;
|
|
60478
|
-
break;
|
|
60479
|
-
}
|
|
60480
|
-
}
|
|
60481
|
-
if (!valueDataset.typed) dataset.typed = false;
|
|
60482
|
-
dataset.value[key] = valueDataset.value;
|
|
60483
|
-
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
|
|
60484
|
-
else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
|
|
60485
|
-
_addIssue(this, "key", dataset, config$1, {
|
|
60486
|
-
input: void 0,
|
|
60487
|
-
expected: `"${key}"`,
|
|
60488
|
-
path: [{
|
|
60489
|
-
type: "object",
|
|
60490
|
-
origin: "key",
|
|
60491
|
-
input,
|
|
60492
|
-
key,
|
|
60493
|
-
value: input[key]
|
|
60494
|
-
}]
|
|
60495
|
-
});
|
|
60496
|
-
if (config$1.abortEarly) break;
|
|
60497
|
-
}
|
|
60498
|
-
}
|
|
60499
|
-
} else _addIssue(this, "type", dataset, config$1);
|
|
60500
|
-
return dataset;
|
|
60501
|
-
}
|
|
60502
|
-
};
|
|
60503
|
-
}
|
|
60504
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60505
|
-
function optional(wrapped, default_) {
|
|
60506
|
-
return {
|
|
60507
|
-
kind: "schema",
|
|
60508
|
-
type: "optional",
|
|
60509
|
-
reference: optional,
|
|
60510
|
-
expects: `(${wrapped.expects} | undefined)`,
|
|
60511
|
-
async: false,
|
|
60512
|
-
wrapped,
|
|
60513
|
-
default: default_,
|
|
60514
|
-
get "~standard"() {
|
|
60515
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
60516
|
-
},
|
|
60517
|
-
"~run"(dataset, config$1) {
|
|
60518
|
-
if (dataset.value === void 0) {
|
|
60519
|
-
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
60520
|
-
if (dataset.value === void 0) {
|
|
60521
|
-
dataset.typed = true;
|
|
60522
|
-
return dataset;
|
|
60523
|
-
}
|
|
60524
|
-
}
|
|
60525
|
-
return this.wrapped["~run"](dataset, config$1);
|
|
60526
|
-
}
|
|
60527
|
-
};
|
|
60528
|
-
}
|
|
60529
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60530
|
-
function string(message$1) {
|
|
60531
|
-
return {
|
|
60532
|
-
kind: "schema",
|
|
60533
|
-
type: "string",
|
|
60534
|
-
reference: string,
|
|
60535
|
-
expects: "string",
|
|
60536
|
-
async: false,
|
|
60537
|
-
message: message$1,
|
|
60538
|
-
get "~standard"() {
|
|
60539
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
60540
|
-
},
|
|
60541
|
-
"~run"(dataset, config$1) {
|
|
60542
|
-
if (typeof dataset.value === "string") dataset.typed = true;
|
|
60543
|
-
else _addIssue(this, "type", dataset, config$1);
|
|
60544
|
-
return dataset;
|
|
60545
|
-
}
|
|
60546
|
-
};
|
|
60547
|
-
}
|
|
60548
|
-
/**
|
|
60549
|
-
* Parses an unknown input based on a schema.
|
|
60550
|
-
*
|
|
60551
|
-
* @param schema The schema to be used.
|
|
60552
|
-
* @param input The input to be parsed.
|
|
60553
|
-
* @param config The parse configuration.
|
|
60554
|
-
*
|
|
60555
|
-
* @returns The parsed input.
|
|
60556
|
-
*/
|
|
60557
|
-
function parse$3(schema, input, config$1) {
|
|
60558
|
-
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));
|
|
60559
|
-
if (dataset.issues) throw new ValiError(dataset.issues);
|
|
60560
|
-
return dataset.value;
|
|
60561
|
-
}
|
|
60562
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
60563
|
-
function pipe(...pipe$1) {
|
|
60564
|
-
return {
|
|
60565
|
-
...pipe$1[0],
|
|
60566
|
-
pipe: pipe$1,
|
|
60567
|
-
get "~standard"() {
|
|
60568
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
60569
|
-
},
|
|
60570
|
-
"~run"(dataset, config$1) {
|
|
60571
|
-
for (const item of pipe$1) if (item.kind !== "metadata") {
|
|
60572
|
-
if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
|
|
60573
|
-
dataset.typed = false;
|
|
60574
|
-
break;
|
|
60575
|
-
}
|
|
60576
|
-
if (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = item["~run"](dataset, config$1);
|
|
60577
|
-
}
|
|
60578
|
-
return dataset;
|
|
60579
|
-
}
|
|
60580
|
-
};
|
|
60581
|
-
}
|
|
60582
60280
|
//#endregion
|
|
60583
60281
|
//#region node_modules/.pnpm/@toon-format+toon@4.1.1/node_modules/@toon-format/toon/dist/index.mjs
|
|
60584
60282
|
const NULL_LITERAL = "null";
|
|
@@ -70799,7 +70497,7 @@ var require_dump = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
70799
70497
|
//#region node_modules/.pnpm/undici@6.26.0/node_modules/undici/lib/interceptor/dns.js
|
|
70800
70498
|
var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
70801
70499
|
const { isIP } = __require("node:net");
|
|
70802
|
-
const { lookup: lookup$
|
|
70500
|
+
const { lookup: lookup$2 } = __require("node:dns");
|
|
70803
70501
|
const DecoratorHandler = require_decorator_handler();
|
|
70804
70502
|
const { InvalidArgumentError, InformationalError } = require_errors();
|
|
70805
70503
|
const maxInt = Math.pow(2, 31) - 1;
|
|
@@ -70866,7 +70564,7 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
70866
70564
|
}
|
|
70867
70565
|
}
|
|
70868
70566
|
#defaultLookup(origin, opts, cb) {
|
|
70869
|
-
lookup$
|
|
70567
|
+
lookup$2(origin.hostname, {
|
|
70870
70568
|
all: true,
|
|
70871
70569
|
family: this.dualStack === false ? this.affinity : 0,
|
|
70872
70570
|
order: "ipv4first"
|
|
@@ -76759,7 +76457,7 @@ var require_eventsource = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
76759
76457
|
};
|
|
76760
76458
|
}));
|
|
76761
76459
|
//#endregion
|
|
76762
|
-
//#region node_modules/.pnpm/@iso4+fetch@0.0.
|
|
76460
|
+
//#region node_modules/.pnpm/@iso4+fetch@0.0.2/node_modules/@iso4/fetch/dist/index.mjs
|
|
76763
76461
|
var import_undici = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
76764
76462
|
const Client = require_client();
|
|
76765
76463
|
const Dispatcher = require_dispatcher();
|
|
@@ -76884,13 +76582,28 @@ var import_undici = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
76884
76582
|
module.exports.EventSource = EventSource;
|
|
76885
76583
|
})))();
|
|
76886
76584
|
/**
|
|
76887
|
-
*
|
|
76888
|
-
*
|
|
76585
|
+
* DNS for the connection-time pinning interceptor, plus the private/reserved-IP
|
|
76586
|
+
* block that runs before undici connects.
|
|
76587
|
+
*
|
|
76588
|
+
* This is the ONLY place a hostname is resolved. Resolution happens inside the
|
|
76589
|
+
* undici DNS interceptor, which runs only when a request actually connects —
|
|
76590
|
+
* i.e. after it has passed the allow/deny check. A denied host is therefore
|
|
76591
|
+
* never handed to a resolver, so the allow-list also gates DNS, not just the
|
|
76592
|
+
* HTTP request.
|
|
76593
|
+
*
|
|
76594
|
+
* Not re-exported from `index.ts`, so none of this is public API.
|
|
76595
|
+
*/
|
|
76596
|
+
/**
|
|
76597
|
+
* True for addresses that must never be connected to from guest-driven fetch:
|
|
76598
|
+
* loopback, link-local, RFC1918 / ULA, IMDS, and other reserved ranges. A
|
|
76599
|
+
* malformed address is treated as reserved (fail closed).
|
|
76600
|
+
* @param ip dotted-quad or IPv6 literal, brackets tolerated
|
|
76889
76601
|
*/
|
|
76890
76602
|
function isReservedIp(ip) {
|
|
76891
76603
|
if (ip.includes(":")) {
|
|
76892
76604
|
const addr = ip.toLowerCase().replace(/^\[|\]$/g, "");
|
|
76893
76605
|
if (addr === "::1") return true;
|
|
76606
|
+
if (addr === "::") return true;
|
|
76894
76607
|
const firstWord = parseInt(addr.split(":")[0] ?? "0", 16);
|
|
76895
76608
|
if ((firstWord & 65472) === 65152) return true;
|
|
76896
76609
|
if ((firstWord & 65024) === 64512) return true;
|
|
@@ -76904,20 +76617,51 @@ function isReservedIp(ip) {
|
|
|
76904
76617
|
const c = parts[2] ?? 0;
|
|
76905
76618
|
return a === 0 || a === 10 || a === 127 || a === 100 && (b & 192) === 64 || a === 169 && b === 254 || a === 172 && b >= 16 && b <= 31 || a === 192 && b === 0 && (c === 0 || c === 2) || a === 192 && b === 168 || a === 198 && (b === 18 || b === 19) || a === 198 && b === 51 && c === 100 || a === 203 && b === 0 && c === 113 || a >= 224;
|
|
76906
76619
|
}
|
|
76907
|
-
|
|
76908
|
-
|
|
76909
|
-
|
|
76910
|
-
|
|
76620
|
+
/**
|
|
76621
|
+
* Throw if a hostname resolved to no usable public address. Exported for tests:
|
|
76622
|
+
* the undici interceptor is bypassed when `fetch` is mocked, so this is where
|
|
76623
|
+
* the SSRF block is exercised directly.
|
|
76624
|
+
* @param hostname the hostname that was resolved (for the error message)
|
|
76625
|
+
* @param addresses the resolved addresses
|
|
76626
|
+
*/
|
|
76627
|
+
function assertPublicAddresses(hostname, addresses) {
|
|
76628
|
+
if (addresses.length === 0) throw new Error(`fetch: no DNS addresses for "${hostname}"`);
|
|
76629
|
+
for (const { address } of addresses) if (isReservedIp(address)) throw new Error(`fetch: request blocked — "${hostname}" resolves to private/reserved IP ${address}`);
|
|
76630
|
+
}
|
|
76631
|
+
/**
|
|
76632
|
+
* The lookup function for undici's DNS interceptor: resolve the hostname and
|
|
76633
|
+
* refuse any private/reserved address before a connection is made.
|
|
76634
|
+
*/
|
|
76635
|
+
function makeDnsLookupFn() {
|
|
76636
|
+
return (hostnameOrUrl, _opts, callback) => {
|
|
76637
|
+
const rawHostname = typeof hostnameOrUrl === "object" && hostnameOrUrl !== null ? hostnameOrUrl.hostname : hostnameOrUrl;
|
|
76638
|
+
const hostname = rawHostname.startsWith("[") && rawHostname.endsWith("]") ? rawHostname.slice(1, -1) : rawHostname;
|
|
76639
|
+
lookup(hostname, {
|
|
76911
76640
|
all: true,
|
|
76912
76641
|
family: 0
|
|
76642
|
+
}, (err, addresses) => {
|
|
76643
|
+
if (err) {
|
|
76644
|
+
callback(err, []);
|
|
76645
|
+
return;
|
|
76646
|
+
}
|
|
76647
|
+
try {
|
|
76648
|
+
assertPublicAddresses(hostname, addresses);
|
|
76649
|
+
} catch (blockErr) {
|
|
76650
|
+
callback(blockErr, []);
|
|
76651
|
+
return;
|
|
76652
|
+
}
|
|
76653
|
+
callback(null, addresses.map((addr) => ({
|
|
76654
|
+
address: addr.address,
|
|
76655
|
+
family: addr.family,
|
|
76656
|
+
ttl: 1e4
|
|
76657
|
+
})));
|
|
76913
76658
|
});
|
|
76914
|
-
}
|
|
76915
|
-
throw new Error(`fetch: DNS resolution failed for "${hostname}": ${err.message}`);
|
|
76916
|
-
}
|
|
76917
|
-
if (addrs.length === 0) throw new Error(`fetch: DNS resolution returned no addresses for "${hostname}"`);
|
|
76918
|
-
for (const { address } of addrs) if (isReservedIp(address)) throw new Error(`fetch: request blocked — "${hostname}" resolves to private/reserved IP ${address}`);
|
|
76919
|
-
return addrs[0].address;
|
|
76659
|
+
};
|
|
76920
76660
|
}
|
|
76661
|
+
/**
|
|
76662
|
+
* \@iso4/fetch — public entry point.
|
|
76663
|
+
* See `./types.ts` for the full option surface.
|
|
76664
|
+
*/
|
|
76921
76665
|
function hostExact(requestHost, ruleHost) {
|
|
76922
76666
|
return !ruleHost.startsWith("*.") && requestHost === ruleHost;
|
|
76923
76667
|
}
|
|
@@ -76944,11 +76688,6 @@ function compileRules(rawRules) {
|
|
|
76944
76688
|
router: buildRouter(rule.routes)
|
|
76945
76689
|
}));
|
|
76946
76690
|
}
|
|
76947
|
-
function decodePath(rawPath) {
|
|
76948
|
-
const once = decodeURIComponent(rawPath);
|
|
76949
|
-
if (once !== decodeURIComponent(once)) throw new Error("fetch: request denied — double-encoded path detected");
|
|
76950
|
-
return once;
|
|
76951
|
-
}
|
|
76952
76691
|
/**
|
|
76953
76692
|
* Two-pass origin matching: exact hostname rules are checked before wildcard
|
|
76954
76693
|
* rules, regardless of array order. Within the same priority level the first
|
|
@@ -76958,21 +76697,17 @@ function decodePath(rawPath) {
|
|
|
76958
76697
|
* @param compiled
|
|
76959
76698
|
*/
|
|
76960
76699
|
function matchRules(req, compiled) {
|
|
76700
|
+
let hostMatched = false;
|
|
76961
76701
|
for (const pass of ["exact", "wildcard"]) for (const { rule, hosts, router } of compiled) {
|
|
76962
76702
|
if (!(pass === "exact" ? hosts.some((rh) => hostExact(req.host, rh)) : hosts.some((rh) => hostWildcard(req.host, rh)))) continue;
|
|
76703
|
+
hostMatched = true;
|
|
76963
76704
|
if (rule.httpsOnly !== false && req.protocol !== "https") continue;
|
|
76964
76705
|
const standardPort = req.protocol === "https" ? 443 : 80;
|
|
76965
76706
|
if (rule.port !== void 0) {
|
|
76966
76707
|
if (!(Array.isArray(rule.port) ? rule.port : [rule.port]).includes(req.port)) continue;
|
|
76967
76708
|
} else if (req.port !== standardPort) continue;
|
|
76968
76709
|
if (rule.routes.length === 0) return { kind: "deny-route" };
|
|
76969
|
-
|
|
76970
|
-
try {
|
|
76971
|
-
decodedPathname = decodePath(new URL(req.url).pathname);
|
|
76972
|
-
} catch {
|
|
76973
|
-
return { kind: "deny-route" };
|
|
76974
|
-
}
|
|
76975
|
-
const matched = findRoute(router, req.method, decodedPathname, { normalize: true });
|
|
76710
|
+
const matched = findRoute(router, req.method, new URL(req.url).pathname, { normalize: true });
|
|
76976
76711
|
if (matched === void 0) return { kind: "deny-route" };
|
|
76977
76712
|
return {
|
|
76978
76713
|
kind: "allow",
|
|
@@ -76981,10 +76716,11 @@ function matchRules(req, compiled) {
|
|
|
76981
76716
|
params: matched.params ?? {}
|
|
76982
76717
|
};
|
|
76983
76718
|
}
|
|
76984
|
-
return { kind: "no-origin" };
|
|
76719
|
+
return hostMatched ? { kind: "deny-route" } : { kind: "no-origin" };
|
|
76985
76720
|
}
|
|
76986
76721
|
function makeFetchContext(initialUrl, method, initialHeaders, initialBody, params, hop, raw) {
|
|
76987
76722
|
let _url = initialUrl;
|
|
76723
|
+
let _body = initialBody;
|
|
76988
76724
|
const _headers = { ...initialHeaders };
|
|
76989
76725
|
return {
|
|
76990
76726
|
req: {
|
|
@@ -76992,10 +76728,15 @@ function makeFetchContext(initialUrl, method, initialHeaders, initialBody, param
|
|
|
76992
76728
|
params,
|
|
76993
76729
|
hop,
|
|
76994
76730
|
raw,
|
|
76995
|
-
body: initialBody,
|
|
76996
76731
|
get url() {
|
|
76997
76732
|
return _url;
|
|
76998
76733
|
},
|
|
76734
|
+
get body() {
|
|
76735
|
+
return _body;
|
|
76736
|
+
},
|
|
76737
|
+
set body(b) {
|
|
76738
|
+
_body = b;
|
|
76739
|
+
},
|
|
76999
76740
|
get headers() {
|
|
77000
76741
|
return _headers;
|
|
77001
76742
|
},
|
|
@@ -77006,39 +76747,12 @@ function makeFetchContext(initialUrl, method, initialHeaders, initialBody, param
|
|
|
77006
76747
|
_url = url;
|
|
77007
76748
|
},
|
|
77008
76749
|
setBody(b) {
|
|
77009
|
-
|
|
76750
|
+
_body = b;
|
|
77010
76751
|
}
|
|
77011
76752
|
},
|
|
77012
76753
|
res: null
|
|
77013
76754
|
};
|
|
77014
76755
|
}
|
|
77015
|
-
function makeDnsLookupFn() {
|
|
77016
|
-
return (hostnameOrUrl, _opts, callback) => {
|
|
77017
|
-
const hostname = typeof hostnameOrUrl === "object" && hostnameOrUrl !== null ? hostnameOrUrl.hostname : hostnameOrUrl;
|
|
77018
|
-
lookup(hostname, {
|
|
77019
|
-
all: true,
|
|
77020
|
-
family: 0
|
|
77021
|
-
}, (err, addresses) => {
|
|
77022
|
-
if (err) {
|
|
77023
|
-
callback(err, []);
|
|
77024
|
-
return;
|
|
77025
|
-
}
|
|
77026
|
-
if (addresses.length === 0) {
|
|
77027
|
-
callback(/* @__PURE__ */ new Error(`fetch: no DNS addresses for "${hostname}"`), []);
|
|
77028
|
-
return;
|
|
77029
|
-
}
|
|
77030
|
-
for (const { address } of addresses) if (isReservedIp(address)) {
|
|
77031
|
-
callback(/* @__PURE__ */ new Error(`fetch: request blocked — "${hostname}" resolves to private/reserved IP ${address}`), []);
|
|
77032
|
-
return;
|
|
77033
|
-
}
|
|
77034
|
-
callback(null, addresses.map((addr) => ({
|
|
77035
|
-
address: addr.address,
|
|
77036
|
-
family: addr.family,
|
|
77037
|
-
ttl: 1e4
|
|
77038
|
-
})));
|
|
77039
|
-
});
|
|
77040
|
-
};
|
|
77041
|
-
}
|
|
77042
76756
|
async function readBody(body, maxBytes) {
|
|
77043
76757
|
if (body === null) return null;
|
|
77044
76758
|
const reader = body.getReader();
|
|
@@ -77073,10 +76787,7 @@ const REDIRECT_STATUSES = /* @__PURE__ */ new Set([
|
|
|
77073
76787
|
307,
|
|
77074
76788
|
308
|
|
77075
76789
|
]);
|
|
77076
|
-
async function httpRequest(url, method, headers, body, agent,
|
|
77077
|
-
const signals = [AbortSignal.timeout(timeoutMs)];
|
|
77078
|
-
if (incomingSignal !== void 0) signals.push(incomingSignal);
|
|
77079
|
-
const signal = signals.length === 1 ? signals[0] : AbortSignal.any(signals);
|
|
76790
|
+
async function httpRequest(url, method, headers, body, agent, maxBodyBytes, signal) {
|
|
77080
76791
|
const response = await (0, import_undici.fetch)(url, {
|
|
77081
76792
|
method,
|
|
77082
76793
|
headers,
|
|
@@ -77190,19 +76901,15 @@ function buildSafeFetchHandler(options) {
|
|
|
77190
76901
|
const allowCompressed = options.allowCompressedResponses ?? false;
|
|
77191
76902
|
const agent = doPinDns ? new import_undici.Agent().compose(import_undici.interceptors.dns({
|
|
77192
76903
|
lookup: makeDnsLookupFn(),
|
|
77193
|
-
maxTTL: 1e4
|
|
77194
|
-
dualStack: false,
|
|
77195
|
-
affinity: 4
|
|
76904
|
+
maxTTL: 1e4
|
|
77196
76905
|
})) : new import_undici.Agent();
|
|
77197
|
-
|
|
76906
|
+
function buildSafeFetchRequest(parsedUrl, method, headers, hop) {
|
|
77198
76907
|
const protocol = parsedUrl.protocol.slice(0, -1);
|
|
77199
76908
|
if (protocol !== "http" && protocol !== "https") throw new Error(`fetch: unsupported protocol "${parsedUrl.protocol}"`);
|
|
77200
76909
|
const host = parsedUrl.hostname.toLowerCase();
|
|
77201
76910
|
const port = parsedUrl.port !== "" ? parseInt(parsedUrl.port, 10) : protocol === "https" ? 443 : 80;
|
|
77202
|
-
let resolvedIp = null;
|
|
77203
76911
|
if (doPinDns) {
|
|
77204
|
-
if (
|
|
77205
|
-
else if (isReservedIp(host.replace(/^\[|\]$/g, ""))) throw new Error(`fetch: request blocked — IP literal ${host} is private/reserved`);
|
|
76912
|
+
if ((/^\d{1,3}(?:\.\d{1,3}){3}$/.test(host) || host.startsWith("[")) && isReservedIp(host.replace(/^\[|\]$/g, ""))) throw new Error(`fetch: request blocked — IP literal ${host} is private/reserved`);
|
|
77206
76913
|
}
|
|
77207
76914
|
return {
|
|
77208
76915
|
url: parsedUrl.toString(),
|
|
@@ -77212,7 +76919,7 @@ function buildSafeFetchHandler(options) {
|
|
|
77212
76919
|
path: parsedUrl.pathname + parsedUrl.search,
|
|
77213
76920
|
method,
|
|
77214
76921
|
headers,
|
|
77215
|
-
resolvedIp,
|
|
76922
|
+
resolvedIp: null,
|
|
77216
76923
|
hop
|
|
77217
76924
|
};
|
|
77218
76925
|
}
|
|
@@ -77293,7 +77000,7 @@ function buildSafeFetchHandler(options) {
|
|
|
77293
77000
|
if (!allowCompressed) baseHeaders["accept-encoding"] = "identity";
|
|
77294
77001
|
delete baseHeaders["host"];
|
|
77295
77002
|
const method = hostRequest.method.toUpperCase();
|
|
77296
|
-
const match = await checkRequest(
|
|
77003
|
+
const match = await checkRequest(buildSafeFetchRequest(parsedUrl, method, baseHeaders, 0));
|
|
77297
77004
|
const ctx = makeFetchContext(parsedUrl.toString(), method, baseHeaders, hostRequest.body, match?.params ?? {}, 0, hostRequest);
|
|
77298
77005
|
const middlewares = [
|
|
77299
77006
|
options.middleware,
|
|
@@ -77304,9 +77011,12 @@ function buildSafeFetchHandler(options) {
|
|
|
77304
77011
|
let currentUrl = ctx.req.url;
|
|
77305
77012
|
let currentMethod = method;
|
|
77306
77013
|
let currentBody = ctx.req.body;
|
|
77014
|
+
let currentHeaders = ctx.req.headers;
|
|
77307
77015
|
let hop = 0;
|
|
77016
|
+
const deadline = AbortSignal.timeout(timeoutMs);
|
|
77017
|
+
const signal = hostRequest.signal !== void 0 ? AbortSignal.any([deadline, hostRequest.signal]) : deadline;
|
|
77308
77018
|
for (;;) {
|
|
77309
|
-
const { response, bodyBytes } = await httpRequest(currentUrl, currentMethod,
|
|
77019
|
+
const { response, bodyBytes } = await httpRequest(currentUrl, currentMethod, currentHeaders, currentBody, agent, maxBodyBytes, signal);
|
|
77310
77020
|
if (!REDIRECT_STATUSES.has(response.status) || hop >= maxRedirects) {
|
|
77311
77021
|
ctx.res = toHostFetchResponse(response, bodyBytes);
|
|
77312
77022
|
return;
|
|
@@ -77323,9 +77033,22 @@ function buildSafeFetchHandler(options) {
|
|
|
77323
77033
|
ctx.res = toHostFetchResponse(response, bodyBytes);
|
|
77324
77034
|
return;
|
|
77325
77035
|
}
|
|
77036
|
+
const crossOrigin = nextUrl.origin !== new URL(currentUrl).origin;
|
|
77037
|
+
const methodChanges = response.status === 303 || (response.status === 301 || response.status === 302) && currentMethod === "POST";
|
|
77038
|
+
if (crossOrigin || methodChanges) {
|
|
77039
|
+
currentHeaders = { ...currentHeaders };
|
|
77040
|
+
if (crossOrigin) {
|
|
77041
|
+
delete currentHeaders["authorization"];
|
|
77042
|
+
delete currentHeaders["cookie"];
|
|
77043
|
+
delete currentHeaders["proxy-authorization"];
|
|
77044
|
+
}
|
|
77045
|
+
if (methodChanges) {
|
|
77046
|
+
for (const name of Object.keys(currentHeaders)) if (name.startsWith("content-")) delete currentHeaders[name];
|
|
77047
|
+
}
|
|
77048
|
+
}
|
|
77326
77049
|
hop++;
|
|
77327
|
-
await checkRequest(
|
|
77328
|
-
if (
|
|
77050
|
+
await checkRequest(buildSafeFetchRequest(nextUrl, currentMethod, currentHeaders, hop));
|
|
77051
|
+
if (methodChanges) {
|
|
77329
77052
|
currentMethod = "GET";
|
|
77330
77053
|
currentBody = null;
|
|
77331
77054
|
}
|
|
@@ -77588,7 +77311,7 @@ var SearchableMap = class SearchableMap {
|
|
|
77588
77311
|
* found.
|
|
77589
77312
|
*/
|
|
77590
77313
|
get(key) {
|
|
77591
|
-
const node = lookup$
|
|
77314
|
+
const node = lookup$1(this._tree, key);
|
|
77592
77315
|
return node !== void 0 ? node.get(LEAF) : void 0;
|
|
77593
77316
|
}
|
|
77594
77317
|
/**
|
|
@@ -77597,7 +77320,7 @@ var SearchableMap = class SearchableMap {
|
|
|
77597
77320
|
* @return True if the key is in the map, false otherwise
|
|
77598
77321
|
*/
|
|
77599
77322
|
has(key) {
|
|
77600
|
-
const node = lookup$
|
|
77323
|
+
const node = lookup$1(this._tree, key);
|
|
77601
77324
|
return node !== void 0 && node.has(LEAF);
|
|
77602
77325
|
}
|
|
77603
77326
|
/**
|
|
@@ -77724,9 +77447,9 @@ const trackDown = (tree, key, path = []) => {
|
|
|
77724
77447
|
path.push([tree, key]);
|
|
77725
77448
|
return trackDown(void 0, "", path);
|
|
77726
77449
|
};
|
|
77727
|
-
const lookup$
|
|
77450
|
+
const lookup$1 = (tree, key) => {
|
|
77728
77451
|
if (key.length === 0 || tree == null) return tree;
|
|
77729
|
-
for (const k of tree.keys()) if (k !== LEAF && key.startsWith(k)) return lookup$
|
|
77452
|
+
for (const k of tree.keys()) if (k !== LEAF && key.startsWith(k)) return lookup$1(tree.get(k), key.slice(k.length));
|
|
77730
77453
|
};
|
|
77731
77454
|
const createPath = (node, key) => {
|
|
77732
77455
|
const keyLength = key.length;
|
|
@@ -137050,14 +136773,14 @@ function createC8yAuthHeaders(auth) {
|
|
|
137050
136773
|
const EXECUTE_ENTRY_PATH = "/codemode-execute.mjs";
|
|
137051
136774
|
const BLOCKED_REQUEST_PREFIX = "Request blocked by MCP connection policy.";
|
|
137052
136775
|
const SANDBOX_LIMITS = {
|
|
137053
|
-
memoryMb:
|
|
136776
|
+
memoryMb: 24,
|
|
137054
136777
|
cpuTimeMs: 5e4,
|
|
137055
136778
|
wallTimeMs: 12e4,
|
|
137056
136779
|
maxBridgeCalls: 200
|
|
137057
136780
|
};
|
|
137058
136781
|
let sandboxPromise = null;
|
|
137059
136782
|
async function getSandbox() {
|
|
137060
|
-
sandboxPromise ??= createSandbox(
|
|
136783
|
+
sandboxPromise ??= createSandbox();
|
|
137061
136784
|
return sandboxPromise;
|
|
137062
136785
|
}
|
|
137063
136786
|
process$1.once("exit", () => {
|
|
@@ -137534,18 +137257,18 @@ function clearActiveTenant() {
|
|
|
137534
137257
|
writeFileSync(CONFIG_FILE, JSON.stringify({ tenantUrl: null }), "utf8");
|
|
137535
137258
|
}
|
|
137536
137259
|
//#endregion
|
|
137537
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
137260
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js
|
|
137538
137261
|
const win32Sep = "\\";
|
|
137539
137262
|
function convertPathToPosix(filePath) {
|
|
137540
137263
|
if (filePath.startsWith("\\\\?\\")) return filePath;
|
|
137541
137264
|
return filePath.split(win32Sep).join("/");
|
|
137542
137265
|
}
|
|
137543
137266
|
//#endregion
|
|
137544
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
137267
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/is-windows.js
|
|
137545
137268
|
const isWindowsConst = /^win/.test(globalThis.process ? globalThis.process.platform : "");
|
|
137546
137269
|
const isWindows = () => isWindowsConst;
|
|
137547
137270
|
//#endregion
|
|
137548
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
137271
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js
|
|
137549
137272
|
const forwardSlashPattern = /\//g;
|
|
137550
137273
|
const protocolPattern = /^(\w{2,}):\/\//i;
|
|
137551
137274
|
const jsonPointerSlash = /~1/g;
|
|
@@ -137949,7 +137672,7 @@ function safePointerToPath(pointer) {
|
|
|
137949
137672
|
});
|
|
137950
137673
|
}
|
|
137951
137674
|
//#endregion
|
|
137952
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
137675
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/errors.js
|
|
137953
137676
|
const nonJsonTypes = [
|
|
137954
137677
|
"function",
|
|
137955
137678
|
"symbol",
|
|
@@ -137995,8 +137718,8 @@ var JSONParserError = class extends Error {
|
|
|
137995
137718
|
source;
|
|
137996
137719
|
path;
|
|
137997
137720
|
code;
|
|
137998
|
-
constructor(message, source) {
|
|
137999
|
-
super();
|
|
137721
|
+
constructor(message, source, options) {
|
|
137722
|
+
super(void 0, options);
|
|
138000
137723
|
this.code = "EUNKNOWN";
|
|
138001
137724
|
this.name = "JSONParserError";
|
|
138002
137725
|
this.message = message;
|
|
@@ -138036,8 +137759,8 @@ var JSONParserErrorGroup = class JSONParserErrorGroup extends Error {
|
|
|
138036
137759
|
var ParserError = class extends JSONParserError {
|
|
138037
137760
|
code = "EPARSER";
|
|
138038
137761
|
name = "ParserError";
|
|
138039
|
-
constructor(message, source) {
|
|
138040
|
-
super(`Error parsing ${source}: ${message}`, source);
|
|
137762
|
+
constructor(message, source, options) {
|
|
137763
|
+
super(`Error parsing ${source}: ${message}`, source, options);
|
|
138041
137764
|
}
|
|
138042
137765
|
};
|
|
138043
137766
|
var UnmatchedParserError = class extends JSONParserError {
|
|
@@ -138051,8 +137774,8 @@ var ResolverError = class extends JSONParserError {
|
|
|
138051
137774
|
code = "ERESOLVER";
|
|
138052
137775
|
name = "ResolverError";
|
|
138053
137776
|
ioErrorCode;
|
|
138054
|
-
constructor(ex, source) {
|
|
138055
|
-
super(ex.message || `Error reading file "${source}"`, source);
|
|
137777
|
+
constructor(ex, source, options) {
|
|
137778
|
+
super(ex.message || `Error reading file "${source}"`, source, options);
|
|
138056
137779
|
if ("code" in ex) this.ioErrorCode = String(ex.code);
|
|
138057
137780
|
}
|
|
138058
137781
|
};
|
|
@@ -138100,7 +137823,7 @@ function normalizeError(err) {
|
|
|
138100
137823
|
return err;
|
|
138101
137824
|
}
|
|
138102
137825
|
//#endregion
|
|
138103
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
137826
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/schema-resources.js
|
|
138104
137827
|
function getSchemaBasePath(basePath, value, legacyId = false) {
|
|
138105
137828
|
const schemaId = getSchemaId(value, legacyId);
|
|
138106
137829
|
return schemaId ? resolve$1(basePath, schemaId) : basePath;
|
|
@@ -138146,7 +137869,7 @@ function getSchemaIdMode(value, inheritedLegacyId = false) {
|
|
|
138146
137869
|
return inheritedLegacyId;
|
|
138147
137870
|
}
|
|
138148
137871
|
//#endregion
|
|
138149
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
137872
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/pointer.js
|
|
138150
137873
|
const nullSymbol = Symbol("null");
|
|
138151
137874
|
const slashes = /\//g;
|
|
138152
137875
|
const tildes = /~/g;
|
|
@@ -138253,11 +137976,11 @@ var Pointer = class Pointer {
|
|
|
138253
137976
|
const parentPath = pathFromRoot?.replace(path, "");
|
|
138254
137977
|
throw new MissingPointerError(token, safelyDecodeURI$1(this.originalPath), targetRef, targetFound, parentPath);
|
|
138255
137978
|
}
|
|
138256
|
-
if (this.value[token] === void 0 || this.value[token] === null && i === tokens.length - 1) {
|
|
137979
|
+
if (!Object.hasOwn(this.value, token) || this.value[token] === void 0 || this.value[token] === null && i === tokens.length - 1) {
|
|
138257
137980
|
let didFindSubstringSlashMatch = false;
|
|
138258
137981
|
for (let j = tokens.length - 1; j > i; j--) {
|
|
138259
137982
|
const joinedToken = tokens.slice(i, j + 1).join("/");
|
|
138260
|
-
if (this.value[joinedToken] !== void 0) {
|
|
137983
|
+
if (Object.hasOwn(this.value, joinedToken) && this.value[joinedToken] !== void 0) {
|
|
138261
137984
|
this.value = this.value[joinedToken];
|
|
138262
137985
|
i = j;
|
|
138263
137986
|
didFindSubstringSlashMatch = true;
|
|
@@ -138268,7 +137991,7 @@ var Pointer = class Pointer {
|
|
|
138268
137991
|
this.chainCircular = wasChainCircular;
|
|
138269
137992
|
continue;
|
|
138270
137993
|
}
|
|
138271
|
-
if (
|
|
137994
|
+
if (Object.hasOwn(this.value, token) && this.value[token] === null) {
|
|
138272
137995
|
this.value = nullSymbol;
|
|
138273
137996
|
this.chainCircular = wasChainCircular;
|
|
138274
137997
|
continue;
|
|
@@ -138322,7 +138045,7 @@ var Pointer = class Pointer {
|
|
|
138322
138045
|
for (let i = 0; i < tokens.length - 1; i++) {
|
|
138323
138046
|
resolveIf$Ref(this, options);
|
|
138324
138047
|
token = tokens[i];
|
|
138325
|
-
if (this.value && this.value[token] !== void 0) this.value = this.value[token];
|
|
138048
|
+
if (this.value && Object.hasOwn(this.value, token) && this.value[token] !== void 0) this.value = this.value[token];
|
|
138326
138049
|
else this.value = setValue(this, token, {});
|
|
138327
138050
|
if (this.$ref.dynamicIdScope) {
|
|
138328
138051
|
this.legacyIdScope = getSchemaIdMode(this.value, this.legacyIdScope);
|
|
@@ -138471,7 +138194,7 @@ function isAliasedResource($ref) {
|
|
|
138471
138194
|
return Boolean($ref.path && $ref.path in $ref.$refs._aliases);
|
|
138472
138195
|
}
|
|
138473
138196
|
//#endregion
|
|
138474
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
138197
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/ref.js
|
|
138475
138198
|
/**
|
|
138476
138199
|
* This class represents a single JSON reference and its resolved value.
|
|
138477
138200
|
*
|
|
@@ -138752,7 +138475,7 @@ function defineDataProperty$1(target, key, value) {
|
|
|
138752
138475
|
});
|
|
138753
138476
|
}
|
|
138754
138477
|
//#endregion
|
|
138755
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
138478
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/refs.js
|
|
138756
138479
|
/**
|
|
138757
138480
|
* When you call the resolve method, the value that gets passed to the callback function (or Promise) is a $Refs object. This same object is accessible via the parser.$refs property of $RefParser objects.
|
|
138758
138481
|
*
|
|
@@ -138961,7 +138684,7 @@ function getPaths($refs, types) {
|
|
|
138961
138684
|
});
|
|
138962
138685
|
}
|
|
138963
138686
|
//#endregion
|
|
138964
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
138687
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/plugins.js
|
|
138965
138688
|
/**
|
|
138966
138689
|
* Returns the given plugins as an array, rather than an object map.
|
|
138967
138690
|
* All other methods in this module expect an array of plugins rather than an object map.
|
|
@@ -139070,7 +138793,7 @@ function getResult(obj, prop, file, callback, $refs) {
|
|
|
139070
138793
|
return value;
|
|
139071
138794
|
}
|
|
139072
138795
|
//#endregion
|
|
139073
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
138796
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parse.js
|
|
139074
138797
|
/**
|
|
139075
138798
|
* Reads and parses the specified file path or URL.
|
|
139076
138799
|
*/
|
|
@@ -139132,7 +138855,7 @@ async function readFile(file, options, $refs) {
|
|
|
139132
138855
|
if (!err && options.continueOnError) throw new UnmatchedResolverError(file.url);
|
|
139133
138856
|
else if (!err || !("error" in err)) throw new SyntaxError(`Unable to resolve $ref pointer "${file.url}"`, { cause: err });
|
|
139134
138857
|
else if (err.error instanceof ResolverError) throw err.error;
|
|
139135
|
-
else throw new ResolverError(err, file.url);
|
|
138858
|
+
else throw new ResolverError(err.error instanceof Error ? err.error : new Error(String(err.error)), file.url, { cause: err.error });
|
|
139136
138859
|
}
|
|
139137
138860
|
}
|
|
139138
138861
|
/**
|
|
@@ -139162,7 +138885,7 @@ async function parseFile(file, options, $refs) {
|
|
|
139162
138885
|
else if (err && err.message && err.message.startsWith("Error parsing")) throw err;
|
|
139163
138886
|
else if (!err || !("error" in err)) throw new SyntaxError(`Unable to parse ${file.url}`, { cause: err });
|
|
139164
138887
|
else if (err.error instanceof ParserError) throw err.error;
|
|
139165
|
-
else throw new ParserError(err.error.
|
|
138888
|
+
else throw new ParserError(err.error?.message ?? String(err.error), file.url, { cause: err.error });
|
|
139166
138889
|
}
|
|
139167
138890
|
}
|
|
139168
138891
|
/**
|
|
@@ -139172,10 +138895,10 @@ async function parseFile(file, options, $refs) {
|
|
|
139172
138895
|
* @returns
|
|
139173
138896
|
*/
|
|
139174
138897
|
function isEmpty(value) {
|
|
139175
|
-
return value === void 0 || typeof value === "object" && Object.keys(value).length === 0 || typeof value === "string" && value.trim().length === 0 || Buffer.isBuffer(value) && value.length === 0;
|
|
138898
|
+
return value === void 0 || value === null || typeof value === "object" && Object.keys(value).length === 0 || typeof value === "string" && value.trim().length === 0 || Buffer.isBuffer(value) && value.length === 0;
|
|
139176
138899
|
}
|
|
139177
138900
|
//#endregion
|
|
139178
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
138901
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/json.js
|
|
139179
138902
|
var json_default = {
|
|
139180
138903
|
/**
|
|
139181
138904
|
* The order that this parser will run, in relation to other parsers.
|
|
@@ -139214,8 +138937,8 @@ var json_default = {
|
|
|
139214
138937
|
}
|
|
139215
138938
|
};
|
|
139216
138939
|
//#endregion
|
|
139217
|
-
//#region node_modules/.pnpm/js-yaml@5.
|
|
139218
|
-
/*! js-yaml 5.
|
|
138940
|
+
//#region node_modules/.pnpm/js-yaml@5.4.1/node_modules/js-yaml/dist/js-yaml.mjs
|
|
138941
|
+
/*! js-yaml 5.4.1 https://github.com/nodeca/js-yaml @license MIT */
|
|
139219
138942
|
/**
|
|
139220
138943
|
* Returned by a scalar resolver when the source does not match its tag.
|
|
139221
138944
|
*
|
|
@@ -140631,24 +140354,32 @@ function collectionTagName(state, event, defaultTagName) {
|
|
|
140631
140354
|
function isMappingTag(tag) {
|
|
140632
140355
|
return tag.nodeKind === "mapping";
|
|
140633
140356
|
}
|
|
140357
|
+
function chargeMergeWork(state) {
|
|
140358
|
+
state.totalMergeKeys++;
|
|
140359
|
+
if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) throwError$1(state, `merge keys exceeded maxTotalMergeKeys (${state.maxTotalMergeKeys})`);
|
|
140360
|
+
}
|
|
140634
140361
|
function mergeKeys(state, frame, source, sourceTag) {
|
|
140362
|
+
chargeMergeWork(state);
|
|
140635
140363
|
for (const sourceKey of sourceTag.keys(source)) {
|
|
140636
|
-
|
|
140364
|
+
chargeMergeWork(state);
|
|
140637
140365
|
if (frame.tag.has(frame.value, sourceKey)) continue;
|
|
140638
140366
|
const err = frame.tag.addPair(frame.value, sourceKey, sourceTag.get(source, sourceKey));
|
|
140639
140367
|
if (err) throwError$1(state, err);
|
|
140640
|
-
|
|
140368
|
+
frame.overridable ??= /* @__PURE__ */ new Set();
|
|
140369
|
+
frame.overridable.add(sourceKey);
|
|
140641
140370
|
}
|
|
140642
140371
|
}
|
|
140643
140372
|
function mergeSource(state, frame, source, sourceTag) {
|
|
140644
140373
|
state.position = frame.keyPosition;
|
|
140645
140374
|
if (isMappingTag(sourceTag)) mergeKeys(state, frame, source, sourceTag);
|
|
140646
|
-
else if (sourceTag.nodeKind === "sequence" && Array.isArray(source))
|
|
140647
|
-
|
|
140648
|
-
|
|
140649
|
-
|
|
140650
|
-
|
|
140651
|
-
|
|
140375
|
+
else if (sourceTag.nodeKind === "sequence" && Array.isArray(source)) {
|
|
140376
|
+
if (source.length > 100) throwError$1(state, "abnormal merge sequence size");
|
|
140377
|
+
for (const element of source) {
|
|
140378
|
+
const elementTag = state.nodeTags.get(element);
|
|
140379
|
+
if (!elementTag) throwError$1(state, "cannot merge mappings; the provided source object is unacceptable");
|
|
140380
|
+
mergeKeys(state, frame, element, elementTag);
|
|
140381
|
+
}
|
|
140382
|
+
} else throwError$1(state, "cannot merge mappings; the provided source object is unacceptable");
|
|
140652
140383
|
}
|
|
140653
140384
|
function addMappingValue(state, frame, key, value, tag) {
|
|
140654
140385
|
state.position = frame.keyPosition;
|
|
@@ -140997,6 +140728,24 @@ function testDocumentSeparator(state, position = state.position) {
|
|
|
140997
140728
|
}
|
|
140998
140729
|
return false;
|
|
140999
140730
|
}
|
|
140731
|
+
function skipByteOrderMark(state) {
|
|
140732
|
+
if (state.position === state.lineStart && state.input.charCodeAt(state.position) === 65279) {
|
|
140733
|
+
state.position++;
|
|
140734
|
+
state.lineStart = state.position;
|
|
140735
|
+
}
|
|
140736
|
+
}
|
|
140737
|
+
function testDocumentBoundary(state) {
|
|
140738
|
+
if (state.position !== state.lineStart) return false;
|
|
140739
|
+
if (testDocumentSeparator(state)) return true;
|
|
140740
|
+
if (state.input.charCodeAt(state.position) !== 65279) return false;
|
|
140741
|
+
const snapshot = snapshotState(state);
|
|
140742
|
+
skipByteOrderMark(state);
|
|
140743
|
+
skipSeparationSpace(state, true);
|
|
140744
|
+
const ch = state.input.charCodeAt(state.position);
|
|
140745
|
+
const result = state.position === state.lineStart && (ch === 37 || ch === 45 && testDocumentSeparator(state));
|
|
140746
|
+
restoreState(state, snapshot);
|
|
140747
|
+
return result;
|
|
140748
|
+
}
|
|
141000
140749
|
function skipUntilLineEnd(state) {
|
|
141001
140750
|
let ch = state.input.charCodeAt(state.position);
|
|
141002
140751
|
while (ch !== 0 && !isEol(ch)) ch = state.input.charCodeAt(++state.position);
|
|
@@ -141180,7 +140929,7 @@ function readBlockScalar(state, parentIndent, props) {
|
|
|
141180
140929
|
} else if (column > 0) valueEnd = linePosition + column;
|
|
141181
140930
|
break;
|
|
141182
140931
|
}
|
|
141183
|
-
if (
|
|
140932
|
+
if (testDocumentBoundary(state)) break;
|
|
141184
140933
|
if (!detectedIndent && contentIndent === -1 && isEol(first)) maxLeadingIndent = Math.max(maxLeadingIndent, column);
|
|
141185
140934
|
if (!detectedIndent && contentIndent === -1 && !isEol(first)) {
|
|
141186
140935
|
if (first === 9 && column < parentIndent) {
|
|
@@ -141233,7 +140982,7 @@ function readPlainScalar(state, nodeIndent, nodeContext, props) {
|
|
|
141233
140982
|
const inFlow = nodeContext === CONTEXT_FLOW_IN;
|
|
141234
140983
|
let multiline = false;
|
|
141235
140984
|
while (ch !== 0) {
|
|
141236
|
-
if (
|
|
140985
|
+
if (testDocumentBoundary(state)) break;
|
|
141237
140986
|
if (ch === 58) {
|
|
141238
140987
|
const following = state.input.charCodeAt(state.position + 1);
|
|
141239
140988
|
if (isWsOrEolOrEnd(following) || inFlow && isFlowIndicator(following)) break;
|
|
@@ -141590,7 +141339,7 @@ function readDocument(state) {
|
|
|
141590
141339
|
const documentEvent = state.events[documentEventIndex];
|
|
141591
141340
|
if (documentEvent?.type === EVENT_ID.DOCUMENT) documentEvent.explicitEnd = explicitEnd;
|
|
141592
141341
|
addPopEvent(state);
|
|
141593
|
-
if (!explicitEnd && state.position < state.length && !(state
|
|
141342
|
+
if (!explicitEnd && state.position < state.length && !testDocumentBoundary(state)) throwError(state, "end of the stream or a document separator is expected");
|
|
141594
141343
|
}
|
|
141595
141344
|
/**
|
|
141596
141345
|
* Parses YAML into a flat event stream referencing source text by offsets.
|
|
@@ -141616,8 +141365,8 @@ function parseEvents(input, options) {
|
|
|
141616
141365
|
};
|
|
141617
141366
|
const nullpos = input.indexOf("\0");
|
|
141618
141367
|
if (nullpos !== -1) YAMLException.throwAt(input, nullpos, "null byte is not allowed in input", state.filename);
|
|
141619
|
-
if (state.input.charCodeAt(state.position) === 65279) state.position++;
|
|
141620
141368
|
while (state.position < state.length) {
|
|
141369
|
+
skipByteOrderMark(state);
|
|
141621
141370
|
skipSeparationSpace(state, true);
|
|
141622
141371
|
if (state.position >= state.length) break;
|
|
141623
141372
|
const documentStart = state.position;
|
|
@@ -141689,22 +141438,111 @@ function load(input, options) {
|
|
|
141689
141438
|
if (documents.length === 1) return documents[0];
|
|
141690
141439
|
throw new YAMLException("expected a single document in the stream, but found more");
|
|
141691
141440
|
}
|
|
141692
|
-
|
|
141693
|
-
|
|
141694
|
-
|
|
141695
|
-
|
|
141696
|
-
|
|
141697
|
-
|
|
141698
|
-
|
|
141699
|
-
|
|
141700
|
-
|
|
141701
|
-
|
|
141702
|
-
|
|
141703
|
-
|
|
141704
|
-
|
|
141705
|
-
|
|
141706
|
-
|
|
141707
|
-
|
|
141441
|
+
function hasBit(mask, bit) {
|
|
141442
|
+
return (mask & 1 << bit) !== 0;
|
|
141443
|
+
}
|
|
141444
|
+
/**
|
|
141445
|
+
* Default scalar styling rules in application order.
|
|
141446
|
+
* See [Scalar styling](../../docs/scalar_styling.md) for usage details.
|
|
141447
|
+
*
|
|
141448
|
+
* @category AST
|
|
141449
|
+
*/
|
|
141450
|
+
var DEFAULT_SCALAR_STYLE_RULES = {
|
|
141451
|
+
applyQuoteFlowKeysOption,
|
|
141452
|
+
doubleQuoteForInvisibles,
|
|
141453
|
+
doubleQuoteWhitespaceOnly,
|
|
141454
|
+
applyForceQuotesOption,
|
|
141455
|
+
tryLongOrMultilineAsBlock,
|
|
141456
|
+
quoteInvalidPlain,
|
|
141457
|
+
fallbackToDoubleQuoted
|
|
141458
|
+
};
|
|
141459
|
+
function _preferredQuotedStyle(layout) {
|
|
141460
|
+
if (layout.presenterOptions.quoteStyle === "single" && hasBit(layout.allowedStylesMask, SCALAR_STYLE.SINGLE_QUOTED)) return SCALAR_STYLE.SINGLE_QUOTED;
|
|
141461
|
+
return SCALAR_STYLE.DOUBLE_QUOTED;
|
|
141462
|
+
}
|
|
141463
|
+
function applyQuoteFlowKeysOption(layout) {
|
|
141464
|
+
if (!layout.presenterOptions.quoteFlowKeys) return;
|
|
141465
|
+
if (!layout.isKey || !layout.flowOnly || layout.style !== SCALAR_STYLE.PLAIN) return;
|
|
141466
|
+
layout.style = SCALAR_STYLE.DOUBLE_QUOTED;
|
|
141467
|
+
}
|
|
141468
|
+
function doubleQuoteForInvisibles(layout) {
|
|
141469
|
+
if (layout.style === SCALAR_STYLE.PLAIN && /[\t\x7F-\xA0\u2028\u2029\uFEFF\uFFFE\uFFFF]/.test(layout.node.value)) layout.style = SCALAR_STYLE.DOUBLE_QUOTED;
|
|
141470
|
+
}
|
|
141471
|
+
function doubleQuoteWhitespaceOnly(layout) {
|
|
141472
|
+
if (layout.style === SCALAR_STYLE.PLAIN && /^\s+$/.test(layout.node.value)) layout.style = SCALAR_STYLE.DOUBLE_QUOTED;
|
|
141473
|
+
}
|
|
141474
|
+
function applyForceQuotesOption(layout) {
|
|
141475
|
+
if (!layout.presenterOptions.forceQuotes) return;
|
|
141476
|
+
if (layout.isKey || layout.style !== SCALAR_STYLE.PLAIN) return;
|
|
141477
|
+
layout.style = layout.node.value.includes("\n") ? SCALAR_STYLE.DOUBLE_QUOTED : _preferredQuotedStyle(layout);
|
|
141478
|
+
}
|
|
141479
|
+
function tryLongOrMultilineAsBlock(layout) {
|
|
141480
|
+
if (layout.style !== SCALAR_STYLE.PLAIN || layout.isKey) return;
|
|
141481
|
+
const value = layout.node.value;
|
|
141482
|
+
const multiline = value.indexOf("\n") !== -1;
|
|
141483
|
+
if (!hasBit(layout.allowedStylesMask, SCALAR_STYLE.LITERAL_BLOCK)) {
|
|
141484
|
+
if (multiline) layout.style = SCALAR_STYLE.DOUBLE_QUOTED;
|
|
141485
|
+
return;
|
|
141486
|
+
}
|
|
141487
|
+
const w = layout.presenterOptions.lineWidth;
|
|
141488
|
+
if (w === -1) {
|
|
141489
|
+
if (multiline) layout.style = SCALAR_STYLE.LITERAL_BLOCK;
|
|
141490
|
+
return;
|
|
141491
|
+
}
|
|
141492
|
+
const availableWidth = Math.max(Math.min(w, 40), w - layout.shiftOfContent);
|
|
141493
|
+
let position = 0;
|
|
141494
|
+
let shouldFold = false;
|
|
141495
|
+
while (position <= value.length) {
|
|
141496
|
+
let lineEnd = value.length;
|
|
141497
|
+
const nextLineBreak = value.indexOf("\n", position);
|
|
141498
|
+
if (nextLineBreak !== -1) lineEnd = nextLineBreak;
|
|
141499
|
+
const line = value.slice(position, lineEnd);
|
|
141500
|
+
if (line.length > availableWidth && line[0] !== " " && / [^ \t]/.test(line)) shouldFold = true;
|
|
141501
|
+
if (nextLineBreak === -1) break;
|
|
141502
|
+
position = nextLineBreak + 1;
|
|
141503
|
+
}
|
|
141504
|
+
if (shouldFold) layout.style = SCALAR_STYLE.FOLDED_BLOCK;
|
|
141505
|
+
else if (multiline) layout.style = SCALAR_STYLE.LITERAL_BLOCK;
|
|
141506
|
+
}
|
|
141507
|
+
function quoteInvalidPlain(layout) {
|
|
141508
|
+
if (layout.style === SCALAR_STYLE.PLAIN && !hasBit(layout.allowedStylesMask, SCALAR_STYLE.PLAIN)) layout.style = _preferredQuotedStyle(layout);
|
|
141509
|
+
}
|
|
141510
|
+
function fallbackToDoubleQuoted(layout) {
|
|
141511
|
+
if (!hasBit(layout.allowedStylesMask, layout.style)) layout.style = SCALAR_STYLE.DOUBLE_QUOTED;
|
|
141512
|
+
}
|
|
141513
|
+
var SRC_C_PRINTABLE = "[\\x09\\x0A\\x0D\\x20-\\x7E\\x85\\xA0-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]";
|
|
141514
|
+
var SRC_B_CHAR = "[\\n\\r]";
|
|
141515
|
+
var SRC_C_BYTE_ORDER_MARK = "\\uFEFF";
|
|
141516
|
+
var SRC_S_WHITE = "[ \\t]";
|
|
141517
|
+
var SRC_NB_CHAR = `(?:(?!(?:${SRC_B_CHAR}|${SRC_C_BYTE_ORDER_MARK}))${SRC_C_PRINTABLE})`;
|
|
141518
|
+
var SRC_NS_CHAR = `(?:(?!${SRC_S_WHITE})${SRC_NB_CHAR})`;
|
|
141519
|
+
var SRC_NB_JSON = "[\\x09\\x20-\\uD7FF\\uE000-\\uFFFF\\u{10000}-\\u{10FFFF}]";
|
|
141520
|
+
var SRC_C_INDICATOR = "[-?:,\\[\\]{}#&*!|>'\"%@`]";
|
|
141521
|
+
var SRC_C_FLOW_INDICATOR = "[,\\[\\]{}]";
|
|
141522
|
+
var SRC_NS_PLAIN_SAFE_FLOW_OUT = SRC_NS_CHAR;
|
|
141523
|
+
var SRC_NS_PLAIN_SAFE_FLOW_IN = `(?:(?!${SRC_C_FLOW_INDICATOR})${SRC_NS_CHAR})`;
|
|
141524
|
+
var SRC_NS_PLAIN_FIRST_FLOW_OUT = `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))`;
|
|
141525
|
+
var SRC_NS_PLAIN_FIRST_FLOW_IN = `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))`;
|
|
141526
|
+
var SRC_NS_PLAIN_CHAR_FLOW_OUT = `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_OUT})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))#*`;
|
|
141527
|
+
var SRC_NS_PLAIN_CHAR_FLOW_IN = `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_IN})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))#*`;
|
|
141528
|
+
var SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_OUT})*`;
|
|
141529
|
+
var SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_IN})*`;
|
|
141530
|
+
var SRC_NS_PLAIN_ONE_LINE_FLOW_OUT = `${SRC_NS_PLAIN_FIRST_FLOW_OUT}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`;
|
|
141531
|
+
var SRC_NS_PLAIN_ONE_LINE_FLOW_IN = `${SRC_NS_PLAIN_FIRST_FLOW_IN}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`;
|
|
141532
|
+
var SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_OUT;
|
|
141533
|
+
var SRC_NS_PLAIN_ONE_LINE_FLOW_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_IN;
|
|
141534
|
+
var SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT = `\\n+${SRC_NS_PLAIN_CHAR_FLOW_OUT}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`;
|
|
141535
|
+
var SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN = `\\n+${SRC_NS_PLAIN_CHAR_FLOW_IN}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`;
|
|
141536
|
+
var SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT = `${SRC_NS_PLAIN_ONE_LINE_FLOW_OUT}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT})*`;
|
|
141537
|
+
var SRC_NS_PLAIN_MULTI_LINE_FLOW_IN = `${SRC_NS_PLAIN_ONE_LINE_FLOW_IN}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN})*`;
|
|
141538
|
+
new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT})$`, "u");
|
|
141539
|
+
new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_IN})$`, "u");
|
|
141540
|
+
new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY})$`, "u");
|
|
141541
|
+
new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_FLOW_KEY})$`, "u");
|
|
141542
|
+
new RegExp(`^(?:${SRC_NB_JSON})*$`, "u");
|
|
141543
|
+
new RegExp(`^(?:${SRC_NB_JSON}|\\n)*$`, "u");
|
|
141544
|
+
new RegExp(`^(?:${SRC_NB_CHAR}|\\n)*$`, "u");
|
|
141545
|
+
Object.keys(DEFAULT_SCALAR_STYLE_RULES).map((name) => Reflect.get(DEFAULT_SCALAR_STYLE_RULES, name));
|
|
141708
141546
|
EVENT_ID.DOCUMENT;
|
|
141709
141547
|
EVENT_ID.SEQUENCE;
|
|
141710
141548
|
EVENT_ID.MAPPING;
|
|
@@ -141722,7 +141560,7 @@ CHOMPING_MODE.CLIP;
|
|
|
141722
141560
|
CHOMPING_MODE.STRIP;
|
|
141723
141561
|
CHOMPING_MODE.KEEP;
|
|
141724
141562
|
//#endregion
|
|
141725
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
141563
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/yaml.js
|
|
141726
141564
|
const legacyDefaultSchema = CORE_SCHEMA.withTags(timestampTag, mergeTag, binaryTag, omapTag, pairsTag, setTag);
|
|
141727
141565
|
var yaml_default = {
|
|
141728
141566
|
/**
|
|
@@ -141772,7 +141610,7 @@ var yaml_default = {
|
|
|
141772
141610
|
}
|
|
141773
141611
|
};
|
|
141774
141612
|
//#endregion
|
|
141775
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
141613
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/text.js
|
|
141776
141614
|
const TEXT_REGEXP = /\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)(?:[?#].*)?$/i;
|
|
141777
141615
|
var text_default = {
|
|
141778
141616
|
/**
|
|
@@ -141806,7 +141644,7 @@ var text_default = {
|
|
|
141806
141644
|
}
|
|
141807
141645
|
};
|
|
141808
141646
|
//#endregion
|
|
141809
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
141647
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/binary.js
|
|
141810
141648
|
const BINARY_REGEXP = /\.(jpeg|jpg|gif|png|bmp|ico)(?:[?#].*)?$/i;
|
|
141811
141649
|
var binary_default = {
|
|
141812
141650
|
/**
|
|
@@ -141835,7 +141673,7 @@ var binary_default = {
|
|
|
141835
141673
|
}
|
|
141836
141674
|
};
|
|
141837
141675
|
//#endregion
|
|
141838
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
141676
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/file.js
|
|
141839
141677
|
var file_default = {
|
|
141840
141678
|
/**
|
|
141841
141679
|
* The order that this resolver will run, in relation to other resolvers.
|
|
@@ -141873,7 +141711,7 @@ var file_default = {
|
|
|
141873
141711
|
}
|
|
141874
141712
|
};
|
|
141875
141713
|
//#endregion
|
|
141876
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
141714
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/http.js
|
|
141877
141715
|
var http_default = {
|
|
141878
141716
|
/**
|
|
141879
141717
|
* The order that this resolver will run, in relation to other resolvers.
|
|
@@ -141976,6 +141814,8 @@ async function download(u, httpOptions, _redirects) {
|
|
|
141976
141814
|
throw new ResolverError(wrappedError, u.href);
|
|
141977
141815
|
} finally {
|
|
141978
141816
|
pendingResponse?.cancelTimeout();
|
|
141817
|
+
const response = pendingResponse?.response;
|
|
141818
|
+
if (response?.body && !response.bodyUsed) await response.body.cancel().catch(() => void 0);
|
|
141979
141819
|
}
|
|
141980
141820
|
}
|
|
141981
141821
|
/**
|
|
@@ -142025,7 +141865,7 @@ async function get(u, httpOptions, resolvedAddresses) {
|
|
|
142025
141865
|
* header and TLS SNI/certificate verification.
|
|
142026
141866
|
*/
|
|
142027
141867
|
async function createPinnedTransport(requestUrl, resolvedAddresses) {
|
|
142028
|
-
const undici = await import("./undici-
|
|
141868
|
+
const undici = await import("./undici-C4eXkUym.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
|
|
142029
141869
|
const expectedHostname = normalizeLookupHostname(requestUrl.hostname);
|
|
142030
141870
|
const pinnedAddresses = resolvedAddresses.map(({ address, family }) => ({
|
|
142031
141871
|
address,
|
|
@@ -142071,7 +141911,7 @@ function withoutSensitiveHeaders(httpOptions) {
|
|
|
142071
141911
|
};
|
|
142072
141912
|
}
|
|
142073
141913
|
//#endregion
|
|
142074
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
141914
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/options.js
|
|
142075
141915
|
const getJsonSchemaRefParserDefaultOptions = () => {
|
|
142076
141916
|
return {
|
|
142077
141917
|
/**
|
|
@@ -142188,11 +142028,12 @@ function isMergeable(val) {
|
|
|
142188
142028
|
return val && typeof val === "object" && !Array.isArray(val) && !(val instanceof RegExp) && !(val instanceof Date) && !(typeof Headers !== "undefined" && val instanceof Headers);
|
|
142189
142029
|
}
|
|
142190
142030
|
//#endregion
|
|
142191
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
142031
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/normalize-args.js
|
|
142192
142032
|
/**
|
|
142193
142033
|
* Normalizes the given arguments, accounting for optional args.
|
|
142034
|
+
* Operations that delegate to parse can defer cloning until that call.
|
|
142194
142035
|
*/
|
|
142195
|
-
function normalizeArgs(_args) {
|
|
142036
|
+
function normalizeArgs(_args, cloneSchema = true) {
|
|
142196
142037
|
let path;
|
|
142197
142038
|
let schema;
|
|
142198
142039
|
let options;
|
|
@@ -142213,12 +142054,8 @@ function normalizeArgs(_args) {
|
|
|
142213
142054
|
schema = args[0];
|
|
142214
142055
|
options = args[1];
|
|
142215
142056
|
}
|
|
142216
|
-
|
|
142217
|
-
|
|
142218
|
-
} catch (e) {
|
|
142219
|
-
console.error(`JSON Schema Ref Parser: Error normalizing options: ${e}`);
|
|
142220
|
-
}
|
|
142221
|
-
if (!options.mutateInputSchema && typeof schema === "object") schema = JSON.parse(JSON.stringify(schema));
|
|
142057
|
+
options = getNewOptions(options);
|
|
142058
|
+
if (cloneSchema && !options.mutateInputSchema && typeof schema === "object") schema = structuredClone(schema);
|
|
142222
142059
|
return {
|
|
142223
142060
|
path,
|
|
142224
142061
|
schema,
|
|
@@ -142227,7 +142064,7 @@ function normalizeArgs(_args) {
|
|
|
142227
142064
|
};
|
|
142228
142065
|
}
|
|
142229
142066
|
//#endregion
|
|
142230
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
142067
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolve-external/with-matcher.js
|
|
142231
142068
|
async function resolveExternalWithMatcher(parser, options, excludedPathMatcher) {
|
|
142232
142069
|
const rootPath = parser.$refs._root$Ref.path;
|
|
142233
142070
|
const rootScopeBase = parser.$refs._root$Ref.dynamicIdScope ? getSchemaBasePath(rootPath, parser.schema, parser.$refs._root$Ref.legacyIdScope) : rootPath;
|
|
@@ -142637,7 +142474,7 @@ function defineLazyProperty(object, key, get) {
|
|
|
142637
142474
|
});
|
|
142638
142475
|
}
|
|
142639
142476
|
//#endregion
|
|
142640
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
142477
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolve-external.js
|
|
142641
142478
|
/**
|
|
142642
142479
|
* Crawls the JSON schema, finds all external JSON references, and resolves their values.
|
|
142643
142480
|
* This method does not mutate the JSON schema. The resolved values are added to {@link $RefParser#$refs}.
|
|
@@ -142736,7 +142573,7 @@ async function resolve$Ref($ref, path, scopeBase, dynamicIdScope, $refs, options
|
|
|
142736
142573
|
}
|
|
142737
142574
|
}
|
|
142738
142575
|
//#endregion
|
|
142739
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
142576
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/bundle.js
|
|
142740
142577
|
/**
|
|
142741
142578
|
* Bundles all external JSON references into the main JSON schema, thus resulting in a schema that
|
|
142742
142579
|
* only has *internal* references, not any *external* references.
|
|
@@ -143022,7 +142859,7 @@ function containsObject(root, target) {
|
|
|
143022
142859
|
return visit(root);
|
|
143023
142860
|
}
|
|
143024
142861
|
//#endregion
|
|
143025
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
142862
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/dereference.js
|
|
143026
142863
|
var dereference_default = dereference$1;
|
|
143027
142864
|
/**
|
|
143028
142865
|
* Crawls the JSON schema, finds all JSON references, and dereferences them.
|
|
@@ -143097,7 +142934,7 @@ function crawl(obj, path, scopeBase, dynamicIdScope, legacyIdScope, pathFromRoot
|
|
|
143097
142934
|
if (derefOptions?.cloneReferences && !circular && assignedValue && typeof assignedValue === "object") assignedValue = structuredClone(assignedValue);
|
|
143098
142935
|
obj[key] = assignedValue;
|
|
143099
142936
|
if (derefOptions?.preservedProperties) {
|
|
143100
|
-
if (preserved.size && typeof obj[key] === "object" && !Array.isArray(obj[key])) preserved.forEach((value, prop) => {
|
|
142937
|
+
if (preserved.size && obj[key] !== null && typeof obj[key] === "object" && !Array.isArray(obj[key])) preserved.forEach((value, prop) => {
|
|
143101
142938
|
obj[key][prop] = value;
|
|
143102
142939
|
});
|
|
143103
142940
|
}
|
|
@@ -143196,7 +143033,7 @@ function foundCircularReference(keyPath, $refs, options) {
|
|
|
143196
143033
|
return true;
|
|
143197
143034
|
}
|
|
143198
143035
|
//#endregion
|
|
143199
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
143036
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/next.js
|
|
143200
143037
|
function makeNext() {
|
|
143201
143038
|
if (typeof process === "object" && typeof process.nextTick === "function") return process.nextTick;
|
|
143202
143039
|
else if (typeof setImmediate === "function") return setImmediate;
|
|
@@ -143206,7 +143043,7 @@ function makeNext() {
|
|
|
143206
143043
|
}
|
|
143207
143044
|
var next_default = makeNext();
|
|
143208
143045
|
//#endregion
|
|
143209
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
143046
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/maybe.js
|
|
143210
143047
|
function maybe(cb, promise) {
|
|
143211
143048
|
if (cb) {
|
|
143212
143049
|
promise.then(function(result) {
|
|
@@ -143222,7 +143059,7 @@ function maybe(cb, promise) {
|
|
|
143222
143059
|
} else return promise;
|
|
143223
143060
|
}
|
|
143224
143061
|
//#endregion
|
|
143225
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
143062
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.2_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.js
|
|
143226
143063
|
/**
|
|
143227
143064
|
* This class parses a JSON schema, builds a map of its JSON references and their resolved values,
|
|
143228
143065
|
* and provides methods for traversing, manipulating, and dereferencing those references.
|
|
@@ -143245,7 +143082,12 @@ var $RefParser = class $RefParser {
|
|
|
143245
143082
|
*/
|
|
143246
143083
|
$refs = new $Refs();
|
|
143247
143084
|
async parse() {
|
|
143248
|
-
|
|
143085
|
+
let args;
|
|
143086
|
+
try {
|
|
143087
|
+
args = normalizeArgs(arguments);
|
|
143088
|
+
} catch (err) {
|
|
143089
|
+
return rejectNormalizationError(arguments, err);
|
|
143090
|
+
}
|
|
143249
143091
|
let promise;
|
|
143250
143092
|
const hasSchema = args.schema !== void 0 && args.schema !== null;
|
|
143251
143093
|
if (!args.path && !hasSchema) {
|
|
@@ -143289,7 +143131,12 @@ var $RefParser = class $RefParser {
|
|
|
143289
143131
|
return parser.parse.apply(parser, arguments);
|
|
143290
143132
|
}
|
|
143291
143133
|
async resolve() {
|
|
143292
|
-
|
|
143134
|
+
let args;
|
|
143135
|
+
try {
|
|
143136
|
+
args = normalizeArgs(arguments, false);
|
|
143137
|
+
} catch (err) {
|
|
143138
|
+
return rejectNormalizationError(arguments, err);
|
|
143139
|
+
}
|
|
143293
143140
|
try {
|
|
143294
143141
|
await this.parse(args.path, args.schema, args.options);
|
|
143295
143142
|
await resolveExternal(this, args.options);
|
|
@@ -143308,7 +143155,12 @@ var $RefParser = class $RefParser {
|
|
|
143308
143155
|
return instance.bundle.apply(instance, arguments);
|
|
143309
143156
|
}
|
|
143310
143157
|
async bundle() {
|
|
143311
|
-
|
|
143158
|
+
let args;
|
|
143159
|
+
try {
|
|
143160
|
+
args = normalizeArgs(arguments, false);
|
|
143161
|
+
} catch (err) {
|
|
143162
|
+
return rejectNormalizationError(arguments, err);
|
|
143163
|
+
}
|
|
143312
143164
|
try {
|
|
143313
143165
|
await this.resolve(args.path, args.schema, args.options);
|
|
143314
143166
|
bundle$1(this, args.options);
|
|
@@ -143323,7 +143175,12 @@ var $RefParser = class $RefParser {
|
|
|
143323
143175
|
return instance.dereference.apply(instance, arguments);
|
|
143324
143176
|
}
|
|
143325
143177
|
async dereference() {
|
|
143326
|
-
|
|
143178
|
+
let args;
|
|
143179
|
+
try {
|
|
143180
|
+
args = normalizeArgs(arguments, false);
|
|
143181
|
+
} catch (err) {
|
|
143182
|
+
return rejectNormalizationError(arguments, err);
|
|
143183
|
+
}
|
|
143327
143184
|
try {
|
|
143328
143185
|
await this.resolve(args.path, args.schema, args.options);
|
|
143329
143186
|
dereference_default(this, args.options);
|
|
@@ -143334,6 +143191,10 @@ var $RefParser = class $RefParser {
|
|
|
143334
143191
|
}
|
|
143335
143192
|
}
|
|
143336
143193
|
};
|
|
143194
|
+
function rejectNormalizationError(args, err) {
|
|
143195
|
+
const callback = args[args.length - 1];
|
|
143196
|
+
return maybe(typeof callback === "function" ? callback : void 0, Promise.reject(err));
|
|
143197
|
+
}
|
|
143337
143198
|
function finalize(parser) {
|
|
143338
143199
|
if (JSONParserErrorGroup.getParserErrors(parser).length > 0) throw new JSONParserErrorGroup(parser);
|
|
143339
143200
|
}
|
|
@@ -147588,7 +147449,7 @@ runMain(defineCommand({
|
|
|
147588
147449
|
globalThis._getCredentialsByTenantUrl = getCredentialsByTenantUrl;
|
|
147589
147450
|
globalThis._getStoredC8yAuth = getStoredC8yAuth;
|
|
147590
147451
|
},
|
|
147591
|
-
subCommands: { creds: () => import("./creds-
|
|
147452
|
+
subCommands: { creds: () => import("./creds-CgE3Umno.mjs").then((m) => m.default) },
|
|
147592
147453
|
run: async ({ args }) => {
|
|
147593
147454
|
const requested = (Array.isArray(args.spec) ? args.spec.at(-1) : args.spec) ?? getCoreOpenApiVersion();
|
|
147594
147455
|
const selected = specs.find((e) => e.version === requested);
|