@myagentroam/protocol 0.9.0 → 0.9.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/index.d.ts +4523 -0
- package/dist/index.js +25 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -167,6 +167,7 @@ export const runEventSchema = z.object({
|
|
|
167
167
|
eventType: z.string().regex(/^[A-Za-z0-9._-]{1,80}$/),
|
|
168
168
|
payload: z.unknown(),
|
|
169
169
|
status: agentRunStatusSchema.optional(),
|
|
170
|
+
createdAt: z.number().int().nonnegative().optional(),
|
|
170
171
|
version: z.number().int().nonnegative().optional()
|
|
171
172
|
});
|
|
172
173
|
/**
|
|
@@ -377,7 +378,9 @@ const conversationItemBaseSchema = z.object({
|
|
|
377
378
|
'INTERRUPTED'
|
|
378
379
|
]),
|
|
379
380
|
startedAt: z.number().int().nonnegative().nullable(),
|
|
380
|
-
completedAt: z.number().int().nonnegative().nullable()
|
|
381
|
+
completedAt: z.number().int().nonnegative().nullable(),
|
|
382
|
+
segmentId: z.string().min(1).max(256).optional(),
|
|
383
|
+
segmentIndex: z.number().int().nonnegative().optional()
|
|
381
384
|
});
|
|
382
385
|
export const contextReferenceSchema = z.object({
|
|
383
386
|
type: z.enum(['file', 'directory', 'changes', 'diff', 'turn', 'message', 'terminal_selection']),
|
|
@@ -566,6 +569,27 @@ export const conversationTurnSchema = z.object({
|
|
|
566
569
|
startedAt: z.number().int().nonnegative().nullable(),
|
|
567
570
|
completedAt: z.number().int().nonnegative().nullable()
|
|
568
571
|
});
|
|
572
|
+
export const conversationSegmentSchema = z.object({
|
|
573
|
+
id: z.string().min(1).max(256),
|
|
574
|
+
sessionId: z.string().min(1).max(128),
|
|
575
|
+
turnId: z.string().min(1).max(128),
|
|
576
|
+
runId: z.string().min(1).max(128).nullable(),
|
|
577
|
+
index: z.number().int().nonnegative(),
|
|
578
|
+
status: conversationTurnSchema.shape.status,
|
|
579
|
+
rewind: conversationTurnSchema.shape.rewind,
|
|
580
|
+
items: z.array(conversationItemSchema),
|
|
581
|
+
startedAt: z.number().int().nonnegative().nullable(),
|
|
582
|
+
completedAt: z.number().int().nonnegative().nullable()
|
|
583
|
+
});
|
|
584
|
+
export const conversationSegmentPageSchema = z.object({
|
|
585
|
+
unit: z.literal('SEGMENT'),
|
|
586
|
+
segments: z.array(conversationSegmentSchema),
|
|
587
|
+
nextCursor: z.string().max(4096).nullable(),
|
|
588
|
+
snapshotSequence: z.number().int().nonnegative(),
|
|
589
|
+
source: z.enum(['official', 'native', 'runtime']),
|
|
590
|
+
readAt: z.number().int().nonnegative(),
|
|
591
|
+
latestVisibleAt: z.number().int().nonnegative()
|
|
592
|
+
});
|
|
569
593
|
export const conversationItemDeltaSchema = z.discriminatedUnion('kind', [
|
|
570
594
|
z.object({
|
|
571
595
|
kind: z.literal('assistant_text_append'),
|