@otto-code/protocol 0.8.7 → 0.8.8
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/generated/validation/ws-outbound.aot.js +47823 -46923
- package/dist/messages.d.ts +1076 -12
- package/dist/messages.js +118 -2
- package/dist/validation/ws-outbound-schema-metadata.d.ts +215 -2
- package/package.json +1 -1
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,
|
|
@@ -1911,12 +1921,30 @@ export const BrainCatalogModelSchema = z
|
|
|
1911
1921
|
tier: z.string().default(""),
|
|
1912
1922
|
useCases: z.array(z.string()).default([]),
|
|
1913
1923
|
why: z.string().default(""),
|
|
1924
|
+
components: z
|
|
1925
|
+
.array(z.object({
|
|
1926
|
+
id: z.string(),
|
|
1927
|
+
label: z.string().default(""),
|
|
1928
|
+
description: z.string().default(""),
|
|
1929
|
+
role: z.string().default(""),
|
|
1930
|
+
hfRepo: z.string().optional(),
|
|
1931
|
+
file: z.string().default(""),
|
|
1932
|
+
bytes: z.number().nullable().optional(),
|
|
1933
|
+
required: z.boolean().default(false),
|
|
1934
|
+
defaultDownload: z.boolean().default(false),
|
|
1935
|
+
defaultLoad: z.boolean().default(false),
|
|
1936
|
+
minRuntimeBuild: z.number().optional(),
|
|
1937
|
+
}))
|
|
1938
|
+
.optional(),
|
|
1914
1939
|
})
|
|
1915
1940
|
.passthrough();
|
|
1916
1941
|
// An installed llama.cpp runtime, from `otto-brain runtime list`.
|
|
1917
1942
|
export const BrainRuntimeSchema = z
|
|
1918
1943
|
.object({
|
|
1919
1944
|
label: z.string().default(""),
|
|
1945
|
+
// A human-readable runtime identity. The filesystem-safe `label` remains
|
|
1946
|
+
// for older hosts and destructive operations, not for UI presentation.
|
|
1947
|
+
displayName: z.string().default(""),
|
|
1920
1948
|
version: z.string().default(""),
|
|
1921
1949
|
source: z.string().default(""),
|
|
1922
1950
|
dir: z.string().default(""),
|
|
@@ -1929,6 +1957,7 @@ export const BrainRuntimeSchema = z
|
|
|
1929
1957
|
export const BrainJobKindSchema = z.enum([
|
|
1930
1958
|
"pull",
|
|
1931
1959
|
"runtime-install",
|
|
1960
|
+
"runtime-remove",
|
|
1932
1961
|
"calibrate",
|
|
1933
1962
|
"sweep",
|
|
1934
1963
|
"bench",
|
|
@@ -2007,6 +2036,9 @@ export const BrainModelsPullRequestSchema = z.object({
|
|
|
2007
2036
|
type: z.literal("brain.models.pull.request"),
|
|
2008
2037
|
// Catalog id or name fragment.
|
|
2009
2038
|
model: z.string(),
|
|
2039
|
+
quant: z.string().optional(),
|
|
2040
|
+
// COMPAT(brainModelBundles): added in v0.8.7, drop the gate when floor >= v0.8.7.
|
|
2041
|
+
components: z.array(z.string()).optional(),
|
|
2010
2042
|
requestId: z.string(),
|
|
2011
2043
|
});
|
|
2012
2044
|
export const BrainModelsPullResponseSchema = z.object({
|
|
@@ -2024,6 +2056,15 @@ export const BrainRuntimeInstallResponseSchema = z.object({
|
|
|
2024
2056
|
type: z.literal("brain.runtime.install.response"),
|
|
2025
2057
|
payload: BrainJobResultSchema,
|
|
2026
2058
|
});
|
|
2059
|
+
export const BrainRuntimeRemoveRequestSchema = z.object({
|
|
2060
|
+
type: z.literal("brain.runtime.remove.request"),
|
|
2061
|
+
name: z.string(),
|
|
2062
|
+
requestId: z.string(),
|
|
2063
|
+
});
|
|
2064
|
+
export const BrainRuntimeRemoveResponseSchema = z.object({
|
|
2065
|
+
type: z.literal("brain.runtime.remove.response"),
|
|
2066
|
+
payload: BrainJobResultSchema,
|
|
2067
|
+
});
|
|
2027
2068
|
// Measure real KV bytes/token for a model - starts a `calibrate` job. Needs a
|
|
2028
2069
|
// runtime + GPU; refused with a helpful error otherwise.
|
|
2029
2070
|
export const BrainCalibrateRequestSchema = z.object({
|
|
@@ -2088,6 +2129,8 @@ export const BrainHfSearchResultSchema = z
|
|
|
2088
2129
|
downloads: z.number().default(0),
|
|
2089
2130
|
likes: z.number().default(0),
|
|
2090
2131
|
gated: z.boolean().default(false),
|
|
2132
|
+
// A short, source-authored excerpt extracted from the repository's model card.
|
|
2133
|
+
summary: z.string().nullable().optional(),
|
|
2091
2134
|
// True when any quant of this repo is already on disk.
|
|
2092
2135
|
installed: z.boolean().default(false),
|
|
2093
2136
|
})
|
|
@@ -2099,8 +2142,23 @@ export const BrainRepoQuantSchema = z
|
|
|
2099
2142
|
size: z.string().default(""),
|
|
2100
2143
|
sizeBytes: z.number().default(0),
|
|
2101
2144
|
files: z.number().default(0),
|
|
2145
|
+
fileNames: z.array(z.string()).optional(),
|
|
2102
2146
|
// True when this specific quant is already on disk.
|
|
2103
2147
|
installed: z.boolean().default(false),
|
|
2148
|
+
// The installed model's stable id, when this quant is already on disk.
|
|
2149
|
+
// Optional so daemons predating quant deletion remain compatible.
|
|
2150
|
+
modelId: z.string().nullable().optional(),
|
|
2151
|
+
// The shared projector detected in this repository. It is repeated on
|
|
2152
|
+
// each quant row because the quant picker is the unit that discovers and
|
|
2153
|
+
// presents a downloadable Hugging Face bundle.
|
|
2154
|
+
projector: z
|
|
2155
|
+
.object({
|
|
2156
|
+
file: z.string(),
|
|
2157
|
+
sizeBytes: z.number(),
|
|
2158
|
+
// COMPAT(brainDiscoveredProjectorState): added in v0.8.7, remove after 2027-02-11.
|
|
2159
|
+
installed: z.boolean().optional(),
|
|
2160
|
+
})
|
|
2161
|
+
.optional(),
|
|
2104
2162
|
})
|
|
2105
2163
|
.passthrough();
|
|
2106
2164
|
// Search Hugging Face for GGUF models - `otto-brain search <query>`.
|
|
@@ -2137,6 +2195,8 @@ export const BrainModelsAddRequestSchema = z.object({
|
|
|
2137
2195
|
type: z.literal("brain.models.add.request"),
|
|
2138
2196
|
repo: z.string(),
|
|
2139
2197
|
quant: z.string(),
|
|
2198
|
+
// COMPAT(brainDiscoveredBundleComponents): added in v0.8.7, remove after 2027-02-11.
|
|
2199
|
+
components: z.array(z.string()).optional(),
|
|
2140
2200
|
requestId: z.string(),
|
|
2141
2201
|
});
|
|
2142
2202
|
export const BrainModelsAddResponseSchema = z.object({
|
|
@@ -2167,6 +2227,7 @@ export const BrainProfileSchema = z
|
|
|
2167
2227
|
flashAttention: z.boolean().default(true),
|
|
2168
2228
|
gpuLayers: z.number().default(0),
|
|
2169
2229
|
vision: z.boolean().default(false),
|
|
2230
|
+
enabledComponents: z.array(z.string()).optional(),
|
|
2170
2231
|
reasoningBudget: z.number().default(0),
|
|
2171
2232
|
parallelSlots: z.number().default(1),
|
|
2172
2233
|
})
|
|
@@ -2213,6 +2274,9 @@ export const BrainBudgetSchema = z
|
|
|
2213
2274
|
.object({
|
|
2214
2275
|
weightsBytes: z.number().default(0),
|
|
2215
2276
|
mmprojBytes: z.number().default(0),
|
|
2277
|
+
componentBytes: z.number().optional(),
|
|
2278
|
+
drafterKvBytes: z.number().optional(),
|
|
2279
|
+
imageProcessingBytes: z.number().optional(),
|
|
2216
2280
|
kvBytes: z.number().default(0),
|
|
2217
2281
|
overheadBytes: z.number().default(0),
|
|
2218
2282
|
totalBytes: z.number().default(0),
|
|
@@ -2258,6 +2322,22 @@ export const BrainInventoryModelSchema = z
|
|
|
2258
2322
|
blockCount: z.number().nullable().default(null),
|
|
2259
2323
|
headCountKv: z.number().nullable().default(null),
|
|
2260
2324
|
hasProjector: z.boolean().default(false),
|
|
2325
|
+
components: z
|
|
2326
|
+
.array(z.object({
|
|
2327
|
+
id: z.string(),
|
|
2328
|
+
label: z.string().default(""),
|
|
2329
|
+
description: z.string().default(""),
|
|
2330
|
+
role: z.string().default(""),
|
|
2331
|
+
bytes: z.number().default(0),
|
|
2332
|
+
available: z.boolean().default(false),
|
|
2333
|
+
unavailableReason: z.string().optional(),
|
|
2334
|
+
required: z.boolean().default(false),
|
|
2335
|
+
defaultDownload: z.boolean().default(false),
|
|
2336
|
+
defaultLoad: z.boolean().default(false),
|
|
2337
|
+
minRuntimeBuild: z.number().optional(),
|
|
2338
|
+
}))
|
|
2339
|
+
.nullable()
|
|
2340
|
+
.optional(),
|
|
2261
2341
|
reasoning: z.boolean().default(false),
|
|
2262
2342
|
mtp: z.boolean().default(false),
|
|
2263
2343
|
distilled: z.boolean().default(false),
|
|
@@ -2403,6 +2483,21 @@ export const BrainModelDeleteResponseSchema = z.object({
|
|
|
2403
2483
|
requestId: z.string(),
|
|
2404
2484
|
}),
|
|
2405
2485
|
});
|
|
2486
|
+
export const BrainModelComponentDeleteRequestSchema = z.object({
|
|
2487
|
+
type: z.literal("brain.model.component.delete.request"),
|
|
2488
|
+
modelId: z.string(),
|
|
2489
|
+
componentId: z.string(),
|
|
2490
|
+
requestId: z.string(),
|
|
2491
|
+
});
|
|
2492
|
+
export const BrainModelComponentDeleteResponseSchema = z.object({
|
|
2493
|
+
type: z.literal("brain.model.component.delete.response"),
|
|
2494
|
+
payload: z.object({
|
|
2495
|
+
deleted: z.array(z.string()).default([]),
|
|
2496
|
+
freedBytes: z.number().default(0),
|
|
2497
|
+
error: z.string().nullable(),
|
|
2498
|
+
requestId: z.string(),
|
|
2499
|
+
}),
|
|
2500
|
+
});
|
|
2406
2501
|
// Rename a model's display name. The brain rejects a collision with another
|
|
2407
2502
|
// model's current id/displayName: /v1/models keys its id on displayName, and
|
|
2408
2503
|
// both the completion path and defaultModel/switchTo resolve a model by
|
|
@@ -3821,6 +3916,7 @@ export const ProjectKnowledgeKindSchema = z.enum([
|
|
|
3821
3916
|
"constraint",
|
|
3822
3917
|
"requirement",
|
|
3823
3918
|
"architecture",
|
|
3919
|
+
"finding",
|
|
3824
3920
|
"project",
|
|
3825
3921
|
"reference",
|
|
3826
3922
|
]);
|
|
@@ -3873,10 +3969,13 @@ export const ProjectKnowledgeRecordSchema = z.object({
|
|
|
3873
3969
|
.optional(),
|
|
3874
3970
|
path: z.string().optional(),
|
|
3875
3971
|
});
|
|
3876
|
-
|
|
3972
|
+
/** Review health, not a persisted project-knowledge finding record. */
|
|
3973
|
+
export const ProjectKnowledgeHealthSchema = z.object({
|
|
3877
3974
|
kind: z.enum(["stale", "overlapping_tags", "overlapping_statement"]),
|
|
3878
3975
|
recordId: z.string(),
|
|
3879
3976
|
relatedRecordId: z.string().optional(),
|
|
3977
|
+
tagOverlap: z.enum(["complete", "partial"]).optional(),
|
|
3978
|
+
sharedTags: z.array(z.string()).optional(),
|
|
3880
3979
|
message: z.string(),
|
|
3881
3980
|
});
|
|
3882
3981
|
export const ProjectKnowledgeRootPageSchema = z.object({
|
|
@@ -3896,7 +3995,7 @@ export const ProjectKnowledgeListResponseMessageSchema = z.object({
|
|
|
3896
3995
|
requestId: z.string(),
|
|
3897
3996
|
records: z.array(ProjectKnowledgeRecordSchema),
|
|
3898
3997
|
rootPages: z.array(ProjectKnowledgeRootPageSchema).optional(),
|
|
3899
|
-
findings: z.array(
|
|
3998
|
+
findings: z.array(ProjectKnowledgeHealthSchema),
|
|
3900
3999
|
brief: z.string(),
|
|
3901
4000
|
briefTokens: z.number(),
|
|
3902
4001
|
includedIds: z.array(z.string()),
|
|
@@ -6190,6 +6289,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
6190
6289
|
BrainRuntimeListRequestSchema,
|
|
6191
6290
|
BrainModelsPullRequestSchema,
|
|
6192
6291
|
BrainRuntimeInstallRequestSchema,
|
|
6292
|
+
BrainRuntimeRemoveRequestSchema,
|
|
6193
6293
|
BrainCalibrateRequestSchema,
|
|
6194
6294
|
BrainSweepRequestSchema,
|
|
6195
6295
|
BrainBenchRequestSchema,
|
|
@@ -6205,6 +6305,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
6205
6305
|
BrainModelLoadRequestSchema,
|
|
6206
6306
|
BrainModelUnloadRequestSchema,
|
|
6207
6307
|
BrainModelDeleteRequestSchema,
|
|
6308
|
+
BrainModelComponentDeleteRequestSchema,
|
|
6208
6309
|
BrainModelRenameRequestSchema,
|
|
6209
6310
|
BrainModelRenameResetRequestSchema,
|
|
6210
6311
|
BrainLogsTailRequestSchema,
|
|
@@ -7344,6 +7445,9 @@ const WorkspaceGitRuntimePayloadSchema = z
|
|
|
7344
7445
|
remoteUrl: z.string().nullable().optional(),
|
|
7345
7446
|
isOttoOwnedWorktree: z.boolean().optional(),
|
|
7346
7447
|
isDirty: z.boolean().nullable().optional(),
|
|
7448
|
+
// COMPAT(workspaceGitBaseRef): added in v0.8.7, remove after 2027-02-10.
|
|
7449
|
+
// The branch-history label is useful only when its comparison base is explicit.
|
|
7450
|
+
baseRef: z.string().nullable().optional(),
|
|
7347
7451
|
aheadBehind: z
|
|
7348
7452
|
.object({
|
|
7349
7453
|
ahead: z.number(),
|
|
@@ -7441,6 +7545,16 @@ export const WorkspaceDescriptorPayloadSchema = z
|
|
|
7441
7545
|
})
|
|
7442
7546
|
.nullable()
|
|
7443
7547
|
.optional(),
|
|
7548
|
+
// COMPAT(workspaceWorkingTreeDiffStat): added in v0.8.7, remove after 2027-02-10.
|
|
7549
|
+
// `diffStat` is retained for older clients and means branch-versus-base.
|
|
7550
|
+
// This field is only the working tree relative to HEAD, so it clears on commit.
|
|
7551
|
+
workingTreeDiffStat: z
|
|
7552
|
+
.object({
|
|
7553
|
+
additions: z.number(),
|
|
7554
|
+
deletions: z.number(),
|
|
7555
|
+
})
|
|
7556
|
+
.nullable()
|
|
7557
|
+
.optional(),
|
|
7444
7558
|
scripts: z.array(WorkspaceScriptPayloadSchema).default([]),
|
|
7445
7559
|
gitRuntime: WorkspaceGitRuntimePayloadSchema,
|
|
7446
7560
|
githubRuntime: WorkspaceGitHubRuntimePayloadSchema,
|
|
@@ -10808,6 +10922,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
10808
10922
|
BrainRuntimeListResponseSchema,
|
|
10809
10923
|
BrainModelsPullResponseSchema,
|
|
10810
10924
|
BrainRuntimeInstallResponseSchema,
|
|
10925
|
+
BrainRuntimeRemoveResponseSchema,
|
|
10811
10926
|
BrainCalibrateResponseSchema,
|
|
10812
10927
|
BrainSweepResponseSchema,
|
|
10813
10928
|
BrainBenchResponseSchema,
|
|
@@ -10823,6 +10938,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
10823
10938
|
BrainModelLoadResponseSchema,
|
|
10824
10939
|
BrainModelUnloadResponseSchema,
|
|
10825
10940
|
BrainModelDeleteResponseSchema,
|
|
10941
|
+
BrainModelComponentDeleteResponseSchema,
|
|
10826
10942
|
BrainModelRenameResponseSchema,
|
|
10827
10943
|
BrainModelRenameResetResponseSchema,
|
|
10828
10944
|
BrainLogsTailResponseSchema,
|