@opencode/server 0.0.0-dev-19555 → 0.0.0-dev-19559

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.d.ts CHANGED
@@ -4541,7 +4541,6 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
4541
4541
  readonly time: import("effect/Schema").Struct<{
4542
4542
  readonly created: import("effect/Schema").Int;
4543
4543
  readonly updated: import("effect/Schema").Int;
4544
- readonly initialized: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Int>>, import("effect/Schema").optionalKey<import("effect/Schema").Int>, never, never>;
4545
4544
  }>;
4546
4545
  readonly sandboxes: import("effect/Schema").$Array<import("effect/Schema").String>;
4547
4546
  }>;
@@ -4573,7 +4572,6 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
4573
4572
  readonly time: import("effect/Schema").Struct<{
4574
4573
  readonly created: import("effect/Schema").Int;
4575
4574
  readonly updated: import("effect/Schema").Int;
4576
- readonly initialized: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Int>>, import("effect/Schema").optionalKey<import("effect/Schema").Int>, never, never>;
4577
4575
  }>;
4578
4576
  readonly sandboxes: import("effect/Schema").$Array<import("effect/Schema").String>;
4579
4577
  }>;
@@ -6156,13 +6154,6 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
6156
6154
  readonly type: import("effect/Schema").TemplateLiteral<readonly ["rpc.", import("effect/Schema").String]>;
6157
6155
  readonly location: import("effect/Schema").Struct<{
6158
6156
  readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
6159
- readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6160
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6161
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6162
- }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6163
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6164
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6165
- }>, never, never>;
6166
6157
  }>;
6167
6158
  readonly data: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>;
6168
6159
  }>, ...import("effect/Schema").Struct<{
@@ -6174,13 +6165,6 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
6174
6165
  readonly metadata: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>;
6175
6166
  readonly location: import("effect/Schema").optional<import("effect/Schema").Struct<{
6176
6167
  readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
6177
- readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6178
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6179
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6180
- }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
6181
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
6182
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
6183
- }>, never, never>;
6184
6168
  }>>;
6185
6169
  }>[]]>>, import("effect/Schema").Never, {
6186
6170
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
@@ -6199,8 +6183,6 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
6199
6183
  readonly data: {
6200
6184
  readonly form: {
6201
6185
  readonly id: string & import("effect/Brand").Brand<"Form.ID">;
6202
- readonly sessionID: string;
6203
- readonly title: string;
6204
6186
  readonly fields: readonly [{
6205
6187
  readonly type: "string";
6206
6188
  readonly key: string;
@@ -6380,6 +6362,8 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
6380
6362
  readonly description?: string | undefined;
6381
6363
  readonly title?: string | undefined;
6382
6364
  })[]];
6365
+ readonly sessionID: string;
6366
+ readonly title: string;
6383
6367
  readonly metadata?: {
6384
6368
  readonly [x: string]: unknown;
6385
6369
  } | undefined;
@@ -6529,7 +6513,6 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
6529
6513
  readonly time: {
6530
6514
  readonly created: number;
6531
6515
  readonly updated: number;
6532
- readonly initialized?: number | undefined;
6533
6516
  };
6534
6517
  readonly sandboxes: readonly string[];
6535
6518
  readonly name?: string | undefined;
@@ -8370,7 +8353,6 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
8370
8353
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
8371
8354
  readonly location: {
8372
8355
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8373
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8374
8356
  };
8375
8357
  readonly data: {
8376
8358
  readonly [x: string]: unknown;
@@ -8386,7 +8368,6 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
8386
8368
  readonly type: "server.connected";
8387
8369
  readonly location?: {
8388
8370
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
8389
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
8390
8371
  } | undefined;
8391
8372
  readonly metadata?: {
8392
8373
  readonly [x: string]: unknown;
@@ -6,7 +6,6 @@ export const LocationHandler = HttpApiBuilder.group(Api, "server.location", (han
6
6
  const location = yield* Location.Service;
7
7
  return new Location.Info({
8
8
  directory: location.directory,
9
- workspaceID: location.workspaceID,
10
9
  project: location.project
11
10
  });
12
11
  })));
@@ -29,7 +29,6 @@ export const SessionHandler = HttpApiBuilder.group(Api, "server.session", (handl
29
29
  return handlers.handle("session.list", Effect.fn(function* (ctx) {
30
30
  const query = ctx.query.cursor !== void 0 ? yield* SessionsCursor.parse(ctx.query.cursor).pipe(Effect.mapError(() => new InvalidCursorError({ message: "Invalid cursor" }))) : ctx.query, sessions = (yield* session.list({
31
31
  ...query,
32
- workspaceID: query.workspace,
33
32
  limit: ctx.query.limit ?? DefaultSessionsLimit
34
33
  })).data, first = sessions[0], last = sessions.at(-1);
35
34
  return {
@@ -133,7 +132,6 @@ export const SessionHandler = HttpApiBuilder.group(Api, "server.session", (handl
133
132
  yield* session.move({
134
133
  sessionID: ctx.params.sessionID,
135
134
  directory: ctx.payload.directory,
136
- workspaceID: ctx.payload.workspaceID,
137
135
  delivery: ctx.payload.delivery
138
136
  }).pipe(Effect.catchTag("Session.NotFoundError", missingSession), Effect.catchTag("Session.DestinationNotFoundError", (error) => Effect.fail(new InvalidRequestError({ message: `Directory does not exist: ${error.directory}` }))), Effect.catchTag("Session.DestinationNotDirectoryError", (error) => Effect.fail(new InvalidRequestError({ message: `Not a directory: ${error.directory}` }))), Effect.catchTag("Session.DestinationUnavailableError", (error) => Effect.fail(new InvalidRequestError({ message: `Directory is unavailable: ${error.directory}` }))));
139
137
  return HttpApiSchema.NoContent.make();
@@ -1,2 +1,2 @@
1
1
  import { Layer } from "effect";
2
- export declare const handlers: Layer.Layer<import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.generate"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.message"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.model"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.provider"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.session"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.permission"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.fs"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.form"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.command"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.skill"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.rpc"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.event"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.agent"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.plugin"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.server"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.debug"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.pty"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.experimental"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.shell"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.reference"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.location"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.integration"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.websearch"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.mcp"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.credential"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.project"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.worktree"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.vcs"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.migration"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.config"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.workspace">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("@opencode/util/global").Service | import("@opencode/core/bus").Service | import("@opencode/core/workspace").Service | import("@opencode/core/persistent-pty/index").Service | import("@opencode/core/location-service-map").Service | import("@opencode/core/session").Service | import("@opencode/core/instance").Service | import("./location").LocationMiddleware | import("./middleware/form-location").FormLocationMiddleware | import("./middleware/session-location").SessionLocationMiddleware | import("@opencode/core/pty/ticket").Service | import("@opencode/core/session/transfer").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/database/database").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/permission/saved").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/plugin/update").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("./server-info").Service> | import("./pty-environment").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/wellknown").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/project").Service>>;
2
+ export declare const handlers: Layer.Layer<import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.generate"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.message"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.model"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.provider"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.session"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.permission"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.fs"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.form"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.command"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.skill"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.rpc"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.event"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.agent"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.plugin"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.server"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.debug"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.pty"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.experimental"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.shell"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.reference"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.location"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.integration"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.websearch"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.mcp"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.credential"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.project"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.worktree"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.vcs"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.migration"> | import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.config">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | import("@opencode/util/global").Service | import("@opencode/core/bus").Service | import("@opencode/core/persistent-pty/index").Service | import("@opencode/core/location-service-map").Service | import("@opencode/core/session").Service | import("@opencode/core/instance").Service | import("./location").LocationMiddleware | import("./middleware/form-location").FormLocationMiddleware | import("./middleware/session-location").SessionLocationMiddleware | import("@opencode/core/pty/ticket").Service | import("@opencode/core/session/transfer").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/database/database").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/permission/saved").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/plugin/update").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("./server-info").Service> | import("./pty-environment").Service | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/wellknown").Service> | import("effect/unstable/http/HttpRouter").Request<"Requires", import("@opencode/core/project").Service>>;
package/dist/handlers.js CHANGED
@@ -30,5 +30,4 @@ import { VcsHandler } from "./handlers/vcs";
30
30
  import { EventFeed } from "./event-feed";
31
31
  import { MigrationHandler } from "./handlers/migration";
32
32
  import { ConfigHandler } from "./handlers/config";
33
- import { WorkspaceHandler } from "./handlers/workspace";
34
- export const handlers = Layer.mergeAll(ServerHandler, DebugHandler, MigrationHandler, LocationHandler, AgentHandler, PluginHandler, SessionHandler, MessageHandler, ModelHandler, GenerateHandler, ProviderHandler, IntegrationHandler, WebSearchHandler, McpHandler, CredentialHandler, ProjectHandler, FormHandler, PermissionHandler, FileSystemHandler, CommandHandler, SkillHandler, RpcHandler, EventHandler.pipe(Layer.provide(EventFeed.layer)), PtyHandler, PersistentPtyHandler, ShellHandler, ReferenceHandler, WorktreeHandler, WorkspaceHandler, VcsHandler, ConfigHandler);
33
+ export const handlers = Layer.mergeAll(ServerHandler, DebugHandler, MigrationHandler, LocationHandler, AgentHandler, PluginHandler, SessionHandler, MessageHandler, ModelHandler, GenerateHandler, ProviderHandler, IntegrationHandler, WebSearchHandler, McpHandler, CredentialHandler, ProjectHandler, FormHandler, PermissionHandler, FileSystemHandler, CommandHandler, SkillHandler, RpcHandler, EventHandler.pipe(Layer.provide(EventFeed.layer)), PtyHandler, PersistentPtyHandler, ShellHandler, ReferenceHandler, WorktreeHandler, VcsHandler, ConfigHandler);
package/dist/location.js CHANGED
@@ -2,7 +2,6 @@ import { Location } from "@opencode/core/location";
2
2
  import { LocationServiceMap } from "@opencode/core/location-services";
3
3
  import { AbsolutePath } from "@opencode/core/schema";
4
4
  import { Session } from "@opencode/core/session";
5
- import { Workspace } from "@opencode/core/workspace";
6
5
  import { InvalidRequestError } from "@opencode/protocol/errors";
7
6
  import { Effect, Layer, Schema } from "effect";
8
7
  import { HttpServerRequest } from "effect/unstable/http";
@@ -17,7 +16,6 @@ export function response(data) {
17
16
  return {
18
17
  location: new Location.Info({
19
18
  directory: location.directory,
20
- workspaceID: location.workspaceID,
21
19
  project: location.project
22
20
  }),
23
21
  data: yield* data
@@ -30,10 +28,9 @@ export const sessionInfo = Effect.fnUntraced(function* (sessions, sessionID) {
30
28
  return yield* sessions.get(id).pipe(Effect.catchTag("Session.NotFoundError", missingSession));
31
29
  });
32
30
  export function requestRef(request) {
33
- const query = new URL(request.url, "http://localhost").searchParams, workspaceID = query.get("location[workspace]") || request.headers["x-opencode-workspace"], directory = query.get("location[directory]") || (request.headers["x-opencode-directory"] ? decode(request.headers["x-opencode-directory"]) : process.cwd());
31
+ const directory = new URL(request.url, "http://localhost").searchParams.get("location[directory]") || (request.headers["x-opencode-directory"] ? decode(request.headers["x-opencode-directory"]) : process.cwd());
34
32
  return Location.Ref.make({
35
- directory: AbsolutePath.make(directory),
36
- workspaceID: workspaceID ? Workspace.ID.make(workspaceID) : void 0
33
+ directory: AbsolutePath.make(directory)
37
34
  });
38
35
  }
39
36
  function decode(input) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/server",
4
- "version": "0.0.0-dev-19555",
4
+ "version": "0.0.0-dev-19559",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -30,17 +30,17 @@
30
30
  "dependencies": {
31
31
  "@effect/platform-node": "4.0.0-rc.112",
32
32
  "@effect/platform-node-shared": "4.0.0-rc.112",
33
- "@opencode/core": "0.0.0-dev-19555",
34
- "@opencode/protocol": "0.0.0-dev-19555",
35
- "@opencode/schema": "0.0.0-dev-19555",
36
- "@opencode/simulation": "0.0.0-dev-19555",
37
- "@opencode/util": "0.0.0-dev-19555",
33
+ "@opencode/core": "0.0.0-dev-19559",
34
+ "@opencode/protocol": "0.0.0-dev-19559",
35
+ "@opencode/schema": "0.0.0-dev-19559",
36
+ "@opencode/simulation": "0.0.0-dev-19559",
37
+ "@opencode/util": "0.0.0-dev-19559",
38
38
  "drizzle-orm": "1.0.0-rc.5-169397b",
39
39
  "effect": "4.0.0-rc.112"
40
40
  },
41
41
  "devDependencies": {
42
- "@opencode/client": "0.0.0-dev-19555",
43
- "@opencode/plugin": "0.0.0-dev-19555",
42
+ "@opencode/client": "0.0.0-dev-19559",
43
+ "@opencode/plugin": "0.0.0-dev-19559",
44
44
  "@tsconfig/bun": "1.0.9",
45
45
  "@types/bun": "1.4.0",
46
46
  "@typescript/native-preview": "7.0.0-dev.20251207.1"
@@ -1,2 +0,0 @@
1
- import { Workspace } from "@opencode/core/workspace";
2
- export declare const WorkspaceHandler: import("effect/Layer").Layer<import("effect/unstable/httpapi/HttpApiGroup").Service<"server", "server.workspace">, never, import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/protocol/middleware/authorization").Authorization | Workspace.Service>;
@@ -1,20 +0,0 @@
1
- import { Workspace } from "@opencode/core/workspace";
2
- import { ConflictError, ProviderNotFoundError, UnknownError } from "@opencode/protocol/errors";
3
- import { Effect } from "effect";
4
- import { HttpApiBuilder } from "effect/unstable/httpapi";
5
- import { Api } from "../api";
6
- export const WorkspaceHandler = HttpApiBuilder.group(Api, "server.workspace", (handlers) => Effect.gen(function* () {
7
- const workspace = yield* Workspace.Service;
8
- return handlers.handle("workspace.create", (ctx) => workspace.create(ctx.payload).pipe(Effect.map((workspaceID) => ({ data: workspaceID })), Effect.catchTags({
9
- "Workspace.CreateConflict": (error) => new ConflictError({
10
- resource: error.workspaceID,
11
- message: `Workspace ${error.workspaceID} already uses provider ${error.existingProvider}, not ${error.provider}`
12
- }),
13
- "WorkspaceDriver.ProviderNotFound": (error) => new ProviderNotFoundError({
14
- providerID: error.provider,
15
- message: `Workspace provider not found: ${error.provider}`
16
- })
17
- }))).handle("workspace.destroy", (ctx) => workspace.destroy(ctx.params.workspaceID).pipe(Effect.mapError((error) => new UnknownError({
18
- message: error._tag === "WorkspaceDriver.ProviderNotFound" ? `Workspace provider not found: ${error.provider}` : error.message ?? "Workspace provider failed to destroy the workspace"
19
- }))));
20
- }));