docs(plugins): fix broken examples, correct plugin callback docs - #2015
Open
GWeale wants to merge 2 commits into
Open
docs(plugins): fix broken examples, correct plugin callback docs#2015GWeale wants to merge 2 commits into
GWeale wants to merge 2 commits into
Conversation
✅ Deploy Preview for adk-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The plugins and skills pages: examples that can't run as written, plus callback behavior and Python registration guidance that had drifted from the source.
Changes
docs/plugins/index.md— the headlineCountInvocationPluginexample had its whole class body unindented (docstring,__init__and both callbacks sat at module level), and the registration example definedroot_agentinside thehello_worldtool function, so it was never importable; both are now indented correctly. Beyond that: notes that Python'sRunner/InMemoryRunnerplugins=is deprecated in favor ofApp(plugins=...)and that passing both raisesValueError; documentson_agent_error_callback,on_run_error_callbackandclose()(bounded byplugin_close_timeout, five seconds by default); correctsafter_run_callback's return annotation fromOptional[None]toNone; describes the on-event return as a merge onto the original event rather than a wholesale replace, withid,invocation_idandtimestampalways taken from the original; adds the built-in Debug Logging plugin to the list; and repairs two garbled "is only supported by the Plugins feature works as follows" sentences.docs/skills/index.md— the inline-skills example passedget_weather_tooltoSkillToolsetwithout ever defining it, so it could not run; the function is now shown. The skill directory is renamedweather_skill→weather-skillto match the frontmattername, and the page now states that a filesystem skill's directory name must match that name or loading fails.How this was produced
Part of a page-by-page audit of the Python docs against the
google/adk-pythonv2.5.0 source: every import resolved against a real 2.5.0 install, every constructor kwarg checked againstmodel_fields/inspect.signature, every documented default read off the field. A second independent pass re-derived each claim from source rather than trusting the finding, and a third conformed the new wording to the surrounding pages.mkdocs build --strictis clean.Only Python tabs and language-neutral prose were touched — this audit had no ground truth for the Go / Java / TypeScript SDKs.
Split out of a larger audit branch so each area can be reviewed on its own.