@sentry/junior-github 0.301.0 → 0.302.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.
Files changed (48) hide show
  1. package/dist/{chunk-YUF5P5I7.js → chunk-6SOJ5TN6.js} +142 -31
  2. package/dist/clone-command.d.ts +2 -0
  3. package/dist/db/schema.d.ts +23 -14
  4. package/dist/draft-readiness.d.ts +31 -0
  5. package/dist/events/pull-request.d.ts +1 -1
  6. package/dist/events/repository.d.ts +1 -1
  7. package/dist/graphql-documents.d.ts +13 -0
  8. package/dist/hooks-path-command.d.ts +5 -0
  9. package/dist/index.js +2060 -1699
  10. package/dist/merge-conflict-checks/heartbeat.d.ts +9 -5
  11. package/dist/merge-conflict-checks/policy.d.ts +74 -0
  12. package/dist/pull-request-outcomes/reconcile.d.ts +2 -1
  13. package/dist/pull-request-outcomes/store.d.ts +15 -10
  14. package/dist/testing.js +1 -1
  15. package/dist/tool-support/github-text.d.ts +2 -2
  16. package/dist/tools/clone-repository.d.ts +89 -7
  17. package/dist/tools/comment-on-issue.d.ts +87 -3
  18. package/dist/tools/comment-on-pull-request.d.ts +87 -3
  19. package/dist/tools/create-issue.d.ts +86 -4
  20. package/dist/tools/create-pull-request.d.ts +88 -6
  21. package/dist/tools/get-deployment.d.ts +90 -8
  22. package/dist/tools/get-issue.d.ts +98 -16
  23. package/dist/tools/get-pull-request.d.ts +112 -9
  24. package/dist/tools/get-release.d.ts +90 -8
  25. package/dist/tools/get-repository.d.ts +90 -8
  26. package/dist/tools/get-status.d.ts +87 -5
  27. package/dist/tools/react-to-issue.d.ts +87 -3
  28. package/dist/tools/resolve-pull-request-review-thread.d.ts +87 -5
  29. package/dist/tools/submit-pull-request-review.d.ts +87 -3
  30. package/dist/tools/update-issue-comment.d.ts +87 -3
  31. package/dist/tools/update-issue.d.ts +106 -24
  32. package/dist/tools/update-pull-request-feedback.d.ts +87 -5
  33. package/dist/tools/update-pull-request.d.ts +109 -26
  34. package/dist/tools.d.ts +3 -3
  35. package/dist/webhooks/check-suite.d.ts +30 -3
  36. package/dist/webhooks/handler.d.ts +2 -0
  37. package/dist/webhooks/installation-requests.d.ts +8 -1
  38. package/dist/webhooks/merge-conflict.d.ts +7 -2
  39. package/dist/webhooks/pull-request-action.d.ts +37 -0
  40. package/migrations/0012_pull_request_next_action.sql +5 -0
  41. package/migrations/meta/0012_snapshot.json +434 -0
  42. package/migrations/meta/_journal.json +7 -0
  43. package/package.json +3 -2
  44. package/skills/github-code/SKILL.md +1 -1
  45. package/skills/github-code/SPEC.md +2 -2
  46. package/skills/github-code/references/workflow.md +1 -1
  47. package/dist/webhooks/pull-request-ready.d.ts +0 -31
  48. package/dist/webhooks/pull-request-review-request.d.ts +0 -32
@@ -1,12 +1,14 @@
1
1
  /**
2
2
  * The heartbeat part of merge conflict checks. For each due repository, a
3
3
  * GraphQL search reads the open Junior pull requests with their
4
- * mergeability.
5
- * Only a conflict that a Watch or event automation wants publishes
6
- * `pull_request.merge_conflict`. No agent runs for the check.
4
+ * mergeability. Only a conflicted Junior pull request also reads its
5
+ * history. Only a conflict that a Watch or event automation wants, and that
6
+ * `policy.ts` allows, publishes `pull_request.merge_conflict`. No agent runs
7
+ * for the check.
7
8
  */
