@sentry/junior-plugin-api 0.249.0 → 0.250.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +29 -1
- package/dist/index.js +11 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1135,6 +1135,17 @@ declare const watchResultSchema: z.ZodObject<{
|
|
|
1135
1135
|
id: z.ZodString;
|
|
1136
1136
|
}, z.core.$strict>;
|
|
1137
1137
|
type WatchResult = z.output<typeof watchResultSchema>;
|
|
1138
|
+
/**
|
|
1139
|
+
* One person involved in an Event, named by a provider identity or an email.
|
|
1140
|
+
* Core resolves linked people to mentions. It drops people it cannot resolve.
|
|
1141
|
+
*/
|
|
1142
|
+
declare const eventPersonSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1143
|
+
provider: z.ZodString;
|
|
1144
|
+
handle: z.ZodString;
|
|
1145
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1146
|
+
email: z.ZodString;
|
|
1147
|
+
}, z.core.$strict>]>;
|
|
1148
|
+
type EventPerson = z.output<typeof eventPersonSchema>;
|
|
1138
1149
|
declare const eventInputSchema: z.ZodObject<{
|
|
1139
1150
|
objectType: z.ZodOptional<z.ZodEnum<{
|
|
1140
1151
|
code_change: "code_change";
|
|
@@ -1152,6 +1163,12 @@ declare const eventInputSchema: z.ZodObject<{
|
|
|
1152
1163
|
trustedSummary: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1153
1164
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1154
1165
|
untrustedText: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1166
|
+
people: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1167
|
+
provider: z.ZodString;
|
|
1168
|
+
handle: z.ZodString;
|
|
1169
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1170
|
+
email: z.ZodString;
|
|
1171
|
+
}, z.core.$strict>]>>>;
|
|
1155
1172
|
}, z.core.$strict>;
|
|
1156
1173
|
type EventData = z.output<typeof eventDataSchema>;
|
|
1157
1174
|
type EventInput = z.output<typeof eventInputSchema>;
|
|
@@ -1172,6 +1189,12 @@ declare const eventSchema: z.ZodObject<{
|
|
|
1172
1189
|
trustedSummary: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1173
1190
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1174
1191
|
untrustedText: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1192
|
+
people: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1193
|
+
provider: z.ZodString;
|
|
1194
|
+
handle: z.ZodString;
|
|
1195
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1196
|
+
email: z.ZodString;
|
|
1197
|
+
}, z.core.$strict>]>>>;
|
|
1175
1198
|
namespace: z.ZodString;
|
|
1176
1199
|
}, z.core.$strict>;
|
|
1177
1200
|
type Event = z.output<typeof eventSchema>;
|
|
@@ -2140,6 +2163,11 @@ interface PluginEventToolContext {
|
|
|
2140
2163
|
events: string[];
|
|
2141
2164
|
intent: string;
|
|
2142
2165
|
resource: SubscribableResource;
|
|
2166
|
+
/**
|
|
2167
|
+
* Guidance for this Watch only, by event type. Core adds it after the
|
|
2168
|
+
* resource type guidance when a matching Event arrives.
|
|
2169
|
+
*/
|
|
2170
|
+
guidance?: Partial<Record<string, string>>;
|
|
2143
2171
|
}): Promise<WatchResult>;
|
|
2144
2172
|
}
|
|
2145
2173
|
interface PluginWorkspaceToolContext {
|
|
@@ -2513,4 +2541,4 @@ interface PluginRegistration extends PluginRegistrationInput {
|
|
|
2513
2541
|
/** Define one Junior plugin registration for app and build-time wiring. */
|
|
2514
2542
|
declare function defineJuniorPlugin(plugin: PluginRegistrationInput): PluginRegistration;
|
|
2515
2543
|
|
|
2516
|
-
export { type Actor, type AfterMcpToolHookContext, type AgentInvocationSource, type ApiRouteRegistrationHookContext, type BeforeToolExecuteHookContext, type CodeChangeInput, type CodeChangePublisher, type CodeChangeState, type ConversationAnnotation, type ConversationAnnotationInput, type ConversationEventPresentation, type ConversationSidebarAnnotation, type ConversationSidebarHookContext, type ConversationSidebarResult, type DefinedConversationEvent, type Destination, type DestinationVisibility, type Dispatch, type DispatchOptions, type DispatchResult, EVENT_DATA_MAX_JSON_BYTES, EVENT_DATA_MAX_KEYS, EVENT_GUIDANCE_MAX_LENGTH, EVENT_SUMMARY_MAX_LENGTH, EVENT_TEXT_MAX_LENGTH, EgressAuthRequired, type EgressHookContext, EgressPolicyDenied, type EgressResponseHookContext, type Event, type EventAutomationSource, type EventData, type EventInput, type EventInvocationContext, type EventMatch, type EventMatchFields, type EventPublisher, type EventSource, type FormatMarkdownHookContext, type HeartbeatHookContext, type HeartbeatResult, type Identity, type InvocationContext, type IssueCredentialHookContext, type LocalActor, type LocalDestination, type LocalInvocationContext, type LocalSource, type Location, type ObjectAnnotation, type ObjectFacts, type ObjectIconName, type ObjectTone, type ObjectType, type OperationalReportHookContext, type OwnedObjectAnnotation, type Platform, type PluginAnnotations, type PluginApiRouteRequestContext, type PluginAuthorization, type PluginCliActionCommand, type PluginCliActionContext, type PluginCliActionHandler, type PluginCliCommandDefinition, type PluginCliDefinition, type PluginCliHost, type PluginCliIo, type PluginContext, type PluginConversationAnnotations, type PluginConversationEventCostDay, type PluginConversationEventDefinition, type PluginConversationEventReader, type PluginConversationEventRecord, type PluginConversationEventStats, type PluginConversationEventValue, type PluginConversationEvents, type PluginCredentialActor, type PluginCredentialHeaderTransform, type PluginCredentialLease, type PluginCredentialResult, type PluginCredentialSubject, type PluginCredentials, type PluginDecision, type PluginDispatchSource, type PluginEgress, type PluginEgressRequest, type PluginEgressResponse, type PluginEmbedder, type PluginEnv, type PluginEnvVarDeclaration, type PluginEventToolContext, type PluginEventType, type PluginEvents, type PluginGrant, type PluginGrantAccess, type PluginHooks, type PluginLogger, type PluginManifest, type PluginMcp, type PluginMcpAuthConfig, type PluginMcpAuthorizationPending, type PluginMcpConfig, type PluginMcpContent, type PluginMcpOAuthClientConfig, type PluginMcpToolError, type PluginMcpToolResult, type PluginMcpToolSuccess, type PluginMetadata, type PluginModel, type PluginModelConfig, type PluginNpmRuntimeDependency, type PluginOAuthBearerCredentials, type PluginOAuthConfig, type PluginOperationalBarChartWidget, type PluginOperationalChartCategory, type PluginOperationalChartSeries, type PluginOperationalField, type PluginOperationalMetric, type PluginOperationalRecord, type PluginOperationalRecordSet, type PluginOperationalReport, type PluginOperationalReportContent, type PluginOperationalTone, type PluginProviderAccount, type PluginReadState, type PluginRegistration, type PluginRegistrationInput, type PluginResolvedCredentialUser, type PluginRoute, type PluginRouteApp, type PluginRouteHandler, type PluginRouteMethod, type PluginRunContext, type PluginRunTranscriptEntry, type PluginRunTranscriptProvenance, type PluginRuntimeDependency, type PluginRuntimePostinstallCommand, type PluginSandbox, type PluginState, type PluginStoredTokens, type PluginSystemRuntimeDependency, type PluginSystemRuntimeDependencyFromUrl, type PluginTaskContext, type PluginTaskDefinition, type PluginTasks, type PluginTokenStore, type PluginToolContent, type PluginToolDefinition, type PluginToolExecute, type PluginToolExecuteOptions, PluginToolInputError, type PluginToolOutput, type PluginToolOutputEnvelope, type PluginUserPageContent, type PluginUserPageContext, type PluginUserPageDefinition, type PluginUserPageInput, type PluginUserPageLink, type PluginUserTokenSlot, type PluginWorkspaceToolContext, type ProfileReportHookContext, type PromptContext, type PromptContextContribution, type PromptMessage, REQUIRED_TOOL_ANNOTATION_KEYS, type ReplyAttribution, type RequiredToolAnnotationKey, type ResolveOAuthAccountHookContext, type RouteRegistrationHookContext, type SandboxPrepareHookContext, type ScheduledAutomationSource, type SlackActor, type SlackConversationLink, type SlackConversationLinkHookContext, type SlackDestination, type SlackInvocationContext, type SlackLocation, type SlackSource, type SlackToolRegistrationHookContext, type Source, type SourceVisibility, type SubscribableResource, type SystemActor, type SystemPromptContext, type TaskOutcome, type ToolAnnotations, type ToolApprovalMetadata, type ToolApprovalMode, type ToolExposure, type ToolRegistrationHookContext, type UnfinishedWorkHookContext, type UnfinishedWorkResult, type User, type UserPromptContext, type UserPromptContribution, type WatchResult, type WebActor, type WebInvocationContext, type WebSource, type WorkspaceFinalize, type WorkspacePrepareHookContext, actorSchema, actorUserIdSchema, agentInvocationSourceSchema, codeChangeInputSchema, codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventIconSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, conversationSidebarIconSchema, createEventSource, createLocalSource, createSlackSource, createWebSource, defineConversationEvent, defineJuniorPlugin, definePluginTool, definePromptContext, destinationSchema, destinationVisibilitySchema, dispatchOptionsSchema, enforceEgressPolicy, eventAutomationSourceSchema, eventDataSchema, eventIdentifierSchema, eventInputSchema, eventMatchFieldSchema, eventMatchFieldsSchema, eventMatchSchema, eventMatches, eventSchema, eventSourceSchema, eventTypeSchema, getSourceKey, identitySchema, isPrivateSource, isSlackDestination, localActorSchema, localDestinationSchema, localSourceSchema, locationSchema, missingToolAnnotationKeys, nonBlankStringSchema, normalizeEventIdentifier, objectAnnotationSchema, objectFactFields, objectFactsSchema, objectIconPath, objectIconPaths, objectPresentation, objectTypeSchema, ownedObjectAnnotationSchema, platformSchema, pluginApiRouteRequestContextSchema, pluginAuthorizationSchema, pluginCredentialHeaderTransformSchema, pluginCredentialLeaseSchema, pluginCredentialResultSchema, pluginCredentialSubjectSchema, pluginDispatchSourceSchema, pluginEventTypeSchema, pluginEventsSchema, pluginGrantSchema, pluginProviderAccountSchema, pluginRunContextSchema, pluginRunTranscriptEntrySchema, pluginRunTranscriptProvenanceSchema, pluginStoredTokensSchema, pluginToolContentSchema, pluginToolContinuationSchema, pluginToolOutputSchema, pluginUserPageContentSchema, pluginUserPageCursorSchema, pluginUserPageFilterSchema, pluginUserPageInputSchema, pluginUserPageLinkSchema, pluginUserPageLinksSchema, pluginUserPageQuerySchema, promptContextSchema, promptMessageSchema, replyAttributionSchema, resourceLinkAnnotationSchema, resourceTypeSchema, scheduledAutomationSourceSchema, slackActorSchema, slackDestinationSchema, slackLocationSchema, slackSourceSchema, sourceSchema, sourceVisibilitySchema, stableEventMatchKey, subscribableResourceSchema, systemActorSchema, taskOutcomeSchema, toolApprovalModeSchema, userSchema, watchResultSchema, webActorSchema, webSourceSchema, zodTool };
|
|
2544
|
+
export { type Actor, type AfterMcpToolHookContext, type AgentInvocationSource, type ApiRouteRegistrationHookContext, type BeforeToolExecuteHookContext, type CodeChangeInput, type CodeChangePublisher, type CodeChangeState, type ConversationAnnotation, type ConversationAnnotationInput, type ConversationEventPresentation, type ConversationSidebarAnnotation, type ConversationSidebarHookContext, type ConversationSidebarResult, type DefinedConversationEvent, type Destination, type DestinationVisibility, type Dispatch, type DispatchOptions, type DispatchResult, EVENT_DATA_MAX_JSON_BYTES, EVENT_DATA_MAX_KEYS, EVENT_GUIDANCE_MAX_LENGTH, EVENT_SUMMARY_MAX_LENGTH, EVENT_TEXT_MAX_LENGTH, EgressAuthRequired, type EgressHookContext, EgressPolicyDenied, type EgressResponseHookContext, type Event, type EventAutomationSource, type EventData, type EventInput, type EventInvocationContext, type EventMatch, type EventMatchFields, type EventPerson, type EventPublisher, type EventSource, type FormatMarkdownHookContext, type HeartbeatHookContext, type HeartbeatResult, type Identity, type InvocationContext, type IssueCredentialHookContext, type LocalActor, type LocalDestination, type LocalInvocationContext, type LocalSource, type Location, type ObjectAnnotation, type ObjectFacts, type ObjectIconName, type ObjectTone, type ObjectType, type OperationalReportHookContext, type OwnedObjectAnnotation, type Platform, type PluginAnnotations, type PluginApiRouteRequestContext, type PluginAuthorization, type PluginCliActionCommand, type PluginCliActionContext, type PluginCliActionHandler, type PluginCliCommandDefinition, type PluginCliDefinition, type PluginCliHost, type PluginCliIo, type PluginContext, type PluginConversationAnnotations, type PluginConversationEventCostDay, type PluginConversationEventDefinition, type PluginConversationEventReader, type PluginConversationEventRecord, type PluginConversationEventStats, type PluginConversationEventValue, type PluginConversationEvents, type PluginCredentialActor, type PluginCredentialHeaderTransform, type PluginCredentialLease, type PluginCredentialResult, type PluginCredentialSubject, type PluginCredentials, type PluginDecision, type PluginDispatchSource, type PluginEgress, type PluginEgressRequest, type PluginEgressResponse, type PluginEmbedder, type PluginEnv, type PluginEnvVarDeclaration, type PluginEventToolContext, type PluginEventType, type PluginEvents, type PluginGrant, type PluginGrantAccess, type PluginHooks, type PluginLogger, type PluginManifest, type PluginMcp, type PluginMcpAuthConfig, type PluginMcpAuthorizationPending, type PluginMcpConfig, type PluginMcpContent, type PluginMcpOAuthClientConfig, type PluginMcpToolError, type PluginMcpToolResult, type PluginMcpToolSuccess, type PluginMetadata, type PluginModel, type PluginModelConfig, type PluginNpmRuntimeDependency, type PluginOAuthBearerCredentials, type PluginOAuthConfig, type PluginOperationalBarChartWidget, type PluginOperationalChartCategory, type PluginOperationalChartSeries, type PluginOperationalField, type PluginOperationalMetric, type PluginOperationalRecord, type PluginOperationalRecordSet, type PluginOperationalReport, type PluginOperationalReportContent, type PluginOperationalTone, type PluginProviderAccount, type PluginReadState, type PluginRegistration, type PluginRegistrationInput, type PluginResolvedCredentialUser, type PluginRoute, type PluginRouteApp, type PluginRouteHandler, type PluginRouteMethod, type PluginRunContext, type PluginRunTranscriptEntry, type PluginRunTranscriptProvenance, type PluginRuntimeDependency, type PluginRuntimePostinstallCommand, type PluginSandbox, type PluginState, type PluginStoredTokens, type PluginSystemRuntimeDependency, type PluginSystemRuntimeDependencyFromUrl, type PluginTaskContext, type PluginTaskDefinition, type PluginTasks, type PluginTokenStore, type PluginToolContent, type PluginToolDefinition, type PluginToolExecute, type PluginToolExecuteOptions, PluginToolInputError, type PluginToolOutput, type PluginToolOutputEnvelope, type PluginUserPageContent, type PluginUserPageContext, type PluginUserPageDefinition, type PluginUserPageInput, type PluginUserPageLink, type PluginUserTokenSlot, type PluginWorkspaceToolContext, type ProfileReportHookContext, type PromptContext, type PromptContextContribution, type PromptMessage, REQUIRED_TOOL_ANNOTATION_KEYS, type ReplyAttribution, type RequiredToolAnnotationKey, type ResolveOAuthAccountHookContext, type RouteRegistrationHookContext, type SandboxPrepareHookContext, type ScheduledAutomationSource, type SlackActor, type SlackConversationLink, type SlackConversationLinkHookContext, type SlackDestination, type SlackInvocationContext, type SlackLocation, type SlackSource, type SlackToolRegistrationHookContext, type Source, type SourceVisibility, type SubscribableResource, type SystemActor, type SystemPromptContext, type TaskOutcome, type ToolAnnotations, type ToolApprovalMetadata, type ToolApprovalMode, type ToolExposure, type ToolRegistrationHookContext, type UnfinishedWorkHookContext, type UnfinishedWorkResult, type User, type UserPromptContext, type UserPromptContribution, type WatchResult, type WebActor, type WebInvocationContext, type WebSource, type WorkspaceFinalize, type WorkspacePrepareHookContext, actorSchema, actorUserIdSchema, agentInvocationSourceSchema, codeChangeInputSchema, codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventIconSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, conversationSidebarIconSchema, createEventSource, createLocalSource, createSlackSource, createWebSource, defineConversationEvent, defineJuniorPlugin, definePluginTool, definePromptContext, destinationSchema, destinationVisibilitySchema, dispatchOptionsSchema, enforceEgressPolicy, eventAutomationSourceSchema, eventDataSchema, eventIdentifierSchema, eventInputSchema, eventMatchFieldSchema, eventMatchFieldsSchema, eventMatchSchema, eventMatches, eventPersonSchema, eventSchema, eventSourceSchema, eventTypeSchema, getSourceKey, identitySchema, isPrivateSource, isSlackDestination, localActorSchema, localDestinationSchema, localSourceSchema, locationSchema, missingToolAnnotationKeys, nonBlankStringSchema, normalizeEventIdentifier, objectAnnotationSchema, objectFactFields, objectFactsSchema, objectIconPath, objectIconPaths, objectPresentation, objectTypeSchema, ownedObjectAnnotationSchema, platformSchema, pluginApiRouteRequestContextSchema, pluginAuthorizationSchema, pluginCredentialHeaderTransformSchema, pluginCredentialLeaseSchema, pluginCredentialResultSchema, pluginCredentialSubjectSchema, pluginDispatchSourceSchema, pluginEventTypeSchema, pluginEventsSchema, pluginGrantSchema, pluginProviderAccountSchema, pluginRunContextSchema, pluginRunTranscriptEntrySchema, pluginRunTranscriptProvenanceSchema, pluginStoredTokensSchema, pluginToolContentSchema, pluginToolContinuationSchema, pluginToolOutputSchema, pluginUserPageContentSchema, pluginUserPageCursorSchema, pluginUserPageFilterSchema, pluginUserPageInputSchema, pluginUserPageLinkSchema, pluginUserPageLinksSchema, pluginUserPageQuerySchema, promptContextSchema, promptMessageSchema, replyAttributionSchema, resourceLinkAnnotationSchema, resourceTypeSchema, scheduledAutomationSourceSchema, slackActorSchema, slackDestinationSchema, slackLocationSchema, slackSourceSchema, sourceSchema, sourceVisibilitySchema, stableEventMatchKey, subscribableResourceSchema, systemActorSchema, taskOutcomeSchema, toolApprovalModeSchema, userSchema, watchResultSchema, webActorSchema, webSourceSchema, zodTool };
|
package/dist/index.js
CHANGED
|
@@ -839,6 +839,13 @@ var watchResultSchema = z9.object({
|
|
|
839
839
|
events: z9.array(eventTypeSchema).min(1),
|
|
840
840
|
id: z9.string().min(1)
|
|
841
841
|
}).strict();
|
|
842
|
+
var eventPersonSchema = z9.union([
|
|
843
|
+
z9.object({
|
|
844
|
+
provider: z9.string().min(1),
|
|
845
|
+
handle: z9.string().min(1)
|
|
846
|
+
}).strict(),
|
|
847
|
+
z9.object({ email: z9.string().trim().min(3) }).strict()
|
|
848
|
+
]);
|
|
842
849
|
var eventInputSchema = z9.object({
|
|
843
850
|
objectType: objectTypeSchema.optional(),
|
|
844
851
|
eventKey: z9.string().min(1),
|
|
@@ -849,7 +856,9 @@ var eventInputSchema = z9.object({
|
|
|
849
856
|
trustedSummary: z9.string().min(1).transform((value) => value.slice(0, EVENT_SUMMARY_MAX_LENGTH)),
|
|
850
857
|
/** Trusted structured facts. Prefer ids and urls over long prose. */
|
|
851
858
|
data: eventDataSchema.optional(),
|
|
852
|
-
untrustedText: z9.string().transform((value) => value.slice(0, EVENT_TEXT_MAX_LENGTH)).optional()
|
|
859
|
+
untrustedText: z9.string().transform((value) => value.slice(0, EVENT_TEXT_MAX_LENGTH)).optional(),
|
|
860
|
+
/** People involved in the change. Watch Events list them as mentions. */
|
|
861
|
+
people: z9.array(eventPersonSchema).max(20).optional()
|
|
853
862
|
}).strict();
|
|
854
863
|
var eventSchema = eventInputSchema.extend({
|
|
855
864
|
namespace: z9.string().min(1)
|
|
@@ -1323,6 +1332,7 @@ export {
|
|
|
1323
1332
|
eventMatchFieldsSchema,
|
|
1324
1333
|
eventMatchSchema,
|
|
1325
1334
|
eventMatches,
|
|
1335
|
+
eventPersonSchema,
|
|
1326
1336
|
eventSchema,
|
|
1327
1337
|
eventSourceSchema,
|
|
1328
1338
|
eventTypeSchema,
|