@opencode/server 0.0.0-dev-21086 → 0.0.0-dev-21090
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/{service-status-p6ct2ak8.js → handlers-0gbaaetm.js} +2 -2
- package/dist/chunks/{service-status-mk2mz66m.js → handlers-1wyt3am5.js} +2 -2
- package/dist/chunks/{service-status-e2hzz5kk.js → handlers-1ybjhnn1.js} +3 -3
- package/dist/chunks/{service-status-q8n44kky.js → handlers-2ac2kv4c.js} +3 -3
- package/dist/chunks/{service-status-krpsczf8.js → handlers-3m0ygtwr.js} +2 -2
- package/dist/chunks/{service-status-mahm5rvs.js → handlers-4bxenate.js} +2 -2
- package/dist/chunks/{service-status-4gnb9897.js → handlers-4hhhes7w.js} +1 -1
- package/dist/chunks/{service-status-3q4vdk9m.js → handlers-4yynsby0.js} +8 -8
- package/dist/chunks/{service-status-3atcw39t.js → handlers-7armztsr.js} +2 -2
- package/dist/chunks/{service-status-w0jn068c.js → handlers-7bgw0qp5.js} +2 -2
- package/dist/chunks/{service-status-6q8ztdfd.js → handlers-7ckfkptd.js} +19 -19
- package/dist/chunks/{service-status-4epskng5.js → handlers-7jgfqyjw.js} +4 -4
- package/dist/chunks/{service-status-rc3nk1bx.js → handlers-8me0mqmd.js} +2 -2
- package/dist/chunks/{service-status-vdtx70fv.js → handlers-8z4c9n9h.js} +2 -2
- package/dist/chunks/{service-status-0cppk2bc.js → handlers-adb03esn.js} +2 -2
- package/dist/chunks/{service-status-anm12x33.js → handlers-anm12x33.js} +1 -1
- package/dist/chunks/{service-status-gsqctp76.js → handlers-b3jp5nc2.js} +2 -2
- package/dist/chunks/{service-status-50bbk3b2.js → handlers-b56hqv74.js} +3 -3
- package/dist/chunks/{service-status-k8rzy6d4.js → handlers-begnybrv.js} +1 -1
- package/dist/chunks/{service-status-ghk96rjy.js → handlers-c6kb7fmf.js} +7 -7
- package/dist/chunks/{service-status-xdf2rf2e.js → handlers-ftx0rasv.js} +7 -7
- package/dist/chunks/{service-status-6ypp9np2.js → handlers-gpx0gpd1.js} +2 -2
- package/dist/chunks/{service-status-n60r5keb.js → handlers-hc75vmb2.js} +1 -1
- package/dist/chunks/{service-status-b3bmdkga.js → handlers-j4zqsxgy.js} +1 -1
- package/dist/chunks/{service-status-ez8kk7rt.js → handlers-k136bvh5.js} +1 -1
- package/dist/chunks/{service-status-vbanrv0z.js → handlers-nnn3xt9j.js} +1 -1
- package/dist/chunks/{service-status-3aej5azy.js → handlers-nqkf5k2k.js} +1 -1
- package/dist/chunks/{service-status-eaxk76q8.js → handlers-pc33848r.js} +2 -2
- package/dist/chunks/{service-status-jyqwgkdk.js → handlers-qnwsemje.js} +3 -3
- package/dist/chunks/{service-status-mhfbkkb7.js → handlers-rkx9hda5.js} +2 -2
- package/dist/chunks/{service-status-jf93wtb0.js → handlers-rsyh80xz.js} +34 -34
- package/dist/chunks/{service-status-7b00qdf6.js → handlers-rw74d7br.js} +1 -1
- package/dist/chunks/{service-status-0614xxr7.js → handlers-ssr7ed3s.js} +6 -7
- package/dist/chunks/{service-status-x6486bry.js → handlers-sstsrjtg.js} +8 -8
- package/dist/chunks/{service-status-w0v7k7r7.js → handlers-teh9fk9j.js} +6 -6
- package/dist/chunks/{service-status-2sy3c7de.js → handlers-tjpn0s1b.js} +10 -10
- package/dist/chunks/{service-status-esbdfpyn.js → handlers-vfwf1dhc.js} +2 -2
- package/dist/chunks/{service-status-xsrtpxyd.js → handlers-vpz7f20y.js} +4 -4
- package/dist/chunks/{service-status-wv5twc2g.js → handlers-w06km2r1.js} +8 -8
- package/dist/chunks/{service-status-yv9sxhn9.js → handlers-x34tt0qt.js} +2 -2
- package/dist/chunks/{service-status-j1p3e665.js → handlers-y5j6n4zr.js} +2 -2
- package/dist/chunks/{service-status-gx9nwmym.js → handlers-y9g6k1bm.js} +2 -2
- package/dist/chunks/{service-status-yfz2nrjq.js → handlers-yfz2nrjq.js} +1 -1
- package/dist/chunks/{service-status-jqrn6kzd.js → handlers-z09f7k88.js} +2 -2
- package/dist/chunks/{service-status-tp1rntzw.js → handlers-zj4vfrqs.js} +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +7 -7
- package/dist/fetch.js +50 -50
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/command.js +6 -6
- package/dist/handlers/config.js +6 -6
- package/dist/handlers/credential.js +6 -6
- 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 +6 -6
- package/dist/handlers/generate.js +6 -6
- package/dist/handlers/integration.js +6 -6
- package/dist/handlers/location.js +6 -6
- package/dist/handlers/mcp.js +6 -6
- package/dist/handlers/message.js +6 -6
- 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 +8 -8
- 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 +9 -9
- package/dist/handlers/reference.js +6 -6
- package/dist/handlers/rpc.js +6 -6
- package/dist/handlers/server.js +9 -9
- package/dist/handlers/session-error.js +1 -1
- package/dist/handlers/session.js +6 -6
- package/dist/handlers/shell.js +6 -6
- package/dist/handlers/skill.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 +44 -44
- package/dist/location.js +4 -4
- 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 +5 -5
- package/dist/process.js +52 -52
- package/dist/pty-environment.js +7 -7
- package/dist/request-tracing.js +1 -1
- package/dist/routes.js +47 -47
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +3 -3
- package/dist/workerd.js +51 -51
- package/package.json +8 -8
- /package/dist/chunks/{service-status-9rqn6x4v.js → handlers-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{service-status-erzfdgke.js → handlers-erzfdgke.js} +0 -0
- /package/dist/chunks/{service-status-h6rt5k9s.js → handlers-h6rt5k9s.js} +0 -0
- /package/dist/chunks/{service-status-q4bn6dy8.js → handlers-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{service-status-smaf4a18.js → handlers-smaf4a18.js} +0 -0
- /package/dist/chunks/{service-status-yc7nft6q.js → handlers-yc7nft6q.js} +0 -0
|
@@ -1,102 +1,102 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GenerateHandler2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./handlers-7bgw0qp5.js";
|
|
4
4
|
import {
|
|
5
5
|
VoiceHandler2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./handlers-z09f7k88.js";
|
|
7
7
|
import {
|
|
8
8
|
MessageHandler2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./handlers-7armztsr.js";
|
|
10
10
|
import {
|
|
11
11
|
ModelHandler2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./handlers-x34tt0qt.js";
|
|
13
13
|
import {
|
|
14
14
|
ProviderHandler2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./handlers-y9g6k1bm.js";
|
|
16
16
|
import {
|
|
17
17
|
SessionHandler2
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./handlers-ssr7ed3s.js";
|
|
19
19
|
import {
|
|
20
20
|
PermissionHandler2
|
|
21
|
-
} from "./
|
|
21
|
+
} from "./handlers-1ybjhnn1.js";
|
|
22
22
|
import {
|
|
23
23
|
FileSystemHandler2
|
|
24
|
-
} from "./
|
|
24
|
+
} from "./handlers-y5j6n4zr.js";
|
|
25
25
|
import {
|
|
26
26
|
FormHandler2
|
|
27
|
-
} from "./
|
|
27
|
+
} from "./handlers-b3jp5nc2.js";
|
|
28
28
|
import {
|
|
29
29
|
CommandHandler2
|
|
30
|
-
} from "./
|
|
30
|
+
} from "./handlers-4bxenate.js";
|
|
31
31
|
import {
|
|
32
32
|
SkillHandler2
|
|
33
|
-
} from "./
|
|
33
|
+
} from "./handlers-3m0ygtwr.js";
|
|
34
34
|
import {
|
|
35
35
|
RpcHandler2
|
|
36
|
-
} from "./
|
|
36
|
+
} from "./handlers-rw74d7br.js";
|
|
37
37
|
import {
|
|
38
|
-
|
|
39
|
-
} from "./
|
|
38
|
+
layer3
|
|
39
|
+
} from "./handlers-tjpn0s1b.js";
|
|
40
40
|
import {
|
|
41
41
|
EventHandler2
|
|
42
|
-
} from "./
|
|
42
|
+
} from "./handlers-7jgfqyjw.js";
|
|
43
43
|
import {
|
|
44
44
|
AgentHandler2
|
|
45
|
-
} from "./
|
|
45
|
+
} from "./handlers-1wyt3am5.js";
|
|
46
46
|
import {
|
|
47
47
|
PluginHandler2
|
|
48
|
-
} from "./
|
|
48
|
+
} from "./handlers-adb03esn.js";
|
|
49
49
|
import {
|
|
50
50
|
ServerHandler2
|
|
51
|
-
} from "./
|
|
51
|
+
} from "./handlers-4yynsby0.js";
|
|
52
52
|
import {
|
|
53
53
|
DebugHandler2
|
|
54
|
-
} from "./
|
|
54
|
+
} from "./handlers-vfwf1dhc.js";
|
|
55
55
|
import {
|
|
56
56
|
PtyHandler2
|
|
57
|
-
} from "./
|
|
57
|
+
} from "./handlers-ftx0rasv.js";
|
|
58
58
|
import {
|
|
59
59
|
PersistentPtyHandler2
|
|
60
|
-
} from "./
|
|
60
|
+
} from "./handlers-qnwsemje.js";
|
|
61
61
|
import {
|
|
62
62
|
ShellHandler2
|
|
63
|
-
} from "./
|
|
63
|
+
} from "./handlers-gpx0gpd1.js";
|
|
64
64
|
import {
|
|
65
65
|
ReferenceHandler2
|
|
66
|
-
} from "./
|
|
66
|
+
} from "./handlers-pc33848r.js";
|
|
67
67
|
import {
|
|
68
68
|
LocationHandler2
|
|
69
|
-
} from "./
|
|
69
|
+
} from "./handlers-nqkf5k2k.js";
|
|
70
70
|
import {
|
|
71
71
|
IntegrationHandler2
|
|
72
|
-
} from "./
|
|
72
|
+
} from "./handlers-rkx9hda5.js";
|
|
73
73
|
import {
|
|
74
74
|
WebSearchHandler2
|
|
75
|
-
} from "./
|
|
75
|
+
} from "./handlers-8z4c9n9h.js";
|
|
76
76
|
import {
|
|
77
77
|
McpHandler2
|
|
78
|
-
} from "./
|
|
78
|
+
} from "./handlers-0gbaaetm.js";
|
|
79
79
|
import {
|
|
80
80
|
CredentialHandler2
|
|
81
|
-
} from "./
|
|
81
|
+
} from "./handlers-hc75vmb2.js";
|
|
82
82
|
import {
|
|
83
83
|
ProjectHandler2
|
|
84
|
-
} from "./
|
|
84
|
+
} from "./handlers-begnybrv.js";
|
|
85
85
|
import {
|
|
86
86
|
WorktreeHandler2
|
|
87
|
-
} from "./
|
|
87
|
+
} from "./handlers-zj4vfrqs.js";
|
|
88
88
|
import {
|
|
89
89
|
VcsHandler2
|
|
90
|
-
} from "./
|
|
90
|
+
} from "./handlers-8me0mqmd.js";
|
|
91
91
|
import {
|
|
92
92
|
MigrationHandler2
|
|
93
|
-
} from "./
|
|
93
|
+
} from "./handlers-nnn3xt9j.js";
|
|
94
94
|
import {
|
|
95
95
|
ConfigHandler2
|
|
96
|
-
} from "./
|
|
96
|
+
} from "./handlers-k136bvh5.js";
|
|
97
97
|
|
|
98
98
|
// src/handlers.ts
|
|
99
99
|
import { Layer } from "effect";
|
|
100
|
-
var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(
|
|
100
|
+
var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(layer3)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
|
|
101
101
|
|
|
102
102
|
export { handlers2 };
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
missingMessage2,
|
|
4
4
|
failedMessageDecode2,
|
|
5
5
|
failedSnapshot2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./handlers-smaf4a18.js";
|
|
7
7
|
import {
|
|
8
8
|
locationErrors2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./handlers-b56hqv74.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./handlers-2ac2kv4c.js";
|
|
13
13
|
|
|
14
14
|
// src/handlers/session.ts
|
|
15
15
|
import { Session } from "@opencode/core/session";
|
|
@@ -20,7 +20,6 @@ import { InstructionEntry } from "@opencode/core/session/instruction-entry";
|
|
|
20
20
|
import { Form } from "@opencode/core/form";
|
|
21
21
|
import { DateTime, Effect, Stream } from "effect";
|
|
22
22
|
import { HttpApiBuilder, HttpApiSchema } from "effect/http-api";
|
|
23
|
-
import { SessionsCursor } from "@opencode/protocol/groups/session";
|
|
24
23
|
import {
|
|
25
24
|
ConflictError,
|
|
26
25
|
CommandExecutionError,
|
|
@@ -56,7 +55,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
56
55
|
});
|
|
57
56
|
const pendingMutation = (effect, conflict) => effect.pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.InboxConflictError", (error) => new ConflictError({ resource: error.inboxID, message: `${conflict}: ${error.inboxID}` })), Effect.as(HttpApiSchema.NoContent.make()));
|
|
58
57
|
return handlers.handle("session.list", Effect.fn(function* (ctx) {
|
|
59
|
-
const query = ctx.query.cursor !== undefined ? yield*
|
|
58
|
+
const query = ctx.query.cursor !== undefined ? yield* Session.ListCursor.parse(ctx.query.cursor).pipe(Effect.mapError(() => new InvalidCursorError({ message: "Invalid cursor" }))) : ctx.query;
|
|
60
59
|
const page = yield* session.list({
|
|
61
60
|
...query,
|
|
62
61
|
limit: ctx.query.limit ?? DefaultSessionsLimit
|
|
@@ -67,7 +66,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
67
66
|
return {
|
|
68
67
|
data: sessions,
|
|
69
68
|
cursor: {
|
|
70
|
-
previous: first ?
|
|
69
|
+
previous: first ? Session.ListCursor.make({
|
|
71
70
|
...query,
|
|
72
71
|
anchor: {
|
|
73
72
|
id: first.id,
|
|
@@ -75,7 +74,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
75
74
|
direction: "previous"
|
|
76
75
|
}
|
|
77
76
|
}) : undefined,
|
|
78
|
-
next: last ?
|
|
77
|
+
next: last ? Session.ListCursor.make({
|
|
79
78
|
...query,
|
|
80
79
|
anchor: {
|
|
81
80
|
id: last.id,
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./handlers-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: () =>
|
|
10
|
-
node: () =>
|
|
9
|
+
Service: () => Service5,
|
|
10
|
+
node: () => node3
|
|
11
11
|
});
|
|
12
12
|
import { Cache, Context, Duration, Effect, Layer } from "effect";
|
|
13
13
|
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 Service5 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(Service5, Effect.gen(function* () {
|
|
21
21
|
const cache = yield* Cache.make({ capacity: 1000, lookup: noLookup, timeToLive: TTL });
|
|
22
|
-
return
|
|
22
|
+
return Service5.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
|
|
33
|
+
var node3 = makeGlobalNode({ service: Service5, layer, deps: [] });
|
|
34
34
|
|
|
35
|
-
export {
|
|
35
|
+
export { Service5, node3, exports_pairing };
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAllowedCorsOrigin2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./handlers-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
createRoutes2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./handlers-7ckfkptd.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./handlers-9rqn6x4v.js";
|
|
10
10
|
|
|
11
11
|
// src/fetch.ts
|
|
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/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,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./handlers-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/event-feed.ts
|
|
6
6
|
var exports_event_feed = {};
|
|
7
7
|
__export(exports_event_feed, {
|
|
8
8
|
EncodingError: () => EncodingError2,
|
|
9
9
|
EventFeed: () => exports_event_feed,
|
|
10
|
-
Service: () =>
|
|
10
|
+
Service: () => Service3,
|
|
11
11
|
SubscriberCapacity: () => SubscriberCapacity2,
|
|
12
12
|
SubscriberOverflowError: () => SubscriberOverflowError2,
|
|
13
13
|
frame: () => frame2,
|
|
14
|
-
layer: () =>
|
|
15
|
-
make: () =>
|
|
14
|
+
layer: () => layer3,
|
|
15
|
+
make: () => make3
|
|
16
16
|
});
|
|
17
17
|
import { Bus } from "@opencode/core/bus";
|
|
18
18
|
import { Event } from "@opencode/schema/event";
|
|
@@ -30,14 +30,14 @@ class EncodingError2 extends Schema.TaggedError()("EventFeed.EncodingError", {
|
|
|
30
30
|
}) {
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
class
|
|
33
|
+
class Service3 extends Context.Service()("@opencode/server/EventFeed") {
|
|
34
34
|
}
|
|
35
35
|
function frame2(event) {
|
|
36
36
|
return `data: ${JSON.stringify(event)}
|
|
37
37
|
|
|
38
38
|
`;
|
|
39
39
|
}
|
|
40
|
-
var
|
|
40
|
+
var make3 = Effect.fn("EventFeed.make")(function* (observe, options) {
|
|
41
41
|
const capacity = options?.capacity ?? SubscriberCapacity2;
|
|
42
42
|
const render = options?.encode ?? frame2;
|
|
43
43
|
const subscribers = new Set;
|
|
@@ -71,13 +71,13 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
|
|
|
71
71
|
});
|
|
72
72
|
const unsubscribe = yield* observe(publish);
|
|
73
73
|
yield* Effect.addFinalizer(() => unsubscribe);
|
|
74
|
-
return
|
|
74
|
+
return Service3.of({
|
|
75
75
|
subscribe: Effect.acquireRelease(Queue.dropping(capacity).pipe(Effect.tap((queue) => Effect.sync(() => subscribers.add(queue)))), (queue) => Effect.sync(() => subscribers.delete(queue)).pipe(Effect.andThen(Queue.shutdown(queue)), Effect.asVoid)).pipe(Effect.map(Stream.fromQueue))
|
|
76
76
|
});
|
|
77
77
|
});
|
|
78
|
-
var
|
|
78
|
+
var layer3 = Layer.effect(Service3, Effect.gen(function* () {
|
|
79
79
|
const bus = yield* Bus.Service;
|
|
80
|
-
return yield*
|
|
80
|
+
return yield* make3(bus.listen);
|
|
81
81
|
}));
|
|
82
82
|
|
|
83
|
-
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2,
|
|
83
|
+
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service3, frame2, make3, layer3, exports_event_feed };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestRef2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./handlers-b56hqv74.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./handlers-2ac2kv4c.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
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./handlers-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: () => make4
|
|
10
10
|
});
|
|
11
11
|
import { Effect, Ref } from "effect";
|
|
12
|
-
var
|
|
12
|
+
var make4 = 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 { make4, exports_service_status };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./handlers-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/pty-environment.ts
|
|
6
6
|
var exports_pty_environment = {};
|
|
7
7
|
__export(exports_pty_environment, {
|
|
8
8
|
PtyEnvironment: () => exports_pty_environment,
|
|
9
|
-
Service: () =>
|
|
10
|
-
layer: () =>
|
|
11
|
-
node: () =>
|
|
9
|
+
Service: () => Service4,
|
|
10
|
+
layer: () => layer4,
|
|
11
|
+
node: () => node2
|
|
12
12
|
});
|
|
13
13
|
import { Context, Effect, Layer } from "effect";
|
|
14
14
|
import { makeGlobalNode } from "@opencode/util/effect/app-node";
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class Service4 extends Context.Service()("@opencode/ServerPtyEnvironment") {
|
|
17
17
|
}
|
|
18
|
-
var
|
|
18
|
+
var layer4 = Layer.succeed(Service4, Service4.of({
|
|
19
19
|
get: () => Effect.succeed({})
|
|
20
20
|
}));
|
|
21
|
-
var
|
|
21
|
+
var node2 = makeGlobalNode({ service: Service4, layer: layer4, deps: [] });
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { Service4, layer4, node2, exports_pty_environment };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
awaitPlugins2,
|
|
3
3
|
response2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./handlers-b56hqv74.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./handlers-2ac2kv4c.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/model.ts
|
|
10
10
|
import { Model } from "@opencode/core/model";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./handlers-b56hqv74.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./handlers-2ac2kv4c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/fs.ts
|
|
9
9
|
import { FileSystem } from "@opencode/core/filesystem";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./handlers-b56hqv74.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./handlers-2ac2kv4c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/provider.ts
|
|
9
9
|
import { Provider } from "@opencode/core/provider";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
locationErrors2,
|
|
3
3
|
awaitPlugins2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./handlers-b56hqv74.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./handlers-2ac2kv4c.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/voice.ts
|
|
10
10
|
import { Location } from "@opencode/core/location";
|
package/dist/cors.js
CHANGED
package/dist/event-feed.js
CHANGED
|
@@ -2,19 +2,19 @@ import {
|
|
|
2
2
|
SubscriberCapacity2,
|
|
3
3
|
SubscriberOverflowError2,
|
|
4
4
|
EncodingError2,
|
|
5
|
-
|
|
5
|
+
Service3,
|
|
6
6
|
frame2,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
make3,
|
|
8
|
+
layer3,
|
|
9
9
|
exports_event_feed
|
|
10
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/handlers-tjpn0s1b.js";
|
|
11
11
|
export {
|
|
12
12
|
EncodingError2 as EncodingError,
|
|
13
13
|
exports_event_feed as EventFeed,
|
|
14
|
-
|
|
14
|
+
Service3 as Service,
|
|
15
15
|
SubscriberCapacity2 as SubscriberCapacity,
|
|
16
16
|
SubscriberOverflowError2 as SubscriberOverflowError,
|
|
17
17
|
frame2 as frame,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
layer3 as layer,
|
|
19
|
+
make3 as make
|
|
20
20
|
};
|
package/dist/fetch.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
make2,
|
|
3
3
|
exports_fetch
|
|
4
|
-
} from "./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
8
|
-
import"./chunks/
|
|
9
|
-
import"./chunks/
|
|
10
|
-
import"./chunks/
|
|
11
|
-
import"./chunks/
|
|
12
|
-
import"./chunks/
|
|
13
|
-
import"./chunks/
|
|
14
|
-
import"./chunks/
|
|
15
|
-
import"./chunks/
|
|
16
|
-
import"./chunks/
|
|
17
|
-
import"./chunks/
|
|
18
|
-
import"./chunks/
|
|
19
|
-
import"./chunks/
|
|
20
|
-
import"./chunks/
|
|
21
|
-
import"./chunks/
|
|
22
|
-
import"./chunks/
|
|
23
|
-
import"./chunks/
|
|
24
|
-
import"./chunks/
|
|
25
|
-
import"./chunks/
|
|
26
|
-
import"./chunks/
|
|
27
|
-
import"./chunks/
|
|
28
|
-
import"./chunks/
|
|
29
|
-
import"./chunks/
|
|
30
|
-
import"./chunks/
|
|
31
|
-
import"./chunks/
|
|
32
|
-
import"./chunks/
|
|
33
|
-
import"./chunks/
|
|
34
|
-
import"./chunks/
|
|
35
|
-
import"./chunks/
|
|
36
|
-
import"./chunks/
|
|
37
|
-
import"./chunks/
|
|
38
|
-
import"./chunks/
|
|
39
|
-
import"./chunks/
|
|
40
|
-
import"./chunks/
|
|
41
|
-
import"./chunks/
|
|
42
|
-
import"./chunks/
|
|
43
|
-
import"./chunks/
|
|
44
|
-
import"./chunks/
|
|
45
|
-
import"./chunks/
|
|
46
|
-
import"./chunks/
|
|
47
|
-
import"./chunks/
|
|
48
|
-
import"./chunks/
|
|
49
|
-
import"./chunks/
|
|
50
|
-
import"./chunks/
|
|
51
|
-
import"./chunks/
|
|
4
|
+
} from "./chunks/handlers-teh9fk9j.js";
|
|
5
|
+
import"./chunks/handlers-7ckfkptd.js";
|
|
6
|
+
import"./chunks/handlers-yfz2nrjq.js";
|
|
7
|
+
import"./chunks/handlers-erzfdgke.js";
|
|
8
|
+
import"./chunks/handlers-rsyh80xz.js";
|
|
9
|
+
import"./chunks/handlers-nnn3xt9j.js";
|
|
10
|
+
import"./chunks/handlers-pc33848r.js";
|
|
11
|
+
import"./chunks/handlers-8z4c9n9h.js";
|
|
12
|
+
import"./chunks/handlers-gpx0gpd1.js";
|
|
13
|
+
import"./chunks/handlers-rkx9hda5.js";
|
|
14
|
+
import"./chunks/handlers-ftx0rasv.js";
|
|
15
|
+
import"./chunks/handlers-4bxenate.js";
|
|
16
|
+
import"./chunks/handlers-7armztsr.js";
|
|
17
|
+
import"./chunks/handlers-4yynsby0.js";
|
|
18
|
+
import"./chunks/handlers-nqkf5k2k.js";
|
|
19
|
+
import"./chunks/handlers-hc75vmb2.js";
|
|
20
|
+
import"./chunks/handlers-3m0ygtwr.js";
|
|
21
|
+
import"./chunks/handlers-1wyt3am5.js";
|
|
22
|
+
import"./chunks/handlers-b3jp5nc2.js";
|
|
23
|
+
import"./chunks/handlers-7bgw0qp5.js";
|
|
24
|
+
import"./chunks/handlers-z09f7k88.js";
|
|
25
|
+
import"./chunks/handlers-qnwsemje.js";
|
|
26
|
+
import"./chunks/handlers-h6rt5k9s.js";
|
|
27
|
+
import"./chunks/handlers-0gbaaetm.js";
|
|
28
|
+
import"./chunks/handlers-ssr7ed3s.js";
|
|
29
|
+
import"./chunks/handlers-1ybjhnn1.js";
|
|
30
|
+
import"./chunks/handlers-7jgfqyjw.js";
|
|
31
|
+
import"./chunks/handlers-x34tt0qt.js";
|
|
32
|
+
import"./chunks/handlers-vfwf1dhc.js";
|
|
33
|
+
import"./chunks/handlers-8me0mqmd.js";
|
|
34
|
+
import"./chunks/handlers-zj4vfrqs.js";
|
|
35
|
+
import"./chunks/handlers-y5j6n4zr.js";
|
|
36
|
+
import"./chunks/handlers-y9g6k1bm.js";
|
|
37
|
+
import"./chunks/handlers-rw74d7br.js";
|
|
38
|
+
import"./chunks/handlers-begnybrv.js";
|
|
39
|
+
import"./chunks/handlers-adb03esn.js";
|
|
40
|
+
import"./chunks/handlers-k136bvh5.js";
|
|
41
|
+
import"./chunks/handlers-anm12x33.js";
|
|
42
|
+
import"./chunks/handlers-q4bn6dy8.js";
|
|
43
|
+
import"./chunks/handlers-c6kb7fmf.js";
|
|
44
|
+
import"./chunks/handlers-tjpn0s1b.js";
|
|
45
|
+
import"./chunks/handlers-2ac2kv4c.js";
|
|
46
|
+
import"./chunks/handlers-4hhhes7w.js";
|
|
47
|
+
import"./chunks/handlers-j4zqsxgy.js";
|
|
48
|
+
import"./chunks/handlers-w06km2r1.js";
|
|
49
|
+
import"./chunks/handlers-b56hqv74.js";
|
|
50
|
+
import"./chunks/handlers-smaf4a18.js";
|
|
51
|
+
import"./chunks/handlers-sstsrjtg.js";
|
|
52
52
|
export {
|
|
53
53
|
exports_fetch as ServerFetch,
|
|
54
|
-
|
|
54
|
+
make2 as make
|
|
55
55
|
};
|
package/dist/handlers/agent.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/handlers-1wyt3am5.js";
|
|
4
|
+
import"../chunks/handlers-2ac2kv4c.js";
|
|
5
|
+
import"../chunks/handlers-4hhhes7w.js";
|
|
6
|
+
import"../chunks/handlers-j4zqsxgy.js";
|
|
7
|
+
import"../chunks/handlers-b56hqv74.js";
|
|
8
|
+
import"../chunks/handlers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
AgentHandler2 as AgentHandler
|
|
11
11
|
};
|