forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 3
Merge shuvcode-dev: upstream v1.0.204 sync + TypeScript fix #209
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
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
… gemini-cli values
Co-authored-by: Github Action <action@github.com>
Co-authored-by: Adam <2363879+adamdotdevin@users.noreply.github.com>
…alyco#6199) Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
…pm install method
This reverts commit 26e7043.
This reverts commit 505068d.
…auto-compaction and pruning via config instead of flags
- Reorder sections: Context, Subagents, MCP, LSP, Changed Files - Make Context section collapsible with token count summary - Add collapse indicators to all sections (remove threshold logic) - Show summaries when collapsed (counts, status info) - Rename 'Modified Files' to 'Changed Files' - Remove unused Todo section from sidebar
Merged upstream changes while preserving fork features: - AskQuestion wizard tool - Better styling for small screens (tall()/wide() responsive layout) - Draggable sidebar resize - Search in messages - Bash output with ANSI - Double Ctrl+C to exit - Live token usage - Subagents sidebar - Desktop slash commands, theme/font pickers - Shuvcode branding and shuv.ai infrastructure Added from upstream: - animations_enabled toggle for spinner - Compaction config (auto/prune options) - MDNS import for server - PermissionList types - Permission toast and sorting - MCP/LSP status indicators - New permission-parts styles
…ration The fork's additional routes pushed Hono's type depth over TypeScript's limit. Added type cast to break the chain in generateSpecs() call.
Collaborator
Author
|
@greptileai review |
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
Changes
Commits included
Greptile Summary
Syncs upstream v1.0.204 into the shuvcode fork and applies a TypeScript fix to resolve the TS2589 deep type instantiation error caused by additional routes in the fork.
Key Changes:
as anytype assertion inopenapi()function to prevent Hono's route type depth from exceeding TypeScript's limitFilesystem.contains()checks inFile.read()andFile.list()with comprehensive test coverageOPENCODE_DISABLE_AUTOCOMPACT,OPENCODE_DISABLE_PRUNE) to config-based system (compaction.auto,compaction.prune)GET /permissionendpoint to list pending permissions across all sessionsdev-dist/to .gitignoreNotable Implementation Details:
Confidence Score: 4/5
as anycast is appropriately scoped to the OpenAPI generation, and all major changes have corresponding tests. The documented TODOs about symlinks and Windows paths in the security checks are acceptable given the lexical protection is still a significant improvement. Score of 4 (not 5) reflects the type assertion workaround and the known limitations in path traversal protection that should be addressed in future work.packages/opencode/src/file/index.ts- ensure the path traversal TODOs are tracked for future symlink and Windows path resolutionImportant Files Changed
Sequence Diagram
sequenceDiagram participant Client participant Server participant MDNS participant FileAPI participant Filesystem participant Permission participant Config participant Compaction Note over Client,Server: Server Initialization Client->>Server: listen({port, hostname, mdns: true}) Server->>Server: tryServe(4096) or tryServe(0) alt mDNS enabled and non-loopback Server->>MDNS: publish(port) MDNS-->>Server: service published else loopback hostname Server->>Server: warn("skipping mDNS publish") end Server-->>Client: server instance Note over Client,FileAPI: File Access with Path Traversal Protection Client->>Server: GET /file/content?path=../../../etc/passwd Server->>FileAPI: File.read("../../../etc/passwd") FileAPI->>Filesystem: contains(projectDir, fullPath) Filesystem-->>FileAPI: false (path escapes) FileAPI-->>Server: throw "Access denied" Server-->>Client: 500 Error Client->>Server: GET /file/content?path=valid.txt Server->>FileAPI: File.read("valid.txt") FileAPI->>Filesystem: contains(projectDir, fullPath) Filesystem-->>FileAPI: true FileAPI-->>Server: file contents Server-->>Client: 200 OK Note over Client,Permission: Permission Management Client->>Server: GET /permission Server->>Permission: list() Permission-->>Server: pending permissions array Server-->>Client: permissions JSON Note over Client,Compaction: Session Compaction Client->>Server: Agent completes turn Server->>Compaction: isOverflow({tokens, model}) Compaction->>Config: get() Config-->>Compaction: {compaction: {auto: true}} Compaction-->>Server: true/false alt overflow detected Server->>Compaction: prune({sessionID}) Compaction->>Config: get() Config-->>Compaction: {compaction: {prune: true}} Compaction->>Compaction: remove old tool calls end Note over Server,MDNS: Server Shutdown Client->>Server: server.stop() Server->>MDNS: unpublish() MDNS-->>Server: service unpublished Server-->>Client: shutdown complete