@opencode/server 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +45 -1
- package/dist/api.js +5 -5
- package/dist/auth.js +1 -1
- package/dist/chunks/{workerd-0rzj25w4.js → range-017ycvbx.js} +1 -1
- package/dist/chunks/{workerd-86dz2n4m.js → range-0x6anvwr.js} +2 -2
- package/dist/chunks/{workerd-39nnfjx1.js → range-39nnfjx1.js} +1 -1
- package/dist/chunks/{workerd-b1x3j2e8.js → range-3rtm8r3z.js} +2 -2
- package/dist/chunks/{workerd-7dtbad8d.js → range-3te71694.js} +7 -7
- package/dist/chunks/{workerd-nkfbbfe7.js → range-5pef2nys.js} +4 -4
- package/dist/chunks/{workerd-hgrkvk6s.js → range-6pm6ek88.js} +1 -1
- package/dist/chunks/{workerd-20wvj9q6.js → range-78jk0pbb.js} +2 -2
- package/dist/chunks/{workerd-kffke7z4.js → range-79t5cra8.js} +14 -10
- package/dist/chunks/{workerd-7x6cg3xs.js → range-7zz6jxhb.js} +2 -2
- package/dist/chunks/{workerd-8sb6qqpn.js → range-8sb6qqpn.js} +1 -1
- package/dist/chunks/{workerd-4r2ye500.js → range-9agv2b4c.js} +2 -2
- package/dist/chunks/{workerd-qahj7606.js → range-aexh791j.js} +1 -1
- package/dist/chunks/{workerd-zrptb2x8.js → range-amxj52x5.js} +2 -2
- package/dist/chunks/{workerd-s8t5gq7c.js → range-ay32z58n.js} +3 -3
- package/dist/chunks/{workerd-pv4dnzzq.js → range-b3sk57wg.js} +1 -1
- package/dist/chunks/{workerd-b7yt2ykh.js → range-c6kzfg4f.js} +2 -2
- package/dist/chunks/{workerd-w13ad1dk.js → range-cddawxec.js} +3 -3
- package/dist/chunks/{workerd-djr0jy89.js → range-djr0jy89.js} +1 -1
- package/dist/chunks/range-dnyhqccw.js +27 -0
- package/dist/chunks/{workerd-d0advawr.js → range-f93zkajm.js} +2 -2
- package/dist/chunks/{workerd-g23ffrnz.js → range-g23ffrnz.js} +2 -2
- package/dist/chunks/{workerd-wh07bcjv.js → range-gwtm9cga.js} +1 -1
- package/dist/chunks/{workerd-v0z8pce5.js → range-heqw7kpr.js} +2 -2
- package/dist/chunks/{workerd-6t6fd9bq.js → range-hgd5b6k8.js} +2 -2
- package/dist/chunks/{workerd-j4at0y5c.js → range-j4at0y5c.js} +1 -1
- package/dist/chunks/{workerd-8mfdzabk.js → range-jrjpfy36.js} +2 -2
- package/dist/chunks/{workerd-n6ypjnhz.js → range-jy2ammbg.js} +1 -1
- package/dist/chunks/{workerd-g97h7k0s.js → range-k2bx5n4e.js} +1 -1
- package/dist/chunks/{workerd-t8azv5ge.js → range-k518ftvz.js} +2 -2
- package/dist/chunks/{workerd-edwk6ehd.js → range-k58xpxwn.js} +1 -1
- package/dist/chunks/{workerd-w9jcwh65.js → range-kqr36gas.js} +7 -7
- package/dist/chunks/{workerd-8n1ypg70.js → range-mjhh6jvz.js} +3 -3
- package/dist/chunks/{workerd-myqk22k5.js → range-myqk22k5.js} +2 -2
- package/dist/chunks/{workerd-77gnb026.js → range-n8nthg9q.js} +4 -4
- package/dist/chunks/{workerd-b87bs0cf.js → range-pa4xtt5h.js} +2 -2
- package/dist/chunks/range-qpnw2qd1.js +58 -0
- package/dist/chunks/{workerd-rktygpea.js → range-rktygpea.js} +1 -1
- package/dist/chunks/{workerd-k26h7zjg.js → range-rn83nvae.js} +2 -2
- package/dist/chunks/{workerd-smaf4a18.js → range-rqgv9x42.js} +6 -2
- package/dist/chunks/{workerd-5dgtfnrn.js → range-s3d15g1k.js} +23 -17
- package/dist/chunks/{workerd-vxy32kc1.js → range-s557cdqw.js} +14 -4
- package/dist/chunks/{workerd-73tyf2qy.js → range-s6q3ch5r.js} +8 -8
- package/dist/chunks/{workerd-t62b1gmw.js → range-sqfq92mf.js} +2 -2
- package/dist/chunks/{workerd-j80tzjj3.js → range-stx1bw5w.js} +3 -3
- package/dist/chunks/{workerd-t32e1bbt.js → range-t32e1bbt.js} +1 -1
- package/dist/chunks/{workerd-g80pvn6e.js → range-tmb89r25.js} +2 -2
- package/dist/chunks/{workerd-jpqse2v9.js → range-tmbyzr8c.js} +35 -35
- package/dist/chunks/{workerd-4gbck4qg.js → range-vkj8vbyf.js} +2 -2
- package/dist/chunks/{workerd-p9wp66hf.js → range-vnpm7f9y.js} +1 -1
- package/dist/chunks/{workerd-3rn5pzng.js → range-wa6vk4hf.js} +14 -9
- package/dist/chunks/{workerd-bvm82fhd.js → range-wazndna9.js} +4 -4
- package/dist/chunks/{workerd-fvpjvjpp.js → range-wecgp61r.js} +7 -7
- package/dist/chunks/{workerd-7ydfwv45.js → range-x2qy7jg1.js} +1 -1
- package/dist/chunks/{workerd-dqfyxmp4.js → range-zs3ssmns.js} +26 -21
- package/dist/chunks/{workerd-p4zkxzv7.js → range-zx60pg73.js} +1 -1
- package/dist/content-headers.js +1 -1
- package/dist/cors.js +1 -1
- package/dist/event-feed.js +5 -5
- package/dist/fetch.d.ts +57 -0
- package/dist/fetch.js +64 -61
- package/dist/handlers/agent.js +6 -6
- package/dist/handlers/artifact.js +3 -3
- package/dist/handlers/automation.js +2 -2
- package/dist/handlers/blob.js +3 -3
- package/dist/handlers/command.js +6 -6
- package/dist/handlers/config.js +6 -6
- package/dist/handlers/credential.js +7 -7
- 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 +8 -8
- package/dist/handlers/generate.js +6 -6
- package/dist/handlers/integration.js +6 -6
- package/dist/handlers/job.js +2 -2
- package/dist/handlers/location.js +6 -6
- package/dist/handlers/machine.js +1 -1
- package/dist/handlers/mcp.js +8 -8
- package/dist/handlers/media.js +2 -2
- package/dist/handlers/message.js +7 -7
- 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.d.ts +1 -1
- package/dist/handlers/persistent-pty.js +17 -16
- 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 +8 -8
- package/dist/handlers/push.d.ts +28 -0
- package/dist/handlers/push.js +6 -0
- 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.d.ts +3 -1
- package/dist/handlers/session-error.js +4 -2
- package/dist/handlers/session.js +7 -7
- package/dist/handlers/shell.js +6 -6
- package/dist/handlers/skill.js +6 -6
- package/dist/handlers/usage.js +6 -6
- package/dist/handlers/vcs.js +6 -6
- package/dist/handlers/voice.js +6 -6
- package/dist/handlers/websearch.js +6 -6
- package/dist/handlers/worktree.js +6 -6
- package/dist/handlers.d.ts +1 -1
- package/dist/handlers.js +54 -53
- package/dist/location.js +4 -4
- package/dist/media-uri.js +1 -1
- package/dist/middleware/authorization.js +2 -2
- package/dist/middleware/defect-response.js +1 -1
- package/dist/middleware/form-location.js +3 -3
- package/dist/middleware/schema-error.js +1 -1
- package/dist/middleware/session-location.js +3 -3
- package/dist/pairing.d.ts +1 -1
- package/dist/pairing.js +3 -3
- package/dist/process.js +62 -61
- package/dist/range.js +1 -1
- package/dist/request-site.js +2 -2
- package/dist/request-tracing.js +1 -1
- package/dist/routes.d.ts +4 -2
- package/dist/routes.js +58 -57
- package/dist/server-info.js +5 -5
- package/dist/service-status.js +1 -1
- package/dist/workerd.d.ts +20 -6
- package/dist/workerd.js +87 -81
- package/package.json +9 -9
- package/dist/chunks/workerd-4apj6a8e.js +0 -13
- /package/dist/chunks/{workerd-9rqn6x4v.js → range-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{workerd-bd8755ek.js → range-bd8755ek.js} +0 -0
- /package/dist/chunks/{workerd-n26yr6pw.js → range-n26yr6pw.js} +0 -0
- /package/dist/chunks/{workerd-q187pxxd.js → range-q187pxxd.js} +0 -0
- /package/dist/chunks/{workerd-q4bn6dy8.js → range-q4bn6dy8.js} +0 -0
- /package/dist/chunks/{workerd-xthc02cw.js → range-xthc02cw.js} +0 -0
- /package/dist/chunks/{workerd-yc7nft6q.js → range-yc7nft6q.js} +0 -0
package/dist/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { LocationMiddleware } from "./location";
|
|
|
2
2
|
import { FormLocationMiddleware } from "./middleware/form-location";
|
|
3
3
|
import { SessionLocationMiddleware } from "./middleware/session-location";
|
|
4
4
|
export declare const Api: import("@opencode/protocol/api").Api<LocationMiddleware, import("effect/http-api/HttpApiMiddleware").HttpApiMiddleware<import("@opencode/core/instance").Services, readonly [typeof import("@opencode/protocol/errors").LocationNotFoundError], never>, FormLocationMiddleware, import("effect/http-api/HttpApiMiddleware").HttpApiMiddleware<import("@opencode/core/instance").Services, readonly [typeof import("@opencode/protocol/errors").InvalidRequestError, typeof import("@opencode/protocol/errors").SessionNotFoundError, typeof import("@opencode/protocol/errors").LocationNotFoundError], never>, SessionLocationMiddleware, import("effect/http-api/HttpApiMiddleware").HttpApiMiddleware<import("@opencode/core/instance").Services, readonly [typeof import("@opencode/protocol/errors").InvalidRequestError, typeof import("@opencode/protocol/errors").SessionNotFoundError, typeof import("@opencode/protocol/errors").LocationNotFoundError], never>, import("effect/http-api/HttpApiGroup").HttpApiGroup<"server.event", import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"event.subscribe", "GET", "/api/event", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
5
|
-
readonly types: import("effect/Schema").optional<import("effect/Schema").ArrayEnsure<import("effect/Schema").Union<readonly [import("effect/Schema").Literals<readonly ("agent.updated" | "artifact.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "experimental.job.updated" | "experimental.mcp.event" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.first-token" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated")[]>, import("effect/Schema").TemplateLiteral<readonly ["rpc.", import("effect/Schema").String]>]>>>;
|
|
5
|
+
readonly types: import("effect/Schema").optional<import("effect/Schema").ArrayEnsure<import("effect/Schema").Union<readonly [import("effect/Schema").Literals<readonly ("agent.updated" | "artifact.updated" | "command.updated" | "config.updated" | "credential.switched" | "credential.updated" | "experimental.job.updated" | "experimental.mcp.event" | "experimental.push.updated" | "filesystem.changed" | "form.cancelled" | "form.created" | "form.replied" | "installation.update-available" | "installation.updated" | "integration.updated" | "location.shutdown" | "mcp.resources.changed" | "mcp.status.changed" | "model.updated" | "models-dev.refreshed" | "permission.asked" | "permission.replied" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "plugin.updated" | "project.updated" | "provider.updated" | "pty.created" | "pty.deleted" | "pty.exited" | "pty.updated" | "reference.updated" | "session.agent.selected" | "session.archived" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.compaction.started" | "session.created" | "session.deleted" | "session.execution.failed" | "session.execution.interrupted" | "session.execution.started" | "session.execution.succeeded" | "session.forked" | "session.idle" | "session.inbox.cancelled" | "session.inbox.delivered" | "session.inbox.delivery.changed" | "session.inbox.enqueued" | "session.instructions.updated" | "session.metadata.updated" | "session.model.selected" | "session.moved" | "session.permissions" | "session.reasoning.delta" | "session.reasoning.ended" | "session.reasoning.started" | "session.renamed" | "session.retry.scheduled" | "session.revert.cleared" | "session.revert.committed" | "session.revert.staged" | "session.shell.ended" | "session.shell.started" | "session.skill.activated" | "session.status" | "session.step.ended" | "session.step.failed" | "session.step.first-token" | "session.step.started" | "session.step.streamed" | "session.synthetic" | "session.text.delta" | "session.text.ended" | "session.text.started" | "session.tool.called" | "session.tool.failed" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.input.started" | "session.tool.progress" | "session.tool.success" | "session.unarchived" | "session.usage.updated" | "session.viewed" | "shell.created" | "shell.deleted" | "shell.exited" | "skill.updated" | "tui.command.execute" | "tui.prompt.append" | "tui.session.select" | "tui.toast.show" | "vcs.branch.updated" | "websearch.updated" | "worktree.resolved" | "worktree.updated")[]>, import("effect/Schema").TemplateLiteral<readonly ["rpc.", import("effect/Schema").String]>]>>>;
|
|
6
6
|
}>>, never, never, import("effect/http-api/HttpApiSchema").StreamSse<import("effect/http-api/HttpApiSchema").SseEventFromData<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
7
7
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
8
8
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -6121,6 +6121,38 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
|
|
|
6121
6121
|
durability: "ephemeral";
|
|
6122
6122
|
durable: undefined;
|
|
6123
6123
|
data: import("effect/Schema").Struct<{}>;
|
|
6124
|
+
}, import("effect/Schema").Struct<{
|
|
6125
|
+
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
6126
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
6127
|
+
};
|
|
6128
|
+
readonly created: import("effect/Schema").Finite;
|
|
6129
|
+
readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
|
|
6130
|
+
readonly type: import("effect/Schema").Literal<"experimental.push.updated">;
|
|
6131
|
+
readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
|
|
6132
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
6133
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6134
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6135
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6136
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6137
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6138
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6139
|
+
}>, never, never>;
|
|
6140
|
+
}>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
6141
|
+
readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
|
|
6142
|
+
readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6143
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6144
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6145
|
+
}>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
|
|
6146
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6147
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
6148
|
+
}>, never, never>;
|
|
6149
|
+
}>>, never, never>;
|
|
6150
|
+
readonly data: import("effect/Schema").Struct<{}>;
|
|
6151
|
+
}> & {
|
|
6152
|
+
type: "experimental.push.updated";
|
|
6153
|
+
durability: "ephemeral";
|
|
6154
|
+
durable: undefined;
|
|
6155
|
+
data: import("effect/Schema").Struct<{}>;
|
|
6124
6156
|
}, import("effect/Schema").Struct<{
|
|
6125
6157
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
|
|
6126
6158
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -8178,6 +8210,18 @@ export declare const Api: import("@opencode/protocol/api").Api<LocationMiddlewar
|
|
|
8178
8210
|
readonly cursor: string | null;
|
|
8179
8211
|
readonly truncated?: boolean | undefined;
|
|
8180
8212
|
};
|
|
8213
|
+
} | {
|
|
8214
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
8215
|
+
readonly created: number;
|
|
8216
|
+
readonly metadata?: {
|
|
8217
|
+
readonly [x: string]: unknown;
|
|
8218
|
+
} | undefined;
|
|
8219
|
+
readonly type: "experimental.push.updated";
|
|
8220
|
+
readonly location?: {
|
|
8221
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
8222
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
|
|
8223
|
+
} | undefined;
|
|
8224
|
+
readonly data: {};
|
|
8181
8225
|
} | {
|
|
8182
8226
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
8183
8227
|
readonly created: number;
|
package/dist/api.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./chunks/
|
|
4
|
-
import"./chunks/
|
|
5
|
-
import"./chunks/
|
|
6
|
-
import"./chunks/
|
|
7
|
-
import"./chunks/
|
|
3
|
+
} from "./chunks/range-ay32z58n.js";
|
|
4
|
+
import"./chunks/range-aexh791j.js";
|
|
5
|
+
import"./chunks/range-jy2ammbg.js";
|
|
6
|
+
import"./chunks/range-stx1bw5w.js";
|
|
7
|
+
import"./chunks/range-rqgv9x42.js";
|
|
8
8
|
export {
|
|
9
9
|
Api2 as Api
|
|
10
10
|
};
|
package/dist/auth.js
CHANGED
|
@@ -171,7 +171,7 @@ var makeMachine2 = Effect.gen(function* () {
|
|
|
171
171
|
add: Effect.fn("MachineHandler.add")(function* (payload) {
|
|
172
172
|
yield* requireEnabled;
|
|
173
173
|
const id = yield* machines.add(payload.name).pipe(Effect.catchTag("Machines.AlreadyExists", (error) => Effect.succeed(error.machine)), Effect.catchTag("Machines.InvalidName", (error) => Effect.fail(new InvalidRequestError({ message: error.message, kind: "invalid_name", field: "name" }))));
|
|
174
|
-
const reach = Option.isSome(yield* iroh) ? [
|
|
174
|
+
const reach = Option.isSome(yield* iroh) ? [{ type: "iroh" }, ...payload.reach] : payload.reach;
|
|
175
175
|
const join = yield* machines.invite(id, { reach, replace: payload.replace }).pipe(Effect.catchTags({
|
|
176
176
|
"Machines.AlreadyPaired": (error) => Effect.fail(new ConflictError({ message: error.message, resource: error.machine })),
|
|
177
177
|
"Machines.NotFound": (error) => Effect.fail(new MachineNotFoundError({ machine: error.machine, message: error.message })),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./range-ay32z58n.js";
|
|
4
4
|
import {
|
|
5
5
|
requireConnectable2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./range-9agv2b4c.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/credential.ts
|
|
9
9
|
import { Credential } from "@opencode/core/credential";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./range-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: () => Service3,
|
|
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 Service3 extends Context.Service()("@opencode/server/ServerInfo") {
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return Layer.succeed(
|
|
18
|
+
function layer3(urls, tmp, app = {}) {
|
|
19
|
+
return Layer.succeed(Service3, Service3.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 { Service3, layer3, connectionURLs2, exports_server_info };
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
locationErrors2,
|
|
3
3
|
response2,
|
|
4
4
|
requestRef2
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./range-stx1bw5w.js";
|
|
6
6
|
import {
|
|
7
7
|
Api2
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./range-ay32z58n.js";
|
|
9
9
|
import {
|
|
10
10
|
CorsConfig2,
|
|
11
11
|
isAllowedRequestOrigin2
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./range-q4bn6dy8.js";
|
|
13
13
|
import {
|
|
14
14
|
runPtySocket2,
|
|
15
15
|
holdLocation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./range-q187pxxd.js";
|
|
17
17
|
|
|
18
18
|
// src/handlers/pty.ts
|
|
19
19
|
import { Pty } from "@opencode/core/pty";
|
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./range-ay32z58n.js";
|
|
4
4
|
import {
|
|
5
5
|
CorsConfig2,
|
|
6
6
|
isAllowedRequestOrigin2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./range-q4bn6dy8.js";
|
|
8
8
|
import {
|
|
9
9
|
makeArtifact2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./range-sqfq92mf.js";
|
|
11
11
|
import {
|
|
12
12
|
makeBlobGet2
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./range-g23ffrnz.js";
|
|
14
14
|
import {
|
|
15
15
|
makeAutomation2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./range-6pm6ek88.js";
|
|
17
17
|
import {
|
|
18
18
|
makeJob2
|
|
19
|
-
} from "./
|
|
19
|
+
} from "./range-x2qy7jg1.js";
|
|
20
20
|
import {
|
|
21
21
|
makeMachineLink2,
|
|
22
22
|
makeMachine2
|
|
23
|
-
} from "./
|
|
23
|
+
} from "./range-017ycvbx.js";
|
|
24
24
|
import {
|
|
25
25
|
makeMediaGet2
|
|
26
|
-
} from "./
|
|
26
|
+
} from "./range-djr0jy89.js";
|
|
27
|
+
import {
|
|
28
|
+
makePush2
|
|
29
|
+
} from "./range-qpnw2qd1.js";
|
|
27
30
|
import {
|
|
28
31
|
runPtySocket2
|
|
29
|
-
} from "./
|
|
32
|
+
} from "./range-q187pxxd.js";
|
|
30
33
|
|
|
31
34
|
// src/handlers/persistent-pty.ts
|
|
32
35
|
import { PersistentPty } from "@opencode/core/persistent-pty";
|
|
@@ -57,7 +60,8 @@ var PersistentPtyHandler2 = HttpApiBuilder.group(Api2, "server.experimental", (h
|
|
|
57
60
|
const automation = yield* makeAutomation2;
|
|
58
61
|
const machine = yield* makeMachine2;
|
|
59
62
|
const machineLink = yield* makeMachineLink2;
|
|
60
|
-
|
|
63
|
+
const push = yield* makePush2;
|
|
64
|
+
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("job.cancel", (ctx) => job.cancel(ctx.params.id)).handleRaw("machine.link", (ctx) => machineLink(ctx.request)).handle("machine.list", () => machine.list()).handle("machine.add", (ctx) => machine.add(ctx.payload)).handle("machine.remove", (ctx) => machine.remove(ctx.params.name)).handle("push.get", () => push.get()).handle("push.device.register", (ctx) => push.register(ctx.params.deviceID, ctx.payload)).handle("push.device.remove", (ctx) => push.remove(ctx.params.deviceID)).handle("push.device.update", (ctx) => push.update(ctx.params.deviceID, ctx.payload)).handle("push.device.session.set", (ctx) => push.setDeviceBell(ctx.params.deviceID, ctx.params.sessionID, ctx.payload)).handle("push.device.session.remove", (ctx) => push.removeDeviceBell(ctx.params.deviceID, ctx.params.sessionID)).handle("push.session.set", (ctx) => push.setSessionBell(ctx.params.sessionID, ctx.payload)).handle("push.session.remove", (ctx) => push.removeSessionBell(ctx.params.sessionID)).handle("push.settings.set", (ctx) => push.setSettings(ctx.payload)).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) {
|
|
61
65
|
return { data: yield* pty.read(ctx.params.sessionID, ctx.query.lines).pipe(mapUnavailable) };
|
|
62
66
|
})).handle("persistentPty.list", Effect.fn(function* (ctx) {
|
|
63
67
|
return { data: yield* pty.list(ctx.params.sessionID).pipe(mapUnavailable) };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
response2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./range-stx1bw5w.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./range-ay32z58n.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/integration.ts
|
|
9
9
|
import { Integration } from "@opencode/core/integration";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocationMiddleware2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./range-stx1bw5w.js";
|
|
4
4
|
import {
|
|
5
5
|
FormLocationMiddleware2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./range-jy2ammbg.js";
|
|
7
7
|
import {
|
|
8
8
|
SessionLocationMiddleware2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./range-aexh791j.js";
|
|
10
10
|
|
|
11
11
|
// src/api.ts
|
|
12
12
|
import { makeDefaultApi } from "@opencode/protocol/api";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestRef2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./range-stx1bw5w.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./range-ay32z58n.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/debug.ts
|
|
9
9
|
import { LocationServiceMap } from "@opencode/core/location-service-map";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
missingSession2,
|
|
3
3
|
failedMessageDecode2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./range-rqgv9x42.js";
|
|
5
5
|
import {
|
|
6
6
|
Api2
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./range-ay32z58n.js";
|
|
8
8
|
import {
|
|
9
9
|
wantsMediaRefs2
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./range-xthc02cw.js";
|
|
11
11
|
|
|
12
12
|
// src/handlers/message.ts
|
|
13
13
|
import { SessionMessage } from "@opencode/core/session/message";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
response2
|
|
3
|
+
} from "./range-stx1bw5w.js";
|
|
4
|
+
import {
|
|
5
|
+
Api2
|
|
6
|
+
} from "./range-ay32z58n.js";
|
|
7
|
+
|
|
8
|
+
// src/handlers/skill.ts
|
|
9
|
+
import { Skill } from "@opencode/core/skill";
|
|
10
|
+
import { FileNotFoundError, SkillLoadError, SkillNotFoundError } from "@opencode/protocol/errors";
|
|
11
|
+
import { Effect } from "effect";
|
|
12
|
+
import { HttpApiBuilder } from "effect/http-api";
|
|
13
|
+
var SkillHandler2 = HttpApiBuilder.group(Api2, "server.skill", (handlers) => handlers.handle("skill.list", () => response2(Skill.Service.use((skill) => skill.list()))).handle("skill.file", (ctx) => Effect.gen(function* () {
|
|
14
|
+
const skills = yield* Skill.Service;
|
|
15
|
+
const raw = new URL(ctx.request.url, "http://localhost").pathname.split("/").slice(6).join("/");
|
|
16
|
+
const file = yield* Effect.try({
|
|
17
|
+
try: () => decodeURIComponent(raw),
|
|
18
|
+
catch: () => new FileNotFoundError({ path: raw, message: `File not found: ${raw}` })
|
|
19
|
+
});
|
|
20
|
+
return yield* skills.read(ctx.params.skillID, file).pipe(Effect.catchTags({
|
|
21
|
+
"Skill.NotFoundError": (error) => Effect.fail(new SkillNotFoundError({ skill: ctx.params.skillID, message: `Skill not found: ${error.skill}` })),
|
|
22
|
+
"Skill.FileNotFoundError": (error) => Effect.fail(new FileNotFoundError({ path: error.file, message: `File not found: ${error.file}` })),
|
|
23
|
+
"Skill.LoadError": (error) => Effect.fail(new SkillLoadError({ skill: ctx.params.skillID, message: error.message }))
|
|
24
|
+
}));
|
|
25
|
+
})));
|
|
26
|
+
|
|
27
|
+
export { SkillHandler2 };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
locationErrors2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./range-stx1bw5w.js";
|
|
4
4
|
import {
|
|
5
5
|
Api2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./range-ay32z58n.js";
|
|
7
7
|
|
|
8
8
|
// src/handlers/generate.ts
|
|
9
9
|
import { Generate } from "@opencode/core/generate";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./range-9rqn6x4v.js";
|
|
4
4
|
|
|
5
5
|
// src/pairing.ts
|
|
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(Service3, 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 };
|