diff --git a/.agents/notes/implemented/architecture/2026-08-20-client-session-conversation-ownership.i18n.yaml b/.agents/notes/implemented/architecture/2026-08-20-client-session-conversation-ownership.i18n.yaml index a1044d0181..ebed387849 100644 --- a/.agents/notes/implemented/architecture/2026-08-20-client-session-conversation-ownership.i18n.yaml +++ b/.agents/notes/implemented/architecture/2026-08-20-client-session-conversation-ownership.i18n.yaml @@ -18,17 +18,17 @@ en: 821989170ad76994 zh: 0ed142bea166fc3a /agent-note-client-session-conversation-and-ui-ownership-layers/layering-principles/ui-adapters-own-react-integration: - en: 4d032e048364fb97 - zh: 82a435531efdaa78 + en: 4a789544b8a79c6e + zh: b6dfcf0e893963d0 /agent-note-client-session-conversation-and-ui-ownership-layers/layering-principles/slot-scopes-and-standard-props-are-separate: en: b6f585ca87e1fc6f zh: 53fd58c3e93cf17c /agent-note-client-session-conversation-and-ui-ownership-layers/package-ownership: - en: 2fc4b50a651b1847 - zh: 7dceeecb9c58e838 + en: 9a379c4cb3942966 + zh: 9a1fa081443643a1 /agent-note-client-session-conversation-and-ui-ownership-layers/overall-data-flow: - en: e7c11e82db080dd4 - zh: 5a8a501a128366d6 + en: cfc080a506e2a4cf + zh: 5deb5638fb165512 /agent-note-client-session-conversation-and-ui-ownership-layers/session-controller-client: en: b88f651b1bfb8b5e zh: b88f651b1bfb8b5e @@ -48,8 +48,8 @@ en: 860315b96703371d zh: 860315b96703371d /agent-note-client-session-conversation-and-ui-ownership-layers/ui-session/service-responsibilities: - en: d075ba28fd37bff2 - zh: e2d430d1f3e89b15 + en: f9c9ee379b61362b + zh: 6d2bd619b3a963ba /agent-note-client-session-conversation-and-ui-ownership-layers/ui-session/standard-source-registration: en: e4be6d4b1d79b342 zh: 7cb0e8c0f6358b50 @@ -60,8 +60,8 @@ en: 5d9bdb1f784f97f2 zh: a4b3de7a21b84fce /agent-note-client-session-conversation-and-ui-ownership-layers/ui-session/pending-interactions: - en: 85e358a03ffac4ba - zh: 54b1d5ed6197f2c2 + en: 54b65fef1667278f + zh: cf46a8ad738a0a55 /agent-note-client-session-conversation-and-ui-ownership-layers/workspace-controller-and-ui-workspace: en: 45e5f41550e62a3d zh: d4e6d8f5b397bb51 diff --git a/.agents/notes/implemented/architecture/2026-08-20-client-session-conversation-ownership.md b/.agents/notes/implemented/architecture/2026-08-20-client-session-conversation-ownership.md index 0d2f19cff1..6c41a1c407 100644 --- a/.agents/notes/implemented/architecture/2026-08-20-client-session-conversation-ownership.md +++ b/.agents/notes/implemented/architecture/2026-08-20-client-session-conversation-ownership.md @@ -57,7 +57,7 @@ Each standard hook belongs to the `ui-*` package closest to its data semantics. | `useSessions` | `client/ui-session` | Session Controller global list | | `useSession` | `client/ui-session` | Bound Session snapshot | | `useProjection` | `client/ui-session` | Bound Session keyed projection | -| `useSessionStatus` | `client/ui-session` | Running, effective pending request, and unread completion | +| `useSessionStatus` | `api/session-status` | Running, effective pending request, and unread completion | | `useSessionRetainInfo` | `client/ui-session` | Read-only Controller reference-source counts | | `useWorkspaces` | `client/ui-workspace` | Workspace Controller list | | `useConversation` | `client/ui-conversation` | Conversation binding snapshot | @@ -80,7 +80,8 @@ Adding a target does not add a branch to the renderer or Session Controller. The | --- | --- | --- | | `api/session-controller/client` | Session objects, catalog, references, source counts, commands, projections, event windows, and Agent Contexts | Navigation, completion reminders, Conversation targets, React, Slots, Workspace | | `api/workspace-controller/client` | Workspace objects, ordering, archive state, commands, and snapshots | React, Session navigation policy, directory UI | -| `client/ui-session` | Explicit Session scope, standard sources, `SessionProvider`, and unified UI status | Session transport, reference ownership, Conversation assembly, Approval/Question results | +| `client/ui-session` | Explicit Session scope, standard sources, `SessionProvider`, and effective pending interactions | Session transport, reference ownership, Conversation assembly, Approval/Question results, unified UI status | +| `api/session-status` (Client half) | Unified UI status: running state, effective pending request, and completion reminders | Pending-interaction registration, Session transport, React | | `client/ui-workspace` | Workspace hook, browser UI, main-area reference, and cross-Controller navigation policy | Workspace transport, copies of Session data | | `client/ui-conversation` | Conversation core, registries, bindings, shell, input, composer, queue, and View navigation | Session transport, Chat/Trajectory snapshots | | `client/ui-chat` | Chat target, Node definitions, renderers, selection, details, and locale | Session lifecycle, generic View navigation, Trajectory, historical-image cache | @@ -120,7 +121,7 @@ Session data reaches the UI through this path: Workspace data enters the Workspace Controller from `ctx.remote.workspace`, then `ui-workspace` exposes it as `useWorkspaces`. `ui-workspace` reads explicit targets for cross-domain navigation and owns the main-area reference without making it a default business Context. -Approval and Question arrive from the Host waterfall through `ctx.remote.$on` at their respective UI owners. Each owner publishes a Pending object; `ui-session.sessionStatus` supplies the same effective object to Workspace indicators and Conversation composer selection. +Approval and Question arrive from the Host waterfall through `ctx.remote.$on` at their respective UI owners. Each owner publishes a Pending object through `ui-session`; `ctx.uiSession.sessionStatus` from `api-session-status` supplies the same effective object to Workspace indicators and Conversation composer selection. ## Session Controller Client @@ -178,9 +179,9 @@ This cleanup does not require the Session Controller to know the roster of upper - supplies `SessionProvider` rendering semantics; - supplies built-in Session snapshot, projection, and sessionId sources; - accepts Session-scoped source contributions from other domain packages; -- aggregates domain-owned pending interactions with running and completion-reminder facts in `sessionStatus`. +- selects each Session's effective domain-owned pending interaction and publishes it read-only as `pendingInteractions`. -It does not own Session transport, event folding, Conversation targets, or concrete business results. +It does not own Session transport, event folding, Conversation targets, or concrete business results. `api/session-status` combines the effective pending interactions with running and completion-reminder facts in the `uiSession.sessionStatus` service, read as `ctx.uiSession.sessionStatus`. ### Standard source registration @@ -221,7 +222,7 @@ Concurrent objects with the same key are rejected; replacement requests use a ne `ui-session` selects each Session's effective object using domain precedence. Higher precedence wins; at equal precedence, the later valid object in traversal order wins. -The pending aggregate is private to `ui-session`; its effective request appears unchanged as `sessionStatus.getSnapshot().get(id)?.pendingInteraction`. `useSessionStatus` is the public UI read face. +The pending aggregate is private to `ui-session`; `pendingInteractions` exposes each Session's effective request read-only, and the same object appears as `ctx.uiSession.sessionStatus.getSnapshot().get(id)?.pendingInteraction`. `useSessionStatus` is the public UI read face. Session navigation state and composer takeover read the same effective object. They do not maintain separate status maps or takeover rosters. diff --git a/.agents/notes/implemented/architecture/2026-08-20-client-session-conversation-ownership.zh.md b/.agents/notes/implemented/architecture/2026-08-20-client-session-conversation-ownership.zh.md index fdb2420eff..faa00723bf 100644 --- a/.agents/notes/implemented/architecture/2026-08-20-client-session-conversation-ownership.zh.md +++ b/.agents/notes/implemented/architecture/2026-08-20-client-session-conversation-ownership.zh.md @@ -57,7 +57,7 @@ UI 层可以同时读取多个 Controller 做一次导航决定,但不得把 | `useSessions` | `client/ui-session` | Session Controller 全局列表 | | `useSession` | `client/ui-session` | 已绑定会话快照 | | `useProjection` | `client/ui-session` | 已绑定会话的键控投影 | -| `useSessionStatus` | `client/ui-session` | 运行状态、有效待处理请求和未读完成提醒 | +| `useSessionStatus` | `api/session-status` | 运行状态、有效待处理请求和未读完成提醒 | | `useSessionRetainInfo` | `client/ui-session` | 控制器的只读引用来源计数 | | `useWorkspaces` | `client/ui-workspace` | Workspace Controller 列表 | | `useConversation` | `client/ui-conversation` | Conversation binding snapshot | @@ -80,7 +80,8 @@ UI 层可以同时读取多个 Controller 做一次导航决定,但不得把 | --- | --- | --- | | `api/session-controller/client` | 会话对象、目录、引用、来源计数、命令、投影、事件窗口与 Agent Context | 导航、完成提醒、Conversation target、React、Slot、Workspace | | `api/workspace-controller/client` | Workspace 对象、顺序、归档、命令和 snapshot | React、Session 导航策略、目录 UI | -| `client/ui-session` | 显式会话作用域、标准数据源、`SessionProvider` 与统一 UI 状态 | 会话传输、引用所有权、Conversation 组装、Approval/Question 结果 | +| `client/ui-session` | 显式会话作用域、标准数据源、`SessionProvider` 与有效待处理交互 | 会话传输、引用所有权、Conversation 组装、Approval/Question 结果、统一 UI 状态 | +| `api/session-status`(Client 部分) | 统一 UI 状态:运行状态、有效待处理请求与完成提醒 | 待处理交互登记、会话传输、React | | `client/ui-workspace` | Workspace 钩子、浏览器 UI、主区域引用与跨控制器导航策略 | Workspace 传输、会话数据副本 | | `client/ui-conversation` | Conversation core、registry、binding、shell、input、composer、queue 和 View 导航 | Session transport、Chat/Trajectory snapshot | | `client/ui-chat` | Chat target、Node definitions、renderer、selection、details 和 locale | Session 生命周期、通用 View 导航、Trajectory、历史图片 cache | @@ -120,7 +121,7 @@ Session 数据按以下路径进入 UI: Workspace 数据由 `ctx.remote.workspace` 进入 Workspace 控制器,再由 `ui-workspace` 通过 `useWorkspaces` 提供。`ui-workspace` 为跨领域导航读取显式目标并持有主区域引用,不把它变为默认业务 Context。 -Approval 与 Question 通过 `ctx.remote.$on` 从 Host waterfall 到达各自的 UI owner。各 owner 发布 Pending 对象;`ui-session.sessionStatus` 向 Workspace 标识和 Conversation composer 选择提供同一个有效对象。 +Approval 与 Question 通过 `ctx.remote.$on` 从 Host waterfall 到达各自的 UI owner。各 owner 通过 `ui-session` 发布 Pending 对象;`api-session-status` 提供的 `ctx.uiSession.sessionStatus` 向 Workspace 标识和 Conversation composer 选择提供同一个有效对象。 ## Session Controller Client @@ -178,9 +179,9 @@ Session Controller 对外提供三个互不替代的读取面: - 提供 `SessionProvider` 的呈现语义; - 内建 session snapshot、projection 和 sessionId source; - 接收其他领域 package 的 Session-scoped source contribution; -- 在 `sessionStatus` 中组合领域持有的待处理交互、运行事实和完成提醒。 +- 为每个会话选出领域持有的有效待处理交互,并以只读的 `pendingInteractions` 发布。 -它不拥有 Session transport、event folding、Conversation target 或具体业务结果。 +它不拥有 Session transport、event folding、Conversation target 或具体业务结果。`api/session-status` 在 `uiSession.sessionStatus` 服务中把有效待处理交互与运行事实、完成提醒组合起来,以 `ctx.uiSession.sessionStatus` 读取。 ### 标准 source 注册 @@ -221,7 +222,7 @@ Contribution roster 变化会重建已 materialize 的 binding 并发布新的 s `ui-session` 使用各 domain 的 precedence 选出每个 Session 当前生效的对象。较高 precedence 胜出,相同 precedence 下后遍历到的有效对象胜出。 -待处理聚合是 `ui-session` 的私有实现;其有效请求原样出现在 `sessionStatus.getSnapshot().get(id)?.pendingInteraction` 中。`useSessionStatus` 是公开 UI 读取接口。 +待处理聚合是 `ui-session` 的私有实现;`pendingInteractions` 以只读方式提供每个会话的有效请求,同一个对象原样出现在 `ctx.uiSession.sessionStatus.getSnapshot().get(id)?.pendingInteraction` 中。`useSessionStatus` 是公开 UI 读取接口。 Session 导航状态和 composer takeover 必须读取同一个 effective object,不得分别维护 status map 或 takeover roster。 diff --git a/.agents/notes/implemented/architecture/2026-09-15-client-session-references.i18n.yaml b/.agents/notes/implemented/architecture/2026-09-15-client-session-references.i18n.yaml index f1173f2864..10721d9f01 100644 --- a/.agents/notes/implemented/architecture/2026-09-15-client-session-references.i18n.yaml +++ b/.agents/notes/implemented/architecture/2026-09-15-client-session-references.i18n.yaml @@ -12,8 +12,8 @@ en: a15c7c13f167e5ac zh: 63bcc2ef60c2f344 /agent-note-client-session-references-reference-sources-and-ui-status/decision/scope-and-ownership: - en: 3f04f9c2b7b0fc2b - zh: ebfcbac3de8463a3 + en: 599e378fe377c352 + zh: 4081abc8c680f0aa /agent-note-client-session-references-reference-sources-and-ui-status/decision/addresses-bindings-and-references: en: 3743abc8bca00348 zh: d79e6a9311f0a2fe @@ -24,8 +24,8 @@ en: e2de83d10542f93b zh: 3855b38fc8c48ea3 /agent-note-client-session-references-reference-sources-and-ui-status/decision/unified-ui-session-status: - en: 2d75aef5cf5f1fc8 - zh: 87a7051f24f9871a + en: 390b3021a2e158f2 + zh: cbc38d865fbde585 /agent-note-client-session-references-reference-sources-and-ui-status/decision/explicit-providers-and-consumer-lifetimes: en: 04802baa0147fec1 zh: b86037bf2e4bc936 diff --git a/.agents/notes/implemented/architecture/2026-09-15-client-session-references.md b/.agents/notes/implemented/architecture/2026-09-15-client-session-references.md index 83f2ec688b..afe4601eda 100644 --- a/.agents/notes/implemented/architecture/2026-09-15-client-session-references.md +++ b/.agents/notes/implemented/architecture/2026-09-15-client-session-references.md @@ -21,7 +21,8 @@ Client Session objects, Agent-scoped Client Contexts, references, consumer-sourc | Owner | Responsibility | | --- | --- | | Client Session Controller | Catalog, live generations, references, source counts, bindings, history windows, and existing Session control state | -| `ui-session` | Explicit Session Provider integration and the unified UI status source | +| `ui-session` | Explicit Session Provider integration and the effective pending-interaction source | +| `api-session-status` | The unified UI status source | | View or operation | Its own reference, target, source identifier, and release point | | Workspace UI | Main-area target and reference, navigation, persisted target, and creation flow | | UI composition boundary | Supplies an owner-provided reference to one explicit `SessionProvider` | @@ -89,7 +90,7 @@ Window-level consumers may inspect source markers. Session business operations s ### Unified UI Session status -`ui-session` owns a React-free `sessionStatus` source and exposes it through the standard `useSessionStatus` hook. The snapshot is indexed by Session identity and supplies one UI status record per known Session. It combines these independent facts rather than reducing them to one mutually exclusive phase: +`api-session-status` owns the React-free `uiSession.sessionStatus` service, read as `ctx.uiSession.sessionStatus`, and exposes it through the standard `useSessionStatus` hook. The snapshot is indexed by Session identity and supplies one UI status record per known Session. It combines these independent facts rather than reducing them to one mutually exclusive phase: | Field | Value | Meaning and owner | | --- | --- | --- | @@ -99,7 +100,7 @@ Window-level consumers may inspect source markers. Session business operations s Source counts remain authoritative in `SessionListState.byId[id].retainedBy`; UI status reads them for acknowledgement policy without owning another reference registry. Titles, Workspace associations, history, queues, and projection data remain with their existing owners. -Pending domains retain `SessionPendingInteractionMap`, request identities, precedence, publication disposers, and teardown delegation. The unified status includes the same effective request object; it does not copy requests or create a second pending registry. Workspace status indicators and Conversation composer selection read `useSessionStatus` instead of separate `useSessionPendingInteraction` and `useCompletedSessionIds` hooks. +Pending domains retain `SessionPendingInteractionMap`, request identities, precedence, publication disposers, and teardown delegation in `ui-session`, which publishes each Session's effective request read-only as `ctx.uiSession.pendingInteractions`. The unified status includes the same effective request object; it does not copy requests or create a second pending registry. Workspace status indicators and Conversation composer selection read `useSessionStatus` instead of separate `useSessionPendingInteraction` and `useCompletedSessionIds` hooks. Completion tracking subscribes to the existing `api-session/status` events so a running-to-idle transition is not lost in batched catalog snapshots. Host-list rows (`ids`) establish initial and reconnect running baselines; synthetic catalog and retained rows preserve independently observed status. A pending empty catalog is not evidence that Sessions disappeared. The update rules are: diff --git a/.agents/notes/implemented/architecture/2026-09-15-client-session-references.zh.md b/.agents/notes/implemented/architecture/2026-09-15-client-session-references.zh.md index 542def8a76..35ce663d01 100644 --- a/.agents/notes/implemented/architecture/2026-09-15-client-session-references.zh.md +++ b/.agents/notes/implemented/architecture/2026-09-15-client-session-references.zh.md @@ -21,7 +21,8 @@ Client Session 对象、Agent 作用域的 Client Context、引用、使用方 | 所有者 | 职责 | | --- | --- | | Client Session Controller | 目录、活跃代、引用、来源计数、binding、历史窗口与既有 Session 控制状态 | -| `ui-session` | 显式 Session Provider 集成与统一 UI 状态来源 | +| `ui-session` | 显式 Session Provider 集成与有效待处理交互来源 | +| `api-session-status` | 统一 UI 状态来源 | | 视图或操作 | 自己的引用、目标、来源标识与释放时机 | | Workspace UI | 主区域目标与引用、导航、持久目标及创建流程 | | UI 组合边界 | 将所有者提供的引用交给一个明确的 `SessionProvider` | @@ -89,7 +90,7 @@ Controller 将来源计数与每个活跃代的引用共同管理。每个来源 ### 统一的 UI Session 状态 -`ui-session` 拥有不依赖 React 的 `sessionStatus` 来源,通过标准 `useSessionStatus` 钩子公开。快照按 Session 身份索引,为每个已知 Session 提供一条 UI 状态记录。它组合下列独立事实,不将它们压缩成互斥的单一阶段: +`api-session-status` 拥有不依赖 React 的 `uiSession.sessionStatus` 服务,以 `ctx.uiSession.sessionStatus` 读取,并通过标准 `useSessionStatus` 钩子公开。快照按 Session 身份索引,为每个已知 Session 提供一条 UI 状态记录。它组合下列独立事实,不将它们压缩成互斥的单一阶段: | 字段 | 取值 | 含义与所有者 | | --- | --- | --- | @@ -99,7 +100,7 @@ Controller 将来源计数与每个活跃代的引用共同管理。每个来源 来源计数以 `SessionListState.byId[id].retainedBy` 为准;UI 状态读取它以执行确认策略,不维护另一套引用注册表。标题、Workspace 关联、历史、队列和投影数据保留在各自的既有所有者中。 -待处理领域保留 `SessionPendingInteractionMap`、请求身份、优先级、发布清理函数与卸载委托。统一状态包含同一个有效请求对象,不复制请求,也不创建第二套待处理注册表。Workspace 状态指示器与 Conversation composer 选择读取 `useSessionStatus`,不再分别读取 `useSessionPendingInteraction` 和 `useCompletedSessionIds` 钩子。 +待处理领域在 `ui-session` 中保留 `SessionPendingInteractionMap`、请求身份、优先级、发布清理函数与卸载委托,`ui-session` 以只读的 `ctx.uiSession.pendingInteractions` 发布每个 Session 的有效请求。统一状态包含同一个有效请求对象,不复制请求,也不创建第二套待处理注册表。Workspace 状态指示器与 Conversation composer 选择读取 `useSessionStatus`,不再分别读取 `useSessionPendingInteraction` 和 `useCompletedSessionIds` 钩子。 完成跟踪订阅已有 `api-session/status` 事件,避免 running 到 idle 的变化在合批目录快照中丢失。Host 列表行(`ids`)建立初始与重连的 running 基线;目录合成行与 retained 行保留独立观察到的状态。pending 状态下的空目录不能证明 Session 已消失。更新规则如下: diff --git a/docs/config-catalog.md b/docs/config-catalog.md index 778476c08b..36582a8cec 100644 --- a/docs/config-catalog.md +++ b/docs/config-catalog.md @@ -5089,6 +5089,7 @@ These load from a `cordis.yml` entry with no `config:` block; they declare no co | `@deepseek-ai/dsh-agent` | `sessionProjections` | [`packages/core/agent/src/index.ts`](../packages/core/agent/src/index.ts) | | `@deepseek-ai/dsh-api-remote-access` | — | [`packages/api/remote-access/src/index.ts`](../packages/api/remote-access/src/index.ts) | | `@deepseek-ai/dsh-api-remotes` | `typertGateway` | [`packages/api/remotes/src/index.ts`](../packages/api/remotes/src/index.ts) | +| `@deepseek-ai/dsh-api-session-status` | — | [`packages/api/session-status/src/index.ts`](../packages/api/session-status/src/index.ts) | | `@deepseek-ai/dsh-authorization` | `credentials` | [`packages/credentials/authorization/src/index.ts`](../packages/credentials/authorization/src/index.ts) | | `@deepseek-ai/dsh-browser-use` | — | [`packages/browser-use/browser-use/src/index.ts`](../packages/browser-use/browser-use/src/index.ts) | | `@deepseek-ai/dsh-client-file-upload` | `agents` · `attachments` · `commands` · `connection` | [`packages/client/file-upload/src/index.ts`](../packages/client/file-upload/src/index.ts) | diff --git a/docs/config-catalog.zh.md b/docs/config-catalog.zh.md index 29944e53bb..cdd22555db 100644 --- a/docs/config-catalog.zh.md +++ b/docs/config-catalog.zh.md @@ -5091,6 +5091,7 @@ export interface Config { | `@deepseek-ai/dsh-agent` | `sessionProjections` | [`packages/core/agent/src/index.ts`](../packages/core/agent/src/index.ts) | | `@deepseek-ai/dsh-api-remote-access` | — | [`packages/api/remote-access/src/index.ts`](../packages/api/remote-access/src/index.ts) | | `@deepseek-ai/dsh-api-remotes` | `typertGateway` | [`packages/api/remotes/src/index.ts`](../packages/api/remotes/src/index.ts) | +| `@deepseek-ai/dsh-api-session-status` | — | [`packages/api/session-status/src/index.ts`](../packages/api/session-status/src/index.ts) | | `@deepseek-ai/dsh-authorization` | `credentials` | [`packages/credentials/authorization/src/index.ts`](../packages/credentials/authorization/src/index.ts) | | `@deepseek-ai/dsh-browser-use` | — | [`packages/browser-use/browser-use/src/index.ts`](../packages/browser-use/browser-use/src/index.ts) | | `@deepseek-ai/dsh-client-file-upload` | `agents` · `attachments` · `commands` · `connection` | [`packages/client/file-upload/src/index.ts`](../packages/client/file-upload/src/index.ts) | diff --git a/docs/module-graph.md b/docs/module-graph.md index 623e1664ff..5b245b4b3d 100644 --- a/docs/module-graph.md +++ b/docs/module-graph.md @@ -121,6 +121,7 @@ flowchart TD pkg_api_remote_access["api-remote-access"] pkg_api_remotes["api-remotes"] pkg_api_session_controller["api-session-controller"] + pkg_api_session_status["api-session-status"] pkg_api_settings_controller["api-settings-controller"] pkg_api_terminal_controller["api-terminal-controller"] pkg_api_workspace_controller["api-workspace-controller"] @@ -1510,6 +1511,7 @@ flowchart TD pkg_tool_agent_team --> pkg_tools pkg_client_test_runtime --> pkg_api_gateway pkg_client_test_runtime --> pkg_api_session_controller + pkg_client_test_runtime --> pkg_api_session_status pkg_client_test_runtime --> pkg_api_workspace_controller pkg_client_test_runtime --> pkg_attachment pkg_client_test_runtime --> pkg_client_connection @@ -1586,6 +1588,7 @@ flowchart TD | [`api-gateway`](../packages/api/gateway) | `api` | — | | [`api-job-controller`](../packages/api/job-controller) | `api` | — | | [`api-remote-access`](../packages/api/remote-access) | `api` | — | +| [`api-session-status`](../packages/api/session-status) | `api` | — | | [`api-workspace-files`](../packages/api/workspace-files) | `api` | — | | [`cmdline`](../packages/boot/cmdline) | `boot` | — | | [`acp-app`](../packages/bundle/acp-app) | `bundle` | — | @@ -1928,7 +1931,7 @@ flowchart TD | [`schedule`](../packages/schedule/schedule) | `schedule` | [`agent`](../packages/core/agent), [`api-session-controller`](../packages/api/session-controller), [`brand`](../packages/util/brand), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-persistence`](../packages/session/session-persistence), [`session-projection`](../packages/session/session-projection), [`storage-domain`](../packages/storage/storage-domain), [`subagent`](../packages/subagent/subagent), [`tools`](../packages/core/tools), [`typert-protocol`](../packages/typert/protocol), [`util-time`](../packages/util/time), [`workspace`](../packages/workspace/workspace) | | [`sdk-client`](../packages/sdk/client) | `sdk` | [`llm`](../packages/llm/llm), [`sdk-protocol`](../packages/sdk/protocol), [`session`](../packages/core/session) | | [`tool-agent-team`](../packages/team/tool-agent-team) | `team` | [`agent`](../packages/core/agent), [`agent-team`](../packages/team/agent-team), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools) | -| [`client-test-runtime`](../packages/test-support/client-runtime) | `test-support` | [`api-gateway`](../packages/api/gateway), [`api-session-controller`](../packages/api/session-controller), [`api-workspace-controller`](../packages/api/workspace-controller), [`attachment`](../packages/attachment/attachment), [`client-connection`](../packages/client/connection), [`client-hmr`](../packages/client/hmr), [`client-modules`](../packages/client/modules), [`client-store`](../packages/client/store), [`client-ui-chat`](../packages/client/ui-chat), [`client-ui-context-menu`](../packages/client/ui-context-menu), [`client-ui-conversation`](../packages/client/ui-conversation), [`client-ui-renderer`](../packages/client/ui-renderer), [`client-ui-session`](../packages/client/ui-session), [`client-ui-settings`](../packages/client/ui-settings), [`client-ui-slots`](../packages/client/ui-slots), [`client-web`](../packages/client/web), [`remote-mock`](../packages/test-support/remote-mock), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`typert-protocol`](../packages/typert/protocol) | +| [`client-test-runtime`](../packages/test-support/client-runtime) | `test-support` | [`api-gateway`](../packages/api/gateway), [`api-session-controller`](../packages/api/session-controller), [`api-session-status`](../packages/api/session-status), [`api-workspace-controller`](../packages/api/workspace-controller), [`attachment`](../packages/attachment/attachment), [`client-connection`](../packages/client/connection), [`client-hmr`](../packages/client/hmr), [`client-modules`](../packages/client/modules), [`client-store`](../packages/client/store), [`client-ui-chat`](../packages/client/ui-chat), [`client-ui-context-menu`](../packages/client/ui-context-menu), [`client-ui-conversation`](../packages/client/ui-conversation), [`client-ui-renderer`](../packages/client/ui-renderer), [`client-ui-session`](../packages/client/ui-session), [`client-ui-settings`](../packages/client/ui-settings), [`client-ui-slots`](../packages/client/ui-slots), [`client-web`](../packages/client/web), [`remote-mock`](../packages/test-support/remote-mock), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`typert-protocol`](../packages/typert/protocol) | | [`subagent-dsh-sdk`](../packages/subagent/subagent-dsh-sdk) | `subagent` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`sdk-client`](../packages/sdk/client), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`subprocess`](../packages/subprocess/subprocess) | | [`tool-schedule`](../packages/schedule/tool-schedule) | `schedule` | [`llm`](../packages/llm/llm), [`schedule`](../packages/schedule/schedule), [`subagent`](../packages/subagent/subagent), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools) | | [`sdk-jsonrpc-server`](../packages/sdk/server) | `sdk` | [`agent`](../packages/core/agent), [`attachment`](../packages/attachment/attachment), [`commands`](../packages/interaction/commands), [`goal`](../packages/goal/goal), [`llm`](../packages/llm/llm), [`llm-deepseek-api-key`](../packages/llm/llm-deepseek-api-key), [`schedule`](../packages/schedule/schedule), [`scope`](../packages/core/scope), [`sdk-protocol`](../packages/sdk/protocol), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`user-approval`](../packages/interaction/user-approval), [`user-questions`](../packages/interaction/user-questions), [`working-directory`](../packages/session/working-directory) | diff --git a/docs/module-graph.zh.md b/docs/module-graph.zh.md index fd754de0b4..17848a8732 100644 --- a/docs/module-graph.zh.md +++ b/docs/module-graph.zh.md @@ -123,6 +123,7 @@ flowchart TD pkg_api_remote_access["api-remote-access"] pkg_api_remotes["api-remotes"] pkg_api_session_controller["api-session-controller"] + pkg_api_session_status["api-session-status"] pkg_api_settings_controller["api-settings-controller"] pkg_api_terminal_controller["api-terminal-controller"] pkg_api_workspace_controller["api-workspace-controller"] @@ -1512,6 +1513,7 @@ flowchart TD pkg_tool_agent_team --> pkg_tools pkg_client_test_runtime --> pkg_api_gateway pkg_client_test_runtime --> pkg_api_session_controller + pkg_client_test_runtime --> pkg_api_session_status pkg_client_test_runtime --> pkg_api_workspace_controller pkg_client_test_runtime --> pkg_attachment pkg_client_test_runtime --> pkg_client_connection @@ -1588,6 +1590,7 @@ flowchart TD | [`api-gateway`](../packages/api/gateway) | `api` | — | | [`api-job-controller`](../packages/api/job-controller) | `api` | — | | [`api-remote-access`](../packages/api/remote-access) | `api` | — | +| [`api-session-status`](../packages/api/session-status) | `api` | — | | [`api-workspace-files`](../packages/api/workspace-files) | `api` | — | | [`cmdline`](../packages/boot/cmdline) | `boot` | — | | [`acp-app`](../packages/bundle/acp-app) | `bundle` | — | @@ -1930,7 +1933,7 @@ flowchart TD | [`schedule`](../packages/schedule/schedule) | `schedule` | [`agent`](../packages/core/agent), [`api-session-controller`](../packages/api/session-controller), [`brand`](../packages/util/brand), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-persistence`](../packages/session/session-persistence), [`session-projection`](../packages/session/session-projection), [`storage-domain`](../packages/storage/storage-domain), [`subagent`](../packages/subagent/subagent), [`tools`](../packages/core/tools), [`typert-protocol`](../packages/typert/protocol), [`util-time`](../packages/util/time), [`workspace`](../packages/workspace/workspace) | | [`sdk-client`](../packages/sdk/client) | `sdk` | [`llm`](../packages/llm/llm), [`sdk-protocol`](../packages/sdk/protocol), [`session`](../packages/core/session) | | [`tool-agent-team`](../packages/team/tool-agent-team) | `team` | [`agent`](../packages/core/agent), [`agent-team`](../packages/team/agent-team), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools) | -| [`client-test-runtime`](../packages/test-support/client-runtime) | `test-support` | [`api-gateway`](../packages/api/gateway), [`api-session-controller`](../packages/api/session-controller), [`api-workspace-controller`](../packages/api/workspace-controller), [`attachment`](../packages/attachment/attachment), [`client-connection`](../packages/client/connection), [`client-hmr`](../packages/client/hmr), [`client-modules`](../packages/client/modules), [`client-store`](../packages/client/store), [`client-ui-chat`](../packages/client/ui-chat), [`client-ui-context-menu`](../packages/client/ui-context-menu), [`client-ui-conversation`](../packages/client/ui-conversation), [`client-ui-renderer`](../packages/client/ui-renderer), [`client-ui-session`](../packages/client/ui-session), [`client-ui-settings`](../packages/client/ui-settings), [`client-ui-slots`](../packages/client/ui-slots), [`client-web`](../packages/client/web), [`remote-mock`](../packages/test-support/remote-mock), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`typert-protocol`](../packages/typert/protocol) | +| [`client-test-runtime`](../packages/test-support/client-runtime) | `test-support` | [`api-gateway`](../packages/api/gateway), [`api-session-controller`](../packages/api/session-controller), [`api-session-status`](../packages/api/session-status), [`api-workspace-controller`](../packages/api/workspace-controller), [`attachment`](../packages/attachment/attachment), [`client-connection`](../packages/client/connection), [`client-hmr`](../packages/client/hmr), [`client-modules`](../packages/client/modules), [`client-store`](../packages/client/store), [`client-ui-chat`](../packages/client/ui-chat), [`client-ui-context-menu`](../packages/client/ui-context-menu), [`client-ui-conversation`](../packages/client/ui-conversation), [`client-ui-renderer`](../packages/client/ui-renderer), [`client-ui-session`](../packages/client/ui-session), [`client-ui-settings`](../packages/client/ui-settings), [`client-ui-slots`](../packages/client/ui-slots), [`client-web`](../packages/client/web), [`remote-mock`](../packages/test-support/remote-mock), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`typert-protocol`](../packages/typert/protocol) | | [`subagent-dsh-sdk`](../packages/subagent/subagent-dsh-sdk) | `subagent` | [`agent`](../packages/core/agent), [`llm`](../packages/llm/llm), [`sdk-client`](../packages/sdk/client), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`subprocess`](../packages/subprocess/subprocess) | | [`tool-schedule`](../packages/schedule/tool-schedule) | `schedule` | [`llm`](../packages/llm/llm), [`schedule`](../packages/schedule/schedule), [`subagent`](../packages/subagent/subagent), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools) | | [`sdk-jsonrpc-server`](../packages/sdk/server) | `sdk` | [`agent`](../packages/core/agent), [`attachment`](../packages/attachment/attachment), [`commands`](../packages/interaction/commands), [`goal`](../packages/goal/goal), [`llm`](../packages/llm/llm), [`llm-deepseek-api-key`](../packages/llm/llm-deepseek-api-key), [`schedule`](../packages/schedule/schedule), [`scope`](../packages/core/scope), [`sdk-protocol`](../packages/sdk/protocol), [`session`](../packages/core/session), [`subagent`](../packages/subagent/subagent), [`user-approval`](../packages/interaction/user-approval), [`user-questions`](../packages/interaction/user-questions), [`working-directory`](../packages/session/working-directory) | diff --git a/docs/subsystems/slots.i18n.yaml b/docs/subsystems/slots.i18n.yaml index 7d02bb4794..1b3bb8ec24 100644 --- a/docs/subsystems/slots.i18n.yaml +++ b/docs/subsystems/slots.i18n.yaml @@ -18,8 +18,8 @@ en: 278b2eee160be413 zh: d6e0fd1e9f4a4b27 /web-client-slots/framework-provided-hooks: - en: c9f8d836214623ae - zh: 76dec55006396535 + en: ad206d777cc2e58c + zh: e981eb17be595e42 /web-client-slots/developer-provided-injection: en: 3481dfa6cd3097da zh: acbd6f06a7da1752 diff --git a/docs/subsystems/slots.md b/docs/subsystems/slots.md index 820bd90171..0546101167 100644 --- a/docs/subsystems/slots.md +++ b/docs/subsystems/slots.md @@ -106,7 +106,8 @@ The shipped adapters add these standard props. They are available according to t | Availability | Props | Owner | |---|---|---| -| every scope | `useSessions`, `useSessionStatus`, `useSessionRetainInfo`, `useSessionAccess` | `ui-session` | +| every scope | `useSessions`, `useSessionRetainInfo`, `useSessionAccess` | `ui-session` | +| every scope | `useSessionStatus` | `api-session-status` | | every scope | `useWorkspaces`, `useWorkspaceAccess` | `ui-workspace` | | every scope | `useRemoteAccess` (the `global` resource) | `api-remote-access` | | every scope | `usePanelInfo` | `ui-layout` | diff --git a/docs/subsystems/slots.zh.md b/docs/subsystems/slots.zh.md index 69456901eb..344b3ba67f 100644 --- a/docs/subsystems/slots.zh.md +++ b/docs/subsystems/slots.zh.md @@ -108,7 +108,8 @@ hoc entry 是以必填 `id` 和可选 `key` 寻址的一层。不带 `key` 的 | 可用范围 | Props | Owner | |---|---|---| -| 所有 scope | `useSessions`、`useSessionStatus`、`useSessionRetainInfo`、`useSessionAccess` | `ui-session` | +| 所有 scope | `useSessions`、`useSessionRetainInfo`、`useSessionAccess` | `ui-session` | +| 所有 scope | `useSessionStatus` | `api-session-status` | | 所有 scope | `useWorkspaces`、`useWorkspaceAccess` | `ui-workspace` | | 所有 scope | `useRemoteAccess`(`global` 资源) | `api-remote-access` | | 所有作用域 | `usePanelInfo` | `ui-layout` | diff --git a/docs/subsystems/web-client.i18n.yaml b/docs/subsystems/web-client.i18n.yaml index f201ba2f7e..34af9892a0 100644 --- a/docs/subsystems/web-client.i18n.yaml +++ b/docs/subsystems/web-client.i18n.yaml @@ -24,8 +24,8 @@ en: c063711f8247c240 zh: 5e54758bbaf1670c /web-client-architecture/conversation-and-presentation: - en: 9a22492f0d4359c6 - zh: 55d449e383e88f62 + en: 77da55b938c0c77a + zh: 1619486245ab3d18 /web-client-architecture/data-paths: en: a254278432416473 zh: 567c2d3c6a20b304 diff --git a/docs/subsystems/web-client.md b/docs/subsystems/web-client.md index 93f2fbdf1d..9f4bd605aa 100644 --- a/docs/subsystems/web-client.md +++ b/docs/subsystems/web-client.md @@ -57,7 +57,7 @@ This pairing is not a second source of business truth. Host controllers decide d Web and desktop share the [Coding Tools preference](../../packages/client/ui-settings/README.md#use-this-package). It controls diagnostic Views, [available preset choices](../../packages/client/ui-agent-preset/README.md), changed-file cards, and the builtin HTML preview policy without changing Session records. -`ui-session` installs the Session scope adapter and publishes `useSessions`, `useSessionStatus`, `useSessionRetainInfo`, `useSessionAccess`, `useSession`, `sessionId`, `useProjection`, and the Session-scope `useAccess` over the [remote-access](../../packages/api/remote-access/README.md) Client service. `SessionProvider` inherits an outer binding or binds an explicit `SessionReference`, so concurrent subtrees can target different Sessions. Domain adapters add further standard sources without putting React hooks on the model objects. +`ui-session` installs the Session scope adapter and publishes `useSessions`, `useSessionRetainInfo`, `useSessionAccess`, `useSession`, `sessionId`, `useProjection`, and the Session-scope `useAccess` over the [remote-access](../../packages/api/remote-access/README.md) Client service. `SessionProvider` inherits an outer binding or binds an explicit `SessionReference`, so concurrent subtrees can target different Sessions. [`api-session-status`](../../packages/api/session-status/README.md) publishes `useSessionStatus` from the `ctx.uiSession.sessionStatus` table of running state, the effective pending interaction, and completion reminders. Domain adapters add further standard sources without putting React hooks on the model objects. `ui-conversation` binds once to each `SessionBinding.eventSource`. Its event registry correlates durable Session events and Client-only `assistant/live-chunk` updates into stable business Contexts, and its view registry materializes target snapshots. Chat Assistant, Trajectory Assistant, and Turn Tail interpret both live chunks and the compact streams embedded in durable settlements, so reconnect and paged history reproduce the same Assistant state without durable token rows. `ui-chat` and `ui-trajectory` register separate Definitions and builders: they may interpret the same event family, but they do not import or share each other's final display model. The shell selects a registered view and passes its snapshot through standard hooks and Slots. [Conversation](conversation.md) defines Context identity, replay, Location data, target builders, and keyed renderers. diff --git a/docs/subsystems/web-client.zh.md b/docs/subsystems/web-client.zh.md index 3c0c0da5bb..ad8452ae38 100644 --- a/docs/subsystems/web-client.zh.md +++ b/docs/subsystems/web-client.zh.md @@ -57,7 +57,7 @@ Connection 拥有请求 URL 解析、request correlation、`/api` carrier、trus Web 和桌面端共享[代码工作工具偏好](../../packages/client/ui-settings/README.zh.md#use-this-package)。它控制诊断 View、[可用的预设选项](../../packages/client/ui-agent-preset/README.zh.md)、改动文件卡片和内置 HTML 预览策略,不改变 Session 记录。 -`ui-session` 安装 Session scope adapter,并在 [remote-access](../../packages/api/remote-access/README.zh.md) Client 服务之上提供 `useSessions`、`useSessionStatus`、`useSessionRetainInfo`、`useSessionAccess`、`useSession`、`sessionId`、`useProjection` 和会话作用域的 `useAccess`。`SessionProvider` 可以继承外围 binding,也可以绑定显式 `SessionReference`,因此并存子树可以指向不同 Session。领域 adapter 可以继续添加标准 source,但不会把 React hook 放进 model object。 +`ui-session` 安装 Session scope adapter,并在 [remote-access](../../packages/api/remote-access/README.zh.md) Client 服务之上提供 `useSessions`、`useSessionRetainInfo`、`useSessionAccess`、`useSession`、`sessionId`、`useProjection` 和会话作用域的 `useAccess`。`SessionProvider` 可以继承外围 binding,也可以绑定显式 `SessionReference`,因此并存子树可以指向不同 Session。[`api-session-status`](../../packages/api/session-status/README.zh.md) 从 `ctx.uiSession.sessionStatus` 状态表提供 `useSessionStatus`,该表汇总运行状态、生效的待交互请求和完成提醒。领域 adapter 可以继续添加标准 source,但不会把 React hook 放进 model object。 `ui-conversation` 对每个 `SessionBinding.eventSource` 只绑定一次。它的 event registry 把持久 Session event 与 Client-only `assistant/live-chunk` update 关联成稳定的业务 Context,view registry 则 materialize target snapshot。Chat Assistant、Trajectory Assistant 与 Turn Tail 同时解释 live chunk 和持久 settlement 中嵌入的紧凑 stream,因此重连与分页历史无需持久 token 行即可复现相同 Assistant 状态。`ui-chat` 与 `ui-trajectory` 分别注册自己的 Definition 和 builder:它们可以解释同一 event family,但不会导入或共享彼此的最终 display model。Shell 选择一个已注册 view,再通过标准 hook 与 Slot 交付其 snapshot。[Conversation](conversation.zh.md)定义 Context identity、replay、Location data、target builder 与 keyed renderer。 diff --git a/docs/upgrade-guide/v0.2.2-rc.1/session-status-package/guide.i18n.yaml b/docs/upgrade-guide/v0.2.2-rc.1/session-status-package/guide.i18n.yaml new file mode 100644 index 0000000000..d877ed6052 --- /dev/null +++ b/docs/upgrade-guide/v0.2.2-rc.1/session-status-package/guide.i18n.yaml @@ -0,0 +1,16 @@ +# Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading +# section, a hash of its English and Chinese blocks outside code blocks and generated regions. +# After editing either side, bring the other along and re-record with: +# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.2-rc.1/session-status-package/guide.md +/: + en: 3a46514fb8b48f60 + zh: 4b78cd97d86b286f +/session-status-moves-to-deepseek-ai-dsh-api-session-status: + en: 1418d25b0baaf621 + zh: df25933b935ecbd7 +/session-status-moves-to-deepseek-ai-dsh-api-session-status/change: + en: 12cf933ed98d7f68 + zh: 949056997b819906 +/session-status-moves-to-deepseek-ai-dsh-api-session-status/migration: + en: 8d962ec919ff8bb5 + zh: 8be187dc3ca178b0 diff --git a/docs/upgrade-guide/v0.2.2-rc.1/session-status-package/guide.md b/docs/upgrade-guide/v0.2.2-rc.1/session-status-package/guide.md new file mode 100644 index 0000000000..4412aac973 --- /dev/null +++ b/docs/upgrade-guide/v0.2.2-rc.1/session-status-package/guide.md @@ -0,0 +1,27 @@ +--- +kind: upgrade-guide +description: "SessionStatus, SessionStatusSnapshot, UseSessionStatus, and the useSessionStatus hook move from @deepseek-ai/dsh-client-ui-session/client to @deepseek-ai/dsh-api-session-status/client, and ctx.uiSession.sessionStatus becomes the separate uiSession.sessionStatus service that readers inject." +--- + +# Session status moves to `@deepseek-ai/dsh-api-session-status` + +English | [中文](guide.zh.md) + +## Change + +`@deepseek-ai/dsh-client-ui-session/client` no longer exports `SessionStatus`, `SessionStatusSnapshot`, or `UseSessionStatus`, and ui-session no longer declares or provides the `useSessionStatus` root hook. Both now belong to the Client half of [`@deepseek-ai/dsh-api-session-status`](../../../../packages/api/session-status/README.md), which the Web bundle loads beside ui-session. The `SessionStatus` fields `running`, `pendingInteraction`, and `completionUnread` and their meaning are unchanged. A Client composition that loads ui-session without session-status has no status table and no `useSessionStatus` hook. + +`ctx.uiSession.sessionStatus` is now the separate `uiSession.sessionStatus` service. Reading it through `ctx.uiSession.sessionStatus.getSnapshot()` and `subscribe()` keeps its form, but a plugin that reads it without injecting `'uiSession.sessionStatus'` fails with `cannot get property "uiSession.sessionStatus" without inject`. `ctx.uiSession` now has the type `UiSessionService`, which extends the unchanged `UiSession` class with members such as `sessionStatus`; a value annotated as `UiSession` does not show `sessionStatus`. + +Pending interactions stay in ui-session: `ctx.uiSession.registerPendingInteraction(precedence)`, `SessionPendingInteractionBase`, `SessionPendingInteractionMap`, `SessionPendingInteraction`, and `PendingInteractionPublisher` keep their names, behavior, and `@deepseek-ai/dsh-client-ui-session/client` export. Declarations that extend `SessionPendingInteractionMap` keep targeting that module. ui-session additionally exposes the read-only `ctx.uiSession.pendingInteractions` source. + +This affects Client plugins and tests that import the three status types, render components that read `useSessionStatus`, or read `ctx.uiSession.sessionStatus`. + +## Migration + +1. Import `SessionStatus`, `SessionStatusSnapshot`, and `UseSessionStatus` from `@deepseek-ai/dsh-api-session-status/client`. A package whose components read `useSessionStatus` without importing these types adds `import type {} from '@deepseek-ai/dsh-api-session-status/client'` so its program sees the hook declaration. Declare the package in `devDependencies`, `dsh.client.inject`, and the TypeScript project references. +2. In each plugin that reads `ctx.uiSession.sessionStatus`, add `'uiSession.sessionStatus'` after `'uiSession'` in `inject`. A plugin that only needs the effective pending request may read and subscribe to `ctx.uiSession.pendingInteractions` instead. +3. Where code passes `ctx.uiSession` through a parameter or field annotated as `UiSession` and then reads `sessionStatus`, annotate it as `UiSessionService` from `@deepseek-ai/dsh-client-ui-session/client`. +4. Leave `registerPendingInteraction` calls and `declare module '@deepseek-ai/dsh-client-ui-session/client'` augmentations of `SessionPendingInteractionMap` unchanged. +5. A custom Client composition that loads `@deepseek-ai/dsh-client-ui-session` also loads `@deepseek-ai/dsh-api-session-status`, so `useSessionStatus` remains available. +6. Confirm that the plugin type-checks and that a Session row still shows its running or waiting indicator. diff --git a/docs/upgrade-guide/v0.2.2-rc.1/session-status-package/guide.zh.md b/docs/upgrade-guide/v0.2.2-rc.1/session-status-package/guide.zh.md new file mode 100644 index 0000000000..88077fbf5d --- /dev/null +++ b/docs/upgrade-guide/v0.2.2-rc.1/session-status-package/guide.zh.md @@ -0,0 +1,27 @@ +--- +kind: upgrade-guide +description: "SessionStatus、SessionStatusSnapshot、UseSessionStatus 和 useSessionStatus hook 从 @deepseek-ai/dsh-client-ui-session/client 移到 @deepseek-ai/dsh-api-session-status/client,ctx.uiSession.sessionStatus 改为读取方需要注入的独立 uiSession.sessionStatus 服务。" +--- + +# 会话状态移到 `@deepseek-ai/dsh-api-session-status` + +[English](guide.md) | 中文 + +## 变更 + +`@deepseek-ai/dsh-client-ui-session/client` 不再导出 `SessionStatus`、`SessionStatusSnapshot` 或 `UseSessionStatus`,ui-session 也不再声明或提供根 hook `useSessionStatus`。它们现在属于 [`@deepseek-ai/dsh-api-session-status`](../../../../packages/api/session-status/README.zh.md) 的 Client 部分,Web bundle 会与 ui-session 一起加载它。`SessionStatus` 的字段 `running`、`pendingInteraction`、`completionUnread` 及其含义不变。只加载 ui-session、不加载 session-status 的 Client 组合没有状态表,也没有 `useSessionStatus` hook。 + +`ctx.uiSession.sessionStatus` 现在是独立的 `uiSession.sessionStatus` 服务。通过 `ctx.uiSession.sessionStatus.getSnapshot()` 和 `subscribe()` 读取的写法不变,但未注入 `'uiSession.sessionStatus'` 就读取它的插件会报错 `cannot get property "uiSession.sessionStatus" without inject`。`ctx.uiSession` 的类型改为 `UiSessionService`,它在不变的 `UiSession` class 之上加入 `sessionStatus` 等成员;标注为 `UiSession` 的值看不到 `sessionStatus`。 + +待交互仍归 ui-session:`ctx.uiSession.registerPendingInteraction(precedence)`、`SessionPendingInteractionBase`、`SessionPendingInteractionMap`、`SessionPendingInteraction` 和 `PendingInteractionPublisher` 的名称、行为以及从 `@deepseek-ai/dsh-client-ui-session/client` 的导出都不变。扩展 `SessionPendingInteractionMap` 的声明继续指向该模块。ui-session 另外提供只读的 `ctx.uiSession.pendingInteractions` 数据源。 + +受影响的是导入这三个状态类型、渲染读取 `useSessionStatus` 的组件,或读取 `ctx.uiSession.sessionStatus` 的 Client 插件和测试。 + +## 迁移 + +1. 从 `@deepseek-ai/dsh-api-session-status/client` 导入 `SessionStatus`、`SessionStatusSnapshot` 和 `UseSessionStatus`。组件读取 `useSessionStatus` 但不导入这些类型的包,加入 `import type {} from '@deepseek-ai/dsh-api-session-status/client'`,让其程序看到该 hook 的声明。在 `devDependencies`、`dsh.client.inject` 和 TypeScript 项目引用中声明该包。 +2. 在每个读取 `ctx.uiSession.sessionStatus` 的插件中,把 `'uiSession.sessionStatus'` 加到 `inject` 列表的 `'uiSession'` 之后。只需要生效待交互请求的插件,可以改为读取并订阅 `ctx.uiSession.pendingInteractions`。 +3. 代码把 `ctx.uiSession` 传给标注为 `UiSession` 的参数或字段、之后又读取 `sessionStatus` 时,把标注改为 `@deepseek-ai/dsh-client-ui-session/client` 的 `UiSessionService`。 +4. `registerPendingInteraction` 调用和对 `SessionPendingInteractionMap` 的 `declare module '@deepseek-ai/dsh-client-ui-session/client'` 扩展保持不变。 +5. 加载 `@deepseek-ai/dsh-client-ui-session` 的自定义 Client 组合同时加载 `@deepseek-ai/dsh-api-session-status`,使 `useSessionStatus` 继续可用。 +6. 确认插件通过类型检查,并且会话行仍显示运行或等待标记。 diff --git a/packages/api/README.i18n.yaml b/packages/api/README.i18n.yaml index bbe9d4ab52..e258490a9e 100644 --- a/packages/api/README.i18n.yaml +++ b/packages/api/README.i18n.yaml @@ -15,8 +15,8 @@ en: 1eb35b015a6c423f zh: a8a3dceee2c9e943 /api-remote-api-layers/packages: - en: 37388d921f2f47cf - zh: 24eb674c14dc2c6d + en: 68c5e36b4bee3adc + zh: 06a5acc93f0f9d32 /api-remote-api-layers/related-documentation: en: 507116ae09161df1 zh: f5e538ac5fdaf454 diff --git a/packages/api/README.md b/packages/api/README.md index 9f490b8134..bc14669983 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -31,6 +31,7 @@ The packages below provide the Remote layer; the package READMEs own the exhaust | [`remote-access/`](remote-access/README.md) | Decides which Remote methods non-owner Peers may call, filters list results, and streams each Peer's access snapshot. | `ctx.remoteAccess` / `ctx.remote.remoteAccess` | | [`job-controller/`](job-controller/README.md) | Streams one background job's observation record to the Client. | `ctx.jobController` / `ctx.remote.job` | | [`session-controller/`](session-controller/README.md) | Owns Session commands, history streams, live control state, and Agent/Session identity policy. | `ctx.sessionController` / `ctx.remote.session` | +| [`session-status/`](session-status/README.md) | Combines running state, the effective pending interaction, and completion reminders into the Client Session status table behind `useSessionStatus`. | `ctx.uiSession.sessionStatus` | | [`settings-controller/`](settings-controller/README.md) | Owns the configuration-surface reads and writes over the settings-domain seams. | `ctx.settingsController`, `ctx.credentialsController` / `ctx.remote.settings`, `ctx.remote.credentials` | | [`workspace-controller/`](workspace-controller/README.md) | Owns Workspace mutations and the complete Client Workspace projection. | `ctx.workspaceController` / `ctx.remote.workspace` | | [`terminal-controller/`](terminal-controller/README.md) | Session-owned interactive shells, screen recovery and browser terminal control. | `ctx.terminalController` / `ctx.remote.terminal` | diff --git a/packages/api/README.zh.md b/packages/api/README.zh.md index 3d7ae60113..95d56305ec 100644 --- a/packages/api/README.zh.md +++ b/packages/api/README.zh.md @@ -31,6 +31,7 @@ kind: "package-group" | [`remote-access/`](remote-access/README.zh.md) | 决定非 owner Peer 可以调用哪些 Remote 方法,过滤列表结果,并为每个 Peer 推送其访问快照。 | `ctx.remoteAccess` / `ctx.remote.remoteAccess` | | [`job-controller/`](job-controller/README.zh.md) | 把一个后台任务的观测 record 流式送到 Client。 | `ctx.jobController` / `ctx.remote.job` | | [`session-controller/`](session-controller/README.zh.md) | 拥有会话命令、历史记录流、实时控制状态与 Agent/Session 身份策略。 | `ctx.sessionController` / `ctx.remote.session` | +| [`session-status/`](session-status/README.zh.md) | 把运行状态、生效的待交互请求和完成提醒汇总为 Client 会话状态表,并通过 `useSessionStatus` 提供。 | `ctx.uiSession.sessionStatus` | | [`settings-controller/`](settings-controller/README.zh.md) | 拥有 settings 域各 seam 之上的配置界面读写。 | `ctx.settingsController`、`ctx.credentialsController` / `ctx.remote.settings`、`ctx.remote.credentials` | | [`workspace-controller/`](workspace-controller/README.zh.md) | 拥有 Workspace 变更与完整 Client Workspace 投影。 | `ctx.workspaceController` / `ctx.remote.workspace` | | [`terminal-controller/`](terminal-controller/README.zh.md) | Session 拥有的交互式 shell、屏幕恢复和浏览器终端控制。 | `ctx.terminalController` / `ctx.remote.terminal` | diff --git a/packages/api/session-status/README.i18n.yaml b/packages/api/session-status/README.i18n.yaml new file mode 100644 index 0000000000..7fe64b65ca --- /dev/null +++ b/packages/api/session-status/README.i18n.yaml @@ -0,0 +1,31 @@ +# Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading +# section, a hash of its English and Chinese blocks outside code blocks and generated regions. +# After editing either side, bring the other along and re-record with: +# pnpm run verify-translation-pairing --write packages/api/session-status/README.md +/: + en: 11efe93e9b428342 + zh: 56d90a359ee86ad5 +/deepseek-ai-dsh-api-session-status: + en: 2a066f177328ba18 + zh: 563228b6c8569b0b +/deepseek-ai-dsh-api-session-status/summary: + en: a3e8fe090a557c9b + zh: 782500fb80b92712 +/deepseek-ai-dsh-api-session-status/table-of-contents: + en: 3e7914c761a1310c + zh: 82c46d3a4d5e6a55 +/deepseek-ai-dsh-api-session-status/status-table: + en: 610aab5912673087 + zh: 007c4bb98666f7a5 +/deepseek-ai-dsh-api-session-status/model-experience: + en: 687076082426c060 + zh: 5888fcd520d0e53e +/deepseek-ai-dsh-api-session-status/model-experience/kv-cache-effect: + en: 99bd3bc7d244944a + zh: 0021893ed90b2686 +/deepseek-ai-dsh-api-session-status/known-limitations-and-deferred-work: + en: 52d467a078cc3486 + zh: c373685b879ad6de +/deepseek-ai-dsh-api-session-status/known-limitations-and-deferred-work/dev-note: + en: e67f633dc6fe7773 + zh: e88aeb617ffb74ea diff --git a/packages/api/session-status/README.md b/packages/api/session-status/README.md new file mode 100644 index 0000000000..78de2fe7d4 --- /dev/null +++ b/packages/api/session-status/README.md @@ -0,0 +1,63 @@ +--- +description: "Client Session status table and useSessionStatus hook: running state, the effective pending interaction, and completion reminders by Session." +kind: "package-reference" +--- +# @deepseek-ai/dsh-api-session-status + +English | [中文](README.zh.md) + +## Summary + +Use this package to read each Session's running state, highest-precedence pending interaction, and completion reminder from one Client status table. Components read the table through the `useSessionStatus` root hook; Client plugins read it as `ctx.uiSession.sessionStatus`. The package has no configuration fields, Host behavior, or persistent storage. + +## Table of Contents + +- [Status table](#status-table) +- [Model Experience](#model-experience) +- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work) +- [Dev Note](#dev-note) + +----- + + +## Status table + +The Web bundle loads the Client half after [`dsh-client-ui-session`](../../client/ui-session/README.md); a composition that loads ui-session without this package has no status table and no `useSessionStatus` hook. A plugin that reads `ctx.uiSession.sessionStatus` adds `'uiSession.sessionStatus'` to its `inject` list; without it, Cordis rejects the property read. The member is declared on ui-session's `UiSessionService`, the type of `ctx.uiSession`; a value annotated as the `UiSession` class does not show it. + +| Member | Use | +|---|---| +| `getSnapshot()` | Status by Session identity; the snapshot keeps its reference until a status fact changes | +| `subscribe(listener)` | Observe published changes; a throwing listener is reported without stopping later listeners | + +Each `SessionStatus` has three independent fields: + +| Field | Source | +|---|---| +| `running` | Host Session list baselines and `api-session/status` events; absent until either establishes it. Subagent catalog rows and retained subagent fallback rows do not establish it. | +| `pendingInteraction` | The same object `ctx.uiSession.pendingInteractions` publishes for that Session. Domain plugins keep registering requests through `ctx.uiSession.registerPendingInteraction(precedence)`. | +| `completionUnread` | A stop this Client observed while the main view did not retain the Session, including an idle event that arrives before the first list baseline. The reminder clears when the main view retains the Session, the Session runs again, or a ready list no longer contains it. | + + +## Model Experience + +None, as the status table adds no tools, prompts, or Session events. + +#### KV Cache effect + +None; the status table does not assemble model requests. + +## Known Limitations and Deferred Work + + + +- **Completion reminders belong to one Client** — another browser tab or a page reload starts without the reminders this Client recorded. + + +### Dev Note + +
+Working context for maintainers — click to expand + +None. + +
diff --git a/packages/api/session-status/README.zh.md b/packages/api/session-status/README.zh.md new file mode 100644 index 0000000000..d58f4ad90a --- /dev/null +++ b/packages/api/session-status/README.zh.md @@ -0,0 +1,63 @@ +--- +description: "Client 会话状态表与 useSessionStatus hook:按会话提供运行状态、生效的待交互请求和完成提醒。" +kind: "package-reference" +--- +# @deepseek-ai/dsh-api-session-status + +[English](README.md) | 中文 + +## 概述 + +使用本包可从同一张 Client 状态表读取每个 Session 的运行状态、优先级最高的待交互请求和完成提醒。组件通过根 hook `useSessionStatus` 读取该表;Client 插件以 `ctx.uiSession.sessionStatus` 读取。本包没有配置字段、Host 行为或持久化存储。 + +## 目录 + +- [状态表](#status-table) +- [模型体验](#model-experience) +- [已知限制与暂缓事项](#known-limitations-and-deferred-work) +- [开发备注](#dev-note) + +----- + + +## 状态表 + +Web bundle 在 [`dsh-client-ui-session`](../../client/ui-session/README.zh.md) 之后加载本包的 Client 部分;只加载 ui-session、不加载本包的组合没有状态表,也没有 `useSessionStatus` hook。读取 `ctx.uiSession.sessionStatus` 的插件需要在 `inject` 列表中加入 `'uiSession.sessionStatus'`;否则 Cordis 会拒绝该属性读取。该成员声明在 ui-session 的 `UiSessionService`(`ctx.uiSession` 的类型)上;标注为 `UiSession` class 的值看不到它。 + +| 成员 | 用途 | +|---|---| +| `getSnapshot()` | 按 Session 身份索引的状态;状态事实变化前快照保持同一引用 | +| `subscribe(listener)` | 观察已发布的变化;抛错的 listener 会被报告,不会阻止后续 listener | + +每个 `SessionStatus` 有三个相互独立的字段: + +| 字段 | 来源 | +|---|---| +| `running` | Host 会话列表基线和 `api-session/status` 事件;两者都未建立之前为缺省。Subagent 目录行和已保留子会话的 fallback 行不会建立它。 | +| `pendingInteraction` | `ctx.uiSession.pendingInteractions` 为该 Session 发布的同一个对象。领域插件仍通过 `ctx.uiSession.registerPendingInteraction(precedence)` 登记请求。 | +| `completionUnread` | 本 Client 在主视图未保留该 Session 时观察到的一次停止,包括首个列表基线之前到达的空闲事件。主视图保留该 Session、该 Session 再次运行,或就绪列表不再包含它时,提醒清除。 | + + +## 模型体验 + +无,因为状态表不添加工具、提示词或 Session 事件。 + +#### KV Cache 影响 + +无;状态表不会组装模型请求。 + +## 已知限制与暂缓事项 + + + +- **完成提醒只属于一个 Client**——另一个浏览器标签页或刷新后的页面不会带上本 Client 记录的提醒。 + + +### 开发备注 + +
+维护者工作上下文——点击展开 + +无。 + +
diff --git a/packages/api/session-status/locale/de.json b/packages/api/session-status/locale/de.json new file mode 100644 index 0000000000..ecae7fda9a --- /dev/null +++ b/packages/api/session-status/locale/de.json @@ -0,0 +1,5 @@ +{ + "meta": { + "title": "Sitzungsstatus" + } +} diff --git a/packages/api/session-status/locale/en.json b/packages/api/session-status/locale/en.json new file mode 100644 index 0000000000..fe1fd31399 --- /dev/null +++ b/packages/api/session-status/locale/en.json @@ -0,0 +1,5 @@ +{ + "meta": { + "title": "Session status" + } +} diff --git a/packages/api/session-status/locale/es.json b/packages/api/session-status/locale/es.json new file mode 100644 index 0000000000..b72cf90667 --- /dev/null +++ b/packages/api/session-status/locale/es.json @@ -0,0 +1,5 @@ +{ + "meta": { + "title": "Estado de la sesión" + } +} diff --git a/packages/api/session-status/locale/fr.json b/packages/api/session-status/locale/fr.json new file mode 100644 index 0000000000..0c28b2cd64 --- /dev/null +++ b/packages/api/session-status/locale/fr.json @@ -0,0 +1,5 @@ +{ + "meta": { + "title": "Statut de la session" + } +} diff --git a/packages/api/session-status/locale/ja.json b/packages/api/session-status/locale/ja.json new file mode 100644 index 0000000000..8a346e88b5 --- /dev/null +++ b/packages/api/session-status/locale/ja.json @@ -0,0 +1,5 @@ +{ + "meta": { + "title": "セッションの状態" + } +} diff --git a/packages/api/session-status/locale/pt.json b/packages/api/session-status/locale/pt.json new file mode 100644 index 0000000000..3530cb1df7 --- /dev/null +++ b/packages/api/session-status/locale/pt.json @@ -0,0 +1,5 @@ +{ + "meta": { + "title": "Estado da sessão" + } +} diff --git a/packages/api/session-status/locale/ru.json b/packages/api/session-status/locale/ru.json new file mode 100644 index 0000000000..6277db877a --- /dev/null +++ b/packages/api/session-status/locale/ru.json @@ -0,0 +1,5 @@ +{ + "meta": { + "title": "Статус сеанса" + } +} diff --git a/packages/api/session-status/locale/zh.json b/packages/api/session-status/locale/zh.json new file mode 100644 index 0000000000..2d9703a9f7 --- /dev/null +++ b/packages/api/session-status/locale/zh.json @@ -0,0 +1,5 @@ +{ + "meta": { + "title": "会话状态" + } +} diff --git a/packages/api/session-status/package.json b/packages/api/session-status/package.json new file mode 100644 index 0000000000..f0ca23dfd2 --- /dev/null +++ b/packages/api/session-status/package.json @@ -0,0 +1,69 @@ +{ + "name": "@deepseek-ai/dsh-api-session-status", + "description": "Client Session status table: running state, the effective pending interaction, and completion reminders", + "version": "0.2.2-rc.1", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/deepseek-ai/deepseek-harness.git", + "directory": "packages/api/session-status" + }, + "type": "module", + "main": "lib/index.js", + "types": "lib/types/index.d.ts", + "exports": { + ".": { + "types": "./lib/types/index.d.ts", + "default": "./lib/index.js" + }, + "./client": { + "types": "./lib/types/client/index.d.ts", + "default": "./lib/client.js" + }, + "./src/*": "./src/*", + "./package.json": "./package.json", + "./locale/*.json": "./locale/*.json" + }, + "dsh": { + "client": { + "inject": [ + "@deepseek-ai/dsh-api-remotes", + "@deepseek-ai/dsh-api-session-controller", + "@deepseek-ai/dsh-client-ui-renderer", + "@deepseek-ai/dsh-client-ui-session" + ], + "platform": "web" + } + }, + "scripts": { + "bundle": "tsdown", + "watch": "tsdown --watch" + }, + "license": "MIT", + "peerDependencies": { + "@deepseek-ai/cordis": "workspace:~" + }, + "devDependencies": { + "@deepseek-ai/cordis": "workspace:~", + "@deepseek-ai/dsh-api-remotes": "workspace:*", + "@deepseek-ai/dsh-api-session-controller": "workspace:*", + "@deepseek-ai/dsh-client-store": "workspace:*", + "@deepseek-ai/dsh-client-test-runtime": "workspace:*", + "@deepseek-ai/dsh-client-ui-renderer": "workspace:*", + "@deepseek-ai/dsh-client-ui-session": "workspace:*", + "@deepseek-ai/dsh-client-ui-slots": "workspace:*", + "@deepseek-ai/dsh-remote-mock": "workspace:*", + "@deepseek-ai/dsh-session": "workspace:*" + }, + "files": [ + "locale/*.json", + "lib/index.js", + "lib/client.js", + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" + ] +} diff --git a/packages/api/session-status/src/client/index.ts b/packages/api/session-status/src/client/index.ts new file mode 100644 index 0000000000..9acfc42d2b --- /dev/null +++ b/packages/api/session-status/src/client/index.ts @@ -0,0 +1,19 @@ +/** Client Session status plugin: the `uiSession.sessionStatus` service and the `useSessionStatus` root hook. */ +import type { Context } from '@deepseek-ai/cordis' +// Type-only: declares the `sessions` Controller service. +import type {} from '@deepseek-ai/dsh-api-session-controller/client' +import { UiSessionStatus } from './status.ts' + +export type { SessionStatus, SessionStatusSnapshot, UiSessionStatus, UseSessionStatus } from './status.ts' + +/** Required Controller, Remote, renderer, and Session UI services. */ +export const inject = ['remote', 'sessions', 'slots', 'uiSession'] + +/** + * Install `ctx.uiSession.sessionStatus` and publish it through the `useSessionStatus` root hook. + * @param ctx - Client root context. + */ +export function apply(ctx: Context): void { + const status = new UiSessionStatus(ctx, ctx.sessions, ctx.uiSession.pendingInteractions) + ctx.slots.provideRoot({ hooks: { sessionStatus: status } }) +} diff --git a/packages/api/session-status/src/client/status.ts b/packages/api/session-status/src/client/status.ts new file mode 100644 index 0000000000..f05a89fd66 --- /dev/null +++ b/packages/api/session-status/src/client/status.ts @@ -0,0 +1,164 @@ +/** Client Session status table: running state, the effective pending interaction, and completion reminders. */ +import { Service, type Context } from '@deepseek-ai/cordis' +import type { ISessions, SessionSummary } from '@deepseek-ai/dsh-api-session-controller/client' +import type {} from '@deepseek-ai/dsh-api-remotes/client' +import { notifySubscribers } from '@deepseek-ai/dsh-client-store' +import type { HostObservable, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots' +// Type-only service merge for ctx.slots. +import type {} from '@deepseek-ai/dsh-client-ui-renderer/client' +import type { SessionPendingInteraction } from '@deepseek-ai/dsh-client-ui-session/client' +// Retains ui-session's Context and Slot prop declarations for every consumer of this face. +export type {} from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionId } from '@deepseek-ai/dsh-session/types' + +/** Independent UI status facts for one Session identity. */ +export interface SessionStatus { + /** Latest known running state; absent until a baseline or event establishes it. */ + readonly running: boolean | undefined + /** Highest-precedence domain request currently awaiting user interaction. */ + readonly pendingInteraction: SessionPendingInteraction | undefined + /** Whether an observed stop outside the main view still needs acknowledgement. */ + readonly completionUnread: boolean +} + +/** Current UI status indexed by Session identity. */ +export type SessionStatusSnapshot = ReadonlyMap +/** Selector hook over the unified Session UI status snapshot. */ +export type UseSessionStatus = SnapshotSelectorHook + +declare module '@deepseek-ai/dsh-client-ui-slots' { + interface GlobalStandardProps { + useSessionStatus: UseSessionStatus + } +} + +declare module '@deepseek-ai/dsh-client-ui-session/client' { + interface UiSessionService { + /** Session status table; a plugin that reads it injects `uiSession.sessionStatus`. */ + readonly sessionStatus: UiSessionStatus + } +} + +/** + * Session status table provided as the `uiSession.sessionStatus` service and read as `ctx.uiSession.sessionStatus`. + * Completion reminders live only in this Client: a stop observed outside the main view stays unread until the main + * view retains the Session, the Session runs again, or a ready catalog no longer lists it. + */ +export class UiSessionStatus extends Service implements HostObservable { + private readonly running = new Map() + private readonly completionUnread = new Set() + private statusSnapshot: SessionStatusSnapshot = new Map() + private readonly statusListeners = new Set<() => void>() + + /** + * @param ctx - Client root context. + * @param sessions - Controller-owned Session catalog. + * @param pendingInteractions - effective pending request by Session, published by ui-session. + */ + constructor( + ctx: Context, + private readonly sessions: Pick, + private readonly pendingInteractions: HostObservable>, + ) { + super(ctx, 'uiSession.sessionStatus') + ctx.effect(() => { + const disposeStatus = sessions.list.subscribe(() => { this.reconcileStatus() }) + const disposeRemoteStatus = ctx.remote.$on('api-session/status', (sessionId, running) => { + this.observeRunning(sessionId, running) + }) + const disposePending = pendingInteractions.subscribe(() => { this.publishStatus() }) + this.reconcileStatus() + return () => { + disposeStatus() + disposeRemoteStatus() + disposePending() + } + }, 'session-status: Session status table') + } + + /** + * Read the current status table; the reference changes only when a status fact changes. + * @returns status by Session identity. + */ + readonly getSnapshot: () => SessionStatusSnapshot = () => this.statusSnapshot + + /** + * Observe status table changes; a throwing listener is reported without stopping later listeners. + * @param listener - called after each published change. + * @returns unsubscribe. + */ + readonly subscribe: (listener: () => void) => () => void = (listener) => { + this.statusListeners.add(listener) + return () => { this.statusListeners.delete(listener) } + } + + private observeRunning(sessionId: SessionId, running: boolean): void { + const previous = this.running.get(sessionId) + const beforeBaseline = this.sessions.list.getSnapshot().phase === 'pending' + this.running.set(sessionId, running) + if (running) this.completionUnread.delete(sessionId) + else if ((previous === true || (previous === undefined && beforeBaseline)) + && !this.isMain(sessionId)) this.completionUnread.add(sessionId) + this.publishStatus() + } + + private reconcileStatus(): void { + const list = this.sessions.list.getSnapshot() + const present = new Set(Object.keys(list.byId) as SessionId[]) + // Subagent catalog rows and retained subagent fallback rows do not establish Host running state. + for (const id of list.ids) { + const row = list.byId[id] as SessionSummary + const previous = this.running.get(id) + if (previous === undefined) this.running.set(id, row.running) + else if (previous !== row.running) this.observeRunning(id, row.running) + } + for (const id of present) { + if (this.isMain(id)) this.completionUnread.delete(id) + } + if (list.phase === 'ready') { + for (const id of this.running.keys()) { + if (present.has(id)) continue + this.running.delete(id) + this.completionUnread.delete(id) + } + } + this.publishStatus() + } + + private isMain(sessionId: SessionId): boolean { + return (this.sessions.list.getSnapshot().byId[sessionId]?.retainedBy.mainView ?? 0) > 0 + } + + private publishStatus(): void { + const pending = this.pendingInteractions.getSnapshot() + const ids = new Set([ + ...(Object.keys(this.sessions.list.getSnapshot().byId) as SessionId[]), + ...this.running.keys(), + ...pending.keys(), + ...this.completionUnread, + ]) + const next = new Map() + for (const id of ids) { + next.set(id, { + running: this.running.get(id), + pendingInteraction: pending.get(id), + completionUnread: this.completionUnread.has(id), + }) + } + if (sameSessionStatus(this.statusSnapshot, next)) return + this.statusSnapshot = next + notifySubscribers(this.statusListeners, '[session-status] Session status') + } +} + +function sameSessionStatus(left: SessionStatusSnapshot, right: SessionStatusSnapshot): boolean { + if (left.size !== right.size) return false + for (const [id, status] of left) { + const candidate = right.get(id) + if (candidate === undefined + || candidate.running !== status.running + || candidate.pendingInteraction !== status.pendingInteraction + || candidate.completionUnread !== status.completionUnread) return false + } + return true +} diff --git a/packages/api/session-status/src/index.ts b/packages/api/session-status/src/index.ts new file mode 100644 index 0000000000..cb1b451cca --- /dev/null +++ b/packages/api/session-status/src/index.ts @@ -0,0 +1,4 @@ +/** Host loader entry for the browser-only Session status plugin. */ + +/** Provides no Host-side behavior. */ +export function apply(): void {} diff --git a/packages/client/ui-session/tests/status-controller.client.spec.ts b/packages/api/session-status/tests/status-controller.client.spec.ts similarity index 62% rename from packages/client/ui-session/tests/status-controller.client.spec.ts rename to packages/api/session-status/tests/status-controller.client.spec.ts index e2e75adede..6535f0c3fc 100644 --- a/packages/client/ui-session/tests/status-controller.client.spec.ts +++ b/packages/api/session-status/tests/status-controller.client.spec.ts @@ -1,11 +1,13 @@ -/** Running-state ownership across the real Controller catalog and UI status source. */ +/** Session status across the real Controller catalog, ui-session pending interactions, and the status service. */ import { expect, vi } from 'vitest' import { ok } from '@deepseek-ai/dsh-remote-mock' import { createClientTest, webApp } from '@deepseek-ai/dsh-client-test-runtime/src/assembly/index.ts' import { SESSION_FORMAT_VERSION, type SessionId } from '@deepseek-ai/dsh-session/types' import type { SessionFollowFrame } from '@deepseek-ai/dsh-api-session-controller/types' +import type { SessionPendingInteractionBase } from '@deepseek-ai/dsh-client-ui-session/client' +import type {} from '../src/client/index.ts' -const it = createClientTest({ roster: webApp.closure(['@deepseek-ai/dsh-client-ui-session']) }) +const it = createClientTest({ roster: webApp.closure(['@deepseek-ai/dsh-api-session-status']) }) const parentId = 'status-parent' as SessionId const childId = 'status-child' as SessionId @@ -29,37 +31,48 @@ it('preserves unlisted child status through metadata updates and main view ackno }) const client = await start() const sessions = client.ctx.sessions - const ui = client.ctx.uiSession + const status = client.ctx.uiSession.sessionStatus await sessions.refresh() await sessions.refreshProjections(parentId) await client.flush() expect(sessions.list.getSnapshot().ids).toEqual([parentId]) expect(sessions.binding(childId)).toBeUndefined() - expect(ui.sessionStatus.getSnapshot().get(childId)).toMatchObject({ running: undefined, completionUnread: false }) + expect(status.getSnapshot().get(childId)).toMatchObject({ running: undefined, completionUnread: false }) mock.streams.push('$events', { type: 'emit', event: 'api-session/status', args: [childId, true] }) await mock.streams.drained('$events') await client.flush() - expect(ui.sessionStatus.getSnapshot().get(childId)).toMatchObject({ running: true, completionUnread: false }) + expect(status.getSnapshot().get(childId)).toMatchObject({ running: true, completionUnread: false }) mock.streams.push('$events', { type: 'emit', event: 'api-session/activity', args: [parentId, 2] }) await mock.streams.drained('$events') await client.flush() expect(sessions.list.getSnapshot().byId[parentId]?.updatedAt).toBe(2) - expect(ui.sessionStatus.getSnapshot().get(childId)).toMatchObject({ running: true, completionUnread: false }) + expect(status.getSnapshot().get(childId)).toMatchObject({ running: true, completionUnread: false }) mock.streams.push('$events', { type: 'emit', event: 'api-session/status', args: [childId, false] }) await mock.streams.drained('$events') await client.flush() - expect(ui.sessionStatus.getSnapshot().get(childId)).toMatchObject({ running: false, completionUnread: true }) + expect(status.getSnapshot().get(childId)).toMatchObject({ running: false, completionUnread: true }) using reference = sessions.retain(childId, { source: 'mainView' }) await reference.ready expect(sessions.list.getSnapshot().ids).not.toContain(childId) await vi.waitFor(() => { - expect(ui.sessionStatus.getSnapshot().get(childId)).toMatchObject({ running: false, completionUnread: false }) + expect(status.getSnapshot().get(childId)).toMatchObject({ running: false, completionUnread: false }) }) reference.release() await client.flush() - expect(ui.sessionStatus.getSnapshot().get(childId)?.completionUnread).toBe(false) + expect(status.getSnapshot().get(childId)?.completionUnread).toBe(false) +}) + +it('reports the effective ui-session pending interaction as the same request object', async ({ start }) => { + const client = await start() + const status = client.ctx.uiSession.sessionStatus + const publish = client.ctx.uiSession.registerPendingInteraction(() => 0) + const request = { key: 'approval:1', kind: 'approval', sessionId: parentId } + const remove = publish(request, async () => {}) + expect(status.getSnapshot().get(parentId)?.pendingInteraction).toBe(request) + remove() + expect(status.getSnapshot().get(parentId)?.pendingInteraction).toBeUndefined() }) diff --git a/packages/api/session-status/tests/status.client.spec.ts b/packages/api/session-status/tests/status.client.spec.ts new file mode 100644 index 0000000000..9257f7afe7 --- /dev/null +++ b/packages/api/session-status/tests/status.client.spec.ts @@ -0,0 +1,239 @@ +import { Context } from '@deepseek-ai/cordis' +import type { ISessions, SessionListState } from '@deepseek-ai/dsh-api-session-controller/client' +import { createSnapshotStore } from '@deepseek-ai/dsh-client-store' +import type { SessionPendingInteraction } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionId } from '@deepseek-ai/dsh-session/types' +import { afterEach, describe, expect, it, vi } from 'vitest' +import { apply } from '../src/client/index.ts' +import { UiSessionStatus } from '../src/client/status.ts' +import { apply as nodeApply } from '../src/index.ts' + +const sessionId = (value: string): SessionId => value as SessionId +const pendingQuestion = (id: SessionId) => ({ key: 'question:1', kind: 'question', sessionId: id }) as SessionPendingInteraction +const roots: Context[] = [] + +afterEach(async () => { + await Promise.all(roots.splice(0).map(ctx => ctx.fiber.dispose())) + vi.restoreAllMocks() +}) + +function bench() { + const ctx = new Context() + roots.push(ctx) + let statusListener: ((id: SessionId, running: boolean) => void) | undefined + ctx.provide('remote', { + $on: (_event: string, listener: (id: SessionId, running: boolean) => void) => { + statusListener = listener + return () => { if (statusListener === listener) statusListener = undefined } + }, + } as never) + const list = createSnapshotStore({ ids: [], byId: {}, phase: 'ready', projectionsBySession: {} }) + const sessions: Pick = { list } + const pending = createSnapshotStore>(new Map()) + const status = () => new UiSessionStatus(ctx, sessions, pending) + const row = (id: SessionId) => { + list.update((draft) => { + if (!draft.ids.includes(id)) draft.ids.push(id) + draft.byId[id] = { id, displayTitle: id, running: false, retainedBy: {}, blank: false, updatedAt: 1 } + }) + } + const setMainView = (id: SessionId, count: number) => { + list.update((draft) => { + draft.byId[id] = { ...draft.byId[id]!, retainedBy: count === 0 ? {} : { mainView: count } } + }) + } + const emitStatus = (id: SessionId, running: boolean) => { + if (statusListener === undefined) throw new Error('api-session/status is not subscribed') + statusListener(id, running) + } + return { ctx, list, pending, status, row, setMainView, emitStatus, subscribed: () => statusListener !== undefined } +} + +describe('Session running status and completion reminders', () => { + it('keeps synthetic-row status unknown until an event or Host baseline establishes it', () => { + const b = bench() + const id = sessionId('catalog-only') + b.list.update((draft) => { + draft.byId[id] = { id, displayTitle: id, running: false, retainedBy: {}, blank: false, updatedAt: 0 } + }) + const service = b.status() + expect(service.getSnapshot().get(id)?.running).toBeUndefined() + expect(service.getSnapshot().get(id)?.completionUnread).toBe(false) + + b.emitStatus(id, true) + b.list.update((draft) => { draft.byId[id]!.displayTitle = 'Renamed child' }) + expect(service.getSnapshot().get(id)?.running).toBe(true) + expect(service.getSnapshot().get(id)?.completionUnread).toBe(false) + + b.list.update((draft) => { draft.ids.push(id) }) + expect(service.getSnapshot().get(id)?.running).toBe(false) + expect(service.getSnapshot().get(id)?.completionUnread).toBe(true) + }) + + it('records non-main completions and lets main-view activity acknowledge them', () => { + const b = bench() + const id = sessionId('s1') + b.row(id) + const service = b.status() + const changed = vi.fn() + const off = service.subscribe(changed) + + expect(service.getSnapshot().get(id)).toEqual({ + running: false, + pendingInteraction: undefined, + completionUnread: false, + }) + b.list.update((draft) => { draft.byId[id]!.running = true }) + expect(service.getSnapshot().get(id)?.running).toBe(true) + b.list.update((draft) => { draft.byId[id]!.running = false }) + expect(service.getSnapshot().get(id)?.completionUnread).toBe(true) + b.setMainView(id, 1) + expect(service.getSnapshot().get(id)?.completionUnread).toBe(false) + b.setMainView(id, 0) + + b.emitStatus(id, true) + b.emitStatus(id, false) + expect(service.getSnapshot().get(id)?.completionUnread).toBe(true) + + b.setMainView(id, 1) + expect(service.getSnapshot().get(id)?.completionUnread).toBe(false) + b.emitStatus(id, true) + b.emitStatus(id, false) + expect(service.getSnapshot().get(id)?.completionUnread).toBe(false) + + b.setMainView(id, 0) + b.emitStatus(id, false) + expect(service.getSnapshot().get(id)?.completionUnread).toBe(false) + b.emitStatus(id, true) + b.emitStatus(id, false) + expect(service.getSnapshot().get(id)?.completionUnread).toBe(true) + b.emitStatus(id, true) + expect(service.getSnapshot().get(id)?.completionUnread).toBe(false) + expect(changed).toHaveBeenCalled() + off() + }) + + it('records an idle event before the initial catalog baseline and retires absent status later', () => { + const b = bench() + const id = sessionId('early') + b.list.update((draft) => { draft.phase = 'pending' }) + const service = b.status() + + b.emitStatus(id, false) + expect(service.getSnapshot().get(id)).toEqual({ + running: false, + pendingInteraction: undefined, + completionUnread: true, + }) + b.list.update((draft) => { draft.phase = 'ready' }) + expect(service.getSnapshot().has(id)).toBe(false) + }) + + it('keeps the snapshot reference until a status fact changes', () => { + const b = bench() + const id = sessionId('s1') + b.row(id) + const service = b.status() + const changed = vi.fn() + service.subscribe(changed) + const before = service.getSnapshot() + + b.emitStatus(id, false) + b.list.update((draft) => { draft.byId[id]!.displayTitle = 'Renamed' }) + expect(service.getSnapshot()).toBe(before) + expect(changed).not.toHaveBeenCalled() + b.emitStatus(id, true) + expect(service.getSnapshot()).not.toBe(before) + expect(changed).toHaveBeenCalledOnce() + }) +}) + +describe('Session status pending interactions', () => { + it('carries the exact effective request object and adds Sessions known only by their request', () => { + const b = bench() + const listed = sessionId('listed') + const unlisted = sessionId('unlisted') + b.row(listed) + const service = b.status() + const changed = vi.fn() + service.subscribe(changed) + const approval = { key: 'approval:1', kind: 'approval', sessionId: listed } as SessionPendingInteraction + const question = { key: 'question:1', kind: 'question', sessionId: unlisted } as SessionPendingInteraction + + b.pending.set(new Map([[listed, approval], [unlisted, question]])) + expect(service.getSnapshot().get(listed)).toEqual({ running: false, pendingInteraction: approval, completionUnread: false }) + expect(service.getSnapshot().get(listed)?.pendingInteraction).toBe(approval) + expect(service.getSnapshot().get(unlisted)).toEqual({ + running: undefined, pendingInteraction: question, completionUnread: false, + }) + expect(changed).toHaveBeenCalledOnce() + + b.pending.set(new Map([[listed, approval], [unlisted, question]])) + expect(changed).toHaveBeenCalledOnce() + b.pending.set(new Map()) + expect(service.getSnapshot().get(listed)?.pendingInteraction).toBeUndefined() + expect(service.getSnapshot().has(unlisted)).toBe(false) + expect(changed).toHaveBeenCalledTimes(2) + }) + + it('contains a failing status subscriber and continues dispatch', () => { + const b = bench() + const service = b.status() + const failure = new Error('status subscriber failed') + const report = vi.spyOn(console, 'error').mockImplementation(() => {}) + service.subscribe(() => { throw failure }) + const after = vi.fn() + service.subscribe(after) + + b.pending.set(new Map([[sessionId('s1'), pendingQuestion(sessionId('s1'))]])) + + expect(after).toHaveBeenCalledOnce() + expect(report).toHaveBeenCalledWith('[session-status] Session status subscriber failed:', failure) + }) + + it('stops following its sources when its plugin unloads', async () => { + const b = bench() + let service: UiSessionStatus | undefined + const fiber = b.ctx.plugin({ + apply(scope: Context) { + service = new UiSessionStatus(scope, { list: b.list }, b.pending) + }, + }) + await fiber.await() + if (service === undefined) throw new Error('UiSessionStatus did not start') + expect(b.subscribed()).toBe(true) + const before = service.getSnapshot() + + await fiber.dispose() + + expect(b.subscribed()).toBe(false) + b.row(sessionId('later')) + b.pending.set(new Map([[sessionId('later'), pendingQuestion(sessionId('later'))]])) + expect(service.getSnapshot()).toBe(before) + }) +}) + +describe('session-status apply', () => { + it('provides the status service under ctx.uiSession and publishes it as the root useSessionStatus source', () => { + const b = bench() + const provideRoot = vi.fn() + b.ctx.provide('sessions', { list: b.list } as never) + b.ctx.provide('slots', { provideRoot } as never) + b.ctx.provide('uiSession', { pendingInteractions: b.pending } as never) + + apply(b.ctx) + + expect(provideRoot).toHaveBeenCalledOnce() + const root = provideRoot.mock.calls[0]![0] as { hooks: { sessionStatus: UiSessionStatus } } + expect(Object.keys(root)).toEqual(['hooks']) + expect(Object.keys(root.hooks)).toEqual(['sessionStatus']) + expect(root.hooks.sessionStatus).toBeInstanceOf(UiSessionStatus) + const provided: unknown = b.ctx.get('uiSession.sessionStatus') + if (!(provided instanceof UiSessionStatus)) throw new Error('uiSession.sessionStatus is not provided') + expect(provided.getSnapshot()).toBe(root.hooks.sessionStatus.getSnapshot()) + }) + + it('keeps the Host loader half inert', () => { + expect(() => { nodeApply() }).not.toThrow() + }) +}) diff --git a/packages/api/session-status/tsconfig.json b/packages/api/session-status/tsconfig.json new file mode 100644 index 0000000000..e5d47a2f44 --- /dev/null +++ b/packages/api/session-status/tsconfig.json @@ -0,0 +1,36 @@ +{ + "extends": "../../../tsconfig.base.client.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "lib/types" + }, + "include": [ + "src" + ], + "references": [ + { + "path": "../../../vendor/cordis" + }, + { + "path": "../remotes/tsconfig.client.json" + }, + { + "path": "../session-controller/tsconfig.client.json" + }, + { + "path": "../../core/session" + }, + { + "path": "../../client/store" + }, + { + "path": "../../client/ui-renderer" + }, + { + "path": "../../client/ui-session" + }, + { + "path": "../../client/ui-slots" + } + ] +} diff --git a/packages/api/session-status/tsdown.config.ts b/packages/api/session-status/tsdown.config.ts new file mode 100644 index 0000000000..71d5bd77f8 --- /dev/null +++ b/packages/api/session-status/tsdown.config.ts @@ -0,0 +1,3 @@ +import { clientBundle } from '../../client/tsdown.client.ts' + +export default clientBundle(import.meta.dirname, ['lib/types/index.js']) diff --git a/packages/bundle/web-app/cordis.patch.yml b/packages/bundle/web-app/cordis.patch.yml index e842d8e3e1..54363c3cd6 100644 --- a/packages/bundle/web-app/cordis.patch.yml +++ b/packages/bundle/web-app/cordis.patch.yml @@ -276,6 +276,10 @@ - id: ui-session name: '@deepseek-ai/dsh-client-ui-session' + # Session status table behind ctx.uiSession.sessionStatus and useSessionStatus. + - id: session-status + name: '@deepseek-ai/dsh-api-session-status' + # Unified resource model: protocol providers behind the useResource hook. - id: resources name: '@deepseek-ai/dsh-client-resources' diff --git a/packages/bundle/web-app/package.json b/packages/bundle/web-app/package.json index eccc864be4..c6a37bea33 100644 --- a/packages/bundle/web-app/package.json +++ b/packages/bundle/web-app/package.json @@ -65,6 +65,7 @@ "@deepseek-ai/dsh-api-job-controller": "workspace:*", "@deepseek-ai/dsh-api-remotes": "workspace:*", "@deepseek-ai/dsh-api-session-controller": "workspace:*", + "@deepseek-ai/dsh-api-session-status": "workspace:*", "@deepseek-ai/dsh-api-settings-controller": "workspace:*", "@deepseek-ai/dsh-api-terminal-controller": "workspace:*", "@deepseek-ai/dsh-api-workspace-controller": "workspace:*", diff --git a/packages/client/ui-chat/package.json b/packages/client/ui-chat/package.json index 76ab087eaa..9426073ab9 100644 --- a/packages/client/ui-chat/package.json +++ b/packages/client/ui-chat/package.json @@ -61,6 +61,7 @@ "@deepseek-ai/dsh-agent": "workspace:*", "@deepseek-ai/dsh-api-remotes": "workspace:*", "@deepseek-ai/dsh-api-session-controller": "workspace:*", + "@deepseek-ai/dsh-api-session-status": "workspace:*", "@deepseek-ai/dsh-api-workspace-controller": "workspace:*", "@deepseek-ai/dsh-api-workspace-files": "workspace:*", "@deepseek-ai/dsh-attachment": "workspace:*", diff --git a/packages/client/ui-chat/tests/chat-view.client.spec.tsx b/packages/client/ui-chat/tests/chat-view.client.spec.tsx index 4cd6d1bb24..a91265ee5c 100644 --- a/packages/client/ui-chat/tests/chat-view.client.spec.tsx +++ b/packages/client/ui-chat/tests/chat-view.client.spec.tsx @@ -28,7 +28,7 @@ import type { } from '@deepseek-ai/dsh-client-ui-conversation/client' import type { WorkspaceSnapshot } from '@deepseek-ai/dsh-api-workspace-controller/client' import { SessionSeq, type SessionId } from '@deepseek-ai/dsh-session/types' -import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' import type { KeyedSnapshotSelectorHook, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots' import { allowAllAccess, bindSnapshotSelector, makeTranslate } from '@deepseek-ai/dsh-client-test-runtime' import { createSnapshotStore, type ObservableSnapshot } from '@deepseek-ai/dsh-client-store' diff --git a/packages/client/ui-chat/tests/transcript-view-row.client.spec.tsx b/packages/client/ui-chat/tests/transcript-view-row.client.spec.tsx index ca6d67f0f3..83401e65af 100644 --- a/packages/client/ui-chat/tests/transcript-view-row.client.spec.tsx +++ b/packages/client/ui-chat/tests/transcript-view-row.client.spec.tsx @@ -4,7 +4,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import { act, cleanup, fireEvent, render, screen } from '@testing-library/react' import type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client' import type { WorkspaceSnapshot } from '@deepseek-ai/dsh-api-workspace-controller/client' -import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' import type { GlobalStandardProps } from '@deepseek-ai/dsh-client-ui-slots' import { createSnapshotStore } from '@deepseek-ai/dsh-client-store' import { allowAllAccess, bindSnapshotSelector, makeTranslate } from '@deepseek-ai/dsh-client-test-runtime' diff --git a/packages/client/ui-conversation/package.json b/packages/client/ui-conversation/package.json index 330dad8d18..a128a7e9cd 100644 --- a/packages/client/ui-conversation/package.json +++ b/packages/client/ui-conversation/package.json @@ -30,6 +30,7 @@ "client": { "inject": [ "@deepseek-ai/dsh-api-session-controller", + "@deepseek-ai/dsh-api-session-status", "@deepseek-ai/dsh-client-file-upload", "@deepseek-ai/dsh-client-locale", "@deepseek-ai/dsh-client-ui-layout", @@ -57,6 +58,7 @@ "@deepseek-ai/cordis": "workspace:~", "@deepseek-ai/dsh-api-remotes": "workspace:*", "@deepseek-ai/dsh-api-session-controller": "workspace:*", + "@deepseek-ai/dsh-api-session-status": "workspace:*", "@deepseek-ai/dsh-api-workspace-controller": "workspace:*", "@deepseek-ai/dsh-attachment": "workspace:*", "@deepseek-ai/dsh-client-locale": "workspace:*", diff --git a/packages/client/ui-conversation/src/client/apply.ts b/packages/client/ui-conversation/src/client/apply.ts index 37420f7fc2..e7c0250516 100644 --- a/packages/client/ui-conversation/src/client/apply.ts +++ b/packages/client/ui-conversation/src/client/apply.ts @@ -12,6 +12,7 @@ import type { SessionId } from '@deepseek-ai/dsh-session/types' import type {} from '@deepseek-ai/dsh-client-locale/client' import type {} from '@deepseek-ai/dsh-client-ui-renderer/client' import type {} from '@deepseek-ai/dsh-client-ui-session/client' +import type {} from '@deepseek-ai/dsh-api-session-status/client' import type {} from '@deepseek-ai/dsh-client-ui-settings/client' import type { ShortcutCommandId, ShortcutFixedCommand } from '@deepseek-ai/dsh-client-shortcuts/client' import { UiConversation } from './conversation/assembly.ts' diff --git a/packages/client/ui-conversation/src/client/stop-shortcut.ts b/packages/client/ui-conversation/src/client/stop-shortcut.ts index b410a06918..f9b7520073 100644 --- a/packages/client/ui-conversation/src/client/stop-shortcut.ts +++ b/packages/client/ui-conversation/src/client/stop-shortcut.ts @@ -11,7 +11,7 @@ import { StopSequence } from './stop-sequence.ts' * @param shortcuts - window keyboard arbitration and validated sequence interval. * @param sessions - live Session identities and lifecycle sources. * @param openTurn - stable current-turn source for a live Session binding. - * @param uiSession - current pending-interaction status. + * @param uiSession - effective pending interaction of each Session. * @param cancel - scoped stop operation that preserves Queue and reports failures. * @returns disposer releasing the input subscription, pending watches and expiry timer. */ @@ -47,7 +47,7 @@ export function installStopShortcut( const session = binding.session.getSnapshot() if (!session.running || session.removed || (session.subagent !== null && session.subagent.address.mode !== 'continuable') - || uiSession.sessionStatus.getSnapshot().get(sessionId)?.pendingInteraction !== undefined) return undefined + || uiSession.pendingInteractions.getSnapshot().get(sessionId) !== undefined) return undefined return turnSource.getSnapshot() } const turn = currentTurn() @@ -58,7 +58,7 @@ export function installStopShortcut( const changed = (): void => { if (sessions.binding(sessionId) !== binding || currentTurn() !== turn) reset() } - const disposers = [turnSource.subscribe(changed), binding.session.subscribe(changed), uiSession.sessionStatus.subscribe(changed)] + const disposers = [turnSource.subscribe(changed), binding.session.subscribe(changed), uiSession.pendingInteractions.subscribe(changed)] unwatch = () => { for (const dispose of disposers) dispose() } }) return () => { off(); reset() } diff --git a/packages/client/ui-conversation/tests/enter-behavior-row.client.spec.tsx b/packages/client/ui-conversation/tests/enter-behavior-row.client.spec.tsx index 3106eeb495..b20185a00d 100644 --- a/packages/client/ui-conversation/tests/enter-behavior-row.client.spec.tsx +++ b/packages/client/ui-conversation/tests/enter-behavior-row.client.spec.tsx @@ -6,7 +6,7 @@ import { act, cleanup, fireEvent, render, screen } from '@testing-library/react' import { allowAllAccess, bindSnapshotSelector, makeTranslate } from '@deepseek-ai/dsh-client-test-runtime' import type { SessionListState } from '@deepseek-ai/dsh-api-session-controller/client' import type { WorkspaceSnapshot } from '@deepseek-ai/dsh-api-workspace-controller/client' -import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' import { createSnapshotStore } from '@deepseek-ai/dsh-client-store' import { EnterBehaviorRow } from '../src/client/settings/EnterBehaviorRow.tsx' import type { EnterBehaviorRowProps } from '../src/client/settings/EnterBehaviorRow.tsx' diff --git a/packages/client/ui-conversation/tests/input-matrix.client.spec.tsx b/packages/client/ui-conversation/tests/input-matrix.client.spec.tsx index dd7143f188..d9cc504487 100644 --- a/packages/client/ui-conversation/tests/input-matrix.client.spec.tsx +++ b/packages/client/ui-conversation/tests/input-matrix.client.spec.tsx @@ -16,7 +16,7 @@ import { createSnapshotStore } from '@deepseek-ai/dsh-client-store' import { allowAllAccess, bindSnapshotSelector, conversationSnapshot, sessionSnapshot, } from '@deepseek-ai/dsh-client-test-runtime' -import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { SubmitAttachment, SubmitOutcome } from '../src/client/contract/input.ts' import { makeTranslate } from '@deepseek-ai/dsh-client-test-runtime' diff --git a/packages/client/ui-conversation/tests/input-scenarios.client.spec.tsx b/packages/client/ui-conversation/tests/input-scenarios.client.spec.tsx index aed6c05c2a..851f88eb16 100644 --- a/packages/client/ui-conversation/tests/input-scenarios.client.spec.tsx +++ b/packages/client/ui-conversation/tests/input-scenarios.client.spec.tsx @@ -29,7 +29,7 @@ import type { import { allowAllAccess, bindSnapshotSelector, conversationSnapshot, makeTranslate, sessionSnapshot, SlotTestRuntime, } from '@deepseek-ai/dsh-client-test-runtime' -import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' import type { SessionId } from '@deepseek-ai/dsh-session/types' import { zh as commonZh } from '@deepseek-ai/dsh-client-locale/src/locales/zh.ts' import type { DraftAttachmentId } from '../src/client/contract/input.ts' diff --git a/packages/client/ui-conversation/tests/queue-dock.client.spec.tsx b/packages/client/ui-conversation/tests/queue-dock.client.spec.tsx index 713c74df88..e43fc7ea0a 100644 --- a/packages/client/ui-conversation/tests/queue-dock.client.spec.tsx +++ b/packages/client/ui-conversation/tests/queue-dock.client.spec.tsx @@ -20,7 +20,7 @@ import { createSnapshotStore } from '@deepseek-ai/dsh-client-store' import { allowAllAccess, bindSnapshotSelector, conversationSnapshot, makeTranslate, } from '@deepseek-ai/dsh-client-test-runtime' -import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' import { zh as commonZh } from '@deepseek-ai/dsh-client-locale/src/locales/zh.ts' import type { InputState } from '../src/client/contract/input.ts' import { zh } from '../src/client/locales.ts' diff --git a/packages/client/ui-conversation/tests/skeleton.client.spec.tsx b/packages/client/ui-conversation/tests/skeleton.client.spec.tsx index 6f599b2d22..b472efb822 100644 --- a/packages/client/ui-conversation/tests/skeleton.client.spec.tsx +++ b/packages/client/ui-conversation/tests/skeleton.client.spec.tsx @@ -12,7 +12,7 @@ import { allowAllAccess, bindSnapshotSelector, makeTranslate, RemoteError, sessionSnapshot as sessionFixture, } from '@deepseek-ai/dsh-client-test-runtime' import type { SessionId } from '@deepseek-ai/dsh-session/types' -import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' import type { WorkspaceId } from '@deepseek-ai/dsh-workspace/types' import { en as commonEn } from '@deepseek-ai/dsh-client-locale/src/locales/en.ts' import { zh as commonZh } from '@deepseek-ai/dsh-client-locale/src/locales/zh.ts' diff --git a/packages/client/ui-conversation/tests/stop-shortcut.client.spec.ts b/packages/client/ui-conversation/tests/stop-shortcut.client.spec.ts index 73dd206b6c..3791642920 100644 --- a/packages/client/ui-conversation/tests/stop-shortcut.client.spec.ts +++ b/packages/client/ui-conversation/tests/stop-shortcut.client.spec.ts @@ -137,6 +137,17 @@ describe('fixed stop routing', () => { expect(b.cancel).toHaveBeenCalledOnce() }) + it('keeps the sequence when another Session gains a pending interaction between presses', async () => { + const b = await bench() + const publish = b.runtime.ctx.uiSession.registerPendingInteraction(() => 0) + b.press() + const remove = publish({ kind: 'approval', key: 'request-other', sessionId: 's2' as SessionId }, async () => {}) + b.press() + await Promise.resolve() + expect(b.cancel).toHaveBeenCalledOnce() + remove() + }) + it('excludes terminal, iframe, approval and inert descendants even inside Conversation', async () => { const b = await bench() for (const [tag, attribute] of [['div', 'class'], ['iframe', ''], ['div', 'data-approval-key'], ['div', 'inert']]) { diff --git a/packages/client/ui-conversation/tsconfig.client.json b/packages/client/ui-conversation/tsconfig.client.json index c75fd6b50d..24cd59a442 100644 --- a/packages/client/ui-conversation/tsconfig.client.json +++ b/packages/client/ui-conversation/tsconfig.client.json @@ -18,6 +18,9 @@ { "path": "../../api/session-controller/tsconfig.client.json" }, + { + "path": "../../api/session-status" + }, { "path": "../../api/workspace-controller/tsconfig.client.json" }, diff --git a/packages/client/ui-session/README.i18n.yaml b/packages/client/ui-session/README.i18n.yaml index 3a3d92d9d5..618d610f55 100644 --- a/packages/client/ui-session/README.i18n.yaml +++ b/packages/client/ui-session/README.i18n.yaml @@ -9,14 +9,17 @@ en: 22464c74746de6c2 zh: 171a244a493a277e /deepseek-ai-dsh-client-ui-session/summary: - en: 75428e0474a073a4 - zh: 18f1db4b4c5302e5 + en: 96896ddcdeca13c0 + zh: 5388928b522cda60 /deepseek-ai-dsh-client-ui-session/table-of-contents: - en: 12e1ffc25a2d6695 - zh: 321156dea1356e55 + en: 2abfd2105ed73a78 + zh: 042ec2f41ac7d1b6 /deepseek-ai-dsh-client-ui-session/access-hooks: - en: 7bf4bca5607248fa - zh: 665d5c4e9cd29f68 + en: 9b32047bba740867 + zh: 3b08b927c99a162c +/deepseek-ai-dsh-client-ui-session/sub-services: + en: 84e32fa5421abf04 + zh: 53ab921919032f36 /deepseek-ai-dsh-client-ui-session/model-experience: en: cb2d4451e8bf8520 zh: 6d3adbb930d90c59 diff --git a/packages/client/ui-session/README.md b/packages/client/ui-session/README.md index 4c3928b35d..b96a711a81 100644 --- a/packages/client/ui-session/README.md +++ b/packages/client/ui-session/README.md @@ -8,13 +8,14 @@ English | [中文](README.zh.md) ## Summary -Use this package to expose Session catalog, retain information, and unified UI status through standard Slot hooks. It materializes per-`SessionBinding` hooks and props, while `SessionProvider` can inherit an outer binding or bind an explicit `SessionReference`. It owns process-local pending-interaction and completion-reminder policy without owning Controller transport, history, or references. +Use this package to expose the Session catalog and retain information through standard Slot hooks. It materializes per-`SessionBinding` hooks and props, while `SessionProvider` can inherit an outer binding or bind an explicit `SessionReference`. It owns process-local pending-interaction policy without owning Controller transport, history, or references. -Running status comes from Host list baselines or status events. Subagent catalog rows and retained subagent fallback rows do not establish running status; main view references still acknowledge completions. +Domain plugins publish requests awaiting the user through `ctx.uiSession.registerPendingInteraction(precedence)`, and `ctx.uiSession.pendingInteractions` exposes each Session's highest-precedence request read-only. The Session status table and `useSessionStatus` belong to [`dsh-api-session-status`](../../api/session-status/README.md). ## Table of Contents - [Access Hooks](#access-hooks) +- [Sub-services](#sub-services) - [Model Experience](#model-experience) - [Known Limitations and Deferred Work](#known-limitations-and-deferred-work) - [Dev Note](#dev-note) @@ -26,6 +27,11 @@ Running status comes from Host list baselines or status events. Subagent catalog The package injects the Client `remoteAccess` service and publishes Session access Hooks over its `source()`: the root `useSessionAccess(sessionId, action)` answers on one Session resource, and the Session-scope `useAccess(action)` answers on the bound Session's resource; the `global` resource's answer is a different Hook, `useRemoteAccess(action)`, so neither shadows the other. `ctx.uiSession.whenAccess(sessionId, action, callback)` is the JS counterpart of `useSessionAccess`: it keeps the callback's effects installed while the current Peer may call `action` on that Session, with the semantics of `ctx.remoteAccess.whenAccess`. The SessionMaybe-scope `useAccess(action)` returns `undefined` while no Session is bound, which callers treat as not allowed; a decision on the `global` resource reads `useRemoteAccess` instead. Snapshot semantics belong to [`dsh-api-remote-access`](../../api/remote-access/README.md#client-face). + +## Sub-services + +`ctx.uiSession` has the type `UiSessionService`. A package that provides a sub-service `x` as the Cordis service `uiSession.x`, read as `ctx.uiSession.x`, merges the member `x` into that interface; [`dsh-api-session-status`](../../api/session-status/README.md) provides `ctx.uiSession.sessionStatus` this way. + ## Model Experience diff --git a/packages/client/ui-session/README.zh.md b/packages/client/ui-session/README.zh.md index fb63e227cd..377a6eb658 100644 --- a/packages/client/ui-session/README.zh.md +++ b/packages/client/ui-session/README.zh.md @@ -8,13 +8,14 @@ kind: "package-reference" ## 概述 -使用本包可通过标准 Slot 钩子公开 Session catalog、retain 信息与统一 UI 状态。它按 `SessionBinding` 物化钩子和 prop,而 `SessionProvider` 可以继承外围 binding 或绑定显式 `SessionReference`。它拥有进程本地的 pending-interaction 与完成提醒策略,但不拥有 Controller transport、历史或 reference。 +使用本包可通过标准 Slot 钩子公开 Session catalog 与 retain 信息。它按 `SessionBinding` 物化钩子和 prop,而 `SessionProvider` 可以继承外围 binding 或绑定显式 `SessionReference`。它拥有进程本地的 pending-interaction 策略,但不拥有 Controller transport、历史或 reference。 -运行状态来自 Host 列表基线或状态事件。Subagent 目录行和已保留子会话的 fallback 行不会建立运行状态;主视图引用仍会确认完成提醒。 +领域插件通过 `ctx.uiSession.registerPendingInteraction(precedence)` 发布等待用户处理的请求,`ctx.uiSession.pendingInteractions` 以只读方式提供每个 Session 优先级最高的请求。会话状态表与 `useSessionStatus` 归 [`dsh-api-session-status`](../../api/session-status/README.zh.md) 所有。 ## 目录 - [访问 Hook](#access-hooks) +- [子服务](#sub-services) - [模型体验](#model-experience) - [已知限制与暂缓事项](#known-limitations-and-deferred-work) - [开发备注](#dev-note) @@ -26,6 +27,11 @@ kind: "package-reference" 本包注入 Client `remoteAccess` 服务,并在其 `source()` 之上发布会话访问 Hook:根作用域的 `useSessionAccess(sessionId, action)` 回答某一个 Session 资源上的访问,Session 作用域的 `useAccess(action)` 回答所绑定 Session 资源上的访问;`global` 资源上的答案是另一个 Hook `useRemoteAccess(action)`,两者互不遮蔽。`ctx.uiSession.whenAccess(sessionId, action, callback)` 是 `useSessionAccess` 在 JS 侧的对应:当前 Peer 能在该 Session 上调用 `action` 期间保持回调的效果,语义同 `ctx.remoteAccess.whenAccess`。SessionMaybe 作用域的 `useAccess(action)` 在未绑定 Session 时返回 `undefined`,调用方将其视为不允许;需要 `global` 资源上的判断时读 `useRemoteAccess`。快照语义归 [`dsh-api-remote-access`](../../api/remote-access/README.zh.md#client-face)。 + +## 子服务 + +`ctx.uiSession` 的类型是 `UiSessionService`。以 Cordis 服务 `uiSession.x` 提供子服务 `x`、并以 `ctx.uiSession.x` 读取的包,把成员 `x` 声明合并进该接口;[`dsh-api-session-status`](../../api/session-status/README.zh.md) 就以这种方式提供 `ctx.uiSession.sessionStatus`。 + ## 模型体验 diff --git a/packages/client/ui-session/package.json b/packages/client/ui-session/package.json index 9fb6bda901..8aa051aca0 100644 --- a/packages/client/ui-session/package.json +++ b/packages/client/ui-session/package.json @@ -30,7 +30,6 @@ "client": { "inject": [ "@deepseek-ai/dsh-api-remote-access", - "@deepseek-ai/dsh-api-remotes", "@deepseek-ai/dsh-api-session-controller", "@deepseek-ai/dsh-client-ui-renderer" ], @@ -48,13 +47,11 @@ "devDependencies": { "@deepseek-ai/cordis": "workspace:~", "@deepseek-ai/dsh-api-remote-access": "workspace:*", - "@deepseek-ai/dsh-api-remotes": "workspace:*", "@deepseek-ai/dsh-api-session-controller": "workspace:*", "@deepseek-ai/dsh-client-store": "workspace:*", "@deepseek-ai/dsh-client-test-runtime": "workspace:*", "@deepseek-ai/dsh-client-ui-renderer": "workspace:*", "@deepseek-ai/dsh-client-ui-slots": "workspace:*", - "@deepseek-ai/dsh-remote-mock": "workspace:*", "@deepseek-ai/dsh-session": "workspace:*", "@deepseek-ai/dsh-util-values": "workspace:*", "react": "^18.2.0" diff --git a/packages/client/ui-session/src/client/index.ts b/packages/client/ui-session/src/client/index.ts index 860a82287c..6725d14037 100644 --- a/packages/client/ui-session/src/client/index.ts +++ b/packages/client/ui-session/src/client/index.ts @@ -7,11 +7,9 @@ import type { SessionReference, SessionRetainInfo, SessionSnapshot, - SessionSummary, UseProjection, } from '@deepseek-ai/dsh-api-session-controller/client' import type { SessionId } from '@deepseek-ai/dsh-session/types' -import type {} from '@deepseek-ai/dsh-api-remotes/client' import type { AccessEffect, RemoteEndpoint } from '@deepseek-ai/dsh-api-remote-access/client' import { notifySubscribers } from '@deepseek-ai/dsh-client-store' import { WeakMapWithValues } from '@deepseek-ai/dsh-util-values' @@ -56,21 +54,6 @@ export type SessionPendingInteraction = ? SessionPendingInteractionBase : SessionPendingInteractionMap[keyof SessionPendingInteractionMap] -/** Independent UI status facts for one Session identity. */ -export interface SessionStatus { - /** Latest known running state; absent until a baseline or event establishes it. */ - readonly running: boolean | undefined - /** Highest-precedence domain request currently awaiting user interaction. */ - readonly pendingInteraction: SessionPendingInteraction | undefined - /** Whether an observed stop outside the main view still needs acknowledgement. */ - readonly completionUnread: boolean -} - -/** Current UI status indexed by Session identity. */ -export type SessionStatusSnapshot = ReadonlyMap -/** Selector hook over the unified Session UI status snapshot. */ -export type UseSessionStatus = SnapshotSelectorHook - /** Selector hook for explicit or surrounding-Provider Session reference counts. */ export interface UseSessionRetainInfo { /** @@ -157,7 +140,6 @@ declare module '@deepseek-ai/dsh-client-ui-slots' { interface GlobalStandardProps { /** Session list and current selection. */ useSessions: UseSessions - useSessionStatus: UseSessionStatus useSessionRetainInfo: UseSessionRetainInfo /** Whether the current Peer may call `action` on one Session resource. */ useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean @@ -195,10 +177,17 @@ declare module '@deepseek-ai/dsh-api-session-controller/client' { declare module '@deepseek-ai/cordis' { interface Context { /** Session Controller adapter and session-scoped source registry. */ - uiSession: UiSession + uiSession: UiSessionService } } +/** + * Type of `ctx.uiSession`: the {@link UiSession} service plus the sub-services other Client packages provide beneath + * it. A package declares its sub-service `x`, provided as the Cordis service `uiSession.x` and read as + * `ctx.uiSession.x`, by merging a member into this interface; Typert analysis rejects members merged into the class. + */ +export interface UiSessionService extends UiSession {} + type SessionSourceRoster = readonly string[] | undefined type StandardMemberKind = 'hook' | 'keyed hook' | 'prop' @@ -288,19 +277,19 @@ export class UiSession extends Service { private readonly current: BindingSource private readonly pendingDomains: RuntimePendingDomain[] = [] private pendingSnapshot: ReadonlyMap = new Map() - private readonly running = new Map() - private readonly completionUnread = new Set() - private statusSnapshot: SessionStatusSnapshot = new Map() - private readonly statusListeners = new Set<() => void>() + private readonly pendingListeners = new Set<() => void>() private mainRetainId: SessionId | undefined private disposeMainRetain = (): void => {} private active = true - /** Root source combining running, pending-interaction, and completion-reminder facts. */ - readonly sessionStatus: HostObservable = { - getSnapshot: () => this.statusSnapshot, + /** + * Read-only view of every Session's highest-precedence pending interaction. The snapshot keeps its + * reference until an effective request changes; a throwing listener is reported without stopping later listeners. + */ + readonly pendingInteractions: HostObservable> = { + getSnapshot: () => this.pendingSnapshot, subscribe: (listener) => { - this.statusListeners.add(listener) - return () => { this.statusListeners.delete(listener) } + this.pendingListeners.add(listener) + return () => { this.pendingListeners.delete(listener) } }, } /** Renderer-facing adapter for `session` and `session-maybe` scopes. */ @@ -325,17 +314,10 @@ export class UiSession extends Service { ctx.effect(() => { const disposeList = sessions.list.subscribe(() => { this.publishMain() }) - const disposeStatus = sessions.list.subscribe(() => { this.reconcileStatus() }) - const disposeRemoteStatus = ctx.remote.$on('api-session/status', (sessionId, running) => { - this.observeRunning(sessionId, running) - }) this.publishMain() - this.reconcileStatus() return () => { this.active = false disposeList() - disposeStatus() - disposeRemoteStatus() this.disposeMainRetain() const records = [...this.bindings.values] this.bindings.clear() @@ -502,64 +484,7 @@ export class UiSession extends Service { ) if (samePendingInteractions(this.pendingSnapshot, projected)) return this.pendingSnapshot = projected - this.publishStatus() - } - - private observeRunning(sessionId: SessionId, running: boolean): void { - const previous = this.running.get(sessionId) - const beforeBaseline = this.sessions.list.getSnapshot().phase === 'pending' - this.running.set(sessionId, running) - if (running) this.completionUnread.delete(sessionId) - else if ((previous === true || (previous === undefined && beforeBaseline)) - && !this.isMain(sessionId)) this.completionUnread.add(sessionId) - this.publishStatus() - } - - private reconcileStatus(): void { - const list = this.sessions.list.getSnapshot() - const present = new Set(Object.keys(list.byId) as SessionId[]) - // Subagent catalog rows and retained subagent fallback rows do not establish Host running state. - for (const id of list.ids) { - const row = list.byId[id] as SessionSummary - const previous = this.running.get(id) - if (previous === undefined) this.running.set(id, row.running) - else if (previous !== row.running) this.observeRunning(id, row.running) - } - for (const id of present) { - if (this.isMain(id)) this.completionUnread.delete(id) - } - if (list.phase === 'ready') { - for (const id of this.running.keys()) { - if (present.has(id)) continue - this.running.delete(id) - this.completionUnread.delete(id) - } - } - this.publishStatus() - } - - private isMain(sessionId: SessionId): boolean { - return (this.sessions.list.getSnapshot().byId[sessionId]?.retainedBy.mainView ?? 0) > 0 - } - - private publishStatus(): void { - const ids = new Set([ - ...(Object.keys(this.sessions.list.getSnapshot().byId) as SessionId[]), - ...this.running.keys(), - ...this.pendingSnapshot.keys(), - ...this.completionUnread, - ]) - const next = new Map() - for (const id of ids) { - next.set(id, { - running: this.running.get(id), - pendingInteraction: this.pendingSnapshot.get(id), - completionUnread: this.completionUnread.has(id), - }) - } - if (sameSessionStatus(this.statusSnapshot, next)) return - this.statusSnapshot = next - notifySubscribers(this.statusListeners, '[ui-session] Session status') + notifySubscribers(this.pendingListeners, '[ui-session] pending interactions') } private createMaterializedBinding(owner: SessionBinding): MaterializedBinding { @@ -685,8 +610,8 @@ function claimStandardProp(kind: StandardMemberKind, name: string, finalProps: S finalProps.add(propName) } -/** Required Controller, renderer, Remote, and access services. */ -export const inject = ['sessions', 'slots', 'remote', 'remoteAccess'] +/** Required Controller, renderer, and access services. */ +export const inject = ['sessions', 'slots', 'remoteAccess'] /** * Install the Session root source and scoped adapter. @@ -697,7 +622,6 @@ export function apply(ctx: Context): void { ctx.slots.provideRoot({ hooks: { sessions: ctx.sessions.list, - sessionStatus: service.sessionStatus, }, keyedHooks: { sessionRetainInfo: key => ctx.sessions.retainInfo(key as SessionId), @@ -715,18 +639,6 @@ export function apply(ctx: Context): void { }) } -function sameSessionStatus(left: SessionStatusSnapshot, right: SessionStatusSnapshot): boolean { - if (left.size !== right.size) return false - for (const [id, status] of left) { - const candidate = right.get(id) - if (candidate === undefined - || candidate.running !== status.running - || candidate.pendingInteraction !== status.pendingInteraction - || candidate.completionUnread !== status.completionUnread) return false - } - return true -} - function samePendingInteractions( left: ReadonlyMap, right: ReadonlyMap, diff --git a/packages/client/ui-session/tests/ui-session.client.spec.ts b/packages/client/ui-session/tests/ui-session.client.spec.ts index 6afbe4be49..ac7fb9bc42 100644 --- a/packages/client/ui-session/tests/ui-session.client.spec.ts +++ b/packages/client/ui-session/tests/ui-session.client.spec.ts @@ -31,7 +31,6 @@ interface SessionsBench { reference(binding: SessionBinding): SessionReference setMainView(id: SessionId, count: number): void setRetainInfo(id: SessionId, count: number): void - emitStatus(id: SessionId, running: boolean): void release(id: SessionId): Promise } @@ -41,15 +40,6 @@ const roots: Context[] = [] function createSessionsBench(ctx: Context): SessionsBench { roots.push(ctx) - let statusListener: ((id: SessionId, running: boolean) => void) | undefined - ctx.provide('remote', { - $on: (_event: string, listener: (id: SessionId, running: boolean) => void) => { - statusListener = listener - return () => { - if (statusListener === listener) statusListener = undefined - } - }, - } as never) const list = createSnapshotStore({ ids: [], byId: {}, @@ -171,10 +161,6 @@ function createSessionsBench(ctx: Context): SessionsBench { retainedBy: count === 0 ? {} : { mainView: count }, }) }, - emitStatus(id, running) { - if (statusListener === undefined) throw new Error('api-session/status is not subscribed') - statusListener(id, running) - }, async release(id) { bindings.delete(id) const scopeCtx = scopes.get(id) @@ -521,90 +507,6 @@ describe('UiSession bindings', () => { }) }) -describe('UiSession status', () => { - it('keeps synthetic-row status unknown until an event or Host baseline establishes it', () => { - const ctx = new Context() - const bench = createSessionsBench(ctx) - const id = sessionId('catalog-only') - bench.list.update((draft) => { - draft.byId[id] = { id, displayTitle: id, running: false, retainedBy: {}, blank: false, updatedAt: 0 } - }) - const service = createUiSession(ctx, bench) - expect(service.sessionStatus.getSnapshot().get(id)?.running).toBeUndefined() - expect(service.sessionStatus.getSnapshot().get(id)?.completionUnread).toBe(false) - - bench.emitStatus(id, true) - bench.list.update((draft) => { draft.byId[id]!.displayTitle = 'Renamed child' }) - expect(service.sessionStatus.getSnapshot().get(id)?.running).toBe(true) - expect(service.sessionStatus.getSnapshot().get(id)?.completionUnread).toBe(false) - - bench.list.update((draft) => { draft.ids.push(id) }) - expect(service.sessionStatus.getSnapshot().get(id)?.running).toBe(false) - expect(service.sessionStatus.getSnapshot().get(id)?.completionUnread).toBe(true) - }) - - it('records non-main completions and lets main-view activity acknowledge them', () => { - const ctx = new Context() - const bench = createSessionsBench(ctx) - const id = sessionId('s1') - bench.binding(id) - const service = createUiSession(ctx, bench) - const changed = vi.fn() - const off = service.sessionStatus.subscribe(changed) - - expect(service.sessionStatus.getSnapshot().get(id)).toEqual({ - running: false, - pendingInteraction: undefined, - completionUnread: false, - }) - bench.list.update((draft) => { draft.byId[id]!.running = true }) - expect(service.sessionStatus.getSnapshot().get(id)?.running).toBe(true) - bench.list.update((draft) => { draft.byId[id]!.running = false }) - expect(service.sessionStatus.getSnapshot().get(id)?.completionUnread).toBe(true) - bench.setMainView(id, 1) - expect(service.sessionStatus.getSnapshot().get(id)?.completionUnread).toBe(false) - bench.setMainView(id, 0) - - bench.emitStatus(id, true) - bench.emitStatus(id, false) - expect(service.sessionStatus.getSnapshot().get(id)?.completionUnread).toBe(true) - - bench.setMainView(id, 1) - expect(service.sessionStatus.getSnapshot().get(id)?.completionUnread).toBe(false) - bench.emitStatus(id, true) - bench.emitStatus(id, false) - expect(service.sessionStatus.getSnapshot().get(id)?.completionUnread).toBe(false) - - bench.setMainView(id, 0) - bench.emitStatus(id, false) - expect(service.sessionStatus.getSnapshot().get(id)?.completionUnread).toBe(false) - bench.emitStatus(id, true) - bench.emitStatus(id, false) - expect(service.sessionStatus.getSnapshot().get(id)?.completionUnread).toBe(true) - bench.emitStatus(id, true) - expect(service.sessionStatus.getSnapshot().get(id)?.completionUnread).toBe(false) - expect(changed).toHaveBeenCalled() - off() - }) - - it('records an idle event before the initial catalog baseline and retires absent status later', () => { - const ctx = new Context() - const bench = createSessionsBench(ctx) - const id = sessionId('early') - bench.list.update((draft) => { draft.phase = 'pending' }) - const service = createUiSession(ctx, bench) - - bench.emitStatus(id, false) - expect(service.sessionStatus.getSnapshot().get(id)).toEqual({ - running: false, - pendingInteraction: undefined, - completionUnread: true, - }) - bench.list.update((draft) => { draft.phase = 'ready' }) - expect(service.sessionStatus.getSnapshot().has(id)).toBe(false) - }) -}) - describe('UiSession pending interactions', () => { it('publishes the highest-precedence exact object and removes each source independently', async () => { const ctx = new Context() @@ -612,7 +514,7 @@ describe('UiSession pending interactions', () => { const service = createUiSession(ctx, bench) const id = sessionId('s1') const listener = vi.fn() - const off = service.sessionStatus.subscribe(listener) + const off = service.pendingInteractions.subscribe(listener) const registerApproval = service.registerPendingInteraction( () => 0, ) @@ -631,26 +533,31 @@ describe('UiSession pending interactions', () => { const background = { key: 'background:1', kind: 'background', sessionId: id } const delegate = (): Promise => Promise.resolve() const removeApproval = registerApproval(approval, delegate) - expect(service.sessionStatus.getSnapshot().get(id)?.pendingInteraction).toBe(approval) + expect(service.pendingInteractions.getSnapshot().get(id)).toBe(approval) const removeDuplicate = registerApproval(duplicate, delegate) - expect(service.sessionStatus.getSnapshot().get(id)?.pendingInteraction).toBe(duplicate) + expect(service.pendingInteractions.getSnapshot().get(id)).toBe(duplicate) const removeQuestion = registerQuestion(question, delegate) - expect(service.sessionStatus.getSnapshot().get(id)?.pendingInteraction).toBe(question) + expect(service.pendingInteractions.getSnapshot().get(id)).toBe(question) const removePlan = registerQuestion(plan, delegate) - expect(service.sessionStatus.getSnapshot().get(id)?.pendingInteraction).toBe(plan) + expect(service.pendingInteractions.getSnapshot().get(id)).toBe(plan) + listener.mockClear() + const effective = service.pendingInteractions.getSnapshot() const removeBackground = registerBackground(background, delegate) - expect(service.sessionStatus.getSnapshot().get(id)?.pendingInteraction).toBe(plan) + expect(service.pendingInteractions.getSnapshot()).toBe(effective) removeBackground() removeQuestion() - expect(service.sessionStatus.getSnapshot().get(id)?.pendingInteraction).toBe(plan) + expect(service.pendingInteractions.getSnapshot()).toBe(effective) + expect(listener).not.toHaveBeenCalled() removePlan() - expect(service.sessionStatus.getSnapshot().get(id)?.pendingInteraction).toBe(duplicate) + expect(service.pendingInteractions.getSnapshot().get(id)).toBe(duplicate) + expect(listener).toHaveBeenCalledOnce() removeDuplicate() - expect(service.sessionStatus.getSnapshot().get(id)?.pendingInteraction).toBe(approval) + expect(service.pendingInteractions.getSnapshot().get(id)).toBe(approval) removeApproval() removeApproval() - expect(service.sessionStatus.getSnapshot().has(id)).toBe(false) + expect(service.pendingInteractions.getSnapshot().has(id)).toBe(false) + expect(listener).toHaveBeenCalledTimes(3) off() await ctx.fiber.dispose() }) @@ -670,15 +577,15 @@ describe('UiSession pending interactions', () => { const failure = new Error('pending subscriber failed') const report = vi.spyOn(console, 'error').mockImplementation(() => {}) - service.sessionStatus.subscribe(() => { throw failure }) + service.pendingInteractions.subscribe(() => { throw failure }) const after = vi.fn() - service.sessionStatus.subscribe(after) + service.pendingInteractions.subscribe(after) remove() expect(after).toHaveBeenCalledOnce() expect(report).toHaveBeenCalledWith( - '[ui-session] Session status subscriber failed:', + '[ui-session] pending interactions subscriber failed:', failure, ) }) @@ -698,7 +605,7 @@ describe('UiSession pending interactions', () => { let disposed = false const disposal = ctx.fiber.dispose().then(() => { disposed = true }) await vi.waitFor(() => { expect(delegate).toHaveBeenCalledOnce() }) - expect(service.sessionStatus.getSnapshot()).toEqual(new Map()) + expect(service.pendingInteractions.getSnapshot()).toEqual(new Map()) expect(disposed).toBe(false) remove() remove() @@ -745,7 +652,6 @@ describe('ui-session apply', () => { expect(slots.provideRoot).toHaveBeenCalledWith({ hooks: { sessions: bench.sessions.list, - sessionStatus: ctx.uiSession.sessionStatus, }, keyedHooks: { sessionRetainInfo: retainInfoMatcher, sessionAccess: sessionAccessMatcher }, }) diff --git a/packages/client/ui-session/tsconfig.json b/packages/client/ui-session/tsconfig.json index e38563a19b..6fa6b47b4c 100644 --- a/packages/client/ui-session/tsconfig.json +++ b/packages/client/ui-session/tsconfig.json @@ -11,9 +11,6 @@ { "path": "../../../vendor/cordis" }, - { - "path": "../../api/remotes/tsconfig.client.json" - }, { "path": "../../api/remote-access/tsconfig.client.json" }, diff --git a/packages/client/ui-subagent/package.json b/packages/client/ui-subagent/package.json index 9f008dd598..7794db3cc7 100644 --- a/packages/client/ui-subagent/package.json +++ b/packages/client/ui-subagent/package.json @@ -30,6 +30,7 @@ "client": { "inject": [ "@deepseek-ai/dsh-api-session-controller", + "@deepseek-ai/dsh-api-session-status", "@deepseek-ai/dsh-client-locale", "@deepseek-ai/dsh-client-resources", "@deepseek-ai/dsh-client-ui-chat", @@ -65,6 +66,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "@deepseek-ai/dsh-api-session-controller": "workspace:*", + "@deepseek-ai/dsh-api-session-status": "workspace:*", "@deepseek-ai/dsh-client-connection": "workspace:*", "@deepseek-ai/dsh-session": "workspace:*", "@deepseek-ai/dsh-client-ui-renderer": "workspace:*", diff --git a/packages/client/ui-subagent/src/client/index.ts b/packages/client/ui-subagent/src/client/index.ts index b44d4f8e55..a339b5a590 100644 --- a/packages/client/ui-subagent/src/client/index.ts +++ b/packages/client/ui-subagent/src/client/index.ts @@ -12,6 +12,7 @@ import type {} from '@deepseek-ai/dsh-client-locale/client' import type {} from '@deepseek-ai/dsh-client-ui-chat/client' import type {} from '@deepseek-ai/dsh-client-ui-renderer/client' import type {} from '@deepseek-ai/dsh-client-ui-session/client' +import type {} from '@deepseek-ai/dsh-api-session-status/client' import type {} from '@deepseek-ai/dsh-client-ui-sidebar-right/client' import type {} from '@deepseek-ai/dsh-client-ui-workspace/client' import { en, ja, es, fr, de, ru, pt, NS, zh, type SubagentKey } from './locales.ts' diff --git a/packages/client/ui-subagent/tests/conversation-ui.client.spec.tsx b/packages/client/ui-subagent/tests/conversation-ui.client.spec.tsx index a70f41295e..2a145eb42f 100644 --- a/packages/client/ui-subagent/tests/conversation-ui.client.spec.tsx +++ b/packages/client/ui-subagent/tests/conversation-ui.client.spec.tsx @@ -9,7 +9,7 @@ import type { import type { SubagentAddress, SubagentCatalogEntry } from '@deepseek-ai/dsh-subagent/client' import type { TeamProjection, TeamTaskId, TeamTaskView } from '@deepseek-ai/dsh-agent-team/client' import type { SessionId } from '@deepseek-ai/dsh-session/types' -import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' import { SubagentCatalogAction, SubagentHeaderLineage, type SubagentCatalogActionProps, type SubagentHeaderLineageProps, diff --git a/packages/client/ui-subagent/tsconfig.json b/packages/client/ui-subagent/tsconfig.json index 293725f30b..00f7328a9b 100644 --- a/packages/client/ui-subagent/tsconfig.json +++ b/packages/client/ui-subagent/tsconfig.json @@ -11,6 +11,9 @@ { "path": "../../api/session-controller/tsconfig.client.json" }, + { + "path": "../../api/session-status" + }, { "path": "../../../vendor/cordis" }, diff --git a/packages/client/ui-trajectory/package.json b/packages/client/ui-trajectory/package.json index a0d6689e43..931679c371 100644 --- a/packages/client/ui-trajectory/package.json +++ b/packages/client/ui-trajectory/package.json @@ -74,6 +74,7 @@ "@deepseek-ai/dsh-client-ui-chat": "workspace:*", "@deepseek-ai/dsh-session": "workspace:*", "@deepseek-ai/dsh-api-session-controller": "workspace:*", + "@deepseek-ai/dsh-api-session-status": "workspace:*", "@deepseek-ai/dsh-client-ui-renderer": "workspace:*", "@deepseek-ai/dsh-client-ui-session": "workspace:*", "@deepseek-ai/dsh-llm": "workspace:*", diff --git a/packages/client/ui-trajectory/tests/views.client.spec.tsx b/packages/client/ui-trajectory/tests/views.client.spec.tsx index e0ee44c80a..b906db81a5 100644 --- a/packages/client/ui-trajectory/tests/views.client.spec.tsx +++ b/packages/client/ui-trajectory/tests/views.client.spec.tsx @@ -33,7 +33,7 @@ import type { } from '@deepseek-ai/dsh-api-session-controller/client' import type { WorkspaceSnapshot } from '@deepseek-ai/dsh-api-workspace-controller/client' import type { SessionId } from '@deepseek-ai/dsh-session/types' -import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' import { ConversationSession, ConversationSessionHeader, type ConversationSessionHeaderProps, type ConversationSessionProps, diff --git a/packages/client/ui-workflow-run/package.json b/packages/client/ui-workflow-run/package.json index c097a340a7..5a69b82c46 100644 --- a/packages/client/ui-workflow-run/package.json +++ b/packages/client/ui-workflow-run/package.json @@ -30,6 +30,7 @@ "client": { "inject": [ "@deepseek-ai/dsh-api-session-controller", + "@deepseek-ai/dsh-api-session-status", "@deepseek-ai/dsh-client-locale", "@deepseek-ai/dsh-client-ui-chat", "@deepseek-ai/dsh-client-ui-conversation", @@ -59,6 +60,7 @@ }, "devDependencies": { "@deepseek-ai/dsh-api-session-controller": "workspace:*", + "@deepseek-ai/dsh-api-session-status": "workspace:*", "@deepseek-ai/dsh-client-locale": "workspace:*", "@deepseek-ai/dsh-client-store": "workspace:*", "@deepseek-ai/dsh-client-test-runtime": "workspace:*", diff --git a/packages/client/ui-workflow-run/src/client/WorkflowRunPanel.tsx b/packages/client/ui-workflow-run/src/client/WorkflowRunPanel.tsx index 059cf803cb..5df698e254 100644 --- a/packages/client/ui-workflow-run/src/client/WorkflowRunPanel.tsx +++ b/packages/client/ui-workflow-run/src/client/WorkflowRunPanel.tsx @@ -10,7 +10,7 @@ import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots import type { SessionListState, SessionTarget } from '@deepseek-ai/dsh-api-session-controller/client' import { shallowEqual } from '@deepseek-ai/dsh-client-store' import type { SessionId } from '@deepseek-ai/dsh-session/types' -import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' import type { WorkflowRunKey } from './locales.ts' import type { WorkflowRunMemberData, WorkflowRunPhaseData, WorkflowRunStatus, diff --git a/packages/client/ui-workflow-run/src/client/index.ts b/packages/client/ui-workflow-run/src/client/index.ts index 648dbd1f46..04b4f9943c 100644 --- a/packages/client/ui-workflow-run/src/client/index.ts +++ b/packages/client/ui-workflow-run/src/client/index.ts @@ -7,6 +7,7 @@ import type {} from '@deepseek-ai/dsh-client-ui-chat/client' import type {} from '@deepseek-ai/dsh-client-ui-conversation/client' import type {} from '@deepseek-ai/dsh-client-ui-renderer/client' import type {} from '@deepseek-ai/dsh-client-ui-session/client' +import type {} from '@deepseek-ai/dsh-api-session-status/client' import type {} from '@deepseek-ai/dsh-client-ui-workspace/client' import { WorkflowRunPanel, type WorkflowRunInjected } from './WorkflowRunPanel.tsx' import { en, ja, es, fr, de, ru, pt, NS, type WorkflowRunKey, zh } from './locales.ts' diff --git a/packages/client/ui-workflow-run/tsconfig.json b/packages/client/ui-workflow-run/tsconfig.json index 2f3c83a425..1dc643db52 100644 --- a/packages/client/ui-workflow-run/tsconfig.json +++ b/packages/client/ui-workflow-run/tsconfig.json @@ -17,6 +17,9 @@ { "path": "../../api/session-controller/tsconfig.client.json" }, + { + "path": "../../api/session-status" + }, { "path": "../store" }, diff --git a/packages/client/ui-workspace/package.json b/packages/client/ui-workspace/package.json index e67c5242a6..994b176573 100644 --- a/packages/client/ui-workspace/package.json +++ b/packages/client/ui-workspace/package.json @@ -32,6 +32,7 @@ "@deepseek-ai/dsh-api-remote-access", "@deepseek-ai/dsh-api-remotes", "@deepseek-ai/dsh-api-session-controller", + "@deepseek-ai/dsh-api-session-status", "@deepseek-ai/dsh-api-workspace-controller", "@deepseek-ai/dsh-client-connection", "@deepseek-ai/dsh-client-locale", @@ -61,6 +62,7 @@ "@deepseek-ai/dsh-agent": "workspace:*", "@deepseek-ai/dsh-agent-preset-registry": "workspace:*", "@deepseek-ai/dsh-api-session-controller": "workspace:*", + "@deepseek-ai/dsh-api-session-status": "workspace:*", "@deepseek-ai/dsh-api-workspace-controller": "workspace:*", "@deepseek-ai/dsh-client-connection": "workspace:*", "@deepseek-ai/dsh-client-locale": "workspace:*", diff --git a/packages/client/ui-workspace/src/client/index.ts b/packages/client/ui-workspace/src/client/index.ts index 9b64c6332e..852ecb23d7 100644 --- a/packages/client/ui-workspace/src/client/index.ts +++ b/packages/client/ui-workspace/src/client/index.ts @@ -39,6 +39,8 @@ import type {} from '@deepseek-ai/dsh-client-ui-renderer/client' import type {} from '@deepseek-ai/dsh-client-ui-layout/client' // Type-only: pulls the Session root standard-hook merge. import type {} from '@deepseek-ai/dsh-client-ui-session/client' +// Type-only: pulls the useSessionStatus root standard-hook merge. +import type {} from '@deepseek-ai/dsh-api-session-status/client' import { type ArchiveSessionInjected, type ForkSessionInjected, menuOpenStateFactory, type PinSessionInjected, type SessionArchiveConfirmInjected, type SessionArchiveConfirmRequest, diff --git a/packages/client/ui-workspace/src/client/tree.ts b/packages/client/ui-workspace/src/client/tree.ts index 054c584d4b..18a4c153f4 100644 --- a/packages/client/ui-workspace/src/client/tree.ts +++ b/packages/client/ui-workspace/src/client/tree.ts @@ -9,7 +9,7 @@ import { import type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client' import type { SessionStatusSnapshot, -} from '@deepseek-ai/dsh-client-ui-session/client' +} from '@deepseek-ai/dsh-api-session-status/client' import type { SessionId } from '@deepseek-ai/dsh-session/types' import { assertNever } from '@deepseek-ai/dsh-util-values' import { workspaceTitleOf } from '@deepseek-ai/dsh-util-workspace-path' diff --git a/packages/client/ui-workspace/tests/session-actions.client.spec.tsx b/packages/client/ui-workspace/tests/session-actions.client.spec.tsx index bb180fb209..0023b84ee7 100644 --- a/packages/client/ui-workspace/tests/session-actions.client.spec.tsx +++ b/packages/client/ui-workspace/tests/session-actions.client.spec.tsx @@ -12,7 +12,7 @@ import { afterEach, describe, expect, it, onTestFinished, vi } from 'vitest' import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react' import type { SessionListState, SessionSummary } from '@deepseek-ai/dsh-api-session-controller/client' import type { WorkspaceId, WorkspaceSnapshot } from '@deepseek-ai/dsh-api-workspace-controller/client' -import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' import type { SessionId } from '@deepseek-ai/dsh-session/types' import { createSnapshotStore } from '@deepseek-ai/dsh-client-store' import type { GlobalStandardProps, PropsLocale, PropsRenderSlots, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots' diff --git a/packages/client/ui-workspace/tests/tree.client.spec.ts b/packages/client/ui-workspace/tests/tree.client.spec.ts index b754980ca5..363286a6c2 100644 --- a/packages/client/ui-workspace/tests/tree.client.spec.ts +++ b/packages/client/ui-workspace/tests/tree.client.spec.ts @@ -3,9 +3,8 @@ import type { SessionListState, SessionProjectionMap, SessionSummary, } from '@deepseek-ai/dsh-api-session-controller/client' import type { WorkspaceId, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client' -import type { - SessionPendingInteraction, SessionStatus, SessionStatusSnapshot, -} from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatus, SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' +import type { SessionPendingInteraction } from '@deepseek-ai/dsh-client-ui-session/client' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { JsonValue } from '@deepseek-ai/dsh-util-values' import type { SessionProjectionSnapshot } from '@deepseek-ai/dsh-api-session-controller/client' diff --git a/packages/client/ui-workspace/tests/workspace-browser.client.spec.tsx b/packages/client/ui-workspace/tests/workspace-browser.client.spec.tsx index 5df4923b4f..cff12b0818 100644 --- a/packages/client/ui-workspace/tests/workspace-browser.client.spec.tsx +++ b/packages/client/ui-workspace/tests/workspace-browser.client.spec.tsx @@ -10,9 +10,8 @@ import type { SessionListState, SessionSummary } from '@deepseek-ai/dsh-api-sess import type { WorkspaceId, WorkspaceSnapshot, WorkspaceView, } from '@deepseek-ai/dsh-api-workspace-controller/client' -import type { - SessionPendingInteraction, SessionStatus, SessionStatusSnapshot, -} from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatus, SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' +import type { SessionPendingInteraction } from '@deepseek-ai/dsh-client-ui-session/client' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { MainPanelId } from '@deepseek-ai/dsh-client-ui-layout/client' import { zh as commonZh } from '@deepseek-ai/dsh-client-locale/src/locales/zh.ts' diff --git a/packages/client/ui-workspace/tests/workspace-picker.client.spec.tsx b/packages/client/ui-workspace/tests/workspace-picker.client.spec.tsx index e39f7cf81c..635b65aa5d 100644 --- a/packages/client/ui-workspace/tests/workspace-picker.client.spec.tsx +++ b/packages/client/ui-workspace/tests/workspace-picker.client.spec.tsx @@ -10,7 +10,7 @@ import type { import type {} from '@deepseek-ai/dsh-client-locale/client' import { allowAllAccess, bindSnapshotSelector, makeTranslate } from '@deepseek-ai/dsh-client-test-runtime' import { zh as commonZh } from '@deepseek-ai/dsh-client-locale/src/locales/zh.ts' -import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-client-ui-session/client' +import type { SessionStatusSnapshot } from '@deepseek-ai/dsh-api-session-status/client' import type { DirectoryFlowOwnerProps, WorkspacePickerProps } from '../src/client/contract/slots.ts' import { WorkspacePicker } from '../src/client/WorkspacePicker.tsx' import { zh } from '../src/client/locales.ts' diff --git a/packages/client/ui-workspace/tsconfig.json b/packages/client/ui-workspace/tsconfig.json index 2fce88ba2d..3b3659ce01 100644 --- a/packages/client/ui-workspace/tsconfig.json +++ b/packages/client/ui-workspace/tsconfig.json @@ -11,6 +11,9 @@ { "path": "../../api/session-controller/tsconfig.client.json" }, + { + "path": "../../api/session-status" + }, { "path": "../../preset/agent-preset-registry" }, diff --git a/packages/experimental/liveshare/package.json b/packages/experimental/liveshare/package.json index 6f911b774e..cee990bc53 100644 --- a/packages/experimental/liveshare/package.json +++ b/packages/experimental/liveshare/package.json @@ -85,6 +85,7 @@ "@deepseek-ai/dsh-api-remote-access": "workspace:*", "@deepseek-ai/dsh-api-remotes": "workspace:*", "@deepseek-ai/dsh-api-session-controller": "workspace:*", + "@deepseek-ai/dsh-api-session-status": "workspace:*", "@deepseek-ai/dsh-api-settings-controller": "workspace:*", "@deepseek-ai/dsh-api-workspace-controller": "workspace:*", "@deepseek-ai/dsh-api-workspace-files": "workspace:*", diff --git a/packages/experimental/liveshare/tests/viewer-page-roster.client.ts b/packages/experimental/liveshare/tests/viewer-page-roster.client.ts index e43e067812..5dca7e1a83 100644 --- a/packages/experimental/liveshare/tests/viewer-page-roster.client.ts +++ b/packages/experimental/liveshare/tests/viewer-page-roster.client.ts @@ -3,8 +3,8 @@ * * A served viewer page is the owner's own Web shell with the owner's client plugins; this roster is the * subset the viewer page specs need: the wire plugin, the Gateway, remote access, the Session/Workspace controllers, - * the menu service, presentation plugins, and the Liveshare `./client` face, which mounts the viewer surfaces when the - * carrier names a share. Every row is the package's own `/client` face registered as a module-table + * Session status, the menu service, presentation plugins, and the Liveshare `./client` face, which mounts the viewer + * surfaces when the carrier names a share. Every row is the package's own `/client` face registered as a module-table * factory. It must be imported only after {@link prepareViewerRemoteFaces} answered the generated * `/remote` faces these plugins import. * @@ -15,6 +15,7 @@ import * as apiGateway from '@deepseek-ai/dsh-api-gateway/client' import * as apiRemoteAccess from '@deepseek-ai/dsh-api-remote-access/client' import * as apiRemotes from '@deepseek-ai/dsh-api-remotes/client' import * as apiSessionController from '@deepseek-ai/dsh-api-session-controller/client' +import * as apiSessionStatus from '@deepseek-ai/dsh-api-session-status/client' import * as apiWorkspaceController from '@deepseek-ai/dsh-api-workspace-controller/client' import * as clientConnection from '@deepseek-ai/dsh-client-connection/client' import * as clientFileUpload from '@deepseek-ai/dsh-client-file-upload/client' @@ -60,6 +61,7 @@ export const VIEWER_PAGE_ROSTER: readonly ViewerPageRosterRow[] = [ { id: '@deepseek-ai/dsh-api-remote-access', exports: apiRemoteAccess }, { id: '@deepseek-ai/dsh-api-remotes', exports: apiRemotes }, { id: '@deepseek-ai/dsh-api-session-controller', exports: apiSessionController }, + { id: '@deepseek-ai/dsh-api-session-status', exports: apiSessionStatus }, { id: '@deepseek-ai/dsh-api-workspace-controller', exports: apiWorkspaceController }, { id: '@deepseek-ai/dsh-client-file-upload', exports: clientFileUpload }, { id: '@deepseek-ai/dsh-client-locale', exports: clientLocale }, diff --git a/packages/extensions/cordis-client-runner/src/client/slot-catalog.ts b/packages/extensions/cordis-client-runner/src/client/slot-catalog.ts index 4ec5c8a1cc..4c4c7a95fb 100644 --- a/packages/extensions/cordis-client-runner/src/client/slot-catalog.ts +++ b/packages/extensions/cordis-client-runner/src/client/slot-catalog.ts @@ -105,12 +105,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -147,12 +147,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -186,12 +186,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -250,12 +250,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -304,12 +304,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -351,12 +351,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -415,12 +415,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -464,12 +464,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -518,12 +518,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -579,12 +579,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -632,12 +632,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -696,12 +696,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -749,12 +749,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -796,12 +796,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -850,12 +850,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -899,12 +899,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -957,12 +957,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -999,12 +999,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1040,12 +1040,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1072,12 +1072,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1113,12 +1113,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1164,12 +1164,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1215,12 +1215,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1260,12 +1260,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1294,12 +1294,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1331,12 +1331,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1378,12 +1378,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1441,12 +1441,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1505,12 +1505,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1546,12 +1546,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1593,12 +1593,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1651,12 +1651,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1711,12 +1711,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1756,12 +1756,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1800,12 +1800,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1860,12 +1860,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1920,12 +1920,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -1961,12 +1961,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -2002,12 +2002,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -2064,12 +2064,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -2127,12 +2127,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -2170,12 +2170,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -2215,12 +2215,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -2277,12 +2277,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -2343,12 +2343,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -2381,12 +2381,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -2431,12 +2431,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -2502,12 +2502,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -2569,12 +2569,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -2633,12 +2633,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -2982,12 +2982,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3016,12 +3016,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3076,12 +3076,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3117,12 +3117,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3161,12 +3161,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3218,12 +3218,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3271,12 +3271,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3324,12 +3324,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3377,12 +3377,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3423,12 +3423,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3480,12 +3480,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3514,12 +3514,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3551,12 +3551,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3594,12 +3594,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3647,12 +3647,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3681,12 +3681,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3734,12 +3734,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3780,12 +3780,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3814,12 +3814,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3848,12 +3848,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3901,12 +3901,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3942,12 +3942,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -3972,12 +3972,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4025,12 +4025,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4079,12 +4079,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4132,12 +4132,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4189,12 +4189,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4221,12 +4221,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4253,12 +4253,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4285,12 +4285,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4336,12 +4336,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4398,12 +4398,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4432,12 +4432,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4466,12 +4466,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4501,12 +4501,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4534,12 +4534,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4596,12 +4596,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4649,12 +4649,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4705,12 +4705,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4744,12 +4744,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4804,12 +4804,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4864,12 +4864,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4923,12 +4923,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -4983,12 +4983,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5035,12 +5035,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5095,12 +5095,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5155,12 +5155,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5203,12 +5203,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5265,12 +5265,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5306,12 +5306,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5370,12 +5370,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5432,12 +5432,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5488,12 +5488,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5544,12 +5544,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5578,12 +5578,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5610,12 +5610,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5644,12 +5644,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5678,12 +5678,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ownerPropsReferences: [], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5734,12 +5734,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5787,12 +5787,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5825,12 +5825,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5884,12 +5884,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -5999,12 +5999,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', @@ -6049,12 +6049,12 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], standardProps: [ 'useRemoteAccess: (action: RemoteEndpoint) => boolean', + 'useSessionStatus: UseSessionStatus', 'useResource: UseResource', 'useContextMenu: UseContextMenu', 'useWorkspaces: SnapshotSelectorHook', 'usePanelInfo: UsePanelInfo', 'useSessions: UseSessions', - 'useSessionStatus: UseSessionStatus', 'useSessionRetainInfo: UseSessionRetainInfo', 'useSessionAccess: (sessionId: SessionId, action: RemoteEndpoint) => boolean', 'useWorkspaceAccess: (workspaceId: WorkspaceId, action: RemoteEndpoint) => boolean', diff --git a/packages/preset/agent-preset/skills/dsh-doc/references/packages.md b/packages/preset/agent-preset/skills/dsh-doc/references/packages.md index f50ebd3356..812ce194f8 100644 --- a/packages/preset/agent-preset/skills/dsh-doc/references/packages.md +++ b/packages/preset/agent-preset/skills/dsh-doc/references/packages.md @@ -19,6 +19,7 @@ Every package below exports a Cordis plugin that a bundle patch can name in a Lo | `@deepseek-ai/dsh-api-remote-access` | no | Method-level Remote access control for non-owner Peers and the per-Peer access snapshot | | `@deepseek-ai/dsh-api-remotes` | no | Remote BFF assembly for application-selected Host capabilities | | `@deepseek-ai/dsh-api-session-controller` | yes | Session Remote commands, cold reads, and live control transport | +| `@deepseek-ai/dsh-api-session-status` | no | Client Session status table: running state, the effective pending interaction, and completion reminders | | `@deepseek-ai/dsh-api-settings-controller` | yes | Remote owner for the configuration surfaces over the settings-domain seams | | `@deepseek-ai/dsh-api-terminal-controller` | yes | Session-owned interactive terminals with shell discovery, screen recovery and typed Remote control | | `@deepseek-ai/dsh-api-workspace-controller` | yes | Workspace Remote commands and reconnect-safe state transport | diff --git a/packages/test-support/client-runtime/package.json b/packages/test-support/client-runtime/package.json index 29f310d16c..397adc8478 100644 --- a/packages/test-support/client-runtime/package.json +++ b/packages/test-support/client-runtime/package.json @@ -34,6 +34,7 @@ "@deepseek-ai/cordis-plugin-loader": "workspace:~", "@deepseek-ai/dsh-api-gateway": "workspace:*", "@deepseek-ai/dsh-api-session-controller": "workspace:*", + "@deepseek-ai/dsh-api-session-status": "workspace:*", "@deepseek-ai/dsh-api-workspace-controller": "workspace:*", "@deepseek-ai/dsh-attachment": "workspace:*", "@deepseek-ai/dsh-client-connection": "workspace:*", @@ -63,6 +64,7 @@ "@deepseek-ai/dsh-api-remote-access": "workspace:*", "@deepseek-ai/dsh-api-remotes": "workspace:*", "@deepseek-ai/dsh-api-session-controller": "workspace:*", + "@deepseek-ai/dsh-api-session-status": "workspace:*", "@deepseek-ai/dsh-api-workspace-controller": "workspace:*", "@deepseek-ai/dsh-attachment": "workspace:*", "@deepseek-ai/dsh-base": "workspace:*", diff --git a/packages/test-support/client-runtime/src/index.ts b/packages/test-support/client-runtime/src/index.ts index b6d8f94afc..18b1daefdf 100644 --- a/packages/test-support/client-runtime/src/index.ts +++ b/packages/test-support/client-runtime/src/index.ts @@ -1,6 +1,7 @@ /** * jsdom slot test runtime: a real small runtime — Cordis `Context`, the - * renderer-owned `SlotRegistry`, the `ui-session` adapter, and the UI renderer — assembled around + * renderer-owned `SlotRegistry`, the `ui-session` adapter, the + * `session-status` table, and the UI renderer — assembled around * test-owned session/workspace doubles and a fail-loud file-upload stub, so feature specs exercise * declaration, registration, scope, store, inject, rendering, updates, and * disposal without hand-building the machinery per suite. @@ -28,6 +29,9 @@ import { createSlotRenderer as createRenderer } from '@deepseek-ai/dsh-client-ui import { apply as applyUiSession, inject as uiSessionInject, } from '@deepseek-ai/dsh-client-ui-session/client' +import { + apply as applySessionStatus, inject as sessionStatusInject, +} from '@deepseek-ai/dsh-api-session-status/client' import type { SessionReference } from '@deepseek-ai/dsh-api-session-controller/client' import type { SessionId } from '@deepseek-ai/dsh-session/types' import { createSnapshotStore } from '@deepseek-ai/dsh-client-store' @@ -293,6 +297,7 @@ export class SlotTestRuntime { const runtime = new SlotTestRuntime(ctx, ctx.get('slots') as SlotRegistry) await ctx.plugin(allowAllAccessPlugin).await() await ctx.plugin({ inject: [...uiSessionInject], apply: applyUiSession }).await() + await ctx.plugin({ inject: [...sessionStatusInject], apply: applySessionStatus }).await() return runtime } diff --git a/packages/test-support/client-runtime/tests/runtime.client.spec.tsx b/packages/test-support/client-runtime/tests/runtime.client.spec.tsx index bb327af364..1af64f5a37 100644 --- a/packages/test-support/client-runtime/tests/runtime.client.spec.tsx +++ b/packages/test-support/client-runtime/tests/runtime.client.spec.tsx @@ -17,7 +17,7 @@ import { createScope, type SessionReference } from '@deepseek-ai/dsh-api-session import type { WorkspaceId } from '@deepseek-ai/dsh-api-workspace-controller/client' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { - PropsRenderSlots, SessionStandardProps, SlotRendererHost, + GlobalStandardProps, PropsRenderSlots, SessionStandardProps, SlotRendererHost, } from '@deepseek-ai/dsh-client-ui-slots' import { SlotTestRuntime } from '@deepseek-ai/dsh-client-test-runtime' @@ -790,6 +790,25 @@ describe('fixture session face', () => { await runtime.dispose() }) + it('publishes running status through the real session-status root hook', async () => { + const reference = createSnapshotStore(undefined) + const runtime = await runtimeWithFrame(reference) + runtime.slots.register({ name: 'trt.chat' }, (props: SessionStandardProps & GlobalStandardProps) => ( + running:{props.useSessionStatus(status => String(status.get(props.sessionId)?.running))} + )) + const view = runtime.renderRoot() + await runtime.sessions.add({ id: 's1' }) + using bound = runtime.sessions.retain('s1' as SessionId) + await bound.ready + act(() => { reference.set(bound) }) + expect(view.container.textContent).toContain('running:false') + + act(() => { runtime.remote.emit('api-session/status', ['s1', true]) }) + expect(view.container.textContent).toContain('running:true') + expect(runtime.ctx.uiSession.sessionStatus.getSnapshot().get('s1' as SessionId)?.running).toBe(true) + await runtime.dispose() + }) + it('copies projections into a later Session generation', async () => { const runtime = await runtimeWithFrame() const id = await runtime.sessions.add({ id: 'seeded-projection' }) diff --git a/packages/test-support/client-runtime/tsconfig.json b/packages/test-support/client-runtime/tsconfig.json index a4f9971fe0..29e0093adf 100644 --- a/packages/test-support/client-runtime/tsconfig.json +++ b/packages/test-support/client-runtime/tsconfig.json @@ -27,6 +27,9 @@ { "path": "../../api/session-controller/tsconfig.client.json" }, + { + "path": "../../api/session-status" + }, { "path": "../../api/workspace-controller/tsconfig.client.json" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 60e2c4da8e..fcacff368b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1730,6 +1730,39 @@ importers: specifier: ^3.0.1 version: 3.0.1 + packages/api/session-status: + devDependencies: + '@deepseek-ai/cordis': + specifier: workspace:~ + version: link:../../../vendor/cordis + '@deepseek-ai/dsh-api-remotes': + specifier: workspace:* + version: link:../remotes + '@deepseek-ai/dsh-api-session-controller': + specifier: workspace:* + version: link:../session-controller + '@deepseek-ai/dsh-client-store': + specifier: workspace:* + version: link:../../client/store + '@deepseek-ai/dsh-client-test-runtime': + specifier: workspace:* + version: link:../../test-support/client-runtime + '@deepseek-ai/dsh-client-ui-renderer': + specifier: workspace:* + version: link:../../client/ui-renderer + '@deepseek-ai/dsh-client-ui-session': + specifier: workspace:* + version: link:../../client/ui-session + '@deepseek-ai/dsh-client-ui-slots': + specifier: workspace:* + version: link:../../client/ui-slots + '@deepseek-ai/dsh-remote-mock': + specifier: workspace:* + version: link:../../test-support/remote-mock + '@deepseek-ai/dsh-session': + specifier: workspace:* + version: link:../../core/session + packages/api/settings-controller: dependencies: '@deepseek-ai/schemastery': @@ -2944,6 +2977,9 @@ importers: '@deepseek-ai/dsh-api-session-controller': specifier: workspace:* version: link:../../api/session-controller + '@deepseek-ai/dsh-api-session-status': + specifier: workspace:* + version: link:../../api/session-status '@deepseek-ai/dsh-api-settings-controller': specifier: workspace:* version: link:../../api/settings-controller @@ -4024,6 +4060,9 @@ importers: '@deepseek-ai/dsh-api-session-controller': specifier: workspace:* version: link:../../api/session-controller + '@deepseek-ai/dsh-api-session-status': + specifier: workspace:* + version: link:../../api/session-status '@deepseek-ai/dsh-api-workspace-controller': specifier: workspace:* version: link:../../api/workspace-controller @@ -4265,6 +4304,9 @@ importers: '@deepseek-ai/dsh-api-session-controller': specifier: workspace:* version: link:../../api/session-controller + '@deepseek-ai/dsh-api-session-status': + specifier: workspace:* + version: link:../../api/session-status '@deepseek-ai/dsh-api-workspace-controller': specifier: workspace:* version: link:../../api/workspace-controller @@ -5665,9 +5707,6 @@ importers: '@deepseek-ai/dsh-api-remote-access': specifier: workspace:* version: link:../../api/remote-access - '@deepseek-ai/dsh-api-remotes': - specifier: workspace:* - version: link:../../api/remotes '@deepseek-ai/dsh-api-session-controller': specifier: workspace:* version: link:../../api/session-controller @@ -5683,9 +5722,6 @@ importers: '@deepseek-ai/dsh-client-ui-slots': specifier: workspace:* version: link:../ui-slots - '@deepseek-ai/dsh-remote-mock': - specifier: workspace:* - version: link:../../test-support/remote-mock '@deepseek-ai/dsh-session': specifier: workspace:* version: link:../../core/session @@ -6750,6 +6786,9 @@ importers: '@deepseek-ai/dsh-api-session-controller': specifier: workspace:* version: link:../../api/session-controller + '@deepseek-ai/dsh-api-session-status': + specifier: workspace:* + version: link:../../api/session-status '@deepseek-ai/dsh-client-connection': specifier: workspace:* version: link:../connection @@ -6998,6 +7037,9 @@ importers: '@deepseek-ai/dsh-api-session-controller': specifier: workspace:* version: link:../../api/session-controller + '@deepseek-ai/dsh-api-session-status': + specifier: workspace:* + version: link:../../api/session-status '@deepseek-ai/dsh-attachment': specifier: workspace:* version: link:../../attachment/attachment @@ -7145,6 +7187,9 @@ importers: '@deepseek-ai/dsh-api-session-controller': specifier: workspace:* version: link:../../api/session-controller + '@deepseek-ai/dsh-api-session-status': + specifier: workspace:* + version: link:../../api/session-status '@deepseek-ai/dsh-client-locale': specifier: workspace:* version: link:../locale @@ -7208,6 +7253,9 @@ importers: '@deepseek-ai/dsh-api-session-controller': specifier: workspace:* version: link:../../api/session-controller + '@deepseek-ai/dsh-api-session-status': + specifier: workspace:* + version: link:../../api/session-status '@deepseek-ai/dsh-api-workspace-controller': specifier: workspace:* version: link:../../api/workspace-controller @@ -10708,6 +10756,9 @@ importers: '@deepseek-ai/dsh-api-session-controller': specifier: workspace:* version: link:../../api/session-controller + '@deepseek-ai/dsh-api-session-status': + specifier: workspace:* + version: link:../../api/session-status '@deepseek-ai/dsh-api-settings-controller': specifier: workspace:* version: link:../../api/settings-controller @@ -17536,6 +17587,9 @@ importers: '@deepseek-ai/dsh-api-session-controller': specifier: workspace:* version: link:../../api/session-controller + '@deepseek-ai/dsh-api-session-status': + specifier: workspace:* + version: link:../../api/session-status '@deepseek-ai/dsh-api-workspace-controller': specifier: workspace:* version: link:../../api/workspace-controller diff --git a/scripts/verify-package-readme-model-experience.ts b/scripts/verify-package-readme-model-experience.ts index 6424868d38..14a894fdcd 100644 --- a/scripts/verify-package-readme-model-experience.ts +++ b/scripts/verify-package-readme-model-experience.ts @@ -250,6 +250,7 @@ const SENTENCE_MODEL_EXPERIENCE: Readonly> = { 'packages/api/gateway': { kind: 'none', reason: 'Remote dispatch infrastructure; invoked business methods own any model-visible effect.' }, 'packages/api/job-controller': { kind: 'none', reason: 'Job observation is browser and Host control state; it registers no prompt, tool, or session event.' }, 'packages/api/session-controller': { kind: 'none', reason: 'Session API and transport owner; invoked Agent commands own any model-visible effect.' }, + 'packages/api/session-status': { kind: 'none', reason: 'Browser-side Session status table; registers nothing model-facing.' }, 'packages/api/settings-controller': { kind: 'none', reason: 'Configuration-surface API owner; it registers no prompt, tool, or session event.' }, 'packages/api/workspace-controller': { kind: 'none', reason: 'Workspace API and state projection owner; it registers no prompt, tool, or session event.' }, 'packages/api/workspace-files': { kind: 'none', reason: 'Workspace file read API and its Client resource provider; it registers no prompt, tool, or session event.' }, diff --git a/tsconfig.base.json b/tsconfig.base.json index 1ccb5adc32..bab9a81829 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -150,6 +150,8 @@ "@deepseek-ai/dsh-api-session-controller/client": ["./packages/api/session-controller/src/client/index.ts"], "@deepseek-ai/dsh-api-session-controller/types": ["./packages/api/session-controller/src/types.ts"], "@deepseek-ai/dsh-api-session-controller/remote-events": ["./packages/api/session-controller/src/remote-events.ts"], + "@deepseek-ai/dsh-api-session-status": ["./packages/api/session-status/src/index.ts"], + "@deepseek-ai/dsh-api-session-status/client": ["./packages/api/session-status/src/client/index.ts"], "@deepseek-ai/dsh-api-settings-controller": ["./packages/api/settings-controller/src/index.ts"], "@deepseek-ai/dsh-api-settings-controller/types": ["./packages/api/settings-controller/src/types.ts"], "@deepseek-ai/dsh-api-remote-access": ["./packages/api/remote-access/src/index.ts"], diff --git a/tsconfig.client.json b/tsconfig.client.json index f15b78502b..342dbdbbb0 100644 --- a/tsconfig.client.json +++ b/tsconfig.client.json @@ -100,6 +100,7 @@ { "path": "./packages/typert/registry" }, { "path": "./packages/api/gateway/tsconfig.client.json" }, { "path": "./packages/api/session-controller/tsconfig.client.json" }, + { "path": "./packages/api/session-status" }, { "path": "./packages/api/remote-access/tsconfig.client.json" }, { "path": "./packages/api/workspace-controller/tsconfig.client.json" }, { "path": "./packages/api/remotes/tsconfig.client.json" },