@opencode/server 0.0.0-dev-1337 → 0.0.0-dev-1341
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js +4 -4
- package/dist/chunks/{service-status-6t6fd9bq.js → service-status-065pppgn.js} +2 -2
- package/dist/chunks/{service-status-edwk6ehd.js → service-status-0tp9bckc.js} +1 -1
- package/dist/chunks/{service-status-6s1v5h8n.js → service-status-11f90p14.js} +2 -2
- package/dist/chunks/{service-status-8mfdzabk.js → service-status-1fzmkwcj.js} +2 -2
- package/dist/chunks/{service-status-b87bs0cf.js → service-status-27f8nny0.js} +2 -2
- package/dist/chunks/{service-status-4r2ye500.js → service-status-2b13xzyt.js} +2 -2
- package/dist/chunks/{service-status-nkfbbfe7.js → service-status-2mxtghfa.js} +2 -2
- package/dist/chunks/{service-status-p9wp66hf.js → service-status-2q06e3dd.js} +1 -1
- package/dist/chunks/{service-status-b7yt2ykh.js → service-status-500wz90y.js} +2 -2
- package/dist/chunks/{service-status-azjwaxam.js → service-status-5pnshgdf.js} +32 -11
- package/dist/chunks/{service-status-8n1ypg70.js → service-status-669rq3zn.js} +2 -2
- package/dist/chunks/{service-status-t62b1gmw.js → service-status-7qpea5x7.js} +1 -1
- package/dist/chunks/{service-status-s8t5gq7c.js → service-status-8pn9ceqg.js} +3 -3
- package/dist/chunks/{service-status-kxxzyg67.js → service-status-9bbvrcpp.js} +3 -3
- package/dist/chunks/{service-status-n6ypjnhz.js → service-status-ah2sj2pr.js} +1 -1
- package/dist/chunks/{service-status-d0advawr.js → service-status-ahhjt1wh.js} +2 -2
- package/dist/chunks/{service-status-3wfvswnq.js → service-status-bsfsgxwp.js} +35 -35
- package/dist/chunks/{service-status-4apj6a8e.js → service-status-c0pd5awd.js} +2 -2
- package/dist/chunks/{service-status-4d81c38p.js → service-status-c57nyq8z.js} +2 -2
- package/dist/chunks/{service-status-zrptb2x8.js → service-status-cx7az6y7.js} +2 -2
- package/dist/chunks/{service-status-n1547x5v.js → service-status-ehpjjjkp.js} +1 -1
- package/dist/chunks/{service-status-7x6cg3xs.js → service-status-fhb2ewd9.js} +2 -2
- package/dist/chunks/{service-status-pv4dnzzq.js → service-status-ghcy4ddk.js} +1 -1
- package/dist/chunks/service-status-hgrkvk6s.js +48 -0
- package/dist/chunks/{service-status-g97h7k0s.js → service-status-j9bm09j4.js} +1 -1
- package/dist/chunks/{service-status-bvm82fhd.js → service-status-jefwk804.js} +2 -2
- package/dist/chunks/{service-status-p4zkxzv7.js → service-status-k3qt4jsw.js} +1 -1
- package/dist/chunks/{service-status-4gbck4qg.js → service-status-n7n1k6t0.js} +2 -2
- package/dist/chunks/{service-status-k26h7zjg.js → service-status-nezkqcz0.js} +2 -2
- package/dist/chunks/{service-status-20wvj9q6.js → service-status-ryf8gt7t.js} +2 -2
- package/dist/chunks/{service-status-wecgp61r.js → service-status-s802fzg1.js} +3 -3
- package/dist/chunks/{service-status-x0gby756.js → service-status-t7jjc0bm.js} +2 -2
- package/dist/chunks/{service-status-qahj7606.js → service-status-vw0q3knq.js} +1 -1
- package/dist/chunks/{service-status-sx7v7ysk.js → service-status-wn441wwa.js} +1 -1
- package/dist/chunks/{service-status-wh07bcjv.js → service-status-wtrkk6n8.js} +1 -1
- package/dist/chunks/{service-status-b1x3j2e8.js → service-status-xhsknm82.js} +2 -2
- package/dist/chunks/{service-status-gp51b0m6.js → service-status-xsh28tj2.js} +1 -1
- package/dist/chunks/{service-status-v0z8pce5.js → service-status-xygx09yd.js} +2 -2
- package/dist/chunks/{service-status-t8azv5ge.js → service-status-yr4jk19s.js} +2 -2
- package/dist/chunks/{service-status-j80tzjj3.js → service-status-ywn523ee.js} +2 -2
- package/dist/chunks/{service-status-g80pvn6e.js → service-status-z030czn6.js} +2 -2
- package/dist/chunks/{service-status-86dz2n4m.js → service-status-z4znncxg.js} +2 -2
- package/dist/event-feed.js +3 -3
- package/dist/fetch.js +52 -52
- package/dist/handlers/agent.js +5 -5
- package/dist/handlers/artifact.js +2 -2
- package/dist/handlers/automation.d.ts +1 -3
- package/dist/handlers/automation.js +1 -1
- package/dist/handlers/command.js +5 -5
- package/dist/handlers/config.js +5 -5
- package/dist/handlers/credential.js +6 -6
- package/dist/handlers/debug.js +5 -5
- package/dist/handlers/event.js +6 -6
- package/dist/handlers/form.js +5 -5
- package/dist/handlers/fs.js +6 -6
- package/dist/handlers/generate.js +5 -5
- package/dist/handlers/integration.js +5 -5
- package/dist/handlers/location.js +5 -5
- package/dist/handlers/mcp.js +6 -6
- package/dist/handlers/message.js +5 -5
- package/dist/handlers/migration.js +5 -5
- package/dist/handlers/model.js +5 -5
- package/dist/handlers/permission.js +5 -5
- package/dist/handlers/persistent-pty.d.ts +1 -1
- package/dist/handlers/persistent-pty.js +12 -12
- package/dist/handlers/plugin.js +5 -5
- package/dist/handlers/project.js +5 -5
- package/dist/handlers/provider.js +5 -5
- package/dist/handlers/pty.js +6 -6
- package/dist/handlers/reference.js +5 -5
- package/dist/handlers/rpc.js +5 -5
- package/dist/handlers/server.js +6 -6
- package/dist/handlers/session.js +5 -5
- package/dist/handlers/shell.js +5 -5
- package/dist/handlers/skill.js +5 -5
- package/dist/handlers/usage.js +5 -5
- package/dist/handlers/vcs.js +5 -5
- package/dist/handlers/voice.js +5 -5
- package/dist/handlers/websearch.js +5 -5
- package/dist/handlers/worktree.js +5 -5
- package/dist/handlers.d.ts +1 -1
- package/dist/handlers.js +46 -46
- package/dist/location.js +3 -3
- package/dist/middleware/form-location.js +2 -2
- package/dist/middleware/session-location.js +2 -2
- package/dist/process.js +41 -41
- package/dist/routes.d.ts +3 -2
- package/dist/routes.js +49 -49
- package/dist/workerd.js +42 -42
- package/package.json +8 -8
- package/dist/chunks/service-status-9cd3a4b8.js +0 -69
package/dist/api.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./chunks/service-status-
|
|
4
|
-
import"./chunks/service-status-
|
|
5
|
-
import"./chunks/service-status-
|
|
6
|
-
import"./chunks/service-status-
|
|
3
|
+
} from "./chunks/service-status-8pn9ceqg.js";
|
|
4
|
+
import"./chunks/service-status-ah2sj2pr.js";
|
|
5
|
+
import"./chunks/service-status-vw0q3knq.js";
|
|
6
|
+
import"./chunks/service-status-ywn523ee.js";
|
|
7
7
|
import"./chunks/service-status-smaf4a18.js";
|
|
8
8
|
export {
|
|
9
9
|
Api2 as Api
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-8pn9ceqg.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/provider.ts
|
|
9
9
|
import { Provider } from "@opencode/core/provider";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-8pn9ceqg.js";
|
|
4
4
|
import {
|
|
5
5
|
Service4,
|
|
6
6
|
frame2
|
|
7
|
-
} from "./service-status-
|
|
7
|
+
} from "./service-status-s802fzg1.js";
|
|
8
8
|
|
|
9
9
|
// src/handlers/event.ts
|
|
10
10
|
import { Event } from "@opencode/schema/event";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
locationErrors2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-8pn9ceqg.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/generate.ts
|
|
9
9
|
import { Generate } from "@opencode/core/generate";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-8pn9ceqg.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/command.ts
|
|
9
9
|
import { Command } from "@opencode/core/command";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-8pn9ceqg.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/integration.ts
|
|
9
9
|
import { Integration } from "@opencode/core/integration";
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./service-status-
|
|
5
|
+
} from "./service-status-ywn523ee.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./service-status-
|
|
8
|
+
} from "./service-status-8pn9ceqg.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestRef2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-8pn9ceqg.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/debug.ts
|
|
9
9
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./service-status-
|
|
2
|
+
layer4
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
formLocationLayer2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-ah2sj2pr.js";
|
|
7
7
|
import {
|
|
8
8
|
sessionLocationLayer2
|
|
9
|
-
} from "./service-status-
|
|
9
|
+
} from "./service-status-vw0q3knq.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./service-status-
|
|
12
|
+
} from "./service-status-8pn9ceqg.js";
|
|
13
13
|
import {
|
|
14
14
|
Config2
|
|
15
15
|
} from "./service-status-j4at0y5c.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./service-status-w9jcwh65.js";
|
|
25
25
|
import {
|
|
26
26
|
handlers2
|
|
27
|
-
} from "./service-status-
|
|
27
|
+
} from "./service-status-bsfsgxwp.js";
|
|
28
28
|
import {
|
|
29
29
|
authorizationLayer2
|
|
30
30
|
} from "./service-status-rktygpea.js";
|
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
import { Database } from "@opencode/core/database/database";
|
|
40
40
|
import { V1Migration } from "@opencode/core/database/v1-migration";
|
|
41
41
|
import { App } from "@opencode/core/app";
|
|
42
|
+
import { CodeModeApi } from "@opencode/core/codemode/api";
|
|
42
43
|
import { LayerNode } from "@opencode/util/effect/layer-node";
|
|
43
44
|
import { fetchLayer, httpClient, httpFetch } from "@opencode/util/effect/app-node-platform";
|
|
44
45
|
import { AppNodeBuilder } from "@opencode/core/effect/app-node-builder";
|
|
@@ -80,11 +81,13 @@ import { WellKnown } from "@opencode/core/wellknown";
|
|
|
80
81
|
import { Workspace } from "@opencode/core/workspace";
|
|
81
82
|
import { Watcher } from "@opencode/core/filesystem/watcher";
|
|
82
83
|
import { FileWatch } from "@opencode/core/filesystem/file-watch";
|
|
83
|
-
import { HttpRouter } from "effect/http";
|
|
84
|
+
import { HttpEffect, HttpRouter } from "effect/http";
|
|
84
85
|
import { HttpApiBuilder } from "effect/http-api";
|
|
85
86
|
import { Context, Effect, Layer, Option } from "effect";
|
|
87
|
+
import { Base64 } from "effect/encoding";
|
|
86
88
|
var applicationServiceNodes = [
|
|
87
89
|
App.node,
|
|
90
|
+
CodeModeApi.node,
|
|
88
91
|
Global.node,
|
|
89
92
|
FSUtil.node,
|
|
90
93
|
Database.node,
|
|
@@ -123,13 +126,29 @@ var applicationServiceNodes = [
|
|
|
123
126
|
];
|
|
124
127
|
var applicationServices = LayerNode.group(applicationServiceNodes);
|
|
125
128
|
function createRoutes2(options = {}, serviceURLs = () => [], overrides = []) {
|
|
126
|
-
return makeRoutes(options.password ?
|
|
129
|
+
return makeRoutes(options.password ? Option.some(options.password) : Option.none(), options, serviceURLs, overrides);
|
|
127
130
|
}
|
|
128
131
|
function createEmbeddedRoutes2(options = {}, overrides = [], instances) {
|
|
129
|
-
return makeRoutes(
|
|
132
|
+
return makeRoutes(Option.none(), options, () => [], overrides, instances);
|
|
130
133
|
}
|
|
131
|
-
function makeRoutes(
|
|
134
|
+
function makeRoutes(password, options, serviceURLs, overrides, instances) {
|
|
135
|
+
const auth = Config2.configLayer({ password });
|
|
136
|
+
const credential = Option.map(password, (value) => `Basic ${Base64.encode(`opencode:${value}`)}`);
|
|
137
|
+
let internal;
|
|
132
138
|
const standard = [
|
|
139
|
+
CodeModeApi.node.replace(Layer.succeed(CodeModeApi.Service, CodeModeApi.Service.of({
|
|
140
|
+
fetch: (request) => Effect.suspend(() => {
|
|
141
|
+
const handle = internal;
|
|
142
|
+
if (!handle)
|
|
143
|
+
return Effect.fail(new Error("The OpenCode API is not ready yet."));
|
|
144
|
+
if (Option.isSome(credential))
|
|
145
|
+
request.headers.set("authorization", credential.value);
|
|
146
|
+
return Effect.tryPromise({
|
|
147
|
+
try: () => handle(request),
|
|
148
|
+
catch: (error) => error instanceof Error ? error : new Error(String(error))
|
|
149
|
+
});
|
|
150
|
+
})
|
|
151
|
+
}))),
|
|
133
152
|
Database.node.replace(Database.configured(options.database)),
|
|
134
153
|
PersistentPty.node.replace(PersistentPty.configured(options.pty)),
|
|
135
154
|
Bus.node.replace(Bus.configured({ persist: options.events?.persist })),
|
|
@@ -174,7 +193,9 @@ function makeRoutes(auth, options, serviceURLs, overrides, instances) {
|
|
|
174
193
|
return serviceLayer.pipe(Layer.flatMap((context) => {
|
|
175
194
|
const services = Layer.succeedContext(context);
|
|
176
195
|
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));
|
|
177
|
-
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(
|
|
196
|
+
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), Layer.tap((context) => Effect.sync(() => {
|
|
197
|
+
internal = Context.get(context, HttpRouter.HttpRouter).asHttpEffect().pipe(HttpEffect.toWebHandlerWith(context));
|
|
198
|
+
})));
|
|
178
199
|
return Layer.merge(api, V1Migration.layer.pipe(Layer.provide(services)));
|
|
179
200
|
}));
|
|
180
201
|
}
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
locationErrors2,
|
|
6
6
|
response2,
|
|
7
7
|
sessionInfo2
|
|
8
|
-
} from "./service-status-
|
|
8
|
+
} from "./service-status-ywn523ee.js";
|
|
9
9
|
import {
|
|
10
10
|
Api2
|
|
11
|
-
} from "./service-status-
|
|
11
|
+
} from "./service-status-8pn9ceqg.js";
|
|
12
12
|
|
|
13
13
|
// src/handlers/permission.ts
|
|
14
14
|
import { Instance } from "@opencode/core/instance/service";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocationMiddleware2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
FormLocationMiddleware2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-ah2sj2pr.js";
|
|
7
7
|
import {
|
|
8
8
|
SessionLocationMiddleware2
|
|
9
|
-
} from "./service-status-
|
|
9
|
+
} from "./service-status-vw0q3knq.js";
|
|
10
10
|
|
|
11
11
|
// src/api.ts
|
|
12
12
|
import { makeDefaultApi } from "@opencode/protocol/api";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-8pn9ceqg.js";
|
|
4
4
|
import {
|
|
5
5
|
CorsConfig2,
|
|
6
6
|
isAllowedRequestOrigin2
|
|
7
7
|
} from "./service-status-q4bn6dy8.js";
|
|
8
8
|
import {
|
|
9
9
|
makeArtifact2
|
|
10
|
-
} from "./service-status-
|
|
10
|
+
} from "./service-status-7qpea5x7.js";
|
|
11
11
|
import {
|
|
12
12
|
makeBlobGet2
|
|
13
13
|
} from "./service-status-50kbksvb.js";
|
|
14
14
|
import {
|
|
15
15
|
makeAutomation2
|
|
16
|
-
} from "./service-status-
|
|
16
|
+
} from "./service-status-hgrkvk6s.js";
|
|
17
17
|
import {
|
|
18
18
|
makeJob2
|
|
19
19
|
} from "./service-status-7ydfwv45.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-8pn9ceqg.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/model.ts
|
|
9
9
|
import { Model } from "@opencode/core/model";
|
|
@@ -1,105 +1,105 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GenerateHandler2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-1fzmkwcj.js";
|
|
4
4
|
import {
|
|
5
5
|
VoiceHandler2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-xygx09yd.js";
|
|
7
7
|
import {
|
|
8
8
|
MessageHandler2
|
|
9
|
-
} from "./service-status-
|
|
9
|
+
} from "./service-status-xsh28tj2.js";
|
|
10
10
|
import {
|
|
11
11
|
ModelHandler2
|
|
12
|
-
} from "./service-status-
|
|
12
|
+
} from "./service-status-ahhjt1wh.js";
|
|
13
13
|
import {
|
|
14
14
|
ProviderHandler2
|
|
15
|
-
} from "./service-status-
|
|
15
|
+
} from "./service-status-065pppgn.js";
|
|
16
16
|
import {
|
|
17
17
|
SessionHandler2
|
|
18
|
-
} from "./service-status-
|
|
18
|
+
} from "./service-status-c57nyq8z.js";
|
|
19
19
|
import {
|
|
20
20
|
PermissionHandler2
|
|
21
|
-
} from "./service-status-
|
|
21
|
+
} from "./service-status-669rq3zn.js";
|
|
22
22
|
import {
|
|
23
23
|
FileSystemHandler2
|
|
24
|
-
} from "./service-status-
|
|
24
|
+
} from "./service-status-t7jjc0bm.js";
|
|
25
25
|
import {
|
|
26
26
|
FormHandler2
|
|
27
|
-
} from "./service-status-
|
|
27
|
+
} from "./service-status-cx7az6y7.js";
|
|
28
28
|
import {
|
|
29
29
|
CommandHandler2
|
|
30
|
-
} from "./service-status-
|
|
30
|
+
} from "./service-status-27f8nny0.js";
|
|
31
31
|
import {
|
|
32
32
|
SkillHandler2
|
|
33
|
-
} from "./service-status-
|
|
33
|
+
} from "./service-status-c0pd5awd.js";
|
|
34
34
|
import {
|
|
35
35
|
RpcHandler2
|
|
36
|
-
} from "./service-status-
|
|
36
|
+
} from "./service-status-k3qt4jsw.js";
|
|
37
37
|
import {
|
|
38
|
-
|
|
39
|
-
} from "./service-status-
|
|
38
|
+
layer3
|
|
39
|
+
} from "./service-status-s802fzg1.js";
|
|
40
40
|
import {
|
|
41
41
|
EventHandler2
|
|
42
|
-
} from "./service-status-
|
|
42
|
+
} from "./service-status-11f90p14.js";
|
|
43
43
|
import {
|
|
44
44
|
AgentHandler2
|
|
45
|
-
} from "./service-status-
|
|
45
|
+
} from "./service-status-nezkqcz0.js";
|
|
46
46
|
import {
|
|
47
47
|
PluginHandler2
|
|
48
|
-
} from "./service-status-
|
|
48
|
+
} from "./service-status-ryf8gt7t.js";
|
|
49
49
|
import {
|
|
50
50
|
ServerHandler2
|
|
51
|
-
} from "./service-status-
|
|
51
|
+
} from "./service-status-ehpjjjkp.js";
|
|
52
52
|
import {
|
|
53
53
|
DebugHandler2
|
|
54
|
-
} from "./service-status-
|
|
54
|
+
} from "./service-status-500wz90y.js";
|
|
55
55
|
import {
|
|
56
56
|
PtyHandler2
|
|
57
|
-
} from "./service-status-
|
|
57
|
+
} from "./service-status-2mxtghfa.js";
|
|
58
58
|
import {
|
|
59
59
|
PersistentPtyHandler2
|
|
60
|
-
} from "./service-status-
|
|
60
|
+
} from "./service-status-9bbvrcpp.js";
|
|
61
61
|
import {
|
|
62
62
|
ShellHandler2
|
|
63
|
-
} from "./service-status-
|
|
63
|
+
} from "./service-status-xhsknm82.js";
|
|
64
64
|
import {
|
|
65
65
|
ReferenceHandler2
|
|
66
|
-
} from "./service-status-
|
|
66
|
+
} from "./service-status-yr4jk19s.js";
|
|
67
67
|
import {
|
|
68
68
|
LocationHandler2
|
|
69
|
-
} from "./service-status-
|
|
69
|
+
} from "./service-status-wtrkk6n8.js";
|
|
70
70
|
import {
|
|
71
71
|
IntegrationHandler2
|
|
72
|
-
} from "./service-status-
|
|
72
|
+
} from "./service-status-2b13xzyt.js";
|
|
73
73
|
import {
|
|
74
74
|
WebSearchHandler2
|
|
75
|
-
} from "./service-status-
|
|
75
|
+
} from "./service-status-fhb2ewd9.js";
|
|
76
76
|
import {
|
|
77
77
|
UsageHandler2
|
|
78
|
-
} from "./service-status-
|
|
78
|
+
} from "./service-status-n7n1k6t0.js";
|
|
79
79
|
import {
|
|
80
80
|
McpHandler2
|
|
81
|
-
} from "./service-status-
|
|
81
|
+
} from "./service-status-jefwk804.js";
|
|
82
82
|
import {
|
|
83
83
|
CredentialHandler2
|
|
84
|
-
} from "./service-status-
|
|
84
|
+
} from "./service-status-z4znncxg.js";
|
|
85
85
|
import {
|
|
86
86
|
ProjectHandler2
|
|
87
|
-
} from "./service-status-
|
|
87
|
+
} from "./service-status-0tp9bckc.js";
|
|
88
88
|
import {
|
|
89
89
|
WorktreeHandler2
|
|
90
|
-
} from "./service-status-
|
|
90
|
+
} from "./service-status-2q06e3dd.js";
|
|
91
91
|
import {
|
|
92
92
|
VcsHandler2
|
|
93
|
-
} from "./service-status-
|
|
93
|
+
} from "./service-status-z030czn6.js";
|
|
94
94
|
import {
|
|
95
95
|
MigrationHandler2
|
|
96
|
-
} from "./service-status-
|
|
96
|
+
} from "./service-status-ghcy4ddk.js";
|
|
97
97
|
import {
|
|
98
98
|
ConfigHandler2
|
|
99
|
-
} from "./service-status-
|
|
99
|
+
} from "./service-status-j9bm09j4.js";
|
|
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(layer3)), PtyHandler2, PersistentPtyHandler2, ShellHandler2, ReferenceHandler2, WorktreeHandler2, VcsHandler2, ConfigHandler2);
|
|
104
104
|
|
|
105
105
|
export { handlers2 };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-8pn9ceqg.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/skill.ts
|
|
9
9
|
import { Skill } from "@opencode/core/skill";
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./service-status-smaf4a18.js";
|
|
7
7
|
import {
|
|
8
8
|
locationErrors2
|
|
9
|
-
} from "./service-status-
|
|
9
|
+
} from "./service-status-ywn523ee.js";
|
|
10
10
|
import {
|
|
11
11
|
Api2
|
|
12
|
-
} from "./service-status-
|
|
12
|
+
} from "./service-status-8pn9ceqg.js";
|
|
13
13
|
import {
|
|
14
14
|
wantsMediaRefs2
|
|
15
15
|
} from "./service-status-xthc02cw.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-8pn9ceqg.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 "./service-status-
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-8pn9ceqg.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/websearch.ts
|
|
9
9
|
import { WebSearch } from "@opencode/core/websearch";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
missingSession2
|
|
3
|
+
} from "./service-status-smaf4a18.js";
|
|
4
|
+
|
|
5
|
+
// src/handlers/automation.ts
|
|
6
|
+
import { Automation } from "@opencode/core/automation";
|
|
7
|
+
import { Permission } from "@opencode/core/permission";
|
|
8
|
+
import { AutomationNotFoundError, ForbiddenError, InvalidRequestError } from "@opencode/protocol/errors";
|
|
9
|
+
import { Effect } from "effect";
|
|
10
|
+
import { HttpApiSchema } from "effect/http-api";
|
|
11
|
+
var makeAutomation2 = Effect.gen(function* () {
|
|
12
|
+
const automations = yield* Automation.Service;
|
|
13
|
+
return {
|
|
14
|
+
create: (payload) => automations.create(payload).pipe(Effect.provideService(Permission.Unattended, []), Effect.map((data) => ({ data })), Effect.catchTags({
|
|
15
|
+
"Automation.InvalidError": (error) => Effect.fail(new InvalidRequestError({ message: error.message, kind: "automation" })),
|
|
16
|
+
"Automation.DisabledError": () => Effect.fail(disabled()),
|
|
17
|
+
"Permission.BlockedError": (error) => Effect.fail(new ForbiddenError({ message: error.message })),
|
|
18
|
+
"Permission.CorrectedError": (error) => Effect.fail(new ForbiddenError({ message: error.feedback })),
|
|
19
|
+
"Session.NotFoundError": (error) => Effect.fail(missingSession2(error))
|
|
20
|
+
})),
|
|
21
|
+
list: (query) => automations.list(query).pipe(Effect.map((data) => ({ data })), Effect.catchTags({
|
|
22
|
+
"Automation.InvalidError": (error) => Effect.fail(new InvalidRequestError({ message: error.message, kind: "automation" })),
|
|
23
|
+
"Automation.DisabledError": () => Effect.fail(disabled()),
|
|
24
|
+
"Session.NotFoundError": (error) => Effect.fail(missingSession2(error))
|
|
25
|
+
})),
|
|
26
|
+
get: (id) => managed(automations.get(id).pipe(Effect.map((data) => ({ data })))),
|
|
27
|
+
pause: (id) => managed(automations.pause(id).pipe(Effect.map((data) => ({ data })))),
|
|
28
|
+
resume: (id) => managed(automations.resume(id).pipe(Effect.map((data) => ({ data })))),
|
|
29
|
+
remove: (id) => managed(automations.remove(id).pipe(Effect.as(HttpApiSchema.NoContent.make())))
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
function managed(effect) {
|
|
33
|
+
return effect.pipe(Effect.catchTags({
|
|
34
|
+
"Automation.NotFoundError": (error) => Effect.fail(missingAutomation(error)),
|
|
35
|
+
"Automation.DisabledError": () => Effect.fail(disabled())
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
function missingAutomation(error) {
|
|
39
|
+
return new AutomationNotFoundError({
|
|
40
|
+
automationID: error.automationID,
|
|
41
|
+
message: `Automation not found: ${error.automationID}`
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function disabled() {
|
|
45
|
+
return new ForbiddenError({ message: new Automation.DisabledError().message });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { makeAutomation2 };
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./service-status-
|
|
5
|
+
} from "./service-status-ywn523ee.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./service-status-
|
|
8
|
+
} from "./service-status-8pn9ceqg.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-8pn9ceqg.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/usage.ts
|
|
9
9
|
import { UsageLimits } from "@opencode/core/usage-limits";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-8pn9ceqg.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/agent.ts
|
|
9
9
|
import { Agent } from "@opencode/core/agent";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./service-status-
|
|
3
|
+
} from "./service-status-ywn523ee.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./service-status-
|
|
6
|
+
} from "./service-status-8pn9ceqg.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/plugin.ts
|
|
9
9
|
import { Plugin } from "@opencode/core/plugin";
|