@opencode-ai/protocol 0.0.0-next-15718 → 0.0.0-next-15747

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 CHANGED
@@ -34,9 +34,9 @@ type LocationGroups<LocationId extends HttpApiMiddleware.AnyId> = HttpApiGroup.A
34
34
  type SessionGroups<SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService> = ReturnType<typeof makeSessionGroup<SessionLocationId, SessionLocationService>> | HttpApiGroup.AddMiddleware<typeof MessageGroup, SessionLocationId>;
35
35
  type FormGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService> = ReturnType<typeof makeFormGroup<LocationId, LocationService, FormLocationId, FormLocationService>>;
36
36
  type MixedMiddlewareGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService> = ReturnType<typeof makePermissionGroup<LocationId, LocationService, SessionLocationId, SessionLocationService>> | ReturnType<typeof makeQuestionGroup<LocationId, LocationService, SessionLocationId, SessionLocationService>>;
37
- type ApiGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService, Event extends HttpApiGroup.Any> = typeof HealthGroup | typeof ServerGroup | typeof DebugGroup | LocationGroups<LocationId> | FormGroups<LocationId, LocationService, FormLocationId, FormLocationService> | SessionGroups<SessionLocationId, SessionLocationService> | MixedMiddlewareGroups<LocationId, LocationService, SessionLocationId, SessionLocationService> | Event;
37
+ type ApiGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService, Event extends HttpApiGroup.Constraint> = typeof HealthGroup | typeof ServerGroup | typeof DebugGroup | LocationGroups<LocationId> | FormGroups<LocationId, LocationService, FormLocationId, FormLocationService> | SessionGroups<SessionLocationId, SessionLocationService> | MixedMiddlewareGroups<LocationId, LocationService, SessionLocationId, SessionLocationService> | Event;
38
38
  type EventGroupFor<Definitions extends ReadonlyArray<Definition>> = ReturnType<typeof makeEventGroup<Definitions>>;
39
- export type Api<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService, Event extends HttpApiGroup.Any> = HttpApi.HttpApi<"server", HttpApiGroup.AddMiddleware<HttpApiGroup.AddMiddleware<ApiGroups<LocationId, LocationService, FormLocationId, FormLocationService, SessionLocationId, SessionLocationService, Event>, Authorization>, SchemaErrorMiddleware>>;
39
+ export type Api<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService, Event extends HttpApiGroup.Constraint> = HttpApi.HttpApi<"server", HttpApiGroup.AddMiddleware<HttpApiGroup.AddMiddleware<ApiGroups<LocationId, LocationService, FormLocationId, FormLocationService, SessionLocationId, SessionLocationService, Event>, Authorization>, SchemaErrorMiddleware>>;
40
40
  export declare const makeApi: <const Definitions extends ReadonlyArray<Definition>, LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService>(options: {
41
41
  readonly definitions: Definitions;
42
42
  readonly locationMiddleware: Context.Key<LocationId, LocationService>;
@@ -2,12 +2,12 @@ import { Agent } from "@opencode-ai/schema/agent";
2
2
  import { Location } from "@opencode-ai/schema/location";
3
3
  import { Schema } from "effect";
4
4
  import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
5
- export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpApiEndpoint.HttpApiEndpoint<"agent.list", "GET", "/api/agent", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
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<{
7
7
  readonly directory: Schema.optional<Schema.String>;
8
8
  readonly workspace: Schema.optional<Schema.String>;
9
9
  }>>;
10
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
10
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
11
11
  readonly location: typeof Location.Info;
12
12
  readonly data: Schema.$Array<Schema.Struct<{
13
13
  readonly id: Schema.brand<Schema.String, "Agent.ID">;
@@ -95,4 +95,4 @@ export declare const AgentGroup: HttpApiGroup.HttpApiGroup<"server.agent", HttpA
95
95
  })[];
96
96
  };
97
97
  }>;
98
- }>>, HttpApiEndpoint.Json<never>, never, never>, false>;
98
+ }>>, never, never, never>, false>;
@@ -1,12 +1,12 @@
1
1
  import { Location } from "@opencode-ai/schema/location";
2
2
  import { Schema } from "effect";
3
3
  import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
