@sentry/junior-github 0.298.0 → 0.299.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 (49) hide show
  1. package/dist/{chunk-OK6BNAGC.js → chunk-O74CQGTZ.js} +50 -20
  2. package/dist/credential-support.d.ts +7 -0
  3. package/dist/db/schema.d.ts +34 -0
  4. package/dist/events/pull-request.d.ts +8 -2
  5. package/dist/graphql-documents.d.ts +31 -0
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.js +1510 -771
  8. package/dist/object-facts.d.ts +16 -1
  9. package/dist/plugin.d.ts +3 -0
  10. package/dist/pull-request-outcomes/apply.d.ts +3 -1
  11. package/dist/pull-request-outcomes/reconcile.d.ts +10 -5
  12. package/dist/pull-request-outcomes/store.d.ts +5 -0
  13. package/dist/pull-request-requesters/draft-reviewers.d.ts +15 -0
  14. package/dist/testing.js +1 -1
  15. package/dist/tool-support/attribution.d.ts +4 -2
  16. package/dist/tool-support/pull-request-description.d.ts +8 -0
  17. package/dist/tools/clone-repository.d.ts +34 -2
  18. package/dist/tools/comment-on-issue.d.ts +34 -2
  19. package/dist/tools/comment-on-pull-request.d.ts +34 -2
  20. package/dist/tools/create-issue.d.ts +34 -2
  21. package/dist/tools/create-pull-request.d.ts +39 -4
  22. package/dist/tools/get-deployment.d.ts +34 -2
  23. package/dist/tools/get-issue.d.ts +34 -2
  24. package/dist/tools/get-pull-request.d.ts +54 -2
  25. package/dist/tools/get-release.d.ts +34 -2
  26. package/dist/tools/get-repository.d.ts +34 -2
  27. package/dist/tools/get-status.d.ts +34 -2
  28. package/dist/tools/react-to-issue.d.ts +34 -2
  29. package/dist/tools/resolve-pull-request-review-thread.d.ts +34 -2
  30. package/dist/tools/submit-pull-request-review.d.ts +34 -2
  31. package/dist/tools/update-issue-comment.d.ts +34 -2
  32. package/dist/tools/update-issue.d.ts +34 -2
  33. package/dist/tools/update-pull-request-feedback.d.ts +34 -4
  34. package/dist/tools/update-pull-request.d.ts +38 -4
  35. package/dist/tools.d.ts +10 -1
  36. package/dist/webhooks/check-suite.d.ts +2 -4
  37. package/dist/webhooks/fail-open-log.d.ts +10 -0
  38. package/dist/webhooks/handler.d.ts +1 -1
  39. package/dist/webhooks/installation-requests.d.ts +12 -1
  40. package/dist/webhooks/merge-conflict.d.ts +1 -1
  41. package/dist/webhooks/pull-request-preview.d.ts +12 -0
  42. package/dist/webhooks/pull-request-ready-reviewers.d.ts +25 -0
  43. package/dist/webhooks/pull-request-ready.d.ts +1 -1
  44. package/migrations/0011_pull_request_draft.sql +1 -0
  45. package/migrations/meta/0011_snapshot.json +434 -0
  46. package/migrations/meta/_journal.json +7 -0
  47. package/package.json +5 -2
  48. package/skills/github-code/SKILL.md +1 -1
  49. package/skills/github-code/SPEC.md +1 -1
@@ -1,3 +1,18 @@
1
- import type { ObjectAnnotation } from "@sentry/junior-plugin-api";
1
+ import { type ObjectAnnotation, type ObjectFacts } from "@sentry/junior-plugin-api";
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.
6
+ */
7
+ export declare function githubPreviewImageUrls(body: string | null | undefined): string[];
8
+ type CodeChangeFacts = Extract<ObjectFacts, {
9
+ type: "code_change";
10
+ }>;
11
+ /**
12
+ * Add preview images in body order while the facts stay in the 4 KiB limit.
13
+ * Images that do not fit are left out.
14
+ */
15
+ export declare function withGitHubPreviewImages(facts: Omit<CodeChangeFacts, "previewImageUrls">, urls: readonly string[]): CodeChangeFacts;
2
16
  /** Select card facts from GitHub REST responses; never infer reviews or checks. */
3
17
  export declare function githubObjectFacts(type: "task" | "code_change", response: unknown): Pick<ObjectAnnotation, "facts" | "sourceUpdatedAt" | "description">;
