Implement discovery-driven Python client (contract registry only) #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Implement the reusable StarIntel Python API client per repo AGENTS.md:
discovery-driven from
GET /client-manifest.json+GET /openapi.json,Authorization: Bearer <api-key>,X-Correlation-IDpropagation, normalizederror envelopes (
status,msg,correlation_id, stablecode).Constraints
(
/new/document/:dtype,/documents/bulk,/document/:id,/new/target/:actor,GET /search, view query routes). Operations aregenerated/selected from the client manifest; a test must fail if any legacy
path string appears in
src/.migration). Implement everything the current registry contracts
(health, metadata, login, authenticated context, users, API credentials,
discovery) plus the discovery/transport/auth/error machinery so document
operations appear automatically once the server contracts them.
mypy strict, hermetic tests (stdlib http.server mock), live tests opt-in via
STARINTEL_LIVE_TEST=1.Depends on: nothing (implement now); document ops blocked by starintel-server#5.
Implemented on rage/1-discovery-client (PR #2): manifest-driven operations, Bearer auth, correlation IDs, normalized envelopes, anti-legacy-route scan test. 84 passed / 2 skipped hermetic; ruff + mypy strict clean; live-validated against the real server with zero code change when the registry grew.
Merged (#2, #3, #4). Discovery-driven client + typed document publish + open_document_client capability probe; live-validated against merged master (25 ops incl. all six document operations).