@lensmcp/protocol-types 1.18.3 → 1.18.6

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/index.d.ts CHANGED
@@ -9,4 +9,3 @@ export * from './lib/producer-health.js';
9
9
  export * from './lib/resources.js';
10
10
  export * from './lib/tokens.js';
11
11
  export * from './lib/capture-demand.js';
12
- //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -1,11 +1 @@
1
- export * from './lib/schema-version.js';
2
- export * from './lib/source-location.js';
3
- export * from './lib/context.js';
4
- export * from './lib/event.js';
5
- export * from './lib/node.js';
6
- export * from './lib/edge.js';
7
- export * from './lib/attributes.js';
8
- export * from './lib/producer-health.js';
9
- export * from './lib/resources.js';
10
- export * from './lib/tokens.js';
11
- export * from './lib/capture-demand.js';
1
+ "use strict";export*from"./lib/schema-version.js";export*from"./lib/source-location.js";export*from"./lib/context.js";export*from"./lib/event.js";export*from"./lib/node.js";export*from"./lib/edge.js";export*from"./lib/attributes.js";export*from"./lib/producer-health.js";export*from"./lib/resources.js";export*from"./lib/tokens.js";export*from"./lib/capture-demand.js";
@@ -309,4 +309,3 @@ export declare const VisualViolationAttrsSchema: z.ZodObject<{
309
309
  }, z.core.$strip>;
310
310
  }, z.core.$strip>;
311
311
  export type VisualViolationAttrs = z.infer<typeof VisualViolationAttrsSchema>;
