@opencode/server 2.2.7 → 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.
Files changed (142) hide show
  1. package/dist/api.d.ts +148 -1
  2. package/dist/api.js +5 -5
  3. package/dist/auth.js +1 -1
  4. package/dist/chunks/{process-zmgfywqd.js → request-tracing-05c5061t.js} +1 -1
  5. package/dist/chunks/{process-r5696se6.js → request-tracing-0e81et3m.js} +3 -3
  6. package/dist/chunks/{process-mx6chrwy.js → request-tracing-0gf4dfn8.js} +35 -35
  7. package/dist/chunks/{process-amndpc82.js → request-tracing-2pbbrzpp.js} +2 -2
  8. package/dist/chunks/{process-e6e4kz0w.js → request-tracing-39nnfjx1.js} +4 -4
  9. package/dist/chunks/{process-5pdfedjd.js → request-tracing-3te71694.js} +4 -4
  10. package/dist/chunks/{process-jqvq1ywe.js → request-tracing-4ed680xg.js} +2 -2
  11. package/dist/chunks/{process-370cpmna.js → request-tracing-4p2y0qs3.js} +2 -2
  12. package/dist/chunks/{process-gqq6kfhc.js → request-tracing-50bbk3b2.js} +3 -3
  13. package/dist/chunks/{process-78rcgzsr.js → request-tracing-78rcgzsr.js} +1 -1
  14. package/dist/chunks/{process-7b9xm1qg.js → request-tracing-7b9xm1qg.js} +1 -1
  15. package/dist/chunks/{process-fszbw5sk.js → request-tracing-7nb2rv11.js} +4 -4
  16. package/dist/chunks/{process-zds85vps.js → request-tracing-861wfsmy.js} +1 -1
  17. package/dist/chunks/request-tracing-8sb6qqpn.js +28 -0
  18. package/dist/chunks/request-tracing-9cd3a4b8.js +69 -0
  19. package/dist/chunks/{process-vtfzy3at.js → request-tracing-9grnt8dc.js} +2 -2
  20. package/dist/chunks/{process-5553qfcy.js → request-tracing-ap1t95t8.js} +3 -3
  21. package/dist/chunks/{process-wqv43pj9.js → request-tracing-ayveq98d.js} +23 -3
  22. package/dist/chunks/{process-yet0vexm.js → request-tracing-b3bmdkga.js} +1 -1
  23. package/dist/chunks/{process-xpg37vzc.js → request-tracing-b4mqtccx.js} +2 -2
  24. package/dist/chunks/{process-4z8yg1dv.js → request-tracing-d4534456.js} +4 -4
  25. package/dist/chunks/{process-rcmctvp9.js → request-tracing-d8b9pm2q.js} +1 -1
  26. package/dist/chunks/{process-p3f060n2.js → request-tracing-dezpcckc.js} +2 -2
  27. package/dist/chunks/{process-djr0jy89.js → request-tracing-djr0jy89.js} +1 -1
  28. package/dist/chunks/{process-7cd61xtm.js → request-tracing-dx89xydc.js} +2 -2
  29. package/dist/chunks/{process-2835150m.js → request-tracing-et00mhwf.js} +2 -2
  30. package/dist/chunks/{process-rxyx8sa0.js → request-tracing-f8r9p2vr.js} +2 -2
  31. package/dist/chunks/{process-wecgp61r.js → request-tracing-fvpjvjpp.js} +7 -7
  32. package/dist/chunks/{process-zgw0abca.js → request-tracing-g6yhb3a8.js} +16 -22
  33. package/dist/chunks/{process-jc2vwkyw.js → request-tracing-h1thjy6x.js} +2 -2
  34. package/dist/chunks/{process-agenqygg.js → request-tracing-h286a6py.js} +2 -2
  35. package/dist/chunks/{process-gk0yxcp6.js → request-tracing-htyf2qs7.js} +1 -1
  36. package/dist/chunks/{process-0e4fm4yw.js → request-tracing-hx8bsq9d.js} +1 -1
  37. package/dist/chunks/{process-j4at0y5c.js → request-tracing-j4at0y5c.js} +1 -1
  38. package/dist/chunks/{process-r2veymj8.js → request-tracing-jjvpqmx6.js} +4 -4
  39. package/dist/chunks/{process-50xc6x42.js → request-tracing-kg0ybx4v.js} +3 -3
  40. package/dist/chunks/{process-myqk22k5.js → request-tracing-myqk22k5.js} +2 -2
  41. package/dist/chunks/{process-kqr36gas.js → request-tracing-mzs0n5xz.js} +7 -7
  42. package/dist/chunks/request-tracing-n26yr6pw.js +21 -0
  43. package/dist/chunks/{process-5kr30cfc.js → request-tracing-n5et0xgm.js} +8 -8
  44. package/dist/chunks/{process-w5yp0ga8.js → request-tracing-p86kew8c.js} +2 -2
  45. package/dist/chunks/{process-xbqm7mpj.js → request-tracing-q44yktpv.js} +2 -2
  46. package/dist/chunks/{process-zgvwy66h.js → request-tracing-r7knxm63.js} +7 -20
  47. package/dist/chunks/{process-dfxfd950.js → request-tracing-rd9e3qfx.js} +4 -4
  48. package/dist/chunks/{process-skcryrty.js → request-tracing-s9tkswmw.js} +2 -2
  49. package/dist/chunks/request-tracing-sy2e93cn.js +46 -0
  50. package/dist/chunks/{process-t32e1bbt.js → request-tracing-t32e1bbt.js} +1 -1
  51. package/dist/chunks/{process-1vxxxmgg.js → request-tracing-tk56ffsq.js} +2 -2
  52. package/dist/chunks/{process-xjbee3xk.js → request-tracing-v0r38a4t.js} +31 -19
  53. package/dist/chunks/{process-7x1re4zg.js → request-tracing-v8aqacn3.js} +2 -2
  54. package/dist/chunks/{process-sqxx1p54.js → request-tracing-vbgqk0mr.js} +2 -2
  55. package/dist/chunks/{process-vvp99hc9.js → request-tracing-x4b2rtcb.js} +1 -1
  56. package/dist/chunks/{process-f3xrm535.js → request-tracing-z2ndp6vh.js} +6 -6
  57. package/dist/chunks/{process-74kxthdf.js → request-tracing-zbe9jfhy.js} +1 -1
  58. package/dist/content-headers.js +1 -1
  59. package/dist/cors.js +1 -1
  60. package/dist/event-feed.js +5 -5
  61. package/dist/fetch.d.ts +3 -0
  62. package/dist/fetch.js +61 -58
  63. package/dist/handlers/agent.js +6 -6
  64. package/dist/handlers/artifact.js +3 -3
  65. package/dist/handlers/automation.d.ts +25 -0
  66. package/dist/handlers/automation.js +7 -0
  67. package/dist/handlers/blob.d.ts +7 -0
  68. package/dist/handlers/blob.js +8 -0
  69. package/dist/handlers/command.js +6 -6
  70. package/dist/handlers/config.js +6 -6
  71. package/dist/handlers/credential.js +7 -7
  72. package/dist/handlers/debug.js +6 -6
  73. package/dist/handlers/event.js +7 -7
  74. package/dist/handlers/form.js +6 -6
  75. package/dist/handlers/fs.js +8 -7
  76. package/dist/handlers/generate.d.ts +2 -1
  77. package/dist/handlers/generate.js +6 -6
  78. package/dist/handlers/integration.js +6 -6
  79. package/dist/handlers/job.d.ts +11 -1
  80. package/dist/handlers/job.js +2 -2
  81. package/dist/handlers/location.js +6 -6
  82. package/dist/handlers/mcp.js +8 -8
  83. package/dist/handlers/media.js +2 -2
  84. package/dist/handlers/message.js +7 -7
  85. package/dist/handlers/migration.js +6 -6
  86. package/dist/handlers/model.js +6 -6
  87. package/dist/handlers/permission.js +6 -6
  88. package/dist/handlers/persistent-pty.d.ts +1 -1
  89. package/dist/handlers/persistent-pty.js +15 -13
  90. package/dist/handlers/plugin.js +6 -6
  91. package/dist/handlers/project.js +6 -6
  92. package/dist/handlers/provider.js +6 -6
  93. package/dist/handlers/pty-socket.js +1 -1
  94. package/dist/handlers/pty.js +8 -8
  95. package/dist/handlers/reference.js +6 -6
  96. package/dist/handlers/rpc.js +6 -6
  97. package/dist/handlers/server.js +9 -9
  98. package/dist/handlers/session-error.js +1 -1
  99. package/dist/handlers/session.js +7 -7
  100. package/dist/handlers/shell.js +6 -6
  101. package/dist/handlers/skill.js +6 -6
  102. package/dist/handlers/usage.js +6 -6
  103. package/dist/handlers/vcs.js +6 -6
  104. package/dist/handlers/voice.js +6 -6
  105. package/dist/handlers/websearch.js +6 -6
  106. package/dist/handlers/worktree.js +6 -6
  107. package/dist/handlers.d.ts +1 -1
  108. package/dist/handlers.js +52 -50
  109. package/dist/location.js +4 -4
  110. package/dist/media-uri.js +1 -1
  111. package/dist/middleware/authorization.js +2 -2
  112. package/dist/middleware/defect-response.d.ts +2 -0
  113. package/dist/middleware/defect-response.js +6 -0
  114. package/dist/middleware/form-location.js +3 -3
  115. package/dist/middleware/schema-error.js +1 -1
  116. package/dist/middleware/session-location.js +3 -3
  117. package/dist/options.d.ts +3 -0
  118. package/dist/options.js +3 -0
  119. package/dist/pairing.js +3 -3
  120. package/dist/process.d.ts +3 -0
  121. package/dist/process.js +64 -61
  122. package/dist/range.d.ts +6 -0
  123. package/dist/range.js +8 -0
  124. package/dist/request-site.js +2 -2
  125. package/dist/request-tracing.js +1 -1
  126. package/dist/routes.d.ts +6 -3
  127. package/dist/routes.js +56 -53
  128. package/dist/server-info.js +3 -3
  129. package/dist/service-status.js +3 -3
  130. package/dist/workerd.d.ts +1 -0
  131. package/dist/workerd.js +66 -59
  132. package/package.json +9 -9
  133. package/dist/chunks/process-059rbh9c.js +0 -43
  134. package/dist/handlers/schedule.d.ts +0 -314
  135. package/dist/handlers/schedule.js +0 -7
  136. /package/dist/chunks/{process-9rqn6x4v.js → request-tracing-9rqn6x4v.js} +0 -0
  137. /package/dist/chunks/{process-bd8755ek.js → request-tracing-bd8755ek.js} +0 -0
  138. /package/dist/chunks/{process-q187pxxd.js → request-tracing-q187pxxd.js} +0 -0
  139. /package/dist/chunks/{process-q4bn6dy8.js → request-tracing-q4bn6dy8.js} +0 -0
  140. /package/dist/chunks/{process-smaf4a18.js → request-tracing-smaf4a18.js} +0 -0
  141. /package/dist/chunks/{process-xthc02cw.js → request-tracing-xthc02cw.js} +0 -0
  142. /package/dist/chunks/{process-yc7nft6q.js → request-tracing-yc7nft6q.js} +0 -0
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./process-gqq6kfhc.js";
3
+ } from "./request-tracing-50bbk3b2.js";
4
4
  import {
5
5
  Api2
6
- } from "./process-r5696se6.js";
6
+ } from "./request-tracing-0e81et3m.js";
7
7
 
