@opencode/server 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/{auth-a8jcac9a.js → request-tracing-05c5061t.js} +1 -1
- package/dist/chunks/{auth-j87xz9bt.js → request-tracing-0e81et3m.js} +3 -3
- package/dist/chunks/{auth-6jfbq4sw.js → request-tracing-0gf4dfn8.js} +33 -33
- package/dist/chunks/{auth-91858wp1.js → request-tracing-2pbbrzpp.js} +2 -2
- package/dist/chunks/{auth-e6e4kz0w.js → request-tracing-39nnfjx1.js} +4 -4
- package/dist/chunks/{auth-yjbzmfhm.js → request-tracing-3te71694.js} +5 -5
- package/dist/chunks/{auth-09kw3a77.js → request-tracing-4ed680xg.js} +2 -2
- package/dist/chunks/{auth-rha2aq18.js → request-tracing-4p2y0qs3.js} +2 -2
- package/dist/chunks/{auth-50bbk3b2.js → request-tracing-50bbk3b2.js} +1 -1
- package/dist/chunks/{auth-78rcgzsr.js → request-tracing-78rcgzsr.js} +1 -1
- package/dist/chunks/{auth-7b9xm1qg.js → request-tracing-7b9xm1qg.js} +1 -1
- package/dist/chunks/{auth-n1423xpw.js → request-tracing-7nb2rv11.js} +4 -4
- package/dist/chunks/{auth-enp1bp7r.js → request-tracing-861wfsmy.js} +1 -1
- package/dist/chunks/request-tracing-8sb6qqpn.js +28 -0
- package/dist/chunks/request-tracing-9cd3a4b8.js +69 -0
- package/dist/chunks/{auth-az0609r6.js → request-tracing-9grnt8dc.js} +2 -2
- package/dist/chunks/{auth-5s0wnsg4.js → request-tracing-ap1t95t8.js} +3 -3
- package/dist/chunks/{auth-yqhefp4s.js → request-tracing-ayveq98d.js} +23 -3
- package/dist/chunks/{auth-b3bmdkga.js → request-tracing-b3bmdkga.js} +1 -1
- package/dist/chunks/{auth-4q6e7fh8.js → request-tracing-b4mqtccx.js} +2 -2
- package/dist/chunks/{auth-z9zyd4qg.js → request-tracing-d4534456.js} +4 -4
- package/dist/chunks/{auth-5cpb32hf.js → request-tracing-d8b9pm2q.js} +1 -1
- package/dist/chunks/{auth-8mj7kvhm.js → request-tracing-dezpcckc.js} +2 -2
- package/dist/chunks/{auth-djr0jy89.js → request-tracing-djr0jy89.js} +1 -1
- package/dist/chunks/{auth-kkdkqt8j.js → request-tracing-dx89xydc.js} +2 -2
- package/dist/chunks/{auth-d0edqfxx.js → request-tracing-et00mhwf.js} +2 -2
- package/dist/chunks/{auth-qd0r787n.js → request-tracing-f8r9p2vr.js} +2 -2
- package/dist/chunks/{auth-3p9jwgak.js → request-tracing-fvpjvjpp.js} +6 -6
- package/dist/chunks/{auth-a4mwssda.js → request-tracing-g6yhb3a8.js} +15 -11
- package/dist/chunks/{auth-qcg3sqtb.js → request-tracing-h1thjy6x.js} +2 -2
- package/dist/chunks/{auth-rs3v36hp.js → request-tracing-h286a6py.js} +2 -2
- package/dist/chunks/{auth-htyf2qs7.js → request-tracing-htyf2qs7.js} +1 -1
- package/dist/chunks/{auth-cezwbsk5.js → request-tracing-hx8bsq9d.js} +1 -1
- package/dist/chunks/{auth-j4at0y5c.js → request-tracing-j4at0y5c.js} +1 -1
- package/dist/chunks/{auth-6kawhtwy.js → request-tracing-jjvpqmx6.js} +4 -4
- package/dist/chunks/{auth-btahnm2b.js → request-tracing-kg0ybx4v.js} +3 -3
- package/dist/chunks/{auth-myqk22k5.js → request-tracing-myqk22k5.js} +2 -2
- package/dist/chunks/{auth-kqr36gas.js → request-tracing-mzs0n5xz.js} +7 -7
- package/dist/chunks/request-tracing-n26yr6pw.js +21 -0
- package/dist/chunks/{auth-pab2cyby.js → request-tracing-n5et0xgm.js} +8 -8
- package/dist/chunks/{auth-p86kew8c.js → request-tracing-p86kew8c.js} +2 -2
- package/dist/chunks/{auth-ny1j968n.js → request-tracing-q44yktpv.js} +2 -2
- package/dist/chunks/{auth-bm3bken1.js → request-tracing-r7knxm63.js} +7 -20
- package/dist/chunks/{auth-gyryr0mf.js → request-tracing-rd9e3qfx.js} +4 -4
- package/dist/chunks/{auth-te8jwba1.js → request-tracing-s9tkswmw.js} +2 -2
- package/dist/chunks/request-tracing-sy2e93cn.js +46 -0
- package/dist/chunks/{auth-t32e1bbt.js → request-tracing-t32e1bbt.js} +1 -1
- package/dist/chunks/{auth-yk755swr.js → request-tracing-tk56ffsq.js} +2 -2
- package/dist/chunks/{auth-etdgpyr8.js → request-tracing-v0r38a4t.js} +25 -15
- package/dist/chunks/{auth-f559fakr.js → request-tracing-v8aqacn3.js} +2 -2
- package/dist/chunks/{auth-2eaky32g.js → request-tracing-vbgqk0mr.js} +2 -2
- package/dist/chunks/{auth-6z9pvq7p.js → request-tracing-x4b2rtcb.js} +1 -1
- package/dist/chunks/{auth-zkya65ny.js → request-tracing-z2ndp6vh.js} +8 -8
- package/dist/chunks/{auth-zcvan105.js → request-tracing-zbe9jfhy.js} +1 -1
- package/dist/content-headers.js +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +3 -3
- package/dist/fetch.d.ts +3 -0
- package/dist/fetch.js +61 -58
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/artifact.js +3 -3
- package/dist/handlers/automation.d.ts +25 -0
- package/dist/handlers/automation.js +7 -0
- package/dist/handlers/blob.d.ts +7 -0
- package/dist/handlers/blob.js +8 -0
- package/dist/handlers/command.js +6 -6
- package/dist/handlers/config.js +6 -6
- package/dist/handlers/credential.js +7 -7
- package/dist/handlers/debug.js +6 -6
- package/dist/handlers/event.js +7 -7
- package/dist/handlers/form.js +6 -6
- package/dist/handlers/fs.js +8 -7
- package/dist/handlers/generate.d.ts +2 -1
- package/dist/handlers/generate.js +6 -6
- package/dist/handlers/integration.js +6 -6
- package/dist/handlers/job.d.ts +11 -1
- package/dist/handlers/job.js +2 -2
- package/dist/handlers/location.js +6 -6
- package/dist/handlers/mcp.js +8 -8
- package/dist/handlers/media.js +2 -2
- package/dist/handlers/message.js +7 -7
- package/dist/handlers/migration.js +6 -6
- package/dist/handlers/model.js +6 -6
- package/dist/handlers/permission.js +6 -6
- package/dist/handlers/persistent-pty.d.ts +1 -1
- package/dist/handlers/persistent-pty.js +15 -13
- package/dist/handlers/plugin.js +6 -6
- package/dist/handlers/project.js +6 -6
- package/dist/handlers/provider.js +6 -6
- package/dist/handlers/pty-socket.js +1 -1
- package/dist/handlers/pty.js +8 -8
- package/dist/handlers/reference.js +6 -6
- package/dist/handlers/rpc.js +6 -6
- package/dist/handlers/server.js +9 -9
- package/dist/handlers/session-error.js +1 -1
- package/dist/handlers/session.js +7 -7
- package/dist/handlers/shell.js +6 -6
- package/dist/handlers/skill.js +6 -6
- package/dist/handlers/usage.js +6 -6
- package/dist/handlers/vcs.js +6 -6
- package/dist/handlers/voice.js +6 -6
- package/dist/handlers/websearch.js +6 -6
- package/dist/handlers/worktree.js +6 -6
- package/dist/handlers.d.ts +1 -1
- package/dist/handlers.js +52 -50
- package/dist/location.js +2 -2
- package/dist/media-uri.js +1 -1
- package/dist/middleware/authorization.js +2 -2
- package/dist/middleware/defect-response.d.ts +2 -0
- package/dist/middleware/defect-response.js +6 -0
- package/dist/middleware/form-location.js +3 -3
- package/dist/middleware/schema-error.js +1 -1
- package/dist/middleware/session-location.js +3 -3
- package/dist/options.d.ts +3 -0
- package/dist/options.js +3 -0
- package/dist/pairing.js +3 -3
- package/dist/process.d.ts +3 -0
- package/dist/process.js +64 -61
- package/dist/range.d.ts +6 -0
- package/dist/range.js +8 -0
- package/dist/request-site.js +2 -2
- package/dist/request-tracing.js +1 -1
- package/dist/routes.d.ts +5 -3
- package/dist/routes.js +56 -53
- package/dist/server-info.js +3 -3
- package/dist/service-status.js +3 -3
- package/dist/workerd.d.ts +1 -0
- package/dist/workerd.js +66 -59
- package/package.json +9 -9
- package/dist/chunks/auth-059rbh9c.js +0 -43
- package/dist/handlers/schedule.d.ts +0 -314
- package/dist/handlers/schedule.js +0 -7
- /package/dist/chunks/{auth-9rqn6x4v.js → request-tracing-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{auth-bd8755ek.js → request-tracing-bd8755ek.js} +0 -0
- /package/dist/chunks/{auth-q187pxxd.js → request-tracing-q187pxxd.js} +0 -0
- /package/dist/chunks/{auth-q4bn6dy8.js → request-tracing-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{auth-smaf4a18.js → request-tracing-smaf4a18.js} +0 -0
- /package/dist/chunks/{auth-xthc02cw.js → request-tracing-xthc02cw.js} +0 -0
- /package/dist/chunks/{auth-yc7nft6q.js → request-tracing-yc7nft6q.js} +0 -0
package/dist/workerd.js
CHANGED
|
@@ -1,64 +1,67 @@
|
|
|
1
|
-
import"./chunks/
|
|
2
|
-
import"./chunks/
|
|
3
|
-
import"./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/
|
|
18
|
-
import"./chunks/
|
|
19
|
-
import"./chunks/
|
|
20
|
-
import"./chunks/
|
|
21
|
-
import"./chunks/
|
|
22
|
-
import"./chunks/
|
|
23
|
-
import"./chunks/
|
|
24
|
-
import"./chunks/
|
|
25
|
-
import"./chunks/
|
|
26
|
-
import"./chunks/
|
|
27
|
-
import"./chunks/
|
|
28
|
-
import"./chunks/
|
|
29
|
-
import"./chunks/
|
|
30
|
-
import"./chunks/
|
|
31
|
-
import"./chunks/
|
|
32
|
-
import"./chunks/
|
|
33
|
-
import"./chunks/
|
|
34
|
-
import"./chunks/
|
|
35
|
-
import"./chunks/
|
|
36
|
-
import"./chunks/
|
|
37
|
-
import"./chunks/
|
|
38
|
-
import"./chunks/
|
|
39
|
-
import"./chunks/
|
|
40
|
-
import"./chunks/
|
|
41
|
-
import"./chunks/
|
|
42
|
-
import"./chunks/
|
|
43
|
-
import"./chunks/
|
|
44
|
-
import"./chunks/
|
|
45
|
-
import"./chunks/
|
|
46
|
-
import"./chunks/
|
|
47
|
-
import"./chunks/
|
|
48
|
-
import"./chunks/
|
|
49
|
-
import"./chunks/
|
|
50
|
-
import"./chunks/
|
|
51
|
-
import"./chunks/
|
|
52
|
-
import"./chunks/
|
|
53
|
-
import"./chunks/
|
|
54
|
-
import"./chunks/
|
|
55
|
-
import"./chunks/
|
|
1
|
+
import"./chunks/request-tracing-q4bn6dy8.js";
|
|
2
|
+
import"./chunks/request-tracing-myqk22k5.js";
|
|
3
|
+
import"./chunks/request-tracing-yc7nft6q.js";
|
|
4
|
+
import"./chunks/request-tracing-smaf4a18.js";
|
|
5
|
+
import"./chunks/request-tracing-50bbk3b2.js";
|
|
6
|
+
import"./chunks/request-tracing-htyf2qs7.js";
|
|
7
|
+
import"./chunks/request-tracing-b3bmdkga.js";
|
|
8
|
+
import"./chunks/request-tracing-0e81et3m.js";
|
|
9
|
+
import"./chunks/request-tracing-j4at0y5c.js";
|
|
10
|
+
import"./chunks/request-tracing-ayveq98d.js";
|
|
11
|
+
import"./chunks/request-tracing-et00mhwf.js";
|
|
12
|
+
import"./chunks/request-tracing-xthc02cw.js";
|
|
13
|
+
import"./chunks/request-tracing-ap1t95t8.js";
|
|
14
|
+
import"./chunks/request-tracing-4p2y0qs3.js";
|
|
15
|
+
import"./chunks/request-tracing-9grnt8dc.js";
|
|
16
|
+
import"./chunks/request-tracing-rd9e3qfx.js";
|
|
17
|
+
import"./chunks/request-tracing-kg0ybx4v.js";
|
|
18
|
+
import"./chunks/request-tracing-t32e1bbt.js";
|
|
19
|
+
import"./chunks/request-tracing-8sb6qqpn.js";
|
|
20
|
+
import"./chunks/request-tracing-r7knxm63.js";
|
|
21
|
+
import"./chunks/request-tracing-v8aqacn3.js";
|
|
22
|
+
import"./chunks/request-tracing-b4mqtccx.js";
|
|
23
|
+
import"./chunks/request-tracing-q44yktpv.js";
|
|
24
|
+
import"./chunks/request-tracing-d8b9pm2q.js";
|
|
25
|
+
import"./chunks/request-tracing-fvpjvjpp.js";
|
|
26
|
+
import"./chunks/request-tracing-7nb2rv11.js";
|
|
27
|
+
import"./chunks/request-tracing-dezpcckc.js";
|
|
28
|
+
import"./chunks/request-tracing-vbgqk0mr.js";
|
|
29
|
+
import"./chunks/request-tracing-3te71694.js";
|
|
30
|
+
import"./chunks/request-tracing-mzs0n5xz.js";
|
|
31
|
+
import"./chunks/request-tracing-z2ndp6vh.js";
|
|
32
|
+
import"./chunks/request-tracing-h1thjy6x.js";
|
|
33
|
+
import"./chunks/request-tracing-q187pxxd.js";
|
|
34
|
+
import"./chunks/request-tracing-jjvpqmx6.js";
|
|
35
|
+
import"./chunks/request-tracing-p86kew8c.js";
|
|
36
|
+
import"./chunks/request-tracing-sy2e93cn.js";
|
|
37
|
+
import"./chunks/request-tracing-9cd3a4b8.js";
|
|
38
|
+
import"./chunks/request-tracing-78rcgzsr.js";
|
|
39
|
+
import"./chunks/request-tracing-djr0jy89.js";
|
|
40
|
+
import"./chunks/request-tracing-g6yhb3a8.js";
|
|
41
|
+
import"./chunks/request-tracing-f8r9p2vr.js";
|
|
42
|
+
import"./chunks/request-tracing-s9tkswmw.js";
|
|
43
|
+
import"./chunks/request-tracing-zbe9jfhy.js";
|
|
44
|
+
import"./chunks/request-tracing-2pbbrzpp.js";
|
|
45
|
+
import"./chunks/request-tracing-dx89xydc.js";
|
|
46
|
+
import"./chunks/request-tracing-4ed680xg.js";
|
|
47
|
+
import"./chunks/request-tracing-d4534456.js";
|
|
48
|
+
import"./chunks/request-tracing-tk56ffsq.js";
|
|
49
|
+
import"./chunks/request-tracing-05c5061t.js";
|
|
50
|
+
import"./chunks/request-tracing-861wfsmy.js";
|
|
51
|
+
import"./chunks/request-tracing-h286a6py.js";
|
|
52
|
+
import"./chunks/request-tracing-x4b2rtcb.js";
|
|
53
|
+
import"./chunks/request-tracing-hx8bsq9d.js";
|
|
54
|
+
import"./chunks/request-tracing-0gf4dfn8.js";
|
|
55
|
+
import"./chunks/request-tracing-7b9xm1qg.js";
|
|
56
|
+
import"./chunks/request-tracing-bd8755ek.js";
|
|
57
|
+
import"./chunks/request-tracing-n26yr6pw.js";
|
|
58
|
+
import"./chunks/request-tracing-v0r38a4t.js";
|
|
56
59
|
import {
|
|
57
|
-
|
|
58
|
-
} from "./chunks/
|
|
60
|
+
make3
|
|
61
|
+
} from "./chunks/request-tracing-n5et0xgm.js";
|
|
59
62
|
import {
|
|
60
63
|
__export
|
|
61
|
-
} from "./chunks/
|
|
64
|
+
} from "./chunks/request-tracing-9rqn6x4v.js";
|
|
62
65
|
|
|
63
66
|
// src/workerd.ts
|
|
64
67
|
var exports_workerd = {};
|
|
@@ -75,13 +78,15 @@ import { sqliteLayer } from "@opencode/core/database/sqlite.workerd";
|
|
|
75
78
|
import { EnvironmentUnavailable } from "@opencode/core/environment/unavailable";
|
|
76
79
|
import { FileSystem } from "@opencode/core/filesystem";
|
|
77
80
|
import { FileSystemSearch } from "@opencode/core/filesystem/search";
|
|
81
|
+
import { BlobStore } from "@opencode/core/blob-store";
|
|
82
|
+
import { VideoGeneration } from "@opencode/core/video-generation";
|
|
78
83
|
import { Pty } from "@opencode/core/pty";
|
|
79
84
|
import { Snapshot } from "@opencode/core/snapshot";
|
|
80
85
|
import { Vcs } from "@opencode/core/vcs";
|
|
81
86
|
import { CrossSpawnSpawner } from "@opencode/util/cross-spawn-spawner";
|
|
82
87
|
import { Npm } from "@opencode/util/npm";
|
|
83
88
|
function create(options) {
|
|
84
|
-
return
|
|
89
|
+
return make3(serverOptions(options), { overrides: replacements(options) });
|
|
85
90
|
}
|
|
86
91
|
function serverOptions(options) {
|
|
87
92
|
return {
|
|
@@ -104,6 +109,8 @@ function replacements(options) {
|
|
|
104
109
|
FileSystemSearch.node.replace(fileSystemSearchLayer),
|
|
105
110
|
Pty.node.replace(ptyLayer),
|
|
106
111
|
Npm.node.replace(npmLayer),
|
|
112
|
+
BlobStore.node.replace(BlobStore.unsupportedLayer),
|
|
113
|
+
VideoGeneration.node.replace(VideoGeneration.unsupportedLayer),
|
|
107
114
|
ConfigPluginSource.node.replace(ConfigPluginSource.empty)
|
|
108
115
|
];
|
|
109
116
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/server",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@effect/platform-node": "4.1.0",
|
|
34
34
|
"@effect/platform-node-shared": "4.1.0",
|
|
35
|
-
"@opencode/core": "2.3.
|
|
36
|
-
"@opencode/protocol": "2.3.
|
|
37
|
-
"@opencode/schema": "2.3.
|
|
38
|
-
"@opencode/simulation": "2.3.
|
|
39
|
-
"@opencode/util": "2.3.
|
|
35
|
+
"@opencode/core": "2.3.1",
|
|
36
|
+
"@opencode/protocol": "2.3.1",
|
|
37
|
+
"@opencode/schema": "2.3.1",
|
|
38
|
+
"@opencode/simulation": "2.3.1",
|
|
39
|
+
"@opencode/util": "2.3.1",
|
|
40
40
|
"effect": "4.1.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@opencode/pty": "0.
|
|
44
|
-
"@opencode/client": "2.3.
|
|
45
|
-
"@opencode/plugin": "2.3.
|
|
43
|
+
"@opencode/pty": "0.6.0",
|
|
44
|
+
"@opencode/client": "2.3.1",
|
|
45
|
+
"@opencode/plugin": "2.3.1",
|
|
46
46
|
"@tsconfig/bun": "1.0.9",
|
|
47
47
|
"@types/bun": "1.4.3",
|
|
48
48
|
"@typescript/native": "npm:typescript@7.1.0-beta",
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
missingSession2
|
|
3
|
-
} from "./auth-smaf4a18.js";
|
|
4
|
-
|
|
5
|
-
// src/handlers/schedule.ts
|
|
6
|
-
import { Permission } from "@opencode/core/permission";
|
|
7
|
-
import { Schedule } from "@opencode/core/schedule";
|
|
8
|
-
import { ForbiddenError, InvalidRequestError, ScheduleNotFoundError } from "@opencode/protocol/errors";
|
|
9
|
-
import { Effect } from "effect";
|
|
10
|
-
import { HttpApiSchema } from "effect/http-api";
|
|
11
|
-
var makeSchedule2 = Effect.gen(function* () {
|
|
12
|
-
const schedules = yield* Schedule.Service;
|
|
13
|
-
const allowed = (sessionID) => schedules.enabled(sessionID).pipe(Effect.mapError(missingSession2), Effect.flatMap((enabled) => enabled ? Effect.void : Effect.fail(disabled())));
|
|
14
|
-
const find = (id) => Effect.gen(function* () {
|
|
15
|
-
const info = yield* schedules.get(id).pipe(Effect.mapError(missingSchedule));
|
|
16
|
-
if (info.sessionID === undefined)
|
|
17
|
-
return yield* missingSchedule({ scheduleID: id });
|
|
18
|
-
yield* allowed(info.sessionID).pipe(Effect.catchTag("SessionNotFoundError", () => Effect.fail(missingSchedule({ scheduleID: id }))));
|
|
19
|
-
return info;
|
|
20
|
-
});
|
|
21
|
-
return {
|
|
22
|
-
create: (payload) => schedules.create(Schedule.toCreateInput(payload.sessionID, payload)).pipe(Effect.provideService(Permission.Unattended, []), Effect.map((data) => ({ data })), Effect.catchTags({
|
|
23
|
-
"Schedule.InvalidError": (error) => Effect.fail(new InvalidRequestError({ message: error.message, kind: "schedule" })),
|
|
24
|
-
"Schedule.DisabledError": () => Effect.fail(disabled()),
|
|
25
|
-
"Permission.BlockedError": (error) => Effect.fail(new ForbiddenError({ message: error.message })),
|
|
26
|
-
"Permission.CorrectedError": (error) => Effect.fail(new ForbiddenError({ message: error.feedback })),
|
|
27
|
-
"Session.NotFoundError": (error) => Effect.fail(missingSession2(error))
|
|
28
|
-
})),
|
|
29
|
-
list: (sessionID) => allowed(sessionID).pipe(Effect.andThen(schedules.list({ sessionID })), Effect.map((data) => ({ data }))),
|
|
30
|
-
get: (id) => find(id).pipe(Effect.map((data) => ({ data }))),
|
|
31
|
-
pause: (id) => find(id).pipe(Effect.andThen(schedules.pause(id).pipe(Effect.mapError(missingSchedule))), Effect.map((data) => ({ data }))),
|
|
32
|
-
resume: (id) => find(id).pipe(Effect.andThen(schedules.resume(id).pipe(Effect.mapError(missingSchedule))), Effect.map((data) => ({ data }))),
|
|
33
|
-
remove: (id) => find(id).pipe(Effect.andThen(schedules.remove(id).pipe(Effect.mapError(missingSchedule))), Effect.as(HttpApiSchema.NoContent.make()))
|
|
34
|
-
};
|
|
35
|
-
});
|
|
36
|
-
function missingSchedule(error) {
|
|
37
|
-
return new ScheduleNotFoundError({ scheduleID: error.scheduleID, message: `Schedule not found: ${error.scheduleID}` });
|
|
38
|
-
}
|
|
39
|
-
function disabled() {
|
|
40
|
-
return new ForbiddenError({ message: new Schedule.DisabledError().message });
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { makeSchedule2 };
|
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
import { Schedule } from "@opencode/core/schedule";
|
|
2
|
-
import type { Session } from "@opencode/core/session";
|
|
3
|
-
import { ForbiddenError, InvalidRequestError, ScheduleNotFoundError } from "@opencode/protocol/errors";
|
|
4
|
-
import type { CreatePayload } from "@opencode/protocol/groups/schedule";
|
|
5
|
-
import { Effect } from "effect";
|
|
6
|
-
/** `schedule.*` in the `server.experimental` group. Every route needs experimental.schedules where the Session lives. */
|
|
7
|
-
export declare const makeSchedule: Effect.Effect<{
|
|
8
|
-
create: (payload: CreatePayload) => Effect.Effect<{
|
|
9
|
-
data: {
|
|
10
|
-
readonly id: string & import("effect/Brand").Brand<"Schedule.ID">;
|
|
11
|
-
readonly sessionID?: (string & import("effect/Brand").Brand<"SessionID">) | undefined;
|
|
12
|
-
readonly name?: string | undefined;
|
|
13
|
-
readonly when: {
|
|
14
|
-
readonly tz?: string | undefined;
|
|
15
|
-
readonly type: "in";
|
|
16
|
-
readonly in: string;
|
|
17
|
-
} | {
|
|
18
|
-
readonly tz?: string | undefined;
|
|
19
|
-
readonly type: "at";
|
|
20
|
-
readonly at: string;
|
|
21
|
-
} | {
|
|
22
|
-
readonly tz?: string | undefined;
|
|
23
|
-
readonly type: "every";
|
|
24
|
-
readonly every: string;
|
|
25
|
-
} | {
|
|
26
|
-
readonly tz?: string | undefined;
|
|
27
|
-
readonly type: "cron";
|
|
28
|
-
readonly cron: string;
|
|
29
|
-
};
|
|
30
|
-
readonly tz: string;
|
|
31
|
-
readonly if?: {
|
|
32
|
-
readonly type: "code";
|
|
33
|
-
readonly code: string;
|
|
34
|
-
} | {
|
|
35
|
-
readonly type: "shell";
|
|
36
|
-
readonly run: string;
|
|
37
|
-
readonly is?: string | undefined;
|
|
38
|
-
readonly matches?: string | undefined;
|
|
39
|
-
readonly changes?: boolean | undefined;
|
|
40
|
-
} | undefined;
|
|
41
|
-
readonly until?: {
|
|
42
|
-
readonly type: "code";
|
|
43
|
-
readonly code: string;
|
|
44
|
-
} | {
|
|
45
|
-
readonly type: "shell";
|
|
46
|
-
readonly run: string;
|
|
47
|
-
readonly is?: string | undefined;
|
|
48
|
-
readonly matches?: string | undefined;
|
|
49
|
-
readonly changes?: boolean | undefined;
|
|
50
|
-
} | undefined;
|
|
51
|
-
readonly action: {
|
|
52
|
-
readonly type: "prompt";
|
|
53
|
-
readonly prompt: string;
|
|
54
|
-
};
|
|
55
|
-
readonly status: "active" | "done" | "paused";
|
|
56
|
-
readonly nextDueAt?: import("effect/DateTime").Utc | undefined;
|
|
57
|
-
readonly endsAt?: import("effect/DateTime").Utc | undefined;
|
|
58
|
-
readonly remainingRuns?: number | undefined;
|
|
59
|
-
readonly runCount: number;
|
|
60
|
-
readonly lastFiredAt?: import("effect/DateTime").Utc | undefined;
|
|
61
|
-
readonly lastOutcome?: "checked" | "disabled" | "expired" | "failed" | "fired" | "late" | "skipped" | undefined;
|
|
62
|
-
readonly lastOutput?: string | undefined;
|
|
63
|
-
readonly time: {
|
|
64
|
-
readonly created: import("effect/DateTime").Utc;
|
|
65
|
-
readonly updated: import("effect/DateTime").Utc;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
}, ForbiddenError | InvalidRequestError | import("@opencode/protocol/errors").SessionNotFoundError, never>;
|
|
69
|
-
list: (sessionID: Session.ID) => Effect.Effect<{
|
|
70
|
-
data: {
|
|
71
|
-
readonly id: string & import("effect/Brand").Brand<"Schedule.ID">;
|
|
72
|
-
readonly sessionID?: (string & import("effect/Brand").Brand<"SessionID">) | undefined;
|
|
73
|
-
readonly name?: string | undefined;
|
|
74
|
-
readonly when: {
|
|
75
|
-
readonly tz?: string | undefined;
|
|
76
|
-
readonly type: "in";
|
|
77
|
-
readonly in: string;
|
|
78
|
-
} | {
|
|
79
|
-
readonly tz?: string | undefined;
|
|
80
|
-
readonly type: "at";
|
|
81
|
-
readonly at: string;
|
|
82
|
-
} | {
|
|
83
|
-
readonly tz?: string | undefined;
|
|
84
|
-
readonly type: "every";
|
|
85
|
-
readonly every: string;
|
|
86
|
-
} | {
|
|
87
|
-
readonly tz?: string | undefined;
|
|
88
|
-
readonly type: "cron";
|
|
89
|
-
readonly cron: string;
|
|
90
|
-
};
|
|
91
|
-
readonly tz: string;
|
|
92
|
-
readonly if?: {
|
|
93
|
-
readonly type: "code";
|
|
94
|
-
readonly code: string;
|
|
95
|
-
} | {
|
|
96
|
-
readonly type: "shell";
|
|
97
|
-
readonly run: string;
|
|
98
|
-
readonly is?: string | undefined;
|
|
99
|
-
readonly matches?: string | undefined;
|
|
100
|
-
readonly changes?: boolean | undefined;
|
|
101
|
-
} | undefined;
|
|
102
|
-
readonly until?: {
|
|
103
|
-
readonly type: "code";
|
|
104
|
-
readonly code: string;
|
|
105
|
-
} | {
|
|
106
|
-
readonly type: "shell";
|
|
107
|
-
readonly run: string;
|
|
108
|
-
readonly is?: string | undefined;
|
|
109
|
-
readonly matches?: string | undefined;
|
|
110
|
-
readonly changes?: boolean | undefined;
|
|
111
|
-
} | undefined;
|
|
112
|
-
readonly action: {
|
|
113
|
-
readonly type: "prompt";
|
|
114
|
-
readonly prompt: string;
|
|
115
|
-
};
|
|
116
|
-
readonly status: "active" | "done" | "paused";
|
|
117
|
-
readonly nextDueAt?: import("effect/DateTime").Utc | undefined;
|
|
118
|
-
readonly endsAt?: import("effect/DateTime").Utc | undefined;
|
|
119
|
-
readonly remainingRuns?: number | undefined;
|
|
120
|
-
readonly runCount: number;
|
|
121
|
-
readonly lastFiredAt?: import("effect/DateTime").Utc | undefined;
|
|
122
|
-
readonly lastOutcome?: "checked" | "disabled" | "expired" | "failed" | "fired" | "late" | "skipped" | undefined;
|
|
123
|
-
readonly lastOutput?: string | undefined;
|
|
124
|
-
readonly time: {
|
|
125
|
-
readonly created: import("effect/DateTime").Utc;
|
|
126
|
-
readonly updated: import("effect/DateTime").Utc;
|
|
127
|
-
};
|
|
128
|
-
}[];
|
|
129
|
-
}, ForbiddenError | import("@opencode/protocol/errors").SessionNotFoundError, never>;
|
|
130
|
-
get: (id: Schedule.ID) => Effect.Effect<{
|
|
131
|
-
data: {
|
|
132
|
-
readonly id: string & import("effect/Brand").Brand<"Schedule.ID">;
|
|
133
|
-
readonly sessionID?: (string & import("effect/Brand").Brand<"SessionID">) | undefined;
|
|
134
|
-
readonly name?: string | undefined;
|
|
135
|
-
readonly when: {
|
|
136
|
-
readonly tz?: string | undefined;
|
|
137
|
-
readonly type: "in";
|
|
138
|
-
readonly in: string;
|
|
139
|
-
} | {
|
|
140
|
-
readonly tz?: string | undefined;
|
|
141
|
-
readonly type: "at";
|
|
142
|
-
readonly at: string;
|
|
143
|
-
} | {
|
|
144
|
-
readonly tz?: string | undefined;
|
|
145
|
-
readonly type: "every";
|
|
146
|
-
readonly every: string;
|
|
147
|
-
} | {
|
|
148
|
-
readonly tz?: string | undefined;
|
|
149
|
-
readonly type: "cron";
|
|
150
|
-
readonly cron: string;
|
|
151
|
-
};
|
|
152
|
-
readonly tz: string;
|
|
153
|
-
readonly if?: {
|
|
154
|
-
readonly type: "code";
|
|
155
|
-
readonly code: string;
|
|
156
|
-
} | {
|
|
157
|
-
readonly type: "shell";
|
|
158
|
-
readonly run: string;
|
|
159
|
-
readonly is?: string | undefined;
|
|
160
|
-
readonly matches?: string | undefined;
|
|
161
|
-
readonly changes?: boolean | undefined;
|
|
162
|
-
} | undefined;
|
|
163
|
-
readonly until?: {
|
|
164
|
-
readonly type: "code";
|
|
165
|
-
readonly code: string;
|
|
166
|
-
} | {
|
|
167
|
-
readonly type: "shell";
|
|
168
|
-
readonly run: string;
|
|
169
|
-
readonly is?: string | undefined;
|
|
170
|
-
readonly matches?: string | undefined;
|
|
171
|
-
readonly changes?: boolean | undefined;
|
|
172
|
-
} | undefined;
|
|
173
|
-
readonly action: {
|
|
174
|
-
readonly type: "prompt";
|
|
175
|
-
readonly prompt: string;
|
|
176
|
-
};
|
|
177
|
-
readonly status: "active" | "done" | "paused";
|
|
178
|
-
readonly nextDueAt?: import("effect/DateTime").Utc | undefined;
|
|
179
|
-
readonly endsAt?: import("effect/DateTime").Utc | undefined;
|
|
180
|
-
readonly remainingRuns?: number | undefined;
|
|
181
|
-
readonly runCount: number;
|
|
182
|
-
readonly lastFiredAt?: import("effect/DateTime").Utc | undefined;
|
|
183
|
-
readonly lastOutcome?: "checked" | "disabled" | "expired" | "failed" | "fired" | "late" | "skipped" | undefined;
|
|
184
|
-
readonly lastOutput?: string | undefined;
|
|
185
|
-
readonly time: {
|
|
186
|
-
readonly created: import("effect/DateTime").Utc;
|
|
187
|
-
readonly updated: import("effect/DateTime").Utc;
|
|
188
|
-
};
|
|
189
|
-
};
|
|
190
|
-
}, ForbiddenError | ScheduleNotFoundError, never>;
|
|
191
|
-
pause: (id: Schedule.ID) => Effect.Effect<{
|
|
192
|
-
data: {
|
|
193
|
-
readonly id: string & import("effect/Brand").Brand<"Schedule.ID">;
|
|
194
|
-
readonly sessionID?: (string & import("effect/Brand").Brand<"SessionID">) | undefined;
|
|
195
|
-
readonly name?: string | undefined;
|
|
196
|
-
readonly when: {
|
|
197
|
-
readonly tz?: string | undefined;
|
|
198
|
-
readonly type: "in";
|
|
199
|
-
readonly in: string;
|
|
200
|
-
} | {
|
|
201
|
-
readonly tz?: string | undefined;
|
|
202
|
-
readonly type: "at";
|
|
203
|
-
readonly at: string;
|
|
204
|
-
} | {
|
|
205
|
-
readonly tz?: string | undefined;
|
|
206
|
-
readonly type: "every";
|
|
207
|
-
readonly every: string;
|
|
208
|
-
} | {
|
|
209
|
-
readonly tz?: string | undefined;
|
|
210
|
-
readonly type: "cron";
|
|
211
|
-
readonly cron: string;
|
|
212
|
-
};
|
|
213
|
-
readonly tz: string;
|
|
214
|
-
readonly if?: {
|
|
215
|
-
readonly type: "code";
|
|
216
|
-
readonly code: string;
|
|
217
|
-
} | {
|
|
218
|
-
readonly type: "shell";
|
|
219
|
-
readonly run: string;
|
|
220
|
-
readonly is?: string | undefined;
|
|
221
|
-
readonly matches?: string | undefined;
|
|
222
|
-
readonly changes?: boolean | undefined;
|
|
223
|
-
} | undefined;
|
|
224
|
-
readonly until?: {
|
|
225
|
-
readonly type: "code";
|
|
226
|
-
readonly code: string;
|
|
227
|
-
} | {
|
|
228
|
-
readonly type: "shell";
|
|
229
|
-
readonly run: string;
|
|
230
|
-
readonly is?: string | undefined;
|
|
231
|
-
readonly matches?: string | undefined;
|
|
232
|
-
readonly changes?: boolean | undefined;
|
|
233
|
-
} | undefined;
|
|
234
|
-
readonly action: {
|
|
235
|
-
readonly type: "prompt";
|
|
236
|
-
readonly prompt: string;
|
|
237
|
-
};
|
|
238
|
-
readonly status: "active" | "done" | "paused";
|
|
239
|
-
readonly nextDueAt?: import("effect/DateTime").Utc | undefined;
|
|
240
|
-
readonly endsAt?: import("effect/DateTime").Utc | undefined;
|
|
241
|
-
readonly remainingRuns?: number | undefined;
|
|
242
|
-
readonly runCount: number;
|
|
243
|
-
readonly lastFiredAt?: import("effect/DateTime").Utc | undefined;
|
|
244
|
-
readonly lastOutcome?: "checked" | "disabled" | "expired" | "failed" | "fired" | "late" | "skipped" | undefined;
|
|
245
|
-
readonly lastOutput?: string | undefined;
|
|
246
|
-
readonly time: {
|
|
247
|
-
readonly created: import("effect/DateTime").Utc;
|
|
248
|
-
readonly updated: import("effect/DateTime").Utc;
|
|
249
|
-
};
|
|
250
|
-
};
|
|
251
|
-
}, ForbiddenError | ScheduleNotFoundError, never>;
|
|
252
|
-
resume: (id: Schedule.ID) => Effect.Effect<{
|
|
253
|
-
data: {
|
|
254
|
-
readonly id: string & import("effect/Brand").Brand<"Schedule.ID">;
|
|
255
|
-
readonly sessionID?: (string & import("effect/Brand").Brand<"SessionID">) | undefined;
|
|
256
|
-
readonly name?: string | undefined;
|
|
257
|
-
readonly when: {
|
|
258
|
-
readonly tz?: string | undefined;
|
|
259
|
-
readonly type: "in";
|
|
260
|
-
readonly in: string;
|
|
261
|
-
} | {
|
|
262
|
-
readonly tz?: string | undefined;
|
|
263
|
-
readonly type: "at";
|
|
264
|
-
readonly at: string;
|
|
265
|
-
} | {
|
|
266
|
-
readonly tz?: string | undefined;
|
|
267
|
-
readonly type: "every";
|
|
268
|
-
readonly every: string;
|
|
269
|
-
} | {
|
|
270
|
-
readonly tz?: string | undefined;
|
|
271
|
-
readonly type: "cron";
|
|
272
|
-
readonly cron: string;
|
|
273
|
-
};
|
|
274
|
-
readonly tz: string;
|
|
275
|
-
readonly if?: {
|
|
276
|
-
readonly type: "code";
|
|
277
|
-
readonly code: string;
|
|
278
|
-
} | {
|
|
279
|
-
readonly type: "shell";
|
|
280
|
-
readonly run: string;
|
|
281
|
-
readonly is?: string | undefined;
|
|
282
|
-
readonly matches?: string | undefined;
|
|
283
|
-
readonly changes?: boolean | undefined;
|
|
284
|
-
} | undefined;
|
|
285
|
-
readonly until?: {
|
|
286
|
-
readonly type: "code";
|
|
287
|
-
readonly code: string;
|
|
288
|
-
} | {
|
|
289
|
-
readonly type: "shell";
|
|
290
|
-
readonly run: string;
|
|
291
|
-
readonly is?: string | undefined;
|
|
292
|
-
readonly matches?: string | undefined;
|
|
293
|
-
readonly changes?: boolean | undefined;
|
|
294
|
-
} | undefined;
|
|
295
|
-
readonly action: {
|
|
296
|
-
readonly type: "prompt";
|
|
297
|
-
readonly prompt: string;
|
|
298
|
-
};
|
|
299
|
-
readonly status: "active" | "done" | "paused";
|
|
300
|
-
readonly nextDueAt?: import("effect/DateTime").Utc | undefined;
|
|
301
|
-
readonly endsAt?: import("effect/DateTime").Utc | undefined;
|
|
302
|
-
readonly remainingRuns?: number | undefined;
|
|
303
|
-
readonly runCount: number;
|
|
304
|
-
readonly lastFiredAt?: import("effect/DateTime").Utc | undefined;
|
|
305
|
-
readonly lastOutcome?: "checked" | "disabled" | "expired" | "failed" | "fired" | "late" | "skipped" | undefined;
|
|
306
|
-
readonly lastOutput?: string | undefined;
|
|
307
|
-
readonly time: {
|
|
308
|
-
readonly created: import("effect/DateTime").Utc;
|
|
309
|
-
readonly updated: import("effect/DateTime").Utc;
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
|
-
}, ForbiddenError | ScheduleNotFoundError, never>;
|
|
313
|
-
remove: (id: Schedule.ID) => Effect.Effect<void, ForbiddenError | ScheduleNotFoundError, never>;
|
|
314
|
-
}, never, Schedule.Service>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|