@osfactory/otel-hook 0.13.1 → 0.13.2

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.
@@ -1,4 +1,4 @@
1
- import { g as DetectionPolicy } from './schema-SpFM6YQY.js';
1
+ import { i as DetectionPolicy } from './schema-CD61uW99.js';
2
2
  import { OtelHookErrorInfo } from './errors.js';
3
3
  import { P as ProviderAdapter, h as ProviderDetection, i as ProviderDetectionInput, e as ProviderContext } from './adapter-DyCb7y1N.js';
4
4
 
package/dist/runtime.d.ts CHANGED
@@ -1,19 +1,19 @@
1
1
  import { c as LogLevel, d as Logger, W as WorktreeLocator, S as SessionContextReader, h as SessionContextSegment } from './ports-DhpSDIkp.js';
2
2
  export { A as AppliedDelivery, C as Clock, E as EventIdSeed, I as IdGenerator, a as InvocationIdSeed, L as LOG_LEVEL_RANK, b as LocatedWorktree, P as PayloadEnricher, e as PayloadEnrichment, f as PayloadEnrichmentInput, R as ReadCursor, g as SessionContextRequest, i as StateRecord, j as StateStore, k as StateValue, T as TelemetryEmitResult, l as TelemetrySink, m as appliedDeliverySchema, n as logLevelSchema, s as stateRecordSchema, o as stateValueSchema } from './ports-DhpSDIkp.js';
3
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-B3r6sZtC.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-D5imE0Qc.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-CKLpgrYP.js';
5
5
  import { b as CanonicalEvent, u as TargetHint } from './events-fcomX6d5.js';
6
6
  import { d as EventId } from './primitives-CJ8-rn-f.js';
7
7
  import { P as PrivacyService } from './service-CbI9CObT.js';
8
8
  import 'zod';
9
9
  import './errors.js';
10
10
  import './taxonomy-DwhTtuWd.js';
11
- import './schema-SpFM6YQY.js';
11
+ import './schema-CD61uW99.js';
12
12
  import './identity-BrVBs901.js';
13
13
  import './adapter-DyCb7y1N.js';
14
14
  import './policy-CimmCfRp.js';
15
15
  import './content-M9xIKG7h.js';
16
- import './registry-BKQhhIO3.js';
16
+ import './registry-DM-4YvIA.js';
17
17
 
18
18
  declare const createNullLogger: () => Logger;
19
19
  type StderrLoggerOptions = {
package/dist/runtime.js CHANGED
@@ -1715,7 +1715,22 @@ var exporterPolicySchema = z15.strictObject({
1715
1715
  * Per-destination retry spool bounds, each optional and merged per leaf; any
1716
1716
  * bound left unset takes its value from `DEFAULT_SPOOL_POLICY`.
1717
1717
  */
1718
- spool: spoolPolicySchema.partial().optional()
1718
+ spool: spoolPolicySchema.partial().optional(),
1719
+ /**
1720
+ * The most time one hook invocation spends trying to reach one endpoint, in
1721
+ * milliseconds: caps `timeoutMillis` for every OTLP request (connection setup
1722
+ * included) and the exporter's own retries inside it. A batch that does not
1723
+ * get through in time is spooled. Default {@link DEFAULT_EXPORT_BUDGET_MILLIS}:
1724
+ * the host agent waits for its hooks, so a down collector must not stall it.
1725
+ */
1726
+ exportBudgetMillis: z15.number().int().min(50).max(6e5).optional(),
1727
+ /**
1728
+ * After an endpoint was unreachable (refused, timed out, or answered a
1729
+ * retryable status), every hook spools for it without trying for this long,
1730
+ * in milliseconds; then one hook probes it again. 0 disables the window.
1731
+ * Default {@link DEFAULT_ENDPOINT_DOWN_MILLIS}.
1732
+ */
1733
+ endpointDownMillis: z15.number().int().min(0).max(36e5).optional()
1719
1734
  });
1720
1735
  var detectionPolicySchema = z15.strictObject({
1721
1736
  /** Detections below this confidence resolve to the unknown provider. */
@@ -1733,6 +1748,9 @@ var diagnosticsPolicySchema = z15.strictObject({
1733
1748
  var providersPolicySchema = z15.strictObject({
1734
1749
  claudeCode: z15.strictObject({
1735
1750
  readTranscriptUsage: z15.boolean()
1751
+ }).optional(),
1752
+ codex: z15.strictObject({
1753
+ readRolloutUsage: z15.boolean()
1736
1754
  }).optional()
1737
1755
  });
1738
1756
  var sessionContextPolicySchema = z15.strictObject({
@@ -1762,7 +1780,8 @@ var otelHookConfigPatchSchema = z15.strictObject({
1762
1780
  detection: detectionPolicySchema.partial().optional(),
1763
1781
  diagnostics: diagnosticsPolicySchema.partial().optional(),
1764
1782
  providers: z15.strictObject({
1765
- claudeCode: z15.strictObject({ readTranscriptUsage: z15.boolean() }).partial().optional()
1783
+ claudeCode: z15.strictObject({ readTranscriptUsage: z15.boolean() }).partial().optional(),
1784
+ codex: z15.strictObject({ readRolloutUsage: z15.boolean() }).partial().optional()
1766
1785
  }).partial().optional(),
1767
1786
  sessionContext: sessionContextPolicySchema.partial().optional()
1768
1787
  });
@@ -1789,7 +1808,8 @@ var DEFAULT_DIAGNOSTICS_POLICY = Object.freeze({
1789
1808
  emitErrorEvents: true
1790
1809
  });
1791
1810
  var DEFAULT_PROVIDERS_POLICY = Object.freeze({
1792
- claudeCode: Object.freeze({ readTranscriptUsage: false })
1811
+ claudeCode: Object.freeze({ readTranscriptUsage: false }),
1812
+ codex: Object.freeze({ readRolloutUsage: false })
1793
1813
  });
1794
1814
  var DEFAULT_CONFIG = Object.freeze({
1795
1815
  exporter: DEFAULT_EXPORTER_POLICY,