@osfactory/otel-hook 0.9.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 +124 -4
- package/dist/{adapter-BJiz6lqM.d.ts → adapter-DiLknaTF.d.ts} +14 -2
- package/dist/cli.js +2272 -730
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +13 -4
- package/dist/config.js +128 -23
- package/dist/config.js.map +1 -1
- package/dist/{destinations-C6Bm89W6.d.ts → destinations-BIl3gGzx.d.ts} +12 -2
- package/dist/diagnostics.d.ts +1 -1
- package/dist/diagnostics.js.map +1 -1
- package/dist/{events-B3MHoJTD.d.ts → events-CSD_YiJ2.d.ts} +2 -0
- package/dist/{export-destinations-d8tZV0G4.d.ts → export-destinations-QWKGGEjk.d.ts} +131 -6
- package/dist/{filesystem-store-r-nNA3BA.d.ts → filesystem-store-D3SCNmbX.d.ts} +1 -1
- package/dist/{hook-zA1b4cWd.d.ts → hook-BOecWGSz.d.ts} +10 -5
- package/dist/index.d.ts +16 -16
- package/dist/index.js +1808 -251
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +4 -4
- package/dist/install.js +31 -2
- package/dist/install.js.map +1 -1
- package/dist/integration.d.ts +37 -12
- package/dist/integration.js +3271 -1551
- package/dist/integration.js.map +1 -1
- package/dist/lifecycle.d.ts +55 -4
- package/dist/lifecycle.js +277 -4
- package/dist/lifecycle.js.map +1 -1
- package/dist/{memory-Bl9ANVff.d.ts → memory-Cs51jyRk.d.ts} +2 -2
- package/dist/{semconv-fPRb-dpU.d.ts → metric-model-DDnWxL9d.d.ts} +154 -2
- package/dist/model.d.ts +1 -1
- package/dist/model.js +7 -0
- package/dist/model.js.map +1 -1
- package/dist/{payload-Ci8_ERm6.d.ts → payload-ChtrEX6A.d.ts} +41 -2
- package/dist/{ports-n7KFOpKo.d.ts → ports-CeqLq31i.d.ts} +87 -2
- package/dist/providers.d.ts +146 -10
- package/dist/providers.js +397 -13
- package/dist/providers.js.map +1 -1
- package/dist/{registry-B8ZHc2bc.d.ts → registry-CcJNF3WY.d.ts} +2 -2
- package/dist/runtime.d.ts +8 -8
- package/dist/runtime.js +1404 -1219
- package/dist/runtime.js.map +1 -1
- package/dist/{schema-BxiVsU-d.d.ts → schema-DMnoU1V_.d.ts} +93 -1
- package/dist/state.d.ts +4 -4
- package/dist/state.js +630 -39
- package/dist/state.js.map +1 -1
- package/dist/telemetry.d.ts +6 -6
- package/dist/telemetry.js +872 -19
- package/dist/telemetry.js.map +1 -1
- package/dist/testing.d.ts +11 -9
- package/dist/testing.js +264 -34
- package/dist/testing.js.map +1 -1
- package/package.json +3 -1
package/dist/install.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { d as AntigravityHookEventName, m as ClaudeHookEventName, n as CodexHookEventName, o as CursorHookEventName, s as GeminiHookEventName, q as GEMINI_PROVIDER_ID, b as ANTIGRAVITY_PROVIDER_ID, C as CLAUDE_CODE_PROVIDER_ID, h as CODEX_PROVIDER_ID, k as CURSOR_PROVIDER_ID } from './payload-
|
|
2
|
-
import { C as Clock } from './ports-
|
|
1
|
+
import { d as AntigravityHookEventName, m as ClaudeHookEventName, n as CodexHookEventName, o as CursorHookEventName, s as GeminiHookEventName, q as GEMINI_PROVIDER_ID, b as ANTIGRAVITY_PROVIDER_ID, C as CLAUDE_CODE_PROVIDER_ID, h as CODEX_PROVIDER_ID, k as CURSOR_PROVIDER_ID } from './payload-ChtrEX6A.js';
|
|
2
|
+
import { C as Clock } from './ports-CeqLq31i.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import './primitives-CJ8-rn-f.js';
|
|
5
|
-
import './adapter-
|
|
5
|
+
import './adapter-DiLknaTF.js';
|
|
6
6
|
import './errors.js';
|
|
7
7
|
import './taxonomy-DwhTtuWd.js';
|
|
8
|
-
import './events-
|
|
8
|
+
import './events-CSD_YiJ2.js';
|
|
9
9
|
import './identity-BrVBs901.js';
|
|
10
10
|
import './policy-CimmCfRp.js';
|
|
11
11
|
import './content-M9xIKG7h.js';
|
package/dist/install.js
CHANGED
|
@@ -514,7 +514,25 @@ var stopPayloadSchema2 = z2.object({
|
|
|
514
514
|
* the former without suppressing the latter.
|
|
515
515
|
*/
|
|
516
516
|
stop_hook_active: z2.boolean().optional(),
|
|
517
|
-
usage: claudeUsageSchema.optional()
|
|
517
|
+
usage: claudeUsageSchema.optional(),
|
|
518
|
+
/**
|
|
519
|
+
* The model that answered this turn — harness-supplied, never upstream.
|
|
520
|
+
*
|
|
521
|
+
* Claude Code's `Stop` carries no model id; the per-turn model sits only at
|
|
522
|
+
* `message.model` in the transcript, beside `message.usage`. A wrapping harness
|
|
523
|
+
* that read it (for instance with `readClaudeTranscriptTurn`) attaches it here
|
|
524
|
+
* with `usage`, and it becomes the generation's response model. An unusable
|
|
525
|
+
* value (empty, over 256 characters, not a string) is dropped rather than
|
|
526
|
+
* failing the whole payload: the turn is still worth reporting without it.
|
|
527
|
+
*/
|
|
528
|
+
model: z2.string().min(1).max(256).optional().catch(void 0),
|
|
529
|
+
/**
|
|
530
|
+
* Harness-supplied, never upstream: whether `usage` covers only part of the
|
|
531
|
+
* turn. `true` when it is the last model request alone (the tail fallback),
|
|
532
|
+
* `false` when it sums every request since the previous stop. Exported as
|
|
533
|
+
* `otelhook.usage.partial`; absent means the attacher did not say.
|
|
534
|
+
*/
|
|
535
|
+
usage_partial: z2.boolean().optional().catch(void 0)
|
|
518
536
|
});
|
|
519
537
|
var stopFailurePayloadSchema = z2.object({
|
|
520
538
|
...commonFields2,
|
|
@@ -526,7 +544,11 @@ var stopFailurePayloadSchema = z2.object({
|
|
|
526
544
|
*/
|
|
527
545
|
error_type: z2.string().min(1),
|
|
528
546
|
error_message: z2.string().optional(),
|
|
529
|
-
usage: claudeUsageSchema.optional()
|
|
547
|
+
usage: claudeUsageSchema.optional(),
|
|
548
|
+
/** Harness-supplied, never upstream: see `stopPayloadSchema.model`. */
|
|
549
|
+
model: z2.string().min(1).max(256).optional().catch(void 0),
|
|
550
|
+
/** Harness-supplied, never upstream: see `stopPayloadSchema.usage_partial`. */
|
|
551
|
+
usage_partial: z2.boolean().optional().catch(void 0)
|
|
530
552
|
});
|
|
531
553
|
var claudeHookPayloadSchema = z2.discriminatedUnion("hook_event_name", [
|
|
532
554
|
sessionStartPayloadSchema,
|
|
@@ -2016,6 +2038,13 @@ var generationEndEventSchema = event2({
|
|
|
2016
2038
|
stopReason: nonEmptyStringSchema.optional(),
|
|
2017
2039
|
durationMillis: durationMillisSchema.optional(),
|
|
2018
2040
|
usage: canonicalUsageSchema.optional(),
|
|
2041
|
+
/**
|
|
2042
|
+
* True when `usage` is known to cover only part of the generation (for
|
|
2043
|
+
* example the last model request of a multi-request turn); false when the
|
|
2044
|
+
* provider or harness said it is the whole. Absent: not stated. Meaningless
|
|
2045
|
+
* without `usage`.
|
|
2046
|
+
*/
|
|
2047
|
+
usagePartial: z15.boolean().optional(),
|
|
2019
2048
|
cost: costFactsSchema.optional(),
|
|
2020
2049
|
outputContent: contentFactsSchema.optional()
|
|
2021
2050
|
});
|