@sentry/junior 0.61.0 → 0.63.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/app.js +393 -871
- package/dist/chat/plugins/agent-hooks.d.ts +8 -1
- package/dist/chat/prompt.d.ts +0 -1
- package/dist/chat/respond-helpers.d.ts +1 -1
- package/dist/chat/runtime/turn-preparation.d.ts +0 -1
- package/dist/chat/sandbox/sandbox.d.ts +1 -0
- package/dist/chat/sandbox/session.d.ts +2 -0
- package/dist/chat/tools/definition.d.ts +1 -0
- package/dist/{chunk-I4FDGMFI.js → chunk-ITZ2F7UE.js} +779 -11
- package/dist/{chunk-QDGD5WVN.js → chunk-LRVKJAR2.js} +2 -27
- package/dist/{chunk-FKEKRBUB.js → chunk-PEF6UXTY.js} +27 -1
- package/dist/cli/snapshot-warmup.js +2 -2
- package/dist/reporting.d.ts +25 -10
- package/dist/reporting.js +45 -17
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentPluginRequester, JuniorPlugin } from "@sentry/junior-plugin-api";
|
|
1
|
+
import type { AgentPluginRequester, AgentPluginRoute, SlackConversationLink, JuniorPlugin } from "@sentry/junior-plugin-api";
|
|
2
2
|
import type { ToolDefinition } from "@/chat/tools/definition";
|
|
3
3
|
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
4
4
|
import type { SandboxInstance } from "@/chat/sandbox/workspace";
|
|
@@ -14,6 +14,9 @@ export interface ToolHookResult {
|
|
|
14
14
|
env: Record<string, string>;
|
|
15
15
|
input: Record<string, unknown>;
|
|
16
16
|
}
|
|
17
|
+
export interface AgentPluginRouteRegistration extends AgentPluginRoute {
|
|
18
|
+
pluginName: string;
|
|
19
|
+
}
|
|
17
20
|
export interface AgentPluginHookRunner {
|
|
18
21
|
beforeToolExecute(input: ToolHookInput): Promise<ToolHookResult>;
|
|
19
22
|
prepareSandbox(sandbox: SandboxInstance): Promise<void>;
|
|
@@ -26,6 +29,10 @@ export declare function setAgentPlugins(plugins: JuniorPlugin[]): JuniorPlugin[]
|
|
|
26
29
|
export declare function getAgentPlugins(): JuniorPlugin[];
|
|
27
30
|
/** Collect turn-scoped tools exposed by trusted plugins. */
|
|
28
31
|
export declare function getAgentPluginTools(context: ToolRuntimeContext): Record<string, ToolDefinition<any>>;
|
|
32
|
+
/** Collect route handlers exposed by trusted plugins for app-level mounting. */
|
|
33
|
+
export declare function getAgentPluginRoutes(): AgentPluginRouteRegistration[];
|
|
34
|
+
/** Resolve the first trusted plugin conversation URL for finalized Slack footers. */
|
|
35
|
+
export declare function getAgentPluginSlackConversationLink(conversationId: string): SlackConversationLink | undefined;
|
|
29
36
|
/** Create one runner over trusted agent plugins registered by the app. */
|
|
30
37
|
export declare function createAgentPluginHookRunner(input?: {
|
|
31
38
|
requester?: AgentPluginRequester;
|
package/dist/chat/prompt.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export declare function toObservablePromptPart(part: {
|
|
|
44
44
|
export declare function summarizeMessageText(text: string): string;
|
|
45
45
|
/**
|
|
46
46
|
* Put prior thread text before the current instruction when no Pi history
|
|
47
|
-
* exists.
|
|
47
|
+
* exists. Structured thread XML is already a top-level prompt block.
|
|
48
48
|
*/
|
|
49
49
|
export declare function buildUserTurnText(userInput: string, conversationContext?: string): string;
|
|
50
50
|
/** Encode a non-image attachment as base64 XML for the prompt. */
|
|
@@ -8,7 +8,6 @@ export interface PreparedTurnState {
|
|
|
8
8
|
channelConfiguration?: ChannelConfigurationService;
|
|
9
9
|
conversation: ThreadConversationState;
|
|
10
10
|
conversationContext?: string;
|
|
11
|
-
routingContext?: string;
|
|
12
11
|
sandboxId?: string;
|
|
13
12
|
sandboxDependencyProfileHash?: string;
|
|
14
13
|
userMessageId?: string;
|
|
@@ -6,6 +6,7 @@ interface SandboxToolExecutors {
|
|
|
6
6
|
bash: (input: {
|
|
7
7
|
command: string;
|
|
8
8
|
env?: Record<string, string>;
|
|
9
|
+
signal?: AbortSignal;
|
|
9
10
|
timeoutMs?: number;
|
|
10
11
|
}) => Promise<{
|
|
11
12
|
stdout: string;
|
|
@@ -13,6 +14,7 @@ interface SandboxToolExecutors {
|
|
|
13
14
|
exitCode: number;
|
|
14
15
|
stdoutTruncated: boolean;
|
|
15
16
|
stderrTruncated: boolean;
|
|
17
|
+
aborted?: boolean;
|
|
16
18
|
timedOut?: boolean;
|
|
17
19
|
}>;
|
|
18
20
|
readFile: (input: {
|
|
@@ -21,6 +21,7 @@ export interface ToolDefinition<TInputSchema extends TSchema = TSchema> {
|
|
|
21
21
|
executionMode?: ToolExecutionMode;
|
|
22
22
|
execute?: (input: Static<TInputSchema>, options: {
|
|
23
23
|
experimental_context?: unknown;
|
|
24
|
+
signal?: AbortSignal;
|
|
24
25
|
}) => Promise<unknown> | unknown;
|
|
25
26
|
}
|
|
26
27
|
/** Infer execute parameter types from the inputSchema via generic binding. */
|