@zuplo/lint-win32-x64 7.7.17 → 7.8.1

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.
@@ -397,6 +397,33 @@
397
397
  }
398
398
  }
399
399
  },
400
+ {
401
+ "if": {
402
+ "properties": {
403
+ "policyType": {
404
+ "enum": [
405
+ "ai-gateway-internal-only",
406
+ "ai-gateway-internal-only-inbound"
407
+ ]
408
+ }
409
+ },
410
+ "required": ["policyType"]
411
+ },
412
+ "then": {
413
+ "properties": {
414
+ "handler": {
415
+ "properties": {
416
+ "options": {
417
+ "type": "object",
418
+ "additionalProperties": false,
419
+ "required": [],
420
+ "properties": {}
421
+ }
422
+ }
423
+ }
424
+ }
425
+ }
426
+ },
400
427
  {
401
428
  "if": {
402
429
  "properties": {
@@ -623,6 +650,132 @@
623
650
  }
624
651
  }
625
652
  },
653
+ {
654
+ "if": {
655
+ "properties": {
656
+ "policyType": {
657
+ "const": "ai-gateway-prompt-injection"
658
+ }
659
+ },
660
+ "required": ["policyType"]
661
+ },
662
+ "then": {
663
+ "properties": {
664
+ "handler": {
665
+ "properties": {
666
+ "options": {
667
+ "type": "object",
668
+ "additionalProperties": false,
669
+ "required": ["apiKey"],
670
+ "properties": {
671
+ "apiKey": {
672
+ "type": "string",
673
+ "title": "API Key",
674
+ "description": "Credential used to run the classifier. Without `appId` this is the API key for the OpenAI-compatible service at `baseUrl`. With `appId` it is an API key accepted by that AI Gateway app, sent as `Authorization: Bearer` on the in-process invocation.",
675
+ "examples": ["$env(OPENAI_API_KEY)"]
676
+ },
677
+ "appId": {
678
+ "type": "string",
679
+ "title": "Classifier App ID",
680
+ "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. 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.",
681
+ "examples": ["$env(CLASSIFIER_APP_ID)"],
682
+ "x-show-example": false
683
+ },
684
+ "execution": {
685
+ "type": "string",
686
+ "title": "Execution",
687
+ "description": "How the classifier runs relative to the rest of the inbound policy chain. 'sequential' classifies inline, so later policies wait for the verdict; this is the behaviour when the option is omitted. 'parallel' classifies while the remaining inbound policies run — the verdict is still enforced before the request reaches the model, so no prompt is forwarded unchecked, but on a safe prompt the classifier's latency overlaps the rest of the chain instead of adding to it.",
688
+ "enum": ["sequential", "parallel"],
689
+ "default": "sequential",
690
+ "examples": ["parallel"]
691
+ },
692
+ "recentMessageCount": {
693
+ "type": "integer",
694
+ "title": "Recent Message Count",
695
+ "description": "How many of the conversation's most recent messages the classifier inspects (input items on the Responses endpoint). Earlier messages are not re-inspected: each was screened when it was the newest, so a chat session pays for one classification per turn instead of one per transcript. System and developer messages, Anthropic's top-level `system` and the Responses `instructions` field never count and are never inspected — they are your application's own instructions, not where an injection arrives. Tool results count as messages and are inspected. Raise this when clients send conversation history that was assembled outside the gateway. Defaults to 1 (the newest message only).",
696
+ "minimum": 1,
697
+ "default": 1
698
+ },
699
+ "model": {
700
+ "type": "string",
701
+ "title": "Classifier Model",
702
+ "description": "Tool-calling capable model used to classify prompts. Prefer a small, fast model; the classification runs before every inspected request reaches the upstream model. With `appId` set this must name a model the classifier app routes, written as `provider/model` (for example `openai/gpt-4o-mini`), and has no default.",
703
+ "default": "gpt-4o-mini"
704
+ },
705
+ "classifierPrompt": {
706
+ "title": "Classifier Prompt",
707
+ "x-advanced": true,
708
+ "description": "Replaces the built-in system prompt that tells the classifier what counts as a prompt injection. A string, or an array of lines joined with newlines. The inspected text is always sent as a separate user message and the verdict always comes back through the fixed SAFE/UNSAFE tool call, so a custom prompt changes what is flagged, never how the verdict is read. Omit to use the built-in prompt, which the policy documentation shows in full.",
709
+ "oneOf": [
710
+ {
711
+ "type": "string",
712
+ "minLength": 1
713
+ },
714
+ {
715
+ "type": "array",
716
+ "minItems": 1,
717
+ "items": {
718
+ "type": "string"
719
+ }
720
+ }
721
+ ],
722
+ "x-show-example": false
723
+ },
724
+ "baseUrl": {
725
+ "type": "string",
726
+ "title": "Base URL",
727
+ "x-advanced": true,
728
+ "description": "Base URL of the OpenAI-compatible API that runs the classifier model. Mutually exclusive with `appId`, which routes the classifier through an AI Gateway app instead.",
729
+ "default": "https://api.openai.com/v1"
730
+ },
731
+ "timeoutMs": {
732
+ "type": "integer",
733
+ "title": "Classifier Timeout (ms)",
734
+ "x-advanced": true,
735
+ "description": "Maximum time in milliseconds to wait for the classifier before applying the onError action.",
736
+ "minimum": 100,
737
+ "maximum": 60000,
738
+ "default": 10000
739
+ },
740
+ "endpoints": {
741
+ "type": "array",
742
+ "title": "Applicable Endpoints",
743
+ "x-advanced": true,
744
+ "description": "The endpoint shapes this policy applies to. Omit to apply to all (openai-chat, openai-responses, anthropic-messages).",
745
+ "items": {
746
+ "type": "string",
747
+ "enum": [
748
+ "openai-chat",
749
+ "openai-responses",
750
+ "anthropic-messages"
751
+ ]
752
+ },
753
+ "x-show-example": false,
754
+ "minItems": 1
755
+ },
756
+ "onUnknownShape": {
757
+ "type": "string",
758
+ "title": "On Unknown Shape",
759
+ "x-advanced": true,
760
+ "description": "What to do when the request shape cannot be inspected. As a guardrail, this policy defaults to 'deny' (fail closed) so uninspectable content is never forwarded.",
761
+ "enum": ["deny", "skip"],
762
+ "default": "deny"
763
+ },
764
+ "onError": {
765
+ "type": "string",
766
+ "title": "On Classifier Error",
767
+ "x-advanced": true,
768
+ "description": "What to do when the classifier call itself fails (invalid API key, rate limit, timeout, outage). 'block' (the default) fails closed and returns a 502 so unverified prompts are never forwarded; 'allow' fails open and lets the request through without inspection.",
769
+ "enum": ["block", "allow"],
770
+ "default": "block"
771
+ }
772
+ }
773
+ }
774
+ }
775
+ }
776
+ }
777
+ }
778
+ },
626
779
  {
627
780
  "if": {
628
781
  "properties": {
@@ -5808,6 +5961,9 @@
5808
5961
  {
5809
5962
  "required": ["skipIssuerMetadataValidation"]
5810
5963
  },
5964
+ {
5965
+ "required": ["skipResourceIndicatorValidation"]
5966
+ },
5811
5967
  {
5812
5968
  "required": ["clientRegistration"]
5813
5969
  }
@@ -5880,7 +6036,12 @@
5880
6036
  "skipIssuerMetadataValidation": {
5881
6037
  "type": "boolean",
5882
6038
  "x-advanced": true,
5883
- "description": "Skips the RFC 8414 section 3.3 issuer-echo check when discovering the upstream authorization server. That check requires the `issuer` in the authorization server's metadata to equal the `authorization_servers` entry the protected-resource metadata advertised. Some providers publish a path-scoped authorization server whose metadata reports the root origin instead — for example ServiceNow advertises `https://<instance>.service-now.com/sncapps/...` but its metadata reports `https://<instance>.service-now.com` so discovery hard-fails without this option. Warning: enabling this puts the connection out of spec. The check is an unqualified MUST in both RFC 8414 section 3.3 and the MCP authorization spec, which require rejecting a metadata document whose `issuer` differs from the identifier the well-known URL was built from; the spec's own example is a document served from `https://attacker.example/.well-known/oauth-authorization-server` claiming `\"issuer\": \"https://honest.example\"`. The echo check binds the metadata to the TLS-authenticated host it came from, and with it off the gateway trusts the authorization, token and JWKS endpoints from a document that never proved it speaks for that issuer. Only enable it for a specific upstream known to publish a mismatched issuer, and only when the metadata URL's host is itself trusted. It relaxes the discovery-time check only — the RFC 9207 authorization-response check and the callback-leg authorization-server binding still apply."
6039
+ "description": "Allows the authorization server metadata's `issuer` to differ from the server URL used for discovery. Defaults to `false`. Enable only for a confirmed provider metadata mismatch after verifying that its metadata and OAuth endpoints are trusted. This disables the RFC 8414 section 3.3 issuer check; authorization-response and callback checks still apply. Available only with `user-oauth` and `shared-oauth`."
6040
+ },
6041
+ "skipResourceIndicatorValidation": {
6042
+ "type": "boolean",
6043
+ "x-advanced": true,
6044
+ "description": "Allows the upstream metadata's `resource` URL to have a different origin or path from the configured upstream URL. Defaults to `false`. The gateway still sends the advertised `resource` on OAuth requests. Enable only for a confirmed provider metadata mismatch: a token intended for another service could otherwise be sent to this upstream. Available only with `user-oauth` and `shared-oauth`."
5884
6045
  },
5885
6046
  "clientRegistration": {
5886
6047
  "x-advanced": true,
package/bin/version.txt CHANGED
@@ -1 +1 @@
1
- 7.7.17
1
+ 7.8.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/lint-win32-x64",
3
- "version": "7.7.17",
3
+ "version": "7.8.1",
4
4
  "description": "The win32-x64 binary for zuplo-lint, the Zuplo API linter.",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",