diff --git a/README.ja.md b/README.ja.md index 38ea9eb..5acec83 100644 --- a/README.ja.md +++ b/README.ja.md @@ -34,7 +34,7 @@ curl --fail --get 'http://127.0.0.1:29483/search' \ --data 'format=json' --data 'max_results=5' ``` -結果にはタイトル、URL、抜粋、検索元などの情報が含まれます。必要に応じて`language=ja`、`engines=wikipedia`、`include_domains=docs.rs`、`exclude_domains=example.com`、`time_range=day`、`include_raw_content=1`を指定できます。期間指定の精度は検索元によって異なります。 +結果にはタイトル、URL、抜粋、検索元などの情報が含まれます。未知の検索元指定をエラーにしたい場合は`strict_engines=1`を加えます(既定ではSearXNG互換のフォールバック動作を維持します)。必要に応じて`language=ja`、`engines=wikipedia`、`include_domains=docs.rs`、`exclude_domains=example.com`、`time_range=day`、`include_raw_content=1`を指定できます。期間指定の精度は検索元によって異なります。 ブラウザーからはを開いてください。JSON以外にCSV、RSS、HTMLでも結果を取得できます。 @@ -51,7 +51,7 @@ MCPには読み取り専用のツールが2つあります。 - `search`:検索結果を順位順に返します。既定は5件、最大10件です。抜粋は1件500文字までです。 - `read_page`:同じセッションの`search`が返したURLから本文を取得します。`query`を指定すると、取得済みのページ全体から関連する文章を最大3件選びます。 -`read_page`の既定の本文長は4,000文字で、`max_chars`は最大20,000まで指定できます。`offset`と`next_offset`を使えば続きも読めます。情報が省略されたかは`truncated`と`source_truncated`で確認できます。応答には文字数・バイト数の上限がありますが、トークン数を厳密に制限する機能ではありません。 +`read_page`の既定の本文長は4,000文字で、`max_chars`は最大20,000まで指定できます。`offset`と`next_offset`を使えば続きも読めます。情報が省略されたかは`truncated`と`source_truncated`で確認できます。文字数・バイト数の上限に加え、`tokenizer`(`cl100k_base`または`o200k_base`)と`max_payload_tokens`の両方を指定すると、MCPの`structuredContent`に対するトークン上限を適用できます。JSON-RPCの外枠や呼び出し側のプロンプトは計数対象外です。[出力の仕様](docs/AGENT-OUTPUT.md)を参照してください。 本文取得では接続先とリダイレクトを検査し、プライベートIPへの接続を拒否します。robots.txt(RFC 9309)にも従います。MCPから任意のURLを直接取得することはできません。取得したWebページはAIへの指示ではなく、外部の情報として扱ってください。 @@ -66,14 +66,14 @@ HTTP APIでは`include_raw_content=1`で本文を取得できます。PDFの文 | 構成 | コマンド | 検索先 | | --- | --- | --- | | Standard | `rustxng` | 取得先と用途の条件を記録したキー不要の34エントリと自前索引 | -| Clean | `rustxng --profile clean` | 外部の検索に依存しない。自前の索引(クロール索引とWikipediaダンプ索引)だけが情報源 | +| Clean | `rustxng --profile clean` | 構築済みのクロール索引とWikipediaダンプ索引だけを検索。外部検索プロバイダーには問い合わせない | | Full | `rustxng --profile full` | 利用規約の制限や許可が未確認のHTML検索先も含む構成。有料のExa Searchも追加(`EXA_API_KEY`が無いときは起動時に読み飛ばす) | Fullは利用許可を不要にする機能ではありません。個人利用やLAN内での運用でも検索元の規約が適用されます。必要な許可や契約を確認できない検索先は有効にしないでください。Cleanも法的な適合性を保証するものではありません。 -MCPでも`rustxng mcp --profile clean`のように指定できます。検索元によってはAPIキーや料金が必要です。RustXNGをローカルで動かしても、検索語は選択した外部サービスへ送信されます。 +MCPでも`rustxng mcp --profile clean`のように指定できます。StandardとFullでは、有効な外部検索元へ検索語を送信します。Cleanの検索対象はローカル索引だけですが、明示的に本文取得などを有効にした場合は外部通信が発生し得ます。FullのExa連携は有料で、キーを設定しただけではStandardで有効になりません。 -Standardでは未確認の検索元をすべて既定無効にしました。確認範囲は記録した取得用途で、原著作物のライセンス・クォータ・運用目的の条件は残ります。キーが存在するだけではAPIを有効にしません。[今回の測定と設定方法](docs/ISSUE-RESOLUTION-2026-11-05.md)を参照してください。 +Standardでは未審査の検索元を既定無効にしています。ただし、監査は記録された取得用途についての確認であり、商用利用、本文の保存・再配布、クォータなどすべての条件に対する許諾ではありません。[検索元の条件](docs/PROVIDERS.md)と[測定記録](docs/ISSUE-RESOLUTION-2026-11-05.md)を参照してください。 ## 導入と設定 @@ -87,13 +87,18 @@ docker run --rm -p 127.0.0.1:29483:29483 \ 既定ではローカル接続のみを受け付けます。外部へ公開するときは認証やアクセス制限を設定してください。 -設定はバイナリに含まれています。変更したい項目だけをTOMLファイルに書いて指定できます。 +既定の設定はバイナリに含まれています。例えば`my-settings.toml`を作り、必要な項目だけを記載します。 + +```toml +[server] +idle_timeout = 600 +``` ```bash -rustxng --config settings.toml +rustxng --config my-settings.toml ``` -設定ファイルは選択したプロファイルを上書きします。意図せず上書きしないよう、既定設定を丸ごとコピーするのは避けてください。 +利用者の設定は選択したプロファイルに重ねて適用します。意図しない検索元の上書きを避けるため、同梱設定を丸ごとコピーしないでください。 更新確認は`rustxng --check-update`、対応するバイナリの更新は`rustxng --update`です。パッケージ管理やDockerで導入した場合は、それぞれの方法で更新してください。 @@ -101,9 +106,9 @@ rustxng --config settings.toml ## 検索精度について -[2026年11月4日の比較](docs/COMPARISON-2026-11-04.md)では、技術文書100問とSealQA 254問で3つの構成を測定しています。技術文書100問のHit@10は、Standardが88、Cleanが61、Fullが98でした。測定時にはローカルの索引を使用しています。 +[11月4日の比較](docs/COMPARISON-2026-11-04.md)は旧構成の記録であり、v0.30.0の性能測定ではありません。検索元を見直した後の[11月5日のStandard測定](docs/ISSUE-RESOLUTION-2026-11-05.md)では、技術文書100問のHit@5が**67〜69/100**でした。変更前構成の84/100から低下しています。一方、ローカル索引専用となったCleanでは、[保存済みのSealQA測定](docs/CLEAN-PROFILE.md)でHit@10が**85/254**、応答時間の中央値が42.7msでした。評価対象が異なるため、両者を直接比較することはできません。 -これは正解ページが検索結果に含まれる割合であり、AIの回答正解率ではありません。評価用の質問は開発中の調整にも使われており、索引対象には設問と関連する文書サイトが含まれます。他社APIの保存済み結果とも測定日時が異なります。この数値だけで一般的な検索性能の優劣は判断できません。 +いずれも参照ページへの到達率であり、AIの回答正解率ではありません。評価用の質問は開発中の調整にも使われており、索引には関連する文書サイトが含まれます。他社APIの保存済み結果も同時測定ではありません。**これらをv0.30.0の再測定値や、一般的な検索性能の優劣として扱わないでください。** ## 関連ドキュメント diff --git a/README.ko.md b/README.ko.md index f1797c0..bd6c924 100644 --- a/README.ko.md +++ b/README.ko.md @@ -34,7 +34,7 @@ curl --fail --get 'http://127.0.0.1:29483/search' \ --data 'format=json' --data 'max_results=5' ``` -결과에는 제목, URL, 발췌문, 검색 제공자 정보가 포함됩니다. `language=ja`, `engines=wikipedia`, `include_domains=docs.rs`, `exclude_domains=example.com`, `time_range=day`, `include_raw_content=1` 등의 매개변수를 사용할 수 있습니다. 기간 필터의 정확도는 제공자마다 다릅니다. +결과에는 제목, URL, 발췌문, 검색 제공자 정보가 포함됩니다. 알 수 없는 검색 엔진 이름을 오류로 처리하려면 `strict_engines=1`을 지정하세요. 기본값은 SearXNG 호환 폴백 동작을 유지합니다. `language=ja`, `engines=wikipedia`, `include_domains=docs.rs`, `exclude_domains=example.com`, `time_range=day`, `include_raw_content=1` 등의 매개변수를 사용할 수 있습니다. 기간 필터의 정확도는 제공자마다 다릅니다. 브라우저 화면은 에 있습니다. JSON 외에 CSV, RSS, HTML 출력도 지원합니다. @@ -51,7 +51,7 @@ MCP는 읽기 전용 도구 두 개를 제공합니다. - `search`: 정렬된 검색 결과를 반환합니다. 기본 5개, 최대 10개이며 발췌문은 결과당 500자로 제한됩니다. - `read_page`: 같은 세션에서 `search`가 반환한 URL의 본문을 읽습니다. `query`를 지정하면 추출된 페이지 전체에서 관련 문장 최대 3개를 선택합니다. -`read_page`는 기본 4,000자를 반환하고 `max_chars`로 최대 20,000자를 지정할 수 있습니다. `offset`과 `next_offset`으로 이어서 읽을 수 있으며, `truncated`와 `source_truncated`로 생략 여부를 확인할 수 있습니다. 응답의 문자 수와 바이트 수는 제한하지만 모델별 토큰 수를 정확하게 제한하지는 않습니다. +`read_page`는 기본 4,000자를 반환하고 `max_chars`로 최대 20,000자를 지정할 수 있습니다. `offset`과 `next_offset`으로 이어서 읽을 수 있으며, `truncated`와 `source_truncated`로 생략 여부를 확인할 수 있습니다. 문자 및 바이트 제한 외에 `tokenizer`(`cl100k_base` 또는 `o200k_base`)와 `max_payload_tokens`를 함께 지정하면 직렬화된 MCP `structuredContent`에 토큰 제한을 적용할 수 있습니다. JSON-RPC 외피와 클라이언트 또는 모델의 프롬프트 구성은 계산에 포함되지 않습니다. [출력 계약](docs/AGENT-OUTPUT.md)을 참조하세요. 페이지를 읽을 때 대상 주소와 리디렉션을 검사해 비공개 IP 연결을 차단하고 robots.txt(RFC 9309)를 준수합니다. MCP에서는 임의의 URL을 바로 읽을 수 없습니다. 검색 결과와 본문은 지시문이 아닌 신뢰할 수 없는 외부 데이터로 취급해야 합니다. @@ -64,14 +64,14 @@ HTTP API는 `include_raw_content=1`로 본문을 가져올 수 있습니다. PDF | 프로필 | 명령 | 검색 원천 | | --- | --- | --- | | Standard | `rustxng` | 엔드포인트·사용 조건을 기록한 키 없는 항목 34개와 로컬 색인 | -| Clean | `rustxng --profile clean` | 외부 검색에 의존하지 않음. 자체 색인(크롤 색인과 Wikipedia 덤프 색인)만 정보원 | +| Clean | `rustxng --profile clean` | 미리 만든 크롤 및 Wikipedia 덤프 색인만 검색. 외부 검색 제공자에 요청하지 않음 | | Full | `rustxng --profile full` | 자동 접근 제한 또는 허가가 확인되지 않은 HTML 검색 제공자도 포함. 유료 Exa Search도 추가(`EXA_API_KEY`가 없으면 시작 시 건너뜀) | **Full을 사용해도 제공자 약관을 우회할 수 없습니다.** 필요한 허가를 확인하지 못한 제공자는 활성화하지 마세요. 개인용 서버도 이용 약관을 따라야 합니다. Clean 프로필 역시 법적 적합성을 보증하지 않습니다. -MCP에서도 `rustxng mcp --profile clean`처럼 선택할 수 있습니다. 일부 API 제공자는 키나 요금을 요구합니다. RustXNG를 로컬에서 실행해도 검색어는 활성화한 외부 제공자로 전송됩니다. +MCP에서도 `rustxng mcp --profile clean`처럼 선택할 수 있습니다. Standard와 Full은 활성화된 외부 제공자에게 검색어를 보냅니다. Clean은 로컬 색인만 검색하지만 본문 가져오기 같은 네트워크 기능을 명시적으로 요청하면 외부 통신이 발생할 수 있습니다. Full의 Exa 통합은 유료이며 API 키가 있다는 이유만으로 Standard에서 활성화되지 않습니다. -Standard는 검토하지 않은 제공자를 모두 기본 비활성화합니다. 검토 범위는 기록된 검색 용도이며 콘텐츠 라이선스, 할당량과 배포 목적의 조건은 계속 적용됩니다. 키가 존재하는 것만으로 API를 활성화하지 않습니다. [현재 측정 및 설정](docs/ISSUE-RESOLUTION-2026-11-05.md)을 참고하세요. +Standard는 미검토 검색 제공자를 기본 비활성화합니다. 다만 검토는 기록된 검색 용도에 한정되며 상업적 이용, 원문 저장 및 재배포, 이용량 제한까지 일괄 허가하는 것은 아닙니다. [제공자별 조건](docs/PROVIDERS.md)과 [측정 기록](docs/ISSUE-RESOLUTION-2026-11-05.md)을 참고하세요. ## 설치와 설정 @@ -85,13 +85,18 @@ docker run --rm -p 127.0.0.1:29483:29483 \ 기본 설정은 로컬 접속만 받습니다. 외부에 공개한다면 인증과 접근 제어를 별도로 설정하세요. -기본 설정은 바이너리에 포함되어 있습니다. 필요한 항목만 TOML 파일에 작성해 덮어쓸 수 있습니다. +기본 설정은 바이너리에 포함되어 있습니다. 예를 들어 `my-settings.toml` 파일에 변경할 항목만 작성하세요. + +```toml +[server] +idle_timeout = 600 +``` ```bash -rustxng --config settings.toml +rustxng --config my-settings.toml ``` -사용자 설정 파일은 선택한 프로필을 덮어쓰므로 전체 기본 설정을 복사할 때는 주의하세요. +사용자 설정은 선택한 프로필 위에 적용됩니다. 의도하지 않은 검색 제공자 변경을 피하려면 전체 기본 설정을 복사하지 마세요. `rustxng --check-update`로 업데이트를 확인하고, 지원되는 바이너리 설치에서는 `rustxng --update`를 사용할 수 있습니다. 컨테이너나 패키지 관리자로 설치했다면 원래의 업데이트 방법을 사용하세요. @@ -99,9 +104,9 @@ rustxng --config settings.toml ## 검색 품질과 제한 -[2026년 11월 4일 비교](docs/COMPARISON-2026-11-04.md)는 기술 문서 100개 질문과 SealQA 254개 질문으로 세 프로필을 측정했습니다. 기술 문서의 Hit@10은 Standard 88, Clean 61, Full 98이었습니다. 측정 환경에는 로컬 색인이 포함되었습니다. +[11월 4일 비교](docs/COMPARISON-2026-11-04.md)는 이전 프로필의 기록이며 v0.30.0을 다시 측정한 결과가 아닙니다. 제공자 권한 검토 후의 [11월 5일 Standard 기록](docs/ISSUE-RESOLUTION-2026-11-05.md)에서는 기술 문서 100개 질문의 Hit@5가 **67~69/100**으로, 이전 구성의 84/100보다 낮았습니다. 로컬 색인 전용 Clean은 [SealQA 기록](docs/CLEAN-PROFILE.md)에서 Hit@10 **85/254**, 응답 시간 중앙값 42.7ms를 보였습니다. 두 실험의 데이터셋이 달라 직접 비교할 수 없습니다. -이는 정답으로 지정한 페이지를 검색 결과에서 찾은 비율이지 AI 답변의 정확도가 아닙니다. 평가 질문을 개발 과정에서도 사용했으며, 로컬 색인에는 평가에 관련된 문서 사이트가 포함되어 있습니다. 다른 검색 API와의 저장된 비교 결과 역시 측정 시점이 다릅니다. 이 수치만으로 일반적인 우열을 판단할 수 없습니다. +이 지표는 참조 페이지 검색 성공률이지 AI 답변의 정확도가 아닙니다. 질문 집합은 개발에도 사용되었고 관련 문서 사이트가 로컬 색인에 포함되어 있으며, 외부 API 결과도 동시 측정한 값이 아닙니다. 이러한 수치를 v0.30.0의 검증된 성능이나 일반적인 우위로 주장해서는 안 됩니다. ## 문서 diff --git a/README.md b/README.md index 19be448..7c1ab3a 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ curl --fail --get 'http://127.0.0.1:29483/search' \ --data 'format=json' --data 'max_results=5' ``` -Results contain a title, URL, snippet and source metadata. Useful optional parameters include `language=ja`, `engines=wikipedia`, `include_domains=docs.rs`, `exclude_domains=example.com`, `time_range=day`, and `include_raw_content=1`. Time filtering depends on provider support. +Results contain a title, URL, snippet and source metadata. For automated clients that need errors for unknown engine names, add `strict_engines=1` (the default preserves SearXNG-compatible fallback behavior). Useful optional parameters include `language=ja`, `engines=wikipedia`, `include_domains=docs.rs`, `exclude_domains=example.com`, `time_range=day`, and `include_raw_content=1`. Time filtering depends on provider support. The web interface is at . The search endpoint also supports CSV, RSS and HTML output. @@ -49,7 +49,7 @@ MCP exposes two read-only tools: - `search` returns up to 10 ranked results. The default is 5, with snippets limited to 500 characters. - `read_page` retrieves text from a URL returned by `search` in the same session. It can return up to three passages relevant to an optional `query`, selected from the extracted page. -`read_page` returns 4,000 characters by default and allows `max_chars` up to 20,000. Use `offset` and `next_offset` to continue. `truncated` and `source_truncated` indicate limits. MCP enforces serialized character and byte budgets. Supply `tokenizer` and `max_payload_tokens` to apply an exact encoding-specific limit. [Output contract](docs/AGENT-OUTPUT.md) +`read_page` returns 4,000 characters by default and allows `max_chars` up to 20,000. Use `offset` and `next_offset` to continue. `truncated` and `source_truncated` indicate limits. MCP enforces serialized character and byte budgets. Supply both `tokenizer` (`cl100k_base` or `o200k_base`) and `max_payload_tokens` for an exact budget on serialized MCP `structuredContent`; this does **not** include the JSON-RPC envelope or client/model framing. [Output contract](docs/AGENT-OUTPUT.md) Page fetching checks destinations and redirects for non-public addresses and follows robots.txt (RFC 9309). It does not accept arbitrary URLs through MCP. Treat all returned web text as untrusted content. @@ -64,14 +64,14 @@ Choose a provider configuration with `--profile`. The default is `standard`. | Profile | Command | Sources | | --- | --- | --- | | Standard | `rustxng` | 34 keyless entries with recorded endpoint/use conditions, plus local indexes | -| Clean | `rustxng --profile clean` | No external search at all: only our own indexes (the crawl index and the Wikipedia dump index) | +| Clean | `rustxng --profile clean` | Search only prebuilt local crawl and Wikipedia-dump indexes; no external search-provider requests | | Full | `rustxng --profile full` | Additional HTML providers, including sources with restrictive or unverified automation terms, plus billed Exa Search (skipped at startup when `EXA_API_KEY` is absent) | **Full is not a permission bypass.** Do not enable a provider without the permissions required for your use. A private instance does not override provider terms. Clean is a configuration choice, not a certification of legal compliance. -The selected profile also works with MCP, for example `rustxng mcp --profile clean`. Optional API-backed providers may require keys and incur charges. Search queries are sent to the enabled external providers even when RustXNG runs locally. +The selected profile also works with MCP, for example `rustxng mcp --profile clean`. Standard and Full send queries to their enabled external providers even when RustXNG runs locally. Clean searches local indexes only, but explicitly requested raw page fetching or other network-backed features can still make outbound requests. Full's Exa integration is opt-in and billed; an API key alone does not enable Exa in Standard. -Standard now excludes every unreviewed enabled source. Reviews cover the recorded retrieval scope; source licences, quotas and deployment purposes still apply. The API profile never activates merely because a key exists. See the [current measurements and setup](docs/ISSUE-RESOLUTION-2026-11-05.md). +Standard excludes unreviewed providers from its defaults. Reviews apply to the documented retrieval scope, **not** every commercial use, content licence, storage policy or redistribution scenario. See [provider conditions](docs/PROVIDERS.md) and [dated measurements](docs/ISSUE-RESOLUTION-2026-11-05.md). ## Installation and configuration @@ -85,21 +85,26 @@ docker run --rm -p 127.0.0.1:29483:29483 \ By default, the service binds to loopback. Exposing it to another network requires appropriate access controls. -Settings are embedded. Provide only overrides in a TOML file: +Settings are embedded. To override a value, create a small `my-settings.toml`, for example: + +```toml +[server] +idle_timeout = 600 +``` ```bash -rustxng --config settings.toml +rustxng --config my-settings.toml ``` -An explicit settings file overrides the chosen profile, so avoid copying the entire default file unless that is intentional. Use `rustxng --check-update` to check for a release or `rustxng --update` for a supported binary installation. For managed packages and containers, use the original installation method. +A custom settings file is layered over the selected profile; avoid copying all shipped settings or adding an unintended engine override. Use `rustxng --check-update` to check for a release or `rustxng --update` for a supported binary installation. For managed packages and containers, use the original installation method. The `/healthz` endpoint checks the process, not the availability of upstream providers. Use a real JSON search to verify that results are returned. Runtime metrics are exposed at `/stats` and `/metrics`. ## Search quality and limitations -The [November 4, 2026 comparison](docs/COMPARISON-2026-11-04.md) measures Standard, Clean and Full on 100 documentation questions and 254 SealQA questions. For example, the documentation set measured Hit@10 of 88, 61 and 98 respectively, with the local index used in the recorded environment. +The [November 4 comparison](docs/COMPARISON-2026-11-04.md) covers **older** search profiles and is not a benchmark of v0.30.0. After provider permission changes, the [November 5 Standard runs](docs/ISSUE-RESOLUTION-2026-11-05.md) recorded Hit@5 of **67–69/100**, down from the earlier configuration's 84/100 on the same documentation question set. The newer *offline-only* Clean profile reached **85/254 Hit@10** on SealQA with a 42.7 ms median in its [recorded run](docs/CLEAN-PROFILE.md). These are different datasets and cannot be ranked against each other. -These are reference-page retrieval results, **not the accuracy of generated AI answers**. The benchmark sets informed development, the local index overlaps with tested documentation sites, and stored Exa/Tavily results were not collected at the same time. Do not treat those scores as universal rankings or current guarantees. +All figures measure whether a reference page was retrieved, **not the accuracy of generated AI answers**. The question sets informed development, some indexes cover relevant documentation sites, and comparisons to stored commercial API results were not simultaneous or held out. These dated experiments are not guaranteed v0.30.0 performance. Do not infer general superiority over Exa or Tavily. ## Documentation diff --git a/SECURITY.md b/SECURITY.md index dd4710e..bc78a03 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -42,6 +42,8 @@ reach the private destination, including after redirects; no external DNS servic ## Dependency checks +The current v0.30.0 lockfile no longer includes `basic-toml`, `fxhash` or `unsafe-libyaml`, and the checked-in `.github/security-baseline.json` has an empty `findings` list. These are repository-state observations, **not** a claim that a fresh RustSec advisory scan was run for this documentation update or that no future advisory can affect a dependency. The reports below are dated historical snapshots. + ```bash cargo install cargo-audit --locked cargo audit @@ -60,8 +62,8 @@ unsoundness advisories through MySQL and three maintenance warnings remain. They The [subsequent dependency update](docs/DEPENDENCY-SECURITY-2026-11-03.md) removes the affected `lru` version and updates `serde_with` for GHSA-7gcf-g7xr-8hxj. -Its recorded RustSec scan has no vulnerabilities or unsoundness findings; three -maintenance warnings remain under [issue #79](https://github.com/sahenjp/RustXNG/issues/79). +That dated RustSec scan found no vulnerabilities or unsoundness findings, but **at that time** three +maintenance warnings remained under [issue #79](https://github.com/sahenjp/RustXNG/issues/79). Those three packages have since been removed from the current lockfile. Updates require review of actual usage, a locked dependency check, tests and platform/MSRV verification. Do not silently suppress a security advisory or present a clean normal CI run as a security audit. @@ -75,6 +77,6 @@ No application, PR, social-media reply, or AI recommendation automatically grant ## Continuous advisory checks The CI and daily security workflow record the complete RustSec report. Vulnerabilities always fail. -Known maintenance findings are listed in `.github/security-baseline.json`, tied to issue #79, -and remain visible in logs and artifacts. New findings, changed affected versions, invalid reports and an expired -baseline fail the check. The current baseline expires on 2026-12-03; it is not a statement that the dependencies are safe. +Historical maintenance findings were tracked in `.github/security-baseline.json`, tied to issue #79. +The current file has no accepted findings. New warnings or vulnerabilities, invalid reports, and an expired +nonempty baseline fail the check. The recorded expiry is 2026-12-03; the baseline is not a safety certification. diff --git a/docs/CLEAN-PROFILE.md b/docs/CLEAN-PROFILE.md index 1a7d014..42c1f80 100644 --- a/docs/CLEAN-PROFILE.md +++ b/docs/CLEAN-PROFILE.md @@ -7,13 +7,13 @@ ```text rustxng-index crawl → Tantivy索引(BM25) ← 自前クロール -rustxng-index wiki → Tantivy索引 ← 公式ダンプから構築(docs/WIKIPEDIA-INDEX.md) +rustxng-wikidump → Tantivy索引 ← 公式ダンプから構築(WIKIPEDIA-INDEX.md) ↓ rustxng --profile clean → ローカル索引だけを検索 ``` - **外部エンジン 0**。`use_default_settings = false` で組み込みのエンジン一覧を置き換え、検索エンジンは走らない -- **オフラインで動く**。索引があれば通信なしで検索できる +- **検索はオフラインで動く**。事前に作った索引から検索し、外部の検索プロバイダーへ問い合わせない。ただし、索引の作成・更新には取得元への通信が必要で、明示的な本文取得などの別機能は外部通信を発生させ得る - 自動補完なし(打鍵ごとの外部送信をしない) - 公式サイトのWikidata参照も無効(外部通信をしないため) @@ -51,10 +51,11 @@ rustxng --profile clean サイトマップを含む接続先の公開IP検査、リダイレクトごとのrobots確認、探索数と待機キューの上限を適用します。 具体的なコマンドと互換性は[自前インデックス](LOCAL-INDEX.md)を参照してください。 -## 自前クローラーの強化点 +## 測定結果の読み方 -外部エンジンなし・ローカル索引だけの値。応答は40ms台(外部への問い合わせがないため)。 公式APIを併用した過去のクリーン構成(hit@10 123/254)と比べると到達率は下がるが、依存もゼロ。 測定データは `bench/results/profiles-2026-11-05/clean/sealqa/`。 -索引の対象(シード)に正解のサイトが含まれる質問集では有利に出る点に注意。 +上の数値は、外部検索プロバイダーを呼ばず、準備済みのローカル索引だけで測った値です。40ms台の中央値は測定時の環境での記録で、初回起動や索引構築時間を含みません。 + +公開APIも使っていた旧Clean(2026年11月4日、SealQA hit@10=123/254)とは検索先が違います。単純な前後比較でコードの改善・劣化を判断できません。索引のシードには正解ページに関係するサイトが含まれており、未知のサイトや最新情報の検索性能を保証しません。[保存済みの測定結果](../bench/results/profiles-2026-11-05/clean/sealqa/)を参照してください。 ## 内容についての注意 diff --git a/docs/COMPARISON-2026-11-04.md b/docs/COMPARISON-2026-11-04.md index f4ad025..a38c7a4 100644 --- a/docs/COMPARISON-2026-11-04.md +++ b/docs/COMPARISON-2026-11-04.md @@ -1,6 +1,8 @@ # 構成ごとの比較(2026-11-04):通常版・フル版・クリーン版・Exa・Tavily -同じ質問集・同じ採点で、RustXNG の 3 つの構成と Exa・Tavily を並べました。 +**履歴資料です。** これは2026年11月4日の旧プロファイル(v0.28.0開発時点)を使った観測であり、**v0.30.0のStandard・ローカル索引専用Clean・現在のFullの性能ではありません**。検索元・既定設定・許可条件は変更されています。現在の構成は[README](../README.ja.md)と[監査記録](PROVIDERS.md)、11月5日の[Standard測定](ISSUE-RESOLUTION-2026-11-05.md)、[現在のCleanの保存測定](CLEAN-PROFILE.md)を参照してください。 + +同じ質問集・同じ採点で、当時のRustXNGの3構成とExa・Tavilyを並べました。 構成は起動時に `--profile` で切り替えます(環境変数 `RUSTXNG_PROFILE` でも可)。 diff --git a/docs/COMPATIBILITY.md b/docs/COMPATIBILITY.md index 0e07b11..c90c71f 100644 --- a/docs/COMPATIBILITY.md +++ b/docs/COMPATIBILITY.md @@ -1,6 +1,6 @@ # SearXNG 互換性の範囲 -**結論: エンジン(352 エントリ / 226 型)とプロトコル(HTTP API・設定・データ形式)は上流と一致しています。** 残る差分は UI のマークアップと i18n のロケール数(57 / 60)です。このページは「何が互換で、何が違うか」を検証可能な形でまとめたものです。 +**RustXNGはSearXNGの主要なHTTP API・設定形式・検索構文との互換性を目指していますが、完全な動作互換を保証するものではありません。** 352エントリ/226型は過去の移植時点における型の実装数であり、現在の既定検索元の数や、全エンジンの応答・利用許諾を検証した数字ではありません。[移植範囲と履歴](COVERAGE.md)・[検索元の監査](PROVIDERS.md)を分けて確認してください。 ## 互換と言える範囲 @@ -40,7 +40,7 @@ SearXNG のパラメータと衝突しない名前で、LLM のツール呼び | `accept_language=ko-KR,ko;q=0.9,en;q=0.8` | `include_raw_content` で取得するページの言語優先度を明示する | 指定を `Accept-Language` として送信し、言語ごとに本文キャッシュを分離。検索結果の言語指定とは独立 | | `strategy=staged` | エンジンを少数の段に分けて開始し、`search.staged_min_results` 件で打ち切る(既定は並列) | 応答時間は短縮、返る件数は減る | -**ランキングの差分(`search.relevance_weight`)**: 一般(マルチエンジン)検索では、URL + タイトルのクエリ語一致度でスコアを補正します(既定 4.0。Exa の意味検索に肉薄させるため)。**単一エンジン指定では補正せず上流順を維持**するので、`engines=` での overlap@10 は上流と一致します。`relevance_weight = 0` にすれば一般検索も上流と完全に同一の順序になります。 +**ランキングの差分(`search.relevance_weight`)**: 一般(マルチエンジン)検索では、URLとタイトルのクエリ語一致度でスコアを補正します(既定4.0)。単一エンジン指定ではこの補正をせず、取得元の並びを維持します。`relevance_weight = 0`でこの補正を無効化できますが、検索先・統合・フィルタの違いがあるため、SearXNGの結果順全体が同一になる保証ではありません。 応答自体の検証も行います。パースは通るが内容が明らかに架空・プレースホルダ・クエリと無関係な応答(上流 issue #6358 の「静かなゴミ混入」)は、結果に混ぜずにエンジンをサスペンドし、`unresponsive_engines` に `Suspicious response` として出します。 @@ -72,7 +72,7 @@ curl --fail --get 'http://127.0.0.1:29483/search' \ | 領域 | 差分 | | :--- | :--- | -| **エンジンの網羅率** | **上流 352 エントリ / 226 型をすべて実装済み(100%)**。既定で有効なのは約 170(認証情報・自前インスタンスが必要なものは上流と同じく無効)。内訳は [COVERAGE.md](COVERAGE.md) | +| **エンジンの網羅率** | 移植時の記録では上流352エントリ/226型の型対応を報告。**現行の同梱設定は273エントリ中34件が既定有効**。型の存在は実際の動作・許諾・結果一致を保証しない。内訳は [COVERAGE.md](COVERAGE.md) と [PROVIDERS.md](PROVIDERS.md) | | **UI** | 単一テーマ(simple 相当)のみ。上流のテンプレート・テーマ資産とマークアップは非互換 | | **i18n** | 57 ロケール(上流は 60) | | **`/stats`** | 表示形式が上流と異なる(HTML の内容・`/stats/errors` の形) | @@ -83,20 +83,20 @@ curl --fail --get 'http://127.0.0.1:29483/search' \ ## 検証の方法 -- 構文・統合ロジック・JSON/CSV の形: `cargo test`(ユニット 750 + 統合 14) +- 構文・統合ロジック・JSON/CSV の形: `cargo test --locked --all-targets`。テスト数は変更により変わるため、現行CIの結果を確認してください。 - 上流との実測比較(速度・結果一致度): [BENCHMARK.md](BENCHMARK.md) と `bench/compare.py` - エンジン網羅率: `python3 tools/coverage.py /path/to/searxng` ## 完全互換に近づけるには -1. ~~残りエンジン型の移植~~ → **完了(226/226)**。DB ドライバ直結の 8 種は依存を増やさない方針でスタブ +1. 過去の型対応記録(226/226)と実運用での互換性を分けて検証する。DB直結やHTTP経由の検索バックエンドには動作実装があり、すべてスタブという古い説明は現在の実装に合いません。 2. `/stats` と UI テンプレートを上流資産に合わせる 3. i18n のテンプレート全面適用とロケール拡大 4. UI テンプレートのマークアップを上流に合わせる ## 商用 API をエンジンとして併用する -RustXNG はメタ検索のハブなので、商用検索 API を「170 のエンジンの 1 つ」として足せます。API のカバレッジと RustXNG 側のランキング(関連度・権威・本文)を組み合わせられます。 +RustXNGには商用検索APIを検索元として追加できます。**設定に登録されている型の数と、利用可能・許諾確認済みの検索元の数は別です。** APIの料金、クォータ、検索結果の利用許諾と再配布条件を確認してください。 `exaapi` / `braveapi` は実装済みで既定は無効です。設定ファイルで有効化します。 @@ -120,7 +120,9 @@ SEARXNG_SETTINGS_PATH=my-settings.toml ./rustxng --port 29483 > 0.13.0 で `EngineConfig::disabled` を三状態(`Option`)にしました。以前は `disabled = false` が「未指定」と区別できず、既定で無効なエンジンを有効化できませんでした。 -### 実測(100 問) +### 過去の実測(100問・現在の構成ではない) + +次の数値は旧構成で保存した観測であり、v0.30.0の再測定や同条件の最新Exa比較ではありません。開発に用いた質問集の結果だけで一般的な優劣を結論付けないでください。 | 構成 | hit@1 | hit@5 | MRR | | --- | ---: | ---: | ---: | @@ -128,4 +130,4 @@ SEARXNG_SETTINGS_PATH=my-settings.toml ./rustxng --port 29483 | **RustXNG + exaapi** | **75** | 85 | 0.799 | | RustXNG 単体(4 回平均) | 62 | 79 | 0.710 | -API を併用すると **hit@1 は Exa 単体を上回ります**(75 対 74)。hit@5 と MRR は僅差で Exa が上(−3 問 / −0.009)で、全体としてはほぼ同等です。上流エンジンがブロックされる環境では、API の安定したカバレッジが効きます。 +この旧測定ではhit@1が75対74、hit@5が85対88、MRRが0.799対0.808でした。**この1問の差を「RustXNGはExaより高精度」という一般的な主張には使えません。** 現行構成の品質は独立した質問集・同時刻の再測定で確認してください。 diff --git a/docs/COVERAGE.md b/docs/COVERAGE.md index e574249..bfa55f1 100644 --- a/docs/COVERAGE.md +++ b/docs/COVERAGE.md @@ -1,12 +1,12 @@ # エンジン移植の状況(カバレッジ) -SearXNG のエンジン定義を移植しています。Google 関連のエンジンと連携は意図的に削除しています。数値は `tools/coverage.py` で再計測できます。 +SearXNGのエンジン定義を移植しています。Google関連の一部エンジンと連携は意図的に削除しています。**型を移植したことと、既定で有効なこと・アクセスの許可があること・安定して結果を返すことは別です。** 数値は `tools/coverage.py` で再計測できます。現在の設定上の有効件数・監査状況は[プロバイダー台帳](PROVIDERS.md)を確認してください。 ```bash python3 tools/coverage.py /path/to/searxng settings.toml ``` -## Google 関連削除前の記録 +## 過去の移植時点の記録(現在の既定設定ではない) 以下は過去の移植時点の記録で、現在の対応数や動作保証ではありません。 @@ -17,7 +17,7 @@ python3 tools/coverage.py /path/to/searxng settings.toml | 上流エントリのうち型を実装済み | **352 / 352(100%)** | | 上流にない追加エンジン | yahoo_japan(日本語検索) | | 本移植の設定エントリ | 275 | -| 既定で有効なエントリ | 約 170(認証情報・自前インスタンスが必要なものは上流と同じく無効) | +| 当時の既定で有効なエントリ | 約170(**歴史的な値**。現在の既定は273エントリ中34件) | | テスト | ユニット 722 + 統合 14 | ## 移植を支える仕組み @@ -32,14 +32,14 @@ python3 tools/coverage.py /path/to/searxng settings.toml | 分類 | 数 | 状態 | | --- | ---: | --- | -| スクレイパー / HTTP API | 約 200 | 既定で有効、または認証情報を設定すれば有効 | +| スクレイパー / HTTP API | 約200(移植時) | 型の実装と、利用条件に沿った実行の可否は別。多数は現在既定無効 | | 検索バックエンド(HTTP) | 3 | `elasticsearch` / `sorl` / `meilisearch`(`base_url` + index / collection を設定) | -| DB ドライバ直結 | 8 | `postgresql` / `mysql_server` / `mariadb_server` / `mongodb` / `sqlite` / `valkey_server` / `recoll` / `opensemantic` — 設定を読んで説明用のエラーを返すスタブ | +| データベース・ローカル検索・関連検索バックエンド | 8(移植時の分類) | PostgreSQL、MySQL、MariaDB、MongoDB、SQLite、Valkeyは検索処理を実装。RecollとOpen Semantic SearchはHTTP検索先に接続する | | MediaWiki / 宣言型 | 40 以上 | `tools/import_engines.py` で上流定義から生成 | ### DB ドライバ直結エンジンについて -`postgresql` / `mysql_server` / `mariadb_server` / `mongodb` / `sqlite` / `valkey_server` / `recoll` / `opensemantic` は、SearXNG が DB ドライバを直接使ってインデックスを検索するエンジンです。Rust 版では DB クライアントの依存を増やさない方針のため、設定(接続先・認証情報)を読み取り、実際の検索時には理由付きのエラーを返すスタブとして実装しています。HTTP 経由で検索できる `elasticsearch` / `sorl` / `meilisearch` は完全実装です。 +`postgresql`、`mysql_server`、`mariadb_server`、`mongodb`、`sqlite`は対応するデータベースへの検索処理を持ち、`valkey_server`はRESPで検索します。`recoll`と`opensemantic`はHTTP経由で既存の検索サービスを使うアダプターです。認証情報、実際のデータベース、設定に依存するため、型が存在するだけで接続成功や上流との完全互換を保証するものではありません。対応状況は各エンジンの実装とテストで検証してください。 ### 実装済みでも既定で無効なもの @@ -65,5 +65,5 @@ python3 tools/coverage.py /path/to/searxng settings.toml | favicons | 実装(`/favicon_proxy`、キャッシュ付き) | | i18n | 57 ロケール(`tools/import_translations.py` で生成) | | wikidata インフォボックス | `src/wikidata_infobox.rs` | -| valkey / redis キャッシュ | 未移植(TTL + LRU のメモリ内キャッシュで代替) | -| botdetection / limiter.toml | 部分(クライアント単位の簡易レート制限のみ) | +| valkey / redis キャッシュ | メモリ内TTL/LRUとValkey/Redisバックエンドを実装済み。複数プロセス間の送信レート制御まで共有するものではない | +| botdetection / limiter.toml | 部分互換。詳細は [COMPATIBILITY.md](COMPATIBILITY.md) と現在の実装を参照 | diff --git a/docs/FAQ.md b/docs/FAQ.md index c27b2a4..b4e555e 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -19,7 +19,7 @@ RustXNG returns search evidence; a language model's answer accuracy is a separat ## Does local hosting remove all search costs and rate limits? No. RustXNG itself does not charge per search request, but servers, networking and optional paid providers still have costs. -Queries go to external engines, which can rate-limit, block, require credentials or change their response formats. +Standard and Full send queries to external engines, which can rate-limit, block, require credentials or change their response formats. Clean searches prebuilt local indexes only; explicitly enabled raw-page retrieval or other network-backed features are separate. Many parallel agents can increase those problems. Caching, bounded concurrency and suitable engine selection help; local hosting does not bypass provider limits. @@ -38,7 +38,7 @@ Keep errors and misses in the denominator, record cache/local-index settings, an ## What about full Japanese error messages? -The existing measurements do not establish performance for that workload. +The [November 5 Japanese troubleshooting observations](../bench/results/issue-resolution-2026-11-05/japanese/baseline/summary.json) show poor reference-page recall in a specific older API-backed test configuration. They do not establish the current v0.30.0 performance for that workload. Full error text, a shortened query and quoted exact text can behave differently; language handling and source coverage matter. Use the benchmark report form with a public error example and an expected source URL. Japanese technical retrieval and broad/current-information collection are tracked in [GitHub Issues](https://github.com/sahenjp/RustXNG/issues). @@ -52,7 +52,7 @@ Neither a high hit@1 score nor a large result count alone measures both tasks. It can. Start with `max_results=5`, relevant domains, and short snippets. Project the fields passed to the model locally when appropriate. Page fetching is optional; review the [current security policy](../SECURITY.md) and the [historical audit](AUDIT-2026-11-02.md). -MCP provides character/byte budgets and up to three query-matched passages from the extracted page. These are not tokenizer-specific budgets. HTTP compression saves transfer bytes, not model tokens. +MCP provides character/byte budgets and up to three query-matched passages from the extracted page. An explicit `tokenizer` (`cl100k_base` or `o200k_base`) together with `max_payload_tokens` also limits serialized `structuredContent`, but does not include the JSON-RPC envelope or the caller's prompt. See [the MCP budget contract](AGENT-OUTPUT.md). HTTP compression saves transfer bytes, not model tokens. ## Does it support Linux ARM? diff --git a/docs/ISSUE-RESOLUTION-2026-11-05.md b/docs/ISSUE-RESOLUTION-2026-11-05.md index b1c97a1..46a3f6b 100644 --- a/docs/ISSUE-RESOLUTION-2026-11-05.md +++ b/docs/ISSUE-RESOLUTION-2026-11-05.md @@ -1,6 +1,6 @@ # 課題の解決と測定(2026-11-05) -この文書は、プロバイダー利用条件の監査・Standard の再構成・API プロファイル・MCP のトークン上限について、実測とともにまとめる。 +この文書は、2026年11月5日のプロバイダー監査、Standardの再構成、当時の有料APIを使った実験、MCPの出力上限について、保存済みの測定結果とともに記録したものです。現行v0.30.0の再測定ではありません。現在の起動プロファイルは`standard`・`clean`・`full`の3種類で、旧`api`プロファイルは廃止されています。 ## プロバイダー利用条件の監査 @@ -17,15 +17,14 @@ Standard で有効な未審査プロバイダー 104 件について、一次資 | 構成 | hit@1 | hit@5 | hit@10 | MRR@10 | 中央値 | | --- | ---: | ---: | ---: | ---: | ---: | | Standard(無効提案を反映) | 55 / 58 | 67 / 69 | 71 / 73 | 0.607 / 0.632 | 585–806 ms | -| ~~API(`--profile api`)~~ 削除 → full に統合 | — | — | — | — | — | -同日の変更前基準(70/84/0.762/981ms)に対し、API 構成は hit@1・hit@5・MRR のすべてで上回った。Standard 単体では届かず、この差は結果として明記する。 +同日の変更前基準(hit@1=70、hit@5=84、MRR@10=0.762、中央値981ms)と比べ、見直し後のStandardは検索到達率が低下しています。旧API構成の実験は下記に区別して記録します。 -## API プロファイルの重み調整(追加測定) +## 旧API併用構成の重み調整(追加測定・現在のFullとは別) 監査と並行して、Exa の重みと関連度ボーナスの調整を 13 回測った(`docs/audit/2026-11-05/exa-tuning-2026-11-05.md`)。 -- ホワイトリスト構成(許可 44 エンジンのみ・exaapi weight 2.0 + relevance_weight 2.0): hit@1 79 / 77、hit@5 **92 / 92**(Exa 保存済み 91 を 2 回連続で上回る)、MRR@10 0.849 / 0.839 +- ホワイトリスト+Exaを組み込んだ実験構成(44エンジン・`exaapi weight=2.0`・`relevance_weight=2.0`): hit@1は79 / 77、hit@5は92 / 92、MRR@10は0.849 / 0.839。Exa単独の保存済みhit@5=91とは測定日時が異なり、独立した同時比較でも未見設問での評価でもありません。**無料のStandard単独がExaを上回った結果ではありません。** - 公式サイトの言語版の対応(`src/official.rs`)と、多ホスト索引の 1 ホスト上限 3 件(`src/aggregator.rs`)を含む - 追加の重み調整は既知の100問を使った探索で、上表の固定条件による反復と区別する - tavily エンジンは実装したが、運用方針(外部の検索APIに依存しない)により削除。審査記録は docs/audit/2026-11-05/ に残す diff --git a/docs/PROVIDERS.md b/docs/PROVIDERS.md index 01cadd3..1112a4c 100644 --- a/docs/PROVIDERS.md +++ b/docs/PROVIDERS.md @@ -11,7 +11,7 @@ Bing(検索・ニュース・画像・動画)、Seznam、eBay、Pinterest、 Flickrの非API経路、Unsplashの内部API経路を既定無効にしました。 これらの変更は許諾の確認状況に基づく保守上の判断です。 特にSeznamとRotten Tomatoesは、禁止の断定ではなく適用範囲の確認待ちです。 -Fullにも自動では追加しません。既存のユーザー設定での明示的な有効化は引き続き優先します。 +この一覧の一部はStandardから除外した後もFullの追加検索元として有効になります。**Fullを選ぶだけで個別の利用許諾が得られるわけではありません。** 禁止・制限された取得方式を利用するには、必要な個別の許可や契約を先に確認してください。利用者の明示的な設定上書きも、提供元の規約を変更しません。 [監査台帳](provider-policy.json)には取得先・方式・一次資料・個別の確認日・条件を記録します。 新たに確認した一次資料は、[eBayの利用規約](https://www.ebay.com/help/policies/member-behavior-policies/user-agreement?id=4259)、 @@ -50,7 +50,7 @@ Hacker NewsとEurope PMCも台帳に記録しました。 [EMBL-EBIの規約](https://www.ebi.ac.uk/about/terms-of-use/)は2026-10-14改訂版を確認し、 第三者の抄録・本文の権利は別に残ることを記録しています。 -CIの`python tools/check_provider_policy.py`はStandardと明示的なAPIプロファイルを検査します。 +CIの`python tools/check_provider_policy.py`はStandardを検査します。Cleanは検索時に外部プロバイダーを呼ばないローカル索引専用構成です。Fullは未確認・制限付きの検索元を含むため、Standardと同じ許諾確認済み構成としては扱いません。 **有効34件すべてに、対象の取得先と用途を限定した確認記録があります。** 未確認・制限対象は既定無効です。 一般的なMediaWiki/JSONアダプターの確認を別サイトに流用できません。設定の取得先、最低間隔、 アダプターのソースハッシュを照合し、変更時は一次資料と実装の再確認を必要とします。 @@ -60,9 +60,7 @@ Standardも識別できるUser-Agentを既定で使います。追加したホ crates.io・Repology・Packagist・Wibyが1,100ms、arXiv・Openverseが3,100msです。PubMedは独自の二段階通信が共有制御を通らないため、既定無効にしました。 固定間隔はIP・アカウント単位の日次/月次枠の代わりにはなりません。429/Retry-Afterと休止も既存の共有経路で扱います。 -`--profile api`はStandardにExaの文書化された有料APIを追加します。`EXA_API_KEY`か明示設定のキーが必要です。 -`lite`検索、10件、500文字のhighlightsを使い、期間指定は`startPublishedDate`に変換します。 -環境変数にキーがあるだけではStandardで有効になりません。料金・アカウントの枠と第三者コンテンツの権利は別です。 +旧`--profile api`は廃止されました。Exaの有料APIは現在、`--profile full`で追加される検索元の一つです。`EXA_API_KEY`または明示設定したキーがなければ起動時にスキップされます。`lite`検索、10件、500文字のhighlightsを使い、期間指定は`startPublishedDate`へ変換します。**Fullには利用条件が未確認・制限付きのHTML検索元も含まれます。** Exaだけを使いたい場合は、別途利用条件を確認した上で個別の設定を使用してください。料金・アカウントの枠と第三者コンテンツの権利は別です。 Open-Meteoの無料経路は非商用限定、Mwmblの返却データはCC BY-NC-SAなど、条件付きの検索元も含みます。 商用利用・保存・再配布を一括で許可された構成とは説明しません。 @@ -148,7 +146,7 @@ Hacker News(Algolia)と Europe PMC も、自動利用についての規定 [機械可読CSV](providers.csv)は同梱設定の全273エントリ(設定上有効34、無効239)を列挙します。[一次資料の確認記録](provider-policy.json)から、 接続方式・規約URL・確認日・判断を載せます。**273件中148件は `unreviewed` のまま**で、すべて既定無効です。その他の無効な検索元には制限・登録条件などの確認記録があります。有効34件の条件付き確認と、無効な検索元の調査記録は区別します。 -`clean` の許可リストに載っていても、台帳上の確認状態が自動的に更新されるわけではありません。公開APIの存在と、RustXNGでの自動取得・保存・再配布についての許諾を区別してください。全件の監査が済んだわけではありません。 +現在の`clean`は事前に構築したローカル索引だけを検索するため、以前の公開API許可リストは使用しません。クロール済みコンテンツやWikipediaダンプの再利用条件は引き続き適用されます。外部APIが公開されていることと、RustXNGでの自動取得・保存・再配布の許可は別です。無効な検索元を含めた全件の監査が済んだわけではありません。 `enabled_in_config` は `Settings::enabled_engines` と同じ設定上の条件です。初期化成功・認証の充足・ そのリクエストのカテゴリ選択・実際の応答を保証しません。設定エントリ数と登録済みエンジン数も区別してください。 diff --git a/settings.toml b/settings.toml index 9039cf0..05ec501 100644 --- a/settings.toml +++ b/settings.toml @@ -40,7 +40,7 @@ local_index_path = "index-docs" # Wikipedia の公式ダンプから作る索引(rustxng-wikidump、docs/WIKIPEDIA-INDEX.md)。 # 外部への問い合わせは増えない。ディレクトリが無ければ黙って使わない。 wikipedia_index_path = "index-wikipedia" -# インデックスのヒットを上流の結果に足す(精度が上がる) +# インデックスのヒットを上流の結果に加える。品質は収録内容や検索語に左右される。 local_index_merge = true # 結果を返さないエンジンを自動で休ませる(連続して空の応答が続いたとき) @@ -121,7 +121,7 @@ keepalive_expiry = 5.0 using_tor_proxy = false # 上流へ出るときのプロキシ。指定した scheme のリクエストがこのプロキシを通る。 -# ブロックされているエンジン(Google / Bing など)を復活させる用途で使う。 +# 認可された社内・運用ネットワークに接続する場合の設定。検索元の制限・規約を回避するために使わない。 # 注意: 現状は全エンジン共通で、エンジン個別の指定には未対応。 # [outgoing.proxies] # https = "socks5h://127.0.0.1:9050" diff --git a/src/settings.rs b/src/settings.rs index 92f6bcd..365b5c1 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -1125,13 +1125,13 @@ impl Settings { /// A set of built-in settings to start from (`--profile`). #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub enum Profile { - /// `settings.toml`: keyless providers that do not refuse automated use. + /// `settings.toml`: reviewed keyless default entries, subject to their recorded conditions. #[default] Standard, - /// `settings.full.toml`: the standard set plus HTML search engines whose - /// terms prohibit or do not permit automated access. Private use only. + /// `settings.full.toml`: opt-in sources that may require additional permissions. + /// Private or personal use does not override any provider's terms. Full, - /// `settings.clean.toml`: documented public APIs and our own crawl only. + /// `settings.clean.toml`: search only locally prebuilt crawl and dump indexes. Clean, } diff --git a/tools/test_docs_consistency.py b/tools/test_docs_consistency.py index bb992fe..adc5e0e 100644 --- a/tools/test_docs_consistency.py +++ b/tools/test_docs_consistency.py @@ -55,6 +55,28 @@ def test_clean_profile_runs_no_engine(self) -> None: self.assertNotIn("engines", clean) docs = (ROOT / "docs/CLEAN-PROFILE.md").read_text(encoding="utf-8") self.assertIn("外部エンジン 0", docs) + def test_readmes_track_current_profiles_and_mcp_budgets(self) -> None: + for filename in ("README.md", "README.ja.md", "README.ko.md"): + with self.subTest(filename=filename): + readme = (ROOT / filename).read_text(encoding="utf-8") + self.assertIn("strict_engines=1", readme) + self.assertIn("max_payload_tokens", readme) + self.assertIn("structuredContent", readme) + self.assertIn("docs/ISSUE-RESOLUTION-2026-11-05.md", readme) + self.assertNotIn("`--profile api`", readme) + self.assertIn("docs/CLEAN-PROFILE.md", readme) + + clean = (ROOT / "docs/CLEAN-PROFILE.md").read_text(encoding="utf-8") + self.assertIn("rustxng-wikidump", clean) + self.assertNotIn("rustxng-index wiki", clean) + self.assertIn("外部エンジン 0", clean) + + def test_compatibility_does_not_advertise_old_default_engine_count(self) -> None: + compatibility = (ROOT / "docs/COMPATIBILITY.md").read_text(encoding="utf-8") + self.assertNotIn("既定で有効なのは約 170", compatibility) + self.assertIn("273エントリ中34件", compatibility) + self.assertIn("現在の構成ではない", compatibility) + def test_latest_sealqa_reference_is_not_old_run(self) -> None: summary = json.loads( (ROOT / "bench/results/profiles-2026-11-05/clean/sealqa/summary.json").read_text(encoding="utf-8")