@opencode/server 2.3.0 → 2.3.2

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.
Files changed (141) hide show
  1. package/dist/api.js +5 -5
  2. package/dist/auth.js +1 -1
  3. package/dist/chunks/{auth-09kw3a77.js → media-uri-09kw3a77.js} +2 -2
  4. package/dist/chunks/{auth-5s0wnsg4.js → media-uri-1gwc8nvb.js} +3 -3
  5. package/dist/chunks/{auth-yqhefp4s.js → media-uri-1h6b4sc5.js} +23 -3
  6. package/dist/chunks/{auth-2eaky32g.js → media-uri-2eaky32g.js} +2 -2
  7. package/dist/chunks/{auth-e6e4kz0w.js → media-uri-39nnfjx1.js} +4 -4
  8. package/dist/chunks/{auth-6jfbq4sw.js → media-uri-3pb3n73h.js} +35 -35
  9. package/dist/chunks/{auth-4q6e7fh8.js → media-uri-4q6e7fh8.js} +2 -2
  10. package/dist/chunks/{auth-50bbk3b2.js → media-uri-50bbk3b2.js} +1 -1
  11. package/dist/chunks/{auth-5cpb32hf.js → media-uri-5cpb32hf.js} +1 -1
  12. package/dist/chunks/{auth-6kawhtwy.js → media-uri-6kawhtwy.js} +4 -4
  13. package/dist/chunks/{auth-6z9pvq7p.js → media-uri-6z9pvq7p.js} +1 -1
  14. package/dist/chunks/{auth-78rcgzsr.js → media-uri-78rcgzsr.js} +1 -1
  15. package/dist/chunks/{auth-7b9xm1qg.js → media-uri-7b9xm1qg.js} +1 -1
  16. package/dist/chunks/{auth-8mj7kvhm.js → media-uri-8mj7kvhm.js} +2 -2
  17. package/dist/chunks/media-uri-8sb6qqpn.js +28 -0
  18. package/dist/chunks/{auth-91858wp1.js → media-uri-91858wp1.js} +2 -2
  19. package/dist/chunks/media-uri-9cd3a4b8.js +69 -0
  20. package/dist/chunks/{auth-a8jcac9a.js → media-uri-a8jcac9a.js} +1 -1
  21. package/dist/chunks/{auth-az0609r6.js → media-uri-az0609r6.js} +2 -2
  22. package/dist/chunks/{auth-b3bmdkga.js → media-uri-b3bmdkga.js} +1 -1
  23. package/dist/chunks/{auth-a4mwssda.js → media-uri-b4rhnd07.js} +15 -11
  24. package/dist/chunks/{auth-btahnm2b.js → media-uri-btahnm2b.js} +3 -3
  25. package/dist/chunks/{auth-cezwbsk5.js → media-uri-cezwbsk5.js} +1 -1
  26. package/dist/chunks/{auth-n1423xpw.js → media-uri-cmnrxx36.js} +2 -2
  27. package/dist/chunks/media-uri-cr5sd8bz.js +46 -0
  28. package/dist/chunks/{auth-d0edqfxx.js → media-uri-d0edqfxx.js} +2 -2
  29. package/dist/chunks/{auth-djr0jy89.js → media-uri-djr0jy89.js} +1 -1
  30. package/dist/chunks/{auth-enp1bp7r.js → media-uri-enp1bp7r.js} +1 -1
  31. package/dist/chunks/{auth-f559fakr.js → media-uri-f559fakr.js} +2 -2
  32. package/dist/chunks/{auth-htyf2qs7.js → media-uri-htyf2qs7.js} +1 -1
  33. package/dist/chunks/{auth-j4at0y5c.js → media-uri-j4at0y5c.js} +1 -1
  34. package/dist/chunks/{auth-j87xz9bt.js → media-uri-j87xz9bt.js} +3 -3
  35. package/dist/chunks/{auth-kkdkqt8j.js → media-uri-kkdkqt8j.js} +2 -2
  36. package/dist/chunks/{auth-myqk22k5.js → media-uri-myqk22k5.js} +2 -2
  37. package/dist/chunks/{auth-kqr36gas.js → media-uri-mzs0n5xz.js} +7 -7
  38. package/dist/chunks/{auth-bm3bken1.js → media-uri-n0chxnkn.js} +7 -20
  39. package/dist/chunks/media-uri-n26yr6pw.js +21 -0
  40. package/dist/chunks/{auth-ny1j968n.js → media-uri-ny1j968n.js} +2 -2
  41. package/dist/chunks/{auth-p86kew8c.js → media-uri-p86kew8c.js} +2 -2
  42. package/dist/chunks/{auth-qcg3sqtb.js → media-uri-qcg3sqtb.js} +2 -2
  43. package/dist/chunks/{auth-qd0r787n.js → media-uri-qd0r787n.js} +2 -2
  44. package/dist/chunks/{auth-3p9jwgak.js → media-uri-qfyg9gb7.js} +4 -4
  45. package/dist/chunks/{auth-rha2aq18.js → media-uri-rha2aq18.js} +2 -2
  46. package/dist/chunks/{auth-rs3v36hp.js → media-uri-rs3v36hp.js} +2 -2
  47. package/dist/chunks/{auth-etdgpyr8.js → media-uri-sssj0qa5.js} +27 -17
  48. package/dist/chunks/{auth-gyryr0mf.js → media-uri-ssxxka7j.js} +4 -4
  49. package/dist/chunks/{auth-t32e1bbt.js → media-uri-t32e1bbt.js} +1 -1
  50. package/dist/chunks/{auth-pab2cyby.js → media-uri-tbqv89f6.js} +8 -8
  51. package/dist/chunks/{auth-te8jwba1.js → media-uri-te8jwba1.js} +2 -2
  52. package/dist/chunks/{auth-zkya65ny.js → media-uri-wmep189j.js} +8 -8
  53. package/dist/chunks/{auth-yk755swr.js → media-uri-yk755swr.js} +2 -2
  54. package/dist/chunks/{auth-yjbzmfhm.js → media-uri-z3e7v67k.js} +7 -7
  55. package/dist/chunks/{auth-z9zyd4qg.js → media-uri-z9zyd4qg.js} +4 -4
  56. package/dist/chunks/{auth-zcvan105.js → media-uri-zcvan105.js} +1 -1
  57. package/dist/content-headers.js +1 -1
  58. package/dist/cors.js +1 -1
  59. package/dist/event-feed.js +3 -3
  60. package/dist/fetch.d.ts +3 -0
  61. package/dist/fetch.js +61 -58
  62. package/dist/handlers/agent.js +6 -6
  63. package/dist/handlers/artifact.js +3 -3
  64. package/dist/handlers/automation.d.ts +25 -0
  65. package/dist/handlers/automation.js +7 -0
  66. package/dist/handlers/blob.d.ts +7 -0
  67. package/dist/handlers/blob.js +8 -0
  68. package/dist/handlers/command.js +6 -6
  69. package/dist/handlers/config.js +6 -6
  70. package/dist/handlers/credential.js +7 -7
  71. package/dist/handlers/debug.js +6 -6
  72. package/dist/handlers/event.js +7 -7
  73. package/dist/handlers/form.js +6 -6
  74. package/dist/handlers/fs.js +8 -7
  75. package/dist/handlers/generate.d.ts +2 -1
  76. package/dist/handlers/generate.js +6 -6
  77. package/dist/handlers/integration.js +6 -6
  78. package/dist/handlers/job.d.ts +11 -1
  79. package/dist/handlers/job.js +2 -2
  80. package/dist/handlers/location.js +6 -6
  81. package/dist/handlers/mcp.js +8 -8
  82. package/dist/handlers/media.js +2 -2
  83. package/dist/handlers/message.js +7 -7
  84. package/dist/handlers/migration.js +6 -6
  85. package/dist/handlers/model.js +6 -6
  86. package/dist/handlers/permission.js +6 -6
  87. package/dist/handlers/persistent-pty.d.ts +1 -1
  88. package/dist/handlers/persistent-pty.js +15 -13
  89. package/dist/handlers/plugin.js +6 -6
  90. package/dist/handlers/project.js +6 -6
  91. package/dist/handlers/provider.js +6 -6
  92. package/dist/handlers/pty-socket.js +1 -1
  93. package/dist/handlers/pty.js +8 -8
  94. package/dist/handlers/reference.js +6 -6
  95. package/dist/handlers/rpc.js +6 -6
  96. package/dist/handlers/server.js +9 -9
  97. package/dist/handlers/session-error.js +1 -1
  98. package/dist/handlers/session.js +7 -7
  99. package/dist/handlers/shell.js +6 -6
  100. package/dist/handlers/skill.js +6 -6
  101. package/dist/handlers/usage.js +6 -6
  102. package/dist/handlers/vcs.js +6 -6
  103. package/dist/handlers/voice.js +6 -6
  104. package/dist/handlers/websearch.js +6 -6
  105. package/dist/handlers/worktree.js +6 -6
  106. package/dist/handlers.d.ts +1 -1
  107. package/dist/handlers.js +52 -50
  108. package/dist/location.js +2 -2
  109. package/dist/media-uri.js +1 -1
  110. package/dist/middleware/authorization.js +2 -2
  111. package/dist/middleware/defect-response.d.ts +2 -0
  112. package/dist/middleware/defect-response.js +6 -0
  113. package/dist/middleware/form-location.js +3 -3
  114. package/dist/middleware/schema-error.js +1 -1
  115. package/dist/middleware/session-location.js +3 -3
  116. package/dist/options.d.ts +3 -0
  117. package/dist/options.js +3 -0
  118. package/dist/pairing.js +3 -3
  119. package/dist/process.d.ts +3 -0
  120. package/dist/process.js +64 -61
  121. package/dist/range.d.ts +6 -0
  122. package/dist/range.js +8 -0
  123. package/dist/request-site.js +2 -2
  124. package/dist/request-tracing.js +1 -1
  125. package/dist/routes.d.ts +5 -3
  126. package/dist/routes.js +56 -53
  127. package/dist/server-info.js +5 -5
  128. package/dist/service-status.js +3 -3
  129. package/dist/workerd.d.ts +1 -0
  130. package/dist/workerd.js +66 -59
  131. package/package.json +9 -9
  132. package/dist/chunks/auth-059rbh9c.js +0 -43
  133. package/dist/handlers/schedule.d.ts +0 -314
  134. package/dist/handlers/schedule.js +0 -7
  135. /package/dist/chunks/{auth-9rqn6x4v.js → media-uri-9rqn6x4v.js} +0 -0
  136. /package/dist/chunks/{auth-bd8755ek.js → media-uri-bd8755ek.js} +0 -0
  137. /package/dist/chunks/{auth-q187pxxd.js → media-uri-q187pxxd.js} +0 -0
  138. /package/dist/chunks/{auth-q4bn6dy8.js → media-uri-q4bn6dy8.js} +0 -0
  139. /package/dist/chunks/{auth-smaf4a18.js → media-uri-smaf4a18.js} +0 -0
  140. /package/dist/chunks/{auth-xthc02cw.js → media-uri-xthc02cw.js} +0 -0
  141. /package/dist/chunks/{auth-yc7nft6q.js → media-uri-yc7nft6q.js} +0 -0
