@sentry/junior-github 0.300.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 (54) hide show
  1. package/dist/account-links.d.ts +8 -0
  2. package/dist/{chunk-YUF5P5I7.js → chunk-6SOJ5TN6.js} +142 -31
  3. package/dist/clone-command.d.ts +2 -0
  4. package/dist/configured-repository.d.ts +10 -0
  5. package/dist/db/schema.d.ts +23 -14
  6. package/dist/draft-readiness.d.ts +31 -0
  7. package/dist/events/pull-request.d.ts +1 -1
  8. package/dist/events/repository.d.ts +1 -1
  9. package/dist/graphql-documents.d.ts +13 -0
  10. package/dist/hooks-path-command.d.ts +5 -0
  11. package/dist/images.d.ts +8 -0
  12. package/dist/index.js +2355 -1801
  13. package/dist/merge-conflict-checks/heartbeat.d.ts +9 -5
  14. package/dist/merge-conflict-checks/policy.d.ts +74 -0
  15. package/dist/object-facts.d.ts +14 -3
  16. package/dist/pull-request-outcomes/reconcile.d.ts +2 -1
  17. package/dist/pull-request-outcomes/store.d.ts +15 -10
  18. package/dist/reply-markdown.d.ts +18 -2
  19. package/dist/testing.js +1 -1
  20. package/dist/tool-support/github-api.d.ts +7 -0
  21. package/dist/tool-support/github-text.d.ts +8 -0
  22. package/dist/tools/clone-repository.d.ts +89 -7
  23. package/dist/tools/comment-on-issue.d.ts +87 -3
  24. package/dist/tools/comment-on-pull-request.d.ts +87 -3
  25. package/dist/tools/create-issue.d.ts +86 -4
  26. package/dist/tools/create-pull-request.d.ts +88 -6
  27. package/dist/tools/get-deployment.d.ts +90 -8
  28. package/dist/tools/get-issue.d.ts +98 -16
  29. package/dist/tools/get-pull-request.d.ts +112 -9
  30. package/dist/tools/get-release.d.ts +90 -8
  31. package/dist/tools/get-repository.d.ts +90 -8
  32. package/dist/tools/get-status.d.ts +87 -5
  33. package/dist/tools/react-to-issue.d.ts +87 -3
  34. package/dist/tools/resolve-pull-request-review-thread.d.ts +87 -5
  35. package/dist/tools/submit-pull-request-review.d.ts +87 -3
  36. package/dist/tools/update-issue-comment.d.ts +87 -3
  37. package/dist/tools/update-issue.d.ts +106 -24
  38. package/dist/tools/update-pull-request-feedback.d.ts +87 -5
  39. package/dist/tools/update-pull-request.d.ts +109 -26
  40. package/dist/tools.d.ts +3 -3
  41. package/dist/webhooks/check-suite.d.ts +30 -3
  42. package/dist/webhooks/handler.d.ts +2 -0
  43. package/dist/webhooks/installation-requests.d.ts +8 -1
  44. package/dist/webhooks/merge-conflict.d.ts +7 -2
  45. package/dist/webhooks/pull-request-action.d.ts +37 -0
  46. package/migrations/0012_pull_request_next_action.sql +5 -0
  47. package/migrations/meta/0012_snapshot.json +434 -0
  48. package/migrations/meta/_journal.json +7 -0
  49. package/package.json +7 -2
  50. package/skills/github-code/SKILL.md +1 -1
  51. package/skills/github-code/SPEC.md +2 -2
  52. package/skills/github-code/references/workflow.md +1 -1
  53. package/dist/webhooks/pull-request-ready.d.ts +0 -31
  54. 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>;
@@ -1,8 +1,19 @@
1
1
  import { type ObjectAnnotation, type ObjectFacts } from "@sentry/junior-plugin-api";
2
2
  /**
3
- * Return the public images in a pull request body, in body order, for card
4
- * previews. Screenshots often come as a before and after pair, so the
5
- * dashboard chooses which one to show.
3
+ * Return where a description image is stored, or nothing when Junior does
4
+ * not serve it. The dashboard loads each one through the Junior image route:
5
+ * - `artifact`: Junior's own public artifacts, under `JUNIOR_BASE_URL`.
6
+ * - `attachment`: `github.com/user-attachments/assets/<id>` images. They
7
+ * need the GitHub App credential on private repositories, and GitHub
8
+ * redirects them to a short-lived signed URL. Junior never saves the
9
+ * signed `private-user-images.githubusercontent.com` URL, because it
10
+ * expires in minutes.
11
+ */
12
+ export declare function githubImageKind(url: URL): "artifact" | "attachment" | undefined;
13
+ /**
14
+ * Return the images in a pull request body that Junior serves, in body
15
+ * order, for card previews. Screenshots often come as a before and after
16
+ * pair, so the dashboard chooses which one to show.
6
17
  */
7
18
  export declare function githubPreviewImageUrls(body: string | null | undefined): string[];
8
19
  type CodeChangeFacts = Extract<ObjectFacts, {
@@ -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
  /**
@@ -1,2 +1,18 @@
1
- /** Linkify GitHub issue and pull request shorthand outside Markdown code. */
2
- export declare function linkifyGitHubReferences(text: string): string;
1
+ /**
2
+ * Linkify GitHub autolinked references outside Markdown code and links.
3
+ *
4
+ * `owner/repo#123`, `owner/repo@sha`, and GitHub issue, pull request,
5
+ * discussion, and commit URLs always become links. `#123`, `GH-123`,
6
+ * `user@sha`, and full SHAs need a repository: the one that the text names,
7
+ * else the `repo` config value when the text names none. `@login` becomes the
8
+ * `mention` of the known person with that GitHub login. Other logins become
9
+ * GitHub profile links when the text is GitHub text, or names a repository.
10
+ * Chat `@name` words are often people who are not GitHub accounts. Set
11
+ * `bareUrls` to keep bare URLs, where the place shows them as cards.
12
+ */
13
+ export declare function linkifyGitHubReferences(text: string, options?: {
14
+ bareUrls?: boolean;
15
+ config?: Record<string, string>;
16
+ githubText?: boolean;
17
+ mention?: (login: string) => string | undefined;
18
+ }): string;
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
  };
@@ -24,6 +24,13 @@ export declare function githubApi(egress: PluginEgress, input: {
24
24
  path: string;
25
25
  signal?: AbortSignal;
26
26
  }): Promise<GitHubApiResponse>;
27
+ /**
28
+ * Return where a `github.com` attachment URL redirects, through host
29
+ * egress. GitHub signs that address for a short time, so it needs no
30
+ * credential. Egress does not follow the redirect, so the credential never
31
+ * reaches the image host.
32
+ */
33
+ export declare function githubAttachmentLocation(egress: PluginEgress, url: string): Promise<string | undefined>;
27
34
  /** Return the `/repos/{owner}/{name}` API path prefix for a parsed repo. */
28
35
  export declare function repoPath(repo: {
29
36
  name: string;
@@ -0,0 +1,8 @@
1
+ import type { PluginToolDefinition } from "@sentry/junior-plugin-api";
2
+ /**
3
+ * Make every GitHub tool send GitHub text. The model reads Slack threads, so
4
+ * it can copy Slack mention syntax into a title, body, or comment. GitHub
5
+ * shows that syntax as literal text, so core rewrites it before the tool
6
+ * runs: a Slack user becomes their linked GitHub `@login`, or their name.
7
+ */
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
  }>;