@opencode/server 0.0.0-dev-1302 → 0.0.0-dev-1303
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/chunks/{api-qfyg9gb7.js → api-3p9jwgak.js} +3 -3
- package/dist/chunks/{api-b6k4wrac.js → api-99d31s2b.js} +6 -6
- package/dist/chunks/api-9cd3a4b8.js +69 -0
- package/dist/chunks/{api-dq1g6k8x.js → api-cjmzjx21.js} +6 -6
- package/dist/chunks/{api-mzs0n5xz.js → api-kqr36gas.js} +6 -6
- package/dist/chunks/{api-v8013z1z.js → api-n2sc8d5v.js} +7 -7
- package/dist/chunks/{api-wnren0wn.js → api-qa6gkrme.js} +9 -9
- package/dist/chunks/{api-3rjhh738.js → api-r7kkkqba.js} +1 -1
- package/dist/chunks/{api-cdd9f8n8.js → api-s6t7ne1d.js} +1 -1
- package/dist/chunks/{api-z3e7v67k.js → api-yjbzmfhm.js} +6 -6
- package/dist/event-feed.js +3 -3
- package/dist/fetch.js +40 -40
- package/dist/handlers/automation.d.ts +25 -0
- package/dist/handlers/automation.js +7 -0
- package/dist/handlers/blob.js +2 -2
- package/dist/handlers/event.js +2 -2
- package/dist/handlers/fs.js +2 -2
- package/dist/handlers/mcp.js +2 -2
- package/dist/handlers/persistent-pty.d.ts +1 -1
- package/dist/handlers/persistent-pty.js +7 -7
- package/dist/handlers/pty.js +2 -2
- package/dist/handlers/server.js +3 -3
- package/dist/handlers.d.ts +1 -1
- package/dist/handlers.js +36 -36
- package/dist/pairing.js +3 -3
- package/dist/process.js +15 -15
- package/dist/routes.d.ts +3 -3
- package/dist/routes.js +38 -38
- package/dist/server-info.js +5 -5
- package/dist/workerd.js +14 -14
- package/package.json +9 -9
- package/dist/chunks/api-059rbh9c.js +0 -43
- package/dist/handlers/schedule.d.ts +0 -314
- package/dist/handlers/schedule.js +0 -7
- /package/dist/chunks/{api-psw29prz.js → api-6kawhtwy.js} +0 -0
- /package/dist/chunks/{api-sy2e93cn.js → api-cr5sd8bz.js} +0 -0
- /package/dist/chunks/{api-ewme8tzg.js → api-ea796ghj.js} +0 -0
- /package/dist/chunks/{api-1ndv3m9h.js → api-z9zyd4qg.js} +0 -0
|
@@ -11,7 +11,7 @@ __export(exports_event_feed, {
|
|
|
11
11
|
SubscriberCapacity: () => SubscriberCapacity2,
|
|
12
12
|
SubscriberOverflowError: () => SubscriberOverflowError2,
|
|
13
13
|
frame: () => frame2,
|
|
14
|
-
layer: () =>
|
|
14
|
+
layer: () => layer2,
|
|
15
15
|
make: () => make4
|
|
16
16
|
});
|
|
17
17
|
import { Bus } from "@opencode/core/bus";
|
|
@@ -76,9 +76,9 @@ var make4 = Effect.fn("EventFeed.make")(function* (observe, options) {
|
|
|
76
76
|
subscribe: (types) => Effect.acquireRelease(Queue.dropping(capacity).pipe(Effect.tap((queue) => Effect.sync(() => subscribers.set(queue, types?.length ? new Set(types) : undefined)))), (queue) => Effect.sync(() => subscribers.delete(queue)).pipe(Effect.andThen(Queue.shutdown(queue)), Effect.asVoid)).pipe(Effect.map(Stream.fromQueue))
|
|
77
77
|
});
|
|
78
78
|
});
|
|
79
|
-
var
|
|
79
|
+
var layer2 = Layer.effect(Service3, Effect.gen(function* () {
|
|
80
80
|
const bus = yield* Bus.Service;
|
|
81
81
|
return yield* make4(bus.listen);
|
|
82
82
|
}));
|
|
83
83
|
|
|
84
|
-
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service3, frame2, make4,
|
|
84
|
+
export { SubscriberCapacity2, SubscriberOverflowError2, EncodingError2, Service3, frame2, make4, layer2, exports_event_feed };
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
issueSession2,
|
|
8
8
|
sessionCookieName2
|
|
9
9
|
} from "./api-j4at0y5c.js";
|
|
10
|
-
import {
|
|
11
|
-
Service2
|
|
12
|
-
} from "./api-z3e7v67k.js";
|
|
13
10
|
import {
|
|
14
11
|
Service4
|
|
15
|
-
} from "./api-
|
|
12
|
+
} from "./api-yjbzmfhm.js";
|
|
13
|
+
import {
|
|
14
|
+
Service2
|
|
15
|
+
} from "./api-kqr36gas.js";
|
|
16
16
|
|
|
17
17
|
// src/handlers/server.ts
|
|
18
18
|
import { hostname } from "node:os";
|
|
@@ -22,10 +22,10 @@ import { HttpApiBuilder } from "effect/http-api";
|
|
|
22
22
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
23
23
|
import { UnauthorizedError } from "@opencode/protocol/errors";
|
|
24
24
|
var ServerHandler2 = HttpApiBuilder.group(Api2, "server.server", (handlers) => Effect.gen(function* () {
|
|
25
|
-
const pairing = yield*
|
|
25
|
+
const pairing = yield* Service2;
|
|
26
26
|
const auth = yield* Config2;
|
|
27
27
|
return handlers.handle("server.info", () => Effect.gen(function* () {
|
|
28
|
-
const info = yield*
|
|
28
|
+
const info = yield* Service4;
|
|
29
29
|
return {
|
|
30
30
|
version: info.app.version ?? "unknown",
|
|
31
31
|
pid: process.pid ?? 0,
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
missingSession2
|
|
3
|
+
} from "./api-smaf4a18.js";
|
|
4
|
+
|
|
5
|
+
// src/handlers/automation.ts
|
|
6
|
+
import { Automation } from "@opencode/core/automation";
|
|
7
|
+
import { Permission } from "@opencode/core/permission";
|
|
8
|
+
import { Project } from "@opencode/core/project";
|
|
9
|
+
import { Session } from "@opencode/core/session";
|
|
10
|
+
import { AbsolutePath } from "@opencode/core/schema";
|
|
11
|
+
import { AutomationNotFoundError, ForbiddenError, InvalidRequestError } from "@opencode/protocol/errors";
|
|
12
|
+
import { Effect } from "effect";
|
|
13
|
+
import path from "node:path";
|
|
14
|
+
import { HttpApiSchema } from "effect/http-api";
|
|
15
|
+
var makeAutomation2 = Effect.gen(function* () {
|
|
16
|
+
const automations = yield* Automation.Service;
|
|
17
|
+
const sessions = yield* Session.Service;
|
|
18
|
+
const projects = yield* Project.Service;
|
|
19
|
+
const enabled = (directory) => automations.enabled(directory).pipe(Effect.catchTag("FileSystem.DirectoryNotFoundError", () => Effect.succeed(true)));
|
|
20
|
+
const allowed = (directory) => enabled(directory).pipe(Effect.flatMap((on) => on ? Effect.void : Effect.fail(disabled())));
|
|
21
|
+
const find = (id) => Effect.gen(function* () {
|
|
22
|
+
const info = yield* automations.get(id).pipe(Effect.mapError(missingAutomation));
|
|
23
|
+
yield* allowed(info.directory);
|
|
24
|
+
return info;
|
|
25
|
+
});
|
|
26
|
+
return {
|
|
27
|
+
create: (payload) => automations.create(payload).pipe(Effect.provideService(Permission.Unattended, []), Effect.map((data) => ({ data })), Effect.catchTags({
|
|
28
|
+
"Automation.InvalidError": (error) => Effect.fail(new InvalidRequestError({ message: error.message, kind: "automation" })),
|
|
29
|
+
"Automation.DisabledError": () => Effect.fail(disabled()),
|
|
30
|
+
"Permission.BlockedError": (error) => Effect.fail(new ForbiddenError({ message: error.message })),
|
|
31
|
+
"Permission.CorrectedError": (error) => Effect.fail(new ForbiddenError({ message: error.feedback })),
|
|
32
|
+
"Session.NotFoundError": (error) => Effect.fail(missingSession2(error))
|
|
33
|
+
})),
|
|
34
|
+
list: (query) => Effect.gen(function* () {
|
|
35
|
+
const session = query.sessionID === undefined ? undefined : yield* sessions.get(query.sessionID).pipe(Effect.mapError(missingSession2));
|
|
36
|
+
if (session !== undefined)
|
|
37
|
+
yield* allowed(session.location.directory);
|
|
38
|
+
const directory = query.directory;
|
|
39
|
+
if (directory !== undefined && !path.isAbsolute(directory))
|
|
40
|
+
return yield* new InvalidRequestError({
|
|
41
|
+
message: `Directory must be an absolute path: ${directory}`,
|
|
42
|
+
kind: "automation"
|
|
43
|
+
});
|
|
44
|
+
if (directory !== undefined)
|
|
45
|
+
yield* allowed(directory);
|
|
46
|
+
const projectID = directory === undefined ? undefined : (yield* projects.resolve(AbsolutePath.make(directory), { persist: false })).id;
|
|
47
|
+
const rows = yield* automations.list({ sessionID: query.sessionID });
|
|
48
|
+
const matching = rows.filter((row) => directory === undefined || row.projectID === projectID || row.directory === directory);
|
|
49
|
+
const directories = new Set(matching.map((row) => row.directory));
|
|
50
|
+
const visible = new Set(yield* Effect.filter(directories, enabled));
|
|
51
|
+
return { data: matching.filter((row) => visible.has(row.directory)) };
|
|
52
|
+
}),
|
|
53
|
+
get: (id) => find(id).pipe(Effect.map((data) => ({ data }))),
|
|
54
|
+
pause: (id) => find(id).pipe(Effect.andThen(automations.pause(id).pipe(Effect.mapError(missingAutomation))), Effect.map((data) => ({ data }))),
|
|
55
|
+
resume: (id) => find(id).pipe(Effect.andThen(automations.resume(id).pipe(Effect.mapError(missingAutomation))), Effect.map((data) => ({ data }))),
|
|
56
|
+
remove: (id) => find(id).pipe(Effect.andThen(automations.remove(id).pipe(Effect.mapError(missingAutomation))), Effect.as(HttpApiSchema.NoContent.make()))
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
function missingAutomation(error) {
|
|
60
|
+
return new AutomationNotFoundError({
|
|
61
|
+
automationID: error.automationID,
|
|
62
|
+
message: `Automation not found: ${error.automationID}`
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function disabled() {
|
|
66
|
+
return new ForbiddenError({ message: new Automation.DisabledError().message });
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { makeAutomation2 };
|
|
@@ -10,7 +10,10 @@ import {
|
|
|
10
10
|
} from "./api-p86kew8c.js";
|
|
11
11
|
import {
|
|
12
12
|
makeBlobGet2
|
|
13
|
-
} from "./api-
|
|
13
|
+
} from "./api-cr5sd8bz.js";
|
|
14
|
+
import {
|
|
15
|
+
makeAutomation2
|
|
16
|
+
} from "./api-9cd3a4b8.js";
|
|
14
17
|
import {
|
|
15
18
|
makeJob2
|
|
16
19
|
} from "./api-78rcgzsr.js";
|
|
@@ -20,9 +23,6 @@ import {
|
|
|
20
23
|
import {
|
|
21
24
|
runPtySocket2
|
|
22
25
|
} from "./api-q187pxxd.js";
|
|
23
|
-
import {
|
|
24
|
-
makeSchedule2
|
|
25
|
-
} from "./api-059rbh9c.js";
|
|
26
26
|
|
|
27
27
|
// src/handlers/persistent-pty.ts
|
|
28
28
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
@@ -50,8 +50,8 @@ var PersistentPtyHandler2 = HttpApiBuilder.group(Api2, "server.experimental", (h
|
|
|
50
50
|
const job = yield* makeJob2;
|
|
51
51
|
const mediaGet = yield* makeMediaGet2;
|
|
52
52
|
const blobGet = yield* makeBlobGet2;
|
|
53
|
-
const
|
|
54
|
-
return handlers.handleRaw("media.get", (ctx) => mediaGet(ctx.params.hash, ctx.request)).handleRaw("blob.get", (ctx) => blobGet(ctx.params.id, ctx.request)).handle("job.list", (ctx) => job.list(ctx.query)).handle("artifacts.providers", (ctx) => artifact.providers(ctx.query, ctx.request)).handle("artifacts.list", (ctx) => artifact.list(ctx.query, ctx.request)).handle("artifacts.create", (ctx) => artifact.create(ctx.query, ctx.payload, ctx.request)).handle("artifacts.get", (ctx) => artifact.get(ctx.params.artifactID, ctx.query, ctx.request)).handle("artifacts.update", (ctx) => artifact.update(ctx.params.artifactID, ctx.query, ctx.payload, ctx.request)).handle("artifacts.delete", (ctx) => artifact.remove(ctx.params.artifactID, ctx.query, ctx.request)).handleRaw("artifacts.view", (ctx) => artifact.view(ctx.params.artifactID, ctx.query, ctx.request)).handle("
|
|
53
|
+
const automation = yield* makeAutomation2;
|
|
54
|
+
return handlers.handleRaw("media.get", (ctx) => mediaGet(ctx.params.hash, ctx.request)).handleRaw("blob.get", (ctx) => blobGet(ctx.params.id, ctx.request)).handle("job.list", (ctx) => job.list(ctx.query)).handle("artifacts.providers", (ctx) => artifact.providers(ctx.query, ctx.request)).handle("artifacts.list", (ctx) => artifact.list(ctx.query, ctx.request)).handle("artifacts.create", (ctx) => artifact.create(ctx.query, ctx.payload, ctx.request)).handle("artifacts.get", (ctx) => artifact.get(ctx.params.artifactID, ctx.query, ctx.request)).handle("artifacts.update", (ctx) => artifact.update(ctx.params.artifactID, ctx.query, ctx.payload, ctx.request)).handle("artifacts.delete", (ctx) => artifact.remove(ctx.params.artifactID, ctx.query, ctx.request)).handleRaw("artifacts.view", (ctx) => artifact.view(ctx.params.artifactID, ctx.query, ctx.request)).handle("automation.create", (ctx) => automation.create(ctx.payload)).handle("automation.list", (ctx) => automation.list(ctx.query)).handle("automation.get", (ctx) => automation.get(ctx.params.automationID)).handle("automation.pause", (ctx) => automation.pause(ctx.params.automationID)).handle("automation.resume", (ctx) => automation.resume(ctx.params.automationID)).handle("automation.delete", (ctx) => automation.remove(ctx.params.automationID)).handle("persistentPty.read", Effect.fn(function* (ctx) {
|
|
55
55
|
return { data: yield* pty.read(ctx.params.sessionID, ctx.query.lines).pipe(mapUnavailable) };
|
|
56
56
|
})).handle("persistentPty.list", Effect.fn(function* (ctx) {
|
|
57
57
|
return { data: yield* pty.list(ctx.params.sessionID).pipe(mapUnavailable) };
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
var exports_pairing = {};
|
|
7
7
|
__export(exports_pairing, {
|
|
8
8
|
ServerPairing: () => exports_pairing,
|
|
9
|
-
Service: () =>
|
|
9
|
+
Service: () => Service2,
|
|
10
10
|
node: () => node2
|
|
11
11
|
});
|
|
12
12
|
import { Cache, Context, Duration, Effect, Layer } from "effect";
|
|
@@ -14,12 +14,12 @@ import { makeGlobalNode } from "@opencode/util/effect/app-node";
|
|
|
14
14
|
import { randomBytes } from "node:crypto";
|
|
15
15
|
var TTL = Duration.minutes(5);
|
|
16
16
|
|
|
17
|
-
class
|
|
17
|
+
class Service2 extends Context.Service()("@opencode/ServerPairing") {
|
|
18
18
|
}
|
|
19
19
|
var noLookup = () => Effect.die(new Error("ServerPairing cache must be used via set/invalidateWhen, never get"));
|
|
20
|
-
var layer = Layer.effect(
|
|
20
|
+
var layer = Layer.effect(Service2, Effect.gen(function* () {
|
|
21
21
|
const cache = yield* Cache.make({ capacity: 1000, lookup: noLookup, timeToLive: TTL });
|
|
22
|
-
return
|
|
22
|
+
return Service2.of({
|
|
23
23
|
issue: Effect.fn("ServerPairing.issue")(function* () {
|
|
24
24
|
const code = randomBytes(16).toString("base64url");
|
|
25
25
|
yield* Cache.set(cache, code, true);
|
|
@@ -30,6 +30,6 @@ var layer = Layer.effect(Service4, Effect.gen(function* () {
|
|
|
30
30
|
})
|
|
31
31
|
});
|
|
32
32
|
}));
|
|
33
|
-
var node2 = makeGlobalNode({ service:
|
|
33
|
+
var node2 = makeGlobalNode({ service: Service2, layer, deps: [] });
|
|
34
34
|
|
|
35
|
-
export {
|
|
35
|
+
export { Service2, node2, exports_pairing };
|
|
@@ -17,14 +17,14 @@ import {
|
|
|
17
17
|
CorsConfig2
|
|
18
18
|
} from "./api-q4bn6dy8.js";
|
|
19
19
|
import {
|
|
20
|
-
|
|
21
|
-
} from "./api-
|
|
20
|
+
layer3
|
|
21
|
+
} from "./api-yjbzmfhm.js";
|
|
22
22
|
import {
|
|
23
23
|
node2
|
|
24
|
-
} from "./api-
|
|
24
|
+
} from "./api-kqr36gas.js";
|
|
25
25
|
import {
|
|
26
26
|
handlers2
|
|
27
|
-
} from "./api-
|
|
27
|
+
} from "./api-qa6gkrme.js";
|
|
28
28
|
import {
|
|
29
29
|
authorizationLayer2
|
|
30
30
|
} from "./api-7b9xm1qg.js";
|
|
@@ -70,7 +70,7 @@ import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
|
70
70
|
import { LocationActivity } from "@opencode/core/location-activity";
|
|
71
71
|
import { ModelsDev } from "@opencode/core/models-dev";
|
|
72
72
|
import { SessionRestart } from "@opencode/core/session/execution/restart";
|
|
73
|
-
import {
|
|
73
|
+
import { Automation } from "@opencode/core/automation";
|
|
74
74
|
import { PluginUpdate } from "@opencode/core/plugin/update";
|
|
75
75
|
import { SdkPlugins } from "@opencode/core/plugin/sdk";
|
|
76
76
|
import { WellKnown } from "@opencode/core/wellknown";
|
|
@@ -109,7 +109,7 @@ var applicationServiceNodes = [
|
|
|
109
109
|
LocationServiceMap.node,
|
|
110
110
|
LocationActivity.node,
|
|
111
111
|
SessionRestart.node,
|
|
112
|
-
|
|
112
|
+
Automation.node,
|
|
113
113
|
BlobStore.node,
|
|
114
114
|
VideoGeneration.node,
|
|
115
115
|
Workspace.node,
|
|
@@ -164,7 +164,7 @@ function makeRoutes(auth, options, serviceURLs, overrides, instances) {
|
|
|
164
164
|
})) : build(overrides);
|
|
165
165
|
return serviceLayer.pipe(Layer.flatMap((context) => {
|
|
166
166
|
const services = Layer.succeedContext(context);
|
|
167
|
-
const requestServices = Layer.merge(Layer.succeedContext(Context.pick(Database.Service, Credential.Service, PermissionSaved.Service, PluginUpdate.Service, Project.Service, WellKnown.Service)(context)),
|
|
167
|
+
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));
|
|
168
168
|
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));
|
|
169
169
|
return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
|
|
170
170
|
}));
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./api-btahnm2b.js";
|
|
22
22
|
import {
|
|
23
23
|
FileSystemHandler2
|
|
24
|
-
} from "./api-
|
|
24
|
+
} from "./api-ea796ghj.js";
|
|
25
25
|
import {
|
|
26
26
|
FormHandler2
|
|
27
27
|
} from "./api-f559fakr.js";
|
|
@@ -35,11 +35,11 @@ import {
|
|
|
35
35
|
RpcHandler2
|
|
36
36
|
} from "./api-5cpb32hf.js";
|
|
37
37
|
import {
|
|
38
|
-
|
|
39
|
-
} from "./api-
|
|
38
|
+
layer2
|
|
39
|
+
} from "./api-3p9jwgak.js";
|
|
40
40
|
import {
|
|
41
41
|
EventHandler2
|
|
42
|
-
} from "./api-
|
|
42
|
+
} from "./api-r7kkkqba.js";
|
|
43
43
|
import {
|
|
44
44
|
AgentHandler2
|
|
45
45
|
} from "./api-8mj7kvhm.js";
|
|
@@ -48,16 +48,16 @@ import {
|
|
|
48
48
|
} from "./api-2eaky32g.js";
|
|
49
49
|
import {
|
|
50
50
|
ServerHandler2
|
|
51
|
-
} from "./api-
|
|
51
|
+
} from "./api-99d31s2b.js";
|
|
52
52
|
import {
|
|
53
53
|
DebugHandler2
|
|
54
54
|
} from "./api-qcg3sqtb.js";
|
|
55
55
|
import {
|
|
56
56
|
PtyHandler2
|
|
57
|
-
} from "./api-
|
|
57
|
+
} from "./api-6kawhtwy.js";
|
|
58
58
|
import {
|
|
59
59
|
PersistentPtyHandler2
|
|
60
|
-
} from "./api-
|
|
60
|
+
} from "./api-cjmzjx21.js";
|
|
61
61
|
import {
|
|
62
62
|
ShellHandler2
|
|
63
63
|
} from "./api-qd0r787n.js";
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
} from "./api-09kw3a77.js";
|
|
79
79
|
import {
|
|
80
80
|
McpHandler2
|
|
81
|
-
} from "./api-
|
|
81
|
+
} from "./api-z9zyd4qg.js";
|
|
82
82
|
import {
|
|
83
83
|
CredentialHandler2
|
|
84
84
|
} from "./api-yk755swr.js";
|
|
@@ -100,6 +100,6 @@ import {
|
|
|
100
100
|
|
|
101
101
|
// src/handlers.ts
|
|
102
102
|
import { Layer } from "effect";
|
|
103
|
-
var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, UsageHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(
|
|
103
|
+
var handlers2 = Layer.mergeAll(ServerHandler2, DebugHandler2, MigrationHandler2, LocationHandler2, AgentHandler2, PluginHandler2, SessionHandler2, MessageHandler2, ModelHandler2, GenerateHandler2, VoiceHandler2, ProviderHandler2, IntegrationHandler2, WebSearchHandler2, UsageHandler2, McpHandler2, CredentialHandler2, ProjectHandler2, FormHandler2, PermissionHandler2, FileSystemHandler2, CommandHandler2, SkillHandler2, RpcHandler2, EventHandler2.pipe(Layer.provide(layer2)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
|
|
104
104
|
|
|
105
105
|
export { handlers2 };
|
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
var exports_server_info = {};
|
|
7
7
|
__export(exports_server_info, {
|
|
8
8
|
ServerInfo: () => exports_server_info,
|
|
9
|
-
Service: () =>
|
|
9
|
+
Service: () => Service4,
|
|
10
10
|
connectionURLs: () => connectionURLs2,
|
|
11
|
-
layer: () =>
|
|
11
|
+
layer: () => layer3
|
|
12
12
|
});
|
|
13
13
|
import { Context, Layer } from "effect";
|
|
14
14
|
import { networkInterfaces } from "node:os";
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class Service4 extends Context.Service()("@opencode/server/ServerInfo") {
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return Layer.succeed(
|
|
18
|
+
function layer3(urls, tmp, app = {}) {
|
|
19
|
+
return Layer.succeed(Service4, Service4.of({ urls, app, paths: { tmp } }));
|
|
20
20
|
}
|
|
21
21
|
function connectionURLs2(value, requestedHostname) {
|
|
22
22
|
const url = new URL(value);
|
|
@@ -38,4 +38,4 @@ function connectionURLs2(value, requestedHostname) {
|
|
|
38
38
|
];
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export {
|
|
41
|
+
export { Service4, layer3, connectionURLs2, exports_server_info };
|
package/dist/event-feed.js
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
Service3,
|
|
6
6
|
frame2,
|
|
7
7
|
make4,
|
|
8
|
-
|
|
8
|
+
layer2,
|
|
9
9
|
exports_event_feed
|
|
10
|
-
} from "./chunks/api-
|
|
10
|
+
} from "./chunks/api-3p9jwgak.js";
|
|
11
11
|
export {
|
|
12
12
|
EncodingError2 as EncodingError,
|
|
13
13
|
exports_event_feed as EventFeed,
|
|
@@ -15,6 +15,6 @@ export {
|
|
|
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,64 +1,64 @@
|
|
|
1
1
|
import {
|
|
2
2
|
make2,
|
|
3
3
|
exports_fetch
|
|
4
|
-
} from "./chunks/api-
|
|
5
|
-
import"./chunks/api-yc7nft6q.js";
|
|
4
|
+
} from "./chunks/api-s6t7ne1d.js";
|
|
6
5
|
import"./chunks/api-myqk22k5.js";
|
|
7
|
-
import"./chunks/api-
|
|
6
|
+
import"./chunks/api-n2sc8d5v.js";
|
|
8
7
|
import"./chunks/api-bd8755ek.js";
|
|
9
|
-
import"./chunks/api-n26yr6pw.js";
|
|
10
8
|
import"./chunks/api-7b9xm1qg.js";
|
|
11
|
-
import"./chunks/api-
|
|
12
|
-
import"./chunks/api-
|
|
13
|
-
import"./chunks/api-
|
|
9
|
+
import"./chunks/api-n26yr6pw.js";
|
|
10
|
+
import"./chunks/api-qa6gkrme.js";
|
|
11
|
+
import"./chunks/api-ny1j968n.js";
|
|
12
|
+
import"./chunks/api-cjmzjx21.js";
|
|
13
|
+
import"./chunks/api-f559fakr.js";
|
|
14
|
+
import"./chunks/api-djr0jy89.js";
|
|
15
|
+
import"./chunks/api-r7kkkqba.js";
|
|
16
|
+
import"./chunks/api-btahnm2b.js";
|
|
17
|
+
import"./chunks/api-1h6b4sc5.js";
|
|
18
|
+
import"./chunks/api-enp1bp7r.js";
|
|
19
|
+
import"./chunks/api-rs3v36hp.js";
|
|
20
|
+
import"./chunks/api-2eaky32g.js";
|
|
21
|
+
import"./chunks/api-8mj7kvhm.js";
|
|
22
|
+
import"./chunks/api-yk755swr.js";
|
|
23
|
+
import"./chunks/api-z9zyd4qg.js";
|
|
24
|
+
import"./chunks/api-6kawhtwy.js";
|
|
14
25
|
import"./chunks/api-qd0r787n.js";
|
|
15
|
-
import"./chunks/api-58psf7ej.js";
|
|
16
26
|
import"./chunks/api-kkdkqt8j.js";
|
|
17
|
-
import"./chunks/api-
|
|
27
|
+
import"./chunks/api-cr5sd8bz.js";
|
|
28
|
+
import"./chunks/api-99d31s2b.js";
|
|
29
|
+
import"./chunks/api-cezwbsk5.js";
|
|
18
30
|
import"./chunks/api-a8jcac9a.js";
|
|
19
|
-
import"./chunks/api-rs3v36hp.js";
|
|
20
|
-
import"./chunks/api-09kw3a77.js";
|
|
21
|
-
import"./chunks/api-1h6b4sc5.js";
|
|
22
31
|
import"./chunks/api-vdvwckee.js";
|
|
23
|
-
import"./chunks/api-
|
|
24
|
-
import"./chunks/api-enp1bp7r.js";
|
|
25
|
-
import"./chunks/api-ny1j968n.js";
|
|
26
|
-
import"./chunks/api-btahnm2b.js";
|
|
27
|
-
import"./chunks/api-zcvan105.js";
|
|
28
|
-
import"./chunks/api-az0609r6.js";
|
|
29
|
-
import"./chunks/api-4q6e7fh8.js";
|
|
30
|
-
import"./chunks/api-psw29prz.js";
|
|
31
|
-
import"./chunks/api-yk755swr.js";
|
|
32
|
+
import"./chunks/api-9cd3a4b8.js";
|
|
32
33
|
import"./chunks/api-91858wp1.js";
|
|
33
|
-
import"./chunks/api-te8jwba1.js";
|
|
34
34
|
import"./chunks/api-qcg3sqtb.js";
|
|
35
|
-
import"./chunks/api-5cpb32hf.js";
|
|
36
35
|
import"./chunks/api-rha2aq18.js";
|
|
37
|
-
import"./chunks/api-
|
|
38
|
-
import"./chunks/api-1ndv3m9h.js";
|
|
39
|
-
import"./chunks/api-j4at0y5c.js";
|
|
40
|
-
import"./chunks/api-z3e7v67k.js";
|
|
41
|
-
import"./chunks/api-2eaky32g.js";
|
|
42
|
-
import"./chunks/api-cezwbsk5.js";
|
|
43
|
-
import"./chunks/api-8mj7kvhm.js";
|
|
44
|
-
import"./chunks/api-6z9pvq7p.js";
|
|
45
|
-
import"./chunks/api-dq1g6k8x.js";
|
|
46
|
-
import"./chunks/api-059rbh9c.js";
|
|
47
|
-
import"./chunks/api-sy2e93cn.js";
|
|
36
|
+
import"./chunks/api-te8jwba1.js";
|
|
48
37
|
import"./chunks/api-p86kew8c.js";
|
|
49
|
-
import"./chunks/api-
|
|
50
|
-
import"./chunks/api-
|
|
38
|
+
import"./chunks/api-az0609r6.js";
|
|
39
|
+
import"./chunks/api-4q6e7fh8.js";
|
|
40
|
+
import"./chunks/api-09kw3a77.js";
|
|
41
|
+
import"./chunks/api-zcvan105.js";
|
|
42
|
+
import"./chunks/api-5cpb32hf.js";
|
|
43
|
+
import"./chunks/api-d0edqfxx.js";
|
|
44
|
+
import"./chunks/api-kqr36gas.js";
|
|
45
|
+
import"./chunks/api-3p9jwgak.js";
|
|
46
|
+
import"./chunks/api-6z9pvq7p.js";
|
|
51
47
|
import"./chunks/api-q187pxxd.js";
|
|
52
|
-
import"./chunks/api-
|
|
53
|
-
import"./chunks/api-
|
|
54
|
-
import"./chunks/api-
|
|
48
|
+
import"./chunks/api-78rcgzsr.js";
|
|
49
|
+
import"./chunks/api-58psf7ej.js";
|
|
50
|
+
import"./chunks/api-ea796ghj.js";
|
|
51
|
+
import"./chunks/api-j4at0y5c.js";
|
|
52
|
+
import"./chunks/api-yjbzmfhm.js";
|
|
55
53
|
import"./chunks/api-8sb6qqpn.js";
|
|
56
|
-
import"./chunks/api-q4bn6dy8.js";
|
|
57
54
|
import"./chunks/api-j87xz9bt.js";
|
|
58
55
|
import"./chunks/api-htyf2qs7.js";
|
|
59
56
|
import"./chunks/api-b3bmdkga.js";
|
|
57
|
+
import"./chunks/api-q4bn6dy8.js";
|
|
60
58
|
import"./chunks/api-50bbk3b2.js";
|
|
61
59
|
import"./chunks/api-smaf4a18.js";
|
|
60
|
+
import"./chunks/api-t32e1bbt.js";
|
|
61
|
+
import"./chunks/api-yc7nft6q.js";
|
|
62
62
|
import"./chunks/api-xthc02cw.js";
|
|
63
63
|
export {
|
|
64
64
|
exports_fetch as ServerFetch,
|
|
@@ -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>;
|
package/dist/handlers/blob.js
CHANGED
package/dist/handlers/event.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EventHandler2
|
|
3
|
-
} from "../chunks/api-
|
|
4
|
-
import"../chunks/api-
|
|
3
|
+
} from "../chunks/api-r7kkkqba.js";
|
|
4
|
+
import"../chunks/api-3p9jwgak.js";
|
|
5
5
|
import"../chunks/api-j87xz9bt.js";
|
|
6
6
|
import"../chunks/api-htyf2qs7.js";
|
|
7
7
|
import"../chunks/api-b3bmdkga.js";
|
package/dist/handlers/fs.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FileSystemHandler2
|
|
3
|
-
} from "../chunks/api-
|
|
4
|
-
import"../chunks/api-t32e1bbt.js";
|
|
3
|
+
} from "../chunks/api-ea796ghj.js";
|
|
5
4
|
import"../chunks/api-8sb6qqpn.js";
|
|
6
5
|
import"../chunks/api-j87xz9bt.js";
|
|
7
6
|
import"../chunks/api-htyf2qs7.js";
|
|
8
7
|
import"../chunks/api-b3bmdkga.js";
|
|
9
8
|
import"../chunks/api-50bbk3b2.js";
|
|
10
9
|
import"../chunks/api-smaf4a18.js";
|
|
10
|
+
import"../chunks/api-t32e1bbt.js";
|
|
11
11
|
export {
|
|
12
12
|
FileSystemHandler2 as FileSystemHandler
|
|
13
13
|
};
|
package/dist/handlers/mcp.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
McpHandler2
|
|
3
|
-
} from "../chunks/api-
|
|
3
|
+
} from "../chunks/api-z9zyd4qg.js";
|
|
4
4
|
import"../chunks/api-q187pxxd.js";
|
|
5
|
-
import"../chunks/api-q4bn6dy8.js";
|
|
6
5
|
import"../chunks/api-j87xz9bt.js";
|
|
7
6
|
import"../chunks/api-htyf2qs7.js";
|
|
8
7
|
import"../chunks/api-b3bmdkga.js";
|
|
8
|
+
import"../chunks/api-q4bn6dy8.js";
|
|
9
9
|
import"../chunks/api-50bbk3b2.js";
|
|
10
10
|
import"../chunks/api-smaf4a18.js";
|
|
11
11
|
export {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
2
2
|
import { PtyTicket } from "@opencode/core/pty/ticket";
|
|
3
|
-
export declare const PersistentPtyHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.experimental">, never, import("@opencode/util/fs-util").FSUtil.Service | import("@opencode/core/database/database").Service | import("@opencode/core/kv").Service | import("@opencode/core/job").Service | import("@opencode/core/location-service-map").Service | PersistentPty.Service | import("@opencode/core/session").Service | import("@opencode/core/
|
|
3
|
+
export declare const PersistentPtyHandler: import("effect/Layer").Layer<import("effect/http-api/HttpApiGroup").Service<"server", "server.experimental">, never, import("@opencode/util/fs-util").FSUtil.Service | import("@opencode/core/database/database").Service | import("@opencode/core/kv").Service | import("@opencode/core/job").Service | import("@opencode/core/location-service-map").Service | PersistentPty.Service | import("@opencode/core/session").Service | import("@opencode/core/automation").Service | import("@opencode/core/project").Service | PtyTicket.Service | import("@opencode/core/blob-store").Service | (import("@opencode/protocol/middleware/authorization").Authorization | import("@opencode/protocol/middleware/schema-error").SchemaErrorMiddleware)>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PersistentPtyHandler2
|
|
3
|
-
} from "../chunks/api-
|
|
4
|
-
import"../chunks/api-059rbh9c.js";
|
|
5
|
-
import"../chunks/api-sy2e93cn.js";
|
|
6
|
-
import"../chunks/api-p86kew8c.js";
|
|
7
|
-
import"../chunks/api-78rcgzsr.js";
|
|
3
|
+
} from "../chunks/api-cjmzjx21.js";
|
|
8
4
|
import"../chunks/api-djr0jy89.js";
|
|
5
|
+
import"../chunks/api-cr5sd8bz.js";
|
|
6
|
+
import"../chunks/api-9cd3a4b8.js";
|
|
7
|
+
import"../chunks/api-p86kew8c.js";
|
|
9
8
|
import"../chunks/api-q187pxxd.js";
|
|
10
|
-
import"../chunks/api-
|
|
9
|
+
import"../chunks/api-78rcgzsr.js";
|
|
11
10
|
import"../chunks/api-8sb6qqpn.js";
|
|
12
|
-
import"../chunks/api-q4bn6dy8.js";
|
|
13
11
|
import"../chunks/api-j87xz9bt.js";
|
|
14
12
|
import"../chunks/api-htyf2qs7.js";
|
|
15
13
|
import"../chunks/api-b3bmdkga.js";
|
|
14
|
+
import"../chunks/api-q4bn6dy8.js";
|
|
16
15
|
import"../chunks/api-50bbk3b2.js";
|
|
17
16
|
import"../chunks/api-smaf4a18.js";
|
|
17
|
+
import"../chunks/api-t32e1bbt.js";
|
|
18
18
|
export {
|
|
19
19
|
PersistentPtyHandler2 as PersistentPtyHandler
|
|
20
20
|
};
|
package/dist/handlers/pty.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PtyHandler2
|
|
3
|
-
} from "../chunks/api-
|
|
3
|
+
} from "../chunks/api-6kawhtwy.js";
|
|
4
4
|
import"../chunks/api-q187pxxd.js";
|
|
5
|
-
import"../chunks/api-q4bn6dy8.js";
|
|
6
5
|
import"../chunks/api-j87xz9bt.js";
|
|
7
6
|
import"../chunks/api-htyf2qs7.js";
|
|
8
7
|
import"../chunks/api-b3bmdkga.js";
|
|
8
|
+
import"../chunks/api-q4bn6dy8.js";
|
|
9
9
|
import"../chunks/api-50bbk3b2.js";
|
|
10
10
|
import"../chunks/api-smaf4a18.js";
|
|
11
11
|
export {
|
package/dist/handlers/server.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ServerHandler2
|
|
3
|
-
} from "../chunks/api-
|
|
3
|
+
} from "../chunks/api-99d31s2b.js";
|
|
4
|
+
import"../chunks/api-kqr36gas.js";
|
|
4
5
|
import"../chunks/api-j4at0y5c.js";
|
|
5
|
-
import"../chunks/api-
|
|
6
|
-
import"../chunks/api-mzs0n5xz.js";
|
|
6
|
+
import"../chunks/api-yjbzmfhm.js";
|
|
7
7
|
import"../chunks/api-j87xz9bt.js";
|
|
8
8
|
import"../chunks/api-htyf2qs7.js";
|
|
9
9
|
import"../chunks/api-b3bmdkga.js";
|