@opencode/protocol 0.0.0-dev-20783 → 0.0.0-dev-20784
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +1 -1
- package/dist/api.js +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/groups/agent.d.ts +1 -1
- package/dist/groups/agent.js +1 -1
- package/dist/groups/command.d.ts +1 -1
- package/dist/groups/command.js +1 -1
- package/dist/groups/config.d.ts +1 -1
- package/dist/groups/config.js +1 -1
- package/dist/groups/credential.d.ts +1 -1
- package/dist/groups/credential.js +1 -1
- package/dist/groups/debug.d.ts +1 -1
- package/dist/groups/debug.js +1 -1
- package/dist/groups/event.d.ts +13 -13
- package/dist/groups/event.js +1 -1
- package/dist/groups/form.d.ts +1 -1
- package/dist/groups/form.js +1 -1
- package/dist/groups/fs.d.ts +1 -1
- package/dist/groups/fs.js +1 -1
- package/dist/groups/generate.d.ts +1 -1
- package/dist/groups/generate.js +1 -1
- package/dist/groups/integration.d.ts +1 -1
- package/dist/groups/integration.js +1 -1
- package/dist/groups/location.d.ts +1 -1
- package/dist/groups/location.js +1 -1
- package/dist/groups/mcp.d.ts +1 -1
- package/dist/groups/mcp.js +1 -1
- package/dist/groups/message.d.ts +1 -1
- package/dist/groups/message.js +1 -1
- package/dist/groups/migration.d.ts +1 -1
- package/dist/groups/migration.js +1 -1
- package/dist/groups/model.d.ts +1 -1
- package/dist/groups/model.js +1 -1
- package/dist/groups/permission.d.ts +1 -1
- package/dist/groups/permission.js +1 -1
- package/dist/groups/persistent-pty.d.ts +1 -1
- package/dist/groups/persistent-pty.js +1 -1
- package/dist/groups/plugin.d.ts +1 -1
- package/dist/groups/plugin.js +1 -1
- package/dist/groups/project.d.ts +1 -1
- package/dist/groups/project.js +1 -1
- package/dist/groups/provider.d.ts +1 -1
- package/dist/groups/provider.js +1 -1
- package/dist/groups/pty.d.ts +1 -1
- package/dist/groups/pty.js +1 -1
- package/dist/groups/reference.d.ts +1 -1
- package/dist/groups/reference.js +1 -1
- package/dist/groups/rpc.d.ts +1 -1
- package/dist/groups/rpc.js +1 -1
- package/dist/groups/server.d.ts +1 -1
- package/dist/groups/server.js +1 -1
- package/dist/groups/session.d.ts +1 -1
- package/dist/groups/session.js +7 -5
- package/dist/groups/shell.d.ts +1 -1
- package/dist/groups/shell.js +1 -1
- package/dist/groups/skill.d.ts +1 -1
- package/dist/groups/skill.js +1 -1
- package/dist/groups/vcs.d.ts +1 -1
- package/dist/groups/vcs.js +1 -1
- package/dist/groups/websearch.d.ts +1 -1
- package/dist/groups/websearch.js +1 -1
- package/dist/groups/worktree.d.ts +1 -1
- package/dist/groups/worktree.js +1 -1
- package/dist/middleware/authorization.d.ts +1 -1
- package/dist/middleware/authorization.js +1 -1
- package/dist/middleware/schema-error.d.ts +1 -1
- package/dist/middleware/schema-error.js +1 -1
- package/dist/simulation.d.ts +1 -1
- package/dist/simulation.js +1 -1
- package/package.json +3 -3
package/dist/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context } from "effect";
|
|
2
|
-
import { HttpApi, HttpApiGroup, HttpApiMiddleware } from "effect/
|
|
2
|
+
import { HttpApi, HttpApiGroup, HttpApiMiddleware } from "effect/http-api";
|
|
3
3
|
import { SchemaErrorMiddleware } from "./middleware/schema-error.js";
|
|
4
4
|
import { GenerateGroup } from "./groups/generate.js";
|
|
5
5
|
import { MessageGroup } from "./groups/message.js";
|
package/dist/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context } from "effect";
|
|
2
|
-
import { HttpApi, HttpApiGroup, HttpApiMiddleware, OpenApi } from "effect/
|
|
2
|
+
import { HttpApi, HttpApiGroup, HttpApiMiddleware, OpenApi } from "effect/http-api";
|
|
3
3
|
import { SchemaErrorMiddleware } from "./middleware/schema-error.js";
|
|
4
4
|
import { GenerateGroup } from "./groups/generate.js";
|
|
5
5
|
import { MessageGroup } from "./groups/message.js";
|
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LocationNotFoundError, InvalidRequestError, SessionNotFoundError } from "./errors.js";
|
|
2
2
|
import type { Api } from "./api.js";
|
|
3
3
|
import type { Context } from "effect";
|
|
4
|
-
import { HttpApiMiddleware } from "effect/
|
|
4
|
+
import { HttpApiMiddleware } from "effect/http-api";
|
|
5
5
|
import type { EventGroup } from "./groups/event.js";
|
|
6
6
|
declare const LocationMiddleware_base: HttpApiMiddleware.ServiceClass<LocationMiddleware, "@opencode/client/LocationMiddleware", {
|
|
7
7
|
requires: never;
|
package/dist/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LocationNotFoundError, InvalidRequestError, SessionNotFoundError } from "./errors.js";
|
|
2
2
|
import { makeDefaultApi } from "./api.js";
|
|
3
|
-
import { HttpApiMiddleware } from "effect/
|
|
3
|
+
import { HttpApiMiddleware } from "effect/http-api";
|
|
4
4
|
class LocationMiddleware extends HttpApiMiddleware.Service()("@opencode/client/LocationMiddleware", { error: [LocationNotFoundError] }) {
|
|
5
5
|
}
|
|
6
6
|
class SessionLocationMiddleware extends HttpApiMiddleware.Service()("@opencode/client/SessionLocationMiddleware", { error: [InvalidRequestError, SessionNotFoundError, LocationNotFoundError] }) {
|
package/dist/groups/agent.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Agent } from "@opencode/schema/agent";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
4
4
|
import { AgentNotFoundError } from "../errors.js";
|
|
5
5
|
export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpApiEndpoint.HttpApiEndpoint<"agent.list", "GET", "/api/agent", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
6
6
|
readonly location: Schema.optional<Schema.Struct<{
|
package/dist/groups/agent.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Agent } from "@opencode/schema/agent";
|
|
2
2
|
import { Location } from "@opencode/schema/location";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
5
5
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
6
6
|
import { AgentNotFoundError } from "../errors.js";
|
|
7
7
|
export const AgentGroup = HttpApiGroup.make("server.agent")
|
package/dist/groups/command.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
export declare const CommandGroup: HttpApiGroup.HttpApiGroup<"server.command", HttpApiEndpoint.HttpApiEndpoint<"command.list", "GET", "/api/command", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
4
4
|
readonly location: Schema.optional<Schema.Struct<{
|
|
5
5
|
readonly directory: Schema.optional<Schema.String>;
|
package/dist/groups/command.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from "@opencode/schema/command";
|
|
2
2
|
import { Location } from "@opencode/schema/location";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
5
5
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
6
6
|
export const CommandGroup = HttpApiGroup.make("server.command")
|
|
7
7
|
.add(HttpApiEndpoint.get("command.list", "/api/command", {
|
package/dist/groups/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Config } from "@opencode/schema/config";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
4
4
|
export declare const ConfigGroup: HttpApiGroup.HttpApiGroup<"server.config", HttpApiEndpoint.HttpApiEndpoint<"config.get", "GET", "/api/config", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
readonly location: Schema.optional<Schema.Struct<{
|
|
6
6
|
readonly directory: Schema.optional<Schema.String>;
|
package/dist/groups/config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Config } from "@opencode/schema/config";
|
|
2
2
|
import { ConfigShell } from "@opencode/schema/config/shell";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
5
5
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
6
6
|
export const ConfigGroup = HttpApiGroup.make("server.config")
|
|
7
7
|
.add(HttpApiEndpoint.get("config.get", "/api/config", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
import { ConflictError } from "../errors.js";
|
|
4
4
|
export declare const CredentialGroup: HttpApiGroup.HttpApiGroup<"server.credential", HttpApiEndpoint.HttpApiEndpoint<"credential.list", "GET", "/api/credential", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
5
5
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Credential } from "@opencode/schema/credential";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
4
4
|
import { ConflictError } from "../errors.js";
|
|
5
5
|
export const CredentialGroup = HttpApiGroup.make("server.credential")
|
|
6
6
|
.add(HttpApiEndpoint.get("credential.list", "/api/credential", {
|
package/dist/groups/debug.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
export declare const DebugGroup: HttpApiGroup.HttpApiGroup<"server.debug", HttpApiEndpoint.HttpApiEndpoint<"debug.location", "GET", "/api/debug/location", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
|
|
4
4
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
5
5
|
}>>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"debug.location.evict", "DELETE", "/api/debug/location", never, Schema.toCodecStringTree<Schema.Struct<{
|
package/dist/groups/debug.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Location } from "@opencode/schema/location";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
4
4
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
5
5
|
export const DebugGroup = HttpApiGroup.make("server.debug")
|
|
6
6
|
.add(HttpApiEndpoint.get("debug.location", "/api/debug/location", {
|
package/dist/groups/event.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Event } from "@opencode/schema/event";
|
|
2
2
|
import type { Definition } from "@opencode/schema/event";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
5
5
|
export declare const makeEventGroup: <const Definitions extends ReadonlyArray<Definition>>(definitions: Definitions) => HttpApiGroup.HttpApiGroup<"server.event", HttpApiEndpoint.HttpApiEndpoint<"event.subscribe", "GET", "/api/event", never, never, never, never, HttpApiSchema.StreamSse<HttpApiSchema.SseEventFromData<Schema.Union<readonly [...Definitions, Schema.Struct<{
|
|
6
6
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
7
7
|
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
@@ -6419,6 +6419,11 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6419
6419
|
readonly type: "string";
|
|
6420
6420
|
readonly key: string;
|
|
6421
6421
|
readonly required?: boolean | undefined;
|
|
6422
|
+
readonly options?: readonly {
|
|
6423
|
+
readonly value: string;
|
|
6424
|
+
readonly label: string;
|
|
6425
|
+
readonly description?: string | undefined;
|
|
6426
|
+
}[] | undefined;
|
|
6422
6427
|
readonly description?: string | undefined;
|
|
6423
6428
|
readonly format?: "email" | "uri" | "date" | "date-time" | undefined;
|
|
6424
6429
|
readonly minLength?: number | undefined;
|
|
@@ -6426,11 +6431,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6426
6431
|
readonly pattern?: string | undefined;
|
|
6427
6432
|
readonly placeholder?: string | undefined;
|
|
6428
6433
|
readonly default?: string | undefined;
|
|
6429
|
-
readonly options?: readonly {
|
|
6430
|
-
readonly value: string;
|
|
6431
|
-
readonly label: string;
|
|
6432
|
-
readonly description?: string | undefined;
|
|
6433
|
-
}[] | undefined;
|
|
6434
6434
|
readonly custom?: boolean | undefined;
|
|
6435
6435
|
readonly title?: string | undefined;
|
|
6436
6436
|
readonly hidden?: boolean | undefined;
|
|
@@ -6484,12 +6484,12 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6484
6484
|
}[] | undefined;
|
|
6485
6485
|
} | {
|
|
6486
6486
|
readonly type: "multiselect";
|
|
6487
|
-
readonly key: string;
|
|
6488
6487
|
readonly options: readonly {
|
|
6489
6488
|
readonly value: string;
|
|
6490
6489
|
readonly label: string;
|
|
6491
6490
|
readonly description?: string | undefined;
|
|
6492
6491
|
}[];
|
|
6492
|
+
readonly key: string;
|
|
6493
6493
|
readonly required?: boolean | undefined;
|
|
6494
6494
|
readonly description?: string | undefined;
|
|
6495
6495
|
readonly default?: readonly string[] | undefined;
|
|
@@ -6513,6 +6513,11 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6513
6513
|
readonly type: "string";
|
|
6514
6514
|
readonly key: string;
|
|
6515
6515
|
readonly required?: boolean | undefined;
|
|
6516
|
+
readonly options?: readonly {
|
|
6517
|
+
readonly value: string;
|
|
6518
|
+
readonly label: string;
|
|
6519
|
+
readonly description?: string | undefined;
|
|
6520
|
+
}[] | undefined;
|
|
6516
6521
|
readonly description?: string | undefined;
|
|
6517
6522
|
readonly format?: "email" | "uri" | "date" | "date-time" | undefined;
|
|
6518
6523
|
readonly minLength?: number | undefined;
|
|
@@ -6520,11 +6525,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6520
6525
|
readonly pattern?: string | undefined;
|
|
6521
6526
|
readonly placeholder?: string | undefined;
|
|
6522
6527
|
readonly default?: string | undefined;
|
|
6523
|
-
readonly options?: readonly {
|
|
6524
|
-
readonly value: string;
|
|
6525
|
-
readonly label: string;
|
|
6526
|
-
readonly description?: string | undefined;
|
|
6527
|
-
}[] | undefined;
|
|
6528
6528
|
readonly custom?: boolean | undefined;
|
|
6529
6529
|
readonly title?: string | undefined;
|
|
6530
6530
|
readonly hidden?: boolean | undefined;
|
|
@@ -6578,12 +6578,12 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6578
6578
|
}[] | undefined;
|
|
6579
6579
|
} | {
|
|
6580
6580
|
readonly type: "multiselect";
|
|
6581
|
-
readonly key: string;
|
|
6582
6581
|
readonly options: readonly {
|
|
6583
6582
|
readonly value: string;
|
|
6584
6583
|
readonly label: string;
|
|
6585
6584
|
readonly description?: string | undefined;
|
|
6586
6585
|
}[];
|
|
6586
|
+
readonly key: string;
|
|
6587
6587
|
readonly required?: boolean | undefined;
|
|
6588
6588
|
readonly description?: string | undefined;
|
|
6589
6589
|
readonly default?: readonly string[] | undefined;
|
package/dist/groups/event.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Event } from "@opencode/schema/event";
|
|
|
2
2
|
import { EventManifest } from "@opencode/schema/event-manifest";
|
|
3
3
|
import { Location } from "@opencode/schema/location";
|
|
4
4
|
import { Schema } from "effect";
|
|
5
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
5
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
6
6
|
const fields = {
|
|
7
7
|
id: Event.ID,
|
|
8
8
|
metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
package/dist/groups/form.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context, Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware } from "effect/http-api";
|
|
3
3
|
export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService>(locationMiddleware: Context.Key<LocationId, LocationService>) => HttpApiGroup.HttpApiGroup<"server.form", HttpApiEndpoint.HttpApiEndpoint<"form.list", "GET", "/api/form", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
4
4
|
readonly location: Schema.optional<Schema.Struct<{
|
|
5
5
|
readonly directory: Schema.optional<Schema.String>;
|
package/dist/groups/form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Form } from "@opencode/schema/form";
|
|
2
2
|
import { Location } from "@opencode/schema/location";
|
|
3
3
|
import { Context, Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, OpenApi } from "effect/
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, OpenApi } from "effect/http-api";
|
|
5
5
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
6
6
|
export const makeFormGroup = (locationMiddleware) => HttpApiGroup.make("server.form")
|
|
7
7
|
.add(HttpApiEndpoint.get("form.list", "/api/form", {
|
package/dist/groups/fs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import { FileNotFoundError } from "../errors.js";
|
|
4
4
|
export declare const FileSystemGroup: HttpApiGroup.HttpApiGroup<"server.fs", HttpApiEndpoint.HttpApiEndpoint<"fs.read", "GET", "/api/fs/read/*", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
readonly location: Schema.optional<Schema.Struct<{
|
package/dist/groups/fs.js
CHANGED
|
@@ -2,7 +2,7 @@ import { FileSystem } from "@opencode/schema/filesystem";
|
|
|
2
2
|
import { Location } from "@opencode/schema/location";
|
|
3
3
|
import { PositiveInt } from "@opencode/schema/schema";
|
|
4
4
|
import { Schema } from "effect";
|
|
5
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
5
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
6
6
|
import { FileNotFoundError } from "../errors.js";
|
|
7
7
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
8
8
|
const ListQuery = Schema.Struct({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import { LocationNotFoundError, InvalidRequestError, ServiceUnavailableError } from "../errors.js";
|
|
4
4
|
export declare const GenerateGroup: HttpApiGroup.HttpApiGroup<"server.generate", HttpApiEndpoint.HttpApiEndpoint<"generate.text", "POST", "/api/experimental/generate", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
5
5
|
readonly prompt: Schema.String;
|
package/dist/groups/generate.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Model } from "@opencode/schema/model";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
4
4
|
import { LocationNotFoundError, InvalidRequestError, ServiceUnavailableError } from "../errors.js";
|
|
5
5
|
export const GenerateGroup = HttpApiGroup.make("server.generate")
|
|
6
6
|
.add(HttpApiEndpoint.post("generate.text", "/api/experimental/generate", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Integration } from "@opencode/schema/integration";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
4
4
|
import { IntegrationAttemptNotFoundError, IntegrationMethodNotFoundError, IntegrationNotFoundError, InvalidRequestError } from "../errors.js";
|
|
5
5
|
export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integration", HttpApiEndpoint.HttpApiEndpoint<"integration.list", "GET", "/api/integration", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
6
6
|
readonly location: Schema.optional<Schema.Struct<{
|
|
@@ -2,7 +2,7 @@ import { Integration } from "@opencode/schema/integration";
|
|
|
2
2
|
import { Location } from "@opencode/schema/location";
|
|
3
3
|
import { Form } from "@opencode/schema/form";
|
|
4
4
|
import { Schema } from "effect";
|
|
5
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
5
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
6
6
|
import { IntegrationAttemptNotFoundError, IntegrationMethodNotFoundError, IntegrationNotFoundError, InvalidRequestError, } from "../errors.js";
|
|
7
7
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
8
8
|
export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context, Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
import { ServiceUnavailableError } from "../errors.js";
|
|
4
4
|
export declare const LocationQuery: Schema.Struct<{
|
|
5
5
|
readonly location: Schema.optional<Schema.Struct<{
|
package/dist/groups/location.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Location } from "@opencode/schema/location";
|
|
2
2
|
import { Context, Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
4
4
|
import { ServiceUnavailableError } from "../errors.js";
|
|
5
5
|
export const LocationQuery = Schema.Struct({
|
|
6
6
|
location: Schema.optional(Schema.Struct({
|
package/dist/groups/mcp.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Mcp } from "@opencode/schema/mcp";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
4
4
|
import { McpServerNotFoundError } from "../errors.js";
|
|
5
5
|
export declare const McpGroup: HttpApiGroup.HttpApiGroup<"server.mcp", HttpApiEndpoint.HttpApiEndpoint<"mcp.list", "GET", "/api/mcp", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
6
6
|
readonly location: Schema.optional<Schema.Struct<{
|
package/dist/groups/mcp.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Mcp } from "@opencode/schema/mcp";
|
|
2
2
|
import { Location } from "@opencode/schema/location";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
5
5
|
import { McpServerNotFoundError } from "../errors.js";
|
|
6
6
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
7
7
|
export const McpGroup = HttpApiGroup.make("server.mcp")
|
package/dist/groups/message.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import { InvalidCursorError, SessionNotFoundError, UnknownError } from "../errors.js";
|
|
4
4
|
export declare const SessionMessagesQuery: Schema.Struct<{
|
|
5
5
|
readonly limit: Schema.optional<Schema.NumberFromString>;
|
package/dist/groups/message.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Session } from "@opencode/schema/session";
|
|
|
2
2
|
import { SessionMessage } from "@opencode/schema/session-message";
|
|
3
3
|
import { Location } from "@opencode/schema/location";
|
|
4
4
|
import { Schema, Struct } from "effect";
|
|
5
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
5
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
6
6
|
import { InvalidCursorError, SessionNotFoundError, UnknownError } from "../errors.js";
|
|
7
7
|
export const SessionMessagesQuery = Schema.Struct({
|
|
8
8
|
limit: Schema.optional(Schema.NumberFromString.check(Schema.isInt(), Schema.isGreaterThanOrEqualTo(1), Schema.isLessThanOrEqualTo(200))).annotate({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
export declare const V1MigrationStatus: Schema.Union<readonly [Schema.Struct<{
|
|
4
4
|
readonly status: Schema.Literals<readonly ["required", "completed"]>;
|
|
5
5
|
}>, Schema.Struct<{
|
package/dist/groups/migration.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
3
3
|
const V1MigrationProgress = Schema.Struct({
|
|
4
4
|
label: Schema.String,
|
|
5
5
|
numerator: Schema.optional(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))),
|
package/dist/groups/model.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Model } from "@opencode/schema/model";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
4
4
|
import { ServiceUnavailableError } from "../errors.js";
|
|
5
5
|
export declare const ModelGroup: HttpApiGroup.HttpApiGroup<"server.model", HttpApiEndpoint.HttpApiEndpoint<"model.list", "GET", "/api/model", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
6
6
|
readonly location: Schema.optional<Schema.Struct<{
|
package/dist/groups/model.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Model } from "@opencode/schema/model";
|
|
2
2
|
import { Location } from "@opencode/schema/location";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
5
5
|
import { ServiceUnavailableError } from "../errors.js";
|
|
6
6
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
7
7
|
export const ModelGroup = HttpApiGroup.make("server.model")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context, Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
import { LocationNotFoundError, PermissionNotFoundError, SessionNotFoundError } from "../errors.js";
|
|
4
4
|
export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService>(locationMiddleware: Context.Key<LocationId, LocationService>, sessionLocationMiddleware: Context.Key<SessionLocationId, SessionLocationService>) => HttpApiGroup.HttpApiGroup<"server.permission", HttpApiEndpoint.HttpApiEndpoint<"permission.request.list", "GET", "/api/permission/request", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
readonly location: Schema.optional<Schema.Struct<{
|
|
@@ -5,7 +5,7 @@ import { PermissionSaved } from "@opencode/schema/permission-saved";
|
|
|
5
5
|
import { Project } from "@opencode/schema/project";
|
|
6
6
|
import { Session } from "@opencode/schema/session";
|
|
7
7
|
import { Context, Schema } from "effect";
|
|
8
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/
|
|
8
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
9
9
|
import { LocationNotFoundError, PermissionNotFoundError, SessionNotFoundError } from "../errors.js";
|
|
10
10
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
11
11
|
export const makePermissionGroup = (locationMiddleware, sessionLocationMiddleware) => HttpApiGroup.make("server.permission")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
import { ForbiddenError, InvalidRequestError, PtyNotFoundError, ServiceUnavailableError } from "../errors.js";
|
|
4
4
|
import { PTY_CONNECT_TICKET_QUERY, PTY_CONNECT_TOKEN_HEADER, PTY_CONNECT_TOKEN_HEADER_VALUE } from "./pty.js";
|
|
5
5
|
export { PTY_CONNECT_TICKET_QUERY, PTY_CONNECT_TOKEN_HEADER, PTY_CONNECT_TOKEN_HEADER_VALUE };
|
|
@@ -3,7 +3,7 @@ import { Pty } from "@opencode/schema/pty";
|
|
|
3
3
|
import { PtyTicket } from "@opencode/schema/pty-ticket";
|
|
4
4
|
import { Session } from "@opencode/schema/session";
|
|
5
5
|
import { Schema } from "effect";
|
|
6
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
6
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
7
7
|
import { ForbiddenError, InvalidRequestError, PtyNotFoundError, ServiceUnavailableError } from "../errors.js";
|
|
8
8
|
import { PTY_CONNECT_TICKET_QUERY, PTY_CONNECT_TOKEN_HEADER, PTY_CONNECT_TOKEN_HEADER_VALUE } from "./pty.js";
|
|
9
9
|
export { PTY_CONNECT_TICKET_QUERY, PTY_CONNECT_TOKEN_HEADER, PTY_CONNECT_TOKEN_HEADER_VALUE };
|
package/dist/groups/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
import { InvalidRequestError, ServiceUnavailableError } from "../errors.js";
|
|
4
4
|
export declare const PluginGroup: HttpApiGroup.HttpApiGroup<"server.plugin", HttpApiEndpoint.HttpApiEndpoint<"plugin.list", "GET", "/api/plugin", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
readonly location: Schema.optional<Schema.Struct<{
|
package/dist/groups/plugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Location } from "@opencode/schema/location";
|
|
2
2
|
import { Plugin } from "@opencode/schema/plugin";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
5
5
|
import { InvalidRequestError, ServiceUnavailableError } from "../errors.js";
|
|
6
6
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
7
7
|
export const PluginGroup = HttpApiGroup.make("server.plugin")
|
package/dist/groups/project.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import { ProjectNotFoundError } from "../errors.js";
|
|
4
4
|
export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", HttpApiEndpoint.HttpApiEndpoint<"project.list", "GET", "/api/project", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
|
|
5
5
|
readonly id: Schema.brand<Schema.String, "Project.ID"> & {
|
package/dist/groups/project.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Project } from "@opencode/schema/project";
|
|
2
2
|
import { Schema, Struct } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
4
4
|
import { ProjectNotFoundError } from "../errors.js";
|
|
5
5
|
const root = "/api/project";
|
|
6
6
|
const UpdatePayload = Schema.Struct(Struct.omit(Project.UpdateInput.fields, ["projectID"]));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Provider } from "@opencode/schema/provider";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
4
4
|
import { ProviderNotFoundError, ServiceUnavailableError } from "../errors.js";
|
|
5
5
|
export declare const ProviderGroup: HttpApiGroup.HttpApiGroup<"server.provider", HttpApiEndpoint.HttpApiEndpoint<"provider.list", "GET", "/api/provider", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
6
6
|
readonly location: Schema.optional<Schema.Struct<{
|
package/dist/groups/provider.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Provider } from "@opencode/schema/provider";
|
|
2
2
|
import { Location } from "@opencode/schema/location";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
5
5
|
import { ProviderNotFoundError, ServiceUnavailableError } from "../errors.js";
|
|
6
6
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
7
7
|
export const ProviderGroup = HttpApiGroup.make("server.provider")
|
package/dist/groups/pty.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context, Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
import { ForbiddenError, LocationNotFoundError, PtyNotFoundError } from "../errors.js";
|
|
4
4
|
export declare const PTY_CONNECT_TICKET_QUERY = "ticket";
|
|
5
5
|
export declare const PTY_CONNECT_TOKEN_HEADER = "x-opencode-ticket";
|
package/dist/groups/pty.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Pty } from "@opencode/schema/pty";
|
|
|
2
2
|
import { PtyTicket } from "@opencode/schema/pty-ticket";
|
|
3
3
|
import { Location } from "@opencode/schema/location";
|
|
4
4
|
import { Context, Schema } from "effect";
|
|
5
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/
|
|
5
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
6
6
|
import { ForbiddenError, LocationNotFoundError, PtyNotFoundError } from "../errors.js";
|
|
7
7
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
8
8
|
export const PTY_CONNECT_TICKET_QUERY = "ticket";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
export declare const ReferenceGroup: HttpApiGroup.HttpApiGroup<"server.reference", HttpApiEndpoint.HttpApiEndpoint<"reference.list", "GET", "/api/reference", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
4
4
|
readonly location: Schema.optional<Schema.Struct<{
|
|
5
5
|
readonly directory: Schema.optional<Schema.String>;
|
package/dist/groups/reference.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Location } from "@opencode/schema/location";
|
|
2
2
|
import { Reference } from "@opencode/schema/reference";
|
|
3
3
|
import { Schema, Struct } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
5
5
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
6
6
|
const PublicLocalSource = Schema.Struct(Struct.omit(Reference.LocalSource.fields, ["description", "hidden"])).annotate({
|
|
7
7
|
identifier: "Reference.LocalSource",
|
package/dist/groups/rpc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import { RpcError, RpcInternalError } from "../errors.js";
|
|
4
4
|
export declare const RpcInput: Schema.Struct<{
|
|
5
5
|
readonly input: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Unknown>>, Schema.optionalKey<Schema.Unknown>, never, never>;
|
package/dist/groups/rpc.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { optional } from "@opencode/schema/schema";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
4
4
|
import { RpcError, RpcInternalError } from "../errors.js";
|
|
5
5
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
6
6
|
export const RpcInput = Schema.Struct({ input: optional(Schema.Unknown) }).annotate({ identifier: "Rpc.Input" });
|
package/dist/groups/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import { UnauthorizedError } from "../errors.js";
|
|
4
4
|
export declare const ServerInfo: Schema.Struct<{
|
|
5
5
|
readonly version: Schema.String;
|
package/dist/groups/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
3
3
|
import { UnauthorizedError } from "../errors.js";
|
|
4
4
|
export const ServerInfo = Schema.Struct({
|
|
5
5
|
version: Schema.String,
|
package/dist/groups/session.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { PromptInput } from "@opencode/schema/prompt-input";
|
|
|
2
2
|
import { InstructionEntry } from "@opencode/schema/instruction-entry";
|
|
3
3
|
import { Event } from "@opencode/schema/event";
|
|
4
4
|
import { Context, Effect, Schema } from "effect";
|
|
5
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/
|
|
5
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/http-api";
|
|
6
6
|
import { ConflictError, LocationNotFoundError, CommandExecutionError, CommandNotFoundError, FormAlreadySettledError, FormInvalidAnswerError, FormNotFoundError, InvalidCursorError, InvalidRequestError, MessageNotFoundError, ServiceUnavailableError, SessionBusyError, SessionNotFoundError, SkillNotFoundError, UnknownError } from "../errors.js";
|
|
7
7
|
declare const SessionsCursorInput: Schema.Union<readonly [Schema.Struct<{
|
|
8
8
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
package/dist/groups/session.js
CHANGED
|
@@ -7,8 +7,9 @@ import { InstructionEntry } from "@opencode/schema/instruction-entry";
|
|
|
7
7
|
import { Project } from "@opencode/schema/project";
|
|
8
8
|
import { AbsolutePath, DateTimeUtcFromMillis, NonNegativeInt, PositiveInt, RelativePath, statics, } from "@opencode/schema/schema";
|
|
9
9
|
import { Event } from "@opencode/schema/event";
|
|
10
|
-
import { Context, Effect,
|
|
11
|
-
import {
|
|
10
|
+
import { Context, Effect, Result, Schema, SchemaGetter, SchemaParser, Struct } from "effect";
|
|
11
|
+
import { Base64Url } from "effect/encoding";
|
|
12
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
12
13
|
import { ConflictError, LocationNotFoundError, CommandExecutionError, CommandNotFoundError, FormAlreadySettledError, FormInvalidAnswerError, FormNotFoundError, InvalidCursorError, InvalidRequestError, MessageNotFoundError, ServiceUnavailableError, SessionBusyError, SessionNotFoundError, SkillNotFoundError, UnknownError, } from "../errors.js";
|
|
13
14
|
import { Agent } from "@opencode/schema/agent";
|
|
14
15
|
import { Skill } from "@opencode/schema/skill";
|
|
@@ -63,11 +64,12 @@ const encodeSessionsCursor = Schema.encodeSync(SessionsCursorJson);
|
|
|
63
64
|
const decodeSessionsCursor = Schema.decodeUnknownEffect(SessionsCursorJson);
|
|
64
65
|
const invalidCursor = "Invalid cursor";
|
|
65
66
|
export const SessionsCursor = Schema.String.pipe(Schema.brand("SessionsCursor"), statics((schema) => {
|
|
66
|
-
|
|
67
|
+
// Read the default constructor without caching it on the schema, so `make` can be replaced.
|
|
68
|
+
const make = SchemaParser.make(schema);
|
|
67
69
|
return {
|
|
68
|
-
make: (input) => make(
|
|
70
|
+
make: (input) => make(Base64Url.encode(encodeSessionsCursor(input))),
|
|
69
71
|
parse: (input) => Effect.suspend(() => {
|
|
70
|
-
const result =
|
|
72
|
+
const result = Base64Url.decodeString(input);
|
|
71
73
|
return Result.isFailure(result)
|
|
72
74
|
? Effect.fail(invalidCursor)
|
|
73
75
|
: decodeSessionsCursor(result.success).pipe(Effect.mapError(() => invalidCursor));
|
package/dist/groups/shell.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
import { ShellNotFoundError } from "../errors.js";
|
|
4
4
|
export declare const ShellGroup: HttpApiGroup.HttpApiGroup<"server.shell", HttpApiEndpoint.HttpApiEndpoint<"shell.list", "GET", "/api/shell", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
readonly location: Schema.optional<Schema.Struct<{
|
package/dist/groups/shell.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Shell } from "@opencode/schema/shell";
|
|
2
2
|
import { Location } from "@opencode/schema/location";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
5
5
|
import { ShellNotFoundError } from "../errors.js";
|
|
6
6
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
7
7
|
export const ShellGroup = HttpApiGroup.make("server.shell")
|
package/dist/groups/skill.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
export declare const SkillGroup: HttpApiGroup.HttpApiGroup<"server.skill", HttpApiEndpoint.HttpApiEndpoint<"skill.list", "GET", "/api/skill", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
4
4
|
readonly location: Schema.optional<Schema.Struct<{
|
|
5
5
|
readonly directory: Schema.optional<Schema.String>;
|
package/dist/groups/skill.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Skill } from "@opencode/schema/skill";
|
|
2
2
|
import { Location } from "@opencode/schema/location";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
5
5
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
6
6
|
export const SkillGroup = HttpApiGroup.make("server.skill")
|
|
7
7
|
.add(HttpApiEndpoint.get("skill.list", "/api/skill", {
|
package/dist/groups/vcs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
import { ConflictError, InvalidRequestError, ServiceUnavailableError } from "../errors.js";
|
|
4
4
|
declare const VcsInitNotSupportedError_base: Schema.Class<VcsInitNotSupportedError, Schema.TaggedStruct<"VcsInitNotSupportedError", {
|
|
5
5
|
readonly providerID: Schema.String;
|
package/dist/groups/vcs.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Location } from "@opencode/schema/location";
|
|
|
3
3
|
import { NonNegativeInt, PositiveInt, optional } from "@opencode/schema/schema";
|
|
4
4
|
import { Vcs } from "@opencode/schema/vcs";
|
|
5
5
|
import { Schema } from "effect";
|
|
6
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
6
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
7
7
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
8
8
|
import { ConflictError, InvalidRequestError, ServiceUnavailableError } from "../errors.js";
|
|
9
9
|
const InitQuery = Schema.Struct({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WebSearch } from "@opencode/schema/websearch";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
4
4
|
import { InvalidRequestError, ServiceUnavailableError } from "../errors.js";
|
|
5
5
|
export declare const WebSearchGroup: HttpApiGroup.HttpApiGroup<"server.websearch", HttpApiEndpoint.HttpApiEndpoint<"websearch.providers", "GET", "/api/websearch/provider", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
6
6
|
readonly location: Schema.optional<Schema.Struct<{
|
package/dist/groups/websearch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Location } from "@opencode/schema/location";
|
|
2
2
|
import { WebSearch } from "@opencode/schema/websearch";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
5
5
|
import { InvalidRequestError, ServiceUnavailableError } from "../errors.js";
|
|
6
6
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
7
7
|
export const WebSearchGroup = HttpApiGroup.make("server.websearch")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
3
3
|
import { ProjectNotFoundError } from "../errors.js";
|
|
4
4
|
declare const WorktreeError_base: Schema.Class<WorktreeError, Schema.TaggedStruct<"WorktreeError", {
|
|
5
5
|
readonly name: Schema.Literal<"WorktreeError">;
|
package/dist/groups/worktree.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Worktree } from "@opencode/schema/worktree";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
4
4
|
import { Project } from "@opencode/schema/project";
|
|
5
5
|
import { ProjectNotFoundError } from "../errors.js";
|
|
6
6
|
const root = "/api/worktree";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiMiddleware } from "effect/
|
|
1
|
+
import { HttpApiMiddleware } from "effect/http-api";
|
|
2
2
|
import { UnauthorizedError } from "../errors.js";
|
|
3
3
|
declare const Authorization_base: HttpApiMiddleware.ServiceClass<Authorization, "@opencode/HttpApiAuthorization", {
|
|
4
4
|
requires: never;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiMiddleware } from "effect/
|
|
1
|
+
import { HttpApiMiddleware } from "effect/http-api";
|
|
2
2
|
import { UnauthorizedError } from "../errors.js";
|
|
3
3
|
export class Authorization extends HttpApiMiddleware.Service()("@opencode/HttpApiAuthorization", {
|
|
4
4
|
error: UnauthorizedError,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiMiddleware } from "effect/
|
|
1
|
+
import { HttpApiMiddleware } from "effect/http-api";
|
|
2
2
|
import { InvalidRequestError } from "../errors.js";
|
|
3
3
|
declare const SchemaErrorMiddleware_base: HttpApiMiddleware.ServiceClass<SchemaErrorMiddleware, "@opencode/HttpApiSchemaError", {
|
|
4
4
|
requires: never;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiMiddleware } from "effect/
|
|
1
|
+
import { HttpApiMiddleware } from "effect/http-api";
|
|
2
2
|
import { InvalidRequestError } from "../errors.js";
|
|
3
3
|
export class SchemaErrorMiddleware extends HttpApiMiddleware.Service()("@opencode/HttpApiSchemaError", { error: InvalidRequestError }) {
|
|
4
4
|
}
|
package/dist/simulation.d.ts
CHANGED
package/dist/simulation.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect, Schema } from "effect";
|
|
2
|
-
import { Rpc, RpcGroup } from "effect/
|
|
2
|
+
import { Rpc, RpcGroup } from "effect/rpc";
|
|
3
3
|
const JsonRpcID = Schema.Union([Schema.String, Schema.Number, Schema.Null]);
|
|
4
4
|
const decodeJson = Schema.decodeUnknownSync(Schema.Json);
|
|
5
5
|
export var JsonRpc;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/protocol",
|
|
4
|
-
"version": "0.0.0-dev-
|
|
4
|
+
"version": "0.0.0-dev-20784",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"typecheck": "tsgo --noEmit"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@opencode/schema": "0.0.0-dev-
|
|
36
|
-
"effect": "4.0.0-rc.
|
|
35
|
+
"@opencode/schema": "0.0.0-dev-20784",
|
|
36
|
+
"effect": "4.0.0-rc.118"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@tsconfig/bun": "1.0.9",
|