@bobannomi/client 0.3.0 → 0.5.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/README.md +7 -5
- package/dist/index.d.ts +47 -7
- package/dist/index.js +118 -27
- package/dist/index.js.map +3 -3
- package/dist/service.js +130 -27
- package/dist/service.js.map +3 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -36,11 +36,13 @@ const terminals = await session.terminals.list();
|
|
|
36
36
|
|
|
37
37
|
文件路径相对于 daemon 上的会话执行目录。`session.prompt(input)` 返回输入接纳结果,有 `run.id` 时用 `session.waitForRun(run.id, { signal })` 取得该次运行的终态和消息。取消等待只结束观察,停止后台运行用 `session.interrupt({ expectedRunId: run.id })`。权限请求继续由调用方处理。已有会话的应用自定义数据通过 `session.updateAppMetadata(data)` 更新。改名、置顶、归档和删除从 `session.management` 读取版本再提交。 [可运行示例](../../apps/client-docs/examples/README.md) · [Client SDK 使用指南](../../docs/client-sdk.md)
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## 在应用里使用自带供应商
|
|
40
|
+
|
|
41
|
+
初始化 `BobanNomiClient` 时,传入应用的 `providers`。每项包含模型列表和 `connection: { baseUrl, apiKey, apiFormat: "openai" }`。`providers` 和 `connection` 都可以按需加载。用 `client.models.list()` 展示模型选项,再用选中的供应商和模型 ID 创建会话并发送消息。省略 `providers` 时读取 daemon 的模型目录。 [完整调用示例](../../apps/client-docs/src/content/docs/guides/models-schedules.mdx#在应用里使用自带供应商)
|
|
40
42
|
|
|
41
|
-
|
|
43
|
+
## 独立客户端管理模型供应商
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
用管理权限连接 daemon,可以为工作台和其他客户端统一保存模型连接、测试连接及设置全局默认模型。Node 管理脚本使用后台的管理 token。内置工作台由 Electron Main 验证页面身份和数据范围后代为请求。 [后台管理步骤](../../apps/client-docs/src/content/docs/guides/models-schedules.mdx#管理后台的供应商和默认模型)
|
|
44
46
|
|
|
45
47
|
```ts
|
|
46
48
|
import { BobanNomiClient } from "@bobannomi/client";
|
|
@@ -74,7 +76,7 @@ await modelProviders.defaults.updateModel({
|
|
|
74
76
|
|
|
75
77
|
全局推理强度使用 `modelProviders.defaults.updateEffort({ effort, expectedRevision })`,可选值来自当前模型的 `reasoningEfforts`。断开或删除默认供应商时传入 `replacement: { provider, model }`,或显式传入 `disableDefault: true`。连接测试查询模型列表并记录验证结果。没有独立验证接口的订阅会返回 `unsupported`。 [可运行示例](../../apps/client-docs/examples/README.md)
|
|
76
78
|
|
|
77
|
-
##
|
|
79
|
+
## 自建后台的共享目录(可选)
|
|
78
80
|
|
|
79
81
|
自行启动后台的 Node 宿主,可将 `modelCatalog: { url }` 或 `modelCatalog: { load }` 传给 `startBobanNomiDaemon()`。用启动结果的 `listen.url` 作为 SDK 的 `baseUrl`,并传入该后台的 token。连接成功后,`client.models.list()` 返回已连接供应商的模型。 [bobannomi 网关动态目录示例](../server/src/application/README.md#bobannomi-网关示例)
|
|
80
82
|
|
|
@@ -108,7 +110,7 @@ await modelProviders.defaults.updateModel({
|
|
|
108
110
|
|
|
109
111
|
会话快照、reducer(合并快照和事件的函数)、选择函数及同步控制器从根入口导出,供不同界面共用一套恢复流程。请求 metadata 与工具输入/输出保留扩展数据。
|
|
110
112
|
|
|
111
|
-
|
|
113
|
+
内置工作台经 AppHost 授权管理模型供应商。独立应用用目标 daemon 的管理员连接调用 `client.modelProviders`。页面用 `client.models.list()` 读取模型目录,用会话配置选项核对当前后台支持执行的模型。
|
|
112
114
|
|
|
113
115
|
`session.management` 先按动作读取版本,再用原 `requestId` 和 `expectedRevision` 或 `expectedTreeRevision` 改名、置顶、归档或删除。`getMutation` 按原请求 ID 查询结果。`session.goal.getRequest` 和 `attachments.getUpload` 也通过原请求定位回执。`session.getContextUsage()` 读取会话当前上下文的用量,`session.getUsage()` 读取历史统计。 [会话管理与配置示例](../../apps/client-docs/examples/README.md)
|
|
114
116
|
|
package/dist/index.d.ts
CHANGED
|
@@ -179,6 +179,8 @@ interface CreateClientSessionInput$1 {
|
|
|
179
179
|
requestId?: string;
|
|
180
180
|
cwd: string;
|
|
181
181
|
projectId?: string;
|
|
182
|
+
workspaceId?: never;
|
|
183
|
+
outsideProject?: never;
|
|
182
184
|
title?: string;
|
|
183
185
|
storage?: "sqlite" | "memory";
|
|
184
186
|
configuration?: SessionConfigurationInput;
|
|
@@ -196,7 +198,18 @@ type CreateSessionByProjectInput = Omit<CreateClientSessionInput$1, "cwd" | "pro
|
|
|
196
198
|
projectId: string;
|
|
197
199
|
cwd?: never;
|
|
198
200
|
};
|
|
199
|
-
|
|
201
|
+
/** Use a desktop workspace selection or let the daemon allocate a new directory. */
|
|
202
|
+
type CreateSessionWithDirectoryInput = Omit<CreateClientSessionInput$1, "cwd" | "projectId" | "workspaceId" | "outsideProject"> & {
|
|
203
|
+
cwd?: never;
|
|
204
|
+
projectId?: never;
|
|
205
|
+
} & ({
|
|
206
|
+
workspaceId: string;
|
|
207
|
+
outsideProject?: never;
|
|
208
|
+
} | {
|
|
209
|
+
outsideProject: true;
|
|
210
|
+
workspaceId?: never;
|
|
211
|
+
});
|
|
212
|
+
type SessionCreationInput = CreateClientSessionInput$1 | CreateSessionByProjectInput | CreateSessionWithDirectoryInput;
|
|
200
213
|
type DispatchedSessionCreationRequest = SessionCreationInput & {
|
|
201
214
|
id: string;
|
|
202
215
|
requestId: string;
|
|
@@ -2226,10 +2239,11 @@ interface RawRequestOptions extends RequestInit {
|
|
|
2226
2239
|
query?: Record<string, unknown>;
|
|
2227
2240
|
auth?: boolean;
|
|
2228
2241
|
}
|
|
2229
|
-
/** HTTP API 非 2xx
|
|
2242
|
+
/** HTTP API 非 2xx 时抛出,携带 status、原始响应体和可识别的错误码。 */
|
|
2230
2243
|
declare class BobanNomiApiError extends Error {
|
|
2231
2244
|
readonly status: number;
|
|
2232
2245
|
readonly body: unknown;
|
|
2246
|
+
readonly code?: string;
|
|
2233
2247
|
constructor(message: string, status: number, body: unknown);
|
|
2234
2248
|
}
|
|
2235
2249
|
declare function responseField(value: unknown, field: string): unknown;
|
|
@@ -2633,6 +2647,17 @@ interface PluginGitInstallInput extends PluginGitPreviewInput {
|
|
|
2633
2647
|
|
|
2634
2648
|
/** Public Agent lifecycle request, response and synchronization types. */
|
|
2635
2649
|
|
|
2650
|
+
/** Gateway credentials supplied by the application for its Agent sessions. */
|
|
2651
|
+
interface ClientModelConnection {
|
|
2652
|
+
baseUrl: string;
|
|
2653
|
+
apiKey: string;
|
|
2654
|
+
apiFormat: "openai";
|
|
2655
|
+
}
|
|
2656
|
+
type ClientModelProvider = ModelProviderInfo & {
|
|
2657
|
+
connection?: ClientModelConnection | ((options: {
|
|
2658
|
+
signal?: AbortSignal;
|
|
2659
|
+
}) => Promise<ClientModelConnection>);
|
|
2660
|
+
};
|
|
2636
2661
|
/** `BobanNomiClient` 构造参数。 */
|
|
2637
2662
|
interface BobanNomiClientOptions {
|
|
2638
2663
|
/** daemon HTTP 根地址,例如 `http://127.0.0.1:8787`。 */
|
|
@@ -2641,10 +2666,10 @@ interface BobanNomiClientOptions {
|
|
|
2641
2666
|
token?: string;
|
|
2642
2667
|
/** 可注入的 fetch,便于测试或自定义传输。 */
|
|
2643
2668
|
fetch?: typeof fetch;
|
|
2644
|
-
/**
|
|
2645
|
-
providers?: readonly
|
|
2669
|
+
/** App-provided catalog and optional connections. Reading the catalog is side-effect-free. */
|
|
2670
|
+
providers?: readonly ClientModelProvider[] | ((options: {
|
|
2646
2671
|
signal?: AbortSignal;
|
|
2647
|
-
}) => Promise<readonly
|
|
2672
|
+
}) => Promise<readonly ClientModelProvider[]>);
|
|
2648
2673
|
}
|
|
2649
2674
|
interface BobanNomiServerHealth {
|
|
2650
2675
|
ok: true;
|
|
@@ -2861,6 +2886,8 @@ declare class ProtocolClient {
|
|
|
2861
2886
|
capabilities(options?: CapabilitiesOptions): Promise<ServerCapabilities>;
|
|
2862
2887
|
}
|
|
2863
2888
|
|
|
2889
|
+
type PrepareModelConnection = (sessionId: string, selection: SessionConfigurationInput["model"], signal?: AbortSignal) => Promise<string | undefined>;
|
|
2890
|
+
|
|
2864
2891
|
declare class EventResource {
|
|
2865
2892
|
private readonly transport;
|
|
2866
2893
|
private readonly sse;
|
|
@@ -2922,6 +2949,14 @@ declare function selectSessionTasks(bucket: SessionBucket | undefined): SessionE
|
|
|
2922
2949
|
declare function selectSessionPermissions(bucket: SessionBucket | undefined): PermissionRequestRecord[];
|
|
2923
2950
|
declare function selectFirstPendingPermission(state: BobanNomiClientState, sessionId?: string): PermissionRequestRecord | undefined;
|
|
2924
2951
|
|
|
2952
|
+
interface SessionObservation {
|
|
2953
|
+
source: SyncEventUpdate["source"];
|
|
2954
|
+
messages: SessionMessageWithParts[];
|
|
2955
|
+
inputs: SessionInputRecord[];
|
|
2956
|
+
runs: SessionRunRecord[];
|
|
2957
|
+
permissions: PermissionRequestRecord[];
|
|
2958
|
+
}
|
|
2959
|
+
|
|
2925
2960
|
interface RunResult {
|
|
2926
2961
|
run: SessionRunRecord;
|
|
2927
2962
|
messages: SessionMessageWithParts[];
|
|
@@ -2937,6 +2972,10 @@ interface SessionHandle {
|
|
|
2937
2972
|
getState(options?: RequestOptions$8 & {
|
|
2938
2973
|
partView?: "summary";
|
|
2939
2974
|
}): Promise<AgentSessionStateSnapshot>;
|
|
2975
|
+
/** Observe the current messages, inputs, runs and permission requests for this session. */
|
|
2976
|
+
observe(options?: RequestOptions$8 & {
|
|
2977
|
+
partView?: "summary";
|
|
2978
|
+
}): AsyncIterable<SessionObservation>;
|
|
2940
2979
|
/** Merge JSON fields into this session's application metadata on the daemon. */
|
|
2941
2980
|
updateAppMetadata(metadata: Record<string, unknown>, options?: RequestOptions$8): Promise<SessionRecord>;
|
|
2942
2981
|
/** Submit an input and return its admission result. */
|
|
@@ -3076,7 +3115,8 @@ interface SessionHandle {
|
|
|
3076
3115
|
/** Find, prepare, and create sessions on one daemon connection. */
|
|
3077
3116
|
declare class SessionResource {
|
|
3078
3117
|
#private;
|
|
3079
|
-
|
|
3118
|
+
private readonly prepareModel?;
|
|
3119
|
+
constructor(transport: HttpTransport, events?: EventResource, prepareModel?: PrepareModelConnection | undefined);
|
|
3080
3120
|
/** Bind a session ID locally. Operations use this resource's daemon connection when called. */
|
|
3081
3121
|
byId(sessionId: string): SessionHandle;
|
|
3082
3122
|
/** `GET /sessions/search` - search saved conversation text without opening it. */
|
|
@@ -4134,4 +4174,4 @@ declare function readSessionRuntimeConfig(session: SessionRecord, defaults?: Par
|
|
|
4134
4174
|
declare function patchSessionRuntimeMetadata(metadata: Record<string, unknown>, patch: SessionRuntimeConfigPatch): Record<string, unknown>;
|
|
4135
4175
|
|
|
4136
4176
|
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, readPluginUiInstance, readRuntimeMetadata, readSessionModelRetryState, readSessionModelUsage, readSessionRuntimeConfig, readWorkspaceChangesMetadata, replaceSessionState, responseArray, responseField, selectFirstPendingPermission, selectSessionInputs, selectSessionMessagesWithParts, selectSessionModelRetry, selectSessionModelUsage, selectSessionOrderedMessages, selectSessionParts, selectSessionPermissions, selectSessionRuns, selectSessionTasks, streamServerSentEvents, supportsFeature, syncEvents };
|
|
4137
|
-
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, ClientProtocolSupport, CommandCatalogEntry, CommandKind, CommandSelection, CommandSource, ConfigureClientSessionInput, ContextBucketId, ContextUsageBucket, ContextUsageSnapshot, ContextUsageTip, ContextUsageTipCode, CreateBackgroundShellInput, CreateBackgroundShellResult, CreateClientSessionInput, CreateScheduledTaskInput, CreateSessionByProjectInput, CreateSessionGoalInput, 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, PluginUiInstanceRecord, PluginUiInventory, 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, 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 };
|
|
4177
|
+
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, PluginUiInstanceRecord, PluginUiInventory, 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 };
|
package/dist/index.js
CHANGED
|
@@ -909,16 +909,25 @@ function validateSessionId(id2) {
|
|
|
909
909
|
}
|
|
910
910
|
function parseCreateSessionRequest(value) {
|
|
911
911
|
const body = record3(value);
|
|
912
|
-
fields2(body, ["id", "requestId", "cwd", "projectId", "title", "storage", "configuration", "optionsRevision", "metadata"]);
|
|
912
|
+
fields2(body, ["id", "requestId", "cwd", "projectId", "workspaceId", "outsideProject", "title", "storage", "configuration", "optionsRevision", "metadata"]);
|
|
913
913
|
const cwd = optionalString2(body, "cwd");
|
|
914
|
+
const workspaceId = optionalString2(body, "workspaceId");
|
|
915
|
+
const outsideProject = optionalBoolean2(body, "outsideProject");
|
|
914
916
|
const id2 = validateSessionId(requiredString2(body, "id"));
|
|
915
917
|
const requestId = requiredString2(body, "requestId");
|
|
916
918
|
if (cwd !== void 0 && !cwd.trim()) throw new ProtocolValidationError("cwd cannot be empty", "cwd");
|
|
917
919
|
if (!requestId.trim()) throw new ProtocolValidationError("requestId cannot be empty", "requestId");
|
|
918
|
-
|
|
919
|
-
if (
|
|
920
|
+
if (workspaceId !== void 0 && !workspaceId.trim()) throw new ProtocolValidationError("workspaceId cannot be empty", "workspaceId");
|
|
921
|
+
if (outsideProject === false || outsideProject === true && workspaceId !== void 0)
|
|
922
|
+
throw new ProtocolValidationError("outsideProject must be true and used without workspaceId", "outsideProject");
|
|
923
|
+
if ((outsideProject === true || workspaceId !== void 0) && (cwd !== void 0 || body.projectId !== void 0))
|
|
924
|
+
throw new ProtocolValidationError("Supply one session directory choice", outsideProject === true ? "outsideProject" : "workspaceId");
|
|
925
|
+
const projectId = optionalString2(body, "projectId");
|
|
926
|
+
if (cwd === void 0 && outsideProject === void 0 && workspaceId === void 0 && !projectId?.trim())
|
|
927
|
+
throw new ProtocolValidationError("projectId cannot be empty", "projectId");
|
|
928
|
+
const target = workspaceId !== void 0 ? { workspaceId } : outsideProject === true ? { outsideProject } : cwd !== void 0 ? { cwd, ...projectId === void 0 ? {} : { projectId } } : { projectId };
|
|
920
929
|
const result = { id: id2, requestId, ...target };
|
|
921
|
-
for (const key of ["
|
|
930
|
+
for (const key of ["title", "optionsRevision"]) if (body[key] !== void 0) result[key] = optionalString2(body, key);
|
|
922
931
|
if (body.storage !== void 0) result.storage = optionalEnum2(body, "storage", ["sqlite", "memory"]);
|
|
923
932
|
if (body.configuration !== void 0) result.configuration = parseSessionConfiguration2(body.configuration);
|
|
924
933
|
if (body.metadata !== void 0) result.metadata = appMetadata(optionalRecord(body, "metadata"));
|
|
@@ -2461,6 +2470,12 @@ var BobanNomiApiError = class extends Error {
|
|
|
2461
2470
|
this.status = status;
|
|
2462
2471
|
this.body = body;
|
|
2463
2472
|
this.name = "BobanNomiApiError";
|
|
2473
|
+
if (!body || typeof body !== "object" || Array.isArray(body)) return;
|
|
2474
|
+
const { code, error } = body;
|
|
2475
|
+
const machineCode = [code, error].find(
|
|
2476
|
+
(value) => typeof value === "string" && /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/.test(value)
|
|
2477
|
+
);
|
|
2478
|
+
if (machineCode !== void 0) this.code = machineCode;
|
|
2464
2479
|
}
|
|
2465
2480
|
status;
|
|
2466
2481
|
body;
|
|
@@ -2986,18 +3001,25 @@ async function getDraftComposerOptions(transport, input, options = {}) {
|
|
|
2986
3001
|
}
|
|
2987
3002
|
return result;
|
|
2988
3003
|
}
|
|
2989
|
-
async function create(transport, input, options = {}) {
|
|
3004
|
+
async function create(transport, input, options = {}, prepareModel) {
|
|
2990
3005
|
const body = parseCreateSessionRequest({
|
|
2991
3006
|
...input,
|
|
2992
3007
|
id: input.id ?? createSessionRequestId(),
|
|
2993
3008
|
requestId: input.requestId ?? createSessionRequestId()
|
|
2994
3009
|
});
|
|
2995
|
-
if (body.
|
|
3010
|
+
if (body.workspaceId !== void 0 || body.outsideProject)
|
|
3011
|
+
await requireDaemonFeature(transport, "sessionDirectoryCreation", options.signal);
|
|
3012
|
+
else if (body.cwd === void 0) await requireDaemonFeature(transport, "projectSessionCreation", options.signal);
|
|
3013
|
+
const modelConnection = await prepareModel?.(body.id, body.configuration?.model, options.signal);
|
|
2996
3014
|
const response = await transport.request(
|
|
2997
3015
|
"/sessions",
|
|
2998
3016
|
{
|
|
2999
3017
|
method: "POST",
|
|
3000
3018
|
body,
|
|
3019
|
+
headers: {
|
|
3020
|
+
...body.workspaceId === void 0 ? {} : { "x-bobannomi-workspace-id": body.workspaceId },
|
|
3021
|
+
...modelConnection === void 0 ? {} : { "x-bobannomi-model-connection": modelConnection }
|
|
3022
|
+
},
|
|
3001
3023
|
signal: options.signal
|
|
3002
3024
|
}
|
|
3003
3025
|
);
|
|
@@ -3011,7 +3033,9 @@ async function getConfigurationOptions(transport, input, options = {}) {
|
|
|
3011
3033
|
);
|
|
3012
3034
|
}
|
|
3013
3035
|
async function getCreationResult(transport, input, options = {}) {
|
|
3014
|
-
if (input.original.
|
|
3036
|
+
if (input.original.workspaceId !== void 0 || input.original.outsideProject)
|
|
3037
|
+
await requireDaemonFeature(transport, "sessionDirectoryCreation", options.signal);
|
|
3038
|
+
else if (input.original.cwd === void 0) await requireDaemonFeature(transport, "projectSessionCreation", options.signal);
|
|
3015
3039
|
return transport.request("/sessions/creation-result", {
|
|
3016
3040
|
method: "POST",
|
|
3017
3041
|
body: input,
|
|
@@ -3025,11 +3049,17 @@ async function getConfiguration(transport, sessionId, options = {}) {
|
|
|
3025
3049
|
);
|
|
3026
3050
|
return decodeSessionConfigurationSnapshot(value);
|
|
3027
3051
|
}
|
|
3028
|
-
async function configure(transport, sessionId, input, options = {}) {
|
|
3052
|
+
async function configure(transport, sessionId, input, options = {}, prepareModel) {
|
|
3029
3053
|
const body = parseConfigureSessionRequest(input);
|
|
3054
|
+
const modelConnection = await prepareModel?.(sessionId, body.configuration.model, options.signal);
|
|
3030
3055
|
const response = await transport.requestUnknown(
|
|
3031
3056
|
`/sessions/${encodeURIComponent(sessionId)}/configure`,
|
|
3032
|
-
{
|
|
3057
|
+
{
|
|
3058
|
+
method: "POST",
|
|
3059
|
+
body,
|
|
3060
|
+
signal: options.signal,
|
|
3061
|
+
...modelConnection === void 0 ? {} : { headers: { "x-bobannomi-model-connection": modelConnection } }
|
|
3062
|
+
}
|
|
3033
3063
|
);
|
|
3034
3064
|
return decodeSessionConfigurationReceipt(response, {
|
|
3035
3065
|
sessionId,
|
|
@@ -3691,6 +3721,7 @@ async function* runEventSync(client, options, initialState = createClientState()
|
|
|
3691
3721
|
if (error instanceof UnsupportedSessionEventSchemaVersionError) throw error;
|
|
3692
3722
|
if (isAbortError(error) || signal?.aborted) return;
|
|
3693
3723
|
if (options.shouldRetry?.(error) === false) throw error;
|
|
3724
|
+
if (error && typeof error === "object" && "code" in error && error.code === "connection_revoked") throw error;
|
|
3694
3725
|
if (error instanceof BobanNomiApiError && error.status >= 400 && error.status < 500 && ![408, 425, 429].includes(error.status)) throw error;
|
|
3695
3726
|
}
|
|
3696
3727
|
if (signal?.aborted) return;
|
|
@@ -3722,6 +3753,20 @@ function isAbortError(error) {
|
|
|
3722
3753
|
return Boolean(error && typeof error === "object" && "name" in error && error.name === "AbortError");
|
|
3723
3754
|
}
|
|
3724
3755
|
|
|
3756
|
+
// src/state/session-observation.ts
|
|
3757
|
+
async function* observeSession(client, options) {
|
|
3758
|
+
for await (const { source, state } of syncEvents(client, options)) {
|
|
3759
|
+
const bucket = state.buckets[options.sessionId];
|
|
3760
|
+
yield {
|
|
3761
|
+
source,
|
|
3762
|
+
messages: getVisibleSessionMessages(bucket),
|
|
3763
|
+
inputs: selectSessionInputs(bucket),
|
|
3764
|
+
runs: selectSessionRuns(bucket),
|
|
3765
|
+
permissions: selectSessionPermissions(bucket)
|
|
3766
|
+
};
|
|
3767
|
+
}
|
|
3768
|
+
}
|
|
3769
|
+
|
|
3725
3770
|
// src/state/wait-for-run.ts
|
|
3726
3771
|
async function waitForRun(client, options) {
|
|
3727
3772
|
options.signal?.throwIfAborted();
|
|
@@ -3995,7 +4040,7 @@ async function interrupt(transport, sessionId, options = {}) {
|
|
|
3995
4040
|
}
|
|
3996
4041
|
|
|
3997
4042
|
// src/resources/session/session-handle.ts
|
|
3998
|
-
function createSessionHandle(transport, syncClient, management, sessionId) {
|
|
4043
|
+
function createSessionHandle(transport, syncClient, management, sessionId, prepareModel) {
|
|
3999
4044
|
function cancelQueuedPrompt2(inputId, input, options) {
|
|
4000
4045
|
return cancelQueuedPrompt(transport, sessionId, inputId, input, options);
|
|
4001
4046
|
}
|
|
@@ -4007,6 +4052,7 @@ function createSessionHandle(transport, syncClient, management, sessionId) {
|
|
|
4007
4052
|
}
|
|
4008
4053
|
return {
|
|
4009
4054
|
id: sessionId,
|
|
4055
|
+
observe: (options) => observeSession(syncClient, { ...options, sessionId }),
|
|
4010
4056
|
waitForRun: (runId, options) => waitForRun(syncClient, { sessionId, runId, signal: options?.signal }),
|
|
4011
4057
|
async updateAppMetadata(metadata, options) {
|
|
4012
4058
|
const body = parseUpdateSessionRequest({ metadata: { app: metadata } });
|
|
@@ -4156,7 +4202,7 @@ function createSessionHandle(transport, syncClient, management, sessionId) {
|
|
|
4156
4202
|
return getConfiguration(transport, sessionId, options);
|
|
4157
4203
|
},
|
|
4158
4204
|
update(input, options = {}) {
|
|
4159
|
-
return configure(transport, sessionId, input, options);
|
|
4205
|
+
return configure(transport, sessionId, input, options, prepareModel);
|
|
4160
4206
|
},
|
|
4161
4207
|
getResult(input, options = {}) {
|
|
4162
4208
|
return getConfigurationResult(transport, sessionId, input, options);
|
|
@@ -4263,17 +4309,20 @@ function createSessionHandle(transport, syncClient, management, sessionId) {
|
|
|
4263
4309
|
|
|
4264
4310
|
// src/resources/session/session-resource.ts
|
|
4265
4311
|
var SessionResource = class {
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
#transport;
|
|
4269
|
-
constructor(transport, events) {
|
|
4312
|
+
constructor(transport, events, prepareModel) {
|
|
4313
|
+
this.prepareModel = prepareModel;
|
|
4270
4314
|
this.#transport = transport;
|
|
4271
4315
|
this.#management = new SessionManagementResource(transport);
|
|
4272
4316
|
this.#events = events ?? new EventResource(transport, new SseTransport(transport));
|
|
4273
4317
|
}
|
|
4318
|
+
prepareModel;
|
|
4319
|
+
#management;
|
|
4320
|
+
#events;
|
|
4321
|
+
#transport;
|
|
4274
4322
|
/** Bind a session ID locally. Operations use this resource's daemon connection when called. */
|
|
4275
4323
|
byId(sessionId) {
|
|
4276
|
-
|
|
4324
|
+
if (typeof sessionId !== "string" || sessionId.length === 0) throw new TypeError("sessionId is required");
|
|
4325
|
+
return createSessionHandle(this.#transport, { sessions: this, events: this.#events }, this.#management, sessionId, this.prepareModel);
|
|
4277
4326
|
}
|
|
4278
4327
|
/** `GET /sessions/search` - search saved conversation text without opening it. */
|
|
4279
4328
|
async search(options) {
|
|
@@ -4304,7 +4353,7 @@ var SessionResource = class {
|
|
|
4304
4353
|
}
|
|
4305
4354
|
/** `POST /sessions` */
|
|
4306
4355
|
create(input, options = {}) {
|
|
4307
|
-
return create(this.#transport, input, options);
|
|
4356
|
+
return create(this.#transport, input, options, this.prepareModel);
|
|
4308
4357
|
}
|
|
4309
4358
|
getConfigurationOptions(input, options = {}) {
|
|
4310
4359
|
return getConfigurationOptions(this.#transport, input, options);
|
|
@@ -4427,7 +4476,54 @@ var PermissionResource = class {
|
|
|
4427
4476
|
|
|
4428
4477
|
// src/resources/runtime/runtime-resource.ts
|
|
4429
4478
|
function createRuntimeResources(transport, providers) {
|
|
4430
|
-
const catalog = typeof providers === "function" || providers === void 0 ? providers :
|
|
4479
|
+
const catalog = typeof providers === "function" || providers === void 0 ? providers : providers.map(({ connection, ...provider2 }) => ({
|
|
4480
|
+
...structuredClone(provider2),
|
|
4481
|
+
connection: typeof connection === "function" ? connection : structuredClone(connection)
|
|
4482
|
+
}));
|
|
4483
|
+
async function load(source, signal) {
|
|
4484
|
+
signal?.throwIfAborted();
|
|
4485
|
+
const value = await waitForRequest(Promise.resolve().then(() => {
|
|
4486
|
+
signal?.throwIfAborted();
|
|
4487
|
+
return source({ signal });
|
|
4488
|
+
}), signal);
|
|
4489
|
+
signal?.throwIfAborted();
|
|
4490
|
+
return value;
|
|
4491
|
+
}
|
|
4492
|
+
function readCatalog(signal) {
|
|
4493
|
+
signal?.throwIfAborted();
|
|
4494
|
+
return typeof catalog === "function" ? load(catalog, signal) : Promise.resolve(catalog ?? []);
|
|
4495
|
+
}
|
|
4496
|
+
const prepareModel = catalog === void 0 ? void 0 : async (sessionId, selection, signal) => {
|
|
4497
|
+
if (!selection) return;
|
|
4498
|
+
const provider2 = (await readCatalog(signal)).find(({ name }) => name === selection.provider);
|
|
4499
|
+
if (!provider2?.connection) return;
|
|
4500
|
+
if (!provider2.models.some(({ id: id2 }) => id2 === selection.model)) throw new Error("The selected model is not in the supplied provider catalog");
|
|
4501
|
+
await requireDaemonFeature(transport, "sessionModelConnections", signal);
|
|
4502
|
+
const connection = typeof provider2.connection === "function" ? await load(provider2.connection, signal) : provider2.connection;
|
|
4503
|
+
const { ref } = await transport.request("/model-connections", {
|
|
4504
|
+
method: "POST",
|
|
4505
|
+
signal,
|
|
4506
|
+
body: {
|
|
4507
|
+
sessionId,
|
|
4508
|
+
provider: {
|
|
4509
|
+
id: provider2.name,
|
|
4510
|
+
displayName: provider2.displayName,
|
|
4511
|
+
baseUrl: connection.baseUrl,
|
|
4512
|
+
apiKey: connection.apiKey,
|
|
4513
|
+
apiFormat: connection.apiFormat,
|
|
4514
|
+
models: provider2.models.map(({ id: id2, label, contextWindow, outputLimit, inputCapabilities }) => ({
|
|
4515
|
+
id: id2,
|
|
4516
|
+
displayName: label,
|
|
4517
|
+
contextWindow,
|
|
4518
|
+
maxOutputTokens: outputLimit,
|
|
4519
|
+
imageInputSupport: inputCapabilities?.image
|
|
4520
|
+
}))
|
|
4521
|
+
}
|
|
4522
|
+
}
|
|
4523
|
+
});
|
|
4524
|
+
if (typeof ref !== "string" || !ref) throw new Error("Invalid prepared model connection");
|
|
4525
|
+
return ref;
|
|
4526
|
+
};
|
|
4431
4527
|
async function modelProviders(input, options = {}) {
|
|
4432
4528
|
const response = await transport.request("/providers/manage", { ...options, method: "POST", body: input });
|
|
4433
4529
|
if (!validModelProviderConnections(response?.providers)) throw new Error("Invalid model provider response");
|
|
@@ -4440,19 +4536,14 @@ function createRuntimeResources(transport, providers) {
|
|
|
4440
4536
|
return result;
|
|
4441
4537
|
}
|
|
4442
4538
|
return {
|
|
4539
|
+
prepareModel,
|
|
4443
4540
|
models: {
|
|
4444
4541
|
async list({ signal } = {}) {
|
|
4445
4542
|
if (catalog === void 0) {
|
|
4446
4543
|
const response = await transport.request("/models", { signal });
|
|
4447
4544
|
return response.providers;
|
|
4448
4545
|
}
|
|
4449
|
-
signal
|
|
4450
|
-
const providers2 = typeof catalog === "function" ? await waitForRequest(Promise.resolve().then(() => {
|
|
4451
|
-
signal?.throwIfAborted();
|
|
4452
|
-
return catalog({ signal });
|
|
4453
|
-
}), signal) : catalog;
|
|
4454
|
-
signal?.throwIfAborted();
|
|
4455
|
-
return structuredClone([...providers2]);
|
|
4546
|
+
return (await readCatalog(signal)).map(({ name, displayName, models }) => structuredClone({ name, displayName, models }));
|
|
4456
4547
|
}
|
|
4457
4548
|
},
|
|
4458
4549
|
agents: {
|
|
@@ -5355,7 +5446,7 @@ var BobanNomiClient = class {
|
|
|
5355
5446
|
const sse = new SseTransport(transport);
|
|
5356
5447
|
this.protocol = new ProtocolClient(transport);
|
|
5357
5448
|
const providers = options instanceof HttpTransport ? void 0 : options.providers;
|
|
5358
|
-
const { models, modelProviders, agents, skills } = createRuntimeResources(transport, providers);
|
|
5449
|
+
const { models, modelProviders, agents, skills, prepareModel } = createRuntimeResources(transport, providers);
|
|
5359
5450
|
this.models = models;
|
|
5360
5451
|
this.modelProviders = modelProviders;
|
|
5361
5452
|
this.agents = agents;
|
|
@@ -5364,7 +5455,7 @@ var BobanNomiClient = class {
|
|
|
5364
5455
|
this.attachments = new AttachmentResource(transport);
|
|
5365
5456
|
this.permissions = new PermissionResource(transport);
|
|
5366
5457
|
this.events = new EventResource(transport, sse);
|
|
5367
|
-
this.sessions = new SessionResource(transport, this.events);
|
|
5458
|
+
this.sessions = new SessionResource(transport, this.events, prepareModel);
|
|
5368
5459
|
this.plugins = new PluginResource(transport);
|
|
5369
5460
|
this.channels = new ChannelResource(transport);
|
|
5370
5461
|
this.projects = new ProjectResource(transport);
|