@pidgeon-ai/sdk 1.66.1 → 1.67.1

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/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ the two would publish a release for every unrelated product deploy.
7
7
  Semver applies to **this package's own surface** — the exported names, the
8
8
  call shapes, the result shape — not to the API behind it.
9
9
 
10
+ ## 1.67.1 — an issuer the site names is never contacted
11
+
12
+ - No change to this package's surface. The Python package's
13
+ `sign_in_with_api_key` refuses a site that names another issuer before
14
+ fetching anything from it, as `@pidgeon-ai/id` 0.1.1 does.
15
+
16
+ ## 1.67.0 — one set of capabilities, two languages
17
+
18
+ - `streamEvents` reconnects from its cursor when a connection is cut
19
+ mid-response; it threw `TypeError: terminated` before, despite its promise
20
+ that only `signal` ends the loop.
21
+ - The Python package (`pidgeon`, same version) gains `pidgeon.identity`,
22
+ `pidgeon.sign_in` and `pidgeon.stream`, the twins of `@pidgeon-ai/id`,
23
+ `@pidgeon-ai/sign-in` and `streamEvents`. A test now fails the build when
24
+ either language has a capability the other lacks.
25
+
10
26
  ## 1.66.1 — a retried approval is the same approval
11
27
 
12
28
  - `signInsApprove` takes an `Idempotency-Key`: a retry with the same key
package/dist/index.cjs CHANGED
@@ -2013,17 +2013,23 @@ async function* streamEvents(options) {
2013
2013
  continue;
2014
2014
  }
2015
2015
  backoffMs = 1e3;
2016
- for await (const frame of frames(response.body, options.signal)) {
2017
- if (frame.id) lastEventId = frame.id;
2018
- if (!frame.data) continue;
2019
- if (frame.event === "error") continue;
2020
- let parsed;
2021
- try {
2022
- parsed = JSON.parse(frame.data);
2023
- } catch {
2024
- continue;
2016
+ try {
2017
+ for await (const frame of frames(response.body, options.signal)) {
2018
+ if (frame.id) lastEventId = frame.id;
2019
+ if (!frame.data) continue;
2020
+ if (frame.event === "error") continue;
2021
+ let parsed;
2022
+ try {
2023
+ parsed = JSON.parse(frame.data);
2024
+ } catch {
2025
+ continue;
2026
+ }
2027
+ yield parsed;
2025
2028
  }
2026
- yield parsed;
2029
+ } catch {
2030
+ if (options.signal?.aborted) return;
2031
+ await sleep(backoffMs, options.signal);
2032
+ backoffMs = Math.min(backoffMs * 2, 3e4);
2027
2033
  }
2028
2034
  }
2029
2035
  }