@opencode/schema 0.0.0-dev-1314 → 0.0.0-dev-1317

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.
@@ -4,7 +4,6 @@ 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
7
  readonly video_generate: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
9
8
  readonly model: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.Struct<{
10
9
  readonly providerID: Schema.brand<Schema.String, "Provider.ID">;
@@ -106,6 +105,7 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
106
105
  readonly full_codemode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
107
106
  readonly mcp_events: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
108
107
  readonly media_blob: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
108
+ readonly todo: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
109
109
  }>, {}>;
110
110
  export declare class Info extends Info_base {
111
111
  }
@@ -12,13 +12,12 @@ 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: "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.",
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
- 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.`,
17
+ ...Record.map(ConfigFlag.registry, (description, key) => Schema.Boolean.pipe(optional).annotate({
18
+ description: ConfigFlag.optInOnly.has(key)
19
+ ? description
20
+ : `${description} Defaults to on in local and dev builds and off in releases.`,
22
21
  })),
23
22
  // The flag also takes settings; an object turns it on.
24
23
  video_generate: Schema.Union([
@@ -1,12 +1,12 @@
1
1
  export * as ConfigFlag from "./flag.js";
2
- /** The `OPENCODE_FLAGS` entry that turns every flag on, as in `all,-media_blob`. It is not a flag key. */
2
+ /** The `OPENCODE_FLAGS` entry that enables all flags except opt-in-only flags, as in `all,-media_blob`. */
3
3
  export declare const wildcard = "all";
4
4
  /**
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>")`.
5
+ * Flags default to on in local and dev builds and off in releases, except for `optInOnly` flags, which must be
6
+ * named explicitly in `experimental.<key>` or `OPENCODE_FLAGS`. Read a flag with Core's `Flag.enabled("<key>")`.
8
7
  */
9
8
  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.";