18
+ export {};
package/dist/plugin.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { type PluginRegistration } from "@sentry/junior-plugin-api";
2
2
  import { type GitHubAppPermissions } from "./permissions.js";
3
+ import { type GitHubPluginExperiments } from "./tools.js";
3
4
  import { type GitHubPullRequestEventOptions } from "./events/pull-request.js";
4
5
  /** Configure the built-in GitHub plugin manifest and hooks. */
5
6
  export interface GitHubPluginOptions {
@@ -23,6 +24,8 @@ export interface GitHubPluginOptions {
23
24
  appPermissions?: GitHubAppPermissions;
24
25
  /** Environment variable containing the GitHub App id. */
25
26
  appIdEnv?: string;
27
+ /** Opt-ins for GitHub plugin behavior that is still being tested. */
28
+ experimental?: GitHubPluginExperiments;
26
29
  /** Environment variable containing Junior's Git committer email. */
27
30
  botEmailEnv?: string;
28
31
  /** Environment variable containing Junior's Git committer name. */
@@ -3,9 +3,11 @@
3
3
  * the daily reconcile both use it, so the stored row, Junior's code index,
4
4
  * and the conversation chip change together.
5
5
  */
6
- import type { CodeChangePublisher, PluginConversationAnnotations, PluginLogger } from "@sentry/junior-plugin-api";
6
+ import type { CodeChangeInput, CodeChangePublisher, PluginConversationAnnotations, PluginLogger } from "@sentry/junior-plugin-api";
7
7
  import type { GitHubDb } from "../db/database.js";
8
8
  import { type GitHubPullRequestOutcomeInput, recordGitHubPullRequestOutcome } from "./store.js";
9
+ /** Write a pull request outcome as a code change in Junior's code index. */
10
+ export declare function githubCodeChange(outcome: GitHubPullRequestOutcomeInput, conversationIds: string[]): CodeChangeInput;
9
11
  /**
10
12
  * Record one pull request outcome. When the stored row changes, update the
11
13
  * code index, and mark the chip of each linked conversation merged or closed.
@@ -5,8 +5,10 @@
5
5
  * does not deliver a close, or its handler fails, the row stays open. Once a
6
6
  * day for each repository, the heartbeat reads the stored open rows from
7
7
  * GitHub with GraphQL. Each close goes through the webhook write path, with
8
- * its merged or closed_unmerged event. The write is guarded by `updatedAt`,
9
- * so a replay cannot move a newer row back.
8
+ * its merged or closed_unmerged event. A changed draft state of an open pull
9
+ * request goes through the same path, without an event. A pull request that
10
+ * is still open also gets its current title in the code index. The writes are
11
+ * guarded by `updatedAt`, so a replay cannot move a newer row back.
10
12
  */
11
13
  import type { CodeChangePublisher, EventPublisher, PluginConversationAnnotations, PluginLogger, PluginState } from "@sentry/junior-plugin-api";
12
14
  import type { GitHubDb } from "../db/database.js";
@@ -19,12 +21,15 @@ interface ReconcileArgs {
19
21
  events: EventPublisher;
20
22
  /** Read the commits of one pull request, for the people of a merge. */
21
23
  loadCommitPages(target: GitHubPullRequestTarget): Promise<GitHubCommitPageLoader>;
22
- /** Read the lifecycle of some pull requests with one GraphQL query. */
24
+ /**
25
+ * Read the lifecycle of some pull requests with one GraphQL query. Throws
26
+ * `GitHubRepositoryUnreachableError` when GitHub cannot reach the repository.
27
+ */
23
28
  loadLifecycles(input: {
24
29
  numbers: number[];
25
- repositoryFullName: string;
30
+ repositoryId: number;
26
31
  }): Promise<unknown>;
27
- log: Pick<PluginLogger, "error">;
32
+ log: Pick<PluginLogger, "error" | "warn">;
28
33
  nowMs: number;
29
34
  state: PluginState;
30
35
  }
@@ -8,6 +8,7 @@ declare const githubPullRequestOutcomeInputSchema: z.ZodObject<{
8
8
  junior_only: "junior_only";
9
9
  mixed: "mixed";
10
10
  }>>;
11
+ draft: z.ZodOptional<z.ZodBoolean>;
11
12
  mergedAt: z.ZodOptional<z.ZodDate>;
12
13
  number: z.ZodNumber;
13
14
  openedAt: z.ZodDate;
@@ -62,11 +63,15 @@ export declare function listGitHubFinishedWork(db: GitHubDb, conversationIds: st
62
63
  * GitHub.
63
64
  */
64
65
  export declare function listGitHubStaleOpenPullRequests(db: GitHubDb, before: Date): Promise<Array<{
66
+ draft: boolean;
65
67
  number: number;
66
68
  repositoryFullName: string;
69
+ repositoryId: string;
67
70
  }>>;
68
71
  /** Return candidate conversations linked to any Junior-owned pull request. */
69
72
  export declare function listGitHubAssignedWork(db: GitHubDb, conversationIds: string[]): Promise<string[]>;
73
+ /** Return the conversations linked to one Junior-owned pull request. */
74
+ export declare function readGitHubPullRequestConversationIds(db: GitHubDb, pullRequestId: string): Promise<string[]>;
70
75
  /** Append native conversation ids to an existing Junior-owned PR projection. */
71
76
  export declare function recordGitHubPullRequestConversations(db: GitHubDb, input: GitHubPullRequestConversationsInput): Promise<boolean>;
72
77
  /** Link an existing Junior-owned PR to tracked issues across repositories. */
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The reviewers that a person named for a draft pull request.
3
+ *
4
+ * Junior asks for a review when it opens a pull request. A draft gets no
5
+ * request, so GitHub does not notify the reviewers before the work is ready.
6
+ * When the person named the reviewers, Junior saves them here, and the
7
+ * `ready_for_review` webhook asks them. With no saved reviewers, that webhook
8
+ * asks the requester.
9
+ */
10
+ import type { PluginState } from "@sentry/junior-plugin-api";
11
+ import type { GitHubPullRequestTarget } from "../webhooks/pull-request-people.js";
12
+ /** Save the reviewers that a person named for a draft pull request. */
13
+ export declare function saveGitHubDraftReviewers(state: PluginState, target: GitHubPullRequestTarget, reviewers: string[]): Promise<void>;
14
+ /** Return the reviewers that a person named for a draft pull request. */
15
+ export declare function readGitHubDraftReviewers(state: PluginState, target: GitHubPullRequestTarget): Promise<string[] | undefined>;
package/dist/testing.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeGitHubEvents
3
- } from "./chunk-OK6BNAGC.js";
3
+ } from "./chunk-O74CQGTZ.js";
4
4
  export {
5
5
  normalizeGitHubEvents
6
6
  };
@@ -1,11 +1,13 @@
1
1
  import type { Actor, Identity, PluginEgress, PluginLogger, Source, User } from "@sentry/junior-plugin-api";
2
2
  export declare const GITHUB_REQUEST_ATTRIBUTION_START = "<!-- junior-request-attribution:start -->";
3
3
  export declare const GITHUB_REQUEST_ATTRIBUTION_END = "<!-- junior-request-attribution:end -->";
4
+ /** Return a GitHub login without a leading `@`, when it is a valid login. */
5
+ export declare function parseGitHubLogin(value: string | undefined): string | undefined;
4
6
  /**
5
7
  * Return the GitHub login linked to a user, when it is a valid login.
6
8
  *
7
- * Attribution mentions and PR assignment use this login so the requester gets
8
- * GitHub notifications for the issue or pull request.
9
+ * Attribution mentions, PR assignment, and review requests use this login so
10
+ * the requester gets GitHub notifications for the issue or pull request.
9
11
  */
10
12
  export declare function linkedGitHubLogin(user: User | undefined): string | undefined;
11
13
  /**
@@ -0,0 +1,8 @@
1
+ import { type PluginDecider } from "@sentry/junior-plugin-api";
2
+ /** List the fixes that a pull request description needs. Empty means it passes. */
3
+ export declare function pullRequestDescriptionFixes(decider: PluginDecider, body: string): Promise<string[]>;
4
+ /**
5
+ * Reject a pull request description that has what reviewers do not need.
6
+ * The agent gets the reasons as a tool input error and sends a better body.
7
+ */
8
+ export declare function checkPullRequestDescription(decider: PluginDecider, body: string): Promise<void>;
@@ -13,7 +13,7 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
13
13
  kind: "object";
14
14
  key: string;
15
15
  label: string;
16
- objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
16
+ objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
17
17
  title: string;
18
18
  url: string | null;
19
19
  description?: string | undefined;
@@ -38,6 +38,7 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
38
38
  changedFiles?: number | undefined;
39
39
  additions?: number | undefined;
40
40
  deletions?: number | undefined;
41
+ previewImageUrls?: string[] | undefined;
41
42
  } | {
42
43
  type: "task";
43
44
  assignees?: string[] | undefined;
@@ -56,6 +57,21 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
56
57
  type: "calendar_event";
57
58
  when?: string | undefined;
58
59
  attendees?: string[] | undefined;
60
+ } | {
61
+ type: "conversation";
62
+ participants?: string[] | undefined;
63
+ lastActivityAt?: string | undefined;
64
+ } | {
65
+ type: "message";
66
+ channel?: string | undefined;
67
+ author?: string | undefined;
68
+ sentAt?: string | undefined;
69
+ } | {
70
+ type: "person";
71
+ email?: string | undefined;
72
+ slackHandle?: string | undefined;
73
+ githubHandle?: string | undefined;
74
+ avatarUrl?: string | undefined;
59
75
  } | undefined;