312
- //# sourceMappingURL=attributes.d.ts.map
package/lib/attributes.js CHANGED
@@ -1,203 +1 @@
1
- import { z } from 'zod';
2
- // ---------- render ----------
3
- export const RenderPhaseSchema = z.enum(['mount', 'update']);
4
- export const RenderWhySchema = z.discriminatedUnion('type', [
5
- z.object({ type: z.literal('props'), changedKeys: z.array(z.string()) }),
6
- z.object({ type: z.literal('react-state'), hookIndex: z.number().int() }),
7
- z.object({ type: z.literal('context'), contextName: z.string() }),
8
- z.object({
9
- type: z.literal('valtio-path'),
10
- path: z.string(),
11
- changedKeys: z.array(z.string()),
12
- }),
13
- z.object({
14
- type: z.literal('parent-render'),
15
- parentRenderId: z.string(),
16
- }),
17
- z.object({
18
- type: z.literal('hook-dep-changed'),
19
- hookInstanceId: z.string(),
20
- depsHashBefore: z.string(),
21
- depsHashAfter: z.string(),
22
- }),
23
- z.object({ type: z.literal('force'), reason: z.string() }),
24
- ]);
25
- export const RenderAttrsSchema = z.object({
26
- phase: RenderPhaseSchema,
27
- actualDurationMs: z.number().nonnegative(),
28
- baseDurationMs: z.number().nonnegative(),
29
- startTime: z.number().nonnegative(),
30
- commitTime: z.number().nonnegative(),
31
- why: z.array(RenderWhySchema),
32
- });
33
- // ---------- effect-run ----------
34
- export const EffectRunAttrsSchema = z.object({
35
- hookInstanceId: z.string(),
36
- depsHash: z.string(),
37
- prevDepsHash: z.string().optional(),
38
- durationMs: z.number().nonnegative(),
39
- cleanupRan: z.boolean().optional(),
40
- });
41
- // ---------- valtio update (state-update kind) ----------
42
- export const ValtioUpdateAttrsSchema = z.object({
43
- storeId: z.string(),
44
- path: z.string(),
45
- changedKeys: z.array(z.string()),
46
- beforeHash: z.string(),
47
- afterHash: z.string(),
48
- preview: z.unknown().optional(),
49
- });
50
- // ---------- server-request ----------
51
- export const ServerRequestAttrsSchema = z.object({
52
- method: z.string(),
53
- route: z.string(),
54
- status: z.number().int().optional(),
55
- durationMs: z.number().nonnegative().optional(),
56
- traceparent: z.string().optional(),
57
- });
58
- // ---------- loop ----------
59
- export const LoopPatternSchema = z.enum([
60
- 'N+1',
61
- 'sequential-await',
62
- 'growing-allocation',
63
- ]);
64
- export const LoopAttrsSchema = z.object({
65
- iterations: z.number().int().nonnegative(),
66
- durationMs: z.number().nonnegative(),
67
- dbCallsInsideLoop: z.number().int().nonnegative(),
68
- redisCallsInsideLoop: z.number().int().nonnegative(),
69
- awaitedOperationsInsideLoop: z.number().int().nonnegative(),
70
- slowestIterations: z
71
- .array(z.object({
72
- index: z.number().int().nonnegative(),
73
- durationMs: z.number().nonnegative(),
74
- childNodeIds: z.array(z.string()),
75
- }))
76
- .optional(),
77
- patterns: z.array(LoopPatternSchema).optional(),
78
- });
79
- // ---------- memory ----------
80
- export const MemoryContainerKindSchema = z.enum([
81
- 'Map',
82
- 'Set',
83
- 'Array',
84
- 'EventEmitter',
85
- 'Queue',
86
- 'RxSubject',
87
- 'Timer',
88
- 'Interval',
89
- 'Custom',
90
- ]);
91
- export const MemoryOwnerAttrsSchema = z.object({
92
- ownerInstanceId: z.string(),
93
- containerKind: MemoryContainerKindSchema,
94
- fieldName: z.string(),
95
- itemCount: z.number().int().nonnegative(),
96
- estimatedBytes: z.number().nonnegative(),
97
- retainedBytes: z.number().nonnegative().optional(),
98
- growthSinceStart: z.number(),
99
- });
100
- export const MemoryMutationOperationSchema = z.enum([
101
- 'set',
102
- 'push',
103
- 'add',
104
- 'delete',
105
- 'clear',
106
- 'subscribe',
107
- 'listen',
108
- 'schedule',
109
- ]);
110
- export const MemoryMutationAttrsSchema = z.object({
111
- ownerNodeId: z.string(),
112
- operation: MemoryMutationOperationSchema,
113
- beforeCount: z.number().int().nonnegative(),
114
- afterCount: z.number().int().nonnegative(),
115
- estimatedDeltaBytes: z.number(),
116
- keyPreview: z.string().optional(),
117
- valueType: z.string().optional(),
118
- });
119
- // ---------- visual ----------
120
- export const RectSchema = z.object({
121
- x: z.number(),
122
- y: z.number(),
123
- width: z.number().nonnegative(),
124
- height: z.number().nonnegative(),
125
- });
126
- export const VisualFrameCauseSchema = z.enum([
127
- 'page-load',
128
- 'route-change',
129
- 'user-action',
130
- 'react-commit',
131
- 'state-update',
132
- 'api-response',
133
- 'hmr-update',
134
- 'animation-tick',
135
- ]);
136
- export const VisualChangeKindSchema = z.enum([
137
- 'computed-style',
138
- 'layout',
139
- 'paint-order',
140
- ]);
141
- export const VisualFrameAttrsSchema = z.object({
142
- causedBy: VisualFrameCauseSchema,
143
- viewport: RectSchema,
144
- layoutSnapshotId: z.string(),
145
- styleSnapshotId: z.string(),
146
- screenshotId: z.string().optional(),
147
- changedNodes: z.array(z.object({
148
- uid: z.string(),
149
- component: z.string().optional(),
150
- change: VisualChangeKindSchema,
151
- property: z.string().optional(),
152
- before: z.unknown().optional(),
153
- after: z.unknown().optional(),
154
- })),
155
- });
156
- export const VisualRuleTypeSchema = z.enum([
157
- 'grid-spacing',
158
- 'alignment',
159
- 'overflow',
160
- 'text-clipping',
161
- 'color-contrast',
162
- 'token-usage',
163
- 'z-index',
164
- 'responsive',
165
- 'custom',
166
- ]);
167
- export const VisualRuleTimingSchema = z.enum([
168
- 'always',
169
- 'after-animation',
170
- 'stable-only',
171
- 'during-animation',
172
- ]);
173
- export const VisualViolationSeveritySchema = z.enum([
174
- 'info',
175
- 'warning',
176
- 'error',
177
- ]);
178
- export const VisualViolationAttrsSchema = z.object({
179
- ruleId: z.string(),
180
- ruleType: VisualRuleTypeSchema,
181
- severity: VisualViolationSeveritySchema,
182
- timing: VisualRuleTimingSchema,
183
- element: z.object({
184
- uid: z.string(),
185
- component: z.string().optional(),
186
- rect: RectSchema,
187
- }),
188
- expected: z.record(z.string(), z.unknown()),
189
- actual: z.record(z.string(), z.unknown()),
190
- evidence: z.object({
191
- computedStyle: z.string().optional(),
192
- screenshotCrop: z.string().optional(),
193
- trace: z.string().optional(),
194
- cssCause: z
195
- .object({
196
- selector: z.string(),
197
- file: z.string().optional(),
198
- line: z.number().int().optional(),
199
- declaration: z.string().optional(),
200
- })
201
- .optional(),
202
- }),
203
- });
1
+ "use strict";import{z as e}from"zod";export const RenderPhaseSchema=e.enum(["mount","update"]),RenderWhySchema=e.discriminatedUnion("type",[e.object({type:e.literal("props"),changedKeys:e.array(e.string())}),e.object({type:e.literal("react-state"),hookIndex:e.number().int()}),e.object({type:e.literal("context"),contextName:e.string()}),e.object({type:e.literal("valtio-path"),path:e.string(),changedKeys:e.array(e.string())}),e.object({type:e.literal("parent-render"),parentRenderId:e.string()}),e.object({type:e.literal("hook-dep-changed"),hookInstanceId:e.string(),depsHashBefore:e.string(),depsHashAfter:e.string()}),e.object({type:e.literal("force"),reason:e.string()})]),RenderAttrsSchema=e.object({phase:RenderPhaseSchema,actualDurationMs:e.number().nonnegative(),baseDurationMs:e.number().nonnegative(),startTime:e.number().nonnegative(),commitTime:e.number().nonnegative(),why:e.array(RenderWhySchema)}),EffectRunAttrsSchema=e.object({hookInstanceId:e.string(),depsHash:e.string(),prevDepsHash:e.string().optional(),durationMs:e.number().nonnegative(),cleanupRan:e.boolean().optional()}),ValtioUpdateAttrsSchema=e.object({storeId:e.string(),path:e.string(),changedKeys:e.array(e.string()),beforeHash:e.string(),afterHash:e.string(),preview:e.unknown().optional()}),ServerRequestAttrsSchema=e.object({method:e.string(),route:e.string(),status:e.number().int().optional(),durationMs:e.number().nonnegative().optional(),traceparent:e.string().optional()}),LoopPatternSchema=e.enum(["N+1","sequential-await","growing-allocation"]),LoopAttrsSchema=e.object({iterations:e.number().int().nonnegative(),durationMs:e.number().nonnegative(),dbCallsInsideLoop:e.number().int().nonnegative(),redisCallsInsideLoop:e.number().int().nonnegative(),awaitedOperationsInsideLoop:e.number().int().nonnegative(),slowestIterations:e.array(e.object({index:e.number().int().nonnegative(),durationMs:e.number().nonnegative(),childNodeIds:e.array(e.string())})).optional(),patterns:e.array(LoopPatternSchema).optional()}),MemoryContainerKindSchema=e.enum(["Map","Set","Array","EventEmitter","Queue","RxSubject","Timer","Interval","Custom"]),MemoryOwnerAttrsSchema=e.object({ownerInstanceId:e.string(),containerKind:MemoryContainerKindSchema,fieldName:e.string(),itemCount:e.number().int().nonnegative(),estimatedBytes:e.number().nonnegative(),retainedBytes:e.number().nonnegative().optional(),growthSinceStart:e.number()}),MemoryMutationOperationSchema=e.enum(["set","push","add","delete","clear","subscribe","listen","schedule"]),MemoryMutationAttrsSchema=e.object({ownerNodeId:e.string(),operation:MemoryMutationOperationSchema,beforeCount:e.number().int().nonnegative(),afterCount:e.number().int().nonnegative(),estimatedDeltaBytes:e.number(),keyPreview:e.string().optional(),valueType:e.string().optional()}),RectSchema=e.object({x:e.number(),y:e.number(),width:e.number().nonnegative(),height:e.number().nonnegative()}),VisualFrameCauseSchema=e.enum(["page-load","route-change","user-action","react-commit","state-update","api-response","hmr-update","animation-tick"]),VisualChangeKindSchema=e.enum(["computed-style","layout","paint-order"]),VisualFrameAttrsSchema=e.object({causedBy:VisualFrameCauseSchema,viewport:RectSchema,layoutSnapshotId:e.string(),styleSnapshotId:e.string(),screenshotId:e.string().optional(),changedNodes:e.array(e.object({uid:e.string(),component:e.string().optional(),change:VisualChangeKindSchema,property:e.string().optional(),before:e.unknown().optional(),after:e.unknown().optional()}))}),VisualRuleTypeSchema=e.enum(["grid-spacing","alignment","overflow","text-clipping","color-contrast","token-usage","z-index","responsive","custom"]),VisualRuleTimingSchema=e.enum(["always","after-animation","stable-only","during-animation"]),VisualViolationSeveritySchema=e.enum(["info","warning","error"]),VisualViolationAttrsSchema=e.object({ruleId:e.string(),ruleType:VisualRuleTypeSchema,severity:VisualViolationSeveritySchema,timing:VisualRuleTimingSchema,element:e.object({uid:e.string(),component:e.string().optional(),rect:RectSchema}),expected:e.record(e.string(),e.unknown()),actual:e.record(e.string(),e.unknown()),evidence:e.object({computedStyle:e.string().optional(),screenshotCrop:e.string().optional(),trace:e.string().optional(),cssCause:e.object({selector:e.string(),file:e.string().optional(),line:e.number().int().optional(),declaration:e.string().optional()}).optional()})});
@@ -58,4 +58,3 @@ export interface CaptureRequest {
58
58
  /** Opaque id, so a reader can tell two same-millisecond requests apart. */
59
59
  requestId?: string;
60
60
  }
