New:Socket for Asana Is Now Available.Learn more
Get Started

@opencode-ai/protocol

Package Overview
Dependencies
Maintainers
2
Versions
1560
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-beta-18743
to
0.0.0-beta-18866
+50
-0
dist/groups/model.d.ts

@@ -83,2 +83,27 @@ import { Model } from "@opencode-ai/schema/model";

};
readonly canonical: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Provider.ID"> & {
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
openai: string & import("effect/Brand").Brand<"Provider.ID">;
google: string & import("effect/Brand").Brand<"Provider.ID">;
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
azure: string & import("effect/Brand").Brand<"Provider.ID">;
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Provider.ID"> & {
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
openai: string & import("effect/Brand").Brand<"Provider.ID">;
google: string & import("effect/Brand").Brand<"Provider.ID">;
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
azure: string & import("effect/Brand").Brand<"Provider.ID">;
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
}>, never, never>;
readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.Family">>, never, never>;

@@ -201,2 +226,27 @@ readonly name: Schema.String;

};
readonly canonical: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Provider.ID"> & {
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
openai: string & import("effect/Brand").Brand<"Provider.ID">;
google: string & import("effect/Brand").Brand<"Provider.ID">;
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
azure: string & import("effect/Brand").Brand<"Provider.ID">;
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Provider.ID"> & {
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
openai: string & import("effect/Brand").Brand<"Provider.ID">;
google: string & import("effect/Brand").Brand<"Provider.ID">;
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
azure: string & import("effect/Brand").Brand<"Provider.ID">;
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
}>, never, never>;
readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.Family">>, never, never>;

@@ -203,0 +253,0 @@ readonly name: Schema.String;

+53
-3
import { Location } from "@opencode-ai/schema/location";
import { Schema } from "effect";
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
import { InvalidRequestError, ServiceUnavailableError } from "../errors.js";
export declare const PluginGroup: HttpApiGroup.HttpApiGroup<"server.plugin", HttpApiEndpoint.HttpApiEndpoint<"plugin.list", "GET", "/api/plugin", never, Schema.toCodecStringTree<Schema.Struct<{

@@ -17,3 +18,6 @@ readonly location: Schema.optional<Schema.Struct<{

readonly type: Schema.Literal<"package">;
readonly package: Schema.String;
readonly target: Schema.String;
readonly version: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
readonly outdated: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
readonly updating: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
}>, Schema.Struct<{

@@ -35,4 +39,50 @@ readonly type: Schema.Literal<"local">;

readonly error: Schema.String;
readonly ref: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
}>]>;
}>>;
}>>, never, never, never>, false>;
}>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"plugin.check", "POST", "/api/plugin/check", never, Schema.toCodecStringTree<Schema.Struct<{
readonly location: Schema.optional<Schema.Struct<{
readonly directory: Schema.optional<Schema.String>;
readonly workspace: Schema.optional<Schema.String>;
}>>;
}>>, Schema.toCodecJson<Schema.Struct<{
readonly target: Schema.optional<Schema.String>;
}>>, never, Schema.toCodecJson<Schema.Struct<{
readonly location: typeof Location.Info;
readonly data: Schema.$Array<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 target: Schema.String;
readonly version: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
readonly outdated: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
readonly updating: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
}>, Schema.Struct<{
readonly type: Schema.Literal<"local">;
readonly path: Schema.String;
}>, Schema.Struct<{
readonly type: Schema.Literal<"sdk">;
}>]>;
readonly features: Schema.Struct<{
readonly server: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
readonly tui: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
readonly rpc: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
}>;
readonly state: Schema.Union<readonly [Schema.Struct<{
readonly status: Schema.Literal<"active">;
}>, Schema.Struct<{
readonly status: Schema.Literal<"failed">;
readonly error: Schema.String;
readonly ref: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
}>]>;
}>>;
}>>, Schema.toCodecJson<typeof InvalidRequestError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"plugin.update", "POST", "/api/plugin/update", never, Schema.toCodecStringTree<Schema.Struct<{
readonly location: Schema.optional<Schema.Struct<{
readonly directory: Schema.optional<Schema.String>;
readonly workspace: Schema.optional<Schema.String>;
}>>;
}>>, Schema.toCodecJson<Schema.Struct<{
readonly targets: Schema.$Array<Schema.String>;
}>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, Schema.toCodecJson<typeof InvalidRequestError | typeof ServiceUnavailableError>, never, never>, false>;
import { Location } from "@opencode-ai/schema/location";
import { Plugin } from "@opencode-ai/schema/plugin";
import { Schema } from "effect";
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
import { InvalidRequestError, ServiceUnavailableError } from "../errors.js";
import { LocationQuery, locationQueryOpenApi } from "./location.js";

