@opencode/server 2.2.7 → 2.3.1
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 +148 -1
- package/dist/api.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/{process-zmgfywqd.js → request-tracing-05c5061t.js} +1 -1
- package/dist/chunks/{process-r5696se6.js → request-tracing-0e81et3m.js} +3 -3
- package/dist/chunks/{process-mx6chrwy.js → request-tracing-0gf4dfn8.js} +35 -35
- package/dist/chunks/{process-amndpc82.js → request-tracing-2pbbrzpp.js} +2 -2
- package/dist/chunks/{process-e6e4kz0w.js → request-tracing-39nnfjx1.js} +4 -4
- package/dist/chunks/{process-5pdfedjd.js → request-tracing-3te71694.js} +4 -4
- package/dist/chunks/{process-jqvq1ywe.js → request-tracing-4ed680xg.js} +2 -2
- package/dist/chunks/{process-370cpmna.js → request-tracing-4p2y0qs3.js} +2 -2
- package/dist/chunks/{process-gqq6kfhc.js → request-tracing-50bbk3b2.js} +3 -3
- package/dist/chunks/{process-78rcgzsr.js → request-tracing-78rcgzsr.js} +1 -1
- package/dist/chunks/{process-7b9xm1qg.js → request-tracing-7b9xm1qg.js} +1 -1
- package/dist/chunks/{process-fszbw5sk.js → request-tracing-7nb2rv11.js} +4 -4
- package/dist/chunks/{process-zds85vps.js → request-tracing-861wfsmy.js} +1 -1
- package/dist/chunks/request-tracing-8sb6qqpn.js +28 -0
- package/dist/chunks/request-tracing-9cd3a4b8.js +69 -0
- package/dist/chunks/{process-vtfzy3at.js → request-tracing-9grnt8dc.js} +2 -2
- package/dist/chunks/{process-5553qfcy.js → request-tracing-ap1t95t8.js} +3 -3
- package/dist/chunks/{process-wqv43pj9.js → request-tracing-ayveq98d.js} +23 -3
- package/dist/chunks/{process-yet0vexm.js → request-tracing-b3bmdkga.js} +1 -1
- package/dist/chunks/{process-xpg37vzc.js → request-tracing-b4mqtccx.js} +2 -2
- package/dist/chunks/{process-4z8yg1dv.js → request-tracing-d4534456.js} +4 -4
- package/dist/chunks/{process-rcmctvp9.js → request-tracing-d8b9pm2q.js} +1 -1
- package/dist/chunks/{process-p3f060n2.js → request-tracing-dezpcckc.js} +2 -2
- package/dist/chunks/{process-djr0jy89.js → request-tracing-djr0jy89.js} +1 -1
- package/dist/chunks/{process-7cd61xtm.js → request-tracing-dx89xydc.js} +2 -2
- package/dist/chunks/{process-2835150m.js → request-tracing-et00mhwf.js} +2 -2
- package/dist/chunks/{process-rxyx8sa0.js → request-tracing-f8r9p2vr.js} +2 -2
- package/dist/chunks/{process-wecgp61r.js → request-tracing-fvpjvjpp.js} +7 -7
- package/dist/chunks/{process-zgw0abca.js → request-tracing-g6yhb3a8.js} +16 -22
- package/dist/chunks/{process-jc2vwkyw.js → request-tracing-h1thjy6x.js} +2 -2
- package/dist/chunks/{process-agenqygg.js → request-tracing-h286a6py.js} +2 -2
- package/dist/chunks/{process-gk0yxcp6.js → request-tracing-htyf2qs7.js} +1 -1
- package/dist/chunks/{process-0e4fm4yw.js → request-tracing-hx8bsq9d.js} +1 -1
- package/dist/chunks/{process-j4at0y5c.js → request-tracing-j4at0y5c.js} +1 -1
- package/dist/chunks/{process-r2veymj8.js → request-tracing-jjvpqmx6.js} +4 -4
- package/dist/chunks/{process-50xc6x42.js → request-tracing-kg0ybx4v.js} +3 -3
- package/dist/chunks/{process-myqk22k5.js → request-tracing-myqk22k5.js} +2 -2
- package/dist/chunks/{process-kqr36gas.js → request-tracing-mzs0n5xz.js} +7 -7
- package/dist/chunks/request-tracing-n26yr6pw.js +21 -0
- package/dist/chunks/{process-5kr30cfc.js → request-tracing-n5et0xgm.js} +8 -8
- package/dist/chunks/{process-w5yp0ga8.js → request-tracing-p86kew8c.js} +2 -2
- package/dist/chunks/{process-xbqm7mpj.js → request-tracing-q44yktpv.js} +2 -2
- package/dist/chunks/{process-zgvwy66h.js → request-tracing-r7knxm63.js} +7 -20
- package/dist/chunks/{process-dfxfd950.js → request-tracing-rd9e3qfx.js} +4 -4
- package/dist/chunks/{process-skcryrty.js → request-tracing-s9tkswmw.js} +2 -2
- package/dist/chunks/request-tracing-sy2e93cn.js +46 -0
- package/dist/chunks/{process-t32e1bbt.js → request-tracing-t32e1bbt.js} +1 -1
- package/dist/chunks/{process-1vxxxmgg.js → request-tracing-tk56ffsq.js} +2 -2
- package/dist/chunks/{process-xjbee3xk.js → request-tracing-v0r38a4t.js} +31 -19
- package/dist/chunks/{process-7x1re4zg.js → request-tracing-v8aqacn3.js} +2 -2
- package/dist/chunks/{process-sqxx1p54.js → request-tracing-vbgqk0mr.js} +2 -2
- package/dist/chunks/{process-vvp99hc9.js → request-tracing-x4b2rtcb.js} +1 -1
- package/dist/chunks/{process-f3xrm535.js → request-tracing-z2ndp6vh.js} +6 -6
- package/dist/chunks/{process-74kxthdf.js → request-tracing-zbe9jfhy.js} +1 -1
- package/dist/content-headers.js +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +5 -5
- package/dist/fetch.d.ts +3 -0
- package/dist/fetch.js +61 -58
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/artifact.js +3 -3
- package/dist/handlers/automation.d.ts +25 -0
- package/dist/handlers/automation.js +7 -0
- package/dist/handlers/blob.d.ts +7 -0
- package/dist/handlers/blob.js +8 -0
- 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 +8 -7
- package/dist/handlers/generate.d.ts +2 -1
- package/dist/handlers/generate.js +6 -6
- package/dist/handlers/integration.js +6 -6
- package/dist/handlers/job.d.ts +11 -1
- 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.d.ts +1 -1
- package/dist/handlers/persistent-pty.js +15 -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/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.d.ts +1 -1
- package/dist/handlers.js +52 -50
- package/dist/location.js +4 -4
- package/dist/media-uri.js +1 -1
- package/dist/middleware/authorization.js +2 -2
- package/dist/middleware/defect-response.d.ts +2 -0
- package/dist/middleware/defect-response.js +6 -0
- 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/options.d.ts +3 -0
- package/dist/options.js +3 -0
- package/dist/pairing.js +3 -3
- package/dist/process.d.ts +3 -0
- package/dist/process.js +64 -61
- package/dist/range.d.ts +6 -0
- package/dist/range.js +8 -0
- package/dist/request-site.js +2 -2
- package/dist/request-tracing.js +1 -1
- package/dist/routes.d.ts +6 -3
- package/dist/routes.js +56 -53
- package/dist/server-info.js +3 -3
- package/dist/service-status.js +3 -3
- package/dist/workerd.d.ts +1 -0
- package/dist/workerd.js +66 -59
- package/package.json +9 -9
- package/dist/chunks/process-059rbh9c.js +0 -43
- package/dist/handlers/schedule.d.ts +0 -314
- package/dist/handlers/schedule.js +0 -7
- /package/dist/chunks/{process-9rqn6x4v.js → request-tracing-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{process-bd8755ek.js → request-tracing-bd8755ek.js} +0 -0
- /package/dist/chunks/{process-q187pxxd.js → request-tracing-q187pxxd.js} +0 -0
- /package/dist/chunks/{process-q4bn6dy8.js → request-tracing-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{process-smaf4a18.js → request-tracing-smaf4a18.js} +0 -0
- /package/dist/chunks/{process-xthc02cw.js → request-tracing-xthc02cw.js} +0 -0
- /package/dist/chunks/{process-yc7nft6q.js → request-tracing-yc7nft6q.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-tracing-50bbk3b2.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-tracing-0e81et3m.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/skill.ts
|
|
9
9
|
import { Skill } from "@opencode/core/skill";
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-tracing-50bbk3b2.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-tracing-0e81et3m.js";
|
|
7
7
|
import {
|
|
8
8
|
download2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./request-tracing-t32e1bbt.js";
|
|
10
|
+
import {
|
|
11
|
+
parse2
|
|
12
|
+
} from "./request-tracing-8sb6qqpn.js";
|
|
10
13
|
|
|
11
14
|
// src/handlers/fs.ts
|
|
12
15
|
import { FileSystem } from "@opencode/core/filesystem";
|
|
@@ -71,7 +74,7 @@ function serveFile(request, file, content) {
|
|
|
71
74
|
if (isNotModified(request, etag, lastModified))
|
|
72
75
|
return HttpServerResponse.empty({ status: 304, headers: { ...validators, ...content } });
|
|
73
76
|
const rangeHeader = request.method === "GET" ? request.headers["range"] : undefined;
|
|
74
|
-
const range = rangeHeader !== undefined && matchesIfRange(request.headers["if-range"], etag, lastModified) ?
|
|
77
|
+
const range = rangeHeader !== undefined && matchesIfRange(request.headers["if-range"], etag, lastModified) ? parse2(rangeHeader, file.size) : undefined;
|
|
75
78
|
if (range === "unsatisfiable")
|
|
76
79
|
return HttpServerResponse.empty({
|
|
77
80
|
status: 416,
|
|
@@ -107,21 +110,5 @@ function matchesIfRange(ifRange, etag, lastModified) {
|
|
|
107
110
|
function stripWeak(etag) {
|
|
108
111
|
return etag.trim().replace(/^w\//i, "");
|
|
109
112
|
}
|
|
110
|
-
function parseRange(header, size) {
|
|
111
|
-
const match = /^bytes=\s*(\d*)\s*-\s*(\d*)\s*$/i.exec(header.trim());
|
|
112
|
-
if (match === null || match[1] === "" && match[2] === "")
|
|
113
|
-
return;
|
|
114
|
-
if (match[1] === "") {
|
|
115
|
-
const suffix = Number(match[2]);
|
|
116
|
-
if (suffix === 0 || size === 0)
|
|
117
|
-
return "unsatisfiable";
|
|
118
|
-
return { start: Math.max(size - suffix, 0), end: size - 1 };
|
|
119
|
-
}
|
|
120
|
-
const start = Number(match[1]);
|
|
121
|
-
const end = match[2] === "" ? size - 1 : Number(match[2]);
|
|
122
|
-
if (start > end || start >= size)
|
|
123
|
-
return "unsatisfiable";
|
|
124
|
-
return { start, end: Math.min(end, size - 1) };
|
|
125
|
-
}
|
|
126
113
|
|
|
127
114
|
export { FileSystemHandler2 };
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
missingMessage2,
|
|
4
4
|
failedMessageDecode2,
|
|
5
5
|
failedSnapshot2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-tracing-smaf4a18.js";
|
|
7
7
|
import {
|
|
8
8
|
locationErrors2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./request-tracing-50bbk3b2.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./request-tracing-0e81et3m.js";
|
|
13
13
|
import {
|
|
14
14
|
wantsMediaRefs2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./request-tracing-xthc02cw.js";
|
|
16
16
|
|
|
17
17
|
// src/handlers/session.ts
|
|
18
18
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-tracing-50bbk3b2.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-tracing-0e81et3m.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/reference.ts
|
|
9
9
|
import { Reference } from "@opencode/core/reference";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
download2
|
|
3
|
+
} from "./request-tracing-t32e1bbt.js";
|
|
4
|
+
import {
|
|
5
|
+
parse2
|
|
6
|
+
} from "./request-tracing-8sb6qqpn.js";
|
|
7
|
+
|
|
8
|
+
// src/handlers/blob.ts
|
|
9
|
+
import { BlobStore } from "@opencode/core/blob-store";
|
|
10
|
+
import { BlobNotFoundError } from "@opencode/protocol/errors";
|
|
11
|
+
import { FSUtil } from "@opencode/util/fs-util";
|
|
12
|
+
import { Effect } from "effect";
|
|
13
|
+
import { HttpServerResponse } from "effect/http";
|
|
14
|
+
var makeBlobGet2 = Effect.gen(function* () {
|
|
15
|
+
const blobs = yield* BlobStore.Service;
|
|
16
|
+
const fs = yield* FSUtil.Service;
|
|
17
|
+
return (id, request) => Effect.gen(function* () {
|
|
18
|
+
const blob = yield* blobs.read(id).pipe(Effect.mapError((error) => new BlobNotFoundError({ blobID: error.id, message: error.message })));
|
|
19
|
+
const etag = `"${id}"`;
|
|
20
|
+
const headers = {
|
|
21
|
+
...download2({ mime: blob.mime }),
|
|
22
|
+
"cache-control": "private, max-age=604800, immutable",
|
|
23
|
+
etag,
|
|
24
|
+
"accept-ranges": "bytes"
|
|
25
|
+
};
|
|
26
|
+
if (request.headers["if-none-match"]?.split(",").some((tag) => tag.trim() === "*" || tag.trim().replace(/^w\//i, "") === etag))
|
|
27
|
+
return HttpServerResponse.empty({ status: 304, headers });
|
|
28
|
+
const ifRange = request.headers["if-range"];
|
|
29
|
+
const range = ifRange === undefined || ifRange.trim() === etag ? parse2(request.headers["range"], blob.bytes) : undefined;
|
|
30
|
+
if (range === "unsatisfiable")
|
|
31
|
+
return HttpServerResponse.empty({
|
|
32
|
+
status: 416,
|
|
33
|
+
headers: { ...headers, "content-range": `bytes */${blob.bytes}` }
|
|
34
|
+
});
|
|
35
|
+
const offset = range?.start ?? 0;
|
|
36
|
+
const length = range === undefined ? blob.bytes : range.end - range.start + 1;
|
|
37
|
+
return HttpServerResponse.stream(fs.stream(blob.path, { offset, bytesToRead: length }), {
|
|
38
|
+
status: range === undefined ? 200 : 206,
|
|
39
|
+
contentType: headers["content-type"],
|
|
40
|
+
contentLength: length,
|
|
41
|
+
headers: range === undefined ? headers : { ...headers, "content-range": `bytes ${range.start}-${range.end}/${blob.bytes}` }
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export { makeBlobGet2 };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-tracing-0e81et3m.js";
|
|
4
4
|
import {
|
|
5
5
|
requireConnectable2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-tracing-2pbbrzpp.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/credential.ts
|
|
9
9
|
import { Credential } from "@opencode/core/credential";
|
|
@@ -1,36 +1,39 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
2
|
+
layer4
|
|
3
|
+
} from "./request-tracing-50bbk3b2.js";
|
|
4
4
|
import {
|
|
5
5
|
formLocationLayer2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-tracing-htyf2qs7.js";
|
|
7
7
|
import {
|
|
8
8
|
sessionLocationLayer2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./request-tracing-b3bmdkga.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./request-tracing-0e81et3m.js";
|
|
13
13
|
import {
|
|
14
14
|
Config2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./request-tracing-j4at0y5c.js";
|
|
16
16
|
import {
|
|
17
17
|
CorsConfig2
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./request-tracing-q4bn6dy8.js";
|
|
19
19
|
import {
|
|
20
|
-
|
|
21
|
-
} from "./
|
|
20
|
+
layer3
|
|
21
|
+
} from "./request-tracing-3te71694.js";
|
|
22
22
|
import {
|
|
23
23
|
node2
|
|
24
|
-
} from "./
|
|
24
|
+
} from "./request-tracing-mzs0n5xz.js";
|
|
25
25
|
import {
|
|
26
26
|
handlers2
|
|
27
|
-
} from "./
|
|
27
|
+
} from "./request-tracing-0gf4dfn8.js";
|
|
28
28
|
import {
|
|
29
29
|
authorizationLayer2
|
|
30
|
-
} from "./
|
|
30
|
+
} from "./request-tracing-7b9xm1qg.js";
|
|
31
31
|
import {
|
|
32
32
|
schemaErrorLayer2
|
|
33
|
-
} from "./
|
|
33
|
+
} from "./request-tracing-bd8755ek.js";
|
|
34
|
+
import {
|
|
35
|
+
defectResponseLayer2
|
|
36
|
+
} from "./request-tracing-n26yr6pw.js";
|
|
34
37
|
|
|
35
38
|
// src/routes.ts
|
|
36
39
|
import { Database } from "@opencode/core/database/database";
|
|
@@ -48,12 +51,15 @@ import { PermissionSaved } from "@opencode/core/permission/saved";
|
|
|
48
51
|
import { PtyTicket } from "@opencode/core/pty/ticket";
|
|
49
52
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
50
53
|
import { Project } from "@opencode/core/project";
|
|
54
|
+
import { BlobStore } from "@opencode/core/blob-store";
|
|
55
|
+
import { VideoGeneration } from "@opencode/core/video-generation";
|
|
51
56
|
import { Worktree } from "@opencode/core/worktree";
|
|
52
57
|
import { Session } from "@opencode/core/session";
|
|
53
58
|
import { Instance } from "@opencode/core/instance/service";
|
|
54
59
|
import { SessionTransfer } from "@opencode/core/session/transfer";
|
|
55
60
|
import { InstructionEntry } from "@opencode/core/session/instruction-entry";
|
|
56
61
|
import { ShellSelect } from "@opencode/core/shell/select";
|
|
62
|
+
import { Shell } from "@opencode/core/shell";
|
|
57
63
|
import { Job } from "@opencode/core/job";
|
|
58
64
|
import { KV } from "@opencode/core/kv";
|
|
59
65
|
import { Mcp } from "@opencode/core/mcp/index";
|
|
@@ -64,7 +70,7 @@ import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
|
64
70
|
import { LocationActivity } from "@opencode/core/location-activity";
|
|
65
71
|
import { ModelsDev } from "@opencode/core/models-dev";
|
|
66
72
|
import { SessionRestart } from "@opencode/core/session/execution/restart";
|
|
67
|
-
import {
|
|
73
|
+
import { Automation } from "@opencode/core/automation";
|
|
68
74
|
import { PluginUpdate } from "@opencode/core/plugin/update";
|
|
69
75
|
import { SdkPlugins } from "@opencode/core/plugin/sdk";
|
|
70
76
|
import { WellKnown } from "@opencode/core/wellknown";
|
|
@@ -81,6 +87,8 @@ var applicationServiceNodes = [
|
|
|
81
87
|
Database.node,
|
|
82
88
|
KV.node,
|
|
83
89
|
Bus.node,
|
|
90
|
+
PersistentPty.node,
|
|
91
|
+
Shell.daemonNode,
|
|
84
92
|
EventLogger.node,
|
|
85
93
|
httpClient,
|
|
86
94
|
Job.node,
|
|
@@ -95,14 +103,15 @@ var applicationServiceNodes = [
|
|
|
95
103
|
PluginUpdate.node,
|
|
96
104
|
PermissionSaved.node,
|
|
97
105
|
PtyTicket.node,
|
|
98
|
-
PersistentPty.node,
|
|
99
106
|
Credential.node,
|
|
100
107
|
WellKnown.node,
|
|
101
108
|
node2,
|
|
102
109
|
LocationServiceMap.node,
|
|
103
110
|
LocationActivity.node,
|
|
104
111
|
SessionRestart.node,
|
|
105
|
-
|
|
112
|
+
Automation.node,
|
|
113
|
+
BlobStore.node,
|
|
114
|
+
VideoGeneration.node,
|
|
106
115
|
Workspace.node,
|
|
107
116
|
FileWatch.node
|
|
108
117
|
];
|
|
@@ -131,7 +140,10 @@ function makeRoutes(auth, options, serviceURLs, overrides, instances) {
|
|
|
131
140
|
file: options.config?.file,
|
|
132
141
|
content: options.config?.content
|
|
133
142
|
})),
|
|
134
|
-
InstructionDiscovery.node.replace(InstructionDiscovery.configured({
|
|
143
|
+
InstructionDiscovery.node.replace(InstructionDiscovery.configured({
|
|
144
|
+
project: options.config?.project,
|
|
145
|
+
claude: options.instructions?.claude
|
|
146
|
+
})),
|
|
135
147
|
ShellSelect.node.replace(ShellSelect.configured({ gitbash: options.windows?.gitbash })),
|
|
136
148
|
Mcp.node.replace(Mcp.configured({
|
|
137
149
|
clientInfo: {
|
|
@@ -155,8 +167,8 @@ function makeRoutes(auth, options, serviceURLs, overrides, instances) {
|
|
|
155
167
|
})) : build(overrides);
|
|
156
168
|
return serviceLayer.pipe(Layer.flatMap((context) => {
|
|
157
169
|
const services = Layer.succeedContext(context);
|
|
158
|
-
const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)),
|
|
159
|
-
const api = HttpApiBuilder.layer(Api2, { openapiPath: "/openapi.json" }).pipe(Layer.provide(handlers2.pipe(Layer.provide(services), Layer.provide(Layer.succeed(CorsConfig2, options)))), Layer.provide(formLocationLayer2), Layer.provide(sessionLocationLayer2), Layer.provide(
|
|
170
|
+
const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer3(serviceURLs, Context.get(context, Global.Service).tmp, options.app));
|
|
171
|
+
const api = HttpApiBuilder.layer(Api2, { openapiPath: "/openapi.json" }).pipe(Layer.provide(handlers2.pipe(Layer.provide(services), Layer.provide(Layer.succeed(CorsConfig2, options)))), Layer.provide(formLocationLayer2), Layer.provide(sessionLocationLayer2), Layer.provide(layer4), Layer.provide(authorizationLayer2), Layer.provide(schemaErrorLayer2), Layer.provide(auth), HttpRouter.provideRequest(requestServices), Layer.merge(defectResponseLayer2), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer));
|
|
160
172
|
return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
|
|
161
173
|
}));
|
|
162
174
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-tracing-50bbk3b2.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-tracing-0e81et3m.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/form.ts
|
|
9
9
|
import { Form } from "@opencode/core/form";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-tracing-50bbk3b2.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-tracing-0e81et3m.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/plugin.ts
|
|
9
9
|
import { Plugin } from "@opencode/core/plugin";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-tracing-0e81et3m.js";
|
|
4
4
|
import {
|
|
5
5
|
SESSION_TTL_SECONDS2,
|
|
6
6
|
Config2,
|
|
7
7
|
issueSession2,
|
|
8
8
|
sessionCookieName2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./request-tracing-j4at0y5c.js";
|
|
10
10
|
import {
|
|
11
11
|
Service3
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./request-tracing-3te71694.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
14
|
+
Service4
|
|
15
|
+
} from "./request-tracing-mzs0n5xz.js";
|
|
16
16
|
|
|
17
17
|
// src/handlers/server.ts
|
|
18
18
|
import { hostname } from "node:os";
|
|
@@ -22,7 +22,7 @@ import { HttpApiBuilder } from "effect/http-api";
|
|
|
22
22
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
23
23
|
import { UnauthorizedError } from "@opencode/protocol/errors";
|
|
24
24
|
var ServerHandler2 = HttpApiBuilder.group(Api2, "server.server", (handlers) => Effect.gen(function* () {
|
|
25
|
-
const pairing = yield*
|
|
25
|
+
const pairing = yield* Service4;
|
|
26
26
|
const auth = yield* Config2;
|
|
27
27
|
return handlers.handle("server.info", () => Effect.gen(function* () {
|
|
28
28
|
const info = yield* Service3;
|
package/dist/content-headers.js
CHANGED
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
|
+
Service2,
|
|
6
6
|
frame2,
|
|
7
7
|
make4,
|
|
8
|
-
|
|
8
|
+
layer2,
|
|
9
9
|
exports_event_feed
|
|
10
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/request-tracing-fvpjvjpp.js";
|
|
11
11
|
export {
|
|
12
12
|
EncodingError2 as EncodingError,
|
|
13
13
|
exports_event_feed as EventFeed,
|
|
14
|
-
|
|
14
|
+
Service2 as Service,
|
|
15
15
|
SubscriberCapacity2 as SubscriberCapacity,
|
|
16
16
|
SubscriberOverflowError2 as SubscriberOverflowError,
|
|
17
17
|
frame2 as frame,
|
|
18
|
-
|
|
18
|
+
layer2 as layer,
|
|
19
19
|
make4 as make
|
|
20
20
|
};
|
package/dist/fetch.d.ts
CHANGED
|
@@ -70,6 +70,9 @@ export declare const make: (options?: {
|
|
|
70
70
|
readonly file?: string | undefined;
|
|
71
71
|
readonly content?: string | undefined;
|
|
72
72
|
} | undefined;
|
|
73
|
+
readonly instructions?: {
|
|
74
|
+
readonly claude?: boolean | undefined;
|
|
75
|
+
} | undefined;
|
|
73
76
|
readonly windows?: {
|
|
74
77
|
readonly gitbash?: string | undefined;
|
|
75
78
|
} | undefined;
|
package/dist/fetch.js
CHANGED
|
@@ -1,63 +1,66 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
make3,
|
|
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/
|
|
52
|
-
import"./chunks/
|
|
53
|
-
import"./chunks/
|
|
54
|
-
import"./chunks/
|
|
55
|
-
import"./chunks/
|
|
56
|
-
import"./chunks/
|
|
57
|
-
import"./chunks/
|
|
58
|
-
import"./chunks/
|
|
59
|
-
import"./chunks/
|
|
4
|
+
} from "./chunks/request-tracing-n5et0xgm.js";
|
|
5
|
+
import"./chunks/request-tracing-v0r38a4t.js";
|
|
6
|
+
import"./chunks/request-tracing-n26yr6pw.js";
|
|
7
|
+
import"./chunks/request-tracing-7b9xm1qg.js";
|
|
8
|
+
import"./chunks/request-tracing-bd8755ek.js";
|
|
9
|
+
import"./chunks/request-tracing-myqk22k5.js";
|
|
10
|
+
import"./chunks/request-tracing-yc7nft6q.js";
|
|
11
|
+
import"./chunks/request-tracing-0gf4dfn8.js";
|
|
12
|
+
import"./chunks/request-tracing-h286a6py.js";
|
|
13
|
+
import"./chunks/request-tracing-v8aqacn3.js";
|
|
14
|
+
import"./chunks/request-tracing-7nb2rv11.js";
|
|
15
|
+
import"./chunks/request-tracing-tk56ffsq.js";
|
|
16
|
+
import"./chunks/request-tracing-2pbbrzpp.js";
|
|
17
|
+
import"./chunks/request-tracing-d8b9pm2q.js";
|
|
18
|
+
import"./chunks/request-tracing-x4b2rtcb.js";
|
|
19
|
+
import"./chunks/request-tracing-dezpcckc.js";
|
|
20
|
+
import"./chunks/request-tracing-ayveq98d.js";
|
|
21
|
+
import"./chunks/request-tracing-z2ndp6vh.js";
|
|
22
|
+
import"./chunks/request-tracing-q44yktpv.js";
|
|
23
|
+
import"./chunks/request-tracing-g6yhb3a8.js";
|
|
24
|
+
import"./chunks/request-tracing-p86kew8c.js";
|
|
25
|
+
import"./chunks/request-tracing-b4mqtccx.js";
|
|
26
|
+
import"./chunks/request-tracing-h1thjy6x.js";
|
|
27
|
+
import"./chunks/request-tracing-vbgqk0mr.js";
|
|
28
|
+
import"./chunks/request-tracing-sy2e93cn.js";
|
|
29
|
+
import"./chunks/request-tracing-861wfsmy.js";
|
|
30
|
+
import"./chunks/request-tracing-4p2y0qs3.js";
|
|
31
|
+
import"./chunks/request-tracing-hx8bsq9d.js";
|
|
32
|
+
import"./chunks/request-tracing-zbe9jfhy.js";
|
|
33
|
+
import"./chunks/request-tracing-s9tkswmw.js";
|
|
34
|
+
import"./chunks/request-tracing-d4534456.js";
|
|
35
|
+
import"./chunks/request-tracing-djr0jy89.js";
|
|
36
|
+
import"./chunks/request-tracing-r7knxm63.js";
|
|
37
|
+
import"./chunks/request-tracing-9cd3a4b8.js";
|
|
38
|
+
import"./chunks/request-tracing-9grnt8dc.js";
|
|
39
|
+
import"./chunks/request-tracing-78rcgzsr.js";
|
|
40
|
+
import"./chunks/request-tracing-4ed680xg.js";
|
|
41
|
+
import"./chunks/request-tracing-kg0ybx4v.js";
|
|
42
|
+
import"./chunks/request-tracing-et00mhwf.js";
|
|
43
|
+
import"./chunks/request-tracing-05c5061t.js";
|
|
44
|
+
import"./chunks/request-tracing-dx89xydc.js";
|
|
45
|
+
import"./chunks/request-tracing-jjvpqmx6.js";
|
|
46
|
+
import"./chunks/request-tracing-q187pxxd.js";
|
|
47
|
+
import"./chunks/request-tracing-ap1t95t8.js";
|
|
48
|
+
import"./chunks/request-tracing-rd9e3qfx.js";
|
|
49
|
+
import"./chunks/request-tracing-f8r9p2vr.js";
|
|
50
|
+
import"./chunks/request-tracing-fvpjvjpp.js";
|
|
51
|
+
import"./chunks/request-tracing-3te71694.js";
|
|
52
|
+
import"./chunks/request-tracing-q4bn6dy8.js";
|
|
53
|
+
import"./chunks/request-tracing-0e81et3m.js";
|
|
54
|
+
import"./chunks/request-tracing-b3bmdkga.js";
|
|
55
|
+
import"./chunks/request-tracing-htyf2qs7.js";
|
|
56
|
+
import"./chunks/request-tracing-50bbk3b2.js";
|
|
57
|
+
import"./chunks/request-tracing-smaf4a18.js";
|
|
58
|
+
import"./chunks/request-tracing-t32e1bbt.js";
|
|
59
|
+
import"./chunks/request-tracing-mzs0n5xz.js";
|
|
60
|
+
import"./chunks/request-tracing-j4at0y5c.js";
|
|
61
|
+
import"./chunks/request-tracing-xthc02cw.js";
|
|
62
|
+
import"./chunks/request-tracing-8sb6qqpn.js";
|
|
60
63
|
export {
|
|
61
64
|
exports_fetch as ServerFetch,
|
|
62
|
-
|
|
65
|
+
make3 as make
|
|
63
66
|
};
|
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/request-tracing-dezpcckc.js";
|
|
4
|
+
import"../chunks/request-tracing-0e81et3m.js";
|
|
5
|
+
import"../chunks/request-tracing-b3bmdkga.js";
|
|
6
|
+
import"../chunks/request-tracing-htyf2qs7.js";
|
|
7
|
+
import"../chunks/request-tracing-50bbk3b2.js";
|
|
8
|
+
import"../chunks/request-tracing-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
AgentHandler2 as AgentHandler
|
|
11
11
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeArtifact2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/request-tracing-p86kew8c.js";
|
|
4
|
+
import"../chunks/request-tracing-50bbk3b2.js";
|
|
5
|
+
import"../chunks/request-tracing-smaf4a18.js";
|
|
6
6
|
export {
|
|
7
7
|
makeArtifact2 as makeArtifact
|
|
8
8
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Automation } from "@opencode/core/automation";
|
|
2
|
+
import { Project } from "@opencode/core/project";
|
|
3
|
+
import { Session } from "@opencode/core/session";
|
|
4
|
+
import { AutomationNotFoundError, ForbiddenError, InvalidRequestError } from "@opencode/protocol/errors";
|
|
5
|
+
import type { CreatePayload, ListQuery } from "@opencode/protocol/groups/automation";
|
|
6
|
+
import { Effect } from "effect";
|
|
7
|
+
/** `automation.*` in the `server.experimental` group. Every route needs experimental.automations where it runs. */
|
|
8
|
+
export declare const makeAutomation: Effect.Effect<{
|
|
9
|
+
create: (payload: CreatePayload) => Effect.Effect<{
|
|
10
|
+
data: Automation.Info;
|
|
11
|
+
}, ForbiddenError | InvalidRequestError | import("@opencode/protocol/errors").SessionNotFoundError, never>;
|
|
12
|
+
list: (query: ListQuery) => Effect.Effect<{
|
|
13
|
+
data: Automation.Info[];
|
|
14
|
+
}, ForbiddenError | InvalidRequestError | import("@opencode/protocol/errors").SessionNotFoundError, never>;
|
|
15
|
+
get: (id: Automation.ID) => Effect.Effect<{
|
|
16
|
+
data: Automation.Info;
|
|
17
|
+
}, AutomationNotFoundError | ForbiddenError, never>;
|
|
18
|
+
pause: (id: Automation.ID) => Effect.Effect<{
|
|
19
|
+
data: Automation.Info;
|
|
20
|
+
}, AutomationNotFoundError | ForbiddenError, never>;
|
|
21
|
+
resume: (id: Automation.ID) => Effect.Effect<{
|
|
22
|
+
data: Automation.Info;
|
|
23
|
+
}, AutomationNotFoundError | ForbiddenError, never>;
|
|
24
|
+
remove: (id: Automation.ID) => Effect.Effect<void, AutomationNotFoundError | ForbiddenError, never>;
|
|
25
|
+
}, never, Session.Service | Automation.Service | Project.Service>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BlobStore } from "@opencode/core/blob-store";
|
|
2
|
+
import { BlobNotFoundError } from "@opencode/protocol/errors";
|
|
3
|
+
import { FSUtil } from "@opencode/util/fs-util";
|
|
4
|
+
import { Effect } from "effect";
|
|
5
|
+
import { type HttpServerRequest, HttpServerResponse } from "effect/http";
|
|
6
|
+
/** `blob.get` in the `server.experimental` group. Raw, so it can stream the file and answer Range and 304 itself. */
|
|
7
|
+
export declare const makeBlobGet: Effect.Effect<(id: BlobStore.ID, request: HttpServerRequest.HttpServerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, BlobNotFoundError, never>, never, FSUtil.Service | BlobStore.Service>;
|