61
- //# sourceMappingURL=capture-demand.d.ts.map
@@ -1,14 +1 @@
1
- /** Request-file name, resolved as a sibling of `LENSMCP_EVENT_FILE`. */
2
- export const CAPTURE_REQUEST_FILENAME = 'capture-request.json';
3
- /**
4
- * Presence-file name (same directory). The runner writes it at startup and
5
- * removes it on a clean stop.
6
- *
7
- * Its job is to keep the requester honest: `visual.capture_frame` now WAITS for
8
- * the fresh frame it asked for (a cold browser needs ~1s), and without a way to
9
- * tell "a runner is warming up" from "no runner exists" that wait would also be
10
- * paid by every workspace running with capture disabled or no Chrome installed
11
- * — an 8s stall for a frame that is never coming. With this, the tool waits
12
- * only when a live runner is actually listening, and can say so when it isn't.
13
- */
14
- export const CAPTURE_PRESENCE_FILENAME = 'capture-runner.json';
1
+ "use strict";export const CAPTURE_REQUEST_FILENAME="capture-request.json",CAPTURE_PRESENCE_FILENAME="capture-runner.json";
package/lib/context.d.ts CHANGED
@@ -65,4 +65,3 @@ export declare const TraceContextSchema: z.ZodObject<{
65
65
  tenantIdHash: z.ZodOptional<z.ZodString>;
66
66
  }, z.core.$strip>;