60
76
  }[] | undefined;
61
77
  reply?: {
@@ -76,7 +92,7 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
76
92
  kind: "object";
77
93
  key: string;
78
94
  label: string;
79
- objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
95
+ objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
80
96
  title: string;
81
97
  url: string | null;
82
98
  description?: string | undefined;
@@ -101,6 +117,7 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
101
117
  changedFiles?: number | undefined;
102
118
  additions?: number | undefined;
103
119
  deletions?: number | undefined;
120
+ previewImageUrls?: string[] | undefined;
104
121
  } | {
105
122
  type: "task";
106
123
  assignees?: string[] | undefined;
@@ -119,6 +136,21 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
119
136
  type: "calendar_event";
120
137
  when?: string | undefined;
121
138
  attendees?: string[] | undefined;
139
+ } | {
140
+ type: "conversation";
141
+ participants?: string[] | undefined;
142
+ lastActivityAt?: string | undefined;
143
+ } | {
144
+ type: "message";
145
+ channel?: string | undefined;
146
+ author?: string | undefined;
147
+ sentAt?: string | undefined;
148
+ } | {
149
+ type: "person";
150
+ email?: string | undefined;
151
+ slackHandle?: string | undefined;
152
+ githubHandle?: string | undefined;
153
+ avatarUrl?: string | undefined;
122
154
  } | undefined;
