@opencode-ai/schema
Advanced tools
+44
-4
@@ -5,7 +5,47 @@ export * as Plugin from "./plugin.js"; | ||
| export type ID = typeof ID.Type; | ||
| export interface Info extends Schema.Schema.Type<typeof Info> { | ||
| } | ||
| export declare const Info: Schema.Struct<{ | ||
| export declare const Source: Schema.Union<readonly [Schema.Struct<{ | ||
| readonly type: Schema.Literal<"builtin">; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"package">; | ||
| readonly package: Schema.String; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"local">; | ||
| readonly path: Schema.String; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"sdk">; | ||
| }>]>; | ||
| export type Source = typeof Source.Type; | ||
| export declare const Info: Schema.Union<readonly [Schema.Struct<{ | ||
| readonly id: Schema.brand<Schema.String, "Plugin.ID">; | ||
| }>; | ||
| readonly source: Schema.Union<readonly [Schema.Struct<{ | ||
| readonly type: Schema.Literal<"builtin">; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"package">; | ||
| readonly package: Schema.String; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"local">; | ||
| readonly path: Schema.String; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"sdk">; | ||
| }>]>; | ||
| readonly status: Schema.Literal<"active">; | ||
| readonly tui: Schema.Boolean; | ||
| }>, 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 package: Schema.String; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"local">; | ||
| readonly path: Schema.String; | ||
| }>, Schema.Struct<{ | ||
| readonly type: Schema.Literal<"sdk">; | ||
| }>]>; | ||
| readonly status: Schema.Literal<"failed">; | ||
| readonly error: Schema.String; | ||
| readonly tui: Schema.Boolean; | ||
| }>]>; | ||
| export type Info = typeof Info.Type; | ||
| export declare const Event: { | ||
@@ -12,0 +52,0 @@ Added: Schema.Struct<{ |
+22
-3
| export * as Plugin from "./plugin.js"; | ||
| import { Schema } from "effect"; | ||
| import { ephemeral, inventory } from "./event.js"; | ||
| import { optional } from "./schema.js"; | ||
| export const ID = Schema.String.pipe(Schema.brand("Plugin.ID")); | ||
| export const Info = Schema.Struct({ | ||
| id: ID, | ||
| }).annotate({ identifier: "Plugin.Info" }); | ||
| export const Source = Schema.Union([ | ||
| Schema.Struct({ type: Schema.Literal("builtin") }), | ||
| Schema.Struct({ type: Schema.Literal("package"), package: Schema.String }), | ||
| Schema.Struct({ type: Schema.Literal("local"), path: Schema.String }), | ||
| Schema.Struct({ type: Schema.Literal("sdk") }), | ||
| ]).annotate({ identifier: "Plugin.Source" }); | ||
| export const Info = Schema.Union([ | ||
| Schema.Struct({ | ||
| id: ID, | ||
| source: Source, | ||
| status: Schema.Literal("active"), | ||
| tui: Schema.Boolean, | ||
| }), | ||
| Schema.Struct({ | ||
| id: ID.pipe(optional), | ||
| source: Source, | ||
| status: Schema.Literal("failed"), | ||
| error: Schema.String, | ||
| tui: Schema.Boolean, | ||
| }), | ||
| ]).annotate({ identifier: "Plugin.Info" }); | ||
| const Added = ephemeral({ | ||
@@ -9,0 +28,0 @@ type: "plugin.added", |
@@ -252,2 +252,4 @@ export * as SessionEvent from "./session-event.js"; | ||
| finish: FinishReason, | ||
| rawFinish: Schema.String.pipe(optional), | ||
| providerState: SessionMessage.ProviderState.pipe(optional), | ||
| cost: Money.USD, | ||
@@ -266,2 +268,5 @@ tokens: TokenUsage.Info, | ||
| error: SessionError.Error, | ||
| finish: Schema.Literals(["content-filter"]).pipe(optional), | ||
| rawFinish: Schema.String.pipe(optional), | ||
| providerState: SessionMessage.ProviderState.pipe(optional), | ||
| cost: Money.USD.pipe(optional), | ||
@@ -268,0 +273,0 @@ tokens: TokenUsage.Info.pipe(optional), |
@@ -167,2 +167,4 @@ export * as SessionMessage from "./session-message.js"; | ||
| finish: FinishReason.pipe(optional), | ||
| rawFinish: Schema.String.pipe(optional), | ||
| providerState: ProviderState.pipe(optional), | ||
| cost: Money.USD.pipe(optional), | ||
@@ -169,0 +171,0 @@ tokens: TokenUsage.Info.pipe(optional), |
@@ -641,2 +641,4 @@ export * as SessionTransfer from "./session-transfer.js"; | ||
| readonly finish: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>>>, Schema.optionalKey<Schema.Literals<readonly ["stop", "length", "tool-calls", "content-filter", "error", "unknown"]>>, never, never>; | ||
| readonly rawFinish: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly providerState: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>; | ||
| readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Finite, "Money.USD"> & { | ||
@@ -643,0 +645,0 @@ zero: number & import("effect/Brand").Brand<"Money.USD">; |
+1
-1
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/schema", | ||
| "version": "0.0.0-beta-17595", | ||
| "version": "0.0.0-beta-17639", | ||
| "type": "module", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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.
3467480
0.48%55055
0.26%