@osfactory/otel-hook 0.9.0 → 0.10.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.
Files changed (49) hide show
  1. package/README.md +42 -1
  2. package/dist/{adapter-BJiz6lqM.d.ts → adapter-B9RwW6TO.d.ts} +14 -2
  3. package/dist/cli.js +1272 -784
  4. package/dist/cli.js.map +1 -1
  5. package/dist/config.d.ts +5 -3
  6. package/dist/config.js +28 -5
  7. package/dist/config.js.map +1 -1
  8. package/dist/{destinations-C6Bm89W6.d.ts → destinations-DWOkVxV1.d.ts} +1 -1
  9. package/dist/{events-B3MHoJTD.d.ts → events-CSD_YiJ2.d.ts} +2 -0
  10. package/dist/{export-destinations-d8tZV0G4.d.ts → export-destinations-lORbe25J.d.ts} +5 -5
  11. package/dist/{filesystem-store-r-nNA3BA.d.ts → filesystem-store-DX3dGIgu.d.ts} +1 -1
  12. package/dist/{hook-zA1b4cWd.d.ts → hook-BAxXoKsp.d.ts} +10 -5
  13. package/dist/index.d.ts +14 -14
  14. package/dist/index.js +643 -110
  15. package/dist/index.js.map +1 -1
  16. package/dist/install.d.ts +4 -4
  17. package/dist/install.js +31 -2
  18. package/dist/install.js.map +1 -1
  19. package/dist/integration.d.ts +17 -10
  20. package/dist/integration.js +3864 -3107
  21. package/dist/integration.js.map +1 -1
  22. package/dist/lifecycle.d.ts +3 -3
  23. package/dist/lifecycle.js +8 -1
  24. package/dist/lifecycle.js.map +1 -1
  25. package/dist/{memory-Bl9ANVff.d.ts → memory-aJilVG4R.d.ts} +2 -2
  26. package/dist/model.d.ts +1 -1
  27. package/dist/model.js +7 -0
  28. package/dist/model.js.map +1 -1
  29. package/dist/{payload-Ci8_ERm6.d.ts → payload-D7gc0-WQ.d.ts} +41 -2
  30. package/dist/{ports-n7KFOpKo.d.ts → ports-plO5MKrY.d.ts} +63 -2
  31. package/dist/providers.d.ts +146 -10
  32. package/dist/providers.js +397 -13
  33. package/dist/providers.js.map +1 -1
  34. package/dist/{registry-B8ZHc2bc.d.ts → registry-C7XO4DzD.d.ts} +2 -2
  35. package/dist/runtime.d.ts +8 -8
  36. package/dist/runtime.js +1356 -1217
  37. package/dist/runtime.js.map +1 -1
  38. package/dist/{schema-BxiVsU-d.d.ts → schema-CHb3GU1r.d.ts} +30 -1
  39. package/dist/{semconv-fPRb-dpU.d.ts → semconv-Dw7gcQcg.d.ts} +1 -1
  40. package/dist/state.d.ts +4 -4
  41. package/dist/state.js +607 -39
  42. package/dist/state.js.map +1 -1
  43. package/dist/telemetry.d.ts +6 -6
  44. package/dist/telemetry.js +13 -3
  45. package/dist/telemetry.js.map +1 -1
  46. package/dist/testing.d.ts +10 -8
  47. package/dist/testing.js +209 -25
  48. package/dist/testing.js.map +1 -1
  49. package/package.json +1 -1
@@ -1,28 +1,28 @@
1
- import { O as OtelHookConfig } from './schema-BxiVsU-d.js';
1
+ import { O as OtelHookConfig } from './schema-CHb3GU1r.js';
2
2
  import { OverallHealth } from './diagnostics.js';
3
3
  import { OtelHookErrorInfo } from './errors.js';
4
4
  import { DeliveryClaimOutcome, UsageAccumulatorSnapshot, LifecycleCleanupReport, CallbackDeduplicator, UsageAccumulator, SpanCorrelator, LifecycleJanitor } from './lifecycle.js';
5
5
  import { P as PrivacyService } from './service-CbI9CObT.js';
6
- import { P as ProviderRegistry } from './registry-B8ZHc2bc.js';
7
- import { a as DeliveryOrigin, c as DeliveryUnavailableReason, H as HookIngestInput, e as HookIngestOutcome, U as UsageObservation, O as OtelHook } from './hook-zA1b4cWd.js';
8
- import { C as Clock, I as IdGenerator, d as Logger, W as WorktreeLocator } from './ports-n7KFOpKo.js';
9
- import { F as FilesystemStateStore } from './filesystem-store-r-nNA3BA.js';
10
- import { p as OtlpTelemetrySink, o as OtlpLogTelemetrySink, b as DurableSpool, D as DurableLogSpool, E as ExportDestinationSinks, u as SkippedExportDestination } from './export-destinations-d8tZV0G4.js';
6
+ import { P as ProviderRegistry } from './registry-C7XO4DzD.js';
7
+ import { a as DeliveryOrigin, c as DeliveryUnavailableReason, H as HookIngestInput, e as HookIngestOutcome, U as UsageObservation, O as OtelHook } from './hook-BAxXoKsp.js';
8
+ import { C as Clock, I as IdGenerator, d as Logger, W as WorktreeLocator, P as PayloadEnricher } from './ports-plO5MKrY.js';
9
+ import { F as FilesystemStateStore } from './filesystem-store-DX3dGIgu.js';
10
+ import { p as OtlpTelemetrySink, o as OtlpLogTelemetrySink, b as DurableSpool, D as DurableLogSpool, E as ExportDestinationSinks, u as SkippedExportDestination } from './export-destinations-lORbe25J.js';
11
11
  import 'zod';
12
12
  import './primitives-CJ8-rn-f.js';
13
13
  import './taxonomy-DwhTtuWd.js';
14
14
  import '@opentelemetry/api';
15
- import './events-B3MHoJTD.js';
16
- import './semconv-fPRb-dpU.js';
15
+ import './events-CSD_YiJ2.js';
16
+ import './semconv-Dw7gcQcg.js';
17
17
  import '@opentelemetry/core';
18
18
  import '@opentelemetry/resources';
19
19
  import '@opentelemetry/sdk-trace';
20
20
  import './content-M9xIKG7h.js';
21
21
  import './policy-CimmCfRp.js';
22
- import './adapter-BJiz6lqM.js';
22
+ import './adapter-B9RwW6TO.js';
23
23
  import './identity-BrVBs901.js';
24
24
  import './keys-Dej5bN3L.js';
25
- import './destinations-C6Bm89W6.js';
25
+ import './destinations-DWOkVxV1.js';
26
26
  import '@opentelemetry/sdk-logs';
27
27
 
28
28
  /**
@@ -302,6 +302,13 @@ type HookRuntimeOptions = {
302
302
  * `null` to disable resolution entirely.
303
303
  */
304
304
  readonly worktreeLocator?: WorktreeLocator | null;
305
+ /**
306
+ * Payload enrichers run before the adapter parses (see `PayloadEnricher`).
307
+ * When absent, the configuration decides: `providers.claudeCode.readTranscriptUsage`
308
+ * adds the Claude Code transcript-usage enricher, and nothing else is added.
309
+ * Pass `[]` to run none regardless of configuration.
310
+ */
311
+ readonly payloadEnrichers?: readonly PayloadEnricher[];
305
312
  };
306
313
  /**
307
314
  * Smallest stale-claim window that cannot expire while a live process is still