@opencode/schema 0.0.0-dev-1303 → 0.0.0-dev-1308
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/job.d.ts +28 -1
- package/dist/job.js +5 -2
- package/package.json +1 -1
package/dist/job.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as Job from "./job.js";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
export declare const Kind: Schema.Literals<readonly ["shell", "subagent", "image"]>;
|
|
3
|
+
export declare const Kind: Schema.Literals<readonly ["shell", "subagent", "image", "codemode"]>;
|
|
4
4
|
export type Kind = typeof Kind.Type;
|
|
5
5
|
export declare const Status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
6
6
|
export type Status = typeof Status.Type;
|
|
@@ -64,6 +64,21 @@ export declare const Image: Schema.Struct<{
|
|
|
64
64
|
readonly path: Schema.String;
|
|
65
65
|
readonly model: Schema.String;
|
|
66
66
|
}>;
|
|
67
|
+
export interface CodeMode extends Schema.Schema.Type<typeof CodeMode> {
|
|
68
|
+
}
|
|
69
|
+
export declare const CodeMode: Schema.Struct<{
|
|
70
|
+
readonly id: Schema.String;
|
|
71
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
72
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
73
|
+
};
|
|
74
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
75
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
76
|
+
readonly time: Schema.Struct<{
|
|
77
|
+
readonly started: Schema.Finite;
|
|
78
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
79
|
+
}>;
|
|
80
|
+
readonly kind: Schema.tag<"codemode">;
|
|
81
|
+
}>;
|
|
67
82
|
export declare const Info: Schema.Union<readonly [Schema.Struct<{
|
|
68
83
|
readonly id: Schema.String;
|
|
69
84
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
@@ -109,5 +124,17 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
|
|
|
109
124
|
readonly kind: Schema.tag<"image">;
|
|
110
125
|
readonly path: Schema.String;
|
|
111
126
|
readonly model: Schema.String;
|
|
127
|
+
}>, Schema.Struct<{
|
|
128
|
+
readonly id: Schema.String;
|
|
129
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
130
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
131
|
+
};
|
|
132
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
133
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
134
|
+
readonly time: Schema.Struct<{
|
|
135
|
+
readonly started: Schema.Finite;
|
|
136
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
137
|
+
}>;
|
|
138
|
+
readonly kind: Schema.tag<"codemode">;
|
|
112
139
|
}>]>;
|
|
113
140
|
export type Info = typeof Info.Type;
|
package/dist/job.js
CHANGED
|
@@ -2,7 +2,7 @@ export * as Job from "./job.js";
|
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { optional } from "./schema.js";
|
|
4
4
|
import { SessionID } from "./session-id.js";
|
|
5
|
-
export const Kind = Schema.Literals(["shell", "subagent", "image"]).annotate({ identifier: "Job.Kind" });
|
|
5
|
+
export const Kind = Schema.Literals(["shell", "subagent", "image", "codemode"]).annotate({ identifier: "Job.Kind" });
|
|
6
6
|
export const Status = Schema.Literals(["running", "completed", "error", "cancelled"]).annotate({
|
|
7
7
|
identifier: "Job.Status",
|
|
8
8
|
});
|
|
@@ -38,4 +38,7 @@ export const Image = Schema.Struct({
|
|
|
38
38
|
path: Schema.String,
|
|
39
39
|
model: Schema.String,
|
|
40
40
|
}).annotate({ identifier: "Job.Image" });
|
|
41
|
-
export const
|
|
41
|
+
export const CodeMode = Schema.Struct({ kind: Schema.tag("codemode"), ...Base }).annotate({
|
|
42
|
+
identifier: "Job.CodeMode",
|
|
43
|
+
});
|
|
44
|
+
export const Info = Schema.Union([Shell, Subagent, Image, CodeMode]).pipe(Schema.toTaggedUnion("kind"), Schema.annotate({ identifier: "Job.Info" }));
|