Commit graph

153 commits

Author SHA1 Message Date
Dax Raad
3eee2f6afa core: move cross-spawn-spawner from opencode to core package
Moved the cross-spawn-spawner module from packages/opencode to packages/core
to enable code sharing across the monorepo. This consolidates the process
spawning infrastructure into the core package so other packages can use
cross-platform child process spawning without duplicating the implementation.

Updated all import statements across the codebase to reference the new
location (@opencode-ai/core/effect/cross-spawn-spawner). Removed the
local copy from the opencode package along with its tests.
2026-04-25 14:23:17 -04:00
Dax Raad
705f792e87 core: move Global module to @opencode-ai/core for centralized path management
Move the Global module from packages/opencode/src/global to packages/core/src/global
to provide a unified location for managing XDG directories and application paths.
This eliminates duplicate path definitions across packages and ensures consistent
access to data, config, cache, state, log, and bin directories throughout the codebase.
2026-04-25 13:52:32 -04:00
Dax Raad
1a734adb4d core: consolidate shared infrastructure into core package
Moves effect logging, observability, runtime utilities, flags, installation
version info, and process utilities from opencode to core package. This
enables better code sharing across packages and establishes core as the
single source of truth for foundational utilities.

All internal imports updated to use @opencode-ai/core paths for consistency.
2026-04-25 13:30:37 -04:00
Dax
62ef2a2207
refactor: rename shared package to core (#24309) 2026-04-25 10:59:17 -04:00
Kit Langton
011c23761b
feat(httpapi): bridge mcp status endpoint (#24100) 2026-04-24 09:18:57 -04:00
Kit Langton
cd93533b1f
refactor(bus): migrate BusEvent to Effect Schema (#24040) 2026-04-23 15:37:44 -04:00
Kit Langton
1dd257b76a
refactor: use instance state in small services (#23022) 2026-04-18 02:16:15 +00:00
Kit Langton
fdd5b77bfd
refactor: unwrap McpAuth namespace + self-reexport (#22942) 2026-04-17 00:01:12 +00:00
Kit Langton
4e27804160
refactor: unwrap McpOAuthCallback namespace + self-reexport (#22943) 2026-04-17 00:00:46 +00:00
Kit Langton
5fccdc9fc7
refactor: collapse mcp barrel into mcp/index.ts (#22913) 2026-04-16 20:36:23 +00:00
Kit Langton
2fe9d94470
fix: remove 8 more unnecessary as any casts in opencode core (#22877) 2026-04-16 19:27:53 +00:00
Dax Raad
33bb847a1d config: refactor 2026-04-16 12:40:24 -04:00
Dax
675a46e23e
CLI perf: reduce deps (#22652) 2026-04-16 02:03:03 -04:00
Kit Langton
343a564183
feat: unwrap 11 util namespaces to flat exports + barrel (#22739) 2026-04-15 23:15:58 -04:00
Kit Langton
379e40d772
feat: unwrap InstanceState + EffectBridge namespaces to flat exports + barrel (#22721) 2026-04-16 02:45:45 +00:00
Kit Langton
cce05c1665
fix: clean up 49 unused variables, catch params, and stale imports (#22695) 2026-04-16 02:01:53 +00:00
opencode-agent[bot]
70aeebf2df chore: generate 2026-04-16 01:57:23 +00:00
Kit Langton
6625766350
feat: unwrap MCP namespace to flat exports + barrel (#22693) 2026-04-16 01:56:02 +00:00
Kit Langton
bbdbc107ae
feat: unwrap Config namespace to flat exports + barrel (#22689) 2026-04-15 21:26:24 -04:00
Kit Langton
f1751401aa
fix(effect): add effect bridge for callback contexts (#22504) 2026-04-15 15:22:34 +00:00
Dax
be9432a893
shared package (#22626) 2026-04-15 14:26:20 +00:00
Kit Langton
4626458175
fix(mcp): persist immediate oauth connections (#22376) 2026-04-14 13:56:45 -04:00
Kit Langton
29c202e6ab
refactor(mcp): remove mcp auth async facade exports (#22338) 2026-04-13 15:36:12 -04:00
Kit Langton
1dc69359d5
refactor(mcp): remove async facade exports (#22324) 2026-04-13 13:45:34 -04:00
Kit Langton
9581bf0670
refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
opencode-agent[bot]
2a8a59ded9 chore: generate 2026-04-11 02:56:03 +00:00
Kit Langton
5917ac2162
fix: provide EffectLogger.layer to bare Effect.runPromise/runFork calls (#21974) 2026-04-10 22:55:08 -04:00
Kit Langton
cf27a73397
feat: add AppRuntime for unified service composition (#21953) 2026-04-10 19:46:52 -04:00
Kit Langton
9f54115c5d
refactor: remove unused runtime facade exports (#21731) 2026-04-09 14:52:06 -04:00
Aleksandr Lossenko
a7743e6467
feat(mcp): add OAuth redirect URI configuration for MCP servers (#21385)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-04-09 11:45:52 -05:00
Kit Langton
8bdcc22541
refactor(effect): inline session processor interrupt cleanup (#21593) 2026-04-08 21:19:01 -04:00
Dax
2e4c43c1cf
refactor: replace Bun.serve with Node http.createServer in OAuth handlers (#18327)
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
2026-04-06 12:17:29 -04:00
Kit Langton
8942fc21aa
refactor(effect): prune unused facades (#20748) 2026-04-02 20:15:09 -04:00
Kit Langton
5fd833aa18
refactor: standardize InstanceState variable name to state (#20267) 2026-04-01 10:39:43 -04:00
opencode-agent[bot]
b242a8d8e4 chore: generate 2026-03-27 01:47:36 +00:00
Kit Langton
9c6f1edfd7
refactor(effect): yield services instead of promise facades (#19325) 2026-03-26 21:46:38 -04:00
opencode-agent[bot]
c333e914ee chore: generate 2026-03-26 18:42:59 +00:00
Kit Langton
2e6ac8ff49
fix(mcp): close transport on failed/timed-out connections (#19200) 2026-03-26 14:41:00 -04:00
Kit Langton
ea04b23745
skill: use Effect.cached for load deduplication (#19165) 2026-03-26 00:55:43 +00:00
Kit Langton
b90de755f9
fix+refactor(mcp): lifecycle tests, cancelPending fix, Effect migration (#19042) 2026-03-25 20:15:05 -04:00
Dax
52a7a04ad8
refactor: replace Bun shell execution with portable Process utilities (#18318) 2026-03-19 21:17:06 -04:00
opencode-agent[bot]
4f982ddb94 chore: generate 2026-03-10 02:02:18 +00:00
adam jones
ff3bb7424d
fix(mcp): fix OAuth auto-connect failing on first connection (#15547)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-03-09 21:01:19 -05:00
Dax Raad
bf35a865ba refactor: replace Bun.connect with net.createConnection 2026-03-05 22:17:08 -05:00
ryanwyler
c4c0b23bff
fix: kill orphaned MCP child processes and expose OPENCODE_PID on shu… (#15516) 2026-03-01 18:08:17 +05:30
Dax
02a9495063
Remove use of Bun.file (#14215) 2026-02-19 11:32:32 -05:00
Dax Raad
568eccb4c6 Revert: all refactor commits migrating from Bun.file() to Filesystem module 2026-02-18 19:41:14 -05:00
Dax
9e6cb89101
refactor: migrate src/mcp/auth.ts from Bun.file()/Bun.write() to Filesystem module (#14125) 2026-02-18 19:20:16 -05:00
Eduardo Gomes
fb79dd7bf8
fix: Invalidate oauth credentials when oauth provider says so (#14007)
Co-authored-by: Eduardo Gomes <egomes@cloudflare.com>
2026-02-17 12:46:26 -06:00
Aiden Cline
3befd0c6c5
tweak: use promise all for mcp listTools calls (#13229) 2026-02-12 00:19:53 +00:00
Aiden Cline
75166a1961
fix: use ?? to prevent args being undefined for mcp server in some cases (#11203) 2026-01-29 22:00:12 +00:00
adamelmore
65e1186efe
wip(app): global config 2026-01-28 07:28:03 -06:00
karta0807913
29cebd73e5
feat(mcp log): print mcp stderr to opencode log file (#9982)
Co-authored-by: chuxuan.liang <chuxuan.liang@bytedance.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-01-22 10:02:26 -06:00
msvechla
8f62d4a5e3
fix(mcp): register OAuth callback before opening browser (#9646) 2026-01-20 10:18:49 -06:00
Aiden Cline
33290c54cd Revert "feat(mcp): add OAuth redirect URI configuration for MCP servers (#7379)"
This reverts commit 40b275d7e6.
2026-01-16 22:17:33 -06:00
GitHub Action
0233dd1b39 chore: generate 2026-01-16 05:37:24 +00:00
Christopher Tso
40b275d7e6
feat(mcp): add OAuth redirect URI configuration for MCP servers (#7379) 2026-01-15 23:36:48 -06:00
Dan Lapid
b572c68100
fix(mcp): show auth URL when browser cannot open in remote sessions (#7884) 2026-01-15 20:21:39 -05:00
Dax
dd1f981d23
fix: honor per-server MCP timeouts (#8706) 2026-01-15 11:31:31 -05:00
Daniel Sauer
80e1173ef7
fix(mcp): close existing client before reassignment to prevent leaks (#8253) 2026-01-13 12:38:34 -06:00
Aiden Cline
e5abe1e78b tweak: bump default to 30 seconds (lots of people complained about 5...) 2026-01-04 13:26:43 -06:00
Paolo Ricciuti
21dc3c24d9
feat: mcp resources (#6542) 2026-01-04 09:12:54 -06:00
Rhys Sullivan
586e7347bd
fix(mcp): add timeout to client.connect() calls (#6760) 2026-01-03 11:54:24 -06:00
Jake Nelson
5c5e636030
feat: add per-project MCP config overrides (#5406)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-01-03 01:15:37 -06:00
Paolo Ricciuti
5249f04ea0
fix: display MCP tag for prompts in autocomplete but not in prompt (#6531) 2025-12-31 09:34:36 -06:00
Paolo Ricciuti
57a2b5f444
feat: mcp prompts as slash commands (alternative) (#5767)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-12-31 00:51:25 -06:00
Dax Raad
ed4ce67cdc core: add configurable timeout for MCP tool calls to prevent hanging requests 2025-12-30 23:06:07 -05:00
Daniel Polito
6e8cd3174c
Include current working directory in local MCP transport (#6303) 2025-12-28 13:09:24 -06:00
Abdelkader Boudih
f4d61be8bd
feat(mcp): handle tools/list_changed notifications (#5913)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-12-23 19:36:37 -06:00
Matt Silverlock
1a2b656c4d
improve mcp CLI + ability to debug MCP oauth (#5980) 2025-12-22 22:27:38 -06:00
Abdelkader Boudih
2f48c8c05f
fix: use official MCP SDK for better tool schema handling (#5463) 2025-12-21 11:31:07 -06:00
Rohan Mukherjee
7427b887f9
MCP improvements (#5699) 2025-12-17 20:49:45 -06:00
Paolo Ricciuti
57c3cf1f8b
fix: send mcpName as state if authUrl doesn't have state (#5681) 2025-12-17 10:26:23 -06:00
André Cruz
87a03e1e30
fix(mcp): send custom headers regardless of OAuth settings (#5273)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2025-12-09 09:52:39 -06:00
Daniel Polito
203f3312ee
feat: ability to toggle MCP Servers in TUI (#4509) 2025-12-08 11:31:22 -06:00
André Cruz
509e43d6f8
feat(mcp): add OAuth authentication support for remote MCP servers (#5014) 2025-12-07 15:47:27 -05:00
Adam
acf1dd8500
wip(share): more styling 2025-11-24 15:10:40 -06:00
althafdemiandra
468927e06a
chore: bump ai-sdk to v5.0.97 (#4518)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-19 18:44:33 -06:00
Aiden Cline
090d27df11 chore: rm debug logs 2025-11-07 14:00:18 -06:00
Aiden Cline
73cd8a334c
rework acp to compensate for changes in Zed IDE (#4050) 2025-11-07 13:57:12 -06:00
Aiden Cline
1e0596bc46
ACP: update package, fix slash command bug (#3906) 2025-11-05 00:50:48 -06:00
Dmytro Tiapukhin
e5a651eef7
fix: better mcp sanitization (#3842)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-03 15:19:49 -06:00
Aiden Cline
55d07a139c
fix: mcp error (#3847) 2025-11-03 15:04:53 -06:00
Dax
96bdeb3c7b
OpenTUI is here (#2685) 2025-10-31 15:07:36 -04:00
Haris Gušić
c1ada302f9
fix: Opencode hangs after exit (#3481)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-10-30 23:57:58 -05:00
Matt Gillard
3ae75d7031
add optional timeout field to mcp config to allow users to use responding servers (#3558)
Co-authored-by: Matt Gillard <matt-github@gillard.biz>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-10-30 01:25:24 -05:00
kcrommett
5cc37c4ea0
mcp: fix status() to not overwrite connected with failed (#3514) 2025-10-28 16:16:03 -05:00
Aiden Cline
982954cc1b
feat (acp): mcp server support, file diffs, some default slash commands (/init, /compact), show todos properly (#3490)
The mcp server support does not mean acp didn't allow u to use mcp servers previously, it means that now you can connect new servers via ACP instead of relying on the opencode defined ones
2025-10-28 00:08:30 -05:00
Aiden Cline
1a6fd018f6 Revert "fix: Explicitly exit CLI to prevent hanging subprocesses (#3083)"
This reverts commit a9624c0fff.
2025-10-27 01:30:13 -05:00
Haris Gušić
a9624c0fff
fix: Explicitly exit CLI to prevent hanging subprocesses (#3083)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-10-27 00:03:10 -05:00
Jérôme Benoit
0eb899a950
chore: cleanup versioned zod imports (#3460)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-10-26 14:50:41 -05:00
Dax Raad
a440e09cfe core: improve MCP reliability and add status monitoring
- Added 5-second timeout to MCP client verification to prevent hanging connections
- New GET /mcp endpoint to monitor server connection status
- Automatically removes unresponsive MCP clients during initialization
2025-10-07 04:04:19 -04:00
Dax
c1b4e1f19d
Upgrade to Zod v4 (#2605)
Co-authored-by: GitHub Action <action@github.com>
2025-09-15 03:12:07 -04:00
Dax
f993541e0b
Refactor to support multiple instances inside single opencode process (#2360)
This release has a bunch of minor breaking changes if you are using opencode plugins or sdk

1. storage events have been removed (we might bring this back but had some issues)
2. concept of `app` is gone - there is a new concept called `project` and endpoints to list projects and get the current project
3. plugin receives `directory` which is cwd and `worktree` which is where the root of the project is if it's a git repo
4. the session.chat function has been renamed to session.prompt in sdk. it no longer requires model to be passed in (model is now an object)
5. every endpoint takes an optional `directory` parameter to operate as though opencode is running in that directory
2025-09-01 17:15:49 -04:00
Jakub Kopecký
a928a35c96
fix: mcp client name (#2289) 2025-08-28 12:48:29 -05:00
spoons-and-mirrors
b223a29603
Fix: Sanitize MCP Tool Names for Consistency in User Expectations (#1769) 2025-08-11 01:59:50 -04:00
rmoriz
83f4e8e156
Clarify remote mcp error (#1729)
Co-authored-by: opencode <noreply@opencode.ai>
2025-08-08 20:04:26 -04:00
Aiden Cline
022c979d28
tweak: sanitize mcp server names (#831) 2025-08-01 09:11:40 -05:00
Dax Raad
e8eaa77bf1 better mcp support - should fix hanging when streamable http server is added 2025-07-25 19:19:47 -04:00
Aiden Cline
a1fdeded3e
tweak: allow mcp servers to include headers (#1096) 2025-07-17 09:11:48 -05:00