converse-mcp-server 2.22.0 → 2.22.1

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": "converse-mcp-server",
3
- "version": "2.22.0",
3
+ "version": "2.22.1",
4
4
  "description": "Converse MCP Server - Converse with other LLMs with chat and consensus tools",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -283,7 +283,22 @@ export const codexProvider = {
283
283
  const rawWorkingDirectory = config.server?.client_cwd || process.cwd();
284
284
  // Normalize Windows extended-length paths (\\?\C:\...) to regular paths
285
285
  const workingDirectory = normalizeExtendedPath(rawWorkingDirectory);
286
- const sandboxMode = config.providers?.codexsandboxmode || 'read-only';
286
+ const configuredSandboxMode =
287
+ config.providers?.codexsandboxmode || 'read-only';
288
+ // Auto-elevate read-only sandbox to workspace-write when the prompt opts
289
+ // into image generation via $imagegen — otherwise Codex can't save the
290
+ // generated file. Leave higher modes (workspace-write, danger-full-access)
291
+ // alone so an explicit user choice is never downgraded or escalated.
292
+ const wantsImageGen = /\$imagegen\b/i.test(prompt);
293
+ const sandboxMode =
294
+ wantsImageGen && configuredSandboxMode === 'read-only'
295
+ ? 'workspace-write'
296
+ : configuredSandboxMode;
297
+ if (sandboxMode !== configuredSandboxMode) {
298
+ debugLog(
299
+ '[Codex] $imagegen detected — elevating sandboxMode from read-only to workspace-write so the image file can be written',
300
+ );
301
+ }
287
302
  const skipGitRepoCheck =
288
303
  config.providers?.codexskipgitcheck !== undefined
289
304
  ? config.providers.codexskipgitcheck