@opencode/schema 0.0.0-dev-1338 → 0.0.0-dev-1341
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/config/experimental.d.ts +2 -0
- package/dist/config/experimental.js +1 -1
- package/dist/config/flag.d.ts +4 -0
- package/dist/config/flag.js +5 -1
- package/dist/model.d.ts +48 -0
- package/dist/model.js +10 -0
- package/package.json +1 -1
|
@@ -104,6 +104,8 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
|
104
104
|
readonly home_memory: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
105
105
|
readonly machines: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
106
106
|
readonly media_blob: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
107
|
+
readonly model_speeds: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
108
|
+
readonly opencode_api: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
107
109
|
readonly project_overlay: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
108
110
|
readonly recommended_api: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
109
111
|
readonly sqlite_fts: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
@@ -15,7 +15,7 @@ export class Info extends Schema.Class("ConfigExperimental.Info")({
|
|
|
15
15
|
description: "Enable all flags except opt-in-only flags on any build channel, like OPENCODE_FLAGS=all. Per-flag config settings take precedence over all_flags; false leaves the build defaults in effect.",
|
|
16
16
|
}),
|
|
17
17
|
...Record.map(ConfigFlag.registry, (description, key) => Schema.Boolean.pipe(optional).annotate({
|
|
18
|
-
description: ConfigFlag.optInOnly.has(key)
|
|
18
|
+
description: ConfigFlag.optInOnly.has(key) || ConfigFlag.localOnly.has(key)
|
|
19
19
|
? description
|
|
20
20
|
: `${description} Defaults to on in local and dev builds and off in releases.`,
|
|
21
21
|
})),
|
package/dist/config/flag.d.ts
CHANGED
|
@@ -11,11 +11,15 @@ export declare const registry: {
|
|
|
11
11
|
readonly artifacts: "Enable experimental artifacts backed by pluggable providers.";
|
|
12
12
|
readonly console_watches: "Watch Slack threads, GitHub pull requests, issues, commits and Actions runs, and the workspace's MCP servers' events through OpenCode Console, and wake sessions when they change.";
|
|
13
13
|
readonly recommended_api: "Use each model's recommended API from models.dev instead of the first API it lists.";
|
|
14
|
+
readonly model_speeds: "Offer a model's faster and slower service tiers (fast, flex…) as speeds of that model: one entry in the model picker with a speed selector, instead of a separate entry per tier such as gpt-5.5-fast.";
|
|
14
15
|
readonly full_codemode: "Enable the full Code Mode work in progress.";
|
|
15
16
|
readonly machines: "Let a tool path name a machine, as in gpu:/work/train.py, and act on that machine's files and processes.";
|
|
16
17
|
readonly home_memory: "Give sessions in the home folder a persistent memory/, docs/ and scripts/ workspace the agent can use freely, tidied by a daily maintenance session that reads the day's home-folder conversations.";
|
|
17
18
|
readonly project_overlay: "Load a personal config dir for each project from ~/.config/opencode/project/<project-id>/, read like an extra .opencode dir that ranks above the repo's own, and let home memory keep the skills it builds for the user there.";
|
|
19
|
+
readonly opencode_api: 'Let Code Mode scripts call the OpenCode HTTP API with fetch("opencode:///api/..."), in-process and already signed in, with no permission checks. Only in local and dev builds, and off there until you opt in with OPENCODE_FLAGS=opencode_api or experimental.opencode_api: true.';
|
|
18
20
|
readonly sqlite_fts: "Build an SQLite full-text index of session titles and message text in the background, and enable the opencode.session.search and opencode.session.read tools. The index covers every session in the database and starts while any loaded location enables it; SQLite keeps it current from then on, also after this is turned off.";
|
|
19
21
|
};
|
|
20
22
|
export type Key = keyof typeof registry;
|
|
21
23
|
export declare const optInOnly: ReadonlySet<Key>;
|
|
24
|
+
/** Flags that stay off outside local and dev builds, whatever `OPENCODE_FLAGS` or config say. */
|
|
25
|
+
export declare const localOnly: ReadonlySet<Key>;
|
package/dist/config/flag.js
CHANGED
|
@@ -11,10 +11,14 @@ export const registry = {
|
|
|
11
11
|
artifacts: "Enable experimental artifacts backed by pluggable providers.",
|
|
12
12
|
console_watches: "Watch Slack threads, GitHub pull requests, issues, commits and Actions runs, and the workspace's MCP servers' events through OpenCode Console, and wake sessions when they change.",
|
|
13
13
|
recommended_api: "Use each model's recommended API from models.dev instead of the first API it lists.",
|
|
14
|
+
model_speeds: "Offer a model's faster and slower service tiers (fast, flex…) as speeds of that model: one entry in the model picker with a speed selector, instead of a separate entry per tier such as gpt-5.5-fast.",
|
|
14
15
|
full_codemode: "Enable the full Code Mode work in progress.",
|
|
15
16
|
machines: "Let a tool path name a machine, as in gpu:/work/train.py, and act on that machine's files and processes.",
|
|
16
17
|
home_memory: "Give sessions in the home folder a persistent memory/, docs/ and scripts/ workspace the agent can use freely, tidied by a daily maintenance session that reads the day's home-folder conversations.",
|
|
17
18
|
project_overlay: "Load a personal config dir for each project from ~/.config/opencode/project/<project-id>/, read like an extra .opencode dir that ranks above the repo's own, and let home memory keep the skills it builds for the user there.",
|
|
19
|
+
opencode_api: 'Let Code Mode scripts call the OpenCode HTTP API with fetch("opencode:///api/..."), in-process and already signed in, with no permission checks. Only in local and dev builds, and off there until you opt in with OPENCODE_FLAGS=opencode_api or experimental.opencode_api: true.',
|
|
18
20
|
sqlite_fts: "Build an SQLite full-text index of session titles and message text in the background, and enable the opencode.session.search and opencode.session.read tools. The index covers every session in the database and starts while any loaded location enables it; SQLite keeps it current from then on, also after this is turned off.",
|
|
19
21
|
};
|
|
20
|
-
export const optInOnly = new Set(["todo"]);
|
|
22
|
+
export const optInOnly = new Set(["todo", "opencode_api"]);
|
|
23
|
+
/** Flags that stay off outside local and dev builds, whatever `OPENCODE_FLAGS` or config say. */
|
|
24
|
+
export const localOnly = new Set(["opencode_api"]);
|
package/dist/model.d.ts
CHANGED
|
@@ -275,6 +275,20 @@ export declare const Variant: Schema.Struct<{
|
|
|
275
275
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
276
276
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
277
277
|
}>;
|
|
278
|
+
/**
|
|
279
|
+
* Set on a model that is another model served faster or slower, such as "gpt-5.5-fast" for "gpt-5.5". Clients offer
|
|
280
|
+
* it as a speed of that model instead of listing it.
|
|
281
|
+
*/
|
|
282
|
+
export interface Speed extends Schema.Schema.Type<typeof Speed> {
|
|
283
|
+
}
|
|
284
|
+
export declare const Speed: Schema.Struct<{
|
|
285
|
+
/** The same provider's model at its standard speed. */
|
|
286
|
+
readonly base: Schema.brand<Schema.String, "Model.ID">;
|
|
287
|
+
/** The speed's name, such as "fast" or "flex". */
|
|
288
|
+
readonly id: Schema.String;
|
|
289
|
+
/** Whether it is faster than the standard speed. A slower speed trades latency for a lower price. */
|
|
290
|
+
readonly faster: Schema.Boolean;
|
|
291
|
+
}>;
|
|
278
292
|
export interface Info extends Schema.Schema.Type<typeof Info> {
|
|
279
293
|
}
|
|
280
294
|
export declare const Info: Schema.Struct<{
|
|
@@ -456,6 +470,40 @@ export declare const Info: Schema.Struct<{
|
|
|
456
470
|
readonly encoding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["zstd", "gzip", "none"]>>>, Schema.optionalKey<Schema.Literals<readonly ["zstd", "gzip", "none"]>>, never, never>;
|
|
457
471
|
}>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
|
|
458
472
|
}>>;
|
|
473
|
+
/** Experimental: may change without compatibility guarantees. */
|
|
474
|
+
readonly experimental: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
475
|
+
readonly speed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
476
|
+
/** The same provider's model at its standard speed. */
|
|
477
|
+
readonly base: Schema.brand<Schema.String, "Model.ID">;
|
|
478
|
+
/** The speed's name, such as "fast" or "flex". */
|
|
479
|
+
readonly id: Schema.String;
|
|
480
|
+
/** Whether it is faster than the standard speed. A slower speed trades latency for a lower price. */
|
|
481
|
+
readonly faster: Schema.Boolean;
|
|
482
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
483
|
+
/** The same provider's model at its standard speed. */
|
|
484
|
+
readonly base: Schema.brand<Schema.String, "Model.ID">;
|
|
485
|
+
/** The speed's name, such as "fast" or "flex". */
|
|
486
|
+
readonly id: Schema.String;
|
|
487
|
+
/** Whether it is faster than the standard speed. A slower speed trades latency for a lower price. */
|
|
488
|
+
readonly faster: Schema.Boolean;
|
|
489
|
+
}>>, never, never>;
|
|
490
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
491
|
+
readonly speed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
492
|
+
/** The same provider's model at its standard speed. */
|
|
493
|
+
readonly base: Schema.brand<Schema.String, "Model.ID">;
|
|
494
|
+
/** The speed's name, such as "fast" or "flex". */
|
|
495
|
+
readonly id: Schema.String;
|
|
496
|
+
/** Whether it is faster than the standard speed. A slower speed trades latency for a lower price. */
|
|
497
|
+
readonly faster: Schema.Boolean;
|
|
498
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
499
|
+
/** The same provider's model at its standard speed. */
|
|
500
|
+
readonly base: Schema.brand<Schema.String, "Model.ID">;
|
|
501
|
+
/** The speed's name, such as "fast" or "flex". */
|
|
502
|
+
readonly id: Schema.String;
|
|
503
|
+
/** Whether it is faster than the standard speed. A slower speed trades latency for a lower price. */
|
|
504
|
+
readonly faster: Schema.Boolean;
|
|
505
|
+
}>>, never, never>;
|
|
506
|
+
}>>, never, never>;
|
|
459
507
|
readonly time: Schema.Struct<{
|
|
460
508
|
readonly released: Schema.Finite;
|
|
461
509
|
}>;
|
package/dist/model.js
CHANGED
|
@@ -80,6 +80,14 @@ export const Variant = Schema.Struct({
|
|
|
80
80
|
...Overlays,
|
|
81
81
|
settings: VariantSettings.pipe(optional),
|
|
82
82
|
}).annotate({ identifier: "Model.Variant" });
|
|
83
|
+
export const Speed = Schema.Struct({
|
|
84
|
+
/** The same provider's model at its standard speed. */
|
|
85
|
+
base: ID,
|
|
86
|
+
/** The speed's name, such as "fast" or "flex". */
|
|
87
|
+
id: Schema.String,
|
|
88
|
+
/** Whether it is faster than the standard speed. A slower speed trades latency for a lower price. */
|
|
89
|
+
faster: Schema.Boolean,
|
|
90
|
+
}).annotate({ identifier: "Model.Speed" });
|
|
83
91
|
export const Info = Schema.Struct({
|
|
84
92
|
id: ID,
|
|
85
93
|
modelID: ID,
|
|
@@ -93,6 +101,8 @@ export const Info = Schema.Struct({
|
|
|
93
101
|
...Overlays,
|
|
94
102
|
capabilities: Capabilities,
|
|
95
103
|
variants: Schema.Array(Variant),
|
|
104
|
+
/** Experimental: may change without compatibility guarantees. */
|
|
105
|
+
experimental: Schema.Struct({ speed: Speed.pipe(optional) }).pipe(optional),
|
|
96
106
|
time: Schema.Struct({
|
|
97
107
|
released: Schema.Finite,
|
|
98
108
|
}),
|