search-visibility 1.2.0 → 1.3.0

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.es.md +39 -3
  3. package/README.ja.md +39 -3
  4. package/README.ko.md +47 -10
  5. package/README.md +47 -10
  6. package/README.zh.md +39 -3
  7. package/package.json +2 -1
  8. package/skills/seo-orchestrator/scripts/ai-performance.mjs +107 -0
  9. package/skills/seo-orchestrator/scripts/canonical.mjs +175 -0
  10. package/skills/seo-orchestrator/scripts/command.mjs +6 -0
  11. package/skills/seo-orchestrator/scripts/comparison-pairs.mjs +89 -0
  12. package/skills/seo-orchestrator/scripts/crawl-report.mjs +34 -0
  13. package/skills/seo-orchestrator/scripts/fetch-page.mjs +2 -5
  14. package/skills/seo-orchestrator/scripts/hreflang.mjs +273 -0
  15. package/skills/seo-orchestrator/scripts/html.mjs +7 -80
  16. package/skills/seo-orchestrator/scripts/index-status.mjs +181 -0
  17. package/skills/seo-orchestrator/scripts/indexing.mjs +28 -39
  18. package/skills/seo-orchestrator/scripts/internal-crawl.mjs +16 -46
  19. package/skills/seo-orchestrator/scripts/link-header.mjs +93 -0
  20. package/skills/seo-orchestrator/scripts/mcp.mjs +45 -8
  21. package/skills/seo-orchestrator/scripts/naver-advisor.mjs +147 -0
  22. package/skills/seo-orchestrator/scripts/observations.mjs +42 -8
  23. package/skills/seo-orchestrator/scripts/report-html.mjs +35 -0
  24. package/skills/seo-orchestrator/scripts/report-input.mjs +142 -0
  25. package/skills/seo-orchestrator/scripts/report-sources.mjs +202 -0
  26. package/skills/seo-orchestrator/scripts/robots.mjs +270 -0
  27. package/skills/seo-orchestrator/scripts/scope.mjs +185 -0
  28. package/skills/seo-orchestrator/scripts/search-performance.mjs +1 -1
  29. package/skills/seo-orchestrator/scripts/seo-check.mjs +203 -263
  30. package/skills/seo-orchestrator/scripts/site-audit.mjs +102 -46
  31. package/skills/seo-orchestrator/scripts/structured-data.mjs +316 -0
  32. package/skills/seo-orchestrator/scripts/url-inspection.mjs +150 -0
  33. package/skills/seo-orchestrator/scripts/visibility-comparison.mjs +218 -39
  34. package/skills/seo-orchestrator/scripts/visibility-report.mjs +71 -48
  35. package/skills/seo-orchestrator/scripts/visibility.mjs +53 -50
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # 변경 이력
2
2
 
3
+ ## 1.3.0 (2026-12-02)
4
+
5
+ ### 채널 일치(CLI·MCP·웹·확장)
6
+
7
+ - `AGENTS.md`에 기능 변경은 네 채널에 같은 PR에서 반영한다는 규칙을 추가했습니다. 채널별 범위와 제한은 `docs/channel-parity.md`에 기록합니다.
8
+ - MCP `build_report`: CLI 설정과 같은 항목과 파일 내용으로 `report.json`을 만듭니다. `audit_url`의 페이지 한도는 `audit_site`와 같습니다.
9
+ - 웹(`/import/`)과 확장의 가져오기 화면: Search Console, URL 검사, Google·Bing AI, 네이버, AI 답변·유입 자료로 보고서를 만들고 `report.json` 두 개를 비교합니다. 파일은 브라우저에서만 처리합니다.
10
+ - 모든 채널이 같은 크롤러 28종과 차단 수준을 사용합니다(웹·확장에서 Googlebot 등의 차단은 FAIL). robots.txt는 500KiB까지 읽습니다.
11
+ - 복사하는 확인 명령의 URL을 따옴표로 감싸 셸이 URL의 문자를 명령으로 실행하지 않도록 고쳤습니다.
12
+ - CLI: 다른 출처로 리다이렉트되는 robots.txt를 따라 읽고, `--crawl`은 429를 제외한 4xx를 robots.txt 없음으로 처리합니다. 확인할 수 없는 페이지의 제외 의도는 INFO입니다. `--expect-excluded`를 지정해도 함께 발견한 다른 페이지는 색인 대상으로 점검합니다.
13
+ - 웹: 2MiB를 넘어 잘린 페이지는 "없음" 항목을 미확인으로 표시합니다. 확장: robots.txt와 llms.txt를 페이지 출처에서 읽습니다.
14
+ - `compare` 결과에 비교하지 않은 입력(`notCompared`)을 표시합니다. 사이트 점검 규칙 버전은 3입니다.
15
+
16
+ ### 판정 변경(기존 결과가 달라질 수 있음)
17
+
18
+ - robots.txt를 읽지 못한 경우(429·5xx·타임아웃·네트워크 오류) 웹·확장·CLI가 봇 접근을 **미확인**으로 표시합니다(`decision: "unknown"`, `allowed: null`). 이전 버전의 확장은 미확인 봇의 토글을 표시하지 않습니다.
19
+ - 웹·확장이 CLI와 같은 규칙으로 최종 URL의 경로와 **쿼리**에 robots.txt를 적용합니다. 웹의 404 robots.txt 항목은 WARN에서 INFO로 바뀝니다.
20
+ - 웹의 색인·canonical 상세 자리에 채널명이 표시되던 문제와 hreflang 언어가 비어 보이던 문제를 고쳤습니다. 색인 차단 근거를 점수 위에 표시합니다. 확장의 현재 탭은 응답 헤더를 미관측으로 표시합니다.
21
+ - `compare`는 Search Console 조회 조건과 AI 답변 수집 조건이 확인된 경우에만 증감을 계산합니다. 조건이 없는 이전 보고서는 `delta: null`과 사유를 반환합니다.
22
+ - JSON-LD를 블록별로 판정하며 `{}`는 통과가 아닙니다. Google 필수 속성인 BreadcrumbList `position`·`item`(2개 이상), WebSite `url`을 WARN으로 검사합니다.
23
+ - 웹 API의 `crawlerMatrix`는 판정한 봇만 담고, 미확인 봇은 `crawlerUnverified`로 분리합니다.
24
+ - 사이트 FAIL·WARN 증감은 같은 색인 목표·점검 규칙 버전(`site.ruleset`)이고 robots.txt를 읽었으며 429·5xx 응답이 없을 때만 계산합니다.
25
+ - 웹에서 합쳐진 `X-Robots-Tag` 때문에 대상 봇을 구분할 수 없으면 "대상 범위 미확인"으로 표시합니다.
26
+ - 같거나 겹치는 조회 기간, 행이 없는 Search Console 내보내기, 선언 기간 밖 날짜가 있는 자료는 증감을 비웁니다.
27
+ - 지난 `unavailable_after`는 색인 제외로 판정합니다. 제외를 의도한 페이지를 robots.txt가 막으면 경고합니다.
28
+ - Event 장소를 모두 검사하고 `@id` 참조를 해석합니다. 형식이 깨진 날짜는 FAIL입니다. JSON `structuredData`는 블록별 요약(`checks`에 횟수)을 담습니다.
29
+ - 확장의 canonical 판정은 CLI·웹과 같습니다(상대 경로·중복 WARN, 충돌·빈 값·`<head>` 밖 FAIL).
30
+ - 관측 파일의 `status`가 `failed`·`no-answer`인 레코드는 `answer`·`sources`를 넣으면 오류입니다. 형식이 맞지 않는 `mode`·`region`·`run`은 기록하지 않습니다.
31
+ - 지나치게 많은 canonical·hreflang 선언은 보고서에서 일부만 남기고 생략 수를 표시합니다.
32
+ - `x-default`가 없는 hreflang은 WARN 대신 INFO입니다. HTTP `Link` 헤더 canonical을 인정하고 HTML과 다르면 FAIL입니다.
33
+
34
+ ### 추가
35
+
36
+ - `urlInspection`, `googleAiPerformance`, `bingAiPerformance`, `naverSearchAdvisor` 입력과 HTML·JSON 섹션, 합성 예제.
37
+ - `searchConsole` 객체 형식(조회 조건), 관측 필드 `mode`·`region`·`run`·`status`.
38
+ - `intentionallyExcluded`, `--expect-excluded`, MCP `expectExcluded`·`intentionallyExcluded`, 웹·확장의 제외 의도 체크박스.
39
+ - HTTP `Link` 헤더·XML 사이트맵 hreflang 수집과 자기 참조·반환 링크·충돌·대상 상태 점검.
40
+
41
+ ## 1.2.1 (2026-12-01)
42
+
43
+ - CLI `seo-check.mjs`에 `google-site-verification`, `msvalidate.01`, `theme-color`, `apple-mobile-web-app-title` 및 SNS·메신저 공유 크롤러(`TelegramBot`, `Discordbot`, `facebookexternalhit`, `Twitterbot`, `Slackbot-LinkExpanding`, `LinkedInBot`) 점검을 추가했습니다.
44
+ - Manifest V3 크롬 익스텐션(`extension/`)을 추가했습니다: 현재 탭(`localhost` 포함) 및 드래그 선택한 URL·우클릭 링크 즉시 점검, 16개 크롤러 On/Off 토글 → AI 수정 프롬프트 복사, 헤더 버전 배지(`v1.2.1`) 및 최신 릴리즈 업데이트 안내 버튼 지원.
45
+
3
46
  ## 1.2.0 (2026-12-01)
