@devtune/ai-traffic 0.12.1 → 0.13.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/dist/client.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * ABOUTME: Implements the DevTune AI Traffic edge-push client.
3
- * Handles registry refresh, AI bot matching, batched ingest beacons, and route wrappers.
3
+ * Handles registry refresh, AI bot and AI referral matching, batched ingest beacons, and route wrappers.
4
4
  */
5
- import { type AiBotRegistryEntry } from "./registry.js";
5
+ import { type AiBotRegistryEntry, type LlmPlatform } from "./registry.js";
6
6
  import { type DevTuneAiTrafficTrustedProxy } from "./client-ip.js";
7
7
  import { type DevTuneAiTrafficWebBotAuth } from "./web-bot-auth.js";
8
8
  export interface HeadersLike {
@@ -15,6 +15,12 @@ export interface HeadersLike {
15
15
  * first value.
16
16
  */
17
17
  getCombined?(name: string): string | null;
18
+ /**
19
+ * Every header name on the request. Only read to look for a `fastly-*`
20
+ * header, which marks a request Fastly forwarded. Fetch `Headers` have it;
21
+ * without it only `fastly-client-ip`, `fastly-ff` and `fastly-ssl` are checked.
22
+ */
23
+ keys?(): Iterable<string>;
18
24
  }
19
25
  export interface RequestLike {
20
26
  headers: HeadersLike;
@@ -24,7 +30,10 @@ export interface RequestLike {
24
30
  * edge runtimes have no socket and leave it undefined.
25
31
  */
26
32
  ip?: string | null;
27
- /** Request method, needed to forward a Web Bot Auth signature. */
33
+ /**
34
+ * Request method, needed to forward a Web Bot Auth signature and to record
35
+ * a referral visit: only a `GET` can be one.
36
+ */
28
37
  method?: string;
29
38
  /**
30
39
  * The absolute request URL exactly as the client sent it, for a runtime
@@ -36,6 +45,10 @@ export interface RequestLike {
36
45
  */
37
46
  targetUri?: string | null;
38
47
  }
48
+ /** What the prefilter reads. Without a `url` only the bot check runs. */
49
+ type ReferralCandidateRequest = Pick<RequestLike, "headers" | "method"> & {
50
+ url?: string;
51
+ };
39
52
  export interface WaitUntilLike {
40
53
  waitUntil(promise: Promise<unknown>): void;
41
54
  }
@@ -58,11 +71,43 @@ export interface DevTuneAiTrafficEvent {
58
71
  * signature headers. DevTune verifies and discards it; it is never stored.
59
72
  */
60
73
  webBotAuth?: DevTuneAiTrafficWebBotAuth;
74
+ /** A referral visit's `Referer`, cut to its origin. Referral events only. */
75
+ referrer?: string;
76
+ /** A referral visit's campaign parameters from the query the `url` leaves out. Referral events only. */
77
+ campaign?: DevTuneAiTrafficCampaign;
78
+ /**
79
+ * True when the request came through a CDN (`cf-ray`, `x-amz-cf-id` or a
80
+ * `fastly-*` header), so a cache may have answered page loads the sensor
81
+ * never saw. Omitted otherwise.
82
+ */
83
+ cdn?: boolean;
61
84
  }
62
- export interface DevTuneAiTrafficMatch {
85
+ /**
86
+ * The landing URL's campaign parameters DevTune reads to classify a referral
87
+ * visit and to recognise a paid click. Each is present only when the URL had
88
+ * it; `oppref` is the presence of OpenAI's ad click ID, never its value.
89
+ */
90
+ export interface DevTuneAiTrafficCampaign {
91
+ utm_source?: string;
92
+ utm_medium?: string;
93
+ oppref?: boolean;
94
+ }
95
+ export interface DevTuneAiTrafficBotMatch {
96
+ kind: "bot";
63
97
  entry: AiBotRegistryEntry;
64
98
  event: DevTuneAiTrafficEvent;
65
99
  }
100
+ export interface DevTuneAiTrafficReferralMatch {
101
+ kind: "referral";
102
+ /**
103
+ * The AI platform the visit came from, by its `Referer` host or else its
104
+ * `utm_source`. DevTune classifies the event again on receipt and drops a
105
+ * paid click.
106
+ */
107
+ platform: LlmPlatform;
108
+ event: DevTuneAiTrafficEvent;
109
+ }
110
+ export type DevTuneAiTrafficMatch = DevTuneAiTrafficBotMatch | DevTuneAiTrafficReferralMatch;
66
111
  export interface DevTuneAiTrafficLogger {
67
112
  warn(message: string, context?: Record<string, unknown>): void;
68
113
  debug?(message: string, context?: Record<string, unknown>): void;
@@ -96,6 +141,16 @@ export interface DevTuneAiTrafficOptions {
96
141
  maxRetryAttempts?: number;
97
142
  maxRetryDelayMs?: number;
98
143
  maxQueuedEvents?: number;
144
+ /**
145
+ * Bound on queued AI referral visits, kept apart from the bot queue so
146
+ * referrals never push out bot events. Defaults to 200.
147
+ */
148
+ maxQueuedReferralEvents?: number;
149
+ /**
150
+ * Record AI referral visits. Defaults to true; `false` records AI bot
151
+ * requests only, as the sensor did before 0.13.0.
152
+ */
153
+ captureReferrals?: boolean;
99
154
  /**
100
155
  * Which address source to trust for bot verification. Defaults to the
101
156
  * platform's own forwarded header on Vercel and to the socket peer
@@ -124,6 +179,8 @@ export declare class DevTuneAiTrafficClient {
124
179
  private readonly maxRetryAttempts;
125
180
  private readonly maxRetryDelayMs;
126
181
  private readonly maxQueuedEvents;
182
+ private readonly maxQueuedReferralEvents;
183
+ private readonly captureReferrals;
127
184
  private readonly trustedProxy;
128
185
  private readonly projectId;
129
186
  private readonly keyCredential;
@@ -135,13 +192,23 @@ export declare class DevTuneAiTrafficClient {
135
192
  private flushPromise;
136
193
  private delayedFlushPromise;
137
194
  private readonly queue;
195
+ private readonly referralQueue;
138
196
  constructor(options: DevTuneAiTrafficOptions);
139
- mightTrackRequest(request: Pick<RequestLike, "headers">): boolean;
140
197
  /**
141
- * Records a matched AI bot request. Pass `receivedAt` when the request is
142
- * recorded after its response, taken from `signedArrivalTime()` as the
143
- * request arrived: a signed event is checked against the time it was signed
144
- * for. Other events keep the time they are recorded.
198
+ * A cheap check that `trackRequest()` could record this request: true for
199
+ * an AI bot candidate, by user agent alone, or for an AI referral candidate
200
+ * (see `matchReferralPlatform`). Adapters that record after the response
201
+ * call it first, so other requests cost no response work. A request without
202
+ * a `url` is checked as a bot candidate only.
203
+ */
204
+ mightTrackRequest(request: ReferralCandidateRequest): boolean;
205
+ /**
206
+ * Records a matched AI bot request or AI referral visit. A user agent in
207
+ * the bot registry makes it a bot request whatever its `Referer`. Pass
208
+ * `receivedAt` when the request is recorded after its response, taken from
209
+ * `signedArrivalTime()` as the request arrived: a signed bot event is
210
+ * checked against the time it was signed for. Other events keep the time
211
+ * they are recorded.
145
212
  */
146
213
  trackRequest(request: RequestLike, waitUntilContext?: WaitUntilLike, responseStatus?: number | null, receivedAt?: Date): DevTuneAiTrafficMatch | null;
147
214
  /**
@@ -153,23 +220,74 @@ export declare class DevTuneAiTrafficClient {
153
220
  signedArrivalTime(request: Pick<RequestLike, "headers">): Date | undefined;
154
221
  refreshRegistry(): Promise<void>;
155
222
  flush(): Promise<void>;
223
+ /**
224
+ * Starts a drain, or joins the one in flight. A drain that spends a retry
225
+ * budget leaves events queued that would otherwise wait for the next tracked
226
+ * request, so it schedules one follow-up drain, no sooner than a capped
227
+ * retry's wait. The follow-up schedules none: if it is throttled too, the
228
+ * rest waits for the next tracked request, as before 0.13.0. The timer is
229
+ * unref'd and not tied to `waitUntil`, so only a long-lived process runs it.
230
+ */
231
+ private startDrain;
156
232
  /** Starts at most one background refresh per cache interval, including browser traffic. */
157
233
  refreshRegistryIfStale(waitUntilContext?: WaitUntilLike): void;
158
- private createEvent;
234
+ private mightBeAiBot;
235
+ /**
236
+ * A bot registry match that is not a page's own request, or failing that the
237
+ * AI platform a referral visit came from. A bot user agent wins: it is never
238
+ * recorded as a referral.
239
+ */
240
+ private matchSource;
241
+ /**
242
+ * The AI platform a referral candidate came from, or null. A candidate is a
243
+ * `GET` from another site (`Sec-Fetch-Site` not `same-origin` or
244
+ * `same-site`) whose `Referer` host, or failing that `utm_source`, is in the
245
+ * registry, and that loads a top-level page: `Sec-Fetch-Dest` is `document`
246
+ * or absent, it is not a prefetch, and it is not a framework data request.
247
+ * Frames stay bot-only. Every request reaches this, so the method and
248
+ * fetch-site checks and substring tests run before any URL is parsed.
249
+ * Browsers send the `Referer` host lower-cased, as the registry lists it.
250
+ * Always null when `captureReferrals` is off.
251
+ */
252
+ private matchReferralPlatform;
253
+ /** The `Referer` host's platform, or else the `utm_source`'s, as DevTune's classifier orders them. */
254
+ private matchReferrerOrUtmSource;
255
+ private createBotEvent;
256
+ /**
257
+ * A referral visit carries its `Referer` origin and campaign parameters,
258
+ * and never an address or signature material: there is no claimed crawler
259
+ * identity to verify. A visit answered with a redirect is not recorded:
260
+ * the browser takes the same `Referer` to the redirect's target, which is
261
+ * where DevTune counts it, so ingest drops the redirect's event.
262
+ */
263
+ private createReferralEvent;
264
+ /** The fields every event carries. The `url` is the origin and path, without the query. */
265
+ private createBaseFields;
159
266
  private resolveStatus;
160
267
  private matchesNotFoundPath;
161
268
  /**
162
- * Adds an event to the queue and decides when to send.
269
+ * Adds an event to its queue and decides when to send.
163
270
  *
164
271
  * Backing off on a 429 means the queue can now drain slower than traffic
165
272
  * arrives, which it never could when every batch cost exactly one request.
166
273
  * The bound is what keeps that from growing without limit in a customer's
167
274
  * process: past `maxQueuedEvents` the oldest events are shed, because the
168
- * newest ones are the ones still worth measuring.
275
+ * newest ones are the ones still worth measuring. Referral visits have
276
+ * their own queue and bound, `maxQueuedReferralEvents`, so a burst of them
277
+ * never sheds a bot event.
169
278
  */
170
279
  private enqueue;
280
+ /** Sheds the oldest events past a queue's bound, with a sampled warning. */
281
+ private shedOverflow;
171
282
  /**
172
- * Drains the queue one wire batch at a time.
283
+ * Drains the queues one wire batch at a time, bots before referrals. A
284
+ * batch never mixes the two, and referrals never cost bots: each has its own
285
+ * retry budget per flush, a referral batch that spends its budget is dropped
286
+ * while bots keep draining, and a referral batch that gets a 429 while bots
287
+ * are waiting goes back to the front of its queue after the backoff, with
288
+ * its attempt count, so the bots are sent first. When the bots' budget is
289
+ * spent the drain ends there: the rate limit covers both kinds, so referrals
290
+ * would only meet the same 429, and the next drain starts with bots.
173
291
  *
174
292
  * A 429 is the one failure the ingest endpoint tells us is temporary, so the
175
293
  * batch is held out of the queue and redelivered after the server's
@@ -179,14 +297,14 @@ export declare class DevTuneAiTrafficClient {
179
297
  * are not folded into the batch being retried, so they cannot be dropped on a
180
298
  * bound they never had a chance to spend.
181
299
  *
182
- * The retry budget belongs to the whole drain, not to each batch. A per-batch
300
+ * Each budget belongs to the whole drain, not to each batch. A per-batch
183
301
  * bound says nothing about how long a drain can run, because a throttled
184
302
  * endpoint rejects every batch in turn and traffic keeps arriving behind it.
185
- * One budget per pass caps the added latency of a flush at
186
- * `maxRetryAttempts * maxRetryDelayMs` no matter how deep the queue is. When
187
- * it is spent the current batch is dropped with the usual sampled warning and
188
- * the drain stops, leaving the rest queued for the next flush, which gets a
189
- * fresh budget.
303
+ * One budget per kind per pass caps the added latency of a flush at
304
+ * `2 * maxRetryAttempts * maxRetryDelayMs` no matter how deep the queues
305
+ * are. When a budget is spent the current batch is dropped with the usual
306
+ * sampled warning, leaving the rest queued for the next flush, which gets
307
+ * fresh budgets. Resolves true when a budget was spent.
190
308
  *
191
309
  * Every other failure keeps its previous behavior: one attempt, dropped, and
192
310
  * a sampled warning.
@@ -233,6 +351,7 @@ export declare class DevTuneAiTrafficClient {
233
351
  * transient failure, so it is reported once per client instead of sampled.
234
352
  */
235
353
  private warnMissingVercelOidcTokenOnce;
354
+ private queuedEventCount;
236
355
  private resolveRetryDelayMs;
237
356
  private sampleWarn;
238
357
  }
@@ -240,4 +359,5 @@ export declare function createDevTuneAiTraffic(options: DevTuneAiTrafficOptions)
240
359
  export declare function createDevTuneAiTrafficMiddleware(options: DevTuneAiTrafficOptions): (request: RequestLike, event?: WaitUntilLike) => void;
241
360
  export declare function mightBeAiBotUserAgent(userAgent: string | null | undefined): boolean;
242
361
  export declare function withDevTuneAiTrafficRoute<Context, ResponseType extends Response>(handler: DevTuneAiTrafficRouteHandler<Context, ResponseType>, options: DevTuneAiTrafficOptions): (request: RequestLike, context: Context) => Promise<ResponseType>;
362
+ export {};
243
363
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAKL,KAAK,kBAAkB,EAExB,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,KAAK,4BAA4B,EAClC,MAAM,gBAAgB,CAAC;AAExB,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