@kindgi/client 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -48,7 +48,7 @@ const run = await client.runs.start({
48
48
  input: { draftId: 'draft_123' },
49
49
  options: { wait: false },
50
50
  });
51
- for await (const event of client.runs.stream(run.id)) {
51
+ for await (const event of client.runs.follow(run.id)) {
52
52
  console.log(event.kind, event.payload);
53
53
  }
54
54
 
@@ -72,9 +72,9 @@ try {
72
72
 
73
73
  ## Exports
74
74
 
75
- - **`createClient(options: ClientOptions)`** — returns a `KindgiClient` with one resource client per property (see [Resources](#resources)). `ClientOptions`: `apiUrl` (no trailing slash), `auth` (`{ kind: 'apiToken', token }` or `{ kind: 'oauth', accessToken, refresh? }`), an optional `fetch`, and an optional `timeoutMs` (below). Creating a client opens no connections.
75
+ - **`createClient(options: ClientOptions)`** — returns a `KindgiClient` with one resource client per property (see [Resources](#resources)). `ClientOptions`: `apiUrl` (no trailing slash), `auth` (`{ kind: 'apiToken', token }` or `{ kind: 'oauth', accessToken, refresh? }`; `refresh` isn't called yet: on an `auth` error with reason `token-expired`, get a new token and make the call again), an optional `fetch`, and an optional `timeoutMs` (below). Creating a client opens no connections.
76
76
  - **Errors** — every method throws **`KindgiApiError`**, whose `error` is a **`KindgiError`** discriminated on `code`: `network`, `auth`, `rate-limited`, `not-found`, `conflict`, `invalid-request`, `guardrail-violation`, `server`, `not-implemented-in-preview`, `not-yet-wired`. **`fromWire(body)`** maps an API error (`{ code, message, details? }`) onto that union; wire codes it does not recognize become `server`, with the original code in `serverCode`. **`notYetWired`** and **`notImplementedInPreview`** build the two preview variants.
77
- - **Streaming** — **`readSse`** and **`unwrapSseData`** read a `text/event-stream` response as an `AsyncIterable`, reconnecting with exponential backoff and `Last-Event-Id`. `runs.stream`, `evalRuns.events`, `adapters.prepare` and the `secrets` rotation event stream are built on them.
77
+ - **Streaming** — **`readSse`** and **`unwrapSseData`** read a `text/event-stream` response as an `AsyncIterable`, reconnecting with exponential backoff and `Last-Event-Id`. `runs.follow`, `evalRuns.events`, `adapters.prepare` and the `secrets` rotation event stream are built on them.
78
78
  - **Types** — the input, filter, page and record types of every resource; branded ids and `Filter` / `Page` re-exported from [`@kindgi/types`](../../packages/types/); `DefineAgentSpec` and `RunStatus`.
79
79
  - **`Transport`** / **`TransportRequest`** — the request contract the resource clients call.
80
80
 
@@ -100,7 +100,8 @@ The transport makes one attempt per call and does not retry. Mutating calls acce
100
100
  | `conversations` | `/v1/conversations` | — |
101
101
  | `memory` | `/v1/memory` | `logs.append`, `logs.list`, `logs.verify` |
102
102
  | `provenance` | `/v1/provenance` | `verify` |
103
- | `supervisor` | `/v1/proposals` | `define`, `get`, `list`, `versions`, `delete`, `proposals.reflectReview` |
103
+ | `proposals` | `/v1/proposals` | — |
104
+ | `supervisor` | — | `define`, `get`, `list`, `versions`, `delete`, and every `proposals.*` method (removed in 0.1.5: use `client.proposals`) |
104
105
  | `observations` | `/v1/observations` | `recordRun`, `patterns` |
105
106
  | `approvals` | `/v1/approvals` | `batch`, `assign`, `completeToken`, `reviewers.updateRole`, `audit.get`, `audit.list`, `audit.verify` |
106
107
  | `tenant` | `/v1/tenant` | — |