67
67
  export type TraceContext = z.infer<typeof TraceContextSchema>;
68
- //# sourceMappingURL=context.d.ts.map
package/lib/context.js CHANGED
@@ -1,42 +1 @@
1
- import { z } from 'zod';
2
- export const FlowOriginTypeSchema = z.enum([
3
- 'user-click',
4
- 'user-input',
5
- 'keyboard',
6
- 'route-load',
7
- 'effect',
8
- 'memo-recompute',
9
- 'timer',
10
- 'raf',
11
- 'idle-callback',
12
- 'websocket-message',
13
- 'broadcast-channel',
14
- 'post-message',
15
- 'storage-event',
16
- 'service-worker-message',
17
- 'media-query-change',
18
- 'visibility-change',
19
- 'resize',
20
- 'intersection-observer',
21
- 'mutation-observer',
22
- 'backend-response',
23
- 'hmr-update',
24
- 'ai-turn',
25
- ]);
26
- export const TraceContextSchema = z.object({
27
- sessionId: z.string(),
28
- browserContextId: z.string().optional(),
29
- tabId: z.string().optional(),
30
- frameId: z.string().optional(),
31
- route: z.string().optional(),
32
- url: z.string().optional(),
33
- flowId: z.string().optional(),
34
- originType: FlowOriginTypeSchema.optional(),
35
- originNodeId: z.string().optional(),
36
- causedByNodeId: z.string().optional(),
37
- requestId: z.string().optional(),
38
- traceparent: z.string().optional(),
39
- userActionId: z.string().optional(),
40
- userIdHash: z.string().optional(),
41
- tenantIdHash: z.string().optional(),
42
- });
1
+ "use strict";import{z as e}from"zod";export const FlowOriginTypeSchema=e.enum(["user-click","user-input","keyboard","route-load","effect","memo-recompute","timer","raf","idle-callback","websocket-message","broadcast-channel","post-message","storage-event","service-worker-message","media-query-change","visibility-change","resize","intersection-observer","mutation-observer","backend-response","hmr-update","ai-turn"]),TraceContextSchema=e.object({sessionId:e.string(),browserContextId:e.string().optional(),tabId:e.string().optional(),frameId:e.string().optional(),route:e.string().optional(),url:e.string().optional(),flowId:e.string().optional(),originType:FlowOriginTypeSchema.optional(),originNodeId:e.string().optional(),causedByNodeId:e.string().optional(),requestId:e.string().optional(),traceparent:e.string().optional(),userActionId:e.string().optional(),userIdHash:e.string().optional(),tenantIdHash:e.string().optional()});
package/lib/edge.d.ts CHANGED
@@ -39,4 +39,3 @@ export declare const TraceEdgeSchema: z.ZodObject<{
39
39
  attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
40
40
  }, z.core.$strip>;