4
47
 
5
48
  - npm 공식 패키지(`npx search-visibility`) 배포를 지원합니다.
package/README.es.md CHANGED
@@ -38,6 +38,8 @@ npx search-visibility compare before/report.json after/report.json --out compari
38
38
  | Google Search y tráfico IA | CSV multilingüe de Search Console (incluye español y delimitador `;`) + referencias de ChatGPT/Perplexity/Gemini/Claude desde GA4 o logs |
39
39
  | Respuestas IA y competidores | Menciones, citas propias, Share of Voice (SoV), Citation Gaps e intervalos de confianza de Wilson al 95% |
40
40
  | Alertas Webhook y MCP local | Alertas a Discord, Telegram y Slack (`--notify-*` / `--notify-on`), comparación (`compare`) y servidor MCP stdio (`mcp`) |
41
+ | Extensión Chrome (MV3) | Auditoría en 1 clic de la pestaña actual (incluido `localhost`), **URLs seleccionadas al arrastrar** o clic derecho en enlaces con interruptores y prompt IA en [`extension/`](extension/) |
42
+ | Importar y comparar en el navegador y MCP | Las entradas de datos medidos y `compare` de la CLI en la [página web de importación](https://search-visibility.js.org/import/), en la página de importación de la extensión y en la herramienta MCP `build_report`. Los archivos del navegador no se suben |
41
43
 
42
44
  ```sh
43
45
  # Enviar alertas de auditoría a Discord, Telegram o Slack
@@ -60,16 +62,50 @@ Ejecuta `search-visibility https://example.com --crawl --max-pages 40 --lang en`
60
62
  cadenas de redirección, páginas huérfanas del sitemap y problemas en llms.txt, y propón los cambios en el código.
61
63
  ```
62
64
 
65
+ ## Cómo se evalúan los resultados
66
+
67
+ - Las reglas de **robots.txt** se aplican a la ruta y la consulta de la URL final. Si no se puede leer robots.txt (429, 5xx, tiempo de espera o error de red), el acceso de los rastreadores queda **sin verificar** y nunca se muestra como «permitido»: la web y la extensión quitan el interruptor y el prompt de IA no pide cambiar robots.txt. El JSON indica `"decision": "unknown"` y `"allowed": null` (la API web lista esos bots en `crawlerUnverified`, separados de `crawlerMatrix`). Un 404 muestra la base documentada de «sin reglas de restricción».
68
+ - Los **bloqueos de indexación** (`noindex`, `none` o un `unavailable_after` cuya fecha ya pasó, en la meta robots o `X-Robots-Tag`; las fechas que no se pueden interpretar no se evalúan) aparecen encima de la puntuación con el bot afectado, el origen y el valor. Marca las páginas excluidas a propósito con `intentionallyExcluded`, `--expect-excluded` o la casilla de la web y la extensión. La auditoría de la pestaña actual muestra el estado HTTP y las cabeceras como no observados. Si los resultados son muy numerosos, se muestran hasta 50 orígenes de bloqueo y 200 detalles de bloques JSON-LD, con el número de omitidos.
69
+ - **JSON-LD** se evalúa por bloque: error de sintaxis, sin `@type`, falta una propiedad obligatoria, propiedades comprobadas presentes o comprobación detallada no admitida. Aprobar solo cubre las propiedades indicadas.
70
+ - **hreflang** admite declaraciones en HTML, en la cabecera HTTP `Link` o en sitemaps XML; revisa códigos, autorreferencia, enlaces de retorno y conflictos, y marca como sin verificar los destinos fuera de la muestra. La falta de `x-default` es una indicación opcional.
71
+ - **`compare`** etiqueta los resultados de Search Console y de IA como comparables, distintos o sin verificar y deja `delta: null` con los motivos cuando las condiciones difieren o faltan. Search Console requiere propiedad, informe, tipo de búsqueda, agregación, zona horaria, filtros y periodos completos, sin solaparse y de igual duración. Las respuestas de IA se emparejan por pregunta exacta, motor, `mode`, `locale`, `region` y `run`. Los cambios de FAIL/WARN del sitio requieren las mismas páginas, intención y versión de reglas, con robots.txt legible.
72
+ - **El mismo criterio en todos los canales.** La CLI, MCP, la lista web y la extensión comprueban la misma lista de rastreadores con los mismos niveles (por ejemplo, bloquear Googlebot es FAIL), leen los primeros 500 KiB de robots.txt (límite documentado por Google) y entrecomillan la URL en los comandos de verificación copiados. Cuando un canal no puede observar algo, lo indica ([paridad entre canales y límites](docs/channel-parity.md), en inglés). Las entradas que `compare` no compara aparecen en `notCompared`.
73
+
74
+ Detalles (en inglés): [criterios](docs/page-signals.en.md) · [Search Console](docs/search-console.en.md) · [comparación de IA](docs/ai-comparison.en.md) · [URL multilingües](docs/localized-pages.en.md)
75
+
76
+ ## Importa datos medidos de las consolas de búsqueda
77
+
78
+ Todas las entradas son archivos locales que aportas tú; no se inicia sesión en ninguna cuenta. Basta una sola para generar un informe.
79
+
80
+ | Clave de configuración | Entrada | Qué muestra |
81
+ | --- | --- | --- |
82
+ | `urlInspection` | Respuestas guardadas de la API URL Inspection de Google | Canonical actual (HTML y cabecera) frente a la última observación de Google. [Guía](docs/url-inspection.en.md) |
83
+ | `googleAiPerformance` | CSV de rendimiento de IA generativa | Impresiones de IA separadas del total web; clics y CTR como no disponibles. [Guía](docs/google-ai.en.md) |
84
+ | `bingAiPerformance` | Registro JSON de AI Performance | Total Citations y Citation Share por consulta, con sus denominadores. [Guía](docs/bing-ai.en.md) |
85
+ | `naverSearchAdvisor` | Registro JSON de Naver Search Advisor | Errores de rastreo y tendencia, métricas de índice, impresiones y clics web y siguientes revisiones. [Guía](docs/korea-search.en.md) |
86
+
87
+ ```sh
88
+ git clone https://github.com/shaul1991/search-visibility && cd search-visibility
89
+ npm run visibility -- examples/url-inspection/config.json --lang en
90
+ npm run visibility -- examples/google-ai/performance.config.json --lang en
91
+ npm run visibility -- examples/bing-ai/performance.config.json --lang en
92
+ npm run visibility -- examples/korea-search/advisor-blocked.config.json --lang en
93
+ ```
94
+
95
+ La CLI y los informes HTML están disponibles en inglés (`--lang en`) y coreano.
96
+
97
+ **Sin línea de comandos:** abre la [página web de importación](https://search-visibility.js.org/import/) o la página de importación desde la ventana de la extensión. Añade un archivo de configuración con los archivos que nombra, o elige el tipo de cada archivo, para obtener el mismo informe; añade dos `report.json` para compararlos. Los archivos se leen en tu navegador y no se suben. Allí no se auditan las páginas de `targets` ni `sitemap`: ejecuta las auditorías de páginas y la comparación con las URL actuales en la CLI o MCP. Los asistentes de IA pueden pasar la misma configuración y el contenido de los archivos a la herramienta MCP `build_report`.
98
+
63
99
  ## Servidor MCP local
64
100
 
65
- Ejecuta `search-visibility mcp --lang en` con Node.js 18+ (herramientas: `audit_url`, `audit_site`, `compare_reports`, `analyze_observations`).
101
+ Ejecuta `npx -y search-visibility mcp --lang en` con Node.js 18+ (herramientas: `audit_url`, `audit_site`, `build_report`, `compare_reports`, `analyze_observations`).
66
102
 
67
103
  ```json
68
104
  {
69
105
  "mcpServers": {
70
106
  "search-visibility": {
71
- "command": "/abs/path/to/node",
72
- "args": ["/abs/path/to/search-visibility/skills/seo-orchestrator/scripts/visibility.mjs", "mcp", "--lang", "en"]
107
+ "command": "npx",
108
+ "args": ["-y", "search-visibility", "mcp", "--lang", "en"]
73
109
  }
74
110
  }
75
111
  }
package/README.ja.md CHANGED
@@ -38,6 +38,8 @@ npx search-visibility compare before/report.json after/report.json --out compari
38
38
  | Google検索 & AI流入 | Search Console多言語CSV(日本語・英語・韓国語・欧州言語対応)+GA4/アクセスログのAIリファラー集計 |
39
39
  | AI回答観測 & 競合比較 | エンジン別のブランド言及率、自社引用率、競合Share of Voice (SoV)、Citation Gap、Wilson 95%信頼区間 |
40
40
  | Webhook通知 & ローカルMCP | Discord・Telegram・Slack通知 (`--notify-*` / `--notify-on`)、前後差分比較 (`compare`)、ゼロ依存 stdio MCP (`mcp`) |
41
+ | Chrome拡張機能 (MV3) | 現在のタブ(`localhost`含む)や**ドラッグ選択したURL・リンク右クリック**を1クリック診断・クローラーOn/Offトグル・AI修正プロンプトコピー([`extension/`](extension/)) |
42
+ | ブラウザ・MCPでの取り込みと比較 | CLI の実測データ入力と `compare` を、[Webの取り込み画面](https://search-visibility.js.org/import/)、拡張機能の取り込み画面、MCP の `build_report` でも利用可能。ブラウザで選んだファイルはアップロードしません |
41
43
 
42
44
  ```sh
43
45
  # Discord / Telegram / Slack へ診断サマリーを自動通知
@@ -60,16 +62,50 @@ search-visibility https://example.com --crawl --max-pages 40 --lang en を実行
60
62
  リンク切れ(4xx/5xx)・リダイレクトチェーン・サイトマップ孤立ページ・llms.txt の問題箇所をコードベースから特定し修正案を出してください。
61
63
  ```
62
64
 
65
+ ## 判定ルール
66
+
67
+ - **robots.txt** の規則は最終URLのパスとクエリに適用します。robots.txt を読み取れない場合(429・5xx・タイムアウト・ネットワークエラー)、クローラーのアクセスは**未確認**であり「許可」とは表示しません。Webチェックリストと拡張機能はトグルを非表示にし、AIプロンプトも robots.txt の変更を指示しません。JSONは `"decision": "unknown"`、`"allowed": null` です(Web APIはこれらのボットを `crawlerMatrix` ではなく `crawlerUnverified` に入れます)。404 では文書化された「制限規則なし」の根拠を表示します。
68
+ - **インデックス拒否**(robots メタ・`X-Robots-Tag` の `noindex`・`none`・期限を過ぎた `unavailable_after`。解釈できない日付は判定しません)は、対象ボット・出所・指示値とともにスコアの上に表示します。意図的に除外するページは `intentionallyExcluded`、`--expect-excluded`、またはWeb・拡張機能のチェックボックスで指定します。拡張機能の現在タブ診断では HTTP ステータスとヘッダーは未観測と表示します。結果が非常に多い場合は、拒否の根拠を50件、JSON-LD ブロックの詳細を200件まで表示し、省略した件数を示します。
69
+ - **JSON-LD** はブロックごとに、構文エラー、`@type` なし、必須プロパティ不足、検査したプロパティの確認、詳細検査未対応を区別します。合格は列挙したプロパティの範囲のみを意味します。
70
+ - **hreflang** は HTML、HTTP `Link` ヘッダー、XMLサイトマップの宣言を認め、コード・自己参照・戻りリンク・競合を検査します。収集範囲外の対象は未確認、`x-default` の欠如は任意の案内です。
71
+ - **`compare`** は Search Console と AI の結果に比較可能・条件相違・条件未確認を表示し、条件が異なるか欠けていれば理由とともに `delta: null` を返します。Search Console はプロパティ・レポート・検索タイプ・集計単位・タイムゾーン・フィルタと、同じ長さで重ならない完了した期間が必要です。AI回答は質問原文・エンジン・`mode`・`locale`・`region`・`run` が同じものを対にします。サイトの FAIL・WARN の増減は、同じページ・インデックス目標・規則バージョンで robots.txt を読み取れた場合のみ計算します。
72
+ - **すべての経路で同じ判定**を使います。CLI・MCP・Webチェックリスト・拡張機能は同じクローラー一覧を同じレベルで検査し(例: Googlebot のブロックは FAIL)、robots.txt は先頭 500 KiB(Google の文書化された上限)まで読み、コピーする確認コマンドの URL は引用符で囲みます。観測できない項目は画面に表示します([経路ごとの対応範囲と制限](docs/channel-parity.md)、英語)。`compare` が比較しない入力は `notCompared` に一覧表示します。
73
+
74
+ 詳しくは(英語): [判定ルール](docs/page-signals.en.md) · [Search Console](docs/search-console.en.md) · [AI比較](docs/ai-comparison.en.md) · [多言語URL](docs/localized-pages.en.md)
75
+
76
+ ## 検索コンソールの実測データを取り込む
77
+
78
+ いずれもご自身で用意するローカルファイルで、アカウントへのログインはありません。1つの入力だけでもレポートを作成できます。
79
+
80
+ | 設定キー | 入力 | 確認できる内容 |
81
+ | --- | --- | --- |
82
+ | `urlInspection` | 保存した Google URL Inspection API の応答 | 現在の canonical(HTML・ヘッダー)と Google の最後の観測の照合。[ガイド](docs/url-inspection.en.md) |
83
+ | `googleAiPerformance` | 生成AIパフォーマンス CSV | ウェブ合計と分けたAI表示回数。クリックとCTRは提供なし。[ガイド](docs/google-ai.en.md) |
84
+ | `bingAiPerformance` | AI Performance の記録 JSON | Total Citations とクエリ別 Citation Share、それぞれの分母。[ガイド](docs/bing-ai.en.md) |
85
+ | `naverSearchAdvisor` | Naver Search Advisor の記録 JSON | クロールエラーと推移、インデックス指標、ウェブ検索の表示・クリック、次の確認項目。[ガイド](docs/korea-search.en.md) |
86
+
87
+ ```sh
88
+ git clone https://github.com/shaul1991/search-visibility && cd search-visibility
89
+ npm run visibility -- examples/url-inspection/config.json --lang en
90
+ npm run visibility -- examples/google-ai/performance.config.json --lang en
91
+ npm run visibility -- examples/bing-ai/performance.config.json --lang en
92
+ npm run visibility -- examples/korea-search/advisor-blocked.config.json --lang en
93
+ ```
94
+
95
+ CLIとHTMLレポートは英語(`--lang en`)と韓国語に対応しています。
96
+
97
+ **コマンドラインを使わない場合:** [Webの取り込み画面](https://search-visibility.js.org/import/)または拡張機能のポップアップから取り込み画面を開きます。設定ファイルとそれが指すファイルをまとめて追加するか、ファイルごとに種類を選ぶと同じレポートを作成でき、`report.json` を2つ追加すると前後を比較します。ファイルはブラウザ内でのみ読み取り、アップロードしません。この画面は `targets`・`sitemap` のページを診断しないため、ページ診断と現在の URL との照合は CLI か MCP で実行してください。AI ツールからは同じ設定とファイル内容を MCP の `build_report` に渡します。
98
+
63
99
  ## ローカルMCPサーバー設定
64
100
 
65
- Node.js 18+ で `search-visibility mcp --lang en` を起動できます(提供ツール: `audit_url`, `audit_site`, `compare_reports`, `analyze_observations`)。
101
+ Node.js 18+ で `npx -y search-visibility mcp --lang en` を起動できます(提供ツール: `audit_url`, `audit_site`, `build_report`, `compare_reports`, `analyze_observations`)。
66
102
 
67
103
  ```json
68
104
  {
69
105
  "mcpServers": {
70
106
  "search-visibility": {
71
- "command": "/abs/path/to/node",
72
- "args": ["/abs/path/to/search-visibility/skills/seo-orchestrator/scripts/visibility.mjs", "mcp", "--lang", "en"]
107
+ "command": "npx",
108
+ "args": ["-y", "search-visibility", "mcp", "--lang", "en"]
73
109
  }
74
110
  }
75
111
  }
package/README.ko.md CHANGED
@@ -68,6 +68,8 @@ search-visibility --ai-referrals ./examples/ai-referrals/ga4.csv --lang ko
68
68
  | Google 검색 실적 & AI 유입 | Search Console CSV(클릭·노출·CTR) + GA4/서버 로그 AI 엔진 리퍼러 유입 집계 |
69
69
  | AI 답변 관측 & 경쟁사 비교 | 엔진별 브랜드 언급·소유 출처 인용·경쟁사 Share of Voice(SoV)·Citation Gap·Wilson 95% 신뢰구간 |
70
70
  | Webhook 알림 & 로컬 MCP 서버 | Discord·Telegram·Slack 알림(`--notify-*`), 전후 비교(`compare`), Claude·Cursor·Codex용 stdio MCP(`mcp`) |
71
+ | Chrome 익스텐션 (MV3) | 현재 탭(`localhost` 포함) 또는 **드래그 선택한 URL · 링크 우클릭** 1클릭 점검 · 크롤러 On/Off 토글 · AI 수정 프롬프트 복사 ([`extension/`](extension/) 폴더 로드) |
72
+ | 브라우저·MCP 자료 가져오기와 비교 | CLI의 실측 자료 입력과 `compare`를 [웹 가져오기 화면](https://search-visibility.js.org/import/), 확장의 가져오기 화면, MCP `build_report` 도구에서도 사용. 브라우저에서 고른 파일은 업로드하지 않음 |
71
73
 
72
74
  ### Discord · Telegram · Slack 알림 전송
73
75
 
@@ -144,9 +146,41 @@ npx search-visibility http://127.0.0.1:4321 --crawl --fail-on-findings 를 실
144
146
  ### AI 답변 인용 실측
145
147
 
146
148
  1. 퀵스타트의 `search-visibility init`으로 설정을 만들고 `targets`, `brand`, `domains`를 채웁니다. 공유 플랫폼의 내 계정도 집계하려면 `ownedUrlPrefixes`를 지정합니다.
147
- 2. ChatGPT Search, Perplexity, Google AI 개요·AI 모드, 네이버 AI 브리핑, Gemini에서 직접 질문하고 각 답변과 링크를 기록합니다. 엔진·질문·로캘·관측 시각·답변·출처를 `observations` 배열이나 설정 파일 기준 상대 경로의 JSON에 저장합니다. 검색 모드와 지역도 함께 기록해 다음 측정에 재사용하세요.
148
- 3. Search Console 실적을 함께 보려면 내보낸 CSV 경로를 `searchConsole`에 넣습니다. `search-visibility`로 기준 보고서를 만든 뒤 엔진별 관측 수, 브랜드 언급률, 소유 출처 인용률을 확인합니다.
149
- 4. 배포 후 같은 질문·엔진·모드·지역·언어로 답변을 다시 수집합니다. CSV도 같은 필터와 길이의 기간으로 맞춥니다. 새 보고서를 만들고 `search-visibility compare`를 실행합니다. 차이와 함께 표본 수를 확인하세요. 답변 변동은 배포 효과를 단독으로 입증하기 어렵습니다.
149
+ 2. ChatGPT Search, Perplexity, Google AI 개요·AI 모드, 네이버 AI 브리핑, Gemini에서 직접 질문하고 각 답변과 링크를 기록합니다. 엔진·질문·로캘·관측 시각·답변·출처를 `observations` 배열이나 설정 파일 기준 상대 경로의 JSON에 저장합니다. 첫 수집부터 모든 관측에 `mode`·`locale`·`region`(실제 접속 지역)·`run`(반복 회차)을 넣으세요. 전후 비교에는 네 가지가 모두 필요합니다.
150
+ 3. Search Console 실적을 함께 보려면 기준 보고서를 만들기 전에 `searchConsole`을 `file`·`property`·`reportType`·`searchType`·`aggregation`·`timeZone`·`filters`·`period`(`start`, `end`, `complete: true`)를 담은 객체로 지정합니다([필드](docs/search-console.ko.md)). `search-visibility`로 기준 보고서를 만든 뒤 엔진별 관측 수, 브랜드 언급률, 소유 출처 인용률을 확인합니다.
151
+ 4. 배포 후 같은 조건으로 답변을 다시 수집합니다. Search Console은 같은 설정으로, 겹치지 않는 같은 길이의 이후 기간을 내보냅니다. 새 보고서를 만들고 `search-visibility compare`를 실행합니다. 조건이 맞는 항목에만 증감이 표시됩니다. 차이와 함께 표본 수를 확인하세요. 답변 변동은 배포 효과를 단독으로 입증하기 어렵습니다.
152
+
153
+ ## 판정 기준
154
+
155
+ - **robots.txt** 규칙은 최종 URL의 경로와 쿼리에 적용합니다. robots.txt를 읽지 못하면(429·5xx·타임아웃·네트워크 오류) 크롤러 접근은 **미확인**이며 "허용"으로 표시하지 않습니다. 웹 체크리스트와 확장은 토글을 없애고 AI 프롬프트도 robots.txt 변경을 지시하지 않습니다. JSON은 `"decision": "unknown"`, `"allowed": null`입니다(웹 API는 이 봇을 `crawlerMatrix`가 아닌 `crawlerUnverified`에 담습니다). 404는 문서화된 "제한 규칙 없음" 근거를 표시합니다.
156
+ - **색인 차단**(robots 메타·`X-Robots-Tag`의 `noindex`·`none`·날짜가 지난 `unavailable_after`, 해석할 수 없는 날짜는 판정하지 않음)은 대상 봇·출처·지시값과 함께 점수 위에 표시합니다. 의도적으로 제외한 페이지는 `intentionallyExcluded`, `--expect-excluded` 또는 웹·확장 체크박스로 지정합니다. 확장의 현재 탭 점검은 HTTP 상태와 헤더를 미관측으로 표시합니다. 결과가 아주 많으면 차단 근거는 50건, JSON-LD 블록 상세는 200개까지 표시하고 생략한 수를 알립니다.
157
+ - **JSON-LD**는 블록별로 문법 오류, `@type` 없음, 필수 속성 누락, 검사한 속성 확인, 상세 검사 미지원을 구분합니다. 통과는 나열한 속성 범위만 뜻합니다.
158
+ - **hreflang**은 HTML, HTTP `Link` 헤더, XML 사이트맵 선언을 인정하고 코드·자기 참조·반환 링크·충돌을 검사합니다. 수집 범위 밖 대상은 미확인, `x-default` 부재는 선택 안내입니다.
159
+ - **`compare`**는 Search Console과 AI 결과에 비교 가능·조건 다름·조건 미확인을 표시하고, 조건이 다르거나 없으면 사유와 함께 `delta: null`을 반환합니다. Search Console은 속성·보고서·검색 유형·집계 단위·시간대·필터와 길이가 같고 겹치지 않는 완료된 기간이 필요합니다. AI 답변은 질문 원문·엔진·`mode`·`locale`·`region`·`run`이 같은 것끼리 짝짓습니다. 사이트 FAIL·WARN 증감은 같은 페이지·색인 목표·규칙 버전이고 robots.txt를 읽었을 때만 계산합니다.
160
+ - **모든 채널이 같은 판정**을 사용합니다. CLI, MCP, 웹 체크리스트, 확장은 같은 크롤러 목록을 같은 수준으로 점검하고(예: Googlebot 차단은 FAIL), robots.txt는 앞 500KiB(Google 문서의 상한)까지 읽으며, 복사하는 확인 명령의 URL은 따옴표로 감쌉니다. 채널이 관측할 수 없는 항목은 화면에 알립니다([채널 일치 범위와 플랫폼 제한](docs/channel-parity.md)). `compare`가 비교하지 않는 입력은 `notCompared`에 나열합니다.
161
+
162
+ [판정 기준 문서](docs/page-signals.ko.md) · [Search Console 조건](docs/search-console.ko.md) · [AI 전후 비교](docs/ai-comparison.ko.md) · [다국어 URL](docs/localized-pages.ko.md)
163
+
164
+ ## 검색 콘솔 실측 데이터 가져오기
165
+
166
+ 모두 직접 준비한 로컬 파일이며 계정에 로그인하지 않습니다. 한 가지 입력만으로도 보고서를 만들 수 있습니다.
167
+
168
+ | 설정 키 | 입력 | 확인할 수 있는 것 |
169
+ | --- | --- | --- |
170
+ | `urlInspection` | 저장한 Google URL Inspection API 응답 | 현재 canonical(HTML·헤더)과 Google의 마지막 관측 대조. [가이드](docs/url-inspection.ko.md) |
171
+ | `googleAiPerformance` | 생성형 AI 실적 CSV | 웹 합계와 분리한 AI 노출, 클릭·CTR은 미제공. [가이드](docs/google-ai.ko.md) |
172
+ | `bingAiPerformance` | AI Performance 기록 JSON | Total Citations와 질의별 Citation Share, 각 분모. [가이드](docs/bing-ai.ko.md) |
173
+ | `naverSearchAdvisor` | 서치어드바이저 기록 JSON | 수집 오류와 추이, 색인 지표, 웹 검색 노출·클릭, 다음 확인 항목. [가이드](docs/korea-search.ko.md) |
174
+
175
+ ```sh
176
+ git clone https://github.com/shaul1991/search-visibility && cd search-visibility
177
+ npm run visibility -- examples/url-inspection/config.json
178
+ npm run visibility -- examples/google-ai/performance.config.json
179
+ npm run visibility -- examples/bing-ai/performance.config.json
180
+ npm run visibility -- examples/korea-search/advisor-blocked.config.json
181
+ ```
182
+
183
+ **명령줄 없이:** [웹 가져오기 화면](https://search-visibility.js.org/import/)이나 확장 팝업의 가져오기 화면을 엽니다. 설정 파일과 설정이 가리키는 파일을 함께 넣거나 파일마다 종류를 고르면 같은 보고서를 만들고, `report.json` 두 개를 넣으면 전후를 비교합니다. 파일은 브라우저에서만 읽고 업로드하지 않습니다. 이 화면은 `targets`·`sitemap`의 페이지를 점검하지 않으므로 페이지 점검과 현재 URL 대조는 CLI나 MCP에서 실행하세요. AI 도구에서는 같은 설정과 파일 내용을 MCP `build_report`에 전달합니다.
150
184
 
151
185
  ## 플랫폼별 가이드
152
186
 
@@ -155,6 +189,8 @@ npx search-visibility http://127.0.0.1:4321 --crawl --fail-on-findings 를 실
155
189
  | CLI 설정과 실제 데이터 입력 | [한국어](docs/workbench.ko.md) |
156
190
  | Search Console CSV 가져오기 | [한국어](docs/search-console.ko.md) · [English](docs/search-console.en.md) |
157
191
  | 다국어 URL·canonical·hreflang | [한국어](docs/localized-pages.ko.md) · [English](docs/localized-pages.en.md) |
192
+ | robots.txt·색인·JSON-LD 판정 기준 | [한국어](docs/page-signals.ko.md) · [English](docs/page-signals.en.md) |
193
+ | Google URL 검사와 현재 페이지 대조 | [한국어](docs/url-inspection.ko.md) · [English](docs/url-inspection.en.md) |
158
194
  | 네이버·Daum 검색과 네이버 AI 브리핑 | [한국어](docs/korea-search.ko.md) · [English](docs/korea-search.en.md) |
159
195
  | ChatGPT Search 인용과 유입 | [한국어](docs/chatgpt-search.ko.md) · [English](docs/chatgpt-search.en.md) |
160
196
  | Perplexity 모드별 관측 | [한국어](docs/perplexity-search.ko.md) · [English](docs/perplexity-search.en.md) |
@@ -243,7 +279,7 @@ CLI가 집계하는 실적과 답변은 사용자가 제공한 데이터입니
243
279
 
244
280
  HTML과 JSON은 전체·엔진별·브랜드별 언급률과 인용률에 Wilson 95% 신뢰구간을 제공합니다. JSON의 `mentionInterval`과 `citationInterval`은 0~1 범위의 `lower`/`upper` 값을 담습니다. 관측이 없거나 소유 출처를 설정하지 않은 인용률의 구간은 `null`입니다. 표본 신뢰도(`sampleConfidence`)는 답변 수 30개 미만이면 `low`, 30–99개면 `medium`, 100개 이상이면 `high`입니다. 구간은 독립 표본을 가정하며 질문 선택이나 반복 응답의 편향은 반영하지 않습니다.
245
281
 
246
- `search-visibility visibility.config.json --lang ko --out before`를 실행한 후 관측을 갱신하고 `--out after`로 다시 실행하세요. `search-visibility compare before/report.json after/report.json --lang ko --out comparison`으로 양쪽의 인용 격차와 지표 증감을 확인합니다. 브랜드 설정과 질문 수집 조건은 동일하게 유지하세요.
282
+ `search-visibility visibility.config.json --lang ko --out before`를 실행한 후 관측을 갱신하고 `--out after`로 다시 실행하세요. `search-visibility compare before/report.json after/report.json --lang ko --out comparison`으로 양쪽의 인용 격차와 지표 증감을 확인합니다. 비율과 SoV 증감은 브랜드 설정이 같고 모든 답변이 수집 조건으로 짝지어질 때 표시됩니다.
247
283
 
248
284
  ## `llms.txt` 및 `llms-full.txt` 진단
249
285
 
@@ -275,19 +311,20 @@ Node.js 18 이상에서 `search-visibility mcp --lang ko`를 실행합니다.
275
311
 
276
312
  | 도구 | 입력 |
277
313
  | --- | --- |
278
- | `audit_url` | HTTP(S) `url`, 선택 항목 `expectIndexable` |
279
- | `audit_site` | HTTP(S) URL 배열 `targets` 또는 HTTP(S) `sitemap` (함께 지정 가능), 선택 항목 `limit` (1~100, 기본 25) 및 `expectIndexable` |
314
+ | `audit_url` | HTTP(S) `url`, 선택 항목 `expectIndexable` 또는 `expectExcluded` |
315
+ | `audit_site` | HTTP(S) URL 배열 `targets` 또는 HTTP(S) `sitemap` (함께 지정 가능), 선택 항목 `limit` (1~100, 기본 25), `expectIndexable`, `intentionallyExcluded`(URL 배열) |
316
+ | `build_report` | `config`(CLI 설정과 같은 항목)와 `files`(설정이 가리키는 파일의 내용 문자열). 같은 `report.json`을 반환하며 `targets`·`sitemap`은 HTTP(S) URL만 허용 |
280
317
  | `compare_reports` | 전후 `report.json` 파일의 내용을 각각 `before`와 `after` 객체로 전달 |
281
318
  | `analyze_observations` | `observations` 배열, 표본이 있으면 `brand` 필수, 선택 항목 `aliases`, `domains`, `ownedUrlPrefixes`, `competitors` |
282
319
 
283
- Claude Desktop에서는 `claude_desktop_config.json`에 아래 항목을 추가합니다. Cursor에서는 `.cursor/mcp.json`에 같은 항목을 추가하고 서버 객체에 `"type": "stdio"`를 지정합니다. Node 실행 파일과 MCP를 지원하는 체크아웃의 스크립트에 절대 경로를 지정합니다.
320
+ Claude Desktop에서는 `claude_desktop_config.json`에 아래 항목을 추가합니다. Cursor에서는 `.cursor/mcp.json`에 같은 항목을 추가하고 서버 객체에 `"type": "stdio"`를 지정합니다. 저장소를 별도로 클론하지 않아도 `npx`로 npm 공식 패키지를 바로 실행할 수 있습니다.
284
321
 
285
322
  ```json
286
323
  {
287
324
  "mcpServers": {
288
325
  "search-visibility": {
289
- "command": "/abs/path/to/node",
290
- "args": ["/abs/path/to/search-visibility/skills/seo-orchestrator/scripts/visibility.mjs", "mcp", "--lang", "ko"]
326
+ "command": "npx",
327
+ "args": ["-y", "search-visibility", "mcp", "--lang", "ko"]
291
328
  }
292
329
  }
293
330
  }
@@ -296,5 +333,5 @@ Claude Desktop에서는 `claude_desktop_config.json`에 아래 항목을 추가
296
333
  Codex에서는 다음 명령으로 같은 서버를 등록합니다.
297
334
 
298
335
  ```sh
299
- codex mcp add search-visibility -- /abs/path/to/node /abs/path/to/search-visibility/skills/seo-orchestrator/scripts/visibility.mjs mcp --lang ko
336
+ codex mcp add search-visibility -- npx -y search-visibility mcp --lang ko
300
337
  ```
package/README.md CHANGED
@@ -68,6 +68,8 @@ search-visibility --ai-referrals ./examples/ai-referrals/ga4.csv --lang en
68
68
  | Google Search & AI referrals | Search Console CSV (clicks, impressions, CTR) + GA4/access-log AI referral traffic |
69
69
  | AI observations & competitors | Brand mentions, owned citations, competitor Share of Voice (SoV), Citation Gaps, and Wilson 95% intervals |
70
70
  | Webhook alerts & local MCP | Zero-dependency Discord/Telegram/Slack webhook alerts (`--notify-*`), before/after `compare`, and stdio MCP server (`mcp`) |
71
+ | Chrome Extension (MV3) | 1-click audit for the active tab (including `localhost`) or any dragged/selected URL & right-click link in [`extension/`](extension/) with crawler On/Off toggles & AI fix prompt |
72
+ | Import & compare in the browser and MCP | The CLI's measured-data inputs and `compare` on the [web import page](https://search-visibility.js.org/import/), the extension's import page and the MCP `build_report` tool. Browser files are not uploaded |
71
73
 
72
74
  ### Send audit alerts to Discord, Telegram, or Slack
73
75
 
@@ -143,9 +145,41 @@ Find the affected URL and evidence in the report, then verify the public URL wit
143
145
  ### Measure citations in AI answers
144
146
 
145
147
  1. Run `search-visibility init` as shown in Quickstart and fill in `targets`, `brand`, and `domains`. Set `ownedUrlPrefixes` to count citations to your own profiles on shared platforms.
146
- 2. Run your queries in ChatGPT Search, Perplexity, Google AI Overviews or AI Mode, Naver AI Briefing, and Gemini. Record each engine, query, locale, timestamp, answer, and source URLs in `observations` or a JSON file relative to the config. Keep the search mode and region with your notes so you can repeat the same conditions.
147
- 3. To include Google Search performance, point `searchConsole` to the exported CSV. Run `search-visibility` to generate a baseline. Review the sample size, brand mention rate, and owned-source citation rate by engine.
148
- 4. After deployment, repeat the same queries with the same engines, modes, regions, and languages. Use matching CSV filters and date-range lengths. Generate a new report and run `search-visibility compare`. Read the changes alongside sample sizes because answer variation can have several causes.
148
+ 2. Run your queries in ChatGPT Search, Perplexity, Google AI Overviews or AI Mode, Naver AI Briefing, and Gemini. Record each engine, query, locale, timestamp, answer, and source URLs in `observations` or a JSON file relative to the config. From the first run, put `mode`, `locale`, `region` (actual access region) and `run` (repetition number) on every observation; comparisons need all four.
149
+ 3. To include Google Search performance, set `searchConsole` to an object with `file`, `property`, `reportType`, `searchType`, `aggregation`, `timeZone`, `filters` and `period` (`start`, `end`, `complete: true`) before the baseline ([fields](docs/search-console.en.md)). Run `search-visibility` to generate a baseline. Review the sample size, brand mention rate, and owned-source citation rate by engine.
150
+ 4. After deployment, repeat the same queries under the same conditions. Export a later, non-overlapping Search Console period of equal length with matching settings. Generate a new report and run `search-visibility compare`. Changes appear only for matching conditions; read them alongside sample sizes because answer variation can have several causes.
151
+
152
+ ## How results are judged
153
+
154
+ - **robots.txt** rules apply to the final URL's path and query. When robots.txt cannot be read (429, 5xx, timeout, network error), crawler access is **unverified**, never "allowed": the web checklist and extension remove the toggle and the AI prompt asks for no robots.txt changes. JSON reports `"decision": "unknown"` and `"allowed": null` (the web API lists these bots in `crawlerUnverified`, apart from `crawlerMatrix`). A 404 shows the documented "no restriction rules" basis.
155
+ - **Indexing blocks** (`noindex`, `none` or an `unavailable_after` date that has passed, from robots meta or `X-Robots-Tag`; unparseable dates are not judged) appear above the score with the target bot, source and value. Mark intentionally excluded pages with `intentionallyExcluded`, `--expect-excluded` or the web/extension checkbox. The extension's current-tab audit shows HTTP status and headers as unobserved. Very long results are shortened to 50 blocking sources and 200 JSON-LD block details, with the omitted count shown.
156
+ - **JSON-LD** is judged per block: syntax error, no `@type`, missing required property, checked properties present, or detailed check unsupported. A pass covers only the listed properties.
157
+ - **hreflang** accepts declarations in HTML, the HTTP `Link` header or XML sitemaps, checks codes, self and return references and conflicts, and marks targets outside the sample as unverified. A missing `x-default` is optional information.
158
+ - **`compare`** labels Search Console and AI results comparable, different or unverified, and leaves `delta: null` with reasons when conditions differ or are missing. Search Console needs the property, report, search type, aggregation, time zone, filters and completed, non-overlapping periods of equal length. AI answers are paired by exact prompt, engine, `mode`, `locale`, `region` and `run`. Site FAIL/WARN changes require the same pages, intent and rule version with readable robots.txt.
159
+ - **One judgement in every channel.** The CLI, MCP, web checklist and extension check the same crawler list at the same levels (for example, blocking Googlebot is a FAIL), read the first 500 KiB of robots.txt (Google's documented limit) and quote the URL in copied verification commands. Where a channel cannot observe something, it says so ([channel parity and platform limits](docs/channel-parity.md)). Inputs that `compare` does not compare are listed in `notCompared`.
160
+
161
+ [Judgement rules](docs/page-signals.en.md) · [Search Console conditions](docs/search-console.en.md) · [AI comparison](docs/ai-comparison.en.md) · [Localized URLs](docs/localized-pages.en.md)
162
+
163
+ ## Import measured data from search consoles
164
+
165
+ Each input is a local file you provide; nothing signs in to an account. Any one of them is enough to publish a report.
166
+
167
+ | Config key | Input | Shows |
168
+ | --- | --- | --- |
169
+ | `urlInspection` | Saved Google URL Inspection API responses | Current canonical (HTML and header) against Google's last observation. [Guide](docs/url-inspection.en.md) |
170
+ | `googleAiPerformance` | Generative AI performance CSV | AI impressions, kept apart from Web totals; clicks and CTR as not provided. [Guide](docs/google-ai.en.md) |
171
+ | `bingAiPerformance` | AI Performance JSON record | Total Citations and per-query Citation Share with their denominators. [Guide](docs/bing-ai.en.md) |
172
+ | `naverSearchAdvisor` | Search Advisor JSON record | Crawl errors and trends, index metrics, web search impressions and clicks, next checks. [Guide](docs/korea-search.en.md) |
173
+
174
+ ```sh
175
+ git clone https://github.com/shaul1991/search-visibility && cd search-visibility
176
+ npm run visibility -- examples/url-inspection/config.json --lang en
177
+ npm run visibility -- examples/google-ai/performance.config.json --lang en
178
+ npm run visibility -- examples/bing-ai/performance.config.json --lang en
179
+ npm run visibility -- examples/korea-search/advisor-blocked.config.json --lang en
180
+ ```
181
+
182
+ **Without the command line:** open the [web import page](https://search-visibility.js.org/import/) or the import page from the extension popup. Add a config file together with the files it names, or choose a type for each file, to get the same report; add two `report.json` files to compare them. Files are read in your browser and are not uploaded. Pages in `targets` and `sitemap` are not audited there, so run page audits and current-URL comparisons in the CLI or MCP. AI assistants can pass the same config and file contents to the MCP `build_report` tool.
149
183
 
150
184
  ## Platform and workflow guides
151
185
 
@@ -154,6 +188,8 @@ Find the affected URL and evidence in the report, then verify the public URL wit
154
188
  | CLI setup and real data | [한국어](docs/workbench.ko.md) |
155
189
  | Import Search Console CSV | [한국어](docs/search-console.ko.md) · [English](docs/search-console.en.md) |
156
190
  | Localized URLs, canonical, and hreflang | [한국어](docs/localized-pages.ko.md) · [English](docs/localized-pages.en.md) |
191
+ | robots.txt, indexing, and JSON-LD judgement rules | [한국어](docs/page-signals.ko.md) · [English](docs/page-signals.en.md) |
192
+ | Google URL Inspection against the current page | [한국어](docs/url-inspection.ko.md) · [English](docs/url-inspection.en.md) |
157
193
  | Naver and Daum Search, plus Naver AI Briefing | [한국어](docs/korea-search.ko.md) · [English](docs/korea-search.en.md) |
158
194
  | ChatGPT Search citations and referrals | [한국어](docs/chatgpt-search.ko.md) · [English](docs/chatgpt-search.en.md) |
159
195
  | Perplexity observations by search mode | [한국어](docs/perplexity-search.ko.md) · [English](docs/perplexity-search.en.md) |
@@ -242,7 +278,7 @@ Mention rate and citation rate use the number of recorded answers as their denom
242
278
 
243
279
  HTML and JSON include Wilson 95% intervals for mention and citation rates overall, by engine and by tracked brand. JSON fields `mentionInterval` and `citationInterval` contain `lower` and `upper` bounds on a 0–1 scale. Intervals are `null` for empty samples or citations without ownership tracking. The answer-count badge (`sampleConfidence`) is `low` below 30, `medium` at 30–99, and `high` at 100 or more. The intervals assume independent answers. Prompt selection bias and repeated answers can affect coverage.
244
280
 
245
- Run `search-visibility visibility.config.json --lang en --out before` and repeat with updated observations and `--out after`. Run `search-visibility compare before/report.json after/report.json --lang en --out comparison` for both gap lists and metric changes. Keep the tracking definitions and prompt collection conditions consistent.
281
+ Run `search-visibility visibility.config.json --lang en --out before` and repeat with updated observations and `--out after`. Run `search-visibility compare before/report.json after/report.json --lang en --out comparison` for both gap lists and metric changes. Rate and SoV changes appear when the tracking definitions match and every answer pairs on its collection conditions.
246
282
 
247
283
  ## Audit `llms.txt` and `llms-full.txt`
248
284
 
@@ -274,19 +310,20 @@ Run `search-visibility mcp --lang en` with Node.js 18+. The server accepts newli
274
310
 
275
311
  | Tool | Input |
276
312
  | --- | --- |
277
- | `audit_url` | `url` (HTTP or HTTPS), optional `expectIndexable` |
278
- | `audit_site` | `targets` (HTTP or HTTPS URL array) and/or `sitemap` (HTTP or HTTPS URL), optional `limit` (1–100, default 25) and `expectIndexable` |
313
+ | `audit_url` | `url` (HTTP or HTTPS), optional `expectIndexable` or `expectExcluded` |
314
+ | `audit_site` | `targets` (HTTP or HTTPS URL array) and/or `sitemap` (HTTP or HTTPS URL), optional `limit` (1–100, default 25), `expectIndexable` and `intentionallyExcluded` (URL array) |
315
+ | `build_report` | `config` (the CLI config settings) and `files` (each file named in the config, as text). Returns the same `report.json`; `targets` and `sitemap` must be HTTP(S) URLs |
279
316
  | `compare_reports` | `before` and `after`, the contents of two `report.json` files passed as objects |
280
317
  | `analyze_observations` | `observations` array, with `brand` for nonempty samples and optional `aliases`, `domains`, `ownedUrlPrefixes` and `competitors` |
281
318
 
282
- For Claude Desktop, merge this entry into `claude_desktop_config.json`. For Cursor, use the same entry in `.cursor/mcp.json` and add `"type": "stdio"` to the server object. Use absolute paths to Node and the script from a checkout with MCP support.
319
+ For Claude Desktop, merge this entry into `claude_desktop_config.json`. For Cursor, use the same entry in `.cursor/mcp.json` and add `"type": "stdio"` to the server object. No local clone required — `npx` runs the published npm package directly.
283
320
 
284
321
  ```json
285
322
  {
286
323
  "mcpServers": {
287
324
  "search-visibility": {
288
- "command": "/abs/path/to/node",
289
- "args": ["/abs/path/to/search-visibility/skills/seo-orchestrator/scripts/visibility.mjs", "mcp", "--lang", "en"]
325
+ "command": "npx",
326
+ "args": ["-y", "search-visibility", "mcp", "--lang", "en"]
290
327
  }
291
328
  }
292
329
  }
@@ -295,5 +332,5 @@ For Claude Desktop, merge this entry into `claude_desktop_config.json`. For Curs
295
332
  Register the same server in Codex.
296
333
 
297
334
  ```sh
298
- codex mcp add search-visibility -- /abs/path/to/node /abs/path/to/search-visibility/skills/seo-orchestrator/scripts/visibility.mjs mcp --lang en
335
+ codex mcp add search-visibility -- npx -y search-visibility mcp --lang en
299
336
  ```
package/README.zh.md CHANGED
@@ -38,6 +38,8 @@ npx search-visibility compare before/report.json after/report.json --out compari
38
38
  | Google 搜索与 AI 引流 | 多语言 Search Console CSV + GA4/服务器日志中 ChatGPT、Perplexity、Gemini、Claude 引流统计 |
39
39
  | AI 回答与竞品对比 | 品牌提及率、自有来源引用率、竞品声量占比 (SoV)、引用缺口 (Citation Gap) 与 Wilson 95% 置信区间 |
40
40
  | Webhook 通知与本地 MCP | 支持 Discord / Telegram / Slack 告警通知 (`--notify-*` / `--notify-on`)、前后对比 (`compare`) 与本地 stdio MCP (`mcp`) |
41
+ | Chrome 扩展 (MV3) | 一键检测当前标签页(支持 `localhost`)、**划词选中的 URL** 或右键链接,支持爬虫开关与 AI 修复提示词复制(加载 [`extension/`](extension/) 目录) |
42
+ | 浏览器与 MCP 导入和对比 | CLI 的实测数据输入与 `compare` 也可在[网页导入页面](https://search-visibility.js.org/import/)、扩展的导入页面和 MCP 工具 `build_report` 中使用。浏览器中选择的文件不会上传 |
41
43
 
42
44
  ```sh
43
45
  # 将审计结果自动推送到 Discord、Telegram 或 Slack
@@ -60,16 +62,50 @@ search-visibility https://example.org/ --crawl --notify-slack "$SLACK_WEBHOOK_UR
60
62
  找出死链(4xx/5xx)、多跳重定向链、sitemap 孤立页以及 llms.txt 问题,并在代码库中定位修复。
61
63
  ```
62
64
 
65
+ ## 判定规则
66
+
67
+ - **robots.txt** 规则应用于最终 URL 的路径和查询参数。无法读取 robots.txt(429、5xx、超时或网络错误)时,爬虫访问为**未确认**,绝不显示为“允许”:网页清单和扩展会移除开关,AI 提示词也不会要求修改 robots.txt。JSON 中为 `"decision": "unknown"`、`"allowed": null`(网页 API 将这些爬虫放在 `crawlerUnverified`,与 `crawlerMatrix` 分开)。404 会显示文档记载的“无限制规则”依据。
68
+ - **索引阻止**(robots meta 或 `X-Robots-Tag` 中的 `noindex`、`none` 或日期已过的 `unavailable_after`;无法解析的日期不作判定)连同目标爬虫、来源和指令值显示在评分上方。有意排除的页面请用 `intentionallyExcluded`、`--expect-excluded` 或网页与扩展中的复选框标记。扩展检测当前标签页时,HTTP 状态和响应头显示为未观测。结果过多时,最多显示 50 条阻止来源和 200 个 JSON-LD 区块详情,并注明省略数量。
69
+ - **JSON-LD** 按代码块判定:语法错误、缺少 `@type`、缺少必需属性、所检属性存在,或不支持详细检查。通过仅代表所列属性范围。
70
+ - **hreflang** 接受 HTML、HTTP `Link` 响应头或 XML 站点地图中的声明,检查代码、自引用、返回链接和冲突;采集范围外的目标标记为未确认。缺少 `x-default` 仅为可选提示。
71
+ - **`compare`** 为 Search Console 和 AI 结果标注可比较、条件不同或条件未确认;条件不同或缺失时给出原因并返回 `delta: null`。Search Console 需要资源、报告、搜索类型、汇总单位、时区、过滤条件以及长度相同、互不重叠且完整的时间段。AI 回答按原始问题、引擎、`mode`、`locale`、`region` 和 `run` 配对。站点 FAIL/WARN 的增减仅在页面、索引目标和规则版本相同且可读取 robots.txt 时计算。
72
+ - **所有渠道使用同一套判定。** CLI、MCP、网页清单和扩展以相同级别检查同一份爬虫列表(例如屏蔽 Googlebot 为 FAIL),robots.txt 读取前 500 KiB(Google 文档记载的上限),复制的验证命令会为 URL 加引号。某个渠道无法观测的项目会在界面中说明([渠道一致范围与平台限制](docs/channel-parity.md),英文)。`compare` 不对比的输入会列在 `notCompared` 中。
73
+
74
+ 详情(英文):[判定规则](docs/page-signals.en.md) · [Search Console](docs/search-console.en.md) · [AI 对比](docs/ai-comparison.en.md) · [多语言 URL](docs/localized-pages.en.md)
75
+
76
+ ## 导入搜索控制台的实测数据
77
+
78
+ 所有输入都是您自行提供的本地文件,不会登录任何账号。只需其中一项即可生成报告。
79
+
80
+ | 配置键 | 输入 | 可查看内容 |
81
+ | --- | --- | --- |
82
+ | `urlInspection` | 保存的 Google URL Inspection API 响应 | 当前 canonical(HTML 与响应头)与 Google 最近一次观测对照。[指南](docs/url-inspection.en.md) |
83
+ | `googleAiPerformance` | 生成式 AI 效果 CSV | 与网页总量分开显示的 AI 展示次数;点击和点击率标为未提供。[指南](docs/google-ai.en.md) |
84
+ | `bingAiPerformance` | AI Performance 记录 JSON | Total Citations 与各查询的 Citation Share 及其分母。[指南](docs/bing-ai.en.md) |
85
+ | `naverSearchAdvisor` | Naver Search Advisor 记录 JSON | 抓取错误与趋势、索引指标、网页搜索展示与点击、下一步检查项。[指南](docs/korea-search.en.md) |
86
+
87
+ ```sh
88
+ git clone https://github.com/shaul1991/search-visibility && cd search-visibility
89
+ npm run visibility -- examples/url-inspection/config.json --lang en
90
+ npm run visibility -- examples/google-ai/performance.config.json --lang en
91
+ npm run visibility -- examples/bing-ai/performance.config.json --lang en
92
+ npm run visibility -- examples/korea-search/advisor-blocked.config.json --lang en
93
+ ```
94
+
95
+ CLI 和 HTML 报告支持英文(`--lang en`)和韩文。
96
+
97
+ **无需命令行:**打开[网页导入页面](https://search-visibility.js.org/import/),或从扩展弹窗打开导入页面。添加配置文件及其引用的文件,或为每个文件选择类型,即可生成相同的报告;添加两个 `report.json` 即可对比。文件只在浏览器中读取,不会上传。该页面不会检测 `targets` 和 `sitemap` 中的页面,页面检测和与当前 URL 的对照请在 CLI 或 MCP 中运行。AI 助手可将相同的配置和文件内容传给 MCP 工具 `build_report`。
98
+
63
99
  ## 本地 MCP 服务器
64
100
 
65
- 使用 Node.js 18+ 运行 `search-visibility mcp --lang en`(内置工具:`audit_url`、`audit_site`、`compare_reports`、`analyze_observations`)。
101
+ 使用 Node.js 18+ 运行 `npx -y search-visibility mcp --lang en`(内置工具:`audit_url`、`audit_site`、`build_report`、`compare_reports`、`analyze_observations`)。
66
102
 
67
103
  ```json
68
104
  {
69
105
  "mcpServers": {
70
106
  "search-visibility": {
71
- "command": "/abs/path/to/node",
72
- "args": ["/abs/path/to/search-visibility/skills/seo-orchestrator/scripts/visibility.mjs", "mcp", "--lang", "en"]
107
+ "command": "npx",
108
+ "args": ["-y", "search-visibility", "mcp", "--lang", "en"]
73
109
  }
74
110
  }
75
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "search-visibility",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Free, zero-dependency SEO & AI search visibility (GEO) CLI, internal link crawler, local stdio MCP server, and webhook notifier.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -36,6 +36,7 @@
36
36
  "visibility": "node skills/seo-orchestrator/scripts/visibility.mjs",
37
37
  "demo": "node skills/seo-orchestrator/scripts/visibility.mjs examples/demo/config.json",
38
38
  "check": "node skills/seo-orchestrator/scripts/seo-check.mjs",
39
+ "sync:extension": "node scripts/sync-extension.mjs",
39
40
  "test": "node --test tests/*.test.mjs"
40
41
  }
41
42
  }
@@ -0,0 +1,107 @@
1
+ // 검색 콘솔이 제공하는 AI 실적(Google 생성형 AI, Bing AI Performance)을 원본 단위 그대로 읽는다.
2
+ // 제공되지 않은 값은 null이며 0과 구분한다.
3
+ import { t } from "./locale.mjs";
4
+ import { csvCount, openTable, HEADER_NAMES } from "./search-performance.mjs";
5
+ import { SCOPE_KEYS, optionalText, parseFilters, parsePeriod, parseScope, rejectUnknownKeys, requireObject } from "./scope.mjs";
6
+
7
+ const EXTRA_HEADERS = new Map(Object.entries({
8
+ country: ["country", "countries", "국가", "国", "land", "länder", "pays", "país", "países"],
9
+ device: ["device", "devices", "기기", "デバイス", "gerät", "geräte", "appareil", "appareils", "dispositivo", "dispositivos"],
10
+ }).flatMap(([key, names]) => names.map((name) => [name, key])));
11
+ const NOT_PROVIDED = new Set(["", "-", "–", "—", "n/a"]);
12
+
13
+ function columns(fields) {
14
+ const indexes = new Map();
15
+ for (const [index, field] of fields.entries()) {
16
+ const name = field.trim().normalize("NFC").toLowerCase().replace(/\s+/g, " ");
17
+ const key = HEADER_NAMES.get(name) ?? EXTRA_HEADERS.get(name);
18
+ if (!key) continue;
19
+ if (indexes.has(key)) throw new Error(t(`CSV에 ${key} 열이 중복됩니다.`, `Duplicate CSV column: ${key}.`));
20
+ indexes.set(key, index);
21
+ }
22
+ if (indexes.has("clicks")) {
23
+ throw new Error(t("생성형 AI 실적 입력에는 클릭수 열이 없어야 합니다. 클릭수가 있는 일반 검색 실적 CSV는 searchConsole에 지정하세요.",
24
+ "The generative AI performance input must not have a clicks column. Use searchConsole for a Search results CSV with clicks."));
25
+ }
26
+ const dimensions = ["page", "country", "device", "date"].filter((key) => indexes.has(key));
27
+ if (dimensions.length !== 1 || !indexes.has("impressions")) {
28
+ throw new Error(t("생성형 AI 실적 CSV에는 페이지·국가·기기·날짜 중 한 차원과 노출수 열이 필요합니다.",
29
+ "The generative AI performance CSV requires one dimension (page, country, device or date) and an impressions column."));
30
+ }
31
+ return { dimension: dimensions[0], label: indexes.get(dimensions[0]), impressions: indexes.get("impressions") };
32
+ }
33
+
34
+ function count(value, field) {
35
+ if (value === undefined || value === null) return null;
36
+ if (!Number.isSafeInteger(value) || value < 0) throw new Error(t(`${field}에는 0 이상의 정수를 입력하세요.`, `${field} must be a nonnegative integer.`));
37
+ return value;
38
+ }
39
+
40
+ export function parseGoogleAiPerformance(csv, settings = {}) {
41
+ const { totalImpressions, ...scope } = settings;
42
+ const { records, header, indexes } = openTable(csv.replace(/^/, ""), columns);
43
+ const rows = [];
44
+ const labels = new Set();
45
+ let sum = 0;
46
+ let provided = 0;
47
+ for (const { fields, recordNumber } of records) {
48
+ if (fields.length !== header.fields.length) throw new Error(t(`CSV ${recordNumber}번째 레코드의 열 수가 헤더와 다릅니다.`, `CSV record ${recordNumber} has a different number of fields from the header.`));
49
+ const label = fields[indexes.label].trim();
50
+ if (!label || labels.has(label)) throw new Error(t(`CSV ${recordNumber}번째 레코드의 ${indexes.dimension} 값이 비었거나 중복됩니다.`, `CSV record ${recordNumber} has an empty or duplicate ${indexes.dimension} value.`));
51
+ labels.add(label);
52
+ const cell = fields[indexes.impressions];
53
+ const impressions = NOT_PROVIDED.has(cell.trim().toLowerCase()) ? null : csvCount(cell, t("노출수", "Impressions"), recordNumber);
54
+ if (impressions !== null) {
55
+ sum += impressions;
56
+ provided++;
57
+ if (!Number.isSafeInteger(sum)) throw new Error(t("CSV 합계가 안전한 정수 범위를 넘습니다.", "CSV totals exceed the safe integer range."));
58
+ }
59
+ rows.push({ label, impressions });
60
+ }
61
+ rows.sort((a, b) => (b.impressions ?? -1) - (a.impressions ?? -1));
62
+ return {
63
+ source: "google-search-console", surface: "generative-ai-search",
64
+ scope: parseScope(scope, "googleAiPerformance"),
65
+ // 속성 전체 합계(차트)와 표의 행 합계는 집계 범위가 다를 수 있어 따로 보존한다.
66
+ totalImpressions: count(totalImpressions, "googleAiPerformance.totalImpressions"),
67
+ dimension: indexes.dimension, rowCount: rows.length, rowsWithoutImpressions: rows.length - provided,
68
+ rowImpressions: provided ? sum : null, clicks: null, ctr: null, rows,
69
+ };
70
+ }
71
+
72
+ // 원본이 표시한 비율 문자열을 보존한다. 퍼센트로 확정되는 값만 수치로도 기록한다.
73
+ function share(value, field) {
74
+ if (value === undefined || value === null) return { shareText: null, share: null };
75
+ if (typeof value !== "string" || !value.trim()) {
76
+ throw new Error(t(`${field}에는 화면에 표시된 비율 문자열(예: "12.5%")을 입력하세요.`, `${field} must be the rate text shown in the source, such as "12.5%".`));
77
+ }
78
+ const text = value.trim();
79
+ const percent = /^(\d+(?:\.\d+)?)\s*%$/.exec(text);
80
+ const number = percent ? Number(percent[1]) : null;
81
+ if (number !== null && number > 100) throw new Error(t(`${field}는 100% 이하여야 합니다.`, `${field} cannot exceed 100%.`));
82
+ return { shareText: text, share: number === null ? null : number / 100 };
83
+ }
84
+
85
+ export function parseBingAiPerformance(input) {
86
+ requireObject(input, "bingAiPerformance");
87
+ const { totalCitations, citationShare = [], ...scope } = input;
88
+ rejectUnknownKeys(scope, SCOPE_KEYS, "bingAiPerformance");
89
+ if (!Array.isArray(citationShare)) throw new Error(t("bingAiPerformance.citationShare에는 배열을 입력하세요.", "bingAiPerformance.citationShare must be an array."));
90
+ const parsed = parseScope(scope, "bingAiPerformance");
91
+ return {
92
+ source: "bing-webmaster-tools", surface: "ai-performance", scope: parsed,
93
+ totalCitations: count(totalCitations, "bingAiPerformance.totalCitations"),
94
+ citationShare: citationShare.map((entry, index) => {
95
+ const field = `bingAiPerformance.citationShare[${index}]`;
96
+ requireObject(entry, field);
97
+ rejectUnknownKeys(entry, ["groundingQuery", "share", "citations", "period", "filters"], field);
98
+ const groundingQuery = optionalText(entry.groundingQuery, `${field}.groundingQuery`);
99
+ if (!groundingQuery) throw new Error(t(`${field}.groundingQuery를 입력하세요.`, `${field}.groundingQuery is required.`));
100
+ return {
101
+ groundingQuery, citations: count(entry.citations, `${field}.citations`), ...share(entry.share, `${field}.share`),
102
+ period: parsePeriod(entry.period, `${field}.period`) ?? parsed.period,
103
+ filters: parseFilters(entry.filters, `${field}.filters`) ?? parsed.filters,
104
+ };
105
+ }),
106
+ };
107
+ }