@@ -17,5 +18,29 @@ export const PluginGroup = HttpApiGroup.make("server.plugin")

})))
.add(HttpApiEndpoint.post("plugin.check", "/api/plugin/check", {
query: LocationQuery,
payload: Schema.Struct({ target: Schema.String.pipe(Schema.optional) }),
success: Location.response(Schema.Array(Plugin.Info)),
error: InvalidRequestError,
})
.annotateMerge(locationQueryOpenApi)
.annotateMerge(OpenApi.annotations({
identifier: "v2.plugin.check",
summary: "Check plugin updates",
description: "Check one or all package plugins for available updates.",
})))
.add(HttpApiEndpoint.post("plugin.update", "/api/plugin/update", {
query: LocationQuery,
payload: Schema.Struct({ targets: Schema.Array(Schema.String) }),
success: HttpApiSchema.NoContent,
error: [InvalidRequestError, ServiceUnavailableError],
})
.annotateMerge(locationQueryOpenApi)
.annotateMerge(OpenApi.annotations({
identifier: "v2.plugin.update",
summary: "Update plugins",
description: "Update package plugins concurrently and notify active locations to reload them. Responds once every update has finished; fails when any update fails.",
})))
.annotateMerge(OpenApi.annotations({
title: "plugin",
description: "Experimental plugin routes.",
}));

@@ -30,2 +30,27 @@ import { Provider } from "@opencode-ai/schema/provider";

};
readonly canonical: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Provider.ID"> & {
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
openai: string & import("effect/Brand").Brand<"Provider.ID">;
google: string & import("effect/Brand").Brand<"Provider.ID">;
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
azure: string & import("effect/Brand").Brand<"Provider.ID">;
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Provider.ID"> & {
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
openai: string & import("effect/Brand").Brand<"Provider.ID">;
google: string & import("effect/Brand").Brand<"Provider.ID">;
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
azure: string & import("effect/Brand").Brand<"Provider.ID">;
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
}>, never, never>;
readonly integrationID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Integration.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Integration.ID">>, never, never>;

@@ -76,2 +101,27 @@ readonly name: Schema.String;

};
readonly canonical: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Provider.ID"> & {
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
openai: string & import("effect/Brand").Brand<"Provider.ID">;
google: string & import("effect/Brand").Brand<"Provider.ID">;
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
azure: string & import("effect/Brand").Brand<"Provider.ID">;
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Provider.ID"> & {
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
openai: string & import("effect/Brand").Brand<"Provider.ID">;
google: string & import("effect/Brand").Brand<"Provider.ID">;
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
azure: string & import("effect/Brand").Brand<"Provider.ID">;
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
mistral: string & import("effect/Brand").Brand<"Provider.ID">;
gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
}>, never, never>;
readonly integrationID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Integration.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Integration.ID">>, never, never>;

@@ -78,0 +128,0 @@ readonly name: Schema.String;

+2
-2
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/protocol",
"version": "0.0.0-beta-18743",
"version": "0.0.0-beta-18866",
"type": "module",

@@ -35,3 +35,3 @@ "license": "MIT",

"dependencies": {
"@opencode-ai/schema": "0.0.0-beta-18743",
"@opencode-ai/schema": "0.0.0-beta-18866",
"effect": "4.0.0-rc.112"

@@ -38,0 +38,0 @@ },