autotel-devtools 23.1.0 → 24.1.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/cli.cjs +2 -2
- package/dist/cli.js +2 -2
- package/dist/{error-aggregator-B52JI8jL.d.ts → error-aggregator-BzhW482_.d.ts} +1 -1
- package/dist/{error-aggregator-DSwUvgFF.d.cts → error-aggregator-DkUrfGol.d.cts} +1 -1
- package/dist/{exporter-C88W22vY.d.ts → exporter-BRSxg3Du.d.ts} +25 -2
- package/dist/{exporter-OoWkSMCR.d.cts → exporter-BgjMeWvt.d.cts} +25 -2
- package/dist/fullpage.global.js +37 -30
- package/dist/genai/index.d.cts +1 -1
- package/dist/genai/index.d.ts +1 -1
- package/dist/{grpc-D0B3P9sI.cjs → grpc-AXr0CnZ_.cjs} +1 -1
- package/dist/{grpc-DY-C1jSU.js → grpc-C35twtEj.js} +1 -1
- package/dist/{http-1afd_01N.cjs → http-Dc57PtwQ.cjs} +256 -0
- package/dist/{http-gk1xapnA.js → http-JTSqQPVJ.js} +257 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/server/exporter.d.cts +1 -1
- package/dist/server/exporter.d.ts +1 -1
- package/dist/server/index.cjs +2 -2
- package/dist/server/index.d.cts +4 -4
- package/dist/server/index.d.ts +4 -4
- package/dist/server/index.js +2 -2
- package/dist/{types-DM8y4A9Z.d.ts → types-Do48caKG.d.ts} +1 -1
- package/dist/{types-B0tjwFqj.d.cts → types-ZU74Na4z.d.cts} +1 -1
- package/dist/types-hVSf0DoT.d.cts +138 -0
- package/dist/types-hVSf0DoT.d.ts +138 -0
- package/dist/widget.global.js +14 -14
- package/dist/wire/index.d.cts +1 -1
- package/dist/wire/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/types-DHDvZnnn.d.cts +0 -47
- package/dist/types-DHDvZnnn.d.ts +0 -47
package/dist/server/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import { a as SpanData, i as LogData, n as ErrorGroup, o as TraceData, r as ErrorOccurrence, t as DevtoolsData } from "../types-
|
|
3
|
-
import { a as DevtoolsStoreOptions, c as QueryLogsArgs, d as QueryTracesArgs, f as QueryTracesResult, i as DevtoolsStore, l as QueryLogsResult, m as TimeWindow, n as DevtoolsServer, o as MetricCatalogEntry, p as SPAN_SCHEMA, r as DevtoolsServerOptions, s as MetricSeries, t as DevtoolsSpanExporter, u as QueryMetricSeriesArgs } from "../exporter-
|
|
1
|
+
import "../types-hVSf0DoT.js";
|
|
2
|
+
import { a as SpanData, i as LogData, n as ErrorGroup, o as TraceData, r as ErrorOccurrence, t as DevtoolsData } from "../types-Do48caKG.js";
|
|
3
|
+
import { a as DevtoolsStoreOptions, c as QueryLogsArgs, d as QueryTracesArgs, f as QueryTracesResult, i as DevtoolsStore, l as QueryLogsResult, m as TimeWindow, n as DevtoolsServer, o as MetricCatalogEntry, p as SPAN_SCHEMA, r as DevtoolsServerOptions, s as MetricSeries, t as DevtoolsSpanExporter, u as QueryMetricSeriesArgs } from "../exporter-BRSxg3Du.js";
|
|
4
4
|
import { DevtoolsLogExporter } from "./log-exporter.js";
|
|
5
5
|
import { DevtoolsRemoteExporter, DevtoolsRemoteExporterOptions } from "./remote-exporter.js";
|
|
6
|
-
import { t as ErrorAggregator } from "../error-aggregator-
|
|
6
|
+
import { t as ErrorAggregator } from "../error-aggregator-BzhW482_.js";
|
|
7
7
|
import { Server } from "node:http";
|
|
8
8
|
import { AgentRawEvent, OtelMetricRecord } from "autotel-agents";
|
|
9
9
|
//#region src/server/http.d.ts
|
package/dist/server/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as ErrorAggregator, S as resolveTelemetryLimits, _ as isLoopbackHostname, a as probePortHolder, b as appendWithLimit, c as decodeOtlpTraceRequest, d as parseOtlpLogs, f as parseOtlpTraces, g as hostHeaderIsLoopback, h as allowSensitiveRequest, i as DEVTOOLS_IDENTITY, l as DevtoolsServer, m as SPAN_SCHEMA, n as createDevtoolsHttpServer, o as decodeOtlpLogsRequest, p as DevtoolsStore, s as decodeOtlpMetricsRequest, t as attachDevtoolsRoutes, u as isProtobufContentType, v as originIsLoopback, x as applyTelemetryLimits, y as appendManyWithLimit } from "../http-
|
|
1
|
+
import { C as ErrorAggregator, S as resolveTelemetryLimits, _ as isLoopbackHostname, a as probePortHolder, b as appendWithLimit, c as decodeOtlpTraceRequest, d as parseOtlpLogs, f as parseOtlpTraces, g as hostHeaderIsLoopback, h as allowSensitiveRequest, i as DEVTOOLS_IDENTITY, l as DevtoolsServer, m as SPAN_SCHEMA, n as createDevtoolsHttpServer, o as decodeOtlpLogsRequest, p as DevtoolsStore, s as decodeOtlpMetricsRequest, t as attachDevtoolsRoutes, u as isProtobufContentType, v as originIsLoopback, x as applyTelemetryLimits, y as appendManyWithLimit } from "../http-JTSqQPVJ.js";
|
|
2
2
|
import { DevtoolsSpanExporter } from "./exporter.js";
|
|
3
3
|
import { DevtoolsLogExporter } from "./log-exporter.js";
|
|
4
4
|
import { DevtoolsRemoteExporter } from "./remote-exporter.js";
|
|
5
|
-
import { t as startOtlpGrpcReceiver } from "../grpc-
|
|
5
|
+
import { t as startOtlpGrpcReceiver } from "../grpc-C35twtEj.js";
|
|
6
6
|
|
|
7
7
|
export { DEVTOOLS_IDENTITY, DevtoolsLogExporter, DevtoolsRemoteExporter, DevtoolsServer, DevtoolsSpanExporter, DevtoolsStore, ErrorAggregator, SPAN_SCHEMA, allowSensitiveRequest, appendManyWithLimit, appendWithLimit, applyTelemetryLimits, attachDevtoolsRoutes, createDevtoolsHttpServer, decodeOtlpLogsRequest, decodeOtlpMetricsRequest, decodeOtlpTraceRequest, hostHeaderIsLoopback, isLoopbackHostname, isProtobufContentType, originIsLoopback, parseOtlpLogs, parseOtlpTraces, probePortHolder, resolveTelemetryLimits, startOtlpGrpcReceiver };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { AgentSession } from "autotel-agents";
|
|
2
|
+
//#region src/widget/types.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* What a span attribute holds once it has crossed OTLP. The widget is
|
|
5
|
+
* browser-safe and does not depend on the OTel API package, so the value type
|
|
6
|
+
* is named here rather than imported.
|
|
7
|
+
*/
|
|
8
|
+
type AttributeValue = string | number | boolean | null | undefined | Uint8Array | Array<AttributeValue> | {
|
|
9
|
+
[key: string]: AttributeValue;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A span's attribute bag as the devtools receives it. Wider than OpenTelemetry's
|
|
13
|
+
* own `Attributes` on purpose: OTLP's kvlist and array values decode to nested
|
|
14
|
+
* maps and lists, and the devtools displays whatever actually arrived.
|
|
15
|
+
*/
|
|
16
|
+
type SpanAttributes = Record<string, AttributeValue>;
|
|
17
|
+
interface SpanData {
|
|
18
|
+
traceId: string;
|
|
19
|
+
spanId: string;
|
|
20
|
+
parentSpanId?: string;
|
|
21
|
+
name: string;
|
|
22
|
+
kind: 'INTERNAL' | 'SERVER' | 'CLIENT' | 'PRODUCER' | 'CONSUMER';
|
|
23
|
+
startTime: number;
|
|
24
|
+
endTime: number;
|
|
25
|
+
duration: number;
|
|
26
|
+
attributes: SpanAttributes;
|
|
27
|
+
status: {
|
|
28
|
+
code: 'OK' | 'ERROR' | 'UNSET';
|
|
29
|
+
message?: string;
|
|
30
|
+
};
|
|
31
|
+
events?: Array<{
|
|
32
|
+
name: string;
|
|
33
|
+
timestamp: number;
|
|
34
|
+
attributes?: SpanAttributes;
|
|
35
|
+
}>;
|
|
36
|
+
links?: Array<{
|
|
37
|
+
traceId: string;
|
|
38
|
+
spanId: string;
|
|
39
|
+
attributes?: SpanAttributes;
|
|
40
|
+
}>;
|
|
41
|
+
scope?: {
|
|
42
|
+
name?: string;
|
|
43
|
+
version?: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The WebMCP tool surface, as folded by `server/webmcp-aggregator`.
|
|
48
|
+
*
|
|
49
|
+
* A tool is not a span: it is a name whose lifecycle spans a registration, any
|
|
50
|
+
* number of executions and possibly a withdrawal, and it is only meaningful
|
|
51
|
+
* within the installation (page load) that registered it.
|
|
52
|
+
*/
|
|
53
|
+
interface WebMcpCall {
|
|
54
|
+
timestamp: number;
|
|
55
|
+
durationMs: number;
|
|
56
|
+
resultBytes: number;
|
|
57
|
+
resultType?: string;
|
|
58
|
+
envelope: boolean;
|
|
59
|
+
substituted: boolean;
|
|
60
|
+
error: boolean;
|
|
61
|
+
/** Installation-local order of this execute. Makes a chain readable. */
|
|
62
|
+
seq?: number;
|
|
63
|
+
/** True when the result matched a known library refusal string. */
|
|
64
|
+
refused: boolean;
|
|
65
|
+
refusal?: 'confirm' | 'unavailable';
|
|
66
|
+
/** Present only when the app opted into payload capture. Render masked. */
|
|
67
|
+
input?: string;
|
|
68
|
+
/** The exact string the agent received. Present only with payload capture. */
|
|
69
|
+
result?: string;
|
|
70
|
+
traceId: string;
|
|
71
|
+
spanId: string;
|
|
72
|
+
}
|
|
73
|
+
interface WebMcpTool {
|
|
74
|
+
name: string;
|
|
75
|
+
/** Installation (page load) this record belongs to. */
|
|
76
|
+
installationId: string;
|
|
77
|
+
service: string;
|
|
78
|
+
sessionId?: string;
|
|
79
|
+
/** False when the tool was only ever seen executing — see the module note. */
|
|
80
|
+
observedAtRegistration: boolean;
|
|
81
|
+
/** True while the tool is offered: registered, and not since withdrawn. */
|
|
82
|
+
offered: boolean;
|
|
83
|
+
firstSeen: number;
|
|
84
|
+
lastSeen: number;
|
|
85
|
+
descriptionLength?: number;
|
|
86
|
+
hasInputSchema?: boolean;
|
|
87
|
+
annotationsSent: string[];
|
|
88
|
+
/** Annotations the browser discarded. Available nowhere else. */
|
|
89
|
+
annotationsDropped: string[];
|
|
90
|
+
/** Display label the browser may promote over `name`. */
|
|
91
|
+
title?: string;
|
|
92
|
+
/** True when a non-empty title does not equal the tool name. */
|
|
93
|
+
labelMismatch: boolean;
|
|
94
|
+
/** True when this name came back with a different descriptor in this install. */
|
|
95
|
+
redefined: boolean;
|
|
96
|
+
/** Fingerprint of the last registered descriptor. */
|
|
97
|
+
descriptor?: string;
|
|
98
|
+
calls: number;
|
|
99
|
+
errors: number;
|
|
100
|
+
/** Executions whose result matched a known library refusal. */
|
|
101
|
+
refusedCalls: number;
|
|
102
|
+
/** Executions whose result was an unwrapped MCP `{ content: [...] }` envelope. */
|
|
103
|
+
envelopeCalls: number;
|
|
104
|
+
/** Of `resultBytes`, the part that is envelope wrapper rather than content. */
|
|
105
|
+
envelopeBytes: number;
|
|
106
|
+
/** Executions where the browser replaced an empty result with its own text. */
|
|
107
|
+
substitutedCalls: number;
|
|
108
|
+
/** UTF-8 bytes of result the agent has paid for across every call. */
|
|
109
|
+
resultBytes: number;
|
|
110
|
+
medianResultBytes: number;
|
|
111
|
+
/** The last few executions, newest first. Bounded — this is not a call log. */
|
|
112
|
+
recentCalls: WebMcpCall[];
|
|
113
|
+
traceId?: string;
|
|
114
|
+
spanId?: string;
|
|
115
|
+
}
|
|
116
|
+
interface WebMcpSummary {
|
|
117
|
+
installations: number;
|
|
118
|
+
/** Installations that registered nothing — the "instrumented too late" signature. */
|
|
119
|
+
emptyInstallations: number;
|
|
120
|
+
toolsOffered: number;
|
|
121
|
+
toolsWithdrawn: number;
|
|
122
|
+
calls: number;
|
|
123
|
+
errors: number;
|
|
124
|
+
resultBytes: number;
|
|
125
|
+
/** Bytes that are envelope wrapper rather than content. See `envelopeOverhead`. */
|
|
126
|
+
envelopeBytes: number;
|
|
127
|
+
toolsWithDroppedAnnotations: number;
|
|
128
|
+
toolsWithoutInputSchema: number;
|
|
129
|
+
toolsWithLabelMismatch: number;
|
|
130
|
+
toolsRedefined: number;
|
|
131
|
+
refusedCalls: number;
|
|
132
|
+
}
|
|
133
|
+
interface WebMcpInventory {
|
|
134
|
+
tools: WebMcpTool[];
|
|
135
|
+
summary: WebMcpSummary;
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { WebMcpInventory as i, SpanAttributes as n, SpanData as r, AttributeValue as t };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { AgentSession } from "autotel-agents";
|
|
2
|
+
//#region src/widget/types.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* What a span attribute holds once it has crossed OTLP. The widget is
|
|
5
|
+
* browser-safe and does not depend on the OTel API package, so the value type
|
|
6
|
+
* is named here rather than imported.
|
|
7
|
+
*/
|
|
8
|
+
type AttributeValue = string | number | boolean | null | undefined | Uint8Array | Array<AttributeValue> | {
|
|
9
|
+
[key: string]: AttributeValue;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A span's attribute bag as the devtools receives it. Wider than OpenTelemetry's
|
|
13
|
+
* own `Attributes` on purpose: OTLP's kvlist and array values decode to nested
|
|
14
|
+
* maps and lists, and the devtools displays whatever actually arrived.
|
|
15
|
+
*/
|
|
16
|
+
type SpanAttributes = Record<string, AttributeValue>;
|
|
17
|
+
interface SpanData {
|
|
18
|
+
traceId: string;
|
|
19
|
+
spanId: string;
|
|
20
|
+
parentSpanId?: string;
|
|
21
|
+
name: string;
|
|
22
|
+
kind: 'INTERNAL' | 'SERVER' | 'CLIENT' | 'PRODUCER' | 'CONSUMER';
|
|
23
|
+
startTime: number;
|
|
24
|
+
endTime: number;
|
|
25
|
+
duration: number;
|
|
26
|
+
attributes: SpanAttributes;
|
|
27
|
+
status: {
|
|
28
|
+
code: 'OK' | 'ERROR' | 'UNSET';
|
|
29
|
+
message?: string;
|
|
30
|
+
};
|
|
31
|
+
events?: Array<{
|
|
32
|
+
name: string;
|
|
33
|
+
timestamp: number;
|
|
34
|
+
attributes?: SpanAttributes;
|
|
35
|
+
}>;
|
|
36
|
+
links?: Array<{
|
|
37
|
+
traceId: string;
|
|
38
|
+
spanId: string;
|
|
39
|
+
attributes?: SpanAttributes;
|
|
40
|
+
}>;
|
|
41
|
+
scope?: {
|
|
42
|
+
name?: string;
|
|
43
|
+
version?: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The WebMCP tool surface, as folded by `server/webmcp-aggregator`.
|
|
48
|
+
*
|
|
49
|
+
* A tool is not a span: it is a name whose lifecycle spans a registration, any
|
|
50
|
+
* number of executions and possibly a withdrawal, and it is only meaningful
|
|
51
|
+
* within the installation (page load) that registered it.
|
|
52
|
+
*/
|
|
53
|
+
interface WebMcpCall {
|
|
54
|
+
timestamp: number;
|
|
55
|
+
durationMs: number;
|
|
56
|
+
resultBytes: number;
|
|
57
|
+
resultType?: string;
|
|
58
|
+
envelope: boolean;
|
|
59
|
+
substituted: boolean;
|
|
60
|
+
error: boolean;
|
|
61
|
+
/** Installation-local order of this execute. Makes a chain readable. */
|
|
62
|
+
seq?: number;
|
|
63
|
+
/** True when the result matched a known library refusal string. */
|
|
64
|
+
refused: boolean;
|
|
65
|
+
refusal?: 'confirm' | 'unavailable';
|
|
66
|
+
/** Present only when the app opted into payload capture. Render masked. */
|
|
67
|
+
input?: string;
|
|
68
|
+
/** The exact string the agent received. Present only with payload capture. */
|
|
69
|
+
result?: string;
|
|
70
|
+
traceId: string;
|
|
71
|
+
spanId: string;
|
|
72
|
+
}
|
|
73
|
+
interface WebMcpTool {
|
|
74
|
+
name: string;
|
|
75
|
+
/** Installation (page load) this record belongs to. */
|
|
76
|
+
installationId: string;
|
|
77
|
+
service: string;
|
|
78
|
+
sessionId?: string;
|
|
79
|
+
/** False when the tool was only ever seen executing — see the module note. */
|
|
80
|
+
observedAtRegistration: boolean;
|
|
81
|
+
/** True while the tool is offered: registered, and not since withdrawn. */
|
|
82
|
+
offered: boolean;
|
|
83
|
+
firstSeen: number;
|
|
84
|
+
lastSeen: number;
|
|
85
|
+
descriptionLength?: number;
|
|
86
|
+
hasInputSchema?: boolean;
|
|
87
|
+
annotationsSent: string[];
|
|
88
|
+
/** Annotations the browser discarded. Available nowhere else. */
|
|
89
|
+
annotationsDropped: string[];
|
|
90
|
+
/** Display label the browser may promote over `name`. */
|
|
91
|
+
title?: string;
|
|
92
|
+
/** True when a non-empty title does not equal the tool name. */
|
|
93
|
+
labelMismatch: boolean;
|
|
94
|
+
/** True when this name came back with a different descriptor in this install. */
|
|
95
|
+
redefined: boolean;
|
|
96
|
+
/** Fingerprint of the last registered descriptor. */
|
|
97
|
+
descriptor?: string;
|
|
98
|
+
calls: number;
|
|
99
|
+
errors: number;
|
|
100
|
+
/** Executions whose result matched a known library refusal. */
|
|
101
|
+
refusedCalls: number;
|
|
102
|
+
/** Executions whose result was an unwrapped MCP `{ content: [...] }` envelope. */
|
|
103
|
+
envelopeCalls: number;
|
|
104
|
+
/** Of `resultBytes`, the part that is envelope wrapper rather than content. */
|
|
105
|
+
envelopeBytes: number;
|
|
106
|
+
/** Executions where the browser replaced an empty result with its own text. */
|
|
107
|
+
substitutedCalls: number;
|
|
108
|
+
/** UTF-8 bytes of result the agent has paid for across every call. */
|
|
109
|
+
resultBytes: number;
|
|
110
|
+
medianResultBytes: number;
|
|
111
|
+
/** The last few executions, newest first. Bounded — this is not a call log. */
|
|
112
|
+
recentCalls: WebMcpCall[];
|
|
113
|
+
traceId?: string;
|
|
114
|
+
spanId?: string;
|
|
115
|
+
}
|
|
116
|
+
interface WebMcpSummary {
|
|
117
|
+
installations: number;
|
|
118
|
+
/** Installations that registered nothing — the "instrumented too late" signature. */
|
|
119
|
+
emptyInstallations: number;
|
|
120
|
+
toolsOffered: number;
|
|
121
|
+
toolsWithdrawn: number;
|
|
122
|
+
calls: number;
|
|
123
|
+
errors: number;
|
|
124
|
+
resultBytes: number;
|
|
125
|
+
/** Bytes that are envelope wrapper rather than content. See `envelopeOverhead`. */
|
|
126
|
+
envelopeBytes: number;
|
|
127
|
+
toolsWithDroppedAnnotations: number;
|
|
128
|
+
toolsWithoutInputSchema: number;
|
|
129
|
+
toolsWithLabelMismatch: number;
|
|
130
|
+
toolsRedefined: number;
|
|
131
|
+
refusedCalls: number;
|
|
132
|
+
}
|
|
133
|
+
interface WebMcpInventory {
|
|
134
|
+
tools: WebMcpTool[];
|
|
135
|
+
summary: WebMcpSummary;
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { WebMcpInventory as i, SpanAttributes as n, SpanData as r, AttributeValue as t };
|