friday-mcp-v2 2.0.0 → 2.0.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.
Potentially problematic release.
This version of friday-mcp-v2 might be problematic. Click here for more details.
- package/dist/mcp-server.js +6 -6
- package/dist/wordpress-api.js +1 -1
- package/package.json +1 -1
package/dist/mcp-server.js
CHANGED
|
@@ -1235,7 +1235,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1235
1235
|
return { content: [{ type: "text", text: `✅ Headless モードでは変更は即時保存されています。` }] };
|
|
1236
1236
|
}
|
|
1237
1237
|
|
|
1238
|
-
const result = await client.sendEditorCommand("save_post", {});
|
|
1238
|
+
const result = await client.sendEditorCommand("save_post", {}, 20000);
|
|
1239
1239
|
if (!result)
|
|
1240
1240
|
{ sendFeedback({ tool: name, category: 'error', content: 'タイムアウト: WordPressエディタが応答していません', site: args?.site || 'default' }); }
|
|
1241
1241
|
return { content: [{ type: "text", text: "⏳ タイムアウト: WordPressエディタが応答していません。" }] };
|
|
@@ -1485,7 +1485,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1485
1485
|
});
|
|
1486
1486
|
blocks = result.blocks || [];
|
|
1487
1487
|
} else {
|
|
1488
|
-
const result = await client.sendEditorCommand("get_block_html", { target, index, indices, startIndex, endIndex, section, blockType, typeIndex, headingLevel, headingContains },
|
|
1488
|
+
const result = await client.sendEditorCommand("get_block_html", { target, index, indices, startIndex, endIndex, section, blockType, typeIndex, headingLevel, headingContains }, 20000);
|
|
1489
1489
|
if (!result) {
|
|
1490
1490
|
return errorResponse(name, 'タイムアウト: WordPress側からの応答がありません', args?.site);
|
|
1491
1491
|
}
|
|
@@ -1655,7 +1655,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1655
1655
|
newHTML: finalHTML,
|
|
1656
1656
|
insertOnly: insertOnly || false,
|
|
1657
1657
|
insertPosition,
|
|
1658
|
-
},
|
|
1658
|
+
}, 20000);
|
|
1659
1659
|
if (!result)
|
|
1660
1660
|
{ sendFeedback({ tool: name, category: 'error', content: 'タイムアウト: WordPressエディタが応答していません', site: args?.site || 'default' }); }
|
|
1661
1661
|
return { content: [{ type: "text", text: "⏳ タイムアウト: WordPressエディタが応答していません。" }] };
|
|
@@ -1672,7 +1672,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1672
1672
|
newHTML,
|
|
1673
1673
|
insertOnly: insertOnly || false,
|
|
1674
1674
|
insertPosition,
|
|
1675
|
-
},
|
|
1675
|
+
}, 20000);
|
|
1676
1676
|
if (!result)
|
|
1677
1677
|
{ sendFeedback({ tool: name, category: 'error', content: 'タイムアウト: WordPressエディタが応答していません', site: args?.site || 'default' }); }
|
|
1678
1678
|
return { content: [{ type: "text", text: "⏳ タイムアウト: WordPressエディタが応答していません。" }] };
|
|
@@ -1697,7 +1697,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1697
1697
|
}
|
|
1698
1698
|
|
|
1699
1699
|
// その他のターゲット → 全てWP側で解決&実行
|
|
1700
|
-
const maxWait = (section || blockType || contains) ?
|
|
1700
|
+
const maxWait = (section || blockType || contains) ? 25000 : 20000;
|
|
1701
1701
|
const result = await client.sendEditorCommand("update_blocks", {
|
|
1702
1702
|
index, indices, startIndex, endIndex,
|
|
1703
1703
|
section, blockType, typeIndex, contains,
|
|
@@ -1790,7 +1790,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1790
1790
|
}
|
|
1791
1791
|
|
|
1792
1792
|
// Editor モード
|
|
1793
|
-
const result = await client.sendEditorCommand("table_operations", tableParams,
|
|
1793
|
+
const result = await client.sendEditorCommand("table_operations", tableParams, 20000);
|
|
1794
1794
|
if (!result)
|
|
1795
1795
|
{ sendFeedback({ tool: name, category: 'error', content: 'タイムアウト: WordPressエディタが応答していません', site: args?.site || 'default' }); }
|
|
1796
1796
|
return { content: [{ type: "text", text: "⏳ タイムアウト: WordPressエディタが応答していません。" }] };
|
package/dist/wordpress-api.js
CHANGED
|
@@ -79,7 +79,7 @@ export class FridayWPClient {
|
|
|
79
79
|
* @param {number} maxWaitMs 最大待機時間(ms)
|
|
80
80
|
* @returns {object|null} 結果。タイムアウト時は null
|
|
81
81
|
*/
|
|
82
|
-
async sendEditorCommand(command, params = {}, maxWaitMs =
|
|
82
|
+
async sendEditorCommand(command, params = {}, maxWaitMs = 15000) {
|
|
83
83
|
const { commandId } = await this.request('/editor/command', {
|
|
84
84
|
method: 'POST',
|
|
85
85
|
body: JSON.stringify({ command, params }),
|