@sentry/junior 0.90.0 → 0.92.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/{agent-hooks-MXAF7RQL.js → agent-hooks-BYSSWCNW.js} +7 -7
- package/dist/api/people/list.d.ts +3 -3
- package/dist/api/people/list.js +15 -15
- package/dist/api/people/list.query.d.ts +2 -2
- package/dist/api/people/profile.d.ts +3 -3
- package/dist/api/people/profile.js +12 -12
- package/dist/api/people/profile.query.d.ts +2 -2
- package/dist/api/people/shared.d.ts +13 -13
- package/dist/api/people/types.d.ts +12 -12
- package/dist/api-reference.d.ts +1 -1
- package/dist/app.js +406 -267
- package/dist/{catalog-runtime-DXE6NXHT.js → catalog-runtime-NZHMSMYC.js} +2 -2
- package/dist/chat/actor.d.ts +75 -0
- package/dist/chat/agent/prompt.d.ts +4 -4
- package/dist/chat/agent/request.d.ts +21 -13
- package/dist/chat/agent/resume.d.ts +5 -4
- package/dist/chat/agent/tools.d.ts +2 -2
- package/dist/chat/capabilities/jr-rpc-command.d.ts +1 -1
- package/dist/chat/conversation-privacy.d.ts +11 -0
- package/dist/chat/conversations/sql/migrations.d.ts +1 -1
- package/dist/chat/conversations/sql/schema/conversations.d.ts +2 -19
- package/dist/chat/conversations/sql/schema.d.ts +2 -19
- package/dist/chat/conversations/sql/store.d.ts +3 -3
- package/dist/chat/conversations/store.d.ts +4 -4
- package/dist/chat/credentials/context.d.ts +4 -4
- package/dist/chat/current-instruction.d.ts +5 -3
- package/dist/chat/logging.d.ts +2 -2
- package/dist/chat/no-reply.d.ts +1 -1
- package/dist/chat/oauth-authorization-message.d.ts +6 -0
- package/dist/chat/oauth-flow.d.ts +1 -1
- package/dist/chat/pi/messages.d.ts +2 -2
- package/dist/chat/pi/transcript.d.ts +15 -0
- package/dist/chat/plugins/agent-hooks.d.ts +3 -3
- package/dist/chat/plugins/credential-hooks.d.ts +2 -8
- package/dist/chat/prompt.d.ts +3 -6
- package/dist/chat/runtime/reply-executor.d.ts +1 -1
- package/dist/chat/runtime/turn-input.d.ts +1 -1
- package/dist/chat/sandbox/egress/schemas.d.ts +2 -2
- package/dist/chat/sandbox/egress/session.d.ts +1 -1
- package/dist/chat/services/context-compaction.d.ts +1 -1
- package/dist/chat/services/conversation-memory.d.ts +1 -1
- package/dist/chat/services/mcp-auth-orchestration.d.ts +1 -1
- package/dist/chat/services/message-actor-identity.d.ts +4 -4
- package/dist/chat/services/pending-auth.d.ts +2 -2
- package/dist/chat/services/plugin-auth-orchestration.d.ts +1 -1
- package/dist/chat/services/provider-default-config.d.ts +1 -1
- package/dist/chat/services/subscribed-decision.d.ts +1 -1
- package/dist/chat/services/turn-result.d.ts +1 -1
- package/dist/chat/services/turn-session-record.d.ts +11 -8
- package/dist/chat/services/turn-thinking-level.d.ts +1 -1
- package/dist/chat/slack/assistant-thread/title.d.ts +1 -1
- package/dist/chat/slack/mrkdwn.d.ts +6 -0
- package/dist/chat/slack/tools/canvas/create.d.ts +41 -1
- package/dist/chat/slack/tools/canvas/edit.d.ts +60 -1
- package/dist/chat/slack/tools/canvas/read.d.ts +60 -1
- package/dist/chat/slack/tools/canvas/write.d.ts +41 -1
- package/dist/chat/slack/tools/channel-list-messages.d.ts +45 -1
- package/dist/chat/slack/tools/context.d.ts +3 -3
- package/dist/chat/slack/tools/list/add-items.d.ts +42 -1
- package/dist/chat/slack/tools/list/create.d.ts +40 -1
- package/dist/chat/slack/tools/list/get-items.d.ts +40 -1
- package/dist/chat/slack/tools/list/update-item.d.ts +46 -1
- package/dist/chat/slack/tools/message-add-reaction.d.ts +40 -1
- package/dist/chat/slack/tools/send-message.d.ts +45 -1
- package/dist/chat/slack/tools/thread-read.d.ts +44 -1
- package/dist/chat/slack/tools/user-lookup.d.ts +45 -1
- package/dist/chat/slack/user.d.ts +3 -3
- package/dist/chat/slack/vision-context.d.ts +2 -2
- package/dist/chat/sql/schema.d.ts +2 -19
- package/dist/chat/state/conversation-details.d.ts +4 -4
- package/dist/chat/state/conversation.d.ts +1 -1
- package/dist/chat/state/session-log.d.ts +140 -26
- package/dist/chat/state/turn-session.d.ts +18 -5
- package/dist/chat/task-execution/slack-work.d.ts +2 -2
- package/dist/chat/task-execution/state.d.ts +4 -4
- package/dist/chat/tool-support/zod-tool.d.ts +16 -4
- package/dist/chat/tools/advisor/tool.d.ts +41 -1
- package/dist/chat/tools/definition.d.ts +10 -0
- package/dist/chat/tools/execute-tool.d.ts +41 -1
- package/dist/chat/tools/resource-events.d.ts +124 -3
- package/dist/chat/tools/runtime/report-progress.d.ts +40 -1
- package/dist/chat/tools/sandbox/bash.d.ts +41 -1
- package/dist/chat/tools/sandbox/edit-file.d.ts +44 -1
- package/dist/chat/tools/sandbox/find-files.d.ts +42 -1
- package/dist/chat/tools/sandbox/grep.d.ts +46 -1
- package/dist/chat/tools/sandbox/list-dir.d.ts +41 -1
- package/dist/chat/tools/sandbox/read-file.d.ts +42 -1
- package/dist/chat/tools/sandbox/write-file.d.ts +41 -1
- package/dist/chat/tools/search-tools.d.ts +102 -1
- package/dist/chat/tools/skill/call-mcp-tool.d.ts +10 -1
- package/dist/chat/tools/skill/load-skill.d.ts +40 -1
- package/dist/chat/tools/skill/search-mcp-tools.d.ts +100 -1
- package/dist/chat/tools/system-time.d.ts +38 -1
- package/dist/chat/tools/types.d.ts +4 -4
- package/dist/chat/tools/web/fetch-tool.d.ts +41 -1
- package/dist/chat/tools/web/image-generate.d.ts +62 -1
- package/dist/chat/tools/web/search.d.ts +41 -1
- package/dist/{chunk-HXL2ZV74.js → chunk-3F54A3YM.js} +82 -11
- package/dist/{chunk-BKSZL4QO.js → chunk-7DVIELX3.js} +670 -401
- package/dist/{chunk-GCWD2VHP.js → chunk-7FS3K243.js} +284 -124
- package/dist/{chunk-AOISHLSF.js → chunk-ACJENBVF.js} +143 -20
- package/dist/{chunk-IRRMABQD.js → chunk-APIVR44P.js} +10 -10
- package/dist/{chunk-PHZHJTCK.js → chunk-BMQ5DXHV.js} +30 -52
- package/dist/{chunk-XP7F4LYB.js → chunk-BTH37NCU.js} +4 -4
- package/dist/{chunk-5GBUZI6M.js → chunk-H7KUZAMZ.js} +4 -4
- package/dist/{chunk-TYUXD3FN.js → chunk-MC4ZZE4Q.js} +1 -1
- package/dist/{chunk-QCKGI74V.js → chunk-N25HRI6B.js} +10 -10
- package/dist/{chunk-2S7M37HY.js → chunk-NIFONS4W.js} +86 -47
- package/dist/{chunk-ONFOWI2D.js → chunk-OJP53WIU.js} +16 -15
- package/dist/{chunk-NW7AXDA5.js → chunk-OZJXGX4U.js} +2 -2
- package/dist/{chunk-KC42JAAQ.js → chunk-PFXC67GJ.js} +3 -3
- package/dist/{chunk-ZUK7BL63.js → chunk-S6QKIGRM.js} +66 -54
- package/dist/{chunk-IX76WFJV.js → chunk-TF5VLGA7.js} +10 -10
- package/dist/{chunk-DACFZ5CI.js → chunk-VY7TVOIK.js} +16 -12
- package/dist/{chunk-AN2437E3.js → chunk-YTNPU7I2.js} +2 -2
- package/dist/{chunk-3MPOMK3K.js → chunk-YYBX2BD5.js} +61 -3
- package/dist/{chunk-RS6ANWVT.js → chunk-ZATRYQLR.js} +1 -1
- package/dist/cli/chat.js +20 -20
- package/dist/cli/check.js +3 -3
- package/dist/cli/plugins.js +9 -9
- package/dist/cli/snapshot-warmup.js +6 -6
- package/dist/cli/upgrade.js +9 -9
- package/dist/{db-CXI7PR5U.js → db-GCK43OO3.js} +4 -4
- package/dist/instrumentation.js +1 -1
- package/dist/reporting/conversations.d.ts +3 -3
- package/dist/reporting.d.ts +1 -1
- package/dist/reporting.js +48 -50
- package/dist/{runner-FKL3RAHA.js → runner-XWTFA26U.js} +20 -18
- package/dist/{validation-I7GD2YWS.js → validation-KYAWETI4.js} +3 -3
- package/package.json +6 -6
- package/dist/chat/requester.d.ts +0 -68
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical actor identity.
|
|
3
|
+
*
|
|
4
|
+
* Runtime actors are platform-scoped actors. Stored Slack actor parsing
|
|
5
|
+
* remains explicit so durable conversation metadata is not repaired on read.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
export declare const storedSlackActorSchema: z.ZodObject<{
|
|
9
|
+
email: z.ZodOptional<z.ZodString>;
|
|
10
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
11
|
+
platform: z.ZodOptional<z.ZodLiteral<"slack">>;
|
|
12
|
+
slackUserId: z.ZodOptional<z.ZodString>;
|
|
13
|
+
slackUserName: z.ZodOptional<z.ZodString>;
|
|
14
|
+
teamId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
interface BaseActor {
|
|
17
|
+
email?: string;
|
|
18
|
+
fullName?: string;
|
|
19
|
+
userId: string;
|
|
20
|
+
userName?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface SlackActor extends BaseActor {
|
|
23
|
+
platform: "slack";
|
|
24
|
+
teamId: string;
|
|
25
|
+
}
|
|
26
|
+
export interface LocalActor extends BaseActor {
|
|
27
|
+
platform: "local";
|
|
28
|
+
}
|
|
29
|
+
export interface SystemActor {
|
|
30
|
+
platform: "system";
|
|
31
|
+
name: string;
|
|
32
|
+
}
|
|
33
|
+
export type UserActor = SlackActor | LocalActor;
|
|
34
|
+
export type Actor = UserActor | SystemActor;
|
|
35
|
+
export interface SlackActorProfile {
|
|
36
|
+
email?: string;
|
|
37
|
+
fullName?: string;
|
|
38
|
+
userName?: string;
|
|
39
|
+
}
|
|
40
|
+
export type StoredSlackActor = z.output<typeof storedSlackActorSchema>;
|
|
41
|
+
/** Parse a serialized runtime actor that crossed a durable boundary. */
|
|
42
|
+
export declare function parseActor(value: unknown): Actor | undefined;
|
|
43
|
+
/** Return whether an actor is a platform-scoped user actor. */
|
|
44
|
+
export declare function isUserActor(actor: Actor | undefined): actor is UserActor;
|
|
45
|
+
interface ActorInput {
|
|
46
|
+
email?: string;
|
|
47
|
+
fullName?: string;
|
|
48
|
+
platform?: UserActor["platform"];
|
|
49
|
+
teamId?: string;
|
|
50
|
+
userId?: string;
|
|
51
|
+
userName?: string;
|
|
52
|
+
}
|
|
53
|
+
/** Keep actor ids exact at platform boundaries before they enter owned state. */
|
|
54
|
+
export declare function parseActorUserId(value: unknown): string | undefined;
|
|
55
|
+
/** Assert persisted actor ids without read-side repair. */
|
|
56
|
+
export declare function isActorUserId(value: string | undefined): value is string;
|
|
57
|
+
/** Build Junior's canonical platform actor from exact actor ids and profile data. */
|
|
58
|
+
export declare function createActor(input: ActorInput | undefined, context: {
|
|
59
|
+
platform?: UserActor["platform"];
|
|
60
|
+
teamId?: string;
|
|
61
|
+
userId?: string;
|
|
62
|
+
}): UserActor | undefined;
|
|
63
|
+
/** Build Junior's canonical actor from Slack profile data. */
|
|
64
|
+
export declare function createSlackActor(teamId: string, userId: string, profile: SlackActorProfile | null | undefined): SlackActor;
|
|
65
|
+
/** Parse a serialized Slack actor that crossed a runtime boundary. */
|
|
66
|
+
export declare function parseStoredSlackActor(value: unknown): StoredSlackActor | undefined;
|
|
67
|
+
/** Convert a runtime Slack actor into its durable session shape. */
|
|
68
|
+
export declare function toStoredSlackActor(actor: SlackActor): StoredSlackActor;
|
|
69
|
+
/** Resolve a Slack resume actor from stored profile data and the active actor. */
|
|
70
|
+
export declare function createSlackResumeActor(args: {
|
|
71
|
+
actor?: UserActor;
|
|
72
|
+
teamId: string;
|
|
73
|
+
userId: string;
|
|
74
|
+
}): SlackActor;
|
|
75
|
+
export {};
|
|
@@ -5,9 +5,9 @@ import type { SkillInvocation, SkillMetadata } from "@/chat/skills";
|
|
|
5
5
|
import type { ActiveMcpCatalogSummary } from "@/chat/tool-support/skill/mcp-tool-summary";
|
|
6
6
|
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
7
7
|
import type { AnyToolDefinition } from "@/chat/tools/definition";
|
|
8
|
-
import type
|
|
8
|
+
import { type Actor } from "@/chat/actor";
|
|
9
9
|
import type { ThreadArtifactsState } from "@/chat/state/artifacts";
|
|
10
|
-
import type { AgentRunInput, AgentRunRouting, AgentRunSteeringMessage } from "@/chat/agent/request";
|
|
10
|
+
import type { AgentRunInput, AgentRunInstructionActor, AgentRunRouting, AgentRunSteeringMessage } from "@/chat/agent/request";
|
|
11
11
|
export type UserContentPart = {
|
|
12
12
|
type: "text";
|
|
13
13
|
text: string;
|
|
@@ -36,7 +36,7 @@ export interface PromptAssembly {
|
|
|
36
36
|
/**
|
|
37
37
|
* Keep thread text separate from the canonical active task boundary.
|
|
38
38
|
*/
|
|
39
|
-
export declare function buildUserTurnText(userInput: string, conversationContext?: string): string;
|
|
39
|
+
export declare function buildUserTurnText(userInput: string, conversationContext?: string, actor?: AgentRunInstructionActor): string;
|
|
40
40
|
/** Encode a non-image attachment as base64 XML for the prompt. */
|
|
41
41
|
export declare function encodeNonImageAttachmentForPrompt(attachment: {
|
|
42
42
|
data: Buffer;
|
|
@@ -56,7 +56,7 @@ export declare function buildSteeringPiMessage(message: AgentRunSteeringMessage)
|
|
|
56
56
|
/** Assemble prompt history, instructions, and telemetry input for one slice. */
|
|
57
57
|
export declare function assemblePrompt(args: {
|
|
58
58
|
activeMcpCatalogs: ActiveMcpCatalogSummary[];
|
|
59
|
-
|
|
59
|
+
currentActor?: Actor;
|
|
60
60
|
artifactState?: ThreadArtifactsState;
|
|
61
61
|
availableSkills: SkillMetadata[];
|
|
62
62
|
configurationValues: Record<string, unknown>;
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* Agent run request contract.
|
|
3
3
|
*
|
|
4
4
|
* Groups the per-slice run request by the runtime role each field serves and
|
|
5
|
-
* owns interpretation of the routing group:
|
|
5
|
+
* owns interpretation of the routing group: actor derivation, surface
|
|
6
6
|
* inference, destination consistency checks, and session identifiers. Run
|
|
7
7
|
* phases consume these groups directly; callers build them at runtime
|
|
8
8
|
* boundaries.
|
|
9
9
|
*/
|
|
10
|
-
import type { Destination, Source } from "@sentry/junior-plugin-api";
|
|
10
|
+
import type { Destination, Source, SystemActor } from "@sentry/junior-plugin-api";
|
|
11
11
|
import type { ChannelConfigurationService } from "@/chat/configuration/types";
|
|
12
12
|
import type { CredentialContext } from "@/chat/credentials/context";
|
|
13
13
|
import type { PiMessage } from "@/chat/pi/messages";
|
|
14
|
-
import { type
|
|
14
|
+
import { type Actor } from "@/chat/actor";
|
|
15
15
|
import type { SandboxAcquiredState } from "@/chat/sandbox/sandbox";
|
|
16
16
|
import type { SandboxEgressTracePropagationConfig } from "@/chat/sandbox/egress/tracing";
|
|
17
17
|
import type { AuthorizationFlowMode } from "@/chat/services/auth-pause";
|
|
@@ -19,6 +19,7 @@ import type { AssistantStatusSpec } from "@/chat/slack/assistant-thread/status";
|
|
|
19
19
|
import type { SlackConversationContext } from "@/chat/slack/conversation-context";
|
|
20
20
|
import type { ThreadArtifactsState } from "@/chat/state/artifacts";
|
|
21
21
|
import type { ConversationPendingAuthState } from "@/chat/state/conversation";
|
|
22
|
+
import type { PiMessageProvenance } from "@/chat/state/session-log";
|
|
22
23
|
import type { AgentTurnSurface } from "@/chat/state/turn-session";
|
|
23
24
|
import type { ToolExecutionReport } from "@/chat/tool-support/tool-execution-report";
|
|
24
25
|
import type { ImageGenerateToolDeps, WebFetchToolDeps, WebSearchToolDeps } from "@/chat/tools/types";
|
|
@@ -28,7 +29,15 @@ export interface AgentRunAttachment {
|
|
|
28
29
|
filename?: string;
|
|
29
30
|
promptText?: string;
|
|
30
31
|
}
|
|
32
|
+
export interface AgentRunInstructionActor {
|
|
33
|
+
authorId?: string;
|
|
34
|
+
authorName?: string;
|
|
35
|
+
slackTs?: string;
|
|
36
|
+
}
|
|
31
37
|
export interface AgentRunSteeringMessage {
|
|
38
|
+
actor?: AgentRunInstructionActor;
|
|
39
|
+
/** Provenance of this queued/steered message, carrying its original author. */
|
|
40
|
+
provenance: PiMessageProvenance;
|
|
32
41
|
omittedImageAttachmentCount?: number;
|
|
33
42
|
text: string;
|
|
34
43
|
timestampMs?: number;
|
|
@@ -36,6 +45,8 @@ export interface AgentRunSteeringMessage {
|
|
|
36
45
|
}
|
|
37
46
|
/** Carries the user-visible content and prior transcript for one agent-run slice. */
|
|
38
47
|
export interface AgentRunInput {
|
|
48
|
+
actor?: AgentRunInstructionActor;
|
|
49
|
+
includeConversationContextWithPiMessages?: boolean;
|
|
39
50
|
messageText: string;
|
|
40
51
|
userAttachments?: AgentRunAttachment[];
|
|
41
52
|
inboundAttachmentCount?: number;
|
|
@@ -47,16 +58,13 @@ export interface AgentRunInput {
|
|
|
47
58
|
/** Carries identity and addressing needed to route tools, auth, and delivery. */
|
|
48
59
|
export interface AgentRunRouting {
|
|
49
60
|
credentialContext?: CredentialContext;
|
|
50
|
-
|
|
61
|
+
actor?: Actor;
|
|
51
62
|
source: Source;
|
|
52
63
|
slackConversation?: SlackConversationContext;
|
|
53
64
|
destination: Destination;
|
|
54
65
|
surface?: AgentTurnSurface;
|
|
55
66
|
dispatch?: {
|
|
56
|
-
actor?:
|
|
57
|
-
id: string;
|
|
58
|
-
type: string;
|
|
59
|
-
};
|
|
67
|
+
actor?: SystemActor;
|
|
60
68
|
metadata?: Record<string, string>;
|
|
61
69
|
plugin?: string;
|
|
62
70
|
};
|
|
@@ -70,7 +78,7 @@ export interface AgentRunRouting {
|
|
|
70
78
|
teamId?: string;
|
|
71
79
|
messageTs?: string;
|
|
72
80
|
threadTs?: string;
|
|
73
|
-
|
|
81
|
+
actorId?: string;
|
|
74
82
|
};
|
|
75
83
|
toolChannelId?: string;
|
|
76
84
|
}
|
|
@@ -138,10 +146,10 @@ export declare function getSessionIdentifiers(routing: AgentRunRouting): {
|
|
|
138
146
|
conversationId?: string;
|
|
139
147
|
sessionId?: string;
|
|
140
148
|
};
|
|
141
|
-
/** Derive the acting
|
|
142
|
-
export declare function
|
|
143
|
-
/** Reject
|
|
144
|
-
export declare function
|
|
149
|
+
/** Derive the acting actor, filling platform and team from the destination. */
|
|
150
|
+
export declare function actorFromRouting(routing: AgentRunRouting): Actor | undefined;
|
|
151
|
+
/** Reject actor identities that do not belong to the active destination. */
|
|
152
|
+
export declare function assertActorDestinationMatch(routing: AgentRunRouting): void;
|
|
145
153
|
/** Reject legacy Slack correlation fields that conflict with the destination. */
|
|
146
154
|
export declare function assertCorrelationDestinationMatch(routing: AgentRunRouting): void;
|
|
147
155
|
/** Route tool side effects to the tool channel when one overrides the destination. */
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { Destination, Source } from "@sentry/junior-plugin-api";
|
|
11
11
|
import type { PiMessage } from "@/chat/pi/messages";
|
|
12
|
+
import type { PiMessageProvenance } from "@/chat/state/session-log";
|
|
12
13
|
import { CooperativeTurnYieldError } from "@/chat/runtime/turn";
|
|
13
14
|
import type { AgentRunOutcome } from "@/chat/runtime/agent-run-outcome";
|
|
14
15
|
import type { AgentTurnSurface } from "@/chat/state/turn-session";
|
|
15
|
-
import type {
|
|
16
|
+
import type { Actor } from "@/chat/actor";
|
|
16
17
|
import { loadTurnSessionRecord, persistRunningSessionRecord } from "@/chat/services/turn-session-record";
|
|
17
18
|
import { type AgentTurnUsage } from "@/chat/usage";
|
|
18
19
|
import type { AgentRunDurability } from "@/chat/agent/request";
|
|
@@ -25,7 +26,7 @@ interface ResumeStateArgs {
|
|
|
25
26
|
getLoadedSkillNames: () => string[];
|
|
26
27
|
logContext: SessionRecordLogContext;
|
|
27
28
|
recordActiveMcpProviders: () => Promise<void>;
|
|
28
|
-
|
|
29
|
+
actor?: Actor;
|
|
29
30
|
runSource: Source;
|
|
30
31
|
sessionConversationId?: string;
|
|
31
32
|
sessionId?: string;
|
|
@@ -48,8 +49,8 @@ export declare function createResumeState(args: ResumeStateArgs): {
|
|
|
48
49
|
getResumeSnapshot(currentMessages: PiMessage[]): PiMessage[];
|
|
49
50
|
markTimedOut(): void;
|
|
50
51
|
commitInput(): Promise<void>;
|
|
51
|
-
persistSafeBoundary(messages: PiMessage[]): Promise<boolean>;
|
|
52
|
-
requireDurableInputCheckpoint(messages: PiMessage[]): Promise<boolean>;
|
|
52
|
+
persistSafeBoundary(messages: PiMessage[], trailingMessageProvenance?: PiMessageProvenance[]): Promise<boolean>;
|
|
53
|
+
requireDurableInputCheckpoint(messages: PiMessage[], trailingMessageProvenance?: PiMessageProvenance[]): Promise<boolean>;
|
|
53
54
|
yieldAtSafeBoundaryIfDue(currentMessages: PiMessage[]): void;
|
|
54
55
|
/**
|
|
55
56
|
* Persist the continuation for an expected run ending and translate it
|
|
@@ -20,7 +20,7 @@ import { type SandboxExecutor } from "@/chat/sandbox/sandbox";
|
|
|
20
20
|
import type { PiMessage } from "@/chat/pi/messages";
|
|
21
21
|
import type { LogContext } from "@/chat/logging";
|
|
22
22
|
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
23
|
-
import type
|
|
23
|
+
import { type Actor } from "@/chat/actor";
|
|
24
24
|
import type { ThreadArtifactsState } from "@/chat/state/artifacts";
|
|
25
25
|
import type { AuthorizationPauseError } from "@/chat/services/auth-pause";
|
|
26
26
|
import type { AgentTurnSurface } from "@/chat/state/turn-session";
|
|
@@ -29,7 +29,7 @@ import type { ResumeState } from "@/chat/agent/resume";
|
|
|
29
29
|
interface ToolWiringArgs {
|
|
30
30
|
abortAgent: () => void;
|
|
31
31
|
activeSkills: Skill[];
|
|
32
|
-
|
|
32
|
+
currentActor?: Actor;
|
|
33
33
|
artifactStatePatch: Partial<ThreadArtifactsState>;
|
|
34
34
|
availableSkills: SkillMetadata[];
|
|
35
35
|
configurationValues: Record<string, unknown>;
|
|
@@ -3,7 +3,7 @@ import type { Skill } from "@/chat/skills";
|
|
|
3
3
|
type JrRpcDeps = {
|
|
4
4
|
activeSkill: Skill | null;
|
|
5
5
|
channelConfiguration?: ChannelConfigurationService;
|
|
6
|
-
|
|
6
|
+
actorId?: string;
|
|
7
7
|
onConfigurationValueChanged?: (key: string, value: unknown | undefined) => void;
|
|
8
8
|
};
|
|
9
9
|
export declare function maybeExecuteJrRpcCustomCommand(command: string, deps: JrRpcDeps): Promise<{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AssistantMessage, Message } from "@earendil-works/pi-ai";
|
|
1
2
|
export type ConversationPrivacy = "public" | "private";
|
|
2
3
|
type TraceAttributeValue = string | number | boolean | string[];
|
|
3
4
|
/**
|
|
@@ -32,6 +33,16 @@ export declare function toGenAiTextMetadata(text: string): Record<string, unknow
|
|
|
32
33
|
export declare function toGenAiPayloadMetadata(payload: unknown): Record<string, unknown>;
|
|
33
34
|
/** Convert an arbitrary payload into safe flattened trace attributes. */
|
|
34
35
|
export declare function toGenAiPayloadTraceAttributes(prefix: string, payload: unknown): Record<string, TraceAttributeValue>;
|
|
36
|
+
/**
|
|
37
|
+
* Map a pi-ai AssistantMessage to the canonical gen_ai.output.messages shape:
|
|
38
|
+
* `{ role, parts: [...], finish_reason }` — drops provider noise fields.
|
|
39
|
+
*/
|
|
40
|
+
export declare function toCanonicalOutputMessage(message: AssistantMessage): Record<string, unknown>;
|
|
41
|
+
/**
|
|
42
|
+
* Map a pi-ai Message (user/assistant/toolResult) to the canonical
|
|
43
|
+
* gen_ai.input.messages shape: `{ role, parts: [...] }`.
|
|
44
|
+
*/
|
|
45
|
+
export declare function toCanonicalInputMessage(message: Message): Record<string, unknown>;
|
|
35
46
|
/** Summarize a message list without exposing raw message content. */
|
|
36
47
|
export declare function toGenAiMessagesTraceAttributes(prefix: string, messages: unknown[]): Record<string, TraceAttributeValue>;
|
|
37
48
|
export {};
|
|
@@ -5,7 +5,7 @@ export interface Migration {
|
|
|
5
5
|
id: string;
|
|
6
6
|
statements: readonly string[];
|
|
7
7
|
}
|
|
8
|
-
export declare const migrations: readonly [Migration, Migration, Migration];
|
|
8
|
+
export declare const migrations: readonly [Migration, Migration, Migration, Migration];
|
|
9
9
|
export { schema };
|
|
10
10
|
/** Apply pending SQL schema migrations for queryable conversation records. */
|
|
11
11
|
export declare function migrateSchema(executor: JuniorSqlMigrationExecutor, migrationList?: readonly Migration[]): Promise<void>;
|
|
@@ -174,23 +174,6 @@ export declare const juniorConversations: import("drizzle-orm/pg-core").PgTableW
|
|
|
174
174
|
identity: undefined;
|
|
175
175
|
generated: undefined;
|
|
176
176
|
}, {}, {}>;
|
|
177
|
-
requesterIdentityId: import("drizzle-orm/pg-core").PgColumn<{
|
|
178
|
-
name: "requester_identity_id";
|
|
179
|
-
tableName: "junior_conversations";
|
|
180
|
-
dataType: "string";
|
|
181
|
-
columnType: "PgText";
|
|
182
|
-
data: string;
|
|
183
|
-
driverParam: string;
|
|
184
|
-
notNull: false;
|
|
185
|
-
hasDefault: false;
|
|
186
|
-
isPrimaryKey: false;
|
|
187
|
-
isAutoincrement: false;
|
|
188
|
-
hasRuntimeDefault: false;
|
|
189
|
-
enumValues: [string, ...string[]];
|
|
190
|
-
baseColumn: never;
|
|
191
|
-
identity: undefined;
|
|
192
|
-
generated: undefined;
|
|
193
|
-
}, {}, {}>;
|
|
194
177
|
creatorIdentityId: import("drizzle-orm/pg-core").PgColumn<{
|
|
195
178
|
name: "creator_identity_id";
|
|
196
179
|
tableName: "junior_conversations";
|
|
@@ -225,8 +208,8 @@ export declare const juniorConversations: import("drizzle-orm/pg-core").PgTableW
|
|
|
225
208
|
identity: undefined;
|
|
226
209
|
generated: undefined;
|
|
227
210
|
}, {}, {}>;
|
|
228
|
-
|
|
229
|
-
name: "
|
|
211
|
+
actor: import("drizzle-orm/pg-core").PgColumn<{
|
|
212
|
+
name: "actor_json";
|
|
230
213
|
tableName: "junior_conversations";
|
|
231
214
|
dataType: "json";
|
|
232
215
|
columnType: "PgJsonb";
|
|
@@ -180,23 +180,6 @@ export declare const schema: {
|
|
|
180
180
|
identity: undefined;
|
|
181
181
|
generated: undefined;
|
|
182
182
|
}, {}, {}>;
|
|
183
|
-
requesterIdentityId: import("drizzle-orm/pg-core").PgColumn<{
|
|
184
|
-
name: "requester_identity_id";
|
|
185
|
-
tableName: "junior_conversations";
|
|
186
|
-
dataType: "string";
|
|
187
|
-
columnType: "PgText";
|
|
188
|
-
data: string;
|
|
189
|
-
driverParam: string;
|
|
190
|
-
notNull: false;
|
|
191
|
-
hasDefault: false;
|
|
192
|
-
isPrimaryKey: false;
|
|
193
|
-
isAutoincrement: false;
|
|
194
|
-
hasRuntimeDefault: false;
|
|
195
|
-
enumValues: [string, ...string[]];
|
|
196
|
-
baseColumn: never;
|
|
197
|
-
identity: undefined;
|
|
198
|
-
generated: undefined;
|
|
199
|
-
}, {}, {}>;
|
|
200
183
|
creatorIdentityId: import("drizzle-orm/pg-core").PgColumn<{
|
|
201
184
|
name: "creator_identity_id";
|
|
202
185
|
tableName: "junior_conversations";
|
|
@@ -231,8 +214,8 @@ export declare const schema: {
|
|
|
231
214
|
identity: undefined;
|
|
232
215
|
generated: undefined;
|
|
233
216
|
}, {}, {}>;
|
|
234
|
-
|
|
235
|
-
name: "
|
|
217
|
+
actor: import("drizzle-orm/pg-core").PgColumn<{
|
|
218
|
+
name: "actor_json";
|
|
236
219
|
tableName: "junior_conversations";
|
|
237
220
|
dataType: "json";
|
|
238
221
|
columnType: "PgJsonb";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Destination } from "@sentry/junior-plugin-api";
|
|
2
2
|
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
3
|
-
import { type
|
|
3
|
+
import { type StoredSlackActor } from "@/chat/actor";
|
|
4
4
|
import type { JuniorSqlDatabase, JuniorSqlMigrationExecutor } from "@/chat/sql/db";
|
|
5
5
|
import type { Conversation, ConversationExecution, ConversationSource, ConversationStore } from "../store";
|
|
6
6
|
export declare class SqlStore implements ConversationStore {
|
|
@@ -19,7 +19,7 @@ export declare class SqlStore implements ConversationStore {
|
|
|
19
19
|
conversationId: string;
|
|
20
20
|
destination?: Destination;
|
|
21
21
|
nowMs?: number;
|
|
22
|
-
|
|
22
|
+
actor?: StoredSlackActor;
|
|
23
23
|
source?: ConversationSource;
|
|
24
24
|
title?: string;
|
|
25
25
|
visibility?: ConversationPrivacy;
|
|
@@ -31,7 +31,7 @@ export declare class SqlStore implements ConversationStore {
|
|
|
31
31
|
destination?: Destination;
|
|
32
32
|
execution: ConversationExecution;
|
|
33
33
|
lastActivityAtMs: number;
|
|
34
|
-
|
|
34
|
+
actor?: StoredSlackActor;
|
|
35
35
|
source?: ConversationSource;
|
|
36
36
|
title?: string;
|
|
37
37
|
updatedAtMs: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Destination } from "@sentry/junior-plugin-api";
|
|
2
2
|
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
3
|
-
import type {
|
|
3
|
+
import type { StoredSlackActor } from "@/chat/actor";
|
|
4
4
|
export type ConversationSource = "api" | "internal" | "local" | "plugin" | "resource_event" | "scheduler" | "slack";
|
|
5
5
|
export type ConversationStatus = "awaiting_resume" | "failed" | "idle" | "pending" | "running";
|
|
6
6
|
export interface ConversationExecution {
|
|
@@ -17,7 +17,7 @@ export interface Conversation {
|
|
|
17
17
|
destination?: Destination;
|
|
18
18
|
execution: ConversationExecution;
|
|
19
19
|
lastActivityAtMs: number;
|
|
20
|
-
|
|
20
|
+
actor?: StoredSlackActor;
|
|
21
21
|
schemaVersion: 1;
|
|
22
22
|
source?: ConversationSource;
|
|
23
23
|
title?: string;
|
|
@@ -42,7 +42,7 @@ export interface ConversationStore {
|
|
|
42
42
|
conversationId: string;
|
|
43
43
|
destination?: Destination;
|
|
44
44
|
nowMs?: number;
|
|
45
|
-
|
|
45
|
+
actor?: StoredSlackActor;
|
|
46
46
|
source?: ConversationSource;
|
|
47
47
|
title?: string;
|
|
48
48
|
/** Source-confirmed visibility from the current event's signal only. */
|
|
@@ -56,7 +56,7 @@ export interface ConversationStore {
|
|
|
56
56
|
destination?: Destination;
|
|
57
57
|
execution: ConversationExecution;
|
|
58
58
|
lastActivityAtMs: number;
|
|
59
|
-
|
|
59
|
+
actor?: StoredSlackActor;
|
|
60
60
|
source?: ConversationSource;
|
|
61
61
|
title?: string;
|
|
62
62
|
updatedAtMs: number;
|
|
@@ -6,8 +6,8 @@ declare const credentialSubjectBindingSchema: z.ZodObject<{
|
|
|
6
6
|
signature: z.ZodString;
|
|
7
7
|
}, z.core.$strict>;
|
|
8
8
|
declare const credentialSystemActorSchema: z.ZodObject<{
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
platform: z.ZodLiteral<"system">;
|
|
10
|
+
name: z.ZodString;
|
|
11
11
|
}, z.core.$strict>;
|
|
12
12
|
export declare const credentialSubjectSchema: z.ZodObject<{
|
|
13
13
|
type: z.ZodLiteral<"user">;
|
|
@@ -27,8 +27,8 @@ export declare const credentialContextSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
27
27
|
}, z.core.$strict>;
|
|
28
28
|
}, z.core.$strict>, z.ZodObject<{
|
|
29
29
|
actor: z.ZodObject<{
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
platform: z.ZodLiteral<"system">;
|
|
31
|
+
name: z.ZodString;
|
|
32
32
|
}, z.core.$strict>;
|
|
33
33
|
subject: z.ZodOptional<z.ZodObject<{
|
|
34
34
|
type: z.ZodLiteral<"user">;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** Render the active user task in a stable prompt boundary. */
|
|
2
|
-
export declare function renderCurrentInstruction(instruction: string
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export declare function renderCurrentInstruction(instruction: string, attrs?: {
|
|
3
|
+
authorId?: string;
|
|
4
|
+
authorName?: string;
|
|
5
|
+
slackTs?: string;
|
|
6
|
+
}): string;
|
|
5
7
|
/** Recover display text from the internal current-task prompt boundary. */
|
|
6
8
|
export declare function unwrapCurrentInstruction(text: string): string | undefined;
|
package/dist/chat/logging.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export declare function createLogContextFromRequest(request: Request, context?:
|
|
|
58
58
|
export declare function toSpanAttributes(context: LogContext): Record<string, string>;
|
|
59
59
|
/** Attach filterable non-user context tags to Sentry. */
|
|
60
60
|
export declare function setSentryTagsFromContext(context: LogContext): void;
|
|
61
|
-
/** Bind
|
|
61
|
+
/** Bind actor identity to Sentry's native user fields. */
|
|
62
62
|
export declare function setSentryUser(identity: SentryUserIdentity | undefined): void;
|
|
63
63
|
/** Attach scoped Sentry context for isolated exception capture. */
|
|
64
64
|
export declare function setSentryScopeContext(scope: Sentry.Scope, context: LogContext): void;
|
|
@@ -103,5 +103,5 @@ export declare function serializeGenAiAttribute(value: unknown, maxChars?: numbe
|
|
|
103
103
|
*/
|
|
104
104
|
export declare function extractGenAiUsageSummary(...sources: unknown[]): AgentTurnUsage;
|
|
105
105
|
/** Extract GenAI token usage attributes from AI provider usage metadata for tracing. */
|
|
106
|
-
export declare function extractGenAiUsageAttributes(...sources: unknown[]): Partial<Record<"gen_ai.usage.input_tokens" | "gen_ai.usage.output_tokens" | "gen_ai.usage.
|
|
106
|
+
export declare function extractGenAiUsageAttributes(...sources: unknown[]): Partial<Record<"gen_ai.usage.input_tokens" | "gen_ai.usage.output_tokens" | "gen_ai.usage.input_tokens.cached" | "gen_ai.usage.input_tokens.cache_write" | "gen_ai.usage.total_tokens", number>>;
|
|
107
107
|
export {};
|
package/dist/chat/no-reply.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const NO_REPLY_MARKER = "[[NO_REPLY]]";
|
|
2
|
-
/** Detect the reserved marker
|
|
2
|
+
/** Detect the reserved marker for intentionally completing without thread text. */
|
|
3
3
|
export declare function isNoReplyMarker(text: string): boolean;
|
|
4
4
|
/** Detect marker leaks before publication strips or rejects them. */
|
|
5
5
|
export declare function containsNoReplyMarker(text: string): boolean;
|
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
/** Permissive schema for durable Pi SDK messages whose content shape may evolve. */
|
|
3
3
|
export declare const piMessageSchema: z.ZodPipe<z.ZodObject<{
|
|
4
4
|
role: z.ZodString;
|
|
5
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").
|
|
5
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
6
6
|
[x: string]: unknown;
|
|
7
7
|
role: string;
|
|
8
8
|
}>>;
|
|
@@ -12,7 +12,7 @@ export type PiMessage = z.output<typeof piMessageSchema>;
|
|
|
12
12
|
export declare const piContentMessageSchema: z.ZodPipe<z.ZodObject<{
|
|
13
13
|
content: z.ZodArray<z.ZodUnknown>;
|
|
14
14
|
role: z.ZodString;
|
|
15
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").
|
|
15
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
16
16
|
[x: string]: unknown;
|
|
17
17
|
content: unknown[];
|
|
18
18
|
role: string;
|
|
@@ -27,5 +27,20 @@ export declare function getTerminalAssistantMessages(messages: readonly unknown[
|
|
|
27
27
|
export declare function trimTrailingAssistantMessages(messages: PiMessage[]): PiMessage[];
|
|
28
28
|
/** Return whether Pi history already carries session bootstrap context. */
|
|
29
29
|
export declare function hasRuntimeTurnContext(messages: PiMessage[]): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Reduce a runtime user-turn prompt to only the current turn's instruction.
|
|
32
|
+
*
|
|
33
|
+
* Live user prompts embed prior-thread context blocks (`<thread-transcript>`,
|
|
34
|
+
* `<recent-thread-messages>`, `<thread-compactions>`, `<thread-background>`) in
|
|
35
|
+
* the same message that carries the `<current-instruction>` block. Those blocks
|
|
36
|
+
* hold other participants' verbatim messages, so completed-run projections
|
|
37
|
+
* consumed by plugins must expose only the instruction authored by this turn's
|
|
38
|
+
* actor — otherwise per-entry provenance can be defeated by reading another
|
|
39
|
+
* user's text out of an instruction-authority entry. Prior thread context is
|
|
40
|
+
* projected separately as per-author context-authority entries, so dropping it
|
|
41
|
+
* here is non-lossy for plugins. This is projection-only; it never touches what
|
|
42
|
+
* the model sees during a live run.
|
|
43
|
+
*/
|
|
44
|
+
export declare function instructionTextForProjection(text: string): string;
|
|
30
45
|
/** Remove volatile runtime context before reusing messages as history. */
|
|
31
46
|
export declare function stripRuntimeTurnContext(messages: PiMessage[]): PiMessage[];
|
|
@@ -3,7 +3,7 @@ import type { PluginPromptContributionContext } from "@/chat/plugins/prompt";
|
|
|
3
3
|
import type { AnyToolDefinition } from "@/chat/tools/definition";
|
|
4
4
|
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
5
5
|
import type { SandboxInstance } from "@/chat/sandbox/workspace";
|
|
6
|
-
import type {
|
|
6
|
+
import type { Actor } from "@/chat/actor";
|
|
7
7
|
/** Signal that a plugin intentionally denied a tool execution. */
|
|
8
8
|
export declare class PluginHookDeniedError extends Error {
|
|
9
9
|
constructor(message: string);
|
|
@@ -37,7 +37,7 @@ export declare function getPlugins(): PluginRegistration[];
|
|
|
37
37
|
export declare function getPluginSystemPromptContributions(source: ToolRuntimeContext["source"]): Promise<PluginPromptContributionContext[]>;
|
|
38
38
|
/** Collect request-scoped plugin prompt contributions. */
|
|
39
39
|
export declare function getPluginUserPromptContributions(args: {
|
|
40
|
-
context: Pick<ToolRuntimeContext, "conversationId" | "destination" | "
|
|
40
|
+
context: Pick<ToolRuntimeContext, "conversationId" | "destination" | "actor" | "source" | "userText">;
|
|
41
41
|
}): Promise<PluginPromptContributionContext[]>;
|
|
42
42
|
/** Collect turn-scoped tools exposed by plugins. */
|
|
43
43
|
export declare function getPluginTools(context: ToolRuntimeContext): Record<string, AnyToolDefinition>;
|
|
@@ -51,5 +51,5 @@ export declare function getPluginSlackConversationLink(conversationId: string):
|
|
|
51
51
|
export declare function getPluginOperationalReports(nowMs: number, conversations: PluginConversations): Promise<PluginOperationalReport[]>;
|
|
52
52
|
/** Create one runner over runtime hook plugins registered by the app. */
|
|
53
53
|
export declare function createPluginHookRunner(input?: {
|
|
54
|
-
|
|
54
|
+
actor?: Actor;
|
|
55
55
|
}): PluginHookRunner;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PluginCredentialResult, type PluginGrant, type PluginProviderAccount } from "@sentry/junior-plugin-api";
|
|
1
|
+
import { type PluginCredentialActor, type PluginCredentialResult, type PluginGrant, type PluginProviderAccount } from "@sentry/junior-plugin-api";
|
|
2
2
|
import type { StoredTokens, UserTokenStore } from "@/chat/credentials/user-token-store";
|
|
3
3
|
export interface EgressGrantInput {
|
|
4
4
|
bodyText?: string;
|
|
@@ -31,13 +31,7 @@ export declare function onPluginEgressResponse(input: EgressResponseInput): Prom
|
|
|
31
31
|
/** Return whether a plugin owns credential issuance for egress. */
|
|
32
32
|
export declare function hasEgressCredentialHooks(provider: string): boolean;
|
|
33
33
|
export interface IssueCredentialInput {
|
|
34
|
-
actor:
|
|
35
|
-
type: "system";
|
|
36
|
-
id: string;
|
|
37
|
-
} | {
|
|
38
|
-
type: "user";
|
|
39
|
-
userId: string;
|
|
40
|
-
};
|
|
34
|
+
actor: PluginCredentialActor;
|
|
41
35
|
credentialSubject?: {
|
|
42
36
|
type: "user";
|
|
43
37
|
userId: string;
|
package/dist/chat/prompt.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { ThreadArtifactsState } from "@/chat/state/artifacts";
|
|
|
3
3
|
import type { SkillMetadata, SkillInvocation } from "@/chat/skills";
|
|
4
4
|
import type { ActiveMcpCatalogSummary } from "@/chat/tool-support/skill/mcp-tool-summary";
|
|
5
5
|
import type { PluginPromptContributionContext } from "@/chat/plugins/prompt";
|
|
6
|
-
import type { Destination, Source } from "@sentry/junior-plugin-api";
|
|
6
|
+
import type { Destination, Source, SystemActor } from "@sentry/junior-plugin-api";
|
|
7
7
|
export declare const JUNIOR_PERSONALITY: string;
|
|
8
8
|
export declare const JUNIOR_WORLD: string | null;
|
|
9
9
|
interface ToolPromptContext {
|
|
@@ -24,17 +24,14 @@ type TurnContextPromptInput = {
|
|
|
24
24
|
slackConversation?: SlackConversationContext;
|
|
25
25
|
};
|
|
26
26
|
dispatch?: {
|
|
27
|
-
actor?:
|
|
28
|
-
id: string;
|
|
29
|
-
type: string;
|
|
30
|
-
};
|
|
27
|
+
actor?: SystemActor;
|
|
31
28
|
destination: Destination;
|
|
32
29
|
metadata?: Record<string, string>;
|
|
33
30
|
plugin?: string;
|
|
34
31
|
source: Source;
|
|
35
32
|
};
|
|
36
33
|
invocation: SkillInvocation | null;
|
|
37
|
-
|
|
34
|
+
actor?: {
|
|
38
35
|
userName?: string;
|
|
39
36
|
fullName?: string;
|
|
40
37
|
userId?: string;
|