@sentry/junior-plugin-api 0.302.0 → 0.304.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>;
@@ -1535,6 +1789,13 @@ export declare const conversationSidebarIconSchema: z.ZodEnum<{
1535
1789
  "git-pull-request": "git-pull-request";
1536
1790
  "triangle-alert": "triangle-alert";
1537
1791
  }>;
1792
+ /**
1793
+ * One linked object on a Conversation row. `label` is the short chip text.
1794
+ * `title` and `url` are the saved object's own, for rows with room for a
1795
+ * card; leave them out when the plugin has not saved them. `imageUrl` is a
1796
+ * public image that previews the object, such as the first screenshot of a
1797
+ * code change.
1798
+ */
1538
1799
  export declare const conversationSidebarAnnotationSchema: z.ZodObject<{
1539
1800
  icon: z.ZodOptional<z.ZodEnum<{
1540
1801
  "circle-dashed": "circle-dashed";
@@ -1550,12 +1811,15 @@ export declare const conversationSidebarAnnotationSchema: z.ZodObject<{
1550
1811
  chart: "chart";
1551
1812
  code_change: "code_change";
1552
1813
  conversation: "conversation";
1814
+ dashboard: "dashboard";
1553
1815
  deployment: "deployment";
1554
1816
  document: "document";
1555
1817
  event: "event";
1556
1818
  item: "item";
1557
1819
  message: "message";
1820
+ monitor: "monitor";
1558
1821
  person: "person";
1822
+ release: "release";
1559
1823
  task: "task";
1560
1824
  trace: "trace";
1561
1825
  web_page: "web_page";
@@ -1563,6 +1827,9 @@ export declare const conversationSidebarAnnotationSchema: z.ZodObject<{
1563
1827
  status: z.ZodOptional<z.ZodString>;
1564
1828
  key: z.ZodString;
1565
1829
  label: z.ZodString;
1830
+ title: z.ZodOptional<z.ZodString>;
1831
+ url: z.ZodOptional<z.ZodString>;
1832
+ imageUrl: z.ZodOptional<z.ZodString>;
1566
1833
  }, z.core.$strict>;
1567
1834
  export type ConversationSidebarAnnotation = z.output<typeof conversationSidebarAnnotationSchema>;
1568
1835
  export interface ConversationSidebarHookContext extends PluginContext {
@@ -1793,12 +2060,15 @@ export declare const eventInputSchema: z.ZodObject<{
1793
2060
  chart: "chart";
1794
2061
  code_change: "code_change";
1795
2062
  conversation: "conversation";
2063
+ dashboard: "dashboard";
1796
2064
  deployment: "deployment";
1797
2065
  document: "document";
1798
2066
  event: "event";
1799
2067
  item: "item";
1800
2068
  message: "message";
2069
+ monitor: "monitor";
1801
2070
  person: "person";
2071
+ release: "release";
1802
2072
  task: "task";
1803
2073
  trace: "trace";
1804
2074
  web_page: "web_page";
@@ -1833,12 +2103,15 @@ export declare const eventSchema: z.ZodObject<{
1833
2103
  chart: "chart";
1834
2104
  code_change: "code_change";
1835
2105
  conversation: "conversation";
2106
+ dashboard: "dashboard";
1836
2107
  deployment: "deployment";
1837
2108
  document: "document";
1838
2109
  event: "event";
1839
2110
  item: "item";
1840
2111
  message: "message";
2112
+ monitor: "monitor";
1841
2113
  person: "person";
2114
+ release: "release";
1842
2115
  task: "task";
1843
2116
  trace: "trace";
1844
2117
  web_page: "web_page";
@@ -2076,7 +2349,7 @@ export interface WorkspacePrepareHookContext extends PluginContext {
2076
2349
  sandbox: PluginSandbox;
2077
2350
  }
2078
2351
  export interface SandboxPrepareHookContext extends PluginContext {
2079
- actor?: Actor;
2352
+ actor?: Actor | undefined;
2080
2353
  sandbox: PluginSandbox;
2081
2354
  }
2082
2355
  export interface BeforeToolExecuteHookContext extends PluginContext {
@@ -2084,7 +2357,7 @@ export interface BeforeToolExecuteHookContext extends PluginContext {
2084
2357
  env: PluginEnv;
2085
2358
  /** Same directory as `PluginSandbox.juniorRoot` from `sandboxPrepare`. */
2086
2359
  juniorRoot: string;
2087
- actor?: Actor;
2360
+ actor?: Actor | undefined;
2088
2361
  /** All actors who contributed instructions to the run so far; see `multi-actor-runs.md`. */
2089
2362
  actors?: Actor[];
2090
2363
  tool: {
@@ -2150,7 +2423,7 @@ export interface AfterMcpToolHookContext extends PluginContext {
2150
2423
  annotations?: PluginAnnotations;
2151
2424
  result: {
2152
2425
  /** Provider content before model-facing truncation. */
2153
- content?: PluginMcpContent[];
2426
+ content?: PluginMcpContent[] | undefined;
2154
2427
  structuredContent?: unknown;
2155
2428
  };
2156
2429
  tool: {
@@ -2191,12 +2464,15 @@ export declare const pluginToolOutputSchema: z.ZodObject<{
2191
2464
  chart: "chart";
2192
2465
  code_change: "code_change";
2193
2466
  conversation: "conversation";
2467
+ dashboard: "dashboard";
2194
2468
  deployment: "deployment";
2195
2469
  document: "document";
2196
2470
  event: "event";
2197
2471
  item: "item";
2198
2472
  message: "message";
2473
+ monitor: "monitor";
2199
2474
  person: "person";
2475
+ release: "release";
2200
2476
  task: "task";
2201
2477
  trace: "trace";
2202
2478
  web_page: "web_page";
@@ -2305,6 +2581,41 @@ export declare const pluginToolOutputSchema: z.ZodObject<{
2305
2581
  release: z.ZodOptional<z.ZodString>;
2306
2582
  environment: z.ZodOptional<z.ZodString>;
2307
2583
  occurredAt: z.ZodOptional<z.ZodISODateTime>;
2584
+ }, z.core.$strict>, z.ZodObject<{
2585
+ type: z.ZodLiteral<"release">;
2586
+ summary: z.ZodOptional<z.ZodString>;
2587
+ version: z.ZodString;
2588
+ projects: z.ZodArray<z.ZodString>;
2589
+ newIssues: z.ZodOptional<z.ZodNumber>;
2590
+ crashFreeSessions: z.ZodOptional<z.ZodNumber>;
2591
+ deployCount: z.ZodOptional<z.ZodNumber>;
2592
+ lastDeploy: z.ZodOptional<z.ZodObject<{
2593
+ environment: z.ZodString;
2594
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
2595
+ }, z.core.$strict>>;
2596
+ releasedAt: z.ZodOptional<z.ZodISODateTime>;
2597
+ }, z.core.$strict>, z.ZodObject<{
2598
+ type: z.ZodLiteral<"monitor">;
2599
+ summary: z.ZodOptional<z.ZodString>;
2600
+ kind: z.ZodEnum<{
2601
+ cron: "cron";
2602
+ metric: "metric";
2603
+ uptime: "uptime";
2604
+ }>;
2605
+ state: z.ZodEnum<{
2606
+ failing: "failing";
2607
+ ok: "ok";
2608
+ paused: "paused";
2609
+ pending: "pending";
2610
+ }>;
2611
+ project: z.ZodOptional<z.ZodString>;
2612
+ environment: z.ZodOptional<z.ZodString>;
2613
+ detail: z.ZodOptional<z.ZodString>;
2614
+ lastCheckedAt: z.ZodOptional<z.ZodISODateTime>;
2615
+ trend: z.ZodOptional<z.ZodObject<{
2616
+ label: z.ZodString;
2617
+ points: z.ZodArray<z.ZodNumber>;
2618
+ }, z.core.$strict>>;
2308
2619
  }, z.core.$strict>, z.ZodObject<{
2309
2620
  type: z.ZodLiteral<"trace">;
2310
2621
  summary: z.ZodOptional<z.ZodString>;
@@ -2322,6 +2633,29 @@ export declare const pluginToolOutputSchema: z.ZodObject<{
2322
2633
  durationMs: z.ZodNumber;
2323
2634
  issue: z.ZodOptional<z.ZodBoolean>;
2324
2635
  }, z.core.$strict>>;
2636
+ }, z.core.$strict>, z.ZodObject<{
2637
+ type: z.ZodLiteral<"dashboard">;
2638
+ summary: z.ZodOptional<z.ZodString>;
2639
+ widgetCount: z.ZodNumber;
2640
+ projects: z.ZodArray<z.ZodString>;
2641
+ environments: z.ZodArray<z.ZodString>;
2642
+ range: z.ZodString;
2643
+ widgets: z.ZodArray<z.ZodObject<{
2644
+ title: z.ZodString;
2645
+ display: z.ZodString;
2646
+ }, z.core.$strict>>;
2647
+ charts: z.ZodArray<z.ZodObject<{
2648
+ title: z.ZodString;
2649
+ display: z.ZodEnum<{
2650
+ area: "area";
2651
+ bar: "bar";
2652
+ line: "line";
2653
+ }>;
2654
+ series: z.ZodArray<z.ZodObject<{
2655
+ label: z.ZodString;
2656
+ points: z.ZodArray<z.ZodNumber>;
2657
+ }, z.core.$strict>>;
2658
+ }, z.core.$strict>>;
2325
2659
  }, z.core.$strict>, z.ZodObject<{
2326
2660
  type: z.ZodLiteral<"person">;
2327
2661
  summary: z.ZodOptional<z.ZodString>;
@@ -2374,11 +2708,11 @@ export type ToolApprovalMode = z.output<typeof toolApprovalModeSchema>;
2374
2708
  */
2375
2709
  export interface ToolAnnotations {
2376
2710
  [key: string]: unknown;
2377
- destructiveHint?: boolean;
2378
- idempotentHint?: boolean;
2379
- openWorldHint?: boolean;
2380
- readOnlyHint?: boolean;
2381
- title?: string;
2711
+ destructiveHint?: boolean | undefined;
2712
+ idempotentHint?: boolean | undefined;
2713
+ openWorldHint?: boolean | undefined;
2714
+ readOnlyHint?: boolean | undefined;
2715
+ title?: string | undefined;
2382
2716
  }
2383
2717
  export declare const REQUIRED_TOOL_ANNOTATION_KEYS: readonly ["destructiveHint", "idempotentHint", "openWorldHint", "readOnlyHint"];
2384
2718
  export type RequiredToolAnnotationKey = (typeof REQUIRED_TOOL_ANNOTATION_KEYS)[number];
@@ -2389,7 +2723,7 @@ export declare function missingToolAnnotationKeys(annotations: ToolAnnotations |
2389
2723
  */
2390
2724
  export interface ToolApprovalMetadata<TInput = unknown> {
2391
2725
  /** Optional declared approval mode; the owning tool boundary selects defaults. */
2392
- approvalMode?: ToolApprovalMode;
2726
+ approvalMode?: ToolApprovalMode | undefined;
2393
2727
  annotations?: ToolAnnotations;
2394
2728
  /**
2395
2729
  * Describe the reviewed semantic action for the review request.
@@ -2419,7 +2753,7 @@ export interface PluginToolDefinition<TInput = unknown, TOutput = unknown, TExec
2419
2753
  description: string;
2420
2754
  executionMode?: unknown;
2421
2755
  /** Override the host's default tool exposure. */
2422
- exposure?: ToolExposure;
2756
+ exposure?: ToolExposure | undefined;
2423
2757
  inputSchema: unknown;
2424
2758
  outputSchema?: unknown;
2425
2759
  /**
@@ -2723,7 +3057,11 @@ export interface PluginObjectLinkDefinition {
2723
3057
  */
2724
3058
  canView(ctx: ObjectLinkContext, url: URL): Promise<boolean>;
2725
3059
  filters: ObjectLinkFilter[];
2726
- objectType: ObjectType;
3060
+ /**
3061
+ * The object types that `resolve` can return. One URL can open more than
3062
+ * one type, such as a GitHub issue URL that opens a pull request.
3063
+ */
3064
+ objectTypes: ObjectType[];
2727
3065
  /**
2728
3066
  * Read the card. Junior calls it only after `canView` returns true.
2729
3067
  * Return nothing for a missing object.
@@ -2952,8 +3290,8 @@ type UserPromptContext = Pick<PluginContext, "db" | "log" | "plugin"> & {
2952
3290
  */
2953
3291
  setSpanAttributes(attributes: Record<string, number>): void;
2954
3292
  /** Location associated with this Conversation. */
2955
- locationId?: string;
2956
- actor?: Actor;
3293
+ locationId?: string | undefined;
3294
+ actor?: Actor | undefined;
2957
3295
  source: Source;
2958
3296
  state: PluginState;
2959
3297
  text: string;
@@ -2998,7 +3336,7 @@ export interface EventTriggerProblem {
2998
3336
  */
2999
3337
  reason: "unknown_resource_type" | "unknown_event" | "identifier_required" | "filter_required" | "unknown_field" | "field_not_set" | "invalid_value";
3000
3338
  /** The filter with the problem. Missing for a resource type or event problem. */
3001
- field?: string;
3339
+ field?: string | undefined;
3002
3340
  /** Plain words for the person or agent who changes the selection. */
3003
3341
  message: string;
3004
3342
  }
@@ -3008,9 +3346,9 @@ export interface EventTriggerProblem {
3008
3346
  * every resource of the source that its filters match.
3009
3347
  */
3010
3348
  export interface EventTriggerSelection {
3011
- resourceType?: string;
3349
+ resourceType?: string | undefined;
3012
3350
  events: readonly string[];
3013
- match?: EventMatch;
3351
+ match?: EventMatch | undefined;
3014
3352
  }
3015
3353
  /** The enabled resource types of one source, and the reach of each of its events. */
3016
3354
  export interface EventTriggerSource {
@@ -3978,7 +4316,7 @@ export type PluginRegistrationInput = {
3978
4316
  model?: PluginModelConfig;
3979
4317
  /** URLs that this plugin shows as object cards. */
3980
4318
  objectLinks?: PluginObjectLinkDefinition[];
3981
- packageName?: string;
4319
+ packageName?: string | undefined;
3982
4320
  events?: PluginEvents;
3983
4321
  tasks?: PluginTasks;
3984
4322
  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({
@@ -545,6 +648,7 @@ function usesHttpProtocol(value) {
545
648
  return false;
546
649
  }
547
650
  }
651
+ const httpUrlSchema = z.string().url().max(2048).refine(usesHttpProtocol, "URL must use HTTP or HTTPS.");
548
652
  /**
549
653
  * Link an object to a Conversation when the owner has no typed object preview.
550
654
  * Keep a stable key, compact label, source URL, and optional short context or
@@ -556,7 +660,7 @@ const resourceLinkAnnotationSchema = z.object({
556
660
  objectType: objectTypeSchema.optional(),
557
661
  key: z.string().trim().min(1).max(256),
558
662
  label: z.string().trim().min(1).max(256),
559
- url: z.string().url().max(2048).refine(usesHttpProtocol, "URL must use HTTP or HTTPS."),
663
+ url: httpUrlSchema,
560
664
  description: z.string().trim().min(1).max(512).optional(),
561
665
  status: z.enum([
562
666
  "open",
@@ -576,12 +680,22 @@ const conversationSidebarIconSchema = z.enum([
576
680
  "git-pull-request",
577
681
  "triangle-alert"
578
682
  ]);
683
+ /**
684
+ * One linked object on a Conversation row. `label` is the short chip text.
685
+ * `title` and `url` are the saved object's own, for rows with room for a
686
+ * card; leave them out when the plugin has not saved them. `imageUrl` is a
687
+ * public image that previews the object, such as the first screenshot of a
688
+ * code change.
689
+ */
579
690
  const conversationSidebarAnnotationSchema = z.object({
580
691
  icon: conversationSidebarIconSchema.optional(),
581
692
  objectType: objectTypeSchema.optional(),
582
693
  status: z.string().trim().min(1).max(100).optional(),
583
694
  key: z.string().trim().min(1).max(256),
584
- label: z.string().trim().min(1).max(256)
695
+ label: z.string().trim().min(1).max(256),
696
+ title: z.string().trim().min(1).max(512).optional(),
697
+ url: httpUrlSchema.optional(),
698
+ imageUrl: httpUrlSchema.optional()
585
699
  }).strict();
586
700
  // src/code.ts
587
701
  const codeChangeStateSchema = z.enum([
@@ -792,17 +906,17 @@ function normalizeStoredSource(value) {
792
906
  if (!value || typeof value !== "object" || Array.isArray(value)) return value;
793
907
  const source = value;
794
908
  if ("kind" in source) {
795
- const kind = typeof source.kind === "string" ? {
909
+ const kind = typeof source["kind"] === "string" ? {
796
910
  event_task: "event_automation",
797
911
  resource_event: "event",
798
912
  scheduled_task: "scheduled_automation"
799
- }[source.kind] : void 0;
913
+ }[source["kind"]] : void 0;
800
914
  return kind ? {
801
915
  ...source,
802
916
  kind
803
917
  } : value;
804
918
  }
805
- if (source.platform !== "slack" && source.platform !== "local" && source.platform !== "web") return value;
919
+ if (source["platform"] !== "slack" && source["platform"] !== "local" && source["platform"] !== "web") return value;
806
920
  const { location: _location, platform: kind, ...fields } = source;
807
921
  return {
808
922
  ...fields,
@@ -1728,7 +1842,11 @@ const pluginToolReplySchema = z.object({
1728
1842
  }).strict();
1729
1843
  /** Shared optional fields for canonical plugin tool outputs. */
1730
1844
  const pluginToolOutputSchema = z.object({
1731
- /** Object results to save and show with the next reply. Omit for silent updates. */
1845
+ /**
1846
+ * Objects that the tool created or changed, to save as Annotations and
1847
+ * show with the next reply. Omit for silent updates. Read-only tools
1848
+ * (`readOnlyHint: true`) must omit it: core rejects the result.
1849
+ */
1732
1850
  objectAnnotations: z.array(objectAnnotationSchema).optional(),
1733
1851
  /**
1734
1852
  * Reply the tool posted for Junior, such as a pull request comment. Core
@@ -2084,47 +2202,47 @@ function defineJuniorPlugin(plugin) {
2084
2202
  const manifest = plugin.manifest;
2085
2203
  if (!manifest) throw new Error("defineJuniorPlugin() requires a manifest. Use a package name string in defineJuniorPlugins([...]) for plugin.yaml packages.");
2086
2204
  const name = manifest.name;
2087
- if (!name) throw new Error("Junior plugin manifest.name is required.");
2088
- if (!PLUGIN_NAME_RE.test(name)) throw new Error(`Junior plugin registration name "${name}" must be a lowercase plugin identifier.`);
2089
- if (name === "junior") throw new Error("Junior plugin registration name \"junior\" is reserved for native host events.");
2090
- if (typeof manifest.displayName !== "string" || !manifest.displayName.trim()) throw new Error(`Junior plugin "${name}" manifest.displayName is required.`);
2091
- if (typeof manifest.description !== "string" || !manifest.description.trim()) throw new Error(`Junior plugin "${name}" manifest.description is required.`);
2092
- if (plugin.userPages !== void 0 && !Array.isArray(plugin.userPages)) throw new Error(`Junior plugin "${name}" userPages must be an array.`);
2093
- if (plugin.conversationEvents !== void 0 && !Array.isArray(plugin.conversationEvents)) throw new Error(`Junior plugin "${name}" conversationEvents must be an array.`);
2205
+ if (!name) throw new Error("Plugin manifest.name is required.");
2206
+ if (!PLUGIN_NAME_RE.test(name)) throw new Error(`Plugin registration name "${name}" must be a lowercase plugin identifier.`);
2207
+ if (name === "junior") throw new Error("Plugin registration name \"junior\" is reserved for native host events.");
2208
+ if (typeof manifest.displayName !== "string" || !manifest.displayName.trim()) throw new Error(`Plugin "${name}" manifest.displayName is required.`);
2209
+ if (typeof manifest.description !== "string" || !manifest.description.trim()) throw new Error(`Plugin "${name}" manifest.description is required.`);
2210
+ if (plugin.userPages !== void 0 && !Array.isArray(plugin.userPages)) throw new Error(`Plugin "${name}" userPages must be an array.`);
2211
+ if (plugin.conversationEvents !== void 0 && !Array.isArray(plugin.conversationEvents)) throw new Error(`Plugin "${name}" conversationEvents must be an array.`);
2094
2212
  if (plugin.events !== void 0) {
2095
2213
  const parsed = pluginEventsSchema.safeParse(plugin.events);
2096
- if (!parsed.success) throw new Error(`Junior plugin "${name}" events is invalid.`, { cause: parsed.error });
2214
+ if (!parsed.success) throw new Error(`Plugin "${name}" events is invalid.`, { cause: parsed.error });
2097
2215
  }
2098
2216
  validateObjectLinks(name, plugin.objectLinks);
2099
- if (plugin.images !== void 0 && typeof plugin.images.resolve !== "function") throw new Error(`Junior plugin "${name}" images must have a resolve function.`);
2217
+ if (plugin.images !== void 0 && typeof plugin.images.resolve !== "function") throw new Error(`Plugin "${name}" images must have a resolve function.`);
2100
2218
  const conversationEventIds = /* @__PURE__ */ new Set();
2101
2219
  for (const event of plugin.conversationEvents ?? []) {
2102
- if (!event || typeof event !== "object" && typeof event !== "function" || typeof event.parse !== "function" || typeof event.renderEvent !== "function") throw new Error(`Junior plugin "${name}" conversation event definitions must be created with defineConversationEvent().`);
2103
- if (isPluginModelCostEventName(event.eventName)) throw new Error(`Junior plugin "${name}" cannot register host-owned conversation event "${event.eventName}".`);
2220
+ if (!event || typeof event !== "object" && typeof event !== "function" || typeof event.parse !== "function" || typeof event.renderEvent !== "function") throw new Error(`Plugin "${name}" conversation event definitions must be created with defineConversationEvent().`);
2221
+ if (isPluginModelCostEventName(event.eventName)) throw new Error(`Plugin "${name}" cannot register host-owned conversation event "${event.eventName}".`);
2104
2222
  const id = `${event.eventName}@${event.version}`;
2105
- if (conversationEventIds.has(id)) throw new Error(`Junior plugin "${name}" has duplicate conversation event "${id}".`);
2223
+ if (conversationEventIds.has(id)) throw new Error(`Plugin "${name}" has duplicate conversation event "${id}".`);
2106
2224
  conversationEventIds.add(id);
2107
2225
  }
2108
2226
  const userPageIds = /* @__PURE__ */ new Set();
2109
2227
  for (const page of plugin.userPages ?? []) {
2110
- if (!page || typeof page !== "object") throw new Error(`Junior plugin "${name}" user pages must be objects.`);
2111
- if (typeof page.id !== "string" || page.id.length > 64 || !USER_PAGE_ID_RE.test(page.id)) throw new Error(`Junior plugin "${name}" user page id "${page.id}" must be a lowercase identifier.`);
2112
- if (userPageIds.has(page.id)) throw new Error(`Junior plugin "${name}" has duplicate user page id "${page.id}".`);
2113
- if (typeof page.label !== "string" || !page.label.trim() || page.label.length > 80 || typeof page.description !== "string" || !page.description.trim() || page.description.length > 500) throw new Error(`Junior plugin "${name}" user page "${page.id}" requires label and description.`);
2114
- if (page.navigation !== void 0 && page.navigation !== "primary" && page.navigation !== "profile" && page.navigation !== "admin") throw new Error(`Junior plugin "${name}" user page "${page.id}" navigation must be "primary", "profile", or "admin".`);
2115
- if (typeof page.read !== "function") throw new Error(`Junior plugin "${name}" user page "${page.id}" requires a read function.`);
2228
+ if (!page || typeof page !== "object") throw new Error(`Plugin "${name}" user pages must be objects.`);
2229
+ if (typeof page.id !== "string" || page.id.length > 64 || !USER_PAGE_ID_RE.test(page.id)) throw new Error(`Plugin "${name}" user page id "${page.id}" must be a lowercase identifier.`);
2230
+ if (userPageIds.has(page.id)) throw new Error(`Plugin "${name}" has duplicate user page id "${page.id}".`);
2231
+ if (typeof page.label !== "string" || !page.label.trim() || page.label.length > 80 || typeof page.description !== "string" || !page.description.trim() || page.description.length > 500) throw new Error(`Plugin "${name}" user page "${page.id}" requires label and description.`);
2232
+ if (page.navigation !== void 0 && page.navigation !== "primary" && page.navigation !== "profile" && page.navigation !== "admin") throw new Error(`Plugin "${name}" user page "${page.id}" navigation must be "primary", "profile", or "admin".`);
2233
+ if (typeof page.read !== "function") throw new Error(`Plugin "${name}" user page "${page.id}" requires a read function.`);
2116
2234
  userPageIds.add(page.id);
2117
2235
  }
2118
2236
  return { ...plugin };
2119
2237
  }
2120
2238
  function validateObjectLinks(name, links) {
2121
2239
  if (links === void 0) return;
2122
- if (!Array.isArray(links)) throw new Error(`Junior plugin "${name}" objectLinks must be an array.`);
2240
+ if (!Array.isArray(links)) throw new Error(`Plugin "${name}" objectLinks must be an array.`);
2123
2241
  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.`);
2242
+ 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(`Plugin "${name}" object links need objectTypes, filters, a canView function, and a resolve function.`);
2125
2243
  for (const filter of link.filters) {
2126
2244
  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 });
2245
+ if (!parsed.success) throw new Error(`Plugin "${name}" has an invalid ${link.objectTypes.join("/")} link filter.`, { cause: parsed.error });
2128
2246
  }
2129
2247
  }
2130
2248
  }
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.304.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
  }