Implement discovery-driven Python client (contract registry only) #1

Closed
opened 2026-09-08 20:04:52 +00:00 by nsaspy · 2 comments
Owner

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-ID propagation, normalized
error envelopes (status, msg, correlation_id, stable code).

Constraints

  • Contract-registry routes only. No legacy server routes anywhere
    (/new/document/:dtype, /documents/bulk, /document/:id,
    /new/target/:actor, GET /search, view query routes). Operations are
    generated/selected from the client manifest; a test must fail if any legacy
    path string appears in src/.
  • Document publication is blocked on starintel-server#5 (registry
    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.
  • httpx transport (async core + sync facade), stdlib-dataclasses models,
    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.

## 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-ID` propagation, normalized error envelopes (`status`, `msg`, `correlation_id`, stable `code`). ## Constraints - **Contract-registry routes only.** No legacy server routes anywhere (`/new/document/:dtype`, `/documents/bulk`, `/document/:id`, `/new/target/:actor`, `GET /search`, view query routes). Operations are generated/selected from the client manifest; a test must fail if any legacy path string appears in `src/`. - Document publication is **blocked** on starintel-server#5 (registry 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. - httpx transport (async core + sync facade), stdlib-dataclasses models, 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.
Author
Owner

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.

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.
Author
Owner

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).

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).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starintel-labs/starintel-client#1
No description provided.