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

@opencode-ai/schema

Package Overview
Dependencies
Maintainers
2
Versions
1635
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode-ai/schema - npm Package Compare versions

Comparing version
0.0.0-beta-18743
to
0.0.0-beta-18866
+25
-0
dist/config/provider.d.ts

@@ -119,2 +119,27 @@ export * as ConfigProvider from "./provider.js";

readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
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 name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;

@@ -121,0 +146,0 @@ readonly env: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;

+2
-0

@@ -5,2 +5,3 @@ export * as ConfigProvider from "./provider.js";

import { Capabilities, Compatibility, Family, ID, VariantID } from "../model.js";
import { Provider } from "../provider.js";
import { optional } from "../schema.js";

@@ -57,2 +58,3 @@ const JsonRecord = Schema.Record(Schema.String, Schema.Json);

export class Info extends Schema.Class("Config.Provider")({
canonical: Provider.ID.pipe(optional),
name: Schema.String.pipe(optional),

@@ -59,0 +61,0 @@ env: Schema.String.pipe(Schema.Array, optional),

@@ -168,2 +168,27 @@ export * as Model from "./model.js";

};
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>;

@@ -170,0 +195,0 @@ readonly name: Schema.String;

@@ -78,2 +78,3 @@ export * as Model from "./model.js";

providerID: Provider.ID,
canonical: Provider.ID.pipe(optional),
family: Family.pipe(optional),

@@ -80,0 +81,0 @@ name: Schema.String,

@@ -9,3 +9,6 @@ export * as Plugin from "./plugin.js";

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<{

@@ -29,2 +32,3 @@ 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>;
}>]>;

@@ -40,3 +44,6 @@ export type State = typeof State.Type;

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<{

@@ -58,2 +65,3 @@ 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>;
}>]>;

@@ -60,0 +68,0 @@ }>;

+8
-2

@@ -8,3 +8,9 @@ export * as Plugin from "./plugin.js";

Schema.Struct({ type: Schema.Literal("builtin") }),
Schema.Struct({ type: Schema.Literal("package"), package: Schema.String }),
Schema.Struct({
type: Schema.Literal("package"),
target: Schema.String,
version: Schema.String.pipe(optional),
outdated: Schema.Literal(true).pipe(optional),
updating: Schema.Literal(true).pipe(optional),
}),
Schema.Struct({ type: Schema.Literal("local"), path: Schema.String }),

@@ -20,3 +26,3 @@ Schema.Struct({ type: Schema.Literal("sdk") }),

Schema.Struct({ status: Schema.Literal("active") }),
Schema.Struct({ status: Schema.Literal("failed"), error: Schema.String }),
Schema.Struct({ status: Schema.Literal("failed"), error: Schema.String, ref: Schema.String.pipe(optional) }),
]).annotate({ identifier: "Plugin.State" });

@@ -23,0 +29,0 @@ export const Info = Schema.Struct({

@@ -54,2 +54,27 @@ export * as Provider from "./provider.js";

};
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>;

@@ -56,0 +81,0 @@ readonly name: Schema.String;

@@ -33,2 +33,3 @@ export * as Provider from "./provider.js";

id: ID,
canonical: ID.pipe(optional),
integrationID: Integration.ID.pipe(optional),

@@ -35,0 +36,0 @@ name: Schema.String,

@@ -14,1 +14,2 @@ export * as TokenUsage from "./token-usage.js";

}>;
export declare function total(tokens: Info): number;

@@ -12,1 +12,4 @@ export * as TokenUsage from "./token-usage.js";

}).annotate({ identifier: "TokenUsage.Info" });
export function total(tokens) {
return tokens.input + tokens.output + tokens.reasoning + tokens.cache.read + tokens.cache.write;
}

@@ -17,2 +17,6 @@ export * as Tool from "./tool.js";

}
export interface Namespace {
readonly name: string;
readonly description: string;
}
interface BaseOptions {

@@ -19,0 +23,0 @@ readonly namespace?: string;

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

@@ -6,0 +6,0 @@ "license": "MIT",