@bobannomi/client 0.7.0 → 0.8.0

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/index.d.ts CHANGED
@@ -606,10 +606,15 @@ interface SessionActivityPage {
606
606
  lastRunStatus?: "completed" | "failed" | "interrupted";
607
607
  attentionSeq: number;
608
608
  activeRunId?: string;
609
+ goalActivity?: SessionGoalActivity;
609
610
  pendingQuestionIds: string[];
610
611
  pendingApprovalIds: string[];
611
612
  }[];
612
613
  }
614
+ interface SessionGoalActivity {
615
+ executionState: "running" | "needs_input" | "completed" | "failed" | "interrupted";
616
+ attentionId?: string;
617
+ }
613
618
 
614
619
  type GoalStatus = "active" | "waiting_user" | "blocked" | "paused" | "completed" | "cancelled";
615
620
  type GoalAction = "pause" | "resume" | "cancel" | "budget" | "cancel_resume";
@@ -2600,7 +2605,7 @@ interface PluginLocalInstallInput extends PluginLocalPreviewInput {
2600
2605
  link?: boolean;
2601
2606
  }
2602
2607
  interface PluginArchivePreviewInput {
2603
- cwd: string;
2608
+ cwd?: string;
2604
2609
  archivePath: string;
2605
2610
  }
2606
2611
  interface PluginArchiveInstallInput extends PluginArchivePreviewInput {
@@ -2609,7 +2614,7 @@ interface PluginArchiveInstallInput extends PluginArchivePreviewInput {
2609
2614
  allowSourceChange?: boolean;
2610
2615
  }
2611
2616
  interface PluginGitPreviewInput {
2612
- cwd: string;
2617
+ cwd?: string;
2613
2618
  url: string;
2614
2619
  ref?: string;
2615
2620
  }
@@ -3165,6 +3170,9 @@ declare class AttachmentResource {
3165
3170
  }): Promise<AttachmentAssetRecord>;
3166
3171
  }
3167
3172
 
3173
+ type SavedToolApproval = PermissionRequestRecord & {
3174
+ sessionTitle?: string;
3175
+ };
3168
3176
  declare class PermissionResource {
3169
3177
  #private;
3170
3178
  constructor(transport: HttpTransport);
@@ -3185,7 +3193,7 @@ declare class PermissionResource {
3185
3193
  }) => Promise<PermissionRequestRecord>;
3186
3194
  };
3187
3195
  readonly approvals: {
3188
- list: () => Promise<PermissionRequestRecord[]>;
3196
+ list: () => Promise<SavedToolApproval[]>;
3189
3197
  revoke: (requestId: string) => Promise<PermissionRequestRecord>;
3190
3198
  };
3191
3199
  }
