@jeffusion/bungee-core 6.12.0 → 6.13.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/dist/config-storage-worker.js +142 -7
- package/dist/gateway/plugin.js +3 -1
- package/dist/main.js +3531 -3089
- package/dist/observability-worker.js +948 -175
- package/dist/plugins/anthropic-request-sanitizer/index.js.map +2 -2
- package/dist/plugins/anthropic-tool-name-transformer/index.js.map +2 -2
- package/dist/plugins/chatgpt-oauth/index.js.map +2 -2
- package/dist/plugins/codex-router/index.js.map +2 -2
- package/dist/plugins/deepseek-reasoning-fix/index.js.map +2 -2
- package/dist/plugins/key-access/index.js.map +2 -2
- package/dist/plugins/key-rate-limit/index.js.map +2 -2
- package/dist/plugins/llm-protocol-adapter/index.js +4 -2
- package/dist/plugins/llm-protocol-adapter/index.js.map +4 -4
- package/dist/plugins/llm-tps/index.js.map +2 -2
- package/dist/plugins/model-mapping/index.js.map +2 -2
- package/dist/plugins/models-dev/index.js.map +2 -2
- package/dist/plugins/request-logs/index.js +1392 -0
- package/dist/plugins/request-logs/index.js.map +33 -0
- package/dist/plugins/request-logs/ingress.js +28 -0
- package/dist/plugins/request-logs/ingress.js.map +10 -0
- package/dist/plugins/request-logs/manifest.json +68 -0
- package/dist/plugins/request-logs/ui/RequestLogsPage.svelte +1130 -0
- package/dist/plugins/request-logs/ui/RequestLogsSettings.svelte +111 -0
- package/dist/plugins/signature-repair/index.js.map +2 -2
- package/dist/plugins/token-budget/index.js.map +2 -2
- package/dist/plugins/token-metering/index.js.map +2 -2
- package/dist/plugins/token-stats/index.js.map +2 -2
- package/dist/plugins/user-auth/index.js.map +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// plugins/request-logs/ingress/index.ts
|
|
3
|
+
function createIngressRequestLogCollector() {
|
|
4
|
+
return (observation) => {
|
|
5
|
+
const { accessId, timestamp, method, path, status, durationMs, transportType, transportOutcome, transportCode } = observation;
|
|
6
|
+
return {
|
|
7
|
+
recordKind: "access",
|
|
8
|
+
accessId,
|
|
9
|
+
requestId: accessId,
|
|
10
|
+
timestamp,
|
|
11
|
+
method,
|
|
12
|
+
path,
|
|
13
|
+
status,
|
|
14
|
+
duration: durationMs,
|
|
15
|
+
transportType,
|
|
16
|
+
transportOutcome,
|
|
17
|
+
transportCode,
|
|
18
|
+
requestType: "final",
|
|
19
|
+
replacePendingTransport: transportOutcome !== "pending",
|
|
20
|
+
success: status < 400 && transportOutcome === "completed"
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
createIngressRequestLogCollector
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//# debugId=5E30098FC24E331464756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../plugins/request-logs/ingress/index.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type { IngressRequestLogCollector } from '@jeffusion/bungee-core/plugin';\n\nexport function createIngressRequestLogCollector(): IngressRequestLogCollector {\n return observation => {\n const { accessId, timestamp, method, path, status, durationMs, transportType, transportOutcome, transportCode } = observation;\n return {\n recordKind: 'access', accessId, requestId: accessId, timestamp, method, path, status,\n duration: durationMs, transportType, transportOutcome, transportCode,\n requestType: 'final', replacePendingTransport: transportOutcome !== 'pending',\n success: status < 400 && transportOutcome === 'completed',\n };\n };\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;AAEO,SAAS,gCAAgC,GAA+B;AAAA,EAC7E,OAAO,iBAAe;AAAA,IACpB,QAAQ,UAAU,WAAW,QAAQ,MAAM,QAAQ,YAAY,eAAe,kBAAkB,kBAAkB;AAAA,IAClH,OAAO;AAAA,MACL,YAAY;AAAA,MAAU;AAAA,MAAU,WAAW;AAAA,MAAU;AAAA,MAAW;AAAA,MAAQ;AAAA,MAAM;AAAA,MAC9E,UAAU;AAAA,MAAY;AAAA,MAAe;AAAA,MAAkB;AAAA,MACvD,aAAa;AAAA,MAAS,yBAAyB,qBAAqB;AAAA,MACpE,SAAS,SAAS,OAAO,qBAAqB;AAAA,IAChD;AAAA;AAAA;",
|
|
8
|
+
"debugId": "5E30098FC24E331464756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "request-logs",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"schemaVersion": 3,
|
|
5
|
+
"artifactKind": "runtime-plugin",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"capabilities": [
|
|
8
|
+
"hooks",
|
|
9
|
+
"dynamicRuntimeLoad",
|
|
10
|
+
"requestLogging",
|
|
11
|
+
"nativeWidgetsStatic"
|
|
12
|
+
],
|
|
13
|
+
"uiExtensionMode": "native-static",
|
|
14
|
+
"engines": {
|
|
15
|
+
"bungee": "^6.0.0"
|
|
16
|
+
},
|
|
17
|
+
"runtimeScope": "global",
|
|
18
|
+
"ingress": {
|
|
19
|
+
"entry": "ingress.js"
|
|
20
|
+
},
|
|
21
|
+
"builtin": true,
|
|
22
|
+
"ui": {
|
|
23
|
+
"components": [
|
|
24
|
+
{
|
|
25
|
+
"name": "RequestLogsPage",
|
|
26
|
+
"entry": "ui/RequestLogsPage.svelte"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "RequestLogsSettings",
|
|
30
|
+
"entry": "ui/RequestLogsSettings.svelte"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"contributes": {
|
|
35
|
+
"navigation": [
|
|
36
|
+
{
|
|
37
|
+
"label": "page.title",
|
|
38
|
+
"path": "/logs",
|
|
39
|
+
"component": "RequestLogsPage",
|
|
40
|
+
"layout": "standalone",
|
|
41
|
+
"icon": "lucide:file-text",
|
|
42
|
+
"target": "header"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"settings": "/settings",
|
|
46
|
+
"nativeSettingsComponent": "RequestLogsSettings"
|
|
47
|
+
},
|
|
48
|
+
"metadata": {
|
|
49
|
+
"name": "metadata.name",
|
|
50
|
+
"description": "plugin.description",
|
|
51
|
+
"icon": "receipt_long"
|
|
52
|
+
},
|
|
53
|
+
"configSchema": [],
|
|
54
|
+
"translations": {
|
|
55
|
+
"en": {
|
|
56
|
+
"metadata.name": "Request Logs",
|
|
57
|
+
"plugin.description": "Collect gateway access and upstream attempt records.",
|
|
58
|
+
"page.title": "Request Logs",
|
|
59
|
+
"settings.title": "Log Settings"
|
|
60
|
+
},
|
|
61
|
+
"zh-CN": {
|
|
62
|
+
"metadata.name": "请求日志",
|
|
63
|
+
"plugin.description": "采集网关访问和上游尝试记录。",
|
|
64
|
+
"page.title": "请求日志",
|
|
65
|
+
"settings.title": "日志设置"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|