@moxt-ai/mobius-protocol 0.0.11 → 0.0.13
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/control-messages.d.ts +1 -1
- package/dist/control-messages.d.ts.map +1 -1
- package/dist/control-messages.js +1 -1
- package/dist/control-messages.js.map +1 -1
- package/dist/daemon-transport.d.ts +170 -9
- package/dist/daemon-transport.d.ts.map +1 -1
- package/dist/native-sessions.d.ts +220 -12
- package/dist/native-sessions.d.ts.map +1 -1
- package/dist/native-sessions.js +36 -0
- package/dist/native-sessions.js.map +1 -1
- package/dist/session-history.d.ts +256 -22
- package/dist/session-history.d.ts.map +1 -1
- package/dist/session-history.js +47 -10
- package/dist/session-history.js.map +1 -1
- package/dist/session-live-history.d.ts +74 -6
- package/dist/session-live-history.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -20,11 +20,41 @@ export declare function parseNativeHistoryText(text: string): {
|
|
|
20
20
|
readonly text: string;
|
|
21
21
|
readonly images: readonly NativeHistoryImage[];
|
|
22
22
|
};
|
|
23
|
-
declare const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
declare const nativeMessageActivitySchema: z.ZodReadonly<z.ZodObject<{
|
|
24
|
+
activityId: z.ZodString;
|
|
25
|
+
activityType: z.ZodString;
|
|
26
|
+
content: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
27
|
+
artifactId: z.ZodDefault<z.ZodString>;
|
|
28
|
+
data: z.ZodString;
|
|
29
|
+
mimeType: z.ZodString;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
newText: z.ZodString;
|
|
32
|
+
oldText: z.ZodString;
|
|
33
|
+
path: z.ZodString;
|
|
34
|
+
terminalId: z.ZodString;
|
|
35
|
+
text: z.ZodString;
|
|
36
|
+
type: z.ZodEnum<{
|
|
37
|
+
diff: "diff";
|
|
38
|
+
image: "image";
|
|
39
|
+
resource: "resource";
|
|
40
|
+
resource_link: "resource_link";
|
|
41
|
+
terminal: "terminal";
|
|
42
|
+
text: "text";
|
|
43
|
+
video: "video";
|
|
44
|
+
}>;
|
|
45
|
+
uri: z.ZodString;
|
|
46
|
+
}, z.core.$strict>>>>;
|
|
47
|
+
input: z.ZodString;
|
|
48
|
+
locations: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
output: z.ZodString;
|
|
51
|
+
sequence: z.ZodNumber;
|
|
52
|
+
status: z.ZodString;
|
|
53
|
+
title: z.ZodString;
|
|
54
|
+
toolKind: z.ZodString;
|
|
55
|
+
}, z.core.$strict>>;
|
|
56
|
+
declare const historyMessage: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
57
|
+
role: z.ZodLiteral<"user">;
|
|
28
58
|
text: z.ZodString;
|
|
29
59
|
images: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
30
60
|
data: z.ZodString;
|
|
@@ -36,14 +66,78 @@ declare const historyMessage: z.ZodReadonly<z.ZodObject<{
|
|
|
36
66
|
}>;
|
|
37
67
|
name: z.ZodString;
|
|
38
68
|
}, z.core.$strict>>>>>;
|
|
39
|
-
}, z.core.$strict
|
|
69
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
70
|
+
activities: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
71
|
+
activityId: z.ZodString;
|
|
72
|
+
activityType: z.ZodString;
|
|
73
|
+
content: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
74
|
+
artifactId: z.ZodDefault<z.ZodString>;
|
|
75
|
+
data: z.ZodString;
|
|
76
|
+
mimeType: z.ZodString;
|
|
77
|
+
name: z.ZodString;
|
|
78
|
+
newText: z.ZodString;
|
|
79
|
+
oldText: z.ZodString;
|
|
80
|
+
path: z.ZodString;
|
|
81
|
+
terminalId: z.ZodString;
|
|
82
|
+
text: z.ZodString;
|
|
83
|
+
type: z.ZodEnum<{
|
|
84
|
+
diff: "diff";
|
|
85
|
+
image: "image";
|
|
86
|
+
resource: "resource";
|
|
87
|
+
resource_link: "resource_link";
|
|
88
|
+
terminal: "terminal";
|
|
89
|
+
text: "text";
|
|
90
|
+
video: "video";
|
|
91
|
+
}>;
|
|
92
|
+
uri: z.ZodString;
|
|
93
|
+
}, z.core.$strict>>>>;
|
|
94
|
+
input: z.ZodString;
|
|
95
|
+
locations: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
output: z.ZodString;
|
|
98
|
+
sequence: z.ZodNumber;
|
|
99
|
+
status: z.ZodString;
|
|
100
|
+
title: z.ZodString;
|
|
101
|
+
toolKind: z.ZodString;
|
|
102
|
+
}, z.core.$strict>>>>>;
|
|
103
|
+
content: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
104
|
+
artifactId: z.ZodDefault<z.ZodString>;
|
|
105
|
+
data: z.ZodString;
|
|
106
|
+
mimeType: z.ZodString;
|
|
107
|
+
name: z.ZodString;
|
|
108
|
+
newText: z.ZodString;
|
|
109
|
+
oldText: z.ZodString;
|
|
110
|
+
path: z.ZodString;
|
|
111
|
+
terminalId: z.ZodString;
|
|
112
|
+
text: z.ZodString;
|
|
113
|
+
type: z.ZodEnum<{
|
|
114
|
+
diff: "diff";
|
|
115
|
+
image: "image";
|
|
116
|
+
resource: "resource";
|
|
117
|
+
resource_link: "resource_link";
|
|
118
|
+
terminal: "terminal";
|
|
119
|
+
text: "text";
|
|
120
|
+
video: "video";
|
|
121
|
+
}>;
|
|
122
|
+
uri: z.ZodString;
|
|
123
|
+
}, z.core.$strict>>>>>;
|
|
124
|
+
role: z.ZodLiteral<"assistant">;
|
|
125
|
+
text: z.ZodString;
|
|
126
|
+
images: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
127
|
+
data: z.ZodString;
|
|
128
|
+
mimeType: z.ZodEnum<{
|
|
129
|
+
"image/gif": "image/gif";
|
|
130
|
+
"image/jpeg": "image/jpeg";
|
|
131
|
+
"image/png": "image/png";
|
|
132
|
+
"image/webp": "image/webp";
|
|
133
|
+
}>;
|
|
134
|
+
name: z.ZodString;
|
|
135
|
+
}, z.core.$strict>>>>>;
|
|
136
|
+
}, z.core.$strict>>], "role">;
|
|
40
137
|
declare const sessionHistorySchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
41
138
|
status: z.ZodLiteral<"available">;
|
|
42
|
-
messages: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
43
|
-
role: z.
|
|
44
|
-
assistant: "assistant";
|
|
45
|
-
user: "user";
|
|
46
|
-
}>;
|
|
139
|
+
messages: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
140
|
+
role: z.ZodLiteral<"user">;
|
|
47
141
|
text: z.ZodString;
|
|
48
142
|
images: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
49
143
|
data: z.ZodString;
|
|
@@ -55,22 +149,91 @@ declare const sessionHistorySchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.Zod
|
|
|
55
149
|
}>;
|
|
56
150
|
name: z.ZodString;
|
|
57
151
|
}, z.core.$strict>>>>>;
|
|
58
|
-
}, z.core.$strict
|
|
152
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
153
|
+
activities: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
154
|
+
activityId: z.ZodString;
|
|
155
|
+
activityType: z.ZodString;
|
|
156
|
+
content: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
157
|
+
artifactId: z.ZodDefault<z.ZodString>;
|
|
158
|
+
data: z.ZodString;
|
|
159
|
+
mimeType: z.ZodString;
|
|
160
|
+
name: z.ZodString;
|
|
161
|
+
newText: z.ZodString;
|
|
162
|
+
oldText: z.ZodString;
|
|
163
|
+
path: z.ZodString;
|
|
164
|
+
terminalId: z.ZodString;
|
|
165
|
+
text: z.ZodString;
|
|
166
|
+
type: z.ZodEnum<{
|
|
167
|
+
diff: "diff";
|
|
168
|
+
image: "image";
|
|
169
|
+
resource: "resource";
|
|
170
|
+
resource_link: "resource_link";
|
|
171
|
+
terminal: "terminal";
|
|
172
|
+
text: "text";
|
|
173
|
+
video: "video";
|
|
174
|
+
}>;
|
|
175
|
+
uri: z.ZodString;
|
|
176
|
+
}, z.core.$strict>>>>;
|
|
177
|
+
input: z.ZodString;
|
|
178
|
+
locations: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
179
|
+
name: z.ZodString;
|
|
180
|
+
output: z.ZodString;
|
|
181
|
+
sequence: z.ZodNumber;
|
|
182
|
+
status: z.ZodString;
|
|
183
|
+
title: z.ZodString;
|
|
184
|
+
toolKind: z.ZodString;
|
|
185
|
+
}, z.core.$strict>>>>>;
|
|
186
|
+
content: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
187
|
+
artifactId: z.ZodDefault<z.ZodString>;
|
|
188
|
+
data: z.ZodString;
|
|
189
|
+
mimeType: z.ZodString;
|
|
190
|
+
name: z.ZodString;
|
|
191
|
+
newText: z.ZodString;
|
|
192
|
+
oldText: z.ZodString;
|
|
193
|
+
path: z.ZodString;
|
|
194
|
+
terminalId: z.ZodString;
|
|
195
|
+
text: z.ZodString;
|
|
196
|
+
type: z.ZodEnum<{
|
|
197
|
+
diff: "diff";
|
|
198
|
+
image: "image";
|
|
199
|
+
resource: "resource";
|
|
200
|
+
resource_link: "resource_link";
|
|
201
|
+
terminal: "terminal";
|
|
202
|
+
text: "text";
|
|
203
|
+
video: "video";
|
|
204
|
+
}>;
|
|
205
|
+
uri: z.ZodString;
|
|
206
|
+
}, z.core.$strict>>>>>;
|
|
207
|
+
role: z.ZodLiteral<"assistant">;
|
|
208
|
+
text: z.ZodString;
|
|
209
|
+
images: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
210
|
+
data: z.ZodString;
|
|
211
|
+
mimeType: z.ZodEnum<{
|
|
212
|
+
"image/gif": "image/gif";
|
|
213
|
+
"image/jpeg": "image/jpeg";
|
|
214
|
+
"image/png": "image/png";
|
|
215
|
+
"image/webp": "image/webp";
|
|
216
|
+
}>;
|
|
217
|
+
name: z.ZodString;
|
|
218
|
+
}, z.core.$strict>>>>>;
|
|
219
|
+
}, z.core.$strict>>], "role">>>;
|
|
59
220
|
truncated: z.ZodBoolean;
|
|
60
221
|
coveredCommandIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
61
222
|
coveredMessageIds: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
62
223
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
63
224
|
status: z.ZodLiteral<"unavailable">;
|
|
225
|
+
cause: z.ZodReadonly<z.ZodObject<{
|
|
226
|
+
code: z.ZodString;
|
|
227
|
+
message: z.ZodString;
|
|
228
|
+
}, z.core.$strict>>;
|
|
64
229
|
}, z.core.$strict>>], "status">;
|
|
65
230
|
export type NativeSessionHistory = z.infer<typeof sessionHistorySchema>;
|
|
66
231
|
export type NativeHistoryMessage = z.infer<typeof historyMessage>;
|
|
67
|
-
|
|
232
|
+
export type NativeMessageActivity = z.infer<typeof nativeMessageActivitySchema>;
|
|
233
|
+
declare const nativeMessagePageSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
68
234
|
status: z.ZodLiteral<"available">;
|
|
69
|
-
messages: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
70
|
-
role: z.
|
|
71
|
-
assistant: "assistant";
|
|
72
|
-
user: "user";
|
|
73
|
-
}>;
|
|
235
|
+
messages: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
236
|
+
role: z.ZodLiteral<"user">;
|
|
74
237
|
text: z.ZodString;
|
|
75
238
|
images: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
76
239
|
data: z.ZodString;
|
|
@@ -82,17 +245,88 @@ declare const sessionHistoryPageSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z
|
|
|
82
245
|
}>;
|
|
83
246
|
name: z.ZodString;
|
|
84
247
|
}, z.core.$strict>>>>>;
|
|
85
|
-
}, z.core.$strict
|
|
248
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
249
|
+
activities: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
250
|
+
activityId: z.ZodString;
|
|
251
|
+
activityType: z.ZodString;
|
|
252
|
+
content: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
253
|
+
artifactId: z.ZodDefault<z.ZodString>;
|
|
254
|
+
data: z.ZodString;
|
|
255
|
+
mimeType: z.ZodString;
|
|
256
|
+
name: z.ZodString;
|
|
257
|
+
newText: z.ZodString;
|
|
258
|
+
oldText: z.ZodString;
|
|
259
|
+
path: z.ZodString;
|
|
260
|
+
terminalId: z.ZodString;
|
|
261
|
+
text: z.ZodString;
|
|
262
|
+
type: z.ZodEnum<{
|
|
263
|
+
diff: "diff";
|
|
264
|
+
image: "image";
|
|
265
|
+
resource: "resource";
|
|
266
|
+
resource_link: "resource_link";
|
|
267
|
+
terminal: "terminal";
|
|
268
|
+
text: "text";
|
|
269
|
+
video: "video";
|
|
270
|
+
}>;
|
|
271
|
+
uri: z.ZodString;
|
|
272
|
+
}, z.core.$strict>>>>;
|
|
273
|
+
input: z.ZodString;
|
|
274
|
+
locations: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
275
|
+
name: z.ZodString;
|
|
276
|
+
output: z.ZodString;
|
|
277
|
+
sequence: z.ZodNumber;
|
|
278
|
+
status: z.ZodString;
|
|
279
|
+
title: z.ZodString;
|
|
280
|
+
toolKind: z.ZodString;
|
|
281
|
+
}, z.core.$strict>>>>>;
|
|
282
|
+
content: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
283
|
+
artifactId: z.ZodDefault<z.ZodString>;
|
|
284
|
+
data: z.ZodString;
|
|
285
|
+
mimeType: z.ZodString;
|
|
286
|
+
name: z.ZodString;
|
|
287
|
+
newText: z.ZodString;
|
|
288
|
+
oldText: z.ZodString;
|
|
289
|
+
path: z.ZodString;
|
|
290
|
+
terminalId: z.ZodString;
|
|
291
|
+
text: z.ZodString;
|
|
292
|
+
type: z.ZodEnum<{
|
|
293
|
+
diff: "diff";
|
|
294
|
+
image: "image";
|
|
295
|
+
resource: "resource";
|
|
296
|
+
resource_link: "resource_link";
|
|
297
|
+
terminal: "terminal";
|
|
298
|
+
text: "text";
|
|
299
|
+
video: "video";
|
|
300
|
+
}>;
|
|
301
|
+
uri: z.ZodString;
|
|
302
|
+
}, z.core.$strict>>>>>;
|
|
303
|
+
role: z.ZodLiteral<"assistant">;
|
|
304
|
+
text: z.ZodString;
|
|
305
|
+
images: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
306
|
+
data: z.ZodString;
|
|
307
|
+
mimeType: z.ZodEnum<{
|
|
308
|
+
"image/gif": "image/gif";
|
|
309
|
+
"image/jpeg": "image/jpeg";
|
|
310
|
+
"image/png": "image/png";
|
|
311
|
+
"image/webp": "image/webp";
|
|
312
|
+
}>;
|
|
313
|
+
name: z.ZodString;
|
|
314
|
+
}, z.core.$strict>>>>>;
|
|
315
|
+
}, z.core.$strict>>], "role">>>;
|
|
86
316
|
truncated: z.ZodBoolean;
|
|
87
317
|
coveredCommandIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
88
318
|
coveredMessageIds: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
89
319
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
90
320
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
91
321
|
status: z.ZodLiteral<"unavailable">;
|
|
322
|
+
cause: z.ZodReadonly<z.ZodObject<{
|
|
323
|
+
code: z.ZodString;
|
|
324
|
+
message: z.ZodString;
|
|
325
|
+
}, z.core.$strict>>;
|
|
92
326
|
nextCursor: z.ZodNull;
|
|
93
327
|
}, z.core.$strict>>], "status">;
|
|
94
|
-
export type
|
|
328
|
+
export type NativeMessagePage = z.infer<typeof nativeMessagePageSchema>;
|
|
95
329
|
export declare const decodeNativeSessionHistory: (value: unknown) => NativeSessionHistory;
|
|
96
|
-
export declare const
|
|
97
|
-
export {
|
|
330
|
+
export declare const decodeNativeMessagePage: (value: unknown) => NativeMessagePage;
|
|
331
|
+
export { nativeMessagePageSchema, sessionHistorySchema };
|
|
98
332
|
//# sourceMappingURL=session-history.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-history.d.ts","sourceRoot":"","sources":["../src/session-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"session-history.d.ts","sourceRoot":"","sources":["../src/session-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,+BAA+B,SAAU,CAAC;AACvD,eAAO,MAAM,6BAA6B,OAAQ,CAAC;AACnD,eAAO,MAAM,qCAAqC,KAAK,CAAC;AACxD,eAAO,MAAM,qCAAqC,UAAY,CAAC;AAE/D,QAAA,MAAM,YAAY;;;;;;;;;mBAUH,CAAC;AAEhB,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAE9D;oEACo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|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ProtocolMessageError } from "./codecs/messages.js";
|
|
3
|
+
import { displayContentSchema } from "./control-messages.js";
|
|
3
4
|
export const SESSION_HISTORY_CHARACTER_LIMIT = 256_000;
|
|
4
5
|
export const SESSION_HISTORY_MESSAGE_LIMIT = 1_000;
|
|
5
6
|
export const SESSION_HISTORY_PREVIEW_MESSAGE_LIMIT = 10;
|
|
@@ -41,13 +42,38 @@ export function parseNativeHistoryText(text) {
|
|
|
41
42
|
});
|
|
42
43
|
return { text: plainText, images };
|
|
43
44
|
}
|
|
44
|
-
const
|
|
45
|
+
const nativeMessageActivitySchema = z
|
|
45
46
|
.strictObject({
|
|
46
|
-
|
|
47
|
+
activityId: z.string().min(1).max(128),
|
|
48
|
+
activityType: z.string().min(1).max(128),
|
|
49
|
+
content: z.array(displayContentSchema).max(100).readonly(),
|
|
50
|
+
input: z.string().max(100_000),
|
|
51
|
+
locations: z.array(z.string().min(1).max(2_048)).max(100).readonly(),
|
|
52
|
+
name: z.string().max(128),
|
|
53
|
+
output: z.string().max(100_000),
|
|
54
|
+
sequence: z.number().int().nonnegative(),
|
|
55
|
+
status: z.string().min(1).max(64),
|
|
56
|
+
title: z.string().max(500),
|
|
57
|
+
toolKind: z.string().max(64),
|
|
58
|
+
})
|
|
59
|
+
.readonly();
|
|
60
|
+
const userHistoryMessage = z
|
|
61
|
+
.strictObject({
|
|
62
|
+
role: z.literal("user"),
|
|
63
|
+
text: z.string().max(SESSION_HISTORY_CHARACTER_LIMIT),
|
|
64
|
+
images: z.array(historyImage).max(8).readonly().optional(),
|
|
65
|
+
})
|
|
66
|
+
.readonly();
|
|
67
|
+
const assistantHistoryMessage = z
|
|
68
|
+
.strictObject({
|
|
69
|
+
activities: z.array(nativeMessageActivitySchema).max(100).readonly().default([]),
|
|
70
|
+
content: z.array(displayContentSchema).max(100).readonly().default([]),
|
|
71
|
+
role: z.literal("assistant"),
|
|
47
72
|
text: z.string().max(SESSION_HISTORY_CHARACTER_LIMIT),
|
|
48
73
|
images: z.array(historyImage).max(8).readonly().optional(),
|
|
49
74
|
})
|
|
50
75
|
.readonly();
|
|
76
|
+
const historyMessage = z.discriminatedUnion("role", [userHistoryMessage, assistantHistoryMessage]);
|
|
51
77
|
const availableSessionHistoryObjectSchema = z.strictObject({
|
|
52
78
|
status: z.literal("available"),
|
|
53
79
|
messages: z.array(historyMessage).max(SESSION_HISTORY_MESSAGE_LIMIT).readonly(),
|
|
@@ -63,20 +89,31 @@ const availableSessionHistoryObjectSchema = z.strictObject({
|
|
|
63
89
|
.default([]),
|
|
64
90
|
});
|
|
65
91
|
const availableSessionHistorySchema = availableSessionHistoryObjectSchema.readonly();
|
|
66
|
-
const unavailableSessionHistoryObjectSchema = z.strictObject({
|
|
92
|
+
const unavailableSessionHistoryObjectSchema = z.strictObject({
|
|
93
|
+
status: z.literal("unavailable"),
|
|
94
|
+
cause: z
|
|
95
|
+
.strictObject({
|
|
96
|
+
code: z.string().regex(/^[a-z][a-z0-9_]{0,127}$/),
|
|
97
|
+
message: z.string().min(1).max(1_000),
|
|
98
|
+
})
|
|
99
|
+
.readonly(),
|
|
100
|
+
});
|
|
67
101
|
const unavailableSessionHistorySchema = unavailableSessionHistoryObjectSchema.readonly();
|
|
68
102
|
function withinHistoryContentLimits(history) {
|
|
69
103
|
if (history.status === "unavailable" || history.messages === undefined) {
|
|
70
104
|
return true;
|
|
71
105
|
}
|
|
72
|
-
return (history.messages.reduce((total, message) => total +
|
|
73
|
-
|
|
106
|
+
return (history.messages.reduce((total, message) => total +
|
|
107
|
+
message.text.length +
|
|
108
|
+
(message.role === "assistant"
|
|
109
|
+
? JSON.stringify(message.activities).length + JSON.stringify(message.content).length
|
|
110
|
+
: 0), 0) <= SESSION_HISTORY_CHARACTER_LIMIT &&
|
|
74
111
|
history.messages.reduce((total, message) => total + (message.images ?? []).reduce((size, image) => size + image.data.length, 0), 0) <= SESSION_HISTORY_IMAGE_CHARACTER_LIMIT);
|
|
75
112
|
}
|
|
76
113
|
const sessionHistorySchema = z
|
|
77
114
|
.discriminatedUnion("status", [availableSessionHistorySchema, unavailableSessionHistorySchema])
|
|
78
115
|
.refine(withinHistoryContentLimits);
|
|
79
|
-
const
|
|
116
|
+
const nativeMessagePageSchema = z
|
|
80
117
|
.discriminatedUnion("status", [
|
|
81
118
|
availableSessionHistoryObjectSchema.extend({ nextCursor: z.string().max(512).nullable() }).readonly(),
|
|
82
119
|
unavailableSessionHistoryObjectSchema.extend({ nextCursor: z.null() }).readonly(),
|
|
@@ -90,13 +127,13 @@ export const decodeNativeSessionHistory = (value) => {
|
|
|
90
127
|
throw new ProtocolMessageError("Invalid native session history", { cause });
|
|
91
128
|
}
|
|
92
129
|
};
|
|
93
|
-
export const
|
|
130
|
+
export const decodeNativeMessagePage = (value) => {
|
|
94
131
|
try {
|
|
95
|
-
return
|
|
132
|
+
return nativeMessagePageSchema.parse(value);
|
|
96
133
|
}
|
|
97
134
|
catch (cause) {
|
|
98
|
-
throw new ProtocolMessageError("Invalid native
|
|
135
|
+
throw new ProtocolMessageError("Invalid native message page", { cause });
|
|
99
136
|
}
|
|
100
137
|
};
|
|
101
|
-
export {
|
|
138
|
+
export { nativeMessagePageSchema, sessionHistorySchema };
|
|
102
139
|
//# sourceMappingURL=session-history.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-history.js","sourceRoot":"","sources":["../src/session-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"session-history.js","sourceRoot":"","sources":["../src/session-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC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C;KAC5B,kBAAkB,CAAC,QAAQ,EAAE;IAC1B,mCAAmC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrG,qCAAqC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE;CACpF,CAAC;KACD,MAAM,CAAC,0BAA0B,CAAC,CAAC;AAGxC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAc,EAAwB,EAAE;IAC/E,IAAI,CAAC;QACD,OAAO,oBAAoB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,IAAI,oBAAoB,CAAC,gCAAgC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAChF,CAAC;AACL,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAc,EAAqB,EAAE;IACzE,IAAI,CAAC;QACD,OAAO,uBAAuB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,IAAI,oBAAoB,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7E,CAAC;AACL,CAAC,CAAC;AACF,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -13,11 +13,8 @@ declare const sessionLiveHistoryLoadSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
13
13
|
declare const sessionLiveHistoryLoadedSchema: z.ZodReadonly<z.ZodObject<{
|
|
14
14
|
history: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
15
15
|
status: z.ZodLiteral<"available">;
|
|
16
|
-
messages: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
17
|
-
role: z.
|
|
18
|
-
assistant: "assistant";
|
|
19
|
-
user: "user";
|
|
20
|
-
}>;
|
|
16
|
+
messages: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
17
|
+
role: z.ZodLiteral<"user">;
|
|
21
18
|
text: z.ZodString;
|
|
22
19
|
images: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
23
20
|
data: z.ZodString;
|
|
@@ -29,12 +26,83 @@ declare const sessionLiveHistoryLoadedSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
29
26
|
}>;
|
|
30
27
|
name: z.ZodString;
|
|
31
28
|
}, z.core.$strict>>>>>;
|
|
32
|
-
}, z.core.$strict
|
|
29
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
30
|
+
activities: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
31
|
+
activityId: z.ZodString;
|
|
32
|
+
activityType: z.ZodString;
|
|
33
|
+
content: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
34
|
+
artifactId: z.ZodDefault<z.ZodString>;
|
|
35
|
+
data: z.ZodString;
|
|
36
|
+
mimeType: z.ZodString;
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
newText: z.ZodString;
|
|
39
|
+
oldText: z.ZodString;
|
|
40
|
+
path: z.ZodString;
|
|
41
|
+
terminalId: z.ZodString;
|
|
42
|
+
text: z.ZodString;
|
|
43
|
+
type: z.ZodEnum<{
|
|
44
|
+
diff: "diff";
|
|
45
|
+
image: "image";
|
|
46
|
+
resource: "resource";
|
|
47
|
+
resource_link: "resource_link";
|
|
48
|
+
terminal: "terminal";
|
|
49
|
+
text: "text";
|
|
50
|
+
video: "video";
|
|
51
|
+
}>;
|
|
52
|
+
uri: z.ZodString;
|
|
53
|
+
}, z.core.$strict>>>>;
|
|
54
|
+
input: z.ZodString;
|
|
55
|
+
locations: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
output: z.ZodString;
|
|
58
|
+
sequence: z.ZodNumber;
|
|
59
|
+
status: z.ZodString;
|
|
60
|
+
title: z.ZodString;
|
|
61
|
+
toolKind: z.ZodString;
|
|
62
|
+
}, z.core.$strict>>>>>;
|
|
63
|
+
content: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
64
|
+
artifactId: z.ZodDefault<z.ZodString>;
|
|
65
|
+
data: z.ZodString;
|
|
66
|
+
mimeType: z.ZodString;
|
|
67
|
+
name: z.ZodString;
|
|
68
|
+
newText: z.ZodString;
|
|
69
|
+
oldText: z.ZodString;
|
|
70
|
+
path: z.ZodString;
|
|
71
|
+
terminalId: z.ZodString;
|
|
72
|
+
text: z.ZodString;
|
|
73
|
+
type: z.ZodEnum<{
|
|
74
|
+
diff: "diff";
|
|
75
|
+
image: "image";
|
|
76
|
+
resource: "resource";
|
|
77
|
+
resource_link: "resource_link";
|
|
78
|
+
terminal: "terminal";
|
|
79
|
+
text: "text";
|
|
80
|
+
video: "video";
|
|
81
|
+
}>;
|
|
82
|
+
uri: z.ZodString;
|
|
83
|
+
}, z.core.$strict>>>>>;
|
|
84
|
+
role: z.ZodLiteral<"assistant">;
|
|
85
|
+
text: z.ZodString;
|
|
86
|
+
images: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
87
|
+
data: z.ZodString;
|
|
88
|
+
mimeType: z.ZodEnum<{
|
|
89
|
+
"image/gif": "image/gif";
|
|
90
|
+
"image/jpeg": "image/jpeg";
|
|
91
|
+
"image/png": "image/png";
|
|
92
|
+
"image/webp": "image/webp";
|
|
93
|
+
}>;
|
|
94
|
+
name: z.ZodString;
|
|
95
|
+
}, z.core.$strict>>>>>;
|
|
96
|
+
}, z.core.$strict>>], "role">>>;
|
|
33
97
|
truncated: z.ZodBoolean;
|
|
34
98
|
coveredCommandIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
35
99
|
coveredMessageIds: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
36
100
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
37
101
|
status: z.ZodLiteral<"unavailable">;
|
|
102
|
+
cause: z.ZodReadonly<z.ZodObject<{
|
|
103
|
+
code: z.ZodString;
|
|
104
|
+
message: z.ZodString;
|
|
105
|
+
}, z.core.$strict>>;
|
|
38
106
|
}, z.core.$strict>>], "status">;
|
|
39
107
|
kind: z.ZodLiteral<"session.live-history.loaded">;
|
|
40
108
|
requestId: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-live-history.d.ts","sourceRoot":"","sources":["../src/session-live-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,8BAA8B,8BAA8B,CAAC;AAC1E,eAAO,MAAM,gCAAgC,gCAAgC,CAAC;AAK9E,QAAA,MAAM,4BAA4B;;;;;;;;mBAUnB,CAAC;AAEhB,QAAA,MAAM,8BAA8B
|
|
1
|
+
{"version":3,"file":"session-live-history.d.ts","sourceRoot":"","sources":["../src/session-live-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,8BAA8B,8BAA8B,CAAC;AAC1E,eAAO,MAAM,gCAAgC,gCAAgC,CAAC;AAK9E,QAAA,MAAM,4BAA4B;;;;;;;;mBAUnB,CAAC;AAEhB,QAAA,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAOrB,CAAC;AAEhB,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAWtF,eAAO,MAAM,4BAA4B,YAAa,MAAM,KAAG,sBACd,CAAC;AAClD,eAAO,MAAM,8BAA8B,YAAa,MAAM,KAAG,wBACd,CAAC;AACpD,eAAO,MAAM,4BAA4B,UAAW,sBAAsB,KAAG,MAChB,CAAC;AAC9D,eAAO,MAAM,8BAA8B,UAAW,wBAAwB,KAAG,MAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moxt-ai/mobius-protocol",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "Versioned public Mobius protocol resources and codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"directory": "packages/protocol"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"zod": "^4.6.
|
|
28
|
+
"zod": "^4.6.5"
|
|
29
29
|
},
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"license": "ISC",
|