8
8
  // src/handlers/skill.ts
9
9
  import { Skill } from "@opencode/core/skill";
@@ -1,12 +1,15 @@
1
1
  import {
2
2
  response2
3
- } from "./process-gqq6kfhc.js";
3
+ } from "./request-tracing-50bbk3b2.js";
4
4
  import {
5
5
  Api2
6
- } from "./process-r5696se6.js";
6
+ } from "./request-tracing-0e81et3m.js";
7
7
  import {
8
8
  download2
9
- } from "./process-t32e1bbt.js";
9
+ } from "./request-tracing-t32e1bbt.js";
10
+ import {
11
+ parse2
12
+ } from "./request-tracing-8sb6qqpn.js";
10
13
 
11
14
  // src/handlers/fs.ts
12
15
  import { FileSystem } from "@opencode/core/filesystem";
@@ -71,7 +74,7 @@ function serveFile(request, file, content) {
71
74
  if (isNotModified(request, etag, lastModified))
72
75
  return HttpServerResponse.empty({ status: 304, headers: { ...validators, ...content } });
73
76
  const rangeHeader = request.method === "GET" ? request.headers["range"] : undefined;
74
- const range = rangeHeader !== undefined && matchesIfRange(request.headers["if-range"], etag, lastModified) ? parseRange(rangeHeader, file.size) : undefined;
77
+ const range = rangeHeader !== undefined && matchesIfRange(request.headers["if-range"], etag, lastModified) ? parse2(rangeHeader, file.size) : undefined;
75
78
  if (range === "unsatisfiable")
76
79
  return HttpServerResponse.empty({
77
80
  status: 416,
@@ -107,21 +110,5 @@ function matchesIfRange(ifRange, etag, lastModified) {
107
110
  function stripWeak(etag) {
108
111
  return etag.trim().replace(/^w\//i, "");
109
112
  }
110
- function parseRange(header, size) {
111
- const match = /^bytes=\s*(\d*)\s*-\s*(\d*)\s*$/i.exec(header.trim());
112
- if (match === null || match[1] === "" && match[2] === "")
113
- return;
114
- if (match[1] === "") {
115
- const suffix = Number(match[2]);
116
- if (suffix === 0 || size === 0)
117
- return "unsatisfiable";
118
- return { start: Math.max(size - suffix, 0), end: size - 1 };
119
- }
120
- const start = Number(match[1]);
121
- const end = match[2] === "" ? size - 1 : Number(match[2]);
122
- if (start > end || start >= size)
123
- return "unsatisfiable";
124
- return { start, end: Math.min(end, size - 1) };
125
- }
126
113
 
127
114
  export { FileSystemHandler2 };
@@ -3,16 +3,16 @@ import {
3
3
  missingMessage2,
4
4
  failedMessageDecode2,
5
5
  failedSnapshot2
6
- } from "./process-smaf4a18.js";
6
+ } from "./request-tracing-smaf4a18.js";
7
7
  import {
8
8
  locationErrors2
9
- } from "./process-gqq6kfhc.js";
9
+ } from "./request-tracing-50bbk3b2.js";
10
10
  import {
11
11
  Api2
12
- } from "./process-r5696se6.js";
12
+ } from "./request-tracing-0e81et3m.js";
13
13
  import {
14
14
  wantsMediaRefs2
15
- } from "./process-xthc02cw.js";
15
+ } from "./request-tracing-xthc02cw.js";
16
16
 
17
17
  // src/handlers/session.ts
18
18
  import { Instance } from "@opencode/core/instance/service";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./process-gqq6kfhc.js";
3
+ } from "./request-tracing-50bbk3b2.js";
4
4
  import {
5
5
  Api2
6
- } from "./process-r5696se6.js";
6
+ } from "./request-tracing-0e81et3m.js";
7
7
 
