@opencode/schema 0.0.0-dev-1302 → 0.0.0-dev-1303
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/automation.d.ts +383 -0
- package/dist/automation.js +150 -0
- package/dist/config/experimental.d.ts +2 -1
- package/dist/config/experimental.js +3 -0
- package/dist/config/flag.d.ts +5 -1
- package/dist/config/flag.js +5 -1
- package/package.json +1 -1
- package/dist/schedule.d.ts +0 -462
- package/dist/schedule.js +0 -206
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
export * as Automation from "./automation.js";
|
|
2
|
+
import { Option, Schema } from "effect";
|
|
3
|
+
import { SessionID } from "./session-id.js";
|
|
4
|
+
export declare const ID: Schema.brand<Schema.String, "Automation.ID"> & {
|
|
5
|
+
create: () => string & import("effect/Brand").Brand<"Automation.ID">;
|
|
6
|
+
};
|
|
7
|
+
export type ID = typeof ID.Type;
|
|
8
|
+
/** Milliseconds in a duration string, or `None` when it is not one. */
|
|
9
|
+
export declare const durationMillis: (value: string) => Option.Option<number>;
|
|
10
|
+
/** A duration such as "90 seconds", "5 minutes" or "2 hours". The service validates it, since clients cannot run a custom check. */
|
|
11
|
+
export declare const DurationString: Schema.String;
|
|
12
|
+
/** Runs once: at an instant with an offset, a wall-clock time in `tz` such as "2026-10-27T09:00", or "in 10 minutes". */
|
|
13
|
+
export declare const At: Schema.Struct<{
|
|
14
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
15
|
+
readonly type: Schema.tag<"at">;
|
|
16
|
+
readonly at: Schema.String;
|
|
17
|
+
}>;
|
|
18
|
+
export interface At extends Schema.Schema.Type<typeof At> {
|
|
19
|
+
}
|
|
20
|
+
export declare const Every: Schema.Struct<{
|
|
21
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
22
|
+
readonly type: Schema.tag<"every">;
|
|
23
|
+
readonly every: Schema.String;
|
|
24
|
+
}>;
|
|
25
|
+
export interface Every extends Schema.Schema.Type<typeof Every> {
|
|
26
|
+
}
|
|
27
|
+
export declare const Cron: Schema.Struct<{
|
|
28
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
29
|
+
readonly type: Schema.tag<"cron">;
|
|
30
|
+
readonly cron: Schema.String;
|
|
31
|
+
}>;
|
|
32
|
+
export interface Cron extends Schema.Schema.Type<typeof Cron> {
|
|
33
|
+
}
|
|
34
|
+
export declare const Event: Schema.Struct<{
|
|
35
|
+
readonly type: Schema.tag<"event">;
|
|
36
|
+
readonly server: Schema.NonEmptyString;
|
|
37
|
+
readonly event: Schema.NonEmptyString;
|
|
38
|
+
readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
|
|
39
|
+
}>;
|
|
40
|
+
export interface Event extends Schema.Schema.Type<typeof Event> {
|
|
41
|
+
}
|
|
42
|
+
export declare const Trigger: Schema.Union<readonly [Schema.Struct<{
|
|
43
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
44
|
+
readonly type: Schema.tag<"at">;
|
|
45
|
+
readonly at: Schema.String;
|
|
46
|
+
}>, Schema.Struct<{
|
|
47
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
48
|
+
readonly type: Schema.tag<"every">;
|
|
49
|
+
readonly every: Schema.String;
|
|
50
|
+
}>, Schema.Struct<{
|
|
51
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
52
|
+
readonly type: Schema.tag<"cron">;
|
|
53
|
+
readonly cron: Schema.String;
|
|
54
|
+
}>, Schema.Struct<{
|
|
55
|
+
readonly type: Schema.tag<"event">;
|
|
56
|
+
readonly server: Schema.NonEmptyString;
|
|
57
|
+
readonly event: Schema.NonEmptyString;
|
|
58
|
+
readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
|
|
59
|
+
}>]>;
|
|
60
|
+
export type Trigger = typeof Trigger.Type;
|
|
61
|
+
/** Where a prompt action goes: an existing Session, or a new child of the creating Session with an agent on every run. */
|
|
62
|
+
export declare const Target: Schema.Union<readonly [Schema.Struct<{
|
|
63
|
+
readonly session: Schema.brand<Schema.String, "SessionID"> & {
|
|
64
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
65
|
+
};
|
|
66
|
+
readonly subagent: Schema.optionalKey<Schema.Never>;
|
|
67
|
+
}>, Schema.Struct<{
|
|
68
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
69
|
+
readonly session: Schema.optionalKey<Schema.Never>;
|
|
70
|
+
}>]>;
|
|
71
|
+
export type Target = typeof Target.Type;
|
|
72
|
+
/** The child Session a `{ subagent }` run starts, derived from the run so a retry adopts it instead of starting another. */
|
|
73
|
+
export declare const runSessionID: (id: ID, run: number) => string & import("effect/Brand").Brand<"SessionID">;
|
|
74
|
+
/** Whether a Session is a `{ subagent }` run's child, which finishes without reporting to or waking its parent. */
|
|
75
|
+
export declare const isRunSession: (sessionID: SessionID) => boolean;
|
|
76
|
+
export declare const PromptAction: Schema.Struct<{
|
|
77
|
+
readonly type: Schema.tag<"prompt">;
|
|
78
|
+
readonly prompt: Schema.String;
|
|
79
|
+
readonly to: Schema.Union<readonly [Schema.Struct<{
|
|
80
|
+
readonly session: Schema.brand<Schema.String, "SessionID"> & {
|
|
81
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
82
|
+
};
|
|
83
|
+
readonly subagent: Schema.optionalKey<Schema.Never>;
|
|
84
|
+
}>, Schema.Struct<{
|
|
85
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
86
|
+
readonly session: Schema.optionalKey<Schema.Never>;
|
|
87
|
+
}>]>;
|
|
88
|
+
}>;
|
|
89
|
+
export interface PromptAction extends Schema.Schema.Type<typeof PromptAction> {
|
|
90
|
+
}
|
|
91
|
+
/** Code can hand off one prompt, but cannot choose a Session by id. Reject unknown keys rather than dropping a target. */
|
|
92
|
+
export declare const CodeResult: Schema.Struct<{
|
|
93
|
+
readonly state: 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>;
|
|
94
|
+
readonly done: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
95
|
+
readonly send: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
96
|
+
readonly prompt: Schema.String;
|
|
97
|
+
readonly to: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
98
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
99
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
100
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
101
|
+
}>>, never, never>;
|
|
102
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
103
|
+
readonly prompt: Schema.String;
|
|
104
|
+
readonly to: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
105
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
106
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
107
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
108
|
+
}>>, never, never>;
|
|
109
|
+
}>>, never, never>;
|
|
110
|
+
}>;
|
|
111
|
+
export interface CodeResult extends Schema.Schema.Type<typeof CodeResult> {
|
|
112
|
+
}
|
|
113
|
+
export declare const decodeCodeResult: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Result").Result<{
|
|
114
|
+
readonly state?: Schema.Json | undefined;
|
|
115
|
+
readonly done?: boolean | undefined;
|
|
116
|
+
readonly send?: {
|
|
117
|
+
readonly prompt: string;
|
|
118
|
+
readonly to?: {
|
|
119
|
+
readonly subagent: string & import("effect/Brand").Brand<"Agent.ID">;
|
|
120
|
+
} | undefined;
|
|
121
|
+
} | undefined;
|
|
122
|
+
} | null, Schema.SchemaError>;
|
|
123
|
+
/**
|
|
124
|
+
* Runs `code` in a confined Code Mode runtime with no model call and no `fetch`. Tools called statically as
|
|
125
|
+
* `tools.<path>(...)` are extracted from the AST and authorized at creation. The program receives
|
|
126
|
+
* `input = { state, now, runs, args, event? }` and returns nothing or a `CodeResult`.
|
|
127
|
+
*/
|
|
128
|
+
export declare const CodeAction: Schema.Struct<{
|
|
129
|
+
readonly type: Schema.tag<"code">;
|
|
130
|
+
readonly code: Schema.String;
|
|
131
|
+
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>;
|
|
132
|
+
}>;
|
|
133
|
+
export interface CodeAction extends Schema.Schema.Type<typeof CodeAction> {
|
|
134
|
+
}
|
|
135
|
+
export declare const Action: Schema.Union<readonly [Schema.Struct<{
|
|
136
|
+
readonly type: Schema.tag<"prompt">;
|
|
137
|
+
readonly prompt: Schema.String;
|
|
138
|
+
readonly to: Schema.Union<readonly [Schema.Struct<{
|
|
139
|
+
readonly session: Schema.brand<Schema.String, "SessionID"> & {
|
|
140
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
141
|
+
};
|
|
142
|
+
readonly subagent: Schema.optionalKey<Schema.Never>;
|
|
143
|
+
}>, Schema.Struct<{
|
|
144
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
145
|
+
readonly session: Schema.optionalKey<Schema.Never>;
|
|
146
|
+
}>]>;
|
|
147
|
+
}>, Schema.Struct<{
|
|
148
|
+
readonly type: Schema.tag<"code">;
|
|
149
|
+
readonly code: Schema.String;
|
|
150
|
+
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>;
|
|
151
|
+
}>]>;
|
|
152
|
+
export type Action = typeof Action.Type;
|
|
153
|
+
export declare const Status: Schema.Literals<readonly ["active", "paused", "done"]>;
|
|
154
|
+
export type Status = typeof Status.Type;
|
|
155
|
+
export declare const Outcome: Schema.Literals<readonly ["fired", "late", "skipped", "disabled", "failed", "expired"]>;
|
|
156
|
+
export type Outcome = typeof Outcome.Type;
|
|
157
|
+
export declare const Info: Schema.Struct<{
|
|
158
|
+
readonly id: Schema.brand<Schema.String, "Automation.ID"> & {
|
|
159
|
+
create: () => string & import("effect/Brand").Brand<"Automation.ID">;
|
|
160
|
+
};
|
|
161
|
+
readonly name: Schema.String;
|
|
162
|
+
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
163
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
164
|
+
};
|
|
165
|
+
/** The Session that created it, if any. Deleting that Session does not delete the automation. */
|
|
166
|
+
readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
|
|
167
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
168
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
|
|
169
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
170
|
+
}>, never, never>;
|
|
171
|
+
readonly directory: Schema.String;
|
|
172
|
+
readonly trigger: Schema.Union<readonly [Schema.Struct<{
|
|
173
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
174
|
+
readonly type: Schema.tag<"at">;
|
|
175
|
+
readonly at: Schema.String;
|
|
176
|
+
}>, Schema.Struct<{
|
|
177
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
178
|
+
readonly type: Schema.tag<"every">;
|
|
179
|
+
readonly every: Schema.String;
|
|
180
|
+
}>, Schema.Struct<{
|
|
181
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
182
|
+
readonly type: Schema.tag<"cron">;
|
|
183
|
+
readonly cron: Schema.String;
|
|
184
|
+
}>, Schema.Struct<{
|
|
185
|
+
readonly type: Schema.tag<"event">;
|
|
186
|
+
readonly server: Schema.NonEmptyString;
|
|
187
|
+
readonly event: Schema.NonEmptyString;
|
|
188
|
+
readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
|
|
189
|
+
}>]>;
|
|
190
|
+
readonly tz: Schema.String;
|
|
191
|
+
readonly action: Schema.Union<readonly [Schema.Struct<{
|
|
192
|
+
readonly type: Schema.tag<"prompt">;
|
|
193
|
+
readonly prompt: Schema.String;
|
|
194
|
+
readonly to: Schema.Union<readonly [Schema.Struct<{
|
|
195
|
+
readonly session: Schema.brand<Schema.String, "SessionID"> & {
|
|
196
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
197
|
+
};
|
|
198
|
+
readonly subagent: Schema.optionalKey<Schema.Never>;
|
|
199
|
+
}>, Schema.Struct<{
|
|
200
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
201
|
+
readonly session: Schema.optionalKey<Schema.Never>;
|
|
202
|
+
}>]>;
|
|
203
|
+
}>, Schema.Struct<{
|
|
204
|
+
readonly type: Schema.tag<"code">;
|
|
205
|
+
readonly code: Schema.String;
|
|
206
|
+
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>;
|
|
207
|
+
}>]>;
|
|
208
|
+
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
|
+
readonly status: Schema.Literals<readonly ["active", "paused", "done"]>;
|
|
210
|
+
readonly nextDueAt: 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>;
|
|
211
|
+
readonly runCount: Schema.Int;
|
|
212
|
+
readonly lastRunAt: 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>;
|
|
213
|
+
readonly lastOutcome: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["fired", "late", "skipped", "disabled", "failed", "expired"]>>>, Schema.optionalKey<Schema.Literals<readonly ["fired", "late", "skipped", "disabled", "failed", "expired"]>>, never, never>;
|
|
214
|
+
readonly lastOutput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
215
|
+
readonly state: 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
|
+
readonly time: Schema.Struct<{
|
|
217
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
218
|
+
readonly updated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
219
|
+
}>;
|
|
220
|
+
}>;
|
|
221
|
+
export interface Info extends Schema.Schema.Type<typeof Info> {
|
|
222
|
+
}
|
|
223
|
+
export declare const PromptActionInput: Schema.Struct<{
|
|
224
|
+
readonly type: Schema.tag<"prompt">;
|
|
225
|
+
readonly prompt: Schema.String;
|
|
226
|
+
readonly to: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
227
|
+
readonly session: Schema.brand<Schema.String, "SessionID"> & {
|
|
228
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
229
|
+
};
|
|
230
|
+
readonly subagent: Schema.optionalKey<Schema.Never>;
|
|
231
|
+
}>, Schema.Struct<{
|
|
232
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
233
|
+
readonly session: Schema.optionalKey<Schema.Never>;
|
|
234
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
235
|
+
readonly session: Schema.brand<Schema.String, "SessionID"> & {
|
|
236
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
237
|
+
};
|
|
238
|
+
readonly subagent: Schema.optionalKey<Schema.Never>;
|
|
239
|
+
}>, Schema.Struct<{
|
|
240
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
241
|
+
readonly session: Schema.optionalKey<Schema.Never>;
|
|
242
|
+
}>]>>, never, never>;
|
|
243
|
+
}>;
|
|
244
|
+
export interface PromptActionInput extends Schema.Schema.Type<typeof PromptActionInput> {
|
|
245
|
+
}
|
|
246
|
+
export declare const CodeActionInput: Schema.Struct<{
|
|
247
|
+
readonly type: Schema.tag<"code">;
|
|
248
|
+
readonly code: Schema.String;
|
|
249
|
+
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>;
|
|
250
|
+
}>;
|
|
251
|
+
export interface CodeActionInput extends Schema.Schema.Type<typeof CodeActionInput> {
|
|
252
|
+
}
|
|
253
|
+
export declare const ActionInput: Schema.Union<readonly [Schema.Struct<{
|
|
254
|
+
readonly type: Schema.tag<"prompt">;
|
|
255
|
+
readonly prompt: Schema.String;
|
|
256
|
+
readonly to: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
257
|
+
readonly session: Schema.brand<Schema.String, "SessionID"> & {
|
|
258
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
259
|
+
};
|
|
260
|
+
readonly subagent: Schema.optionalKey<Schema.Never>;
|
|
261
|
+
}>, Schema.Struct<{
|
|
262
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
263
|
+
readonly session: Schema.optionalKey<Schema.Never>;
|
|
264
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
265
|
+
readonly session: Schema.brand<Schema.String, "SessionID"> & {
|
|
266
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
267
|
+
};
|
|
268
|
+
readonly subagent: Schema.optionalKey<Schema.Never>;
|
|
269
|
+
}>, Schema.Struct<{
|
|
270
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
271
|
+
readonly session: Schema.optionalKey<Schema.Never>;
|
|
272
|
+
}>]>>, never, never>;
|
|
273
|
+
}>, Schema.Struct<{
|
|
274
|
+
readonly type: Schema.tag<"code">;
|
|
275
|
+
readonly code: Schema.String;
|
|
276
|
+
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>;
|
|
277
|
+
}>]>;
|
|
278
|
+
export type ActionInput = typeof ActionInput.Type;
|
|
279
|
+
/** An automation as callers describe it: a name, when it runs, what it does, and when it stops. */
|
|
280
|
+
export declare const Request: Schema.Struct<{
|
|
281
|
+
readonly name: Schema.String;
|
|
282
|
+
readonly trigger: Schema.Union<readonly [Schema.Struct<{
|
|
283
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
284
|
+
readonly type: Schema.tag<"at">;
|
|
285
|
+
readonly at: Schema.String;
|
|
286
|
+
}>, Schema.Struct<{
|
|
287
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
288
|
+
readonly type: Schema.tag<"every">;
|
|
289
|
+
readonly every: Schema.String;
|
|
290
|
+
}>, Schema.Struct<{
|
|
291
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
292
|
+
readonly type: Schema.tag<"cron">;
|
|
293
|
+
readonly cron: Schema.String;
|
|
294
|
+
}>, Schema.Struct<{
|
|
295
|
+
readonly type: Schema.tag<"event">;
|
|
296
|
+
readonly server: Schema.NonEmptyString;
|
|
297
|
+
readonly event: Schema.NonEmptyString;
|
|
298
|
+
readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
|
|
299
|
+
}>]>;
|
|
300
|
+
readonly action: Schema.Union<readonly [Schema.Struct<{
|
|
301
|
+
readonly type: Schema.tag<"prompt">;
|
|
302
|
+
readonly prompt: Schema.String;
|
|
303
|
+
readonly to: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
304
|
+
readonly session: Schema.brand<Schema.String, "SessionID"> & {
|
|
305
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
306
|
+
};
|
|
307
|
+
readonly subagent: Schema.optionalKey<Schema.Never>;
|
|
308
|
+
}>, Schema.Struct<{
|
|
309
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
310
|
+
readonly session: Schema.optionalKey<Schema.Never>;
|
|
311
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
312
|
+
readonly session: Schema.brand<Schema.String, "SessionID"> & {
|
|
313
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
314
|
+
};
|
|
315
|
+
readonly subagent: Schema.optionalKey<Schema.Never>;
|
|
316
|
+
}>, Schema.Struct<{
|
|
317
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
318
|
+
readonly session: Schema.optionalKey<Schema.Never>;
|
|
319
|
+
}>]>>, never, never>;
|
|
320
|
+
}>, Schema.Struct<{
|
|
321
|
+
readonly type: Schema.tag<"code">;
|
|
322
|
+
readonly code: Schema.String;
|
|
323
|
+
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>;
|
|
324
|
+
}>]>;
|
|
325
|
+
readonly expires: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
326
|
+
}>;
|
|
327
|
+
export interface Request extends Schema.Schema.Type<typeof Request> {
|
|
328
|
+
}
|
|
329
|
+
export declare const CreateInput: Schema.Struct<{
|
|
330
|
+
readonly name: Schema.String;
|
|
331
|
+
readonly trigger: Schema.Union<readonly [Schema.Struct<{
|
|
332
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
333
|
+
readonly type: Schema.tag<"at">;
|
|
334
|
+
readonly at: Schema.String;
|
|
335
|
+
}>, Schema.Struct<{
|
|
336
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
337
|
+
readonly type: Schema.tag<"every">;
|
|
338
|
+
readonly every: Schema.String;
|
|
339
|
+
}>, Schema.Struct<{
|
|
340
|
+
readonly tz: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
341
|
+
readonly type: Schema.tag<"cron">;
|
|
342
|
+
readonly cron: Schema.String;
|
|
343
|
+
}>, Schema.Struct<{
|
|
344
|
+
readonly type: Schema.tag<"event">;
|
|
345
|
+
readonly server: Schema.NonEmptyString;
|
|
346
|
+
readonly event: Schema.NonEmptyString;
|
|
347
|
+
readonly args: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
|
|
348
|
+
}>]>;
|
|
349
|
+
readonly action: Schema.Union<readonly [Schema.Struct<{
|
|
350
|
+
readonly type: Schema.tag<"prompt">;
|
|
351
|
+
readonly prompt: Schema.String;
|
|
352
|
+
readonly to: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
353
|
+
readonly session: Schema.brand<Schema.String, "SessionID"> & {
|
|
354
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
355
|
+
};
|
|
356
|
+
readonly subagent: Schema.optionalKey<Schema.Never>;
|
|
357
|
+
}>, Schema.Struct<{
|
|
358
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
359
|
+
readonly session: Schema.optionalKey<Schema.Never>;
|
|
360
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
361
|
+
readonly session: Schema.brand<Schema.String, "SessionID"> & {
|
|
362
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
363
|
+
};
|
|
364
|
+
readonly subagent: Schema.optionalKey<Schema.Never>;
|
|
365
|
+
}>, Schema.Struct<{
|
|
366
|
+
readonly subagent: Schema.brand<Schema.String, "Agent.ID">;
|
|
367
|
+
readonly session: Schema.optionalKey<Schema.Never>;
|
|
368
|
+
}>]>>, never, never>;
|
|
369
|
+
}>, Schema.Struct<{
|
|
370
|
+
readonly type: Schema.tag<"code">;
|
|
371
|
+
readonly code: Schema.String;
|
|
372
|
+
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>;
|
|
373
|
+
}>]>;
|
|
374
|
+
readonly expires: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
375
|
+
readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
|
|
376
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
377
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
|
|
378
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
379
|
+
}>, never, never>;
|
|
380
|
+
readonly directory: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
381
|
+
}>;
|
|
382
|
+
export interface CreateInput extends Schema.Schema.Type<typeof CreateInput> {
|
|
383
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
export * as Automation from "./automation.js";
|
|
2
|
+
import { Duration, Option, Schema } from "effect";
|
|
3
|
+
import { Agent } from "./agent.js";
|
|
4
|
+
import { ascending } from "./identifier.js";
|
|
5
|
+
import { ProjectID } from "./project-id.js";
|
|
6
|
+
import { DateTimeUtcFromMillis, NonNegativeInt, optional, statics } from "./schema.js";
|
|
7
|
+
import { SessionID } from "./session-id.js";
|
|
8
|
+
export const ID = Schema.String.check(Schema.isStartingWith("aut_")).pipe(Schema.brand("Automation.ID"), Schema.annotate({ identifier: "Automation.ID" }), statics((schema) => ({
|
|
9
|
+
create: () => schema.make("aut_" + ascending()),
|
|
10
|
+
})));
|
|
11
|
+
const decodeDuration = Schema.decodeUnknownOption(Schema.DurationFromString);
|
|
12
|
+
/** Milliseconds in a duration string, or `None` when it is not one. */
|
|
13
|
+
export const durationMillis = (value) => decodeDuration(value).pipe(Option.map(Duration.toMillis));
|
|
14
|
+
/** A duration such as "90 seconds", "5 minutes" or "2 hours". The service validates it, since clients cannot run a custom check. */
|
|
15
|
+
export const DurationString = Schema.String.annotate({
|
|
16
|
+
identifier: "Automation.Duration",
|
|
17
|
+
description: 'A duration such as "90 seconds", "5 minutes" or "2 hours".',
|
|
18
|
+
});
|
|
19
|
+
const zone = {
|
|
20
|
+
tz: Schema.String.pipe(optional).annotate({
|
|
21
|
+
description: "IANA time zone. Defaults to the configured timezone, then the server's local zone.",
|
|
22
|
+
}),
|
|
23
|
+
};
|
|
24
|
+
/** Runs once: at an instant with an offset, a wall-clock time in `tz` such as "2026-10-27T09:00", or "in 10 minutes". */
|
|
25
|
+
export const At = Schema.Struct({
|
|
26
|
+
type: Schema.tag("at"),
|
|
27
|
+
at: Schema.String.annotate({
|
|
28
|
+
description: 'An instant with an offset, a wall-clock time in tz such as "2026-10-27T09:00", or "in 10 minutes".',
|
|
29
|
+
}),
|
|
30
|
+
...zone,
|
|
31
|
+
}).annotate({ identifier: "Automation.Trigger.At" });
|
|
32
|
+
export const Every = Schema.Struct({ type: Schema.tag("every"), every: DurationString, ...zone }).annotate({
|
|
33
|
+
identifier: "Automation.Trigger.Every",
|
|
34
|
+
});
|
|
35
|
+
export const Cron = Schema.Struct({ type: Schema.tag("cron"), cron: Schema.String, ...zone }).annotate({
|
|
36
|
+
identifier: "Automation.Trigger.Cron",
|
|
37
|
+
});
|
|
38
|
+
export const Event = Schema.Struct({
|
|
39
|
+
type: Schema.tag("event"),
|
|
40
|
+
server: Schema.NonEmptyString,
|
|
41
|
+
event: Schema.NonEmptyString,
|
|
42
|
+
args: Schema.Record(Schema.String, Schema.Json).pipe(optional),
|
|
43
|
+
}).annotate({ identifier: "Automation.Trigger.Event" });
|
|
44
|
+
export const Trigger = Schema.Union([At, Every, Cron, Event]).pipe(Schema.toTaggedUnion("type"), Schema.annotate({ identifier: "Automation.Trigger" }));
|
|
45
|
+
/** Declares a variant field absent, so `{ session, subagent }` fails instead of silently dropping one. */
|
|
46
|
+
const absent = Schema.optionalKey(Schema.Never);
|
|
47
|
+
/** Where a prompt action goes: an existing Session, or a new child of the creating Session with an agent on every run. */
|
|
48
|
+
export const Target = Schema.Union([
|
|
49
|
+
Schema.Struct({ session: SessionID, subagent: absent }),
|
|
50
|
+
Schema.Struct({ subagent: Agent.ID, session: absent }),
|
|
51
|
+
]).annotate({ identifier: "Automation.Target" });
|
|
52
|
+
/** The child Session a `{ subagent }` run starts, derived from the run so a retry adopts it instead of starting another. */
|
|
53
|
+
export const runSessionID = (id, run) => SessionID.make(`ses_${id}_${run}`);
|
|
54
|
+
/** Whether a Session is a `{ subagent }` run's child, which finishes without reporting to or waking its parent. */
|
|
55
|
+
export const isRunSession = (sessionID) => sessionID.startsWith("ses_aut_");
|
|
56
|
+
export const PromptAction = Schema.Struct({ type: Schema.tag("prompt"), prompt: Schema.String, to: Target }).annotate({
|
|
57
|
+
identifier: "Automation.Action.Prompt",
|
|
58
|
+
});
|
|
59
|
+
/** Code can hand off one prompt, but cannot choose a Session by id. Reject unknown keys rather than dropping a target. */
|
|
60
|
+
export const CodeResult = Schema.Struct({
|
|
61
|
+
state: Schema.Json.pipe(optional),
|
|
62
|
+
done: Schema.Boolean.pipe(optional),
|
|
63
|
+
send: Schema.Struct({
|
|
64
|
+
prompt: Schema.String.check(Schema.isPattern(/\S/)),
|
|
65
|
+
to: Schema.Struct({ subagent: Agent.ID.check(Schema.isPattern(/\S/)) }).pipe(optional),
|
|
66
|
+
}).pipe(optional),
|
|
67
|
+
}).annotate({ identifier: "Automation.CodeResult" });
|
|
68
|
+
// Code Mode represents a program that returns nothing as JSON null.
|
|
69
|
+
export const decodeCodeResult = Schema.decodeUnknownResult(Schema.NullOr(CodeResult), { onExcessProperty: "error" });
|
|
70
|
+
/**
|
|
71
|
+
* Runs `code` in a confined Code Mode runtime with no model call and no `fetch`. Tools called statically as
|
|
72
|
+
* `tools.<path>(...)` are extracted from the AST and authorized at creation. The program receives
|
|
73
|
+
* `input = { state, now, runs, args, event? }` and returns nothing or a `CodeResult`.
|
|
74
|
+
*/
|
|
75
|
+
export const CodeAction = Schema.Struct({
|
|
76
|
+
type: Schema.tag("code"),
|
|
77
|
+
code: Schema.String,
|
|
78
|
+
args: Schema.Json.pipe(optional),
|
|
79
|
+
}).annotate({ identifier: "Automation.Action.Code" });
|
|
80
|
+
export const Action = Schema.Union([PromptAction, CodeAction]).pipe(Schema.toTaggedUnion("type"), Schema.annotate({ identifier: "Automation.Action" }));
|
|
81
|
+
export const Status = Schema.Literals(["active", "paused", "done"]).annotate({ identifier: "Automation.Status" });
|
|
82
|
+
export const Outcome = Schema.Literals(["fired", "late", "skipped", "disabled", "failed", "expired"]).annotate({
|
|
83
|
+
identifier: "Automation.Outcome",
|
|
84
|
+
});
|
|
85
|
+
export const Info = Schema.Struct({
|
|
86
|
+
id: ID,
|
|
87
|
+
name: Schema.String,
|
|
88
|
+
projectID: ProjectID,
|
|
89
|
+
/** The Session that created it, if any. Deleting that Session does not delete the automation. */
|
|
90
|
+
sessionID: SessionID.pipe(optional),
|
|
91
|
+
directory: Schema.String,
|
|
92
|
+
trigger: Trigger,
|
|
93
|
+
tz: Schema.String,
|
|
94
|
+
action: Action,
|
|
95
|
+
expires: DateTimeUtcFromMillis.pipe(optional),
|
|
96
|
+
status: Status,
|
|
97
|
+
nextDueAt: DateTimeUtcFromMillis.pipe(optional),
|
|
98
|
+
runCount: NonNegativeInt,
|
|
99
|
+
lastRunAt: DateTimeUtcFromMillis.pipe(optional),
|
|
100
|
+
lastOutcome: Outcome.pipe(optional),
|
|
101
|
+
lastOutput: Schema.String.pipe(optional),
|
|
102
|
+
state: Schema.Json.pipe(optional),
|
|
103
|
+
time: Schema.Struct({ created: DateTimeUtcFromMillis, updated: DateTimeUtcFromMillis }),
|
|
104
|
+
}).annotate({ identifier: "Automation.Info" });
|
|
105
|
+
export const PromptActionInput = Schema.Struct({
|
|
106
|
+
type: Schema.tag("prompt"),
|
|
107
|
+
prompt: Schema.String.check(Schema.isMinLength(1)).annotate({
|
|
108
|
+
description: "The message the target Session receives, with enough context to act on it without this conversation.",
|
|
109
|
+
}),
|
|
110
|
+
to: Target.pipe(optional).annotate({
|
|
111
|
+
description: 'Where the prompt goes: { session: "ses_..." }, or { subagent: "<agent>" } to start a new child of the creating Session with that agent each run. Defaults to the creating Session.',
|
|
112
|
+
}),
|
|
113
|
+
}).annotate({ identifier: "Automation.PromptActionInput" });
|
|
114
|
+
export const CodeActionInput = Schema.Struct({
|
|
115
|
+
type: Schema.tag("code"),
|
|
116
|
+
code: Schema.String.check(Schema.isMinLength(1)).annotate({
|
|
117
|
+
description: [
|
|
118
|
+
"Code Mode JavaScript run on each trigger with no model (no fetch; 30s, 20 tool calls, 32 KB output cap).",
|
|
119
|
+
'Call tools statically as tools.<ns>.<tool>(...) or tools["ns-name"].tool(...); each is authorized once at creation to run unattended.',
|
|
120
|
+
"Receives input = { state, now, runs, args } (also globals): state starts null, now is epoch ms, runs counts earlier runs.",
|
|
121
|
+
"Event triggers also receive input.event = { id, timestamp, data }; data follows the event type's payloadSchema.",
|
|
122
|
+
"Return nothing, or { state?, done?, send? }. JSON state is kept for the next run; done: true stops. lastOutput shows the delivery target and any logs.",
|
|
123
|
+
"Return at most one send per run. { send: { prompt } } steers the creating session; { send: { prompt, to: { subagent } } } starts a permitted child that does not report back. No session IDs. Omit send to stay quiet. A rejected send commits neither state nor done.",
|
|
124
|
+
'Example code string: if (runs < 2) return; return { done: true, send: { prompt: "Three checks elapsed. Review the build." } }',
|
|
125
|
+
].join(" "),
|
|
126
|
+
}),
|
|
127
|
+
args: Schema.Json.pipe(optional).annotate({ description: "JSON passed to every run as input.args." }),
|
|
128
|
+
}).annotate({ identifier: "Automation.CodeActionInput" });
|
|
129
|
+
export const ActionInput = Schema.Union([PromptActionInput, CodeActionInput]).pipe(Schema.toTaggedUnion("type"), Schema.annotate({ identifier: "Automation.ActionInput" }));
|
|
130
|
+
/** An automation as callers describe it: a name, when it runs, what it does, and when it stops. */
|
|
131
|
+
export const Request = Schema.Struct({
|
|
132
|
+
name: Schema.String.check(Schema.isMinLength(1)).annotate({ description: "A short label shown in lists." }),
|
|
133
|
+
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).',
|
|
135
|
+
}),
|
|
136
|
+
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.',
|
|
138
|
+
}),
|
|
139
|
+
expires: Schema.String.pipe(optional).annotate({
|
|
140
|
+
description: 'When it stops for good: an instant, a wall-clock time in tz, or "in 8 hours".',
|
|
141
|
+
}),
|
|
142
|
+
}).annotate({ identifier: "Automation.Request" });
|
|
143
|
+
export const CreateInput = Schema.Struct({
|
|
144
|
+
// A creating Session supplies the directory, default recipient, and authority for code or child actions.
|
|
145
|
+
sessionID: SessionID.pipe(optional),
|
|
146
|
+
directory: Schema.String.annotate({
|
|
147
|
+
description: "Where it runs when there is no Session. Defaults to the server user's home folder.",
|
|
148
|
+
}).pipe(optional),
|
|
149
|
+
...Request.fields,
|
|
150
|
+
}).annotate({ identifier: "Automation.CreateInput" });
|
|
@@ -4,6 +4,7 @@ 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
8
|
readonly part_rows: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
8
9
|
readonly image_generate: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
|
|
9
10
|
readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.Struct<{
|
|
@@ -62,11 +63,11 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
|
62
63
|
readonly effect: Schema.Literals<readonly ["allow", "deny"]>;
|
|
63
64
|
}>, never, never>>>, never, never>;
|
|
64
65
|
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>;
|
|
65
67
|
readonly console_watches: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
66
68
|
readonly full_codemode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
67
69
|
readonly mcp_events: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
68
70
|
readonly media_blob: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
69
|
-
readonly schedules: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
70
71
|
readonly todo: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
71
72
|
readonly video_generate: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
72
73
|
}>, {}>;
|
|
@@ -19,6 +19,9 @@ export class Info extends Schema.Class("ConfigExperimental.Info")({
|
|
|
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.",
|
|
24
|
+
}),
|
|
22
25
|
part_rows: Schema.Boolean.pipe(optional).annotate({
|
|
23
26
|
description: "Write each assistant part as its own session_part row instead of rewriting the whole message on every event. Defaults to false.",
|
|
24
27
|
}),
|
package/dist/config/flag.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const wildcard = "all";
|
|
|
8
8
|
export declare const registry: {
|
|
9
9
|
readonly todo: "Enable the experimental todowrite tool.";
|
|
10
10
|
readonly media_blob: "Store new session media once in a deduplicated blob table instead of inline in every message row.";
|
|
11
|
-
readonly
|
|
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
13
|
readonly video_generate: "Enable the experimental video generation API.";
|
|
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.";
|
|
@@ -17,3 +17,7 @@ export declare const registry: {
|
|
|
17
17
|
};
|
|
18
18
|
export type Key = keyof typeof registry;
|
|
19
19
|
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
|
+
};
|
package/dist/config/flag.js
CHANGED
|
@@ -8,7 +8,7 @@ export const wildcard = "all";
|
|
|
8
8
|
export const registry = {
|
|
9
9
|
todo: "Enable the experimental todowrite tool.",
|
|
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
13
|
video_generate: "Enable the experimental video generation API.",
|
|
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.",
|
|
@@ -16,3 +16,7 @@ export const registry = {
|
|
|
16
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
17
|
};
|
|
18
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",
|
|
22
|
+
};
|