@opencode-ai/schema
Advanced tools
| export * as SessionStats from "./session-stats.js"; | ||
| import { Schema } from "effect"; | ||
| export declare const Activity: Schema.Struct<{ | ||
| readonly date: Schema.String; | ||
| readonly steps: Schema.Int; | ||
| }>; | ||
| export type Activity = typeof Activity.Type; | ||
| export declare const ModelUsage: Schema.Struct<{ | ||
| readonly model: Schema.Struct<{ | ||
| readonly id: Schema.brand<Schema.String, "Model.ID">; | ||
| readonly providerID: 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">; | ||
| }; | ||
| readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>; | ||
| }> & { | ||
| parse: (input: string) => { | ||
| readonly id: string & import("effect/Brand").Brand<"Model.ID">; | ||
| readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">; | ||
| readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined; | ||
| }; | ||
| }; | ||
| readonly steps: Schema.Int; | ||
| readonly tokens: Schema.Struct<{ | ||
| readonly input: Schema.Finite; | ||
| readonly output: Schema.Finite; | ||
| readonly reasoning: Schema.Finite; | ||
| readonly cache: Schema.Struct<{ | ||
| readonly read: Schema.Finite; | ||
| readonly write: Schema.Finite; | ||
| }>; | ||
| }>; | ||
| readonly cost: Schema.brand<Schema.Finite, "Money.USD"> & { | ||
| zero: number & import("effect/Brand").Brand<"Money.USD">; | ||
| }; | ||
| }>; | ||
| export type ModelUsage = typeof ModelUsage.Type; | ||
| export declare const ToolUsage: Schema.Struct<{ | ||
| readonly name: Schema.String; | ||
| readonly calls: Schema.Int; | ||
| readonly succeeded: Schema.Int; | ||
| readonly failed: Schema.Int; | ||
| readonly unfinished: Schema.Int; | ||
| readonly durationP50: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| }>; | ||
| export type ToolUsage = typeof ToolUsage.Type; | ||
| export declare const Info: Schema.Struct<{ | ||
| readonly range: Schema.Struct<{ | ||
| readonly from: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>; | ||
| readonly to: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>; | ||
| }>; | ||
| readonly sessions: Schema.Int; | ||
| readonly subagents: Schema.Int; | ||
| readonly prompts: Schema.Int; | ||
| readonly steps: Schema.Int; | ||
| readonly tokens: Schema.Struct<{ | ||
| readonly input: Schema.Finite; | ||
| readonly output: Schema.Finite; | ||
| readonly reasoning: Schema.Finite; | ||
| readonly cache: Schema.Struct<{ | ||
| readonly read: Schema.Finite; | ||
| readonly write: Schema.Finite; | ||
| }>; | ||
| }>; | ||
| readonly cost: Schema.brand<Schema.Finite, "Money.USD"> & { | ||
| zero: number & import("effect/Brand").Brand<"Money.USD">; | ||
| }; | ||
| readonly tools: Schema.Struct<{ | ||
| readonly calls: Schema.Int; | ||
| readonly succeeded: Schema.Int; | ||
| readonly failed: Schema.Int; | ||
| readonly unfinished: Schema.Int; | ||
| }>; | ||
| readonly activeDays: Schema.Int; | ||
| readonly streak: Schema.Int; | ||
| readonly activity: Schema.$Array<Schema.Struct<{ | ||
| readonly date: Schema.String; | ||
| readonly steps: Schema.Int; | ||
| }>>; | ||
| readonly models: Schema.$Array<Schema.Struct<{ | ||
| readonly model: Schema.Struct<{ | ||
| readonly id: Schema.brand<Schema.String, "Model.ID">; | ||
| readonly providerID: 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">; | ||
| }; | ||
| readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>; | ||
| }> & { | ||
| parse: (input: string) => { | ||
| readonly id: string & import("effect/Brand").Brand<"Model.ID">; | ||
| readonly providerID: string & import("effect/Brand").Brand<"Provider.ID">; | ||
| readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined; | ||
| }; | ||
| }; | ||
| readonly steps: Schema.Int; | ||
| readonly tokens: Schema.Struct<{ | ||
| readonly input: Schema.Finite; | ||
| readonly output: Schema.Finite; | ||
| readonly reasoning: Schema.Finite; | ||
| readonly cache: Schema.Struct<{ | ||
| readonly read: Schema.Finite; | ||
| readonly write: Schema.Finite; | ||
| }>; | ||
| }>; | ||
| readonly cost: Schema.brand<Schema.Finite, "Money.USD"> & { | ||
| zero: number & import("effect/Brand").Brand<"Money.USD">; | ||
| }; | ||
| }>>; | ||
| readonly toolUsage: Schema.$Array<Schema.Struct<{ | ||
| readonly name: Schema.String; | ||
| readonly calls: Schema.Int; | ||
| readonly succeeded: Schema.Int; | ||
| readonly failed: Schema.Int; | ||
| readonly unfinished: Schema.Int; | ||
| readonly durationP50: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| }>>; | ||
| }>; | ||
| export type Info = typeof Info.Type; |
| export * as SessionStats from "./session-stats.js"; | ||
| import { Schema } from "effect"; | ||
| import { Model } from "./model.js"; | ||
| import { Money } from "./money.js"; | ||
| import { DateTimeUtcFromMillis, NonNegativeInt, optional } from "./schema.js"; | ||
| import { TokenUsage } from "./token-usage.js"; | ||
| export const Activity = Schema.Struct({ | ||
| date: Schema.String, | ||
| steps: NonNegativeInt, | ||
| }).annotate({ identifier: "SessionStats.Activity" }); | ||
| export const ModelUsage = Schema.Struct({ | ||
| model: Model.Ref, | ||
| steps: NonNegativeInt, | ||
| tokens: TokenUsage.Info, | ||
| cost: Money.USD, | ||
| }).annotate({ identifier: "SessionStats.ModelUsage" }); | ||
| export const ToolUsage = Schema.Struct({ | ||
| name: Schema.String, | ||
| calls: NonNegativeInt, | ||
| succeeded: NonNegativeInt, | ||
| failed: NonNegativeInt, | ||
| unfinished: NonNegativeInt, | ||
| durationP50: Schema.Finite.pipe(optional), | ||
| }).annotate({ identifier: "SessionStats.ToolUsage" }); | ||
| export const Info = Schema.Struct({ | ||
| range: Schema.Struct({ | ||
| from: DateTimeUtcFromMillis, | ||
| to: DateTimeUtcFromMillis, | ||
| }), | ||
| sessions: NonNegativeInt, | ||
| subagents: NonNegativeInt, | ||
| prompts: NonNegativeInt, | ||
| steps: NonNegativeInt, | ||
| tokens: TokenUsage.Info, | ||
| cost: Money.USD, | ||
| tools: Schema.Struct({ | ||
| calls: NonNegativeInt, | ||
| succeeded: NonNegativeInt, | ||
| failed: NonNegativeInt, | ||
| unfinished: NonNegativeInt, | ||
| }), | ||
| activeDays: NonNegativeInt, | ||
| streak: NonNegativeInt, | ||
| activity: Schema.Array(Activity), | ||
| models: Schema.Array(ModelUsage), | ||
| toolUsage: Schema.Array(ToolUsage), | ||
| }).annotate({ identifier: "SessionStats.Info" }); |
+1
-0
@@ -27,2 +27,3 @@ export { Agent } from "./agent.js"; | ||
| export { SessionMessage } from "./session-message.js"; | ||
| export { SessionStats } from "./session-stats.js"; | ||
| export { SessionTransfer } from "./session-transfer.js"; | ||
@@ -29,0 +30,0 @@ export { Snapshot } from "./snapshot.js"; |
+1
-0
@@ -27,2 +27,3 @@ export { Agent } from "./agent.js"; | ||
| export { SessionMessage } from "./session-message.js"; | ||
| export { SessionStats } from "./session-stats.js"; | ||
| export { SessionTransfer } from "./session-transfer.js"; | ||
@@ -29,0 +30,0 @@ export { Snapshot } from "./snapshot.js"; |
+1
-1
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/schema", | ||
| "version": "0.0.0-dev-18079", | ||
| "version": "0.0.0-dev-18081", | ||
| "type": "module", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
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.
3506818
0.24%193
1.05%55722
0.33%