@opencode-ai/protocol 0.0.0-next-14931 → 0.0.0-next-14937

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
@@ -16,6 +16,7 @@ import type { Definition } from "@opencode-ai/schema/event";
16
16
  import { AgentGroup } from "./groups/agent.js";
17
17
  import { PluginGroup } from "./groups/plugin.js";
18
18
  import { HealthGroup } from "./groups/health.js";
19
+ import { DebugGroup } from "./groups/debug.js";
19
20
  import { PtyGroup } from "./groups/pty.js";
20
21
  import { ShellGroup } from "./groups/shell.js";
21
22
  import { makeQuestionGroup } from "./groups/question.js";
@@ -32,7 +33,7 @@ type LocationGroups<LocationId extends HttpApiMiddleware.AnyId> = HttpApiGroup.A
32
33
  type SessionGroups<SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService> = ReturnType<typeof makeSessionGroup<SessionLocationId, SessionLocationService>> | HttpApiGroup.AddMiddleware<typeof MessageGroup, SessionLocationId>;
33
34
  type FormGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService> = ReturnType<typeof makeFormGroup<LocationId, LocationService, FormLocationId, FormLocationService>>;
34
35
  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>>;
35
- type ApiGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService, Event extends HttpApiGroup.Any> = typeof HealthGroup | LocationGroups<LocationId> | FormGroups<LocationId, LocationService, FormLocationId, FormLocationService> | SessionGroups<SessionLocationId, SessionLocationService> | MixedMiddlewareGroups<LocationId, LocationService, SessionLocationId, SessionLocationService> | Event;
36
+ type ApiGroups<LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService, Event extends HttpApiGroup.Any> = typeof HealthGroup | typeof DebugGroup | LocationGroups<LocationId> | FormGroups<LocationId, LocationService, FormLocationId, FormLocationService> | SessionGroups<SessionLocationId, SessionLocationService> | MixedMiddlewareGroups<LocationId, LocationService, SessionLocationId, SessionLocationService> | Event;
36
37
  type EventGroupFor<Definitions extends ReadonlyArray<Definition>> = ReturnType<typeof makeEventGroup<Definitions>>;
37
38
  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>>;
38
39
  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: {
package/dist/api.js CHANGED
@@ -15,6 +15,7 @@ import { EventGroup, makeEventGroup } from "./groups/event.js";
15
15
  import { AgentGroup } from "./groups/agent.js";
16
16
  import { PluginGroup } from "./groups/plugin.js";
17
17
  import { HealthGroup } from "./groups/health.js";
18
+ import { DebugGroup } from "./groups/debug.js";
18
19
  import { PtyGroup } from "./groups/pty.js";
19
20
  import { ShellGroup } from "./groups/shell.js";
20
21
  import { makeQuestionGroup } from "./groups/question.js";
@@ -54,6 +55,7 @@ const makeApiFromGroup = (eventGroup, locationMiddleware, formLocationMiddleware
54
55
  .add(ReferenceGroup.middleware(locationMiddleware))
55
56
  .add(ProjectCopyGroup.middleware(locationMiddleware))
56
57
  .add(VcsGroup.middleware(locationMiddleware))
58
+ .add(DebugGroup)
57
59
  .annotateMerge(OpenApi.annotations({
58
60
  title: "opencode HttpApi",
59
61
  version: "0.0.1",
package/dist/client.d.ts CHANGED
@@ -27,6 +27,7 @@ type ClientApiShape = Api<Context.Service.Identifier<typeof LocationMiddleware>,
27
27
  export declare const ClientApi: ClientApiShape;
28
28
  export declare const groupNames: {
29
29
  readonly "server.health": "health";
30
+ readonly "server.debug": "debug";
30
31
  readonly "server.location": "location";
31
32
  readonly "server.agent": "agent";
32
33
  readonly "server.plugin": "plugin";
package/dist/client.js CHANGED
@@ -14,6 +14,7 @@ export const ClientApi = makeDefaultApi({
14
14
  });
15
15
  export const groupNames = {
16
16
  "server.health": "health",
17
+ "server.debug": "debug",
17
18
  "server.location": "location",
18
19
  "server.agent": "agent",
19
20
  "server.plugin": "plugin",
@@ -0,0 +1,12 @@
1
+ import { Schema } from "effect";
2
+ import { HttpApiEndpoint, HttpApiGroup } 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<{
4
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
6
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
7
+ create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
8
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
9
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
10
+ create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
11
+ }>, never, never>;
12
+ }>>>, HttpApiEndpoint.Json<never>, never, never>, false>;
@@ -0,0 +1,10 @@
1
+ import { Location } from "@opencode-ai/schema/location";
2
+ import { Schema } from "effect";
3
+ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
4
+ export const DebugGroup = HttpApiGroup.make("server.debug").add(HttpApiEndpoint.get("debug.location", "/api/debug/location", {
5
+ success: Schema.Array(Location.Ref),
6
+ }).annotateMerge(OpenApi.annotations({
7
+ identifier: "v2.debug.location",
8
+ summary: "List loaded locations",
9
+ description: "List locations currently loaded by the server.",
10
+ })));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/protocol",
4
- "version": "0.0.0-next-14931",
4
+ "version": "0.0.0-next-14937",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -26,7 +26,7 @@
26
26
  "typecheck": "tsgo --noEmit"
27
27
  },
28
28
  "dependencies": {
29
- "@opencode-ai/schema": "0.0.0-next-14931",
29
+ "@opencode-ai/schema": "0.0.0-next-14937",
30
30
  "effect": "4.0.0-beta.83"
31
31
  },
32
32
  "devDependencies": {