@graph8/sdk 0.238.0 → 0.244.0

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
@@ -324,6 +324,11 @@ Two things to know before reaching for it:
324
324
  | `g8.signals.company(domain)` | Get intent signals |
325
325
  | `g8.signals.stream(domains, cb)` | Stream signals (polls 30s) |
326
326
 
327
+ With an `apiKey`, signals use Bearer auth and the key must carry the `intent:read`
328
+ scope. Personal keys and keys minted before scoped keys do not, and get a `403`,
329
+ which `company()` throws as a `G8Error` explaining the fix (and which stops
330
+ `stream()`). With only a `writeKey`, a failure still resolves to an all-zeros result.
331
+
327
332
  ### Webhooks (API key)
328
333
 
329
334
  | Method | Description |
@@ -474,6 +479,16 @@ const { data: objects } = await service.request<{ data: unknown[] }>('/api/v1/ap
474
479
 
475
480
  Get your API key at [app.graph8.com/settings](https://app.graph8.com/settings) under MCP & API > API.
476
481
 
482
+ ### `X-Target-Org-Id` (agency keys only)
483
+
484
+ Setting the `X-Target-Org-Id` header on a call switches an **agency** key (minted
485
+ with `is_agency: true`) to one of its authorized client orgs (see `g8.agency.clients()`).
486
+ For any other key the server **ignores the header without an error**: the call runs
487
+ against the key's own org. `/api-keys` and `/agency/*` reject the header with a `400`.
488
+ Once `g8.agency.me()` or `g8.agency.clients()` has shown that a key is not an agency
489
+ key, the SDK logs one console warning the first time that key sends the header. The
490
+ SDK never makes an extra request just to check.
491
+
477
492
  ## License
478
493
 
479
494
  MIT