123
155
  }[] | undefined;
124
156
  reply?: {
@@ -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" | "deployment" | "item" | "task";
13
+ objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
14
14
  title: string;
15
15
  url: string | null;
16
16
  description?: string | undefined;
@@ -35,6 +35,7 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
35
35
  changedFiles?: number | undefined;
36
36
  additions?: number | undefined;
37
37
  deletions?: number | undefined;
38
+ previewImageUrls?: string[] | undefined;
38
39
  } | {
39
40
  type: "task";
40
41
  assignees?: string[] | undefined;
@@ -53,6 +54,21 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
53
54
  type: "calendar_event";
54
55
  when?: string | undefined;
55
56
  attendees?: string[] | undefined;
57
+ } | {
58
+ type: "conversation";
59
+ participants?: string[] | undefined;
60
+ lastActivityAt?: string | undefined;
61
+ } | {
62
+ type: "message";
63
+ channel?: string | undefined;
64
+ author?: string | undefined;
65
+ sentAt?: string | undefined;
66
+ } | {
67
+ type: "person";
68
+ email?: string | undefined;
69
+ slackHandle?: string | undefined;
70
+ githubHandle?: string | undefined;
71
+ avatarUrl?: string | undefined;
56
72
  } | undefined;
57
73
  }[] | undefined;
