Commit a009a31
committed
feat: indexer config recovery, question tool focus fix, comprehensive CPU optimization, MCP OAuth client profile workaround, Session Mind fixes, and memory leak prevention
Session Mind improvements:
- Publish Session.Event.Finished in prompt.ts for short session capture
- Add 60s timeout + 2 retries with exponential backoff for memory extraction LLM
- Add async indexing functions for immediate memory searchability
- Add exponential backoff retry queue for transient indexing failures
- Enable Session Mind features by default (saveMemories, enrich_compaction)
- Increase context limits (max_tokens: 2000, max_memories: 5, max_sessions: 5)
- Enhanced degraded mode logging (info level)
- Updated OpenAPI schema defaults and regenerated SDK types
Memory leak prevention (from upstream PRs anomalyco#14650, anomalyco#13186, anomalyco#12259, anomalyco#9149):
- ACP session TTL (1h) and LRU eviction (max 50 sessions) with 5min cleanup
- Signal handlers (SIGTERM/SIGINT/SIGHUP) for graceful shutdown in serve/worker/CLI
- LSP client limit (max 20) with oldest-client eviction
- Plugin dispose hook for cleanup on Instance.disposeAll()
- O(1) string building: textParts[] in copilot message conversion
- O(1) string building: argumentChunks[] in copilot tool call streaming
- O(1) buffer management: bufferChunks[] in PTY with 2MB limit
- 50ms throttled flush in session processor to batch streaming deltas
- LRU cache utility for reusable memory-bounded caching
Tests added (44 new tests, 2435 total pass):
- ACP session manager tests (TTL expiry, LRU eviction, basic ops)
- LSP client limit eviction test
- Plugin dispose hook tests
- PTY buffer chunk tests
- Session processor flush throttling tests
- LRU cache utility tests1 parent b985ea3 commit a009a31
File tree
318 files changed
+184825
-32162
lines changed- .githooks
- .husky
- .opencode/skill
- git-sync-default-rebase-force
- wezterm-test
- cmd
- opencode-embedder-py
- opencode_embedder
- tests
- opencode-indexer
- src
- actor
- tests
- github
- packages
- app/src
- components
- i18n
- pages/session
- opencode
- scripts
- script
- src
- acp
- agent
- prompt
- auth
- bun
- bus
- cli/cmd
- tui
- component
- prompt
- context
- routes
- session
- ui
- util
- codebase
- command
- template
- config
- embedder
- file
- global
- lsp
- mcp
- notification
- providers
- plugin
- project
- provider
- sdk/copilot
- chat
- responses/tool
- pty
- server
- routes
- session
- prompt
- snapshot
- storage
- tool
- util
- test
- acp
- agent
- auth
- bun
- bus
- cli
- tui
- codebase
- config
- embedder
- file
- fixture
- lsp
- lsp
- mcp
- memory
- notification
- plugin
- provider
- pty
- server
- session
- snapshot
- tool
- fixtures
- util
- plugin/src
- script/src
- sdk
- js
- script
- src
- gen
- core
- v2/gen
- core
- web/src/content/docs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
318 files changed
+184825
-32162
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
0 commit comments