8
8
  // src/handlers/reference.ts
9
9
  import { Reference } from "@opencode/core/reference";
@@ -0,0 +1,46 @@
1
+ import {
2
+ download2
3
+ } from "./request-tracing-t32e1bbt.js";
4
+ import {
5
+ parse2
6
+ } from "./request-tracing-8sb6qqpn.js";
7
+
8
+ // src/handlers/blob.ts
9
+ import { BlobStore } from "@opencode/core/blob-store";
10
+ import { BlobNotFoundError } from "@opencode/protocol/errors";
11
+ import { FSUtil } from "@opencode/util/fs-util";
12
+ import { Effect } from "effect";
13
+ import { HttpServerResponse } from "effect/http";
14
+ var makeBlobGet2 = Effect.gen(function* () {
15
+ const blobs = yield* BlobStore.Service;
16
+ const fs = yield* FSUtil.Service;
17
+ return (id, request) => Effect.gen(function* () {
18
+ const blob = yield* blobs.read(id).pipe(Effect.mapError((error) => new BlobNotFoundError({ blobID: error.id, message: error.message })));
19
+ const etag = `"${id}"`;
20
+ const headers = {
21
+ ...download2({ mime: blob.mime }),
22
+ "cache-control": "private, max-age=604800, immutable",
23
+ etag,
24
+ "accept-ranges": "bytes"
25
+ };
26
+ if (request.headers["if-none-match"]?.split(",").some((tag) => tag.trim() === "*" || tag.trim().replace(/^w\//i, "") === etag))
27
+ return HttpServerResponse.empty({ status: 304, headers });
28
+ const ifRange = request.headers["if-range"];
29
+ const range = ifRange === undefined || ifRange.trim() === etag ? parse2(request.headers["range"], blob.bytes) : undefined;
30
+ if (range === "unsatisfiable")
31
+ return HttpServerResponse.empty({
32
+ status: 416,
33
+ headers: { ...headers, "content-range": `bytes */${blob.bytes}` }
34
+ });
35
+ const offset = range?.start ?? 0;
36
+ const length = range === undefined ? blob.bytes : range.end - range.start + 1;
37
+ return HttpServerResponse.stream(fs.stream(blob.path, { offset, bytesToRead: length }), {
38
+ status: range === undefined ? 200 : 206,
39
+ contentType: headers["content-type"],
40
+ contentLength: length,
41
+ headers: range === undefined ? headers : { ...headers, "content-range": `bytes ${range.start}-${range.end}/${blob.bytes}` }
42
+ });
43
+ });
44
+ });
45
+
46
+ export { makeBlobGet2 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./process-9rqn6x4v.js";
3
+ } from "./request-tracing-9rqn6x4v.js";
4
4
 
5
5
  // src/content-headers.ts
6
6
  var exports_content_headers = {};
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Api2
3
- } from "./process-r5696se6.js";
3
+ } from "./request-tracing-0e81et3m.js";
4
4
  import {
5
5
  requireConnectable2
6
- } from "./process-amndpc82.js";
6
+ } from "./request-tracing-2pbbrzpp.js";
7
7
 