@@ -16,6 +16,7 @@ export declare const registry: {
16
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>;
19
20
  /** Earlier names of a flag, still read from `experimental.<name>` and `OPENCODE_FLAGS` when the new key is unset. */
20
21
  export declare const aliases: {
21
22
  readonly schedules: "automations";
@@ -1,12 +1,12 @@
1
1
  export * as ConfigFlag from "./flag.js";
2
- /** The `OPENCODE_FLAGS` entry that turns every flag on, as in `all,-media_blob`. It is not a flag key. */
2
+ /** The `OPENCODE_FLAGS` entry that enables all flags except opt-in-only flags, as in `all,-media_blob`. */
3
3
  export const wildcard = "all";
4
4
  /**
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>")`.
5
+ * Flags default to on in local and dev builds and off in releases, except for `optInOnly` flags, which must be
6
+ * named explicitly in `experimental.<key>` or `OPENCODE_FLAGS`. Read a flag with Core's `Flag.enabled("<key>")`.
8
7
  */
9
8
  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.",
@@ -15,6 +15,7 @@ export const registry = {
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
16
  full_codemode: "Enable the full Code Mode work in progress.",
17
17
  };
18
+ export const optInOnly = new Set(["todo"]);
18
19
  /** Earlier names of a flag, still read from `experimental.<name>` and `OPENCODE_FLAGS` when the new key is unset. */
19
20
  export const aliases = {
20
21
  schedules: "automations",
@@ -5538,6 +5538,182 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
5538
5538
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
5539
5539
  };
5540
5540
  }>;
5541
+ }, Schema.Struct<{
5542
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
5543
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
5544
+ };
5545
+ readonly created: Schema.Finite;
5546
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
5547
+ readonly type: Schema.Literal<"experimental.job.updated">;
5548
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
5549
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5550
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
5551
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5552
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5553
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
5554
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5555
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5556
+ }>, never, never>;
5557
+ }>>>, Schema.optionalKey<Schema.Struct<{
5558
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
5559
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
5560
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5561
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5562
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
5563
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
5564
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
5565
+ }>, never, never>;
5566
+ }>>, never, never>;
5567
+ readonly data: Schema.Struct<{
5568
+ readonly info: Schema.Union<readonly [Schema.Struct<{
5569
+ readonly id: Schema.String;
5570
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5571
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5572
+ };
5573
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
5574
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
5575
+ readonly time: Schema.Struct<{
5576
+ readonly started: Schema.Finite;
5577
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
5578
+ }>;
5579
+ readonly kind: Schema.tag<"shell">;
5580
+ readonly shellID: Schema.String;
5581
+ readonly command: Schema.String;
5582
+ }>, Schema.Struct<{
5583
+ readonly id: Schema.String;
5584
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5585
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5586
+ };
5587
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
5588
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
5589
+ readonly time: Schema.Struct<{
5590
+ readonly started: Schema.Finite;
5591
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
5592
+ }>;
5593
+ readonly kind: Schema.tag<"subagent">;
5594
+ readonly childSessionID: Schema.brand<Schema.String, "SessionID"> & {
5595
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5596
+ };
5597
+ readonly agent: Schema.String;
5598
+ readonly description: Schema.String;
5599
+ }>, Schema.Struct<{
5600
+ readonly id: Schema.String;
5601
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5602
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5603
+ };
5604
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
5605
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
5606
+ readonly time: Schema.Struct<{
5607
+ readonly started: Schema.Finite;
5608
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
5609
+ }>;
5610
+ readonly kind: Schema.tag<"image">;
5611
+ readonly path: Schema.String;
5612
+ readonly model: Schema.String;
5613
+ }>, Schema.Struct<{
5614
+ readonly id: Schema.String;
5615
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5616
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5617
+ };
5618
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
5619
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
5620
+ readonly time: Schema.Struct<{
5621
+ readonly started: Schema.Finite;
5622
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
5623
+ }>;
5624
+ readonly kind: Schema.tag<"video">;
5625
+ readonly path: Schema.String;
5626
+ }>, Schema.Struct<{
5627
+ readonly id: Schema.String;
5628
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5629
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5630
+ };
5631
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
5632
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
5633
+ readonly time: Schema.Struct<{
5634
+ readonly started: Schema.Finite;
5635
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
5636
+ }>;
5637
+ readonly kind: Schema.tag<"codemode">;
5638
+ }>]>;
5639
+ }>;
5640
+ }> & {
5641
+ type: "experimental.job.updated";
5642
+ durability: "ephemeral";
5643
+ durable: undefined;
5644
+ data: Schema.Struct<{
5645
+ readonly info: Schema.Union<readonly [Schema.Struct<{
5646
+ readonly id: Schema.String;
5647
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5648
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5649
+ };
5650
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
5651
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
5652
+ readonly time: Schema.Struct<{
5653
+ readonly started: Schema.Finite;
5654
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
5655
+ }>;
5656
+ readonly kind: Schema.tag<"shell">;
5657
+ readonly shellID: Schema.String;
5658
+ readonly command: Schema.String;
5659
+ }>, Schema.Struct<{
5660
+ readonly id: Schema.String;
5661
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5662
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5663
+ };
5664
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
5665
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
5666
+ readonly time: Schema.Struct<{
5667
+ readonly started: Schema.Finite;
5668
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
5669
+ }>;
5670
+ readonly kind: Schema.tag<"subagent">;
5671
+ readonly childSessionID: Schema.brand<Schema.String, "SessionID"> & {
5672
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5673
+ };
5674
+ readonly agent: Schema.String;
5675
+ readonly description: Schema.String;
5676
+ }>, Schema.Struct<{
5677
+ readonly id: Schema.String;
5678
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5679
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5680
+ };
5681
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
5682
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
5683
+ readonly time: Schema.Struct<{
5684
+ readonly started: Schema.Finite;
5685
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
5686
+ }>;
5687
+ readonly kind: Schema.tag<"image">;
5688
+ readonly path: Schema.String;
5689
+ readonly model: Schema.String;
5690
+ }>, Schema.Struct<{
5691
+ readonly id: Schema.String;
5692
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5693
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5694
+ };
5695
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
5696
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
5697
+ readonly time: Schema.Struct<{
5698
+ readonly started: Schema.Finite;
5699
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
5700
+ }>;
5701
+ readonly kind: Schema.tag<"video">;
5702
+ readonly path: Schema.String;
5703
+ }>, Schema.Struct<{
5704
+ readonly id: Schema.String;
5705
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
5706
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
5707
+ };
5708
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
5709
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
5710
+ readonly time: Schema.Struct<{
5711
+ readonly started: Schema.Finite;
5712
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
5713
+ }>;
5714
+ readonly kind: Schema.tag<"codemode">;
5715
+ }>]>;
5716
+ }>;
5541
5717
  }, Schema.Struct<{
5542
5718
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
5543
5719
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -12100,6 +12276,182 @@ export declare const Definitions: readonly [Schema.Struct<{
12100
12276
  ascending: (id?: string) => string & import("effect/Brand").Brand<"Shell.ID">;
12101
12277
  };
12102
12278
  }>;
12279
+ }, Schema.Struct<{
12280
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
12281
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
12282
+ };
12283
+ readonly created: Schema.Finite;
12284
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
12285
+ readonly type: Schema.Literal<"experimental.job.updated">;
12286
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
12287
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
12288
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
12289
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
12290
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
12291
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
12292
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
12293
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
12294
+ }>, never, never>;
12295
+ }>>>, Schema.optionalKey<Schema.Struct<{
12296
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
12297
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
12298
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
12299
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
12300
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
12301
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
12302
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
12303
+ }>, never, never>;
12304
+ }>>, never, never>;
12305
+ readonly data: Schema.Struct<{
12306
+ readonly info: Schema.Union<readonly [Schema.Struct<{
12307
+ readonly id: Schema.String;
12308
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
12309
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
12310
+ };
12311
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
12312
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
12313
+ readonly time: Schema.Struct<{
12314
+ readonly started: Schema.Finite;
12315
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
12316
+ }>;
12317
+ readonly kind: Schema.tag<"shell">;
12318
+ readonly shellID: Schema.String;
12319
+ readonly command: Schema.String;
12320
+ }>, Schema.Struct<{
12321
+ readonly id: Schema.String;
12322
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
12323
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
12324
+ };
12325
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
12326
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
12327
+ readonly time: Schema.Struct<{
12328
+ readonly started: Schema.Finite;
12329
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
12330
+ }>;
12331
+ readonly kind: Schema.tag<"subagent">;
12332
+ readonly childSessionID: Schema.brand<Schema.String, "SessionID"> & {
12333
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
12334
+ };
12335
+ readonly agent: Schema.String;
12336
+ readonly description: Schema.String;
12337
+ }>, Schema.Struct<{
12338
+ readonly id: Schema.String;
12339
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
12340
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
12341
+ };
12342
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
12343
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
12344
+ readonly time: Schema.Struct<{
12345
+ readonly started: Schema.Finite;
12346
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
12347
+ }>;
12348
+ readonly kind: Schema.tag<"image">;
12349
+ readonly path: Schema.String;
12350
+ readonly model: Schema.String;
12351
+ }>, Schema.Struct<{
12352
+ readonly id: Schema.String;
12353
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
12354
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
12355
+ };
12356
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
12357
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
12358
+ readonly time: Schema.Struct<{
12359
+ readonly started: Schema.Finite;
12360
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
12361
+ }>;
12362
+ readonly kind: Schema.tag<"video">;
12363
+ readonly path: Schema.String;
12364
+ }>, Schema.Struct<{
12365
+ readonly id: Schema.String;
12366
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
12367
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
12368
+ };
12369
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
12370
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
12371
+ readonly time: Schema.Struct<{
12372
+ readonly started: Schema.Finite;
12373
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
12374
+ }>;
12375
+ readonly kind: Schema.tag<"codemode">;
12376
+ }>]>;
12377
+ }>;
12378
+ }> & {
12379
+ type: "experimental.job.updated";
12380
+ durability: "ephemeral";
12381
+ durable: undefined;
12382
+ data: Schema.Struct<{
12383
+ readonly info: Schema.Union<readonly [Schema.Struct<{
12384
+ readonly id: Schema.String;
12385
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
12386
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
12387
+ };
12388
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
12389
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
12390
+ readonly time: Schema.Struct<{
12391
+ readonly started: Schema.Finite;
12392
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
12393
+ }>;
12394
+ readonly kind: Schema.tag<"shell">;
12395
+ readonly shellID: Schema.String;
12396
+ readonly command: Schema.String;
12397
+ }>, Schema.Struct<{
12398
+ readonly id: Schema.String;
12399
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
12400
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
12401
+ };
12402
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
12403
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
12404
+ readonly time: Schema.Struct<{
12405
+ readonly started: Schema.Finite;
12406
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
12407
+ }>;
12408
+ readonly kind: Schema.tag<"subagent">;
12409
+ readonly childSessionID: Schema.brand<Schema.String, "SessionID"> & {
12410
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
12411
+ };
12412
+ readonly agent: Schema.String;
12413
+ readonly description: Schema.String;
12414
+ }>, Schema.Struct<{
12415
+ readonly id: Schema.String;
12416
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
12417
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
12418
+ };
12419
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
12420
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
12421
+ readonly time: Schema.Struct<{
12422
+ readonly started: Schema.Finite;
12423
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
12424
+ }>;
12425
+ readonly kind: Schema.tag<"image">;
12426
+ readonly path: Schema.String;
12427
+ readonly model: Schema.String;
12428
+ }>, Schema.Struct<{
12429
+ readonly id: Schema.String;
12430
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
12431
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
12432
+ };
12433
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
12434
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
12435
+ readonly time: Schema.Struct<{
12436
+ readonly started: Schema.Finite;
12437
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
12438
+ }>;
12439
+ readonly kind: Schema.tag<"video">;
12440
+ readonly path: Schema.String;
12441
+ }>, Schema.Struct<{
12442
+ readonly id: Schema.String;
12443
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
12444
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
12445
+ };
12446
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
12447
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
12448
+ readonly time: Schema.Struct<{
12449
+ readonly started: Schema.Finite;
12450
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
12451
+ }>;
12452
+ readonly kind: Schema.tag<"codemode">;
12453
+ }>]>;
12454
+ }>;
12103
12455
  }, Schema.Struct<{
12104
12456
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
12105
12457
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -11,6 +11,7 @@ import { FileSystem } from "./filesystem.js";
11
11
  import { FileSystemV1 } from "./filesystem-v1.js";
12
12
  import { Form } from "./form.js";
13
13
  import { InstallationEvent } from "./installation-event.js";
14
+ import { Job } from "./job.js";
14
15
  import { Integration } from "./integration.js";
15
16
  import { LegacyEventV1 } from "./legacy-event.js";
16
17
  import { LspEvent } from "./lsp-event.js";
@@ -38,7 +39,7 @@ import { WorktreeEvent } from "./worktree-event.js";
38
39
  import { WebSearch } from "./websearch.js";
39
40
  const coreDefinitions = Event.inventory(...SessionEvent.Definitions);
40
41
  const foundationDefinitions = Event.inventory(...LocationEvent.Definitions, ...ModelsDev.Event.Definitions, ...Credential.Event.Definitions, ...Integration.Event.Definitions, ...Provider.Event.Definitions, ...Model.Event.Definitions, ...Agent.Event.Definitions, ...coreDefinitions);
41
- const featureDefinitions = Event.inventory(...FileSystem.Event.Definitions, ...Reference.Event.Definitions, ...Permission.Event.Definitions, ...Plugin.Event.Definitions, ...Project.Event.Definitions, ...Worktree.Event.Definitions, ...Command.Event.Definitions, ...Config.Event.Definitions, ...Skill.Event.Definitions, ...Pty.Event.Definitions, ...PersistentPty.Event.Definitions, ...Shell.Event.Definitions, ...Form.Event.Definitions, ...WebSearch.Event.Definitions, ...Artifact.Event.Definitions);
42
+ const featureDefinitions = Event.inventory(...FileSystem.Event.Definitions, ...Reference.Event.Definitions, ...Permission.Event.Definitions, ...Plugin.Event.Definitions, ...Project.Event.Definitions, ...Worktree.Event.Definitions, ...Command.Event.Definitions, ...Config.Event.Definitions, ...Skill.Event.Definitions, ...Pty.Event.Definitions, ...PersistentPty.Event.Definitions, ...Shell.Event.Definitions, ...Job.Event.Definitions, ...Form.Event.Definitions, ...WebSearch.Event.Definitions, ...Artifact.Event.Definitions);
42
43
  export const ServerDefinitions = Event.inventory(...foundationDefinitions, ...featureDefinitions,
43
44
  // Current events the TUI consumes from the public stream.
44
45
  ...SessionStatusEvent.Definitions, ...TuiEvent.Definitions, ...InstallationEvent.Definitions, ...VcsEvent.Definitions, McpEvent.StatusChanged, McpEvent.ResourcesChanged, McpEvent.ExperimentalEvent);
package/dist/job.d.ts CHANGED
@@ -167,3 +167,359 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
167
167
  readonly kind: Schema.tag<"codemode">;
168
168
  }>]>;
