@opencode/server 0.0.0-dev-1359 → 0.0.0-dev-1361
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 +171 -2
- package/dist/api.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/{api-0wjm8gvs.js → cors-0wjm8gvs.js} +2 -2
- package/dist/chunks/{api-10sj2tcf.js → cors-10sj2tcf.js} +1 -1
- package/dist/chunks/{api-8fhq523v.js → cors-1z9qd4y2.js} +4 -4
- package/dist/chunks/{api-29nx48hm.js → cors-29nx48hm.js} +1 -1
- package/dist/chunks/{api-2tmcamrc.js → cors-2tmcamrc.js} +2 -2
- package/dist/chunks/{api-4aa8a7eb.js → cors-3cx4ac5j.js} +19 -15
- package/dist/chunks/{api-74nxvsrn.js → cors-3xkwxcke.js} +7 -4
- package/dist/chunks/cors-5fn432p6.js +44 -0
- package/dist/chunks/{api-3te71694.js → cors-5pdfedjd.js} +4 -4
- package/dist/chunks/{api-g1xn52zf.js → cors-6cmsxt3d.js} +6 -6
- package/dist/chunks/{api-6pm6ek88.js → cors-6pm6ek88.js} +1 -1
- package/dist/chunks/{api-7dkb5ks8.js → cors-7dkb5ks8.js} +2 -2
- package/dist/chunks/{api-8nezxn08.js → cors-8nezxn08.js} +1 -1
- package/dist/chunks/{api-8qsq6tbs.js → cors-8qsq6tbs.js} +2 -2
- package/dist/chunks/{api-8sb6qqpn.js → cors-8sb6qqpn.js} +1 -1
- package/dist/chunks/{api-8xdajgpr.js → cors-8xdajgpr.js} +2 -2
- package/dist/chunks/{api-9hynp6rm.js → cors-9hynp6rm.js} +2 -2
- package/dist/chunks/{api-am27j67f.js → cors-am27j67f.js} +1 -1
- package/dist/chunks/{api-br4x4prt.js → cors-br4x4prt.js} +1 -1
- package/dist/chunks/{api-ca564221.js → cors-ca564221.js} +1 -1
- package/dist/chunks/{api-csnx1nj3.js → cors-csnx1nj3.js} +2 -2
- package/dist/chunks/{api-djr0jy89.js → cors-djr0jy89.js} +1 -1
- package/dist/chunks/{api-39nnfjx1.js → cors-e6e4kz0w.js} +4 -4
- package/dist/chunks/{api-ehyp3zqd.js → cors-ehyp3zqd.js} +1 -1
- package/dist/chunks/{api-em7ed65n.js → cors-em7ed65n.js} +2 -2
- package/dist/chunks/{api-ba6cev85.js → cors-enx9e1dz.js} +4 -4
- package/dist/chunks/{api-exwy1kbj.js → cors-exwy1kbj.js} +2 -2
- package/dist/chunks/{api-f3gr6hfv.js → cors-f3gr6hfv.js} +2 -2
- package/dist/chunks/{api-0tgs6603.js → cors-fa6nnfxm.js} +39 -36
- package/dist/chunks/{api-g23ffrnz.js → cors-g23ffrnz.js} +2 -2
- package/dist/chunks/{api-ts1fhe9d.js → cors-g4964mny.js} +3 -3
- package/dist/chunks/{api-kshqfq8s.js → cors-hb1ty1t1.js} +7 -8
- package/dist/chunks/{api-j4at0y5c.js → cors-j4at0y5c.js} +1 -1
- package/dist/chunks/{api-javgytnb.js → cors-javgytnb.js} +2 -2
- package/dist/chunks/{api-k74zefsg.js → cors-k74zefsg.js} +1 -1
- package/dist/chunks/{api-343ey9kd.js → cors-ka2mtp6f.js} +2 -2
- package/dist/chunks/{api-kmwr1xw9.js → cors-kmwr1xw9.js} +3 -3
- package/dist/chunks/{api-thpam3yh.js → cors-msvebcy2.js} +8 -8
- package/dist/chunks/{api-myqk22k5.js → cors-myqk22k5.js} +2 -2
- package/dist/chunks/{api-n2zyxnzr.js → cors-n2zyxnzr.js} +1 -1
- package/dist/chunks/{api-1eazfxyk.js → cors-nvb61mgq.js} +4 -4
- package/dist/chunks/{api-p3bbq7g3.js → cors-p3bbq7g3.js} +1 -1
- package/dist/chunks/{api-prwd5gwt.js → cors-prwd5gwt.js} +2 -2
- package/dist/chunks/{api-qq3f8fnn.js → cors-qq3f8fnn.js} +2 -2
- package/dist/chunks/{api-5jwtxv1w.js → cors-qssmdh31.js} +4 -4
- package/dist/chunks/{api-rgbnpstw.js → cors-rgbnpstw.js} +2 -2
- package/dist/chunks/{api-rjhxbsc4.js → cors-rjhxbsc4.js} +2 -2
- package/dist/chunks/{api-s0zgx365.js → cors-s0zgx365.js} +2 -2
- package/dist/chunks/{api-gbjwxtsb.js → cors-sv3a4xc1.js} +16 -12
- package/dist/chunks/{api-t32e1bbt.js → cors-t32e1bbt.js} +1 -1
- package/dist/chunks/{api-mzs0n5xz.js → cors-v9t81kwn.js} +8 -8
- package/dist/chunks/cors-w6xb5z15.js +196 -0
- package/dist/chunks/{api-whvq72as.js → cors-whvq72as.js} +3 -3
- package/dist/chunks/{api-wsvmph03.js → cors-wsvmph03.js} +2 -2
- package/dist/chunks/{api-x2qy7jg1.js → cors-x2qy7jg1.js} +1 -1
- package/dist/chunks/{api-yc92za0p.js → cors-yc92za0p.js} +2 -2
- package/dist/chunks/{api-fvpjvjpp.js → cors-z5c20bjd.js} +31 -14
- package/dist/content-headers.js +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.d.ts +14 -2
- package/dist/event-feed.js +5 -5
- package/dist/fetch.d.ts +1 -1
- package/dist/fetch.js +67 -65
- 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/experimental/browser-tunnel.js +4 -4
- package/dist/handlers/flag.js +6 -6
- 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.d.ts +1 -1
- package/dist/handlers/persistent-pty.js +20 -18
- 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/push.js +1 -1
- 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/space.d.ts +44 -0
- package/dist/handlers/space.js +7 -0
- 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 +2 -1
- package/dist/handlers.js +58 -56
- package/dist/location.js +2 -2
- 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 +5 -5
- package/dist/process.js +68 -66
- 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 +3 -2
- package/dist/routes.js +62 -60
- package/dist/server-info.js +3 -3
- package/dist/service-status.js +3 -3
- package/dist/space-store.d.ts +49 -0
- package/dist/space-store.js +16 -0
- package/dist/workerd.js +66 -64
- package/package.json +8 -8
- /package/dist/chunks/{api-017ycvbx.js → cors-017ycvbx.js} +0 -0
- /package/dist/chunks/{api-9rqn6x4v.js → cors-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{api-bd8755ek.js → cors-bd8755ek.js} +0 -0
- /package/dist/chunks/{api-n26yr6pw.js → cors-n26yr6pw.js} +0 -0
- /package/dist/chunks/{api-q187pxxd.js → cors-q187pxxd.js} +0 -0
- /package/dist/chunks/{api-q4bn6dy8.js → cors-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{api-qpnw2qd1.js → cors-qpnw2qd1.js} +0 -0
- /package/dist/chunks/{api-rqgv9x42.js → cors-rqgv9x42.js} +0 -0
- /package/dist/chunks/{api-xthc02cw.js → cors-xthc02cw.js} +0 -0
- /package/dist/chunks/{api-yc7nft6q.js → cors-yc7nft6q.js} +0 -0
package/dist/api.d.ts
CHANGED
|
@@ -6695,6 +6695,124 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
|
|
|
6695
6695
|
readonly cursor: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
6696
6696
|
readonly truncated: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
6697
6697
|
}>;
|
|
6698
|
+
}, import("effect/Schema").Struct<{
|
|
6699
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
6700
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
6701
|
+
};
|
|
6702
|
+
readonly created: import("effect/Schema").Finite;
|
|
6703
|
+
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
6704
|
+
readonly type: import("effect/Schema").Literal<"experimental.space.resync">;
|
|
6705
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
6706
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
6707
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6708
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6709
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6710
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6711
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6712
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6713
|
+
}>, never, never>;
|
|
6714
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
6715
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
6716
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6717
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6718
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6719
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6720
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6721
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6722
|
+
}>, never, never>;
|
|
6723
|
+
}>>, never, never>;
|
|
6724
|
+
readonly data: import("effect/Schema").Struct<{
|
|
6725
|
+
readonly space: import("effect/Schema").String;
|
|
6726
|
+
}>;
|
|
6727
|
+
}> & {
|
|
6728
|
+
type: "experimental.space.resync";
|
|
6729
|
+
durability: "ephemeral";
|
|
6730
|
+
durable: undefined;
|
|
6731
|
+
data: import("effect/Schema").Struct<{
|
|
6732
|
+
readonly space: import("effect/Schema").String;
|
|
6733
|
+
}>;
|
|
6734
|
+
}, import("effect/Schema").Struct<{
|
|
6735
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
6736
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
6737
|
+
};
|
|
6738
|
+
readonly created: import("effect/Schema").Finite;
|
|
6739
|
+
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
6740
|
+
readonly type: import("effect/Schema").Literal<"experimental.space.updated">;
|
|
6741
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
6742
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
6743
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6744
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6745
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6746
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6747
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6748
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6749
|
+
}>, never, never>;
|
|
6750
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
6751
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
6752
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6753
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6754
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6755
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6756
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6757
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6758
|
+
}>, never, never>;
|
|
6759
|
+
}>>, never, never>;
|
|
6760
|
+
readonly data: import("effect/Schema").Struct<{
|
|
6761
|
+
readonly space: import("effect/Schema").String;
|
|
6762
|
+
readonly key: import("effect/Schema").String;
|
|
6763
|
+
readonly value: import("effect/Schema").String;
|
|
6764
|
+
readonly revision: import("effect/Schema").Int;
|
|
6765
|
+
}>;
|
|
6766
|
+
}> & {
|
|
6767
|
+
type: "experimental.space.updated";
|
|
6768
|
+
durability: "ephemeral";
|
|
6769
|
+
durable: undefined;
|
|
6770
|
+
data: import("effect/Schema").Struct<{
|
|
6771
|
+
readonly space: import("effect/Schema").String;
|
|
6772
|
+
readonly key: import("effect/Schema").String;
|
|
6773
|
+
readonly value: import("effect/Schema").String;
|
|
6774
|
+
readonly revision: import("effect/Schema").Int;
|
|
6775
|
+
}>;
|
|
6776
|
+
}, import("effect/Schema").Struct<{
|
|
6777
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
6778
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
6779
|
+
};
|
|
6780
|
+
readonly created: import("effect/Schema").Finite;
|
|
6781
|
+
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
6782
|
+
readonly type: import("effect/Schema").Literal<"experimental.space.deleted">;
|
|
6783
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
6784
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
6785
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6786
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6787
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6788
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6789
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6790
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6791
|
+
}>, never, never>;
|
|
6792
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
6793
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
6794
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6795
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6796
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6797
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6798
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6799
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6800
|
+
}>, never, never>;
|
|
6801
|
+
}>>, never, never>;
|
|
6802
|
+
readonly data: import("effect/Schema").Struct<{
|
|
6803
|
+
readonly space: import("effect/Schema").String;
|
|
6804
|
+
readonly key: import("effect/Schema").String;
|
|
6805
|
+
readonly revision: import("effect/Schema").Int;
|
|
6806
|
+
}>;
|
|
6807
|
+
}> & {
|
|
6808
|
+
type: "experimental.space.deleted";
|
|
6809
|
+
durability: "ephemeral";
|
|
6810
|
+
durable: undefined;
|
|
6811
|
+
data: import("effect/Schema").Struct<{
|
|
6812
|
+
readonly space: import("effect/Schema").String;
|
|
6813
|
+
readonly key: import("effect/Schema").String;
|
|
6814
|
+
readonly revision: import("effect/Schema").Int;
|
|
6815
|
+
}>;
|
|
6698
6816
|
}, import("effect/Schema").Struct<{
|
|
6699
6817
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
6700
6818
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -6715,7 +6833,9 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
|
|
|
6715
6833
|
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
6716
6834
|
}>>;
|
|
6717
6835
|
readonly type: import("effect/Schema").Literal<"server.connected">;
|
|
6718
|
-
readonly data: import("effect/Schema").Struct<{
|
|
6836
|
+
readonly data: import("effect/Schema").Struct<{
|
|
6837
|
+
readonly stream: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
6838
|
+
}>;
|
|
6719
6839
|
}>[]]>>, import("effect/Schema").Never, {
|
|
6720
6840
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
6721
6841
|
readonly created: number;
|
|
@@ -8222,6 +8342,53 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
|
|
|
8222
8342
|
readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
|
|
8223
8343
|
} | undefined;
|
|
8224
8344
|
readonly data: {};
|
|
8345
|
+
} | {
|
|
8346
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
8347
|
+
readonly created: number;
|
|
8348
|
+
readonly metadata?: {
|
|
8349
|
+
readonly [x: string]: unknown;
|
|
8350
|
+
} | undefined;
|
|
8351
|
+
readonly type: "experimental.space.deleted";
|
|
8352
|
+
readonly location?: {
|
|
8353
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
8354
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
|
|
8355
|
+
} | undefined;
|
|
8356
|
+
readonly data: {
|
|
8357
|
+
readonly space: string;
|
|
8358
|
+
readonly key: string;
|
|
8359
|
+
readonly revision: number;
|
|
8360
|
+
};
|
|
8361
|
+
} | {
|
|
8362
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
8363
|
+
readonly created: number;
|
|
8364
|
+
readonly metadata?: {
|
|
8365
|
+
readonly [x: string]: unknown;
|
|
8366
|
+
} | undefined;
|
|
8367
|
+
readonly type: "experimental.space.resync";
|
|
8368
|
+
readonly location?: {
|
|
8369
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
8370
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
|
|
8371
|
+
} | undefined;
|
|
8372
|
+
readonly data: {
|
|
8373
|
+
readonly space: string;
|
|
8374
|
+
};
|
|
8375
|
+
} | {
|
|
8376
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
8377
|
+
readonly created: number;
|
|
8378
|
+
readonly metadata?: {
|
|
8379
|
+
readonly [x: string]: unknown;
|
|
8380
|
+
} | undefined;
|
|
8381
|
+
readonly type: "experimental.space.updated";
|
|
8382
|
+
readonly location?: {
|
|
8383
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
8384
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
|
|
8385
|
+
} | undefined;
|
|
8386
|
+
readonly data: {
|
|
8387
|
+
readonly space: string;
|
|
8388
|
+
readonly key: string;
|
|
8389
|
+
readonly value: string;
|
|
8390
|
+
readonly revision: number;
|
|
8391
|
+
};
|
|
8225
8392
|
} | {
|
|
8226
8393
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
8227
8394
|
readonly created: number;
|
|
@@ -9204,5 +9371,7 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
|
|
|
9204
9371
|
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
9205
9372
|
} | undefined;
|
|
9206
9373
|
readonly type: "server.connected";
|
|
9207
|
-
readonly data: {
|
|
9374
|
+
readonly data: {
|
|
9375
|
+
readonly stream?: string | undefined;
|
|
9376
|
+
};
|
|
9208
9377
|
}>, never, never, never>, false>>;
|
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/cors-whvq72as.js";
|
|
4
|
+
import"./chunks/cors-ehyp3zqd.js";
|
|
5
|
+
import"./chunks/cors-ca564221.js";
|
|
6
|
+
import"./chunks/cors-br4x4prt.js";
|
|
7
|
+
import"./chunks/cors-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 "./cors-br4x4prt.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./cors-whvq72as.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./cors-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
runPtySocket2,
|
|
15
15
|
holdLocation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./cors-q187pxxd.js";
|
|
17
17
|
|
|
18
18
|
// src/handlers/pty.ts
|
|
19
19
|
import { Pty } from "@opencode/core/pty";
|
|
@@ -1,39 +1,42 @@
|
|
|
1
1
|
import {
|
|
2
2
|
layer4
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
formLocationLayer2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./cors-ca564221.js";
|
|
7
7
|
import {
|
|
8
8
|
sessionLocationLayer2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./cors-ehyp3zqd.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./cors-whvq72as.js";
|
|
13
13
|
import {
|
|
14
14
|
Config2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./cors-j4at0y5c.js";
|
|
16
|
+
import {
|
|
17
|
+
node2
|
|
18
|
+
} from "./cors-w6xb5z15.js";
|
|
16
19
|
import {
|
|
17
20
|
CorsConfig2
|
|
18
|
-
} from "./
|
|
21
|
+
} from "./cors-q4bn6dy8.js";
|
|
19
22
|
import {
|
|
20
|
-
|
|
21
|
-
} from "./
|
|
23
|
+
layer2
|
|
24
|
+
} from "./cors-5pdfedjd.js";
|
|
22
25
|
import {
|
|
23
|
-
|
|
24
|
-
} from "./
|
|
26
|
+
node3
|
|
27
|
+
} from "./cors-v9t81kwn.js";
|
|
25
28
|
import {
|
|
26
29
|
handlers2
|
|
27
|
-
} from "./
|
|
30
|
+
} from "./cors-fa6nnfxm.js";
|
|
28
31
|
import {
|
|
29
32
|
authorizationLayer2
|
|
30
|
-
} from "./
|
|
33
|
+
} from "./cors-29nx48hm.js";
|
|
31
34
|
import {
|
|
32
35
|
schemaErrorLayer2
|
|
33
|
-
} from "./
|
|
36
|
+
} from "./cors-bd8755ek.js";
|
|
34
37
|
import {
|
|
35
38
|
defectResponseLayer2
|
|
36
|
-
} from "./
|
|
39
|
+
} from "./cors-n26yr6pw.js";
|
|
37
40
|
|
|
38
41
|
// src/routes.ts
|
|
39
42
|
import { Database } from "@opencode/core/database/database";
|
|
@@ -117,6 +120,7 @@ var applicationServiceNodes = [
|
|
|
117
120
|
BrowserTunnelGateway.node,
|
|
118
121
|
Credential.node,
|
|
119
122
|
WellKnown.node,
|
|
123
|
+
node3,
|
|
120
124
|
node2,
|
|
121
125
|
LocationServiceMap.node,
|
|
122
126
|
LocationActivity.node,
|
|
@@ -202,7 +206,7 @@ function makeRoutes(password, options, serviceURLs, overrides, instances) {
|
|
|
202
206
|
})) : build(overrides);
|
|
203
207
|
return serviceLayer.pipe(Layer.flatMap((context) => {
|
|
204
208
|
const services = Layer.succeedContext(context);
|
|
205
|
-
const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)),
|
|
209
|
+
const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer2(serviceURLs, Context.get(context, Global.Service).tmp, options.app));
|
|
206
210
|
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(() => {
|
|
207
211
|
internal = Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(HttpEffect.toWebHandlerWith(context));
|
|
208
212
|
})));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./cors-whvq72as.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/skill.ts
|
|
9
9
|
import { Skill } from "@opencode/core/skill";
|
|
@@ -13,10 +13,13 @@ import { HttpApiBuilder } from "effect/http-api";
|
|
|
13
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
14
|
const skills = yield* Skill.Service;
|
|
15
15
|
const raw = new URL(ctx.request.url, "http://localhost").pathname.split("/").slice(6).join("/");
|
|
16
|
+
const notFound = new FileNotFoundError({ path: raw, message: `File not found: ${raw}` });
|
|
16
17
|
const file = yield* Effect.try({
|
|
17
|
-
try: () => decodeURIComponent(raw),
|
|
18
|
-
catch: () =>
|
|
18
|
+
try: () => Skill.parseFilePath(decodeURIComponent(raw)),
|
|
19
|
+
catch: () => notFound
|
|
19
20
|
});
|
|
21
|
+
if (!file)
|
|
22
|
+
return yield* notFound;
|
|
20
23
|
return yield* skills.read(ctx.params.skillID, file).pipe(Effect.catchTags({
|
|
21
24
|
"Skill.NotFoundError": (error) => Effect.fail(new SkillNotFoundError({ skill: ctx.params.skillID, message: `Skill not found: ${error.skill}` })),
|
|
22
25
|
"Skill.FileNotFoundError": (error) => Effect.fail(new FileNotFoundError({ path: error.file, message: `File not found: ${error.file}` })),
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Service2
|
|
3
|
+
} from "./cors-w6xb5z15.js";
|
|
4
|
+
|
|
5
|
+
// src/handlers/space.ts
|
|
6
|
+
import { InvalidRequestError } from "@opencode/protocol/errors";
|
|
7
|
+
import { Space } from "@opencode/schema/space";
|
|
8
|
+
import { Effect } from "effect";
|
|
9
|
+
import { HttpApiSchema } from "effect/http-api";
|
|
10
|
+
var streamNotFound = () => new InvalidRequestError({ message: "No open event stream has this ID", kind: "stream_not_found", field: "stream" });
|
|
11
|
+
var makeSpace2 = Effect.gen(function* () {
|
|
12
|
+
const store = yield* Service2;
|
|
13
|
+
return {
|
|
14
|
+
set: Effect.fn("SpaceHandler.set")(function* (space, key, value) {
|
|
15
|
+
if (new TextEncoder().encode(value).length > Space.MaxValueBytes)
|
|
16
|
+
return yield* new InvalidRequestError({ message: "Value exceeds 1 MiB of UTF-8", field: "value" });
|
|
17
|
+
yield* store.set(space, key, value);
|
|
18
|
+
return HttpApiSchema.NoContent.make();
|
|
19
|
+
}),
|
|
20
|
+
sync: Effect.fn("SpaceHandler.sync")(function* (space, cursor) {
|
|
21
|
+
return yield* store.sync(space, cursor);
|
|
22
|
+
}),
|
|
23
|
+
subscribe: Effect.fn("SpaceHandler.subscribe")(function* (payload) {
|
|
24
|
+
if (!(yield* store.subscribe(payload.stream, payload.spaces)))
|
|
25
|
+
return yield* streamNotFound();
|
|
26
|
+
return HttpApiSchema.NoContent.make();
|
|
27
|
+
}),
|
|
28
|
+
unsubscribe: Effect.fn("SpaceHandler.unsubscribe")(function* (payload) {
|
|
29
|
+
if (!(yield* store.unsubscribe(payload.stream, payload.spaces)))
|
|
30
|
+
return yield* streamNotFound();
|
|
31
|
+
return HttpApiSchema.NoContent.make();
|
|
32
|
+
}),
|
|
33
|
+
reset: Effect.fn("SpaceHandler.reset")(function* () {
|
|
34
|
+
yield* store.resetEpoch;
|
|
35
|
+
return HttpApiSchema.NoContent.make();
|
|
36
|
+
}),
|
|
37
|
+
remove: Effect.fn("SpaceHandler.remove")(function* (space, key) {
|
|
38
|
+
yield* store.remove(space, key);
|
|
39
|
+
return HttpApiSchema.NoContent.make();
|
|
40
|
+
})
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export { makeSpace2 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/server-info.ts
|
|
6
6
|
var exports_server_info = {};
|
|
@@ -8,14 +8,14 @@ __export(exports_server_info, {
|
|
|
8
8
|
ServerInfo: () => exports_server_info,
|
|
9
9
|
Service: () => Service3,
|
|
10
10
|
connectionURLs: () => connectionURLs2,
|
|
11
|
-
layer: () =>
|
|
11
|
+
layer: () => layer2
|
|
12
12
|
});
|
|
13
13
|
import { Context, Layer } from "effect";
|
|
14
14
|
import { networkInterfaces } from "node:os";
|
|
15
15
|
|
|
16
16
|
class Service3 extends Context.Service()("@opencode/server/ServerInfo") {
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function layer2(urls, tmp, app = {}) {
|
|
19
19
|
return Layer.succeed(Service3, Service3.of({ urls, app, paths: { tmp } }));
|
|
20
20
|
}
|
|
21
21
|
function connectionURLs2(value, requestedHostname) {
|
|
@@ -38,4 +38,4 @@ function connectionURLs2(value, requestedHostname) {
|
|
|
38
38
|
];
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export { Service3,
|
|
41
|
+
export { Service3, layer2, connectionURLs2, exports_server_info };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-whvq72as.js";
|
|
4
4
|
import {
|
|
5
5
|
SESSION_TTL_SECONDS2,
|
|
6
6
|
Config2,
|
|
7
7
|
issueSession2,
|
|
8
8
|
sessionCookieName2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./cors-j4at0y5c.js";
|
|
10
10
|
import {
|
|
11
11
|
Service3
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./cors-5pdfedjd.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
14
|
+
Service5
|
|
15
|
+
} from "./cors-v9t81kwn.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* Service5;
|
|
26
26
|
const auth = yield* Config2;
|
|
27
27
|
return handlers.handle("server.info", () => Effect.gen(function* () {
|
|
28
28
|
const info = yield* Service3;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-whvq72as.js";
|
|
4
4
|
import {
|
|
5
5
|
requireConnectable2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./cors-2tmcamrc.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/credential.ts
|
|
9
9
|
import { Credential } from "@opencode/core/credential";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestRef2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./cors-br4x4prt.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./cors-whvq72as.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/debug.ts
|
|
9
9
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|