@opencode-ai/server 0.0.0-dev-17948 → 0.0.0-dev-17954

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.
Files changed (2) hide show
  1. package/dist/process.js +10 -3
  2. package/package.json +6 -6
package/dist/process.js CHANGED
@@ -3,7 +3,14 @@ import { NodeHttpServer } from "@effect/platform-node";
3
3
  import { SessionRestart } from "@opencode-ai/core/session/execution/restart";
4
4
  import { hasPtyConnectTicketURL } from "@opencode-ai/protocol/groups/pty";
5
5
  import { Cause, Context, Effect, Exit, Latch, Layer, Option, Ref, Scope } from "effect";
6
- import { HttpMiddleware, HttpRouter, HttpServer, HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
6
+ import {
7
+ HttpMiddleware,
8
+ HttpPlatform,
9
+ HttpRouter,
10
+ HttpServer,
11
+ HttpServerRequest,
12
+ HttpServerResponse
13
+ } from "effect/unstable/http";
7
14
  import { createServer } from "node:http";
8
15
  import { ServerAuth } from "./auth";
9
16
  import { isAllowedCorsOrigin } from "./cors";
@@ -33,10 +40,10 @@ export const start = Effect.fn("ServerProcess.start")(function* (options, lifecy
33
40
  return [];
34
41
  const host = address.family === "IPv6" ? `[${address.address}]` : address.address;
35
42
  return ServerInfo.connectionURLs(`http://${host}:${address.port}`, hostname);
36
- }).pipe(Layer.provide(NodeHttpServer.layerHttpServices)), applicationScope);
43
+ }).pipe(Layer.provideMerge(NodeHttpServer.layerHttpServices)), applicationScope);
37
44
  if (lifecycle)
38
45
  yield* installRestartContinuity(Context.get(context, SessionRestart.Service)).pipe(Effect.provideService(Scope.Scope, applicationScope));
39
- const app = Context.get(context, HttpRouter.HttpRouter).asHttpEffect();
46
+ const app = Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(HttpMiddleware.compression(), Effect.provideService(HttpPlatform.HttpPlatform, Context.get(context, HttpPlatform.HttpPlatform)));
40
47
  yield* Ref.set(application, Option.some(transform ? transform(app) : app));
41
48
  yield* status.ready;
42
49
  return { address: bound.http.address, shutdown: shutdown.await };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/server",
4
- "version": "0.0.0-dev-17948",
4
+ "version": "0.0.0-dev-17954",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -29,11 +29,11 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@effect/platform-node": "4.0.0-rc.110",
32
- "@opencode-ai/core": "0.0.0-dev-17948",
33
- "@opencode-ai/protocol": "0.0.0-dev-17948",
34
- "@opencode-ai/schema": "0.0.0-dev-17948",
35
- "@opencode-ai/simulation": "0.0.0-dev-17948",
36
- "@opencode-ai/util": "0.0.0-dev-17948",
32
+ "@opencode-ai/core": "0.0.0-dev-17954",
33
+ "@opencode-ai/protocol": "0.0.0-dev-17954",
34
+ "@opencode-ai/schema": "0.0.0-dev-17954",
35
+ "@opencode-ai/simulation": "0.0.0-dev-17954",
36
+ "@opencode-ai/util": "0.0.0-dev-17954",
37
37
  "drizzle-orm": "1.0.0-rc.2",
38
38
  "effect": "4.0.0-rc.110"
39
39
  },