4
- export declare const CommandGroup: HttpApiGroup.HttpApiGroup<"server.command", HttpApiEndpoint.HttpApiEndpoint<"command.list", "GET", "/api/command", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
4
+ export declare const CommandGroup: HttpApiGroup.HttpApiGroup<"server.command", HttpApiEndpoint.HttpApiEndpoint<"command.list", "GET", "/api/command", never, Schema.toCodecStringTree<Schema.Struct<{
5
5
  readonly location: Schema.optional<Schema.Struct<{
6
6
  readonly directory: Schema.optional<Schema.String>;
7
7
  readonly workspace: Schema.optional<Schema.String>;
8
8
  }>>;
9
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
9
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
10
10
  readonly location: typeof Location.Info;
11
11
  readonly data: Schema.$Array<Schema.Struct<{
12
12
  readonly name: Schema.String;
@@ -60,4 +60,4 @@ export declare const CommandGroup: HttpApiGroup.HttpApiGroup<"server.command", H
60
60
  }>, never, never>;
61
61
  readonly subtask: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
62
62
  }>>;
63
- }>>, HttpApiEndpoint.Json<never>, never, never>, false>;
63
+ }>>, never, never, never>, false>;
@@ -1,23 +1,23 @@
1
1
  import { Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
3
- export declare const CredentialGroup: HttpApiGroup.HttpApiGroup<"server.credential", HttpApiEndpoint.HttpApiEndpoint<"credential.update", "PATCH", "/api/credential/:credentialID", HttpApiEndpoint.StringTree<Schema.Struct<{
3
+ export declare const CredentialGroup: HttpApiGroup.HttpApiGroup<"server.credential", HttpApiEndpoint.HttpApiEndpoint<"credential.update", "PATCH", "/api/credential/:credentialID", Schema.toCodecStringTree<Schema.Struct<{
4
4
  credentialID: Schema.brand<Schema.String, "Credential.ID"> & {
5
5
  create: () => string & import("effect/Brand").Brand<"Credential.ID">;
6
6
  };
7
- }>>, HttpApiEndpoint.StringTree<Schema.Struct<{
7
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
8
8
  readonly location: Schema.optional<Schema.Struct<{
9
9
  readonly directory: Schema.optional<Schema.String>;
10
10
  readonly workspace: Schema.optional<Schema.String>;
11
11
  }>>;
12
- }>>, HttpApiEndpoint.Json<Schema.Struct<{
12
+ }>>, Schema.toCodecJson<Schema.Struct<{
13
13
  readonly label: Schema.String;
14
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<HttpApiSchema.NoContent>, HttpApiEndpoint.Json<never>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.remove", "DELETE", "/api/credential/:credentialID", HttpApiEndpoint.StringTree<Schema.Struct<{
14
+ }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.remove", "DELETE", "/api/credential/:credentialID", Schema.toCodecStringTree<Schema.Struct<{
15
15
  credentialID: Schema.brand<Schema.String, "Credential.ID"> & {
16
16
  create: () => string & import("effect/Brand").Brand<"Credential.ID">;
17
17
  };
18
- }>>, HttpApiEndpoint.StringTree<Schema.Struct<{
18
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
19
19
  readonly location: Schema.optional<Schema.Struct<{
20
20
  readonly directory: Schema.optional<Schema.String>;
21
21
  readonly workspace: Schema.optional<Schema.String>;
22
22
  }>>;
23
- }>>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<HttpApiSchema.NoContent>, HttpApiEndpoint.Json<never>, never, never>, false>;
23
+ }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never>, false>;
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
3
- export declare const DebugGroup: HttpApiGroup.HttpApiGroup<"server.debug", HttpApiEndpoint.HttpApiEndpoint<"debug.location", "GET", "/api/debug/location", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.$Array<Schema.Struct<{
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
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
6
6
  ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
@@ -9,9 +9,9 @@ export declare const DebugGroup: HttpApiGroup.HttpApiGroup<"server.debug", HttpA
9
9
  ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
10
10
  create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
11
11
  }>, never, never>;
12
- }>>>, HttpApiEndpoint.Json<never>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"debug.location.evict", "DELETE", "/api/debug/location", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
12
+ }>>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"debug.location.evict", "DELETE", "/api/debug/location", never, Schema.toCodecStringTree<Schema.Struct<{
13
13
  readonly location: Schema.optional<Schema.Struct<{
14
14
  readonly directory: Schema.optional<Schema.String>;
15
15
  readonly workspace: Schema.optional<Schema.String>;
16
16
  }>>;
17
- }>>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<HttpApiSchema.NoContent>, HttpApiEndpoint.Json<never>, never, never>, false>;
17
+ }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never>, false>;