docs(python): audit packaging and docs

Document shared modules and the mypy platform in AGENTS.md, add the
missing client methods and types to README, and remove build residue.

Claude-Session: https://claude.ai/code/session_01Agoc9bRVE9KL7mmWtey9Vq
This commit is contained in:
雷电芽衣 committed 2026-09-03 00:45:30 -04:00
1 parent aa4b8a8bdf
commit f7aa525bdb
2 files changed
+64 -12

No files matched your search

+52 -11
View File
@@ -161,14 +161,20 @@ Retryable responses honor both `Retry-After` seconds and HTTP-date values.
# Register a new user and organization
reg = ElydoraClient.register(base_url, email, password, display_name=None, org_name=None)
# Login and receive a session token
# Login and use the session token
auth = ElydoraClient.login(base_url, email, password)
client.token = auth["token"]
# Get current authenticated user profile
me = client.get_me()
# Issue a new API token (with optional TTL in seconds)
# Issue an API token from the session token (optional TTL in seconds)
token_resp = client.issue_api_token(ttl_seconds=3600)
client.token = token_resp["token"]
# Rotate the API token the client now uses
rotated = client.rotate_api_token()
client.token = rotated["token"]
```
### Operations
@@ -219,6 +225,9 @@ agents_resp = client.list_agents()
# Unfreeze a previously frozen agent
client.unfreeze_agent(agent_id, reason="review complete")
# Change the integration type
client.update_agent(agent_id, integration_type="cursor")
# Delete an agent permanently
deleted_resp = client.delete_agent(agent_id)
```
@@ -260,6 +269,25 @@ detail = client.get_export(export_id)
data = client.download_export(export_id)
```
### Webhooks
```python
webhooks = client.list_webhooks()
created = client.register_webhook(
endpoint_url="https://example.com/elydora",
events=["operation.accepted", "agent.status_changed"],
secret="<signing-secret>",
)
client.delete_webhook(created["webhook"]["webhook_id"])
```
### Organization
```python
members = client.list_members()
events = client.list_admin_events(limit=50)
```
### JWKS
```python
@@ -269,9 +297,12 @@ jwks = client.get_jwks()
### Health
```python
# Check API health (no authentication required)
# No authentication required
health = client.health()
# health["status"], health["version"], health["protocol_version"], health["timestamp"]
# health["status"], health["version"], health["protocol_version"], health["capabilities"]
deep = client.deep_health()
# deep["dependencies"]["d1"]["status"], deep["dependencies"]["d1"]["latency_ms"]
```
### Crypto Functions
@@ -303,7 +334,7 @@ from elydora import (
### Type Definitions
All types are `TypedDict` classes for structural typing:
Records are `TypedDict` classes; enumerations are `Literal` aliases, and `INTEGRATION_TYPES` is a tuple:
```python
from elydora import (
@@ -312,18 +343,28 @@ from elydora import (
EAR, # Elydora Acknowledgment Receipt
# Entity types
Agent, AgentKey, Operation, Receipt, Epoch, Export, Organization, User,
Agent, AgentAssignment, AgentKey, AdminEvent, AuthMeUser,
CurrentOrganization, DependencyHealth, EpochAnchor, MemberEntry,
Operation, Receipt, Epoch, Export, Organization, User, WebhookEntry,
# Enumerations
AdminAction, AgentStatus, ErrorCode, ExportStatus, IntegrationType,
KeyStatus, RbacRole, INTEGRATION_TYPES,
# API response types
RegisterAgentResponse, GetAgentResponse, ListAgentsResponse,
DeleteAgentResponse, SubmitOperationResponse, GetOperationResponse,
RegisterAgentResponse, UpdateAgentResponse, GetAgentResponse,
ListAgentsResponse, DeleteAgentResponse, FreezeAgentResponse,
UnfreezeAgentResponse, SubmitOperationResponse, GetOperationResponse,
VerifyOperationResponse, AuditQueryResponse, GetEpochResponse,
ListEpochsResponse, CreateExportResponse, GetExportResponse,
ListExportsResponse, JWKSResponse, AuthRegisterResponse,
AuthLoginResponse, GetMeResponse, IssueApiTokenResponse, HealthResponse,
ListExportsResponse, ListWebhooksResponse, RegisterWebhookResponse,
ListMembersResponse, ListAdminEventsResponse, JWKSResponse,
AuthRegisterResponse, AuthLoginResponse, GetMeResponse,
IssueApiTokenResponse, RotateApiTokenResponse, HealthResponse,
DeepHealthResponse,
# Request types
RegisterAgentRequest,
RegisterAgentRequest, UpdateAgentRequest,
)
```