@sentry/junior-plugin-api 0.301.0 → 0.303.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -35,6 +35,10 @@ export declare const objectFactsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
35
35
  cycle: z.ZodOptional<z.ZodString>;
36
36
  dueDate: z.ZodOptional<z.ZodISODate>;
37
37
  labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
+ trend: z.ZodOptional<z.ZodObject<{
39
+ label: z.ZodString;
40
+ points: z.ZodArray<z.ZodNumber>;
41
+ }, z.core.$strict>>;
38
42
  }, z.core.$strict>, z.ZodObject<{
39
43
  type: z.ZodLiteral<"deployment">;
40
44
  summary: z.ZodOptional<z.ZodString>;
@@ -57,6 +61,7 @@ export declare const objectFactsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
57
61
  summary: z.ZodOptional<z.ZodString>;
58
62
  owner: z.ZodOptional<z.ZodString>;
59
63
  modifiedAt: z.ZodOptional<z.ZodISODateTime>;
64
+ thumbnailUrl: z.ZodOptional<z.ZodString>;
60
65
  }, z.core.$strict>, z.ZodObject<{
61
66
  type: z.ZodLiteral<"message">;
62
67
  summary: z.ZodOptional<z.ZodString>;
@@ -68,7 +73,108 @@ export declare const objectFactsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
68
73
  summary: z.ZodOptional<z.ZodString>;
69
74
  siteName: z.ZodOptional<z.ZodString>;
70
75
  author: z.ZodOptional<z.ZodString>;
76
+ media: z.ZodOptional<z.ZodEnum<{
77
+ image: "image";
78
+ video: "video";
79
+ }>>;
71
80
  thumbnailUrl: z.ZodOptional<z.ZodString>;
81
+ }, z.core.$strict>, z.ZodObject<{
82
+ type: z.ZodLiteral<"chart">;
83
+ summary: z.ZodOptional<z.ZodString>;
84
+ display: z.ZodEnum<{
85
+ area: "area";
86
+ bar: "bar";
87
+ line: "line";
88
+ }>;
89
+ yAxis: z.ZodString;
90
+ range: z.ZodString;
91
+ series: z.ZodArray<z.ZodObject<{
92
+ label: z.ZodString;
93
+ points: z.ZodArray<z.ZodNumber>;
94
+ }, z.core.$strict>>;
95
+ }, z.core.$strict>, z.ZodObject<{
96
+ type: z.ZodLiteral<"event">;
97
+ summary: z.ZodOptional<z.ZodString>;
98
+ level: z.ZodOptional<z.ZodString>;
99
+ project: z.ZodOptional<z.ZodString>;
100
+ release: z.ZodOptional<z.ZodString>;
101
+ environment: z.ZodOptional<z.ZodString>;
102
+ occurredAt: z.ZodOptional<z.ZodISODateTime>;
103
+ }, z.core.$strict>, z.ZodObject<{
104
+ type: z.ZodLiteral<"release">;
105
+ summary: z.ZodOptional<z.ZodString>;
106
+ version: z.ZodString;
107
+ projects: z.ZodArray<z.ZodString>;
108
+ newIssues: z.ZodOptional<z.ZodNumber>;
109
+ crashFreeSessions: z.ZodOptional<z.ZodNumber>;
110
+ deployCount: z.ZodOptional<z.ZodNumber>;
111
+ lastDeploy: z.ZodOptional<z.ZodObject<{
112
+ environment: z.ZodString;
113
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
114
+ }, z.core.$strict>>;
115
+ releasedAt: z.ZodOptional<z.ZodISODateTime>;
116
+ }, z.core.$strict>, z.ZodObject<{
117
+ type: z.ZodLiteral<"monitor">;
118
+ summary: z.ZodOptional<z.ZodString>;
119
+ kind: z.ZodEnum<{
120
+ cron: "cron";
121
+ metric: "metric";
122
+ uptime: "uptime";
123
+ }>;
124
+ state: z.ZodEnum<{
125
+ failing: "failing";
126
+ ok: "ok";
127
+ paused: "paused";
128
+ pending: "pending";
129
+ }>;
130
+ project: z.ZodOptional<z.ZodString>;
131
+ environment: z.ZodOptional<z.ZodString>;
132
+ detail: z.ZodOptional<z.ZodString>;
133
+ lastCheckedAt: z.ZodOptional<z.ZodISODateTime>;
134
+ trend: z.ZodOptional<z.ZodObject<{
135
+ label: z.ZodString;
136
+ points: z.ZodArray<z.ZodNumber>;
137
+ }, z.core.$strict>>;
138
+ }, z.core.$strict>, z.ZodObject<{
139
+ type: z.ZodLiteral<"trace">;
140
+ summary: z.ZodOptional<z.ZodString>;
141
+ rootOp: z.ZodOptional<z.ZodString>;
142
+ rootName: z.ZodOptional<z.ZodString>;
143
+ durationMs: z.ZodNumber;
144
+ spanCount: z.ZodNumber;
145
+ errorCount: z.ZodNumber;
146
+ performanceIssueCount: z.ZodNumber;
147
+ projects: z.ZodArray<z.ZodString>;
148
+ spans: z.ZodArray<z.ZodObject<{
149
+ op: z.ZodOptional<z.ZodString>;
150
+ name: z.ZodString;
151
+ startMs: z.ZodNumber;
152
+ durationMs: z.ZodNumber;
153
+ issue: z.ZodOptional<z.ZodBoolean>;
154
+ }, z.core.$strict>>;
155
+ }, z.core.$strict>, z.ZodObject<{
156
+ type: z.ZodLiteral<"dashboard">;
157
+ summary: z.ZodOptional<z.ZodString>;
158
+ widgetCount: z.ZodNumber;
159
+ projects: z.ZodArray<z.ZodString>;
160
+ environments: z.ZodArray<z.ZodString>;
161
+ range: z.ZodString;
162
+ widgets: z.ZodArray<z.ZodObject<{
163
+ title: z.ZodString;
164
+ display: z.ZodString;
165
+ }, z.core.$strict>>;
166
+ charts: z.ZodArray<z.ZodObject<{
167
+ title: z.ZodString;
168
+ display: z.ZodEnum<{
169
+ area: "area";
170
+ bar: "bar";
171
+ line: "line";
172
+ }>;
173
+ series: z.ZodArray<z.ZodObject<{
174
+ label: z.ZodString;
175
+ points: z.ZodArray<z.ZodNumber>;
176
+ }, z.core.$strict>>;
177
+ }, z.core.$strict>>;
72
178
  }, z.core.$strict>, z.ZodObject<{
73
179
  type: z.ZodLiteral<"person">;
74
180
  summary: z.ZodOptional<z.ZodString>;
@@ -83,6 +189,8 @@ export type ObjectFacts = z.output<typeof objectFactsSchema>;
83
189
  * text at a word, with an ellipsis. Empty text gives no summary.
84
190
  */
85
191
  export declare function objectSummary(text: string): string | undefined;
192
+ /** Format a span or trace duration, such as "850 ms" or "2.4 s". */
193
+ export declare function formatDuration(ms: number): string;
86
194
  type ObjectField = {
87
195
  href?: string;
88
196
  key: string;
@@ -95,27 +203,34 @@ export declare function objectFactFields(facts: ObjectFacts | undefined): Object
95
203
  export declare const objectTypeSchema: z.ZodEnum<{
96
204
  automation: "automation";
97
205
  calendar_event: "calendar_event";
206
+ chart: "chart";
98
207
  code_change: "code_change";
99
208
  conversation: "conversation";
209
+ dashboard: "dashboard";
100
210
  deployment: "deployment";
101
211
  document: "document";
212
+ event: "event";
102
213
  item: "item";
103
214
  message: "message";
215
+ monitor: "monitor";
104
216
  person: "person";
217
+ release: "release";
105
218
  task: "task";
219
+ trace: "trace";
106
220
  web_page: "web_page";
107
221
  }>;
108
222
  export type ObjectType = z.output<typeof objectTypeSchema>;
109
- declare const objectIconNames: readonly ["issue-opened", "issue-closed", "git-pull-request", "git-pull-request-draft", "git-pull-request-closed", "git-merge", "workflow", "rocket", "calendar", "comment-discussion", "person", "file", "comment", "globe", "package"];
223
+ declare const objectIconNames: readonly ["issue-opened", "issue-closed", "git-pull-request", "git-pull-request-draft", "git-pull-request-closed", "git-merge", "workflow", "rocket", "calendar", "comment-discussion", "person", "file", "comment", "globe", "graph", "pulse", "bell", "rows", "tag", "package", "apps"];
110
224
  export type ObjectIconName = (typeof objectIconNames)[number];
111
225
  export type ObjectTone = "neutral" | "success" | "danger" | "warning" | "info" | "accent";
112
226
  /** Resolve identity and state without replacing the type icon with a warning. */
113
227
  export declare function objectPresentation(object: {
114
228
  objectType: ObjectType;
115
- status?: string;
229
+ status?: string | undefined;
116
230
  facts?: {
117
231
  type: string;
118
- };
232
+ state?: string;
233
+ } | undefined;
119
234
  }): {
120
235
  icon: ObjectIconName;
121
236
  tone: ObjectTone;
@@ -148,14 +263,20 @@ export declare const objectAnnotationSchema: z.ZodObject<{
148
263
  objectType: z.ZodEnum<{
149
264
  automation: "automation";
150
265
  calendar_event: "calendar_event";
266
+ chart: "chart";
151
267
  code_change: "code_change";
152
268
  conversation: "conversation";
269
+ dashboard: "dashboard";
153
270
  deployment: "deployment";
154
271
  document: "document";
272
+ event: "event";
155
273
  item: "item";
156
274
  message: "message";
275
+ monitor: "monitor";
157
276
  person: "person";
277
+ release: "release";
158
278
  task: "task";
279
+ trace: "trace";
159
280
  web_page: "web_page";
160
281
  }>;
161
282
  title: z.ZodString;
@@ -197,6 +318,10 @@ export declare const objectAnnotationSchema: z.ZodObject<{
197
318
  cycle: z.ZodOptional<z.ZodString>;
198
319
  dueDate: z.ZodOptional<z.ZodISODate>;
199
320
  labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
321
+ trend: z.ZodOptional<z.ZodObject<{
322
+ label: z.ZodString;
323
+ points: z.ZodArray<z.ZodNumber>;
324
+ }, z.core.$strict>>;
200
325
  }, z.core.$strict>, z.ZodObject<{
201
326
  type: z.ZodLiteral<"deployment">;
202
327
  summary: z.ZodOptional<z.ZodString>;
@@ -219,6 +344,7 @@ export declare const objectAnnotationSchema: z.ZodObject<{
219
344
  summary: z.ZodOptional<z.ZodString>;
220
345
  owner: z.ZodOptional<z.ZodString>;
221
346
  modifiedAt: z.ZodOptional<z.ZodISODateTime>;
347
+ thumbnailUrl: z.ZodOptional<z.ZodString>;
222
348
  }, z.core.$strict>, z.ZodObject<{
223
349
  type: z.ZodLiteral<"message">;
224
350
  summary: z.ZodOptional<z.ZodString>;
@@ -230,7 +356,108 @@ export declare const objectAnnotationSchema: z.ZodObject<{
230
356
  summary: z.ZodOptional<z.ZodString>;
231
357
  siteName: z.ZodOptional<z.ZodString>;
232
358
  author: z.ZodOptional<z.ZodString>;
359
+ media: z.ZodOptional<z.ZodEnum<{
360
+ image: "image";
361
+ video: "video";
362
+ }>>;
233
363
  thumbnailUrl: z.ZodOptional<z.ZodString>;
364
+ }, z.core.$strict>, z.ZodObject<{
365
+ type: z.ZodLiteral<"chart">;
366
+ summary: z.ZodOptional<z.ZodString>;
367
+ display: z.ZodEnum<{
368
+ area: "area";
369
+ bar: "bar";
370
+ line: "line";
371
+ }>;
372
+ yAxis: z.ZodString;
373
+ range: z.ZodString;
374
+ series: z.ZodArray<z.ZodObject<{
375
+ label: z.ZodString;
376
+ points: z.ZodArray<z.ZodNumber>;
377
+ }, z.core.$strict>>;
378
+ }, z.core.$strict>, z.ZodObject<{
379
+ type: z.ZodLiteral<"event">;
380
+ summary: z.ZodOptional<z.ZodString>;
381
+ level: z.ZodOptional<z.ZodString>;
382
+ project: z.ZodOptional<z.ZodString>;
383
+ release: z.ZodOptional<z.ZodString>;
384
+ environment: z.ZodOptional<z.ZodString>;
385
+ occurredAt: z.ZodOptional<z.ZodISODateTime>;
386
+ }, z.core.$strict>, z.ZodObject<{
387
+ type: z.ZodLiteral<"release">;
388
+ summary: z.ZodOptional<z.ZodString>;
389
+ version: z.ZodString;
390
+ projects: z.ZodArray<z.ZodString>;
391
+ newIssues: z.ZodOptional<z.ZodNumber>;
392
+ crashFreeSessions: z.ZodOptional<z.ZodNumber>;
393
+ deployCount: z.ZodOptional<z.ZodNumber>;
394
+ lastDeploy: z.ZodOptional<z.ZodObject<{
395
+ environment: z.ZodString;
396
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
397
+ }, z.core.$strict>>;
398
+ releasedAt: z.ZodOptional<z.ZodISODateTime>;
399
+ }, z.core.$strict>, z.ZodObject<{
400
+ type: z.ZodLiteral<"monitor">;
401
+ summary: z.ZodOptional<z.ZodString>;
402
+ kind: z.ZodEnum<{
403
+ cron: "cron";
404
+ metric: "metric";
405
+ uptime: "uptime";
406
+ }>;
407
+ state: z.ZodEnum<{
408
+ failing: "failing";
409
+ ok: "ok";
410
+ paused: "paused";
411
+ pending: "pending";
412
+ }>;
413
+ project: z.ZodOptional<z.ZodString>;
414
+ environment: z.ZodOptional<z.ZodString>;
415
+ detail: z.ZodOptional<z.ZodString>;
416
+ lastCheckedAt: z.ZodOptional<z.ZodISODateTime>;
417
+ trend: z.ZodOptional<z.ZodObject<{
418
+ label: z.ZodString;
419
+ points: z.ZodArray<z.ZodNumber>;
420
+ }, z.core.$strict>>;
421
+ }, z.core.$strict>, z.ZodObject<{
422
+ type: z.ZodLiteral<"trace">;
423
+ summary: z.ZodOptional<z.ZodString>;
424
+ rootOp: z.ZodOptional<z.ZodString>;
425
+ rootName: z.ZodOptional<z.ZodString>;
426
+ durationMs: z.ZodNumber;
427
+ spanCount: z.ZodNumber;
428
+ errorCount: z.ZodNumber;
429
+ performanceIssueCount: z.ZodNumber;
430
+ projects: z.ZodArray<z.ZodString>;
431
+ spans: z.ZodArray<z.ZodObject<{
432
+ op: z.ZodOptional<z.ZodString>;
433
+ name: z.ZodString;
434
+ startMs: z.ZodNumber;
435
+ durationMs: z.ZodNumber;
436
+ issue: z.ZodOptional<z.ZodBoolean>;
437
+ }, z.core.$strict>>;
438
+ }, z.core.$strict>, z.ZodObject<{
439
+ type: z.ZodLiteral<"dashboard">;
440
+ summary: z.ZodOptional<z.ZodString>;
441
+ widgetCount: z.ZodNumber;
442
+ projects: z.ZodArray<z.ZodString>;
443
+ environments: z.ZodArray<z.ZodString>;
444
+ range: z.ZodString;
445
+ widgets: z.ZodArray<z.ZodObject<{
446
+ title: z.ZodString;
447
+ display: z.ZodString;
448
+ }, z.core.$strict>>;
449
+ charts: z.ZodArray<z.ZodObject<{
450
+ title: z.ZodString;
451
+ display: z.ZodEnum<{
452
+ area: "area";
453
+ bar: "bar";
454
+ line: "line";
455
+ }>;
456
+ series: z.ZodArray<z.ZodObject<{
457
+ label: z.ZodString;
458
+ points: z.ZodArray<z.ZodNumber>;
459
+ }, z.core.$strict>>;
460
+ }, z.core.$strict>>;
234
461
  }, z.core.$strict>, z.ZodObject<{
235
462
  type: z.ZodLiteral<"person">;
236
463
  summary: z.ZodOptional<z.ZodString>;
@@ -249,14 +476,20 @@ export declare const ownedObjectAnnotationSchema: z.ZodObject<{
249
476
  objectType: z.ZodEnum<{
250
477
  automation: "automation";
251
478
  calendar_event: "calendar_event";
479
+ chart: "chart";
252
480
  code_change: "code_change";
253
481
  conversation: "conversation";
482
+ dashboard: "dashboard";
254
483
  deployment: "deployment";
255
484
  document: "document";
485
+ event: "event";
256
486
  item: "item";
257
487
  message: "message";
488
+ monitor: "monitor";
258
489
  person: "person";
490
+ release: "release";
259
491
  task: "task";
492
+ trace: "trace";
260
493
  web_page: "web_page";
261
494
  }>;
262
495
  title: z.ZodString;
@@ -298,6 +531,10 @@ export declare const ownedObjectAnnotationSchema: z.ZodObject<{
298
531
  cycle: z.ZodOptional<z.ZodString>;
299
532
  dueDate: z.ZodOptional<z.ZodISODate>;
300
533
  labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
534
+ trend: z.ZodOptional<z.ZodObject<{
535
+ label: z.ZodString;
536
+ points: z.ZodArray<z.ZodNumber>;
537
+ }, z.core.$strict>>;
301
538
  }, z.core.$strict>, z.ZodObject<{
302
539
  type: z.ZodLiteral<"deployment">;
303
540
  summary: z.ZodOptional<z.ZodString>;
@@ -320,6 +557,7 @@ export declare const ownedObjectAnnotationSchema: z.ZodObject<{
320
557
  summary: z.ZodOptional<z.ZodString>;
321
558
  owner: z.ZodOptional<z.ZodString>;
322
559
  modifiedAt: z.ZodOptional<z.ZodISODateTime>;
560
+ thumbnailUrl: z.ZodOptional<z.ZodString>;
323
561
  }, z.core.$strict>, z.ZodObject<{
324
562
  type: z.ZodLiteral<"message">;
325
563
  summary: z.ZodOptional<z.ZodString>;
@@ -331,7 +569,108 @@ export declare const ownedObjectAnnotationSchema: z.ZodObject<{
331
569
  summary: z.ZodOptional<z.ZodString>;
332
570
  siteName: z.ZodOptional<z.ZodString>;
333
571
  author: z.ZodOptional<z.ZodString>;
572
+ media: z.ZodOptional<z.ZodEnum<{
573
+ image: "image";
574
+ video: "video";
575
+ }>>;
334
576
  thumbnailUrl: z.ZodOptional<z.ZodString>;
577
+ }, z.core.$strict>, z.ZodObject<{
578
+ type: z.ZodLiteral<"chart">;
579
+ summary: z.ZodOptional<z.ZodString>;
580
+ display: z.ZodEnum<{
581
+ area: "area";
582
+ bar: "bar";
583
+ line: "line";
584
+ }>;
585
+ yAxis: z.ZodString;
586
+ range: z.ZodString;
587
+ series: z.ZodArray<z.ZodObject<{
588
+ label: z.ZodString;
589
+ points: z.ZodArray<z.ZodNumber>;
590
+ }, z.core.$strict>>;
591
+ }, z.core.$strict>, z.ZodObject<{
592
+ type: z.ZodLiteral<"event">;
593
+ summary: z.ZodOptional<z.ZodString>;
594
+ level: z.ZodOptional<z.ZodString>;
595
+ project: z.ZodOptional<z.ZodString>;
596
+ release: z.ZodOptional<z.ZodString>;
597
+ environment: z.ZodOptional<z.ZodString>;
598
+ occurredAt: z.ZodOptional<z.ZodISODateTime>;
599
+ }, z.core.$strict>, z.ZodObject<{
600
+ type: z.ZodLiteral<"release">;
601
+ summary: z.ZodOptional<z.ZodString>;
602
+ version: z.ZodString;
603
+ projects: z.ZodArray<z.ZodString>;
604
+ newIssues: z.ZodOptional<z.ZodNumber>;
605
+ crashFreeSessions: z.ZodOptional<z.ZodNumber>;
606
+ deployCount: z.ZodOptional<z.ZodNumber>;
607
+ lastDeploy: z.ZodOptional<z.ZodObject<{
608
+ environment: z.ZodString;
609
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
610
+ }, z.core.$strict>>;
611
+ releasedAt: z.ZodOptional<z.ZodISODateTime>;
612
+ }, z.core.$strict>, z.ZodObject<{
613
+ type: z.ZodLiteral<"monitor">;
614
+ summary: z.ZodOptional<z.ZodString>;
615
+ kind: z.ZodEnum<{
616
+ cron: "cron";
617
+ metric: "metric";
618
+ uptime: "uptime";
619
+ }>;
620
+ state: z.ZodEnum<{
621
+ failing: "failing";
622
+ ok: "ok";
623
+ paused: "paused";
624
+ pending: "pending";
625
+ }>;
626
+ project: z.ZodOptional<z.ZodString>;
627
+ environment: z.ZodOptional<z.ZodString>;
628
+ detail: z.ZodOptional<z.ZodString>;
629
+ lastCheckedAt: z.ZodOptional<z.ZodISODateTime>;
630
+ trend: z.ZodOptional<z.ZodObject<{
631
+ label: z.ZodString;
632
+ points: z.ZodArray<z.ZodNumber>;
633
+ }, z.core.$strict>>;
634
+ }, z.core.$strict>, z.ZodObject<{
635
+ type: z.ZodLiteral<"trace">;
636
+ summary: z.ZodOptional<z.ZodString>;
637
+ rootOp: z.ZodOptional<z.ZodString>;
638
+ rootName: z.ZodOptional<z.ZodString>;
639
+ durationMs: z.ZodNumber;
640
+ spanCount: z.ZodNumber;
641
+ errorCount: z.ZodNumber;
642
+ performanceIssueCount: z.ZodNumber;
643
+ projects: z.ZodArray<z.ZodString>;
644
+ spans: z.ZodArray<z.ZodObject<{
645
+ op: z.ZodOptional<z.ZodString>;
646
+ name: z.ZodString;
647
+ startMs: z.ZodNumber;
648
+ durationMs: z.ZodNumber;
649
+ issue: z.ZodOptional<z.ZodBoolean>;
650
+ }, z.core.$strict>>;
651
+ }, z.core.$strict>, z.ZodObject<{
652
+ type: z.ZodLiteral<"dashboard">;
653
+ summary: z.ZodOptional<z.ZodString>;
654
+ widgetCount: z.ZodNumber;
655
+ projects: z.ZodArray<z.ZodString>;
656
+ environments: z.ZodArray<z.ZodString>;
657
+ range: z.ZodString;
658
+ widgets: z.ZodArray<z.ZodObject<{
659
+ title: z.ZodString;
660
+ display: z.ZodString;
661
+ }, z.core.$strict>>;
662
+ charts: z.ZodArray<z.ZodObject<{
663
+ title: z.ZodString;
664
+ display: z.ZodEnum<{
665
+ area: "area";
666
+ bar: "bar";
667
+ line: "line";
668
+ }>;
669
+ series: z.ZodArray<z.ZodObject<{
670
+ label: z.ZodString;
671
+ points: z.ZodArray<z.ZodNumber>;
672
+ }, z.core.$strict>>;
673
+ }, z.core.$strict>>;
335
674
  }, z.core.$strict>, z.ZodObject<{
336
675
  type: z.ZodLiteral<"person">;
337
676
  summary: z.ZodOptional<z.ZodString>;
@@ -359,7 +698,13 @@ export declare const objectIconPaths: {
359
698
  file: string[];
360
699
  comment: string[];
361
700
  globe: string[];
701
+ graph: string[];
702
+ pulse: string[];
703
+ bell: string[];
704
+ rows: string[];
705
+ tag: string[];
362
706
  package: string[];
707
+ apps: string[];
363
708
  };
364
709
  /** Exact non-blank actor user id that rejects the sentinel "unknown". */
365
710
  export declare const actorUserIdSchema: z.ZodString;
@@ -799,26 +1144,26 @@ interface BaseInvocationContext {
799
1144
  */
800
1145
  conversationId?: string;
801
1146
  /** Location associated with this Conversation. */
802
- locationId?: string;
1147
+ locationId?: string | undefined;
803
1148
  }
804
1149
  export interface SlackInvocationContext extends BaseInvocationContext {
805
1150
  /** Runtime-owned default outbound destination for this invocation. */
806
1151
  destination: SlackDestination;
807
- actor?: SlackActor;
1152
+ actor?: SlackActor | undefined;
808
1153
  /** Runtime-owned source where the invocation came from. */
809
1154
  source: SlackSource;
810
1155
  }
811
1156
  export interface LocalInvocationContext extends BaseInvocationContext {
812
1157
  /** Runtime-owned default outbound destination for this invocation. */
813
1158
  destination: LocalDestination;
814
- actor?: LocalActor;
1159
+ actor?: LocalActor | undefined;
815
1160
  /** Runtime-owned source where the invocation came from. */
816
1161
  source: LocalSource;
817
1162
  }
818
1163
  export interface WebInvocationContext extends BaseInvocationContext {
819
1164
  /** Existing conversation destination used for location and tool context. */
820
1165
  destination: Destination;
821
- actor?: WebActor;
1166
+ actor?: WebActor | undefined;
822
1167
  /** Runtime-owned dashboard/web source for this invocation. */
823
1168
  source: WebSource;
824
1169
  }
@@ -831,15 +1176,15 @@ export interface EventInvocationContext extends BaseInvocationContext {
831
1176
  }
832
1177
  export type InvocationContext = LocalInvocationContext | SlackInvocationContext | WebInvocationContext | (BaseInvocationContext & {
833
1178
  destination: Destination;
834
- actor?: Actor;
1179
+ actor?: Actor | undefined;
835
1180
  source: AgentInvocationSource | EventAutomationSource | PluginDispatchSource | EventSource | ScheduledAutomationSource;
836
1181
  });
837
1182
  /** Build a normalized Slack source from runtime-owned Slack coordinates. */
838
1183
  export declare function createSlackSource(input: {
839
1184
  channelId: string;
840
- messageTs?: string;
1185
+ messageTs?: string | undefined;
841
1186
  teamId: string;
842
- threadTs?: string;
1187
+ threadTs?: string | undefined;
843
1188
  /** Runtime-normalized source visibility. */
844
1189
  visibility: SourceVisibility;
845
1190
  }): SlackSource;
@@ -973,7 +1318,7 @@ export type PluginGrantAccess = z.output<typeof pluginGrantAccessSchema>;
973
1318
  export type PluginAuthorization = z.output<typeof pluginAuthorizationSchema>;
974
1319
  /** Interrupt sandbox egress so Junior can start provider authorization. */
975
1320
  export declare class EgressAuthRequired extends Error {
976
- authorization?: PluginAuthorization;
1321
+ authorization?: PluginAuthorization | undefined;
977
1322
  constructor(message: string, options?: {
978
1323
  authorization?: PluginAuthorization;
979
1324
  cause?: unknown;
@@ -1150,14 +1495,20 @@ export declare const resourceLinkAnnotationSchema: z.ZodObject<{
1150
1495
  objectType: z.ZodOptional<z.ZodEnum<{
1151
1496
  automation: "automation";
1152
1497
  calendar_event: "calendar_event";
1498
+ chart: "chart";
1153
1499
  code_change: "code_change";
1154
1500
  conversation: "conversation";
1501
+ dashboard: "dashboard";
1155
1502
  deployment: "deployment";
1156
1503
  document: "document";
1504
+ event: "event";
1157
1505
  item: "item";
1158
1506
  message: "message";
1507
+ monitor: "monitor";
1159
1508
  person: "person";
1509
+ release: "release";
1160
1510
  task: "task";
1511
+ trace: "trace";
1161
1512
  web_page: "web_page";
1162
1513
  }>>;
1163
1514
  key: z.ZodString;
@@ -1178,14 +1529,20 @@ export declare const conversationAnnotationInputSchema: z.ZodDiscriminatedUnion<
1178
1529
  objectType: z.ZodOptional<z.ZodEnum<{
1179
1530
  automation: "automation";
1180
1531
  calendar_event: "calendar_event";
1532
+ chart: "chart";
1181
1533
  code_change: "code_change";
1182
1534
  conversation: "conversation";
1535
+ dashboard: "dashboard";
1183
1536
  deployment: "deployment";
1184
1537
  document: "document";
1538
+ event: "event";
1185
1539
  item: "item";
1186
1540
  message: "message";
1541
+ monitor: "monitor";
1187
1542
  person: "person";
1543
+ release: "release";
1188
1544
  task: "task";
1545
+ trace: "trace";
1189
1546
  web_page: "web_page";
1190
1547
  }>>;
1191
1548
  key: z.ZodString;
@@ -1206,14 +1563,20 @@ export declare const conversationAnnotationInputSchema: z.ZodDiscriminatedUnion<
1206
1563
  objectType: z.ZodEnum<{
1207
1564
  automation: "automation";
1208
1565
  calendar_event: "calendar_event";
1566
+ chart: "chart";
1209
1567
  code_change: "code_change";
1210
1568
  conversation: "conversation";
1569
+ dashboard: "dashboard";
1211
1570
  deployment: "deployment";
1212
1571
  document: "document";
1572
+ event: "event";
1213
1573
  item: "item";
1214
1574
  message: "message";
1575
+ monitor: "monitor";
1215
1576
  person: "person";
1577
+ release: "release";
1216
1578
  task: "task";
1579
+ trace: "trace";
1217
1580
  web_page: "web_page";
1218
1581
  }>;
1219
1582
  title: z.ZodString;
@@ -1255,6 +1618,10 @@ export declare const conversationAnnotationInputSchema: z.ZodDiscriminatedUnion<
1255
1618
  cycle: z.ZodOptional<z.ZodString>;
1256
1619
  dueDate: z.ZodOptional<z.ZodISODate>;
1257
1620
  labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
1621
+ trend: z.ZodOptional<z.ZodObject<{
1622
+ label: z.ZodString;
1623
+ points: z.ZodArray<z.ZodNumber>;
1624
+ }, z.core.$strict>>;
1258
1625
  }, z.core.$strict>, z.ZodObject<{
1259
1626
  type: z.ZodLiteral<"deployment">;
1260
1627
  summary: z.ZodOptional<z.ZodString>;
@@ -1277,6 +1644,7 @@ export declare const conversationAnnotationInputSchema: z.ZodDiscriminatedUnion<
1277
1644
  summary: z.ZodOptional<z.ZodString>;
1278
1645
  owner: z.ZodOptional<z.ZodString>;
1279
1646
  modifiedAt: z.ZodOptional<z.ZodISODateTime>;
1647
+ thumbnailUrl: z.ZodOptional<z.ZodString>;
1280
1648
  }, z.core.$strict>, z.ZodObject<{
1281
1649
  type: z.ZodLiteral<"message">;
1282
1650
  summary: z.ZodOptional<z.ZodString>;
@@ -1288,7 +1656,108 @@ export declare const conversationAnnotationInputSchema: z.ZodDiscriminatedUnion<
1288
1656
  summary: z.ZodOptional<z.ZodString>;
1289
1657
  siteName: z.ZodOptional<z.ZodString>;
1290
1658
  author: z.ZodOptional<z.ZodString>;
1659
+ media: z.ZodOptional<z.ZodEnum<{
1660
+ image: "image";
1661
+ video: "video";
1662
+ }>>;
1291
1663
  thumbnailUrl: z.ZodOptional<z.ZodString>;
1664
+ }, z.core.$strict>, z.ZodObject<{
1665
+ type: z.ZodLiteral<"chart">;
1666
+ summary: z.ZodOptional<z.ZodString>;
1667
+ display: z.ZodEnum<{
1668
+ area: "area";
1669
+ bar: "bar";
1670
+ line: "line";
1671
+ }>;
1672
+ yAxis: z.ZodString;
1673
+ range: z.ZodString;
1674
+ series: z.ZodArray<z.ZodObject<{
1675
+ label: z.ZodString;
1676
+ points: z.ZodArray<z.ZodNumber>;
1677
+ }, z.core.$strict>>;
1678
+ }, z.core.$strict>, z.ZodObject<{
1679
+ type: z.ZodLiteral<"event">;
1680
+ summary: z.ZodOptional<z.ZodString>;
1681
+ level: z.ZodOptional<z.ZodString>;
1682
+ project: z.ZodOptional<z.ZodString>;
1683
+ release: z.ZodOptional<z.ZodString>;
1684
+ environment: z.ZodOptional<z.ZodString>;
1685
+ occurredAt: z.ZodOptional<z.ZodISODateTime>;
1686
+ }, z.core.$strict>, z.ZodObject<{
1687
+ type: z.ZodLiteral<"release">;
1688
+ summary: z.ZodOptional<z.ZodString>;
1689
+ version: z.ZodString;
1690
+ projects: z.ZodArray<z.ZodString>;
1691
+ newIssues: z.ZodOptional<z.ZodNumber>;
1692
+ crashFreeSessions: z.ZodOptional<z.ZodNumber>;
1693
+ deployCount: z.ZodOptional<z.ZodNumber>;
1694
+ lastDeploy: z.ZodOptional<z.ZodObject<{
1695
+ environment: z.ZodString;
1696
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
1697
+ }, z.core.$strict>>;
1698
+ releasedAt: z.ZodOptional<z.ZodISODateTime>;
1699
+ }, z.core.$strict>, z.ZodObject<{
1700
+ type: z.ZodLiteral<"monitor">;
1701
+ summary: z.ZodOptional<z.ZodString>;
1702
+ kind: z.ZodEnum<{
1703
+ cron: "cron";
1704
+ metric: "metric";
1705
+ uptime: "uptime";
1706
+ }>;
1707
+ state: z.ZodEnum<{
1708
+ failing: "failing";
1709
+ ok: "ok";
1710
+ paused: "paused";
1711
+ pending: "pending";
1712
+ }>;
1713
+ project: z.ZodOptional<z.ZodString>;
1714
+ environment: z.ZodOptional<z.ZodString>;
1715
+ detail: z.ZodOptional<z.ZodString>;
1716
+ lastCheckedAt: z.ZodOptional<z.ZodISODateTime>;
1717
+ trend: z.ZodOptional<z.ZodObject<{
1718
+ label: z.ZodString;
1719
+ points: z.ZodArray<z.ZodNumber>;
1720
+ }, z.core.$strict>>;
1721
+ }, z.core.$strict>, z.ZodObject<{
1722
+ type: z.ZodLiteral<"trace">;
1723
+ summary: z.ZodOptional<z.ZodString>;
1724
+ rootOp: z.ZodOptional<z.ZodString>;
1725
+ rootName: z.ZodOptional<z.ZodString>;
1726
+ durationMs: z.ZodNumber;
1727
+ spanCount: z.ZodNumber;
1728
+ errorCount: z.ZodNumber;
1729
+ performanceIssueCount: z.ZodNumber;
1730
+ projects: z.ZodArray<z.ZodString>;
1731
+ spans: z.ZodArray<z.ZodObject<{
1732
+ op: z.ZodOptional<z.ZodString>;
1733
+ name: z.ZodString;
1734
+ startMs: z.ZodNumber;
1735
+ durationMs: z.ZodNumber;
1736
+ issue: z.ZodOptional<z.ZodBoolean>;
1737
+ }, z.core.$strict>>;
1738
+ }, z.core.$strict>, z.ZodObject<{
1739
+ type: z.ZodLiteral<"dashboard">;
1740
+ summary: z.ZodOptional<z.ZodString>;
1741
+ widgetCount: z.ZodNumber;
1742
+ projects: z.ZodArray<z.ZodString>;
1743
+ environments: z.ZodArray<z.ZodString>;
1744
+ range: z.ZodString;
1745
+ widgets: z.ZodArray<z.ZodObject<{
1746
+ title: z.ZodString;
1747
+ display: z.ZodString;
1748
+ }, z.core.$strict>>;
1749
+ charts: z.ZodArray<z.ZodObject<{
1750
+ title: z.ZodString;
1751
+ display: z.ZodEnum<{
1752
+ area: "area";
1753
+ bar: "bar";
1754
+ line: "line";
1755
+ }>;
1756
+ series: z.ZodArray<z.ZodObject<{
1757
+ label: z.ZodString;
1758
+ points: z.ZodArray<z.ZodNumber>;
1759
+ }, z.core.$strict>>;
1760
+ }, z.core.$strict>>;
1292
1761
  }, z.core.$strict>, z.ZodObject<{
1293
1762
  type: z.ZodLiteral<"person">;
1294
1763
  summary: z.ZodOptional<z.ZodString>;
@@ -1332,14 +1801,20 @@ export declare const conversationSidebarAnnotationSchema: z.ZodObject<{
1332
1801
  objectType: z.ZodOptional<z.ZodEnum<{
1333
1802
  automation: "automation";
1334
1803
  calendar_event: "calendar_event";
1804
+ chart: "chart";
1335
1805
  code_change: "code_change";
1336
1806
  conversation: "conversation";
1807
+ dashboard: "dashboard";
1337
1808
  deployment: "deployment";
1338
1809
  document: "document";
1810
+ event: "event";
1339
1811
  item: "item";
1340
1812
  message: "message";
1813
+ monitor: "monitor";
1341
1814
  person: "person";
1815
+ release: "release";
1342
1816
  task: "task";
1817
+ trace: "trace";
1343
1818
  web_page: "web_page";
1344
1819
  }>>;
1345
1820
  status: z.ZodOptional<z.ZodString>;
@@ -1572,14 +2047,20 @@ export declare const eventInputSchema: z.ZodObject<{
1572
2047
  objectType: z.ZodOptional<z.ZodEnum<{
1573
2048
  automation: "automation";
1574
2049
  calendar_event: "calendar_event";
2050
+ chart: "chart";
1575
2051
  code_change: "code_change";
1576
2052
  conversation: "conversation";
2053
+ dashboard: "dashboard";
1577
2054
  deployment: "deployment";
1578
2055
  document: "document";
2056
+ event: "event";
1579
2057
  item: "item";
1580
2058
  message: "message";
2059
+ monitor: "monitor";
1581
2060
  person: "person";
2061
+ release: "release";
1582
2062
  task: "task";
2063
+ trace: "trace";
1583
2064
  web_page: "web_page";
1584
2065
  }>>;
1585
2066
  eventKey: z.ZodString;
@@ -1609,14 +2090,20 @@ export declare const eventSchema: z.ZodObject<{
1609
2090
  objectType: z.ZodOptional<z.ZodEnum<{
1610
2091
  automation: "automation";
1611
2092
  calendar_event: "calendar_event";
2093
+ chart: "chart";
1612
2094
  code_change: "code_change";
1613
2095
  conversation: "conversation";
2096
+ dashboard: "dashboard";
1614
2097
  deployment: "deployment";
1615
2098
  document: "document";
2099
+ event: "event";
1616
2100
  item: "item";
1617
2101
  message: "message";
2102
+ monitor: "monitor";
1618
2103
  person: "person";
2104
+ release: "release";
1619
2105
  task: "task";
2106
+ trace: "trace";
1620
2107
  web_page: "web_page";
1621
2108
  }>>;
1622
2109
  eventKey: z.ZodString;
@@ -1816,6 +2303,27 @@ export interface PluginMcp {
1816
2303
  */
1817
2304
  prepare(): Promise<"authorization_pending" | "ready">;
1818
2305
  }
2306
+ /** The result of one tool call as the viewer, or `not_connected`. */
2307
+ export type PluginViewerMcpToolResult = PluginMcpToolError | PluginMcpToolSuccess | {
2308
+ status: "not_connected";
2309
+ };
2310
+ /**
2311
+ * Read-only access to this plugin's hosted MCP provider as the viewer, for
2312
+ * link cards and their images.
2313
+ */
2314
+ export interface PluginViewerMcp {
2315
+ /**
2316
+ * Call one tool of this plugin's `allowedTools` that the provider marks
2317
+ * read-only, with only the viewer's own stored login. It never asks the
2318
+ * viewer to sign in: a viewer without a usable login gets
2319
+ * `not_connected`. Provider rejections return an error result. Transport
2320
+ * failures throw.
2321
+ */
2322
+ callTool(input: {
2323
+ arguments?: Record<string, unknown>;
2324
+ name: string;
2325
+ }): Promise<PluginViewerMcpToolResult>;
2326
+ }
1819
2327
  /** Complete Workspace repository preparation after credential egress is removed. */
1820
2328
  export type WorkspaceFinalize = () => Promise<void> | void;
1821
2329
  /**
@@ -1831,7 +2339,7 @@ export interface WorkspacePrepareHookContext extends PluginContext {
1831
2339
  sandbox: PluginSandbox;
1832
2340
  }
1833
2341
  export interface SandboxPrepareHookContext extends PluginContext {
1834
- actor?: Actor;
2342
+ actor?: Actor | undefined;
1835
2343
  sandbox: PluginSandbox;
1836
2344
  }
1837
2345
  export interface BeforeToolExecuteHookContext extends PluginContext {
@@ -1839,7 +2347,7 @@ export interface BeforeToolExecuteHookContext extends PluginContext {
1839
2347
  env: PluginEnv;
1840
2348
  /** Same directory as `PluginSandbox.juniorRoot` from `sandboxPrepare`. */
1841
2349
  juniorRoot: string;
1842
- actor?: Actor;
2350
+ actor?: Actor | undefined;
1843
2351
  /** All actors who contributed instructions to the run so far; see `multi-actor-runs.md`. */
1844
2352
  actors?: Actor[];
1845
2353
  tool: {
@@ -1905,7 +2413,7 @@ export interface AfterMcpToolHookContext extends PluginContext {
1905
2413
  annotations?: PluginAnnotations;
1906
2414
  result: {
1907
2415
  /** Provider content before model-facing truncation. */
1908
- content?: PluginMcpContent[];
2416
+ content?: PluginMcpContent[] | undefined;
1909
2417
  structuredContent?: unknown;
1910
2418
  };
1911
2419
  tool: {
@@ -1943,14 +2451,20 @@ export declare const pluginToolOutputSchema: z.ZodObject<{
1943
2451
  objectType: z.ZodEnum<{
1944
2452
  automation: "automation";
1945
2453
  calendar_event: "calendar_event";
2454
+ chart: "chart";
1946
2455
  code_change: "code_change";
1947
2456
  conversation: "conversation";
2457
+ dashboard: "dashboard";
1948
2458
  deployment: "deployment";
1949
2459
  document: "document";
2460
+ event: "event";
1950
2461
  item: "item";
1951
2462
  message: "message";
2463
+ monitor: "monitor";
1952
2464
  person: "person";
2465
+ release: "release";
1953
2466
  task: "task";
2467
+ trace: "trace";
1954
2468
  web_page: "web_page";
1955
2469
  }>;
1956
2470
  title: z.ZodString;
@@ -1992,6 +2506,10 @@ export declare const pluginToolOutputSchema: z.ZodObject<{
1992
2506
  cycle: z.ZodOptional<z.ZodString>;
1993
2507
  dueDate: z.ZodOptional<z.ZodISODate>;
1994
2508
  labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
2509
+ trend: z.ZodOptional<z.ZodObject<{
2510
+ label: z.ZodString;
2511
+ points: z.ZodArray<z.ZodNumber>;
2512
+ }, z.core.$strict>>;
1995
2513
  }, z.core.$strict>, z.ZodObject<{
1996
2514
  type: z.ZodLiteral<"deployment">;
1997
2515
  summary: z.ZodOptional<z.ZodString>;
@@ -2014,6 +2532,7 @@ export declare const pluginToolOutputSchema: z.ZodObject<{
2014
2532
  summary: z.ZodOptional<z.ZodString>;
2015
2533
  owner: z.ZodOptional<z.ZodString>;
2016
2534
  modifiedAt: z.ZodOptional<z.ZodISODateTime>;
2535
+ thumbnailUrl: z.ZodOptional<z.ZodString>;
2017
2536
  }, z.core.$strict>, z.ZodObject<{
2018
2537
  type: z.ZodLiteral<"message">;
2019
2538
  summary: z.ZodOptional<z.ZodString>;
@@ -2025,7 +2544,108 @@ export declare const pluginToolOutputSchema: z.ZodObject<{
2025
2544
  summary: z.ZodOptional<z.ZodString>;
2026
2545
  siteName: z.ZodOptional<z.ZodString>;
2027
2546
  author: z.ZodOptional<z.ZodString>;
2547
+ media: z.ZodOptional<z.ZodEnum<{
2548
+ image: "image";
2549
+ video: "video";
2550
+ }>>;
2028
2551
  thumbnailUrl: z.ZodOptional<z.ZodString>;
2552
+ }, z.core.$strict>, z.ZodObject<{
2553
+ type: z.ZodLiteral<"chart">;
2554
+ summary: z.ZodOptional<z.ZodString>;
2555
+ display: z.ZodEnum<{
2556
+ area: "area";
2557
+ bar: "bar";
2558
+ line: "line";
2559
+ }>;
2560
+ yAxis: z.ZodString;
2561
+ range: z.ZodString;
2562
+ series: z.ZodArray<z.ZodObject<{
2563
+ label: z.ZodString;
2564
+ points: z.ZodArray<z.ZodNumber>;
2565
+ }, z.core.$strict>>;
2566
+ }, z.core.$strict>, z.ZodObject<{
2567
+ type: z.ZodLiteral<"event">;
2568
+ summary: z.ZodOptional<z.ZodString>;
2569
+ level: z.ZodOptional<z.ZodString>;
2570
+ project: z.ZodOptional<z.ZodString>;
2571
+ release: z.ZodOptional<z.ZodString>;
2572
+ environment: z.ZodOptional<z.ZodString>;
2573
+ occurredAt: z.ZodOptional<z.ZodISODateTime>;
2574
+ }, z.core.$strict>, z.ZodObject<{
2575
+ type: z.ZodLiteral<"release">;
2576
+ summary: z.ZodOptional<z.ZodString>;
2577
+ version: z.ZodString;
2578
+ projects: z.ZodArray<z.ZodString>;
2579
+ newIssues: z.ZodOptional<z.ZodNumber>;
2580
+ crashFreeSessions: z.ZodOptional<z.ZodNumber>;
2581
+ deployCount: z.ZodOptional<z.ZodNumber>;
2582
+ lastDeploy: z.ZodOptional<z.ZodObject<{
2583
+ environment: z.ZodString;
2584
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
2585
+ }, z.core.$strict>>;
2586
+ releasedAt: z.ZodOptional<z.ZodISODateTime>;
2587
+ }, z.core.$strict>, z.ZodObject<{
2588
+ type: z.ZodLiteral<"monitor">;
2589
+ summary: z.ZodOptional<z.ZodString>;
2590
+ kind: z.ZodEnum<{
2591
+ cron: "cron";
2592
+ metric: "metric";
2593
+ uptime: "uptime";
2594
+ }>;
2595
+ state: z.ZodEnum<{
2596
+ failing: "failing";
2597
+ ok: "ok";
2598
+ paused: "paused";
2599
+ pending: "pending";
2600
+ }>;
2601
+ project: z.ZodOptional<z.ZodString>;
2602
+ environment: z.ZodOptional<z.ZodString>;
2603
+ detail: z.ZodOptional<z.ZodString>;
2604
+ lastCheckedAt: z.ZodOptional<z.ZodISODateTime>;
2605
+ trend: z.ZodOptional<z.ZodObject<{
2606
+ label: z.ZodString;
2607
+ points: z.ZodArray<z.ZodNumber>;
2608
+ }, z.core.$strict>>;
2609
+ }, z.core.$strict>, z.ZodObject<{
2610
+ type: z.ZodLiteral<"trace">;
2611
+ summary: z.ZodOptional<z.ZodString>;
2612
+ rootOp: z.ZodOptional<z.ZodString>;
2613
+ rootName: z.ZodOptional<z.ZodString>;
2614
+ durationMs: z.ZodNumber;
2615
+ spanCount: z.ZodNumber;
2616
+ errorCount: z.ZodNumber;
2617
+ performanceIssueCount: z.ZodNumber;
2618
+ projects: z.ZodArray<z.ZodString>;
2619
+ spans: z.ZodArray<z.ZodObject<{
2620
+ op: z.ZodOptional<z.ZodString>;
2621
+ name: z.ZodString;
2622
+ startMs: z.ZodNumber;
2623
+ durationMs: z.ZodNumber;
2624
+ issue: z.ZodOptional<z.ZodBoolean>;
2625
+ }, z.core.$strict>>;
2626
+ }, z.core.$strict>, z.ZodObject<{
2627
+ type: z.ZodLiteral<"dashboard">;
2628
+ summary: z.ZodOptional<z.ZodString>;
2629
+ widgetCount: z.ZodNumber;
2630
+ projects: z.ZodArray<z.ZodString>;
2631
+ environments: z.ZodArray<z.ZodString>;
2632
+ range: z.ZodString;
2633
+ widgets: z.ZodArray<z.ZodObject<{
2634
+ title: z.ZodString;
2635
+ display: z.ZodString;
2636
+ }, z.core.$strict>>;
2637
+ charts: z.ZodArray<z.ZodObject<{
2638
+ title: z.ZodString;
2639
+ display: z.ZodEnum<{
2640
+ area: "area";
2641
+ bar: "bar";
2642
+ line: "line";
2643
+ }>;
2644
+ series: z.ZodArray<z.ZodObject<{
2645
+ label: z.ZodString;
2646
+ points: z.ZodArray<z.ZodNumber>;
2647
+ }, z.core.$strict>>;
2648
+ }, z.core.$strict>>;
2029
2649
  }, z.core.$strict>, z.ZodObject<{
2030
2650
  type: z.ZodLiteral<"person">;
2031
2651
  summary: z.ZodOptional<z.ZodString>;
@@ -2047,8 +2667,12 @@ export declare const pluginToolOutputSchema: z.ZodObject<{
2047
2667
  }, z.core.$strict>>;
2048
2668
  }, z.core.$loose>;
2049
2669
  export type PluginToolOutput = z.output<typeof pluginToolOutputSchema>;
2050
- export type PluginToolExecute<TInput = unknown, TOutput = unknown> = {
2051
- bivarianceHack(input: TInput, options: PluginToolExecuteOptions): Promise<TOutput> | TOutput;
2670
+ /**
2671
+ * Run a plugin tool. The host passes the Turn context as `ctx` on each call,
2672
+ * so a tool definition never holds Turn state.
2673
+ */
2674
+ export type PluginToolExecute<TInput = unknown, TOutput = unknown, TContext = ToolRegistrationHookContext> = {
2675
+ bivarianceHack(input: TInput, options: PluginToolExecuteOptions, ctx: TContext): Promise<TOutput> | TOutput;
2052
2676
  }["bivarianceHack"];
2053
2677
  /**
2054
2678
  * Tool-declared approval mode.
@@ -2074,11 +2698,11 @@ export type ToolApprovalMode = z.output<typeof toolApprovalModeSchema>;
2074
2698
  */
2075
2699
  export interface ToolAnnotations {
2076
2700
  [key: string]: unknown;
2077
- destructiveHint?: boolean;
2078
- idempotentHint?: boolean;
2079
- openWorldHint?: boolean;
2080
- readOnlyHint?: boolean;
2081
- title?: string;
2701
+ destructiveHint?: boolean | undefined;
2702
+ idempotentHint?: boolean | undefined;
2703
+ openWorldHint?: boolean | undefined;
2704
+ readOnlyHint?: boolean | undefined;
2705
+ title?: string | undefined;
2082
2706
  }
2083
2707
  export declare const REQUIRED_TOOL_ANNOTATION_KEYS: readonly ["destructiveHint", "idempotentHint", "openWorldHint", "readOnlyHint"];
2084
2708
  export type RequiredToolAnnotationKey = (typeof REQUIRED_TOOL_ANNOTATION_KEYS)[number];
@@ -2089,7 +2713,7 @@ export declare function missingToolAnnotationKeys(annotations: ToolAnnotations |
2089
2713
  */
2090
2714
  export interface ToolApprovalMetadata<TInput = unknown> {
2091
2715
  /** Optional declared approval mode; the owning tool boundary selects defaults. */
2092
- approvalMode?: ToolApprovalMode;
2716
+ approvalMode?: ToolApprovalMode | undefined;
2093
2717
  annotations?: ToolAnnotations;
2094
2718
  /**
2095
2719
  * Describe the reviewed semantic action for the review request.
@@ -2115,16 +2739,11 @@ export interface ToolApprovalMetadata<TInput = unknown> {
2115
2739
  * tools that control the agent loop or dispatch other tools.
2116
2740
  */
2117
2741
  export type ToolExposure = "direct" | "deferred" | "modelOnly" | "codemode" | "hidden";
2118
- export interface PluginToolDefinition<TInput = unknown, TOutput = unknown, TExecuteOutput = TOutput> extends ToolApprovalMetadata<TInput> {
2742
+ export interface PluginToolDefinition<TInput = unknown, TOutput = unknown, TExecuteOutput = TOutput, TContext = ToolRegistrationHookContext> extends ToolApprovalMetadata<TInput> {
2119
2743
  description: string;
2120
- /**
2121
- * Why the current Turn cannot run this tool. The host keeps the tool in the
2122
- * tool list, so the cached prompt stays the same, and rejects its calls.
2123
- */
2124
- disabledReason?: string;
2125
2744
  executionMode?: unknown;
2126
2745
  /** Override the host's default tool exposure. */
2127
- exposure?: ToolExposure;
2746
+ exposure?: ToolExposure | undefined;
2128
2747
  inputSchema: unknown;
2129
2748
  outputSchema?: unknown;
2130
2749
  /**
@@ -2145,19 +2764,24 @@ export interface PluginToolDefinition<TInput = unknown, TOutput = unknown, TExec
2145
2764
  * future major version.
2146
2765
  */
2147
2766
  promptSnippet?: string;
2148
- execute?: PluginToolExecute<TInput, TExecuteOutput>;
2767
+ execute?: PluginToolExecute<TInput, TExecuteOutput, TContext>;
2149
2768
  }
2150
- type ZodPluginToolDefinition<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodTypeAny, TExecuteResult extends z.input<TOutputSchema> | PluginToolOutputEnvelope<z.input<TOutputSchema>>> = Omit<PluginToolDefinition<z.output<TInputSchema>, z.output<TOutputSchema>>, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
2769
+ type ZodPluginToolDefinition<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodTypeAny, TExecuteResult extends z.input<TOutputSchema> | PluginToolOutputEnvelope<z.input<TOutputSchema>>, TContext> = Omit<PluginToolDefinition<z.output<TInputSchema>, z.output<TOutputSchema>>, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
2151
2770
  inputSchema: TInputSchema;
2152
2771
  outputSchema: TOutputSchema;
2153
2772
  prepareArguments?: (args: unknown) => z.input<TInputSchema>;
2154
- execute?: (input: z.output<TInputSchema>, options: PluginToolExecuteOptions) => Promise<TExecuteResult> | TExecuteResult;
2773
+ execute?: (input: z.output<TInputSchema>, options: PluginToolExecuteOptions, ctx: TContext) => Promise<TExecuteResult> | TExecuteResult;
2155
2774
  };
2156
2775
  type ParsedPluginToolExecuteResult<TOutputSchema extends ZodTypeAny, TResult> = TResult extends PluginToolOutputEnvelope<unknown> ? PluginToolOutputEnvelope<z.output<TOutputSchema>> : z.output<TOutputSchema>;
2776
+ /**
2777
+ * Run tools that take a plugin-built context, such as deployment config plus
2778
+ * the Turn capabilities that they use. `toContext` runs on each call.
2779
+ */
2780
+ export declare function withToolContext<TContext>(tools: Record<string, PluginToolDefinition<unknown, unknown, unknown, TContext>>, toContext: (ctx: ToolRegistrationHookContext) => TContext): Record<string, PluginToolDefinition>;
2157
2781
  /** Define a plugin tool with Zod input parsing and validated structured results. */
2158
- export declare function zodTool<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodTypeAny, TExecuteResult extends z.input<TOutputSchema> | PluginToolOutputEnvelope<z.input<TOutputSchema>>>(definition: ZodPluginToolDefinition<TInputSchema, TOutputSchema, TExecuteResult>): PluginToolDefinition<z.output<TInputSchema>, z.output<TOutputSchema>, ParsedPluginToolExecuteResult<TOutputSchema, TExecuteResult>>;
2782
+ export declare function zodTool<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodTypeAny, TExecuteResult extends z.input<TOutputSchema> | PluginToolOutputEnvelope<z.input<TOutputSchema>>, TContext = ToolRegistrationHookContext>(definition: ZodPluginToolDefinition<TInputSchema, TOutputSchema, TExecuteResult, TContext>): PluginToolDefinition<z.output<TInputSchema>, z.output<TOutputSchema>, ParsedPluginToolExecuteResult<TOutputSchema, TExecuteResult>, TContext>;
2159
2783
  /** Define a plugin tool with Zod input parsing and the structured result contract. */
2160
- export declare function definePluginTool<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodTypeAny, TExecuteResult extends z.input<TOutputSchema> | PluginToolOutputEnvelope<z.input<TOutputSchema>>>(definition: ZodPluginToolDefinition<TInputSchema, TOutputSchema, TExecuteResult>): PluginToolDefinition<z.output<TInputSchema>, z.output<TOutputSchema>, ParsedPluginToolExecuteResult<TOutputSchema, TExecuteResult>>;
2784
+ export declare function definePluginTool<TInputSchema extends ZodTypeAny, TOutputSchema extends ZodTypeAny, TExecuteResult extends z.input<TOutputSchema> | PluginToolOutputEnvelope<z.input<TOutputSchema>>, TContext = ToolRegistrationHookContext>(definition: ZodPluginToolDefinition<TInputSchema, TOutputSchema, TExecuteResult, TContext>): PluginToolDefinition<z.output<TInputSchema>, z.output<TOutputSchema>, ParsedPluginToolExecuteResult<TOutputSchema, TExecuteResult>, TContext>;
2161
2785
  export interface SlackToolRegistrationHookContext {
2162
2786
  /**
2163
2787
  * What Slack tools can do in the Conversation Location.
@@ -2201,6 +2825,36 @@ export interface PluginWorkspaceToolContext {
2201
2825
  repo: string;
2202
2826
  }): Promise<string[]>;
2203
2827
  }
2828
+ /** One Conversation that the current Conversation may find. */
2829
+ export interface PluginConversationMatch {
2830
+ conversationId: string;
2831
+ /** Root of a child agent. Missing for a root Conversation. */
2832
+ rootConversationId?: string;
2833
+ /**
2834
+ * What its agent does now. pending: waiting to run. running or paused:
2835
+ * working. idle: waits for a message. A failed Turn shows as idle.
2836
+ */
2837
+ status: "pending" | "running" | "paused" | "idle";
2838
+ /** Summary of the latest Brief, when it has one. */
2839
+ summary?: string;
2840
+ title?: string;
2841
+ /** ISO time of the latest activity. */
2842
+ updatedAt: string;
2843
+ }
2844
+ export interface PluginConversationToolContext {
2845
+ /**
2846
+ * Find other Conversations that have an Annotation with `annotation`, or a
2847
+ * nested key that continues with `#`. A root does not match for the
2848
+ * Annotation of its child agent. Core applies the Conversation access
2849
+ * rules, and leaves out archived Conversations and the current tree.
2850
+ * Working Conversations (pending, running, paused) first, then newest
2851
+ * activity.
2852
+ */
2853
+ search(input: {
2854
+ annotation: string;
2855
+ limit?: number;
2856
+ }): Promise<PluginConversationMatch[]>;
2857
+ }
2204
2858
  interface BaseToolRegistrationHookContext extends PluginContext {
2205
2859
  /**
2206
2860
  * Opaque Junior conversation/session identity for this turn.
@@ -2210,6 +2864,8 @@ interface BaseToolRegistrationHookContext extends PluginContext {
2210
2864
  */
2211
2865
  conversationId?: string;
2212
2866
  annotations?: PluginAnnotations;
2867
+ /** Other Conversations. Set only when the turn has a `conversationId`. */
2868
+ conversations?: PluginConversationToolContext;
2213
2869
  /** Host-owned dashboard link to the Automation that started this run. */
2214
2870
  automationLink?: {
2215
2871
  url: string;
@@ -2281,6 +2937,8 @@ export interface ImageSourceContext extends PluginContext {
2281
2937
  egress: PluginEgress;
2282
2938
  /** The signed-in person who sees the image. */
2283
2939
  viewer: User;
2940
+ /** This plugin's hosted MCP provider as the viewer. See `ObjectLinkContext`. */
2941
+ viewerMcp: PluginViewerMcp;
2284
2942
  }
2285
2943
  /**
2286
2944
  * Images that a plugin serves through the Junior image proxy. `resolve`
@@ -2340,6 +2998,13 @@ export interface ObjectLinkContext extends PluginContext {
2340
2998
  * you return it.
2341
2999
  */
2342
3000
  egress: PluginEgress;
3001
+ /**
3002
+ * Return the Junior path of one image that this plugin serves through
3003
+ * `images`, such as a file thumbnail. Put the path in facts, never the
3004
+ * address of the image. The image route asks `images.resolve` again for
3005
+ * each viewer. `version` changes the path when the image changes.
3006
+ */
3007
+ imagePath(ref: string, version?: string): string;
2343
3008
  /**
2344
3009
  * Return the Junior person card of the one known person with this
2345
3010
  * provider account, or undefined. Return it for a profile link of that
@@ -2351,6 +3016,23 @@ export interface ObjectLinkContext extends PluginContext {
2351
3016
  }): Promise<ObjectAnnotation | undefined>;
2352
3017
  /** The signed-in person who sees the card. */
2353
3018
  viewer: User;
3019
+ /**
3020
+ * Provider egress with only the viewer's own stored OAuth token for this
3021
+ * plugin's provider, such as a token from the dashboard Connections page.
3022
+ * It never asks the viewer to authorize, and it never uses a plugin
3023
+ * grant, an app token, or another person's token. A viewer without a
3024
+ * usable token gets HTTP 401. Use it to check that the viewer may see an
3025
+ * object, and read the card data with `egress`. Read the data with it only
3026
+ * when the data depends on who reads it, such as a query over the
3027
+ * viewer's own projects, and cache it per viewer.
3028
+ */
3029
+ viewerEgress: PluginEgress;
3030
+ /**
3031
+ * This plugin's hosted MCP provider as the viewer, with only the viewer's
3032
+ * own stored login. Use it when the provider decides access only through
3033
+ * MCP.
3034
+ */
3035
+ viewerMcp: PluginViewerMcp;
2354
3036
  }
2355
3037
  /**
2356
3038
  * One link type of a plugin. Junior calls `canView` first, and calls
@@ -2365,18 +3047,30 @@ export interface PluginObjectLinkDefinition {
2365
3047
  */
2366
3048
  canView(ctx: ObjectLinkContext, url: URL): Promise<boolean>;
2367
3049
  filters: ObjectLinkFilter[];
2368
- objectType: ObjectType;
3050
+ /**
3051
+ * The object types that `resolve` can return. One URL can open more than
3052
+ * one type, such as a GitHub issue URL that opens a pull request.
3053
+ */
3054
+ objectTypes: ObjectType[];
2369
3055
  /**
2370
3056
  * Read the card. Junior calls it only after `canView` returns true.
2371
3057
  * Return nothing for a missing object.
2372
3058
  */
2373
3059
  resolve(ctx: ObjectLinkContext, url: URL): Promise<ObjectAnnotation | undefined>;
2374
3060
  /**
2375
- * The plugin tool that reads the object live, such as `readGoogleFile`.
2376
- * When a person attaches the link to a Conversation, its next Turn is told
2377
- * to read the object with this tool. Omit it when no tool reads the object.
3061
+ * When `canView` returns false, show the public web page card of the
3062
+ * link, as for a link that no link type claims. Use it for a provider
3063
+ * whose public pages have useful web page metadata. That card reads only
3064
+ * what anyone can read without signing in.
3065
+ */
3066
+ webPageFallback?: true;
3067
+ /**
3068
+ * Name the plugin tool that reads the resolved object live, such as
3069
+ * `readGoogleFile`. When a person attaches the link to a Conversation, its
3070
+ * next Turn is told to read the object with this tool. Return nothing when
3071
+ * no tool reads this object.
2378
3072
  */
2379
- readTool?: string;
3073
+ readTool?(object: ObjectAnnotation): string | undefined;
2380
3074
  }
2381
3075
  export declare const codeChangeStateSchema: z.ZodEnum<{
2382
3076
  closed: "closed";
@@ -2586,8 +3280,8 @@ type UserPromptContext = Pick<PluginContext, "db" | "log" | "plugin"> & {
2586
3280
  */
2587
3281
  setSpanAttributes(attributes: Record<string, number>): void;
2588
3282
  /** Location associated with this Conversation. */
2589
- locationId?: string;
2590
- actor?: Actor;
3283
+ locationId?: string | undefined;
3284
+ actor?: Actor | undefined;
2591
3285
  source: Source;
2592
3286
  state: PluginState;
2593
3287
  text: string;
@@ -2632,7 +3326,7 @@ export interface EventTriggerProblem {
2632
3326
  */
2633
3327
  reason: "unknown_resource_type" | "unknown_event" | "identifier_required" | "filter_required" | "unknown_field" | "field_not_set" | "invalid_value";
2634
3328
  /** The filter with the problem. Missing for a resource type or event problem. */
2635
- field?: string;
3329
+ field?: string | undefined;
2636
3330
  /** Plain words for the person or agent who changes the selection. */
2637
3331
  message: string;
2638
3332
  }
@@ -2642,9 +3336,9 @@ export interface EventTriggerProblem {
2642
3336
  * every resource of the source that its filters match.
2643
3337
  */
2644
3338
  export interface EventTriggerSelection {
2645
- resourceType?: string;
3339
+ resourceType?: string | undefined;
2646
3340
  events: readonly string[];
2647
- match?: EventMatch;
3341
+ match?: EventMatch | undefined;
2648
3342
  }
2649
3343
  /** The enabled resource types of one source, and the reach of each of its events. */
2650
3344
  export interface EventTriggerSource {
@@ -3030,6 +3724,8 @@ export interface HeartbeatHookContext extends PluginContext {
3030
3724
  /** Publish events, as from a plugin route. */
3031
3725
  events: EventPublisher;
3032
3726
  nowMs: number;
3727
+ /** Review desk items, as from a plugin route. */
3728
+ reviewItems: PluginConversationReviewItems;
3033
3729
  state: PluginState;
3034
3730
  }
3035
3731
  export interface HeartbeatResult {
@@ -3323,7 +4019,18 @@ export interface PluginHooks {
3323
4019
  slackConversationLink?(ctx: SlackConversationLinkHookContext): SlackConversationLink | undefined;
3324
4020
  /** Pure Markdown rewrite. Emit ordinary Markdown only. */
3325
4021
  formatMarkdown?(ctx: FormatMarkdownHookContext): string;
3326
- tools?(ctx: ToolRegistrationHookContext): Record<string, PluginToolDefinition>;
4022
+ /**
4023
+ * Tools by plugin-local camelCase name. Read only deployment configuration
4024
+ * here, never Turn context: the host reads them with no Turn, and passes
4025
+ * the Turn context to each `execute` call.
4026
+ */
4027
+ tools?(): Record<string, PluginToolDefinition>;
4028
+ /**
4029
+ * Tools from `tools()` that this Turn cannot run, with the reason. The host
4030
+ * keeps them in the tool list, so the cached prompt stays the same, and
4031
+ * rejects their calls.
4032
+ */
4033
+ disabledTools?(ctx: ToolRegistrationHookContext): Record<string, string>;
3327
4034
  }
3328
4035
  export interface PluginCliIo {
3329
4036
  writeError(text: string): Promise<void> | void;
@@ -3599,7 +4306,7 @@ export type PluginRegistrationInput = {
3599
4306
  model?: PluginModelConfig;
3600
4307
  /** URLs that this plugin shows as object cards. */
3601
4308
  objectLinks?: PluginObjectLinkDefinition[];
3602
- packageName?: string;
4309
+ packageName?: string | undefined;
3603
4310
  events?: PluginEvents;
3604
4311
  tasks?: PluginTasks;
3605
4312
  userPages?: PluginUserPageDefinition[];