@sentry/junior 0.106.0 → 0.107.1
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-KR5BCWOK.js → agent-hooks-ICPIJAFY.js} +9 -7
- package/dist/api/conversations/detail.d.ts +1 -1
- package/dist/api/conversations/events.d.ts +14 -0
- package/dist/api/conversations/schema.d.ts +196 -463
- package/dist/api/schema.d.ts +2 -7
- package/dist/api/schema.js +10 -8
- package/dist/api.js +377 -810
- package/dist/app.js +3586 -3614
- package/dist/{catalog-runtime-5CVM2DOF.js → catalog-runtime-FOFNPR3P.js} +3 -2
- package/dist/chat/agent/prompt.d.ts +1 -1
- package/dist/chat/agent/request.d.ts +28 -29
- package/dist/chat/agent/resume.d.ts +7 -7
- package/dist/chat/agent/session.d.ts +5 -6
- package/dist/chat/agent/tools.d.ts +3 -3
- package/dist/chat/agent-dispatch/runner.d.ts +2 -0
- package/dist/chat/config.d.ts +2 -2
- package/dist/chat/conversations/history.d.ts +582 -167
- package/dist/chat/conversations/message-projection.d.ts +6 -0
- package/dist/chat/conversations/message-summaries.d.ts +9 -0
- package/dist/chat/conversations/messages.d.ts +13 -27
- package/dist/chat/conversations/projection.d.ts +30 -53
- package/dist/chat/conversations/provenance.d.ts +42 -0
- package/dist/chat/conversations/search.d.ts +2 -2
- package/dist/chat/conversations/sql/conversation-row.d.ts +1 -1
- package/dist/chat/conversations/sql/event-lock.d.ts +3 -0
- package/dist/chat/conversations/sql/history.d.ts +3 -3
- package/dist/chat/conversations/sql/privacy.d.ts +27 -0
- package/dist/chat/conversations/sql/purge.d.ts +2 -10
- package/dist/chat/conversations/sql/store.d.ts +0 -5
- package/dist/chat/conversations/store.d.ts +8 -13
- package/dist/chat/conversations/turn-lifecycle.d.ts +41 -0
- package/dist/chat/db.d.ts +4 -10
- package/dist/chat/model-profile.d.ts +10 -0
- package/dist/chat/oauth-flow.d.ts +0 -5
- package/dist/chat/pi/conversation-events.d.ts +33 -0
- package/dist/chat/pi/sql-model-usage.d.ts +10 -0
- package/dist/chat/plugins/agent-hooks.d.ts +4 -2
- package/dist/chat/resource-events/ingest.d.ts +0 -13
- package/dist/chat/runtime/delivered-turn-state.d.ts +1 -1
- package/dist/chat/runtime/generated-artifacts.d.ts +1 -1
- package/dist/chat/runtime/reply-executor.d.ts +2 -0
- package/dist/chat/runtime/slack-resume.d.ts +23 -28
- package/dist/chat/runtime/slack-runtime.d.ts +2 -0
- package/dist/chat/runtime/turn.d.ts +14 -1
- package/dist/chat/services/context-compaction-marker.d.ts +0 -1
- package/dist/chat/services/context-compaction.d.ts +1 -0
- package/dist/chat/services/conversation-memory.d.ts +9 -0
- package/dist/chat/services/plugin-auth-orchestration.d.ts +1 -4
- package/dist/chat/services/subscribed-decision.d.ts +1 -1
- package/dist/chat/services/turn-failure-response.d.ts +10 -3
- package/dist/chat/services/turn-result.d.ts +7 -12
- package/dist/chat/services/{turn-reasoning-level.d.ts → turn-router.d.ts} +12 -8
- package/dist/chat/services/turn-session-record.d.ts +15 -16
- package/dist/chat/slack/adapter.d.ts +2 -2
- package/dist/chat/slack/errors.d.ts +2 -0
- package/dist/chat/slack/outbound.d.ts +0 -1
- package/dist/chat/slack/reply.d.ts +2 -8
- package/dist/chat/slack/tools/channel-capabilities.d.ts +2 -2
- package/dist/chat/slack/tools/{send-message.d.ts → send-files.d.ts} +27 -19
- package/dist/chat/state/conversation.d.ts +4 -4
- package/dist/chat/state/turn-id.d.ts +2 -0
- package/dist/chat/state/turn-session-keys.d.ts +6 -0
- package/dist/chat/state/turn-session.d.ts +11 -9
- package/dist/chat/task-execution/state.d.ts +6 -1
- package/dist/chat/task-execution/store.d.ts +1 -1
- package/dist/chat/tool-support/pi-tool-adapter.d.ts +1 -1
- package/dist/chat/tool-support/tool-execution-report.d.ts +1 -0
- package/dist/chat/tools/handoff/tool.d.ts +2 -2
- package/dist/chat/tools/sandbox/file-uploads.d.ts +28 -6
- package/dist/chat/tools/types.d.ts +6 -9
- package/dist/chat/tools/web/image-generate.d.ts +4 -6
- package/dist/{chunk-DDRQ4U7I.js → chunk-4YF7Z6IA.js} +390 -270
- package/dist/{chunk-AZ5OMSN5.js → chunk-AUUOHQAT.js} +2 -2
- package/dist/chunk-B2Z2H66D.js +250 -0
- package/dist/{chunk-4W4O4DCV.js → chunk-CQ7KSO2B.js} +75 -45
- package/dist/{chunk-MJSJAHBW.js → chunk-DY7TRYB5.js} +1 -1
- package/dist/{chunk-GPPUTY5M.js → chunk-EDLNHZH3.js} +861 -891
- package/dist/{chunk-R5BFYK2O.js → chunk-IGHMVDWI.js} +134 -18
- package/dist/chunk-MU6HHZEN.js +99 -0
- package/dist/{chunk-XTKJPSMF.js → chunk-NVOTGWYX.js} +458 -684
- package/dist/{chunk-AEWZ7F65.js → chunk-O24R4DCK.js} +2 -179
- package/dist/{chunk-CCFROYAV.js → chunk-PUAMO4PI.js} +115 -125
- package/dist/{chunk-ZMRLBBD5.js → chunk-RMVOAJRL.js} +30 -13
- package/dist/{chunk-3NYUCBLE.js → chunk-SPUAJVVH.js} +6 -4
- package/dist/{chunk-4UYIRWDW.js → chunk-SS67LUOK.js} +41 -290
- package/dist/{chunk-FXFQNHRU.js → chunk-VFUK3X5B.js} +4 -2
- package/dist/{chunk-3MPPVPGZ.js → chunk-VH6KWKG2.js} +2 -2
- package/dist/chunk-VIXFG2VC.js +182 -0
- package/dist/{chunk-BKM4UXUD.js → chunk-YFQ7CQDE.js} +669 -18
- package/dist/{chunk-77LHNQK4.js → chunk-YIPD3L6L.js} +4 -2
- package/dist/{chunk-3OUSJPR7.js → chunk-YNP2ATQX.js} +6 -4
- package/dist/{chunk-WR7H7VLJ.js → chunk-YT72TOEK.js} +2 -2
- package/dist/cli/chat.js +21 -20
- package/dist/cli/check.js +4 -3
- package/dist/cli/plugins.js +11 -9
- package/dist/cli/snapshot-warmup.js +7 -5
- package/dist/cli/upgrade.js +2041 -105
- package/dist/db/schema/{agent-steps.d.ts → conversation-events.d.ts} +37 -21
- package/dist/db/schema.d.ts +28 -159
- package/dist/{db-S33LFWG2.js → db-DIGO4TGW.js} +6 -8
- package/dist/{runner-HA5XAL6K.js → runner-ACR2HAIC.js} +209 -101
- package/dist/{skills-722AXRV5.js → skills-ITNHBARB.js} +4 -3
- package/dist/{validation-EUI2UFRM.js → validation-AGQ46ZGV.js} +4 -3
- package/migrations/0005_conversation_events.sql +122 -0
- package/migrations/README.md +23 -10
- package/migrations/meta/0005_snapshot.json +948 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +5 -5
- package/dist/api/conversations/activity.d.ts +0 -40
- package/dist/api/conversations/detail-projection.d.ts +0 -11
- package/dist/api/conversations/detail.query.d.ts +0 -3
- package/dist/api/conversations/subagent.d.ts +0 -10
- package/dist/api/conversations/transcript.d.ts +0 -28
- package/dist/chat/conversations/legacy-advisor-session.d.ts +0 -7
- package/dist/chat/conversations/legacy-import.d.ts +0 -38
- package/dist/chat/conversations/sql/legacy-history-import.d.ts +0 -55
- package/dist/chat/conversations/sql/messages.d.ts +0 -4
- package/dist/chat/conversations/visible-compactions.d.ts +0 -11
- package/dist/chat/conversations/visible-messages.d.ts +0 -47
- package/dist/chat/services/reply-delivery-plan.d.ts +0 -5
- package/dist/chat/state/session-log.d.ts +0 -384
- package/dist/chunk-P4P7O5WG.js +0 -1072
- package/dist/chunk-XIMUQ4IU.js +0 -147
- package/dist/db/schema/conversation-messages.d.ts +0 -153
- package/dist/handlers/github-webhook/check-suite.d.ts +0 -3
- package/dist/handlers/github-webhook/issue-comment.d.ts +0 -3
- package/dist/handlers/github-webhook/pull-request-review-comment.d.ts +0 -3
- package/dist/handlers/github-webhook/pull-request-review.d.ts +0 -3
- package/dist/handlers/github-webhook/pull-request.d.ts +0 -3
- package/dist/handlers/github-webhook/resource.d.ts +0 -10
- package/dist/handlers/github-webhook.d.ts +0 -15
- package/dist/legacy-import-TMJISRKO.js +0 -18
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AgentRunRequest } from "@/chat/agent/request";
|
|
2
2
|
import type { AgentRunResult } from "@/chat/services/turn-result";
|
|
3
3
|
import type { AgentRunner } from "@/chat/runtime/agent-runner";
|
|
4
|
+
import { type ConversationTurnLifecycle } from "@/chat/conversations/turn-lifecycle";
|
|
4
5
|
import { type AssistantStatusSpec } from "@/chat/slack/assistant-thread/status";
|
|
5
6
|
import type { SlackMessageTs } from "@/chat/slack/timestamp";
|
|
6
7
|
/** Error raised when another worker already owns the resume lock. */
|
|
@@ -9,6 +10,8 @@ export declare class ResumeTurnBusyError extends Error {
|
|
|
9
10
|
}
|
|
10
11
|
interface ResumeSlackTurnArgs {
|
|
11
12
|
messageText: string;
|
|
13
|
+
conversationId: string;
|
|
14
|
+
turnId: string;
|
|
12
15
|
channelId: string;
|
|
13
16
|
threadTs: string;
|
|
14
17
|
messageTs?: SlackMessageTs;
|
|
@@ -17,6 +20,8 @@ interface ResumeSlackTurnArgs {
|
|
|
17
20
|
initialText?: string;
|
|
18
21
|
initialStatus?: AssistantStatusSpec;
|
|
19
22
|
agentRunner: AgentRunner;
|
|
23
|
+
inputMessageIds?: string[];
|
|
24
|
+
turnLifecycle?: ConversationTurnLifecycle;
|
|
20
25
|
scheduleSessionCompletedPluginTasks?: (params: {
|
|
21
26
|
conversationId: string;
|
|
22
27
|
sessionId: string;
|
|
@@ -26,44 +31,34 @@ interface ResumeSlackTurnArgs {
|
|
|
26
31
|
onAuthPause?: (pause: {
|
|
27
32
|
providerDisplayName: string;
|
|
28
33
|
}) => Promise<void>;
|
|
29
|
-
|
|
30
|
-
resumeVersion: number;
|
|
31
|
-
}) => Promise<void>;
|
|
34
|
+
onSuspend?: (resumeVersion: number) => Promise<void>;
|
|
32
35
|
onPostDeliveryCommitFailure?: (error: unknown) => Promise<void>;
|
|
33
|
-
beforeStart?: () => Promise<
|
|
36
|
+
beforeStart?: () => Promise<ResumePreparedTurn | false | void>;
|
|
34
37
|
replyTimeoutMs?: number;
|
|
35
38
|
}
|
|
36
|
-
type ResumeReplyContext = Omit<AgentRunRequest, "input"> & {
|
|
39
|
+
type ResumeReplyContext = Omit<AgentRunRequest, "conversationId" | "turnId" | "runId" | "input" | "delivery"> & {
|
|
37
40
|
input?: Omit<AgentRunRequest["input"], "messageText">;
|
|
38
41
|
};
|
|
39
|
-
|
|
40
|
-
* Resume a paused Slack turn under the normal thread lock.
|
|
41
|
-
*
|
|
42
|
-
* Started resumes own their terminal side effects: final delivery, pause
|
|
43
|
-
* persistence, or failure response. Returns false only when `beforeStart`
|
|
44
|
-
* proves the resume is stale before generation begins.
|
|
45
|
-
*/
|
|
46
|
-
export declare function resumeSlackTurn(args: ResumeSlackTurnArgs): Promise<boolean>;
|
|
47
|
-
/** Resume an OAuth-paused Slack request through the shared resume runner. */
|
|
48
|
-
export declare function resumeAuthorizedRequest(args: {
|
|
42
|
+
interface ResumePreparedTurn {
|
|
49
43
|
messageText: string;
|
|
50
|
-
channelId: string;
|
|
51
|
-
threadTs: string;
|
|
52
44
|
messageTs?: SlackMessageTs;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
agentRunner: AgentRunner;
|
|
45
|
+
inputMessageIds?: string[];
|
|
46
|
+
initialStatus?: AssistantStatusSpec;
|
|
47
|
+
replyContext: ResumeReplyContext;
|
|
57
48
|
onSuccess?: (reply: AgentRunResult) => Promise<void>;
|
|
58
49
|
onFailure?: (error: unknown) => Promise<void>;
|
|
59
50
|
onAuthPause?: (pause: {
|
|
60
51
|
providerDisplayName: string;
|
|
61
52
|
}) => Promise<void>;
|
|
62
|
-
|
|
63
|
-
resumeVersion: number;
|
|
64
|
-
}) => Promise<void>;
|
|
53
|
+
onSuspend?: (resumeVersion: number) => Promise<void>;
|
|
65
54
|
onPostDeliveryCommitFailure?: (error: unknown) => Promise<void>;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Resume a paused Slack turn under the normal thread lock.
|
|
58
|
+
*
|
|
59
|
+
* Started resumes own their completion side effects: assistant-message
|
|
60
|
+
* delivery, pause persistence, or failure response. Returns false only when
|
|
61
|
+
* `beforeStart` proves the resume is stale before generation begins.
|
|
62
|
+
*/
|
|
63
|
+
export declare function resumeSlackTurn(args: ResumeSlackTurnArgs): Promise<boolean>;
|
|
69
64
|
export {};
|
|
@@ -10,6 +10,7 @@ import type { Message, MessageContext, Thread } from "chat";
|
|
|
10
10
|
import type { Destination } from "@sentry/junior-plugin-api";
|
|
11
11
|
import type { SubscribedReplyDecision, SubscribedReplyPolicy } from "@/chat/services/subscribed-reply-policy";
|
|
12
12
|
import { type PrepareTurnStateInput, type QueuedTurnMessage, type TurnMessageText, type TurnToolInvocation } from "@/chat/runtime/turn-input";
|
|
13
|
+
import type { FailConversationTurnInput } from "@/chat/conversations/turn-lifecycle";
|
|
13
14
|
export interface AssistantLifecycleEvent {
|
|
14
15
|
channelId: string;
|
|
15
16
|
context?: {
|
|
@@ -52,6 +53,7 @@ export interface SlackTurnRuntimeDependencies<TPreparedState> {
|
|
|
52
53
|
threadId: string;
|
|
53
54
|
threadTs: string;
|
|
54
55
|
}) => Promise<void>;
|
|
56
|
+
failConversationTurn: (input: FailConversationTurnInput) => Promise<void>;
|
|
55
57
|
refreshAssistantThreadContext: (event: {
|
|
56
58
|
channelId: string;
|
|
57
59
|
sourceChannelId?: string;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import type { ThreadConversationState } from "@/chat/state/conversation";
|
|
2
|
+
import type { ConversationTurnFailureCode } from "@/chat/conversations/history";
|
|
2
3
|
export { buildDeterministicTurnId } from "@/chat/state/turn-id";
|
|
4
|
+
/** Classified Slack turn failure carrying the owning Sentry capture outward. */
|
|
5
|
+
export declare class ConversationTurnBoundaryError extends Error {
|
|
6
|
+
readonly eventId?: string;
|
|
7
|
+
readonly failureCode: ConversationTurnFailureCode;
|
|
8
|
+
constructor(args: {
|
|
9
|
+
cause: unknown;
|
|
10
|
+
eventId?: string;
|
|
11
|
+
failureCode: ConversationTurnFailureCode;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
/** Return a classified Slack boundary failure without erasing its cause. */
|
|
15
|
+
export declare function getConversationTurnBoundaryError(error: unknown): ConversationTurnBoundaryError | undefined;
|
|
3
16
|
/**
|
|
4
17
|
* Queue-worker yield routing: respond.ts returns a suspended AgentRunOutcome
|
|
5
18
|
* and the Slack executor raises this at the worker boundary so the lease owner
|
|
@@ -42,7 +55,7 @@ export declare function markTurnClosed(args: {
|
|
|
42
55
|
updateConversationStats: (conversation: ThreadConversationState) => void;
|
|
43
56
|
}): void;
|
|
44
57
|
/**
|
|
45
|
-
* Mark a turn as completed after
|
|
58
|
+
* Mark a turn as completed after its assistant output has been handled.
|
|
46
59
|
*/
|
|
47
60
|
export declare function markTurnCompleted(args: {
|
|
48
61
|
conversation: ThreadConversationState;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { PiMessage } from "@/chat/pi/messages";
|
|
2
2
|
export declare const COMPACTION_SUMMARY_PREFIX = "Context compaction summary for future Junior turns:";
|
|
3
|
-
export declare const LEGACY_COMPACTION_SUMMARY_PREFIX = "Context handoff summary for future Junior turns:";
|
|
4
3
|
export declare const MODEL_HANDOFF_SUMMARY_PREFIX = "Model handoff checkpoint. Continue the outstanding request now using this summary as the complete prior context:";
|
|
5
4
|
/** Return whether text is one of Junior's durable compacted-context markers. */
|
|
6
5
|
export declare function isCompactionSummaryText(text: string): boolean;
|
|
@@ -17,6 +17,15 @@ export declare function generateConversationId(prefix: "assistant" | "backfill"
|
|
|
17
17
|
export declare function normalizeConversationText(text: string): string;
|
|
18
18
|
export declare function updateConversationStats(conversation: ThreadConversationState): void;
|
|
19
19
|
export declare function upsertConversationMessage(conversation: ThreadConversationState, message: ConversationMessage): string;
|
|
20
|
+
/** Record one assistant message after its destination accepts it. */
|
|
21
|
+
export declare function recordDeliveredAssistantMessage(args: {
|
|
22
|
+
conversation: ThreadConversationState;
|
|
23
|
+
sessionId: string;
|
|
24
|
+
text: string;
|
|
25
|
+
userMessageId?: string;
|
|
26
|
+
}): string;
|
|
27
|
+
/** Return whether a turn already has a destination-accepted assistant reply. */
|
|
28
|
+
export declare function turnHasReply(conversation: ThreadConversationState, turnId: string): boolean;
|
|
20
29
|
export declare function markConversationMessage(conversation: ThreadConversationState, messageId: string | undefined, patch: Partial<NonNullable<ConversationMessage["meta"]>>): void;
|
|
21
30
|
/**
|
|
22
31
|
* Render thread history as structured XML. Each compaction and message is
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This module detects plugin credential failures from the sandbox egress layer
|
|
5
5
|
* and maps them onto the same paused-run contract used by MCP auth. It owns
|
|
6
|
-
* provider attribution, private-link delivery/reuse,
|
|
6
|
+
* provider attribution, private-link delivery/reuse, event-log recording,
|
|
7
7
|
* and credential cleanup.
|
|
8
8
|
*
|
|
9
9
|
* Auth failures are detected exclusively through the structured `auth_required`
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
* stdout patterns, or exit codes.
|
|
12
12
|
*/
|
|
13
13
|
import type { Destination, Source } from "@sentry/junior-plugin-api";
|
|
14
|
-
import type { ChannelConfigurationService } from "@/chat/configuration/types";
|
|
15
14
|
import type { UserTokenStore } from "@/chat/credentials/user-token-store";
|
|
16
15
|
import { AuthorizationPauseError, type AuthorizationFlowMode } from "@/chat/services/auth-pause";
|
|
17
16
|
import type { ConversationPendingAuthState } from "@/chat/state/conversation";
|
|
@@ -31,8 +30,6 @@ export interface PluginAuthOrchestrationInput {
|
|
|
31
30
|
destination?: Destination;
|
|
32
31
|
source?: Source;
|
|
33
32
|
threadTs?: string;
|
|
34
|
-
userMessage: string;
|
|
35
|
-
channelConfiguration?: ChannelConfigurationService;
|
|
36
33
|
pendingAuth?: ConversationPendingAuthState;
|
|
37
34
|
recordPendingAuth?: (pendingAuth: ConversationPendingAuthState) => void | Promise<void>;
|
|
38
35
|
authorizationFlowMode?: AuthorizationFlowMode;
|
|
@@ -33,7 +33,7 @@ declare const replyDecisionSchema: z.ZodObject<{
|
|
|
33
33
|
should_reply: z.ZodBoolean;
|
|
34
34
|
should_unsubscribe: z.ZodBoolean;
|
|
35
35
|
confidence: z.ZodNumber;
|
|
36
|
-
reason: z.
|
|
36
|
+
reason: z.ZodString;
|
|
37
37
|
}, z.core.$strict>;
|
|
38
38
|
/** Fast heuristic check before the LLM classifier — skips messages directed at another party. */
|
|
39
39
|
export declare function getSubscribedReplyPreflightDecision(args: {
|
|
@@ -5,11 +5,18 @@ type LogException = (error: unknown, eventName: string, context?: LogContext, at
|
|
|
5
5
|
export declare function requireTurnFailureEventId(eventId: string | undefined, eventName: string): string;
|
|
6
6
|
/** Keep failed-turn Sentry captures and completion spans on the same keys. */
|
|
7
7
|
export declare function getAgentTurnDiagnosticsAttributes(reply: AgentRunResult): Record<string, unknown>;
|
|
8
|
-
/**
|
|
9
|
-
export
|
|
8
|
+
/** Sanitized failure fallback plus its optional captured event ID. */
|
|
9
|
+
export interface FinalizedTurnFailure {
|
|
10
|
+
eventId?: string;
|
|
11
|
+
reply: AgentRunResult;
|
|
12
|
+
}
|
|
13
|
+
/** Enforce one captured failure response and return its structured correlation. */
|
|
14
|
+
export declare function finalizeFailedTurnReplyWithEvent(args: {
|
|
10
15
|
reply: AgentRunResult;
|
|
11
16
|
logException: LogException;
|
|
12
17
|
context: LogContext;
|
|
13
18
|
attributes?: Record<string, unknown>;
|
|
14
|
-
}):
|
|
19
|
+
}): FinalizedTurnFailure;
|
|
20
|
+
/** Enforce one captured, event-ID-bearing failure response before delivery. */
|
|
21
|
+
export declare function finalizeFailedTurnReply(args: Parameters<typeof finalizeFailedTurnReplyWithEvent>[0]): AgentRunResult;
|
|
15
22
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { LogContext } from "@/chat/logging";
|
|
2
2
|
import type { PiMessage } from "@/chat/pi/messages";
|
|
3
|
-
import type {
|
|
3
|
+
import type { TurnRoute } from "@/chat/services/turn-router";
|
|
4
4
|
import type { AgentTurnUsage } from "@/chat/usage";
|
|
5
|
-
import type { ReplyDeliveryPlan } from "@/chat/services/reply-delivery-plan";
|
|
6
5
|
import type { ThreadArtifactsState } from "@/chat/state/artifacts";
|
|
6
|
+
import { extractAssistantText } from "@/chat/pi/transcript";
|
|
7
7
|
export interface AgentTurnDiagnostics {
|
|
8
8
|
assistantMessageCount: number;
|
|
9
9
|
durationMs?: number;
|
|
@@ -11,7 +11,7 @@ export interface AgentTurnDiagnostics {
|
|
|
11
11
|
providerError?: unknown;
|
|
12
12
|
modelId: string;
|
|
13
13
|
outcome: "success" | "execution_failure" | "provider_error";
|
|
14
|
-
reasoningLevel?:
|
|
14
|
+
reasoningLevel?: TurnRoute["reasoningLevel"];
|
|
15
15
|
stopReason?: string;
|
|
16
16
|
toolCalls: string[];
|
|
17
17
|
toolErrorCount: number;
|
|
@@ -20,10 +20,9 @@ export interface AgentTurnDiagnostics {
|
|
|
20
20
|
usedPrimaryText: boolean;
|
|
21
21
|
}
|
|
22
22
|
export interface AgentRunResult {
|
|
23
|
+
/** Sanitized terminal text for diagnostics and failure fallback, not success delivery. */
|
|
23
24
|
text: string;
|
|
24
25
|
artifactStatePatch?: Partial<ThreadArtifactsState>;
|
|
25
|
-
deliveryPlan?: ReplyDeliveryPlan;
|
|
26
|
-
deliveryMode?: "thread" | "channel_only";
|
|
27
26
|
sandboxId?: string;
|
|
28
27
|
sandboxDependencyProfileHash?: string;
|
|
29
28
|
piMessages?: PiMessage[];
|
|
@@ -42,15 +41,11 @@ export interface TurnResultInput {
|
|
|
42
41
|
shouldTrace: boolean;
|
|
43
42
|
spanContext: LogContext;
|
|
44
43
|
usage?: AgentTurnUsage;
|
|
45
|
-
|
|
46
|
-
correlation?: {
|
|
47
|
-
threadId?: string;
|
|
48
|
-
actorId?: string;
|
|
49
|
-
channelId?: string;
|
|
50
|
-
runId?: string;
|
|
51
|
-
};
|
|
44
|
+
executionProfile: TurnRoute;
|
|
52
45
|
assistantUserName?: string;
|
|
53
46
|
modelId: string;
|
|
54
47
|
}
|
|
48
|
+
/** Return destination-visible text from one completed tool-free assistant message. */
|
|
49
|
+
export declare function getAssistantMessageText(message: Parameters<typeof extractAssistantText>[0]): string | undefined;
|
|
55
50
|
/** Process raw agent messages into a structured AgentRunResult. */
|
|
56
51
|
export declare function buildTurnResult(input: TurnResultInput): AgentRunResult;
|
|
@@ -2,7 +2,8 @@ import type { ThinkingLevel as AgentThinkingLevel } from "@earendil-works/pi-age
|
|
|
2
2
|
import type { ThinkingLevel as ProviderThinkingLevel } from "@earendil-works/pi-ai";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { type TurnReasoningLevel } from "@/chat/reasoning-level";
|
|
5
|
-
|
|
5
|
+
import { type ModelProfile, type ExecutionProfileConfig } from "@/chat/model-profile";
|
|
6
|
+
declare function createTurnRouteSchema(profiles: Readonly<Record<string, ExecutionProfileConfig>>): z.ZodObject<{
|
|
6
7
|
reasoning_level: z.ZodEnum<{
|
|
7
8
|
low: "low";
|
|
8
9
|
medium: "medium";
|
|
@@ -10,21 +11,23 @@ declare const turnExecutionProfileSchema: z.ZodObject<{
|
|
|
10
11
|
xhigh: "xhigh";
|
|
11
12
|
none: "none";
|
|
12
13
|
}>;
|
|
14
|
+
profile: z.ZodString;
|
|
13
15
|
confidence: z.ZodPreprocess<z.ZodNumber>;
|
|
14
16
|
reason: z.ZodString;
|
|
15
17
|
}, z.core.$strip>;
|
|
16
|
-
export interface
|
|
18
|
+
export interface TurnRoute {
|
|
17
19
|
confidence?: number;
|
|
20
|
+
profile: ModelProfile;
|
|
18
21
|
reasoningLevel: TurnReasoningLevel;
|
|
19
22
|
reason: string;
|
|
20
23
|
}
|
|
21
24
|
/** Preserve an explicitly configured reasoning level without invoking the router. */
|
|
22
|
-
export declare function
|
|
23
|
-
/**
|
|
24
|
-
export declare function
|
|
25
|
+
export declare function configuredTurnRoute(profile: ModelProfile, reasoningLevel: TurnReasoningLevel, source: "agent_config" | "default" | "profile"): TurnRoute;
|
|
26
|
+
/** Route the upcoming assistant turn to its reasoning and model profiles. */
|
|
27
|
+
export declare function selectTurnRoute(args: {
|
|
25
28
|
completeObject: (args: {
|
|
26
29
|
modelId: string;
|
|
27
|
-
schema: typeof
|
|
30
|
+
schema: ReturnType<typeof createTurnRouteSchema>;
|
|
28
31
|
maxTokens: number;
|
|
29
32
|
metadata: Record<string, string>;
|
|
30
33
|
prompt: string;
|
|
@@ -44,7 +47,8 @@ export declare function selectTurnReasoningLevel(args: {
|
|
|
44
47
|
currentTurnBlocks?: string[];
|
|
45
48
|
fastModelId: string;
|
|
46
49
|
messageText: string;
|
|
47
|
-
|
|
50
|
+
profiles: Readonly<Record<string, ExecutionProfileConfig>>;
|
|
51
|
+
}): Promise<TurnRoute>;
|
|
48
52
|
/** Convert a routing bucket into the Pi Agent reasoning setting for a main turn. */
|
|
49
|
-
export declare function toPiReasoningLevel(level:
|
|
53
|
+
export declare function toPiReasoningLevel(level: TurnRoute["reasoningLevel"]): AgentThinkingLevel | "off";
|
|
50
54
|
export {};
|
|
@@ -2,14 +2,13 @@ import { type AgentTurnSessionRecord, type AgentTurnSurface } from "@/chat/state
|
|
|
2
2
|
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
3
3
|
import type { Destination, Actor, Source } from "@sentry/junior-plugin-api";
|
|
4
4
|
import type { PiMessage } from "@/chat/pi/messages";
|
|
5
|
-
import type {
|
|
5
|
+
import type { ConversationMessageProvenance } from "@/chat/conversations/provenance";
|
|
6
6
|
import { type AgentTurnUsage } from "@/chat/usage";
|
|
7
7
|
export interface TurnSessionContext {
|
|
8
|
-
conversationId
|
|
9
|
-
sessionId
|
|
8
|
+
conversationId: string;
|
|
9
|
+
sessionId: string;
|
|
10
10
|
}
|
|
11
11
|
export interface TurnSessionState {
|
|
12
|
-
canUseTurnSession: boolean;
|
|
13
12
|
resumedFromSessionRecord: boolean;
|
|
14
13
|
currentSliceId: number;
|
|
15
14
|
existingSessionRecord?: AgentTurnSessionRecord;
|
|
@@ -33,7 +32,7 @@ export declare function persistRunningSessionRecord(args: {
|
|
|
33
32
|
sliceId: number;
|
|
34
33
|
messages: PiMessage[];
|
|
35
34
|
/** Provenance for trailing newly committed messages, such as steering. */
|
|
36
|
-
trailingMessageProvenance?:
|
|
35
|
+
trailingMessageProvenance?: ConversationMessageProvenance[];
|
|
37
36
|
loadedSkillNames?: string[];
|
|
38
37
|
logContext: SessionRecordLogContext;
|
|
39
38
|
modelId: string;
|
|
@@ -43,13 +42,13 @@ export declare function persistRunningSessionRecord(args: {
|
|
|
43
42
|
turnStartMessageIndex?: number;
|
|
44
43
|
}): Promise<boolean>;
|
|
45
44
|
/**
|
|
46
|
-
* Commit
|
|
45
|
+
* Commit a run after assistant output handling has settled.
|
|
47
46
|
*
|
|
48
|
-
* Generation completing is not
|
|
49
|
-
* accepted
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
47
|
+
* Generation completing is not durable completion: call this only after the
|
|
48
|
+
* destination accepted each visible message or intentional silence was
|
|
49
|
+
* resolved. The write is retried because output may already be user-visible;
|
|
50
|
+
* any remaining failure surfaces to the post-output boundary for one
|
|
51
|
+
* authoritative error.
|
|
53
52
|
*/
|
|
54
53
|
export declare function persistCompletedSessionRecord(args: {
|
|
55
54
|
channelName?: string;
|
|
@@ -114,11 +113,7 @@ export declare function persistAuthPauseSessionRecord(args: {
|
|
|
114
113
|
reasoningLevel?: string;
|
|
115
114
|
surface?: AgentTurnSurface;
|
|
116
115
|
}): Promise<AgentTurnSessionRecord | undefined>;
|
|
117
|
-
|
|
118
|
-
* Persist a timeout session record at the last safe boundary. Returns the durable
|
|
119
|
-
* record so callers can distinguish scheduled continuations from terminal caps.
|
|
120
|
-
*/
|
|
121
|
-
export declare function persistTimeoutSessionRecord(args: {
|
|
116
|
+
interface ContinuationRecordInput {
|
|
122
117
|
channelName?: string;
|
|
123
118
|
conversationId: string;
|
|
124
119
|
sessionId: string;
|
|
@@ -135,6 +130,10 @@ export declare function persistTimeoutSessionRecord(args: {
|
|
|
135
130
|
actor?: Actor;
|
|
136
131
|
reasoningLevel?: string;
|
|
137
132
|
surface?: AgentTurnSurface;
|
|
133
|
+
}
|
|
134
|
+
/** Persist a timeout or delivery retry under the turn's shared slice limit. */
|
|
135
|
+
export declare function persistContinuationSessionRecord(args: ContinuationRecordInput & {
|
|
136
|
+
resumeReason: "retry" | "timeout";
|
|
138
137
|
}): Promise<AgentTurnSessionRecord | undefined>;
|
|
139
138
|
/**
|
|
140
139
|
* Persist a cooperative-yield boundary without advancing timeout slice counts.
|
|
@@ -3,7 +3,7 @@ import { type SlackAdapter, type SlackAdapterConfig } from "@chat-adapter/slack"
|
|
|
3
3
|
* Create the repository's Slack adapter.
|
|
4
4
|
*
|
|
5
5
|
* Junior used to patch private Slack adapter internals to alter native stream
|
|
6
|
-
* buffering. Visible reply delivery now relies on
|
|
7
|
-
*
|
|
6
|
+
* buffering. Visible reply delivery now relies on completed assistant-message
|
|
7
|
+
* thread posts plus status updates, so we keep the documented surface.
|
|
8
8
|
*/
|
|
9
9
|
export declare function createJuniorSlackAdapter(config?: SlackAdapterConfig): SlackAdapter;
|
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
export declare function getSlackApiErrorCode(error: unknown): string | undefined;
|
|
3
3
|
/** Convert Slack Web API error details into the repository's trace attributes. */
|
|
4
4
|
export declare function getSlackErrorObservabilityAttributes(error: unknown): Record<string, string | number>;
|
|
5
|
+
/** Recover transient or ambiguous Slack failures, but stop on explicit rejection. */
|
|
6
|
+
export declare function isRetryableSlackPostError(error: unknown): boolean;
|
|
5
7
|
/** Report whether Slack rejected assistant title updates for stable auth reasons. */
|
|
6
8
|
export declare function isSlackTitlePermissionError(error: unknown): boolean;
|
|
@@ -41,7 +41,6 @@ export interface SlackUploadedFile {
|
|
|
41
41
|
/** Upload files into a Slack conversation or thread via the shared outbound file boundary. */
|
|
42
42
|
export declare function uploadFilesToConversation(input: {
|
|
43
43
|
channelId: string;
|
|
44
|
-
initialComment?: string;
|
|
45
44
|
threadTs?: string;
|
|
46
45
|
files: Array<{
|
|
47
46
|
data: Buffer;
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import type { AgentRunResult } from "@/chat/services/turn-result";
|
|
2
1
|
import { type SlackReplyFooter } from "@/chat/slack/footer";
|
|
3
2
|
export type PlannedSlackReplyStage = "thread_reply" | "thread_reply_continuation";
|
|
4
3
|
export interface PlannedSlackReplyPost {
|
|
5
4
|
stage: PlannedSlackReplyStage;
|
|
6
5
|
text: string;
|
|
7
6
|
}
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
* including chunking and interruption markers.
|
|
11
|
-
*/
|
|
12
|
-
export declare function planSlackReplyPosts(args: {
|
|
13
|
-
reply: AgentRunResult;
|
|
14
|
-
}): PlannedSlackReplyPost[];
|
|
7
|
+
/** Plan the Slack posts for one completed assistant message. */
|
|
8
|
+
export declare function planSlackAssistantMessagePosts(text: string): PlannedSlackReplyPost[];
|
|
15
9
|
/**
|
|
16
10
|
* Deliver planned Slack reply posts over raw Slack Web API calls for resume and
|
|
17
11
|
* callback handlers that do not have a Chat SDK thread object.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
export interface ChannelCapabilities {
|
|
3
3
|
/** Can create canvases in this channel (C/G/D channels). */
|
|
4
4
|
canCreateCanvas: boolean;
|
|
5
|
-
/** Can
|
|
6
|
-
|
|
5
|
+
/** Can upload files into this conversation scope (C/G/D channels). */
|
|
6
|
+
canSendFiles: boolean;
|
|
7
7
|
/** Can post standalone messages to this channel (C/G channels only). */
|
|
8
8
|
canPostToChannel: boolean;
|
|
9
9
|
/** Can add reactions to messages (C/G/D channels). */
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import type { SlackToolContext } from "@/chat/slack/tools/context";
|
|
2
|
-
import type
|
|
2
|
+
import { type SandboxFileMaterializationInput, type SandboxFileUpload } from "@/chat/tools/sandbox/file-uploads";
|
|
3
3
|
import type { ToolState } from "@/chat/tools/types";
|
|
4
4
|
/** Convert a model-supplied sandbox file path into bytes safe for Slack upload. */
|
|
5
|
-
export type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
mimeType?: string;
|
|
9
|
-
}) => Promise<SandboxFileUpload>;
|
|
10
|
-
/** Create the Slack side-effect tool for active-conversation text and file messages. */
|
|
11
|
-
export declare function createSendMessageTool(context: SlackToolContext, state: ToolState, materializeFile: MaterializeMessageFile): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
5
|
+
export type MaterializeFile = (input: SandboxFileMaterializationInput) => Promise<SandboxFileUpload>;
|
|
6
|
+
/** Create the Slack side-effect tool for active-conversation file messages. */
|
|
7
|
+
export declare function createSendFilesTool(context: SlackToolContext, state: ToolState, materializeFile: MaterializeFile): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
12
8
|
inputSchema: import("../../tools/definition").JsonSchemaObject;
|
|
13
9
|
outputSchema: import("../../tools/definition").JsonSchemaObject;
|
|
14
10
|
prepareArguments(args: unknown): {
|
|
15
|
-
|
|
16
|
-
files?: {
|
|
11
|
+
files: {
|
|
17
12
|
path: string;
|
|
18
13
|
filename?: string | null | undefined;
|
|
19
14
|
mimeType?: string | null | undefined;
|
|
20
|
-
|
|
15
|
+
bytes?: number | null | undefined;
|
|
16
|
+
}[];
|
|
21
17
|
};
|
|
22
18
|
execute?: ((input: unknown, options: import("../../tools/definition").ToolExecuteOptions) => {
|
|
23
19
|
[x: string]: unknown;
|
|
24
|
-
ok:
|
|
25
|
-
status: "
|
|
26
|
-
target
|
|
27
|
-
data
|
|
20
|
+
ok: true;
|
|
21
|
+
status: "success";
|
|
22
|
+
target: string;
|
|
23
|
+
data: {
|
|
24
|
+
channel_id: string;
|
|
25
|
+
file_count: number;
|
|
26
|
+
thread_ts: string;
|
|
27
|
+
deduplicated?: boolean | undefined;
|
|
28
|
+
file_ids?: string[] | undefined;
|
|
29
|
+
};
|
|
28
30
|
truncated?: boolean | undefined;
|
|
29
31
|
continuation?: {
|
|
30
32
|
arguments: Record<string, unknown>;
|
|
@@ -37,10 +39,16 @@ export declare function createSendMessageTool(context: SlackToolContext, state:
|
|
|
37
39
|
} | undefined;
|
|
38
40
|
} | Promise<{
|
|
39
41
|
[x: string]: unknown;
|
|
40
|
-
ok:
|
|
41
|
-
status: "
|
|
42
|
-
target
|
|
43
|
-
data
|
|
42
|
+
ok: true;
|
|
43
|
+
status: "success";
|
|
44
|
+
target: string;
|
|
45
|
+
data: {
|
|
46
|
+
channel_id: string;
|
|
47
|
+
file_count: number;
|
|
48
|
+
thread_ts: string;
|
|
49
|
+
deduplicated?: boolean | undefined;
|
|
50
|
+
file_ids?: string[] | undefined;
|
|
51
|
+
};
|
|
44
52
|
truncated?: boolean | undefined;
|
|
45
53
|
continuation?: {
|
|
46
54
|
arguments: Record<string, unknown>;
|
|
@@ -24,7 +24,7 @@ export interface ConversationMessage {
|
|
|
24
24
|
text: string;
|
|
25
25
|
}
|
|
26
26
|
export interface ConversationCompaction {
|
|
27
|
-
|
|
27
|
+
coveredMessageCount: number;
|
|
28
28
|
createdAtMs: number;
|
|
29
29
|
id: string;
|
|
30
30
|
summary: string;
|
|
@@ -78,9 +78,9 @@ export interface ThreadConversationState {
|
|
|
78
78
|
export declare function coerceThreadConversationState(value: unknown): ThreadConversationState;
|
|
79
79
|
/**
|
|
80
80
|
* Wrap a conversation state into the storage envelope for persistence. The
|
|
81
|
-
* visible transcript (`messages`) is not written to `thread-state`;
|
|
82
|
-
*
|
|
83
|
-
*
|
|
81
|
+
* visible transcript (`messages`) is not written to `thread-state`; visible and
|
|
82
|
+
* model history live in the SQL `ConversationEventStore`. Only runtime scratch
|
|
83
|
+
* is persisted here.
|
|
84
84
|
*/
|
|
85
85
|
export declare function buildConversationStatePatch(conversation: ThreadConversationState): {
|
|
86
86
|
conversation: Omit<ThreadConversationState, "compactions" | "messages">;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
/** Build a stable turn identifier from a message ID. */
|
|
2
2
|
export declare function buildDeterministicTurnId(messageId: string): string;
|
|
3
|
+
/** Build the stable visible assistant-message identity for one logical turn. */
|
|
4
|
+
export declare function buildDeterministicAssistantMessageId(turnId: string): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Storage prefix shared by turn-session records and their indexes. */
|
|
2
|
+
export declare const AGENT_TURN_SESSION_PREFIX = "junior:agent_turn_session";
|
|
3
|
+
/** Return the durable key for one resumable turn-session record. */
|
|
4
|
+
export declare function agentTurnSessionKey(conversationId: string, sessionId: string): string;
|
|
5
|
+
/** Return the index key for every turn session owned by one conversation. */
|
|
6
|
+
export declare function agentTurnSessionConversationIndexKey(conversationId: string): string;
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
* Turn session records.
|
|
3
3
|
*
|
|
4
4
|
* These records track one user request across auth pauses, timeout slices, and
|
|
5
|
-
* completion. Full Pi messages live in the durable
|
|
5
|
+
* completion. Full Pi messages live in the durable conversation event store; this
|
|
6
6
|
* record stores resumability metadata and a committed `seq` cursor into
|
|
7
|
-
* `
|
|
8
|
-
* boundary without duplicating the
|
|
7
|
+
* `junior_conversation_events` so resumes can materialize the exact continuable
|
|
8
|
+
* boundary without duplicating the event history.
|
|
9
9
|
*/
|
|
10
10
|
import { type StateAdapter } from "chat";
|
|
11
11
|
import { type Destination, type Source } from "@sentry/junior-plugin-api";
|
|
12
|
-
import type
|
|
12
|
+
import { type PiMessage } from "@/chat/pi/messages";
|
|
13
13
|
import { type Actor } from "@/chat/actor";
|
|
14
|
-
import { type
|
|
14
|
+
import { type ConversationMessageProvenance } from "@/chat/conversations/provenance";
|
|
15
15
|
import { type AgentTurnUsage } from "@/chat/usage";
|
|
16
16
|
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
17
17
|
import type { ConversationStore } from "@/chat/conversations/store";
|
|
18
18
|
export type AgentTurnSessionStatus = "running" | "awaiting_resume" | "completed" | "failed" | "abandoned";
|
|
19
19
|
export type AgentTurnSurface = "slack" | "api" | "scheduler" | "internal";
|
|
20
|
-
export type AgentTurnResumeReason = "timeout" | "auth" | "yield";
|
|
20
|
+
export type AgentTurnResumeReason = "timeout" | "auth" | "yield" | "retry";
|
|
21
21
|
export interface AgentTurnSessionRecord {
|
|
22
22
|
channelName?: string;
|
|
23
23
|
version: number;
|
|
@@ -33,7 +33,7 @@ export interface AgentTurnSessionRecord {
|
|
|
33
33
|
reasoningLevel?: string;
|
|
34
34
|
piMessages: PiMessage[];
|
|
35
35
|
/** Per-message provenance aligned one-to-one with `piMessages`. */
|
|
36
|
-
piMessageProvenance:
|
|
36
|
+
piMessageProvenance: ConversationMessageProvenance[];
|
|
37
37
|
/**
|
|
38
38
|
* All distinct actors annotated on this run's committed instruction-authority
|
|
39
39
|
* messages, in first-seen order. Persisted as an attribution handle so a
|
|
@@ -55,8 +55,10 @@ export interface AgentTurnSessionRecord {
|
|
|
55
55
|
updatedAtMs: number;
|
|
56
56
|
}
|
|
57
57
|
export type AgentTurnSessionSummary = Omit<AgentTurnSessionRecord, "errorMessage" | "actors" | "piMessages" | "piMessageProvenance" | "turnStartMessageIndex">;
|
|
58
|
-
/** Read a
|
|
58
|
+
/** Read a turn record pinned to the history version containing its checkpoint. */
|
|
59
59
|
export declare function getAgentTurnSessionRecord(conversationId: string, sessionId: string): Promise<AgentTurnSessionRecord | undefined>;
|
|
60
|
+
/** Read a turn session for resume, following a newer committed replacement while unfinished. */
|
|
61
|
+
export declare function getAgentTurnSessionRecordForResume(conversationId: string, sessionId: string): Promise<AgentTurnSessionRecord | undefined>;
|
|
60
62
|
/** Commit stable Pi session state and advance the turn session record. */
|
|
61
63
|
export declare function upsertAgentTurnSessionRecord(args: {
|
|
62
64
|
channelName?: string;
|
|
@@ -77,7 +79,7 @@ export declare function upsertAgentTurnSessionRecord(args: {
|
|
|
77
79
|
surface?: AgentTurnSurface;
|
|
78
80
|
piMessages: PiMessage[];
|
|
79
81
|
/** Provenance for trailing newly committed messages, such as steering. */
|
|
80
|
-
trailingMessageProvenance?:
|
|
82
|
+
trailingMessageProvenance?: ConversationMessageProvenance[];
|
|
81
83
|
actor?: Actor;
|
|
82
84
|
actors?: Actor[];
|
|
83
85
|
resumeReason?: AgentTurnResumeReason;
|