package/dist/workerd.js CHANGED
@@ -1,64 +1,67 @@
1
- import"./chunks/auth-q4bn6dy8.js";
2
- import"./chunks/auth-myqk22k5.js";
3
- import"./chunks/auth-yc7nft6q.js";
4
- import"./chunks/auth-smaf4a18.js";
5
- import"./chunks/auth-50bbk3b2.js";
6
- import"./chunks/auth-htyf2qs7.js";
7
- import"./chunks/auth-b3bmdkga.js";
8
- import"./chunks/auth-j87xz9bt.js";
9
- import"./chunks/auth-j4at0y5c.js";
10
- import"./chunks/auth-yqhefp4s.js";
11
- import"./chunks/auth-d0edqfxx.js";
12
- import"./chunks/auth-xthc02cw.js";
13
- import"./chunks/auth-5s0wnsg4.js";
14
- import"./chunks/auth-rha2aq18.js";
15
- import"./chunks/auth-az0609r6.js";
16
- import"./chunks/auth-gyryr0mf.js";
17
- import"./chunks/auth-btahnm2b.js";
18
- import"./chunks/auth-t32e1bbt.js";
19
- import"./chunks/auth-bm3bken1.js";
20
- import"./chunks/auth-f559fakr.js";
21
- import"./chunks/auth-4q6e7fh8.js";
22
- import"./chunks/auth-ny1j968n.js";
23
- import"./chunks/auth-5cpb32hf.js";
24
- import"./chunks/auth-3p9jwgak.js";
25
- import"./chunks/auth-n1423xpw.js";
26
- import"./chunks/auth-8mj7kvhm.js";
27
- import"./chunks/auth-2eaky32g.js";
28
- import"./chunks/auth-yjbzmfhm.js";
29
- import"./chunks/auth-kqr36gas.js";
30
- import"./chunks/auth-zkya65ny.js";
31
- import"./chunks/auth-qcg3sqtb.js";
32
- import"./chunks/auth-q187pxxd.js";
33
- import"./chunks/auth-6kawhtwy.js";
34
- import"./chunks/auth-p86kew8c.js";
35
- import"./chunks/auth-78rcgzsr.js";
36
- import"./chunks/auth-djr0jy89.js";
37
- import"./chunks/auth-059rbh9c.js";
38
- import"./chunks/auth-a4mwssda.js";
39
- import"./chunks/auth-qd0r787n.js";
40
- import"./chunks/auth-te8jwba1.js";
41
- import"./chunks/auth-zcvan105.js";
42
- import"./chunks/auth-91858wp1.js";
43
- import"./chunks/auth-kkdkqt8j.js";
44
- import"./chunks/auth-09kw3a77.js";
45
- import"./chunks/auth-z9zyd4qg.js";
46
- import"./chunks/auth-yk755swr.js";
47
- import"./chunks/auth-a8jcac9a.js";
48
- import"./chunks/auth-enp1bp7r.js";
49
- import"./chunks/auth-rs3v36hp.js";
50
- import"./chunks/auth-6z9pvq7p.js";
51
- import"./chunks/auth-cezwbsk5.js";
52
- import"./chunks/auth-6jfbq4sw.js";
53
- import"./chunks/auth-7b9xm1qg.js";
54
- import"./chunks/auth-bd8755ek.js";
55
- import"./chunks/auth-etdgpyr8.js";
1
+ import"./chunks/media-uri-q4bn6dy8.js";
2
+ import"./chunks/media-uri-myqk22k5.js";
3
+ import"./chunks/media-uri-yc7nft6q.js";
4
+ import"./chunks/media-uri-smaf4a18.js";
5
+ import"./chunks/media-uri-50bbk3b2.js";
6
+ import"./chunks/media-uri-htyf2qs7.js";
7
+ import"./chunks/media-uri-b3bmdkga.js";
8
+ import"./chunks/media-uri-j87xz9bt.js";
9
+ import"./chunks/media-uri-j4at0y5c.js";
10
+ import"./chunks/media-uri-1h6b4sc5.js";
11
+ import"./chunks/media-uri-d0edqfxx.js";
12
+ import"./chunks/media-uri-xthc02cw.js";
13
+ import"./chunks/media-uri-1gwc8nvb.js";
14
+ import"./chunks/media-uri-rha2aq18.js";
15
+ import"./chunks/media-uri-az0609r6.js";
16
+ import"./chunks/media-uri-ssxxka7j.js";
17
+ import"./chunks/media-uri-btahnm2b.js";
18
+ import"./chunks/media-uri-t32e1bbt.js";
19
+ import"./chunks/media-uri-8sb6qqpn.js";
20
+ import"./chunks/media-uri-n0chxnkn.js";
21
+ import"./chunks/media-uri-f559fakr.js";
22
+ import"./chunks/media-uri-4q6e7fh8.js";
23
+ import"./chunks/media-uri-ny1j968n.js";
24
+ import"./chunks/media-uri-5cpb32hf.js";
25
+ import"./chunks/media-uri-qfyg9gb7.js";
26
+ import"./chunks/media-uri-cmnrxx36.js";
27
+ import"./chunks/media-uri-8mj7kvhm.js";
28
+ import"./chunks/media-uri-2eaky32g.js";
29
+ import"./chunks/media-uri-z3e7v67k.js";
30
+ import"./chunks/media-uri-mzs0n5xz.js";
31
+ import"./chunks/media-uri-wmep189j.js";
32
+ import"./chunks/media-uri-qcg3sqtb.js";
33
+ import"./chunks/media-uri-q187pxxd.js";
34
+ import"./chunks/media-uri-6kawhtwy.js";
35
+ import"./chunks/media-uri-p86kew8c.js";
36
+ import"./chunks/media-uri-cr5sd8bz.js";
37
+ import"./chunks/media-uri-9cd3a4b8.js";
38
+ import"./chunks/media-uri-78rcgzsr.js";
39
+ import"./chunks/media-uri-djr0jy89.js";
40
+ import"./chunks/media-uri-b4rhnd07.js";
41
+ import"./chunks/media-uri-qd0r787n.js";
42
+ import"./chunks/media-uri-te8jwba1.js";
43
+ import"./chunks/media-uri-zcvan105.js";
44
+ import"./chunks/media-uri-91858wp1.js";
45
+ import"./chunks/media-uri-kkdkqt8j.js";
46
+ import"./chunks/media-uri-09kw3a77.js";
47
+ import"./chunks/media-uri-z9zyd4qg.js";
48
+ import"./chunks/media-uri-yk755swr.js";
49
+ import"./chunks/media-uri-a8jcac9a.js";
50
+ import"./chunks/media-uri-enp1bp7r.js";
51
+ import"./chunks/media-uri-rs3v36hp.js";
52
+ import"./chunks/media-uri-6z9pvq7p.js";
53
+ import"./chunks/media-uri-cezwbsk5.js";
54
+ import"./chunks/media-uri-3pb3n73h.js";
55
+ import"./chunks/media-uri-7b9xm1qg.js";
56
+ import"./chunks/media-uri-bd8755ek.js";
57
+ import"./chunks/media-uri-n26yr6pw.js";
58
+ import"./chunks/media-uri-sssj0qa5.js";
56
59
  import {
57
- make2
58
- } from "./chunks/auth-pab2cyby.js";
60
+ make3
61
+ } from "./chunks/media-uri-tbqv89f6.js";
59
62
  import {
60
63
  __export
61
- } from "./chunks/auth-9rqn6x4v.js";
64
+ } from "./chunks/media-uri-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 make2(serverOptions(options), { overrides: replacements(options) });
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.0",
4
+ "version": "2.3.2",
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.0",
36
- "@opencode/protocol": "2.3.0",
37
- "@opencode/schema": "2.3.0",
38
- "@opencode/simulation": "2.3.0",
39
- "@opencode/util": "2.3.0",
35
+ "@opencode/core": "2.3.2",
36
+ "@opencode/protocol": "2.3.2",
37
+ "@opencode/schema": "2.3.2",
38
+ "@opencode/simulation": "2.3.2",
39
+ "@opencode/util": "2.3.2",
40
40
  "effect": "4.1.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@opencode/pty": "0.5.2",
44
- "@opencode/client": "2.3.0",
45
- "@opencode/plugin": "2.3.0",
43
+ "@opencode/pty": "0.6.0",
44
+ "@opencode/client": "2.3.2",
45
+ "@opencode/plugin": "2.3.2",
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>;
@@ -1,7 +0,0 @@
1
- import {
2
- makeSchedule2
3
- } from "../chunks/auth-059rbh9c.js";
4
- import"../chunks/auth-smaf4a18.js";
5
- export {
6
- makeSchedule2 as makeSchedule
7
- };