41
41
  export type TraceEdge = z.infer<typeof TraceEdgeSchema>;
42
- //# sourceMappingURL=edge.d.ts.map
package/lib/edge.js CHANGED
@@ -1,25 +1 @@
1
- import { z } from 'zod';
2
- export const EdgeAxisSchema = z.enum([
3
- 'ownership',
4
- 'caused',
5
- 'async',
6
- 'data',
7
- 'render',
8
- 'state',
9
- 'network',
10
- 'backend',
11
- 'db',
12
- 'visual',
13
- 'performance',
14
- 'memory',
15
- 'lifecycle',
16
- ]);
17
- export const TraceEdgeSchema = z.object({
18
- id: z.string(),
19
- from: z.string(),
20
- to: z.string(),
21
- axis: EdgeAxisSchema,
22
- type: z.string(),
23
- timestamp: z.number().int().nonnegative(),
24
- attributes: z.record(z.string(), z.unknown()).optional(),
25
- });
1
+ "use strict";import{z as e}from"zod";export const EdgeAxisSchema=e.enum(["ownership","caused","async","data","render","state","network","backend","db","visual","performance","memory","lifecycle"]),TraceEdgeSchema=e.object({id:e.string(),from:e.string(),to:e.string(),axis:EdgeAxisSchema,type:e.string(),timestamp:e.number().int().nonnegative(),attributes:e.record(e.string(),e.unknown()).optional()});
package/lib/event.d.ts CHANGED
@@ -162,4 +162,3 @@ export declare const BaseEventSchema: z.ZodObject<{
162
162
  raw: z.ZodOptional<z.ZodUnknown>;
163
163
  }, z.core.$strip>;
164
164
  export type BaseEvent = z.infer<typeof BaseEventSchema>;
