@opencode/schema 2.3.2 → 2.4.1

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.
@@ -132,6 +132,12 @@ export declare const CodeAction: Schema.Struct<{
132
132
  }>;
133
133
  export interface CodeAction extends Schema.Schema.Type<typeof CodeAction> {
134
134
  }
135
+ export declare const ShellAction: Schema.Struct<{
136
+ type: Schema.tag<"shell">;
137
+ command: Schema.NonEmptyString;
138
+ }>;
139
+ export interface ShellAction extends Schema.Schema.Type<typeof ShellAction> {
140
+ }
135
141
  export declare const Action: Schema.Union<readonly [Schema.Struct<{
136
142
  readonly type: Schema.tag<"prompt">;
137
143
  readonly prompt: Schema.String;
@@ -148,6 +154,9 @@ export declare const Action: Schema.Union<readonly [Schema.Struct<{
148
154
  readonly type: Schema.tag<"code">;
149
155
  readonly code: Schema.String;
150
156
  readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<Schema.Json, Schema.Json, never, never>>>, Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>, never, never>;
157
+ }>, Schema.Struct<{
158
+ type: Schema.tag<"shell">;
159
+ command: Schema.NonEmptyString;
151
160
  }>]>;
152
161
  export type Action = typeof Action.Type;
153
162
  export declare const Status: Schema.Literals<readonly ["active", "paused", "done"]>;
@@ -204,6 +213,9 @@ export declare const Info: Schema.Struct<{
204
213
  readonly type: Schema.tag<"code">;
205
214
  readonly code: Schema.String;
206
215
  readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<Schema.Json, Schema.Json, never, never>>>, Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>, never, never>;
216
+ }>, Schema.Struct<{
217
+ type: Schema.tag<"shell">;
218
+ command: Schema.NonEmptyString;
207
219
  }>]>;
208
220
  readonly expires: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
209
221
  readonly status: Schema.Literals<readonly ["active", "paused", "done"]>;
@@ -250,6 +262,12 @@ export declare const CodeActionInput: Schema.Struct<{
250
262
  }>;
251
263
  export interface CodeActionInput extends Schema.Schema.Type<typeof CodeActionInput> {
252
264
  }
265
+ export declare const ShellActionInput: Schema.Struct<{
266
+ readonly type: Schema.tag<"shell">;
267
+ readonly command: Schema.NonEmptyString;
268
+ }>;
269
+ export interface ShellActionInput extends Schema.Schema.Type<typeof ShellActionInput> {
270
+ }
253
271
  export declare const ActionInput: Schema.Union<readonly [Schema.Struct<{
254
272
  readonly type: Schema.tag<"prompt">;
255
273
  readonly prompt: Schema.String;
@@ -274,6 +292,9 @@ export declare const ActionInput: Schema.Union<readonly [Schema.Struct<{
274
292
  readonly type: Schema.tag<"code">;
275
293
  readonly code: Schema.String;
276
294
  readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<Schema.Json, Schema.Json, never, never>>>, Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>, never, never>;
295
+ }>, Schema.Struct<{
296
+ readonly type: Schema.tag<"shell">;
297
+ readonly command: Schema.NonEmptyString;
277
298
  }>]>;
278
299
  export type ActionInput = typeof ActionInput.Type;
279
300
  /** An automation as callers describe it: a name, when it runs, what it does, and when it stops. */
@@ -321,6 +342,9 @@ export declare const Request: Schema.Struct<{
321
342
  readonly type: Schema.tag<"code">;
322
343
  readonly code: Schema.String;
323
344
  readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<Schema.Json, Schema.Json, never, never>>>, Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>, never, never>;
345
+ }>, Schema.Struct<{
346
+ readonly type: Schema.tag<"shell">;
347
+ readonly command: Schema.NonEmptyString;
324
348
  }>]>;
325
349
  readonly expires: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
326
350
  }>;
@@ -370,6 +394,9 @@ export declare const CreateInput: Schema.Struct<{
370
394
  readonly type: Schema.tag<"code">;
371
395
  readonly code: Schema.String;
372
396
  readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<Schema.Json, Schema.Json, never, never>>>, Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>, never, never>;
397
+ }>, Schema.Struct<{
398
+ readonly type: Schema.tag<"shell">;
399
+ readonly command: Schema.NonEmptyString;
373
400
  }>]>;