8
8
  // src/handlers/credential.ts
9
9
  import { Credential } from "@opencode/core/credential";
@@ -1,36 +1,39 @@
1
1
  import {
2
- layer3
3
- } from "./process-gqq6kfhc.js";
2
+ layer4
3
+ } from "./request-tracing-50bbk3b2.js";
4
4
  import {
5
5
  formLocationLayer2
6
- } from "./process-gk0yxcp6.js";
6
+ } from "./request-tracing-htyf2qs7.js";
7
7
  import {
8
8
  sessionLocationLayer2
9
- } from "./process-yet0vexm.js";
9
+ } from "./request-tracing-b3bmdkga.js";
10
10
  import {
11
11
  Api2
12
- } from "./process-r5696se6.js";
12
+ } from "./request-tracing-0e81et3m.js";
13
13
  import {
14
14
  Config2
15
- } from "./process-j4at0y5c.js";
15
+ } from "./request-tracing-j4at0y5c.js";
16
16
  import {
17
17
  CorsConfig2
18
- } from "./process-q4bn6dy8.js";
18
+ } from "./request-tracing-q4bn6dy8.js";
19
19
  import {
20
- layer2
21
- } from "./process-5pdfedjd.js";
20
+ layer3
21
+ } from "./request-tracing-3te71694.js";
22
22
  import {
23
23
  node2
24
- } from "./process-kqr36gas.js";
24
+ } from "./request-tracing-mzs0n5xz.js";
25
25
  import {
26
26
  handlers2
27
- } from "./process-mx6chrwy.js";
27
+ } from "./request-tracing-0gf4dfn8.js";
28
28
  import {
29
29
  authorizationLayer2
30
- } from "./process-7b9xm1qg.js";
30
+ } from "./request-tracing-7b9xm1qg.js";
31
31
  import {
32
32
  schemaErrorLayer2
33
- } from "./process-bd8755ek.js";
33
+ } from "./request-tracing-bd8755ek.js";
34
+ import {
35
+ defectResponseLayer2
36
+ } from "./request-tracing-n26yr6pw.js";
34
37
 
35
38
  // src/routes.ts
36
39
  import { Database } from "@opencode/core/database/database";
