@otto-code/protocol 0.8.7 → 0.8.9

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/messages.js CHANGED
@@ -462,6 +462,12 @@ export const MutableBrainConfigSchema = z
462
462
  .passthrough()
463
463
  .default({ host: "127.0.0.1", port: 1234 }),
464
464
  defaultModel: z.string().nullable().default(null),
465
+ runtime: z
466
+ .object({
467
+ source: z.enum(["auto", "managed", "lmstudio"]).default("auto"),
468
+ path: z.string().nullable().default(null),
469
+ })
470
+ .default({ source: "auto", path: null }),
465
471
  // Pin the host to one model: serve only the default/resident model and
466
472
  // refuse completion requests that ask for a different one.
467
473
  lockModel: z.boolean().default(false),
@@ -533,6 +539,9 @@ export const MutableBrainConfigPatchSchema = z
533
539
  remote: MutableBrainRemotePatchSchema,
534
540
  listen: MutableBrainListenPatchSchema,
535
541
  defaultModel: z.string().nullable(),
542
+ runtime: z
543
+ .object({ source: z.enum(["auto", "managed", "lmstudio"]), path: z.string().nullable() })
544
+ .partial(),
536
545
  lockModel: z.boolean(),
537
546
  allowRemoteConfig: z.boolean(),
538
547
  allowInsecureBind: z.boolean(),
