@opencode/server 2.1.4 → 2.2.0
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 +8 -1
- package/dist/api.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/{pairing-0dncng21.js → server-info-1gwc8nvb.js} +25 -12
- package/dist/chunks/{pairing-ga3m49sz.js → server-info-1v577ncx.js} +4 -2
- package/dist/chunks/{pairing-mte34432.js → server-info-1wd9c1m3.js} +6 -6
- package/dist/chunks/{pairing-49c878v9.js → server-info-2eaky32g.js} +12 -3
- package/dist/chunks/{pairing-x9vr2ttf.js → server-info-2h6qktqa.js} +24 -6
- package/dist/chunks/{pairing-2b2wekgg.js → server-info-4fy84009.js} +1 -1
- package/dist/chunks/{pairing-xmwystkq.js → server-info-4q6e7fh8.js} +2 -2
- package/dist/chunks/{pairing-gymtz25n.js → server-info-50bbk3b2.js} +3 -3
- package/dist/chunks/{pairing-f4b2q3tn.js → server-info-5b42hxrf.js} +1 -1
- package/dist/chunks/{pairing-3te71694.js → server-info-5pdfedjd.js} +4 -4
- package/dist/chunks/{pairing-31acg4hb.js → server-info-5s6gh8sx.js} +7 -3
- package/dist/chunks/{pairing-x0608mvx.js → server-info-6z9pvq7p.js} +1 -1
- package/dist/chunks/{pairing-7b9xm1qg.js → server-info-7b9xm1qg.js} +1 -1
- package/dist/chunks/{pairing-j5aeaa16.js → server-info-a8jcac9a.js} +1 -1
- package/dist/chunks/{pairing-swdgbzpj.js → server-info-az0609r6.js} +4 -2
- package/dist/chunks/server-info-b0f38s3n.js +105 -0
- package/dist/chunks/server-info-b105zy65.js +22 -0
- package/dist/chunks/{pairing-x74w7e1f.js → server-info-b3bmdkga.js} +1 -1
- package/dist/chunks/{pairing-erzfdgke.js → server-info-bd8755ek.js} +16 -1
- package/dist/chunks/{pairing-9me4q8wt.js → server-info-bhbc7551.js} +4 -4
- package/dist/chunks/{pairing-6xea6nhh.js → server-info-btahnm2b.js} +3 -3
- package/dist/chunks/{pairing-e7pctymn.js → server-info-cezwbsk5.js} +1 -1
- package/dist/chunks/{pairing-kaqtndqt.js → server-info-d0edqfxx.js} +4 -11
- package/dist/chunks/{pairing-39nnfjx1.js → server-info-e6e4kz0w.js} +4 -4
- package/dist/chunks/{pairing-91mt6ewz.js → server-info-f559fakr.js} +2 -2
- package/dist/chunks/{pairing-72ygafj3.js → server-info-h29xjj1e.js} +2 -2
- package/dist/chunks/{pairing-3154e7fk.js → server-info-htyf2qs7.js} +5 -3
- package/dist/chunks/{pairing-x2dckmx1.js → server-info-j2d131x1.js} +21 -16
- package/dist/chunks/{pairing-j4at0y5c.js → server-info-j4at0y5c.js} +1 -1
- package/dist/chunks/{pairing-t3j5ftv1.js → server-info-j87xz9bt.js} +3 -3
- package/dist/chunks/{pairing-kcjd09wg.js → server-info-kkdkqt8j.js} +2 -2
- package/dist/chunks/{pairing-kqr36gas.js → server-info-kqr36gas.js} +1 -1
- package/dist/chunks/server-info-n321d8vm.js +46 -0
- package/dist/chunks/{pairing-qvy2s3nb.js → server-info-nx6f5k7a.js} +4 -4
- package/dist/chunks/{pairing-4b0899hb.js → server-info-ny1j968n.js} +2 -2
- package/dist/chunks/{pairing-q69f22pd.js → server-info-qcg3sqtb.js} +2 -2
- package/dist/chunks/{pairing-2yr2dq97.js → server-info-qd0r787n.js} +2 -2
- package/dist/chunks/{pairing-e4x9285j.js → server-info-rha2aq18.js} +4 -4
- package/dist/chunks/{pairing-a6kxe6a7.js → server-info-rw1dfckh.js} +8 -4
- package/dist/chunks/{pairing-5w10ccet.js → server-info-s282vggx.js} +1 -1
- package/dist/chunks/{pairing-k6dz4enc.js → server-info-s802fzg1.js} +21 -20
- package/dist/chunks/{pairing-kd6vzpgq.js → server-info-te8jwba1.js} +2 -2
- package/dist/chunks/{pairing-nv8hzzrz.js → server-info-tjtyxt9h.js} +32 -12
- package/dist/chunks/server-info-xthc02cw.js +6 -0
- package/dist/chunks/server-info-yqhefp4s.js +83 -0
- package/dist/chunks/{pairing-aj1jc7g7.js → server-info-yxw63vq5.js} +6 -4
- package/dist/chunks/{pairing-cfhthk6z.js → server-info-zcvan105.js} +1 -1
- package/dist/chunks/{pairing-4qjw9nya.js → server-info-zpr61asr.js} +4 -4
- package/dist/cors.js +1 -1
- package/dist/event-feed.d.ts +1 -1
- package/dist/event-feed.js +3 -3
- package/dist/fetch.js +52 -49
- 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.d.ts +2 -1
- package/dist/handlers/fs.js +6 -6
- package/dist/handlers/generate.d.ts +1 -1
- 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 +8 -8
- package/dist/handlers/media.d.ts +6 -0
- package/dist/handlers/media.js +6 -0
- package/dist/handlers/message.js +7 -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.d.ts +1 -1
- package/dist/handlers/persistent-pty.js +9 -8
- package/dist/handlers/plugin.js +6 -6
- package/dist/handlers/project.d.ts +1 -1
- 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/server.js +9 -9
- package/dist/handlers/session-error.js +1 -1
- package/dist/handlers/session.d.ts +3 -1
- package/dist/handlers/session.js +7 -6
- package/dist/handlers/shell.js +6 -6
- package/dist/handlers/skill.js +6 -6
- package/dist/handlers/usage.d.ts +1 -0
- package/dist/handlers/usage.js +11 -0
- package/dist/handlers/vcs.js +6 -6
- package/dist/handlers/voice.d.ts +1 -1
- package/dist/handlers/voice.js +6 -6
- package/dist/handlers/websearch.js +6 -6
- package/dist/handlers/worktree.js +6 -6
- package/dist/handlers.d.ts +1 -1
- package/dist/handlers.js +46 -43
- package/dist/location.js +4 -4
- package/dist/media-uri.d.ts +6 -0
- package/dist/media-uri.js +6 -0
- 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 +1 -1
- package/dist/process.js +54 -51
- package/dist/request-tracing.js +1 -1
- package/dist/routes.d.ts +4 -2
- package/dist/routes.js +49 -46
- package/dist/server-info.js +3 -3
- package/dist/service-status.js +3 -3
- package/dist/workerd.js +53 -50
- package/package.json +9 -8
- package/dist/chunks/pairing-kyxm98pg.js +0 -102
- package/dist/chunks/pairing-pmjbkszz.js +0 -30
- /package/dist/chunks/{pairing-9rqn6x4v.js → server-info-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{pairing-h6rt5k9s.js → server-info-h6rt5k9s.js} +0 -0
- /package/dist/chunks/{pairing-q4bn6dy8.js → server-info-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{pairing-smaf4a18.js → server-info-smaf4a18.js} +0 -0
- /package/dist/chunks/{pairing-yc7nft6q.js → server-info-yc7nft6q.js} +0 -0
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.
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "bun run script/build.ts",
|
|
26
|
+
"pack": "bun run script/pack.ts",
|
|
26
27
|
"test": "bun test --only-failures",
|
|
27
28
|
"typecheck": "bun check --no-script -b",
|
|
28
29
|
"typecheck:tsc": "tsc -b",
|
|
@@ -31,17 +32,17 @@
|
|
|
31
32
|
"dependencies": {
|
|
32
33
|
"@effect/platform-node": "4.0.1",
|
|
33
34
|
"@effect/platform-node-shared": "4.0.1",
|
|
34
|
-
"@opencode/core": "2.
|
|
35
|
-
"@opencode/protocol": "2.
|
|
36
|
-
"@opencode/schema": "2.
|
|
37
|
-
"@opencode/simulation": "2.
|
|
38
|
-
"@opencode/util": "2.
|
|
35
|
+
"@opencode/core": "2.2.0",
|
|
36
|
+
"@opencode/protocol": "2.2.0",
|
|
37
|
+
"@opencode/schema": "2.2.0",
|
|
38
|
+
"@opencode/simulation": "2.2.0",
|
|
39
|
+
"@opencode/util": "2.2.0",
|
|
39
40
|
"effect": "4.0.1"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@opencode-ai/pty": "0.3.1",
|
|
43
|
-
"@opencode/client": "2.
|
|
44
|
-
"@opencode/plugin": "2.
|
|
44
|
+
"@opencode/client": "2.2.0",
|
|
45
|
+
"@opencode/plugin": "2.2.0",
|
|
45
46
|
"@tsconfig/bun": "1.0.9",
|
|
46
47
|
"@types/bun": "1.4.3",
|
|
47
48
|
"@typescript/native": "npm:typescript@7.1.0-beta",
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GenerateHandler2
|
|
3
|
-
} from "./pairing-pmjbkszz.js";
|
|
4
|
-
import {
|
|
5
|
-
VoiceHandler2
|
|
6
|
-
} from "./pairing-kaqtndqt.js";
|
|
7
|
-
import {
|
|
8
|
-
MessageHandler2
|
|
9
|
-
} from "./pairing-0dncng21.js";
|
|
10
|
-
import {
|
|
11
|
-
ModelHandler2
|
|
12
|
-
} from "./pairing-e4x9285j.js";
|
|
13
|
-
import {
|
|
14
|
-
ProviderHandler2
|
|
15
|
-
} from "./pairing-swdgbzpj.js";
|
|
16
|
-
import {
|
|
17
|
-
SessionHandler2
|
|
18
|
-
} from "./pairing-nv8hzzrz.js";
|
|
19
|
-
import {
|
|
20
|
-
PermissionHandler2
|
|
21
|
-
} from "./pairing-6xea6nhh.js";
|
|
22
|
-
import {
|
|
23
|
-
FileSystemHandler2
|
|
24
|
-
} from "./pairing-x9vr2ttf.js";
|
|
25
|
-
import {
|
|
26
|
-
FormHandler2
|
|
27
|
-
} from "./pairing-91mt6ewz.js";
|
|
28
|
-
import {
|
|
29
|
-
CommandHandler2
|
|
30
|
-
} from "./pairing-xmwystkq.js";
|
|
31
|
-
import {
|
|
32
|
-
SkillHandler2
|
|
33
|
-
} from "./pairing-4b0899hb.js";
|
|
34
|
-
import {
|
|
35
|
-
RpcHandler2
|
|
36
|
-
} from "./pairing-5w10ccet.js";
|
|
37
|
-
import {
|
|
38
|
-
layer4
|
|
39
|
-
} from "./pairing-k6dz4enc.js";
|
|
40
|
-
import {
|
|
41
|
-
EventHandler2
|
|
42
|
-
} from "./pairing-qvy2s3nb.js";
|
|
43
|
-
import {
|
|
44
|
-
AgentHandler2
|
|
45
|
-
} from "./pairing-ga3m49sz.js";
|
|
46
|
-
import {
|
|
47
|
-
PluginHandler2
|
|
48
|
-
} from "./pairing-49c878v9.js";
|
|
49
|
-
import {
|
|
50
|
-
ServerHandler2
|
|
51
|
-
} from "./pairing-aj1jc7g7.js";
|
|
52
|
-
import {
|
|
53
|
-
DebugHandler2
|
|
54
|
-
} from "./pairing-q69f22pd.js";
|
|
55
|
-
import {
|
|
56
|
-
PtyHandler2
|
|
57
|
-
} from "./pairing-4qjw9nya.js";
|
|
58
|
-
import {
|
|
59
|
-
PersistentPtyHandler2
|
|
60
|
-
} from "./pairing-a6kxe6a7.js";
|
|
61
|
-
import {
|
|
62
|
-
ShellHandler2
|
|
63
|
-
} from "./pairing-2yr2dq97.js";
|
|
64
|
-
import {
|
|
65
|
-
ReferenceHandler2
|
|
66
|
-
} from "./pairing-kd6vzpgq.js";
|
|
67
|
-
import {
|
|
68
|
-
LocationHandler2
|
|
69
|
-
} from "./pairing-cfhthk6z.js";
|
|
70
|
-
import {
|
|
71
|
-
IntegrationHandler2
|
|
72
|
-
} from "./pairing-72ygafj3.js";
|
|
73
|
-
import {
|
|
74
|
-
WebSearchHandler2
|
|
75
|
-
} from "./pairing-kcjd09wg.js";
|
|
76
|
-
import {
|
|
77
|
-
McpHandler2
|
|
78
|
-
} from "./pairing-9me4q8wt.js";
|
|
79
|
-
import {
|
|
80
|
-
CredentialHandler2
|
|
81
|
-
} from "./pairing-f4b2q3tn.js";
|
|
82
|
-
import {
|
|
83
|
-
ProjectHandler2
|
|
84
|
-
} from "./pairing-j5aeaa16.js";
|
|
85
|
-
import {
|
|
86
|
-
WorktreeHandler2
|
|
87
|
-
} from "./pairing-2b2wekgg.js";
|
|
88
|
-
import {
|
|
89
|
-
VcsHandler2
|
|
90
|
-
} from "./pairing-31acg4hb.js";
|
|
91
|
-
import {
|
|
92
|
-
MigrationHandler2
|
|
93
|
-
} from "./pairing-x0608mvx.js";
|
|
94
|
-
import {
|
|
95
|
-
ConfigHandler2
|
|
96
|
-
} from "./pairing-e7pctymn.js";
|
|
97
|
-
|
|
98
|
-
// src/handlers.ts
|
|
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(layer4)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
|
|
101
|
-
|
|
102
|
-
export { handlers2 };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
locationErrors2,
|
|
3
|
-
awaitPlugins2
|
|
4
|
-
} from "./pairing-gymtz25n.js";
|
|
5
|
-
import {
|
|
6
|
-
Api2
|
|
7
|
-
} from "./pairing-t3j5ftv1.js";
|
|
8
|
-
|
|
9
|
-
// src/handlers/generate.ts
|
|
10
|
-
import { Generate } from "@opencode/core/generate";
|
|
11
|
-
import { Location } from "@opencode/core/location";
|
|
12
|
-
import { LocationServiceMap } from "@opencode/core/location-services";
|
|
13
|
-
import { AbsolutePath } from "@opencode/core/schema";
|
|
14
|
-
import { InvalidRequestError, ServiceUnavailableError } from "@opencode/protocol/errors";
|
|
15
|
-
import { Global } from "@opencode/util/global";
|
|
16
|
-
import { Effect } from "effect";
|
|
17
|
-
import { HttpApiBuilder } from "effect/http-api";
|
|
18
|
-
var GenerateHandler2 = HttpApiBuilder.group(Api2, "server.generate", (handlers) => Effect.gen(function* () {
|
|
19
|
-
const global = yield* Global.Service;
|
|
20
|
-
const locations = yield* LocationServiceMap.Service;
|
|
21
|
-
const services = locations.get(Location.Ref.make({ directory: AbsolutePath.make(global.config) }));
|
|
22
|
-
return handlers.handle("generate.text", Effect.fn("server.generate.text")(function* (request) {
|
|
23
|
-
yield* awaitPlugins2;
|
|
24
|
-
const generate = yield* Generate.Service;
|
|
25
|
-
const text = yield* generate.text(request.payload).pipe(Effect.mapError((error) => error._tag === "Generate.ModelSelectionError" ? new InvalidRequestError({ message: error.message }) : new ServiceUnavailableError({ message: error.message, service: error.service })));
|
|
26
|
-
return { data: { text } };
|
|
27
|
-
}, Effect.provide(services), locationErrors2));
|
|
28
|
-
}));
|
|
29
|
-
|
|
30
|
-
export { GenerateHandler2 };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|