@devtune/ai-traffic 0.1.2 → 0.2.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/README.md +156 -62
- package/dist/cjs/client.js +505 -0
- package/dist/cjs/client.js.map +1 -0
- package/dist/cjs/detection.js +47 -0
- package/dist/cjs/detection.js.map +1 -0
- package/dist/cjs/express.js +61 -0
- package/dist/cjs/express.js.map +1 -0
- package/dist/cjs/index.js +25 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/node.js +60 -0
- package/dist/cjs/node.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/registry.js +264 -0
- package/dist/cjs/registry.js.map +1 -0
- package/dist/client.d.ts +40 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +150 -19
- package/dist/client.js.map +1 -1
- package/dist/detection.d.ts +51 -0
- package/dist/detection.d.ts.map +1 -0
- package/dist/detection.js +42 -0
- package/dist/detection.js.map +1 -0
- package/dist/express.d.ts +24 -0
- package/dist/express.d.ts.map +1 -0
- package/dist/express.js +58 -0
- package/dist/express.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +23 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +57 -0
- package/dist/node.js.map +1 -0
- package/package.json +15 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ABOUTME: Public exports for the DevTune AI Traffic edge-push package.
|
|
4
|
+
* Exposes middleware helpers, route wrappers, and registry matching utilities.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.FALLBACK_AI_REFERRER_REGISTRY_ENTRIES = exports.detectAiReferrer = exports.detectAiCrawler = exports.parseAiBotRegistryPayload = exports.matchAiBotRegistryEntry = exports.compileAiBotRegistryEntries = exports.FALLBACK_AI_BOT_REGISTRY_ENTRIES = exports.withDevTuneAiTrafficRoute = exports.mightBeAiBotUserAgent = exports.createDevTuneAiTrafficMiddleware = exports.createDevTuneAiTraffic = exports.DevTuneAiTrafficClient = exports.DEFAULT_REGISTRY_URL = exports.DEFAULT_INGEST_ENDPOINT = void 0;
|
|
8
|
+
var client_js_1 = require("./client.js");
|
|
9
|
+
Object.defineProperty(exports, "DEFAULT_INGEST_ENDPOINT", { enumerable: true, get: function () { return client_js_1.DEFAULT_INGEST_ENDPOINT; } });
|
|
10
|
+
Object.defineProperty(exports, "DEFAULT_REGISTRY_URL", { enumerable: true, get: function () { return client_js_1.DEFAULT_REGISTRY_URL; } });
|
|
11
|
+
Object.defineProperty(exports, "DevTuneAiTrafficClient", { enumerable: true, get: function () { return client_js_1.DevTuneAiTrafficClient; } });
|
|
12
|
+
Object.defineProperty(exports, "createDevTuneAiTraffic", { enumerable: true, get: function () { return client_js_1.createDevTuneAiTraffic; } });
|
|
13
|
+
Object.defineProperty(exports, "createDevTuneAiTrafficMiddleware", { enumerable: true, get: function () { return client_js_1.createDevTuneAiTrafficMiddleware; } });
|
|
14
|
+
Object.defineProperty(exports, "mightBeAiBotUserAgent", { enumerable: true, get: function () { return client_js_1.mightBeAiBotUserAgent; } });
|
|
15
|
+
Object.defineProperty(exports, "withDevTuneAiTrafficRoute", { enumerable: true, get: function () { return client_js_1.withDevTuneAiTrafficRoute; } });
|
|
16
|
+
var registry_js_1 = require("./registry.js");
|
|
17
|
+
Object.defineProperty(exports, "FALLBACK_AI_BOT_REGISTRY_ENTRIES", { enumerable: true, get: function () { return registry_js_1.FALLBACK_AI_BOT_REGISTRY_ENTRIES; } });
|
|
18
|
+
Object.defineProperty(exports, "compileAiBotRegistryEntries", { enumerable: true, get: function () { return registry_js_1.compileAiBotRegistryEntries; } });
|
|
19
|
+
Object.defineProperty(exports, "matchAiBotRegistryEntry", { enumerable: true, get: function () { return registry_js_1.matchAiBotRegistryEntry; } });
|
|
20
|
+
Object.defineProperty(exports, "parseAiBotRegistryPayload", { enumerable: true, get: function () { return registry_js_1.parseAiBotRegistryPayload; } });
|
|
21
|
+
var detection_js_1 = require("./detection.js");
|
|
22
|
+
Object.defineProperty(exports, "detectAiCrawler", { enumerable: true, get: function () { return detection_js_1.detectAiCrawler; } });
|
|
23
|
+
Object.defineProperty(exports, "detectAiReferrer", { enumerable: true, get: function () { return detection_js_1.detectAiReferrer; } });
|
|
24
|
+
Object.defineProperty(exports, "FALLBACK_AI_REFERRER_REGISTRY_ENTRIES", { enumerable: true, get: function () { return detection_js_1.FALLBACK_AI_REFERRER_REGISTRY_ENTRIES; } });
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAgBqB;AAfnB,oHAAA,uBAAuB,OAAA;AACvB,iHAAA,oBAAoB,OAAA;AACpB,mHAAA,sBAAsB,OAAA;AACtB,mHAAA,sBAAsB,OAAA;AACtB,6HAAA,gCAAgC,OAAA;AAChC,kHAAA,qBAAqB,OAAA;AACrB,sHAAA,yBAAyB,OAAA;AAW3B,6CASuB;AARrB,+HAAA,gCAAgC,OAAA;AAChC,0HAAA,2BAA2B,OAAA;AAC3B,sHAAA,uBAAuB,OAAA;AACvB,wHAAA,yBAAyB,OAAA;AAO3B,+CAUwB;AATtB,+GAAA,eAAe,OAAA;AACf,gHAAA,gBAAgB,OAAA;AAChB,qIAAA,qCAAqC,OAAA"}
|
package/dist/cjs/node.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ABOUTME: Plain Node HTTP server hook for the DevTune AI Traffic client.
|
|
4
|
+
* Captures completed response statuses while sharing core matching and ingest logic.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.createDevTuneAiTrafficNodeHandler = createDevTuneAiTrafficNodeHandler;
|
|
8
|
+
const ai_traffic_1 = require("@devtune/ai-traffic");
|
|
9
|
+
function createDevTuneAiTrafficNodeHandler(options) {
|
|
10
|
+
const { origin, ...clientOptions } = options;
|
|
11
|
+
const client = (0, ai_traffic_1.createDevTuneAiTraffic)(clientOptions);
|
|
12
|
+
return function devTuneAiTrafficNodeHandler(request, response) {
|
|
13
|
+
const requestLike = {
|
|
14
|
+
headers: createHeadersLike(request),
|
|
15
|
+
url: createRequestUrl(request, origin),
|
|
16
|
+
};
|
|
17
|
+
if (!client.mightTrackRequest(requestLike)) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
response.once("finish", () => {
|
|
21
|
+
client.trackRequest(requestLike, undefined, response.statusCode);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function createHeadersLike(request) {
|
|
26
|
+
return {
|
|
27
|
+
get(name) {
|
|
28
|
+
return getHeader(request, name);
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function createRequestUrl(request, configuredOrigin) {
|
|
33
|
+
const requestPath = request.url ?? "/";
|
|
34
|
+
try {
|
|
35
|
+
return new URL(requestPath, configuredOrigin ?? getRequestOrigin(request)).toString();
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return requestPath;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function getRequestOrigin(request) {
|
|
42
|
+
const forwardedProtocol = getForwardedHeader(request, "x-forwarded-proto");
|
|
43
|
+
const protocol = forwardedProtocol ?? (request.socket?.encrypted ? "https" : "http");
|
|
44
|
+
const host = getForwardedHeader(request, "x-forwarded-host") ?? getHeader(request, "host");
|
|
45
|
+
return `${protocol}://${host || "localhost"}`;
|
|
46
|
+
}
|
|
47
|
+
function getHeader(request, name) {
|
|
48
|
+
return headerValue(request.headers[name.toLowerCase()]);
|
|
49
|
+
}
|
|
50
|
+
function getForwardedHeader(request, name) {
|
|
51
|
+
const value = getHeader(request, name);
|
|
52
|
+
return value?.split(",", 1)[0]?.trim() || null;
|
|
53
|
+
}
|
|
54
|
+
function headerValue(value) {
|
|
55
|
+
if (typeof value === "string") {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return value?.[0] ?? null;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../node/src/node.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AA2BH,8EAqBC;AA9CD,oDAI6B;AAqB7B,SAAgB,iCAAiC,CAAC,OAAoC;IACpF,MAAM,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,GAAG,OAAO,CAAC;IAC7C,MAAM,MAAM,GAAG,IAAA,mCAAsB,EAAC,aAAa,CAAC,CAAC;IAErD,OAAO,SAAS,2BAA2B,CACzC,OAAoC,EACpC,QAAsC;QAEtC,MAAM,WAAW,GAAG;YAClB,OAAO,EAAE,iBAAiB,CAAC,OAAO,CAAC;YACnC,GAAG,EAAE,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC;SACvC,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,CAAC;YAC3C,OAAO;QACT,CAAC;QAED,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;YAC3B,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,OAAoC;IAC7D,OAAO;QACL,GAAG,CAAC,IAAI;YACN,OAAO,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAClC,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC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O,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ABOUTME: Portable AI bot registry matching for DevTune edge-push sensors.
|
|
4
|
+
* Keeps the package able to classify known AI user agents without runtime dependencies.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.FALLBACK_AI_BOT_REGISTRY_ENTRIES = void 0;
|
|
8
|
+
exports.compileAiBotRegistryEntries = compileAiBotRegistryEntries;
|
|
9
|
+
exports.matchAiBotRegistryEntry = matchAiBotRegistryEntry;
|
|
10
|
+
exports.parseAiBotRegistryPayload = parseAiBotRegistryPayload;
|
|
11
|
+
const MAX_SAFE_UA_PATTERN_LENGTH = 128;
|
|
12
|
+
const UNSAFE_UA_PATTERN_TOKENS = /[()[\]{}*+?\\]/;
|
|
13
|
+
exports.FALLBACK_AI_BOT_REGISTRY_ENTRIES = [
|
|
14
|
+
{
|
|
15
|
+
uaPattern: "GPTBot",
|
|
16
|
+
llmPlatform: "openai",
|
|
17
|
+
botClass: "training_crawler",
|
|
18
|
+
label: "GPTBot",
|
|
19
|
+
status: "active",
|
|
20
|
+
asnHints: null,
|
|
21
|
+
notes: "OpenAI training crawler for generative AI foundation models.",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
uaPattern: "OAI-SearchBot",
|
|
25
|
+
llmPlatform: "openai",
|
|
26
|
+
botClass: "index_bot",
|
|
27
|
+
label: "OAI-SearchBot",
|
|
28
|
+
status: "active",
|
|
29
|
+
asnHints: null,
|
|
30
|
+
notes: "OpenAI search crawler used for ChatGPT search result inclusion.",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
uaPattern: "ChatGPT-User",
|
|
34
|
+
llmPlatform: "openai",
|
|
35
|
+
botClass: "answer_fetcher",
|
|
36
|
+
label: "ChatGPT-User",
|
|
37
|
+
status: "active",
|
|
38
|
+
asnHints: null,
|
|
39
|
+
notes: "OpenAI user-triggered fetcher for ChatGPT and Custom GPT user actions.",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
uaPattern: "ClaudeBot",
|
|
43
|
+
llmPlatform: "anthropic",
|
|
44
|
+
botClass: "training_crawler",
|
|
45
|
+
label: "ClaudeBot",
|
|
46
|
+
status: "active",
|
|
47
|
+
asnHints: null,
|
|
48
|
+
notes: "Anthropic training crawler.",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
uaPattern: "anthropic-ai",
|
|
52
|
+
llmPlatform: "anthropic",
|
|
53
|
+
botClass: "training_crawler",
|
|
54
|
+
label: "anthropic-ai",
|
|
55
|
+
status: "active",
|
|
56
|
+
asnHints: null,
|
|
57
|
+
notes: "Legacy Anthropic crawler token retained from the deployed classifier.",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
uaPattern: "Claude-SearchBot",
|
|
61
|
+
llmPlatform: "anthropic",
|
|
62
|
+
botClass: "index_bot",
|
|
63
|
+
label: "Claude-SearchBot",
|
|
64
|
+
status: "active",
|
|
65
|
+
asnHints: null,
|
|
66
|
+
notes: "Anthropic search indexing crawler for Claude search answers.",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
uaPattern: "Claude-User",
|
|
70
|
+
llmPlatform: "anthropic",
|
|
71
|
+
botClass: "answer_fetcher",
|
|
72
|
+
label: "Claude-User",
|
|
73
|
+
status: "active",
|
|
74
|
+
asnHints: null,
|
|
75
|
+
notes: "Anthropic user-triggered fetcher for Claude user queries.",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
uaPattern: "Claude-Web",
|
|
79
|
+
llmPlatform: "anthropic",
|
|
80
|
+
botClass: "answer_fetcher",
|
|
81
|
+
label: "Claude-Web",
|
|
82
|
+
status: "active",
|
|
83
|
+
asnHints: null,
|
|
84
|
+
notes: "Legacy Anthropic web-fetch token retained from the deployed classifier.",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
uaPattern: "PerplexityBot",
|
|
88
|
+
llmPlatform: "perplexity",
|
|
89
|
+
botClass: "index_bot",
|
|
90
|
+
label: "PerplexityBot",
|
|
91
|
+
status: "active",
|
|
92
|
+
asnHints: null,
|
|
93
|
+
notes: "Perplexity indexing crawler used to surface and link websites in Perplexity results.",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
uaPattern: "Perplexity-User",
|
|
97
|
+
llmPlatform: "perplexity",
|
|
98
|
+
botClass: "answer_fetcher",
|
|
99
|
+
label: "Perplexity-User",
|
|
100
|
+
status: "active",
|
|
101
|
+
asnHints: null,
|
|
102
|
+
notes: "Perplexity user-triggered fetcher for answer generation.",
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
uaPattern: "Google-CloudVertexBot",
|
|
106
|
+
llmPlatform: "google",
|
|
107
|
+
botClass: "index_bot",
|
|
108
|
+
label: "Google-CloudVertexBot",
|
|
109
|
+
status: "active",
|
|
110
|
+
asnHints: null,
|
|
111
|
+
notes: "Google crawler for content requested by site owners building Vertex AI Agents.",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
uaPattern: "Google-Extended",
|
|
115
|
+
llmPlatform: "google",
|
|
116
|
+
botClass: "training_crawler",
|
|
117
|
+
label: "Google-Extended",
|
|
118
|
+
status: "active",
|
|
119
|
+
asnHints: null,
|
|
120
|
+
notes: "Robots.txt product token for Gemini training and grounding controls.",
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
uaPattern: "Google-Agent",
|
|
124
|
+
llmPlatform: "google",
|
|
125
|
+
botClass: "acting_agent",
|
|
126
|
+
label: "Google-Agent",
|
|
127
|
+
status: "active",
|
|
128
|
+
asnHints: null,
|
|
129
|
+
notes: "Google user-triggered agent used by Google-hosted agents to navigate the web and perform actions.",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
uaPattern: "Google-NotebookLM",
|
|
133
|
+
llmPlatform: "google",
|
|
134
|
+
botClass: "answer_fetcher",
|
|
135
|
+
label: "Google-NotebookLM",
|
|
136
|
+
status: "active",
|
|
137
|
+
asnHints: null,
|
|
138
|
+
notes: "Google user-triggered fetcher for NotebookLM source URLs.",
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
uaPattern: "Bytespider",
|
|
142
|
+
llmPlatform: "bytedance",
|
|
143
|
+
botClass: "training_crawler",
|
|
144
|
+
label: "Bytespider",
|
|
145
|
+
status: "active",
|
|
146
|
+
asnHints: null,
|
|
147
|
+
notes: "ByteDance training crawler token retained from the deployed classifier.",
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
uaPattern: "Meta-ExternalAgent",
|
|
151
|
+
llmPlatform: "meta",
|
|
152
|
+
botClass: "training_crawler",
|
|
153
|
+
label: "Meta-ExternalAgent",
|
|
154
|
+
status: "active",
|
|
155
|
+
asnHints: null,
|
|
156
|
+
notes: "Meta external agent crawler token retained from the deployed classifier.",
|
|
157
|
+
},
|
|
158
|
+
];
|
|
159
|
+
function compileAiBotRegistryEntries(entries) {
|
|
160
|
+
const compiled = [];
|
|
161
|
+
for (const entry of entries) {
|
|
162
|
+
if ((entry.status ?? "active") !== "active") {
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
if (!isSafeUaPattern(entry.uaPattern)) {
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
try {
|
|
169
|
+
compiled.push({
|
|
170
|
+
entry: { ...entry, status: "active" },
|
|
171
|
+
matcher: new RegExp(entry.uaPattern, "i"),
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return compiled;
|
|
179
|
+
}
|
|
180
|
+
function matchAiBotRegistryEntry(userAgent, entries = compileAiBotRegistryEntries(exports.FALLBACK_AI_BOT_REGISTRY_ENTRIES)) {
|
|
181
|
+
if (!userAgent) {
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
184
|
+
for (const compiled of entries) {
|
|
185
|
+
if (compiled.matcher.test(userAgent)) {
|
|
186
|
+
return compiled.entry;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
function parseAiBotRegistryPayload(payload) {
|
|
192
|
+
if (!isRecord(payload) || typeof payload.version !== "string") {
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
if (!Array.isArray(payload.entries)) {
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
const entries = payload.entries.flatMap((entry) => {
|
|
199
|
+
const parsed = parseAiBotRegistryEntry(entry);
|
|
200
|
+
return parsed ? [parsed] : [];
|
|
201
|
+
});
|
|
202
|
+
return {
|
|
203
|
+
version: payload.version,
|
|
204
|
+
entries,
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
function parseAiBotRegistryEntry(value) {
|
|
208
|
+
if (!isRecord(value)) {
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
if (typeof value.uaPattern !== "string" ||
|
|
212
|
+
typeof value.llmPlatform !== "string" ||
|
|
213
|
+
typeof value.botClass !== "string" ||
|
|
214
|
+
typeof value.label !== "string") {
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
if (!isLlmPlatform(value.llmPlatform)) {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
if (!isMachineTrafficClass(value.botClass)) {
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
uaPattern: value.uaPattern,
|
|
225
|
+
llmPlatform: value.llmPlatform,
|
|
226
|
+
botClass: value.botClass,
|
|
227
|
+
label: value.label,
|
|
228
|
+
status: value.status === "retired" ? "retired" : "active",
|
|
229
|
+
asnHints: Array.isArray(value.asnHints)
|
|
230
|
+
? value.asnHints.filter((hint) => Number.isInteger(hint))
|
|
231
|
+
: null,
|
|
232
|
+
notes: typeof value.notes === "string" ? value.notes : null,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function isSafeUaPattern(pattern) {
|
|
236
|
+
return (pattern.length > 0 &&
|
|
237
|
+
pattern.length <= MAX_SAFE_UA_PATTERN_LENGTH &&
|
|
238
|
+
!UNSAFE_UA_PATTERN_TOKENS.test(pattern));
|
|
239
|
+
}
|
|
240
|
+
function isRecord(value) {
|
|
241
|
+
return typeof value === "object" && value !== null;
|
|
242
|
+
}
|
|
243
|
+
function isLlmPlatform(value) {
|
|
244
|
+
return [
|
|
245
|
+
"openai",
|
|
246
|
+
"anthropic",
|
|
247
|
+
"perplexity",
|
|
248
|
+
"google",
|
|
249
|
+
"microsoft",
|
|
250
|
+
"meta",
|
|
251
|
+
"bytedance",
|
|
252
|
+
"cohere",
|
|
253
|
+
"apple",
|
|
254
|
+
"mistral",
|
|
255
|
+
"xai",
|
|
256
|
+
"you",
|
|
257
|
+
"quora",
|
|
258
|
+
"other",
|
|
259
|
+
].includes(value);
|
|
260
|
+
}
|
|
261
|
+
function isMachineTrafficClass(value) {
|
|
262
|
+
return ["training_crawler", "index_bot", "answer_fetcher", "acting_agent"].includes(value);
|
|
263
|
+
}
|
|
264
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/registry.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA8LH,kEAyBC;AAED,0DAiBC;AAED,8DAmBC;AAxND,MAAM,0BAA0B,GAAG,GAAG,CAAC;AACvC,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAErC,QAAA,gCAAgC,GAAG;IAC9C;QACE,SAAS,EAAE,QAAQ;QACnB,WAAW,EAAE,QAAQ;QACrB,QAAQ,EAAE,kBAAkB;QAC5B,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,QAAQ;QAChB,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,8DAA8D;KACtE;IACD;QACE,SAAS,EAAE,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C,KAAa;IAC1C,OAAO,CAAC,kBAAkB,EAAE,WAAW,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC7F,CAAC"}
|
package/dist/client.d.ts
CHANGED
|
@@ -44,6 +44,9 @@ export interface DevTuneAiTrafficOptions {
|
|
|
44
44
|
now?: () => Date;
|
|
45
45
|
random?: () => number;
|
|
46
46
|
errorSampleRate?: number;
|
|
47
|
+
maxRetryAttempts?: number;
|
|
48
|
+
maxRetryDelayMs?: number;
|
|
49
|
+
maxQueuedEvents?: number;
|
|
47
50
|
}
|
|
48
51
|
export type DevTuneAiTrafficRouteHandler<Context, ResponseType extends Response> = (request: RequestLike, context: Context) => ResponseType | Promise<ResponseType>;
|
|
49
52
|
export declare const DEFAULT_INGEST_ENDPOINT = "https://devtune.ai/api/v1/llm-traffic/ingest";
|
|
@@ -62,12 +65,16 @@ export declare class DevTuneAiTrafficClient {
|
|
|
62
65
|
private readonly now;
|
|
63
66
|
private readonly random;
|
|
64
67
|
private readonly errorSampleRate;
|
|
68
|
+
private readonly maxRetryAttempts;
|
|
69
|
+
private readonly maxRetryDelayMs;
|
|
70
|
+
private readonly maxQueuedEvents;
|
|
65
71
|
private registry;
|
|
66
72
|
private refreshPromise;
|
|
67
73
|
private flushPromise;
|
|
68
74
|
private delayedFlushPromise;
|
|
69
75
|
private readonly queue;
|
|
70
76
|
constructor(options: DevTuneAiTrafficOptions);
|
|
77
|
+
mightTrackRequest(request: Pick<RequestLike, "headers">): boolean;
|
|
71
78
|
trackRequest(request: RequestLike, waitUntilContext?: WaitUntilLike, responseStatus?: number | null): DevTuneAiTrafficMatch | null;
|
|
72
79
|
refreshRegistry(): Promise<void>;
|
|
73
80
|
flush(): Promise<void>;
|
|
@@ -75,8 +82,41 @@ export declare class DevTuneAiTrafficClient {
|
|
|
75
82
|
private createEvent;
|
|
76
83
|
private resolveStatus;
|
|
77
84
|
private matchesNotFoundPath;
|
|
85
|
+
/**
|
|
86
|
+
* Adds an event to the queue and decides when to send.
|
|
87
|
+
*
|
|
88
|
+
* Backing off on a 429 means the queue can now drain slower than traffic
|
|
89
|
+
* arrives, which it never could when every batch cost exactly one request.
|
|
90
|
+
* The bound is what keeps that from growing without limit in a customer's
|
|
91
|
+
* process: past `maxQueuedEvents` the oldest events are shed, because the
|
|
92
|
+
* newest ones are the ones still worth measuring.
|
|
93
|
+
*/
|
|
78
94
|
private enqueue;
|
|
95
|
+
/**
|
|
96
|
+
* Drains the queue one wire batch at a time.
|
|
97
|
+
*
|
|
98
|
+
* A 429 is the one failure the ingest endpoint tells us is temporary, so the
|
|
99
|
+
* batch is held out of the queue and redelivered after the server's
|
|
100
|
+
* `Retry-After`, or a capped exponential backoff when the header is absent or
|
|
101
|
+
* unparseable. Holding it locally rather than putting it back at the head of
|
|
102
|
+
* the queue keeps the wire batch intact: events that arrive during a backoff
|
|
103
|
+
* are not folded into the batch being retried, so they cannot be dropped on a
|
|
104
|
+
* bound they never had a chance to spend.
|
|
105
|
+
*
|
|
106
|
+
* The retry budget belongs to the whole drain, not to each batch. A per-batch
|
|
107
|
+
* bound says nothing about how long a drain can run, because a throttled
|
|
108
|
+
* endpoint rejects every batch in turn and traffic keeps arriving behind it.
|
|
109
|
+
* One budget per pass caps the added latency of a flush at
|
|
110
|
+
* `maxRetryAttempts * maxRetryDelayMs` no matter how deep the queue is. When
|
|
111
|
+
* it is spent the current batch is dropped with the usual sampled warning and
|
|
112
|
+
* the drain stops, leaving the rest queued for the next flush, which gets a
|
|
113
|
+
* fresh budget.
|
|
114
|
+
*
|
|
115
|
+
* Every other failure keeps its previous behavior: one attempt, dropped, and
|
|
116
|
+
* a sampled warning.
|
|
117
|
+
*/
|
|
79
118
|
private flushQueuedEvents;
|
|
119
|
+
private resolveRetryDelayMs;
|
|
80
120
|
private sampleWarn;
|
|
81
121
|
}
|
|
82
122
|
export declare function createDevTuneAiTraffic(options: DevTuneAiTrafficOptions): DevTuneAiTrafficClient;
|
package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