@opencode/server 0.0.0-dev-19565 → 0.0.0-dev-19566

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.
@@ -2,7 +2,7 @@ import { Integration } from "@opencode/core/integration";
2
2
  import { Effect } from "effect";
3
3
  import { HttpApiBuilder, HttpApiSchema } from "effect/unstable/httpapi";
4
4
  import { Api } from "../api";
5
- import { InvalidRequestError } from "@opencode/protocol/errors";
5
+ import { IntegrationNotFoundError, InvalidRequestError } from "@opencode/protocol/errors";
6
6
  import { response } from "../location";
7
7
  import { WellKnown } from "@opencode/core/wellknown";
8
8
  const authorize = (effect) => effect.pipe(Effect.mapError((error) => new InvalidRequestError({
@@ -14,8 +14,13 @@ export const IntegrationHandler = HttpApiBuilder.group(Api, "server.integration"
14
14
  const service = yield* Integration.Service;
15
15
  return yield* response(service.list());
16
16
  })).handle("integration.get", Effect.fn(function* (ctx) {
17
- const service = yield* Integration.Service;
18
- return yield* response(service.get(ctx.params.integrationID));
17
+ const integration = yield* (yield* Integration.Service).get(ctx.params.integrationID);
18
+ if (!integration)
19
+ return yield* new IntegrationNotFoundError({
20
+ integrationID: ctx.params.integrationID,
21
+ message: `Integration not found: ${ctx.params.integrationID}`
22
+ });
23
+ return yield* response(Effect.succeed(integration));
19
24
  })).handle("integration.wellknown.add", Effect.fn(function* (ctx) {
20
25
  const wellknown = yield* WellKnown.Service, integration = yield* Integration.Service;
21
26
  yield* wellknown.add(ctx.payload.url).pipe(Effect.mapError((error) => new InvalidRequestError({ message: error.message, kind: "well_known_discovery" })));
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-19565",
4
+ "version": "0.0.0-dev-19566",
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-19565",
34
- "@opencode/protocol": "0.0.0-dev-19565",
35
- "@opencode/schema": "0.0.0-dev-19565",
36
- "@opencode/simulation": "0.0.0-dev-19565",
37
- "@opencode/util": "0.0.0-dev-19565",
33
+ "@opencode/core": "0.0.0-dev-19566",
34
+ "@opencode/protocol": "0.0.0-dev-19566",
35
+ "@opencode/schema": "0.0.0-dev-19566",
36
+ "@opencode/simulation": "0.0.0-dev-19566",
37
+ "@opencode/util": "0.0.0-dev-19566",
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-19565",
43
- "@opencode/plugin": "0.0.0-dev-19565",
42
+ "@opencode/client": "0.0.0-dev-19566",
43
+ "@opencode/plugin": "0.0.0-dev-19566",
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"