bothouse-dsh 0.1.51 → 0.1.53

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.
@@ -133,8 +133,16 @@ export class CliMember {
133
133
  })
134
134
  exited.catch(() => {})
135
135
  this.exited = exited
136
+ // Windows starts the CLI through a shell, which runs even when the CLI or the folder is missing: the ACP
137
+ // stream then closes before the process reports exit/error, and the member showed "ACP connection closed"
138
+ // instead of the install advice (or COLLAB_CLI_START). On a failed handshake, report how the process ended.
139
+ const init = this.conn.initialize({ protocolVersion: acp.PROTOCOL_VERSION, clientCapabilities: {} })
140
+ .catch(error => {
141
+ if (proc.exitCode === null && proc.signalCode === null && proc.pid !== undefined) proc.kill()
142
+ return exited.then(() => { throw error })
143
+ })
136
144
  this.ready = Promise.race([
137
- this.conn.initialize({ protocolVersion: acp.PROTOCOL_VERSION, clientCapabilities: {} }),
145
+ init,
138
146
  exited,
139
147
  ]).then((init) => { this.canLoad = init?.agentCapabilities?.loadSession === true; return init })
140
148
  return this.ready
@@ -69,7 +69,8 @@ const MAX_LOCAL_IMAGE_BYTES = 8 * 1024 * 1024;
69
69
  const MAX_LOCAL_IMAGES = 10;
70
70
  const IMAGE_MIME = { png: 'image/png', jpg: 'image/jpeg', jpeg: 'image/jpeg', gif: 'image/gif', webp: 'image/webp' };
71
71
  // Markdown targets may contain spaces; bare paths end at whitespace or punctuation.
72
- const LOCAL_IMAGE = /!\[([^\]\n]*)\]\((\/[^)\n]+?\.(?:png|jpe?g|gif|webp))\)|(?<![\w/])\/[^\s<>"'`()[\]{},。;,;]+?\.(?:png|jpe?g|gif|webp)(?![\w/])/gi;
72
+ // An absolute path starts with / or, on Windows, a drive (C:\ or C:/): members there write C:\Users\…\shot.png.
73
+ const LOCAL_IMAGE = /!\[([^\]\n]*)\]\(((?:\/|[A-Za-z]:[\\/])[^)\n]+?\.(?:png|jpe?g|gif|webp))\)|(?<![\w/\\:])(?:\/|[A-Za-z]:[\\/])[^\s<>"'`()[\]{},。;,;]+?\.(?:png|jpe?g|gif|webp)(?![\w/\\])/gi;
73
74
 
74
75
  /** Only files physically inside this room's working directory may leave the machine. */
75
76
  export function localImageReply(text, workspacePath, files, logger) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bothouse-dsh",
3
- "version": "0.1.51",
3
+ "version": "0.1.53",
4
4
  "description": "BotHouse channels for DeepSeek Harness: Discord-style rooms where DSH models and local CLIs (Claude Code, Codex, Gemini) are members",
5
5
  "type": "module",
6
6
  "main": "./collab/plugin.mjs",