58
74
  reply?: {
@@ -75,7 +91,7 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
75
91
  kind: "object";
76
92
  key: string;
77
93
  label: string;
78
- objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
94
+ objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
79
95
  title: string;
80
96
  url: string | null;
81
97
  description?: string | undefined;
@@ -100,6 +116,7 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
100
116
  changedFiles?: number | undefined;
101
117
  additions?: number | undefined;
102
118
  deletions?: number | undefined;
119
+ previewImageUrls?: string[] | undefined;
103
120
  } | {
104
121
  type: "task";
105
122
  assignees?: string[] | undefined;
@@ -118,6 +135,21 @@ export declare function createGitHubCommentOnIssueTool(egress: PluginEgress): im
118
135
  type: "calendar_event";
119
136
  when?: string | undefined;
120
137
  attendees?: string[] | undefined;
138
+ } | {
139
+ type: "conversation";
140
+ participants?: string[] | undefined;
141
+ lastActivityAt?: string | undefined;
142
+ } | {
143
+ type: "message";
144
+ channel?: string | undefined;
145
+ author?: string | undefined;
146
+ sentAt?: string | undefined;
147
+ } | {
148
+ type: "person";
149
+ email?: string | undefined;
150
+ slackHandle?: string | undefined;
151
+ githubHandle?: string | undefined;
152
+ avatarUrl?: string | undefined;
121
153
  } | undefined;
122
154
  }[] | undefined;
123
155
  reply?: {
@@ -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" | "deployment" | "item" | "task";
18
+ objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
19
19
  title: string;
20
20
  url: string | null;
21
21
  description?: string | undefined;
@@ -40,6 +40,7 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
40
40
  changedFiles?: number | undefined;
41
41
  additions?: number | undefined;
42
42
  deletions?: number | undefined;
43
+ previewImageUrls?: string[] | undefined;
43
44
  } | {
44
45
  type: "task";
45
46
  assignees?: string[] | undefined;
@@ -58,6 +59,21 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
58
59
  type: "calendar_event";
59
60
  when?: string | undefined;
60
61
  attendees?: string[] | undefined;
62
+ } | {
63
+ type: "conversation";
64
+ participants?: string[] | undefined;
65
+ lastActivityAt?: string | undefined;
66
+ } | {
67
+ type: "message";
68
+ channel?: string | undefined;
69
+ author?: string | undefined;
70
+ sentAt?: string | undefined;
71
+ } | {
72
+ type: "person";
73
+ email?: string | undefined;
74
+ slackHandle?: string | undefined;
75
+ githubHandle?: string | undefined;
76
+ avatarUrl?: string | undefined;
61
77
  } | undefined;
62
78
  }[] | undefined;
63
79
  reply?: {
@@ -80,7 +96,7 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
80
96
  kind: "object";
81
97
  key: string;
82
98
  label: string;
83
- objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
99
+ objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
84
100
  title: string;
85
101
  url: string | null;
86
102
  description?: string | undefined;
@@ -105,6 +121,7 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
105
121
  changedFiles?: number | undefined;
106
122
  additions?: number | undefined;
107
123
  deletions?: number | undefined;
124
+ previewImageUrls?: string[] | undefined;
108
125
  } | {
109
126
  type: "task";
110
127
  assignees?: string[] | undefined;
@@ -123,6 +140,21 @@ export declare function createGitHubCommentOnPullRequestTool(egress: PluginEgres
123
140
  type: "calendar_event";
124
141
  when?: string | undefined;
125
142
  attendees?: string[] | undefined;
143
+ } | {
144
+ type: "conversation";
145
+ participants?: string[] | undefined;
146
+ lastActivityAt?: string | undefined;
147
+ } | {
148
+ type: "message";
149
+ channel?: string | undefined;
150
+ author?: string | undefined;
151
+ sentAt?: string | undefined;
152
+ } | {
153
+ type: "person";
154
+ email?: string | undefined;
155
+ slackHandle?: string | undefined;
156
+ githubHandle?: string | undefined;
157
+ avatarUrl?: string | undefined;
126
158
  } | undefined;
127
159
  }[] | undefined;
128
160
  reply?: {
@@ -10,7 +10,7 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
10
10
  kind: "object";
11
11
  key: string;
12
12
  label: string;
13
- objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
13
+ objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
14
14
  title: string;
15
15
  url: string | null;
16
16
  description?: string | undefined;
@@ -35,6 +35,7 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
35
35
  changedFiles?: number | undefined;
36
36
  additions?: number | undefined;
37
37
  deletions?: number | undefined;
38
+ previewImageUrls?: string[] | undefined;
38
39
  } | {
39
40
  type: "task";
40
41
  assignees?: string[] | undefined;
@@ -53,6 +54,21 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
53
54
  type: "calendar_event";
54
55
  when?: string | undefined;
55
56
  attendees?: string[] | undefined;
57
+ } | {
58
+ type: "conversation";
59
+ participants?: string[] | undefined;
60
+ lastActivityAt?: string | undefined;
61
+ } | {
62
+ type: "message";
63
+ channel?: string | undefined;
64
+ author?: string | undefined;
65
+ sentAt?: string | undefined;
66
+ } | {
67
+ type: "person";
68
+ email?: string | undefined;
69
+ slackHandle?: string | undefined;
70
+ githubHandle?: string | undefined;
71
+ avatarUrl?: string | undefined;
56
72
  } | undefined;
