@otto-code/protocol 0.8.0 → 0.8.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.
@@ -2699,6 +2699,33 @@ export declare const BrainModelDeleteResponseSchema: z.ZodObject<{
2699
2699
  requestId: z.ZodString;
2700
2700
  }, z.core.$strip>;
2701
2701
  }, z.core.$strip>;
2702
+ export declare const BrainModelRenameRequestSchema: z.ZodObject<{
2703
+ type: z.ZodLiteral<"brain.model.rename.request">;
2704
+ modelId: z.ZodString;
2705
+ displayName: z.ZodString;
2706
+ requestId: z.ZodString;
2707
+ }, z.core.$strip>;
2708
+ export declare const BrainModelRenameResponseSchema: z.ZodObject<{
2709
+ type: z.ZodLiteral<"brain.model.rename.response">;
2710
+ payload: z.ZodObject<{
2711
+ displayName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2712
+ error: z.ZodNullable<z.ZodString>;
2713
+ requestId: z.ZodString;
2714
+ }, z.core.$strip>;
2715
+ }, z.core.$strip>;
2716
+ export declare const BrainModelRenameResetRequestSchema: z.ZodObject<{
2717
+ type: z.ZodLiteral<"brain.model.rename.reset.request">;
2718
+ modelId: z.ZodString;
2719
+ requestId: z.ZodString;
2720
+ }, z.core.$strip>;
2721
+ export declare const BrainModelRenameResetResponseSchema: z.ZodObject<{
2722
+ type: z.ZodLiteral<"brain.model.rename.reset.response">;
2723
+ payload: z.ZodObject<{
2724
+ displayName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2725
+ error: z.ZodNullable<z.ZodString>;
2726
+ requestId: z.ZodString;
2727
+ }, z.core.$strip>;
2728
+ }, z.core.$strip>;
2702
2729
  export declare const BrainLogsTailRequestSchema: z.ZodObject<{
2703
2730
  type: z.ZodLiteral<"brain.logs.tail.request">;
2704
2731
  limit: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
@@ -9013,6 +9040,15 @@ export declare const SessionInboundMessageSchema: z.ZodDiscriminatedUnion<[z.Zod
9013
9040
  type: z.ZodLiteral<"brain.model.delete.request">;
9014
9041
  modelId: z.ZodString;
9015
9042
  requestId: z.ZodString;
9043
+ }, z.core.$strip>, z.ZodObject<{
9044
+ type: z.ZodLiteral<"brain.model.rename.request">;
9045
+ modelId: z.ZodString;
9046
+ displayName: z.ZodString;
9047
+ requestId: z.ZodString;
9048
+ }, z.core.$strip>, z.ZodObject<{
9049
+ type: z.ZodLiteral<"brain.model.rename.reset.request">;
9050
+ modelId: z.ZodString;
9051
+ requestId: z.ZodString;
9016
9052
  }, z.core.$strip>, z.ZodObject<{
9017
9053
  type: z.ZodLiteral<"brain.logs.tail.request">;
9018
9054
  limit: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
@@ -31722,6 +31758,20 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.Zo
31722
31758
  error: z.ZodNullable<z.ZodString>;
31723
31759
  requestId: z.ZodString;
31724
31760
  }, z.core.$strip>;
31761
+ }, z.core.$strip>, z.ZodObject<{
31762
+ type: z.ZodLiteral<"brain.model.rename.response">;
31763
+ payload: z.ZodObject<{
31764
+ displayName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
31765
+ error: z.ZodNullable<z.ZodString>;
31766
+ requestId: z.ZodString;
31767
+ }, z.core.$strip>;
31768
+ }, z.core.$strip>, z.ZodObject<{
31769
+ type: z.ZodLiteral<"brain.model.rename.reset.response">;
31770
+ payload: z.ZodObject<{
31771
+ displayName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
31772
+ error: z.ZodNullable<z.ZodString>;
31773
+ requestId: z.ZodString;
31774
+ }, z.core.$strip>;
31725
31775
  }, z.core.$strip>, z.ZodObject<{
31726
31776
  type: z.ZodLiteral<"brain.logs.tail.response">;
31727
31777
  payload: z.ZodObject<{
@@ -37688,6 +37738,10 @@ export type BrainModelUnloadRequest = z.infer<typeof BrainModelUnloadRequestSche
37688
37738
  export type BrainModelUnloadResponse = z.infer<typeof BrainModelUnloadResponseSchema>;
37689
37739
  export type BrainModelDeleteRequest = z.infer<typeof BrainModelDeleteRequestSchema>;
37690
37740
  export type BrainModelDeleteResponse = z.infer<typeof BrainModelDeleteResponseSchema>;
37741
+ export type BrainModelRenameRequest = z.infer<typeof BrainModelRenameRequestSchema>;
37742
+ export type BrainModelRenameResponse = z.infer<typeof BrainModelRenameResponseSchema>;
37743
+ export type BrainModelRenameResetRequest = z.infer<typeof BrainModelRenameResetRequestSchema>;
37744
+ export type BrainModelRenameResetResponse = z.infer<typeof BrainModelRenameResetResponseSchema>;
37691
37745
  export type BrainLogsTailRequest = z.infer<typeof BrainLogsTailRequestSchema>;
37692
37746
  export type BrainLogsTailResponse = z.infer<typeof BrainLogsTailResponseSchema>;
37693
37747
  export type KillTerminalRequest = z.infer<typeof KillTerminalRequestSchema>;
@@ -38306,6 +38360,15 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
38306
38360
  type: z.ZodLiteral<"brain.model.delete.request">;
38307
38361
  modelId: z.ZodString;
38308
38362
  requestId: z.ZodString;
38363
+ }, z.core.$strip>, z.ZodObject<{
38364
+ type: z.ZodLiteral<"brain.model.rename.request">;
38365
+ modelId: z.ZodString;
38366
+ displayName: z.ZodString;
38367
+ requestId: z.ZodString;
38368
+ }, z.core.$strip>, z.ZodObject<{
38369
+ type: z.ZodLiteral<"brain.model.rename.reset.request">;
38370
+ modelId: z.ZodString;
38371
+ requestId: z.ZodString;
38309
38372
  }, z.core.$strip>, z.ZodObject<{
38310
38373
  type: z.ZodLiteral<"brain.logs.tail.request">;
38311
38374
  limit: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
@@ -48303,6 +48366,20 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
48303
48366
  error: z.ZodNullable<z.ZodString>;
48304
48367
  requestId: z.ZodString;
48305
48368
  }, z.core.$strip>;
48369
+ }, z.core.$strip>, z.ZodObject<{
48370
+ type: z.ZodLiteral<"brain.model.rename.response">;
48371
+ payload: z.ZodObject<{
48372
+ displayName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
48373
+ error: z.ZodNullable<z.ZodString>;
48374
+ requestId: z.ZodString;
48375
+ }, z.core.$strip>;
48376
+ }, z.core.$strip>, z.ZodObject<{
48377
+ type: z.ZodLiteral<"brain.model.rename.reset.response">;
48378
+ payload: z.ZodObject<{
48379
+ displayName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
48380
+ error: z.ZodNullable<z.ZodString>;
48381
+ requestId: z.ZodString;
48382
+ }, z.core.$strip>;
48306
48383
  }, z.core.$strip>, z.ZodObject<{
48307
48384
  type: z.ZodLiteral<"brain.logs.tail.response">;
48308
48385
  payload: z.ZodObject<{
@@ -54248,6 +54325,15 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
54248
54325
  type: z.ZodLiteral<"brain.model.delete.request">;
54249
54326
  modelId: z.ZodString;
54250
54327
  requestId: z.ZodString;
54328
+ }, z.core.$strip>, z.ZodObject<{
54329
+ type: z.ZodLiteral<"brain.model.rename.request">;
54330
+ modelId: z.ZodString;
54331
+ displayName: z.ZodString;
54332
+ requestId: z.ZodString;
54333
+ }, z.core.$strip>, z.ZodObject<{
54334
+ type: z.ZodLiteral<"brain.model.rename.reset.request">;
54335
+ modelId: z.ZodString;
54336
+ requestId: z.ZodString;
54251
54337
  }, z.core.$strip>, z.ZodObject<{
54252
54338
  type: z.ZodLiteral<"brain.logs.tail.request">;
54253
54339
  limit: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
@@ -64247,6 +64333,20 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
64247
64333
  error: z.ZodNullable<z.ZodString>;
64248
64334
  requestId: z.ZodString;
64249
64335
  }, z.core.$strip>;
64336
+ }, z.core.$strip>, z.ZodObject<{
64337
+ type: z.ZodLiteral<"brain.model.rename.response">;
64338
+ payload: z.ZodObject<{
64339
+ displayName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
64340
+ error: z.ZodNullable<z.ZodString>;
64341
+ requestId: z.ZodString;
64342
+ }, z.core.$strip>;
64343
+ }, z.core.$strip>, z.ZodObject<{
64344
+ type: z.ZodLiteral<"brain.model.rename.reset.response">;
64345
+ payload: z.ZodObject<{
64346
+ displayName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
64347
+ error: z.ZodNullable<z.ZodString>;
64348
+ requestId: z.ZodString;
64349
+ }, z.core.$strip>;
64250
64350
  }, z.core.$strip>, z.ZodObject<{
64251
64351
  type: z.ZodLiteral<"brain.logs.tail.response">;
64252
64352
  payload: z.ZodObject<{
package/dist/messages.js CHANGED
@@ -2321,6 +2321,39 @@ export const BrainModelDeleteResponseSchema = z.object({
2321
2321
  requestId: z.string(),
2322
2322
  }),
2323
2323
  });
