@odigos/ui-kit 0.0.285 → 0.0.286-dev.520

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.
Files changed (136) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/docs/api-context.md +1 -1
  3. package/lib/chunks/{helpers-C5bkjRbO.js → helpers-B0SJ6hqm.js} +2 -2
  4. package/lib/chunks/index-9H2LDuOq.js +311 -0
  5. package/lib/chunks/source-instrument-form-context-BF70uJ_R.js +5 -0
  6. package/lib/chunks/ui-components-DqG0z5U0.js +1878 -0
  7. package/lib/components/_cards/data-card/index.d.ts +6 -1
  8. package/lib/components/_cards/text-card/index.d.ts +3 -0
  9. package/lib/components/drawer/header/index.d.ts +2 -0
  10. package/lib/components/hover-actions/index.d.ts +1 -1
  11. package/lib/components/index.d.ts +2 -0
  12. package/lib/components/info-row/index.d.ts +11 -0
  13. package/lib/components/input/index.d.ts +2 -0
  14. package/lib/components/table/index.d.ts +10 -0
  15. package/lib/components/table/styled.d.ts +11 -0
  16. package/lib/components/table/table-rows/index.d.ts +6 -1
  17. package/lib/components/table/types.d.ts +11 -2
  18. package/lib/components/trace-view/index.d.ts +4 -0
  19. package/lib/components/trace-view/styled.d.ts +43 -0
  20. package/lib/components/trace-view/types.d.ts +46 -0
  21. package/lib/components.js +1 -1
  22. package/lib/constants.js +1 -1
  23. package/lib/containers/_drawers/edit-source-drawer/overview/runtime-card.d.ts +5 -2
  24. package/lib/containers/_drawers/edit-source-drawer/pods/containers-card/process-card.d.ts +1 -7
  25. package/lib/containers/index.d.ts +1 -0
  26. package/lib/containers/insights/consts.d.ts +6 -0
  27. package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/animated-edge.d.ts +10 -0
  28. package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/blast-radius-node.d.ts +6 -0
  29. package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/helpers.d.ts +28 -0
  30. package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/index.d.ts +7 -0
  31. package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/types.d.ts +19 -0
  32. package/lib/containers/insights/findings/drawer/anomaly/anomaly-trace-compare/helpers.d.ts +15 -0
  33. package/lib/containers/insights/findings/drawer/anomaly/anomaly-trace-compare/index.d.ts +7 -0
  34. package/lib/containers/insights/findings/drawer/anomaly/index.d.ts +15 -0
  35. package/lib/containers/insights/findings/drawer/anomaly/why-this-fired/index.d.ts +6 -0
  36. package/lib/containers/insights/findings/drawer/helpers.d.ts +11 -0
  37. package/lib/containers/insights/findings/drawer/index.d.ts +6 -0
  38. package/lib/containers/insights/findings/drawer/violation/index.d.ts +6 -0
  39. package/lib/containers/insights/findings/drawer/violation/violation-trace-view/index.d.ts +8 -0
  40. package/lib/containers/insights/findings/helpers.d.ts +47 -0
  41. package/lib/containers/insights/findings/index.d.ts +2 -0
  42. package/lib/containers/insights/index.d.ts +6 -0
  43. package/lib/containers/insights/insights-context.d.ts +44 -0
  44. package/lib/containers/insights/overview/contained-table-and-heading/index.d.ts +18 -0
  45. package/lib/containers/insights/overview/index.d.ts +6 -0
  46. package/lib/containers/insights/settings-and-configurations/constants.d.ts +16 -0
  47. package/lib/containers/insights/settings-and-configurations/content-panel/index.d.ts +11 -0
  48. package/lib/containers/insights/settings-and-configurations/index.d.ts +2 -0
  49. package/lib/containers/insights/settings-and-configurations/menu-config.d.ts +24 -0
  50. package/lib/containers/insights/settings-and-configurations/panels/detection/constants.d.ts +40 -0
  51. package/lib/containers/insights/settings-and-configurations/panels/detection/create-override-panel.d.ts +14 -0
  52. package/lib/containers/insights/settings-and-configurations/panels/detection/index.d.ts +2 -0
  53. package/lib/containers/insights/settings-and-configurations/panels/detection/mappers.d.ts +12 -0
  54. package/lib/containers/insights/settings-and-configurations/panels/detection/mock.d.ts +4 -0
  55. package/lib/containers/insights/settings-and-configurations/panels/detection/policies-menu.d.ts +10 -0
  56. package/lib/containers/insights/settings-and-configurations/panels/detection/policy-editor.d.ts +8 -0
  57. package/lib/containers/insights/settings-and-configurations/panels/detection/policy-list-item.d.ts +8 -0
  58. package/lib/containers/insights/settings-and-configurations/panels/detection/risk-levels.d.ts +15 -0
  59. package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/constants.d.ts +16 -0
  60. package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/default-catalog.d.ts +3 -0
  61. package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/helpers.d.ts +30 -0
  62. package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/index.d.ts +10 -0
  63. package/lib/containers/insights/settings-and-configurations/panels/detection/signal-weights-panel.d.ts +13 -0
  64. package/lib/containers/insights/settings-and-configurations/panels/detection/signal-weights.d.ts +17 -0
  65. package/lib/containers/insights/settings-and-configurations/panels/detection/types.d.ts +29 -0
  66. package/lib/containers/insights/settings-and-configurations/panels/guardrails/constants.d.ts +35 -0
  67. package/lib/containers/insights/settings-and-configurations/panels/guardrails/create-panel.d.ts +17 -0
  68. package/lib/containers/insights/settings-and-configurations/panels/guardrails/edit-panel.d.ts +10 -0
  69. package/lib/containers/insights/settings-and-configurations/panels/guardrails/facet-section.d.ts +13 -0
  70. package/lib/containers/insights/settings-and-configurations/panels/guardrails/guardrail-list-item.d.ts +8 -0
  71. package/lib/containers/insights/settings-and-configurations/panels/guardrails/guardrails-menu.d.ts +9 -0
  72. package/lib/containers/insights/settings-and-configurations/panels/guardrails/index.d.ts +2 -0
  73. package/lib/containers/insights/settings-and-configurations/panels/guardrails/mappers.d.ts +18 -0
  74. package/lib/containers/insights/settings-and-configurations/panels/guardrails/types.d.ts +10 -0
  75. package/lib/containers/insights/settings-and-configurations/panels/learning/constants.d.ts +82 -0
  76. package/lib/containers/insights/settings-and-configurations/panels/learning/create-override-panel.d.ts +21 -0
  77. package/lib/containers/insights/settings-and-configurations/panels/learning/index.d.ts +2 -0
  78. package/lib/containers/insights/settings-and-configurations/panels/learning/mappers.d.ts +38 -0
  79. package/lib/containers/insights/settings-and-configurations/panels/learning/policies-menu.d.ts +10 -0
  80. package/lib/containers/insights/settings-and-configurations/panels/learning/policy-editor.d.ts +9 -0
  81. package/lib/containers/insights/settings-and-configurations/panels/learning/policy-list-item.d.ts +8 -0
  82. package/lib/containers/insights/settings-and-configurations/panels/learning/types.d.ts +31 -0
  83. package/lib/containers/insights/settings-and-configurations/panels/storage/constants.d.ts +52 -0
  84. package/lib/containers/insights/settings-and-configurations/panels/storage/formatters.d.ts +5 -0
  85. package/lib/containers/insights/settings-and-configurations/panels/storage/index.d.ts +2 -0
  86. package/lib/containers/insights/settings-and-configurations/panels/storage/layout.d.ts +18 -0
  87. package/lib/containers/insights/settings-and-configurations/panels/storage/mappers.d.ts +27 -0
  88. package/lib/containers/insights/settings-and-configurations/panels/system/constants.d.ts +31 -0
  89. package/lib/containers/insights/settings-and-configurations/panels/system/index.d.ts +2 -0
  90. package/lib/containers/insights/settings-and-configurations/settings-menu/category-header.d.ts +8 -0
  91. package/lib/containers/insights/settings-and-configurations/settings-menu/index.d.ts +7 -0
  92. package/lib/containers/insights/transactions/drawer/baselines/helpers.d.ts +16 -0
  93. package/lib/containers/insights/transactions/drawer/baselines/index.d.ts +5 -0
  94. package/lib/containers/insights/transactions/drawer/index.d.ts +2 -0
  95. package/lib/containers/insights/transactions/drawer/observations/helpers.d.ts +11 -0
  96. package/lib/containers/insights/transactions/drawer/observations/index.d.ts +5 -0
  97. package/lib/containers/insights/transactions/helpers.d.ts +35 -0
  98. package/lib/containers/insights/transactions/index.d.ts +2 -0
  99. package/lib/containers.js +1381 -261
  100. package/lib/contexts/odigos-api/capabilities.d.ts +2 -0
  101. package/lib/contexts/odigos-api/hooks/use-insights-api.d.ts +153 -0
  102. package/lib/contexts/odigos-api/index.d.ts +2 -1
  103. package/lib/contexts/odigos-api/internal/notify.d.ts +4 -3
  104. package/lib/contexts/odigos-api/types.d.ts +201 -1
  105. package/lib/contexts/odigos-api/use-odigos-api.d.ts +2 -0
  106. package/lib/contexts.js +1 -1
  107. package/lib/functions/index.d.ts +1 -0
  108. package/lib/functions/parse-raw-otlp/index.d.ts +43 -0
  109. package/lib/functions.js +1 -1
  110. package/lib/hooks/useCopy.d.ts +2 -3
  111. package/lib/hooks/useTimeAgo.d.ts +4 -0
  112. package/lib/hooks.js +1 -1
  113. package/lib/icons/common/index.d.ts +3 -0
  114. package/lib/icons/common/insights-findings-icon/index.d.ts +2 -0
  115. package/lib/icons/common/insights-transactions-icon/index.d.ts +2 -0
  116. package/lib/icons/common/threat-detection-icon/index.d.ts +2 -0
  117. package/lib/icons/overview/index.d.ts +1 -0
  118. package/lib/icons/overview/insights-icon/index.d.ts +2 -0
  119. package/lib/icons.js +1 -1
  120. package/lib/snippets/code-modal/index.d.ts +9 -0
  121. package/lib/snippets/index.d.ts +1 -0
  122. package/lib/snippets/trace-modal/index.d.ts +8 -0
  123. package/lib/snippets.js +1 -1
  124. package/lib/store.js +1 -1
  125. package/lib/theme/palettes/index.d.ts +7 -1
  126. package/lib/theme.js +1 -1
  127. package/lib/types/common/index.d.ts +2 -0
  128. package/lib/types/index.d.ts +1 -0
  129. package/lib/types/insights/index.d.ts +598 -0
  130. package/lib/types/workload/index.d.ts +14 -0
  131. package/lib/types.js +1 -1
  132. package/lib/visuals.js +1 -1
  133. package/package.json +1 -1
  134. package/lib/chunks/index-DBZ1mLhG.js +0 -298
  135. package/lib/chunks/source-instrument-form-context-CnRKQq6W.js +0 -5
  136. package/lib/chunks/ui-components-Ci-Vq1Dl.js +0 -1620
