@zuplo/lint-win32-x64 7.9.11 → 7.9.12
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/bin/schemas/policy-options.schema.json +134 -37
- package/bin/version.txt +1 -1
- package/package.json +1 -1
|
@@ -517,33 +517,6 @@
|
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
},
|
|
520
|
-
{
|
|
521
|
-
"if": {
|
|
522
|
-
"properties": {
|
|
523
|
-
"policyType": {
|
|
524
|
-
"enum": [
|
|
525
|
-
"ai-gateway-internal-only",
|
|
526
|
-
"ai-gateway-internal-only-inbound"
|
|
527
|
-
]
|
|
528
|
-
}
|
|
529
|
-
},
|
|
530
|
-
"required": ["policyType"]
|
|
531
|
-
},
|
|
532
|
-
"then": {
|
|
533
|
-
"properties": {
|
|
534
|
-
"handler": {
|
|
535
|
-
"properties": {
|
|
536
|
-
"options": {
|
|
537
|
-
"type": "object",
|
|
538
|
-
"additionalProperties": false,
|
|
539
|
-
"required": [],
|
|
540
|
-
"properties": {}
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
},
|
|
547
520
|
{
|
|
548
521
|
"if": {
|
|
549
522
|
"properties": {
|
|
@@ -908,13 +881,13 @@
|
|
|
908
881
|
"apiKey": {
|
|
909
882
|
"type": "string",
|
|
910
883
|
"title": "API Key",
|
|
911
|
-
"description": "Credential used to run the classifier. Without `appId` this is the API key for the OpenAI-compatible service at `baseUrl`, and it is required. With `appId` it is optional: omit it when the classifier app runs the
|
|
884
|
+
"description": "Credential used to run the classifier. Without `appId` this is the API key for the OpenAI-compatible service at `baseUrl`, and it is required. With `appId` it is optional: omit it when the classifier app runs the Internal Only policy, which authorizes the in-process invocation itself, and set it only when that app authenticates callers with API keys, in which case it is sent as `Authorization: Bearer`.",
|
|
912
885
|
"examples": ["$env(OPENAI_API_KEY)"]
|
|
913
886
|
},
|
|
914
887
|
"appId": {
|
|
915
888
|
"type": "string",
|
|
916
889
|
"title": "Classifier App ID",
|
|
917
|
-
"description": "Run the classifier on another AI Gateway app instead of calling an external API directly. The gateway invokes that app in-process — no outbound HTTP hop — so the classifier inherits its provider credentials, model routing, fallbacks and quotas, and provider keys stay on one app. Give that app the
|
|
890
|
+
"description": "Run the classifier on another AI Gateway app instead of calling an external API directly. The gateway invokes that app in-process — no outbound HTTP hop — so the classifier inherits its provider credentials, model routing, fallbacks and quotas, and provider keys stay on one app. Give that app the Internal Only policy and `apiKey` is not needed at all. When set, `model` must name a routed model as `provider/model` and `baseUrl` must not be set. The target app must not itself run this policy: it would be asked to classify its own classification request, which is rejected as a configuration error rather than silently skipped. Omit to call `baseUrl` directly.",
|
|
918
891
|
"examples": ["$env(CLASSIFIER_APP_ID)"],
|
|
919
892
|
"x-show-example": false
|
|
920
893
|
},
|
|
@@ -1134,10 +1107,8 @@
|
|
|
1134
1107
|
"classifier": {
|
|
1135
1108
|
"type": "object",
|
|
1136
1109
|
"title": "Classifier",
|
|
1137
|
-
"description": "Where the
|
|
1110
|
+
"description": "Where the prompt is classified. For a direct API, set adapter, apiKey, model, and optional baseUrl. Alternatively set app. Legacy chatCompletions and jev sections remain supported; do not mix forms.",
|
|
1138
1111
|
"additionalProperties": false,
|
|
1139
|
-
"minProperties": 1,
|
|
1140
|
-
"maxProperties": 1,
|
|
1141
1112
|
"properties": {
|
|
1142
1113
|
"app": {
|
|
1143
1114
|
"type": "object",
|
|
@@ -1162,7 +1133,7 @@
|
|
|
1162
1133
|
"apiKey": {
|
|
1163
1134
|
"type": "string",
|
|
1164
1135
|
"title": "Classifier App API Key",
|
|
1165
|
-
"description": "API key sent as `Authorization: Bearer` when invoking the classifier app. Omit it when the classifier app runs the
|
|
1136
|
+
"description": "API key sent as `Authorization: Bearer` when invoking the classifier app. Omit it when the classifier app runs the Internal Only policy: the classifier call never leaves the gateway, so that policy accepts it and rejects everything arriving over the network, and no credential is sent. Set it only when the classifier app authenticates callers with API keys.",
|
|
1166
1137
|
"examples": ["$env(CLASSIFIER_APP_API_KEY)"],
|
|
1167
1138
|
"x-advanced": true
|
|
1168
1139
|
}
|
|
@@ -1171,7 +1142,7 @@
|
|
|
1171
1142
|
"chatCompletions": {
|
|
1172
1143
|
"type": "object",
|
|
1173
1144
|
"title": "Chat Completions API",
|
|
1174
|
-
"description": "Classify by calling an OpenAI-compatible Chat Completions API directly, outside the gateway. The model must support structured outputs (`response_format` with a JSON schema).",
|
|
1145
|
+
"description": "Deprecated: use classifier.adapter with flat apiKey, model, and baseUrl fields. Classify by calling an OpenAI-compatible Chat Completions API directly, outside the gateway. The model must support structured outputs (`response_format` with a JSON schema).",
|
|
1175
1146
|
"additionalProperties": false,
|
|
1176
1147
|
"required": ["apiKey", "model"],
|
|
1177
1148
|
"properties": {
|
|
@@ -1194,12 +1165,14 @@
|
|
|
1194
1165
|
"default": "https://api.openai.com/v1",
|
|
1195
1166
|
"x-advanced": true
|
|
1196
1167
|
}
|
|
1197
|
-
}
|
|
1168
|
+
},
|
|
1169
|
+
"deprecated": true,
|
|
1170
|
+
"doNotSuggest": true
|
|
1198
1171
|
},
|
|
1199
1172
|
"jev": {
|
|
1200
1173
|
"type": "object",
|
|
1201
1174
|
"title": "Jev (TypeSafe)",
|
|
1202
|
-
"description": "Classify with Jev, TypeSafe's classification model, by calling a System One API directly: TypeSafe's by default, or another host such as OpenRouter through `baseUrl`. Jev answers typed questions instead of generating text, so it takes no `classifierPrompt`.",
|
|
1175
|
+
"description": "Deprecated: use classifier.adapter with flat apiKey, model, and baseUrl fields. Classify with Jev, TypeSafe's classification model, by calling a System One API directly: TypeSafe's by default, or another host such as OpenRouter through `baseUrl`. Jev answers typed questions instead of generating text, so it takes no `classifierPrompt`.",
|
|
1203
1176
|
"additionalProperties": false,
|
|
1204
1177
|
"required": ["apiKey"],
|
|
1205
1178
|
"properties": {
|
|
@@ -1223,8 +1196,81 @@
|
|
|
1223
1196
|
"default": "https://api.typesafe.ai",
|
|
1224
1197
|
"x-advanced": true
|
|
1225
1198
|
}
|
|
1199
|
+
},
|
|
1200
|
+
"deprecated": true,
|
|
1201
|
+
"doNotSuggest": true
|
|
1202
|
+
},
|
|
1203
|
+
"adapter": {
|
|
1204
|
+
"type": "string",
|
|
1205
|
+
"title": "Classifier Adapter",
|
|
1206
|
+
"enum": ["chatCompletions", "systemOne"],
|
|
1207
|
+
"description": "API contract for direct classification. chatCompletions requires a model supporting JSON-schema structured outputs. systemOne uses the existing Jev typed-question implementation; it does not accept classifierPrompt."
|
|
1208
|
+
},
|
|
1209
|
+
"apiKey": {
|
|
1210
|
+
"type": "string",
|
|
1211
|
+
"minLength": 1,
|
|
1212
|
+
"title": "Classifier API Key",
|
|
1213
|
+
"description": "API key for the direct classifier, sent as Authorization: Bearer.",
|
|
1214
|
+
"examples": ["$env(CLASSIFIER_API_KEY)"]
|
|
1215
|
+
},
|
|
1216
|
+
"model": {
|
|
1217
|
+
"type": "string",
|
|
1218
|
+
"minLength": 1,
|
|
1219
|
+
"title": "Classifier Model",
|
|
1220
|
+
"description": "Model id sent to the direct API. Required for chatCompletions; defaults to jev-latest for systemOne."
|
|
1221
|
+
},
|
|
1222
|
+
"baseUrl": {
|
|
1223
|
+
"type": "string",
|
|
1224
|
+
"title": "Classifier Base URL",
|
|
1225
|
+
"description": "HTTP(S) API root. chatCompletions defaults to https://api.openai.com/v1 and appends /chat/completions. systemOne defaults to https://api.typesafe.ai and appends /v1/systemone.",
|
|
1226
|
+
"x-advanced": true
|
|
1227
|
+
}
|
|
1228
|
+
},
|
|
1229
|
+
"if": {
|
|
1230
|
+
"anyOf": [
|
|
1231
|
+
{
|
|
1232
|
+
"required": ["adapter"]
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
"required": ["apiKey"]
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
"required": ["model"]
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
"required": ["baseUrl"]
|
|
1226
1242
|
}
|
|
1243
|
+
]
|
|
1244
|
+
},
|
|
1245
|
+
"then": {
|
|
1246
|
+
"required": ["adapter", "apiKey"],
|
|
1247
|
+
"not": {
|
|
1248
|
+
"anyOf": [
|
|
1249
|
+
{
|
|
1250
|
+
"required": ["app"]
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
"required": ["chatCompletions"]
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
"required": ["jev"]
|
|
1257
|
+
}
|
|
1258
|
+
]
|
|
1259
|
+
},
|
|
1260
|
+
"if": {
|
|
1261
|
+
"properties": {
|
|
1262
|
+
"adapter": {
|
|
1263
|
+
"const": "chatCompletions"
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
},
|
|
1267
|
+
"then": {
|
|
1268
|
+
"required": ["model"]
|
|
1227
1269
|
}
|
|
1270
|
+
},
|
|
1271
|
+
"else": {
|
|
1272
|
+
"minProperties": 1,
|
|
1273
|
+
"maxProperties": 1
|
|
1228
1274
|
}
|
|
1229
1275
|
},
|
|
1230
1276
|
"modelsByComplexity": {
|
|
@@ -1295,7 +1341,7 @@
|
|
|
1295
1341
|
},
|
|
1296
1342
|
"classifierPrompt": {
|
|
1297
1343
|
"title": "Classifier Prompt",
|
|
1298
|
-
"description": "Prompt
|
|
1344
|
+
"description": "Prompt for classifier.app or the chatCompletions adapter (including its legacy section). Omit to use the built-in prompt. The systemOne adapter and legacy jev section take no prompt; combining them with classifierPrompt is a configuration error.",
|
|
1299
1345
|
"oneOf": [
|
|
1300
1346
|
{
|
|
1301
1347
|
"type": "string",
|
|
@@ -3533,6 +3579,57 @@
|
|
|
3533
3579
|
}
|
|
3534
3580
|
}
|
|
3535
3581
|
},
|
|
3582
|
+
{
|
|
3583
|
+
"if": {
|
|
3584
|
+
"properties": {
|
|
3585
|
+
"policyType": {
|
|
3586
|
+
"enum": [
|
|
3587
|
+
"internal-only",
|
|
3588
|
+
"internal-only-inbound",
|
|
3589
|
+
"ai-gateway-internal-only",
|
|
3590
|
+
"ai-gateway-internal-only-inbound"
|
|
3591
|
+
]
|
|
3592
|
+
}
|
|
3593
|
+
},
|
|
3594
|
+
"required": ["policyType"]
|
|
3595
|
+
},
|
|
3596
|
+
"then": {
|
|
3597
|
+
"properties": {
|
|
3598
|
+
"handler": {
|
|
3599
|
+
"properties": {
|
|
3600
|
+
"options": {
|
|
3601
|
+
"type": "object",
|
|
3602
|
+
"additionalProperties": false,
|
|
3603
|
+
"required": [],
|
|
3604
|
+
"properties": {
|
|
3605
|
+
"status": {
|
|
3606
|
+
"type": "integer",
|
|
3607
|
+
"minimum": 400,
|
|
3608
|
+
"maximum": 499,
|
|
3609
|
+
"default": 403,
|
|
3610
|
+
"description": "The HTTP status code returned to a request that did not come from inside the gateway. Any client error status from 400 to 499 is allowed. Use `404` to answer as if the route did not exist, or `401` to answer as an authentication policy does."
|
|
3611
|
+
},
|
|
3612
|
+
"statusText": {
|
|
3613
|
+
"type": "string",
|
|
3614
|
+
"minLength": 1,
|
|
3615
|
+
"pattern": "^[\\t\\x20-\\x7E\\x80-\\xFF]+$",
|
|
3616
|
+
"examples": ["Not Found", "Unauthorized"],
|
|
3617
|
+
"x-advanced": true,
|
|
3618
|
+
"description": "The status text returned with `status`, such as `Not Found`. When it is omitted, the response uses the standard text for the status. Clients don't always receive it: HTTP/2 and HTTP/3 have no status text, and Managed Dedicated and self-hosted gateways always send the standard text."
|
|
3619
|
+
},
|
|
3620
|
+
"detail": {
|
|
3621
|
+
"type": "string",
|
|
3622
|
+
"minLength": 1,
|
|
3623
|
+
"x-advanced": true,
|
|
3624
|
+
"description": "The `detail` of the problem response returned to a rejected request. Every caller outside the gateway receives it, so don't describe how the route is called. When it is omitted, the response has no `detail`, and a `404` matches the response for a route that does not exist."
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3627
|
+
}
|
|
3628
|
+
}
|
|
3629
|
+
}
|
|
3630
|
+
}
|
|
3631
|
+
}
|
|
3632
|
+
},
|
|
3536
3633
|
{
|
|
3537
3634
|
"if": {
|
|
3538
3635
|
"properties": {
|
package/bin/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
7.9.
|
|
1
|
+
7.9.12
|