@@ -48,12 +51,15 @@ import { PermissionSaved } from "@opencode/core/permission/saved";
48
51
  import { PtyTicket } from "@opencode/core/pty/ticket";
49
52
  import { PersistentPty } from "@opencode/core/persistent-pty";
50
53
  import { Project } from "@opencode/core/project";
54
+ import { BlobStore } from "@opencode/core/blob-store";
55
+ import { VideoGeneration } from "@opencode/core/video-generation";
51
56
  import { Worktree } from "@opencode/core/worktree";
52
57
  import { Session } from "@opencode/core/session";
53
58
  import { Instance } from "@opencode/core/instance/service";
54
59
  import { SessionTransfer } from "@opencode/core/session/transfer";
55
60
  import { InstructionEntry } from "@opencode/core/session/instruction-entry";
56
61
  import { ShellSelect } from "@opencode/core/shell/select";
62
+ import { Shell } from "@opencode/core/shell";
57
63
  import { Job } from "@opencode/core/job";
58
64
  import { KV } from "@opencode/core/kv";
59
65
  import { Mcp } from "@opencode/core/mcp/index";
@@ -64,7 +70,7 @@ import { LocationServiceMap } from "@opencode/core/location-service-map";
64
70
  import { LocationActivity } from "@opencode/core/location-activity";
65
71
  import { ModelsDev } from "@opencode/core/models-dev";
66
72
  import { SessionRestart } from "@opencode/core/session/execution/restart";
67
- import { Schedule } from "@opencode/core/schedule";
73
+ import { Automation } from "@opencode/core/automation";
68
74
  import { PluginUpdate } from "@opencode/core/plugin/update";
69
75
  import { SdkPlugins } from "@opencode/core/plugin/sdk";
70
76
  import { WellKnown } from "@opencode/core/wellknown";
@@ -81,6 +87,8 @@ var applicationServiceNodes = [
81
87
  Database.node,
82
88
  KV.node,
83
89
  Bus.node,
90
+ PersistentPty.node,
91
+ Shell.daemonNode,
84
92
  EventLogger.node,
85
93
  httpClient,
86
94
  Job.node,
@@ -95,14 +103,15 @@ var applicationServiceNodes = [
95
103
  PluginUpdate.node,
96
104
  PermissionSaved.node,
97
105
  PtyTicket.node,
98
- PersistentPty.node,
99
106
  Credential.node,
100
107
  WellKnown.node,
101
108
  node2,
102
109
  LocationServiceMap.node,
103
110
  LocationActivity.node,
104
111
  SessionRestart.node,
105
- Schedule.node,
112
+ Automation.node,
113
+ BlobStore.node,
114
+ VideoGeneration.node,
106
115
  Workspace.node,
107
116
  FileWatch.node
108
117
  ];
@@ -131,7 +140,10 @@ function makeRoutes(auth, options, serviceURLs, overrides, instances) {
131
140
  file: options.config?.file,
132
141
  content: options.config?.content
133
142
  })),
134
- InstructionDiscovery.node.replace(InstructionDiscovery.configured({ project: options.config?.project })),
143
+ InstructionDiscovery.node.replace(InstructionDiscovery.configured({
144
+ project: options.config?.project,
145
+ claude: options.instructions?.claude
146
+ })),
135
147
  ShellSelect.node.replace(ShellSelect.configured({ gitbash: options.windows?.gitbash })),
136
148
  Mcp.node.replace(Mcp.configured({
137
149
  clientInfo: {
@@ -155,8 +167,8 @@ function makeRoutes(auth, options, serviceURLs, overrides, instances) {
155
167
  })) : build(overrides);
156
168
  return serviceLayer.pipe(Layer.flatMap((context) => {
157
169
  const services = Layer.succeedContext(context);
158
- 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));
159
- 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(layer3), Layer.provide(authorizationLayer2), Layer.provide(schemaErrorLayer2), Layer.provide(auth), HttpRouter.provideRequest(requestServices), Layer.provideMerge(services), Layer.provideMerge(HttpRouter.layer));
170
+ const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer3(serviceURLs, Context.get(context, Global.Service).tmp, options.app));
171
+ 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));
160
172
  return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
161
173
  }));
162
174
  }
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./process-gqq6kfhc.js";
3
+ } from "./request-tracing-50bbk3b2.js";
4
4
  import {
5
5
  Api2
6
- } from "./process-r5696se6.js";
6
+ } from "./request-tracing-0e81et3m.js";
7
7
 
8
8
  // src/handlers/form.ts
9
9
  import { Form } from "@opencode/core/form";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  response2
3
- } from "./process-gqq6kfhc.js";
3
+ } from "./request-tracing-50bbk3b2.js";
4
4
  import {
5
5
  Api2
6
- } from "./process-r5696se6.js";
6
+ } from "./request-tracing-0e81et3m.js";
7
7
 
8
8
  // src/handlers/plugin.ts
9
9
  import { Plugin } from "@opencode/core/plugin";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./process-r5696se6.js";
3
+ } from "./request-tracing-0e81et3m.js";
4
4
 
5
5
  // src/handlers/migration.ts
6
6
  import { V1Migration } from "@opencode/core/database/v1-migration";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Api2
