🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@opencode-ai/protocol

Package Overview
Dependencies
Maintainers
2
Versions
807
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode-ai/protocol - npm Package Compare versions

Comparing version
0.0.0-next-16741
to
0.0.0-next-16745
+14
-1
dist/groups/vcs.d.ts
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;

@@ -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 @@ },