@@ -0,0 +1,9 @@
1
+ import { type FC } from 'react';
2
+ import { type CodeProps } from '../../components';
3
+ export interface CodeModalProps extends Omit<CodeProps, 'language' | 'code'> {
4
+ isOpen: boolean;
5
+ onClose: () => void;
6
+ language?: string | null;
7
+ code?: string | null;
8
+ }
9
+ export declare const CodeModal: FC<CodeModalProps>;
@@ -1,6 +1,7 @@
1
1
  export * from './actions';
2
2
  export * from './animated-collapse';
3
3
  export * from './cancel-modal';
4
+ export * from './code-modal';
4
5
  export * from './colored-span';
5
6
  export * from './connector-created-modal';
6
7
  export * from './delete-modal';
@@ -0,0 +1,8 @@
1
+ import { type FC } from 'react';
2
+ export interface TraceModalProps {
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ transactionId?: string | null;
6
+ traceId?: string | null;
7
+ }
8
+ export declare const TraceModal: FC<TraceModalProps>;
package/lib/snippets.js CHANGED
@@ -1 +1 @@
1
- export{A as ActionType,a as Actions,R as RichTitle}from"./chunks/ui-components-Ci-Vq1Dl.js";export{A as AnimatedCollapse,C as CancelModal,a as ConnectorCreatedModal,D as DURATION_OPTIONS,b as DeleteModal,c as DurationErrorsSection,d as DynamicActionFields,e as DynamicField,f as DynamicFields,E as EnableDisableSegment,I as InstrumentationPreviewSection,N as NOISY_PERCENTAGE_OPTIONS,O as OdigosLogoTextByTier,g as OperationSection,P as PERCENTAGE_OPTIONS,h as PercentageSection,i as PresetWithCustomInput,R as RuleInfoSection,j as RuleTypeSection,S as SamplingPreviewSection,k as SignalsCheckboxList,l as SourceScopeSection,U as UpgradeModal,W as WIDE_DRAWER_WIDTH,m as WideDrawer,Y as YamlSectionCard}from"./chunks/index-DBZ1mLhG.js";export{C as ColoredSpan,a as ColoredSpanVariant}from"./chunks/helpers-C5bkjRbO.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
1
+ export{A as ActionType,a as Actions,R as RichTitle}from"./chunks/ui-components-DqG0z5U0.js";export{A as AnimatedCollapse,C as CancelModal,a as CodeModal,b as ConnectorCreatedModal,D as DURATION_OPTIONS,c as DeleteModal,d as DurationErrorsSection,e as DynamicActionFields,f as DynamicField,g as DynamicFields,E as EnableDisableSegment,I as InstrumentationPreviewSection,N as NOISY_PERCENTAGE_OPTIONS,O as OdigosLogoTextByTier,h as OperationSection,P as PERCENTAGE_OPTIONS,i as PercentageSection,j as PresetWithCustomInput,R as RuleInfoSection,k as RuleTypeSection,S as SamplingPreviewSection,l as SignalsCheckboxList,m as SourceScopeSection,U as UpgradeModal,W as WIDE_DRAWER_WIDTH,n as WideDrawer,Y as YamlSectionCard}from"./chunks/index-9H2LDuOq.js";export{C as ColoredSpan,a as ColoredSpanVariant}from"./chunks/helpers-B0SJ6hqm.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
package/lib/store.js CHANGED
@@ -1 +1 @@
1
- export{dI as DrawerType,bg as ProgressKeys,f0 as getDrawerTypeForAdd,cA as getDrawerTypeForEdit,gL as useDarkMode,bd as useDataStreamStore,cv as useDrawerStore,eX as useFilterStore,b8 as useNotificationStore,be as useProgressStore,f1 as useSelectedStore,bf as useSetupStore}from"./chunks/ui-components-Ci-Vq1Dl.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
1
+ export{dK as DrawerType,bi as ProgressKeys,fm as getDrawerTypeForAdd,cD as getDrawerTypeForEdit,h6 as useDarkMode,bf as useDataStreamStore,cy as useDrawerStore,fh as useFilterStore,ba as useNotificationStore,bg as useProgressStore,fn as useSelectedStore,bh as useSetupStore}from"./chunks/ui-components-DqG0z5U0.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
@@ -44,6 +44,10 @@ export declare const baseTheme: {
44
44
  '900': string;
45
45
  '1000': string;
46
46
  };
