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 +1 -1
- package/src/providers/codex.js +16 -1
package/package.json
CHANGED
package/src/providers/codex.js
CHANGED
|
@@ -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
|
|
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
|