@opencode/server 0.0.0-dev-1347 → 0.0.0-dev-1348
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/{media-uri-hvn8tnxr.js → request-site-0vqsbvsa.js} +4 -4
- package/dist/chunks/{media-uri-pv4dnzzq.js → request-site-10sj2tcf.js} +1 -1
- package/dist/chunks/{media-uri-dqfyxmp4.js → request-site-1dbhk1te.js} +7 -6
- package/dist/chunks/{media-uri-4r2ye500.js → request-site-2tmcamrc.js} +2 -2
- package/dist/chunks/{media-uri-39nnfjx1.js → request-site-39nnfjx1.js} +1 -1
- package/dist/chunks/{media-uri-7dtbad8d.js → request-site-3te71694.js} +7 -7
- package/dist/chunks/{media-uri-hgrkvk6s.js → request-site-6pm6ek88.js} +1 -1
- package/dist/chunks/request-site-74nxvsrn.js +27 -0
- package/dist/chunks/{media-uri-t8azv5ge.js → request-site-7dkb5ks8.js} +2 -2
- package/dist/chunks/{media-uri-edwk6ehd.js → request-site-8nezxn08.js} +1 -1
- package/dist/chunks/{media-uri-zrptb2x8.js → request-site-8qsq6tbs.js} +2 -2
- package/dist/chunks/{media-uri-8sb6qqpn.js → request-site-8sb6qqpn.js} +1 -1
- package/dist/chunks/{media-uri-86dz2n4m.js → request-site-8xdajgpr.js} +2 -2
- package/dist/chunks/{media-uri-g97h7k0s.js → request-site-am27j67f.js} +1 -1
- package/dist/chunks/{media-uri-j80tzjj3.js → request-site-br4x4prt.js} +3 -3
- package/dist/chunks/{media-uri-n6ypjnhz.js → request-site-ca564221.js} +1 -1
- package/dist/chunks/{media-uri-vh37ha9e.js → request-site-csetzeb0.js} +8 -8
- package/dist/chunks/{media-uri-b7yt2ykh.js → request-site-csnx1nj3.js} +2 -2
- package/dist/chunks/{media-uri-g80pvn6e.js → request-site-cwx7pqk1.js} +2 -2
- package/dist/chunks/{media-uri-n74dt79t.js → request-site-dc91e8gy.js} +16 -16
- package/dist/chunks/{media-uri-djr0jy89.js → request-site-djr0jy89.js} +1 -1
- package/dist/chunks/{media-uri-qahj7606.js → request-site-ehyp3zqd.js} +1 -1
- package/dist/chunks/{media-uri-20wvj9q6.js → request-site-em7ed65n.js} +2 -2
- package/dist/chunks/{media-uri-k26h7zjg.js → request-site-exwy1kbj.js} +2 -2
- package/dist/chunks/{media-uri-b1x3j2e8.js → request-site-f3gr6hfv.js} +2 -2
- package/dist/chunks/{media-uri-fvpjvjpp.js → request-site-fvpjvjpp.js} +1 -1
- package/dist/chunks/{media-uri-50kbksvb.js → request-site-g23ffrnz.js} +2 -2
- package/dist/chunks/{media-uri-w13ad1dk.js → request-site-g4964mny.js} +3 -3
- package/dist/chunks/{media-uri-j4at0y5c.js → request-site-j4at0y5c.js} +1 -1
- package/dist/chunks/{media-uri-t62b1gmw.js → request-site-javgytnb.js} +2 -2
- package/dist/chunks/{media-uri-p4zkxzv7.js → request-site-k74zefsg.js} +1 -1
- package/dist/chunks/{media-uri-8n1ypg70.js → request-site-kmwr1xw9.js} +3 -3
- package/dist/chunks/{media-uri-ad35pjas.js → request-site-kshqfq8s.js} +2 -2
- package/dist/chunks/{media-uri-zwmx42kw.js → request-site-mnjcp51m.js} +33 -33
- package/dist/chunks/{media-uri-myqk22k5.js → request-site-myqk22k5.js} +2 -2
- package/dist/chunks/{media-uri-w9jcwh65.js → request-site-mzs0n5xz.js} +7 -7
- package/dist/chunks/{media-uri-p9wp66hf.js → request-site-n2zyxnzr.js} +1 -1
- package/dist/chunks/{media-uri-202t0v28.js → request-site-nswmrzft.js} +14 -9
- package/dist/chunks/{media-uri-wh07bcjv.js → request-site-p3bbq7g3.js} +1 -1
- package/dist/chunks/{media-uri-baxwenvw.js → request-site-pmv5pv9v.js} +4 -4
- package/dist/chunks/{media-uri-8mfdzabk.js → request-site-prwd5gwt.js} +2 -2
- package/dist/chunks/{media-uri-7x6cg3xs.js → request-site-qq3f8fnn.js} +2 -2
- package/dist/chunks/{media-uri-b87bs0cf.js → request-site-rgbnpstw.js} +2 -2
- package/dist/chunks/{media-uri-v0z8pce5.js → request-site-rjhxbsc4.js} +2 -2
- package/dist/chunks/{media-uri-rktygpea.js → request-site-rktygpea.js} +1 -1
- package/dist/chunks/{media-uri-q8jgva1w.js → request-site-rm5kndzh.js} +4 -4
- package/dist/chunks/{media-uri-smaf4a18.js → request-site-rqgv9x42.js} +6 -2
- package/dist/chunks/{media-uri-fyve7tsy.js → request-site-rs6c9pjq.js} +9 -9
- package/dist/chunks/{media-uri-d0advawr.js → request-site-s0zgx365.js} +2 -2
- package/dist/chunks/{media-uri-t32e1bbt.js → request-site-t32e1bbt.js} +1 -1
- package/dist/chunks/{media-uri-s8t5gq7c.js → request-site-whvq72as.js} +3 -3
- package/dist/chunks/{media-uri-4gbck4qg.js → request-site-wsvmph03.js} +2 -2
- package/dist/chunks/{media-uri-7ydfwv45.js → request-site-x2qy7jg1.js} +1 -1
- package/dist/chunks/{media-uri-6t6fd9bq.js → request-site-yc92za0p.js} +2 -2
- package/dist/content-headers.js +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +1 -1
- package/dist/fetch.d.ts +57 -0
- package/dist/fetch.js +63 -61
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/artifact.js +3 -3
- package/dist/handlers/automation.js +2 -2
- package/dist/handlers/blob.js +3 -3
- 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 -8
- package/dist/handlers/generate.js +6 -6
- package/dist/handlers/integration.js +6 -6
- package/dist/handlers/job.js +2 -2
- package/dist/handlers/location.js +6 -6
- package/dist/handlers/machine.js +1 -1
- 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.js +16 -16
- 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.d.ts +3 -1
- package/dist/handlers/session-error.js +4 -2
- 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.js +53 -53
- 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.js +1 -1
- 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 +3 -3
- package/dist/process.js +61 -61
- package/dist/range.js +1 -1
- package/dist/request-site.js +2 -2
- package/dist/request-tracing.js +1 -1
- package/dist/routes.js +57 -57
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +1 -1
- package/dist/workerd.d.ts +20 -2
- package/dist/workerd.js +88 -68
- package/package.json +8 -8
- package/dist/chunks/media-uri-4apj6a8e.js +0 -13
- /package/dist/chunks/{media-uri-017ycvbx.js → request-site-017ycvbx.js} +0 -0
- /package/dist/chunks/{media-uri-9rqn6x4v.js → request-site-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{media-uri-bd8755ek.js → request-site-bd8755ek.js} +0 -0
- /package/dist/chunks/{media-uri-n26yr6pw.js → request-site-n26yr6pw.js} +0 -0
- /package/dist/chunks/{media-uri-q187pxxd.js → request-site-q187pxxd.js} +0 -0
- /package/dist/chunks/{media-uri-q4bn6dy8.js → request-site-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{media-uri-xthc02cw.js → request-site-xthc02cw.js} +0 -0
- /package/dist/chunks/{media-uri-yc7nft6q.js → request-site-yc7nft6q.js} +0 -0
package/dist/api.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./chunks/
|
|
4
|
-
import"./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
3
|
+
} from "./chunks/request-site-whvq72as.js";
|
|
4
|
+
import"./chunks/request-site-ehyp3zqd.js";
|
|
5
|
+
import"./chunks/request-site-ca564221.js";
|
|
6
|
+
import"./chunks/request-site-br4x4prt.js";
|
|
7
|
+
import"./chunks/request-site-rqgv9x42.js";
|
|
8
8
|
export {
|
|
9
9
|
Api2 as Api
|
|
10
10
|
};
|
package/dist/auth.js
CHANGED
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./request-site-br4x4prt.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./request-site-whvq72as.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./request-site-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
runPtySocket2,
|
|
15
15
|
holdLocation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./request-site-q187pxxd.js";
|
|
17
17
|
|
|
18
18
|
// src/handlers/pty.ts
|
|
19
19
|
import { Pty } from "@opencode/core/pty";
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2,
|
|
3
|
+
skillLoadFailed2,
|
|
3
4
|
missingMessage2,
|
|
4
5
|
failedMessageDecode2,
|
|
5
6
|
failedSnapshot2
|
|
6
|
-
} from "./
|
|
7
|
+
} from "./request-site-rqgv9x42.js";
|
|
7
8
|
import {
|
|
8
9
|
locationErrors2
|
|
9
|
-
} from "./
|
|
10
|
+
} from "./request-site-br4x4prt.js";
|
|
10
11
|
import {
|
|
11
12
|
Api2
|
|
12
|
-
} from "./
|
|
13
|
+
} from "./request-site-whvq72as.js";
|
|
13
14
|
import {
|
|
14
15
|
wantsMediaRefs2
|
|
15
|
-
} from "./
|
|
16
|
+
} from "./request-site-xthc02cw.js";
|
|
16
17
|
|
|
17
18
|
// src/handlers/session.ts
|
|
18
19
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -172,7 +173,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
172
173
|
}).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.PromptConflictError", (error) => Effect.fail(new ConflictError({
|
|
173
174
|
message: `Prompt message ID conflicts with an existing durable record: ${error.messageID}`,
|
|
174
175
|
resource: error.messageID
|
|
175
|
-
}))), Effect.catchTag("Session.AttachmentError", (error) => Effect.fail(new InvalidRequestError({ message: error.message, field: "files" }))), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new InvalidRequestError({ message: `Skill not found: ${error.skill}`, field: "skills" }))), locationErrors2)
|
|
176
|
+
}))), Effect.catchTag("Session.AttachmentError", (error) => Effect.fail(new InvalidRequestError({ message: error.message, field: "files" }))), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new InvalidRequestError({ message: `Skill not found: ${error.skill}`, field: "skills" }))), Effect.catchTag("Skill.LoadError", skillLoadFailed2), locationErrors2)
|
|
176
177
|
};
|
|
177
178
|
})).handle("session.command", Effect.fn(function* (ctx) {
|
|
178
179
|
yield* session.command({
|
|
@@ -196,7 +197,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
196
197
|
sessionID: ctx.params.sessionID,
|
|
197
198
|
skill: ctx.payload.id,
|
|
198
199
|
resume: ctx.payload.resume
|
|
199
|
-
}).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new SkillNotFoundError({ skill: error.skill, message: `Skill not found: ${error.skill}` }))), locationErrors2);
|
|
200
|
+
}).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new SkillNotFoundError({ skill: error.skill, message: `Skill not found: ${error.skill}` }))), Effect.catchTag("Skill.LoadError", skillLoadFailed2), locationErrors2);
|
|
200
201
|
return HttpApiSchema.NoContent.make();
|
|
201
202
|
})).handle("session.synthetic", Effect.fn(function* (ctx) {
|
|
202
203
|
const data = yield* session.synthetic({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/integration.ts
|
|
9
9
|
import { Integration } from "@opencode/core/integration";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/server-info.ts
|
|
6
6
|
var exports_server_info = {};
|
|
7
7
|
__export(exports_server_info, {
|
|
8
8
|
ServerInfo: () => exports_server_info,
|
|
9
|
-
Service: () =>
|
|
9
|
+
Service: () => Service3,
|
|
10
10
|
connectionURLs: () => connectionURLs2,
|
|
11
|
-
layer: () =>
|
|
11
|
+
layer: () => layer3
|
|
12
12
|
});
|
|
13
13
|
import { Context, Layer } from "effect";
|
|
14
14
|
import { networkInterfaces } from "node:os";
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class Service3 extends Context.Service()("@opencode/server/ServerInfo") {
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return Layer.succeed(
|
|
18
|
+
function layer3(urls, tmp, app = {}) {
|
|
19
|
+
return Layer.succeed(Service3, Service3.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 { Service3, layer3, connectionURLs2, exports_server_info };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
response2
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
|
+
import {
|
|
5
|
+
Api2
|
|
6
|
+
} from "./request-site-whvq72as.js";
|
|
7
|
+
|
|
8
|
+
// src/handlers/skill.ts
|
|
9
|
+
import { Skill } from "@opencode/core/skill";
|
|
10
|
+
import { FileNotFoundError, SkillLoadError, SkillNotFoundError } from "@opencode/protocol/errors";
|
|
11
|
+
import { Effect } from "effect";
|
|
12
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
13
|
+
var SkillHandler2 = HttpApiBuilder.group(Api2, "server.skill", (handlers) => handlers.handle("skill.list", () => response2(Skill.Service.use((skill) => skill.list()))).handle("skill.file", (ctx) => Effect.gen(function* () {
|
|
14
|
+
const skills = yield* Skill.Service;
|
|
15
|
+
const raw = new URL(ctx.request.url, "http://localhost").pathname.split("/").slice(6).join("/");
|
|
16
|
+
const file = yield* Effect.try({
|
|
17
|
+
try: () => decodeURIComponent(raw),
|
|
18
|
+
catch: () => new FileNotFoundError({ path: raw, message: `File not found: ${raw}` })
|
|
19
|
+
});
|
|
20
|
+
return yield* skills.read(ctx.params.skillID, file).pipe(Effect.catchTags({
|
|
21
|
+
"Skill.NotFoundError": (error) => Effect.fail(new SkillNotFoundError({ skill: ctx.params.skillID, message: `Skill not found: ${error.skill}` })),
|
|
22
|
+
"Skill.FileNotFoundError": (error) => Effect.fail(new FileNotFoundError({ path: error.file, message: `File not found: ${error.file}` })),
|
|
23
|
+
"Skill.LoadError": (error) => Effect.fail(new SkillLoadError({ skill: ctx.params.skillID, message: error.message }))
|
|
24
|
+
}));
|
|
25
|
+
})));
|
|
26
|
+
|
|
27
|
+
export { SkillHandler2 };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/reference.ts
|
|
9
9
|
import { Reference } from "@opencode/core/reference";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.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
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-whvq72as.js";
|
|
4
4
|
import {
|
|
5
5
|
requireConnectable2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-2tmcamrc.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/credential.ts
|
|
9
9
|
import { Credential } from "@opencode/core/credential";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-rqgv9x42.js";
|
|
4
4
|
|
|
5
5
|
// src/location.ts
|
|
6
6
|
import { FileSystem } from "@opencode/core/filesystem";
|
|
@@ -51,7 +51,7 @@ function decode(input) {
|
|
|
51
51
|
return input;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
var
|
|
54
|
+
var layer4 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
|
|
55
55
|
const locations = yield* LocationServiceMap.Service;
|
|
56
56
|
return LocationMiddleware2.of((effect) => Effect.gen(function* () {
|
|
57
57
|
const request = yield* HttpServerRequest.HttpServerRequest;
|
|
@@ -59,4 +59,4 @@ var layer3 = Layer.effect(LocationMiddleware2, Effect.gen(function* () {
|
|
|
59
59
|
}));
|
|
60
60
|
}));
|
|
61
61
|
|
|
62
|
-
export { LocationMiddleware2, locationErrors2, response2, sessionInfo2, requestRef2,
|
|
62
|
+
export { LocationMiddleware2, locationErrors2, response2, sessionInfo2, requestRef2, layer4 };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-whvq72as.js";
|
|
4
4
|
import {
|
|
5
5
|
SESSION_TTL_SECONDS2,
|
|
6
6
|
Config2,
|
|
7
7
|
issueSession2,
|
|
8
8
|
sessionCookieName2
|
|
9
|
-
} from "./
|
|
10
|
-
import {
|
|
11
|
-
Service4
|
|
12
|
-
} from "./media-uri-7dtbad8d.js";
|
|
9
|
+
} from "./request-site-j4at0y5c.js";
|
|
13
10
|
import {
|
|
14
11
|
Service3
|
|
15
|
-
} from "./
|
|
12
|
+
} from "./request-site-3te71694.js";
|
|
13
|
+
import {
|
|
14
|
+
Service4
|
|
15
|
+
} from "./request-site-mzs0n5xz.js";
|
|
16
16
|
|
|
17
17
|
// src/handlers/server.ts
|
|
18
18
|
import { hostname } from "node:os";
|
|
@@ -22,10 +22,10 @@ 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
|
-
const info = yield*
|
|
28
|
+
const info = yield* Service3;
|
|
29
29
|
return {
|
|
30
30
|
version: info.app.version ?? "unknown",
|
|
31
31
|
pid: process.pid ?? 0,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestRef2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/debug.ts
|
|
9
9
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
2
|
+
layer4
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
formLocationLayer2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-ca564221.js";
|
|
7
7
|
import {
|
|
8
8
|
sessionLocationLayer2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./request-site-ehyp3zqd.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./request-site-whvq72as.js";
|
|
13
13
|
import {
|
|
14
14
|
Config2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./request-site-j4at0y5c.js";
|
|
16
16
|
import {
|
|
17
17
|
CorsConfig2
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./request-site-q4bn6dy8.js";
|
|
19
19
|
import {
|
|
20
|
-
|
|
21
|
-
} from "./
|
|
20
|
+
layer3
|
|
21
|
+
} from "./request-site-3te71694.js";
|
|
22
22
|
import {
|
|
23
23
|
node2
|
|
24
|
-
} from "./
|
|
24
|
+
} from "./request-site-mzs0n5xz.js";
|
|
25
25
|
import {
|
|
26
26
|
handlers2
|
|
27
|
-
} from "./
|
|
27
|
+
} from "./request-site-mnjcp51m.js";
|
|
28
28
|
import {
|
|
29
29
|
authorizationLayer2
|
|
30
|
-
} from "./
|
|
30
|
+
} from "./request-site-rktygpea.js";
|
|
31
31
|
import {
|
|
32
32
|
schemaErrorLayer2
|
|
33
|
-
} from "./
|
|
33
|
+
} from "./request-site-bd8755ek.js";
|
|
34
34
|
import {
|
|
35
35
|
defectResponseLayer2
|
|
36
|
-
} from "./
|
|
36
|
+
} from "./request-site-n26yr6pw.js";
|
|
37
37
|
|
|
38
38
|
// src/routes.ts
|
|
39
39
|
import { Database } from "@opencode/core/database/database";
|
|
@@ -192,8 +192,8 @@ function makeRoutes(password, options, serviceURLs, overrides, instances) {
|
|
|
192
192
|
})) : build(overrides);
|
|
193
193
|
return serviceLayer.pipe(Layer.flatMap((context) => {
|
|
194
194
|
const services = Layer.succeedContext(context);
|
|
195
|
-
const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)),
|
|
196
|
-
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(
|
|
195
|
+
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));
|
|
196
|
+
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), Layer.tap((context) => Effect.sync(() => {
|
|
197
197
|
internal = Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(HttpEffect.toWebHandlerWith(context));
|
|
198
198
|
})));
|
|
199
199
|
return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/plugin.ts
|
|
9
9
|
import { Plugin } from "@opencode/core/plugin";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/agent.ts
|
|
9
9
|
import { Agent } from "@opencode/core/agent";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-whvq72as.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/shell.ts
|
|
9
9
|
import { Shell } from "@opencode/core/shell";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
download2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-t32e1bbt.js";
|
|
4
4
|
import {
|
|
5
5
|
parse2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./request-site-8sb6qqpn.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/blob.ts
|
|
9
9
|
import { BlobStore } from "@opencode/core/blob-store";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2,
|
|
3
3
|
failedMessageDecode2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./request-site-rqgv9x42.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./request-site-whvq72as.js";
|
|
8
8
|
import {
|
|
9
9
|
wantsMediaRefs2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./request-site-xthc02cw.js";
|
|
11
11
|
|
|
12
12
|
// src/handlers/message.ts
|
|
13
13
|
import { SessionMessage } from "@opencode/core/session/message";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-rqgv9x42.js";
|
|
4
4
|
import {
|
|
5
5
|
locationErrors2,
|
|
6
6
|
response2,
|
|
7
7
|
requestRef2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./request-site-br4x4prt.js";
|
|
9
9
|
|
|
10
10
|
// src/handlers/artifact.ts
|
|
11
11
|
import { Artifact } from "@opencode/core/artifact";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-rqgv9x42.js";
|
|
4
4
|
import {
|
|
5
5
|
locationErrors2,
|
|
6
6
|
response2,
|
|
7
7
|
sessionInfo2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./request-site-br4x4prt.js";
|
|
9
9
|
import {
|
|
10
10
|
Api2
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./request-site-whvq72as.js";
|
|
12
12
|
|
|
13
13
|
// src/handlers/permission.ts
|
|
14
14
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./request-site-whvq72as.js";
|
|
4
4
|
import {
|
|
5
5
|
Service2,
|
|
6
6
|
frame2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./request-site-fvpjvjpp.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/event.ts
|
|
10
10
|
import { Event } from "@opencode/schema/event";
|