169
169
  export type Info = typeof Info.Type;
170
+ export declare const Event: {
171
+ Updated: Schema.Struct<{
172
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
173
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
174
+ };
175
+ readonly created: Schema.Finite;
176
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
177
+ readonly type: Schema.Literal<"experimental.job.updated">;
178
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
179
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
180
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
181
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
182
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
183
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
184
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
185
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
186
+ }>, never, never>;
187
+ }>>>, Schema.optionalKey<Schema.Struct<{
188
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
189
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
190
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
191
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
192
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
193
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
194
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
195
+ }>, never, never>;
196
+ }>>, never, never>;
197
+ readonly data: Schema.Struct<{
198
+ readonly info: Schema.Union<readonly [Schema.Struct<{
199
+ readonly id: Schema.String;
200
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
201
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
202
+ };
203
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
204
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
205
+ readonly time: Schema.Struct<{
206
+ readonly started: Schema.Finite;
207
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
208
+ }>;
209
+ readonly kind: Schema.tag<"shell">;
210
+ readonly shellID: Schema.String;
211
+ readonly command: Schema.String;
212
+ }>, Schema.Struct<{
213
+ readonly id: Schema.String;
214
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
215
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
216
+ };
217
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
218
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
219
+ readonly time: Schema.Struct<{
220
+ readonly started: Schema.Finite;
221
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
222
+ }>;
223
+ readonly kind: Schema.tag<"subagent">;
224
+ readonly childSessionID: Schema.brand<Schema.String, "SessionID"> & {
225
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
226
+ };
227
+ readonly agent: Schema.String;
228
+ readonly description: Schema.String;
229
+ }>, Schema.Struct<{
230
+ readonly id: Schema.String;
231
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
232
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
233
+ };
234
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
235
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
236
+ readonly time: Schema.Struct<{
237
+ readonly started: Schema.Finite;
238
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
239
+ }>;
240
+ readonly kind: Schema.tag<"image">;
241
+ readonly path: Schema.String;
242
+ readonly model: Schema.String;
243
+ }>, Schema.Struct<{
244
+ readonly id: Schema.String;
245
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
246
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
247
+ };
248
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
249
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
250
+ readonly time: Schema.Struct<{
251
+ readonly started: Schema.Finite;
252
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
253
+ }>;
254
+ readonly kind: Schema.tag<"video">;
255
+ readonly path: Schema.String;
256
+ }>, Schema.Struct<{
257
+ readonly id: Schema.String;
258
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
259
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
260
+ };
261
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
262
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
263
+ readonly time: Schema.Struct<{
264
+ readonly started: Schema.Finite;
265
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
266
+ }>;
267
+ readonly kind: Schema.tag<"codemode">;
268
+ }>]>;
269
+ }>;
270
+ }> & {
271
+ type: "experimental.job.updated";
272
+ durability: "ephemeral";
273
+ durable: undefined;
274
+ data: Schema.Struct<{
275
+ readonly info: Schema.Union<readonly [Schema.Struct<{
276
+ readonly id: Schema.String;
277
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
278
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
279
+ };
280
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
281
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
282
+ readonly time: Schema.Struct<{
283
+ readonly started: Schema.Finite;
284
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
285
+ }>;
286
+ readonly kind: Schema.tag<"shell">;
287
+ readonly shellID: Schema.String;
288
+ readonly command: Schema.String;
289
+ }>, Schema.Struct<{
290
+ readonly id: Schema.String;
291
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
292
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
293
+ };
294
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
295
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
296
+ readonly time: Schema.Struct<{
297
+ readonly started: Schema.Finite;
298
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
299
+ }>;
300
+ readonly kind: Schema.tag<"subagent">;
301
+ readonly childSessionID: Schema.brand<Schema.String, "SessionID"> & {
302
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
303
+ };
304
+ readonly agent: Schema.String;
305
+ readonly description: Schema.String;
306
+ }>, Schema.Struct<{
307
+ readonly id: Schema.String;
308
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
309
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
310
+ };
311
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
312
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
313
+ readonly time: Schema.Struct<{
314
+ readonly started: Schema.Finite;
315
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
316
+ }>;
317
+ readonly kind: Schema.tag<"image">;
318
+ readonly path: Schema.String;
319
+ readonly model: Schema.String;
320
+ }>, Schema.Struct<{
321
+ readonly id: Schema.String;
322
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
323
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
324
+ };
325
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
326
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
327
+ readonly time: Schema.Struct<{
328
+ readonly started: Schema.Finite;
329
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
330
+ }>;
331
+ readonly kind: Schema.tag<"video">;
332
+ readonly path: Schema.String;
333
+ }>, Schema.Struct<{
334
+ readonly id: Schema.String;
335
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
336
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
337
+ };
338
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
339
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
340
+ readonly time: Schema.Struct<{
341
+ readonly started: Schema.Finite;
342
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
343
+ }>;
344
+ readonly kind: Schema.tag<"codemode">;
345
+ }>]>;
346
+ }>;
347
+ };
348
+ Definitions: readonly [Schema.Struct<{
349
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
350
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
351
+ };
352
+ readonly created: Schema.Finite;
353
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
354
+ readonly type: Schema.Literal<"experimental.job.updated">;
355
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
356
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
357
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
358
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
359
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
360
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
361
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
362
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
363
+ }>, never, never>;
364
+ }>>>, Schema.optionalKey<Schema.Struct<{
365
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
366
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
367
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
368
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
369
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
370
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
371
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
372
+ }>, never, never>;
373
+ }>>, never, never>;
374
+ readonly data: Schema.Struct<{
375
+ readonly info: Schema.Union<readonly [Schema.Struct<{
376
+ readonly id: Schema.String;
377
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
378
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
379
+ };
380
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
381
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
382
+ readonly time: Schema.Struct<{
383
+ readonly started: Schema.Finite;
384
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
385
+ }>;
386
+ readonly kind: Schema.tag<"shell">;
387
+ readonly shellID: Schema.String;
388
+ readonly command: Schema.String;
389
+ }>, Schema.Struct<{
390
+ readonly id: Schema.String;
391
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
392
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
393
+ };
394
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
395
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
396
+ readonly time: Schema.Struct<{
397
+ readonly started: Schema.Finite;
398
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
399
+ }>;
400
+ readonly kind: Schema.tag<"subagent">;
401
+ readonly childSessionID: Schema.brand<Schema.String, "SessionID"> & {
402
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
403
+ };
404
+ readonly agent: Schema.String;
405
+ readonly description: Schema.String;
406
+ }>, Schema.Struct<{
407
+ readonly id: Schema.String;
408
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
409
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
410
+ };
411
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
412
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
413
+ readonly time: Schema.Struct<{
414
+ readonly started: Schema.Finite;
415
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
416
+ }>;
417
+ readonly kind: Schema.tag<"image">;
418
+ readonly path: Schema.String;
419
+ readonly model: Schema.String;
420
+ }>, Schema.Struct<{
421
+ readonly id: Schema.String;
422
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
423
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
424
+ };
425
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
426
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
427
+ readonly time: Schema.Struct<{
428
+ readonly started: Schema.Finite;
429
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
430
+ }>;
431
+ readonly kind: Schema.tag<"video">;
432
+ readonly path: Schema.String;
433
+ }>, Schema.Struct<{
434
+ readonly id: Schema.String;
435
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
436
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
437
+ };
438
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
439
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
440
+ readonly time: Schema.Struct<{
441
+ readonly started: Schema.Finite;
442
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
443
+ }>;
444
+ readonly kind: Schema.tag<"codemode">;
445
+ }>]>;
446
+ }>;
447
+ }> & {
448
+ type: "experimental.job.updated";
449
+ durability: "ephemeral";
450
+ durable: undefined;
451
+ data: Schema.Struct<{
452
+ readonly info: Schema.Union<readonly [Schema.Struct<{
453
+ readonly id: Schema.String;
454
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
455
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
456
+ };
457
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
458
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
459
+ readonly time: Schema.Struct<{
460
+ readonly started: Schema.Finite;
461
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
462
+ }>;
463
+ readonly kind: Schema.tag<"shell">;
464
+ readonly shellID: Schema.String;
465
+ readonly command: Schema.String;
466
+ }>, Schema.Struct<{
467
+ readonly id: Schema.String;
468
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
469
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
470
+ };
471
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
472
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
473
+ readonly time: Schema.Struct<{
474
+ readonly started: Schema.Finite;
475
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
476
+ }>;
477
+ readonly kind: Schema.tag<"subagent">;
478
+ readonly childSessionID: Schema.brand<Schema.String, "SessionID"> & {
479
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
480
+ };
481
+ readonly agent: Schema.String;
482
+ readonly description: Schema.String;
483
+ }>, Schema.Struct<{
484
+ readonly id: Schema.String;
485
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
486
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
487
+ };
488
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
489
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
490
+ readonly time: Schema.Struct<{
491
+ readonly started: Schema.Finite;
492
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
493
+ }>;
494
+ readonly kind: Schema.tag<"image">;
495
+ readonly path: Schema.String;
496
+ readonly model: Schema.String;
497
+ }>, Schema.Struct<{
498
+ readonly id: Schema.String;
499
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
500
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
501
+ };
502
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
503
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
504
+ readonly time: Schema.Struct<{
505
+ readonly started: Schema.Finite;
506
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
507
+ }>;
508
+ readonly kind: Schema.tag<"video">;
509
+ readonly path: Schema.String;
510
+ }>, Schema.Struct<{
511
+ readonly id: Schema.String;
512
+ readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
513
+ create: () => string & import("effect/Brand").Brand<"SessionID">;
514
+ };
515
+ readonly status: Schema.Literals<readonly ["running", "completed", "error", "cancelled"]>;
516
+ readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
517
+ readonly time: Schema.Struct<{
518
+ readonly started: Schema.Finite;
519
+ readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
520
+ }>;
521
+ readonly kind: Schema.tag<"codemode">;
522
+ }>]>;
523
+ }>;
524
+ }];
525
+ };
package/dist/job.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * as Job from "./job.js";
2
2
  import { Schema } from "effect";
3
+ import { ephemeral, inventory } from "./event.js";
3
4
  import { optional } from "./schema.js";
4
5
  import { SessionID } from "./session-id.js";
5
6
  export const Kind = Schema.Literals(["shell", "subagent", "image", "video", "codemode"]).annotate({
@@ -49,3 +50,6 @@ export const CodeMode = Schema.Struct({ kind: Schema.tag("codemode"), ...Base })
49
50
  identifier: "Job.CodeMode",
50
51
  });
51
52
  export const Info = Schema.Union([Shell, Subagent, Image, Video, CodeMode]).pipe(Schema.toTaggedUnion("kind"), Schema.annotate({ identifier: "Job.Info" }));
53
+ /** A background job started, moved to the background, or ended. Experimental: may change without compatibility guarantees. */
54
+ const Updated = ephemeral({ type: "experimental.job.updated", schema: { info: Info } });
55
+ export const Event = { Updated, Definitions: inventory(Updated) };
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-1314",
4
+ "version": "0.0.0-dev-1317",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {