@myagentroam/protocol 0.9.1 → 0.9.3

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.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
  /**
@@ -277,7 +278,6 @@ export const serverWorkbenchCapabilitiesSchema = z.object({
277
278
  workbenchProtocolVersion: z.literal(WORKBENCH_PROTOCOL_VERSION),
278
279
  serverVersion: z.string().trim().min(1).max(128).optional(),
279
280
  conversationItemVersions: z.array(z.literal(1)).min(1),
280
- supportsWorkspaceActivityStream: z.boolean(),
281
281
  supportsSessionDetailStream: z.boolean(),
282
282
  supportsTerminalBrowserRelay: z.boolean(),
283
283
  supportsTerminalNodeDataChannel: z.boolean(),
@@ -293,7 +293,6 @@ export const nodeWorkbenchCapabilitiesSchema = z.object({
293
293
  conversation: capabilitySchemaWith({
294
294
  itemVersions: z.array(z.literal(1)),
295
295
  supportsSessionCursor: z.boolean(),
296
- supportsWorkspaceActivityCursor: z.boolean(),
297
296
  supportsHistoryPaging: z.boolean(),
298
297
  supportsItemFinalSnapshots: z.boolean(),
299
298
  maxPageSize: z.number().int().positive().max(500)
@@ -377,7 +376,9 @@ const conversationItemBaseSchema = z.object({
377
376
  'INTERRUPTED'
378
377
  ]),
379
378
  startedAt: z.number().int().nonnegative().nullable(),
380
- completedAt: z.number().int().nonnegative().nullable()
379
+ completedAt: z.number().int().nonnegative().nullable(),
380
+ segmentId: z.string().min(1).max(256).optional(),
381
+ segmentIndex: z.number().int().nonnegative().optional()
381
382
  });
382
383
  export const contextReferenceSchema = z.object({
383
384
  type: z.enum(['file', 'directory', 'changes', 'diff', 'turn', 'message', 'terminal_selection']),
@@ -512,7 +513,8 @@ const errorItemSchema = conversationItemBaseSchema.extend({
512
513
  kind: z.literal('error'),
513
514
  payload: z.object({
514
515
  code: z.string().min(1).max(80),
515
- message: z.string().max(5000),
516
+ message: z.string().max(1000),
517
+ httpStatus: z.number().int().min(100).max(599).nullable().optional(),
516
518
  recoverable: z.boolean(),
517
519
  retryAfterMs: z.number().int().nonnegative().nullable()
518
520
  })
@@ -566,6 +568,27 @@ export const conversationTurnSchema = z.object({
566
568
  startedAt: z.number().int().nonnegative().nullable(),
567
569
  completedAt: z.number().int().nonnegative().nullable()
568
570
  });
571
+ export const conversationSegmentSchema = z.object({
572
+ id: z.string().min(1).max(256),
573
+ sessionId: z.string().min(1).max(128),
574
+ turnId: z.string().min(1).max(128),
575
+ runId: z.string().min(1).max(128).nullable(),
576
+ index: z.number().int().nonnegative(),
577
+ status: conversationTurnSchema.shape.status,
578
+ rewind: conversationTurnSchema.shape.rewind,
579
+ items: z.array(conversationItemSchema),
580
+ startedAt: z.number().int().nonnegative().nullable(),
581
+ completedAt: z.number().int().nonnegative().nullable()
582
+ });
583
+ export const conversationSegmentPageSchema = z.object({
584
+ unit: z.literal('SEGMENT'),
585
+ segments: z.array(conversationSegmentSchema),
586
+ nextCursor: z.string().max(4096).nullable(),
587
+ snapshotSequence: z.number().int().nonnegative(),
588
+ source: z.enum(['official', 'native', 'runtime']),
589
+ readAt: z.number().int().nonnegative(),
590
+ latestVisibleAt: z.number().int().nonnegative()
591
+ });
569
592
  export const conversationItemDeltaSchema = z.discriminatedUnion('kind', [
570
593
  z.object({
571
594
  kind: z.literal('assistant_text_append'),
@@ -741,7 +764,6 @@ export const workbenchNodeOperationSchema = z.enum([
741
764
  'session.context.read',
742
765
  'session.command.execute',
743
766
  'runner.command.execute',
744
- 'workspace.activity.read',
745
767
  'runner.profiles.list',
746
768
  'runner.defaults.save',
747
769
  'workspace.files.list',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/protocol",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "description": "Shared runtime protocol schemas for MyAgentRoam.",
5
5
  "type": "module",
6
6
  "files": [