@bobannomi/client 0.6.1 → 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";
@@ -2006,12 +2011,20 @@ interface SkillMarketplaceEntry {
2006
2011
  sha256: string;
2007
2012
  };
2008
2013
  }
2009
- type SkillMarketplaceInstallInput = SkillMarketplaceSelection & ({
2014
+ type SkillMarketplaceInstallInput = SkillMarketplaceSelection & {
2015
+ allowWhileRunning?: boolean;
2016
+ } & ({
2010
2017
  scope: "personal";
2011
2018
  } | {
2012
2019
  scope: "project";
2013
2020
  projectPath: string;
2014
2021
  });
2022
+ type SkillInstallTarget = {
2023
+ scope: "personal";
2024
+ } | {
2025
+ scope: "project";
2026
+ projectId: string;
2027
+ };
2015
2028
  interface SkillInfo {
2016
2029
  id: string;
2017
2030
  name: string;
@@ -2448,6 +2461,10 @@ interface SessionFileFindOptions extends SessionFileFindInput, SessionFileReques
2448
2461
  interface SessionFileSearchOptions extends SessionFileSearchInput, SessionFileRequestOptions {
2449
2462
  }
2450
2463
 
2464
+ /** A ZIP containing one skill with SKILL.md at its root. */
2465
+ type SkillInstallInput = SkillInstallTarget & {
2466
+ archive: Blob | ArrayBuffer | Uint8Array | ReadableStream<Uint8Array>;
2467
+ };
2451
2468
  type CommandKind = "session" | "template";
2452
2469
  type CommandSelection = "execute" | "submenu" | "insert";
2453
2470
  type CommandSource = "builtin" | "bundled" | "user" | "plugin" | "project";
@@ -2588,7 +2605,7 @@ interface PluginLocalInstallInput extends PluginLocalPreviewInput {
2588
2605
  link?: boolean;
2589
2606
  }
2590
2607
  interface PluginArchivePreviewInput {
2591
- cwd: string;
2608
+ cwd?: string;
2592
2609
  archivePath: string;
2593
2610
  }
2594
2611
  interface PluginArchiveInstallInput extends PluginArchivePreviewInput {
@@ -2597,7 +2614,7 @@ interface PluginArchiveInstallInput extends PluginArchivePreviewInput {
2597
2614
  allowSourceChange?: boolean;
2598
2615
  }
2599
2616
  interface PluginGitPreviewInput {
2600
- cwd: string;
2617
+ cwd?: string;
2601
2618
  url: string;
2602
2619
  ref?: string;
2603
2620
  }
@@ -3153,6 +3170,9 @@ declare class AttachmentResource {
3153
3170
  }): Promise<AttachmentAssetRecord>;
3154
3171
  }
3155
3172
 
3173
+ type SavedToolApproval = PermissionRequestRecord & {
3174
+ sessionTitle?: string;
3175
+ };
3156
3176
  declare class PermissionResource {
3157
3177
  #private;
3158
3178
  constructor(transport: HttpTransport);
@@ -3173,7 +3193,7 @@ declare class PermissionResource {
3173
3193
  }) => Promise<PermissionRequestRecord>;
3174
3194
  };
3175
3195
  readonly approvals: {
3176
- list: () => Promise<PermissionRequestRecord[]>;
3196
+ list: () => Promise<SavedToolApproval[]>;
3177
3197
  revoke: (requestId: string) => Promise<PermissionRequestRecord>;
3178
3198
  };
3179
3199
  }
