Commit Graph

417 Commits

Author SHA1 Message Date
Aiden Cline e1fa90e514 refactor(core): defer mcp prompt commands 2026-06-29 19:53:44 -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 931323005c feat(core): log mcp server messages (#34529) 2026-06-29 18:28:17 -05: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 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
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
Aiden Cline 644b90d975 client.ts 2026-06-29 10:13:13 -05:00
Aiden Cline 3e1022406d feat(core): move mcp to folder, parse config, add mcp sdk dep 2026-06-29 09:54:20 -05:00
Aiden Cline 135e04dddd read configs 2026-06-29 09:48:40 -05:00
Aiden Cline 0c1124bb94 mcp skeleton 2026-06-29 09:14:10 -05:00
Dax Raad 5ae93092aa refactor(core): replace bash tool with shell tool 2026-06-29 00:44:17 -04:00
Kit Langton 595c6bd4a7 feat: add v2 generate text endpoint (#34371) 2026-06-28 22:43:58 -04:00
Kit Langton 7073e8797f fix(core): remove per-prompt system option (#34361) 2026-06-28 21:56:59 -04:00
Kit Langton f7034a35a8 feat(core): add v2 manual compaction (#34336) 2026-06-28 21:18:19 -04:00
Kit Langton 53b93b6991 feat(sdk-next): let embedders contribute plugins via opencode.plugin (#34356) 2026-06-28 20:30:21 -04:00
opencode-agent[bot] 6067019434 fix(core): restore v2 model prompts (#34275)
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-28 14:47:20 -05:00
Dax 42a3cf9645 fix(core): commit staged revert before admitting new prompt (#34338) 2026-06-28 14:50:06 -04:00
Kit Langton 04c6bed240 feat(core): restore per-request system prompt (#34335) 2026-06-28 14:02:46 -04:00
Kit Langton 94e3a29d2f feat(core): wire v2 subagent tool (#34320) 2026-06-28 12:52:39 -04:00
Kit Langton 41283933ff chore: merge dev into v2 (#34317)
Co-authored-by: Brendan Allan <14191578+Brendonovich@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Affan Ali <93028901+affanali2k3@users.noreply.github.com>
Co-authored-by: affanali2k3 <affanalikhanxx@gmail.com>
Co-authored-by: Frank <frank@anoma.ly>
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: James Long <longster@gmail.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Jay V <air@live.ca>
Co-authored-by: Dax Raad <d@ironbay.co>
Co-authored-by: Aarav Sareen <96787824+arvsrn@users.noreply.github.com>
Co-authored-by: OpeOginni <107570612+OpeOginni@users.noreply.github.com>
Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com>
Co-authored-by: Ben Guthrie <benjee.012@gmail.com>
Co-authored-by: Dax <mail@thdxr.com>
Co-authored-by: Filip <34747899+neriousy@users.noreply.github.com>
2026-06-28 11:30:38 -04:00
Dax d1d7ebc2c6 feat(tui): wire up undo/redo and revert for V2 sessions (#34263) 2026-06-28 00:04:53 +00:00
Dax Raad b6553d14e1 fix(core): fail interrupted session steps 2026-06-27 01:16:30 -04:00
Dax Raad 6a16c41e8f fix(core): continue after tool defects 2026-06-26 22:02:30 -04:00
Dax Raad 658cbe9caf fix(core): load OpenCode provider config asynchronously 2026-06-26 21:16:15 -04:00
Dax Raad 655adbf46e fix: stabilize v2 runtime behavior 2026-06-26 20:56:36 -04:00
Dax Raad e6f660fecf feat(tui): add v2 terminal interface 2026-06-26 14:38:25 -04:00
opencode-agent[bot] 0e2dd4ad15 chore: generate 2026-06-26 17:56:55 +00:00
Dax Raad 1ac6b4bec4 fix(core): authorize external read paths 2026-06-26 13:55:04 -04:00
Dax Raad 850a0dfe7c fix(core): resolve prompt attachment mime types 2026-06-26 13:51:00 -04:00
Aiden Cline 0d3e0fc8f4 fix(core): enlarge OAuth callback card (#34082) 2026-06-26 10:16:51 -05:00
Aiden Cline 639c8e6475 tweak: update OAuth callback branding (#34081) 2026-06-26 10:08:29 -05:00
Shoubhit Dash 971518c6d9 fix(core): refresh cached remote skills (#34059) 2026-06-26 12:12:50 +00:00
Aiden Cline e8fea9e63a feat(oauth): unify OAuth callback browser pages (#34025) 2026-06-26 00:36:40 -05:00
Kit Langton ef5c9f4931 feat(sdk): expose active sessions (#33991) 2026-06-26 03:33:35 +00:00
Kit Langton 40ecfceec2 fix(sdk): wake embedded session execution (#33992) 2026-06-25 23:04:14 -04:00
Aiden Cline ded29f03f0 fix(core): refine small model defaults (#33926) 2026-06-25 20:31:53 -05:00
opencode-agent[bot] f428755851 feat(core): split MCP timeout configuration (#33977)
Co-authored-by: Test <test@opencode.test>
2026-06-25 20:31:00 -05:00
James Long 0e731c2a1a refactor(core): support tiered layer nodes (#33937) 2026-06-25 14:34:17 -04:00
Kit Langton f44423609b feat(sdk): restore session runtime operations (#33777) 2026-06-25 14:23:01 -04:00
opencode-agent[bot] ecabab49a7 chore: generate 2026-06-25 17:13:12 +00:00
Kit Langton 9e9d405d7e refactor(schema): tighten public contracts (#33771) 2026-06-25 17:10:23 +00:00
opencode-agent[bot] 77f2d2227a chore: generate 2026-06-25 15:44:27 +00:00
Kit Langton 7854f5b9f7 refactor(schema): normalize module patterns (#33770) 2026-06-25 15:42:22 +00:00
opencode 7c0e1b431c sync release versions for v1.17.11 2026-06-25 12:09:26 +00:00