Skip to content

service: name services for domains, methods for what they do - #1446

Merged
asim merged 1 commit into
mainfrom
claude/guest-query-limits-rxda1o
Aug 2, 2026
Merged

service: name services for domains, methods for what they do#1446
asim merged 1 commit into
mainfrom
claude/guest-query-limits-rxda1o

Conversation

@asim

@asim asim commented Aug 2, 2026

Copy link
Copy Markdown
Member

search_search was not a naming rule that needed an exception, it was a service named for an action. Every other service is a noun — news, mail, places, web — so service_method reads as two different words. "search" was a verb, which left its one method nothing to be called but Search.

Web search moves to the web service, next to web.Fetch, giving web_search and web_fetch. Those match the routes that already said web (/web/fetch, /web/read) and the tool name web_fetch has always carried. The /search page and the "Search" nav label stay exactly as they are: the label is what a person looks for, the service name is what a caller addresses. The search package keeps the Brave provider, the reader and the page; it just registers no service of its own.

Methods returning the current set of something are now all List — news.List, blog.List, social.List, video.List, markets.List — joining stream.List, events.List and db.List. They were Headlines, Recent, Feed, Latest and Prices, five words for one idea. The derived names land on news_list, blog_list, social_list, video_list and markets_list, which are the names those tools already ship under.

All 37 derived names are now service_method with no exceptions. Two tests hold it: no method may repeat its service, and no two endpoints may derive the same name.

Claude-Session: https://claude.ai/code/session_01KdcPjN9ndJwMGKQSRrAGPE

search_search was not a naming rule that needed an exception, it was a
service named for an action. Every other service is a noun — news, mail,
places, web — so service_method reads as two different words. "search"
was a verb, which left its one method nothing to be called but Search.

Web search moves to the web service, next to web.Fetch, giving
web_search and web_fetch. Those match the routes that already said web
(/web/fetch, /web/read) and the tool name web_fetch has always carried.
The /search page and the "Search" nav label stay exactly as they are:
the label is what a person looks for, the service name is what a caller
addresses. The search package keeps the Brave provider, the reader and
the page; it just registers no service of its own.

Methods returning the current set of something are now all List —
news.List, blog.List, social.List, video.List, markets.List — joining
stream.List, events.List and db.List. They were Headlines, Recent, Feed,
Latest and Prices, five words for one idea. The derived names land on
news_list, blog_list, social_list, video_list and markets_list, which
are the names those tools already ship under.

All 37 derived names are now service_method with no exceptions. Two
tests hold it: no method may repeat its service, and no two endpoints
may derive the same name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KdcPjN9ndJwMGKQSRrAGPE
@asim
asim merged commit 89bf8f9 into main Aug 2, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d6bc325d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread agent/native.go
"video": "Video",
"blog": "Blog",
"search": "Search",
"web": "Search",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Migrate legacy search-only agent scopes

On upgrade, a user-defined agent persisted in user_agents.json with only the previously exposed search service retains Tools: ["search"], because there is no migration to web. Since filterServices returns every service when a nonempty allow-list matches nothing, that agent changes from search-only to access to all private services, including mail, images, events, db, and wallet, potentially exposing personal data or enabling charged actions. Translate the legacy service ID before applying the allow-list.

Useful? React with 👍 / 👎.

Comment thread service/search/search.go
Comment on lines +22 to +25
// Load initializes the search package. It registers no service of its own:
// the web search capability is web.Search, and this package provides the
// provider, the reader and the /search page that sit around it.
func Load() {}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the legacy search service reachable

Existing apps that call /apps/{slug}/sdk/service with service: "search" now receive Unknown service, because search.Load no longer registers that service and sdkServiceAllowed only accepts live registry entries. This shrinks the App SDK service set despite the explicit compatibility promise in docs/COMPATIBILITY.md; keep a deprecated forwarding registration while making web.Search canonical.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants