Commit graph

14,601 commits

Author SHA1 Message Date
Aiden Cline
dd8e44ad8c Merge remote-tracking branch 'origin/v2' into mcp-prompts
# Conflicts:
#	packages/core/src/mcp/index.ts
2026-06-30 14:21:12 -05:00
Aiden Cline
38299a7e35 refactor(core): hide mcp prompt command source 2026-06-30 14:20:35 -05:00
Aiden Cline
0a60662d71
feat(cli): add mcp list, add, auth, and logout commands (#34643) 2026-06-30 13:49:07 -05:00
Kit Langton
194b0615e0
feat(plugin): support plugin-provided tools (#34619) 2026-06-30 13:18:56 -04:00
opencode-agent[bot]
a5c51e11d0
fix(core): drop legacy config filename (#34650)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
2026-06-30 11:12:15 -05:00
Aiden Cline
118bf05f32 Merge remote-tracking branch 'origin/v2' into mcp-prompts
# Conflicts:
#	packages/core/src/mcp/client.ts
#	packages/core/src/mcp/index.ts
2026-06-30 10:32:27 -05:00
opencode-agent[bot]
8f1db7d06d
fix(tui): align cli model picker behavior (#34571)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
2026-06-30 09:36:38 -05:00
Aiden Cline
b1ca070b3b
feat(core): add mcp support (#34513) 2026-06-30 08:37:44 -05:00
Aiden Cline
12887e572e
fix(core): align agent tests with universal default permissions (#34561) 2026-06-30 08:24:54 -05:00
Aiden Cline
75715e2115
fix(core): parse models.dev reasoning options (#34618) 2026-06-30 07:54:18 -05:00
Dax Raad
a1250cd690 test(sdk-next): update embedded client namespaces 2026-06-30 01:16:33 -04:00
Dax Raad
23adaaaeab feat(core): add native skill activation 2026-06-30 01:16:33 -04:00
opencode-agent[bot]
524ee8fc03
fix(core): gate v2 edit tools by model (#34558)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-06-29 23:53:41 -05:00
Aiden Cline
1c5dda1bc6 feat(core): register mcp prompt commands 2026-06-29 23:35:27 -05:00
Dax Raad
0f9719a7b5 fix(cli): support service autostart setting 2026-06-30 00:28:11 -04:00
Dax Raad
1b83c08b8a Update service configuration CLI 2026-06-30 00:18:26 -04:00
Dax Raad
02cb350880 feat(tui): refresh agents after update events 2026-06-30 00:18:26 -04:00
Aiden Cline
7d4965cb29 Revert "refactor(core): trim mcp event surface"
This reverts commit 1982e43f85.
2026-06-29 22:56:48 -05:00
opencode-agent[bot]
4ce830a919
fix(core): align v2 prompt tool names (#34557)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
2026-06-29 22:53:56 -05:00
Kit Langton
461a1c3ab4
refactor(core): replace background job service (#34559) 2026-06-29 23:53:35 -04:00
Aiden Cline
1982e43f85 refactor(core): trim mcp event surface 2026-06-29 20:53:23 -05:00
Aiden Cline
1d78a0ab95 refactor(core): defer mcp resource events 2026-06-29 20:49:36 -05:00
Aiden Cline
75819f2792 refactor(core): keep mcp prompts static 2026-06-29 20:12:33 -05:00
Kit Langton
6846542115
fix(client): singularize generated api groups (#34534) 2026-06-29 21:07:01 -04:00
Aiden Cline
e1fa90e514 refactor(core): defer mcp prompt commands 2026-06-29 19:53:44 -05:00
Aiden Cline
14dc46f0d0 chore(sdk): remove unrelated generated drift 2026-06-29 19:06:17 -05:00
Aiden Cline
9b7ad8f97e refactor(core): keep mcp command metadata minimal 2026-06-29 19:00:12 -05:00
Aiden Cline
1245420e53 feat(core): expose mcp prompts as commands 2026-06-29 18:53:36 -05:00
Aiden Cline
4ef19f2e6a feat(core): track mcp prompt changes 2026-06-29 18:47:57 -05:00
Aiden Cline
f725b48508 feat(core): support mcp prompts 2026-06-29 18:31:01 -05:00
Aiden Cline
f928b5be07
fix(core): sanitize registered tool names (#34512) 2026-06-29 18:30:40 -05:00
Aiden Cline
931323005c
feat(core): log mcp server messages (#34529) 2026-06-29 18:28:17 -05:00
Kit Langton
ecfa918760
feat(client): expose fs read in promise client (#34504) 2026-06-29 19:21:18 -04:00
Aiden Cline
d66c5f3bfa
fix(core): clean up mcp stdio descendants (#34525) 2026-06-29 18:07:43 -05:00
Aiden Cline
319be994b6 fix(core): migrate bare v1-shaped mcp config blocks
isV1 only triggered on a fixed set of top-level keys, so a config with just
$schema and a v1-shaped mcp block (servers directly under mcp, with enabled)
was parsed as v2 and silently produced zero servers. Detect the v1 mcp shape
(no servers wrapper, entries with a type) so these files migrate correctly.
2026-06-29 16:57:25 -05:00
Aiden Cline
73eb6ee473 feat(core): invoke and register mcp server tools
Add MCP.callTool plus a dynamic jsonSchema mode for Tool.make, and register
each MCP server's tools as canonical Location-scoped tools via an McpTool
producer that reconciles on tools-changed notifications. Content-first tool
results preserve image/audio blocks; remove the arbitrary pagination page cap;
log mcp connection outcomes.

Tool naming keeps v1 parity (server_tool) so existing deny rules apply.
2026-06-29 16:57:19 -05:00
Aiden Cline
f80624cf17
fix(tui): surface provider error in assistant footer (#34511) 2026-06-29 16:46:50 -05:00
Dax Raad
fe59174c23 fix(core): resume after synthetic session message 2026-06-29 17:32:54 -04:00
Dax Raad
2fe057324f fix(core): provide filesystem to shell tool 2026-06-29 17:27:24 -04:00
Dax Raad
19a5b5a05d feat(core): support background shell tool 2026-06-29 17:01:04 -04:00
Dax Raad
ff4cab03c1 refactor(core): simplify session fork event 2026-06-29 16:16:13 -04:00
Dax Raad
b2d46ecd7e feat(core): add durable session fork event 2026-06-29 16:13:51 -04:00
Dax Raad
360d85a521 fix(tui): indent subagent empty state 2026-06-29 15:46:51 -04:00
Dax Raad
c65a7d50c1 feat(tui): integrate composer picker 2026-06-29 15:37:09 -04:00
Dax Raad
fa73546a86 feat(tui): add composer tabs 2026-06-29 14:20:43 -04:00
Kit Langton
935ac2db91
feat(client): expose v2 project APIs (#34456) 2026-06-29 14:10:11 -04:00
Aiden Cline
5619595abc feat(core): list mcp server tools with change tracking
Add tools() and onToolsChanged() to the MCPClient.Connection abstraction:
list is capability-gated, paginated with cursor-dedup, and tolerates
unresolvable outputSchemas via a per-page fallback. Tool listing is folded
into connect so a listing failure marks the server failed rather than leaving
it connected with a silently empty list. Cache MCP.Tool values per server,
refresh on tools/list_changed notifications, and publish McpEvent.ToolsChanged.
MCP.tools() aggregates the cached tools across all connected servers.
2026-06-29 13:00:51 -05:00
Aiden Cline
d4e00c061d feat(core): surface mcp server instructions in the system prompt
Capture each server's initialize instructions on the Connection at connect
time and expose them via MCP.instructions(). Add McpGuidance, a system-context
source modeled on SkillGuidance, that renders the <mcp_instructions> block and
hides servers whose contributed tools are all denied for the agent.

instructions() returns just { server, instructions }; the guidance layer
fetches tools() separately and does the agent-aware permission correlation,
mirroring how SkillGuidance composes raw data with agent permissions.
2026-06-29 12:26:50 -05:00
Dax Raad
01edae4a7f fix(core): spawn shell non-interactively without sourcing rc files
ShellSelect.args() ran zsh/bash with -l and explicitly sourced .zshrc/.bashrc,
loading user functions and aliases that can shadow builtins and return non-zero
exit codes, breaking && chains. Match the old tool behavior: plain non-login
non-interactive shell -c command with cwd passed via spawn options.
2026-06-29 12:05:56 -04:00
Aiden Cline
baf3f5e5af feat(core): start mcp servers at boot with readiness-gated queries
Connect configured MCP servers in per-server child scopes at layer boot,
tracking status and a startup deferred per server. Query methods wait for
the relevant server(s) to finish startup before serving.

Drop the in-memory connect/disconnect/add overrides; runtime enable/disable
will come later through config updates. List methods (tools/instructions/
prompts/resourceCatalog) are aggregate across all servers with per-item
provenance; prompt/readResource stay server-scoped for routing.

Add a Connection abstraction in client.ts so the SDK Client never leaks
into the rest of core.
2026-06-29 11:00:14 -05:00