@opencode/schema 0.0.0-dev-1323 → 0.0.0-dev-1325

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",
@@ -126,7 +128,13 @@ 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." }),
@@ -134,7 +142,7 @@ export const Request = Schema.Struct({
134
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 (requires mcp_events).',
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".',
@@ -107,6 +107,7 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
107
107
  readonly machines: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
108
108
  readonly mcp_events: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
109
109
  readonly media_blob: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
110
+ readonly project_overlay: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
110
111
  readonly recommended_api: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
111
112
  readonly sqlite_fts: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
112
113
  readonly todo: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
@@ -17,7 +17,8 @@ export declare const registry: {
17
17
  readonly full_codemode: "Enable the full Code Mode work in progress.";
18
18
  readonly machines: "Let a tool path name a machine, as in gpu:/work/train.py, and act on that machine's files and processes.";
19
19
  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.";
20
- readonly sqlite_fts: "Build an SQLite full-text index of session titles and message text, once, in the background. It 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. Off by default in every build, including local and dev; opt in with OPENCODE_FLAGS=sqlite_fts or experimental.sqlite_fts: true.";
20
+ 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.";
21
+ 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. Off by default in every build, including local and dev; opt in with OPENCODE_FLAGS=sqlite_fts or experimental.sqlite_fts: true.";
21
22
  };
22
23
  export type Key = keyof typeof registry;
23
24
  export declare const optInOnly: ReadonlySet<Key>;
@@ -17,7 +17,8 @@ export const registry = {
17
17
  full_codemode: "Enable the full Code Mode work in progress.",
18
18
  machines: "Let a tool path name a machine, as in gpu:/work/train.py, and act on that machine's files and processes.",
19
19
  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.",
20
- sqlite_fts: "Build an SQLite full-text index of session titles and message text, once, in the background. It 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. Off by default in every build, including local and dev; opt in with OPENCODE_FLAGS=sqlite_fts or experimental.sqlite_fts: true.",
20
+ 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.",
21
+ 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. Off by default in every build, including local and dev; opt in with OPENCODE_FLAGS=sqlite_fts or experimental.sqlite_fts: true.",
21
22
  };
22
23
  export const optInOnly = new Set(["todo", "sqlite_fts"]);
23
24
  /** Earlier names of a flag, still read from `experimental.<name>` and `OPENCODE_FLAGS` when the new key is unset. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/schema",
4
- "version": "0.0.0-dev-1323",
4
+ "version": "0.0.0-dev-1325",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {