Description
When OPENCODE_EXPERIMENTAL_HTTPAPI is enabled, the workspace HttpApi read endpoints exist but are not mounted through the live InstanceRoutes Hono bridge.
Direct ExperimentalHttpApiServer coverage for workspace reads passes, but the flag-mounted route surface returns 404 for:
GET /experimental/workspace/adaptor
GET /experimental/workspace
GET /experimental/workspace/status
This is adjacent to #24062, which added the workspace HttpApi read group, and #24216, which added bridge-level coverage. The missing piece is that WorkspacePaths are not registered in packages/opencode/src/server/routes/instance/index.ts.
Steps to reproduce
- Enable
OPENCODE_EXPERIMENTAL_HTTPAPI.
- Request
GET /experimental/workspace/adaptor through InstanceRoutes with x-opencode-directory set to a git project directory.
- The route returns
404.
A bridge-level regression test reproduced this before the fix:
expect(adaptors.status).toBe(200)
// Received: 404
Expected behavior
The workspace read endpoints should route through the same Effect HttpApi bridge as the other migrated endpoints and return the workspace adaptor/list/status responses.
Actual behavior
The live Hono bridge returns 404 because the workspace paths are not registered.
Scope
This should only need mounting the existing WorkspacePaths in InstanceRoutes and adding bridge-level coverage for the three workspace read endpoints.
Description
When
OPENCODE_EXPERIMENTAL_HTTPAPIis enabled, the workspace HttpApi read endpoints exist but are not mounted through the liveInstanceRoutesHono bridge.Direct
ExperimentalHttpApiServercoverage for workspace reads passes, but the flag-mounted route surface returns404for:GET /experimental/workspace/adaptorGET /experimental/workspaceGET /experimental/workspace/statusThis is adjacent to #24062, which added the workspace HttpApi read group, and #24216, which added bridge-level coverage. The missing piece is that
WorkspacePathsare not registered inpackages/opencode/src/server/routes/instance/index.ts.Steps to reproduce
OPENCODE_EXPERIMENTAL_HTTPAPI.GET /experimental/workspace/adaptorthroughInstanceRouteswithx-opencode-directoryset to a git project directory.404.A bridge-level regression test reproduced this before the fix:
Expected behavior
The workspace read endpoints should route through the same Effect HttpApi bridge as the other migrated endpoints and return the workspace adaptor/list/status responses.
Actual behavior
The live Hono bridge returns
404because the workspace paths are not registered.Scope
This should only need mounting the existing
WorkspacePathsinInstanceRoutesand adding bridge-level coverage for the three workspace read endpoints.