@opencode-ai/protocol
Advanced tools
| import { Schema } from "effect"; | ||
| import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi"; | ||
| export declare const ServerGroup: HttpApiGroup.HttpApiGroup<"server.server", HttpApiEndpoint.HttpApiEndpoint<"server.get", "GET", "/api/server", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{ | ||
| readonly urls: Schema.$Array<Schema.String>; | ||
| }>>, HttpApiEndpoint.Json<never>, never, never>, false>; |
| import { Schema } from "effect"; | ||
| import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"; | ||
| export const ServerGroup = HttpApiGroup.make("server.server") | ||
| .add(HttpApiEndpoint.get("server.get", "/api/server", { | ||
| success: Schema.Struct({ urls: Schema.Array(Schema.String) }), | ||
| }).annotateMerge(OpenApi.annotations({ | ||
| identifier: "v2.server.get", | ||
| summary: "Get server information", | ||
| description: "Return the URLs that can be used to connect to this server.", | ||
| }))) | ||
| .annotateMerge(OpenApi.annotations({ title: "server" })); |
+2
-1
@@ -19,2 +19,3 @@ import { Context } from "effect"; | ||
| import { HealthGroup } from "./groups/health.js"; | ||
| import { ServerGroup } from "./groups/server.js"; | ||
| import { DebugGroup } from "./groups/debug.js"; | ||
@@ -37,3 +38,3 @@ import { PtyGroup } from "./groups/pty.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 | typeof DebugGroup | 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 ServerGroup | 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>>; | ||
@@ -40,0 +41,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 { ServerGroup } from "./groups/server.js"; | ||
| import { DebugGroup } from "./groups/debug.js"; | ||
@@ -35,2 +36,3 @@ import { PtyGroup } from "./groups/pty.js"; | ||
| .add(HealthGroup) | ||
| .add(ServerGroup) | ||
| .add(LocationGroup.middleware(locationMiddleware)) | ||
@@ -37,0 +39,0 @@ .add(AgentGroup.middleware(locationMiddleware)) |
+1
-0
@@ -30,2 +30,3 @@ import { InvalidRequestError, SessionNotFoundError } from "./errors.js"; | ||
| readonly "server.health": "health"; | ||
| readonly "server.server": "server"; | ||
| readonly "server.debug": "debug"; | ||
@@ -32,0 +33,0 @@ readonly "server.location": "location"; |
+1
-0
@@ -17,2 +17,3 @@ import { InvalidRequestError, SessionNotFoundError } from "./errors.js"; | ||
| "server.health": "health", | ||
| "server.server": "server", | ||
| "server.debug": "debug", | ||
@@ -19,0 +20,0 @@ "server.location": "location", |
+2
-2
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/protocol", | ||
| "version": "0.0.0-next-15155", | ||
| "version": "0.0.0-next-15159", | ||
| "type": "module", | ||
@@ -29,3 +29,3 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@opencode-ai/schema": "0.0.0-next-15155", | ||
| "@opencode-ai/schema": "0.0.0-next-15159", | ||
| "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.
1838377
0.07%65
3.17%29860
0.07%+ Added
- Removed