Skip to content

Commit 9108544

Browse files
vvillait88claude
andcommitted
Add reputation types and bump to v1.2.0
Add EvidenceSummary, Reputation TypedDicts with all API fields in snake_case. Add reputation to ReputationResponseFull. Remove unused Any import. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5a30725 commit 9108544

4 files changed

Lines changed: 47 additions & 8 deletions

File tree

agentscore/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
DecisionPolicy,
1010
EntityType,
1111
Grade,
12+
Reputation,
1213
ReputationResponse,
1314
ReputationResponseFull,
1415
ReputationStatus,
@@ -29,6 +30,7 @@
2930
"DecisionPolicy",
3031
"EntityType",
3132
"Grade",
33+
"Reputation",
3234
"ReputationResponse",
3335
"ReputationResponseFull",
3436
"ReputationStatus",

agentscore/types.py

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import Any, Literal, TypedDict
3+
from typing import Literal, TypedDict
44

55
Grade = Literal["A", "B", "C", "D", "F"]
66
EntityType = Literal["agent", "service", "hybrid", "wallet", "bot", "unknown"]
@@ -54,6 +54,42 @@ class Activity(TypedDict):
5454
last_verified_tx_at: str | None
5555

5656

57+
class Reputation(TypedDict):
58+
feedback_count: int
59+
client_count: int
60+
trust_avg: float | None
61+
uptime_avg: float | None
62+
activity_avg: float | None
63+
last_feedback_at: str | None
64+
65+
66+
class EvidenceSummary(TypedDict, total=False):
67+
candidate_tx_count: int
68+
confirmed_or_likely_tx: int
69+
endpoint_count: int
70+
github_stars: int
71+
github_url: str | None
72+
has_a2a_agent_card: bool
73+
has_ens: bool
74+
has_github: bool
75+
has_website: bool
76+
healthy_endpoints: int
77+
is_erc8004: bool
78+
metadata_kind: str | None
79+
metadata_quality: str | None
80+
multi_chain_count: int
81+
reputation_feedback_count: int
82+
reputation_trust_avg: float | None
83+
reputation_uptime_avg: float | None
84+
reputation_activity_avg: float | None
85+
reputation_client_count: int
86+
verified_tx_count: int
87+
website_mentions_mcp: bool
88+
website_mentions_x402: bool
89+
website_reachable: bool
90+
website_url: str | None
91+
92+
5793
class OperatorScore(TypedDict):
5894
score: int
5995
grade: Grade
@@ -75,7 +111,7 @@ class ReputationResponse(TypedDict):
75111
score: Score
76112
identity: Identity | None
77113
activity: Activity | None
78-
evidence_summary: dict[str, Any] | None
114+
evidence_summary: EvidenceSummary | None
79115
data_semantics: str
80116
caveats: list[str]
81117
updated_at: str | None
@@ -84,6 +120,7 @@ class ReputationResponse(TypedDict):
84120
class ReputationResponseFull(ReputationResponse, total=False):
85121
operator_score: OperatorScore
86122
agents: list[AgentSummary]
123+
reputation: Reputation
87124

88125

89126
class DecisionPolicy(TypedDict, total=False):
@@ -98,7 +135,7 @@ class AssessResponse(TypedDict):
98135
score: Score
99136
identity: Identity | None
100137
activity: Activity | None
101-
evidence_summary: dict[str, Any] | None
138+
evidence_summary: EvidenceSummary | None
102139
data_semantics: str
103140
caveats: list[str]
104141
updated_at: str | 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.1.0"
7+
version = "1.2.0"
88
description = "Python client for the AgentScore trust and reputation API"
99
readme = "README.md"
1010
license = "MIT"

uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)