Feat/observability#12281
Closed
JamesRobert20 wants to merge 47 commits intoRooCodeInc:mainfrom
Closed
Conversation
…ows across instances
Remove Roo Code Cloud and Router remnants
Roo to zoo upgrade
Add issue templates
feat: support OAuth 2.1 for streamable-http MCP servers
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.
Description
This PR implements a comprehensive observability feature for Zoo Code, enabling authenticated users with active subscriptions to log LLM request telemetry to the Zoo Code backend. The implementation includes:
Key Implementation Details
1. Zoo Code Authentication Service (
src/services/zoo-code-auth.ts)SecretStorageAPI2. LLM Telemetry Service (
src/services/zoo-telemetry.ts)3. Authentication UI Badge (
webview-ui/src/components/chat/ZooCodeAuthBadge.tsx)4. Type Extensions (
packages/types/src/vscode-extension-host.ts)ExtensionStatefields:zooCodeIsAuthenticated,zooCodeUserName,zooCodeUserEmail,zooCodeUserImageWebviewMessagetype:zooCodeSignOutDesign Choices & Trade-offs
Taskclass hot path, avoiding async overhead during LLM request processingimport()to avoid loading unnecessary code paths for users who aren't authenticatedzoo_ext_to prevent accidental misuse of other credentialsRoadmap Alignment
This PR aligns with the Reliability First roadmap goal by:
Test Procedure
Unit Tests
The PR includes comprehensive unit tests in
src/services/__tests__/zoo-code-auth.test.ts:Test Coverage:
getCachedSubscriptionStatus- Initial state verificationcheckSubscriptionStatus- API responses (active/inactive/error/timeout)getCachedZooCodeToken- Token caching behaviorsetZooCodeToken- Subscription status reset on token changeclearZooCodeToken- Cleanup and state resetgetZooCodeBaseUrl- Configuration and environment variable handlingManual Testing Steps
Authentication Flow:
Telemetry Verification:
Sign Out Flow:
Error Handling:
Documentation Updates
Additional Notes
Files Changed Summary
packages/types/src/vscode-extension-host.tssrc/activate/handleUri.ts/auth-callbackpathsrc/core/task/Task.tssrc/core/webview/ClineProvider.tssrc/core/webview/webviewMessageHandler.tssrc/extension.tssrc/services/__tests__/zoo-code-auth.test.tssrc/services/zoo-code-auth.tssrc/services/zoo-telemetry.tswebview-ui/src/components/chat/ChatTextArea.tsxwebview-ui/src/components/chat/ZooCodeAuthBadge.tsxwebview-ui/src/oauth/urls.tsTotal: 12 files changed, +887 lines
Security Considerations
SecretStorageAPIzoo_ext_) prevents credential misuseAPI Endpoints Used
GET /api/subscription/statusPOST /api/extension/auth/verifyPOST /api/extension/auth/revokePOST /api/observability/eventsInteractively review PR in Roo Code Cloud