@otto-code/protocol 0.5.8 → 0.6.1

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.
@@ -1745,6 +1745,9 @@ export declare const StatsActivityGetResponseMessageSchema: z.ZodObject<{
1745
1745
  }, z.core.$strip>;
1746
1746
  }, z.core.$strip>;
1747
1747
  }, z.core.$strip>;
1748
+ export declare const ActivityStatsChangedSchema: z.ZodObject<{
1749
+ type: z.ZodLiteral<"activity_stats_changed">;
1750
+ }, z.core.$strip>;
1748
1751
  export declare const AgentContextGetUsageRequestMessageSchema: z.ZodObject<{
1749
1752
  type: z.ZodLiteral<"agent.context.get_usage.request">;
1750
1753
  agentId: z.ZodString;
@@ -12015,6 +12018,7 @@ export declare const BranchSuggestionsResponseSchema: z.ZodObject<{
12015
12018
  committerDate: z.ZodNumber;
12016
12019
  hasLocal: z.ZodOptional<z.ZodBoolean>;
12017
12020
  hasRemote: z.ZodOptional<z.ZodBoolean>;
12021
+ checkedOutElsewhere: z.ZodOptional<z.ZodBoolean>;
12018
12022
  }, z.core.$strip>>>;
12019
12023
  error: z.ZodNullable<z.ZodString>;
12020
12024
  requestId: z.ZodString;
@@ -18634,6 +18638,7 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.Zo
18634
18638
  committerDate: z.ZodNumber;
18635
18639
  hasLocal: z.ZodOptional<z.ZodBoolean>;
18636
18640
  hasRemote: z.ZodOptional<z.ZodBoolean>;
18641
+ checkedOutElsewhere: z.ZodOptional<z.ZodBoolean>;
18637
18642
  }, z.core.$strip>>>;
18638
18643
  error: z.ZodNullable<z.ZodString>;
18639
18644
  requestId: z.ZodString;
@@ -19653,6 +19658,8 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.Zo
19653
19658
  schedulesExecuted: z.ZodDefault<z.ZodNumber>;
19654
19659
  }, z.core.$strip>;
19655
19660
  }, z.core.$strip>;
19661
+ }, z.core.$strip>, z.ZodObject<{
19662
+ type: z.ZodLiteral<"activity_stats_changed">;
19656
19663
  }, z.core.$strip>, z.ZodObject<{
19657
19664
  type: z.ZodLiteral<"agent.context.get_usage.response">;
19658
19665
  payload: z.ZodObject<{
@@ -21323,6 +21330,7 @@ export type AgentContextGetUsageResponseMessage = z.infer<typeof AgentContextGet
21323
21330
  export type ProviderUsageListResponseMessage = z.infer<typeof ProviderUsageListResponseMessageSchema>;
21324
21331
  export type ActivityCounters = z.infer<typeof ActivityCountersSchema>;
21325
21332
  export type StatsActivityGetResponseMessage = z.infer<typeof StatsActivityGetResponseMessageSchema>;
21333
+ export type ActivityStatsChanged = z.infer<typeof ActivityStatsChangedSchema>;
21326
21334
  export type ChatCreateResponse = z.infer<typeof ChatCreateResponseSchema>;
21327
21335
  export type ChatListResponse = z.infer<typeof ChatListResponseSchema>;
21328
21336
  export type ChatInspectResponse = z.infer<typeof ChatInspectResponseSchema>;
@@ -28849,6 +28857,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
28849
28857
  committerDate: z.ZodNumber;
28850
28858
  hasLocal: z.ZodOptional<z.ZodBoolean>;
28851
28859
  hasRemote: z.ZodOptional<z.ZodBoolean>;
28860
+ checkedOutElsewhere: z.ZodOptional<z.ZodBoolean>;
28852
28861
  }, z.core.$strip>>>;
28853
28862
  error: z.ZodNullable<z.ZodString>;
28854
28863
  requestId: z.ZodString;
@@ -29868,6 +29877,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
29868
29877
  schedulesExecuted: z.ZodDefault<z.ZodNumber>;
29869
29878
  }, z.core.$strip>;
29870
29879
  }, z.core.$strip>;
