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

@opencode-ai/schema

Package Overview
Maintainers
2
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode-ai/schema - npm Package Compare versions

Source code not available
We could not scan this package. Some page functionalities have been disabled
Comparing version
0.0.0-next-16229
to
0.0.0-next-16230
+108
dist/websearch.d.ts
export * as WebSearch from "./websearch.js";
import { Schema } from "effect";
export declare const ID: Schema.brand<Schema.String, "WebSearch.ID">;
export type ID = typeof ID.Type;
export interface Provider extends Schema.Schema.Type<typeof Provider> {
}
export declare const Provider: Schema.Struct<{
readonly id: Schema.brand<Schema.String, "WebSearch.ID">;
readonly name: Schema.String;
}>;
export interface Input extends Schema.Schema.Type<typeof Input> {
}
export declare const Input: Schema.Struct<{
readonly query: Schema.String;
readonly providerID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WebSearch.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "WebSearch.ID">>, never, never>;
}>;
export type ProviderInput = Pick<Input, "query">;
export interface Result extends Schema.Schema.Type<typeof Result> {
}
export declare const Result: Schema.Struct<{
readonly url: Schema.String;
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
readonly content: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
readonly time: Schema.Struct<{
readonly published: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
}>;
}>;
declare const Response_base: Schema.Class<Response, Schema.Struct<{
readonly providerID: Schema.brand<Schema.String, "WebSearch.ID">;
readonly results: Schema.$Array<Schema.Struct<{
readonly url: Schema.String;
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
readonly content: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
readonly time: Schema.Struct<{
readonly published: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
}>;
}>>;
}>, {}>;
export declare class Response extends Response_base {
}
export declare const Event: {
Updated: Schema.Struct<{
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
create: () => string & import("effect/Brand").Brand<"Event.ID">;
};
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
readonly type: Schema.Literal<"websearch.updated">;
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
}>, never, never>;
}>>>, Schema.optionalKey<Schema.Struct<{
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
}>, never, never>;
}>>, never, never>;
readonly data: Schema.Struct<{}>;
}> & {
type: "websearch.updated";
durability: "ephemeral";
durable: undefined;
data: Schema.Struct<{}>;
};
Definitions: readonly [Schema.Struct<{
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
create: () => string & import("effect/Brand").Brand<"Event.ID">;
};
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
readonly type: Schema.Literal<"websearch.updated">;
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
}>, never, never>;
}>>>, Schema.optionalKey<Schema.Struct<{
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "WorkspaceV2.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
create: () => string & import("effect/Brand").Brand<"WorkspaceV2.ID">;
}>, never, never>;
}>>, never, never>;
readonly data: Schema.Struct<{}>;
}> & {
type: "websearch.updated";
durability: "ephemeral";
durable: undefined;
data: Schema.Struct<{}>;
}];
};
export * as WebSearch from "./websearch.js";
import { Schema } from "effect";
import { ephemeral, inventory } from "./event.js";
import { optional } from "./schema.js";
export const ID = Schema.String.pipe(Schema.brand("WebSearch.ID"));
export const Provider = Schema.Struct({
id: ID,
name: Schema.String,
}).annotate({ identifier: "WebSearch.Provider" });
export const Input = Schema.Struct({
query: Schema.String,
providerID: ID.pipe(optional),
}).annotate({ identifier: "WebSearch.Input" });
export const Result = Schema.Struct({
url: Schema.String,
title: Schema.String.pipe(optional),
content: Schema.String.pipe(optional),
time: Schema.Struct({
published: Schema.Finite.pipe(optional),
}),
}).annotate({ identifier: "WebSearch.Result" });
export class Response extends Schema.Class("WebSearch.Response")({
providerID: ID,
results: Schema.Array(Result),
}) {
}
const Updated = ephemeral({
type: "websearch.updated",
schema: {},
});
export const Event = { Updated, Definitions: inventory(Updated) };
+2
-1

@@ -38,2 +38,3 @@ export * as EventManifest from "./event-manifest.js";

import { WorktreeEvent } from "./worktree-event.js";
import { WebSearch } from "./websearch.js";
const sessionV1DurableDefinitions = SessionV1.Event.Definitions.filter((definition) => definition.durability === "durable");

@@ -43,3 +44,3 @@ const sessionV1LiveDefinitions = SessionV1.Event.Definitions.filter((definition) => definition.durability === "ephemeral");

const foundationDefinitions = Event.inventory(...ModelsDev.Event.Definitions, ...Integration.Event.Definitions, ...Catalog.Event.Definitions, ...Agent.Event.Definitions, ...coreDefinitions);
const featureDefinitions = Event.inventory(...FileSystem.Event.Definitions, ...Reference.Event.Definitions, ...Permission.Event.Definitions, ...Plugin.Event.Definitions, ...ProjectDirectories.Event.Definitions, ...Command.Event.Definitions, ...Config.Event.Definitions, ...Skill.Event.Definitions, ...Pty.Event.Definitions, ...Shell.Event.Definitions, ...Question.Event.Definitions, ...Form.Event.Definitions);
const featureDefinitions = Event.inventory(...FileSystem.Event.Definitions, ...Reference.Event.Definitions, ...Permission.Event.Definitions, ...Plugin.Event.Definitions, ...ProjectDirectories.Event.Definitions, ...Command.Event.Definitions, ...Config.Event.Definitions, ...Skill.Event.Definitions, ...Pty.Event.Definitions, ...Shell.Event.Definitions, ...Question.Event.Definitions, ...Form.Event.Definitions, ...WebSearch.Event.Definitions);
export const ServerDefinitions = Event.inventory(...foundationDefinitions, ...featureDefinitions,

@@ -46,0 +47,0 @@ // Current events the TUI consumes from the public stream.

@@ -21,2 +21,3 @@ export { Agent } from "./agent.js";

export { Reference } from "./reference.js";
export { WebSearch } from "./websearch.js";
export { Session } from "./session.js";

@@ -23,0 +24,0 @@ export { Vcs } from "./vcs.js";

@@ -21,2 +21,3 @@ export { Agent } from "./agent.js";

export { Reference } from "./reference.js";
export { WebSearch } from "./websearch.js";
export { Session } from "./session.js";

@@ -23,0 +24,0 @@ export { Vcs } from "./vcs.js";

{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/schema",
"version": "0.0.0-next-16229",
"version": "0.0.0-next-16230",
"type": "module",

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

Sorry, the diff of this file is too big to display