@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 ToolMode: Schema.Literals<readonly ["none", "summary", "detail"]>; | ||
| export type ToolMode = typeof ToolMode.Type; | ||
| export declare const ToolTotals: Schema.Struct<{ | ||
| readonly calls: Schema.Int; | ||
| readonly succeeded: Schema.Int; | ||
| readonly failed: Schema.Int; | ||
| readonly unfinished: Schema.Int; | ||
| }>; | ||
| export type ToolTotals = typeof ToolTotals.Type; | ||
| export declare const Tools: Schema.Union<readonly [Schema.Struct<{ | ||
| readonly mode: Schema.Literal<"none">; | ||
| }>, Schema.Struct<{ | ||
| readonly mode: Schema.Literal<"summary">; | ||
| readonly totals: Schema.Struct<{ | ||
| readonly calls: Schema.Int; | ||
| readonly succeeded: Schema.Int; | ||
| readonly failed: Schema.Int; | ||
| readonly unfinished: Schema.Int; | ||
| }>; | ||
| }>, Schema.Struct<{ | ||
| readonly mode: Schema.Literal<"detail">; | ||
| readonly totals: Schema.Struct<{ | ||
| readonly calls: Schema.Int; | ||
| readonly succeeded: Schema.Int; | ||
| readonly failed: Schema.Int; | ||
| readonly unfinished: Schema.Int; | ||
| }>; | ||
| readonly usage: 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 Tools = typeof Tools.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.Union<readonly [Schema.Struct<{ | ||
| readonly mode: Schema.Literal<"none">; | ||
| }>, Schema.Struct<{ | ||
| readonly mode: Schema.Literal<"summary">; | ||
| readonly totals: Schema.Struct<{ | ||
| readonly calls: Schema.Int; | ||
| readonly succeeded: Schema.Int; | ||
| readonly failed: Schema.Int; | ||
| readonly unfinished: Schema.Int; | ||
| }>; | ||
| }>, Schema.Struct<{ | ||
| readonly mode: Schema.Literal<"detail">; | ||
| readonly totals: Schema.Struct<{ | ||
| readonly calls: Schema.Int; | ||
| readonly succeeded: Schema.Int; | ||
| readonly failed: Schema.Int; | ||
| readonly unfinished: Schema.Int; | ||
| }>; | ||
| readonly usage: 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>; | ||
| }>>; | ||
| }>]>; | ||
| 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">; | ||
| }; | ||
| }>>; | ||
| }>; | ||
| 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 ToolMode = Schema.Literals(["none", "summary", "detail"]); | ||
| export const ToolTotals = Schema.Struct({ | ||
| calls: NonNegativeInt, | ||
| succeeded: NonNegativeInt, | ||
| failed: NonNegativeInt, | ||
| unfinished: NonNegativeInt, | ||
| }).annotate({ identifier: "SessionStats.ToolTotals" }); | ||
| export const Tools = Schema.Union([ | ||
| Schema.Struct({ mode: Schema.Literal("none") }), | ||
| Schema.Struct({ mode: Schema.Literal("summary"), totals: ToolTotals }), | ||
| Schema.Struct({ mode: Schema.Literal("detail"), totals: ToolTotals, usage: Schema.Array(ToolUsage) }), | ||
| ]).annotate({ identifier: "SessionStats.Tools" }); | ||
| 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: Tools, | ||
| activeDays: NonNegativeInt, | ||
| streak: NonNegativeInt, | ||
| activity: Schema.Array(Activity), | ||
| models: Schema.Array(ModelUsage), | ||
| }).annotate({ identifier: "SessionStats.Info" }); |
+0
-48
@@ -7,51 +7,3 @@ export * as Command from "./command.js"; | ||
| readonly name: Schema.String; | ||
| readonly template: Schema.String; | ||
| readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly agent: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Agent.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Agent.ID">>, never, never>; | ||
| readonly model: Schema.decodeTo<Schema.optional<Schema.toType<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; | ||
| }; | ||
| }>>, Schema.optionalKey<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; | ||
| }; | ||
| }>, never, never>; | ||
| readonly subtask: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; | ||
| }>; | ||
@@ -58,0 +10,0 @@ export declare const Event: { |
+0
-6
@@ -5,12 +5,6 @@ export * as Command from "./command.js"; | ||
| import { optional } from "./schema.js"; | ||
| import { Model } from "./model.js"; | ||
| import { Agent } from "./agent.js"; | ||
| const Updated = ephemeral({ type: "command.updated", schema: {} }); | ||
| export const Info = Schema.Struct({ | ||
| name: Schema.String, | ||
| template: Schema.String, | ||
| description: Schema.String.pipe(optional), | ||
| agent: Agent.ID.pipe(optional), | ||
| model: Model.Ref.pipe(optional), | ||
| subtask: Schema.Boolean.pipe(optional), | ||
| }).annotate({ identifier: "Command.Info" }); | ||
@@ -17,0 +11,0 @@ export const Event = { |
+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"; |
| export * as Workspace from "./workspace.js"; | ||
| import { Schema } from "effect"; | ||
| import { WorkspaceEvent } from "./workspace-event.js"; | ||
| import { WorkspaceID } from "./workspace-id.js"; | ||
| export declare const ID: import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & { | ||
| export declare const ID: Schema.brand<Schema.String, "Workspace.ID"> & { | ||
| ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">; | ||
@@ -9,2 +10,7 @@ create: () => string & import("effect/Brand").Brand<"Workspace.ID">; | ||
| export type ID = WorkspaceID; | ||
| export declare const DestroyResult: Schema.Struct<{ | ||
| readonly destroyed: Schema.Boolean; | ||
| }>; | ||
| export interface DestroyResult extends Schema.Schema.Type<typeof DestroyResult> { | ||
| } | ||
| export declare const Event: typeof WorkspaceEvent; |
| export * as Workspace from "./workspace.js"; | ||
| import { Schema } from "effect"; | ||
| import { WorkspaceEvent } from "./workspace-event.js"; | ||
| import { WorkspaceID } from "./workspace-id.js"; | ||
| export const ID = WorkspaceID; | ||
| export const DestroyResult = Schema.Struct({ | ||
| destroyed: Schema.Boolean.annotate({ | ||
| description: "True when this request transitioned the workspace from existing to destroyed.", | ||
| }), | ||
| }).annotate({ | ||
| identifier: "WorkspaceDestroyResult", | ||
| description: "Reports whether this request destroyed an existing workspace.", | ||
| }); | ||
| export const Event = WorkspaceEvent; |
+1
-1
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/schema", | ||
| "version": "0.0.0-beta-18050", | ||
| "version": "0.0.0-beta-18135", | ||
| "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.
3506010
0.22%193
1.05%55739
0.36%