@otto-code/client 0.9.0 → 0.9.3

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.
@@ -0,0 +1,20 @@
1
+ import type { AgentProvider } from "@otto-code/protocol/agent-types";
2
+ interface ImportAgentInputBase {
3
+ cwd?: string;
4
+ /**
5
+ * Workspace the import was requested from. Supply it whenever the caller has
6
+ * one, so the imported session lands in that workspace instead of the daemon
7
+ * resolving (or minting) another workspace for the same directory.
8
+ */
9
+ workspaceId?: string;
10
+ labels?: Record<string, string>;
11
+ }
12
+ export type ImportAgentInput = (ImportAgentInputBase & {
13
+ providerId: string;
14
+ providerHandleId: string;
15
+ }) | (ImportAgentInputBase & {
16
+ provider: AgentProvider;
17
+ sessionId: string;
18
+ });
19
+ export {};
20
+ //# sourceMappingURL=agent-import-input.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=agent-import-input.js.map
@@ -0,0 +1,4 @@
1
+ import type { AgentSessionConfig } from "@otto-code/protocol/agent-types";
2
+ import type { CreateAgentRequestOptions } from "./daemon-client.js";
3
+ export declare function resolveAgentConfig(options: CreateAgentRequestOptions): AgentSessionConfig;
4
+ //# sourceMappingURL=create-agent-config.d.ts.map
@@ -0,0 +1,18 @@
1
+ export function resolveAgentConfig(options) {
2
+ const { config, provider, cwd, env: _env, workspaceId: _workspaceId, initialPrompt: _initialPrompt, images: _images, git: _git, worktreeName: _worktreeName, requestId: _requestId, labels: _labels, ...overrides } = options;
3
+ const baseConfig = {
4
+ ...(provider ? { provider } : {}),
5
+ ...(cwd ? { cwd } : {}),
6
+ ...overrides,
7
+ };
8
+ const merged = config ? { ...baseConfig, ...config } : baseConfig;
9
+ if (!merged.provider || !merged.cwd) {
10
+ throw new Error("createAgent requires provider and cwd");
11
+ }
12
+ return {
13
+ ...merged,
14
+ provider: merged.provider,
15
+ cwd: merged.cwd,
16
+ };
17
+ }
18
+ //# sourceMappingURL=create-agent-config.js.map
@@ -1,9 +1,11 @@
1
+ import { type FetchAgentOptions } from "./fetch-agent-options.js";
2
+ export type { FetchAgentOptions } from "./fetch-agent-options.js";
1
3
  import type { AgentAttentionNotificationPayload } from "@otto-code/protocol/agent-attention-notification";
2
4
  import type { z } from "zod";
3
5
  import type { ProjectGithubCloneProtocol } from "@otto-code/protocol/messages";
4
6
  import { type ClientCapability } from "@otto-code/protocol/client-capabilities";
5
7
  import { AgentRefreshedStatusPayloadSchema, CheckoutRenameBranchResponseSchema, RenameTerminalResponseSchema, RestartRequestedStatusPayloadSchema, ShutdownRequestedStatusPayloadSchema, DaemonUpdateResponseSchema, type ActiveTurnBehavior, type ServerInfoStatusPayload } from "@otto-code/protocol/messages";
