@osfactory/otel-hook 0.2.0 → 0.3.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/dist/{adapter-DIgRACtL.d.ts → adapter-DXpNtnaf.d.ts} +2 -2
- package/dist/cli.js +442 -143
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +2 -2
- package/dist/config.js +5 -1
- package/dist/config.js.map +1 -1
- package/dist/{content-CoB7aNP1.d.ts → content-M9xIKG7h.d.ts} +8 -1
- package/dist/{hook-CGpo-vks.d.ts → hook-_mlO3akA.d.ts} +3 -3
- package/dist/index.d.ts +10 -10
- package/dist/index.js +443 -143
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +5 -5
- package/dist/install.js +33 -0
- package/dist/install.js.map +1 -1
- package/dist/integration.d.ts +8 -8
- package/dist/integration.js +115 -39
- package/dist/integration.js.map +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/lifecycle.js +5 -3
- package/dist/lifecycle.js.map +1 -1
- package/dist/model.d.ts +1 -1
- package/dist/model.js +2 -0
- package/dist/model.js.map +1 -1
- package/dist/{otlp-log-sink-CeIFDDpn.d.ts → otlp-log-sink-DTSa0KRF.d.ts} +2 -2
- package/dist/{payload-CHr53E_v.d.ts → payload-BWV5-4n3.d.ts} +1 -1
- package/dist/{policy-D1CrlYn3.d.ts → policy-CimmCfRp.d.ts} +1 -1
- package/dist/privacy.d.ts +4 -4
- package/dist/privacy.js +11 -0
- package/dist/privacy.js.map +1 -1
- package/dist/providers.d.ts +8 -8
- package/dist/providers.js +322 -103
- package/dist/providers.js.map +1 -1
- package/dist/{registry-BzYmC9OC.d.ts → registry-Dqr3VNmT.d.ts} +1 -1
- package/dist/runtime.d.ts +6 -6
- package/dist/runtime.js +13 -1
- package/dist/runtime.js.map +1 -1
- package/dist/{semconv-Baoz-0OI.d.ts → semconv-CIU-2kGO.d.ts} +1 -0
- package/dist/{service-j4jEO6cZ.d.ts → service-CbI9CObT.d.ts} +8 -2
- package/dist/telemetry.d.ts +5 -5
- package/dist/telemetry.js +102 -38
- package/dist/telemetry.js.map +1 -1
- package/dist/testing.d.ts +6 -6
- package/dist/testing.js +338 -104
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
package/dist/install.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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-
|
|
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-BWV5-4n3.js';
|
|
2
2
|
import { C as Clock } from './ports-Q8x0ODhs.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import './primitives-CJ8-rn-f.js';
|
|
5
|
-
import './adapter-
|
|
5
|
+
import './adapter-DXpNtnaf.js';
|
|
6
6
|
import './errors.js';
|
|
7
7
|
import './taxonomy-DwhTtuWd.js';
|
|
8
8
|
import './events-VxBnDFaO.js';
|
|
9
9
|
import './identity-BrVBs901.js';
|
|
10
|
-
import './policy-
|
|
11
|
-
import './content-
|
|
12
|
-
import './service-
|
|
10
|
+
import './policy-CimmCfRp.js';
|
|
11
|
+
import './content-M9xIKG7h.js';
|
|
12
|
+
import './service-CbI9CObT.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Pure merge/removal engine for the "nested command hooks" configuration family.
|
package/dist/install.js
CHANGED
|
@@ -498,7 +498,14 @@ var postCompactPayloadSchema = z2.object({
|
|
|
498
498
|
var stopPayloadSchema2 = z2.object({
|
|
499
499
|
...commonFields2,
|
|
500
500
|
hook_event_name: z2.literal("Stop"),
|
|
501
|
+
/**
|
|
502
|
+
* Interactive Stop field (Claude Code ≥ 2.1.47). Print / `-p` / Agent SDK
|
|
503
|
+
* result messages use `result` instead; `events.ts` reads both (and camelCase
|
|
504
|
+
* `lastAssistantMessage`) through `extractClaudeAssistantText`.
|
|
505
|
+
*/
|
|
501
506
|
last_assistant_message: z2.string().optional(),
|
|
507
|
+
/** Print / `-p` JSON result field; accepted so a harness can attach it as-is. */
|
|
508
|
+
result: z2.string().optional(),
|
|
502
509
|
/**
|
|
503
510
|
* True when this stop fired because a hook continued the turn.
|
|
504
511
|
*
|
|
@@ -2181,6 +2188,32 @@ var ANTIGRAVITY_CAPABILITIES = Object.freeze({
|
|
|
2181
2188
|
deliveryIdentifier: "partial"
|
|
2182
2189
|
});
|
|
2183
2190
|
|
|
2191
|
+
// src/providers/claude/usage.ts
|
|
2192
|
+
var CLAUDE_EXCLUDED_USAGE_COUNTERS = Object.freeze({
|
|
2193
|
+
total_tokens: `usage.total_tokens is outside Claude Code's usage contract (capability reportsProviderTotal=false): it is not read, so providerTotalAgreement stays "unreported"`,
|
|
2194
|
+
reasoning_output_tokens: "usage.reasoning_output_tokens is outside Claude Code's usage contract (capability reportsReasoningOutput=false): Anthropic bills thinking tokens inside output_tokens with no separate counter, so it is not read and reasoningOutputTokens stays 0"
|
|
2195
|
+
});
|
|
2196
|
+
|
|
2197
|
+
// src/providers/claude/payload-normalize.ts
|
|
2198
|
+
var FIELD_ALIASES = Object.freeze({
|
|
2199
|
+
hookEventName: "hook_event_name",
|
|
2200
|
+
sessionId: "session_id",
|
|
2201
|
+
lastAssistantMessage: "last_assistant_message",
|
|
2202
|
+
transcriptPath: "transcript_path",
|
|
2203
|
+
promptId: "prompt_id",
|
|
2204
|
+
toolUseId: "tool_use_id",
|
|
2205
|
+
toolName: "tool_name",
|
|
2206
|
+
toolInput: "tool_input",
|
|
2207
|
+
toolResponse: "tool_response",
|
|
2208
|
+
toolError: "tool_error",
|
|
2209
|
+
stopHookActive: "stop_hook_active",
|
|
2210
|
+
agentId: "agent_id",
|
|
2211
|
+
agentType: "agent_type",
|
|
2212
|
+
errorType: "error_type",
|
|
2213
|
+
errorMessage: "error_message",
|
|
2214
|
+
tokenUsage: "token_usage"
|
|
2215
|
+
});
|
|
2216
|
+
|
|
2184
2217
|
// src/providers/claude/detect.ts
|
|
2185
2218
|
var CLAUDE_CODE_PROVIDER_ID = asProviderId("claude-code");
|
|
2186
2219
|
var KNOWN_EVENT_NAMES = new Set(CLAUDE_HOOK_EVENT_NAMES);
|