@mnemom/aip-otel-exporter 0.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/README.md +172 -0
- package/dashboards/README.md +92 -0
- package/dashboards/datadog-aip-overview.json +311 -0
- package/dashboards/grafana-aip-detail.json +403 -0
- package/dashboards/grafana-aip-overview.json +431 -0
- package/dist/attributes.d.ts +70 -0
- package/dist/attributes.d.ts.map +1 -0
- package/dist/attributes.js +81 -0
- package/dist/attributes.js.map +1 -0
- package/dist/auto/aap-instrumentation.d.ts +23 -0
- package/dist/auto/aap-instrumentation.d.ts.map +1 -0
- package/dist/auto/aap-instrumentation.js +112 -0
- package/dist/auto/aap-instrumentation.js.map +1 -0
- package/dist/auto/aip-instrumentation.d.ts +22 -0
- package/dist/auto/aip-instrumentation.d.ts.map +1 -0
- package/dist/auto/aip-instrumentation.js +87 -0
- package/dist/auto/aip-instrumentation.js.map +1 -0
- package/dist/auto/index.d.ts +20 -0
- package/dist/auto/index.d.ts.map +1 -0
- package/dist/auto/index.js +22 -0
- package/dist/auto/index.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -0
- package/dist/manual/record-coherence.d.ts +12 -0
- package/dist/manual/record-coherence.d.ts.map +1 -0
- package/dist/manual/record-coherence.js +21 -0
- package/dist/manual/record-coherence.js.map +1 -0
- package/dist/manual/record-drift.d.ts +14 -0
- package/dist/manual/record-drift.d.ts.map +1 -0
- package/dist/manual/record-drift.js +48 -0
- package/dist/manual/record-drift.js.map +1 -0
- package/dist/manual/record-integrity-check.d.ts +19 -0
- package/dist/manual/record-integrity-check.d.ts.map +1 -0
- package/dist/manual/record-integrity-check.js +92 -0
- package/dist/manual/record-integrity-check.js.map +1 -0
- package/dist/manual/record-verification.d.ts +14 -0
- package/dist/manual/record-verification.d.ts.map +1 -0
- package/dist/manual/record-verification.js +40 -0
- package/dist/manual/record-verification.js.map +1 -0
- package/dist/manual/span-builder.d.ts +28 -0
- package/dist/manual/span-builder.d.ts.map +1 -0
- package/dist/manual/span-builder.js +42 -0
- package/dist/manual/span-builder.js.map +1 -0
- package/dist/metrics/integrity-metrics.d.ts +44 -0
- package/dist/metrics/integrity-metrics.d.ts.map +1 -0
- package/dist/metrics/integrity-metrics.js +128 -0
- package/dist/metrics/integrity-metrics.js.map +1 -0
- package/dist/types.d.ts +205 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/dist/workers/index.d.ts +8 -0
- package/dist/workers/index.d.ts.map +1 -0
- package/dist/workers/index.js +7 -0
- package/dist/workers/index.js.map +1 -0
- package/dist/workers/otlp-serializer.d.ts +90 -0
- package/dist/workers/otlp-serializer.d.ts.map +1 -0
- package/dist/workers/otlp-serializer.js +133 -0
- package/dist/workers/otlp-serializer.js.map +1 -0
- package/dist/workers/workers-exporter.d.ts +26 -0
- package/dist/workers/workers-exporter.d.ts.map +1 -0
- package/dist/workers/workers-exporter.js +228 -0
- package/dist/workers/workers-exporter.js.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-instrumentation for AAP verification functions.
|
|
3
|
+
*
|
|
4
|
+
* Wraps verifyTrace, checkCoherence, and detectDrift exports to
|
|
5
|
+
* automatically record OTel spans. Node.js only.
|
|
6
|
+
*/
|
|
7
|
+
import { trace } from "@opentelemetry/api";
|
|
8
|
+
import { recordVerification } from "../manual/record-verification.js";
|
|
9
|
+
import { recordCoherence } from "../manual/record-coherence.js";
|
|
10
|
+
import { recordDrift } from "../manual/record-drift.js";
|
|
11
|
+
const state = {
|
|
12
|
+
originalVerifyTrace: null,
|
|
13
|
+
originalCheckCoherence: null,
|
|
14
|
+
originalDetectDrift: null,
|
|
15
|
+
aapModule: null,
|
|
16
|
+
patched: false,
|
|
17
|
+
};
|
|
18
|
+
function wrapAsync(original, recorder, tracer) {
|
|
19
|
+
return function wrappedFn(...args) {
|
|
20
|
+
const result = original.call(this, ...args);
|
|
21
|
+
if (result && typeof result.then === "function") {
|
|
22
|
+
return result.then((value) => {
|
|
23
|
+
if (value && typeof value === "object") {
|
|
24
|
+
try {
|
|
25
|
+
recorder(tracer, value);
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
// Never break the application
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return value;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
if (result && typeof result === "object") {
|
|
35
|
+
try {
|
|
36
|
+
recorder(tracer, result);
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
// Never break the application
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Instrument AAP verification functions to auto-record spans.
|
|
47
|
+
*
|
|
48
|
+
* Attempts to require `@mnemom/agent-alignment-protocol` and wrap:
|
|
49
|
+
* - verifyTrace → recordVerification
|
|
50
|
+
* - checkCoherence → recordCoherence
|
|
51
|
+
* - detectDrift → recordDrift
|
|
52
|
+
*/
|
|
53
|
+
export function instrumentAAP(options) {
|
|
54
|
+
if (state.patched)
|
|
55
|
+
return;
|
|
56
|
+
const tracer = options?.tracerProvider
|
|
57
|
+
? options.tracerProvider.getTracer("@mnemom/aip-otel-exporter", "0.1.0")
|
|
58
|
+
: trace.getTracer("@mnemom/aip-otel-exporter", "0.1.0");
|
|
59
|
+
let aapModule;
|
|
60
|
+
try {
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
62
|
+
aapModule = require("@mnemom/agent-alignment-protocol");
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
state.aapModule = aapModule;
|
|
68
|
+
if (typeof aapModule.verifyTrace === "function") {
|
|
69
|
+
state.originalVerifyTrace = aapModule.verifyTrace;
|
|
70
|
+
aapModule.verifyTrace = wrapAsync(state.originalVerifyTrace, recordVerification, tracer);
|
|
71
|
+
}
|
|
72
|
+
if (typeof aapModule.checkCoherence === "function") {
|
|
73
|
+
state.originalCheckCoherence = aapModule.checkCoherence;
|
|
74
|
+
aapModule.checkCoherence = wrapAsync(state.originalCheckCoherence, recordCoherence, tracer);
|
|
75
|
+
}
|
|
76
|
+
if (typeof aapModule.detectDrift === "function") {
|
|
77
|
+
state.originalDetectDrift = aapModule.detectDrift;
|
|
78
|
+
aapModule.detectDrift = wrapAsync(state.originalDetectDrift, (tracer, result) => {
|
|
79
|
+
// detectDrift returns an array of alerts
|
|
80
|
+
if (Array.isArray(result)) {
|
|
81
|
+
recordDrift(tracer, result);
|
|
82
|
+
}
|
|
83
|
+
else if (result &&
|
|
84
|
+
typeof result === "object" &&
|
|
85
|
+
"alerts" in result) {
|
|
86
|
+
const r = result;
|
|
87
|
+
recordDrift(tracer, r.alerts, r.traces_analyzed);
|
|
88
|
+
}
|
|
89
|
+
}, tracer);
|
|
90
|
+
}
|
|
91
|
+
state.patched = true;
|
|
92
|
+
}
|
|
93
|
+
/** Remove AAP instrumentation, restoring original functions. */
|
|
94
|
+
export function uninstrumentAAP() {
|
|
95
|
+
if (!state.patched || !state.aapModule)
|
|
96
|
+
return;
|
|
97
|
+
if (state.originalVerifyTrace) {
|
|
98
|
+
state.aapModule.verifyTrace = state.originalVerifyTrace;
|
|
99
|
+
}
|
|
100
|
+
if (state.originalCheckCoherence) {
|
|
101
|
+
state.aapModule.checkCoherence = state.originalCheckCoherence;
|
|
102
|
+
}
|
|
103
|
+
if (state.originalDetectDrift) {
|
|
104
|
+
state.aapModule.detectDrift = state.originalDetectDrift;
|
|
105
|
+
}
|
|
106
|
+
state.originalVerifyTrace = null;
|
|
107
|
+
state.originalCheckCoherence = null;
|
|
108
|
+
state.originalDetectDrift = null;
|
|
109
|
+
state.aapModule = null;
|
|
110
|
+
state.patched = false;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=aap-instrumentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aap-instrumentation.js","sourceRoot":"","sources":["../../src/auto/aap-instrumentation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAe,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAYxD,MAAM,KAAK,GAAe;IACxB,mBAAmB,EAAE,IAAI;IACzB,sBAAsB,EAAE,IAAI;IAC5B,mBAAmB,EAAE,IAAI;IACzB,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,KAAK;CACf,CAAC;AAEF,SAAS,SAAS,CAChB,QAAqB,EACrB,QAA6C,EAC7C,MAAc;IAEd,OAAO,SAAS,SAAS,CAAgB,GAAG,IAAe;QACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;QAE5C,IAAI,MAAM,IAAI,OAAQ,MAA2B,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YACtE,OAAQ,MAA2B,CAAC,IAAI,CAAC,CAAC,KAAc,EAAE,EAAE;gBAC1D,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;oBACvC,IAAI,CAAC;wBACH,QAAQ,CAAC,MAAM,EAAE,KAAU,CAAC,CAAC;oBAC/B,CAAC;oBAAC,MAAM,CAAC;wBACP,8BAA8B;oBAChC,CAAC;gBACH,CAAC;gBACD,OAAO,KAAK,CAAC;YACf,CAAC,CAAC,CAAC;QACL,CAAC;QAED,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YACzC,IAAI,CAAC;gBACH,QAAQ,CAAC,MAAM,EAAE,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C,OAAO,GAAG,KAAK,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-instrumentation for AIP client.
|
|
3
|
+
*
|
|
4
|
+
* Wraps AIPClient.prototype.check() to automatically record integrity
|
|
5
|
+
* check spans after each call. Node.js only.
|
|
6
|
+
*/
|
|
7
|
+
import { type Tracer } from "@opentelemetry/api";
|
|
8
|
+
/**
|
|
9
|
+
* Instrument the AIP client to auto-record integrity checks.
|
|
10
|
+
*
|
|
11
|
+
* Attempts to require/import `@mnemom/agent-integrity-protocol` and
|
|
12
|
+
* monkey-patch `AIPClient.prototype.check` to call `recordIntegrityCheck`
|
|
13
|
+
* after each invocation.
|
|
14
|
+
*/
|
|
15
|
+
export declare function instrumentAIP(options?: {
|
|
16
|
+
tracerProvider?: {
|
|
17
|
+
getTracer: (name: string, version?: string) => Tracer;
|
|
18
|
+
};
|
|
19
|
+
}): void;
|
|
20
|
+
/** Remove AIP instrumentation, restoring original methods. */
|
|
21
|
+
export declare function uninstrumentAIP(): void;
|
|
22
|
+
//# sourceMappingURL=aip-instrumentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aip-instrumentation.d.ts","sourceRoot":"","sources":["../../src/auto/aip-instrumentation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAS,MAAM,oBAAoB,CAAC;AAexD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE;IACtC,cAAc,CAAC,EAAE;QAAE,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;KAAE,CAAC;CAC5E,GAAG,IAAI,CA4DP;AAED,8DAA8D;AAC9D,wBAAgB,eAAe,IAAI,IAAI,CAgBtC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-instrumentation for AIP client.
|
|
3
|
+
*
|
|
4
|
+
* Wraps AIPClient.prototype.check() to automatically record integrity
|
|
5
|
+
* check spans after each call. Node.js only.
|
|
6
|
+
*/
|
|
7
|
+
import { trace } from "@opentelemetry/api";
|
|
8
|
+
import { recordIntegrityCheck } from "../manual/record-integrity-check.js";
|
|
9
|
+
const state = {
|
|
10
|
+
originalCheck: null,
|
|
11
|
+
patched: false,
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Instrument the AIP client to auto-record integrity checks.
|
|
15
|
+
*
|
|
16
|
+
* Attempts to require/import `@mnemom/agent-integrity-protocol` and
|
|
17
|
+
* monkey-patch `AIPClient.prototype.check` to call `recordIntegrityCheck`
|
|
18
|
+
* after each invocation.
|
|
19
|
+
*/
|
|
20
|
+
export function instrumentAIP(options) {
|
|
21
|
+
if (state.patched)
|
|
22
|
+
return;
|
|
23
|
+
const tracer = options?.tracerProvider
|
|
24
|
+
? options.tracerProvider.getTracer("@mnemom/aip-otel-exporter", "0.1.0")
|
|
25
|
+
: trace.getTracer("@mnemom/aip-otel-exporter", "0.1.0");
|
|
26
|
+
let AIPClient;
|
|
27
|
+
try {
|
|
28
|
+
// Dynamic require for Node.js — won't work in CF Workers (expected)
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
30
|
+
const aipModule = require("@mnemom/agent-integrity-protocol");
|
|
31
|
+
AIPClient = aipModule.AIPClient ?? aipModule.default?.AIPClient;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
// Package not installed — nothing to instrument
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (!AIPClient?.prototype?.check)
|
|
38
|
+
return;
|
|
39
|
+
state.originalCheck = AIPClient.prototype.check;
|
|
40
|
+
const originalCheck = state.originalCheck;
|
|
41
|
+
AIPClient.prototype.check = function wrappedCheck(...args) {
|
|
42
|
+
const result = originalCheck.call(this, ...args);
|
|
43
|
+
// Handle both sync and async results
|
|
44
|
+
if (result && typeof result.then === "function") {
|
|
45
|
+
return result.then((signal) => {
|
|
46
|
+
if (signal && typeof signal === "object") {
|
|
47
|
+
try {
|
|
48
|
+
recordIntegrityCheck(tracer, signal);
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
// Never let instrumentation break the application
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return signal;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
if (result && typeof result === "object") {
|
|
58
|
+
try {
|
|
59
|
+
recordIntegrityCheck(tracer, result);
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
// Never let instrumentation break the application
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return result;
|
|
66
|
+
};
|
|
67
|
+
state.patched = true;
|
|
68
|
+
}
|
|
69
|
+
/** Remove AIP instrumentation, restoring original methods. */
|
|
70
|
+
export function uninstrumentAIP() {
|
|
71
|
+
if (!state.patched || !state.originalCheck)
|
|
72
|
+
return;
|
|
73
|
+
try {
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
75
|
+
const aipModule = require("@mnemom/agent-integrity-protocol");
|
|
76
|
+
const AIPClient = aipModule.AIPClient ?? aipModule.default?.AIPClient;
|
|
77
|
+
if (AIPClient?.prototype) {
|
|
78
|
+
AIPClient.prototype.check = state.originalCheck;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
// Package not available
|
|
83
|
+
}
|
|
84
|
+
state.originalCheck = null;
|
|
85
|
+
state.patched = false;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=aip-instrumentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aip-instrumentation.js","sourceRoot":"","sources":["../../src/auto/aip-instrumentation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAe,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EA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
+
*/
|
|
8
|
+
import type { Tracer } from "@opentelemetry/api";
|
|
9
|
+
export interface InstrumentOptions {
|
|
10
|
+
tracerProvider?: {
|
|
11
|
+
getTracer: (name: string, version?: string) => Tracer;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/** Instrument both AIP and AAP for automatic span recording. */
|
|
15
|
+
export declare function instrument(options?: InstrumentOptions): void;
|
|
16
|
+
/** Remove all instrumentation. */
|
|
17
|
+
export declare function uninstrument(): void;
|
|
18
|
+
export { instrumentAIP, uninstrumentAIP } from "./aip-instrumentation.js";
|
|
19
|
+
export { instrumentAAP, uninstrumentAAP } from "./aap-instrumentation.js";
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auto/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAIjD,MAAM,WAAW,iBAAiB;IAChC,cAAc,CAAC,EAAE;QAAE,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;KAAE,CAAC;CAC5E;AAED,gEAAgE;AAChE,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAG5D;AAED,kCAAkC;AAClC,wBAAgB,YAAY,IAAI,IAAI,CAGnC;AAED,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-instrumentation entry point.
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* import { instrument } from '@mnemom/aip-otel-exporter/auto';
|
|
6
|
+
* instrument();
|
|
7
|
+
*/
|
|
8
|
+
import { instrumentAIP, uninstrumentAIP } from "./aip-instrumentation.js";
|
|
9
|
+
import { instrumentAAP, uninstrumentAAP } from "./aap-instrumentation.js";
|
|
10
|
+
/** Instrument both AIP and AAP for automatic span recording. */
|
|
11
|
+
export function instrument(options) {
|
|
12
|
+
instrumentAIP(options);
|
|
13
|
+
instrumentAAP(options);
|
|
14
|
+
}
|
|
15
|
+
/** Remove all instrumentation. */
|
|
16
|
+
export function uninstrument() {
|
|
17
|
+
uninstrumentAIP();
|
|
18
|
+
uninstrumentAAP();
|
|
19
|
+
}
|
|
20
|
+
export { instrumentAIP, uninstrumentAIP } from "./aip-instrumentation.js";
|
|
21
|
+
export { instrumentAAP, uninstrumentAAP } from "./aap-instrumentation.js";
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auto/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAM1E,gEAAgE;AAChE,MAAM,UAAU,UAAU,CAAC,OAA2B;IACpD,aAAa,CAAC,OAAO,CAAC,CAAC;IACvB,aAAa,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,kCAAkC;AAClC,MAAM,UAAU,YAAY;IAC1B,eAAe,EAAE,CAAC;IAClB,eAAe,EAAE,CAAC;AACpB,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @mnemom/aip-otel-exporter
|
|
3
|
+
*
|
|
4
|
+
* OpenTelemetry exporter for AIP integrity checkpoints and AAP verification results.
|
|
5
|
+
*
|
|
6
|
+
* Three layers:
|
|
7
|
+
* 1. Manual API (this import) — works everywhere including CF Workers with OTel SDK
|
|
8
|
+
* 2. Auto-instrumentation — import from '@mnemom/aip-otel-exporter/auto'
|
|
9
|
+
* 3. CF Workers adapter — import from '@mnemom/aip-otel-exporter/workers'
|
|
10
|
+
*/
|
|
11
|
+
import type { AIPOTelRecorderConfig, AIPOTelRecorder } from "./types.js";
|
|
12
|
+
/**
|
|
13
|
+
* Create an AIP OTel Recorder instance.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { createAIPOTelRecorder } from '@mnemom/aip-otel-exporter';
|
|
18
|
+
* const recorder = createAIPOTelRecorder({ tracerProvider });
|
|
19
|
+
* recorder.recordIntegrityCheck(signal);
|
|
20
|
+
* recorder.recordVerification(result);
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function createAIPOTelRecorder(config?: AIPOTelRecorderConfig): AIPOTelRecorder;
|
|
24
|
+
export type { AIPOTelRecorderConfig, AIPOTelRecorder, IntegritySignalInput, VerificationResultInput, CoherenceResultInput, DriftAlertInput, ConcernInput, ViolationInput, WarningInput, WindowSummaryInput, CheckpointInput, ConscienceContextInput, AnalysisMetadataInput, VerificationMetadataInput, ValueAlignmentInput, DriftAnalysisInput, IntegrityDriftAlertInput, WorkersExporterConfig, WorkersOTelExporter, } from "./types.js";
|
|
25
|
+
export * from "./attributes.js";
|
|
26
|
+
export { recordIntegrityCheck } from "./manual/record-integrity-check.js";
|
|
27
|
+
export { recordVerification } from "./manual/record-verification.js";
|
|
28
|
+
export { recordCoherence } from "./manual/record-coherence.js";
|
|
29
|
+
export { recordDrift } from "./manual/record-drift.js";
|
|
30
|
+
export { buildSpan } from "./manual/span-builder.js";
|
|
31
|
+
export { createAIPMetrics, recordIntegrityMetrics, recordVerificationMetrics, recordCoherenceMetrics, recordDriftMetrics, } from "./metrics/integrity-metrics.js";
|
|
32
|
+
export type { AIPMetrics } from "./metrics/integrity-metrics.js";
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EAKhB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,CAAC,EAAE,qBAAqB,GAC7B,eAAe,CAsBjB;AAGD,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAGpB,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGrD,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,YAAY,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @mnemom/aip-otel-exporter
|
|
3
|
+
*
|
|
4
|
+
* OpenTelemetry exporter for AIP integrity checkpoints and AAP verification results.
|
|
5
|
+
*
|
|
6
|
+
* Three layers:
|
|
7
|
+
* 1. Manual API (this import) — works everywhere including CF Workers with OTel SDK
|
|
8
|
+
* 2. Auto-instrumentation — import from '@mnemom/aip-otel-exporter/auto'
|
|
9
|
+
* 3. CF Workers adapter — import from '@mnemom/aip-otel-exporter/workers'
|
|
10
|
+
*/
|
|
11
|
+
import { trace } from "@opentelemetry/api";
|
|
12
|
+
import { recordIntegrityCheck } from "./manual/record-integrity-check.js";
|
|
13
|
+
import { recordVerification } from "./manual/record-verification.js";
|
|
14
|
+
import { recordCoherence } from "./manual/record-coherence.js";
|
|
15
|
+
import { recordDrift } from "./manual/record-drift.js";
|
|
16
|
+
/**
|
|
17
|
+
* Create an AIP OTel Recorder instance.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* import { createAIPOTelRecorder } from '@mnemom/aip-otel-exporter';
|
|
22
|
+
* const recorder = createAIPOTelRecorder({ tracerProvider });
|
|
23
|
+
* recorder.recordIntegrityCheck(signal);
|
|
24
|
+
* recorder.recordVerification(result);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export function createAIPOTelRecorder(config) {
|
|
28
|
+
const tracerName = config?.tracerName ?? "@mnemom/aip-otel-exporter";
|
|
29
|
+
const tracerVersion = config?.tracerVersion ?? "0.1.0";
|
|
30
|
+
const tracer = config?.tracerProvider
|
|
31
|
+
? config.tracerProvider.getTracer(tracerName, tracerVersion)
|
|
32
|
+
: trace.getTracer(tracerName, tracerVersion);
|
|
33
|
+
return {
|
|
34
|
+
recordIntegrityCheck(signal) {
|
|
35
|
+
recordIntegrityCheck(tracer, signal);
|
|
36
|
+
},
|
|
37
|
+
recordVerification(result) {
|
|
38
|
+
recordVerification(tracer, result);
|
|
39
|
+
},
|
|
40
|
+
recordCoherence(result) {
|
|
41
|
+
recordCoherence(tracer, result);
|
|
42
|
+
},
|
|
43
|
+
recordDrift(alerts, tracesAnalyzed) {
|
|
44
|
+
recordDrift(tracer, alerts, tracesAnalyzed);
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
// Re-export attribute constants
|
|
49
|
+
export * from "./attributes.js";
|
|
50
|
+
// Re-export manual API functions (for advanced use)
|
|
51
|
+
export { recordIntegrityCheck } from "./manual/record-integrity-check.js";
|
|
52
|
+
export { recordVerification } from "./manual/record-verification.js";
|
|
53
|
+
export { recordCoherence } from "./manual/record-coherence.js";
|
|
54
|
+
export { recordDrift } from "./manual/record-drift.js";
|
|
55
|
+
export { buildSpan } from "./manual/span-builder.js";
|
|
56
|
+
// Re-export metrics
|
|
57
|
+
export { createAIPMetrics, recordIntegrityMetrics, recordVerificationMetrics, recordCoherenceMetrics, recordDriftMetrics, } from "./metrics/integrity-metrics.js";
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,KAAK,EAAe,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAUvD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAA8B;IAE9B,MAAM,UAAU,GAAG,MAAM,EAAE,UAAU,IAAI,2BAA2B,CAAC;IACrE,MAAM,aAAa,GAAG,MAAM,EAAE,aAAa,IAAI,OAAO,CAAC;IAEvD,MAAM,MAAM,GAAW,MAAM,EAAE,cAAc;QAC3C,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,UAAU,EAAE,aAAa,CAAC;QAC5D,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAE/C,OAAO;QACL,oBAAoB,CAAC,MAA4B;YAC/C,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC;QACD,kBAAkB,CAAC,MAA+B;YAChD,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACrC,CAAC;QACD,eAAe,CAAC,MAA4B;YAC1C,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAClC,CAAC;QACD,WAAW,CAAC,MAAyB,EAAE,cAAuB;YAC5D,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;QAC9C,CAAC;KACF,CAAC;AACJ,CAAC;AAyBD,gCAAgC;AAChC,cAAc,iBAAiB,CAAC;AAEhC,oDAAoD;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,oBAAoB;AACpB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Records an AAP CoherenceResult as an OpenTelemetry span.
|
|
3
|
+
*
|
|
4
|
+
* Maps 5 attributes: compatible, score, proceed, matched_count, conflict_count.
|
|
5
|
+
*/
|
|
6
|
+
import type { Span, Tracer } from "@opentelemetry/api";
|
|
7
|
+
import type { CoherenceResultInput } from "../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Record a CoherenceResult as an OTel span with 5 attributes.
|
|
10
|
+
*/
|
|
11
|
+
export declare function recordCoherence(tracer: Tracer, result: CoherenceResultInput): Span;
|
|
12
|
+
//# sourceMappingURL=record-coherence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-coherence.d.ts","sourceRoot":"","sources":["../../src/manual/record-coherence.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAaxD;;GAEG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,oBAAoB,GAC3B,IAAI,CAUN"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Records an AAP CoherenceResult as an OpenTelemetry span.
|
|
3
|
+
*
|
|
4
|
+
* Maps 5 attributes: compatible, score, proceed, matched_count, conflict_count.
|
|
5
|
+
*/
|
|
6
|
+
import { SPAN_AAP_CHECK_COHERENCE, AAP_COHERENCE_COMPATIBLE, AAP_COHERENCE_SCORE, AAP_COHERENCE_PROCEED, AAP_COHERENCE_MATCHED_COUNT, AAP_COHERENCE_CONFLICT_COUNT, } from "../attributes.js";
|
|
7
|
+
import { buildSpan } from "./span-builder.js";
|
|
8
|
+
/**
|
|
9
|
+
* Record a CoherenceResult as an OTel span with 5 attributes.
|
|
10
|
+
*/
|
|
11
|
+
export function recordCoherence(tracer, result) {
|
|
12
|
+
const attributes = {
|
|
13
|
+
[AAP_COHERENCE_COMPATIBLE]: result?.compatible,
|
|
14
|
+
[AAP_COHERENCE_SCORE]: result?.score,
|
|
15
|
+
[AAP_COHERENCE_PROCEED]: result?.proceed,
|
|
16
|
+
[AAP_COHERENCE_MATCHED_COUNT]: result?.value_alignment?.matched?.length,
|
|
17
|
+
[AAP_COHERENCE_CONFLICT_COUNT]: result?.value_alignment?.conflicts?.length,
|
|
18
|
+
};
|
|
19
|
+
return buildSpan(tracer, SPAN_AAP_CHECK_COHERENCE, attributes);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=record-coherence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-coherence.js","sourceRoot":"","sources":["../../src/manual/record-coherence.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,MAAc,EACd,MAA4B;IAE5B,MAAM,UAAU,GAA4B;QAC1C,CAAC,wBAAwB,CAAC,EAAE,MAAM,EAAE,UAAU;QAC9C,CAAC,mBAAmB,CAAC,EAAE,MAAM,EAAE,KAAK;QACpC,CAAC,qBAAqB,CAAC,EAAE,MAAM,EAAE,OAAO;QACxC,CAAC,2BAA2B,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM;QACvE,CAAC,4BAA4B,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM;KAC3E,CAAC;IAEF,OAAO,SAAS,CAAC,MAAM,EAAE,wBAAwB,EAAE,UAAU,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Records AAP drift detection as an OpenTelemetry span.
|
|
3
|
+
*
|
|
4
|
+
* Sets alerts_count and traces_analyzed as span attributes, then emits one
|
|
5
|
+
* EVENT_AAP_DRIFT_ALERT event per alert with type, agent, card, similarity,
|
|
6
|
+
* direction, and recommendation.
|
|
7
|
+
*/
|
|
8
|
+
import type { Span, Tracer } from "@opentelemetry/api";
|
|
9
|
+
import type { DriftAlertInput } from "../types.js";
|
|
10
|
+
/**
|
|
11
|
+
* Record drift detection as an OTel span with per-alert events.
|
|
12
|
+
*/
|
|
13
|
+
export declare function recordDrift(tracer: Tracer, alerts: DriftAlertInput[], tracesAnalyzed?: number): Span;
|
|
14
|
+
//# sourceMappingURL=record-drift.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-drift.d.ts","sourceRoot":"","sources":["../../src/manual/record-drift.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAc,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAWnD;;GAEG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,eAAe,EAAE,EACzB,cAAc,CAAC,EAAE,MAAM,GACtB,IAAI,CAqCN"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Records AAP drift detection as an OpenTelemetry span.
|
|
3
|
+
*
|
|
4
|
+
* Sets alerts_count and traces_analyzed as span attributes, then emits one
|
|
5
|
+
* EVENT_AAP_DRIFT_ALERT event per alert with type, agent, card, similarity,
|
|
6
|
+
* direction, and recommendation.
|
|
7
|
+
*/
|
|
8
|
+
import { SPAN_AAP_DETECT_DRIFT, EVENT_AAP_DRIFT_ALERT, AAP_DRIFT_ALERTS_COUNT, AAP_DRIFT_TRACES_ANALYZED, } from "../attributes.js";
|
|
9
|
+
import { buildSpan } from "./span-builder.js";
|
|
10
|
+
/**
|
|
11
|
+
* Record drift detection as an OTel span with per-alert events.
|
|
12
|
+
*/
|
|
13
|
+
export function recordDrift(tracer, alerts, tracesAnalyzed) {
|
|
14
|
+
const attributes = {
|
|
15
|
+
[AAP_DRIFT_ALERTS_COUNT]: alerts?.length,
|
|
16
|
+
[AAP_DRIFT_TRACES_ANALYZED]: tracesAnalyzed,
|
|
17
|
+
};
|
|
18
|
+
const events = [];
|
|
19
|
+
if (alerts) {
|
|
20
|
+
for (const alert of alerts) {
|
|
21
|
+
events.push({
|
|
22
|
+
name: EVENT_AAP_DRIFT_ALERT,
|
|
23
|
+
attributes: {
|
|
24
|
+
...(alert?.alert_type !== undefined &&
|
|
25
|
+
alert?.alert_type !== null && { alert_type: alert.alert_type }),
|
|
26
|
+
...(alert?.agent_id !== undefined &&
|
|
27
|
+
alert?.agent_id !== null && { agent_id: alert.agent_id }),
|
|
28
|
+
...(alert?.card_id !== undefined &&
|
|
29
|
+
alert?.card_id !== null && { card_id: alert.card_id }),
|
|
30
|
+
...(alert?.analysis?.similarity_score !== undefined &&
|
|
31
|
+
alert?.analysis?.similarity_score !== null && {
|
|
32
|
+
similarity_score: alert.analysis.similarity_score,
|
|
33
|
+
}),
|
|
34
|
+
...(alert?.analysis?.drift_direction !== undefined &&
|
|
35
|
+
alert?.analysis?.drift_direction !== null && {
|
|
36
|
+
drift_direction: alert.analysis.drift_direction,
|
|
37
|
+
}),
|
|
38
|
+
...(alert?.recommendation !== undefined &&
|
|
39
|
+
alert?.recommendation !== null && {
|
|
40
|
+
recommendation: alert.recommendation,
|
|
41
|
+
}),
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return buildSpan(tracer, SPAN_AAP_DETECT_DRIFT, attributes, events);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=record-drift.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-drift.js","sourceRoot":"","sources":["../../src/manual/record-drift.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;GAEG;AACH,MAAM,UAA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,KAAK,EAAE,cAAc,KAAK,IAAI,IAAI;wBAChC,cAAc,EAAE,KAAK,CAAC,cAAc;qBACrC,CAAC;iBACL;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC,MAAM,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Records an AIP IntegritySignal as an OpenTelemetry span.
|
|
3
|
+
*
|
|
4
|
+
* Maps all 22 planned attributes from the checkpoint, signal, analysis_metadata,
|
|
5
|
+
* conscience_context, and window_summary onto a single INTERNAL span.
|
|
6
|
+
* Concerns are emitted as individual span events, and a drift alert event is
|
|
7
|
+
* added when the window summary indicates active drift.
|
|
8
|
+
*/
|
|
9
|
+
import type { Span, Tracer } from "@opentelemetry/api";
|
|
10
|
+
import type { IntegritySignalInput } from "../types.js";
|
|
11
|
+
/**
|
|
12
|
+
* Record an IntegritySignal as an OTel span with all 22 attributes, concern
|
|
13
|
+
* events, and an optional drift alert event.
|
|
14
|
+
*
|
|
15
|
+
* All inputs are duck-typed -- every field is accessed via optional chaining so
|
|
16
|
+
* missing data is silently skipped rather than throwing.
|
|
17
|
+
*/
|
|
18
|
+
export declare function recordIntegrityCheck(tracer: Tracer, signal: IntegritySignalInput): Span;
|
|
19
|
+
//# sourceMappingURL=record-integrity-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-integrity-check.d.ts","sourceRoot":"","sources":["../../src/manual/record-integrity-check.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAc,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AA6CxD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,oBAAoB,GAC3B,IAAI,CAuEN"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Records an AIP IntegritySignal as an OpenTelemetry span.
|
|
3
|
+
*
|
|
4
|
+
* Maps all 22 planned attributes from the checkpoint, signal, analysis_metadata,
|
|
5
|
+
* conscience_context, and window_summary onto a single INTERNAL span.
|
|
6
|
+
* Concerns are emitted as individual span events, and a drift alert event is
|
|
7
|
+
* added when the window summary indicates active drift.
|
|
8
|
+
*/
|
|
9
|
+
import {
|
|
10
|
+
// Span & event names
|
|
11
|
+
SPAN_AIP_INTEGRITY_CHECK, EVENT_AIP_CONCERN, EVENT_AIP_DRIFT_ALERT,
|
|
12
|
+
// Checkpoint attributes
|
|
13
|
+
AIP_INTEGRITY_CHECKPOINT_ID, AIP_INTEGRITY_VERDICT, AIP_INTEGRITY_AGENT_ID, AIP_INTEGRITY_CARD_ID, AIP_INTEGRITY_SESSION_ID, AIP_INTEGRITY_THINKING_HASH,
|
|
14
|
+
// Signal-level attributes
|
|
15
|
+
AIP_INTEGRITY_PROCEED, AIP_INTEGRITY_RECOMMENDED_ACTION, AIP_INTEGRITY_CONCERNS_COUNT,
|
|
16
|
+
// Analysis metadata attributes
|
|
17
|
+
AIP_INTEGRITY_ANALYSIS_MODEL, AIP_INTEGRITY_ANALYSIS_DURATION_MS, AIP_INTEGRITY_THINKING_TOKENS, AIP_INTEGRITY_TRUNCATED, AIP_INTEGRITY_EXTRACTION_CONFIDENCE,
|
|
18
|
+
// Conscience context attributes
|
|
19
|
+
AIP_CONSCIENCE_CONSULTATION_DEPTH, AIP_CONSCIENCE_VALUES_CHECKED_COUNT, AIP_CONSCIENCE_CONFLICTS_COUNT,
|
|
20
|
+
// Window summary attributes
|
|
21
|
+
AIP_WINDOW_SIZE, AIP_WINDOW_INTEGRITY_RATIO, AIP_WINDOW_DRIFT_ALERT_ACTIVE,
|
|
22
|
+
// GenAI forward-compat aliases
|
|
23
|
+
GEN_AI_EVALUATION_VERDICT, GEN_AI_EVALUATION_SCORE, } from "../attributes.js";
|
|
24
|
+
import { buildSpan } from "./span-builder.js";
|
|
25
|
+
/**
|
|
26
|
+
* Record an IntegritySignal as an OTel span with all 22 attributes, concern
|
|
27
|
+
* events, and an optional drift alert event.
|
|
28
|
+
*
|
|
29
|
+
* All inputs are duck-typed -- every field is accessed via optional chaining so
|
|
30
|
+
* missing data is silently skipped rather than throwing.
|
|
31
|
+
*/
|
|
32
|
+
export function recordIntegrityCheck(tracer, signal) {
|
|
33
|
+
const cp = signal?.checkpoint;
|
|
34
|
+
const meta = cp?.analysis_metadata;
|
|
35
|
+
const conscience = cp?.conscience_context;
|
|
36
|
+
const win = signal?.window_summary;
|
|
37
|
+
// --- Attributes (22 domain + 2 GenAI aliases) ---
|
|
38
|
+
const attributes = {
|
|
39
|
+
// Checkpoint
|
|
40
|
+
[AIP_INTEGRITY_CHECKPOINT_ID]: cp?.checkpoint_id,
|
|
41
|
+
[AIP_INTEGRITY_VERDICT]: cp?.verdict,
|
|
42
|
+
[AIP_INTEGRITY_AGENT_ID]: cp?.agent_id,
|
|
43
|
+
[AIP_INTEGRITY_CARD_ID]: cp?.card_id,
|
|
44
|
+
[AIP_INTEGRITY_SESSION_ID]: cp?.session_id,
|
|
45
|
+
[AIP_INTEGRITY_THINKING_HASH]: cp?.thinking_block_hash,
|
|
46
|
+
// Signal
|
|
47
|
+
[AIP_INTEGRITY_PROCEED]: signal?.proceed,
|
|
48
|
+
[AIP_INTEGRITY_RECOMMENDED_ACTION]: signal?.recommended_action,
|
|
49
|
+
[AIP_INTEGRITY_CONCERNS_COUNT]: cp?.concerns?.length,
|
|
50
|
+
// Analysis metadata
|
|
51
|
+
[AIP_INTEGRITY_ANALYSIS_MODEL]: meta?.analysis_model,
|
|
52
|
+
[AIP_INTEGRITY_ANALYSIS_DURATION_MS]: meta?.analysis_duration_ms,
|
|
53
|
+
[AIP_INTEGRITY_THINKING_TOKENS]: meta?.thinking_tokens_original,
|
|
54
|
+
[AIP_INTEGRITY_TRUNCATED]: meta?.truncated,
|
|
55
|
+
[AIP_INTEGRITY_EXTRACTION_CONFIDENCE]: meta?.extraction_confidence,
|
|
56
|
+
// Conscience context
|
|
57
|
+
[AIP_CONSCIENCE_CONSULTATION_DEPTH]: conscience?.consultation_depth,
|
|
58
|
+
[AIP_CONSCIENCE_VALUES_CHECKED_COUNT]: conscience?.values_checked?.length,
|
|
59
|
+
[AIP_CONSCIENCE_CONFLICTS_COUNT]: conscience?.conflicts?.length,
|
|
60
|
+
// Window summary
|
|
61
|
+
[AIP_WINDOW_SIZE]: win?.size,
|
|
62
|
+
[AIP_WINDOW_INTEGRITY_RATIO]: win?.integrity_ratio,
|
|
63
|
+
[AIP_WINDOW_DRIFT_ALERT_ACTIVE]: win?.drift_alert_active,
|
|
64
|
+
// GenAI SIG forward-compat aliases
|
|
65
|
+
[GEN_AI_EVALUATION_VERDICT]: cp?.verdict,
|
|
66
|
+
[GEN_AI_EVALUATION_SCORE]: win?.integrity_ratio,
|
|
67
|
+
};
|
|
68
|
+
// --- Events ---
|
|
69
|
+
const events = [];
|
|
70
|
+
// One event per concern
|
|
71
|
+
if (cp?.concerns) {
|
|
72
|
+
for (const concern of cp.concerns) {
|
|
73
|
+
events.push({
|
|
74
|
+
name: EVENT_AIP_CONCERN,
|
|
75
|
+
attributes: {
|
|
76
|
+
category: concern.category,
|
|
77
|
+
severity: concern.severity,
|
|
78
|
+
description: concern.description,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
// Drift alert event when drift is active
|
|
84
|
+
if (win?.drift_alert_active) {
|
|
85
|
+
events.push({
|
|
86
|
+
name: EVENT_AIP_DRIFT_ALERT,
|
|
87
|
+
attributes: {},
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return buildSpan(tracer, SPAN_AIP_INTEGRITY_CHECK, attributes, events);
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=record-integrity-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-integrity-check.js","sourceRoot":"","sources":["../../src/manual/record-integrity-check.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO;AACL,qBAAqB;AACrB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB;AAErB,wBAAwB;AACxB,2BAA2B,EAC3B,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,2BAA2B;AAE3B,0BAA0B;AAC1B,qBAAqB,EACrB,gCAAgC,EAChC,4BAA4B;AAE5B,+BAA+B;AAC/B,4BAA4B,EAC5B,kCAAkC,EAClC,6BAA6B,EAC7B,uBAAuB,EACvB,mCAAmC;AAEnC,gCAAgC;AAChC,iCAAiC,EACjC,mCAAmC,EACnC,8BAA8B;AAE9B,4BAA4B;AAC5B,eAAe,EACf,0BAA0B,EAC1B,6BAA6B;AAE7B,+BAA+B;AAC/B,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAc,EACd,MAA4B;IAE5B,MAAM,EAAE,GAAG,MAAM,EAAE,UAAU,CAAC;IAC9B,MAAM,IAAI,GAAG,EAAE,EAAE,iBAAiB,CAAC;IACnC,MAAM,UAAU,GAAG,EAAE,EAAE,kBAAkB,CAAC;IAC1C,MAAM,GAAG,GAAG,MAAM,EAAE,cAAc,CAAC;IAEnC,mDAAmD;IAEnD,MAAM,UAAU,GAA4B;QAC1C,aAAa;QACb,CAAC,2BAA2B,CAAC,EAAE,EAAE,EAAE,aAAa;QAChD,CAAC,qBAAqB,CAAC,EAAE,EAAE,EAAE,OAAO;QACpC,CAAC,sBAAsB,CAAC,EAAE,EAAE,EAAE,QAAQ;QACtC,CAAC,qBAAqB,CAAC,EAAE,EAAE,EAAE,OAAO;QAC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