6
- import type { AgentStreamEventPayload, AgentSnapshotPayload, ProjectPlacementPayload, AgentPermissionResolvedMessage, CreateAgentRequestMessage, CreateOttoWorktreeRequest, CodeListFilesResponse, CodeSymbolLocation, CodeDefinitionLocation, CodeDefinitionStatus, CodeRenameApplyStatus, CodeRenameFileOutcome, CodeRenameUndoFile, CodeRenameUndoStatus, CodeHoverRange, CodeRenameEdit, CodeRenameFilePlan, LspLanguageState, LspRunningServer, CodeSolutionGetTreeResponse, CodeSolutionLoadProjectResponse, SolutionFormat, SolutionRef, SolutionTreeFolder, SolutionTreeProject, SolutionProjectNode, SolutionProjectStatus, SolutionPackageReference, FileDownloadTokenResponse, FileEntryKind, FileEol, FileReplaceFileResult, FileReplaceRequest, FileReplaceResponse, FileSearchResultPayload, FileSearchSummary, FileUploadResponse, FileExplorerResponse, FileWatchEventPayload, FileWriteResult, FileRefineResult, FileRefineDocument, FileRefineReference, FetchAgentTimelineResponseMessage, AgentForkContextResponseMessage, GitSetupOptions, CheckoutStatusResponse, CheckoutCommitResponse, CheckoutGitCommitResponse, CheckoutGitCommitAgentResponse, CheckoutGitRollbackResponse, CheckoutGitFileHistoryResponse, CheckoutGitFileCommitDiffResponse, CheckoutGitFileBlameResponse, CheckoutGitFileOriginResponse, CheckoutGitGetOperationLogResponse, CheckoutMergeResponse, CheckoutMergeFromBaseResponse, CheckoutPullResponse, CheckoutPushResponse, CheckoutRefreshResponse, CheckoutGitFetchResponse, CheckoutPrCreateResponse, CheckoutPrMergeResponse, CheckoutPrMergeMethod, CheckoutGithubSetAutoMergeResponse, CheckoutGithubGetCheckDetailsResponse, PreviewListConfigResponse, PreviewStartResponse, PreviewBindTabResponse, PreviewStopResponse, CheckoutPrStatusResponse, PullRequestTimelineResponse, HostingPullRequestThreadSetResolvedResponse, HostingPullRequestCommentSetReactionResponse, CheckoutSwitchBranchResponse, StashSaveResponse, StashPopResponse, StashListResponse, KanbanBoardsListResponse, ProjectKanbanTarget, ProjectKnowledgeStoreDescriptor, ProjectKnowledgeStoreLocationValue, KanbanBoardGetResponse, KanbanCardMoveResponse, KanbanCardCreateResponse, KanbanTaskLinkResponse, ValidateBranchResponse, BranchSuggestionsResponse, FileVersion, CheckoutCommit, ParsedDiffFile, WorkspaceRecoveryState, CheckoutForgeGetCheckDetailsResponse, CheckoutForgeSetAutoMergeResponse, ProjectCreateDirectoryResponse, FsFileWriteResult, FsFileWriteBinaryResult, GitHubSearchResponse, GitHubSearchRequest, ForgeSearchResponse, ForgeSearchRequest, GitHostingProviderId, HostingSearchRequest, HostingSearchResponse, HostingAuthStatusResponse, DirectorySuggestionsResponse, OttoWorktreeListResponse, OttoWorktreeArchiveResponse, ProjectIconSource, ProjectIconResponse, ContextCategory, ContextPromptPreviewGetResponseMessage, ContextReportGetResponseMessage, ContextEdgeConvertResponseMessage, ContextFindingsFixResponseMessage, PersonalityMemoryListResponseMessage, PersonalityMemoryUpdateResponseMessage, PersonalityMemoryTransferResponseMessage, PersonalityMemoryStatsResponseMessage, ProjectKnowledgeListResponseMessage, ProjectKnowledgeGetResponseMessage, ProjectKnowledgeCreateResponseMessage, ProjectKnowledgeApplyResponseMessage, ProjectKnowledgeStatusResponseMessage, ProjectKnowledgeProjectApplyResponseMessage, ProjectKnowledgeReferenceApplyResponseMessage, ProjectKnowledgeRootApplyResponseMessage, ProjectKnowledgeRefineApplyResponseMessage, ProjectKnowledgeRefinementProposeResponseMessage, ProjectKnowledgeDeleteResponseMessage, ProjectIconGetResponse, ProjectAddResponse, ProjectResolveWorkspaceForPathResponse, ProjectScaffoldGit, ProjectScaffoldProgress, ProjectScaffoldResponse, HostingListRepositoriesResponse, HostingListOwnersResponse, OpenProjectResponseMessage, ArchiveWorkspaceResponseMessage, WorkspaceArchivePreflightResponse, WorktreeBaseRefSetResponse, WorktreeReattachListResponse, WorktreeReattachResponse, WorktreeReattachTarget, WorkspaceSetupStatusResponseMessage, ListCommandsResponse, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ListProviderModesResponseMessage, ListAvailableProvidersResponse, GetProvidersSnapshotResponseMessage, RefreshProvidersSnapshotResponseMessage, ProviderDiagnosticResponseMessage, ProviderUsageListResponseMessage, StatsActivityGetResponseMessage, StatsActivityResetResponseMessage, UsageLogGetResponseMessage, AgentContextGetUsageResponseMessage, DaemonGetStatusResponse, DaemonGetPairingOfferResponse, DaemonConfigReloadResponse, DiagnosticsResponse, AgentRewindResponseMessage, ListTerminalsResponse, CreateTerminalResponse, SubscribeTerminalResponse, SubscribeTerminalRequest, CloseItemsResponse, AttachmentsImagesClearResponse, AttachmentsImagesStatsResponse, HistoryAgentsClearArchivedResponse, HistoryAgentsStorageStatsResponse, KillTerminalResponse, CaptureTerminalResponse, TerminalCompatibilityDiagnosticResponse, TerminalInput, SessionInboundMessage, SessionOutboundMessage, SendAgentMessageRequest, AgentPromptDelivery, TasksSuggestedStartMode, OttoConfigRaw, OttoConfigRevision, WorkspaceCreateRequest, PluginListItem, PluginLogEntry, AgentSkillSelection, AgentSkillsStatus, AgentSkillsSaveResult } from "@otto-code/protocol/messages";
8
+ import type { AgentStreamEventPayload, AgentSnapshotPayload, ProjectPlacementPayload, AgentPermissionResolvedMessage, CreateAgentRequestMessage, CreateOttoWorktreeRequest, CodeListFilesResponse, CodeSymbolLocation, CodeDefinitionLocation, CodeDefinitionStatus, CodeRenameApplyStatus, CodeRenameFileOutcome, CodeRenameUndoFile, CodeRenameUndoStatus, CodeHoverRange, CodeRenameEdit, CodeRenameFilePlan, LspLanguageState, LspRunningServer, CodeSolutionGetTreeResponse, CodeSolutionLoadProjectResponse, SolutionFormat, SolutionRef, SolutionTreeFolder, SolutionTreeProject, SolutionProjectNode, SolutionProjectStatus, SolutionPackageReference, FileDownloadTokenResponse, FileEntryKind, FileEol, FileReplaceFileResult, FileReplaceRequest, FileReplaceResponse, FileSearchResultPayload, FileSearchSummary, FileUploadResponse, FileExplorerResponse, FileWatchEventPayload, FileWriteResult, FileRefineResult, FileRefineDocument, FileRefineReference, FetchAgentTimelineResponseMessage, AgentForkContextResponseMessage, GitSetupOptions, CheckoutStatusResponse, CheckoutCommitResponse, CheckoutGitCommitResponse, CheckoutGitCommitAgentResponse, CheckoutGitRollbackResponse, CheckoutGitFileHistoryResponse, CheckoutGitFileCommitDiffResponse, CheckoutGitFileBlameResponse, CheckoutGitFileOriginResponse, CheckoutGitGetOperationLogResponse, CheckoutMergeResponse, CheckoutMergeFromBaseResponse, CheckoutPullResponse, CheckoutPushResponse, CheckoutRefreshResponse, CheckoutGitFetchResponse, CheckoutPrCreateResponse, CheckoutPrMergeResponse, CheckoutPrMergeMethod, CheckoutGithubSetAutoMergeResponse, CheckoutGithubGetCheckDetailsResponse, PreviewListConfigResponse, PreviewStartResponse, PreviewBindTabResponse, PreviewStopResponse, CheckoutPrStatusResponse, PullRequestTimelineResponse, HostingPullRequestThreadSetResolvedResponse, HostingPullRequestCommentSetReactionResponse, CheckoutSwitchBranchResponse, StashSaveResponse, StashPopResponse, StashListResponse, KanbanBoardsListResponse, ProjectKanbanTarget, ProjectKnowledgeStoreDescriptor, ProjectKnowledgeStoreLocationValue, KanbanBoardGetResponse, KanbanCardMoveResponse, KanbanCardCreateResponse, KanbanTaskLinkResponse, ValidateBranchResponse, BranchSuggestionsResponse, FileVersion, CheckoutCommit, ParsedDiffFile, WorkspaceRecoveryState, CheckoutForgeGetCheckDetailsResponse, CheckoutForgeSetAutoMergeResponse, ProjectCreateDirectoryResponse, FsFileWriteResult, FsFileWriteBinaryResult, GitHubSearchResponse, GitHubSearchRequest, ForgeSearchResponse, ForgeSearchRequest, GitHostingProviderId, HostingSearchRequest, HostingSearchResponse, HostingAuthStatusResponse, DirectorySuggestionsResponse, OttoWorktreeListResponse, OttoWorktreeArchiveResponse, ProjectIconSource, ProjectIconResponse, ContextCategory, ContextPromptPreviewGetResponseMessage, ContextReportGetResponseMessage, ContextEdgeConvertResponseMessage, ContextFindingsFixResponseMessage, PersonalityMemoryListResponseMessage, PersonalityMemoryUpdateResponseMessage, PersonalityMemoryTransferResponseMessage, PersonalityMemoryStatsResponseMessage, ProjectKnowledgeListResponseMessage, ProjectKnowledgeGetResponseMessage, ProjectKnowledgeRootGetResponseMessage, ProjectKnowledgeCreateResponseMessage, ProjectKnowledgeApplyResponseMessage, ProjectKnowledgeStatusResponseMessage, ProjectKnowledgeProjectApplyResponseMessage, ProjectKnowledgeReferenceApplyResponseMessage, ProjectKnowledgeRootApplyResponseMessage, ProjectKnowledgeRefineApplyResponseMessage, ProjectKnowledgeRefinementProposeResponseMessage, ProjectKnowledgeDeleteResponseMessage, ProjectIconGetResponse, ProjectAddResponse, ProjectResolveWorkspaceForPathResponse, ProjectScaffoldGit, ProjectScaffoldProgress, ProjectScaffoldResponse, HostingListRepositoriesResponse, HostingListOwnersResponse, OpenProjectResponseMessage, ArchiveWorkspaceResponseMessage, WorkspaceArchivePreflightResponse, WorktreeBaseRefSetResponse, WorktreeReattachListResponse, WorktreeReattachResponse, WorktreeReattachTarget, WorkspaceSetupStatusResponseMessage, ListCommandsResponse, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ListProviderModesResponseMessage, ListAvailableProvidersResponse, GetProvidersSnapshotResponseMessage, RefreshProvidersSnapshotResponseMessage, ProviderDiagnosticResponseMessage, ProviderUsageListResponseMessage, StatsActivityGetResponseMessage, StatsActivityResetResponseMessage, UsageLogGetResponseMessage, AgentContextGetUsageResponseMessage, DaemonGetStatusResponse, DaemonGetPairingOfferResponse, DaemonConfigReloadResponse, DiagnosticsResponse, AgentRewindResponseMessage, ListTerminalsResponse, CreateTerminalResponse, SubscribeTerminalResponse, SubscribeTerminalRequest, CloseItemsResponse, AttachmentsImagesClearResponse, AttachmentsImagesStatsResponse, HistoryAgentsClearArchivedResponse, HistoryAgentsStorageStatsResponse, KillTerminalResponse, CaptureTerminalResponse, TerminalCompatibilityDiagnosticResponse, TerminalInput, SessionInboundMessage, SessionOutboundMessage, SendAgentMessageRequest, AgentPromptDelivery, TasksSuggestedStartMode, OttoConfigRaw, OttoConfigRevision, WorkspaceCreateRequest, PluginListItem, PluginLogEntry, AgentSkillSelection, AgentSkillsStatus, AgentSkillsSaveResult } from "@otto-code/protocol/messages";
7
9
  import type { AgentPermissionRequest, AgentPermissionResponse, AgentPersistenceHandle, AgentProviderNotice, AgentProvider, AgentSessionConfig } from "@otto-code/protocol/agent-types";