47
+ mint: {
48
+ '500': string;
49
+ '1000': string;
50
+ };
47
51
  grey: {
48
52
  '25': string;
49
53
  '50': string;
@@ -103,6 +107,7 @@ export declare const baseTheme: {
103
107
  '300': string;
104
108
  '400': string;
105
109
  '500': string;
110
+ '550': string;
106
111
  '600': string;
107
112
  '700': string;
108
113
  '800': string;
@@ -115,9 +120,10 @@ export declare const baseTheme: {
115
120
  pink: {
116
121
  '500': string;
117
122
  '600': string;
123
+ '1000': string;
118
124
  };
119
125
  orange: {
120
- '600': string;
126
+ '500': string;
121
127
  };
122
128
  };
123
129
  zIndex: {
package/lib/theme.js CHANGED
@@ -1 +1 @@
1
- export{gV as Provider,gW as animations,gX as opacity,gY as palettes}from"./chunks/ui-components-Ci-Vq1Dl.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
1
+ export{hh as Provider,hi as animations,hj as opacity,hk as palettes}from"./chunks/ui-components-DqG0z5U0.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
@@ -88,6 +88,8 @@ export interface FetchedConfig {
88
88
  installationStatus: InstallationStatus;
89
89
  platformType?: PlatformType;
90
90
  odigosVersion?: string;
91
+ /** True when the Insights feature is enabled on the cluster. */
92
+ insightsEnabled?: boolean;
91
93
  }
92
94
  export declare enum ProgrammingLanguages {
93
95
  Go = "go",
@@ -19,5 +19,6 @@ export * from './sources';
19
19
  export * from './tokens';
20
20
  export * from './traces';
21
21
  export * from './sampling';
22
+ export * from './insights';
22
23
  export * from './recommendations';
23
24
  export * from './workload';
@@ -0,0 +1,598 @@
1
+ /**
2
+ * Insights types — mirror of `frontend/graph/insights.graphqls`
3
+ * in the odigos OSS repo. Field names and enums match the GraphQL schema 1:1.
4
+ */
5
+ export declare enum InsightsEntityTypes {
6
+ Policy = "InsightsPolicy",
7
+ Finding = "Finding"
8
+ }
9
+ export declare enum InsightsTransactionKind {
10
+ HTTP = "HTTP",
11
+ GRPC = "GRPC",
12
+ CONSUMER = "CONSUMER",
13
+ PRODUCER = "PRODUCER",
14
+ CRON = "CRON",
15
+ INTERNAL = "INTERNAL"
16
+ }
17
+ export declare enum InsightsDeviationClass {
18
+ D1_call_edges = "D1_call_edges",
19
+ D2_egress = "D2_egress",
20
+ D3_latency = "D3_latency",
21
+ D4_args_returns = "D4_args_returns",
22
+ D5_libraries = "D5_libraries",
23
+ D6_attr_relations = "D6_attr_relations",
24
+ D7_db_access = "D7_db_access",
25
+ D8_payload_size = "D8_payload_size"
26
+ }
27
+ export declare enum InsightsSampleReason {
28
+ Example = "example",
29
+ AnomalyEvidence = "anomaly_evidence",
30
+ GuardrailEvidence = "guardrail_evidence"
31
+ }
32
+ export declare enum InsightsPolicyScope {
33
+ Global = "global",
34
+ Service = "service",
35
+ Transaction = "transaction"
36
+ }
37
+ export declare enum InsightsSeverity {
38
+ Info = "info",
39
+ Low = "low",
40
+ Medium = "medium",
41
+ High = "high",
42
+ Critical = "critical"
43
+ }
44
+ export declare enum InsightsFindingKind {
45
+ Anomaly = "anomaly",
46
+ Violation = "violation"
47
+ }
48
+ export declare enum InsightsAnomalyStatus {
49
+ Open = "open",
50
+ Baselined = "baselined",
51
+ Dismissed = "dismissed"
52
+ }
53
+ export declare enum InsightsViolationStatus {
54
+ Open = "open",
55
+ Allowed = "allowed",
56
+ Dismissed = "dismissed"
57
+ }
58
+ export declare enum InsightsRuleMode {
59
+ Suggest = "suggest",
60
+ Enforce = "enforce"
61
+ }
62
+ export declare enum InsightsAnomalyResolution {
63
+ Accept = "accept",
64
+ Dismiss = "dismiss",
65
+ Reopen = "reopen"
66
+ }
67
+ export declare enum InsightsBulkResolution {
68
+ Accept = "accept",
69
+ Dismiss = "dismiss"
70
+ }
71
+ export declare enum InsightsLearningMode {
72
+ All = "all",
73
+ Any = "any",
74
+ KOf = "k_of"
75
+ }
76
+ /** Coarse learning state for one baseline class (from GET …/baseline `learning.phase`). */
77
+ export declare enum InsightsBaselineLearningPhase {
78
+ Promoted = "promoted",
79
+ Empty = "empty",
80
+ Learning = "learning"
81
+ }
82
+ export declare enum InsightsLearningConditionType {
83
+ MinObservations = "min_observations",
84
+ MinDuration = "min_duration",
85
+ StableObservations = "stable_observations",
86
+ StableDuration = "stable_duration"
87
+ }
88
+ export declare enum InsightsStorageHealthStatus {
89
+ Healthy = "healthy",
90
+ Degraded = "degraded",
91
+ Critical = "critical",
92
+ Unreachable = "unreachable"
93
+ }
94
+ export declare enum InsightsStorageDiskStatus {
95
+ Ok = "ok",
96
+ Warning = "warning",
97
+ Critical = "critical"
98
+ }
99
+ export interface InsightsServiceStat {
100
+ namespace: string;
101
+ service: string;
102
+ transactionCount: number;
103
+ volume: number;
104
+ lastSeen: string;
105
+ }
106
+ export interface InsightsServiceProfile {
107
+ namespace: string;
108
+ service: string;
109
+ callers: string[];
110
+ callees: string[];
111
+ egress: string[];
112
+ }
113
+ export interface InsightsBlastRadiusNode {
114
+ /** Empty for synthetic hubs (e.g. `user`) and some virtual leaves. */
115
+ namespace: string;
116
+ service: string;
117
+ /** True for an uninstrumented dependency (database, queue, external API). */
118
+ isVirtual: boolean;
119
+ }
120
+ export interface InsightsBlastRadiusEdge {
121
+ clientNamespace?: string | null;
122
+ clientService: string;
123
+ serverNamespace?: string | null;
124
+ serverService: string;
125
+ connectionType: string;
126
+ requestCount: number;
127
+ failedCount: number;
128
+ lastSeen: string;
129
+ }
130
+ /** Neighborhood around an anchor service from the gateway servicegraph connector. */
131
+ export interface InsightsBlastRadiusSubgraph {
132
+ root: InsightsBlastRadiusNode;
133
+ nodes: InsightsBlastRadiusNode[];
134
+ edges: InsightsBlastRadiusEdge[];
135
+ }
136
+ export interface InsightsTransactionStat {
137
+ id: string;
138
+ service: string;
139
+ namespace: string;
140
+ operation: string;
141
+ kind: InsightsTransactionKind;
142
+ volume: number;
143
+ lastSeen: string;
144
+ hasBaseline?: boolean | null;
145
+ promoted?: boolean | null;
146
+ }
147
+ export interface InsightsTransaction {
148
+ id: string;
149
+ service: string;
150
+ namespace: string;
151
+ operation: string;
152
+ kind: InsightsTransactionKind;
153
+ }
154
+ /** One stability dimension (observations count, or duration in minutes). */
155
+ export interface InsightsBaselineStabilityProgress {
156
+ current: number;
157
+ target: number;
158
+ drivesPromotion: boolean;
159
+ met: boolean;
160
+ }
161
+ /** Both stability signals — always present for UI progress copy. */
162
+ export interface InsightsBaselineLearningStability {
163
+ observations: InsightsBaselineStabilityProgress;
164
+ duration: InsightsBaselineStabilityProgress;
165
+ }
166
+ /**
167
+ * Computed learning/stability snapshot against the resolved learning policy.
168
+ * Always present on baseline rows (including empty placeholders).
169
+ */
170
+ export interface InsightsBaselineLearning {
171
+ phase: InsightsBaselineLearningPhase;
172
+ observationsSinceLastChange: number;
173
+ quietMinutes: number;
174
+ mode: InsightsLearningMode;
175
+ readyToPromote: boolean;
176
+ stability: InsightsBaselineLearningStability;
177
+ }
178
+ export interface InsightsBaselineClass {
179
+ transactionId: string;
180
+ class: InsightsDeviationClass;
181
+ /** JSON-encoded baseline data; shape varies per deviation class. */
182
+ data?: string | null;
183
+ dataSchemaVersion?: number | null;
184
+ observationCount: number;
185
+ promoted: boolean;
186
+ learningStartedAt?: string | null;
187
+ lastChangedAt?: string | null;
188
+ observationCountAtLastChange?: number | null;
189
+ learning: InsightsBaselineLearning;
190
+ }
191
+ export interface InsightsPromoteResult {
192
+ transactionId: string;
193
+ class: InsightsDeviationClass;
194
+ promoted: boolean;
195
+ }
196
+ export interface InsightsObservationSummary {
197
+ traceId: string;
198
+ transactionId: string;
199
+ observedAt: string;
200
+ durationMs: number;
201
+ sampleReason: InsightsSampleReason;
202
+ }
203
+ export interface InsightsObservation {
204
+ traceId: string;
205
+ transactionId: string;
206
+ observedAt: string;
207
+ durationMs: number;
208
+ sampleReason: InsightsSampleReason;
209
+ /** Base64-encoded OTLP protobuf; only on the single-observation query. */
210
+ rawOtlp: string;
211
+ }
212
+ export interface InsightsPolicy {
213
+ id: string;
214
+ name: string;
215
+ enabled: boolean;
216
+ fireAtScore: number;
217
+ /** JSON-encoded map[string]int of per-signal weights. */
218
+ signalWeights?: string | null;
219
+ /** JSON-encoded map[string][]string of enricher keyword lists. */
220
+ enricherLists?: string | null;
221
+ scope: InsightsPolicyScope;
222
+ scopeKey: string;
223
+ }
224
+ export interface InsightsPolicyInput {
225
+ /** Server-assigned; omit on create (the policy key is scope + scopeKey). */
226
+ id?: string | null;
227
+ name: string;
228
+ enabled: boolean;
229
+ fireAtScore: number;
230
+ signalWeights?: string | null;
231
+ enricherLists?: string | null;
232
+ scope: InsightsPolicyScope;
233
+ scopeKey: string;
234
+ }
235
+ export interface InsightsLearningCondition {
236
+ type: InsightsLearningConditionType;
237
+ minObservations?: number | null;
238
+ minDurationMinutes?: number | null;
239
+ stableObservations?: number | null;
240
+ stableMinutes?: number | null;
241
+ }
242
+ export interface InsightsLearningPolicy {
243
+ class: InsightsDeviationClass;
244
+ mode: InsightsLearningMode;
245
+ conditions?: InsightsLearningCondition[] | null;
246
+ minMatches?: number | null;
247
+ scope: InsightsPolicyScope;
248
+ scopeKey: string;
249
+ }
250
+ export interface InsightsLearningConditionInput {
251
+ type: InsightsLearningConditionType;
252
+ minObservations?: number | null;
253
+ minDurationMinutes?: number | null;
254
+ stableObservations?: number | null;
255
+ stableMinutes?: number | null;
256
+ }
257
+ export interface InsightsLearningPolicyInput {
258
+ class: InsightsDeviationClass;
259
+ mode: InsightsLearningMode;
260
+ conditions?: InsightsLearningConditionInput[] | null;
261
+ minMatches?: number | null;
262
+ scope: InsightsPolicyScope;
263
+ scopeKey: string;
264
+ }
265
+ export interface InsightsFinding {
266
+ kind: InsightsFindingKind;
267
+ service: string;
268
+ namespace: string;
269
+ title: string;
270
+ offending?: string | null;
271
+ score: number;
272
+ severity: InsightsSeverity;
273
+ occurrences: number;
274
+ lastSeen: string;
275
+ /** Union of anomaly statuses and violation statuses. */
276
+ status: InsightsViolationStatus | InsightsAnomalyStatus;
277
+ transactionId?: string | null;
278
+ signature?: string | null;
279
+ /** Anomaly signal classes; empty/absent for violations. */
280
+ triggeredClasses?: InsightsDeviationClass[] | null;
281
+ scopeKey?: string | null;
282
+ ruleKey?: string | null;
283
+ }
284
+ export interface InsightsRiskSignal {
285
+ source: string;
286
+ category: string;
287
+ weight: number;
288
+ confidence: number;
289
+ contribution: number;
290
+ rationale?: string | null;
291
+ mitre?: string | null;
292
+ owasp?: string | null;
293
+ }
294
+ export interface InsightsRiskAssessment {
295
+ score: number;
296
+ severity: InsightsSeverity;
297
+ correlated: boolean;
298
+ correlationBonus: number;
299
+ fireAtScore: number;
300
+ categories?: string[] | null;
301
+ signals: InsightsRiskSignal[];
302
+ }
303
+ export interface InsightsAnomalySummary {
304
+ transactionId: string;
305
+ signature: string;
306
+ service: string;
307
+ namespace: string;
308
+ operation?: string | null;
309
+ kind?: InsightsTransactionKind | null;
310
+ triggeredClasses: InsightsDeviationClass[];
311
+ offending?: string | null;
312
+ policyId?: string | null;
313
+ occurrences: number;
314
+ maxScore: number;
315
+ severity: InsightsSeverity;
316
+ firstSeen?: string | null;
317
+ lastSeen?: string | null;
318
+ lastTraceId?: string | null;
319
+ status: InsightsAnomalyStatus;
320
+ }
321
+ export declare enum InsightsAnomalyClassFindingKind {
322
+ Structural = "structural",
323
+ Metric = "metric"
324
+ }
325
+ export interface InsightsAnomalySpanHighlight {
326
+ spanId: string;
327
+ /** high | medium | low */
328
+ severity: string;
329
+ reason: string;
330
+ }
331
+ export interface InsightsAnomalyAttrHighlight {
332
+ spanId: string;
333
+ key: string;
334
+ value: string;
335
+ }
336
+ export interface InsightsAnomalyMetricComparison {
337
+ observed: number;
338
+ baseline: number;
339
+ /** us | bytes */
340
+ unit: string;
341
+ }
342
+ /** Render-ready explanation of one deviation class within an anomaly issue. */
343
+ export interface InsightsAnomalyClassFinding {
344
+ class: InsightsDeviationClass;
345
+ kind: InsightsAnomalyClassFindingKind;
346
+ title: string;
347
+ summary: string;
348
+ spanHighlights?: InsightsAnomalySpanHighlight[] | null;
349
+ attrHighlights?: InsightsAnomalyAttrHighlight[] | null;
350
+ metric?: InsightsAnomalyMetricComparison | null;
351
+ /** JSON-encoded original per-class evidence blob (fallback / debug). */
352
+ rawEvidence?: string | null;
353
+ }
354
+ export interface InsightsAnomalyIssue extends InsightsAnomalySummary {
355
+ /** JSON-encoded evidence keyed by deviation class. */
356
+ evidence: string;
357
+ risk?: InsightsRiskAssessment | null;
358
+ /** One render-ready finding per triggered class. Always present on detail. */
359
+ classFindings: InsightsAnomalyClassFinding[];
360
+ /** Evidence sample including rawOtlp. Omitted when no sample was retained. */
361
+ anomalyTrace?: InsightsObservation | null;
362
+ /** Learning-phase example sample including rawOtlp for baseline compare. */
363
+ baselineTrace?: InsightsObservation | null;
364
+ }
365
+ export interface InsightsAnomalyRefInput {
366
+ transactionId: string;
367
+ signature: string;
368
+ }
369
+ export interface InsightsBulkResolveResult {
370
+ resolution: string;
371
+ resolved: number;
372
+ }
373
+ export interface InsightsGuardrailRule {
374
+ key: string;
375
+ label: string;
376
+ mode: InsightsRuleMode;
377
+ allowlist?: string[] | null;
378
+ }
379
+ export interface InsightsGuardrail {
380
+ scope: InsightsPolicyScope;
381
+ /** Format: namespace/service. */
382
+ scopeKey: string;
383
+ rules: InsightsGuardrailRule[];
384
+ }
385
+ export interface InsightsGuardrailRuleInput {
386
+ key: string;
387
+ label: string;
388
+ mode: InsightsRuleMode;
389
+ allowlist?: string[] | null;
390
+ }
391
+ export interface InsightsGuardrailInput {
392
+ scope: InsightsPolicyScope;
393
+ scopeKey: string;
394
+ rules: InsightsGuardrailRuleInput[];
395
+ }
396
+ export interface InsightsGuardrailViolation {
397
+ service: string;
398
+ namespace: string;
399
+ scopeKey: string;
400
+ ruleKey: string;
401
+ ruleLabel: string;
402
+ offending?: string | null;
403
+ occurrences: number;
404
+ maxScore: number;
405
+ severity: InsightsSeverity;
406
+ lastSeen?: string | null;
407
+ status: InsightsViolationStatus;
408
+ }
409
+ /** Full violation for investigate — detail path only. */
410
+ export interface InsightsGuardrailViolationDetail extends InsightsGuardrailViolation {
411
+ offending: string;
412
+ /** One-line explanation of what broke (service, rule, offending). */
413
+ summary: string;
414
+ /** Spans on the evidence trace that witness the forbidden edge. */
415
+ spanHighlights?: InsightsAnomalySpanHighlight[] | null;
416
+ /** Captured sample including rawOtlp. Omitted when no sample was retained. */
417
+ evidenceTrace?: InsightsObservation | null;
418
+ }
419
+ export interface InsightsViolationActionInput {
420
+ scopeKey: string;
421
+ ruleKey: string;
422
+ offending: string;
423
+ }
424
+ export interface InsightsGuardrailSeedInput {
425
+ scopeKey: string;
426
+ mode?: InsightsRuleMode | null;
427
+ /** JSON-encoded map[string][]string; keys: allowed_callers | allowed_callees | allowed_egress. */
428
+ items: string;
429
+ }
430
+ export interface InsightsCatalogClass {
431
+ id: string;
432
+ label: string;
433
+ description?: string | null;
434
+ category: string;
435
+ categoryLabel?: string | null;
436
+ weight: number;
437
+ mitre?: string | null;
438
+ owasp?: string | null;
439
+ }
440
+ export interface InsightsEnricherList {
441
+ key: string;
442
+ label: string;
443
+ hint?: string | null;
444
+ default?: string[] | null;
445
+ }
446
+ export interface InsightsCatalogEnricher {
447
+ source: string;
448
+ parentClass: string;
449
+ category: string;
450
+ weight: number;
451
+ label: string;
452
+ description?: string | null;
453
+ list?: InsightsEnricherList | null;
454
+ }
455
+ export interface InsightsCatalogCategory {
456
+ id: string;
457
+ label: string;
458
+ base: number;
459
+ mitre?: string | null;
460
+ owasp?: string | null;
461
+ }
462
+ export interface InsightsCatalogGuardrailRule {
463
+ key: string;
464
+ label: string;
465
+ description?: string | null;
466
+ category: string;
467
+ weight: number;
468
+ hint?: string | null;
469
+ }
470
+ export interface InsightsSeverityBand {
471
+ severity: InsightsSeverity;
472
+ minScore: number;
473
+ }
474
+ export interface InsightsCatalog {
475
+ deviationClasses: InsightsCatalogClass[];
476
+ enrichers: InsightsCatalogEnricher[];
477
+ categories: InsightsCatalogCategory[];
478
+ guardrailRules: InsightsCatalogGuardrailRule[];
479
+ severityBands: InsightsSeverityBand[];
480
+ correlationBonus: number;
481
+ /** JSON-encoded map[string]string. */
482
+ tags: string;
483
+ }
484
+ export interface InsightsSystemSamplingSettings {
485
+ examplesPerTransaction: number;
486
+ exampleSampleIntervalSeconds: number;
487
+ }
488
+ export interface InsightsSystemRetentionSettings {
489
+ observationRetentionDays: number;
490
+ }
491
+ export interface InsightsSystemFindingsSettings {
492
+ defaultWindowHours: number;
493
+ maxWindowHours: number;
494
+ }
495
+ export interface InsightsSystemCapacitySettings {
496
+ maxResidentTransactions: number;
497
+ maxBaselineSetMembers: number;
498
+ }
499
+ export interface InsightsSystemWritebackSettings {
500
+ flushIntervalSeconds: number;
501
+ }
502
+ export interface InsightsSystemSettings {
503
+ sampling: InsightsSystemSamplingSettings;
504
+ retention: InsightsSystemRetentionSettings;
505
+ findings: InsightsSystemFindingsSettings;
506
+ capacity: InsightsSystemCapacitySettings;
507
+ writeback: InsightsSystemWritebackSettings;
508
+ }
509
+ export interface InsightsSystemSamplingSettingsInput {
510
+ examplesPerTransaction: number;
511
+ exampleSampleIntervalSeconds: number;
512
+ }
513
+ export interface InsightsSystemRetentionSettingsInput {
514
+ observationRetentionDays: number;
515
+ }
516
+ export interface InsightsSystemFindingsSettingsInput {
517
+ defaultWindowHours: number;
518
+ maxWindowHours: number;
519
+ }
520
+ export interface InsightsSystemCapacitySettingsInput {
521
+ maxResidentTransactions: number;
522
+ maxBaselineSetMembers: number;
523
+ }
524
+ export interface InsightsSystemWritebackSettingsInput {
525
+ flushIntervalSeconds: number;
526
+ }
527
+ export interface InsightsSystemSettingsInput {
528
+ sampling: InsightsSystemSamplingSettingsInput;
529
+ retention: InsightsSystemRetentionSettingsInput;
530
+ findings: InsightsSystemFindingsSettingsInput;
531
+ capacity: InsightsSystemCapacitySettingsInput;
532
+ writeback: InsightsSystemWritebackSettingsInput;
533
+ }
534
+ export interface InsightsStorageConnection {
535
+ reachable: boolean;
536
+ pingLatencyMs: number;
537
+ version: string;
538
+ database: string;
539
+ error?: string | null;
540
+ }
541
+ export interface InsightsStorageDisk {
542
+ insightsBytes: number;
543
+ totalBytes: number;
544
+ usedBytes: number;
545
+ availableBytes: number;
546
+ usedPercent: number;
547
+ status: InsightsStorageDiskStatus;
548
+ }
549
+ export interface InsightsStorageMemory {
550
+ processRssBytes: number;
551
+ cgroupUsedBytes: number;
552
+ /** 0 means no limit. */
553
+ cgroupTotalBytes: number;
554
+ uptimeSeconds: number;
555
+ }
556
+ export interface InsightsStorageQuery {
557
+ elapsedSeconds: number;
558
+ user: string;
559
+ memoryBytes: number;
560
+ query: string;
561
+ finishedAt?: string | null;
562
+ }
563
+ export interface InsightsStorageQueries {
564
+ active: number;
565
+ longestSeconds: number;
566
+ peakMemoryBytes: number;
567
+ items: InsightsStorageQuery[];
568
+ recentHeaviest: InsightsStorageQuery[];
569
+ recentLatest: InsightsStorageQuery[];
570
+ }
571
+ export interface InsightsStorageTable {
572
+ name: string;
573
+ rows: number;
574
+ bytesOnDisk: number;
575
+ activeParts: number;
576
+ }
577
+ export interface InsightsStorageWritePressure {
578
+ unfinishedMutations: number;
579
+ activeParts: number;
580
+ }
581
+ export interface InsightsStorageWriteback {
582
+ flushIntervalSeconds: number;
583
+ everFlushed: boolean;
584
+ lastFlushOk: boolean;
585
+ lastFlushAt?: string | null;
586
+ lastFlushError?: string | null;
587
+ }
588
+ export interface InsightsStorageHealth {
589
+ checkedAt: string;
590
+ status: InsightsStorageHealthStatus;
591
+ connection: InsightsStorageConnection;
592
+ disk: InsightsStorageDisk;
593
+ memory: InsightsStorageMemory;
594
+ queries: InsightsStorageQueries;
595
+ tables: InsightsStorageTable[];
596
+ writePressure: InsightsStorageWritePressure;
597
+ writeback: InsightsStorageWriteback;
598
+ }