chrome-devtools-mcp-for-extension 0.16.3 → 0.16.5
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.
|
@@ -106,8 +106,11 @@ export function resolveUserDataDir(opts) {
|
|
|
106
106
|
}
|
|
107
107
|
// 4) AUTO: detect by root -> name -> hash
|
|
108
108
|
try {
|
|
109
|
+
console.error(`[profiles] AUTO detection: cwd="${opts.cwd}"`);
|
|
109
110
|
const root = detectProjectRoot(opts.cwd);
|
|
111
|
+
console.error(`[profiles] AUTO detection: root="${root}"`);
|
|
110
112
|
const name = detectProjectName(root);
|
|
113
|
+
console.error(`[profiles] AUTO detection: name="${name}"`);
|
|
111
114
|
const realRoot = realpathSafe(root);
|
|
112
115
|
const hash = shortHash(realRoot);
|
|
113
116
|
const key = `${sanitize(name)}_${hash}_${clientId}`;
|
|
@@ -125,6 +128,7 @@ export function resolveUserDataDir(opts) {
|
|
|
125
128
|
return result;
|
|
126
129
|
}
|
|
127
130
|
catch (e) {
|
|
131
|
+
console.error(`[profiles] AUTO detection FAILED: ${e}`);
|
|
128
132
|
// 5) DEFAULT fallback
|
|
129
133
|
const key = `project-default_${clientId}`;
|
|
130
134
|
const p = projectProfilePath(key, channel);
|
|
@@ -10,7 +10,7 @@ import { ToolCategories } from './categories.js';
|
|
|
10
10
|
import { defineTool } from './ToolDefinition.js';
|
|
11
11
|
import { loadSelectors, getSelector } from '../selectors/loader.js';
|
|
12
12
|
import { CHATGPT_CONFIG } from '../config.js';
|
|
13
|
-
import {
|
|
13
|
+
import { isLoginRequired } from '../login-helper.js';
|
|
14
14
|
/**
|
|
15
15
|
* Path to store chat session data
|
|
16
16
|
*/
|
|
@@ -189,13 +189,16 @@ export const askChatGPTWeb = defineTool({
|
|
|
189
189
|
// Step 1: Navigate to ChatGPT
|
|
190
190
|
response.appendResponseLine('ChatGPTに接続中...');
|
|
191
191
|
await page.goto(CHATGPT_CONFIG.DEFAULT_URL, { waitUntil: 'networkidle2' });
|
|
192
|
-
// Step 2:
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
response.appendResponseLine('
|
|
192
|
+
// Step 2: Check if login is required (don't wait - stop immediately)
|
|
193
|
+
const needsLogin = await isLoginRequired(page);
|
|
194
|
+
if (needsLogin) {
|
|
195
|
+
response.appendResponseLine('\n❌ ChatGPTへのログインが必要です');
|
|
196
|
+
response.appendResponseLine('');
|
|
197
|
+
response.appendResponseLine('📱 ブラウザウィンドウでChatGPTにログインしてください:');
|
|
198
|
+
response.appendResponseLine(' 1. ブラウザウィンドウの「ログイン」ボタンをクリック');
|
|
199
|
+
response.appendResponseLine(' 2. メールアドレスまたはGoogleアカウントでログイン');
|
|
200
|
+
response.appendResponseLine(' 3. ログイン完了後、このツールを再実行してください');
|
|
201
|
+
response.appendResponseLine('');
|
|
199
202
|
return;
|
|
200
203
|
}
|
|
201
204
|
response.appendResponseLine('✅ ログイン確認完了');
|
|
@@ -9,7 +9,7 @@ import z from 'zod';
|
|
|
9
9
|
import { ToolCategories } from './categories.js';
|
|
10
10
|
import { defineTool } from './ToolDefinition.js';
|
|
11
11
|
import { CHATGPT_CONFIG } from '../config.js';
|
|
12
|
-
import {
|
|
12
|
+
import { isLoginRequired } from '../login-helper.js';
|
|
13
13
|
/**
|
|
14
14
|
* Path to store chat session data
|
|
15
15
|
*/
|
|
@@ -673,13 +673,16 @@ export const deepResearchChatGPT = defineTool({
|
|
|
673
673
|
if (needsNewChat) {
|
|
674
674
|
await page.goto(CHATGPT_CONFIG.DEFAULT_URL, { waitUntil: 'networkidle2' });
|
|
675
675
|
}
|
|
676
|
-
//
|
|
677
|
-
const
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
response.appendResponseLine('
|
|
676
|
+
// Check if login is required (don't wait - stop immediately)
|
|
677
|
+
const needsLogin = await isLoginRequired(page);
|
|
678
|
+
if (needsLogin) {
|
|
679
|
+
response.appendResponseLine('\n❌ ChatGPTへのログインが必要です');
|
|
680
|
+
response.appendResponseLine('');
|
|
681
|
+
response.appendResponseLine('📱 ブラウザウィンドウでChatGPTにログインしてください:');
|
|
682
|
+
response.appendResponseLine(' 1. ブラウザウィンドウの「ログイン」ボタンをクリック');
|
|
683
|
+
response.appendResponseLine(' 2. メールアドレスまたはGoogleアカウントでログイン');
|
|
684
|
+
response.appendResponseLine(' 3. ログイン完了後、このツールを再実行してください');
|
|
685
|
+
response.appendResponseLine('');
|
|
683
686
|
return;
|
|
684
687
|
}
|
|
685
688
|
response.appendResponseLine('✅ ログイン確認完了');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-devtools-mcp-for-extension",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.5",
|
|
4
4
|
"description": "MCP server for Chrome extension development with Web Store automation. Fork of chrome-devtools-mcp with extension-specific tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./build/src/index.js",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"start": "npm run build && node build/src/index.js",
|
|
16
16
|
"start-debug": "DEBUG=mcp:* DEBUG_COLORS=false npm run build && node build/src/index.js",
|
|
17
17
|
"diagnose:ui": "echo 'Use diagnose_chatgpt_ui tool via MCP client (Claude Code)'",
|
|
18
|
+
"restart-mcp": "bash scripts/restart-mcp.sh",
|
|
18
19
|
"test": "npm run build && node --require ./build/tests/setup.js --no-warnings=ExperimentalWarning --test-reporter spec --test-force-exit --test \"build/tests/**/*.test.js\"",
|
|
19
20
|
"test:only": "npm run build && node --require ./build/tests/setup.js --no-warnings=ExperimentalWarning --test-reporter spec --test-force-exit --test --test-only \"build/tests/**/*.test.js\"",
|
|
20
21
|
"test:only:no-build": "node --require ./build/tests/setup.js --no-warnings=ExperimentalWarning --test-reporter spec --test-force-exit --test --test-only \"build/tests/**/*.test.js\"",
|