8
10
  import type { OrchestrationGraph, PromptTemplate, Run, WorkflowStartConfirmation } from "@otto-code/protocol/workflow";
9
11
  import type { BrainCatalogModel, BrainDiskUsage, BrainEvals, BrainHfSearchResult, BrainHostStatus, BrainInstalledModel, BrainInventoryModel, BrainJob, BrainLogsTailResponse, BrainLogsWatchResponse, BrainModelBudgetGetResponse, BrainModelDeleteResponse, BrainModelLoadResponse, BrainModelProfileGetResponse, BrainModelProfileSetResponse, BrainModelRenameResetResponse, BrainModelRenameResponse, BrainNetworkInfo, BrainRemoteConfig, BrainRepoQuant, BrainRuntime, ConnectorsListToolsResponse, ConnectorsOauthAuthorizeResponse, ConnectorsOauthDisconnectResponse, CommunicationsGetOverviewResponse, CommunicationsInboxGetHomeResponse, CommunicationsInboxNotificationsAcknowledgeResponse, CommunicationsInboxSearchResponse, CommunicationsInboxSetFavoriteResponse, CommunicationsInboxGetPresenceResponse, CommunicationsInboxGetMessagesResponse, CommunicationsInboxSetPresenceResponse, CommunicationsInboxSetEnabledResponse, CommunicationsInboxSendMessageResponse, CommunicationsRoomGetResponse, CommunicationsRoomThreadGetResponse, CommunicationsRoomMessageSendResponse, CommunicationsRoomReactionSetResponse, IntegrationsAuthorizationGetOverviewResponse, IntegrationsAuthorizationGetMethodsResponse, IntegrationsAuthorizationStartBrowserResponse, IntegrationsZoomStartAuthorizationResponse, CueMoment, MutableDaemonConfig, MutableDaemonConfigPatch, SpeechSettingsOptions, SpeechTtsPreviewResult, SpeechTtsSpeakResult, SpeechTtsSpeakCancelResult, VisualizerVoiceCuesResult, AgentPersonalitiesGenerateProfileResult } from "@otto-code/protocol/messages";