57
73
  }[] | undefined;
58
74
  reply?: {
@@ -81,7 +97,7 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
81
97
  kind: "object";
82
98
  key: string;
83
99
  label: string;
84
- objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
100
+ objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
85
101
  title: string;
86
102
  url: string | null;
87
103
  description?: string | undefined;
@@ -106,6 +122,7 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
106
122
  changedFiles?: number | undefined;
107
123
  additions?: number | undefined;
108
124
  deletions?: number | undefined;
125
+ previewImageUrls?: string[] | undefined;
109
126
  } | {
110
127
  type: "task";
111
128
  assignees?: string[] | undefined;
@@ -124,6 +141,21 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
124
141
  type: "calendar_event";
125
142
  when?: string | undefined;
126
143
  attendees?: string[] | undefined;
144
+ } | {
145
+ type: "conversation";
146
+ participants?: string[] | undefined;
147
+ lastActivityAt?: string | undefined;
148
+ } | {
149
+ type: "message";
150
+ channel?: string | undefined;
151
+ author?: string | undefined;
152
+ sentAt?: string | undefined;
153
+ } | {
154
+ type: "person";
155
+ email?: string | undefined;
156
+ slackHandle?: string | undefined;
157
+ githubHandle?: string | undefined;
158
+ avatarUrl?: string | undefined;
127
159
  } | undefined;
128
160
  }[] | undefined;
129
161
  reply?: {
@@ -1,19 +1,22 @@
1
- import { type ToolRegistrationHookContext } from "@sentry/junior-plugin-api";
1
+ import { type PluginDecider, type ToolRegistrationHookContext } from "@sentry/junior-plugin-api";
2
2
  import { type GitHubPullRequestSubscriptionConfig } from "../events/pull-request.js";
3
3
  /** Own PR creation so provider writes use host egress and the footer stays deterministic. */
4
- export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookContext, subscriptionConfig?: GitHubPullRequestSubscriptionConfig): import("@sentry/junior-plugin-api").PluginToolDefinition<{
4
+ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookContext, subscriptionConfig?: GitHubPullRequestSubscriptionConfig,
5
+ /** Set when the description check experiment is on. */
6
+ descriptionDecider?: PluginDecider): import("@sentry/junior-plugin-api").PluginToolDefinition<{
5
7
  repo: string;
6
8
  title: string;
7
9
  head: string;
8
10
  base: string;
9
11
  body?: string | undefined;
10
12
  draft?: boolean | undefined;
13
+ reviewers?: string[] | undefined;
11
14
  }, {
12
15
  objectAnnotations?: {
13
16
  kind: "object";
14
17
  key: string;
15
18
  label: string;
16
- objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
19
+ objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
17
20
  title: string;
18
21
  url: string | null;
19
22
  description?: string | undefined;
@@ -38,6 +41,7 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
38
41
  changedFiles?: number | undefined;
39
42
  additions?: number | undefined;
40
43
  deletions?: number | undefined;
44
+ previewImageUrls?: string[] | undefined;
41
45
  } | {
42
46
  type: "task";
43
47
  assignees?: string[] | undefined;
@@ -56,6 +60,21 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
56
60
  type: "calendar_event";
57
61
  when?: string | undefined;
58
62
  attendees?: string[] | undefined;
63
+ } | {
64
+ type: "conversation";
65
+ participants?: string[] | undefined;
66
+ lastActivityAt?: string | undefined;
67
+ } | {
68
+ type: "message";
69
+ channel?: string | undefined;
70
+ author?: string | undefined;
71
+ sentAt?: string | undefined;
72
+ } | {
73
+ type: "person";
74
+ email?: string | undefined;
75
+ slackHandle?: string | undefined;
76
+ githubHandle?: string | undefined;
77
+ avatarUrl?: string | undefined;
59
78
  } | undefined;
60
79
  }[] | undefined;