3
- } from "./process-r5696se6.js";
3
+ } from "./request-tracing-0e81et3m.js";
4
4
  import {
5
5
  SESSION_TTL_SECONDS2,
6
6
  Config2,
7
7
  issueSession2,
8
8
  sessionCookieName2
9
- } from "./process-j4at0y5c.js";
9
+ } from "./request-tracing-j4at0y5c.js";
10
10
  import {
11
11
  Service3
12
- } from "./process-5pdfedjd.js";
12
+ } from "./request-tracing-3te71694.js";
13
13
  import {
14
- Service2
15
- } from "./process-kqr36gas.js";
14
+ Service4
15
+ } from "./request-tracing-mzs0n5xz.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* Service2;
25
+ const pairing = yield* Service4;
26
26
  const auth = yield* Config2;
27
27
  return handlers.handle("server.info", () => Effect.gen(function* () {
28
28
  const info = yield* Service3;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Api2
3
- } from "./process-r5696se6.js";
3
+ } from "./request-tracing-0e81et3m.js";
4
4
 
5
5
  // src/handlers/location.ts
6
6
  import { Location } from "@opencode/core/location";
@@ -3,7 +3,7 @@ import {
3
3
  download2,
4
4
  disposition2,
5
5
  exports_content_headers
6
- } from "./chunks/process-t32e1bbt.js";
6
+ } from "./chunks/request-tracing-t32e1bbt.js";
7
7
  export {
8
8
  CONTENT_SECURITY_POLICY2 as CONTENT_SECURITY_POLICY,
9
9
  exports_content_headers as ContentHeaders,
package/dist/cors.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  CorsConfig2,
3
3
  isAllowedCorsOrigin2,
4
4
  isAllowedRequestOrigin2
5
- } from "./chunks/process-q4bn6dy8.js";
5
+ } from "./chunks/request-tracing-q4bn6dy8.js";
6
6
  export {
7
7
  CorsConfig2 as CorsConfig,
8
8
  isAllowedCorsOrigin2 as isAllowedCorsOrigin,
@@ -2,19 +2,19 @@ import {
2
2
  SubscriberCapacity2,
3
3
  SubscriberOverflowError2,
4
4
  EncodingError2,
5
- Service4,
5
+ Service2,
6
6
  frame2,
7
7
  make4,
8
- layer4,
8
+ layer2,
9
9
  exports_event_feed
10
- } from "./chunks/process-wecgp61r.js";
10
+ } from "./chunks/request-tracing-fvpjvjpp.js";
11
11
  export {
12
12
  EncodingError2 as EncodingError,
13
13
  exports_event_feed as EventFeed,
14
- Service4 as Service,
14
+ Service2 as Service,
15
15
  SubscriberCapacity2 as SubscriberCapacity,
16
16
  SubscriberOverflowError2 as SubscriberOverflowError,
17
17
  frame2 as frame,
18
- layer4 as layer,
18
+ layer2 as layer,
19
19
  make4 as make
20
20
  };