@@ -3193,19 +3201,22 @@ declare class PermissionResource {
3193
3201
  type RequestOptions$7 = {
3194
3202
  signal?: AbortSignal;
3195
3203
  };
3204
+ type DirectoryOptional<T> = Omit<T, "cwd"> & {
3205
+ cwd?: string;
3206
+ };
3196
3207
  /** Manage marketplace sources and look up the result of an original install. */
3197
3208
  declare class PluginMarketplaceResource {
3198
3209
  private readonly transport;
3199
3210
  constructor(transport: HttpTransport);
3200
- catalog({ signal, ...query }: MarketplaceCatalogRequest & RequestOptions$7): Promise<MarketplaceCatalog>;
3211
+ catalog({ signal, ...query }?: DirectoryOptional<MarketplaceCatalogRequest> & RequestOptions$7): Promise<MarketplaceCatalog>;
3201
3212
  listSources(options?: RequestOptions$7): Promise<MarketplaceSourcesResponse>;
3202
3213
  addSource(input: MarketplaceAddSourceRequest, options?: RequestOptions$7): Promise<MarketplaceSourcesResponse>;
3203
3214
  setSourceEnabled(sourceId: string, input: MarketplaceSourceEnabledRequest, options?: RequestOptions$7): Promise<MarketplaceSourcesResponse>;
3204
3215
  removeSource(sourceId: string, options?: RequestOptions$7): Promise<MarketplaceSourcesResponse>;
3205
- preview(input: MarketplacePreviewRequest, options?: RequestOptions$7): Promise<MarketplacePreview>;
3216
+ preview(input: DirectoryOptional<MarketplacePreviewRequest>, options?: RequestOptions$7): Promise<MarketplacePreview>;
3206
3217
  cancel(input: MarketplaceCancelRequest, options?: RequestOptions$7): Promise<MarketplaceCancelResponse>;
3207
3218
  /** Save the operation ID before submitting. Recover an uncertain result with getOperation. */
3208
- install(input: MarketplaceInstallRequest, options?: RequestOptions$7): Promise<MarketplaceOperation>;
3219
+ install(input: DirectoryOptional<MarketplaceInstallRequest>, options?: RequestOptions$7): Promise<MarketplaceOperation>;
3209
3220
  /** Look up the original operation without repeating its install. */
3210
3221
  getOperation(operationId: string, options?: RequestOptions$7): Promise<MarketplaceOperation>;
3211
3222
  }
@@ -3214,18 +3225,31 @@ type RequestOptions$6 = {
3214
3225
  signal?: AbortSignal;
3215
3226
  };
3216
3227
  type DirectoryInput = {
3217
- cwd: string;
3228
+ cwd?: string;
3218
3229
  };
3219
3230
  type PluginMessage = {
3220
3231
  message: string;
3221
3232
  };
3233
+ type IconInput = DirectoryInput & {
3234
+ pluginId: string;
3235
+ } & ({
3236
+ sourceId?: never;
3237
+ version?: never;
3238
+ } | {
3239
+ sourceId: string;
3240
+ version: string;
3241
+ });
3222
3242
  /** Manage native plugins in the daemon. Uses a management connection. */
3223
3243
  declare class PluginResource {
3224
3244
  private readonly transport;
3225
3245
  readonly marketplace: PluginMarketplaceResource;
3226
3246
  constructor(transport: HttpTransport);
3227
3247
  /** List native plugins for a directory in the daemon environment. */
3228
- list({ signal, cwd }: DirectoryInput & RequestOptions$6): Promise<PluginListResult>;
3248
+ list({ signal, cwd }?: DirectoryInput & RequestOptions$6): Promise<PluginListResult>;
3249
+ /** Load an image from an installed plugin or a marketplace entry in the daemon. */
3250
+ getIcon(input: IconInput, options?: RequestOptions$6): Promise<{
3251
+ icon: string | null;
3252
+ }>;
3229
3253
  enable(id: string, input: DirectoryInput, options?: RequestOptions$6): Promise<PluginMessage>;
3230
3254
  disable(id: string, input: DirectoryInput, options?: RequestOptions$6): Promise<PluginMessage>;
3231
3255
  /** Read the identity, digest and requested permissions for a directory on the daemon machine. */
@@ -3241,7 +3265,7 @@ declare class PluginResource {
3241
3265
  /** Install the previewed Git source with its original digest and approved permissions. */
3242
3266
  installGit(input: PluginGitInstallInput, options?: RequestOptions$6): Promise<PluginMessage>;
3243
3267
  uninstall(id: string, input: DirectoryInput, options?: RequestOptions$6): Promise<PluginMessage>;
3244
- reload(input: DirectoryInput, options?: RequestOptions$6): Promise<ReloadPluginsResponse>;
3268
+ reload(input?: DirectoryInput, options?: RequestOptions$6): Promise<ReloadPluginsResponse>;
3245
3269
  }
3246
3270
 
3247
3271
  type RequestOptions$5 = {
@@ -3432,6 +3456,10 @@ type McpManagedServerSummary = Omit<McpOAuthStatusSnapshot["servers"][number], "
3432
3456
  summary: string;
3433
3457
  runtimeRef?: McpServerRuntimeRef;
3434
3458
  };
3459
+ /** Application registrations appear as read-only rows in the global inventory. */
3460
+ type McpServerInventoryEntry = McpManagedServerSummary & {
3461
+ readOnly?: true;
3462
+ };
3435
3463
  interface McpConfigOperationResult {
3436
3464
  persisted: boolean;
3437
3465
  credentialRemoved: boolean;
@@ -3445,6 +3473,10 @@ declare class McpServersResource {
3445
3473
  list(options?: RequestOptions$2): Promise<{
3446
3474
  servers: McpManagedServerSummary[];
3447
3475
  }>;
3476
+ /** List manually configured and application-registered connections without credentials. */
3477
+ inventory(options?: RequestOptions$2): Promise<{
3478
+ servers: McpServerInventoryEntry[];
3479
+ }>;
3448
3480
  getConfig(name: string, options?: RequestOptions$2): Promise<McpManagedServerConfig>;
3449
3481
  exportConfig(options?: RequestOptions$2): Promise<{
3450
3482
  mcpServers: Record<string, McpManagedServerConfig>;
@@ -3712,6 +3744,12 @@ declare class MaintenanceResource {
3712
3744
  readonly usage: {
3713
3745
  get: (input?: UsageFilter, options?: RequestOptions$1) => Promise<UsageReport>;
3714
3746
  getSettings: (options?: RequestOptions$1) => Promise<UsageSettings>;
3747
+ /** Read whether known usage has reached the current monthly budget. */
3748
+ getBudgetStatus: (options?: RequestOptions$1) => Promise<{
3749
+ monthStart: number;
3750
+ budget: UsageBudget;
3751
+ reached: boolean;
3752
+ }>;
3715
3753
  updateBudget: (input: UsageBudget & {
3716
3754
  expected?: UsageBudget;
3717
3755
  }, options?: RequestOptions$1) => Promise<UsageSettings>;
@@ -3847,10 +3885,171 @@ interface GlobalSettingsPatch {
3847
3885
  showReasoning?: boolean;
3848
3886
  systemPrompt?: string | null;
3849
3887
  }
3888
+ interface RuntimeEnvironmentConfig {
3889
+ kind: "native" | "wsl";
3890
+ distribution?: string;
3891
+ shell?: {
3892
+ executable: string;
3893
+ args: string[];
3894
+ };
3895
+ env?: Record<string, string>;
3896
+ secretEnv?: string[];
3897
+ }
3898
+ interface RuntimeSettingsSnapshot {
3899
+ userConfig: RuntimeEnvironmentConfig;
3900
+ projectConfig: RuntimeEnvironmentConfig | null;
3901
+ activeDefault: RuntimeEnvironmentConfig;
3902
+ effective: RuntimeEnvironmentConfig;
3903
+ source: string;
3904
+ restartRequired: boolean;
3905
+ wslSupported: boolean;
3906
+ inheritedVariableNames: string[];
3907
+ distributions: string[];
3908
+ secretRevision: string;
3909
+ }
3910
+ interface SaveRuntimeEnvironmentInput {
3911
+ cwd?: string;
3912
+ config: RuntimeEnvironmentConfig | null;
3913
+ expected: RuntimeEnvironmentConfig | null;
3914
+ secrets?: Record<string, string | null>;
3915
+ expectedSecretRevision?: string;
3916
+ }
3917
+ interface RuntimeEnvironmentCheck {
3918
+ name: string;
3919
+ status: "ok" | "warning" | "failed";
3920
+ detail: string;
3921
+ }
3922
+ interface PersonalizationMemoryPreferences {
3923
+ enabled: boolean;
3924
+ autoExtractEnabled: boolean;
3925
+ sessionMemoryEnabled: boolean;
3926
+ autoDreamEnabled: boolean;
3927
+ autoDreamMinHours: number;
3928
+ autoDreamMinSessions: number;
3929
+ }
3930
+ interface PersonalizationSettingsSnapshot {
3931
+ effective: PersonalizationMemoryPreferences;
3932
+ configured: (Partial<PersonalizationMemoryPreferences> & {
3933
+ maxFiles?: number;
3934
+ maxEntrypointLines?: number;
3935
+ }) | null;
3936
+ sources: Record<string, string>;
3937
+ rules: string[];
3938
+ consolidation: {
3939
+ lastConsolidatedAt: number | null;
3940
+ status: string;
3941
+ taskId?: string;
3942
+ finishedAt?: number;
3943
+ error?: string;
3944
+ };
3945
+ projectId?: string;
3946
+ projectPath?: string;
3947
+ }
3948
+ interface SavePersonalizationSettingsInput {
3949
+ projectId?: string;
3950
+ value: PersonalizationMemoryPreferences | null;
3951
+ expected: PersonalizationSettingsSnapshot["configured"];
3952
+ }
3953
+ interface PortableSettingsFile {
3954
+ version: 1;
3955
+ groups: Record<string, Record<string, unknown>>;
3956
+ }
3957
+ interface PortableSettingsPreview {
3958
+ id: string;
3959
+ groups: Array<{
3960
+ id: string;
3961
+ changes: Array<{
3962
+ key: string;
3963
+ before: string;
3964
+ after: string;
3965
+ }>;
3966
+ }>;
3967
+ }
3968
+ interface GlobalPermissionRules {
3969
+ mode: ApprovalMode;
3970
+ allowedTools?: string[];
3971
+ deniedTools?: string[];
3972
+ autoApproveTools?: string[];
3973
+ deniedCommands?: string[];
3974
+ pathRules?: Array<{
3975
+ pattern: string;
3976
+ allow: boolean;
3977
+ }>;
3978
+ }
3979
+ interface IsolationSettings {
3980
+ enabled: boolean;
3981
+ failIfUnavailable: boolean;
3982
+ enabledPlatforms: Array<"linux" | "wsl" | "macos">;
3983
+ filesystem: {
3984
+ allowRead: string[];
3985
+ denyRead: string[];
3986
+ allowWrite: string[];
3987
+ denyWrite: string[];
3988
+ extraAllowedRoots: string[];
3989
+ };
3990
+ network: {
3991
+ mode: "none" | "bridge" | "host" | "proxy";
3992
+ allowedDomains: string[];
3993
+ deniedDomains: string[];
3994
+ strictDomainPolicy: boolean;
3995
+ };
3996
+ srt: {
3997
+ runtimeCommand: string;
3998
+ };
3999
+ }
4000
+ interface PermissionConfigurationSnapshot {
4001
+ permission: GlobalPermissionRules;
4002
+ sandbox: IsolationSettings;
4003
+ isolationAvailable: boolean;
4004
+ isolationReason: string | null;
4005
+ environment: "native" | "wsl";
4006
+ }
4007
+ interface CheckPermissionConfigurationInput {
4008
+ permission: GlobalPermissionRules;
4009
+ toolName: string;
4010
+ path?: string;
4011
+ command?: string;
4012
+ cwd: string;
4013
+ }
3850
4014
  /** Daemon settings, profile and output styles. */
3851
4015
  declare class SettingsResource {
3852
4016
  private readonly transport;
3853
4017
  constructor(transport: HttpTransport);
4018
+ /** Runtime environment management from an existing full daemon connection. */
4019
+ readonly runtimeEnvironment: {
4020
+ get: ({ cwd }?: {
4021
+ cwd?: string;
4022
+ }, options?: RequestOptions) => Promise<RuntimeSettingsSnapshot>;
4023
+ save: (input: SaveRuntimeEnvironmentInput, options?: RequestOptions) => Promise<RuntimeSettingsSnapshot>;
4024
+ check: (input: {
4025
+ cwd: string;
4026
+ config: RuntimeEnvironmentConfig;
4027
+ }, options?: RequestOptions) => Promise<RuntimeEnvironmentCheck[]>;
4028
+ };
4029
+ /** Global or registered-project memory configuration from a full daemon connection. */
4030
+ readonly personalization: {
4031
+ get: ({ projectId }?: {
4032
+ projectId?: string;
4033
+ }, options?: RequestOptions) => Promise<PersonalizationSettingsSnapshot>;
4034
+ save: (input: SavePersonalizationSettingsInput, options?: RequestOptions) => Promise<PersonalizationSettingsSnapshot>;
4035
+ };
4036
+ /** Export selected non-secret settings and confirm an import preview from the same daemon. */
4037
+ readonly portable: {
4038
+ export: (categories: string[], options?: RequestOptions) => Promise<PortableSettingsFile>;
4039
+ preview: (value: unknown, options?: RequestOptions) => Promise<PortableSettingsPreview>;
4040
+ apply: ({ id, categories }: {
4041
+ id: string;
4042
+ categories: string[];
4043
+ }, options?: RequestOptions) => Promise<void>;
4044
+ };
4045
+ /** Read the daemon's effective isolation availability or check a draft rule without running it. */
4046
+ readonly permissionConfiguration: {
4047
+ get: (options?: RequestOptions) => Promise<PermissionConfigurationSnapshot>;
4048
+ check: (input: CheckPermissionConfigurationInput, options?: RequestOptions) => Promise<{
4049
+ action: "allow" | "deny" | "ask";
4050
+ reason?: string;
4051
+ }>;
4052
+ };
3854
4053
  /** Read the daemon's current global settings. */
3855
4054
  getGlobal({ signal }?: RequestOptions): Promise<Record<string, unknown>>;
3856
4055
  /** Read effective settings including overrides for a daemon-side project directory. */
@@ -4151,4 +4350,4 @@ declare function readSessionRuntimeConfig(session: SessionRecord, defaults?: Par
4151
4350
  declare function patchSessionRuntimeMetadata(metadata: Record<string, unknown>, patch: SessionRuntimeConfigPatch): Record<string, unknown>;
4152
4351
 
4153
4352
  export { AttachmentResource, BobanNomiApiError, BobanNomiClient, CURRENT_PROTOCOL_VERSION, ChannelResource, CommandResource, ContextResource, DiagnosticResource, EventResource, GitResource, HookResource, HttpTransport, IncompatibleProtocolError, MaintenanceResource, McpResource, McpServersResource, MemoryResource, PermissionResource, PluginMarketplaceResource, PluginResource, ProjectResource, ProtocolClient, ProtocolValidationError, ScheduleResource, SessionResource, SessionSyncController, SettingsResource, SseTransport, TerminalResource, UnsupportedSessionEventSchemaVersionError, WorktreeResource, applyEvent, applyEvents, attachmentRangeHeader, checkProtocolCompatibility, createClientState, createSessionRequestId, getVisibleSessionMessages, hydrateState, isSupersededModelPart, isWorkMode, normalizeApprovalMode, normalizeDaemonBaseUrl, parseCreateSessionGoalInput, parseGoalActionInput, parseMcpCallResultData, parseUpdateSessionGoalInput, patchSessionRuntimeMetadata, readRuntimeMetadata, readSessionModelRetryState, readSessionModelUsage, readSessionRuntimeConfig, readWorkspaceChangesMetadata, replaceSessionState, responseArray, responseField, selectFirstPendingPermission, selectSessionInputs, selectSessionMessagesWithParts, selectSessionModelRetry, selectSessionModelUsage, selectSessionOrderedMessages, selectSessionParts, selectSessionPermissions, selectSessionRuns, selectSessionTasks, streamServerSentEvents, supportsFeature, syncEvents };
4154
- export type { AdmitClientPromptInput, AdmitPromptAttachmentInput, AgentEnvironmentCapabilities, AgentPersonaInfo, ApprovalMode, ApprovalReviewRecord, AttachmentAssetRecord, AttachmentStorageGcResult, AttachmentStorageIssue, AttachmentStorageRepairResult, AttachmentStorageReport, AuthStatus, BobanNomiClientOptions, BobanNomiClientState, BobanNomiServerHealth, CancelQueuedClientPromptInput, CancelQueuedPromptResponse, CancelResponseMode, ChannelConnectorRuntimeStatus, ChannelDeliveryRecord, ChannelDeliveryStatus, ChannelDenialNotice, ChannelDomain, ChannelQuery, ChannelRuntimeControlInput, ChannelRuntimeState, ChannelRuntimeStatus, ChannelStatusSnapshot, CleanupCandidate, CleanupPreview, CleanupResult, ClearMemoryInput, ClientModelConnection, ClientModelProvider, ClientProtocolSupport, CommandCatalogEntry, CommandKind, CommandSelection, CommandSource, ConfigureClientSessionInput, ContextBucketId, ContextUsageBucket, ContextUsageSnapshot, ContextUsageTip, ContextUsageTipCode, CreateBackgroundShellInput, CreateBackgroundShellResult, CreateClientSessionInput, CreateScheduledTaskInput, CreateSessionByProjectInput, CreateSessionGoalInput, CreateSessionWithDirectoryInput, CustomModelProviderInput, DaemonRestartPreview, DiagnosticExecutionQuery, DispatchedSessionCreation, DispatchedSessionCreationRequest, DownloadAttachmentOptions, DraftComposerOptions, DraftComposerTarget, DurableChannelMessageInput, DurableChannelMessageResult, EditLatestClientPromptInput, EventSyncOptions, ExecutionInstructions, ExpectedModelConnection, ExternalConversationRecord, FactReplacementResult, FeishuAllowInput, FeishuChannelSnapshot, FeishuComposedSnapshot, FeishuConnectInput, FeishuPatchInput, FeishuRegistrationSnapshot, FeishuRegistrationStartInput, FeishuRegistrationState, ForkClientSessionInput, GlobalSettingsPatch, GoalActionInput, GoalExternalWait, GoalStopReason, HookInfo, HostDiagnosticSnapshots, HttpRequestOptions, HttpTransportOptions, InputDelivery, InterruptSessionResponse, JobCancelReceipt, JobCapabilities, JobInputReceipt, JobKind, JobListResult, JobReadResult, JobSnapshot, JobStatus, JobTarget, JobWaitResult, JsonValue, ListClientMessagePartsOptions, ListCommandsOptions, ListEventsOptions, ListMessagePartsOptions, ListMessagesOptions, ListPermissionsOptions, ListProjectsOptions, ListSessionJobsOptions, ListSessionsOptions, MaintenanceBackupManifest, MaintenanceBackupResult, MarketplaceAddSourceRequest, MarketplaceCancelRequest, MarketplaceCancelResponse, MarketplaceCatalog, MarketplaceCatalogRequest, MarketplaceEntry, MarketplaceInstallInput, MarketplaceInstallRequest, MarketplaceOperation, MarketplacePreview, MarketplacePreviewRequest, MarketplaceProvenance, MarketplaceSelection, MarketplaceSource, MarketplaceSourceEnabledRequest, MarketplaceSourceView, MarketplaceSourcesResponse, McpConfigOperationResult, McpManagedServerConfig, McpManagedServerSummary, McpOAuthLoginInput, McpOAuthLoginResponse, McpOAuthStatusSnapshot, McpRuntimeStatus, McpRuntimeSyncResult, McpServerRuntimeRef, McpServerStatus, MemoryEntryRecord, MemoryListResponse, MemoryRevision, ModelInfo, ModelProviderConnection, ModelProviderInfo, ModelProviderRequest, OAuthOperationEvent, OAuthOperationView, OutputStyleInfo, PermissionRequestRecord, PermissionStatus, PluginArchiveError, PluginArchiveInstallInput, PluginArchivePreview, PluginArchivePreviewInput, PluginGitInstallInput, PluginGitPreview, PluginGitPreviewInput, PluginInfo, PluginListResult, PluginLocalInstallInput, PluginLocalPreview, PluginLocalPreviewInput, PluginRuntimeStatus, ProjectFactRecord, ProjectRecord, PromoteQueuedClientPromptInput, PromoteQueuedPromptResponse, PromptResponse, ProtocolCompatibility, ProviderConnectionTestResult, ProviderDefaultsRequest, ProviderDefaultsSnapshot, ProviderInfo, QueuedPromptCancelReceipt, RawRequestOptions, RecordChannelDeliveryInput, ReloadPluginsResponse, RememberSessionResponse, ReplyPermissionInput, ResolvedSessionConfiguration, ResumeInterruptedRunInput, ResumeInterruptedRunResponse, RewindSessionResponse, RunResult, ScheduledRunRecord, ScheduledTaskRecord, ScheduledTaskStatusSummary, SearchSessionsOptions, ServerCapabilities, SessionActivityPage, SessionAttachmentMessagePartRecord, SessionBucket, SessionComposerContext, SessionConfigurationInput, SessionConfigurationOptions, SessionConfigurationResultInput, SessionConfigurationSnapshot, SessionControlOriginal, SessionControlReceipt, SessionControls, SessionCreationInput, SessionCreationReceipt, SessionDirectoryEntry, SessionDirectoryPage, SessionDirectoryResult, SessionEventRecord, SessionExecutionRecord, SessionExportResponse, SessionFileErrorCode, SessionFileFindInput, SessionFileFindOptions, SessionFileInfo, SessionFileListInput, SessionFileListOptions, SessionFileReadInput, SessionFileReadOptions, SessionFileRequestOptions, SessionFileSearchInput, SessionFileSearchMatch, SessionFileSearchOptions, SessionFileStatInput, SessionFindFilesResult, SessionGoal, SessionGoalRequestReceipt, SessionHandle, SessionInputAttachmentRecord, SessionInputRecord, SessionManagementAction, SessionMessagePartRecord, SessionMessageRecord, SessionMessageWithParts, SessionModelRetryState, SessionModelUsageSummary, SessionMutationPublicReceipt, SessionObservation, SessionRecord, SessionResourceRevision, SessionRunAttemptRecord, SessionRunRecord, SessionRuntimeConfig, SessionRuntimeConfigPatch, SessionSearchFilesResult, SessionSearchResult, AgentSessionStateSnapshot as SessionStateSnapshot, SessionSyncControllerOptions, SessionTextFileResult, SessionTransformationMessagePartRecord, SessionUsageResponse, SessionUserInputItem, SkillInfo, SkillInstallInput, SkillMarketplaceEntry, SkillMarketplaceInstallInput, SkillProject, SkillSnapshot, SkillSource, StartDreamResponse, StorageCategory, StorageReport, StorageRetentionPolicy, SyncConnectionStatus, SyncEventUpdate, SyncEventsClient, TaskWorktreeRecord, TerminalCreateRequest, TerminalEvent, TerminalReadRequest, TerminalReadResult, TerminalResizeRequest, TerminalRuntime, TerminalSessionInfo, TerminalSessionStatus, TerminalSignal, TerminalSource, TerminalWriteRequest, UpdateMemoryEntryInput, UpdateScheduledTaskInput, UpdateSessionGoalInput, UploadAttachmentInput, UsageFilter, UsagePrice, UsageReport, UsageRequest, UsageSettings, WorkMode, WorkspaceChangeFile, WorkspaceChangesMetadata };
4353
+ export type { AdmitClientPromptInput, AdmitPromptAttachmentInput, AgentEnvironmentCapabilities, AgentPersonaInfo, ApprovalMode, ApprovalReviewRecord, AttachmentAssetRecord, AttachmentStorageGcResult, AttachmentStorageIssue, AttachmentStorageRepairResult, AttachmentStorageReport, AuthStatus, BobanNomiClientOptions, BobanNomiClientState, BobanNomiServerHealth, CancelQueuedClientPromptInput, CancelQueuedPromptResponse, CancelResponseMode, ChannelConnectorRuntimeStatus, ChannelDeliveryRecord, ChannelDeliveryStatus, ChannelDenialNotice, ChannelDomain, ChannelQuery, ChannelRuntimeControlInput, ChannelRuntimeState, ChannelRuntimeStatus, ChannelStatusSnapshot, CheckPermissionConfigurationInput, CleanupCandidate, CleanupPreview, CleanupResult, ClearMemoryInput, ClientModelConnection, ClientModelProvider, ClientProtocolSupport, CommandCatalogEntry, CommandKind, CommandSelection, CommandSource, ConfigureClientSessionInput, ContextBucketId, ContextUsageBucket, ContextUsageSnapshot, ContextUsageTip, ContextUsageTipCode, CreateBackgroundShellInput, CreateBackgroundShellResult, CreateClientSessionInput, CreateScheduledTaskInput, CreateSessionByProjectInput, CreateSessionGoalInput, CreateSessionWithDirectoryInput, CustomModelProviderInput, DaemonRestartPreview, DiagnosticExecutionQuery, DispatchedSessionCreation, DispatchedSessionCreationRequest, DownloadAttachmentOptions, DraftComposerOptions, DraftComposerTarget, DurableChannelMessageInput, DurableChannelMessageResult, EditLatestClientPromptInput, EventSyncOptions, ExecutionInstructions, ExpectedModelConnection, ExternalConversationRecord, FactReplacementResult, FeishuAllowInput, FeishuChannelSnapshot, FeishuComposedSnapshot, FeishuConnectInput, FeishuPatchInput, FeishuRegistrationSnapshot, FeishuRegistrationStartInput, FeishuRegistrationState, ForkClientSessionInput, GlobalPermissionRules, GlobalSettingsPatch, GoalActionInput, GoalExternalWait, GoalStopReason, HookInfo, HostDiagnosticSnapshots, HttpRequestOptions, HttpTransportOptions, InputDelivery, InterruptSessionResponse, IsolationSettings, JobCancelReceipt, JobCapabilities, JobInputReceipt, JobKind, JobListResult, JobReadResult, JobSnapshot, JobStatus, JobTarget, JobWaitResult, JsonValue, ListClientMessagePartsOptions, ListCommandsOptions, ListEventsOptions, ListMessagePartsOptions, ListMessagesOptions, ListPermissionsOptions, ListProjectsOptions, ListSessionJobsOptions, ListSessionsOptions, MaintenanceBackupManifest, MaintenanceBackupResult, MarketplaceAddSourceRequest, MarketplaceCancelRequest, MarketplaceCancelResponse, MarketplaceCatalog, MarketplaceCatalogRequest, MarketplaceEntry, MarketplaceInstallInput, MarketplaceInstallRequest, MarketplaceOperation, MarketplacePreview, MarketplacePreviewRequest, MarketplaceProvenance, MarketplaceSelection, MarketplaceSource, MarketplaceSourceEnabledRequest, MarketplaceSourceView, MarketplaceSourcesResponse, McpConfigOperationResult, McpManagedServerConfig, McpManagedServerSummary, McpOAuthLoginInput, McpOAuthLoginResponse, McpOAuthStatusSnapshot, McpRuntimeStatus, McpRuntimeSyncResult, McpServerInventoryEntry, McpServerRuntimeRef, McpServerStatus, MemoryEntryRecord, MemoryListResponse, MemoryRevision, ModelInfo, ModelProviderConnection, ModelProviderInfo, ModelProviderRequest, OAuthOperationEvent, OAuthOperationView, OutputStyleInfo, PermissionConfigurationSnapshot, PermissionRequestRecord, PermissionStatus, PersonalizationMemoryPreferences, PersonalizationSettingsSnapshot, PluginArchiveError, PluginArchiveInstallInput, PluginArchivePreview, PluginArchivePreviewInput, PluginGitInstallInput, PluginGitPreview, PluginGitPreviewInput, PluginInfo, PluginListResult, PluginLocalInstallInput, PluginLocalPreview, PluginLocalPreviewInput, PluginRuntimeStatus, PortableSettingsFile, PortableSettingsPreview, ProjectFactRecord, ProjectRecord, PromoteQueuedClientPromptInput, PromoteQueuedPromptResponse, PromptResponse, ProtocolCompatibility, ProviderConnectionTestResult, ProviderDefaultsRequest, ProviderDefaultsSnapshot, ProviderInfo, QueuedPromptCancelReceipt, RawRequestOptions, RecordChannelDeliveryInput, ReloadPluginsResponse, RememberSessionResponse, ReplyPermissionInput, ResolvedSessionConfiguration, ResumeInterruptedRunInput, ResumeInterruptedRunResponse, RewindSessionResponse, RunResult, RuntimeEnvironmentCheck, RuntimeEnvironmentConfig, RuntimeSettingsSnapshot, SavePersonalizationSettingsInput, SaveRuntimeEnvironmentInput, ScheduledRunRecord, ScheduledTaskRecord, ScheduledTaskStatusSummary, SearchSessionsOptions, ServerCapabilities, SessionActivityPage, SessionAttachmentMessagePartRecord, SessionBucket, SessionComposerContext, SessionConfigurationInput, SessionConfigurationOptions, SessionConfigurationResultInput, SessionConfigurationSnapshot, SessionControlOriginal, SessionControlReceipt, SessionControls, SessionCreationInput, SessionCreationReceipt, SessionDirectoryEntry, SessionDirectoryPage, SessionDirectoryResult, SessionEventRecord, SessionExecutionRecord, SessionExportResponse, SessionFileErrorCode, SessionFileFindInput, SessionFileFindOptions, SessionFileInfo, SessionFileListInput, SessionFileListOptions, SessionFileReadInput, SessionFileReadOptions, SessionFileRequestOptions, SessionFileSearchInput, SessionFileSearchMatch, SessionFileSearchOptions, SessionFileStatInput, SessionFindFilesResult, SessionGoal, SessionGoalRequestReceipt, SessionHandle, SessionInputAttachmentRecord, SessionInputRecord, SessionManagementAction, SessionMessagePartRecord, SessionMessageRecord, SessionMessageWithParts, SessionModelRetryState, SessionModelUsageSummary, SessionMutationPublicReceipt, SessionObservation, SessionRecord, SessionResourceRevision, SessionRunAttemptRecord, SessionRunRecord, SessionRuntimeConfig, SessionRuntimeConfigPatch, SessionSearchFilesResult, SessionSearchResult, AgentSessionStateSnapshot as SessionStateSnapshot, SessionSyncControllerOptions, SessionTextFileResult, SessionTransformationMessagePartRecord, SessionUsageResponse, SessionUserInputItem, SkillInfo, SkillInstallInput, SkillMarketplaceEntry, SkillMarketplaceInstallInput, SkillProject, SkillSnapshot, SkillSource, StartDreamResponse, StorageCategory, StorageReport, StorageRetentionPolicy, SyncConnectionStatus, SyncEventUpdate, SyncEventsClient, TaskWorktreeRecord, TerminalCreateRequest, TerminalEvent, TerminalReadRequest, TerminalReadResult, TerminalResizeRequest, TerminalRuntime, TerminalSessionInfo, TerminalSessionStatus, TerminalSignal, TerminalSource, TerminalWriteRequest, UpdateMemoryEntryInput, UpdateScheduledTaskInput, UpdateSessionGoalInput, UploadAttachmentInput, UsageFilter, UsagePrice, UsageReport, UsageRequest, UsageSettings, WorkMode, WorkspaceChangeFile, WorkspaceChangesMetadata };
package/dist/index.js CHANGED
@@ -4506,7 +4506,7 @@ var PluginMarketplaceResource = class {
4506
4506
  this.transport = transport;
4507
4507
  }
4508
4508
  transport;
4509
- catalog({ signal, ...query }) {
4509
+ catalog({ signal, ...query } = {}) {
4510
4510
  return this.transport.request(`${market}/catalog`, { query, signal });
4511
4511
  }
4512
4512
  listSources(options) {
@@ -4555,9 +4555,13 @@ var PluginResource = class {
4555
4555
  transport;
4556
4556
  marketplace;
4557
4557
  /** List native plugins for a directory in the daemon environment. */
4558
- list({ signal, cwd }) {
4558
+ list({ signal, cwd } = {}) {
4559
4559
  return this.transport.request("/plugins", { query: { cwd }, signal });
4560
4560
  }
4561
+ /** Load an image from an installed plugin or a marketplace entry in the daemon. */
4562
+ getIcon(input, options) {
4563
+ return this.transport.request("/plugins/icon", { ...options, query: input });
4564
+ }
4561
4565
  enable(id2, input, options) {
4562
4566
  return this.transport.request(`/plugins/${encodeURIComponent(id2)}/enable`, { ...options, method: "POST", body: input });
4563
4567
  }
@@ -4599,7 +4603,7 @@ var PluginResource = class {
4599
4603
  uninstall(id2, input, options) {
4600
4604
  return this.transport.request(`/plugins/${encodeURIComponent(id2)}`, { ...options, method: "DELETE", body: input });
4601
4605
  }
4602
- reload(input, options) {
4606
+ reload(input = {}, options) {
4603
4607
  return this.transport.request("/plugins/reload", { ...options, method: "POST", body: input });
4604
4608
  }
4605
4609
  };
@@ -4624,7 +4628,7 @@ var ChannelResource = class {
4624
4628
  disconnect: (options) => this.transport.request("/channels/feishu", { ...options, method: "DELETE" }),
4625
4629
  allowlist: {
4626
4630
  add: (input, options) => this.transport.request("/channels/feishu/allow", { ...options, method: "POST", body: input }),
4627
- remove: (key, options) => this.transport.request(`/channels/feishu/allow/${encodeURIComponent(key)}`, { ...options, method: "DELETE" })
4631
+ remove: (key, options) => this.transport.request("/channels/feishu/allow", { ...options, method: "DELETE", query: { key } })
4628
4632
  },
4629
4633
  registration: {
4630
4634
  start: (input = {}, options) => this.transport.request("/channels/feishu/registration", { ...options, method: "POST", body: input }),
@@ -4830,6 +4834,11 @@ var McpServersResource = class {
4830
4834
  list(options) {
4831
4835
  return this.request(this.basePath, options);
4832
4836
  }
4837
+ /** List manually configured and application-registered connections without credentials. */
4838
+ async inventory(options) {
4839
+ await requireDaemonFeature(this.transport, "mcpServerInventory", options?.signal);
4840
+ return this.request(`${this.basePath}/config/inventory`, options);
4841
+ }
4833
4842
  getConfig(name, options) {
4834
4843
  return this.request(this.serverPath(name), options);
4835
4844
  }
@@ -4843,13 +4852,13 @@ var McpServersResource = class {
4843
4852
  return this.request(this.serverPath(name), { ...options, method: "PUT", body });
4844
4853
  }
4845
4854
  setEnabled({ name, enabled }, options) {
4846
- return this.request(`${this.serverPath(name)}/enabled`, { ...options, method: "PUT", body: { enabled } });
4855
+ return this.request(this.serverPath(name, "/enabled"), { ...options, method: "PUT", body: { enabled } });
4847
4856
  }
4848
4857
  remove(name, options) {
4849
4858
  return this.request(this.serverPath(name), { ...options, method: "DELETE" });
4850
4859
  }
4851
- serverPath(name) {
4852
- return `${this.basePath}/${encodeURIComponent(name)}`;
4860
+ serverPath(name, suffix = "") {
4861
+ return this.transport.path(`${this.basePath}/config/entry${suffix}`, { name });
4853
4862
  }
4854
4863
  async request(path2, options) {
4855
4864
  await requireDaemonFeature(this.transport, "mcpServerManagement", options?.signal);
@@ -4901,7 +4910,7 @@ var McpResource = class {
4901
4910
  }
4902
4911
  async startLogin(name, input, options = {}) {
4903
4912
  return await this.transport.request(
4904
- `/mcp/${encodeURIComponent(name)}/oauth/login`,
4913
+ this.transport.path("/mcp/oauth/login", { name }),
4905
4914
  { method: "POST", body: input, signal: options.signal }
4906
4915
  );
4907
4916
  }
@@ -4925,7 +4934,7 @@ var McpResource = class {
4925
4934
  }
4926
4935
  async logout(name, options = {}) {
4927
4936
  return await this.transport.request(
4928
- `/mcp/${encodeURIComponent(name)}/oauth/logout`,
4937
+ this.transport.path("/mcp/oauth/logout", { name }),
4929
4938
  { method: "POST", body: {}, signal: options.signal }
4930
4939
  );
4931
4940
  }
@@ -5067,6 +5076,8 @@ var MaintenanceResource = class {
5067
5076
  usage = {
5068
5077
  get: (input = {}, options) => this.post("/usage", input, options),
5069
5078
  getSettings: (options) => this.transport.request("/maintenance/usage/settings", options),
5079
+ /** Read whether known usage has reached the current monthly budget. */
5080
+ getBudgetStatus: (options) => this.transport.request("/maintenance/usage/budget", options),
5070
5081
  updateBudget: (input, options) => this.post("/usage/budget", input, options),
5071
5082
  addPrice: (input, options) => this.post("/usage/price", input, options)
5072
5083
  };
@@ -5169,6 +5180,58 @@ var SettingsResource = class {
5169
5180
  this.transport = transport;
5170
5181
  }
5171
5182
  transport;
5183
+ /** Runtime environment management from an existing full daemon connection. */
5184
+ runtimeEnvironment = {
5185
+ get: async ({ cwd } = {}, options) => {
5186
+ await requireDaemonFeature(this.transport, "runtimeEnvironmentSettings", options?.signal);
5187
+ return this.transport.request(this.transport.path("/settings/runtime-environment", { cwd }), options);
5188
+ },
5189
+ save: async (input, options) => {
5190
+ await requireDaemonFeature(this.transport, "runtimeEnvironmentSettings", options?.signal);
5191
+ return this.transport.request("/settings/runtime-environment", { ...options, method: "PATCH", body: input });
5192
+ },
5193
+ check: async (input, options) => {
5194
+ await requireDaemonFeature(this.transport, "runtimeEnvironmentSettings", options?.signal);
5195
+ return this.transport.request("/settings/runtime-environment/check", { ...options, method: "POST", body: input });
5196
+ }
5197
+ };
5198
+ /** Global or registered-project memory configuration from a full daemon connection. */
5199
+ personalization = {
5200
+ get: async ({ projectId } = {}, options) => {
5201
+ await requireDaemonFeature(this.transport, "personalizationSettings", options?.signal);
5202
+ return this.transport.request(this.transport.path("/settings/personalization", { projectId }), options);
5203
+ },
5204
+ save: async (input, options) => {
5205
+ await requireDaemonFeature(this.transport, "personalizationSettings", options?.signal);
5206
+ return this.transport.request("/settings/personalization", { ...options, method: "PATCH", body: input });
5207
+ }
5208
+ };
5209
+ /** Export selected non-secret settings and confirm an import preview from the same daemon. */
5210
+ portable = {
5211
+ export: async (categories, options) => {
5212
+ await requireDaemonFeature(this.transport, "portableConfigurationSettings", options?.signal);
5213
+ return this.transport.request("/settings/portable/export", { ...options, method: "POST", body: { categories } });
5214
+ },
5215
+ preview: async (value, options) => {
5216
+ await requireDaemonFeature(this.transport, "portableConfigurationSettings", options?.signal);
5217
+ return this.transport.request("/settings/portable/preview", { ...options, method: "POST", body: { value } });
5218
+ },
5219
+ apply: async ({ id: id2, categories }, options) => {
5220
+ await requireDaemonFeature(this.transport, "portableConfigurationSettings", options?.signal);
5221
+ await this.update({ importConfiguration: { previewId: id2, categories } }, options);
5222
+ }
5223
+ };
5224
+ /** Read the daemon's effective isolation availability or check a draft rule without running it. */
5225
+ permissionConfiguration = {
5226
+ get: async (options) => {
5227
+ await requireDaemonFeature(this.transport, "permissionConfigurationSettings", options?.signal);
5228
+ return this.transport.request("/settings/permissions", options);
5229
+ },
5230
+ check: async (input, options) => {
5231
+ await requireDaemonFeature(this.transport, "permissionConfigurationSettings", options?.signal);
5232
+ return this.transport.request("/settings/permissions/check", { ...options, method: "POST", body: input });
5233
+ }
5234
+ };
5172
5235
  /** Read the daemon's current global settings. */
5173
5236
  getGlobal({ signal } = {}) {
5174
5237
  return this.get({ signal });