@sentry/junior-plugin-api 0.154.0 → 0.155.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/hooks.d.ts +2 -1
- package/dist/operations.d.ts +8 -0
- package/package.json +1 -1
- package/src/hooks.ts +5 -0
- package/src/operations.ts +10 -0
package/dist/hooks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EgressHookContext, EgressResponseHookContext, IssueCredentialHookContext, PluginCredentialResult, PluginGrant, PluginProviderAccount, ResolveOAuthAccountHookContext } from "./credentials";
|
|
2
|
-
import type { HeartbeatHookContext, HeartbeatResult, OperationalReportHookContext, ApiRouteRegistrationHookContext, PluginOperationalReportContent, PluginRoute, PluginRouteApp, RouteRegistrationHookContext, SlackConversationLink, SlackConversationLinkHookContext } from "./operations";
|
|
2
|
+
import type { HeartbeatHookContext, HeartbeatResult, OperationalReportHookContext, ApiRouteRegistrationHookContext, PluginOperationalReportContent, PluginRoute, PluginRouteApp, RouteRegistrationHookContext, SlackConversationLink, SlackConversationLinkHookContext, UnfinishedWorkHookContext, UnfinishedWorkResult } from "./operations";
|
|
3
3
|
import type { AfterMcpToolHookContext, BeforeToolExecuteHookContext, PluginToolDefinition, SandboxPrepareHookContext, ToolRegistrationHookContext } from "./tools";
|
|
4
4
|
import type { PromptMessage, SystemPromptContext, UserPromptContext, UserPromptContribution } from "./prompt";
|
|
5
5
|
export interface PluginHooks {
|
|
@@ -15,6 +15,7 @@ export interface PluginHooks {
|
|
|
15
15
|
afterMcpTool?(ctx: AfterMcpToolHookContext): Promise<void> | void;
|
|
16
16
|
grantForEgress?(ctx: EgressHookContext): Promise<PluginGrant | undefined> | PluginGrant | undefined;
|
|
17
17
|
heartbeat?(ctx: HeartbeatHookContext): Promise<HeartbeatResult | void> | HeartbeatResult | void;
|
|
18
|
+
unfinishedWork?(ctx: UnfinishedWorkHookContext): Promise<UnfinishedWorkResult> | UnfinishedWorkResult;
|
|
18
19
|
issueCredential?(ctx: IssueCredentialHookContext): Promise<PluginCredentialResult> | PluginCredentialResult;
|
|
19
20
|
onEgressResponse?(ctx: EgressResponseHookContext): Promise<void> | void;
|
|
20
21
|
operationalReport?(ctx: OperationalReportHookContext): Promise<PluginOperationalReportContent | undefined> | PluginOperationalReportContent | undefined;
|
package/dist/operations.d.ts
CHANGED
|
@@ -16,6 +16,14 @@ export interface HeartbeatHookContext extends PluginContext {
|
|
|
16
16
|
export interface HeartbeatResult {
|
|
17
17
|
dispatchCount?: number;
|
|
18
18
|
}
|
|
19
|
+
export interface UnfinishedWorkHookContext extends PluginContext {
|
|
20
|
+
/** Bounded conversation candidates selected by the host. */
|
|
21
|
+
conversationIds: string[];
|
|
22
|
+
}
|
|
23
|
+
export interface UnfinishedWorkResult {
|
|
24
|
+
/** Candidate conversations that have plugin-owned work to finish. */
|
|
25
|
+
conversationIds: string[];
|
|
26
|
+
}
|
|
19
27
|
export type PluginOperationalTone = "danger" | "good" | "neutral" | "warning";
|
|
20
28
|
export interface PluginOperationalMetric {
|
|
21
29
|
label: string;
|
package/package.json
CHANGED
package/src/hooks.ts
CHANGED
|
@@ -18,6 +18,8 @@ import type {
|
|
|
18
18
|
RouteRegistrationHookContext,
|
|
19
19
|
SlackConversationLink,
|
|
20
20
|
SlackConversationLinkHookContext,
|
|
21
|
+
UnfinishedWorkHookContext,
|
|
22
|
+
UnfinishedWorkResult,
|
|
21
23
|
} from "./operations";
|
|
22
24
|
import type {
|
|
23
25
|
AfterMcpToolHookContext,
|
|
@@ -57,6 +59,9 @@ export interface PluginHooks {
|
|
|
57
59
|
heartbeat?(
|
|
58
60
|
ctx: HeartbeatHookContext,
|
|
59
61
|
): Promise<HeartbeatResult | void> | HeartbeatResult | void;
|
|
62
|
+
unfinishedWork?(
|
|
63
|
+
ctx: UnfinishedWorkHookContext,
|
|
64
|
+
): Promise<UnfinishedWorkResult> | UnfinishedWorkResult;
|
|
60
65
|
issueCredential?(
|
|
61
66
|
ctx: IssueCredentialHookContext,
|
|
62
67
|
): Promise<PluginCredentialResult> | PluginCredentialResult;
|
package/src/operations.ts
CHANGED
|
@@ -20,6 +20,16 @@ export interface HeartbeatResult {
|
|
|
20
20
|
dispatchCount?: number;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
export interface UnfinishedWorkHookContext extends PluginContext {
|
|
24
|
+
/** Bounded conversation candidates selected by the host. */
|
|
25
|
+
conversationIds: string[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface UnfinishedWorkResult {
|
|
29
|
+
/** Candidate conversations that have plugin-owned work to finish. */
|
|
30
|
+
conversationIds: string[];
|
|
31
|
+
}
|
|
32
|
+
|
|
23
33
|
export type PluginOperationalTone = "danger" | "good" | "neutral" | "warning";
|
|
24
34
|
|
|
25
35
|
export interface PluginOperationalMetric {
|