@opencode/protocol 2.0.26 → 2.0.27
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 +19 -14
- 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 +2 -2
- package/dist/groups/fs.js +2 -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 +39 -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 +6 -2
- package/dist/groups/project.js +8 -3
- 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 +145 -3
- package/dist/groups/session.js +12 -10
- 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">;
|
|
@@ -4760,6 +4760,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
4760
4760
|
readonly created: Schema.Int;
|
|
4761
4761
|
readonly updated: Schema.Int;
|
|
4762
4762
|
readonly active: Schema.Int;
|
|
4763
|
+
readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
4763
4764
|
}>;
|
|
4764
4765
|
readonly sandboxes: Schema.$Array<Schema.String>;
|
|
4765
4766
|
}>;
|
|
@@ -4792,6 +4793,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
4792
4793
|
readonly created: Schema.Int;
|
|
4793
4794
|
readonly updated: Schema.Int;
|
|
4794
4795
|
readonly active: Schema.Int;
|
|
4796
|
+
readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
4795
4797
|
}>;
|
|
4796
4798
|
readonly sandboxes: Schema.$Array<Schema.String>;
|
|
4797
4799
|
}>;
|
|
@@ -6419,6 +6421,11 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6419
6421
|
readonly type: "string";
|
|
6420
6422
|
readonly key: string;
|
|
6421
6423
|
readonly required?: boolean | undefined;
|
|
6424
|
+
readonly options?: readonly {
|
|
6425
|
+
readonly value: string;
|
|
6426
|
+
readonly label: string;
|
|
6427
|
+
readonly description?: string | undefined;
|
|
6428
|
+
}[] | undefined;
|
|
6422
6429
|
readonly description?: string | undefined;
|
|
6423
6430
|
readonly format?: "email" | "uri" | "date" | "date-time" | undefined;
|
|
6424
6431
|
readonly minLength?: number | undefined;
|
|
@@ -6426,11 +6433,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6426
6433
|
readonly pattern?: string | undefined;
|
|
6427
6434
|
readonly placeholder?: string | undefined;
|
|
6428
6435
|
readonly default?: string | undefined;
|
|
6429
|
-
readonly options?: readonly {
|
|
6430
|
-
readonly value: string;
|
|
6431
|
-
readonly label: string;
|
|
6432
|
-
readonly description?: string | undefined;
|
|
6433
|
-
}[] | undefined;
|
|
6434
6436
|
readonly custom?: boolean | undefined;
|
|
6435
6437
|
readonly title?: string | undefined;
|
|
6436
6438
|
readonly hidden?: boolean | undefined;
|
|
@@ -6484,12 +6486,12 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6484
6486
|
}[] | undefined;
|
|
6485
6487
|
} | {
|
|
6486
6488
|
readonly type: "multiselect";
|
|
6487
|
-
readonly key: string;
|
|
6488
6489
|
readonly options: readonly {
|
|
6489
6490
|
readonly value: string;
|
|
6490
6491
|
readonly label: string;
|
|
6491
6492
|
readonly description?: string | undefined;
|
|
6492
6493
|
}[];
|
|
6494
|
+
readonly key: string;
|
|
6493
6495
|
readonly required?: boolean | undefined;
|
|
6494
6496
|
readonly description?: string | undefined;
|
|
6495
6497
|
readonly default?: readonly string[] | undefined;
|
|
@@ -6513,6 +6515,11 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6513
6515
|
readonly type: "string";
|
|
6514
6516
|
readonly key: string;
|
|
6515
6517
|
readonly required?: boolean | undefined;
|
|
6518
|
+
readonly options?: readonly {
|
|
6519
|
+
readonly value: string;
|
|
6520
|
+
readonly label: string;
|
|
6521
|
+
readonly description?: string | undefined;
|
|
6522
|
+
}[] | undefined;
|
|
6516
6523
|
readonly description?: string | undefined;
|
|
6517
6524
|
readonly format?: "email" | "uri" | "date" | "date-time" | undefined;
|
|
6518
6525
|
readonly minLength?: number | undefined;
|
|
@@ -6520,11 +6527,6 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6520
6527
|
readonly pattern?: string | undefined;
|
|
6521
6528
|
readonly placeholder?: string | undefined;
|
|
6522
6529
|
readonly default?: string | undefined;
|
|
6523
|
-
readonly options?: readonly {
|
|
6524
|
-
readonly value: string;
|
|
6525
|
-
readonly label: string;
|
|
6526
|
-
readonly description?: string | undefined;
|
|
6527
|
-
}[] | undefined;
|
|
6528
6530
|
readonly custom?: boolean | undefined;
|
|
6529
6531
|
readonly title?: string | undefined;
|
|
6530
6532
|
readonly hidden?: boolean | undefined;
|
|
@@ -6578,12 +6580,12 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6578
6580
|
}[] | undefined;
|
|
6579
6581
|
} | {
|
|
6580
6582
|
readonly type: "multiselect";
|
|
6581
|
-
readonly key: string;
|
|
6582
6583
|
readonly options: readonly {
|
|
6583
6584
|
readonly value: string;
|
|
6584
6585
|
readonly label: string;
|
|
6585
6586
|
readonly description?: string | undefined;
|
|
6586
6587
|
}[];
|
|
6588
|
+
readonly key: string;
|
|
6587
6589
|
readonly required?: boolean | undefined;
|
|
6588
6590
|
readonly description?: string | undefined;
|
|
6589
6591
|
readonly default?: readonly string[] | undefined;
|
|
@@ -6778,8 +6780,9 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6778
6780
|
readonly canonical: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
6779
6781
|
readonly time: {
|
|
6780
6782
|
readonly created: number;
|
|
6781
|
-
readonly updated: number;
|
|
6782
6783
|
readonly active: number;
|
|
6784
|
+
readonly updated: number;
|
|
6785
|
+
readonly archived?: number | undefined;
|
|
6783
6786
|
};
|
|
6784
6787
|
readonly sandboxes: readonly string[];
|
|
6785
6788
|
readonly name?: string | undefined;
|
|
@@ -13394,6 +13397,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
13394
13397
|
readonly created: Schema.Int;
|
|
13395
13398
|
readonly updated: Schema.Int;
|
|
13396
13399
|
readonly active: Schema.Int;
|
|
13400
|
+
readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
13397
13401
|
}>;
|
|
13398
13402
|
readonly sandboxes: Schema.$Array<Schema.String>;
|
|
13399
13403
|
}>;
|
|
@@ -13426,6 +13430,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
13426
13430
|
readonly created: Schema.Int;
|
|
13427
13431
|
readonly updated: Schema.Int;
|
|
13428
13432
|
readonly active: Schema.Int;
|
|
13433
|
+
readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
13429
13434
|
}>;
|
|
13430
13435
|
readonly sandboxes: Schema.$Array<Schema.String>;
|
|
13431
13436
|
}>;
|
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<{
|
|
@@ -18,7 +18,7 @@ export declare const FileSystemGroup: HttpApiGroup.HttpApiGroup<"server.fs", Htt
|
|
|
18
18
|
readonly path: Schema.brand<Schema.String, "RelativePath">;
|
|
19
19
|
readonly type: Schema.Literals<readonly ["file", "directory"]>;
|
|
20
20
|
}>>;
|
|
21
|
-
}>>,
|
|
21
|
+
}>>, Schema.toCodecJson<typeof FileNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"fs.find", "GET", "/api/fs/find", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
22
22
|
readonly query: Schema.String;
|
|
23
23
|
readonly type: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["file", "directory"]>>>, Schema.optionalKey<Schema.Literals<readonly ["file", "directory"]>>, never, never>;
|
|
24
24
|
readonly limit: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
|
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({
|
|
@@ -38,6 +38,7 @@ export const FileSystemGroup = HttpApiGroup.make("server.fs")
|
|
|
38
38
|
.add(HttpApiEndpoint.get("fs.list", "/api/fs/list", {
|
|
39
39
|
query: ListQuery,
|
|
40
40
|
success: Location.response(Schema.Array(FileSystem.Entry)),
|
|
41
|
+
error: FileNotFoundError,
|
|
41
42
|
})
|
|
42
43
|
.annotateMerge(locationQueryOpenApi)
|
|
43
44
|
.annotateMerge(OpenApi.annotations({
|
|
@@ -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>;
|
|
@@ -717,6 +717,25 @@ export declare const PublicSessionMessage: Schema.Union<readonly [Schema.Struct<
|
|
|
717
717
|
}>]>, Schema.Struct<{
|
|
718
718
|
readonly type: Schema.tag<"idle">;
|
|
719
719
|
readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>;
|
|
720
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
721
|
+
readonly type: Schema.String;
|
|
722
|
+
readonly message: Schema.String;
|
|
723
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
724
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
725
|
+
readonly body: Schema.String;
|
|
726
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
727
|
+
readonly body: Schema.String;
|
|
728
|
+
}>>, never, never>;
|
|
729
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
730
|
+
readonly type: Schema.String;
|
|
731
|
+
readonly message: Schema.String;
|
|
732
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
733
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
734
|
+
readonly body: Schema.String;
|
|
735
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
736
|
+
readonly body: Schema.String;
|
|
737
|
+
}>>, never, never>;
|
|
738
|
+
}>>, never, never>;
|
|
720
739
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
721
740
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
722
741
|
fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
@@ -1447,6 +1466,25 @@ export declare const MessageGroup: HttpApiGroup.HttpApiGroup<"server.message", H
|
|
|
1447
1466
|
}>]>, Schema.Struct<{
|
|
1448
1467
|
readonly type: Schema.tag<"idle">;
|
|
1449
1468
|
readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>;
|
|
1469
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
1470
|
+
readonly type: Schema.String;
|
|
1471
|
+
readonly message: Schema.String;
|
|
1472
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
1473
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
1474
|
+
readonly body: Schema.String;
|
|
1475
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
1476
|
+
readonly body: Schema.String;
|
|
1477
|
+
}>>, never, never>;
|
|
1478
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
1479
|
+
readonly type: Schema.String;
|
|
1480
|
+
readonly message: Schema.String;
|
|
1481
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
1482
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
1483
|
+
readonly body: Schema.String;
|
|
1484
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
1485
|
+
readonly body: Schema.String;
|
|
1486
|
+
}>>, never, never>;
|
|
1487
|
+
}>>, never, never>;
|
|
1450
1488
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1451
1489
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1452
1490
|
fromEvent: (eventID: import("@opencode/schema/event").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
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,7 +1,9 @@
|
|
|
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
|
-
export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", HttpApiEndpoint.HttpApiEndpoint<"project.list", "GET", "/api/project", never,
|
|
4
|
+
export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", HttpApiEndpoint.HttpApiEndpoint<"project.list", "GET", "/api/project", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
5
|
+
readonly archived: Schema.optional<Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>>;
|
|
6
|
+
}>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
|
|
5
7
|
readonly id: Schema.brand<Schema.String, "Project.ID"> & {
|
|
6
8
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
7
9
|
};
|
|
@@ -26,6 +28,7 @@ export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", H
|
|
|
26
28
|
readonly created: Schema.Int;
|
|
27
29
|
readonly updated: Schema.Int;
|
|
28
30
|
readonly active: Schema.Int;
|
|
31
|
+
readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
29
32
|
}>;
|
|
30
33
|
readonly sandboxes: Schema.$Array<Schema.String>;
|
|
31
34
|
}>>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"project.update", "PATCH", "/api/project/:projectID", Schema.toCodecStringTree<Schema.Struct<{
|
|
@@ -74,6 +77,7 @@ export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", H
|
|
|
74
77
|
readonly created: Schema.Int;
|
|
75
78
|
readonly updated: Schema.Int;
|
|
76
79
|
readonly active: Schema.Int;
|
|
80
|
+
readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
77
81
|
}>;
|
|
78
82
|
readonly sandboxes: Schema.$Array<Schema.String>;
|
|
79
83
|
}>>, Schema.toCodecJson<typeof ProjectNotFoundError>, never, never>, false>;
|
package/dist/groups/project.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { Project } from "@opencode/schema/project";
|
|
2
|
-
import { Schema, Struct } from "effect";
|
|
3
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
2
|
+
import { Schema, SchemaGetter, Struct } 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"]));
|
|
7
|
+
const BooleanFromString = Schema.Literals(["true", "false"]).pipe(Schema.decodeTo(Schema.Boolean, {
|
|
8
|
+
decode: SchemaGetter.transform((value) => value === "true"),
|
|
9
|
+
encode: SchemaGetter.transform((value) => (value ? "true" : "false")),
|
|
10
|
+
}));
|
|
7
11
|
export const ProjectGroup = HttpApiGroup.make("server.project")
|
|
8
12
|
.add(HttpApiEndpoint.get("project.list", root, {
|
|
13
|
+
query: Schema.Struct({ archived: BooleanFromString.pipe(Schema.optional) }),
|
|
9
14
|
success: Schema.Array(Project.Info),
|
|
10
15
|
}).annotateMerge(OpenApi.annotations({
|
|
11
16
|
identifier: "project.list",
|
|
12
17
|
summary: "List projects",
|
|
13
|
-
description: "List known projects.",
|
|
18
|
+
description: "List known projects. Archived projects are excluded unless archived=true.",
|
|
14
19
|
})))
|
|
15
20
|
.add(HttpApiEndpoint.patch("project.update", `${root}/:projectID`, {
|
|
16
21
|
params: { projectID: Project.ID },
|
|
@@ -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">;
|
|
@@ -96,7 +96,40 @@ export declare const SessionsQuery: Schema.Struct<{
|
|
|
96
96
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
97
97
|
}>;
|
|
98
98
|
readonly subpath: Schema.optional<Schema.brand<Schema.String, "RelativePath">>;
|
|
99
|
-
readonly cursor: Schema.optional<Schema.brand<Schema.String, "SessionsCursor"
|
|
99
|
+
readonly cursor: Schema.optional<Schema.brand<Schema.String, "SessionsCursor"> & {
|
|
100
|
+
make: (input: typeof SessionsCursorInput.Type) => string & import("effect/Brand").Brand<"SessionsCursor">;
|
|
101
|
+
parse: (input: string) => Effect.Effect<{
|
|
102
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
103
|
+
readonly anchor: {
|
|
104
|
+
readonly id: string & import("effect/Brand").Brand<"SessionID">;
|
|
105
|
+
readonly time: number;
|
|
106
|
+
readonly direction: "previous" | "next";
|
|
107
|
+
};
|
|
108
|
+
readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
|
|
109
|
+
readonly search?: string | undefined;
|
|
110
|
+
readonly order?: "asc" | "desc" | undefined;
|
|
111
|
+
} | {
|
|
112
|
+
readonly project: string & import("effect/Brand").Brand<"Project.ID">;
|
|
113
|
+
readonly anchor: {
|
|
114
|
+
readonly id: string & import("effect/Brand").Brand<"SessionID">;
|
|
115
|
+
readonly time: number;
|
|
116
|
+
readonly direction: "previous" | "next";
|
|
117
|
+
};
|
|
118
|
+
readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
|
|
119
|
+
readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
|
|
120
|
+
readonly search?: string | undefined;
|
|
121
|
+
readonly order?: "asc" | "desc" | undefined;
|
|
122
|
+
} | {
|
|
123
|
+
readonly anchor: {
|
|
124
|
+
readonly id: string & import("effect/Brand").Brand<"SessionID">;
|
|
125
|
+
readonly time: number;
|
|
126
|
+
readonly direction: "previous" | "next";
|
|
127
|
+
};
|
|
128
|
+
readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
|
|
129
|
+
readonly search?: string | undefined;
|
|
130
|
+
readonly order?: "asc" | "desc" | undefined;
|
|
131
|
+
}, "Invalid cursor", never>;
|
|
132
|
+
}>;
|
|
100
133
|
readonly limit: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
|
|
101
134
|
readonly order: Schema.optional<Schema.Union<readonly [Schema.Literal<"asc">, Schema.Literal<"desc">]>>;
|
|
102
135
|
readonly search: Schema.optional<Schema.String>;
|
|
@@ -111,7 +144,40 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
|
|
|
111
144
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
112
145
|
}>;
|
|
113
146
|
readonly subpath: Schema.optional<Schema.brand<Schema.String, "RelativePath">>;
|
|
114
|
-
readonly cursor: Schema.optional<Schema.brand<Schema.String, "SessionsCursor"
|
|
147
|
+
readonly cursor: Schema.optional<Schema.brand<Schema.String, "SessionsCursor"> & {
|
|
148
|
+
make: (input: typeof SessionsCursorInput.Type) => string & import("effect/Brand").Brand<"SessionsCursor">;
|
|
149
|
+
parse: (input: string) => Effect.Effect<{
|
|
150
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
151
|
+
readonly anchor: {
|
|
152
|
+
readonly id: string & import("effect/Brand").Brand<"SessionID">;
|
|
153
|
+
readonly time: number;
|
|
154
|
+
readonly direction: "previous" | "next";
|
|
155
|
+
};
|
|
156
|
+
readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
|
|
157
|
+
readonly search?: string | undefined;
|
|
158
|
+
readonly order?: "asc" | "desc" | undefined;
|
|
159
|
+
} | {
|
|
160
|
+
readonly project: string & import("effect/Brand").Brand<"Project.ID">;
|
|
161
|
+
readonly anchor: {
|
|
162
|
+
readonly id: string & import("effect/Brand").Brand<"SessionID">;
|
|
163
|
+
readonly time: number;
|
|
164
|
+
readonly direction: "previous" | "next";
|
|
165
|
+
};
|
|
166
|
+
readonly subpath?: (string & import("effect/Brand").Brand<"RelativePath">) | undefined;
|
|
167
|
+
readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
|
|
168
|
+
readonly search?: string | undefined;
|
|
169
|
+
readonly order?: "asc" | "desc" | undefined;
|
|
170
|
+
} | {
|
|
171
|
+
readonly anchor: {
|
|
172
|
+
readonly id: string & import("effect/Brand").Brand<"SessionID">;
|
|
173
|
+
readonly time: number;
|
|
174
|
+
readonly direction: "previous" | "next";
|
|
175
|
+
};
|
|
176
|
+
readonly parentID?: (string & import("effect/Brand").Brand<"SessionID">) | null | undefined;
|
|
177
|
+
readonly search?: string | undefined;
|
|
178
|
+
readonly order?: "asc" | "desc" | undefined;
|
|
179
|
+
}, "Invalid cursor", never>;
|
|
180
|
+
}>;
|
|
115
181
|
readonly limit: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
|
|
116
182
|
readonly order: Schema.optional<Schema.Union<readonly [Schema.Literal<"asc">, Schema.Literal<"desc">]>>;
|
|
117
183
|
readonly search: Schema.optional<Schema.String>;
|
|
@@ -1575,6 +1641,25 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
|
|
|
1575
1641
|
}>]>, Schema.Struct<{
|
|
1576
1642
|
readonly type: Schema.tag<"idle">;
|
|
1577
1643
|
readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>;
|
|
1644
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
1645
|
+
readonly type: Schema.String;
|
|
1646
|
+
readonly message: Schema.String;
|
|
1647
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
1648
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
1649
|
+
readonly body: Schema.String;
|
|
1650
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
1651
|
+
readonly body: Schema.String;
|
|
1652
|
+
}>>, never, never>;
|
|
1653
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
1654
|
+
readonly type: Schema.String;
|
|
1655
|
+
readonly message: Schema.String;
|
|
1656
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
1657
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
1658
|
+
readonly body: Schema.String;
|
|
1659
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
1660
|
+
readonly body: Schema.String;
|
|
1661
|
+
}>>, never, never>;
|
|
1662
|
+
}>>, never, never>;
|
|
1578
1663
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1579
1664
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1580
1665
|
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
@@ -2654,6 +2739,25 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
|
|
|
2654
2739
|
}>]>, Schema.Struct<{
|
|
2655
2740
|
readonly type: Schema.tag<"idle">;
|
|
2656
2741
|
readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>;
|
|
2742
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
2743
|
+
readonly type: Schema.String;
|
|
2744
|
+
readonly message: Schema.String;
|
|
2745
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
2746
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
2747
|
+
readonly body: Schema.String;
|
|
2748
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
2749
|
+
readonly body: Schema.String;
|
|
2750
|
+
}>>, never, never>;
|
|
2751
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
2752
|
+
readonly type: Schema.String;
|
|
2753
|
+
readonly message: Schema.String;
|
|
2754
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
2755
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
2756
|
+
readonly body: Schema.String;
|
|
2757
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
2758
|
+
readonly body: Schema.String;
|
|
2759
|
+
}>>, never, never>;
|
|
2760
|
+
}>>, never, never>;
|
|
2657
2761
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
2658
2762
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
2659
2763
|
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
@@ -4307,6 +4411,25 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
|
|
|
4307
4411
|
}>]>, Schema.Struct<{
|
|
4308
4412
|
readonly type: Schema.tag<"idle">;
|
|
4309
4413
|
readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>;
|
|
4414
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
4415
|
+
readonly type: Schema.String;
|
|
4416
|
+
readonly message: Schema.String;
|
|
4417
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
4418
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
4419
|
+
readonly body: Schema.String;
|
|
4420
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
4421
|
+
readonly body: Schema.String;
|
|
4422
|
+
}>>, never, never>;
|
|
4423
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
4424
|
+
readonly type: Schema.String;
|
|
4425
|
+
readonly message: Schema.String;
|
|
4426
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
4427
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
4428
|
+
readonly body: Schema.String;
|
|
4429
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
4430
|
+
readonly body: Schema.String;
|
|
4431
|
+
}>>, never, never>;
|
|
4432
|
+
}>>, never, never>;
|
|
4310
4433
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
4311
4434
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
4312
4435
|
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
@@ -10893,6 +11016,25 @@ export declare const makeSessionGroup: <I extends HttpApiMiddleware.AnyId, S, Fo
|
|
|
10893
11016
|
}>]>, Schema.Struct<{
|
|
10894
11017
|
readonly type: Schema.tag<"idle">;
|
|
10895
11018
|
readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "interrupted"]>;
|
|
11019
|
+
readonly error: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
11020
|
+
readonly type: Schema.String;
|
|
11021
|
+
readonly message: Schema.String;
|
|
11022
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
11023
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
11024
|
+
readonly body: Schema.String;
|
|
11025
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
11026
|
+
readonly body: Schema.String;
|
|
11027
|
+
}>>, never, never>;
|
|
11028
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
11029
|
+
readonly type: Schema.String;
|
|
11030
|
+
readonly message: Schema.String;
|
|
11031
|
+
readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
11032
|
+
readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
11033
|
+
readonly body: Schema.String;
|
|
11034
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
11035
|
+
readonly body: Schema.String;
|
|
11036
|
+
}>>, never, never>;
|
|
11037
|
+
}>>, never, never>;
|
|
10896
11038
|
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
10897
11039
|
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
10898
11040
|
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
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";
|
|
@@ -62,12 +63,16 @@ const SessionsCursorJson = Schema.fromJsonString(SessionsCursorInput);
|
|
|
62
63
|
const encodeSessionsCursor = Schema.encodeSync(SessionsCursorJson);
|
|
63
64
|
const decodeSessionsCursor = Schema.decodeUnknownEffect(SessionsCursorJson);
|
|
64
65
|
const invalidCursor = "Invalid cursor";
|
|
65
|
-
export const SessionsCursor = Schema.String.pipe(Schema.brand("SessionsCursor"),
|
|
66
|
-
|
|
66
|
+
export const SessionsCursor = Schema.String.pipe(Schema.brand("SessionsCursor"), Schema.annotate({
|
|
67
|
+
identifier: "SessionsCursor",
|
|
68
|
+
description: "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response.",
|
|
69
|
+
}), statics((schema) => {
|
|
70
|
+
// Read the default constructor without caching it on the schema, so `make` can be replaced.
|
|
71
|
+
const make = SchemaParser.make(schema);
|
|
67
72
|
return {
|
|
68
|
-
make: (input) => make(
|
|
73
|
+
make: (input) => make(Base64Url.encode(encodeSessionsCursor(input))),
|
|
69
74
|
parse: (input) => Effect.suspend(() => {
|
|
70
|
-
const result =
|
|
75
|
+
const result = Base64Url.decodeString(input);
|
|
71
76
|
return Result.isFailure(result)
|
|
72
77
|
? Effect.fail(invalidCursor)
|
|
73
78
|
: decodeSessionsCursor(result.success).pipe(Effect.mapError(() => invalidCursor));
|
|
@@ -109,15 +114,12 @@ const BooleanFromString = Schema.Literals(["true", "false"]).pipe(Schema.decodeT
|
|
|
109
114
|
decode: SchemaGetter.transform((value) => value === "true"),
|
|
110
115
|
encode: SchemaGetter.transform((value) => (value ? "true" : "false")),
|
|
111
116
|
}));
|
|
112
|
-
const SessionsQueryCursor = SessionsCursor.annotate({
|
|
113
|
-
description: "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response.",
|
|
114
|
-
});
|
|
115
117
|
export const SessionsQuery = Schema.Struct({
|
|
116
118
|
...SessionsQueryFields,
|
|
117
119
|
directory: AbsolutePath.pipe(Schema.optional),
|
|
118
120
|
project: Project.ID.pipe(Schema.optional),
|
|
119
121
|
subpath: RelativePath.pipe(Schema.optional),
|
|
120
|
-
cursor:
|
|
122
|
+
cursor: SessionsCursor.pipe(Schema.optional),
|
|
121
123
|
}).annotate({ identifier: "SessionsQuery" });
|
|
122
124
|
export const makeSessionGroup = (sessionLocationMiddleware, formLocationMiddleware) => HttpApiGroup.make("server.session")
|
|
123
125
|
.add(HttpApiEndpoint.get("session.list", "/api/session", {
|
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": "2.0.
|
|
4
|
+
"version": "2.0.27",
|
|
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": "2.0.
|
|
36
|
-
"effect": "4.0.
|
|
35
|
+
"@opencode/schema": "2.0.27",
|
|
36
|
+
"effect": "4.0.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@tsconfig/bun": "1.0.9",
|