@opencode/server 2.0.8 → 2.0.9
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.d.ts +4 -4
- package/dist/api.js +10 -9
- package/dist/auth.js +12 -17
- package/dist/chunks/fetch-00nn3k4b.js +20 -0
- package/dist/chunks/fetch-04xw3v55.js +23 -0
- package/dist/chunks/fetch-0d9kah4z.js +23 -0
- package/dist/chunks/fetch-19c9ysa1.js +61 -0
- package/dist/chunks/fetch-1c4qas2w.js +346 -0
- package/dist/chunks/fetch-254zvkj6.js +22 -0
- package/dist/chunks/fetch-3kzx88w9.js +26 -0
- package/dist/chunks/fetch-4cf3x1kw.js +21 -0
- package/dist/chunks/fetch-4g0fa6m0.js +32 -0
- package/dist/chunks/fetch-4vn5bvkr.js +25 -0
- package/dist/chunks/fetch-5rwqcaw2.js +33 -0
- package/dist/chunks/fetch-6gkz39ey.js +55 -0
- package/dist/chunks/fetch-6nvan4e0.js +17 -0
- package/dist/chunks/fetch-7rzt3wm8.js +13 -0
- package/dist/chunks/fetch-8bajbwjh.js +40 -0
- package/dist/chunks/fetch-99sfd1j8.js +83 -0
- package/dist/chunks/fetch-9rqn6x4v.js +16 -0
- package/dist/chunks/fetch-a6yp8301.js +156 -0
- package/dist/chunks/fetch-arj41x43.js +77 -0
- package/dist/chunks/fetch-b0b71rwa.js +39 -0
- package/dist/chunks/fetch-bjrwanme.js +22 -0
- package/dist/chunks/fetch-br99j6q1.js +35 -0
- package/dist/chunks/fetch-ceh2h0m9.js +25 -0
- package/dist/chunks/fetch-csspsf0t.js +99 -0
- package/dist/chunks/fetch-d4bshj6j.js +37 -0
- package/dist/chunks/fetch-hezj1jdf.js +7 -0
- package/dist/chunks/fetch-hjnxtxmk.js +34 -0
- package/dist/chunks/fetch-j2pfq4q6.js +42 -0
- package/dist/chunks/fetch-m6wvgbfq.js +60 -0
- package/dist/chunks/fetch-n0er2m55.js +163 -0
- package/dist/chunks/fetch-pnqq1zxv.js +29 -0
- package/dist/chunks/fetch-q0ycym90.js +13 -0
- package/dist/chunks/fetch-q4bn6dy8.js +39 -0
- package/dist/chunks/fetch-qm92ga5h.js +26 -0
- package/dist/chunks/fetch-qnwpcgp7.js +22 -0
- package/dist/chunks/fetch-r7e9r02j.js +13 -0
- package/dist/chunks/fetch-rcg4y18n.js +59 -0
- package/dist/chunks/fetch-req22b70.js +22 -0
- package/dist/chunks/fetch-s4aja1df.js +36 -0
- package/dist/chunks/fetch-smaf4a18.js +28 -0
- package/dist/chunks/fetch-t8yzmczr.js +18 -0
- package/dist/chunks/fetch-vgpejxxy.js +149 -0
- package/dist/chunks/fetch-xsrtpxyd.js +23 -0
- package/dist/chunks/fetch-yc7nft6q.js +5 -0
- package/dist/chunks/fetch-ychamt23.js +139 -0
- package/dist/chunks/fetch-ysabas57.js +13 -0
- package/dist/chunks/fetch-z5shrcz9.js +19 -0
- package/dist/chunks/fetch-zp2jm6dt.js +15 -0
- package/dist/chunks/fetch-zyv89x5n.js +30 -0
- package/dist/cors.js +10 -36
- package/dist/event-feed.js +20 -60
- package/dist/fetch.js +53 -11
- package/dist/handlers/agent.js +11 -17
- package/dist/handlers/command.js +11 -5
- package/dist/handlers/config.js +11 -16
- package/dist/handlers/credential.js +11 -14
- package/dist/handlers/debug.js +11 -11
- package/dist/handlers/event.js +12 -27
- package/dist/handlers/form.js +11 -9
- package/dist/handlers/fs.js +11 -22
- package/dist/handlers/generate.js +11 -15
- package/dist/handlers/integration.js +10 -142
- package/dist/handlers/location.js +11 -16
- package/dist/handlers/mcp.js +11 -31
- package/dist/handlers/message.js +10 -42
- package/dist/handlers/migration.js +11 -7
- package/dist/handlers/model.js +11 -14
- package/dist/handlers/permission.js +11 -57
- package/dist/handlers/persistent-pty.js +12 -135
- package/dist/handlers/plugin.js +11 -47
- package/dist/handlers/project.js +11 -9
- package/dist/handlers/provider.js +11 -20
- package/dist/handlers/pty-socket.js +6 -4
- package/dist/handlers/pty.js +13 -107
- package/dist/handlers/reference.js +11 -5
- package/dist/handlers/rpc.js +11 -15
- package/dist/handlers/server.js +12 -13
- package/dist/handlers/session-error.js +12 -26
- package/dist/handlers/session.js +10 -311
- package/dist/handlers/shell.js +11 -25
- package/dist/handlers/skill.js +11 -5
- package/dist/handlers/vcs.js +11 -19
- package/dist/handlers/websearch.js +11 -31
- package/dist/handlers/worktree.js +11 -37
- package/dist/handlers.d.ts +1 -1
- package/dist/handlers.js +46 -33
- package/dist/location.js +15 -49
- package/dist/middleware/authorization.js +11 -49
- package/dist/middleware/form-location.js +10 -25
- package/dist/middleware/schema-error.js +8 -15
- package/dist/middleware/session-location.js +10 -19
- package/dist/options.js +5 -1
- package/dist/process.js +108 -28
- package/dist/pty-environment.js +12 -9
- package/dist/request-tracing.js +6 -2
- package/dist/routes.d.ts +2 -2
- package/dist/routes.js +52 -118
- package/dist/server-info.js +12 -22
- package/dist/service-status.js +8 -11
- package/dist/workerd.js +80 -12
- package/package.json +8 -8
package/dist/routes.js
CHANGED
|
@@ -1,118 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
EventLogger.node,
|
|
54
|
-
httpClient,
|
|
55
|
-
Job.node,
|
|
56
|
-
Project.node,
|
|
57
|
-
Worktree.node,
|
|
58
|
-
Session.node,
|
|
59
|
-
Instance.node,
|
|
60
|
-
SessionTransfer.node,
|
|
61
|
-
SdkPlugins.node,
|
|
62
|
-
PluginUpdate.node,
|
|
63
|
-
PermissionSaved.node,
|
|
64
|
-
PtyTicket.node,
|
|
65
|
-
PersistentPty.node,
|
|
66
|
-
Credential.node,
|
|
67
|
-
WellKnown.node,
|
|
68
|
-
PtyEnvironment.node,
|
|
69
|
-
LocationServiceMap.node,
|
|
70
|
-
LocationActivity.node,
|
|
71
|
-
SessionRestart.node,
|
|
72
|
-
Workspace.node
|
|
73
|
-
], applicationServices = LayerNode.group(applicationServiceNodes);
|
|
74
|
-
export function createRoutes(options = {}, serviceURLs = () => [], overrides = []) {
|
|
75
|
-
return makeRoutes(options.password ? ServerAuth.Config.configLayer({ password: Option.some(options.password) }) : ServerAuth.Config.layer, options, serviceURLs, overrides);
|
|
76
|
-
}
|
|
77
|
-
export function createEmbeddedRoutes(options = {}, overrides = [], instances) {
|
|
78
|
-
return makeRoutes(ServerAuth.Config.configLayer({ password: Option.none() }), options, () => [], overrides, instances);
|
|
79
|
-
}
|
|
80
|
-
function makeRoutes(auth, options, serviceURLs, overrides, instances) {
|
|
81
|
-
const standard = [
|
|
82
|
-
Database.node.replace(Database.configured(options.database)),
|
|
83
|
-
PersistentPty.node.replace(PersistentPty.configured(options.pty)),
|
|
84
|
-
Bus.node.replace(Bus.configured({ persist: options.events?.persist })),
|
|
85
|
-
App.node.replace(App.configured(options.app)),
|
|
86
|
-
ModelsDev.node.replace(ModelsDev.configured(options.models)),
|
|
87
|
-
Watcher.node.replace(Watcher.configured({ enabled: options.fs?.filewatcher })),
|
|
88
|
-
FileSystemSearch.node.replace(FileSystemSearch.configured({ fff: options.fs?.fff })),
|
|
89
|
-
Global.node.replace(Global.layerWith(options.config?.directory ? { config: options.config.directory } : {})),
|
|
90
|
-
Config.node.replace(Config.configured({
|
|
91
|
-
project: options.config?.project,
|
|
92
|
-
file: options.config?.file,
|
|
93
|
-
content: options.config?.content
|
|
94
|
-
})),
|
|
95
|
-
InstructionDiscovery.node.replace(InstructionDiscovery.configured({ project: options.config?.project })),
|
|
96
|
-
ShellSelect.node.replace(ShellSelect.configured({ gitbash: options.windows?.gitbash })),
|
|
97
|
-
Mcp.node.replace(Mcp.configured({
|
|
98
|
-
clientInfo: {
|
|
99
|
-
name: options.app?.name ?? "opencode",
|
|
100
|
-
version: options.app?.version ?? "unknown"
|
|
101
|
-
}
|
|
102
|
-
}))
|
|
103
|
-
], build = (overrides) => {
|
|
104
|
-
const replacements = [
|
|
105
|
-
...standard,
|
|
106
|
-
...instances ? [Instance.node.replace(instances(() => replacements))] : [],
|
|
107
|
-
...overrides
|
|
108
|
-
];
|
|
109
|
-
return AppNodeBuilder.build(applicationServices, replacements);
|
|
110
|
-
};
|
|
111
|
-
return (options.simulation ? Layer.unwrap(Effect.gen(function* () {
|
|
112
|
-
const { simulationReplacements } = yield* Effect.promise(() => import("@opencode/simulation/backend")), simulation = yield* simulationReplacements({ version: App.make(options.app).version });
|
|
113
|
-
return build([...overrides, ...simulation]);
|
|
114
|
-
})) : build(overrides)).pipe(Layer.flatMap((context) => {
|
|
115
|
-
const services = Layer.succeedContext(context), requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), ServerInfo.layer(serviceURLs, Context.get(context, Global.Service).tmp, options.app)), api = HttpApiBuilder.layer(Api, { openapiPath: "/openapi.json" }).pipe(Layer.provide(handlers.pipe(Layer.provide(services), Layer.provide(Layer.succeed(CorsConfig, options)))), Layer.provide(formLocationLayer), Layer.provide(sessionLocationLayer), Layer.provide(layer), Layer.provide(authorizationLayer), Layer.provide(schemaErrorLayer), Layer.provide(auth), HttpRouter.provideRequest(requestServices), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer));
|
|
116
|
-
return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
|
|
117
|
-
}));
|
|
118
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
createRoutes2,
|
|
3
|
+
createEmbeddedRoutes2
|
|
4
|
+
} from "./chunks/fetch-vgpejxxy.js";
|
|
5
|
+
import"./chunks/fetch-m6wvgbfq.js";
|
|
6
|
+
import"./chunks/fetch-t8yzmczr.js";
|
|
7
|
+
import"./chunks/fetch-zyv89x5n.js";
|
|
8
|
+
import"./chunks/fetch-csspsf0t.js";
|
|
9
|
+
import"./chunks/fetch-4vn5bvkr.js";
|
|
10
|
+
import"./chunks/fetch-br99j6q1.js";
|
|
11
|
+
import"./chunks/fetch-qnwpcgp7.js";
|
|
12
|
+
import"./chunks/fetch-req22b70.js";
|
|
13
|
+
import"./chunks/fetch-04xw3v55.js";
|
|
14
|
+
import"./chunks/fetch-bjrwanme.js";
|
|
15
|
+
import"./chunks/fetch-ceh2h0m9.js";
|
|
16
|
+
import"./chunks/fetch-8bajbwjh.js";
|
|
17
|
+
import"./chunks/fetch-hjnxtxmk.js";
|
|
18
|
+
import"./chunks/fetch-254zvkj6.js";
|
|
19
|
+
import"./chunks/fetch-a6yp8301.js";
|
|
20
|
+
import"./chunks/fetch-rcg4y18n.js";
|
|
21
|
+
import"./chunks/fetch-6nvan4e0.js";
|
|
22
|
+
import"./chunks/fetch-r7e9r02j.js";
|
|
23
|
+
import"./chunks/fetch-ychamt23.js";
|
|
24
|
+
import"./chunks/fetch-ysabas57.js";
|
|
25
|
+
import"./chunks/fetch-j2pfq4q6.js";
|
|
26
|
+
import"./chunks/fetch-19c9ysa1.js";
|
|
27
|
+
import"./chunks/fetch-1c4qas2w.js";
|
|
28
|
+
import"./chunks/fetch-7rzt3wm8.js";
|
|
29
|
+
import"./chunks/fetch-zp2jm6dt.js";
|
|
30
|
+
import"./chunks/fetch-q0ycym90.js";
|
|
31
|
+
import"./chunks/fetch-pnqq1zxv.js";
|
|
32
|
+
import"./chunks/fetch-4g0fa6m0.js";
|
|
33
|
+
import"./chunks/fetch-4cf3x1kw.js";
|
|
34
|
+
import"./chunks/fetch-d4bshj6j.js";
|
|
35
|
+
import"./chunks/fetch-00nn3k4b.js";
|
|
36
|
+
import"./chunks/fetch-n0er2m55.js";
|
|
37
|
+
import"./chunks/fetch-hezj1jdf.js";
|
|
38
|
+
import"./chunks/fetch-b0b71rwa.js";
|
|
39
|
+
import"./chunks/fetch-arj41x43.js";
|
|
40
|
+
import"./chunks/fetch-s4aja1df.js";
|
|
41
|
+
import"./chunks/fetch-q4bn6dy8.js";
|
|
42
|
+
import"./chunks/fetch-0d9kah4z.js";
|
|
43
|
+
import"./chunks/fetch-z5shrcz9.js";
|
|
44
|
+
import"./chunks/fetch-3kzx88w9.js";
|
|
45
|
+
import"./chunks/fetch-5rwqcaw2.js";
|
|
46
|
+
import"./chunks/fetch-6gkz39ey.js";
|
|
47
|
+
import"./chunks/fetch-smaf4a18.js";
|
|
48
|
+
import"./chunks/fetch-99sfd1j8.js";
|
|
49
|
+
export {
|
|
50
|
+
createEmbeddedRoutes2 as createEmbeddedRoutes,
|
|
51
|
+
createRoutes2 as createRoutes
|
|
52
|
+
};
|
package/dist/server-info.js
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return [
|
|
14
|
-
...new Set(Object.values(networkInterfaces()).flatMap((entries) => entries ?? []).filter((entry) => !entry.internal && entry.family === family).map((entry) => {
|
|
15
|
-
const result = new URL(value);
|
|
16
|
-
result.hostname = family === "IPv6" ? `[${entry.address}]` : entry.address;
|
|
17
|
-
return result.toString().replace(/\/$/, "");
|
|
18
|
-
}))
|
|
19
|
-
];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export * as ServerInfo from "./server-info";
|
|
1
|
+
import {
|
|
2
|
+
Service2,
|
|
3
|
+
layer2,
|
|
4
|
+
connectionURLs2,
|
|
5
|
+
exports_server_info
|
|
6
|
+
} from "./chunks/fetch-s4aja1df.js";
|
|
7
|
+
export {
|
|
8
|
+
exports_server_info as ServerInfo,
|
|
9
|
+
Service2 as Service,
|
|
10
|
+
connectionURLs2 as connectionURLs,
|
|
11
|
+
layer2 as layer
|
|
12
|
+
};
|
package/dist/service-status.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
beginStopping
|
|
10
|
-
};
|
|
11
|
-
});
|
|
1
|
+
import {
|
|
2
|
+
make2,
|
|
3
|
+
exports_service_status
|
|
4
|
+
} from "./chunks/fetch-xsrtpxyd.js";
|
|
5
|
+
export {
|
|
6
|
+
exports_service_status as Status,
|
|
7
|
+
make2 as make
|
|
8
|
+
};
|
package/dist/workerd.js
CHANGED
|
@@ -1,4 +1,63 @@
|
|
|
1
|
-
|
|
1
|
+
import"./chunks/fetch-q4bn6dy8.js";
|
|
2
|
+
import"./chunks/fetch-smaf4a18.js";
|
|
3
|
+
import"./chunks/fetch-6gkz39ey.js";
|
|
4
|
+
import"./chunks/fetch-5rwqcaw2.js";
|
|
5
|
+
import"./chunks/fetch-3kzx88w9.js";
|
|
6
|
+
import"./chunks/fetch-z5shrcz9.js";
|
|
7
|
+
import"./chunks/fetch-zyv89x5n.js";
|
|
8
|
+
import"./chunks/fetch-4vn5bvkr.js";
|
|
9
|
+
import"./chunks/fetch-rcg4y18n.js";
|
|
10
|
+
import"./chunks/fetch-254zvkj6.js";
|
|
11
|
+
import"./chunks/fetch-pnqq1zxv.js";
|
|
12
|
+
import"./chunks/fetch-1c4qas2w.js";
|
|
13
|
+
import"./chunks/fetch-arj41x43.js";
|
|
14
|
+
import"./chunks/fetch-hjnxtxmk.js";
|
|
15
|
+
import"./chunks/fetch-6nvan4e0.js";
|
|
16
|
+
import"./chunks/fetch-r7e9r02j.js";
|
|
17
|
+
import"./chunks/fetch-q0ycym90.js";
|
|
18
|
+
import"./chunks/fetch-bjrwanme.js";
|
|
19
|
+
import"./chunks/fetch-99sfd1j8.js";
|
|
20
|
+
import"./chunks/fetch-d4bshj6j.js";
|
|
21
|
+
import"./chunks/fetch-ceh2h0m9.js";
|
|
22
|
+
import"./chunks/fetch-19c9ysa1.js";
|
|
23
|
+
import"./chunks/fetch-s4aja1df.js";
|
|
24
|
+
import"./chunks/fetch-4cf3x1kw.js";
|
|
25
|
+
import"./chunks/fetch-00nn3k4b.js";
|
|
26
|
+
import"./chunks/fetch-0d9kah4z.js";
|
|
27
|
+
import"./chunks/fetch-hezj1jdf.js";
|
|
28
|
+
import"./chunks/fetch-ychamt23.js";
|
|
29
|
+
import"./chunks/fetch-n0er2m55.js";
|
|
30
|
+
import"./chunks/fetch-br99j6q1.js";
|
|
31
|
+
import"./chunks/fetch-ysabas57.js";
|
|
32
|
+
import"./chunks/fetch-req22b70.js";
|
|
33
|
+
import"./chunks/fetch-a6yp8301.js";
|
|
34
|
+
import"./chunks/fetch-b0b71rwa.js";
|
|
35
|
+
import"./chunks/fetch-8bajbwjh.js";
|
|
36
|
+
import"./chunks/fetch-04xw3v55.js";
|
|
37
|
+
import"./chunks/fetch-zp2jm6dt.js";
|
|
38
|
+
import"./chunks/fetch-j2pfq4q6.js";
|
|
39
|
+
import"./chunks/fetch-4g0fa6m0.js";
|
|
40
|
+
import"./chunks/fetch-7rzt3wm8.js";
|
|
41
|
+
import"./chunks/fetch-qnwpcgp7.js";
|
|
42
|
+
import"./chunks/fetch-csspsf0t.js";
|
|
43
|
+
import"./chunks/fetch-m6wvgbfq.js";
|
|
44
|
+
import"./chunks/fetch-t8yzmczr.js";
|
|
45
|
+
import"./chunks/fetch-vgpejxxy.js";
|
|
46
|
+
import {
|
|
47
|
+
make3
|
|
48
|
+
} from "./chunks/fetch-qm92ga5h.js";
|
|
49
|
+
import {
|
|
50
|
+
__export
|
|
51
|
+
} from "./chunks/fetch-9rqn6x4v.js";
|
|
52
|
+
|
|
53
|
+
// src/workerd.ts
|
|
54
|
+
var exports_workerd = {};
|
|
55
|
+
__export(exports_workerd, {
|
|
56
|
+
ServerWorkerd: () => exports_workerd,
|
|
57
|
+
create: () => create,
|
|
58
|
+
replacements: () => replacements,
|
|
59
|
+
serverOptions: () => serverOptions
|
|
60
|
+
});
|
|
2
61
|
import { Effect, Layer } from "effect";
|
|
3
62
|
import { ConfigPluginSource } from "@opencode/core/config/plugin/source";
|
|
4
63
|
import { Database } from "@opencode/core/database/database";
|
|
@@ -10,21 +69,20 @@ import { Pty } from "@opencode/core/pty";
|
|
|
10
69
|
import { Snapshot } from "@opencode/core/snapshot";
|
|
11
70
|
import { Vcs } from "@opencode/core/vcs";
|
|
12
71
|
import { CrossSpawnSpawner } from "@opencode/util/cross-spawn-spawner";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return ServerFetch.make(serverOptions(options), { overrides: replacements(options) });
|
|
72
|
+
function create(options) {
|
|
73
|
+
return make3(serverOptions(options), { overrides: replacements(options) });
|
|
16
74
|
}
|
|
17
|
-
|
|
75
|
+
function serverOptions(options) {
|
|
18
76
|
return {
|
|
19
77
|
app: options.app,
|
|
20
78
|
password: options.password,
|
|
21
|
-
fs: { filewatcher:
|
|
22
|
-
events: { persist:
|
|
79
|
+
fs: { filewatcher: false, fff: false },
|
|
80
|
+
events: { persist: true },
|
|
23
81
|
config: { content: options.config?.content },
|
|
24
82
|
models: options.models
|
|
25
83
|
};
|
|
26
84
|
}
|
|
27
|
-
|
|
85
|
+
function replacements(options) {
|
|
28
86
|
return [
|
|
29
87
|
Database.node.replace(Database.configuredClient(sqliteLayer({ storage: options.storage }))),
|
|
30
88
|
CrossSpawnSpawner.node.replace(EnvironmentUnavailable.layer),
|
|
@@ -36,7 +94,8 @@ export function replacements(options) {
|
|
|
36
94
|
ConfigPluginSource.node.replace(ConfigPluginSource.empty)
|
|
37
95
|
];
|
|
38
96
|
}
|
|
39
|
-
|
|
97
|
+
var unavailable = (what) => Effect.die(new Error(`${what} is unavailable in the workerd profile`));
|
|
98
|
+
var vcsLayer = Layer.succeed(Vcs.Service, Vcs.Service.of({
|
|
40
99
|
base: () => Effect.succeed(null),
|
|
41
100
|
transform: () => Effect.succeed({ dispose: Effect.void }),
|
|
42
101
|
reload: () => Effect.void,
|
|
@@ -44,14 +103,17 @@ const unavailable = (what) => Effect.die(Error(`${what} is unavailable in the wo
|
|
|
44
103
|
branches: () => Effect.succeed([]),
|
|
45
104
|
status: () => Effect.succeed([]),
|
|
46
105
|
diff: () => Effect.succeed([])
|
|
47
|
-
}))
|
|
106
|
+
}));
|
|
107
|
+
var fileSystemLayer = Layer.succeed(FileSystem.Service, FileSystem.Service.of({
|
|
48
108
|
read: () => unavailable("FileSystem.read"),
|
|
49
109
|
list: () => unavailable("FileSystem.list"),
|
|
50
110
|
find: () => unavailable("FileSystem.find"),
|
|
51
111
|
write: () => unavailable("FileSystem.write")
|
|
52
|
-
}))
|
|
112
|
+
}));
|
|
113
|
+
var fileSystemSearchLayer = Layer.succeed(FileSystemSearch.Service, FileSystemSearch.Service.of({
|
|
53
114
|
find: () => unavailable("FileSystemSearch.find")
|
|
54
|
-
}))
|
|
115
|
+
}));
|
|
116
|
+
var ptyLayer = Layer.succeed(Pty.Service, Pty.Service.of({
|
|
55
117
|
list: () => Effect.succeed([]),
|
|
56
118
|
get: (ptyID) => Effect.fail(new Pty.NotFoundError({ ptyID })),
|
|
57
119
|
create: () => unavailable("Pty.create"),
|
|
@@ -60,3 +122,9 @@ const unavailable = (what) => Effect.die(Error(`${what} is unavailable in the wo
|
|
|
60
122
|
write: (ptyID) => Effect.fail(new Pty.NotFoundError({ ptyID })),
|
|
61
123
|
attach: (ptyID) => Effect.fail(new Pty.NotFoundError({ ptyID }))
|
|
62
124
|
}));
|
|
125
|
+
export {
|
|
126
|
+
exports_workerd as ServerWorkerd,
|
|
127
|
+
create,
|
|
128
|
+
replacements,
|
|
129
|
+
serverOptions
|
|
130
|
+
};
|
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": "2.0.
|
|
4
|
+
"version": "2.0.9",
|
|
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": "2.0.
|
|
34
|
-
"@opencode/protocol": "2.0.
|
|
35
|
-
"@opencode/schema": "2.0.
|
|
36
|
-
"@opencode/simulation": "2.0.
|
|
37
|
-
"@opencode/util": "2.0.
|
|
33
|
+
"@opencode/core": "2.0.9",
|
|
34
|
+
"@opencode/protocol": "2.0.9",
|
|
35
|
+
"@opencode/schema": "2.0.9",
|
|
36
|
+
"@opencode/simulation": "2.0.9",
|
|
37
|
+
"@opencode/util": "2.0.9",
|
|
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": "2.0.
|
|
43
|
-
"@opencode/plugin": "2.0.
|
|
42
|
+
"@opencode/client": "2.0.9",
|
|
43
|
+
"@opencode/plugin": "2.0.9",
|
|
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"
|