docs(xai): clarify x_search and xurl routing - #29423
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for documenting a real routing gap: current main's tools/x_search_tool.py:455-462 and skills/social-media/xurl/SKILL.md:389-397 do not make this boundary clear.
Problems
tools/x_search_tool.py:361statically tells the model to usexurl.AGENTS.md:1234-1235prohibits cross-tool references in static schemas because the referenced surface may be unavailable; use conditional schema construction inmodel_tools.py::get_tool_definitions()or keep this guidance in docs/skills.tests/skills/test_xurl_x_search_routing.py:13-28snapshots exact prose.AGENTS.md:1309-1356requires behavioral contracts rather than change-detector tests.- The changed schema/toolset text has stale static copies at
website/docs/reference/tools-reference.md:219andwebsite/docs/reference/toolsets-reference.md:86, neither changed by this PR. - GitHub reports the branch as conflicting; current main already includes xai provider-registry coverage at
tests/plugins/web/test_web_search_provider_plugins.py:77-100, so the CI hunk needs selective salvage.
Suggested changes
- Make the schema wording availability-aware or generic, replace prose snapshots with an invariant, and update the two reference pages while resolving conflicts.
Automated hermes-sweeper review.
| "X Search tool. Read-only discovery only: use this for current " | ||
| "discussion, reactions, or claims on public X rather than general web " | ||
| "pages. Do not use it to post, reply, like, DM, upload media, delete, " | ||
| "or inspect the user's authenticated X account; use the xurl skill for " |
There was a problem hiding this comment.
Please do not statically name xurl in this tool schema. AGENTS.md:1234-1235 requires cross-surface references to be conditional because the terminal/skill surface may be unavailable; make it availability-aware in get_tool_definitions() or use generic out-of-scope wording here.
|
|
||
| def _read(path: Path) -> str: | ||
| return path.read_text(encoding="utf-8") | ||
|
|
There was a problem hiding this comment.
This test freezes exact prose rather than a behavioral contract. AGENTS.md:1309-1356 explicitly rejects change-detector tests; please replace this with a structured invariant or omit the phrase snapshots.
Make the x_search / xurl boundary explicit in the skill, feature docs, toolset metadata, setup note, and reference pages, while keeping the model-facing x_search schema generic (no static xurl name). Regression tests assert behavioral routing invariants rather than frozen prose snapshots. Drop the stale CI-only plugin/hangup hunks already on main so this rebases cleanly.
b1a3ad6 to
c3ad355
Compare
|
Merged via PR #70510 — your commit was cherry-picked onto current main with your authorship preserved in git log ( Thanks for this — the routing doctrine was right and most of it survived verbatim: the read-only schema wording, the toolset description, the tools-config setup note, and the x-search docs comparison table all landed as you wrote them. One half was redesigned rather than dropped: the routing block inside the xurl SKILL itself. The skill loads even when Your routing tests were adapted to pin exactly that placement contract, including a guard that the skill never names gated surfaces again. |
|
Thank you @Teknium ! |
Summary
Clarifies the boundary between the xAI
x_searchtool and thexurlskill so agents route X/Twitter work by intent instead of treating both surfaces as interchangeable.x_search: read-only public X discovery, reactions, claims, threads, profiles, and synthesized answers with citations.xurl: exact/authenticated X API reads plus account actions/writes such as post, reply, like, DM, media upload, delete, timelines, mentions, and raw v2 endpoints.x_search, then switch toxurl reador a specificxurlaction once the target is clear. X writes must be evidenced byxurloutput or the X API response, not by anx_searchanswer.Changes
xurlskill with explicitx_searchrouting guidance.x_searchvsxurlsection to the user-facing x_search docs.web-xaiprovider and makes the update-output test robust tohermes_cli.mainreloads in the full suite.Validation
uv run --extra dev pytest tests/tools/test_x_search_tool.py tests/test_toolsets.py tests/skills/test_xurl_x_search_routing.py tests/website/test_generate_skill_docs.py -q-> 52 passeduv run --extra dev pytest tests/plugins/web/test_web_search_provider_plugins.py tests/hermes_cli/test_update_hangup_protection.py tests/tools/test_x_search_tool.py tests/test_toolsets.py tests/skills/test_xurl_x_search_routing.py tests/website/test_generate_skill_docs.py -q-> 117 passeduv run --extra dev pytest tests/plugins/web/test_web_search_provider_plugins.py::TestBundledPluginsRegister::test_all_bundled_plugins_present_in_registry tests/hermes_cli/test_update_hangup_protection.py::TestInstallHangupProtection::test_wraps_stdout_and_stderr_with_mirror -q-> 2 passeduv run --extra dev ruff check tools/x_search_tool.py toolsets.py hermes_cli/tools_config.py tests/tools/test_x_search_tool.py tests/test_toolsets.py tests/skills/test_xurl_x_search_routing.py tests/plugins/web/test_web_search_provider_plugins.py tests/hermes_cli/test_update_hangup_protection.py-> passedgit diff --check-> passedPATH="$PWD/.venv/bin:$PATH" python3 website/scripts/extract-skills.py && PATH="$PWD/.venv/bin:$PATH" python3 website/scripts/generate-skill-docs.py && cd website && PATH="../.venv/bin:$PATH" npm run lint:diagrams && PATH="../.venv/bin:$PATH" npm run build-> passed; Docusaurus emitted existing broken-link/anchor warnings in unrelated docs/locales.Generated skill docs were used only for validation and are not committed; the source
skills/social-media/xurl/SKILL.mdremains the source of truth.