@opencode-ai/protocol
Advanced tools
| import { Schema } from "effect"; | ||
| import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi"; | ||
| 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<{ | ||
| readonly directory: Schema.brand<Schema.String, "AbsolutePath">; | ||
| readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & { | ||
| ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">; | ||
| create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">; | ||
| }>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & { | ||
| ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">; | ||
| create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">; | ||
| }>, never, never>; | ||
| }>>>, HttpApiEndpoint.Json<never>, never, never>, false>; |
| import { Location } from "@opencode-ai/schema/location"; | ||
| import { Schema } from "effect"; | ||
| import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"; | ||
| export const DebugGroup = HttpApiGroup.make("server.debug").add(HttpApiEndpoint.get("debug.location", "/api/debug/location", { | ||
| success: Schema.Array(Location.Ref), | ||
| }).annotateMerge(OpenApi.annotations({ | ||
| identifier: "v2.debug.location", | ||
| summary: "List loaded locations", | ||
| description: "List locations currently loaded by the server.", | ||
| }))); |
+2
-1
@@ -19,2 +19,3 @@ import { Context } from "effect"; | ||
| import { HealthGroup } from "./groups/health.js"; | ||
| import { DebugGroup } from "./groups/debug.js"; | ||
| import { PtyGroup } from "./groups/pty.js"; | ||
@@ -36,3 +37,3 @@ import { ShellGroup } from "./groups/shell.js"; | ||
| 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>>; | ||
| 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; | ||
| 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; | ||
| type EventGroupFor<Definitions extends ReadonlyArray<Definition>> = ReturnType<typeof makeEventGroup<Definitions>>; | ||
@@ -39,0 +40,0 @@ 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>>; |
+2
-0
@@ -18,2 +18,3 @@ import { Context } from "effect"; | ||
| import { HealthGroup } from "./groups/health.js"; | ||
| import { DebugGroup } from "./groups/debug.js"; | ||
| import { PtyGroup } from "./groups/pty.js"; | ||
@@ -58,2 +59,3 @@ import { ShellGroup } from "./groups/shell.js"; | ||
| .add(VcsGroup.middleware(locationMiddleware)) | ||
| .add(DebugGroup) | ||
| .annotateMerge(OpenApi.annotations({ | ||
@@ -60,0 +62,0 @@ title: "opencode HttpApi", |
+1
-0
@@ -30,2 +30,3 @@ import { InvalidRequestError, SessionNotFoundError } from "./errors.js"; | ||
| readonly "server.health": "health"; | ||
| readonly "server.debug": "debug"; | ||
| readonly "server.location": "location"; | ||
@@ -32,0 +33,0 @@ readonly "server.agent": "agent"; |
+1
-0
@@ -17,2 +17,3 @@ import { InvalidRequestError, SessionNotFoundError } from "./errors.js"; | ||
| "server.health": "health", | ||
| "server.debug": "debug", | ||
| "server.location": "location", | ||
@@ -19,0 +20,0 @@ "server.agent": "agent", |
+2
-2
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/protocol", | ||
| "version": "0.0.0-next-14931", | ||
| "version": "0.0.0-next-14936", | ||
| "type": "module", | ||
@@ -29,3 +29,3 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@opencode-ai/schema": "0.0.0-next-14931", | ||
| "@opencode-ai/schema": "0.0.0-next-14936", | ||
| "effect": "4.0.0-beta.83" | ||
@@ -32,0 +32,0 @@ }, |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
1710243
0.11%63
3.28%27636
0.11%+ Added
- Removed