@opencode/server 0.0.0-dev-20483 → 0.0.0-dev-20485
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +1 -1
- package/dist/api.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/{handlers-rnws4wbc.js → fetch-00b7zw9n.js} +2 -2
- package/dist/chunks/{handlers-n1svm92q.js → fetch-0d9kah4z.js} +8 -8
- package/dist/chunks/{handlers-830yc5sa.js → fetch-0gwhtgb0.js} +2 -2
- package/dist/chunks/{handlers-77mkgw7d.js → fetch-0vcrsckz.js} +2 -2
- package/dist/chunks/{handlers-8j6eh3dh.js → fetch-14vy2pac.js} +13 -6
- package/dist/chunks/{handlers-42hredtt.js → fetch-2nwa3ky2.js} +2 -2
- package/dist/chunks/{handlers-54sczv30.js → fetch-2sy3c7de.js} +7 -7
- package/dist/chunks/{handlers-rre9g8c5.js → fetch-5w803dat.js} +5 -4
- package/dist/chunks/{handlers-27edjygf.js → fetch-6n8edpm0.js} +6 -5
- package/dist/chunks/{handlers-4zhj4tp6.js → fetch-6w79g1zd.js} +2 -2
- package/dist/chunks/{handlers-1syxrfr0.js → fetch-a44pvkv9.js} +3 -3
- package/dist/chunks/{handlers-334f1wqc.js → fetch-ajhv9q2g.js} +1 -1
- package/dist/chunks/{handlers-anm12x33.js → fetch-anm12x33.js} +1 -1
- package/dist/chunks/{handlers-rbn15j6z.js → fetch-byt4hbw9.js} +8 -8
- package/dist/chunks/{handlers-2nqgjchx.js → fetch-d261w70h.js} +2 -2
- package/dist/chunks/{handlers-t7mxrz5t.js → fetch-eces9922.js} +8 -8
- package/dist/chunks/{handlers-nq63h5nv.js → fetch-evmrcn2p.js} +2 -2
- package/dist/chunks/{handlers-h7dczx71.js → fetch-g27fjyd3.js} +2 -2
- package/dist/chunks/{handlers-8d2n01za.js → fetch-gesckh61.js} +2 -2
- package/dist/chunks/{handlers-9gjx5y7a.js → fetch-gr63yha5.js} +1 -1
- package/dist/chunks/{handlers-gtkdacvk.js → fetch-gtkdacvk.js} +1 -1
- package/dist/chunks/{handlers-fqvt1agm.js → fetch-h9qn14ck.js} +7 -7
- package/dist/chunks/{handlers-ybejac25.js → fetch-jv3gkh16.js} +2 -2
- package/dist/chunks/{handlers-tj793hqk.js → fetch-kcvfpwaw.js} +2 -2
- package/dist/chunks/{handlers-fbrf1xh2.js → fetch-kta0tack.js} +2 -2
- package/dist/chunks/{handlers-8tzsm9rr.js → fetch-kww1pvjb.js} +2 -2
- package/dist/chunks/{handlers-1g0h49bb.js → fetch-pmra5yx3.js} +2 -2
- package/dist/chunks/{handlers-sp0g6qt6.js → fetch-qf0s8ctx.js} +4 -4
- package/dist/chunks/{handlers-436zj0s2.js → fetch-qwcstt60.js} +1 -1
- package/dist/chunks/{handlers-m7cvtaax.js → fetch-r3mjvgfk.js} +1 -1
- package/dist/chunks/{handlers-c1rbvtgh.js → fetch-rdf72e8a.js} +33 -33
- package/dist/chunks/{handlers-3e7m37es.js → fetch-rytwz38r.js} +11 -8
- package/dist/chunks/{handlers-kb9735wh.js → fetch-tfdbmzkj.js} +5 -4
- package/dist/chunks/{handlers-mzr9gftb.js → fetch-v305azr7.js} +7 -7
- package/dist/chunks/{handlers-nq5wb210.js → fetch-vrg6639h.js} +2 -2
- package/dist/chunks/{handlers-t1ykn76g.js → fetch-w4srakgh.js} +19 -19
- package/dist/chunks/{handlers-qvxvnv5e.js → fetch-wkt3zs7x.js} +5 -2
- package/dist/chunks/{handlers-y7jha6td.js → fetch-wq6tfxrf.js} +1 -1
- package/dist/chunks/{handlers-cb0457h1.js → fetch-x22271m7.js} +3 -3
- package/dist/chunks/{handlers-xsrtpxyd.js → fetch-xsrtpxyd.js} +1 -1
- package/dist/chunks/{handlers-x34qkqqy.js → fetch-yddkh4zb.js} +2 -2
- package/dist/chunks/{handlers-9qna85w8.js → fetch-yjn29jjj.js} +3 -3
- package/dist/chunks/{handlers-ywj7qjmv.js → fetch-z854b9h8.js} +2 -2
- package/dist/chunks/{handlers-vgwss5ek.js → fetch-zgk9zpte.js} +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +5 -5
- package/dist/fetch.js +47 -47
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/command.js +6 -6
- package/dist/handlers/config.js +6 -6
- package/dist/handlers/credential.js +6 -6
- 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 +6 -6
- package/dist/handlers/generate.js +6 -6
- package/dist/handlers/integration.js +6 -6
- package/dist/handlers/location.js +6 -6
- package/dist/handlers/mcp.js +6 -6
- package/dist/handlers/message.js +6 -6
- 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.js +8 -8
- 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 +9 -9
- 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 +6 -6
- package/dist/handlers/shell.js +6 -6
- package/dist/handlers/skill.js +6 -6
- package/dist/handlers/vcs.js +6 -6
- package/dist/handlers/websearch.js +6 -6
- package/dist/handlers/worktree.js +6 -6
- package/dist/handlers.js +43 -43
- package/dist/location.d.ts +5 -3
- package/dist/location.js +6 -4
- package/dist/middleware/authorization.js +2 -2
- package/dist/middleware/form-location.d.ts +3 -3
- package/dist/middleware/form-location.js +3 -3
- package/dist/middleware/schema-error.js +1 -1
- package/dist/middleware/session-location.d.ts +3 -3
- package/dist/middleware/session-location.js +3 -3
- package/dist/pairing.js +5 -5
- package/dist/process.js +49 -49
- package/dist/pty-environment.js +7 -7
- package/dist/request-tracing.js +1 -1
- package/dist/routes.d.ts +2 -2
- package/dist/routes.js +46 -46
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +1 -1
- package/dist/workerd.js +48 -48
- package/package.json +8 -8
- /package/dist/chunks/{handlers-9rqn6x4v.js → fetch-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{handlers-hezj1jdf.js → fetch-hezj1jdf.js} +0 -0
- /package/dist/chunks/{handlers-q4bn6dy8.js → fetch-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{handlers-smaf4a18.js → fetch-smaf4a18.js} +0 -0
- /package/dist/chunks/{handlers-t8yzmczr.js → fetch-t8yzmczr.js} +0 -0
- /package/dist/chunks/{handlers-yc7nft6q.js → fetch-yc7nft6q.js} +0 -0
|
@@ -1,99 +1,99 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GenerateHandler2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-wkt3zs7x.js";
|
|
4
4
|
import {
|
|
5
5
|
MessageHandler2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-z854b9h8.js";
|
|
7
7
|
import {
|
|
8
8
|
ModelHandler2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./fetch-2nwa3ky2.js";
|
|
10
10
|
import {
|
|
11
11
|
ProviderHandler2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./fetch-kww1pvjb.js";
|
|
13
13
|
import {
|
|
14
14
|
SessionHandler2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./fetch-rytwz38r.js";
|
|
16
16
|
import {
|
|
17
17
|
PermissionHandler2
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./fetch-5w803dat.js";
|
|
19
19
|
import {
|
|
20
20
|
FileSystemHandler2
|
|
21
|
-
} from "./
|
|
21
|
+
} from "./fetch-vrg6639h.js";
|
|
22
22
|
import {
|
|
23
23
|
FormHandler2
|
|
24
|
-
} from "./
|
|
24
|
+
} from "./fetch-g27fjyd3.js";
|
|
25
25
|
import {
|
|
26
26
|
CommandHandler2
|
|
27
|
-
} from "./
|
|
27
|
+
} from "./fetch-00b7zw9n.js";
|
|
28
28
|
import {
|
|
29
29
|
SkillHandler2
|
|
30
|
-
} from "./
|
|
30
|
+
} from "./fetch-6w79g1zd.js";
|
|
31
31
|
import {
|
|
32
32
|
RpcHandler2
|
|
33
|
-
} from "./
|
|
33
|
+
} from "./fetch-zgk9zpte.js";
|
|
34
34
|
import {
|
|
35
|
-
|
|
36
|
-
} from "./
|
|
35
|
+
layer2
|
|
36
|
+
} from "./fetch-2sy3c7de.js";
|
|
37
37
|
import {
|
|
38
38
|
EventHandler2
|
|
39
|
-
} from "./
|
|
39
|
+
} from "./fetch-qf0s8ctx.js";
|
|
40
40
|
import {
|
|
41
41
|
AgentHandler2
|
|
42
|
-
} from "./
|
|
42
|
+
} from "./fetch-yddkh4zb.js";
|
|
43
43
|
import {
|
|
44
44
|
PluginHandler2
|
|
45
|
-
} from "./
|
|
45
|
+
} from "./fetch-kta0tack.js";
|
|
46
46
|
import {
|
|
47
47
|
ServerHandler2
|
|
48
|
-
} from "./
|
|
48
|
+
} from "./fetch-eces9922.js";
|
|
49
49
|
import {
|
|
50
50
|
DebugHandler2
|
|
51
|
-
} from "./
|
|
51
|
+
} from "./fetch-kcvfpwaw.js";
|
|
52
52
|
import {
|
|
53
53
|
PtyHandler2
|
|
54
|
-
} from "./
|
|
54
|
+
} from "./fetch-h9qn14ck.js";
|
|
55
55
|
import {
|
|
56
56
|
PersistentPtyHandler2
|
|
57
|
-
} from "./
|
|
57
|
+
} from "./fetch-yjn29jjj.js";
|
|
58
58
|
import {
|
|
59
59
|
ShellHandler2
|
|
60
|
-
} from "./
|
|
60
|
+
} from "./fetch-evmrcn2p.js";
|
|
61
61
|
import {
|
|
62
62
|
ReferenceHandler2
|
|
63
|
-
} from "./
|
|
63
|
+
} from "./fetch-pmra5yx3.js";
|
|
64
64
|
import {
|
|
65
65
|
LocationHandler2
|
|
66
|
-
} from "./
|
|
66
|
+
} from "./fetch-0gwhtgb0.js";
|
|
67
67
|
import {
|
|
68
68
|
IntegrationHandler2
|
|
69
|
-
} from "./
|
|
69
|
+
} from "./fetch-jv3gkh16.js";
|
|
70
70
|
import {
|
|
71
71
|
WebSearchHandler2
|
|
72
|
-
} from "./
|
|
72
|
+
} from "./fetch-0vcrsckz.js";
|
|
73
73
|
import {
|
|
74
74
|
McpHandler2
|
|
75
|
-
} from "./
|
|
75
|
+
} from "./fetch-d261w70h.js";
|
|
76
76
|
import {
|
|
77
77
|
CredentialHandler2
|
|
78
|
-
} from "./
|
|
78
|
+
} from "./fetch-ajhv9q2g.js";
|
|
79
79
|
import {
|
|
80
80
|
ProjectHandler2
|
|
81
|
-
} from "./
|
|
81
|
+
} from "./fetch-gr63yha5.js";
|
|
82
82
|
import {
|
|
83
83
|
WorktreeHandler2
|
|
84
|
-
} from "./
|
|
84
|
+
} from "./fetch-r3mjvgfk.js";
|
|
85
85
|
import {
|
|
86
86
|
VcsHandler2
|
|
87
|
-
} from "./
|
|
87
|
+
} from "./fetch-gesckh61.js";
|
|
88
88
|
import {
|
|
89
89
|
MigrationHandler2
|
|
90
|
-
} from "./
|
|
90
|
+
} from "./fetch-wq6tfxrf.js";
|
|
91
91
|
import {
|
|
92
92
|
ConfigHandler2
|
|
93
|
-
} from "./
|
|
93
|
+
} from "./fetch-qwcstt60.js";
|
|
94
94
|
|
|
95
95
|
// src/handlers.ts
|
|
96
96
|
import { Layer } from "effect";
|
|
97
|
-
var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(
|
|
97
|
+
var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(layer2)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
|
|
98
98
|
|
|
99
99
|
export { handlers2 };
|
|
@@ -3,10 +3,13 @@ import {
|
|
|
3
3
|
missingMessage2,
|
|
4
4
|
failedMessageDecode2,
|
|
5
5
|
failedSnapshot2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-smaf4a18.js";
|
|
7
|
+
import {
|
|
8
|
+
locationErrors2
|
|
9
|
+
} from "./fetch-14vy2pac.js";
|
|
7
10
|
import {
|
|
8
11
|
Api2
|
|
9
|
-
} from "./
|
|
12
|
+
} from "./fetch-x22271m7.js";
|
|
10
13
|
|
|
11
14
|
// src/handlers/session.ts
|
|
12
15
|
import { Session } from "@opencode/core/session";
|
|
@@ -188,7 +191,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
188
191
|
}).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.PromptConflictError", (error) => Effect.fail(new ConflictError({
|
|
189
192
|
message: `Prompt message ID conflicts with an existing durable record: ${error.messageID}`,
|
|
190
193
|
resource: error.messageID
|
|
191
|
-
}))), Effect.catchTag("Session.AttachmentError", (error) => Effect.fail(new InvalidRequestError({ message: error.message, field: "files" }))), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new InvalidRequestError({ message: `Skill not found: ${error.skill}`, field: "skills" }))))
|
|
194
|
+
}))), Effect.catchTag("Session.AttachmentError", (error) => Effect.fail(new InvalidRequestError({ message: error.message, field: "files" }))), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new InvalidRequestError({ message: `Skill not found: ${error.skill}`, field: "skills" }))), locationErrors2)
|
|
192
195
|
};
|
|
193
196
|
})).handle("session.command", Effect.fn(function* (ctx) {
|
|
194
197
|
yield* session.command({
|
|
@@ -205,14 +208,14 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
205
208
|
}))), Effect.catchTag("Command.ExecutionError", (error) => Effect.fail(new CommandExecutionError({
|
|
206
209
|
command: error.command,
|
|
207
210
|
message: error.message
|
|
208
|
-
}))));
|
|
211
|
+
}))), locationErrors2);
|
|
209
212
|
return HttpApiSchema.NoContent.make();
|
|
210
213
|
})).handle("session.skill", Effect.fn(function* (ctx) {
|
|
211
214
|
yield* session.skill({
|
|
212
215
|
sessionID: ctx.params.sessionID,
|
|
213
216
|
skill: ctx.payload.id,
|
|
214
217
|
resume: ctx.payload.resume
|
|
215
|
-
}).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new SkillNotFoundError({ skill: error.skill, message: `Skill not found: ${error.skill}` }))));
|
|
218
|
+
}).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.SkillNotFoundError", (error) => Effect.fail(new SkillNotFoundError({ skill: error.skill, message: `Skill not found: ${error.skill}` }))), locationErrors2);
|
|
216
219
|
return HttpApiSchema.NoContent.make();
|
|
217
220
|
})).handle("session.synthetic", Effect.fn(function* (ctx) {
|
|
218
221
|
const data = yield* session.synthetic({
|
|
@@ -248,11 +251,11 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
248
251
|
files: ctx.payload.files
|
|
249
252
|
});
|
|
250
253
|
return {
|
|
251
|
-
data: yield* session.revert.stage({ ...ctx.params, ...ctx.payload }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.MessageNotFoundError", missingMessage2), Effect.catchTag("Session.BusyError", busySession), Effect.catchTag("Snapshot.Error", failedSnapshot2("stage session revert", ctx.params.sessionID)))
|
|
254
|
+
data: yield* session.revert.stage({ ...ctx.params, ...ctx.payload }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.MessageNotFoundError", missingMessage2), Effect.catchTag("Session.BusyError", busySession), Effect.catchTag("Snapshot.Error", failedSnapshot2("stage session revert", ctx.params.sessionID)), locationErrors2)
|
|
252
255
|
};
|
|
253
256
|
})).handle("session.revert.clear", Effect.fn(function* (ctx) {
|
|
254
257
|
yield* Effect.log("session.revert.clear", { sessionID: ctx.params.sessionID });
|
|
255
|
-
yield* session.revert.clear(ctx.params.sessionID).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.BusyError", busySession), Effect.catchTag("Snapshot.Error", failedSnapshot2("clear session revert", ctx.params.sessionID)));
|
|
258
|
+
yield* session.revert.clear(ctx.params.sessionID).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.BusyError", busySession), Effect.catchTag("Snapshot.Error", failedSnapshot2("clear session revert", ctx.params.sessionID)), locationErrors2);
|
|
256
259
|
return HttpApiSchema.NoContent.make();
|
|
257
260
|
})).handle("session.revert.commit", Effect.fn(function* (ctx) {
|
|
258
261
|
yield* Effect.log("session.revert.commit", { sessionID: ctx.params.sessionID });
|
|
@@ -264,7 +267,7 @@ var SessionHandler2 = HttpApiBuilder.group(Api2, "server.session", (handlers) =>
|
|
|
264
267
|
};
|
|
265
268
|
})).handle("session.diff", Effect.fn(function* (ctx) {
|
|
266
269
|
return {
|
|
267
|
-
data: yield* session.diff({ sessionID: ctx.params.sessionID, ...ctx.query }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.MessageNotFoundError", missingMessage2), Effect.catchTag("Session.TurnRangeError", (error) => new InvalidRequestError({ message: error.message, field: error.field })), Effect.catchTag("Snapshot.Error", failedSnapshot2("diff session turn", ctx.params.sessionID)))
|
|
270
|
+
data: yield* session.diff({ sessionID: ctx.params.sessionID, ...ctx.query }).pipe(Effect.catchTag("Session.NotFoundError", missingSession2), Effect.catchTag("Session.MessageNotFoundError", missingMessage2), Effect.catchTag("Session.TurnRangeError", (error) => new InvalidRequestError({ message: error.message, field: error.field })), Effect.catchTag("Snapshot.Error", failedSnapshot2("diff session turn", ctx.params.sessionID)), locationErrors2)
|
|
268
271
|
};
|
|
269
272
|
})).handle("session.inbox.list", Effect.fn(function* (ctx) {
|
|
270
273
|
return {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
locationErrors2,
|
|
2
3
|
sessionInfo2
|
|
3
|
-
} from "./
|
|
4
|
+
} from "./fetch-14vy2pac.js";
|
|
4
5
|
|
|
5
6
|
// src/middleware/session-location.ts
|
|
6
7
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -8,9 +9,9 @@ import { Session } from "@opencode/core/session";
|
|
|
8
9
|
import { Effect, Layer } from "effect";
|
|
9
10
|
import { HttpRouter } from "effect/unstable/http";
|
|
10
11
|
import { HttpApiMiddleware } from "effect/unstable/httpapi";
|
|
11
|
-
import { InvalidRequestError, SessionNotFoundError } from "@opencode/protocol/errors";
|
|
12
|
+
import { LocationNotFoundError, InvalidRequestError, SessionNotFoundError } from "@opencode/protocol/errors";
|
|
12
13
|
class SessionLocationMiddleware2 extends HttpApiMiddleware.Service()("@opencode/HttpApiSessionLocation", {
|
|
13
|
-
error: [InvalidRequestError, SessionNotFoundError]
|
|
14
|
+
error: [InvalidRequestError, SessionNotFoundError, LocationNotFoundError]
|
|
14
15
|
}) {
|
|
15
16
|
}
|
|
16
17
|
var sessionLocationLayer2 = Layer.effect(SessionLocationMiddleware2, Effect.gen(function* () {
|
|
@@ -19,7 +20,7 @@ var sessionLocationLayer2 = Layer.effect(SessionLocationMiddleware2, Effect.gen(
|
|
|
19
20
|
return SessionLocationMiddleware2.of((effect) => Effect.gen(function* () {
|
|
20
21
|
const route = yield* HttpRouter.RouteContext;
|
|
21
22
|
const session = yield* sessionInfo2(sessions, route.params.sessionID);
|
|
22
|
-
return yield* effect.pipe(instances.provide(session));
|
|
23
|
+
return yield* effect.pipe(instances.provide(session), locationErrors2);
|
|
23
24
|
}));
|
|
24
25
|
}));
|
|
25
26
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/server-info.ts
|
|
6
6
|
var exports_server_info = {};
|
|
7
7
|
__export(exports_server_info, {
|
|
8
8
|
ServerInfo: () => exports_server_info,
|
|
9
|
-
Service: () =>
|
|
9
|
+
Service: () => Service5,
|
|
10
10
|
connectionURLs: () => connectionURLs2,
|
|
11
|
-
layer: () =>
|
|
11
|
+
layer: () => layer5
|
|
12
12
|
});
|
|
13
13
|
import { Context, Layer } from "effect";
|
|
14
14
|
import { networkInterfaces } from "node:os";
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class Service5 extends Context.Service()("@opencode/server/ServerInfo") {
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return Layer.succeed(
|
|
18
|
+
function layer5(urls, tmp, app = {}) {
|
|
19
|
+
return Layer.succeed(Service5, Service5.of({ urls, app, paths: { tmp } }));
|
|
20
20
|
}
|
|
21
21
|
function connectionURLs2(value, requestedHostname) {
|
|
22
22
|
const url = new URL(value);
|
|
@@ -33,4 +33,4 @@ function connectionURLs2(value, requestedHostname) {
|
|
|
33
33
|
];
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export {
|
|
36
|
+
export { Service5, layer5, connectionURLs2, exports_server_info };
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
2
|
+
layer4
|
|
3
|
+
} from "./fetch-14vy2pac.js";
|
|
4
4
|
import {
|
|
5
5
|
formLocationLayer2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-6n8edpm0.js";
|
|
7
7
|
import {
|
|
8
8
|
sessionLocationLayer2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./fetch-tfdbmzkj.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./fetch-x22271m7.js";
|
|
13
13
|
import {
|
|
14
14
|
Config2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./fetch-anm12x33.js";
|
|
16
16
|
import {
|
|
17
17
|
CorsConfig2
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./fetch-q4bn6dy8.js";
|
|
19
19
|
import {
|
|
20
|
-
|
|
21
|
-
} from "./
|
|
22
|
-
import {
|
|
23
|
-
node2
|
|
24
|
-
} from "./handlers-rbn15j6z.js";
|
|
20
|
+
layer5
|
|
21
|
+
} from "./fetch-v305azr7.js";
|
|
25
22
|
import {
|
|
26
23
|
node3
|
|
27
|
-
} from "./
|
|
24
|
+
} from "./fetch-byt4hbw9.js";
|
|
25
|
+
import {
|
|
26
|
+
node2
|
|
27
|
+
} from "./fetch-0d9kah4z.js";
|
|
28
28
|
import {
|
|
29
29
|
handlers2
|
|
30
|
-
} from "./
|
|
30
|
+
} from "./fetch-rdf72e8a.js";
|
|
31
31
|
import {
|
|
32
32
|
authorizationLayer2
|
|
33
|
-
} from "./
|
|
33
|
+
} from "./fetch-gtkdacvk.js";
|
|
34
34
|
import {
|
|
35
35
|
schemaErrorLayer2
|
|
36
|
-
} from "./
|
|
36
|
+
} from "./fetch-t8yzmczr.js";
|
|
37
37
|
|
|
38
38
|
// src/routes.ts
|
|
39
39
|
import { Database } from "@opencode/core/database/database";
|
|
@@ -91,8 +91,8 @@ var applicationServiceNodes = [
|
|
|
91
91
|
PersistentPty.node,
|
|
92
92
|
Credential.node,
|
|
93
93
|
WellKnown.node,
|
|
94
|
-
node3,
|
|
95
94
|
node2,
|
|
95
|
+
node3,
|
|
96
96
|
LocationServiceMap.node,
|
|
97
97
|
LocationActivity.node,
|
|
98
98
|
SessionRestart.node,
|
|
@@ -144,8 +144,8 @@ function makeRoutes(auth, options, serviceURLs, overrides, instances) {
|
|
|
144
144
|
})) : build(overrides);
|
|
145
145
|
return serviceLayer.pipe(Layer.flatMap((context) => {
|
|
146
146
|
const services = Layer.succeedContext(context);
|
|
147
|
-
const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)),
|
|
148
|
-
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(
|
|
147
|
+
const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)), layer5(serviceURLs, Context.get(context, Global.Service).tmp, options.app));
|
|
148
|
+
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.provideMerge(services), Layer.provideMerge(HttpRouter.layer));
|
|
149
149
|
return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
|
|
150
150
|
}));
|
|
151
151
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
locationErrors2
|
|
3
|
+
} from "./fetch-14vy2pac.js";
|
|
1
4
|
import {
|
|
2
5
|
Api2
|
|
3
|
-
} from "./
|
|
6
|
+
} from "./fetch-x22271m7.js";
|
|
4
7
|
|
|
5
8
|
// src/handlers/generate.ts
|
|
6
9
|
import { Generate } from "@opencode/core/generate";
|
|
@@ -19,7 +22,7 @@ var GenerateHandler2 = HttpApiBuilder.group(Api2, "server.generate", (handlers)
|
|
|
19
22
|
const generate = yield* Generate.Service;
|
|
20
23
|
const text = yield* generate.text(request.payload).pipe(Effect.mapError((error) => error._tag === "Generate.ModelSelectionError" ? new InvalidRequestError({ message: error.message }) : new ServiceUnavailableError({ message: error.message, service: error.service })));
|
|
21
24
|
return { data: { text } };
|
|
22
|
-
}, Effect.provide(services)));
|
|
25
|
+
}, Effect.provide(services), locationErrors2));
|
|
23
26
|
}));
|
|
24
27
|
|
|
25
28
|
export { GenerateHandler2 };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocationMiddleware2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-14vy2pac.js";
|
|
4
4
|
import {
|
|
5
5
|
FormLocationMiddleware2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./fetch-6n8edpm0.js";
|
|
7
7
|
import {
|
|
8
8
|
SessionLocationMiddleware2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./fetch-tfdbmzkj.js";
|
|
10
10
|
|
|
11
11
|
// src/api.ts
|
|
12
12
|
import { makeDefaultApi } from "@opencode/protocol/api";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./fetch-x22271m7.js";
|
|
4
4
|
import {
|
|
5
5
|
CorsConfig2,
|
|
6
6
|
isAllowedRequestOrigin2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./fetch-q4bn6dy8.js";
|
|
8
8
|
import {
|
|
9
9
|
runPtySocket2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./fetch-hezj1jdf.js";
|
|
11
11
|
|
|
12
12
|
// src/handlers/persistent-pty.ts
|
|
13
13
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2,
|
|
3
3
|
failedMessageDecode2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./fetch-smaf4a18.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./fetch-x22271m7.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/message.ts
|
|
10
10
|
import { SessionMessage } from "@opencode/core/session/message";
|
package/dist/cors.js
CHANGED
package/dist/event-feed.js
CHANGED
|
@@ -2,19 +2,19 @@ import {
|
|
|
2
2
|
SubscriberCapacity2,
|
|
3
3
|
SubscriberOverflowError2,
|
|
4
4
|
EncodingError2,
|
|
5
|
-
|
|
5
|
+
Service2,
|
|
6
6
|
frame2,
|
|
7
7
|
make4,
|
|
8
|
-
|
|
8
|
+
layer2,
|
|
9
9
|
exports_event_feed
|
|
10
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/fetch-2sy3c7de.js";
|
|
11
11
|
export {
|
|
12
12
|
EncodingError2 as EncodingError,
|
|
13
13
|
exports_event_feed as EventFeed,
|
|
14
|
-
|
|
14
|
+
Service2 as Service,
|
|
15
15
|
SubscriberCapacity2 as SubscriberCapacity,
|
|
16
16
|
SubscriberOverflowError2 as SubscriberOverflowError,
|
|
17
17
|
frame2 as frame,
|
|
18
|
-
|
|
18
|
+
layer2 as layer,
|
|
19
19
|
make4 as make
|
|
20
20
|
};
|
package/dist/fetch.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import {
|
|
2
2
|
make3,
|
|
3
3
|
exports_fetch
|
|
4
|
-
} from "./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/
|
|
4
|
+
} from "./chunks/fetch-a44pvkv9.js";
|
|
5
|
+
import"./chunks/fetch-w4srakgh.js";
|
|
6
|
+
import"./chunks/fetch-t8yzmczr.js";
|
|
7
|
+
import"./chunks/fetch-gtkdacvk.js";
|
|
8
|
+
import"./chunks/fetch-rdf72e8a.js";
|
|
9
|
+
import"./chunks/fetch-vrg6639h.js";
|
|
10
|
+
import"./chunks/fetch-rytwz38r.js";
|
|
11
|
+
import"./chunks/fetch-eces9922.js";
|
|
12
|
+
import"./chunks/fetch-jv3gkh16.js";
|
|
13
|
+
import"./chunks/fetch-gesckh61.js";
|
|
14
|
+
import"./chunks/fetch-yjn29jjj.js";
|
|
15
|
+
import"./chunks/fetch-pmra5yx3.js";
|
|
16
|
+
import"./chunks/fetch-g27fjyd3.js";
|
|
17
|
+
import"./chunks/fetch-r3mjvgfk.js";
|
|
18
|
+
import"./chunks/fetch-yddkh4zb.js";
|
|
19
|
+
import"./chunks/fetch-h9qn14ck.js";
|
|
20
|
+
import"./chunks/fetch-hezj1jdf.js";
|
|
21
|
+
import"./chunks/fetch-wq6tfxrf.js";
|
|
22
|
+
import"./chunks/fetch-kta0tack.js";
|
|
23
|
+
import"./chunks/fetch-wkt3zs7x.js";
|
|
24
|
+
import"./chunks/fetch-gr63yha5.js";
|
|
25
|
+
import"./chunks/fetch-0vcrsckz.js";
|
|
26
|
+
import"./chunks/fetch-6w79g1zd.js";
|
|
27
|
+
import"./chunks/fetch-z854b9h8.js";
|
|
28
|
+
import"./chunks/fetch-0gwhtgb0.js";
|
|
29
|
+
import"./chunks/fetch-evmrcn2p.js";
|
|
30
|
+
import"./chunks/fetch-kcvfpwaw.js";
|
|
31
|
+
import"./chunks/fetch-5w803dat.js";
|
|
32
|
+
import"./chunks/fetch-qwcstt60.js";
|
|
33
|
+
import"./chunks/fetch-00b7zw9n.js";
|
|
34
|
+
import"./chunks/fetch-qf0s8ctx.js";
|
|
35
|
+
import"./chunks/fetch-kww1pvjb.js";
|
|
36
|
+
import"./chunks/fetch-2nwa3ky2.js";
|
|
37
|
+
import"./chunks/fetch-zgk9zpte.js";
|
|
38
|
+
import"./chunks/fetch-d261w70h.js";
|
|
39
|
+
import"./chunks/fetch-ajhv9q2g.js";
|
|
40
|
+
import"./chunks/fetch-q4bn6dy8.js";
|
|
41
|
+
import"./chunks/fetch-x22271m7.js";
|
|
42
|
+
import"./chunks/fetch-tfdbmzkj.js";
|
|
43
|
+
import"./chunks/fetch-6n8edpm0.js";
|
|
44
|
+
import"./chunks/fetch-2sy3c7de.js";
|
|
45
|
+
import"./chunks/fetch-0d9kah4z.js";
|
|
46
|
+
import"./chunks/fetch-byt4hbw9.js";
|
|
47
|
+
import"./chunks/fetch-14vy2pac.js";
|
|
48
|
+
import"./chunks/fetch-smaf4a18.js";
|
|
49
|
+
import"./chunks/fetch-anm12x33.js";
|
|
50
|
+
import"./chunks/fetch-v305azr7.js";
|
|
51
51
|
export {
|
|
52
52
|
exports_fetch as ServerFetch,
|
|
53
53
|
make3 as make
|
package/dist/handlers/agent.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/fetch-yddkh4zb.js";
|
|
4
|
+
import"../chunks/fetch-x22271m7.js";
|
|
5
|
+
import"../chunks/fetch-tfdbmzkj.js";
|
|
6
|
+
import"../chunks/fetch-6n8edpm0.js";
|
|
7
|
+
import"../chunks/fetch-14vy2pac.js";
|
|
8
|
+
import"../chunks/fetch-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
AgentHandler2 as AgentHandler
|
|
11
11
|
};
|
package/dist/handlers/command.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CommandHandler2
|
|
3
|
-
} from "../chunks/
|
|
4
|
-
import"../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
3
|
+
} from "../chunks/fetch-00b7zw9n.js";
|
|
4
|
+
import"../chunks/fetch-x22271m7.js";
|
|
5
|
+
import"../chunks/fetch-tfdbmzkj.js";
|
|
6
|
+
import"../chunks/fetch-6n8edpm0.js";
|
|
7
|
+
import"../chunks/fetch-14vy2pac.js";
|
|
8
|
+
import"../chunks/fetch-smaf4a18.js";
|
|
9
9
|
export {
|
|
10
10
|
CommandHandler2 as CommandHandler
|
|
11
11
|
};
|