trustmodel 3.3.2__tar.gz → 3.4.0__tar.gz
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.
- {trustmodel-3.3.2 → trustmodel-3.4.0}/PKG-INFO +1 -1
- {trustmodel-3.3.2 → trustmodel-3.4.0}/pyproject.toml +1 -1
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/endpoints/agentcert.py +26 -3
- {trustmodel-3.3.2 → trustmodel-3.4.0}/.gitignore +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/LICENSE +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/README.md +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/__init__.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/cli.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/client.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/compat.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/endpoints/__init__.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/endpoints/_runtime_transport.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/endpoints/agentic.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/endpoints/batch_jobs.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/endpoints/config.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/endpoints/credits.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/endpoints/evaluations.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/endpoints/frameworks.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/endpoints/galileo.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/endpoints/guardrails.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/endpoints/mcp_scanner.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/endpoints/models.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/exceptions.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/models/__init__.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/models/agentcert.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/models/agentic.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/models/batch_job.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/models/credits.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/models/evaluation.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/models/frameworks.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/models/galileo.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/models/guardrails.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/models/mcp_scanner.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/models/models.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/models/oauth.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/oauth/__init__.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/oauth/auth.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/oauth/scopes.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/telemetry/__init__.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/telemetry/_constants.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/telemetry/_instrumentors.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/telemetry/auto_init.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/utils/__init__.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/utils/validation.py +0 -0
- {trustmodel-3.3.2 → trustmodel-3.4.0}/src/trustmodel/utils/version.py +0 -0
|
@@ -102,6 +102,7 @@ class AgentCertEndpoint:
|
|
|
102
102
|
subject_agent_id: Optional[str] = None,
|
|
103
103
|
auditor_slug: Optional[str] = None,
|
|
104
104
|
validity_days: Optional[int] = None,
|
|
105
|
+
validation_level: Optional[str] = None,
|
|
105
106
|
) -> AgentCertificate:
|
|
106
107
|
"""Mint a new AgentCert from a completed evaluation run.
|
|
107
108
|
|
|
@@ -114,13 +115,24 @@ class AgentCertEndpoint:
|
|
|
114
115
|
RAG corpus runs are rejected with a stable 400 error code so callers
|
|
115
116
|
can route the user back to picking a compatible run.
|
|
116
117
|
|
|
118
|
+
**Validation tiers (TRUS-1673):** ``validation_level="DV"`` (default,
|
|
119
|
+
free) or ``"OV"`` (paid — requires the org to have OV entitlement in
|
|
120
|
+
the Marketplace plan AND the ``ans_name`` to be organization-validated
|
|
121
|
+
(``assurance_tier=OV``) in the ANS registry). Callers who omit the
|
|
122
|
+
kwarg get DV — byte-identical to pre-1673 behaviour. OV rejection
|
|
123
|
+
surfaces as one of three stable error codes that map to typed
|
|
124
|
+
exceptions (see ``Raises``).
|
|
125
|
+
|
|
117
126
|
Args:
|
|
118
127
|
ans_name: Agent Naming Service binding (e.g. ``helpbot.cisco.com``).
|
|
119
128
|
evaluation_run_id: Source eval run id (must belong to the org).
|
|
120
129
|
subject_agent_id: Optional agent identifier; derived from the eval
|
|
121
130
|
when omitted.
|
|
122
131
|
auditor_slug: Optional auditor to link the cert to.
|
|
123
|
-
validity_days: Optional cert lifetime (1–825); backend
|
|
132
|
+
validity_days: Optional cert lifetime (1–825); backend picks a
|
|
133
|
+
per-tier default when omitted (DV=90, OV=365).
|
|
134
|
+
validation_level: Optional cert tier — ``"DV"`` (default) or
|
|
135
|
+
``"OV"``. Omit for DV. See TRUS-1673.
|
|
124
136
|
|
|
125
137
|
Returns:
|
|
126
138
|
The minted :class:`AgentCertificate`.
|
|
@@ -133,8 +145,14 @@ class AgentCertEndpoint:
|
|
|
133
145
|
``status=completed`` yet. Subclass of :class:`APIError`.
|
|
134
146
|
EvaluationNotFoundError: run id isn't visible in the caller's
|
|
135
147
|
org (or doesn't exist). Subclass of :class:`APIError`.
|
|
136
|
-
APIError: any other non-2xx
|
|
137
|
-
|
|
148
|
+
APIError: any other non-2xx. TRUS-1673 introduces three new stable
|
|
149
|
+
codes for OV rejection surfaced on ``exc.error_code``:
|
|
150
|
+
``unentitled_for_ov`` (403 — org's plan doesn't include OV),
|
|
151
|
+
``validation_required`` (403 — ans_name isn't
|
|
152
|
+
``assurance_tier=OV``), ``assurance_lookup_failed`` (502 —
|
|
153
|
+
ans-registry unreachable, retriable). Also
|
|
154
|
+
``cannot_downgrade_active_cert`` (400) when re-minting at DV
|
|
155
|
+
over an existing active OV cert.
|
|
138
156
|
"""
|
|
139
157
|
if not ans_name:
|
|
140
158
|
raise ValueError("agentcert.issue(): `ans_name` is required")
|
|
@@ -148,6 +166,11 @@ class AgentCertEndpoint:
|
|
|
148
166
|
data["auditor_slug"] = auditor_slug
|
|
149
167
|
if validity_days is not None:
|
|
150
168
|
data["validity_days"] = validity_days
|
|
169
|
+
# TRUS-1673 — send ``validation_level`` on the wire only when the
|
|
170
|
+
# caller opts in. Omitting matches pre-1673 wire body byte-for-byte,
|
|
171
|
+
# so the BE default (DV) applies and existing callers see no change.
|
|
172
|
+
if validation_level is not None:
|
|
173
|
+
data["validation_level"] = validation_level
|
|
151
174
|
|
|
152
175
|
try:
|
|
153
176
|
response = self._client.post(_ISSUE_PATH, data=data)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|