@osfactory/otel-hook 0.10.0 → 0.11.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 +82 -3
- package/dist/{adapter-B9RwW6TO.d.ts → adapter-DiLknaTF.d.ts} +1 -1
- package/dist/cli.js +1131 -77
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +11 -4
- package/dist/config.js +100 -18
- package/dist/config.js.map +1 -1
- package/dist/{destinations-DWOkVxV1.d.ts → destinations-BIl3gGzx.d.ts} +12 -2
- package/dist/diagnostics.d.ts +1 -1
- package/dist/diagnostics.js.map +1 -1
- package/dist/{export-destinations-lORbe25J.d.ts → export-destinations-QWKGGEjk.d.ts} +130 -5
- package/dist/{filesystem-store-DX3dGIgu.d.ts → filesystem-store-D3SCNmbX.d.ts} +1 -1
- package/dist/{hook-BAxXoKsp.d.ts → hook-BOecWGSz.d.ts} +4 -4
- package/dist/index.d.ts +14 -14
- package/dist/index.js +1114 -90
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +3 -3
- package/dist/integration.d.ts +29 -11
- package/dist/integration.js +1117 -154
- package/dist/integration.js.map +1 -1
- package/dist/lifecycle.d.ts +54 -3
- package/dist/lifecycle.js +270 -4
- package/dist/lifecycle.js.map +1 -1
- package/dist/{memory-aJilVG4R.d.ts → memory-Cs51jyRk.d.ts} +1 -1
- package/dist/{semconv-Dw7gcQcg.d.ts → metric-model-DDnWxL9d.d.ts} +154 -2
- package/dist/{payload-D7gc0-WQ.d.ts → payload-ChtrEX6A.d.ts} +1 -1
- package/dist/{ports-plO5MKrY.d.ts → ports-CeqLq31i.d.ts} +24 -0
- package/dist/providers.d.ts +8 -8
- package/dist/{registry-C7XO4DzD.d.ts → registry-CcJNF3WY.d.ts} +2 -2
- package/dist/runtime.d.ts +7 -7
- package/dist/runtime.js +55 -9
- package/dist/runtime.js.map +1 -1
- package/dist/{schema-CHb3GU1r.d.ts → schema-DMnoU1V_.d.ts} +64 -1
- package/dist/state.d.ts +3 -3
- package/dist/state.js +23 -0
- package/dist/state.js.map +1 -1
- package/dist/telemetry.d.ts +5 -5
- package/dist/telemetry.js +860 -17
- package/dist/telemetry.js.map +1 -1
- package/dist/testing.d.ts +8 -8
- package/dist/testing.js +55 -9
- package/dist/testing.js.map +1 -1
- package/package.json +3 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { E as ExporterPolicy } from './schema-
|
|
2
|
+
import { E as ExporterPolicy } from './schema-DMnoU1V_.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Export destinations: one batch, several OTLP endpoints.
|
|
@@ -35,6 +35,7 @@ declare const HEADER_ENV_REFERENCE_PREFIX = "env:";
|
|
|
35
35
|
declare const exportSignalSchema: z.ZodEnum<{
|
|
36
36
|
traces: "traces";
|
|
37
37
|
logs: "logs";
|
|
38
|
+
metrics: "metrics";
|
|
38
39
|
}>;
|
|
39
40
|
type ExportSignal = z.infer<typeof exportSignalSchema>;
|
|
40
41
|
declare const exportDestinationSchema: z.ZodObject<{
|
|
@@ -43,6 +44,7 @@ declare const exportDestinationSchema: z.ZodObject<{
|
|
|
43
44
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
44
45
|
tracesEndpoint: z.ZodOptional<z.ZodString>;
|
|
45
46
|
logsEndpoint: z.ZodOptional<z.ZodString>;
|
|
47
|
+
metricsEndpoint: z.ZodOptional<z.ZodString>;
|
|
46
48
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
47
49
|
none: "none";
|
|
48
50
|
"http/protobuf": "http/protobuf";
|
|
@@ -52,15 +54,19 @@ declare const exportDestinationSchema: z.ZodObject<{
|
|
|
52
54
|
signals: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
53
55
|
traces: "traces";
|
|
54
56
|
logs: "logs";
|
|
57
|
+
metrics: "metrics";
|
|
55
58
|
}>>>>;
|
|
56
59
|
}, z.core.$strict>;
|
|
57
60
|
type ExportDestinationConfig = z.infer<typeof exportDestinationSchema>;
|
|
61
|
+
/** Signals a destination receives when it does not list any: never metrics. */
|
|
62
|
+
declare const DEFAULT_DESTINATION_SIGNALS: readonly ExportSignal[];
|
|
58
63
|
declare const exportDestinationsSchema: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
59
64
|
name: z.ZodString;
|
|
60
65
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
61
66
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
62
67
|
tracesEndpoint: z.ZodOptional<z.ZodString>;
|
|
63
68
|
logsEndpoint: z.ZodOptional<z.ZodString>;
|
|
69
|
+
metricsEndpoint: z.ZodOptional<z.ZodString>;
|
|
64
70
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
65
71
|
none: "none";
|
|
66
72
|
"http/protobuf": "http/protobuf";
|
|
@@ -70,6 +76,7 @@ declare const exportDestinationsSchema: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
|
70
76
|
signals: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
71
77
|
traces: "traces";
|
|
72
78
|
logs: "logs";
|
|
79
|
+
metrics: "metrics";
|
|
73
80
|
}>>>>;
|
|
74
81
|
}, z.core.$strict>>>;
|
|
75
82
|
/**
|
|
@@ -107,9 +114,11 @@ type ExportDestination = {
|
|
|
107
114
|
readonly endpoint?: string;
|
|
108
115
|
readonly tracesEndpoint?: string;
|
|
109
116
|
readonly logsEndpoint?: string;
|
|
117
|
+
readonly metricsEndpoint?: string;
|
|
110
118
|
readonly signals: {
|
|
111
119
|
readonly traces: boolean;
|
|
112
120
|
readonly logs: boolean;
|
|
121
|
+
readonly metrics: boolean;
|
|
113
122
|
};
|
|
114
123
|
readonly headers: Readonly<Record<string, string>>;
|
|
115
124
|
};
|
|
@@ -158,6 +167,7 @@ type DestinationDescription = {
|
|
|
158
167
|
readonly signals: readonly ExportSignal[];
|
|
159
168
|
readonly tracesEndpointOrigin?: string;
|
|
160
169
|
readonly logsEndpointOrigin?: string;
|
|
170
|
+
readonly metricsEndpointOrigin?: string;
|
|
161
171
|
readonly headerNames: readonly string[];
|
|
162
172
|
/** Environment variables this destination's headers reference. */
|
|
163
173
|
readonly headerVariables: readonly string[];
|
|
@@ -166,4 +176,4 @@ declare const endpointOrigin: (endpoint: string | undefined) => string | undefin
|
|
|
166
176
|
/** Every configured destination, disabled ones included, for `doctor` and snapshots. */
|
|
167
177
|
declare const describeExportDestinations: (exporter: ExporterPolicy) => readonly DestinationDescription[];
|
|
168
178
|
|
|
169
|
-
export { DEFAULT_DESTINATION_NAME as D, type ExportDestination as E, HEADER_ENV_REFERENCE_PREFIX as H, MAX_DESTINATION_HEADERS as M, type ResolvedDestinationHeaders as R, type SpoolPolicy as S,
|
|
179
|
+
export { DEFAULT_DESTINATION_NAME as D, type ExportDestination as E, HEADER_ENV_REFERENCE_PREFIX as H, MAX_DESTINATION_HEADERS as M, type ResolvedDestinationHeaders as R, type SpoolPolicy as S, DEFAULT_DESTINATION_SIGNALS as a, DEFAULT_SPOOL_POLICY as b, DESTINATION_NAME_PATTERN as c, type DestinationDescription as d, type ExportDestinationConfig as e, type ExportSignal as f, type HeaderValueReference as g, MAX_EXPORT_DESTINATIONS as h, describeExportDestinations as i, effectiveSpoolPolicy as j, endpointOrigin as k, exportDestinationSchema as l, exportDestinationsSchema as m, exportSignalSchema as n, hasConfiguredDestinations as o, parseHeaderValueReference as p, resolveExportDestinations as q, resolveDestinationHeaders as r, spoolPolicySchema as s };
|
package/dist/diagnostics.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import 'zod';
|
|
|
11
11
|
* is broken. `telemetry-sink` remains the traces signal, unrenamed, so an existing
|
|
12
12
|
* `doctor --json` consumer keeps reading the same field.
|
|
13
13
|
*/
|
|
14
|
-
type DeliverySubsystem = "state-store" | "telemetry-sink" | "telemetry-log-sink" | "lifecycle";
|
|
14
|
+
type DeliverySubsystem = "state-store" | "telemetry-sink" | "telemetry-log-sink" | "telemetry-metric-sink" | "lifecycle";
|
|
15
15
|
/**
|
|
16
16
|
* Sanitized delivery health.
|
|
17
17
|
*
|
package/dist/diagnostics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/diagnostics/health.ts"],"sourcesContent":["import type { OtelHookErrorCode } from \"../errors/index.js\";\nimport type { EpochMillis } from \"../model/primitives.js\";\n\n/**\n * One tracked delivery path.\n *\n * The two telemetry signals are separate subsystems because they fail\n * independently — a collector with no logs receiver leaves traces perfectly\n * healthy — and a single combined verdict would make an operator bisect which one\n * is broken. `telemetry-sink` remains the traces signal, unrenamed, so an existing\n * `doctor --json` consumer keeps reading the same field.\n */\nexport type DeliverySubsystem =\n | \"state-store\"\n | \"telemetry-sink\"\n | \"telemetry-log-sink\"\n | \"lifecycle\";\n\n/**\n * Sanitized delivery health.\n *\n * Every field is a count, a timestamp, a boolean, or a closed-vocabulary error\n * code — the same restriction the privacy service applies to everything else\n * that might reach a sink, so a health snapshot is itself safe to export or log\n * without a second review.\n */\nexport type DeliveryHealthSnapshot = {\n readonly subsystem: DeliverySubsystem;\n readonly healthy: boolean;\n readonly totalAccepted: number;\n readonly totalRejected: number;\n readonly consecutiveFailures: number;\n readonly lastSuccessAt?: EpochMillis;\n readonly lastFailureAt?: EpochMillis;\n readonly lastErrorCode?: OtelHookErrorCode;\n /**\n * Export destination this snapshot describes. Present only when\n * `exporter.destinations` is in use, so a single-destination snapshot is\n * unchanged.\n */\n readonly destination?: string;\n};\n\nexport type HealthTrackerOptions = {\n /** Consecutive failures at or beyond this count flip `healthy` to false. Default 3. */\n readonly unhealthyAfterConsecutiveFailures?: number;\n /** Labels every snapshot with an export destination name. */\n readonly destination?: string;\n};\n\n/**\n * Accumulates success/failure counts for one subsystem instance.\n *\n * Deliberately per-instance rather than a module-level registry: a store or\n * sink constructs its own tracker and exposes a `health()` accessor, so two\n * instances in one process never share counters (see ADR 0001 on module-level\n * identity).\n */\nexport interface HealthTracker {\n recordSuccess(count?: number, at?: number): void;\n recordFailure(code: OtelHookErrorCode, count?: number, at?: number): void;\n snapshot(): DeliveryHealthSnapshot;\n}\n\nexport const createHealthTracker = (\n subsystem: DeliverySubsystem,\n options: HealthTrackerOptions = {},\n): HealthTracker => {\n const unhealthyThreshold = options.unhealthyAfterConsecutiveFailures ?? 3;\n let totalAccepted = 0;\n let totalRejected = 0;\n let consecutiveFailures = 0;\n let lastSuccessAt: number | undefined;\n let lastFailureAt: number | undefined;\n let lastErrorCode: OtelHookErrorCode | undefined;\n\n return {\n recordSuccess: (count = 1, at?: number): void => {\n totalAccepted += count;\n consecutiveFailures = 0;\n if (at !== undefined) {\n lastSuccessAt = at;\n }\n },\n recordFailure: (code: OtelHookErrorCode, count = 1, at?: number): void => {\n totalRejected += count;\n consecutiveFailures += 1;\n lastErrorCode = code;\n if (at !== undefined) {\n lastFailureAt = at;\n }\n },\n snapshot: (): DeliveryHealthSnapshot => ({\n subsystem,\n healthy: consecutiveFailures < unhealthyThreshold,\n totalAccepted,\n totalRejected,\n consecutiveFailures,\n ...(lastSuccessAt === undefined ? {} : { lastSuccessAt }),\n ...(lastFailureAt === undefined ? {} : { lastFailureAt }),\n ...(lastErrorCode === undefined ? {} : { lastErrorCode }),\n ...(options.destination === undefined ? {} : { destination: options.destination }),\n }),\n };\n};\n\nexport type OverallHealth = {\n readonly healthy: boolean;\n readonly subsystems: readonly DeliveryHealthSnapshot[];\n};\n\n/** Combines snapshots from every configured subsystem into one overall verdict. */\nexport const summarizeHealth = (snapshots: readonly DeliveryHealthSnapshot[]): OverallHealth => ({\n healthy: snapshots.every((snapshot) => snapshot.healthy),\n subsystems: [...snapshots],\n});\n"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../src/diagnostics/health.ts"],"sourcesContent":["import type { OtelHookErrorCode } from \"../errors/index.js\";\nimport type { EpochMillis } from \"../model/primitives.js\";\n\n/**\n * One tracked delivery path.\n *\n * The two telemetry signals are separate subsystems because they fail\n * independently — a collector with no logs receiver leaves traces perfectly\n * healthy — and a single combined verdict would make an operator bisect which one\n * is broken. `telemetry-sink` remains the traces signal, unrenamed, so an existing\n * `doctor --json` consumer keeps reading the same field.\n */\nexport type DeliverySubsystem =\n | \"state-store\"\n | \"telemetry-sink\"\n | \"telemetry-log-sink\"\n | \"telemetry-metric-sink\"\n | \"lifecycle\";\n\n/**\n * Sanitized delivery health.\n *\n * Every field is a count, a timestamp, a boolean, or a closed-vocabulary error\n * code — the same restriction the privacy service applies to everything else\n * that might reach a sink, so a health snapshot is itself safe to export or log\n * without a second review.\n */\nexport type DeliveryHealthSnapshot = {\n readonly subsystem: DeliverySubsystem;\n readonly healthy: boolean;\n readonly totalAccepted: number;\n readonly totalRejected: number;\n readonly consecutiveFailures: number;\n readonly lastSuccessAt?: EpochMillis;\n readonly lastFailureAt?: EpochMillis;\n readonly lastErrorCode?: OtelHookErrorCode;\n /**\n * Export destination this snapshot describes. Present only when\n * `exporter.destinations` is in use, so a single-destination snapshot is\n * unchanged.\n */\n readonly destination?: string;\n};\n\nexport type HealthTrackerOptions = {\n /** Consecutive failures at or beyond this count flip `healthy` to false. Default 3. */\n readonly unhealthyAfterConsecutiveFailures?: number;\n /** Labels every snapshot with an export destination name. */\n readonly destination?: string;\n};\n\n/**\n * Accumulates success/failure counts for one subsystem instance.\n *\n * Deliberately per-instance rather than a module-level registry: a store or\n * sink constructs its own tracker and exposes a `health()` accessor, so two\n * instances in one process never share counters (see ADR 0001 on module-level\n * identity).\n */\nexport interface HealthTracker {\n recordSuccess(count?: number, at?: number): void;\n recordFailure(code: OtelHookErrorCode, count?: number, at?: number): void;\n snapshot(): DeliveryHealthSnapshot;\n}\n\nexport const createHealthTracker = (\n subsystem: DeliverySubsystem,\n options: HealthTrackerOptions = {},\n): HealthTracker => {\n const unhealthyThreshold = options.unhealthyAfterConsecutiveFailures ?? 3;\n let totalAccepted = 0;\n let totalRejected = 0;\n let consecutiveFailures = 0;\n let lastSuccessAt: number | undefined;\n let lastFailureAt: number | undefined;\n let lastErrorCode: OtelHookErrorCode | undefined;\n\n return {\n recordSuccess: (count = 1, at?: number): void => {\n totalAccepted += count;\n consecutiveFailures = 0;\n if (at !== undefined) {\n lastSuccessAt = at;\n }\n },\n recordFailure: (code: OtelHookErrorCode, count = 1, at?: number): void => {\n totalRejected += count;\n consecutiveFailures += 1;\n lastErrorCode = code;\n if (at !== undefined) {\n lastFailureAt = at;\n }\n },\n snapshot: (): DeliveryHealthSnapshot => ({\n subsystem,\n healthy: consecutiveFailures < unhealthyThreshold,\n totalAccepted,\n totalRejected,\n consecutiveFailures,\n ...(lastSuccessAt === undefined ? {} : { lastSuccessAt }),\n ...(lastFailureAt === undefined ? {} : { lastFailureAt }),\n ...(lastErrorCode === undefined ? {} : { lastErrorCode }),\n ...(options.destination === undefined ? {} : { destination: options.destination }),\n }),\n };\n};\n\nexport type OverallHealth = {\n readonly healthy: boolean;\n readonly subsystems: readonly DeliveryHealthSnapshot[];\n};\n\n/** Combines snapshots from every configured subsystem into one overall verdict. */\nexport const summarizeHealth = (snapshots: readonly DeliveryHealthSnapshot[]): OverallHealth => ({\n healthy: snapshots.every((snapshot) => snapshot.healthy),\n subsystems: [...snapshots],\n});\n"],"mappings":";AAiEO,IAAM,sBAAsB,CACjC,WACA,UAAgC,CAAC,MACf;AAClB,QAAM,qBAAqB,QAAQ,qCAAqC;AACxE,MAAI,gBAAgB;AACpB,MAAI,gBAAgB;AACpB,MAAI,sBAAsB;AAC1B,MAAI;AACJ,MAAI;AACJ,MAAI;AAEJ,SAAO;AAAA,IACL,eAAe,CAAC,QAAQ,GAAG,OAAsB;AAC/C,uBAAiB;AACjB,4BAAsB;AACtB,UAAI,OAAO,QAAW;AACpB,wBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,eAAe,CAAC,MAAyB,QAAQ,GAAG,OAAsB;AACxE,uBAAiB;AACjB,6BAAuB;AACvB,sBAAgB;AAChB,UAAI,OAAO,QAAW;AACpB,wBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,IACA,UAAU,OAA+B;AAAA,MACvC;AAAA,MACA,SAAS,sBAAsB;AAAA,MAC/B;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAI,kBAAkB,SAAY,CAAC,IAAI,EAAE,cAAc;AAAA,MACvD,GAAI,kBAAkB,SAAY,CAAC,IAAI,EAAE,cAAc;AAAA,MACvD,GAAI,kBAAkB,SAAY,CAAC,IAAI,EAAE,cAAc;AAAA,MACvD,GAAI,QAAQ,gBAAgB,SAAY,CAAC,IAAI,EAAE,aAAa,QAAQ,YAAY;AAAA,IAClF;AAAA,EACF;AACF;AAQO,IAAM,kBAAkB,CAAC,eAAiE;AAAA,EAC/F,SAAS,UAAU,MAAM,CAAC,aAAa,SAAS,OAAO;AAAA,EACvD,YAAY,CAAC,GAAG,SAAS;AAC3B;","names":[]}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { E as ExportDestination } from './destinations-
|
|
2
|
-
import { E as ExporterPolicy } from './schema-
|
|
3
|
-
import { C as Clock, d as Logger, i as TelemetrySink } from './ports-
|
|
1
|
+
import { E as ExportDestination } from './destinations-BIl3gGzx.js';
|
|
2
|
+
import { E as ExporterPolicy } from './schema-DMnoU1V_.js';
|
|
3
|
+
import { C as Clock, d as Logger, i as TelemetrySink } from './ports-CeqLq31i.js';
|
|
4
4
|
import { Attributes } from '@opentelemetry/api';
|
|
5
5
|
import { S as StoreNamespace } from './keys-Dej5bN3L.js';
|
|
6
|
+
import { n as SpanCorrelationResolver, m as SpanCorrelation, k as MetricPoint } from './metric-model-DDnWxL9d.js';
|
|
6
7
|
import { InstrumentationScope } from '@opentelemetry/core';
|
|
7
8
|
import { Resource } from '@opentelemetry/resources';
|
|
8
9
|
import { ReadableLogRecord } from '@opentelemetry/sdk-logs';
|
|
9
10
|
import { b as ContentFact } from './content-M9xIKG7h.js';
|
|
10
11
|
import { b as CanonicalEvent, e as CanonicalEventType } from './events-CSD_YiJ2.js';
|
|
11
|
-
import { b as SpanCorrelationResolver, a as SpanCorrelation } from './semconv-Dw7gcQcg.js';
|
|
12
12
|
import { DeliveryHealthSnapshot } from './diagnostics.js';
|
|
13
|
+
import { OtelHookErrorInfo } from './errors.js';
|
|
13
14
|
|
|
14
15
|
type SpoolEnqueueResult = {
|
|
15
16
|
readonly spooled: true;
|
|
@@ -73,6 +74,12 @@ type SpoolOverflowPolicy = "refuse-new" | "drop-oldest";
|
|
|
73
74
|
* stopping the drain behind it.
|
|
74
75
|
*/
|
|
75
76
|
type SpoolSendOutcome = boolean | "discard";
|
|
77
|
+
/** Outcome of validating one batch read back from a queue file. */
|
|
78
|
+
type SpoolValidation<TBatch> = {
|
|
79
|
+
readonly batch: TBatch;
|
|
80
|
+
} | {
|
|
81
|
+
readonly rejection: string;
|
|
82
|
+
};
|
|
76
83
|
|
|
77
84
|
type SerializedSpan = {
|
|
78
85
|
readonly name: string;
|
|
@@ -609,6 +616,120 @@ declare const createSignalFanout: (options: SignalFanoutOptions) => SignalFanout
|
|
|
609
616
|
*/
|
|
610
617
|
declare const shareCorrelationPerBatch: (correlate: SpanCorrelationResolver) => SpanCorrelationResolver;
|
|
611
618
|
|
|
619
|
+
/**
|
|
620
|
+
* A batch of metric points a destination could not take, kept for the next
|
|
621
|
+
* invocation.
|
|
622
|
+
*
|
|
623
|
+
* Points are plain JSON (`MetricPoint`), so a batch replays without the process
|
|
624
|
+
* that recorded it. A cumulative point is a snapshot of a running total: replaying
|
|
625
|
+
* an old one after a newer one was delivered restates an earlier value with an
|
|
626
|
+
* earlier timestamp, which a receiver orders by time rather than adding.
|
|
627
|
+
*/
|
|
628
|
+
type MetricSpoolBatch = {
|
|
629
|
+
readonly providerId: string;
|
|
630
|
+
readonly installationId: string;
|
|
631
|
+
readonly resourceAttributes: Attributes;
|
|
632
|
+
readonly instrumentationScope: {
|
|
633
|
+
readonly name: string;
|
|
634
|
+
readonly version?: string;
|
|
635
|
+
};
|
|
636
|
+
readonly points: readonly MetricPoint[];
|
|
637
|
+
readonly enqueuedAt: number;
|
|
638
|
+
};
|
|
639
|
+
declare const validateMetricSpoolBatch: (value: unknown, identity: StoreNamespace) => SpoolValidation<MetricSpoolBatch>;
|
|
640
|
+
interface DurableMetricSpool {
|
|
641
|
+
enqueue(batch: MetricSpoolBatch): Promise<SpoolEnqueueResult>;
|
|
642
|
+
drain(send: (batch: MetricSpoolBatch) => Promise<SpoolSendOutcome>, options?: {
|
|
643
|
+
readonly maxBatches?: number;
|
|
644
|
+
}): Promise<SpoolDrainResult>;
|
|
645
|
+
size(): Promise<number>;
|
|
646
|
+
stats?(): Promise<SpoolStats>;
|
|
647
|
+
}
|
|
648
|
+
type DurableMetricSpoolOptions = StoreNamespace & {
|
|
649
|
+
readonly rootDir: string;
|
|
650
|
+
readonly clock: Clock;
|
|
651
|
+
readonly logger?: Logger;
|
|
652
|
+
readonly maxSpoolFiles?: number;
|
|
653
|
+
/** Queue directory below the identity namespace. Default `spool-metrics`. */
|
|
654
|
+
readonly queueName?: string;
|
|
655
|
+
readonly maxBytes?: number;
|
|
656
|
+
readonly maxAgeMillis?: number;
|
|
657
|
+
readonly overflow?: SpoolOverflowPolicy;
|
|
658
|
+
};
|
|
659
|
+
/** Durable queue for metric batches, in its own directory beside the trace and log spools. */
|
|
660
|
+
declare const createFileDurableMetricSpool: (options: DurableMetricSpoolOptions) => DurableMetricSpool;
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* OTLP HTTP/protobuf sink for hook-derived metrics (issue #69).
|
|
664
|
+
*
|
|
665
|
+
* Unlike the trace and log sinks, it does not take canonical events: the points it
|
|
666
|
+
* sends are already aggregated (see `metric-model.ts` and
|
|
667
|
+
* `lifecycle/metric-series.ts`), because cumulative aggregation needs state the
|
|
668
|
+
* telemetry layer must not own. This module only encodes, sends, spools what a
|
|
669
|
+
* destination could not take, and replays the spool on flush.
|
|
670
|
+
*
|
|
671
|
+
* There is deliberately no `MeterProvider` and no periodic reader. A hook process
|
|
672
|
+
* lives for one callback; a reader that collects on an interval would either never
|
|
673
|
+
* fire or hold the process open. Points are exported once, right after the
|
|
674
|
+
* callback's telemetry, inside the same bounded flush window.
|
|
675
|
+
*
|
|
676
|
+
* Fails open like the other sinks: every failure is a diagnostic, never a throw.
|
|
677
|
+
*/
|
|
678
|
+
type MetricsEndpointResolution = {
|
|
679
|
+
readonly endpoint: string;
|
|
680
|
+
readonly derived: boolean;
|
|
681
|
+
} | {
|
|
682
|
+
readonly unresolvable: "no-endpoint";
|
|
683
|
+
};
|
|
684
|
+
/**
|
|
685
|
+
* Where metric points are posted: `metrics.endpoint` as stated, else the traces
|
|
686
|
+
* endpoint with `/v1/traces` swapped for `/v1/metrics` (or `/v1/metrics` appended
|
|
687
|
+
* to a base URL).
|
|
688
|
+
*/
|
|
689
|
+
declare const resolveMetricsEndpoint: (exporter: ExporterPolicy) => MetricsEndpointResolution;
|
|
690
|
+
type MetricsDeliverability = {
|
|
691
|
+
readonly status: "configured";
|
|
692
|
+
readonly endpoint: string;
|
|
693
|
+
readonly derivedEndpoint: boolean;
|
|
694
|
+
} | {
|
|
695
|
+
readonly status: "disabled";
|
|
696
|
+
readonly reason: "metrics-disabled" | "exporter-disabled" | "protocol-none" | "protocol-unsupported" | "no-endpoint";
|
|
697
|
+
};
|
|
698
|
+
declare const describeMetricsDeliverability: (exporter: ExporterPolicy) => MetricsDeliverability;
|
|
699
|
+
type MetricExportResult = {
|
|
700
|
+
/** Points delivered or spooled. */
|
|
701
|
+
readonly accepted: number;
|
|
702
|
+
readonly rejected: number;
|
|
703
|
+
readonly errors: readonly OtelHookErrorInfo[];
|
|
704
|
+
};
|
|
705
|
+
interface OtlpMetricTelemetrySink {
|
|
706
|
+
/** Whether this sink sends anything. A disabled sink accepts nothing and reports nothing. */
|
|
707
|
+
readonly enabled: boolean;
|
|
708
|
+
exportPoints(points: readonly MetricPoint[]): Promise<MetricExportResult>;
|
|
709
|
+
/** Replays spooled batches; bounded, best-effort, never throws. */
|
|
710
|
+
flush(): Promise<void>;
|
|
711
|
+
shutdown(): Promise<void>;
|
|
712
|
+
health(): DeliveryHealthSnapshot;
|
|
713
|
+
drainSpool(maxBatches?: number): Promise<{
|
|
714
|
+
readonly drained: number;
|
|
715
|
+
readonly remaining: number;
|
|
716
|
+
readonly failed: number;
|
|
717
|
+
}>;
|
|
718
|
+
}
|
|
719
|
+
type OtlpMetricSinkOptions = {
|
|
720
|
+
readonly exporter: ExporterPolicy;
|
|
721
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
722
|
+
readonly providerId: string;
|
|
723
|
+
readonly installationId: string;
|
|
724
|
+
readonly clock: Clock;
|
|
725
|
+
readonly logger?: Logger;
|
|
726
|
+
readonly spool?: DurableMetricSpool;
|
|
727
|
+
readonly instrumentationScope?: InstrumentationScope;
|
|
728
|
+
/** Export destination this sink delivers to. */
|
|
729
|
+
readonly destination?: string;
|
|
730
|
+
};
|
|
731
|
+
declare const createOtlpMetricSink: (options: OtlpMetricSinkOptions) => OtlpMetricTelemetrySink;
|
|
732
|
+
|
|
612
733
|
/**
|
|
613
734
|
* Spool queue directories for one destination, below the identity namespace.
|
|
614
735
|
*
|
|
@@ -620,6 +741,7 @@ declare const shareCorrelationPerBatch: (correlate: SpanCorrelationResolver) =>
|
|
|
620
741
|
declare const spoolQueueNamesFor: (destination: string) => {
|
|
621
742
|
readonly traces: string;
|
|
622
743
|
readonly logs: string;
|
|
744
|
+
readonly metrics: string;
|
|
623
745
|
};
|
|
624
746
|
/**
|
|
625
747
|
* The exporter policy one destination's sinks are built from.
|
|
@@ -636,6 +758,9 @@ type ExportDestinationSinks = {
|
|
|
636
758
|
readonly logs: OtlpLogTelemetrySink;
|
|
637
759
|
readonly spool?: DurableSpool;
|
|
638
760
|
readonly logSpool?: DurableLogSpool;
|
|
761
|
+
/** Hook-derived metrics; a disabled sink unless this destination takes `metrics`. */
|
|
762
|
+
readonly metrics: OtlpMetricTelemetrySink;
|
|
763
|
+
readonly metricSpool?: DurableMetricSpool;
|
|
639
764
|
};
|
|
640
765
|
/** A destination left out of this invocation, and why — by name only. */
|
|
641
766
|
type SkippedExportDestination = {
|
|
@@ -702,4 +827,4 @@ declare const createExportDestinationSinks: (options: ExportDestinationsOptions)
|
|
|
702
827
|
*/
|
|
703
828
|
declare const createDestinationFanout: (destinations: readonly ExportDestinationSinks[]) => SignalFanoutSink;
|
|
704
829
|
|
|
705
|
-
export { type
|
|
830
|
+
export { createSignalFanout as $, type SignalFanoutSink as A, type SkippedExportDestination as B, type ContentWithholdingReason as C, type DurableLogSpool as D, type ExportDestinationSinks as E, type SpoolBatch as F, type SpoolDrainResult as G, type SpoolDropCounts as H, type SpoolDropReason as I, type SpoolEnqueueResult as J, type SpoolOverflowPolicy as K, LOG_MAPPING_VERSION as L, MAX_LOG_BODY_CHARACTERS as M, NO_LOG_CONTENT as N, type OtlpLogSinkOptions as O, type SpoolSendOutcome as P, type SpoolStats as Q, canonicalEventsToLogRecords as R, type SerializedLogRecord as S, createDestinationFanout as T, createExportDestinationSinks as U, createFileDurableLogSpool as V, createFileDurableMetricSpool as W, createFileDurableSpool as X, createOtlpLogSink as Y, createOtlpMetricSink as Z, createOtlpTraceSink as _, type DurableLogSpoolOptions as a, describeLogsDeliverability as a0, describeMetricsDeliverability as a1, exporterPolicyForDestination as a2, logSignalOf as a3, logSignalsForLifecycleEvents as a4, resolveLogsEndpoint as a5, resolveMetricsEndpoint as a6, shareCorrelationPerBatch as a7, spoolQueueNamesFor as a8, validateMetricSpoolBatch as a9, type DurableMetricSpool as b, type DurableMetricSpoolOptions as c, type DurableSpool as d, type DurableSpoolOptions as e, type ExportDestinationsOptions as f, LOG_SIGNALS as g, type LogContentPolicy as h, type LogMappingOptions as i, type LogMappingResult as j, type LogSignal as k, type LogSpoolBatch as l, type LogsDeliverability as m, MAX_LOG_RECORDS_PER_BATCH as n, MAX_LOG_RECORDS_PER_EVENT as o, MCP_TOOL_NAME_PATTERN as p, type MetricExportResult as q, type MetricSpoolBatch as r, type MetricsDeliverability as s, type OtlpLogTelemetrySink as t, type OtlpMetricSinkOptions as u, type OtlpMetricTelemetrySink as v, type OtlpTelemetrySink as w, type OtlpTraceSinkOptions as x, type SerializedSpan as y, type SignalFanoutOptions as z };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { O as OtelHookConfig } from './schema-
|
|
2
|
+
import { O as OtelHookConfig } from './schema-DMnoU1V_.js';
|
|
3
3
|
import { OtelHookErrorInfo } from './errors.js';
|
|
4
4
|
import { b as CanonicalEvent, I as UsageTemporality, f as CanonicalUsage } from './events-CSD_YiJ2.js';
|
|
5
5
|
import { I as IdentityClaim, W as WorkspaceIdentity, d as InvocationIdentity } from './identity-BrVBs901.js';
|
|
6
6
|
import { h as SourceTransport, R as ResolvedProviderId, c as DetectionConfidence, d as EventId } from './primitives-CJ8-rn-f.js';
|
|
7
7
|
import { P as PrivacyService } from './service-CbI9CObT.js';
|
|
8
|
-
import { b as DeliveryIdentifierSupport, f as ProviderDeliveryClaim, j as ProviderHookResponse } from './adapter-
|
|
9
|
-
import { P as ProviderRegistry } from './registry-
|
|
10
|
-
import { I as IdGenerator, i as TelemetrySink, g as StateStore, C as Clock, d as Logger, W as WorktreeLocator, P as PayloadEnricher } from './ports-
|
|
8
|
+
import { b as DeliveryIdentifierSupport, f as ProviderDeliveryClaim, j as ProviderHookResponse } from './adapter-DiLknaTF.js';
|
|
9
|
+
import { P as ProviderRegistry } from './registry-CcJNF3WY.js';
|
|
10
|
+
import { I as IdGenerator, i as TelemetrySink, g as StateStore, C as Clock, d as Logger, W as WorktreeLocator, P as PayloadEnricher } from './ports-CeqLq31i.js';
|
|
11
11
|
import { A as AttributionOutcome, a as AttributionReason } from './taxonomy-DwhTtuWd.js';
|
|
12
12
|
|
|
13
13
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -8,25 +8,25 @@ export { C as CONTENT_MODE_DISCLOSURE, a as ContentMode, D as DEFAULT_PRIVACY_LI
|
|
|
8
8
|
export { D as DescribeContentInput, a as DescribeStructuredInput, P as PrivacyService, S as SanitizeExtensionsResult, b as SanitizeResult, c as SanitizeStats, d as SanitizedValue, e as createPrivacyService } from './service-CbI9CObT.js';
|
|
9
9
|
export { WorkspaceKeyInput, WorkspaceLabels, canonicalizeGitRemote, deriveWorkspaceIdentity } from './privacy.js';
|
|
10
10
|
export { CONFIG_SOURCE_PRECEDENCE, ConfigLayer, ConfigProvenance, ConfigResolution, ConfigSource, EMPTY_RESOURCE_ATTRIBUTES, ENVIRONMENT_VARIABLES, EnvironmentConfigResult, EnvironmentRecord, MAX_OTLP_HEADERS, MAX_RESOURCE_ATTRIBUTES, MAX_RESOURCE_ATTRIBUTE_KEY_LENGTH, MAX_RESOURCE_ATTRIBUTE_VALUE_LENGTH, OTLP_ENDPOINT_VARIABLES, OTLP_HEADER_VARIABLES, OtlpSignal, ParsedOtlpHeaders, ParsedResourceAttributes, RESERVED_RESOURCE_ATTRIBUTE_KEYS, RESOURCE_ATTRIBUTE_KEY_PATTERN, RESOURCE_ATTRIBUTE_KEY_REJECTION_DETAIL, ResolvedOtlpHeaders, ResourceAttributeKeyRejection, ResourceAttributeValue, ResourceAttributes, checkResourceAttributeKey, configSourceSchema, describeOtlpHeaderNames, describeResolvedConfig, describeResourceAttributeNames, isReservedResourceAttributeKey, isSecretResourceAttributeKey, mergeOtlpHeaders, otlpSignalEndpointFromBase, parseEnvironmentConfig, parseOtlpHeadersValue, parseResourceAttributesValue, resolveConfig, resolveOtlpHeaders, resourceAttributeValueSchema, resourceAttributesSchema, sanitizeResourceAttributes, unionOtlpHeaderNames } from './config.js';
|
|
11
|
-
export { D as DEFAULT_CONFIG, a as DEFAULT_DETECTION_POLICY, b as DEFAULT_DIAGNOSTICS_POLICY, c as DEFAULT_EXPORTER_POLICY, d as DEFAULT_LOGS_POLICY, e as
|
|
12
|
-
export { D as DEFAULT_DESTINATION_NAME, a as
|
|
13
|
-
export { A as AdapterDescription, D as DELIVERY_COMPONENT_PATTERN, a as DELIVERY_GAP_REASON_PATTERN, b as DeliveryIdentifierSupport, M as MAX_DELIVERY_COMPONENTS, c as MAX_DELIVERY_GAPS, P as ProviderAdapter, d as ProviderCapabilities, e as ProviderContext, f as ProviderDeliveryClaim, g as ProviderDeliveryGaps, h as ProviderDetection, i as ProviderDetectionInput, j as ProviderHookResponse, k as ProviderHookResponseInput, l as ProviderIdentityInput, m as ProviderParseInput, n as ProviderParseResult, S as SILENT_HOOK_RESPONSE, o as adapterSupports, p as asProviderId, q as deliveryComponentSchema, r as deliveryGapReasonSchema, s as deliveryIdentifierSupportSchema, t as describeAdapter, u as providerCapabilitiesSchema, v as providerDeliveryClaimSchema, w as providerDeliveryGapsSchema, x as providerDetectionSchema, y as providerHookResponseSchema, z as readDeliveryClaim, B as readDeliveryGap, C as unknownDetection } from './adapter-
|
|
11
|
+
export { D as DEFAULT_CONFIG, a as DEFAULT_DETECTION_POLICY, b as DEFAULT_DIAGNOSTICS_POLICY, c as DEFAULT_EXPORTER_POLICY, d as DEFAULT_LOGS_POLICY, e as DEFAULT_METRICS_POLICY, f as DEFAULT_PROVIDERS_POLICY, g as DetectionPolicy, h as DiagnosticsPolicy, E as ExporterPolicy, L as LogsPolicy, M as MetricsPolicy, O as OtelHookConfig, i as OtelHookConfigPatch, P as ProvidersPolicy, j as detectionPolicySchema, k as diagnosticsPolicySchema, l as effectiveMetricsPolicy, m as exporterPolicySchema, n as logsPolicySchema, o as metricsPolicySchema, p as otelHookConfigPatchSchema, q as otelHookConfigSchema, r as providersPolicySchema, s as readsClaudeTranscriptUsage } from './schema-DMnoU1V_.js';
|
|
12
|
+
export { D as DEFAULT_DESTINATION_NAME, a as DEFAULT_DESTINATION_SIGNALS, b as DEFAULT_SPOOL_POLICY, c as DESTINATION_NAME_PATTERN, d as DestinationDescription, E as ExportDestination, e as ExportDestinationConfig, f as ExportSignal, H as HEADER_ENV_REFERENCE_PREFIX, g as HeaderValueReference, M as MAX_DESTINATION_HEADERS, h as MAX_EXPORT_DESTINATIONS, R as ResolvedDestinationHeaders, S as SpoolPolicy, i as describeExportDestinations, j as effectiveSpoolPolicy, k as endpointOrigin, l as exportDestinationSchema, m as exportDestinationsSchema, n as exportSignalSchema, o as hasConfiguredDestinations, p as parseHeaderValueReference, r as resolveDestinationHeaders, q as resolveExportDestinations, s as spoolPolicySchema } from './destinations-BIl3gGzx.js';
|
|
13
|
+
export { A as AdapterDescription, D as DELIVERY_COMPONENT_PATTERN, a as DELIVERY_GAP_REASON_PATTERN, b as DeliveryIdentifierSupport, M as MAX_DELIVERY_COMPONENTS, c as MAX_DELIVERY_GAPS, P as ProviderAdapter, d as ProviderCapabilities, e as ProviderContext, f as ProviderDeliveryClaim, g as ProviderDeliveryGaps, h as ProviderDetection, i as ProviderDetectionInput, j as ProviderHookResponse, k as ProviderHookResponseInput, l as ProviderIdentityInput, m as ProviderParseInput, n as ProviderParseResult, S as SILENT_HOOK_RESPONSE, o as adapterSupports, p as asProviderId, q as deliveryComponentSchema, r as deliveryGapReasonSchema, s as deliveryIdentifierSupportSchema, t as describeAdapter, u as providerCapabilitiesSchema, v as providerDeliveryClaimSchema, w as providerDeliveryGapsSchema, x as providerDetectionSchema, y as providerHookResponseSchema, z as readDeliveryClaim, B as readDeliveryGap, C as unknownDetection } from './adapter-DiLknaTF.js';
|
|
14
14
|
export { ANTIGRAVITY_PROMOTION_GATES, ANTIGRAVITY_PROVIDER_MATURITY, AntigravityProviderMaturity, CLAUDE_CODE_CAPABILITIES, CLAUDE_TRANSCRIPT_USAGE_ENRICHER_ID, CODEX_CAPABILITIES, CURSOR_ADAPTER_VERSION, CURSOR_CAPABILITIES, CanonicalEventDraft, ClaudeCodeAdapterOptions, ClaudeTranscriptRange, ClaudeTranscriptTurn, ClaudeTranscriptUsageEnricherOptions, CursorAdapterOptions, DEFAULT_CLAUDE_TRANSCRIPT_RANGE_BYTES, DEFAULT_CLAUDE_TRANSCRIPT_RANGE_TIMEOUT_MILLIS, DEFAULT_CLAUDE_TRANSCRIPT_TAIL_BYTES, DEFAULT_CLAUDE_TRANSCRIPT_TIMEOUT_MILLIS, DELIVERY_IDENTIFIER_SUMMARY, DefaultRegistryOptions, EXPERIMENTAL_PROVIDER_IDS, EventFactory, EventFactoryInput, PROVIDER_DESCRIPTORS, ProviderCatalogEntry, ProviderDescriptor, ProviderMaturity, ReadClaudeTranscriptRangeOptions, ReadClaudeTranscriptTurnOptions, attachClaudeTranscriptTurn, createClaudeCodeAdapter, createClaudeTranscriptUsageEnricher, createCodexAdapter, createCursorAdapter, createDefaultProviderRegistry, createEventFactory, describeProviderCatalog, findProviderDescriptor, isExperimentalProvider, readClaudeTranscriptRange, readClaudeTranscriptTurn } from './providers.js';
|
|
15
|
-
export { B as BUILT_IN_PROVIDERS, D as DetectionCandidate, P as ProviderRegistry, R as RegistryDetectionResult, c as createProviderRegistry } from './registry-
|
|
16
|
-
export { A as ANTIGRAVITY_CAPABILITIES, a as ANTIGRAVITY_HOOK_EVENT_NAMES, b as ANTIGRAVITY_PROVIDER_ID, c as AntigravityAdapterOptions, d as AntigravityHookEventName, C as CLAUDE_CODE_PROVIDER_ID, e as CLAUDE_HOOK_EVENT_NAMES, f as CODEX_ADAPTER_VERSION, g as CODEX_HOOK_EVENT_NAMES, h as CODEX_PROVIDER_ID, i as CURSOR_DECISION_EVENTS, j as CURSOR_HOOK_EVENT_NAMES, k as CURSOR_PROVIDER_ID, l as CURSOR_UNMODELLED_HOOK_EVENT_NAMES, m as ClaudeHookEventName, n as CodexHookEventName, o as CursorHookEventName, D as DEFAULT_GEMINI_CAPABILITIES, G as GEMINI_ADAPTER_VERSION, p as GEMINI_HOOK_EVENT_NAMES, q as GEMINI_PROVIDER_ID, r as GeminiAdapterOptions, s as GeminiHookEventName, t as createAntigravityAdapter, u as createGeminiCliAdapter } from './payload-
|
|
17
|
-
export { A as AppliedDelivery, C as Clock, E as EventIdSeed, I as IdGenerator, a as InvocationIdSeed, L as LOG_LEVEL_RANK, b as LocatedWorktree, c as LogLevel, d as Logger, P as PayloadEnricher, e as PayloadEnrichment, f as PayloadEnrichmentInput, R as ReadCursor, S as StateRecord, g as StateStore, h as StateValue, T as TelemetryEmitResult, i as TelemetrySink, W as WorktreeLocator, j as appliedDeliverySchema, l as logLevelSchema, s as stateRecordSchema, k as stateValueSchema } from './ports-
|
|
18
|
-
export { D as DeterministicIdOptions, F as FixedClock, a as FixedClockOptions, I as InMemoryStateStore, b as InMemoryStateStoreOptions, L as LogRecord, R as RecordingLogger, c as RecordingTelemetrySink, d as RecordingTelemetrySinkOptions, e as createDeterministicIdGenerator, f as createFixedClock, g as createInMemoryStateStore, h as createNullTelemetrySink, i as createRandomIdGenerator, j as createRecordingLogger, k as createRecordingTelemetrySink, l as createSystemClock } from './memory-
|
|
15
|
+
export { B as BUILT_IN_PROVIDERS, D as DetectionCandidate, P as ProviderRegistry, R as RegistryDetectionResult, c as createProviderRegistry } from './registry-CcJNF3WY.js';
|
|
16
|
+
export { A as ANTIGRAVITY_CAPABILITIES, a as ANTIGRAVITY_HOOK_EVENT_NAMES, b as ANTIGRAVITY_PROVIDER_ID, c as AntigravityAdapterOptions, d as AntigravityHookEventName, C as CLAUDE_CODE_PROVIDER_ID, e as CLAUDE_HOOK_EVENT_NAMES, f as CODEX_ADAPTER_VERSION, g as CODEX_HOOK_EVENT_NAMES, h as CODEX_PROVIDER_ID, i as CURSOR_DECISION_EVENTS, j as CURSOR_HOOK_EVENT_NAMES, k as CURSOR_PROVIDER_ID, l as CURSOR_UNMODELLED_HOOK_EVENT_NAMES, m as ClaudeHookEventName, n as CodexHookEventName, o as CursorHookEventName, D as DEFAULT_GEMINI_CAPABILITIES, G as GEMINI_ADAPTER_VERSION, p as GEMINI_HOOK_EVENT_NAMES, q as GEMINI_PROVIDER_ID, r as GeminiAdapterOptions, s as GeminiHookEventName, t as createAntigravityAdapter, u as createGeminiCliAdapter } from './payload-ChtrEX6A.js';
|
|
17
|
+
export { A as AppliedDelivery, C as Clock, E as EventIdSeed, I as IdGenerator, a as InvocationIdSeed, L as LOG_LEVEL_RANK, b as LocatedWorktree, c as LogLevel, d as Logger, P as PayloadEnricher, e as PayloadEnrichment, f as PayloadEnrichmentInput, R as ReadCursor, S as StateRecord, g as StateStore, h as StateValue, T as TelemetryEmitResult, i as TelemetrySink, W as WorktreeLocator, j as appliedDeliverySchema, l as logLevelSchema, s as stateRecordSchema, k as stateValueSchema } from './ports-CeqLq31i.js';
|
|
18
|
+
export { D as DeterministicIdOptions, F as FixedClock, a as FixedClockOptions, I as InMemoryStateStore, b as InMemoryStateStoreOptions, L as LogRecord, R as RecordingLogger, c as RecordingTelemetrySink, d as RecordingTelemetrySinkOptions, e as createDeterministicIdGenerator, f as createFixedClock, g as createInMemoryStateStore, h as createNullTelemetrySink, i as createRandomIdGenerator, j as createRecordingLogger, k as createRecordingTelemetrySink, l as createSystemClock } from './memory-Cs51jyRk.js';
|
|
19
19
|
export { DEFAULT_TARGET_RESOLUTION_BUDGET_MILLIS, DEFAULT_WORKTREE_CACHE_TTL_MILLIS, FilesystemWorktreeLocatorOptions, MAX_WORKTREE_WALK_DEPTH, ResolveEventTargetsInput, ResolveEventTargetsResult, StderrLoggerOptions, createFilesystemWorktreeLocator, createNullLogger, createStderrLogger, parseCommonDirFile, parseGitDirFile, parseHeadBranch, resolveEventTargets } from './runtime.js';
|
|
20
|
-
export { C as CumulativeUsageSeries, D as DeliveryDurability, a as DeliveryOrigin, b as DeliveryResolution, c as DeliveryUnavailableReason, H as HookIngestInput, d as HookIngestOptions, e as HookIngestOutcome, O as OtelHook, f as OtelHookDependencies, R as ResolvedDeliveryIdentity, U as UsageObservation, g as UsageScope, h as classifyDurability, i as createOtelHook, j as hostDeliveryIdentity, k as isCommittable, r as resolveDeliveryIdentity, u as usageScopeSchema } from './hook-
|
|
21
|
-
export { CallbackDeduplicator, CallbackDeduplicatorDependencies, DedupCheckResult, DedupCleanupResult, DeliveryClaimOptions, DeliveryClaimOutcome, DeliveryClaimResult, LifecycleCleanupReport, LifecycleJanitor, LifecycleJanitorOptions, LifecycleScope, LifecycleSweepStats, RollupCleanupResult, SPAN_RECORD_VERSION, SpanCleanupResult, SpanCorrelationFacts, SpanCorrelator, SpanCorrelatorDependencies, SpanEndInput, SpanEndOrphanReason, SpanEndResult, SpanStartInput, SpanStartResult, UsageAccumulator, UsageAccumulatorDependencies, UsageAccumulatorKey, UsageAccumulatorSnapshot, createCallbackDeduplicator, createLifecycleJanitor, createSpanCorrelator, createUsageAccumulator } from './lifecycle.js';
|
|
20
|
+
export { C as CumulativeUsageSeries, D as DeliveryDurability, a as DeliveryOrigin, b as DeliveryResolution, c as DeliveryUnavailableReason, H as HookIngestInput, d as HookIngestOptions, e as HookIngestOutcome, O as OtelHook, f as OtelHookDependencies, R as ResolvedDeliveryIdentity, U as UsageObservation, g as UsageScope, h as classifyDurability, i as createOtelHook, j as hostDeliveryIdentity, k as isCommittable, r as resolveDeliveryIdentity, u as usageScopeSchema } from './hook-BOecWGSz.js';
|
|
21
|
+
export { CallbackDeduplicator, CallbackDeduplicatorDependencies, DedupCheckResult, DedupCleanupResult, DeliveryClaimOptions, DeliveryClaimOutcome, DeliveryClaimResult, LifecycleCleanupReport, LifecycleJanitor, LifecycleJanitorOptions, LifecycleScope, LifecycleSweepStats, MetricSeriesCleanupResult, MetricSeriesStore, MetricSeriesStoreDependencies, RecordCumulativeOptions, RollupCleanupResult, SPAN_RECORD_VERSION, SpanCleanupResult, SpanCorrelationFacts, SpanCorrelator, SpanCorrelatorDependencies, SpanEndInput, SpanEndOrphanReason, SpanEndResult, SpanStartInput, SpanStartResult, UsageAccumulator, UsageAccumulatorDependencies, UsageAccumulatorKey, UsageAccumulatorSnapshot, createCallbackDeduplicator, createLifecycleJanitor, createMetricSeriesStore, createSpanCorrelator, createUsageAccumulator } from './lifecycle.js';
|
|
22
22
|
export { S as StoreNamespace } from './keys-Dej5bN3L.js';
|
|
23
|
-
export { F as FilesystemStateStore, a as FilesystemStateStoreOptions, L as LockingStateStore, S as StateStoreDependencies, c as createFilesystemStateStore, i as isLockingStateStore, w as withOptionalSessionLock } from './filesystem-store-
|
|
23
|
+
export { F as FilesystemStateStore, a as FilesystemStateStoreOptions, L as LockingStateStore, S as StateStoreDependencies, c as createFilesystemStateStore, i as isLockingStateStore, w as withOptionalSessionLock } from './filesystem-store-D3SCNmbX.js';
|
|
24
24
|
export { BoundedMemoryStateStore, BoundedMemoryStateStoreOptions, createBoundedMemoryStateStore } from './state.js';
|
|
25
|
-
export { D as DEFAULT_INSTRUMENTATION_SCOPE, E as EventTraceIdentity, M as MAX_RECOVERED_START_ATTRIBUTES, S as SemanticMappingOptions,
|
|
26
|
-
export { C as ContentWithholdingReason, D as DurableLogSpool, a as DurableLogSpoolOptions, b as
|
|
25
|
+
export { D as DEFAULT_INSTRUMENTATION_SCOPE, a as DeriveMetricObservationsInput, E as EventTraceIdentity, M as MAX_RECOVERED_START_ATTRIBUTES, b as METRIC_COST_USAGE, c as METRIC_INSTRUMENTS, d as METRIC_OPERATION_DURATION, e as METRIC_SESSIONS, f as METRIC_TOKEN_USAGE, g as METRIC_TOOL_CALLS, h as MetricInstrument, i as MetricInstrumentName, j as MetricObservation, k as MetricPoint, l as MetricsTemporality, O as OPERATION_DURATION_BUCKETS, S as SemanticMappingOptions, m as SpanCorrelation, n as SpanCorrelationResolver, o as SpanDisposition, p as SpanFamily, q as SpanOrphanClassification, r as SpanPairing, s as SpanScopeRef, T as TOKEN_USAGE_BUCKETS, t as TokenType, u as aggregateDeltaPoints, v as canonicalEventTraceIdentities, w as canonicalEventsToReadableSpans, x as deriveMetricObservations, y as parentScopeRefOf, z as spanScopeRefOf, A as startOnlySpanAttributes } from './metric-model-DDnWxL9d.js';
|
|
26
|
+
export { C as ContentWithholdingReason, D as DurableLogSpool, a as DurableLogSpoolOptions, b as DurableMetricSpool, c as DurableMetricSpoolOptions, d as DurableSpool, e as DurableSpoolOptions, E as ExportDestinationSinks, f as ExportDestinationsOptions, L as LOG_MAPPING_VERSION, g as LOG_SIGNALS, h as LogContentPolicy, i as LogMappingOptions, j as LogMappingResult, k as LogSignal, l as LogSpoolBatch, m as LogsDeliverability, M as MAX_LOG_BODY_CHARACTERS, n as MAX_LOG_RECORDS_PER_BATCH, o as MAX_LOG_RECORDS_PER_EVENT, p as MCP_TOOL_NAME_PATTERN, q as MetricExportResult, r as MetricSpoolBatch, s as MetricsDeliverability, N as NO_LOG_CONTENT, O as OtlpLogSinkOptions, t as OtlpLogTelemetrySink, u as OtlpMetricSinkOptions, v as OtlpMetricTelemetrySink, w as OtlpTelemetrySink, x as OtlpTraceSinkOptions, S as SerializedLogRecord, y as SerializedSpan, z as SignalFanoutOptions, A as SignalFanoutSink, B as SkippedExportDestination, F as SpoolBatch, G as SpoolDrainResult, H as SpoolDropCounts, I as SpoolDropReason, J as SpoolEnqueueResult, K as SpoolOverflowPolicy, P as SpoolSendOutcome, Q as SpoolStats, R as canonicalEventsToLogRecords, T as createDestinationFanout, U as createExportDestinationSinks, V as createFileDurableLogSpool, W as createFileDurableMetricSpool, X as createFileDurableSpool, Y as createOtlpLogSink, Z as createOtlpMetricSink, _ as createOtlpTraceSink, $ as createSignalFanout, a0 as describeLogsDeliverability, a1 as describeMetricsDeliverability, a2 as exporterPolicyForDestination, a3 as logSignalOf, a4 as logSignalsForLifecycleEvents, a5 as resolveLogsEndpoint, a6 as resolveMetricsEndpoint, a7 as shareCorrelationPerBatch, a8 as spoolQueueNamesFor, a9 as validateMetricSpoolBatch } from './export-destinations-QWKGGEjk.js';
|
|
27
27
|
export { isPermanentExportFailure } from './telemetry.js';
|
|
28
28
|
export { DeliveryHealthSnapshot, DeliverySubsystem, HealthTracker, HealthTrackerOptions, OverallHealth, createHealthTracker, summarizeHealth } from './diagnostics.js';
|
|
29
|
-
export { DeliveryReport, HookProcessInput, HookProcessOutcome, HookRuntime, HookRuntimeDelivery, HookRuntimeOptions, HookShutdownReport, UsageRollup, createHookRuntime, minimumStaleClaimMillis } from './integration.js';
|
|
29
|
+
export { DeliveryReport, HookProcessInput, HookProcessOutcome, HookRuntime, HookRuntimeDelivery, HookRuntimeOptions, HookShutdownReport, MetricsReport, UsageRollup, createHookRuntime, minimumStaleClaimMillis } from './integration.js';
|
|
30
30
|
export { AntigravityHookCommandEntry, CLAUDE_HOOK_EVENTS_MODELLED, CLAUDE_REGISTRABLE_HOOK_EVENTS, CLAUDE_UNREGISTERED_HOOK_EVENTS, CODEX_HOOK_EVENTS_MODELLED, CODEX_REGISTRABLE_HOOK_EVENTS, CODEX_UNREGISTERED_HOOK_EVENTS, CURSOR_HOOKS_DOCUMENT_VERSION, CURSOR_HOOK_EVENTS_MODELLED, CURSOR_REGISTRABLE_HOOK_EVENTS, CURSOR_UNREGISTERED_HOOK_EVENTS, ClaudeHookRegistrationOptions, ClaudeHookRemovalOptions, CodexHookRegistrationOptions, CodexHookRemovalOptions, CodexHooksFeatureFlag, CommandHookEntry, CursorHookCommandEntry, CursorHookDocumentResult, CursorHookRemovalInput, DEFAULT_DOCUMENT_FORMAT, DEFAULT_MANAGED_COMMAND_MARKER, FileLockOptions, FileLockTimeoutError, GeminiHookCommandEntry, GeminiHookMatcherEntry, GeminiHooksSettings, HookDocumentAction, HookDocumentChange, HookDocumentConflict, HookGroupEntry, HookHandlerPredicate, InstallLocation, JsonDocumentFormat, MANAGED_HOOK_NAME, MANAGED_MARKER_REJECTION_DETAIL, MANAGED_MARKER_TOKEN, ManagedMarkerRejection, MergeAntigravityHookRegistrationInput, MergeAntigravityHookRegistrationResult, MergeCursorHookRegistrationInput, MergeGeminiHookResult, MergeNestedHookInput, NestedHookDocumentResult, PROVIDERS_WITHOUT_VERIFIED_LOCATION, PROVIDERS_WITH_VERIFIED_LOCATION, PROVIDER_INSTALL_LOCATIONS, PROVIDER_REGISTRATION_SUPPORT, PlanProviderRegistrationInput, PlanProviderRegistrationResult, ProviderRegistrationPlanner, ProviderRegistrationSupport, REGISTRATION_PLANNERS, REGISTRATION_SCOPES, ReadDocumentResult, RegisterGeminiHookOptions, RegistrationAction, RegistrationLifecycleRequest, RegistrationOutcome, RegistrationOutcomeStatus, RegistrationPlanInput, RegistrationRemovalInput, RegistrationReport, RegistrationScope, RemoveAntigravityHookRegistrationInput, RemoveGeminiHookOptions, RemoveNestedHookInput, SUPPORTED_REGISTRATION_PROVIDER_IDS, ScopeRoots, checkManagedMarker, defaultHookCommand, detectDocumentFormat, findInstallLocation, findRegistrationPlanner, findRegistrationSupport, lockPathFor, managedHookPredicate, mergeAntigravityHookRegistration, mergeClaudeHookRegistration, mergeCodexHookRegistration, mergeCursorHookRegistration, mergeGeminiHookRegistration, mergeNestedHookRegistration, planProviderRegistration, readAntigravityHookRegistrations, readClaudeHookRegistrations, readCodexHookRegistrations, readCodexHooksFeatureFlag, readCursorHookRegistrations, readGeminiHookRegistrations, readJsonDocument, readNestedHookRegistrations, removeAntigravityHookRegistration, removeClaudeHookRegistration, removeCodexHookRegistration, removeCursorHookRegistration, removeGeminiHookRegistration, removeNestedHookRegistrations, renderJsonDocument, resolveInstallPath, runRegistrationLifecycle, withFileLock, writeDocumentAtomically } from './install.js';
|
|
31
31
|
export { A as AttributionOutcome, a as AttributionReason, E as ERROR_TAXONOMY, b as ErrorCodeDescriptor, c as ErrorPhase, d as ErrorSeverity, F as FailurePosture, O as OtelHookErrorCode, e as attributionOutcomeSchema, f as attributionReasonSchema, g as describeErrorCode, h as errorPhaseSchema, i as errorSeveritySchema, j as failurePostureSchema, o as otelHookErrorCodeSchema } from './taxonomy-DwhTtuWd.js';
|
|
32
32
|
import 'zod';
|
|
@@ -42,6 +42,6 @@ import '@opentelemetry/sdk-logs';
|
|
|
42
42
|
*
|
|
43
43
|
* Updated by `scripts/release/sync-version.mjs` during semantic-release.
|
|
44
44
|
*/
|
|
45
|
-
declare const VERSION = "0.
|
|
45
|
+
declare const VERSION = "0.11.0";
|
|
46
46
|
|
|
47
47
|
export { VERSION };
|