@otto-code/protocol 0.8.17 → 0.8.18
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/agent-types.d.ts +8 -0
- package/dist/daemon-config.d.ts +12 -0
- package/dist/daemon-config.js +14 -0
- package/dist/generated/validation/ws-outbound.aot.js +63449 -62917
- package/dist/messages.d.ts +651 -354
- package/dist/messages.js +63 -6
- package/dist/project-knowledge.d.ts +126 -0
- package/dist/project-knowledge.js +89 -0
- package/dist/provider-config.d.ts +71 -25
- package/dist/provider-config.js +166 -19
- package/dist/validation/ws-outbound-schema-metadata.d.ts +131 -44
- package/package.json +1 -1
package/dist/messages.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { MutableAgentBehaviorsConfigSchema, MutableLspConfigSchema, MutableDotnetSolutionConfigSchema, MutableGitHostingConfigSchema, MutableKanbanConfigSchema, MutableAgentPersonalitiesConfigSchema, MutableAgentPersonalitiesConfigPatchSchema, MutableAgentTeamsConfigSchema, MutableAgentTeamsConfigPatchSchema, MutableBrainConfigSchema, MutableBrainConfigPatchSchema, MutableGitFetchConfigSchema, DEFAULT_MUTABLE_BRAIN_CONFIG, } from "./daemon-config.js";
|
|
2
|
+
import { MutableAgentBehaviorsConfigSchema, MutableLspConfigSchema, MutableDotnetSolutionConfigSchema, MutableGitHostingConfigSchema, MutableKanbanConfigSchema, MutableProjectKnowledgeConfigSchema, MutableAgentPersonalitiesConfigSchema, MutableAgentPersonalitiesConfigPatchSchema, MutableAgentTeamsConfigSchema, MutableAgentTeamsConfigPatchSchema, MutableBrainConfigSchema, MutableBrainConfigPatchSchema, MutableGitFetchConfigSchema, DEFAULT_MUTABLE_BRAIN_CONFIG, } from "./daemon-config.js";
|
|
3
3
|
import { VisualizerVoiceCuesGenerateRequestSchema, VisualizerVoiceCuesGenerateResponseSchema, AgentProfileSpinnerSchema, AgentPersonalityVoiceSchema, AgentPersonalityVoiceCuesSchema, AgentPersonalitiesGetStatsRequestSchema, AgentPersonalitiesGenerateProfileRequestSchema, AgentPersonalitiesGetStatsResponseSchema, AgentPersonalitiesGenerateProfileResponseSchema, AgentProfileStatsRequestSchema, AgentProfileStatsResponseSchema, AgentProfileGeneratePromptRequestSchema, AgentProfileGeneratePromptResponseSchema, AgentProfileGenerateVoiceCuesRequestSchema, AgentProfileGenerateVoiceCuesResponseSchema, PersonalityMemoryListRequestMessageSchema, PersonalityMemoryListResponseMessageSchema, PersonalityMemoryUpdateRequestMessageSchema, PersonalityMemoryUpdateResponseMessageSchema, PersonalityMemoryTransferRequestMessageSchema, PersonalityMemoryTransferResponseMessageSchema, PersonalityMemoryStatsRequestMessageSchema, PersonalityMemoryStatsResponseMessageSchema, ProfileMemoryListRequestMessageSchema, ProfileMemoryListResponseMessageSchema, ProfileMemoryUpdateRequestMessageSchema, ProfileMemoryUpdateResponseMessageSchema, ProfileMemoryTransferRequestMessageSchema, ProfileMemoryTransferResponseMessageSchema, ProfileMemoryStatsRequestMessageSchema, ProfileMemoryStatsResponseMessageSchema, } from "./personality-schemas.js";
|
|
4
4
|
import { TerminalCompatibilityDiagnosticRequestSchema, TerminalCompatibilityDiagnosticResponseSchema, } from "./terminal-compatibility.js";
|
|
5
5
|
import { HostingPrAttachmentSchema, HostingIssueAttachmentSchema, HostingSearchRequestSchema, HostingAuthStatusRequestSchema, HostingListRepositoriesRequestSchema, HostingListOwnersRequestSchema, HostingListRepositoriesResponseSchema, HostingListOwnersResponseSchema, HostingAuthStatusResponseSchema, GitHostingCapabilitiesSchema, GitHostingProviderIdWireSchema, } from "./git-hosting.js";
|
|
@@ -14,7 +14,7 @@ import { FileEolSchema, FileCreateRequestSchema, FileDeleteRequestSchema, FileRe
|
|
|
14
14
|
import { FileRefineRequestSchema, FileRefineResponseSchema } from "./refine.js";
|
|
15
15
|
import { MutableSpeechConfigSchema, SpeechSettingsGetOptionsRequestSchema, SpeechTtsPreviewRequestSchema, SpeechTtsSpeakRequestSchema, SpeechTtsSpeakCancelRequestSchema, SpeechSettingsGetOptionsResponseSchema, SpeechTtsPreviewResponseSchema, SpeechTtsSpeakResponseSchema, SpeechTtsSpeakCancelResponseSchema, } from "./speech.js";
|
|
16
16
|
import { ProjectLinksListRequestSchema, ProjectLinksSetRequestSchema, ProjectLinksUnsetRequestSchema, ProjectLinksListResponseSchema, ProjectLinksSetResponseSchema, ProjectLinksUnsetResponseSchema, ProjectLinksChangedSchema, } from "./project-links.js";
|
|
17
|
-
import { ProjectKnowledgeListRequestMessageSchema, ProjectKnowledgeListResponseMessageSchema, ProjectKnowledgeGetRequestMessageSchema, ProjectKnowledgeGetResponseMessageSchema, ProjectKnowledgeCreateRequestMessageSchema, ProjectKnowledgeCreateResponseMessageSchema, ProjectKnowledgeApplyRequestMessageSchema, ProjectKnowledgeApplyResponseMessageSchema, ProjectKnowledgeStatusRequestMessageSchema, ProjectKnowledgeStatusResponseMessageSchema, ProjectKnowledgeProjectApplyRequestMessageSchema, ProjectKnowledgeProjectApplyResponseMessageSchema, ProjectKnowledgeReferenceApplyRequestMessageSchema, ProjectKnowledgeReferenceApplyResponseMessageSchema, ProjectKnowledgeRootApplyRequestMessageSchema, ProjectKnowledgeRootApplyResponseMessageSchema, ProjectKnowledgeDeleteRequestMessageSchema, ProjectKnowledgeDeleteResponseMessageSchema, } from "./project-knowledge.js";
|
|
17
|
+
import { ProjectKnowledgeListRequestMessageSchema, ProjectKnowledgeListResponseMessageSchema, ProjectKnowledgeGetRequestMessageSchema, ProjectKnowledgeGetResponseMessageSchema, ProjectKnowledgeCreateRequestMessageSchema, ProjectKnowledgeCreateResponseMessageSchema, ProjectKnowledgeApplyRequestMessageSchema, ProjectKnowledgeApplyResponseMessageSchema, ProjectKnowledgeStatusRequestMessageSchema, ProjectKnowledgeStatusResponseMessageSchema, ProjectKnowledgeProjectApplyRequestMessageSchema, ProjectKnowledgeProjectApplyResponseMessageSchema, ProjectKnowledgeReferenceApplyRequestMessageSchema, ProjectKnowledgeReferenceApplyResponseMessageSchema, ProjectKnowledgeRootApplyRequestMessageSchema, ProjectKnowledgeRootApplyResponseMessageSchema, ProjectKnowledgeDeleteRequestMessageSchema, ProjectKnowledgeStoreLocationValueSchema, ProjectKnowledgeStoreGetRequestMessageSchema, ProjectKnowledgeStoreGetResponseMessageSchema, ProjectKnowledgeStoreSetRequestMessageSchema, ProjectKnowledgeStoreSetResponseMessageSchema, ProjectKnowledgeDeleteResponseMessageSchema, } from "./project-knowledge.js";
|
|
18
18
|
import { CheckoutGitGetOperationLogRequestSchema, CheckoutGitGetOperationLogResponseSchema, CheckoutGitLogAppendedNotificationSchema, CheckoutGitCommitRequestSchema, CheckoutGitCommitAgentRequestSchema, CheckoutGitRollbackRequestSchema, CheckoutGitCommitResponseSchema, CheckoutGitCommitAgentResponseSchema, CheckoutGitRollbackResponseSchema, GitFileHistoryEntrySchema, GitBlameLineSchema, GitBlameCommitSchema, } from "./git-operations.js";
|
|
19
19
|
import { LspServersListRequestSchema, LspServerStopRequestSchema, LspActivityChangedStatusPayloadSchema, LspDiagnosticsChangedStatusPayloadSchema, LspServersListResponseSchema, LspServerStopResponseSchema, CodeListFilesRequestSchema, CodeSymbolsRequestSchema, CodeOutlineRequestSchema, CodeDefinitionRequestSchema, CodeDocumentSyncRequestSchema, CodeDocumentCloseRequestSchema, CodeHoverRequestSchema, CodeReferencesRequestSchema, CodeRenamePreviewRequestSchema, CodeRenameApplyRequestSchema, CodeRenameUndoRequestSchema, CodeSolutionListRequestSchema, CodeSolutionGetTreeRequestSchema, CodeSolutionLoadProjectRequestSchema, CodeListFilesResponseSchema, CodeSymbolsResponseSchema, CodeDefinitionResponseSchema, CodeDocumentSyncResponseSchema, CodeDocumentCloseResponseSchema, CodeHoverResponseSchema, CodeReferencesResponseSchema, CodeRenamePreviewResponseSchema, CodeRenameUndoResponseSchema, CodeRenameApplyResponseSchema, CodeSolutionListResponseSchema, CodeSolutionGetTreeResponseSchema, CodeSolutionLoadProjectResponseSchema, CodeOutlineResponseSchema, } from "./code-intelligence.js";
|
|
20
20
|
import { CommunicationsGetOverviewRequestSchema, CommunicationsGetOverviewResponseSchema, CommunicationsInboxGetHomeRequestSchema, CommunicationsInboxGetHomeResponseSchema, CommunicationsInboxSearchRequestSchema, CommunicationsInboxSearchResponseSchema, CommunicationsInboxSetFavoriteRequestSchema, CommunicationsInboxSetFavoriteResponseSchema, CommunicationsInboxNotificationsAcknowledgeRequestSchema, CommunicationsInboxNotificationsAcknowledgeResponseSchema, CommunicationsInboxGetPresenceRequestSchema, CommunicationsInboxGetPresenceResponseSchema, CommunicationsInboxPresenceChangedNotificationSchema, CommunicationsInboxSetPresenceRequestSchema, CommunicationsInboxSetPresenceResponseSchema, CommunicationsInboxSetEnabledRequestSchema, CommunicationsInboxSetEnabledResponseSchema, CommunicationsInboxGetMessagesRequestSchema, CommunicationsInboxGetMessagesResponseSchema, CommunicationsInboxSendMessageRequestSchema, CommunicationsInboxSendMessageResponseSchema, CommunicationsRoomGetRequestSchema, CommunicationsRoomGetResponseSchema, CommunicationsRoomThreadGetRequestSchema, CommunicationsRoomThreadGetResponseSchema, CommunicationsRoomMessageSendRequestSchema, CommunicationsRoomMessageSendResponseSchema, CommunicationsRoomReactionSetRequestSchema, CommunicationsRoomReactionSetResponseSchema, } from "./communications.js";
|
|
@@ -30,7 +30,7 @@ import { CLIENT_CAPS } from "./client-capabilities.js";
|
|
|
30
30
|
import { AGENT_LIFECYCLE_STATUSES } from "./agent-lifecycle.js";
|
|
31
31
|
import { MAX_EXPLICIT_AGENT_TITLE_CHARS } from "./agent-title-limits.js";
|
|
32
32
|
import { AgentProviderSchema } from "./provider-manifest.js";
|
|
33
|
-
import { ConnectorConfigSchema, McpServerConfigSchema,
|
|
33
|
+
import { ConnectorConfigSchema, McpServerConfigSchema, STALL_GUARD_DEFAULT_THRESHOLD, } from "./provider-config.js";
|
|
34
34
|
import { TOOL_CALL_ICON_NAMES } from "./agent-types.js";
|
|
35
35
|
import { ChatCreateRequestSchema, ChatListRequestSchema, ChatInspectRequestSchema, ChatDeleteRequestSchema, ChatPostRequestSchema, ChatReadRequestSchema, ChatWaitRequestSchema, ChatCreateResponseSchema, ChatListResponseSchema, ChatInspectResponseSchema, ChatDeleteResponseSchema, ChatPostResponseSchema, ChatReadResponseSchema, ChatWaitResponseSchema, } from "./chat/rpc-schemas.js";
|
|
36
36
|
import { ScheduleCreateRequestSchema, ScheduleListRequestSchema, ScheduleInspectRequestSchema, ScheduleLogsRequestSchema, SchedulePauseRequestSchema, ScheduleResumeRequestSchema, ScheduleDeleteRequestSchema, ScheduleRunOnceRequestSchema, ScheduleUpdateRequestSchema, ScheduleCreateResponseSchema, ScheduleListResponseSchema, ScheduleInspectResponseSchema, ScheduleLogsResponseSchema, SchedulePauseResponseSchema, ScheduleResumeResponseSchema, ScheduleDeleteResponseSchema, ScheduleRunOnceResponseSchema, ScheduleUpdateResponseSchema, } from "./schedule/rpc-schemas.js";
|
|
@@ -55,7 +55,12 @@ const MutableDaemonProviderConfigSchema = z
|
|
|
55
55
|
.object({
|
|
56
56
|
enabled: z.boolean().optional(),
|
|
57
57
|
additionalModels: z.array(MutableDaemonProviderModelSchema).optional(),
|
|
58
|
-
|
|
58
|
+
// COMPAT(ottoToolGroupsV2): added in v0.8.20. Legacy projection plus the
|
|
59
|
+
// authoritative v2 key; both are string[] rather than an enum so an older
|
|
60
|
+
// peer drops unknown group names instead of failing the whole config
|
|
61
|
+
// message. Read through resolveStoredOttoToolGroups.
|
|
62
|
+
ottoToolGroups: z.array(z.string().min(1)).optional(),
|
|
63
|
+
ottoToolGroupsV2: z.array(z.string().min(1)).optional(),
|
|
59
64
|
})
|
|
60
65
|
.passthrough();
|
|
61
66
|
const MutableStructuredGenerationProviderSchema = z
|
|
@@ -151,6 +156,15 @@ export const ModelTierOverrideSchema = z
|
|
|
151
156
|
tier: ModelTierSchema,
|
|
152
157
|
})
|
|
153
158
|
.passthrough();
|
|
159
|
+
// A host-owned model-picker visibility choice. Stored as an array so a patch
|
|
160
|
+
// replaces it wholesale and removing the final hidden-model entry sticks.
|
|
161
|
+
export const ModelVisibilityOverrideSchema = z
|
|
162
|
+
.object({
|
|
163
|
+
provider: z.string().min(1),
|
|
164
|
+
modelId: z.string().min(1),
|
|
165
|
+
visible: z.boolean(),
|
|
166
|
+
})
|
|
167
|
+
.passthrough();
|
|
154
168
|
// A remembered provider endpoint: a base URL together with the credential it
|
|
155
169
|
// was saved with, so pointing a provider back at a previous endpoint is one
|
|
156
170
|
// pick instead of re-typing the key. Entries are scoped by the connection
|
|
@@ -185,7 +199,14 @@ export const MutableDaemonConfigSchema = z
|
|
|
185
199
|
// undefined = all groups enabled (mirrors openai-compat's per-provider
|
|
186
200
|
// ottoToolGroups semantics). An empty array = no Otto tools. Read by the
|
|
187
201
|
// MCP catalog gating (WP-A).
|
|
188
|
-
|
|
202
|
+
//
|
|
203
|
+
// COMPAT(ottoToolGroupsV2): added in v0.8.20. `toolGroups` is the legacy
|
|
204
|
+
// projection kept for older peers, `toolGroupsV2` is authoritative, and
|
|
205
|
+
// both are string[] rather than an enum so an older peer drops group
|
|
206
|
+
// names it does not know instead of failing the whole config message.
|
|
207
|
+
// Read through resolveStoredOttoToolGroups, never directly.
|
|
208
|
+
toolGroups: z.array(z.string().min(1)).optional(),
|
|
209
|
+
toolGroupsV2: z.array(z.string().min(1)).optional(),
|
|
189
210
|
})
|
|
190
211
|
.passthrough(),
|
|
191
212
|
// Defaults off, matching the daemon's own resolution - browser tools are an
|
|
@@ -252,6 +273,9 @@ export const MutableDaemonConfigSchema = z
|
|
|
252
273
|
// Gated by the modelTierOverrides feature; defaults empty so a new client
|
|
253
274
|
// parsing an old daemon's config still sees a well-formed array.
|
|
254
275
|
modelTierOverrides: z.array(ModelTierOverrideSchema).default([]),
|
|
276
|
+
// Per-host model-picker visibility. Gated by modelVisibilityOverrides;
|
|
277
|
+
// absent on an old host means every selectable model remains visible.
|
|
278
|
+
modelVisibilityOverrides: z.array(ModelVisibilityOverrideSchema).default([]),
|
|
255
279
|
// Per-host remembered provider endpoints (base URL + credential), pooled by
|
|
256
280
|
// env-var family. Gated by the savedProviderEndpoints feature; defaults
|
|
257
281
|
// empty so a new client parsing an old daemon's config still sees a
|
|
@@ -287,6 +311,11 @@ export const MutableDaemonConfigSchema = z
|
|
|
287
311
|
// Kanban board surface credentials (provider tokens). Gated by
|
|
288
312
|
// server_info features.kanbanBoard; absent on older daemons.
|
|
289
313
|
kanban: MutableKanbanConfigSchema.optional(),
|
|
314
|
+
// Host-wide default for where a project's Knowledge store lives. Gated by
|
|
315
|
+
// server_info features.projectKnowledgeStoreLocation. Optional rather than
|
|
316
|
+
// defaulted, matching `kanban`: absent reads as the historical repository
|
|
317
|
+
// location, which is exactly what an old daemon does.
|
|
318
|
+
projectKnowledge: MutableProjectKnowledgeConfigSchema.optional(),
|
|
290
319
|
agentProfiles: z.array(AgentProfileSchema).optional(),
|
|
291
320
|
})
|
|
292
321
|
.passthrough();
|
|
@@ -326,6 +355,9 @@ export const MutableDaemonConfigPatchSchema = z
|
|
|
326
355
|
speech: MutableSpeechConfigSchema.optional(),
|
|
327
356
|
// Gated by server_info features.gitHostingProviders; patches deep-merge.
|
|
328
357
|
gitHosting: MutableGitHostingConfigSchema.optional(),
|
|
358
|
+
// Gated by server_info features.projectKnowledgeStoreLocation; patches
|
|
359
|
+
// deep-merge.
|
|
360
|
+
projectKnowledge: MutableProjectKnowledgeConfigSchema.partial().optional(),
|
|
329
361
|
// Gated by server_info features.agentPersonalities. A patch replaces the
|
|
330
362
|
// full roster (read-modify-write the array), matching how terminalProfiles
|
|
331
363
|
// and metadataGeneration.providers patch.
|
|
@@ -337,6 +369,9 @@ export const MutableDaemonConfigPatchSchema = z
|
|
|
337
369
|
// Gated by server_info features.modelTierOverrides. Replaces the full array
|
|
338
370
|
// (read-modify-write), so removing an entry clears that model's tag.
|
|
339
371
|
modelTierOverrides: z.array(ModelTierOverrideSchema).optional(),
|
|
372
|
+
// Gated by server_info features.modelVisibilityOverrides. Replaces the
|
|
373
|
+
// full array so checking the last hidden model clears the stored policy.
|
|
374
|
+
modelVisibilityOverrides: z.array(ModelVisibilityOverrideSchema).optional(),
|
|
340
375
|
// Gated by server_info features.savedProviderEndpoints. Replaces the full
|
|
341
376
|
// array (read-modify-write), so forgetting an endpoint drops it from disk.
|
|
342
377
|
savedProviderEndpoints: z.array(SavedProviderEndpointSchema).optional(),
|
|
@@ -440,6 +475,9 @@ const AgentModelDefinitionSchema = z.object({
|
|
|
440
475
|
// Daemon-stamped capability tier (deep/standard/fast). Optional: absent on old
|
|
441
476
|
// daemons and on models neither classified nor user-tagged.
|
|
442
477
|
tier: ModelTierSchema.optional(),
|
|
478
|
+
// Host-owned model-picker visibility. Optional for backward compatibility;
|
|
479
|
+
// absent means visible.
|
|
480
|
+
isVisible: z.boolean().optional(),
|
|
443
481
|
// False when the model can't run the provider's "auto" permission mode.
|
|
444
482
|
// Optional: absent on old daemons and when supported/unknown.
|
|
445
483
|
supportsAutoMode: z.boolean().optional(),
|
|
@@ -786,6 +824,7 @@ export const AgentTimelineItemPayloadSchema = z.union([
|
|
|
786
824
|
z.object({
|
|
787
825
|
type: z.literal("error"),
|
|
788
826
|
message: z.string(),
|
|
827
|
+
details: z.array(z.string()).optional(),
|
|
789
828
|
}),
|
|
790
829
|
z.object({
|
|
791
830
|
type: z.literal("compaction"),
|
|
@@ -3350,6 +3389,8 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
3350
3389
|
ProjectKnowledgeReferenceApplyRequestMessageSchema,
|
|
3351
3390
|
ProjectKnowledgeRootApplyRequestMessageSchema,
|
|
3352
3391
|
ProjectKnowledgeDeleteRequestMessageSchema,
|
|
3392
|
+
ProjectKnowledgeStoreGetRequestMessageSchema,
|
|
3393
|
+
ProjectKnowledgeStoreSetRequestMessageSchema,
|
|
3353
3394
|
ContextEdgeConvertRequestMessageSchema,
|
|
3354
3395
|
ContextFindingsFixRequestMessageSchema,
|
|
3355
3396
|
PersonalityMemoryListRequestMessageSchema,
|
|
@@ -3926,6 +3967,11 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
3926
3967
|
personalityMemory: z.boolean().optional(),
|
|
3927
3968
|
// COMPAT(projectKnowledge): added in v0.8.5, drop the gate when daemon floor >= v0.8.5.
|
|
3928
3969
|
projectKnowledge: z.boolean().optional(),
|
|
3970
|
+
// COMPAT(projectKnowledgeStoreLocation): added in v0.8.18, drop the gate
|
|
3971
|
+
// when daemon floor >= v0.8.18. A project's Knowledge store can live
|
|
3972
|
+
// host-local instead of in the repository: the project.knowledge.store.*
|
|
3973
|
+
// RPCs, the per-project override, and the host default setting.
|
|
3974
|
+
projectKnowledgeStoreLocation: z.boolean().optional(),
|
|
3929
3975
|
// Script discovery - the daemon scans a workspace for the Scripts its
|
|
3930
3976
|
// project files already declare (package.json scripts, and later
|
|
3931
3977
|
// Makefile targets, .NET launch profiles) and serves them from
|
|
@@ -4034,6 +4080,8 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
4034
4080
|
agentTeams: z.boolean().optional(),
|
|
4035
4081
|
// COMPAT(modelTierOverrides): added in v0.5.2, drop the gate when daemon floor >= v0.5.2.
|
|
4036
4082
|
modelTierOverrides: z.boolean().optional(),
|
|
4083
|
+
// COMPAT(modelVisibilityOverrides): added in v0.8.18, drop the gate when daemon floor >= v0.8.18.
|
|
4084
|
+
modelVisibilityOverrides: z.boolean().optional(),
|
|
4037
4085
|
// COMPAT(savedProviderEndpoints): added in v0.6.5, drop the gate when daemon floor >= v0.6.5.
|
|
4038
4086
|
savedProviderEndpoints: z.boolean().optional(),
|
|
4039
4087
|
// COMPAT(agentOrchestration): added in v0.5.3, drop the gate when daemon floor >= v0.5.3.
|
|
@@ -4744,6 +4792,13 @@ export const WorkspaceProjectDescriptorPayloadSchema = z.object({
|
|
|
4744
4792
|
// COMPAT(projectKanbanTarget): added in v0.8.11, drop the optional gate when
|
|
4745
4793
|
// floor >= v0.8.11.
|
|
4746
4794
|
projectKanban: ProjectKanbanTargetSchema.nullable().optional(),
|
|
4795
|
+
// The project's Knowledge store override. Rides the project channel for the
|
|
4796
|
+
// same reason the Kanban target does: Project Settings must show it for a
|
|
4797
|
+
// project with no active workspaces, where no session-scoped RPC applies.
|
|
4798
|
+
// Null means "inherit the host default".
|
|
4799
|
+
// COMPAT(projectKnowledgeStoreLocation): added in v0.8.18, drop the optional
|
|
4800
|
+
// gate when floor >= v0.8.18.
|
|
4801
|
+
projectKnowledgeLocation: ProjectKnowledgeStoreLocationValueSchema.nullable().optional(),
|
|
4747
4802
|
// COMPAT(projectCustomIcon): added in v0.2.0, remove after 2027-01-20.
|
|
4748
4803
|
projectCustomIconRevision: z.string().nullable().optional(),
|
|
4749
4804
|
projectRootPath: z.string(),
|
|
@@ -7234,6 +7289,8 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
7234
7289
|
ProjectKnowledgeReferenceApplyResponseMessageSchema,
|
|
7235
7290
|
ProjectKnowledgeRootApplyResponseMessageSchema,
|
|
7236
7291
|
ProjectKnowledgeDeleteResponseMessageSchema,
|
|
7292
|
+
ProjectKnowledgeStoreGetResponseMessageSchema,
|
|
7293
|
+
ProjectKnowledgeStoreSetResponseMessageSchema,
|
|
7237
7294
|
ContextEdgeConvertResponseMessageSchema,
|
|
7238
7295
|
ContextFindingsFixResponseMessageSchema,
|
|
7239
7296
|
PersonalityMemoryListResponseMessageSchema,
|
|
@@ -7405,5 +7462,5 @@ export * from "./storage.js";
|
|
|
7405
7462
|
export * from "./suggested-tasks.js";
|
|
7406
7463
|
export * from "./worktree-ops.js";
|
|
7407
7464
|
export * from "./terminal-compatibility.js";
|
|
7408
|
-
export { MutableAgentBehaviorsConfigSchema, MutableLspConfigSchema, MutableDotnetSolutionConfigSchema, MutableGitHostingBitbucketCloudConfigSchema, MutableGitHostingAtlassianConfigSchema, MutableGitHostingProvidersConfigSchema, MutableGitHostingConfigSchema, MutableKanbanConfigSchema, MutableAgentPersonalitiesConfigSchema, MutableAgentPersonalitiesConfigPatchSchema, MutableAgentTeamsConfigSchema, MutableAgentTeamsConfigPatchSchema, MutableBrainTlsConfigSchema, MutableBrainRemoteConfigSchema, MutableBrainConfigSchema, MutableBrainTlsPatchSchema, MutableBrainRemotePatchSchema, MutableBrainListenPatchSchema, MutableBrainConfigPatchSchema, MutableGitFetchConfigSchema, DEFAULT_MUTABLE_BRAIN_CONFIG, DEFAULT_MUTABLE_GIT_FETCH_CONFIG, GIT_FETCH_INTERVAL_SECONDS, } from "./daemon-config.js";
|
|
7465
|
+
export { MutableAgentBehaviorsConfigSchema, MutableLspConfigSchema, MutableDotnetSolutionConfigSchema, MutableGitHostingBitbucketCloudConfigSchema, MutableGitHostingAtlassianConfigSchema, MutableGitHostingProvidersConfigSchema, MutableGitHostingConfigSchema, MutableKanbanConfigSchema, ProjectKnowledgeStoreLocationSchema, MutableProjectKnowledgeConfigSchema, MutableAgentPersonalitiesConfigSchema, MutableAgentPersonalitiesConfigPatchSchema, MutableAgentTeamsConfigSchema, MutableAgentTeamsConfigPatchSchema, MutableBrainTlsConfigSchema, MutableBrainRemoteConfigSchema, MutableBrainConfigSchema, MutableBrainTlsPatchSchema, MutableBrainRemotePatchSchema, MutableBrainListenPatchSchema, MutableBrainConfigPatchSchema, MutableGitFetchConfigSchema, DEFAULT_MUTABLE_BRAIN_CONFIG, DEFAULT_MUTABLE_GIT_FETCH_CONFIG, GIT_FETCH_INTERVAL_SECONDS, } from "./daemon-config.js";
|
|
7409
7466
|
//# sourceMappingURL=messages.js.map
|
|
@@ -16,6 +16,22 @@ export declare const ProjectKnowledgeStatusSchema: z.ZodEnum<{
|
|
|
16
16
|
proposed: "proposed";
|
|
17
17
|
confirmed: "confirmed";
|
|
18
18
|
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Where a project keeps its Knowledge store. `repository` is the historical
|
|
21
|
+
* `.otto/` directory in the working tree; `host` is a directory under the
|
|
22
|
+
* daemon's `$OTTO_HOME`, so the working tree stays clean. `null` on a project
|
|
23
|
+
* means "inherit the host default".
|
|
24
|
+
*
|
|
25
|
+
* Declared up here rather than beside the store RPCs at the bottom of the file:
|
|
26
|
+
* `messages.ts` composes it into the project descriptor, and the AOT validator
|
|
27
|
+
* generator evaluates these modules for real, so a schema referenced by another
|
|
28
|
+
* must already exist when that reference runs.
|
|
29
|
+
* COMPAT(projectKnowledgeStoreLocation): added in v0.8.18.
|
|
30
|
+
*/
|
|
31
|
+
export declare const ProjectKnowledgeStoreLocationValueSchema: z.ZodEnum<{
|
|
32
|
+
repository: "repository";
|
|
33
|
+
host: "host";
|
|
34
|
+
}>;
|
|
19
35
|
export declare const ProjectDeliveryStatusSchema: z.ZodEnum<{
|
|
20
36
|
reference: "reference";
|
|
21
37
|
charter: "charter";
|
|
@@ -92,6 +108,7 @@ export declare const ProjectKnowledgeRecordSchema: z.ZodObject<{
|
|
|
92
108
|
affects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
109
|
}, z.core.$strip>>>;
|
|
94
110
|
path: z.ZodOptional<z.ZodString>;
|
|
111
|
+
absolutePath: z.ZodOptional<z.ZodString>;
|
|
95
112
|
}, z.core.$strip>;
|
|
96
113
|
/** Review health, not a persisted project-knowledge finding record. */
|
|
97
114
|
export declare const ProjectKnowledgeHealthSchema: z.ZodObject<{
|
|
@@ -113,6 +130,7 @@ export declare const ProjectKnowledgeRootPageSchema: z.ZodObject<{
|
|
|
113
130
|
slug: z.ZodString;
|
|
114
131
|
title: z.ZodString;
|
|
115
132
|
path: z.ZodString;
|
|
133
|
+
absolutePath: z.ZodOptional<z.ZodString>;
|
|
116
134
|
body: z.ZodString;
|
|
117
135
|
}, z.core.$strip>;
|
|
118
136
|
export declare const ProjectKnowledgeListRequestMessageSchema: z.ZodObject<{
|
|
@@ -178,11 +196,13 @@ export declare const ProjectKnowledgeListResponseMessageSchema: z.ZodObject<{
|
|
|
178
196
|
affects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
179
197
|
}, z.core.$strip>>>;
|
|
180
198
|
path: z.ZodOptional<z.ZodString>;
|
|
199
|
+
absolutePath: z.ZodOptional<z.ZodString>;
|
|
181
200
|
}, z.core.$strip>>;
|
|
182
201
|
rootPages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
183
202
|
slug: z.ZodString;
|
|
184
203
|
title: z.ZodString;
|
|
185
204
|
path: z.ZodString;
|
|
205
|
+
absolutePath: z.ZodOptional<z.ZodString>;
|
|
186
206
|
body: z.ZodString;
|
|
187
207
|
}, z.core.$strip>>>;
|
|
188
208
|
findings: z.ZodArray<z.ZodObject<{
|
|
@@ -270,6 +290,7 @@ export declare const ProjectKnowledgeGetResponseMessageSchema: z.ZodObject<{
|
|
|
270
290
|
affects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
271
291
|
}, z.core.$strip>>>;
|
|
272
292
|
path: z.ZodOptional<z.ZodString>;
|
|
293
|
+
absolutePath: z.ZodOptional<z.ZodString>;
|
|
273
294
|
}, z.core.$strip>>;
|
|
274
295
|
}, z.core.$strip>;
|
|
275
296
|
}, z.core.$strip>;
|
|
@@ -379,6 +400,7 @@ export declare const ProjectKnowledgeCreateResponseMessageSchema: z.ZodObject<{
|
|
|
379
400
|
affects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
380
401
|
}, z.core.$strip>>>;
|
|
381
402
|
path: z.ZodOptional<z.ZodString>;
|
|
403
|
+
absolutePath: z.ZodOptional<z.ZodString>;
|
|
382
404
|
}, z.core.$strip>;
|
|
383
405
|
}, z.core.$strip>;
|
|
384
406
|
}, z.core.$strip>;
|
|
@@ -453,6 +475,7 @@ export declare const ProjectKnowledgeApplyResponseMessageSchema: z.ZodObject<{
|
|
|
453
475
|
affects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
454
476
|
}, z.core.$strip>>>;
|
|
455
477
|
path: z.ZodOptional<z.ZodString>;
|
|
478
|
+
absolutePath: z.ZodOptional<z.ZodString>;
|
|
456
479
|
}, z.core.$strip>>;
|
|
457
480
|
error: z.ZodOptional<z.ZodString>;
|
|
458
481
|
}, z.core.$strip>;
|
|
@@ -527,6 +550,7 @@ export declare const ProjectKnowledgeStatusResponseMessageSchema: z.ZodObject<{
|
|
|
527
550
|
affects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
528
551
|
}, z.core.$strip>>>;
|
|
529
552
|
path: z.ZodOptional<z.ZodString>;
|
|
553
|
+
absolutePath: z.ZodOptional<z.ZodString>;
|
|
530
554
|
}, z.core.$strip>>;
|
|
531
555
|
}, z.core.$strip>;
|
|
532
556
|
}, z.core.$strip>;
|
|
@@ -611,6 +635,7 @@ export declare const ProjectKnowledgeProjectApplyResponseMessageSchema: z.ZodObj
|
|
|
611
635
|
affects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
612
636
|
}, z.core.$strip>>>;
|
|
613
637
|
path: z.ZodOptional<z.ZodString>;
|
|
638
|
+
absolutePath: z.ZodOptional<z.ZodString>;
|
|
614
639
|
}, z.core.$strip>>;
|
|
615
640
|
error: z.ZodOptional<z.ZodString>;
|
|
616
641
|
}, z.core.$strip>;
|
|
@@ -689,6 +714,7 @@ export declare const ProjectKnowledgeReferenceApplyResponseMessageSchema: z.ZodO
|
|
|
689
714
|
affects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
690
715
|
}, z.core.$strip>>>;
|
|
691
716
|
path: z.ZodOptional<z.ZodString>;
|
|
717
|
+
absolutePath: z.ZodOptional<z.ZodString>;
|
|
692
718
|
}, z.core.$strip>>;
|
|
693
719
|
error: z.ZodOptional<z.ZodString>;
|
|
694
720
|
}, z.core.$strip>;
|
|
@@ -708,6 +734,7 @@ export declare const ProjectKnowledgeRootApplyResponseMessageSchema: z.ZodObject
|
|
|
708
734
|
slug: z.ZodString;
|
|
709
735
|
title: z.ZodString;
|
|
710
736
|
path: z.ZodString;
|
|
737
|
+
absolutePath: z.ZodOptional<z.ZodString>;
|
|
711
738
|
body: z.ZodString;
|
|
712
739
|
}, z.core.$strip>>;
|
|
713
740
|
}, z.core.$strip>;
|
|
@@ -737,4 +764,103 @@ export type ProjectKnowledgeProjectApplyResponseMessage = z.infer<typeof Project
|
|
|
737
764
|
export type ProjectKnowledgeReferenceApplyResponseMessage = z.infer<typeof ProjectKnowledgeReferenceApplyResponseMessageSchema>;
|
|
738
765
|
export type ProjectKnowledgeRootApplyResponseMessage = z.infer<typeof ProjectKnowledgeRootApplyResponseMessageSchema>;
|
|
739
766
|
export type ProjectKnowledgeDeleteResponseMessage = z.infer<typeof ProjectKnowledgeDeleteResponseMessageSchema>;
|
|
767
|
+
/** What the daemon resolved for a workspace, and why the client may act on it. */
|
|
768
|
+
export declare const ProjectKnowledgeStoreDescriptorSchema: z.ZodObject<{
|
|
769
|
+
location: z.ZodEnum<{
|
|
770
|
+
repository: "repository";
|
|
771
|
+
host: "host";
|
|
772
|
+
}>;
|
|
773
|
+
override: z.ZodNullable<z.ZodEnum<{
|
|
774
|
+
repository: "repository";
|
|
775
|
+
host: "host";
|
|
776
|
+
}>>;
|
|
777
|
+
hostDefault: z.ZodEnum<{
|
|
778
|
+
repository: "repository";
|
|
779
|
+
host: "host";
|
|
780
|
+
}>;
|
|
781
|
+
basePath: z.ZodString;
|
|
782
|
+
projectId: z.ZodNullable<z.ZodString>;
|
|
783
|
+
hasPages: z.ZodBoolean;
|
|
784
|
+
otherLocationHasPages: z.ZodBoolean;
|
|
785
|
+
}, z.core.$strip>;
|
|
786
|
+
/**
|
|
787
|
+
* Addressed by project or by workspace. Project Settings has a project and no
|
|
788
|
+
* open workspace; the Knowledge panel has a workspace and reaches its project
|
|
789
|
+
* through it. Both are optional on the wire and the daemon rejects neither
|
|
790
|
+
* being set, rather than forcing a caller to invent an id it does not have.
|
|
791
|
+
*/
|
|
792
|
+
export declare const ProjectKnowledgeStoreGetRequestMessageSchema: z.ZodObject<{
|
|
793
|
+
type: z.ZodLiteral<"project.knowledge.store.get.request">;
|
|
794
|
+
requestId: z.ZodString;
|
|
795
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
796
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
797
|
+
}, z.core.$strip>;
|
|
798
|
+
export declare const ProjectKnowledgeStoreGetResponseMessageSchema: z.ZodObject<{
|
|
799
|
+
type: z.ZodLiteral<"project.knowledge.store.get.response">;
|
|
800
|
+
payload: z.ZodObject<{
|
|
801
|
+
requestId: z.ZodString;
|
|
802
|
+
store: z.ZodNullable<z.ZodObject<{
|
|
803
|
+
location: z.ZodEnum<{
|
|
804
|
+
repository: "repository";
|
|
805
|
+
host: "host";
|
|
806
|
+
}>;
|
|
807
|
+
override: z.ZodNullable<z.ZodEnum<{
|
|
808
|
+
repository: "repository";
|
|
809
|
+
host: "host";
|
|
810
|
+
}>>;
|
|
811
|
+
hostDefault: z.ZodEnum<{
|
|
812
|
+
repository: "repository";
|
|
813
|
+
host: "host";
|
|
814
|
+
}>;
|
|
815
|
+
basePath: z.ZodString;
|
|
816
|
+
projectId: z.ZodNullable<z.ZodString>;
|
|
817
|
+
hasPages: z.ZodBoolean;
|
|
818
|
+
otherLocationHasPages: z.ZodBoolean;
|
|
819
|
+
}, z.core.$strip>>;
|
|
820
|
+
error: z.ZodNullable<z.ZodString>;
|
|
821
|
+
}, z.core.$strip>;
|
|
822
|
+
}, z.core.$strip>;
|
|
823
|
+
export declare const ProjectKnowledgeStoreSetRequestMessageSchema: z.ZodObject<{
|
|
824
|
+
type: z.ZodLiteral<"project.knowledge.store.set.request">;
|
|
825
|
+
requestId: z.ZodString;
|
|
826
|
+
projectId: z.ZodString;
|
|
827
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
828
|
+
location: z.ZodNullable<z.ZodEnum<{
|
|
829
|
+
repository: "repository";
|
|
830
|
+
host: "host";
|
|
831
|
+
}>>;
|
|
832
|
+
movePages: z.ZodDefault<z.ZodBoolean>;
|
|
833
|
+
}, z.core.$strip>;
|
|
834
|
+
export declare const ProjectKnowledgeStoreSetResponseMessageSchema: z.ZodObject<{
|
|
835
|
+
type: z.ZodLiteral<"project.knowledge.store.set.response">;
|
|
836
|
+
payload: z.ZodObject<{
|
|
837
|
+
requestId: z.ZodString;
|
|
838
|
+
projectId: z.ZodString;
|
|
839
|
+
accepted: z.ZodBoolean;
|
|
840
|
+
store: z.ZodNullable<z.ZodObject<{
|
|
841
|
+
location: z.ZodEnum<{
|
|
842
|
+
repository: "repository";
|
|
843
|
+
host: "host";
|
|
844
|
+
}>;
|
|
845
|
+
override: z.ZodNullable<z.ZodEnum<{
|
|
846
|
+
repository: "repository";
|
|
847
|
+
host: "host";
|
|
848
|
+
}>>;
|
|
849
|
+
hostDefault: z.ZodEnum<{
|
|
850
|
+
repository: "repository";
|
|
851
|
+
host: "host";
|
|
852
|
+
}>;
|
|
853
|
+
basePath: z.ZodString;
|
|
854
|
+
projectId: z.ZodNullable<z.ZodString>;
|
|
855
|
+
hasPages: z.ZodBoolean;
|
|
856
|
+
otherLocationHasPages: z.ZodBoolean;
|
|
857
|
+
}, z.core.$strip>>;
|
|
858
|
+
movedPageCount: z.ZodNumber;
|
|
859
|
+
error: z.ZodNullable<z.ZodString>;
|
|
860
|
+
}, z.core.$strip>;
|
|
861
|
+
}, z.core.$strip>;
|
|
862
|
+
export type ProjectKnowledgeStoreDescriptor = z.infer<typeof ProjectKnowledgeStoreDescriptorSchema>;
|
|
863
|
+
export type ProjectKnowledgeStoreGetResponseMessage = z.infer<typeof ProjectKnowledgeStoreGetResponseMessageSchema>;
|
|
864
|
+
export type ProjectKnowledgeStoreSetResponseMessage = z.infer<typeof ProjectKnowledgeStoreSetResponseMessageSchema>;
|
|
865
|
+
export type ProjectKnowledgeStoreLocationValue = z.infer<typeof ProjectKnowledgeStoreLocationValueSchema>;
|
|
740
866
|
//# sourceMappingURL=project-knowledge.d.ts.map
|
|
@@ -15,6 +15,19 @@ export const ProjectKnowledgeKindSchema = z.enum([
|
|
|
15
15
|
"reference",
|
|
16
16
|
]);
|
|
17
17
|
export const ProjectKnowledgeStatusSchema = z.enum(["proposed", "confirmed", "superseded"]);
|
|
18
|
+
/**
|
|
19
|
+
* Where a project keeps its Knowledge store. `repository` is the historical
|
|
20
|
+
* `.otto/` directory in the working tree; `host` is a directory under the
|
|
21
|
+
* daemon's `$OTTO_HOME`, so the working tree stays clean. `null` on a project
|
|
22
|
+
* means "inherit the host default".
|
|
23
|
+
*
|
|
24
|
+
* Declared up here rather than beside the store RPCs at the bottom of the file:
|
|
25
|
+
* `messages.ts` composes it into the project descriptor, and the AOT validator
|
|
26
|
+
* generator evaluates these modules for real, so a schema referenced by another
|
|
27
|
+
* must already exist when that reference runs.
|
|
28
|
+
* COMPAT(projectKnowledgeStoreLocation): added in v0.8.18.
|
|
29
|
+
*/
|
|
30
|
+
export const ProjectKnowledgeStoreLocationValueSchema = z.enum(["repository", "host"]);
|
|
18
31
|
export const ProjectDeliveryStatusSchema = z.enum([
|
|
19
32
|
"charter",
|
|
20
33
|
"in_build",
|
|
@@ -61,7 +74,13 @@ export const ProjectKnowledgeRecordSchema = z.object({
|
|
|
61
74
|
affects: z.array(z.string()).optional(),
|
|
62
75
|
}))
|
|
63
76
|
.optional(),
|
|
77
|
+
// Relative to the store's path base: the project root for a repository
|
|
78
|
+
// store, the store directory for a host store. Prefer `absolutePath` when
|
|
79
|
+
// the client needs a path it can actually open.
|
|
64
80
|
path: z.string().optional(),
|
|
81
|
+
// COMPAT(projectKnowledgeStoreLocation): added in v0.8.18; the only path a
|
|
82
|
+
// client can open for a host-local store. Absent from older daemons.
|
|
83
|
+
absolutePath: z.string().optional(),
|
|
65
84
|
});
|
|
66
85
|
/** Review health, not a persisted project-knowledge finding record. */
|
|
67
86
|
export const ProjectKnowledgeHealthSchema = z.object({
|
|
@@ -76,6 +95,9 @@ export const ProjectKnowledgeRootPageSchema = z.object({
|
|
|
76
95
|
slug: z.string(),
|
|
77
96
|
title: z.string(),
|
|
78
97
|
path: z.string(),
|
|
98
|
+
// COMPAT(projectKnowledgeStoreLocation): added in v0.8.18. See the same field
|
|
99
|
+
// on ProjectKnowledgeRecordSchema.
|
|
100
|
+
absolutePath: z.string().optional(),
|
|
79
101
|
body: z.string(),
|
|
80
102
|
});
|
|
81
103
|
export const ProjectKnowledgeListRequestMessageSchema = z.object({
|
|
@@ -226,4 +248,71 @@ export const ProjectKnowledgeDeleteResponseMessageSchema = z.object({
|
|
|
226
248
|
error: z.string().optional(),
|
|
227
249
|
}),
|
|
228
250
|
});
|
|
251
|
+
// COMPAT(projectKnowledgeStoreLocation): added in v0.8.18, drop the gate when
|
|
252
|
+
// floor >= v0.8.18. Gated by server_info features.projectKnowledgeStoreLocation.
|
|
253
|
+
/** What the daemon resolved for a workspace, and why the client may act on it. */
|
|
254
|
+
export const ProjectKnowledgeStoreDescriptorSchema = z.object({
|
|
255
|
+
location: ProjectKnowledgeStoreLocationValueSchema,
|
|
256
|
+
/** The project's own override; null means it is following the host default. */
|
|
257
|
+
override: ProjectKnowledgeStoreLocationValueSchema.nullable(),
|
|
258
|
+
/** The host default in force, so the UI can label the inherited choice. */
|
|
259
|
+
hostDefault: ProjectKnowledgeStoreLocationValueSchema,
|
|
260
|
+
/** Absolute directory holding `KNOWLEDGE.md` and the `knowledge/` tree. */
|
|
261
|
+
basePath: z.string(),
|
|
262
|
+
/** The project this store belongs to, when the workspace has a registered one. */
|
|
263
|
+
projectId: z.string().nullable(),
|
|
264
|
+
/** Whether the resolved store holds pages a switch would offer to carry over. */
|
|
265
|
+
hasPages: z.boolean(),
|
|
266
|
+
/** Whether the other location already holds pages a switch would land beside. */
|
|
267
|
+
otherLocationHasPages: z.boolean(),
|
|
268
|
+
});
|
|
269
|
+
/**
|
|
270
|
+
* Addressed by project or by workspace. Project Settings has a project and no
|
|
271
|
+
* open workspace; the Knowledge panel has a workspace and reaches its project
|
|
272
|
+
* through it. Both are optional on the wire and the daemon rejects neither
|
|
273
|
+
* being set, rather than forcing a caller to invent an id it does not have.
|
|
274
|
+
*/
|
|
275
|
+
export const ProjectKnowledgeStoreGetRequestMessageSchema = z.object({
|
|
276
|
+
type: z.literal("project.knowledge.store.get.request"),
|
|
277
|
+
requestId: z.string(),
|
|
278
|
+
workspaceId: z.string().optional(),
|
|
279
|
+
projectId: z.string().optional(),
|
|
280
|
+
});
|
|
281
|
+
export const ProjectKnowledgeStoreGetResponseMessageSchema = z.object({
|
|
282
|
+
type: z.literal("project.knowledge.store.get.response"),
|
|
283
|
+
payload: z.object({
|
|
284
|
+
requestId: z.string(),
|
|
285
|
+
store: ProjectKnowledgeStoreDescriptorSchema.nullable(),
|
|
286
|
+
error: z.string().nullable(),
|
|
287
|
+
}),
|
|
288
|
+
});
|
|
289
|
+
export const ProjectKnowledgeStoreSetRequestMessageSchema = z.object({
|
|
290
|
+
type: z.literal("project.knowledge.store.set.request"),
|
|
291
|
+
requestId: z.string(),
|
|
292
|
+
projectId: z.string().min(1),
|
|
293
|
+
/**
|
|
294
|
+
* The workspace whose context report should be refreshed. Optional because
|
|
295
|
+
* the setting is reachable from Project Settings, where no workspace is open.
|
|
296
|
+
*/
|
|
297
|
+
workspaceId: z.string().optional(),
|
|
298
|
+
/** Null returns the project to inheriting the host default. */
|
|
299
|
+
location: ProjectKnowledgeStoreLocationValueSchema.nullable(),
|
|
300
|
+
/**
|
|
301
|
+
* Whether to carry the existing pages to the new location. The daemon never
|
|
302
|
+
* decides this: a silent move stages a deletion in the user's working tree.
|
|
303
|
+
*/
|
|
304
|
+
movePages: z.boolean().default(false),
|
|
305
|
+
});
|
|
306
|
+
export const ProjectKnowledgeStoreSetResponseMessageSchema = z.object({
|
|
307
|
+
type: z.literal("project.knowledge.store.set.response"),
|
|
308
|
+
payload: z.object({
|
|
309
|
+
requestId: z.string(),
|
|
310
|
+
projectId: z.string(),
|
|
311
|
+
accepted: z.boolean(),
|
|
312
|
+
store: ProjectKnowledgeStoreDescriptorSchema.nullable(),
|
|
313
|
+
/** Pages actually carried across. Zero when `movePages` was false. */
|
|
314
|
+
movedPageCount: z.number().int().nonnegative(),
|
|
315
|
+
error: z.string().nullable(),
|
|
316
|
+
}),
|
|
317
|
+
});
|
|
229
318
|
//# sourceMappingURL=project-knowledge.js.map
|
|
@@ -39,13 +39,77 @@ export declare const ProviderProfileModelSchema: z.ZodObject<{
|
|
|
39
39
|
* Otto tools natively (see the openai-compat provider) can be scoped to a subset
|
|
40
40
|
* of these groups; omitting the selection means all groups. Kept deliberately
|
|
41
41
|
* coarse - users pick groups, not individual tools.
|
|
42
|
+
*
|
|
43
|
+
* The list is APPEND-ONLY, and the wire never carries it as a closed enum (see
|
|
44
|
+
* normalizeOttoToolGroups): an older peer must be able to parse a newer peer's
|
|
45
|
+
* selection, dropping names it does not know rather than failing the message.
|
|
42
46
|
*/
|
|
43
|
-
export declare const OTTO_TOOL_GROUPS: readonly ["preview", "browser", "web", "agents", "terminals", "schedules", "artifacts", "widgets", "workspace"];
|
|
47
|
+
export declare const OTTO_TOOL_GROUPS: readonly ["preview", "browser", "web", "agents", "terminals", "schedules", "artifacts", "widgets", "workspace", "orchestration", "knowledge", "memory", "permissions", "providers", "tasks", "voice"];
|
|
44
48
|
export type OttoToolGroup = (typeof OTTO_TOOL_GROUPS)[number];
|
|
49
|
+
/**
|
|
50
|
+
* The taxonomy as it stood before the "agents" split. A stored selection that
|
|
51
|
+
* uses only these names predates the split and is migrated forward by
|
|
52
|
+
* expandLegacyOttoToolGroups.
|
|
53
|
+
*/
|
|
54
|
+
export declare const LEGACY_OTTO_TOOL_GROUPS: readonly ["preview", "browser", "web", "agents", "terminals", "schedules", "artifacts", "widgets", "workspace"];
|
|
55
|
+
/**
|
|
56
|
+
* The categories carved out of the legacy "agents" catch-all. They inherit
|
|
57
|
+
* "agents" when a pre-split selection is migrated forward, and collapse back
|
|
58
|
+
* into it when a current selection is projected back for an older peer.
|
|
59
|
+
*/
|
|
60
|
+
export declare const AGENTS_DERIVED_TOOL_GROUPS: readonly ["orchestration", "knowledge", "memory", "permissions", "providers", "tasks", "voice"];
|
|
61
|
+
export declare function isOttoToolGroup(value: unknown): value is OttoToolGroup;
|
|
62
|
+
/**
|
|
63
|
+
* Post-validation normalization for a stored or wire-carried group selection.
|
|
64
|
+
* The schemas that carry it are `string[]` on purpose - wire schemas are pure
|
|
65
|
+
* structural declarations - and this is the one place unknown names are
|
|
66
|
+
* dropped, so a group added by a newer peer degrades to "not selected" instead
|
|
67
|
+
* of failing the whole message.
|
|
68
|
+
*
|
|
69
|
+
* Returns undefined for a non-array, which every caller reads as "all groups".
|
|
70
|
+
*/
|
|
71
|
+
export declare function normalizeOttoToolGroups(value: unknown): OttoToolGroup[] | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Migrate a pre-split selection forward: every category carved out of "agents"
|
|
74
|
+
* inherits whatever "agents" was set to. Without this, upgrading would silently
|
|
75
|
+
* strip project knowledge, orchestration, memory, permissions, provider lookups,
|
|
76
|
+
* tasks and voice from anyone who had ever touched a tool toggle.
|
|
77
|
+
*/
|
|
78
|
+
export declare function expandLegacyOttoToolGroups(groups: readonly OttoToolGroup[]): OttoToolGroup[];
|
|
79
|
+
/**
|
|
80
|
+
* Project a current selection back into the pre-split taxonomy for the legacy
|
|
81
|
+
* key we keep writing. "agents" stands in for the whole family, so a peer that
|
|
82
|
+
* predates the split still grants the tools the user left enabled rather than
|
|
83
|
+
* withholding them.
|
|
84
|
+
*/
|
|
85
|
+
export declare function toLegacyOttoToolGroups(groups: readonly OttoToolGroup[]): OttoToolGroup[];
|
|
86
|
+
/**
|
|
87
|
+
* Read a persisted selection that may be in either taxonomy.
|
|
88
|
+
*
|
|
89
|
+
* COMPAT(ottoToolGroupsV2): added in v0.8.20. The v2 key wins when present; the
|
|
90
|
+
* legacy key is migrated forward otherwise. A second key rather than a
|
|
91
|
+
* heuristic, because the two shapes are genuinely ambiguous - "no new groups
|
|
92
|
+
* listed" reads as "pre-split config" one way and "the user turned all seven
|
|
93
|
+
* off" the other, and silently re-enabling tools somebody disabled is the worse
|
|
94
|
+
* way to be wrong. Drop the legacy branch when the floor is >= v0.8.20.
|
|
95
|
+
*/
|
|
96
|
+
export declare function resolveStoredOttoToolGroups(input: {
|
|
97
|
+
v2?: unknown;
|
|
98
|
+
legacy?: unknown;
|
|
99
|
+
}): OttoToolGroup[] | undefined;
|
|
100
|
+
/** Both persisted shapes for one selection: the current key and its legacy projection. */
|
|
101
|
+
export declare function serializeOttoToolGroups(groups: readonly OttoToolGroup[]): {
|
|
102
|
+
toolGroups: OttoToolGroup[];
|
|
103
|
+
toolGroupsV2: OttoToolGroup[];
|
|
104
|
+
};
|
|
45
105
|
/**
|
|
46
106
|
* Map a tool name to its group. Covers both Otto's catalog tools and the
|
|
47
|
-
* openai-compat builtin web tools (web_search/web_fetch → "web").
|
|
48
|
-
*
|
|
107
|
+
* openai-compat builtin web tools (web_search/web_fetch → "web").
|
|
108
|
+
*
|
|
109
|
+
* "agents" is still the fallback, but it now means what it says - spawning and
|
|
110
|
+
* steering chats - instead of "everything not otherwise classified". It used to
|
|
111
|
+
* collect 43 of the catalog's 72 tools, which made it impossible to switch off
|
|
112
|
+
* one capability without losing six unrelated ones.
|
|
49
113
|
*/
|
|
50
114
|
export declare function ottoToolGroupForName(name: string): OttoToolGroup;
|
|
51
115
|
/**
|
|
@@ -378,17 +442,8 @@ export declare const ProviderOverrideSchema: z.ZodObject<{
|
|
|
378
442
|
}, z.core.$strip>>>;
|
|
379
443
|
}, z.core.$strip>>>;
|
|
380
444
|
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
381
|
-
ottoToolGroups: z.ZodOptional<z.ZodArray<z.
|
|
382
|
-
|
|
383
|
-
browser: "browser";
|
|
384
|
-
web: "web";
|
|
385
|
-
agents: "agents";
|
|
386
|
-
terminals: "terminals";
|
|
387
|
-
schedules: "schedules";
|
|
388
|
-
artifacts: "artifacts";
|
|
389
|
-
widgets: "widgets";
|
|
390
|
-
workspace: "workspace";
|
|
391
|
-
}>>>;
|
|
445
|
+
ottoToolGroups: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
446
|
+
ottoToolGroupsV2: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
392
447
|
mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
393
448
|
type: z.ZodLiteral<"stdio">;
|
|
394
449
|
command: z.ZodString;
|
|
@@ -459,17 +514,8 @@ export declare const ProviderOverridesSchema: z.ZodRecord<z.ZodString, z.ZodObje
|
|
|
459
514
|
}, z.core.$strip>>>;
|
|
460
515
|
}, z.core.$strip>>>;
|
|
461
516
|
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
462
|
-
ottoToolGroups: z.ZodOptional<z.ZodArray<z.
|
|
463
|
-
|
|
464
|
-
browser: "browser";
|
|
465
|
-
web: "web";
|
|
466
|
-
agents: "agents";
|
|
467
|
-
terminals: "terminals";
|
|
468
|
-
schedules: "schedules";
|
|
469
|
-
artifacts: "artifacts";
|
|
470
|
-
widgets: "widgets";
|
|
471
|
-
workspace: "workspace";
|
|
472
|
-
}>>>;
|
|
517
|
+
ottoToolGroups: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
518
|
+
ottoToolGroupsV2: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
473
519
|
mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
474
520
|
type: z.ZodLiteral<"stdio">;
|
|
475
521
|
command: z.ZodString;
|