dsh-monkeyai-sessions 0.1.16 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-monkeyai-sessions",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "在 DeepSeek Harness 中读取和继续 MonkeyAI 会话:查看完整对话历史、下发新指令,无缝接续之前在 MonkeyAI 客户端上的工作",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -792,8 +792,12 @@ export class MonkeyAIRemoteService extends TypertRemoteService {
792
792
  newReplayKeysThisConnection = 0
793
793
  const unsubscribeThis = acp.subscribe(event => {
794
794
  if (currentAcp !== acp) return
795
- if (event.params?.sessionId !== selectedSession) return
796
795
  if (event.kind === 'request') {
796
+ const requestSessionId = event.params?.sessionId
797
+ const sessionlessQuestion = requestSessionId === undefined && event.method === 'elicitation/create'
798
+ // elicitation/create follows the MCP request shape and may omit the
799
+ // ACP session id. This socket is already bound to selectedSession.
800
+ if (requestSessionId !== selectedSession && !sessionlessQuestion) return
797
801
  if (pendingRequests.size >= 64) {
798
802
  const reason = new Error('Remote session has too many pending requests')
799
803
  controller.abort(reason)
@@ -809,6 +813,7 @@ export class MonkeyAIRemoteService extends TypertRemoteService {
809
813
  data: event.params,
810
814
  })
811
815
  } else {
816
+ if (event.params?.sessionId !== selectedSession) return
812
817
  if (event.method === '_monkeyai/session/history_changed' && httpHistoryComplete && ticketHttpBase) {
813
818
  // Large live message bodies are persisted instead of streamed as
814
819
  // chunks. Match the desktop client: refresh the newest HTTP pages