@kortyx/telemetry-contracts 0.13.0 → 0.15.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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.15.0](https://github.com/kortyx-io/kortyx/compare/telemetry-contracts-v0.14.0...telemetry-contracts-v0.15.0) (2026-10-08)
4
+
5
+
6
+ ### Features
7
+
8
+ * **telemetry:** preserve complete private error diagnostics ([#290](https://github.com/kortyx-io/kortyx/issues/290)) ([e1c5a88](https://github.com/kortyx-io/kortyx/commit/e1c5a88c494016fd84a1af40579412fcfde31271))
9
+
10
+ ## [0.14.0](https://github.com/kortyx-io/kortyx/compare/telemetry-contracts-v0.13.0...telemetry-contracts-v0.14.0) (2026-10-07)
11
+
12
+
13
+ ### Features
14
+
15
+ * **api:** add typed security and tenant database extensions ([#260](https://github.com/kortyx-io/kortyx/issues/260)) ([47e4928](https://github.com/kortyx-io/kortyx/commit/47e49286f12e4470b3a327e609a65c99678b359f))
16
+ * **studio:** unify extensible workspace shell and scoped settings ([#280](https://github.com/kortyx-io/kortyx/issues/280)) ([cf51257](https://github.com/kortyx-io/kortyx/commit/cf5125765317f67aa27e1dd2f8130315e9632390))
17
+
3
18
  ## [0.13.0](https://github.com/kortyx-io/kortyx/compare/telemetry-contracts-v0.12.0...telemetry-contracts-v0.13.0) (2026-10-03)
4
19
 
5
20
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,209 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ declare const DIAGNOSTIC_LIMITS: {
4
+ readonly bytes: number;
5
+ readonly partBytes: number;
6
+ readonly parts: 128;
7
+ readonly nodes: 10000;
8
+ readonly depth: 128;
9
+ readonly properties: 1000;
10
+ };
11
+ declare const DiagnosticNoteSchema: z.ZodObject<{
12
+ path: z.ZodString;
13
+ reason: z.ZodString;
14
+ originalBytes: z.ZodOptional<z.ZodNumber>;
15
+ originalCount: z.ZodOptional<z.ZodNumber>;
16
+ }, z.core.$strict>;
17
+ declare const DiagnosticContentSchema: z.ZodObject<{
18
+ schemaVersion: z.ZodLiteral<1>;
19
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
20
+ capture: z.ZodObject<{
21
+ status: z.ZodEnum<{
22
+ complete: "complete";
23
+ failed: "failed";
24
+ partial: "partial";
25
+ }>;
26
+ omissions: z.ZodArray<z.ZodObject<{
27
+ path: z.ZodString;
28
+ reason: z.ZodString;
29
+ originalBytes: z.ZodOptional<z.ZodNumber>;
30
+ originalCount: z.ZodOptional<z.ZodNumber>;
31
+ }, z.core.$strict>>;
32
+ redactions: z.ZodArray<z.ZodObject<{
33
+ path: z.ZodString;
34
+ reason: z.ZodString;
35
+ originalBytes: z.ZodOptional<z.ZodNumber>;
36
+ originalCount: z.ZodOptional<z.ZodNumber>;
37
+ }, z.core.$strict>>;
38
+ }, z.core.$strict>;
39
+ }, z.core.$strict>;
40
+ type DiagnosticContent = z.infer<typeof DiagnosticContentSchema>;
41
+ type DiagnosticNote = z.infer<typeof DiagnosticNoteSchema>;
42
+ declare const DiagnosticCorrelationSchema: z.ZodObject<{
43
+ runId: z.ZodOptional<z.ZodString>;
44
+ workflowId: z.ZodOptional<z.ZodString>;
45
+ nodeId: z.ZodOptional<z.ZodString>;
46
+ sessionId: z.ZodOptional<z.ZodString>;
47
+ invocationId: z.ZodOptional<z.ZodString>;
48
+ parentInvocationId: z.ZodOptional<z.ZodString>;
49
+ branchId: z.ZodOptional<z.ZodString>;
50
+ toolCallId: z.ZodOptional<z.ZodString>;
51
+ attemptId: z.ZodOptional<z.ZodString>;
52
+ workflowRevisionId: z.ZodOptional<z.ZodString>;
53
+ traceId: z.ZodOptional<z.ZodString>;
54
+ spanId: z.ZodOptional<z.ZodString>;
55
+ parentSpanId: z.ZodOptional<z.ZodString>;
56
+ }, z.core.$strict>;
57
+ declare const DiagnosticManifestSchema: z.ZodObject<{
58
+ schemaVersion: z.ZodLiteral<1>;
59
+ diagnosticId: z.ZodString;
60
+ occurrenceId: z.ZodString;
61
+ occurredAt: z.ZodString;
62
+ environment: z.ZodString;
63
+ service: z.ZodObject<{
64
+ name: z.ZodString;
65
+ deploymentRef: z.ZodOptional<z.ZodString>;
66
+ }, z.core.$strict>;
67
+ correlation: z.ZodObject<{
68
+ runId: z.ZodOptional<z.ZodString>;
69
+ workflowId: z.ZodOptional<z.ZodString>;
70
+ nodeId: z.ZodOptional<z.ZodString>;
71
+ sessionId: z.ZodOptional<z.ZodString>;
72
+ invocationId: z.ZodOptional<z.ZodString>;
73
+ parentInvocationId: z.ZodOptional<z.ZodString>;
74
+ branchId: z.ZodOptional<z.ZodString>;
75
+ toolCallId: z.ZodOptional<z.ZodString>;
76
+ attemptId: z.ZodOptional<z.ZodString>;
77
+ workflowRevisionId: z.ZodOptional<z.ZodString>;
78
+ traceId: z.ZodOptional<z.ZodString>;
79
+ spanId: z.ZodOptional<z.ZodString>;
80
+ parentSpanId: z.ZodOptional<z.ZodString>;
81
+ }, z.core.$strict>;
82
+ handled: z.ZodBoolean;
83
+ severity: z.ZodEnum<{
84
+ error: "error";
85
+ warning: "warning";
86
+ }>;
87
+ mechanism: z.ZodEnum<{
88
+ span: "span";
89
+ report: "report";
90
+ tool: "tool";
91
+ }>;
92
+ summary: z.ZodObject<{
93
+ type: z.ZodString;
94
+ message: z.ZodString;
95
+ }, z.core.$strict>;
96
+ captureStatus: z.ZodEnum<{
97
+ complete: "complete";
98
+ failed: "failed";
99
+ partial: "partial";
100
+ }>;
101
+ checksum: z.ZodString;
102
+ byteLength: z.ZodNumber;
103
+ partCount: z.ZodNumber;
104
+ }, z.core.$strict>;
105
+ type DiagnosticManifest = z.infer<typeof DiagnosticManifestSchema>;
106
+ declare const DiagnosticPartSchema: z.ZodObject<{
107
+ index: z.ZodNumber;
108
+ data: z.ZodString;
109
+ }, z.core.$strict>;
110
+ declare const DiagnosticResponseSchema: z.ZodObject<{
111
+ manifest: z.ZodObject<{
112
+ schemaVersion: z.ZodLiteral<1>;
113
+ diagnosticId: z.ZodString;
114
+ occurrenceId: z.ZodString;
115
+ occurredAt: z.ZodString;
116
+ environment: z.ZodString;
117
+ service: z.ZodObject<{
118
+ name: z.ZodString;
119
+ deploymentRef: z.ZodOptional<z.ZodString>;
120
+ }, z.core.$strict>;
121
+ correlation: z.ZodObject<{
122
+ runId: z.ZodOptional<z.ZodString>;
123
+ workflowId: z.ZodOptional<z.ZodString>;
124
+ nodeId: z.ZodOptional<z.ZodString>;
125
+ sessionId: z.ZodOptional<z.ZodString>;
126
+ invocationId: z.ZodOptional<z.ZodString>;
127
+ parentInvocationId: z.ZodOptional<z.ZodString>;
128
+ branchId: z.ZodOptional<z.ZodString>;
129
+ toolCallId: z.ZodOptional<z.ZodString>;
130
+ attemptId: z.ZodOptional<z.ZodString>;
131
+ workflowRevisionId: z.ZodOptional<z.ZodString>;
132
+ traceId: z.ZodOptional<z.ZodString>;
133
+ spanId: z.ZodOptional<z.ZodString>;
134
+ parentSpanId: z.ZodOptional<z.ZodString>;
135
+ }, z.core.$strict>;
136
+ handled: z.ZodBoolean;
137
+ severity: z.ZodEnum<{
138
+ error: "error";
139
+ warning: "warning";
140
+ }>;
141
+ mechanism: z.ZodEnum<{
142
+ span: "span";
143
+ report: "report";
144
+ tool: "tool";
145
+ }>;
146
+ summary: z.ZodObject<{
147
+ type: z.ZodString;
148
+ message: z.ZodString;
149
+ }, z.core.$strict>;
150
+ captureStatus: z.ZodEnum<{
151
+ complete: "complete";
152
+ failed: "failed";
153
+ partial: "partial";
154
+ }>;
155
+ checksum: z.ZodString;
156
+ byteLength: z.ZodNumber;
157
+ partCount: z.ZodNumber;
158
+ }, z.core.$strict>;
159
+ state: z.ZodEnum<{
160
+ incomplete: "incomplete";
161
+ pending: "pending";
162
+ expired: "expired";
163
+ available: "available";
164
+ }>;
165
+ receivedParts: z.ZodNumber;
166
+ expiresAt: z.ZodString;
167
+ content: z.ZodNullable<z.ZodObject<{
168
+ schemaVersion: z.ZodLiteral<1>;
169
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
170
+ capture: z.ZodObject<{
171
+ status: z.ZodEnum<{
172
+ complete: "complete";
173
+ failed: "failed";
174
+ partial: "partial";
175
+ }>;
176
+ omissions: z.ZodArray<z.ZodObject<{
177
+ path: z.ZodString;
178
+ reason: z.ZodString;
179
+ originalBytes: z.ZodOptional<z.ZodNumber>;
180
+ originalCount: z.ZodOptional<z.ZodNumber>;
181
+ }, z.core.$strict>>;
182
+ redactions: z.ZodArray<z.ZodObject<{
183
+ path: z.ZodString;
184
+ reason: z.ZodString;
185
+ originalBytes: z.ZodOptional<z.ZodNumber>;
186
+ originalCount: z.ZodOptional<z.ZodNumber>;
187
+ }, z.core.$strict>>;
188
+ }, z.core.$strict>;
189
+ }, z.core.$strict>>;
190
+ contentChecksum: z.ZodNullable<z.ZodString>;
191
+ contentByteLength: z.ZodNullable<z.ZodNumber>;
192
+ }, z.core.$strict>;
193
+ type DiagnosticResponse = z.infer<typeof DiagnosticResponseSchema>;
194
+ /** Shared mandatory policy for diagnostic keys and embedded credential text. */
195
+ declare const isPrivateDiagnosticField: (key: string) => boolean;
196
+ declare function redactDiagnosticText(value: string): string;
197
+ /** A summary intentionally omits custom fields; the diagnostic preserves them. */
198
+ declare function summarizeDiagnostic(data: Record<string, unknown>, depth?: number): {
199
+ type: string;
200
+ message: string;
201
+ stack?: string;
202
+ cause?: unknown;
203
+ };
204
+ /** Defense in depth for JSON received directly by the diagnostic API. */
205
+ declare function redactDiagnosticContent(content: DiagnosticContent): DiagnosticContent;
206
+
3
207
  declare const FEEDBACK_FILTERS: readonly ["positive", "negative", "unrated"];
4
208
  declare const FeedbackSummarySchema: z.ZodObject<{
5
209
  positive: z.ZodNumber;
@@ -236,6 +440,7 @@ declare const ToolObservationSchema: z.ZodObject<{
236
440
  denialCode: z.ZodOptional<z.ZodString>;
237
441
  errorType: z.ZodOptional<z.ZodString>;
238
442
  errorMessage: z.ZodOptional<z.ZodString>;
443
+ diagnosticId: z.ZodOptional<z.ZodString>;
239
444
  durationMs: z.ZodOptional<z.ZodNumber>;
240
445
  workflowId: z.ZodOptional<z.ZodString>;
241
446
  nodeId: z.ZodOptional<z.ZodString>;
@@ -1167,6 +1372,7 @@ declare const StudioChangeSchema: z.ZodObject<{
1167
1372
  emittedAt: z.ZodString;
1168
1373
  organizationId: z.ZodString;
1169
1374
  projectId: z.ZodString;
1375
+ environment: z.ZodOptional<z.ZodString>;
1170
1376
  resources: z.ZodArray<z.ZodEnum<{
1171
1377
  evals: "evals";
1172
1378
  workflows: "workflows";
@@ -2629,13 +2835,13 @@ declare const StudioContextResponseSchema: z.ZodObject<{
2629
2835
  name: z.ZodString;
2630
2836
  }, z.core.$strip>;
2631
2837
  environments: z.ZodArray<z.ZodString>;
2632
- apiKey: z.ZodObject<{
2838
+ apiKey: z.ZodNullable<z.ZodObject<{
2633
2839
  mode: z.ZodEnum<{
2634
2840
  test: "test";
2635
2841
  live: "live";
2636
2842
  }>;
2637
2843
  scopes: z.ZodArray<z.ZodString>;
2638
- }, z.core.$strip>;
2844
+ }, z.core.$strip>>;
2639
2845
  api: z.ZodObject<{
2640
2846
  status: z.ZodLiteral<"ok">;
2641
2847
  service: z.ZodLiteral<"kortyx-api">;
@@ -2674,4 +2880,4 @@ type StudioWorkflowsResponse = z.infer<typeof StudioWorkflowsResponseSchema>;
2674
2880
  type StudioCatalogsResponse = z.infer<typeof StudioCatalogsResponseSchema>;
2675
2881
  type StudioContextResponse = z.infer<typeof StudioContextResponseSchema>;
2676
2882
 
2677
- export { ClearScoreResponseSchema, ClearUserFeedbackRequestSchema, type EnsureWorkflowTopologyRequest, EnsureWorkflowTopologyRequestSchema, type EnsureWorkflowTopologyResponse, EnsureWorkflowTopologyResponseSchema, FEEDBACK_FILTERS, FeedbackReasonSchema, type FeedbackSummary, FeedbackSummarySchema, type KortyxTelemetryEvent, type KortyxTelemetryEventType, type KortyxTelemetryService, type KortyxWorkflowTopologyEdge, type KortyxWorkflowTopologyNode, type KortyxWorkflowTopologyTransition, ReviewVerdictSchema, STUDIO_API_PROTOCOL_VERSION, STUDIO_TIME_RANGES, type StudioCatalogsResponse, StudioCatalogsResponseSchema, type StudioChange, type StudioChangeResource, StudioChangeResourceSchema, StudioChangeSchema, type StudioContextResponse, StudioContextResponseSchema, type StudioDetailEvent, StudioDetailEventSchema, type StudioInterrupt, type StudioInterruptDetailResponse, StudioInterruptDetailResponseSchema, type StudioInterruptInteractionMode, StudioInterruptInteractionModeSchema, type StudioInterruptOption, StudioInterruptOptionSchema, StudioInterruptSchema, type StudioInterruptStatus, StudioInterruptStatusSchema, type StudioInterruptType, StudioInterruptTypeSchema, StudioInterruptValueSchema, type StudioInterruptsResponse, StudioInterruptsResponseSchema, type StudioMetric, StudioMetricSchema, type StudioPricingSource, StudioPricingSourceSchema, type StudioPricingStatus, StudioPricingStatusSchema, type StudioRelease, StudioReleaseDeploymentSchema, StudioReleaseSchema, StudioReleaseVersionSchema, type StudioResumeOutcome, StudioResumeOutcomeSchema, type StudioReviewRequest, StudioReviewRequestSchema, type StudioRun, type StudioRunDetailResponse, StudioRunDetailResponseSchema, StudioRunSchema, type StudioRunStatus, StudioRunStatusSchema, type StudioRunsResponse, StudioRunsResponseSchema, type StudioScore, StudioScoreResponseSchema, StudioScoreSchema, type StudioSession, type StudioSessionDetailResponse, StudioSessionDetailResponseSchema, StudioSessionSchema, type StudioSessionsResponse, StudioSessionsResponseSchema, type StudioTimeRange, type StudioTimeRangeContext, StudioTimeRangeContextSchema, StudioTimeRangeQuerySchema, type StudioTimeRangeResolution, StudioTimeRangeSchema, type StudioTool, StudioToolSchema, type StudioUpdateOperation, StudioUpdateOperationSchema, type StudioUpdateSettings, StudioUpdateSettingsSchema, type StudioUpdateStatus, StudioUpdateStatusSchema, type StudioWorkflow, type StudioWorkflowCall, type StudioWorkflowHealth, StudioWorkflowHealthSchema, type StudioWorkflowInternalEdge, StudioWorkflowInternalEdgeSchema, type StudioWorkflowNode, StudioWorkflowNodeSchema, StudioWorkflowSchema, type StudioWorkflowTransition, StudioWorkflowTransitionSchema, type StudioWorkflowsResponse, StudioWorkflowsResponseSchema, TELEMETRY_EVENT_TYPES, type TelemetryEventBatch, type TelemetryEventBatchResponse, TelemetryEventBatchResponseSchema, TelemetryEventBatchSchema, TelemetryEventSchema, TelemetryEventTypeSchema, type TelemetryPricingHint, TelemetryPricingHintSchema, type TelemetryPricingLineItem, TelemetryPricingLineItemSchema, type TelemetryPricingSource, TelemetryPricingSourceSchema, type TelemetryPricingUnit, TelemetryPricingUnitSchema, type TelemetryPricingUsageType, TelemetryPricingUsageTypeSchema, TelemetryServiceSchema, type TelemetryUnitPrice, TelemetryUnitPriceSchema, type TelemetryUsageItem, TelemetryUsageItemSchema, ToolDiscoverySchema, ToolObservationSchema, ToolOutcomeSchema, type UserFeedbackRequest, UserFeedbackRequestSchema, type WorkflowTool, WorkflowToolSchema, WorkflowTopologyCallSchema, WorkflowTopologyEdgeSchema, WorkflowTopologyNodeSchema, WorkflowTopologyTransitionSchema, newerStudioVersion, projectWorkflowCalls, resolveStudioInterruptStatus, resolveStudioTimeRange, studioUpdateRunning, summarizeUserFeedback };
2883
+ export { ClearScoreResponseSchema, ClearUserFeedbackRequestSchema, DIAGNOSTIC_LIMITS, type DiagnosticContent, DiagnosticContentSchema, DiagnosticCorrelationSchema, type DiagnosticManifest, DiagnosticManifestSchema, type DiagnosticNote, DiagnosticNoteSchema, DiagnosticPartSchema, type DiagnosticResponse, DiagnosticResponseSchema, type EnsureWorkflowTopologyRequest, EnsureWorkflowTopologyRequestSchema, type EnsureWorkflowTopologyResponse, EnsureWorkflowTopologyResponseSchema, FEEDBACK_FILTERS, FeedbackReasonSchema, type FeedbackSummary, FeedbackSummarySchema, type KortyxTelemetryEvent, type KortyxTelemetryEventType, type KortyxTelemetryService, type KortyxWorkflowTopologyEdge, type KortyxWorkflowTopologyNode, type KortyxWorkflowTopologyTransition, ReviewVerdictSchema, STUDIO_API_PROTOCOL_VERSION, STUDIO_TIME_RANGES, type StudioCatalogsResponse, StudioCatalogsResponseSchema, type StudioChange, type StudioChangeResource, StudioChangeResourceSchema, StudioChangeSchema, type StudioContextResponse, StudioContextResponseSchema, type StudioDetailEvent, StudioDetailEventSchema, type StudioInterrupt, type StudioInterruptDetailResponse, StudioInterruptDetailResponseSchema, type StudioInterruptInteractionMode, StudioInterruptInteractionModeSchema, type StudioInterruptOption, StudioInterruptOptionSchema, StudioInterruptSchema, type StudioInterruptStatus, StudioInterruptStatusSchema, type StudioInterruptType, StudioInterruptTypeSchema, StudioInterruptValueSchema, type StudioInterruptsResponse, StudioInterruptsResponseSchema, type StudioMetric, StudioMetricSchema, type StudioPricingSource, StudioPricingSourceSchema, type StudioPricingStatus, StudioPricingStatusSchema, type StudioRelease, StudioReleaseDeploymentSchema, StudioReleaseSchema, StudioReleaseVersionSchema, type StudioResumeOutcome, StudioResumeOutcomeSchema, type StudioReviewRequest, StudioReviewRequestSchema, type StudioRun, type StudioRunDetailResponse, StudioRunDetailResponseSchema, StudioRunSchema, type StudioRunStatus, StudioRunStatusSchema, type StudioRunsResponse, StudioRunsResponseSchema, type StudioScore, StudioScoreResponseSchema, StudioScoreSchema, type StudioSession, type StudioSessionDetailResponse, StudioSessionDetailResponseSchema, StudioSessionSchema, type StudioSessionsResponse, StudioSessionsResponseSchema, type StudioTimeRange, type StudioTimeRangeContext, StudioTimeRangeContextSchema, StudioTimeRangeQuerySchema, type StudioTimeRangeResolution, StudioTimeRangeSchema, type StudioTool, StudioToolSchema, type StudioUpdateOperation, StudioUpdateOperationSchema, type StudioUpdateSettings, StudioUpdateSettingsSchema, type StudioUpdateStatus, StudioUpdateStatusSchema, type StudioWorkflow, type StudioWorkflowCall, type StudioWorkflowHealth, StudioWorkflowHealthSchema, type StudioWorkflowInternalEdge, StudioWorkflowInternalEdgeSchema, type StudioWorkflowNode, StudioWorkflowNodeSchema, StudioWorkflowSchema, type StudioWorkflowTransition, StudioWorkflowTransitionSchema, type StudioWorkflowsResponse, StudioWorkflowsResponseSchema, TELEMETRY_EVENT_TYPES, type TelemetryEventBatch, type TelemetryEventBatchResponse, TelemetryEventBatchResponseSchema, TelemetryEventBatchSchema, TelemetryEventSchema, TelemetryEventTypeSchema, type TelemetryPricingHint, TelemetryPricingHintSchema, type TelemetryPricingLineItem, TelemetryPricingLineItemSchema, type TelemetryPricingSource, TelemetryPricingSourceSchema, type TelemetryPricingUnit, TelemetryPricingUnitSchema, type TelemetryPricingUsageType, TelemetryPricingUsageTypeSchema, TelemetryServiceSchema, type TelemetryUnitPrice, TelemetryUnitPriceSchema, type TelemetryUsageItem, TelemetryUsageItemSchema, ToolDiscoverySchema, ToolObservationSchema, ToolOutcomeSchema, type UserFeedbackRequest, UserFeedbackRequestSchema, type WorkflowTool, WorkflowToolSchema, WorkflowTopologyCallSchema, WorkflowTopologyEdgeSchema, WorkflowTopologyNodeSchema, WorkflowTopologyTransitionSchema, isPrivateDiagnosticField, newerStudioVersion, projectWorkflowCalls, redactDiagnosticContent, redactDiagnosticText, resolveStudioInterruptStatus, resolveStudioTimeRange, studioUpdateRunning, summarizeDiagnostic, summarizeUserFeedback };