8
- import type { EventPublisher, PluginLogger, PluginState } from "@sentry/junior-plugin-api";
9
+ import type { EventPublisher, PluginConversationReviewItems, PluginLogger, PluginState } from "@sentry/junior-plugin-api";
9
10
  import type { GitHubDb } from "../db/database.js";
11
+ import { type GitHubPullRequestRef } from "../webhooks/merge-conflict.js";
10
12
  type SearchOpenPullRequests = (input: {
11
13
  after?: string;
12
14
  repositoryFullName: string;
@@ -14,8 +16,10 @@ type SearchOpenPullRequests = (input: {
14
16
  interface CheckArgs {
15
17
  db: GitHubDb;
16
18
  events: EventPublisher;
17
- log: Pick<PluginLogger, "error">;
19
+ loadHistory(ref: GitHubPullRequestRef): Promise<unknown>;
20
+ log: Pick<PluginLogger, "error" | "warn">;
18
21
  now: Date;
22
+ reviewItems: PluginConversationReviewItems;
19
23
  search: SearchOpenPullRequests;
20
24
  state: PluginState;
21
25
  }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * When a merge conflict wakes Junior. A fix is a full agent turn, so only a
3
+ * Junior pull request that people still work on gets one:
4
+ *
5
+ * - A draft gets nothing.
6
+ * - In the first 2 days after the latest activity by a person, Junior fixes
7
+ * the conflict, at most once a day and 3 times in total.
8
+ * - After that, or after the third fix, Junior adds a review desk notice to
9
+ * the Conversation that asked for the pull request.
10
+ * - After 3 days without activity by a person, nothing.
11
+ * - An approved pull request would be ready to merge but for the conflict,
12
+ * so it gets a fix after the 2 days too, and without the daily wait. The
13
+ * ready to merge notice needs a clean merge state, so it waits for the
14
+ * fix. The total limit still holds.
15
+ *
16
+ * Junior keeps no state for this. Each conflict reads the pull request's
17
+ * history from GitHub. Opening the pull request counts as activity, because
18
+ * a person asked for it. Merges and force pushes by a bot count as fixes.
19
+ * The event key names the head commit, so a check of the same commit, or a
20
+ * webhook and the heartbeat at once, publish one fix. A conflict on a pull
21
+ * request that Junior did not open goes to its Watch as before, except for
22
+ * a draft.
23
+ */
24
+ import type { EventInput, PluginConversationReviewItems, PluginLogger } from "@sentry/junior-plugin-api";
25
+ import type { GitHubDb } from "../db/database.js";
26
+ import type { GitHubMergeConflict, GitHubPullRequestRef } from "../webhooks/merge-conflict.js";
27
+ /** The dedupe key of the merge conflict notice of one pull request. */
28
+ export declare function gitHubConflictNoticeKey(ref: GitHubPullRequestRef): string;
29
+ /**
30
+ * Return the merge conflict events to publish for one conflicted pull
31
+ * request that a Watch or event automation wants. A fix returns `events`.
32
+ * A notice goes to the review desk and returns no events. The notice is
33
+ * optional, so a failure is logged, and the next check tries again.
34
+ */
35
+ export declare function applyGitHubConflictPolicy(args: {
36
+ conflict: GitHubMergeConflict;
37
+ db: GitHubDb;
38
+ draft: boolean;
39
+ events: EventInput[];
40
+ /** Read the pull request's `PULL_REQUEST_CONFLICT_HISTORY` from GitHub. */
41
+ loadHistory(ref: GitHubPullRequestRef): Promise<unknown>;
42
+ log?: Pick<PluginLogger, "error" | "warn">;
43
+ now: Date;
44
+ ref: GitHubPullRequestRef;
45
+ reviewItems: PluginConversationReviewItems;
46
+ title?: string;
47
+ }): Promise<EventInput[]>;
48
+ /** Why a merge conflict notice closes when GitHub reports no conflict. */
49
+ export declare const GITHUB_CONFLICT_GONE_REASON = "The pull request no longer has merge conflicts.";
50
+ /**
51
+ * Close the merge conflict notice of one Junior pull request. Throws when
52
+ * the review desk fails, so a caller with no later check can try again.
53
+ */
54
+ export declare function closeGitHubConflictNotice(args: {
55
+ db: GitHubDb;
56
+ reason: string;
57
+ ref: GitHubPullRequestRef;
58
+ reviewItems: PluginConversationReviewItems;
59
+ status: "done" | "dismissed";
60
+ }): Promise<void>;
61
+ /**
62
+ * Close the merge conflict notices of some Junior pull requests, such as
63
+ * ones that GitHub reports as mergeable. A notice is optional, so a failed
64
+ * close is logged, and the next check closes it again.
65
+ */
66
+ export declare function closeGitHubConflictNotices(args: {
67
+ db: GitHubDb;
68
+ log?: Pick<PluginLogger, "error" | "warn">;
69
+ numbers: number[];
70
+ reason: string;
71
+ repositoryFullName: string;
72
+ reviewItems: PluginConversationReviewItems;
73
+ status: "done" | "dismissed";
74
+ }): Promise<void>;
@@ -10,7 +10,7 @@
10
10
  * is still open also gets its current title in the code index. The writes are
11
11
  * guarded by `updatedAt`, so a replay cannot move a newer row back.
12
12
  */
13
- import type { CodeChangePublisher, EventPublisher, PluginConversationAnnotations, PluginLogger, PluginState } from "@sentry/junior-plugin-api";
13
+ import type { CodeChangePublisher, EventPublisher, PluginConversationAnnotations, PluginConversationReviewItems, PluginLogger, PluginState } from "@sentry/junior-plugin-api";
14
14
  import type { GitHubDb } from "../db/database.js";
15
15
  import { type GitHubCommitPageLoader, type GitHubPullRequestTarget } from "../webhooks/pull-request-people.js";
16
16
  interface ReconcileArgs {
@@ -31,6 +31,7 @@ interface ReconcileArgs {
31
31
  }): Promise<unknown>;
32
32
  log: Pick<PluginLogger, "error" | "warn">;
33
33
  nowMs: number;
34
+ reviewItems: PluginConversationReviewItems;
34
35
  state: PluginState;
35
36
  }
36
37
  /**
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod";
2
2
  import type { GitHubDb } from "../db/database.js";
3
- import { type GitHubPullRequestCommitComposition } from "../db/schema.js";
3
+ import { type GitHubPullRequestAction, type GitHubPullRequestCommitComposition } from "../db/schema.js";
4
4
  declare const githubPullRequestOutcomeInputSchema: z.ZodObject<{
5
5
  candidateOwned: z.ZodBoolean;
6
6
  closedAt: z.ZodOptional<z.ZodDate>;
@@ -76,12 +76,17 @@ export declare function readGitHubPullRequestConversationIds(db: GitHubDb, pullR
76
76
  export declare function recordGitHubPullRequestConversations(db: GitHubDb, input: GitHubPullRequestConversationsInput): Promise<boolean>;
77
77
  /** Link an existing Junior-owned PR to tracked issues across repositories. */
78
78
  export declare function recordGitHubPullRequestLinkedIssues(db: GitHubDb, input: GitHubPullRequestLinkedIssuesInput): Promise<boolean>;
79
+ /** Match one pull request row by repository name, in any case, and number. */
80
+ export declare function pullRequestRow(target: {
81
+ number: number;
82
+ repositoryFullName: string;
83
+ }): import("drizzle-orm").SQL<unknown> | undefined;
79
84
  /**
80
- * Ask to check whether a Junior pull request is ready to merge, and claim the
81
- * check when no other webhook runs one. A claim older than `staleMs` is free.
82
- * Return the claim, or undefined when another webhook runs the check or
83
- * Junior does not own the pull request. The webhook that runs the check sees
84
- * the new request in `releaseGitHubPullRequestReadySync`.
85
+ * Ask to check the next action of a Junior pull request, and claim the check
86
+ * when no other webhook runs one. A claim older than `staleMs` is free.
87
+ * Return the claim and the saved action, or undefined when another webhook
88
+ * runs the check or Junior does not own the pull request. The webhook that
89
+ * runs the check sees the new request in `releaseGitHubPullRequestReadySync`.
85
90
  */
86
91
  export declare function claimGitHubPullRequestReadySync(db: GitHubDb, target: {
87
92
  number: number;
@@ -90,14 +95,14 @@ export declare function claimGitHubPullRequestReadySync(db: GitHubDb, target: {
90
95
  now: Date;
91
96
  staleMs: number;
92
97
  }): Promise<{
98
+ action: GitHubPullRequestAction | undefined;
93
99
  id: number;
94
- ready: boolean;
95
100
  requests: number;
96
101
  } | undefined>;
97
- /** Save whether a Junior pull request is ready to merge. */
98
- export declare function setGitHubPullRequestReadyToMerge(db: GitHubDb, target: {
102
+ /** Save the next action of a Junior pull request. */
103
+ export declare function setGitHubPullRequestNextAction(db: GitHubDb, target: {
104
+ action: GitHubPullRequestAction | undefined;
99
105
  number: number;
100
- ready: boolean;
101
106
  repositoryFullName: string;
102
107
  }): Promise<void>;
103
108
  /**
package/dist/testing.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeGitHubEvents
3
- } from "./chunk-YUF5P5I7.js";
3
+ } from "./chunk-6SOJ5TN6.js";
4
4
  export {
5
5
  normalizeGitHubEvents
6
6
  };
@@ -1,8 +1,8 @@
1
- import type { PluginToolDefinition, ToolRegistrationHookContext } from "@sentry/junior-plugin-api";
1
+ import type { PluginToolDefinition } from "@sentry/junior-plugin-api";
2
2
  /**
3
3
  * Make every GitHub tool send GitHub text. The model reads Slack threads, so
4
4
  * it can copy Slack mention syntax into a title, body, or comment. GitHub
5
5
  * shows that syntax as literal text, so core rewrites it before the tool
6
6
  * runs: a Slack user becomes their linked GitHub `@login`, or their name.
7
7
  */
8
- export declare function withGitHubText(tools: Record<string, PluginToolDefinition>, users: ToolRegistrationHookContext["users"]): Record<string, PluginToolDefinition>;
8
+ export declare function withGitHubText(tools: Record<string, PluginToolDefinition>): Record<string, PluginToolDefinition>;
@@ -1,10 +1,6 @@
1
1
  import { type PluginLogger, type PluginSandbox, type PluginWorkspaceToolContext } from "@sentry/junior-plugin-api";
2
2
  /** Clone one GitHub repository into the sandbox as an ad-hoc checkout. */
3
- export declare function createGitHubCloneRepositoryTool(ctx: {
4
- log: PluginLogger;
5
- sandbox: PluginSandbox;
6
- workspaces: PluginWorkspaceToolContext;
7
- }): import("@sentry/junior-plugin-api").PluginToolDefinition<{
3
+ export declare const gitHubCloneRepositoryTool: import("@sentry/junior-plugin-api").PluginToolDefinition<{
8
4
  repo: string;
9
5
  directory?: string | undefined;
10
6
  allow_ad_hoc?: boolean | undefined;
@@ -13,7 +9,7 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
13
9
  kind: "object";
14
10
  key: string;
15
11
  label: string;
16
- objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
12
+ objectType: "automation" | "calendar_event" | "chart" | "code_change" | "conversation" | "deployment" | "document" | "event" | "item" | "message" | "person" | "task" | "trace" | "web_page";
17
13
  title: string;
18
14
  url: string | null;
19
15
  description?: string | undefined;
@@ -49,6 +45,10 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
49
45
  cycle?: string | undefined;
50
46
  dueDate?: string | undefined;
51
47
  labels?: string[] | undefined;
48
+ trend?: {
49
+ label: string;
50
+ points: number[];
51
+ } | undefined;
52
52
  } | {
53
53
  type: "deployment";
54
54
  summary?: string | undefined;
@@ -71,6 +71,7 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
71
71
  summary?: string | undefined;
72
72
  owner?: string | undefined;
73
73
  modifiedAt?: string | undefined;
74
+ thumbnailUrl?: string | undefined;
74
75
  } | {
75
76
  type: "message";
76
77
  summary?: string | undefined;
@@ -82,7 +83,43 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
82
83
  summary?: string | undefined;
83
84
  siteName?: string | undefined;
84
85
  author?: string | undefined;
86
+ media?: "image" | "video" | undefined;
85
87
  thumbnailUrl?: string | undefined;
88
+ } | {
89
+ type: "chart";
90
+ summary?: string | undefined;
91
+ display: "area" | "bar" | "line";
92
+ yAxis: string;
93
+ range: string;
94
+ series: {
95
+ label: string;
96
+ points: number[];
97
+ }[];
98
+ } | {
99
+ type: "event";
100
+ summary?: string | undefined;
101
+ level?: string | undefined;
102
+ project?: string | undefined;
103
+ release?: string | undefined;
104
+ environment?: string | undefined;
105
+ occurredAt?: string | undefined;
106
+ } | {
107
+ type: "trace";
108
+ summary?: string | undefined;
109
+ rootOp?: string | undefined;
110
+ rootName?: string | undefined;
111
+ durationMs: number;
112
+ spanCount: number;
113
+ errorCount: number;
114
+ performanceIssueCount: number;
115
+ projects: string[];
116
+ spans: {
117
+ op?: string | undefined;
118
+ name: string;
119
+ startMs: number;
120
+ durationMs: number;
121
+ issue?: boolean | undefined;
122
+ }[];
86
123
  } | {
87
124
  type: "person";
88
125
  summary?: string | undefined;
@@ -110,7 +147,7 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
110
147
  kind: "object";
111
148
  key: string;
112
149
  label: string;
113
- objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
150
+ objectType: "automation" | "calendar_event" | "chart" | "code_change" | "conversation" | "deployment" | "document" | "event" | "item" | "message" | "person" | "task" | "trace" | "web_page";
114
151
  title: string;
115
152
  url: string | null;
116
153
  description?: string | undefined;
@@ -146,6 +183,10 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
146
183
  cycle?: string | undefined;
147
184
  dueDate?: string | undefined;
148
185
  labels?: string[] | undefined;
186
+ trend?: {
187
+ label: string;
188
+ points: number[];
189
+ } | undefined;
149
190
  } | {
150
191
  type: "deployment";
151
192
  summary?: string | undefined;
@@ -168,6 +209,7 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
168
209
  summary?: string | undefined;
169
210
  owner?: string | undefined;
170
211
  modifiedAt?: string | undefined;
212
+ thumbnailUrl?: string | undefined;
171
213
  } | {
172
214
  type: "message";
173
215
  summary?: string | undefined;
@@ -179,7 +221,43 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
179
221
  summary?: string | undefined;
180
222
  siteName?: string | undefined;
181
223
  author?: string | undefined;
224
+ media?: "image" | "video" | undefined;
182
225
  thumbnailUrl?: string | undefined;
226
+ } | {
227
+ type: "chart";
228
+ summary?: string | undefined;
229
+ display: "area" | "bar" | "line";
230
+ yAxis: string;
231
+ range: string;
232
+ series: {
233
+ label: string;
234
+ points: number[];
235
+ }[];
236
+ } | {
237
+ type: "event";
238
+ summary?: string | undefined;
239
+ level?: string | undefined;
240
+ project?: string | undefined;
241
+ release?: string | undefined;
242
+ environment?: string | undefined;
243
+ occurredAt?: string | undefined;
244
+ } | {
245
+ type: "trace";
246
+ summary?: string | undefined;
247
+ rootOp?: string | undefined;
248
+ rootName?: string | undefined;
249
+ durationMs: number;
250
+ spanCount: number;
251
+ errorCount: number;
252
+ performanceIssueCount: number;
253
+ projects: string[];
254
+ spans: {
255
+ op?: string | undefined;
256
+ name: string;
257
+ startMs: number;
258
+ durationMs: number;
259
+ issue?: boolean | undefined;
260
+ }[];
183
261
  } | {
184
262
  type: "person";
185
263
  summary?: string | undefined;
@@ -202,4 +280,8 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
202
280
  repo: string;
203
281
  note?: string | undefined;
204
282
  target: "cloneRepository";
283
+ }, {
284
+ log: PluginLogger;
285
+ sandbox: PluginSandbox;
286
+ workspaces: PluginWorkspaceToolContext;
205
287
  }>;
@@ -1,6 +1,6 @@
1
1
  import { type PluginEgress } from "@sentry/junior-plugin-api";
2
2
  /** Post a comment on a GitHub issue as the App bot. */
3
- export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): import("@sentry/junior-plugin-api").PluginToolDefinition<{
3
+ export declare const gitHubCommentOnIssueTool: import("@sentry/junior-plugin-api").PluginToolDefinition<{
4
4
  repo: string;
5
5
  number: number;
6
6
  body: string;
@@ -10,7 +10,7 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
10
10
  kind: "object";
11
11
  key: string;
12
12
  label: string;
13
- objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
13
+ objectType: "automation" | "calendar_event" | "chart" | "code_change" | "conversation" | "deployment" | "document" | "event" | "item" | "message" | "person" | "task" | "trace" | "web_page";
14
14
  title: string;
15
15
  url: string | null;
16
16
  description?: string | undefined;
@@ -46,6 +46,10 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
46
46
  cycle?: string | undefined;
47
47
  dueDate?: string | undefined;
48
48
  labels?: string[] | undefined;
49
+ trend?: {
50
+ label: string;
51
+ points: number[];
52
+ } | undefined;
49
53
  } | {
50
54
  type: "deployment";
51
55
  summary?: string | undefined;
@@ -68,6 +72,7 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
68
72
  summary?: string | undefined;
69
73
  owner?: string | undefined;
70
74
  modifiedAt?: string | undefined;
75
+ thumbnailUrl?: string | undefined;
71
76
  } | {
72
77
  type: "message";
73
78
  summary?: string | undefined;
@@ -79,7 +84,43 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
79
84
  summary?: string | undefined;
80
85
  siteName?: string | undefined;
81
86
  author?: string | undefined;
87
+ media?: "image" | "video" | undefined;
82
88
  thumbnailUrl?: string | undefined;
89
+ } | {
90
+ type: "chart";
91
+ summary?: string | undefined;
92
+ display: "area" | "bar" | "line";
93
+ yAxis: string;
94
+ range: string;
95
+ series: {
96
+ label: string;
97
+ points: number[];
98
+ }[];
99
+ } | {
100
+ type: "event";
101
+ summary?: string | undefined;
102
+ level?: string | undefined;
103
+ project?: string | undefined;
104
+ release?: string | undefined;
105
+ environment?: string | undefined;
106
+ occurredAt?: string | undefined;
107
+ } | {
108
+ type: "trace";
109
+ summary?: string | undefined;
110
+ rootOp?: string | undefined;
111
+ rootName?: string | undefined;
112
+ durationMs: number;
113
+ spanCount: number;
114
+ errorCount: number;
115
+ performanceIssueCount: number;
116
+ projects: string[];
117
+ spans: {
118
+ op?: string | undefined;
119
+ name: string;
120
+ startMs: number;
121
+ durationMs: number;
122
+ issue?: boolean | undefined;
123
+ }[];
83
124
  } | {
84
125
  type: "person";
85
126
  summary?: string | undefined;
@@ -109,7 +150,7 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
109
150
  kind: "object";
110
151
  key: string;
111
152
  label: string;
112
- objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
153
+ objectType: "automation" | "calendar_event" | "chart" | "code_change" | "conversation" | "deployment" | "document" | "event" | "item" | "message" | "person" | "task" | "trace" | "web_page";
113
154
  title: string;
114
155
  url: string | null;
115
156
  description?: string | undefined;
@@ -145,6 +186,10 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
145
186
  cycle?: string | undefined;
146
187
  dueDate?: string | undefined;
147
188
  labels?: string[] | undefined;
189
+ trend?: {
190
+ label: string;
191
+ points: number[];
192
+ } | undefined;
148
193
  } | {
149
194
  type: "deployment";
150
195
  summary?: string | undefined;
@@ -167,6 +212,7 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
167
212
  summary?: string | undefined;
168
213
  owner?: string | undefined;
169
214
  modifiedAt?: string | undefined;
215
+ thumbnailUrl?: string | undefined;
170
216
  } | {
171
217
  type: "message";
172
218
  summary?: string | undefined;
@@ -178,7 +224,43 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
178
224
  summary?: string | undefined;
179
225
  siteName?: string | undefined;
180
226
  author?: string | undefined;
227
+ media?: "image" | "video" | undefined;
181
228
  thumbnailUrl?: string | undefined;
229
+ } | {
230
+ type: "chart";
231
+ summary?: string | undefined;
232
+ display: "area" | "bar" | "line";
233
+ yAxis: string;
234
+ range: string;
235
+ series: {
236
+ label: string;
237
+ points: number[];
238
+ }[];
239
+ } | {
240
+ type: "event";
241
+ summary?: string | undefined;
242
+ level?: string | undefined;
243
+ project?: string | undefined;
244
+ release?: string | undefined;
245
+ environment?: string | undefined;
246
+ occurredAt?: string | undefined;
247
+ } | {
248
+ type: "trace";
249
+ summary?: string | undefined;
250
+ rootOp?: string | undefined;
251
+ rootName?: string | undefined;
252
+ durationMs: number;
253
+ spanCount: number;
254
+ errorCount: number;
255
+ performanceIssueCount: number;
256
+ projects: string[];
257
+ spans: {
258
+ op?: string | undefined;
259
+ name: string;
260
+ startMs: number;
261
+ durationMs: number;
262
+ issue?: boolean | undefined;
263
+ }[];
182
264
  } | {
183
265
  type: "person";
184
266
  summary?: string | undefined;
@@ -202,4 +284,6 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
202
284
  number: number;
203
285
  comment_id: number;
204
286
  url: string;
287
+ }, {
288
+ egress: PluginEgress;
205
289
  }>;
@@ -4,7 +4,7 @@ import { type PluginEgress } from "@sentry/junior-plugin-api";
4
4
  * thread. GitHub keeps conversation comments under the issues endpoint and
5
5
  * thread replies under the pulls endpoint.
6
6
  */
7
- export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgress): import("@sentry/junior-plugin-api").PluginToolDefinition<{
7
+ export declare const gitHubCommentOnPullRequestTool: import("@sentry/junior-plugin-api").PluginToolDefinition<{
8
8
  repo: string;
9
9
  number: number;
10
10
  body: string;
@@ -15,7 +15,7 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
15
15
  kind: "object";
16
16
  key: string;
17
17
  label: string;
18
- objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
18
+ objectType: "automation" | "calendar_event" | "chart" | "code_change" | "conversation" | "deployment" | "document" | "event" | "item" | "message" | "person" | "task" | "trace" | "web_page";
19
19
  title: string;
20
20
  url: string | null;
21
21
  description?: string | undefined;
@@ -51,6 +51,10 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
51
51
  cycle?: string | undefined;
52
52
  dueDate?: string | undefined;
53
53
  labels?: string[] | undefined;
54
+ trend?: {
55
+ label: string;
56
+ points: number[];
57
+ } | undefined;
54
58
  } | {
55
59
  type: "deployment";
56
60
  summary?: string | undefined;
@@ -73,6 +77,7 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
73
77
  summary?: string | undefined;
74
78
  owner?: string | undefined;
75
79
  modifiedAt?: string | undefined;
80
+ thumbnailUrl?: string | undefined;
76
81
  } | {
77
82
  type: "message";
78
83
  summary?: string | undefined;
@@ -84,7 +89,43 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
84
89
  summary?: string | undefined;
85
90
  siteName?: string | undefined;
86
91
  author?: string | undefined;
92
+ media?: "image" | "video" | undefined;
87
93
  thumbnailUrl?: string | undefined;
94
+ } | {
95
+ type: "chart";
96
+ summary?: string | undefined;
97
+ display: "area" | "bar" | "line";
98
+ yAxis: string;
99
+ range: string;
100
+ series: {
101
+ label: string;
102
+ points: number[];
103
+ }[];
104
+ } | {
105
+ type: "event";
106
+ summary?: string | undefined;
107
+ level?: string | undefined;
108
+ project?: string | undefined;
109
+ release?: string | undefined;
110
+ environment?: string | undefined;
111
+ occurredAt?: string | undefined;
112
+ } | {
113
+ type: "trace";
114
+ summary?: string | undefined;
115
+ rootOp?: string | undefined;
116
+ rootName?: string | undefined;
117
+ durationMs: number;
118
+ spanCount: number;
119
+ errorCount: number;
120
+ performanceIssueCount: number;
121
+ projects: string[];
122
+ spans: {
123
+ op?: string | undefined;
124
+ name: string;
125
+ startMs: number;
126
+ durationMs: number;
127
+ issue?: boolean | undefined;
128
+ }[];
88
129
  } | {
89
130
  type: "person";
90
131
  summary?: string | undefined;
@@ -114,7 +155,7 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
114
155
  kind: "object";
115
156
  key: string;
116
157
  label: string;
117
- objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
158
+ objectType: "automation" | "calendar_event" | "chart" | "code_change" | "conversation" | "deployment" | "document" | "event" | "item" | "message" | "person" | "task" | "trace" | "web_page";
118
159
  title: string;
119
160
  url: string | null;
120
161
  description?: string | undefined;
@@ -150,6 +191,10 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
150
191
  cycle?: string | undefined;
151
192
  dueDate?: string | undefined;
152
193
  labels?: string[] | undefined;
194
+ trend?: {
195
+ label: string;
196
+ points: number[];
197
+ } | undefined;
153
198
  } | {
154
199
  type: "deployment";
155
200
  summary?: string | undefined;
@@ -172,6 +217,7 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
172
217
  summary?: string | undefined;
173
218
  owner?: string | undefined;
174
219
  modifiedAt?: string | undefined;
220
+ thumbnailUrl?: string | undefined;
175
221
  } | {
176
222
  type: "message";
177
223
  summary?: string | undefined;
@@ -183,7 +229,43 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
183
229
  summary?: string | undefined;
184
230
  siteName?: string | undefined;
185
231
  author?: string | undefined;
232
+ media?: "image" | "video" | undefined;
186
233
  thumbnailUrl?: string | undefined;
234
+ } | {
235
+ type: "chart";
236
+ summary?: string | undefined;
237
+ display: "area" | "bar" | "line";
238
+ yAxis: string;
239
+ range: string;
240
+ series: {
241
+ label: string;
242
+ points: number[];
243
+ }[];
244
+ } | {
245
+ type: "event";
246
+ summary?: string | undefined;
247
+ level?: string | undefined;
248
+ project?: string | undefined;
249
+ release?: string | undefined;
250
+ environment?: string | undefined;
251
+ occurredAt?: string | undefined;
252
+ } | {
253
+ type: "trace";
254
+ summary?: string | undefined;
255
+ rootOp?: string | undefined;
256
+ rootName?: string | undefined;
257
+ durationMs: number;
258
+ spanCount: number;
259
+ errorCount: number;
260
+ performanceIssueCount: number;
261
+ projects: string[];
262
+ spans: {
263
+ op?: string | undefined;
264
+ name: string;
265
+ startMs: number;
266
+ durationMs: number;
267
+ issue?: boolean | undefined;
268
+ }[];
187
269
  } | {
188
270
  type: "person";
189
271
  summary?: string | undefined;
@@ -207,4 +289,6 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
207
289
  number: number;
208
290
  comment_id: number;
209
291
  url: string;
292
+ }, {
293
+ egress: PluginEgress;
210
294
  }>;