@opencode/server 0.0.0-dev-20207 → 0.0.0-dev-20208
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 +4 -4
- package/dist/chunks/{pairing-7cv7ehbj.js → pairing-00nn3k4b.js} +2 -2
- package/dist/chunks/{pairing-439ywa05.js → pairing-04xw3v55.js} +1 -1
- package/dist/chunks/{pairing-pz0jzgeb.js → pairing-19c9ysa1.js} +2 -2
- package/dist/chunks/{pairing-vjmrn89t.js → pairing-254zvkj6.js} +2 -2
- package/dist/chunks/{pairing-23w8t84j.js → pairing-3kzx88w9.js} +1 -1
- package/dist/chunks/{pairing-fdw4hhrk.js → pairing-3q7es3eh.js} +12 -12
- package/dist/chunks/{pairing-dgnt21jz.js → pairing-3zdne75r.js} +3 -3
- package/dist/chunks/{pairing-k9ssaf54.js → pairing-4g0fa6m0.js} +2 -2
- package/dist/chunks/{pairing-jk9mr6vp.js → pairing-4vn5bvkr.js} +1 -1
- package/dist/chunks/{pairing-frv6gfy7.js → pairing-5rwqcaw2.js} +1 -1
- package/dist/chunks/{pairing-xsrtpxyd.js → pairing-5w24ch67.js} +3 -3
- package/dist/chunks/{pairing-0ar9gf7q.js → pairing-6gkz39ey.js} +2 -2
- package/dist/chunks/{pairing-mxb8z74h.js → pairing-6ksbxwm1.js} +4 -4
- package/dist/chunks/{pairing-w5qev33e.js → pairing-6nvan4e0.js} +2 -2
- package/dist/chunks/{pairing-2nzbqq6w.js → pairing-7rzt3wm8.js} +1 -1
- package/dist/chunks/{pairing-rrt24jy6.js → pairing-8bajbwjh.js} +2 -2
- package/dist/chunks/{pairing-52b4qywn.js → pairing-a6rdspah.js} +2 -2
- package/dist/chunks/{pairing-rg7j7cph.js → pairing-a6yp8301.js} +2 -2
- package/dist/chunks/{pairing-a7ke583f.js → pairing-arj41x43.js} +2 -2
- package/dist/chunks/{pairing-2b206wcs.js → pairing-b0b71rwa.js} +2 -2
- package/dist/chunks/{pairing-trr1emsb.js → pairing-bjrwanme.js} +1 -1
- package/dist/chunks/{pairing-sryvrekq.js → pairing-br99j6q1.js} +2 -2
- package/dist/chunks/{pairing-0658f5hp.js → pairing-ceh2h0m9.js} +2 -2
- package/dist/chunks/{pairing-2jfj4pvr.js → pairing-fw39m3bh.js} +7 -7
- package/dist/chunks/{pairing-2abmfsyh.js → pairing-gdvmrvey.js} +1 -1
- package/dist/chunks/{pairing-96sfj8c0.js → pairing-hjnxtxmk.js} +2 -2
- package/dist/chunks/{pairing-scvg88rk.js → pairing-j2pfq4q6.js} +1 -1
- package/dist/chunks/{pairing-35z95kj0.js → pairing-n0er2m55.js} +1 -1
- package/dist/chunks/{pairing-rn5anws3.js → pairing-pnqq1zxv.js} +2 -2
- package/dist/chunks/{pairing-j4tb0vx8.js → pairing-q0ycym90.js} +2 -2
- package/dist/chunks/{pairing-0h6q40e6.js → pairing-qnwpcgp7.js} +1 -1
- package/dist/chunks/{pairing-zhw07218.js → pairing-r7e9r02j.js} +2 -2
- package/dist/chunks/{pairing-x6486bry.js → pairing-rbn15j6z.js} +6 -6
- package/dist/chunks/{pairing-kqk7gaza.js → pairing-rcg4y18n.js} +1 -1
- package/dist/chunks/{pairing-9aabh8fh.js → pairing-req22b70.js} +1 -1
- package/dist/chunks/{pairing-ypwcmbt6.js → pairing-s67z1631.js} +33 -33
- package/dist/chunks/{pairing-s4aja1df.js → pairing-wet8b863.js} +6 -6
- package/dist/chunks/{pairing-tnr0rqd3.js → pairing-wv5twc2g.js} +4 -4
- package/dist/chunks/{pairing-11g6bym3.js → pairing-ysabas57.js} +2 -2
- package/dist/chunks/{pairing-ar2c062s.js → pairing-z5shrcz9.js} +3 -3
- package/dist/chunks/{pairing-39fhjz78.js → pairing-zp2jm6dt.js} +1 -1
- package/dist/chunks/{pairing-rjpqaa8h.js → pairing-zyh4j6y7.js} +3 -3
- package/dist/event-feed.js +3 -3
- package/dist/fetch.js +44 -44
- package/dist/handlers/agent.js +5 -5
- package/dist/handlers/command.js +5 -5
- package/dist/handlers/config.js +5 -5
- package/dist/handlers/credential.js +5 -5
- package/dist/handlers/debug.js +5 -5
- package/dist/handlers/event.js +6 -6
- package/dist/handlers/form.js +5 -5
- package/dist/handlers/fs.js +5 -5
- package/dist/handlers/generate.js +5 -5
- package/dist/handlers/integration.js +5 -5
- package/dist/handlers/location.js +5 -5
- package/dist/handlers/mcp.js +5 -5
- package/dist/handlers/message.js +5 -5
- package/dist/handlers/migration.js +5 -5
- package/dist/handlers/model.js +5 -5
- package/dist/handlers/permission.js +5 -5
- package/dist/handlers/persistent-pty.js +5 -5
- package/dist/handlers/plugin.js +5 -5
- package/dist/handlers/project.js +5 -5
- package/dist/handlers/provider.js +5 -5
- package/dist/handlers/pty.js +6 -6
- package/dist/handlers/reference.js +5 -5
- package/dist/handlers/rpc.js +5 -5
- package/dist/handlers/server.js +8 -8
- package/dist/handlers/session.js +5 -5
- package/dist/handlers/shell.js +5 -5
- package/dist/handlers/skill.js +5 -5
- package/dist/handlers/vcs.js +5 -5
- package/dist/handlers/websearch.js +5 -5
- package/dist/handlers/worktree.js +5 -5
- package/dist/handlers.js +40 -40
- package/dist/location.js +3 -3
- package/dist/middleware/form-location.js +2 -2
- package/dist/middleware/session-location.js +2 -2
- package/dist/pairing.js +3 -3
- package/dist/process.js +43 -43
- package/dist/pty-environment.js +3 -3
- package/dist/routes.js +41 -41
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +3 -3
- package/dist/workerd.js +43 -43
- package/package.json +8 -8
package/dist/api.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./chunks/pairing-
|
|
4
|
-
import"./chunks/pairing-
|
|
5
|
-
import"./chunks/pairing-
|
|
6
|
-
import"./chunks/pairing-
|
|
3
|
+
} from "./chunks/pairing-z5shrcz9.js";
|
|
4
|
+
import"./chunks/pairing-3kzx88w9.js";
|
|
5
|
+
import"./chunks/pairing-5rwqcaw2.js";
|
|
6
|
+
import"./chunks/pairing-6gkz39ey.js";
|
|
7
7
|
import"./chunks/pairing-smaf4a18.js";
|
|
8
8
|
export {
|
|
9
9
|
Api2 as Api
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestRef2
|
|
3
|
-
} from "./pairing-
|
|
3
|
+
} from "./pairing-6gkz39ey.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./pairing-
|
|
6
|
+
} from "./pairing-z5shrcz9.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/debug.ts
|
|
9
9
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./pairing-
|
|
2
|
+
layer4
|
|
3
|
+
} from "./pairing-6gkz39ey.js";
|
|
4
4
|
import {
|
|
5
5
|
formLocationLayer2
|
|
6
|
-
} from "./pairing-
|
|
6
|
+
} from "./pairing-5rwqcaw2.js";
|
|
7
7
|
import {
|
|
8
8
|
sessionLocationLayer2
|
|
9
|
-
} from "./pairing-
|
|
9
|
+
} from "./pairing-3kzx88w9.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./pairing-
|
|
12
|
+
} from "./pairing-z5shrcz9.js";
|
|
13
13
|
import {
|
|
14
14
|
Config2
|
|
15
15
|
} from "./pairing-anm12x33.js";
|
|
@@ -17,17 +17,17 @@ import {
|
|
|
17
17
|
CorsConfig2
|
|
18
18
|
} from "./pairing-q4bn6dy8.js";
|
|
19
19
|
import {
|
|
20
|
-
|
|
21
|
-
} from "./pairing-
|
|
20
|
+
layer3
|
|
21
|
+
} from "./pairing-wet8b863.js";
|
|
22
22
|
import {
|
|
23
23
|
node2
|
|
24
|
-
} from "./pairing-
|
|
24
|
+
} from "./pairing-rbn15j6z.js";
|
|
25
25
|
import {
|
|
26
26
|
node3
|
|
27
|
-
} from "./pairing-
|
|
27
|
+
} from "./pairing-wv5twc2g.js";
|
|
28
28
|
import {
|
|
29
29
|
handlers2
|
|
30
|
-
} from "./pairing-
|
|
30
|
+
} from "./pairing-s67z1631.js";
|
|
31
31
|
import {
|
|
32
32
|
authorizationLayer2
|
|
33
33
|
} from "./pairing-gtkdacvk.js";
|
|
@@ -144,8 +144,8 @@ function makeRoutes(auth, options, serviceURLs, overrides, instances) {
|
|
|
144
144
|
})) : build(overrides);
|
|
145
145
|
return serviceLayer.pipe(Layer.flatMap((context) => {
|
|
146
146
|
const services = Layer.succeedContext(context);
|
|
147
|
-
const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)),
|
|
148
|
-
const api = HttpApiBuilder.layer(Api2, { openapiPath: "/openapi.json" }).pipe(Layer.provide(handlers2.pipe(Layer.provide(services), Layer.provide(Layer.succeed(CorsConfig2, options)))), Layer.provide(formLocationLayer2), Layer.provide(sessionLocationLayer2), Layer.provide(
|
|
147
|
+
const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer3(serviceURLs, Context.get(context, Global.Service).tmp, options.app));
|
|
148
|
+
const api = HttpApiBuilder.layer(Api2, { openapiPath: "/openapi.json" }).pipe(Layer.provide(handlers2.pipe(Layer.provide(services), Layer.provide(Layer.succeed(CorsConfig2, options)))), Layer.provide(formLocationLayer2), Layer.provide(sessionLocationLayer2), Layer.provide(layer4), Layer.provide(authorizationLayer2), Layer.provide(schemaErrorLayer2), Layer.provide(auth), HttpRouter.provideRequest(requestServices), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer));
|
|
149
149
|
return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
|
|
150
150
|
}));
|
|
151
151
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./pairing-
|
|
3
|
+
} from "./pairing-6gkz39ey.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./pairing-
|
|
6
|
+
} from "./pairing-z5shrcz9.js";
|
|
7
7
|
import {
|
|
8
8
|
CorsConfig2,
|
|
9
9
|
isAllowedRequestOrigin2
|
|
10
10
|
} from "./pairing-q4bn6dy8.js";
|
|
11
11
|
import {
|
|
12
12
|
Service5
|
|
13
|
-
} from "./pairing-
|
|
13
|
+
} from "./pairing-wv5twc2g.js";
|
|
14
14
|
import {
|
|
15
15
|
runPtySocket2
|
|
16
16
|
} from "./pairing-hezj1jdf.js";
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
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 };
|
|
@@ -44,7 +44,7 @@ function decode(input) {
|
|
|
44
44
|
return input;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
var
|
|
47
|
+
var layer4 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
|
|
48
48
|
const locations = yield* LocationServiceMap.Service;
|
|
49
49
|
return LocationMiddleware2.of((effect) => Effect.gen(function* () {
|
|
50
50
|
const request = yield* HttpServerRequest.HttpServerRequest;
|
|
@@ -52,4 +52,4 @@ var layer5 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
|
|
|
52
52
|
}));
|
|
53
53
|
}));
|
|
54
54
|
|
|
55
|
-
export { LocationMiddleware2, response2, sessionInfo2, requestRef2,
|
|
55
|
+
export { LocationMiddleware2, response2, sessionInfo2, requestRef2, layer4 };
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./pairing-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
createRoutes2
|
|
6
|
-
} from "./pairing-
|
|
6
|
+
} from "./pairing-3q7es3eh.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
9
|
} from "./pairing-9rqn6x4v.js";
|
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
var exports_fetch = {};
|
|
13
13
|
__export(exports_fetch, {
|
|
14
14
|
ServerFetch: () => exports_fetch,
|
|
15
|
-
make: () =>
|
|
15
|
+
make: () => make2
|
|
16
16
|
});
|
|
17
17
|
import { Context, Effect, Layer } from "effect";
|
|
18
18
|
import { HttpEffect, HttpMiddleware, HttpRouter, HttpServer } from "effect/unstable/http";
|
|
19
19
|
import { SessionRestart } from "@opencode/core/session/execution/restart";
|
|
20
|
-
var
|
|
20
|
+
var make2 = Effect.fn("ServerFetch.make")(function* (options = {}, boot = {}) {
|
|
21
21
|
const context = yield* Layer.build(createRoutes2(options, () => [], boot.overrides ?? []).pipe(Layer.provide(HttpServer.layerServices)));
|
|
22
22
|
yield* Effect.forkDetach(Context.get(context, SessionRestart.Service).resumeSuspendedSessions);
|
|
23
23
|
return Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(HttpMiddleware.cors({ allowedOrigins: (origin) => isAllowedCorsOrigin2(origin, options), maxAge: 86400 }), HttpEffect.toWebHandlerWith(context));
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
export {
|
|
26
|
+
export { make2, exports_fetch };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./pairing-
|
|
3
|
+
} from "./pairing-z5shrcz9.js";
|
|
4
4
|
import {
|
|
5
5
|
Service3,
|
|
6
6
|
frame2
|
|
7
|
-
} from "./pairing-
|
|
7
|
+
} from "./pairing-zyh4j6y7.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/event.ts
|
|
10
10
|
import { Event } from "@opencode/schema/event";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./pairing-
|
|
3
|
+
} from "./pairing-6gkz39ey.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./pairing-
|
|
6
|
+
} from "./pairing-z5shrcz9.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/integration.ts
|
|
9
9
|
import { Integration } from "@opencode/core/integration";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
response2,
|
|
6
6
|
sessionInfo2
|
|
7
|
-
} from "./pairing-
|
|
7
|
+
} from "./pairing-6gkz39ey.js";
|
|
8
8
|
import {
|
|
9
9
|
Api2
|
|
10
|
-
} from "./pairing-
|
|
10
|
+
} from "./pairing-z5shrcz9.js";
|
|
11
11
|
|
|
12
12
|
// src/handlers/permission.ts
|
|
13
13
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./pairing-
|
|
3
|
+
} from "./pairing-6gkz39ey.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./pairing-
|
|
6
|
+
} from "./pairing-z5shrcz9.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/websearch.ts
|
|
9
9
|
import { WebSearch } from "@opencode/core/websearch";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./pairing-
|
|
3
|
+
} from "./pairing-z5shrcz9.js";
|
|
4
4
|
import {
|
|
5
5
|
SESSION_TTL_SECONDS2,
|
|
6
6
|
Config2,
|
|
7
7
|
issueSession2,
|
|
8
8
|
sessionCookieName2
|
|
9
9
|
} from "./pairing-anm12x33.js";
|
|
10
|
-
import {
|
|
11
|
-
Service2
|
|
12
|
-
} from "./pairing-s4aja1df.js";
|
|
13
10
|
import {
|
|
14
11
|
Service4
|
|
15
|
-
} from "./pairing-
|
|
12
|
+
} from "./pairing-wet8b863.js";
|
|
13
|
+
import {
|
|
14
|
+
Service2
|
|
15
|
+
} from "./pairing-rbn15j6z.js";
|
|
16
16
|
|
|
17
17
|
// src/handlers/server.ts
|
|
18
18
|
import { Duration, Effect } from "effect";
|
|
@@ -20,10 +20,10 @@ import { HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
|
|
|
20
20
|
import { HttpApiBuilder } from "effect/unstable/httpapi";
|
|
21
21
|
import { UnauthorizedError } from "@opencode/protocol/errors";
|
|
22
22
|
var ServerHandler2 = HttpApiBuilder.group(Api2, "server.server", (handlers) => Effect.gen(function* () {
|
|
23
|
-
const pairing = yield*
|
|
23
|
+
const pairing = yield* Service2;
|
|
24
24
|
const auth = yield* Config2;
|
|
25
25
|
return handlers.handle("server.info", () => Effect.gen(function* () {
|
|
26
|
-
const info = yield*
|
|
26
|
+
const info = yield* Service4;
|
|
27
27
|
return {
|
|
28
28
|
version: info.app.version ?? "unknown",
|
|
29
29
|
pid: process.pid ?? 0,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./pairing-
|
|
3
|
+
} from "./pairing-6gkz39ey.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./pairing-
|
|
6
|
+
} from "./pairing-z5shrcz9.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/provider.ts
|
|
9
9
|
import { Provider } from "@opencode/core/provider";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
var exports_pairing = {};
|
|
7
7
|
__export(exports_pairing, {
|
|
8
8
|
ServerPairing: () => exports_pairing,
|
|
9
|
-
Service: () =>
|
|
9
|
+
Service: () => Service2,
|
|
10
10
|
node: () => node2
|
|
11
11
|
});
|
|
12
12
|
import { Cache, Context, Duration, Effect, Layer } from "effect";
|
|
@@ -14,12 +14,12 @@ import { makeGlobalNode } from "@opencode/util/effect/app-node";
|
|
|
14
14
|
import { randomBytes } from "node:crypto";
|
|
15
15
|
var TTL = Duration.minutes(5);
|
|
16
16
|
|
|
17
|
-
class
|
|
17
|
+
class Service2 extends Context.Service()("@opencode/ServerPairing") {
|
|
18
18
|
}
|
|
19
19
|
var noLookup = () => Effect.die(new Error("ServerPairing cache must be used via set/invalidateWhen, never get"));
|
|
20
|
-
var layer = Layer.effect(
|
|
20
|
+
var layer = Layer.effect(Service2, Effect.gen(function* () {
|
|
21
21
|
const cache = yield* Cache.make({ capacity: 1000, lookup: noLookup, timeToLive: TTL });
|
|
22
|
-
return
|
|
22
|
+
return Service2.of({
|
|
23
23
|
issue: Effect.fn("ServerPairing.issue")(function* () {
|
|
24
24
|
const code = randomBytes(16).toString("base64url");
|
|
25
25
|
yield* Cache.set(cache, code, true);
|
|
@@ -30,6 +30,6 @@ var layer = Layer.effect(Service4, Effect.gen(function* () {
|
|
|
30
30
|
})
|
|
31
31
|
});
|
|
32
32
|
}));
|
|
33
|
-
var node2 = makeGlobalNode({ service:
|
|
33
|
+
var node2 = makeGlobalNode({ service: Service2, layer, deps: [] });
|
|
34
34
|
|
|
35
|
-
export {
|
|
35
|
+
export { Service2, node2, exports_pairing };
|