@sentry/junior-plugin-api 0.161.0 → 0.163.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.
@@ -48,6 +48,7 @@ export declare const conversationSidebarIconSchema: z.ZodEnum<{
48
48
  "circle-dashed": "circle-dashed";
49
49
  "circle-x": "circle-x";
50
50
  "git-merge": "git-merge";
51
+ "git-pull-request": "git-pull-request";
51
52
  "triangle-alert": "triangle-alert";
52
53
  }>;
53
54
  export declare const conversationSidebarAnnotationSchema: z.ZodObject<{
@@ -56,6 +57,7 @@ export declare const conversationSidebarAnnotationSchema: z.ZodObject<{
56
57
  "circle-dashed": "circle-dashed";
57
58
  "circle-x": "circle-x";
58
59
  "git-merge": "git-merge";
60
+ "git-pull-request": "git-pull-request";
59
61
  "triangle-alert": "triangle-alert";
60
62
  }>>;
61
63
  key: z.ZodString;
@@ -68,5 +70,6 @@ export interface ConversationSidebarHookContext extends PluginContext {
68
70
  conversationIds: string[];
69
71
  }
70
72
  export interface ConversationSidebarResult {
73
+ /** Sidebar annotations in display order. Put the newest annotation first. */
71
74
  annotationsByConversationId: Record<string, ConversationSidebarAnnotation[]>;
72
75
  }
package/dist/hooks.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { ConversationSidebarHookContext, ConversationSidebarResult } from "./annotations";
2
2
  import type { EgressHookContext, EgressResponseHookContext, IssueCredentialHookContext, PluginCredentialResult, PluginGrant, PluginProviderAccount, ResolveOAuthAccountHookContext } from "./credentials";
3
3
  import type { HeartbeatHookContext, HeartbeatResult, OperationalReportHookContext, ProfileReportHookContext, ApiRouteRegistrationHookContext, PluginOperationalReportContent, PluginRoute, PluginRouteApp, RouteRegistrationHookContext, SlackConversationLink, SlackConversationLinkHookContext, UnfinishedWorkHookContext, UnfinishedWorkResult } from "./operations";
4
- import type { AfterMcpToolHookContext, BeforeToolExecuteHookContext, PluginToolDefinition, SandboxPrepareHookContext, ToolRegistrationHookContext } from "./tools";
4
+ import type { AfterMcpToolHookContext, BeforeToolExecuteHookContext, PluginToolDefinition, SandboxPrepareHookContext, ToolRegistrationHookContext, WorkspacePrepareHookContext } from "./tools";
5
5
  import type { PromptMessage, SystemPromptContext, UserPromptContext, UserPromptContribution } from "./prompt";
6
6
  /** Input for a pure Markdown rewrite before destination delivery formatting. */
7
7
  export interface FormatMarkdownHookContext {
@@ -35,6 +35,7 @@ export interface PluginHooks {
35
35
  resolveOAuthAccount?(ctx: ResolveOAuthAccountHookContext): Promise<PluginProviderAccount | undefined> | PluginProviderAccount | undefined;
36
36
  routes?(ctx: RouteRegistrationHookContext): PluginRoute[];
37
37
  sandboxPrepare?(ctx: SandboxPrepareHookContext): Promise<void> | void;
38
+ workspacePrepare?(ctx: WorkspacePrepareHookContext): Promise<void> | void;
38
39
  slackConversationLink?(ctx: SlackConversationLinkHookContext): SlackConversationLink | undefined;
39
40
  /** Pure Markdown rewrite. Emit ordinary Markdown only. */
40
41
  formatMarkdown?(ctx: FormatMarkdownHookContext): string;
package/dist/index.js CHANGED
@@ -24,6 +24,7 @@ var conversationSidebarIconSchema = z.enum([
24
24
  "circle-dashed",
25
25
  "circle-x",
26
26
  "git-merge",
27
+ "git-pull-request",
27
28
  "triangle-alert"
28
29
  ]);
29
30
  var conversationSidebarAnnotationSchema = z.object({
package/dist/tools.d.ts CHANGED
@@ -109,6 +109,14 @@ export interface PluginMcp {
109
109
  */
110
110
  prepare(): Promise<"authorization_pending" | "ready">;
111
111
  }
112
+ /** Provider-owned repository preparation for one Workspace snapshot build. */
113
+ export interface WorkspacePrepareHookContext extends PluginContext {
114
+ repos: Array<{
115
+ path: string;
116
+ repo: string;
117
+ }>;
118
+ sandbox: PluginSandbox;
119
+ }
112
120
  export interface SandboxPrepareHookContext extends PluginContext {
113
121
  actor?: Actor;
114
122
  sandbox: PluginSandbox;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-plugin-api",
3
- "version": "0.161.0",
3
+ "version": "0.163.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -51,6 +51,7 @@ export const conversationSidebarIconSchema = z.enum([
51
51
  "circle-dashed",
52
52
  "circle-x",
53
53
  "git-merge",
54
+ "git-pull-request",
54
55
  "triangle-alert",
55
56
  ]);
56
57
 
@@ -72,8 +73,6 @@ export interface ConversationSidebarHookContext extends PluginContext {
72
73
  }
73
74
 
74
75
  export interface ConversationSidebarResult {
75
- annotationsByConversationId: Record<
76
- string,
77
- ConversationSidebarAnnotation[]
78
- >;
76
+ /** Sidebar annotations in display order. Put the newest annotation first. */
77
+ annotationsByConversationId: Record<string, ConversationSidebarAnnotation[]>;
79
78
  }
package/src/hooks.ts CHANGED
@@ -32,6 +32,7 @@ import type {
32
32
  PluginToolDefinition,
33
33
  SandboxPrepareHookContext,
34
34
  ToolRegistrationHookContext,
35
+ WorkspacePrepareHookContext,
35
36
  } from "./tools";
36
37
  import type {
37
38
  PromptMessage,
@@ -105,6 +106,7 @@ export interface PluginHooks {
105
106
  | undefined;
106
107
  routes?(ctx: RouteRegistrationHookContext): PluginRoute[];
107
108
  sandboxPrepare?(ctx: SandboxPrepareHookContext): Promise<void> | void;
109
+ workspacePrepare?(ctx: WorkspacePrepareHookContext): Promise<void> | void;
108
110
  slackConversationLink?(
109
111
  ctx: SlackConversationLinkHookContext,
110
112
  ): SlackConversationLink | undefined;
package/src/tools.ts CHANGED
@@ -140,6 +140,15 @@ export interface PluginMcp {
140
140
  prepare(): Promise<"authorization_pending" | "ready">;
141
141
  }
142
142
 
143
+ /** Provider-owned repository preparation for one Workspace snapshot build. */
144
+ export interface WorkspacePrepareHookContext extends PluginContext {
145
+ repos: Array<{
146
+ path: string;
147
+ repo: string;
148
+ }>;
149
+ sandbox: PluginSandbox;
150
+ }
151
+
143
152
  export interface SandboxPrepareHookContext extends PluginContext {
144
153
  actor?: Actor;
145
154
  sandbox: PluginSandbox;