@zapier/kitcore 0.13.0 → 0.15.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/CHANGELOG.md CHANGED
@@ -1,5 +1,60 @@
1
1
  # @zapier/kitcore
2
2
 
3
+ ## 0.15.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f0fe306: Add the API stability ladder: `PluginMeta.stability` (`"stable" | "beta" | "experimental"`) replaces the `experimental` boolean as the authored stability signal. The registry projection normalizes every entry to a concrete `FunctionRegistryEntry.stability`; the `experimental` boolean is deprecated but preserved as an input (`true` normalizes to `"experimental"`) and as a derived read (`stability === "experimental"` — literal by name; the not-stable warning duty lives in `stability` and the runtime notice). New exports: `STABILITY_LEVELS`, `STABILITY_TITLES`, `normalizeStability`, `applyStabilityLabel`, and the `StabilityLevel` type. The method boundary now reports every surface call of a beta / experimental method to `CoreOptions.logStabilityNotice` (default: once-per-process deduped `console.warn`), mirroring the deprecation signal — internal delegation never signals.
8
+
9
+ ## 0.14.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 5b4b976: Added an HTTP transport and a connection channel, so an SDK built on kitcore can
14
+ make authenticated requests without wiring a client of its own.
15
+
16
+ **Transport.** `sendHttpRequest` turns an `HttpRequest` into a native `Response`
17
+ through stages you wrap individually with `defineHook`: `initializeHttpRequest`,
18
+ then `attemptHttpRequest` around `prepareHttpRequest`, `authorizeHttpRequest`,
19
+ `dispatchHttpRequest`, and `receiveHttpResponse`. Skipping `next` replaces a
20
+ stage, which is how a proxy or a mock takes over `dispatchHttpRequest`. `fetch`
21
+ is the familiar `fetch(url, init)` over that pipeline and works with nothing else
22
+ composed; `url` takes a `string` or a `URL`.
23
+
24
+ Every stage receives `attempt.operation`, one per caller request and shared by
25
+ every retry of it. It carries the `operationId` and the caller's original
26
+ request, so a stage can still name the connection or the pre-routing url after
27
+ auth and routing rewrote their own copies.
28
+
29
+ **Retry, opt-in.** `retryHttpRequestPlugin` wraps `attemptHttpRequest`; nothing
30
+ retries by default. It honors `Retry-After` / `X-RateLimit-Reset`, falls back to
31
+ exponential backoff with jitter, and respects the caller's abort signal.
32
+ Defaults: 3 attempts, statuses 429/500/502/503/504, configurable through
33
+ `retryHttpRequestOptionsPluginRef`. It never resends a body that can only be
34
+ read once, which covers a `ReadableStream` and anything async-iterable such as
35
+ `fs.createReadStream(...)`, and retries 5xx only on idempotent methods. Between
36
+ attempts it cancels the body of the response it is dropping, so an unread one
37
+ does not hold its connection open.
38
+
39
+ `maxDelayMilliseconds` caps how long it will wait, and the two sources of a
40
+ delay are treated differently. Its own backoff is clamped to the ceiling. A
41
+ server directing a longer wait through `Retry-After` is a refusal, so it returns
42
+ that response instead of coming back sooner.
43
+
44
+ **Debugging.** Each stage is a method, so one `defineHook` observer sees all
45
+ seven with a name, arguments, duration, and any error, and nothing writes to a
46
+ console on your behalf. Pass a stage's request through `redactHttpRequest` before
47
+ printing it: it masks credential headers and `connection`, which is opaque to the
48
+ transport and may hold a credential. The url and the body are left as they are.
49
+
50
+ **Connections.** A caller passes an opaque reference, never a credential, and its
51
+ `<scheme>:<value>` prefix routes it to whichever provider claims that scheme.
52
+ `normalizeConnection` parses a reference, `defaultConnectionScheme` is where a
53
+ head decides what a bare one means (kitcore assigns nothing),
54
+ and `resolveConnectionPlugin` is the seam for discovering or defaulting one. An
55
+ auth wrap claims a reference by removing it from the request, and an unclaimed
56
+ one fails before the request is sent.
57
+
3
58
  ## 0.13.0
4
59
 
5
60
  ### Minor Changes