@cognidesk/studio-contracts 0.0.1

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.
@@ -0,0 +1,854 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const StudioRoleSchema: z.ZodEnum<{
4
+ viewer: "viewer";
5
+ dashboard_editor: "dashboard_editor";
6
+ operator: "operator";
7
+ admin: "admin";
8
+ }>;
9
+ type StudioRole = z.infer<typeof StudioRoleSchema>;
10
+ declare const StudioPermissionSchema: z.ZodEnum<{
11
+ "studio:view": "studio:view";
12
+ "dashboards:edit": "dashboards:edit";
13
+ "dashboards:publish": "dashboards:publish";
14
+ "operator:use": "operator:use";
15
+ "operator:publish_code": "operator:publish_code";
16
+ "admin:manage": "admin:manage";
17
+ }>;
18
+ type StudioPermission = z.infer<typeof StudioPermissionSchema>;
19
+ declare const permissionsByRole: Record<StudioRole, StudioPermission[]>;
20
+ declare function roleHasPermission(role: StudioRole, permission: StudioPermission): boolean;
21
+ declare const StudioTargetManifestSchema: z.ZodObject<{
22
+ version: z.ZodLiteral<1>;
23
+ target: z.ZodObject<{
24
+ id: z.ZodString;
25
+ name: z.ZodString;
26
+ environment: z.ZodDefault<z.ZodString>;
27
+ }, z.core.$strip>;
28
+ runtime: z.ZodObject<{
29
+ baseUrl: z.ZodString;
30
+ apiBasePath: z.ZodDefault<z.ZodString>;
31
+ studioAdapterBasePath: z.ZodDefault<z.ZodString>;
32
+ serviceAuthHeader: z.ZodDefault<z.ZodString>;
33
+ }, z.core.$strip>;
34
+ telemetry: z.ZodDefault<z.ZodObject<{
35
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
36
+ id: z.ZodString;
37
+ label: z.ZodString;
38
+ kind: z.ZodEnum<{
39
+ prometheus: "prometheus";
40
+ tempo: "tempo";
41
+ "otel-http": "otel-http";
42
+ }>;
43
+ baseUrl: z.ZodString;
44
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
45
+ }, z.core.$strip>>>;
46
+ }, z.core.$strip>>;
47
+ source: z.ZodObject<{
48
+ provider: z.ZodLiteral<"github">;
49
+ owner: z.ZodString;
50
+ repo: z.ZodString;
51
+ defaultBranch: z.ZodDefault<z.ZodString>;
52
+ root: z.ZodDefault<z.ZodString>;
53
+ }, z.core.$strip>;
54
+ code: z.ZodDefault<z.ZodObject<{
55
+ allowedPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
56
+ validationCommands: z.ZodDefault<z.ZodArray<z.ZodObject<{
57
+ id: z.ZodString;
58
+ label: z.ZodString;
59
+ command: z.ZodString;
60
+ workingDirectory: z.ZodDefault<z.ZodString>;
61
+ }, z.core.$strip>>>;
62
+ }, z.core.$strip>>;
63
+ dashboards: z.ZodObject<{
64
+ artifactBucket: z.ZodString;
65
+ artifactPrefix: z.ZodDefault<z.ZodString>;
66
+ }, z.core.$strip>;
67
+ operator: z.ZodDefault<z.ZodObject<{
68
+ instructionsPath: z.ZodDefault<z.ZodString>;
69
+ skillPacks: z.ZodDefault<z.ZodArray<z.ZodString>>;
70
+ models: z.ZodDefault<z.ZodArray<z.ZodObject<{
71
+ id: z.ZodString;
72
+ label: z.ZodString;
73
+ provider: z.ZodString;
74
+ model: z.ZodString;
75
+ default: z.ZodOptional<z.ZodBoolean>;
76
+ }, z.core.$strip>>>;
77
+ allowedCredentialGrants: z.ZodDefault<z.ZodArray<z.ZodEnum<{
78
+ telemetry: "telemetry";
79
+ github: "github";
80
+ package_registry: "package_registry";
81
+ artifact_store: "artifact_store";
82
+ studio_adapter: "studio_adapter";
83
+ backend_service: "backend_service";
84
+ }>>>;
85
+ }, z.core.$strip>>;
86
+ }, z.core.$strip>;
87
+ type StudioTargetManifest = z.infer<typeof StudioTargetManifestSchema>;
88
+ type StudioTargetManifestInput = z.input<typeof StudioTargetManifestSchema>;
89
+ declare const StudioTargetOverlaySchema: z.ZodObject<{
90
+ version: z.ZodOptional<z.ZodLiteral<1>>;
91
+ target: z.ZodOptional<z.ZodObject<{
92
+ id: z.ZodOptional<z.ZodString>;
93
+ name: z.ZodOptional<z.ZodString>;
94
+ environment: z.ZodOptional<z.ZodString>;
95
+ }, z.core.$strip>>;
96
+ runtime: z.ZodOptional<z.ZodObject<{
97
+ baseUrl: z.ZodOptional<z.ZodString>;
98
+ apiBasePath: z.ZodOptional<z.ZodString>;
99
+ studioAdapterBasePath: z.ZodOptional<z.ZodString>;
100
+ serviceAuthHeader: z.ZodOptional<z.ZodString>;
101
+ }, z.core.$strip>>;
102
+ telemetry: z.ZodOptional<z.ZodObject<{
103
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
104
+ id: z.ZodString;
105
+ label: z.ZodString;
106
+ kind: z.ZodEnum<{
107
+ prometheus: "prometheus";
108
+ tempo: "tempo";
109
+ "otel-http": "otel-http";
110
+ }>;
111
+ baseUrl: z.ZodString;
112
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
113
+ }, z.core.$strip>>>;
114
+ }, z.core.$strip>>;
115
+ source: z.ZodOptional<z.ZodObject<{
116
+ provider: z.ZodOptional<z.ZodLiteral<"github">>;
117
+ owner: z.ZodOptional<z.ZodString>;
118
+ repo: z.ZodOptional<z.ZodString>;
119
+ defaultBranch: z.ZodOptional<z.ZodString>;
120
+ root: z.ZodOptional<z.ZodString>;
121
+ }, z.core.$strip>>;
122
+ code: z.ZodOptional<z.ZodObject<{
123
+ allowedPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
124
+ validationCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
125
+ id: z.ZodString;
126
+ label: z.ZodString;
127
+ command: z.ZodString;
128
+ workingDirectory: z.ZodDefault<z.ZodString>;
129
+ }, z.core.$strip>>>;
130
+ }, z.core.$strip>>;
131
+ dashboards: z.ZodOptional<z.ZodObject<{
132
+ artifactBucket: z.ZodOptional<z.ZodString>;
133
+ artifactPrefix: z.ZodOptional<z.ZodString>;
134
+ }, z.core.$strip>>;
135
+ operator: z.ZodOptional<z.ZodObject<{
136
+ instructionsPath: z.ZodOptional<z.ZodString>;
137
+ skillPacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
138
+ models: z.ZodOptional<z.ZodArray<z.ZodObject<{
139
+ id: z.ZodString;
140
+ label: z.ZodString;
141
+ provider: z.ZodString;
142
+ model: z.ZodString;
143
+ default: z.ZodOptional<z.ZodBoolean>;
144
+ }, z.core.$strip>>>;
145
+ allowedCredentialGrants: z.ZodOptional<z.ZodArray<z.ZodEnum<{
146
+ telemetry: "telemetry";
147
+ github: "github";
148
+ package_registry: "package_registry";
149
+ artifact_store: "artifact_store";
150
+ studio_adapter: "studio_adapter";
151
+ backend_service: "backend_service";
152
+ }>>>;
153
+ }, z.core.$strip>>;
154
+ }, z.core.$strip>;
155
+ type StudioTargetOverlay = z.infer<typeof StudioTargetOverlaySchema>;
156
+ declare function mergeStudioTargetManifest(base: StudioTargetManifestInput, overlay?: StudioTargetOverlay): StudioTargetManifest;
157
+ declare const StudioToolSummarySchema: z.ZodObject<{
158
+ name: z.ZodString;
159
+ description: z.ZodOptional<z.ZodString>;
160
+ sideEffect: z.ZodBoolean;
161
+ }, z.core.$strip>;
162
+ type StudioToolSummary = z.infer<typeof StudioToolSummarySchema>;
163
+ declare const StudioKnowledgeSummarySchema: z.ZodObject<{
164
+ name: z.ZodString;
165
+ }, z.core.$strip>;
166
+ type StudioKnowledgeSummary = z.infer<typeof StudioKnowledgeSummarySchema>;
167
+ declare const StudioWidgetSummarySchema: z.ZodObject<{
168
+ kind: z.ZodString;
169
+ }, z.core.$strip>;
170
+ type StudioWidgetSummary = z.infer<typeof StudioWidgetSummarySchema>;
171
+ declare const StudioJourneyGraphStateSchema: z.ZodObject<{
172
+ id: z.ZodString;
173
+ parentId: z.ZodOptional<z.ZodString>;
174
+ initialStateId: z.ZodOptional<z.ZodString>;
175
+ type: z.ZodEnum<{
176
+ state: "state";
177
+ parallel: "parallel";
178
+ final: "final";
179
+ }>;
180
+ instructions: z.ZodOptional<z.ZodString>;
181
+ summary: z.ZodOptional<z.ZodString>;
182
+ collected: z.ZodArray<z.ZodObject<{
183
+ path: z.ZodString;
184
+ required: z.ZodBoolean;
185
+ extract: z.ZodBoolean;
186
+ }, z.core.$strip>>;
187
+ transitions: z.ZodArray<z.ZodObject<{
188
+ kind: z.ZodEnum<{
189
+ event: "event";
190
+ conversational: "conversational";
191
+ }>;
192
+ targetId: z.ZodString;
193
+ eventName: z.ZodOptional<z.ZodString>;
194
+ description: z.ZodOptional<z.ZodString>;
195
+ priority: z.ZodOptional<z.ZodNumber>;
196
+ }, z.core.$strip>>;
197
+ actions: z.ZodArray<z.ZodObject<{
198
+ type: z.ZodEnum<{
199
+ entry: "entry";
200
+ exit: "exit";
201
+ transition: "transition";
202
+ }>;
203
+ name: z.ZodString;
204
+ }, z.core.$strip>>;
205
+ requiresVisit: z.ZodBoolean;
206
+ }, z.core.$strip>;
207
+ declare const StudioJourneyGraphSchema: z.ZodObject<{
208
+ id: z.ZodString;
209
+ kind: z.ZodEnum<{
210
+ stateMachine: "stateMachine";
211
+ delegation: "delegation";
212
+ }>;
213
+ initialStateId: z.ZodOptional<z.ZodString>;
214
+ alternateEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
215
+ stateId: z.ZodString;
216
+ description: z.ZodOptional<z.ZodString>;
217
+ priority: z.ZodOptional<z.ZodNumber>;
218
+ }, z.core.$strip>>>;
219
+ states: z.ZodArray<z.ZodObject<{
220
+ id: z.ZodString;
221
+ parentId: z.ZodOptional<z.ZodString>;
222
+ initialStateId: z.ZodOptional<z.ZodString>;
223
+ type: z.ZodEnum<{
224
+ state: "state";
225
+ parallel: "parallel";
226
+ final: "final";
227
+ }>;
228
+ instructions: z.ZodOptional<z.ZodString>;
229
+ summary: z.ZodOptional<z.ZodString>;
230
+ collected: z.ZodArray<z.ZodObject<{
231
+ path: z.ZodString;
232
+ required: z.ZodBoolean;
233
+ extract: z.ZodBoolean;
234
+ }, z.core.$strip>>;
235
+ transitions: z.ZodArray<z.ZodObject<{
236
+ kind: z.ZodEnum<{
237
+ event: "event";
238
+ conversational: "conversational";
239
+ }>;
240
+ targetId: z.ZodString;
241
+ eventName: z.ZodOptional<z.ZodString>;
242
+ description: z.ZodOptional<z.ZodString>;
243
+ priority: z.ZodOptional<z.ZodNumber>;
244
+ }, z.core.$strip>>;
245
+ actions: z.ZodArray<z.ZodObject<{
246
+ type: z.ZodEnum<{
247
+ entry: "entry";
248
+ exit: "exit";
249
+ transition: "transition";
250
+ }>;
251
+ name: z.ZodString;
252
+ }, z.core.$strip>>;
253
+ requiresVisit: z.ZodBoolean;
254
+ }, z.core.$strip>>;
255
+ }, z.core.$strip>;
256
+ type StudioJourneyGraph = z.infer<typeof StudioJourneyGraphSchema>;
257
+ declare const StudioJourneySummarySchema: z.ZodObject<{
258
+ id: z.ZodString;
259
+ kind: z.ZodEnum<{
260
+ stateMachine: "stateMachine";
261
+ delegation: "delegation";
262
+ }>;
263
+ condition: z.ZodString;
264
+ examples: z.ZodArray<z.ZodString>;
265
+ tags: z.ZodArray<z.ZodString>;
266
+ priority: z.ZodNumber;
267
+ stickiness: z.ZodEnum<{
268
+ low: "low";
269
+ medium: "medium";
270
+ high: "high";
271
+ }>;
272
+ alwaysInclude: z.ZodBoolean;
273
+ graph: z.ZodObject<{
274
+ id: z.ZodString;
275
+ kind: z.ZodEnum<{
276
+ stateMachine: "stateMachine";
277
+ delegation: "delegation";
278
+ }>;
279
+ initialStateId: z.ZodOptional<z.ZodString>;
280
+ alternateEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
281
+ stateId: z.ZodString;
282
+ description: z.ZodOptional<z.ZodString>;
283
+ priority: z.ZodOptional<z.ZodNumber>;
284
+ }, z.core.$strip>>>;
285
+ states: z.ZodArray<z.ZodObject<{
286
+ id: z.ZodString;
287
+ parentId: z.ZodOptional<z.ZodString>;
288
+ initialStateId: z.ZodOptional<z.ZodString>;
289
+ type: z.ZodEnum<{
290
+ state: "state";
291
+ parallel: "parallel";
292
+ final: "final";
293
+ }>;
294
+ instructions: z.ZodOptional<z.ZodString>;
295
+ summary: z.ZodOptional<z.ZodString>;
296
+ collected: z.ZodArray<z.ZodObject<{
297
+ path: z.ZodString;
298
+ required: z.ZodBoolean;
299
+ extract: z.ZodBoolean;
300
+ }, z.core.$strip>>;
301
+ transitions: z.ZodArray<z.ZodObject<{
302
+ kind: z.ZodEnum<{
303
+ event: "event";
304
+ conversational: "conversational";
305
+ }>;
306
+ targetId: z.ZodString;
307
+ eventName: z.ZodOptional<z.ZodString>;
308
+ description: z.ZodOptional<z.ZodString>;
309
+ priority: z.ZodOptional<z.ZodNumber>;
310
+ }, z.core.$strip>>;
311
+ actions: z.ZodArray<z.ZodObject<{
312
+ type: z.ZodEnum<{
313
+ entry: "entry";
314
+ exit: "exit";
315
+ transition: "transition";
316
+ }>;
317
+ name: z.ZodString;
318
+ }, z.core.$strip>>;
319
+ requiresVisit: z.ZodBoolean;
320
+ }, z.core.$strip>>;
321
+ }, z.core.$strip>;
322
+ mermaid: z.ZodString;
323
+ delegation: z.ZodOptional<z.ZodObject<{
324
+ goal: z.ZodString;
325
+ instructions: z.ZodOptional<z.ZodString>;
326
+ completeWhen: z.ZodArray<z.ZodString>;
327
+ tools: z.ZodArray<z.ZodObject<{
328
+ name: z.ZodString;
329
+ description: z.ZodOptional<z.ZodString>;
330
+ sideEffect: z.ZodBoolean;
331
+ }, z.core.$strip>>;
332
+ }, z.core.$strip>>;
333
+ tools: z.ZodArray<z.ZodObject<{
334
+ name: z.ZodString;
335
+ description: z.ZodOptional<z.ZodString>;
336
+ sideEffect: z.ZodBoolean;
337
+ }, z.core.$strip>>;
338
+ knowledge: z.ZodArray<z.ZodObject<{
339
+ name: z.ZodString;
340
+ }, z.core.$strip>>;
341
+ }, z.core.$strip>;
342
+ type StudioJourneySummary = z.infer<typeof StudioJourneySummarySchema>;
343
+ declare const StudioAgentIntrospectionSchema: z.ZodObject<{
344
+ targetId: z.ZodString;
345
+ agent: z.ZodObject<{
346
+ id: z.ZodString;
347
+ instructions: z.ZodString;
348
+ logLevel: z.ZodOptional<z.ZodString>;
349
+ journeyCount: z.ZodNumber;
350
+ toolCount: z.ZodNumber;
351
+ knowledgeCount: z.ZodNumber;
352
+ widgetCount: z.ZodNumber;
353
+ }, z.core.$strip>;
354
+ journeys: z.ZodArray<z.ZodObject<{
355
+ id: z.ZodString;
356
+ kind: z.ZodEnum<{
357
+ stateMachine: "stateMachine";
358
+ delegation: "delegation";
359
+ }>;
360
+ condition: z.ZodString;
361
+ examples: z.ZodArray<z.ZodString>;
362
+ tags: z.ZodArray<z.ZodString>;
363
+ priority: z.ZodNumber;
364
+ stickiness: z.ZodEnum<{
365
+ low: "low";
366
+ medium: "medium";
367
+ high: "high";
368
+ }>;
369
+ alwaysInclude: z.ZodBoolean;
370
+ graph: z.ZodObject<{
371
+ id: z.ZodString;
372
+ kind: z.ZodEnum<{
373
+ stateMachine: "stateMachine";
374
+ delegation: "delegation";
375
+ }>;
376
+ initialStateId: z.ZodOptional<z.ZodString>;
377
+ alternateEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
378
+ stateId: z.ZodString;
379
+ description: z.ZodOptional<z.ZodString>;
380
+ priority: z.ZodOptional<z.ZodNumber>;
381
+ }, z.core.$strip>>>;
382
+ states: z.ZodArray<z.ZodObject<{
383
+ id: z.ZodString;
384
+ parentId: z.ZodOptional<z.ZodString>;
385
+ initialStateId: z.ZodOptional<z.ZodString>;
386
+ type: z.ZodEnum<{
387
+ state: "state";
388
+ parallel: "parallel";
389
+ final: "final";
390
+ }>;
391
+ instructions: z.ZodOptional<z.ZodString>;
392
+ summary: z.ZodOptional<z.ZodString>;
393
+ collected: z.ZodArray<z.ZodObject<{
394
+ path: z.ZodString;
395
+ required: z.ZodBoolean;
396
+ extract: z.ZodBoolean;
397
+ }, z.core.$strip>>;
398
+ transitions: z.ZodArray<z.ZodObject<{
399
+ kind: z.ZodEnum<{
400
+ event: "event";
401
+ conversational: "conversational";
402
+ }>;
403
+ targetId: z.ZodString;
404
+ eventName: z.ZodOptional<z.ZodString>;
405
+ description: z.ZodOptional<z.ZodString>;
406
+ priority: z.ZodOptional<z.ZodNumber>;
407
+ }, z.core.$strip>>;
408
+ actions: z.ZodArray<z.ZodObject<{
409
+ type: z.ZodEnum<{
410
+ entry: "entry";
411
+ exit: "exit";
412
+ transition: "transition";
413
+ }>;
414
+ name: z.ZodString;
415
+ }, z.core.$strip>>;
416
+ requiresVisit: z.ZodBoolean;
417
+ }, z.core.$strip>>;
418
+ }, z.core.$strip>;
419
+ mermaid: z.ZodString;
420
+ delegation: z.ZodOptional<z.ZodObject<{
421
+ goal: z.ZodString;
422
+ instructions: z.ZodOptional<z.ZodString>;
423
+ completeWhen: z.ZodArray<z.ZodString>;
424
+ tools: z.ZodArray<z.ZodObject<{
425
+ name: z.ZodString;
426
+ description: z.ZodOptional<z.ZodString>;
427
+ sideEffect: z.ZodBoolean;
428
+ }, z.core.$strip>>;
429
+ }, z.core.$strip>>;
430
+ tools: z.ZodArray<z.ZodObject<{
431
+ name: z.ZodString;
432
+ description: z.ZodOptional<z.ZodString>;
433
+ sideEffect: z.ZodBoolean;
434
+ }, z.core.$strip>>;
435
+ knowledge: z.ZodArray<z.ZodObject<{
436
+ name: z.ZodString;
437
+ }, z.core.$strip>>;
438
+ }, z.core.$strip>>;
439
+ tools: z.ZodArray<z.ZodObject<{
440
+ name: z.ZodString;
441
+ description: z.ZodOptional<z.ZodString>;
442
+ sideEffect: z.ZodBoolean;
443
+ }, z.core.$strip>>;
444
+ knowledge: z.ZodArray<z.ZodObject<{
445
+ name: z.ZodString;
446
+ }, z.core.$strip>>;
447
+ widgets: z.ZodArray<z.ZodObject<{
448
+ kind: z.ZodString;
449
+ }, z.core.$strip>>;
450
+ capturedAt: z.ZodString;
451
+ }, z.core.$strip>;
452
+ type StudioAgentIntrospection = z.infer<typeof StudioAgentIntrospectionSchema>;
453
+ declare const StudioConversationSummarySchema: z.ZodObject<{
454
+ id: z.ZodString;
455
+ agentId: z.ZodString;
456
+ lifecycle: z.ZodEnum<{
457
+ active: "active";
458
+ handoff: "handoff";
459
+ closed: "closed";
460
+ }>;
461
+ createdAt: z.ZodString;
462
+ updatedAt: z.ZodString;
463
+ activeJourneyId: z.ZodOptional<z.ZodString>;
464
+ activeStateIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
465
+ eventCount: z.ZodOptional<z.ZodNumber>;
466
+ traceIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
467
+ }, z.core.$strip>;
468
+ type StudioConversationSummary = z.infer<typeof StudioConversationSummarySchema>;
469
+ declare const StudioTelemetryMetricPointSchema: z.ZodObject<{
470
+ timestamp: z.ZodString;
471
+ value: z.ZodNumber;
472
+ labels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
473
+ }, z.core.$strip>;
474
+ type StudioTelemetryMetricPoint = z.infer<typeof StudioTelemetryMetricPointSchema>;
475
+ declare const StudioTraceSummarySchema: z.ZodObject<{
476
+ traceId: z.ZodString;
477
+ rootSpanName: z.ZodOptional<z.ZodString>;
478
+ serviceName: z.ZodOptional<z.ZodString>;
479
+ startedAt: z.ZodOptional<z.ZodString>;
480
+ durationMs: z.ZodOptional<z.ZodNumber>;
481
+ status: z.ZodDefault<z.ZodEnum<{
482
+ error: "error";
483
+ unknown: "unknown";
484
+ ok: "ok";
485
+ }>>;
486
+ spanCount: z.ZodOptional<z.ZodNumber>;
487
+ }, z.core.$strip>;
488
+ type StudioTraceSummary = z.infer<typeof StudioTraceSummarySchema>;
489
+ declare const StudioDashboardDataCapabilitySchema: z.ZodEnum<{
490
+ "telemetry.traces": "telemetry.traces";
491
+ "telemetry.metrics": "telemetry.metrics";
492
+ "cognidesk.agent": "cognidesk.agent";
493
+ "cognidesk.conversations": "cognidesk.conversations";
494
+ "cognidesk.events": "cognidesk.events";
495
+ "cognidesk.snapshots": "cognidesk.snapshots";
496
+ }>;
497
+ type StudioDashboardDataCapability = z.infer<typeof StudioDashboardDataCapabilitySchema>;
498
+ declare const StudioDashboardDataQuerySchema: z.ZodObject<{
499
+ capability: z.ZodEnum<{
500
+ "telemetry.traces": "telemetry.traces";
501
+ "telemetry.metrics": "telemetry.metrics";
502
+ "cognidesk.agent": "cognidesk.agent";
503
+ "cognidesk.conversations": "cognidesk.conversations";
504
+ "cognidesk.events": "cognidesk.events";
505
+ "cognidesk.snapshots": "cognidesk.snapshots";
506
+ }>;
507
+ targetId: z.ZodString;
508
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
509
+ }, z.core.$strip>;
510
+ type StudioDashboardDataQuery = z.infer<typeof StudioDashboardDataQuerySchema>;
511
+ declare const StudioDashboardDatasetSchema: z.ZodObject<{
512
+ id: z.ZodString;
513
+ title: z.ZodString;
514
+ description: z.ZodOptional<z.ZodString>;
515
+ mode: z.ZodDefault<z.ZodEnum<{
516
+ static: "static";
517
+ live: "live";
518
+ }>>;
519
+ refreshMs: z.ZodOptional<z.ZodNumber>;
520
+ source: z.ZodObject<{
521
+ capability: z.ZodEnum<{
522
+ "telemetry.traces": "telemetry.traces";
523
+ "telemetry.metrics": "telemetry.metrics";
524
+ "cognidesk.agent": "cognidesk.agent";
525
+ "cognidesk.conversations": "cognidesk.conversations";
526
+ "cognidesk.events": "cognidesk.events";
527
+ "cognidesk.snapshots": "cognidesk.snapshots";
528
+ }>;
529
+ targetId: z.ZodString;
530
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
531
+ }, z.core.$strip>;
532
+ capturedAt: z.ZodString;
533
+ data: z.ZodUnknown;
534
+ }, z.core.$strip>;
535
+ type StudioDashboardDataset = z.infer<typeof StudioDashboardDatasetSchema>;
536
+ declare const StudioDashboardWidgetSchema: z.ZodObject<{
537
+ id: z.ZodString;
538
+ title: z.ZodString;
539
+ kind: z.ZodEnum<{
540
+ metric: "metric";
541
+ line: "line";
542
+ bar: "bar";
543
+ donut: "donut";
544
+ table: "table";
545
+ insight: "insight";
546
+ }>;
547
+ datasetId: z.ZodOptional<z.ZodString>;
548
+ description: z.ZodOptional<z.ZodString>;
549
+ valuePath: z.ZodOptional<z.ZodString>;
550
+ labelPath: z.ZodOptional<z.ZodString>;
551
+ xPath: z.ZodOptional<z.ZodString>;
552
+ yPath: z.ZodOptional<z.ZodString>;
553
+ series: z.ZodOptional<z.ZodArray<z.ZodObject<{
554
+ label: z.ZodString;
555
+ path: z.ZodString;
556
+ }, z.core.$strip>>>;
557
+ unit: z.ZodOptional<z.ZodString>;
558
+ tone: z.ZodOptional<z.ZodEnum<{
559
+ slate: "slate";
560
+ blue: "blue";
561
+ green: "green";
562
+ amber: "amber";
563
+ red: "red";
564
+ violet: "violet";
565
+ teal: "teal";
566
+ }>>;
567
+ limit: z.ZodOptional<z.ZodNumber>;
568
+ columns: z.ZodOptional<z.ZodArray<z.ZodObject<{
569
+ label: z.ZodString;
570
+ path: z.ZodString;
571
+ }, z.core.$strip>>>;
572
+ }, z.core.$loose>;
573
+ type StudioDashboardWidget = z.infer<typeof StudioDashboardWidgetSchema>;
574
+ declare const StudioDashboardSpecSchema: z.ZodObject<{
575
+ layout: z.ZodDefault<z.ZodEnum<{
576
+ overview: "overview";
577
+ timeseries: "timeseries";
578
+ comparison: "comparison";
579
+ operations: "operations";
580
+ }>>;
581
+ summary: z.ZodOptional<z.ZodString>;
582
+ widgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
583
+ id: z.ZodString;
584
+ title: z.ZodString;
585
+ kind: z.ZodEnum<{
586
+ metric: "metric";
587
+ line: "line";
588
+ bar: "bar";
589
+ donut: "donut";
590
+ table: "table";
591
+ insight: "insight";
592
+ }>;
593
+ datasetId: z.ZodOptional<z.ZodString>;
594
+ description: z.ZodOptional<z.ZodString>;
595
+ valuePath: z.ZodOptional<z.ZodString>;
596
+ labelPath: z.ZodOptional<z.ZodString>;
597
+ xPath: z.ZodOptional<z.ZodString>;
598
+ yPath: z.ZodOptional<z.ZodString>;
599
+ series: z.ZodOptional<z.ZodArray<z.ZodObject<{
600
+ label: z.ZodString;
601
+ path: z.ZodString;
602
+ }, z.core.$strip>>>;
603
+ unit: z.ZodOptional<z.ZodString>;
604
+ tone: z.ZodOptional<z.ZodEnum<{
605
+ slate: "slate";
606
+ blue: "blue";
607
+ green: "green";
608
+ amber: "amber";
609
+ red: "red";
610
+ violet: "violet";
611
+ teal: "teal";
612
+ }>>;
613
+ limit: z.ZodOptional<z.ZodNumber>;
614
+ columns: z.ZodOptional<z.ZodArray<z.ZodObject<{
615
+ label: z.ZodString;
616
+ path: z.ZodString;
617
+ }, z.core.$strip>>>;
618
+ }, z.core.$loose>>>;
619
+ }, z.core.$loose>;
620
+ type StudioDashboardSpec = z.infer<typeof StudioDashboardSpecSchema>;
621
+ declare const StudioDashboardArtifactSchema: z.ZodObject<{
622
+ id: z.ZodString;
623
+ title: z.ZodString;
624
+ slug: z.ZodString;
625
+ description: z.ZodOptional<z.ZodString>;
626
+ version: z.ZodNumber;
627
+ status: z.ZodEnum<{
628
+ draft: "draft";
629
+ published: "published";
630
+ archived: "archived";
631
+ }>;
632
+ ownerUserId: z.ZodString;
633
+ targetId: z.ZodString;
634
+ artifactKey: z.ZodString;
635
+ renderer: z.ZodObject<{
636
+ kind: z.ZodLiteral<"react-component">;
637
+ entry: z.ZodDefault<z.ZodString>;
638
+ spec: z.ZodOptional<z.ZodObject<{
639
+ layout: z.ZodDefault<z.ZodEnum<{
640
+ overview: "overview";
641
+ timeseries: "timeseries";
642
+ comparison: "comparison";
643
+ operations: "operations";
644
+ }>>;
645
+ summary: z.ZodOptional<z.ZodString>;
646
+ widgets: z.ZodDefault<z.ZodArray<z.ZodObject<{
647
+ id: z.ZodString;
648
+ title: z.ZodString;
649
+ kind: z.ZodEnum<{
650
+ metric: "metric";
651
+ line: "line";
652
+ bar: "bar";
653
+ donut: "donut";
654
+ table: "table";
655
+ insight: "insight";
656
+ }>;
657
+ datasetId: z.ZodOptional<z.ZodString>;
658
+ description: z.ZodOptional<z.ZodString>;
659
+ valuePath: z.ZodOptional<z.ZodString>;
660
+ labelPath: z.ZodOptional<z.ZodString>;
661
+ xPath: z.ZodOptional<z.ZodString>;
662
+ yPath: z.ZodOptional<z.ZodString>;
663
+ series: z.ZodOptional<z.ZodArray<z.ZodObject<{
664
+ label: z.ZodString;
665
+ path: z.ZodString;
666
+ }, z.core.$strip>>>;
667
+ unit: z.ZodOptional<z.ZodString>;
668
+ tone: z.ZodOptional<z.ZodEnum<{
669
+ slate: "slate";
670
+ blue: "blue";
671
+ green: "green";
672
+ amber: "amber";
673
+ red: "red";
674
+ violet: "violet";
675
+ teal: "teal";
676
+ }>>;
677
+ limit: z.ZodOptional<z.ZodNumber>;
678
+ columns: z.ZodOptional<z.ZodArray<z.ZodObject<{
679
+ label: z.ZodString;
680
+ path: z.ZodString;
681
+ }, z.core.$strip>>>;
682
+ }, z.core.$loose>>>;
683
+ }, z.core.$loose>>;
684
+ }, z.core.$strip>;
685
+ datasets: z.ZodDefault<z.ZodArray<z.ZodObject<{
686
+ id: z.ZodString;
687
+ title: z.ZodString;
688
+ description: z.ZodOptional<z.ZodString>;
689
+ mode: z.ZodDefault<z.ZodEnum<{
690
+ static: "static";
691
+ live: "live";
692
+ }>>;
693
+ refreshMs: z.ZodOptional<z.ZodNumber>;
694
+ source: z.ZodObject<{
695
+ capability: z.ZodEnum<{
696
+ "telemetry.traces": "telemetry.traces";
697
+ "telemetry.metrics": "telemetry.metrics";
698
+ "cognidesk.agent": "cognidesk.agent";
699
+ "cognidesk.conversations": "cognidesk.conversations";
700
+ "cognidesk.events": "cognidesk.events";
701
+ "cognidesk.snapshots": "cognidesk.snapshots";
702
+ }>;
703
+ targetId: z.ZodString;
704
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
705
+ }, z.core.$strip>;
706
+ capturedAt: z.ZodString;
707
+ data: z.ZodUnknown;
708
+ }, z.core.$strip>>>;
709
+ createdAt: z.ZodString;
710
+ updatedAt: z.ZodString;
711
+ publishedAt: z.ZodOptional<z.ZodString>;
712
+ }, z.core.$strip>;
713
+ type StudioDashboardArtifact = z.infer<typeof StudioDashboardArtifactSchema>;
714
+ declare const StudioOperatorSurfaceSchema: z.ZodEnum<{
715
+ conversation: "conversation";
716
+ evidence: "evidence";
717
+ artifacts: "artifacts";
718
+ sandbox_diff: "sandbox_diff";
719
+ validation_runs: "validation_runs";
720
+ approvals: "approvals";
721
+ }>;
722
+ type StudioOperatorSurface = z.infer<typeof StudioOperatorSurfaceSchema>;
723
+ declare const StudioOperatorReasoningEffortSchema: z.ZodEnum<{
724
+ low: "low";
725
+ medium: "medium";
726
+ high: "high";
727
+ none: "none";
728
+ minimal: "minimal";
729
+ xhigh: "xhigh";
730
+ }>;
731
+ type StudioOperatorReasoningEffort = z.infer<typeof StudioOperatorReasoningEffortSchema>;
732
+ declare const StudioOperatorClientEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
733
+ type: z.ZodLiteral<"session.start">;
734
+ sessionId: z.ZodOptional<z.ZodString>;
735
+ targetId: z.ZodString;
736
+ modelId: z.ZodOptional<z.ZodString>;
737
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
738
+ low: "low";
739
+ medium: "medium";
740
+ high: "high";
741
+ none: "none";
742
+ minimal: "minimal";
743
+ xhigh: "xhigh";
744
+ }>>;
745
+ message: z.ZodOptional<z.ZodString>;
746
+ }, z.core.$strip>, z.ZodObject<{
747
+ type: z.ZodLiteral<"turn.start">;
748
+ sessionId: z.ZodString;
749
+ message: z.ZodString;
750
+ modelId: z.ZodOptional<z.ZodString>;
751
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
752
+ low: "low";
753
+ medium: "medium";
754
+ high: "high";
755
+ none: "none";
756
+ minimal: "minimal";
757
+ xhigh: "xhigh";
758
+ }>>;
759
+ }, z.core.$strip>, z.ZodObject<{
760
+ type: z.ZodLiteral<"turn.interrupt">;
761
+ sessionId: z.ZodString;
762
+ }, z.core.$strip>, z.ZodObject<{
763
+ type: z.ZodLiteral<"approval.resolve">;
764
+ sessionId: z.ZodString;
765
+ approvalId: z.ZodString;
766
+ approved: z.ZodBoolean;
767
+ payload: z.ZodOptional<z.ZodUnknown>;
768
+ }, z.core.$strip>], "type">;
769
+ type StudioOperatorClientEvent = z.infer<typeof StudioOperatorClientEventSchema>;
770
+ declare const StudioOperatorServerEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
771
+ type: z.ZodLiteral<"session.ready">;
772
+ sessionId: z.ZodString;
773
+ targetId: z.ZodString;
774
+ modelId: z.ZodOptional<z.ZodString>;
775
+ }, z.core.$strip>, z.ZodObject<{
776
+ type: z.ZodLiteral<"activity">;
777
+ sessionId: z.ZodString;
778
+ message: z.ZodString;
779
+ detail: z.ZodOptional<z.ZodString>;
780
+ category: z.ZodOptional<z.ZodString>;
781
+ input: z.ZodOptional<z.ZodUnknown>;
782
+ output: z.ZodOptional<z.ZodUnknown>;
783
+ surface: z.ZodOptional<z.ZodEnum<{
784
+ conversation: "conversation";
785
+ evidence: "evidence";
786
+ artifacts: "artifacts";
787
+ sandbox_diff: "sandbox_diff";
788
+ validation_runs: "validation_runs";
789
+ approvals: "approvals";
790
+ }>>;
791
+ }, z.core.$strip>, z.ZodObject<{
792
+ type: z.ZodLiteral<"assistant.delta">;
793
+ sessionId: z.ZodString;
794
+ delta: z.ZodString;
795
+ }, z.core.$strip>, z.ZodObject<{
796
+ type: z.ZodLiteral<"artifact.upserted">;
797
+ sessionId: z.ZodString;
798
+ artifact: z.ZodRecord<z.ZodString, z.ZodUnknown>;
799
+ }, z.core.$strip>, z.ZodObject<{
800
+ type: z.ZodLiteral<"reasoning.summary">;
801
+ sessionId: z.ZodString;
802
+ summary: z.ZodString;
803
+ }, z.core.$strip>, z.ZodObject<{
804
+ type: z.ZodLiteral<"tool.started">;
805
+ sessionId: z.ZodString;
806
+ name: z.ZodString;
807
+ input: z.ZodOptional<z.ZodUnknown>;
808
+ }, z.core.$strip>, z.ZodObject<{
809
+ type: z.ZodLiteral<"tool.completed">;
810
+ sessionId: z.ZodString;
811
+ name: z.ZodString;
812
+ output: z.ZodOptional<z.ZodUnknown>;
813
+ }, z.core.$strip>, z.ZodObject<{
814
+ type: z.ZodLiteral<"sandbox.diff.updated">;
815
+ sessionId: z.ZodString;
816
+ summary: z.ZodString;
817
+ files: z.ZodArray<z.ZodObject<{
818
+ path: z.ZodString;
819
+ status: z.ZodEnum<{
820
+ added: "added";
821
+ modified: "modified";
822
+ deleted: "deleted";
823
+ renamed: "renamed";
824
+ }>;
825
+ }, z.core.$strip>>;
826
+ }, z.core.$strip>, z.ZodObject<{
827
+ type: z.ZodLiteral<"validation.completed">;
828
+ sessionId: z.ZodString;
829
+ commandId: z.ZodString;
830
+ exitCode: z.ZodNumber;
831
+ output: z.ZodString;
832
+ }, z.core.$strip>, z.ZodObject<{
833
+ type: z.ZodLiteral<"approval.required">;
834
+ sessionId: z.ZodString;
835
+ approvalId: z.ZodString;
836
+ action: z.ZodEnum<{
837
+ publish_dashboard: "publish_dashboard";
838
+ create_pr: "create_pr";
839
+ grant_credentials: "grant_credentials";
840
+ }>;
841
+ title: z.ZodString;
842
+ payload: z.ZodUnknown;
843
+ }, z.core.$strip>, z.ZodObject<{
844
+ type: z.ZodLiteral<"turn.completed">;
845
+ sessionId: z.ZodString;
846
+ }, z.core.$strip>, z.ZodObject<{
847
+ type: z.ZodLiteral<"error">;
848
+ sessionId: z.ZodOptional<z.ZodString>;
849
+ message: z.ZodString;
850
+ }, z.core.$strip>], "type">;
851
+ type StudioOperatorServerEvent = z.infer<typeof StudioOperatorServerEventSchema>;
852
+ declare function jsonResponse<T>(value: T, init?: ResponseInit): Response;
853
+
854
+ export { type StudioAgentIntrospection, StudioAgentIntrospectionSchema, type StudioConversationSummary, StudioConversationSummarySchema, type StudioDashboardArtifact, StudioDashboardArtifactSchema, type StudioDashboardDataCapability, StudioDashboardDataCapabilitySchema, type StudioDashboardDataQuery, StudioDashboardDataQuerySchema, type StudioDashboardDataset, StudioDashboardDatasetSchema, type StudioDashboardSpec, StudioDashboardSpecSchema, type StudioDashboardWidget, StudioDashboardWidgetSchema, type StudioJourneyGraph, StudioJourneyGraphSchema, StudioJourneyGraphStateSchema, type StudioJourneySummary, StudioJourneySummarySchema, type StudioKnowledgeSummary, StudioKnowledgeSummarySchema, type StudioOperatorClientEvent, StudioOperatorClientEventSchema, type StudioOperatorReasoningEffort, StudioOperatorReasoningEffortSchema, type StudioOperatorServerEvent, StudioOperatorServerEventSchema, type StudioOperatorSurface, StudioOperatorSurfaceSchema, type StudioPermission, StudioPermissionSchema, type StudioRole, StudioRoleSchema, type StudioTargetManifest, type StudioTargetManifestInput, StudioTargetManifestSchema, type StudioTargetOverlay, StudioTargetOverlaySchema, type StudioTelemetryMetricPoint, StudioTelemetryMetricPointSchema, type StudioToolSummary, StudioToolSummarySchema, type StudioTraceSummary, StudioTraceSummarySchema, type StudioWidgetSummary, StudioWidgetSummarySchema, jsonResponse, mergeStudioTargetManifest, permissionsByRole, roleHasPermission };