package/dist/fetch.d.ts CHANGED
@@ -70,6 +70,9 @@ export declare const make: (options?: {
70
70
  readonly file?: string | undefined;
71
71
  readonly content?: string | undefined;
72
72
  } | undefined;
73
+ readonly instructions?: {
74
+ readonly claude?: boolean | undefined;
75
+ } | undefined;
73
76
  readonly windows?: {
74
77
  readonly gitbash?: string | undefined;
75
78
  } | undefined;
package/dist/fetch.js CHANGED
@@ -1,63 +1,66 @@
1
1
  import {
2
- make2,
2
+ make3,
3
3
  exports_fetch
4
- } from "./chunks/process-5kr30cfc.js";
5
- import"./chunks/process-yc7nft6q.js";
6
- import"./chunks/process-xjbee3xk.js";
7
- import"./chunks/process-bd8755ek.js";
8
- import"./chunks/process-7b9xm1qg.js";
9
- import"./chunks/process-myqk22k5.js";
10
- import"./chunks/process-mx6chrwy.js";
11
- import"./chunks/process-zmgfywqd.js";
12
- import"./chunks/process-370cpmna.js";
13
- import"./chunks/process-jqvq1ywe.js";
14
- import"./chunks/process-jc2vwkyw.js";
15
- import"./chunks/process-dfxfd950.js";
16
- import"./chunks/process-rxyx8sa0.js";
17
- import"./chunks/process-p3f060n2.js";
18
- import"./chunks/process-74kxthdf.js";
19
- import"./chunks/process-sqxx1p54.js";
20
- import"./chunks/process-fszbw5sk.js";
21
- import"./chunks/process-50xc6x42.js";
22
- import"./chunks/process-5553qfcy.js";
23
- import"./chunks/process-7cd61xtm.js";
24
- import"./chunks/process-0e4fm4yw.js";
25
- import"./chunks/process-2835150m.js";
26
- import"./chunks/process-wqv43pj9.js";
27
- import"./chunks/process-zds85vps.js";
28
- import"./chunks/process-vvp99hc9.js";
29
- import"./chunks/process-7x1re4zg.js";
30
- import"./chunks/process-r2veymj8.js";
31
- import"./chunks/process-zgw0abca.js";
32
- import"./chunks/process-djr0jy89.js";
33
- import"./chunks/process-w5yp0ga8.js";
34
- import"./chunks/process-78rcgzsr.js";
35
- import"./chunks/process-agenqygg.js";
36
- import"./chunks/process-1vxxxmgg.js";
37
- import"./chunks/process-amndpc82.js";
38
- import"./chunks/process-skcryrty.js";
39
- import"./chunks/process-vtfzy3at.js";
40
- import"./chunks/process-rcmctvp9.js";
41
- import"./chunks/process-zgvwy66h.js";
42
- import"./chunks/process-xpg37vzc.js";
43
- import"./chunks/process-4z8yg1dv.js";
44
- import"./chunks/process-q187pxxd.js";
45
- import"./chunks/process-f3xrm535.js";
46
- import"./chunks/process-xbqm7mpj.js";
47
- import"./chunks/process-059rbh9c.js";
48
- import"./chunks/process-kqr36gas.js";
49
- import"./chunks/process-xthc02cw.js";
50
- import"./chunks/process-j4at0y5c.js";
51
- import"./chunks/process-5pdfedjd.js";
52
- import"./chunks/process-q4bn6dy8.js";
53
- import"./chunks/process-t32e1bbt.js";
54
- import"./chunks/process-r5696se6.js";
55
- import"./chunks/process-gk0yxcp6.js";
56
- import"./chunks/process-yet0vexm.js";
57
- import"./chunks/process-gqq6kfhc.js";
58
- import"./chunks/process-smaf4a18.js";
59
- import"./chunks/process-wecgp61r.js";
4
+ } from "./chunks/request-tracing-n5et0xgm.js";
5
+ import"./chunks/request-tracing-v0r38a4t.js";
6
+ import"./chunks/request-tracing-n26yr6pw.js";
7
+ import"./chunks/request-tracing-7b9xm1qg.js";
8
+ import"./chunks/request-tracing-bd8755ek.js";
9
+ import"./chunks/request-tracing-myqk22k5.js";
10
+ import"./chunks/request-tracing-yc7nft6q.js";
11
+ import"./chunks/request-tracing-0gf4dfn8.js";
12
+ import"./chunks/request-tracing-h286a6py.js";
13
+ import"./chunks/request-tracing-v8aqacn3.js";
14
+ import"./chunks/request-tracing-7nb2rv11.js";
15
+ import"./chunks/request-tracing-tk56ffsq.js";
16
+ import"./chunks/request-tracing-2pbbrzpp.js";
17
+ import"./chunks/request-tracing-d8b9pm2q.js";
18
+ import"./chunks/request-tracing-x4b2rtcb.js";
19
+ import"./chunks/request-tracing-dezpcckc.js";
20
+ import"./chunks/request-tracing-ayveq98d.js";
21
+ import"./chunks/request-tracing-z2ndp6vh.js";
22
+ import"./chunks/request-tracing-q44yktpv.js";
23
+ import"./chunks/request-tracing-g6yhb3a8.js";
24
+ import"./chunks/request-tracing-p86kew8c.js";
25
+ import"./chunks/request-tracing-b4mqtccx.js";
26
+ import"./chunks/request-tracing-h1thjy6x.js";
27
+ import"./chunks/request-tracing-vbgqk0mr.js";
28
+ import"./chunks/request-tracing-sy2e93cn.js";
29
+ import"./chunks/request-tracing-861wfsmy.js";
30
+ import"./chunks/request-tracing-4p2y0qs3.js";
31
+ import"./chunks/request-tracing-hx8bsq9d.js";
32
+ import"./chunks/request-tracing-zbe9jfhy.js";
33
+ import"./chunks/request-tracing-s9tkswmw.js";
34
+ import"./chunks/request-tracing-d4534456.js";
35
+ import"./chunks/request-tracing-djr0jy89.js";
36
+ import"./chunks/request-tracing-r7knxm63.js";
37
+ import"./chunks/request-tracing-9cd3a4b8.js";
38
+ import"./chunks/request-tracing-9grnt8dc.js";
39
+ import"./chunks/request-tracing-78rcgzsr.js";
40
+ import"./chunks/request-tracing-4ed680xg.js";
41
+ import"./chunks/request-tracing-kg0ybx4v.js";
42
+ import"./chunks/request-tracing-et00mhwf.js";
43
+ import"./chunks/request-tracing-05c5061t.js";
44
+ import"./chunks/request-tracing-dx89xydc.js";
45
+ import"./chunks/request-tracing-jjvpqmx6.js";
46
+ import"./chunks/request-tracing-q187pxxd.js";
47
+ import"./chunks/request-tracing-ap1t95t8.js";
48
+ import"./chunks/request-tracing-rd9e3qfx.js";
49
+ import"./chunks/request-tracing-f8r9p2vr.js";
50
+ import"./chunks/request-tracing-fvpjvjpp.js";
51
+ import"./chunks/request-tracing-3te71694.js";
52
+ import"./chunks/request-tracing-q4bn6dy8.js";
53
+ import"./chunks/request-tracing-0e81et3m.js";
54
+ import"./chunks/request-tracing-b3bmdkga.js";
55
+ import"./chunks/request-tracing-htyf2qs7.js";
56
+ import"./chunks/request-tracing-50bbk3b2.js";
57
+ import"./chunks/request-tracing-smaf4a18.js";
58
+ import"./chunks/request-tracing-t32e1bbt.js";
59
+ import"./chunks/request-tracing-mzs0n5xz.js";
60
+ import"./chunks/request-tracing-j4at0y5c.js";
61
+ import"./chunks/request-tracing-xthc02cw.js";
62
+ import"./chunks/request-tracing-8sb6qqpn.js";
60
63
  export {
61
64
  exports_fetch as ServerFetch,
62
- make2 as make
65
+ make3 as make
63
66
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  AgentHandler2
3
- } from "../chunks/process-p3f060n2.js";
4
- import"../chunks/process-r5696se6.js";
5
- import"../chunks/process-gk0yxcp6.js";
6
- import"../chunks/process-yet0vexm.js";
7
- import"../chunks/process-gqq6kfhc.js";
8
- import"../chunks/process-smaf4a18.js";
3
+ } from "../chunks/request-tracing-dezpcckc.js";
4
+ import"../chunks/request-tracing-0e81et3m.js";
5
+ import"../chunks/request-tracing-b3bmdkga.js";
6
+ import"../chunks/request-tracing-htyf2qs7.js";
7
+ import"../chunks/request-tracing-50bbk3b2.js";
8
+ import"../chunks/request-tracing-smaf4a18.js";
9
9
  export {
10
10
  AgentHandler2 as AgentHandler
11
11
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  makeArtifact2
3
- } from "../chunks/process-w5yp0ga8.js";
4
- import"../chunks/process-gqq6kfhc.js";
5
- import"../chunks/process-smaf4a18.js";
3
+ } from "../chunks/request-tracing-p86kew8c.js";
4
+ import"../chunks/request-tracing-50bbk3b2.js";
5
+ import"../chunks/request-tracing-smaf4a18.js";
6
6
  export {
7
7
  makeArtifact2 as makeArtifact
8
8
  };