61
80
  reply?: {
@@ -92,7 +111,7 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
92
111
  kind: "object";
93
112
  key: string;
94
113
  label: string;
95
- objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
114
+ objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
96
115
  title: string;
97
116
  url: string | null;
98
117
  description?: string | undefined;
@@ -117,6 +136,7 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
117
136
  changedFiles?: number | undefined;
118
137
  additions?: number | undefined;
119
138
  deletions?: number | undefined;
139
+ previewImageUrls?: string[] | undefined;
120
140
  } | {
121
141
  type: "task";
122
142
  assignees?: string[] | undefined;
@@ -135,6 +155,21 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
135
155
  type: "calendar_event";
136
156
  when?: string | undefined;
137
157
  attendees?: string[] | undefined;
158
+ } | {
159
+ type: "conversation";
160
+ participants?: string[] | undefined;
161
+ lastActivityAt?: string | undefined;
162
+ } | {
163
+ type: "message";
164
+ channel?: string | undefined;
165
+ author?: string | undefined;
166
+ sentAt?: string | undefined;
167
+ } | {
168
+ type: "person";
169
+ email?: string | undefined;
170
+ slackHandle?: string | undefined;
171
+ githubHandle?: string | undefined;
172
+ avatarUrl?: string | undefined;
138
173
  } | undefined;
139
174
  }[] | undefined;
140
175
  reply?: {
@@ -14,7 +14,7 @@ export declare function createGitHubGetDeploymentTool(ctx: {
14
14
  kind: "object";
15
15
  key: string;
16
16
  label: string;
17
- objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
17
+ objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
18
18
  title: string;
19
19
  url: string | null;
20
20
  description?: string | undefined;
@@ -39,6 +39,7 @@ export declare function createGitHubGetDeploymentTool(ctx: {
39
39
  changedFiles?: number | undefined;
40
40
  additions?: number | undefined;
41
41
  deletions?: number | undefined;
42
+ previewImageUrls?: string[] | undefined;
42
43
  } | {
43
44
  type: "task";
44
45
  assignees?: string[] | undefined;
@@ -57,6 +58,21 @@ export declare function createGitHubGetDeploymentTool(ctx: {
57
58
  type: "calendar_event";
58
59
  when?: string | undefined;
59
60
  attendees?: string[] | undefined;
61
+ } | {
62
+ type: "conversation";
63
+ participants?: string[] | undefined;
64
+ lastActivityAt?: string | undefined;
65
+ } | {
66
+ type: "message";
67
+ channel?: string | undefined;
68
+ author?: string | undefined;
69
+ sentAt?: string | undefined;
70
+ } | {
71
+ type: "person";
72
+ email?: string | undefined;
73
+ slackHandle?: string | undefined;
74
+ githubHandle?: string | undefined;
75
+ avatarUrl?: string | undefined;
60
76
  } | undefined;
61
77
  }[] | undefined;
62
78
  reply?: {
@@ -106,7 +122,7 @@ export declare function createGitHubGetDeploymentTool(ctx: {
106
122
  kind: "object";
107
123
  key: string;
108
124
  label: string;
109
- objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
125
+ objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
110
126
  title: string;
111
127
  url: string | null;
112
128
  description?: string | undefined;
@@ -131,6 +147,7 @@ export declare function createGitHubGetDeploymentTool(ctx: {
131
147
  changedFiles?: number | undefined;
132
148
  additions?: number | undefined;
133
149
  deletions?: number | undefined;
150
+ previewImageUrls?: string[] | undefined;
134
151
  } | {
135
152
  type: "task";
136
153
  assignees?: string[] | undefined;
@@ -149,6 +166,21 @@ export declare function createGitHubGetDeploymentTool(ctx: {
149
166
  type: "calendar_event";
150
167
  when?: string | undefined;
151
168
  attendees?: string[] | undefined;
169
+ } | {
170
+ type: "conversation";
171
+ participants?: string[] | undefined;
172
+ lastActivityAt?: string | undefined;
173
+ } | {
174
+ type: "message";
175
+ channel?: string | undefined;
176
+ author?: string | undefined;
177
+ sentAt?: string | undefined;
178
+ } | {
179
+ type: "person";
180
+ email?: string | undefined;
181
+ slackHandle?: string | undefined;
182
+ githubHandle?: string | undefined;
183
+ avatarUrl?: string | undefined;
152
184
  } | undefined;
153
185
  }[] | undefined;
154
186
  reply?: {