@opencode/schema 0.0.0-dev-1022 → 0.0.0-dev-1024
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/generate.d.ts +21 -0
- package/dist/generate.js +3 -0
- package/package.json +1 -1
package/dist/generate.d.ts
CHANGED
|
@@ -133,6 +133,13 @@ export declare const PredicateQuestion: Schema.Struct<{
|
|
|
133
133
|
readonly type: Schema.Literal<"predicate">;
|
|
134
134
|
readonly name: Schema.String;
|
|
135
135
|
readonly instructions: Schema.String;
|
|
136
|
+
readonly criteria: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
137
|
+
readonly true: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
138
|
+
readonly false: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
139
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
140
|
+
readonly true: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
141
|
+
readonly false: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
142
|
+
}>>, never, never>;
|
|
136
143
|
}>;
|
|
137
144
|
export interface ChoiceQuestion extends Schema.Schema.Type<typeof ChoiceQuestion> {
|
|
138
145
|
}
|
|
@@ -161,6 +168,13 @@ export declare const DecisionQuestion: Schema.Union<readonly [Schema.Struct<{
|
|
|
161
168
|
readonly type: Schema.Literal<"predicate">;
|
|
162
169
|
readonly name: Schema.String;
|
|
163
170
|
readonly instructions: Schema.String;
|
|
171
|
+
readonly criteria: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
172
|
+
readonly true: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
173
|
+
readonly false: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
174
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
175
|
+
readonly true: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
176
|
+
readonly false: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
177
|
+
}>>, never, never>;
|
|
164
178
|
}>, Schema.Struct<{
|
|
165
179
|
readonly type: Schema.Literal<"choice">;
|
|
166
180
|
readonly name: Schema.String;
|
|
@@ -221,6 +235,13 @@ export declare const DecisionRequest: Schema.Struct<{
|
|
|
221
235
|
readonly type: Schema.Literal<"predicate">;
|
|
222
236
|
readonly name: Schema.String;
|
|
223
237
|
readonly instructions: Schema.String;
|
|
238
|
+
readonly criteria: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
239
|
+
readonly true: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
240
|
+
readonly false: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
241
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
242
|
+
readonly true: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
243
|
+
readonly false: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
244
|
+
}>>, never, never>;
|
|
224
245
|
}>, Schema.Struct<{
|
|
225
246
|
readonly type: Schema.Literal<"choice">;
|
|
226
247
|
readonly name: Schema.String;
|
package/dist/generate.js
CHANGED
|
@@ -71,6 +71,9 @@ export const PredicateQuestion = Schema.Struct({
|
|
|
71
71
|
type: Schema.Literal("predicate"),
|
|
72
72
|
name: QuestionName,
|
|
73
73
|
instructions: Schema.String,
|
|
74
|
+
criteria: Schema.Struct({ true: Schema.String.pipe(optional), false: Schema.String.pipe(optional) })
|
|
75
|
+
.pipe(optional)
|
|
76
|
+
.annotate(description("What counts as true and as false, for statements the instructions alone leave ambiguous")),
|
|
74
77
|
}).annotate({ identifier: "Generate.PredicateQuestion", description: "The probability that a statement is true" });
|
|
75
78
|
export const ChoiceQuestion = Schema.Struct({
|
|
76
79
|
type: Schema.Literal("choice"),
|