@opencode/server 2.3.2 → 2.4.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 +249 -1
- package/dist/api.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/{media-uri-tbqv89f6.js → content-headers-0r476wkb.js} +5 -5
- package/dist/chunks/content-headers-0rzj25w4.js +194 -0
- package/dist/chunks/{media-uri-rha2aq18.js → content-headers-100nc7c0.js} +2 -5
- package/dist/chunks/{media-uri-wmep189j.js → content-headers-1r438we2.js} +4 -4
- package/dist/chunks/{media-uri-f559fakr.js → content-headers-2cm4dfcc.js} +2 -2
- package/dist/chunks/{media-uri-6z9pvq7p.js → content-headers-2dzr03as.js} +1 -1
- package/dist/chunks/{media-uri-1gwc8nvb.js → content-headers-2rb1ee6g.js} +3 -3
- package/dist/chunks/{media-uri-39nnfjx1.js → content-headers-39nnfjx1.js} +1 -1
- package/dist/chunks/{media-uri-8mj7kvhm.js → content-headers-4fc68szf.js} +2 -2
- package/dist/chunks/{media-uri-a8jcac9a.js → content-headers-4zkx9wb3.js} +1 -1
- package/dist/chunks/{media-uri-4q6e7fh8.js → content-headers-5jm9kajg.js} +2 -2
- package/dist/chunks/{media-uri-cmnrxx36.js → content-headers-7jm4dc4a.js} +2 -2
- package/dist/chunks/{media-uri-p86kew8c.js → content-headers-7qpea5x7.js} +2 -2
- package/dist/chunks/{media-uri-78rcgzsr.js → content-headers-7ydfwv45.js} +4 -1
- package/dist/chunks/{media-uri-qd0r787n.js → content-headers-801prsqk.js} +2 -2
- package/dist/chunks/{media-uri-kkdkqt8j.js → content-headers-8ja97vv6.js} +2 -4
- package/dist/chunks/{media-uri-8sb6qqpn.js → content-headers-8sb6qqpn.js} +1 -1
- package/dist/chunks/{media-uri-9cd3a4b8.js → content-headers-9cd3a4b8.js} +1 -1
- package/dist/chunks/{media-uri-yk755swr.js → content-headers-9t07vtvz.js} +5 -4
- package/dist/chunks/{media-uri-htyf2qs7.js → content-headers-ah2sj2pr.js} +1 -1
- package/dist/chunks/{media-uri-1h6b4sc5.js → content-headers-b03d5rht.js} +6 -18
- package/dist/chunks/{media-uri-cezwbsk5.js → content-headers-d20xfnpc.js} +1 -1
- package/dist/chunks/{media-uri-n0chxnkn.js → content-headers-ddrpmftb.js} +4 -4
- package/dist/chunks/{media-uri-djr0jy89.js → content-headers-djr0jy89.js} +1 -1
- package/dist/chunks/{media-uri-sssj0qa5.js → content-headers-fjcqsaaz.js} +44 -17
- package/dist/chunks/{media-uri-cr5sd8bz.js → content-headers-g23ffrnz.js} +3 -3
- package/dist/chunks/{media-uri-btahnm2b.js → content-headers-gq4jwh93.js} +3 -3
- package/dist/chunks/{media-uri-z9zyd4qg.js → content-headers-hf3kgjhr.js} +4 -4
- package/dist/chunks/{media-uri-91858wp1.js → content-headers-hk9crnsa.js} +2 -2
- package/dist/chunks/{media-uri-myqk22k5.js → content-headers-hmwn16zp.js} +2 -2
- package/dist/chunks/{media-uri-b4rhnd07.js → content-headers-hnbeyfax.js} +15 -9
- package/dist/chunks/{media-uri-j4at0y5c.js → content-headers-j4at0y5c.js} +1 -1
- package/dist/chunks/{media-uri-6kawhtwy.js → content-headers-jhbndf2d.js} +4 -4
- package/dist/chunks/{media-uri-ny1j968n.js → content-headers-jmmhprac.js} +2 -2
- package/dist/chunks/{media-uri-ssxxka7j.js → content-headers-ky9xhfwk.js} +4 -4
- package/dist/chunks/{media-uri-3pb3n73h.js → content-headers-mvp6540g.js} +33 -33
- package/dist/chunks/{media-uri-mzs0n5xz.js → content-headers-mzs0n5xz.js} +1 -1
- package/dist/chunks/{media-uri-az0609r6.js → content-headers-p83m65n5.js} +2 -4
- package/dist/chunks/{media-uri-zcvan105.js → content-headers-prn0chz2.js} +1 -1
- package/dist/chunks/{media-uri-qfyg9gb7.js → content-headers-qfyg9gb7.js} +1 -1
- package/dist/chunks/{media-uri-2eaky32g.js → content-headers-r40v995e.js} +2 -2
- package/dist/chunks/{media-uri-7b9xm1qg.js → content-headers-rktygpea.js} +4 -1
- package/dist/chunks/{media-uri-5cpb32hf.js → content-headers-rmfb1myj.js} +1 -1
- package/dist/chunks/{media-uri-d0edqfxx.js → content-headers-s3zgwc17.js} +3 -6
- package/dist/chunks/{media-uri-t32e1bbt.js → content-headers-t32e1bbt.js} +1 -1
- package/dist/chunks/{media-uri-b3bmdkga.js → content-headers-vw0q3knq.js} +1 -1
- package/dist/chunks/{media-uri-rs3v36hp.js → content-headers-w3xmknp7.js} +2 -2
- package/dist/chunks/{media-uri-te8jwba1.js → content-headers-wka57cdm.js} +2 -2
- package/dist/chunks/{media-uri-qcg3sqtb.js → content-headers-y60jfeab.js} +2 -2
- package/dist/chunks/{media-uri-09kw3a77.js → content-headers-ykk3p1r3.js} +2 -2
- package/dist/chunks/{media-uri-enp1bp7r.js → content-headers-yty6dk04.js} +1 -1
- package/dist/chunks/{media-uri-50bbk3b2.js → content-headers-ywn523ee.js} +3 -11
- package/dist/chunks/{media-uri-z3e7v67k.js → content-headers-z3e7v67k.js} +1 -1
- package/dist/chunks/{media-uri-j87xz9bt.js → content-headers-zjmacp9c.js} +3 -3
- package/dist/content-headers.js +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +1 -1
- package/dist/fetch.js +60 -59
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/artifact.js +3 -3
- package/dist/handlers/automation.d.ts +1 -1
- 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.d.ts +1 -1
- 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.d.ts +13 -1
- package/dist/handlers/job.js +2 -2
- package/dist/handlers/location.js +6 -6
- package/dist/handlers/machine.d.ts +95 -0
- package/dist/handlers/machine.js +18 -0
- 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 +16 -15
- 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 +53 -52
- package/dist/location.d.ts +1 -3
- package/dist/location.js +2 -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 +1 -1
- package/dist/process.js +72 -63
- package/dist/range.js +1 -1
- package/dist/request-site.js +2 -2
- package/dist/request-tracing.js +1 -1
- package/dist/routes.d.ts +6 -2
- package/dist/routes.js +57 -56
- package/dist/server-info.js +1 -1
- package/dist/service-status.js +1 -1
- package/dist/workerd.js +63 -60
- package/package.json +8 -8
- /package/dist/chunks/{media-uri-9rqn6x4v.js → content-headers-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{media-uri-bd8755ek.js → content-headers-bd8755ek.js} +0 -0
- /package/dist/chunks/{media-uri-n26yr6pw.js → content-headers-n26yr6pw.js} +0 -0
- /package/dist/chunks/{media-uri-q187pxxd.js → content-headers-q187pxxd.js} +0 -0
- /package/dist/chunks/{media-uri-q4bn6dy8.js → content-headers-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{media-uri-smaf4a18.js → content-headers-smaf4a18.js} +0 -0
- /package/dist/chunks/{media-uri-xthc02cw.js → content-headers-xthc02cw.js} +0 -0
- /package/dist/chunks/{media-uri-yc7nft6q.js → content-headers-yc7nft6q.js} +0 -0
package/dist/handlers/command.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CommandHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-5jm9kajg.js";
|
|
4
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
5
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
6
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
7
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
8
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
CommandHandler2 as CommandHandler
|
|
11
11
|
};
|
package/dist/handlers/config.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConfigHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-d20xfnpc.js";
|
|
4
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
5
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
6
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
7
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
8
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
ConfigHandler2 as ConfigHandler
|
|
11
11
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Credential } from "@opencode/core/credential";
|
|
2
2
|
import { LocationServiceMap } from "@opencode/core/location-services";
|
|
3
3
|
import { Global } from "@opencode/util/global";
|
|
4
|
-
export declare const CredentialHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.credential">, never, Global.Service | LocationServiceMap.Service | (import("@opencode/protocol/middleware/authorization").Authorization | import("
|
|
4
|
+
export declare const CredentialHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.credential">, never, import("effect/http/HttpRouter").Request<"Requires", Credential.Service> | Global.Service | LocationServiceMap.Service | (import("@opencode/protocol/middleware/authorization").Authorization | import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware)>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CredentialHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
9
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-9t07vtvz.js";
|
|
4
|
+
import"../chunks/content-headers-hk9crnsa.js";
|
|
5
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
6
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
7
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
8
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
9
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
10
10
|
export {
|
|
11
11
|
CredentialHandler2 as CredentialHandler
|
|
12
12
|
};
|
package/dist/handlers/debug.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DebugHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-y60jfeab.js";
|
|
4
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
5
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
6
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
7
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
8
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
DebugHandler2 as DebugHandler
|
|
11
11
|
};
|
package/dist/handlers/event.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EventHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
9
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-7jm4dc4a.js";
|
|
4
|
+
import"../chunks/content-headers-qfyg9gb7.js";
|
|
5
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
6
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
7
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
8
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
9
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
10
10
|
export {
|
|
11
11
|
EventHandler2 as EventHandler
|
|
12
12
|
};
|
package/dist/handlers/form.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FormHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-2cm4dfcc.js";
|
|
4
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
5
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
6
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
7
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
8
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
FormHandler2 as FormHandler
|
|
11
11
|
};
|
package/dist/handlers/fs.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FileSystemHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
9
|
-
import"../chunks/
|
|
10
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-ddrpmftb.js";
|
|
4
|
+
import"../chunks/content-headers-8sb6qqpn.js";
|
|
5
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
6
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
7
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
8
|
+
import"../chunks/content-headers-t32e1bbt.js";
|
|
9
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
10
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
11
11
|
export {
|
|
12
12
|
FileSystemHandler2 as FileSystemHandler
|
|
13
13
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GenerateHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-b03d5rht.js";
|
|
4
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
5
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
6
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
7
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
8
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
GenerateHandler2 as GenerateHandler
|
|
11
11
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requireConnectable2,
|
|
3
3
|
IntegrationHandler2
|
|
4
|
-
} from "../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
9
|
-
import"../chunks/
|
|
4
|
+
} from "../chunks/content-headers-hk9crnsa.js";
|
|
5
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
6
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
7
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
8
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
9
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
10
10
|
export {
|
|
11
11
|
IntegrationHandler2 as IntegrationHandler,
|
|
12
12
|
requireConnectable2 as requireConnectable
|
package/dist/handlers/job.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Effect } from "effect";
|
|
|
5
5
|
export declare const makeJob: Effect.Effect<{
|
|
6
6
|
list: (query: {
|
|
7
7
|
readonly sessionID?: (string & import("effect/Brand").Brand<"SessionID">) | undefined;
|
|
8
|
-
readonly kind?: "codemode" | "image" | "shell" | "subagent" | undefined;
|
|
8
|
+
readonly kind?: "codemode" | "image" | "shell" | "subagent" | "video" | undefined;
|
|
9
9
|
readonly status?: "cancelled" | "completed" | "error" | "running" | undefined;
|
|
10
10
|
readonly descendants?: boolean | undefined;
|
|
11
11
|
}) => Effect.Effect<{
|
|
@@ -46,6 +46,17 @@ export declare const makeJob: Effect.Effect<{
|
|
|
46
46
|
readonly kind: "image";
|
|
47
47
|
readonly path: string;
|
|
48
48
|
readonly model: string;
|
|
49
|
+
} | {
|
|
50
|
+
readonly id: string;
|
|
51
|
+
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
52
|
+
readonly status: "cancelled" | "completed" | "error" | "running";
|
|
53
|
+
readonly title?: string | undefined;
|
|
54
|
+
readonly time: {
|
|
55
|
+
readonly started: number;
|
|
56
|
+
readonly completed?: number | undefined;
|
|
57
|
+
};
|
|
58
|
+
readonly kind: "video";
|
|
59
|
+
readonly path: string;
|
|
49
60
|
} | {
|
|
50
61
|
readonly id: string;
|
|
51
62
|
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
@@ -58,4 +69,5 @@ export declare const makeJob: Effect.Effect<{
|
|
|
58
69
|
readonly kind: "codemode";
|
|
59
70
|
})[];
|
|
60
71
|
}, import("@opencode/protocol/errors").SessionNotFoundError, never>;
|
|
72
|
+
cancel: (id: string) => Effect.Effect<void, never, never>;
|
|
61
73
|
}, never, Job.Service | Session.Service>;
|
package/dist/handlers/job.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocationHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-prn0chz2.js";
|
|
4
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
5
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
6
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
7
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
8
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
LocationHandler2 as LocationHandler
|
|
11
11
|
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { type WebSocket, WebSocketServer } from "@effect/platform-node-shared/NodeWS";
|
|
2
|
+
import { LocationServiceMap } from "@opencode/core/location-services";
|
|
3
|
+
import { Identity } from "@opencode/core/machine/identity";
|
|
4
|
+
import { Link } from "@opencode/core/machine/link";
|
|
5
|
+
import { Machines } from "@opencode/core/machine/machines";
|
|
6
|
+
import { ConflictError, ForbiddenError, InvalidRequestError, MachineNotFoundError } from "@opencode/protocol/errors";
|
|
7
|
+
import { Global } from "@opencode/util/global";
|
|
8
|
+
import { Context, Effect, Scope } from "effect";
|
|
9
|
+
import { type HttpServerRequest, HttpServerResponse } from "effect/http";
|
|
10
|
+
import { Socket } from "effect/socket";
|
|
11
|
+
import { IncomingMessage } from "node:http";
|
|
12
|
+
/**
|
|
13
|
+
* Only for tests, as `Link.Fixed` is: called with the endpoint's `ws` server when it is made, so a test can count its
|
|
14
|
+
* clients and watch a socket from the home's side. Production never sets it.
|
|
15
|
+
*/
|
|
16
|
+
export declare const Watch: Context.Reference<(sockets: WebSocketServer) => void>;
|
|
17
|
+
/** Whether the `machines` flag is on in the server's base configuration, where the video routes read theirs. */
|
|
18
|
+
export declare const machinesEnabled: Effect.Effect<Effect.Effect<boolean, never, never>, never, Global.Service | LocationServiceMap.Service>;
|
|
19
|
+
/**
|
|
20
|
+
* Upgrades a request the HTTP server took off its parser, on the endpoint's own `ws` server, and gives its `ws` socket
|
|
21
|
+
* for the scope. Closing the scope sends the close and waits until the connection is gone, dropping it if the peer has
|
|
22
|
+
* not answered within `CLOSING`: the HTTP response the route returns afterwards must find nothing to be written to.
|
|
23
|
+
*/
|
|
24
|
+
export declare const upgrade: (sockets: WebSocketServer, request: IncomingMessage) => Effect.Effect<WebSocket, Link.Closed, Scope.Scope>;
|
|
25
|
+
/** What the carrier and the keepalive use of a `ws` socket. */
|
|
26
|
+
export interface Transport {
|
|
27
|
+
readonly bufferedAmount: number;
|
|
28
|
+
/** Whether reading is stopped because enough already waits unread. Nothing the peer sends is seen meanwhile. */
|
|
29
|
+
readonly isPaused: boolean;
|
|
30
|
+
/** Calls back once the socket has taken the message, or cannot. */
|
|
31
|
+
send(message: Uint8Array, taken: () => void): void;
|
|
32
|
+
ping(): void;
|
|
33
|
+
on(event: "pong" | "ping" | "message", listener: () => void): unknown;
|
|
34
|
+
off(event: "pong" | "ping" | "message", listener: () => void): unknown;
|
|
35
|
+
/** Drops the connection at once, sending nothing more. */
|
|
36
|
+
terminate(): void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A `ws` socket as the link's carrier, read through Effect's reader. A text message ends it like a closed socket, before
|
|
40
|
+
* anything is decrypted: the caller closes the socket. Inbound memory is bounded by the socket: `ws` refuses a message
|
|
41
|
+
* over `MAX_FRAME` before buffering it, `upgrade` drops the connection on one under `MIN_FRAME`, and the reader stops
|
|
42
|
+
* reading once 64 KiB waits, so what is held is that and what one read of the connection brings, and a read that still
|
|
43
|
+
* brings more than `MAX_WAITING` ends the carrier. `send` returns once the socket has taken the message, so the link's
|
|
44
|
+
* one writer never has more than a frame waiting behind a slow peer, and it drops a socket that takes nothing at all
|
|
45
|
+
* for `STALL`.
|
|
46
|
+
*/
|
|
47
|
+
export declare const carrier: (reader: Socket.Reader, transport: Transport) => Link.Carrier;
|
|
48
|
+
/**
|
|
49
|
+
* The idle limit of a served link: pings the peer every `PING` and drops the connection once a whole interval passes
|
|
50
|
+
* with nothing from it. Its answer counts, and so does anything else it sent. While reading is paused none of that can
|
|
51
|
+
* be seen, so an interval is held against the peer only if reading was paused at neither end of it. That covers a
|
|
52
|
+
* pause in between as well: reading pauses on a message, and a message is the peer heard.
|
|
53
|
+
*/
|
|
54
|
+
export declare const keepalive: (transport: Transport) => Effect.Effect<void, never, never>;
|
|
55
|
+
/**
|
|
56
|
+
* `machine.link` in the `server.experimental` group: the WebSocket where a machine's link lands. Anyone who can reach
|
|
57
|
+
* the server can open it, and only the link's handshake gets past it. One scope per connection holds the socket and the
|
|
58
|
+
* link's fibers, and closing it is the only way a connection ends, whatever ended it. The first request shaped like a
|
|
59
|
+
* link upgrade reads the flag from the server's base configuration, which loads that configuration once even when the
|
|
60
|
+
* flag is off; only a GET WebSocket upgrade to exactly this path does.
|
|
61
|
+
*/
|
|
62
|
+
export declare const makeMachineLink: Effect.Effect<(request: HttpServerRequest.HttpServerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, never, HttpServerRequest.HttpServerRequest>, never, Scope.Scope | Global.Service | Identity.Service | Machines.Service | LocationServiceMap.Service>;
|
|
63
|
+
/**
|
|
64
|
+
* `machine.*` HTTP routes in the `server.experimental` group. Every route needs the `machines` flag.
|
|
65
|
+
*
|
|
66
|
+
* The home's Iroh endpoint is bound the first time it is needed and kept for the routes' scope: when a join string is
|
|
67
|
+
* made, and at start when the flag is on and there are machines to come back. Until then the binding is not imported.
|
|
68
|
+
* Without it, logged once, join strings carry only their URLs.
|
|
69
|
+
*/
|
|
70
|
+
export declare const makeMachine: Effect.Effect<{
|
|
71
|
+
list: () => Effect.Effect<{
|
|
72
|
+
data: readonly Machines.Info[];
|
|
73
|
+
}, ForbiddenError, never>;
|
|
74
|
+
add: (payload: {
|
|
75
|
+
readonly name: string;
|
|
76
|
+
readonly reach: readonly {
|
|
77
|
+
readonly type: "url";
|
|
78
|
+
readonly url: string;
|
|
79
|
+
}[];
|
|
80
|
+
readonly replace?: boolean | undefined;
|
|
81
|
+
}) => Effect.Effect<{
|
|
82
|
+
data: {
|
|
83
|
+
name: string & import("effect/Brand").Brand<"Environment.ID">;
|
|
84
|
+
join: string;
|
|
85
|
+
expires: number;
|
|
86
|
+
reach: ({
|
|
87
|
+
readonly type: "url";
|
|
88
|
+
readonly url: string;
|
|
89
|
+
} | {
|
|
90
|
+
readonly type: "iroh";
|
|
91
|
+
})[];
|
|
92
|
+
};
|
|
93
|
+
}, ConflictError | ForbiddenError | InvalidRequestError | MachineNotFoundError, never>;
|
|
94
|
+
remove: (name: string) => Effect.Effect<void, ForbiddenError | MachineNotFoundError, never>;
|
|
95
|
+
}, never, Scope.Scope | Global.Service | Identity.Service | Machines.Service | LocationServiceMap.Service>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Watch2,
|
|
3
|
+
machinesEnabled2,
|
|
4
|
+
upgrade2,
|
|
5
|
+
carrier2,
|
|
6
|
+
keepalive2,
|
|
7
|
+
makeMachineLink2,
|
|
8
|
+
makeMachine2
|
|
9
|
+
} from "../chunks/content-headers-0rzj25w4.js";
|
|
10
|
+
export {
|
|
11
|
+
Watch2 as Watch,
|
|
12
|
+
carrier2 as carrier,
|
|
13
|
+
keepalive2 as keepalive,
|
|
14
|
+
machinesEnabled2 as machinesEnabled,
|
|
15
|
+
makeMachine2 as makeMachine,
|
|
16
|
+
makeMachineLink2 as makeMachineLink,
|
|
17
|
+
upgrade2 as upgrade
|
|
18
|
+
};
|
package/dist/handlers/mcp.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
McpHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
9
|
-
import"../chunks/
|
|
10
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-hf3kgjhr.js";
|
|
4
|
+
import"../chunks/content-headers-q187pxxd.js";
|
|
5
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
6
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
7
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
8
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
9
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
10
|
+
import"../chunks/content-headers-q4bn6dy8.js";
|
|
11
11
|
export {
|
|
12
12
|
McpHandler2 as McpHandler
|
|
13
13
|
};
|
package/dist/handlers/media.js
CHANGED
package/dist/handlers/message.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MessageHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
9
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-2rb1ee6g.js";
|
|
4
|
+
import"../chunks/content-headers-xthc02cw.js";
|
|
5
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
6
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
7
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
8
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
9
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
10
10
|
export {
|
|
11
11
|
MessageHandler2 as MessageHandler
|
|
12
12
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MigrationHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-2dzr03as.js";
|
|
4
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
5
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
6
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
7
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
8
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
MigrationHandler2 as MigrationHandler
|
|
11
11
|
};
|
package/dist/handlers/model.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ModelHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-100nc7c0.js";
|
|
4
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
5
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
6
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
7
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
8
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
ModelHandler2 as ModelHandler
|
|
11
11
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PermissionHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-gq4jwh93.js";
|
|
4
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
5
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
6
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
7
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
8
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
PermissionHandler2 as PermissionHandler
|
|
11
11
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
2
2
|
import { PtyTicket } from "@opencode/core/pty/ticket";
|
|
3
|
-
export declare const PersistentPtyHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.experimental">, never, import("@opencode/util/fs-util").FSUtil.Service | import("@opencode/core/database/database").Service | import("@opencode/core/kv").Service | import("@opencode/core/job").Service | import("@opencode/core/
|
|
3
|
+
export declare const PersistentPtyHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.experimental">, never, import("@opencode/protocol/middleware/authorization").Authorization | import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware | import("@opencode/util/fs-util").FSUtil.Service | import("@opencode/util/global").Service | import("@opencode/core/database/database").Service | import("@opencode/core/kv").Service | import("@opencode/core/job").Service | import("@opencode/core/machine/identity").Service | import("@opencode/core/machine/machines").Service | import("@opencode/core/location-service-map").Service | PersistentPty.Service | import("@opencode/core/session").Service | import("@opencode/core/blob-store").Service | import("@opencode/core/automation").Service | import("@opencode/core/project").Service | PtyTicket.Service>;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PersistentPtyHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../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/
|
|
3
|
+
} from "../chunks/content-headers-hnbeyfax.js";
|
|
4
|
+
import"../chunks/content-headers-7qpea5x7.js";
|
|
5
|
+
import"../chunks/content-headers-9cd3a4b8.js";
|
|
6
|
+
import"../chunks/content-headers-q187pxxd.js";
|
|
7
|
+
import"../chunks/content-headers-0rzj25w4.js";
|
|
8
|
+
import"../chunks/content-headers-7ydfwv45.js";
|
|
9
|
+
import"../chunks/content-headers-g23ffrnz.js";
|
|
10
|
+
import"../chunks/content-headers-djr0jy89.js";
|
|
11
|
+
import"../chunks/content-headers-8sb6qqpn.js";
|
|
12
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
13
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
14
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
15
|
+
import"../chunks/content-headers-t32e1bbt.js";
|
|
16
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
17
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
18
|
+
import"../chunks/content-headers-q4bn6dy8.js";
|
|
18
19
|
export {
|
|
19
20
|
PersistentPtyHandler2 as PersistentPtyHandler
|
|
20
21
|
};
|
package/dist/handlers/plugin.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PluginHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-r40v995e.js";
|
|
4
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
5
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
6
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
7
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
8
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
PluginHandler2 as PluginHandler
|
|
11
11
|
};
|
package/dist/handlers/project.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProjectHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-4zkx9wb3.js";
|
|
4
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
5
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
6
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
7
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
8
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
ProjectHandler2 as ProjectHandler
|
|
11
11
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProviderHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/content-headers-p83m65n5.js";
|
|
4
|
+
import"../chunks/content-headers-zjmacp9c.js";
|
|
5
|
+
import"../chunks/content-headers-vw0q3knq.js";
|
|
6
|
+
import"../chunks/content-headers-ah2sj2pr.js";
|
|
7
|
+
import"../chunks/content-headers-ywn523ee.js";
|
|
8
|
+
import"../chunks/content-headers-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
ProviderHandler2 as ProviderHandler
|
|
11
11
|
};
|