forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 3
Sync upstream v1.1.20 #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
…nomalyco#8357) Co-authored-by: Claude <[email protected]>
- PR created at #298 - Fix includes: write token refresh to openai provider ID, fallback to legacy codex entry - Tests pass (744 pass, 1 skip, 0 fail)
- Add test confirming minimal OAuth results (without optional email, name, plan, orgName fields) persist correctly in auth storage - All new metadata fields are optional in plugin types and auth schema - Provider auth handler uses conditional checks before setting optional fields - Verify 745 pass, 1 skip, 0 fail
The extractUserInfo function is already implemented in codex.ts:92-105. It parses id_token, extracts email, name, and accountId from claims, and returns a UserInfo object. All tests pass.
OAuth callback already calls extractUserInfo(tokens) after token exchange and includes email, name, accountId in the success payload.
normalizePlanType function maps plan values to standardized tiers (free, plus, pro, team, enterprise, unknown) and handles case variations.
…adata - Added endpoint in server.ts that returns auth metadata (authenticated, type, email, plan, accountId) - Returns 404 with authenticated: false if provider not found - Generated openapi.json with new endpoint definition - Regenerated SDK with auth.info method and types (AuthInfoData, AuthInfoResponses) - Updated prd.json to mark SDK generation tasks as complete - Tests pass: 745 pass, 1 skip, 0 fail
- Marked "Merge PR before starting Phase 1" as complete (PR #298 already merged) - Updated verification steps for auth.info endpoint implementation
- Verified migration copies codex to openai, Auth.remove('codex') available for manual cleanup
- Removal is intentionally manual to prevent data loss if migration fails
- Verified fetchChatGPTUserInfo background task at codex.ts:606-632
- Task spawns via 'void updatePlan().catch(() => {})' - non-blocking
- Updates auth metadata via auth.set when plan/orgName retrieved
- OAuth success returns immediately regardless of background task result
- Verified manifest.ts exists with InstalledSkill and SkillManifest interfaces - Implements loadManifest, saveManifest, getInstalled, addInstalled, removeInstalled - Used by skill installer to track installed skills and their metadata
- Verified skill/index.ts exists with SkillIndex interface and caching logic - Implements loadIndex (cache with TTL), buildIndex (fetch and write), search (fuzzysort) - Verified skill/installer.ts exists with installSkill and uninstallSkill functions - Copies skill files to SKILLS_DIR and updates manifest with installed metadata
- Verified skill/fetcher/github.ts exists with 200 lines implementing git and tarball fetching - fetchRegistry() entry point with hasGit() check and tarball fallback - scanSkills() walks directories matching SKILL.md globs with minimatch - parseSkillFile() extracts YAML frontmatter for skill metadata
- Verified skill/fetcher/clawdhub.ts exists with stub fetchRegistry returning [] - Verified skill/fetcher/url.ts exists with stub fetchRegistry returning [] - Both are TODO stubs awaiting API contract confirmation and implementation
Resolved conflicts: - bun.lock (kept fork lockfile) - packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx (merged provider status info) - packages/opencode/src/cli/cmd/tui/component/tips.tsx (kept shuvcode tips) - sdks/vscode/package.json (kept shuvcode branding, bumped version)
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
Testing
Greptile Summary
This PR successfully merges upstream tag v1.1.20 into the shuvcode-dev fork, bringing significant feature updates including provider connection status tracking, enhanced session filtering, improved permissions handling, and new plugin capabilities. The merge involved resolving conflicts in the provider dialog, tips system, VSCode package metadata, and dependency lock files. All conflict resolutions appear correct, with the fork preserving its custom branding (Shuvcode ASCII logo) while integrating upstream improvements.
Key Changes:
- **Provider Dialog Enhancement**: Added visual feedback showing which providers are currently connected via a "Connected" footer indicator - **Session Management**: New `directory` and `roots` query parameters enable filtering sessions by project directory and root-only sessions - **Permissions System**: Updated agent configuration to properly authorize external directory access for plan files - **Plugin API**: Extended tool context with `metadata()` and `ask()` methods for enhanced plugin capabilities - **Database Migrations**: Added `time_subscription_booked` timestamp and `subscription_plan` enum for billing improvements - **Console Branding**: New BlackLayout component for console homepage with GitHub integration - **Skills Configuration**: SDK now supports registries configuration for managing skill sources - **Code Quality**: Documentation improvements to auth info endpoint descriptions and refactored variable naming for clarityConfidence Score: 5/5
Important Files Changed
connectedmemo and display status in footer. Code formatting improved with consistent indentation. No logical issues detected; proper handling of OAuth authorization flow.directoryandrootsquery parameters for filtering. Auth info endpoint documentation improved. Variable naming refactored (oauthAuth→oauth) for consistency. API documentation descriptions enhanced. No logic issues detected.path.join()andpath.relative(). No logic issues detected.AuthInfoDataand related types added for auth information endpoint. All changes are additive with no breaking modifications to existing types.time_subscription_bookedtimestamp column to billing table for tracking subscription booking time. Simple schema alteration with no data implications.subscription_planenum column to billing table with values ('20','100','200'). Properly structured enum for plan tiers without data safety concerns.Sequence Diagram
sequenceDiagram participant User participant TUI as TUI Dialog participant SDK as SDK Client participant Server participant Provider User->>TUI: Select provider to connect TUI->>TUI: Create dialog with connected status User->>TUI: Choose authentication method alt OAuth Method TUI->>SDK: Call provider.oauth.authorize SDK->>Server: POST /provider/oauth/authorize Server->>Provider: OAuth authorization request Provider-->>Server: Authorization code Server-->>SDK: Return code/auto method SDK-->>TUI: Display OAuth flow else API Key Method TUI->>TUI: Show ApiMethod dialog User->>TUI: Enter API key TUI->>SDK: Store API key end Server->>Server: Filter sessions by directory/roots Server->>Server: Return filtered session list Note over Server,Provider: New session filtering and auth metadata endpoints