vrsai
Machine-native capabilities with explicit contracts and machine-readable commerce.
¿Debería usar esto?
Calidad y seguridad
Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.
Costo de contexto
Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.
Instalar
Instalación con un clic
Agrega esto a tu archivo `claude_desktop_config.json`:
{
"mcpServers": {
"mcp": {
"url": "https://api.vrsai.tech/mcp"
}
}
}Puntos de conexión remotos
https://api.vrsai.tech/mcpstreamable-httpQué puede hacer
Inventario de herramientas
Herramientas (6)
🔴openapi_agent_readiness(document)
Call before integrating an OpenAPI-described API with autonomous agents to determine whether the contract is machine-actionable. Deterministically analyzes a self-contained OpenAPI 3.0, 3.1, or 3.2 description and returns a readiness score, verdict, and actionable findings covering operation semantics, request and response contracts, authentication clarity, reference integrity, and machine usability. It does not apply when generating a new OpenAPI description from source code. Paid invocation: 30000 micro-USD per successful execution.
Esquema de entrada
{
"type": "object",
"properties": {
"document": {
"type": "object",
"patternProperties": {
"^.*$": {}
},
"description": "The OpenAPI description as a parsed JSON object (not a YAML/JSON string). Must include a top-level 'openapi' version field of family 3.0, 3.1, or 3.2. Only inline schemas and local references ('#/...') are analyzed; external or multi-document references are detected and reported, never fetched."
}
},
"required": [
"document"
],
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"score": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"verdict": {
"anyOf": [
{
"type": "string",
"const": "ready"
},
{
"type": "string",
"const": "needs_changes"
},
{
"type": "string",
"const": "not_ready"
}
],
"description": "ready: score >= 85 and no blocking finding. needs_changes: score >= 60 and no blocking finding. not_ready: score < 60, or at least one blocking finding regardless of score."
},
"openapi_version": {
"type": "string",
"description": "The detected 'openapi' version string, or 'unknown' if it could not be determined."
},
"ruleset_version": {
"type": "string",
"description": "Version of the finding codes, dimension weights, and scoring thresholds that produced this result — independent of the capability's own contract version. See RULESET_VERSION in rules.ts."
},
"summary": {
"type": "object",
"required": [
"paths",
"operations",
"schemas",
"findings",
"findings_truncated"
],
"properties": {
"paths": {
"type": "integer",
"minimum": 0
},
"operations": {
"type": "integer",
"minimum": 0
},
"schemas": {
"type": "integer",
"minimum": 0
},
"findings": {
"type": "integer",
"minimum": 0,
"description": "Total findings produced, pre-truncation."
},
"findings_truncated": {
"type": "boolean",
"description": "True if the findings array below was capped below the total findings count."
}
},
"additionalProperties": false
},
"dimensions": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"score",
"max_score"
],
"properties": {
"id": {
"anyOf": [
{
"type": "string",
"const": "structure_and_version"
},
{
"type": "string",
"const": "operation_semantics"
},
{
"type": "string",
"const": "request_contracts"
},
{
"type": "string",
"const": "response_contracts"
},
{
"type": "string",
"const": "authentication_and_access"
},
{
"type": "string",
"const": "machine_operability"
}
]
},
"score": {
"type": "integer",
"minimum": 0
},
"max_score": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false
}
},
"findings": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"severity",
"json_pointer",
"message",
"impact",
"remediation"
],
"properties": {
"code": {
"type": "string",
"description": "Stable, machine-meaningful finding identifier."
},
"severity": {
"anyOf": [
{
"type": "string",
"const": "blocker"
},
{
"type": "string",
"const": "warning"
},
{
"type": "string",
"const": "recommendation"
}
],
"description": "blocker: materially prevents reliable autonomous consumption. warning: usable, but meaningfully reduces machine reliability or selection quality. recommendation: a useful improvement that does not prevent consumption."
},
"json_pointer": {
"type": "string",
"description": "RFC 6901 JSON Pointer into the submitted document, e.g. /paths/~1users/get."
},
"message": {
"type": "string"
},
"impact": {
"type": "string",
"description": "Concrete effect on autonomous consumption."
},
"remediation": {
"type": "string",
"description": "Concrete action to resolve the finding."
}
},
"additionalProperties": false
}
}
},
"required": [
"score",
"verdict",
"openapi_version",
"ruleset_version",
"summary",
"dimensions",
"findings"
],
"additionalProperties": false
}🔴sql_preflight(sql, context, policy)
Call this immediately before an autonomous agent, coding assistant, or automated pipeline executes PostgreSQL write, DDL, or administrative SQL against a production-capable connection. It parses the complete statement set with a real PostgreSQL AST parser and prevents the costly mistake of an agent silently deleting, truncating, or dropping data it should not have touched. It detects unbounded DELETE and UPDATE (no WHERE clause), TRUNCATE, destructive DROP and CASCADE, mutation of caller-declared protected relations, and availability-sensitive DDL such as a non-concurrent CREATE INDEX or hazardous ALTER TABLE change. It returns a deterministic PROCEED, REVIEW, or BLOCK decision with stable reason codes, a per-statement inventory, and an explicit coverage report of exactly what was and was not assessed — parse failure and unparseable or unmodeled syntax always fail closed to REVIEW, never PROCEED. PostgreSQL is the only supported dialect in this version. It does not apply when executing SQL or connecting to a database. Paid invocation: 50000 micro-USD per successful execution.
Esquema de entrada
{
"type": "object",
"properties": {
"sql": {
"type": "string",
"minLength": 1,
"maxLength": 65536,
"description": "A complete PostgreSQL statement or semicolon-separated statement list."
},
"context": {
"type": "object",
"properties": {
"environment": {
"anyOf": [
{
"type": "string",
"const": "production"
},
{
"type": "string",
"const": "staging"
},
{
"type": "string",
"const": "development"
},
{
"type": "string",
"const": "unknown"
}
]
},
"protected_relations": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 200
},
"protected_schemas": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 200
},
"expected_statement_kinds": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 50
}
},
"additionalProperties": false
},
"policy": {
"type": "object",
"properties": {
"block_unbounded_delete": {
"type": "boolean"
},
"block_unbounded_update": {
"type": "boolean"
},
"block_drop_table": {
"type": "boolean"
},
"block_truncate": {
"type": "boolean"
},
"block_cascade": {
"type": "boolean"
},
"block_protected_relation_mutation": {
"type": "boolean"
},
"alter_table_action": {
"anyOf": [
{
"type": "string",
"const": "proceed"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"nonconcurrent_index_action": {
"anyOf": [
{
"type": "string",
"const": "proceed"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"procedural_or_dynamic_sql_action": {
"anyOf": [
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"unsupported_statement_action": {
"anyOf": [
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"max_statements": {
"type": "integer",
"minimum": 1,
"maximum": 20
}
},
"additionalProperties": false
}
},
"required": [
"sql"
],
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"decision": {
"anyOf": [
{
"type": "string",
"const": "PROCEED"
},
{
"type": "string",
"const": "REVIEW"
},
{
"type": "string",
"const": "BLOCK"
}
]
},
"machine_action": {
"anyOf": [
{
"type": "string",
"const": "EXECUTE"
},
{
"type": "string",
"const": "REQUIRE_REVIEW"
},
{
"type": "string",
"const": "DO_NOT_EXECUTE"
}
]
},
"reason_codes": {
"type": "array",
"items": {
"type": "string"
}
},
"ruleset_version": {
"type": "string",
"description": "Version of the reason-code catalog and policy defaults that produced this result, independent of the capability's own contract version. See RULESET_VERSION in rules.ts."
},
"coverage": {
"type": "object",
"required": [
"dialect",
"assessment_scope",
"complete_for_declared_scope",
"checks_performed",
"checks_not_performed"
],
"properties": {
"dialect": {
"type": "string",
"const": "postgresql"
},
"assessment_scope": {
"type": "array",
"items": {
"type": "string"
}
},
"complete_for_declared_scope": {
"type": "boolean"
},
"checks_performed": {
"type": "array",
"items": {
"type": "string"
}
},
"checks_not_performed": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"statement_count": {
"type": "integer",
"minimum": 0
},
"statements": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"kind",
"mutates_data",
"changes_schema",
"changes_privileges",
"administrative",
"relations",
"decision",
"reason_codes"
],
"properties": {
"index": {
"type": "integer",
"minimum": 0
},
"kind": {
"type": "string",
"description": "Normalized statement kind, e.g. DELETE, ALTER_TABLE."
},
"mutates_data": {
"type": "boolean"
},
"changes_schema": {
"type": "boolean"
},
"changes_privileges": {
"type": "boolean"
},
"administrative": {
"type": "boolean"
},
"relations": {
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"schema": {
"type": "string"
},
"name": {
"type": "string"
}
},
"additionalProperties": false
}
},
"decision": {
"anyOf": [
{
"type": "string",
"const": "PROCEED"
},
{
"type": "string",
"const": "REVIEW"
},
{
"type": "string",
"const": "BLOCK"
}
]
},
"reason_codes": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"checks": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string",
"const": "PASS"
},
{
"type": "string",
"const": "REVIEW"
},
{
"type": "string",
"const": "BLOCK"
}
]
},
"statement_index": {
"type": "integer",
"minimum": 0
},
"reason_code": {
"type": "string"
},
"evidence": {
"type": "object",
"patternProperties": {
"^.*$": {}
}
}
},
"additionalProperties": false
}
},
"input_fingerprint": {
"type": "string",
"description": "SHA-256 fingerprint (\"v1:<hex>\") of the exact submitted {sql, context, policy} tuple. Identical input and policy always produce the identical fingerprint, independent of commercial/payment mode. See fingerprint.ts."
}
},
"required": [
"decision",
"machine_action",
"reason_codes",
"ruleset_version",
"coverage",
"statement_count",
"statements",
"checks",
"input_fingerprint"
],
"additionalProperties": false
}🔴invoice_match(match_mode, invoice, purchase_orders, receipts, evidence, ...)
Call after invoice extraction and immediately before an accounts-payable or procurement agent approves a purchase-order-backed supplier invoice. Invoice Match performs deterministic three-way matching across invoice lines, one or more purchase orders, cumulative goods-receipt evidence, prior invoicing, price tolerances, quantities, units, and exact invoice arithmetic. Cumulative invoicing (prior plus current) is always compared against cumulative receipts and against the ordered quantity, so repeated partial invoices against partial deliveries cannot silently overbill. It returns PROCEED, REVIEW, or BLOCK with line-level discrepancy codes and evidence, and always discloses which checks were and were not performed. Use it for invoice matching, PO matching, 3-way matching, goods-receipt matching, overbilling prevention, and autonomous AP approval controls. It does not OCR documents, infer product matches, retrieve ERP data, determine tax, or execute payment. Paid invocation: 50000 micro-USD per successful execution.
Esquema de entrada
{
"type": "object",
"properties": {
"match_mode": {
"type": "string",
"const": "three_way"
},
"invoice": {
"type": "object",
"required": [
"id",
"invoice_number",
"currency",
"lines",
"subtotal_minor",
"total_minor"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"invoice_number": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"supplier_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"lines": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"purchase_order_id",
"po_line_id",
"quantity",
"unit_price_minor",
"line_net_minor"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"purchase_order_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"po_line_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,23})(\\.[0-9]{1,6})?$",
"description": "Positive decimal quantity, up to 6 fractional digits."
},
"unit_of_measure": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"unit_price_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"price_basis_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,23})(\\.[0-9]{1,6})?$",
"description": "Positive decimal quantity, up to 6 fractional digits."
},
"line_net_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
}
},
"additionalProperties": false
},
"minItems": 1,
"maxItems": 250
},
"subtotal_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"tax_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"shipping_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"charges_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"discount_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"total_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
}
},
"additionalProperties": false
},
"purchase_orders": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"currency",
"lines"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"supplier_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"lines": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"ordered_quantity",
"previously_invoiced_quantity",
"unit_price_minor"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"ordered_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,23})(\\.[0-9]{1,6})?$",
"description": "Positive decimal quantity, up to 6 fractional digits."
},
"previously_invoiced_quantity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,23})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal quantity, up to 6 fractional digits. \"0\" is required (not omission) for a line with no prior invoicing."
},
"unit_of_measure": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"unit_price_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"price_basis_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,23})(\\.[0-9]{1,6})?$",
"description": "Positive decimal quantity, up to 6 fractional digits."
}
},
"additionalProperties": false
},
"minItems": 1,
"maxItems": 1000
}
},
"additionalProperties": false
},
"minItems": 1,
"maxItems": 50
},
"receipts": {
"type": "array",
"items": {
"type": "object",
"required": [
"purchase_order_id",
"po_line_id",
"received_quantity"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"purchase_order_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"po_line_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"received_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,23})(\\.[0-9]{1,6})?$",
"description": "Positive decimal quantity, up to 6 fractional digits."
},
"received_at": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness (§6.6)."
}
},
"additionalProperties": false
},
"maxItems": 2000
},
"evidence": {
"type": "object",
"required": [
"receipts_complete",
"prior_invoicing_complete"
],
"properties": {
"receipts_complete": {
"type": "boolean"
},
"receipts_as_of": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness (§6.6)."
},
"prior_invoicing_complete": {
"type": "boolean"
},
"prior_invoicing_as_of": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness (§6.6)."
}
},
"additionalProperties": false
},
"recent_invoices": {
"type": "array",
"items": {
"type": "object",
"required": [
"invoice_number"
],
"properties": {
"invoice_number": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"supplier_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"total_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"occurred_at": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness (§6.6)."
}
},
"additionalProperties": false
},
"maxItems": 500
},
"policy": {
"type": "object",
"properties": {
"unit_price_tolerance_bps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
},
"line_total_tolerance_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"invoice_total_tolerance_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"quantity_match_mode": {
"anyOf": [
{
"type": "string",
"const": "not_exceed_received"
},
{
"type": "string",
"const": "exact_received"
}
]
},
"require_receipt_evidence": {
"type": "boolean"
},
"require_complete_receipt_snapshot": {
"type": "boolean"
},
"require_complete_prior_invoicing": {
"type": "boolean"
},
"block_quantity_over_ordered": {
"type": "boolean"
},
"block_quantity_over_received": {
"type": "boolean"
},
"block_currency_mismatch": {
"type": "boolean"
},
"block_supplier_mismatch": {
"type": "boolean"
},
"duplicate_invoice_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
}
},
"additionalProperties": false
}
},
"required": [
"match_mode",
"invoice",
"purchase_orders",
"receipts",
"evidence"
],
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"decision": {
"anyOf": [
{
"type": "string",
"const": "PROCEED"
},
{
"type": "string",
"const": "REVIEW"
},
{
"type": "string",
"const": "BLOCK"
}
]
},
"machine_action": {
"anyOf": [
{
"type": "string",
"const": "APPROVAL_NOT_BLOCKED_BY_MATCH"
},
{
"type": "string",
"const": "REQUIRE_REVIEW_BEFORE_APPROVAL"
},
{
"type": "string",
"const": "DO_NOT_APPROVE"
}
]
},
"reason_codes": {
"type": "array",
"items": {
"type": "string"
}
},
"ruleset_version": {
"type": "string",
"description": "Version of the reason-code catalog and policy defaults that produced this result, independent of the capability's own contract version. See RULESET_VERSION in rules.ts."
},
"coverage": {
"type": "object",
"required": [
"match_mode",
"complete_for_declared_scope",
"checks_performed",
"checks_not_performed",
"evidence"
],
"properties": {
"match_mode": {
"type": "string",
"const": "three_way"
},
"complete_for_declared_scope": {
"type": "boolean"
},
"checks_performed": {
"type": "array",
"items": {
"type": "string"
}
},
"checks_not_performed": {
"type": "array",
"items": {
"type": "string"
}
},
"evidence": {
"type": "object",
"required": [
"receipts_complete",
"prior_invoicing_complete",
"duplicate_history_supplied"
],
"properties": {
"receipts_complete": {
"type": "boolean"
},
"prior_invoicing_complete": {
"type": "boolean"
},
"duplicate_history_supplied": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"invoice": {
"type": "object",
"required": [
"id",
"invoice_number",
"currency",
"lines_evaluated",
"purchase_orders_referenced"
],
"properties": {
"id": {
"type": "string"
},
"invoice_number": {
"type": "string"
},
"supplier_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"lines_evaluated": {
"type": "integer",
"minimum": 0
},
"purchase_orders_referenced": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"totals": {
"type": "object",
"required": [
"declared_subtotal_minor",
"computed_subtotal_minor",
"declared_total_minor",
"computed_total_minor"
],
"properties": {
"declared_subtotal_minor": {
"type": "string"
},
"computed_subtotal_minor": {
"type": "string"
},
"declared_total_minor": {
"type": "string"
},
"computed_total_minor": {
"type": "string"
}
},
"additionalProperties": false
},
"line_results": {
"type": "array",
"items": {
"type": "object",
"required": [
"invoice_line_id",
"purchase_order_id",
"po_line_id",
"decision",
"reason_codes"
],
"properties": {
"invoice_line_id": {
"type": "string"
},
"purchase_order_id": {
"type": "string"
},
"po_line_id": {
"type": "string"
},
"decision": {
"anyOf": [
{
"type": "string",
"const": "PROCEED"
},
{
"type": "string",
"const": "REVIEW"
},
{
"type": "string",
"const": "BLOCK"
}
]
},
"reason_codes": {
"type": "array",
"items": {
"type": "string"
}
},
"quantity": {
"type": "object",
"required": [
"ordered",
"previously_invoiced",
"current_invoiced",
"cumulative_invoiced",
"cumulative_received",
"remaining_order_after_current",
"remaining_received_after_current"
],
"properties": {
"ordered": {
"type": "string"
},
"previously_invoiced": {
"type": "string"
},
"current_invoiced": {
"type": "string"
},
"cumulative_invoiced": {
"type": "string"
},
"cumulative_received": {
"type": "string"
},
"remaining_order_after_current": {
"type": "string",
"description": "ordered - cumulative_invoiced, at the PO-line-group level. May be negative (see README)."
},
"remaining_received_after_current": {
"type": "string",
"description": "cumulative_received - cumulative_invoiced, at the PO-line-group level. May be negative."
}
},
"additionalProperties": false
},
"units": {
"type": "object",
"required": [
"invoice_price_basis_quantity",
"po_price_basis_quantity"
],
"properties": {
"invoice_unit_of_measure": {
"type": "string"
},
"po_unit_of_measure": {
"type": "string"
},
"invoice_price_basis_quantity": {
"type": "string"
},
"po_price_basis_quantity": {
"type": "string"
}
},
"additionalProperties": false
},
"pricing": {
"type": "object",
"required": [
"po_unit_price_minor",
"invoice_unit_price_minor",
"absolute_delta_minor",
"tolerance_bps"
],
"properties": {
"po_unit_price_minor": {
"type": "string"
},
"invoice_unit_price_minor": {
"type": "string"
},
"absolute_delta_minor": {
"type": "string"
},
"tolerance_bps": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"checks": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string",
"const": "PASS"
},
{
"type": "string",
"const": "REVIEW"
},
{
"type": "string",
"const": "BLOCK"
}
]
},
"invoice_line_id": {
"type": "string"
},
"purchase_order_id": {
"type": "string"
},
"po_line_id": {
"type": "string"
},
"reason_code": {
"type": "string"
},
"evidence": {
"type": "object",
"patternProperties": {
"^.*$": {}
}
}
},
"additionalProperties": false
}
},
"input_fingerprint": {
"type": "string",
"description": "SHA-256 fingerprint (\"v1:<hex>\") of the exact submitted evaluation input tuple. Identical input and policy always produce the identical fingerprint. See fingerprint.ts."
}
},
"required": [
"decision",
"machine_action",
"reason_codes",
"ruleset_version",
"coverage",
"invoice",
"totals",
"line_results",
"checks",
"input_fingerprint"
],
"additionalProperties": false
}🔴payout_preflight(payout, trusted_baseline, history, policy)
Call immediately before an AI agent, accounts-payable system, treasury workflow, marketplace, or autonomous payment service authorizes or submits an outbound payout. Payout Preflight deterministically compares the candidate payout with caller-supplied trusted payment instructions, exact amount/currency policy, and supplied payout history; validates supported IBAN, US routing, and EVM destination structure; and detects destination changes, duplicate payouts, reused references, and first-seen destinations when history is complete. It returns PROCEED, REVIEW, or BLOCK with machine-readable evidence. Use it for payout validation, payment pre-validation, beneficiary-bank-detail change controls, duplicate-payment prevention, treasury controls, and agent payment guardrails. It does not verify bank-account ownership, perform Verification of Payee, AML/sanctions screening, submit payments, or guarantee settlement. Paid invocation: 50000 micro-USD per successful execution.
Esquema de entrada
{
"type": "object",
"properties": {
"payout": {
"type": "object",
"required": [
"destination",
"amount_minor",
"currency"
],
"properties": {
"payout_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"beneficiary_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"destination": {
"anyOf": [
{
"type": "object",
"required": [
"scheme",
"iban"
],
"properties": {
"scheme": {
"type": "string",
"const": "iban"
},
"iban": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"bic": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"routing_number",
"account_number"
],
"properties": {
"scheme": {
"type": "string",
"const": "us_bank"
},
"routing_number": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"account_number": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"network",
"address"
],
"properties": {
"scheme": {
"type": "string",
"const": "evm"
},
"network": {
"type": "string",
"minLength": 1,
"maxLength": 40,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"address": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"namespace",
"value"
],
"properties": {
"scheme": {
"type": "string",
"const": "opaque"
},
"namespace": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 600,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
}
]
},
"amount_minor": {
"type": "string",
"pattern": "^[1-9][0-9]{0,29}$",
"description": "Positive minor-unit integer amount as a decimal digit string, parsed via BigInt."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"reference": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"rail": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"purpose_code": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
},
"trusted_baseline": {
"anyOf": [
{
"type": "object",
"required": [
"destination"
],
"properties": {
"beneficiary_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"rail": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"expected_amount_minor": {
"type": "string",
"pattern": "^[1-9][0-9]{0,29}$",
"description": "Positive minor-unit integer amount as a decimal digit string, parsed via BigInt."
},
"reference": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"purpose_code": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"destination": {
"anyOf": [
{
"type": "object",
"required": [
"scheme",
"iban"
],
"properties": {
"scheme": {
"type": "string",
"const": "iban"
},
"iban": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"bic": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"routing_number",
"account_number"
],
"properties": {
"scheme": {
"type": "string",
"const": "us_bank"
},
"routing_number": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"account_number": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"network",
"address"
],
"properties": {
"scheme": {
"type": "string",
"const": "evm"
},
"network": {
"type": "string",
"minLength": 1,
"maxLength": 40,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"address": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"namespace",
"value"
],
"properties": {
"scheme": {
"type": "string",
"const": "opaque"
},
"namespace": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 600,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"destination_fingerprint",
"fingerprint_scheme"
],
"properties": {
"beneficiary_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"rail": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"expected_amount_minor": {
"type": "string",
"pattern": "^[1-9][0-9]{0,29}$",
"description": "Positive minor-unit integer amount as a decimal digit string, parsed via BigInt."
},
"reference": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"purpose_code": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"destination_fingerprint": {
"type": "string",
"pattern": "^sha256:[0-9a-f]{64}$",
"description": "SHA-256 fingerprint, exactly \"sha256:\" followed by 64 lowercase hex characters."
},
"fingerprint_scheme": {
"type": "string",
"const": "payout_destination_v1"
}
},
"additionalProperties": false
}
]
},
"history": {
"type": "object",
"required": [
"entries",
"completeness"
],
"properties": {
"entries": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"required": [
"payout_fingerprint"
],
"properties": {
"payout_fingerprint": {
"type": "string",
"pattern": "^sha256:[0-9a-f]{64}$",
"description": "SHA-256 fingerprint, exactly \"sha256:\" followed by 64 lowercase hex characters."
},
"occurred_at": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness."
},
"reference": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"beneficiary_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"destination",
"amount_minor",
"currency"
],
"properties": {
"destination": {
"anyOf": [
{
"type": "object",
"required": [
"scheme",
"iban"
],
"properties": {
"scheme": {
"type": "string",
"const": "iban"
},
"iban": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"bic": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"routing_number",
"account_number"
],
"properties": {
"scheme": {
"type": "string",
"const": "us_bank"
},
"routing_number": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"account_number": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"network",
"address"
],
"properties": {
"scheme": {
"type": "string",
"const": "evm"
},
"network": {
"type": "string",
"minLength": 1,
"maxLength": 40,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"address": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"namespace",
"value"
],
"properties": {
"scheme": {
"type": "string",
"const": "opaque"
},
"namespace": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 600,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
}
]
},
"amount_minor": {
"type": "string",
"pattern": "^[1-9][0-9]{0,29}$",
"description": "Positive minor-unit integer amount as a decimal digit string, parsed via BigInt."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"reference": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"beneficiary_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"occurred_at": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness."
}
},
"additionalProperties": false
}
]
},
"maxItems": 500
},
"completeness": {
"anyOf": [
{
"type": "string",
"const": "complete"
},
{
"type": "string",
"const": "partial"
}
]
},
"window_start": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness."
},
"window_end": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness."
}
},
"additionalProperties": false
},
"policy": {
"type": "object",
"properties": {
"require_trusted_destination": {
"type": "boolean"
},
"destination_change_action": {
"anyOf": [
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"beneficiary_change_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"currency_change_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"rail_change_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"bic_change_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"reference_change_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"purpose_code_change_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"first_seen_destination_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"exact_duplicate_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"duplicate_reference_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"max_amount_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,29})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed via BigInt."
},
"expected_amount_tolerance_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,29})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed via BigInt."
},
"expected_amount_tolerance_bps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
},
"allowed_currencies": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"maxItems": 100
},
"allowed_destination_schemes": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "iban"
},
{
"type": "string",
"const": "us_bank"
},
{
"type": "string",
"const": "evm"
},
{
"type": "string",
"const": "opaque"
}
]
},
"maxItems": 4
},
"require_evm_checksum": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"required": [
"payout"
],
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"decision": {
"anyOf": [
{
"type": "string",
"const": "PROCEED"
},
{
"type": "string",
"const": "REVIEW"
},
{
"type": "string",
"const": "BLOCK"
}
]
},
"machine_action": {
"anyOf": [
{
"type": "string",
"const": "AUTHORIZATION_NOT_BLOCKED_BY_PREFLIGHT"
},
{
"type": "string",
"const": "REQUIRE_REVIEW_BEFORE_AUTHORIZATION"
},
{
"type": "string",
"const": "DO_NOT_AUTHORIZE"
}
]
},
"reason_codes": {
"type": "array",
"items": {
"type": "string"
}
},
"ruleset_version": {
"type": "string"
},
"coverage": {
"type": "object",
"required": [
"complete_for_declared_scope",
"checks_performed",
"checks_not_performed",
"trusted_baseline",
"history"
],
"properties": {
"complete_for_declared_scope": {
"type": "boolean"
},
"checks_performed": {
"type": "array",
"items": {
"type": "string"
}
},
"checks_not_performed": {
"type": "array",
"items": {
"type": "string"
}
},
"trusted_baseline": {
"anyOf": [
{
"type": "string",
"const": "raw"
},
{
"type": "string",
"const": "fingerprint"
},
{
"type": "string",
"const": "absent"
}
]
},
"history": {
"anyOf": [
{
"type": "string",
"const": "complete"
},
{
"type": "string",
"const": "partial"
},
{
"type": "string",
"const": "absent"
}
]
}
},
"additionalProperties": false
},
"candidate": {
"type": "object",
"required": [
"currency",
"amount_minor",
"destination_scheme",
"destination_fingerprint",
"payout_fingerprint"
],
"properties": {
"payout_id": {
"type": "string"
},
"beneficiary_id": {
"type": "string"
},
"currency": {
"type": "string"
},
"amount_minor": {
"type": "string"
},
"destination_scheme": {
"anyOf": [
{
"type": "string",
"const": "iban"
},
{
"type": "string",
"const": "us_bank"
},
{
"type": "string",
"const": "evm"
},
{
"type": "string",
"const": "opaque"
}
]
},
"destination_fingerprint": {
"type": "string",
"pattern": "^sha256:[0-9a-f]{64}$",
"description": "SHA-256 fingerprint, exactly \"sha256:\" followed by 64 lowercase hex characters."
},
"payout_fingerprint": {
"type": "string",
"pattern": "^sha256:[0-9a-f]{64}$",
"description": "SHA-256 fingerprint, exactly \"sha256:\" followed by 64 lowercase hex characters."
}
},
"additionalProperties": false
},
"checks": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string",
"const": "PASS"
},
{
"type": "string",
"const": "REVIEW"
},
{
"type": "string",
"const": "BLOCK"
}
]
},
"reason_code": {
"type": "string"
},
"evidence": {
"type": "object",
"patternProperties": {
"^.*$": {}
}
}
},
"additionalProperties": false
}
}
},
"required": [
"decision",
"machine_action",
"reason_codes",
"ruleset_version",
"coverage",
"candidate",
"checks"
],
"additionalProperties": false
}🔴decision_optimization
Call immediately before an autonomous system must choose among multiple feasible actions under limited resources, costs, capacities, eligibility rules, and an economic objective. Decision Optimization compiles a typed economic problem — supplier/inventory allocation across sources and demands, task-to-resource assignment, budget-constrained option selection, or production/resource mix — into a bounded MILP model, solves it with a fixed deterministic solver profile, and independently re-verifies the candidate decision against the original problem before returning it. Returns OPTIMAL, FEASIBLE, INFEASIBLE, UNBOUNDED, or NO_SOLUTION with machine-readable evidence: verified feasibility, solver optimality/gap, binding constraints, and stable fingerprints. It does not perform vehicle routing, scheduling, calendar planning, 3D/carton packing, arbitrary LP/MIP solving, natural-language optimization modeling, forecasting, or external data retrieval. Paid invocation: 30000 micro-USD per successful execution.
Esquema de entrada
{
"type": "object",
"anyOf": [
{
"type": "object",
"required": [
"problem_type",
"objective",
"sources",
"demands",
"lanes"
],
"properties": {
"problem_type": {
"type": "string",
"const": "allocation"
},
"objective": {
"type": "string",
"const": "minimize_total_cost"
},
"sources": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"capacity"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"capacity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"fixed_cost": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"min_active_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Positive decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
},
"demands": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"requirement",
"satisfaction"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"requirement": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"max_quantity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"satisfaction": {
"anyOf": [
{
"type": "string",
"const": "exact"
},
{
"type": "string",
"const": "at_least"
}
]
}
},
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
},
"lanes": {
"type": "array",
"items": {
"type": "object",
"required": [
"source_id",
"demand_id",
"unit_cost"
],
"properties": {
"source_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"demand_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"unit_cost": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"min_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Positive decimal string, up to 15 integer digits and 6 fractional digits."
},
"max_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Positive decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"minItems": 1,
"maxItems": 4000
},
"concentration": {
"type": "object",
"required": [
"basis",
"max_share_bps"
],
"properties": {
"basis": {
"anyOf": [
{
"type": "string",
"const": "quantity"
},
{
"type": "string",
"const": "spend"
}
]
},
"max_share_bps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"problem_type",
"objective",
"tasks",
"resources",
"pairs"
],
"properties": {
"problem_type": {
"type": "string",
"const": "assignment"
},
"objective": {
"anyOf": [
{
"type": "string",
"const": "minimize_total_cost"
},
{
"type": "string",
"const": "maximize_total_value"
}
]
},
"tasks": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"required"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"required": {
"type": "boolean"
},
"max_assignments": {
"type": "integer",
"minimum": 1,
"maximum": 500
}
},
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
},
"resources": {
"type": "array",
"items": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"capacity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Positive decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
},
"pairs": {
"type": "array",
"items": {
"type": "object",
"required": [
"task_id",
"resource_id",
"cost_or_value"
],
"properties": {
"task_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"resource_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"cost_or_value": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"consumption": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Positive decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"minItems": 1,
"maxItems": 4000
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"problem_type",
"objective",
"options",
"budgets"
],
"properties": {
"problem_type": {
"type": "string",
"const": "selection"
},
"objective": {
"anyOf": [
{
"type": "string",
"const": "maximize_total_value"
},
{
"type": "string",
"const": "minimize_total_cost"
}
]
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"value"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"mandatory": {
"type": "boolean"
},
"forbidden": {
"type": "boolean"
},
"resource_consumption": {
"type": "array",
"items": {
"type": "object",
"required": [
"budget_id",
"amount"
],
"properties": {
"budget_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"amount": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"maxItems": 500
}
},
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
},
"budgets": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"capacity"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"capacity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
},
"cardinality": {
"type": "object",
"properties": {
"min_selected": {
"type": "integer",
"minimum": 0,
"maximum": 500
},
"max_selected": {
"type": "integer",
"minimum": 0,
"maximum": 500
}
},
"additionalProperties": false
},
"dependencies": {
"type": "array",
"items": {
"type": "object",
"required": [
"option_id",
"relation",
"related_option_id"
],
"properties": {
"option_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"relation": {
"anyOf": [
{
"type": "string",
"const": "requires"
},
{
"type": "string",
"const": "excludes"
}
]
},
"related_option_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
}
},
"additionalProperties": false
},
"maxItems": 2000
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"problem_type",
"objective",
"activities",
"resources"
],
"properties": {
"problem_type": {
"type": "string",
"const": "mix"
},
"objective": {
"anyOf": [
{
"type": "string",
"const": "maximize_total_value"
},
{
"type": "string",
"const": "minimize_total_cost"
}
]
},
"activities": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"domain",
"unit_value"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"domain": {
"anyOf": [
{
"type": "string",
"const": "continuous"
},
{
"type": "string",
"const": "integer"
}
]
},
"min_quantity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"max_quantity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"unit_value": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"fixed_cost": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"resource_consumption": {
"type": "array",
"items": {
"type": "object",
"required": [
"resource_id",
"amount"
],
"properties": {
"resource_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"amount": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Positive decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"maxItems": 200
}
},
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
},
"resources": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"capacity"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[^\\x00-\\x1f\\x7f]+$"
},
"capacity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
}
},
"additionalProperties": false
}
]
}Esquema de salida
{
"type": "object",
"properties": {
"status": {
"anyOf": [
{
"type": "string",
"const": "OPTIMAL"
},
{
"type": "string",
"const": "FEASIBLE"
},
{
"type": "string",
"const": "INFEASIBLE"
},
{
"type": "string",
"const": "UNBOUNDED"
},
{
"type": "string",
"const": "NO_SOLUTION"
}
]
},
"machine_action": {
"anyOf": [
{
"type": "string",
"const": "CONSUME_OPTIMAL_DECISION"
},
{
"type": "string",
"const": "REVIEW_FEASIBLE_DECISION"
},
{
"type": "string",
"const": "REVISE_PROBLEM"
},
{
"type": "string",
"const": "DO_NOT_USE_DECISION"
}
]
},
"problem_type": {
"anyOf": [
{
"type": "string",
"const": "allocation"
},
{
"type": "string",
"const": "assignment"
},
{
"type": "string",
"const": "selection"
},
{
"type": "string",
"const": "mix"
}
]
},
"decision": {
"anyOf": [
{
"type": "object",
"required": [
"problem_type",
"lanes",
"source_activations"
],
"properties": {
"problem_type": {
"type": "string",
"const": "allocation"
},
"lanes": {
"type": "array",
"items": {
"type": "object",
"required": [
"source_id",
"demand_id",
"quantity"
],
"properties": {
"source_id": {
"type": "string"
},
"demand_id": {
"type": "string"
},
"quantity": {
"type": "string"
}
},
"additionalProperties": false
}
},
"source_activations": {
"type": "array",
"items": {
"type": "object",
"required": [
"source_id",
"active"
],
"properties": {
"source_id": {
"type": "string"
},
"active": {
"type": "boolean"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"problem_type",
"assignments",
"unassigned_tasks"
],
"properties": {
"problem_type": {
"type": "string",
"const": "assignment"
},
"assignments": {
"type": "array",
"items": {
"type": "object",
"required": [
"task_id",
"resource_id"
],
"properties": {
"task_id": {
"type": "string"
},
"resource_id": {
"type": "string"
}
},
"additionalProperties": false
}
},
"unassigned_tasks": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"problem_type",
"selected_option_ids"
],
"properties": {
"problem_type": {
"type": "string",
"const": "selection"
},
"selected_option_ids": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"problem_type",
"activities"
],
"properties": {
"problem_type": {
"type": "string",
"const": "mix"
},
"activities": {
"type": "array",
"items": {
"type": "object",
"required": [
"activity_id",
"quantity",
"active"
],
"properties": {
"activity_id": {
"type": "string"
},
"quantity": {
"type": "string"
},
"active": {
"type": "boolean"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
]
},
"economics": {
"type": "object",
"required": [
"objective",
"sense"
],
"properties": {
"objective": {
"type": "string"
},
"sense": {
"anyOf": [
{
"type": "string",
"const": "minimize"
},
{
"type": "string",
"const": "maximize"
}
]
},
"objective_value": {
"type": "string"
}
},
"additionalProperties": false
},
"quality": {
"type": "object",
"required": [
"semantic_feasibility_verified",
"solver_optimality",
"solution_uniqueness"
],
"properties": {
"semantic_feasibility_verified": {
"type": "boolean"
},
"solver_optimality": {
"anyOf": [
{
"type": "string",
"const": "optimal_within_profile_tolerance"
},
{
"type": "string",
"const": "time_limit_with_incumbent"
},
{
"type": "string",
"const": "not_applicable"
}
]
},
"relative_gap": {
"type": "string"
},
"absolute_gap": {
"type": "string"
},
"best_bound": {
"type": "string"
},
"solution_uniqueness": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
},
"evidence": {
"type": "object",
"required": [
"constraints_checked",
"constraints_violated",
"input_fingerprint",
"model_fingerprint",
"ruleset_version",
"solver",
"solver_version"
],
"properties": {
"constraints_checked": {
"type": "integer",
"minimum": 0
},
"constraints_violated": {
"type": "integer",
"minimum": 0
},
"input_fingerprint": {
"type": "string",
"pattern": "^v1:[0-9a-f]{64}$"
},
"model_fingerprint": {
"type": "string",
"pattern": "^v1:[0-9a-f]{64}$"
},
"decision_fingerprint": {
"type": "string",
"pattern": "^v1:[0-9a-f]{64}$"
},
"ruleset_version": {
"type": "string"
},
"solver": {
"type": "string",
"const": "highs"
},
"solver_version": {
"type": "string"
}
},
"additionalProperties": false
},
"diagnostics": {
"type": "object",
"required": [
"binding_constraints"
],
"properties": {
"binding_constraints": {
"type": "array",
"items": {
"type": "object",
"required": [
"semantic_id",
"kind"
],
"properties": {
"semantic_id": {
"type": "string"
},
"kind": {
"type": "string"
}
},
"additionalProperties": false
}
},
"infeasibility_reason": {
"type": "string"
},
"infeasibility_shortfall": {
"type": "string"
}
},
"additionalProperties": false
}
},
"required": [
"status",
"machine_action",
"problem_type",
"economics",
"quality",
"evidence",
"diagnostics"
],
"additionalProperties": false
}🔴package_install_preflight(purl, expected_source_repository)
Call immediately before installing or adding an exact third-party npm or PyPI package version. Checks current registry, known vulnerability/malicious-package, publisher withdrawal/deprecation, and verified provenance evidence and returns ALLOW, REVIEW, BLOCK, or UNKNOWN with machine-readable reasons. It accepts only an ECMA-427 Package URL with one exact published version; ranges, dist-tags, Git dependencies, archives, local packages, container images, other ecosystems, dependency graphs, repositories, SBOMs, and source-code or malware analysis are outside this version. It does not install, download, extract, clone, execute, or recommend a package version, and ALLOW never claims that a package is safe. Paid invocation: 10000 micro-USD per successful execution.
Esquema de entrada
{
"type": "object",
"properties": {
"purl": {
"type": "string",
"minLength": 1,
"maxLength": 512,
"pattern": "^pkg:(?:npm|pypi)/",
"description": "ECMA-427 Package URL for one exact published npm or PyPI version. Ranges, dist-tags, qualifiers, and subpaths are not supported."
},
"expected_source_repository": {
"type": "string",
"minLength": 1,
"maxLength": 2048,
"pattern": "^https://",
"description": "Optional HTTPS source repository identity to compare only with cryptographically verified deps.dev provenance. This URL is never fetched."
}
},
"required": [
"purl"
],
"additionalProperties": false
}Esquema de salida
{
"type": "object",
"properties": {
"decision": {
"anyOf": [
{
"type": "string",
"const": "ALLOW"
},
{
"type": "string",
"const": "REVIEW"
},
{
"type": "string",
"const": "BLOCK"
},
{
"type": "string",
"const": "UNKNOWN"
}
]
},
"reason_codes": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "PACKAGE_VERSION_NOT_FOUND"
},
{
"type": "string",
"const": "KNOWN_MALICIOUS_PACKAGE"
},
{
"type": "string",
"const": "KNOWN_VULNERABILITY"
},
{
"type": "string",
"const": "HIGH_OR_CRITICAL_VULNERABILITY"
},
{
"type": "string",
"const": "REMEDIATION_BOUNDARY_OBSERVED"
},
{
"type": "string",
"const": "VERSION_DEPRECATED"
},
{
"type": "string",
"const": "VERSION_YANKED"
},
{
"type": "string",
"const": "VERSION_PARTIALLY_YANKED"
},
{
"type": "string",
"const": "INSTALL_SCRIPT_PRESENT"
},
{
"type": "string",
"const": "SOURCE_REPOSITORY_MISMATCH"
},
{
"type": "string",
"const": "VERIFIED_PROVENANCE"
},
{
"type": "string",
"const": "VERIFIED_SOURCE_REPOSITORY_UNAVAILABLE"
},
{
"type": "string",
"const": "SOURCE_DISAGREEMENT"
},
{
"type": "string",
"const": "EVIDENCE_INCOMPLETE"
},
{
"type": "string",
"const": "NO_BLOCKING_SIGNAL_OBSERVED"
}
]
},
"maxItems": 16
},
"policy_version": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"observed_at": {
"type": "string",
"maxLength": 40
},
"input_fingerprint": {
"type": "string",
"pattern": "^sha256:[0-9a-f]{64}$"
},
"package": {
"type": "object",
"required": [
"purl",
"ecosystem",
"name",
"version"
],
"properties": {
"purl": {
"type": "string",
"maxLength": 512
},
"ecosystem": {
"anyOf": [
{
"type": "string",
"const": "npm"
},
{
"type": "string",
"const": "pypi"
}
]
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"version": {
"type": "string",
"minLength": 1,
"maxLength": 256
}
},
"additionalProperties": false
},
"observations": {
"type": "object",
"required": [
"registry",
"vulnerabilities",
"deps_dev",
"provenance",
"evidence_complete"
],
"properties": {
"registry": {
"type": "object",
"required": [
"exists",
"deprecated",
"yanked",
"yanked_reasons",
"install_scripts",
"distribution_hashes"
],
"properties": {
"exists": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"deprecated": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"deprecated_message": {
"type": "string",
"maxLength": 512
},
"yanked": {
"anyOf": [
{
"type": "string",
"const": "NONE"
},
{
"type": "string",
"const": "PARTIAL"
},
{
"type": "string",
"const": "ALL"
},
{
"type": "string",
"const": "UNKNOWN"
}
]
},
"yanked_reasons": {
"type": "array",
"items": {
"type": "string",
"maxLength": 512
},
"maxItems": 16
},
"install_scripts": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "preinstall"
},
{
"type": "string",
"const": "install"
},
{
"type": "string",
"const": "postinstall"
}
]
},
"maxItems": 3
},
{
"type": "null"
}
]
},
"integrity": {
"type": "string",
"maxLength": 512
},
"requires_python": {
"type": "string",
"maxLength": 512
},
"distribution_hashes": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"required": [
"filename",
"sha256"
],
"properties": {
"filename": {
"type": "string",
"maxLength": 512
},
"sha256": {
"type": "string",
"maxLength": 128
}
},
"additionalProperties": false
},
"maxItems": 128
},
{
"type": "null"
}
]
},
"repository_metadata": {
"type": "object",
"required": [
"url",
"verified"
],
"properties": {
"url": {
"type": "string",
"maxLength": 2048
},
"verified": {
"type": "boolean",
"const": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"vulnerabilities": {
"type": "object",
"required": [
"raw_record_count",
"family_count",
"max_severity",
"malicious_package_signal",
"families"
],
"properties": {
"raw_record_count": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 256
},
{
"type": "null"
}
]
},
"family_count": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 256
},
{
"type": "null"
}
]
},
"max_severity": {
"anyOf": [
{
"type": "string",
"const": "NONE"
},
{
"type": "string",
"const": "LOW"
},
{
"type": "string",
"const": "MEDIUM"
},
{
"type": "string",
"const": "HIGH"
},
{
"type": "string",
"const": "CRITICAL"
},
{
"type": "string",
"const": "UNKNOWN"
}
]
},
"malicious_package_signal": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"families": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"aliases",
"malicious",
"severity",
"cvss_vectors",
"remediation_boundaries"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"aliases": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"maxItems": 64
},
"malicious": {
"type": "boolean"
},
"severity": {
"anyOf": [
{
"type": "string",
"const": "NONE"
},
{
"type": "string",
"const": "LOW"
},
{
"type": "string",
"const": "MEDIUM"
},
{
"type": "string",
"const": "HIGH"
},
{
"type": "string",
"const": "CRITICAL"
},
{
"type": "string",
"const": "UNKNOWN"
}
]
},
"cvss_vectors": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"maxItems": 16
},
"remediation_boundaries": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"maxItems": 64
}
},
"additionalProperties": false
},
"maxItems": 128
}
},
"additionalProperties": false
},
"deps_dev": {
"type": "object",
"required": [
"advisory_ids",
"licenses"
],
"properties": {
"canonical_name": {
"type": "string",
"maxLength": 256
},
"canonical_version": {
"type": "string",
"maxLength": 256
},
"advisory_ids": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"maxLength": 128
},
"maxItems": 256
},
{
"type": "null"
}
]
},
"licenses": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"maxLength": 256
},
"maxItems": 64
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"provenance": {
"type": "object",
"required": [
"verified",
"attestation_types",
"source_repositories",
"expected_repository_match"
],
"properties": {
"verified": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"attestation_types": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"maxLength": 256
},
"maxItems": 16
},
{
"type": "null"
}
]
},
"source_repositories": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"maxLength": 2048
},
"maxItems": 16
},
{
"type": "null"
}
]
},
"expected_repository_match": {
"anyOf": [
{
"type": "string",
"const": "NOT_REQUESTED"
},
{
"type": "string",
"const": "MATCH"
},
{
"type": "string",
"const": "MISMATCH"
},
{
"type": "string",
"const": "UNAVAILABLE"
}
]
}
},
"additionalProperties": false
},
"evidence_complete": {
"type": "boolean"
}
},
"additionalProperties": false
},
"evidence": {
"type": "array",
"items": {
"type": "object",
"required": [
"source",
"status",
"observed_at",
"latency_ms",
"attempts"
],
"properties": {
"source": {
"anyOf": [
{
"type": "string",
"const": "npm_registry"
},
{
"type": "string",
"const": "pypi"
},
{
"type": "string",
"const": "osv"
},
{
"type": "string",
"const": "deps_dev"
}
]
},
"status": {
"anyOf": [
{
"type": "string",
"const": "OK"
},
{
"type": "string",
"const": "NOT_FOUND"
},
{
"type": "string",
"const": "UNAVAILABLE"
},
{
"type": "string",
"const": "UNSUPPORTED"
}
]
},
"observed_at": {
"type": "string",
"maxLength": 40
},
"latency_ms": {
"type": "number",
"minimum": 0
},
"attempts": {
"type": "integer",
"minimum": 0,
"maximum": 4
}
},
"additionalProperties": false
},
"minItems": 3,
"maxItems": 3
},
"unknowns": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "REGISTRY_EVIDENCE_UNAVAILABLE"
},
{
"type": "string",
"const": "OSV_EVIDENCE_UNAVAILABLE"
},
{
"type": "string",
"const": "VERIFIED_SOURCE_REPOSITORY_UNAVAILABLE"
},
{
"type": "string",
"const": "SOURCE_IDENTITY_DISAGREEMENT"
}
]
},
"maxItems": 4
}
},
"required": [
"decision",
"reason_codes",
"policy_version",
"observed_at",
"input_fingerprint",
"package",
"observations",
"evidence",
"unknowns"
],
"additionalProperties": false
}Prompts recomendados
openapi_agent_readinessopenapi_agent_readinessComunidad
Evidencia