@opencode/server 0.0.0-dev-20787 → 0.0.0-dev-20789
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/{api-vvagfka3.js → api-0d9kah4z.js} +5 -5
- package/dist/chunks/{api-z4djxdmp.js → api-0qsg460b.js} +2 -2
- package/dist/chunks/{api-3mcj7t4c.js → api-104y5jx0.js} +2 -2
- package/dist/chunks/{api-rh1r2syd.js → api-1c0qe866.js} +2 -2
- package/dist/chunks/{api-rk1gjktg.js → api-1k5wqj6r.js} +2 -2
- package/dist/chunks/{api-0bk0v4aj.js → api-24j9kd57.js} +1 -1
- package/dist/chunks/{api-jev8bc8v.js → api-3hbmhzqf.js} +1 -1
- package/dist/chunks/{api-35xcyg14.js → api-3rzqzz1k.js} +2 -2
- package/dist/chunks/{api-zmg0vczz.js → api-4njtb34p.js} +2 -2
- package/dist/chunks/{api-drpypa5m.js → api-50kvd0kw.js} +2 -2
- package/dist/chunks/{api-w8fcdnht.js → api-5nvghr3b.js} +2 -2
- package/dist/chunks/{api-5fdm23dv.js → api-5tram8aj.js} +2 -2
- package/dist/chunks/{api-xsrtpxyd.js → api-5w24ch67.js} +3 -3
- package/dist/chunks/{api-4d9grexc.js → api-61vjxtnv.js} +1 -1
- package/dist/chunks/{api-6922nck8.js → api-6kffarfb.js} +1 -1
- package/dist/chunks/{api-xdb0qjpa.js → api-72f56z9z.js} +30 -30
- package/dist/chunks/{api-d14bkmpv.js → api-7q78xev7.js} +1 -1
- package/dist/chunks/{api-qahj7606.js → api-85fg6s70.js} +1 -1
- package/dist/chunks/{api-zp51vgqp.js → api-87b1hpyt.js} +2 -2
- package/dist/chunks/{api-pmxfagm3.js → api-8egkey78.js} +7 -7
- package/dist/chunks/{api-hpsf0cga.js → api-8j0p2cse.js} +2 -2
- package/dist/chunks/{api-b5q1mscb.js → api-9pb0wy97.js} +2 -2
- package/dist/chunks/{api-kpceevh0.js → api-ap1gkapp.js} +1 -1
- package/dist/chunks/{api-xtne2g85.js → api-aqczqdrr.js} +2 -2
- package/dist/chunks/{api-136aawhw.js → api-ayydbn18.js} +1 -1
- package/dist/chunks/{api-g0rzwe5g.js → api-c6kb7fmf.js} +6 -6
- package/dist/chunks/{api-g5k0qdex.js → api-cyg5ewmc.js} +2 -2
- package/dist/chunks/{api-245ngx56.js → api-dww7e16t.js} +3 -3
- package/dist/chunks/{api-9jcqzzhs.js → api-e19jw7kc.js} +3 -3
- package/dist/chunks/{api-fcw0sypp.js → api-ew4gcgny.js} +2 -2
- package/dist/chunks/{api-3080njzf.js → api-fymptm79.js} +1 -1
- package/dist/chunks/{api-dadw28xe.js → api-ja8v61rs.js} +2 -2
- package/dist/chunks/{api-rzz2rndv.js → api-jkk5pfey.js} +2 -2
- package/dist/chunks/{api-b2tdnpfh.js → api-k3vwvjz0.js} +2 -2
- package/dist/chunks/{api-5wm8dhw5.js → api-kfcrce64.js} +1 -1
- package/dist/chunks/{api-sj9nhgs0.js → api-mr4zseg6.js} +4 -4
- package/dist/chunks/{api-dsx9srhw.js → api-nrbp45gt.js} +1 -1
- package/dist/chunks/{api-v1v2tvbr.js → api-qs55f76v.js} +15 -15
- package/dist/chunks/{api-rbn15j6z.js → api-sstsrjtg.js} +7 -7
- package/dist/chunks/{api-j80tzjj3.js → api-stv2b73g.js} +2 -2
- package/dist/chunks/{api-gkzehh8q.js → api-tcd2me74.js} +1 -1
- 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 +7 -7
- 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 +39 -39
- 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 +5 -5
- package/dist/process.js +42 -42
- package/dist/pty-environment.js +5 -5
- package/dist/routes.js +41 -41
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +3 -3
- package/dist/workerd.js +42 -42
- package/package.json +8 -8
package/dist/api.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./chunks/api-
|
|
4
|
-
import"./chunks/api-
|
|
5
|
-
import"./chunks/api-
|
|
6
|
-
import"./chunks/api-
|
|
3
|
+
} from "./chunks/api-e19jw7kc.js";
|
|
4
|
+
import"./chunks/api-fymptm79.js";
|
|
5
|
+
import"./chunks/api-85fg6s70.js";
|
|
6
|
+
import"./chunks/api-stv2b73g.js";
|
|
7
7
|
import"./chunks/api-smaf4a18.js";
|
|
8
8
|
export {
|
|
9
9
|
Api2 as Api
|
|
@@ -7,17 +7,17 @@ var exports_pty_environment = {};
|
|
|
7
7
|
__export(exports_pty_environment, {
|
|
8
8
|
PtyEnvironment: () => exports_pty_environment,
|
|
9
9
|
Service: () => Service3,
|
|
10
|
-
layer: () =>
|
|
11
|
-
node: () =>
|
|
10
|
+
layer: () => layer3,
|
|
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
16
|
class Service3 extends Context.Service()("@opencode/ServerPtyEnvironment") {
|
|
17
17
|
}
|
|
18
|
-
var
|
|
18
|
+
var layer3 = Layer.succeed(Service3, Service3.of({
|
|
19
19
|
get: () => Effect.succeed({})
|
|
20
20
|
}));
|
|
21
|
-
var
|
|
21
|
+
var node2 = makeGlobalNode({ service: Service3, layer: layer3, deps: [] });
|
|
22
22
|
|
|
23
|
-
export { Service3,
|
|
23
|
+
export { Service3, layer3, node2, exports_pty_environment };
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./api-smaf4a18.js";
|
|
7
7
|
import {
|
|
8
8
|
locationErrors2
|
|
9
|
-
} from "./api-
|
|
9
|
+
} from "./api-stv2b73g.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./api-
|
|
12
|
+
} from "./api-e19jw7kc.js";
|
|
13
13
|
|
|
14
14
|
// src/handlers/session.ts
|
|
15
15
|
import { Session } from "@opencode/core/session";
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
locationErrors2,
|
|
6
6
|
response2,
|
|
7
7
|
sessionInfo2
|
|
8
|
-
} from "./api-
|
|
8
|
+
} from "./api-stv2b73g.js";
|
|
9
9
|
import {
|
|
10
10
|
Api2
|
|
11
|
-
} from "./api-
|
|
11
|
+
} from "./api-e19jw7kc.js";
|
|
12
12
|
|
|
13
13
|
// src/handlers/permission.ts
|
|
14
14
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -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 };
|
|
@@ -1,96 +1,96 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GenerateHandler2
|
|
3
|
-
} from "./api-
|
|
3
|
+
} from "./api-50kvd0kw.js";
|
|
4
4
|
import {
|
|
5
5
|
MessageHandler2
|
|
6
|
-
} from "./api-
|
|
6
|
+
} from "./api-24j9kd57.js";
|
|
7
7
|
import {
|
|
8
8
|
ModelHandler2
|
|
9
|
-
} from "./api-
|
|
9
|
+
} from "./api-104y5jx0.js";
|
|
10
10
|
import {
|
|
11
11
|
ProviderHandler2
|
|
12
|
-
} from "./api-
|
|
12
|
+
} from "./api-aqczqdrr.js";
|
|
13
13
|
import {
|
|
14
14
|
SessionHandler2
|
|
15
|
-
} from "./api-
|
|
15
|
+
} from "./api-1c0qe866.js";
|
|
16
16
|
import {
|
|
17
17
|
PermissionHandler2
|
|
18
|
-
} from "./api-
|
|
18
|
+
} from "./api-3rzqzz1k.js";
|
|
19
19
|
import {
|
|
20
20
|
FileSystemHandler2
|
|
21
|
-
} from "./api-
|
|
21
|
+
} from "./api-9pb0wy97.js";
|
|
22
22
|
import {
|
|
23
23
|
FormHandler2
|
|
24
|
-
} from "./api-
|
|
24
|
+
} from "./api-5tram8aj.js";
|
|
25
25
|
import {
|
|
26
26
|
CommandHandler2
|
|
27
|
-
} from "./api-
|
|
27
|
+
} from "./api-jkk5pfey.js";
|
|
28
28
|
import {
|
|
29
29
|
SkillHandler2
|
|
30
|
-
} from "./api-
|
|
30
|
+
} from "./api-8j0p2cse.js";
|
|
31
31
|
import {
|
|
32
32
|
RpcHandler2
|
|
33
|
-
} from "./api-
|
|
33
|
+
} from "./api-ayydbn18.js";
|
|
34
34
|
import {
|
|
35
35
|
layer4
|
|
36
36
|
} from "./api-n9y13hgv.js";
|
|
37
37
|
import {
|
|
38
38
|
EventHandler2
|
|
39
|
-
} from "./api-
|
|
39
|
+
} from "./api-kfcrce64.js";
|
|
40
40
|
import {
|
|
41
41
|
AgentHandler2
|
|
42
|
-
} from "./api-
|
|
42
|
+
} from "./api-k3vwvjz0.js";
|
|
43
43
|
import {
|
|
44
44
|
PluginHandler2
|
|
45
|
-
} from "./api-
|
|
45
|
+
} from "./api-ew4gcgny.js";
|
|
46
46
|
import {
|
|
47
47
|
ServerHandler2
|
|
48
|
-
} from "./api-
|
|
48
|
+
} from "./api-8egkey78.js";
|
|
49
49
|
import {
|
|
50
50
|
DebugHandler2
|
|
51
|
-
} from "./api-
|
|
51
|
+
} from "./api-cyg5ewmc.js";
|
|
52
52
|
import {
|
|
53
53
|
PtyHandler2
|
|
54
|
-
} from "./api-
|
|
54
|
+
} from "./api-dww7e16t.js";
|
|
55
55
|
import {
|
|
56
56
|
PersistentPtyHandler2
|
|
57
|
-
} from "./api-
|
|
57
|
+
} from "./api-nrbp45gt.js";
|
|
58
58
|
import {
|
|
59
59
|
ShellHandler2
|
|
60
|
-
} from "./api-
|
|
60
|
+
} from "./api-ja8v61rs.js";
|
|
61
61
|
import {
|
|
62
62
|
ReferenceHandler2
|
|
63
|
-
} from "./api-
|
|
63
|
+
} from "./api-4njtb34p.js";
|
|
64
64
|
import {
|
|
65
65
|
LocationHandler2
|
|
66
|
-
} from "./api-
|
|
66
|
+
} from "./api-7q78xev7.js";
|
|
67
67
|
import {
|
|
68
68
|
IntegrationHandler2
|
|
69
|
-
} from "./api-
|
|
69
|
+
} from "./api-87b1hpyt.js";
|
|
70
70
|
import {
|
|
71
71
|
WebSearchHandler2
|
|
72
|
-
} from "./api-
|
|
72
|
+
} from "./api-0qsg460b.js";
|
|
73
73
|
import {
|
|
74
74
|
McpHandler2
|
|
75
|
-
} from "./api-
|
|
75
|
+
} from "./api-1k5wqj6r.js";
|
|
76
76
|
import {
|
|
77
77
|
CredentialHandler2
|
|
78
|
-
} from "./api-
|
|
78
|
+
} from "./api-6kffarfb.js";
|
|
79
79
|
import {
|
|
80
80
|
ProjectHandler2
|
|
81
|
-
} from "./api-
|
|
81
|
+
} from "./api-61vjxtnv.js";
|
|
82
82
|
import {
|
|
83
83
|
WorktreeHandler2
|
|
84
|
-
} from "./api-
|
|
84
|
+
} from "./api-3hbmhzqf.js";
|
|
85
85
|
import {
|
|
86
86
|
VcsHandler2
|
|
87
|
-
} from "./api-
|
|
87
|
+
} from "./api-5nvghr3b.js";
|
|
88
88
|
import {
|
|
89
89
|
MigrationHandler2
|
|
90
|
-
} from "./api-
|
|
90
|
+
} from "./api-ap1gkapp.js";
|
|
91
91
|
import {
|
|
92
92
|
ConfigHandler2
|
|
93
|
-
} from "./api-
|
|
93
|
+
} from "./api-tcd2me74.js";
|
|
94
94
|
|
|
95
95
|
// src/handlers.ts
|
|
96
96
|
import { Layer } from "effect";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./api-
|
|
3
|
+
} from "./api-e19jw7kc.js";
|
|
4
4
|
import {
|
|
5
5
|
SESSION_TTL_SECONDS2,
|
|
6
6
|
Config2,
|
|
7
7
|
issueSession2,
|
|
8
8
|
sessionCookieName2
|
|
9
9
|
} from "./api-anm12x33.js";
|
|
10
|
-
import {
|
|
11
|
-
Service5
|
|
12
|
-
} from "./api-g0rzwe5g.js";
|
|
13
10
|
import {
|
|
14
11
|
Service2
|
|
15
|
-
} from "./api-
|
|
12
|
+
} from "./api-c6kb7fmf.js";
|
|
13
|
+
import {
|
|
14
|
+
Service5
|
|
15
|
+
} from "./api-sstsrjtg.js";
|
|
16
16
|
|
|
17
17
|
// src/handlers/server.ts
|
|
18
18
|
import { Duration, Effect } from "effect";
|
|
@@ -21,10 +21,10 @@ import { HttpApiBuilder } from "effect/http-api";
|
|
|
21
21
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
22
22
|
import { UnauthorizedError } from "@opencode/protocol/errors";
|
|
23
23
|
var ServerHandler2 = HttpApiBuilder.group(Api2, "server.server", (handlers) => Effect.gen(function* () {
|
|
24
|
-
const pairing = yield*
|
|
24
|
+
const pairing = yield* Service5;
|
|
25
25
|
const auth = yield* Config2;
|
|
26
26
|
return handlers.handle("server.info", () => Effect.gen(function* () {
|
|
27
|
-
const info = yield*
|
|
27
|
+
const info = yield* Service2;
|
|
28
28
|
return {
|
|
29
29
|
version: info.app.version ?? "unknown",
|
|
30
30
|
pid: process.pid ?? 0,
|
|
@@ -6,17 +6,17 @@ import {
|
|
|
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,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestRef2
|
|
3
|
-
} from "./api-
|
|
3
|
+
} from "./api-stv2b73g.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./api-
|
|
6
|
+
} from "./api-e19jw7kc.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/debug.ts
|
|
9
9
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./api-
|
|
5
|
+
} from "./api-stv2b73g.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./api-
|
|
8
|
+
} from "./api-e19jw7kc.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
12
|
} from "./api-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
Service3
|
|
15
|
-
} from "./api-
|
|
15
|
+
} from "./api-0d9kah4z.js";
|
|
16
16
|
import {
|
|
17
17
|
runPtySocket2
|
|
18
18
|
} from "./api-h6rt5k9s.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocationMiddleware2
|
|
3
|
-
} from "./api-
|
|
3
|
+
} from "./api-stv2b73g.js";
|
|
4
4
|
import {
|
|
5
5
|
FormLocationMiddleware2
|
|
6
|
-
} from "./api-
|
|
6
|
+
} from "./api-fymptm79.js";
|
|
7
7
|
import {
|
|
8
8
|
SessionLocationMiddleware2
|
|
9
|
-
} from "./api-
|
|
9
|
+
} from "./api-85fg6s70.js";
|
|
10
10
|
|
|
11
11
|
// src/api.ts
|
|
12
12
|
import { makeDefaultApi } from "@opencode/protocol/api";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./api-q4bn6dy8.js";
|
|
4
4
|
import {
|
|
5
5
|
createRoutes2
|
|
6
|
-
} from "./api-
|
|
6
|
+
} from "./api-qs55f76v.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
9
|
} from "./api-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/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 };
|