@sentry/junior-plugin-api 0.302.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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/dist/index.d.ts CHANGED
@@ -100,6 +100,41 @@ export declare const objectFactsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
100
100
  release: z.ZodOptional<z.ZodString>;
101
101
  environment: z.ZodOptional<z.ZodString>;
102
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>>;
103
138
  }, z.core.$strict>, z.ZodObject<{
104
139
  type: z.ZodLiteral<"trace">;
105
140
  summary: z.ZodOptional<z.ZodString>;
@@ -117,6 +152,29 @@ export declare const objectFactsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
117
152
  durationMs: z.ZodNumber;
118
153
  issue: z.ZodOptional<z.ZodBoolean>;
119
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>>;
120
178
  }, z.core.$strict>, z.ZodObject<{
121
179
  type: z.ZodLiteral<"person">;
122
180
  summary: z.ZodOptional<z.ZodString>;
@@ -148,27 +206,31 @@ export declare const objectTypeSchema: z.ZodEnum<{
148
206
  chart: "chart";
149
207
  code_change: "code_change";
150
208
  conversation: "conversation";
209
+ dashboard: "dashboard";
151
210
  deployment: "deployment";
152
211
  document: "document";
153
212
  event: "event";
154
213
  item: "item";
155
214
  message: "message";
215
+ monitor: "monitor";
156
216
  person: "person";
217
+ release: "release";
157
218
  task: "task";
158
219
  trace: "trace";
159
220
  web_page: "web_page";
160
221
  }>;
161
222
  export type ObjectType = z.output<typeof objectTypeSchema>;
162
- 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", "rows", "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"];
163
224
  export type ObjectIconName = (typeof objectIconNames)[number];
164
225
  export type ObjectTone = "neutral" | "success" | "danger" | "warning" | "info" | "accent";
165
226
  /** Resolve identity and state without replacing the type icon with a warning. */
166
227
  export declare function objectPresentation(object: {
167
228
  objectType: ObjectType;
168
- status?: string;
229
+ status?: string | undefined;
169
230
  facts?: {
170
231
  type: string;
171
- };
232
+ state?: string;
233
+ } | undefined;
172
234
  }): {
173
235
  icon: ObjectIconName;
174
236
  tone: ObjectTone;
@@ -204,12 +266,15 @@ export declare const objectAnnotationSchema: z.ZodObject<{
204
266
  chart: "chart";
205
267
  code_change: "code_change";
206
268
  conversation: "conversation";
269
+ dashboard: "dashboard";
207
270
  deployment: "deployment";
208
271
  document: "document";
209
272
  event: "event";
210
273
  item: "item";
211
274
  message: "message";
275
+ monitor: "monitor";
212
276
  person: "person";
277
+ release: "release";
213
278
  task: "task";
214
279
  trace: "trace";
215
280
  web_page: "web_page";
@@ -318,6 +383,41 @@ export declare const objectAnnotationSchema: z.ZodObject<{
318
383
  release: z.ZodOptional<z.ZodString>;
319
384
  environment: z.ZodOptional<z.ZodString>;
320
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>>;
321
421
  }, z.core.$strict>, z.ZodObject<{
322
422
  type: z.ZodLiteral<"trace">;
323
423
  summary: z.ZodOptional<z.ZodString>;
@@ -335,6 +435,29 @@ export declare const objectAnnotationSchema: z.ZodObject<{
335
435
  durationMs: z.ZodNumber;
336
436
  issue: z.ZodOptional<z.ZodBoolean>;
337
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>>;
338
461
  }, z.core.$strict>, z.ZodObject<{
339
462
  type: z.ZodLiteral<"person">;
340
463
  summary: z.ZodOptional<z.ZodString>;
@@ -356,12 +479,15 @@ export declare const ownedObjectAnnotationSchema: z.ZodObject<{
356
479
  chart: "chart";
357
480
  code_change: "code_change";
358
481
  conversation: "conversation";
482
+ dashboard: "dashboard";
359
483
  deployment: "deployment";
360
484
  document: "document";
361
485
  event: "event";
362
486
  item: "item";
363
487
  message: "message";
488
+ monitor: "monitor";
364
489
  person: "person";
490
+ release: "release";
365
491
  task: "task";
366
492
  trace: "trace";
367
493
  web_page: "web_page";
@@ -470,6 +596,41 @@ export declare const ownedObjectAnnotationSchema: z.ZodObject<{
470
596
  release: z.ZodOptional<z.ZodString>;
471
597
  environment: z.ZodOptional<z.ZodString>;
472
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>>;
473
634
  }, z.core.$strict>, z.ZodObject<{
474
635
  type: z.ZodLiteral<"trace">;
475
636
  summary: z.ZodOptional<z.ZodString>;
@@ -487,6 +648,29 @@ export declare const ownedObjectAnnotationSchema: z.ZodObject<{
487
648
  durationMs: z.ZodNumber;
488
649
  issue: z.ZodOptional<z.ZodBoolean>;
489
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>>;
490
674
  }, z.core.$strict>, z.ZodObject<{
491
675
  type: z.ZodLiteral<"person">;
492
676
  summary: z.ZodOptional<z.ZodString>;
@@ -516,8 +700,11 @@ export declare const objectIconPaths: {
516
700
  globe: string[];
517
701
  graph: string[];
518
702
  pulse: string[];
703
+ bell: string[];
519
704
  rows: string[];
705
+ tag: string[];
520
706
  package: string[];
707
+ apps: string[];
521
708
  };
522
709
  /** Exact non-blank actor user id that rejects the sentinel "unknown". */
523
710
  export declare const actorUserIdSchema: z.ZodString;
@@ -957,26 +1144,26 @@ interface BaseInvocationContext {
957
1144
  */
958
1145
  conversationId?: string;
959
1146
  /** Location associated with this Conversation. */
960
- locationId?: string;
1147
+ locationId?: string | undefined;
961
1148
  }
962
1149
  export interface SlackInvocationContext extends BaseInvocationContext {
963
1150
  /** Runtime-owned default outbound destination for this invocation. */
964
1151
  destination: SlackDestination;
965
- actor?: SlackActor;
1152
+ actor?: SlackActor | undefined;
966
1153
  /** Runtime-owned source where the invocation came from. */
967
1154
  source: SlackSource;
968
1155
  }
969
1156
  export interface LocalInvocationContext extends BaseInvocationContext {
970
1157
  /** Runtime-owned default outbound destination for this invocation. */
971
1158
  destination: LocalDestination;
972
- actor?: LocalActor;
1159
+ actor?: LocalActor | undefined;
973
1160
  /** Runtime-owned source where the invocation came from. */
974
1161
  source: LocalSource;
975
1162
  }
976
1163
  export interface WebInvocationContext extends BaseInvocationContext {
977
1164
  /** Existing conversation destination used for location and tool context. */
978
1165
  destination: Destination;
979
- actor?: WebActor;
1166
+ actor?: WebActor | undefined;
980
1167
  /** Runtime-owned dashboard/web source for this invocation. */
981
1168
  source: WebSource;
982
1169
  }
@@ -989,15 +1176,15 @@ export interface EventInvocationContext extends BaseInvocationContext {
989
1176
  }
990
1177
  export type InvocationContext = LocalInvocationContext | SlackInvocationContext | WebInvocationContext | (BaseInvocationContext & {
991
1178
  destination: Destination;
992
- actor?: Actor;
1179
+ actor?: Actor | undefined;
993
1180
  source: AgentInvocationSource | EventAutomationSource | PluginDispatchSource | EventSource | ScheduledAutomationSource;
994
1181
  });
995
1182
  /** Build a normalized Slack source from runtime-owned Slack coordinates. */
996
1183
  export declare function createSlackSource(input: {
997
1184
  channelId: string;
998
- messageTs?: string;
1185
+ messageTs?: string | undefined;
999
1186
  teamId: string;
1000
- threadTs?: string;
1187
+ threadTs?: string | undefined;
1001
1188
  /** Runtime-normalized source visibility. */
1002
1189
  visibility: SourceVisibility;
1003
1190
  }): SlackSource;
@@ -1131,7 +1318,7 @@ export type PluginGrantAccess = z.output<typeof pluginGrantAccessSchema>;
1131
1318
  export type PluginAuthorization = z.output<typeof pluginAuthorizationSchema>;
1132
1319
  /** Interrupt sandbox egress so Junior can start provider authorization. */
1133
1320
  export declare class EgressAuthRequired extends Error {
1134
- authorization?: PluginAuthorization;
1321
+ authorization?: PluginAuthorization | undefined;
1135
1322
  constructor(message: string, options?: {
1136
1323
  authorization?: PluginAuthorization;
1137
1324
  cause?: unknown;
@@ -1311,12 +1498,15 @@ export declare const resourceLinkAnnotationSchema: z.ZodObject<{
1311
1498
  chart: "chart";
1312
1499
  code_change: "code_change";
1313
1500
  conversation: "conversation";
1501
+ dashboard: "dashboard";
1314
1502
  deployment: "deployment";
1315
1503
  document: "document";
1316
1504
  event: "event";
1317
1505
  item: "item";
1318
1506
  message: "message";
1507
+ monitor: "monitor";
1319
1508
  person: "person";
1509
+ release: "release";
1320
1510
  task: "task";
1321
1511
  trace: "trace";
1322
1512
  web_page: "web_page";
@@ -1342,12 +1532,15 @@ export declare const conversationAnnotationInputSchema: z.ZodDiscriminatedUnion<
1342
1532
  chart: "chart";
1343
1533
  code_change: "code_change";
1344
1534
  conversation: "conversation";
1535
+ dashboard: "dashboard";
1345
1536
  deployment: "deployment";
1346
1537
  document: "document";
1347
1538
  event: "event";
1348
1539
  item: "item";
1349
1540
  message: "message";
1541
+ monitor: "monitor";
1350
1542
  person: "person";
1543
+ release: "release";
1351
1544
  task: "task";
1352
1545
  trace: "trace";
1353
1546
  web_page: "web_page";
@@ -1373,12 +1566,15 @@ export declare const conversationAnnotationInputSchema: z.ZodDiscriminatedUnion<
1373
1566
  chart: "chart";
1374
1567
  code_change: "code_change";
1375
1568
  conversation: "conversation";
1569
+ dashboard: "dashboard";
1376
1570
  deployment: "deployment";
1377
1571
  document: "document";
1378
1572
  event: "event";
1379
1573
  item: "item";
1380
1574
  message: "message";
1575
+ monitor: "monitor";
1381
1576
  person: "person";
1577
+ release: "release";
1382
1578
  task: "task";
1383
1579
  trace: "trace";
1384
1580
  web_page: "web_page";
@@ -1487,6 +1683,41 @@ export declare const conversationAnnotationInputSchema: z.ZodDiscriminatedUnion<
1487
1683
  release: z.ZodOptional<z.ZodString>;
1488
1684
  environment: z.ZodOptional<z.ZodString>;
1489
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>>;
1490
1721
  }, z.core.$strict>, z.ZodObject<{
1491
1722
  type: z.ZodLiteral<"trace">;
1492
1723
  summary: z.ZodOptional<z.ZodString>;
@@ -1504,6 +1735,29 @@ export declare const conversationAnnotationInputSchema: z.ZodDiscriminatedUnion<
1504
1735
  durationMs: z.ZodNumber;
1505
1736
  issue: z.ZodOptional<z.ZodBoolean>;
1506
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>>;
1507
1761
  }, z.core.$strict>, z.ZodObject<{
1508
1762
  type: z.ZodLiteral<"person">;
1509
1763
  summary: z.ZodOptional<z.ZodString>;
@@ -1550,12 +1804,15 @@ export declare const conversationSidebarAnnotationSchema: z.ZodObject<{
1550
1804
  chart: "chart";
1551
1805
  code_change: "code_change";
1552
1806
  conversation: "conversation";
1807
+ dashboard: "dashboard";
1553
1808
  deployment: "deployment";
1554
1809
  document: "document";
1555
1810
  event: "event";
1556
1811
  item: "item";
1557
1812
  message: "message";
1813
+ monitor: "monitor";
1558
1814
  person: "person";
1815
+ release: "release";
1559
1816
  task: "task";
1560
1817
  trace: "trace";
1561
1818
  web_page: "web_page";
@@ -1793,12 +2050,15 @@ export declare const eventInputSchema: z.ZodObject<{
1793
2050
  chart: "chart";
1794
2051
  code_change: "code_change";
1795
2052
  conversation: "conversation";
2053
+ dashboard: "dashboard";
1796
2054
  deployment: "deployment";
1797
2055
  document: "document";
1798
2056
  event: "event";
1799
2057
  item: "item";
1800
2058
  message: "message";
2059
+ monitor: "monitor";
1801
2060
  person: "person";
2061
+ release: "release";
1802
2062
  task: "task";
1803
2063
  trace: "trace";
1804
2064
  web_page: "web_page";
@@ -1833,12 +2093,15 @@ export declare const eventSchema: z.ZodObject<{
1833
2093
  chart: "chart";
1834
2094
  code_change: "code_change";
1835
2095
  conversation: "conversation";
2096
+ dashboard: "dashboard";
1836
2097
  deployment: "deployment";
1837
2098
  document: "document";
1838
2099
  event: "event";
1839
2100
  item: "item";
1840
2101
  message: "message";
2102
+ monitor: "monitor";
1841
2103
  person: "person";
2104
+ release: "release";
1842
2105
  task: "task";
1843
2106
  trace: "trace";
1844
2107
  web_page: "web_page";
@@ -2076,7 +2339,7 @@ export interface WorkspacePrepareHookContext extends PluginContext {
2076
2339
  sandbox: PluginSandbox;
2077
2340
  }
2078
2341
  export interface SandboxPrepareHookContext extends PluginContext {
2079
- actor?: Actor;
2342
+ actor?: Actor | undefined;
2080
2343
  sandbox: PluginSandbox;
2081
2344
  }
2082
2345
  export interface BeforeToolExecuteHookContext extends PluginContext {
@@ -2084,7 +2347,7 @@ export interface BeforeToolExecuteHookContext extends PluginContext {
2084
2347
  env: PluginEnv;
2085
2348
  /** Same directory as `PluginSandbox.juniorRoot` from `sandboxPrepare`. */
2086
2349
  juniorRoot: string;
2087
- actor?: Actor;
2350
+ actor?: Actor | undefined;
2088
2351
  /** All actors who contributed instructions to the run so far; see `multi-actor-runs.md`. */
2089
2352
  actors?: Actor[];
2090
2353
  tool: {
@@ -2150,7 +2413,7 @@ export interface AfterMcpToolHookContext extends PluginContext {
2150
2413
  annotations?: PluginAnnotations;
2151
2414
  result: {
2152
2415
  /** Provider content before model-facing truncation. */
2153
- content?: PluginMcpContent[];
2416
+ content?: PluginMcpContent[] | undefined;
2154
2417
  structuredContent?: unknown;
2155
2418
  };
2156
2419
  tool: {
@@ -2191,12 +2454,15 @@ export declare const pluginToolOutputSchema: z.ZodObject<{
2191
2454
  chart: "chart";
2192
2455
  code_change: "code_change";
2193
2456
  conversation: "conversation";
2457
+ dashboard: "dashboard";
2194
2458
  deployment: "deployment";
2195
2459
  document: "document";
2196
2460
  event: "event";
2197
2461
  item: "item";
2198
2462
  message: "message";
2463
+ monitor: "monitor";
2199
2464
  person: "person";
2465
+ release: "release";
2200
2466
  task: "task";
2201
2467
  trace: "trace";
2202
2468
  web_page: "web_page";
@@ -2305,6 +2571,41 @@ export declare const pluginToolOutputSchema: z.ZodObject<{
2305
2571
  release: z.ZodOptional<z.ZodString>;
2306
2572
  environment: z.ZodOptional<z.ZodString>;
2307
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>>;
2308
2609
  }, z.core.$strict>, z.ZodObject<{
2309
2610
  type: z.ZodLiteral<"trace">;
2310
2611
  summary: z.ZodOptional<z.ZodString>;
@@ -2322,6 +2623,29 @@ export declare const pluginToolOutputSchema: z.ZodObject<{
2322
2623
  durationMs: z.ZodNumber;
2323
2624
  issue: z.ZodOptional<z.ZodBoolean>;
2324
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>>;
2325
2649
  }, z.core.$strict>, z.ZodObject<{
2326
2650
  type: z.ZodLiteral<"person">;
2327
2651
  summary: z.ZodOptional<z.ZodString>;
@@ -2374,11 +2698,11 @@ export type ToolApprovalMode = z.output<typeof toolApprovalModeSchema>;
2374
2698
  */
2375
2699
  export interface ToolAnnotations {
2376
2700
  [key: string]: unknown;
2377
- destructiveHint?: boolean;
2378
- idempotentHint?: boolean;
2379
- openWorldHint?: boolean;
2380
- readOnlyHint?: boolean;
2381
- title?: string;
2701
+ destructiveHint?: boolean | undefined;
2702
+ idempotentHint?: boolean | undefined;
2703
+ openWorldHint?: boolean | undefined;
2704
+ readOnlyHint?: boolean | undefined;
2705
+ title?: string | undefined;
2382
2706
  }
2383
2707
  export declare const REQUIRED_TOOL_ANNOTATION_KEYS: readonly ["destructiveHint", "idempotentHint", "openWorldHint", "readOnlyHint"];
2384
2708
  export type RequiredToolAnnotationKey = (typeof REQUIRED_TOOL_ANNOTATION_KEYS)[number];
@@ -2389,7 +2713,7 @@ export declare function missingToolAnnotationKeys(annotations: ToolAnnotations |
2389
2713
  */
2390
2714
  export interface ToolApprovalMetadata<TInput = unknown> {
2391
2715
  /** Optional declared approval mode; the owning tool boundary selects defaults. */
2392
- approvalMode?: ToolApprovalMode;
2716
+ approvalMode?: ToolApprovalMode | undefined;
2393
2717
  annotations?: ToolAnnotations;
2394
2718
  /**
2395
2719
  * Describe the reviewed semantic action for the review request.
@@ -2419,7 +2743,7 @@ export interface PluginToolDefinition<TInput = unknown, TOutput = unknown, TExec
2419
2743
  description: string;
2420
2744
  executionMode?: unknown;
2421
2745
  /** Override the host's default tool exposure. */
2422
- exposure?: ToolExposure;
2746
+ exposure?: ToolExposure | undefined;
2423
2747
  inputSchema: unknown;
2424
2748
  outputSchema?: unknown;
2425
2749
  /**
@@ -2723,7 +3047,11 @@ export interface PluginObjectLinkDefinition {
2723
3047
  */
2724
3048
  canView(ctx: ObjectLinkContext, url: URL): Promise<boolean>;
2725
3049
  filters: ObjectLinkFilter[];
2726
- 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[];
2727
3055
  /**
2728
3056
  * Read the card. Junior calls it only after `canView` returns true.
2729
3057
  * Return nothing for a missing object.
@@ -2952,8 +3280,8 @@ type UserPromptContext = Pick<PluginContext, "db" | "log" | "plugin"> & {
2952
3280
  */
2953
3281
  setSpanAttributes(attributes: Record<string, number>): void;
2954
3282
  /** Location associated with this Conversation. */
2955
- locationId?: string;
2956
- actor?: Actor;
3283
+ locationId?: string | undefined;
3284
+ actor?: Actor | undefined;
2957
3285
  source: Source;
2958
3286
  state: PluginState;
2959
3287
  text: string;
@@ -2998,7 +3326,7 @@ export interface EventTriggerProblem {
2998
3326
  */
2999
3327
  reason: "unknown_resource_type" | "unknown_event" | "identifier_required" | "filter_required" | "unknown_field" | "field_not_set" | "invalid_value";
3000
3328
  /** The filter with the problem. Missing for a resource type or event problem. */
3001
- field?: string;
3329
+ field?: string | undefined;
3002
3330
  /** Plain words for the person or agent who changes the selection. */
3003
3331
  message: string;
3004
3332
  }
@@ -3008,9 +3336,9 @@ export interface EventTriggerProblem {
3008
3336
  * every resource of the source that its filters match.
3009
3337
  */
3010
3338
  export interface EventTriggerSelection {
3011
- resourceType?: string;
3339
+ resourceType?: string | undefined;
3012
3340
  events: readonly string[];
3013
- match?: EventMatch;
3341
+ match?: EventMatch | undefined;
3014
3342
  }
3015
3343
  /** The enabled resource types of one source, and the reach of each of its events. */
3016
3344
  export interface EventTriggerSource {
@@ -3978,7 +4306,7 @@ export type PluginRegistrationInput = {
3978
4306
  model?: PluginModelConfig;
3979
4307
  /** URLs that this plugin shows as object cards. */
3980
4308
  objectLinks?: PluginObjectLinkDefinition[];
3981
- packageName?: string;
4309
+ packageName?: string | undefined;
3982
4310
  events?: PluginEvents;
3983
4311
  tasks?: PluginTasks;
3984
4312
  userPages?: PluginUserPageDefinition[];
package/dist/index.js CHANGED
@@ -118,6 +118,40 @@ const objectFactsSchema = z.discriminatedUnion("type", [
118
118
  environment: text.optional(),
119
119
  occurredAt: z.iso.datetime({ offset: true }).optional()
120
120
  }),
121
+ z.strictObject({
122
+ type: z.literal("release"),
123
+ summary: summary.optional(),
124
+ version: text,
125
+ projects: z.array(text).max(5),
126
+ newIssues: count.optional(),
127
+ crashFreeSessions: z.number().finite().min(0).max(100).optional(),
128
+ deployCount: count.optional(),
129
+ lastDeploy: z.strictObject({
130
+ environment: text,
131
+ finishedAt: z.iso.datetime({ offset: true }).optional()
132
+ }).optional(),
133
+ releasedAt: z.iso.datetime({ offset: true }).optional()
134
+ }),
135
+ z.strictObject({
136
+ type: z.literal("monitor"),
137
+ summary: summary.optional(),
138
+ kind: z.enum([
139
+ "metric",
140
+ "cron",
141
+ "uptime"
142
+ ]),
143
+ state: z.enum([
144
+ "ok",
145
+ "failing",
146
+ "pending",
147
+ "paused"
148
+ ]),
149
+ project: text.optional(),
150
+ environment: text.optional(),
151
+ detail: text.optional(),
152
+ lastCheckedAt: z.iso.datetime({ offset: true }).optional(),
153
+ trend: trend.optional()
154
+ }),
121
155
  z.strictObject({
122
156
  type: z.literal("trace"),
123
157
  summary: summary.optional(),
@@ -136,6 +170,30 @@ const objectFactsSchema = z.discriminatedUnion("type", [
136
170
  issue: z.boolean().optional()
137
171
  })).max(12)
138
172
  }),
173
+ z.strictObject({
174
+ type: z.literal("dashboard"),
175
+ summary: summary.optional(),
176
+ widgetCount: count,
177
+ projects: z.array(text).max(5),
178
+ environments: z.array(text).max(5),
179
+ range: text,
180
+ widgets: z.array(z.strictObject({
181
+ title: text,
182
+ display: text
183
+ })).max(8),
184
+ charts: z.array(z.strictObject({
185
+ title: text,
186
+ display: z.enum([
187
+ "line",
188
+ "bar",
189
+ "area"
190
+ ]),
191
+ series: z.array(z.strictObject({
192
+ label: text,
193
+ points: z.array(z.number().finite()).min(2).max(60)
194
+ })).min(1).max(3)
195
+ })).max(3)
196
+ }),
139
197
  z.strictObject({
140
198
  type: z.literal("person"),
141
199
  summary: summary.optional(),
@@ -174,6 +232,16 @@ function formatDuration(ms) {
174
232
  if (ms < 6e4) return `${Number((ms / 1e3).toPrecision(3))} s`;
175
233
  return `${Number((ms / 6e4).toPrecision(3))} min`;
176
234
  }
235
+ const MONITOR_KINDS = {
236
+ metric: "Metric alert",
237
+ cron: "Cron job",
238
+ uptime: "Uptime check"
239
+ };
240
+ const MONITOR_DETAILS = {
241
+ metric: "Alerts on",
242
+ cron: "Schedule",
243
+ uptime: "Checks"
244
+ };
177
245
  /** Show at most four card attributes, in priority order, on every surface. */
178
246
  function objectFactFields(facts) {
179
247
  if (!facts) return [];
@@ -244,12 +312,30 @@ function objectFactFields(facts) {
244
312
  add("release", "Release", facts.release);
245
313
  add("environment", "Environment", facts.environment);
246
314
  break;
315
+ case "release":
316
+ add("projects", "Projects", list(facts.projects));
317
+ add("newIssues", "New issues", facts.newIssues?.toLocaleString("en-US"));
318
+ add("crashFreeSessions", "Crash-free sessions", facts.crashFreeSessions === void 0 ? void 0 : `${Number(facts.crashFreeSessions.toFixed(2))}%`);
319
+ add("deploys", "Deploys", facts.deployCount === void 0 ? void 0 : facts.lastDeploy ? `${facts.deployCount.toLocaleString("en-US")}, last to ${facts.lastDeploy.environment}` : facts.deployCount.toLocaleString("en-US"));
320
+ break;
321
+ case "monitor":
322
+ add("kind", "Kind", MONITOR_KINDS[facts.kind]);
323
+ add("project", "Project", facts.project);
324
+ add("environment", "Environment", facts.environment);
325
+ add("detail", MONITOR_DETAILS[facts.kind], facts.detail);
326
+ break;
247
327
  case "trace":
248
328
  add("duration", "Duration", formatDuration(facts.durationMs));
249
329
  add("spans", "Spans", facts.spanCount.toLocaleString("en-US"));
250
330
  add("issues", "Issues", `${plural(facts.errorCount, "error")}, ${plural(facts.performanceIssueCount, "performance issue")}`);
251
331
  add("projects", "Projects", list(facts.projects));
252
332
  break;
333
+ case "dashboard":
334
+ add("widgets", "Widgets", facts.widgetCount.toLocaleString("en-US"));
335
+ add("projects", "Projects", list(facts.projects));
336
+ add("environments", "Environments", list(facts.environments));
337
+ add("range", "Time range", facts.range);
338
+ break;
253
339
  case "person":
254
340
  add("email", "Email", facts.email);
255
341
  add("slackHandle", "Slack", facts.slackHandle && `@${facts.slackHandle}`);
@@ -273,6 +359,9 @@ const objectTypeSchema = z.enum([
273
359
  "chart",
274
360
  "event",
275
361
  "trace",
362
+ "release",
363
+ "dashboard",
364
+ "monitor",
276
365
  "item"
277
366
  ]);
278
367
  const objectTypeLabels = {
@@ -289,6 +378,9 @@ const objectTypeLabels = {
289
378
  chart: "Chart",
290
379
  event: "Event",
291
380
  trace: "Trace",
381
+ release: "Release",
382
+ dashboard: "Dashboard",
383
+ monitor: "Monitor",
292
384
  item: "Item"
293
385
  };
294
386
  /** Resolve identity and state without replacing the type icon with a warning. */
@@ -309,6 +401,9 @@ function objectPresentation(object) {
309
401
  chart: "graph",
310
402
  event: "pulse",
311
403
  trace: "rows",
404
+ release: "tag",
405
+ dashboard: "apps",
406
+ monitor: "bell",
312
407
  item: "package"
313
408
  }[type];
314
409
  let tone = type === "automation" ? "info" : "neutral";
@@ -333,6 +428,11 @@ function objectPresentation(object) {
333
428
  if (status === "ready" || status === "succeeded") tone = "success";
334
429
  if (status === "error" || status === "failed") tone = "danger";
335
430
  if (status === "building" || status === "in_progress") tone = "info";
431
+ } else if (type === "monitor") {
432
+ const state = object.facts?.state;
433
+ if (state === "ok") tone = "success";
434
+ if (state === "failing") tone = "danger";
435
+ if (state === "pending") tone = "info";
336
436
  } else if (type === "conversation") {
337
437
  if (status === "running") tone = "info";
338
438
  if (status === "failed") tone = "danger";
@@ -420,8 +520,11 @@ const objectIconPaths = {
420
520
  globe: ["M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM5.78 8.75a9.64 9.64 0 0 0 1.363 4.177c.255.426.542.832.857 1.215.245-.296.551-.705.857-1.215A9.64 9.64 0 0 0 10.22 8.75Zm4.44-1.5a9.64 9.64 0 0 0-1.363-4.177c-.307-.51-.612-.919-.857-1.215a9.927 9.927 0 0 0-.857 1.215A9.64 9.64 0 0 0 5.78 7.25Zm-5.944 1.5H1.543a6.507 6.507 0 0 0 4.666 5.5c-.123-.181-.24-.365-.352-.552-.715-1.192-1.437-2.874-1.581-4.948Zm-2.733-1.5h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.507 6.507 0 0 0-4.666 5.5Zm10.181 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.507 6.507 0 0 0 4.666-5.5Zm2.733-1.5a6.507 6.507 0 0 0-4.666-5.5c.123.181.24.365.353.552.714 1.192 1.436 2.874 1.58 4.948Z"],
421
521
  graph: ["M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"],
422
522
  pulse: ["M6 2c.306 0 .582.187.696.471L10 10.731l1.304-3.26A.751.751 0 0 1 12 7h3.25a.75.75 0 0 1 0 1.5h-2.742l-1.812 4.528a.751.751 0 0 1-1.392 0L6 4.77 4.696 8.03A.75.75 0 0 1 4 8.5H.75a.75.75 0 0 1 0-1.5h2.742l1.812-4.529A.751.751 0 0 1 6 2Z"],
523
+ bell: ["M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"],
423
524
  rows: ["M16 10.75v2.5A1.75 1.75 0 0 1 14.25 15H1.75A1.75 1.75 0 0 1 0 13.25v-2.5C0 9.784.784 9 1.75 9h12.5c.966 0 1.75.784 1.75 1.75Zm0-8v2.5A1.75 1.75 0 0 1 14.25 7H1.75A1.75 1.75 0 0 1 0 5.25v-2.5C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75Zm-1.75-.25H1.75a.25.25 0 0 0-.25.25v2.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-2.5a.25.25 0 0 0-.25-.25Zm0 8H1.75a.25.25 0 0 0-.25.25v2.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-2.5a.25.25 0 0 0-.25-.25Z"],
424
- package: ["m8.878.392 5.25 3.045c.54.314.872.89.872 1.514v6.098a1.75 1.75 0 0 1-.872 1.514l-5.25 3.045a1.75 1.75 0 0 1-1.756 0l-5.25-3.045A1.75 1.75 0 0 1 1 11.049V4.951c0-.624.332-1.201.872-1.514L7.122.392a1.75 1.75 0 0 1 1.756 0ZM7.875 1.69l-4.63 2.685L8 7.133l4.755-2.758-4.63-2.685a.248.248 0 0 0-.25 0ZM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432Zm6.25 8.271 4.625-2.683a.25.25 0 0 0 .125-.216V5.677L8.75 8.432Z"]
525
+ tag: ["M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.752 1.752 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"],
526
+ package: ["m8.878.392 5.25 3.045c.54.314.872.89.872 1.514v6.098a1.75 1.75 0 0 1-.872 1.514l-5.25 3.045a1.75 1.75 0 0 1-1.756 0l-5.25-3.045A1.75 1.75 0 0 1 1 11.049V4.951c0-.624.332-1.201.872-1.514L7.122.392a1.75 1.75 0 0 1 1.756 0ZM7.875 1.69l-4.63 2.685L8 7.133l4.755-2.758-4.63-2.685a.248.248 0 0 0-.25 0ZM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432Zm6.25 8.271 4.625-2.683a.25.25 0 0 0 .125-.216V5.677L8.75 8.432Z"],
527
+ apps: ["M1.5 3.25c0-.966.784-1.75 1.75-1.75h2.5c.966 0 1.75.784 1.75 1.75v2.5A1.75 1.75 0 0 1 5.75 7.5h-2.5A1.75 1.75 0 0 1 1.5 5.75Zm7 0c0-.966.784-1.75 1.75-1.75h2.5c.966 0 1.75.784 1.75 1.75v2.5a1.75 1.75 0 0 1-1.75 1.75h-2.5A1.75 1.75 0 0 1 8.5 5.75Zm-7 7c0-.966.784-1.75 1.75-1.75h2.5c.966 0 1.75.784 1.75 1.75v2.5a1.75 1.75 0 0 1-1.75 1.75h-2.5a1.75 1.75 0 0 1-1.75-1.75Zm7 0c0-.966.784-1.75 1.75-1.75h2.5c.966 0 1.75.784 1.75 1.75v2.5a1.75 1.75 0 0 1-1.75 1.75h-2.5a1.75 1.75 0 0 1-1.75-1.75ZM3.25 3a.25.25 0 0 0-.25.25v2.5c0 .138.112.25.25.25h2.5A.25.25 0 0 0 6 5.75v-2.5A.25.25 0 0 0 5.75 3Zm7 0a.25.25 0 0 0-.25.25v2.5c0 .138.112.25.25.25h2.5a.25.25 0 0 0 .25-.25v-2.5a.25.25 0 0 0-.25-.25Zm-7 7a.25.25 0 0 0-.25.25v2.5c0 .138.112.25.25.25h2.5a.25.25 0 0 0 .25-.25v-2.5a.25.25 0 0 0-.25-.25Zm7 0a.25.25 0 0 0-.25.25v2.5c0 .138.112.25.25.25h2.5a.25.25 0 0 0 .25-.25v-2.5a.25.25 0 0 0-.25-.25Z"]
425
528
  };
426
529
  // src/images.ts
427
530
  const objectImageRefSchema = z.object({
@@ -792,17 +895,17 @@ function normalizeStoredSource(value) {
792
895
  if (!value || typeof value !== "object" || Array.isArray(value)) return value;
793
896
  const source = value;
794
897
  if ("kind" in source) {
795
- const kind = typeof source.kind === "string" ? {
898
+ const kind = typeof source["kind"] === "string" ? {
796
899
  event_task: "event_automation",
797
900
  resource_event: "event",
798
901
  scheduled_task: "scheduled_automation"
799
- }[source.kind] : void 0;
902
+ }[source["kind"]] : void 0;
800
903
  return kind ? {
801
904
  ...source,
802
905
  kind
803
906
  } : value;
804
907
  }
805
- if (source.platform !== "slack" && source.platform !== "local" && source.platform !== "web") return value;
908
+ if (source["platform"] !== "slack" && source["platform"] !== "local" && source["platform"] !== "web") return value;
806
909
  const { location: _location, platform: kind, ...fields } = source;
807
910
  return {
808
911
  ...fields,
@@ -1728,7 +1831,11 @@ const pluginToolReplySchema = z.object({
1728
1831
  }).strict();
1729
1832
  /** Shared optional fields for canonical plugin tool outputs. */
1730
1833
  const pluginToolOutputSchema = z.object({
1731
- /** Object results to save and show with the next reply. Omit for silent updates. */
1834
+ /**
1835
+ * Objects that the tool created or changed, to save as Annotations and
1836
+ * show with the next reply. Omit for silent updates. Read-only tools
1837
+ * (`readOnlyHint: true`) must omit it: core rejects the result.
1838
+ */
1732
1839
  objectAnnotations: z.array(objectAnnotationSchema).optional(),
1733
1840
  /**
1734
1841
  * Reply the tool posted for Junior, such as a pull request comment. Core
@@ -2121,10 +2228,10 @@ function validateObjectLinks(name, links) {
2121
2228
  if (links === void 0) return;
2122
2229
  if (!Array.isArray(links)) throw new Error(`Junior plugin "${name}" objectLinks must be an array.`);
2123
2230
  for (const link of links) {
2124
- if (!objectTypeSchema.safeParse(link?.objectType).success || typeof link.canView !== "function" || typeof link.resolve !== "function" || !Array.isArray(link.filters) || link.filters.length === 0) throw new Error(`Junior plugin "${name}" object links need an objectType, filters, a canView function, and a resolve function.`);
2231
+ if (!Array.isArray(link?.objectTypes) || link.objectTypes.length === 0 || !link.objectTypes.every((type) => objectTypeSchema.safeParse(type).success) || typeof link.canView !== "function" || typeof link.resolve !== "function" || !Array.isArray(link.filters) || link.filters.length === 0) throw new Error(`Junior plugin "${name}" object links need objectTypes, filters, a canView function, and a resolve function.`);
2125
2232
  for (const filter of link.filters) {
2126
2233
  const parsed = objectLinkFilterSchema.safeParse(filter);
2127
- if (!parsed.success) throw new Error(`Junior plugin "${name}" has an invalid ${link.objectType} link filter.`, { cause: parsed.error });
2234
+ if (!parsed.success) throw new Error(`Junior plugin "${name}" has an invalid ${link.objectTypes.join("/")} link filter.`, { cause: parsed.error });
2128
2235
  }
2129
2236
  }
2130
2237
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-plugin-api",
3
- "version": "0.302.0",
3
+ "version": "0.303.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -26,14 +26,11 @@
26
26
  "zod": "^4.6.7"
27
27
  },
28
28
  "devDependencies": {
29
- "@oxlint/plugins": "1.79.0",
30
- "oxlint": "^1.79.0",
31
- "tsdown": "0.23.1",
32
- "typescript": "^7.0.2"
29
+ "tsdown": "0.23.7",
30
+ "typescript": "7.0.2"
33
31
  },
34
32
  "scripts": {
35
33
  "build": "tsdown",
36
- "lint": "oxlint --config ../junior/.oxlintrc.json --deny-warnings src tsdown.config.ts",
37
34
  "typecheck": "tsc --noEmit"
38
35
  }
39
36
  }