[Teams] cleanup#610
Merged
Merged
Conversation
TownLake
approved these changes
Jan 6, 2021
agents-git-bot Bot
pushed a commit
that referenced
this pull request
Nov 25, 2025
Adds comprehensive documentation for the new readonly connections feature introduced in PR #610. Key additions: - Server-side methods: shouldConnectionBeReadonly(), setConnectionReadonly(), isConnectionReadonly() - Client-side API: onStateUpdateError callback for error handling - Multiple usage examples covering common scenarios (query params, RBAC, admin dashboards, dynamic permissions) - Implementation details including SQL persistence and hibernation support - Best practices for authentication, user feedback, and access control This feature allows restricting certain WebSocket connections from modifying agent state while still allowing them to receive state updates and call RPC methods. Related PR: cloudflare/agents#610 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
agents-git-bot Bot
pushed a commit
that referenced
this pull request
Nov 27, 2025
Synced from cloudflare/agents PR #610 (cloudflare/agents#610) Introduces documentation for the readonly connections feature which allows restricting certain WebSocket connections from modifying Agent state while still allowing them to receive state updates and call RPC methods. Key features documented: - Server-side methods: shouldConnectionBeReadonly, setConnectionReadonly, isConnectionReadonly - Client-side API: onStateUpdateError callback - Usage examples for query parameter based access, role-based access control, admin dashboards, and dynamic permission changes - Behavior details, best practices, and migration guide - Implementation details including persistence across hibernation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
agents-git-bot Bot
pushed a commit
that referenced
this pull request
Feb 8, 2026
Sync documentation for PR #610 from cloudflare/agents repository. Adds comprehensive documentation for the new readonly connections feature, which allows restricting WebSocket connections from modifying agent state while still allowing them to receive state updates and call RPC methods. Key additions: - Server-side methods: shouldConnectionBeReadonly, setConnectionReadonly, isConnectionReadonly - Client-side API: onStateUpdateError callback - Usage examples for query parameters, RBAC, admin dashboards, and dynamic permissions - Behavior details including state sync and connection cleanup - Best practices for authentication, user feedback, and permission checks - Migration guide for existing agents Source PR: cloudflare/agents#610
elithrar
added a commit
that referenced
this pull request
Feb 8, 2026
* Add readonly connections documentation Sync documentation for PR #610 from cloudflare/agents repository. Adds comprehensive documentation for the new readonly connections feature, which allows restricting WebSocket connections from modifying agent state while still allowing them to receive state updates and call RPC methods. Key additions: - Server-side methods: shouldConnectionBeReadonly, setConnectionReadonly, isConnectionReadonly - Client-side API: onStateUpdateError callback - Usage examples for query parameters, RBAC, admin dashboards, and dynamic permissions - Behavior details including state sync and connection cleanup - Best practices for authentication, user feedback, and permission checks - Migration guide for existing agents Source PR: cloudflare/agents#610 * Split mixed TS+JSX code block to fix build Co-authored-by: elithrar <elithrar@users.noreply.github.com> * Fix build: unwrap JSX code blocks from TypeScriptExample TypeScriptExample uses ts-blank-space to strip TypeScript types, but ts-blank-space doesn't understand JSX syntax — it misinterprets JSX tags as generics, 'as' in JSX text as type assertions, and '!' as non-null assertions. This caused: 1. GameComponent block: <div> tag blanked out entirely, breaking Prettier's babel parser with 'Adjacent JSX elements' error 2. EditButton block: !canEdit silently corrupted to canEdit in the generated JavaScript tab Fix by removing the TypeScriptExample wrapper from these two JSX blocks, using plain fenced tsx code blocks instead (matching the pattern used in quick-start.mdx and guides/webhooks.mdx). --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: elithrar <elithrar@users.noreply.github.com>
4 tasks
agents-git-bot Bot
pushed a commit
that referenced
this pull request
Feb 8, 2026
Updates from cloudflare/agents PR #610 (feat: readonly connections): ## Major changes 1. **Readonly connections feature** (readonly-connections.mdx): - Updated implementation details: uses connection state wrapping instead of SQL - Clarified enforcement for @callable() methods that call setState() - Added "What readonly does and does not restrict" table - Added caveats section about side effects in callables - Removed outdated SQL storage implementation details - Updated "How it works" section to reflect connection attachment storage 2. **onStateUpdate → onStateChanged rename**: - Renamed server-side hook from onStateUpdate to onStateChanged - Updated across all documentation files - Client-side onStateUpdate callback remains unchanged ## Updated files - api-reference/readonly-connections.mdx - major rewrite with corrected implementation - api-reference/store-and-sync-state.mdx - renamed onStateUpdate to onStateChanged - api-reference/agents-api.mdx - renamed hook references - api-reference/client-sdk.mdx - renamed hook references - concepts/agent-class.mdx - renamed hook references - getting-started/quick-start.mdx - renamed hook references - model-context-protocol/mcp-agent-api.mdx - renamed hook references Related upstream PR: cloudflare/agents#610 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
whoiskatrin
added a commit
that referenced
this pull request
Feb 11, 2026
…ebSocket clients from modifying agent state (#28197) * Sync documentation for PR #610: readonly connections and onStateChanged Updates from cloudflare/agents PR #610 (feat: readonly connections): ## Major changes 1. **Readonly connections feature** (readonly-connections.mdx): - Updated implementation details: uses connection state wrapping instead of SQL - Clarified enforcement for @callable() methods that call setState() - Added "What readonly does and does not restrict" table - Added caveats section about side effects in callables - Removed outdated SQL storage implementation details - Updated "How it works" section to reflect connection attachment storage 2. **onStateUpdate → onStateChanged rename**: - Renamed server-side hook from onStateUpdate to onStateChanged - Updated across all documentation files - Client-side onStateUpdate callback remains unchanged ## Updated files - api-reference/readonly-connections.mdx - major rewrite with corrected implementation - api-reference/store-and-sync-state.mdx - renamed onStateUpdate to onStateChanged - api-reference/agents-api.mdx - renamed hook references - api-reference/client-sdk.mdx - renamed hook references - concepts/agent-class.mdx - renamed hook references - getting-started/quick-start.mdx - renamed hook references - model-context-protocol/mcp-agent-api.mdx - renamed hook references Related upstream PR: cloudflare/agents#610 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Fix build: wrap @callable() code snippets in class declarations The Prettier/Babel parser requires decorators to be attached to class declarations. Three code blocks in readonly-connections.mdx had standalone @callable() decorators on methods outside of a class body, causing the build to fail with 'Leading decorators must be attached to a class declaration'. * Wrap @callable() snippets in class bodies Co-authored-by: whoiskatrin <whoiskatrin@users.noreply.github.com> * Apply suggestions from code review * Delete package-lock.json --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: whoiskatrin <whoiskatrin@users.noreply.github.com> Co-authored-by: Jun Lee <junlee@cloudflare.com> Co-authored-by: whoiskatrin <kreznykova@cloudflare.com>
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.
No description provided.