This repository was archived by the owner on May 18, 2026. It is now read-only.
refactor: migrate to Bun monorepo built on forked OpenCode source#5
Merged
Conversation
- Fork anomalyco/opencode into packages/opencode; rename binary opencode → ow - Add packages/workspace: TypeScript port of all tool-retrieval logic (corpus indexer, embedder, MCP client, semantic search, telemetry) - Add ow corpus index|retrieve|stats|mcp-serve commands natively to the binary - Add ow ws command for tmux workspace management - Register ToolRetrievalPlugin as a built-in internal plugin (no separate install) - Remove Node.js wrapper: bin/, src/, lib/, unit-tests/, package-lock.json - Add Bun workspace root: package.json, bun.lock, bunfig.toml, turbo.json - Update Makefile: make install/build/dev/smoke use bun directly - Binary built from source via: make build (bun run build --single --skip-embed-web-ui)
- Remove obsolete feature files: installation, mcp-servers, permissions - Rewrite retrieval.feature for search() / ow corpus retrieve - Update 8 feature files for new ow architecture (paths, command names) - Add testability hooks: createTestDb, loadConfigFromFile, appendSessionToFile, readSessionsFromFile, loadMcpEnvFromFile, export bruteForceSearch, extract handleSearchTools - Write 8 test files (70 tests, 0 failures, ~80 ms): config, hash, corpus, search, telemetry, mcp-client, mcp-serve, plugin - Rewrite AGENTS.md: BDD-first workflow is now the opening rule - Update CI workflow: bun test runs before make build
When TMUX env var is not set, intercept zero-arg invocation in index.ts and call runWorkspace() directly. Inside tmux (right pane or any tmux context), TMUX is set so the check is skipped and the TUI starts normally. Extract runWorkspace() from effectCmd handler so it can be called without the Effect runtime.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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