@osfactory/otel-hook 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/LICENSE +21 -0
- package/README.md +1020 -0
- package/dist/adapter-DIgRACtL.d.ts +303 -0
- package/dist/cli.js +12607 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +233 -0
- package/dist/config.js +996 -0
- package/dist/config.js.map +1 -0
- package/dist/content-CoB7aNP1.d.ts +118 -0
- package/dist/diagnostics.d.ts +58 -0
- package/dist/diagnostics.js +46 -0
- package/dist/diagnostics.js.map +1 -0
- package/dist/errors.d.ts +91 -0
- package/dist/errors.js +322 -0
- package/dist/errors.js.map +1 -0
- package/dist/events-VxBnDFaO.d.ts +2044 -0
- package/dist/filesystem-store-J8jjDMTh.d.ts +65 -0
- package/dist/hook-CGpo-vks.d.ts +292 -0
- package/dist/identity-BrVBs901.d.ts +227 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +11798 -0
- package/dist/index.js.map +1 -0
- package/dist/install.d.ts +1021 -0
- package/dist/install.js +3271 -0
- package/dist/install.js.map +1 -0
- package/dist/integration.d.ts +303 -0
- package/dist/integration.js +5942 -0
- package/dist/integration.js.map +1 -0
- package/dist/keys-Dej5bN3L.d.ts +7 -0
- package/dist/lifecycle.d.ts +428 -0
- package/dist/lifecycle.js +1077 -0
- package/dist/lifecycle.js.map +1 -0
- package/dist/memory-DXVBc8V9.d.ts +94 -0
- package/dist/model.d.ts +45 -0
- package/dist/model.js +1023 -0
- package/dist/model.js.map +1 -0
- package/dist/otlp-log-sink-CeIFDDpn.d.ts +457 -0
- package/dist/payload-CHr53E_v.d.ts +201 -0
- package/dist/policy-D1CrlYn3.d.ts +73 -0
- package/dist/ports-Q8x0ODhs.d.ts +200 -0
- package/dist/primitives-CJ8-rn-f.d.ts +75 -0
- package/dist/privacy.d.ts +51 -0
- package/dist/privacy.js +633 -0
- package/dist/privacy.js.map +1 -0
- package/dist/providers.d.ts +257 -0
- package/dist/providers.js +4398 -0
- package/dist/providers.js.map +1 -0
- package/dist/registry-BzYmC9OC.d.ts +49 -0
- package/dist/runtime.d.ts +32 -0
- package/dist/runtime.js +2907 -0
- package/dist/runtime.js.map +1 -0
- package/dist/schema-Cn0-xz8L.d.ts +224 -0
- package/dist/semconv-Baoz-0OI.d.ts +188 -0
- package/dist/service-j4jEO6cZ.d.ts +68 -0
- package/dist/state.d.ts +36 -0
- package/dist/state.js +710 -0
- package/dist/state.js.map +1 -0
- package/dist/taxonomy-DwhTtuWd.d.ts +87 -0
- package/dist/telemetry.d.ts +77 -0
- package/dist/telemetry.js +2294 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/testing.d.ts +155 -0
- package/dist/testing.js +6513 -0
- package/dist/testing.js.map +1 -0
- package/package.json +124 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { e as DetectionPolicy } from './schema-Cn0-xz8L.js';
|
|
2
|
+
import { OtelHookErrorInfo } from './errors.js';
|
|
3
|
+
import { P as ProviderAdapter, h as ProviderDetection, i as ProviderDetectionInput, e as ProviderContext } from './adapter-DIgRACtL.js';
|
|
4
|
+
|
|
5
|
+
type DetectionCandidate = {
|
|
6
|
+
readonly adapter: ProviderAdapter;
|
|
7
|
+
readonly detection: ProviderDetection;
|
|
8
|
+
};
|
|
9
|
+
type RegistryDetectionResult = {
|
|
10
|
+
readonly status: "selected";
|
|
11
|
+
readonly adapter: ProviderAdapter;
|
|
12
|
+
readonly detection: ProviderDetection;
|
|
13
|
+
readonly candidates: readonly DetectionCandidate[];
|
|
14
|
+
readonly errors: readonly OtelHookErrorInfo[];
|
|
15
|
+
} | {
|
|
16
|
+
readonly status: "unknown";
|
|
17
|
+
readonly reason: "no-adapters-registered" | "no-candidates" | "below-minimum-confidence" | "provider-not-allowed";
|
|
18
|
+
readonly detection: ProviderDetection;
|
|
19
|
+
readonly candidates: readonly DetectionCandidate[];
|
|
20
|
+
readonly errors: readonly OtelHookErrorInfo[];
|
|
21
|
+
} | {
|
|
22
|
+
readonly status: "ambiguous";
|
|
23
|
+
readonly detection: ProviderDetection;
|
|
24
|
+
readonly candidates: readonly DetectionCandidate[];
|
|
25
|
+
readonly errors: readonly OtelHookErrorInfo[];
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Immutable set of adapters.
|
|
29
|
+
*
|
|
30
|
+
* A registry is a value passed to the runtime, not a mutable module-level
|
|
31
|
+
* singleton: two hooks in one process may legitimately be configured with
|
|
32
|
+
* different adapter sets, and a global would let one silently reconfigure the
|
|
33
|
+
* other.
|
|
34
|
+
*/
|
|
35
|
+
interface ProviderRegistry {
|
|
36
|
+
readonly adapters: readonly ProviderAdapter[];
|
|
37
|
+
get(id: string): ProviderAdapter | undefined;
|
|
38
|
+
detect(input: ProviderDetectionInput, context: ProviderContext, policy: DetectionPolicy): RegistryDetectionResult;
|
|
39
|
+
}
|
|
40
|
+
declare const createProviderRegistry: (adapters: readonly ProviderAdapter[]) => ProviderRegistry;
|
|
41
|
+
/**
|
|
42
|
+
* Built-in adapters.
|
|
43
|
+
*
|
|
44
|
+
* Empty by design in the core package: provider support is added by dedicated
|
|
45
|
+
* adapter modules, and the core must remain testable without any of them.
|
|
46
|
+
*/
|
|
47
|
+
declare const BUILT_IN_PROVIDERS: readonly ProviderAdapter[];
|
|
48
|
+
|
|
49
|
+
export { BUILT_IN_PROVIDERS as B, type DetectionCandidate as D, type ProviderRegistry as P, type RegistryDetectionResult as R, createProviderRegistry as c };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { b as LogLevel, c as Logger } from './ports-Q8x0ODhs.js';
|
|
2
|
+
export { A as AppliedDelivery, C as Clock, E as EventIdSeed, I as IdGenerator, a as InvocationIdSeed, L as LOG_LEVEL_RANK, S as StateRecord, d as StateStore, e as StateValue, T as TelemetryEmitResult, f as TelemetrySink, g as appliedDeliverySchema, l as logLevelSchema, s as stateRecordSchema, h as stateValueSchema } from './ports-Q8x0ODhs.js';
|
|
3
|
+
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-DXVBc8V9.js';
|
|
4
|
+
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-CGpo-vks.js';
|
|
5
|
+
import 'zod';
|
|
6
|
+
import './errors.js';
|
|
7
|
+
import './primitives-CJ8-rn-f.js';
|
|
8
|
+
import './taxonomy-DwhTtuWd.js';
|
|
9
|
+
import './events-VxBnDFaO.js';
|
|
10
|
+
import './schema-Cn0-xz8L.js';
|
|
11
|
+
import './identity-BrVBs901.js';
|
|
12
|
+
import './service-j4jEO6cZ.js';
|
|
13
|
+
import './content-CoB7aNP1.js';
|
|
14
|
+
import './policy-D1CrlYn3.js';
|
|
15
|
+
import './adapter-DIgRACtL.js';
|
|
16
|
+
import './registry-BzYmC9OC.js';
|
|
17
|
+
|
|
18
|
+
declare const createNullLogger: () => Logger;
|
|
19
|
+
type StderrLoggerOptions = {
|
|
20
|
+
readonly level?: LogLevel;
|
|
21
|
+
/** Injected for tests; defaults to `process.stderr.write`. */
|
|
22
|
+
readonly write?: (line: string) => void;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Diagnostic logger that writes to stderr only.
|
|
26
|
+
*
|
|
27
|
+
* stdout belongs to the host agent's hook protocol: anything written there can
|
|
28
|
+
* be parsed as a hook response and change the agent's behaviour (ADR 0004).
|
|
29
|
+
*/
|
|
30
|
+
declare const createStderrLogger: (options?: StderrLoggerOptions) => Logger;
|
|
31
|
+
|
|
32
|
+
export { LogLevel, Logger, type StderrLoggerOptions, createNullLogger, createStderrLogger };
|