@opencode-ai/protocol
Advanced tools
+14
-1
| import { Location } from "@opencode-ai/schema/location"; | ||
| import { Schema } from "effect"; | ||
| import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi"; | ||
| export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEndpoint.HttpApiEndpoint<"vcs.status", "GET", "/api/vcs/status", never, Schema.toCodecStringTree<Schema.Struct<{ | ||
| export declare const VcsGroup: HttpApiGroup.HttpApiGroup<"server.vcs", HttpApiEndpoint.HttpApiEndpoint<"vcs.get", "GET", "/api/vcs", never, Schema.toCodecStringTree<Schema.Struct<{ | ||
| readonly location: Schema.optional<Schema.Struct<{ | ||
@@ -11,2 +11,15 @@ readonly directory: Schema.optional<Schema.String>; | ||
| readonly location: typeof Location.Info; | ||
| readonly data: Schema.Struct<{ | ||
| readonly branch: Schema.Struct<{ | ||
| readonly current: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly default: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| }>; | ||
| }>; | ||
| }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"vcs.status", "GET", "/api/vcs/status", never, Schema.toCodecStringTree<Schema.Struct<{ | ||
| readonly location: Schema.optional<Schema.Struct<{ | ||
| readonly directory: Schema.optional<Schema.String>; | ||
| readonly workspace: Schema.optional<Schema.String>; | ||
| }>>; | ||
| }>>, never, never, Schema.toCodecJson<Schema.Struct<{ | ||
| readonly location: typeof Location.Info; | ||
| readonly data: Schema.$Array<Schema.Struct<{ | ||
@@ -13,0 +26,0 @@ readonly file: Schema.String; |
+10
-0
@@ -14,2 +14,12 @@ import { FileDiff } from "@opencode-ai/schema/file-diff"; | ||
| export const VcsGroup = HttpApiGroup.make("server.vcs") | ||
| .add(HttpApiEndpoint.get("vcs.get", "/api/vcs", { | ||
| query: LocationQuery, | ||
| success: Location.response(Vcs.Info), | ||
| }) | ||
| .annotateMerge(locationQueryOpenApi) | ||
| .annotateMerge(OpenApi.annotations({ | ||
| identifier: "v2.vcs.get", | ||
| summary: "VCS info", | ||
| description: "Get current and default branch information for the requested location.", | ||
| }))) | ||
| .add(HttpApiEndpoint.get("vcs.status", "/api/vcs/status", { | ||
@@ -16,0 +26,0 @@ query: LocationQuery, |
+2
-2
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/protocol", | ||
| "version": "0.0.0-next-16741", | ||
| "version": "0.0.0-next-16745", | ||
| "type": "module", | ||
@@ -31,3 +31,3 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@opencode-ai/schema": "0.0.0-next-16741", | ||
| "@opencode-ai/schema": "0.0.0-next-16745", | ||
| "effect": "4.0.0-beta.101" | ||
@@ -34,0 +34,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.
1863988
0.06%30177
0.08%+ Added
- Removed