@@ -3181,19 +3201,22 @@ declare class PermissionResource {
3181
3201
  type RequestOptions$7 = {
3182
3202
  signal?: AbortSignal;
3183
3203
  };
3204
+ type DirectoryOptional<T> = Omit<T, "cwd"> & {
3205
+ cwd?: string;
3206
+ };
3184
3207
  /** Manage marketplace sources and look up the result of an original install. */
3185
3208
  declare class PluginMarketplaceResource {
3186
3209
  private readonly transport;
3187
3210
  constructor(transport: HttpTransport);
3188
- catalog({ signal, ...query }: MarketplaceCatalogRequest & RequestOptions$7): Promise<MarketplaceCatalog>;
3211
+ catalog({ signal, ...query }?: DirectoryOptional<MarketplaceCatalogRequest> & RequestOptions$7): Promise<MarketplaceCatalog>;
3189
3212
  listSources(options?: RequestOptions$7): Promise<MarketplaceSourcesResponse>;
3190
3213
  addSource(input: MarketplaceAddSourceRequest, options?: RequestOptions$7): Promise<MarketplaceSourcesResponse>;
3191
3214
  setSourceEnabled(sourceId: string, input: MarketplaceSourceEnabledRequest, options?: RequestOptions$7): Promise<MarketplaceSourcesResponse>;
3192
3215
  removeSource(sourceId: string, options?: RequestOptions$7): Promise<MarketplaceSourcesResponse>;
3193
- preview(input: MarketplacePreviewRequest, options?: RequestOptions$7): Promise<MarketplacePreview>;
3216
+ preview(input: DirectoryOptional<MarketplacePreviewRequest>, options?: RequestOptions$7): Promise<MarketplacePreview>;
3194
3217
  cancel(input: MarketplaceCancelRequest, options?: RequestOptions$7): Promise<MarketplaceCancelResponse>;
3195
3218
  /** Save the operation ID before submitting. Recover an uncertain result with getOperation. */
3196
- install(input: MarketplaceInstallRequest, options?: RequestOptions$7): Promise<MarketplaceOperation>;
3219
+ install(input: DirectoryOptional<MarketplaceInstallRequest>, options?: RequestOptions$7): Promise<MarketplaceOperation>;
3197
3220
  /** Look up the original operation without repeating its install. */
3198
3221
  getOperation(operationId: string, options?: RequestOptions$7): Promise<MarketplaceOperation>;
3199
3222
  }
@@ -3202,18 +3225,31 @@ type RequestOptions$6 = {
3202
3225
  signal?: AbortSignal;
3203
3226
  };
3204
3227
  type DirectoryInput = {
3205
- cwd: string;
3228
+ cwd?: string;
3206
3229
  };
3207
3230
  type PluginMessage = {
3208
3231
  message: string;
3209
3232
  };
3233
+ type IconInput = DirectoryInput & {
3234
+ pluginId: string;
3235
+ } & ({
3236
+ sourceId?: never;
3237
+ version?: never;
3238
+ } | {
3239
+ sourceId: string;
3240
+ version: string;
3241
+ });
3210
3242
  /** Manage native plugins in the daemon. Uses a management connection. */
3211
3243
  declare class PluginResource {
3212
3244
  private readonly transport;
3213
3245
  readonly marketplace: PluginMarketplaceResource;
3214
3246
  constructor(transport: HttpTransport);
3215
3247
  /** List native plugins for a directory in the daemon environment. */
3216
- 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
+ }>;
3217
3253
  enable(id: string, input: DirectoryInput, options?: RequestOptions$6): Promise<PluginMessage>;
3218
3254
  disable(id: string, input: DirectoryInput, options?: RequestOptions$6): Promise<PluginMessage>;
3219
3255
  /** Read the identity, digest and requested permissions for a directory on the daemon machine. */
@@ -3229,7 +3265,7 @@ declare class PluginResource {
3229
3265
  /** Install the previewed Git source with its original digest and approved permissions. */
3230
3266
  installGit(input: PluginGitInstallInput, options?: RequestOptions$6): Promise<PluginMessage>;
3231
3267
  uninstall(id: string, input: DirectoryInput, options?: RequestOptions$6): Promise<PluginMessage>;
3232
- reload(input: DirectoryInput, options?: RequestOptions$6): Promise<ReloadPluginsResponse>;
3268
+ reload(input?: DirectoryInput, options?: RequestOptions$6): Promise<ReloadPluginsResponse>;
3233
3269
  }
3234
3270
 
3235
3271
  type RequestOptions$5 = {
@@ -3420,6 +3456,10 @@ type McpManagedServerSummary = Omit<McpOAuthStatusSnapshot["servers"][number], "
3420
3456
  summary: string;
3421
3457
  runtimeRef?: McpServerRuntimeRef;
3422
3458
  };
3459
+ /** Application registrations appear as read-only rows in the global inventory. */
3460
+ type McpServerInventoryEntry = McpManagedServerSummary & {
3461
+ readOnly?: true;
3462
+ };
3423
3463
  interface McpConfigOperationResult {
3424
3464
  persisted: boolean;
3425
3465
  credentialRemoved: boolean;
@@ -3433,6 +3473,10 @@ declare class McpServersResource {
3433
3473
  list(options?: RequestOptions$2): Promise<{
3434
3474
  servers: McpManagedServerSummary[];
3435
3475
  }>;
3476
+ /** List manually configured and application-registered connections without credentials. */
3477
+ inventory(options?: RequestOptions$2): Promise<{
3478
+ servers: McpServerInventoryEntry[];
3479
+ }>;
3436
3480
  getConfig(name: string, options?: RequestOptions$2): Promise<McpManagedServerConfig>;
3437
3481
  exportConfig(options?: RequestOptions$2): Promise<{
3438
3482
  mcpServers: Record<string, McpManagedServerConfig>;
@@ -3700,6 +3744,12 @@ declare class MaintenanceResource {
3700
3744
  readonly usage: {
3701
3745
  get: (input?: UsageFilter, options?: RequestOptions$1) => Promise<UsageReport>;
3702
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
+ }>;
3703
3753
  updateBudget: (input: UsageBudget & {
3704
3754
  expected?: UsageBudget;
3705
3755
  }, options?: RequestOptions$1) => Promise<UsageSettings>;
@@ -3835,10 +3885,171 @@ interface GlobalSettingsPatch {
3835
3885
  showReasoning?: boolean;
3836
3886
  systemPrompt?: string | null;
3837
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
+ }
3838
4014
  /** Daemon settings, profile and output styles. */
3839
4015
  declare class SettingsResource {
3840
4016
  private readonly transport;
3841
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
+ };
3842
4053
  /** Read the daemon's current global settings. */
3843
4054
  getGlobal({ signal }?: RequestOptions): Promise<Record<string, unknown>>;
3844
4055
  /** Read effective settings including overrides for a daemon-side project directory. */
@@ -4035,6 +4246,9 @@ declare class BobanNomiClient {
4035
4246
  list: (options?: {
4036
4247
  signal?: AbortSignal;
4037
4248
  }) => Promise<SkillSnapshot>;
4249
+ install(input: SkillInstallInput, options?: {
4250
+ signal?: AbortSignal;
4251
+ }): Promise<SkillInfo>;
4038
4252
  marketplace: {
4039
4253
  list: (options?: {
4040
4254
  signal?: AbortSignal;
@@ -4136,4 +4350,4 @@ declare function readSessionRuntimeConfig(session: SessionRecord, defaults?: Par
4136
4350
  declare function patchSessionRuntimeMetadata(metadata: Record<string, unknown>, patch: SessionRuntimeConfigPatch): Record<string, unknown>;
4137
4351
 
4138
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 };
4139
- 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, 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
@@ -4448,6 +4448,18 @@ function createRuntimeResources(transport, providers) {
4448
4448
  },
4449
4449
  skills: {
4450
4450
  list: (options) => transport.request("/skills", options),
4451
+ /** Install a ZIP into the current daemon's personal or authorized project skill directory. */
4452
+ async install(input, options) {
4453
+ const target = new URLSearchParams({ scope: input.scope });
4454
+ if (input.scope === "project") target.set("projectId", input.projectId);
4455
+ const response = await transport.requestResponse(`/skills/install?${target}`, {
4456
+ ...options,
4457
+ method: "POST",
4458
+ headers: { "content-type": "application/zip" },
4459
+ body: input.archive
4460
+ });
4461
+ return response.json();
4462
+ },
4451
4463
  marketplace: {
4452
4464
  list: (options) => transport.request("/skills/marketplace", options),
4453
4465
  install: (body, options) => transport.request("/skills/marketplace/install", { ...options, method: "POST", body })
@@ -4494,7 +4506,7 @@ var PluginMarketplaceResource = class {
4494
4506
  this.transport = transport;
4495
4507
  }
4496
4508
  transport;
4497
- catalog({ signal, ...query }) {
4509
+ catalog({ signal, ...query } = {}) {
4498
4510
  return this.transport.request(`${market}/catalog`, { query, signal });
4499
4511
  }
4500
4512
  listSources(options) {
@@ -4543,9 +4555,13 @@ var PluginResource = class {
4543
4555
  transport;
4544
4556
  marketplace;
4545
4557
  /** List native plugins for a directory in the daemon environment. */
4546
- list({ signal, cwd }) {
4558
+ list({ signal, cwd } = {}) {
4547
4559
  return this.transport.request("/plugins", { query: { cwd }, signal });
4548
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
+ }
4549
4565
  enable(id2, input, options) {
4550
4566
  return this.transport.request(`/plugins/${encodeURIComponent(id2)}/enable`, { ...options, method: "POST", body: input });
4551
4567
  }
@@ -4587,7 +4603,7 @@ var PluginResource = class {
4587
4603
  uninstall(id2, input, options) {
4588
4604
  return this.transport.request(`/plugins/${encodeURIComponent(id2)}`, { ...options, method: "DELETE", body: input });
4589
4605
  }
4590
- reload(input, options) {
4606
+ reload(input = {}, options) {
4591
4607
  return this.transport.request("/plugins/reload", { ...options, method: "POST", body: input });
4592
4608
  }
4593
4609
  };
@@ -4612,7 +4628,7 @@ var ChannelResource = class {
4612
4628
  disconnect: (options) => this.transport.request("/channels/feishu", { ...options, method: "DELETE" }),
4613
4629
  allowlist: {
4614
4630
  add: (input, options) => this.transport.request("/channels/feishu/allow", { ...options, method: "POST", body: input }),
4615
- 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 } })
4616
4632
  },
4617
4633
  registration: {
4618
4634
  start: (input = {}, options) => this.transport.request("/channels/feishu/registration", { ...options, method: "POST", body: input }),
@@ -4818,6 +4834,11 @@ var McpServersResource = class {
4818
4834
  list(options) {
4819
4835
  return this.request(this.basePath, options);
4820
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
+ }
4821
4842
  getConfig(name, options) {
4822
4843
  return this.request(this.serverPath(name), options);
4823
4844
  }
@@ -4831,13 +4852,13 @@ var McpServersResource = class {
4831
4852
  return this.request(this.serverPath(name), { ...options, method: "PUT", body });
4832
4853
  }
4833
4854
  setEnabled({ name, enabled }, options) {
4834
- 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 } });
4835
4856
  }
4836
4857
  remove(name, options) {
4837
4858
  return this.request(this.serverPath(name), { ...options, method: "DELETE" });
4838
4859
  }
4839
- serverPath(name) {
4840
- return `${this.basePath}/${encodeURIComponent(name)}`;
4860
+ serverPath(name, suffix = "") {
4861
+ return this.transport.path(`${this.basePath}/config/entry${suffix}`, { name });
4841
4862
  }
4842
4863
  async request(path2, options) {
4843
4864
  await requireDaemonFeature(this.transport, "mcpServerManagement", options?.signal);
@@ -4889,7 +4910,7 @@ var McpResource = class {
4889
4910
  }
4890
4911
  async startLogin(name, input, options = {}) {
4891
4912
  return await this.transport.request(
4892
- `/mcp/${encodeURIComponent(name)}/oauth/login`,
4913
+ this.transport.path("/mcp/oauth/login", { name }),
4893
4914
  { method: "POST", body: input, signal: options.signal }
4894
4915
  );
4895
4916
  }
@@ -4913,7 +4934,7 @@ var McpResource = class {
4913
4934
  }
4914
4935
  async logout(name, options = {}) {
4915
4936
  return await this.transport.request(
4916
- `/mcp/${encodeURIComponent(name)}/oauth/logout`,
4937
+ this.transport.path("/mcp/oauth/logout", { name }),
4917
4938
  { method: "POST", body: {}, signal: options.signal }
4918
4939
  );
4919
4940
  }
@@ -5055,6 +5076,8 @@ var MaintenanceResource = class {
5055
5076
  usage = {
5056
5077
  get: (input = {}, options) => this.post("/usage", input, options),
5057
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),
5058
5081
  updateBudget: (input, options) => this.post("/usage/budget", input, options),
5059
5082
  addPrice: (input, options) => this.post("/usage/price", input, options)
5060
5083
  };
@@ -5157,6 +5180,58 @@ var SettingsResource = class {
5157
5180
  this.transport = transport;
5158
5181
  }
5159
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
+ };
5160
5235
  /** Read the daemon's current global settings. */
5161
5236
  getGlobal({ signal } = {}) {
5162
5237
  return this.get({ signal });