Add beginnings of declarative WebMCP (1/N) This adds the beginnings of a declarative WebMCP prototype, based on this PR and comment: - https://github.com/webmachinelearning/webmcp/pull/26/files - https://github.com/webmachinelearning/webmcp/issues/22#issuecomment-3726418984 In this CL: - A <form> with *both* `toolname` and `tooldescription` attributes will trigger the addition of a new tool to the registry with that name and description. - ModelContext::ToolData now has a `declarative_tool` field, which holds callbacks for the tool itself and another to retrieve input schema when needed. - The input schema is updated each time the AIPageContentAgent::ContentBuilder::AddFrameData function is called. This is needed since it's possible the page gets updated in between calls. - When the tool is executed, for now, nothing happens other than a LOG() output. - The input schema is similarly hard-coded, and does not represent the actual DOM. - Much is left to do. Change-Id: I12d0583f9c72bc72e4dbcea5ccd8534d61069919 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7428254 Auto-Submit: Mason Freed <masonf@chromium.org> Reviewed-by: David Bokan <bokan@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Reviewed-by: Khushal Sagar <khushalsagar@chromium.org> Cr-Commit-Position: refs/heads/main@{#1569476}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.