@sentry/junior 0.112.0 → 0.114.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-6MVTPKP4.js → agent-hooks-WNBUY4OB.js} +8 -8
- package/dist/api/conversations/cursor.d.ts +17 -0
- package/dist/api/conversations/detail.d.ts +40 -18
- package/dist/api/conversations/event-list.d.ts +115 -0
- package/dist/api/conversations/event-page.d.ts +18 -0
- package/dist/api/conversations/events.d.ts +6 -2
- package/dist/api/conversations/projection.d.ts +6 -1
- package/dist/api/schema/conversation.d.ts +228 -51
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -1
- package/dist/api.js +461 -139
- package/dist/app.d.ts +2 -0
- package/dist/app.js +33 -24
- package/dist/{catalog-runtime-UEO25P2J.js → catalog-runtime-6O4M6JGA.js} +5 -5
- package/dist/chat/config.d.ts +1 -1
- package/dist/chat/conversations/history.d.ts +86 -0
- package/dist/chat/conversations/projection.d.ts +20 -1
- package/dist/chat/pi/transcript.d.ts +2 -0
- package/dist/chat/services/context-budget.d.ts +7 -2
- package/dist/chat/services/context-compaction.d.ts +28 -1
- package/dist/chat/services/conversation-memory.d.ts +1 -0
- package/dist/chat/services/provider-error.d.ts +40 -0
- package/dist/chat/services/provider-retry.d.ts +3 -6
- package/dist/chat/services/turn-router.d.ts +1 -0
- package/dist/chat/task-execution/state.d.ts +2 -2
- package/dist/chat/task-execution/store.d.ts +1 -1
- package/dist/chat/tools/sandbox/edit-file.d.ts +1 -1
- package/dist/chat/tools/sandbox/text-edits.d.ts +1 -0
- package/dist/{chunk-CSS7JHEM.js → chunk-4FUEG3QY.js} +1 -1
- package/dist/{chunk-AU2JVUDF.js → chunk-5CZ7RETL.js} +1 -1
- package/dist/{chunk-SKEMI4IF.js → chunk-6QWPVTMO.js} +200 -52
- package/dist/{chunk-AWNDKI5K.js → chunk-ABPSDO6M.js} +20 -15
- package/dist/{chunk-QIALGHRN.js → chunk-FIGAF6KL.js} +34 -2
- package/dist/{chunk-TZU3R5OC.js → chunk-K2W4CK7K.js} +1 -1
- package/dist/{chunk-2FJ6WEYV.js → chunk-O4GT7LYB.js} +1 -1
- package/dist/{chunk-ZHP4KNF7.js → chunk-OSKEC4XU.js} +1 -1
- package/dist/{chunk-IV2O4HQJ.js → chunk-PM3PX42K.js} +1 -1
- package/dist/{chunk-NDQL4ESR.js → chunk-RD7EJI7H.js} +2 -2
- package/dist/{chunk-JE23YR3X.js → chunk-S4QDH23A.js} +75 -43
- package/dist/{chunk-GJG67YFS.js → chunk-TLGM5X2M.js} +2 -2
- package/dist/{chunk-VBSVNOLA.js → chunk-VNNBSKCO.js} +5 -5
- package/dist/{chunk-4EJO4HIC.js → chunk-W6RDUAO3.js} +1 -1
- package/dist/{chunk-GR4IB6OQ.js → chunk-WV4UJBAS.js} +431 -96
- package/dist/{chunk-66IP6WED.js → chunk-XLFBQJUO.js} +4 -4
- package/dist/{chunk-X3SP5RDW.js → chunk-YU6PO42Q.js} +1 -1
- package/dist/{chunk-PK4ETCUQ.js → chunk-ZGXH3REA.js} +226 -215
- package/dist/cli/chat.js +19 -19
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +11 -11
- package/dist/cli/snapshot-warmup.js +8 -8
- package/dist/cli/upgrade.js +5 -5
- package/dist/{db-P5H5RVQV.js → db-4VLP7KBF.js} +5 -5
- package/dist/instrumentation.js +2 -2
- package/dist/nitro.js +2 -2
- package/dist/{runner-B4ZDUO3R.js → runner-IPXLWQOF.js} +12 -13
- package/dist/{skills-GWTOZ3XV.js → skills-QCNZISNF.js} +6 -6
- package/dist/{validation-QFIC6XH6.js → validation-I2BW3UHD.js} +6 -6
- package/dist/version.js +1 -1
- package/package.json +6 -6
|
@@ -11,21 +11,21 @@ import {
|
|
|
11
11
|
getPlugins,
|
|
12
12
|
setPlugins,
|
|
13
13
|
validatePlugins
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-VNNBSKCO.js";
|
|
15
|
+
import "./chunk-YU6PO42Q.js";
|
|
16
|
+
import "./chunk-RD7EJI7H.js";
|
|
17
|
+
import "./chunk-FIGAF6KL.js";
|
|
18
18
|
import "./chunk-JQFJO5WH.js";
|
|
19
19
|
import "./chunk-4ZNGQH7C.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-ZGXH3REA.js";
|
|
21
21
|
import "./chunk-VFUK3X5B.js";
|
|
22
22
|
import "./chunk-6Y5L4BOM.js";
|
|
23
23
|
import "./chunk-C4MZ3GP5.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-4FUEG3QY.js";
|
|
25
25
|
import "./chunk-42WRQLJ6.js";
|
|
26
26
|
import "./chunk-6GWA276C.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-5CZ7RETL.js";
|
|
28
|
+
import "./chunk-PM3PX42K.js";
|
|
29
29
|
import "./chunk-MLKGABMK.js";
|
|
30
30
|
export {
|
|
31
31
|
PluginHookDeniedError,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const conversationCursorPayloadSchema: z.ZodObject<{
|
|
3
|
+
conversationId: z.ZodString;
|
|
4
|
+
seq: z.ZodNumber;
|
|
5
|
+
version: z.ZodLiteral<1>;
|
|
6
|
+
}, z.core.$strict>;
|
|
7
|
+
type ConversationCursorPayload = z.infer<typeof conversationCursorPayloadSchema>;
|
|
8
|
+
/** Encode an authenticated, conversation-bound event position for an API cursor. */
|
|
9
|
+
export declare function encodeConversationCursor(payload: Omit<ConversationCursorPayload, "version">): string;
|
|
10
|
+
/** Decode an authenticated reporting cursor for the expected conversation. */
|
|
11
|
+
export declare function decodeConversationCursor(args: {
|
|
12
|
+
conversationId: string;
|
|
13
|
+
cursor: string;
|
|
14
|
+
}): {
|
|
15
|
+
seq: number;
|
|
16
|
+
} | undefined;
|
|
17
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ConversationDetailReport } from "../schema/conversation";
|
|
2
2
|
/** Load one conversation from its canonical event history. */
|
|
3
3
|
export declare function readConversationDetail(conversationId: string, options?: {
|
|
4
|
+
limit?: number;
|
|
4
5
|
verifiedViewerEmail?: string;
|
|
5
6
|
}): Promise<ConversationDetailReport | undefined>;
|
|
6
7
|
/** Serve one conversation detail endpoint. */
|
|
@@ -86,25 +87,21 @@ declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
|
86
87
|
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
87
88
|
type: import("zod").ZodLiteral<"message_handled">;
|
|
88
89
|
messageId: import("zod").ZodString;
|
|
89
|
-
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
90
|
-
type: import("zod").ZodLiteral<"tool_started">;
|
|
91
|
-
toolCallId: import("zod").ZodString;
|
|
92
|
-
name: import("zod").ZodString;
|
|
93
90
|
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
94
91
|
type: import("zod").ZodLiteral<"tool_calls">;
|
|
95
92
|
calls: import("zod").ZodArray<import("zod").ZodObject<{
|
|
96
93
|
toolCallId: import("zod").ZodString;
|
|
97
94
|
name: import("zod").ZodString;
|
|
95
|
+
status: import("zod").ZodEnum<{
|
|
96
|
+
error: "error";
|
|
97
|
+
running: "running";
|
|
98
|
+
completed: "completed";
|
|
99
|
+
}>;
|
|
100
|
+
startedAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
101
|
+
startedSeq: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
98
102
|
input: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
103
|
+
output: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
99
104
|
}, import("zod/v4/core").$strict>>;
|
|
100
|
-
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
101
|
-
type: import("zod").ZodLiteral<"tool_result">;
|
|
102
|
-
toolCallId: import("zod").ZodString;
|
|
103
|
-
outcome: import("zod").ZodEnum<{
|
|
104
|
-
error: "error";
|
|
105
|
-
completed: "completed";
|
|
106
|
-
}>;
|
|
107
|
-
output: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
108
105
|
}, import("zod/v4/core").$strict>, import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
109
106
|
type: import("zod").ZodLiteral<"turn_lifecycle">;
|
|
110
107
|
turnId: import("zod").ZodString;
|
|
@@ -122,7 +119,31 @@ declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
|
122
119
|
agent: "agent";
|
|
123
120
|
}>;
|
|
124
121
|
}, import("zod/v4/core").$strict>], "state">, import("zod").ZodObject<{
|
|
122
|
+
type: import("zod").ZodLiteral<"turn_routed">;
|
|
123
|
+
turnId: import("zod").ZodString;
|
|
124
|
+
modelProfile: import("zod").ZodString;
|
|
125
|
+
modelId: import("zod").ZodString;
|
|
126
|
+
reasoningLevel: import("zod").ZodString;
|
|
127
|
+
confidence: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
128
|
+
source: import("zod").ZodEnum<{
|
|
129
|
+
configured: "configured";
|
|
130
|
+
inherited: "inherited";
|
|
131
|
+
router: "router";
|
|
132
|
+
}>;
|
|
133
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
125
134
|
type: import("zod").ZodLiteral<"compaction">;
|
|
135
|
+
modelProfile: import("zod").ZodOptional<import("zod").ZodString>;
|
|
136
|
+
modelId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
137
|
+
details: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
138
|
+
reason: import("zod").ZodLiteral<"capacity">;
|
|
139
|
+
estimatedInputTokens: import("zod").ZodNumber;
|
|
140
|
+
replacementInputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
141
|
+
triggerTokens: import("zod").ZodNumber;
|
|
142
|
+
inputLimitTokens: import("zod").ZodNumber;
|
|
143
|
+
inputMessageCount: import("zod").ZodNumber;
|
|
144
|
+
retainedMessageCount: import("zod").ZodNumber;
|
|
145
|
+
summaryChars: import("zod").ZodNumber;
|
|
146
|
+
}, import("zod/v4/core").$strict>>;
|
|
126
147
|
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
127
148
|
type: import("zod").ZodLiteral<"handoff">;
|
|
128
149
|
modelProfile: import("zod").ZodString;
|
|
@@ -130,17 +151,17 @@ declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
|
130
151
|
reasoningLevel: import("zod").ZodOptional<import("zod").ZodString>;
|
|
131
152
|
triggeringToolCallId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
132
153
|
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
133
|
-
type: import("zod").ZodLiteral<"
|
|
154
|
+
type: import("zod").ZodLiteral<"subagent">;
|
|
155
|
+
startedSeq: import("zod").ZodNumber;
|
|
156
|
+
startedAt: import("zod").ZodString;
|
|
134
157
|
childConversationId: import("zod").ZodString;
|
|
135
158
|
subagentKind: import("zod").ZodString;
|
|
136
159
|
parentToolCallId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
137
|
-
|
|
138
|
-
type: import("zod").ZodLiteral<"subagent_ended">;
|
|
139
|
-
startedSeq: import("zod").ZodNumber;
|
|
140
|
-
outcome: import("zod").ZodEnum<{
|
|
160
|
+
status: import("zod").ZodEnum<{
|
|
141
161
|
error: "error";
|
|
142
|
-
success: "success";
|
|
143
162
|
aborted: "aborted";
|
|
163
|
+
running: "running";
|
|
164
|
+
completed: "completed";
|
|
144
165
|
}>;
|
|
145
166
|
}, import("zod/v4/core").$strict>], "type">;
|
|
146
167
|
}, import("zod/v4/core").$strict>>;
|
|
@@ -153,6 +174,7 @@ declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
|
153
174
|
status: import("zod").ZodLiteral<"expired">;
|
|
154
175
|
expiredAt: import("zod").ZodString;
|
|
155
176
|
}, import("zod/v4/core").$strict>], "status">;
|
|
177
|
+
previousCursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
156
178
|
generatedAt: import("zod").ZodString;
|
|
157
179
|
sentryConversationUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
158
180
|
}, import("zod/v4/core").$strict>>;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { type ConversationEventPage } from "../schema/conversation";
|
|
2
|
+
/** Read one bounded page of reporting events before a signed cursor. */
|
|
3
|
+
export declare function readConversationEvents(conversationId: string, beforeValue: string, options?: {
|
|
4
|
+
limit?: number;
|
|
5
|
+
verifiedViewerEmail?: string;
|
|
6
|
+
}): Promise<ConversationEventPage | undefined>;
|
|
7
|
+
declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
8
|
+
events: import("zod").ZodArray<import("zod").ZodObject<{
|
|
9
|
+
seq: import("zod").ZodNumber;
|
|
10
|
+
createdAt: import("zod").ZodString;
|
|
11
|
+
data: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
12
|
+
type: import("zod").ZodLiteral<"message">;
|
|
13
|
+
messageId: import("zod").ZodString;
|
|
14
|
+
role: import("zod").ZodEnum<{
|
|
15
|
+
system: "system";
|
|
16
|
+
user: "user";
|
|
17
|
+
assistant: "assistant";
|
|
18
|
+
}>;
|
|
19
|
+
eventType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
+
text: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
|
+
redacted: import("zod").ZodOptional<import("zod").ZodLiteral<true>>;
|
|
22
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
23
|
+
type: import("zod").ZodLiteral<"message_handled">;
|
|
24
|
+
messageId: import("zod").ZodString;
|
|
25
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
26
|
+
type: import("zod").ZodLiteral<"tool_calls">;
|
|
27
|
+
calls: import("zod").ZodArray<import("zod").ZodObject<{
|
|
28
|
+
toolCallId: import("zod").ZodString;
|
|
29
|
+
name: import("zod").ZodString;
|
|
30
|
+
status: import("zod").ZodEnum<{
|
|
31
|
+
error: "error";
|
|
32
|
+
running: "running";
|
|
33
|
+
completed: "completed";
|
|
34
|
+
}>;
|
|
35
|
+
startedAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
36
|
+
startedSeq: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
37
|
+
input: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
38
|
+
output: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
39
|
+
}, import("zod/v4/core").$strict>>;
|
|
40
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
41
|
+
type: import("zod").ZodLiteral<"turn_lifecycle">;
|
|
42
|
+
turnId: import("zod").ZodString;
|
|
43
|
+
state: import("zod").ZodEnum<{
|
|
44
|
+
no_reply: "no_reply";
|
|
45
|
+
started: "started";
|
|
46
|
+
succeeded: "succeeded";
|
|
47
|
+
}>;
|
|
48
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
49
|
+
type: import("zod").ZodLiteral<"turn_lifecycle">;
|
|
50
|
+
turnId: import("zod").ZodString;
|
|
51
|
+
state: import("zod").ZodLiteral<"failed">;
|
|
52
|
+
failureKind: import("zod").ZodEnum<{
|
|
53
|
+
delivery: "delivery";
|
|
54
|
+
agent: "agent";
|
|
55
|
+
}>;
|
|
56
|
+
}, import("zod/v4/core").$strict>], "state">, import("zod").ZodObject<{
|
|
57
|
+
type: import("zod").ZodLiteral<"turn_routed">;
|
|
58
|
+
turnId: import("zod").ZodString;
|
|
59
|
+
modelProfile: import("zod").ZodString;
|
|
60
|
+
modelId: import("zod").ZodString;
|
|
61
|
+
reasoningLevel: import("zod").ZodString;
|
|
62
|
+
confidence: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
63
|
+
source: import("zod").ZodEnum<{
|
|
64
|
+
configured: "configured";
|
|
65
|
+
inherited: "inherited";
|
|
66
|
+
router: "router";
|
|
67
|
+
}>;
|
|
68
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
69
|
+
type: import("zod").ZodLiteral<"compaction">;
|
|
70
|
+
modelProfile: import("zod").ZodOptional<import("zod").ZodString>;
|
|
71
|
+
modelId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
72
|
+
details: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
73
|
+
reason: import("zod").ZodLiteral<"capacity">;
|
|
74
|
+
estimatedInputTokens: import("zod").ZodNumber;
|
|
75
|
+
replacementInputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
76
|
+
triggerTokens: import("zod").ZodNumber;
|
|
77
|
+
inputLimitTokens: import("zod").ZodNumber;
|
|
78
|
+
inputMessageCount: import("zod").ZodNumber;
|
|
79
|
+
retainedMessageCount: import("zod").ZodNumber;
|
|
80
|
+
summaryChars: import("zod").ZodNumber;
|
|
81
|
+
}, import("zod/v4/core").$strict>>;
|
|
82
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
83
|
+
type: import("zod").ZodLiteral<"handoff">;
|
|
84
|
+
modelProfile: import("zod").ZodString;
|
|
85
|
+
modelId: import("zod").ZodString;
|
|
86
|
+
reasoningLevel: import("zod").ZodOptional<import("zod").ZodString>;
|
|
87
|
+
triggeringToolCallId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
88
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
89
|
+
type: import("zod").ZodLiteral<"subagent">;
|
|
90
|
+
startedSeq: import("zod").ZodNumber;
|
|
91
|
+
startedAt: import("zod").ZodString;
|
|
92
|
+
childConversationId: import("zod").ZodString;
|
|
93
|
+
subagentKind: import("zod").ZodString;
|
|
94
|
+
parentToolCallId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
95
|
+
status: import("zod").ZodEnum<{
|
|
96
|
+
error: "error";
|
|
97
|
+
aborted: "aborted";
|
|
98
|
+
running: "running";
|
|
99
|
+
completed: "completed";
|
|
100
|
+
}>;
|
|
101
|
+
}, import("zod/v4/core").$strict>], "type">;
|
|
102
|
+
}, import("zod/v4/core").$strict>>;
|
|
103
|
+
eventHistory: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
104
|
+
status: import("zod").ZodLiteral<"available">;
|
|
105
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
106
|
+
status: import("zod").ZodLiteral<"redacted">;
|
|
107
|
+
reason: import("zod").ZodLiteral<"non_public_conversation">;
|
|
108
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
109
|
+
status: import("zod").ZodLiteral<"expired">;
|
|
110
|
+
expiredAt: import("zod").ZodString;
|
|
111
|
+
}, import("zod/v4/core").$strict>], "status">;
|
|
112
|
+
previousCursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
113
|
+
generatedAt: import("zod").ZodString;
|
|
114
|
+
}, import("zod/v4/core").$strict>>;
|
|
115
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { JuniorSqlDatabase } from "@/db/db";
|
|
2
|
+
import type { ConversationReportEvent } from "../schema/conversation";
|
|
3
|
+
/**
|
|
4
|
+
* Read the latest reporting events before an exclusive boundary.
|
|
5
|
+
*
|
|
6
|
+
* Source rows are scanned in bounded chunks until the requested projected page
|
|
7
|
+
* and one older event are known. This keeps ordinary pages bounded without
|
|
8
|
+
* assuming every canonical agent step produces a reporting event.
|
|
9
|
+
*/
|
|
10
|
+
export declare function readConversationEventPage(executor: JuniorSqlDatabase, args: {
|
|
11
|
+
beforeSeq?: number;
|
|
12
|
+
canExposePayload: boolean;
|
|
13
|
+
conversationId: string;
|
|
14
|
+
limit: number;
|
|
15
|
+
}): Promise<{
|
|
16
|
+
events: ConversationReportEvent[];
|
|
17
|
+
previousSeq?: number;
|
|
18
|
+
}>;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import type { ConversationEvent } from "@/chat/conversations/history";
|
|
2
2
|
import { type ConversationReportEvent } from "../schema/conversation";
|
|
3
3
|
/** Canonical event types that can contribute to the reporting projection. */
|
|
4
|
-
export declare const conversationReportSourceEventTypes: readonly ["message", "message_handled", "agent_step", "tool_execution_started", "turn_started", "turn_completed", "turn_failed", "compaction", "handoff", "subagent_started", "subagent_ended"];
|
|
4
|
+
export declare const conversationReportSourceEventTypes: readonly ["message", "message_handled", "agent_step", "tool_execution_started", "turn_started", "turn_routed", "turn_completed", "turn_failed", "compaction", "handoff", "subagent_started", "subagent_ended"];
|
|
5
|
+
/** Return tool result ids that may need start metadata from outside a page. */
|
|
6
|
+
export declare function conversationReportToolResultIds(events: ConversationEvent[]): string[];
|
|
5
7
|
/**
|
|
6
8
|
* Project canonical events into the ordered reporting boundary.
|
|
7
9
|
*
|
|
8
10
|
* `canExposePayload` must come from the authorized conversation-detail policy;
|
|
9
11
|
* this projection never derives visibility or authorization from event data.
|
|
10
12
|
*/
|
|
11
|
-
export declare function
|
|
13
|
+
export declare function projectConversationReportEventPage(args: {
|
|
12
14
|
canExposePayload: boolean;
|
|
13
15
|
events: ConversationEvent[];
|
|
16
|
+
subagentStartEvents?: ConversationEvent[];
|
|
17
|
+
toolStartEvents?: ConversationEvent[];
|
|
14
18
|
}): ConversationReportEvent[];
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import type { Conversation as StoredConversation } from "@/chat/conversations/store";
|
|
2
|
-
import type { ConversationSummaryReport, ConversationUsage } from "../schema/conversation";
|
|
2
|
+
import type { ConversationEventHistory, ConversationSummaryReport, ConversationUsage } from "../schema/conversation";
|
|
3
3
|
import type { ConversationAccess } from "./access";
|
|
4
4
|
type ConversationProjectionSource = Pick<StoredConversation, "actor" | "archivedAtMs" | "channelName" | "conversationId" | "createdAtMs" | "execution" | "lastActivityAtMs" | "source" | "title" | "updatedAtMs">;
|
|
5
|
+
/** Describe whether a viewer can read one conversation's retained events. */
|
|
6
|
+
export declare function conversationEventHistory(args: {
|
|
7
|
+
canExposePayload: boolean;
|
|
8
|
+
transcriptPurgedAtMs?: number;
|
|
9
|
+
}): ConversationEventHistory;
|
|
5
10
|
/** Project one durable conversation and its SQL metrics into the REST summary. */
|
|
6
11
|
export declare function conversationSummaryFromStoredConversation(args: {
|
|
7
12
|
access?: ConversationAccess;
|