@kb-labs/core-types 2.119.0 → 2.119.1-canary.b53bbee1d
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/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../src/telemetry.ts"],"names":[],"mappings":";AAgEO,IAAM,uBAAN,MAAuD;AAAA,EAC5D,MAAM,KAAK,MAAA,EAA+D;AACxE,IAAA,OAAO,EAAE,MAAA,EAAQ,KAAA,EAAO,MAAA,EAAQ,oBAAA,EAAqB;AAAA,EACvD;AACF;AAKO,SAAS,0BAAA,GAA+C;AAC7D,EAAA,OAAO,IAAI,oBAAA,EAAqB;AAClC","file":"index.js","sourcesContent":["/**\n * @module @kb-labs/core-types/telemetry\n * Telemetry abstraction for KB Labs ecosystem\n * \n * This module provides a product-agnostic interface for telemetry/analytics,\n * allowing core packages to emit events without depending on specific implementations.\n */\n\n/**\n * Result of emitting a telemetry event\n */\nexport interface TelemetryEmitResult {\n /** Whether the event was queued for delivery */\n queued: boolean;\n /** Reason if event was not queued */\n reason?: string;\n}\n\n/**\n * Telemetry event payload (product-agnostic)\n */\nexport interface TelemetryEvent {\n /** Event type/name */\n type?: string;\n /** Event payload data */\n payload?: Record<string, unknown>;\n /** Run/execution ID for grouping events */\n runId?: string;\n /** Actor information */\n actor?: {\n type: string;\n id: string;\n name?: string;\n };\n /** Context information */\n ctx?: {\n workspace?: string;\n command?: string;\n [key: string]: unknown;\n };\n /** Timestamp (ISO string) */\n timestamp?: string;\n /** Additional event data */\n [key: string]: unknown;\n}\n\n/**\n * Telemetry emitter interface\n * \n * Implementations should never throw - failures should be handled gracefully\n * and returned as part of TelemetryEmitResult.\n */\nexport interface TelemetryEmitter {\n /**\n * Emit a telemetry event\n * @param event Event to emit\n * @returns Result indicating success/failure\n */\n emit(event: Partial<TelemetryEvent>): Promise<TelemetryEmitResult>;\n}\n\n/**\n * No-op telemetry emitter (for when telemetry is disabled or not available)\n */\nexport class NoOpTelemetryEmitter implements TelemetryEmitter {\n async emit(_event: Partial<TelemetryEvent>): Promise<TelemetryEmitResult> {\n return { queued: false, reason: 'Telemetry disabled' };\n }\n}\n\n/**\n * Create a no-op telemetry emitter\n */\nexport function createNoOpTelemetryEmitter(): TelemetryEmitter {\n return new NoOpTelemetryEmitter();\n}\n\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kb-labs/core-types",
|
|
3
3
|
"description": "Shared TypeScript type definitions for KB Labs core packages",
|
|
4
|
-
"version": "2.119.
|
|
4
|
+
"version": "2.119.1-canary.b53bbee1d",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"tsup": "^8.5.0",
|
|
27
27
|
"typescript": "^5.6.3",
|
|
28
28
|
"vitest": "^3.2.6",
|
|
29
|
-
"@kb-labs/devkit": "2.119.
|
|
29
|
+
"@kb-labs/devkit": "2.119.1-canary.b53bbee1d"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=24.0.0",
|