html2pptx-local-mcp 1.1.31 → 1.1.32
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/lib/pptx-studio-mcp-core.js +11 -13
- package/package.json +1 -1
|
@@ -443,7 +443,7 @@ export const LOCAL_TOOL_DEFINITIONS = [
|
|
|
443
443
|
},
|
|
444
444
|
openBrowser: {
|
|
445
445
|
type: 'boolean',
|
|
446
|
-
description: '
|
|
446
|
+
description: 'Whether to open the editor in the browser. Defaults to true: the tool opens the correct loopback editor URL itself so you never hand-build it. Set false only if your surface renders the returned editorUrl inline. Never open https://html2pptx.app/edit-slide for local files.',
|
|
447
447
|
},
|
|
448
448
|
reuseExisting: {
|
|
449
449
|
type: 'boolean',
|
|
@@ -754,23 +754,21 @@ export function extractClientInfo(raw) {
|
|
|
754
754
|
* Decide whether html2pptx_open_local_slide_editor should auto-open the OS
|
|
755
755
|
* default browser when the MCP caller did not explicitly set `openBrowser`.
|
|
756
756
|
*
|
|
757
|
-
*
|
|
758
|
-
*
|
|
759
|
-
*
|
|
760
|
-
*
|
|
761
|
-
*
|
|
762
|
-
*
|
|
757
|
+
* Default to auto-open for every client. Local file editing inherently needs a
|
|
758
|
+
* browser on the user's own machine, and the tool already opens the correct
|
|
759
|
+
* loopback editor URL itself. The previous conservative allowlist left
|
|
760
|
+
* non-CLI clients on a "return URL only" path, where agents tend to hand-build
|
|
761
|
+
* the editor URL and substitute the hosted `https://html2pptx.app/edit-slide`
|
|
762
|
+
* origin -- which can never reach a localhost bridge (mixed-content + CORS) and
|
|
763
|
+
* lands the user on the bridge error page. Auto-opening removes that failure
|
|
764
|
+
* mode. Callers with their own inline render surface can still opt out with an
|
|
765
|
+
* explicit `openBrowser: false`.
|
|
763
766
|
*
|
|
764
767
|
* @param {{ name?: string } | null | undefined} clientInfo
|
|
765
768
|
* @returns {boolean}
|
|
766
769
|
*/
|
|
767
770
|
export function inferOpenBrowserDefault(clientInfo) {
|
|
768
|
-
|
|
769
|
-
if (!rawName) return false;
|
|
770
|
-
if (/^claude[\s\-_]?code/.test(rawName)) return true;
|
|
771
|
-
if (/^codex(?:[\s\-_]|$)/.test(rawName)) return true;
|
|
772
|
-
if (/[\-_]cli$/.test(rawName)) return true;
|
|
773
|
-
return false;
|
|
771
|
+
return true;
|
|
774
772
|
}
|
|
775
773
|
|
|
776
774
|
/**
|