@proxyhuman/protocol 0.2.1 → 0.2.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.cjs CHANGED
@@ -265,7 +265,10 @@ var SessionInfoSchema = import_zod.z.object({
265
265
  outcome: SessionOutcomeSchema.nullable(),
266
266
  prompt: import_zod.z.string().nullable(),
267
267
  publisher: PublisherInfoSchema.nullable(),
268
- target: TargetInfoSchema.nullable()
268
+ target: TargetInfoSchema.nullable(),
269
+ /** Most recent viewer to join (or leave) — what the dashboard list shows
270
+ * as the "picked up by" device. Null until the first viewer connects. */
271
+ lastViewer: ViewerInfoSchema.nullable().optional()
269
272
  });
270
273
  var SessionSummarySchema = import_zod.z.object({
271
274
  sessionId: import_zod.z.string(),
@@ -277,7 +280,9 @@ var SessionSummarySchema = import_zod.z.object({
277
280
  createdAt: import_zod.z.number(),
278
281
  endedAt: import_zod.z.number().nullable(),
279
282
  /** Last event-log append timestamp. */
280
- updatedAt: import_zod.z.number()
283
+ updatedAt: import_zod.z.number(),
284
+ /** Most recent viewer to join (or leave). Null until first viewer. */
285
+ lastViewer: ViewerInfoSchema.nullable().optional()
281
286
  });
282
287
  var SessionActionsResponseSchema = import_zod.z.object({
283
288
  sessionId: import_zod.z.string(),
package/dist/index.d.cts CHANGED
@@ -1947,6 +1947,22 @@ declare const SessionInfoSchema: z.ZodObject<{
1947
1947
  browserVersion?: string | null | undefined;
1948
1948
  userAgent?: string | null | undefined;
1949
1949
  }>>;
1950
+ /** Most recent viewer to join (or leave) — what the dashboard list shows
1951
+ * as the "picked up by" device. Null until the first viewer connects. */
1952
+ lastViewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1953
+ /** Random opaque id; persisted as the `ph_device` cookie on the viewer. */
1954
+ deviceId: z.ZodNullable<z.ZodString>;
1955
+ userAgent: z.ZodNullable<z.ZodString>;
1956
+ ip: z.ZodNullable<z.ZodString>;
1957
+ }, "strip", z.ZodTypeAny, {
1958
+ userAgent: string | null;
1959
+ deviceId: string | null;
1960
+ ip: string | null;
1961
+ }, {
1962
+ userAgent: string | null;
1963
+ deviceId: string | null;
1964
+ ip: string | null;
1965
+ }>>>;
1950
1966
  }, "strip", z.ZodTypeAny, {
1951
1967
  viewerCount: number;
1952
1968
  prompt: string | null;
@@ -1986,6 +2002,11 @@ declare const SessionInfoSchema: z.ZodObject<{
1986
2002
  state: "awaiting_viewer" | "streaming" | "paused" | "complete" | "failed" | "cancelled";
1987
2003
  createdAt: number;
1988
2004
  endedAt: number | null;
2005
+ lastViewer?: {
2006
+ userAgent: string | null;
2007
+ deviceId: string | null;
2008
+ ip: string | null;
2009
+ } | null | undefined;
1989
2010
  }, {
1990
2011
  viewerCount: number;
1991
2012
  prompt: string | null;
@@ -2025,6 +2046,11 @@ declare const SessionInfoSchema: z.ZodObject<{
2025
2046
  state: "awaiting_viewer" | "streaming" | "paused" | "complete" | "failed" | "cancelled";
2026
2047
  createdAt: number;
2027
2048
  endedAt: number | null;
2049
+ lastViewer?: {
2050
+ userAgent: string | null;
2051
+ deviceId: string | null;
2052
+ ip: string | null;
2053
+ } | null | undefined;
2028
2054
  }>;
2029
2055
  type SessionInfo = z.infer<typeof SessionInfoSchema>;
2030
2056
  declare const SessionSummarySchema: z.ZodObject<{
@@ -2086,6 +2112,21 @@ declare const SessionSummarySchema: z.ZodObject<{
2086
2112
  endedAt: z.ZodNullable<z.ZodNumber>;
2087
2113
  /** Last event-log append timestamp. */
2088
2114
  updatedAt: z.ZodNumber;
2115
+ /** Most recent viewer to join (or leave). Null until first viewer. */
2116
+ lastViewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2117
+ /** Random opaque id; persisted as the `ph_device` cookie on the viewer. */
2118
+ deviceId: z.ZodNullable<z.ZodString>;
2119
+ userAgent: z.ZodNullable<z.ZodString>;
2120
+ ip: z.ZodNullable<z.ZodString>;
2121
+ }, "strip", z.ZodTypeAny, {
2122
+ userAgent: string | null;
2123
+ deviceId: string | null;
2124
+ ip: string | null;
2125
+ }, {
2126
+ userAgent: string | null;
2127
+ deviceId: string | null;
2128
+ ip: string | null;
2129
+ }>>>;
2089
2130
  }, "strip", z.ZodTypeAny, {
2090
2131
  viewerCount: number;
2091
2132
  prompt: string | null;
@@ -2112,6 +2153,11 @@ declare const SessionSummarySchema: z.ZodObject<{
2112
2153
  endedAt: number | null;
2113
2154
  actionCount: number;
2114
2155
  updatedAt: number;
2156
+ lastViewer?: {
2157
+ userAgent: string | null;
2158
+ deviceId: string | null;
2159
+ ip: string | null;
2160
+ } | null | undefined;
2115
2161
  }, {
2116
2162
  viewerCount: number;
2117
2163
  prompt: string | null;
@@ -2138,6 +2184,11 @@ declare const SessionSummarySchema: z.ZodObject<{
2138
2184
  endedAt: number | null;
2139
2185
  actionCount: number;
2140
2186
  updatedAt: number;
2187
+ lastViewer?: {
2188
+ userAgent: string | null;
2189
+ deviceId: string | null;
2190
+ ip: string | null;
2191
+ } | null | undefined;
2141
2192
  }>;
2142
2193
  type SessionSummary = z.infer<typeof SessionSummarySchema>;
2143
2194
  /** `GET /sessions/:sid/actions` */
@@ -2504,6 +2555,22 @@ declare const SessionDetailResponseSchema: z.ZodObject<{
2504
2555
  browserVersion?: string | null | undefined;
2505
2556
  userAgent?: string | null | undefined;
2506
2557
  }>>;
2558
+ /** Most recent viewer to join (or leave) — what the dashboard list shows
2559
+ * as the "picked up by" device. Null until the first viewer connects. */
2560
+ lastViewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2561
+ /** Random opaque id; persisted as the `ph_device` cookie on the viewer. */
2562
+ deviceId: z.ZodNullable<z.ZodString>;
2563
+ userAgent: z.ZodNullable<z.ZodString>;
2564
+ ip: z.ZodNullable<z.ZodString>;
2565
+ }, "strip", z.ZodTypeAny, {
2566
+ userAgent: string | null;
2567
+ deviceId: string | null;
2568
+ ip: string | null;
2569
+ }, {
2570
+ userAgent: string | null;
2571
+ deviceId: string | null;
2572
+ ip: string | null;
2573
+ }>>>;
2507
2574
  }, "strip", z.ZodTypeAny, {
2508
2575
  viewerCount: number;
2509
2576
  prompt: string | null;
@@ -2543,6 +2610,11 @@ declare const SessionDetailResponseSchema: z.ZodObject<{
2543
2610
  state: "awaiting_viewer" | "streaming" | "paused" | "complete" | "failed" | "cancelled";
2544
2611
  createdAt: number;
2545
2612
  endedAt: number | null;
2613
+ lastViewer?: {
2614
+ userAgent: string | null;
2615
+ deviceId: string | null;
2616
+ ip: string | null;
2617
+ } | null | undefined;
2546
2618
  }, {
2547
2619
  viewerCount: number;
2548
2620
  prompt: string | null;
@@ -2582,6 +2654,11 @@ declare const SessionDetailResponseSchema: z.ZodObject<{
2582
2654
  state: "awaiting_viewer" | "streaming" | "paused" | "complete" | "failed" | "cancelled";
2583
2655
  createdAt: number;
2584
2656
  endedAt: number | null;
2657
+ lastViewer?: {
2658
+ userAgent: string | null;
2659
+ deviceId: string | null;
2660
+ ip: string | null;
2661
+ } | null | undefined;
2585
2662
  }>;
2586
2663
  events: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2587
2664
  ts: z.ZodNumber;
@@ -3165,6 +3242,11 @@ declare const SessionDetailResponseSchema: z.ZodObject<{
3165
3242
  state: "awaiting_viewer" | "streaming" | "paused" | "complete" | "failed" | "cancelled";
3166
3243
  createdAt: number;
3167
3244
  endedAt: number | null;
3245
+ lastViewer?: {
3246
+ userAgent: string | null;
3247
+ deviceId: string | null;
3248
+ ip: string | null;
3249
+ } | null | undefined;
3168
3250
  };
3169
3251
  events: ({
3170
3252
  type: "state_changed";
@@ -3335,6 +3417,11 @@ declare const SessionDetailResponseSchema: z.ZodObject<{
3335
3417
  state: "awaiting_viewer" | "streaming" | "paused" | "complete" | "failed" | "cancelled";
3336
3418
  createdAt: number;
3337
3419
  endedAt: number | null;
3420
+ lastViewer?: {
3421
+ userAgent: string | null;
3422
+ deviceId: string | null;
3423
+ ip: string | null;
3424
+ } | null | undefined;
3338
3425
  };
3339
3426
  events: ({
3340
3427
  type: "state_changed";
@@ -3482,6 +3569,21 @@ declare const UserSessionsResponseSchema: z.ZodObject<{
3482
3569
  endedAt: z.ZodNullable<z.ZodNumber>;
3483
3570
  /** Last event-log append timestamp. */
3484
3571
  updatedAt: z.ZodNumber;
3572
+ /** Most recent viewer to join (or leave). Null until first viewer. */
3573
+ lastViewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3574
+ /** Random opaque id; persisted as the `ph_device` cookie on the viewer. */
3575
+ deviceId: z.ZodNullable<z.ZodString>;
3576
+ userAgent: z.ZodNullable<z.ZodString>;
3577
+ ip: z.ZodNullable<z.ZodString>;
3578
+ }, "strip", z.ZodTypeAny, {
3579
+ userAgent: string | null;
3580
+ deviceId: string | null;
3581
+ ip: string | null;
3582
+ }, {
3583
+ userAgent: string | null;
3584
+ deviceId: string | null;
3585
+ ip: string | null;
3586
+ }>>>;
3485
3587
  }, "strip", z.ZodTypeAny, {
3486
3588
  viewerCount: number;
3487
3589
  prompt: string | null;
@@ -3508,6 +3610,11 @@ declare const UserSessionsResponseSchema: z.ZodObject<{
3508
3610
  endedAt: number | null;
3509
3611
  actionCount: number;
3510
3612
  updatedAt: number;
3613
+ lastViewer?: {
3614
+ userAgent: string | null;
3615
+ deviceId: string | null;
3616
+ ip: string | null;
3617
+ } | null | undefined;
3511
3618
  }, {
3512
3619
  viewerCount: number;
3513
3620
  prompt: string | null;
@@ -3534,6 +3641,11 @@ declare const UserSessionsResponseSchema: z.ZodObject<{
3534
3641
  endedAt: number | null;
3535
3642
  actionCount: number;
3536
3643
  updatedAt: number;
3644
+ lastViewer?: {
3645
+ userAgent: string | null;
3646
+ deviceId: string | null;
3647
+ ip: string | null;
3648
+ } | null | undefined;
3537
3649
  }>, "many">;
3538
3650
  /** Opaque cursor for the next page, or null when there are no more. */
3539
3651
  nextCursor: z.ZodNullable<z.ZodString>;
@@ -3564,6 +3676,11 @@ declare const UserSessionsResponseSchema: z.ZodObject<{
3564
3676
  endedAt: number | null;
3565
3677
  actionCount: number;
3566
3678
  updatedAt: number;
3679
+ lastViewer?: {
3680
+ userAgent: string | null;
3681
+ deviceId: string | null;
3682
+ ip: string | null;
3683
+ } | null | undefined;
3567
3684
  }[];
3568
3685
  nextCursor: string | null;
3569
3686
  }, {
@@ -3593,6 +3710,11 @@ declare const UserSessionsResponseSchema: z.ZodObject<{
3593
3710
  endedAt: number | null;
3594
3711
  actionCount: number;
3595
3712
  updatedAt: number;
3713
+ lastViewer?: {
3714
+ userAgent: string | null;
3715
+ deviceId: string | null;
3716
+ ip: string | null;
3717
+ } | null | undefined;
3596
3718
  }[];
3597
3719
  nextCursor: string | null;
3598
3720
  }>;
package/dist/index.d.ts CHANGED
@@ -1947,6 +1947,22 @@ declare const SessionInfoSchema: z.ZodObject<{
1947
1947
  browserVersion?: string | null | undefined;
1948
1948
  userAgent?: string | null | undefined;
1949
1949
  }>>;
1950
+ /** Most recent viewer to join (or leave) — what the dashboard list shows
1951
+ * as the "picked up by" device. Null until the first viewer connects. */
1952
+ lastViewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1953
+ /** Random opaque id; persisted as the `ph_device` cookie on the viewer. */
1954
+ deviceId: z.ZodNullable<z.ZodString>;
1955
+ userAgent: z.ZodNullable<z.ZodString>;
1956
+ ip: z.ZodNullable<z.ZodString>;
1957
+ }, "strip", z.ZodTypeAny, {
1958
+ userAgent: string | null;
1959
+ deviceId: string | null;
1960
+ ip: string | null;
1961
+ }, {
1962
+ userAgent: string | null;
1963
+ deviceId: string | null;
1964
+ ip: string | null;
1965
+ }>>>;
1950
1966
  }, "strip", z.ZodTypeAny, {
1951
1967
  viewerCount: number;
1952
1968
  prompt: string | null;
@@ -1986,6 +2002,11 @@ declare const SessionInfoSchema: z.ZodObject<{
1986
2002
  state: "awaiting_viewer" | "streaming" | "paused" | "complete" | "failed" | "cancelled";
1987
2003
  createdAt: number;
1988
2004
  endedAt: number | null;
2005
+ lastViewer?: {
2006
+ userAgent: string | null;
2007
+ deviceId: string | null;
2008
+ ip: string | null;
2009
+ } | null | undefined;
1989
2010
  }, {
1990
2011
  viewerCount: number;
1991
2012
  prompt: string | null;
@@ -2025,6 +2046,11 @@ declare const SessionInfoSchema: z.ZodObject<{
2025
2046
  state: "awaiting_viewer" | "streaming" | "paused" | "complete" | "failed" | "cancelled";
2026
2047
  createdAt: number;
2027
2048
  endedAt: number | null;
2049
+ lastViewer?: {
2050
+ userAgent: string | null;
2051
+ deviceId: string | null;
2052
+ ip: string | null;
2053
+ } | null | undefined;
2028
2054
  }>;
2029
2055
  type SessionInfo = z.infer<typeof SessionInfoSchema>;
2030
2056
  declare const SessionSummarySchema: z.ZodObject<{
@@ -2086,6 +2112,21 @@ declare const SessionSummarySchema: z.ZodObject<{
2086
2112
  endedAt: z.ZodNullable<z.ZodNumber>;
2087
2113
  /** Last event-log append timestamp. */
2088
2114
  updatedAt: z.ZodNumber;
2115
+ /** Most recent viewer to join (or leave). Null until first viewer. */
2116
+ lastViewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2117
+ /** Random opaque id; persisted as the `ph_device` cookie on the viewer. */
2118
+ deviceId: z.ZodNullable<z.ZodString>;
2119
+ userAgent: z.ZodNullable<z.ZodString>;
2120
+ ip: z.ZodNullable<z.ZodString>;
2121
+ }, "strip", z.ZodTypeAny, {
2122
+ userAgent: string | null;
2123
+ deviceId: string | null;
2124
+ ip: string | null;
2125
+ }, {
2126
+ userAgent: string | null;
2127
+ deviceId: string | null;
2128
+ ip: string | null;
2129
+ }>>>;
2089
2130
  }, "strip", z.ZodTypeAny, {
2090
2131
  viewerCount: number;
2091
2132
  prompt: string | null;
@@ -2112,6 +2153,11 @@ declare const SessionSummarySchema: z.ZodObject<{
2112
2153
  endedAt: number | null;
2113
2154
  actionCount: number;
2114
2155
  updatedAt: number;
2156
+ lastViewer?: {
2157
+ userAgent: string | null;
2158
+ deviceId: string | null;
2159
+ ip: string | null;
2160
+ } | null | undefined;
2115
2161
  }, {
2116
2162
  viewerCount: number;
2117
2163
  prompt: string | null;
@@ -2138,6 +2184,11 @@ declare const SessionSummarySchema: z.ZodObject<{
2138
2184
  endedAt: number | null;
2139
2185
  actionCount: number;
2140
2186
  updatedAt: number;
2187
+ lastViewer?: {
2188
+ userAgent: string | null;
2189
+ deviceId: string | null;
2190
+ ip: string | null;
2191
+ } | null | undefined;
2141
2192
  }>;
2142
2193
  type SessionSummary = z.infer<typeof SessionSummarySchema>;
2143
2194
  /** `GET /sessions/:sid/actions` */
@@ -2504,6 +2555,22 @@ declare const SessionDetailResponseSchema: z.ZodObject<{
2504
2555
  browserVersion?: string | null | undefined;
2505
2556
  userAgent?: string | null | undefined;
2506
2557
  }>>;
2558
+ /** Most recent viewer to join (or leave) — what the dashboard list shows
2559
+ * as the "picked up by" device. Null until the first viewer connects. */
2560
+ lastViewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2561
+ /** Random opaque id; persisted as the `ph_device` cookie on the viewer. */
2562
+ deviceId: z.ZodNullable<z.ZodString>;
2563
+ userAgent: z.ZodNullable<z.ZodString>;
2564
+ ip: z.ZodNullable<z.ZodString>;
2565
+ }, "strip", z.ZodTypeAny, {
2566
+ userAgent: string | null;
2567
+ deviceId: string | null;
2568
+ ip: string | null;
2569
+ }, {
2570
+ userAgent: string | null;
2571
+ deviceId: string | null;
2572
+ ip: string | null;
2573
+ }>>>;
2507
2574
  }, "strip", z.ZodTypeAny, {
2508
2575
  viewerCount: number;
2509
2576
  prompt: string | null;
@@ -2543,6 +2610,11 @@ declare const SessionDetailResponseSchema: z.ZodObject<{
2543
2610
  state: "awaiting_viewer" | "streaming" | "paused" | "complete" | "failed" | "cancelled";
2544
2611
  createdAt: number;
2545
2612
  endedAt: number | null;
2613
+ lastViewer?: {
2614
+ userAgent: string | null;
2615
+ deviceId: string | null;
2616
+ ip: string | null;
2617
+ } | null | undefined;
2546
2618
  }, {
2547
2619
  viewerCount: number;
2548
2620
  prompt: string | null;
@@ -2582,6 +2654,11 @@ declare const SessionDetailResponseSchema: z.ZodObject<{
2582
2654
  state: "awaiting_viewer" | "streaming" | "paused" | "complete" | "failed" | "cancelled";
2583
2655
  createdAt: number;
2584
2656
  endedAt: number | null;
2657
+ lastViewer?: {
2658
+ userAgent: string | null;
2659
+ deviceId: string | null;
2660
+ ip: string | null;
2661
+ } | null | undefined;
2585
2662
  }>;
2586
2663
  events: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2587
2664
  ts: z.ZodNumber;
@@ -3165,6 +3242,11 @@ declare const SessionDetailResponseSchema: z.ZodObject<{
3165
3242
  state: "awaiting_viewer" | "streaming" | "paused" | "complete" | "failed" | "cancelled";
3166
3243
  createdAt: number;
3167
3244
  endedAt: number | null;
3245
+ lastViewer?: {
3246
+ userAgent: string | null;
3247
+ deviceId: string | null;
3248
+ ip: string | null;
3249
+ } | null | undefined;
3168
3250
  };
3169
3251
  events: ({
3170
3252
  type: "state_changed";
@@ -3335,6 +3417,11 @@ declare const SessionDetailResponseSchema: z.ZodObject<{
3335
3417
  state: "awaiting_viewer" | "streaming" | "paused" | "complete" | "failed" | "cancelled";
3336
3418
  createdAt: number;
3337
3419
  endedAt: number | null;
3420
+ lastViewer?: {
3421
+ userAgent: string | null;
3422
+ deviceId: string | null;
3423
+ ip: string | null;
3424
+ } | null | undefined;
3338
3425
  };
3339
3426
  events: ({
3340
3427
  type: "state_changed";
@@ -3482,6 +3569,21 @@ declare const UserSessionsResponseSchema: z.ZodObject<{
3482
3569
  endedAt: z.ZodNullable<z.ZodNumber>;
3483
3570
  /** Last event-log append timestamp. */
3484
3571
  updatedAt: z.ZodNumber;
3572
+ /** Most recent viewer to join (or leave). Null until first viewer. */
3573
+ lastViewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3574
+ /** Random opaque id; persisted as the `ph_device` cookie on the viewer. */
3575
+ deviceId: z.ZodNullable<z.ZodString>;
3576
+ userAgent: z.ZodNullable<z.ZodString>;
3577
+ ip: z.ZodNullable<z.ZodString>;
3578
+ }, "strip", z.ZodTypeAny, {
3579
+ userAgent: string | null;
3580
+ deviceId: string | null;
3581
+ ip: string | null;
3582
+ }, {
3583
+ userAgent: string | null;
3584
+ deviceId: string | null;
3585
+ ip: string | null;
3586
+ }>>>;
3485
3587
  }, "strip", z.ZodTypeAny, {
3486
3588
  viewerCount: number;
3487
3589
  prompt: string | null;
@@ -3508,6 +3610,11 @@ declare const UserSessionsResponseSchema: z.ZodObject<{
3508
3610
  endedAt: number | null;
3509
3611
  actionCount: number;
3510
3612
  updatedAt: number;
3613
+ lastViewer?: {
3614
+ userAgent: string | null;
3615
+ deviceId: string | null;
3616
+ ip: string | null;
3617
+ } | null | undefined;
3511
3618
  }, {
3512
3619
  viewerCount: number;
3513
3620
  prompt: string | null;
@@ -3534,6 +3641,11 @@ declare const UserSessionsResponseSchema: z.ZodObject<{
3534
3641
  endedAt: number | null;
3535
3642
  actionCount: number;
3536
3643
  updatedAt: number;
3644
+ lastViewer?: {
3645
+ userAgent: string | null;
3646
+ deviceId: string | null;
3647
+ ip: string | null;
3648
+ } | null | undefined;
3537
3649
  }>, "many">;
3538
3650
  /** Opaque cursor for the next page, or null when there are no more. */
3539
3651
  nextCursor: z.ZodNullable<z.ZodString>;
@@ -3564,6 +3676,11 @@ declare const UserSessionsResponseSchema: z.ZodObject<{
3564
3676
  endedAt: number | null;
3565
3677
  actionCount: number;
3566
3678
  updatedAt: number;
3679
+ lastViewer?: {
3680
+ userAgent: string | null;
3681
+ deviceId: string | null;
3682
+ ip: string | null;
3683
+ } | null | undefined;
3567
3684
  }[];
3568
3685
  nextCursor: string | null;
3569
3686
  }, {
@@ -3593,6 +3710,11 @@ declare const UserSessionsResponseSchema: z.ZodObject<{
3593
3710
  endedAt: number | null;
3594
3711
  actionCount: number;
3595
3712
  updatedAt: number;
3713
+ lastViewer?: {
3714
+ userAgent: string | null;
3715
+ deviceId: string | null;
3716
+ ip: string | null;
3717
+ } | null | undefined;
3596
3718
  }[];
3597
3719
  nextCursor: string | null;
3598
3720
  }>;
package/dist/index.js CHANGED
@@ -209,7 +209,10 @@ var SessionInfoSchema = z.object({
209
209
  outcome: SessionOutcomeSchema.nullable(),
210
210
  prompt: z.string().nullable(),
211
211
  publisher: PublisherInfoSchema.nullable(),
212
- target: TargetInfoSchema.nullable()
212
+ target: TargetInfoSchema.nullable(),
213
+ /** Most recent viewer to join (or leave) — what the dashboard list shows
214
+ * as the "picked up by" device. Null until the first viewer connects. */
215
+ lastViewer: ViewerInfoSchema.nullable().optional()
213
216
  });
214
217
  var SessionSummarySchema = z.object({
215
218
  sessionId: z.string(),
@@ -221,7 +224,9 @@ var SessionSummarySchema = z.object({
221
224
  createdAt: z.number(),
222
225
  endedAt: z.number().nullable(),
223
226
  /** Last event-log append timestamp. */
224
- updatedAt: z.number()
227
+ updatedAt: z.number(),
228
+ /** Most recent viewer to join (or leave). Null until first viewer. */
229
+ lastViewer: ViewerInfoSchema.nullable().optional()
225
230
  });
226
231
  var SessionActionsResponseSchema = z.object({
227
232
  sessionId: z.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proxyhuman/protocol",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "ProxyHuman wire-format contract: WebSocket message types, REST response shapes, session lifecycle states. Consumed by @proxyhuman/mcp and the api-worker.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",