@opencode-ai/schema
| 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) }; |
@@ -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. |
+1
-0
@@ -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"; |
+1
-0
@@ -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"; |
+1
-1
| { | ||
| "$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
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
3671556
0.34%155
1.31%57317
0.36%