@osfactory/otel-hook 0.12.0 → 0.13.1
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 +6 -4
- package/dist/{adapter-DQiPu8xF.d.ts → adapter-DyCb7y1N.d.ts} +1 -1
- package/dist/cli.js +260 -74
- package/dist/cli.js.map +1 -1
- package/dist/{export-destinations-CI7z4n3i.d.ts → export-destinations-DUeQKr_C.d.ts} +2 -2
- package/dist/{filesystem-store-CmnUlj1O.d.ts → filesystem-store-B3CpiIRl.d.ts} +1 -1
- package/dist/{hook-vM_cgqS2.d.ts → hook-D5imE0Qc.d.ts} +3 -3
- package/dist/index.d.ts +10 -10
- package/dist/index.js +252 -66
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +3 -3
- package/dist/install.js +14 -2
- package/dist/install.js.map +1 -1
- package/dist/integration.d.ts +7 -7
- package/dist/integration.js +211 -58
- package/dist/integration.js.map +1 -1
- package/dist/lifecycle.d.ts +9 -2
- package/dist/lifecycle.js +10 -3
- package/dist/lifecycle.js.map +1 -1
- package/dist/{memory-DdU1U91y.d.ts → memory-B3r6sZtC.d.ts} +1 -1
- package/dist/{metric-model-C9lLqqpI.d.ts → metric-model-B4lIuk6i.d.ts} +10 -1
- package/dist/{payload-BT19hiVZ.d.ts → payload-CdDKeRpH.d.ts} +1 -1
- package/dist/{ports-C3k_5eOQ.d.ts → ports-DhpSDIkp.d.ts} +8 -1
- package/dist/providers.d.ts +27 -11
- package/dist/providers.js +132 -43
- package/dist/providers.js.map +1 -1
- package/dist/{registry-gyJqaWmp.d.ts → registry-BKQhhIO3.d.ts} +1 -1
- package/dist/runtime.d.ts +6 -6
- package/dist/runtime.js +12 -2
- package/dist/runtime.js.map +1 -1
- package/dist/state.d.ts +3 -3
- package/dist/state.js +20 -6
- package/dist/state.js.map +1 -1
- package/dist/telemetry.d.ts +3 -3
- package/dist/telemetry.js +72 -6
- package/dist/telemetry.js.map +1 -1
- package/dist/testing.d.ts +6 -6
- package/dist/testing.js +63 -8
- package/dist/testing.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as DetectionPolicy } from './schema-SpFM6YQY.js';
|
|
2
2
|
import { OtelHookErrorInfo } from './errors.js';
|
|
3
|
-
import { P as ProviderAdapter, h as ProviderDetection, i as ProviderDetectionInput, e as ProviderContext } from './adapter-
|
|
3
|
+
import { P as ProviderAdapter, h as ProviderDetection, i as ProviderDetectionInput, e as ProviderContext } from './adapter-DyCb7y1N.js';
|
|
4
4
|
|
|
5
5
|
type DetectionCandidate = {
|
|
6
6
|
readonly adapter: ProviderAdapter;
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as LogLevel, d as Logger, W as WorktreeLocator, S as SessionContextReader, h as SessionContextSegment } from './ports-
|
|
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-
|
|
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-
|
|
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-
|
|
1
|
+
import { c as LogLevel, d as Logger, W as WorktreeLocator, S as SessionContextReader, h as SessionContextSegment } from './ports-DhpSDIkp.js';
|
|
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
|
+
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';
|
|
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';
|
|
@@ -10,10 +10,10 @@ import './errors.js';
|
|
|
10
10
|
import './taxonomy-DwhTtuWd.js';
|
|
11
11
|
import './schema-SpFM6YQY.js';
|
|
12
12
|
import './identity-BrVBs901.js';
|
|
13
|
-
import './adapter-
|
|
13
|
+
import './adapter-DyCb7y1N.js';
|
|
14
14
|
import './policy-CimmCfRp.js';
|
|
15
15
|
import './content-M9xIKG7h.js';
|
|
16
|
-
import './registry-
|
|
16
|
+
import './registry-BKQhhIO3.js';
|
|
17
17
|
|
|
18
18
|
declare const createNullLogger: () => Logger;
|
|
19
19
|
type StderrLoggerOptions = {
|
package/dist/runtime.js
CHANGED
|
@@ -2821,7 +2821,7 @@ var usageScopeOf = (event2) => {
|
|
|
2821
2821
|
};
|
|
2822
2822
|
var sequenceKey = (sessionId) => `sequence:${sessionId}`;
|
|
2823
2823
|
var sessionModelKey = (sessionId) => `model:${sessionId}`;
|
|
2824
|
-
var readCursorKey = (enricherId, sessionId) => `cursor:${enricherId}:${sessionId}`;
|
|
2824
|
+
var readCursorKey = (enricherId, sessionId, scope) => scope === void 0 ? `cursor:${enricherId}:${sessionId}` : `cursor:${enricherId}:${sessionId}:${scope}`;
|
|
2825
2825
|
var UNKNOWN_MODEL_ID = "unknown";
|
|
2826
2826
|
var latestSessionModel = (events) => {
|
|
2827
2827
|
let latest;
|
|
@@ -2889,7 +2889,17 @@ var createOtelHook = (deps) => {
|
|
|
2889
2889
|
if (enricher.providerId !== providerId) {
|
|
2890
2890
|
continue;
|
|
2891
2891
|
}
|
|
2892
|
-
|
|
2892
|
+
let scope;
|
|
2893
|
+
try {
|
|
2894
|
+
scope = enricher.cursorScope?.(current);
|
|
2895
|
+
} catch (thrown) {
|
|
2896
|
+
logger.warn("payload enricher failed; parsing the payload as delivered", {
|
|
2897
|
+
"enricher.id": enricher.id,
|
|
2898
|
+
"error.name": thrown instanceof Error ? thrown.name : typeof thrown
|
|
2899
|
+
});
|
|
2900
|
+
continue;
|
|
2901
|
+
}
|
|
2902
|
+
const key = readCursorKey(enricher.id, sessionId, scope);
|
|
2893
2903
|
let cursor;
|
|
2894
2904
|
try {
|
|
2895
2905
|
const record = await deps.stateStore.read(key);
|