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

@opencode-ai/schema

Package Overview
Dependencies
Maintainers
2
Versions
484
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-next-15825
to
0.0.0-next-15830
+40
-0
dist/mcp.d.ts
export * as Mcp from "./mcp.js";
import { Schema } from "effect";
declare const TimeoutConfig_base: Schema.Class<TimeoutConfig, Schema.Struct<{
readonly startup: Schema.optional<Schema.Int>;
readonly catalog: Schema.optional<Schema.Int>;
readonly execution: Schema.optional<Schema.Int>;
}>, {}>;
export declare class TimeoutConfig extends TimeoutConfig_base {
}
declare const LocalConfig_base: Schema.Class<LocalConfig, Schema.Struct<{
readonly type: Schema.Literal<"local">;
readonly command: Schema.$Array<Schema.String>;
readonly cwd: Schema.optional<Schema.String>;
readonly environment: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
readonly disabled: Schema.optional<Schema.Boolean>;
readonly codemode: Schema.optional<Schema.Boolean>;
readonly timeout: Schema.optional<typeof TimeoutConfig>;
}>, {}>;
export declare class LocalConfig extends LocalConfig_base {
}
declare const OAuthConfig_base: Schema.Class<OAuthConfig, Schema.Struct<{
readonly client_id: Schema.optional<Schema.String>;
readonly client_secret: Schema.optional<Schema.String>;
readonly scope: Schema.optional<Schema.String>;
readonly callback_port: Schema.optional<Schema.Int>;
readonly redirect_uri: Schema.optional<Schema.String>;
}>, {}>;
export declare class OAuthConfig extends OAuthConfig_base {
}
declare const RemoteConfig_base: Schema.Class<RemoteConfig, Schema.Struct<{
readonly type: Schema.Literal<"remote">;
readonly url: Schema.String;
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
readonly oauth: Schema.optional<Schema.Union<readonly [typeof OAuthConfig, Schema.Literal<false>]>>;
readonly disabled: Schema.optional<Schema.Boolean>;
readonly codemode: Schema.optional<Schema.Boolean>;
readonly timeout: Schema.optional<typeof TimeoutConfig>;
}>, {}>;
export declare class RemoteConfig extends RemoteConfig_base {
}
export declare const ServerConfig: Schema.toTaggedUnion<"type", readonly [typeof LocalConfig, typeof RemoteConfig]>;
export type ServerConfig = typeof ServerConfig.Type;
export type Status = typeof Status.Type;

@@ -4,0 +44,0 @@ export declare const Status: Schema.toTaggedUnion<"status", readonly [Schema.Struct<{

+48
-1
export * as Mcp from "./mcp.js";
import { Schema } from "effect";
import { optional } from "./schema.js";
import { optional, PositiveInt } from "./schema.js";
import { IntegrationID } from "./integration-id.js";
export class TimeoutConfig extends Schema.Class("Mcp.TimeoutConfig")({
startup: PositiveInt.pipe(Schema.optional).annotate({
description: "Maximum time in milliseconds to establish and initialize the MCP server.",
}),
catalog: PositiveInt.pipe(Schema.optional).annotate({
description: "Maximum time in milliseconds to wait for MCP discovery requests such as tools/list and prompts/list.",
}),
execution: PositiveInt.pipe(Schema.optional).annotate({
description: "Maximum time in milliseconds to wait for MCP tool and prompt execution.",
}),
}) {
}
export class LocalConfig extends Schema.Class("Mcp.LocalConfig")({
type: Schema.Literal("local"),
command: Schema.String.pipe(Schema.Array),
cwd: Schema.String.pipe(Schema.optional).annotate({
description: "Working directory for the MCP server process. Relative paths resolve from the workspace directory.",
}),
environment: Schema.Record(Schema.String, Schema.String).pipe(Schema.optional),
disabled: Schema.Boolean.pipe(Schema.optional),
codemode: Schema.Boolean.pipe(Schema.optional).annotate({
description: "Expose this server's tools through Code Mode. Defaults to true.",
}),
timeout: TimeoutConfig.pipe(Schema.optional),
}) {
}
export class OAuthConfig extends Schema.Class("Mcp.OAuthConfig")({
client_id: Schema.String.pipe(Schema.optional),
client_secret: Schema.String.pipe(Schema.optional),
scope: Schema.String.pipe(Schema.optional),
callback_port: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 65535 })).pipe(Schema.optional),
redirect_uri: Schema.String.pipe(Schema.optional),
}) {
}
export class RemoteConfig extends Schema.Class("Mcp.RemoteConfig")({
type: Schema.Literal("remote"),
url: Schema.String,
headers: Schema.Record(Schema.String, Schema.String).pipe(Schema.optional),
oauth: Schema.Union([OAuthConfig, Schema.Literal(false)]).pipe(Schema.optional),
disabled: Schema.Boolean.pipe(Schema.optional),
codemode: Schema.Boolean.pipe(Schema.optional).annotate({
description: "Expose this server's tools through Code Mode. Defaults to true.",
}),
timeout: TimeoutConfig.pipe(Schema.optional),
}) {
}
export const ServerConfig = Schema.Union([LocalConfig, RemoteConfig]).pipe(Schema.toTaggedUnion("type"));
const Connected = Schema.Struct({ status: Schema.Literal("connected") }).annotate({

@@ -6,0 +53,0 @@ identifier: "Mcp.Status.Connected",

+1
-1
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/schema",
"version": "0.0.0-next-15825",
"version": "0.0.0-next-15830",
"type": "module",

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