165
- //# sourceMappingURL=event.d.ts.map
package/lib/event.js CHANGED
@@ -1,69 +1 @@
1
- import { z } from 'zod';
2
- import { SourceLocationSchema } from './source-location.js';
3
- import { TraceContextSchema } from './context.js';
4
- export const EventSourceSchema = z.enum([
5
- 'nx',
6
- 'vite',
7
- 'typescript',
8
- 'eslint',
9
- 'rollup',
10
- 'client-runtime',
11
- 'chrome',
12
- 'react',
13
- 'valtio',
14
- 'nestjs',
15
- 'nextjs',
16
- 'db',
17
- 'redis',
18
- 'queue',
19
- 'memory',
20
- 'visual',
21
- 'perf',
22
- 'security',
23
- 'gateway',
24
- 'external',
25
- 'ai',
26
- ]);
27
- export const EventCategorySchema = z.enum([
28
- 'build',
29
- 'lint',
30
- 'typecheck',
31
- 'test',
32
- 'runtime',
33
- 'render',
34
- 'visual',
35
- 'trace',
36
- 'state',
37
- 'network',
38
- 'backend',
39
- 'db',
40
- 'memory',
41
- 'performance',
42
- 'security',
43
- 'deps',
44
- 'cluster',
45
- 'ai',
46
- ]);
47
- export const SeveritySchema = z.enum([
48
- 'debug',
49
- 'info',
50
- 'warning',
51
- 'error',
52
- 'fatal',
53
- ]);
54
- export const BaseEventSchema = z.object({
55
- id: z.string(),
56
- sessionId: z.string(),
57
- timestamp: z.number().int().nonnegative(),
58
- source: EventSourceSchema,
59
- category: EventCategorySchema,
60
- severity: SeveritySchema,
61
- context: TraceContextSchema,
62
- fingerprint: z.string(),
63
- title: z.string(),
64
- message: z.string().optional(),
65
- location: SourceLocationSchema.optional(),
66
- relatedFiles: z.array(z.string()).optional(),
67
- relatedUrls: z.array(z.string()).optional(),
68
- raw: z.unknown().optional(),
69
- });
1
+ "use strict";import{z as e}from"zod";import{SourceLocationSchema as t}from"./source-location.js";import{TraceContextSchema as r}from"./context.js";export const EventSourceSchema=e.enum(["nx","vite","typescript","eslint","rollup","client-runtime","chrome","react","valtio","nestjs","nextjs","db","redis","queue","memory","visual","perf","security","gateway","external","ai"]),EventCategorySchema=e.enum(["build","lint","typecheck","test","runtime","render","visual","trace","state","network","backend","db","memory","performance","security","deps","cluster","ai"]),SeveritySchema=e.enum(["debug","info","warning","error","fatal"]),BaseEventSchema=e.object({id:e.string(),sessionId:e.string(),timestamp:e.number().int().nonnegative(),source:EventSourceSchema,category:EventCategorySchema,severity:SeveritySchema,context:r,fingerprint:e.string(),title:e.string(),message:e.string().optional(),location:t.optional(),relatedFiles:e.array(e.string()).optional(),relatedUrls:e.array(e.string()).optional(),raw:e.unknown().optional()});
package/lib/node.d.ts CHANGED
@@ -202,4 +202,3 @@ export declare const TraceNodeSchema: z.ZodObject<{
202
202
  attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
203
203
  }, z.core.$strip>;
204
204
  export type TraceNode = z.infer<typeof TraceNodeSchema>;
