docs: add TypeScript Plugin documentation based on PR #619#24
Open
github-actions[bot] wants to merge 2 commits into
Open
docs: add TypeScript Plugin documentation based on PR #619#24github-actions[bot] wants to merge 2 commits into
github-actions[bot] wants to merge 2 commits into
Conversation
- Create src/content/docs/user-guide/concepts/plugins/index.ts with TypeScript snippets for Plugin class API: initAgent(), getTools(), and hook registration patterns - Update plugins/index.mdx to replace all TypeScript placeholders with actual examples - Add separate 'How It Works Under the Hood' sections for Python/TypeScript workflows - Update agents/hooks.mdx HookProvider section to note TypeScript uses Plugin instead - Update plugins/steering.mdx with languages: [python] frontmatter for Python-only feature The TypeScript Plugin API from PR strands-agents#619 includes: - Plugin abstract base class with get name(), initAgent(agent), getTools() - Manual hook registration via agent.addHook() in initAgent() - No @hook or @tool decorators - use methods instead Resolves #23
Deploying docs with
|
| Latest commit: |
7787f95
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://56567a5f.docs-72e.pages.dev |
| Branch Preview URL: | https://agent-tasks-23.docs-72e.pages.dev |
760357f to
e1f5910
Compare
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.
Summary
This PR adds comprehensive TypeScript documentation for the Plugin system based on the API introduced in strands-agents/sdk-typescript#619.
Changes
New Files
src/content/docs/user-guide/concepts/plugins/index.ts- TypeScript snippet file with examples for:PluginclassinitAgent()andagent.addHook()getTools()methodModified Files
plugins/index.mdx- Replaced all "Plugins are not yet available in TypeScript SDK" placeholders with actual TypeScript examplesplugins/steering.mdx- Addedlanguages: [python]frontmatter to indicate steering is Python-onlyagents/hooks.mdx- Updated HookProvider section to note TypeScript uses Plugin class insteadKey TypeScript Plugin Differences from Python
@hookdecoratoragent.addHook()ininitAgent()@tooldecoratorgetTools()methodPlugininsteadTesting
npm run typecheck:snippets- TypeScript snippets compilenpm run build- Documentation builds successfullynpm run format:check- Code formatting passesnpm test- All tests passResolves #23