@opencode-ai/protocol
Advanced tools
@@ -10,10 +10,2 @@ import { Schema } from "effect"; | ||
| type Health = typeof Health.Type; | ||
| const StopRequest: Schema.Struct<{ | ||
| readonly instanceID: Schema.String; | ||
| }>; | ||
| type StopRequest = typeof StopRequest.Type; | ||
| const StopResponse: Schema.Struct<{ | ||
| readonly accepted: Schema.Boolean; | ||
| }>; | ||
| type StopResponse = typeof StopResponse.Type; | ||
| } | ||
@@ -24,6 +16,2 @@ export declare const HealthGroup: HttpApiGroup.HttpApiGroup<"server.health", HttpApiEndpoint.HttpApiEndpoint<"health.get", "GET", "/api/health", never, never, never, never, Schema.toCodecJson<Schema.Struct<{ | ||
| readonly pid: Schema.Int; | ||
| }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"health.stop", "POST", "/api/service/stop", never, never, Schema.toCodecJson<Schema.Struct<{ | ||
| readonly instanceID: Schema.String; | ||
| }>>, never, Schema.toCodecJson<Schema.Struct<{ | ||
| readonly accepted: Schema.Boolean; | ||
| }>>, never, never, never>, false>; |
@@ -11,8 +11,2 @@ import { Schema } from "effect"; | ||
| }).annotate({ identifier: "ServiceHealth" }); | ||
| ServiceStatus.StopRequest = Schema.Struct({ | ||
| instanceID: Schema.String, | ||
| }).annotate({ identifier: "ServiceStopRequest" }); | ||
| ServiceStatus.StopResponse = Schema.Struct({ | ||
| accepted: Schema.Boolean, | ||
| }).annotate({ identifier: "ServiceStopResponse" }); | ||
| })(ServiceStatus || (ServiceStatus = {})); | ||
@@ -27,10 +21,2 @@ export const HealthGroup = HttpApiGroup.make("server.health") | ||
| }))) | ||
| .add(HttpApiEndpoint.post("health.stop", "/api/service/stop", { | ||
| payload: ServiceStatus.StopRequest, | ||
| success: ServiceStatus.StopResponse, | ||
| }).annotateMerge(OpenApi.annotations({ | ||
| identifier: "v2.health.stop", | ||
| summary: "Stop the managed server", | ||
| description: "Request graceful shutdown of one exact managed server instance.", | ||
| }))) | ||
| .annotateMerge(OpenApi.annotations({ title: "health" })); |
@@ -485,2 +485,4 @@ import { Schema } from "effect"; | ||
| readonly finish: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>>>, Schema.optionalKey<Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>>, never, never>; | ||
| readonly rawFinish: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly providerState: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>; | ||
| readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & { | ||
@@ -487,0 +489,0 @@ zero: number & import("effect/Brand").Brand<"Money.USD">; |
@@ -11,5 +11,34 @@ import { Location } from "@opencode-ai/schema/location"; | ||
| readonly location: typeof Location.Info; | ||
| readonly data: Schema.$Array<Schema.Struct<{ | ||
| readonly data: Schema.$Array<Schema.Union<readonly [Schema.Struct<{ | ||
| readonly id: Schema.brand<Schema.String, "Plugin.ID">; | ||
| }>>; | ||
| readonly source: Schema.Union<readonly [Schema.Struct<{ | ||
| readonly type: Schema.Literal<"builtin">; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"package">; | ||
| readonly package: Schema.String; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"local">; | ||
| readonly path: Schema.String; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"sdk">; | ||
| }>]>; | ||
| readonly status: Schema.Literal<"active">; | ||
| readonly tui: Schema.Boolean; | ||
| }>, Schema.Struct<{ | ||
| readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Plugin.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Plugin.ID">>, never, never>; | ||
| readonly source: Schema.Union<readonly [Schema.Struct<{ | ||
| readonly type: Schema.Literal<"builtin">; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"package">; | ||
| readonly package: Schema.String; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"local">; | ||
| readonly path: Schema.String; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"sdk">; | ||
| }>]>; | ||
| readonly status: Schema.Literal<"failed">; | ||
| readonly error: Schema.String; | ||
| readonly tui: Schema.Boolean; | ||
| }>]>>; | ||
| }>>, never, never, never>, false>; |
@@ -15,3 +15,3 @@ import { Location } from "@opencode-ai/schema/location"; | ||
| summary: "List plugins", | ||
| description: "Retrieve currently loaded plugins.", | ||
| description: "Retrieve enabled server plugins and their current status.", | ||
| }))) | ||
@@ -18,0 +18,0 @@ .annotateMerge(OpenApi.annotations({ |
+2
-2
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/protocol", | ||
| "version": "0.0.0-beta-17595", | ||
| "version": "0.0.0-beta-17639", | ||
| "type": "module", | ||
@@ -35,3 +35,3 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@opencode-ai/schema": "0.0.0-beta-17595", | ||
| "@opencode-ai/schema": "0.0.0-beta-17639", | ||
| "effect": "4.0.0-beta.107" | ||
@@ -38,0 +38,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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.
1899012
0.43%30681
0.2%+ Added
- Removed