@opencode/server 0.0.0-dev-1298 → 0.0.0-dev-1301
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.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/{media-uri-059rbh9c.js → api-059rbh9c.js} +1 -1
- package/dist/chunks/{media-uri-370cpmna.js → api-0a5jm2na.js} +2 -2
- package/dist/chunks/{media-uri-5553qfcy.js → api-0n1e9dnh.js} +3 -3
- package/dist/chunks/{media-uri-vvp99hc9.js → api-1je14sn4.js} +1 -1
- package/dist/chunks/{media-uri-rxyx8sa0.js → api-22wspztn.js} +2 -2
- package/dist/chunks/{media-uri-zgvwy66h.js → api-27hs38qv.js} +3 -3
- package/dist/chunks/{media-uri-4z8yg1dv.js → api-34xzc0ha.js} +4 -4
- package/dist/chunks/{media-uri-zds85vps.js → api-41yet3w7.js} +1 -1
- package/dist/chunks/{media-uri-1vxxxmgg.js → api-452na7zm.js} +2 -2
- package/dist/chunks/{media-uri-agenqygg.js → api-4vqvqsgg.js} +2 -2
- package/dist/chunks/{media-uri-zeatgpjd.js → api-595kch50.js} +8 -8
- package/dist/chunks/{media-uri-xbqm7mpj.js → api-6vs5sqy6.js} +2 -2
- package/dist/chunks/{media-uri-78rcgzsr.js → api-78rcgzsr.js} +1 -1
- package/dist/chunks/{media-uri-7b9xm1qg.js → api-7b9xm1qg.js} +1 -1
- package/dist/chunks/{media-uri-r2veymj8.js → api-84dqjc6j.js} +4 -4
- package/dist/chunks/{media-uri-r5696se6.js → api-9c4eyh8m.js} +3 -3
- package/dist/chunks/{media-uri-jqvq1ywe.js → api-b0sezs8j.js} +2 -2
- package/dist/chunks/{media-uri-0e4fm4yw.js → api-b2k9041j.js} +1 -1
- package/dist/chunks/{media-uri-wqv43pj9.js → api-c6sjpm0r.js} +2 -2
- package/dist/chunks/{media-uri-djr0jy89.js → api-djr0jy89.js} +1 -1
- package/dist/chunks/{media-uri-zmgfywqd.js → api-dk68ymtv.js} +1 -1
- package/dist/chunks/{media-uri-7cd61xtm.js → api-e46y0tfd.js} +2 -2
- package/dist/chunks/{media-uri-39nnfjx1.js → api-e6e4kz0w.js} +4 -4
- package/dist/chunks/{media-uri-qsfn57wq.js → api-e9906t2e.js} +4 -4
- package/dist/chunks/{media-uri-gk0yxcp6.js → api-gk0yxcp6.js} +1 -1
- package/dist/chunks/{media-uri-gqq6kfhc.js → api-gqq6kfhc.js} +1 -1
- package/dist/chunks/{media-uri-74kxthdf.js → api-h072q2hm.js} +1 -1
- package/dist/chunks/{media-uri-vtfzy3at.js → api-hax1v4bv.js} +2 -2
- package/dist/chunks/{media-uri-j4at0y5c.js → api-j4at0y5c.js} +1 -1
- package/dist/chunks/{media-uri-7x1re4zg.js → api-m5rae7m4.js} +2 -2
- package/dist/chunks/{media-uri-dfxfd950.js → api-mmvhrf5s.js} +4 -4
- package/dist/chunks/{media-uri-myqk22k5.js → api-myqk22k5.js} +2 -2
- package/dist/chunks/api-n26yr6pw.js +21 -0
- package/dist/chunks/{media-uri-p3f060n2.js → api-np3ws677.js} +2 -2
- package/dist/chunks/{media-uri-50xc6x42.js → api-ppma8fcc.js} +3 -3
- package/dist/chunks/{media-uri-gad4te90.js → api-ppqp5pr2.js} +35 -35
- package/dist/chunks/{media-uri-e7j57s3r.js → api-q93ntzen.js} +7 -7
- package/dist/chunks/{media-uri-sqxx1p54.js → api-qn8kkfq6.js} +2 -2
- package/dist/chunks/{media-uri-wh109kze.js → api-qs427q2r.js} +8 -8
- package/dist/chunks/{media-uri-amndpc82.js → api-r3h1014p.js} +2 -2
- package/dist/chunks/{media-uri-t32e1bbt.js → api-t32e1bbt.js} +1 -1
- package/dist/chunks/{media-uri-b65096pt.js → api-vhwcrt1z.js} +17 -14
- package/dist/chunks/{media-uri-w5yp0ga8.js → api-w5yp0ga8.js} +2 -2
- package/dist/chunks/{media-uri-kqr36gas.js → api-w9jcwh65.js} +7 -7
- package/dist/chunks/{media-uri-3p9jwgak.js → api-wecgp61r.js} +7 -7
- package/dist/chunks/{media-uri-2835150m.js → api-wxj3d9av.js} +2 -2
- package/dist/chunks/{media-uri-jc2vwkyw.js → api-x8dgc261.js} +2 -2
- package/dist/chunks/{media-uri-yet0vexm.js → api-yet0vexm.js} +1 -1
- package/dist/chunks/{media-uri-skcryrty.js → api-yr4wsvrw.js} +2 -2
- package/dist/chunks/{media-uri-7dtbad8d.js → api-z3e7v67k.js} +7 -7
- package/dist/chunks/{media-uri-xpg37vzc.js → api-z59gyc0x.js} +2 -2
- package/dist/chunks/{media-uri-rcmctvp9.js → api-z7gkfgax.js} +1 -1
- package/dist/content-headers.js +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +5 -5
- package/dist/fetch.js +59 -58
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/artifact.js +3 -3
- package/dist/handlers/command.js +6 -6
- package/dist/handlers/config.js +6 -6
- package/dist/handlers/credential.js +7 -7
- package/dist/handlers/debug.js +6 -6
- package/dist/handlers/event.js +7 -7
- package/dist/handlers/form.js +6 -6
- package/dist/handlers/fs.js +7 -7
- package/dist/handlers/generate.js +6 -6
- package/dist/handlers/integration.js +6 -6
- package/dist/handlers/job.js +2 -2
- package/dist/handlers/location.js +6 -6
- package/dist/handlers/mcp.js +8 -8
- package/dist/handlers/media.js +2 -2
- package/dist/handlers/message.js +7 -7
- package/dist/handlers/migration.js +6 -6
- package/dist/handlers/model.js +6 -6
- package/dist/handlers/permission.js +6 -6
- package/dist/handlers/persistent-pty.js +13 -13
- package/dist/handlers/plugin.js +6 -6
- package/dist/handlers/project.js +6 -6
- package/dist/handlers/provider.js +6 -6
- package/dist/handlers/pty-socket.js +1 -1
- package/dist/handlers/pty.js +8 -8
- package/dist/handlers/reference.js +6 -6
- package/dist/handlers/rpc.js +6 -6
- package/dist/handlers/schedule.js +2 -2
- package/dist/handlers/server.js +9 -9
- package/dist/handlers/session-error.js +1 -1
- package/dist/handlers/session.js +7 -7
- package/dist/handlers/shell.js +6 -6
- package/dist/handlers/skill.js +6 -6
- package/dist/handlers/usage.js +6 -6
- package/dist/handlers/vcs.js +6 -6
- package/dist/handlers/voice.js +6 -6
- package/dist/handlers/websearch.js +6 -6
- package/dist/handlers/worktree.js +6 -6
- package/dist/handlers.js +50 -50
- package/dist/location.js +2 -2
- package/dist/media-uri.js +1 -1
- package/dist/middleware/authorization.js +2 -2
- package/dist/middleware/defect-response.d.ts +2 -0
- package/dist/middleware/defect-response.js +6 -0
- package/dist/middleware/form-location.js +3 -3
- package/dist/middleware/schema-error.js +1 -1
- package/dist/middleware/session-location.js +3 -3
- package/dist/pairing.js +3 -3
- package/dist/process.js +60 -59
- package/dist/request-site.js +2 -2
- package/dist/request-tracing.js +1 -1
- package/dist/routes.js +54 -53
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +3 -3
- package/dist/workerd.js +60 -59
- package/package.json +8 -8
- /package/dist/chunks/{media-uri-9rqn6x4v.js → api-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{media-uri-bd8755ek.js → api-bd8755ek.js} +0 -0
- /package/dist/chunks/{media-uri-q187pxxd.js → api-q187pxxd.js} +0 -0
- /package/dist/chunks/{media-uri-q4bn6dy8.js → api-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{media-uri-smaf4a18.js → api-smaf4a18.js} +0 -0
- /package/dist/chunks/{media-uri-xthc02cw.js → api-xthc02cw.js} +0 -0
- /package/dist/chunks/{media-uri-yc7nft6q.js → api-yc7nft6q.js} +0 -0
package/dist/api.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./chunks/
|
|
4
|
-
import"./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
3
|
+
} from "./chunks/api-9c4eyh8m.js";
|
|
4
|
+
import"./chunks/api-yet0vexm.js";
|
|
5
|
+
import"./chunks/api-gk0yxcp6.js";
|
|
6
|
+
import"./chunks/api-gqq6kfhc.js";
|
|
7
|
+
import"./chunks/api-smaf4a18.js";
|
|
8
8
|
export {
|
|
9
9
|
Api2 as Api
|
|
10
10
|
};
|
package/dist/auth.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
awaitPlugins2,
|
|
3
3
|
response2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./api-gqq6kfhc.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./api-9c4eyh8m.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/model.ts
|
|
10
10
|
import { Model } from "@opencode/core/model";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2,
|
|
3
3
|
failedMessageDecode2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./api-smaf4a18.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./api-9c4eyh8m.js";
|
|
8
8
|
import {
|
|
9
9
|
wantsMediaRefs2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./api-xthc02cw.js";
|
|
11
11
|
|
|
12
12
|
// src/handlers/message.ts
|
|
13
13
|
import { SessionMessage } from "@opencode/core/session/message";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./api-gqq6kfhc.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./api-9c4eyh8m.js";
|
|
7
7
|
import {
|
|
8
8
|
download2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./api-t32e1bbt.js";
|
|
10
10
|
|
|
11
11
|
// src/handlers/fs.ts
|
|
12
12
|
import { FileSystem } from "@opencode/core/filesystem";
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./api-gqq6kfhc.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./api-9c4eyh8m.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./api-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
runPtySocket2,
|
|
15
15
|
holdLocation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./api-q187pxxd.js";
|
|
17
17
|
|
|
18
18
|
// src/handlers/mcp.ts
|
|
19
19
|
import { Location } from "@opencode/core/location";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./api-9c4eyh8m.js";
|
|
4
4
|
import {
|
|
5
5
|
requireConnectable2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./api-r3h1014p.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/credential.ts
|
|
9
9
|
import { Credential } from "@opencode/core/credential";
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAllowedCorsOrigin2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./api-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
middleware2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./api-myqk22k5.js";
|
|
7
7
|
import {
|
|
8
8
|
withoutParentSpan2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./api-yc7nft6q.js";
|
|
10
10
|
import {
|
|
11
11
|
createRoutes2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./api-vhwcrt1z.js";
|
|
13
13
|
import {
|
|
14
14
|
__export
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./api-9rqn6x4v.js";
|
|
16
16
|
|
|
17
17
|
// src/fetch.ts
|
|
18
18
|
var exports_fetch = {};
|
|
19
19
|
__export(exports_fetch, {
|
|
20
20
|
ServerFetch: () => exports_fetch,
|
|
21
|
-
make: () =>
|
|
21
|
+
make: () => make2
|
|
22
22
|
});
|
|
23
23
|
import { Context, Effect, Layer } from "effect";
|
|
24
24
|
import { HttpEffect, HttpMiddleware, HttpRouter, HttpServer } from "effect/http";
|
|
25
25
|
import { SessionRestart } from "@opencode/core/session/execution/restart";
|
|
26
|
-
var
|
|
26
|
+
var make2 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
|
|
27
27
|
const context = yield* Layer.build(createRoutes2(options, () => [], boot.overrides ?? []).pipe(Layer.provide(HttpServer.layerServices))).pipe(withoutParentSpan2);
|
|
28
28
|
yield* Effect.forkDetach(Context.get(context, SessionRestart.Service).resumeSuspendedSessions);
|
|
29
29
|
return Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(middleware2(options), HttpMiddleware.cors({ allowedOrigins: (origin) => isAllowedCorsOrigin2(origin, options), maxAge: 86400 }), HttpEffect.toWebHandlerWith(context));
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
export {
|
|
32
|
+
export { make2, exports_fetch };
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./api-gqq6kfhc.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./api-9c4eyh8m.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./api-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
runPtySocket2,
|
|
15
15
|
holdLocation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./api-q187pxxd.js";
|
|
17
17
|
|
|
18
18
|
// src/handlers/pty.ts
|
|
19
19
|
import { Pty } from "@opencode/core/pty";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocationMiddleware2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./api-gqq6kfhc.js";
|
|
4
4
|
import {
|
|
5
5
|
FormLocationMiddleware2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./api-gk0yxcp6.js";
|
|
7
7
|
import {
|
|
8
8
|
SessionLocationMiddleware2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./api-yet0vexm.js";
|
|
10
10
|
|
|
11
11
|
// src/api.ts
|
|
12
12
|
import { makeDefaultApi } from "@opencode/protocol/api";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./api-gqq6kfhc.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./api-9c4eyh8m.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/usage.ts
|
|
9
9
|
import { UsageLimits } from "@opencode/core/usage-limits";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
locationErrors2,
|
|
3
3
|
awaitPlugins2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./api-gqq6kfhc.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./api-9c4eyh8m.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/generate.ts
|
|
10
10
|
import { Generate } from "@opencode/core/generate";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
awaitPlugins2,
|
|
3
3
|
response2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./api-gqq6kfhc.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./api-9c4eyh8m.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/websearch.ts
|
|
10
10
|
import { WebSearch } from "@opencode/core/websearch";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./api-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/service-status.ts
|
|
6
6
|
var exports_service_status = {};
|
|
7
7
|
__export(exports_service_status, {
|
|
8
8
|
Status: () => exports_service_status,
|
|
9
|
-
make: () =>
|
|
9
|
+
make: () => make3
|
|
10
10
|
});
|
|
11
11
|
import { Effect, Ref } from "effect";
|
|
12
|
-
var
|
|
12
|
+
var make3 = Effect.fnUntraced(function* (options = {}) {
|
|
13
13
|
const current = yield* Ref.make(options.initial ?? { type: "starting" });
|
|
14
14
|
const beginStopping = Ref.update(current, (status) => status.type === "stopping" ? status : { type: "stopping" });
|
|
15
15
|
return {
|
|
@@ -20,4 +20,4 @@ var make2 = Effect.fnUntraced(function* (options = {}) {
|
|
|
20
20
|
};
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { make3, exports_service_status };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./api-9c4eyh8m.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
Service4,
|
|
6
6
|
frame2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./api-wecgp61r.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/event.ts
|
|
10
10
|
import { Event } from "@opencode/schema/event";
|
|
@@ -12,7 +12,7 @@ import { Effect, Stream } from "effect";
|
|
|
12
12
|
import { HttpServerResponse } from "effect/http";
|
|
13
13
|
import { HttpApiBuilder } from "effect/http-api";
|
|
14
14
|
var EventHandler2 = HttpApiBuilder.group(Api2, "server.event", (handlers) => Effect.gen(function* () {
|
|
15
|
-
const feed = yield*
|
|
15
|
+
const feed = yield* Service4;
|
|
16
16
|
return handlers.handleRaw("event.subscribe", (ctx) => Effect.gen(function* () {
|
|
17
17
|
const connected = {
|
|
18
18
|
id: Event.ID.create(),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
awaitPlugins2,
|
|
3
3
|
response2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./api-gqq6kfhc.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./api-9c4eyh8m.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/provider.ts
|
|
10
10
|
import { Provider } from "@opencode/core/provider";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
missingMessage2,
|
|
4
4
|
failedMessageDecode2,
|
|
5
5
|
failedSnapshot2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./api-smaf4a18.js";
|
|
7
7
|
import {
|
|
8
8
|
locationErrors2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./api-gqq6kfhc.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./api-9c4eyh8m.js";
|
|
13
13
|
import {
|
|
14
14
|
wantsMediaRefs2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./api-xthc02cw.js";
|
|
16
16
|
|
|
17
17
|
// src/handlers/session.ts
|
|
18
18
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/middleware/defect-response.ts
|
|
2
|
+
import { StorageFailure } from "@opencode/core/database/storage-failure";
|
|
3
|
+
import { UnknownError } from "@opencode/protocol/errors";
|
|
4
|
+
import { Cause, Effect } from "effect";
|
|
5
|
+
import { HttpRouter, HttpServerError, HttpServerRequest, HttpServerResponse } from "effect/http";
|
|
6
|
+
var respond = HttpServerResponse.schemaJson(UnknownError);
|
|
7
|
+
var defectResponseLayer2 = HttpRouter.middleware((effect) => effect.pipe(Effect.catchCause((cause) => Effect.gen(function* () {
|
|
8
|
+
const [response] = yield* HttpServerError.causeResponse(cause);
|
|
9
|
+
if (response.status !== 500 || response.body._tag !== "Empty")
|
|
10
|
+
return yield* Effect.failCause(cause);
|
|
11
|
+
const request = yield* HttpServerRequest.HttpServerRequest;
|
|
12
|
+
const ref = `err_${crypto.randomUUID().slice(0, 8)}`;
|
|
13
|
+
yield* Effect.logError("request failed", cause).pipe(Effect.annotateLogs({ ref, route: `${request.method} ${request.url}` }));
|
|
14
|
+
const body = yield* respond(new UnknownError({
|
|
15
|
+
message: StorageFailure.message(cause) ?? "Server failed to handle the request. Check server logs for details.",
|
|
16
|
+
ref
|
|
17
|
+
}), { status: 500 }).pipe(Effect.orDie);
|
|
18
|
+
return yield* Effect.failCause(Cause.combine(cause, Cause.die(body)));
|
|
19
|
+
}))), { global: true });
|
|
20
|
+
|
|
21
|
+
export { defectResponseLayer2 };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./api-smaf4a18.js";
|
|
4
4
|
import {
|
|
5
5
|
locationErrors2,
|
|
6
6
|
response2,
|
|
7
7
|
sessionInfo2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./api-gqq6kfhc.js";
|
|
9
9
|
import {
|
|
10
10
|
Api2
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./api-9c4eyh8m.js";
|
|
12
12
|
|
|
13
13
|
// src/handlers/permission.ts
|
|
14
14
|
import { Instance } from "@opencode/core/instance/service";
|