2324
+ // Rename a model's display name. The brain rejects a collision with another
2325
+ // model's current id/displayName: /v1/models keys its id on displayName, and
2326
+ // both the completion path and defaultModel/switchTo resolve a model by
2327
+ // displayName === name || id === name - a duplicate would strand one model
2328
+ // unreachable by name with no error anywhere else in the chain.
2329
+ export const BrainModelRenameRequestSchema = z.object({
2330
+ type: z.literal("brain.model.rename.request"),
2331
+ modelId: z.string(),
2332
+ displayName: z.string(),
2333
+ requestId: z.string(),
2334
+ });
2335
+ export const BrainModelRenameResponseSchema = z.object({
2336
+ type: z.literal("brain.model.rename.response"),
2337
+ payload: z.object({
2338
+ displayName: z.string().nullable().default(null),
2339
+ error: z.string().nullable(),
2340
+ requestId: z.string(),
2341
+ }),
2342
+ });
2343
+ // Reset a model's display name back to its scan-derived default.
2344
+ export const BrainModelRenameResetRequestSchema = z.object({
2345
+ type: z.literal("brain.model.rename.reset.request"),
2346
+ modelId: z.string(),
2347
+ requestId: z.string(),
2348
+ });
2349
+ export const BrainModelRenameResetResponseSchema = z.object({
2350
+ type: z.literal("brain.model.rename.reset.response"),
2351
+ payload: z.object({
2352
+ displayName: z.string().nullable().default(null),
2353
+ error: z.string().nullable(),
2354
+ requestId: z.string(),
2355
+ }),
2356
+ });
2324
2357
  // Tail the brain's llama-server log.