29880
+ }, z.core.$strip>, z.ZodObject<{
29881
+ type: z.ZodLiteral<"activity_stats_changed">;
29871
29882
  }, z.core.$strip>, z.ZodObject<{
29872
29883
  type: z.ZodLiteral<"agent.context.get_usage.response">;
29873
29884
  payload: z.ZodObject<{
@@ -38699,6 +38710,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
38699
38710
  committerDate: z.ZodNumber;
38700
38711
  hasLocal: z.ZodOptional<z.ZodBoolean>;
38701
38712
  hasRemote: z.ZodOptional<z.ZodBoolean>;
38713
+ checkedOutElsewhere: z.ZodOptional<z.ZodBoolean>;
38702
38714
  }, z.core.$strip>>>;
38703
38715
  error: z.ZodNullable<z.ZodString>;
38704
38716
  requestId: z.ZodString;
@@ -39718,6 +39730,8 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
39718
39730
  schedulesExecuted: z.ZodDefault<z.ZodNumber>;
39719
39731
  }, z.core.$strip>;
39720
39732
  }, z.core.$strip>;
39733
+ }, z.core.$strip>, z.ZodObject<{
39734
+ type: z.ZodLiteral<"activity_stats_changed">;
39721
39735
  }, z.core.$strip>, z.ZodObject<{
39722
39736
  type: z.ZodLiteral<"agent.context.get_usage.response">;
39723
39737
  payload: z.ZodObject<{
package/dist/messages.js CHANGED
@@ -1385,6 +1385,17 @@ export const StatsActivityGetResponseMessageSchema = z.object({
1385
1385
  allTime: ActivityCountersSchema,
1386
1386
  }),
1387
1387
  });
1388
+ // Daemon-wide "activity counters moved" ping — broadcast to every client,
1389
+ // coalesced at the daemon (at most once every few seconds) so bursts of
1390
+ // increments don't get chatty. Carries no payload: clients re-fetch the
1391
+ // rollups via stats.activity.get. Purely additive — old clients drop the
1392
+ // unknown type with a warning, and against old daemons (which never send it)
1393
+ // the stats screen degrades to today's focus/manual refresh. Rides the
1394
+ // existing activityStats capability; no new feature flag needed because no
1395
+ // client behavior depends on detecting it.
1396
+ export const ActivityStatsChangedSchema = z.object({
1397
+ type: z.literal("activity_stats_changed"),
1398
+ });
1388
1399
  export const AgentContextGetUsageRequestMessageSchema = z.object({
1389
1400
  type: z.literal("agent.context.get_usage.request"),
1390
1401
  agentId: z.string(),
@@ -4467,6 +4478,11 @@ export const BranchSuggestionsResponseSchema = z.object({
4467
4478
  committerDate: z.number(),
4468
4479
  hasLocal: z.boolean().optional(),
4469
4480
  hasRemote: z.boolean().optional(),
4481
+ // True when the branch is checked out in another worktree, so a
4482
+ // direct `git checkout` of it would be rejected. Optional: absent on
4483
+ // older daemons, in which case pickers disable nothing (today's
4484
+ // behavior).
4485
+ checkedOutElsewhere: z.boolean().optional(),
4470
4486
  }))
4471
4487
  .optional(),
4472
4488
  error: z.string().nullable(),
@@ -5225,6 +5241,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
5225
5241
  ProviderDiagnosticResponseMessageSchema,
5226
5242
  ProviderUsageListResponseMessageSchema,
5227
5243
  StatsActivityGetResponseMessageSchema,
5244
+ ActivityStatsChangedSchema,
5228
5245
  AgentContextGetUsageResponseMessageSchema,
5229
5246
  ListCommandsResponseSchema,
5230
5247
  ListTerminalsResponseSchema,
@@ -5183,6 +5183,7 @@ export declare const WSOutboundMessageSchema: {
5183
5183
  committerDate: import("zod").ZodNumber;
5184
5184
  hasLocal: import("zod").ZodOptional<import("zod").ZodBoolean>;
5185
5185
  hasRemote: import("zod").ZodOptional<import("zod").ZodBoolean>;
5186
+ checkedOutElsewhere: import("zod").ZodOptional<import("zod").ZodBoolean>;
5186
5187
  }, import("zod/v4/core").$strip>>>;
5187
5188
  error: import("zod").ZodNullable<import("zod").ZodString>;
5188
5189
  requestId: import("zod").ZodString;
@@ -6202,6 +6203,8 @@ export declare const WSOutboundMessageSchema: {
6202
6203
  schedulesExecuted: import("zod").ZodDefault<import("zod").ZodNumber>;
6203
6204
  }, import("zod/v4/core").$strip>;
6204
6205
  }, import("zod/v4/core").$strip>;
6206
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
6207
+ type: import("zod").ZodLiteral<"activity_stats_changed">;
6205
6208
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
6206
6209
  type: import("zod").ZodLiteral<"agent.context.get_usage.response">;
6207
6210
  payload: import("zod").ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otto-code/protocol",
3
- "version": "0.5.8",
3
+ "version": "0.6.1",
4
4
  "description": "Otto shared protocol schemas and wire types",
5
5
  "files": [
6
6
  "dist",