@sentry/junior 0.114.0 → 0.116.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-WNBUY4OB.js → agent-hooks-67NFITDH.js} +13 -12
- package/dist/api/conversations/detail.d.ts +20 -0
- package/dist/api/conversations/event-list.d.ts +2 -0
- package/dist/api/conversations/event-page.d.ts +1 -1
- package/dist/api/conversations/events.d.ts +1 -1
- package/dist/api/health.d.ts +7 -0
- package/dist/api/people/profile.d.ts +2 -2
- package/dist/api/people/shared.d.ts +1 -1
- package/dist/api/personal-tokens/create.d.ts +11 -0
- package/dist/api/personal-tokens/list.d.ts +12 -0
- package/dist/api/personal-tokens/revoke.d.ts +5 -0
- package/dist/api/personal-tokens/routes.d.ts +4 -0
- package/dist/api/plugin-reports.d.ts +62 -0
- package/dist/api/plugins.d.ts +8 -0
- package/dist/api/route.d.ts +1 -1
- package/dist/api/runtime.d.ts +24 -0
- package/dist/api/schema/conversation.d.ts +26 -0
- package/dist/api/schema/person.d.ts +3 -3
- package/dist/api/schema/personal-token.d.ts +38 -0
- package/dist/api/schema.d.ts +4 -2
- package/dist/api/schema.js +19 -7
- package/dist/api/skills.d.ts +6 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +285 -121
- package/dist/app.js +1957 -5677
- package/dist/catalog-runtime-CWZY6GTH.js +18 -0
- package/dist/chat/agent/request.d.ts +7 -0
- package/dist/chat/agent/resume.d.ts +1 -0
- package/dist/chat/agent/sandbox.d.ts +3 -0
- package/dist/chat/agent/tools.d.ts +3 -0
- package/dist/chat/agent-dispatch/context.d.ts +2 -0
- package/dist/chat/agent-dispatch/heartbeat.d.ts +11 -5
- package/dist/chat/agent-dispatch/signing.d.ts +14 -5
- package/dist/chat/agent-dispatch/store.d.ts +36 -15
- package/dist/chat/agent-dispatch/types.d.ts +23 -10
- package/dist/chat/agent-dispatch/work.d.ts +58 -0
- package/dist/chat/app/factory.d.ts +12 -3
- package/dist/chat/config.d.ts +2 -0
- package/dist/chat/conversations/history.d.ts +291 -290
- package/dist/chat/conversations/projection.d.ts +2 -2
- package/dist/chat/local/credential-sync.d.ts +5 -0
- package/dist/chat/local/oauth-relay.d.ts +4 -0
- package/dist/chat/mcp/oauth.d.ts +1 -0
- package/dist/chat/mcp/tool-manager.d.ts +2 -1
- package/dist/chat/oauth-authorization.d.ts +17 -0
- package/dist/chat/oauth-flow.d.ts +9 -0
- package/dist/chat/pi/conversation-events.d.ts +6 -2
- package/dist/chat/plugins/annotations.d.ts +8 -0
- package/dist/chat/plugins/registry.d.ts +0 -3
- package/dist/chat/plugins/types.d.ts +0 -2
- package/dist/chat/runtime/agent-continue-runner.d.ts +4 -0
- package/dist/chat/runtime/reply-executor.d.ts +6 -1
- package/dist/chat/runtime/slack-resume.d.ts +5 -1
- package/dist/chat/runtime/turn-input.d.ts +3 -0
- package/dist/chat/sandbox/egress/schemas.d.ts +46 -0
- package/dist/chat/sandbox/egress/signals.d.ts +9 -0
- package/dist/chat/sandbox/sandbox.d.ts +4 -1
- package/dist/chat/sandbox/session.d.ts +2 -11
- package/dist/chat/sandbox/workspace.d.ts +10 -2
- package/dist/chat/sentry-payload-filter.d.ts +4 -4
- package/dist/chat/services/mcp-auth-orchestration.d.ts +5 -3
- package/dist/chat/services/plugin-auth-orchestration.d.ts +2 -0
- package/dist/chat/services/turn-session-record.d.ts +14 -1
- package/dist/chat/slack/dispatch-turn.d.ts +25 -0
- package/dist/chat/slack/message-control.d.ts +2 -0
- package/dist/chat/slack/oauth-authorization-message.d.ts +3 -0
- package/dist/chat/state/turn-session.d.ts +11 -0
- package/dist/chat/task-execution/slack-work.d.ts +2 -0
- package/dist/chat/tool-support/text-range-result.d.ts +3 -0
- package/dist/chat/tool-support/zod-tool.d.ts +2 -1
- package/dist/chat/tools/definition.d.ts +3 -5
- package/dist/chat/tools/query-conversation-events.d.ts +68 -0
- package/dist/chat/tools/sandbox/file-utils.d.ts +8 -1
- package/dist/chat/tools/sandbox/find-files.d.ts +2 -1
- package/dist/chat/tools/sandbox/grep.d.ts +2 -1
- package/dist/{chunk-OSKEC4XU.js → chunk-25GU5B5E.js} +1 -1
- package/dist/{chunk-XLFBQJUO.js → chunk-3H45VOBZ.js} +32 -7
- package/dist/{chunk-4FUEG3QY.js → chunk-3JOGUT46.js} +4 -16
- package/dist/chunk-4CODA7P5.js +43 -0
- package/dist/{chunk-O4GT7LYB.js → chunk-4DD6AOCG.js} +3 -43
- package/dist/{chunk-YU6PO42Q.js → chunk-53ZKTQO6.js} +1 -1
- package/dist/{chunk-WV4UJBAS.js → chunk-5UNB623T.js} +1282 -2536
- package/dist/{chunk-TLGM5X2M.js → chunk-6RQ5GCWH.js} +2 -2
- package/dist/{chunk-MIAKQNYX.js → chunk-6ZK6FZIV.js} +1 -1
- package/dist/{chunk-W6RDUAO3.js → chunk-BXLS3I4W.js} +1 -1
- package/dist/{chunk-RD7EJI7H.js → chunk-CI3VK7X5.js} +69 -3
- package/dist/chunk-DIB4GX3G.js +8 -0
- package/dist/{chunk-42WRQLJ6.js → chunk-F3B2YJ76.js} +0 -14
- package/dist/chunk-FA6POGLH.js +70 -0
- package/dist/{chunk-6Y5L4BOM.js → chunk-FXOYURO4.js} +5 -3
- package/dist/chunk-HDSDCEPK.js +80 -0
- package/dist/{chunk-C4MZ3GP5.js → chunk-HZF5P5UN.js} +1 -1
- package/dist/{chunk-K2W4CK7K.js → chunk-JZPQ5K4V.js} +10 -129
- package/dist/{chunk-FIGAF6KL.js → chunk-KBNDFU6J.js} +108 -38
- package/dist/{chunk-PM3PX42K.js → chunk-MGH5ADQS.js} +1 -2
- package/dist/{chunk-5CZ7RETL.js → chunk-N7TMYLF2.js} +1 -1
- package/dist/chunk-OB42YVAE.js +16 -0
- package/dist/{chunk-6QWPVTMO.js → chunk-OF5FODBL.js} +125 -23
- package/dist/{chunk-2ZTTXTSZ.js → chunk-PE44LDDQ.js} +9 -4
- package/dist/chunk-PGKWXHYJ.js +1870 -0
- package/dist/{chunk-ZGXH3REA.js → chunk-PZGPCOSD.js} +12 -2
- package/dist/{chunk-JQFJO5WH.js → chunk-RXRQJF7Y.js} +74 -17
- package/dist/{chunk-S4QDH23A.js → chunk-TC4ZEM2D.js} +113 -79
- package/dist/{chunk-ABPSDO6M.js → chunk-UEVLIYK5.js} +234 -165
- package/dist/chunk-VKZ6WVAY.js +4318 -0
- package/dist/{chunk-VNNBSKCO.js → chunk-VZCSLYCE.js} +22 -7
- package/dist/chunk-W3U3YQYI.js +71 -0
- package/dist/{chunk-SG5WAA7H.js → chunk-WKU7TY22.js} +0 -3
- package/dist/cli/chat.js +74 -42
- package/dist/cli/check.js +10 -8
- package/dist/cli/init.js +1 -0
- package/dist/cli/plugins.js +18 -16
- package/dist/cli/snapshot-warmup.js +13 -11
- package/dist/cli/upgrade.js +12 -10
- package/dist/db/schema/api-tokens.d.ts +160 -0
- package/dist/db/schema/conversation-annotations.d.ts +142 -0
- package/dist/db/schema.d.ts +305 -1
- package/dist/{db-4VLP7KBF.js → db-57FHVGGQ.js} +9 -8
- package/dist/handlers/agent-dispatch.d.ts +7 -3
- package/dist/handlers/sandbox-egress-signals.d.ts +4 -0
- package/dist/instrumentation.js +72 -4
- package/dist/nitro.js +5 -5
- package/dist/oauth-callback-server-PAQRPXZX.js +231 -0
- package/dist/oauth-relay-3ZU72UGL.js +9 -0
- package/dist/personal-tokens/store.d.ts +27 -0
- package/dist/{plugins-PZMDS7AT.js → plugins-IUJA4VBU.js} +1 -1
- package/dist/reporting-schema.d.ts +10 -4
- package/dist/reporting.d.ts +5 -5
- package/dist/{runner-IPXLWQOF.js → runner-4ISZYJEX.js} +141 -74
- package/dist/sandbox-egress-signals-CDFAP67O.js +75 -0
- package/dist/{skills-QCNZISNF.js → skills-UE2KXQMB.js} +10 -8
- package/dist/validation-PO5LHTJT.js +21 -0
- package/dist/version.js +1 -1
- package/migrations/0008_sticky_rage.sql +14 -0
- package/migrations/0009_slippery_harrier.sql +12 -0
- package/migrations/0010_native_conversation_history.sql +142 -0
- package/migrations/meta/0008_snapshot.json +1076 -0
- package/migrations/meta/0009_snapshot.json +1146 -0
- package/migrations/meta/0010_snapshot.json +1190 -0
- package/migrations/meta/_journal.json +22 -1
- package/package.json +6 -7
- package/dist/catalog-runtime-6O4M6JGA.js +0 -16
- package/dist/chat/agent-dispatch/runner.d.ts +0 -13
- package/dist/chat/capabilities/catalog.d.ts +0 -16
- package/dist/chat/oauth-authorization-message.d.ts +0 -6
- package/dist/validation-I2BW3UHD.js +0 -19
- package/dist/{chunk-KNFROR7R.js → chunk-5I6ORJUY.js} +1 -1
|
@@ -8,17 +8,43 @@
|
|
|
8
8
|
* are validated by the Pi adapter when it restores model context.
|
|
9
9
|
*/
|
|
10
10
|
import { z } from "zod";
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
role:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
/**
|
|
12
|
+
* One replayable agent-history item. Junior owns `type` and user provenance,
|
|
13
|
+
* forbids the provider `role` discriminator, and leaves preserved message
|
|
14
|
+
* fields for the Pi adapter to validate when restoring model context.
|
|
15
|
+
*/
|
|
16
|
+
export declare const agentHistoryItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
17
|
+
type: z.ZodLiteral<"user_message">;
|
|
18
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
19
|
+
provenance: z.ZodObject<{
|
|
20
|
+
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
21
|
+
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
22
|
+
platform: z.ZodLiteral<"slack">;
|
|
23
|
+
teamId: z.ZodString;
|
|
24
|
+
email: z.ZodOptional<z.ZodString>;
|
|
25
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
26
|
+
userId: z.ZodString;
|
|
27
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
29
|
+
platform: z.ZodLiteral<"local">;
|
|
30
|
+
email: z.ZodOptional<z.ZodString>;
|
|
31
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
32
|
+
userId: z.ZodString;
|
|
33
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
35
|
+
platform: z.ZodLiteral<"system">;
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
}, z.core.$strict>], "platform">>;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
40
|
+
type: z.ZodLiteral<"assistant_message">;
|
|
41
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
42
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
43
|
+
type: z.ZodLiteral<"tool_result">;
|
|
44
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
45
|
+
}, z.core.$loose>], "type">;
|
|
46
|
+
/** A native replayable agent-history item. */
|
|
47
|
+
export type AgentHistoryItem = z.output<typeof agentHistoryItemSchema>;
|
|
22
48
|
/** Validate an event that intentionally replaces active model history. */
|
|
23
49
|
export declare const historyReplacementSchema: z.ZodObject<{
|
|
24
50
|
data: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -27,35 +53,38 @@ export declare const historyReplacementSchema: z.ZodObject<{
|
|
|
27
53
|
modelId: z.ZodString;
|
|
28
54
|
reasoningLevel: z.ZodOptional<z.ZodString>;
|
|
29
55
|
triggeringToolCallId: z.ZodOptional<z.ZodString>;
|
|
56
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
30
57
|
replacementHistory: z.ZodArray<z.ZodObject<{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
item: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
59
|
+
type: z.ZodLiteral<"user_message">;
|
|
60
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
61
|
+
provenance: z.ZodObject<{
|
|
62
|
+
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
63
|
+
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
64
|
+
platform: z.ZodLiteral<"slack">;
|
|
65
|
+
teamId: z.ZodString;
|
|
66
|
+
email: z.ZodOptional<z.ZodString>;
|
|
67
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
68
|
+
userId: z.ZodString;
|
|
69
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
71
|
+
platform: z.ZodLiteral<"local">;
|
|
72
|
+
email: z.ZodOptional<z.ZodString>;
|
|
73
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
74
|
+
userId: z.ZodString;
|
|
75
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
77
|
+
platform: z.ZodLiteral<"system">;
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
}, z.core.$strict>], "platform">>;
|
|
80
|
+
}, z.core.$strict>;
|
|
81
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
82
|
+
type: z.ZodLiteral<"assistant_message">;
|
|
83
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
84
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
85
|
+
type: z.ZodLiteral<"tool_result">;
|
|
86
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
87
|
+
}, z.core.$loose>], "type">;
|
|
59
88
|
sourceEventSeq: z.ZodOptional<z.ZodNumber>;
|
|
60
89
|
}, z.core.$strict>>;
|
|
61
90
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -72,35 +101,38 @@ export declare const historyReplacementSchema: z.ZodObject<{
|
|
|
72
101
|
retainedMessageCount: z.ZodNumber;
|
|
73
102
|
summaryChars: z.ZodNumber;
|
|
74
103
|
}, z.core.$strict>>;
|
|
104
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
75
105
|
replacementHistory: z.ZodArray<z.ZodObject<{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
106
|
+
item: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
107
|
+
type: z.ZodLiteral<"user_message">;
|
|
108
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
109
|
+
provenance: z.ZodObject<{
|
|
110
|
+
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
111
|
+
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
112
|
+
platform: z.ZodLiteral<"slack">;
|
|
113
|
+
teamId: z.ZodString;
|
|
114
|
+
email: z.ZodOptional<z.ZodString>;
|
|
115
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
116
|
+
userId: z.ZodString;
|
|
117
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
118
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
119
|
+
platform: z.ZodLiteral<"local">;
|
|
120
|
+
email: z.ZodOptional<z.ZodString>;
|
|
121
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
122
|
+
userId: z.ZodString;
|
|
123
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
125
|
+
platform: z.ZodLiteral<"system">;
|
|
126
|
+
name: z.ZodString;
|
|
127
|
+
}, z.core.$strict>], "platform">>;
|
|
128
|
+
}, z.core.$strict>;
|
|
129
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
130
|
+
type: z.ZodLiteral<"assistant_message">;
|
|
131
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
132
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
133
|
+
type: z.ZodLiteral<"tool_result">;
|
|
134
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
135
|
+
}, z.core.$loose>], "type">;
|
|
104
136
|
sourceEventSeq: z.ZodOptional<z.ZodNumber>;
|
|
105
137
|
}, z.core.$strict>>;
|
|
106
138
|
}, z.core.$strict>], "type">;
|
|
@@ -142,16 +174,10 @@ export declare const conversationEventDataSchema: z.ZodUnion<readonly [z.ZodUnio
|
|
|
142
174
|
authorIdentityId: z.ZodOptional<z.ZodString>;
|
|
143
175
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
144
176
|
type: z.ZodLiteral<"message_updated">;
|
|
145
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
role: string;
|
|
150
|
-
}, {
|
|
151
|
-
[x: string]: unknown;
|
|
152
|
-
role: string;
|
|
153
|
-
}>>;
|
|
154
|
-
provenance: z.ZodOptional<z.ZodObject<{
|
|
177
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
178
|
+
type: z.ZodLiteral<"user_message">;
|
|
179
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
180
|
+
provenance: z.ZodObject<{
|
|
155
181
|
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
156
182
|
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
157
183
|
platform: z.ZodLiteral<"slack">;
|
|
@@ -170,9 +196,14 @@ export declare const conversationEventDataSchema: z.ZodUnion<readonly [z.ZodUnio
|
|
|
170
196
|
platform: z.ZodLiteral<"system">;
|
|
171
197
|
name: z.ZodString;
|
|
172
198
|
}, z.core.$strict>], "platform">>;
|
|
173
|
-
}, z.core.$strict
|
|
174
|
-
|
|
175
|
-
|
|
199
|
+
}, z.core.$strict>;
|
|
200
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
201
|
+
type: z.ZodLiteral<"assistant_message">;
|
|
202
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
203
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
204
|
+
type: z.ZodLiteral<"tool_result">;
|
|
205
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
206
|
+
}, z.core.$loose>], "type">, z.ZodObject<{
|
|
176
207
|
type: z.ZodLiteral<"mcp_provider_connected">;
|
|
177
208
|
provider: z.ZodString;
|
|
178
209
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -268,35 +299,38 @@ export declare const conversationEventDataSchema: z.ZodUnion<readonly [z.ZodUnio
|
|
|
268
299
|
modelId: z.ZodString;
|
|
269
300
|
reasoningLevel: z.ZodOptional<z.ZodString>;
|
|
270
301
|
triggeringToolCallId: z.ZodOptional<z.ZodString>;
|
|
302
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
271
303
|
replacementHistory: z.ZodArray<z.ZodObject<{
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
304
|
+
item: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
305
|
+
type: z.ZodLiteral<"user_message">;
|
|
306
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
307
|
+
provenance: z.ZodObject<{
|
|
308
|
+
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
309
|
+
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
310
|
+
platform: z.ZodLiteral<"slack">;
|
|
311
|
+
teamId: z.ZodString;
|
|
312
|
+
email: z.ZodOptional<z.ZodString>;
|
|
313
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
314
|
+
userId: z.ZodString;
|
|
315
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
316
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
317
|
+
platform: z.ZodLiteral<"local">;
|
|
318
|
+
email: z.ZodOptional<z.ZodString>;
|
|
319
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
320
|
+
userId: z.ZodString;
|
|
321
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
322
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
323
|
+
platform: z.ZodLiteral<"system">;
|
|
324
|
+
name: z.ZodString;
|
|
325
|
+
}, z.core.$strict>], "platform">>;
|
|
326
|
+
}, z.core.$strict>;
|
|
327
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
328
|
+
type: z.ZodLiteral<"assistant_message">;
|
|
329
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
330
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
331
|
+
type: z.ZodLiteral<"tool_result">;
|
|
332
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
333
|
+
}, z.core.$loose>], "type">;
|
|
300
334
|
sourceEventSeq: z.ZodOptional<z.ZodNumber>;
|
|
301
335
|
}, z.core.$strict>>;
|
|
302
336
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -313,75 +347,47 @@ export declare const conversationEventDataSchema: z.ZodUnion<readonly [z.ZodUnio
|
|
|
313
347
|
retainedMessageCount: z.ZodNumber;
|
|
314
348
|
summaryChars: z.ZodNumber;
|
|
315
349
|
}, z.core.$strict>>;
|
|
350
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
316
351
|
replacementHistory: z.ZodArray<z.ZodObject<{
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}, z.core.$strict>], "type">, z.ZodObject<{
|
|
348
|
-
type: z.ZodLiteral<"rollback">;
|
|
349
|
-
modelProfile: z.ZodString;
|
|
350
|
-
modelId: z.ZodString;
|
|
351
|
-
replacementHistory: z.ZodArray<z.ZodObject<{
|
|
352
|
-
message: z.ZodPipe<z.ZodObject<{
|
|
353
|
-
role: z.ZodString;
|
|
354
|
-
}, z.core.$loose>, z.ZodTransform<{
|
|
355
|
-
role: string;
|
|
356
|
-
}, {
|
|
357
|
-
[x: string]: unknown;
|
|
358
|
-
role: string;
|
|
359
|
-
}>>;
|
|
360
|
-
provenance: z.ZodOptional<z.ZodObject<{
|
|
361
|
-
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
362
|
-
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
363
|
-
platform: z.ZodLiteral<"slack">;
|
|
364
|
-
teamId: z.ZodString;
|
|
365
|
-
email: z.ZodOptional<z.ZodString>;
|
|
366
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
367
|
-
userId: z.ZodString;
|
|
368
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
369
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
370
|
-
platform: z.ZodLiteral<"local">;
|
|
371
|
-
email: z.ZodOptional<z.ZodString>;
|
|
372
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
373
|
-
userId: z.ZodString;
|
|
374
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
375
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
376
|
-
platform: z.ZodLiteral<"system">;
|
|
377
|
-
name: z.ZodString;
|
|
378
|
-
}, z.core.$strict>], "platform">>;
|
|
379
|
-
}, z.core.$strict>>;
|
|
352
|
+
item: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
353
|
+
type: z.ZodLiteral<"user_message">;
|
|
354
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
355
|
+
provenance: z.ZodObject<{
|
|
356
|
+
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
357
|
+
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
358
|
+
platform: z.ZodLiteral<"slack">;
|
|
359
|
+
teamId: z.ZodString;
|
|
360
|
+
email: z.ZodOptional<z.ZodString>;
|
|
361
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
362
|
+
userId: z.ZodString;
|
|
363
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
364
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
365
|
+
platform: z.ZodLiteral<"local">;
|
|
366
|
+
email: z.ZodOptional<z.ZodString>;
|
|
367
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
368
|
+
userId: z.ZodString;
|
|
369
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
370
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
371
|
+
platform: z.ZodLiteral<"system">;
|
|
372
|
+
name: z.ZodString;
|
|
373
|
+
}, z.core.$strict>], "platform">>;
|
|
374
|
+
}, z.core.$strict>;
|
|
375
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
376
|
+
type: z.ZodLiteral<"assistant_message">;
|
|
377
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
378
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
379
|
+
type: z.ZodLiteral<"tool_result">;
|
|
380
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
381
|
+
}, z.core.$loose>], "type">;
|
|
380
382
|
sourceEventSeq: z.ZodOptional<z.ZodNumber>;
|
|
381
383
|
}, z.core.$strict>>;
|
|
382
|
-
}, z.core.$strict>]>;
|
|
384
|
+
}, z.core.$strict>], "type">]>;
|
|
383
385
|
/** One durable conversation event's validated data. */
|
|
384
386
|
export type ConversationEventData = z.output<typeof conversationEventDataSchema>;
|
|
387
|
+
/** Event type names recognized by current readers and observational queries. */
|
|
388
|
+
export declare const KNOWN_CONVERSATION_EVENT_TYPES: readonly ["message", "message_updated", "user_message", "assistant_message", "tool_result", "mcp_provider_connected", "authorization_requested", "authorization_completed", "tool_execution_started", "message_handled", "messages_summarized", "turn_started", "turn_routed", "turn_completed", "turn_failed", "subagent_started", "subagent_ended", "handoff", "compaction"];
|
|
389
|
+
/** One known durable conversation event type name. */
|
|
390
|
+
export type KnownConversationEventType = (typeof KNOWN_CONVERSATION_EVENT_TYPES)[number];
|
|
385
391
|
declare const unknownConversationEventDataSchema: z.ZodObject<{
|
|
386
392
|
type: z.ZodLiteral<"unknown">;
|
|
387
393
|
originalType: z.ZodString;
|
|
@@ -413,16 +419,10 @@ export declare const conversationEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
413
419
|
authorIdentityId: z.ZodOptional<z.ZodString>;
|
|
414
420
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
415
421
|
type: z.ZodLiteral<"message_updated">;
|
|
416
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
role: string;
|
|
421
|
-
}, {
|
|
422
|
-
[x: string]: unknown;
|
|
423
|
-
role: string;
|
|
424
|
-
}>>;
|
|
425
|
-
provenance: z.ZodOptional<z.ZodObject<{
|
|
422
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
423
|
+
type: z.ZodLiteral<"user_message">;
|
|
424
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
425
|
+
provenance: z.ZodObject<{
|
|
426
426
|
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
427
427
|
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
428
428
|
platform: z.ZodLiteral<"slack">;
|
|
@@ -441,9 +441,14 @@ export declare const conversationEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
441
441
|
platform: z.ZodLiteral<"system">;
|
|
442
442
|
name: z.ZodString;
|
|
443
443
|
}, z.core.$strict>], "platform">>;
|
|
444
|
-
}, z.core.$strict
|
|
445
|
-
|
|
446
|
-
|
|
444
|
+
}, z.core.$strict>;
|
|
445
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
446
|
+
type: z.ZodLiteral<"assistant_message">;
|
|
447
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
448
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
449
|
+
type: z.ZodLiteral<"tool_result">;
|
|
450
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
451
|
+
}, z.core.$loose>], "type">, z.ZodObject<{
|
|
447
452
|
type: z.ZodLiteral<"mcp_provider_connected">;
|
|
448
453
|
provider: z.ZodString;
|
|
449
454
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -539,35 +544,38 @@ export declare const conversationEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
539
544
|
modelId: z.ZodString;
|
|
540
545
|
reasoningLevel: z.ZodOptional<z.ZodString>;
|
|
541
546
|
triggeringToolCallId: z.ZodOptional<z.ZodString>;
|
|
547
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
542
548
|
replacementHistory: z.ZodArray<z.ZodObject<{
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
549
|
+
item: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
550
|
+
type: z.ZodLiteral<"user_message">;
|
|
551
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
552
|
+
provenance: z.ZodObject<{
|
|
553
|
+
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
554
|
+
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
555
|
+
platform: z.ZodLiteral<"slack">;
|
|
556
|
+
teamId: z.ZodString;
|
|
557
|
+
email: z.ZodOptional<z.ZodString>;
|
|
558
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
559
|
+
userId: z.ZodString;
|
|
560
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
561
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
562
|
+
platform: z.ZodLiteral<"local">;
|
|
563
|
+
email: z.ZodOptional<z.ZodString>;
|
|
564
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
565
|
+
userId: z.ZodString;
|
|
566
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
567
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
568
|
+
platform: z.ZodLiteral<"system">;
|
|
569
|
+
name: z.ZodString;
|
|
570
|
+
}, z.core.$strict>], "platform">>;
|
|
571
|
+
}, z.core.$strict>;
|
|
572
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
573
|
+
type: z.ZodLiteral<"assistant_message">;
|
|
574
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
575
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
576
|
+
type: z.ZodLiteral<"tool_result">;
|
|
577
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
578
|
+
}, z.core.$loose>], "type">;
|
|
571
579
|
sourceEventSeq: z.ZodOptional<z.ZodNumber>;
|
|
572
580
|
}, z.core.$strict>>;
|
|
573
581
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -584,73 +592,41 @@ export declare const conversationEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
584
592
|
retainedMessageCount: z.ZodNumber;
|
|
585
593
|
summaryChars: z.ZodNumber;
|
|
586
594
|
}, z.core.$strict>>;
|
|
595
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
587
596
|
replacementHistory: z.ZodArray<z.ZodObject<{
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
597
|
+
item: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
598
|
+
type: z.ZodLiteral<"user_message">;
|
|
599
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
600
|
+
provenance: z.ZodObject<{
|
|
601
|
+
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
602
|
+
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
603
|
+
platform: z.ZodLiteral<"slack">;
|
|
604
|
+
teamId: z.ZodString;
|
|
605
|
+
email: z.ZodOptional<z.ZodString>;
|
|
606
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
607
|
+
userId: z.ZodString;
|
|
608
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
609
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
610
|
+
platform: z.ZodLiteral<"local">;
|
|
611
|
+
email: z.ZodOptional<z.ZodString>;
|
|
612
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
613
|
+
userId: z.ZodString;
|
|
614
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
615
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
616
|
+
platform: z.ZodLiteral<"system">;
|
|
617
|
+
name: z.ZodString;
|
|
618
|
+
}, z.core.$strict>], "platform">>;
|
|
619
|
+
}, z.core.$strict>;
|
|
620
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
621
|
+
type: z.ZodLiteral<"assistant_message">;
|
|
622
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
623
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
624
|
+
type: z.ZodLiteral<"tool_result">;
|
|
625
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
626
|
+
}, z.core.$loose>], "type">;
|
|
616
627
|
sourceEventSeq: z.ZodOptional<z.ZodNumber>;
|
|
617
628
|
}, z.core.$strict>>;
|
|
618
|
-
}, z.core.$strict>], "type"
|
|
619
|
-
type: z.ZodLiteral<"rollback">;
|
|
620
|
-
modelProfile: z.ZodString;
|
|
621
|
-
modelId: z.ZodString;
|
|
622
|
-
replacementHistory: z.ZodArray<z.ZodObject<{
|
|
623
|
-
message: z.ZodPipe<z.ZodObject<{
|
|
624
|
-
role: z.ZodString;
|
|
625
|
-
}, z.core.$loose>, z.ZodTransform<{
|
|
626
|
-
role: string;
|
|
627
|
-
}, {
|
|
628
|
-
[x: string]: unknown;
|
|
629
|
-
role: string;
|
|
630
|
-
}>>;
|
|
631
|
-
provenance: z.ZodOptional<z.ZodObject<{
|
|
632
|
-
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
633
|
-
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
634
|
-
platform: z.ZodLiteral<"slack">;
|
|
635
|
-
teamId: z.ZodString;
|
|
636
|
-
email: z.ZodOptional<z.ZodString>;
|
|
637
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
638
|
-
userId: z.ZodString;
|
|
639
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
640
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
641
|
-
platform: z.ZodLiteral<"local">;
|
|
642
|
-
email: z.ZodOptional<z.ZodString>;
|
|
643
|
-
fullName: z.ZodOptional<z.ZodString>;
|
|
644
|
-
userId: z.ZodString;
|
|
645
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
646
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
647
|
-
platform: z.ZodLiteral<"system">;
|
|
648
|
-
name: z.ZodString;
|
|
649
|
-
}, z.core.$strict>], "platform">>;
|
|
650
|
-
}, z.core.$strict>>;
|
|
651
|
-
sourceEventSeq: z.ZodOptional<z.ZodNumber>;
|
|
652
|
-
}, z.core.$strict>>;
|
|
653
|
-
}, z.core.$strict>]>;
|
|
629
|
+
}, z.core.$strict>], "type">]>;
|
|
654
630
|
}, z.core.$strict>, z.ZodObject<{
|
|
655
631
|
schemaVersion: z.ZodNumber;
|
|
656
632
|
seq: z.ZodNumber;
|
|
@@ -711,16 +687,10 @@ export declare const newConversationEventSchema: z.ZodObject<{
|
|
|
711
687
|
authorIdentityId: z.ZodOptional<z.ZodString>;
|
|
712
688
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
713
689
|
type: z.ZodLiteral<"message_updated">;
|
|
714
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
role: string;
|
|
719
|
-
}, {
|
|
720
|
-
[x: string]: unknown;
|
|
721
|
-
role: string;
|
|
722
|
-
}>>;
|
|
723
|
-
provenance: z.ZodOptional<z.ZodObject<{
|
|
690
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
691
|
+
type: z.ZodLiteral<"user_message">;
|
|
692
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
693
|
+
provenance: z.ZodObject<{
|
|
724
694
|
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
725
695
|
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
726
696
|
platform: z.ZodLiteral<"slack">;
|
|
@@ -739,9 +709,14 @@ export declare const newConversationEventSchema: z.ZodObject<{
|
|
|
739
709
|
platform: z.ZodLiteral<"system">;
|
|
740
710
|
name: z.ZodString;
|
|
741
711
|
}, z.core.$strict>], "platform">>;
|
|
742
|
-
}, z.core.$strict
|
|
743
|
-
|
|
744
|
-
|
|
712
|
+
}, z.core.$strict>;
|
|
713
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
714
|
+
type: z.ZodLiteral<"assistant_message">;
|
|
715
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
716
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
717
|
+
type: z.ZodLiteral<"tool_result">;
|
|
718
|
+
role: z.ZodOptional<z.ZodNever>;
|
|
719
|
+
}, z.core.$loose>], "type">, z.ZodObject<{
|
|
745
720
|
type: z.ZodLiteral<"mcp_provider_connected">;
|
|
746
721
|
provider: z.ZodString;
|
|
747
722
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -837,6 +812,25 @@ export declare const newConversationEventSchema: z.ZodObject<{
|
|
|
837
812
|
}, z.core.$strict>;
|
|
838
813
|
/** An event to append; the store assigns `seq` and current history version. */
|
|
839
814
|
export type NewConversationEvent = z.output<typeof newConversationEventSchema>;
|
|
815
|
+
/** Bounded observational page over the durable conversation event log. */
|
|
816
|
+
export interface ConversationEventQuery {
|
|
817
|
+
/** Exclusive lower bound on `seq`. */
|
|
818
|
+
afterSeq?: number;
|
|
819
|
+
/** Exclusive upper bound on `seq`. */
|
|
820
|
+
beforeSeq?: number;
|
|
821
|
+
/** Maximum events to return. */
|
|
822
|
+
limit: number;
|
|
823
|
+
/** Optional event-type filter. Empty/undefined returns every type. */
|
|
824
|
+
types?: readonly KnownConversationEventType[];
|
|
825
|
+
}
|
|
826
|
+
/** One page of raw conversation events plus pagination hints. */
|
|
827
|
+
export interface ConversationEventPage {
|
|
828
|
+
events: ConversationEvent[];
|
|
829
|
+
/** True when at least one older event exists before the returned page. */
|
|
830
|
+
hasOlder: boolean;
|
|
831
|
+
/** True when at least one newer event exists after the returned page. */
|
|
832
|
+
hasNewer: boolean;
|
|
833
|
+
}
|
|
840
834
|
/** Persist and read the canonical per-conversation event log. */
|
|
841
835
|
export interface ConversationEventStore {
|
|
842
836
|
/** Append events atomically, assigning `seq = max+1` under the lease. */
|
|
@@ -845,6 +839,8 @@ export interface ConversationEventStore {
|
|
|
845
839
|
replaceHistory(conversationId: string, replacement: HistoryReplacement): Promise<void>;
|
|
846
840
|
/** One event selected by its retry-stable key across history versions. */
|
|
847
841
|
loadByIdempotencyKey(conversationId: string, idempotencyKey: string): Promise<ConversationEvent | undefined>;
|
|
842
|
+
/** Latest durable instruction across history versions. */
|
|
843
|
+
loadLatestInstruction(conversationId: string): Promise<ConversationEvent | undefined>;
|
|
848
844
|
/** Events of the current history version in `seq` order. */
|
|
849
845
|
loadCurrentHistory(conversationId: string): Promise<ConversationEvent[]>;
|
|
850
846
|
/** Events in the history version containing `seq`, when it exists. */
|
|
@@ -853,5 +849,10 @@ export interface ConversationEventStore {
|
|
|
853
849
|
loadMessageHistory(conversationId: string): Promise<MessageHistory>;
|
|
854
850
|
/** All events across every history version in `seq` order. */
|
|
855
851
|
loadHistory(conversationId: string): Promise<ConversationEvent[]>;
|
|
852
|
+
/**
|
|
853
|
+
* Bounded raw event page for observational/debug reads.
|
|
854
|
+
* Defaults to the newest matching events when neither bound is set.
|
|
855
|
+
*/
|
|
856
|
+
query(conversationId: string, query: ConversationEventQuery): Promise<ConversationEventPage>;
|
|
856
857
|
}
|
|
857
858
|
export {};
|