@@ -19,23 +21,8 @@ export interface Logger {
19
21
  warn(obj: object, msg?: string): void;
20
22
  error(obj: object, msg?: string): void;
21
23
  }
22
- interface ImportAgentInputBase {
23
- cwd?: string;
24
- /**
25
- * Workspace the import was requested from. Supply it whenever the caller has
26
- * one, so the imported session lands in that workspace instead of the daemon
27
- * resolving (or minting) another workspace for the same directory.
28
- */
29
- workspaceId?: string;
30
- labels?: Record<string, string>;
31
- }
32
- export type ImportAgentInput = (ImportAgentInputBase & {
33
- providerId: string;
34
- providerHandleId: string;
35
- }) | (ImportAgentInputBase & {
36
- provider: AgentProvider;
37
- sessionId: string;
38
- });
24
+ import type { ImportAgentInput } from "./agent-import-input.js";
25
+ export type { ImportAgentInput } from "./agent-import-input.js";
39
26
  export type { DaemonTransport, DaemonTransportFactory, WebSocketFactory, WebSocketLike, } from "./daemon-client-transport.js";
40
27
  export type { TerminalStreamEvent };
41
28
  export type ConnectionState = {
@@ -580,16 +567,14 @@ type ArchitecturalViewsDraftDiscardPayload = Extract<SessionOutboundMessage, {
580
567
  type ArchitecturalViewsDraftGetContentPayload = Extract<SessionOutboundMessage, {
581
568
  type: "architectural-views.draft.get-content.response";
582
569
  }>["payload"];
570
+ type ArchitecturalViewsDraftListPayload = Extract<SessionOutboundMessage, {
571
+ type: "architectural-views.draft.list.response";
572
+ }>["payload"];
583
573
  export type FetchAgentTimelinePayload = FetchAgentTimelineResponseMessage["payload"];
584
574
  export type AgentForkContextPayload = AgentForkContextResponseMessage["payload"];
585
575
  export type FetchAgentTimelineDirection = FetchAgentTimelinePayload["direction"];
586
576
  export type FetchAgentTimelineProjection = FetchAgentTimelinePayload["projection"];
587
577
  export type FetchAgentTimelineCursor = NonNullable<FetchAgentTimelinePayload["startCursor"]>;
588
- export interface FetchAgentOptions {
589
- agentId: string;
590
- requestId?: string;
591
- timeout?: number;
592
- }
593
578
  type LegacyFetchAgentOptions = Omit<FetchAgentOptions, "agentId">;
594
579
  export interface FetchAgentTimelineOptions {
595
580
  direction?: FetchAgentTimelineDirection;
@@ -597,6 +582,7 @@ export interface FetchAgentTimelineOptions {
597
582
  limit?: number;
598
583
  projection?: FetchAgentTimelineProjection;
599
584
  mergeWindow?: boolean;
585
+ includePromptIndex?: boolean;
600
586
  requestId?: string;
601
587
  timeout?: number;
602
588
  }
@@ -1125,7 +1111,10 @@ export declare class DaemonClient {
1125
1111
  * a single-element array; the "Start all" collective action passes the whole
1126
1112
  * pending queue. Resolves to the count started; throws only if all failed.
1127
1113
  */
1128
- startSuggestedTasks(parentAgentId: string, taskIds: readonly string[], mode: TasksSuggestedStartMode): Promise<{
1114
+ startSuggestedTasks(parentAgentId: string, taskIds: readonly string[], mode: TasksSuggestedStartMode, launch?: {
1115
+ provider: string;
1116
+ model: string;
1117
+ }): Promise<{
1129
1118
  succeeded: number;
1130
1119
  failed: number;
1131
1120
  }>;
@@ -1747,11 +1736,18 @@ export declare class DaemonClient {
1747
1736
  /** Assemble only this section; omitted means the whole prompt. */
1748
1737
  category?: ContextCategory;
1749
1738
  }, requestId?: string): Promise<ContextPromptPreviewGetResponseMessage["payload"]>;
1750
- listProjectKnowledge(workspaceId: string, requestId?: string): Promise<ProjectKnowledgeListResponseMessage["payload"]>;
1739
+ listProjectKnowledge(workspaceId: string, options?: {
1740
+ includeRootBodies?: boolean;
1741
+ requestId?: string;
1742
+ }): Promise<ProjectKnowledgeListResponseMessage["payload"]>;
1751
1743
  getProjectKnowledge(input: {
1752
1744
  workspaceId: string;
1753
1745
  id: string;
1754
1746
  }, requestId?: string): Promise<ProjectKnowledgeGetResponseMessage["payload"]>;
1747
+ getProjectKnowledgeRoot(input: {
1748
+ workspaceId: string;
1749
+ slug: string;
1750
+ }, requestId?: string): Promise<ProjectKnowledgeRootGetResponseMessage["payload"]>;
1755
1751
  createProjectKnowledge(input: {
1756
1752
  workspaceId: string;
1757
1753
  id?: string;
@@ -2445,6 +2441,7 @@ export declare class DaemonClient {
2445
2441
  id: string;
2446
2442
  }>;
2447
2443
  sourcePath: string;
2444
+ diagramType?: "architecture" | "workflow" | "sequence" | "dataflow" | "lifecycle";
2448
2445
  quality?: "standard" | "showcase";
2449
2446
  requestId?: string;
2450
2447
  }): Promise<ArchitecturalViewsDeliverPayload>;
@@ -2471,6 +2468,7 @@ export declare class DaemonClient {
2471
2468
  id: string;
2472
2469
  }>;
2473
2470
  sourcePath?: string;
2471
+ diagramType?: "architecture" | "workflow" | "sequence" | "dataflow" | "lifecycle";
2474
2472
  quality?: "standard" | "showcase";
2475
2473
  requestId?: string;
2476
2474
  }): Promise<ArchitecturalViewsDraftCreatePayload>;
@@ -2500,6 +2498,14 @@ export declare class DaemonClient {
2500
2498
  draftId: string;
2501
2499
  requestId?: string;
2502
2500
  }): Promise<ArchitecturalViewsDraftGetContentPayload>;
2501
+ listArchitecturalViewDrafts(options: {
2502
+ workspaceId: string;
2503
+ knowledgeReference?: {
2504
+ kind: "root" | "record";
2505
+ id: string;
2506
+ };
2507
+ requestId?: string;
2508
+ }): Promise<ArchitecturalViewsDraftListPayload>;
2503
2509
  onTerminalStreamEvent(handler: (event: TerminalStreamEvent) => void): () => void;
2504
2510
  waitForTerminalStreamEvent(predicate: (event: TerminalStreamEvent) => boolean, timeout?: number): Promise<TerminalStreamEvent>;
2505
2511
  private createRequestId;
@@ -1,3 +1,5 @@
1
+ import { normalizeFetchAgentOptions } from "./fetch-agent-options.js";
2
+ import { resolveAgentConfig } from "./create-agent-config.js";
1
3
  import { CLIENT_CAPS } from "@otto-code/protocol/client-capabilities";
2
4
  import { AgentCreateFailedStatusPayloadSchema, AgentCreatedStatusPayloadSchema, AgentRefreshedStatusPayloadSchema, AgentResumedStatusPayloadSchema, parseServerInfoStatusPayload, RestartRequestedStatusPayloadSchema, ShutdownRequestedStatusPayloadSchema, DaemonUpdateResponseSchema, SessionInboundMessageSchema, } from "@otto-code/protocol/messages";
3
5
  import { validateWSOutboundMessage } from "@otto-code/protocol/validation/ws-outbound";
@@ -23,17 +25,6 @@ function normalizePassword(value) {
23
25
  }
24
26
  return value.length > 0 ? value : null;
25
27
  }
