@opencode/server 0.0.0-dev-1021 → 0.0.0-dev-1024
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/{content-headers-059rbh9c.js → request-site-059rbh9c.js} +1 -1
- package/dist/chunks/{content-headers-4p2y0qs3.js → request-site-100nc7c0.js} +2 -5
- package/dist/chunks/{content-headers-x2580v0z.js → request-site-19v80edx.js} +2 -2
- package/dist/chunks/{content-headers-wk4n2app.js → request-site-1pbzysdc.js} +35 -35
- package/dist/chunks/{content-headers-hz4g4h8f.js → request-site-1r438we2.js} +8 -8
- package/dist/chunks/{content-headers-v8aqacn3.js → request-site-2cm4dfcc.js} +2 -2
- package/dist/chunks/{content-headers-x4b2rtcb.js → request-site-2dzr03as.js} +1 -1
- package/dist/chunks/{content-headers-m119esdv.js → request-site-2rb1ee6g.js} +3 -3
- package/dist/chunks/{content-headers-39nnfjx1.js → request-site-39nnfjx1.js} +1 -1
- package/dist/chunks/{content-headers-s62wjkvx.js → request-site-4fc68szf.js} +3 -7
- package/dist/chunks/{content-headers-05c5061t.js → request-site-4zkx9wb3.js} +1 -1
- package/dist/chunks/{content-headers-b4mqtccx.js → request-site-5jm9kajg.js} +2 -2
- package/dist/chunks/{content-headers-yx59p0q8.js → request-site-6dfvc2py.js} +13 -13
- package/dist/chunks/{content-headers-78rcgzsr.js → request-site-78rcgzsr.js} +1 -1
- package/dist/chunks/{content-headers-7b9xm1qg.js → request-site-7b9xm1qg.js} +1 -1
- package/dist/chunks/{content-headers-ejd0wpn5.js → request-site-7jm4dc4a.js} +2 -2
- package/dist/chunks/{content-headers-0fv515j7.js → request-site-7qpea5x7.js} +3 -4
- package/dist/chunks/{content-headers-f8r9p2vr.js → request-site-801prsqk.js} +2 -2
- package/dist/chunks/{content-headers-dx89xydc.js → request-site-8ja97vv6.js} +2 -4
- package/dist/chunks/{content-headers-0j6zxxn8.js → request-site-9axn4s7f.js} +3 -7
- package/dist/chunks/{content-headers-kj0bpy1q.js → request-site-9qqse7m7.js} +3 -3
- package/dist/chunks/{content-headers-htyf2qs7.js → request-site-ah2sj2pr.js} +1 -1
- package/dist/chunks/{content-headers-hx8bsq9d.js → request-site-d20xfnpc.js} +1 -1
- package/dist/chunks/{content-headers-djr0jy89.js → request-site-djr0jy89.js} +1 -1
- package/dist/chunks/{content-headers-d4534456.js → request-site-e6fa1pnt.js} +4 -4
- package/dist/chunks/{content-headers-kg0ybx4v.js → request-site-gq4jwh93.js} +3 -3
- package/dist/chunks/{content-headers-cdhjn32v.js → request-site-hk9crnsa.js} +2 -4
- package/dist/chunks/{content-headers-4c6tb6ax.js → request-site-hkbnsrr0.js} +7 -7
- package/dist/chunks/{content-headers-j4at0y5c.js → request-site-j4at0y5c.js} +1 -1
- package/dist/chunks/request-site-jmmhprac.js +13 -0
- package/dist/chunks/{content-headers-jjvpqmx6.js → request-site-jr92t6gd.js} +4 -4
- package/dist/chunks/{content-headers-myqk22k5.js → request-site-myqk22k5.js} +2 -2
- package/dist/chunks/{content-headers-kqr36gas.js → request-site-mzs0n5xz.js} +7 -7
- package/dist/chunks/{content-headers-9grnt8dc.js → request-site-p83m65n5.js} +2 -4
- package/dist/chunks/{content-headers-zbe9jfhy.js → request-site-prn0chz2.js} +1 -1
- package/dist/chunks/{content-headers-3p9jwgak.js → request-site-qfyg9gb7.js} +4 -4
- package/dist/chunks/{content-headers-vbgqk0mr.js → request-site-r40v995e.js} +2 -2
- package/dist/chunks/{content-headers-0n4tjm17.js → request-site-rmfb1myj.js} +1 -3
- package/dist/chunks/{content-headers-et00mhwf.js → request-site-s3zgwc17.js} +3 -6
- package/dist/chunks/{content-headers-t32e1bbt.js → request-site-t32e1bbt.js} +1 -1
- package/dist/chunks/{content-headers-b3bmdkga.js → request-site-vw0q3knq.js} +1 -1
- package/dist/chunks/{content-headers-nz17qv97.js → request-site-w3xmknp7.js} +2 -4
- package/dist/chunks/{content-headers-s9tkswmw.js → request-site-wka57cdm.js} +2 -2
- package/dist/chunks/{content-headers-syychy20.js → request-site-xa3arcc2.js} +5 -5
- package/dist/chunks/{content-headers-h1thjy6x.js → request-site-y60jfeab.js} +2 -2
- package/dist/chunks/{content-headers-89egwzf3.js → request-site-ykk3p1r3.js} +2 -4
- package/dist/chunks/{content-headers-861wfsmy.js → request-site-yty6dk04.js} +1 -1
- package/dist/chunks/{content-headers-50bbk3b2.js → request-site-ywn523ee.js} +3 -11
- package/dist/chunks/{content-headers-zvbhqxt5.js → request-site-yx2bnf2t.js} +4 -4
- package/dist/chunks/{content-headers-yjbzmfhm.js → request-site-z3e7v67k.js} +7 -7
- package/dist/chunks/{content-headers-0e81et3m.js → request-site-zjmacp9c.js} +3 -3
- package/dist/content-headers.js +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +3 -3
- package/dist/fetch.js +56 -56
- 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.d.ts +1 -3
- package/dist/location.js +2 -4
- package/dist/media-uri.js +1 -1
- package/dist/middleware/authorization.js +2 -2
- 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 +57 -57
- package/dist/request-site.js +2 -2
- package/dist/request-tracing.js +1 -1
- package/dist/routes.js +53 -53
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +1 -1
- package/dist/workerd.js +57 -57
- package/package.json +8 -8
- package/dist/chunks/content-headers-qkcfdn84.js +0 -18
- /package/dist/chunks/{content-headers-9rqn6x4v.js → request-site-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{content-headers-bd8755ek.js → request-site-bd8755ek.js} +0 -0
- /package/dist/chunks/{content-headers-q187pxxd.js → request-site-q187pxxd.js} +0 -0
- /package/dist/chunks/{content-headers-q4bn6dy8.js → request-site-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{content-headers-smaf4a18.js → request-site-smaf4a18.js} +0 -0
- /package/dist/chunks/{content-headers-xthc02cw.js → request-site-xthc02cw.js} +0 -0
- /package/dist/chunks/{content-headers-yc7nft6q.js → request-site-yc7nft6q.js} +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-zjmacp9c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/integration.ts
|
|
9
9
|
import { Integration } from "@opencode/core/integration";
|
|
10
|
-
import { Plugin } from "@opencode/core/plugin";
|
|
11
10
|
import { Effect } from "effect";
|
|
12
11
|
import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
|
|
13
12
|
import {
|
|
@@ -42,7 +41,6 @@ var authorize = (effect) => effect.pipe(Effect.mapError((error) => new InvalidRe
|
|
|
42
41
|
})));
|
|
43
42
|
var IntegrationHandler2 = HttpApiBuilder.group(Api2, "server.integration", (handlers) => Effect.gen(function* () {
|
|
44
43
|
return handlers.handle("integration.list", Effect.fn(function* () {
|
|
45
|
-
yield* Plugin.awaitActivation;
|
|
46
44
|
const service = yield* Integration.Service;
|
|
47
45
|
const current = yield* statements();
|
|
48
46
|
return yield* response2(service.list().pipe(Effect.map((integrations) => integrations.filter((integration) => isMcp(integration) || ManagedPolicy.decision(current, "integration.connect", integration.id) !== "deny"))));
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-zjmacp9c.js";
|
|
4
4
|
import {
|
|
5
5
|
CorsConfig2,
|
|
6
6
|
isAllowedRequestOrigin2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./request-site-q4bn6dy8.js";
|
|
8
8
|
import {
|
|
9
9
|
makeArtifact2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./request-site-7qpea5x7.js";
|
|
11
11
|
import {
|
|
12
12
|
makeJob2
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./request-site-78rcgzsr.js";
|
|
14
14
|
import {
|
|
15
15
|
makeMediaGet2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./request-site-djr0jy89.js";
|
|
17
17
|
import {
|
|
18
18
|
runPtySocket2
|
|
19
|
-
} from "./
|
|
19
|
+
} from "./request-site-q187pxxd.js";
|
|
20
20
|
import {
|
|
21
21
|
makeSchedule2
|
|
22
|
-
} from "./
|
|
22
|
+
} from "./request-site-059rbh9c.js";
|
|
23
23
|
|
|
24
24
|
// src/handlers/persistent-pty.ts
|
|
25
25
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
response2
|
|
3
|
+
} from "./request-site-ywn523ee.js";
|
|
4
|
+
import {
|
|
5
|
+
Api2
|
|
6
|
+
} from "./request-site-zjmacp9c.js";
|
|
7
|
+
|
|
8
|
+
// src/handlers/skill.ts
|
|
9
|
+
import { Skill } from "@opencode/core/skill";
|
|
10
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
11
|
+
var SkillHandler2 = HttpApiBuilder.group(Api2, "server.skill", (handlers) => handlers.handle("skill.list", () => response2(Skill.Service.use((skill) => skill.list()))));
|
|
12
|
+
|
|
13
|
+
export { SkillHandler2 };
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./request-site-ywn523ee.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./request-site-zjmacp9c.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./request-site-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
runPtySocket2,
|
|
15
15
|
holdLocation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./request-site-q187pxxd.js";
|
|
17
17
|
|
|
18
18
|
// src/handlers/pty.ts
|
|
19
19
|
import { Pty } from "@opencode/core/pty";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAllowedRequestOrigin2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-9rqn6x4v.js";
|
|
7
7
|
|
|
8
8
|
// src/request-site.ts
|
|
9
9
|
var exports_request_site = {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/pairing.ts
|
|
6
6
|
var exports_pairing = {};
|
|
7
7
|
__export(exports_pairing, {
|
|
8
8
|
ServerPairing: () => exports_pairing,
|
|
9
|
-
Service: () =>
|
|
9
|
+
Service: () => Service4,
|
|
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 Service4 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(Service4, Effect.gen(function* () {
|
|
21
21
|
const cache = yield* Cache.make({ capacity: 1000, lookup: noLookup, timeToLive: TTL });
|
|
22
|
-
return
|
|
22
|
+
return Service4.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(Service2, Effect.gen(function* () {
|
|
|
30
30
|
})
|
|
31
31
|
});
|
|
32
32
|
}));
|
|
33
|
-
var node2 = makeGlobalNode({ service:
|
|
33
|
+
var node2 = makeGlobalNode({ service: Service4, layer, deps: [] });
|
|
34
34
|
|
|
35
|
-
export {
|
|
35
|
+
export { Service4, node2, exports_pairing };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
awaitPlugins2,
|
|
3
2
|
response2
|
|
4
|
-
} from "./
|
|
3
|
+
} from "./request-site-ywn523ee.js";
|
|
5
4
|
import {
|
|
6
5
|
Api2
|
|
7
|
-
} from "./
|
|
6
|
+
} from "./request-site-zjmacp9c.js";
|
|
8
7
|
|
|
9
8
|
// src/handlers/provider.ts
|
|
10
9
|
import { Provider } from "@opencode/core/provider";
|
|
@@ -13,7 +12,6 @@ import { Effect } from "effect";
|
|
|
13
12
|
import { HttpApiBuilder } from "effect/http-api";
|
|
14
13
|
var ProviderHandler2 = HttpApiBuilder.group(Api2, "server.provider", (handlers) => Effect.gen(function* () {
|
|
15
14
|
return handlers.handle("provider.list", Effect.fn(function* () {
|
|
16
|
-
yield* awaitPlugins2;
|
|
17
15
|
const providers = yield* Provider.Service;
|
|
18
16
|
return yield* response2(providers.available());
|
|
19
17
|
})).handle("provider.get", Effect.fn(function* (ctx) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/event-feed.ts
|
|
6
6
|
var exports_event_feed = {};
|
|
@@ -11,7 +11,7 @@ __export(exports_event_feed, {
|
|
|
11
11
|
SubscriberCapacity: () => SubscriberCapacity2,
|
|
12
12
|
SubscriberOverflowError: () => SubscriberOverflowError2,
|
|
13
13
|
frame: () => frame2,
|
|
14
|
-
layer: () =>
|
|
14
|
+
layer: () => layer3,
|
|
15
15
|
make: () => make4
|
|
16
16
|
});
|
|
17
17
|
import { Bus } from "@opencode/core/bus";
|
|
@@ -76,9 +76,9 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
|
|
|
76
76
|
subscribe: (types) => Effect.acquireRelease(Queue.dropping(capacity).pipe(Effect.tap((queue) => Effect.sync(() => subscribers.set(queue, types?.length ? new Set(types) : undefined)))), (queue) => Effect.sync(() => subscribers.delete(queue)).pipe(Effect.andThen(Queue.shutdown(queue)), Effect.asVoid)).pipe(Effect.map(Stream.fromQueue))
|
|
77
77
|
});
|
|
78
78
|
});
|
|
79
|
-
var
|
|
79
|
+
var layer3 = Layer.effect(Service3, Effect.gen(function* () {
|
|
80
80
|
const bus = yield* Bus.Service;
|
|
81
81
|
return yield* make4(bus.listen);
|
|
82
82
|
}));
|
|
83
83
|
|
|
84
|
-
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service3, frame2, make4,
|
|
84
|
+
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service3, frame2, make4, layer3, exports_event_feed };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-zjmacp9c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/plugin.ts
|
|
9
9
|
import { Plugin } from "@opencode/core/plugin";
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-zjmacp9c.js";
|
|
4
4
|
|
|
5
5
|
// src/handlers/rpc.ts
|
|
6
6
|
import { Rpc } from "@opencode/core/rpc";
|
|
7
|
-
import { Plugin } from "@opencode/core/plugin";
|
|
8
7
|
import { RpcError, RpcInternalError } from "@opencode/protocol/errors";
|
|
9
8
|
import { Effect } from "effect";
|
|
10
9
|
import { HttpApiBuilder } from "effect/http-api";
|
|
11
10
|
var RpcHandler2 = HttpApiBuilder.group(Api2, "server.rpc", (handlers) => handlers.handle("rpc.call", ({ params, payload }) => Effect.gen(function* () {
|
|
12
|
-
yield* Plugin.awaitActivation;
|
|
13
11
|
const rpc = yield* Rpc.Service;
|
|
14
12
|
const output = yield* rpc.call(params.rpcID, params.method, payload.input);
|
|
15
13
|
return output === undefined ? {} : { output };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
locationErrors2
|
|
3
|
-
|
|
4
|
-
} from "./content-headers-50bbk3b2.js";
|
|
2
|
+
locationErrors2
|
|
3
|
+
} from "./request-site-ywn523ee.js";
|
|
5
4
|
import {
|
|
6
5
|
Api2
|
|
7
|
-
} from "./
|
|
6
|
+
} from "./request-site-zjmacp9c.js";
|
|
8
7
|
|
|
9
8
|
// src/handlers/voice.ts
|
|
10
9
|
import { Location } from "@opencode/core/location";
|
|
@@ -20,11 +19,9 @@ var VoiceHandler2 = HttpApiBuilder.group(Api2, "server.voice", (handlers) => Eff
|
|
|
20
19
|
const locations = yield* LocationServiceMap.Service;
|
|
21
20
|
const services = locations.get(Location.Ref.make({ directory: AbsolutePath.make(global.config) }));
|
|
22
21
|
return handlers.handle("voice.models", Effect.fn("server.voice.models")(function* () {
|
|
23
|
-
yield* awaitPlugins2;
|
|
24
22
|
const voice = yield* Voice.Service;
|
|
25
23
|
return { data: yield* voice.models() };
|
|
26
24
|
}, Effect.provide(services), locationErrors2)).handle("voice.session", Effect.fn("server.voice.session")(function* (request) {
|
|
27
|
-
yield* awaitPlugins2;
|
|
28
25
|
const voice = yield* Voice.Service;
|
|
29
26
|
const transport = yield* voice.session(request.payload).pipe(Effect.mapError((error) => error._tag === "Voice.InvalidRequestError" ? new InvalidRequestError({ message: error.message }) : new ServiceUnavailableError({ message: error.message, service: error.service })));
|
|
30
27
|
return { data: { transport } };
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-zjmacp9c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/vcs.ts
|
|
9
9
|
import { Vcs } from "@opencode/core/vcs";
|
|
10
10
|
import { Project } from "@opencode/core/project";
|
|
11
11
|
import { Worktree } from "@opencode/core/worktree";
|
|
12
12
|
import { Bus } from "@opencode/core/bus";
|
|
13
|
-
import { Plugin } from "@opencode/core/plugin";
|
|
14
13
|
import { Location } from "@opencode/core/location";
|
|
15
14
|
import { LocationServiceMap } from "@opencode/core/location-services";
|
|
16
15
|
import { ConflictError, InvalidRequestError, ServiceUnavailableError } from "@opencode/protocol/errors";
|
|
@@ -25,7 +24,6 @@ var VcsHandler2 = HttpApiBuilder.group(Api2, "server.vcs", (handlers) => Effect.
|
|
|
25
24
|
const location = yield* Location.Service;
|
|
26
25
|
const directory = location.project.directory;
|
|
27
26
|
const providerID = ctx.query.provider ?? "git";
|
|
28
|
-
yield* Plugin.awaitActivation;
|
|
29
27
|
const vcs = yield* Vcs.Service;
|
|
30
28
|
yield* vcs.initialize(providerID).pipe(Effect.mapError((error) => {
|
|
31
29
|
if (error.kind === "missing")
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-zjmacp9c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/reference.ts
|
|
9
9
|
import { Reference } from "@opencode/core/reference";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAllowedCorsOrigin2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
middleware2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-myqk22k5.js";
|
|
7
7
|
import {
|
|
8
8
|
withoutParentSpan2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./request-site-yc7nft6q.js";
|
|
10
10
|
import {
|
|
11
11
|
createRoutes2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./request-site-6dfvc2py.js";
|
|
13
13
|
import {
|
|
14
14
|
__export
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./request-site-9rqn6x4v.js";
|
|
16
16
|
|
|
17
17
|
// src/fetch.ts
|
|
18
18
|
var exports_fetch = {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestRef2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-zjmacp9c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/debug.ts
|
|
9
9
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
awaitPlugins2,
|
|
3
2
|
response2
|
|
4
|
-
} from "./
|
|
3
|
+
} from "./request-site-ywn523ee.js";
|
|
5
4
|
import {
|
|
6
5
|
Api2
|
|
7
|
-
} from "./
|
|
6
|
+
} from "./request-site-zjmacp9c.js";
|
|
8
7
|
|
|
9
8
|
// src/handlers/usage.ts
|
|
10
9
|
import { UsageLimits } from "@opencode/core/usage-limits";
|
|
@@ -13,7 +12,6 @@ import { Effect } from "effect";
|
|
|
13
12
|
import { HttpApiBuilder } from "effect/http-api";
|
|
14
13
|
var UsageHandler2 = HttpApiBuilder.group(Api2, "server.usage", (handlers) => Effect.gen(function* () {
|
|
15
14
|
return handlers.handle("usage.limits", Effect.fn("server.usage.limits")(function* () {
|
|
16
|
-
yield* awaitPlugins2;
|
|
17
15
|
const limits = yield* UsageLimits.Service;
|
|
18
16
|
return yield* response2(limits.get().pipe(Effect.map((info) => info ?? null), Effect.mapError((error) => new ServiceUnavailableError({ message: error.message, service: "opencode" }))));
|
|
19
17
|
}));
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-smaf4a18.js";
|
|
4
4
|
|
|
5
5
|
// src/location.ts
|
|
6
6
|
import { FileSystem } from "@opencode/core/filesystem";
|
|
7
7
|
import { Location } from "@opencode/core/location";
|
|
8
|
-
import { Plugin } from "@opencode/core/plugin";
|
|
9
8
|
import { LocationServiceMap } from "@opencode/core/location-services";
|
|
10
9
|
import { AbsolutePath } from "@opencode/core/schema";
|
|
11
10
|
import { Session } from "@opencode/core/session";
|
|
12
|
-
import { LocationNotFoundError, InvalidRequestError
|
|
11
|
+
import { LocationNotFoundError, InvalidRequestError } from "@opencode/protocol/errors";
|
|
13
12
|
import { Effect, Layer, Schema } from "effect";
|
|
14
13
|
import { HttpServerRequest } from "effect/http";
|
|
15
14
|
import { HttpApiMiddleware } from "effect/http-api";
|
|
@@ -21,13 +20,6 @@ function locationErrors2(effect) {
|
|
|
21
20
|
message: `Location not found: ${error.directory}`
|
|
22
21
|
}))));
|
|
23
22
|
}
|
|
24
|
-
var awaitPlugins2 = Plugin.awaitActivation.pipe(Effect.timeoutOrElse({
|
|
25
|
-
duration: "5 seconds",
|
|
26
|
-
orElse: () => Effect.fail(new ServiceUnavailableError({
|
|
27
|
-
message: "Location plugins did not finish activating",
|
|
28
|
-
service: "plugin"
|
|
29
|
-
}))
|
|
30
|
-
}));
|
|
31
23
|
function response2(data) {
|
|
32
24
|
return Effect.gen(function* () {
|
|
33
25
|
const location = yield* Location.Service;
|
|
@@ -67,4 +59,4 @@ var layer4 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
|
|
|
67
59
|
}));
|
|
68
60
|
}));
|
|
69
61
|
|
|
70
|
-
export { LocationMiddleware2, locationErrors2,
|
|
62
|
+
export { LocationMiddleware2, locationErrors2, response2, sessionInfo2, requestRef2, layer4 };
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
missingMessage2,
|
|
4
4
|
failedMessageDecode2,
|
|
5
5
|
failedSnapshot2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-smaf4a18.js";
|
|
7
7
|
import {
|
|
8
8
|
locationErrors2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./request-site-ywn523ee.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./request-site-zjmacp9c.js";
|
|
13
13
|
import {
|
|
14
14
|
wantsMediaRefs2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./request-site-xthc02cw.js";
|
|
16
16
|
|
|
17
17
|
// src/handlers/session.ts
|
|
18
18
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/server-info.ts
|
|
6
6
|
var exports_server_info = {};
|
|
7
7
|
__export(exports_server_info, {
|
|
8
8
|
ServerInfo: () => exports_server_info,
|
|
9
|
-
Service: () =>
|
|
9
|
+
Service: () => Service2,
|
|
10
10
|
connectionURLs: () => connectionURLs2,
|
|
11
|
-
layer: () =>
|
|
11
|
+
layer: () => layer2
|
|
12
12
|
});
|
|
13
13
|
import { Context, Layer } from "effect";
|
|
14
14
|
import { networkInterfaces } from "node:os";
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class Service2 extends Context.Service()("@opencode/server/ServerInfo") {
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return Layer.succeed(
|
|
18
|
+
function layer2(urls, tmp, app = {}) {
|
|
19
|
+
return Layer.succeed(Service2, Service2.of({ urls, app, paths: { tmp } }));
|
|
20
20
|
}
|
|
21
21
|
function connectionURLs2(value, requestedHostname) {
|
|
22
22
|
const url = new URL(value);
|
|
@@ -38,4 +38,4 @@ function connectionURLs2(value, requestedHostname) {
|
|
|
38
38
|
];
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export {
|
|
41
|
+
export { Service2, layer2, connectionURLs2, exports_server_info };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocationMiddleware2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
FormLocationMiddleware2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-ah2sj2pr.js";
|
|
7
7
|
import {
|
|
8
8
|
SessionLocationMiddleware2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./request-site-vw0q3knq.js";
|
|
10
10
|
|
|
11
11
|
// src/api.ts
|
|
12
12
|
import { makeDefaultApi } from "@opencode/protocol/api";
|
package/dist/content-headers.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
download2,
|
|
4
4
|
disposition2,
|
|
5
5
|
exports_content_headers
|
|
6
|
-
} from "./chunks/
|
|
6
|
+
} from "./chunks/request-site-t32e1bbt.js";
|
|
7
7
|
export {
|
|
8
8
|
CONTENT_SECURITY_POLICY2 as CONTENT_SECURITY_POLICY,
|
|
9
9
|
exports_content_headers as ContentHeaders,
|
package/dist/cors.js
CHANGED
package/dist/event-feed.js
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
Service3,
|
|
6
6
|
frame2,
|
|
7
7
|
make4,
|
|
8
|
-
|
|
8
|
+
layer3,
|
|
9
9
|
exports_event_feed
|
|
10
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/request-site-qfyg9gb7.js";
|
|
11
11
|
export {
|
|
12
12
|
EncodingError2 as EncodingError,
|
|
13
13
|
exports_event_feed as EventFeed,
|
|
@@ -15,6 +15,6 @@ export {
|
|
|
15
15
|
SubscriberCapacity2 as SubscriberCapacity,
|
|
16
16
|
SubscriberOverflowError2 as SubscriberOverflowError,
|
|
17
17
|
frame2 as frame,
|
|
18
|
-
|
|
18
|
+
layer3 as layer,
|
|
19
19
|
make4 as make
|
|
20
20
|
};
|