opencode/packages/core
Ryan Vogel 251d978448 feat(core): place sessions and subagents on requested workspaces
A session's workspace placement could only be set through the internal Effect
SDK. This opens it to agents, plugins and the HTTP API behind the new
`workspaces` flag:

- `Session.create` accepts `parentID` together with an explicit `location`,
  so a child can run on a different placement; a plain `parentID` child still
  copies its parent.
- The `subagent` tool gains optional `workspaceID` and `directory`; reusing an
  existing child with a different placement fails instead of changing it.
- New `opencode` tools `workspace_providers`, `workspace_create` (create and
  provision) and `workspace_destroy`, permission-gated.
- `session_move` accepts `workspaceID` and passes the session's current one
  when omitted, so moving between directories no longer silently drops a
  workspace placement. Core move skips the host directory stat and host
  project resolution for workspace destinations; the Location layer resolves
  the project.
- Plugin `session.create` accepts `location.workspace`.
- HTTP: `experimental.workspaceID` on `session.create` and `session.move`,
  and a new experimental group `/api/experimental/workspace/*`
  (providers, create, provision, destroy). Generated clients regenerated.

Verified: `bun typecheck` in schema, core, plugin, protocol, server, client
and sdk; `bun run check` at the root; protocol experimental-identifiers test;
core session-create, session-move, tool-opencode, tool-subagent and plugin
tests; server session handler tests; sdk embedded test (child placed on a
workspace while a plain child inherits).
2026-11-05 10:28:23 -05:00
..
perf feat(server): let embedders supply the fetch for OpenCode's HTTP and MCP requests (#61582) 2026-11-04 04:13:45 -06:00
script refactor: run every benchmark with strobe (#60880) 2026-11-03 20:05:16 -06:00
src feat(core): place sessions and subagents on requested workspaces 2026-11-05 10:28:23 -05:00
test feat(core): place sessions and subagents on requested workspaces 2026-11-05 10:28:23 -05:00
bunfig.toml refactor(core): simplify integration test fixtures (#33292) 2026-06-22 04:15:34 +00:00
drizzle.config.ts refactor(core): move database schema ownership (#29068) 2026-05-30 21:08:38 -04:00
package.json refactor: run every benchmark with strobe (#60880) 2026-11-03 20:05:16 -06:00
README.md refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
schema.json refactor(core): store background job markers in a SQLite job table (#60491) 2026-10-30 07:50:16 -07:00
sst-env.d.ts refactor: rename shared package to core (#24309) 2026-04-25 10:59:17 -04:00
tsconfig.build.json feat(core): configure package publishing 2026-08-12 09:30:34 -04:00
tsconfig.json chore: upgrade typecheck to TypeScript 7.0.2 (#56300) 2026-10-17 13:26:46 -07:00
tsconfig.tests.json refactor: run every benchmark with strobe (#60880) 2026-11-03 20:05:16 -06:00

@opencode/core

Core runtime services for OpenCode.