Skip to content

Commit d67367b

Browse files
vvillait88claude
andauthored
fix: add PolicyResult type, EntityType variants (v1.4.1) (#8)
Type accuracy fixes from three-pass audit Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4354cc9 commit d67367b

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

‎agentscore/types.py‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import Literal, TypedDict
44

55
Grade = Literal["A", "B", "C", "D", "F"]
6-
EntityType = Literal["agent", "service", "hybrid", "wallet", "bot", "unknown"]
6+
EntityType = Literal["agent", "service", "hybrid", "wallet", "bot", "unknown", "individual", "entity"]
77
ReputationStatus = Literal["scored", "stale", "known_unscored"]
88
VerificationLevel = Literal["none", "wallet_claimed", "kyc_verified"]
99

@@ -146,6 +146,18 @@ class OperatorVerification(_OperatorVerificationRequired, total=False):
146146
verified_at: str | None
147147

148148

149+
class PolicyCheck(TypedDict, total=False):
150+
rule: str
151+
passed: bool
152+
required: object
153+
actual: object
154+
155+
156+
class PolicyResult(TypedDict):
157+
all_passed: bool
158+
checks: list[PolicyCheck]
159+
160+
149161
class DecisionPolicy(TypedDict, total=False):
150162
min_grade: Grade
151163
min_score: int
@@ -176,3 +188,4 @@ class AssessResponse(_AssessResponseRequired, total=False):
176188
operator_verification: OperatorVerification
177189
resolved_operator: str
178190
verify_url: str
191+
policy_result: PolicyResult | None

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "agentscore-py"
7-
version = "1.4.0"
7+
version = "1.4.1"
88
description = "Python client for the AgentScore trust and reputation API"
99
readme = "README.md"
1010
license = "MIT"

‎uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)