205
- //# sourceMappingURL=node.d.ts.map
package/lib/node.js CHANGED
@@ -1,98 +1 @@
1
- import { z } from 'zod';
2
- import { SourceLocationSchema } from './source-location.js';
3
- import { TraceContextSchema } from './context.js';
4
- export const TraceNodeTypeSchema = z.enum([
5
- // Browser process tree
6
- 'session',
7
- 'browser-context',
8
- 'tab',
9
- 'renderer',
10
- 'router',
11
- 'route',
12
- 'page',
13
- // React UI
14
- 'component',
15
- 'element',
16
- 'slot',
17
- 'render',
18
- 'react-mount',
19
- 'react-unmount',
20
- 'hook',
21
- 'effect',
22
- 'effect-run',
23
- 'memo',
24
- 'memo-compute',
25
- // User interaction
26
- 'ui-event',
27
- 'handler',
28
- 'animation',
29
- 'animation-frame',
30
- 'transition',
31
- 'timer',
32
- // Network / API
33
- 'api-client-call',
34
- 'http-request',
35
- 'http-response',
36
- // Backend
37
- 'server-process',
38
- 'nest-app',
39
- 'nest-module',
40
- 'nest-provider',
41
- 'singleton-instance',
42
- 'server-request',
43
- 'guard',
44
- 'controller',
45
- 'service-method',
46
- 'loop',
47
- 'loop-iteration',
48
- 'queue-job',
49
- 'db-query',
50
- 'redis-op',
51
- 'promise',
52
- 'promise-continuation',
53
- // State
54
- 'state-store',
55
- 'state-update',
56
- 'selector',
57
- 'selector-update',
58
- // Visual
59
- 'visual-frame',
60
- 'visual-violation',
61
- 'style-change',
62
- 'layout-change',
63
- // Memory
64
- 'memory-owner',
65
- 'memory-mutation',
66
- 'memory-retention',
67
- 'heap-snapshot',
68
- // Build / dev
69
- 'build-event',
70
- 'lint-event',
71
- 'typecheck-event',
72
- 'test-event',
73
- 'bundle-report',
74
- 'hmr-update',
75
- ]);
76
- export const LifecycleSchema = z.enum([
77
- 'created',
78
- 'active',
79
- 'completed',
80
- 'disposed',
81
- 'errored',
82
- ]);
83
- export const TraceNodeSchema = z.object({
84
- id: z.string(),
85
- parentTraceNodeId: z.string().optional(),
86
- type: TraceNodeTypeSchema,
87
- logicalId: z.string().optional(),
88
- instanceId: z.string().optional(),
89
- generation: z.number().int().nonnegative().optional(),
90
- lifecycle: LifecycleSchema,
91
- context: TraceContextSchema,
92
- name: z.string(),
93
- startTime: z.number().int().nonnegative(),
94
- endTime: z.number().int().nonnegative().optional(),
95
- durationMs: z.number().nonnegative().optional(),
96
- location: SourceLocationSchema.optional(),
97
- attributes: z.record(z.string(), z.unknown()),
98
- });
1
+ "use strict";import{z as e}from"zod";import{SourceLocationSchema as t}from"./source-location.js";import{TraceContextSchema as n}from"./context.js";export const TraceNodeTypeSchema=e.enum(["session","browser-context","tab","renderer","router","route","page","component","element","slot","render","react-mount","react-unmount","hook","effect","effect-run","memo","memo-compute","ui-event","handler","animation","animation-frame","transition","timer","api-client-call","http-request","http-response","server-process","nest-app","nest-module","nest-provider","singleton-instance","server-request","guard","controller","service-method","loop","loop-iteration","queue-job","db-query","redis-op","promise","promise-continuation","state-store","state-update","selector","selector-update","visual-frame","visual-violation","style-change","layout-change","memory-owner","memory-mutation","memory-retention","heap-snapshot","build-event","lint-event","typecheck-event","test-event","bundle-report","hmr-update"]),LifecycleSchema=e.enum(["created","active","completed","disposed","errored"]),TraceNodeSchema=e.object({id:e.string(),parentTraceNodeId:e.string().optional(),type:TraceNodeTypeSchema,logicalId:e.string().optional(),instanceId:e.string().optional(),generation:e.number().int().nonnegative().optional(),lifecycle:LifecycleSchema,context:n,name:e.string(),startTime:e.number().int().nonnegative(),endTime:e.number().int().nonnegative().optional(),durationMs:e.number().nonnegative().optional(),location:t.optional(),attributes:e.record(e.string(),e.unknown())});
@@ -133,4 +133,3 @@ export declare function summariseProducers(args: {
133
133
  noProducerHint: string;
134
134
  now?: number;
135
135
  }): ProducerHealth;
136
- //# sourceMappingURL=producer-health.d.ts.map