2325
2358
  export const BrainLogsTailRequestSchema = z.object({
2326
2359
  type: z.literal("brain.logs.tail.request"),
@@ -5857,6 +5890,8 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
5857
5890
  BrainModelLoadRequestSchema,
5858
5891
  BrainModelUnloadRequestSchema,
5859
5892
  BrainModelDeleteRequestSchema,
5893
+ BrainModelRenameRequestSchema,
5894
+ BrainModelRenameResetRequestSchema,
5860
5895
  BrainLogsTailRequestSchema,
5861
5896
  UpdateAgentRequestMessageSchema,
5862
5897
  ProjectRenameRequestSchema,
@@ -10417,6 +10452,8 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
10417
10452
  BrainModelLoadResponseSchema,
10418
10453
  BrainModelUnloadResponseSchema,
10419
10454
  BrainModelDeleteResponseSchema,
10455
+ BrainModelRenameResponseSchema,
10456
+ BrainModelRenameResetResponseSchema,
10420
10457
  BrainLogsTailResponseSchema,
10421
10458
  AgentArchivedMessageSchema,
10422
10459
  CloseItemsResponseSchema,
@@ -7392,6 +7392,20 @@ export declare const WSOutboundMessageSchema: {
7392
7392
  error: import("zod").ZodNullable<import("zod").ZodString>;
7393
7393
  requestId: import("zod").ZodString;
7394
7394
  }, import("zod/v4/core").$strip>;
7395
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
7396
+ type: import("zod").ZodLiteral<"brain.model.rename.response">;
7397
+ payload: import("zod").ZodObject<{
7398
+ displayName: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodString>>;
7399
+ error: import("zod").ZodNullable<import("zod").ZodString>;
7400
+ requestId: import("zod").ZodString;
7401
+ }, import("zod/v4/core").$strip>;
7402
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
7403
+ type: import("zod").ZodLiteral<"brain.model.rename.reset.response">;
7404
+ payload: import("zod").ZodObject<{
7405
+ displayName: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodString>>;
7406
+ error: import("zod").ZodNullable<import("zod").ZodString>;
7407
+ requestId: import("zod").ZodString;
7408
+ }, import("zod/v4/core").$strip>;
7395
7409
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
7396
7410
  type: import("zod").ZodLiteral<"brain.logs.tail.response">;
7397
7411
  payload: import("zod").ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otto-code/protocol",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Otto shared protocol schemas and wire types",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "files": [