@@ -0,0 +1,25 @@
1
+ import { Automation } from "@opencode/core/automation";
2
+ import { Project } from "@opencode/core/project";
3
+ import { Session } from "@opencode/core/session";
4
+ import { AutomationNotFoundError, ForbiddenError, InvalidRequestError } from "@opencode/protocol/errors";
5
+ import type { CreatePayload, ListQuery } from "@opencode/protocol/groups/automation";
6
+ import { Effect } from "effect";
7
+ /** `automation.*` in the `server.experimental` group. Every route needs experimental.automations where it runs. */
8
+ export declare const makeAutomation: Effect.Effect<{
9
+ create: (payload: CreatePayload) => Effect.Effect<{
10
+ data: Automation.Info;
11
+ }, ForbiddenError | InvalidRequestError | import("@opencode/protocol/errors").SessionNotFoundError, never>;
12
+ list: (query: ListQuery) => Effect.Effect<{
13
+ data: Automation.Info[];
14
+ }, ForbiddenError | InvalidRequestError | import("@opencode/protocol/errors").SessionNotFoundError, never>;
15
+ get: (id: Automation.ID) => Effect.Effect<{
16
+ data: Automation.Info;
17
+ }, AutomationNotFoundError | ForbiddenError, never>;
18
+ pause: (id: Automation.ID) => Effect.Effect<{
19
+ data: Automation.Info;
20
+ }, AutomationNotFoundError | ForbiddenError, never>;
21
+ resume: (id: Automation.ID) => Effect.Effect<{
22
+ data: Automation.Info;
23
+ }, AutomationNotFoundError | ForbiddenError, never>;
24
+ remove: (id: Automation.ID) => Effect.Effect<void, AutomationNotFoundError | ForbiddenError, never>;
25
+ }, never, Session.Service | Automation.Service | Project.Service>;
@@ -0,0 +1,7 @@
1
+ import {
2
+ makeAutomation2
3
+ } from "../chunks/request-tracing-9cd3a4b8.js";
4
+ import"../chunks/request-tracing-smaf4a18.js";
5
+ export {
6
+ makeAutomation2 as makeAutomation
7
+ };
@@ -0,0 +1,7 @@
1
+ import { BlobStore } from "@opencode/core/blob-store";
2
+ import { BlobNotFoundError } from "@opencode/protocol/errors";
3
+ import { FSUtil } from "@opencode/util/fs-util";
4
+ import { Effect } from "effect";
5
+ import { type HttpServerRequest, HttpServerResponse } from "effect/http";
6
+ /** `blob.get` in the `server.experimental` group. Raw, so it can stream the file and answer Range and 304 itself. */
7
+ export declare const makeBlobGet: Effect.Effect<(id: BlobStore.ID, request: HttpServerRequest.HttpServerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, BlobNotFoundError, never>, never, FSUtil.Service | BlobStore.Service>;
@@ -0,0 +1,8 @@
1
+ import {
2
+ makeBlobGet2
3
+ } from "../chunks/request-tracing-sy2e93cn.js";
4
+ import"../chunks/request-tracing-t32e1bbt.js";
5
+ import"../chunks/request-tracing-8sb6qqpn.js";
6
+ export {
7
+ makeBlobGet2 as makeBlobGet
8
+ };