374
401
  readonly expires: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
375
402
  readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
@@ -77,7 +77,9 @@ export const CodeAction = Schema.Struct({
77
77
  code: Schema.String,
78
78
  args: Schema.Json.pipe(optional),
79
79
  }).annotate({ identifier: "Automation.Action.Code" });
80
- export const Action = Schema.Union([PromptAction, CodeAction]).pipe(Schema.toTaggedUnion("type"), Schema.annotate({ identifier: "Automation.Action" }));
80
+ const shellFields = { type: Schema.tag("shell"), command: Schema.NonEmptyString };
81
+ export const ShellAction = Schema.Struct(shellFields).annotate({ identifier: "Automation.Action.Shell" });
82
+ export const Action = Schema.Union([PromptAction, CodeAction, ShellAction]).pipe(Schema.toTaggedUnion("type"), Schema.annotate({ identifier: "Automation.Action" }));
81
83
  export const Status = Schema.Literals(["active", "paused", "done"]).annotate({ identifier: "Automation.Status" });
82
84
  export const Outcome = Schema.Literals(["fired", "late", "skipped", "disabled", "failed", "expired"]).annotate({
83
85
  identifier: "Automation.Outcome",
@@ -115,7 +117,7 @@ export const CodeActionInput = Schema.Struct({
115
117
  type: Schema.tag("code"),
116
118
  code: Schema.String.check(Schema.isMinLength(1)).annotate({
117
119
  description: [
118
- "Code Mode JavaScript run on each trigger with no model (no fetch; 30s, 20 tool calls, 32 KB output cap).",
120
+ "Code Mode JavaScript run on each trigger with no model (32 KB output cap).",
119
121
  'Call tools statically as tools.<ns>.<tool>(...) or tools["ns-name"].tool(...); each is authorized once at creation to run unattended.',
120
122
  "Receives input = { state, now, runs, args } (also globals): state starts null, now is epoch ms, runs counts earlier runs.",
121
123
  "Event triggers also receive input.event = { id, timestamp, data }; data follows the event type's payloadSchema.",
@@ -126,15 +128,21 @@ export const CodeActionInput = Schema.Struct({
126
128
  }),
127
129
  args: Schema.Json.pipe(optional).annotate({ description: "JSON passed to every run as input.args." }),
128
130
  }).annotate({ identifier: "Automation.CodeActionInput" });
129
- export const ActionInput = Schema.Union([PromptActionInput, CodeActionInput]).pipe(Schema.toTaggedUnion("type"), Schema.annotate({ identifier: "Automation.ActionInput" }));
131
+ export const ShellActionInput = Schema.Struct({
132
+ ...shellFields,
133
+ command: shellFields.command.annotate({
134
+ description: "The fixed shell command to run on each trigger without a model.",
135
+ }),
136
+ }).annotate({ identifier: "Automation.ShellActionInput" });
137
+ export const ActionInput = Schema.Union([PromptActionInput, CodeActionInput, ShellActionInput]).pipe(Schema.toTaggedUnion("type"), Schema.annotate({ identifier: "Automation.ActionInput" }));
130
138
  /** An automation as callers describe it: a name, when it runs, what it does, and when it stops. */
131
139
  export const Request = Schema.Struct({
132
140
  name: Schema.String.check(Schema.isMinLength(1)).annotate({ description: "A short label shown in lists." }),
133
141
  trigger: Trigger.annotate({
134
- description: 'When it runs: { type: "at", at: "in 20 minutes" | "2026-10-27T09:00" }, { type: "every", every: "1 hour" } or { type: "cron", cron: "0 9 * * 1-5" }, each with an optional tz. Or { type: "event", server, event, args? } for a connected MCP server advertising push delivery (requires mcp_events).',
142
+ description: 'When it runs: { type: "at", at: "in 20 minutes" | "2026-10-27T09:00" }, { type: "every", every: "1 hour" } or { type: "cron", cron: "0 9 * * 1-5" }, each with an optional tz. Or { type: "event", server, event, args? } for a connected MCP server advertising push delivery.',
135
143
  }),
136
144
  action: ActionInput.annotate({
137
- description: 'What it does: { type: "prompt", prompt, to? } sends a prompt; { type: "code", code, args? } runs Code Mode with no model.',
145
+ description: 'What it does: { type: "prompt", prompt, to? } sends a prompt; { type: "code", code, args? } runs Code Mode; { type: "shell", command } runs a fixed shell command.',
138
146
  }),
139
147
  expires: Schema.String.pipe(optional).annotate({
140
148
  description: 'When it stops for good: an instant, a wall-clock time in tz, or "in 8 hours".',
@@ -1,16 +1,15 @@
1
1
  export * as BlobStore from "./blob-store.js";
2
2
  import { Schema } from "effect";
3
- /**
4
- * The ID of what made the blob and the blob's position among its outputs: `video_<id>_0` is a video job's first
5
- * video. The prefix says what kind of blob it is. Strict, because the server names files after it.
6
- */
7
- export declare const ID: Schema.brand<Schema.String, "Blob.ID">;
3
+ export declare const ID: Schema.brand<Schema.String, "Blob.ID"> & {
4
+ create: () => string & import("effect/Brand").Brand<"Blob.ID">;
5
+ };
8
6
  export type ID = typeof ID.Type;
9
7
  export interface Info extends Schema.Schema.Type<typeof Info> {
10
8
  }
11
9
  export declare const Info: Schema.Struct<{
12
- readonly id: Schema.brand<Schema.String, "Blob.ID">;
10
+ readonly id: Schema.brand<Schema.String, "Blob.ID"> & {
11
+ create: () => string & import("effect/Brand").Brand<"Blob.ID">;
12
+ };
13
13
  readonly mime: Schema.String;
14
14
  readonly bytes: Schema.Finite;
15
- readonly expiresAt: Schema.Finite;
16
15
  }>;
@@ -1,15 +1,16 @@
1
1
  export * as BlobStore from "./blob-store.js";
2
2
  import { Schema } from "effect";
3
- /**
4
- * The ID of what made the blob and the blob's position among its outputs: `video_<id>_0` is a video job's first
5
- * video. The prefix says what kind of blob it is. Strict, because the server names files after it.
6
- */
7
- export const ID = Schema.String.check(Schema.isPattern(/^video_[0-9a-f]{12}[0-9A-Za-z]{14}_(0|[1-9][0-9]{0,2})$/u)).pipe(Schema.brand("Blob.ID"), Schema.annotate({ identifier: "Blob.ID" }));
3
+ import { descending } from "./identifier.js";
4
+ import { statics } from "./schema.js";
5
+ // Strict, because the server names files after it.
6
+ export const ID = Schema.String.check(Schema.isPattern(/^blob_[0-9a-f]{12}[0-9A-Za-z]{14}$/u)).pipe(Schema.brand("Blob.ID"), Schema.annotate({
7
+ identifier: "Blob.ID",
8
+ description: "A stored blob, such as a generated video, which outlives the job that made it",
9
+ }), statics((schema) => ({
10
+ create: () => schema.make("blob_" + descending()),
11
+ })));
8
12
  export const Info = Schema.Struct({
9
13
  id: ID,
10
14
  mime: Schema.String,
11
15
  bytes: Schema.Finite,
12
- expiresAt: Schema.Finite.annotate({
13
- description: "Epoch milliseconds after which the blob may be deleted. Read it with GET /api/experimental/blob/:id",
14
- }),
15
16
  }).annotate({ identifier: "Blob.Info" });
@@ -4,7 +4,43 @@ 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 schedules: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
7
+ readonly video_generate: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
8
+ readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.Struct<{
9
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
10
+ readonly model: Schema.brand<Schema.String, "Model.ID">;
11
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
12
+ }>, Schema.Union<readonly [Schema.String, Schema.Struct<{
13
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
14
+ readonly model: Schema.brand<Schema.String, "Model.ID">;
15
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
16
+ }>]>, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.Struct<{
17
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
18
+ readonly model: Schema.brand<Schema.String, "Model.ID">;
19
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
20
+ }>, Schema.Union<readonly [Schema.String, Schema.Struct<{
21
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
22
+ readonly model: Schema.brand<Schema.String, "Model.ID">;
23
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
24
+ }>]>, never, never>>, never, never>;
25
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
26
+ readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.Struct<{
27
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
28
+ readonly model: Schema.brand<Schema.String, "Model.ID">;
29
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
30
+ }>, Schema.Union<readonly [Schema.String, Schema.Struct<{
31
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
32
+ readonly model: Schema.brand<Schema.String, "Model.ID">;
33
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
34
+ }>]>, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.Struct<{
35
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
36
+ readonly model: Schema.brand<Schema.String, "Model.ID">;
37
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
38
+ }>, Schema.Union<readonly [Schema.String, Schema.Struct<{
39
+ readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
40
+ readonly model: Schema.brand<Schema.String, "Model.ID">;
41
+ readonly variant: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.VariantID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.VariantID">>, never, never>;
42
+ }>]>, never, never>>, never, never>;
43
+ }>]>>, never, never>;
8
44
  readonly part_rows: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
9
45
  readonly image_generate: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
10
46
  readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.Struct<{
@@ -63,13 +99,17 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
63
99
  readonly effect: Schema.Literals<readonly ["allow", "deny"]>;
64
100
  }>, never, never>>>, never, never>;
65
101
  readonly artifacts: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
66
- readonly automations: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
67
102
  readonly console_watches: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
68
103
  readonly full_codemode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
69
- readonly mcp_events: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
104
+ readonly home_memory: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
105
+ readonly machines: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
70
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>;
109
+ readonly project_overlay: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
110
+ readonly recommended_api: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
111
+ readonly sqlite_fts: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
71
112
  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
113
  }>, {}>;
74
114
  export declare class Info extends Info_base {
75
115
  }
@@ -15,27 +15,36 @@ 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
  })),
22
- schedules: Schema.Boolean.pipe(optional).annotate({
23
- description: "Deprecated: use experimental.automations.",
22
+ video_generate: Schema.Union([
23
+ Schema.Boolean,
24
+ Schema.Struct({
25
+ model: ConfigModel.Selection.pipe(optional).annotate({
26
+ description: "Default model for the generate_video tool when the agent doesn't choose one, as providerID/modelID. Falls back to automatic selection when it isn't available.",
27
+ }),
28
+ }),
29
+ ])
30
+ .pipe(optional)
31
+ .annotate({
32
+ description: "Settings for the generate_video tool, which is offered while a connected provider has a video model.",
24
33
  }),
25
34
  part_rows: Schema.Boolean.pipe(optional).annotate({
26
- description: "Write each assistant part as its own session_part row instead of rewriting the whole message on every event. Defaults to false.",
35
+ description: "Write each assistant part as its own session_part row instead of rewriting the whole message on every event. Defaults to true; set false to fall back to whole-message writes.",
27
36
  }),
28
37
  image_generate: Schema.Union([
29
38
  Schema.Boolean,
30
39
  Schema.Struct({
31
40
  model: ConfigModel.Selection.pipe(optional).annotate({
32
- description: "Default model for the experimental_image_generate tool when the agent doesn't choose one, as providerID/modelID. Falls back to automatic selection when it isn't available.",
41
+ description: "Default model for the generate_image tool when the agent doesn't choose one, as providerID/modelID. Falls back to automatic selection when it isn't available.",
33
42
  }),
34
43
  }),
35
44
  ])
36
45
  .pipe(optional)
37
46
  .annotate({
38
- description: "Settings for the experimental_image_generate tool, which is offered while a connected provider has an image model.",
47
+ description: "Settings for the generate_image tool, which is offered while a connected provider has an image model.",
39
48
  }),
40
49
  subagent_depth: NonNegativeInt.pipe(optional).annotate({
41
50
  description: "Maximum subagent nesting depth. Defaults to 1.",
@@ -6,18 +6,20 @@ export declare const wildcard = "all";
6
6
  * named explicitly in `experimental.<key>` or `OPENCODE_FLAGS`. Read a flag with Core's `Flag.enabled("<key>")`.
7
7
  */
8
8
  export declare const registry: {
9
- readonly todo: "Enable the experimental todowrite tool.";
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
- 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
11
  readonly artifacts: "Enable experimental artifacts backed by pluggable providers.";
13
- readonly video_generate: "Enable the experimental video generation API.";
14
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.";
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. Off by default in every build, including local and dev; opt in with OPENCODE_FLAGS=full_codemode or experimental.full_codemode: true.";
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.";
15
+ readonly full_codemode: "Enable the full Code Mode work in progress.";
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.";
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.";
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.';
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.";
17
21
  };
18
22
  export type Key = keyof typeof registry;
19
23
  export declare const optInOnly: ReadonlySet<Key>;
20
- /** Earlier names of a flag, still read from `experimental.<name>` and `OPENCODE_FLAGS` when the new key is unset. */
21
- export declare const aliases: {
22
- readonly schedules: "automations";
23
- };
24
+ /** Flags that stay off outside local and dev builds, whatever `OPENCODE_FLAGS` or config say. */
25
+ export declare const localOnly: ReadonlySet<Key>;
@@ -6,17 +6,19 @@ export const wildcard = "all";
6
6
  * named explicitly in `experimental.<key>` or `OPENCODE_FLAGS`. Read a flag with Core's `Flag.enabled("<key>")`.
7
7
  */
8
8
  export const registry = {
9
- todo: "Enable the experimental todowrite tool.",
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
- 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
11
  artifacts: "Enable experimental artifacts backed by pluggable providers.",
13
- video_generate: "Enable the experimental video generation API.",
14
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.",
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. Off by default in every build, including local and dev; opt in with OPENCODE_FLAGS=full_codemode or experimental.full_codemode: true.",
17
- };
18
- export const optInOnly = new Set(["full_codemode"]);
19
- /** Earlier names of a flag, still read from `experimental.<name>` and `OPENCODE_FLAGS` when the new key is unset. */
20
- export const aliases = {
21
- schedules: "automations",
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.",
15
+ full_codemode: "Enable the full Code Mode work in progress.",
16
+ machines: "Let a tool path name a machine, as in gpu:/work/train.py, and act on that machine's files and processes.",
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.",
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.',
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.",
22
21
  };
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/config.d.ts CHANGED
@@ -45,6 +45,7 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
45
45
  }>>, never, never>;
46
46
  readonly username: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
47
47
  readonly timezone: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
48
+ readonly automations: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
48
49
  readonly permissions: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
49
50
  readonly action: Schema.String;
50
51
  readonly resource: Schema.String;
package/dist/config.js CHANGED
@@ -53,6 +53,9 @@ export class Info extends Schema.Class("Config.Info")({
53
53
  timezone: Schema.String.pipe(optional).annotate({
54
54
  description: "IANA time zone for schedules, e.g. America/Los_Angeles. Defaults to the server's local zone",
55
55
  }),
56
+ automations: Schema.Boolean.pipe(optional).annotate({
57
+ description: "Run prompts, shell commands or Code Mode actions on a timer, on a cron schedule, or on push events from connected MCP servers. Defaults to true; set false to disable.",
58
+ }),
56
59
  permissions: Permission.Ruleset.pipe(optional).annotate({
57
60
  description: "Ordered tool permission rules applied to agent tool use",
58
61
  }),