@opencode/schema 2.2.4 → 2.2.5
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.
|
@@ -5,10 +5,13 @@ declare const Keep_base: Schema.Class<Keep, Schema.Struct<{
|
|
|
5
5
|
}>, {}>;
|
|
6
6
|
export declare class Keep extends Keep_base {
|
|
7
7
|
}
|
|
8
|
+
/** A share of the model's window such as "20%" or "12.5%", from 1% up to but not including 100%. */
|
|
9
|
+
export declare const Percent: Schema.String;
|
|
10
|
+
export type Percent = typeof Percent.Type;
|
|
8
11
|
declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
9
12
|
readonly auto: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
10
13
|
readonly keep: Schema.decodeTo<Schema.optional<Schema.toType<typeof Keep>>, Schema.optionalKey<typeof Keep>, never, never>;
|
|
11
|
-
readonly buffer: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int
|
|
14
|
+
readonly buffer: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.String, Schema.Int]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Int]>>, never, never>;
|
|
12
15
|
}>, {}>;
|
|
13
16
|
export declare class Info extends Info_base {
|
|
14
17
|
}
|
|
@@ -5,9 +5,15 @@ export class Keep extends Schema.Class("Config.Compaction.Keep")({
|
|
|
5
5
|
tokens: NonNegativeInt.pipe(optional),
|
|
6
6
|
}) {
|
|
7
7
|
}
|
|
8
|
+
/** A share of the model's window such as "20%" or "12.5%", from 1% up to but not including 100%. */
|
|
9
|
+
export const Percent = Schema.String.check(Schema.isPattern(/^([1-9]\d?(\.\d+)?)%$/u)).annotate({
|
|
10
|
+
identifier: "Config.Compaction.Percent",
|
|
11
|
+
});
|
|
8
12
|
export class Info extends Schema.Class("Config.Compaction")({
|
|
9
13
|
auto: Schema.Boolean.pipe(optional),
|
|
10
14
|
keep: Keep.pipe(optional),
|
|
11
|
-
buffer: NonNegativeInt.pipe(optional)
|
|
15
|
+
buffer: Schema.Union([Percent, NonNegativeInt]).pipe(optional).annotate({
|
|
16
|
+
description: 'Room kept free below the model\'s context window before automatic compaction, as a share of the window from "1%" to "99%", such as "20%" to compact at 80% full. A token count is also accepted.',
|
|
17
|
+
}),
|
|
12
18
|
}) {
|
|
13
19
|
}
|