26
- // COMPAT(daemon-client-object-options): added in v0.1.102; remove after
27
- // 2026-12-29 once SDK callers have migrated to object parameters.
28
- function normalizeFetchAgentOptions(input, legacyOptions) {
29
- if (typeof input !== "string") {
30
- return input;
31
- }
32
- if (typeof legacyOptions === "string") {
33
- return { agentId: input, requestId: legacyOptions };
34
- }
35
- return { agentId: input, ...legacyOptions };
36
- }
37
28
  function normalizeListCommandsOptions(input, legacyOptions) {
38
29
  if (typeof input !== "string") {
39
30
  return input;
@@ -1724,13 +1715,14 @@ export class DaemonClient {
1724
1715
  * a single-element array; the "Start all" collective action passes the whole
1725
1716
  * pending queue. Resolves to the count started; throws only if all failed.
1726
1717
  */
1727
- async startSuggestedTasks(parentAgentId, taskIds, mode) {
1718
+ async startSuggestedTasks(parentAgentId, taskIds, mode, launch) {
1728
1719
  const payload = await this.sendNamespacedCorrelatedSessionRequest({
1729
1720
  message: {
1730
1721
  type: "tasks.suggested.start.request",
1731
1722
  parentAgentId,
1732
1723
  taskIds: [...taskIds],
1733
1724
  mode,
1725
+ launch,
1734
1726
  },
1735
1727
  });
1736
1728
  if (!payload.accepted) {
@@ -2498,6 +2490,7 @@ export class DaemonClient {
2498
2490
  ...(typeof options.limit === "number" ? { limit: options.limit } : {}),
2499
2491
  ...(options.projection ? { projection: options.projection } : {}),
2500
2492
  ...(options.mergeWindow === true ? { mergeWindow: true } : {}),
2493
+ ...(options.includePromptIndex === true ? { includePromptIndex: true } : {}),
2501
2494
  });
2502
2495
  const payload = await this.sendRequest({
2503
2496
  requestId: resolvedRequestId,
@@ -4512,10 +4505,14 @@ export class DaemonClient {
4512
4505
  responseType: "context.prompt.preview.get.response",
4513
4506
  });
4514
4507
  }
4515
- async listProjectKnowledge(workspaceId, requestId) {
4508
+ async listProjectKnowledge(workspaceId, options) {
4516
4509
  return this.sendNamespacedCorrelatedSessionRequest({
4517
- requestId,
4518
- message: { type: "project.knowledge.list.request", workspaceId },
4510
+ requestId: options?.requestId,
4511
+ message: {
4512
+ type: "project.knowledge.list.request",
4513
+ workspaceId,
4514
+ ...(options?.includeRootBodies === false ? { includeRootBodies: false } : {}),
4515
+ },
4519
4516
  });
4520
4517
  }
4521
4518
  async getProjectKnowledge(input, requestId) {
@@ -4524,6 +4521,12 @@ export class DaemonClient {
4524
4521
  message: { type: "project.knowledge.get.request", ...input },
4525
4522
  });
4526
4523
  }
4524
+ async getProjectKnowledgeRoot(input, requestId) {
4525
+ return this.sendNamespacedCorrelatedSessionRequest({
4526
+ requestId,
4527
+ message: { type: "project.knowledge.root.get.request", ...input },
4528
+ });
4529
+ }
4527
4530
  async createProjectKnowledge(input, requestId) {
4528
4531
  return this.sendNamespacedCorrelatedSessionRequest({
4529
4532
  requestId,
@@ -6441,6 +6444,7 @@ export class DaemonClient {
6441
6444
  title: options.title,
6442
6445
  knowledgeReferences: options.knowledgeReferences,
6443
6446
  sourcePath: options.sourcePath,
6447
+ ...(options.diagramType ? { diagramType: options.diagramType } : {}),
6444
6448
  ...(options.quality ? { quality: options.quality } : {}),
6445
6449
  },
6446
6450
  responseType: "architectural-views.deliver.response",
@@ -6479,6 +6483,7 @@ export class DaemonClient {
6479
6483
  title: options.title,
6480
6484
  knowledgeReferences: options.knowledgeReferences,
6481
6485
  ...(options.sourcePath ? { sourcePath: options.sourcePath } : {}),
6486
+ ...(options.diagramType ? { diagramType: options.diagramType } : {}),
6482
6487
  ...(options.quality ? { quality: options.quality } : {}),
6483
6488
  },
6484
6489
  responseType: "architectural-views.draft.create.response",
@@ -6534,6 +6539,17 @@ export class DaemonClient {
6534
6539
  responseType: "architectural-views.draft.get-content.response",
6535
6540
  });
6536
6541
  }
6542
+ async listArchitecturalViewDrafts(options) {
6543
+ return this.sendCorrelatedSessionRequest({
6544
+ requestId: options.requestId,
6545
+ message: {
6546
+ type: "architectural-views.draft.list.request",
6547
+ workspaceId: options.workspaceId,
6548
+ ...(options.knowledgeReference ? { knowledgeReference: options.knowledgeReference } : {}),
6549
+ },
6550
+ responseType: "architectural-views.draft.list.response",
6551
+ });
6552
+ }
6537
6553
  onTerminalStreamEvent(handler) {
6538
6554
  return this.terminalStreams.onEvent(handler);
6539
6555
  }
@@ -7259,21 +7275,4 @@ export class DaemonClient {
7259
7275
  }
7260
7276
  }
7261
7277
  }
7262
- function resolveAgentConfig(options) {
7263
- const { config, provider, cwd, env: _env, workspaceId: _workspaceId, initialPrompt: _initialPrompt, images: _images, git: _git, worktreeName: _worktreeName, requestId: _requestId, labels: _labels, ...overrides } = options;
7264
- const baseConfig = {
7265
- ...(provider ? { provider } : {}),
7266
- ...(cwd ? { cwd } : {}),
7267
- ...overrides,
7268
- };
7269
- const merged = config ? { ...baseConfig, ...config } : baseConfig;
7270
- if (!merged.provider || !merged.cwd) {
7271
- throw new Error("createAgent requires provider and cwd");
7272
- }
7273
- return {
7274
- ...merged,
7275
- provider: merged.provider,
7276
- cwd: merged.cwd,
7277
- };
7278
- }
7279
7278
  //# sourceMappingURL=daemon-client.js.map
@@ -0,0 +1,7 @@
1
+ export interface FetchAgentOptions {
2
+ agentId: string;
3
+ requestId?: string;
4
+ timeout?: number;
5
+ }
6
+ export declare function normalizeFetchAgentOptions(input: FetchAgentOptions | string, legacyOptions?: Omit<FetchAgentOptions, "agentId"> | string): FetchAgentOptions;
7
+ //# sourceMappingURL=fetch-agent-options.d.ts.map
@@ -0,0 +1,12 @@
1
+ // COMPAT(daemon-client-object-options): added in v0.1.102; remove after
2
+ // 2026-12-29 once SDK callers have migrated to object parameters.
3
+ export function normalizeFetchAgentOptions(input, legacyOptions) {
4
+ if (typeof input !== "string") {
5
+ return input;
6
+ }
7
+ if (typeof legacyOptions === "string") {
8
+ return { agentId: input, requestId: legacyOptions };
9
+ }
10
+ return { agentId: input, ...legacyOptions };
11
+ }
12
+ //# sourceMappingURL=fetch-agent-options.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otto-code/client",
3
- "version": "0.9.0",
3
+ "version": "0.9.3",
4
4
  "description": "Otto client SDK package",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "files": [
@@ -40,8 +40,8 @@
40
40
  "test": "vitest run"
41
41
  },
42
42
  "dependencies": {
43
- "@otto-code/protocol": "0.9.0",
44
- "@otto-code/relay": "0.9.0",
43
+ "@otto-code/protocol": "0.9.3",
44
+ "@otto-code/relay": "0.9.3",
45
45
  "zod": "^4.4.3"
46
46
  },
47
47
  "devDependencies": {