@dexto/core 1.8.3 → 1.8.4
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/agent/DextoAgent.cjs +3 -1
- package/dist/agent/DextoAgent.d.ts +2 -0
- package/dist/agent/DextoAgent.d.ts.map +1 -1
- package/dist/agent/DextoAgent.js +7 -2
- package/dist/events/index.d.ts +3 -0
- package/dist/events/index.d.ts.map +1 -1
- package/dist/index.browser.cjs +6 -0
- package/dist/index.browser.d.ts +2 -0
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +4 -0
- package/dist/llm/executor/provider-error.cjs +214 -0
- package/dist/llm/executor/provider-error.d.ts +26 -0
- package/dist/llm/executor/provider-error.d.ts.map +1 -0
- package/dist/llm/executor/provider-error.js +190 -0
- package/dist/llm/executor/stream-processor.cjs +34 -5
- package/dist/llm/executor/stream-processor.d.ts +4 -1
- package/dist/llm/executor/stream-processor.d.ts.map +1 -1
- package/dist/llm/executor/stream-processor.js +34 -5
- package/dist/llm/executor/turn-executor.cjs +185 -124
- package/dist/llm/executor/turn-executor.d.ts +5 -5
- package/dist/llm/executor/turn-executor.d.ts.map +1 -1
- package/dist/llm/executor/turn-executor.js +184 -120
- package/dist/session/title-generator.cjs +19 -2
- package/dist/session/title-generator.d.ts +8 -0
- package/dist/session/title-generator.d.ts.map +1 -1
- package/dist/session/title-generator.js +19 -2
- package/dist/systemPrompt/contributors.cjs +10 -1
- package/dist/systemPrompt/contributors.d.ts.map +1 -1
- package/dist/systemPrompt/contributors.js +10 -1
- package/dist/telemetry/browser.cjs +138 -0
- package/dist/telemetry/browser.d.ts +30 -0
- package/dist/telemetry/browser.d.ts.map +1 -0
- package/dist/telemetry/browser.js +115 -0
- package/dist/telemetry/index.cjs +5 -2
- package/dist/telemetry/index.d.ts +1 -0
- package/dist/telemetry/index.d.ts.map +1 -1
- package/dist/telemetry/index.js +3 -1
- package/dist/telemetry/operation-span.cjs +73 -0
- package/dist/telemetry/operation-span.d.ts +13 -0
- package/dist/telemetry/operation-span.d.ts.map +1 -0
- package/dist/telemetry/operation-span.js +50 -0
- package/dist/telemetry/telemetry.cjs +2 -3
- package/dist/telemetry/telemetry.d.ts.map +1 -1
- package/dist/telemetry/telemetry.js +2 -3
- package/dist/telemetry/utils.cjs +11 -12
- package/dist/telemetry/utils.d.ts.map +1 -1
- package/dist/telemetry/utils.js +11 -12
- package/dist/tools/tool-call-metadata.cjs +118 -6
- package/dist/tools/tool-call-metadata.d.ts.map +1 -1
- package/dist/tools/tool-call-metadata.js +118 -6
- package/package.json +2 -2
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { BaggageEntry, Context, Tracer } from '@opentelemetry/api';
|
|
2
|
+
import type { OtelConfiguration } from './schemas.js';
|
|
3
|
+
export type TelemetryShutdownHandler = () => Promise<void>;
|
|
4
|
+
export type TelemetryRegistrationOptions = {
|
|
5
|
+
config?: OtelConfiguration | undefined;
|
|
6
|
+
initialized?: boolean | undefined;
|
|
7
|
+
shutdown?: TelemetryShutdownHandler | undefined;
|
|
8
|
+
};
|
|
9
|
+
export type BrowserTelemetryInstance = Pick<Telemetry, 'forceFlush' | 'isInitialized' | 'name' | 'shutdown' | 'tracer'>;
|
|
10
|
+
export declare class Telemetry {
|
|
11
|
+
tracer: Tracer;
|
|
12
|
+
name: string;
|
|
13
|
+
private _isInitialized;
|
|
14
|
+
private _shutdownHandler?;
|
|
15
|
+
private static _initPromise?;
|
|
16
|
+
private constructor();
|
|
17
|
+
static registerGlobal(options?: TelemetryRegistrationOptions): Promise<BrowserTelemetryInstance>;
|
|
18
|
+
static getActiveSpan(): import("@opentelemetry/api").Span | undefined;
|
|
19
|
+
static get(): BrowserTelemetryInstance;
|
|
20
|
+
static hasGlobalInstance(): boolean;
|
|
21
|
+
static shutdownGlobal(): Promise<void>;
|
|
22
|
+
static setBaggage(baggage: Record<string, BaggageEntry>, ctx?: Context): Context;
|
|
23
|
+
static withContext<T>(ctx: Context, fn: () => T): T;
|
|
24
|
+
isInitialized(): boolean;
|
|
25
|
+
forceFlush(): Promise<void>;
|
|
26
|
+
shutdown(): Promise<void>;
|
|
27
|
+
private static getGlobalInstance;
|
|
28
|
+
private static setGlobalInstance;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/telemetry/browser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,MAAM,wBAAwB,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;AAE3D,MAAM,MAAM,4BAA4B,GAAG;IACvC,MAAM,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;CACnD,CAAC;AAOF,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACvC,SAAS,EACT,YAAY,GAAG,eAAe,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAClE,CAAC;AAgBF,qBAAa,SAAS;IACX,MAAM,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,gBAAgB,CAAC,CAAuC;IAChE,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAgD;IAE5E,OAAO;WAUM,cAAc,CACvB,OAAO,GAAE,4BAAiC,GAC3C,OAAO,CAAC,wBAAwB,CAAC;IA2BpC,MAAM,CAAC,aAAa;IAIpB,MAAM,CAAC,GAAG,IAAI,wBAAwB;IAQtC,MAAM,CAAC,iBAAiB,IAAI,OAAO;WAItB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAS5C,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,GAAE,OAA8B;IAa5F,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;IAI5C,aAAa,IAAI,OAAO;IAIlB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ3B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAWtC,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAKhC,OAAO,CAAC,MAAM,CAAC,iBAAiB;CAOnC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import "../chunk-C6A6W6XS.js";
|
|
2
|
+
import { context as otlpContext, propagation, trace } from "@opentelemetry/api";
|
|
3
|
+
function isGlobalTelemetryLike(value) {
|
|
4
|
+
if (typeof value !== "object" || value === null) {
|
|
5
|
+
return false;
|
|
6
|
+
}
|
|
7
|
+
return typeof Reflect.get(value, "forceFlush") === "function" && typeof Reflect.get(value, "isInitialized") === "function" && typeof Reflect.get(value, "name") === "string" && typeof Reflect.get(value, "shutdown") === "function" && Reflect.get(value, "tracer") !== void 0;
|
|
8
|
+
}
|
|
9
|
+
class Telemetry {
|
|
10
|
+
tracer;
|
|
11
|
+
name;
|
|
12
|
+
_isInitialized;
|
|
13
|
+
_shutdownHandler;
|
|
14
|
+
static _initPromise;
|
|
15
|
+
constructor(config, options) {
|
|
16
|
+
const serviceName = config.serviceName ?? "dexto-service";
|
|
17
|
+
const tracerName = config.tracerName ?? serviceName;
|
|
18
|
+
this.name = serviceName;
|
|
19
|
+
this.tracer = trace.getTracer(tracerName);
|
|
20
|
+
this._shutdownHandler = options.shutdown;
|
|
21
|
+
this._isInitialized = options.initialized;
|
|
22
|
+
}
|
|
23
|
+
static async registerGlobal(options = {}) {
|
|
24
|
+
const existing = Telemetry.getGlobalInstance();
|
|
25
|
+
if (existing !== void 0) {
|
|
26
|
+
return existing;
|
|
27
|
+
}
|
|
28
|
+
if (Telemetry._initPromise !== void 0) {
|
|
29
|
+
return Telemetry._initPromise;
|
|
30
|
+
}
|
|
31
|
+
Telemetry._initPromise = Promise.resolve().then(() => {
|
|
32
|
+
const current = Telemetry.getGlobalInstance();
|
|
33
|
+
if (current !== void 0) {
|
|
34
|
+
return current;
|
|
35
|
+
}
|
|
36
|
+
const telemetry = new Telemetry(options.config ?? {}, {
|
|
37
|
+
initialized: options.initialized ?? true,
|
|
38
|
+
...options.shutdown !== void 0 && { shutdown: options.shutdown }
|
|
39
|
+
});
|
|
40
|
+
Telemetry.setGlobalInstance(telemetry);
|
|
41
|
+
return telemetry;
|
|
42
|
+
});
|
|
43
|
+
return Telemetry._initPromise;
|
|
44
|
+
}
|
|
45
|
+
static getActiveSpan() {
|
|
46
|
+
return trace.getActiveSpan();
|
|
47
|
+
}
|
|
48
|
+
static get() {
|
|
49
|
+
const telemetry = Telemetry.getGlobalInstance();
|
|
50
|
+
if (telemetry === void 0) {
|
|
51
|
+
throw new Error("Telemetry not initialized. Call Telemetry.registerGlobal() first.");
|
|
52
|
+
}
|
|
53
|
+
return telemetry;
|
|
54
|
+
}
|
|
55
|
+
static hasGlobalInstance() {
|
|
56
|
+
return Telemetry.getGlobalInstance() !== void 0;
|
|
57
|
+
}
|
|
58
|
+
static async shutdownGlobal() {
|
|
59
|
+
const telemetry = Telemetry.getGlobalInstance();
|
|
60
|
+
if (telemetry !== void 0) {
|
|
61
|
+
await telemetry.shutdown();
|
|
62
|
+
}
|
|
63
|
+
Telemetry.setGlobalInstance(void 0);
|
|
64
|
+
Telemetry._initPromise = void 0;
|
|
65
|
+
}
|
|
66
|
+
static setBaggage(baggage, ctx = otlpContext.active()) {
|
|
67
|
+
const currentBaggage = Object.fromEntries(
|
|
68
|
+
propagation.getBaggage(ctx)?.getAllEntries() ?? []
|
|
69
|
+
);
|
|
70
|
+
return propagation.setBaggage(
|
|
71
|
+
ctx,
|
|
72
|
+
propagation.createBaggage({
|
|
73
|
+
...currentBaggage,
|
|
74
|
+
...baggage
|
|
75
|
+
})
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
static withContext(ctx, fn) {
|
|
79
|
+
return otlpContext.with(ctx, fn);
|
|
80
|
+
}
|
|
81
|
+
isInitialized() {
|
|
82
|
+
return this._isInitialized;
|
|
83
|
+
}
|
|
84
|
+
async forceFlush() {
|
|
85
|
+
const provider = trace.getTracerProvider();
|
|
86
|
+
const forceFlush = Reflect.get(provider, "forceFlush");
|
|
87
|
+
if (typeof forceFlush === "function") {
|
|
88
|
+
await Reflect.apply(forceFlush, provider, []);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
async shutdown() {
|
|
92
|
+
try {
|
|
93
|
+
await this._shutdownHandler?.();
|
|
94
|
+
} finally {
|
|
95
|
+
this._isInitialized = false;
|
|
96
|
+
this._shutdownHandler = void 0;
|
|
97
|
+
Telemetry.setGlobalInstance(void 0);
|
|
98
|
+
Telemetry._initPromise = void 0;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
static getGlobalInstance() {
|
|
102
|
+
const telemetry = Reflect.get(globalThis, "__TELEMETRY__");
|
|
103
|
+
return isGlobalTelemetryLike(telemetry) ? telemetry : void 0;
|
|
104
|
+
}
|
|
105
|
+
static setGlobalInstance(telemetry) {
|
|
106
|
+
if (telemetry === void 0) {
|
|
107
|
+
Reflect.deleteProperty(globalThis, "__TELEMETRY__");
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
Reflect.set(globalThis, "__TELEMETRY__", telemetry);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
Telemetry
|
|
115
|
+
};
|
package/dist/telemetry/index.cjs
CHANGED
|
@@ -19,13 +19,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var telemetry_exports = {};
|
|
20
20
|
__export(telemetry_exports, {
|
|
21
21
|
OtelConfigurationSchema: () => import_schemas.OtelConfigurationSchema,
|
|
22
|
-
Telemetry: () => import_telemetry.Telemetry
|
|
22
|
+
Telemetry: () => import_telemetry.Telemetry,
|
|
23
|
+
recordOperationSpan: () => import_operation_span.recordOperationSpan
|
|
23
24
|
});
|
|
24
25
|
module.exports = __toCommonJS(telemetry_exports);
|
|
25
26
|
var import_telemetry = require("./telemetry.js");
|
|
26
27
|
var import_schemas = require("./schemas.js");
|
|
28
|
+
var import_operation_span = require("./operation-span.js");
|
|
27
29
|
// Annotate the CommonJS export names for ESM import in node:
|
|
28
30
|
0 && (module.exports = {
|
|
29
31
|
OtelConfigurationSchema,
|
|
30
|
-
Telemetry
|
|
32
|
+
Telemetry,
|
|
33
|
+
recordOperationSpan
|
|
31
34
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { Telemetry, type TelemetryRegistrationOptions, type TelemetryShutdownHandler, } from './telemetry.js';
|
|
2
2
|
export { OtelConfigurationSchema } from './schemas.js';
|
|
3
3
|
export type { OtelConfiguration } from './schemas.js';
|
|
4
|
+
export { recordOperationSpan, type OperationSpanOptions } from './operation-span.js';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/telemetry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAChC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/telemetry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAChC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/telemetry/index.js
CHANGED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var operation_span_exports = {};
|
|
20
|
+
__export(operation_span_exports, {
|
|
21
|
+
recordOperationSpan: () => recordOperationSpan
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(operation_span_exports);
|
|
24
|
+
var import_api = require("@opentelemetry/api");
|
|
25
|
+
var import_utils = require("./utils.js");
|
|
26
|
+
async function recordOperationSpan(options, operation, logger) {
|
|
27
|
+
const skipIfNoTelemetry = options.skipIfNoTelemetry ?? true;
|
|
28
|
+
if (skipIfNoTelemetry && !(0, import_utils.hasActiveTelemetry)(logger)) {
|
|
29
|
+
return operation();
|
|
30
|
+
}
|
|
31
|
+
const span = import_api.trace.getTracer(options.tracerName ?? "dexto").startSpan(options.name, { kind: import_api.SpanKind.INTERNAL });
|
|
32
|
+
const spanContext = import_api.trace.setSpan(import_api.context.active(), span);
|
|
33
|
+
(0, import_utils.addBaggageAttributesToSpan)(span, spanContext, logger);
|
|
34
|
+
if (options.componentName !== void 0) {
|
|
35
|
+
span.setAttribute("componentName", options.componentName);
|
|
36
|
+
}
|
|
37
|
+
setOperationSpanAttributes(span, options.attributes);
|
|
38
|
+
try {
|
|
39
|
+
const result = await import_api.context.with(spanContext, operation);
|
|
40
|
+
try {
|
|
41
|
+
setOperationSpanAttributes(span, options.resultAttributes?.(result));
|
|
42
|
+
} catch (error) {
|
|
43
|
+
logger?.debug("Failed to set OpenTelemetry result attributes", {
|
|
44
|
+
error: error instanceof Error ? error.message : String(error),
|
|
45
|
+
span: options.name
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
span.setStatus({ code: import_api.SpanStatusCode.OK });
|
|
49
|
+
return result;
|
|
50
|
+
} catch (error) {
|
|
51
|
+
if (error instanceof Error) {
|
|
52
|
+
span.recordException(error);
|
|
53
|
+
span.setStatus({ code: import_api.SpanStatusCode.ERROR, message: error.message });
|
|
54
|
+
} else {
|
|
55
|
+
span.setStatus({ code: import_api.SpanStatusCode.ERROR, message: String(error) });
|
|
56
|
+
}
|
|
57
|
+
throw error;
|
|
58
|
+
} finally {
|
|
59
|
+
span.end();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function setOperationSpanAttributes(span, attributes) {
|
|
63
|
+
if (span === void 0 || attributes === void 0) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
for (const [key, value] of Object.entries(attributes)) {
|
|
67
|
+
span.setAttribute(key, value);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
71
|
+
0 && (module.exports = {
|
|
72
|
+
recordOperationSpan
|
|
73
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Logger } from '../logger/v2/types.js';
|
|
2
|
+
type OperationSpanAttributes = Record<string, string | number | boolean>;
|
|
3
|
+
export type OperationSpanOptions<T> = {
|
|
4
|
+
attributes?: OperationSpanAttributes;
|
|
5
|
+
componentName?: string;
|
|
6
|
+
name: string;
|
|
7
|
+
resultAttributes?: (result: T) => OperationSpanAttributes | undefined;
|
|
8
|
+
skipIfNoTelemetry?: boolean;
|
|
9
|
+
tracerName?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function recordOperationSpan<T>(options: OperationSpanOptions<T>, operation: () => T | Promise<T>, logger?: Logger): Promise<T>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=operation-span.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-span.d.ts","sourceRoot":"","sources":["../../src/telemetry/operation-span.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,KAAK,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAEzE,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI;IAClC,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,uBAAuB,GAAG,SAAS,CAAC;IACtE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,wBAAsB,mBAAmB,CAAC,CAAC,EACvC,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC,EAChC,SAAS,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAC/B,MAAM,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,CAAC,CAAC,CAyCZ"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import "../chunk-C6A6W6XS.js";
|
|
2
|
+
import { context, SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
3
|
+
import { addBaggageAttributesToSpan, hasActiveTelemetry } from "./utils.js";
|
|
4
|
+
async function recordOperationSpan(options, operation, logger) {
|
|
5
|
+
const skipIfNoTelemetry = options.skipIfNoTelemetry ?? true;
|
|
6
|
+
if (skipIfNoTelemetry && !hasActiveTelemetry(logger)) {
|
|
7
|
+
return operation();
|
|
8
|
+
}
|
|
9
|
+
const span = trace.getTracer(options.tracerName ?? "dexto").startSpan(options.name, { kind: SpanKind.INTERNAL });
|
|
10
|
+
const spanContext = trace.setSpan(context.active(), span);
|
|
11
|
+
addBaggageAttributesToSpan(span, spanContext, logger);
|
|
12
|
+
if (options.componentName !== void 0) {
|
|
13
|
+
span.setAttribute("componentName", options.componentName);
|
|
14
|
+
}
|
|
15
|
+
setOperationSpanAttributes(span, options.attributes);
|
|
16
|
+
try {
|
|
17
|
+
const result = await context.with(spanContext, operation);
|
|
18
|
+
try {
|
|
19
|
+
setOperationSpanAttributes(span, options.resultAttributes?.(result));
|
|
20
|
+
} catch (error) {
|
|
21
|
+
logger?.debug("Failed to set OpenTelemetry result attributes", {
|
|
22
|
+
error: error instanceof Error ? error.message : String(error),
|
|
23
|
+
span: options.name
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
27
|
+
return result;
|
|
28
|
+
} catch (error) {
|
|
29
|
+
if (error instanceof Error) {
|
|
30
|
+
span.recordException(error);
|
|
31
|
+
span.setStatus({ code: SpanStatusCode.ERROR, message: error.message });
|
|
32
|
+
} else {
|
|
33
|
+
span.setStatus({ code: SpanStatusCode.ERROR, message: String(error) });
|
|
34
|
+
}
|
|
35
|
+
throw error;
|
|
36
|
+
} finally {
|
|
37
|
+
span.end();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function setOperationSpanAttributes(span, attributes) {
|
|
41
|
+
if (span === void 0 || attributes === void 0) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
for (const [key, value] of Object.entries(attributes)) {
|
|
45
|
+
span.setAttribute(key, value);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
recordOperationSpan
|
|
50
|
+
};
|
|
@@ -32,7 +32,6 @@ __export(telemetry_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(telemetry_exports);
|
|
34
34
|
var import_api = require("@opentelemetry/api");
|
|
35
|
-
var import_logger = require("../logger/logger.js");
|
|
36
35
|
var import_errors = require("./errors.js");
|
|
37
36
|
var import_DextoRuntimeError = require("../errors/DextoRuntimeError.js");
|
|
38
37
|
class Telemetry {
|
|
@@ -318,7 +317,7 @@ class Telemetry {
|
|
|
318
317
|
}
|
|
319
318
|
} catch (error) {
|
|
320
319
|
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
321
|
-
|
|
320
|
+
console.warn(`Telemetry shutdown failed to flush spans (non-blocking): ${errorMsg}`);
|
|
322
321
|
} finally {
|
|
323
322
|
this.cleanupAfterShutdown();
|
|
324
323
|
}
|
|
@@ -326,7 +325,7 @@ class Telemetry {
|
|
|
326
325
|
cleanupAfterShutdown() {
|
|
327
326
|
this._isInitialized = false;
|
|
328
327
|
globalThis.__TELEMETRY__ = void 0;
|
|
329
|
-
if (Telemetry._signalHandlers) {
|
|
328
|
+
if (Telemetry._signalHandlers && typeof process !== "undefined") {
|
|
330
329
|
process.off("SIGTERM", Telemetry._signalHandlers.sigterm);
|
|
331
330
|
process.off("SIGINT", Telemetry._signalHandlers.sigint);
|
|
332
331
|
Telemetry._signalHandlers = void 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/telemetry/telemetry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/telemetry/telemetry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAStD,MAAM,MAAM,wBAAwB,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;AAE3D,MAAM,MAAM,4BAA4B,GAAG;IACvC,MAAM,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;CACnD,CAAC;AASF,OAAO,CAAC,MAAM,CAAC;IACX,IAAI,aAAa,EAAE,SAAS,GAAG,SAAS,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,qBAAa,SAAS;IACX,MAAM,EAAE,MAAM,CAA4B;IACjD,IAAI,EAAE,MAAM,CAAmB;IAC/B,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,IAAI,CAAC,CAA0B;IACvC,OAAO,CAAC,gBAAgB,CAAC,CAAuC;IAChE,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAiC;IAC7D,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAA0D;IAEzF,OAAO;mBAWc,kBAAkB;IA0DvC;;;;;OAKG;WACU,IAAI,CACb,MAAM,GAAE,iBAAsB,EAC9B,QAAQ,CAAC,EAAE,OAAO,+BAA+B,EAAE,YAAY,GAChE,OAAO,CAAC,SAAS,CAAC;IAiIrB;;;;OAIG;WACU,cAAc,CAAC,OAAO,GAAE,4BAAiC,GAAG,OAAO,CAAC,SAAS,CAAC;IAiC3F,MAAM,CAAC,aAAa;IAKpB;;;;OAIG;IACH,MAAM,CAAC,GAAG,IAAI,SAAS;IAOvB;;;OAGG;IACH,MAAM,CAAC,iBAAiB,IAAI,OAAO;IAInC;;;;;OAKG;WACU,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAS5C;;;OAGG;IACI,aAAa,IAAI,OAAO;IAI/B,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,GAAE,OAA8B;IAc5F,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI;IAI/C;;;OAGG;IACU,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAUxC;;;;;;;;;OASG;IACU,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAmBtC,OAAO,CAAC,oBAAoB;CAiB/B"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import "../chunk-C6A6W6XS.js";
|
|
2
2
|
import { context as otlpContext, trace, propagation } from "@opentelemetry/api";
|
|
3
|
-
import { logger } from "../logger/logger.js";
|
|
4
3
|
import { TelemetryError } from "./errors.js";
|
|
5
4
|
import { DextoRuntimeError } from "../errors/DextoRuntimeError.js";
|
|
6
5
|
class Telemetry {
|
|
@@ -286,7 +285,7 @@ class Telemetry {
|
|
|
286
285
|
}
|
|
287
286
|
} catch (error) {
|
|
288
287
|
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
289
|
-
|
|
288
|
+
console.warn(`Telemetry shutdown failed to flush spans (non-blocking): ${errorMsg}`);
|
|
290
289
|
} finally {
|
|
291
290
|
this.cleanupAfterShutdown();
|
|
292
291
|
}
|
|
@@ -294,7 +293,7 @@ class Telemetry {
|
|
|
294
293
|
cleanupAfterShutdown() {
|
|
295
294
|
this._isInitialized = false;
|
|
296
295
|
globalThis.__TELEMETRY__ = void 0;
|
|
297
|
-
if (Telemetry._signalHandlers) {
|
|
296
|
+
if (Telemetry._signalHandlers && typeof process !== "undefined") {
|
|
298
297
|
process.off("SIGTERM", Telemetry._signalHandlers.sigterm);
|
|
299
298
|
process.off("SIGINT", Telemetry._signalHandlers.sigint);
|
|
300
299
|
Telemetry._signalHandlers = void 0;
|
package/dist/telemetry/utils.cjs
CHANGED
|
@@ -24,21 +24,20 @@ __export(utils_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(utils_exports);
|
|
26
26
|
var import_api = require("@opentelemetry/api");
|
|
27
|
-
var import_telemetry = require("./telemetry.js");
|
|
28
27
|
var import_runtime = require("../runtime/index.js");
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const telemetryInstance = import_telemetry.Telemetry.get();
|
|
33
|
-
const isActive = telemetryInstance.isInitialized();
|
|
34
|
-
logger?.silly(`hasActiveTelemetry: Telemetry is initialized: ${isActive}`);
|
|
35
|
-
return isActive;
|
|
36
|
-
} catch (error) {
|
|
37
|
-
logger?.silly(
|
|
38
|
-
`hasActiveTelemetry: Telemetry not active or initialized. Error: ${error instanceof Error ? error.message : String(error)}`
|
|
39
|
-
);
|
|
28
|
+
function getGlobalTelemetryInitialized() {
|
|
29
|
+
const telemetry = Reflect.get(globalThis, "__TELEMETRY__");
|
|
30
|
+
if (typeof telemetry !== "object" || telemetry === null) {
|
|
40
31
|
return false;
|
|
41
32
|
}
|
|
33
|
+
const isInitialized = Reflect.get(telemetry, "isInitialized");
|
|
34
|
+
return typeof isInitialized === "function" && Reflect.apply(isInitialized, telemetry, []) === true;
|
|
35
|
+
}
|
|
36
|
+
function hasActiveTelemetry(logger) {
|
|
37
|
+
logger?.silly("hasActiveTelemetry called.");
|
|
38
|
+
const isActive = getGlobalTelemetryInitialized();
|
|
39
|
+
logger?.silly(`hasActiveTelemetry: Telemetry is initialized: ${isActive}`);
|
|
40
|
+
return isActive;
|
|
42
41
|
}
|
|
43
42
|
function getBaggageValues(ctx, logger) {
|
|
44
43
|
logger?.silly("getBaggageValues called.");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/telemetry/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/telemetry/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAgBpD,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAK3D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM;;;;;;;;;;EAsB7D;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CA2B1F"}
|
package/dist/telemetry/utils.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import "../chunk-C6A6W6XS.js";
|
|
2
2
|
import { propagation } from "@opentelemetry/api";
|
|
3
|
-
import { Telemetry } from "./telemetry.js";
|
|
4
3
|
import { getHostRuntimeAttributes, getHostRuntimeContextFromBaggage } from "../runtime/index.js";
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const telemetryInstance = Telemetry.get();
|
|
9
|
-
const isActive = telemetryInstance.isInitialized();
|
|
10
|
-
logger?.silly(`hasActiveTelemetry: Telemetry is initialized: ${isActive}`);
|
|
11
|
-
return isActive;
|
|
12
|
-
} catch (error) {
|
|
13
|
-
logger?.silly(
|
|
14
|
-
`hasActiveTelemetry: Telemetry not active or initialized. Error: ${error instanceof Error ? error.message : String(error)}`
|
|
15
|
-
);
|
|
4
|
+
function getGlobalTelemetryInitialized() {
|
|
5
|
+
const telemetry = Reflect.get(globalThis, "__TELEMETRY__");
|
|
6
|
+
if (typeof telemetry !== "object" || telemetry === null) {
|
|
16
7
|
return false;
|
|
17
8
|
}
|
|
9
|
+
const isInitialized = Reflect.get(telemetry, "isInitialized");
|
|
10
|
+
return typeof isInitialized === "function" && Reflect.apply(isInitialized, telemetry, []) === true;
|
|
11
|
+
}
|
|
12
|
+
function hasActiveTelemetry(logger) {
|
|
13
|
+
logger?.silly("hasActiveTelemetry called.");
|
|
14
|
+
const isActive = getGlobalTelemetryInitialized();
|
|
15
|
+
logger?.silly(`hasActiveTelemetry: Telemetry is initialized: ${isActive}`);
|
|
16
|
+
return isActive;
|
|
18
17
|
}
|
|
19
18
|
function getBaggageValues(ctx, logger) {
|
|
20
19
|
logger?.silly("getBaggageValues called.");
|
|
@@ -45,17 +45,129 @@ const META_SCHEMA = {
|
|
|
45
45
|
additionalProperties: true
|
|
46
46
|
};
|
|
47
47
|
const META_KEY = "__meta";
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
const FORBIDDEN_TOP_LEVEL_SCHEMA_KEYS = ["oneOf", "anyOf", "allOf", "enum", "not"];
|
|
49
|
+
function hasForbiddenTopLevelSchemaKey(parameters) {
|
|
50
|
+
return FORBIDDEN_TOP_LEVEL_SCHEMA_KEYS.some((key) => key in parameters);
|
|
51
|
+
}
|
|
52
|
+
function readObjectAlternatives(parameters) {
|
|
53
|
+
const alternatives = parameters.oneOf ?? parameters.anyOf;
|
|
54
|
+
if (!Array.isArray(alternatives)) {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
return alternatives.filter(
|
|
58
|
+
(alternative) => alternative !== true && alternative !== false && alternative.type === "object"
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
function readRequiredPropertyNames(schema) {
|
|
62
|
+
return new Set(
|
|
63
|
+
Array.isArray(schema.required) ? schema.required.filter((propertyName) => typeof propertyName === "string") : []
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function intersectRequiredProperties(alternatives) {
|
|
67
|
+
if (alternatives.length === 0) {
|
|
68
|
+
return void 0;
|
|
69
|
+
}
|
|
70
|
+
const requiredSets = alternatives.map(readRequiredPropertyNames);
|
|
71
|
+
const first = requiredSets[0];
|
|
72
|
+
if (first === void 0) {
|
|
73
|
+
return void 0;
|
|
74
|
+
}
|
|
75
|
+
const rest = requiredSets.slice(1);
|
|
76
|
+
const required = [...first].filter(
|
|
77
|
+
(propertyName) => rest.every((requiredProperties) => requiredProperties.has(propertyName))
|
|
78
|
+
);
|
|
79
|
+
return required.length === 0 ? void 0 : required;
|
|
80
|
+
}
|
|
81
|
+
function valuesEqual(left, right) {
|
|
82
|
+
return JSON.stringify(left) === JSON.stringify(right);
|
|
83
|
+
}
|
|
84
|
+
function mergeEnumValues(values) {
|
|
85
|
+
const merged = [];
|
|
86
|
+
for (const value of values) {
|
|
87
|
+
if (!merged.some((existing) => valuesEqual(existing, value))) {
|
|
88
|
+
merged.push(value);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return merged;
|
|
92
|
+
}
|
|
93
|
+
function readEnumValues(schema) {
|
|
94
|
+
if (schema.const !== void 0) {
|
|
95
|
+
return [schema.const];
|
|
96
|
+
}
|
|
97
|
+
return Array.isArray(schema.enum) ? schema.enum : void 0;
|
|
98
|
+
}
|
|
99
|
+
function mergePropertySchema(current, next) {
|
|
100
|
+
if (current === void 0 || current === false) {
|
|
101
|
+
return next;
|
|
102
|
+
}
|
|
103
|
+
if (current === true || next === true) {
|
|
104
|
+
return {};
|
|
105
|
+
}
|
|
106
|
+
if (next === false) {
|
|
107
|
+
return current;
|
|
51
108
|
}
|
|
52
|
-
if (
|
|
109
|
+
if (valuesEqual(current, next)) {
|
|
110
|
+
return current;
|
|
111
|
+
}
|
|
112
|
+
const currentEnum = readEnumValues(current);
|
|
113
|
+
const nextEnum = readEnumValues(next);
|
|
114
|
+
if (currentEnum !== void 0 && nextEnum !== void 0) {
|
|
115
|
+
return { enum: mergeEnumValues([...currentEnum, ...nextEnum]) };
|
|
116
|
+
}
|
|
117
|
+
if (current.type !== void 0 && valuesEqual(current.type, next.type)) {
|
|
118
|
+
return { type: current.type };
|
|
119
|
+
}
|
|
120
|
+
return {};
|
|
121
|
+
}
|
|
122
|
+
function flattenObjectUnionSchema(parameters) {
|
|
123
|
+
const alternatives = readObjectAlternatives(parameters);
|
|
124
|
+
if (alternatives.length === 0) {
|
|
125
|
+
return void 0;
|
|
126
|
+
}
|
|
127
|
+
const properties = {};
|
|
128
|
+
const required = intersectRequiredProperties(alternatives);
|
|
129
|
+
for (const alternative of alternatives) {
|
|
130
|
+
const alternativeProperties = alternative.properties ?? {};
|
|
131
|
+
for (const [propertyName, propertySchema] of Object.entries(alternativeProperties)) {
|
|
132
|
+
properties[propertyName] = mergePropertySchema(
|
|
133
|
+
properties[propertyName],
|
|
134
|
+
propertySchema
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
...parameters.description === void 0 ? {} : { description: parameters.description },
|
|
140
|
+
type: "object",
|
|
141
|
+
properties,
|
|
142
|
+
...required === void 0 ? {} : { required },
|
|
143
|
+
additionalProperties: true
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
function normalizeToolParametersSchema(parameters) {
|
|
147
|
+
if (parameters.type === "object" && !hasForbiddenTopLevelSchemaKey(parameters)) {
|
|
53
148
|
return parameters;
|
|
54
149
|
}
|
|
150
|
+
const flattened = flattenObjectUnionSchema(parameters);
|
|
151
|
+
if (flattened !== void 0) {
|
|
152
|
+
return flattened;
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
type: "object",
|
|
156
|
+
additionalProperties: true
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function wrapToolParametersSchema(parameters) {
|
|
160
|
+
const normalized = normalizeToolParametersSchema(parameters);
|
|
161
|
+
if (!normalized.properties) {
|
|
162
|
+
return normalized;
|
|
163
|
+
}
|
|
164
|
+
if (META_KEY in normalized.properties) {
|
|
165
|
+
return normalized;
|
|
166
|
+
}
|
|
55
167
|
return {
|
|
56
|
-
...
|
|
168
|
+
...normalized,
|
|
57
169
|
properties: {
|
|
58
|
-
...
|
|
170
|
+
...normalized.properties,
|
|
59
171
|
[META_KEY]: META_SCHEMA
|
|
60
172
|
}
|
|
61
173
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-call-metadata.d.ts","sourceRoot":"","sources":["../../src/tools/tool-call-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-call-metadata.d.ts","sourceRoot":"","sources":["../../src/tools/tool-call-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACrD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,MAAM,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AA0KF,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,WAAW,GAAG,WAAW,CAkB7E;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAChE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,IAAI,EAAE,gBAAgB,CAAC;CAC1B,CAQA"}
|