@opencode/schema 0.0.0-dev-1313 → 0.0.0-dev-1314
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 +38 -2
- package/dist/config/experimental.js +19 -5
- package/dist/config/flag.d.ts +6 -7
- package/dist/config/flag.js +6 -7
- package/dist/generate.js +1 -1
- package/dist/job.d.ts +30 -1
- package/dist/job.js +9 -2
- package/package.json +1 -1
|
@@ -4,6 +4,44 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
|
4
4
|
readonly portable_shell_scanner: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
5
5
|
readonly codemode_vm: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
6
6
|
readonly all_flags: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
7
|
+
readonly todo: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
8
|
+
readonly video_generate: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
|
|
9
|
+
readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.Struct<{
|
|
10
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
|
|
11
|
+
readonly model: Schema.brand<Schema.String, "Model.ID">;
|
|
12
|
+
readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
|
|
13
|
+
}>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
14
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
|
|
15
|
+
readonly model: Schema.brand<Schema.String, "Model.ID">;
|
|
16
|
+
readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
|
|
17
|
+
}>]>, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.Struct<{
|
|
18
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
|
|
19
|
+
readonly model: Schema.brand<Schema.String, "Model.ID">;
|
|
20
|
+
readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
|
|
21
|
+
}>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
22
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
|
|
23
|
+
readonly model: Schema.brand<Schema.String, "Model.ID">;
|
|
24
|
+
readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
|
|
25
|
+
}>]>, never, never>>, never, never>;
|
|
26
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
|
|
27
|
+
readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.Struct<{
|
|
28
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
|
|
29
|
+
readonly model: Schema.brand<Schema.String, "Model.ID">;
|
|
30
|
+
readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
|
|
31
|
+
}>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
32
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
|
|
33
|
+
readonly model: Schema.brand<Schema.String, "Model.ID">;
|
|
34
|
+
readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
|
|
35
|
+
}>]>, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.Struct<{
|
|
36
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
|
|
37
|
+
readonly model: Schema.brand<Schema.String, "Model.ID">;
|
|
38
|
+
readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
|
|
39
|
+
}>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
40
|
+
readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
|
|
41
|
+
readonly model: Schema.brand<Schema.String, "Model.ID">;
|
|
42
|
+
readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
|
|
43
|
+
}>]>, never, never>>, never, never>;
|
|
44
|
+
}>]>>, never, never>;
|
|
7
45
|
readonly schedules: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
8
46
|
readonly part_rows: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
9
47
|
readonly image_generate: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
|
|
@@ -68,8 +106,6 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
|
68
106
|
readonly full_codemode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
69
107
|
readonly mcp_events: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
70
108
|
readonly media_blob: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
71
|
-
readonly todo: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
72
|
-
readonly video_generate: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
73
109
|
}>, {}>;
|
|
74
110
|
export declare class Info extends Info_base {
|
|
75
111
|
}
|
|
@@ -12,13 +12,27 @@ export class Info extends Schema.Class("ConfigExperimental.Info")({
|
|
|
12
12
|
description: "Deprecated: ignored because Code Mode always runs on the VM.",
|
|
13
13
|
}),
|
|
14
14
|
all_flags: Schema.Boolean.pipe(optional).annotate({
|
|
15
|
-
description: "
|
|
15
|
+
description: "Turn every feature flag on regardless of the build channel, like OPENCODE_FLAGS=all; explicit per-flag settings still win, and false is not a kill switch.",
|
|
16
16
|
}),
|
|
17
|
-
|
|
18
|
-
description:
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
todo: Schema.Boolean.pipe(optional).annotate({
|
|
18
|
+
description: "Enable the experimental todowrite tool. Defaults to false.",
|
|
19
|
+
}),
|
|
20
|
+
...Record.map(ConfigFlag.registry, (description) => Schema.Boolean.pipe(optional).annotate({
|
|
21
|
+
description: `${description} Defaults to on in local and dev builds and off in releases.`,
|
|
21
22
|
})),
|
|
23
|
+
// The flag also takes settings; an object turns it on.
|
|
24
|
+
video_generate: Schema.Union([
|
|
25
|
+
Schema.Boolean,
|
|
26
|
+
Schema.Struct({
|
|
27
|
+
model: ConfigModel.Selection.pipe(optional).annotate({
|
|
28
|
+
description: "Default model for the experimental_video_generate tool when the agent doesn't choose one, as providerID/modelID. Falls back to automatic selection when it isn't available.",
|
|
29
|
+
}),
|
|
30
|
+
}),
|
|
31
|
+
])
|
|
32
|
+
.pipe(optional)
|
|
33
|
+
.annotate({
|
|
34
|
+
description: `${ConfigFlag.registry.video_generate} Defaults to on in local and dev builds and off in releases. An object turns it on and sets the tool's options.`,
|
|
35
|
+
}),
|
|
22
36
|
schedules: Schema.Boolean.pipe(optional).annotate({
|
|
23
37
|
description: "Deprecated: use experimental.automations.",
|
|
24
38
|
}),
|
package/dist/config/flag.d.ts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
export * as ConfigFlag from "./flag.js";
|
|
2
|
-
/** The `OPENCODE_FLAGS` entry that
|
|
2
|
+
/** The `OPENCODE_FLAGS` entry that turns every flag on, as in `all,-media_blob`. It is not a flag key. */
|
|
3
3
|
export declare const wildcard = "all";
|
|
4
4
|
/**
|
|
5
|
-
* Flags default to on in local and dev builds and off in releases
|
|
6
|
-
*
|
|
5
|
+
* Every feature flag, by key, with what it turns on. Flags default to on in local and dev builds and off in releases;
|
|
6
|
+
* `experimental.<key>` in config and `OPENCODE_FLAGS` override that, and `OPENCODE_FLAGS=all` or
|
|
7
|
+
* `experimental.all_flags: true` turn every flag on. Read one with Core's `Flag.enabled("<key>")`.
|
|
7
8
|
*/
|
|
8
9
|
export declare const registry: {
|
|
9
|
-
readonly todo: "Enable the experimental todowrite tool. Off by default in every build, including local and dev; opt in with OPENCODE_FLAGS=todo or experimental.todo: true.";
|
|
10
10
|
readonly media_blob: "Store new session media once in a deduplicated blob table instead of inline in every message row.";
|
|
11
11
|
readonly automations: "Run a prompt or Code Mode action on a timer, or on a connected MCP server's push event when mcp_events is enabled.";
|
|
12
12
|
readonly artifacts: "Enable experimental artifacts backed by pluggable providers.";
|
|
13
|
-
readonly video_generate: "Enable
|
|
13
|
+
readonly video_generate: "Enable experimental video generation: the HTTP API that starts a video job and stores the result, and the agent tool that saves the videos into the workspace.";
|
|
14
14
|
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.";
|
|
15
15
|
readonly mcp_events: "Enable experimental MCP Events, a draft MCP extension: declare support to MCP servers and read the events of servers that offer them.";
|
|
16
|
-
readonly full_codemode: "Enable the full Code Mode work in progress.
|
|
16
|
+
readonly full_codemode: "Enable the full Code Mode work in progress.";
|
|
17
17
|
};
|
|
18
18
|
export type Key = keyof typeof registry;
|
|
19
|
-
export declare const optInOnly: ReadonlySet<Key>;
|
|
20
19
|
/** Earlier names of a flag, still read from `experimental.<name>` and `OPENCODE_FLAGS` when the new key is unset. */
|
|
21
20
|
export declare const aliases: {
|
|
22
21
|
readonly schedules: "automations";
|
package/dist/config/flag.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
export * as ConfigFlag from "./flag.js";
|
|
2
|
-
/** The `OPENCODE_FLAGS` entry that
|
|
2
|
+
/** The `OPENCODE_FLAGS` entry that turns every flag on, as in `all,-media_blob`. It is not a flag key. */
|
|
3
3
|
export const wildcard = "all";
|
|
4
4
|
/**
|
|
5
|
-
* Flags default to on in local and dev builds and off in releases
|
|
6
|
-
*
|
|
5
|
+
* Every feature flag, by key, with what it turns on. Flags default to on in local and dev builds and off in releases;
|
|
6
|
+
* `experimental.<key>` in config and `OPENCODE_FLAGS` override that, and `OPENCODE_FLAGS=all` or
|
|
7
|
+
* `experimental.all_flags: true` turn every flag on. Read one with Core's `Flag.enabled("<key>")`.
|
|
7
8
|
*/
|
|
8
9
|
export const registry = {
|
|
9
|
-
todo: "Enable the experimental todowrite tool. Off by default in every build, including local and dev; opt in with OPENCODE_FLAGS=todo or experimental.todo: true.",
|
|
10
10
|
media_blob: "Store new session media once in a deduplicated blob table instead of inline in every message row.",
|
|
11
11
|
automations: "Run a prompt or Code Mode action on a timer, or on a connected MCP server's push event when mcp_events is enabled.",
|
|
12
12
|
artifacts: "Enable experimental artifacts backed by pluggable providers.",
|
|
13
|
-
video_generate: "Enable
|
|
13
|
+
video_generate: "Enable experimental video generation: the HTTP API that starts a video job and stores the result, and the agent tool that saves the videos into the workspace.",
|
|
14
14
|
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.",
|
|
15
15
|
mcp_events: "Enable experimental MCP Events, a draft MCP extension: declare support to MCP servers and read the events of servers that offer them.",
|
|
16
|
-
full_codemode: "Enable the full Code Mode work in progress.
|
|
16
|
+
full_codemode: "Enable the full Code Mode work in progress.",
|
|
17
17
|
};
|
|
18
|
-
export const optInOnly = new Set(["todo", "full_codemode"]);
|
|
19
18
|
/** Earlier names of a flag, still read from `experimental.<name>` and `OPENCODE_FLAGS` when the new key is unset. */
|
|
20
19
|
export const aliases = {
|
|
21
20
|
schedules: "automations",
|
package/dist/generate.js
CHANGED
|
@@ -85,7 +85,7 @@ export const VideoRequest = Schema.Struct({
|
|
|
85
85
|
}).annotate({ identifier: "Generate.VideoRequest" });
|
|
86
86
|
export const VideoErrorReason = Schema.Literals(["failed", "cancelled", "expired", "unknown"]).annotate({
|
|
87
87
|
identifier: "Generate.VideoErrorReason",
|
|
88
|
-
description: "failed: the provider failed the job. cancelled: the provider cancelled it. expired: the provider expired it. unknown: the provider gave no result in time
|
|
88
|
+
description: "failed: the provider failed the job. cancelled: the provider cancelled it. expired: the provider expired it. unknown: the provider gave no result in time",
|
|
89
89
|
});
|
|
90
90
|
export const VideoRunning = Schema.Struct({
|
|
91
91
|
id: VideoID,
|
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", "codemode"]>;
|
|
3
|
+
export declare const Kind: Schema.Literals<readonly ["shell", "subagent", "image", "video", "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,22 @@ export declare const Image: Schema.Struct<{
|
|
|
64
64
|
readonly path: Schema.String;
|
|
65
65
|
readonly model: Schema.String;
|
|
66
66
|
}>;
|
|
67
|
+
export interface Video extends Schema.Schema.Type<typeof Video> {
|
|
68
|
+
}
|
|
69
|
+
export declare const Video: 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<"video">;
|
|
81
|
+
readonly path: Schema.String;
|
|
82
|
+
}>;
|
|
67
83
|
export interface CodeMode extends Schema.Schema.Type<typeof CodeMode> {
|
|
68
84
|
}
|
|
69
85
|
export declare const CodeMode: Schema.Struct<{
|
|
@@ -124,6 +140,19 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
|
|
|
124
140
|
readonly kind: Schema.tag<"image">;
|
|
125
141
|
readonly path: Schema.String;
|
|
126
142
|
readonly model: Schema.String;
|
|
143
|
+
}>, Schema.Struct<{
|
|
144
|
+
readonly id: Schema.String;
|
|
145
|
+
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
|
146
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
147
|
+
};
|
|
148
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
|
|
149
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
150
|
+
readonly time: Schema.Struct<{
|
|
151
|
+
readonly started: Schema.Finite;
|
|
152
|
+
readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
|
|
153
|
+
}>;
|
|
154
|
+
readonly kind: Schema.tag<"video">;
|
|
155
|
+
readonly path: Schema.String;
|
|
127
156
|
}>, Schema.Struct<{
|
|
128
157
|
readonly id: Schema.String;
|
|
129
158
|
readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
|
package/dist/job.js
CHANGED
|
@@ -2,7 +2,9 @@ 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", "codemode"]).annotate({
|
|
5
|
+
export const Kind = Schema.Literals(["shell", "subagent", "image", "video", "codemode"]).annotate({
|
|
6
|
+
identifier: "Job.Kind",
|
|
7
|
+
});
|
|
6
8
|
export const Status = Schema.Literals(["running", "completed", "error", "cancelled"]).annotate({
|
|
7
9
|
identifier: "Job.Status",
|
|
8
10
|
});
|
|
@@ -38,7 +40,12 @@ export const Image = Schema.Struct({
|
|
|
38
40
|
path: Schema.String,
|
|
39
41
|
model: Schema.String,
|
|
40
42
|
}).annotate({ identifier: "Job.Image" });
|
|
43
|
+
export const Video = Schema.Struct({
|
|
44
|
+
kind: Schema.tag("video"),
|
|
45
|
+
...Base,
|
|
46
|
+
path: Schema.String,
|
|
47
|
+
}).annotate({ identifier: "Job.Video" });
|
|
41
48
|
export const CodeMode = Schema.Struct({ kind: Schema.tag("codemode"), ...Base }).annotate({
|
|
42
49
|
identifier: "Job.CodeMode",
|
|
43
50
|
});
|
|
44
|
-
export const Info = Schema.Union([Shell, Subagent, Image, CodeMode]).pipe(Schema.toTaggedUnion("kind"), Schema.annotate({ identifier: "Job.Info" }));
|
|
51
|
+
export const Info = Schema.Union([Shell, Subagent, Image, Video, CodeMode]).pipe(Schema.toTaggedUnion("kind"), Schema.annotate({ identifier: "Job.Info" }));
|