optio-contracts 0.11.0 → 0.11.2
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/api-to-frontend.d.ts +164 -0
- package/dist/api-to-frontend.d.ts.map +1 -1
- package/dist/api-to-frontend.js +18 -0
- package/dist/api-to-frontend.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/optio-engine-to-api.js +1 -1
- package/package.json +1 -1
|
@@ -9,6 +9,32 @@ import { z } from 'zod';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const ConversationFailureReason: z.ZodEnum<["forbidden", "not-found", "no-conversation-support", "no-conversation", "not-suspended", "read-failed", "engine-unavailable"]>;
|
|
11
11
|
export type ConversationFailureReason = z.infer<typeof ConversationFailureReason>;
|
|
12
|
+
/**
|
|
13
|
+
* A file a chat message carries (chat attachments,
|
|
14
|
+
* docs/2026-11-27-chat-attachments-design.md section 1), as the chat hub
|
|
15
|
+
* (optio-chat-hub) stamped it (optio-chat's `wire.attachments_json`): `id` the
|
|
16
|
+
* file's id (32 lowercase hex of its content's hash), `name` the name the
|
|
17
|
+
* message carries it under (the original, for display), `type` the type the hub
|
|
18
|
+
* recorded from the bytes, `size` in bytes. `type` is a plain string, so a type a
|
|
19
|
+
* newer hub records never makes optio-api drop the list.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ChatAttachmentSchema: z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
type: z.ZodString;
|
|
25
|
+
size: z.ZodNumber;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
type: string;
|
|
28
|
+
name: string;
|
|
29
|
+
size: number;
|
|
30
|
+
id: string;
|
|
31
|
+
}, {
|
|
32
|
+
type: string;
|
|
33
|
+
name: string;
|
|
34
|
+
size: number;
|
|
35
|
+
id: string;
|
|
36
|
+
}>;
|
|
37
|
+
export type ChatAttachment = z.infer<typeof ChatAttachmentSchema>;
|
|
12
38
|
/**
|
|
13
39
|
* A chat message waiting for a suspended agent (agent chat,
|
|
14
40
|
* docs/2026-11-24-agent-chat-design.md section 5): the engine holds it until
|
|
@@ -23,6 +49,8 @@ export type ConversationFailureReason = z.infer<typeof ConversationFailureReason
|
|
|
23
49
|
* (`'human'`; absent counts as agent), `event` an announcement the hub made
|
|
24
50
|
* (`'joined'` / `'left'`), `description` the sender's full description. Plain
|
|
25
51
|
* strings, so a value a newer engine adds never makes optio-api drop the list.
|
|
52
|
+
* `attachments` (chat attachments): the files the message carries, in its
|
|
53
|
+
* order; absent when it carries none.
|
|
26
54
|
*/
|
|
27
55
|
export declare const PendingChatMessageSchema: z.ZodObject<{
|
|
28
56
|
id: z.ZodString;
|
|
@@ -35,6 +63,22 @@ export declare const PendingChatMessageSchema: z.ZodObject<{
|
|
|
35
63
|
kind: z.ZodOptional<z.ZodString>;
|
|
36
64
|
event: z.ZodOptional<z.ZodString>;
|
|
37
65
|
description: z.ZodOptional<z.ZodString>;
|
|
66
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
67
|
+
id: z.ZodString;
|
|
68
|
+
name: z.ZodString;
|
|
69
|
+
type: z.ZodString;
|
|
70
|
+
size: z.ZodNumber;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
type: string;
|
|
73
|
+
name: string;
|
|
74
|
+
size: number;
|
|
75
|
+
id: string;
|
|
76
|
+
}, {
|
|
77
|
+
type: string;
|
|
78
|
+
name: string;
|
|
79
|
+
size: number;
|
|
80
|
+
id: string;
|
|
81
|
+
}>, "many">>;
|
|
38
82
|
}, "strip", z.ZodTypeAny, {
|
|
39
83
|
at: string;
|
|
40
84
|
id: string;
|
|
@@ -46,6 +90,12 @@ export declare const PendingChatMessageSchema: z.ZodObject<{
|
|
|
46
90
|
description?: string | undefined;
|
|
47
91
|
to?: string | undefined;
|
|
48
92
|
kind?: string | undefined;
|
|
93
|
+
attachments?: {
|
|
94
|
+
type: string;
|
|
95
|
+
name: string;
|
|
96
|
+
size: number;
|
|
97
|
+
id: string;
|
|
98
|
+
}[] | undefined;
|
|
49
99
|
}, {
|
|
50
100
|
at: string;
|
|
51
101
|
id: string;
|
|
@@ -57,6 +107,12 @@ export declare const PendingChatMessageSchema: z.ZodObject<{
|
|
|
57
107
|
description?: string | undefined;
|
|
58
108
|
to?: string | undefined;
|
|
59
109
|
kind?: string | undefined;
|
|
110
|
+
attachments?: {
|
|
111
|
+
type: string;
|
|
112
|
+
name: string;
|
|
113
|
+
size: number;
|
|
114
|
+
id: string;
|
|
115
|
+
}[] | undefined;
|
|
60
116
|
}>;
|
|
61
117
|
export type PendingChatMessage = z.infer<typeof PendingChatMessageSchema>;
|
|
62
118
|
/** The chat messages waiting for a suspended agent, oldest first. */
|
|
@@ -71,6 +127,22 @@ export declare const PendingChatSchema: z.ZodArray<z.ZodObject<{
|
|
|
71
127
|
kind: z.ZodOptional<z.ZodString>;
|
|
72
128
|
event: z.ZodOptional<z.ZodString>;
|
|
73
129
|
description: z.ZodOptional<z.ZodString>;
|
|
130
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
131
|
+
id: z.ZodString;
|
|
132
|
+
name: z.ZodString;
|
|
133
|
+
type: z.ZodString;
|
|
134
|
+
size: z.ZodNumber;
|
|
135
|
+
}, "strip", z.ZodTypeAny, {
|
|
136
|
+
type: string;
|
|
137
|
+
name: string;
|
|
138
|
+
size: number;
|
|
139
|
+
id: string;
|
|
140
|
+
}, {
|
|
141
|
+
type: string;
|
|
142
|
+
name: string;
|
|
143
|
+
size: number;
|
|
144
|
+
id: string;
|
|
145
|
+
}>, "many">>;
|
|
74
146
|
}, "strip", z.ZodTypeAny, {
|
|
75
147
|
at: string;
|
|
76
148
|
id: string;
|
|
@@ -82,6 +154,12 @@ export declare const PendingChatSchema: z.ZodArray<z.ZodObject<{
|
|
|
82
154
|
description?: string | undefined;
|
|
83
155
|
to?: string | undefined;
|
|
84
156
|
kind?: string | undefined;
|
|
157
|
+
attachments?: {
|
|
158
|
+
type: string;
|
|
159
|
+
name: string;
|
|
160
|
+
size: number;
|
|
161
|
+
id: string;
|
|
162
|
+
}[] | undefined;
|
|
85
163
|
}, {
|
|
86
164
|
at: string;
|
|
87
165
|
id: string;
|
|
@@ -93,6 +171,12 @@ export declare const PendingChatSchema: z.ZodArray<z.ZodObject<{
|
|
|
93
171
|
description?: string | undefined;
|
|
94
172
|
to?: string | undefined;
|
|
95
173
|
kind?: string | undefined;
|
|
174
|
+
attachments?: {
|
|
175
|
+
type: string;
|
|
176
|
+
name: string;
|
|
177
|
+
size: number;
|
|
178
|
+
id: string;
|
|
179
|
+
}[] | undefined;
|
|
96
180
|
}>, "many">;
|
|
97
181
|
/**
|
|
98
182
|
* A suspended process's saved conversation record: `events` are `[seq, event]`
|
|
@@ -114,6 +198,22 @@ export declare const ConversationRecordSchema: z.ZodObject<{
|
|
|
114
198
|
kind: z.ZodOptional<z.ZodString>;
|
|
115
199
|
event: z.ZodOptional<z.ZodString>;
|
|
116
200
|
description: z.ZodOptional<z.ZodString>;
|
|
201
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
202
|
+
id: z.ZodString;
|
|
203
|
+
name: z.ZodString;
|
|
204
|
+
type: z.ZodString;
|
|
205
|
+
size: z.ZodNumber;
|
|
206
|
+
}, "strip", z.ZodTypeAny, {
|
|
207
|
+
type: string;
|
|
208
|
+
name: string;
|
|
209
|
+
size: number;
|
|
210
|
+
id: string;
|
|
211
|
+
}, {
|
|
212
|
+
type: string;
|
|
213
|
+
name: string;
|
|
214
|
+
size: number;
|
|
215
|
+
id: string;
|
|
216
|
+
}>, "many">>;
|
|
117
217
|
}, "strip", z.ZodTypeAny, {
|
|
118
218
|
at: string;
|
|
119
219
|
id: string;
|
|
@@ -125,6 +225,12 @@ export declare const ConversationRecordSchema: z.ZodObject<{
|
|
|
125
225
|
description?: string | undefined;
|
|
126
226
|
to?: string | undefined;
|
|
127
227
|
kind?: string | undefined;
|
|
228
|
+
attachments?: {
|
|
229
|
+
type: string;
|
|
230
|
+
name: string;
|
|
231
|
+
size: number;
|
|
232
|
+
id: string;
|
|
233
|
+
}[] | undefined;
|
|
128
234
|
}, {
|
|
129
235
|
at: string;
|
|
130
236
|
id: string;
|
|
@@ -136,6 +242,12 @@ export declare const ConversationRecordSchema: z.ZodObject<{
|
|
|
136
242
|
description?: string | undefined;
|
|
137
243
|
to?: string | undefined;
|
|
138
244
|
kind?: string | undefined;
|
|
245
|
+
attachments?: {
|
|
246
|
+
type: string;
|
|
247
|
+
name: string;
|
|
248
|
+
size: number;
|
|
249
|
+
id: string;
|
|
250
|
+
}[] | undefined;
|
|
139
251
|
}>, "many">>;
|
|
140
252
|
}, "strip", z.ZodTypeAny, {
|
|
141
253
|
capturedAt: string | null;
|
|
@@ -151,6 +263,12 @@ export declare const ConversationRecordSchema: z.ZodObject<{
|
|
|
151
263
|
description?: string | undefined;
|
|
152
264
|
to?: string | undefined;
|
|
153
265
|
kind?: string | undefined;
|
|
266
|
+
attachments?: {
|
|
267
|
+
type: string;
|
|
268
|
+
name: string;
|
|
269
|
+
size: number;
|
|
270
|
+
id: string;
|
|
271
|
+
}[] | undefined;
|
|
154
272
|
}[] | undefined;
|
|
155
273
|
}, {
|
|
156
274
|
capturedAt: string | null;
|
|
@@ -166,6 +284,12 @@ export declare const ConversationRecordSchema: z.ZodObject<{
|
|
|
166
284
|
description?: string | undefined;
|
|
167
285
|
to?: string | undefined;
|
|
168
286
|
kind?: string | undefined;
|
|
287
|
+
attachments?: {
|
|
288
|
+
type: string;
|
|
289
|
+
name: string;
|
|
290
|
+
size: number;
|
|
291
|
+
id: string;
|
|
292
|
+
}[] | undefined;
|
|
169
293
|
}[] | undefined;
|
|
170
294
|
}>;
|
|
171
295
|
export type ConversationRecord = z.infer<typeof ConversationRecordSchema>;
|
|
@@ -1850,6 +1974,22 @@ export declare const processesContract: {
|
|
|
1850
1974
|
kind: z.ZodOptional<z.ZodString>;
|
|
1851
1975
|
event: z.ZodOptional<z.ZodString>;
|
|
1852
1976
|
description: z.ZodOptional<z.ZodString>;
|
|
1977
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1978
|
+
id: z.ZodString;
|
|
1979
|
+
name: z.ZodString;
|
|
1980
|
+
type: z.ZodString;
|
|
1981
|
+
size: z.ZodNumber;
|
|
1982
|
+
}, "strip", z.ZodTypeAny, {
|
|
1983
|
+
type: string;
|
|
1984
|
+
name: string;
|
|
1985
|
+
size: number;
|
|
1986
|
+
id: string;
|
|
1987
|
+
}, {
|
|
1988
|
+
type: string;
|
|
1989
|
+
name: string;
|
|
1990
|
+
size: number;
|
|
1991
|
+
id: string;
|
|
1992
|
+
}>, "many">>;
|
|
1853
1993
|
}, "strip", z.ZodTypeAny, {
|
|
1854
1994
|
at: string;
|
|
1855
1995
|
id: string;
|
|
@@ -1861,6 +2001,12 @@ export declare const processesContract: {
|
|
|
1861
2001
|
description?: string | undefined;
|
|
1862
2002
|
to?: string | undefined;
|
|
1863
2003
|
kind?: string | undefined;
|
|
2004
|
+
attachments?: {
|
|
2005
|
+
type: string;
|
|
2006
|
+
name: string;
|
|
2007
|
+
size: number;
|
|
2008
|
+
id: string;
|
|
2009
|
+
}[] | undefined;
|
|
1864
2010
|
}, {
|
|
1865
2011
|
at: string;
|
|
1866
2012
|
id: string;
|
|
@@ -1872,6 +2018,12 @@ export declare const processesContract: {
|
|
|
1872
2018
|
description?: string | undefined;
|
|
1873
2019
|
to?: string | undefined;
|
|
1874
2020
|
kind?: string | undefined;
|
|
2021
|
+
attachments?: {
|
|
2022
|
+
type: string;
|
|
2023
|
+
name: string;
|
|
2024
|
+
size: number;
|
|
2025
|
+
id: string;
|
|
2026
|
+
}[] | undefined;
|
|
1875
2027
|
}>, "many">>;
|
|
1876
2028
|
}, "strip", z.ZodTypeAny, {
|
|
1877
2029
|
capturedAt: string | null;
|
|
@@ -1887,6 +2039,12 @@ export declare const processesContract: {
|
|
|
1887
2039
|
description?: string | undefined;
|
|
1888
2040
|
to?: string | undefined;
|
|
1889
2041
|
kind?: string | undefined;
|
|
2042
|
+
attachments?: {
|
|
2043
|
+
type: string;
|
|
2044
|
+
name: string;
|
|
2045
|
+
size: number;
|
|
2046
|
+
id: string;
|
|
2047
|
+
}[] | undefined;
|
|
1890
2048
|
}[] | undefined;
|
|
1891
2049
|
}, {
|
|
1892
2050
|
capturedAt: string | null;
|
|
@@ -1902,6 +2060,12 @@ export declare const processesContract: {
|
|
|
1902
2060
|
description?: string | undefined;
|
|
1903
2061
|
to?: string | undefined;
|
|
1904
2062
|
kind?: string | undefined;
|
|
2063
|
+
attachments?: {
|
|
2064
|
+
type: string;
|
|
2065
|
+
name: string;
|
|
2066
|
+
size: number;
|
|
2067
|
+
id: string;
|
|
2068
|
+
}[] | undefined;
|
|
1905
2069
|
}[] | undefined;
|
|
1906
2070
|
}>;
|
|
1907
2071
|
401: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-to-frontend.d.ts","sourceRoot":"","sources":["../src/api-to-frontend.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0BxB;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,2IAQpC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAIlF
|
|
1
|
+
{"version":3,"file":"api-to-frontend.d.ts","sourceRoot":"","sources":["../src/api-to-frontend.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0BxB;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,2IAQpC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+L5B,CAAC;AAQH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS5B,CAAC"}
|
package/dist/api-to-frontend.js
CHANGED
|
@@ -36,6 +36,21 @@ export const ConversationFailureReason = z.enum([
|
|
|
36
36
|
'engine-unavailable',
|
|
37
37
|
]);
|
|
38
38
|
const ConversationErrorBody = z.object({ reason: ConversationFailureReason, message: z.string() });
|
|
39
|
+
/**
|
|
40
|
+
* A file a chat message carries (chat attachments,
|
|
41
|
+
* docs/2026-11-27-chat-attachments-design.md section 1), as the chat hub
|
|
42
|
+
* (optio-chat-hub) stamped it (optio-chat's `wire.attachments_json`): `id` the
|
|
43
|
+
* file's id (32 lowercase hex of its content's hash), `name` the name the
|
|
44
|
+
* message carries it under (the original, for display), `type` the type the hub
|
|
45
|
+
* recorded from the bytes, `size` in bytes. `type` is a plain string, so a type a
|
|
46
|
+
* newer hub records never makes optio-api drop the list.
|
|
47
|
+
*/
|
|
48
|
+
export const ChatAttachmentSchema = z.object({
|
|
49
|
+
id: z.string().regex(/^[0-9a-f]{32}$/),
|
|
50
|
+
name: z.string(),
|
|
51
|
+
type: z.string(),
|
|
52
|
+
size: z.number().int().min(0),
|
|
53
|
+
});
|
|
39
54
|
/**
|
|
40
55
|
* A chat message waiting for a suspended agent (agent chat,
|
|
41
56
|
* docs/2026-11-24-agent-chat-design.md section 5): the engine holds it until
|
|
@@ -50,6 +65,8 @@ const ConversationErrorBody = z.object({ reason: ConversationFailureReason, mess
|
|
|
50
65
|
* (`'human'`; absent counts as agent), `event` an announcement the hub made
|
|
51
66
|
* (`'joined'` / `'left'`), `description` the sender's full description. Plain
|
|
52
67
|
* strings, so a value a newer engine adds never makes optio-api drop the list.
|
|
68
|
+
* `attachments` (chat attachments): the files the message carries, in its
|
|
69
|
+
* order; absent when it carries none.
|
|
53
70
|
*/
|
|
54
71
|
export const PendingChatMessageSchema = z.object({
|
|
55
72
|
id: z.string(),
|
|
@@ -62,6 +79,7 @@ export const PendingChatMessageSchema = z.object({
|
|
|
62
79
|
kind: z.string().optional(),
|
|
63
80
|
event: z.string().optional(),
|
|
64
81
|
description: z.string().optional(),
|
|
82
|
+
attachments: z.array(ChatAttachmentSchema).optional(),
|
|
65
83
|
});
|
|
66
84
|
/** The chat messages waiting for a suspended agent, oldest first. */
|
|
67
85
|
export const PendingChatSchema = z.array(PendingChatMessageSchema);
|
|
@@ -1 +1 @@
|
|
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C,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,cAAc,EAAE,2BAA2B,CAAC,QAAQ,EAAE,EAAE,CAAC;QACzG,SAAS,EAAE;YACT,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;SACvC;QACD,OAAO,EAAE,6BAA6B;KACvC;CACF,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE;CAClB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,SAAS,EAAE;QACT,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,kBAAkB;QACxB,SAAS,EAAE;YACT,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC;SACtD;QACD,OAAO,EAAE,kDAAkD;KAC5D;CACF,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { SessionEventsStreamMessageSchema } from './schemas/session-events.js';
|
|
|
4
4
|
export type { Process, ProcessState, LogEntry, ProcessMetadataFilter, ProcessMetadataPredicate, BrowserOpenRequest, SessionEvent, ProcessSnapshot } from './schemas/process.js';
|
|
5
5
|
export type { SessionEventsStreamMessage } from './schemas/session-events.js';
|
|
6
6
|
export { and, or, not, leaf, eq, ne, isIn, notIn, exists, gt, gte, lt, lte } from './process-filter-helpers.js';
|
|
7
|
-
export { processesContract, discoveryContract, ConversationFailureReason, ConversationRecordSchema, type ConversationRecord, PendingChatMessageSchema, PendingChatSchema, type PendingChatMessage, } from './api-to-frontend.js';
|
|
7
|
+
export { processesContract, discoveryContract, ConversationFailureReason, ConversationRecordSchema, type ConversationRecord, PendingChatMessageSchema, PendingChatSchema, type PendingChatMessage, ChatAttachmentSchema, type ChatAttachment, } from './api-to-frontend.js';
|
|
8
8
|
export { LaunchFailureReason, CancelFailureReason, DismissFailureReason, ResurrectFailureReason, ListSnapshotsFailureReason, GroupCancelFailureReason, BlockLaunchesFailureReason, StoreAvatarFailureReason, } from './engine-failure-reasons.js';
|
|
9
9
|
export { apiToFrontendRouteErrorReasons, type ApiToFrontendRouteId, } from './route-error-reasons.js';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,qBAAqB,EAC3D,uBAAuB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,cAAc,EACjD,2BAA2B,EAAE,8BAA8B,EAC3D,8BAA8B,EAAE,iCAAiC,EACjE,YAAY,EAAE,aAAa,EAAE,eAAe,EAC5C,wBAAwB,EAAE,kBAAkB,EAC5C,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAG/E,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,qBAAqB,EACtD,wBAAwB,EACxB,kBAAkB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC9F,YAAY,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAG9E,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,E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,CAAC;AAG9B,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EACL,8BAA8B,EAC9B,KAAK,oBAAoB,GAC1B,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { SessionEventsStreamMessageSchema } from './schemas/session-events.js';
|
|
|
5
5
|
// Filter builder helpers
|
|
6
6
|
export { and, or, not, leaf, eq, ne, isIn, notIn, exists, gt, gte, lt, lte } from './process-filter-helpers.js';
|
|
7
7
|
// Contract
|
|
8
|
-
export { processesContract, discoveryContract, ConversationFailureReason, ConversationRecordSchema, PendingChatMessageSchema, PendingChatSchema, } from './api-to-frontend.js';
|
|
8
|
+
export { processesContract, discoveryContract, ConversationFailureReason, ConversationRecordSchema, PendingChatMessageSchema, PendingChatSchema, ChatAttachmentSchema, } from './api-to-frontend.js';
|
|
9
9
|
// Engine contract failure-reason enums (Zod schemas + types) — browser-safe re-exports
|
|
10
10
|
export { LaunchFailureReason, CancelFailureReason, DismissFailureReason, ResurrectFailureReason, ListSnapshotsFailureReason, GroupCancelFailureReason, BlockLaunchesFailureReason, StoreAvatarFailureReason, } from './engine-failure-reasons.js';
|
|
11
11
|
// Cross-package error-route manifest (consumed by host-app lints)
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,qBAAqB,EAC3D,uBAAuB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,cAAc,EACjD,2BAA2B,EAAE,8BAA8B,EAC3D,8BAA8B,EAAE,i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yBAAyB,EACzB,wBAAwB,EAExB,wBAAwB,EACxB,iBAAiB,EAEjB,oBAAoB,GAErB,MAAM,sBAAsB,CAAC;AAE9B,uFAAuF;AACvF,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AAErC,kEAAkE;AAClE,OAAO,EACL,8BAA8B,GAE/B,MAAM,0BAA0B,CAAC"}
|
|
@@ -141,7 +141,7 @@ export const optioEngineContract = defineContract('optio-engine', {
|
|
|
141
141
|
}),
|
|
142
142
|
// A host user's picture (optio-api's `inputAuthor` avatar, read once on a
|
|
143
143
|
// miss) for the engine to check and store exactly as the chat hub stores an
|
|
144
|
-
// upload (optio-chat's
|
|
144
|
+
// upload (optio-chat-hub's images.py), into `{prefix}_chat_avatars`: the
|
|
145
145
|
// engine owns the write.
|
|
146
146
|
storeAvatar: defineMethod({
|
|
147
147
|
params: z.object({
|