@opencode-ai/schema
Advanced tools
@@ -396,3 +396,3 @@ export * as Integration from "./integration.js"; | ||
| }>; | ||
| declare const Info_base: Schema.Class<Info, Schema.Struct<{ | ||
| export declare const Info: Schema.Struct<{ | ||
| readonly id: Schema.brand<Schema.String, "Integration.ID">; | ||
@@ -486,4 +486,4 @@ readonly name: Schema.String; | ||
| }>]>>; | ||
| }>, {}>; | ||
| export declare class Info extends Info_base { | ||
| }>; | ||
| export interface Info extends Schema.Schema.Type<typeof Info> { | ||
| } | ||
@@ -490,0 +490,0 @@ export declare const AttemptID: Schema.brand<Schema.String, "Integration.AttemptID"> & { |
@@ -66,3 +66,3 @@ export * as Integration from "./integration.js"; | ||
| }).annotate({ identifier: "Integration.Ref" }); | ||
| export class Info extends Schema.Class("Integration.Info")({ | ||
| export const Info = Schema.Struct({ | ||
| id: ID, | ||
@@ -72,4 +72,3 @@ name: Schema.String, | ||
| connections: Schema.Array(Connection.Info), | ||
| }) { | ||
| } | ||
| }).annotate({ identifier: "Integration.Info" }); | ||
| export const AttemptID = Schema.String.pipe(Schema.brand("Integration.AttemptID"), statics((schema) => ({ create: () => schema.make("con_" + ascending()) }))); | ||
@@ -76,0 +75,0 @@ const AttemptTime = Schema.Struct({ |
@@ -101,3 +101,3 @@ export * as Reference from "./reference.js"; | ||
| export type Source = typeof Source.Type; | ||
| declare const Info_base: Schema.Class<Info, Schema.Struct<{ | ||
| export declare const Info: Schema.Struct<{ | ||
| readonly name: Schema.String; | ||
@@ -119,4 +119,4 @@ readonly path: Schema.brand<Schema.String, "AbsolutePath">; | ||
| }>]>; | ||
| }>, {}>; | ||
| export declare class Info extends Info_base { | ||
| }>; | ||
| export interface Info extends Schema.Schema.Type<typeof Info> { | ||
| } |
@@ -24,3 +24,3 @@ export * as Reference from "./reference.js"; | ||
| .annotate({ identifier: "Reference.Source" }); | ||
| export class Info extends Schema.Class("Reference.Info")({ | ||
| export const Info = Schema.Struct({ | ||
| name: Schema.String, | ||
@@ -31,3 +31,2 @@ path: AbsolutePath, | ||
| source: Source, | ||
| }) { | ||
| } | ||
| }).annotate({ identifier: "Reference.Info" }); |
+21
-21
@@ -11,4 +11,4 @@ export * as Shell from "./shell.js"; | ||
| export declare const Time: Schema.Struct<{ | ||
| readonly started: Schema.Number; | ||
| readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly started: Schema.Finite; | ||
| readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| }>; | ||
@@ -30,7 +30,7 @@ export interface Time extends Schema.Schema.Type<typeof Time> { | ||
| readonly pid: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| readonly metadata: Schema.$Record<Schema.String, Schema.Unknown>; | ||
| readonly time: Schema.Struct<{ | ||
| readonly started: Schema.Number; | ||
| readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly started: Schema.Finite; | ||
| readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| }>; | ||
@@ -79,7 +79,7 @@ }>; | ||
| readonly pid: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| readonly metadata: Schema.$Record<Schema.String, Schema.Unknown>; | ||
| readonly time: Schema.Struct<{ | ||
| readonly started: Schema.Number; | ||
| readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly started: Schema.Finite; | ||
| readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| }>; | ||
@@ -104,7 +104,7 @@ }>; | ||
| readonly pid: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| readonly metadata: Schema.$Record<Schema.String, Schema.Unknown>; | ||
| readonly time: Schema.Struct<{ | ||
| readonly started: Schema.Number; | ||
| readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly started: Schema.Finite; | ||
| readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| }>; | ||
@@ -145,3 +145,3 @@ }>; | ||
| }; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>; | ||
@@ -158,3 +158,3 @@ }>; | ||
| }; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>; | ||
@@ -244,7 +244,7 @@ }>; | ||
| readonly pid: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| readonly metadata: Schema.$Record<Schema.String, Schema.Unknown>; | ||
| readonly time: Schema.Struct<{ | ||
| readonly started: Schema.Number; | ||
| readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly started: Schema.Finite; | ||
| readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| }>; | ||
@@ -269,7 +269,7 @@ }>; | ||
| readonly pid: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| readonly metadata: Schema.$Record<Schema.String, Schema.Unknown>; | ||
| readonly time: Schema.Struct<{ | ||
| readonly started: Schema.Number; | ||
| readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly started: Schema.Finite; | ||
| readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| }>; | ||
@@ -309,3 +309,3 @@ }>; | ||
| }; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>; | ||
@@ -322,3 +322,3 @@ }>; | ||
| }; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>; | ||
| readonly exit: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>; | ||
| readonly status: Schema.Literals<readonly ["running", "exited", "timeout", "killed"]>; | ||
@@ -325,0 +325,0 @@ }>; |
+5
-5
@@ -17,4 +17,4 @@ export * as Shell from "./shell.js"; | ||
| export const Time = Schema.Struct({ | ||
| started: Schema.Number, | ||
| completed: optional(Schema.Number), | ||
| started: Schema.Finite, | ||
| completed: optional(Schema.Finite), | ||
| }); | ||
@@ -33,9 +33,9 @@ // Opaque caller-supplied tags echoed back on Info and events. The Shell service never interprets | ||
| pid: optional(NonNegativeInt), | ||
| exit: optional(Schema.Number), | ||
| exit: optional(Schema.Finite), | ||
| // Always present; defaults to an empty object when the creator supplies no metadata. | ||
| metadata: Metadata, | ||
| time: Time, | ||
| }).annotate({ identifier: "Shell" }); | ||
| }).annotate({ identifier: "Shell.Info" }); | ||
| const Created = ephemeral({ type: "shell.created", schema: { info: Info } }); | ||
| const Exited = ephemeral({ type: "shell.exited", schema: { id: ID, exit: optional(Schema.Number), status: Status } }); | ||
| const Exited = ephemeral({ type: "shell.exited", schema: { id: ID, exit: optional(Schema.Finite), status: Status } }); | ||
| const Deleted = ephemeral({ type: "shell.deleted", schema: { id: ID } }); | ||
@@ -42,0 +42,0 @@ export const Event = { Created, Exited, Deleted, Definitions: inventory(Created, Exited, Deleted) }; |
+1
-1
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/schema", | ||
| "version": "0.0.0-next-15342", | ||
| "version": "0.0.0-next-15345", | ||
| "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.
3583758
056345
0