@@ -549,6 +558,7 @@ export const DEFAULT_MUTABLE_BRAIN_CONFIG = {
549
558
  remote: { host: "", port: 1234, secure: false, authToken: null, certFingerprint: null },
550
559
  listen: { host: "127.0.0.1", port: 1234 },
551
560
  defaultModel: null,
561
+ runtime: { source: "auto", path: null },
552
562
  lockModel: false,
553
563
  allowRemoteConfig: false,
554
564
  allowInsecureBind: false,
@@ -751,6 +761,7 @@ const AgentSelectOptionSchema = z.object({
751
761
  id: z.string(),
752
762
  label: z.string(),
753
763
  description: z.string().optional(),
764
+ family: z.string().optional(),
754
765
  isDefault: z.boolean().optional(),
755
766
  metadata: z.record(z.string(), z.unknown()).optional(),
756
767
  });
@@ -803,6 +814,7 @@ const AgentModelDefinitionSchema = z.object({
803
814
  id: z.string(),
804
815
  label: z.string(),
805
816
  description: z.string().optional(),
817
+ family: z.string().optional(),
806
818
  isDefault: z.boolean().optional(),
807
819
  metadata: z.record(z.string(), z.unknown()).optional(),
808
820
  contextWindowMaxTokens: z.number().optional(),
@@ -1898,6 +1910,7 @@ export const BrainCatalogModelSchema = z
1898
1910
  .object({
1899
1911
  id: z.string(),
1900
1912
  name: z.string().default(""),
1913
+ family: z.string().nullable().optional(),
1901
1914
  installed: z.boolean().default(false),
1902
1915
  publisher: z.string().default(""),
1903
1916
  repo: z.string().default(""),
@@ -1911,12 +1924,30 @@ export const BrainCatalogModelSchema = z
1911
1924
  tier: z.string().default(""),
1912
1925
  useCases: z.array(z.string()).default([]),
1913
1926
  why: z.string().default(""),
1927
+ components: z
1928
+ .array(z.object({
1929
+ id: z.string(),
1930
+ label: z.string().default(""),
1931
+ description: z.string().default(""),
1932
+ role: z.string().default(""),
1933
+ hfRepo: z.string().optional(),
1934
+ file: z.string().default(""),
1935
+ bytes: z.number().nullable().optional(),
1936
+ required: z.boolean().default(false),
1937
+ defaultDownload: z.boolean().default(false),
1938
+ defaultLoad: z.boolean().default(false),
1939
+ minRuntimeBuild: z.number().optional(),
1940
+ }))
1941
+ .optional(),
1914
1942
  })
1915
1943
  .passthrough();
1916
1944
  // An installed llama.cpp runtime, from `otto-brain runtime list`.
1917
1945
  export const BrainRuntimeSchema = z
1918
1946
  .object({
1919
1947
  label: z.string().default(""),
1948
+ // A human-readable runtime identity. The filesystem-safe `label` remains
1949
+ // for older hosts and destructive operations, not for UI presentation.
1950
+ displayName: z.string().default(""),
1920
1951
  version: z.string().default(""),
1921
1952
  source: z.string().default(""),
1922
1953
  dir: z.string().default(""),
@@ -1929,6 +1960,7 @@ export const BrainRuntimeSchema = z
1929
1960
  export const BrainJobKindSchema = z.enum([
1930
1961
  "pull",
1931
1962
  "runtime-install",
1963
+ "runtime-remove",
1932
1964
  "calibrate",
1933
1965
  "sweep",
1934
1966
  "bench",
@@ -2007,6 +2039,9 @@ export const BrainModelsPullRequestSchema = z.object({
2007
2039
  type: z.literal("brain.models.pull.request"),
2008
2040
  // Catalog id or name fragment.
2009
2041
  model: z.string(),
2042
+ quant: z.string().optional(),
2043
+ // COMPAT(brainModelBundles): added in v0.8.7, drop the gate when floor >= v0.8.7.
2044
+ components: z.array(z.string()).optional(),
2010
2045
  requestId: z.string(),
2011
2046
  });
2012
2047
  export const BrainModelsPullResponseSchema = z.object({
@@ -2024,6 +2059,15 @@ export const BrainRuntimeInstallResponseSchema = z.object({
2024
2059
  type: z.literal("brain.runtime.install.response"),
2025
2060
  payload: BrainJobResultSchema,
2026
2061
  });
2062
+ export const BrainRuntimeRemoveRequestSchema = z.object({
2063
+ type: z.literal("brain.runtime.remove.request"),
2064
+ name: z.string(),
2065
+ requestId: z.string(),
2066
+ });
2067
+ export const BrainRuntimeRemoveResponseSchema = z.object({
2068
+ type: z.literal("brain.runtime.remove.response"),
2069
+ payload: BrainJobResultSchema,
2070
+ });
2027
2071
  // Measure real KV bytes/token for a model - starts a `calibrate` job. Needs a
2028
2072
  // runtime + GPU; refused with a helpful error otherwise.
2029
2073
  export const BrainCalibrateRequestSchema = z.object({
@@ -2088,6 +2132,8 @@ export const BrainHfSearchResultSchema = z
2088
2132
  downloads: z.number().default(0),
2089
2133
  likes: z.number().default(0),
2090
2134
  gated: z.boolean().default(false),
2135
+ // A short, source-authored excerpt extracted from the repository's model card.
2136
+ summary: z.string().nullable().optional(),
2091
2137
  // True when any quant of this repo is already on disk.
2092
2138
  installed: z.boolean().default(false),
2093
2139
  })
@@ -2099,8 +2145,23 @@ export const BrainRepoQuantSchema = z
2099
2145
  size: z.string().default(""),
2100
2146
  sizeBytes: z.number().default(0),
2101
2147
  files: z.number().default(0),
2148
+ fileNames: z.array(z.string()).optional(),
2102
2149
  // True when this specific quant is already on disk.
2103
2150
  installed: z.boolean().default(false),
2151
+ // The installed model's stable id, when this quant is already on disk.
2152
+ // Optional so daemons predating quant deletion remain compatible.
2153
+ modelId: z.string().nullable().optional(),
2154
+ // The shared projector detected in this repository. It is repeated on
2155
+ // each quant row because the quant picker is the unit that discovers and
2156
+ // presents a downloadable Hugging Face bundle.
2157
+ projector: z
2158
+ .object({
2159
+ file: z.string(),
2160
+ sizeBytes: z.number(),
2161
+ // COMPAT(brainDiscoveredProjectorState): added in v0.8.7, remove after 2027-02-11.
2162
+ installed: z.boolean().optional(),
2163
+ })
2164
+ .optional(),
2104
2165
  })
2105
2166
  .passthrough();
2106
2167
  // Search Hugging Face for GGUF models - `otto-brain search <query>`.
@@ -2137,6 +2198,8 @@ export const BrainModelsAddRequestSchema = z.object({
2137
2198
  type: z.literal("brain.models.add.request"),
2138
2199
  repo: z.string(),
2139
2200
  quant: z.string(),
2201
+ // COMPAT(brainDiscoveredBundleComponents): added in v0.8.7, remove after 2027-02-11.
2202
+ components: z.array(z.string()).optional(),
2140
2203
  requestId: z.string(),
2141
2204
  });
2142
2205
  export const BrainModelsAddResponseSchema = z.object({
@@ -2167,8 +2230,27 @@ export const BrainProfileSchema = z
2167
2230
  flashAttention: z.boolean().default(true),
2168
2231
  gpuLayers: z.number().default(0),
2169
2232
  vision: z.boolean().default(false),
2233
+ enabledComponents: z.array(z.string()).optional(),
2170
2234
  reasoningBudget: z.number().default(0),
2171
2235
  parallelSlots: z.number().default(1),
2236
+ contextMultiplier: z.number().default(1),
2237
+ calibrationRequired: z.boolean().default(true),
2238
+ hostingProfileId: z.string().nullable().default(null),
2239
+ /** Matches the brain's own default: a profile written before this field
2240
+ * existed meant "use the family default", which is `inherit`. */
2241
+ hostingProfileMode: z.enum(["inherit", "off", "custom"]).default("inherit"),
2242
+ })
2243
+ .passthrough();
2244
+ /** A Brain-owned, named llama-server template composition. */
2245
+ export const BrainHostingProfileSchema = z
2246
+ .object({
2247
+ id: z.string(),
2248
+ name: z.string(),
2249
+ family: z.string(),
2250
+ description: z.string().default(""),
2251
+ template: z.string().nullable().default(null),
2252
+ systemPromptAddendum: z.string().nullable().default(null),
2253
+ templateKwargs: z.record(z.string(), z.unknown()).default({}),
2172
2254
  })
2173
2255
  .passthrough();
2174
2256
  /** One editable field, as the brain describes it, so the editor cannot drift. */
@@ -2213,6 +2295,9 @@ export const BrainBudgetSchema = z
2213
2295
  .object({
2214
2296
  weightsBytes: z.number().default(0),
2215
2297
  mmprojBytes: z.number().default(0),
2298
+ componentBytes: z.number().optional(),
2299
+ drafterKvBytes: z.number().optional(),
2300
+ imageProcessingBytes: z.number().optional(),
2216
2301
  kvBytes: z.number().default(0),
2217
2302
  overheadBytes: z.number().default(0),
2218
2303
  totalBytes: z.number().default(0),
@@ -2248,6 +2333,7 @@ export const BrainInventoryModelSchema = z
2248
2333
  .object({
2249
2334
  id: z.string(),
2250
2335
  displayName: z.string().default(""),
2336
+ family: z.string().nullable().optional(),
2251
2337
  publisher: z.string().nullable().default(null),
2252
2338
  quant: z.string().nullable().default(null),
2253
2339
  sizeBytes: z.number().default(0),
@@ -2258,6 +2344,22 @@ export const BrainInventoryModelSchema = z
2258
2344
  blockCount: z.number().nullable().default(null),
2259
2345
  headCountKv: z.number().nullable().default(null),
2260
2346
  hasProjector: z.boolean().default(false),
2347
+ components: z
2348
+ .array(z.object({
2349
+ id: z.string(),
2350
+ label: z.string().default(""),
2351
+ description: z.string().default(""),
2352
+ role: z.string().default(""),
2353
+ bytes: z.number().default(0),
2354
+ available: z.boolean().default(false),
2355
+ unavailableReason: z.string().optional(),
2356
+ required: z.boolean().default(false),
2357
+ defaultDownload: z.boolean().default(false),
2358
+ defaultLoad: z.boolean().default(false),
2359
+ minRuntimeBuild: z.number().optional(),
2360
+ }))
2361
+ .nullable()
2362
+ .optional(),
2261
2363
  reasoning: z.boolean().default(false),
2262
2364
  mtp: z.boolean().default(false),
2263
2365
  distilled: z.boolean().default(false),
@@ -2306,6 +2408,10 @@ export const BrainModelProfileGetResponseSchema = z.object({
2306
2408
  fields: z.array(BrainProfileFieldSchema).default([]),
2307
2409
  warnings: z.array(BrainProfileWarningSchema).default([]),
2308
2410
  calibration: BrainCalibrationInfoSchema.nullable().default(null),
2411
+ /** True when a previous resident-model edit still awaits a reload. */
2412
+ requiresRestart: z.boolean().default(false),
2413
+ hostingProfiles: z.array(BrainHostingProfileSchema).default([]),
2414
+ familyHostingProfileId: z.string().nullable().default(null),
2309
2415
  error: z.string().nullable(),
2310
2416
  requestId: z.string(),
2311
2417
  }),
@@ -2323,6 +2429,7 @@ export const BrainModelProfileSetResponseSchema = z.object({
2323
2429
  type: z.literal("brain.model.profile.set.response"),
2324
2430
  payload: z.object({
2325
2431
  profile: BrainProfileSchema.nullable().default(null),
2432
+ fields: z.array(BrainProfileFieldSchema).default([]),
2326
2433
  /** Human-readable notes about anything clamped or ignored. */
2327
2434
  adjustments: z.array(z.string()).default([]),
2328
2435
  warnings: z.array(BrainProfileWarningSchema).default([]),
@@ -2331,6 +2438,8 @@ export const BrainModelProfileSetResponseSchema = z.object({
2331
2438
  maxContextThatFits: z.number().nullable().default(null),
2332
2439
  /** True when the edited model is the resident one, so a restart applies it. */
2333
2440
  requiresRestart: z.boolean().default(false),
2441
+ hostingProfiles: z.array(BrainHostingProfileSchema).default([]),
2442
+ familyHostingProfileId: z.string().nullable().default(null),
2334
2443
  error: z.string().nullable(),
2335
2444
  requestId: z.string(),
2336
2445
  }),
@@ -2403,6 +2512,21 @@ export const BrainModelDeleteResponseSchema = z.object({
2403
2512
  requestId: z.string(),
2404
2513
  }),
2405
2514
  });
2515
+ export const BrainModelComponentDeleteRequestSchema = z.object({
2516
+ type: z.literal("brain.model.component.delete.request"),
2517
+ modelId: z.string(),
2518
+ componentId: z.string(),
2519
+ requestId: z.string(),
2520
+ });
2521
+ export const BrainModelComponentDeleteResponseSchema = z.object({
2522
+ type: z.literal("brain.model.component.delete.response"),
2523
+ payload: z.object({
2524
+ deleted: z.array(z.string()).default([]),
2525
+ freedBytes: z.number().default(0),
2526
+ error: z.string().nullable(),
2527
+ requestId: z.string(),
2528
+ }),
2529
+ });
2406
2530
  // Rename a model's display name. The brain rejects a collision with another
2407
2531
  // model's current id/displayName: /v1/models keys its id on displayName, and
2408
2532
  // both the completion path and defaultModel/switchTo resolve a model by
@@ -3821,6 +3945,7 @@ export const ProjectKnowledgeKindSchema = z.enum([
3821
3945
  "constraint",
3822
3946
  "requirement",
3823
3947
  "architecture",
3948
+ "finding",
3824
3949
  "project",
3825
3950
  "reference",
3826
3951
  ]);
@@ -3873,10 +3998,13 @@ export const ProjectKnowledgeRecordSchema = z.object({
3873
3998
  .optional(),
3874
3999
  path: z.string().optional(),
3875
4000
  });
3876
- export const ProjectKnowledgeFindingSchema = z.object({
4001
+ /** Review health, not a persisted project-knowledge finding record. */
4002
+ export const ProjectKnowledgeHealthSchema = z.object({
3877
4003
  kind: z.enum(["stale", "overlapping_tags", "overlapping_statement"]),
3878
4004
  recordId: z.string(),
3879
4005
  relatedRecordId: z.string().optional(),
4006
+ tagOverlap: z.enum(["complete", "partial"]).optional(),
4007
+ sharedTags: z.array(z.string()).optional(),
3880
4008
  message: z.string(),
3881
4009
  });
3882
4010
  export const ProjectKnowledgeRootPageSchema = z.object({
@@ -3896,7 +4024,7 @@ export const ProjectKnowledgeListResponseMessageSchema = z.object({
3896
4024
  requestId: z.string(),
3897
4025
  records: z.array(ProjectKnowledgeRecordSchema),
3898
4026
  rootPages: z.array(ProjectKnowledgeRootPageSchema).optional(),
3899
- findings: z.array(ProjectKnowledgeFindingSchema),
4027
+ findings: z.array(ProjectKnowledgeHealthSchema),
3900
4028
  brief: z.string(),
3901
4029
  briefTokens: z.number(),
3902
4030
  includedIds: z.array(z.string()),
@@ -5447,6 +5575,11 @@ const ParsedDiffFileSchema = z.object({
5447
5575
  additions: z.number(),
5448
5576
  deletions: z.number(),
5449
5577
  hunks: z.array(DiffHunkSchema),
5578
+ // Optional so older daemons remain wire-compatible. Whole snapshots are
5579
+ // size-bounded by the daemon and let Structural parse files, never isolated
5580
+ // patch hunks.
5581
+ beforeSource: z.string().optional(),
5582
+ afterSource: z.string().optional(),
5450
5583
  status: z.enum(["ok", "too_large", "binary"]).optional(),
5451
5584
  });
5452
5585
  const FileExplorerEntrySchema = z.object({
@@ -6031,6 +6164,10 @@ export const CreateTerminalRequestSchema = z.object({
6031
6164
  agentId: z.string().optional(),
6032
6165
  command: z.string().optional(),
6033
6166
  args: z.array(z.string()).optional(),
6167
+ /** An embedded terminal renders inside another pane and never gets its own workspace tab. */
6168
+ presentation: z.enum(["embedded"]).optional(),
6169
+ /** Stable owner identity used to adopt an embedded terminal after a renderer reload. */
6170
+ presentationOwner: z.string().optional(),
6034
6171
  // Initial PTY size. Added in v0.1.107; the app no longer sends it (the estimate cache that fed
6035
6172
  // it was removed - the pane-focus resize claim sizes the PTY instead). Kept and honored
6036
6173
  // permanently: released v0.1.107 clients still send it, and programmatic callers may pass an
@@ -6133,6 +6270,10 @@ export const CaptureTerminalRequestSchema = z.object({
6133
6270
  stripAnsi: z.boolean().default(true),
6134
6271
  requestId: z.string(),
6135
6272
  });
6273
+ export const TerminalCompatibilityDiagnosticRequestSchema = z.object({
6274
+ type: z.literal("terminal.compatibility.diagnostic.request"),
6275
+ requestId: z.string(),
6276
+ });
6136
6277
  export const HubExecutionAgentCreateRequestSchema = z.object({
6137
6278
  type: z.literal("hub.execution.agent.create.request"),
6138
6279
  requestId: z.string(),
@@ -6190,6 +6331,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
6190
6331
  BrainRuntimeListRequestSchema,
6191
6332
  BrainModelsPullRequestSchema,
6192
6333
  BrainRuntimeInstallRequestSchema,
6334
+ BrainRuntimeRemoveRequestSchema,
6193
6335
  BrainCalibrateRequestSchema,
6194
6336
  BrainSweepRequestSchema,
6195
6337
  BrainBenchRequestSchema,
@@ -6205,6 +6347,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
6205
6347
  BrainModelLoadRequestSchema,
6206
6348
  BrainModelUnloadRequestSchema,
6207
6349
  BrainModelDeleteRequestSchema,
6350
+ BrainModelComponentDeleteRequestSchema,
6208
6351
  BrainModelRenameRequestSchema,
6209
6352
  BrainModelRenameResetRequestSchema,
6210
6353
  BrainLogsTailRequestSchema,
@@ -6432,6 +6575,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
6432
6575
  TerminalInputSchema,
6433
6576
  KillTerminalRequestSchema,
6434
6577
  CaptureTerminalRequestSchema,
6578
+ TerminalCompatibilityDiagnosticRequestSchema,
6435
6579
  ChatCreateRequestSchema,
6436
6580
  ChatListRequestSchema,
6437
6581
  ChatInspectRequestSchema,
@@ -6631,6 +6775,9 @@ export const ServerInfoStatusPayloadSchema = z
6631
6775
  daemonStatusRpc: z.boolean().optional(),
6632
6776
  // COMPAT(terminalRestoreModes): added in v0.1.81, remove gate after 2026-11-23.
6633
6777
  "terminal-restore-modes": z.boolean().optional(),
6778
+ // COMPAT(terminalCompatibilityDiagnostic): added in v0.8.9, remove gate after 2027-02-12.
6779
+ terminalCompatibilityDiagnostic: z.boolean().optional(),
6780
+ terminalEmbeddedPresentation: z.boolean().optional(),
6634
6781
  // COMPAT(terminalTitleSettings): added in v0.8.5, remove gate after 2027-02-07.
6635
6782
  terminalTitleSettings: z.boolean().optional(),
6636
6783
  // COMPAT(rewind): added in v0.1.X, drop the gate when floor >= v0.1.X.
@@ -7344,6 +7491,9 @@ const WorkspaceGitRuntimePayloadSchema = z
7344
7491
  remoteUrl: z.string().nullable().optional(),
7345
7492
  isOttoOwnedWorktree: z.boolean().optional(),
7346
7493
  isDirty: z.boolean().nullable().optional(),
7494
+ // COMPAT(workspaceGitBaseRef): added in v0.8.7, remove after 2027-02-10.
7495
+ // The branch-history label is useful only when its comparison base is explicit.
7496
+ baseRef: z.string().nullable().optional(),
7347
7497
  aheadBehind: z
7348
7498
  .object({
7349
7499
  ahead: z.number(),
@@ -7441,6 +7591,16 @@ export const WorkspaceDescriptorPayloadSchema = z
7441
7591
  })
7442
7592
  .nullable()
7443
7593
  .optional(),
7594
+ // COMPAT(workspaceWorkingTreeDiffStat): added in v0.8.7, remove after 2027-02-10.
7595
+ // `diffStat` is retained for older clients and means branch-versus-base.
7596
+ // This field is only the working tree relative to HEAD, so it clears on commit.
7597
+ workingTreeDiffStat: z
7598
+ .object({
7599
+ additions: z.number(),
7600
+ deletions: z.number(),
7601
+ })
7602
+ .nullable()
7603
+ .optional(),
7444
7604
  scripts: z.array(WorkspaceScriptPayloadSchema).default([]),
7445
7605
  gitRuntime: WorkspaceGitRuntimePayloadSchema,
7446
7606
  githubRuntime: WorkspaceGitHubRuntimePayloadSchema,
@@ -10469,6 +10629,8 @@ const TerminalInfoSchema = z.object({
10469
10629
  workspaceId: z.string().optional(),
10470
10630
  title: z.string().optional(),
10471
10631
  activity: TerminalActivitySchema.nullable().optional(),
10632
+ presentation: z.enum(["embedded"]).optional(),
10633
+ presentationOwner: z.string().optional(),
10472
10634
  });
10473
10635
  export const TerminalCellSchema = z.object({
10474
10636
  char: z.string(),
@@ -10570,6 +10732,32 @@ export const CaptureTerminalResponseSchema = z.object({
10570
10732
  requestId: z.string(),
10571
10733
  }),
10572
10734
  });
10735
+ export const TerminalCompatibilityDiagnosticStatusSchema = z.enum([
10736
+ "pass",
10737
+ "fail",
10738
+ "warn",
10739
+ "unknown",
10740
+ ]);
10741
+ export const TerminalCompatibilityDiagnosticCheckSchema = z.object({
10742
+ id: z.string(),
10743
+ label: z.string(),
10744
+ status: TerminalCompatibilityDiagnosticStatusSchema,
10745
+ detail: z.string(),
10746
+ evidence: z.string().optional(),
10747
+ });
10748
+ export const TerminalCompatibilityDiagnosticResponseSchema = z.object({
10749
+ type: z.literal("terminal.compatibility.diagnostic.response"),
10750
+ payload: z.object({
10751
+ requestId: z.string(),
10752
+ success: z.boolean(),
10753
+ error: z.string().nullable(),
10754
+ generatedAt: z.string(),
10755
+ platform: z.string().optional(),
10756
+ term: z.string().nullable().optional(),
10757
+ termProgram: z.string().nullable().optional(),
10758
+ checks: z.array(TerminalCompatibilityDiagnosticCheckSchema),
10759
+ }),
10760
+ });
10573
10761
  export const TerminalStreamExitSchema = z.object({
10574
10762
  type: z.literal("terminal_stream_exit"),
10575
10763
  payload: z.object({
@@ -10808,6 +10996,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
10808
10996
  BrainRuntimeListResponseSchema,
10809
10997
  BrainModelsPullResponseSchema,
10810
10998
  BrainRuntimeInstallResponseSchema,
10999
+ BrainRuntimeRemoveResponseSchema,
10811
11000
  BrainCalibrateResponseSchema,
10812
11001
  BrainSweepResponseSchema,
10813
11002
  BrainBenchResponseSchema,
@@ -10823,6 +11012,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
10823
11012
  BrainModelLoadResponseSchema,
10824
11013
  BrainModelUnloadResponseSchema,
10825
11014
  BrainModelDeleteResponseSchema,
11015
+ BrainModelComponentDeleteResponseSchema,
10826
11016
  BrainModelRenameResponseSchema,
10827
11017
  BrainModelRenameResetResponseSchema,
10828
11018
  BrainLogsTailResponseSchema,
@@ -10969,6 +11159,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
10969
11159
  SubscribeTerminalResponseSchema,
10970
11160
  KillTerminalResponseSchema,
10971
11161
  CaptureTerminalResponseSchema,
11162
+ TerminalCompatibilityDiagnosticResponseSchema,
10972
11163
  TerminalStreamExitSchema,
10973
11164
  TerminalAttentionRequiredSchema,
10974
11165
  ChatCreateResponseSchema,
@@ -269,6 +269,7 @@ export declare const ProviderCompactionConfigSchema: z.ZodObject<{
269
269
  autoCompact: z.ZodOptional<z.ZodBoolean>;
270
270
  thresholdPercent: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<50>, z.ZodLiteral<60>, z.ZodLiteral<70>, z.ZodLiteral<80>, z.ZodLiteral<90>]>>;
271
271
  keepRecentTokens: z.ZodOptional<z.ZodNumber>;
272
+ summaryMaxTokens: z.ZodOptional<z.ZodNumber>;
272
273
  hideSelector: z.ZodOptional<z.ZodBoolean>;
273
274
  }, z.core.$strip>;
274
275
  export type ProviderCompactionConfig = z.infer<typeof ProviderCompactionConfigSchema>;
@@ -340,6 +341,7 @@ export declare const ProviderOverrideSchema: z.ZodObject<{
340
341
  autoCompact: z.ZodOptional<z.ZodBoolean>;
341
342
  thresholdPercent: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<50>, z.ZodLiteral<60>, z.ZodLiteral<70>, z.ZodLiteral<80>, z.ZodLiteral<90>]>>;
342
343
  keepRecentTokens: z.ZodOptional<z.ZodNumber>;
344
+ summaryMaxTokens: z.ZodOptional<z.ZodNumber>;
343
345
  hideSelector: z.ZodOptional<z.ZodBoolean>;
344
346
  }, z.core.$strip>>;
345
347
  maxToolRounds: z.ZodOptional<z.ZodNumber>;
@@ -414,6 +416,7 @@ export declare const ProviderOverridesSchema: z.ZodRecord<z.ZodString, z.ZodObje
414
416
  autoCompact: z.ZodOptional<z.ZodBoolean>;
415
417
  thresholdPercent: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<50>, z.ZodLiteral<60>, z.ZodLiteral<70>, z.ZodLiteral<80>, z.ZodLiteral<90>]>>;
416
418
  keepRecentTokens: z.ZodOptional<z.ZodNumber>;
419
+ summaryMaxTokens: z.ZodOptional<z.ZodNumber>;
417
420
  hideSelector: z.ZodOptional<z.ZodBoolean>;
418
421
  }, z.core.$strip>>;
419
422
  maxToolRounds: z.ZodOptional<z.ZodNumber>;
@@ -235,6 +235,8 @@ export const ProviderCompactionConfigSchema = z.object({
235
235
  .optional(),
236
236
  /** Recent-conversation budget kept verbatim through compaction. Default 20000. */
237
237
  keepRecentTokens: z.number().int().positive().optional(),
238
+ /** Maximum tokens the compaction summary may generate. Omitted leaves the endpoint default. */
239
+ summaryMaxTokens: z.number().int().positive().optional(),
238
240
  /**
239
241
  * true hides the per-agent "Auto-compact" feature select in chats; agents
240
242
  * always run with the provider-level default above (persisted per-agent